@botpress/webchat 2.2.6 → 2.2.7

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.
@@ -66,15 +66,15 @@ ${nu(e.value)}`.trim();case Qe.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
66
66
  `,o+=`}
67
67
  `,o+=`}
68
68
  `),o+=`}
69
- `,o+="})"}let i=r?o?r+o:n?n==="z.never()"?r+".strict()":r+`.catchall(${n})`:r:o||(n?`z.record(${n})`:"z.record(z.any())");return ur.an.anyOf(e)&&(i+=`.and(${zS(ee(R({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),ur.a.oneOf(e)&&(i+=`.and(${rm(ee(R({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),ur.an.allOf(e)&&(i+=`.and(${cc(ee(R({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),i}O(ZS,"parseObject");var GD=O(e=>{var t;let r="z.string()";if((t=e[Tt])!=null&&t.coerce){if(e.format==="date-time")return"z.coerce.date()";r="z.coerce.string()"}return r+=Vr(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),r+=Vr(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),r+=Vr(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),r+=Vr(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),r},"parseString"),JD=O((e,t)=>`${Tr(UD(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),YD=O((e,t)=>{var r,n;if(e.oneOf.length<=1||!((r=e.discriminator)!=null&&r.propertyName))return rm(e,t);const o=e.oneOf.map((i,a)=>Tr(i,ee(R({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(n=e.discriminator)==null?void 0:n.propertyName}", [${o.join(", ")}])`},"parseDiscriminator"),Tr=O((e,t={seen:new Map,path:[]},r)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const i=t.parserOverride(e,t);if(typeof i=="string")return i}let n=t.seen.get(e);if(n){if(n.r!==void 0)return n.r;if(t.depth===void 0||n.n>=t.depth)return"z.any()";n.n+=1}else n={r:void 0,n:0},t.seen.set(e,n);let o=e2(e,t);return r||(o=XD(e,o),t.withoutDefaults||(o=QD(e,o))),n.r=o,o},"parseSchema"),XD=O((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),QD=O((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),e2=O((e,t)=>ur.a.nullable(e)?JD(e,t):ur.an.object(e)?ZS(e,t):ur.an.array(e)?ZD(e,t):ur.an.anyOf(e)?zS(e,t):ur.an.allOf(e)?cc(e,t):ur.a.discriminator(e)?YD(e,t):ur.a.oneOf(e)?rm(e,t):ur.a.not(e)?FD(e,t):ur.an.enum(e)?HD(e):ur.a.const(e)?VD(e):ur.a.multipleType(e)?LD(e,t):ur.a.primitive(e,"string")?GD(e):ur.a.primitive(e,"number")||ur.a.primitive(e,"integer")?KD(e):ur.a.primitive(e,"boolean")?jD(e):ur.a.primitive(e,"null")?qD(e):ur.a.conditional(e)?WD(e,t):DD(e),"selectParser"),ur={an:{object:O(e=>e.type==="object","object"),array:O(e=>e.type==="array","array"),anyOf:O(e=>e.anyOf!==void 0,"anyOf"),allOf:O(e=>e.allOf!==void 0,"allOf"),enum:O(e=>e.enum!==void 0,"enum")},a:{nullable:O(e=>e.nullable===!0,"nullable"),multipleType:O(e=>Array.isArray(e.type),"multipleType"),not:O(e=>e.not!==void 0,"not"),const:O(e=>e.const!==void 0,"const"),primitive:O((e,t)=>e.type===t,"primitive"),conditional:O(e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),"conditional"),discriminator:O(e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},"discriminator"),oneOf:O(e=>e.oneOf!==void 0,"oneOf")}},t2=O(e=>Tr(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),r2=O(e=>{let t=t2(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(Nr)},"jsonSchemaToZod"),lc=O((e,t)=>{var r,n;if(t[Tt]&&e._def&&(e._def[Tt]=t[Tt]),((r=e._def)==null?void 0:r.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([o,i])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[o]&&lc(a[o],i)}),((n=e._def)==null?void 0:n.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&lc(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const o=t.items;if(typeof o=="object"&&!Array.isArray(o)){const i=e._def.type;i&&lc(i,o)}else Array.isArray(o)&&o.forEach((i,a)=>{const s=e._def;s.typeName===Nr.ZodFirstPartyTypeKind.ZodTuple&&lc(s.items[a],i)})}},"applyZuiPropsRecursively"),uc=O(e=>{const t=r2(e);return lc(t,e),t},"jsonSchemaToZui"),Ra=eu($,1),id=eu($,1),VS=class extends id.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error:",t,r)}render(){return this.state.hasError&&this.props.fallback?id.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};O(VS,"ErrorBoundary");var Pa=VS;function HS(e,t){return r=>id.default.createElement(Pa,{fallback:t,fieldSchema:r.fieldSchema,path:r.path},id.default.createElement(e,R({},r)))}O(HS,"withErrorBoundary");var Cn=eu($,1),ad=O(e=>{var t=e,{components:r,fieldSchema:n,path:o,required:i,fallback:a}=t,s=E0(t,["components","fieldSchema","path","required","fallback"]),c,l;const{formData:u,disabled:d,hidden:p,handlePropertyChange:f,addArrayItem:h,removeArrayItem:y,formErrors:m,formValid:g}=I0(n,o),v=(0,Cn.useMemo)(()=>ji(u,o),[u,o]),b=(0,Cn.useMemo)(()=>fD(r,n),[n,r]),{discriminator:x,discriminatedSchema:w,discriminatorValue:S}=lD(n,o);if(!b||p===!0)return null;const{Component:C,type:I}=b,P={type:I,componentID:b.id,scope:o.join("."),context:{path:o,readonly:!1,formData:u,formErrors:m,formValid:g,updateForm:f,updateFormData:O(W=>f([],W),"updateFormData")},onChange:O(W=>f(o,W),"onChange"),disabled:d,errors:(m==null?void 0:m.filter(W=>W.path===o))||[],label:((c=n[Tt])==null?void 0:c.title)||Ph(((l=o[o.length-1])==null?void 0:l.toString())||""),params:b.params,schema:n,zuiProps:n[Tt]};if(n.type==="array"&&I==="array"){const W=C,Z=P.schema,B=Array.isArray(v)||typeof v=="object"?v:[],F=R(ee(R({},P),{type:I,schema:Z,data:B,addItem:O(j=>h(o,j),"addItem"),removeItem:O(j=>y(o,j),"removeItem")}),s);return Array.isArray(n.items)?null:Cn.default.createElement(W,ee(R({key:P.scope},F),{isArrayChild:F.isArrayChild}),Array.isArray(F.data)?F.data.map((j,U)=>{const K=[...o,U.toString()];return Cn.default.createElement(Pa,{key:K.join("."),fallback:a,fieldSchema:n.items,path:K},Cn.default.createElement(ad,{key:K.join("."),components:r,fieldSchema:n.items,path:K,required:i,isArrayChild:!0,index:U,removeSelf:()=>y(o,U),fallback:a}))}):[])}if(n.type==="object"&&I==="object"&&n.properties){const W=C,Z=R(ee(R({},P),{type:I,schema:P.schema,data:v||{}}),s);return Cn.default.createElement(W,ee(R({key:P.scope},Z),{isArrayChild:Z.isArrayChild}),Object.entries(n.properties).map(([B,F])=>{var j;const U=[...o,B];return Cn.default.createElement(Pa,{key:U.join("."),fallback:a,fieldSchema:F,path:U},Cn.default.createElement(ad,{key:U.join("."),components:r,fieldSchema:F,path:U,required:((j=n.required)==null?void 0:j.includes(B))||!1,isArrayChild:!1,fallback:a}))}))}if(I==="discriminatedUnion"){const W=C,Z=R(ee(R({},P),{type:I,schema:P.schema,data:v||{},discriminatorKey:(x==null?void 0:x.key)||null,discriminatorLabel:Ph((x==null?void 0:x.key)||"Unknown"),discriminatorOptions:(x==null?void 0:x.values)||null,discriminatorValue:S,setDiscriminator:O(B=>{if(!(x!=null&&x.key)){console.warn("No discriminator key found, cannot set discriminator");return}f(o,{[x.key]:B})},"setDiscriminator")}),s);return Cn.default.createElement(W,ee(R({key:P.scope},Z),{isArrayChild:Z.isArrayChild}),w&&Cn.default.createElement(Pa,{key:o.join("."),fallback:a,fieldSchema:w,path:o},Cn.default.createElement(ad,{components:r,fieldSchema:w,path:o,required:i,isArrayChild:!1,fallback:a})))}const A=C,L=R(ee(R({},P),{type:I,schema:P.schema,config:{},required:i,data:v,description:n.description}),s);return Cn.default.createElement(A,R({},L))},"FormElementRenderer"),n2=O(({schema:e,components:t,onChange:r,value:n,disableValidation:o,fallback:i,dataTransform:a,onValidation:s})=>{const[c,l]=(0,Ra.useState)(n);return(0,Ra.useEffect)(()=>{r(c)},[c]),(0,Ra.useEffect)(()=>{const u=Ea(e);l(d=>ru(u,d))},[JSON.stringify(e),l]),Ra.default.createElement(cD,{formData:c,setFormData:l,formSchema:e,disableValidation:o||!1,dataTransform:a,onValidation:s},Ra.default.createElement(Pa,{fallback:i,fieldSchema:e,path:[]},Ra.default.createElement(ad,{components:t,fieldSchema:e,path:[],fallback:i,required:!0,isArrayChild:!1})))},"ZuiForm"),o2={string:{},number:{slider:{id:"slider",params:Qe.object({})}},boolean:{switch:{id:"switch",params:Qe.object({})}},array:{},object:{},discriminatedUnion:{}},i2={jsonSchemaToZui:uc,zuiToJsonSchema:nd,objectToZui:Ia,toTypescript:iu};const nm={},om=Ih(Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"})));function WS(e,t){return function(){return e.apply(t,arguments)}}const{toString:a2}=Object.prototype,{getPrototypeOf:im}=Object,sd=(e=>t=>{const r=a2.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>sd(t)===e),cd=e=>t=>typeof t===e,{isArray:Na}=Array,dc=cd("undefined");function s2(e){return e!==null&&!dc(e)&&e.constructor!==null&&!dc(e.constructor)&&An(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const KS=qn("ArrayBuffer");function c2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&KS(e.buffer),t}const l2=cd("string"),An=cd("function"),GS=cd("number"),ld=e=>e!==null&&typeof e=="object",u2=e=>e===!0||e===!1,ud=e=>{if(sd(e)!=="object")return!1;const t=im(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},d2=qn("Date"),f2=qn("File"),p2=qn("Blob"),h2=qn("FileList"),m2=e=>ld(e)&&An(e.pipe),y2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||An(e.append)&&((t=sd(e))==="formdata"||t==="object"&&An(e.toString)&&e.toString()==="[object FormData]"))},g2=qn("URLSearchParams"),[v2,b2,w2,x2]=["ReadableStream","Request","Response","Headers"].map(qn),S2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Na(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function JS(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const YS=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),XS=e=>!dc(e)&&e!==YS;function am(){const{caseless:e}=XS(this)&&this||{},t={},r=(n,o)=>{const i=e&&JS(t,o)||o;ud(t[i])&&ud(n)?t[i]=am(t[i],n):ud(n)?t[i]=am({},n):Na(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&fc(arguments[n],r);return t}const _2=(e,t,r,{allOwnKeys:n}={})=>(fc(t,(o,i)=>{r&&An(o)?e[i]=WS(o,r):e[i]=o},{allOwnKeys:n}),e),E2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),k2=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},T2=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&im(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$2=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},O2=e=>{if(!e)return null;if(Na(e))return e;let t=e.length;if(!GS(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},C2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&im(Uint8Array)),A2=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},I2=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},R2=qn("HTMLFormElement"),P2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),QS=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N2=qn("RegExp"),e1=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};fc(r,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(n[i]=a||o)}),Object.defineProperties(e,n)},M2=e=>{e1(e,(t,r)=>{if(An(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(An(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},j2=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Na(e)?n(e):n(String(e).split(t)),r},D2=()=>{},L2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,sm="abcdefghijklmnopqrstuvwxyz",t1="0123456789",r1={DIGIT:t1,ALPHA:sm,ALPHA_DIGIT:sm+sm.toUpperCase()+t1},F2=(e=16,t=r1.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function q2(e){return!!(e&&An(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const B2=e=>{const t=new Array(10),r=(n,o)=>{if(ld(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Na(n)?[]:{};return fc(n,(a,s)=>{const c=r(a,o+1);!dc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)},U2=qn("AsyncFunction"),oe={isArray:Na,isArrayBuffer:KS,isBuffer:s2,isFormData:y2,isArrayBufferView:c2,isString:l2,isNumber:GS,isBoolean:u2,isObject:ld,isPlainObject:ud,isReadableStream:v2,isRequest:b2,isResponse:w2,isHeaders:x2,isUndefined:dc,isDate:d2,isFile:f2,isBlob:p2,isRegExp:N2,isFunction:An,isStream:m2,isURLSearchParams:g2,isTypedArray:C2,isFileList:h2,forEach:fc,merge:am,extend:_2,trim:S2,stripBOM:E2,inherits:k2,toFlatObject:T2,kindOf:sd,kindOfTest:qn,endsWith:$2,toArray:O2,forEachEntry:A2,matchAll:I2,isHTMLForm:R2,hasOwnProperty:QS,hasOwnProp:QS,reduceDescriptors:e1,freezeMethods:M2,toObjectSet:j2,toCamelCase:P2,noop:D2,toFiniteNumber:L2,findKey:JS,global:YS,isContextDefined:XS,ALPHABET:r1,generateString:F2,isSpecCompliantForm:q2,toJSONObject:B2,isAsyncFn:U2,isThenable:e=>e&&(ld(e)||An(e))&&An(e.then)&&An(e.catch)};function ut(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}oe.inherits(ut,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:oe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const n1=ut.prototype,o1={};["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=>{o1[e]={value:e}}),Object.defineProperties(ut,o1),Object.defineProperty(n1,"isAxiosError",{value:!0}),ut.from=(e,t,r,n,o,i)=>{const a=Object.create(n1);return oe.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ut.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const z2=null;function cm(e){return oe.isPlainObject(e)||oe.isArray(e)}function i1(e){return oe.endsWith(e,"[]")?e.slice(0,-2):e}function a1(e,t,r){return e?e.concat(t).map(function(o,i){return o=i1(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Z2(e){return oe.isArray(e)&&!e.some(cm)}const V2=oe.toFlatObject(oe,{},null,function(t){return/^is[A-Z]/.test(t)});function dd(e,t,r){if(!oe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=oe.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!oe.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&oe.isSpecCompliantForm(t);if(!oe.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(oe.isDate(h))return h.toISOString();if(!c&&oe.isBlob(h))throw new ut("Blob is not supported. Use a Buffer instead.");return oe.isArrayBuffer(h)||oe.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(oe.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(oe.isArray(h)&&Z2(h)||(oe.isFileList(h)||oe.endsWith(y,"[]"))&&(g=oe.toArray(h)))return y=i1(y),g.forEach(function(b,x){!(oe.isUndefined(b)||b===null)&&t.append(a===!0?a1([y],x,i):a===null?y:y+"[]",l(b))}),!1}return cm(h)?!0:(t.append(a1(m,y,i),l(h)),!1)}const d=[],p=Object.assign(V2,{defaultVisitor:u,convertValue:l,isVisitable:cm});function f(h,y){if(!oe.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),oe.forEach(h,function(g,v){(!(oe.isUndefined(g)||g===null)&&o.call(t,g,oe.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!oe.isObject(e))throw new TypeError("data must be an object");return f(e),t}function s1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function lm(e,t){this._pairs=[],e&&dd(e,this,t)}const c1=lm.prototype;c1.append=function(t,r){this._pairs.push([t,r])},c1.toString=function(t){const r=t?function(n){return t.call(this,n,s1)}:s1;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function H2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function l1(e,t,r){if(!t)return e;const n=r&&r.encode||H2,o=r&&r.serialize;let i;if(o?i=o(t,r):i=oe.isURLSearchParams(t)?t.toString():new lm(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const u1=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){oe.forEach(this.handlers,function(n){n!==null&&t(n)})}},d1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},W2={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:lm,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},um=typeof window<"u"&&typeof document<"u",K2=(e=>um&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),G2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),J2=um&&window.location.href||"http://localhost",Bn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:um,hasStandardBrowserEnv:K2,hasStandardBrowserWebWorkerEnv:G2,origin:J2},Symbol.toStringTag,{value:"Module"})),...W2};function Y2(e,t){return dd(e,new Bn.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return Bn.isNode&&oe.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function X2(e){return oe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Q2(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function f1(e){function t(r,n,o,i){let a=r[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&oe.isArray(o)?o.length:a,c?(oe.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!oe.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&oe.isArray(o[a])&&(o[a]=Q2(o[a])),!s)}if(oe.isFormData(e)&&oe.isFunction(e.entries)){const r={};return oe.forEachEntry(e,(n,o)=>{t(X2(n),o,r,0)}),r}return null}function eL(e,t,r){if(oe.isString(e))try{return(t||JSON.parse)(e),oe.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const dm={transitional:d1,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=oe.isObject(t);if(i&&oe.isHTMLForm(t)&&(t=new FormData(t)),oe.isFormData(t))return o?JSON.stringify(f1(t)):t;if(oe.isArrayBuffer(t)||oe.isBuffer(t)||oe.isStream(t)||oe.isFile(t)||oe.isBlob(t)||oe.isReadableStream(t))return t;if(oe.isArrayBufferView(t))return t.buffer;if(oe.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Y2(t,this.formSerializer).toString();if((s=oe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return dd(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),eL(t)):t}],transformResponse:[function(t){const r=this.transitional||dm.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(oe.isResponse(t)||oe.isReadableStream(t))return t;if(t&&oe.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ut.from(s,ut.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:Bn.classes.FormData,Blob:Bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch"],e=>{dm.headers[e]={}});const fm=dm,tL=oe.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"]),rL=e=>{const t={};let r,n,o;return e&&e.split(`
69
+ `,o+="})"}let i=r?o?r+o:n?n==="z.never()"?r+".strict()":r+`.catchall(${n})`:r:o||(n?`z.record(${n})`:"z.record(z.any())");return ur.an.anyOf(e)&&(i+=`.and(${zS(ee(R({},e),{anyOf:e.anyOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),ur.a.oneOf(e)&&(i+=`.and(${rm(ee(R({},e),{oneOf:e.oneOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),ur.an.allOf(e)&&(i+=`.and(${cc(ee(R({},e),{allOf:e.allOf.map(a=>typeof a=="object"&&!a.type&&(a.properties||a.additionalProperties||a.patternProperties)?ee(R({},a),{type:"object"}):a)}),t)})`),i}O(ZS,"parseObject");var GD=O(e=>{var t;let r="z.string()";if((t=e[Tt])!=null&&t.coerce){if(e.format==="date-time")return"z.coerce.date()";r="z.coerce.string()"}return r+=Vr(e,"format",({value:n})=>{switch(n){case"email":return[".email(",")"];case"ip":return[".ip(",")"];case"ipv4":return['.ip({ version: "v4"',", message: "," })"];case"ipv6":return['.ip({ version: "v6"',", message: "," })"];case"uri":return[".url(",")"];case"uuid":return[".uuid(",")"];case"date-time":return[".datetime(",")"]}}),r+=Vr(e,"pattern",({json:n})=>[`.regex(new RegExp(${n})`,", ",")"]),r+=Vr(e,"minLength",({json:n})=>[`.min(${n}`,", ",")"]),r+=Vr(e,"maxLength",({json:n})=>[`.max(${n}`,", ",")"]),r},"parseString"),JD=O((e,t)=>`${Tr(UD(e,"nullable"),t,!0)}.nullable()`,"parseNullable"),YD=O((e,t)=>{var r,n;if(e.oneOf.length<=1||!((r=e.discriminator)!=null&&r.propertyName))return rm(e,t);const o=e.oneOf.map((i,a)=>Tr(i,ee(R({},t),{path:[...t.path,"oneOf",a]})));return`z.discriminatedUnion("${(n=e.discriminator)==null?void 0:n.propertyName}", [${o.join(", ")}])`},"parseDiscriminator"),Tr=O((e,t={seen:new Map,path:[]},r)=>{if(typeof e!="object")return e?"z.any()":"z.never()";if(t.parserOverride){const i=t.parserOverride(e,t);if(typeof i=="string")return i}let n=t.seen.get(e);if(n){if(n.r!==void 0)return n.r;if(t.depth===void 0||n.n>=t.depth)return"z.any()";n.n+=1}else n={r:void 0,n:0},t.seen.set(e,n);let o=e2(e,t);return r||(o=XD(e,o),t.withoutDefaults||(o=QD(e,o))),n.r=o,o},"parseSchema"),XD=O((e,t)=>(e.description&&(t+=`.describe(${JSON.stringify(e.description)})`),t),"addMeta"),QD=O((e,t)=>(e.default!==void 0&&(t+=`.default(${JSON.stringify(e.default)})`),t),"addDefaults"),e2=O((e,t)=>ur.a.nullable(e)?JD(e,t):ur.an.object(e)?ZS(e,t):ur.an.array(e)?ZD(e,t):ur.an.anyOf(e)?zS(e,t):ur.an.allOf(e)?cc(e,t):ur.a.discriminator(e)?YD(e,t):ur.a.oneOf(e)?rm(e,t):ur.a.not(e)?FD(e,t):ur.an.enum(e)?HD(e):ur.a.const(e)?VD(e):ur.a.multipleType(e)?LD(e,t):ur.a.primitive(e,"string")?GD(e):ur.a.primitive(e,"number")||ur.a.primitive(e,"integer")?KD(e):ur.a.primitive(e,"boolean")?jD(e):ur.a.primitive(e,"null")?qD(e):ur.a.conditional(e)?WD(e,t):DD(e),"selectParser"),ur={an:{object:O(e=>e.type==="object","object"),array:O(e=>e.type==="array","array"),anyOf:O(e=>e.anyOf!==void 0,"anyOf"),allOf:O(e=>e.allOf!==void 0,"allOf"),enum:O(e=>e.enum!==void 0,"enum")},a:{nullable:O(e=>e.nullable===!0,"nullable"),multipleType:O(e=>Array.isArray(e.type),"multipleType"),not:O(e=>e.not!==void 0,"not"),const:O(e=>e.const!==void 0,"const"),primitive:O((e,t)=>e.type===t,"primitive"),conditional:O(e=>!!("if"in e&&e.if&&"then"in e&&"else"in e&&e.then&&e.else),"conditional"),discriminator:O(e=>{var t;return e.oneOf!==void 0&&((t=e.discriminator)==null?void 0:t.propertyName)!==void 0},"discriminator"),oneOf:O(e=>e.oneOf!==void 0,"oneOf")}},t2=O(e=>Tr(e,{seen:new Map,path:[]}),"jsonSchemaToZodStr"),r2=O(e=>{let t=t2(e);return t=t.replaceAll("errors: z.ZodError[]","errors"),new Function("z",`return ${t}`)(Nr)},"jsonSchemaToZod"),lc=O((e,t)=>{var r,n;if(t[Tt]&&e._def&&(e._def[Tt]=t[Tt]),((r=e._def)==null?void 0:r.typeName)==="ZodObject"&&t.type==="object"&&t.properties&&Object.entries(t.properties).forEach(([o,i])=>{const a=typeof e._def.shape=="function"?e._def.shape():e._def.shape;a[o]&&lc(a[o],i)}),((n=e._def)==null?void 0:n.typeName)==="ZodRecord"&&t.type==="object"&&t.additionalProperties&&lc(e._def.valueType,t.additionalProperties),t.type==="array"&&t.items){const o=t.items;if(typeof o=="object"&&!Array.isArray(o)){const i=e._def.type;i&&lc(i,o)}else Array.isArray(o)&&o.forEach((i,a)=>{const s=e._def;s.typeName===Nr.ZodFirstPartyTypeKind.ZodTuple&&lc(s.items[a],i)})}},"applyZuiPropsRecursively"),uc=O(e=>{const t=r2(e);return lc(t,e),t},"jsonSchemaToZui"),Ra=eu($,1),id=eu($,1),VS=class extends id.Component{constructor(){super(...arguments),this.state={hasError:!1,error:null}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,r){console.error("Uncaught error:",t,r)}render(){return this.state.hasError&&this.props.fallback?id.default.createElement(this.props.fallback,{error:this.state.error,schema:this.props.fieldSchema}):this.props.children}};O(VS,"ErrorBoundary");var Pa=VS;function HS(e,t){return r=>id.default.createElement(Pa,{fallback:t,fieldSchema:r.fieldSchema,path:r.path},id.default.createElement(e,R({},r)))}O(HS,"withErrorBoundary");var Cn=eu($,1),ad=O(e=>{var t=e,{components:r,fieldSchema:n,path:o,required:i,fallback:a}=t,s=E0(t,["components","fieldSchema","path","required","fallback"]),c,l;const{formData:u,disabled:d,hidden:p,handlePropertyChange:f,addArrayItem:h,removeArrayItem:y,formErrors:m,formValid:g}=I0(n,o),v=(0,Cn.useMemo)(()=>ji(u,o),[u,o]),b=(0,Cn.useMemo)(()=>fD(r,n),[n,r]),{discriminator:x,discriminatedSchema:w,discriminatorValue:S}=lD(n,o);if(!b||p===!0)return null;const{Component:C,type:I}=b,P={type:I,componentID:b.id,scope:o.join("."),context:{path:o,readonly:!1,formData:u,formErrors:m,formValid:g,updateForm:f,updateFormData:O(K=>f([],K),"updateFormData")},onChange:O(K=>f(o,K),"onChange"),disabled:d,errors:(m==null?void 0:m.filter(K=>K.path===o))||[],label:((c=n[Tt])==null?void 0:c.title)||Ph(((l=o[o.length-1])==null?void 0:l.toString())||""),params:b.params,schema:n,zuiProps:n[Tt]};if(n.type==="array"&&I==="array"){const K=C,z=P.schema,B=Array.isArray(v)||typeof v=="object"?v:[],F=R(ee(R({},P),{type:I,schema:z,data:B,addItem:O(j=>h(o,j),"addItem"),removeItem:O(j=>y(o,j),"removeItem")}),s);return Array.isArray(n.items)?null:Cn.default.createElement(K,ee(R({key:P.scope},F),{isArrayChild:F.isArrayChild}),Array.isArray(F.data)?F.data.map((j,Z)=>{const W=[...o,Z.toString()];return Cn.default.createElement(Pa,{key:W.join("."),fallback:a,fieldSchema:n.items,path:W},Cn.default.createElement(ad,{key:W.join("."),components:r,fieldSchema:n.items,path:W,required:i,isArrayChild:!0,index:Z,removeSelf:()=>y(o,Z),fallback:a}))}):[])}if(n.type==="object"&&I==="object"&&n.properties){const K=C,z=R(ee(R({},P),{type:I,schema:P.schema,data:v||{}}),s);return Cn.default.createElement(K,ee(R({key:P.scope},z),{isArrayChild:z.isArrayChild}),Object.entries(n.properties).map(([B,F])=>{var j;const Z=[...o,B];return Cn.default.createElement(Pa,{key:Z.join("."),fallback:a,fieldSchema:F,path:Z},Cn.default.createElement(ad,{key:Z.join("."),components:r,fieldSchema:F,path:Z,required:((j=n.required)==null?void 0:j.includes(B))||!1,isArrayChild:!1,fallback:a}))}))}if(I==="discriminatedUnion"){const K=C,z=R(ee(R({},P),{type:I,schema:P.schema,data:v||{},discriminatorKey:(x==null?void 0:x.key)||null,discriminatorLabel:Ph((x==null?void 0:x.key)||"Unknown"),discriminatorOptions:(x==null?void 0:x.values)||null,discriminatorValue:S,setDiscriminator:O(B=>{if(!(x!=null&&x.key)){console.warn("No discriminator key found, cannot set discriminator");return}f(o,{[x.key]:B})},"setDiscriminator")}),s);return Cn.default.createElement(K,ee(R({key:P.scope},z),{isArrayChild:z.isArrayChild}),w&&Cn.default.createElement(Pa,{key:o.join("."),fallback:a,fieldSchema:w,path:o},Cn.default.createElement(ad,{components:r,fieldSchema:w,path:o,required:i,isArrayChild:!1,fallback:a})))}const A=C,L=R(ee(R({},P),{type:I,schema:P.schema,config:{},required:i,data:v,description:n.description}),s);return Cn.default.createElement(A,R({},L))},"FormElementRenderer"),n2=O(({schema:e,components:t,onChange:r,value:n,disableValidation:o,fallback:i,dataTransform:a,onValidation:s})=>{const[c,l]=(0,Ra.useState)(n);return(0,Ra.useEffect)(()=>{r(c)},[c]),(0,Ra.useEffect)(()=>{const u=Ea(e);l(d=>ru(u,d))},[JSON.stringify(e),l]),Ra.default.createElement(cD,{formData:c,setFormData:l,formSchema:e,disableValidation:o||!1,dataTransform:a,onValidation:s},Ra.default.createElement(Pa,{fallback:i,fieldSchema:e,path:[]},Ra.default.createElement(ad,{components:t,fieldSchema:e,path:[],fallback:i,required:!0,isArrayChild:!1})))},"ZuiForm"),o2={string:{},number:{slider:{id:"slider",params:Qe.object({})}},boolean:{switch:{id:"switch",params:Qe.object({})}},array:{},object:{},discriminatedUnion:{}},i2={jsonSchemaToZui:uc,zuiToJsonSchema:nd,objectToZui:Ia,toTypescript:iu};const nm={},om=Ih(Object.freeze(Object.defineProperty({__proto__:null,default:nm},Symbol.toStringTag,{value:"Module"})));function WS(e,t){return function(){return e.apply(t,arguments)}}const{toString:a2}=Object.prototype,{getPrototypeOf:im}=Object,sd=(e=>t=>{const r=a2.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),qn=e=>(e=e.toLowerCase(),t=>sd(t)===e),cd=e=>t=>typeof t===e,{isArray:Na}=Array,dc=cd("undefined");function s2(e){return e!==null&&!dc(e)&&e.constructor!==null&&!dc(e.constructor)&&An(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const KS=qn("ArrayBuffer");function c2(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&KS(e.buffer),t}const l2=cd("string"),An=cd("function"),GS=cd("number"),ld=e=>e!==null&&typeof e=="object",u2=e=>e===!0||e===!1,ud=e=>{if(sd(e)!=="object")return!1;const t=im(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},d2=qn("Date"),f2=qn("File"),p2=qn("Blob"),h2=qn("FileList"),m2=e=>ld(e)&&An(e.pipe),y2=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||An(e.append)&&((t=sd(e))==="formdata"||t==="object"&&An(e.toString)&&e.toString()==="[object FormData]"))},g2=qn("URLSearchParams"),[v2,b2,w2,x2]=["ReadableStream","Request","Response","Headers"].map(qn),S2=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),Na(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function JS(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const YS=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),XS=e=>!dc(e)&&e!==YS;function am(){const{caseless:e}=XS(this)&&this||{},t={},r=(n,o)=>{const i=e&&JS(t,o)||o;ud(t[i])&&ud(n)?t[i]=am(t[i],n):ud(n)?t[i]=am({},n):Na(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&fc(arguments[n],r);return t}const _2=(e,t,r,{allOwnKeys:n}={})=>(fc(t,(o,i)=>{r&&An(o)?e[i]=WS(o,r):e[i]=o},{allOwnKeys:n}),e),E2=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),k2=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},T2=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&im(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$2=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},O2=e=>{if(!e)return null;if(Na(e))return e;let t=e.length;if(!GS(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},C2=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&im(Uint8Array)),A2=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},I2=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},R2=qn("HTMLFormElement"),P2=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),QS=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),N2=qn("RegExp"),e1=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};fc(r,(o,i)=>{let a;(a=t(o,i,e))!==!1&&(n[i]=a||o)}),Object.defineProperties(e,n)},M2=e=>{e1(e,(t,r)=>{if(An(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(An(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},j2=(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return Na(e)?n(e):n(String(e).split(t)),r},D2=()=>{},L2=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,sm="abcdefghijklmnopqrstuvwxyz",t1="0123456789",r1={DIGIT:t1,ALPHA:sm,ALPHA_DIGIT:sm+sm.toUpperCase()+t1},F2=(e=16,t=r1.ALPHA_DIGIT)=>{let r="";const{length:n}=t;for(;e--;)r+=t[Math.random()*n|0];return r};function q2(e){return!!(e&&An(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const B2=e=>{const t=new Array(10),r=(n,o)=>{if(ld(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=Na(n)?[]:{};return fc(n,(a,s)=>{const c=r(a,o+1);!dc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)},U2=qn("AsyncFunction"),oe={isArray:Na,isArrayBuffer:KS,isBuffer:s2,isFormData:y2,isArrayBufferView:c2,isString:l2,isNumber:GS,isBoolean:u2,isObject:ld,isPlainObject:ud,isReadableStream:v2,isRequest:b2,isResponse:w2,isHeaders:x2,isUndefined:dc,isDate:d2,isFile:f2,isBlob:p2,isRegExp:N2,isFunction:An,isStream:m2,isURLSearchParams:g2,isTypedArray:C2,isFileList:h2,forEach:fc,merge:am,extend:_2,trim:S2,stripBOM:E2,inherits:k2,toFlatObject:T2,kindOf:sd,kindOfTest:qn,endsWith:$2,toArray:O2,forEachEntry:A2,matchAll:I2,isHTMLForm:R2,hasOwnProperty:QS,hasOwnProp:QS,reduceDescriptors:e1,freezeMethods:M2,toObjectSet:j2,toCamelCase:P2,noop:D2,toFiniteNumber:L2,findKey:JS,global:YS,isContextDefined:XS,ALPHABET:r1,generateString:F2,isSpecCompliantForm:q2,toJSONObject:B2,isAsyncFn:U2,isThenable:e=>e&&(ld(e)||An(e))&&An(e.then)&&An(e.catch)};function ut(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}oe.inherits(ut,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:oe.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const n1=ut.prototype,o1={};["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=>{o1[e]={value:e}}),Object.defineProperties(ut,o1),Object.defineProperty(n1,"isAxiosError",{value:!0}),ut.from=(e,t,r,n,o,i)=>{const a=Object.create(n1);return oe.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),ut.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const z2=null;function cm(e){return oe.isPlainObject(e)||oe.isArray(e)}function i1(e){return oe.endsWith(e,"[]")?e.slice(0,-2):e}function a1(e,t,r){return e?e.concat(t).map(function(o,i){return o=i1(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function Z2(e){return oe.isArray(e)&&!e.some(cm)}const V2=oe.toFlatObject(oe,{},null,function(t){return/^is[A-Z]/.test(t)});function dd(e,t,r){if(!oe.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=oe.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!oe.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&oe.isSpecCompliantForm(t);if(!oe.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(oe.isDate(h))return h.toISOString();if(!c&&oe.isBlob(h))throw new ut("Blob is not supported. Use a Buffer instead.");return oe.isArrayBuffer(h)||oe.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(oe.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(oe.isArray(h)&&Z2(h)||(oe.isFileList(h)||oe.endsWith(y,"[]"))&&(g=oe.toArray(h)))return y=i1(y),g.forEach(function(b,x){!(oe.isUndefined(b)||b===null)&&t.append(a===!0?a1([y],x,i):a===null?y:y+"[]",l(b))}),!1}return cm(h)?!0:(t.append(a1(m,y,i),l(h)),!1)}const d=[],p=Object.assign(V2,{defaultVisitor:u,convertValue:l,isVisitable:cm});function f(h,y){if(!oe.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),oe.forEach(h,function(g,v){(!(oe.isUndefined(g)||g===null)&&o.call(t,g,oe.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!oe.isObject(e))throw new TypeError("data must be an object");return f(e),t}function s1(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function lm(e,t){this._pairs=[],e&&dd(e,this,t)}const c1=lm.prototype;c1.append=function(t,r){this._pairs.push([t,r])},c1.toString=function(t){const r=t?function(n){return t.call(this,n,s1)}:s1;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function H2(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function l1(e,t,r){if(!t)return e;const n=r&&r.encode||H2,o=r&&r.serialize;let i;if(o?i=o(t,r):i=oe.isURLSearchParams(t)?t.toString():new lm(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}const u1=class{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){oe.forEach(this.handlers,function(n){n!==null&&t(n)})}},d1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},W2={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:lm,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},um=typeof window<"u"&&typeof document<"u",K2=(e=>um&&["ReactNative","NativeScript","NS"].indexOf(e)<0)(typeof navigator<"u"&&navigator.product),G2=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),J2=um&&window.location.href||"http://localhost",Bn={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:um,hasStandardBrowserEnv:K2,hasStandardBrowserWebWorkerEnv:G2,origin:J2},Symbol.toStringTag,{value:"Module"})),...W2};function Y2(e,t){return dd(e,new Bn.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return Bn.isNode&&oe.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function X2(e){return oe.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Q2(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function f1(e){function t(r,n,o,i){let a=r[i++];if(a==="__proto__")return!0;const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&oe.isArray(o)?o.length:a,c?(oe.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!oe.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&oe.isArray(o[a])&&(o[a]=Q2(o[a])),!s)}if(oe.isFormData(e)&&oe.isFunction(e.entries)){const r={};return oe.forEachEntry(e,(n,o)=>{t(X2(n),o,r,0)}),r}return null}function eL(e,t,r){if(oe.isString(e))try{return(t||JSON.parse)(e),oe.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const dm={transitional:d1,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=oe.isObject(t);if(i&&oe.isHTMLForm(t)&&(t=new FormData(t)),oe.isFormData(t))return o?JSON.stringify(f1(t)):t;if(oe.isArrayBuffer(t)||oe.isBuffer(t)||oe.isStream(t)||oe.isFile(t)||oe.isBlob(t)||oe.isReadableStream(t))return t;if(oe.isArrayBufferView(t))return t.buffer;if(oe.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return Y2(t,this.formSerializer).toString();if((s=oe.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return dd(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),eL(t)):t}],transformResponse:[function(t){const r=this.transitional||dm.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(oe.isResponse(t)||oe.isReadableStream(t))return t;if(t&&oe.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)throw s.name==="SyntaxError"?ut.from(s,ut.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:Bn.classes.FormData,Blob:Bn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch"],e=>{dm.headers[e]={}});const fm=dm,tL=oe.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"]),rL=e=>{const t={};let r,n,o;return e&&e.split(`
70
70
  `).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&tL[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},p1=Symbol("internals");function pc(e){return e&&String(e).trim().toLowerCase()}function fd(e){return e===!1||e==null?e:oe.isArray(e)?e.map(fd):String(e)}function nL(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const oL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pm(e,t,r,n,o){if(oe.isFunction(n))return n.call(this,t,r);if(o&&(t=r),!!oe.isString(t)){if(oe.isString(n))return t.indexOf(n)!==-1;if(oe.isRegExp(n))return n.test(t)}}function iL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function aL(e,t){const r=oe.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,a){return this[n].call(this,t,o,i,a)},configurable:!0})})}let pd=class{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(s,c,l){const u=pc(c);if(!u)throw new Error("header name must be a non-empty string");const d=oe.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=fd(s))}const a=(s,c)=>oe.forEach(s,(l,u)=>i(l,u,c));if(oe.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(oe.isString(t)&&(t=t.trim())&&!oL(t))a(rL(t),r);else if(oe.isHeaders(t))for(const[s,c]of t.entries())i(c,s,n);else t!=null&&i(r,t,n);return this}get(t,r){if(t=pc(t),t){const n=oe.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return nL(o);if(oe.isFunction(r))return r.call(this,o,n);if(oe.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=pc(t),t){const n=oe.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||pm(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(a){if(a=pc(a),a){const s=oe.findKey(n,a);s&&(!r||pm(n,n[s],s,r))&&(delete n[s],o=!0)}}return oe.isArray(t)?t.forEach(i):i(t),o}clear(t){const r=Object.keys(this);let n=r.length,o=!1;for(;n--;){const i=r[n];(!t||pm(this,this[i],i,t,!0))&&(delete this[i],o=!0)}return o}normalize(t){const r=this,n={};return oe.forEach(this,(o,i)=>{const a=oe.findKey(n,i);if(a){r[a]=fd(o),delete r[i];return}const s=t?iL(i):String(i).trim();s!==i&&delete r[i],r[s]=fd(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return oe.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&oe.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
71
71
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[p1]=this[p1]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=pc(a);n[s]||(aL(o,a),n[s]=!0)}return oe.isArray(t)?t.forEach(i):i(t),this}};pd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(pd.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),oe.freezeMethods(pd);const Un=pd;function hm(e,t){const r=this||fm,n=t||r,o=Un.from(n.headers);let i=n.data;return oe.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function h1(e){return!!(e&&e.__CANCEL__)}function Ma(e,t,r){ut.call(this,e??"canceled",ut.ERR_CANCELED,t,r),this.name="CanceledError"}oe.inherits(Ma,ut,{__CANCEL__:!0});function m1(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new ut("Request failed with status code "+r.status,[ut.ERR_BAD_REQUEST,ut.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function sL(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function cL(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[i];a||(a=l),r[o]=c,n[o]=l;let d=i,p=0;for(;d!==o;)p+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const f=u&&l-u;return f?Math.round(p*1e3/f):void 0}}function lL(e,t){let r=0;const n=1e3/t;let o=null;return function(){const a=this===!0,s=Date.now();if(a||s-r>n)return o&&(clearTimeout(o),o=null),r=s,e.apply(null,arguments);o||(o=setTimeout(()=>(o=null,r=Date.now(),e.apply(null,arguments)),n-(s-r)))}}const hd=(e,t,r=3)=>{let n=0;const o=cL(50,250);return lL(i=>{const a=i.loaded,s=i.lengthComputable?i.total:void 0,c=a-n,l=o(c),u=a<=s;n=a;const d={loaded:a,total:s,progress:s?a/s:void 0,bytes:c,rate:l||void 0,estimated:l&&s&&u?(s-a)/l:void 0,event:i,lengthComputable:s!=null};d[t?"download":"upload"]=!0,e(d)},r)},uL=Bn.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(a){const s=oe.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}(),dL=Bn.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];oe.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),oe.isString(n)&&a.push("path="+n),oe.isString(o)&&a.push("domain="+o),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function fL(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function pL(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function y1(e,t){return e&&!fL(t)?pL(e,t):t}const g1=e=>e instanceof Un?{...e}:e;function Ui(e,t){t=t||{};const r={};function n(l,u,d){return oe.isPlainObject(l)&&oe.isPlainObject(u)?oe.merge.call({caseless:d},l,u):oe.isPlainObject(u)?oe.merge({},u):oe.isArray(u)?u.slice():u}function o(l,u,d){if(oe.isUndefined(u)){if(!oe.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!oe.isUndefined(u))return n(void 0,u)}function a(l,u){if(oe.isUndefined(u)){if(!oe.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(g1(l),g1(u),!0)};return oe.forEach(Object.keys(Object.assign({},e,t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);oe.isUndefined(p)&&d!==s||(r[u]=p)}),r}const v1=e=>{const t=Ui({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Un.from(a),t.url=l1(y1(t.baseURL,t.url),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):"")));let c;if(oe.isFormData(r)){if(Bn.hasStandardBrowserEnv||Bn.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((c=a.getContentType())!==!1){const[l,...u]=c?c.split(";").map(d=>d.trim()).filter(Boolean):[];a.setContentType([l||"multipart/form-data",...u].join("; "))}}if(Bn.hasStandardBrowserEnv&&(n&&oe.isFunction(n)&&(n=n(t)),n||n!==!1&&uL(t.url))){const l=o&&i&&dL.read(i);l&&a.set(o,l)}return t},hL=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=v1(e);let i=o.data;const a=Un.from(o.headers).normalize();let{responseType:s}=o,c;function l(){o.cancelToken&&o.cancelToken.unsubscribe(c),o.signal&&o.signal.removeEventListener("abort",c)}let u=new XMLHttpRequest;u.open(o.method.toUpperCase(),o.url,!0),u.timeout=o.timeout;function d(){if(!u)return;const f=Un.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),y={data:!s||s==="text"||s==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:f,config:e,request:u};m1(function(g){r(g),l()},function(g){n(g),l()},y),u=null}"onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(n(new ut("Request aborted",ut.ECONNABORTED,o,u)),u=null)},u.onerror=function(){n(new ut("Network Error",ut.ERR_NETWORK,o,u)),u=null},u.ontimeout=function(){let h=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const y=o.transitional||d1;o.timeoutErrorMessage&&(h=o.timeoutErrorMessage),n(new ut(h,y.clarifyTimeoutError?ut.ETIMEDOUT:ut.ECONNABORTED,o,u)),u=null},i===void 0&&a.setContentType(null),"setRequestHeader"in u&&oe.forEach(a.toJSON(),function(h,y){u.setRequestHeader(y,h)}),oe.isUndefined(o.withCredentials)||(u.withCredentials=!!o.withCredentials),s&&s!=="json"&&(u.responseType=o.responseType),typeof o.onDownloadProgress=="function"&&u.addEventListener("progress",hd(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",hd(o.onUploadProgress)),(o.cancelToken||o.signal)&&(c=f=>{u&&(n(!f||f.type?new Ma(null,e,u):f),u.abort(),u=null)},o.cancelToken&&o.cancelToken.subscribe(c),o.signal&&(o.signal.aborted?c():o.signal.addEventListener("abort",c)));const p=sL(o.url);if(p&&Bn.protocols.indexOf(p)===-1){n(new ut("Unsupported protocol "+p+":",ut.ERR_BAD_REQUEST,e));return}u.send(i||null)})},mL=(e,t)=>{let r=new AbortController,n;const o=function(c){if(!n){n=!0,a();const l=c instanceof Error?c:this.reason;r.abort(l instanceof ut?l:new Ma(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{o(new ut(`timeout ${t} of ms exceeded`,ut.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c&&(c.removeEventListener?c.removeEventListener("abort",o):c.unsubscribe(o))}),e=null)};e.forEach(c=>c&&c.addEventListener&&c.addEventListener("abort",o));const{signal:s}=r;return s.unsubscribe=a,[s,()=>{i&&clearTimeout(i),i=null}]},yL=function*(e,t){let r=e.byteLength;if(!t||r<t){yield e;return}let n=0,o;for(;n<r;)o=n+t,yield e.slice(n,o),n=o},gL=async function*(e,t,r){for await(const n of e)yield*yL(ArrayBuffer.isView(n)?n:await r(String(n)),t)},b1=(e,t,r,n,o)=>{const i=gL(e,t,o);let a=0;return new ReadableStream({type:"bytes",async pull(s){const{done:c,value:l}=await i.next();if(c){s.close(),n();return}let u=l.byteLength;r&&r(a+=u),s.enqueue(new Uint8Array(l))},cancel(s){return n(s),i.return()}},{highWaterMark:2})},w1=(e,t)=>{const r=e!=null;return n=>setTimeout(()=>t({lengthComputable:r,total:e,loaded:n}))},md=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",x1=md&&typeof ReadableStream=="function",mm=md&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),vL=x1&&(()=>{let e=!1;const t=new Request(Bn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),S1=64*1024,ym=x1&&!!(()=>{try{return oe.isReadableStream(new Response("").body)}catch{}})(),yd={stream:ym&&(e=>e.body)};md&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!yd[t]&&(yd[t]=oe.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new ut(`Response type '${t}' is not supported`,ut.ERR_NOT_SUPPORT,n)})})})(new Response);const bL=async e=>{if(e==null)return 0;if(oe.isBlob(e))return e.size;if(oe.isSpecCompliantForm(e))return(await new Request(e).arrayBuffer()).byteLength;if(oe.isArrayBufferView(e))return e.byteLength;if(oe.isURLSearchParams(e)&&(e=e+""),oe.isString(e))return(await mm(e)).byteLength},wL=async(e,t)=>{const r=oe.toFiniteNumber(e.getContentLength());return r??bL(t)},gm={http:z2,xhr:hL,fetch:md&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:a,onDownloadProgress:s,onUploadProgress:c,responseType:l,headers:u,withCredentials:d="same-origin",fetchOptions:p}=v1(e);l=l?(l+"").toLowerCase():"text";let[f,h]=o||i||a?mL([o,i],a):[],y,m;const g=()=>{!y&&setTimeout(()=>{f&&f.unsubscribe()}),y=!0};let v;try{if(c&&vL&&r!=="get"&&r!=="head"&&(v=await wL(u,n))!==0){let S=new Request(t,{method:"POST",body:n,duplex:"half"}),C;oe.isFormData(n)&&(C=S.headers.get("content-type"))&&u.setContentType(C),S.body&&(n=b1(S.body,S1,w1(v,hd(c)),null,mm))}oe.isString(d)||(d=d?"cors":"omit"),m=new Request(t,{...p,signal:f,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",withCredentials:d});let b=await fetch(m);const x=ym&&(l==="stream"||l==="response");if(ym&&(s||x)){const S={};["status","statusText","headers"].forEach(I=>{S[I]=b[I]});const C=oe.toFiniteNumber(b.headers.get("content-length"));b=new Response(b1(b.body,S1,s&&w1(C,hd(s,!0)),x&&g,mm),S)}l=l||"text";let w=await yd[oe.findKey(yd,l)||"text"](b,e);return!x&&g(),h&&h(),await new Promise((S,C)=>{m1(S,C,{data:w,headers:Un.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:m})})}catch(b){throw g(),b&&b.name==="TypeError"&&/fetch/i.test(b.message)?Object.assign(new ut("Network Error",ut.ERR_NETWORK,e,m),{cause:b.cause||b}):ut.from(b,b&&b.code,e,m)}})};oe.forEach(gm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const _1=e=>`- ${e}`,xL=e=>oe.isFunction(e)||e===null||e===!1,E1={getAdapter:e=>{e=oe.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){r=e[i];let a;if(n=r,!xL(r)&&(n=gm[(a=String(r)).toLowerCase()],n===void 0))throw new ut(`Unknown adapter '${a}'`);if(n)break;o[a||"#"+i]=n}if(!n){const i=Object.entries(o).map(([s,c])=>`adapter ${s} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
72
72
  `+i.map(_1).join(`
73
73
  `):" "+_1(i[0]):"as no adapter specified";throw new ut("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:gm};function vm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ma(null,e)}function k1(e){return vm(e),e.headers=Un.from(e.headers),e.data=hm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),E1.getAdapter(e.adapter||fm.adapter)(e).then(function(n){return vm(e),n.data=hm.call(e,e.transformResponse,n),n.headers=Un.from(n.headers),n},function(n){return h1(n)||(vm(e),n&&n.response&&(n.response.data=hm.call(e,e.transformResponse,n.response),n.response.headers=Un.from(n.response.headers))),Promise.reject(n)})}const T1="1.7.2",bm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{bm[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const $1={};bm.transitional=function(t,r,n){function o(i,a){return"[Axios v"+T1+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new ut(o(a," has been removed"+(r?" in "+r:"")),ut.ERR_DEPRECATED);return r&&!$1[a]&&($1[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):!0}};function SL(e,t,r){if(typeof e!="object")throw new ut("options must be an object",ut.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new ut("option "+i+" must be "+c,ut.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new ut("Unknown option "+i,ut.ERR_BAD_OPTION)}}const wm={assertOptions:SL,validators:bm},oi=wm.validators;let gd=class{constructor(t){this.defaults=t,this.interceptors={request:new u1,response:new u1}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let o;Error.captureStackTrace?Error.captureStackTrace(o={}):o=new Error;const i=o.stack?o.stack.replace(/^.+\n/,""):"";try{n.stack?i&&!String(n.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(n.stack+=`
74
- `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ui(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&wm.assertOptions(n,{silentJSONParsing:oi.transitional(oi.boolean),forcedJSONParsing:oi.transitional(oi.boolean),clarifyTimeoutError:oi.transitional(oi.boolean)},!1),o!=null&&(oe.isFunction(o)?r.paramsSerializer={serialize:o}:wm.assertOptions(o,{encode:oi.function,serialize:oi.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&oe.merge(i.common,i[r.method]);i&&oe.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Un.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,p;if(!c){const h=[k1.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(r);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=r;for(d=0;d<p;){const h=s[d++],y=s[d++];try{f=h(f)}catch(m){y.call(this,m);break}}try{u=k1.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=Ui(this.defaults,t);const r=y1(t.baseURL,t.url);return l1(r,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){gd.prototype[t]=function(r,n){return this.request(Ui(n||{},{method:t,url:r,data:(n||{}).data}))}}),oe.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(Ui(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}gd.prototype[t]=r(),gd.prototype[t+"Form"]=r(!0)});const vd=gd,_L=class Qj{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new Ma(i,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Qj(function(o){t=o}),cancel:t}}};function EL(e){return function(r){return e.apply(null,r)}}function kL(e){return oe.isObject(e)&&e.isAxiosError===!0}const xm={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(xm).forEach(([e,t])=>{xm[t]=e});const TL=xm;function O1(e){const t=new vd(e),r=WS(vd.prototype.request,t);return oe.extend(r,vd.prototype,t,{allOwnKeys:!0}),oe.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return O1(Ui(e,o))},r}const dr=O1(fm);dr.Axios=vd,dr.CanceledError=Ma,dr.CancelToken=_L,dr.isCancel=h1,dr.VERSION=T1,dr.toFormData=dd,dr.AxiosError=ut,dr.Cancel=dr.CanceledError,dr.all=function(t){return Promise.all(t)},dr.spread=EL,dr.isAxiosError=kL,dr.mergeConfig=Ui,dr.AxiosHeaders=Un,dr.formToJSON=e=>f1(oe.isHTMLForm(e)?new FormData(e):e),dr.getAdapter=E1.getAdapter,dr.HttpStatusCode=TL,dr.default=dr;const ja=dr,{Axios:$L,AxiosError:OL,CanceledError:CL,isCancel:AL,CancelToken:IL,VERSION:RL,all:PL,Cancel:NL,isAxiosError:ML,spread:jL,toFormData:DL,AxiosHeaders:LL,HttpStatusCode:FL,formToJSON:qL,getAdapter:BL,mergeConfig:UL}=ja,zL=Object.freeze(Object.defineProperty({__proto__:null,Axios:$L,AxiosError:OL,AxiosHeaders:LL,Cancel:NL,CancelToken:IL,CanceledError:CL,HttpStatusCode:FL,VERSION:RL,all:PL,default:ja,formToJSON:qL,getAdapter:BL,isAxiosError:ML,isCancel:AL,mergeConfig:UL,spread:jL,toFormData:DL},Symbol.toStringTag,{value:"Module"}));var Da={};Object.defineProperty(Da,"__esModule",{value:!0});var ZL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VL=typeof window<"u"&&typeof window.document<"u",HL=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,WL=(typeof self>"u"?"undefined":ZL(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",KL=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),GL=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",C1=Da.isBrowser=VL;Da.isWebWorker=WL;var Sm=Da.isNode=HL;Da.isJsDom=KL,Da.isDeno=GL;var JL=Object.create,_m=Object.defineProperty,YL=Object.getOwnPropertyDescriptor,XL=Object.getOwnPropertyNames,QL=Object.getPrototypeOf,eF=Object.prototype.hasOwnProperty,fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tF=(e,t)=>{for(var r in t)_m(e,r,{get:t[r],enumerable:!0})},rF=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of XL(t))!eF.call(e,o)&&o!==r&&_m(e,o,{get:()=>t[o],enumerable:!(n=YL(t,o))||n.enumerable});return e},bd=(e,t,r)=>(r=e!=null?JL(QL(e)):{},rF(t||!e||!e.__esModule?_m(r,"default",{value:e,enumerable:!0}):r,e)),nF=fr((e,t)=>{var r=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);t.exports=n=>!r.has(n&&n.code)}),oF=fr(()=>{}),iF=fr(()=>{}),aF=fr((e,t)=>{t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}}),sF=fr((e,t)=>{var r=typeof Symbol<"u"&&Symbol,n=aF();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),cF=fr((e,t)=>{var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),lF=fr((e,t)=>{var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(a){var s=this;if(typeof s!="function"||o.call(s)!==i)throw new TypeError(r+s);for(var c=n.call(arguments,1),l,u=function(){if(this instanceof l){var y=s.apply(this,c.concat(n.call(arguments)));return Object(y)===y?y:this}else return s.apply(a,c.concat(n.call(arguments)))},d=Math.max(0,s.length-c.length),p=[],f=0;f<d;f++)p.push("$"+f);if(l=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(u),s.prototype){var h=function(){};h.prototype=s.prototype,l.prototype=new h,h.prototype=null}return l}}),Em=fr((e,t)=>{var r=lF();t.exports=Function.prototype.bind||r}),uF=fr((e,t)=>{var r=Em();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}),km=fr((e,t)=>{var r,n=SyntaxError,o=Function,i=TypeError,a=function(B){try{return o('"use strict"; return ('+B+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var c=function(){throw new i},l=s?function(){try{return arguments.callee,c}catch{try{return s(arguments,"callee").get}catch{return c}}}():c,u=sF()(),d=cF()(),p=Object.getPrototypeOf||(d?function(B){return B.__proto__}:null),f={},h=typeof Uint8Array>"u"||!p?r:p(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":u&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!u||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&p?p(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":h,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(B){m=p(p(B)),y["%Error.prototype%"]=m}var m,g=function B(F){var j;if(F==="%AsyncFunction%")j=a("async function () {}");else if(F==="%GeneratorFunction%")j=a("function* () {}");else if(F==="%AsyncGeneratorFunction%")j=a("async function* () {}");else if(F==="%AsyncGenerator%"){var U=B("%AsyncGeneratorFunction%");U&&(j=U.prototype)}else if(F==="%AsyncIteratorPrototype%"){var K=B("%AsyncGenerator%");K&&p&&(j=p(K.prototype))}return y[F]=j,j},v={"%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"]},b=Em(),x=uF(),w=b.call(Function.call,Array.prototype.concat),S=b.call(Function.apply,Array.prototype.splice),C=b.call(Function.call,String.prototype.replace),I=b.call(Function.call,String.prototype.slice),P=b.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,W=function(B){var F=I(B,0,1),j=I(B,-1);if(F==="%"&&j!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&F!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var U=[];return C(B,A,function(K,D,E,H){U[U.length]=E?C(H,L,"$1"):D||K}),U},Z=function(B,F){var j=B,U;if(x(v,j)&&(U=v[j],j="%"+U[0]+"%"),x(y,j)){var K=y[j];if(K===f&&(K=g(j)),typeof K>"u"&&!F)throw new i("intrinsic "+B+" exists, but is not available. Please file an issue!");return{alias:U,name:j,value:K}}throw new n("intrinsic "+B+" does not exist!")};t.exports=function(B,F){if(typeof B!="string"||B.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof F!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,B)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=W(B),U=j.length>0?j[0]:"",K=Z("%"+U+"%",F),D=K.name,E=K.value,H=!1,Q=K.alias;Q&&(U=Q[0],S(j,w([0,1],Q)));for(var T=1,ce=!0;T<j.length;T+=1){var pe=j[T],fe=I(pe,0,1),ve=I(pe,-1);if((fe==='"'||fe==="'"||fe==="`"||ve==='"'||ve==="'"||ve==="`")&&fe!==ve)throw new n("property names with quotes must have matching quotes");if((pe==="constructor"||!ce)&&(H=!0),U+="."+pe,D="%"+U+"%",x(y,D))E=y[D];else if(E!=null){if(!(pe in E)){if(!F)throw new i("base intrinsic for "+B+" exists, but the property is not available.");return}if(s&&T+1>=j.length){var _e=s(E,pe);ce=!!_e,ce&&"get"in _e&&!("originalValue"in _e.get)?E=_e.get:E=E[pe]}else ce=x(E,pe),E=E[pe];ce&&!H&&(y[D]=E)}}return E}}),dF=fr((e,t)=>{var r=Em(),n=km(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(d){var p=a(r,i,arguments);if(s&&c){var f=s(p,"length");f.configurable&&c(p,"length",{value:1+l(0,d.length-(arguments.length-1))})}return p};var u=function(){return a(r,o,arguments)};c?c(t.exports,"apply",{value:u}):t.exports.apply=u}),fF=fr((e,t)=>{var r=km(),n=dF(),o=n(r("String.prototype.indexOf"));t.exports=function(i,a){var s=r(i,!!a);return typeof s=="function"&&o(i,".prototype.")>-1?n(s):s}}),pF=fr(()=>{}),hF=fr((e,t)=>{var r=typeof Map=="function"&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&typeof n.get=="function"?n.get:null,i=r&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&typeof s.get=="function"?s.get:null,l=a&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,f=p?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,y=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,v=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,w=String.prototype.replace,S=String.prototype.toUpperCase,C=String.prototype.toLowerCase,I=RegExp.prototype.test,P=Array.prototype.concat,A=Array.prototype.join,L=Array.prototype.slice,W=Math.floor,Z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,B=Object.getOwnPropertySymbols,F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,j=typeof Symbol=="function"&&typeof Symbol.iterator=="object",U=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,K=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(z){return z.__proto__}:null);function E(z,X){if(z===1/0||z===-1/0||z!==z||z&&z>-1e3&&z<1e3||I.call(/e/,X))return X;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof z=="number"){var Ge=z<0?-W(-z):W(z);if(Ge!==z){var gt=String(Ge),Je=x.call(X,gt.length+1);return w.call(gt,ze,"$&_")+"."+w.call(w.call(Je,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(X,ze,"$&_")}var H=pF(),Q=H.custom,T=we(Q)?Q:null;t.exports=function z(X,ze,Ge,gt){var Je=ze||{};if(q(Je,"quoteStyle")&&Je.quoteStyle!=="single"&&Je.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(Je,"maxStringLength")&&(typeof Je.maxStringLength=="number"?Je.maxStringLength<0&&Je.maxStringLength!==1/0:Je.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ir=q(Je,"customInspect")?Je.customInspect:!0;if(typeof ir!="boolean"&&ir!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(Je,"indent")&&Je.indent!==null&&Je.indent!==" "&&!(parseInt(Je.indent,10)===Je.indent&&Je.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(Je,"numericSeparator")&&typeof Je.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var kr=Je.numericSeparator;if(typeof X>"u")return"undefined";if(X===null)return"null";if(typeof X=="boolean")return X?"true":"false";if(typeof X=="string")return se(X,Je);if(typeof X=="number"){if(X===0)return 1/0/X>0?"0":"-0";var Kt=String(X);return kr?E(X,Kt):Kt}if(typeof X=="bigint"){var ar=String(X)+"n";return kr?E(X,ar):ar}var sn=typeof Je.depth>"u"?5:Je.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=sn&&sn>0&&typeof X=="object")return fe(X)?"[Array]":"[Object]";var vt=ct(Je,Ge);if(typeof gt>"u")gt=[];else if(me(gt,X)>=0)return"[Circular]";function bt(at,cr,Xt){if(cr&&(gt=L.call(gt),gt.push(cr)),Xt){var Qt={depth:Je.depth};return q(Je,"quoteStyle")&&(Qt.quoteStyle=Je.quoteStyle),z(at,Qt,Ge+1,gt)}return z(at,Je,Ge+1,gt)}if(typeof X=="function"&&!_e(X)){var Yt=he(X),Gt=Wt(X,bt);return"[Function"+(Yt?": "+Yt:" (anonymous)")+"]"+(Gt.length>0?" { "+A.call(Gt,", ")+" }":"")}if(we(X)){var sr=j?w.call(String(X),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(X);return typeof X=="object"&&!j?ye(sr):sr}if(G(X)){for(var Ut="<"+C.call(String(X.nodeName)),Ir=X.attributes||[],Rr=0;Rr<Ir.length;Rr++)Ut+=" "+Ir[Rr].name+"="+ce(pe(Ir[Rr].value),"double",Je);return Ut+=">",X.childNodes&&X.childNodes.length&&(Ut+="..."),Ut+="</"+C.call(String(X.nodeName))+">",Ut}if(fe(X)){if(X.length===0)return"[]";var tn=Wt(X,bt);return vt&&!Ve(tn)?"["+$t(tn,vt)+"]":"[ "+A.call(tn,", ")+" ]"}if(Ce(X)){var wa=Wt(X,bt);return!("cause"in Error.prototype)&&"cause"in X&&!K.call(X,"cause")?"{ ["+String(X)+"] "+A.call(P.call("[cause]: "+bt(X.cause),wa),", ")+" }":wa.length===0?"["+String(X)+"]":"{ ["+String(X)+"] "+A.call(wa,", ")+" }"}if(typeof X=="object"&&ir){if(T&&typeof X[T]=="function"&&H)return H(X,{depth:sn-Ge});if(ir!=="symbol"&&typeof X.inspect=="function")return X.inspect()}if(je(X)){var xa=[];return i&&i.call(X,function(at,cr){xa.push(bt(cr,X,!0)+" => "+bt(at,X))}),tt("Map",o.call(X),xa,vt)}if(pt(X)){var M=[];return l&&l.call(X,function(at){M.push(bt(at,X))}),tt("Set",c.call(X),M,vt)}if(Ie(X))return $e("WeakMap");if(Ke(X))return $e("WeakSet");if(Ue(X))return $e("WeakRef");if(de(X))return ye(bt(Number(X)));if(Ae(X))return ye(bt(Z.call(X)));if(te(X))return ye(m.call(X));if(be(X))return ye(bt(String(X)));if(!ve(X)&&!_e(X)){var ge=Wt(X,bt),ke=D?D(X)===Object.prototype:X instanceof Object||X.constructor===Object,Ze=X instanceof Object?"":"null prototype",kt=!ke&&U&&Object(X)===X&&U in X?x.call(le(X),8,-1):Ze?"Object":"",Ot=ke||typeof X.constructor!="function"?"":X.constructor.name?X.constructor.name+" ":"",ht=Ot+(kt||Ze?"["+A.call(P.call([],kt||[],Ze||[]),": ")+"] ":"");return ge.length===0?ht+"{}":vt?ht+"{"+$t(ge,vt)+"}":ht+"{ "+A.call(ge,", ")+" }"}return String(X)};function ce(z,X,ze){var Ge=(ze.quoteStyle||X)==="double"?'"':"'";return Ge+z+Ge}function pe(z){return w.call(String(z),/"/g,"&quot;")}function fe(z){return le(z)==="[object Array]"&&(!U||!(typeof z=="object"&&U in z))}function ve(z){return le(z)==="[object Date]"&&(!U||!(typeof z=="object"&&U in z))}function _e(z){return le(z)==="[object RegExp]"&&(!U||!(typeof z=="object"&&U in z))}function Ce(z){return le(z)==="[object Error]"&&(!U||!(typeof z=="object"&&U in z))}function be(z){return le(z)==="[object String]"&&(!U||!(typeof z=="object"&&U in z))}function de(z){return le(z)==="[object Number]"&&(!U||!(typeof z=="object"&&U in z))}function te(z){return le(z)==="[object Boolean]"&&(!U||!(typeof z=="object"&&U in z))}function we(z){if(j)return z&&typeof z=="object"&&z instanceof Symbol;if(typeof z=="symbol")return!0;if(!z||typeof z!="object"||!F)return!1;try{return F.call(z),!0}catch{}return!1}function Ae(z){if(!z||typeof z!="object"||!Z)return!1;try{return Z.call(z),!0}catch{}return!1}var qe=Object.prototype.hasOwnProperty||function(z){return z in this};function q(z,X){return qe.call(z,X)}function le(z){return g.call(z)}function he(z){if(z.name)return z.name;var X=b.call(v.call(z),/^function\s*([\w$]+)/);return X?X[1]:null}function me(z,X){if(z.indexOf)return z.indexOf(X);for(var ze=0,Ge=z.length;ze<Ge;ze++)if(z[ze]===X)return ze;return-1}function je(z){if(!o||!z||typeof z!="object")return!1;try{o.call(z);try{c.call(z)}catch{return!0}return z instanceof Map}catch{}return!1}function Ie(z){if(!d||!z||typeof z!="object")return!1;try{d.call(z,d);try{f.call(z,f)}catch{return!0}return z instanceof WeakMap}catch{}return!1}function Ue(z){if(!y||!z||typeof z!="object")return!1;try{return y.call(z),!0}catch{}return!1}function pt(z){if(!c||!z||typeof z!="object")return!1;try{c.call(z);try{o.call(z)}catch{return!0}return z instanceof Set}catch{}return!1}function Ke(z){if(!f||!z||typeof z!="object")return!1;try{f.call(z,f);try{d.call(z,d)}catch{return!0}return z instanceof WeakSet}catch{}return!1}function G(z){return!z||typeof z!="object"?!1:typeof HTMLElement<"u"&&z instanceof HTMLElement?!0:typeof z.nodeName=="string"&&typeof z.getAttribute=="function"}function se(z,X){if(z.length>X.maxStringLength){var ze=z.length-X.maxStringLength,Ge="... "+ze+" more character"+(ze>1?"s":"");return se(x.call(z,0,X.maxStringLength),X)+Ge}var gt=w.call(w.call(z,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y);return ce(gt,"single",X)}function Y(z){var X=z.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[X];return ze?"\\"+ze:"\\x"+(X<16?"0":"")+S.call(X.toString(16))}function ye(z){return"Object("+z+")"}function $e(z){return z+" { ? }"}function tt(z,X,ze,Ge){var gt=Ge?$t(ze,Ge):A.call(ze,", ");return z+" ("+X+") {"+gt+"}"}function Ve(z){for(var X=0;X<z.length;X++)if(me(z[X],`
75
- `)>=0)return!1;return!0}function ct(z,X){var ze;if(z.indent===" ")ze=" ";else if(typeof z.indent=="number"&&z.indent>0)ze=A.call(Array(z.indent+1)," ");else return null;return{base:ze,prev:A.call(Array(X+1),ze)}}function $t(z,X){if(z.length===0)return"";var ze=`
76
- `+X.prev+X.base;return ze+A.call(z,","+ze)+`
77
- `+X.prev}function Wt(z,X){var ze=fe(z),Ge=[];if(ze){Ge.length=z.length;for(var gt=0;gt<z.length;gt++)Ge[gt]=q(z,gt)?X(z[gt],z):""}var Je=typeof B=="function"?B(z):[],ir;if(j){ir={};for(var kr=0;kr<Je.length;kr++)ir["$"+Je[kr]]=Je[kr]}for(var Kt in z)q(z,Kt)&&(ze&&String(Number(Kt))===Kt&&Kt<z.length||j&&ir["$"+Kt]instanceof Symbol||(I.call(/[^\w$]/,Kt)?Ge.push(X(Kt,z)+": "+X(z[Kt],z)):Ge.push(Kt+": "+X(z[Kt],z))));if(typeof B=="function")for(var ar=0;ar<Je.length;ar++)K.call(z,Je[ar])&&Ge.push("["+X(Je[ar])+"]: "+X(z[Je[ar]],z));return Ge}}),mF=fr((e,t)=>{var r=km(),n=fF(),o=hF(),i=r("%TypeError%"),a=r("%WeakMap%",!0),s=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),l=n("WeakMap.prototype.set",!0),u=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),p=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),h=function(v,b){for(var x=v,w;(w=x.next)!==null;x=w)if(w.key===b)return x.next=w.next,w.next=v.next,v.next=w,w},y=function(v,b){var x=h(v,b);return x&&x.value},m=function(v,b,x){var w=h(v,b);w?w.value=x:v.next={key:b,next:v.next,value:x}},g=function(v,b){return!!h(v,b)};t.exports=function(){var v,b,x,w={assert:function(S){if(!w.has(S))throw new i("Side channel does not contain "+o(S))},get:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(v)return c(v,S)}else if(s){if(b)return d(b,S)}else if(x)return y(x,S)},has:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(v)return u(v,S)}else if(s){if(b)return f(b,S)}else if(x)return g(x,S);return!1},set:function(S,C){a&&S&&(typeof S=="object"||typeof S=="function")?(v||(v=new a),l(v,S,C)):s?(b||(b=new s),p(b,S,C)):(x||(x={key:{},next:null}),m(x,S,C))}};return w}}),Tm=fr((e,t)=>{var r=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:o.RFC3986,formatters:{RFC1738:function(i){return r.call(i,n,"+")},RFC3986:function(i){return String(i)}},RFC1738:o.RFC1738,RFC3986:o.RFC3986}}),A1=fr((e,t)=>{var r=Tm(),n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var g=[],v=0;v<256;++v)g.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return g}(),a=function(g){for(;g.length>1;){var v=g.pop(),b=v.obj[v.prop];if(o(b)){for(var x=[],w=0;w<b.length;++w)typeof b[w]<"u"&&x.push(b[w]);v.obj[v.prop]=x}}},s=function(g,v){for(var b=v&&v.plainObjects?Object.create(null):{},x=0;x<g.length;++x)typeof g[x]<"u"&&(b[x]=g[x]);return b},c=function g(v,b,x){if(!b)return v;if(typeof b!="object"){if(o(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!n.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var w=v;return o(v)&&!o(b)&&(w=s(v,x)),o(v)&&o(b)?(b.forEach(function(S,C){if(n.call(v,C)){var I=v[C];I&&typeof I=="object"&&S&&typeof S=="object"?v[C]=g(I,S,x):v.push(S)}else v[C]=S}),v):Object.keys(b).reduce(function(S,C){var I=b[C];return n.call(S,C)?S[C]=g(S[C],I,x):S[C]=I,S},w)},l=function(g,v){return Object.keys(v).reduce(function(b,x){return b[x]=v[x],b},g)},u=function(g,v,b){var x=g.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},d=function(g,v,b,x,w){if(g.length===0)return g;var S=g;if(typeof g=="symbol"?S=Symbol.prototype.toString.call(g):typeof g!="string"&&(S=String(g)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var C="",I=0;I<S.length;++I){var P=S.charCodeAt(I);if(P===45||P===46||P===95||P===126||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122||w===r.RFC1738&&(P===40||P===41)){C+=S.charAt(I);continue}if(P<128){C=C+i[P];continue}if(P<2048){C=C+(i[192|P>>6]+i[128|P&63]);continue}if(P<55296||P>=57344){C=C+(i[224|P>>12]+i[128|P>>6&63]+i[128|P&63]);continue}I+=1,P=65536+((P&1023)<<10|S.charCodeAt(I)&1023),C+=i[240|P>>18]+i[128|P>>12&63]+i[128|P>>6&63]+i[128|P&63]}return C},p=function(g){for(var v=[{obj:{o:g},prop:"o"}],b=[],x=0;x<v.length;++x)for(var w=v[x],S=w.obj[w.prop],C=Object.keys(S),I=0;I<C.length;++I){var P=C[I],A=S[P];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:S,prop:P}),b.push(A))}return a(v),g},f=function(g){return Object.prototype.toString.call(g)==="[object RegExp]"},h=function(g){return!g||typeof g!="object"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))},y=function(g,v){return[].concat(g,v)},m=function(g,v){if(o(g)){for(var b=[],x=0;x<g.length;x+=1)b.push(v(g[x]));return b}return v(g)};t.exports={arrayToObject:s,assign:l,combine:y,compact:p,decode:u,encode:d,isBuffer:h,isRegExp:f,maybeMap:m,merge:c}}),yF=fr((e,t)=>{var r=mF(),n=A1(),o=Tm(),i=Object.prototype.hasOwnProperty,a={brackets:function(v){return v+"[]"},comma:"comma",indices:function(v,b){return v+"["+b+"]"},repeat:function(v){return v}},s=Array.isArray,c=String.prototype.split,l=Array.prototype.push,u=function(v,b){l.apply(v,s(b)?b:[b])},d=Date.prototype.toISOString,p=o.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(v){return d.call(v)},skipNulls:!1,strictNullHandling:!1},h=function(v){return typeof v=="string"||typeof v=="number"||typeof v=="boolean"||typeof v=="symbol"||typeof v=="bigint"},y={},m=function v(b,x,w,S,C,I,P,A,L,W,Z,B,F,j,U,K){for(var D=b,E=K,H=0,Q=!1;(E=E.get(y))!==void 0&&!Q;){var T=E.get(b);if(H+=1,typeof T<"u"){if(T===H)throw new RangeError("Cyclic object value");Q=!0}typeof E.get(y)>"u"&&(H=0)}if(typeof A=="function"?D=A(x,D):D instanceof Date?D=Z(D):w==="comma"&&s(D)&&(D=n.maybeMap(D,function(le){return le instanceof Date?Z(le):le})),D===null){if(C)return P&&!j?P(x,f.encoder,U,"key",B):x;D=""}if(h(D)||n.isBuffer(D)){if(P){var ce=j?x:P(x,f.encoder,U,"key",B);if(w==="comma"&&j){for(var pe=c.call(String(D),","),fe="",ve=0;ve<pe.length;++ve)fe+=(ve===0?"":",")+F(P(pe[ve],f.encoder,U,"value",B));return[F(ce)+(S&&s(D)&&pe.length===1?"[]":"")+"="+fe]}return[F(ce)+"="+F(P(D,f.encoder,U,"value",B))]}return[F(x)+"="+F(String(D))]}var _e=[];if(typeof D>"u")return _e;var Ce;if(w==="comma"&&s(D))Ce=[{value:D.length>0?D.join(",")||null:void 0}];else if(s(A))Ce=A;else{var be=Object.keys(D);Ce=L?be.sort(L):be}for(var de=S&&s(D)&&D.length===1?x+"[]":x,te=0;te<Ce.length;++te){var we=Ce[te],Ae=typeof we=="object"&&typeof we.value<"u"?we.value:D[we];if(!(I&&Ae===null)){var qe=s(D)?typeof w=="function"?w(de,we):de:de+(W?"."+we:"["+we+"]");K.set(b,H);var q=r();q.set(y,K),u(_e,v(Ae,qe,w,S,C,I,P,A,L,W,Z,B,F,j,U,q))}}return _e},g=function(v){if(!v)return f;if(v.encoder!==null&&typeof v.encoder<"u"&&typeof v.encoder!="function")throw new TypeError("Encoder has to be a function.");var b=v.charset||f.charset;if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=o.default;if(typeof v.format<"u"){if(!i.call(o.formatters,v.format))throw new TypeError("Unknown format option provided.");x=v.format}var w=o.formatters[x],S=f.filter;return(typeof v.filter=="function"||s(v.filter))&&(S=v.filter),{addQueryPrefix:typeof v.addQueryPrefix=="boolean"?v.addQueryPrefix:f.addQueryPrefix,allowDots:typeof v.allowDots>"u"?f.allowDots:!!v.allowDots,charset:b,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:f.charsetSentinel,delimiter:typeof v.delimiter>"u"?f.delimiter:v.delimiter,encode:typeof v.encode=="boolean"?v.encode:f.encode,encoder:typeof v.encoder=="function"?v.encoder:f.encoder,encodeValuesOnly:typeof v.encodeValuesOnly=="boolean"?v.encodeValuesOnly:f.encodeValuesOnly,filter:S,format:x,formatter:w,serializeDate:typeof v.serializeDate=="function"?v.serializeDate:f.serializeDate,skipNulls:typeof v.skipNulls=="boolean"?v.skipNulls:f.skipNulls,sort:typeof v.sort=="function"?v.sort:null,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:f.strictNullHandling}};t.exports=function(v,b){var x=v,w=g(b),S,C;typeof w.filter=="function"?(C=w.filter,x=C("",x)):s(w.filter)&&(C=w.filter,S=C);var I=[];if(typeof x!="object"||x===null)return"";var P;b&&b.arrayFormat in a?P=b.arrayFormat:b&&"indices"in b?P=b.indices?"indices":"repeat":P="indices";var A=a[P];if(b&&"commaRoundTrip"in b&&typeof b.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var L=A==="comma"&&b&&b.commaRoundTrip;S||(S=Object.keys(x)),w.sort&&S.sort(w.sort);for(var W=r(),Z=0;Z<S.length;++Z){var B=S[Z];w.skipNulls&&x[B]===null||u(I,m(x[B],B,A,L,w.strictNullHandling,w.skipNulls,w.encode?w.encoder:null,w.filter,w.sort,w.allowDots,w.serializeDate,w.format,w.formatter,w.encodeValuesOnly,w.charset,W))}var F=I.join(w.delimiter),j=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?j+="utf8=%26%2310003%3B&":j+="utf8=%E2%9C%93&"),F.length>0?j+F:""}}),gF=fr((e,t)=>{var r=A1(),n=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(h){return h.replace(/&#(\d+);/g,function(y,m){return String.fromCharCode(parseInt(m,10))})},s=function(h,y){return h&&typeof h=="string"&&y.comma&&h.indexOf(",")>-1?h.split(","):h},c="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(h,y){var m={},g=y.ignoreQueryPrefix?h.replace(/^\?/,""):h,v=y.parameterLimit===1/0?void 0:y.parameterLimit,b=g.split(y.delimiter,v),x=-1,w,S=y.charset;if(y.charsetSentinel)for(w=0;w<b.length;++w)b[w].indexOf("utf8=")===0&&(b[w]===l?S="utf-8":b[w]===c&&(S="iso-8859-1"),x=w,w=b.length);for(w=0;w<b.length;++w)if(w!==x){var C=b[w],I=C.indexOf("]="),P=I===-1?C.indexOf("="):I+1,A,L;P===-1?(A=y.decoder(C,i.decoder,S,"key"),L=y.strictNullHandling?null:""):(A=y.decoder(C.slice(0,P),i.decoder,S,"key"),L=r.maybeMap(s(C.slice(P+1),y),function(W){return y.decoder(W,i.decoder,S,"value")})),L&&y.interpretNumericEntities&&S==="iso-8859-1"&&(L=a(L)),C.indexOf("[]=")>-1&&(L=o(L)?[L]:L),n.call(m,A)?m[A]=r.combine(m[A],L):m[A]=L}return m},d=function(h,y,m,g){for(var v=g?y:s(y,m),b=h.length-1;b>=0;--b){var x,w=h[b];if(w==="[]"&&m.parseArrays)x=[].concat(v);else{x=m.plainObjects?Object.create(null):{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=parseInt(S,10);!m.parseArrays&&S===""?x={0:v}:!isNaN(C)&&w!==S&&String(C)===S&&C>=0&&m.parseArrays&&C<=m.arrayLimit?(x=[],x[C]=v):S!=="__proto__"&&(x[S]=v)}v=x}return v},p=function(h,y,m,g){if(h){var v=m.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,w=m.depth>0&&b.exec(v),S=w?v.slice(0,w.index):v,C=[];if(S){if(!m.plainObjects&&n.call(Object.prototype,S)&&!m.allowPrototypes)return;C.push(S)}for(var I=0;m.depth>0&&(w=x.exec(v))!==null&&I<m.depth;){if(I+=1,!m.plainObjects&&n.call(Object.prototype,w[1].slice(1,-1))&&!m.allowPrototypes)return;C.push(w[1])}return w&&C.push("["+v.slice(w.index)+"]"),d(C,y,m,g)}},f=function(h){if(!h)return i;if(h.decoder!==null&&h.decoder!==void 0&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=typeof h.charset>"u"?i.charset:h.charset;return{allowDots:typeof h.allowDots>"u"?i.allowDots:!!h.allowDots,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:i.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:i.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:i.arrayLimit,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:i.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:i.comma,decoder:typeof h.decoder=="function"?h.decoder:i.decoder,delimiter:typeof h.delimiter=="string"||r.isRegExp(h.delimiter)?h.delimiter:i.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:i.depth,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:i.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:i.plainObjects,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:i.strictNullHandling}};t.exports=function(h,y){var m=f(y);if(h===""||h===null||typeof h>"u")return m.plainObjects?Object.create(null):{};for(var g=typeof h=="string"?u(h,m):h,v=m.plainObjects?Object.create(null):{},b=Object.keys(g),x=0;x<b.length;++x){var w=b[x],S=p(w,g[w],m,typeof h=="string");v=r.merge(v,S,m)}return m.allowSparse===!0?v:r.compact(v)}}),vF=fr((e,t)=>{var r=yF(),n=gF(),o=Tm();t.exports={formats:o,parse:n,stringify:r}}),I1={};tF(I1,{DEFAULT_OPTIONS:()=>j1,default:()=>L1,exponentialDelay:()=>N1,isIdempotentRequestError:()=>Om,isNetworkError:()=>$m,isNetworkOrIdempotentRequestError:()=>Cm,isRetryableError:()=>xd,isSafeRequestError:()=>P1,linearDelay:()=>M1,namespace:()=>wd,retryAfter:()=>Sd});var bF=bd(nF(),1),wd="axios-retry";function $m(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,bF.default)(e)}var R1=["get","head","options"],wF=R1.concat(["put","delete"]);function xd(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function P1(e){var t;return(t=e.config)!=null&&t.method?xd(e)&&R1.indexOf(e.config.method)!==-1:!1}function Om(e){var t;return(t=e.config)!=null&&t.method?xd(e)&&wF.indexOf(e.config.method)!==-1:!1}function Cm(e){return $m(e)||Om(e)}function Sd(e=void 0){var n;let t=(n=e==null?void 0:e.response)==null?void 0:n.headers["retry-after"];if(!t)return 0;let r=(Number(t)||0)*1e3;return r===0&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}function xF(e=0,t=void 0){return Math.max(0,Sd(t))}function N1(e=0,t=void 0,r=100){let n=2**e*r,o=Math.max(n,Sd(t)),i=o*.2*Math.random();return o+i}function M1(e=100){return(t=0,r=void 0)=>{let n=t*e;return Math.max(n,Sd(r))}}var j1={retries:3,retryCondition:Cm,retryDelay:xF,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function SF(e,t){return{...j1,...t,...e[wd]}}function D1(e,t,r=!1){let n=SF(e,t||{});return n.retryCount=n.retryCount||0,(!n.lastRequestTime||r)&&(n.lastRequestTime=Date.now()),e[wd]=n,n}function _F(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function EF(e,t){let{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function kF(e,t,r,n){var c;t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,r);if(_F(e,n),!i&&n.timeout&&t.lastRequestTime){let l=Date.now()-t.lastRequestTime,u=n.timeout-l-s;if(u<=0)return Promise.reject(r);n.timeout=u}return n.transformRequest=[l=>l],await a(t.retryCount,r,n),(c=n.signal)!=null&&c.aborted?Promise.resolve(e(n)):new Promise(l=>{var p;let u=()=>{clearTimeout(d),l(e(n))},d=setTimeout(()=>{var f;l(e(n)),(f=n.signal)!=null&&f.removeEventListener&&n.signal.removeEventListener("abort",u)},s);(p=n.signal)!=null&&p.addEventListener&&n.signal.addEventListener("abort",u,{once:!0})})}async function TF(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var ii=(e,t)=>{let r=e.interceptors.request.use(o=>{var i;return D1(o,t,!0),(i=o[wd])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),n=e.interceptors.response.use(null,async o=>{var s;let{config:i}=o;if(!i)return Promise.reject(o);let a=D1(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await EF(a,o)?kF(e,a,o,i):(await TF(a,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:n}};ii.isNetworkError=$m,ii.isSafeRequestError=P1,ii.isIdempotentRequestError=Om,ii.isNetworkOrIdempotentRequestError=Cm,ii.exponentialDelay=N1,ii.linearDelay=M1,ii.isRetryableError=xd;var L1=ii,$F={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Am=typeof window<"u"&&typeof window.document<"u"?window.crypto:nm;Am.getRandomValues||(Am=$F);var Vt=class extends Error{constructor(t,r,n,o,i,a){super(o);k(this,"isApiError",!0);this.code=t,this.description=r,this.type=n,this.message=o,this.error=i,this.id=a,this.id||(this.id=Vt.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(){let t=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(Am.getRandomValues(new Uint8Array(n))).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},OF=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,F1=e=>e instanceof Vt||OF(e)&&e.isApiError===!0,La=class extends Vt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},q1=class extends Vt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},B1=class extends Vt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},U1=class extends Vt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},z1=class extends Vt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},Z1=class extends Vt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},V1=class extends Vt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},H1=class extends Vt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},W1=class extends Vt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},K1=class extends Vt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},G1=class extends Vt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},J1=class extends Vt{constructor(e,t,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,r)}},Y1=class extends Vt{constructor(e,t,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,r)}},X1=class extends Vt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},Q1=class extends Vt{constructor(e,t,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,r)}},e_=class extends Vt{constructor(e,t,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,r)}},t_=class extends Vt{constructor(e,t,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,r)}},r_=class extends Vt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},n_=class extends Vt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},o_=class extends Vt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},i_=class extends Vt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},a_=class extends Vt{constructor(e,t,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,r)}},s_=class extends Vt{constructor(e,t,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,r)}},c_=class extends Vt{constructor(e,t,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,r)}},CF={Unknown:La,Internal:q1,Unauthorized:B1,Forbidden:U1,PayloadTooLarge:z1,InvalidPayload:Z1,UnsupportedMediaType:V1,MethodNotFound:H1,ResourceNotFound:W1,InvalidJsonSchema:K1,InvalidDataFormat:G1,InvalidIdentifier:J1,RelationConflict:Y1,ReferenceConstraint:X1,ResourceLockedConflict:Q1,ReferenceNotFound:e_,InvalidQuery:t_,Runtime:r_,AlreadyExists:n_,RateLimited:o_,PaymentRequired:i_,QuotaExceeded:a_,LimitExceeded:s_,BreakingChanges:c_},Im=e=>F1(e)?e:e instanceof Error?new La(e.message,e):typeof e=="string"?new La(e):AF(e);function AF(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"){let t=CF[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new La(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new La("An invalid error occurred: "+JSON.stringify(e))}var Fa=class extends Error{constructor(t,r,n){super(t),this.innerError=r,this.file=n,this.name="FileUploadError"}},IF=bd(oF()),RF=bd(iF()),PF="https://api.botpress.cloud",NF=6e4,MF="BP_API_URL",jF="BP_BOT_ID",DF="BP_INTEGRATION_ID",LF="BP_WORKSPACE_ID",FF="BP_TOKEN";function qF(e){let t=BF(e),r={};t.workspaceId&&(r["x-workspace-id"]=t.workspaceId),t.botId&&(r["x-bot-id"]=t.botId),t.integrationId&&(r["x-integration-id"]=t.integrationId),t.token&&(r.Authorization=`Bearer ${t.token}`),r={...r,...t.headers};let n=t.apiUrl??PF,o=t.timeout??NF;return{apiUrl:n,timeout:o,withCredentials:C1,headers:r}}function BF(e){return C1?e:Sm?UF(e):e}function UF(e){let t={...e,apiUrl:e.apiUrl??process.env[MF],botId:e.botId??process.env[jF],integrationId:e.integrationId??process.env[DF],workspaceId:e.workspaceId??process.env[LF]},r=t.token??process.env[FF];return r&&(t.token=r),t}var zF=bd(vF()),ZF=e=>e[1]!==void 0,re=e=>{let{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(ZF),s=Object.fromEntries(a),c=zF.default.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},VF=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),HF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),WF=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),KF=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),GF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),JF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),YF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),XF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),QF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),eq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),tq=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}}),rq=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),nq=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}}),oq=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),iq=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),aq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),sq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),cq=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),lq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),uq=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),dq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),fq=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),pq=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),hq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),mq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}}),gq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),vq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),bq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}}),wq=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),xq=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Sq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_q=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}}),Eq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}}),kq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Tq=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}}),$q=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),Oq=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),Cq=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),Aq=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),Iq=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),Rq=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),Pq=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Nq=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),Mq=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),jq=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),Dq=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Lq=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),Fq=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}}),qq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}}),Bq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),Uq=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),zq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Vq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),Hq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),Wq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),Kq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Gq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Jq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Yq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Xq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}}),Qq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}}),e3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}}),t3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}}),r3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),n3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),o3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),i3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),a3=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),s3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),c3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),l3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),u3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),d3=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),f3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),p3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),h3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}}),m3=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),y3=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),g3=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),v3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),b3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),w3=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),x3=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),S3=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_3=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),E3=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),k3=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),T3=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),$3=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),O3=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}}),C3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}}),A3=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),I3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),R3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),P3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),N3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),M3=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}}),j3=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),D3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),L3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),F3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),q3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),B3=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),U3=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),z3=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),Z3=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),V3=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),H3=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),W3=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),K3=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt}}),G3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),J3=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),Y3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),X3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}}),Q3=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}}),eB=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}}),tB=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),rB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),nB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),oB=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),iB=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),aB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),sB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),cB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),lB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),uB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}}),dB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),fB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}}),pB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),hB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}}),mB=class{constructor(e,t={}){k(this,"createConversation",async e=>{let{path:t,headers:r,query:n,body:o}=VF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getConversation",async e=>{let{path:t,headers:r,query:n,body:o}=HF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listConversations",async e=>{let{path:t,headers:r,query:n,body:o}=WF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateConversation",async e=>{let{path:t,headers:r,query:n,body:o}=KF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateConversation",async e=>{let{path:t,headers:r,query:n,body:o}=GF(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteConversation",async e=>{let{path:t,headers:r,query:n,body:o}=JF(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listParticipants",async e=>{let{path:t,headers:r,query:n,body:o}=YF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"addParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=XF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=QF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"removeParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=eq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createEvent",async e=>{let{path:t,headers:r,query:n,body:o}=tq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getEvent",async e=>{let{path:t,headers:r,query:n,body:o}=rq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listEvents",async e=>{let{path:t,headers:r,query:n,body:o}=nq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createMessage",async e=>{let{path:t,headers:r,query:n,body:o}=oq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateMessage",async e=>{let{path:t,headers:r,query:n,body:o}=iq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getMessage",async e=>{let{path:t,headers:r,query:n,body:o}=aq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateMessage",async e=>{let{path:t,headers:r,query:n,body:o}=sq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listMessages",async e=>{let{path:t,headers:r,query:n,body:o}=cq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteMessage",async e=>{let{path:t,headers:r,query:n,body:o}=lq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createUser",async e=>{let{path:t,headers:r,query:n,body:o}=uq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUser",async e=>{let{path:t,headers:r,query:n,body:o}=dq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listUsers",async e=>{let{path:t,headers:r,query:n,body:o}=fq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateUser",async e=>{let{path:t,headers:r,query:n,body:o}=pq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateUser",async e=>{let{path:t,headers:r,query:n,body:o}=hq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteUser",async e=>{let{path:t,headers:r,query:n,body:o}=mq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getState",async e=>{let{path:t,headers:r,query:n,body:o}=yq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setState",async e=>{let{path:t,headers:r,query:n,body:o}=gq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrSetState",async e=>{let{path:t,headers:r,query:n,body:o}=vq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"patchState",async e=>{let{path:t,headers:r,query:n,body:o}=bq(e),i=(this.props.toAxiosRequest??re)({method:"patch",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"callAction",async e=>{let{path:t,headers:r,query:n,body:o}=wq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"configureIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=xq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTask",async e=>{let{path:t,headers:r,query:n,body:o}=Sq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTask",async e=>{let{path:t,headers:r,query:n,body:o}=_q(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTask",async e=>{let{path:t,headers:r,query:n,body:o}=Eq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTask",async e=>{let{path:t,headers:r,query:n,body:o}=kq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listTasks",async e=>{let{path:t,headers:r,query:n,body:o}=Tq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"trackAnalytics",async e=>{let{path:t,headers:r,query:n,body:o}=$q(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"runVrl",async e=>{let{path:t,headers:r,query:n,body:o}=Oq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAccount",async e=>{let{path:t,headers:r,query:n,body:o}=Cq(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateAccount",async e=>{let{path:t,headers:r,query:n,body:o}=Aq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPersonalAccessTokens",async e=>{let{path:t,headers:r,query:n,body:o}=Iq(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createPersonalAccessToken",async e=>{let{path:t,headers:r,query:n,body:o}=Rq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deletePersonalAccessToken",async e=>{let{path:t,headers:r,query:n,body:o}=Pq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setAccountPreference",async e=>{let{path:t,headers:r,query:n,body:o}=Nq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAccountPreference",async e=>{let{path:t,headers:r,query:n,body:o}=Mq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPublicIntegrations",async e=>{let{path:t,headers:r,query:n,body:o}=jq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicIntegrationById",async e=>{let{path:t,headers:r,query:n,body:o}=Dq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=Lq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createBot",async e=>{let{path:t,headers:r,query:n,body:o}=Fq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateBot",async e=>{let{path:t,headers:r,query:n,body:o}=qq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"transferBot",async e=>{let{path:t,headers:r,query:n,body:o}=Bq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBots",async e=>{let{path:t,headers:r,query:n,body:o}=Uq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBot",async e=>{let{path:t,headers:r,query:n,body:o}=zq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteBot",async e=>{let{path:t,headers:r,query:n,body:o}=Zq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotLogs",async e=>{let{path:t,headers:r,query:n,body:o}=Vq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotWebchat",async e=>{let{path:t,headers:r,query:n,body:o}=Hq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotAnalytics",async e=>{let{path:t,headers:r,query:n,body:o}=Wq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotIssue",async e=>{let{path:t,headers:r,query:n,body:o}=Kq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotIssues",async e=>{let{path:t,headers:r,query:n,body:o}=Gq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteBotIssue",async e=>{let{path:t,headers:r,query:n,body:o}=Jq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotIssueEvents",async e=>{let{path:t,headers:r,query:n,body:o}=Yq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotVersions",async e=>{let{path:t,headers:r,query:n,body:o}=Xq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=Qq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=e3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deployBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=t3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setWorkspacePaymentMethod",async e=>{let{path:t,headers:r,query:n,body:o}=r3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceInvoices",async e=>{let{path:t,headers:r,query:n,body:o}=n3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUpcomingInvoice",async e=>{let{path:t,headers:r,query:n,body:o}=o3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"chargeWorkspaceUnpaidInvoices",async e=>{let{path:t,headers:r,query:n,body:o}=i3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=a3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=s3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=c3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceUsages",async e=>{let{path:t,headers:r,query:n,body:o}=l3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"breakDownWorkspaceUsageByBot",async e=>{let{path:t,headers:r,query:n,body:o}=u3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAllWorkspaceQuotaCompletion",async e=>{let{path:t,headers:r,query:n,body:o}=d3(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspaceQuota",async e=>{let{path:t,headers:r,query:n,body:o}=f3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceQuotas",async e=>{let{path:t,headers:r,query:n,body:o}=p3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=h3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"checkHandleAvailability",async e=>{let{path:t,headers:r,query:n,body:o}=m3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaces",async e=>{let{path:t,headers:r,query:n,body:o}=y3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPublicWorkspaces",async e=>{let{path:t,headers:r,query:n,body:o}=g3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=v3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAuditRecords",async e=>{let{path:t,headers:r,query:n,body:o}=b3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceMembers",async e=>{let{path:t,headers:r,query:n,body:o}=w3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=x3(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=S3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=_3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=E3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listIntegrationApiKeys",async e=>{let{path:t,headers:r,query:n,body:o}=k3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createIntegrationApiKey",async e=>{let{path:t,headers:r,query:n,body:o}=T3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteIntegrationApiKey",async e=>{let{path:t,headers:r,query:n,body:o}=$3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=O3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=C3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listIntegrations",async e=>{let{path:t,headers:r,query:n,body:o}=A3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=I3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegrationLogs",async e=>{let{path:t,headers:r,query:n,body:o}=R3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegrationByName",async e=>{let{path:t,headers:r,query:n,body:o}=P3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=N3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"requestIntegrationVerification",async e=>{let{path:t,headers:r,query:n,body:o}=M3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createInterface",async e=>{let{path:t,headers:r,query:n,body:o}=j3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getInterface",async e=>{let{path:t,headers:r,query:n,body:o}=D3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getInterfaceByName",async e=>{let{path:t,headers:r,query:n,body:o}=L3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateInterface",async e=>{let{path:t,headers:r,query:n,body:o}=F3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteInterface",async e=>{let{path:t,headers:r,query:n,body:o}=q3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listInterfaces",async e=>{let{path:t,headers:r,query:n,body:o}=B3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUsage",async e=>{let{path:t,headers:r,query:n,body:o}=U3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getMultipleUsages",async e=>{let{path:t,headers:r,query:n,body:o}=z3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listUsageHistory",async e=>{let{path:t,headers:r,query:n,body:o}=Z3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"changeAISpendQuota",async e=>{let{path:t,headers:r,query:n,body:o}=V3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listActivities",async e=>{let{path:t,headers:r,query:n,body:o}=H3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"introspect",async e=>{let{path:t,headers:r,query:n,body:o}=W3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"upsertFile",async e=>{let{path:t,headers:r,query:n,body:o}=K3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteFile",async e=>{let{path:t,headers:r,query:n,body:o}=G3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listFiles",async e=>{let{path:t,headers:r,query:n,body:o}=J3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getFile",async e=>{let{path:t,headers:r,query:n,body:o}=Y3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateFileMetadata",async e=>{let{path:t,headers:r,query:n,body:o}=X3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"searchFiles",async e=>{let{path:t,headers:r,query:n,body:o}=Q3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listFilePassages",async e=>{let{path:t,headers:r,query:n,body:o}=eB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listTables",async e=>{let{path:t,headers:r,query:n,body:o}=tB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTable",async e=>{let{path:t,headers:r,query:n,body:o}=rB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateTable",async e=>{let{path:t,headers:r,query:n,body:o}=nB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTable",async e=>{let{path:t,headers:r,query:n,body:o}=oB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"duplicateTable",async e=>{let{path:t,headers:r,query:n,body:o}=iB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTable",async e=>{let{path:t,headers:r,query:n,body:o}=aB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"renameTableColumn",async e=>{let{path:t,headers:r,query:n,body:o}=sB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTable",async e=>{let{path:t,headers:r,query:n,body:o}=cB(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTableRow",async e=>{let{path:t,headers:r,query:n,body:o}=lB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"findTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=uB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=dB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=fB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=pB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"upsertTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=hB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});this.axiosInstance=e,this.props=t}};function ne(e){var t;return ja.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Im(e.response.data):Im(e)}var jr=class{constructor(e){this._list=e}async*[Symbol.asyncIterator](){let e;do{let{items:t,meta:r}=await this._list({nextToken:e});e=r.nextToken;for(let n of t)yield n}while(e)}async collect(e={}){let t=e.limit??Number.POSITIVE_INFINITY,r=[],n=0;for await(let o of this)if(r.push(o),n++,n>=t)break;return r}},yB=class{constructor(e){k(this,"conversations",e=>new jr(({nextToken:t})=>this.client.listConversations({nextToken:t,...e}).then(r=>({...r,items:r.conversations}))));k(this,"participants",e=>new jr(({nextToken:t})=>this.client.listParticipants({nextToken:t,...e}).then(r=>({...r,items:r.participants}))));k(this,"events",e=>new jr(({nextToken:t})=>this.client.listEvents({nextToken:t,...e}).then(r=>({...r,items:r.events}))));k(this,"messages",e=>new jr(({nextToken:t})=>this.client.listMessages({nextToken:t,...e}).then(r=>({...r,items:r.messages}))));k(this,"users",e=>new jr(({nextToken:t})=>this.client.listUsers({nextToken:t,...e}).then(r=>({...r,items:r.users}))));k(this,"tasks",e=>new jr(({nextToken:t})=>this.client.listTasks({nextToken:t,...e}).then(r=>({...r,items:r.tasks}))));k(this,"publicIntegrations",e=>new jr(({nextToken:t})=>this.client.listPublicIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"bots",e=>new jr(({nextToken:t})=>this.client.listBots({nextToken:t,...e}).then(r=>({...r,items:r.bots}))));k(this,"botIssues",e=>new jr(({nextToken:t})=>this.client.listBotIssues({nextToken:t,...e}).then(r=>({...r,items:r.issues}))));k(this,"workspaces",e=>new jr(({nextToken:t})=>this.client.listWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"publicWorkspaces",e=>new jr(({nextToken:t})=>this.client.listPublicWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"workspaceMembers",e=>new jr(({nextToken:t})=>this.client.listWorkspaceMembers({nextToken:t,...e}).then(r=>({...r,items:r.members}))));k(this,"integrations",e=>new jr(({nextToken:t})=>this.client.listIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"interfaces",e=>new jr(({nextToken:t})=>this.client.listInterfaces({nextToken:t,...e}).then(r=>({...r,items:r.interfaces}))));k(this,"activities",e=>new jr(({nextToken:t})=>this.client.listActivities({nextToken:t,...e}).then(r=>({...r,items:r.activities}))));k(this,"files",e=>new jr(({nextToken:t})=>this.client.listFiles({nextToken:t,...e}).then(r=>({...r,items:r.files}))));k(this,"filePassages",e=>new jr(({nextToken:t})=>this.client.listFilePassages({nextToken:t,...e}).then(r=>({...r,items:r.passages}))));this.client=e}},l_=100*1024*1024,gB=l_,vB=l_,bB=class extends mB{constructor(t={}){let r=qF(t),{apiUrl:n,headers:o,withCredentials:i,timeout:a}=r,s=ja.create({baseURL:n,headers:o,withCredentials:i,timeout:a,maxBodyLength:gB,maxContentLength:vB,httpAgent:Sm?new IF.default.Agent({keepAlive:!0}):void 0,httpsAgent:Sm?new RF.default.Agent({keepAlive:!0}):void 0});super(s);k(this,"config");k(this,"uploadFile",async({key:t,index:r,tags:n,contentType:o,accessPolicies:i,content:a,url:s,expiresAt:c})=>{if(s&&a)throw new Fa("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await ja.get(s,{responseType:"arraybuffer"}).then(p=>p.data).catch(p=>{throw new Fa(`Failed to download file from provided URL: ${p.message}`,p)})),!a)throw new Fa("No content was provided for the file");let l,u;if(typeof a=="string"){let p=new TextEncoder().encode(a);l=p,u=p.byteLength}else if(a instanceof Uint8Array)l=a,u=l.byteLength;else if(a instanceof ArrayBuffer)l=a,u=l.byteLength;else if(a instanceof Blob)l=a,u=a.size;else throw new Fa("The provided content is not supported");let{file:d}=await this.upsertFile({key:t,tags:n,index:r,accessPolicies:i,contentType:o,size:u,expiresAt:c});try{await ja.put(d.uploadUrl,l,{maxBodyLength:1/0,headers:{"Content-Type":d.contentType}})}catch(p){throw new Fa(`Failed to upload file: ${p.message}`,p,d)}return{file:d}});t.retry&&L1(s,t.retry),this.config=r}get list(){return new yB(this)}};const _d=Ih(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:n_,BreakingChangesError:c_,Client:bB,ForbiddenError:U1,InternalError:q1,InvalidDataFormatError:G1,InvalidIdentifierError:J1,InvalidJsonSchemaError:K1,InvalidPayloadError:Z1,InvalidQueryError:t_,LimitExceededError:s_,MethodNotFoundError:H1,PayloadTooLargeError:z1,PaymentRequiredError:i_,QuotaExceededError:a_,RateLimitedError:o_,ReferenceConstraintError:X1,ReferenceNotFoundError:e_,RelationConflictError:Y1,ResourceLockedConflictError:Q1,ResourceNotFoundError:W1,RuntimeError:r_,UnauthorizedError:B1,UnknownError:La,UnsupportedMediaTypeError:V1,UploadFileError:Fa,axios:zL,axiosRetry:I1,errorFrom:Im,isApiError:F1},Symbol.toStringTag,{value:"Module"})));(function(e){var t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(_,ie)=>{for(var Te in ie)r(_,Te,{get:ie[Te],enumerable:!0})},c=(_,ie,Te,Le)=>{if(ie&&typeof ie=="object"||typeof ie=="function")for(let Fe of o(ie))!a.call(_,Fe)&&Fe!==Te&&r(_,Fe,{get:()=>ie[Fe],enumerable:!(Le=n(ie,Fe))||Le.enumerable});return _},l=(_,ie,Te)=>(c(_,ie,"default"),Te&&c(Te,ie,"default")),u=(_,ie,Te)=>(Te=_!=null?t(i(_)):{},c(ie||!_||!_.__esModule?r(Te,"default",{value:_,enumerable:!0}):Te,_)),d=_=>c(r({},"__esModule",{value:!0}),_),p={};s(p,{Bot:()=>fxe,BotSpecificClient:()=>Bj,Integration:()=>Kt,IntegrationDefinition:()=>le,IntegrationSpecificClient:()=>tt,InterfaceDeclaration:()=>he,RuntimeError:()=>qj.RuntimeError,botIdHeader:()=>E,botUserIdHeader:()=>H,configurationHeader:()=>ce,integrationIdHeader:()=>Q,interfaces:()=>F,isApiError:()=>qj.isApiError,messages:()=>f,operationHeader:()=>pe,parseBody:()=>Ie,serve:()=>Ue,typeHeader:()=>fe,webhookIdHeader:()=>T}),e.exports=d(p);var f={};s(f,{defaults:()=>B});var h={};s(h,{default:()=>m});var y=tu;l(h,tu);var m=y.z,g=h.z.string().min(1),v=h.z.object({text:g}),b=h.z.object({markdown:g}),x=h.z.object({imageUrl:g}),w=h.z.object({audioUrl:g}),S=h.z.object({videoUrl:g}),C=h.z.object({fileUrl:g,title:g.optional()}),I=h.z.object({latitude:h.z.number(),longitude:h.z.number(),address:h.z.string().optional(),title:h.z.string().optional()}),P=h.z.object({title:g,subtitle:g.optional(),imageUrl:g.optional(),actions:h.z.array(h.z.object({action:h.z.enum(["postback","url","say"]),label:g,value:g}))}),A=h.z.object({text:g,options:h.z.array(h.z.object({label:g,value:g}))}),L=h.z.object({items:h.z.array(P)}),W=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal("text"),payload:v}),h.z.object({type:h.z.literal("markdown"),payload:b}),h.z.object({type:h.z.literal("image"),payload:x}),h.z.object({type:h.z.literal("audio"),payload:w}),h.z.object({type:h.z.literal("video"),payload:S}),h.z.object({type:h.z.literal("file"),payload:C}),h.z.object({type:h.z.literal("location"),payload:I})]),Z=h.z.object({items:h.z.array(W)}),B={text:{schema:v},markdown:{schema:b},image:{schema:x},audio:{schema:w},video:{schema:S},file:{schema:C},location:{schema:I},carousel:{schema:L},card:{schema:P},dropdown:{schema:A},choice:{schema:A},bloc:{schema:Z}},F={};s(F,{creatable:()=>cr,deletable:()=>yn,hitl:()=>sn,listable:()=>at,llm:()=>Rr,readable:()=>Xt,schemas:()=>j,speechToText:()=>ge,textToImage:()=>txe,typingIndicator:()=>rxe,updatable:()=>Qt});var j={};s(j,{speechToText:()=>U});var U={};s(U,{OpenAITranscribeAudioOutputSchema:()=>K});var K=m.object({language:m.string().describe("Detected language of the audio"),duration:m.number().describe("Duration of the audio file, in seconds"),segments:m.array(m.object({text:m.string().describe("Text content of the segment."),id:m.number().describe("Unique identifier of the segment"),seek:m.number().describe("Seek offset of the segment"),start:m.number().describe("Start time of the segment in seconds."),end:m.number().describe("End time of the segment in seconds."),tokens:m.array(m.number()).describe("Array of token IDs for the text content."),temperature:m.number().describe("Temperature parameter used for generating the segment."),avg_logprob:m.number().describe("Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."),compression_ratio:m.number().describe("Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."),no_speech_prob:m.number().describe("Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.")}))}),D=tu,E="x-bot-id",H="x-bot-user-id",Q="x-integration-id",T="x-webhook-id",ce="x-bp-configuration",pe="x-bp-operation",fe="x-bp-type",ve=D.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),_e=_=>{let ie=_[E],Te=_[H],Le=_[Q],Fe=_[T],De=_[ce],Be=ve.parse(_[pe]);if(!ie)throw new Error("Missing bot headers");if(!Te)throw new Error("Missing bot user headers");if(!Le)throw new Error("Missing integration headers");if(!Fe)throw new Error("Missing webhook headers");if(!De)throw new Error("Missing configuration headers");if(!Be)throw new Error("Missing operation headers");return{botId:ie,botUserId:Te,integrationId:Le,webhookId:Fe,operation:Be,configuration:De?JSON.parse(Buffer.from(De,"base64").toString("utf-8")):{}}},Ce=_=>Array.from(new Set(_)),be=_=>Object.entries(_),de=(_,ie)=>Object.fromEntries(be(_).map(([Te,Le])=>[Te,ie(Le,Te)])),te=(_,ie,Te)=>{let Le=Ce([...Object.keys(_),...Object.keys(ie)]),Fe={};for(let De of Le){let Be=_[De],lt=ie[De];Be&&lt?Fe[De]=Te(Be,lt):Be?Fe[De]=Be:lt&&(Fe[De]=lt)}return Fe},we=Symbol("schemaName"),Ae=_=>_?de(_,(ie,Te)=>({...ie,[we]:Te})):{},qe=_=>_[we]!==void 0,q=_=>_[we],le=class{constructor(_){k(this,"name");k(this,"version");k(this,"title");k(this,"description");k(this,"icon");k(this,"readme");k(this,"configuration");k(this,"events");k(this,"actions");k(this,"channels");k(this,"states");k(this,"user");k(this,"secrets");k(this,"identifier");k(this,"entities");k(this,"interfaces",{});k(this,"_mergeActions",(_,ie)=>({title:ie.title??_.title,description:ie.description??_.description,input:{schema:_.input.schema.merge(ie.input.schema)},output:{schema:_.output.schema.merge(ie.output.schema)}}));k(this,"_mergeEvents",(_,ie)=>({title:ie.title??_.title,description:ie.description??_.description,schema:_.schema.merge(ie.schema)}));k(this,"_mergeChannels",(_,ie)=>{let Te=te(_.messages,ie.messages,this._mergeMessage);return{title:ie.title??_.title,description:ie.description??_.description,conversation:ie.conversation??_.conversation,message:ie.message??_.message,messages:Te}});k(this,"_mergeMessage",(_,ie)=>({schema:_.schema.merge(ie.schema)}));this.props=_,this.name=_.name,this.version=_.version,this.icon=_.icon,this.readme=_.readme,this.title=_.title,this.identifier=_.identifier,this.description=_.description,this.configuration=_.configuration,this.events=_.events,this.actions=_.actions,this.channels=_.channels,this.states=_.states,this.user=_.user,this.secrets=_.secrets,this.entities=_.entities}clone(_){let ie=new le({...this,..._});for(let[Te,Le]of Object.entries(this.interfaces))ie.interfaces[Te]=Le;return ie}extend(_,ie){let Te=ie(Ae(this.entities)),Le=be(Te).find(([$n,zs])=>!qe(zs));if(Le)throw new Error(`Cannot extend interface "${_.name}" with entity "${Le[0]}"; the provided schema is not part of the integration's entities.`);let Fe=de(Te,$n=>({name:q($n),schema:$n.schema})),{resolved:De,implementStatement:Be}=_.resolve({entities:Fe}),lt=this;lt.actions=te(lt.actions??{},De.actions,this._mergeActions),lt.channels=te(lt.channels??{},De.channels,this._mergeChannels),lt.events=te(lt.events??{},De.events,this._mergeEvents);let Pr=Object.values(Fe).map($n=>$n.name),Ur=`${_.name}<${Pr.join(",")}>`;return this.interfaces[Ur]=Be,this}},he=class{constructor(_){k(this,"name");k(this,"version");k(this,"entities");k(this,"events");k(this,"actions");k(this,"channels");k(this,"templateName");this.props=_,this.name=_.name,this.version=_.version,this.entities=_.entities??{},this.events=_.events??{},this.actions=_.actions??{},this.channels=_.channels??{},this.templateName=_.templateName}resolve(_){let{entities:ie}=_,Te={name:this.name,version:this.version,entities:de(ie,Be=>({name:Be.name})),actions:{},events:{}},Le={},Fe={},De={};for(let[Be,lt]of be(this.actions)){let Pr=this._dereference(lt.input.schema,ie),Ur=this._dereference(lt.output.schema,ie),$n=this._rename(ie,Be);Le[$n]={input:{schema:Pr},output:{schema:Ur}},Te.actions[Be]={name:$n}}for(let[Be,lt]of be(this.events)){let Pr=this._dereference(lt.schema,ie),Ur=this._rename(ie,Be);Fe[Ur]={schema:Pr},Te.events[Be]={name:Ur}}for(let[Be,lt]of be(this.channels)){let Pr={};for(let[Ur,$n]of be(lt.messages)){let zs=this._dereference($n.schema,ie);Pr[Ur]={schema:zs}}De[Be]={messages:Pr}}return{resolved:{actions:Le,events:Fe,channels:De},implementStatement:Te}}_dereference(_,ie){let Te={},Le={};for(let[Fe,De]of be(ie))Te[Fe]=De.schema,Le[Fe]=m.ref(Fe);return _(Le).dereference(Te)}_rename(_,ie){if(!this.templateName)return ie;let Te=de(_,Le=>Le.name);return this.templateName(ie,Te)}},me=om,je=console;function Ie(_){if(!_.body)throw new Error("Missing body");return JSON.parse(_.body)}async function Ue(_,ie=8072,Te=se){let Le=(0,me.createServer)(async(Fe,De)=>{try{let Be=await pt(Fe);if(Be.path==="/health"){De.writeHead(200).end("ok");return}let lt=await _(Be);De.writeHead((lt==null?void 0:lt.status)??200,(lt==null?void 0:lt.headers)??{}).end((lt==null?void 0:lt.body)??"{}")}catch(Be){je.error("Error while handling request",{error:(Be==null?void 0:Be.message)??"Internal error occured"}),De.writeHead(500).end(JSON.stringify({error:(Be==null?void 0:Be.message)??"Internal error occured"}))}});return Le.listen(ie,()=>Te(ie)),Le}async function pt(_){var Fe;let ie=await G(_),Te={};for(let De=0;De<_.rawHeaders.length;De+=2){let Be=_.rawHeaders[De].toLowerCase(),lt=_.rawHeaders[De+1];Te[Be]=lt}let Le=new URL(_.url??"",_.headers.host?`http://${_.headers.host}`:"http://botpress.cloud");return{body:ie,path:Le.pathname,query:Ke(Le.search,"?"),headers:Te,method:((Fe=_.method)==null?void 0:Fe.toUpperCase())??"GET"}}function Ke(_,ie){return _.indexOf(ie)===0?_.slice(ie.length):_}async function G(_){return new Promise((ie,Te)=>{if(_.method!=="POST"&&_.method!=="PUT"&&_.method!=="PATCH")return ie(void 0);let Le="";_.on("data",Fe=>Le+=Fe.toString()),_.on("error",Fe=>Te(Fe)),_.on("end",()=>ie(Le))})}function se(_){je.info(`Listening on port ${_}`)}var Y=_d,ye=_d,$e={retries:3,retryCondition:_=>{var ie;return ye.axiosRetry.isNetworkOrIdempotentRequestError(_)||[429,502].includes(((ie=_.response)==null?void 0:ie.status)??0)},retryDelay:_=>_*1e3},tt=class{constructor(_){k(this,"createConversation",_=>this.client.createConversation(_));k(this,"getConversation",_=>this.client.getConversation(_));k(this,"listConversations",_=>this.client.listConversations(_));k(this,"getOrCreateConversation",_=>this.client.getOrCreateConversation(_));k(this,"updateConversation",_=>this.client.updateConversation(_));k(this,"deleteConversation",_=>this.client.deleteConversation(_));k(this,"listParticipants",_=>this.client.listParticipants(_));k(this,"addParticipant",_=>this.client.addParticipant(_));k(this,"getParticipant",_=>this.client.getParticipant(_));k(this,"removeParticipant",_=>this.client.removeParticipant(_));k(this,"createEvent",_=>this.client.createEvent(_));k(this,"getEvent",_=>this.client.getEvent(_));k(this,"listEvents",_=>this.client.listEvents(_));k(this,"createMessage",_=>this.client.createMessage(_));k(this,"getOrCreateMessage",_=>this.client.getOrCreateMessage(_));k(this,"getMessage",_=>this.client.getMessage(_));k(this,"updateMessage",_=>this.client.updateMessage(_));k(this,"listMessages",_=>this.client.listMessages(_));k(this,"deleteMessage",_=>this.client.deleteMessage(_));k(this,"createUser",_=>this.client.createUser(_));k(this,"getUser",_=>this.client.getUser(_));k(this,"listUsers",_=>this.client.listUsers(_));k(this,"getOrCreateUser",_=>this.client.getOrCreateUser(_));k(this,"updateUser",_=>this.client.updateUser(_));k(this,"deleteUser",_=>this.client.deleteUser(_));k(this,"getState",_=>this.client.getState(_));k(this,"setState",_=>this.client.setState(_));k(this,"getOrSetState",_=>this.client.getOrSetState(_));k(this,"patchState",_=>this.client.patchState(_));k(this,"configureIntegration",_=>this.client.configureIntegration(_));k(this,"uploadFile",_=>this.client.uploadFile(_));k(this,"upsertFile",_=>this.client.upsertFile(_));k(this,"deleteFile",_=>this.client.deleteFile(_));k(this,"listFiles",_=>this.client.listFiles(_));k(this,"getFile",_=>this.client.getFile(_));k(this,"updateFileMetadata",_=>this.client.updateFileMetadata(_));this.client=_}},Ve=u(om),ct=_=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Ve.default.format(..._),visible_to_bot_owner:!0});{let[ie,...Te]=_;return Ve.default.format(`[For Bot Owner] ${ie}`,...Te)}},$t={forBot:()=>({info:(..._)=>{console.info(ct(_))},warn:(..._)=>{console.warn(ct(_))},error:(..._)=>{console.error(ct(_))},debug:(..._)=>{console.debug(ct(_))}})},Wt=_=>async ie=>{let Te=_e(ie.headers),Le=new Y.Client({botId:Te.botId,integrationId:Te.integrationId,retry:$e}),Fe=new tt(Le),De={ctx:Te,req:ie,client:Fe,logger:$t,instance:_};try{let Be;switch(Te.operation){case"webhook_received":Be=await X(De);break;case"register":Be=await ze(De);break;case"unregister":Be=await Ge(De);break;case"message_created":Be=await ir(De);break;case"action_triggered":Be=await kr(De);break;case"ping":Be=await z(De);break;case"create_user":Be=await gt(De);break;case"create_conversation":Be=await Je(De);break;default:throw new Error(`Unknown operation ${Te.operation}`)}return Be?{...Be,status:Be.status??200}:{status:200}}catch(Be){if((0,Y.isApiError)(Be)){let Pr=new Y.RuntimeError(Be.message,Be);return $t.forBot().error(Pr.message),{status:Pr.code,body:JSON.stringify(Pr.toJSON())}}console.error(Be);let lt=new Y.RuntimeError("An unexpected error occurred in the integration. Bot owners: Check logs for more informations. Integration owners: throw a RuntimeError to return a custom error message instead.");return $t.forBot().error(lt.message),{status:lt.code,body:JSON.stringify(lt.toJSON())}}},z=async _=>{},X=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{let{req:De}=Ie(Te);return Fe.webhook({client:_,ctx:ie,req:De,logger:Le})},ze=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.register)return;let{webhookUrl:De}=Ie(Te);await Fe.register({client:_,ctx:ie,webhookUrl:De,logger:Le})},Ge=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.unregister)return;let{webhookUrl:De}=Ie(Te);await Fe.unregister({ctx:ie,webhookUrl:De,client:_,logger:Le})},gt=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.createUser)return;let{tags:De}=Ie(Te);return await Fe.createUser({ctx:ie,client:_,tags:De,logger:Le})},Je=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.createConversation)return;let{channel:De,tags:Be}=Ie(Te);return await Fe.createConversation({ctx:ie,client:_,channel:De,tags:Be,logger:Le})},ir=async({ctx:_,req:ie,client:Te,logger:Le,instance:Fe})=>{let{conversation:De,user:Be,type:lt,payload:Pr,message:Ur}=Ie(ie),$n=Fe.channels[De.channel];if(!$n)throw new Error(`Channel ${De.channel} not found`);let zs=$n.messages[lt];if(!zs)throw new Error(`Message of type ${lt} not found in channel ${De.channel}`);await zs({ctx:_,conversation:De,message:Ur,user:Be,type:lt,client:Te,payload:Pr,ack:async({tags:pxe})=>{await Te.updateMessage({id:Ur.id,tags:pxe})},logger:Le})},kr=async({req:_,ctx:ie,client:Te,logger:Le,instance:Fe})=>{let{input:De,type:Be}=Ie(_);if(!Be)throw new Error("Missing action type");let lt=Fe.actions[Be];if(!lt)throw new Error(`Action ${Be} not found`);let Pr=await lt({ctx:ie,input:De,client:Te,type:Be,logger:Le});return{body:JSON.stringify({output:Pr})}},Kt=class{constructor(_){k(this,"props");k(this,"actions");k(this,"channels");k(this,"register");k(this,"unregister");k(this,"createUser");k(this,"createConversation");k(this,"webhook");k(this,"handler",Wt(this));k(this,"start",_=>Ue(this.handler,_));this.props=_,this.actions=_.actions,this.channels=_.channels,this.register=_.register,this.unregister=_.unregister,this.createUser=_.createUser,this.createConversation=_.createConversation,this.webhook=_.handler}},ar=_=>({..._,schema:()=>_.schema.extend({userId:m.string().optional().describe("Allows sending a message pretending to be a certain user")})}),sn=new he({name:"hitl",version:"0.2.0",entities:{},events:{hitlAssigned:{schema:()=>m.object({conversationId:m.string(),userId:m.string()})},hitlStopped:{schema:()=>m.object({conversationId:m.string()})}},actions:{createUser:{input:{schema:()=>m.object({name:m.string().optional(),pictureUrl:m.string().optional(),email:m.string().optional()})},output:{schema:()=>m.object({userId:m.string()})}},startHitl:{input:{schema:()=>m.object({userId:m.string(),title:m.string(),description:m.string().optional()})},output:{schema:()=>m.object({conversationId:m.string()})}},stopHitl:{input:{schema:()=>m.object({conversationId:m.string(),reason:m.enum(["timeout","cancel"]).optional()})},output:{schema:()=>m.object({})}}},channels:{hitl:{messages:{text:ar(B.text)}}}}),vt=m.object({id:m.string(),type:m.enum(["function"]),function:m.object({name:m.string(),arguments:m.record(m.any()).nullable().describe("Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens.")})}),bt=m.object({type:m.enum(["auto","specific","any","none",""]).optional(),functionName:m.string().optional().describe('Required if `type` is "specific"')}),Yt=m.object({role:m.enum(["user","assistant"]),type:m.enum(["text","tool_calls","tool_result","multipart"]).default("text"),toolCalls:m.array(vt).optional().describe('Required if `type` is "tool_calls"'),toolResultCallId:m.string().optional().describe('Required if `type` is "tool_result"'),content:m.string().or(m.array(m.object({type:m.enum(["text","image"]),mimeType:m.string().optional().describe("Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL."),text:m.string().optional().describe('Required if part type is "text" '),url:m.string().optional().describe('Required if part type is "image"')}))).optional().nullable().describe('Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead.')}),Gt=m.object({id:m.string()}),sr=Gt.extend({name:m.string(),description:m.string(),tags:m.array(m.enum(["recommended","deprecated","general-purpose","low-cost","vision","coding","agents","function-calling","roleplay","storytelling"])),input:m.object({maxTokens:m.number().int(),costPer1MTokens:m.number().describe("Cost per 1 million tokens, in U.S. dollars")}),output:m.object({maxTokens:m.number().int(),costPer1MTokens:m.number().describe("Cost per 1 million tokens, in U.S. dollars")})}),Ut=_=>m.object({model:_.describe("Model to use for content generation").optional(),systemPrompt:m.string().optional().describe("Optional system prompt to guide the model"),messages:m.array(Yt).describe("Array of messages for the model to process"),responseFormat:m.enum(["text","json_object"]).optional().describe('Response format expected from the model. If "json_object" is chosen, you must instruct the model to generate JSON either via the system prompt or a user message.'),maxTokens:m.number().optional().describe("Maximum number of tokens allowed in the generated response"),temperature:m.number().min(0).max(2).displayAs({id:"slider",params:{stepSize:.01,horizontal:!0}}).default(1).describe("Sampling temperature for the model. Higher values result in more random outputs."),topP:m.number().min(0).max(1).default(1).displayAs({id:"slider",params:{stepSize:.01,horizontal:!0}}).describe("Top-p sampling parameter. Limits sampling to the smallest set of tokens with a cumulative probability above the threshold."),stopSequences:m.array(m.string()).max(4).optional().describe("Sequences where the model should stop generating further tokens."),tools:m.array(m.object({type:m.literal("function"),function:m.object({name:m.string().describe("Function name"),description:m.string().optional(),argumentsSchema:m.object({}).passthrough().optional().describe("JSON schema of the function arguments")})})).optional(),toolChoice:bt.optional(),userId:m.string().optional(),debug:m.boolean().optional().describe("Set to `true` to output debug information to the bot logs")});Ut(Gt);var Ir=m.object({id:m.string().describe("Response ID from LLM provider"),provider:m.string().describe("LLM provider name"),model:m.string().describe("Model name"),choices:m.array(Yt.omit({role:!0}).extend({role:m.literal("assistant"),index:m.number().int(),stopReason:m.enum(["stop","max_tokens","tool_calls","content_filter","other"])})),usage:m.object({inputTokens:m.number().int().describe("Number of input tokens used by the model"),inputCost:m.number().describe("Cost of the input tokens received by the model, in U.S. dollars"),outputTokens:m.number().int().describe("Number of output tokens used by the model"),outputCost:m.number().describe("Cost of the output tokens generated by the model, in U.S. dollars")})}),Rr=new he({name:"llm",version:"4.0.0",entities:{modelRef:{schema:Gt}},events:{},actions:{generateContent:{input:{schema:({modelRef:_})=>Ut(_)},output:{schema:()=>Ir}},listLanguageModels:{input:{schema:()=>m.object({})},output:{schema:({modelRef:_})=>m.object({models:m.array(m.intersection(sr,_))})}}}}),tn=m.object({id:m.string()}),wa=tn.extend({name:m.string(),costPerMinute:m.number().describe("Cost per minute of speech transcription, in U.S. dollars")}),xa=_=>m.object({model:_.optional().describe("Model to use for speech-to-text transcription (optional)"),fileUrl:m.string().url().describe("URL of the audio file to transcribe. The URL should return a content-type header in order to detect the audio format. Supported audio formats supported are: mp3, mp4, mpeg, mpga, m4a, wav, webm"),language:m.string().optional().describe("The language of the input audio (optional). Supplying the input language in ISO-639-1 format will improve accuracy and latency."),prompt:m.string().optional().describe("An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language."),temperature:m.number().default(0).optional().describe("The sampling temperature (optional), between 0 and 1. Defaults to 0 (automatic). Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.")});xa(tn);var M=K.extend({model:m.string().describe("Model name used"),cost:m.number().describe("Total cost of this transcription, in U.S. dollars")}),ge=new he({name:"speechToText",version:"1.0.0",entities:{speechToTextModelRef:{schema:tn}},actions:{transcribeAudio:{input:{schema:({speechToTextModelRef:_})=>xa(_)},output:{schema:()=>M}},listSpeechToTextModels:{input:{schema:()=>m.object({})},output:{schema:({speechToTextModelRef:_})=>m.object({models:m.array(m.intersection(wa,_))})}}}}),ke=m.object({id:m.string()}),Ze=_=>m.intersection(_,ke),kt=_=>_[0].toUpperCase()+_.slice(1),Ot=(..._)=>{let[ie,...Te]=_.filter(Le=>Le.length>0).map(Le=>Le.toLowerCase());return ie?[ie,...Te.map(kt)].join(""):""},ht=m.string().optional(),at=new he({name:"listable",version:"0.0.1",entities:{item:{schema:ke}},events:{},actions:{list:{input:{schema:()=>m.object({nextToken:ht})},output:{schema:_=>m.object({items:m.array(Ze(_.item)),meta:m.object({nextToken:ht})})}}},templateName:(_,ie)=>Ot(ie.item,_)}),cr=new he({name:"creatable",version:"0.0.1",entities:{item:{schema:ke}},events:{created:{schema:_=>m.object({item:Ze(_.item)})}},actions:{create:{input:{schema:_=>m.object({item:_.item})},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Xt=new he({name:"readable",version:"0.0.1",entities:{item:{schema:ke}},events:{},actions:{read:{input:{schema:()=>ke},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Qt=new he({name:"updatable",version:"0.0.1",entities:{item:{schema:ke}},events:{updated:{schema:_=>m.object({item:Ze(_.item)})}},actions:{update:{input:{schema:_=>ke.extend({item:_.item})},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),yn=new he({name:"deletable",version:"0.0.1",entities:{item:{schema:ke}},events:{deleted:{schema:()=>ke}},actions:{delete:{input:{schema:()=>ke},output:{schema:()=>m.object({})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Ao=m.object({id:m.string()}),$h=Ao.extend({name:m.string(),costPerImage:m.number().describe("Cost per image generation, in U.S. dollars"),sizes:m.array(m.string()).describe("Available image sizes"),defaultSize:m.string().describe("Default image size generated by model")}),Dn=m.object({}).describe("Model-specific parameters for image generation"),Fj=(_,ie)=>m.object({model:_.optional().describe("Model to use for image generation"),prompt:m.string(),size:m.string().optional(),expiration:m.number().int().min(30).max(90).optional().describe("Expiration of the generated image in days, after which the image will be automatically deleted to free up storage space in your account. The default is to keep the image indefinitely (no expiration). The minimum is 30 days and the maximum is 90 days."),params:ie.optional()});Fj(Ao,Dn);var exe=m.object({model:m.string().describe("Model name used"),imageUrl:m.string().describe("Temporary URL of generated image"),cost:m.number().describe("Cost of the image generation, in U.S. dollars")}),txe=new he({name:"textToImage",version:"1.1.0",entities:{imageModelRef:{schema:Ao},imageGenerationParams:{schema:Dn}},actions:{generateImage:{input:{schema:({imageModelRef:_,imageGenerationParams:ie})=>Fj(_,ie)},output:{schema:()=>exe}},listImageModels:{input:{schema:()=>m.object({})},output:{schema:({imageModelRef:_})=>m.object({models:m.array(m.intersection($h,_))})}}}}),rxe=new he({name:"typingIndicator",version:"0.0.1",entities:{},events:{},actions:{startTypingIndicator:{input:{schema:()=>m.object({conversationId:m.string(),messageId:m.string().describe("The message ID to which the typing indicator should be attached"),timeout:m.number().optional().describe("The timeout in milliseconds after which the typing indicator should stop")})},output:{schema:()=>m.object({})}},stopTypingIndicator:{input:{schema:()=>m.object({conversationId:m.string(),messageId:m.string().describe("The message ID from which the typing indicator should be removed")})},output:{schema:()=>m.object({})}}}});l(p,h,e.exports);var qj=_d,nxe=u(_d),Bj=class{constructor(_){k(this,"getConversation",_=>this.client.getConversation(_));k(this,"listConversations",_=>this.client.listConversations(_));k(this,"updateConversation",_=>this.client.updateConversation(_));k(this,"deleteConversation",_=>this.client.deleteConversation(_));k(this,"listParticipants",_=>this.client.listParticipants(_));k(this,"addParticipant",_=>this.client.addParticipant(_));k(this,"getParticipant",_=>this.client.getParticipant(_));k(this,"removeParticipant",_=>this.client.removeParticipant(_));k(this,"getEvent",_=>this.client.getEvent(_));k(this,"listEvents",_=>this.client.listEvents(_));k(this,"createMessage",_=>this.client.createMessage(_));k(this,"getOrCreateMessage",_=>this.client.getOrCreateMessage(_));k(this,"getMessage",_=>this.client.getMessage(_));k(this,"updateMessage",_=>this.client.updateMessage(_));k(this,"listMessages",_=>this.client.listMessages(_));k(this,"deleteMessage",_=>this.client.deleteMessage(_));k(this,"getUser",_=>this.client.getUser(_));k(this,"listUsers",_=>this.client.listUsers(_));k(this,"updateUser",_=>this.client.updateUser(_));k(this,"deleteUser",_=>this.client.deleteUser(_));k(this,"getState",_=>this.client.getState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"setState",_=>this.client.setState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"getOrSetState",_=>this.client.getOrSetState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"patchState",_=>this.client.patchState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"callAction",_=>this.client.callAction(_));k(this,"uploadFile",_=>this.client.uploadFile(_));k(this,"upsertFile",_=>this.client.upsertFile(_));k(this,"deleteFile",_=>this.client.deleteFile(_));k(this,"listFiles",_=>this.client.listFiles(_));k(this,"getFile",_=>this.client.getFile(_));k(this,"updateFileMetadata",_=>this.client.updateFileMetadata(_));k(this,"searchFiles",_=>this.client.searchFiles(_));k(this,"createConversation",_=>this.client.createConversation(_));k(this,"getOrCreateConversation",_=>this.client.getOrCreateConversation(_));k(this,"createUser",_=>this.client.createUser(_));k(this,"getOrCreateUser",_=>this.client.getOrCreateUser(_));this.client=_}},oxe=tu,ixe=oxe.z.enum(["event_received","register","unregister","ping","action_triggered"]),axe=_=>{let ie=_[E],Te=_[ce],Le=_[fe],Fe=ixe.parse(_[pe]);if(!ie)throw new Error("Missing bot headers");if(!Le)throw new Error("Missing type headers");if(!Te)throw new Error("Missing configuration headers");if(!Fe)throw new Error("Missing operation headers");return{botId:ie,operation:Fe,type:Le,configuration:Te?JSON.parse(Buffer.from(Te,"base64").toString("utf-8")):{}}},sxe=_=>async ie=>{let Te=axe(ie.headers);Te.operation!=="ping"&&je.info(`Received ${Te.operation} operation for bot ${Te.botId} of type ${Te.type}`);let Le=new nxe.Client({botId:Te.botId,retry:$e}),Fe=new Bj(Le),De={req:ie,ctx:Te,client:Fe,instance:_};switch(Te.operation){case"action_triggered":throw new Error(`Operation ${Te.operation} not supported yet`);case"event_received":await dxe(De);break;case"register":await lxe();break;case"unregister":await uxe();break;case"ping":await cxe();break;default:throw new Error(`Unknown operation ${Te.operation}`)}return{status:200}},cxe=async _=>{},lxe=async _=>{},uxe=async _=>{},dxe=async({ctx:_,req:ie,client:Te,instance:Le})=>{je.debug(`Received event ${_.type}`);let Fe=Ie(ie),De=Fe.event;switch(_.type){case"message_created":let Be={user:De.payload.user,conversation:De.payload.conversation,message:De.payload.message,states:De.payload.states,event:De};await Promise.all(Le.messageHandlers.map(Ur=>Ur({client:Te,ctx:_,...Be})));break;case"state_expired":let lt={state:De.payload.state};await Promise.all(Le.stateExpiredHandlers.map(Ur=>Ur({client:Te,ctx:_,...lt})));break;default:let Pr={event:Fe.event};await Promise.all(Le.eventHandlers.map(Ur=>Ur({client:Te,ctx:_,...Pr})))}},fxe=class{constructor(_){k(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});k(this,"props");k(this,"message",_=>{this._state.messageHandlers.push(_)});k(this,"event",_=>{this._state.eventHandlers.push(_)});k(this,"stateExpired",_=>{this._state.stateExpiredHandlers.push(_)});k(this,"handler",sxe(this._state));k(this,"start",_=>Ue(this.handler,_));this.props=_}}})(x0);var ae=x0.exports;const{defaults:io}=ae.messages,zn={className:ae.z.string().describe("CSS className to apply to the message").optional()},u_=io.audio.schema.extend({...zn,type:ae.z.literal("audio")}),Rm=io.card.schema.extend({type:ae.z.literal("card"),subtitle:ae.z.string().optional(),imageUrl:ae.z.string().optional(),...zn}),wB=Rm.omit({type:!0}),d_=ae.z.object({items:ae.z.array(wB),...zn,type:ae.z.literal("carousel")}),f_=io.choice.schema.extend({text:ae.z.string(),...zn,type:ae.z.literal("choice"),disableFreeText:ae.z.boolean().optional()}),p_=io.dropdown.schema.extend({text:ae.z.string(),...zn,type:ae.z.literal("dropdown")}),h_=io.file.schema.extend({...zn,type:ae.z.literal("file")}),m_=io.image.schema.extend({...zn,type:ae.z.literal("image")}),y_=io.location.schema.extend({...zn,type:ae.z.literal("location")}),g_=io.markdown.schema.extend({...zn,type:ae.z.literal("markdown")}),v_=io.text.schema.extend({...zn,type:ae.z.literal("text")}),b_=io.video.schema.extend({...zn,type:ae.z.literal("video")}),w_=ae.z.union([u_,Rm,d_,f_,p_,h_,m_,y_,g_,v_,b_]),x_=ae.z.object({type:ae.z.literal("webchat_visibility"),data:ae.z.object({visibility:ae.z.union([ae.z.literal("show"),ae.z.literal("hide"),ae.z.literal("toggle")])})}),S_=ae.z.object({type:ae.z.literal("webchat_config"),data:ae.z.object({config:ae.z.record(ae.z.any())})}),__=ae.z.object({type:ae.z.literal("custom"),data:ae.z.object({event:ae.z.record(ae.z.any())})}),E_=ae.z.union([x_,S_,__]),xB=E_,SB=ae.z.object({type:ae.z.literal("message_created"),data:w_}),k_=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:u_,cardSchema:Rm,carouselSchema:d_,choiceSchema:f_,customSchema:__,dropdownSchema:p_,fileSchema:h_,imageSchema:m_,locationSchema:y_,markdownSchema:g_,messageCreatedSchema:SB,messageSchema:w_,textSchema:v_,triggerSchema:E_,triggerSignalSchema:xB,videoSchema:b_,webchatConfigSchema:S_,webchatVisibilitySchema:x_},Symbol.toStringTag,{value:"Module"})),ao=ae.z.object({className:ae.z.string().optional(),avatarUrl:ae.z.string().url().optional()}),T_=ao.extend({type:ae.z.literal("audio"),audio:ae.z.string(),title:ae.z.string().optional()}),_B=ae.z.union([ae.z.object({title:ae.z.string(),action:ae.z.literal("Say something"),text:ae.z.string()}),ae.z.object({title:ae.z.string(),action:ae.z.literal("Open URL"),url:ae.z.string()}),ae.z.object({title:ae.z.string(),action:ae.z.literal("Postback"),payload:ae.z.string()})]),Pm=ao.extend({type:ae.z.literal("card"),title:ae.z.string(),subtitle:ae.z.string().optional(),image:ae.z.string().optional(),actions:ae.z.array(_B)}),$_=ao.extend({type:ae.z.literal("carousel"),items:ae.z.array(Pm)}),O_=ao.extend({type:ae.z.literal("dropdown"),message:ae.z.string().optional(),options:ae.z.array(ae.z.object({label:ae.z.string(),value:ae.z.string()})),allowCreation:ae.z.boolean().optional(),placeholderText:ae.z.string().optional(),allowMultiple:ae.z.boolean().optional(),buttonText:ae.z.string().optional(),width:ae.z.number().optional(),displayInKeyboard:ae.z.boolean().optional(),markdown:ae.z.boolean().optional(),text:ae.z.string().optional()}),C_=ao.extend({type:ae.z.literal("file"),file:ae.z.string(),title:ae.z.string().optional()}),A_=ao.extend({type:ae.z.literal("image"),image:ae.z.string()}),I_=ao.extend({type:ae.z.literal("location"),latitude:ae.z.number(),longitude:ae.z.number(),address:ae.z.string().optional(),title:ae.z.string().optional()}),R_=ao.extend({type:ae.z.literal("single-choice"),text:ae.z.string(),disableFreeText:ae.z.boolean().optional(),choices:ae.z.array(ae.z.object({title:ae.z.string(),value:ae.z.string()}))}),P_=ao.extend({type:ae.z.literal("text"),text:ae.z.string(),markdown:ae.z.boolean().optional()}),N_=ao.extend({type:ae.z.literal("video"),video:ae.z.string(),title:ae.z.string().optional()}),M_=ae.z.object({type:ae.z.literal("quick_reply"),text:ae.z.string(),payload:ae.z.string().optional()}),Ed=ae.z.union([T_,Pm,$_,O_,C_,A_,I_,R_,P_,N_,M_]),j_=ae.z.object({type:ae.z.literal("webchat-visibility"),visibility:ae.z.union([ae.z.literal("show"),ae.z.literal("hide"),ae.z.literal("toggle")])}),D_=ae.z.object({type:ae.z.literal("webchat-config"),config:ae.z.record(ae.z.any())}),L_=ae.z.object({type:ae.z.literal("custom-event"),event:ae.z.record(ae.z.any())}),F_=ae.z.union([j_,D_,L_]),EB=ae.z.object({type:ae.z.literal("trigger"),trigger:F_}),q_=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:T_,cardSchema:Pm,carouselSchame:$_,customEventSchema:L_,dropdownSchema:O_,fileSchema:C_,imageSchema:A_,locationSchema:I_,messageSchema:Ed,messageSignalSchema:Ed,quickReplySchema:M_,singleChoiceSchema:R_,textSchema:P_,triggerSchema:F_,triggerSignalSchema:EB,videoSchema:N_,webchatConfigSchema:D_,webchatVisibilitySchema:j_},Symbol.toStringTag,{value:"Module"})),B_=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(kB)}),kB=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},U_=e=>({...e,type:"audio",audio:e.audioUrl}),z_=e=>B_(e),Z_=e=>({...e,type:"carousel",items:e.items.map(B_)}),V_=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),H_=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),W_=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),K_=e=>({...e,type:"image",image:e.imageUrl}),G_=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),J_=e=>({...e,type:"text",text:e.markdown,markdown:!0}),Y_=e=>({...e,type:"text",text:e.text,markdown:!0}),X_=e=>({...e,type:"video",video:e.videoUrl}),TB=e=>{switch(e.type){case"audio":return U_(e);case"card":return z_(e);case"carousel":return Z_(e);case"choice":return V_(e);case"dropdown":return H_(e);case"file":return W_(e);case"image":return K_(e);case"location":return G_(e);case"markdown":return J_(e);case"text":return Y_(e);case"video":return X_(e);default:throw new Error("Unsuported message type")}},Q_=e=>({type:"webchat-visibility",visibility:e.data.visibility}),eE=e=>({type:"webchat-config",config:e.data.config}),tE=e=>({type:"custom-event",event:e.data.event}),rE=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:U_,cardAdapter:z_,carouselAdapter:Z_,choiceAdapter:V_,customAdapter:tE,dropdownAdapter:H_,fileAdapter:W_,imageAdapter:K_,locationAdapter:G_,markdownAdapter:J_,messageAdapter:TB,textAdapter:Y_,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return Q_(e);case"webchat_config":return eE(e);case"custom":return tE(e);default:throw new Error("unknown trigger type")}},videoAdapter:X_,webchatConfigAdapter:eE,webchatVisibilityAdapter:Q_},Symbol.toStringTag,{value:"Module"})),nE=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map($B)}),$B=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},OB=e=>({...e,type:"audio",audioUrl:e.audio}),CB=e=>nE(e),AB=e=>({...e,type:"carousel",items:e.items.map(nE)}),IB=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),RB=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),PB=e=>({...e,type:"image",imageUrl:e.image}),NB=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),MB=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),jB=e=>({...e,type:"text",text:e.text}),DB=e=>({...e,type:"video",videoUrl:e.video}),LB=e=>({...e,type:"text",text:e.text??e.payload}),oE=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return OB(e);case"card":return CB(e);case"carousel":return AB(e);case"dropdown":return IB(e);case"file":return RB(e);case"image":return PB(e);case"location":return NB(e);case"single-choice":return MB(e);case"text":return jB(e);case"video":return DB(e);case"quick_reply":return LB(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),FB=Object.freeze(Object.defineProperty({__proto__:null,messaging:q_,messagingToWebChat:oE,webchat:k_,webchatToMessaging:rE},Symbol.toStringTag,{value:"Module"})),qB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let kd;const BB=new Uint8Array(16);function UB(){if(!kd&&(kd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kd(BB)}const Dr=[];for(let e=0;e<256;++e)Dr.push((e+256).toString(16).slice(1));function zB(e,t=0){return Dr[e[t+0]]+Dr[e[t+1]]+Dr[e[t+2]]+Dr[e[t+3]]+"-"+Dr[e[t+4]]+Dr[e[t+5]]+"-"+Dr[e[t+6]]+Dr[e[t+7]]+"-"+Dr[e[t+8]]+Dr[e[t+9]]+"-"+Dr[e[t+10]]+Dr[e[t+11]]+Dr[e[t+12]]+Dr[e[t+13]]+Dr[e[t+14]]+Dr[e[t+15]]}const iE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Td(e,t,r){if(iE.randomUUID&&!t&&!e)return iE.randomUUID();e=e||{};const n=e.random||(e.rng||UB)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return zB(n)}const $d=e=>({block:e,type:"bubble"}),ZB=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},aE=({title:e,image:t,actions:r,subtitle:n})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),n&&o.push({type:"text",text:n}),r.length>0&&o.push({type:"row",blocks:r.map(ZB)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},VB=({choices:e,text:t})=>{const r=Td(),n=$d({type:"text",text:t});return e.length===0?n:{type:"column",horizontalAlignment:"left",blocks:[n,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:r}))}]}},HB=({options:e,text:t})=>{const r=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&r.unshift({type:"text",text:t}),{type:"column",blocks:r}},Nm=({type:e,audio:t})=>({payload:{type:e,url:t}}),Mm=e=>({payload:$d(aE(e))}),jm=({items:e})=>({payload:{type:"carousel",blocks:e.map(aE)}}),Dm=e=>({disableInput:e.disableFreeText,payload:VB(e)}),Lm=e=>({disableInput:!0,payload:$d(HB(e))}),Fm=({file:e,...t})=>({payload:{url:e,...t}}),qm=({type:e,image:t})=>({payload:{type:e,url:t}}),Bm=({type:e,latitude:t,longitude:r,title:n,address:o})=>({payload:{type:e,latitude:t,longitude:r,title:n??o??"View on map"}}),sE=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Od=({type:e,text:t})=>({payload:$d({type:e,text:t})}),Um=({type:e,video:t})=>({payload:{type:e,url:t}}),zm=e=>{switch(e.type){case"audio":return Nm(e);case"card":return Mm(e);case"carousel":return jm(e);case"single-choice":return Dm(e);case"dropdown":return Lm(e);case"file":return Fm(e);case"image":return qm(e);case"location":return Bm(e);case"quick_reply":return sE(e);case"text":return Od(e);case"video":return Um(e);default:throw new Error("Unsuported message type")}},WB=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Nm,cardAdapter:Mm,carouselAdapter:jm,choiceAdapter:Dm,dropdownAdapter:Lm,fileAdapter:Fm,imageAdapter:qm,locationAdapter:Bm,messageAdapter:zm,quickReplyAdapter:sE,textAdapter:Od,videoAdapter:Um},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:Zn}=FB,cE=e=>{const t=Zn.audioAdapter(e);return Nm(t)},lE=e=>{const t=Zn.cardAdapter(e);return Mm(t)},uE=e=>{const t=Zn.carouselAdapter(e);return jm(t)},dE=e=>{const t=Zn.choiceAdapter(e);return Dm(t)},fE=e=>{const t=Zn.dropdownAdapter(e);return Lm(t)},pE=e=>{const t=Zn.fileAdapter(e);return Fm(t)},hE=e=>{const t=Zn.imageAdapter(e);return qm(t)},mE=e=>{const t=Zn.locationAdapter(e);return Bm(t)},yE=e=>{const t=Zn.markdownAdapter(e);return Od(t)},gE=e=>{const t=Zn.textAdapter(e);return Od(t)},vE=e=>{const t=Zn.videoAdapter(e);return Um(t)},bE=e=>{switch(e.type){case"audio":return cE(e);case"card":return lE(e);case"carousel":return uE(e);case"choice":return dE(e);case"dropdown":return fE(e);case"file":return pE(e);case"image":return hE(e);case"location":return mE(e);case"markdown":return yE(e);case"text":return gE(e);case"video":return vE(e);default:throw new Error("Unsuported message type")}},KB=Object.freeze(Object.defineProperty({__proto__:null,messaging:q_,messagingToTarget:WB,messagingToWebChat:oE,target:qB,webchat:k_,webchatToMessaging:rE,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:cE,cardAdapter:lE,carouselAdapter:uE,choiceAdapter:dE,dropdownAdapter:fE,fileAdapter:pE,imageAdapter:hE,locationAdapter:mE,markdownAdapter:yE,messageAdapter:bE,textAdapter:gE,videoAdapter:vE},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Zm={exports:{}},hc={};/**
74
+ `+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Ui(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&wm.assertOptions(n,{silentJSONParsing:oi.transitional(oi.boolean),forcedJSONParsing:oi.transitional(oi.boolean),clarifyTimeoutError:oi.transitional(oi.boolean)},!1),o!=null&&(oe.isFunction(o)?r.paramsSerializer={serialize:o}:wm.assertOptions(o,{encode:oi.function,serialize:oi.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&oe.merge(i.common,i[r.method]);i&&oe.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Un.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,p;if(!c){const h=[k1.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(r);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=r;for(d=0;d<p;){const h=s[d++],y=s[d++];try{f=h(f)}catch(m){y.call(this,m);break}}try{u=k1.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=Ui(this.defaults,t);const r=y1(t.baseURL,t.url);return l1(r,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){gd.prototype[t]=function(r,n){return this.request(Ui(n||{},{method:t,url:r,data:(n||{}).data}))}}),oe.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(Ui(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}gd.prototype[t]=r(),gd.prototype[t+"Form"]=r(!0)});const vd=gd,_L=class Qj{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new Ma(i,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new Qj(function(o){t=o}),cancel:t}}};function EL(e){return function(r){return e.apply(null,r)}}function kL(e){return oe.isObject(e)&&e.isAxiosError===!0}const xm={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(xm).forEach(([e,t])=>{xm[t]=e});const TL=xm;function O1(e){const t=new vd(e),r=WS(vd.prototype.request,t);return oe.extend(r,vd.prototype,t,{allOwnKeys:!0}),oe.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return O1(Ui(e,o))},r}const dr=O1(fm);dr.Axios=vd,dr.CanceledError=Ma,dr.CancelToken=_L,dr.isCancel=h1,dr.VERSION=T1,dr.toFormData=dd,dr.AxiosError=ut,dr.Cancel=dr.CanceledError,dr.all=function(t){return Promise.all(t)},dr.spread=EL,dr.isAxiosError=kL,dr.mergeConfig=Ui,dr.AxiosHeaders=Un,dr.formToJSON=e=>f1(oe.isHTMLForm(e)?new FormData(e):e),dr.getAdapter=E1.getAdapter,dr.HttpStatusCode=TL,dr.default=dr;const ja=dr,{Axios:$L,AxiosError:OL,CanceledError:CL,isCancel:AL,CancelToken:IL,VERSION:RL,all:PL,Cancel:NL,isAxiosError:ML,spread:jL,toFormData:DL,AxiosHeaders:LL,HttpStatusCode:FL,formToJSON:qL,getAdapter:BL,mergeConfig:UL}=ja,zL=Object.freeze(Object.defineProperty({__proto__:null,Axios:$L,AxiosError:OL,AxiosHeaders:LL,Cancel:NL,CancelToken:IL,CanceledError:CL,HttpStatusCode:FL,VERSION:RL,all:PL,default:ja,formToJSON:qL,getAdapter:BL,isAxiosError:ML,isCancel:AL,mergeConfig:UL,spread:jL,toFormData:DL},Symbol.toStringTag,{value:"Module"}));var Da={};Object.defineProperty(Da,"__esModule",{value:!0});var ZL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},VL=typeof window<"u"&&typeof window.document<"u",HL=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,WL=(typeof self>"u"?"undefined":ZL(self))==="object"&&self.constructor&&self.constructor.name==="DedicatedWorkerGlobalScope",KL=typeof window<"u"&&window.name==="nodejs"||typeof navigator<"u"&&(navigator.userAgent.includes("Node.js")||navigator.userAgent.includes("jsdom")),GL=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",C1=Da.isBrowser=VL;Da.isWebWorker=WL;var Sm=Da.isNode=HL;Da.isJsDom=KL,Da.isDeno=GL;var JL=Object.create,_m=Object.defineProperty,YL=Object.getOwnPropertyDescriptor,XL=Object.getOwnPropertyNames,QL=Object.getPrototypeOf,eF=Object.prototype.hasOwnProperty,fr=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),tF=(e,t)=>{for(var r in t)_m(e,r,{get:t[r],enumerable:!0})},rF=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of XL(t))!eF.call(e,o)&&o!==r&&_m(e,o,{get:()=>t[o],enumerable:!(n=YL(t,o))||n.enumerable});return e},bd=(e,t,r)=>(r=e!=null?JL(QL(e)):{},rF(t||!e||!e.__esModule?_m(r,"default",{value:e,enumerable:!0}):r,e)),nF=fr((e,t)=>{var r=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);t.exports=n=>!r.has(n&&n.code)}),oF=fr(()=>{}),iF=fr(()=>{}),aF=fr((e,t)=>{t.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var r={},n=Symbol("test"),o=Object(n);if(typeof n=="string"||Object.prototype.toString.call(n)!=="[object Symbol]"||Object.prototype.toString.call(o)!=="[object Symbol]")return!1;var i=42;r[n]=i;for(n in r)return!1;if(typeof Object.keys=="function"&&Object.keys(r).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(r).length!==0)return!1;var a=Object.getOwnPropertySymbols(r);if(a.length!==1||a[0]!==n||!Object.prototype.propertyIsEnumerable.call(r,n))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(r,n);if(s.value!==i||s.enumerable!==!0)return!1}return!0}}),sF=fr((e,t)=>{var r=typeof Symbol<"u"&&Symbol,n=aF();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),cF=fr((e,t)=>{var r={foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof n)}}),lF=fr((e,t)=>{var r="Function.prototype.bind called on incompatible ",n=Array.prototype.slice,o=Object.prototype.toString,i="[object Function]";t.exports=function(a){var s=this;if(typeof s!="function"||o.call(s)!==i)throw new TypeError(r+s);for(var c=n.call(arguments,1),l,u=function(){if(this instanceof l){var y=s.apply(this,c.concat(n.call(arguments)));return Object(y)===y?y:this}else return s.apply(a,c.concat(n.call(arguments)))},d=Math.max(0,s.length-c.length),p=[],f=0;f<d;f++)p.push("$"+f);if(l=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(u),s.prototype){var h=function(){};h.prototype=s.prototype,l.prototype=new h,h.prototype=null}return l}}),Em=fr((e,t)=>{var r=lF();t.exports=Function.prototype.bind||r}),uF=fr((e,t)=>{var r=Em();t.exports=r.call(Function.call,Object.prototype.hasOwnProperty)}),km=fr((e,t)=>{var r,n=SyntaxError,o=Function,i=TypeError,a=function(B){try{return o('"use strict"; return ('+B+").constructor;")()}catch{}},s=Object.getOwnPropertyDescriptor;if(s)try{s({},"")}catch{s=null}var c=function(){throw new i},l=s?function(){try{return arguments.callee,c}catch{try{return s(arguments,"callee").get}catch{return c}}}():c,u=sF()(),d=cF()(),p=Object.getPrototypeOf||(d?function(B){return B.__proto__}:null),f={},h=typeof Uint8Array>"u"||!p?r:p(Uint8Array),y={"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":u&&p?p([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":f,"%AsyncGenerator%":f,"%AsyncGeneratorFunction%":f,"%AsyncIteratorPrototype%":f,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":f,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":u&&p?p(p([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!u||!p?r:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!u||!p?r:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":u&&p?p(""[Symbol.iterator]()):r,"%Symbol%":u?Symbol:r,"%SyntaxError%":n,"%ThrowTypeError%":l,"%TypedArray%":h,"%TypeError%":i,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(p)try{null.error}catch(B){m=p(p(B)),y["%Error.prototype%"]=m}var m,g=function B(F){var j;if(F==="%AsyncFunction%")j=a("async function () {}");else if(F==="%GeneratorFunction%")j=a("function* () {}");else if(F==="%AsyncGeneratorFunction%")j=a("async function* () {}");else if(F==="%AsyncGenerator%"){var Z=B("%AsyncGeneratorFunction%");Z&&(j=Z.prototype)}else if(F==="%AsyncIteratorPrototype%"){var W=B("%AsyncGenerator%");W&&p&&(j=p(W.prototype))}return y[F]=j,j},v={"%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"]},b=Em(),x=uF(),w=b.call(Function.call,Array.prototype.concat),S=b.call(Function.apply,Array.prototype.splice),C=b.call(Function.call,String.prototype.replace),I=b.call(Function.call,String.prototype.slice),P=b.call(Function.call,RegExp.prototype.exec),A=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,L=/\\(\\)?/g,K=function(B){var F=I(B,0,1),j=I(B,-1);if(F==="%"&&j!=="%")throw new n("invalid intrinsic syntax, expected closing `%`");if(j==="%"&&F!=="%")throw new n("invalid intrinsic syntax, expected opening `%`");var Z=[];return C(B,A,function(W,D,E,H){Z[Z.length]=E?C(H,L,"$1"):D||W}),Z},z=function(B,F){var j=B,Z;if(x(v,j)&&(Z=v[j],j="%"+Z[0]+"%"),x(y,j)){var W=y[j];if(W===f&&(W=g(j)),typeof W>"u"&&!F)throw new i("intrinsic "+B+" exists, but is not available. Please file an issue!");return{alias:Z,name:j,value:W}}throw new n("intrinsic "+B+" does not exist!")};t.exports=function(B,F){if(typeof B!="string"||B.length===0)throw new i("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof F!="boolean")throw new i('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,B)===null)throw new n("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var j=K(B),Z=j.length>0?j[0]:"",W=z("%"+Z+"%",F),D=W.name,E=W.value,H=!1,Q=W.alias;Q&&(Z=Q[0],S(j,w([0,1],Q)));for(var T=1,ce=!0;T<j.length;T+=1){var pe=j[T],fe=I(pe,0,1),ve=I(pe,-1);if((fe==='"'||fe==="'"||fe==="`"||ve==='"'||ve==="'"||ve==="`")&&fe!==ve)throw new n("property names with quotes must have matching quotes");if((pe==="constructor"||!ce)&&(H=!0),Z+="."+pe,D="%"+Z+"%",x(y,D))E=y[D];else if(E!=null){if(!(pe in E)){if(!F)throw new i("base intrinsic for "+B+" exists, but the property is not available.");return}if(s&&T+1>=j.length){var _e=s(E,pe);ce=!!_e,ce&&"get"in _e&&!("originalValue"in _e.get)?E=_e.get:E=E[pe]}else ce=x(E,pe),E=E[pe];ce&&!H&&(y[D]=E)}}return E}}),dF=fr((e,t)=>{var r=Em(),n=km(),o=n("%Function.prototype.apply%"),i=n("%Function.prototype.call%"),a=n("%Reflect.apply%",!0)||r.call(i,o),s=n("%Object.getOwnPropertyDescriptor%",!0),c=n("%Object.defineProperty%",!0),l=n("%Math.max%");if(c)try{c({},"a",{value:1})}catch{c=null}t.exports=function(d){var p=a(r,i,arguments);if(s&&c){var f=s(p,"length");f.configurable&&c(p,"length",{value:1+l(0,d.length-(arguments.length-1))})}return p};var u=function(){return a(r,o,arguments)};c?c(t.exports,"apply",{value:u}):t.exports.apply=u}),fF=fr((e,t)=>{var r=km(),n=dF(),o=n(r("String.prototype.indexOf"));t.exports=function(i,a){var s=r(i,!!a);return typeof s=="function"&&o(i,".prototype.")>-1?n(s):s}}),pF=fr(()=>{}),hF=fr((e,t)=>{var r=typeof Map=="function"&&Map.prototype,n=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&n&&typeof n.get=="function"?n.get:null,i=r&&Map.prototype.forEach,a=typeof Set=="function"&&Set.prototype,s=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,c=a&&s&&typeof s.get=="function"?s.get:null,l=a&&Set.prototype.forEach,u=typeof WeakMap=="function"&&WeakMap.prototype,d=u?WeakMap.prototype.has:null,p=typeof WeakSet=="function"&&WeakSet.prototype,f=p?WeakSet.prototype.has:null,h=typeof WeakRef=="function"&&WeakRef.prototype,y=h?WeakRef.prototype.deref:null,m=Boolean.prototype.valueOf,g=Object.prototype.toString,v=Function.prototype.toString,b=String.prototype.match,x=String.prototype.slice,w=String.prototype.replace,S=String.prototype.toUpperCase,C=String.prototype.toLowerCase,I=RegExp.prototype.test,P=Array.prototype.concat,A=Array.prototype.join,L=Array.prototype.slice,K=Math.floor,z=typeof BigInt=="function"?BigInt.prototype.valueOf:null,B=Object.getOwnPropertySymbols,F=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,j=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Z=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===j||"symbol")?Symbol.toStringTag:null,W=Object.prototype.propertyIsEnumerable,D=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(U){return U.__proto__}:null);function E(U,X){if(U===1/0||U===-1/0||U!==U||U&&U>-1e3&&U<1e3||I.call(/e/,X))return X;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof U=="number"){var Ge=U<0?-K(-U):K(U);if(Ge!==U){var gt=String(Ge),Je=x.call(X,gt.length+1);return w.call(gt,ze,"$&_")+"."+w.call(w.call(Je,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(X,ze,"$&_")}var H=pF(),Q=H.custom,T=we(Q)?Q:null;t.exports=function U(X,ze,Ge,gt){var Je=ze||{};if(q(Je,"quoteStyle")&&Je.quoteStyle!=="single"&&Je.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(q(Je,"maxStringLength")&&(typeof Je.maxStringLength=="number"?Je.maxStringLength<0&&Je.maxStringLength!==1/0:Je.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var ir=q(Je,"customInspect")?Je.customInspect:!0;if(typeof ir!="boolean"&&ir!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(q(Je,"indent")&&Je.indent!==null&&Je.indent!==" "&&!(parseInt(Je.indent,10)===Je.indent&&Je.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(q(Je,"numericSeparator")&&typeof Je.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var kr=Je.numericSeparator;if(typeof X>"u")return"undefined";if(X===null)return"null";if(typeof X=="boolean")return X?"true":"false";if(typeof X=="string")return se(X,Je);if(typeof X=="number"){if(X===0)return 1/0/X>0?"0":"-0";var Kt=String(X);return kr?E(X,Kt):Kt}if(typeof X=="bigint"){var ar=String(X)+"n";return kr?E(X,ar):ar}var sn=typeof Je.depth>"u"?5:Je.depth;if(typeof Ge>"u"&&(Ge=0),Ge>=sn&&sn>0&&typeof X=="object")return fe(X)?"[Array]":"[Object]";var vt=ct(Je,Ge);if(typeof gt>"u")gt=[];else if(me(gt,X)>=0)return"[Circular]";function bt(at,cr,Xt){if(cr&&(gt=L.call(gt),gt.push(cr)),Xt){var Qt={depth:Je.depth};return q(Je,"quoteStyle")&&(Qt.quoteStyle=Je.quoteStyle),U(at,Qt,Ge+1,gt)}return U(at,Je,Ge+1,gt)}if(typeof X=="function"&&!_e(X)){var Yt=he(X),Gt=Wt(X,bt);return"[Function"+(Yt?": "+Yt:" (anonymous)")+"]"+(Gt.length>0?" { "+A.call(Gt,", ")+" }":"")}if(we(X)){var sr=j?w.call(String(X),/^(Symbol\(.*\))_[^)]*$/,"$1"):F.call(X);return typeof X=="object"&&!j?ye(sr):sr}if(G(X)){for(var Ut="<"+C.call(String(X.nodeName)),Ir=X.attributes||[],Rr=0;Rr<Ir.length;Rr++)Ut+=" "+Ir[Rr].name+"="+ce(pe(Ir[Rr].value),"double",Je);return Ut+=">",X.childNodes&&X.childNodes.length&&(Ut+="..."),Ut+="</"+C.call(String(X.nodeName))+">",Ut}if(fe(X)){if(X.length===0)return"[]";var tn=Wt(X,bt);return vt&&!Ve(tn)?"["+$t(tn,vt)+"]":"[ "+A.call(tn,", ")+" ]"}if(Ce(X)){var wa=Wt(X,bt);return!("cause"in Error.prototype)&&"cause"in X&&!W.call(X,"cause")?"{ ["+String(X)+"] "+A.call(P.call("[cause]: "+bt(X.cause),wa),", ")+" }":wa.length===0?"["+String(X)+"]":"{ ["+String(X)+"] "+A.call(wa,", ")+" }"}if(typeof X=="object"&&ir){if(T&&typeof X[T]=="function"&&H)return H(X,{depth:sn-Ge});if(ir!=="symbol"&&typeof X.inspect=="function")return X.inspect()}if(je(X)){var xa=[];return i&&i.call(X,function(at,cr){xa.push(bt(cr,X,!0)+" => "+bt(at,X))}),tt("Map",o.call(X),xa,vt)}if(pt(X)){var M=[];return l&&l.call(X,function(at){M.push(bt(at,X))}),tt("Set",c.call(X),M,vt)}if(Ie(X))return $e("WeakMap");if(Ke(X))return $e("WeakSet");if(Ue(X))return $e("WeakRef");if(de(X))return ye(bt(Number(X)));if(Ae(X))return ye(bt(z.call(X)));if(te(X))return ye(m.call(X));if(be(X))return ye(bt(String(X)));if(!ve(X)&&!_e(X)){var ge=Wt(X,bt),ke=D?D(X)===Object.prototype:X instanceof Object||X.constructor===Object,Ze=X instanceof Object?"":"null prototype",kt=!ke&&Z&&Object(X)===X&&Z in X?x.call(le(X),8,-1):Ze?"Object":"",Ot=ke||typeof X.constructor!="function"?"":X.constructor.name?X.constructor.name+" ":"",ht=Ot+(kt||Ze?"["+A.call(P.call([],kt||[],Ze||[]),": ")+"] ":"");return ge.length===0?ht+"{}":vt?ht+"{"+$t(ge,vt)+"}":ht+"{ "+A.call(ge,", ")+" }"}return String(X)};function ce(U,X,ze){var Ge=(ze.quoteStyle||X)==="double"?'"':"'";return Ge+U+Ge}function pe(U){return w.call(String(U),/"/g,"&quot;")}function fe(U){return le(U)==="[object Array]"&&(!Z||!(typeof U=="object"&&Z in U))}function ve(U){return le(U)==="[object Date]"&&(!Z||!(typeof U=="object"&&Z in U))}function _e(U){return le(U)==="[object RegExp]"&&(!Z||!(typeof U=="object"&&Z in U))}function Ce(U){return le(U)==="[object Error]"&&(!Z||!(typeof U=="object"&&Z in U))}function be(U){return le(U)==="[object String]"&&(!Z||!(typeof U=="object"&&Z in U))}function de(U){return le(U)==="[object Number]"&&(!Z||!(typeof U=="object"&&Z in U))}function te(U){return le(U)==="[object Boolean]"&&(!Z||!(typeof U=="object"&&Z in U))}function we(U){if(j)return U&&typeof U=="object"&&U instanceof Symbol;if(typeof U=="symbol")return!0;if(!U||typeof U!="object"||!F)return!1;try{return F.call(U),!0}catch{}return!1}function Ae(U){if(!U||typeof U!="object"||!z)return!1;try{return z.call(U),!0}catch{}return!1}var qe=Object.prototype.hasOwnProperty||function(U){return U in this};function q(U,X){return qe.call(U,X)}function le(U){return g.call(U)}function he(U){if(U.name)return U.name;var X=b.call(v.call(U),/^function\s*([\w$]+)/);return X?X[1]:null}function me(U,X){if(U.indexOf)return U.indexOf(X);for(var ze=0,Ge=U.length;ze<Ge;ze++)if(U[ze]===X)return ze;return-1}function je(U){if(!o||!U||typeof U!="object")return!1;try{o.call(U);try{c.call(U)}catch{return!0}return U instanceof Map}catch{}return!1}function Ie(U){if(!d||!U||typeof U!="object")return!1;try{d.call(U,d);try{f.call(U,f)}catch{return!0}return U instanceof WeakMap}catch{}return!1}function Ue(U){if(!y||!U||typeof U!="object")return!1;try{return y.call(U),!0}catch{}return!1}function pt(U){if(!c||!U||typeof U!="object")return!1;try{c.call(U);try{o.call(U)}catch{return!0}return U instanceof Set}catch{}return!1}function Ke(U){if(!f||!U||typeof U!="object")return!1;try{f.call(U,f);try{d.call(U,d)}catch{return!0}return U instanceof WeakSet}catch{}return!1}function G(U){return!U||typeof U!="object"?!1:typeof HTMLElement<"u"&&U instanceof HTMLElement?!0:typeof U.nodeName=="string"&&typeof U.getAttribute=="function"}function se(U,X){if(U.length>X.maxStringLength){var ze=U.length-X.maxStringLength,Ge="... "+ze+" more character"+(ze>1?"s":"");return se(x.call(U,0,X.maxStringLength),X)+Ge}var gt=w.call(w.call(U,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y);return ce(gt,"single",X)}function Y(U){var X=U.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[X];return ze?"\\"+ze:"\\x"+(X<16?"0":"")+S.call(X.toString(16))}function ye(U){return"Object("+U+")"}function $e(U){return U+" { ? }"}function tt(U,X,ze,Ge){var gt=Ge?$t(ze,Ge):A.call(ze,", ");return U+" ("+X+") {"+gt+"}"}function Ve(U){for(var X=0;X<U.length;X++)if(me(U[X],`
75
+ `)>=0)return!1;return!0}function ct(U,X){var ze;if(U.indent===" ")ze=" ";else if(typeof U.indent=="number"&&U.indent>0)ze=A.call(Array(U.indent+1)," ");else return null;return{base:ze,prev:A.call(Array(X+1),ze)}}function $t(U,X){if(U.length===0)return"";var ze=`
76
+ `+X.prev+X.base;return ze+A.call(U,","+ze)+`
77
+ `+X.prev}function Wt(U,X){var ze=fe(U),Ge=[];if(ze){Ge.length=U.length;for(var gt=0;gt<U.length;gt++)Ge[gt]=q(U,gt)?X(U[gt],U):""}var Je=typeof B=="function"?B(U):[],ir;if(j){ir={};for(var kr=0;kr<Je.length;kr++)ir["$"+Je[kr]]=Je[kr]}for(var Kt in U)q(U,Kt)&&(ze&&String(Number(Kt))===Kt&&Kt<U.length||j&&ir["$"+Kt]instanceof Symbol||(I.call(/[^\w$]/,Kt)?Ge.push(X(Kt,U)+": "+X(U[Kt],U)):Ge.push(Kt+": "+X(U[Kt],U))));if(typeof B=="function")for(var ar=0;ar<Je.length;ar++)W.call(U,Je[ar])&&Ge.push("["+X(Je[ar])+"]: "+X(U[Je[ar]],U));return Ge}}),mF=fr((e,t)=>{var r=km(),n=fF(),o=hF(),i=r("%TypeError%"),a=r("%WeakMap%",!0),s=r("%Map%",!0),c=n("WeakMap.prototype.get",!0),l=n("WeakMap.prototype.set",!0),u=n("WeakMap.prototype.has",!0),d=n("Map.prototype.get",!0),p=n("Map.prototype.set",!0),f=n("Map.prototype.has",!0),h=function(v,b){for(var x=v,w;(w=x.next)!==null;x=w)if(w.key===b)return x.next=w.next,w.next=v.next,v.next=w,w},y=function(v,b){var x=h(v,b);return x&&x.value},m=function(v,b,x){var w=h(v,b);w?w.value=x:v.next={key:b,next:v.next,value:x}},g=function(v,b){return!!h(v,b)};t.exports=function(){var v,b,x,w={assert:function(S){if(!w.has(S))throw new i("Side channel does not contain "+o(S))},get:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(v)return c(v,S)}else if(s){if(b)return d(b,S)}else if(x)return y(x,S)},has:function(S){if(a&&S&&(typeof S=="object"||typeof S=="function")){if(v)return u(v,S)}else if(s){if(b)return f(b,S)}else if(x)return g(x,S);return!1},set:function(S,C){a&&S&&(typeof S=="object"||typeof S=="function")?(v||(v=new a),l(v,S,C)):s?(b||(b=new s),p(b,S,C)):(x||(x={key:{},next:null}),m(x,S,C))}};return w}}),Tm=fr((e,t)=>{var r=String.prototype.replace,n=/%20/g,o={RFC1738:"RFC1738",RFC3986:"RFC3986"};t.exports={default:o.RFC3986,formatters:{RFC1738:function(i){return r.call(i,n,"+")},RFC3986:function(i){return String(i)}},RFC1738:o.RFC1738,RFC3986:o.RFC3986}}),A1=fr((e,t)=>{var r=Tm(),n=Object.prototype.hasOwnProperty,o=Array.isArray,i=function(){for(var g=[],v=0;v<256;++v)g.push("%"+((v<16?"0":"")+v.toString(16)).toUpperCase());return g}(),a=function(g){for(;g.length>1;){var v=g.pop(),b=v.obj[v.prop];if(o(b)){for(var x=[],w=0;w<b.length;++w)typeof b[w]<"u"&&x.push(b[w]);v.obj[v.prop]=x}}},s=function(g,v){for(var b=v&&v.plainObjects?Object.create(null):{},x=0;x<g.length;++x)typeof g[x]<"u"&&(b[x]=g[x]);return b},c=function g(v,b,x){if(!b)return v;if(typeof b!="object"){if(o(v))v.push(b);else if(v&&typeof v=="object")(x&&(x.plainObjects||x.allowPrototypes)||!n.call(Object.prototype,b))&&(v[b]=!0);else return[v,b];return v}if(!v||typeof v!="object")return[v].concat(b);var w=v;return o(v)&&!o(b)&&(w=s(v,x)),o(v)&&o(b)?(b.forEach(function(S,C){if(n.call(v,C)){var I=v[C];I&&typeof I=="object"&&S&&typeof S=="object"?v[C]=g(I,S,x):v.push(S)}else v[C]=S}),v):Object.keys(b).reduce(function(S,C){var I=b[C];return n.call(S,C)?S[C]=g(S[C],I,x):S[C]=I,S},w)},l=function(g,v){return Object.keys(v).reduce(function(b,x){return b[x]=v[x],b},g)},u=function(g,v,b){var x=g.replace(/\+/g," ");if(b==="iso-8859-1")return x.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(x)}catch{return x}},d=function(g,v,b,x,w){if(g.length===0)return g;var S=g;if(typeof g=="symbol"?S=Symbol.prototype.toString.call(g):typeof g!="string"&&(S=String(g)),b==="iso-8859-1")return escape(S).replace(/%u[0-9a-f]{4}/gi,function(A){return"%26%23"+parseInt(A.slice(2),16)+"%3B"});for(var C="",I=0;I<S.length;++I){var P=S.charCodeAt(I);if(P===45||P===46||P===95||P===126||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122||w===r.RFC1738&&(P===40||P===41)){C+=S.charAt(I);continue}if(P<128){C=C+i[P];continue}if(P<2048){C=C+(i[192|P>>6]+i[128|P&63]);continue}if(P<55296||P>=57344){C=C+(i[224|P>>12]+i[128|P>>6&63]+i[128|P&63]);continue}I+=1,P=65536+((P&1023)<<10|S.charCodeAt(I)&1023),C+=i[240|P>>18]+i[128|P>>12&63]+i[128|P>>6&63]+i[128|P&63]}return C},p=function(g){for(var v=[{obj:{o:g},prop:"o"}],b=[],x=0;x<v.length;++x)for(var w=v[x],S=w.obj[w.prop],C=Object.keys(S),I=0;I<C.length;++I){var P=C[I],A=S[P];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:S,prop:P}),b.push(A))}return a(v),g},f=function(g){return Object.prototype.toString.call(g)==="[object RegExp]"},h=function(g){return!g||typeof g!="object"?!1:!!(g.constructor&&g.constructor.isBuffer&&g.constructor.isBuffer(g))},y=function(g,v){return[].concat(g,v)},m=function(g,v){if(o(g)){for(var b=[],x=0;x<g.length;x+=1)b.push(v(g[x]));return b}return v(g)};t.exports={arrayToObject:s,assign:l,combine:y,compact:p,decode:u,encode:d,isBuffer:h,isRegExp:f,maybeMap:m,merge:c}}),yF=fr((e,t)=>{var r=mF(),n=A1(),o=Tm(),i=Object.prototype.hasOwnProperty,a={brackets:function(v){return v+"[]"},comma:"comma",indices:function(v,b){return v+"["+b+"]"},repeat:function(v){return v}},s=Array.isArray,c=String.prototype.split,l=Array.prototype.push,u=function(v,b){l.apply(v,s(b)?b:[b])},d=Date.prototype.toISOString,p=o.default,f={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:n.encode,encodeValuesOnly:!1,format:p,formatter:o.formatters[p],indices:!1,serializeDate:function(v){return d.call(v)},skipNulls:!1,strictNullHandling:!1},h=function(v){return typeof v=="string"||typeof v=="number"||typeof v=="boolean"||typeof v=="symbol"||typeof v=="bigint"},y={},m=function v(b,x,w,S,C,I,P,A,L,K,z,B,F,j,Z,W){for(var D=b,E=W,H=0,Q=!1;(E=E.get(y))!==void 0&&!Q;){var T=E.get(b);if(H+=1,typeof T<"u"){if(T===H)throw new RangeError("Cyclic object value");Q=!0}typeof E.get(y)>"u"&&(H=0)}if(typeof A=="function"?D=A(x,D):D instanceof Date?D=z(D):w==="comma"&&s(D)&&(D=n.maybeMap(D,function(le){return le instanceof Date?z(le):le})),D===null){if(C)return P&&!j?P(x,f.encoder,Z,"key",B):x;D=""}if(h(D)||n.isBuffer(D)){if(P){var ce=j?x:P(x,f.encoder,Z,"key",B);if(w==="comma"&&j){for(var pe=c.call(String(D),","),fe="",ve=0;ve<pe.length;++ve)fe+=(ve===0?"":",")+F(P(pe[ve],f.encoder,Z,"value",B));return[F(ce)+(S&&s(D)&&pe.length===1?"[]":"")+"="+fe]}return[F(ce)+"="+F(P(D,f.encoder,Z,"value",B))]}return[F(x)+"="+F(String(D))]}var _e=[];if(typeof D>"u")return _e;var Ce;if(w==="comma"&&s(D))Ce=[{value:D.length>0?D.join(",")||null:void 0}];else if(s(A))Ce=A;else{var be=Object.keys(D);Ce=L?be.sort(L):be}for(var de=S&&s(D)&&D.length===1?x+"[]":x,te=0;te<Ce.length;++te){var we=Ce[te],Ae=typeof we=="object"&&typeof we.value<"u"?we.value:D[we];if(!(I&&Ae===null)){var qe=s(D)?typeof w=="function"?w(de,we):de:de+(K?"."+we:"["+we+"]");W.set(b,H);var q=r();q.set(y,W),u(_e,v(Ae,qe,w,S,C,I,P,A,L,K,z,B,F,j,Z,q))}}return _e},g=function(v){if(!v)return f;if(v.encoder!==null&&typeof v.encoder<"u"&&typeof v.encoder!="function")throw new TypeError("Encoder has to be a function.");var b=v.charset||f.charset;if(typeof v.charset<"u"&&v.charset!=="utf-8"&&v.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var x=o.default;if(typeof v.format<"u"){if(!i.call(o.formatters,v.format))throw new TypeError("Unknown format option provided.");x=v.format}var w=o.formatters[x],S=f.filter;return(typeof v.filter=="function"||s(v.filter))&&(S=v.filter),{addQueryPrefix:typeof v.addQueryPrefix=="boolean"?v.addQueryPrefix:f.addQueryPrefix,allowDots:typeof v.allowDots>"u"?f.allowDots:!!v.allowDots,charset:b,charsetSentinel:typeof v.charsetSentinel=="boolean"?v.charsetSentinel:f.charsetSentinel,delimiter:typeof v.delimiter>"u"?f.delimiter:v.delimiter,encode:typeof v.encode=="boolean"?v.encode:f.encode,encoder:typeof v.encoder=="function"?v.encoder:f.encoder,encodeValuesOnly:typeof v.encodeValuesOnly=="boolean"?v.encodeValuesOnly:f.encodeValuesOnly,filter:S,format:x,formatter:w,serializeDate:typeof v.serializeDate=="function"?v.serializeDate:f.serializeDate,skipNulls:typeof v.skipNulls=="boolean"?v.skipNulls:f.skipNulls,sort:typeof v.sort=="function"?v.sort:null,strictNullHandling:typeof v.strictNullHandling=="boolean"?v.strictNullHandling:f.strictNullHandling}};t.exports=function(v,b){var x=v,w=g(b),S,C;typeof w.filter=="function"?(C=w.filter,x=C("",x)):s(w.filter)&&(C=w.filter,S=C);var I=[];if(typeof x!="object"||x===null)return"";var P;b&&b.arrayFormat in a?P=b.arrayFormat:b&&"indices"in b?P=b.indices?"indices":"repeat":P="indices";var A=a[P];if(b&&"commaRoundTrip"in b&&typeof b.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var L=A==="comma"&&b&&b.commaRoundTrip;S||(S=Object.keys(x)),w.sort&&S.sort(w.sort);for(var K=r(),z=0;z<S.length;++z){var B=S[z];w.skipNulls&&x[B]===null||u(I,m(x[B],B,A,L,w.strictNullHandling,w.skipNulls,w.encode?w.encoder:null,w.filter,w.sort,w.allowDots,w.serializeDate,w.format,w.formatter,w.encodeValuesOnly,w.charset,K))}var F=I.join(w.delimiter),j=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?j+="utf8=%26%2310003%3B&":j+="utf8=%E2%9C%93&"),F.length>0?j+F:""}}),gF=fr((e,t)=>{var r=A1(),n=Object.prototype.hasOwnProperty,o=Array.isArray,i={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(h){return h.replace(/&#(\d+);/g,function(y,m){return String.fromCharCode(parseInt(m,10))})},s=function(h,y){return h&&typeof h=="string"&&y.comma&&h.indexOf(",")>-1?h.split(","):h},c="utf8=%26%2310003%3B",l="utf8=%E2%9C%93",u=function(h,y){var m={},g=y.ignoreQueryPrefix?h.replace(/^\?/,""):h,v=y.parameterLimit===1/0?void 0:y.parameterLimit,b=g.split(y.delimiter,v),x=-1,w,S=y.charset;if(y.charsetSentinel)for(w=0;w<b.length;++w)b[w].indexOf("utf8=")===0&&(b[w]===l?S="utf-8":b[w]===c&&(S="iso-8859-1"),x=w,w=b.length);for(w=0;w<b.length;++w)if(w!==x){var C=b[w],I=C.indexOf("]="),P=I===-1?C.indexOf("="):I+1,A,L;P===-1?(A=y.decoder(C,i.decoder,S,"key"),L=y.strictNullHandling?null:""):(A=y.decoder(C.slice(0,P),i.decoder,S,"key"),L=r.maybeMap(s(C.slice(P+1),y),function(K){return y.decoder(K,i.decoder,S,"value")})),L&&y.interpretNumericEntities&&S==="iso-8859-1"&&(L=a(L)),C.indexOf("[]=")>-1&&(L=o(L)?[L]:L),n.call(m,A)?m[A]=r.combine(m[A],L):m[A]=L}return m},d=function(h,y,m,g){for(var v=g?y:s(y,m),b=h.length-1;b>=0;--b){var x,w=h[b];if(w==="[]"&&m.parseArrays)x=[].concat(v);else{x=m.plainObjects?Object.create(null):{};var S=w.charAt(0)==="["&&w.charAt(w.length-1)==="]"?w.slice(1,-1):w,C=parseInt(S,10);!m.parseArrays&&S===""?x={0:v}:!isNaN(C)&&w!==S&&String(C)===S&&C>=0&&m.parseArrays&&C<=m.arrayLimit?(x=[],x[C]=v):S!=="__proto__"&&(x[S]=v)}v=x}return v},p=function(h,y,m,g){if(h){var v=m.allowDots?h.replace(/\.([^.[]+)/g,"[$1]"):h,b=/(\[[^[\]]*])/,x=/(\[[^[\]]*])/g,w=m.depth>0&&b.exec(v),S=w?v.slice(0,w.index):v,C=[];if(S){if(!m.plainObjects&&n.call(Object.prototype,S)&&!m.allowPrototypes)return;C.push(S)}for(var I=0;m.depth>0&&(w=x.exec(v))!==null&&I<m.depth;){if(I+=1,!m.plainObjects&&n.call(Object.prototype,w[1].slice(1,-1))&&!m.allowPrototypes)return;C.push(w[1])}return w&&C.push("["+v.slice(w.index)+"]"),d(C,y,m,g)}},f=function(h){if(!h)return i;if(h.decoder!==null&&h.decoder!==void 0&&typeof h.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof h.charset<"u"&&h.charset!=="utf-8"&&h.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var y=typeof h.charset>"u"?i.charset:h.charset;return{allowDots:typeof h.allowDots>"u"?i.allowDots:!!h.allowDots,allowPrototypes:typeof h.allowPrototypes=="boolean"?h.allowPrototypes:i.allowPrototypes,allowSparse:typeof h.allowSparse=="boolean"?h.allowSparse:i.allowSparse,arrayLimit:typeof h.arrayLimit=="number"?h.arrayLimit:i.arrayLimit,charset:y,charsetSentinel:typeof h.charsetSentinel=="boolean"?h.charsetSentinel:i.charsetSentinel,comma:typeof h.comma=="boolean"?h.comma:i.comma,decoder:typeof h.decoder=="function"?h.decoder:i.decoder,delimiter:typeof h.delimiter=="string"||r.isRegExp(h.delimiter)?h.delimiter:i.delimiter,depth:typeof h.depth=="number"||h.depth===!1?+h.depth:i.depth,ignoreQueryPrefix:h.ignoreQueryPrefix===!0,interpretNumericEntities:typeof h.interpretNumericEntities=="boolean"?h.interpretNumericEntities:i.interpretNumericEntities,parameterLimit:typeof h.parameterLimit=="number"?h.parameterLimit:i.parameterLimit,parseArrays:h.parseArrays!==!1,plainObjects:typeof h.plainObjects=="boolean"?h.plainObjects:i.plainObjects,strictNullHandling:typeof h.strictNullHandling=="boolean"?h.strictNullHandling:i.strictNullHandling}};t.exports=function(h,y){var m=f(y);if(h===""||h===null||typeof h>"u")return m.plainObjects?Object.create(null):{};for(var g=typeof h=="string"?u(h,m):h,v=m.plainObjects?Object.create(null):{},b=Object.keys(g),x=0;x<b.length;++x){var w=b[x],S=p(w,g[w],m,typeof h=="string");v=r.merge(v,S,m)}return m.allowSparse===!0?v:r.compact(v)}}),vF=fr((e,t)=>{var r=yF(),n=gF(),o=Tm();t.exports={formats:o,parse:n,stringify:r}}),I1={};tF(I1,{DEFAULT_OPTIONS:()=>j1,default:()=>L1,exponentialDelay:()=>N1,isIdempotentRequestError:()=>Om,isNetworkError:()=>$m,isNetworkOrIdempotentRequestError:()=>Cm,isRetryableError:()=>xd,isSafeRequestError:()=>P1,linearDelay:()=>M1,namespace:()=>wd,retryAfter:()=>Sd});var bF=bd(nF(),1),wd="axios-retry";function $m(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,bF.default)(e)}var R1=["get","head","options"],wF=R1.concat(["put","delete"]);function xd(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function P1(e){var t;return(t=e.config)!=null&&t.method?xd(e)&&R1.indexOf(e.config.method)!==-1:!1}function Om(e){var t;return(t=e.config)!=null&&t.method?xd(e)&&wF.indexOf(e.config.method)!==-1:!1}function Cm(e){return $m(e)||Om(e)}function Sd(e=void 0){var n;let t=(n=e==null?void 0:e.response)==null?void 0:n.headers["retry-after"];if(!t)return 0;let r=(Number(t)||0)*1e3;return r===0&&(r=(new Date(t).valueOf()||0)-Date.now()),Math.max(0,r)}function xF(e=0,t=void 0){return Math.max(0,Sd(t))}function N1(e=0,t=void 0,r=100){let n=2**e*r,o=Math.max(n,Sd(t)),i=o*.2*Math.random();return o+i}function M1(e=100){return(t=0,r=void 0)=>{let n=t*e;return Math.max(n,Sd(r))}}var j1={retries:3,retryCondition:Cm,retryDelay:xF,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function SF(e,t){return{...j1,...t,...e[wd]}}function D1(e,t,r=!1){let n=SF(e,t||{});return n.retryCount=n.retryCount||0,(!n.lastRequestTime||r)&&(n.lastRequestTime=Date.now()),e[wd]=n,n}function _F(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}async function EF(e,t){let{retries:r,retryCondition:n}=e,o=(e.retryCount||0)<r&&n(t);if(typeof o=="object")try{return await o!==!1}catch{return!1}return o}async function kF(e,t,r,n){var c;t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,r);if(_F(e,n),!i&&n.timeout&&t.lastRequestTime){let l=Date.now()-t.lastRequestTime,u=n.timeout-l-s;if(u<=0)return Promise.reject(r);n.timeout=u}return n.transformRequest=[l=>l],await a(t.retryCount,r,n),(c=n.signal)!=null&&c.aborted?Promise.resolve(e(n)):new Promise(l=>{var p;let u=()=>{clearTimeout(d),l(e(n))},d=setTimeout(()=>{var f;l(e(n)),(f=n.signal)!=null&&f.removeEventListener&&n.signal.removeEventListener("abort",u)},s);(p=n.signal)!=null&&p.addEventListener&&n.signal.addEventListener("abort",u,{once:!0})})}async function TF(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var ii=(e,t)=>{let r=e.interceptors.request.use(o=>{var i;return D1(o,t,!0),(i=o[wd])!=null&&i.validateResponse&&(o.validateStatus=()=>!1),o}),n=e.interceptors.response.use(null,async o=>{var s;let{config:i}=o;if(!i)return Promise.reject(o);let a=D1(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await EF(a,o)?kF(e,a,o,i):(await TF(a,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:n}};ii.isNetworkError=$m,ii.isSafeRequestError=P1,ii.isIdempotentRequestError=Om,ii.isNetworkOrIdempotentRequestError=Cm,ii.exponentialDelay=N1,ii.linearDelay=M1,ii.isRetryableError=xd;var L1=ii,$F={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Am=typeof window<"u"&&typeof window.document<"u"?window.crypto:nm;Am.getRandomValues||(Am=$F);var Vt=class extends Error{constructor(t,r,n,o,i,a){super(o);k(this,"isApiError",!0);this.code=t,this.description=r,this.type=n,this.message=o,this.error=i,this.id=a,this.id||(this.id=Vt.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(){let t=this.getPrefix(),r=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],n=4,o=Array.from(Am.getRandomValues(new Uint8Array(n))).map(i=>i.toString(16).padStart(2,"0")).join("").toUpperCase();return`${t}_${r}x${o}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}},OF=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,F1=e=>e instanceof Vt||OF(e)&&e.isApiError===!0,La=class extends Vt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},q1=class extends Vt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},B1=class extends Vt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},U1=class extends Vt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},z1=class extends Vt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},Z1=class extends Vt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},V1=class extends Vt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},H1=class extends Vt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},W1=class extends Vt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},K1=class extends Vt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},G1=class extends Vt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},J1=class extends Vt{constructor(e,t,r){super(400,"The provided identifier is not valid. An identifier must start with a lowercase letter, be between 2 and 100 characters long and use only alphanumeric characters.","InvalidIdentifier",e,t,r)}},Y1=class extends Vt{constructor(e,t,r){super(409,"The resource is related with a different resource that the one referenced in the request. This is usually caused when providing two resource identifiers that aren't linked together.","RelationConflict",e,t,r)}},X1=class extends Vt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},Q1=class extends Vt{constructor(e,t,r){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",e,t,r)}},e_=class extends Vt{constructor(e,t,r){super(400,"The provided resource reference is missing. This is usually caused when providing an invalid id inside the payload of a request.","ReferenceNotFound",e,t,r)}},t_=class extends Vt{constructor(e,t,r){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",e,t,r)}},r_=class extends Vt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},n_=class extends Vt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},o_=class extends Vt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},i_=class extends Vt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},a_=class extends Vt{constructor(e,t,r){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",e,t,r)}},s_=class extends Vt{constructor(e,t,r){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",e,t,r)}},c_=class extends Vt{constructor(e,t,r){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",e,t,r)}},CF={Unknown:La,Internal:q1,Unauthorized:B1,Forbidden:U1,PayloadTooLarge:z1,InvalidPayload:Z1,UnsupportedMediaType:V1,MethodNotFound:H1,ResourceNotFound:W1,InvalidJsonSchema:K1,InvalidDataFormat:G1,InvalidIdentifier:J1,RelationConflict:Y1,ReferenceConstraint:X1,ResourceLockedConflict:Q1,ReferenceNotFound:e_,InvalidQuery:t_,Runtime:r_,AlreadyExists:n_,RateLimited:o_,PaymentRequired:i_,QuotaExceeded:a_,LimitExceeded:s_,BreakingChanges:c_},Im=e=>F1(e)?e:e instanceof Error?new La(e.message,e):typeof e=="string"?new La(e):AF(e);function AF(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"){let t=CF[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new La(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new La("An invalid error occurred: "+JSON.stringify(e))}var Fa=class extends Error{constructor(t,r,n){super(t),this.innerError=r,this.file=n,this.name="FileUploadError"}},IF=bd(oF()),RF=bd(iF()),PF="https://api.botpress.cloud",NF=6e4,MF="BP_API_URL",jF="BP_BOT_ID",DF="BP_INTEGRATION_ID",LF="BP_WORKSPACE_ID",FF="BP_TOKEN";function qF(e){let t=BF(e),r={};t.workspaceId&&(r["x-workspace-id"]=t.workspaceId),t.botId&&(r["x-bot-id"]=t.botId),t.integrationId&&(r["x-integration-id"]=t.integrationId),t.token&&(r.Authorization=`Bearer ${t.token}`),r={...r,...t.headers};let n=t.apiUrl??PF,o=t.timeout??NF;return{apiUrl:n,timeout:o,withCredentials:C1,headers:r}}function BF(e){return C1?e:Sm?UF(e):e}function UF(e){let t={...e,apiUrl:e.apiUrl??process.env[MF],botId:e.botId??process.env[jF],integrationId:e.integrationId??process.env[DF],workspaceId:e.workspaceId??process.env[LF]},r=t.token??process.env[FF];return r&&(t.token=r),t}var zF=bd(vF()),ZF=e=>e[1]!==void 0,re=e=>{let{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(ZF),s=Object.fromEntries(a),c=zF.default.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},VF=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),HF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),WF=e=>({path:"/v1/chat/conversations",headers:{},query:{nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection,tags:e.tags,participantIds:e.participantIds,integrationName:e.integrationName},params:{},body:{}}),KF=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),GF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),JF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),YF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),XF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),QF=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),eq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),tq=e=>({path:"/v1/chat/events",headers:{},query:{},params:{},body:{type:e.type,payload:e.payload,schedule:e.schedule,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId}}),rq=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),nq=e=>({path:"/v1/chat/events",headers:{},query:{nextToken:e.nextToken,type:e.type,conversationId:e.conversationId,userId:e.userId,messageId:e.messageId,status:e.status},params:{},body:{}}),oq=e=>({path:"/v1/chat/messages",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),iq=e=>({path:"/v1/chat/messages/get-or-create",headers:{},query:{},params:{},body:{payload:e.payload,userId:e.userId,conversationId:e.conversationId,type:e.type,tags:e.tags,schedule:e.schedule}}),aq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),sq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),cq=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),lq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),uq=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),dq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),fq=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),pq=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),hq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),mq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),yq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{}}),gq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),vq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/get-or-set`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload,expiry:e.expiry}}),bq=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{payload:e.payload}}),wq=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),xq=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),Sq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_q=e=>({path:"/v1/chat/tasks",headers:{},query:{},params:{},body:{title:e.title,description:e.description,type:e.type,data:e.data,parentTaskId:e.parentTaskId,conversationId:e.conversationId,userId:e.userId,timeoutAt:e.timeoutAt,tags:e.tags}}),Eq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{title:e.title,description:e.description,data:e.data,timeoutAt:e.timeoutAt,status:e.status,tags:e.tags}}),kq=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Tq=e=>({path:"/v1/chat/tasks",headers:{},query:{nextToken:e.nextToken,tags:e.tags,conversationId:e.conversationId,userId:e.userId,parentTaskId:e.parentTaskId,status:e.status,type:e.type},params:{},body:{}}),$q=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),Oq=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),Cq=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),Aq=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),Iq=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),Rq=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),Pq=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Nq=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),Mq=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),jq=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),Dq=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Lq=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),Fq=e=>({path:"/v1/admin/bots",headers:{},query:{},params:{},body:{states:e.states,events:e.events,recurringEvents:e.recurringEvents,subscriptions:e.subscriptions,actions:e.actions,configuration:e.configuration,user:e.user,conversation:e.conversation,message:e.message,code:e.code,name:e.name,medias:e.medias,url:e.url,dev:e.dev}}),qq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{url:e.url,authentication:e.authentication,configuration:e.configuration,blocked:e.blocked,alwaysAlive:e.alwaysAlive,user:e.user,message:e.message,conversation:e.conversation,events:e.events,actions:e.actions,states:e.states,recurringEvents:e.recurringEvents,integrations:e.integrations,subscriptions:e.subscriptions,code:e.code,name:e.name,medias:e.medias}}),Bq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),Uq=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),zq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Zq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Vq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),Hq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),Wq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),Kq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Gq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Jq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Yq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),Xq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}}),Qq=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}}),e3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}}),t3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}}),r3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),n3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),o3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),i3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),a3=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),s3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),c3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),l3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),u3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),d3=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),f3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),p3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),h3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{name:e.name,spendingLimit:e.spendingLimit,about:e.about,profilePicture:e.profilePicture,contactEmail:e.contactEmail,website:e.website,socialAccounts:e.socialAccounts,isPublic:e.isPublic,handle:e.handle}}),m3=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),y3=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),g3=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),v3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),b3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),w3=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),x3=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),S3=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),_3=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),E3=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),k3=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),T3=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),$3=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),O3=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,interfaces:e.interfaces,configuration:e.configuration,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,secrets:e.secrets,code:e.code,url:e.url,dev:e.dev,icon:e.icon,readme:e.readme,title:e.title,description:e.description,public:e.public}}),C3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,channels:e.channels,identifier:e.identifier,actions:e.actions,events:e.events,states:e.states,user:e.user,entities:e.entities,interfaces:e.interfaces,secrets:e.secrets,code:e.code,icon:e.icon,readme:e.readme,title:e.title,description:e.description,url:e.url,public:e.public}}),A3=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),I3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),R3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}/logs`,headers:{},query:{timeStart:e.timeStart,timeEnd:e.timeEnd,nextToken:e.nextToken},params:{id:e.id},body:{}}),P3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),N3=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),M3=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}}),j3=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),D3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),L3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),F3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),q3=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),B3=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),U3=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),z3=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),Z3=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),V3=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),H3=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),W3=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),K3=e=>({path:"/v1/files",headers:{},query:{},params:{},body:{key:e.key,tags:e.tags,size:e.size,index:e.index,accessPolicies:e.accessPolicies,contentType:e.contentType,expiresAt:e.expiresAt}}),G3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),J3=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),Y3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),X3=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}}),Q3=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}}),eB=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}}),tB=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),rB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),nB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),oB=e=>({path:"/v1/tables",headers:{},query:{},params:{},body:{name:e.name,factor:e.factor,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),iB=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),aB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{name:e.name,frozen:e.frozen,schema:e.schema,tags:e.tags,isComputeEnabled:e.isComputeEnabled}}),sB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),cB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),lB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),uB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/find`,headers:{},query:{},params:{table:e.table},body:{limit:e.limit,offset:e.offset,filter:e.filter,group:e.group,search:e.search,orderBy:e.orderBy,orderDirection:e.orderDirection}}),dB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),fB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/delete`,headers:{},query:{},params:{table:e.table},body:{ids:e.ids,filter:e.filter,deleteAllRows:e.deleteAllRows}}),pB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),hB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows/upsert`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,keyColumn:e.keyColumn,waitComputed:e.waitComputed}}),mB=class{constructor(e,t={}){k(this,"createConversation",async e=>{let{path:t,headers:r,query:n,body:o}=VF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getConversation",async e=>{let{path:t,headers:r,query:n,body:o}=HF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listConversations",async e=>{let{path:t,headers:r,query:n,body:o}=WF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateConversation",async e=>{let{path:t,headers:r,query:n,body:o}=KF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateConversation",async e=>{let{path:t,headers:r,query:n,body:o}=GF(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteConversation",async e=>{let{path:t,headers:r,query:n,body:o}=JF(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listParticipants",async e=>{let{path:t,headers:r,query:n,body:o}=YF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"addParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=XF(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=QF(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"removeParticipant",async e=>{let{path:t,headers:r,query:n,body:o}=eq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createEvent",async e=>{let{path:t,headers:r,query:n,body:o}=tq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getEvent",async e=>{let{path:t,headers:r,query:n,body:o}=rq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listEvents",async e=>{let{path:t,headers:r,query:n,body:o}=nq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createMessage",async e=>{let{path:t,headers:r,query:n,body:o}=oq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateMessage",async e=>{let{path:t,headers:r,query:n,body:o}=iq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getMessage",async e=>{let{path:t,headers:r,query:n,body:o}=aq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateMessage",async e=>{let{path:t,headers:r,query:n,body:o}=sq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listMessages",async e=>{let{path:t,headers:r,query:n,body:o}=cq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteMessage",async e=>{let{path:t,headers:r,query:n,body:o}=lq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createUser",async e=>{let{path:t,headers:r,query:n,body:o}=uq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUser",async e=>{let{path:t,headers:r,query:n,body:o}=dq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listUsers",async e=>{let{path:t,headers:r,query:n,body:o}=fq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateUser",async e=>{let{path:t,headers:r,query:n,body:o}=pq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateUser",async e=>{let{path:t,headers:r,query:n,body:o}=hq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteUser",async e=>{let{path:t,headers:r,query:n,body:o}=mq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getState",async e=>{let{path:t,headers:r,query:n,body:o}=yq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setState",async e=>{let{path:t,headers:r,query:n,body:o}=gq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrSetState",async e=>{let{path:t,headers:r,query:n,body:o}=vq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"patchState",async e=>{let{path:t,headers:r,query:n,body:o}=bq(e),i=(this.props.toAxiosRequest??re)({method:"patch",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"callAction",async e=>{let{path:t,headers:r,query:n,body:o}=wq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"configureIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=xq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTask",async e=>{let{path:t,headers:r,query:n,body:o}=Sq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTask",async e=>{let{path:t,headers:r,query:n,body:o}=_q(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTask",async e=>{let{path:t,headers:r,query:n,body:o}=Eq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTask",async e=>{let{path:t,headers:r,query:n,body:o}=kq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listTasks",async e=>{let{path:t,headers:r,query:n,body:o}=Tq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"trackAnalytics",async e=>{let{path:t,headers:r,query:n,body:o}=$q(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"runVrl",async e=>{let{path:t,headers:r,query:n,body:o}=Oq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAccount",async e=>{let{path:t,headers:r,query:n,body:o}=Cq(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateAccount",async e=>{let{path:t,headers:r,query:n,body:o}=Aq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPersonalAccessTokens",async e=>{let{path:t,headers:r,query:n,body:o}=Iq(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createPersonalAccessToken",async e=>{let{path:t,headers:r,query:n,body:o}=Rq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deletePersonalAccessToken",async e=>{let{path:t,headers:r,query:n,body:o}=Pq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setAccountPreference",async e=>{let{path:t,headers:r,query:n,body:o}=Nq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAccountPreference",async e=>{let{path:t,headers:r,query:n,body:o}=Mq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPublicIntegrations",async e=>{let{path:t,headers:r,query:n,body:o}=jq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicIntegrationById",async e=>{let{path:t,headers:r,query:n,body:o}=Dq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=Lq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createBot",async e=>{let{path:t,headers:r,query:n,body:o}=Fq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateBot",async e=>{let{path:t,headers:r,query:n,body:o}=qq(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"transferBot",async e=>{let{path:t,headers:r,query:n,body:o}=Bq(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBots",async e=>{let{path:t,headers:r,query:n,body:o}=Uq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBot",async e=>{let{path:t,headers:r,query:n,body:o}=zq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteBot",async e=>{let{path:t,headers:r,query:n,body:o}=Zq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotLogs",async e=>{let{path:t,headers:r,query:n,body:o}=Vq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotWebchat",async e=>{let{path:t,headers:r,query:n,body:o}=Hq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotAnalytics",async e=>{let{path:t,headers:r,query:n,body:o}=Wq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotIssue",async e=>{let{path:t,headers:r,query:n,body:o}=Kq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotIssues",async e=>{let{path:t,headers:r,query:n,body:o}=Gq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteBotIssue",async e=>{let{path:t,headers:r,query:n,body:o}=Jq(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotIssueEvents",async e=>{let{path:t,headers:r,query:n,body:o}=Yq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listBotVersions",async e=>{let{path:t,headers:r,query:n,body:o}=Xq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=Qq(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=e3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deployBotVersion",async e=>{let{path:t,headers:r,query:n,body:o}=t3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"setWorkspacePaymentMethod",async e=>{let{path:t,headers:r,query:n,body:o}=r3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceInvoices",async e=>{let{path:t,headers:r,query:n,body:o}=n3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUpcomingInvoice",async e=>{let{path:t,headers:r,query:n,body:o}=o3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"chargeWorkspaceUnpaidInvoices",async e=>{let{path:t,headers:r,query:n,body:o}=i3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=a3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getPublicWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=s3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=c3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceUsages",async e=>{let{path:t,headers:r,query:n,body:o}=l3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"breakDownWorkspaceUsageByBot",async e=>{let{path:t,headers:r,query:n,body:o}=u3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAllWorkspaceQuotaCompletion",async e=>{let{path:t,headers:r,query:n,body:o}=d3(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspaceQuota",async e=>{let{path:t,headers:r,query:n,body:o}=f3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceQuotas",async e=>{let{path:t,headers:r,query:n,body:o}=p3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=h3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"checkHandleAvailability",async e=>{let{path:t,headers:r,query:n,body:o}=m3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaces",async e=>{let{path:t,headers:r,query:n,body:o}=y3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listPublicWorkspaces",async e=>{let{path:t,headers:r,query:n,body:o}=g3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteWorkspace",async e=>{let{path:t,headers:r,query:n,body:o}=v3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getAuditRecords",async e=>{let{path:t,headers:r,query:n,body:o}=b3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listWorkspaceMembers",async e=>{let{path:t,headers:r,query:n,body:o}=w3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=x3(),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=S3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=_3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateWorkspaceMember",async e=>{let{path:t,headers:r,query:n,body:o}=E3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listIntegrationApiKeys",async e=>{let{path:t,headers:r,query:n,body:o}=k3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createIntegrationApiKey",async e=>{let{path:t,headers:r,query:n,body:o}=T3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteIntegrationApiKey",async e=>{let{path:t,headers:r,query:n,body:o}=$3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=O3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=C3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listIntegrations",async e=>{let{path:t,headers:r,query:n,body:o}=A3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=I3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegrationLogs",async e=>{let{path:t,headers:r,query:n,body:o}=R3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getIntegrationByName",async e=>{let{path:t,headers:r,query:n,body:o}=P3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteIntegration",async e=>{let{path:t,headers:r,query:n,body:o}=N3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"requestIntegrationVerification",async e=>{let{path:t,headers:r,query:n,body:o}=M3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createInterface",async e=>{let{path:t,headers:r,query:n,body:o}=j3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getInterface",async e=>{let{path:t,headers:r,query:n,body:o}=D3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getInterfaceByName",async e=>{let{path:t,headers:r,query:n,body:o}=L3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateInterface",async e=>{let{path:t,headers:r,query:n,body:o}=F3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteInterface",async e=>{let{path:t,headers:r,query:n,body:o}=q3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listInterfaces",async e=>{let{path:t,headers:r,query:n,body:o}=B3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getUsage",async e=>{let{path:t,headers:r,query:n,body:o}=U3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getMultipleUsages",async e=>{let{path:t,headers:r,query:n,body:o}=z3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listUsageHistory",async e=>{let{path:t,headers:r,query:n,body:o}=Z3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"changeAISpendQuota",async e=>{let{path:t,headers:r,query:n,body:o}=V3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listActivities",async e=>{let{path:t,headers:r,query:n,body:o}=H3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"introspect",async e=>{let{path:t,headers:r,query:n,body:o}=W3(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"upsertFile",async e=>{let{path:t,headers:r,query:n,body:o}=K3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteFile",async e=>{let{path:t,headers:r,query:n,body:o}=G3(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listFiles",async e=>{let{path:t,headers:r,query:n,body:o}=J3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getFile",async e=>{let{path:t,headers:r,query:n,body:o}=Y3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateFileMetadata",async e=>{let{path:t,headers:r,query:n,body:o}=X3(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"searchFiles",async e=>{let{path:t,headers:r,query:n,body:o}=Q3(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listFilePassages",async e=>{let{path:t,headers:r,query:n,body:o}=eB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"listTables",async e=>{let{path:t,headers:r,query:n,body:o}=tB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTable",async e=>{let{path:t,headers:r,query:n,body:o}=rB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getOrCreateTable",async e=>{let{path:t,headers:r,query:n,body:o}=nB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTable",async e=>{let{path:t,headers:r,query:n,body:o}=oB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"duplicateTable",async e=>{let{path:t,headers:r,query:n,body:o}=iB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTable",async e=>{let{path:t,headers:r,query:n,body:o}=aB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"renameTableColumn",async e=>{let{path:t,headers:r,query:n,body:o}=sB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTable",async e=>{let{path:t,headers:r,query:n,body:o}=cB(e),i=(this.props.toAxiosRequest??re)({method:"delete",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"getTableRow",async e=>{let{path:t,headers:r,query:n,body:o}=lB(e),i=(this.props.toAxiosRequest??re)({method:"get",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"findTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=uB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"createTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=dB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"deleteTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=fB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"updateTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=pB(e),i=(this.props.toAxiosRequest??re)({method:"put",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});k(this,"upsertTableRows",async e=>{let{path:t,headers:r,query:n,body:o}=hB(e),i=(this.props.toAxiosRequest??re)({method:"post",path:t,headers:{...r},query:{...n},body:o});return this.axiosInstance.request(i).then(a=>a.data).catch(a=>{throw ne(a)})});this.axiosInstance=e,this.props=t}};function ne(e){var t;return ja.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Im(e.response.data):Im(e)}var jr=class{constructor(e){this._list=e}async*[Symbol.asyncIterator](){let e;do{let{items:t,meta:r}=await this._list({nextToken:e});e=r.nextToken;for(let n of t)yield n}while(e)}async collect(e={}){let t=e.limit??Number.POSITIVE_INFINITY,r=[],n=0;for await(let o of this)if(r.push(o),n++,n>=t)break;return r}},yB=class{constructor(e){k(this,"conversations",e=>new jr(({nextToken:t})=>this.client.listConversations({nextToken:t,...e}).then(r=>({...r,items:r.conversations}))));k(this,"participants",e=>new jr(({nextToken:t})=>this.client.listParticipants({nextToken:t,...e}).then(r=>({...r,items:r.participants}))));k(this,"events",e=>new jr(({nextToken:t})=>this.client.listEvents({nextToken:t,...e}).then(r=>({...r,items:r.events}))));k(this,"messages",e=>new jr(({nextToken:t})=>this.client.listMessages({nextToken:t,...e}).then(r=>({...r,items:r.messages}))));k(this,"users",e=>new jr(({nextToken:t})=>this.client.listUsers({nextToken:t,...e}).then(r=>({...r,items:r.users}))));k(this,"tasks",e=>new jr(({nextToken:t})=>this.client.listTasks({nextToken:t,...e}).then(r=>({...r,items:r.tasks}))));k(this,"publicIntegrations",e=>new jr(({nextToken:t})=>this.client.listPublicIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"bots",e=>new jr(({nextToken:t})=>this.client.listBots({nextToken:t,...e}).then(r=>({...r,items:r.bots}))));k(this,"botIssues",e=>new jr(({nextToken:t})=>this.client.listBotIssues({nextToken:t,...e}).then(r=>({...r,items:r.issues}))));k(this,"workspaces",e=>new jr(({nextToken:t})=>this.client.listWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"publicWorkspaces",e=>new jr(({nextToken:t})=>this.client.listPublicWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"workspaceMembers",e=>new jr(({nextToken:t})=>this.client.listWorkspaceMembers({nextToken:t,...e}).then(r=>({...r,items:r.members}))));k(this,"integrations",e=>new jr(({nextToken:t})=>this.client.listIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"interfaces",e=>new jr(({nextToken:t})=>this.client.listInterfaces({nextToken:t,...e}).then(r=>({...r,items:r.interfaces}))));k(this,"activities",e=>new jr(({nextToken:t})=>this.client.listActivities({nextToken:t,...e}).then(r=>({...r,items:r.activities}))));k(this,"files",e=>new jr(({nextToken:t})=>this.client.listFiles({nextToken:t,...e}).then(r=>({...r,items:r.files}))));k(this,"filePassages",e=>new jr(({nextToken:t})=>this.client.listFilePassages({nextToken:t,...e}).then(r=>({...r,items:r.passages}))));this.client=e}},l_=100*1024*1024,gB=l_,vB=l_,bB=class extends mB{constructor(t={}){let r=qF(t),{apiUrl:n,headers:o,withCredentials:i,timeout:a}=r,s=ja.create({baseURL:n,headers:o,withCredentials:i,timeout:a,maxBodyLength:gB,maxContentLength:vB,httpAgent:Sm?new IF.default.Agent({keepAlive:!0}):void 0,httpsAgent:Sm?new RF.default.Agent({keepAlive:!0}):void 0});super(s);k(this,"config");k(this,"uploadFile",async({key:t,index:r,tags:n,contentType:o,accessPolicies:i,content:a,url:s,expiresAt:c})=>{if(s&&a)throw new Fa("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await ja.get(s,{responseType:"arraybuffer"}).then(p=>p.data).catch(p=>{throw new Fa(`Failed to download file from provided URL: ${p.message}`,p)})),!a)throw new Fa("No content was provided for the file");let l,u;if(typeof a=="string"){let p=new TextEncoder().encode(a);l=p,u=p.byteLength}else if(a instanceof Uint8Array)l=a,u=l.byteLength;else if(a instanceof ArrayBuffer)l=a,u=l.byteLength;else if(a instanceof Blob)l=a,u=a.size;else throw new Fa("The provided content is not supported");let{file:d}=await this.upsertFile({key:t,tags:n,index:r,accessPolicies:i,contentType:o,size:u,expiresAt:c});try{await ja.put(d.uploadUrl,l,{maxBodyLength:1/0,headers:{"Content-Type":d.contentType}})}catch(p){throw new Fa(`Failed to upload file: ${p.message}`,p,d)}return{file:d}});t.retry&&L1(s,t.retry),this.config=r}get list(){return new yB(this)}};const _d=Ih(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:n_,BreakingChangesError:c_,Client:bB,ForbiddenError:U1,InternalError:q1,InvalidDataFormatError:G1,InvalidIdentifierError:J1,InvalidJsonSchemaError:K1,InvalidPayloadError:Z1,InvalidQueryError:t_,LimitExceededError:s_,MethodNotFoundError:H1,PayloadTooLargeError:z1,PaymentRequiredError:i_,QuotaExceededError:a_,RateLimitedError:o_,ReferenceConstraintError:X1,ReferenceNotFoundError:e_,RelationConflictError:Y1,ResourceLockedConflictError:Q1,ResourceNotFoundError:W1,RuntimeError:r_,UnauthorizedError:B1,UnknownError:La,UnsupportedMediaTypeError:V1,UploadFileError:Fa,axios:zL,axiosRetry:I1,errorFrom:Im,isApiError:F1},Symbol.toStringTag,{value:"Module"})));(function(e){var t=Object.create,r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(_,ie)=>{for(var Te in ie)r(_,Te,{get:ie[Te],enumerable:!0})},c=(_,ie,Te,Le)=>{if(ie&&typeof ie=="object"||typeof ie=="function")for(let Fe of o(ie))!a.call(_,Fe)&&Fe!==Te&&r(_,Fe,{get:()=>ie[Fe],enumerable:!(Le=n(ie,Fe))||Le.enumerable});return _},l=(_,ie,Te)=>(c(_,ie,"default"),Te&&c(Te,ie,"default")),u=(_,ie,Te)=>(Te=_!=null?t(i(_)):{},c(ie||!_||!_.__esModule?r(Te,"default",{value:_,enumerable:!0}):Te,_)),d=_=>c(r({},"__esModule",{value:!0}),_),p={};s(p,{Bot:()=>fxe,BotSpecificClient:()=>Bj,Integration:()=>Kt,IntegrationDefinition:()=>le,IntegrationSpecificClient:()=>tt,InterfaceDeclaration:()=>he,RuntimeError:()=>qj.RuntimeError,botIdHeader:()=>E,botUserIdHeader:()=>H,configurationHeader:()=>ce,integrationIdHeader:()=>Q,interfaces:()=>F,isApiError:()=>qj.isApiError,messages:()=>f,operationHeader:()=>pe,parseBody:()=>Ie,serve:()=>Ue,typeHeader:()=>fe,webhookIdHeader:()=>T}),e.exports=d(p);var f={};s(f,{defaults:()=>B});var h={};s(h,{default:()=>m});var y=tu;l(h,tu);var m=y.z,g=h.z.string().min(1),v=h.z.object({text:g}),b=h.z.object({markdown:g}),x=h.z.object({imageUrl:g}),w=h.z.object({audioUrl:g}),S=h.z.object({videoUrl:g}),C=h.z.object({fileUrl:g,title:g.optional()}),I=h.z.object({latitude:h.z.number(),longitude:h.z.number(),address:h.z.string().optional(),title:h.z.string().optional()}),P=h.z.object({title:g,subtitle:g.optional(),imageUrl:g.optional(),actions:h.z.array(h.z.object({action:h.z.enum(["postback","url","say"]),label:g,value:g}))}),A=h.z.object({text:g,options:h.z.array(h.z.object({label:g,value:g}))}),L=h.z.object({items:h.z.array(P)}),K=h.z.discriminatedUnion("type",[h.z.object({type:h.z.literal("text"),payload:v}),h.z.object({type:h.z.literal("markdown"),payload:b}),h.z.object({type:h.z.literal("image"),payload:x}),h.z.object({type:h.z.literal("audio"),payload:w}),h.z.object({type:h.z.literal("video"),payload:S}),h.z.object({type:h.z.literal("file"),payload:C}),h.z.object({type:h.z.literal("location"),payload:I})]),z=h.z.object({items:h.z.array(K)}),B={text:{schema:v},markdown:{schema:b},image:{schema:x},audio:{schema:w},video:{schema:S},file:{schema:C},location:{schema:I},carousel:{schema:L},card:{schema:P},dropdown:{schema:A},choice:{schema:A},bloc:{schema:z}},F={};s(F,{creatable:()=>cr,deletable:()=>yn,hitl:()=>sn,listable:()=>at,llm:()=>Rr,readable:()=>Xt,schemas:()=>j,speechToText:()=>ge,textToImage:()=>txe,typingIndicator:()=>rxe,updatable:()=>Qt});var j={};s(j,{speechToText:()=>Z});var Z={};s(Z,{OpenAITranscribeAudioOutputSchema:()=>W});var W=m.object({language:m.string().describe("Detected language of the audio"),duration:m.number().describe("Duration of the audio file, in seconds"),segments:m.array(m.object({text:m.string().describe("Text content of the segment."),id:m.number().describe("Unique identifier of the segment"),seek:m.number().describe("Seek offset of the segment"),start:m.number().describe("Start time of the segment in seconds."),end:m.number().describe("End time of the segment in seconds."),tokens:m.array(m.number()).describe("Array of token IDs for the text content."),temperature:m.number().describe("Temperature parameter used for generating the segment."),avg_logprob:m.number().describe("Average logprob of the segment. If the value is lower than -1, consider the logprobs failed."),compression_ratio:m.number().describe("Compression ratio of the segment. If the value is greater than 2.4, consider the compression failed."),no_speech_prob:m.number().describe("Probability of no speech in the segment. If the value is higher than 1.0 and the avg_logprob is below -1, consider this segment silent.")}))}),D=tu,E="x-bot-id",H="x-bot-user-id",Q="x-integration-id",T="x-webhook-id",ce="x-bp-configuration",pe="x-bp-operation",fe="x-bp-type",ve=D.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),_e=_=>{let ie=_[E],Te=_[H],Le=_[Q],Fe=_[T],De=_[ce],Be=ve.parse(_[pe]);if(!ie)throw new Error("Missing bot headers");if(!Te)throw new Error("Missing bot user headers");if(!Le)throw new Error("Missing integration headers");if(!Fe)throw new Error("Missing webhook headers");if(!De)throw new Error("Missing configuration headers");if(!Be)throw new Error("Missing operation headers");return{botId:ie,botUserId:Te,integrationId:Le,webhookId:Fe,operation:Be,configuration:De?JSON.parse(Buffer.from(De,"base64").toString("utf-8")):{}}},Ce=_=>Array.from(new Set(_)),be=_=>Object.entries(_),de=(_,ie)=>Object.fromEntries(be(_).map(([Te,Le])=>[Te,ie(Le,Te)])),te=(_,ie,Te)=>{let Le=Ce([...Object.keys(_),...Object.keys(ie)]),Fe={};for(let De of Le){let Be=_[De],lt=ie[De];Be&&lt?Fe[De]=Te(Be,lt):Be?Fe[De]=Be:lt&&(Fe[De]=lt)}return Fe},we=Symbol("schemaName"),Ae=_=>_?de(_,(ie,Te)=>({...ie,[we]:Te})):{},qe=_=>_[we]!==void 0,q=_=>_[we],le=class{constructor(_){k(this,"name");k(this,"version");k(this,"title");k(this,"description");k(this,"icon");k(this,"readme");k(this,"configuration");k(this,"events");k(this,"actions");k(this,"channels");k(this,"states");k(this,"user");k(this,"secrets");k(this,"identifier");k(this,"entities");k(this,"interfaces",{});k(this,"_mergeActions",(_,ie)=>({title:ie.title??_.title,description:ie.description??_.description,input:{schema:_.input.schema.merge(ie.input.schema)},output:{schema:_.output.schema.merge(ie.output.schema)}}));k(this,"_mergeEvents",(_,ie)=>({title:ie.title??_.title,description:ie.description??_.description,schema:_.schema.merge(ie.schema)}));k(this,"_mergeChannels",(_,ie)=>{let Te=te(_.messages,ie.messages,this._mergeMessage);return{title:ie.title??_.title,description:ie.description??_.description,conversation:ie.conversation??_.conversation,message:ie.message??_.message,messages:Te}});k(this,"_mergeMessage",(_,ie)=>({schema:_.schema.merge(ie.schema)}));this.props=_,this.name=_.name,this.version=_.version,this.icon=_.icon,this.readme=_.readme,this.title=_.title,this.identifier=_.identifier,this.description=_.description,this.configuration=_.configuration,this.events=_.events,this.actions=_.actions,this.channels=_.channels,this.states=_.states,this.user=_.user,this.secrets=_.secrets,this.entities=_.entities}clone(_){let ie=new le({...this,..._});for(let[Te,Le]of Object.entries(this.interfaces))ie.interfaces[Te]=Le;return ie}extend(_,ie){let Te=ie(Ae(this.entities)),Le=be(Te).find(([$n,zs])=>!qe(zs));if(Le)throw new Error(`Cannot extend interface "${_.name}" with entity "${Le[0]}"; the provided schema is not part of the integration's entities.`);let Fe=de(Te,$n=>({name:q($n),schema:$n.schema})),{resolved:De,implementStatement:Be}=_.resolve({entities:Fe}),lt=this;lt.actions=te(lt.actions??{},De.actions,this._mergeActions),lt.channels=te(lt.channels??{},De.channels,this._mergeChannels),lt.events=te(lt.events??{},De.events,this._mergeEvents);let Pr=Object.values(Fe).map($n=>$n.name),Ur=`${_.name}<${Pr.join(",")}>`;return this.interfaces[Ur]=Be,this}},he=class{constructor(_){k(this,"name");k(this,"version");k(this,"entities");k(this,"events");k(this,"actions");k(this,"channels");k(this,"templateName");this.props=_,this.name=_.name,this.version=_.version,this.entities=_.entities??{},this.events=_.events??{},this.actions=_.actions??{},this.channels=_.channels??{},this.templateName=_.templateName}resolve(_){let{entities:ie}=_,Te={name:this.name,version:this.version,entities:de(ie,Be=>({name:Be.name})),actions:{},events:{}},Le={},Fe={},De={};for(let[Be,lt]of be(this.actions)){let Pr=this._dereference(lt.input.schema,ie),Ur=this._dereference(lt.output.schema,ie),$n=this._rename(ie,Be);Le[$n]={input:{schema:Pr},output:{schema:Ur}},Te.actions[Be]={name:$n}}for(let[Be,lt]of be(this.events)){let Pr=this._dereference(lt.schema,ie),Ur=this._rename(ie,Be);Fe[Ur]={schema:Pr},Te.events[Be]={name:Ur}}for(let[Be,lt]of be(this.channels)){let Pr={};for(let[Ur,$n]of be(lt.messages)){let zs=this._dereference($n.schema,ie);Pr[Ur]={schema:zs}}De[Be]={messages:Pr}}return{resolved:{actions:Le,events:Fe,channels:De},implementStatement:Te}}_dereference(_,ie){let Te={},Le={};for(let[Fe,De]of be(ie))Te[Fe]=De.schema,Le[Fe]=m.ref(Fe);return _(Le).dereference(Te)}_rename(_,ie){if(!this.templateName)return ie;let Te=de(_,Le=>Le.name);return this.templateName(ie,Te)}},me=om,je=console;function Ie(_){if(!_.body)throw new Error("Missing body");return JSON.parse(_.body)}async function Ue(_,ie=8072,Te=se){let Le=(0,me.createServer)(async(Fe,De)=>{try{let Be=await pt(Fe);if(Be.path==="/health"){De.writeHead(200).end("ok");return}let lt=await _(Be);De.writeHead((lt==null?void 0:lt.status)??200,(lt==null?void 0:lt.headers)??{}).end((lt==null?void 0:lt.body)??"{}")}catch(Be){je.error("Error while handling request",{error:(Be==null?void 0:Be.message)??"Internal error occured"}),De.writeHead(500).end(JSON.stringify({error:(Be==null?void 0:Be.message)??"Internal error occured"}))}});return Le.listen(ie,()=>Te(ie)),Le}async function pt(_){var Fe;let ie=await G(_),Te={};for(let De=0;De<_.rawHeaders.length;De+=2){let Be=_.rawHeaders[De].toLowerCase(),lt=_.rawHeaders[De+1];Te[Be]=lt}let Le=new URL(_.url??"",_.headers.host?`http://${_.headers.host}`:"http://botpress.cloud");return{body:ie,path:Le.pathname,query:Ke(Le.search,"?"),headers:Te,method:((Fe=_.method)==null?void 0:Fe.toUpperCase())??"GET"}}function Ke(_,ie){return _.indexOf(ie)===0?_.slice(ie.length):_}async function G(_){return new Promise((ie,Te)=>{if(_.method!=="POST"&&_.method!=="PUT"&&_.method!=="PATCH")return ie(void 0);let Le="";_.on("data",Fe=>Le+=Fe.toString()),_.on("error",Fe=>Te(Fe)),_.on("end",()=>ie(Le))})}function se(_){je.info(`Listening on port ${_}`)}var Y=_d,ye=_d,$e={retries:3,retryCondition:_=>{var ie;return ye.axiosRetry.isNetworkOrIdempotentRequestError(_)||[429,502].includes(((ie=_.response)==null?void 0:ie.status)??0)},retryDelay:_=>_*1e3},tt=class{constructor(_){k(this,"createConversation",_=>this.client.createConversation(_));k(this,"getConversation",_=>this.client.getConversation(_));k(this,"listConversations",_=>this.client.listConversations(_));k(this,"getOrCreateConversation",_=>this.client.getOrCreateConversation(_));k(this,"updateConversation",_=>this.client.updateConversation(_));k(this,"deleteConversation",_=>this.client.deleteConversation(_));k(this,"listParticipants",_=>this.client.listParticipants(_));k(this,"addParticipant",_=>this.client.addParticipant(_));k(this,"getParticipant",_=>this.client.getParticipant(_));k(this,"removeParticipant",_=>this.client.removeParticipant(_));k(this,"createEvent",_=>this.client.createEvent(_));k(this,"getEvent",_=>this.client.getEvent(_));k(this,"listEvents",_=>this.client.listEvents(_));k(this,"createMessage",_=>this.client.createMessage(_));k(this,"getOrCreateMessage",_=>this.client.getOrCreateMessage(_));k(this,"getMessage",_=>this.client.getMessage(_));k(this,"updateMessage",_=>this.client.updateMessage(_));k(this,"listMessages",_=>this.client.listMessages(_));k(this,"deleteMessage",_=>this.client.deleteMessage(_));k(this,"createUser",_=>this.client.createUser(_));k(this,"getUser",_=>this.client.getUser(_));k(this,"listUsers",_=>this.client.listUsers(_));k(this,"getOrCreateUser",_=>this.client.getOrCreateUser(_));k(this,"updateUser",_=>this.client.updateUser(_));k(this,"deleteUser",_=>this.client.deleteUser(_));k(this,"getState",_=>this.client.getState(_));k(this,"setState",_=>this.client.setState(_));k(this,"getOrSetState",_=>this.client.getOrSetState(_));k(this,"patchState",_=>this.client.patchState(_));k(this,"configureIntegration",_=>this.client.configureIntegration(_));k(this,"uploadFile",_=>this.client.uploadFile(_));k(this,"upsertFile",_=>this.client.upsertFile(_));k(this,"deleteFile",_=>this.client.deleteFile(_));k(this,"listFiles",_=>this.client.listFiles(_));k(this,"getFile",_=>this.client.getFile(_));k(this,"updateFileMetadata",_=>this.client.updateFileMetadata(_));this.client=_}},Ve=u(om),ct=_=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:Ve.default.format(..._),visible_to_bot_owner:!0});{let[ie,...Te]=_;return Ve.default.format(`[For Bot Owner] ${ie}`,...Te)}},$t={forBot:()=>({info:(..._)=>{console.info(ct(_))},warn:(..._)=>{console.warn(ct(_))},error:(..._)=>{console.error(ct(_))},debug:(..._)=>{console.debug(ct(_))}})},Wt=_=>async ie=>{let Te=_e(ie.headers),Le=new Y.Client({botId:Te.botId,integrationId:Te.integrationId,retry:$e}),Fe=new tt(Le),De={ctx:Te,req:ie,client:Fe,logger:$t,instance:_};try{let Be;switch(Te.operation){case"webhook_received":Be=await X(De);break;case"register":Be=await ze(De);break;case"unregister":Be=await Ge(De);break;case"message_created":Be=await ir(De);break;case"action_triggered":Be=await kr(De);break;case"ping":Be=await U(De);break;case"create_user":Be=await gt(De);break;case"create_conversation":Be=await Je(De);break;default:throw new Error(`Unknown operation ${Te.operation}`)}return Be?{...Be,status:Be.status??200}:{status:200}}catch(Be){if((0,Y.isApiError)(Be)){let Pr=new Y.RuntimeError(Be.message,Be);return $t.forBot().error(Pr.message),{status:Pr.code,body:JSON.stringify(Pr.toJSON())}}console.error(Be);let lt=new Y.RuntimeError("An unexpected error occurred in the integration. Bot owners: Check logs for more informations. Integration owners: throw a RuntimeError to return a custom error message instead.");return $t.forBot().error(lt.message),{status:lt.code,body:JSON.stringify(lt.toJSON())}}},U=async _=>{},X=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{let{req:De}=Ie(Te);return Fe.webhook({client:_,ctx:ie,req:De,logger:Le})},ze=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.register)return;let{webhookUrl:De}=Ie(Te);await Fe.register({client:_,ctx:ie,webhookUrl:De,logger:Le})},Ge=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.unregister)return;let{webhookUrl:De}=Ie(Te);await Fe.unregister({ctx:ie,webhookUrl:De,client:_,logger:Le})},gt=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.createUser)return;let{tags:De}=Ie(Te);return await Fe.createUser({ctx:ie,client:_,tags:De,logger:Le})},Je=async({client:_,ctx:ie,req:Te,logger:Le,instance:Fe})=>{if(!Fe.createConversation)return;let{channel:De,tags:Be}=Ie(Te);return await Fe.createConversation({ctx:ie,client:_,channel:De,tags:Be,logger:Le})},ir=async({ctx:_,req:ie,client:Te,logger:Le,instance:Fe})=>{let{conversation:De,user:Be,type:lt,payload:Pr,message:Ur}=Ie(ie),$n=Fe.channels[De.channel];if(!$n)throw new Error(`Channel ${De.channel} not found`);let zs=$n.messages[lt];if(!zs)throw new Error(`Message of type ${lt} not found in channel ${De.channel}`);await zs({ctx:_,conversation:De,message:Ur,user:Be,type:lt,client:Te,payload:Pr,ack:async({tags:pxe})=>{await Te.updateMessage({id:Ur.id,tags:pxe})},logger:Le})},kr=async({req:_,ctx:ie,client:Te,logger:Le,instance:Fe})=>{let{input:De,type:Be}=Ie(_);if(!Be)throw new Error("Missing action type");let lt=Fe.actions[Be];if(!lt)throw new Error(`Action ${Be} not found`);let Pr=await lt({ctx:ie,input:De,client:Te,type:Be,logger:Le});return{body:JSON.stringify({output:Pr})}},Kt=class{constructor(_){k(this,"props");k(this,"actions");k(this,"channels");k(this,"register");k(this,"unregister");k(this,"createUser");k(this,"createConversation");k(this,"webhook");k(this,"handler",Wt(this));k(this,"start",_=>Ue(this.handler,_));this.props=_,this.actions=_.actions,this.channels=_.channels,this.register=_.register,this.unregister=_.unregister,this.createUser=_.createUser,this.createConversation=_.createConversation,this.webhook=_.handler}},ar=_=>({..._,schema:()=>_.schema.extend({userId:m.string().optional().describe("Allows sending a message pretending to be a certain user")})}),sn=new he({name:"hitl",version:"0.2.0",entities:{},events:{hitlAssigned:{schema:()=>m.object({conversationId:m.string(),userId:m.string()})},hitlStopped:{schema:()=>m.object({conversationId:m.string()})}},actions:{createUser:{input:{schema:()=>m.object({name:m.string().optional(),pictureUrl:m.string().optional(),email:m.string().optional()})},output:{schema:()=>m.object({userId:m.string()})}},startHitl:{input:{schema:()=>m.object({userId:m.string(),title:m.string(),description:m.string().optional()})},output:{schema:()=>m.object({conversationId:m.string()})}},stopHitl:{input:{schema:()=>m.object({conversationId:m.string(),reason:m.enum(["timeout","cancel"]).optional()})},output:{schema:()=>m.object({})}}},channels:{hitl:{messages:{text:ar(B.text)}}}}),vt=m.object({id:m.string(),type:m.enum(["function"]),function:m.object({name:m.string(),arguments:m.record(m.any()).nullable().describe("Some LLMs may generate invalid JSON for a tool call, so this will be `null` when it happens.")})}),bt=m.object({type:m.enum(["auto","specific","any","none",""]).optional(),functionName:m.string().optional().describe('Required if `type` is "specific"')}),Yt=m.object({role:m.enum(["user","assistant"]),type:m.enum(["text","tool_calls","tool_result","multipart"]).default("text"),toolCalls:m.array(vt).optional().describe('Required if `type` is "tool_calls"'),toolResultCallId:m.string().optional().describe('Required if `type` is "tool_result"'),content:m.string().or(m.array(m.object({type:m.enum(["text","image"]),mimeType:m.string().optional().describe("Indicates the MIME type of the content. If not provided it will be detected from the content-type header of the provided URL."),text:m.string().optional().describe('Required if part type is "text" '),url:m.string().optional().describe('Required if part type is "image"')}))).optional().nullable().describe('Required unless `type` is "tool_call". If `type` is "multipart", this field must be an array of content objects. If `type` is "tool_result" then this field should be the result of the tool call (a plain string or a JSON-encoded array or object). If `type` is "tool_call" then the `toolCalls` field should be used instead.')}),Gt=m.object({id:m.string()}),sr=Gt.extend({name:m.string(),description:m.string(),tags:m.array(m.enum(["recommended","deprecated","general-purpose","low-cost","vision","coding","agents","function-calling","roleplay","storytelling"])),input:m.object({maxTokens:m.number().int(),costPer1MTokens:m.number().describe("Cost per 1 million tokens, in U.S. dollars")}),output:m.object({maxTokens:m.number().int(),costPer1MTokens:m.number().describe("Cost per 1 million tokens, in U.S. dollars")})}),Ut=_=>m.object({model:_.describe("Model to use for content generation").optional(),systemPrompt:m.string().optional().describe("Optional system prompt to guide the model"),messages:m.array(Yt).describe("Array of messages for the model to process"),responseFormat:m.enum(["text","json_object"]).optional().describe('Response format expected from the model. If "json_object" is chosen, you must instruct the model to generate JSON either via the system prompt or a user message.'),maxTokens:m.number().optional().describe("Maximum number of tokens allowed in the generated response"),temperature:m.number().min(0).max(2).displayAs({id:"slider",params:{stepSize:.01,horizontal:!0}}).default(1).describe("Sampling temperature for the model. Higher values result in more random outputs."),topP:m.number().min(0).max(1).default(1).displayAs({id:"slider",params:{stepSize:.01,horizontal:!0}}).describe("Top-p sampling parameter. Limits sampling to the smallest set of tokens with a cumulative probability above the threshold."),stopSequences:m.array(m.string()).max(4).optional().describe("Sequences where the model should stop generating further tokens."),tools:m.array(m.object({type:m.literal("function"),function:m.object({name:m.string().describe("Function name"),description:m.string().optional(),argumentsSchema:m.object({}).passthrough().optional().describe("JSON schema of the function arguments")})})).optional(),toolChoice:bt.optional(),userId:m.string().optional(),debug:m.boolean().optional().describe("Set to `true` to output debug information to the bot logs")});Ut(Gt);var Ir=m.object({id:m.string().describe("Response ID from LLM provider"),provider:m.string().describe("LLM provider name"),model:m.string().describe("Model name"),choices:m.array(Yt.omit({role:!0}).extend({role:m.literal("assistant"),index:m.number().int(),stopReason:m.enum(["stop","max_tokens","tool_calls","content_filter","other"])})),usage:m.object({inputTokens:m.number().int().describe("Number of input tokens used by the model"),inputCost:m.number().describe("Cost of the input tokens received by the model, in U.S. dollars"),outputTokens:m.number().int().describe("Number of output tokens used by the model"),outputCost:m.number().describe("Cost of the output tokens generated by the model, in U.S. dollars")})}),Rr=new he({name:"llm",version:"4.0.0",entities:{modelRef:{schema:Gt}},events:{},actions:{generateContent:{input:{schema:({modelRef:_})=>Ut(_)},output:{schema:()=>Ir}},listLanguageModels:{input:{schema:()=>m.object({})},output:{schema:({modelRef:_})=>m.object({models:m.array(m.intersection(sr,_))})}}}}),tn=m.object({id:m.string()}),wa=tn.extend({name:m.string(),costPerMinute:m.number().describe("Cost per minute of speech transcription, in U.S. dollars")}),xa=_=>m.object({model:_.optional().describe("Model to use for speech-to-text transcription (optional)"),fileUrl:m.string().url().describe("URL of the audio file to transcribe. The URL should return a content-type header in order to detect the audio format. Supported audio formats supported are: mp3, mp4, mpeg, mpga, m4a, wav, webm"),language:m.string().optional().describe("The language of the input audio (optional). Supplying the input language in ISO-639-1 format will improve accuracy and latency."),prompt:m.string().optional().describe("An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language."),temperature:m.number().default(0).optional().describe("The sampling temperature (optional), between 0 and 1. Defaults to 0 (automatic). Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.")});xa(tn);var M=W.extend({model:m.string().describe("Model name used"),cost:m.number().describe("Total cost of this transcription, in U.S. dollars")}),ge=new he({name:"speechToText",version:"1.0.0",entities:{speechToTextModelRef:{schema:tn}},actions:{transcribeAudio:{input:{schema:({speechToTextModelRef:_})=>xa(_)},output:{schema:()=>M}},listSpeechToTextModels:{input:{schema:()=>m.object({})},output:{schema:({speechToTextModelRef:_})=>m.object({models:m.array(m.intersection(wa,_))})}}}}),ke=m.object({id:m.string()}),Ze=_=>m.intersection(_,ke),kt=_=>_[0].toUpperCase()+_.slice(1),Ot=(..._)=>{let[ie,...Te]=_.filter(Le=>Le.length>0).map(Le=>Le.toLowerCase());return ie?[ie,...Te.map(kt)].join(""):""},ht=m.string().optional(),at=new he({name:"listable",version:"0.0.1",entities:{item:{schema:ke}},events:{},actions:{list:{input:{schema:()=>m.object({nextToken:ht})},output:{schema:_=>m.object({items:m.array(Ze(_.item)),meta:m.object({nextToken:ht})})}}},templateName:(_,ie)=>Ot(ie.item,_)}),cr=new he({name:"creatable",version:"0.0.1",entities:{item:{schema:ke}},events:{created:{schema:_=>m.object({item:Ze(_.item)})}},actions:{create:{input:{schema:_=>m.object({item:_.item})},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Xt=new he({name:"readable",version:"0.0.1",entities:{item:{schema:ke}},events:{},actions:{read:{input:{schema:()=>ke},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Qt=new he({name:"updatable",version:"0.0.1",entities:{item:{schema:ke}},events:{updated:{schema:_=>m.object({item:Ze(_.item)})}},actions:{update:{input:{schema:_=>ke.extend({item:_.item})},output:{schema:_=>m.object({item:Ze(_.item)})}}},templateName:(_,ie)=>Ot(ie.item,_)}),yn=new he({name:"deletable",version:"0.0.1",entities:{item:{schema:ke}},events:{deleted:{schema:()=>ke}},actions:{delete:{input:{schema:()=>ke},output:{schema:()=>m.object({})}}},templateName:(_,ie)=>Ot(ie.item,_)}),Ao=m.object({id:m.string()}),$h=Ao.extend({name:m.string(),costPerImage:m.number().describe("Cost per image generation, in U.S. dollars"),sizes:m.array(m.string()).describe("Available image sizes"),defaultSize:m.string().describe("Default image size generated by model")}),Dn=m.object({}).describe("Model-specific parameters for image generation"),Fj=(_,ie)=>m.object({model:_.optional().describe("Model to use for image generation"),prompt:m.string(),size:m.string().optional(),expiration:m.number().int().min(30).max(90).optional().describe("Expiration of the generated image in days, after which the image will be automatically deleted to free up storage space in your account. The default is to keep the image indefinitely (no expiration). The minimum is 30 days and the maximum is 90 days."),params:ie.optional()});Fj(Ao,Dn);var exe=m.object({model:m.string().describe("Model name used"),imageUrl:m.string().describe("Temporary URL of generated image"),cost:m.number().describe("Cost of the image generation, in U.S. dollars")}),txe=new he({name:"textToImage",version:"1.1.0",entities:{imageModelRef:{schema:Ao},imageGenerationParams:{schema:Dn}},actions:{generateImage:{input:{schema:({imageModelRef:_,imageGenerationParams:ie})=>Fj(_,ie)},output:{schema:()=>exe}},listImageModels:{input:{schema:()=>m.object({})},output:{schema:({imageModelRef:_})=>m.object({models:m.array(m.intersection($h,_))})}}}}),rxe=new he({name:"typingIndicator",version:"0.0.1",entities:{},events:{},actions:{startTypingIndicator:{input:{schema:()=>m.object({conversationId:m.string(),messageId:m.string().describe("The message ID to which the typing indicator should be attached"),timeout:m.number().optional().describe("The timeout in milliseconds after which the typing indicator should stop")})},output:{schema:()=>m.object({})}},stopTypingIndicator:{input:{schema:()=>m.object({conversationId:m.string(),messageId:m.string().describe("The message ID from which the typing indicator should be removed")})},output:{schema:()=>m.object({})}}}});l(p,h,e.exports);var qj=_d,nxe=u(_d),Bj=class{constructor(_){k(this,"getConversation",_=>this.client.getConversation(_));k(this,"listConversations",_=>this.client.listConversations(_));k(this,"updateConversation",_=>this.client.updateConversation(_));k(this,"deleteConversation",_=>this.client.deleteConversation(_));k(this,"listParticipants",_=>this.client.listParticipants(_));k(this,"addParticipant",_=>this.client.addParticipant(_));k(this,"getParticipant",_=>this.client.getParticipant(_));k(this,"removeParticipant",_=>this.client.removeParticipant(_));k(this,"getEvent",_=>this.client.getEvent(_));k(this,"listEvents",_=>this.client.listEvents(_));k(this,"createMessage",_=>this.client.createMessage(_));k(this,"getOrCreateMessage",_=>this.client.getOrCreateMessage(_));k(this,"getMessage",_=>this.client.getMessage(_));k(this,"updateMessage",_=>this.client.updateMessage(_));k(this,"listMessages",_=>this.client.listMessages(_));k(this,"deleteMessage",_=>this.client.deleteMessage(_));k(this,"getUser",_=>this.client.getUser(_));k(this,"listUsers",_=>this.client.listUsers(_));k(this,"updateUser",_=>this.client.updateUser(_));k(this,"deleteUser",_=>this.client.deleteUser(_));k(this,"getState",_=>this.client.getState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"setState",_=>this.client.setState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"getOrSetState",_=>this.client.getOrSetState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"patchState",_=>this.client.patchState(_).then(ie=>({state:{...ie.state,payload:ie.state.payload}})));k(this,"callAction",_=>this.client.callAction(_));k(this,"uploadFile",_=>this.client.uploadFile(_));k(this,"upsertFile",_=>this.client.upsertFile(_));k(this,"deleteFile",_=>this.client.deleteFile(_));k(this,"listFiles",_=>this.client.listFiles(_));k(this,"getFile",_=>this.client.getFile(_));k(this,"updateFileMetadata",_=>this.client.updateFileMetadata(_));k(this,"searchFiles",_=>this.client.searchFiles(_));k(this,"createConversation",_=>this.client.createConversation(_));k(this,"getOrCreateConversation",_=>this.client.getOrCreateConversation(_));k(this,"createUser",_=>this.client.createUser(_));k(this,"getOrCreateUser",_=>this.client.getOrCreateUser(_));this.client=_}},oxe=tu,ixe=oxe.z.enum(["event_received","register","unregister","ping","action_triggered"]),axe=_=>{let ie=_[E],Te=_[ce],Le=_[fe],Fe=ixe.parse(_[pe]);if(!ie)throw new Error("Missing bot headers");if(!Le)throw new Error("Missing type headers");if(!Te)throw new Error("Missing configuration headers");if(!Fe)throw new Error("Missing operation headers");return{botId:ie,operation:Fe,type:Le,configuration:Te?JSON.parse(Buffer.from(Te,"base64").toString("utf-8")):{}}},sxe=_=>async ie=>{let Te=axe(ie.headers);Te.operation!=="ping"&&je.info(`Received ${Te.operation} operation for bot ${Te.botId} of type ${Te.type}`);let Le=new nxe.Client({botId:Te.botId,retry:$e}),Fe=new Bj(Le),De={req:ie,ctx:Te,client:Fe,instance:_};switch(Te.operation){case"action_triggered":throw new Error(`Operation ${Te.operation} not supported yet`);case"event_received":await dxe(De);break;case"register":await lxe();break;case"unregister":await uxe();break;case"ping":await cxe();break;default:throw new Error(`Unknown operation ${Te.operation}`)}return{status:200}},cxe=async _=>{},lxe=async _=>{},uxe=async _=>{},dxe=async({ctx:_,req:ie,client:Te,instance:Le})=>{je.debug(`Received event ${_.type}`);let Fe=Ie(ie),De=Fe.event;switch(_.type){case"message_created":let Be={user:De.payload.user,conversation:De.payload.conversation,message:De.payload.message,states:De.payload.states,event:De};await Promise.all(Le.messageHandlers.map(Ur=>Ur({client:Te,ctx:_,...Be})));break;case"state_expired":let lt={state:De.payload.state};await Promise.all(Le.stateExpiredHandlers.map(Ur=>Ur({client:Te,ctx:_,...lt})));break;default:let Pr={event:Fe.event};await Promise.all(Le.eventHandlers.map(Ur=>Ur({client:Te,ctx:_,...Pr})))}},fxe=class{constructor(_){k(this,"_state",{messageHandlers:[],eventHandlers:[],stateExpiredHandlers:[]});k(this,"props");k(this,"message",_=>{this._state.messageHandlers.push(_)});k(this,"event",_=>{this._state.eventHandlers.push(_)});k(this,"stateExpired",_=>{this._state.stateExpiredHandlers.push(_)});k(this,"handler",sxe(this._state));k(this,"start",_=>Ue(this.handler,_));this.props=_}}})(x0);var ae=x0.exports;const{defaults:io}=ae.messages,zn={className:ae.z.string().describe("CSS className to apply to the message").optional()},u_=io.audio.schema.extend({...zn,type:ae.z.literal("audio")}),Rm=io.card.schema.extend({type:ae.z.literal("card"),subtitle:ae.z.string().optional(),imageUrl:ae.z.string().optional(),...zn}),wB=Rm.omit({type:!0}),d_=ae.z.object({items:ae.z.array(wB),...zn,type:ae.z.literal("carousel")}),f_=io.choice.schema.extend({text:ae.z.string(),...zn,type:ae.z.literal("choice"),disableFreeText:ae.z.boolean().optional()}),p_=io.dropdown.schema.extend({text:ae.z.string(),...zn,type:ae.z.literal("dropdown")}),h_=io.file.schema.extend({...zn,type:ae.z.literal("file")}),m_=io.image.schema.extend({...zn,type:ae.z.literal("image")}),y_=io.location.schema.extend({...zn,type:ae.z.literal("location")}),g_=io.markdown.schema.extend({...zn,type:ae.z.literal("markdown")}),v_=io.text.schema.extend({...zn,type:ae.z.literal("text")}),b_=io.video.schema.extend({...zn,type:ae.z.literal("video")}),w_=ae.z.union([u_,Rm,d_,f_,p_,h_,m_,y_,g_,v_,b_]),x_=ae.z.object({type:ae.z.literal("webchat_visibility"),data:ae.z.object({visibility:ae.z.union([ae.z.literal("show"),ae.z.literal("hide"),ae.z.literal("toggle")])})}),S_=ae.z.object({type:ae.z.literal("webchat_config"),data:ae.z.object({config:ae.z.record(ae.z.any())})}),__=ae.z.object({type:ae.z.literal("custom"),data:ae.z.object({event:ae.z.record(ae.z.any())})}),E_=ae.z.union([x_,S_,__]),xB=E_,SB=ae.z.object({type:ae.z.literal("message_created"),data:w_}),k_=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:u_,cardSchema:Rm,carouselSchema:d_,choiceSchema:f_,customSchema:__,dropdownSchema:p_,fileSchema:h_,imageSchema:m_,locationSchema:y_,markdownSchema:g_,messageCreatedSchema:SB,messageSchema:w_,textSchema:v_,triggerSchema:E_,triggerSignalSchema:xB,videoSchema:b_,webchatConfigSchema:S_,webchatVisibilitySchema:x_},Symbol.toStringTag,{value:"Module"})),ao=ae.z.object({className:ae.z.string().optional(),avatarUrl:ae.z.string().url().optional()}),T_=ao.extend({type:ae.z.literal("audio"),audio:ae.z.string(),title:ae.z.string().optional()}),_B=ae.z.union([ae.z.object({title:ae.z.string(),action:ae.z.literal("Say something"),text:ae.z.string()}),ae.z.object({title:ae.z.string(),action:ae.z.literal("Open URL"),url:ae.z.string()}),ae.z.object({title:ae.z.string(),action:ae.z.literal("Postback"),payload:ae.z.string()})]),Pm=ao.extend({type:ae.z.literal("card"),title:ae.z.string(),subtitle:ae.z.string().optional(),image:ae.z.string().optional(),actions:ae.z.array(_B)}),$_=ao.extend({type:ae.z.literal("carousel"),items:ae.z.array(Pm)}),O_=ao.extend({type:ae.z.literal("dropdown"),message:ae.z.string().optional(),options:ae.z.array(ae.z.object({label:ae.z.string(),value:ae.z.string()})),allowCreation:ae.z.boolean().optional(),placeholderText:ae.z.string().optional(),allowMultiple:ae.z.boolean().optional(),buttonText:ae.z.string().optional(),width:ae.z.number().optional(),displayInKeyboard:ae.z.boolean().optional(),markdown:ae.z.boolean().optional(),text:ae.z.string().optional()}),C_=ao.extend({type:ae.z.literal("file"),file:ae.z.string(),title:ae.z.string().optional()}),A_=ao.extend({type:ae.z.literal("image"),image:ae.z.string()}),I_=ao.extend({type:ae.z.literal("location"),latitude:ae.z.number(),longitude:ae.z.number(),address:ae.z.string().optional(),title:ae.z.string().optional()}),R_=ao.extend({type:ae.z.literal("single-choice"),text:ae.z.string(),disableFreeText:ae.z.boolean().optional(),choices:ae.z.array(ae.z.object({title:ae.z.string(),value:ae.z.string()}))}),P_=ao.extend({type:ae.z.literal("text"),text:ae.z.string(),markdown:ae.z.boolean().optional()}),N_=ao.extend({type:ae.z.literal("video"),video:ae.z.string(),title:ae.z.string().optional()}),M_=ae.z.object({type:ae.z.literal("quick_reply"),text:ae.z.string(),payload:ae.z.string().optional()}),Ed=ae.z.union([T_,Pm,$_,O_,C_,A_,I_,R_,P_,N_,M_]),j_=ae.z.object({type:ae.z.literal("webchat-visibility"),visibility:ae.z.union([ae.z.literal("show"),ae.z.literal("hide"),ae.z.literal("toggle")])}),D_=ae.z.object({type:ae.z.literal("webchat-config"),config:ae.z.record(ae.z.any())}),L_=ae.z.object({type:ae.z.literal("custom-event"),event:ae.z.record(ae.z.any())}),F_=ae.z.union([j_,D_,L_]),EB=ae.z.object({type:ae.z.literal("trigger"),trigger:F_}),q_=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:T_,cardSchema:Pm,carouselSchame:$_,customEventSchema:L_,dropdownSchema:O_,fileSchema:C_,imageSchema:A_,locationSchema:I_,messageSchema:Ed,messageSignalSchema:Ed,quickReplySchema:M_,singleChoiceSchema:R_,textSchema:P_,triggerSchema:F_,triggerSignalSchema:EB,videoSchema:N_,webchatConfigSchema:D_,webchatVisibilitySchema:j_},Symbol.toStringTag,{value:"Module"})),B_=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(kB)}),kB=e=>{switch(e.action){case"postback":return{title:e.label,action:"Postback",payload:e.value};case"url":return{title:e.label,action:"Open URL",url:e.value};case"say":return{title:e.label,action:"Say something",text:e.value};default:throw new Error(`Unknown action type ${e.action}`)}},U_=e=>({...e,type:"audio",audio:e.audioUrl}),z_=e=>B_(e),Z_=e=>({...e,type:"carousel",items:e.items.map(B_)}),V_=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),H_=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),W_=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),K_=e=>({...e,type:"image",image:e.imageUrl}),G_=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),J_=e=>({...e,type:"text",text:e.markdown,markdown:!0}),Y_=e=>({...e,type:"text",text:e.text,markdown:!0}),X_=e=>({...e,type:"video",video:e.videoUrl}),TB=e=>{switch(e.type){case"audio":return U_(e);case"card":return z_(e);case"carousel":return Z_(e);case"choice":return V_(e);case"dropdown":return H_(e);case"file":return W_(e);case"image":return K_(e);case"location":return G_(e);case"markdown":return J_(e);case"text":return Y_(e);case"video":return X_(e);default:throw new Error("Unsuported message type")}},Q_=e=>({type:"webchat-visibility",visibility:e.data.visibility}),eE=e=>({type:"webchat-config",config:e.data.config}),tE=e=>({type:"custom-event",event:e.data.event}),rE=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:U_,cardAdapter:z_,carouselAdapter:Z_,choiceAdapter:V_,customAdapter:tE,dropdownAdapter:H_,fileAdapter:W_,imageAdapter:K_,locationAdapter:G_,markdownAdapter:J_,messageAdapter:TB,textAdapter:Y_,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return Q_(e);case"webchat_config":return eE(e);case"custom":return tE(e);default:throw new Error("unknown trigger type")}},videoAdapter:X_,webchatConfigAdapter:eE,webchatVisibilityAdapter:Q_},Symbol.toStringTag,{value:"Module"})),nE=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map($B)}),$B=e=>{switch(e.action){case"Postback":return{label:e.title,action:"postback",value:e.payload};case"Open URL":return{label:e.title,action:"url",value:e.url};case"Say something":return{label:e.title,action:"say",value:e.text};default:throw new Error("Unknown action type")}},OB=e=>({...e,type:"audio",audioUrl:e.audio}),CB=e=>nE(e),AB=e=>({...e,type:"carousel",items:e.items.map(nE)}),IB=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),RB=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),PB=e=>({...e,type:"image",imageUrl:e.image}),NB=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),MB=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),jB=e=>({...e,type:"text",text:e.text}),DB=e=>({...e,type:"video",videoUrl:e.video}),LB=e=>({...e,type:"text",text:e.text??e.payload}),oE=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return OB(e);case"card":return CB(e);case"carousel":return AB(e);case"dropdown":return IB(e);case"file":return RB(e);case"image":return PB(e);case"location":return NB(e);case"single-choice":return MB(e);case"text":return jB(e);case"video":return DB(e);case"quick_reply":return LB(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),FB=Object.freeze(Object.defineProperty({__proto__:null,messaging:q_,messagingToWebChat:oE,webchat:k_,webchatToMessaging:rE},Symbol.toStringTag,{value:"Module"})),qB=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let kd;const BB=new Uint8Array(16);function UB(){if(!kd&&(kd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kd(BB)}const Dr=[];for(let e=0;e<256;++e)Dr.push((e+256).toString(16).slice(1));function zB(e,t=0){return Dr[e[t+0]]+Dr[e[t+1]]+Dr[e[t+2]]+Dr[e[t+3]]+"-"+Dr[e[t+4]]+Dr[e[t+5]]+"-"+Dr[e[t+6]]+Dr[e[t+7]]+"-"+Dr[e[t+8]]+Dr[e[t+9]]+"-"+Dr[e[t+10]]+Dr[e[t+11]]+Dr[e[t+12]]+Dr[e[t+13]]+Dr[e[t+14]]+Dr[e[t+15]]}const iE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Td(e,t,r){if(iE.randomUUID&&!t&&!e)return iE.randomUUID();e=e||{};const n=e.random||(e.rng||UB)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,t){r=r||0;for(let o=0;o<16;++o)t[r+o]=n[o];return t}return zB(n)}const $d=e=>({block:e,type:"bubble"}),ZB=e=>e.action==="Say something"?{type:"button",variant:"action",text:e.title,buttonValue:e.text,reusable:!0}:e.action==="Open URL"?{type:"button",variant:"link",text:e.title,buttonValue:e.url,reusable:!0}:{type:"button",variant:"action",text:e.title,buttonValue:e.payload,reusable:!0},aE=({title:e,image:t,actions:r,subtitle:n})=>{const o=[];return t&&o.push({type:"image",url:t}),e&&o.push({type:"text",text:`## ${e}`}),n&&o.push({type:"text",text:n}),r.length>0&&o.push({type:"row",blocks:r.map(ZB)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},VB=({choices:e,text:t})=>{const r=Td(),n=$d({type:"text",text:t});return e.length===0?n:{type:"column",horizontalAlignment:"left",blocks:[n,{type:"row",blocks:e.map(({title:o,value:i})=>({type:"button",variant:"action",text:o,buttonValue:i,groupId:r}))}]}},HB=({options:e,text:t})=>{const r=[{type:"dropdown",label:t??"Select an option",options:e}];return t&&r.unshift({type:"text",text:t}),{type:"column",blocks:r}},Nm=({type:e,audio:t})=>({payload:{type:e,url:t}}),Mm=e=>({payload:$d(aE(e))}),jm=({items:e})=>({payload:{type:"carousel",blocks:e.map(aE)}}),Dm=e=>({disableInput:e.disableFreeText,payload:VB(e)}),Lm=e=>({disableInput:!0,payload:$d(HB(e))}),Fm=({file:e,...t})=>({payload:{url:e,...t}}),qm=({type:e,image:t})=>({payload:{type:e,url:t}}),Bm=({type:e,latitude:t,longitude:r,title:n,address:o})=>({payload:{type:e,latitude:t,longitude:r,title:n??o??"View on map"}}),sE=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Od=({type:e,text:t})=>({payload:$d({type:e,text:t})}),Um=({type:e,video:t})=>({payload:{type:e,url:t}}),zm=e=>{switch(e.type){case"audio":return Nm(e);case"card":return Mm(e);case"carousel":return jm(e);case"single-choice":return Dm(e);case"dropdown":return Lm(e);case"file":return Fm(e);case"image":return qm(e);case"location":return Bm(e);case"quick_reply":return sE(e);case"text":return Od(e);case"video":return Um(e);default:throw new Error("Unsuported message type")}},WB=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Nm,cardAdapter:Mm,carouselAdapter:jm,choiceAdapter:Dm,dropdownAdapter:Lm,fileAdapter:Fm,imageAdapter:qm,locationAdapter:Bm,messageAdapter:zm,quickReplyAdapter:sE,textAdapter:Od,videoAdapter:Um},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:Zn}=FB,cE=e=>{const t=Zn.audioAdapter(e);return Nm(t)},lE=e=>{const t=Zn.cardAdapter(e);return Mm(t)},uE=e=>{const t=Zn.carouselAdapter(e);return jm(t)},dE=e=>{const t=Zn.choiceAdapter(e);return Dm(t)},fE=e=>{const t=Zn.dropdownAdapter(e);return Lm(t)},pE=e=>{const t=Zn.fileAdapter(e);return Fm(t)},hE=e=>{const t=Zn.imageAdapter(e);return qm(t)},mE=e=>{const t=Zn.locationAdapter(e);return Bm(t)},yE=e=>{const t=Zn.markdownAdapter(e);return Od(t)},gE=e=>{const t=Zn.textAdapter(e);return Od(t)},vE=e=>{const t=Zn.videoAdapter(e);return Um(t)},bE=e=>{switch(e.type){case"audio":return cE(e);case"card":return lE(e);case"carousel":return uE(e);case"choice":return dE(e);case"dropdown":return fE(e);case"file":return pE(e);case"image":return hE(e);case"location":return mE(e);case"markdown":return yE(e);case"text":return gE(e);case"video":return vE(e);default:throw new Error("Unsuported message type")}},KB=Object.freeze(Object.defineProperty({__proto__:null,messaging:q_,messagingToTarget:WB,messagingToWebChat:oE,target:qB,webchat:k_,webchatToMessaging:rE,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:cE,cardAdapter:lE,carouselAdapter:uE,choiceAdapter:dE,dropdownAdapter:fE,fileAdapter:pE,imageAdapter:hE,locationAdapter:mE,markdownAdapter:yE,messageAdapter:bE,textAdapter:gE,videoAdapter:vE},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var Zm={exports:{}},hc={};/**
78
78
  * @license React
79
79
  * react-jsx-runtime.production.min.js
80
80
  *
@@ -90,20 +90,20 @@ ${nu(e.value)}`.trim();case Qe.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
90
90
  *
91
91
  * This source code is licensed under the MIT license found in the
92
92
  * LICENSE file in the root directory of this source tree.
93
- */var xE;function JB(){return xE||(xE=1,process.env.NODE_ENV!=="production"&&function(){var e=$,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function m(M){if(M===null||typeof M!="object")return null;var ge=h&&M[h]||M[y];return typeof ge=="function"?ge:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(M){{for(var ge=arguments.length,ke=new Array(ge>1?ge-1:0),Ze=1;Ze<ge;Ze++)ke[Ze-1]=arguments[Ze];b("error",M,ke)}}function b(M,ge,ke){{var Ze=g.ReactDebugCurrentFrame,kt=Ze.getStackAddendum();kt!==""&&(ge+="%s",ke=ke.concat([kt]));var Ot=ke.map(function(ht){return String(ht)});Ot.unshift("Warning: "+ge),Function.prototype.apply.call(console[M],console,Ot)}}var x=!1,w=!1,S=!1,C=!1,I=!1,P;P=Symbol.for("react.module.reference");function A(M){return!!(typeof M=="string"||typeof M=="function"||M===n||M===i||I||M===o||M===l||M===u||C||M===f||x||w||S||typeof M=="object"&&M!==null&&(M.$$typeof===p||M.$$typeof===d||M.$$typeof===a||M.$$typeof===s||M.$$typeof===c||M.$$typeof===P||M.getModuleId!==void 0))}function L(M,ge,ke){var Ze=M.displayName;if(Ze)return Ze;var kt=ge.displayName||ge.name||"";return kt!==""?ke+"("+kt+")":ke}function W(M){return M.displayName||"Context"}function Z(M){if(M==null)return null;if(typeof M.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case s:var ge=M;return W(ge)+".Consumer";case a:var ke=M;return W(ke._context)+".Provider";case c:return L(M,M.render,"ForwardRef");case d:var Ze=M.displayName||null;return Ze!==null?Ze:Z(M.type)||"Memo";case p:{var kt=M,Ot=kt._payload,ht=kt._init;try{return Z(ht(Ot))}catch{return null}}}return null}var B=Object.assign,F=0,j,U,K,D,E,H,Q;function T(){}T.__reactDisabledLog=!0;function ce(){{if(F===0){j=console.log,U=console.info,K=console.warn,D=console.error,E=console.group,H=console.groupCollapsed,Q=console.groupEnd;var M={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:M,log:M,warn:M,error:M,group:M,groupCollapsed:M,groupEnd:M})}F++}}function pe(){{if(F--,F===0){var M={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},M,{value:j}),info:B({},M,{value:U}),warn:B({},M,{value:K}),error:B({},M,{value:D}),group:B({},M,{value:E}),groupCollapsed:B({},M,{value:H}),groupEnd:B({},M,{value:Q})})}F<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=g.ReactCurrentDispatcher,ve;function _e(M,ge,ke){{if(ve===void 0)try{throw Error()}catch(kt){var Ze=kt.stack.trim().match(/\n( *(at )?)/);ve=Ze&&Ze[1]||""}return`
93
+ */var xE;function JB(){return xE||(xE=1,process.env.NODE_ENV!=="production"&&function(){var e=$,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),h=Symbol.iterator,y="@@iterator";function m(M){if(M===null||typeof M!="object")return null;var ge=h&&M[h]||M[y];return typeof ge=="function"?ge:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(M){{for(var ge=arguments.length,ke=new Array(ge>1?ge-1:0),Ze=1;Ze<ge;Ze++)ke[Ze-1]=arguments[Ze];b("error",M,ke)}}function b(M,ge,ke){{var Ze=g.ReactDebugCurrentFrame,kt=Ze.getStackAddendum();kt!==""&&(ge+="%s",ke=ke.concat([kt]));var Ot=ke.map(function(ht){return String(ht)});Ot.unshift("Warning: "+ge),Function.prototype.apply.call(console[M],console,Ot)}}var x=!1,w=!1,S=!1,C=!1,I=!1,P;P=Symbol.for("react.module.reference");function A(M){return!!(typeof M=="string"||typeof M=="function"||M===n||M===i||I||M===o||M===l||M===u||C||M===f||x||w||S||typeof M=="object"&&M!==null&&(M.$$typeof===p||M.$$typeof===d||M.$$typeof===a||M.$$typeof===s||M.$$typeof===c||M.$$typeof===P||M.getModuleId!==void 0))}function L(M,ge,ke){var Ze=M.displayName;if(Ze)return Ze;var kt=ge.displayName||ge.name||"";return kt!==""?ke+"("+kt+")":ke}function K(M){return M.displayName||"Context"}function z(M){if(M==null)return null;if(typeof M.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof M=="function")return M.displayName||M.name||null;if(typeof M=="string")return M;switch(M){case n:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case u:return"SuspenseList"}if(typeof M=="object")switch(M.$$typeof){case s:var ge=M;return K(ge)+".Consumer";case a:var ke=M;return K(ke._context)+".Provider";case c:return L(M,M.render,"ForwardRef");case d:var Ze=M.displayName||null;return Ze!==null?Ze:z(M.type)||"Memo";case p:{var kt=M,Ot=kt._payload,ht=kt._init;try{return z(ht(Ot))}catch{return null}}}return null}var B=Object.assign,F=0,j,Z,W,D,E,H,Q;function T(){}T.__reactDisabledLog=!0;function ce(){{if(F===0){j=console.log,Z=console.info,W=console.warn,D=console.error,E=console.group,H=console.groupCollapsed,Q=console.groupEnd;var M={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:M,log:M,warn:M,error:M,group:M,groupCollapsed:M,groupEnd:M})}F++}}function pe(){{if(F--,F===0){var M={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:B({},M,{value:j}),info:B({},M,{value:Z}),warn:B({},M,{value:W}),error:B({},M,{value:D}),group:B({},M,{value:E}),groupCollapsed:B({},M,{value:H}),groupEnd:B({},M,{value:Q})})}F<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=g.ReactCurrentDispatcher,ve;function _e(M,ge,ke){{if(ve===void 0)try{throw Error()}catch(kt){var Ze=kt.stack.trim().match(/\n( *(at )?)/);ve=Ze&&Ze[1]||""}return`
94
94
  `+ve+M}}var Ce=!1,be;{var de=typeof WeakMap=="function"?WeakMap:Map;be=new de}function te(M,ge){if(!M||Ce)return"";{var ke=be.get(M);if(ke!==void 0)return ke}var Ze;Ce=!0;var kt=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ot;Ot=fe.current,fe.current=null,ce();try{if(ge){var ht=function(){throw Error()};if(Object.defineProperty(ht.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ht,[])}catch(Dn){Ze=Dn}Reflect.construct(M,[],ht)}else{try{ht.call()}catch(Dn){Ze=Dn}M.call(ht.prototype)}}else{try{throw Error()}catch(Dn){Ze=Dn}M()}}catch(Dn){if(Dn&&Ze&&typeof Dn.stack=="string"){for(var at=Dn.stack.split(`
95
95
  `),cr=Ze.stack.split(`
96
96
  `),Xt=at.length-1,Qt=cr.length-1;Xt>=1&&Qt>=0&&at[Xt]!==cr[Qt];)Qt--;for(;Xt>=1&&Qt>=0;Xt--,Qt--)if(at[Xt]!==cr[Qt]){if(Xt!==1||Qt!==1)do if(Xt--,Qt--,Qt<0||at[Xt]!==cr[Qt]){var yn=`
97
- `+at[Xt].replace(" at new "," at ");return M.displayName&&yn.includes("<anonymous>")&&(yn=yn.replace("<anonymous>",M.displayName)),typeof M=="function"&&be.set(M,yn),yn}while(Xt>=1&&Qt>=0);break}}}finally{Ce=!1,fe.current=Ot,pe(),Error.prepareStackTrace=kt}var Ao=M?M.displayName||M.name:"",$h=Ao?_e(Ao):"";return typeof M=="function"&&be.set(M,$h),$h}function we(M,ge,ke){return te(M,!1)}function Ae(M){var ge=M.prototype;return!!(ge&&ge.isReactComponent)}function qe(M,ge,ke){if(M==null)return"";if(typeof M=="function")return te(M,Ae(M));if(typeof M=="string")return _e(M);switch(M){case l:return _e("Suspense");case u:return _e("SuspenseList")}if(typeof M=="object")switch(M.$$typeof){case c:return we(M.render);case d:return qe(M.type,ge,ke);case p:{var Ze=M,kt=Ze._payload,Ot=Ze._init;try{return qe(Ot(kt),ge,ke)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,le={},he=g.ReactDebugCurrentFrame;function me(M){if(M){var ge=M._owner,ke=qe(M.type,M._source,ge?ge.type:null);he.setExtraStackFrame(ke)}else he.setExtraStackFrame(null)}function je(M,ge,ke,Ze,kt){{var Ot=Function.call.bind(q);for(var ht in M)if(Ot(M,ht)){var at=void 0;try{if(typeof M[ht]!="function"){var cr=Error((Ze||"React class")+": "+ke+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof M[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw cr.name="Invariant Violation",cr}at=M[ht](ge,ht,Ze,ke,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xt){at=Xt}at&&!(at instanceof Error)&&(me(kt),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ze||"React class",ke,ht,typeof at),me(null)),at instanceof Error&&!(at.message in le)&&(le[at.message]=!0,me(kt),v("Failed %s type: %s",ke,at.message),me(null))}}}var Ie=Array.isArray;function Ue(M){return Ie(M)}function pt(M){{var ge=typeof Symbol=="function"&&Symbol.toStringTag,ke=ge&&M[Symbol.toStringTag]||M.constructor.name||"Object";return ke}}function Ke(M){try{return G(M),!1}catch{return!0}}function G(M){return""+M}function se(M){if(Ke(M))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pt(M)),G(M)}var Y=g.ReactCurrentOwner,ye={key:!0,ref:!0,__self:!0,__source:!0},$e,tt,Ve;Ve={};function ct(M){if(q.call(M,"ref")){var ge=Object.getOwnPropertyDescriptor(M,"ref").get;if(ge&&ge.isReactWarning)return!1}return M.ref!==void 0}function $t(M){if(q.call(M,"key")){var ge=Object.getOwnPropertyDescriptor(M,"key").get;if(ge&&ge.isReactWarning)return!1}return M.key!==void 0}function Wt(M,ge){if(typeof M.ref=="string"&&Y.current&&ge&&Y.current.stateNode!==ge){var ke=Z(Y.current.type);Ve[ke]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',Z(Y.current.type),M.ref),Ve[ke]=!0)}}function z(M,ge){{var ke=function(){$e||($e=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ge))};ke.isReactWarning=!0,Object.defineProperty(M,"key",{get:ke,configurable:!0})}}function X(M,ge){{var ke=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ge))};ke.isReactWarning=!0,Object.defineProperty(M,"ref",{get:ke,configurable:!0})}}var ze=function(M,ge,ke,Ze,kt,Ot,ht){var at={$$typeof:t,type:M,key:ge,ref:ke,props:ht,_owner:Ot};return at._store={},Object.defineProperty(at._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(at,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ze}),Object.defineProperty(at,"_source",{configurable:!1,enumerable:!1,writable:!1,value:kt}),Object.freeze&&(Object.freeze(at.props),Object.freeze(at)),at};function Ge(M,ge,ke,Ze,kt){{var Ot,ht={},at=null,cr=null;ke!==void 0&&(se(ke),at=""+ke),$t(ge)&&(se(ge.key),at=""+ge.key),ct(ge)&&(cr=ge.ref,Wt(ge,kt));for(Ot in ge)q.call(ge,Ot)&&!ye.hasOwnProperty(Ot)&&(ht[Ot]=ge[Ot]);if(M&&M.defaultProps){var Xt=M.defaultProps;for(Ot in Xt)ht[Ot]===void 0&&(ht[Ot]=Xt[Ot])}if(at||cr){var Qt=typeof M=="function"?M.displayName||M.name||"Unknown":M;at&&z(ht,Qt),cr&&X(ht,Qt)}return ze(M,at,cr,kt,Ze,Y.current,ht)}}var gt=g.ReactCurrentOwner,Je=g.ReactDebugCurrentFrame;function ir(M){if(M){var ge=M._owner,ke=qe(M.type,M._source,ge?ge.type:null);Je.setExtraStackFrame(ke)}else Je.setExtraStackFrame(null)}var kr;kr=!1;function Kt(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function ar(){{if(gt.current){var M=Z(gt.current.type);if(M)return`
97
+ `+at[Xt].replace(" at new "," at ");return M.displayName&&yn.includes("<anonymous>")&&(yn=yn.replace("<anonymous>",M.displayName)),typeof M=="function"&&be.set(M,yn),yn}while(Xt>=1&&Qt>=0);break}}}finally{Ce=!1,fe.current=Ot,pe(),Error.prepareStackTrace=kt}var Ao=M?M.displayName||M.name:"",$h=Ao?_e(Ao):"";return typeof M=="function"&&be.set(M,$h),$h}function we(M,ge,ke){return te(M,!1)}function Ae(M){var ge=M.prototype;return!!(ge&&ge.isReactComponent)}function qe(M,ge,ke){if(M==null)return"";if(typeof M=="function")return te(M,Ae(M));if(typeof M=="string")return _e(M);switch(M){case l:return _e("Suspense");case u:return _e("SuspenseList")}if(typeof M=="object")switch(M.$$typeof){case c:return we(M.render);case d:return qe(M.type,ge,ke);case p:{var Ze=M,kt=Ze._payload,Ot=Ze._init;try{return qe(Ot(kt),ge,ke)}catch{}}}return""}var q=Object.prototype.hasOwnProperty,le={},he=g.ReactDebugCurrentFrame;function me(M){if(M){var ge=M._owner,ke=qe(M.type,M._source,ge?ge.type:null);he.setExtraStackFrame(ke)}else he.setExtraStackFrame(null)}function je(M,ge,ke,Ze,kt){{var Ot=Function.call.bind(q);for(var ht in M)if(Ot(M,ht)){var at=void 0;try{if(typeof M[ht]!="function"){var cr=Error((Ze||"React class")+": "+ke+" type `"+ht+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof M[ht]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw cr.name="Invariant Violation",cr}at=M[ht](ge,ht,Ze,ke,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Xt){at=Xt}at&&!(at instanceof Error)&&(me(kt),v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Ze||"React class",ke,ht,typeof at),me(null)),at instanceof Error&&!(at.message in le)&&(le[at.message]=!0,me(kt),v("Failed %s type: %s",ke,at.message),me(null))}}}var Ie=Array.isArray;function Ue(M){return Ie(M)}function pt(M){{var ge=typeof Symbol=="function"&&Symbol.toStringTag,ke=ge&&M[Symbol.toStringTag]||M.constructor.name||"Object";return ke}}function Ke(M){try{return G(M),!1}catch{return!0}}function G(M){return""+M}function se(M){if(Ke(M))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",pt(M)),G(M)}var Y=g.ReactCurrentOwner,ye={key:!0,ref:!0,__self:!0,__source:!0},$e,tt,Ve;Ve={};function ct(M){if(q.call(M,"ref")){var ge=Object.getOwnPropertyDescriptor(M,"ref").get;if(ge&&ge.isReactWarning)return!1}return M.ref!==void 0}function $t(M){if(q.call(M,"key")){var ge=Object.getOwnPropertyDescriptor(M,"key").get;if(ge&&ge.isReactWarning)return!1}return M.key!==void 0}function Wt(M,ge){if(typeof M.ref=="string"&&Y.current&&ge&&Y.current.stateNode!==ge){var ke=z(Y.current.type);Ve[ke]||(v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',z(Y.current.type),M.ref),Ve[ke]=!0)}}function U(M,ge){{var ke=function(){$e||($e=!0,v("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ge))};ke.isReactWarning=!0,Object.defineProperty(M,"key",{get:ke,configurable:!0})}}function X(M,ge){{var ke=function(){tt||(tt=!0,v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",ge))};ke.isReactWarning=!0,Object.defineProperty(M,"ref",{get:ke,configurable:!0})}}var ze=function(M,ge,ke,Ze,kt,Ot,ht){var at={$$typeof:t,type:M,key:ge,ref:ke,props:ht,_owner:Ot};return at._store={},Object.defineProperty(at._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(at,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ze}),Object.defineProperty(at,"_source",{configurable:!1,enumerable:!1,writable:!1,value:kt}),Object.freeze&&(Object.freeze(at.props),Object.freeze(at)),at};function Ge(M,ge,ke,Ze,kt){{var Ot,ht={},at=null,cr=null;ke!==void 0&&(se(ke),at=""+ke),$t(ge)&&(se(ge.key),at=""+ge.key),ct(ge)&&(cr=ge.ref,Wt(ge,kt));for(Ot in ge)q.call(ge,Ot)&&!ye.hasOwnProperty(Ot)&&(ht[Ot]=ge[Ot]);if(M&&M.defaultProps){var Xt=M.defaultProps;for(Ot in Xt)ht[Ot]===void 0&&(ht[Ot]=Xt[Ot])}if(at||cr){var Qt=typeof M=="function"?M.displayName||M.name||"Unknown":M;at&&U(ht,Qt),cr&&X(ht,Qt)}return ze(M,at,cr,kt,Ze,Y.current,ht)}}var gt=g.ReactCurrentOwner,Je=g.ReactDebugCurrentFrame;function ir(M){if(M){var ge=M._owner,ke=qe(M.type,M._source,ge?ge.type:null);Je.setExtraStackFrame(ke)}else Je.setExtraStackFrame(null)}var kr;kr=!1;function Kt(M){return typeof M=="object"&&M!==null&&M.$$typeof===t}function ar(){{if(gt.current){var M=z(gt.current.type);if(M)return`
98
98
 
99
99
  Check the render method of \``+M+"`."}return""}}function sn(M){{if(M!==void 0){var ge=M.fileName.replace(/^.*[\\\/]/,""),ke=M.lineNumber;return`
100
100
 
101
101
  Check your code at `+ge+":"+ke+"."}return""}}var vt={};function bt(M){{var ge=ar();if(!ge){var ke=typeof M=="string"?M:M.displayName||M.name;ke&&(ge=`
102
102
 
103
- Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var ke=bt(ge);if(vt[ke])return;vt[ke]=!0;var Ze="";M&&M._owner&&M._owner!==gt.current&&(Ze=" It was passed a child from "+Z(M._owner.type)+"."),ir(M),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ke,Ze),ir(null)}}function Gt(M,ge){{if(typeof M!="object")return;if(Ue(M))for(var ke=0;ke<M.length;ke++){var Ze=M[ke];Kt(Ze)&&Yt(Ze,ge)}else if(Kt(M))M._store&&(M._store.validated=!0);else if(M){var kt=m(M);if(typeof kt=="function"&&kt!==M.entries)for(var Ot=kt.call(M),ht;!(ht=Ot.next()).done;)Kt(ht.value)&&Yt(ht.value,ge)}}}function sr(M){{var ge=M.type;if(ge==null||typeof ge=="string")return;var ke;if(typeof ge=="function")ke=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))ke=ge.propTypes;else return;if(ke){var Ze=Z(ge);je(ke,M.props,"prop",Ze,M)}else if(ge.PropTypes!==void 0&&!kr){kr=!0;var kt=Z(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",kt||"Unknown")}typeof ge.getDefaultProps=="function"&&!ge.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ut(M){{for(var ge=Object.keys(M.props),ke=0;ke<ge.length;ke++){var Ze=ge[ke];if(Ze!=="children"&&Ze!=="key"){ir(M),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ze),ir(null);break}}M.ref!==null&&(ir(M),v("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function Ir(M,ge,ke,Ze,kt,Ot){{var ht=A(M);if(!ht){var at="";(M===void 0||typeof M=="object"&&M!==null&&Object.keys(M).length===0)&&(at+=" 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 cr=sn(kt);cr?at+=cr:at+=ar();var Xt;M===null?Xt="null":Ue(M)?Xt="array":M!==void 0&&M.$$typeof===t?(Xt="<"+(Z(M.type)||"Unknown")+" />",at=" Did you accidentally export a JSX literal instead of a component?"):Xt=typeof M,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xt,at)}var Qt=Ge(M,ge,ke,kt,Ot);if(Qt==null)return Qt;if(ht){var yn=ge.children;if(yn!==void 0)if(Ze)if(Ue(yn)){for(var Ao=0;Ao<yn.length;Ao++)Gt(yn[Ao],M);Object.freeze&&Object.freeze(yn)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gt(yn,M)}return M===n?Ut(Qt):sr(Qt),Qt}}function Rr(M,ge,ke){return Ir(M,ge,ke,!0)}function tn(M,ge,ke){return Ir(M,ge,ke,!1)}var wa=tn,xa=Rr;mc.Fragment=n,mc.jsx=wa,mc.jsxs=xa}()),mc}process.env.NODE_ENV==="production"?Zm.exports=GB():Zm.exports=JB();var J=Zm.exports;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vr.apply(this,arguments)}function Vm(e,t=[]){let r=[];function n(i,a){const s=$.createContext(a),c=r.length;r=[...r,a];function l(d){const{scope:p,children:f,...h}=d,y=(p==null?void 0:p[e][c])||s,m=$.useMemo(()=>h,Object.values(h));return $.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=$.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=r.map(a=>$.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,YB(o,...t)]}function YB(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ai(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const yc=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zi.apply(null,arguments)}function XB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SE(...e){return t=>e.forEach(r=>XB(r,t))}function Zi(...e){return $.useCallback(SE(...e),e)}const Hm=$.forwardRef((e,t)=>{const{children:r,...n}=e,o=$.Children.toArray(r),i=o.find(e5);if(i){const a=i.props.children,s=o.map(c=>c===i?$.Children.count(a)>1?$.Children.only(null):$.isValidElement(a)?a.props.children:null:c);return $.createElement(Wm,zi({},n,{ref:t}),$.isValidElement(a)?$.cloneElement(a,void 0,s):null)}return $.createElement(Wm,zi({},n,{ref:t}),r)});Hm.displayName="Slot";const Wm=$.forwardRef((e,t)=>{const{children:r,...n}=e;return $.isValidElement(r)?$.cloneElement(r,{...t5(n,r.props),ref:t?SE(t,r.ref):r.ref}):$.Children.count(r)>1?$.Children.only(null):null});Wm.displayName="SlotClone";const QB=({children:e})=>$.createElement($.Fragment,null,e);function e5(e){return $.isValidElement(e)&&e.type===QB}function t5(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=$.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Hm:t;return $.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),$.createElement(s,zi({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r5(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}const _E="Avatar",[n5,Nxe]=Vm(_E),[o5,EE]=n5(_E),kE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=$.useState("idle");return $.createElement(o5,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},$.createElement(In.span,vr({},n,{ref:t})))}),i5="AvatarImage",TE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=EE(i5,r),s=s5(n),c=ai(l=>{o(l),a.onImageLoadingStatusChange(l)});return yc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?$.createElement(In.img,vr({},i,{ref:t,src:n})):null}),a5="AvatarFallback",$E=$.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=EE(a5,r),[a,s]=$.useState(n===void 0);return $.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?$.createElement(In.span,vr({},o,{ref:t})):null});function s5(e){const[t,r]=$.useState("idle");return $.useEffect(()=>{if(!e){r("error");return}let n=!0;const o=new window.Image,i=a=>()=>{n&&r(a)};return r("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{n=!1}},[e]),t}function Km(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(c=>c+c).join(""));const o=parseInt(n,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function c5(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const l5=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function OE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const u5=2.4,d5=.2126729,f5=.7151522,p5=.072175,h5=.56,m5=.57,y5=.62,g5=.65,Cd=.022,CE=1.414,v5=1.14,b5=1.14,w5=.035991,x5=.035991,S5=27.7847239587675,_5=27.7847239587675,AE=.027,IE=.027,RE=.001,E5=5e-4;function PE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**u5;return d5*o(t)+f5*o(r)+p5*o(n)}function NE(e,t){if(!e||!t)return 0;let r=PE(Km(e)),n=PE(Km(t)),o=0,i=0;return r=r>Cd?r:r+(Cd-r)**CE,n=n>Cd?n:n+(Cd-n)**CE,Math.abs(n-r)<E5?0:(n>r?(o=(n**h5-r**m5)*v5,i=o<RE?0:o<w5?o-o*S5*AE:o-AE):(o=(n**g5-r**y5)*b5,i=o>-RE?0:o>-x5?o-o*_5*IE:o+IE),Math.abs(i*100))}let Gm=class{constructor(){k(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var o;(o=this.eventMap[t])==null||o.delete(r)}}emit(t,r){var n,o;(n=this.eventMap[t])==null||n.forEach(i=>{i(r)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:r})})}};const k5=new Gm;function ME(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function jE(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r)%t}var DE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",d="month",p="quarter",f="year",h="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,v={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(B){var F=["th","st","nd","rd"],j=B%100;return"["+B+(F[(j-20)%10]||F[j]||F[0])+"]"}},b=function(B,F,j){var U=String(B);return!U||U.length>=F?B:""+Array(F+1-U.length).join(j)+B},x={s:b,z:function(B){var F=-B.utcOffset(),j=Math.abs(F),U=Math.floor(j/60),K=j%60;return(F<=0?"+":"-")+b(U,2,"0")+":"+b(K,2,"0")},m:function B(F,j){if(F.date()<j.date())return-B(j,F);var U=12*(j.year()-F.year())+(j.month()-F.month()),K=F.clone().add(U,d),D=j-K<0,E=F.clone().add(U+(D?-1:1),d);return+(-(U+(j-K)/(D?K-E:E-K))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},w="en",S={};S[w]=v;var C="$isDayjsObject",I=function(B){return B instanceof W||!(!B||!B[C])},P=function B(F,j,U){var K;if(!F)return w;if(typeof F=="string"){var D=F.toLowerCase();S[D]&&(K=D),j&&(S[D]=j,K=D);var E=F.split("-");if(!K&&E.length>1)return B(E[0])}else{var H=F.name;S[H]=F,K=H}return!U&&K&&(w=K),K||!U&&w},A=function(B,F){if(I(B))return B.clone();var j=typeof F=="object"?F:{};return j.date=B,j.args=arguments,new W(j)},L=x;L.l=P,L.i=I,L.w=function(B,F){return A(B,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var W=function(){function B(j){this.$L=P(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[C]=!0}var F=B.prototype;return F.parse=function(j){this.$d=function(U){var K=U.date,D=U.utc;if(K===null)return new Date(NaN);if(L.u(K))return new Date;if(K instanceof Date)return new Date(K);if(typeof K=="string"&&!/Z$/i.test(K)){var E=K.match(m);if(E){var H=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return D?new Date(Date.UTC(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(K)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return L},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(j,U){var K=A(j);return this.startOf(U)<=K&&K<=this.endOf(U)},F.isAfter=function(j,U){return A(j)<this.startOf(U)},F.isBefore=function(j,U){return this.endOf(U)<A(j)},F.$g=function(j,U,K){return L.u(j)?this[U]:this.set(K,j)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(j,U){var K=this,D=!!L.u(U)||U,E=L.p(j),H=function(Ce,be){var de=L.w(K.$u?Date.UTC(K.$y,be,Ce):new Date(K.$y,be,Ce),K);return D?de:de.endOf(l)},Q=function(Ce,be){return L.w(K.toDate()[Ce].apply(K.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(be)),K)},T=this.$W,ce=this.$M,pe=this.$D,fe="set"+(this.$u?"UTC":"");switch(E){case f:return D?H(1,0):H(31,11);case d:return D?H(1,ce):H(0,ce+1);case u:var ve=this.$locale().weekStart||0,_e=(T<ve?T+7:T)-ve;return H(D?pe-_e:pe+(6-_e),ce);case l:case h:return Q(fe+"Hours",0);case c:return Q(fe+"Minutes",1);case s:return Q(fe+"Seconds",2);case a:return Q(fe+"Milliseconds",3);default:return this.clone()}},F.endOf=function(j){return this.startOf(j,!1)},F.$set=function(j,U){var K,D=L.p(j),E="set"+(this.$u?"UTC":""),H=(K={},K[l]=E+"Date",K[h]=E+"Date",K[d]=E+"Month",K[f]=E+"FullYear",K[c]=E+"Hours",K[s]=E+"Minutes",K[a]=E+"Seconds",K[i]=E+"Milliseconds",K)[D],Q=D===l?this.$D+(U-this.$W):U;if(D===d||D===f){var T=this.clone().set(h,1);T.$d[H](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else H&&this.$d[H](Q);return this.init(),this},F.set=function(j,U){return this.clone().$set(j,U)},F.get=function(j){return this[L.p(j)]()},F.add=function(j,U){var K,D=this;j=Number(j);var E=L.p(U),H=function(ce){var pe=A(D);return L.w(pe.date(pe.date()+Math.round(ce*j)),D)};if(E===d)return this.set(d,this.$M+j);if(E===f)return this.set(f,this.$y+j);if(E===l)return H(1);if(E===u)return H(7);var Q=(K={},K[s]=n,K[c]=o,K[a]=r,K)[E]||1,T=this.$d.getTime()+j*Q;return L.w(T,this)},F.subtract=function(j,U){return this.add(-1*j,U)},F.format=function(j){var U=this,K=this.$locale();if(!this.isValid())return K.invalidDate||y;var D=j||"YYYY-MM-DDTHH:mm:ssZ",E=L.z(this),H=this.$H,Q=this.$m,T=this.$M,ce=K.weekdays,pe=K.months,fe=K.meridiem,ve=function(be,de,te,we){return be&&(be[de]||be(U,D))||te[de].slice(0,we)},_e=function(be){return L.s(H%12||12,be,"0")},Ce=fe||function(be,de,te){var we=be<12?"AM":"PM";return te?we.toLowerCase():we};return D.replace(g,function(be,de){return de||function(te){switch(te){case"YY":return String(U.$y).slice(-2);case"YYYY":return L.s(U.$y,4,"0");case"M":return T+1;case"MM":return L.s(T+1,2,"0");case"MMM":return ve(K.monthsShort,T,pe,3);case"MMMM":return ve(pe,T);case"D":return U.$D;case"DD":return L.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return ve(K.weekdaysMin,U.$W,ce,2);case"ddd":return ve(K.weekdaysShort,U.$W,ce,3);case"dddd":return ce[U.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Ce(H,Q,!0);case"A":return Ce(H,Q,!1);case"m":return String(Q);case"mm":return L.s(Q,2,"0");case"s":return String(U.$s);case"ss":return L.s(U.$s,2,"0");case"SSS":return L.s(U.$ms,3,"0");case"Z":return E}return null}(be)||E.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(j,U,K){var D,E=this,H=L.p(U),Q=A(j),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return L.m(E,Q)};switch(H){case f:D=pe()/12;break;case d:D=pe();break;case p:D=pe()/3;break;case u:D=(ce-T)/6048e5;break;case l:D=(ce-T)/864e5;break;case c:D=ce/o;break;case s:D=ce/n;break;case a:D=ce/r;break;default:D=ce}return K?D:L.a(D)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return S[this.$L]},F.locale=function(j,U){if(!j)return this.$L;var K=this.clone(),D=P(j,U,!0);return D&&(K.$L=D),K},F.clone=function(){return L.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},B}(),Z=W.prototype;return A.prototype=Z,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(B){Z[B[1]]=function(F){return this.$g(F,B[0],B[1])}}),A.extend=function(B,F){return B.$i||(B(F,W,A),B.$i=!0),A},A.locale=P,A.isDayjs=I,A.unix=function(B){return A(1e3*B)},A.en=S[w],A.Ls=S,A.p={},A})})(DE);var T5=DE.exports;const Ad=St(T5);var LE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(LE);var $5=LE.exports;const O5=St($5);var FE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(FE);var C5=FE.exports;const A5=St(C5);Ad.extend(O5),Ad.extend(A5);function I5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(qE(e[0].timestamp));for(let n=0;n<e.length;n++)if(r.push(e[n]),n+1<e.length){const o=e[n].timestamp,i=e[n+1].timestamp;Ad(o).isSame(i,t)||r.push(qE(i))}return r}function qE(e){return{id:Td(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:R5(e)}}}function R5(e,t=!1){const r=Ad(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.format("YYYY-MM-DD")}function P5(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function N5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function M5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function j5(e,t){return e.map(r=>Math.round(r*t))}const gc=e=>t=>M5(t,e),vc=e=>t=>j5(t,e),D5={50:gc(.95),100:gc(.9),200:gc(.75),300:gc(.6),400:gc(.3),500:e=>e,600:vc(.9),700:vc(.6),800:vc(.45),900:vc(.3),950:vc(.2)};function BE(e,t=D5){const r={},n=P5(e);for(const[o,i]of Object.entries(t))r[o]=N5(i(n));return r}var Nt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Nt||(Nt={}));var Jm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Jm||(Jm={}));const Ne=Nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Ee=Nt.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"]),L5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vn extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Vn.create=e=>new Vn(e);const bc=(e,t)=>{let r;switch(e.code){case Ee.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Nt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${Nt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:r="Invalid input";break;case Ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Nt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:r=`Invalid enum value. Expected ${Nt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:r="Invalid function arguments";break;case Ee.invalid_return_type:r="Invalid function return type";break;case Ee.invalid_date:r="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ee.custom:r="Invalid input";break;case Ee.invalid_intersection_types:r="Intersection results could not be merged";break;case Ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,Nt.assertNever(e)}return{message:r}};let UE=bc;function F5(e){UE=e}function Id(){return UE}const Rd=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};let s="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},q5=[];function Me(e,t){const r=Rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Id(),bc].filter(n=>!!n)});e.common.issues.push(r)}class Hr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return st;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r)n.push({key:await o.key,value:await o.value});return Hr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return st;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}}const st=Object.freeze({status:"aborted"}),zE=e=>({status:"dirty",value:e}),nn=e=>({status:"valid",value:e}),Ym=e=>e.status==="aborted",Xm=e=>e.status==="dirty",wc=e=>e.status==="valid",Pd=e=>typeof Promise<"u"&&e instanceof Promise;var Ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ye||(Ye={}));class so{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}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 ZE=(e,t)=>{if(wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Vn(e.common.issues);return this._error=r,this._error}}};function dt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:n??s.defaultError}:{message:r??s.defaultError},description:o}}class mt{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 si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hr,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Pd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ZE(o,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Pd(o)?o:Promise.resolve(o));return ZE(n,i)}refine(t,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:Ee.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Kn({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Lo.create(this,this._def)}nullable(){return Ki.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return Ec.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Kn({...dt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Ac({...dt(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new HE({typeName:nt.ZodBranded,type:this,...dt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fd({...dt(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ic.create(this,t)}readonly(){return Bd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const B5=/^c[^\s-]{8,}$/i,U5=/^[a-z][a-z0-9]*$/,z5=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z5=/^[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,V5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qm;const W5=/^(((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}))$/,K5=/^(([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})))$/,G5=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 J5(e,t){return!!((t==="v4"||!t)&&W5.test(e)||(t==="v6"||!t)&&K5.test(e))}class Hn extends mt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.string,received:i.parsedType}),st}const n=new Hr;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")V5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Qm||(Qm=new RegExp(H5,"u")),Qm.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")B5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")U5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Me(o,{validation:"url",code:Ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"regex",code:Ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?G5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="ip"?J5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ip",code:Ee.invalid_string,message:i.message}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:Ee.invalid_string,...Ye.errToObj(n)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ye.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Ye.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ye.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ye.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ye.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ye.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ye.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ye.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ye.errToObj(r)})}nonempty(t){return this.min(1,Ye.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:nt.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};function Y5(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ci extends mt{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)!==Ne.number){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.number,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="int"?Nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Y5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_finite,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ci.create=e=>new ci({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class li extends mt{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)!==Ne.bigint){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.bigint,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}li.create=e=>{var t;return new li({checks:[],typeName:nt.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};class xc extends mt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.boolean,received:n.parsedType}),st}return nn(t.data)}}xc.create=e=>new xc({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class Vi extends mt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.date,received:i.parsedType}),st}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_date}),st}const n=new Hr;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ye.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ye.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Vi.create=e=>new Vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...dt(e)});class Nd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.symbol,received:n.parsedType}),st}return nn(t.data)}}Nd.create=e=>new Nd({typeName:nt.ZodSymbol,...dt(e)});class Sc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.undefined,received:n.parsedType}),st}return nn(t.data)}}Sc.create=e=>new Sc({typeName:nt.ZodUndefined,...dt(e)});class _c extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.null,received:n.parsedType}),st}return nn(t.data)}}_c.create=e=>new _c({typeName:nt.ZodNull,...dt(e)});class qa extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return nn(t.data)}}qa.create=e=>new qa({typeName:nt.ZodAny,...dt(e)});class Hi extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return nn(t.data)}}Hi.create=e=>new Hi({typeName:nt.ZodUnknown,...dt(e)});class Do extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Ee.invalid_type,expected:Ne.never,received:r.parsedType}),st}}Do.create=e=>new Do({typeName:nt.ZodNever,...dt(e)});class Md extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.void,received:n.parsedType}),st}return nn(t.data)}}Md.create=e=>new Md({typeName:nt.ZodVoid,...dt(e)});class Wn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:Ee.invalid_type,expected:Ne.array,received:r.parsedType}),st;if(o.exactLength!==null){const a=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(a||s)&&(Me(r,{code:a?Ee.too_big:Ee.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Me(r,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Me(r,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new so(r,a,r.path,s)))).then(a=>Hr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new so(r,a,r.path,s)));return Hr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Wn({...this._def,minLength:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wn({...this._def,maxLength:{value:t,message:Ye.toString(r)}})}length(t,r){return new Wn({...this._def,exactLength:{value:t,message:Ye.toString(r)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...dt(t)});function Ba(e){if(e instanceof er){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Lo.create(Ba(n))}return new er({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:Ba(e.element)}):e instanceof Lo?Lo.create(Ba(e.unwrap())):e instanceof Ki?Ki.create(Ba(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Ba(t))):e}class er extends mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Ne.object){const l=this._getOrReturnCtx(t);return Me(l,{code:Ee.invalid_type,expected:Ne.object,received:l.parsedType}),st}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new so(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Do){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(Me(o,{code:Ee.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new so(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Hr.mergeObjectSync(n,l)):Hr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ye.errToObj,new er({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Ye.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(t){return new er({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new er({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new er({...this._def,catchall:t})}pick(t){const r={};return Nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}omit(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}deepPartial(){return Ba(this)}partial(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new er({...this._def,shape:()=>r})}required(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Lo;)i=i._def.innerType;r[n]=i}}),new er({...this._def,shape:()=>r})}keyof(){return VE(Nt.objectKeys(this.shape))}}er.create=(e,t)=>new er({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.strictCreate=(e,t)=>new er({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.lazycreate=(e,t)=>new er({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)});class Ec extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Vn(s.ctx.common.issues));return Me(r,{code:Ee.invalid_union,unionErrors:a}),st}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Vn(c));return Me(r,{code:Ee.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}Ec.create=(e,t)=>new Ec({options:e,typeName:nt.ZodUnion,...dt(t)});const jd=e=>e instanceof $c?jd(e.schema):e instanceof Kn?jd(e.innerType()):e instanceof Oc?[e.value]:e instanceof ui?e.options:e instanceof Cc?Object.keys(e.enum):e instanceof Ac?jd(e._def.innerType):e instanceof Sc?[void 0]:e instanceof _c?[null]:null;class Dd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:Ee.invalid_type,expected:Ne.object,received:r.parsedType}),st;const n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Me(r,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),st)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const i of r){const a=jd(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dd({typeName:nt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...dt(n)})}}function ey(e,t){const r=si(e),n=si(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Nt.objectKeys(t),i=Nt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=ey(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===Ne.array&&n===Ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=ey(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===Ne.date&&n===Ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(Ym(i)||Ym(a))return st;const s=ey(i.value,a.value);return s.valid?((Xm(i)||Xm(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:Ee.invalid_intersection_types}),st)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}kc.create=(e,t,r)=>new kc({left:e,right:t,typeName:nt.ZodIntersection,...dt(r)});class co extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:Ee.invalid_type,expected:Ne.array,received:n.parsedType}),st;if(n.data.length<this._def.items.length)return Me(n,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new so(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Hr.mergeArray(r,a)):Hr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:nt.ZodTuple,rest:null,...dt(t)})};class Tc extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.object)return Me(n,{code:Ee.invalid_type,expected:Ne.object,received:n.parsedType}),st;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new so(n,s,n.path,s)),value:a._parse(new so(n,n.data[s],n.path,s))});return n.common.async?Hr.mergeObjectAsync(r,o):Hr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new Tc({keyType:t,valueType:r,typeName:nt.ZodRecord,...dt(n)}):new Tc({keyType:Hn.create(),valueType:t,typeName:nt.ZodRecord,...dt(r)})}}class Ld extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.map)return Me(n,{code:Ee.invalid_type,expected:Ne.map,received:n.parsedType}),st;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new so(n,s,n.path,[l,"key"])),value:i._parse(new so(n,c,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Ld.create=(e,t,r)=>new Ld({valueType:t,keyType:e,typeName:nt.ZodMap,...dt(r)});class Wi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:Ee.invalid_type,expected:Ne.set,received:n.parsedType}),st;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Me(n,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return st;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((c,l)=>i._parse(new so(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Wi({...this._def,minSize:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wi({...this._def,maxSize:{value:t,message:Ye.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Wi.create=(e,t)=>new Wi({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...dt(t)});class Ua extends mt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.function)return Me(r,{code:Ee.invalid_type,expected:Ne.function,received:r.parsedType}),st;function n(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_arguments,argumentsError:c}})}function o(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof za){const s=this;return nn(async function(...c){const l=new Vn([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(n(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return nn(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Vn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ua({...this._def,args:co.create(t).rest(Hi.create())})}returns(t){return new Ua({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ua({args:t||co.create([]).rest(Hi.create()),returns:r||Hi.create(),typeName:nt.ZodFunction,...dt(n)})}}class $c extends mt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$c.create=(e,t)=>new $c({getter:e,typeName:nt.ZodLazy,...dt(t)});class Oc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:Ee.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}Oc.create=(e,t)=>new Oc({value:e,typeName:nt.ZodLiteral,...dt(t)});function VE(e,t){return new ui({values:e,typeName:nt.ZodEnum,...dt(t)})}class ui extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Nt.joinValues(n),received:r.parsedType,code:Ee.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:Ee.invalid_enum_value,options:n}),st}return nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return ui.create(t)}exclude(t){return ui.create(this.options.filter(r=>!t.includes(r)))}}ui.create=VE;class Cc extends mt{_parse(t){const r=Nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Nt.objectValues(r);return Me(n,{expected:Nt.joinValues(o),received:n.parsedType,code:Ee.invalid_type}),st}if(r.indexOf(t.data)===-1){const o=Nt.objectValues(r);return Me(n,{received:n.data,code:Ee.invalid_enum_value,options:o}),st}return nn(t.data)}get enum(){return this._def.values}}Cc.create=(e,t)=>new Cc({values:e,typeName:nt.ZodNativeEnum,...dt(t)});class za extends mt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.promise&&r.common.async===!1)return Me(r,{code:Ee.invalid_type,expected:Ne.promise,received:r.parsedType}),st;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return nn(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:nt.ZodPromise,...dt(t)});class Kn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{Me(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(n.data,i);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wc(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>wc(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Nt.assertNever(o)}}Kn.create=(e,t,r)=>new Kn({schema:e,typeName:nt.ZodEffects,effect:t,...dt(r)}),Kn.createWithPreprocess=(e,t,r)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...dt(r)});class Lo extends mt{_parse(t){return this._getType(t)===Ne.undefined?nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lo.create=(e,t)=>new Lo({innerType:e,typeName:nt.ZodOptional,...dt(t)});class Ki extends mt{_parse(t){return this._getType(t)===Ne.null?nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ki.create=(e,t)=>new Ki({innerType:e,typeName:nt.ZodNullable,...dt(t)});class Ac extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ne.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ac.create=(e,t)=>new Ac({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...dt(t)});class Fd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Fd.create=(e,t)=>new Fd({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...dt(t)});class qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.nan,received:n.parsedType}),st}return{status:"valid",value:t.data}}}qd.create=e=>new qd({typeName:nt.ZodNaN,...dt(e)});const X5=Symbol("zod_brand");class HE extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ic extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?st:i.status==="dirty"?(r.dirty(),zE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?st:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new Ic({in:t,out:r,typeName:nt.ZodPipeline})}}class Bd extends mt{_parse(t){const r=this._def.innerType._parse(t);return wc(r)&&(r.value=Object.freeze(r.value)),r}}Bd.create=(e,t)=>new Bd({innerType:e,typeName:nt.ZodReadonly,...dt(t)});const WE=(e,t={},r)=>e?qa.create().superRefine((n,o)=>{var i,a;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):qa.create(),Q5={object:er.lazycreate};var nt;(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"})(nt||(nt={}));const eU=(e,t={message:`Input not instance of ${e.name}`})=>WE(r=>r instanceof e,t),KE=Hn.create,GE=ci.create,tU=qd.create,rU=li.create,JE=xc.create,nU=Vi.create,oU=Nd.create,iU=Sc.create,aU=_c.create,sU=qa.create,cU=Hi.create,lU=Do.create,uU=Md.create,dU=Wn.create,fU=er.create,pU=er.strictCreate,hU=Ec.create,mU=Dd.create,yU=kc.create,gU=co.create,vU=Tc.create,bU=Ld.create,wU=Wi.create,xU=Ua.create,SU=$c.create,_U=Oc.create,EU=ui.create,kU=Cc.create,TU=za.create,YE=Kn.create,$U=Lo.create,OU=Ki.create,CU=Kn.createWithPreprocess,AU=Ic.create;var V=Object.freeze({__proto__:null,defaultErrorMap:bc,setErrorMap:F5,getErrorMap:Id,makeIssue:Rd,EMPTY_PATH:q5,addIssueToContext:Me,ParseStatus:Hr,INVALID:st,DIRTY:zE,OK:nn,isAborted:Ym,isDirty:Xm,isValid:wc,isAsync:Pd,get util(){return Nt},get objectUtil(){return Jm},ZodParsedType:Ne,getParsedType:si,ZodType:mt,ZodString:Hn,ZodNumber:ci,ZodBigInt:li,ZodBoolean:xc,ZodDate:Vi,ZodSymbol:Nd,ZodUndefined:Sc,ZodNull:_c,ZodAny:qa,ZodUnknown:Hi,ZodNever:Do,ZodVoid:Md,ZodArray:Wn,ZodObject:er,ZodUnion:Ec,ZodDiscriminatedUnion:Dd,ZodIntersection:kc,ZodTuple:co,ZodRecord:Tc,ZodMap:Ld,ZodSet:Wi,ZodFunction:Ua,ZodLazy:$c,ZodLiteral:Oc,ZodEnum:ui,ZodNativeEnum:Cc,ZodPromise:za,ZodEffects:Kn,ZodTransformer:Kn,ZodOptional:Lo,ZodNullable:Ki,ZodDefault:Ac,ZodCatch:Fd,ZodNaN:qd,BRAND:X5,ZodBranded:HE,ZodPipeline:Ic,ZodReadonly:Bd,custom:WE,Schema:mt,ZodSchema:mt,late:Q5,get ZodFirstPartyTypeKind(){return nt},coerce:{string:e=>Hn.create({...e,coerce:!0}),number:e=>ci.create({...e,coerce:!0}),boolean:e=>xc.create({...e,coerce:!0}),bigint:e=>li.create({...e,coerce:!0}),date:e=>Vi.create({...e,coerce:!0})},any:sU,array:dU,bigint:rU,boolean:JE,date:nU,discriminatedUnion:mU,effect:YE,enum:EU,function:xU,instanceof:eU,intersection:yU,lazy:SU,literal:_U,map:bU,nan:tU,nativeEnum:kU,never:lU,null:aU,nullable:OU,number:GE,object:fU,oboolean:()=>JE().optional(),onumber:()=>GE().optional(),optional:$U,ostring:()=>KE().optional(),pipeline:AU,preprocess:CU,promise:TU,record:vU,set:wU,strictObject:pU,string:KE,symbol:oU,transformer:YE,tuple:gU,undefined:iU,union:hU,unknown:cU,void:uU,NEVER:st,ZodIssueCode:Ee,quotelessJson:L5,ZodError:Vn});const Za=V.object({title:V.string(),link:V.string().optional()}),ty=V.object({color:V.string().optional(),variant:V.enum(["soft","solid"]).optional(),themeMode:V.enum(["light","dark"]).optional(),fontFamily:V.enum(["rubik","inter","ibm","fira"]).optional(),radius:V.number().min(.5).max(4).optional()}),XE=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Za.optional(),email:Za.optional(),phone:Za.optional(),privacyPolicy:Za.optional(),termsOfService:Za.optional(),showPoweredBy:V.boolean().optional()}).merge(ty),QE=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),ek=V.object({}).passthrough().transform(e=>e),Oe=V.object({className:V.string().optional(),style:ek.optional()}),Ud=V.object({container:Oe.optional(),image:Oe.optional(),fallback:Oe.optional()}),tk=V.object({button:Oe.optional(),text:V.record(QE,Oe.optional()),image:V.object({image:Oe.optional(),placeholder:Oe.optional()}).optional(),audio:Oe.optional(),video:Oe.optional(),file:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),location:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),column:Oe.optional(),row:Oe.optional(),bubble:Oe.optional(),carousel:V.object({container:Oe.optional(),slidesContainer:Oe.optional(),backButton:Oe.optional(),nextButton:Oe.optional()}).optional(),dropdown:V.object({button:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional()}).optional(),content:V.object({container:Oe.optional(),item:Oe.optional()}).optional()}).optional()}),rk=V.object({container:Oe.optional(),modal:V.object({overlay:Oe.optional(),container:Oe.optional(),dialog:V.object({container:Oe.optional(),title:V.object({container:Oe.optional(),text:Oe.optional(),closeIcon:Oe.optional()}).optional(),content:Oe.optional(),newConversation:V.object({text:Oe.optional(),button:Oe.optional()}).optional()}).optional()}).optional(),notification:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),icon:Oe.optional(),closeIcon:Oe.optional()}).optional(),header:V.object({container:Oe.optional(),content:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),actions:V.object({container:Oe.optional(),icons:Oe.optional()}).optional()}),expandedContent:V.object({container:Oe.optional(),group:Oe.optional(),descriptionItems:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional(),link:Oe.optional(),poweredBy:Oe.optional()}).optional()}).optional(),description:V.object({container:Oe.optional(),title:Oe.optional(),subtitle:Oe.optional()}).optional(),newConversationIcon:Oe.optional()}).optional(),composer:V.object({container:Oe.optional(),input:Oe.optional(),uploadButton:V.object({container:Oe.optional(),icon:Oe.optional()}).optional(),button:V.object({container:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),fab:V.object({icon:Oe.optional(),container:Oe.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:Oe.optional(),viewport:Oe.optional(),thumb:Oe.optional(),corner:Oe.optional(),background:Oe.optional()}).optional(),container:Oe.optional(),marquee:V.object({content:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),container:Oe.optional()}).optional(),scrollDownButton:V.object({container:Oe.optional(),button:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),message:V.object({container:Oe.optional(),avatar:Ud.optional(),blocks:tk.optional()}).optional(),loadingIndicator:V.object({container:Oe.optional(),loader:Oe.optional()}).optional()}),nk=V.enum(["opened","closed","initial"]),ok=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),ik=V.enum(["messaging","pushpin"]),ak=V.object({configuration:XE.optional().catch(void 0),theme:rk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:ok.optional().catch(void 0)}),IU=ak.extend({clientId:V.string(),botId:V.string(),selector:V.string().optional().catch(void 0),webchatScriptUrl:V.string().optional().catch(void 0),fabScriptUrl:V.string().optional().catch(void 0),messagingUrl:V.string().optional().catch(void 0),pushpinUrl:V.string().optional().catch(void 0),clientMode:ik.optional().catch(void 0),defaultState:nk.optional().catch(void 0)});function sk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=ty.parse(e);let a={},s;if(i){const u=BE(i),d=n==="dark"?OE(u):u,p=BE(c5(l5(Km(i)))),f=n==="dark"?OE(p):p,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:h}).reduce((m,[g,v])=>({...m,[`--bpPrimary-${g}`]:v}),{});const y=Object.entries({...f,1:h}).reduce((m,[g,v])=>({...m,[`--bpGray-${g}`]:v}),{});a={...s,...y}}r&&(a={...a,"--bpRadius-scale":r.toString()});const c=s?NE(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?NE(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 a={...a,...l},ME(":root",a)+(t?ME(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const ry=$.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=jE(e??"",15);return J.jsxs(kE,{ref:a,"data-color":s,...r,...i,children:[J.jsx(TE,{src:t,...n}),J.jsx($E,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function qxe(){}function Bxe(){}function RU(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const PU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MU={};function ck(e,t){return((t||MU).jsx?NU:PU).test(e)}const jU=/[ \t\n\f\r]/g;function DU(e){return typeof e=="object"?e.type==="text"?lk(e.value):!1:lk(e)}function lk(e){return e.replace(jU,"")===""}class Rc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Rc.prototype.property={},Rc.prototype.normal={},Rc.prototype.space=null;function uk(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new Rc(r,n,t)}function ny(e){return e.toLowerCase()}class Rn{constructor(t,r){this.property=t,this.attribute=r}}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 LU=0;const yt=Gi(),pr=Gi(),dk=Gi(),Se=Gi(),Jt=Gi(),Va=Gi(),gn=Gi();function Gi(){return 2**++LU}const oy=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:pr,commaOrSpaceSeparated:gn,commaSeparated:Va,number:Se,overloadedBoolean:dk,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),iy=Object.keys(oy);class ay extends Rn{constructor(t,r,n,o){let i=-1;if(super(t,r),fk(this,"space",o),typeof n=="number")for(;++i<iy.length;){const a=iy[i];fk(this,iy[i],(n&oy[a])===oy[a])}}}ay.prototype.defined=!0;function fk(e,t,r){r&&(e[t]=r)}const FU={}.hasOwnProperty;function Ha(e){const t={},r={};let n;for(n in e.properties)if(FU.call(e.properties,n)){const o=e.properties[n],i=new ay(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[ny(n)]=n,r[ny(i.attribute)]=n}return new Rc(t,r,e.space)}const pk=Ha({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}}),hk=Ha({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mk(e,t){return t in e?e[t]:t}function yk(e,t){return mk(e,t.toLowerCase())}const gk=Ha({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:yk,properties:{xmlns:null,xmlnsXLink:null}}),vk=Ha({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:pr,ariaAutoComplete:null,ariaBusy:pr,ariaChecked:pr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:pr,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:pr,ariaFlowTo:Jt,ariaGrabbed:pr,ariaHasPopup:null,ariaHidden:pr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:Se,ariaLive:null,ariaModal:pr,ariaMultiLine:pr,ariaMultiSelectable:pr,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:pr,ariaReadOnly:pr,ariaRelevant:null,ariaRequired:pr,ariaRoleDescription:Jt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:pr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),qU=Ha({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:yk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Va,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Jt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Jt,cols:Se,colSpan:null,content:null,contentEditable:pr,controls:yt,controlsList:Jt,coords:Se|Va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:dk,draggable:pr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Jt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:yt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yt,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:yt,muted:yt,name:null,nonce:null,noModule:yt,noValidate:yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint: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:yt,optimum:Se,pattern:null,ping:Jt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Jt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Jt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:pr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:yt,useMap:null,value:pr,width:Se,wrap:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yt,declare:yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:yt,noHref:yt,noShade:yt,noWrap:yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:pr,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yt,disableRemotePlayback:yt,prefix:null,property:null,results:Se,security:null,unselectable:null}}),BU=Ha({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",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:mk,properties:{about:gn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Jt,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Va,g2:Va,glyphName:Va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UU=/^data[-\w.:]+$/i,bk=/-[a-z]/g,zU=/[A-Z]/g;function ZU(e,t){const r=ny(t);let n=t,o=Rn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&UU.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(bk,HU);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!bk.test(i)){let a=i.replace(zU,VU);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=ay}return new o(n,t)}function VU(e){return"-"+e.toLowerCase()}function HU(e){return e.charAt(1).toUpperCase()}const WU={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"},KU=uk([hk,pk,gk,vk,qU],"html"),sy=uk([hk,pk,gk,vk,BU],"svg");function GU(e){return e.join(" ").trim()}var wk={},xk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JU=/\n/g,YU=/^\s*/,XU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QU=/^:\s*/,e4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t4=/^[;\s]*/,r4=/^\s+|\s+$/g,n4=`
104
- `,Sk="/",_k="*",Ji="",o4="comment",i4="declaration",a4=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function o(h){var y=h.match(JU);y&&(r+=y.length);var m=h.lastIndexOf(n4);n=~m?h.length-m:n+h.length}function i(){var h={line:r,column:n};return function(y){return y.position=new a(h),l(),y}}function a(h){this.start=h,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function s(h){var y=new Error(t.source+":"+r+":"+n+": "+h);if(y.reason=h,y.filename=t.source,y.line=r,y.column=n,y.source=e,!t.silent)throw y}function c(h){var y=h.exec(e);if(y){var m=y[0];return o(m),e=e.slice(m.length),y}}function l(){c(YU)}function u(h){var y;for(h=h||[];y=d();)y!==!1&&h.push(y);return h}function d(){var h=i();if(!(Sk!=e.charAt(0)||_k!=e.charAt(1))){for(var y=2;Ji!=e.charAt(y)&&(_k!=e.charAt(y)||Sk!=e.charAt(y+1));)++y;if(y+=2,Ji===e.charAt(y-1))return s("End of comment missing");var m=e.slice(2,y-2);return n+=2,o(m),e=e.slice(y),n+=2,h({type:o4,comment:m})}}function p(){var h=i(),y=c(XU);if(y){if(d(),!c(QU))return s("property missing ':'");var m=c(e4),g=h({type:i4,property:Ek(y[0].replace(xk,Ji)),value:m?Ek(m[0].replace(xk,Ji)):Ji});return c(t4),g}}function f(){var h=[];u(h);for(var y;y=p();)y!==!1&&(h.push(y),u(h));return h}return l(),f()};function Ek(e){return e?e.replace(r4,Ji):Ji}var s4=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wk,"__esModule",{value:!0});var c4=s4(a4);function l4(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,c4.default)(e),o=typeof t=="function";return n.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(r=r||{},r[a]=s)}}),r}var kk=wk.default=l4;const u4=kk.default||kk,Tk=$k("end"),cy=$k("start");function $k(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function d4(e){const t=cy(e),r=Tk(e);if(t&&r)return{start:t,end:r}}function Pc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ok(e.position):"start"in e||"end"in e?Ok(e):"line"in e||"column"in e?ly(e):""}function ly(e){return Ck(e&&e.line)+":"+Ck(e&&e.column)}function Ok(e){return ly(e&&e.start)+"-"+ly(e&&e.end)}function Ck(e){return e&&typeof e=="number"?e:1}class Wr extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",i={},a=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?i.ruleId=n:(i.source=n.slice(0,c),i.ruleId=n.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Pc(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wr.prototype.file="",Wr.prototype.name="",Wr.prototype.reason="",Wr.prototype.message="",Wr.prototype.stack="",Wr.prototype.column=void 0,Wr.prototype.line=void 0,Wr.prototype.ancestors=void 0,Wr.prototype.cause=void 0,Wr.prototype.fatal=void 0,Wr.prototype.place=void 0,Wr.prototype.ruleId=void 0,Wr.prototype.source=void 0;const uy={}.hasOwnProperty,f4=new Map,p4=/[A-Z]/g,h4=/-([a-z])/g,m4=new Set(["table","tbody","thead","tfoot","tr"]),y4=new Set(["td","th"]),Ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function g4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=k4(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=E4(r,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sy:KU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Ik(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ik(e,t,r){if(t.type==="element")return v4(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x4(e,t,r);if(t.type==="mdxjsEsm")return w4(e,t);if(t.type==="root")return S4(e,t,r);if(t.type==="text")return _4(e,t)}function v4(e,t,r){const n=e.schema;let o=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=Pk(e,t.tagName,!1),a=T4(e,t);let s=fy(e,t);return m4.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!DU(c):!0})),Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function b4(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Nc(e,t.position)}function w4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nc(e,t.position)}function x4(e,t,r){const n=e.schema;let o=n;t.name==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Pk(e,t.name,!0),a=$4(e,t),s=fy(e,t);return Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function S4(e,t,r){const n={};return dy(n,fy(e,t)),e.create(t,e.Fragment,n,r)}function _4(e,t){return t.value}function Rk(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function dy(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function E4(e,t,r){return n;function n(o,i,a,s){const l=Array.isArray(a.children)?r:t;return s?l(i,a,s):l(i,a)}}function k4(e,t){return r;function r(n,o,i,a){const s=Array.isArray(i.children),c=cy(n);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function T4(e,t){const r={};let n,o;for(o in t.properties)if(o!=="children"&&uy.call(t.properties,o)){const i=O4(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&y4.has(t.tagName)?n=s:r[a]=s}}if(n){const i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function $4(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Nc(e,t.position);else{const o=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Nc(e,t.position);else i=n.value===null?!0:n.value;r[o]=i}return r}function fy(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:f4;for(;++n<t.children.length;){const i=t.children[n];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=Ik(e,i,a);s!==void 0&&r.push(s)}return r}function O4(e,t,r){const n=ZU(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?RU(r):GU(r)),n.property==="style"){let o=typeof r=="object"?r:C4(e,String(r));return e.stylePropertyNameCase==="css"&&(o=A4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?WU[n.property]||n.property:n.attribute,r]}}function C4(e,t){const r={};try{u4(t,n)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Wr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ak+"#cannot-parse-style-attribute",a}}return r;function n(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(h4,R4)),r[a]=i}}function Pk(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=ck(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}n=a}else n=ck(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return uy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Nc(e)}function Nc(e,t){const r=new Wr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ak+"#cannot-handle-mdx-estrees-without-createevaluater",r}function A4(e){const t={};let r;for(r in e)uy.call(e,r)&&(t[I4(r)]=e[r]);return t}function I4(e){let t=e.replace(p4,P4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R4(e,t){return t.toUpperCase()}function P4(e){return"-"+e.toLowerCase()}const py={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"]},N4={};function hy(e,t){const r=t||N4,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Nk(e,n,o)}function Nk(e,t,r){if(M4(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mk(e.children,t,r)}return Array.isArray(e)?Mk(e,t,r):""}function Mk(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=Nk(e[o],t,r);return n.join("")}function M4(e){return!!(e&&typeof e=="object")}const jk=document.createElement("i");function my(e){const t="&"+e+";";jk.innerHTML=t;const r=jk.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function vn(e,t,r,n){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);i<n.length;)a=n.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Pn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const Dk={}.hasOwnProperty;function Lk(e){const t={};let r=-1;for(;++r<e.length;)j4(t,e[r]);return t}function j4(e,t){let r;for(r in t){const o=(Dk.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){Dk.call(o,a)||(o[a]=[]);const s=i[a];D4(o[a],Array.isArray(s)?s:s?[s]:[])}}}function D4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);vn(e,0,0,n)}function Fk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=di(/[A-Za-z]/),Kr=di(/[\dA-Za-z]/),L4=di(/[#-'*+\--9=?A-Z^-~]/);function zd(e){return e!==null&&(e<32||e===127)}const yy=di(/\d/),F4=di(/[\dA-Fa-f]/),q4=di(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const Zd=di(/\p{P}|\p{S}/u),Yi=di(/\s/);function di(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Wa(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const i=e.charCodeAt(r);let a="";if(i===37&&Kr(e.charCodeAt(r+1))&&Kr(e.charCodeAt(r+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(r+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+o+1,a=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function Ct(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return xt(c)?(e.enter(r),s(c)):t(c)}function s(c){return xt(c)&&i++<o?(e.consume(c),s):(e.exit(r),t(c))}}const B4={tokenize:U4};function U4(e){const t=e.attempt(this.parser.constructs.contentInitial,n,o);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return et(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const z4={tokenize:Z4},qk={tokenize:V4};function Z4(e){const t=this,r=[];let n=0,o,i,a;return s;function s(b){if(n<r.length){const x=r[n];return t.containerState=x[1],e.attempt(x[0].continuation,c,l)(b)}return l(b)}function c(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const x=t.events.length;let w=x,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}g(n);let C=x;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},S),C++;return vn(t.events,w+1,0,t.events.slice(x)),t.events.length=C,l(b)}return s(b)}function l(b){if(n===r.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qk,u,d)(b)}function u(b){return o&&v(),g(n),p(b)}function d(b){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(qk,f,h)(b)}function f(b){return n++,r.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&v(),g(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),y(b)}function y(b){if(b===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return et(b)?(e.consume(b),m(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(b),y)}function m(b,x){const w=t.sliceStream(b);if(x&&w.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(w),t.parser.lazy[b.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<a&&(!o.events[S][1].end||o.events[S][1].end.offset>a))return;const C=t.events.length;let I=C,P,A;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){A=t.events[I][1].end;break}P=!0}for(g(n),S=C;S<t.events.length;)t.events[S][1].end=Object.assign({},A),S++;vn(t.events,I+1,0,t.events.slice(C)),t.events.length=S}}function g(b){let x=r.length;for(;x-- >b;){const w=r[x];t.containerState=w[1],w[0].exit.call(t,e)}r.length=b}function v(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function V4(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vd(e){if(e===null||zt(e)||Yi(e))return 1;if(Zd(e))return 2}function Hd(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const gy={name:"attention",tokenize:W4,resolveAll:H4};function H4(e,t){let r=-1,n,o,i,a,s,c,l,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;c=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),p=Object.assign({},e[r][1].start);Bk(d,-c),Bk(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},a.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Pn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Pn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Pn(l,Hd(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Pn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,l=Pn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,vn(e,n-1,r-n+3,l),r=n+l.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function W4(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=Vd(n);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=Vd(c),d=!u||u===2&&o||r.includes(c),p=!o||o===2&&u||r.includes(n);return l._open=!!(i===42?d:d&&(o||!p)),l._close=!!(i===42?p:p&&(u||!d)),t(c)}}function Bk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const K4={name:"autolink",tokenize:G4};function G4(e,t,r){let n=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return on(f)?(e.consume(f),a):l(f)}function a(f){return f===43||f===45||f===46||Kr(f)?(n=1,s(f)):l(f)}function s(f){return f===58?(e.consume(f),n=0,c):(f===43||f===45||f===46||Kr(f))&&n++<32?(e.consume(f),s):(n=0,l(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zd(f)?r(f):(e.consume(f),c)}function l(f){return f===64?(e.consume(f),u):L4(f)?(e.consume(f),l):r(f)}function u(f){return Kr(f)?d(f):r(f)}function d(f){return f===46?(e.consume(f),n=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Kr(f))&&n++<63){const h=f===45?p:d;return e.consume(f),h}return r(f)}}const Mc={tokenize:J4,partial:!0};function J4(e,t,r){return n;function n(i){return xt(i)?Ct(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||et(i)?t(i):r(i)}}const Uk={name:"blockQuote",tokenize:Y4,continuation:{tokenize:X4},exit:Q4};function Y4(e,t,r){const n=this;return o;function o(a){if(a===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return r(a)}function i(a){return xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function X4(e,t,r){const n=this;return o;function o(a){return xt(a)?Ct(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Uk,t,r)(a)}}function Q4(e){e.exit("blockQuote")}const zk={name:"characterEscape",tokenize:ez};function ez(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return q4(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const Zk={name:"characterReference",tokenize:tz};function tz(e,t,r){const n=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Kr,u(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=F4,u):(e.enter("characterReferenceValue"),i=7,a=yy,u(d))}function u(d){if(d===59&&o){const p=e.exit("characterReferenceValue");return a===Kr&&!my(n.sliceSerialize(p))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):r(d)}}const Vk={tokenize:nz,partial:!0},Hk={name:"codeFenced",tokenize:rz,concrete:!0};function rz(e,t,r){const n=this,o={tokenize:w,partial:!0};let i=0,a=0,s;return c;function c(S){return l(S)}function l(S){const C=n.events[n.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===s?(a++,e.consume(S),u):a<3?r(S):(e.exit("codeFencedFenceSequence"),xt(S)?Ct(e,d,"whitespace")(S):d(S))}function d(S){return S===null||et(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check(Vk,y,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):xt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,f,"whitespace")(S)):S===96&&S===s?r(S):(e.consume(S),p)}function f(S){return S===null||et(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?r(S):(e.consume(S),h)}function y(S){return e.attempt(o,x,m)(S)}function m(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return i>0&&xt(S)?Ct(e,v,"linePrefix",i+1)(S):v(S)}function v(S){return S===null||et(S)?e.check(Vk,y,x)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||et(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),b)}function x(S){return e.exit("codeFenced"),t(S)}function w(S,C,I){let P=0;return A;function A(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),L}function L(F){return S.enter("codeFencedFence"),xt(F)?Ct(S,W,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):W(F)}function W(F){return F===s?(S.enter("codeFencedFenceSequence"),Z(F)):I(F)}function Z(F){return F===s?(P++,S.consume(F),Z):P>=a?(S.exit("codeFencedFenceSequence"),xt(F)?Ct(S,B,"whitespace")(F):B(F)):I(F)}function B(F){return F===null||et(F)?(S.exit("codeFencedFence"),C(F)):I(F)}}}function nz(e,t,r){const n=this;return o;function o(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const vy={name:"codeIndented",tokenize:iz},oz={tokenize:az,partial:!0};function iz(e,t,r){const n=this;return o;function o(l){return e.enter("codeIndented"),Ct(e,i,"linePrefix",4+1)(l)}function i(l){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):r(l)}function a(l){return l===null?c(l):et(l)?e.attempt(oz,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||et(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function az(e,t,r){const n=this;return o;function o(a){return n.parser.lazy[n.now().line]?r(a):et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ct(e,i,"linePrefix",4+1)(a)}function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):et(a)?o(a):r(a)}}const sz={name:"codeText",tokenize:uz,resolve:cz,previous:lz};function cz(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function lz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uz(e,t,r){let n=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),n++,s):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||et(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),l)}function u(d){return d===96?(e.consume(d),o++,u):o===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",l(d))}}function Wk(e){const t={};let r=-1,n,o,i,a,s,c,l;for(;++r<e.length;){for(;r in t;)r=t[r];if(n=e[r],r&&n[1].type==="chunkFlow"&&e[r-1][1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,dz(e,r)),r=t[r],l=!0);else if(n[1]._container){for(i=r,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(n[1].end=Object.assign({},e[o][1].start),s=e.slice(o,r),s.unshift(n),vn(e,o,r-o+1,s))}}return!l}function dz(e,t){const r=e[t][1],n=e[t][2];let o=t-1;const i=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],l={};let u,d,p=-1,f=r,h=0,y=0;const m=[y];for(;f;){for(;e[++o][1]!==f;);i.push(o),f._tokenizer||(u=n.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=r;++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&&(y=p+1,m.push(y),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const g=s.slice(m[p],m[p+1]),v=i.pop();c.unshift([v,v+g.length-1]),vn(e,v,2,g)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const fz={tokenize:mz,resolve:hz},pz={tokenize:yz,partial:!0};function hz(e){return Wk(e),e}function mz(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):et(s)?e.check(pz,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function yz(e,t,r){const n=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,i,"linePrefix")}function i(a){if(a===null||et(a))return r(a);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function Kk(e,t,r,n,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(g),e.exit(i),p):g===null||g===32||g===41||zd(g)?r(g):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function p(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||et(g)?r(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function y(g){return!u&&(g===null||g===41||zt(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(g)):u<l&&g===40?(e.consume(g),u++,y):g===41?(e.consume(g),u--,y):g===null||g===32||g===40||zd(g)?r(g):(e.consume(g),g===92?m:y)}function m(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function Gk(e,t,r,n,o,i){const a=this;let s=0,c;return l;function l(f){return e.enter(n),e.enter(o),e.consume(f),e.exit(o),e.enter(i),u}function u(f){return s>999||f===null||f===91||f===93&&!c||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(n),t):et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||et(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),c||(c=!xt(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function Jk(e,t,r,n,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):r(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?r(p):et(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ct(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||et(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function jc(e,t){let r;return n;function n(o){return et(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):xt(o)?Ct(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const gz={name:"definition",tokenize:bz},vz={tokenize:wz,partial:!0};function bz(e,t,r){const n=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return Gk.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):r(f)}function c(f){return zt(f)?jc(e,l)(f):l(f)}function l(f){return Kk(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(vz,d,d)(f)}function d(f){return xt(f)?Ct(e,p,"whitespace")(f):p(f)}function p(f){return f===null||et(f)?(e.exit("definition"),n.parser.defined.push(o),t(f)):r(f)}}function wz(e,t,r){return n;function n(s){return zt(s)?jc(e,o)(s):r(s)}function o(s){return Jk(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return xt(s)?Ct(e,a,"whitespace")(s):a(s)}function a(s){return s===null||et(s)?t(s):r(s)}}const xz={name:"hardBreakEscape",tokenize:Sz};function Sz(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return et(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}const _z={name:"headingAtx",tokenize:kz,resolve:Ez};function Ez(e,t){let r=e.length-2,n=3,o,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},vn(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function kz(e,t,r){let n=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&n++<6?(e.consume(u),a):u===null||zt(u)?(e.exit("atxHeadingSequence"),s(u)):r(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||et(u)?(e.exit("atxHeading"),t(u)):xt(u)?Ct(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||zt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const Tz=["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"],Yk=["pre","script","style","textarea"],$z={name:"htmlFlow",tokenize:Iz,resolveTo:Az,concrete:!0},Oz={tokenize:Pz,partial:!0},Cz={tokenize:Rz,partial:!0};function Az(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 Iz(e,t,r){const n=this;let o,i,a,s,c;return l;function l(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),i=!0,y):T===63?(e.consume(T),o=3,n.interrupt?t:E):on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function p(T){return T===45?(e.consume(T),o=2,f):T===91?(e.consume(T),o=5,s=0,h):on(T)?(e.consume(T),o=4,n.interrupt?t:E):r(T)}function f(T){return T===45?(e.consume(T),n.interrupt?t:E):r(T)}function h(T){const ce="CDATA[";return T===ce.charCodeAt(s++)?(e.consume(T),s===ce.length?n.interrupt?t:W:h):r(T)}function y(T){return on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function m(T){if(T===null||T===47||T===62||zt(T)){const ce=T===47,pe=a.toLowerCase();return!ce&&!i&&Yk.includes(pe)?(o=1,n.interrupt?t(T):W(T)):Tz.includes(a.toLowerCase())?(o=6,ce?(e.consume(T),g):n.interrupt?t(T):W(T)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):i?v(T):b(T))}return T===45||Kr(T)?(e.consume(T),a+=String.fromCharCode(T),m):r(T)}function g(T){return T===62?(e.consume(T),n.interrupt?t:W):r(T)}function v(T){return xt(T)?(e.consume(T),v):A(T)}function b(T){return T===47?(e.consume(T),A):T===58||T===95||on(T)?(e.consume(T),x):xt(T)?(e.consume(T),b):A(T)}function x(T){return T===45||T===46||T===58||T===95||Kr(T)?(e.consume(T),x):w(T)}function w(T){return T===61?(e.consume(T),S):xt(T)?(e.consume(T),w):b(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),c=T,C):xt(T)?(e.consume(T),S):I(T)}function C(T){return T===c?(e.consume(T),c=null,P):T===null||et(T)?r(T):(e.consume(T),C)}function I(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||zt(T)?w(T):(e.consume(T),I)}function P(T){return T===47||T===62||xt(T)?b(T):r(T)}function A(T){return T===62?(e.consume(T),L):r(T)}function L(T){return T===null||et(T)?W(T):xt(T)?(e.consume(T),L):r(T)}function W(T){return T===45&&o===2?(e.consume(T),j):T===60&&o===1?(e.consume(T),U):T===62&&o===4?(e.consume(T),H):T===63&&o===3?(e.consume(T),E):T===93&&o===5?(e.consume(T),D):et(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Oz,Q,Z)(T)):T===null||et(T)?(e.exit("htmlFlowData"),Z(T)):(e.consume(T),W)}function Z(T){return e.check(Cz,B,Q)(T)}function B(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),F}function F(T){return T===null||et(T)?Z(T):(e.enter("htmlFlowData"),W(T))}function j(T){return T===45?(e.consume(T),E):W(T)}function U(T){return T===47?(e.consume(T),a="",K):W(T)}function K(T){if(T===62){const ce=a.toLowerCase();return Yk.includes(ce)?(e.consume(T),H):W(T)}return on(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),K):W(T)}function D(T){return T===93?(e.consume(T),E):W(T)}function E(T){return T===62?(e.consume(T),H):T===45&&o===2?(e.consume(T),E):W(T)}function H(T){return T===null||et(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),H)}function Q(T){return e.exit("htmlFlow"),t(T)}}function Rz(e,t,r){const n=this;return o;function o(a){return et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):r(a)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Pz(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Mc,t,r)}}const Nz={name:"htmlText",tokenize:Mz};function Mz(e,t,r){const n=this;let o,i,a;return s;function s(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),w):E===63?(e.consume(E),b):on(E)?(e.consume(E),I):r(E)}function l(E){return E===45?(e.consume(E),u):E===91?(e.consume(E),i=0,h):on(E)?(e.consume(E),v):r(E)}function u(E){return E===45?(e.consume(E),f):r(E)}function d(E){return E===null?r(E):E===45?(e.consume(E),p):et(E)?(a=d,U(E)):(e.consume(E),d)}function p(E){return E===45?(e.consume(E),f):d(E)}function f(E){return E===62?j(E):E===45?p(E):d(E)}function h(E){const H="CDATA[";return E===H.charCodeAt(i++)?(e.consume(E),i===H.length?y:h):r(E)}function y(E){return E===null?r(E):E===93?(e.consume(E),m):et(E)?(a=y,U(E)):(e.consume(E),y)}function m(E){return E===93?(e.consume(E),g):y(E)}function g(E){return E===62?j(E):E===93?(e.consume(E),g):y(E)}function v(E){return E===null||E===62?j(E):et(E)?(a=v,U(E)):(e.consume(E),v)}function b(E){return E===null?r(E):E===63?(e.consume(E),x):et(E)?(a=b,U(E)):(e.consume(E),b)}function x(E){return E===62?j(E):b(E)}function w(E){return on(E)?(e.consume(E),S):r(E)}function S(E){return E===45||Kr(E)?(e.consume(E),S):C(E)}function C(E){return et(E)?(a=C,U(E)):xt(E)?(e.consume(E),C):j(E)}function I(E){return E===45||Kr(E)?(e.consume(E),I):E===47||E===62||zt(E)?P(E):r(E)}function P(E){return E===47?(e.consume(E),j):E===58||E===95||on(E)?(e.consume(E),A):et(E)?(a=P,U(E)):xt(E)?(e.consume(E),P):j(E)}function A(E){return E===45||E===46||E===58||E===95||Kr(E)?(e.consume(E),A):L(E)}function L(E){return E===61?(e.consume(E),W):et(E)?(a=L,U(E)):xt(E)?(e.consume(E),L):P(E)}function W(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,Z):et(E)?(a=W,U(E)):xt(E)?(e.consume(E),W):(e.consume(E),B)}function Z(E){return E===o?(e.consume(E),o=void 0,F):E===null?r(E):et(E)?(a=Z,U(E)):(e.consume(E),Z)}function B(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||zt(E)?P(E):(e.consume(E),B)}function F(E){return E===47||E===62||zt(E)?P(E):r(E)}function j(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):r(E)}function U(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),K}function K(E){return xt(E)?Ct(e,D,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):D(E)}function D(E){return e.enter("htmlTextData"),a(E)}}const by={name:"labelEnd",tokenize:Bz,resolveTo:qz,resolveAll:Fz},jz={tokenize:Uz},Dz={tokenize:zz},Lz={tokenize:Zz};function Fz(e){let t=-1;for(;++t<e.length;){const r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function qz(e,t){let r=e.length,n=0,o,i,a,s;for(;r--;)if(o=e[r][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(a=r);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+n+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Pn(s,e.slice(i+1,i+n+3)),s=Pn(s,[["enter",u,t]]),s=Pn(s,Hd(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),s=Pn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Pn(s,e.slice(a+1)),s=Pn(s,[["exit",c,t]]),vn(e,i,e.length,s),e}function Bz(e,t,r){const n=this;let o=n.events.length,i,a;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){i=n.events[o][1];break}return s;function s(p){return i?i._inactive?d(p):(a=n.parser.defined.includes(Gn(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):r(p)}function c(p){return p===40?e.attempt(jz,u,a?u:d)(p):p===91?e.attempt(Dz,u,a?l:d)(p):a?u(p):d(p)}function l(p){return e.attempt(Lz,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,r(p)}}function Uz(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return zt(d)?jc(e,i)(d):i(d)}function i(d){return d===41?u(d):Kk(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return zt(d)?jc(e,c)(d):u(d)}function s(d){return r(d)}function c(d){return d===34||d===39||d===40?Jk(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function l(d){return zt(d)?jc(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function zz(e,t,r){const n=this;return o;function o(s){return Gk.call(n,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function Zz(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}const Vz={name:"labelStartImage",tokenize:Hz,resolveAll:by.resolveAll};function Hz(e,t,r){const n=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const Wz={name:"labelStartLink",tokenize:Kz,resolveAll:by.resolveAll};function Kz(e,t,r){const n=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const wy={name:"lineEnding",tokenize:Gz};function Gz(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Wd={name:"thematicBreak",tokenize:Jz};function Jz(e,t,r){let n=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):n>=3&&(l===null||et(l))?(e.exit("thematicBreak"),t(l)):r(l)}function c(l){return l===o?(e.consume(l),n++,c):(e.exit("thematicBreakSequence"),xt(l)?Ct(e,s,"whitespace")(l):s(l))}}const cn={name:"list",tokenize:Qz,continuation:{tokenize:e6},exit:r6},Yz={tokenize:n6,partial:!0},Xz={tokenize:t6,partial:!0};function Qz(e,t,r){const n=this,o=n.events[n.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(f){const h=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:yy(f)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Wd,r,l)(f):l(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return r(f)}function c(f){return yy(f)&&++a<10?(e.consume(f),c):(!n.interrupt||a<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):r(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Mc,n.interrupt?r:u,e.attempt(Yz,p,d))}function u(f){return n.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return xt(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):r(f)}function p(f){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function e6(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Mc,o,i);function o(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ct(e,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!xt(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Xz,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ct(e,e.attempt(cn,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function t6(e,t,r){const n=this;return Ct(e,o,"listItemIndent",n.containerState.size+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(i):r(i)}}function r6(e){e.exit(this.containerState.type)}function n6(e,t,r){const n=this;return Ct(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=n.events[n.events.length-1];return!xt(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}const Xk={name:"setextUnderline",tokenize:i6,resolveTo:o6};function o6(e,t){let r=e.length,n,o,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}function i6(e,t,r){const n=this;let o;return i;function i(l){let u=n.events.length,d;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){d=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),o=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),xt(l)?Ct(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||et(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const a6={tokenize:s6};function s6(e){const t=this,r=e.attempt(Mc,n,e.attempt(this.parser.constructs.flowInitial,o,Ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(fz,o)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const c6={resolveAll:eT()},l6=Qk("string"),u6=Qk("text");function Qk(e){return{tokenize:t,resolveAll:eT(e==="text"?d6:void 0)};function t(r){const n=this,o=this.parser.constructs[e],i=r.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),c}function c(u){return l(u)?(r.exit("data"),i(u)):(r.consume(u),c)}function l(u){if(u===null)return!0;const d=o[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function eT(e){return t;function t(r,n){let o=-1,i;for(;++o<=r.length;)i===void 0?r[o]&&r[o][1].type==="data"&&(i=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==i+2&&(r[i][1].end=r[o-1][1].end,r.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(r,n):r}}function d6(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+i,_bufferIndex:i?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},l.start),n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}function f6(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:v,enter:b,exit:x,attempt:C(w),check:C(S),interrupt:C(S,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:p,now:h,defineSkip:y,write:d};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function d(L){return a=Pn(a,L),m(),a[a.length-1]!==null?[]:(I(t,0),l.events=Hd(i,l.events,l),l.events)}function p(L,W){return h6(f(L),W)}function f(L){return p6(a,L)}function h(){const{line:L,column:W,offset:Z,_index:B,_bufferIndex:F}=n;return{line:L,column:W,offset:Z,_index:B,_bufferIndex:F}}function y(L){o[L.line]=L.column,A()}function m(){let L;for(;n._index<a.length;){const W=a[n._index];if(typeof W=="string")for(L=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===L&&n._bufferIndex<W.length;)g(W.charCodeAt(n._bufferIndex));else g(W)}}function g(L){u=u(L)}function v(L){et(L)?(n.line++,n.column=1,n.offset+=L===-3?2:1,A()):L!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=L}function b(L,W){const Z=W||{};return Z.type=L,Z.start=h(),l.events.push(["enter",Z,l]),s.push(Z),Z}function x(L){const W=s.pop();return W.end=h(),l.events.push(["exit",W,l]),W}function w(L,W){I(L,W.from)}function S(L,W){W.restore()}function C(L,W){return Z;function Z(B,F,j){let U,K,D,E;return Array.isArray(B)?Q(B):"tokenize"in B?Q([B]):H(B);function H(fe){return ve;function ve(_e){const Ce=_e!==null&&fe[_e],be=_e!==null&&fe.null,de=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(de)(_e)}}function Q(fe){return U=fe,K=0,fe.length===0?j:T(fe[K])}function T(fe){return ve;function ve(_e){return E=P(),D=fe,fe.partial||(l.currentConstruct=fe),fe.name&&l.parser.constructs.disable.null.includes(fe.name)?pe():fe.tokenize.call(W?Object.assign(Object.create(l),W):l,c,ce,pe)(_e)}}function ce(fe){return L(D,E),F}function pe(fe){return E.restore(),++K<U.length?T(U[K]):j}}}function I(L,W){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&vn(l.events,W,l.events.length-W,L.resolve(l.events.slice(W),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function P(){const L=h(),W=l.previous,Z=l.currentConstruct,B=l.events.length,F=Array.from(s);return{restore:j,from:B};function j(){n=L,l.previous=W,l.currentConstruct=Z,l.events.length=B,s=F,A()}}function A(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function p6(e,t){const r=t.start._index,n=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(r===o)a=[e[r].slice(n,i)];else{if(a=e.slice(r,o),n>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function h6(e,t){let r=-1;const n=[];let o;for(;++r<e.length;){const i=e[r];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
103
+ Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{if(!M._store||M._store.validated||M.key!=null)return;M._store.validated=!0;var ke=bt(ge);if(vt[ke])return;vt[ke]=!0;var Ze="";M&&M._owner&&M._owner!==gt.current&&(Ze=" It was passed a child from "+z(M._owner.type)+"."),ir(M),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',ke,Ze),ir(null)}}function Gt(M,ge){{if(typeof M!="object")return;if(Ue(M))for(var ke=0;ke<M.length;ke++){var Ze=M[ke];Kt(Ze)&&Yt(Ze,ge)}else if(Kt(M))M._store&&(M._store.validated=!0);else if(M){var kt=m(M);if(typeof kt=="function"&&kt!==M.entries)for(var Ot=kt.call(M),ht;!(ht=Ot.next()).done;)Kt(ht.value)&&Yt(ht.value,ge)}}}function sr(M){{var ge=M.type;if(ge==null||typeof ge=="string")return;var ke;if(typeof ge=="function")ke=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))ke=ge.propTypes;else return;if(ke){var Ze=z(ge);je(ke,M.props,"prop",Ze,M)}else if(ge.PropTypes!==void 0&&!kr){kr=!0;var kt=z(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",kt||"Unknown")}typeof ge.getDefaultProps=="function"&&!ge.getDefaultProps.isReactClassApproved&&v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ut(M){{for(var ge=Object.keys(M.props),ke=0;ke<ge.length;ke++){var Ze=ge[ke];if(Ze!=="children"&&Ze!=="key"){ir(M),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ze),ir(null);break}}M.ref!==null&&(ir(M),v("Invalid attribute `ref` supplied to `React.Fragment`."),ir(null))}}function Ir(M,ge,ke,Ze,kt,Ot){{var ht=A(M);if(!ht){var at="";(M===void 0||typeof M=="object"&&M!==null&&Object.keys(M).length===0)&&(at+=" 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 cr=sn(kt);cr?at+=cr:at+=ar();var Xt;M===null?Xt="null":Ue(M)?Xt="array":M!==void 0&&M.$$typeof===t?(Xt="<"+(z(M.type)||"Unknown")+" />",at=" Did you accidentally export a JSX literal instead of a component?"):Xt=typeof M,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Xt,at)}var Qt=Ge(M,ge,ke,kt,Ot);if(Qt==null)return Qt;if(ht){var yn=ge.children;if(yn!==void 0)if(Ze)if(Ue(yn)){for(var Ao=0;Ao<yn.length;Ao++)Gt(yn[Ao],M);Object.freeze&&Object.freeze(yn)}else v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Gt(yn,M)}return M===n?Ut(Qt):sr(Qt),Qt}}function Rr(M,ge,ke){return Ir(M,ge,ke,!0)}function tn(M,ge,ke){return Ir(M,ge,ke,!1)}var wa=tn,xa=Rr;mc.Fragment=n,mc.jsx=wa,mc.jsxs=xa}()),mc}process.env.NODE_ENV==="production"?Zm.exports=GB():Zm.exports=JB();var J=Zm.exports;function vr(){return vr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},vr.apply(this,arguments)}function Vm(e,t=[]){let r=[];function n(i,a){const s=$.createContext(a),c=r.length;r=[...r,a];function l(d){const{scope:p,children:f,...h}=d,y=(p==null?void 0:p[e][c])||s,m=$.useMemo(()=>h,Object.values(h));return $.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=$.useContext(f);if(h)return h;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${i}\``)}return l.displayName=i+"Provider",[l,u]}const o=()=>{const i=r.map(a=>$.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return $.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,YB(o,...t)]}function YB(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=n.reduce((s,{useScope:c,scopeName:l})=>{const d=c(i)[`__scope${l}`];return{...s,...d}},{});return $.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ai(e){const t=$.useRef(e);return $.useEffect(()=>{t.current=e}),$.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const yc=globalThis!=null&&globalThis.document?$.useLayoutEffect:()=>{};function zi(){return zi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zi.apply(null,arguments)}function XB(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function SE(...e){return t=>e.forEach(r=>XB(r,t))}function Zi(...e){return $.useCallback(SE(...e),e)}const Hm=$.forwardRef((e,t)=>{const{children:r,...n}=e,o=$.Children.toArray(r),i=o.find(e5);if(i){const a=i.props.children,s=o.map(c=>c===i?$.Children.count(a)>1?$.Children.only(null):$.isValidElement(a)?a.props.children:null:c);return $.createElement(Wm,zi({},n,{ref:t}),$.isValidElement(a)?$.cloneElement(a,void 0,s):null)}return $.createElement(Wm,zi({},n,{ref:t}),r)});Hm.displayName="Slot";const Wm=$.forwardRef((e,t)=>{const{children:r,...n}=e;return $.isValidElement(r)?$.cloneElement(r,{...t5(n,r.props),ref:t?SE(t,r.ref):r.ref}):$.Children.count(r)>1?$.Children.only(null):null});Wm.displayName="SlotClone";const QB=({children:e})=>$.createElement($.Fragment,null,e);function e5(e){return $.isValidElement(e)&&e.type===QB}function t5(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...s)=>{i(...s),o(...s)}:o&&(r[n]=o):n==="style"?r[n]={...o,...i}:n==="className"&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const In=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=$.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?Hm:t;return $.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),$.createElement(s,zi({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function r5(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}const _E="Avatar",[n5,Nxe]=Vm(_E),[o5,EE]=n5(_E),kE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=$.useState("idle");return $.createElement(o5,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},$.createElement(In.span,vr({},n,{ref:t})))}),i5="AvatarImage",TE=$.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=EE(i5,r),s=s5(n),c=ai(l=>{o(l),a.onImageLoadingStatusChange(l)});return yc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?$.createElement(In.img,vr({},i,{ref:t,src:n})):null}),a5="AvatarFallback",$E=$.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=EE(a5,r),[a,s]=$.useState(n===void 0);return $.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?$.createElement(In.span,vr({},o,{ref:t})):null});function s5(e){const[t,r]=$.useState("idle");return $.useEffect(()=>{if(!e){r("error");return}let n=!0;const o=new window.Image,i=a=>()=>{n&&r(a)};return r("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{n=!1}},[e]),t}function Km(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const r=e.replace(/^#/,"");let n=r;r.length===3&&(n=r.split("").map(c=>c+c).join(""));const o=parseInt(n,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function c5(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const l5=(e,t=30)=>{const r=Math.min(e.r,e.g,e.b),n=Math.max(e.r,e.g,e.b,r+1);return{r:Math.floor((e.r-r)/(n-r)*t*(1-.299)+120-t/2),g:Math.floor((e.g-r)/(n-r)*t*(1-.587)+120-t/2),b:Math.floor((e.b-r)/(n-r)*t*(1-.114)+120-t/2)}};function OE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const u5=2.4,d5=.2126729,f5=.7151522,p5=.072175,h5=.56,m5=.57,y5=.62,g5=.65,Cd=.022,CE=1.414,v5=1.14,b5=1.14,w5=.035991,x5=.035991,S5=27.7847239587675,_5=27.7847239587675,AE=.027,IE=.027,RE=.001,E5=5e-4;function PE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**u5;return d5*o(t)+f5*o(r)+p5*o(n)}function NE(e,t){if(!e||!t)return 0;let r=PE(Km(e)),n=PE(Km(t)),o=0,i=0;return r=r>Cd?r:r+(Cd-r)**CE,n=n>Cd?n:n+(Cd-n)**CE,Math.abs(n-r)<E5?0:(n>r?(o=(n**h5-r**m5)*v5,i=o<RE?0:o<w5?o-o*S5*AE:o-AE):(o=(n**g5-r**y5)*b5,i=o>-RE?0:o>-x5?o-o*_5*IE:o+IE),Math.abs(i*100))}let Gm=class{constructor(){k(this,"eventMap");this.eventMap={}}on(t,r){var n;return this.eventMap[t]||(this.eventMap[t]=new Set),(n=this.eventMap[t])==null||n.add(r),()=>{var o;(o=this.eventMap[t])==null||o.delete(r)}}emit(t,r){var n,o;(n=this.eventMap[t])==null||n.forEach(i=>{i(r)}),(o=this.eventMap["*"])==null||o.forEach(i=>{i({type:t,payload:r})})}};const k5=new Gm;function ME(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function jE(e,t){let r=0;if(e.length==0)return r;for(let n=0;n<e.length;n++){const o=e.charCodeAt(n);r=(r<<5)-r+o,r=r&r}return Math.abs(r)%t}var DE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){var r=1e3,n=6e4,o=36e5,i="millisecond",a="second",s="minute",c="hour",l="day",u="week",d="month",p="quarter",f="year",h="date",y="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|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,v={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(B){var F=["th","st","nd","rd"],j=B%100;return"["+B+(F[(j-20)%10]||F[j]||F[0])+"]"}},b=function(B,F,j){var Z=String(B);return!Z||Z.length>=F?B:""+Array(F+1-Z.length).join(j)+B},x={s:b,z:function(B){var F=-B.utcOffset(),j=Math.abs(F),Z=Math.floor(j/60),W=j%60;return(F<=0?"+":"-")+b(Z,2,"0")+":"+b(W,2,"0")},m:function B(F,j){if(F.date()<j.date())return-B(j,F);var Z=12*(j.year()-F.year())+(j.month()-F.month()),W=F.clone().add(Z,d),D=j-W<0,E=F.clone().add(Z+(D?-1:1),d);return+(-(Z+(j-W)/(D?W-E:E-W))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},w="en",S={};S[w]=v;var C="$isDayjsObject",I=function(B){return B instanceof K||!(!B||!B[C])},P=function B(F,j,Z){var W;if(!F)return w;if(typeof F=="string"){var D=F.toLowerCase();S[D]&&(W=D),j&&(S[D]=j,W=D);var E=F.split("-");if(!W&&E.length>1)return B(E[0])}else{var H=F.name;S[H]=F,W=H}return!Z&&W&&(w=W),W||!Z&&w},A=function(B,F){if(I(B))return B.clone();var j=typeof F=="object"?F:{};return j.date=B,j.args=arguments,new K(j)},L=x;L.l=P,L.i=I,L.w=function(B,F){return A(B,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var K=function(){function B(j){this.$L=P(j.locale,null,!0),this.parse(j),this.$x=this.$x||j.x||{},this[C]=!0}var F=B.prototype;return F.parse=function(j){this.$d=function(Z){var W=Z.date,D=Z.utc;if(W===null)return new Date(NaN);if(L.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var E=W.match(m);if(E){var H=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return D?new Date(Date.UTC(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],H,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(W)}(j),this.init()},F.init=function(){var j=this.$d;this.$y=j.getFullYear(),this.$M=j.getMonth(),this.$D=j.getDate(),this.$W=j.getDay(),this.$H=j.getHours(),this.$m=j.getMinutes(),this.$s=j.getSeconds(),this.$ms=j.getMilliseconds()},F.$utils=function(){return L},F.isValid=function(){return this.$d.toString()!==y},F.isSame=function(j,Z){var W=A(j);return this.startOf(Z)<=W&&W<=this.endOf(Z)},F.isAfter=function(j,Z){return A(j)<this.startOf(Z)},F.isBefore=function(j,Z){return this.endOf(Z)<A(j)},F.$g=function(j,Z,W){return L.u(j)?this[Z]:this.set(W,j)},F.unix=function(){return Math.floor(this.valueOf()/1e3)},F.valueOf=function(){return this.$d.getTime()},F.startOf=function(j,Z){var W=this,D=!!L.u(Z)||Z,E=L.p(j),H=function(Ce,be){var de=L.w(W.$u?Date.UTC(W.$y,be,Ce):new Date(W.$y,be,Ce),W);return D?de:de.endOf(l)},Q=function(Ce,be){return L.w(W.toDate()[Ce].apply(W.toDate("s"),(D?[0,0,0,0]:[23,59,59,999]).slice(be)),W)},T=this.$W,ce=this.$M,pe=this.$D,fe="set"+(this.$u?"UTC":"");switch(E){case f:return D?H(1,0):H(31,11);case d:return D?H(1,ce):H(0,ce+1);case u:var ve=this.$locale().weekStart||0,_e=(T<ve?T+7:T)-ve;return H(D?pe-_e:pe+(6-_e),ce);case l:case h:return Q(fe+"Hours",0);case c:return Q(fe+"Minutes",1);case s:return Q(fe+"Seconds",2);case a:return Q(fe+"Milliseconds",3);default:return this.clone()}},F.endOf=function(j){return this.startOf(j,!1)},F.$set=function(j,Z){var W,D=L.p(j),E="set"+(this.$u?"UTC":""),H=(W={},W[l]=E+"Date",W[h]=E+"Date",W[d]=E+"Month",W[f]=E+"FullYear",W[c]=E+"Hours",W[s]=E+"Minutes",W[a]=E+"Seconds",W[i]=E+"Milliseconds",W)[D],Q=D===l?this.$D+(Z-this.$W):Z;if(D===d||D===f){var T=this.clone().set(h,1);T.$d[H](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else H&&this.$d[H](Q);return this.init(),this},F.set=function(j,Z){return this.clone().$set(j,Z)},F.get=function(j){return this[L.p(j)]()},F.add=function(j,Z){var W,D=this;j=Number(j);var E=L.p(Z),H=function(ce){var pe=A(D);return L.w(pe.date(pe.date()+Math.round(ce*j)),D)};if(E===d)return this.set(d,this.$M+j);if(E===f)return this.set(f,this.$y+j);if(E===l)return H(1);if(E===u)return H(7);var Q=(W={},W[s]=n,W[c]=o,W[a]=r,W)[E]||1,T=this.$d.getTime()+j*Q;return L.w(T,this)},F.subtract=function(j,Z){return this.add(-1*j,Z)},F.format=function(j){var Z=this,W=this.$locale();if(!this.isValid())return W.invalidDate||y;var D=j||"YYYY-MM-DDTHH:mm:ssZ",E=L.z(this),H=this.$H,Q=this.$m,T=this.$M,ce=W.weekdays,pe=W.months,fe=W.meridiem,ve=function(be,de,te,we){return be&&(be[de]||be(Z,D))||te[de].slice(0,we)},_e=function(be){return L.s(H%12||12,be,"0")},Ce=fe||function(be,de,te){var we=be<12?"AM":"PM";return te?we.toLowerCase():we};return D.replace(g,function(be,de){return de||function(te){switch(te){case"YY":return String(Z.$y).slice(-2);case"YYYY":return L.s(Z.$y,4,"0");case"M":return T+1;case"MM":return L.s(T+1,2,"0");case"MMM":return ve(W.monthsShort,T,pe,3);case"MMMM":return ve(pe,T);case"D":return Z.$D;case"DD":return L.s(Z.$D,2,"0");case"d":return String(Z.$W);case"dd":return ve(W.weekdaysMin,Z.$W,ce,2);case"ddd":return ve(W.weekdaysShort,Z.$W,ce,3);case"dddd":return ce[Z.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return _e(1);case"hh":return _e(2);case"a":return Ce(H,Q,!0);case"A":return Ce(H,Q,!1);case"m":return String(Q);case"mm":return L.s(Q,2,"0");case"s":return String(Z.$s);case"ss":return L.s(Z.$s,2,"0");case"SSS":return L.s(Z.$ms,3,"0");case"Z":return E}return null}(be)||E.replace(":","")})},F.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},F.diff=function(j,Z,W){var D,E=this,H=L.p(Z),Q=A(j),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return L.m(E,Q)};switch(H){case f:D=pe()/12;break;case d:D=pe();break;case p:D=pe()/3;break;case u:D=(ce-T)/6048e5;break;case l:D=(ce-T)/864e5;break;case c:D=ce/o;break;case s:D=ce/n;break;case a:D=ce/r;break;default:D=ce}return W?D:L.a(D)},F.daysInMonth=function(){return this.endOf(d).$D},F.$locale=function(){return S[this.$L]},F.locale=function(j,Z){if(!j)return this.$L;var W=this.clone(),D=P(j,Z,!0);return D&&(W.$L=D),W},F.clone=function(){return L.w(this.$d,this)},F.toDate=function(){return new Date(this.valueOf())},F.toJSON=function(){return this.isValid()?this.toISOString():null},F.toISOString=function(){return this.$d.toISOString()},F.toString=function(){return this.$d.toUTCString()},B}(),z=K.prototype;return A.prototype=z,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(B){z[B[1]]=function(F){return this.$g(F,B[0],B[1])}}),A.extend=function(B,F){return B.$i||(B(F,K,A),B.$i=!0),A},A.locale=P,A.isDayjs=I,A.unix=function(B){return A(1e3*B)},A.en=S[w],A.Ls=S,A.p={},A})})(DE);var T5=DE.exports;const Ad=St(T5);var LE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(LE);var $5=LE.exports;const O5=St($5);var FE={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(We,function(){return function(r,n,o){n.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(FE);var C5=FE.exports;const A5=St(C5);Ad.extend(O5),Ad.extend(A5);function I5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(qE(e[0].timestamp));for(let n=0;n<e.length;n++)if(r.push(e[n]),n+1<e.length){const o=e[n].timestamp,i=e[n+1].timestamp;Ad(o).isSame(i,t)||r.push(qE(i))}return r}function qE(e){return{id:Td(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:R5(e)}}}function R5(e,t=!1){const r=Ad(e),n="h:mma";return r.isToday()?t?`Today • ${r.format(n)}`:"Today":r.isYesterday()?t?`Yesterday • ${r.format(n)}`:"Yesterday":t?r.format(`YYYY-MM-DD • ${n}`):r.format("YYYY-MM-DD")}function P5(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(n=>Number.parseInt(n,16));const r=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(r)return r.splice(1).map(n=>Number.parseInt(n+n,16));if(e.includes(","))return e.split(",").map(n=>Number.parseInt(n));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function N5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function M5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function j5(e,t){return e.map(r=>Math.round(r*t))}const gc=e=>t=>M5(t,e),vc=e=>t=>j5(t,e),D5={50:gc(.95),100:gc(.9),200:gc(.75),300:gc(.6),400:gc(.3),500:e=>e,600:vc(.9),700:vc(.6),800:vc(.45),900:vc(.3),950:vc(.2)};function BE(e,t=D5){const r={},n=P5(e);for(const[o,i]of Object.entries(t))r[o]=N5(i(n));return r}var Nt;(function(e){e.assertEqual=o=>o;function t(o){}e.assertIs=t;function r(o){throw new Error}e.assertNever=r,e.arrayToEnum=o=>{const i={};for(const a of o)i[a]=a;return i},e.getValidEnumValues=o=>{const i=e.objectKeys(o).filter(s=>typeof o[o[s]]!="number"),a={};for(const s of i)a[s]=o[s];return e.objectValues(a)},e.objectValues=o=>e.objectKeys(o).map(function(i){return o[i]}),e.objectKeys=typeof Object.keys=="function"?o=>Object.keys(o):o=>{const i=[];for(const a in o)Object.prototype.hasOwnProperty.call(o,a)&&i.push(a);return i},e.find=(o,i)=>{for(const a of o)if(i(a))return a},e.isInteger=typeof Number.isInteger=="function"?o=>Number.isInteger(o):o=>typeof o=="number"&&isFinite(o)&&Math.floor(o)===o;function n(o,i=" | "){return o.map(a=>typeof a=="string"?`'${a}'`:a).join(i)}e.joinValues=n,e.jsonStringifyReplacer=(o,i)=>typeof i=="bigint"?i.toString():i})(Nt||(Nt={}));var Jm;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(Jm||(Jm={}));const Ne=Nt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),si=e=>{switch(typeof e){case"undefined":return Ne.undefined;case"string":return Ne.string;case"number":return isNaN(e)?Ne.nan:Ne.number;case"boolean":return Ne.boolean;case"function":return Ne.function;case"bigint":return Ne.bigint;case"symbol":return Ne.symbol;case"object":return Array.isArray(e)?Ne.array:e===null?Ne.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ne.promise:typeof Map<"u"&&e instanceof Map?Ne.map:typeof Set<"u"&&e instanceof Set?Ne.set:typeof Date<"u"&&e instanceof Date?Ne.date:Ne.object;default:return Ne.unknown}},Ee=Nt.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"]),L5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Vn extends Error{constructor(t){super(),this.issues=[],this.addIssue=n=>{this.issues=[...this.issues,n]},this.addIssues=(n=[])=>{this.issues=[...this.issues,...n]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const r=t||function(i){return i.message},n={_errors:[]},o=i=>{for(const a of i.issues)if(a.code==="invalid_union")a.unionErrors.map(o);else if(a.code==="invalid_return_type")o(a.returnTypeError);else if(a.code==="invalid_arguments")o(a.argumentsError);else if(a.path.length===0)n._errors.push(r(a));else{let s=n,c=0;for(;c<a.path.length;){const l=a.path[c];c===a.path.length-1?(s[l]=s[l]||{_errors:[]},s[l]._errors.push(r(a))):s[l]=s[l]||{_errors:[]},s=s[l],c++}}};return o(this),n}toString(){return this.message}get message(){return JSON.stringify(this.issues,Nt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=r=>r.message){const r={},n=[];for(const o of this.issues)o.path.length>0?(r[o.path[0]]=r[o.path[0]]||[],r[o.path[0]].push(t(o))):n.push(t(o));return{formErrors:n,fieldErrors:r}}get formErrors(){return this.flatten()}}Vn.create=e=>new Vn(e);const bc=(e,t)=>{let r;switch(e.code){case Ee.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case Ee.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Nt.jsonStringifyReplacer)}`;break;case Ee.unrecognized_keys:r=`Unrecognized key(s) in object: ${Nt.joinValues(e.keys,", ")}`;break;case Ee.invalid_union:r="Invalid input";break;case Ee.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Nt.joinValues(e.options)}`;break;case Ee.invalid_enum_value:r=`Invalid enum value. Expected ${Nt.joinValues(e.options)}, received '${e.received}'`;break;case Ee.invalid_arguments:r="Invalid function arguments";break;case Ee.invalid_return_type:r="Invalid function return type";break;case Ee.invalid_date:r="Invalid date";break;case Ee.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:Nt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case Ee.too_small:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:r="Invalid input";break;case Ee.too_big:e.type==="array"?r=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?r=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?r=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?r=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?r=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:r="Invalid input";break;case Ee.custom:r="Invalid input";break;case Ee.invalid_intersection_types:r="Intersection results could not be merged";break;case Ee.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case Ee.not_finite:r="Number must be finite";break;default:r=t.defaultError,Nt.assertNever(e)}return{message:r}};let UE=bc;function F5(e){UE=e}function Id(){return UE}const Rd=e=>{const{data:t,path:r,errorMaps:n,issueData:o}=e,i=[...r,...o.path||[]],a={...o,path:i};let s="";const c=n.filter(l=>!!l).slice().reverse();for(const l of c)s=l(a,{data:t,defaultError:s}).message;return{...o,path:i,message:o.message||s}},q5=[];function Me(e,t){const r=Rd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Id(),bc].filter(n=>!!n)});e.common.issues.push(r)}class Hr{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,r){const n=[];for(const o of r){if(o.status==="aborted")return st;o.status==="dirty"&&t.dirty(),n.push(o.value)}return{status:t.value,value:n}}static async mergeObjectAsync(t,r){const n=[];for(const o of r)n.push({key:await o.key,value:await o.value});return Hr.mergeObjectSync(t,n)}static mergeObjectSync(t,r){const n={};for(const o of r){const{key:i,value:a}=o;if(i.status==="aborted"||a.status==="aborted")return st;i.status==="dirty"&&t.dirty(),a.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof a.value<"u"||o.alwaysSet)&&(n[i.value]=a.value)}return{status:t.value,value:n}}}const st=Object.freeze({status:"aborted"}),zE=e=>({status:"dirty",value:e}),nn=e=>({status:"valid",value:e}),Ym=e=>e.status==="aborted",Xm=e=>e.status==="dirty",wc=e=>e.status==="valid",Pd=e=>typeof Promise<"u"&&e instanceof Promise;var Ye;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Ye||(Ye={}));class so{constructor(t,r,n,o){this._cachedPath=[],this.parent=t,this.data=r,this._path=n,this._key=o}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 ZE=(e,t)=>{if(wc(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new Vn(e.common.issues);return this._error=r,this._error}}};function dt(e){if(!e)return{};const{errorMap:t,invalid_type_error:r,required_error:n,description:o}=e;if(t&&(r||n))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:o}:{errorMap:(a,s)=>a.code!=="invalid_type"?{message:s.defaultError}:typeof s.data>"u"?{message:n??s.defaultError}:{message:r??s.defaultError},description:o}}class mt{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 si(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Hr,ctx:{common:t.parent.common,data:t.data,parsedType:si(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Pd(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(t){const r=this._parse(t);return Promise.resolve(r)}parse(t,r){const n=this.safeParse(t,r);if(n.success)return n.data;throw n.error}safeParse(t,r){var n;const o={common:{issues:[],async:(n=r==null?void 0:r.async)!==null&&n!==void 0?n:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},i=this._parseSync({data:t,path:o.path,parent:o});return ZE(o,i)}async parseAsync(t,r){const n=await this.safeParseAsync(t,r);if(n.success)return n.data;throw n.error}async safeParseAsync(t,r){const n={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:si(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Pd(o)?o:Promise.resolve(o));return ZE(n,i)}refine(t,r){const n=o=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(o):r;return this._refinement((o,i)=>{const a=t(o),s=()=>i.addIssue({code:Ee.custom,...n(o)});return typeof Promise<"u"&&a instanceof Promise?a.then(c=>c?!0:(s(),!1)):a?!0:(s(),!1)})}refinement(t,r){return this._refinement((n,o)=>t(n)?!0:(o.addIssue(typeof r=="function"?r(n,o):r),!1))}_refinement(t){return new Kn({schema:this,typeName:nt.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Lo.create(this,this._def)}nullable(){return Ki.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wn.create(this,this._def)}promise(){return za.create(this,this._def)}or(t){return Ec.create([this,t],this._def)}and(t){return kc.create(this,t,this._def)}transform(t){return new Kn({...dt(this._def),schema:this,typeName:nt.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new Ac({...dt(this._def),innerType:this,defaultValue:r,typeName:nt.ZodDefault})}brand(){return new HE({typeName:nt.ZodBranded,type:this,...dt(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Fd({...dt(this._def),innerType:this,catchValue:r,typeName:nt.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Ic.create(this,t)}readonly(){return Bd.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const B5=/^c[^\s-]{8,}$/i,U5=/^[a-z][a-z0-9]*$/,z5=/^[0-9A-HJKMNP-TV-Z]{26}$/,Z5=/^[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,V5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,H5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Qm;const W5=/^(((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}))$/,K5=/^(([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})))$/,G5=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 J5(e,t){return!!((t==="v4"||!t)&&W5.test(e)||(t==="v6"||!t)&&K5.test(e))}class Hn extends mt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ne.string){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.string,received:i.parsedType}),st}const n=new Hr;let o;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="max")t.data.length>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),n.dirty());else if(i.kind==="length"){const a=t.data.length>i.value,s=t.data.length<i.value;(a||s)&&(o=this._getOrReturnCtx(t,o),a?Me(o,{code:Ee.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:Ee.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")V5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")Qm||(Qm=new RegExp(H5,"u")),Qm.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")Z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")B5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")U5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")z5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:Ee.invalid_string,message:i.message}),n.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{o=this._getOrReturnCtx(t,o),Me(o,{validation:"url",code:Ee.invalid_string,message:i.message}),n.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"regex",code:Ee.invalid_string,message:i.message}),n.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),n.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{startsWith:i.value},message:i.message}),n.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?G5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.invalid_string,validation:"datetime",message:i.message}),n.dirty()):i.kind==="ip"?J5(t.data,i.version)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ip",code:Ee.invalid_string,message:i.message}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:Ee.invalid_string,...Ye.errToObj(n)})}_addCheck(t){return new Hn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Ye.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Ye.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Ye.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Ye.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Ye.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Ye.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Ye.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Ye.errToObj(t)})}datetime(t){var r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(r=t==null?void 0:t.offset)!==null&&r!==void 0?r:!1,...Ye.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Ye.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Ye.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Ye.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Ye.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Ye.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Ye.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Ye.errToObj(r)})}nonempty(t){return this.min(1,Ye.errToObj(t))}trim(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Hn({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get minLength(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxLength(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}Hn.create=e=>{var t;return new Hn({checks:[],typeName:nt.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};function Y5(e,t){const r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,o=r>n?r:n,i=parseInt(e.toFixed(o).replace(".","")),a=parseInt(t.toFixed(o).replace(".",""));return i%a/Math.pow(10,o)}class ci extends mt{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)!==Ne.number){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.number,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="int"?Nt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.invalid_type,expected:"integer",received:"float",message:i.message}),o.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?Y5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_finite,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new ci({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new ci({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Ye.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Ye.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Ye.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Ye.toString(t)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Nt.isInteger(t.value))}get isFinite(){let t=null,r=null;for(const n of this._def.checks){if(n.kind==="finite"||n.kind==="int"||n.kind==="multipleOf")return!0;n.kind==="min"?(r===null||n.value>r)&&(r=n.value):n.kind==="max"&&(t===null||n.value<t)&&(t=n.value)}return Number.isFinite(r)&&Number.isFinite(t)}}ci.create=e=>new ci({checks:[],typeName:nt.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class li extends mt{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)!==Ne.bigint){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.bigint,received:i.parsedType}),st}let n;const o=new Hr;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),o.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(n=this._getOrReturnCtx(t,n),Me(n,{code:Ee.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Nt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Ye.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Ye.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Ye.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Ye.toString(r))}setLimit(t,r,n,o){return new li({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Ye.toString(o)}]})}_addCheck(t){return new li({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Ye.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Ye.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Ye.toString(r)})}get minValue(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t}get maxValue(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t}}li.create=e=>{var t;return new li({checks:[],typeName:nt.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...dt(e)})};class xc extends mt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ne.boolean){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.boolean,received:n.parsedType}),st}return nn(t.data)}}xc.create=e=>new xc({typeName:nt.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...dt(e)});class Vi extends mt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ne.date){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_type,expected:Ne.date,received:i.parsedType}),st}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:Ee.invalid_date}),st}const n=new Hr;let o;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),n.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(o=this._getOrReturnCtx(t,o),Me(o,{code:Ee.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Nt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Ye.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Ye.toString(r)})}get minDate(){let t=null;for(const r of this._def.checks)r.kind==="min"&&(t===null||r.value>t)&&(t=r.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const r of this._def.checks)r.kind==="max"&&(t===null||r.value<t)&&(t=r.value);return t!=null?new Date(t):null}}Vi.create=e=>new Vi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:nt.ZodDate,...dt(e)});class Nd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.symbol,received:n.parsedType}),st}return nn(t.data)}}Nd.create=e=>new Nd({typeName:nt.ZodSymbol,...dt(e)});class Sc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.undefined,received:n.parsedType}),st}return nn(t.data)}}Sc.create=e=>new Sc({typeName:nt.ZodUndefined,...dt(e)});class _c extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.null,received:n.parsedType}),st}return nn(t.data)}}_c.create=e=>new _c({typeName:nt.ZodNull,...dt(e)});class qa extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return nn(t.data)}}qa.create=e=>new qa({typeName:nt.ZodAny,...dt(e)});class Hi extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return nn(t.data)}}Hi.create=e=>new Hi({typeName:nt.ZodUnknown,...dt(e)});class Do extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:Ee.invalid_type,expected:Ne.never,received:r.parsedType}),st}}Do.create=e=>new Do({typeName:nt.ZodNever,...dt(e)});class Md extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.void,received:n.parsedType}),st}return nn(t.data)}}Md.create=e=>new Md({typeName:nt.ZodVoid,...dt(e)});class Wn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:Ee.invalid_type,expected:Ne.array,received:r.parsedType}),st;if(o.exactLength!==null){const a=r.data.length>o.exactLength.value,s=r.data.length<o.exactLength.value;(a||s)&&(Me(r,{code:a?Ee.too_big:Ee.too_small,minimum:s?o.exactLength.value:void 0,maximum:a?o.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:o.exactLength.message}),n.dirty())}if(o.minLength!==null&&r.data.length<o.minLength.value&&(Me(r,{code:Ee.too_small,minimum:o.minLength.value,type:"array",inclusive:!0,exact:!1,message:o.minLength.message}),n.dirty()),o.maxLength!==null&&r.data.length>o.maxLength.value&&(Me(r,{code:Ee.too_big,maximum:o.maxLength.value,type:"array",inclusive:!0,exact:!1,message:o.maxLength.message}),n.dirty()),r.common.async)return Promise.all([...r.data].map((a,s)=>o.type._parseAsync(new so(r,a,r.path,s)))).then(a=>Hr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new so(r,a,r.path,s)));return Hr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Wn({...this._def,minLength:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wn({...this._def,maxLength:{value:t,message:Ye.toString(r)}})}length(t,r){return new Wn({...this._def,exactLength:{value:t,message:Ye.toString(r)}})}nonempty(t){return this.min(1,t)}}Wn.create=(e,t)=>new Wn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:nt.ZodArray,...dt(t)});function Ba(e){if(e instanceof er){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=Lo.create(Ba(n))}return new er({...e._def,shape:()=>t})}else return e instanceof Wn?new Wn({...e._def,type:Ba(e.element)}):e instanceof Lo?Lo.create(Ba(e.unwrap())):e instanceof Ki?Ki.create(Ba(e.unwrap())):e instanceof co?co.create(e.items.map(t=>Ba(t))):e}class er extends mt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),r=Nt.objectKeys(t);return this._cached={shape:t,keys:r}}_parse(t){if(this._getType(t)!==Ne.object){const l=this._getOrReturnCtx(t);return Me(l,{code:Ee.invalid_type,expected:Ne.object,received:l.parsedType}),st}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Do&&this._def.unknownKeys==="strip"))for(const l in o.data)a.includes(l)||s.push(l);const c=[];for(const l of a){const u=i[l],d=o.data[l];c.push({key:{status:"valid",value:l},value:u._parse(new so(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Do){const l=this._def.unknownKeys;if(l==="passthrough")for(const u of s)c.push({key:{status:"valid",value:u},value:{status:"valid",value:o.data[u]}});else if(l==="strict")s.length>0&&(Me(o,{code:Ee.unrecognized_keys,keys:s}),n.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const l=this._def.catchall;for(const u of s){const d=o.data[u];c.push({key:{status:"valid",value:u},value:l._parse(new so(o,d,o.path,u)),alwaysSet:u in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const l=[];for(const u of c){const d=await u.key;l.push({key:d,value:await u.value,alwaysSet:u.alwaysSet})}return l}).then(l=>Hr.mergeObjectSync(n,l)):Hr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Ye.errToObj,new er({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(r,n)=>{var o,i,a,s;const c=(a=(i=(o=this._def).errorMap)===null||i===void 0?void 0:i.call(o,r,n).message)!==null&&a!==void 0?a:n.defaultError;return r.code==="unrecognized_keys"?{message:(s=Ye.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new er({...this._def,unknownKeys:"strip"})}passthrough(){return new er({...this._def,unknownKeys:"passthrough"})}extend(t){return new er({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new er({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:nt.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new er({...this._def,catchall:t})}pick(t){const r={};return Nt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}omit(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new er({...this._def,shape:()=>r})}deepPartial(){return Ba(this)}partial(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new er({...this._def,shape:()=>r})}required(t){const r={};return Nt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof Lo;)i=i._def.innerType;r[n]=i}}),new er({...this._def,shape:()=>r})}keyof(){return VE(Nt.objectKeys(this.shape))}}er.create=(e,t)=>new er({shape:()=>e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.strictCreate=(e,t)=>new er({shape:()=>e,unknownKeys:"strict",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)}),er.lazycreate=(e,t)=>new er({shape:e,unknownKeys:"strip",catchall:Do.create(),typeName:nt.ZodObject,...dt(t)});class Ec extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=this._def.options;function o(i){for(const s of i)if(s.result.status==="valid")return s.result;for(const s of i)if(s.result.status==="dirty")return r.common.issues.push(...s.ctx.common.issues),s.result;const a=i.map(s=>new Vn(s.ctx.common.issues));return Me(r,{code:Ee.invalid_union,unionErrors:a}),st}if(r.common.async)return Promise.all(n.map(async i=>{const a={...r,common:{...r.common,issues:[]},parent:null};return{result:await i._parseAsync({data:r.data,path:r.path,parent:a}),ctx:a}})).then(o);{let i;const a=[];for(const c of n){const l={...r,common:{...r.common,issues:[]},parent:null},u=c._parseSync({data:r.data,path:r.path,parent:l});if(u.status==="valid")return u;u.status==="dirty"&&!i&&(i={result:u,ctx:l}),l.common.issues.length&&a.push(l.common.issues)}if(i)return r.common.issues.push(...i.ctx.common.issues),i.result;const s=a.map(c=>new Vn(c));return Me(r,{code:Ee.invalid_union,unionErrors:s}),st}}get options(){return this._def.options}}Ec.create=(e,t)=>new Ec({options:e,typeName:nt.ZodUnion,...dt(t)});const jd=e=>e instanceof $c?jd(e.schema):e instanceof Kn?jd(e.innerType()):e instanceof Oc?[e.value]:e instanceof ui?e.options:e instanceof Cc?Object.keys(e.enum):e instanceof Ac?jd(e._def.innerType):e instanceof Sc?[void 0]:e instanceof _c?[null]:null;class Dd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:Ee.invalid_type,expected:Ne.object,received:r.parsedType}),st;const n=this.discriminator,o=r.data[n],i=this.optionsMap.get(o);return i?r.common.async?i._parseAsync({data:r.data,path:r.path,parent:r}):i._parseSync({data:r.data,path:r.path,parent:r}):(Me(r,{code:Ee.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),st)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,r,n){const o=new Map;for(const i of r){const a=jd(i.shape[t]);if(!a)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const s of a){if(o.has(s))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(s)}`);o.set(s,i)}}return new Dd({typeName:nt.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...dt(n)})}}function ey(e,t){const r=si(e),n=si(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Nt.objectKeys(t),i=Nt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=ey(e[s],t[s]);if(!c.valid)return{valid:!1};a[s]=c.data}return{valid:!0,data:a}}else if(r===Ne.array&&n===Ne.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let i=0;i<e.length;i++){const a=e[i],s=t[i],c=ey(a,s);if(!c.valid)return{valid:!1};o.push(c.data)}return{valid:!0,data:o}}else return r===Ne.date&&n===Ne.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class kc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(Ym(i)||Ym(a))return st;const s=ey(i.value,a.value);return s.valid?((Xm(i)||Xm(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:Ee.invalid_intersection_types}),st)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([i,a])=>o(i,a)):o(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}kc.create=(e,t,r)=>new kc({left:e,right:t,typeName:nt.ZodIntersection,...dt(r)});class co extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:Ee.invalid_type,expected:Ne.array,received:n.parsedType}),st;if(n.data.length<this._def.items.length)return Me(n,{code:Ee.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),st;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:Ee.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const i=[...n.data].map((a,s)=>{const c=this._def.items[s]||this._def.rest;return c?c._parse(new so(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Hr.mergeArray(r,a)):Hr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new co({...this._def,rest:t})}}co.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new co({items:e,typeName:nt.ZodTuple,rest:null,...dt(t)})};class Tc extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.object)return Me(n,{code:Ee.invalid_type,expected:Ne.object,received:n.parsedType}),st;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new so(n,s,n.path,s)),value:a._parse(new so(n,n.data[s],n.path,s))});return n.common.async?Hr.mergeObjectAsync(r,o):Hr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new Tc({keyType:t,valueType:r,typeName:nt.ZodRecord,...dt(n)}):new Tc({keyType:Hn.create(),valueType:t,typeName:nt.ZodRecord,...dt(r)})}}class Ld extends mt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.map)return Me(n,{code:Ee.invalid_type,expected:Ne.map,received:n.parsedType}),st;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new so(n,s,n.path,[l,"key"])),value:i._parse(new so(n,c,n.path,[l,"value"]))}));if(n.common.async){const s=new Map;return Promise.resolve().then(async()=>{for(const c of a){const l=await c.key,u=await c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}})}else{const s=new Map;for(const c of a){const l=c.key,u=c.value;if(l.status==="aborted"||u.status==="aborted")return st;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Ld.create=(e,t,r)=>new Ld({valueType:t,keyType:e,typeName:nt.ZodMap,...dt(r)});class Wi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:Ee.invalid_type,expected:Ne.set,received:n.parsedType}),st;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:Ee.too_small,minimum:o.minSize.value,type:"set",inclusive:!0,exact:!1,message:o.minSize.message}),r.dirty()),o.maxSize!==null&&n.data.size>o.maxSize.value&&(Me(n,{code:Ee.too_big,maximum:o.maxSize.value,type:"set",inclusive:!0,exact:!1,message:o.maxSize.message}),r.dirty());const i=this._def.valueType;function a(c){const l=new Set;for(const u of c){if(u.status==="aborted")return st;u.status==="dirty"&&r.dirty(),l.add(u.value)}return{status:r.value,value:l}}const s=[...n.data.values()].map((c,l)=>i._parse(new so(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Wi({...this._def,minSize:{value:t,message:Ye.toString(r)}})}max(t,r){return new Wi({...this._def,maxSize:{value:t,message:Ye.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Wi.create=(e,t)=>new Wi({valueType:e,minSize:null,maxSize:null,typeName:nt.ZodSet,...dt(t)});class Ua extends mt{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.function)return Me(r,{code:Ee.invalid_type,expected:Ne.function,received:r.parsedType}),st;function n(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_arguments,argumentsError:c}})}function o(s,c){return Rd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Id(),bc].filter(l=>!!l),issueData:{code:Ee.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof za){const s=this;return nn(async function(...c){const l=new Vn([]),u=await s._def.args.parseAsync(c,i).catch(f=>{throw l.addIssue(n(c,f)),l}),d=await Reflect.apply(a,this,u);return await s._def.returns._def.type.parseAsync(d,i).catch(f=>{throw l.addIssue(o(d,f)),l})})}else{const s=this;return nn(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Vn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Vn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Ua({...this._def,args:co.create(t).rest(Hi.create())})}returns(t){return new Ua({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Ua({args:t||co.create([]).rest(Hi.create()),returns:r||Hi.create(),typeName:nt.ZodFunction,...dt(n)})}}class $c extends mt{get schema(){return this._def.getter()}_parse(t){const{ctx:r}=this._processInputParams(t);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}$c.create=(e,t)=>new $c({getter:e,typeName:nt.ZodLazy,...dt(t)});class Oc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:Ee.invalid_literal,expected:this._def.value}),st}return{status:"valid",value:t.data}}get value(){return this._def.value}}Oc.create=(e,t)=>new Oc({value:e,typeName:nt.ZodLiteral,...dt(t)});function VE(e,t){return new ui({values:e,typeName:nt.ZodEnum,...dt(t)})}class ui extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Nt.joinValues(n),received:r.parsedType,code:Ee.invalid_type}),st}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:Ee.invalid_enum_value,options:n}),st}return nn(t.data)}get options(){return this._def.values}get enum(){const t={};for(const r of this._def.values)t[r]=r;return t}get Values(){const t={};for(const r of this._def.values)t[r]=r;return t}get Enum(){const t={};for(const r of this._def.values)t[r]=r;return t}extract(t){return ui.create(t)}exclude(t){return ui.create(this.options.filter(r=>!t.includes(r)))}}ui.create=VE;class Cc extends mt{_parse(t){const r=Nt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Nt.objectValues(r);return Me(n,{expected:Nt.joinValues(o),received:n.parsedType,code:Ee.invalid_type}),st}if(r.indexOf(t.data)===-1){const o=Nt.objectValues(r);return Me(n,{received:n.data,code:Ee.invalid_enum_value,options:o}),st}return nn(t.data)}get enum(){return this._def.values}}Cc.create=(e,t)=>new Cc({values:e,typeName:nt.ZodNativeEnum,...dt(t)});class za extends mt{unwrap(){return this._def.type}_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.promise&&r.common.async===!1)return Me(r,{code:Ee.invalid_type,expected:Ne.promise,received:r.parsedType}),st;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return nn(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}za.create=(e,t)=>new za({type:e,typeName:nt.ZodPromise,...dt(t)});class Kn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===nt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=this._def.effect||null,i={addIssue:a=>{Me(n,a),a.fatal?r.abort():r.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),o.type==="preprocess"){const a=o.transform(n.data,i);return n.common.issues.length?{status:"dirty",value:n.data}:n.common.async?Promise.resolve(a).then(s=>this._def.schema._parseAsync({data:s,path:n.path,parent:n})):this._def.schema._parseSync({data:a,path:n.path,parent:n})}if(o.type==="refinement"){const a=s=>{const c=o.refinement(s,i);if(n.common.async)return Promise.resolve(c);if(c instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return s};if(n.common.async===!1){const s=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value),{status:r.value,value:s.value})}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(s=>s.status==="aborted"?st:(s.status==="dirty"&&r.dirty(),a(s.value).then(()=>({status:r.value,value:s.value}))))}if(o.type==="transform")if(n.common.async===!1){const a=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!wc(a))return a;const s=o.transform(a.value,i);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:s}}else return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(a=>wc(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Nt.assertNever(o)}}Kn.create=(e,t,r)=>new Kn({schema:e,typeName:nt.ZodEffects,effect:t,...dt(r)}),Kn.createWithPreprocess=(e,t,r)=>new Kn({schema:t,effect:{type:"preprocess",transform:e},typeName:nt.ZodEffects,...dt(r)});class Lo extends mt{_parse(t){return this._getType(t)===Ne.undefined?nn(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Lo.create=(e,t)=>new Lo({innerType:e,typeName:nt.ZodOptional,...dt(t)});class Ki extends mt{_parse(t){return this._getType(t)===Ne.null?nn(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Ki.create=(e,t)=>new Ki({innerType:e,typeName:nt.ZodNullable,...dt(t)});class Ac extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);let n=r.data;return r.parsedType===Ne.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}Ac.create=(e,t)=>new Ac({innerType:e,typeName:nt.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...dt(t)});class Fd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n={...r,common:{...r.common,issues:[]}},o=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return Pd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Vn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Fd.create=(e,t)=>new Fd({innerType:e,typeName:nt.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...dt(t)});class qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:Ee.invalid_type,expected:Ne.nan,received:n.parsedType}),st}return{status:"valid",value:t.data}}}qd.create=e=>new qd({typeName:nt.ZodNaN,...dt(e)});const X5=Symbol("zod_brand");class HE extends mt{_parse(t){const{ctx:r}=this._processInputParams(t),n=r.data;return this._def.type._parse({data:n,path:r.path,parent:r})}unwrap(){return this._def.type}}class Ic extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return i.status==="aborted"?st:i.status==="dirty"?(r.dirty(),zE(i.value)):this._def.out._parseAsync({data:i.value,path:n.path,parent:n})})();{const o=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return o.status==="aborted"?st:o.status==="dirty"?(r.dirty(),{status:"dirty",value:o.value}):this._def.out._parseSync({data:o.value,path:n.path,parent:n})}}static create(t,r){return new Ic({in:t,out:r,typeName:nt.ZodPipeline})}}class Bd extends mt{_parse(t){const r=this._def.innerType._parse(t);return wc(r)&&(r.value=Object.freeze(r.value)),r}}Bd.create=(e,t)=>new Bd({innerType:e,typeName:nt.ZodReadonly,...dt(t)});const WE=(e,t={},r)=>e?qa.create().superRefine((n,o)=>{var i,a;if(!e(n)){const s=typeof t=="function"?t(n):typeof t=="string"?{message:t}:t,c=(a=(i=s.fatal)!==null&&i!==void 0?i:r)!==null&&a!==void 0?a:!0,l=typeof s=="string"?{message:s}:s;o.addIssue({code:"custom",...l,fatal:c})}}):qa.create(),Q5={object:er.lazycreate};var nt;(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"})(nt||(nt={}));const eU=(e,t={message:`Input not instance of ${e.name}`})=>WE(r=>r instanceof e,t),KE=Hn.create,GE=ci.create,tU=qd.create,rU=li.create,JE=xc.create,nU=Vi.create,oU=Nd.create,iU=Sc.create,aU=_c.create,sU=qa.create,cU=Hi.create,lU=Do.create,uU=Md.create,dU=Wn.create,fU=er.create,pU=er.strictCreate,hU=Ec.create,mU=Dd.create,yU=kc.create,gU=co.create,vU=Tc.create,bU=Ld.create,wU=Wi.create,xU=Ua.create,SU=$c.create,_U=Oc.create,EU=ui.create,kU=Cc.create,TU=za.create,YE=Kn.create,$U=Lo.create,OU=Ki.create,CU=Kn.createWithPreprocess,AU=Ic.create;var V=Object.freeze({__proto__:null,defaultErrorMap:bc,setErrorMap:F5,getErrorMap:Id,makeIssue:Rd,EMPTY_PATH:q5,addIssueToContext:Me,ParseStatus:Hr,INVALID:st,DIRTY:zE,OK:nn,isAborted:Ym,isDirty:Xm,isValid:wc,isAsync:Pd,get util(){return Nt},get objectUtil(){return Jm},ZodParsedType:Ne,getParsedType:si,ZodType:mt,ZodString:Hn,ZodNumber:ci,ZodBigInt:li,ZodBoolean:xc,ZodDate:Vi,ZodSymbol:Nd,ZodUndefined:Sc,ZodNull:_c,ZodAny:qa,ZodUnknown:Hi,ZodNever:Do,ZodVoid:Md,ZodArray:Wn,ZodObject:er,ZodUnion:Ec,ZodDiscriminatedUnion:Dd,ZodIntersection:kc,ZodTuple:co,ZodRecord:Tc,ZodMap:Ld,ZodSet:Wi,ZodFunction:Ua,ZodLazy:$c,ZodLiteral:Oc,ZodEnum:ui,ZodNativeEnum:Cc,ZodPromise:za,ZodEffects:Kn,ZodTransformer:Kn,ZodOptional:Lo,ZodNullable:Ki,ZodDefault:Ac,ZodCatch:Fd,ZodNaN:qd,BRAND:X5,ZodBranded:HE,ZodPipeline:Ic,ZodReadonly:Bd,custom:WE,Schema:mt,ZodSchema:mt,late:Q5,get ZodFirstPartyTypeKind(){return nt},coerce:{string:e=>Hn.create({...e,coerce:!0}),number:e=>ci.create({...e,coerce:!0}),boolean:e=>xc.create({...e,coerce:!0}),bigint:e=>li.create({...e,coerce:!0}),date:e=>Vi.create({...e,coerce:!0})},any:sU,array:dU,bigint:rU,boolean:JE,date:nU,discriminatedUnion:mU,effect:YE,enum:EU,function:xU,instanceof:eU,intersection:yU,lazy:SU,literal:_U,map:bU,nan:tU,nativeEnum:kU,never:lU,null:aU,nullable:OU,number:GE,object:fU,oboolean:()=>JE().optional(),onumber:()=>GE().optional(),optional:$U,ostring:()=>KE().optional(),pipeline:AU,preprocess:CU,promise:TU,record:vU,set:wU,strictObject:pU,string:KE,symbol:oU,transformer:YE,tuple:gU,undefined:iU,union:hU,unknown:cU,void:uU,NEVER:st,ZodIssueCode:Ee,quotelessJson:L5,ZodError:Vn});const Za=V.object({title:V.string().optional(),link:V.string().optional()}),ty=V.object({color:V.string().optional(),variant:V.enum(["soft","solid"]).optional(),themeMode:V.enum(["light","dark"]).optional(),fontFamily:V.enum(["rubik","inter","ibm","fira"]).optional(),radius:V.number().min(.5).max(4).optional()}),XE=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Za.optional(),email:Za.optional(),phone:Za.optional(),privacyPolicy:Za.optional(),termsOfService:Za.optional(),showPoweredBy:V.boolean().optional()}).merge(ty),QE=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),ek=V.object({}).passthrough().transform(e=>e),Oe=V.object({className:V.string().optional(),style:ek.optional()}),Ud=V.object({container:Oe.optional(),image:Oe.optional(),fallback:Oe.optional()}),tk=V.object({button:Oe.optional(),text:V.record(QE,Oe.optional()),image:V.object({image:Oe.optional(),placeholder:Oe.optional()}).optional(),audio:Oe.optional(),video:Oe.optional(),file:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),location:V.object({container:Oe.optional(),title:Oe.optional(),icon:Oe.optional()}).optional(),column:Oe.optional(),row:Oe.optional(),bubble:Oe.optional(),carousel:V.object({container:Oe.optional(),slidesContainer:Oe.optional(),backButton:Oe.optional(),nextButton:Oe.optional()}).optional(),dropdown:V.object({button:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional()}).optional(),content:V.object({container:Oe.optional(),item:Oe.optional()}).optional()}).optional()}),rk=V.object({container:Oe.optional(),modal:V.object({overlay:Oe.optional(),container:Oe.optional(),dialog:V.object({container:Oe.optional(),title:V.object({container:Oe.optional(),text:Oe.optional(),closeIcon:Oe.optional()}).optional(),content:Oe.optional(),newConversation:V.object({text:Oe.optional(),button:Oe.optional()}).optional()}).optional()}).optional(),notification:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),icon:Oe.optional(),closeIcon:Oe.optional()}).optional(),header:V.object({container:Oe.optional(),content:V.object({container:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),actions:V.object({container:Oe.optional(),icons:Oe.optional()}).optional()}),expandedContent:V.object({container:Oe.optional(),group:Oe.optional(),descriptionItems:V.object({container:Oe.optional(),icon:Oe.optional(),text:Oe.optional(),link:Oe.optional(),poweredBy:Oe.optional()}).optional()}).optional(),description:V.object({container:Oe.optional(),title:Oe.optional(),subtitle:Oe.optional()}).optional(),newConversationIcon:Oe.optional()}).optional(),composer:V.object({container:Oe.optional(),input:Oe.optional(),uploadButton:V.object({container:Oe.optional(),icon:Oe.optional()}).optional(),button:V.object({container:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),fab:V.object({icon:Oe.optional(),container:Oe.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:Oe.optional(),viewport:Oe.optional(),thumb:Oe.optional(),corner:Oe.optional(),background:Oe.optional()}).optional(),container:Oe.optional(),marquee:V.object({content:Oe.optional(),title:Oe.optional(),description:Oe.optional(),avatar:Ud.optional(),container:Oe.optional()}).optional(),scrollDownButton:V.object({container:Oe.optional(),button:Oe.optional(),icon:Oe.optional()}).optional()}).optional(),message:V.object({container:Oe.optional(),avatar:Ud.optional(),blocks:tk.optional()}).optional(),loadingIndicator:V.object({container:Oe.optional(),loader:Oe.optional()}).optional()}),nk=V.enum(["opened","closed","initial"]),ok=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),ik=V.enum(["messaging","pushpin"]),ak=V.object({configuration:XE.optional().catch(void 0),theme:rk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:ok.optional().catch(void 0)}),IU=ak.extend({clientId:V.string(),botId:V.string(),selector:V.string().optional().catch(void 0),webchatScriptUrl:V.string().optional().catch(void 0),fabScriptUrl:V.string().optional().catch(void 0),messagingUrl:V.string().optional().catch(void 0),pushpinUrl:V.string().optional().catch(void 0),clientMode:ik.optional().catch(void 0),defaultState:nk.optional().catch(void 0)});function sk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=ty.parse(e);let a={},s;if(i){const u=BE(i),d=n==="dark"?OE(u):u,p=BE(c5(l5(Km(i)))),f=n==="dark"?OE(p):p,h=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:h}).reduce((m,[g,v])=>({...m,[`--bpPrimary-${g}`]:v}),{});const y=Object.entries({...f,1:h}).reduce((m,[g,v])=>({...m,[`--bpGray-${g}`]:v}),{});a={...s,...y}}r&&(a={...a,"--bpRadius-scale":r.toString()});const c=s?NE(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",l=o==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)","--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-50)","--button-bg-hover":"var(--bpPrimary-100)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c}:{"--header-bg":"var(--bpGray-50)","--header-bg-hover":"var(--bpGray-100)","--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-800)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)","--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?NE(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 a={...a,...l},ME(":root",a)+(t?ME(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const ry=$.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=jE(e??"",15);return J.jsxs(kE,{ref:a,"data-color":s,...r,...i,children:[J.jsx(TE,{src:t,...n}),J.jsx($E,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function qxe(){}function Bxe(){}function RU(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const PU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,MU={};function ck(e,t){return((t||MU).jsx?NU:PU).test(e)}const jU=/[ \t\n\f\r]/g;function DU(e){return typeof e=="object"?e.type==="text"?lk(e.value):!1:lk(e)}function lk(e){return e.replace(jU,"")===""}class Rc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Rc.prototype.property={},Rc.prototype.normal={},Rc.prototype.space=null;function uk(e,t){const r={},n={};let o=-1;for(;++o<e.length;)Object.assign(r,e[o].property),Object.assign(n,e[o].normal);return new Rc(r,n,t)}function ny(e){return e.toLowerCase()}class Rn{constructor(t,r){this.property=t,this.attribute=r}}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 LU=0;const yt=Gi(),pr=Gi(),dk=Gi(),Se=Gi(),Jt=Gi(),Va=Gi(),gn=Gi();function Gi(){return 2**++LU}const oy=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:pr,commaOrSpaceSeparated:gn,commaSeparated:Va,number:Se,overloadedBoolean:dk,spaceSeparated:Jt},Symbol.toStringTag,{value:"Module"})),iy=Object.keys(oy);class ay extends Rn{constructor(t,r,n,o){let i=-1;if(super(t,r),fk(this,"space",o),typeof n=="number")for(;++i<iy.length;){const a=iy[i];fk(this,iy[i],(n&oy[a])===oy[a])}}}ay.prototype.defined=!0;function fk(e,t,r){r&&(e[t]=r)}const FU={}.hasOwnProperty;function Ha(e){const t={},r={};let n;for(n in e.properties)if(FU.call(e.properties,n)){const o=e.properties[n],i=new ay(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[ny(n)]=n,r[ny(i.attribute)]=n}return new Rc(t,r,e.space)}const pk=Ha({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}}),hk=Ha({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function mk(e,t){return t in e?e[t]:t}function yk(e,t){return mk(e,t.toLowerCase())}const gk=Ha({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:yk,properties:{xmlns:null,xmlnsXLink:null}}),vk=Ha({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:pr,ariaAutoComplete:null,ariaBusy:pr,ariaChecked:pr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Jt,ariaCurrent:null,ariaDescribedBy:Jt,ariaDetails:null,ariaDisabled:pr,ariaDropEffect:Jt,ariaErrorMessage:null,ariaExpanded:pr,ariaFlowTo:Jt,ariaGrabbed:pr,ariaHasPopup:null,ariaHidden:pr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Jt,ariaLevel:Se,ariaLive:null,ariaModal:pr,ariaMultiLine:pr,ariaMultiSelectable:pr,ariaOrientation:null,ariaOwns:Jt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:pr,ariaReadOnly:pr,ariaRelevant:null,ariaRequired:pr,ariaRoleDescription:Jt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:pr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),qU=Ha({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:yk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Va,acceptCharset:Jt,accessKey:Jt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Jt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Jt,cols:Se,colSpan:null,content:null,contentEditable:pr,controls:yt,controlsList:Jt,coords:Se|Va,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:dk,draggable:pr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Jt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Jt,httpEquiv:Jt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Jt,itemRef:Jt,itemScope:yt,itemType:Jt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:yt,low:Se,manifest:null,max:null,maxLength:Se,media:null,method:null,min:null,minLength:Se,multiple:yt,muted:yt,name:null,nonce:null,noModule:yt,noValidate:yt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint: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:yt,optimum:Se,pattern:null,ping:Jt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Jt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Jt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:pr,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Se,step:null,style:null,tabIndex:Se,target:null,title:null,translate:null,type:null,typeMustMatch:yt,useMap:null,value:pr,width:Se,wrap:null,align:null,aLink:null,archive:Jt,axis:null,background:null,bgColor:null,border:Se,borderColor:null,bottomMargin:Se,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:yt,declare:yt,event:null,face:null,frame:null,frameBorder:null,hSpace:Se,leftMargin:Se,link:null,longDesc:null,lowSrc:null,marginHeight:Se,marginWidth:Se,noResize:yt,noHref:yt,noShade:yt,noWrap:yt,object:null,profile:null,prompt:null,rev:null,rightMargin:Se,rules:null,scheme:null,scrolling:pr,standby:null,summary:null,text:null,topMargin:Se,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Se,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:yt,disableRemotePlayback:yt,prefix:null,property:null,results:Se,security:null,unselectable:null}}),BU=Ha({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",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:mk,properties:{about:gn,accentHeight:Se,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Se,amplitude:Se,arabicForm:null,ascent:Se,attributeName:null,attributeType:null,azimuth:Se,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Se,by:null,calcMode:null,capHeight:Se,className:Jt,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:Se,diffuseConstant:Se,direction:null,display:null,dur:null,divisor:Se,dominantBaseline:null,download:yt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Se,enableBackground:null,end:null,event:null,exponent:Se,externalResourcesRequired:null,fill:null,fillOpacity:Se,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Va,g2:Va,glyphName:Va,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Se,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Se,horizOriginX:Se,horizOriginY:Se,id:null,ideographic:Se,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Se,k:Se,k1:Se,k2:Se,k3:Se,k4:Se,kernelMatrix:gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Se,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:Se,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:Se,overlineThickness:Se,paintOrder:null,panose1:null,path:null,pathLength:Se,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Jt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gn,rev:gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gn,requiredFeatures:gn,requiredFonts:gn,requiredFormats:gn,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:Se,specularExponent:Se,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Se,strikethroughThickness:Se,string:null,stroke:null,strokeDashArray:gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Se,strokeOpacity:Se,strokeWidth:null,style:null,surfaceScale:Se,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gn,tabIndex:Se,tableValues:null,target:null,targetX:Se,targetY:Se,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gn,to:null,transform:null,u1:null,u2:null,underlinePosition:Se,underlineThickness:Se,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Se,values:null,vAlphabetic:Se,vMathematical:Se,vectorEffect:null,vHanging:Se,vIdeographic:Se,version:null,vertAdvY:Se,vertOriginX:Se,vertOriginY:Se,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Se,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),UU=/^data[-\w.:]+$/i,bk=/-[a-z]/g,zU=/[A-Z]/g;function ZU(e,t){const r=ny(t);let n=t,o=Rn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&UU.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(bk,HU);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!bk.test(i)){let a=i.replace(zU,VU);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=ay}return new o(n,t)}function VU(e){return"-"+e.toLowerCase()}function HU(e){return e.charAt(1).toUpperCase()}const WU={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"},KU=uk([hk,pk,gk,vk,qU],"html"),sy=uk([hk,pk,gk,vk,BU],"svg");function GU(e){return e.join(" ").trim()}var wk={},xk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,JU=/\n/g,YU=/^\s*/,XU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,QU=/^:\s*/,e4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,t4=/^[;\s]*/,r4=/^\s+|\s+$/g,n4=`
104
+ `,Sk="/",_k="*",Ji="",o4="comment",i4="declaration",a4=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var r=1,n=1;function o(h){var y=h.match(JU);y&&(r+=y.length);var m=h.lastIndexOf(n4);n=~m?h.length-m:n+h.length}function i(){var h={line:r,column:n};return function(y){return y.position=new a(h),l(),y}}function a(h){this.start=h,this.end={line:r,column:n},this.source=t.source}a.prototype.content=e;function s(h){var y=new Error(t.source+":"+r+":"+n+": "+h);if(y.reason=h,y.filename=t.source,y.line=r,y.column=n,y.source=e,!t.silent)throw y}function c(h){var y=h.exec(e);if(y){var m=y[0];return o(m),e=e.slice(m.length),y}}function l(){c(YU)}function u(h){var y;for(h=h||[];y=d();)y!==!1&&h.push(y);return h}function d(){var h=i();if(!(Sk!=e.charAt(0)||_k!=e.charAt(1))){for(var y=2;Ji!=e.charAt(y)&&(_k!=e.charAt(y)||Sk!=e.charAt(y+1));)++y;if(y+=2,Ji===e.charAt(y-1))return s("End of comment missing");var m=e.slice(2,y-2);return n+=2,o(m),e=e.slice(y),n+=2,h({type:o4,comment:m})}}function p(){var h=i(),y=c(XU);if(y){if(d(),!c(QU))return s("property missing ':'");var m=c(e4),g=h({type:i4,property:Ek(y[0].replace(xk,Ji)),value:m?Ek(m[0].replace(xk,Ji)):Ji});return c(t4),g}}function f(){var h=[];u(h);for(var y;y=p();)y!==!1&&(h.push(y),u(h));return h}return l(),f()};function Ek(e){return e?e.replace(r4,Ji):Ji}var s4=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wk,"__esModule",{value:!0});var c4=s4(a4);function l4(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,c4.default)(e),o=typeof t=="function";return n.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(r=r||{},r[a]=s)}}),r}var kk=wk.default=l4;const u4=kk.default||kk,Tk=$k("end"),cy=$k("start");function $k(e){return t;function t(r){const n=r&&r.position&&r.position[e]||{};if(typeof n.line=="number"&&n.line>0&&typeof n.column=="number"&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset=="number"&&n.offset>-1?n.offset:void 0}}}function d4(e){const t=cy(e),r=Tk(e);if(t&&r)return{start:t,end:r}}function Pc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Ok(e.position):"start"in e||"end"in e?Ok(e):"line"in e||"column"in e?ly(e):""}function ly(e){return Ck(e&&e.line)+":"+Ck(e&&e.column)}function Ok(e){return ly(e&&e.start)+"-"+ly(e&&e.end)}function Ck(e){return e&&typeof e=="number"?e:1}class Wr extends Error{constructor(t,r,n){super(),typeof r=="string"&&(n=r,r=void 0);let o="",i={},a=!1;if(r&&("line"in r&&"column"in r?i={place:r}:"start"in r&&"end"in r?i={place:r}:"type"in r?i={ancestors:[r],place:r.position}:i={...r}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof n=="string"){const c=n.indexOf(":");c===-1?i.ruleId=n:(i.source=n.slice(0,c),i.ruleId=n.slice(c+1))}if(!i.place&&i.ancestors&&i.ancestors){const c=i.ancestors[i.ancestors.length-1];c&&(i.place=c.position)}const s=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=s?s.line:void 0,this.name=Pc(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual,this.expected,this.note,this.url}}Wr.prototype.file="",Wr.prototype.name="",Wr.prototype.reason="",Wr.prototype.message="",Wr.prototype.stack="",Wr.prototype.column=void 0,Wr.prototype.line=void 0,Wr.prototype.ancestors=void 0,Wr.prototype.cause=void 0,Wr.prototype.fatal=void 0,Wr.prototype.place=void 0,Wr.prototype.ruleId=void 0,Wr.prototype.source=void 0;const uy={}.hasOwnProperty,f4=new Map,p4=/[A-Z]/g,h4=/-([a-z])/g,m4=new Set(["table","tbody","thead","tfoot","tr"]),y4=new Set(["td","th"]),Ak="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function g4(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let n;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");n=k4(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");n=E4(r,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:n,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?sy:KU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Ik(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Ik(e,t,r){if(t.type==="element")return v4(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return b4(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return x4(e,t,r);if(t.type==="mdxjsEsm")return w4(e,t);if(t.type==="root")return S4(e,t,r);if(t.type==="text")return _4(e,t)}function v4(e,t,r){const n=e.schema;let o=n;t.tagName.toLowerCase()==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=Pk(e,t.tagName,!1),a=T4(e,t);let s=fy(e,t);return m4.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!DU(c):!0})),Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function b4(e,t){if(t.data&&t.data.estree&&e.evaluater){const n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Nc(e,t.position)}function w4(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Nc(e,t.position)}function x4(e,t,r){const n=e.schema;let o=n;t.name==="svg"&&n.space==="html"&&(o=sy,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:Pk(e,t.name,!0),a=$4(e,t),s=fy(e,t);return Rk(e,a,i,t),dy(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function S4(e,t,r){const n={};return dy(n,fy(e,t)),e.create(t,e.Fragment,n,r)}function _4(e,t){return t.value}function Rk(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function dy(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function E4(e,t,r){return n;function n(o,i,a,s){const l=Array.isArray(a.children)?r:t;return s?l(i,a,s):l(i,a)}}function k4(e,t){return r;function r(n,o,i,a){const s=Array.isArray(i.children),c=cy(n);return t(o,i,a,s,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function T4(e,t){const r={};let n,o;for(o in t.properties)if(o!=="children"&&uy.call(t.properties,o)){const i=O4(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&y4.has(t.tagName)?n=s:r[a]=s}}if(n){const i=r.style||(r.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=n}return r}function $4(e,t){const r={};for(const n of t.attributes)if(n.type==="mdxJsxExpressionAttribute")if(n.data&&n.data.estree&&e.evaluater){const i=n.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(r,e.evaluater.evaluateExpression(s.argument))}else Nc(e,t.position);else{const o=n.name;let i;if(n.value&&typeof n.value=="object")if(n.value.data&&n.value.data.estree&&e.evaluater){const s=n.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else Nc(e,t.position);else i=n.value===null?!0:n.value;r[o]=i}return r}function fy(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:f4;for(;++n<t.children.length;){const i=t.children[n];let a;if(e.passKeys){const c=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(c){const l=o.get(c)||0;a=c+"-"+l,o.set(c,l+1)}}const s=Ik(e,i,a);s!==void 0&&r.push(s)}return r}function O4(e,t,r){const n=ZU(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?RU(r):GU(r)),n.property==="style"){let o=typeof r=="object"?r:C4(e,String(r));return e.stylePropertyNameCase==="css"&&(o=A4(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?WU[n.property]||n.property:n.attribute,r]}}function C4(e,t){const r={};try{u4(t,n)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Wr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ak+"#cannot-parse-style-attribute",a}}return r;function n(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(h4,R4)),r[a]=i}}function Pk(e,t,r){let n;if(!r)n={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=ck(o[i])?{type:"Identifier",name:o[i]}:{type:"Literal",value:o[i]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(i&&s.type==="Literal"),optional:!1}:s}n=a}else n=ck(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return uy.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Nc(e)}function Nc(e,t){const r=new Wr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=Ak+"#cannot-handle-mdx-estrees-without-createevaluater",r}function A4(e){const t={};let r;for(r in e)uy.call(e,r)&&(t[I4(r)]=e[r]);return t}function I4(e){let t=e.replace(p4,P4);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function R4(e,t){return t.toUpperCase()}function P4(e){return"-"+e.toLowerCase()}const py={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"]},N4={};function hy(e,t){const r=t||N4,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Nk(e,n,o)}function Nk(e,t,r){if(M4(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Mk(e.children,t,r)}return Array.isArray(e)?Mk(e,t,r):""}function Mk(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=Nk(e[o],t,r);return n.join("")}function M4(e){return!!(e&&typeof e=="object")}const jk=document.createElement("i");function my(e){const t="&"+e+";";jk.innerHTML=t;const r=jk.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function vn(e,t,r,n){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,r=r>0?r:0,n.length<1e4)a=Array.from(n),a.unshift(t,r),e.splice(...a);else for(r&&e.splice(t,r);i<n.length;)a=n.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Pn(e,t){return e.length>0?(vn(e,e.length,0,t),e):t}const Dk={}.hasOwnProperty;function Lk(e){const t={};let r=-1;for(;++r<e.length;)j4(t,e[r]);return t}function j4(e,t){let r;for(r in t){const o=(Dk.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){Dk.call(o,a)||(o[a]=[]);const s=i[a];D4(o[a],Array.isArray(s)?s:s?[s]:[])}}}function D4(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);vn(e,0,0,n)}function Fk(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Gn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const on=di(/[A-Za-z]/),Kr=di(/[\dA-Za-z]/),L4=di(/[#-'*+\--9=?A-Z^-~]/);function zd(e){return e!==null&&(e<32||e===127)}const yy=di(/\d/),F4=di(/[\dA-Fa-f]/),q4=di(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function zt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const Zd=di(/\p{P}|\p{S}/u),Yi=di(/\s/);function di(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Wa(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const i=e.charCodeAt(r);let a="";if(i===37&&Kr(e.charCodeAt(r+1))&&Kr(e.charCodeAt(r+2)))o=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(a=String.fromCharCode(i));else if(i>55295&&i<57344){const s=e.charCodeAt(r+1);i<56320&&s>56319&&s<57344?(a=String.fromCharCode(i,s),o=1):a="�"}else a=String.fromCharCode(i);a&&(t.push(e.slice(n,r),encodeURIComponent(a)),n=r+o+1,a=""),o&&(r+=o,o=0)}return t.join("")+e.slice(n)}function Ct(e,t,r,n){const o=n?n-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return xt(c)?(e.enter(r),s(c)):t(c)}function s(c){return xt(c)&&i++<o?(e.consume(c),s):(e.exit(r),t(c))}}const B4={tokenize:U4};function U4(e){const t=e.attempt(this.parser.constructs.contentInitial,n,o);let r;return t;function n(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),Ct(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const c=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=c),r=c,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return et(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const z4={tokenize:Z4},qk={tokenize:V4};function Z4(e){const t=this,r=[];let n=0,o,i,a;return s;function s(b){if(n<r.length){const x=r[n];return t.containerState=x[1],e.attempt(x[0].continuation,c,l)(b)}return l(b)}function c(b){if(n++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&v();const x=t.events.length;let w=x,S;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){S=t.events[w][1].end;break}g(n);let C=x;for(;C<t.events.length;)t.events[C][1].end=Object.assign({},S),C++;return vn(t.events,w+1,0,t.events.slice(x)),t.events.length=C,l(b)}return s(b)}function l(b){if(n===r.length){if(!o)return p(b);if(o.currentConstruct&&o.currentConstruct.concrete)return h(b);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(qk,u,d)(b)}function u(b){return o&&v(),g(n),p(b)}function d(b){return t.parser.lazy[t.now().line]=n!==r.length,a=t.now().offset,h(b)}function p(b){return t.containerState={},e.attempt(qk,f,h)(b)}function f(b){return n++,r.push([t.currentConstruct,t.containerState]),p(b)}function h(b){if(b===null){o&&v(),g(0),e.consume(b);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),y(b)}function y(b){if(b===null){m(e.exit("chunkFlow"),!0),g(0),e.consume(b);return}return et(b)?(e.consume(b),m(e.exit("chunkFlow")),n=0,t.interrupt=void 0,s):(e.consume(b),y)}function m(b,x){const w=t.sliceStream(b);if(x&&w.push(null),b.previous=i,i&&(i.next=b),i=b,o.defineSkip(b.start),o.write(w),t.parser.lazy[b.start.line]){let S=o.events.length;for(;S--;)if(o.events[S][1].start.offset<a&&(!o.events[S][1].end||o.events[S][1].end.offset>a))return;const C=t.events.length;let I=C,P,A;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(P){A=t.events[I][1].end;break}P=!0}for(g(n),S=C;S<t.events.length;)t.events[S][1].end=Object.assign({},A),S++;vn(t.events,I+1,0,t.events.slice(C)),t.events.length=S}}function g(b){let x=r.length;for(;x-- >b;){const w=r[x];t.containerState=w[1],w[0].exit.call(t,e)}r.length=b}function v(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function V4(e,t,r){return Ct(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vd(e){if(e===null||zt(e)||Yi(e))return 1;if(Zd(e))return 2}function Hd(e,t,r){const n=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!n.includes(i)&&(t=i(t,r),n.push(i))}return t}const gy={name:"attention",tokenize:W4,resolveAll:H4};function H4(e,t){let r=-1,n,o,i,a,s,c,l,u;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(n=r;n--;)if(e[n][0]==="exit"&&e[n][1].type==="attentionSequence"&&e[n][1]._open&&t.sliceSerialize(e[n][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[n][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[n][1].end.offset-e[n][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;c=e[n][1].end.offset-e[n][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const d=Object.assign({},e[n][1].end),p=Object.assign({},e[r][1].start);Bk(d,-c),Bk(p,c),a={type:c>1?"strongSequence":"emphasisSequence",start:d,end:Object.assign({},e[n][1].end)},s={type:c>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[r][1].start),end:p},i={type:c>1?"strongText":"emphasisText",start:Object.assign({},e[n][1].end),end:Object.assign({},e[r][1].start)},o={type:c>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[n][1].end=Object.assign({},a.start),e[r][1].start=Object.assign({},s.end),l=[],e[n][1].end.offset-e[n][1].start.offset&&(l=Pn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=Pn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=Pn(l,Hd(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=Pn(l,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[r][1].end.offset-e[r][1].start.offset?(u=2,l=Pn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,vn(e,n-1,r-n+3,l),r=n+l.length-u-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function W4(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=Vd(n);let i;return a;function a(c){return i=c,e.enter("attentionSequence"),s(c)}function s(c){if(c===i)return e.consume(c),s;const l=e.exit("attentionSequence"),u=Vd(c),d=!u||u===2&&o||r.includes(c),p=!o||o===2&&u||r.includes(n);return l._open=!!(i===42?d:d&&(o||!p)),l._close=!!(i===42?p:p&&(u||!d)),t(c)}}function Bk(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const K4={name:"autolink",tokenize:G4};function G4(e,t,r){let n=0;return o;function o(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(f){return on(f)?(e.consume(f),a):l(f)}function a(f){return f===43||f===45||f===46||Kr(f)?(n=1,s(f)):l(f)}function s(f){return f===58?(e.consume(f),n=0,c):(f===43||f===45||f===46||Kr(f))&&n++<32?(e.consume(f),s):(n=0,l(f))}function c(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||zd(f)?r(f):(e.consume(f),c)}function l(f){return f===64?(e.consume(f),u):L4(f)?(e.consume(f),l):r(f)}function u(f){return Kr(f)?d(f):r(f)}function d(f){return f===46?(e.consume(f),n=0,u):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):p(f)}function p(f){if((f===45||Kr(f))&&n++<63){const h=f===45?p:d;return e.consume(f),h}return r(f)}}const Mc={tokenize:J4,partial:!0};function J4(e,t,r){return n;function n(i){return xt(i)?Ct(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||et(i)?t(i):r(i)}}const Uk={name:"blockQuote",tokenize:Y4,continuation:{tokenize:X4},exit:Q4};function Y4(e,t,r){const n=this;return o;function o(a){if(a===62){const s=n.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return r(a)}function i(a){return xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function X4(e,t,r){const n=this;return o;function o(a){return xt(a)?Ct(e,i,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Uk,t,r)(a)}}function Q4(e){e.exit("blockQuote")}const zk={name:"characterEscape",tokenize:ez};function ez(e,t,r){return n;function n(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return q4(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const Zk={name:"characterReference",tokenize:tz};function tz(e,t,r){const n=this;let o=0,i,a;return s;function s(d){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),c}function c(d){return d===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(d),e.exit("characterReferenceMarkerNumeric"),l):(e.enter("characterReferenceValue"),i=31,a=Kr,u(d))}function l(d){return d===88||d===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(d),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=F4,u):(e.enter("characterReferenceValue"),i=7,a=yy,u(d))}function u(d){if(d===59&&o){const p=e.exit("characterReferenceValue");return a===Kr&&!my(n.sliceSerialize(p))?r(d):(e.enter("characterReferenceMarker"),e.consume(d),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(d)&&o++<i?(e.consume(d),u):r(d)}}const Vk={tokenize:nz,partial:!0},Hk={name:"codeFenced",tokenize:rz,concrete:!0};function rz(e,t,r){const n=this,o={tokenize:w,partial:!0};let i=0,a=0,s;return c;function c(S){return l(S)}function l(S){const C=n.events[n.events.length-1];return i=C&&C[1].type==="linePrefix"?C[2].sliceSerialize(C[1],!0).length:0,s=S,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(S)}function u(S){return S===s?(a++,e.consume(S),u):a<3?r(S):(e.exit("codeFencedFenceSequence"),xt(S)?Ct(e,d,"whitespace")(S):d(S))}function d(S){return S===null||et(S)?(e.exit("codeFencedFence"),n.interrupt?t(S):e.check(Vk,y,x)(S)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(S))}function p(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),d(S)):xt(S)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ct(e,f,"whitespace")(S)):S===96&&S===s?r(S):(e.consume(S),p)}function f(S){return S===null||et(S)?d(S):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),h(S))}function h(S){return S===null||et(S)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),d(S)):S===96&&S===s?r(S):(e.consume(S),h)}function y(S){return e.attempt(o,x,m)(S)}function m(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),g}function g(S){return i>0&&xt(S)?Ct(e,v,"linePrefix",i+1)(S):v(S)}function v(S){return S===null||et(S)?e.check(Vk,y,x)(S):(e.enter("codeFlowValue"),b(S))}function b(S){return S===null||et(S)?(e.exit("codeFlowValue"),v(S)):(e.consume(S),b)}function x(S){return e.exit("codeFenced"),t(S)}function w(S,C,I){let P=0;return A;function A(F){return S.enter("lineEnding"),S.consume(F),S.exit("lineEnding"),L}function L(F){return S.enter("codeFencedFence"),xt(F)?Ct(S,K,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):K(F)}function K(F){return F===s?(S.enter("codeFencedFenceSequence"),z(F)):I(F)}function z(F){return F===s?(P++,S.consume(F),z):P>=a?(S.exit("codeFencedFenceSequence"),xt(F)?Ct(S,B,"whitespace")(F):B(F)):I(F)}function B(F){return F===null||et(F)?(S.exit("codeFencedFence"),C(F)):I(F)}}}function nz(e,t,r){const n=this;return o;function o(a){return a===null?r(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}const vy={name:"codeIndented",tokenize:iz},oz={tokenize:az,partial:!0};function iz(e,t,r){const n=this;return o;function o(l){return e.enter("codeIndented"),Ct(e,i,"linePrefix",4+1)(l)}function i(l){const u=n.events[n.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(l):r(l)}function a(l){return l===null?c(l):et(l)?e.attempt(oz,a,c)(l):(e.enter("codeFlowValue"),s(l))}function s(l){return l===null||et(l)?(e.exit("codeFlowValue"),a(l)):(e.consume(l),s)}function c(l){return e.exit("codeIndented"),t(l)}}function az(e,t,r){const n=this;return o;function o(a){return n.parser.lazy[n.now().line]?r(a):et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):Ct(e,i,"linePrefix",4+1)(a)}function i(a){const s=n.events[n.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):et(a)?o(a):r(a)}}const sz={name:"codeText",tokenize:uz,resolve:cz,previous:lz};function cz(e){let t=e.length-4,r=3,n,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(n=r;++n<t;)if(e[n][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(n=r-1,t++;++n<=t;)o===void 0?n!==t&&e[n][1].type!=="lineEnding"&&(o=n):(n===t||e[n][1].type==="lineEnding")&&(e[o][1].type="codeTextData",n!==o+2&&(e[o][1].end=e[n-1][1].end,e.splice(o+2,n-o-2),t-=n-o-2,n=o+2),o=void 0);return e}function lz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function uz(e,t,r){let n=0,o,i;return a;function a(d){return e.enter("codeText"),e.enter("codeTextSequence"),s(d)}function s(d){return d===96?(e.consume(d),n++,s):(e.exit("codeTextSequence"),c(d))}function c(d){return d===null?r(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),c):d===96?(i=e.enter("codeTextSequence"),o=0,u(d)):et(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),c):(e.enter("codeTextData"),l(d))}function l(d){return d===null||d===32||d===96||et(d)?(e.exit("codeTextData"),c(d)):(e.consume(d),l)}function u(d){return d===96?(e.consume(d),o++,u):o===n?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(i.type="codeTextData",l(d))}}function Wk(e){const t={};let r=-1,n,o,i,a,s,c,l;for(;++r<e.length;){for(;r in t;)r=t[r];if(n=e[r],r&&n[1].type==="chunkFlow"&&e[r-1][1].type==="listItemPrefix"&&(c=n[1]._tokenizer.events,i=0,i<c.length&&c[i][1].type==="lineEndingBlank"&&(i+=2),i<c.length&&c[i][1].type==="content"))for(;++i<c.length&&c[i][1].type!=="content";)c[i][1].type==="chunkText"&&(c[i][1]._isInFirstContentOfListItem=!0,i++);if(n[0]==="enter")n[1].contentType&&(Object.assign(t,dz(e,r)),r=t[r],l=!0);else if(n[1]._container){for(i=r,o=void 0;i--&&(a=e[i],a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(e[o][1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(n[1].end=Object.assign({},e[o][1].start),s=e.slice(o,r),s.unshift(n),vn(e,o,r-o+1,s))}}return!l}function dz(e,t){const r=e[t][1],n=e[t][2];let o=t-1;const i=[],a=r._tokenizer||n.parser[r.contentType](r.start),s=a.events,c=[],l={};let u,d,p=-1,f=r,h=0,y=0;const m=[y];for(;f;){for(;e[++o][1]!==f;);i.push(o),f._tokenizer||(u=n.sliceStream(f),f.next||u.push(null),d&&a.defineSkip(f.start),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),f._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),d=f,f=f.next}for(f=r;++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&&(y=p+1,m.push(y),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(a.events=[],f?(f._tokenizer=void 0,f.previous=void 0):m.pop(),p=m.length;p--;){const g=s.slice(m[p],m[p+1]),v=i.pop();c.unshift([v,v+g.length-1]),vn(e,v,2,g)}for(p=-1;++p<c.length;)l[h+c[p][0]]=h+c[p][1],h+=c[p][1]-c[p][0]-1;return l}const fz={tokenize:mz,resolve:hz},pz={tokenize:yz,partial:!0};function hz(e){return Wk(e),e}function mz(e,t){let r;return n;function n(s){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):et(s)?e.check(pz,a,i)(s):(e.consume(s),o)}function i(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function yz(e,t,r){const n=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ct(e,i,"linePrefix")}function i(a){if(a===null||et(a))return r(a);const s=n.events[n.events.length-1];return!n.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(n.parser.constructs.flow,r,t)(a)}}function Kk(e,t,r,n,o,i,a,s,c){const l=c||Number.POSITIVE_INFINITY;let u=0;return d;function d(g){return g===60?(e.enter(n),e.enter(o),e.enter(i),e.consume(g),e.exit(i),p):g===null||g===32||g===41||zd(g)?r(g):(e.enter(n),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),y(g))}function p(g){return g===62?(e.enter(i),e.consume(g),e.exit(i),e.exit(o),e.exit(n),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(g))}function f(g){return g===62?(e.exit("chunkString"),e.exit(s),p(g)):g===null||g===60||et(g)?r(g):(e.consume(g),g===92?h:f)}function h(g){return g===60||g===62||g===92?(e.consume(g),f):f(g)}function y(g){return!u&&(g===null||g===41||zt(g))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(n),t(g)):u<l&&g===40?(e.consume(g),u++,y):g===41?(e.consume(g),u--,y):g===null||g===32||g===40||zd(g)?r(g):(e.consume(g),g===92?m:y)}function m(g){return g===40||g===41||g===92?(e.consume(g),y):y(g)}}function Gk(e,t,r,n,o,i){const a=this;let s=0,c;return l;function l(f){return e.enter(n),e.enter(o),e.consume(f),e.exit(o),e.enter(i),u}function u(f){return s>999||f===null||f===91||f===93&&!c||f===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?r(f):f===93?(e.exit(i),e.enter(o),e.consume(f),e.exit(o),e.exit(n),t):et(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),d(f))}function d(f){return f===null||f===91||f===93||et(f)||s++>999?(e.exit("chunkString"),u(f)):(e.consume(f),c||(c=!xt(f)),f===92?p:d)}function p(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function Jk(e,t,r,n,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(n),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,c):r(p)}function c(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(n),t):(e.enter(i),l(p))}function l(p){return p===a?(e.exit(i),c(a)):p===null?r(p):et(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Ct(e,l,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||et(p)?(e.exit("chunkString"),l(p)):(e.consume(p),p===92?d:u)}function d(p){return p===a||p===92?(e.consume(p),u):u(p)}}function jc(e,t){let r;return n;function n(o){return et(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,n):xt(o)?Ct(e,n,r?"linePrefix":"lineSuffix")(o):t(o)}}const gz={name:"definition",tokenize:bz},vz={tokenize:wz,partial:!0};function bz(e,t,r){const n=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return Gk.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),c):r(f)}function c(f){return zt(f)?jc(e,l)(f):l(f)}function l(f){return Kk(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(vz,d,d)(f)}function d(f){return xt(f)?Ct(e,p,"whitespace")(f):p(f)}function p(f){return f===null||et(f)?(e.exit("definition"),n.parser.defined.push(o),t(f)):r(f)}}function wz(e,t,r){return n;function n(s){return zt(s)?jc(e,o)(s):r(s)}function o(s){return Jk(e,i,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return xt(s)?Ct(e,a,"whitespace")(s):a(s)}function a(s){return s===null||et(s)?t(s):r(s)}}const xz={name:"hardBreakEscape",tokenize:Sz};function Sz(e,t,r){return n;function n(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return et(i)?(e.exit("hardBreakEscape"),t(i)):r(i)}}const _z={name:"headingAtx",tokenize:kz,resolve:Ez};function Ez(e,t){let r=e.length-2,n=3,o,i;return e[n][1].type==="whitespace"&&(n+=2),r-2>n&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(n===r-1||r-4>n&&e[r-2][1].type==="whitespace")&&(r-=n+1===r?2:4),r>n&&(o={type:"atxHeadingText",start:e[n][1].start,end:e[r][1].end},i={type:"chunkText",start:e[n][1].start,end:e[r][1].end,contentType:"text"},vn(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function kz(e,t,r){let n=0;return o;function o(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&n++<6?(e.consume(u),a):u===null||zt(u)?(e.exit("atxHeadingSequence"),s(u)):r(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),c(u)):u===null||et(u)?(e.exit("atxHeading"),t(u)):xt(u)?Ct(e,s,"whitespace")(u):(e.enter("atxHeadingText"),l(u))}function c(u){return u===35?(e.consume(u),c):(e.exit("atxHeadingSequence"),s(u))}function l(u){return u===null||u===35||zt(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const Tz=["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"],Yk=["pre","script","style","textarea"],$z={name:"htmlFlow",tokenize:Iz,resolveTo:Az,concrete:!0},Oz={tokenize:Pz,partial:!0},Cz={tokenize:Rz,partial:!0};function Az(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 Iz(e,t,r){const n=this;let o,i,a,s,c;return l;function l(T){return u(T)}function u(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),i=!0,y):T===63?(e.consume(T),o=3,n.interrupt?t:E):on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function p(T){return T===45?(e.consume(T),o=2,f):T===91?(e.consume(T),o=5,s=0,h):on(T)?(e.consume(T),o=4,n.interrupt?t:E):r(T)}function f(T){return T===45?(e.consume(T),n.interrupt?t:E):r(T)}function h(T){const ce="CDATA[";return T===ce.charCodeAt(s++)?(e.consume(T),s===ce.length?n.interrupt?t:K:h):r(T)}function y(T){return on(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function m(T){if(T===null||T===47||T===62||zt(T)){const ce=T===47,pe=a.toLowerCase();return!ce&&!i&&Yk.includes(pe)?(o=1,n.interrupt?t(T):K(T)):Tz.includes(a.toLowerCase())?(o=6,ce?(e.consume(T),g):n.interrupt?t(T):K(T)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):i?v(T):b(T))}return T===45||Kr(T)?(e.consume(T),a+=String.fromCharCode(T),m):r(T)}function g(T){return T===62?(e.consume(T),n.interrupt?t:K):r(T)}function v(T){return xt(T)?(e.consume(T),v):A(T)}function b(T){return T===47?(e.consume(T),A):T===58||T===95||on(T)?(e.consume(T),x):xt(T)?(e.consume(T),b):A(T)}function x(T){return T===45||T===46||T===58||T===95||Kr(T)?(e.consume(T),x):w(T)}function w(T){return T===61?(e.consume(T),S):xt(T)?(e.consume(T),w):b(T)}function S(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),c=T,C):xt(T)?(e.consume(T),S):I(T)}function C(T){return T===c?(e.consume(T),c=null,P):T===null||et(T)?r(T):(e.consume(T),C)}function I(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||zt(T)?w(T):(e.consume(T),I)}function P(T){return T===47||T===62||xt(T)?b(T):r(T)}function A(T){return T===62?(e.consume(T),L):r(T)}function L(T){return T===null||et(T)?K(T):xt(T)?(e.consume(T),L):r(T)}function K(T){return T===45&&o===2?(e.consume(T),j):T===60&&o===1?(e.consume(T),Z):T===62&&o===4?(e.consume(T),H):T===63&&o===3?(e.consume(T),E):T===93&&o===5?(e.consume(T),D):et(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Oz,Q,z)(T)):T===null||et(T)?(e.exit("htmlFlowData"),z(T)):(e.consume(T),K)}function z(T){return e.check(Cz,B,Q)(T)}function B(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),F}function F(T){return T===null||et(T)?z(T):(e.enter("htmlFlowData"),K(T))}function j(T){return T===45?(e.consume(T),E):K(T)}function Z(T){return T===47?(e.consume(T),a="",W):K(T)}function W(T){if(T===62){const ce=a.toLowerCase();return Yk.includes(ce)?(e.consume(T),H):K(T)}return on(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),W):K(T)}function D(T){return T===93?(e.consume(T),E):K(T)}function E(T){return T===62?(e.consume(T),H):T===45&&o===2?(e.consume(T),E):K(T)}function H(T){return T===null||et(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),H)}function Q(T){return e.exit("htmlFlow"),t(T)}}function Rz(e,t,r){const n=this;return o;function o(a){return et(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):r(a)}function i(a){return n.parser.lazy[n.now().line]?r(a):t(a)}}function Pz(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Mc,t,r)}}const Nz={name:"htmlText",tokenize:Mz};function Mz(e,t,r){const n=this;let o,i,a;return s;function s(E){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(E),c}function c(E){return E===33?(e.consume(E),l):E===47?(e.consume(E),w):E===63?(e.consume(E),b):on(E)?(e.consume(E),I):r(E)}function l(E){return E===45?(e.consume(E),u):E===91?(e.consume(E),i=0,h):on(E)?(e.consume(E),v):r(E)}function u(E){return E===45?(e.consume(E),f):r(E)}function d(E){return E===null?r(E):E===45?(e.consume(E),p):et(E)?(a=d,Z(E)):(e.consume(E),d)}function p(E){return E===45?(e.consume(E),f):d(E)}function f(E){return E===62?j(E):E===45?p(E):d(E)}function h(E){const H="CDATA[";return E===H.charCodeAt(i++)?(e.consume(E),i===H.length?y:h):r(E)}function y(E){return E===null?r(E):E===93?(e.consume(E),m):et(E)?(a=y,Z(E)):(e.consume(E),y)}function m(E){return E===93?(e.consume(E),g):y(E)}function g(E){return E===62?j(E):E===93?(e.consume(E),g):y(E)}function v(E){return E===null||E===62?j(E):et(E)?(a=v,Z(E)):(e.consume(E),v)}function b(E){return E===null?r(E):E===63?(e.consume(E),x):et(E)?(a=b,Z(E)):(e.consume(E),b)}function x(E){return E===62?j(E):b(E)}function w(E){return on(E)?(e.consume(E),S):r(E)}function S(E){return E===45||Kr(E)?(e.consume(E),S):C(E)}function C(E){return et(E)?(a=C,Z(E)):xt(E)?(e.consume(E),C):j(E)}function I(E){return E===45||Kr(E)?(e.consume(E),I):E===47||E===62||zt(E)?P(E):r(E)}function P(E){return E===47?(e.consume(E),j):E===58||E===95||on(E)?(e.consume(E),A):et(E)?(a=P,Z(E)):xt(E)?(e.consume(E),P):j(E)}function A(E){return E===45||E===46||E===58||E===95||Kr(E)?(e.consume(E),A):L(E)}function L(E){return E===61?(e.consume(E),K):et(E)?(a=L,Z(E)):xt(E)?(e.consume(E),L):P(E)}function K(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,z):et(E)?(a=K,Z(E)):xt(E)?(e.consume(E),K):(e.consume(E),B)}function z(E){return E===o?(e.consume(E),o=void 0,F):E===null?r(E):et(E)?(a=z,Z(E)):(e.consume(E),z)}function B(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||zt(E)?P(E):(e.consume(E),B)}function F(E){return E===47||E===62||zt(E)?P(E):r(E)}function j(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):r(E)}function Z(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),W}function W(E){return xt(E)?Ct(e,D,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):D(E)}function D(E){return e.enter("htmlTextData"),a(E)}}const by={name:"labelEnd",tokenize:Bz,resolveTo:qz,resolveAll:Fz},jz={tokenize:Uz},Dz={tokenize:zz},Lz={tokenize:Zz};function Fz(e){let t=-1;for(;++t<e.length;){const r=e[t][1];(r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd")&&(e.splice(t+1,r.type==="labelImage"?4:2),r.type="data",t++)}return e}function qz(e,t){let r=e.length,n=0,o,i,a,s;for(;r--;)if(o=e[r][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=r,o.type!=="labelLink")){n=2;break}}else o.type==="labelEnd"&&(a=r);const c={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+n+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",c,t],["enter",l,t]],s=Pn(s,e.slice(i+1,i+n+3)),s=Pn(s,[["enter",u,t]]),s=Pn(s,Hd(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),s=Pn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=Pn(s,e.slice(a+1)),s=Pn(s,[["exit",c,t]]),vn(e,i,e.length,s),e}function Bz(e,t,r){const n=this;let o=n.events.length,i,a;for(;o--;)if((n.events[o][1].type==="labelImage"||n.events[o][1].type==="labelLink")&&!n.events[o][1]._balanced){i=n.events[o][1];break}return s;function s(p){return i?i._inactive?d(p):(a=n.parser.defined.includes(Gn(n.sliceSerialize({start:i.end,end:n.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),c):r(p)}function c(p){return p===40?e.attempt(jz,u,a?u:d)(p):p===91?e.attempt(Dz,u,a?l:d)(p):a?u(p):d(p)}function l(p){return e.attempt(Lz,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,r(p)}}function Uz(e,t,r){return n;function n(d){return e.enter("resource"),e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),o}function o(d){return zt(d)?jc(e,i)(d):i(d)}function i(d){return d===41?u(d):Kk(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return zt(d)?jc(e,c)(d):u(d)}function s(d){return r(d)}function c(d){return d===34||d===39||d===40?Jk(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function l(d){return zt(d)?jc(e,u)(d):u(d)}function u(d){return d===41?(e.enter("resourceMarker"),e.consume(d),e.exit("resourceMarker"),e.exit("resource"),t):r(d)}}function zz(e,t,r){const n=this;return o;function o(s){return Gk.call(n,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(Gn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function Zz(e,t,r){return n;function n(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),o}function o(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):r(i)}}const Vz={name:"labelStartImage",tokenize:Hz,resolveAll:by.resolveAll};function Hz(e,t,r){const n=this;return o;function o(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),i}function i(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):r(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(s):t(s)}}const Wz={name:"labelStartLink",tokenize:Kz,resolveAll:by.resolveAll};function Kz(e,t,r){const n=this;return o;function o(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),i}function i(a){return a===94&&"_hiddenFootnoteSupport"in n.parser.constructs?r(a):t(a)}}const wy={name:"lineEnding",tokenize:Gz};function Gz(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const Wd={name:"thematicBreak",tokenize:Jz};function Jz(e,t,r){let n=0,o;return i;function i(l){return e.enter("thematicBreak"),a(l)}function a(l){return o=l,s(l)}function s(l){return l===o?(e.enter("thematicBreakSequence"),c(l)):n>=3&&(l===null||et(l))?(e.exit("thematicBreak"),t(l)):r(l)}function c(l){return l===o?(e.consume(l),n++,c):(e.exit("thematicBreakSequence"),xt(l)?Ct(e,s,"whitespace")(l):s(l))}}const cn={name:"list",tokenize:Qz,continuation:{tokenize:e6},exit:r6},Yz={tokenize:n6,partial:!0},Xz={tokenize:t6,partial:!0};function Qz(e,t,r){const n=this,o=n.events[n.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(f){const h=n.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(h==="listUnordered"?!n.containerState.marker||f===n.containerState.marker:yy(f)){if(n.containerState.type||(n.containerState.type=h,e.enter(h,{_container:!0})),h==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Wd,r,l)(f):l(f);if(!n.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(f)}return r(f)}function c(f){return yy(f)&&++a<10?(e.consume(f),c):(!n.interrupt||a<2)&&(n.containerState.marker?f===n.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),l(f)):r(f)}function l(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),n.containerState.marker=n.containerState.marker||f,e.check(Mc,n.interrupt?r:u,e.attempt(Yz,p,d))}function u(f){return n.containerState.initialBlankLine=!0,i++,p(f)}function d(f){return xt(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),p):r(f)}function p(f){return n.containerState.size=i+n.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function e6(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Mc,o,i);function o(s){return n.containerState.furtherBlankLines=n.containerState.furtherBlankLines||n.containerState.initialBlankLine,Ct(e,t,"listItemIndent",n.containerState.size+1)(s)}function i(s){return n.containerState.furtherBlankLines||!xt(s)?(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,a(s)):(n.containerState.furtherBlankLines=void 0,n.containerState.initialBlankLine=void 0,e.attempt(Xz,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ct(e,e.attempt(cn,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function t6(e,t,r){const n=this;return Ct(e,o,"listItemIndent",n.containerState.size+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===n.containerState.size?t(i):r(i)}}function r6(e){e.exit(this.containerState.type)}function n6(e,t,r){const n=this;return Ct(e,o,"listItemPrefixWhitespace",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4+1);function o(i){const a=n.events[n.events.length-1];return!xt(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):r(i)}}const Xk={name:"setextUnderline",tokenize:i6,resolveTo:o6};function o6(e,t){let r=e.length,n,o,i;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){n=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!i&&e[r][1].type==="definition"&&(i=r);const a={type:"setextHeading",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",i?(e.splice(o,0,["enter",a,t]),e.splice(i+1,0,["exit",e[n][1],t]),e[n][1].end=Object.assign({},e[i][1].end)):e[n][1]=a,e.push(["exit",a,t]),e}function i6(e,t,r){const n=this;let o;return i;function i(l){let u=n.events.length,d;for(;u--;)if(n.events[u][1].type!=="lineEnding"&&n.events[u][1].type!=="linePrefix"&&n.events[u][1].type!=="content"){d=n.events[u][1].type==="paragraph";break}return!n.parser.lazy[n.now().line]&&(n.interrupt||d)?(e.enter("setextHeadingLine"),o=l,a(l)):r(l)}function a(l){return e.enter("setextHeadingLineSequence"),s(l)}function s(l){return l===o?(e.consume(l),s):(e.exit("setextHeadingLineSequence"),xt(l)?Ct(e,c,"lineSuffix")(l):c(l))}function c(l){return l===null||et(l)?(e.exit("setextHeadingLine"),t(l)):r(l)}}const a6={tokenize:s6};function s6(e){const t=this,r=e.attempt(Mc,n,e.attempt(this.parser.constructs.flowInitial,o,Ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(fz,o)),"linePrefix")));return r;function n(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const c6={resolveAll:eT()},l6=Qk("string"),u6=Qk("text");function Qk(e){return{tokenize:t,resolveAll:eT(e==="text"?d6:void 0)};function t(r){const n=this,o=this.parser.constructs[e],i=r.attempt(o,a,s);return a;function a(u){return l(u)?i(u):s(u)}function s(u){if(u===null){r.consume(u);return}return r.enter("data"),r.consume(u),c}function c(u){return l(u)?(r.exit("data"),i(u)):(r.consume(u),c)}function l(u){if(u===null)return!0;const d=o[u];let p=-1;if(d)for(;++p<d.length;){const f=d[p];if(!f.previous||f.previous.call(n,n.previous))return!0}return!1}}}function eT(e){return t;function t(r,n){let o=-1,i;for(;++o<=r.length;)i===void 0?r[o]&&r[o][1].type==="data"&&(i=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==i+2&&(r[i][1].end=r[o-1][1].end,r.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(r,n):r}}function d6(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const n=e[r-1][1],o=t.sliceStream(n);let i=o.length,a=-1,s=0,c;for(;i--;){const l=o[i];if(typeof l=="string"){for(a=l.length;l.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(l===-2)c=!0,s++;else if(l!==-1){i++;break}}if(s){const l={type:r===e.length||c||s<2?"lineSuffix":"hardBreakTrailing",start:{line:n.end.line,column:n.end.column-s,offset:n.end.offset-s,_index:n.start._index+i,_bufferIndex:i?a:n.start._bufferIndex+a},end:Object.assign({},n.end)};n.end=Object.assign({},l.start),n.start.offset===n.end.offset?Object.assign(n,l):(e.splice(r,0,["enter",l,t],["exit",l,t]),r+=2)}r++}return e}function f6(e,t,r){let n=Object.assign(r?Object.assign({},r):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const c={consume:v,enter:b,exit:x,attempt:C(w),check:C(S),interrupt:C(S,{interrupt:!0})},l={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:f,sliceSerialize:p,now:h,defineSkip:y,write:d};let u=t.tokenize.call(l,c);return t.resolveAll&&i.push(t),l;function d(L){return a=Pn(a,L),m(),a[a.length-1]!==null?[]:(I(t,0),l.events=Hd(i,l.events,l),l.events)}function p(L,K){return h6(f(L),K)}function f(L){return p6(a,L)}function h(){const{line:L,column:K,offset:z,_index:B,_bufferIndex:F}=n;return{line:L,column:K,offset:z,_index:B,_bufferIndex:F}}function y(L){o[L.line]=L.column,A()}function m(){let L;for(;n._index<a.length;){const K=a[n._index];if(typeof K=="string")for(L=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===L&&n._bufferIndex<K.length;)g(K.charCodeAt(n._bufferIndex));else g(K)}}function g(L){u=u(L)}function v(L){et(L)?(n.line++,n.column=1,n.offset+=L===-3?2:1,A()):L!==-1&&(n.column++,n.offset++),n._bufferIndex<0?n._index++:(n._bufferIndex++,n._bufferIndex===a[n._index].length&&(n._bufferIndex=-1,n._index++)),l.previous=L}function b(L,K){const z=K||{};return z.type=L,z.start=h(),l.events.push(["enter",z,l]),s.push(z),z}function x(L){const K=s.pop();return K.end=h(),l.events.push(["exit",K,l]),K}function w(L,K){I(L,K.from)}function S(L,K){K.restore()}function C(L,K){return z;function z(B,F,j){let Z,W,D,E;return Array.isArray(B)?Q(B):"tokenize"in B?Q([B]):H(B);function H(fe){return ve;function ve(_e){const Ce=_e!==null&&fe[_e],be=_e!==null&&fe.null,de=[...Array.isArray(Ce)?Ce:Ce?[Ce]:[],...Array.isArray(be)?be:be?[be]:[]];return Q(de)(_e)}}function Q(fe){return Z=fe,W=0,fe.length===0?j:T(fe[W])}function T(fe){return ve;function ve(_e){return E=P(),D=fe,fe.partial||(l.currentConstruct=fe),fe.name&&l.parser.constructs.disable.null.includes(fe.name)?pe():fe.tokenize.call(K?Object.assign(Object.create(l),K):l,c,ce,pe)(_e)}}function ce(fe){return L(D,E),F}function pe(fe){return E.restore(),++W<Z.length?T(Z[W]):j}}}function I(L,K){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&vn(l.events,K,l.events.length-K,L.resolve(l.events.slice(K),l)),L.resolveTo&&(l.events=L.resolveTo(l.events,l))}function P(){const L=h(),K=l.previous,z=l.currentConstruct,B=l.events.length,F=Array.from(s);return{restore:j,from:B};function j(){n=L,l.previous=K,l.currentConstruct=z,l.events.length=B,s=F,A()}}function A(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function p6(e,t){const r=t.start._index,n=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(r===o)a=[e[r].slice(n,i)];else{if(a=e.slice(r,o),n>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(n):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function h6(e,t){let r=-1;const n=[];let o;for(;++r<e.length;){const i=e[r];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
105
105
  `;break}case-3:{a=`\r
106
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,n.push(a)}return n.join("")}const m6=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:gz},disable:{null:[]},document:{42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:Uk},flow:{35:_z,42:Wd,45:[Xk,Wd],60:$z,61:Xk,95:Wd,96:Hk,126:Hk},flowInitial:{[-2]:vy,[-1]:vy,32:vy},insideSpan:{null:[gy,c6]},string:{38:Zk,92:zk},text:{[-5]:wy,[-4]:wy,[-3]:wy,33:Vz,38:Zk,42:gy,60:[K4,Nz],91:Wz,92:[xz,zk],93:by,95:gy,96:sz}},Symbol.toStringTag,{value:"Module"}));function y6(e){const r=Lk([m6,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:o(B4),document:o(z4),flow:o(a6),string:o(l6),text:o(u6)};return n;function o(i){return a;function a(s){return f6(n,i,s)}}}function g6(e){for(;!Wk(e););return e}const tT=/[\0\t\n\r]/g;function v6(){let e=1,t="",r=!0,n;return o;function o(i,a,s){const c=[];let l,u,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",r&&(i.charCodeAt(0)===65279&&d++,r=void 0);d<i.length;){if(tT.lastIndex=d,l=tT.exec(i),p=l&&l.index!==void 0?l.index:i.length,f=i.charCodeAt(p),!l){t=i.slice(d);break}if(f===10&&d===p&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),d<p&&(c.push(i.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:n=!0,e=1}d=p+1}return s&&(n&&c.push(-5),t&&c.push(t),c.push(null)),c}}const b6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function w6(e){return e.replace(b6,x6)}function x6(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),i=o===120||o===88;return Fk(r.slice(i?2:1),i?16:10)}return my(r)||e}const rT={}.hasOwnProperty;function S6(e,t,r){return typeof t!="string"&&(r=t,t=void 0),_6(r)(g6(y6(r).document().write(v6()(e,t,!0))))}function _6(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(Ae),blockQuote:i(Ce),characterEscape:P,characterReference:P,codeFenced:i(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(be,a),codeText:i(de,a),codeTextData:P,data:P,codeFlowValue:P,definition:i(te),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(we),hardBreakEscape:i(qe),hardBreakTrailing:i(qe),htmlFlow:i(q,a),htmlFlowData:P,htmlText:i(q,a),htmlTextData:P,image:i(le),label:a,link:i(he),listItem:i(je),listItemValue:p,listOrdered:i(me,d),listUnordered:i(me),paragraph:i(Ie),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ae),strong:i(Ue),thematicBreak:i(Ke)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:_e,autolinkProtocol:ve,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:fe,codeFenced:c(m),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:A,codeIndented:c(g),codeText:c(F),codeTextData:A,data:A,definition:c(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(W),hardBreakTrailing:c(W),htmlFlow:c(Z),htmlFlowData:A,htmlText:c(B),htmlTextData:A,image:c(U),label:D,labelText:K,lineEnding:L,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:E,resourceTitleString:H,resource:Q,setextHeading:c(I),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};nT(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(G){let se={type:"root",children:[]};const Y={stack:[se],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:r},ye=[];let $e=-1;for(;++$e<G.length;)if(G[$e][1].type==="listOrdered"||G[$e][1].type==="listUnordered")if(G[$e][0]==="enter")ye.push($e);else{const tt=ye.pop();$e=o(G,tt,$e)}for($e=-1;++$e<G.length;){const tt=t[G[$e][0]];rT.call(tt,G[$e][1].type)&&tt[G[$e][1].type].call(Object.assign({sliceSerialize:G[$e][2].sliceSerialize},Y),G[$e][1])}if(Y.tokenStack.length>0){const tt=Y.tokenStack[Y.tokenStack.length-1];(tt[1]||oT).call(Y,void 0,tt[0])}for(se.position={start:fi(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:fi(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)se=t.transforms[$e](se)||se;return se}function o(G,se,Y){let ye=se-1,$e=-1,tt=!1,Ve,ct,$t,Wt;for(;++ye<=Y;){const z=G[ye];switch(z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{z[0]==="enter"?$e++:$e--,Wt=void 0;break}case"lineEndingBlank":{z[0]==="enter"&&(Ve&&!Wt&&!$e&&!$t&&($t=ye),Wt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wt=void 0}if(!$e&&z[0]==="enter"&&z[1].type==="listItemPrefix"||$e===-1&&z[0]==="exit"&&(z[1].type==="listUnordered"||z[1].type==="listOrdered")){if(Ve){let X=ye;for(ct=void 0;X--;){const ze=G[X];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;ct&&(G[ct][1].type="lineEndingBlank",tt=!0),ze[1].type="lineEnding",ct=X}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}$t&&(!ct||$t<ct)&&(Ve._spread=!0),Ve.end=Object.assign({},ct?G[ct][1].start:z[1].end),G.splice(ct||ye,0,["exit",Ve,z[2]]),ye++,Y++}if(z[1].type==="listItemPrefix"){const X={type:"listItem",_spread:!1,start:Object.assign({},z[1].start),end:void 0};Ve=X,G.splice(ye,0,["enter",X,z[2]]),ye++,Y++,$t=void 0,Wt=!0}}}return G[se][1]._spread=tt,Y}function i(G,se){return Y;function Y(ye){s.call(this,G(ye),ye),se&&se.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(G,se,Y){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([se,Y]),G.position={start:fi(se.start),end:void 0}}function c(G){return se;function se(Y){G&&G.call(this,Y),l.call(this,Y)}}function l(G,se){const Y=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==G.type&&(se?se.call(this,G,ye[0]):(ye[1]||oT).call(this,G,ye[0]));else throw new Error("Cannot close `"+G.type+"` ("+Pc({start:G.start,end:G.end})+"): it’s not open");Y.position.end=fi(G.end)}function u(){return hy(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(G){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function f(){const G=this.resume(),se=this.stack[this.stack.length-1];se.lang=G}function h(){const G=this.resume(),se=this.stack[this.stack.length-1];se.meta=G}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/(\r?\n|\r)$/g,"")}function v(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase()}function b(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function x(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function w(G){const se=this.stack[this.stack.length-1];if(!se.depth){const Y=this.sliceSerialize(G).length;se.depth=Y}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(G){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(G){const Y=this.stack[this.stack.length-1].children;let ye=Y[Y.length-1];(!ye||ye.type!=="text")&&(ye=pt(),ye.position={start:fi(G.start),end:void 0},Y.push(ye)),this.stack.push(ye)}function A(G){const se=this.stack.pop();se.value+=this.sliceSerialize(G),se.position.end=fi(G.end)}function L(G){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=se.children[se.children.length-1];Y.position.end=fi(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(P.call(this,G),A.call(this,G))}function W(){this.data.atHardBreak=!0}function Z(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function B(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function F(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function j(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function U(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function K(G){const se=this.sliceSerialize(G),Y=this.stack[this.stack.length-2];Y.label=w6(se),Y.identifier=Gn(se).toLowerCase()}function D(){const G=this.stack[this.stack.length-1],se=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const ye=G.children;Y.children=ye}else Y.alt=se}function E(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function H(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function pe(G){this.data.characterReferenceType=G.type}function fe(G){const se=this.sliceSerialize(G),Y=this.data.characterReferenceType;let ye;Y?(ye=Fk(se,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=my(se);const $e=this.stack.pop();$e.value+=ye,$e.position.end=fi(G.end)}function ve(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(G)}function _e(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(G)}function Ce(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function q(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function me(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function je(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function Ke(){return{type:"thematicBreak"}}}function fi(e){return{line:e.line,column:e.column,offset:e.offset}}function nT(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?nT(e,n):E6(e,n)}}function E6(e,t){let r;for(r in t)if(rT.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function oT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is still open")}function k6(e){const t=this;t.parser=r;function r(n){return S6(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function T6(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function $6(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
106
+ `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,n.push(a)}return n.join("")}const m6=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:gz},disable:{null:[]},document:{42:cn,43:cn,45:cn,48:cn,49:cn,50:cn,51:cn,52:cn,53:cn,54:cn,55:cn,56:cn,57:cn,62:Uk},flow:{35:_z,42:Wd,45:[Xk,Wd],60:$z,61:Xk,95:Wd,96:Hk,126:Hk},flowInitial:{[-2]:vy,[-1]:vy,32:vy},insideSpan:{null:[gy,c6]},string:{38:Zk,92:zk},text:{[-5]:wy,[-4]:wy,[-3]:wy,33:Vz,38:Zk,42:gy,60:[K4,Nz],91:Wz,92:[xz,zk],93:by,95:gy,96:sz}},Symbol.toStringTag,{value:"Module"}));function y6(e){const r=Lk([m6,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:o(B4),document:o(z4),flow:o(a6),string:o(l6),text:o(u6)};return n;function o(i){return a;function a(s){return f6(n,i,s)}}}function g6(e){for(;!Wk(e););return e}const tT=/[\0\t\n\r]/g;function v6(){let e=1,t="",r=!0,n;return o;function o(i,a,s){const c=[];let l,u,d,p,f;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),d=0,t="",r&&(i.charCodeAt(0)===65279&&d++,r=void 0);d<i.length;){if(tT.lastIndex=d,l=tT.exec(i),p=l&&l.index!==void 0?l.index:i.length,f=i.charCodeAt(p),!l){t=i.slice(d);break}if(f===10&&d===p&&n)c.push(-3),n=void 0;else switch(n&&(c.push(-5),n=void 0),d<p&&(c.push(i.slice(d,p)),e+=p-d),f){case 0:{c.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,c.push(-2);e++<u;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:n=!0,e=1}d=p+1}return s&&(n&&c.push(-5),t&&c.push(t),c.push(null)),c}}const b6=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function w6(e){return e.replace(b6,x6)}function x6(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),i=o===120||o===88;return Fk(r.slice(i?2:1),i?16:10)}return my(r)||e}const rT={}.hasOwnProperty;function S6(e,t,r){return typeof t!="string"&&(r=t,t=void 0),_6(r)(g6(y6(r).document().write(v6()(e,t,!0))))}function _6(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(he),autolinkProtocol:P,autolinkEmail:P,atxHeading:i(Ae),blockQuote:i(Ce),characterEscape:P,characterReference:P,codeFenced:i(be),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(be,a),codeText:i(de,a),codeTextData:P,data:P,codeFlowValue:P,definition:i(te),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(we),hardBreakEscape:i(qe),hardBreakTrailing:i(qe),htmlFlow:i(q,a),htmlFlowData:P,htmlText:i(q,a),htmlTextData:P,image:i(le),label:a,link:i(he),listItem:i(je),listItemValue:p,listOrdered:i(me,d),listUnordered:i(me),paragraph:i(Ie),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ae),strong:i(Ue),thematicBreak:i(Ke)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:_e,autolinkProtocol:ve,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:fe,codeFenced:c(m),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:A,codeIndented:c(g),codeText:c(F),codeTextData:A,data:A,definition:c(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(K),hardBreakTrailing:c(K),htmlFlow:c(z),htmlFlowData:A,htmlText:c(B),htmlTextData:A,image:c(Z),label:D,labelText:W,lineEnding:L,link:c(j),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:E,resourceTitleString:H,resource:Q,setextHeading:c(I),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};nT(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(G){let se={type:"root",children:[]};const Y={stack:[se],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:r},ye=[];let $e=-1;for(;++$e<G.length;)if(G[$e][1].type==="listOrdered"||G[$e][1].type==="listUnordered")if(G[$e][0]==="enter")ye.push($e);else{const tt=ye.pop();$e=o(G,tt,$e)}for($e=-1;++$e<G.length;){const tt=t[G[$e][0]];rT.call(tt,G[$e][1].type)&&tt[G[$e][1].type].call(Object.assign({sliceSerialize:G[$e][2].sliceSerialize},Y),G[$e][1])}if(Y.tokenStack.length>0){const tt=Y.tokenStack[Y.tokenStack.length-1];(tt[1]||oT).call(Y,void 0,tt[0])}for(se.position={start:fi(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:fi(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},$e=-1;++$e<t.transforms.length;)se=t.transforms[$e](se)||se;return se}function o(G,se,Y){let ye=se-1,$e=-1,tt=!1,Ve,ct,$t,Wt;for(;++ye<=Y;){const U=G[ye];switch(U[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{U[0]==="enter"?$e++:$e--,Wt=void 0;break}case"lineEndingBlank":{U[0]==="enter"&&(Ve&&!Wt&&!$e&&!$t&&($t=ye),Wt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wt=void 0}if(!$e&&U[0]==="enter"&&U[1].type==="listItemPrefix"||$e===-1&&U[0]==="exit"&&(U[1].type==="listUnordered"||U[1].type==="listOrdered")){if(Ve){let X=ye;for(ct=void 0;X--;){const ze=G[X];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;ct&&(G[ct][1].type="lineEndingBlank",tt=!0),ze[1].type="lineEnding",ct=X}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}$t&&(!ct||$t<ct)&&(Ve._spread=!0),Ve.end=Object.assign({},ct?G[ct][1].start:U[1].end),G.splice(ct||ye,0,["exit",Ve,U[2]]),ye++,Y++}if(U[1].type==="listItemPrefix"){const X={type:"listItem",_spread:!1,start:Object.assign({},U[1].start),end:void 0};Ve=X,G.splice(ye,0,["enter",X,U[2]]),ye++,Y++,$t=void 0,Wt=!0}}}return G[se][1]._spread=tt,Y}function i(G,se){return Y;function Y(ye){s.call(this,G(ye),ye),se&&se.call(this,ye)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(G,se,Y){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([se,Y]),G.position={start:fi(se.start),end:void 0}}function c(G){return se;function se(Y){G&&G.call(this,Y),l.call(this,Y)}}function l(G,se){const Y=this.stack.pop(),ye=this.tokenStack.pop();if(ye)ye[0].type!==G.type&&(se?se.call(this,G,ye[0]):(ye[1]||oT).call(this,G,ye[0]));else throw new Error("Cannot close `"+G.type+"` ("+Pc({start:G.start,end:G.end})+"): it’s not open");Y.position.end=fi(G.end)}function u(){return hy(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(G){if(this.data.expectingFirstListItemValue){const se=this.stack[this.stack.length-2];se.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function f(){const G=this.resume(),se=this.stack[this.stack.length-1];se.lang=G}function h(){const G=this.resume(),se=this.stack[this.stack.length-1];se.meta=G}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G.replace(/(\r?\n|\r)$/g,"")}function v(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase()}function b(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function x(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function w(G){const se=this.stack[this.stack.length-1];if(!se.depth){const Y=this.sliceSerialize(G).length;se.depth=Y}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(G){const se=this.stack[this.stack.length-1];se.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function P(G){const Y=this.stack[this.stack.length-1].children;let ye=Y[Y.length-1];(!ye||ye.type!=="text")&&(ye=pt(),ye.position={start:fi(G.start),end:void 0},Y.push(ye)),this.stack.push(ye)}function A(G){const se=this.stack.pop();se.value+=this.sliceSerialize(G),se.position.end=fi(G.end)}function L(G){const se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Y=se.children[se.children.length-1];Y.position.end=fi(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(se.type)&&(P.call(this,G),A.call(this,G))}function K(){this.data.atHardBreak=!0}function z(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function B(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function F(){const G=this.resume(),se=this.stack[this.stack.length-1];se.value=G}function j(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Z(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const se=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=se,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function W(G){const se=this.sliceSerialize(G),Y=this.stack[this.stack.length-2];Y.label=w6(se),Y.identifier=Gn(se).toLowerCase()}function D(){const G=this.stack[this.stack.length-1],se=this.resume(),Y=this.stack[this.stack.length-1];if(this.data.inReference=!0,Y.type==="link"){const ye=G.children;Y.children=ye}else Y.alt=se}function E(){const G=this.resume(),se=this.stack[this.stack.length-1];se.url=G}function H(){const G=this.resume(),se=this.stack[this.stack.length-1];se.title=G}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(G){const se=this.resume(),Y=this.stack[this.stack.length-1];Y.label=se,Y.identifier=Gn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function pe(G){this.data.characterReferenceType=G.type}function fe(G){const se=this.sliceSerialize(G),Y=this.data.characterReferenceType;let ye;Y?(ye=Fk(se,Y==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ye=my(se);const $e=this.stack.pop();$e.value+=ye,$e.position.end=fi(G.end)}function ve(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url=this.sliceSerialize(G)}function _e(G){A.call(this,G);const se=this.stack[this.stack.length-1];se.url="mailto:"+this.sliceSerialize(G)}function Ce(){return{type:"blockquote",children:[]}}function be(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function we(){return{type:"emphasis",children:[]}}function Ae(){return{type:"heading",depth:0,children:[]}}function qe(){return{type:"break"}}function q(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function he(){return{type:"link",title:null,url:"",children:[]}}function me(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function je(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function Ue(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function Ke(){return{type:"thematicBreak"}}}function fi(e){return{line:e.line,column:e.column,offset:e.offset}}function nT(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?nT(e,n):E6(e,n)}}function E6(e,t){let r;for(r in t)if(rT.call(t,r))switch(r){case"canContainEols":{const n=t[r];n&&e[r].push(...n);break}case"transforms":{const n=t[r];n&&e[r].push(...n);break}case"enter":case"exit":{const n=t[r];n&&Object.assign(e[r],n);break}}}function oT(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pc({start:t.start,end:t.end})+") is still open")}function k6(e){const t=this;t.parser=r;function r(n){return S6(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function T6(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function $6(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
107
107
  `}]}function O6(e,t){const r=t.value?t.value+`
108
108
  `:"",n={};t.lang&&(n.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:n,children:[{type:"text",value:r}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function C6(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function A6(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function I6(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=String(t.identifier).toUpperCase(),o=Wa(n.toLowerCase()),i=e.footnoteOrder.indexOf(n);let a,s=e.footnoteCounts.get(n);s===void 0?(s=0,e.footnoteOrder.push(n),a=e.footnoteOrder.length):a=i+1,s+=1,e.footnoteCounts.set(n,s);const c={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const l={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function R6(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function P6(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function iT(e,t){const r=t.referenceType;let n="]";if(r==="collapsed"?n+="[]":r==="full"&&(n+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+n}];const o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=n:o.push({type:"text",value:n}),o}function N6(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return iT(e,t);const o={src:Wa(n.url||""),alt:t.alt};n.title!==null&&n.title!==void 0&&(o.title=n.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function M6(e,t){const r={src:Wa(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,n),e.applyData(t,n)}function j6(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const n={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,n),e.applyData(t,n)}function D6(e,t){const r=String(t.identifier).toUpperCase(),n=e.definitionById.get(r);if(!n)return iT(e,t);const o={href:Wa(n.url||"")};n.title!==null&&n.title!==void 0&&(o.title=n.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function L6(e,t){const r={href:Wa(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const n={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function F6(e,t,r){const n=e.all(t),o=r?q6(r):aT(t),i={},a=[];if(typeof t.checked=="boolean"){const u=n[0];let d;u&&u.type==="element"&&u.tagName==="p"?d=u:(d={type:"element",tagName:"p",properties:{},children:[]},n.unshift(d)),d.children.length>0&&d.children.unshift({type:"text",value:" "}),d.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<n.length;){const u=n[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
109
109
  `}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const c=n[n.length-1];c&&(o||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
@@ -127,21 +127,21 @@ Check the top-level render call using <`+ke+">.")}return ge}}function Yt(M,ge){{
127
127
  `))+1))}const a="#".repeat(o),s=r.enter("headingAtx"),c=r.enter("phrasing");i.move(a+" ");let l=r.containerPhrasing(e,{before:"# ",after:`
128
128
  `,...i.current()});return/^[\t ]/.test(l)&&(l="&#x"+l.charCodeAt(0).toString(16).toUpperCase()+";"+l.slice(1)),l=l?a+" "+l:a,r.options.closeAtx&&(l+=" "+a),c(),s(),l}zT.peek=V9;function zT(e){return e.value||""}function V9(){return"<"}ZT.peek=H9;function ZT(e,t,r,n){const o=By(r),i=o==='"'?"Quote":"Apostrophe",a=r.enter("image");let s=r.enter("label");const c=r.createTracker(n);let l=c.move("![");return l+=c.move(r.safe(e.alt,{before:l,after:"]",...c.current()})),l+=c.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=r.enter("destinationLiteral"),l+=c.move("<"),l+=c.move(r.safe(e.url,{before:l,after:">",...c.current()})),l+=c.move(">")):(s=r.enter("destinationRaw"),l+=c.move(r.safe(e.url,{before:l,after:e.title?" ":")",...c.current()}))),s(),e.title&&(s=r.enter(`title${i}`),l+=c.move(" "+o),l+=c.move(r.safe(e.title,{before:l,after:o,...c.current()})),l+=c.move(o),s()),l+=c.move(")"),a(),l}function H9(){return"!"}VT.peek=W9;function VT(e,t,r,n){const o=e.referenceType,i=r.enter("imageReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("![");const l=r.safe(e.alt,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=u,i(),o==="full"||!l||l!==d?c+=s.move(d+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function W9(){return"!"}HT.peek=K9;function HT(e,t,r){let n=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(n);)o+="`";for(/[^ \r\n]/.test(n)&&(/^[ \r\n]/.test(n)&&/[ \r\n]$/.test(n)||/^`|`$/.test(n))&&(n=" "+n+" ");++i<r.unsafe.length;){const a=r.unsafe[i],s=r.compilePattern(a);let c;if(a.atBreak)for(;c=s.exec(n);){let l=c.index;n.charCodeAt(l)===10&&n.charCodeAt(l-1)===13&&l--,n=n.slice(0,l)+" "+n.slice(c.index+1)}}return o+n+o}function K9(){return"`"}function WT(e,t){const r=hy(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}KT.peek=G9;function KT(e,t,r,n){const o=By(r),i=o==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let s,c;if(WT(e,r)){const u=r.stack;r.stack=[],s=r.enter("autolink");let d=a.move("<");return d+=a.move(r.containerPhrasing(e,{before:d,after:">",...a.current()})),d+=a.move(">"),s(),r.stack=u,d}s=r.enter("link"),c=r.enter("label");let l=a.move("[");return l+=a.move(r.containerPhrasing(e,{before:l,after:"](",...a.current()})),l+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=r.enter("destinationLiteral"),l+=a.move("<"),l+=a.move(r.safe(e.url,{before:l,after:">",...a.current()})),l+=a.move(">")):(c=r.enter("destinationRaw"),l+=a.move(r.safe(e.url,{before:l,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=r.enter(`title${i}`),l+=a.move(" "+o),l+=a.move(r.safe(e.title,{before:l,after:o,...a.current()})),l+=a.move(o),c()),l+=a.move(")"),s(),l}function G9(e,t,r){return WT(e,r)?"<":"["}GT.peek=J9;function GT(e,t,r,n){const o=e.referenceType,i=r.enter("linkReference");let a=r.enter("label");const s=r.createTracker(n);let c=s.move("[");const l=r.containerPhrasing(e,{before:c,after:"]",...s.current()});c+=s.move(l+"]["),a();const u=r.stack;r.stack=[],a=r.enter("reference");const d=r.safe(r.associationId(e),{before:c,after:"]",...s.current()});return a(),r.stack=u,i(),o==="full"||!l||l!==d?c+=s.move(d+"]"):o==="shortcut"?c=c.slice(0,-1):c+=s.move("]"),c}function J9(){return"["}function Uy(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 Y9(e){const t=Uy(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function X9(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 JT(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 Q9(e,t,r,n){const o=r.enter("list"),i=r.bulletCurrent;let a=e.ordered?X9(r):Uy(r);const s=e.ordered?a==="."?")":".":Y9(r);let c=t&&r.bulletLastUsed?a===r.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(c=!0),JT(r)===a&&u){let d=-1;for(;++d<e.children.length;){const p=e.children[d];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=s),r.bulletCurrent=a;const l=r.containerFlow(e,n);return r.bulletLastUsed=a,r.bulletCurrent=i,o(),l}function e7(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 t7(e,t,r,n){const o=e7(r);let i=r.bulletCurrent||Uy(r);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=r.createTracker(n);s.move(i+" ".repeat(a-i.length)),s.shift(a);const c=r.enter("listItem"),l=r.indentLines(r.containerFlow(e,s.current()),u);return c(),l;function u(d,p,f){return p?(f?"":" ".repeat(a))+d:(f?i:i+" ".repeat(a-i.length))+d}}function r7(e,t,r,n){const o=r.enter("paragraph"),i=r.enter("phrasing"),a=r.containerPhrasing(e,n);return i(),o(),a}const n7=ef(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function o7(e,t,r,n){return(e.children.some(function(a){return n7(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function i7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}YT.peek=a7;function YT(e,t,r,n){const o=i7(r),i=r.enter("strong"),a=r.createTracker(n);let s=a.move(o+o);return s+=a.move(r.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function a7(e,t,r){return r.options.strong||"*"}function s7(e,t,r,n){return r.safe(e.value,n)}function c7(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 l7(e,t,r){const n=(JT(r)+(r.options.ruleSpaces?" ":"")).repeat(c7(r));return r.options.ruleSpaces?n.slice(0,-1):n}const XT={blockquote:R9,break:BT,code:L9,definition:q9,emphasis:UT,hardBreak:BT,heading:Z9,html:zT,image:ZT,imageReference:VT,inlineCode:HT,link:KT,linkReference:GT,list:Q9,listItem:t7,paragraph:r7,root:o7,strong:YT,text:s7,thematicBreak:l7};function u7(){return{enter:{table:d7,tableData:QT,tableHeader:QT,tableRow:p7},exit:{codeText:h7,table:f7,tableData:zy,tableHeader:zy,tableRow:zy}}}function d7(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function f7(e){this.exit(e),this.data.inTable=void 0}function p7(e){this.enter({type:"tableRow",children:[]},e)}function zy(e){this.exit(e)}function QT(e){this.enter({type:"tableCell",children:[]},e)}function h7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,m7));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function m7(e,t){return t==="|"?t:e}function y7(e){const t=e||{},r=t.tableCellPadding,n=t.tablePipeAlign,o=t.stringLength,i=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
129
129
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:c,tableRow:s}};function a(f,h,y,m){return l(u(f,y,m),f.align)}function s(f,h,y,m){const g=d(f,y,m),v=l([g]);return v.slice(0,v.indexOf(`
130
- `))}function c(f,h,y,m){const g=y.enter("tableCell"),v=y.enter("phrasing"),b=y.containerPhrasing(f,{...m,before:i,after:i});return v(),g(),b}function l(f,h){return C9(f,{align:h,alignDelimiters:n,padding:r,stringLength:o})}function u(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("table");for(;++g<m.length;)v[g]=d(m[g],h,y);return b(),v}function d(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("tableRow");for(;++g<m.length;)v[g]=c(m[g],f,h,y);return b(),v}function p(f,h,y){let m=XT.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function g7(){return{exit:{taskListCheckValueChecked:e$,taskListCheckValueUnchecked:e$,paragraph:b7}}}function v7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w7}}}function e$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function w7(e,t,r,n){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);i&&s.move(a);let c=XT.listItem(e,t,r,{...n,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function x7(){return[XZ(),u9(),E9(),u7(),g7()]}function S7(e){return{extensions:[QZ(),d9(),k9(),y7(e),v7()]}}const _7={tokenize:C7,partial:!0},t$={tokenize:A7,partial:!0},r$={tokenize:I7,partial:!0},n$={tokenize:R7,partial:!0},E7={tokenize:P7,partial:!0},o$={tokenize:$7,previous:a$},i$={tokenize:O7,previous:s$},Fo={tokenize:T7,previous:c$},uo={};function k7(){return{text:uo}}let Xi=48;for(;Xi<123;)uo[Xi]=Fo,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);uo[43]=Fo,uo[45]=Fo,uo[46]=Fo,uo[95]=Fo,uo[72]=[Fo,i$],uo[104]=[Fo,i$],uo[87]=[Fo,o$],uo[119]=[Fo,o$];function T7(e,t,r){const n=this;let o,i;return a;function a(d){return!Zy(d)||!c$.call(n,n.previous)||Vy(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Zy(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(E7,u,l)(d):d===45||d===95||Kr(d)?(i=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),o=!0,c}function u(d){return i&&o&&on(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function $7(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!a$.call(n,n.previous)||Vy(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_7,e.attempt(t$,e.attempt(r$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function O7(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&s$.call(n,n.previous)&&!Vy(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(on(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return r(d)}function c(d){return d===47?(e.consume(d),i?l:(i=!0,c)):r(d)}function l(d){return d===null||zd(d)||zt(d)||Yi(d)||Zd(d)?r(d):e.attempt(t$,e.attempt(r$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function C7(e,t,r){let n=0;return o;function o(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),o):a===46&&n===3?(e.consume(a),i):r(a)}function i(a){return a===null?r(a):t(a)}}function A7(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(n$,c,s)(l):l===null||zt(l)||Yi(l)||l!==45&&Zd(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(o=n,n=void 0),e.consume(l),a}function c(l){return o||n||!i?r(l):t(l)}}function I7(e,t){let r=0,n=0;return o;function o(a){return a===40?(r++,e.consume(a),o):a===41&&n<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(n$,t,i)(a):a===null||zt(a)||Yi(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function R7(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||zt(s)||Yi(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||zt(s)||Yi(s)?t(s):n(s)}function i(s){return on(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):on(s)?(e.consume(s),a):r(s)}}function P7(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Kr(i)?r(i):t(i)}}function a$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zt(e)}function s$(e){return!on(e)}function c$(e){return!(e===47||Zy(e))}function Zy(e){return e===43||e===45||e===46||e===95||Kr(e)}function Vy(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const N7={tokenize:U7,partial:!0};function M7(){return{document:{91:{tokenize:F7,continuation:{tokenize:q7},exit:B7}},text:{91:{tokenize:L7},93:{add:"after",tokenize:j7,resolveTo:D7}}}}function j7(e,t,r){const n=this;let o=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;o--;){const c=n.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return r(c);const l=Gn(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?r(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function D7(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function L7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(i>999||d===93&&!a||d===null||d===91||zt(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Gn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return zt(d)||(a=!0),i++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,l):l(d)}}function F7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||zt(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Gn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return zt(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ct(e,f,"gfmFootnoteDefinitionWhitespace")):r(h)}function f(h){return t(h)}}function q7(e,t,r){return e.check(Mc,t,e.attempt(N7,t,r))}function B7(e){e.exit("gfmFootnoteDefinition")}function U7(e,t,r){const n=this;return Ct(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):r(i)}}function z7(e){let r=(e||{}).singleTilde;const n={tokenize:i,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&vn(p,p.length,0,Hd(f,a.slice(l+1,c),s)),vn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),vn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let d=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const y=Vd(l);if(h===126)return d>1?c(h):(a.consume(h),d++,f);if(d<2&&!r)return c(h);const m=a.exit("strikethroughSequenceTemporary"),g=Vd(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class Z7{constructor(){this.map=[]}add(t,r,n){V7(this,t,r,n)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let o=n.pop();for(;o;)t.push(...o),o=n.pop();this.map.length=0}}function V7(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function H7(e,t){let r=!1;const n=[];for(;t<e.length;){const o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function W7(){return{flow:{null:{tokenize:K7,resolveAll:G7}}}}function K7(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let L=n.events.length-1;for(;L>-1;){const B=n.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const W=L>-1?n.events[L][1].type:null,Z=W==="tableHead"||W==="tableRow"?S:c;return Z===S&&n.parser.lazy[n.now().line]?r(A):Z(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),u(A)}function u(A){return A===null?r(A):et(A)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),f):r(A):xt(A)?Ct(e,u,"whitespace")(A):(i+=1,a&&(a=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(A)))}function d(A){return A===null||A===124||zt(A)?(e.exit("data"),u(A)):(e.consume(A),A===92?p:d)}function p(A){return A===92||A===124?(e.consume(A),d):d(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(A):(e.enter("tableDelimiterRow"),a=!1,xt(A)?Ct(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):h(A))}function h(A){return A===45||A===58?m(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),y):w(A)}function y(A){return xt(A)?Ct(e,m,"whitespace")(A):m(A)}function m(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),g):A===45?(i+=1,g(A)):A===null||et(A)?x(A):w(A)}function g(A){return A===45?(e.enter("tableDelimiterFiller"),v(A)):w(A)}function v(A){return A===45?(e.consume(A),v):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(A))}function b(A){return xt(A)?Ct(e,x,"whitespace")(A):x(A)}function x(A){return A===124?h(A):A===null||et(A)?!a||o!==i?w(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):w(A)}function w(A){return r(A)}function S(A){return e.enter("tableRow"),C(A)}function C(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,C,"whitespace")(A):(e.enter("data"),I(A))}function I(A){return A===null||A===124||zt(A)?(e.exit("data"),C(A)):(e.consume(A),A===92?P:I)}function P(A){return A===92||A===124?(e.consume(A),I):I(A)}}function G7(e,t){let r=-1,n=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,d;const p=new Z7;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(l$(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,d=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,c=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=r,i[1]!==0?(a[0]=a[1],d=of(p,t,i,o,r,d)):a[1]!==0&&(d=of(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&l$(p,t,c,l,u),p.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=H7(t.events,r))}return e}function of(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Ga(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=Ga(t.events,r[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const l=Ga(t.events,r[2]),u=Ga(t.events,r[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const p=t.events[r[2]],f=t.events[r[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,y=r[3]-r[2]-1;e.add(h,y,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},Ga(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function l$(e,t,r,n,o){const i=[],a=Ga(t.events,r);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),n.end=Object.assign({},a),i.push(["exit",n,t]),e.add(r+1,0,i)}function Ga(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const J7={tokenize:X7};function Y7(){return{text:{91:J7}}}function X7(e,t,r){const n=this;return o;function o(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return zt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(c)}function s(c){return et(c)?t(c):xt(c)?e.check({tokenize:Q7},t,r)(c):r(c)}}function Q7(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function e8(e){return Lk([k7(),M7(),z7(e),W7(),Y7()])}const t8={};function r8(e){const t=this,r=e||t8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(e8(r)),i.push(x7()),a.push(S7(r))}const Ht={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"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"}}},n8=({text:e})=>{const{message:{blocks:{text:t}}}=Ht,r={h1:({node:n,...o})=>J.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>J.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>J.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>J.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>J.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>J.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>J.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>J.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>J.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>J.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>J.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>J.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>J.jsx("pre",{...o,...t==null?void 0:t.pre})};return J.jsx(zZ,{components:r,remarkPlugins:[r8,YZ],children:e})},o8=(e,t,r=120)=>{$.useEffect(()=>{if(e){e.style.height="0px";const n=t?Math.min(e.scrollHeight,r):20;e.style.height=`${n}px`}},[e,t])};var u$={},Hy={},d$={};Object.defineProperty(d$,"__esModule",{value:!0});var af={},i8=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(af,"__esModule",{value:!0}),af.Emitter=void 0;let a8=class{constructor(){this.listeners={}}on(t,r,n=!1){const o=this.listeners[t];o?n?o.unshift(r):o.push(r):this.listeners[t]=[r]}emit(t,r){return i8(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}};af.Emitter=a8;var f$={};Object.defineProperty(f$,"__esModule",{value:!0});var p$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(p$);var h$={};Object.defineProperty(h$,"__esModule",{value:!0});var m$={};Object.defineProperty(m$,"__esModule",{value:!0});var y$={};Object.defineProperty(y$,"__esModule",{value:!0});var g$={};Object.defineProperty(g$,"__esModule",{value:!0}),function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(d$,e),r(af,e),r(f$,e),r(p$,e),r(h$,e),r(m$,e),r(y$,e),r(g$,e)}(Hy);var sf={},v$={},Wy={exports:{}},cf={},Ky={},lf={},Fc={},Ja={},Qi={},Ya={},Xa={},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.ERROR_PACKET=fo.PACKET_TYPES_REVERSE=fo.PACKET_TYPES=void 0;const po=Object.create(null);fo.PACKET_TYPES=po,po.open="0",po.close="1",po.ping="2",po.pong="3",po.message="4",po.upgrade="5",po.noop="6";const b$=Object.create(null);fo.PACKET_TYPES_REVERSE=b$,Object.keys(po).forEach(e=>{b$[po[e]]=e});const s8={type:"error",data:"parser error"};fo.ERROR_PACKET=s8,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.encodePacket=Xa.encodePacketToBinary=void 0;const c8=fo,w$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x$=typeof ArrayBuffer=="function",S$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_$=({type:e,data:t},r,n)=>w$&&t instanceof Blob?r?n(t):E$(t,n):x$&&(t instanceof ArrayBuffer||S$(t))?r?n(t):E$(new Blob([t]),n):n(c8.PACKET_TYPES[e]+(t||""));Xa.encodePacket=_$;const E$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function k$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gy;function l8(e,t){if(w$&&e.data instanceof Blob)return e.data.arrayBuffer().then(k$).then(t);if(x$&&(e.data instanceof ArrayBuffer||S$(e.data)))return t(k$(e.data));_$(e,!1,r=>{Gy||(Gy=new TextEncoder),t(Gy.encode(r))})}Xa.encodePacketToBinary=l8;var uf={},Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.decode=Qa.encode=void 0;const es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<es.length;e++)qc[es.charCodeAt(e)]=e;const u8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=es[t[r]>>2],o+=es[(t[r]&3)<<4|t[r+1]>>4],o+=es[(t[r+1]&15)<<2|t[r+2]>>6],o+=es[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};Qa.encode=u8;const d8=e=>{let t=e.length*.75,r=e.length,n,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(n=0;n<r;n+=4)i=qc[e.charCodeAt(n)],a=qc[e.charCodeAt(n+1)],s=qc[e.charCodeAt(n+2)],c=qc[e.charCodeAt(n+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};Qa.decode=d8,Object.defineProperty(uf,"__esModule",{value:!0}),uf.decodePacket=void 0;const df=fo,f8=Qa,p8=typeof ArrayBuffer=="function",h8=(e,t)=>{if(typeof e!="string")return{type:"message",data:T$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:m8(e.substring(1),t)}:df.PACKET_TYPES_REVERSE[r]?e.length>1?{type:df.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:df.PACKET_TYPES_REVERSE[r]}:df.ERROR_PACKET};uf.decodePacket=h8;const m8=(e,t)=>{if(p8){const r=(0,f8.decode)(e);return T$(r,t)}else return{base64:!0,data:e}},T$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=Xa;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=uf;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=fo,o=String.fromCharCode(30),i=(p,f)=>{const h=p.length,y=new Array(h);let m=0;p.forEach((g,v)=>{(0,t.encodePacket)(g,!1,b=>{y[v]=b,++m===h&&f(y.join(o))})})};e.encodePayload=i;const a=(p,f)=>{const h=p.split(o),y=[];for(let m=0;m<h.length;m++){const g=(0,r.decodePacket)(h[m],f);if(y.push(g),g.type==="error")break}return y};e.decodePayload=a;function s(){return new TransformStream({transform(p,f){(0,t.encodePacketToBinary)(p,h=>{const y=h.length;let m;if(y<126)m=new Uint8Array(1),new DataView(m.buffer).setUint8(0,y);else if(y<65536){m=new Uint8Array(3);const g=new DataView(m.buffer);g.setUint8(0,126),g.setUint16(1,y)}else{m=new Uint8Array(9);const g=new DataView(m.buffer);g.setUint8(0,127),g.setBigUint64(1,BigInt(y))}p.data&&typeof p.data!="string"&&(m[0]|=128),f.enqueue(m),f.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((f,h)=>f+h.length,0)}function u(p,f){if(p[0].length===f)return p.shift();const h=new Uint8Array(f);let y=0;for(let m=0;m<f;m++)h[m]=p[0][y++],y===p[0].length&&(p.shift(),y=0);return p.length&&y<p[0].length&&(p[0]=p[0].slice(y)),h}function d(p,f){c||(c=new TextDecoder);const h=[];let y=0,m=-1,g=!1;return new TransformStream({transform(v,b){for(h.push(v);;){if(y===0){if(l(h)<1)break;const x=u(h,1);g=(x[0]&128)===128,m=x[0]&127,m<126?y=3:m===126?y=1:y=2}else if(y===1){if(l(h)<2)break;const x=u(h,2);m=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(l(h)<8)break;const x=u(h,8),w=new DataView(x.buffer,x.byteOffset,x.length),S=w.getUint32(0);if(S>Math.pow(2,53-32)-1){b.enqueue(n.ERROR_PACKET);break}m=S*Math.pow(2,32)+w.getUint32(4),y=3}else{if(l(h)<m)break;const x=u(h,m);b.enqueue((0,r.decodePacket)(g?x:c.decode(x),f)),y=0}if(m===0||m>p){b.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4})(Ya);function an(e){if(e)return y8(e)}function y8(e){for(var t in an.prototype)e[t]=an.prototype[t];return e}an.prototype.on=an.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},an.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},an.prototype.off=an.prototype.removeListener=an.prototype.removeAllListeners=an.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},an.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},an.prototype.emitReserved=an.prototype.emit,an.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},an.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ts=Ih(Object.freeze(Object.defineProperty({__proto__:null,Emitter:an},Symbol.toStringTag,{value:"Module"})));var Nn={},ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.globalThisShim=void 0,ea.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const pi=ea;function g8(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Nn.pick=g8;const v8=pi.globalThisShim.setTimeout,b8=pi.globalThisShim.clearTimeout;function w8(e,t){t.useNativeTimers?(e.setTimeoutFn=v8.bind(pi.globalThisShim),e.clearTimeoutFn=b8.bind(pi.globalThisShim)):(e.setTimeoutFn=pi.globalThisShim.setTimeout.bind(pi.globalThisShim),e.clearTimeoutFn=pi.globalThisShim.clearTimeout.bind(pi.globalThisShim))}Nn.installTimerFunctions=w8;const x8=1.33;function S8(e){return typeof e=="string"?_8(e):Math.ceil((e.byteLength||e.size)*x8)}Nn.byteLength=S8;function _8(e){let t=0,r=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}var Jy={exports:{}},Yy,$$;function E8(){if($$)return Yy;$$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;Yy=function(u,d){d=d||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return d.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var p=parseFloat(d[1]),f=(d[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*r;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var d=Math.abs(u);return d>=n?Math.round(u/n)+"d":d>=r?Math.round(u/r)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var d=Math.abs(u);return d>=n?l(u,d,n,"day"):d>=r?l(u,d,r,"hour"):d>=t?l(u,d,t,"minute"):d>=e?l(u,d,e,"second"):u+" ms"}function l(u,d,p,f){var h=d>=p*1.5;return Math.round(u/p)+" "+f+(h?"s":"")}return Yy}function k8(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=E8(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let p=0;p<u.length;p++)d=(d<<5)-d+u.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,p=null,f,h;function y(...m){if(!y.enabled)return;const g=y,v=Number(new Date),b=v-(d||v);g.diff=b,g.prev=d,g.curr=v,d=v,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,C)=>{if(S==="%%")return"%";x++;const I=r.formatters[C];if(typeof I=="function"){const P=m[x];S=I.call(g,P),m.splice(x,1),x--}return S}),r.formatArgs.call(g,m),(g.log||r.log).apply(g,m)}return y.namespace=u,y.useColors=r.useColors(),y.color=r.selectColor(u),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,h=r.enabled(u)),h),set:m=>{p=m}}),typeof r.init=="function"&&r.init(y),y}function n(u,d){const p=r(this.namespace+(typeof d>"u"?":":d)+u);return p.log=this.log,p}function o(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d;const p=(typeof u=="string"?u:"").split(/[\s,]+/),f=p.length;for(d=0;d<f;d++)p[d]&&(u=p[d].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...r.names.map(s),...r.skips.map(s).map(d=>"-"+d)].join(",");return r.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(u))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var T8=k8;(function(e,t){t.formatArgs=n,t.save=o,t.load=i,t.useColors=r,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,d=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),c.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=T8(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Jy,Jy.exports);var ho=Jy.exports,ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.decode=ta.encode=void 0;function $8(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ta.encode=$8;function O8(e){let t={},r=e.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}ta.decode=O8;var C8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.Transport=void 0;const A8=Ya,I8=ts,R8=Nn,P8=C8(ho),N8=ta,M8=(0,P8.default)("engine.io-client:transport");class j8 extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class D8 extends I8.Emitter{constructor(t){super(),this.writable=!1,(0,R8.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new j8(t,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):M8("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,A8.decodePacket)(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=(0,N8.encode)(t);return r.length?"?"+r:""}}Qi.Transport=D8;var qo={};Object.defineProperty(qo,"__esModule",{value:!0}),qo.yeast=qo.decode=qo.encode=void 0;const O$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ff=64,C$={};let A$=0,hi=0,I$;function Xy(e){let t="";do t=O$[e%ff]+t,e=Math.floor(e/ff);while(e>0);return t}qo.encode=Xy;function L8(e){let t=0;for(hi=0;hi<e.length;hi++)t=t*ff+C$[e.charAt(hi)];return t}qo.decode=L8;function F8(){const e=Xy(+new Date);return e!==I$?(A$=0,I$=e):e+"."+Xy(A$++)}for(qo.yeast=F8;hi<ff;hi++)C$[O$[hi]]=hi;var rs={},pf={};Object.defineProperty(pf,"__esModule",{value:!0}),pf.hasCORS=void 0;let R$=!1;try{R$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}pf.hasCORS=R$,Object.defineProperty(rs,"__esModule",{value:!0}),rs.createCookieJar=rs.XHR=void 0;const q8=pf,B8=ea;function U8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||q8.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new B8.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}rs.XHR=U8;function z8(){}rs.createCookieJar=z8;var Z8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.Request=Ja.Polling=void 0;const V8=Qi,H8=Z8(ho),W8=qo,P$=Ya,Qy=rs,K8=ts,N$=Nn,G8=ea,ln=(0,H8.default)("engine.io-client:polling");function J8(){}const Y8=function(){return new Qy.XHR({xdomain:!1}).responseType!=null}();class X8 extends V8.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const r=t&&t.forceBase64;this.supportsBinary=Y8&&!r,this.opts.withCredentials&&(this.cookieJar=(0,Qy.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{ln("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(ln("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){ln("pre-pause polling complete"),--n||r()})),this.writable||(ln("we are currently writing - waiting to pause"),n++,this.once("drain",function(){ln("pre-pause writing complete"),--n||r()}))}else r()}poll(){ln("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){ln("polling got data %s",t);const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};(0,P$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():ln('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{ln("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(ln("transport open - closing"),t()):(ln("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,P$.encodePayload)(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=(0,W8.yeast)()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ra(this.uri(),t)}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){ln("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}Ja.Polling=X8;let ra=class Ah extends K8.Emitter{constructor(t,r){super(),(0,N$.installTimerFunctions)(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=(0,N$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Qy.XHR(r);try{ln("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},ln("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=J8,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ah.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(Ja.Request=ra,ra.requestsCount=0,ra.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",M$);else if(typeof addEventListener=="function"){const e="onpagehide"in G8.globalThisShim?"pagehide":"unload";addEventListener(e,M$,!1)}}function M$(){for(let e in ra.requests)ra.requests.hasOwnProperty(e)&&ra.requests[e].abort()}var hf={},bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.defaultBinaryType=bn.usingBrowserWebSocket=bn.WebSocket=bn.nextTick=void 0;const j$=ea;bn.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),bn.WebSocket=j$.globalThisShim.WebSocket||j$.globalThisShim.MozWebSocket,bn.usingBrowserWebSocket=!0,bn.defaultBinaryType="arraybuffer";var Q8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.WS=void 0;const eV=Qi,tV=qo,rV=Nn,mi=bn,nV=Q8(ho),oV=Ya,iV=(0,nV.default)("engine.io-client:websocket"),D$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aV extends eV.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,n=D$?{}:(0,rV.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=mi.usingBrowserWebSocket&&!D$?r?new mi.WebSocket(t,r):new mi.WebSocket(t):new mi.WebSocket(t,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;(0,oV.encodePacket)(n,this.supportsBinary,i=>{const a={};mi.usingBrowserWebSocket||(n.options&&(a.compress=n.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{mi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{iV("websocket closed before onclose event")}o&&(0,mi.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=(0,tV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!mi.WebSocket}}hf.WS=aV;var mf={},sV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mf,"__esModule",{value:!0}),mf.WT=void 0;const cV=Qi,lV=bn,L$=Ya,Bc=(0,sV(ho).default)("engine.io-client:webtransport");class uV extends cV.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Bc("transport closed gracefully"),this.onClose()}).catch(t=>{Bc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,L$.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,L$.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Bc("session is closed");return}Bc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Bc("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;this.writer.write(n).then(()=>{o&&(0,lV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}mf.WT=uV,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.transports=void 0;const dV=Ja,fV=hf,pV=mf;Fc.transports={websocket:fV.WS,webtransport:pV.WT,polling:dV.Polling};var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.parse=void 0;const hV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mV=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yV(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=hV.exec(e||""),i={},a=14;for(;a--;)i[mV[a]]=o[a]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=gV(i,i.path),i.queryKey=vV(i,i.query),i}Uc.parse=yV;function gV(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function vV(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var bV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0}),lf.Socket=void 0;const wV=Fc,F$=Nn,xV=ta,q$=Uc,SV=bV(ho),_V=ts,B$=Ya,EV=bn,tr=(0,SV.default)("engine.io-client:socket");let U$=class Zs extends _V.Emitter{constructor(t,r={}){super(),this.binaryType=EV.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,q$.parse)(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=(0,q$.parse)(r.host).host),(0,F$.installTimerFunctions)(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,xV.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){tr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=B$.protocol,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return tr("options: %j",n),new wV.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&Zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(r){tr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){tr("setting transport %s",t.name),this.transport&&(tr("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",r=>this.onClose("transport close",r))}probe(t){tr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;Zs.priorWebsocketSuccess=!1;const o=()=>{n||(tr('probe transport "%s" opened',t),r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(tr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Zs.priorWebsocketSuccess=r.name==="websocket",tr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(tr("changing transport and sending upgrade packet"),u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{tr('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}const a=d=>{const p=new Error("probe error: "+d);p.transport=r.name,i(),tr('probe transport "%s" failed because of error: %s',t,d),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(d){r&&d.name!==r.name&&(tr('"%s" works - aborting "%s"',d.name,r.name),i())}const u=()=>{r.removeListener("open",o),r.removeListener("error",a),r.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};r.once("open",o),r.once("error",a),r.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(tr("socket open"),this.readyState="open",Zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){tr("starting upgrade probes");let t=0;const r=this.upgrades.length;for(;t<r;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(tr('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const r=new Error("server error");r.code=t.data,this.onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else tr('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();tr("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=(0,F$.byteLength)(o)),n>0&&r>this.maxPayload)return tr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return tr("payload size is %d (max: %d)",r,this.maxPayload),this.writeBuffer}write(t,r,n){return this.sendPacket("message",t,r,n),this}send(t,r,n){return this.sendPacket("message",t,r,n),this}sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),tr("socket closing - telling transport to close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){tr("socket error %j",t),Zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(tr('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let n=0;const o=t.length;for(;n<o;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}};lf.Socket=U$,U$.protocol=B$.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=lf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=Qi;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Fc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Uc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=bn;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Ky);var kV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0}),cf.url=void 0;const TV=Ky,z$=kV(ho).default("socket.io-client:url");function $V(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(z$("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),z$("parse %s",e),n=TV.parse(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}cf.url=$V;var yf={},zc={},gf={},ns={},na={};Object.defineProperty(na,"__esModule",{value:!0}),na.hasBinary=na.isBinary=void 0;const OV=typeof ArrayBuffer=="function",CV=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Z$=Object.prototype.toString,AV=typeof Blob=="function"||typeof Blob<"u"&&Z$.call(Blob)==="[object BlobConstructor]",IV=typeof File=="function"||typeof File<"u"&&Z$.call(File)==="[object FileConstructor]";function V$(e){return OV&&(e instanceof ArrayBuffer||CV(e))||AV&&e instanceof Blob||IV&&e instanceof File}na.isBinary=V$;function vf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(vf(e[r]))return!0;return!1}if(V$(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vf(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&vf(e[r]))return!0;return!1}na.hasBinary=vf,Object.defineProperty(ns,"__esModule",{value:!0}),ns.reconstructPacket=ns.deconstructPacket=void 0;const RV=na;function PV(e){const t=[],r=e.data,n=e;return n.data=eg(r,t),n.attachments=t.length,{packet:n,buffers:t}}ns.deconstructPacket=PV;function eg(e,t){if(!e)return e;if((0,RV.isBinary)(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=eg(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=eg(e[n],t));return r}return e}function NV(e,t){return e.data=tg(e.data,t),delete e.attachments,e}ns.reconstructPacket=NV;function tg(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=tg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=tg(e[r],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=ts,r=ns,n=na,i=(0,ho.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(f){this.replacer=f}encode(f){return i("encoding packet %j",f),(f.type===s.EVENT||f.type===s.ACK)&&(0,n.hasBinary)(f)?this.encodeAsBinary({type:f.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let h=""+f.type;return(f.type===s.BINARY_EVENT||f.type===s.BINARY_ACK)&&(h+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(h+=f.nsp+","),f.id!=null&&(h+=f.id),f.data!=null&&(h+=JSON.stringify(f.data,this.replacer)),i("encoded %j as %s",f,h),h}encodeAsBinary(f){const h=(0,r.deconstructPacket)(f),y=this.encodeAsString(h.packet),m=h.buffers;return m.unshift(y),m}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(f){super(),this.reviver=f}add(f){let h;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(f);const y=h.type===s.BINARY_EVENT;y||h.type===s.BINARY_ACK?(h.type=y?s.EVENT:s.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,n.isBinary)(f)||f.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(f),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let h=0;const y={type:Number(f.charAt(0))};if(s[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===s.BINARY_EVENT||y.type===s.BINARY_ACK){const g=h+1;for(;f.charAt(++h)!=="-"&&h!=f.length;);const v=f.substring(g,h);if(v!=Number(v)||f.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(f.charAt(h+1)==="/"){const g=h+1;for(;++h&&!(f.charAt(h)===","||h===f.length););y.nsp=f.substring(g,h)}else y.nsp="/";const m=f.charAt(h+1);if(m!==""&&Number(m)==m){const g=h+1;for(;++h;){const v=f.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===f.length)break}y.id=Number(f.substring(g,h+1))}if(f.charAt(++h)){const g=this.tryParse(f.substr(h));if(u.isPayloadValid(y.type,g))y.data=g;else throw new Error("invalid payload")}return i("decoded %s as %j",f,y),y}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,h){switch(f){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class d{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const h=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(gf);var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.on=void 0;function MV(e,t,r){return e.on(t,r),function(){e.off(t,r)}}Zc.on=MV;var jV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.Socket=void 0;const Jn=gf,bf=Zc,DV=ts,br=jV(ho).default("socket.io-client:socket"),LV=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class FV extends DV.Emitter{constructor(t,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[bf.on(t,"open",this.onopen.bind(this)),bf.on(t,"packet",this.onpacket.bind(this)),bf.on(t,"error",this.onerror.bind(this)),bf.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){if(LV.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:Jn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;br("emitting packet with ack id %d",a);const s=r.pop();this._registerAckCallback(a,s),n.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?br("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(t,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(br("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));br("event with ack id %d has timed out after %d ms",t,o),r.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),r.apply(this,[null,...a])}}emitWithAck(t,...r){const n=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{r.push((a,s)=>n?a?i(a):o(s):o(a)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(br("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(br("packet [%d] was successfully sent",n.id),this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(br("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){br("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,br("sending packet [%d] (try n°%d)",r.id,r.tryCount),this.flags=r.flags,this.emit.apply(this,r.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){br("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Jn.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){br("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Jn.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Jn.PacketType.EVENT:case Jn.PacketType.BINARY_EVENT:this.onevent(t);break;case Jn.PacketType.ACK:case Jn.PacketType.BINARY_ACK:this.onack(t);break;case Jn.PacketType.DISCONNECT:this.ondisconnect();break;case Jn.PacketType.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];br("emitting event %j",r),t.id!=null&&(br("attaching ack callback to event"),r.push(this.ack(t.id))),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...o){n||(n=!0,br("sending ack %j",o),r.packet({type:Jn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(br("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):br("bad ack %s",t.id)}onconnect(t,r){br("socket connected with id %s",t),this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){br("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(br("performing disconnect (%s)",this.nsp),this.packet({type:Jn.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}zc.Socket=FV;var wf={};Object.defineProperty(wf,"__esModule",{value:!0}),wf.Backoff=void 0;function os(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wf.Backoff=os,os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0},os.prototype.reset=function(){this.attempts=0},os.prototype.setMin=function(e){this.ms=e},os.prototype.setMax=function(e){this.max=e},os.prototype.setJitter=function(e){this.jitter=e};var qV=We&&We.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),BV=We&&We.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),UV=We&&We.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&qV(t,e,r);return BV(t,e),t},zV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0}),yf.Manager=void 0;const rg=Ky,ZV=zc,VV=UV(gf),oa=Zc,HV=wf,WV=ts,Lr=zV(ho).default("socket.io-client:manager");class KV extends WV.Emitter{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,rg.installTimerFunctions(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new HV.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||VV;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(Lr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Lr("opening %s",this.uri),this.engine=new rg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=oa.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{Lr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=oa.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;Lr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Lr("connect attempt timed out after %d",s),o(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Lr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(oa.on(t,"ping",this.onping.bind(this)),oa.on(t,"data",this.ondata.bind(this)),oa.on(t,"error",this.onerror.bind(this)),oa.on(t,"close",this.onclose.bind(this)),oa.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){rg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Lr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new ZV.Socket(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active){Lr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){Lr("writing packet %j",t);const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){Lr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Lr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){Lr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Lr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();Lr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(Lr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Lr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Lr("reconnect success"),t.onreconnect())}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}yf.Manager=KV,function(e,t){var r=We&&We.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cf,o=yf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=zc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(ho).default("socket.io-client"),c={};function l(d,p){typeof d=="object"&&(p=d,d=void 0),p=p||{};const f=n.url(d,p.path||"/socket.io"),h=f.source,y=f.id,m=f.path,g=c[y]&&m in c[y].nsps,v=p.forceNew||p["force new connection"]||p.multiplex===!1||g;let b;return v?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[y]||(s("new io instance for %s",h),c[y]=new o.Manager(h,p)),b=c[y]),f.query&&!p.query&&(p.query=f.queryKey),b.socket(f.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=gf;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Wy,Wy.exports);var GV=Wy.exports;(function(e){var t=We&&We.__awaiter||function(c,l,u,d){function p(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function y(v){try{g(d.next(v))}catch(b){h(b)}}function m(v){try{g(d.throw(v))}catch(b){h(b)}}function g(v){v.done?f(v.value):p(v.value).then(y,m)}g((d=d.apply(c,l||[])).next())})},r=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const n=Hy,o=r(GV);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((d,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const f=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(f),d(h)})),this.socket.on("connect_error",h=>{var y;(y=this.socket)===null||y===void 0||y.close(),clearTimeout(f),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var y;this.pending[h.request]&&(!((y=h.data)===null||y===void 0)&&y.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var d;return t(this,void 0,void 0,function*(){if(!(!((d=this.socket)===null||d===void 0)&&d.connected))throw new Error("Client is disconnected");const p=this.random(32),f=new Promise((h,y)=>{this.pending[p]={resolve:h,reject:y}});return this.socket.send({request:p,type:l,data:u}),f})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let d="";for(let p=0;p<l;p++)d+=u.charAt(Math.floor(Math.random()*u.length));return d}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends n.Emitter{}e.SocketComEmitter=s})(v$);var xf={},JV=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(xf,"__esModule",{value:!0}),xf.SocketEmitter=void 0;class YV{constructor(){this.listeners={}}on(t,r){const n=this.listeners[t];n?n.push(r):this.listeners[t]=[r]}removeListeners(t){this.listeners[t]=[]}emit(t,r){return JV(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}}xf.SocketEmitter=YV;var un=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(sf,"__esModule",{value:!0}),sf.MessagingSocket=void 0;const H$=v$,XV=xf;class QV extends XV.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new H$.SocketCom(t.url),this.com.events.on(H$.SocketComEvents.Message,r=>un(this,void 0,void 0,function*(){r.type==="message.new"&&(yield this.emit("message",r.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,r){return un(this,void 0,void 0,function*(){const n=r?{userData:JSON.stringify(r)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},n);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return un(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return un(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return un(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(r.id)),r})}startConversation(t){return un(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return un(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.delete",{id:t||this._conversationId});return r&&(yield this.switchConversation(void 0)),r})}listConversations(t){return un(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return un(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return un(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}sf.MessagingSocket=QV,function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Hy,e),r(sf,e)}(u$);class eH{constructor(t){k(this,"socket");k(this,"clientId");k(this,"apiUrl");k(this,"userId");k(this,"conversationId");k(this,"userToken");k(this,"connected",!1);k(this,"emitter");k(this,"on");k(this,"mode","messaging");this.socket=new u$.MessagingSocket(t),this.emitter=new Gm,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",r=>{const n=r.payload;if(n.type==="trigger")switch(n.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",n.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",n.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",n.trigger.event);break}else{const o=Ed.parse(n),{payload:i,disableInput:a}=zm(o);this.emitter.emit("message",{...r,payload:i,disableInput:a})}}),this.socket.on("conversation",r=>{this.emitter.emit("conversation",r)})}async connect(t,r){if(this.connected)return;this.connected=!0;const n=await this.socket.connect(t,r).catch(o=>{throw this.connected=!1,o});return this.userId=n.userId,this.userToken=n.userToken,n}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(n=>n.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(n=>{const o=Ed.parse(n.payload),{payload:i,disableInput:a}=zm(o);return{...n,payload:i,disableInput:a}})}}function W$(e,t){return function(){return e.apply(t,arguments)}}const{toString:K$}=Object.prototype,{getPrototypeOf:ng}=Object,og=(e=>t=>{const r=K$.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bo=e=>(e=e.toLowerCase(),t=>og(t)===e),Sf=e=>t=>typeof t===e,{isArray:is}=Array,Vc=Sf("undefined");function tH(e){return e!==null&&!Vc(e)&&e.constructor!==null&&!Vc(e.constructor)&&ia(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const G$=Bo("ArrayBuffer");function rH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G$(e.buffer),t}const nH=Sf("string"),ia=Sf("function"),J$=Sf("number"),ig=e=>e!==null&&typeof e=="object",oH=e=>e===!0||e===!1,_f=e=>{if(og(e)!=="object")return!1;const t=ng(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},iH=Bo("Date"),aH=Bo("File"),sH=Bo("Blob"),cH=Bo("FileList"),lH=e=>ig(e)&&ia(e.pipe),uH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||K$.call(e)===t||ia(e.toString)&&e.toString()===t)},dH=Bo("URLSearchParams"),fH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),is(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function Y$(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const X$=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Q$=e=>!Vc(e)&&e!==X$;function ag(){const{caseless:e}=Q$(this)&&this||{},t={},r=(n,o)=>{const i=e&&Y$(t,o)||o;_f(t[i])&&_f(n)?t[i]=ag(t[i],n):_f(n)?t[i]=ag({},n):is(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Hc(arguments[n],r);return t}const pH=(e,t,r,{allOwnKeys:n}={})=>(Hc(t,(o,i)=>{r&&ia(o)?e[i]=W$(o,r):e[i]=o},{allOwnKeys:n}),e),hH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mH=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yH=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&ng(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},gH=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},vH=e=>{if(!e)return null;if(is(e))return e;let t=e.length;if(!J$(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},bH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ng(Uint8Array)),wH=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},xH=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},SH=Bo("HTMLFormElement"),_H=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),eO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),EH=Bo("RegExp"),tO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hc(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},ue={isArray:is,isArrayBuffer:G$,isBuffer:tH,isFormData:uH,isArrayBufferView:rH,isString:nH,isNumber:J$,isBoolean:oH,isObject:ig,isPlainObject:_f,isUndefined:Vc,isDate:iH,isFile:aH,isBlob:sH,isRegExp:EH,isFunction:ia,isStream:lH,isURLSearchParams:dH,isTypedArray:bH,isFileList:cH,forEach:Hc,merge:ag,extend:pH,trim:fH,stripBOM:hH,inherits:mH,toFlatObject:yH,kindOf:og,kindOfTest:Bo,endsWith:gH,toArray:vH,forEachEntry:wH,matchAll:xH,isHTMLForm:SH,hasOwnProperty:eO,hasOwnProp:eO,reduceDescriptors:tO,freezeMethods:e=>{tO(e,(t,r)=>{if(ia(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ia(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return is(e)?n(e):n(String(e).split(t)),r},toCamelCase:_H,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Y$,global:X$,isContextDefined:Q$,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(ig(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=is(n)?[]:{};return Hc(n,(a,s)=>{const c=r(a,o+1);!Vc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)}};function It(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ue.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:ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const rO=It.prototype,nO={};["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=>{nO[e]={value:e}}),Object.defineProperties(It,nO),Object.defineProperty(rO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(rO);return ue.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),It.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var kH=typeof self=="object"?self.FormData:window.FormData;const TH=St(kH);function sg(e){return ue.isPlainObject(e)||ue.isArray(e)}function oO(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function iO(e,t,r){return e?e.concat(t).map(function(o,i){return o=oO(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function $H(e){return ue.isArray(e)&&!e.some(sg)}const OH=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function CH(e){return e&&ue.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Ef(e,t,r){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new(TH||FormData),r=ue.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!ue.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&CH(t);if(!ue.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(ue.isDate(h))return h.toISOString();if(!c&&ue.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(h)||ue.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(ue.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(ue.isArray(h)&&$H(h)||ue.isFileList(h)||ue.endsWith(y,"[]")&&(g=ue.toArray(h)))return y=oO(y),g.forEach(function(b,x){!(ue.isUndefined(b)||b===null)&&t.append(a===!0?iO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return sg(h)?!0:(t.append(iO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(OH,{defaultVisitor:u,convertValue:l,isVisitable:sg});function f(h,y){if(!ue.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),ue.forEach(h,function(g,v){(!(ue.isUndefined(g)||g===null)&&o.call(t,g,ue.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return f(e),t}function aO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cg(e,t){this._pairs=[],e&&Ef(e,this,t)}const sO=cg.prototype;sO.append=function(t,r){this._pairs.push([t,r])},sO.toString=function(t){const r=t?function(n){return t.call(this,n,aO)}:aO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function AH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function cO(e,t,r){if(!t)return e;const n=r&&r.encode||AH,o=r&&r.serialize;let i;if(o?i=o(t,r):i=ue.isURLSearchParams(t)?t.toString():new cg(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class IH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lO=IH,uO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RH=typeof URLSearchParams<"u"?URLSearchParams:cg,PH=FormData,NH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),MH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mo={isBrowser:!0,classes:{URLSearchParams:RH,FormData:PH,Blob},isStandardBrowserEnv:NH,isStandardBrowserWebWorkerEnv:MH,protocols:["http","https","file","blob","url","data"]};function jH(e,t){return Ef(e,new mo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return mo.isNode&&ue.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function DH(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LH(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function dO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&ue.isArray(o)?o.length:a,c?(ue.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!ue.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&ue.isArray(o[a])&&(o[a]=LH(o[a])),!s)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const r={};return ue.forEachEntry(e,(n,o)=>{t(DH(n),o,r,0)}),r}return null}const FH={"Content-Type":void 0};function qH(e,t,r){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const kf={transitional:uO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return o&&o?JSON.stringify(dO(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jH(t,this.formSerializer).toString();if((s=ue.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ef(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),qH(t)):t}],transformResponse:[function(t){const r=this.transitional||kf.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ue.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)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:mo.classes.FormData,Blob:mo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ue.forEach(["delete","get","head"],function(t){kf.headers[t]={}}),ue.forEach(["post","put","patch"],function(t){kf.headers[t]=ue.merge(FH)});const lg=kf,BH=ue.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"]),UH=e=>{const t={};let r,n,o;return e&&e.split(`
130
+ `))}function c(f,h,y,m){const g=y.enter("tableCell"),v=y.enter("phrasing"),b=y.containerPhrasing(f,{...m,before:i,after:i});return v(),g(),b}function l(f,h){return C9(f,{align:h,alignDelimiters:n,padding:r,stringLength:o})}function u(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("table");for(;++g<m.length;)v[g]=d(m[g],h,y);return b(),v}function d(f,h,y){const m=f.children;let g=-1;const v=[],b=h.enter("tableRow");for(;++g<m.length;)v[g]=c(m[g],f,h,y);return b(),v}function p(f,h,y){let m=XT.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function g7(){return{exit:{taskListCheckValueChecked:e$,taskListCheckValueUnchecked:e$,paragraph:b7}}}function v7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:w7}}}function e$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function b7(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const n=r.children[0];if(n&&n.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===r&&(n.value=n.value.slice(1),n.value.length===0?r.children.shift():r.position&&n.position&&typeof n.position.start.offset=="number"&&(n.position.start.column++,n.position.start.offset++,r.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function w7(e,t,r,n){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=r.createTracker(n);i&&s.move(a);let c=XT.listItem(e,t,r,{...n,...s.current()});return i&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(u){return u+a}}function x7(){return[XZ(),u9(),E9(),u7(),g7()]}function S7(e){return{extensions:[QZ(),d9(),k9(),y7(e),v7()]}}const _7={tokenize:C7,partial:!0},t$={tokenize:A7,partial:!0},r$={tokenize:I7,partial:!0},n$={tokenize:R7,partial:!0},E7={tokenize:P7,partial:!0},o$={tokenize:$7,previous:a$},i$={tokenize:O7,previous:s$},Fo={tokenize:T7,previous:c$},uo={};function k7(){return{text:uo}}let Xi=48;for(;Xi<123;)uo[Xi]=Fo,Xi++,Xi===58?Xi=65:Xi===91&&(Xi=97);uo[43]=Fo,uo[45]=Fo,uo[46]=Fo,uo[95]=Fo,uo[72]=[Fo,i$],uo[104]=[Fo,i$],uo[87]=[Fo,o$],uo[119]=[Fo,o$];function T7(e,t,r){const n=this;let o,i;return a;function a(d){return!Zy(d)||!c$.call(n,n.previous)||Vy(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return Zy(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(E7,u,l)(d):d===45||d===95||Kr(d)?(i=!0,e.consume(d),c):u(d)}function l(d){return e.consume(d),o=!0,c}function u(d){return i&&o&&on(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function $7(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!a$.call(n,n.previous)||Vy(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_7,e.attempt(t$,e.attempt(r$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function O7(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&s$.call(n,n.previous)&&!Vy(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(on(d)&&o.length<5)return o+=String.fromCodePoint(d),e.consume(d),s;if(d===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(d),c}return r(d)}function c(d){return d===47?(e.consume(d),i?l:(i=!0,c)):r(d)}function l(d){return d===null||zd(d)||zt(d)||Yi(d)||Zd(d)?r(d):e.attempt(t$,e.attempt(r$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function C7(e,t,r){let n=0;return o;function o(a){return(a===87||a===119)&&n<3?(n++,e.consume(a),o):a===46&&n===3?(e.consume(a),i):r(a)}function i(a){return a===null?r(a):t(a)}}function A7(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(n$,c,s)(l):l===null||zt(l)||Yi(l)||l!==45&&Zd(l)?c(l):(i=!0,e.consume(l),a)}function s(l){return l===95?n=!0:(o=n,n=void 0),e.consume(l),a}function c(l){return o||n||!i?r(l):t(l)}}function I7(e,t){let r=0,n=0;return o;function o(a){return a===40?(r++,e.consume(a),o):a===41&&n<r?i(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(n$,t,i)(a):a===null||zt(a)||Yi(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function R7(e,t,r){return n;function n(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),n):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||zt(s)||Yi(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||zt(s)||Yi(s)?t(s):n(s)}function i(s){return on(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):on(s)?(e.consume(s),a):r(s)}}function P7(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Kr(i)?r(i):t(i)}}function a$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||zt(e)}function s$(e){return!on(e)}function c$(e){return!(e===47||Zy(e))}function Zy(e){return e===43||e===45||e===46||e===95||Kr(e)}function Vy(e){let t=e.length,r=!1;for(;t--;){const n=e[t][1];if((n.type==="labelLink"||n.type==="labelImage")&&!n._balanced){r=!0;break}if(n._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const N7={tokenize:U7,partial:!0};function M7(){return{document:{91:{tokenize:F7,continuation:{tokenize:q7},exit:B7}},text:{91:{tokenize:L7},93:{add:"after",tokenize:j7,resolveTo:D7}}}}function j7(e,t,r){const n=this;let o=n.events.length;const i=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let a;for(;o--;){const c=n.events[o][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return s;function s(c){if(!a||!a._balanced)return r(c);const l=Gn(n.sliceSerialize({start:a.end,end:n.now()}));return l.codePointAt(0)!==94||!i.includes(l.slice(1))?r(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function D7(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const n={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const i={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},i.start),end:Object.assign({},i.end)},s=[e[r+1],e[r+2],["enter",n,t],e[r+3],e[r+4],["enter",o,t],["exit",o,t],["enter",i,t],["enter",a,t],["exit",a,t],["exit",i,t],e[e.length-2],e[e.length-1],["exit",n,t]];return e.splice(r,e.length-r+1,...s),e}function L7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i=0,a;return s;function s(d){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),c}function c(d){return d!==94?r(d):(e.enter("gfmFootnoteCallMarker"),e.consume(d),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",l)}function l(d){if(i>999||d===93&&!a||d===null||d===91||zt(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Gn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return zt(d)||(a=!0),i++,e.consume(d),d===92?u:l}function u(d){return d===91||d===92||d===93?(e.consume(d),i++,l):l(d)}}function F7(e,t,r){const n=this,o=n.parser.gfmFootnotes||(n.parser.gfmFootnotes=[]);let i,a=0,s;return c;function c(h){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),l}function l(h){return h===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):r(h)}function u(h){if(a>999||h===93&&!s||h===null||h===91||zt(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Gn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return zt(h)||(s=!0),a++,e.consume(h),h===92?d:u}function d(h){return h===91||h===92||h===93?(e.consume(h),a++,u):u(h)}function p(h){return h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),o.includes(i)||o.push(i),Ct(e,f,"gfmFootnoteDefinitionWhitespace")):r(h)}function f(h){return t(h)}}function q7(e,t,r){return e.check(Mc,t,e.attempt(N7,t,r))}function B7(e){e.exit("gfmFootnoteDefinition")}function U7(e,t,r){const n=this;return Ct(e,o,"gfmFootnoteDefinitionIndent",4+1);function o(i){const a=n.events[n.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):r(i)}}function z7(e){let r=(e||{}).singleTilde;const n={tokenize:i,resolveAll:o};return r==null&&(r=!0),{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function o(a,s){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let l=c;for(;l--;)if(a[l][0]==="exit"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[l][1].end.offset-a[l][1].start.offset){a[c][1].type="strikethroughSequence",a[l][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[l][1].start),end:Object.assign({},a[c][1].end)},d={type:"strikethroughText",start:Object.assign({},a[l][1].end),end:Object.assign({},a[c][1].start)},p=[["enter",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["enter",d,s]],f=s.parser.constructs.insideSpan.null;f&&vn(p,p.length,0,Hd(f,a.slice(l+1,c),s)),vn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),vn(a,l-1,c-l+3,p),c=l+p.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function i(a,s,c){const l=this.previous,u=this.events;let d=0;return p;function p(h){return l===126&&u[u.length-1][1].type!=="characterEscape"?c(h):(a.enter("strikethroughSequenceTemporary"),f(h))}function f(h){const y=Vd(l);if(h===126)return d>1?c(h):(a.consume(h),d++,f);if(d<2&&!r)return c(h);const m=a.exit("strikethroughSequenceTemporary"),g=Vd(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class Z7{constructor(){this.map=[]}add(t,r,n){V7(this,t,r,n)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let r=this.map.length;const n=[];for(;r>0;)r-=1,n.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];n.push([...t]),t.length=0;let o=n.pop();for(;o;)t.push(...o),o=n.pop();this.map.length=0}}function V7(e,t,r,n){let o=0;if(!(r===0&&n.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=r,e.map[o][2].push(...n);return}o+=1}e.map.push([t,r,n])}}function H7(e,t){let r=!1;const n=[];for(;t<e.length;){const o=e[t];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&n.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=n.length-1;n[i]=n[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return n}function W7(){return{flow:{null:{tokenize:K7,resolveAll:G7}}}}function K7(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let L=n.events.length-1;for(;L>-1;){const B=n.events[L][1].type;if(B==="lineEnding"||B==="linePrefix")L--;else break}const K=L>-1?n.events[L][1].type:null,z=K==="tableHead"||K==="tableRow"?S:c;return z===S&&n.parser.lazy[n.now().line]?r(A):z(A)}function c(A){return e.enter("tableHead"),e.enter("tableRow"),l(A)}function l(A){return A===124||(a=!0,i+=1),u(A)}function u(A){return A===null?r(A):et(A)?i>1?(i=0,n.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),f):r(A):xt(A)?Ct(e,u,"whitespace")(A):(i+=1,a&&(a=!1,o+=1),A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),d(A)))}function d(A){return A===null||A===124||zt(A)?(e.exit("data"),u(A)):(e.consume(A),A===92?p:d)}function p(A){return A===92||A===124?(e.consume(A),d):d(A)}function f(A){return n.interrupt=!1,n.parser.lazy[n.now().line]?r(A):(e.enter("tableDelimiterRow"),a=!1,xt(A)?Ct(e,h,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):h(A))}function h(A){return A===45||A===58?m(A):A===124?(a=!0,e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),y):w(A)}function y(A){return xt(A)?Ct(e,m,"whitespace")(A):m(A)}function m(A){return A===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),g):A===45?(i+=1,g(A)):A===null||et(A)?x(A):w(A)}function g(A){return A===45?(e.enter("tableDelimiterFiller"),v(A)):w(A)}function v(A){return A===45?(e.consume(A),v):A===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(A),e.exit("tableDelimiterMarker"),b):(e.exit("tableDelimiterFiller"),b(A))}function b(A){return xt(A)?Ct(e,x,"whitespace")(A):x(A)}function x(A){return A===124?h(A):A===null||et(A)?!a||o!==i?w(A):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(A)):w(A)}function w(A){return r(A)}function S(A){return e.enter("tableRow"),C(A)}function C(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),C):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,C,"whitespace")(A):(e.enter("data"),I(A))}function I(A){return A===null||A===124||zt(A)?(e.exit("data"),C(A)):(e.consume(A),A===92?P:I)}function P(A){return A===92||A===124?(e.consume(A),I):I(A)}}function G7(e,t){let r=-1,n=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,c=0,l,u,d;const p=new Z7;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(l$(p,t,c,l,u),u=void 0,c=0),l={type:"table",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",l,t]])):h.type==="tableRow"||h.type==="tableDelimiterRow"?(n=!0,d=void 0,i=[0,0,0,0],a=[0,r+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},h.start),end:Object.assign({},h.end)},p.add(r,0,[["enter",u,t]])),o=h.type==="tableDelimiterRow"?2:u?3:1):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")?(n=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d),i=[0,0,0,0]),a[2]=r)):h.type==="tableCellDivider"&&(n?n=!1:(i[1]!==0&&(a[0]=a[1],d=of(p,t,i,o,void 0,d)),i=a,a=[i[1],r,0,0])):h.type==="tableHead"?(s=!0,c=r):h.type==="tableRow"||h.type==="tableDelimiterRow"?(c=r,i[1]!==0?(a[0]=a[1],d=of(p,t,i,o,r,d)):a[1]!==0&&(d=of(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&l$(p,t,c,l,u),p.consume(t.events),r=-1;++r<t.events.length;){const f=t.events[r];f[0]==="enter"&&f[1].type==="table"&&(f[1]._align=H7(t.events,r))}return e}function of(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},Ga(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=Ga(t.events,r[1]);if(i={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(r[1],0,[["enter",i,t]]),r[2]!==0){const l=Ga(t.events,r[2]),u=Ga(t.events,r[3]),d={type:s,start:Object.assign({},l),end:Object.assign({},u)};if(e.add(r[2],0,[["enter",d,t]]),n!==2){const p=t.events[r[2]],f=t.events[r[3]];if(p[1].end=Object.assign({},f[1].end),p[1].type="chunkText",p[1].contentType="text",r[3]>r[2]+1){const h=r[2]+1,y=r[3]-r[2]-1;e.add(h,y,[])}}e.add(r[3]+1,0,[["exit",d,t]])}return o!==void 0&&(i.end=Object.assign({},Ga(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function l$(e,t,r,n,o){const i=[],a=Ga(t.events,r);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),n.end=Object.assign({},a),i.push(["exit",n,t]),e.add(r+1,0,i)}function Ga(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const J7={tokenize:X7};function Y7(){return{text:{91:J7}}}function X7(e,t,r){const n=this;return o;function o(c){return n.previous!==null||!n._gfmTasklistFirstContentOfListItem?r(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),i)}function i(c){return zt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):r(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):r(c)}function s(c){return et(c)?t(c):xt(c)?e.check({tokenize:Q7},t,r)(c):r(c)}}function Q7(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function e8(e){return Lk([k7(),M7(),z7(e),W7(),Y7()])}const t8={};function r8(e){const t=this,r=e||t8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(e8(r)),i.push(x7()),a.push(S7(r))}const Ht={container:{className:"bpContainer"},modal:{container:{className:"bpModalContainer"},overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpModalDialogContainer"},title:{container:{className:"bpModalDialogTitleContainer"},text:{className:"bpModalDialogTitleText"},closeIcon:{className:"bpModalDialogTitleCloseIcon"}},content:{className:"bpModalDialogContent"},newConversation:{button:{className:"bpModalDialogNewConversationButton"},text:{className:"bpModalDialogNewConversationText"}}}},fab:{container:{className:"bpFabContainer"},icon:{className:"bpFabIcon"}},notification:{container:{className:"bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpHeaderContainer"},content:{container:{className:"bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},actions:{container:{className:"bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{container:{className:"bpComposerContainer"},poweredBy:{className:"bpComposerPoweredBy"},input:{className:"bpComposerInput"},button:{container:{className:"bpComposerButtonContainer"},icon:{className:"bpComposerButtonIcon"}},uploadButton:{icon:{className:"bpComposerUploadButtonIcon"},container:{className:"bpComposerUploadButtonContainer"}}},messageList:{scrollbar:{container:{className:"bpMessageListScrollbarContainer"},viewport:{className:"bpMessageListScrollbarViewport"},background:{className:"bpMessageListScrollbarBackground"},thumb:{className:"bpMessageListScrollbarThumb"},corner:{className:"bpMessageListScrollbarCorner"}},scrollDownButton:{container:{className:"bpMessageListScrollDownButtonContainer"},button:{className:"bpMessageListScrollDownButtonButton"},icon:{className:"bpMessageListScrollDownButtonIcon"}},container:{className:"bpMessageListContainer"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}}},message:{container:{className:"bpMessageContainer"},avatar:{container:{className:"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"}}},n8=({text:e})=>{const{message:{blocks:{text:t}}}=Ht,r={h1:({node:n,...o})=>J.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>J.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>J.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>J.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>J.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>J.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>J.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>J.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>J.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>J.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>J.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>J.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>J.jsx("pre",{...o,...t==null?void 0:t.pre})};return J.jsx(zZ,{components:r,remarkPlugins:[r8,YZ],children:e})},o8=(e,t,r=120)=>{$.useEffect(()=>{if(e){e.style.height="0px";const n=t?Math.min(e.scrollHeight,r):20;e.style.height=`${n}px`}},[e,t])};var u$={},Hy={},d$={};Object.defineProperty(d$,"__esModule",{value:!0});var af={},i8=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(af,"__esModule",{value:!0}),af.Emitter=void 0;let a8=class{constructor(){this.listeners={}}on(t,r,n=!1){const o=this.listeners[t];o?n?o.unshift(r):o.push(r):this.listeners[t]=[r]}emit(t,r){return i8(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}};af.Emitter=a8;var f$={};Object.defineProperty(f$,"__esModule",{value:!0});var p$={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.HealthEventType=void 0,function(t){t.Create="create",t.Configure="configure",t.Start="start",t.StartFailure="start-failure",t.Initialize="initialize",t.InitializeFailure="initialize-failure",t.Sleep="sleep",t.Delete="delete"}(e.HealthEventType||(e.HealthEventType={}))})(p$);var h$={};Object.defineProperty(h$,"__esModule",{value:!0});var m$={};Object.defineProperty(m$,"__esModule",{value:!0});var y$={};Object.defineProperty(y$,"__esModule",{value:!0});var g$={};Object.defineProperty(g$,"__esModule",{value:!0}),function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(d$,e),r(af,e),r(f$,e),r(p$,e),r(h$,e),r(m$,e),r(y$,e),r(g$,e)}(Hy);var sf={},v$={},Wy={exports:{}},cf={},Ky={},lf={},Fc={},Ja={},Qi={},Ya={},Xa={},fo={};Object.defineProperty(fo,"__esModule",{value:!0}),fo.ERROR_PACKET=fo.PACKET_TYPES_REVERSE=fo.PACKET_TYPES=void 0;const po=Object.create(null);fo.PACKET_TYPES=po,po.open="0",po.close="1",po.ping="2",po.pong="3",po.message="4",po.upgrade="5",po.noop="6";const b$=Object.create(null);fo.PACKET_TYPES_REVERSE=b$,Object.keys(po).forEach(e=>{b$[po[e]]=e});const s8={type:"error",data:"parser error"};fo.ERROR_PACKET=s8,Object.defineProperty(Xa,"__esModule",{value:!0}),Xa.encodePacket=Xa.encodePacketToBinary=void 0;const c8=fo,w$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",x$=typeof ArrayBuffer=="function",S$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,_$=({type:e,data:t},r,n)=>w$&&t instanceof Blob?r?n(t):E$(t,n):x$&&(t instanceof ArrayBuffer||S$(t))?r?n(t):E$(new Blob([t]),n):n(c8.PACKET_TYPES[e]+(t||""));Xa.encodePacket=_$;const E$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function k$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Gy;function l8(e,t){if(w$&&e.data instanceof Blob)return e.data.arrayBuffer().then(k$).then(t);if(x$&&(e.data instanceof ArrayBuffer||S$(e.data)))return t(k$(e.data));_$(e,!1,r=>{Gy||(Gy=new TextEncoder),t(Gy.encode(r))})}Xa.encodePacketToBinary=l8;var uf={},Qa={};Object.defineProperty(Qa,"__esModule",{value:!0}),Qa.decode=Qa.encode=void 0;const es="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<es.length;e++)qc[es.charCodeAt(e)]=e;const u8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=es[t[r]>>2],o+=es[(t[r]&3)<<4|t[r+1]>>4],o+=es[(t[r+1]&15)<<2|t[r+2]>>6],o+=es[t[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o};Qa.encode=u8;const d8=e=>{let t=e.length*.75,r=e.length,n,o=0,i,a,s,c;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const l=new ArrayBuffer(t),u=new Uint8Array(l);for(n=0;n<r;n+=4)i=qc[e.charCodeAt(n)],a=qc[e.charCodeAt(n+1)],s=qc[e.charCodeAt(n+2)],c=qc[e.charCodeAt(n+3)],u[o++]=i<<2|a>>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|c&63;return l};Qa.decode=d8,Object.defineProperty(uf,"__esModule",{value:!0}),uf.decodePacket=void 0;const df=fo,f8=Qa,p8=typeof ArrayBuffer=="function",h8=(e,t)=>{if(typeof e!="string")return{type:"message",data:T$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:m8(e.substring(1),t)}:df.PACKET_TYPES_REVERSE[r]?e.length>1?{type:df.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:df.PACKET_TYPES_REVERSE[r]}:df.ERROR_PACKET};uf.decodePacket=h8;const m8=(e,t)=>{if(p8){const r=(0,f8.decode)(e);return T$(r,t)}else return{base64:!0,data:e}},T$=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodePayload=e.decodePacket=e.encodePayload=e.encodePacket=e.protocol=e.createPacketDecoderStream=e.createPacketEncoderStream=void 0;const t=Xa;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=uf;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=fo,o=String.fromCharCode(30),i=(p,f)=>{const h=p.length,y=new Array(h);let m=0;p.forEach((g,v)=>{(0,t.encodePacket)(g,!1,b=>{y[v]=b,++m===h&&f(y.join(o))})})};e.encodePayload=i;const a=(p,f)=>{const h=p.split(o),y=[];for(let m=0;m<h.length;m++){const g=(0,r.decodePacket)(h[m],f);if(y.push(g),g.type==="error")break}return y};e.decodePayload=a;function s(){return new TransformStream({transform(p,f){(0,t.encodePacketToBinary)(p,h=>{const y=h.length;let m;if(y<126)m=new Uint8Array(1),new DataView(m.buffer).setUint8(0,y);else if(y<65536){m=new Uint8Array(3);const g=new DataView(m.buffer);g.setUint8(0,126),g.setUint16(1,y)}else{m=new Uint8Array(9);const g=new DataView(m.buffer);g.setUint8(0,127),g.setBigUint64(1,BigInt(y))}p.data&&typeof p.data!="string"&&(m[0]|=128),f.enqueue(m),f.enqueue(h)})}})}e.createPacketEncoderStream=s;let c;function l(p){return p.reduce((f,h)=>f+h.length,0)}function u(p,f){if(p[0].length===f)return p.shift();const h=new Uint8Array(f);let y=0;for(let m=0;m<f;m++)h[m]=p[0][y++],y===p[0].length&&(p.shift(),y=0);return p.length&&y<p[0].length&&(p[0]=p[0].slice(y)),h}function d(p,f){c||(c=new TextDecoder);const h=[];let y=0,m=-1,g=!1;return new TransformStream({transform(v,b){for(h.push(v);;){if(y===0){if(l(h)<1)break;const x=u(h,1);g=(x[0]&128)===128,m=x[0]&127,m<126?y=3:m===126?y=1:y=2}else if(y===1){if(l(h)<2)break;const x=u(h,2);m=new DataView(x.buffer,x.byteOffset,x.length).getUint16(0),y=3}else if(y===2){if(l(h)<8)break;const x=u(h,8),w=new DataView(x.buffer,x.byteOffset,x.length),S=w.getUint32(0);if(S>Math.pow(2,53-32)-1){b.enqueue(n.ERROR_PACKET);break}m=S*Math.pow(2,32)+w.getUint32(4),y=3}else{if(l(h)<m)break;const x=u(h,m);b.enqueue((0,r.decodePacket)(g?x:c.decode(x),f)),y=0}if(m===0||m>p){b.enqueue(n.ERROR_PACKET);break}}}})}e.createPacketDecoderStream=d,e.protocol=4})(Ya);function an(e){if(e)return y8(e)}function y8(e){for(var t in an.prototype)e[t]=an.prototype[t];return e}an.prototype.on=an.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},an.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},an.prototype.off=an.prototype.removeListener=an.prototype.removeAllListeners=an.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;o<r.length;o++)if(n=r[o],n===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},an.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),r=this._callbacks["$"+e],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(r){r=r.slice(0);for(var n=0,o=r.length;n<o;++n)r[n].apply(this,t)}return this},an.prototype.emitReserved=an.prototype.emit,an.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},an.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ts=Ih(Object.freeze(Object.defineProperty({__proto__:null,Emitter:an},Symbol.toStringTag,{value:"Module"})));var Nn={},ea={};Object.defineProperty(ea,"__esModule",{value:!0}),ea.globalThisShim=void 0,ea.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.byteLength=Nn.installTimerFunctions=Nn.pick=void 0;const pi=ea;function g8(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Nn.pick=g8;const v8=pi.globalThisShim.setTimeout,b8=pi.globalThisShim.clearTimeout;function w8(e,t){t.useNativeTimers?(e.setTimeoutFn=v8.bind(pi.globalThisShim),e.clearTimeoutFn=b8.bind(pi.globalThisShim)):(e.setTimeoutFn=pi.globalThisShim.setTimeout.bind(pi.globalThisShim),e.clearTimeoutFn=pi.globalThisShim.clearTimeout.bind(pi.globalThisShim))}Nn.installTimerFunctions=w8;const x8=1.33;function S8(e){return typeof e=="string"?_8(e):Math.ceil((e.byteLength||e.size)*x8)}Nn.byteLength=S8;function _8(e){let t=0,r=0;for(let n=0,o=e.length;n<o;n++)t=e.charCodeAt(n),t<128?r+=1:t<2048?r+=2:t<55296||t>=57344?r+=3:(n++,r+=4);return r}var Jy={exports:{}},Yy,$$;function E8(){if($$)return Yy;$$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;Yy=function(u,d){d=d||{};var p=typeof u;if(p==="string"&&u.length>0)return a(u);if(p==="number"&&isFinite(u))return d.long?c(u):s(u);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(u))};function a(u){if(u=String(u),!(u.length>100)){var d=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(u);if(d){var p=parseFloat(d[1]),f=(d[2]||"ms").toLowerCase();switch(f){case"years":case"year":case"yrs":case"yr":case"y":return p*i;case"weeks":case"week":case"w":return p*o;case"days":case"day":case"d":return p*n;case"hours":case"hour":case"hrs":case"hr":case"h":return p*r;case"minutes":case"minute":case"mins":case"min":case"m":return p*t;case"seconds":case"second":case"secs":case"sec":case"s":return p*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return p;default:return}}}}function s(u){var d=Math.abs(u);return d>=n?Math.round(u/n)+"d":d>=r?Math.round(u/r)+"h":d>=t?Math.round(u/t)+"m":d>=e?Math.round(u/e)+"s":u+"ms"}function c(u){var d=Math.abs(u);return d>=n?l(u,d,n,"day"):d>=r?l(u,d,r,"hour"):d>=t?l(u,d,t,"minute"):d>=e?l(u,d,e,"second"):u+" ms"}function l(u,d,p,f){var h=d>=p*1.5;return Math.round(u/p)+" "+f+(h?"s":"")}return Yy}function k8(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=E8(),r.destroy=l,Object.keys(e).forEach(u=>{r[u]=e[u]}),r.names=[],r.skips=[],r.formatters={};function t(u){let d=0;for(let p=0;p<u.length;p++)d=(d<<5)-d+u.charCodeAt(p),d|=0;return r.colors[Math.abs(d)%r.colors.length]}r.selectColor=t;function r(u){let d,p=null,f,h;function y(...m){if(!y.enabled)return;const g=y,v=Number(new Date),b=v-(d||v);g.diff=b,g.prev=d,g.curr=v,d=v,m[0]=r.coerce(m[0]),typeof m[0]!="string"&&m.unshift("%O");let x=0;m[0]=m[0].replace(/%([a-zA-Z%])/g,(S,C)=>{if(S==="%%")return"%";x++;const I=r.formatters[C];if(typeof I=="function"){const P=m[x];S=I.call(g,P),m.splice(x,1),x--}return S}),r.formatArgs.call(g,m),(g.log||r.log).apply(g,m)}return y.namespace=u,y.useColors=r.useColors(),y.color=r.selectColor(u),y.extend=n,y.destroy=r.destroy,Object.defineProperty(y,"enabled",{enumerable:!0,configurable:!1,get:()=>p!==null?p:(f!==r.namespaces&&(f=r.namespaces,h=r.enabled(u)),h),set:m=>{p=m}}),typeof r.init=="function"&&r.init(y),y}function n(u,d){const p=r(this.namespace+(typeof d>"u"?":":d)+u);return p.log=this.log,p}function o(u){r.save(u),r.namespaces=u,r.names=[],r.skips=[];let d;const p=(typeof u=="string"?u:"").split(/[\s,]+/),f=p.length;for(d=0;d<f;d++)p[d]&&(u=p[d].replace(/\*/g,".*?"),u[0]==="-"?r.skips.push(new RegExp("^"+u.slice(1)+"$")):r.names.push(new RegExp("^"+u+"$")))}function i(){const u=[...r.names.map(s),...r.skips.map(s).map(d=>"-"+d)].join(",");return r.enable(""),u}function a(u){if(u[u.length-1]==="*")return!0;let d,p;for(d=0,p=r.skips.length;d<p;d++)if(r.skips[d].test(u))return!1;for(d=0,p=r.names.length;d<p;d++)if(r.names[d].test(u))return!0;return!1}function s(u){return u.toString().substring(2,u.toString().length-2).replace(/\.\*\?$/,"*")}function c(u){return u instanceof Error?u.stack||u.message:u}function l(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}var T8=k8;(function(e,t){t.formatArgs=n,t.save=o,t.load=i,t.useColors=r,t.storage=a(),t.destroy=(()=>{let c=!1;return()=>{c||(c=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function r(){return typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const l="color: "+this.color;c.splice(1,0,l,"color: inherit");let u=0,d=0;c[0].replace(/%[a-zA-Z%]/g,p=>{p!=="%%"&&(u++,p==="%c"&&(d=u))}),c.splice(d,0,l)}t.log=console.debug||console.log||(()=>{});function o(c){try{c?t.storage.setItem("debug",c):t.storage.removeItem("debug")}catch{}}function i(){let c;try{c=t.storage.getItem("debug")}catch{}return!c&&typeof process<"u"&&"env"in process&&(c=process.env.DEBUG),c}function a(){try{return localStorage}catch{}}e.exports=T8(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(Jy,Jy.exports);var ho=Jy.exports,ta={};Object.defineProperty(ta,"__esModule",{value:!0}),ta.decode=ta.encode=void 0;function $8(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ta.encode=$8;function O8(e){let t={},r=e.split("&");for(let n=0,o=r.length;n<o;n++){let i=r[n].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}ta.decode=O8;var C8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qi,"__esModule",{value:!0}),Qi.Transport=void 0;const A8=Ya,I8=ts,R8=Nn,P8=C8(ho),N8=ta,M8=(0,P8.default)("engine.io-client:transport");class j8 extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class D8 extends I8.Emitter{constructor(t){super(),this.writable=!1,(0,R8.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new j8(t,r,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"?this.write(t):M8("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,A8.decodePacket)(t,this.socket.binaryType);this.onPacket(r)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,r={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(r)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const r=(0,N8.encode)(t);return r.length?"?"+r:""}}Qi.Transport=D8;var qo={};Object.defineProperty(qo,"__esModule",{value:!0}),qo.yeast=qo.decode=qo.encode=void 0;const O$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ff=64,C$={};let A$=0,hi=0,I$;function Xy(e){let t="";do t=O$[e%ff]+t,e=Math.floor(e/ff);while(e>0);return t}qo.encode=Xy;function L8(e){let t=0;for(hi=0;hi<e.length;hi++)t=t*ff+C$[e.charAt(hi)];return t}qo.decode=L8;function F8(){const e=Xy(+new Date);return e!==I$?(A$=0,I$=e):e+"."+Xy(A$++)}for(qo.yeast=F8;hi<ff;hi++)C$[O$[hi]]=hi;var rs={},pf={};Object.defineProperty(pf,"__esModule",{value:!0}),pf.hasCORS=void 0;let R$=!1;try{R$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}pf.hasCORS=R$,Object.defineProperty(rs,"__esModule",{value:!0}),rs.createCookieJar=rs.XHR=void 0;const q8=pf,B8=ea;function U8(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||q8.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new B8.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}rs.XHR=U8;function z8(){}rs.createCookieJar=z8;var Z8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ja,"__esModule",{value:!0}),Ja.Request=Ja.Polling=void 0;const V8=Qi,H8=Z8(ho),W8=qo,P$=Ya,Qy=rs,K8=ts,N$=Nn,G8=ea,ln=(0,H8.default)("engine.io-client:polling");function J8(){}const Y8=function(){return new Qy.XHR({xdomain:!1}).responseType!=null}();class X8 extends V8.Transport{constructor(t){if(super(t),this.polling=!1,typeof location<"u"){const n=location.protocol==="https:";let o=location.port;o||(o=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}const r=t&&t.forceBase64;this.supportsBinary=Y8&&!r,this.opts.withCredentials&&(this.cookieJar=(0,Qy.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{ln("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(ln("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){ln("pre-pause polling complete"),--n||r()})),this.writable||(ln("we are currently writing - waiting to pause"),n++,this.once("drain",function(){ln("pre-pause writing complete"),--n||r()}))}else r()}poll(){ln("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){ln("polling got data %s",t);const r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};(0,P$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():ln('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{ln("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(ln("transport open - closing"),t()):(ln("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,P$.encodePayload)(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=(0,W8.yeast)()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new ra(this.uri(),t)}doWrite(t,r){const n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){ln("xhr poll");const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}}Ja.Polling=X8;let ra=class Ah extends K8.Emitter{constructor(t,r){super(),(0,N$.installTimerFunctions)(this,r),this.opts=r,this.method=r.method||"GET",this.uri=t,this.data=r.data!==void 0?r.data:null,this.create()}create(){var t;const r=(0,N$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new Qy.XHR(r);try{ln("xhr open %s: %s",this.method,this.uri),n.open(this.method,this.uri,!0);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this.opts.extraHeaders[o])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this.opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this.opts.cookieJar)===null||o===void 0||o.parseCookies(n)),n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},ln("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Ah.requestsCount++,Ah.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=J8,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ah.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}};if(Ja.Request=ra,ra.requestsCount=0,ra.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",M$);else if(typeof addEventListener=="function"){const e="onpagehide"in G8.globalThisShim?"pagehide":"unload";addEventListener(e,M$,!1)}}function M$(){for(let e in ra.requests)ra.requests.hasOwnProperty(e)&&ra.requests[e].abort()}var hf={},bn={};Object.defineProperty(bn,"__esModule",{value:!0}),bn.defaultBinaryType=bn.usingBrowserWebSocket=bn.WebSocket=bn.nextTick=void 0;const j$=ea;bn.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),bn.WebSocket=j$.globalThisShim.WebSocket||j$.globalThisShim.MozWebSocket,bn.usingBrowserWebSocket=!0,bn.defaultBinaryType="arraybuffer";var Q8=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hf,"__esModule",{value:!0}),hf.WS=void 0;const eV=Qi,tV=qo,rV=Nn,mi=bn,nV=Q8(ho),oV=Ya,iV=(0,nV.default)("engine.io-client:websocket"),D$=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class aV extends eV.Transport{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),r=this.opts.protocols,n=D$?{}:(0,rV.pick)(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=mi.usingBrowserWebSocket&&!D$?r?new mi.WebSocket(t,r):new mi.WebSocket(t):new mi.WebSocket(t,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;(0,oV.encodePacket)(n,this.supportsBinary,i=>{const a={};mi.usingBrowserWebSocket||(n.options&&(a.compress=n.options.compress),this.opts.perMessageDeflate&&(typeof i=="string"?Buffer.byteLength(i):i.length)<this.opts.perMessageDeflate.threshold&&(a.compress=!1));try{mi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{iV("websocket closed before onclose event")}o&&(0,mi.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=(0,tV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!mi.WebSocket}}hf.WS=aV;var mf={},sV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(mf,"__esModule",{value:!0}),mf.WT=void 0;const cV=Qi,lV=bn,L$=Ya,Bc=(0,sV(ho).default)("engine.io-client:webtransport");class uV extends cV.Transport{get name(){return"webtransport"}doOpen(){typeof WebTransport=="function"&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then(()=>{Bc("transport closed gracefully"),this.onClose()}).catch(t=>{Bc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,L$.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,L$.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Bc("session is closed");return}Bc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Bc("an error occurred while reading: %s",s)})};i();const a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this.writer.write(a).then(()=>this.onOpen())})}))}write(t){this.writable=!1;for(let r=0;r<t.length;r++){const n=t[r],o=r===t.length-1;this.writer.write(n).then(()=>{o&&(0,lV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}mf.WT=uV,Object.defineProperty(Fc,"__esModule",{value:!0}),Fc.transports=void 0;const dV=Ja,fV=hf,pV=mf;Fc.transports={websocket:fV.WS,webtransport:pV.WT,polling:dV.Polling};var Uc={};Object.defineProperty(Uc,"__esModule",{value:!0}),Uc.parse=void 0;const hV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mV=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function yV(e){const t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=hV.exec(e||""),i={},a=14;for(;a--;)i[mV[a]]=o[a]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=gV(i,i.path),i.queryKey=vV(i,i.query),i}Uc.parse=yV;function gV(e,t){const r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function vV(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var bV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(lf,"__esModule",{value:!0}),lf.Socket=void 0;const wV=Fc,F$=Nn,xV=ta,q$=Uc,SV=bV(ho),_V=ts,B$=Ya,EV=bn,tr=(0,SV.default)("engine.io-client:socket");let U$=class Zs extends _V.Emitter{constructor(t,r={}){super(),this.binaryType=EV.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,q$.parse)(t),r.hostname=t.host,r.secure=t.protocol==="https"||t.protocol==="wss",r.port=t.port,t.query&&(r.query=t.query)):r.host&&(r.hostname=(0,q$.parse)(r.host).host),(0,F$.installTimerFunctions)(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=r.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=(0,xV.decode)(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){tr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=B$.protocol,r.transport=t,this.id&&(r.sid=this.id);const n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return tr("options: %j",n),new wV.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&Zs.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch(r){tr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){tr("setting transport %s",t.name),this.transport&&(tr("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",r=>this.onClose("transport close",r))}probe(t){tr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;Zs.priorWebsocketSuccess=!1;const o=()=>{n||(tr('probe transport "%s" opened',t),r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!n)if(d.type==="pong"&&d.data==="probe"){if(tr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;Zs.priorWebsocketSuccess=r.name==="websocket",tr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(tr("changing transport and sending upgrade packet"),u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{tr('probe transport "%s" failed',t);const p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}const a=d=>{const p=new Error("probe error: "+d);p.transport=r.name,i(),tr('probe transport "%s" failed because of error: %s',t,d),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function c(){a("socket closed")}function l(d){r&&d.name!==r.name&&(tr('"%s" works - aborting "%s"',d.name,r.name),i())}const u=()=>{r.removeListener("open",o),r.removeListener("error",a),r.removeListener("close",s),this.off("close",c),this.off("upgrading",l)};r.once("open",o),r.once("error",a),r.once("close",s),this.once("close",c),this.once("upgrading",l),this.upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onOpen(){if(tr("socket open"),this.readyState="open",Zs.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){tr("starting upgrade probes");let t=0;const r=this.upgrades.length;for(;t<r;t++)this.probe(this.upgrades[t])}}onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(tr('socket receive: type "%s", data "%s"',t.type,t.data),this.emitReserved("packet",t),this.emitReserved("heartbeat"),this.resetPingTimeout(),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this.sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong");break;case"error":const r=new Error("server error");r.code=t.data,this.onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}else tr('packet received with socket readyState "%s"',this.readyState)}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this.upgrades=this.filterUpgrades(t.upgrades),this.pingInterval=t.pingInterval,this.pingTimeout=t.pingTimeout,this.maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this.resetPingTimeout()}resetPingTimeout(){this.clearTimeoutFn(this.pingTimeoutTimer),this.pingTimeoutTimer=this.setTimeoutFn(()=>{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();tr("flushing %d packets in socket",t.length),this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n<this.writeBuffer.length;n++){const o=this.writeBuffer[n].data;if(o&&(r+=(0,F$.byteLength)(o)),n>0&&r>this.maxPayload)return tr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return tr("payload size is %d (max: %d)",r,this.maxPayload),this.writeBuffer}write(t,r,n){return this.sendPacket("message",t,r,n),this}send(t,r,n){return this.sendPacket("message",t,r,n),this}sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this.onClose("forced close"),tr("socket closing - telling transport to close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}onError(t){tr("socket error %j",t),Zs.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(tr('socket close with reason: "%s"',t),this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const r=[];let n=0;const o=t.length;for(;n<o;n++)~this.transports.indexOf(t[n])&&r.push(t[n]);return r}};lf.Socket=U$,U$.protocol=B$.protocol,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.nextTick=e.parse=e.installTimerFunctions=e.transports=e.Transport=e.protocol=e.Socket=void 0;const t=lf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=Qi;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Fc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Nn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Uc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=bn;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(Ky);var kV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cf,"__esModule",{value:!0}),cf.url=void 0;const TV=Ky,z$=kV(ho).default("socket.io-client:url");function $V(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(z$("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),z$("parse %s",e),n=TV.parse(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}cf.url=$V;var yf={},zc={},gf={},ns={},na={};Object.defineProperty(na,"__esModule",{value:!0}),na.hasBinary=na.isBinary=void 0;const OV=typeof ArrayBuffer=="function",CV=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Z$=Object.prototype.toString,AV=typeof Blob=="function"||typeof Blob<"u"&&Z$.call(Blob)==="[object BlobConstructor]",IV=typeof File=="function"||typeof File<"u"&&Z$.call(File)==="[object FileConstructor]";function V$(e){return OV&&(e instanceof ArrayBuffer||CV(e))||AV&&e instanceof Blob||IV&&e instanceof File}na.isBinary=V$;function vf(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(vf(e[r]))return!0;return!1}if(V$(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vf(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&vf(e[r]))return!0;return!1}na.hasBinary=vf,Object.defineProperty(ns,"__esModule",{value:!0}),ns.reconstructPacket=ns.deconstructPacket=void 0;const RV=na;function PV(e){const t=[],r=e.data,n=e;return n.data=eg(r,t),n.attachments=t.length,{packet:n,buffers:t}}ns.deconstructPacket=PV;function eg(e,t){if(!e)return e;if((0,RV.isBinary)(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=eg(e[n],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){const r={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=eg(e[n],t));return r}return e}function NV(e,t){return e.data=tg(e.data,t),delete e.attachments,e}ns.reconstructPacket=NV;function tg(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let r=0;r<e.length;r++)e[r]=tg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=tg(e[r],t));return e}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Decoder=e.Encoder=e.PacketType=e.protocol=void 0;const t=ts,r=ns,n=na,i=(0,ho.default)("socket.io-parser"),a=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];e.protocol=5;var s;(function(p){p[p.CONNECT=0]="CONNECT",p[p.DISCONNECT=1]="DISCONNECT",p[p.EVENT=2]="EVENT",p[p.ACK=3]="ACK",p[p.CONNECT_ERROR=4]="CONNECT_ERROR",p[p.BINARY_EVENT=5]="BINARY_EVENT",p[p.BINARY_ACK=6]="BINARY_ACK"})(s=e.PacketType||(e.PacketType={}));class c{constructor(f){this.replacer=f}encode(f){return i("encoding packet %j",f),(f.type===s.EVENT||f.type===s.ACK)&&(0,n.hasBinary)(f)?this.encodeAsBinary({type:f.type===s.EVENT?s.BINARY_EVENT:s.BINARY_ACK,nsp:f.nsp,data:f.data,id:f.id}):[this.encodeAsString(f)]}encodeAsString(f){let h=""+f.type;return(f.type===s.BINARY_EVENT||f.type===s.BINARY_ACK)&&(h+=f.attachments+"-"),f.nsp&&f.nsp!=="/"&&(h+=f.nsp+","),f.id!=null&&(h+=f.id),f.data!=null&&(h+=JSON.stringify(f.data,this.replacer)),i("encoded %j as %s",f,h),h}encodeAsBinary(f){const h=(0,r.deconstructPacket)(f),y=this.encodeAsString(h.packet),m=h.buffers;return m.unshift(y),m}}e.Encoder=c;function l(p){return Object.prototype.toString.call(p)==="[object Object]"}class u extends t.Emitter{constructor(f){super(),this.reviver=f}add(f){let h;if(typeof f=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(f);const y=h.type===s.BINARY_EVENT;y||h.type===s.BINARY_ACK?(h.type=y?s.EVENT:s.ACK,this.reconstructor=new d(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if((0,n.isBinary)(f)||f.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(f),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+f)}decodeString(f){let h=0;const y={type:Number(f.charAt(0))};if(s[y.type]===void 0)throw new Error("unknown packet type "+y.type);if(y.type===s.BINARY_EVENT||y.type===s.BINARY_ACK){const g=h+1;for(;f.charAt(++h)!=="-"&&h!=f.length;);const v=f.substring(g,h);if(v!=Number(v)||f.charAt(h)!=="-")throw new Error("Illegal attachments");y.attachments=Number(v)}if(f.charAt(h+1)==="/"){const g=h+1;for(;++h&&!(f.charAt(h)===","||h===f.length););y.nsp=f.substring(g,h)}else y.nsp="/";const m=f.charAt(h+1);if(m!==""&&Number(m)==m){const g=h+1;for(;++h;){const v=f.charAt(h);if(v==null||Number(v)!=v){--h;break}if(h===f.length)break}y.id=Number(f.substring(g,h+1))}if(f.charAt(++h)){const g=this.tryParse(f.substr(h));if(u.isPayloadValid(y.type,g))y.data=g;else throw new Error("invalid payload")}return i("decoded %s as %j",f,y),y}tryParse(f){try{return JSON.parse(f,this.reviver)}catch{return!1}}static isPayloadValid(f,h){switch(f){case s.CONNECT:return l(h);case s.DISCONNECT:return h===void 0;case s.CONNECT_ERROR:return typeof h=="string"||l(h);case s.EVENT:case s.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&a.indexOf(h[0])===-1);case s.ACK:case s.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}e.Decoder=u;class d{constructor(f){this.packet=f,this.buffers=[],this.reconPack=f}takeBinaryData(f){if(this.buffers.push(f),this.buffers.length===this.reconPack.attachments){const h=(0,r.reconstructPacket)(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}})(gf);var Zc={};Object.defineProperty(Zc,"__esModule",{value:!0}),Zc.on=void 0;function MV(e,t,r){return e.on(t,r),function(){e.off(t,r)}}Zc.on=MV;var jV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zc,"__esModule",{value:!0}),zc.Socket=void 0;const Jn=gf,bf=Zc,DV=ts,br=jV(ho).default("socket.io-client:socket"),LV=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class FV extends DV.Emitter{constructor(t,r,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=r,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[bf.on(t,"open",this.onopen.bind(this)),bf.on(t,"packet",this.onpacket.bind(this)),bf.on(t,"error",this.onerror.bind(this)),bf.on(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...r){if(LV.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(r.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(r),this;const n={type:Jn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;br("emitting packet with ack id %d",a);const s=r.pop();this._registerAckCallback(a,s),n.id=a}const o=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!o||!this.connected)?br("discard packet as the transport is not currently writable"):this.connected?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n),this.flags={},this}_registerAckCallback(t,r){var n;const o=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(o===void 0){this.acks[t]=r;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&(br("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));br("event with ack id %d has timed out after %d ms",t,o),r.call(this,new Error("operation has timed out"))},o);this.acks[t]=(...a)=>{this.io.clearTimeoutFn(i),r.apply(this,[null,...a])}}emitWithAck(t,...r){const n=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{r.push((a,s)=>n?a?i(a):o(s):o(a)),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(br("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(br("packet [%d] was successfully sent",n.id),this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(br("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){br("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,br("sending packet [%d] (try n°%d)",r.id,r.tryCount),this.flags=r.flags,this.emit.apply(this,r.args)}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){br("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Jn.PacketType.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){br("close (%s)",t),this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Jn.PacketType.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Jn.PacketType.EVENT:case Jn.PacketType.BINARY_EVENT:this.onevent(t);break;case Jn.PacketType.ACK:case Jn.PacketType.BINARY_ACK:this.onack(t);break;case Jn.PacketType.DISCONNECT:this.ondisconnect();break;case Jn.PacketType.CONNECT_ERROR:this.destroy();const n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){const r=t.data||[];br("emitting event %j",r),t.id!=null&&(br("attaching ack callback to event"),r.push(this.ack(t.id))),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const r=this._anyListeners.slice();for(const n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const r=this;let n=!1;return function(...o){n||(n=!0,br("sending ack %j",o),r.packet({type:Jn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(br("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):br("bad ack %s",t.id)}onconnect(t,r){br("socket connected with id %s",t),this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){br("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&(br("performing disconnect (%s)",this.nsp),this.packet({type:Jn.PacketType.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const r=this._anyListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const r=this._anyOutgoingListeners;for(let n=0;n<r.length;n++)if(t===r[n])return r.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const r=this._anyOutgoingListeners.slice();for(const n of r)n.apply(this,t.data)}}}zc.Socket=FV;var wf={};Object.defineProperty(wf,"__esModule",{value:!0}),wf.Backoff=void 0;function os(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}wf.Backoff=os,os.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+r:e-r}return Math.min(e,this.max)|0},os.prototype.reset=function(){this.attempts=0},os.prototype.setMin=function(e){this.ms=e},os.prototype.setMax=function(e){this.max=e},os.prototype.setJitter=function(e){this.jitter=e};var qV=We&&We.__createBinding||(Object.create?function(e,t,r,n){n===void 0&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]}),BV=We&&We.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),UV=We&&We.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)r!=="default"&&Object.prototype.hasOwnProperty.call(e,r)&&qV(t,e,r);return BV(t,e),t},zV=We&&We.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yf,"__esModule",{value:!0}),yf.Manager=void 0;const rg=Ky,ZV=zc,VV=UV(gf),oa=Zc,HV=wf,WV=ts,Lr=zV(ho).default("socket.io-client:manager");class KV extends WV.Emitter{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,rg.installTimerFunctions(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new HV.Backoff({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;const o=r.parser||VV;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(Lr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;Lr("opening %s",this.uri),this.engine=new rg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=oa.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{Lr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=oa.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;Lr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{Lr("connect attempt timed out after %d",s),o(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&c.unref(),this.subs.push(()=>{this.clearTimeoutFn(c)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){Lr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(oa.on(t,"ping",this.onping.bind(this)),oa.on(t,"data",this.ondata.bind(this)),oa.on(t,"error",this.onerror.bind(this)),oa.on(t,"close",this.onclose.bind(this)),oa.on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){rg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){Lr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new ZV.Socket(this,t,r),this.nsps[t]=n),n}_destroy(t){const r=Object.keys(this.nsps);for(const n of r)if(this.nsps[n].active){Lr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){Lr("writing packet %j",t);const r=this.encoder.encode(t);for(let n=0;n<r.length;n++)this.engine.write(r[n],t.options)}cleanup(){Lr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){Lr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){Lr("closed due to %s",t),this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)Lr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();Lr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(Lr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(Lr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(Lr("reconnect success"),t.onreconnect())}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}yf.Manager=KV,function(e,t){var r=We&&We.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.connect=t.io=t.Socket=t.Manager=t.protocol=void 0;const n=cf,o=yf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=zc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(ho).default("socket.io-client"),c={};function l(d,p){typeof d=="object"&&(p=d,d=void 0),p=p||{};const f=n.url(d,p.path||"/socket.io"),h=f.source,y=f.id,m=f.path,g=c[y]&&m in c[y].nsps,v=p.forceNew||p["force new connection"]||p.multiplex===!1||g;let b;return v?(s("ignoring socket cache for %s",h),b=new o.Manager(h,p)):(c[y]||(s("new io instance for %s",h),c[y]=new o.Manager(h,p)),b=c[y]),f.query&&!p.query&&(p.query=f.queryKey),b.socket(f.path,p)}t.io=l,t.connect=l,t.default=l,Object.assign(l,{Manager:o.Manager,Socket:i.Socket,io:l,connect:l});var u=gf;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(Wy,Wy.exports);var GV=Wy.exports;(function(e){var t=We&&We.__awaiter||function(c,l,u,d){function p(f){return f instanceof u?f:new u(function(h){h(f)})}return new(u||(u=Promise))(function(f,h){function y(v){try{g(d.next(v))}catch(b){h(b)}}function m(v){try{g(d.throw(v))}catch(b){h(b)}}function g(v){v.done?f(v.value):p(v.value).then(y,m)}g((d=d.apply(c,l||[])).next())})},r=We&&We.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(e,"__esModule",{value:!0}),e.SocketComEmitter=e.SocketComEvents=e.SocketCom=void 0;const n=Hy,o=r(GV);class i{constructor(l){this.url=l,this.pending={},this.emitter=new s,this.events=this.emitter}connect(l,u){return t(this,void 0,void 0,function*(){return new Promise((d,p)=>{this.disconnect(),this.socket=(0,o.default)(this.url,{transports:["websocket"],auth:l,autoConnect:!1,query:u});const f=setTimeout(()=>{p("connection timed out")},5e3);this.socket.on("login",h=>t(this,void 0,void 0,function*(){clearTimeout(f),d(h)})),this.socket.on("connect_error",h=>{var y;(y=this.socket)===null||y===void 0||y.close(),clearTimeout(f),p(h.message)}),this.socket.on("message",h=>t(this,void 0,void 0,function*(){var y;this.pending[h.request]&&(!((y=h.data)===null||y===void 0)&&y.error?this.pending[h.request].reject(new Error(h.data.message)):this.pending[h.request].resolve(h.data),delete this.pending[h.request]),yield this.emitter.emit(a.Message,h)})),this.socket.connect()})})}disconnect(){var l;this.socket&&!(!((l=this.socket)===null||l===void 0)&&l.disconnected)&&this.socket.disconnect()}request(l,u){var d;return t(this,void 0,void 0,function*(){if(!(!((d=this.socket)===null||d===void 0)&&d.connected))throw new Error("Client is disconnected");const p=this.random(32),f=new Promise((h,y)=>{this.pending[p]={resolve:h,reject:y}});return this.socket.send({request:p,type:l,data:u}),f})}random(l){const u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let d="";for(let p=0;p<l;p++)d+=u.charAt(Math.floor(Math.random()*u.length));return d}}e.SocketCom=i;var a;(function(c){c.Message="message"})(a=e.SocketComEvents||(e.SocketComEvents={}));class s extends n.Emitter{}e.SocketComEmitter=s})(v$);var xf={},JV=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(xf,"__esModule",{value:!0}),xf.SocketEmitter=void 0;class YV{constructor(){this.listeners={}}on(t,r){const n=this.listeners[t];n?n.push(r):this.listeners[t]=[r]}removeListeners(t){this.listeners[t]=[]}emit(t,r){return JV(this,void 0,void 0,function*(){const n=this.listeners[t];if(n!=null&&n.length){for(const o of n)yield o(r);return!0}else return!1})}}xf.SocketEmitter=YV;var un=We&&We.__awaiter||function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{l(n.next(u))}catch(d){a(d)}}function c(u){try{l(n.throw(u))}catch(d){a(d)}}function l(u){u.done?i(u.value):o(u.value).then(s,c)}l((n=n.apply(e,t||[])).next())})};Object.defineProperty(sf,"__esModule",{value:!0}),sf.MessagingSocket=void 0;const H$=v$,XV=xf;class QV extends XV.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new H$.SocketCom(t.url),this.com.events.on(H$.SocketComEvents.Message,r=>un(this,void 0,void 0,function*(){r.type==="message.new"&&(yield this.emit("message",r.data.message))}))}get creds(){return this._creds}get userId(){var t;return(t=this._creds)===null||t===void 0?void 0:t.userId}get conversationId(){return this._conversationId}connect(t,r){return un(this,void 0,void 0,function*(){const n=r?{userData:JSON.stringify(r)}:void 0,o=yield this.com.connect({clientId:this.clientId,creds:t},n);return o.userId===(t==null?void 0:t.userId)&&!o.userToken&&(o.userToken=t.userToken),this._creds=o,yield this.emit("connect",this._creds),yield this.emit("user",this._creds.userId),o})}disconnect(){return un(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return un(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return un(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.create",{});return(t==null?void 0:t.switch)!==!1&&(yield this.switchConversation(r.id)),r})}startConversation(t){return un(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return un(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return un(this,void 0,void 0,function*(){const r=yield this.request("conversations.delete",{id:t||this._conversationId});return r&&(yield this.switchConversation(void 0)),r})}listConversations(t){return un(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return un(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return un(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return un(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}sf.MessagingSocket=QV,function(e){var t=We&&We.__createBinding||(Object.create?function(n,o,i,a){a===void 0&&(a=i),Object.defineProperty(n,a,{enumerable:!0,get:function(){return o[i]}})}:function(n,o,i,a){a===void 0&&(a=i),n[a]=o[i]}),r=We&&We.__exportStar||function(n,o){for(var i in n)i!=="default"&&!Object.prototype.hasOwnProperty.call(o,i)&&t(o,n,i)};Object.defineProperty(e,"__esModule",{value:!0}),r(Hy,e),r(sf,e)}(u$);class eH{constructor(t){k(this,"socket");k(this,"clientId");k(this,"apiUrl");k(this,"userId");k(this,"conversationId");k(this,"userToken");k(this,"connected",!1);k(this,"emitter");k(this,"on");k(this,"mode","messaging");this.socket=new u$.MessagingSocket(t),this.emitter=new Gm,this.clientId=t.clientId,this.apiUrl=t.url,this.on=this.emitter.on.bind(this.emitter),this.socket.on("message",r=>{const n=r.payload;if(n.type==="trigger")switch(n.trigger.type){case"webchat-visibility":this.emitter.emit("webchatVisibility",n.trigger.visibility);break;case"webchat-config":this.emitter.emit("webchatConfig",n.trigger.config);break;case"custom-event":this.emitter.emit("customEvent",n.trigger.event);break}else{const o=Ed.parse(n),{payload:i,disableInput:a}=zm(o);this.emitter.emit("message",{...r,payload:i,disableInput:a})}}),this.socket.on("conversation",r=>{this.emitter.emit("conversation",r)})}async connect(t,r){if(this.connected)return;this.connected=!0;const n=await this.socket.connect(t,r).catch(o=>{throw this.connected=!1,o});return this.userId=n.userId,this.userToken=n.userToken,n}async disconnect(){await this.socket.disconnect(),this.connected=!1}async getUser(){throw new Error("Get user is not supported in messaging mode")}async updateUser(){throw new Error("Update user is not supported in messaging mode")}async sendFile(t){throw new Error("Send file is not supported in messaging mode")}async sendMessage(t){this.conversationId||await this.newConversation(),await this.socket.sendText(t),this.emitter.emit("messageSent",t)}async sendEvent(t){this.conversationId||await this.newConversation(),await this.socket.sendPayload({type:"trigger",payload:t})}async switchConversation(t){await this.socket.switchConversation(t),this.conversationId=t}async conversationExists(t){return(await this.socket.listConversations()).some(n=>n.id===t)}async newConversation(){const{id:t}=await this.socket.createConversation();await this.socket.startConversation(),this.conversationId=t}async listMessages(t){return(await this.socket.listMessages(t)).map(n=>{const o=Ed.parse(n.payload),{payload:i,disableInput:a}=zm(o);return{...n,payload:i,disableInput:a}})}}function W$(e,t){return function(){return e.apply(t,arguments)}}const{toString:K$}=Object.prototype,{getPrototypeOf:ng}=Object,og=(e=>t=>{const r=K$.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Bo=e=>(e=e.toLowerCase(),t=>og(t)===e),Sf=e=>t=>typeof t===e,{isArray:is}=Array,Vc=Sf("undefined");function tH(e){return e!==null&&!Vc(e)&&e.constructor!==null&&!Vc(e.constructor)&&ia(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const G$=Bo("ArrayBuffer");function rH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&G$(e.buffer),t}const nH=Sf("string"),ia=Sf("function"),J$=Sf("number"),ig=e=>e!==null&&typeof e=="object",oH=e=>e===!0||e===!1,_f=e=>{if(og(e)!=="object")return!1;const t=ng(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},iH=Bo("Date"),aH=Bo("File"),sH=Bo("Blob"),cH=Bo("FileList"),lH=e=>ig(e)&&ia(e.pipe),uH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||K$.call(e)===t||ia(e.toString)&&e.toString()===t)},dH=Bo("URLSearchParams"),fH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Hc(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),is(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let s;for(n=0;n<a;n++)s=i[n],t.call(null,e[s],s,e)}}function Y$(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,o;for(;n-- >0;)if(o=r[n],t===o.toLowerCase())return o;return null}const X$=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Q$=e=>!Vc(e)&&e!==X$;function ag(){const{caseless:e}=Q$(this)&&this||{},t={},r=(n,o)=>{const i=e&&Y$(t,o)||o;_f(t[i])&&_f(n)?t[i]=ag(t[i],n):_f(n)?t[i]=ag({},n):is(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&Hc(arguments[n],r);return t}const pH=(e,t,r,{allOwnKeys:n}={})=>(Hc(t,(o,i)=>{r&&ia(o)?e[i]=W$(o,r):e[i]=o},{allOwnKeys:n}),e),hH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),mH=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},yH=(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],(!n||n(a,e,t))&&!s[a]&&(t[a]=e[a],s[a]=!0);e=r!==!1&&ng(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},gH=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},vH=e=>{if(!e)return null;if(is(e))return e;let t=e.length;if(!J$(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},bH=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ng(Uint8Array)),wH=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let o;for(;(o=n.next())&&!o.done;){const i=o.value;t.call(e,i[0],i[1])}},xH=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},SH=Bo("HTMLFormElement"),_H=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),eO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),EH=Bo("RegExp"),tO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Hc(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},ue={isArray:is,isArrayBuffer:G$,isBuffer:tH,isFormData:uH,isArrayBufferView:rH,isString:nH,isNumber:J$,isBoolean:oH,isObject:ig,isPlainObject:_f,isUndefined:Vc,isDate:iH,isFile:aH,isBlob:sH,isRegExp:EH,isFunction:ia,isStream:lH,isURLSearchParams:dH,isTypedArray:bH,isFileList:cH,forEach:Hc,merge:ag,extend:pH,trim:fH,stripBOM:hH,inherits:mH,toFlatObject:yH,kindOf:og,kindOfTest:Bo,endsWith:gH,toArray:vH,forEachEntry:wH,matchAll:xH,isHTMLForm:SH,hasOwnProperty:eO,hasOwnProp:eO,reduceDescriptors:tO,freezeMethods:e=>{tO(e,(t,r)=>{if(ia(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(ia(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{const r={},n=o=>{o.forEach(i=>{r[i]=!0})};return is(e)?n(e):n(String(e).split(t)),r},toCamelCase:_H,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:Y$,global:X$,isContextDefined:Q$,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(ig(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=is(n)?[]:{};return Hc(n,(a,s)=>{const c=r(a,o+1);!Vc(c)&&(i[s]=c)}),t[o]=void 0,i}}return n};return r(e,0)}};function It(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}ue.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:ue.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const rO=It.prototype,nO={};["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=>{nO[e]={value:e}}),Object.defineProperties(It,nO),Object.defineProperty(rO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(rO);return ue.toFlatObject(e,a,function(c){return c!==Error.prototype},s=>s!=="isAxiosError"),It.call(a,e.message,t,r,n,o),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};var kH=typeof self=="object"?self.FormData:window.FormData;const TH=St(kH);function sg(e){return ue.isPlainObject(e)||ue.isArray(e)}function oO(e){return ue.endsWith(e,"[]")?e.slice(0,-2):e}function iO(e,t,r){return e?e.concat(t).map(function(o,i){return o=oO(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function $H(e){return ue.isArray(e)&&!e.some(sg)}const OH=ue.toFlatObject(ue,{},null,function(t){return/^is[A-Z]/.test(t)});function CH(e){return e&&ue.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Ef(e,t,r){if(!ue.isObject(e))throw new TypeError("target must be an object");t=t||new(TH||FormData),r=ue.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!ue.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&CH(t);if(!ue.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(ue.isDate(h))return h.toISOString();if(!c&&ue.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return ue.isArrayBuffer(h)||ue.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,y,m){let g=h;if(h&&!m&&typeof h=="object"){if(ue.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(ue.isArray(h)&&$H(h)||ue.isFileList(h)||ue.endsWith(y,"[]")&&(g=ue.toArray(h)))return y=oO(y),g.forEach(function(b,x){!(ue.isUndefined(b)||b===null)&&t.append(a===!0?iO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return sg(h)?!0:(t.append(iO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(OH,{defaultVisitor:u,convertValue:l,isVisitable:sg});function f(h,y){if(!ue.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),ue.forEach(h,function(g,v){(!(ue.isUndefined(g)||g===null)&&o.call(t,g,ue.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!ue.isObject(e))throw new TypeError("data must be an object");return f(e),t}function aO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function cg(e,t){this._pairs=[],e&&Ef(e,this,t)}const sO=cg.prototype;sO.append=function(t,r){this._pairs.push([t,r])},sO.toString=function(t){const r=t?function(n){return t.call(this,n,aO)}:aO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function AH(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function cO(e,t,r){if(!t)return e;const n=r&&r.encode||AH,o=r&&r.serialize;let i;if(o?i=o(t,r):i=ue.isURLSearchParams(t)?t.toString():new cg(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class IH{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){ue.forEach(this.handlers,function(n){n!==null&&t(n)})}}const lO=IH,uO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},RH=typeof URLSearchParams<"u"?URLSearchParams:cg,PH=FormData,NH=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),MH=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mo={isBrowser:!0,classes:{URLSearchParams:RH,FormData:PH,Blob},isStandardBrowserEnv:NH,isStandardBrowserWebWorkerEnv:MH,protocols:["http","https","file","blob","url","data"]};function jH(e,t){return Ef(e,new mo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return mo.isNode&&ue.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function DH(e){return ue.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function LH(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}function dO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&ue.isArray(o)?o.length:a,c?(ue.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!ue.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&ue.isArray(o[a])&&(o[a]=LH(o[a])),!s)}if(ue.isFormData(e)&&ue.isFunction(e.entries)){const r={};return ue.forEachEntry(e,(n,o)=>{t(DH(n),o,r,0)}),r}return null}const FH={"Content-Type":void 0};function qH(e,t,r){if(ue.isString(e))try{return(t||JSON.parse)(e),ue.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const kf={transitional:uO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=ue.isObject(t);if(i&&ue.isHTMLForm(t)&&(t=new FormData(t)),ue.isFormData(t))return o&&o?JSON.stringify(dO(t)):t;if(ue.isArrayBuffer(t)||ue.isBuffer(t)||ue.isStream(t)||ue.isFile(t)||ue.isBlob(t))return t;if(ue.isArrayBufferView(t))return t.buffer;if(ue.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let s;if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1)return jH(t,this.formSerializer).toString();if((s=ue.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Ef(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),qH(t)):t}],transformResponse:[function(t){const r=this.transitional||kf.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&ue.isString(t)&&(n&&!this.responseType||o)){const a=!(r&&r.silentJSONParsing)&&o;try{return JSON.parse(t)}catch(s){if(a)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:mo.classes.FormData,Blob:mo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};ue.forEach(["delete","get","head"],function(t){kf.headers[t]={}}),ue.forEach(["post","put","patch"],function(t){kf.headers[t]=ue.merge(FH)});const lg=kf,BH=ue.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"]),UH=e=>{const t={};let r,n,o;return e&&e.split(`
131
131
  `).forEach(function(a){o=a.indexOf(":"),r=a.substring(0,o).trim().toLowerCase(),n=a.substring(o+1).trim(),!(!r||t[r]&&BH[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},fO=Symbol("internals");function Wc(e){return e&&String(e).trim().toLowerCase()}function Tf(e){return e===!1||e==null?e:ue.isArray(e)?e.map(Tf):String(e)}function zH(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}function ZH(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function pO(e,t,r,n){if(ue.isFunction(n))return n.call(this,t,r);if(ue.isString(t)){if(ue.isString(n))return t.indexOf(n)!==-1;if(ue.isRegExp(n))return n.test(t)}}function VH(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function HH(e,t){const r=ue.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(o,i,a){return this[n].call(this,t,o,i,a)},configurable:!0})})}class $f{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(s,c,l){const u=Wc(c);if(!u)throw new Error("header name must be a non-empty string");const d=ue.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Tf(s))}const a=(s,c)=>ue.forEach(s,(l,u)=>i(l,u,c));return ue.isPlainObject(t)||t instanceof this.constructor?a(t,r):ue.isString(t)&&(t=t.trim())&&!ZH(t)?a(UH(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=Wc(t),t){const n=ue.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return zH(o);if(ue.isFunction(r))return r.call(this,o,n);if(ue.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Wc(t),t){const n=ue.findKey(this,t);return!!(n&&(!r||pO(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(a){if(a=Wc(a),a){const s=ue.findKey(n,a);s&&(!r||pO(n,n[s],s,r))&&(delete n[s],o=!0)}}return ue.isArray(t)?t.forEach(i):i(t),o}clear(){return Object.keys(this).forEach(this.delete.bind(this))}normalize(t){const r=this,n={};return ue.forEach(this,(o,i)=>{const a=ue.findKey(n,i);if(a){r[a]=Tf(o),delete r[i];return}const s=t?VH(i):String(i).trim();s!==i&&delete r[i],r[s]=Tf(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return ue.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&ue.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
132
- `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[fO]=this[fO]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Wc(a);n[s]||(HH(o,a),n[s]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}}$f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ue.freezeMethods($f.prototype),ue.freezeMethods($f);const Uo=$f;function ug(e,t){const r=this||lg,n=t||r,o=Uo.from(n.headers);let i=n.data;return ue.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function hO(e){return!!(e&&e.__CANCEL__)}function Kc(e,t,r){It.call(this,e??"canceled",It.ERR_CANCELED,t,r),this.name="CanceledError"}ue.inherits(Kc,It,{__CANCEL__:!0});const WH=null;function KH(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new It("Request failed with status code "+r.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const GH=mo.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,a,s){const c=[];c.push(r+"="+encodeURIComponent(n)),ue.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),ue.isString(i)&&c.push("path="+i),ue.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function JH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function mO(e,t){return e&&!JH(t)?YH(e,t):t}const XH=mo.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(a){const s=ue.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function QH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eW(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[i];a||(a=l),r[o]=c,n[o]=l;let d=i,p=0;for(;d!==o;)p+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const f=u&&l-u;return f?Math.round(p*1e3/f):void 0}}function yO(e,t){let r=0;const n=eW(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s),l=i<=a;r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const Of={http:WH,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let o=e.data;const i=Uo.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ue.isFormData(o)&&(mo.isStandardBrowserEnv||mo.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(f+":"+h))}const u=mO(e.baseURL,e.url);l.open(e.method.toUpperCase(),cO(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;const f=Uo.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),y={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:e,request:l};KH(function(g){r(g),c()},function(g){n(g),c()},y),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(n(new It("Request aborted",It.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new It("Network Error",It.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||uO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new It(h,y.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,l)),l=null},mo.isStandardBrowserEnv){const f=(e.withCredentials||XH(u))&&e.xsrfCookieName&&GH.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&ue.forEach(i.toJSON(),function(h,y){l.setRequestHeader(y,h)}),ue.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",yO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",yO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{l&&(n(!f||f.type?new Kc(null,e,l):f),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=QH(u);if(p&&mo.protocols.indexOf(p)===-1){n(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};ue.forEach(Of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tW={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=ue.isString(r)?Of[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new It(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ue.hasOwnProp(Of,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!ue.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Of};function dg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kc(null,e)}function gO(e){return dg(e),e.headers=Uo.from(e.headers),e.data=ug.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tW.getAdapter(e.adapter||lg.adapter)(e).then(function(n){return dg(e),n.data=ug.call(e,e.transformResponse,n),n.headers=Uo.from(n.headers),n},function(n){return hO(n)||(dg(e),n&&n.response&&(n.response.data=ug.call(e,e.transformResponse,n.response),n.response.headers=Uo.from(n.response.headers))),Promise.reject(n)})}const vO=e=>e instanceof Uo?e.toJSON():e;function as(e,t){t=t||{};const r={};function n(l,u,d){return ue.isPlainObject(l)&&ue.isPlainObject(u)?ue.merge.call({caseless:d},l,u):ue.isPlainObject(u)?ue.merge({},u):ue.isArray(u)?u.slice():u}function o(l,u,d){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!ue.isUndefined(u))return n(void 0,u)}function a(l,u){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(vO(l),vO(u),!0)};return ue.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);ue.isUndefined(p)&&d!==s||(r[u]=p)}),r}const bO="1.2.5",fg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fg[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wO={};fg.transitional=function(t,r,n){function o(i,a){return"[Axios v"+bO+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new It(o(a," has been removed"+(r?" in "+r:"")),It.ERR_DEPRECATED);return r&&!wO[a]&&(wO[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):!0}};function rW(e,t,r){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new It("option "+i+" must be "+c,It.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new It("Unknown option "+i,It.ERR_BAD_OPTION)}}const pg={assertOptions:rW,validators:fg},yi=pg.validators;class Cf{constructor(t){this.defaults=t,this.interceptors={request:new lO,response:new lO}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=as(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&pg.assertOptions(n,{silentJSONParsing:yi.transitional(yi.boolean),forcedJSONParsing:yi.transitional(yi.boolean),clarifyTimeoutError:yi.transitional(yi.boolean)},!1),o!==void 0&&pg.assertOptions(o,{encode:yi.function,serialize:yi.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a;a=i&&ue.merge(i.common,i[r.method]),a&&ue.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Uo.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,p;if(!c){const h=[gO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(r);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=r;for(d=0;d<p;){const h=s[d++],y=s[d++];try{f=h(f)}catch(m){y.call(this,m);break}}try{u=gO.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=as(this.defaults,t);const r=mO(t.baseURL,t.url);return cO(r,t.params,t.paramsSerializer)}}ue.forEach(["delete","get","head","options"],function(t){Cf.prototype[t]=function(r,n){return this.request(as(n||{},{method:t,url:r,data:(n||{}).data}))}}),ue.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(as(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Cf.prototype[t]=r(),Cf.prototype[t+"Form"]=r(!0)});const Af=Cf;class hg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new Kc(i,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new hg(function(o){t=o}),cancel:t}}}const nW=hg;function oW(e){return function(r){return e.apply(null,r)}}function iW(e){return ue.isObject(e)&&e.isAxiosError===!0}const mg={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(mg).forEach(([e,t])=>{mg[t]=e});const aW=mg;function xO(e){const t=new Af(e),r=W$(Af.prototype.request,t);return ue.extend(r,Af.prototype,t,{allOwnKeys:!0}),ue.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return xO(as(e,o))},r}const wr=xO(lg);wr.Axios=Af,wr.CanceledError=Kc,wr.CancelToken=nW,wr.isCancel=hO,wr.VERSION=bO,wr.toFormData=Ef,wr.AxiosError=It,wr.Cancel=wr.CanceledError,wr.all=function(t){return Promise.all(t)},wr.spread=oW,wr.isAxiosError=iW,wr.mergeConfig=as,wr.AxiosHeaders=Uo,wr.formToJSON=e=>dO(ue.isHTMLForm(e)?new FormData(e):e),wr.HttpStatusCode=aW,wr.default=wr;const SO=wr,sW={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let yg=typeof window<"u"&&typeof window.document<"u"?window.crypto:nm;yg.getRandomValues||(yg=sW);class Zt extends Error{constructor(r,n,o,i,a,s){super(i);k(this,"isApiError",!0);this.code=r,this.description=n,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=Zt.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 r=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(yg.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${r}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const cW=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,gg=e=>e instanceof Zt||cW(e)&&e.isApiError===!0;class Gc extends Zt{constructor(t,r,n){super(500,"An unknown error occurred","Unknown",t,r,n)}}class lW extends Zt{constructor(t,r,n){super(500,"An internal error occurred","Internal",t,r,n)}}class uW extends Zt{constructor(t,r,n){super(401,"The request requires to be authenticated.","Unauthorized",t,r,n)}}class dW extends Zt{constructor(t,r,n){super(403,"The requested action can't be peform by this resource.","Forbidden",t,r,n)}}class fW extends Zt{constructor(t,r,n){super(413,"The request payload is too large.","PayloadTooLarge",t,r,n)}}class pW extends Zt{constructor(t,r,n){super(400,"The request payload is invalid.","InvalidPayload",t,r,n)}}class hW extends Zt{constructor(t,r,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,r,n)}}class mW extends Zt{constructor(t,r,n){super(405,"The requested method does not exist.","MethodNotFound",t,r,n)}}class yW extends Zt{constructor(t,r,n){super(404,"The requested resource does not exist.","ResourceNotFound",t,r,n)}}class gW extends Zt{constructor(t,r,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,r,n)}}class vW extends Zt{constructor(t,r,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,r,n)}}class bW extends Zt{constructor(t,r,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",t,r,n)}}class wW extends Zt{constructor(t,r,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",t,r,n)}}class xW extends Zt{constructor(t,r,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,r,n)}}class SW extends Zt{constructor(t,r,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,r,n)}}class _W extends Zt{constructor(t,r,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",t,r,n)}}class EW extends Zt{constructor(t,r,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,r,n)}}class kW extends Zt{constructor(t,r,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,r,n)}}class TW extends Zt{constructor(t,r,n){super(409,"The record attempted to be created already exists.","AlreadyExists",t,r,n)}}class $W extends Zt{constructor(t,r,n){super(429,"The request has been rate limited.","RateLimited",t,r,n)}}class OW extends Zt{constructor(t,r,n){super(402,"A payment is required to perform this request.","PaymentRequired",t,r,n)}}class CW extends Zt{constructor(t,r,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,r,n)}}class AW extends Zt{constructor(t,r,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,r,n)}}class IW extends Zt{constructor(t,r,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,r,n)}}const RW={Unknown:Gc,Internal:lW,Unauthorized:uW,Forbidden:dW,PayloadTooLarge:fW,InvalidPayload:pW,UnsupportedMediaType:hW,MethodNotFound:mW,ResourceNotFound:yW,InvalidJsonSchema:gW,InvalidDataFormat:vW,InvalidIdentifier:bW,RelationConflict:wW,ReferenceConstraint:xW,ResourceLockedConflict:SW,ReferenceNotFound:_W,InvalidQuery:EW,Runtime:kW,AlreadyExists:TW,RateLimited:$W,PaymentRequired:OW,QuotaExceeded:CW,LimitExceeded:AW,BreakingChanges:IW},_O=e=>gg(e)?e:e instanceof Error?new Gc(e.message,e):typeof e=="string"?new Gc(e):PW(e);function PW(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=RW[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Gc(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Gc("An invalid error occurred: "+JSON.stringify(e))}var NW=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0},EO=typeof Symbol<"u"&&Symbol,MW=NW,jW=function(){return typeof EO!="function"||typeof Symbol!="function"||typeof EO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:MW()},kO={foo:{}},DW=Object,LW=function(){return{__proto__:kO}.foo===kO.foo&&!({__proto__:null}instanceof DW)},FW="Function.prototype.bind called on incompatible ",qW=Object.prototype.toString,BW=Math.max,UW="[object Function]",TO=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},zW=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},ZW=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},VW=function(t){var r=this;if(typeof r!="function"||qW.apply(r)!==UW)throw new TypeError(FW+r);for(var n=zW(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,TO(n,arguments));return Object(u)===u?u:this}return r.apply(t,TO(n,arguments))},a=BW(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+ZW(s,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var l=function(){};l.prototype=r.prototype,o.prototype=new l,l.prototype=null}return o},HW=VW,vg=Function.prototype.bind||HW,WW=vg,KW=WW.call(Function.call,Object.prototype.hasOwnProperty),Et,ss=SyntaxError,$O=Function,cs=TypeError,bg=function(e){try{return $O('"use strict"; return ('+e+").constructor;")()}catch{}},aa=Object.getOwnPropertyDescriptor;if(aa)try{aa({},"")}catch{aa=null}var wg=function(){throw new cs},GW=aa?function(){try{return arguments.callee,wg}catch{try{return aa(arguments,"callee").get}catch{return wg}}}():wg,ls=jW(),JW=LW(),$r=Object.getPrototypeOf||(JW?function(e){return e.__proto__}:null),us={},YW=typeof Uint8Array>"u"||!$r?Et:$r(Uint8Array),sa={"%AggregateError%":typeof AggregateError>"u"?Et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Et:ArrayBuffer,"%ArrayIteratorPrototype%":ls&&$r?$r([][Symbol.iterator]()):Et,"%AsyncFromSyncIteratorPrototype%":Et,"%AsyncFunction%":us,"%AsyncGenerator%":us,"%AsyncGeneratorFunction%":us,"%AsyncIteratorPrototype%":us,"%Atomics%":typeof Atomics>"u"?Et:Atomics,"%BigInt%":typeof BigInt>"u"?Et:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Et:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Et:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Et:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Et:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Et:FinalizationRegistry,"%Function%":$O,"%GeneratorFunction%":us,"%Int8Array%":typeof Int8Array>"u"?Et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ls&&$r?$r($r([][Symbol.iterator]())):Et,"%JSON%":typeof JSON=="object"?JSON:Et,"%Map%":typeof Map>"u"?Et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ls||!$r?Et:$r(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Et:Promise,"%Proxy%":typeof Proxy>"u"?Et:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Et:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Et:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ls||!$r?Et:$r(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ls&&$r?$r(""[Symbol.iterator]()):Et,"%Symbol%":ls?Symbol:Et,"%SyntaxError%":ss,"%ThrowTypeError%":GW,"%TypedArray%":YW,"%TypeError%":cs,"%Uint8Array%":typeof Uint8Array>"u"?Et:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Et:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Et:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Et:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Et:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Et:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Et:WeakSet};if($r)try{null.error}catch(e){var XW=$r($r(e));sa["%Error.prototype%"]=XW}var QW=function e(t){var r;if(t==="%AsyncFunction%")r=bg("async function () {}");else if(t==="%GeneratorFunction%")r=bg("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=bg("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&$r&&(r=$r(o.prototype))}return sa[t]=r,r},OO={"%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"]},Jc=vg,If=KW,eK=Jc.call(Function.call,Array.prototype.concat),tK=Jc.call(Function.apply,Array.prototype.splice),CO=Jc.call(Function.call,String.prototype.replace),Rf=Jc.call(Function.call,String.prototype.slice),rK=Jc.call(Function.call,RegExp.prototype.exec),nK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oK=/\\(\\)?/g,iK=function(t){var r=Rf(t,0,1),n=Rf(t,-1);if(r==="%"&&n!=="%")throw new ss("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ss("invalid intrinsic syntax, expected opening `%`");var o=[];return CO(t,nK,function(i,a,s,c){o[o.length]=s?CO(c,oK,"$1"):a||i}),o},aK=function(t,r){var n=t,o;if(If(OO,n)&&(o=OO[n],n="%"+o[0]+"%"),If(sa,n)){var i=sa[n];if(i===us&&(i=QW(n)),typeof i>"u"&&!r)throw new cs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ss("intrinsic "+t+" does not exist!")},xg=function(t,r){if(typeof t!="string"||t.length===0)throw new cs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cs('"allowMissing" argument must be a boolean');if(rK(/^%?[^%]*%?$/,t)===null)throw new ss("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=iK(t),o=n.length>0?n[0]:"",i=aK("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],tK(n,eK([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Rf(p,0,1),h=Rf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new ss("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",If(sa,a))s=sa[a];else if(s!=null){if(!(p in s)){if(!r)throw new cs("base intrinsic for "+t+" exists, but the property is not available.");return}if(aa&&u+1>=n.length){var y=aa(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=If(s,p),s=s[p];d&&!c&&(sa[a]=s)}}return s},AO={exports:{}};(function(e){var t=vg,r=xg,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var p=i(t,o,arguments);if(a&&s){var f=a(p,"length");f.configurable&&s(p,"length",{value:1+c(0,d.length-(arguments.length-1))})}return p};var l=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(AO);var sK=AO.exports,IO=xg,RO=sK,cK=RO(IO("String.prototype.indexOf")),lK=function(t,r){var n=IO(t,!!r);return typeof n=="function"&&cK(t,".prototype.")>-1?RO(n):n},Sg=typeof Map=="function"&&Map.prototype,_g=Object.getOwnPropertyDescriptor&&Sg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pf=Sg&&_g&&typeof _g.get=="function"?_g.get:null,PO=Sg&&Map.prototype.forEach,Eg=typeof Set=="function"&&Set.prototype,kg=Object.getOwnPropertyDescriptor&&Eg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Nf=Eg&&kg&&typeof kg.get=="function"?kg.get:null,NO=Eg&&Set.prototype.forEach,uK=typeof WeakMap=="function"&&WeakMap.prototype,Yc=uK?WeakMap.prototype.has:null,dK=typeof WeakSet=="function"&&WeakSet.prototype,Xc=dK?WeakSet.prototype.has:null,fK=typeof WeakRef=="function"&&WeakRef.prototype,MO=fK?WeakRef.prototype.deref:null,pK=Boolean.prototype.valueOf,hK=Object.prototype.toString,mK=Function.prototype.toString,yK=String.prototype.match,Tg=String.prototype.slice,gi=String.prototype.replace,gK=String.prototype.toUpperCase,jO=String.prototype.toLowerCase,DO=RegExp.prototype.test,LO=Array.prototype.concat,yo=Array.prototype.join,vK=Array.prototype.slice,FO=Math.floor,$g=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Og=Object.getOwnPropertySymbols,Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ds=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ds||"symbol")?Symbol.toStringTag:null,qO=Object.prototype.propertyIsEnumerable,BO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function UO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||DO.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-FO(-e):FO(e);if(n!==e){var o=String(n),i=Tg.call(t,o.length+1);return gi.call(o,r,"$&_")+"."+gi.call(gi.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gi.call(t,r,"$&_")}var Ag=om,zO=Ag.custom,ZO=WO(zO)?zO:null,bK=function e(t,r,n,o){var i=r||{};if(vi(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(vi(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=vi(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(vi(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(vi(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.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 GO(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?UO(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?UO(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return Ig(t)?"[Array]":"[Object]";var d=DK(i,n);if(typeof o>"u")o=[];else if(KO(o,t)>=0)return"[Circular]";function p(Z,B,F){if(B&&(o=vK.call(o),o.push(B)),F){var j={depth:i.depth};return vi(i,"quoteStyle")&&(j.quoteStyle=i.quoteStyle),e(Z,j,n+1,o)}return e(Z,i,n+1,o)}if(typeof t=="function"&&!HO(t)){var f=OK(t),h=Mf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+yo.call(h,", ")+" }":"")}if(WO(t)){var y=ds?gi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Cg.call(t);return typeof t=="object"&&!ds?Qc(y):y}if(NK(t)){for(var m="<"+jO.call(String(t.nodeName)),g=t.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+VO(wK(g[v].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+jO.call(String(t.nodeName))+">",m}if(Ig(t)){if(t.length===0)return"[]";var b=Mf(t,p);return d&&!jK(b)?"["+Pg(b,d)+"]":"[ "+yo.call(b,", ")+" ]"}if(SK(t)){var x=Mf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!qO.call(t,"cause")?"{ ["+String(t)+"] "+yo.call(LO.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yo.call(x,", ")+" }"}if(typeof t=="object"&&a){if(ZO&&typeof t[ZO]=="function"&&Ag)return Ag(t,{depth:u-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(CK(t)){var w=[];return PO&&PO.call(t,function(Z,B){w.push(p(B,t,!0)+" => "+p(Z,t))}),JO("Map",Pf.call(t),w,d)}if(RK(t)){var S=[];return NO&&NO.call(t,function(Z){S.push(p(Z,t))}),JO("Set",Nf.call(t),S,d)}if(AK(t))return Rg("WeakMap");if(PK(t))return Rg("WeakSet");if(IK(t))return Rg("WeakRef");if(EK(t))return Qc(p(Number(t)));if(TK(t))return Qc(p($g.call(t)));if(kK(t))return Qc(pK.call(t));if(_K(t))return Qc(p(String(t)));if(!xK(t)&&!HO(t)){var C=Mf(t,p),I=BO?BO(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",A=!I&&Gr&&Object(t)===t&&Gr in t?Tg.call(bi(t),8,-1):P?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",W=L+(A||P?"["+yo.call(LO.call([],A||[],P||[]),": ")+"] ":"");return C.length===0?W+"{}":d?W+"{"+Pg(C,d)+"}":W+"{ "+yo.call(C,", ")+" }"}return String(t)};function VO(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function wK(e){return gi.call(String(e),/"/g,"&quot;")}function Ig(e){return bi(e)==="[object Array]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function xK(e){return bi(e)==="[object Date]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function HO(e){return bi(e)==="[object RegExp]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function SK(e){return bi(e)==="[object Error]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function _K(e){return bi(e)==="[object String]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function EK(e){return bi(e)==="[object Number]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function kK(e){return bi(e)==="[object Boolean]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function WO(e){if(ds)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Cg)return!1;try{return Cg.call(e),!0}catch{}return!1}function TK(e){if(!e||typeof e!="object"||!$g)return!1;try{return $g.call(e),!0}catch{}return!1}var $K=Object.prototype.hasOwnProperty||function(e){return e in this};function vi(e,t){return $K.call(e,t)}function bi(e){return hK.call(e)}function OK(e){if(e.name)return e.name;var t=yK.call(mK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function KO(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function CK(e){if(!Pf||!e||typeof e!="object")return!1;try{Pf.call(e);try{Nf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AK(e){if(!Yc||!e||typeof e!="object")return!1;try{Yc.call(e,Yc);try{Xc.call(e,Xc)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function IK(e){if(!MO||!e||typeof e!="object")return!1;try{return MO.call(e),!0}catch{}return!1}function RK(e){if(!Nf||!e||typeof e!="object")return!1;try{Nf.call(e);try{Pf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function PK(e){if(!Xc||!e||typeof e!="object")return!1;try{Xc.call(e,Xc);try{Yc.call(e,Yc)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function NK(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function GO(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return GO(Tg.call(e,0,t.maxStringLength),t)+n}var o=gi.call(gi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,MK);return VO(o,"single",t)}function MK(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+gK.call(t.toString(16))}function Qc(e){return"Object("+e+")"}function Rg(e){return e+" { ? }"}function JO(e,t,r,n){var o=n?Pg(r,n):yo.call(r,", ");return e+" ("+t+") {"+o+"}"}function jK(e){for(var t=0;t<e.length;t++)if(KO(e[t],`
132
+ `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(o=>n.set(o)),n}static accessor(t){const n=(this[fO]=this[fO]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=Wc(a);n[s]||(HH(o,a),n[s]=!0)}return ue.isArray(t)?t.forEach(i):i(t),this}}$f.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),ue.freezeMethods($f.prototype),ue.freezeMethods($f);const Uo=$f;function ug(e,t){const r=this||lg,n=t||r,o=Uo.from(n.headers);let i=n.data;return ue.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function hO(e){return!!(e&&e.__CANCEL__)}function Kc(e,t,r){It.call(this,e??"canceled",It.ERR_CANCELED,t,r),this.name="CanceledError"}ue.inherits(Kc,It,{__CANCEL__:!0});const WH=null;function KH(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new It("Request failed with status code "+r.status,[It.ERR_BAD_REQUEST,It.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}const GH=mo.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,a,s){const c=[];c.push(r+"="+encodeURIComponent(n)),ue.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),ue.isString(i)&&c.push("path="+i),ue.isString(a)&&c.push("domain="+a),s===!0&&c.push("secure"),document.cookie=c.join("; ")},read:function(r){const n=document.cookie.match(new RegExp("(^|;\\s*)("+r+")=([^;]*)"));return n?decodeURIComponent(n[3]):null},remove:function(r){this.write(r,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function JH(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YH(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function mO(e,t){return e&&!JH(t)?YH(e,t):t}const XH=mo.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");let n;function o(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return n=o(window.location.href),function(a){const s=ue.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function QH(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eW(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o=0,i=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[i];a||(a=l),r[o]=c,n[o]=l;let d=i,p=0;for(;d!==o;)p+=r[d++],d=d%e;if(o=(o+1)%e,o===i&&(i=(i+1)%e),l-a<t)return;const f=u&&l-u;return f?Math.round(p*1e3/f):void 0}}function yO(e,t){let r=0;const n=eW(50,250);return o=>{const i=o.loaded,a=o.lengthComputable?o.total:void 0,s=i-r,c=n(s),l=i<=a;r=i;const u={loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&l?(a-i)/c:void 0,event:o};u[t?"download":"upload"]=!0,e(u)}}const Of={http:WH,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let o=e.data;const i=Uo.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}ue.isFormData(o)&&(mo.isStandardBrowserEnv||mo.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const f=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(f+":"+h))}const u=mO(e.baseURL,e.url);l.open(e.method.toUpperCase(),cO(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;const f=Uo.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders()),y={data:!a||a==="text"||a==="json"?l.responseText:l.response,status:l.status,statusText:l.statusText,headers:f,config:e,request:l};KH(function(g){r(g),c()},function(g){n(g),c()},y),l=null}if("onloadend"in l?l.onloadend=d:l.onreadystatechange=function(){!l||l.readyState!==4||l.status===0&&!(l.responseURL&&l.responseURL.indexOf("file:")===0)||setTimeout(d)},l.onabort=function(){l&&(n(new It("Request aborted",It.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new It("Network Error",It.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const y=e.transitional||uO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new It(h,y.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,l)),l=null},mo.isStandardBrowserEnv){const f=(e.withCredentials||XH(u))&&e.xsrfCookieName&&GH.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&ue.forEach(i.toJSON(),function(h,y){l.setRequestHeader(y,h)}),ue.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",yO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",yO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{l&&(n(!f||f.type?new Kc(null,e,l):f),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=QH(u);if(p&&mo.protocols.indexOf(p)===-1){n(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};ue.forEach(Of,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const tW={getAdapter:e=>{e=ue.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=ue.isString(r)?Of[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new It(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(ue.hasOwnProp(Of,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!ue.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Of};function dg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Kc(null,e)}function gO(e){return dg(e),e.headers=Uo.from(e.headers),e.data=ug.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tW.getAdapter(e.adapter||lg.adapter)(e).then(function(n){return dg(e),n.data=ug.call(e,e.transformResponse,n),n.headers=Uo.from(n.headers),n},function(n){return hO(n)||(dg(e),n&&n.response&&(n.response.data=ug.call(e,e.transformResponse,n.response),n.response.headers=Uo.from(n.response.headers))),Promise.reject(n)})}const vO=e=>e instanceof Uo?e.toJSON():e;function as(e,t){t=t||{};const r={};function n(l,u,d){return ue.isPlainObject(l)&&ue.isPlainObject(u)?ue.merge.call({caseless:d},l,u):ue.isPlainObject(u)?ue.merge({},u):ue.isArray(u)?u.slice():u}function o(l,u,d){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!ue.isUndefined(u))return n(void 0,u)}function a(l,u){if(ue.isUndefined(u)){if(!ue.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function s(l,u,d){if(d in t)return n(l,u);if(d in e)return n(void 0,l)}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(l,u)=>o(vO(l),vO(u),!0)};return ue.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);ue.isUndefined(p)&&d!==s||(r[u]=p)}),r}const bO="1.2.5",fg={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{fg[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const wO={};fg.transitional=function(t,r,n){function o(i,a){return"[Axios v"+bO+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new It(o(a," has been removed"+(r?" in "+r:"")),It.ERR_DEPRECATED);return r&&!wO[a]&&(wO[a]=!0,console.warn(o(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,s):!0}};function rW(e,t,r){if(typeof e!="object")throw new It("options must be an object",It.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const s=e[i],c=s===void 0||a(s,i,e);if(c!==!0)throw new It("option "+i+" must be "+c,It.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new It("Unknown option "+i,It.ERR_BAD_OPTION)}}const pg={assertOptions:rW,validators:fg},yi=pg.validators;class Cf{constructor(t){this.defaults=t,this.interceptors={request:new lO,response:new lO}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=as(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&pg.assertOptions(n,{silentJSONParsing:yi.transitional(yi.boolean),forcedJSONParsing:yi.transitional(yi.boolean),clarifyTimeoutError:yi.transitional(yi.boolean)},!1),o!==void 0&&pg.assertOptions(o,{encode:yi.function,serialize:yi.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a;a=i&&ue.merge(i.common,i[r.method]),a&&ue.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Uo.concat(a,i);const s=[];let c=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(c=c&&y.synchronous,s.unshift(y.fulfilled,y.rejected))});const l=[];this.interceptors.response.forEach(function(y){l.push(y.fulfilled,y.rejected)});let u,d=0,p;if(!c){const h=[gO.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,l),p=h.length,u=Promise.resolve(r);d<p;)u=u.then(h[d++],h[d++]);return u}p=s.length;let f=r;for(d=0;d<p;){const h=s[d++],y=s[d++];try{f=h(f)}catch(m){y.call(this,m);break}}try{u=gO.call(this,f)}catch(h){return Promise.reject(h)}for(d=0,p=l.length;d<p;)u=u.then(l[d++],l[d++]);return u}getUri(t){t=as(this.defaults,t);const r=mO(t.baseURL,t.url);return cO(r,t.params,t.paramsSerializer)}}ue.forEach(["delete","get","head","options"],function(t){Cf.prototype[t]=function(r,n){return this.request(as(n||{},{method:t,url:r,data:(n||{}).data}))}}),ue.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(as(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Cf.prototype[t]=r(),Cf.prototype[t+"Form"]=r(!0)});const Af=Cf;class hg{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const n=this;this.promise.then(o=>{if(!n._listeners)return;let i=n._listeners.length;for(;i-- >0;)n._listeners[i](o);n._listeners=null}),this.promise.then=o=>{let i;const a=new Promise(s=>{n.subscribe(s),i=s}).then(o);return a.cancel=function(){n.unsubscribe(i)},a},t(function(i,a,s){n.reason||(n.reason=new Kc(i,a,s),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}static source(){let t;return{token:new hg(function(o){t=o}),cancel:t}}}const nW=hg;function oW(e){return function(r){return e.apply(null,r)}}function iW(e){return ue.isObject(e)&&e.isAxiosError===!0}const mg={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(mg).forEach(([e,t])=>{mg[t]=e});const aW=mg;function xO(e){const t=new Af(e),r=W$(Af.prototype.request,t);return ue.extend(r,Af.prototype,t,{allOwnKeys:!0}),ue.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return xO(as(e,o))},r}const wr=xO(lg);wr.Axios=Af,wr.CanceledError=Kc,wr.CancelToken=nW,wr.isCancel=hO,wr.VERSION=bO,wr.toFormData=Ef,wr.AxiosError=It,wr.Cancel=wr.CanceledError,wr.all=function(t){return Promise.all(t)},wr.spread=oW,wr.isAxiosError=iW,wr.mergeConfig=as,wr.AxiosHeaders=Uo,wr.formToJSON=e=>dO(ue.isHTMLForm(e)?new FormData(e):e),wr.HttpStatusCode=aW,wr.default=wr;const SO=wr,sW={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let yg=typeof window<"u"&&typeof window.document<"u"?window.crypto:nm;yg.getRandomValues||(yg=sW);class Zt extends Error{constructor(r,n,o,i,a,s){super(i);k(this,"isApiError",!0);this.code=r,this.description=n,this.type=o,this.message=i,this.error=a,this.id=s,this.id||(this.id=Zt.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 r=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(yg.getRandomValues(new Uint8Array(o))).map(a=>a.toString(16).padStart(2,"0")).join("").toUpperCase();return`${r}_${n}x${i}`}static getPrefix(){return typeof window<"u"&&typeof window.document<"u"?"err_bwsr":"err"}}const cW=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,gg=e=>e instanceof Zt||cW(e)&&e.isApiError===!0;class Gc extends Zt{constructor(t,r,n){super(500,"An unknown error occurred","Unknown",t,r,n)}}class lW extends Zt{constructor(t,r,n){super(500,"An internal error occurred","Internal",t,r,n)}}class uW extends Zt{constructor(t,r,n){super(401,"The request requires to be authenticated.","Unauthorized",t,r,n)}}class dW extends Zt{constructor(t,r,n){super(403,"The requested action can't be peform by this resource.","Forbidden",t,r,n)}}class fW extends Zt{constructor(t,r,n){super(413,"The request payload is too large.","PayloadTooLarge",t,r,n)}}class pW extends Zt{constructor(t,r,n){super(400,"The request payload is invalid.","InvalidPayload",t,r,n)}}class hW extends Zt{constructor(t,r,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,r,n)}}class mW extends Zt{constructor(t,r,n){super(405,"The requested method does not exist.","MethodNotFound",t,r,n)}}class yW extends Zt{constructor(t,r,n){super(404,"The requested resource does not exist.","ResourceNotFound",t,r,n)}}class gW extends Zt{constructor(t,r,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,r,n)}}class vW extends Zt{constructor(t,r,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,r,n)}}class bW extends Zt{constructor(t,r,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",t,r,n)}}class wW extends Zt{constructor(t,r,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",t,r,n)}}class xW extends Zt{constructor(t,r,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,r,n)}}class SW extends Zt{constructor(t,r,n){super(409,"The resource is current locked and cannot be operated on until the lock is released.","ResourceLockedConflict",t,r,n)}}class _W extends Zt{constructor(t,r,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",t,r,n)}}class EW extends Zt{constructor(t,r,n){super(400,"The provided query is invalid. This is usually caused when providing an invalid parameter for querying a resource.","InvalidQuery",t,r,n)}}class kW extends Zt{constructor(t,r,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,r,n)}}class TW extends Zt{constructor(t,r,n){super(409,"The record attempted to be created already exists.","AlreadyExists",t,r,n)}}class $W extends Zt{constructor(t,r,n){super(429,"The request has been rate limited.","RateLimited",t,r,n)}}class OW extends Zt{constructor(t,r,n){super(402,"A payment is required to perform this request.","PaymentRequired",t,r,n)}}class CW extends Zt{constructor(t,r,n){super(403,"The request exceeds the allowed quota. Quotas are a soft limit that can be increased.","QuotaExceeded",t,r,n)}}class AW extends Zt{constructor(t,r,n){super(413,"The request exceeds the allowed limit. Limits are a hard limit that cannot be increased.","LimitExceeded",t,r,n)}}class IW extends Zt{constructor(t,r,n){super(400,"Request payload contains breaking changes which is not allowed for this resource without a version increment.","BreakingChanges",t,r,n)}}const RW={Unknown:Gc,Internal:lW,Unauthorized:uW,Forbidden:dW,PayloadTooLarge:fW,InvalidPayload:pW,UnsupportedMediaType:hW,MethodNotFound:mW,ResourceNotFound:yW,InvalidJsonSchema:gW,InvalidDataFormat:vW,InvalidIdentifier:bW,RelationConflict:wW,ReferenceConstraint:xW,ResourceLockedConflict:SW,ReferenceNotFound:_W,InvalidQuery:EW,Runtime:kW,AlreadyExists:TW,RateLimited:$W,PaymentRequired:OW,QuotaExceeded:CW,LimitExceeded:AW,BreakingChanges:IW},_O=e=>gg(e)?e:e instanceof Error?new Gc(e.message,e):typeof e=="string"?new Gc(e):PW(e);function PW(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=RW[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new Gc(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new Gc("An invalid error occurred: "+JSON.stringify(e))}var NW=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(r in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var i=Object.getOwnPropertySymbols(t);if(i.length!==1||i[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(t,r);if(a.value!==o||a.enumerable!==!0)return!1}return!0},EO=typeof Symbol<"u"&&Symbol,MW=NW,jW=function(){return typeof EO!="function"||typeof Symbol!="function"||typeof EO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:MW()},kO={foo:{}},DW=Object,LW=function(){return{__proto__:kO}.foo===kO.foo&&!({__proto__:null}instanceof DW)},FW="Function.prototype.bind called on incompatible ",qW=Object.prototype.toString,BW=Math.max,UW="[object Function]",TO=function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var i=0;i<r.length;i+=1)n[i+t.length]=r[i];return n},zW=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},ZW=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},VW=function(t){var r=this;if(typeof r!="function"||qW.apply(r)!==UW)throw new TypeError(FW+r);for(var n=zW(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,TO(n,arguments));return Object(u)===u?u:this}return r.apply(t,TO(n,arguments))},a=BW(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+ZW(s,",")+"){ return binder.apply(this,arguments); }")(i),r.prototype){var l=function(){};l.prototype=r.prototype,o.prototype=new l,l.prototype=null}return o},HW=VW,vg=Function.prototype.bind||HW,WW=vg,KW=WW.call(Function.call,Object.prototype.hasOwnProperty),Et,ss=SyntaxError,$O=Function,cs=TypeError,bg=function(e){try{return $O('"use strict"; return ('+e+").constructor;")()}catch{}},aa=Object.getOwnPropertyDescriptor;if(aa)try{aa({},"")}catch{aa=null}var wg=function(){throw new cs},GW=aa?function(){try{return arguments.callee,wg}catch{try{return aa(arguments,"callee").get}catch{return wg}}}():wg,ls=jW(),JW=LW(),$r=Object.getPrototypeOf||(JW?function(e){return e.__proto__}:null),us={},YW=typeof Uint8Array>"u"||!$r?Et:$r(Uint8Array),sa={"%AggregateError%":typeof AggregateError>"u"?Et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Et:ArrayBuffer,"%ArrayIteratorPrototype%":ls&&$r?$r([][Symbol.iterator]()):Et,"%AsyncFromSyncIteratorPrototype%":Et,"%AsyncFunction%":us,"%AsyncGenerator%":us,"%AsyncGeneratorFunction%":us,"%AsyncIteratorPrototype%":us,"%Atomics%":typeof Atomics>"u"?Et:Atomics,"%BigInt%":typeof BigInt>"u"?Et:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Et:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Et:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Et:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?Et:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Et:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Et:FinalizationRegistry,"%Function%":$O,"%GeneratorFunction%":us,"%Int8Array%":typeof Int8Array>"u"?Et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ls&&$r?$r($r([][Symbol.iterator]())):Et,"%JSON%":typeof JSON=="object"?JSON:Et,"%Map%":typeof Map>"u"?Et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!ls||!$r?Et:$r(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Et:Promise,"%Proxy%":typeof Proxy>"u"?Et:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?Et:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Et:Set,"%SetIteratorPrototype%":typeof Set>"u"||!ls||!$r?Et:$r(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ls&&$r?$r(""[Symbol.iterator]()):Et,"%Symbol%":ls?Symbol:Et,"%SyntaxError%":ss,"%ThrowTypeError%":GW,"%TypedArray%":YW,"%TypeError%":cs,"%Uint8Array%":typeof Uint8Array>"u"?Et:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Et:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Et:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Et:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?Et:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Et:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Et:WeakSet};if($r)try{null.error}catch(e){var XW=$r($r(e));sa["%Error.prototype%"]=XW}var QW=function e(t){var r;if(t==="%AsyncFunction%")r=bg("async function () {}");else if(t==="%GeneratorFunction%")r=bg("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=bg("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&$r&&(r=$r(o.prototype))}return sa[t]=r,r},OO={"%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"]},Jc=vg,If=KW,eK=Jc.call(Function.call,Array.prototype.concat),tK=Jc.call(Function.apply,Array.prototype.splice),CO=Jc.call(Function.call,String.prototype.replace),Rf=Jc.call(Function.call,String.prototype.slice),rK=Jc.call(Function.call,RegExp.prototype.exec),nK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,oK=/\\(\\)?/g,iK=function(t){var r=Rf(t,0,1),n=Rf(t,-1);if(r==="%"&&n!=="%")throw new ss("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ss("invalid intrinsic syntax, expected opening `%`");var o=[];return CO(t,nK,function(i,a,s,c){o[o.length]=s?CO(c,oK,"$1"):a||i}),o},aK=function(t,r){var n=t,o;if(If(OO,n)&&(o=OO[n],n="%"+o[0]+"%"),If(sa,n)){var i=sa[n];if(i===us&&(i=QW(n)),typeof i>"u"&&!r)throw new cs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ss("intrinsic "+t+" does not exist!")},xg=function(t,r){if(typeof t!="string"||t.length===0)throw new cs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new cs('"allowMissing" argument must be a boolean');if(rK(/^%?[^%]*%?$/,t)===null)throw new ss("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=iK(t),o=n.length>0?n[0]:"",i=aK("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],tK(n,eK([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Rf(p,0,1),h=Rf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new ss("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",If(sa,a))s=sa[a];else if(s!=null){if(!(p in s)){if(!r)throw new cs("base intrinsic for "+t+" exists, but the property is not available.");return}if(aa&&u+1>=n.length){var y=aa(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=If(s,p),s=s[p];d&&!c&&(sa[a]=s)}}return s},AO={exports:{}};(function(e){var t=vg,r=xg,n=r("%Function.prototype.apply%"),o=r("%Function.prototype.call%"),i=r("%Reflect.apply%",!0)||t.call(o,n),a=r("%Object.getOwnPropertyDescriptor%",!0),s=r("%Object.defineProperty%",!0),c=r("%Math.max%");if(s)try{s({},"a",{value:1})}catch{s=null}e.exports=function(d){var p=i(t,o,arguments);if(a&&s){var f=a(p,"length");f.configurable&&s(p,"length",{value:1+c(0,d.length-(arguments.length-1))})}return p};var l=function(){return i(t,n,arguments)};s?s(e.exports,"apply",{value:l}):e.exports.apply=l})(AO);var sK=AO.exports,IO=xg,RO=sK,cK=RO(IO("String.prototype.indexOf")),lK=function(t,r){var n=IO(t,!!r);return typeof n=="function"&&cK(t,".prototype.")>-1?RO(n):n},Sg=typeof Map=="function"&&Map.prototype,_g=Object.getOwnPropertyDescriptor&&Sg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Pf=Sg&&_g&&typeof _g.get=="function"?_g.get:null,PO=Sg&&Map.prototype.forEach,Eg=typeof Set=="function"&&Set.prototype,kg=Object.getOwnPropertyDescriptor&&Eg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Nf=Eg&&kg&&typeof kg.get=="function"?kg.get:null,NO=Eg&&Set.prototype.forEach,uK=typeof WeakMap=="function"&&WeakMap.prototype,Yc=uK?WeakMap.prototype.has:null,dK=typeof WeakSet=="function"&&WeakSet.prototype,Xc=dK?WeakSet.prototype.has:null,fK=typeof WeakRef=="function"&&WeakRef.prototype,MO=fK?WeakRef.prototype.deref:null,pK=Boolean.prototype.valueOf,hK=Object.prototype.toString,mK=Function.prototype.toString,yK=String.prototype.match,Tg=String.prototype.slice,gi=String.prototype.replace,gK=String.prototype.toUpperCase,jO=String.prototype.toLowerCase,DO=RegExp.prototype.test,LO=Array.prototype.concat,yo=Array.prototype.join,vK=Array.prototype.slice,FO=Math.floor,$g=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Og=Object.getOwnPropertySymbols,Cg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ds=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ds||"symbol")?Symbol.toStringTag:null,qO=Object.prototype.propertyIsEnumerable,BO=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function UO(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||DO.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-FO(-e):FO(e);if(n!==e){var o=String(n),i=Tg.call(t,o.length+1);return gi.call(o,r,"$&_")+"."+gi.call(gi.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return gi.call(t,r,"$&_")}var Ag=om,zO=Ag.custom,ZO=WO(zO)?zO:null,bK=function e(t,r,n,o){var i=r||{};if(vi(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(vi(i,"maxStringLength")&&(typeof i.maxStringLength=="number"?i.maxStringLength<0&&i.maxStringLength!==1/0:i.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var a=vi(i,"customInspect")?i.customInspect:!0;if(typeof a!="boolean"&&a!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(vi(i,"indent")&&i.indent!==null&&i.indent!==" "&&!(parseInt(i.indent,10)===i.indent&&i.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(vi(i,"numericSeparator")&&typeof i.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var s=i.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 GO(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?UO(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?UO(t,l):l}var u=typeof i.depth>"u"?5:i.depth;if(typeof n>"u"&&(n=0),n>=u&&u>0&&typeof t=="object")return Ig(t)?"[Array]":"[Object]";var d=DK(i,n);if(typeof o>"u")o=[];else if(KO(o,t)>=0)return"[Circular]";function p(z,B,F){if(B&&(o=vK.call(o),o.push(B)),F){var j={depth:i.depth};return vi(i,"quoteStyle")&&(j.quoteStyle=i.quoteStyle),e(z,j,n+1,o)}return e(z,i,n+1,o)}if(typeof t=="function"&&!HO(t)){var f=OK(t),h=Mf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+yo.call(h,", ")+" }":"")}if(WO(t)){var y=ds?gi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Cg.call(t);return typeof t=="object"&&!ds?Qc(y):y}if(NK(t)){for(var m="<"+jO.call(String(t.nodeName)),g=t.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+VO(wK(g[v].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+jO.call(String(t.nodeName))+">",m}if(Ig(t)){if(t.length===0)return"[]";var b=Mf(t,p);return d&&!jK(b)?"["+Pg(b,d)+"]":"[ "+yo.call(b,", ")+" ]"}if(SK(t)){var x=Mf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!qO.call(t,"cause")?"{ ["+String(t)+"] "+yo.call(LO.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+yo.call(x,", ")+" }"}if(typeof t=="object"&&a){if(ZO&&typeof t[ZO]=="function"&&Ag)return Ag(t,{depth:u-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(CK(t)){var w=[];return PO&&PO.call(t,function(z,B){w.push(p(B,t,!0)+" => "+p(z,t))}),JO("Map",Pf.call(t),w,d)}if(RK(t)){var S=[];return NO&&NO.call(t,function(z){S.push(p(z,t))}),JO("Set",Nf.call(t),S,d)}if(AK(t))return Rg("WeakMap");if(PK(t))return Rg("WeakSet");if(IK(t))return Rg("WeakRef");if(EK(t))return Qc(p(Number(t)));if(TK(t))return Qc(p($g.call(t)));if(kK(t))return Qc(pK.call(t));if(_K(t))return Qc(p(String(t)));if(!xK(t)&&!HO(t)){var C=Mf(t,p),I=BO?BO(t)===Object.prototype:t instanceof Object||t.constructor===Object,P=t instanceof Object?"":"null prototype",A=!I&&Gr&&Object(t)===t&&Gr in t?Tg.call(bi(t),8,-1):P?"Object":"",L=I||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",K=L+(A||P?"["+yo.call(LO.call([],A||[],P||[]),": ")+"] ":"");return C.length===0?K+"{}":d?K+"{"+Pg(C,d)+"}":K+"{ "+yo.call(C,", ")+" }"}return String(t)};function VO(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function wK(e){return gi.call(String(e),/"/g,"&quot;")}function Ig(e){return bi(e)==="[object Array]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function xK(e){return bi(e)==="[object Date]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function HO(e){return bi(e)==="[object RegExp]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function SK(e){return bi(e)==="[object Error]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function _K(e){return bi(e)==="[object String]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function EK(e){return bi(e)==="[object Number]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function kK(e){return bi(e)==="[object Boolean]"&&(!Gr||!(typeof e=="object"&&Gr in e))}function WO(e){if(ds)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Cg)return!1;try{return Cg.call(e),!0}catch{}return!1}function TK(e){if(!e||typeof e!="object"||!$g)return!1;try{return $g.call(e),!0}catch{}return!1}var $K=Object.prototype.hasOwnProperty||function(e){return e in this};function vi(e,t){return $K.call(e,t)}function bi(e){return hK.call(e)}function OK(e){if(e.name)return e.name;var t=yK.call(mK.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function KO(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function CK(e){if(!Pf||!e||typeof e!="object")return!1;try{Pf.call(e);try{Nf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function AK(e){if(!Yc||!e||typeof e!="object")return!1;try{Yc.call(e,Yc);try{Xc.call(e,Xc)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function IK(e){if(!MO||!e||typeof e!="object")return!1;try{return MO.call(e),!0}catch{}return!1}function RK(e){if(!Nf||!e||typeof e!="object")return!1;try{Nf.call(e);try{Pf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function PK(e){if(!Xc||!e||typeof e!="object")return!1;try{Xc.call(e,Xc);try{Yc.call(e,Yc)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function NK(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function GO(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return GO(Tg.call(e,0,t.maxStringLength),t)+n}var o=gi.call(gi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,MK);return VO(o,"single",t)}function MK(e){var t=e.charCodeAt(0),r={8:"b",9:"t",10:"n",12:"f",13:"r"}[t];return r?"\\"+r:"\\x"+(t<16?"0":"")+gK.call(t.toString(16))}function Qc(e){return"Object("+e+")"}function Rg(e){return e+" { ? }"}function JO(e,t,r,n){var o=n?Pg(r,n):yo.call(r,", ");return e+" ("+t+") {"+o+"}"}function jK(e){for(var t=0;t<e.length;t++)if(KO(e[t],`
133
133
  `)>=0)return!1;return!0}function DK(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=yo.call(Array(e.indent+1)," ");else return null;return{base:r,prev:yo.call(Array(t+1),r)}}function Pg(e,t){if(e.length===0)return"";var r=`
134
134
  `+t.prev+t.base;return r+yo.call(e,","+r)+`
135
- `+t.prev}function Mf(e,t){var r=Ig(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=vi(e,o)?t(e[o],e):""}var i=typeof Og=="function"?Og(e):[],a;if(ds){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)vi(e,c)&&(r&&String(Number(c))===c&&c<e.length||ds&&a["$"+c]instanceof Symbol||(DO.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof Og=="function")for(var l=0;l<i.length;l++)qO.call(e,i[l])&&n.push("["+t(i[l])+"]: "+t(e[i[l]],e));return n}var Ng=xg,fs=lK,LK=bK,FK=Ng("%TypeError%"),jf=Ng("%WeakMap%",!0),Df=Ng("%Map%",!0),qK=fs("WeakMap.prototype.get",!0),BK=fs("WeakMap.prototype.set",!0),UK=fs("WeakMap.prototype.has",!0),zK=fs("Map.prototype.get",!0),ZK=fs("Map.prototype.set",!0),VK=fs("Map.prototype.has",!0),Mg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},HK=function(e,t){var r=Mg(e,t);return r&&r.value},WK=function(e,t,r){var n=Mg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},KK=function(e,t){return!!Mg(e,t)},GK=function(){var t,r,n,o={assert:function(i){if(!o.has(i))throw new FK("Side channel does not contain "+LK(i))},get:function(i){if(jf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return qK(t,i)}else if(Df){if(r)return zK(r,i)}else if(n)return HK(n,i)},has:function(i){if(jf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return UK(t,i)}else if(Df){if(r)return VK(r,i)}else if(n)return KK(n,i);return!1},set:function(i,a){jf&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new jf),BK(t,i,a)):Df?(r||(r=new Df),ZK(r,i,a)):(n||(n={key:{},next:null}),WK(n,i,a))}};return o},JK=String.prototype.replace,YK=/%20/g,jg={RFC1738:"RFC1738",RFC3986:"RFC3986"},Dg={default:jg.RFC3986,formatters:{RFC1738:function(e){return JK.call(e,YK,"+")},RFC3986:function(e){return String(e)}},RFC1738:jg.RFC1738,RFC3986:jg.RFC3986},XK=Dg,Lg=Object.prototype.hasOwnProperty,ca=Array.isArray,go=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),QK=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(ca(n)){for(var o=[],i=0;i<n.length;++i)typeof n[i]<"u"&&o.push(n[i]);r.obj[r.prop]=o}}},YO=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(n[o]=t[o]);return n},eG=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(ca(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Lg.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var o=t;return ca(t)&&!ca(r)&&(o=YO(t,n)),ca(t)&&ca(r)?(r.forEach(function(i,a){if(Lg.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,n):t.push(i)}else t[a]=i}),t):Object.keys(r).reduce(function(i,a){var s=r[a];return Lg.call(i,a)?i[a]=e(i[a],s,n):i[a]=s,i},o)},tG=function(t,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},t)},rG=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nG=function(t,r,n,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;++c){var l=a.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===XK.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+go[l];continue}if(l<2048){s=s+(go[192|l>>6]+go[128|l&63]);continue}if(l<55296||l>=57344){s=s+(go[224|l>>12]+go[128|l>>6&63]+go[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=go[240|l>>18]+go[128|l>>12&63]+go[128|l>>6&63]+go[128|l&63]}return s},oG=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],o=0;o<r.length;++o)for(var i=r[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:a,prop:l}),n.push(u))}return QK(r),t},iG=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},aG=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},sG=function(t,r){return[].concat(t,r)},cG=function(t,r){if(ca(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(r(t[o]));return n}return r(t)},XO={arrayToObject:YO,assign:tG,combine:sG,compact:oG,decode:rG,encode:nG,isBuffer:aG,isRegExp:iG,maybeMap:cG,merge:eG},QO=GK,Lf=XO,el=Dg,lG=Object.prototype.hasOwnProperty,eC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},zo=Array.isArray,uG=Array.prototype.push,tC=function(e,t){uG.apply(e,zo(t)?t:[t])},dG=Date.prototype.toISOString,rC=el.default,Jr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Lf.encode,encodeValuesOnly:!1,format:rC,formatter:el.formatters[rC],indices:!1,serializeDate:function(t){return dG.call(t)},skipNulls:!1,strictNullHandling:!1},fG=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Fg={},pG=function e(t,r,n,o,i,a,s,c,l,u,d,p,f,h,y,m){for(var g=t,v=m,b=0,x=!1;(v=v.get(Fg))!==void 0&&!x;){var w=v.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");x=!0}typeof v.get(Fg)>"u"&&(b=0)}if(typeof c=="function"?g=c(r,g):g instanceof Date?g=d(g):n==="comma"&&zo(g)&&(g=Lf.maybeMap(g,function(j){return j instanceof Date?d(j):j})),g===null){if(i)return s&&!h?s(r,Jr.encoder,y,"key",p):r;g=""}if(fG(g)||Lf.isBuffer(g)){if(s){var S=h?r:s(r,Jr.encoder,y,"key",p);return[f(S)+"="+f(s(g,Jr.encoder,y,"value",p))]}return[f(r)+"="+f(String(g))]}var C=[];if(typeof g>"u")return C;var I;if(n==="comma"&&zo(g))h&&s&&(g=Lf.maybeMap(g,s)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(zo(c))I=c;else{var P=Object.keys(g);I=l?P.sort(l):P}for(var A=o&&zo(g)&&g.length===1?r+"[]":r,L=0;L<I.length;++L){var W=I[L],Z=typeof W=="object"&&typeof W.value<"u"?W.value:g[W];if(!(a&&Z===null)){var B=zo(g)?typeof n=="function"?n(A,W):A:A+(u?"."+W:"["+W+"]");m.set(t,b);var F=QO();F.set(Fg,m),tC(C,e(Z,B,n,o,i,a,n==="comma"&&h&&zo(g)?null:s,c,l,u,d,p,f,h,y,F))}}return C},hG=function(t){if(!t)return Jr;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Jr.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=el.default;if(typeof t.format<"u"){if(!lG.call(el.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var o=el.formatters[n],i=Jr.filter;return(typeof t.filter=="function"||zo(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Jr.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Jr.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Jr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Jr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Jr.encode,encoder:typeof t.encoder=="function"?t.encoder:Jr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Jr.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Jr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Jr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Jr.strictNullHandling}},mG=function(e,t){var r=e,n=hG(t),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):zo(n.filter)&&(i=n.filter,o=i);var a=[];if(typeof r!="object"||r===null)return"";var s;t&&t.arrayFormat in eC?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var c=eC[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var u=QO(),d=0;d<o.length;++d){var p=o[d];n.skipNulls&&r[p]===null||tC(a,pG(r[p],p,c,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var f=a.join(n.delimiter),h=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ps=XO,qg=Object.prototype.hasOwnProperty,yG=Array.isArray,Or={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ps.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},gG=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},nC=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},vG="utf8=%26%2310003%3B",bG="utf8=%E2%9C%93",wG=function(t,r){var n={__proto__:null},o=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=r.parameterLimit===1/0?void 0:r.parameterLimit,a=o.split(r.delimiter,i),s=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===bG?l="utf-8":a[c]===vG&&(l="iso-8859-1"),s=c,c=a.length);for(c=0;c<a.length;++c)if(c!==s){var u=a[c],d=u.indexOf("]="),p=d===-1?u.indexOf("="):d+1,f,h;p===-1?(f=r.decoder(u,Or.decoder,l,"key"),h=r.strictNullHandling?null:""):(f=r.decoder(u.slice(0,p),Or.decoder,l,"key"),h=ps.maybeMap(nC(u.slice(p+1),r),function(y){return r.decoder(y,Or.decoder,l,"value")})),h&&r.interpretNumericEntities&&l==="iso-8859-1"&&(h=gG(h)),u.indexOf("[]=")>-1&&(h=yG(h)?[h]:h),qg.call(n,f)?n[f]=ps.combine(n[f],h):n[f]=h}return n},xG=function(e,t,r,n){for(var o=n?t:nC(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=parseInt(c,10);!r.parseArrays&&c===""?a={0:o}:!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[],a[l]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},SG=function(t,r,n,o){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&a.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!n.plainObjects&&qg.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&(c=s.exec(i))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&qg.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),xG(u,r,n,o)}},_G=function(t){if(!t)return Or;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Or.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Or.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Or.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Or.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Or.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Or.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Or.comma,decoder:typeof t.decoder=="function"?t.decoder:Or.decoder,delimiter:typeof t.delimiter=="string"||ps.isRegExp(t.delimiter)?t.delimiter:Or.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Or.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Or.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Or.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Or.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Or.strictNullHandling}},EG=function(e,t){var r=_G(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?wG(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=SG(s,n[s],r,typeof e=="string");o=ps.merge(o,c,r)}return r.allowSparse===!0?o:ps.compact(o)},kG=mG,TG=EG,$G=Dg,OG={formats:$G,parse:TG,stringify:kG};const CG=St(OG),AG=e=>e[1]!==void 0,hr=e=>{const{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(AG),s=Object.fromEntries(a),c=CG.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},IG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),RG=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),PG=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),NG=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),MG=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:{}}),jG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),DG=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),LG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),FG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),qG=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:{}}),BG=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),UG=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),zG=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ZG=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),VG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),HG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),WG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),KG=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),GG=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),JG=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}});let YG=class{constructor(t,r={}){k(this,"addParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=IG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createConversation",async t=>{const{path:r,headers:n,query:o,body:i}=RG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteConversation",async t=>{const{path:r,headers:n,query:o,body:i}=PG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getConversation",async t=>{const{path:r,headers:n,query:o,body:i}=NG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=MG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listConversationMessages",async t=>{const{path:r,headers:n,query:o,body:i}=jG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listConversations",async t=>{const{path:r,headers:n,query:o,body:i}=DG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listParticipants",async t=>{const{path:r,headers:n,query:o,body:i}=LG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listenConversation",async t=>{const{path:r,headers:n,query:o,body:i}=FG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"removeParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=qG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createMessage",async t=>{const{path:r,headers:n,query:o,body:i}=BG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteMessage",async t=>{const{path:r,headers:n,query:o,body:i}=UG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getMessage",async t=>{const{path:r,headers:n,query:o,body:i}=zG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createUser",async t=>{const{path:r,headers:n,query:o,body:i}=ZG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteUser",async t=>{const{path:r,headers:n,query:o,body:i}=VG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getUser",async t=>{const{path:r,headers:n,query:o,body:i}=HG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"updateUser",async t=>{const{path:r,headers:n,query:o,body:i}=WG(t),s=(this.props.toAxiosRequest??hr)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createEvent",async t=>{const{path:r,headers:n,query:o,body:i}=KG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getEvent",async t=>{const{path:r,headers:n,query:o,body:i}=GG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createFile",async t=>{const{path:r,headers:n,query:o,body:i}=JG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});this.axiosInstance=t,this.props=r}};function mr(e){var t;return SO.isAxiosError(e)&&((t=e.response)!=null&&t.data)?_O(e.response.data):_O(e)}class oC{constructor(){k(this,"listeners",{})}emit(t,r){const n=this.listeners[t];if(n)for(const o of[...n])o(r)}onceOrMore(t,r){const n=o=>{r(o)==="stop-listening"&&this.off(t,n)};this.on(t,n)}once(t,r){const n=o=>{this.off(t,n),r(o)};this.on(t,n)}on(t,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r)}off(t,r){const n=this.listeners[t];if(!n)return;const o=n.indexOf(r);o!==-1&&n.splice(o,1)}cleanup(){this.listeners={}}}var Bg={exports:{}};/** @license
135
+ `+t.prev}function Mf(e,t){var r=Ig(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=vi(e,o)?t(e[o],e):""}var i=typeof Og=="function"?Og(e):[],a;if(ds){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)vi(e,c)&&(r&&String(Number(c))===c&&c<e.length||ds&&a["$"+c]instanceof Symbol||(DO.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof Og=="function")for(var l=0;l<i.length;l++)qO.call(e,i[l])&&n.push("["+t(i[l])+"]: "+t(e[i[l]],e));return n}var Ng=xg,fs=lK,LK=bK,FK=Ng("%TypeError%"),jf=Ng("%WeakMap%",!0),Df=Ng("%Map%",!0),qK=fs("WeakMap.prototype.get",!0),BK=fs("WeakMap.prototype.set",!0),UK=fs("WeakMap.prototype.has",!0),zK=fs("Map.prototype.get",!0),ZK=fs("Map.prototype.set",!0),VK=fs("Map.prototype.has",!0),Mg=function(e,t){for(var r=e,n;(n=r.next)!==null;r=n)if(n.key===t)return r.next=n.next,n.next=e.next,e.next=n,n},HK=function(e,t){var r=Mg(e,t);return r&&r.value},WK=function(e,t,r){var n=Mg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},KK=function(e,t){return!!Mg(e,t)},GK=function(){var t,r,n,o={assert:function(i){if(!o.has(i))throw new FK("Side channel does not contain "+LK(i))},get:function(i){if(jf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return qK(t,i)}else if(Df){if(r)return zK(r,i)}else if(n)return HK(n,i)},has:function(i){if(jf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return UK(t,i)}else if(Df){if(r)return VK(r,i)}else if(n)return KK(n,i);return!1},set:function(i,a){jf&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new jf),BK(t,i,a)):Df?(r||(r=new Df),ZK(r,i,a)):(n||(n={key:{},next:null}),WK(n,i,a))}};return o},JK=String.prototype.replace,YK=/%20/g,jg={RFC1738:"RFC1738",RFC3986:"RFC3986"},Dg={default:jg.RFC3986,formatters:{RFC1738:function(e){return JK.call(e,YK,"+")},RFC3986:function(e){return String(e)}},RFC1738:jg.RFC1738,RFC3986:jg.RFC3986},XK=Dg,Lg=Object.prototype.hasOwnProperty,ca=Array.isArray,go=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),QK=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(ca(n)){for(var o=[],i=0;i<n.length;++i)typeof n[i]<"u"&&o.push(n[i]);r.obj[r.prop]=o}}},YO=function(t,r){for(var n=r&&r.plainObjects?Object.create(null):{},o=0;o<t.length;++o)typeof t[o]<"u"&&(n[o]=t[o]);return n},eG=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(ca(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!Lg.call(Object.prototype,r))&&(t[r]=!0);else return[t,r];return t}if(!t||typeof t!="object")return[t].concat(r);var o=t;return ca(t)&&!ca(r)&&(o=YO(t,n)),ca(t)&&ca(r)?(r.forEach(function(i,a){if(Lg.call(t,a)){var s=t[a];s&&typeof s=="object"&&i&&typeof i=="object"?t[a]=e(s,i,n):t.push(i)}else t[a]=i}),t):Object.keys(r).reduce(function(i,a){var s=r[a];return Lg.call(i,a)?i[a]=e(i[a],s,n):i[a]=s,i},o)},tG=function(t,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},t)},rG=function(e,t,r){var n=e.replace(/\+/g," ");if(r==="iso-8859-1")return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch{return n}},nG=function(t,r,n,o,i){if(t.length===0)return t;var a=t;if(typeof t=="symbol"?a=Symbol.prototype.toString.call(t):typeof t!="string"&&(a=String(t)),n==="iso-8859-1")return escape(a).replace(/%u[0-9a-f]{4}/gi,function(u){return"%26%23"+parseInt(u.slice(2),16)+"%3B"});for(var s="",c=0;c<a.length;++c){var l=a.charCodeAt(c);if(l===45||l===46||l===95||l===126||l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||i===XK.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+go[l];continue}if(l<2048){s=s+(go[192|l>>6]+go[128|l&63]);continue}if(l<55296||l>=57344){s=s+(go[224|l>>12]+go[128|l>>6&63]+go[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=go[240|l>>18]+go[128|l>>12&63]+go[128|l>>6&63]+go[128|l&63]}return s},oG=function(t){for(var r=[{obj:{o:t},prop:"o"}],n=[],o=0;o<r.length;++o)for(var i=r[o],a=i.obj[i.prop],s=Object.keys(a),c=0;c<s.length;++c){var l=s[c],u=a[l];typeof u=="object"&&u!==null&&n.indexOf(u)===-1&&(r.push({obj:a,prop:l}),n.push(u))}return QK(r),t},iG=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},aG=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},sG=function(t,r){return[].concat(t,r)},cG=function(t,r){if(ca(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(r(t[o]));return n}return r(t)},XO={arrayToObject:YO,assign:tG,combine:sG,compact:oG,decode:rG,encode:nG,isBuffer:aG,isRegExp:iG,maybeMap:cG,merge:eG},QO=GK,Lf=XO,el=Dg,lG=Object.prototype.hasOwnProperty,eC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},zo=Array.isArray,uG=Array.prototype.push,tC=function(e,t){uG.apply(e,zo(t)?t:[t])},dG=Date.prototype.toISOString,rC=el.default,Jr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Lf.encode,encodeValuesOnly:!1,format:rC,formatter:el.formatters[rC],indices:!1,serializeDate:function(t){return dG.call(t)},skipNulls:!1,strictNullHandling:!1},fG=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},Fg={},pG=function e(t,r,n,o,i,a,s,c,l,u,d,p,f,h,y,m){for(var g=t,v=m,b=0,x=!1;(v=v.get(Fg))!==void 0&&!x;){var w=v.get(t);if(b+=1,typeof w<"u"){if(w===b)throw new RangeError("Cyclic object value");x=!0}typeof v.get(Fg)>"u"&&(b=0)}if(typeof c=="function"?g=c(r,g):g instanceof Date?g=d(g):n==="comma"&&zo(g)&&(g=Lf.maybeMap(g,function(j){return j instanceof Date?d(j):j})),g===null){if(i)return s&&!h?s(r,Jr.encoder,y,"key",p):r;g=""}if(fG(g)||Lf.isBuffer(g)){if(s){var S=h?r:s(r,Jr.encoder,y,"key",p);return[f(S)+"="+f(s(g,Jr.encoder,y,"value",p))]}return[f(r)+"="+f(String(g))]}var C=[];if(typeof g>"u")return C;var I;if(n==="comma"&&zo(g))h&&s&&(g=Lf.maybeMap(g,s)),I=[{value:g.length>0?g.join(",")||null:void 0}];else if(zo(c))I=c;else{var P=Object.keys(g);I=l?P.sort(l):P}for(var A=o&&zo(g)&&g.length===1?r+"[]":r,L=0;L<I.length;++L){var K=I[L],z=typeof K=="object"&&typeof K.value<"u"?K.value:g[K];if(!(a&&z===null)){var B=zo(g)?typeof n=="function"?n(A,K):A:A+(u?"."+K:"["+K+"]");m.set(t,b);var F=QO();F.set(Fg,m),tC(C,e(z,B,n,o,i,a,n==="comma"&&h&&zo(g)?null:s,c,l,u,d,p,f,h,y,F))}}return C},hG=function(t){if(!t)return Jr;if(t.encoder!==null&&typeof t.encoder<"u"&&typeof t.encoder!="function")throw new TypeError("Encoder has to be a function.");var r=t.charset||Jr.charset;if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=el.default;if(typeof t.format<"u"){if(!lG.call(el.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var o=el.formatters[n],i=Jr.filter;return(typeof t.filter=="function"||zo(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Jr.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Jr.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Jr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Jr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Jr.encode,encoder:typeof t.encoder=="function"?t.encoder:Jr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Jr.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Jr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Jr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Jr.strictNullHandling}},mG=function(e,t){var r=e,n=hG(t),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):zo(n.filter)&&(i=n.filter,o=i);var a=[];if(typeof r!="object"||r===null)return"";var s;t&&t.arrayFormat in eC?s=t.arrayFormat:t&&"indices"in t?s=t.indices?"indices":"repeat":s="indices";var c=eC[s];if(t&&"commaRoundTrip"in t&&typeof t.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var l=c==="comma"&&t&&t.commaRoundTrip;o||(o=Object.keys(r)),n.sort&&o.sort(n.sort);for(var u=QO(),d=0;d<o.length;++d){var p=o[d];n.skipNulls&&r[p]===null||tC(a,pG(r[p],p,c,l,n.strictNullHandling,n.skipNulls,n.encode?n.encoder:null,n.filter,n.sort,n.allowDots,n.serializeDate,n.format,n.formatter,n.encodeValuesOnly,n.charset,u))}var f=a.join(n.delimiter),h=n.addQueryPrefix===!0?"?":"";return n.charsetSentinel&&(n.charset==="iso-8859-1"?h+="utf8=%26%2310003%3B&":h+="utf8=%E2%9C%93&"),f.length>0?h+f:""},ps=XO,qg=Object.prototype.hasOwnProperty,yG=Array.isArray,Or={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:ps.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},gG=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},nC=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},vG="utf8=%26%2310003%3B",bG="utf8=%E2%9C%93",wG=function(t,r){var n={__proto__:null},o=r.ignoreQueryPrefix?t.replace(/^\?/,""):t,i=r.parameterLimit===1/0?void 0:r.parameterLimit,a=o.split(r.delimiter,i),s=-1,c,l=r.charset;if(r.charsetSentinel)for(c=0;c<a.length;++c)a[c].indexOf("utf8=")===0&&(a[c]===bG?l="utf-8":a[c]===vG&&(l="iso-8859-1"),s=c,c=a.length);for(c=0;c<a.length;++c)if(c!==s){var u=a[c],d=u.indexOf("]="),p=d===-1?u.indexOf("="):d+1,f,h;p===-1?(f=r.decoder(u,Or.decoder,l,"key"),h=r.strictNullHandling?null:""):(f=r.decoder(u.slice(0,p),Or.decoder,l,"key"),h=ps.maybeMap(nC(u.slice(p+1),r),function(y){return r.decoder(y,Or.decoder,l,"value")})),h&&r.interpretNumericEntities&&l==="iso-8859-1"&&(h=gG(h)),u.indexOf("[]=")>-1&&(h=yG(h)?[h]:h),qg.call(n,f)?n[f]=ps.combine(n[f],h):n[f]=h}return n},xG=function(e,t,r,n){for(var o=n?t:nC(t,r),i=e.length-1;i>=0;--i){var a,s=e[i];if(s==="[]"&&r.parseArrays)a=[].concat(o);else{a=r.plainObjects?Object.create(null):{};var c=s.charAt(0)==="["&&s.charAt(s.length-1)==="]"?s.slice(1,-1):s,l=parseInt(c,10);!r.parseArrays&&c===""?a={0:o}:!isNaN(l)&&s!==c&&String(l)===c&&l>=0&&r.parseArrays&&l<=r.arrayLimit?(a=[],a[l]=o):c!=="__proto__"&&(a[c]=o)}o=a}return o},SG=function(t,r,n,o){if(t){var i=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,a=/(\[[^[\]]*])/,s=/(\[[^[\]]*])/g,c=n.depth>0&&a.exec(i),l=c?i.slice(0,c.index):i,u=[];if(l){if(!n.plainObjects&&qg.call(Object.prototype,l)&&!n.allowPrototypes)return;u.push(l)}for(var d=0;n.depth>0&&(c=s.exec(i))!==null&&d<n.depth;){if(d+=1,!n.plainObjects&&qg.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),xG(u,r,n,o)}},_G=function(t){if(!t)return Or;if(t.decoder!==null&&t.decoder!==void 0&&typeof t.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof t.charset<"u"&&t.charset!=="utf-8"&&t.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=typeof t.charset>"u"?Or.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Or.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Or.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Or.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Or.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Or.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Or.comma,decoder:typeof t.decoder=="function"?t.decoder:Or.decoder,delimiter:typeof t.delimiter=="string"||ps.isRegExp(t.delimiter)?t.delimiter:Or.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Or.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Or.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Or.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Or.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Or.strictNullHandling}},EG=function(e,t){var r=_G(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?wG(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=SG(s,n[s],r,typeof e=="string");o=ps.merge(o,c,r)}return r.allowSparse===!0?o:ps.compact(o)},kG=mG,TG=EG,$G=Dg,OG={formats:$G,parse:TG,stringify:kG};const CG=St(OG),AG=e=>e[1]!==void 0,hr=e=>{const{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(AG),s=Object.fromEntries(a),c=CG.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},IG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),RG=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),PG=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),NG=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),MG=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:{}}),jG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),DG=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),LG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),FG=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),qG=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:{}}),BG=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),UG=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),zG=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),ZG=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),VG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),HG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),WG=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),KG=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),GG=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),JG=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}});let YG=class{constructor(t,r={}){k(this,"addParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=IG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createConversation",async t=>{const{path:r,headers:n,query:o,body:i}=RG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteConversation",async t=>{const{path:r,headers:n,query:o,body:i}=PG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getConversation",async t=>{const{path:r,headers:n,query:o,body:i}=NG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=MG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listConversationMessages",async t=>{const{path:r,headers:n,query:o,body:i}=jG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listConversations",async t=>{const{path:r,headers:n,query:o,body:i}=DG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listParticipants",async t=>{const{path:r,headers:n,query:o,body:i}=LG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"listenConversation",async t=>{const{path:r,headers:n,query:o,body:i}=FG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"removeParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=qG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createMessage",async t=>{const{path:r,headers:n,query:o,body:i}=BG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteMessage",async t=>{const{path:r,headers:n,query:o,body:i}=UG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getMessage",async t=>{const{path:r,headers:n,query:o,body:i}=zG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createUser",async t=>{const{path:r,headers:n,query:o,body:i}=ZG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"deleteUser",async t=>{const{path:r,headers:n,query:o,body:i}=VG(t),s=(this.props.toAxiosRequest??hr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getUser",async t=>{const{path:r,headers:n,query:o,body:i}=HG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"updateUser",async t=>{const{path:r,headers:n,query:o,body:i}=WG(t),s=(this.props.toAxiosRequest??hr)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createEvent",async t=>{const{path:r,headers:n,query:o,body:i}=KG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"getEvent",async t=>{const{path:r,headers:n,query:o,body:i}=GG(t),s=(this.props.toAxiosRequest??hr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});k(this,"createFile",async t=>{const{path:r,headers:n,query:o,body:i}=JG(t),s=(this.props.toAxiosRequest??hr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw mr(c)})});this.axiosInstance=t,this.props=r}};function mr(e){var t;return SO.isAxiosError(e)&&((t=e.response)!=null&&t.data)?_O(e.response.data):_O(e)}class oC{constructor(){k(this,"listeners",{})}emit(t,r){const n=this.listeners[t];if(n)for(const o of[...n])o(r)}onceOrMore(t,r){const n=o=>{r(o)==="stop-listening"&&this.off(t,n)};this.on(t,n)}once(t,r){const n=o=>{this.off(t,n),r(o)};this.on(t,n)}on(t,r){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r)}off(t,r){const n=this.listeners[t];if(!n)return;const o=n.indexOf(r);o!==-1&&n.splice(o,1)}cleanup(){this.listeners={}}}var Bg={exports:{}};/** @license
136
136
  * eventsource.js
137
137
  * Available under MIT License (MIT)
138
138
  * https://github.com/Yaffle/EventSource/
139
139
  */(function(e,t){(function(r){var n=r.setTimeout,o=r.clearTimeout,i=r.XMLHttpRequest,a=r.XDomainRequest,s=r.ActiveXObject,c=r.EventSource,l=r.document,u=r.Promise,d=r.fetch,p=r.Response,f=r.TextDecoder,h=r.TextEncoder,y=r.AbortController;if(typeof window<"u"&&typeof l<"u"&&!("readyState"in l)&&l.body==null&&(l.readyState="loading",window.addEventListener("load",function(q){l.readyState="complete"},!1)),i==null&&s!=null&&(i=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(q){function le(){}return le.prototype=q,new le}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var m=d;d=function(q,le){var he=le.signal;return m(q,{headers:le.headers,credentials:le.credentials,cache:le.cache}).then(function(me){var je=me.body.getReader();return he._reader=je,he._aborted&&he._reader.cancel(),{status:me.status,statusText:me.statusText,headers:me.headers,body:{getReader:function(){return je}}}})},y=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){this.signal._reader!=null&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function g(){this.bitsNeeded=0,this.codePoint=0}g.prototype.decode=function(q){function le(G,se,Y){if(Y===1)return G>=128>>se&&G<<se<=2047;if(Y===2)return G>=2048>>se&&G<<se<=55295||G>=57344>>se&&G<<se<=65535;if(Y===3)return G>=65536>>se&&G<<se<=1114111;throw new Error}function he(G,se){if(G===6*1)return se>>6>15?3:se>31?2:1;if(G===6*2)return se>15?3:2;if(G===6*3)return 3;throw new Error}for(var me=65533,je="",Ie=this.bitsNeeded,Ue=this.codePoint,pt=0;pt<q.length;pt+=1){var Ke=q[pt];Ie!==0&&(Ke<128||Ke>191||!le(Ue<<6|Ke&63,Ie-6,he(Ie,Ue)))&&(Ie=0,Ue=me,je+=String.fromCharCode(Ue)),Ie===0?(Ke>=0&&Ke<=127?(Ie=0,Ue=Ke):Ke>=192&&Ke<=223?(Ie=6*1,Ue=Ke&31):Ke>=224&&Ke<=239?(Ie=6*2,Ue=Ke&15):Ke>=240&&Ke<=247?(Ie=6*3,Ue=Ke&7):(Ie=0,Ue=me),Ie!==0&&!le(Ue,Ie,he(Ie,Ue))&&(Ie=0,Ue=me)):(Ie-=6,Ue=Ue<<6|Ke&63),Ie===0&&(Ue<=65535?je+=String.fromCharCode(Ue):(je+=String.fromCharCode(55296+(Ue-65535-1>>10)),je+=String.fromCharCode(56320+(Ue-65535-1&1023))))}return this.bitsNeeded=Ie,this.codePoint=Ue,je};var v=function(){try{return new f().decode(new h().encode("test"),{stream:!0})==="test"}catch(q){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+q)}return!1};(f==null||h==null||!v())&&(f=g);var b=function(){};function x(q){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=q,this._sendTimeout=0,this._abort=b}x.prototype.open=function(q,le){this._abort(!0);var he=this,me=this._xhr,je=1,Ie=0;this._abort=function(Y){he._sendTimeout!==0&&(o(he._sendTimeout),he._sendTimeout=0),(je===1||je===2||je===3)&&(je=4,me.onload=b,me.onerror=b,me.onabort=b,me.onprogress=b,me.onreadystatechange=b,me.abort(),Ie!==0&&(o(Ie),Ie=0),Y||(he.readyState=4,he.onabort(null),he.onreadystatechange())),je=0};var Ue=function(){if(je===1){var Y=0,ye="",$e=void 0;if("contentType"in me)Y=200,ye="OK",$e=me.contentType;else try{Y=me.status,ye=me.statusText,$e=me.getResponseHeader("Content-Type")}catch{Y=0,ye="",$e=void 0}Y!==0&&(je=2,he.readyState=2,he.status=Y,he.statusText=ye,he._contentType=$e,he.onreadystatechange())}},pt=function(){if(Ue(),je===2||je===3){je=3;var Y="";try{Y=me.responseText}catch{}he.readyState=3,he.responseText=Y,he.onprogress()}},Ke=function(Y,ye){if((ye==null||ye.preventDefault==null)&&(ye={preventDefault:b}),pt(),je===1||je===2||je===3){if(je=4,Ie!==0&&(o(Ie),Ie=0),he.readyState=4,Y==="load")he.onload(ye);else if(Y==="error")he.onerror(ye);else if(Y==="abort")he.onabort(ye);else throw new TypeError;he.onreadystatechange()}},G=function(Y){me!=null&&(me.readyState===4?(!("onload"in me)||!("onerror"in me)||!("onabort"in me))&&Ke(me.responseText===""?"error":"load",Y):me.readyState===3?"onprogress"in me||pt():me.readyState===2&&Ue())},se=function(){Ie=n(function(){se()},500),me.readyState===3&&pt()};"onload"in me&&(me.onload=function(Y){Ke("load",Y)}),"onerror"in me&&(me.onerror=function(Y){Ke("error",Y)}),"onabort"in me&&(me.onabort=function(Y){Ke("abort",Y)}),"onprogress"in me&&(me.onprogress=pt),"onreadystatechange"in me&&(me.onreadystatechange=function(Y){G(Y)}),("contentType"in me||!("ontimeout"in i.prototype))&&(le+=(le.indexOf("?")===-1?"?":"&")+"padding=true"),me.open(q,le,!0),"readyState"in me&&(Ie=n(function(){se()},0))},x.prototype.abort=function(){this._abort(!1)},x.prototype.getResponseHeader=function(q){return this._contentType},x.prototype.setRequestHeader=function(q,le){var he=this._xhr;"setRequestHeader"in he&&he.setRequestHeader(q,le)},x.prototype.getAllResponseHeaders=function(){return this._xhr.getAllResponseHeaders!=null&&this._xhr.getAllResponseHeaders()||""},x.prototype.send=function(){if((!("ontimeout"in i.prototype)||!("sendAsBinary"in i.prototype)&&!("mozAnon"in i.prototype))&&l!=null&&l.readyState!=null&&l.readyState!=="complete"){var q=this;q._sendTimeout=n(function(){q._sendTimeout=0,q.send()},4);return}var le=this._xhr;"withCredentials"in le&&(le.withCredentials=this.withCredentials);try{le.send(void 0)}catch(he){throw he}};function w(q){return q.replace(/[A-Z]/g,function(le){return String.fromCharCode(le.charCodeAt(0)+32)})}function S(q){for(var le=Object.create(null),he=q.split(`\r
140
- `),me=0;me<he.length;me+=1){var je=he[me],Ie=je.split(": "),Ue=Ie.shift(),pt=Ie.join(": ");le[w(Ue)]=pt}this._map=le}S.prototype.get=function(q){return this._map[w(q)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function C(){}C.prototype.open=function(q,le,he,me,je,Ie,Ue){q.open("GET",je);var pt=0;q.onprogress=function(){var G=q.responseText,se=G.slice(pt);pt+=se.length,he(se)},q.onerror=function(G){G.preventDefault(),me(new Error("NetworkError"))},q.onload=function(){me(null)},q.onabort=function(){me(null)},q.onreadystatechange=function(){if(q.readyState===i.HEADERS_RECEIVED){var G=q.status,se=q.statusText,Y=q.getResponseHeader("Content-Type"),ye=q.getAllResponseHeaders();le(G,se,Y,new S(ye))}},q.withCredentials=Ie;for(var Ke in Ue)Object.prototype.hasOwnProperty.call(Ue,Ke)&&q.setRequestHeader(Ke,Ue[Ke]);return q.send(),q};function I(q){this._headers=q}I.prototype.get=function(q){return this._headers.get(q)};function P(){}P.prototype.open=function(q,le,he,me,je,Ie,Ue){var pt=null,Ke=new y,G=Ke.signal,se=new f;return d(je,{headers:Ue,credentials:Ie?"include":"same-origin",signal:G,cache:"no-store"}).then(function(Y){return pt=Y.body.getReader(),le(Y.status,Y.statusText,Y.headers.get("Content-Type"),new I(Y.headers)),new u(function(ye,$e){var tt=function(){pt.read().then(function(Ve){if(Ve.done)ye(void 0);else{var ct=se.decode(Ve.value,{stream:!0});he(ct),tt()}}).catch(function(Ve){$e(Ve)})};tt()})}).catch(function(Y){if(Y.name!=="AbortError")return Y}).then(function(Y){me(Y)}),{abort:function(){pt!=null&&pt.cancel(),Ke.abort()}}};function A(){this._listeners=Object.create(null)}function L(q){n(function(){throw q},0)}A.prototype.dispatchEvent=function(q){q.target=this;var le=this._listeners[q.type];if(le!=null)for(var he=le.length,me=0;me<he;me+=1){var je=le[me];try{typeof je.handleEvent=="function"?je.handleEvent(q):je.call(this,q)}catch(Ie){L(Ie)}}},A.prototype.addEventListener=function(q,le){q=String(q);var he=this._listeners,me=he[q];me==null&&(me=[],he[q]=me);for(var je=!1,Ie=0;Ie<me.length;Ie+=1)me[Ie]===le&&(je=!0);je||me.push(le)},A.prototype.removeEventListener=function(q,le){q=String(q);var he=this._listeners,me=he[q];if(me!=null){for(var je=[],Ie=0;Ie<me.length;Ie+=1)me[Ie]!==le&&je.push(me[Ie]);je.length===0?delete he[q]:he[q]=je}};function W(q){this.type=q,this.target=void 0}function Z(q,le){W.call(this,q),this.data=le.data,this.lastEventId=le.lastEventId}Z.prototype=Object.create(W.prototype);function B(q,le){W.call(this,q),this.status=le.status,this.statusText=le.statusText,this.headers=le.headers}B.prototype=Object.create(W.prototype);function F(q,le){W.call(this,q),this.error=le.error}F.prototype=Object.create(W.prototype);var j=-1,U=0,K=1,D=2,E=-1,H=0,Q=1,T=2,ce=3,pe=/^text\/event\-stream(;.*)?$/i,fe=1e3,ve=18e6,_e=function(q,le){var he=q==null?le:parseInt(q,10);return he!==he&&(he=le),Ce(he)},Ce=function(q){return Math.min(Math.max(q,fe),ve)},be=function(q,le,he){try{typeof le=="function"&&le.call(q,he)}catch(me){L(me)}};function de(q,le){A.call(this),le=le||{},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,Ae(this,q,le)}function te(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var we=d!=null&&p!=null&&"body"in p.prototype;function Ae(q,le,he){le=String(le);var me=!!he.withCredentials,je=he.lastEventIdQueryParameterName||"lastEventId",Ie=Ce(1e3),Ue=_e(he.heartbeatTimeout,45e3),pt="",Ke=Ie,G=!1,se=0,Y=he.headers||{},ye=he.Transport,$e=we&&ye==null?void 0:new x(ye!=null?new ye:te()),tt=ye!=null&&typeof ye!="string"?new ye:$e==null?new P:new C,Ve=void 0,ct=0,$t=j,Wt="",z="",X="",ze="",Ge=H,gt=0,Je=0,ir=function(vt,bt,Yt,Gt){if($t===U)if(vt===200&&Yt!=null&&pe.test(Yt)){$t=K,G=Date.now(),Ke=Ie,q.readyState=K;var sr=new B("open",{status:vt,statusText:bt,headers:Gt});q.dispatchEvent(sr),be(q,q.onopen,sr)}else{var Ut="";vt!==200?(bt&&(bt=bt.replace(/\s+/g," ")),Ut="EventSource's response has a status "+vt+" "+bt+" that is not 200. Aborting the connection."):Ut="EventSource's response has a Content-Type specifying an unsupported type: "+(Yt==null?"-":Yt.replace(/\s+/g," "))+". Aborting the connection.",ar();var sr=new B("error",{status:vt,statusText:bt,headers:Gt});q.dispatchEvent(sr),be(q,q.onerror,sr),console.error(Ut)}},kr=function(vt){if($t===K){for(var bt=-1,Yt=0;Yt<vt.length;Yt+=1){var Gt=vt.charCodeAt(Yt);(Gt===`
140
+ `),me=0;me<he.length;me+=1){var je=he[me],Ie=je.split(": "),Ue=Ie.shift(),pt=Ie.join(": ");le[w(Ue)]=pt}this._map=le}S.prototype.get=function(q){return this._map[w(q)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function C(){}C.prototype.open=function(q,le,he,me,je,Ie,Ue){q.open("GET",je);var pt=0;q.onprogress=function(){var G=q.responseText,se=G.slice(pt);pt+=se.length,he(se)},q.onerror=function(G){G.preventDefault(),me(new Error("NetworkError"))},q.onload=function(){me(null)},q.onabort=function(){me(null)},q.onreadystatechange=function(){if(q.readyState===i.HEADERS_RECEIVED){var G=q.status,se=q.statusText,Y=q.getResponseHeader("Content-Type"),ye=q.getAllResponseHeaders();le(G,se,Y,new S(ye))}},q.withCredentials=Ie;for(var Ke in Ue)Object.prototype.hasOwnProperty.call(Ue,Ke)&&q.setRequestHeader(Ke,Ue[Ke]);return q.send(),q};function I(q){this._headers=q}I.prototype.get=function(q){return this._headers.get(q)};function P(){}P.prototype.open=function(q,le,he,me,je,Ie,Ue){var pt=null,Ke=new y,G=Ke.signal,se=new f;return d(je,{headers:Ue,credentials:Ie?"include":"same-origin",signal:G,cache:"no-store"}).then(function(Y){return pt=Y.body.getReader(),le(Y.status,Y.statusText,Y.headers.get("Content-Type"),new I(Y.headers)),new u(function(ye,$e){var tt=function(){pt.read().then(function(Ve){if(Ve.done)ye(void 0);else{var ct=se.decode(Ve.value,{stream:!0});he(ct),tt()}}).catch(function(Ve){$e(Ve)})};tt()})}).catch(function(Y){if(Y.name!=="AbortError")return Y}).then(function(Y){me(Y)}),{abort:function(){pt!=null&&pt.cancel(),Ke.abort()}}};function A(){this._listeners=Object.create(null)}function L(q){n(function(){throw q},0)}A.prototype.dispatchEvent=function(q){q.target=this;var le=this._listeners[q.type];if(le!=null)for(var he=le.length,me=0;me<he;me+=1){var je=le[me];try{typeof je.handleEvent=="function"?je.handleEvent(q):je.call(this,q)}catch(Ie){L(Ie)}}},A.prototype.addEventListener=function(q,le){q=String(q);var he=this._listeners,me=he[q];me==null&&(me=[],he[q]=me);for(var je=!1,Ie=0;Ie<me.length;Ie+=1)me[Ie]===le&&(je=!0);je||me.push(le)},A.prototype.removeEventListener=function(q,le){q=String(q);var he=this._listeners,me=he[q];if(me!=null){for(var je=[],Ie=0;Ie<me.length;Ie+=1)me[Ie]!==le&&je.push(me[Ie]);je.length===0?delete he[q]:he[q]=je}};function K(q){this.type=q,this.target=void 0}function z(q,le){K.call(this,q),this.data=le.data,this.lastEventId=le.lastEventId}z.prototype=Object.create(K.prototype);function B(q,le){K.call(this,q),this.status=le.status,this.statusText=le.statusText,this.headers=le.headers}B.prototype=Object.create(K.prototype);function F(q,le){K.call(this,q),this.error=le.error}F.prototype=Object.create(K.prototype);var j=-1,Z=0,W=1,D=2,E=-1,H=0,Q=1,T=2,ce=3,pe=/^text\/event\-stream(;.*)?$/i,fe=1e3,ve=18e6,_e=function(q,le){var he=q==null?le:parseInt(q,10);return he!==he&&(he=le),Ce(he)},Ce=function(q){return Math.min(Math.max(q,fe),ve)},be=function(q,le,he){try{typeof le=="function"&&le.call(q,he)}catch(me){L(me)}};function de(q,le){A.call(this),le=le||{},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,Ae(this,q,le)}function te(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var we=d!=null&&p!=null&&"body"in p.prototype;function Ae(q,le,he){le=String(le);var me=!!he.withCredentials,je=he.lastEventIdQueryParameterName||"lastEventId",Ie=Ce(1e3),Ue=_e(he.heartbeatTimeout,45e3),pt="",Ke=Ie,G=!1,se=0,Y=he.headers||{},ye=he.Transport,$e=we&&ye==null?void 0:new x(ye!=null?new ye:te()),tt=ye!=null&&typeof ye!="string"?new ye:$e==null?new P:new C,Ve=void 0,ct=0,$t=j,Wt="",U="",X="",ze="",Ge=H,gt=0,Je=0,ir=function(vt,bt,Yt,Gt){if($t===Z)if(vt===200&&Yt!=null&&pe.test(Yt)){$t=W,G=Date.now(),Ke=Ie,q.readyState=W;var sr=new B("open",{status:vt,statusText:bt,headers:Gt});q.dispatchEvent(sr),be(q,q.onopen,sr)}else{var Ut="";vt!==200?(bt&&(bt=bt.replace(/\s+/g," ")),Ut="EventSource's response has a status "+vt+" "+bt+" that is not 200. Aborting the connection."):Ut="EventSource's response has a Content-Type specifying an unsupported type: "+(Yt==null?"-":Yt.replace(/\s+/g," "))+". Aborting the connection.",ar();var sr=new B("error",{status:vt,statusText:bt,headers:Gt});q.dispatchEvent(sr),be(q,q.onerror,sr),console.error(Ut)}},kr=function(vt){if($t===W){for(var bt=-1,Yt=0;Yt<vt.length;Yt+=1){var Gt=vt.charCodeAt(Yt);(Gt===`
141
141
  `.charCodeAt(0)||Gt==="\r".charCodeAt(0))&&(bt=Yt)}var sr=(bt!==-1?ze:"")+vt.slice(0,bt+1);ze=(bt===-1?ze:"")+vt.slice(bt+1),vt!==""&&(G=Date.now(),se+=vt.length);for(var Ut=0;Ut<sr.length;Ut+=1){var Gt=sr.charCodeAt(Ut);if(Ge===E&&Gt===`
142
142
  `.charCodeAt(0))Ge=H;else if(Ge===E&&(Ge=H),Gt==="\r".charCodeAt(0)||Gt===`
143
143
  `.charCodeAt(0)){if(Ge!==H){Ge===Q&&(Je=Ut+1);var Ir=sr.slice(gt,Je-1),Rr=sr.slice(Je+(Je<Ut&&sr.charCodeAt(Je)===" ".charCodeAt(0)?1:0),Ut);Ir==="data"?(Wt+=`
144
- `,Wt+=Rr):Ir==="id"?z=Rr:Ir==="event"?X=Rr:Ir==="retry"?(Ie=_e(Rr,Ie),Ke=Ie):Ir==="heartbeatTimeout"&&(Ue=_e(Rr,Ue),ct!==0&&(o(ct),ct=n(function(){sn()},Ue)))}if(Ge===H){if(Wt!==""){pt=z,X===""&&(X="message");var tn=new Z(X,{data:Wt.slice(1),lastEventId:z});if(q.dispatchEvent(tn),X==="open"?be(q,q.onopen,tn):X==="message"?be(q,q.onmessage,tn):X==="error"&&be(q,q.onerror,tn),$t===D)return}Wt="",X=""}Ge=Gt==="\r".charCodeAt(0)?E:H}else Ge===H&&(gt=Ut,Ge=Q),Ge===Q?Gt===":".charCodeAt(0)&&(Je=Ut+1,Ge=T):Ge===T&&(Ge=ce)}}},Kt=function(vt){if($t===K||$t===U){$t=j,ct!==0&&(o(ct),ct=0),ct=n(function(){sn()},Ke),Ke=Ce(Math.min(Ie*16,Ke*2)),q.readyState=U;var bt=new F("error",{error:vt});q.dispatchEvent(bt),be(q,q.onerror,bt),vt!=null&&console.error(vt)}},ar=function(){$t=D,Ve!=null&&(Ve.abort(),Ve=void 0),ct!==0&&(o(ct),ct=0),q.readyState=D},sn=function(){if(ct=0,$t!==j){if(!G&&Ve!=null)Kt(new Error("No activity within "+Ue+" milliseconds. "+($t===U?"No response received.":se+" chars received.")+" Reconnecting.")),Ve!=null&&(Ve.abort(),Ve=void 0);else{var vt=Math.max((G||Date.now())+Ue-Date.now(),1);G=!1,ct=n(function(){sn()},vt)}return}G=!1,se=0,ct=n(function(){sn()},Ue),$t=U,Wt="",X="",z=pt,ze="",gt=0,Je=0,Ge=H;var bt=le;if(le.slice(0,5)!=="data:"&&le.slice(0,5)!=="blob:"&&pt!==""){var Yt=le.indexOf("?");bt=Yt===-1?le:le.slice(0,Yt+1)+le.slice(Yt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rr,tn){return tn===je?"":Rr}),bt+=(le.indexOf("?")===-1?"?":"&")+je+"="+encodeURIComponent(pt)}var Gt=q.withCredentials,sr={};sr.Accept="text/event-stream";var Ut=q.headers;if(Ut!=null)for(var Ir in Ut)Object.prototype.hasOwnProperty.call(Ut,Ir)&&(sr[Ir]=Ut[Ir]);try{Ve=tt.open($e,ir,kr,Kt,bt,Gt,sr)}catch(Rr){throw ar(),Rr}};q.url=le,q.readyState=U,q.withCredentials=me,q.headers=Y,q._close=ar,sn()}de.prototype=Object.create(A.prototype),de.prototype.CONNECTING=U,de.prototype.OPEN=K,de.prototype.CLOSED=D,de.prototype.close=function(){this._close()},de.CONNECTING=U,de.OPEN=K,de.CLOSED=D,de.prototype.withCredentials=void 0;var qe=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(qe=de),function(q){{var le=q(t);le!==void 0&&(e.exports=le)}}(function(q){q.EventSourcePolyfill=de,q.NativeEventSource=c,q.EventSource=qe})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:We:globalThis)})(Bg,Bg.exports);var XG=Bg.exports;const QG=St(XG),eJ=(e,t={})=>{const r=new QG.EventSourcePolyfill(e,{headers:t.headers}),n=new oC;return r.onopen=o=>n.emit("open",o),r.onmessage=o=>n.emit("message",o),r.onerror=o=>n.emit("error",o),{emitter:n,source:r}},tJ=async(e,t={})=>{const{emitter:r,source:n}=eJ(e,t);return await new Promise((o,i)=>{r.on("open",()=>{o()}),r.on("error",a=>{i(a)})}).finally(()=>r.cleanup()),{on:r.on.bind(r),close:()=>{r.cleanup(),n.close()}}},rJ=V.object({type:V.literal("message_created"),data:V.object({id:V.string().describe("Id of the [Message](#schema_message)"),createdAt:V.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:V.union([V.object({audioUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("audio")}),V.object({title:V.string().min(1),subtitle:V.string().optional(),imageUrl:V.string().optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),type:V.literal("card"),className:V.string().describe("CSS className to apply to the message").optional()}),V.object({items:V.array(V.object({title:V.string().min(1),subtitle:V.string().optional(),imageUrl:V.string().optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional()})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("carousel")}),V.object({text:V.string(),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("choice"),disableFreeText:V.boolean().optional()}),V.object({text:V.string(),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("dropdown")}),V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional(),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("file")}),V.object({imageUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("image")}),V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional(),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("location")}),V.object({markdown:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("markdown")}),V.object({text:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("text")}),V.object({videoUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("video")})]).describe("Payload is the content type of the message."),userId:V.string().describe("ID of the [User](#schema_user)"),conversationId:V.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),nJ=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),oJ=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),iJ=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),aJ=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),sJ=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),cJ={messageCreated:rJ,webchatVisibility:nJ,webchatConfig:oJ,custom:iJ,typingStarted:aJ,typingStopped:sJ},iC="unknown error",Th=class Th extends oC{constructor(r){super();k(this,"_state",{status:"disconnected"});k(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const r=this._connect();this._state={status:"connecting",connectionPromise:r},await r});k(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let r;this._state.status==="connecting"?r=await this._state.connectionPromise:r=this._state.source,this._disconnectSync(r)});k(this,"_connect",async()=>{const r=await tJ(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return r.on("message",this._handleMessage),r.on("error",this._handleError(r)),this._state={status:"connected",source:r},r});k(this,"_disconnectSync",r=>{r.close(),this._state={status:"disconnected"}});k(this,"_handleMessage",r=>{const n=this._parseSignal(r.data);this.emit(n.type,n.data)});k(this,"_handleError",r=>n=>{this._disconnectSync(r);const o=this._toError(n);this.emit("error",o)});k(this,"_parseSignal",r=>{for(const n of Object.values(cJ)){const o=this._safeJsonParse(r),i=n.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:r}});k(this,"_safeJsonParse",r=>{try{return JSON.parse(r)}catch{return r}});k(this,"_toError",r=>{if(r instanceof Error)return r;if(typeof r=="string")return new Error(r);if(r===null)return new Error(iC);if(typeof r=="object"&&"message"in r)return this._toError(r.message);try{const n=JSON.stringify(r);return new Error(n)}catch{return new Error(iC)}});this._props=r}get status(){return this._state.status}};k(Th,"listen",async r=>{const n=new Th(r);return await n.connect(),n});let Ug=Th;const aC=100*1024*1024,lJ=aC,uJ=aC,dJ=6e4;class fJ{constructor(t){k(this,"_auto");k(this,"createConversation",t=>this._auto.createConversation(t));k(this,"getConversation",t=>this._auto.getConversation(t));k(this,"deleteConversation",t=>this._auto.deleteConversation(t));k(this,"listConversations",t=>this._auto.listConversations(t));k(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));k(this,"addParticipant",t=>this._auto.addParticipant(t));k(this,"removeParticipant",t=>this._auto.removeParticipant(t));k(this,"getParticipant",t=>this._auto.getParticipant(t));k(this,"listParticipants",t=>this._auto.listParticipants(t));k(this,"createMessage",t=>this._auto.createMessage(t));k(this,"getMessage",t=>this._auto.getMessage(t));k(this,"deleteMessage",t=>this._auto.deleteMessage(t));k(this,"createFile",t=>this._auto.createFile(t));k(this,"createUser",t=>this._auto.createUser(t));k(this,"getUser",t=>this._auto.getUser(t));k(this,"updateUser",t=>this._auto.updateUser(t));k(this,"deleteUser",t=>this._auto.deleteUser(t));k(this,"createEvent",t=>this._auto.createEvent(t));k(this,"getEvent",t=>this._auto.getEvent(t));k(this,"listenConversation",async({id:t,"x-user-key":r})=>await Ug.listen({url:this.props.apiUrl,conversationId:t,userKey:r}));this.props=t;const{apiUrl:r}=t,n={...t.headers},o=t.timeout??dJ,i=SO.create({baseURL:r,headers:n,withCredentials:!0,timeout:o,maxBodyLength:lJ,maxContentLength:uJ});this._auto=new YG(i)}}const Ff={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},dn=(e,t)=>e.status===t,vo=(e,t)=>Ff[e.status]<Ff[t],sC=(e,t)=>Ff[e.status]>=Ff[t];class bo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const cC=["audio","file","image","video"],lC=e=>cC.includes(e);class pJ extends Gm{constructor(r){super();k(this,"_client");k(this,"_webhookId");k(this,"_apiUrl");k(this,"_state",{status:"disconnected"});k(this,"mode","pushpin");k(this,"_initialConnect",async({data:r,name:n,pictureUrl:o})=>{if(sC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(dn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:n,pictureUrl:o,userData:r});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});k(this,"_reConnect",async(r,{data:n,name:o,pictureUrl:i})=>{if(sC(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return dn(this._state,"user_creating")||(this._state={status:"user_created",userId:r.userId,userKey:r.userToken},await this._client.updateUser({"x-user-key":r.userToken,name:o,pictureUrl:i,userData:n})),r});k(this,"_mapMessage",r=>{const{payload:n,disableInput:o}=bE(r.payload);return{id:r.id,conversationId:r.conversationId,authorId:r.userId,sentOn:new Date(r.createdAt),payload:n,disableInput:o}});const n=`${r.apiUrl}/${r.clientId}`;this._webhookId=r.clientId,this._apiUrl=n,this._client=new fJ({apiUrl:n})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!vo(this._state,"user_created"))return this._state.userId}async getUser(){if(vo(this._state,"user_created"))throw new bo(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(vo(this._state,"user_created"))throw new bo(this._state);const{user:n}=await this._client.updateUser({"x-user-key":this._state.userKey,name:r.name,pictureUrl:r.pictureUrl,userData:r.data});return n}get conversationId(){if(!vo(this._state,"conversation_created"))return this._state.conversationId}async connect(r,n,o={}){const i={data:n,...o};return r?await this.userExists(r)?this._reConnect(r,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){dn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():dn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state));const{size:o,name:i}=r,s=await(h=>new Promise((y,m)=>{const g=new FileReader;g.onload=v=>{var b;return y((b=v.target)==null?void 0:b.result)},g.onerror=v=>{var b;return m((b=v.target)==null?void 0:b.error)},g.readAsArrayBuffer(h)}))(r),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":n.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const d=l.split("/").shift()??"",p=lC(d)?d:"file",f=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:f}),this.emit("messageSent",u),{fileUrl:u,name:i,type:p}}async sendMessage(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"text",text:r}}),this.emit("messageSent",r)}async sendEvent(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"custom",data:r}})}async switchConversation(r){if(vo(this._state,"user_created"))throw new bo(this._state);dn(this._state,"conversation_created")&&this._state.conversationId===r||dn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,r))}async conversationExists(r){if(vo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(gg(n)&&n.code===404)return!1;throw n}}async userExists({userToken:r}){try{return await this._client.getUser({"x-user-key":r}),!0}catch(n){const o=i=>i.code===404||i.code===401;if(gg(n)&&o(n))return!1;throw n}}async newConversation(){if(vo(this._state,"user_created"))throw new bo(this._state);dn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(r){const{conversation:{id:n}}=await this._client.createConversation({"x-user-key":r.userKey}),o=await this._connectConversation(r,n);return await this._client.createEvent({"x-user-key":r.userKey,conversationId:n,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!dn(this._state,"conversation_created"))return[];const{conversationId:r,userKey:n}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:r,"x-user-key":n,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(r,n){const o=await this._client.listenConversation({id:n,"x-user-key":r.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==r.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:r.userId,userKey:r.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",n),this._state={status:"conversation_created",userId:r.userId,userKey:r.userKey,conversationId:n,signalEmitter:o},this._state}}const uC=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>r==="messaging"?new eH({url:t,clientId:e}):new pJ({apiUrl:t,clientId:e}),hJ=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>{const[n]=$.useState(uC({clientId:e,apiUrl:t,mode:r}));return n},mJ=(e,t={})=>new Promise((r,n)=>{if(typeof window>"u")return n("Window is not defined");if(!e)return n("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),r({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),n(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>n("Timeout"),t.timeout))});let yJ={data:""},gJ=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||yJ,vJ=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,bJ=/\/\*[^]*?\*\/| +/g,dC=/\n+/g,wi=(e,t)=>{let r="",n="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?wi(a,i):i+"{"+wi(a,i[1]=="k"?"":t)+"}":typeof a=="object"?n+=wi(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=wi.p?wi.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},Zo={},fC=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+fC(e[r]);return t}return e},wJ=(e,t,r,n,o)=>{let i=fC(e),a=Zo[i]||(Zo[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Zo[a]){let c=i!==e?e:(l=>{let u,d,p=[{}];for(;u=vJ.exec(l.replace(bJ,""));)u[4]?p.shift():u[3]?(d=u[3].replace(dC," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(dC," ").trim();return p[0]})(e);Zo[a]=wi(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let s=r&&Zo.g?Zo.g:null;return r&&(Zo.g=Zo[a]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Zo[a],t,n,s),a},xJ=(e,t,r)=>e.reduce((n,o,i)=>{let a=t[i];if(a&&a.call){let s=a(r),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":wi(s,""):s===!1?"":s}return n+o+(a??"")},"");function qf(e){let t=this||{},r=e.call?e(t.p):e;return wJ(r.unshift?r.raw?xJ(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,gJ(t.target),t.g,t.o,t.k)}let pC,zg,Zg;qf.bind({g:1});let Vo=qf.bind({k:1});function SJ(e,t,r,n){wi.p=t,pC=e,zg=r,Zg=n}function xi(e,t){let r=this||{};return function(){let n=arguments;function o(i,a){let s=Object.assign({},i),c=s.className||o.className;r.p=Object.assign({theme:zg&&zg()},s),r.o=/ *go\d+/.test(c),s.className=qf.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Zg&&l[0]&&Zg(s),pC(l,s)}return t?t(o):o}}var _J=e=>typeof e=="function",Bf=(e,t)=>_J(e)?e(t):e,EJ=(()=>{let e=0;return()=>(++e).toString()})(),hC=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),kJ=20,Uf=new Map,TJ=1e3,mC=e=>{if(Uf.has(e))return;let t=setTimeout(()=>{Uf.delete(e),la({type:4,toastId:e})},TJ);Uf.set(e,t)},$J=e=>{let t=Uf.get(e);t&&clearTimeout(t)},Vg=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,kJ)};case 1:return t.toast.id&&$J(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:r}=t;return e.toasts.find(i=>i.id===r.id)?Vg(e,{type:1,toast:r}):Vg(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?mC(n):e.toasts.forEach(i=>{mC(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},zf=[],Zf={toasts:[],pausedAt:void 0},la=e=>{Zf=Vg(Zf,e),zf.forEach(t=>{t(Zf)})},OJ={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},CJ=(e={})=>{let[t,r]=$.useState(Zf);$.useEffect(()=>(zf.push(r),()=>{let o=zf.indexOf(r);o>-1&&zf.splice(o,1)}),[t]);let n=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||OJ[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:n}},AJ=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||EJ()}),tl=e=>(t,r)=>{let n=AJ(t,e,r);return la({type:2,toast:n}),n.id},Mn=(e,t)=>tl("blank")(e,t);Mn.error=tl("error"),Mn.success=tl("success"),Mn.loading=tl("loading"),Mn.custom=tl("custom"),Mn.dismiss=e=>{la({type:3,toastId:e})},Mn.remove=e=>la({type:4,toastId:e}),Mn.promise=(e,t,r)=>{let n=Mn.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Mn.success(Bf(t.success,o),{id:n,...r,...r==null?void 0:r.success}),o)).catch(o=>{Mn.error(Bf(t.error,o),{id:n,...r,...r==null?void 0:r.error})}),e};var IJ=(e,t)=>{la({type:1,toast:{id:e,height:t}})},RJ=()=>{la({type:5,time:Date.now()})},PJ=e=>{let{toasts:t,pausedAt:r}=CJ(e);$.useEffect(()=>{if(r)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Mn.dismiss(s.id);return}return setTimeout(()=>Mn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=$.useCallback(()=>{r&&la({type:6,time:Date.now()})},[r]),o=$.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=a||{},u=t.filter(f=>(f.position||l)===(i.position||l)&&f.height),d=u.findIndex(f=>f.id===i.id),p=u.filter((f,h)=>h<d&&f.visible).length;return u.filter(f=>f.visible).slice(...s?[p+1]:[0,p]).reduce((f,h)=>f+(h.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:IJ,startPause:RJ,endPause:n,calculateOffset:o}}},NJ=Vo`
144
+ `,Wt+=Rr):Ir==="id"?U=Rr:Ir==="event"?X=Rr:Ir==="retry"?(Ie=_e(Rr,Ie),Ke=Ie):Ir==="heartbeatTimeout"&&(Ue=_e(Rr,Ue),ct!==0&&(o(ct),ct=n(function(){sn()},Ue)))}if(Ge===H){if(Wt!==""){pt=U,X===""&&(X="message");var tn=new z(X,{data:Wt.slice(1),lastEventId:U});if(q.dispatchEvent(tn),X==="open"?be(q,q.onopen,tn):X==="message"?be(q,q.onmessage,tn):X==="error"&&be(q,q.onerror,tn),$t===D)return}Wt="",X=""}Ge=Gt==="\r".charCodeAt(0)?E:H}else Ge===H&&(gt=Ut,Ge=Q),Ge===Q?Gt===":".charCodeAt(0)&&(Je=Ut+1,Ge=T):Ge===T&&(Ge=ce)}}},Kt=function(vt){if($t===W||$t===Z){$t=j,ct!==0&&(o(ct),ct=0),ct=n(function(){sn()},Ke),Ke=Ce(Math.min(Ie*16,Ke*2)),q.readyState=Z;var bt=new F("error",{error:vt});q.dispatchEvent(bt),be(q,q.onerror,bt),vt!=null&&console.error(vt)}},ar=function(){$t=D,Ve!=null&&(Ve.abort(),Ve=void 0),ct!==0&&(o(ct),ct=0),q.readyState=D},sn=function(){if(ct=0,$t!==j){if(!G&&Ve!=null)Kt(new Error("No activity within "+Ue+" milliseconds. "+($t===Z?"No response received.":se+" chars received.")+" Reconnecting.")),Ve!=null&&(Ve.abort(),Ve=void 0);else{var vt=Math.max((G||Date.now())+Ue-Date.now(),1);G=!1,ct=n(function(){sn()},vt)}return}G=!1,se=0,ct=n(function(){sn()},Ue),$t=Z,Wt="",X="",U=pt,ze="",gt=0,Je=0,Ge=H;var bt=le;if(le.slice(0,5)!=="data:"&&le.slice(0,5)!=="blob:"&&pt!==""){var Yt=le.indexOf("?");bt=Yt===-1?le:le.slice(0,Yt+1)+le.slice(Yt+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(Rr,tn){return tn===je?"":Rr}),bt+=(le.indexOf("?")===-1?"?":"&")+je+"="+encodeURIComponent(pt)}var Gt=q.withCredentials,sr={};sr.Accept="text/event-stream";var Ut=q.headers;if(Ut!=null)for(var Ir in Ut)Object.prototype.hasOwnProperty.call(Ut,Ir)&&(sr[Ir]=Ut[Ir]);try{Ve=tt.open($e,ir,kr,Kt,bt,Gt,sr)}catch(Rr){throw ar(),Rr}};q.url=le,q.readyState=Z,q.withCredentials=me,q.headers=Y,q._close=ar,sn()}de.prototype=Object.create(A.prototype),de.prototype.CONNECTING=Z,de.prototype.OPEN=W,de.prototype.CLOSED=D,de.prototype.close=function(){this._close()},de.CONNECTING=Z,de.OPEN=W,de.CLOSED=D,de.prototype.withCredentials=void 0;var qe=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(qe=de),function(q){{var le=q(t);le!==void 0&&(e.exports=le)}}(function(q){q.EventSourcePolyfill=de,q.NativeEventSource=c,q.EventSource=qe})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:We:globalThis)})(Bg,Bg.exports);var XG=Bg.exports;const QG=St(XG),eJ=(e,t={})=>{const r=new QG.EventSourcePolyfill(e,{headers:t.headers}),n=new oC;return r.onopen=o=>n.emit("open",o),r.onmessage=o=>n.emit("message",o),r.onerror=o=>n.emit("error",o),{emitter:n,source:r}},tJ=async(e,t={})=>{const{emitter:r,source:n}=eJ(e,t);return await new Promise((o,i)=>{r.on("open",()=>{o()}),r.on("error",a=>{i(a)})}).finally(()=>r.cleanup()),{on:r.on.bind(r),close:()=>{r.cleanup(),n.close()}}},rJ=V.object({type:V.literal("message_created"),data:V.object({id:V.string().describe("Id of the [Message](#schema_message)"),createdAt:V.string().datetime().describe("Creation date of the [Message](#schema_message) in ISO 8601 format"),payload:V.union([V.object({audioUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("audio")}),V.object({title:V.string().min(1),subtitle:V.string().optional(),imageUrl:V.string().optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),type:V.literal("card"),className:V.string().describe("CSS className to apply to the message").optional()}),V.object({items:V.array(V.object({title:V.string().min(1),subtitle:V.string().optional(),imageUrl:V.string().optional(),actions:V.array(V.object({action:V.enum(["postback","url","say"]),label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional()})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("carousel")}),V.object({text:V.string(),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("choice"),disableFreeText:V.boolean().optional()}),V.object({text:V.string(),options:V.array(V.object({label:V.string().min(1),value:V.string().min(1)})),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("dropdown")}),V.object({fileUrl:V.string().min(1),title:V.string().min(1).optional(),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("file")}),V.object({imageUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("image")}),V.object({latitude:V.number(),longitude:V.number(),address:V.string().optional(),title:V.string().optional(),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("location")}),V.object({markdown:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("markdown")}),V.object({text:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("text")}),V.object({videoUrl:V.string().min(1),className:V.string().describe("CSS className to apply to the message").optional(),type:V.literal("video")})]).describe("Payload is the content type of the message."),userId:V.string().describe("ID of the [User](#schema_user)"),conversationId:V.string().describe("ID of the [Conversation](#schema_conversation)")}).describe("The Message object represents a message in a [Conversation](#schema_conversation) for a specific [User](#schema_user).")}),nJ=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),oJ=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),iJ=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),aJ=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),sJ=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),cJ={messageCreated:rJ,webchatVisibility:nJ,webchatConfig:oJ,custom:iJ,typingStarted:aJ,typingStopped:sJ},iC="unknown error",Th=class Th extends oC{constructor(r){super();k(this,"_state",{status:"disconnected"});k(this,"connect",async()=>{if(this._state.status==="connected")return;if(this._state.status==="connecting"){await this._state.connectionPromise;return}const r=this._connect();this._state={status:"connecting",connectionPromise:r},await r});k(this,"disconnect",async()=>{if(this._state.status==="disconnected")return;let r;this._state.status==="connecting"?r=await this._state.connectionPromise:r=this._state.source,this._disconnectSync(r)});k(this,"_connect",async()=>{const r=await tJ(`${this._props.url}/conversations/${this._props.conversationId}/listen`,{headers:{"x-user-key":this._props.userKey}});return r.on("message",this._handleMessage),r.on("error",this._handleError(r)),this._state={status:"connected",source:r},r});k(this,"_disconnectSync",r=>{r.close(),this._state={status:"disconnected"}});k(this,"_handleMessage",r=>{const n=this._parseSignal(r.data);this.emit(n.type,n.data)});k(this,"_handleError",r=>n=>{this._disconnectSync(r);const o=this._toError(n);this.emit("error",o)});k(this,"_parseSignal",r=>{for(const n of Object.values(cJ)){const o=this._safeJsonParse(r),i=n.safeParse(o);if(i.success)return i.data}return{type:"unknown",data:r}});k(this,"_safeJsonParse",r=>{try{return JSON.parse(r)}catch{return r}});k(this,"_toError",r=>{if(r instanceof Error)return r;if(typeof r=="string")return new Error(r);if(r===null)return new Error(iC);if(typeof r=="object"&&"message"in r)return this._toError(r.message);try{const n=JSON.stringify(r);return new Error(n)}catch{return new Error(iC)}});this._props=r}get status(){return this._state.status}};k(Th,"listen",async r=>{const n=new Th(r);return await n.connect(),n});let Ug=Th;const aC=100*1024*1024,lJ=aC,uJ=aC,dJ=6e4;class fJ{constructor(t){k(this,"_auto");k(this,"createConversation",t=>this._auto.createConversation(t));k(this,"getConversation",t=>this._auto.getConversation(t));k(this,"deleteConversation",t=>this._auto.deleteConversation(t));k(this,"listConversations",t=>this._auto.listConversations(t));k(this,"listConversationMessages",t=>this._auto.listConversationMessages(t));k(this,"addParticipant",t=>this._auto.addParticipant(t));k(this,"removeParticipant",t=>this._auto.removeParticipant(t));k(this,"getParticipant",t=>this._auto.getParticipant(t));k(this,"listParticipants",t=>this._auto.listParticipants(t));k(this,"createMessage",t=>this._auto.createMessage(t));k(this,"getMessage",t=>this._auto.getMessage(t));k(this,"deleteMessage",t=>this._auto.deleteMessage(t));k(this,"createFile",t=>this._auto.createFile(t));k(this,"createUser",t=>this._auto.createUser(t));k(this,"getUser",t=>this._auto.getUser(t));k(this,"updateUser",t=>this._auto.updateUser(t));k(this,"deleteUser",t=>this._auto.deleteUser(t));k(this,"createEvent",t=>this._auto.createEvent(t));k(this,"getEvent",t=>this._auto.getEvent(t));k(this,"listenConversation",async({id:t,"x-user-key":r})=>await Ug.listen({url:this.props.apiUrl,conversationId:t,userKey:r}));this.props=t;const{apiUrl:r}=t,n={...t.headers},o=t.timeout??dJ,i=SO.create({baseURL:r,headers:n,withCredentials:!0,timeout:o,maxBodyLength:lJ,maxContentLength:uJ});this._auto=new YG(i)}}const Ff={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},dn=(e,t)=>e.status===t,vo=(e,t)=>Ff[e.status]<Ff[t],sC=(e,t)=>Ff[e.status]>=Ff[t];class bo extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const cC=["audio","file","image","video"],lC=e=>cC.includes(e);class pJ extends Gm{constructor(r){super();k(this,"_client");k(this,"_webhookId");k(this,"_apiUrl");k(this,"_state",{status:"disconnected"});k(this,"mode","pushpin");k(this,"_initialConnect",async({data:r,name:n,pictureUrl:o})=>{if(sC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(dn(this._state,"user_creating"))return;this._state={status:"user_creating"};const{user:{id:i},key:a}=await this._client.createUser({name:n,pictureUrl:o,userData:r});return this._state={status:"user_created",userId:i,userKey:a},{userId:i,userToken:a}});k(this,"_reConnect",async(r,{data:n,name:o,pictureUrl:i})=>{if(sC(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return dn(this._state,"user_creating")||(this._state={status:"user_created",userId:r.userId,userKey:r.userToken},await this._client.updateUser({"x-user-key":r.userToken,name:o,pictureUrl:i,userData:n})),r});k(this,"_mapMessage",r=>{const{payload:n,disableInput:o}=bE(r.payload);return{id:r.id,conversationId:r.conversationId,authorId:r.userId,sentOn:new Date(r.createdAt),payload:n,disableInput:o}});const n=`${r.apiUrl}/${r.clientId}`;this._webhookId=r.clientId,this._apiUrl=n,this._client=new fJ({apiUrl:n})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!vo(this._state,"user_created"))return this._state.userId}async getUser(){if(vo(this._state,"user_created"))throw new bo(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(vo(this._state,"user_created"))throw new bo(this._state);const{user:n}=await this._client.updateUser({"x-user-key":this._state.userKey,name:r.name,pictureUrl:r.pictureUrl,userData:r.data});return n}get conversationId(){if(!vo(this._state,"conversation_created"))return this._state.conversationId}async connect(r,n,o={}){const i={data:n,...o};return r?await this.userExists(r)?this._reConnect(r,i):this._initialConnect(i):this._initialConnect(i)}async disconnect(){dn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():dn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state));const{size:o,name:i}=r,s=await(h=>new Promise((y,m)=>{const g=new FileReader;g.onload=v=>{var b;return y((b=v.target)==null?void 0:b.result)},g.onerror=v=>{var b;return m((b=v.target)==null?void 0:b.error)},g.readAsArrayBuffer(h)}))(r),{file:{uploadUrl:c,contentType:l,url:u}}=await this._client.createFile({"x-user-key":n.userKey,size:o,key:i,accessPolicies:["public_content"],index:!1});await fetch(c,{method:"PUT",headers:{"x-amz-tagging":"public=true"},body:s});const d=l.split("/").shift()??"",p=lC(d)?d:"file",f=p==="image"?{type:p,imageUrl:u}:p==="audio"?{type:p,audioUrl:u}:p==="video"?{type:p,videoUrl:u}:{type:p,fileUrl:u};return await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:f}),this.emit("messageSent",u),{fileUrl:u,name:i,type:p}}async sendMessage(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createMessage({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"text",text:r}}),this.emit("messageSent",r)}async sendEvent(r){if(vo(this._state,"user_created"))throw new bo(this._state);if(dn(this._state,"conversation_creating"))throw new bo(this._state);let n;dn(this._state,"conversation_created")?n=this._state:(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},n=await this._createNewConversation(this._state)),await this._client.createEvent({"x-user-key":n.userKey,conversationId:n.conversationId,payload:{type:"custom",data:r}})}async switchConversation(r){if(vo(this._state,"user_created"))throw new bo(this._state);dn(this._state,"conversation_created")&&this._state.conversationId===r||dn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._connectConversation(this._state,r))}async conversationExists(r){if(vo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(gg(n)&&n.code===404)return!1;throw n}}async userExists({userToken:r}){try{return await this._client.getUser({"x-user-key":r}),!0}catch(n){const o=i=>i.code===404||i.code===401;if(gg(n)&&o(n))return!1;throw n}}async newConversation(){if(vo(this._state,"user_created"))throw new bo(this._state);dn(this._state,"conversation_creating")||(this._state={status:"conversation_creating",userId:this._state.userId,userKey:this._state.userKey},await this._createNewConversation(this._state))}async _createNewConversation(r){const{conversation:{id:n}}=await this._client.createConversation({"x-user-key":r.userKey}),o=await this._connectConversation(r,n);return await this._client.createEvent({"x-user-key":r.userKey,conversationId:n,payload:{type:"conversation_started",data:{}}}),o}async listMessages(){if(!dn(this._state,"conversation_created"))return[];const{conversationId:r,userKey:n}=this._state,o=[];let i;do{const a=await this._client.listConversationMessages({id:r,"x-user-key":n,nextToken:i});o.push(...a.messages),i=a.meta.nextToken}while(i);return o.map(this._mapMessage)}async _connectConversation(r,n){const o=await this._client.listenConversation({id:n,"x-user-key":r.userKey});return o.on("unknown",i=>{typeof i=="string"&&i==="ping"||console.debug("unknown event",i)}),o.on("message_created",i=>{i.userId!==r.userId&&this.emit("message",this._mapMessage(i))}),o.on("error",()=>{this._state={status:"user_created",userId:r.userId,userKey:r.userKey},this.emit("error",new Error("Connection to conversation lost"))}),o.on("webchat_visibility",i=>{this.emit("webchatVisibility",i.visibility)}),o.on("webchat_config",i=>{this.emit("webchatConfig",i.config)}),o.on("typing_started",i=>{this.emit("isTyping",{isTyping:!0,timeout:i.timeout??5e3})}),o.on("typing_stopped",()=>{this.emit("isTyping",{isTyping:!1,timeout:0})}),o.on("custom",i=>{this.emit("customEvent",i.event)}),this.emit("conversation",n),this._state={status:"conversation_created",userId:r.userId,userKey:r.userKey,conversationId:n,signalEmitter:o},this._state}}const uC=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>r==="messaging"?new eH({url:t,clientId:e}):new pJ({apiUrl:t,clientId:e}),hJ=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>{const[n]=$.useState(uC({clientId:e,apiUrl:t,mode:r}));return n},mJ=(e,t={})=>new Promise((r,n)=>{if(typeof window>"u")return n("Window is not defined");if(!e)return n("Url is not defined");let o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),r({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),n(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>n("Timeout"),t.timeout))});let yJ={data:""},gJ=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||yJ,vJ=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,bJ=/\/\*[^]*?\*\/| +/g,dC=/\n+/g,wi=(e,t)=>{let r="",n="",o="";for(let i in e){let a=e[i];i[0]=="@"?i[1]=="i"?r=i+" "+a+";":n+=i[1]=="f"?wi(a,i):i+"{"+wi(a,i[1]=="k"?"":t)+"}":typeof a=="object"?n+=wi(a,t?t.replace(/([^,])+/g,s=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,s):s?s+" "+c:c)):i):a!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=wi.p?wi.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},Zo={},fC=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+fC(e[r]);return t}return e},wJ=(e,t,r,n,o)=>{let i=fC(e),a=Zo[i]||(Zo[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Zo[a]){let c=i!==e?e:(l=>{let u,d,p=[{}];for(;u=vJ.exec(l.replace(bJ,""));)u[4]?p.shift():u[3]?(d=u[3].replace(dC," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(dC," ").trim();return p[0]})(e);Zo[a]=wi(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let s=r&&Zo.g?Zo.g:null;return r&&(Zo.g=Zo[a]),((c,l,u,d)=>{d?l.data=l.data.replace(d,c):l.data.indexOf(c)===-1&&(l.data=u?c+l.data:l.data+c)})(Zo[a],t,n,s),a},xJ=(e,t,r)=>e.reduce((n,o,i)=>{let a=t[i];if(a&&a.call){let s=a(r),c=s&&s.props&&s.props.className||/^go/.test(s)&&s;a=c?"."+c:s&&typeof s=="object"?s.props?"":wi(s,""):s===!1?"":s}return n+o+(a??"")},"");function qf(e){let t=this||{},r=e.call?e(t.p):e;return wJ(r.unshift?r.raw?xJ(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,gJ(t.target),t.g,t.o,t.k)}let pC,zg,Zg;qf.bind({g:1});let Vo=qf.bind({k:1});function SJ(e,t,r,n){wi.p=t,pC=e,zg=r,Zg=n}function xi(e,t){let r=this||{};return function(){let n=arguments;function o(i,a){let s=Object.assign({},i),c=s.className||o.className;r.p=Object.assign({theme:zg&&zg()},s),r.o=/ *go\d+/.test(c),s.className=qf.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),Zg&&l[0]&&Zg(s),pC(l,s)}return t?t(o):o}}var _J=e=>typeof e=="function",Bf=(e,t)=>_J(e)?e(t):e,EJ=(()=>{let e=0;return()=>(++e).toString()})(),hC=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),kJ=20,Uf=new Map,TJ=1e3,mC=e=>{if(Uf.has(e))return;let t=setTimeout(()=>{Uf.delete(e),la({type:4,toastId:e})},TJ);Uf.set(e,t)},$J=e=>{let t=Uf.get(e);t&&clearTimeout(t)},Vg=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,kJ)};case 1:return t.toast.id&&$J(t.toast.id),{...e,toasts:e.toasts.map(i=>i.id===t.toast.id?{...i,...t.toast}:i)};case 2:let{toast:r}=t;return e.toasts.find(i=>i.id===r.id)?Vg(e,{type:1,toast:r}):Vg(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?mC(n):e.toasts.forEach(i=>{mC(i.id)}),{...e,toasts:e.toasts.map(i=>i.id===n||n===void 0?{...i,visible:!1}:i)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(i=>i.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let o=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(i=>({...i,pauseDuration:i.pauseDuration+o}))}}},zf=[],Zf={toasts:[],pausedAt:void 0},la=e=>{Zf=Vg(Zf,e),zf.forEach(t=>{t(Zf)})},OJ={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},CJ=(e={})=>{let[t,r]=$.useState(Zf);$.useEffect(()=>(zf.push(r),()=>{let o=zf.indexOf(r);o>-1&&zf.splice(o,1)}),[t]);let n=t.toasts.map(o=>{var i,a;return{...e,...e[o.type],...o,duration:o.duration||((i=e[o.type])==null?void 0:i.duration)||(e==null?void 0:e.duration)||OJ[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:n}},AJ=(e,t="blank",r)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...r,id:(r==null?void 0:r.id)||EJ()}),tl=e=>(t,r)=>{let n=AJ(t,e,r);return la({type:2,toast:n}),n.id},Mn=(e,t)=>tl("blank")(e,t);Mn.error=tl("error"),Mn.success=tl("success"),Mn.loading=tl("loading"),Mn.custom=tl("custom"),Mn.dismiss=e=>{la({type:3,toastId:e})},Mn.remove=e=>la({type:4,toastId:e}),Mn.promise=(e,t,r)=>{let n=Mn.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Mn.success(Bf(t.success,o),{id:n,...r,...r==null?void 0:r.success}),o)).catch(o=>{Mn.error(Bf(t.error,o),{id:n,...r,...r==null?void 0:r.error})}),e};var IJ=(e,t)=>{la({type:1,toast:{id:e,height:t}})},RJ=()=>{la({type:5,time:Date.now()})},PJ=e=>{let{toasts:t,pausedAt:r}=CJ(e);$.useEffect(()=>{if(r)return;let i=Date.now(),a=t.map(s=>{if(s.duration===1/0)return;let c=(s.duration||0)+s.pauseDuration-(i-s.createdAt);if(c<0){s.visible&&Mn.dismiss(s.id);return}return setTimeout(()=>Mn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=$.useCallback(()=>{r&&la({type:6,time:Date.now()})},[r]),o=$.useCallback((i,a)=>{let{reverseOrder:s=!1,gutter:c=8,defaultPosition:l}=a||{},u=t.filter(f=>(f.position||l)===(i.position||l)&&f.height),d=u.findIndex(f=>f.id===i.id),p=u.filter((f,h)=>h<d&&f.visible).length;return u.filter(f=>f.visible).slice(...s?[p+1]:[0,p]).reduce((f,h)=>f+(h.height||0)+c,0)},[t]);return{toasts:t,handlers:{updateHeight:IJ,startPause:RJ,endPause:n,calculateOffset:o}}},NJ=Vo`
145
145
  from {
146
146
  transform: scale(0) rotate(45deg);
147
147
  opacity: 0;
@@ -349,14 +349,14 @@ to {
349
349
  *
350
350
  * This source code is licensed under the MIT license found in the
351
351
  * LICENSE file in the root directory of this source tree.
352
- */var EC;function xY(){return EC||(EC=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=$,t=SC();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;function l(u,d,p,f,h){var y=i(null),m;y.current===null?(m={hasValue:!1,value:null},y.current=m):m=y.current;var g=s(function(){var w=!1,S,C,I=function(W){if(!w){w=!0,S=W;var Z=f(W);if(h!==void 0&&m.hasValue){var B=m.value;if(h(B,Z))return C=B,B}return C=Z,Z}var F=S,j=C;if(n(F,W))return j;var U=f(W);return h!==void 0&&h(j,U)?j:(S=W,C=U,U)},P=p===void 0?null:p,A=function(){return I(d())},L=P===null?void 0:function(){return I(P())};return[A,L]},[d,p,f,h]),v=g[0],b=g[1],x=o(u,v,b);return a(function(){m.hasValue=!0,m.value=x},[x]),c(x),x}Jg.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jg}process.env.NODE_ENV==="production"?Hg.exports=wY():Hg.exports=xY();var SY=Hg.exports;const _Y=St(SY),{useSyncExternalStoreWithSelector:EY}=_Y;let uSe=!1;function kC(e,t=e.getState,r){const n=EY(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return $.useDebugValue(n),n}const TC=e=>{const t=typeof e=="function"?vC(e):e,r=(n,o)=>kC(t,n,o);return Object.assign(r,t),r},kY=e=>e?TC(e):TC,Yg=new Map,Kf=e=>{const t=Yg.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},TY=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=Yg.get(r.name);if(n)return{type:"tracked",store:e,...n};const o={connection:t.connect(r),stores:{}};return Yg.set(r.name,o),{type:"tracked",store:e,...o}},$C=(e,t={})=>(r,n,o)=>{const{enabled:i,anonymousActionType:a,store:s,...c}=t;let l;try{l=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(r,n,o);const{connection:u,...d}=TY(s,l,c);let p=!0;o.setState=(y,m,g)=>{const v=r(y,m);if(!p)return v;const b=g===void 0?{type:a||"anonymous"}:typeof g=="string"?{type:g}:g;return s===void 0?(u==null||u.send(b,n()),v):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Kf(c.name),[s]:o.getState()}),v)};const f=(...y)=>{const m=p;p=!1,r(...y),p=m},h=e(o.setState,n,o);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,m])=>[y,y===d.store?h:m.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let y=!1;const m=o.dispatch;o.dispatch=(...g)=>{m(...g)}}return u.subscribe(y=>{var m;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Xg(y.payload,g=>{if(g.type==="__setState"){if(s===void 0){f(g.state);return}Object.keys(g.state).length!==1&&console.error(`
352
+ */var EC;function xY(){return EC||(EC=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=$,t=SC();function r(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var n=typeof Object.is=="function"?Object.is:r,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,c=e.useDebugValue;function l(u,d,p,f,h){var y=i(null),m;y.current===null?(m={hasValue:!1,value:null},y.current=m):m=y.current;var g=s(function(){var w=!1,S,C,I=function(K){if(!w){w=!0,S=K;var z=f(K);if(h!==void 0&&m.hasValue){var B=m.value;if(h(B,z))return C=B,B}return C=z,z}var F=S,j=C;if(n(F,K))return j;var Z=f(K);return h!==void 0&&h(j,Z)?j:(S=K,C=Z,Z)},P=p===void 0?null:p,A=function(){return I(d())},L=P===null?void 0:function(){return I(P())};return[A,L]},[d,p,f,h]),v=g[0],b=g[1],x=o(u,v,b);return a(function(){m.hasValue=!0,m.value=x},[x]),c(x),x}Jg.useSyncExternalStoreWithSelector=l,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Jg}process.env.NODE_ENV==="production"?Hg.exports=wY():Hg.exports=xY();var SY=Hg.exports;const _Y=St(SY),{useSyncExternalStoreWithSelector:EY}=_Y;let uSe=!1;function kC(e,t=e.getState,r){const n=EY(e.subscribe,e.getState,e.getServerState||e.getState,t,r);return $.useDebugValue(n),n}const TC=e=>{const t=typeof e=="function"?vC(e):e,r=(n,o)=>kC(t,n,o);return Object.assign(r,t),r},kY=e=>e?TC(e):TC,Yg=new Map,Kf=e=>{const t=Yg.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([r,n])=>[r,n.getState()])):{}},TY=(e,t,r)=>{if(e===void 0)return{type:"untracked",connection:t.connect(r)};const n=Yg.get(r.name);if(n)return{type:"tracked",store:e,...n};const o={connection:t.connect(r),stores:{}};return Yg.set(r.name,o),{type:"tracked",store:e,...o}},$C=(e,t={})=>(r,n,o)=>{const{enabled:i,anonymousActionType:a,store:s,...c}=t;let l;try{l=(i??!1)&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return e(r,n,o);const{connection:u,...d}=TY(s,l,c);let p=!0;o.setState=(y,m,g)=>{const v=r(y,m);if(!p)return v;const b=g===void 0?{type:a||"anonymous"}:typeof g=="string"?{type:g}:g;return s===void 0?(u==null||u.send(b,n()),v):(u==null||u.send({...b,type:`${s}/${b.type}`},{...Kf(c.name),[s]:o.getState()}),v)};const f=(...y)=>{const m=p;p=!1,r(...y),p=m},h=e(o.setState,n,o);if(d.type==="untracked"?u==null||u.init(h):(d.stores[d.store]=o,u==null||u.init(Object.fromEntries(Object.entries(d.stores).map(([y,m])=>[y,y===d.store?h:m.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let y=!1;const m=o.dispatch;o.dispatch=(...g)=>{m(...g)}}return u.subscribe(y=>{var m;switch(y.type){case"ACTION":if(typeof y.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Xg(y.payload,g=>{if(g.type==="__setState"){if(s===void 0){f(g.state);return}Object.keys(g.state).length!==1&&console.error(`
353
353
  [zustand devtools middleware] Unsupported __setState action format.
354
354
  When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
355
355
  and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
356
- `);const v=g.state[s];if(v==null)return;JSON.stringify(o.getState())!==JSON.stringify(v)&&f(v);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(g)});case"DISPATCH":switch(y.payload.type){case"RESET":return f(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(Kf(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(Kf(c.name));case"ROLLBACK":return Xg(y.state,g=>{if(s===void 0){f(g),u==null||u.init(o.getState());return}f(g[s]),u==null||u.init(Kf(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Xg(y.state,g=>{if(s===void 0){f(g);return}JSON.stringify(o.getState())!==JSON.stringify(g[s])&&f(g[s])});case"IMPORT_STATE":{const{nextLiftedState:g}=y.payload,v=(m=g.computedStates.slice(-1)[0])==null?void 0:m.state;if(!v)return;f(s===void 0?v:v[s]),u==null||u.send(null,g);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Xg=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function $Y(e,t){let r;try{r=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=r.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>r.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>r.removeItem(o)}}const rl=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return rl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return rl(n)(r)}}}},OY=(e,t)=>(r,n,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:m=>m,version:0,merge:(m,g)=>({...g,...m}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...m)},n,o);const u=rl(i.serialize),d=()=>{const m=i.partialize({...n()});let g;const v=u({state:m,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{g=b});if(g)throw g;return v},p=o.setState;o.setState=(m,g)=>{p(m,g),d()};const f=e((...m)=>{r(...m),d()},n,o);let h;const y=()=>{var m;if(!l)return;a=!1,s.forEach(v=>v(n()));const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,n()))||void 0;return rl(l.getItem.bind(l))(i.name).then(v=>{if(v)return i.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate)return i.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var b;return h=i.merge(v,(b=n())!=null?b:f),r(h,!0),d()}).then(()=>{g==null||g(h,void 0),a=!0,c.forEach(v=>v(h))}).catch(v=>{g==null||g(void 0,v)})};return o.persist={setOptions:m=>{i={...i,...m},m.getStorage&&(l=m.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},y(),h||f},CY=(e,t)=>(r,n,o)=>{let i={storage:$Y(()=>localStorage),partialize:y=>y,version:0,merge:(y,m)=>({...m,...y}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,o);const u=()=>{const y=i.partialize({...n()});return l.setItem(i.name,{state:y,version:i.version})},d=o.setState;o.setState=(y,m)=>{d(y,m),u()};const p=e((...y)=>{r(...y),u()},n,o);let f;const h=()=>{var y,m;if(!l)return;a=!1,s.forEach(v=>{var b;return v((b=n())!=null?b:p)});const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,(y=n())!=null?y:p))||void 0;return rl(l.getItem.bind(l))(i.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate)return i.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var b;return f=i.merge(v,(b=n())!=null?b:p),r(f,!0),u()}).then(()=>{g==null||g(f,void 0),f=n(),a=!0,c.forEach(v=>v(f))}).catch(v=>{g==null||g(void 0,v)})};return o.persist={setOptions:y=>{i={...i,...y},y.storage&&(l=y.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},i.skipHydration||h(),f||p},AY=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?OY(e,t):CY(e,t),wn=kY()($C(AY((e,t)=>({messageHistory:{},addMessageToHistory:({userId:r,message:n})=>e(o=>({...o,messageHistory:{...o.messageHistory,[r]:[n,...(o.messageHistory[r]??[]).slice(0,100)]}})),clientMode:"",setClientMode:r=>{const{clearAll:n,clientMode:o}=t();o!==r&&n(),e(i=>({...i,clientMode:r}))},setUser:r=>e(n=>({...n,user:r})),setConversationId:r=>e(n=>({...n,conversationId:r})),clearAll:()=>{e(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),OC=$.createContext(null),IY=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,o=wn.getState().setClientMode,i=wn.getState().setConversationId;return r&&o(r.mode),$.useEffect(()=>{n&&i(n)},[n]),vC()($C((a,s)=>{const c=d=>{const p=wn.getState().conversationId;if(p)return a(f=>{const h=f.messages[p]??[];return{...f,messages:{...f.messages,[p]:[...h.filter(y=>y.id!==d.id),{id:Td(),...d}]}}})},l=d=>{const p=wn.getState().conversationId;if(p)return a(f=>({...f,messages:{...f.messages,[p]:d}}))},u=wn.getState().addMessageToHistory;return{...t,...e,eventEmitter:k5,client:r,sendFile:d=>s().client.sendFile(d),sendTextMessage:async d=>{const p=s().client;c({id:Td(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:d}}}),p&&await p.sendMessage(d),p!=null&&p.userId&&u({message:d,userId:p.userId})},on:(d,p)=>{const f=s().client;return f?f.on(d,p):()=>{}},getClientId:()=>{var d;return(d=s().client)==null?void 0:d.clientId},setState:d=>a(p=>({...p,...d})),setMessages:l,getMessages:()=>s().messages[wn.getState().conversationId??""]??[],setIsTyping:(d,p)=>{a(f=>({...f,isTyping:d})),d&&(a(f=>({...f,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const f=s().lastTypingHeartbeat;f&&new Date().getTime()-f.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:d=>a(p=>({...p,lastTypingHeartbeat:d})),addMessage:c,setConnected:d=>a(p=>({...p,connected:d})),restartConversation:async()=>{const d=s().client,p=s().setMessages;d&&(await d.newConversation(),p([]))}}},{name:"webchatStore"}))};function ft(e){const t=$.useContext(OC);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return kC(t,e)}const RY=({text:e,buttonValue:t,type:r,variant:n,groupId:o,reusable:i,...a})=>{const s=ft(v=>v.eventEmitter),c=ft(v=>v.sendTextMessage),l=ft(v=>v.isReadOnly),[u,d]=$.useState(!1),[p,f]=$.useState(!1),[h,y]=$.useState(!1),{message:{blocks:{button:m}}}=Ht;$.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{f(!0),i||y(!0)})},[s,o,i]);function g(){o&&s.emit(`button-group-${o}-click`),d(!0),i||y(!0),n!=="link"&&c(t)}return J.jsx(PY,{...a,variant:n,onClick:g,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":n,value:t,...m,children:e})},PY=e=>{if(e.variant==="link"){const{value:n,variant:o,...i}=e;return J.jsx("a",{...i,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return J.jsx("button",{type:"button",...r})},NY=$.forwardRef(({block:e,type:t,...r},n)=>{const{message:{blocks:{bubble:o}}}=Ht;return J.jsx("div",{...r,...o,ref:n,children:J.jsx(xs,{block:e})})}),CC=$.createContext(null);function MY(){const e=$.useContext(CC);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const AC=$.createContext(null);function IC(){const e=$.useContext(AC);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const RC=$.createContext(null);function PC(){const e=$.useContext(RC);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const jY=$.forwardRef(({url:e,type:t,orientation:r="auto",...n},o)=>{const i=$.useId(),{setIsLoading:a}=MY(),[s,c]=$.useState(r),[l,u]=$.useState(!1),{message:{blocks:{image:d}}}=Ht;return $.useLayoutEffect(()=>{a(p=>[...p,i])},[]),$.useEffect(()=>{e&&s==="auto"&&mJ(e).then(({width:p,height:f})=>{c(DY(p,f)),a(h=>h.filter(y=>y!==i))})},[e]),J.jsxs(J.Fragment,{children:[l?null:J.jsx("div",{"data-orientation":s,...d.placeholder}),J.jsx("img",{"data-orientation":s,"data-loaded":l,...n,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function DY(e,t){const r={square:1,portrait:.75,landscape:1.3333333333333333},n=e/t;return Object.keys(r).reduce((i,a)=>Math.abs(r[a]-n)<Math.abs(r[i]-n)?a:i)}const LY=$.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:o}}}=Ht;return J.jsx("div",{children:J.jsx("video",{...r,controls:!0,src:e,...o,ref:n})})}),FY=$.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:o}}}=Ht;return J.jsx("div",{children:J.jsx("audio",{...r,controls:!0,src:e,...o,ref:n})})});function qY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const BY=N.forwardRef(qY);function UY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 zY=N.forwardRef(UY);function ZY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 VY=N.forwardRef(ZY);function HY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 WY=N.forwardRef(HY);function KY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 GY=N.forwardRef(KY),JY=$.forwardRef(({type:e,latitude:t,longitude:r,title:n,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${r}`,{message:{blocks:{location:s}}}=Ht;return J.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[J.jsx("p",{...s.title,children:n}),J.jsx(GY,{...s.icon})]})}),YY=$.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{column:a}}}=Ht;return J.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>J.jsx(xs,{block:s},c))})}),XY=$.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{row:a}}}=Ht;return J.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>J.jsx(xs,{block:s},c))})});function QY(e){return Object.prototype.toString.call(e)==="[object Object]"}function NC(e){return QY(e)||Array.isArray(e)}function eX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Qg(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:r.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!NC(s)||!NC(c)?s===c:Qg(s,c)})}function MC(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function tX(e,t){if(e.length!==t.length)return!1;const r=MC(e),n=MC(t);return r.every((o,i)=>{const a=n[i];return Qg(o,a)})}function ev(e){return typeof e=="number"}function jC(e){return typeof e=="string"}function tv(e){return typeof e=="boolean"}function DC(e){return Object.prototype.toString.call(e)==="[object Object]"}function or(e){return Math.abs(e)}function rv(e){return Math.sign(e)}function Gf(e,t){return or(e-t)}function rX(e,t){if(e===0||t===0||or(e)<=or(t))return 0;const r=Gf(or(e),or(t));return or(r/e)}function nl(e){return Yf(e).map(Number)}function Ho(e){return e[Jf(e)]}function Jf(e){return Math.max(0,e.length-1)}function Yf(e){return Object.keys(e)}function LC(e,t){return[e,t].reduce((r,n)=>(Yf(n).forEach(o=>{const i=r[o],a=n[o],s=DC(i)&&DC(a);r[o]=s?LC(i,a):a}),r),{})}function FC(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function nX(e,t){const r={start:n,center:o,end:i};function n(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return ev(e)?a():r[e](l)}return{measure:s}}function oX(e,t){const r=e==="y"?"y":"x",n=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:d,height:p}=u;return r==="x"?d:p}function s(){return r==="y"?"top":t==="rtl"?"right":"left"}function c(){return r==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:r,cross:n,startEdge:o,endEdge:i,measureSize:a}}function Si(e,t){const r=or(e-t);function n(l){return l<e}function o(l){return l>t}function i(l){return n(l)||o(l)}function a(l){return i(l)?n(l)?e:t:l}function s(l){return r?l-r*Math.ceil((l-t)/r):l}return{length:r,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:s}}function qC(e,t,r){const{constrain:n}=Si(0,e),o=e+1;let i=a(t);function a(p){return r?or((o+p)%o):n(p)}function s(){return i}function c(p){return i=a(p),d}function l(p){return u().set(s()+p)}function u(){return qC(e,s(),r)}const d={get:s,set:c,add:l,clone:u};return d}function iX(e){const t=e==="rtl"?-1:1;function r(o){return o*t}return{apply:r}}function ol(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),n}function r(){e=e.filter(o=>o())}const n={add:t,clear:r};return n}function aX(e,t,r,n,o,i,a,s,c,l,u,d,p,f,h,y,m,g,v){const{cross:b}=e,x=["INPUT","SELECT","TEXTAREA"],w={passive:!1},S=ol(),C=ol(),I=Si(50,225).constrain(h.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},L=y?43:25;let W=!1,Z=0,B=0,F=!1,j=!1,U=!1,K=!1;function D(de,te){if(!te)return;function we(qe){(tv(te)||te(de,qe))&&pe(qe)}const Ae=r;S.add(Ae,"dragstart",qe=>qe.preventDefault(),w).add(Ae,"touchmove",()=>{},w).add(Ae,"touchend",()=>{}).add(Ae,"touchstart",we).add(Ae,"mousedown",we).add(Ae,"touchcancel",ve).add(Ae,"contextmenu",ve).add(Ae,"click",_e,!0)}function E(){S.clear(),C.clear()}function H(){const de=K?n:r;C.add(de,"touchmove",fe,w).add(de,"touchend",ve).add(de,"mousemove",fe,w).add(de,"mouseup",ve)}function Q(de){const te=de.nodeName||"";return x.includes(te)}function T(){return(y?A:P)[K?"mouse":"touch"]}function ce(de,te){const we=p.add(rv(de)*-1),Ae=d.byDistance(de,!y).distance;return y||or(de)<I?Ae:g&&te?Ae*.5:d.byIndex(we.get(),0).distance}function pe(de){const te=FC(de,o);K=te,!(te&&de.button!==0)&&(Q(de.target)||(U=y&&te&&!de.buttons&&W,W=Gf(i.get(),s.get())>=2,F=!0,a.pointerDown(de),u.useFriction(0).useDuration(0),i.set(s),H(),Z=a.readPoint(de),B=a.readPoint(de,b),f.emit("pointerDown")))}function fe(de){const te=a.readPoint(de),we=a.readPoint(de,b),Ae=Gf(te,Z),qe=Gf(we,B);if(!j&&!K&&(!de.cancelable||(j=Ae>qe,!j)))return ve(de);const q=a.pointerMove(de);Ae>m&&(U=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(q)),de.preventDefault()}function ve(de){const we=d.byDistance(0,!1).index!==p.get(),Ae=a.pointerUp(de)*T(),qe=ce(t.apply(Ae),we),q=rX(Ae,qe),le=L-10*q,he=v+q/50;j=!1,F=!1,C.clear(),u.useDuration(le).useFriction(he),l.distance(qe,!y),K=!1,f.emit("pointerUp")}function _e(de){U&&(de.stopPropagation(),de.preventDefault())}function Ce(){return F}return{init:D,pointerDown:Ce,destroy:E}}function sX(e,t){let n,o;function i(d){return d.timeStamp}function a(d,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(FC(d,t)?d:d.touches[0])[h]}function s(d){return n=d,o=d,a(d)}function c(d){const p=a(d)-a(o),f=i(d)-i(n)>170;return o=d,f&&(n=d),p}function l(d){if(!n||!o)return 0;const p=a(o)-a(n),f=i(d)-i(n),h=i(d)-i(o)>170,y=p/f;return f&&!h&&or(y)>.1?y:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function cX(e){function t(n){return e*(n/100)}return{measure:t}}function lX(e,t,r,n,o){let i,a,s=[],c=!1;function l(f){return o.measureSize(f.getBoundingClientRect())}function u(f,h){if(!h)return;a=l(e),s=n.map(l);function y(g){for(const v of g){const b=v.target===e,x=n.indexOf(v.target),w=b?a:s[x],S=l(b?e:n[x]);if(w!==S){r.requestAnimationFrame(()=>{f.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(g=>{c||(tv(h)||h(f,g))&&y(g)}),[e].concat(n).forEach(g=>i.observe(g))}function d(){i&&i.disconnect(),c=!0}return{init:u,destroy:d}}function uX(e,t,r,n){let o=!0,i=0,a=0,s=r,c=n,l=e.get(),u=0;function d(){const w=t.get()-e.get(),S=!s;let C=0;return S?(i=0,e.set(t),C=w):(i+=w/s,i*=c,l+=i,e.add(i),C=l-u),a=rv(C),u=l,o=or(w)<.001,x}function p(){return o}function f(){return s}function h(){return a}function y(){return i}function m(){return v(r)}function g(){return b(n)}function v(w){return s=w,x}function b(w){return c=w,x}const x={direction:h,duration:f,velocity:y,seek:d,settled:p,useBaseFriction:g,useBaseDuration:m,useFriction:b,useDuration:v};return x}function dX(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=Si(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function u(f){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",y=or(e[h]-t.get()),m=r.get()-t.get(),g=s.constrain(y/a);r.subtract(m*g),!f&&or(m)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(f){c=!f}return{constrain:u,toggleActive:d}}function fX(e,t,r,n){const o=Si(-t+e,r[0]),i=c(),a=l();function s(){const d=i[0],p=Ho(i),f=i.lastIndexOf(d),h=i.indexOf(p)+1;return Si(f,h)}function c(){return r.map(o.constrain).map(d=>parseFloat(d.toFixed(3)))}function l(){if(t<=e)return[o.max];if(n==="keepSnaps")return i;const{min:d,max:p}=s();return i.slice(d,p)}return{snapsContained:a}}function pX(e,t,r){const n=t[0],o=r?n-e:Ho(t);return{limit:Si(o,n)}}function hX(e,t,r,n){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=Si(i,a);function l(p){return p===1?c(r.get()):p===-1?s(r.get()):!1}function u(p){if(!l(p))return;const f=e*(p*-1);n.forEach(h=>h.add(f))}return{loop:u}}function mX(e){const{max:t,length:r}=e;function n(i){return(i-t)/-r}return{get:n}}function yX(e,t,r,n,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=f().map(t.measure),d=h(),p=y();function f(){return l(n).map(g=>Ho(g)[c]-g[0][s]).map(or)}function h(){return n.map(g=>r[s]-g[s]).map(g=>-or(g))}function y(){const v=Ho(d)-Ho(o);return l(d).map(b=>b[0]).map((b,x,w)=>{const S=!x,C=x===Jf(w);return a&&S?0:a&&C?v:b+u[x]})}return{snaps:d,snapsAligned:p}}function gX(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function c(h){return h.concat().sort((y,m)=>or(y)-or(m))[0]}function l(h){const y=e?a(h):s(h),m=t.map(v=>v-y).map(v=>u(v,0)).map((v,b)=>({diff:v,index:b})).sort((v,b)=>or(v.diff)-or(b.diff)),{index:g}=m[0];return{index:g,distance:y}}function u(h,y){const m=[h,h+r,h-r];if(!e)return m[0];if(!y)return c(m);const g=m.filter(v=>rv(v)===y);return c(g)}function d(h,y){const m=t[h]-o.get(),g=u(m,y);return{index:h,distance:g}}function p(h,y){const m=o.get()+h,{index:g,distance:v}=l(m),b=!e&&i(m);if(!y||b)return{index:g,distance:h};const x=t[g]-v,w=h+u(x,0);return{index:g,distance:w}}return{byDistance:p,byIndex:d,shortcut:u}}function vX(e,t,r,n,o,i,a){function s(d){const p=d.distance,f=d.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),f&&(r.set(t.get()),t.set(d.index),a.emit("select"))}function c(d,p){const f=n.byDistance(d,p);s(f)}function l(d,p){const f=t.clone().set(d),h=n.byIndex(f.get(),p);s(h)}return{distance:c,index:l}}function Xf(e){let t=e;function r(){return t}function n(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return ev(c)?c:c.get()}return{get:r,set:n,add:o,subtract:i}}function BC(e,t,r){const n=e.scroll==="x"?a:s,o=r.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=n(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",r.getAttribute("style")||r.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function bX(e,t,r,n,o,i,a,s,c){const l=nl(o),u=nl(o).reverse(),d=y().concat(m());function p(w,S){return w.reduce((C,I)=>C-o[I],S)}function f(w,S){return w.reduce((C,I)=>p(C,S)>0?C.concat([I]):C,[])}function h(w,S){const C=S==="start",I=C?-n:n,P=a.findSlideBounds([I]);return w.map(A=>{const L=C?0:-n,W=C?n:0,B=P.filter(F=>F.index===A)[0][C?"end":"start"];return{index:A,slideLocation:Xf(-1),translate:BC(e,t,c[A]),target:()=>s.get()>B?L:W}})}function y(){const w=i[0]-1,S=f(u,w);return h(S,"end")}function m(){const w=r-i[0]-1,S=f(l,w);return h(S,"start")}function g(){return d.every(({index:w})=>{const S=l.filter(C=>C!==w);return p(S,r)<=.1})}function v(){d.forEach(w=>{const{target:S,translate:C,slideLocation:I}=w,P=S();P!==I.get()&&(C.to(P),I.set(P))})}function b(){d.forEach(w=>w.translate.clear())}return{canLoop:g,clear:b,loop:v,loopPoints:d}}function wX(e,t){let r,n=!1;function o(s,c){if(!c)return;function l(u){for(const d of u)if(d.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(u=>{n||(tv(c)||c(s,u))&&l(u)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:o,destroy:i}}function xX(e,t,r,n,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],d=f(u,a);function p(m){const g=m||0;return r.map(v=>Si(l,v-l).constrain(v*g))}function f(m,g){const v=m||u,b=p(g);return v.reduce((x,w)=>{const S=n.map((C,I)=>({start:C-r[I]+b[I]+w,end:C+e-b[I]+w,index:I}));return x.concat(S)},[])}function h(m,g){const v=i?s(m):c(m);return(g||d).reduce((x,w)=>{const{index:S,start:C,end:I}=w,P=x.includes(S),A=C<v&&I>v;return!P&&A?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function SX(e,t,r,n,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=r[0]&&o,u=h(),d=y(),p=r.map(a),f=m();function h(){if(!l)return 0;const v=r[0];return or(t[s]-v[s])}function y(){if(!l)return 0;const v=i.getComputedStyle(Ho(n));return parseFloat(v.getPropertyValue(`margin-${c}`))}function m(){return r.map((v,b,x)=>{const w=!b,S=b===Jf(x);return w?p[b]+u:S?p[b]+d:x[b+1][s]-v[s]}).map(or)}return{slideSizes:p,slideSizesWithGaps:f}}function _X(e,t,r){const n=ev(r);function o(c,l){return nl(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return nl(c).reduce((l,u)=>{const p=t.slice(Ho(l),u+1).reduce((f,h)=>f+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,d)=>c.slice(l,d[u+1]))}function a(c){return n?o(c,r):i(c)}return{groupSlides:a}}function EX(e,t,r,n,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:d,inViewThreshold:p,loop:f,duration:h,dragFree:y,dragThreshold:m,slidesToScroll:g,skipSnaps:v,containScroll:b}=i,x=t.getBoundingClientRect(),w=r.map(he=>he.getBoundingClientRect()),S=iX(u),C=oX(l,u),I=C.measureSize(x),P=cX(I),A=nX(c,I),L=!f&&!!b,W=f||!!b,{slideSizes:Z,slideSizesWithGaps:B}=SX(C,x,w,r,W,o),F=_X(I,B,g),{snaps:j,snapsAligned:U}=yX(C,A,x,w,B,F,L),K=-Ho(j)+Ho(B),{snapsContained:D}=fX(I,K,U,b),E=L?D:U,{limit:H}=pX(K,E,f),Q=qC(Jf(E),d,f),T=Q.clone(),ce=nl(r),pe=({dragHandler:he,scrollBody:me,scrollBounds:je,eventHandler:Ie,animation:Ue,options:{loop:pt}})=>{const Ke=he.pointerDown();pt||je.constrain(Ke);const G=me.seek().settled();G&&!Ke&&(Ue.stop(),Ie.emit("settle")),G||Ie.emit("scroll")},fe=({scrollBody:he,translate:me,location:je,offsetLocation:Ie,scrollLooper:Ue,slideLooper:pt,options:{loop:Ke}},G)=>{const se=he.velocity();Ie.set(je.get()-se+se*G),Ke&&(Ue.loop(he.direction()),pt.loop()),me.to(Ie.get())},ve={start:()=>s.start(le),stop:()=>s.stop(le),update:()=>pe(le),render:he=>fe(le,he)},_e=.68,Ce=E[Q.get()],be=Xf(Ce),de=Xf(Ce),te=Xf(Ce),we=uX(be,te,h,_e),Ae=gX(f,E,K,H,te),qe=vX(ve,Q,T,Ae,we,te,a),q=xX(I,K,Z,j,H,f,p),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:x,slideRects:w,animation:ve,axis:C,direction:S,dragHandler:aX(C,S,e,n,o,te,sX(C,o),be,ve,qe,we,Ae,Q,a,P,y,m,v,_e),eventStore:ol(),percentOfView:P,index:Q,indexPrevious:T,limit:H,location:be,offsetLocation:de,options:i,resizeHandler:lX(t,a,o,r,C),scrollBody:we,scrollBounds:dX(H,be,te,we,P),scrollLooper:hX(K,H,de,[be,de,te]),scrollProgress:mX(H),scrollSnaps:E,scrollTarget:Ae,scrollTo:qe,slideLooper:bX(C,S,I,K,B,E,q,de,r),slidesHandler:wX(t,a),slidesInView:q,slideIndexes:ce,slidesToScroll:F,target:te,translate:BC(C,S,t)};return le}function kX(e){const t=16.666666666666668;let r=[],n=null,o=0,i=0;function a(d){n||(n=d);const p=d-n;for(n=d,o+=p;o>=t;)r.forEach(({animation:h})=>h.update()),o-=t;const f=or(o/t);r.forEach(({animation:h})=>h.render(f)),i&&e.requestAnimationFrame(a)}function s(d){r.includes(d)||r.push(d),!i&&(i=e.requestAnimationFrame(a))}function c(d){r=r.filter(p=>p!==d),!r.length&&(e.cancelAnimationFrame(i),n=null,o=0,i=0)}function l(){n=null,o=0}return{start:s,stop:c,reset:l,window:e}}function TX(){const e={};let t;function r(c){t=c}function n(c){return e[c]||[]}function o(c){return n(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=n(c).concat([l]),s}function a(c,l){return e[c]=n(c).filter(u=>u!==l),s}const s={init:r,emit:o,off:a,on:i};return s}const $X={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 OX(e){function t(i,a){return LC(i,a||{})}function r(i){const a=i.breakpoints||{},s=Yf(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function n(i){return i.map(a=>Yf(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function CX(e){let t=[];function r(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function n(){t=t.filter(i=>i.destroy())}return{init:r,destroy:n}}function hs(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=OX(o),a=CX(i),s=ol(),c=ol(),l=TX(),{animationRealms:u}=hs,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:h,off:y,emit:m}=l,g=Z;let v=!1,b,x=d($X,hs.globalOptions),w=d(x),S=[],C,I,P;function A(){const{container:we,slides:Ae}=w;I=(jC(we)?e.querySelector(we):we)||e.children[0];const q=jC(Ae)?I.querySelectorAll(Ae):Ae;P=[].slice.call(q||I.children)}function L(we,Ae){const qe=EX(e,I,P,n,o,we,l,Ae);if(we.loop&&!qe.slideLooper.canLoop()){const q=Object.assign({},we,{loop:!1});return L(q,Ae)}return qe}function W(we,Ae){if(v)return;const qe=u.find(le=>le.window===o),q=qe||kX(o);qe||u.push(q),x=d(x,we),w=p(x),S=Ae||S,A(),b=L(w,q),f([x,...S.map(({options:le})=>le)]).forEach(le=>s.add(le,"change",Z)),w.active&&(b.translate.to(b.location.get()),b.eventHandler.init(te),b.resizeHandler.init(te,w.watchResize),b.slidesHandler.init(te,w.watchSlides),c.add(n,"visibilitychange",()=>{n.hidden&&q.reset()}),b.options.loop&&b.slideLooper.loop(),I.offsetParent&&P.length&&b.dragHandler.init(te,w.watchDrag),C=a.init(S,te))}function Z(we,Ae){const qe=pe();B(),W(d({startIndex:qe},we),Ae),l.emit("reInit")}function B(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function F(){v||(v=!0,s.clear(),B(),l.emit("destroy"))}function j(we){const Ae=b[we?"target":"location"].get(),qe=w.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[qe](Ae))}function U(we){const Ae=j(we);return b.slideIndexes.filter(qe=>!Ae.includes(qe))}function K(we,Ae,qe){!w.active||v||(b.scrollBody.useBaseFriction().useDuration(Ae?0:w.duration),b.scrollTo.index(we,qe||0))}function D(we){const Ae=b.index.add(1).get();K(Ae,we===!0,-1)}function E(we){const Ae=b.index.add(-1).get();K(Ae,we===!0,1)}function H(){return b.index.add(1).get()!==pe()}function Q(){return b.index.add(-1).get()!==pe()}function T(){return b.scrollSnaps.map(b.scrollProgress.get)}function ce(){return b.scrollProgress.get(b.location.get())}function pe(){return b.index.get()}function fe(){return b.indexPrevious.get()}function ve(){return C}function _e(){return b}function Ce(){return e}function be(){return I}function de(){return P}const te={canScrollNext:H,canScrollPrev:Q,containerNode:be,internalEngine:_e,destroy:F,off:y,on:h,emit:m,plugins:ve,previousScrollSnap:fe,reInit:g,rootNode:Ce,scrollNext:D,scrollPrev:E,scrollProgress:ce,scrollSnapList:T,scrollTo:K,selectedScrollSnap:pe,slideNodes:de,slidesInView:j,slidesNotInView:U};return W(t,r),setTimeout(()=>l.emit("init"),0),te}hs.animationRealms=[],hs.globalOptions=void 0;function nv(e={},t=[]){const r=$.useRef(e),n=$.useRef(t),[o,i]=$.useState(),[a,s]=$.useState(),c=$.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return $.useEffect(()=>{if(eX()&&a){hs.globalOptions=nv.globalOptions;const l=hs(a,r.current,n.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),$.useEffect(()=>{Qg(r.current,e)||(r.current=e,c())},[e,c]),$.useEffect(()=>{tX(n.current,t)||(n.current=t,c())},[t,c]),[s,o]}nv.globalOptions=void 0;function AX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 IX=N.forwardRef(AX);function RX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 PX=N.forwardRef(RX);function NX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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"}),N.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 MX=N.forwardRef(NX);function jX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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"}),N.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 DX=N.forwardRef(jX);function LX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 FX=N.forwardRef(LX);function qX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 BX=N.forwardRef(qX);function UX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 zX=N.forwardRef(UX),ZX=$.forwardRef(({blocks:e},t)=>{const[r,n]=nv({skipSnaps:!0}),[o,i]=$.useState(!0),[a,s]=$.useState(!0),c=$.useCallback(()=>n==null?void 0:n.scrollPrev(),[n]),l=$.useCallback(()=>n==null?void 0:n.scrollNext(),[n]),{message:{blocks:{carousel:u}}}=Ht,d=$.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return $.useEffect(()=>{n&&(d(n),n.on("reInit",d),n.on("select",d))},[n,d]),J.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:r,children:[J.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,f)=>J.jsx(xs,{block:p},f))}),J.jsx(IX,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),J.jsx(PX,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),ms=Math.min,xn=Math.max,Qf=Math.round,ys=Math.floor,_i=e=>({x:e,y:e});function UC(e,t,r){return xn(e,ms(t,r))}function ep(e,t){return typeof e=="function"?e(t):e}function il(e){return e.split("-")[0]}function ov(e){return e.split("-")[1]}function zC(e){return e==="x"?"y":"x"}function VX(e){return e==="y"?"height":"width"}function al(e){return["top","bottom"].includes(il(e))?"y":"x"}function HX(e){return zC(al(e))}function WX(e){return{top:0,right:0,bottom:0,left:0,...e}}function KX(e){return typeof e!="number"?WX(e):{top:e,right:e,bottom:e,left:e}}function tp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ei(e){return ZC(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wo(e){var t;return(t=(ZC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ZC(e){return e instanceof Node||e instanceof Sn(e).Node}function lr(e){return e instanceof Element||e instanceof Sn(e).Element}function Yr(e){return e instanceof HTMLElement||e instanceof Sn(e).HTMLElement}function iv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function sl(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_n(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function GX(e){return["table","td","th"].includes(Ei(e))}function av(e){const t=sv(),r=_n(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function JX(e){let t=ua(e);for(;Yr(t)&&!cl(t);){if(av(t))return t;t=ua(t)}return null}function sv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cl(e){return["html","body","#document"].includes(Ei(e))}function _n(e){return Sn(e).getComputedStyle(e)}function rp(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ua(e){if(Ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iv(e)&&e.host||Wo(e);return iv(t)?t.host:t}function VC(e){const t=ua(e);return cl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&sl(t)?t:VC(t)}function ki(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=VC(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Sn(o);return i?t.concat(a,a.visualViewport||[],sl(o)?o:[],a.frameElement&&r?ki(a.frameElement):[]):t.concat(o,ki(o,[],r))}function Ti(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function fn(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&iv(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function HC(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function YX(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function WC(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(HC())||t.test(YX()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function KC(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 GC(){return/apple/i.test(navigator.vendor)}function XX(){return HC().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function JC(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function QX(e){return"nativeEvent"in e}function eQ(e){return e.matches("html,body")}function Yn(e){return(e==null?void 0:e.ownerDocument)||document}function cv(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function YC(e){return"composedPath"in e?e.composedPath()[0]:e.target}const tQ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function XC(e){return Yr(e)&&e.matches(tQ)}function Fr(e){e.preventDefault(),e.stopPropagation()}function QC(e,t,r){let{reference:n,floating:o}=e;const i=al(t),a=HX(t),s=VX(a),c=il(t),l=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let f;switch(c){case"top":f={x:u,y:n.y-o.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-o.width,y:d};break;default:f={x:n.x,y:n.y}}switch(ov(t)){case"start":f[a]-=p*(r&&l?-1:1);break;case"end":f[a]+=p*(r&&l?-1:1);break}return f}const rQ=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=QC(l,n,c),p=n,f={},h=0;for(let y=0;y<s.length;y++){const{name:m,fn:g}=s[y],{x:v,y:b,data:x,reset:w}=await g({x:u,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=v??u,d=b??d,f={...f,[m]:{...f[m],...x}},w&&h<=50){h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=QC(l,p,c)),y=-1;continue}}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function eA(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ep(t,e),h=KX(f),m=s[p?d==="floating"?"reference":"floating":d],g=tp(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(m)))==null||r?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),v=d==="floating"?{...a.floating,x:n,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=tp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:c}):v);return{top:(g.top-w.top+h.top)/x.y,bottom:(w.bottom-g.bottom+h.bottom)/x.y,left:(g.left-w.left+h.left)/x.x,right:(w.right-g.right+h.right)/x.x}}async function nQ(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=il(r),s=ov(r),c=al(r)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=ep(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),c?{x:f*u,y:p*l}:{x:p*l,y:f*u}}const oQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await nQ(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},iQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:g,y:v}=m;return{x:g,y:v}}},...c}=ep(e,t),l={x:r,y:n},u=await eA(t,c),d=al(il(o)),p=zC(d);let f=l[p],h=l[d];if(i){const m=p==="y"?"top":"left",g=p==="y"?"bottom":"right",v=f+u[m],b=f-u[g];f=UC(v,f,b)}if(a){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=h+u[m],b=h-u[g];h=UC(v,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-r,y:y.y-n}}}}},aQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ep(e,t),c=await eA(t,s),l=il(r),u=ov(r),d=al(r)==="y",{width:p,height:f}=n.floating;let h,y;l==="top"||l==="bottom"?(h=l,y=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,h=u==="end"?"top":"bottom");const m=f-c[h],g=p-c[y],v=!t.middlewareData.shift;let b=m,x=g;if(d){const S=p-c.left-c.right;x=u||v?ms(g,S):S}else{const S=f-c.top-c.bottom;b=u||v?ms(m,S):S}if(v&&!u){const S=xn(c.left,0),C=xn(c.right,0),I=xn(c.top,0),P=xn(c.bottom,0);d?x=p-2*(S!==0||C!==0?S+C:xn(c.left,c.right)):b=f-2*(I!==0||P!==0?I+P:xn(c.top,c.bottom))}await a({...t,availableWidth:x,availableHeight:b});const w=await o.getDimensions(i.floating);return p!==w.width||f!==w.height?{reset:{rects:!0}}:{}}}};function tA(e){const t=_n(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Yr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Qf(r)!==i||Qf(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function lv(e){return lr(e)?e:e.contextElement}function gs(e){const t=lv(e);if(!Yr(t))return _i(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=tA(t);let a=(i?Qf(r.width):r.width)/n,s=(i?Qf(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sQ=_i(0);function rA(e){const t=Sn(e);return!sv()||!t.visualViewport?sQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cQ(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Sn(e)?!1:t}function da(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=lv(e);let a=_i(1);t&&(n?lr(n)&&(a=gs(n)):a=gs(e));const s=cQ(i,r,n)?rA(i):_i(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Sn(i),f=n&&lr(n)?Sn(n):n;let h=p.frameElement;for(;h&&n&&f!==p;){const y=gs(h),m=h.getBoundingClientRect(),g=_n(h),v=m.left+(h.clientLeft+parseFloat(g.paddingLeft))*y.x,b=m.top+(h.clientTop+parseFloat(g.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=v,l+=b,h=Sn(h).frameElement}}return tp({width:u,height:d,x:c,y:l})}function lQ(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Yr(r),i=Wo(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=_i(1);const c=_i(0);if((o||!o&&n!=="fixed")&&((Ei(r)!=="body"||sl(i))&&(a=rp(r)),Yr(r))){const l=da(r);s=gs(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function uQ(e){return Array.from(e.getClientRects())}function nA(e){return da(Wo(e)).left+rp(e).scrollLeft}function dQ(e){const t=Wo(e),r=rp(e),n=e.ownerDocument.body,o=xn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+nA(e);const s=-r.scrollTop;return _n(n).direction==="rtl"&&(a+=xn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function fQ(e,t){const r=Sn(e),n=Wo(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=sv();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function pQ(e,t){const r=da(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Yr(e)?gs(e):_i(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=n*i.y;return{width:a,height:s,x:c,y:l}}function oA(e,t,r){let n;if(t==="viewport")n=fQ(e,r);else if(t==="document")n=dQ(Wo(e));else if(lr(t))n=pQ(t,r);else{const o=rA(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return tp(n)}function iA(e,t){const r=ua(e);return r===t||!lr(r)||cl(r)?!1:_n(r).position==="fixed"||iA(r,t)}function hQ(e,t){const r=t.get(e);if(r)return r;let n=ki(e,[],!1).filter(s=>lr(s)&&Ei(s)!=="body"),o=null;const i=_n(e).position==="fixed";let a=i?ua(e):e;for(;lr(a)&&!cl(a);){const s=_n(a),c=av(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sl(a)&&!c&&iA(e,a))?n=n.filter(u=>u!==a):o=s,a=ua(a)}return t.set(e,n),n}function mQ(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?hQ(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((l,u)=>{const d=oA(t,u,o);return l.top=xn(d.top,l.top),l.right=ms(d.right,l.right),l.bottom=ms(d.bottom,l.bottom),l.left=xn(d.left,l.left),l},oA(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yQ(e){return tA(e)}function gQ(e,t,r){const n=Yr(t),o=Wo(t),i=r==="fixed",a=da(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=_i(0);if(n||!n&&!i)if((Ei(t)!=="body"||sl(o))&&(s=rp(t)),n){const l=da(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=nA(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function aA(e,t){return!Yr(e)||_n(e).position==="fixed"?null:t?t(e):e.offsetParent}function sA(e,t){const r=Sn(e);if(!Yr(e))return r;let n=aA(e,t);for(;n&&GX(n)&&_n(n).position==="static";)n=aA(n,t);return n&&(Ei(n)==="html"||Ei(n)==="body"&&_n(n).position==="static"&&!av(n))?r:n||JX(e)||r}const vQ=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||sA,i=this.getDimensions;return{reference:gQ(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function bQ(e){return _n(e).direction==="rtl"}const wQ={convertOffsetParentRelativeRectToViewportRelativeRect:lQ,getDocumentElement:Wo,getClippingRect:mQ,getOffsetParent:sA,getElementRects:vQ,getClientRects:uQ,getDimensions:yQ,getScale:gs,isElement:lr,isRTL:bQ};function xQ(e,t){let r=null,n;const o=Wo(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=ys(u),h=ys(o.clientWidth-(l+d)),y=ys(o.clientHeight-(u+p)),m=ys(l),v={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:xn(0,ms(1,c))||1};let b=!0;function x(w){const S=w[0].intersectionRatio;if(S!==c){if(!b)return a();S?a(!1,S):n=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{r=new IntersectionObserver(x,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,v)}r.observe(e)}return a(!0),i}function SQ(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=lv(e),u=o||i?[...l?ki(l):[],...ki(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=l&&s?xQ(l,r):null;let p=-1,f=null;a&&(f=new ResizeObserver(g=>{let[v]=g;v&&v.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&f.observe(t)})),r()}),l&&!c&&f.observe(l),f.observe(t));let h,y=c?da(e):null;c&&m();function m(){const g=da(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&r(),y=g,h=requestAnimationFrame(m)}return r(),()=>{u.forEach(g=>{o&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),d&&d(),f&&f.disconnect(),f=null,c&&cancelAnimationFrame(h)}}const _Q=(e,t,r)=>{const n=new Map,o={platform:wQ,...r},i={...o.platform,_c:n};return rQ(e,t,{...o,platform:i})};var np=typeof document<"u"?$.useLayoutEffect:$.useEffect;function op(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!op(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!op(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function cA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lA(e,t){const r=cA(e);return Math.round(t*r)/r}function uA(e){const t=N.useRef(e);return np(()=>{t.current=e}),t}function EQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=N.useState(n);op(p,n)||f(n);const[h,y]=N.useState(null),[m,g]=N.useState(null),v=N.useCallback(j=>{j!=S.current&&(S.current=j,y(j))},[y]),b=N.useCallback(j=>{j!==C.current&&(C.current=j,g(j))},[g]),x=i||h,w=a||m,S=N.useRef(null),C=N.useRef(null),I=N.useRef(u),P=uA(c),A=uA(o),L=N.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:r,middleware:p};A.current&&(j.platform=A.current),_Q(S.current,C.current,j).then(U=>{const K={...U,isPositioned:!0};W.current&&!op(I.current,K)&&(I.current=K,eD.flushSync(()=>{d(K)}))})},[p,t,r,A]);np(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[l]);const W=N.useRef(!1);np(()=>(W.current=!0,()=>{W.current=!1}),[]),np(()=>{if(x&&(S.current=x),w&&(C.current=w),x&&w){if(P.current)return P.current(x,w,L);L()}},[x,w,L,P]);const Z=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:b}),[v,b]),B=N.useMemo(()=>({reference:x,floating:w}),[x,w]),F=N.useMemo(()=>{const j={position:r,left:0,top:0};if(!B.floating)return j;const U=lA(B.floating,u.x),K=lA(B.floating,u.y);return s?{...j,transform:"translate("+U+"px, "+K+"px)",...cA(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:U,top:K}},[r,s,B.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:L,refs:Z,elements:B,floatingStyles:F}),[u,L,Z,B,F])}/*!
356
+ `);const v=g.state[s];if(v==null)return;JSON.stringify(o.getState())!==JSON.stringify(v)&&f(v);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(g)});case"DISPATCH":switch(y.payload.type){case"RESET":return f(h),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(Kf(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(Kf(c.name));case"ROLLBACK":return Xg(y.state,g=>{if(s===void 0){f(g),u==null||u.init(o.getState());return}f(g[s]),u==null||u.init(Kf(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Xg(y.state,g=>{if(s===void 0){f(g);return}JSON.stringify(o.getState())!==JSON.stringify(g[s])&&f(g[s])});case"IMPORT_STATE":{const{nextLiftedState:g}=y.payload,v=(m=g.computedStates.slice(-1)[0])==null?void 0:m.state;if(!v)return;f(s===void 0?v:v[s]),u==null||u.send(null,g);return}case"PAUSE_RECORDING":return p=!p}return}}),h},Xg=(e,t)=>{let r;try{r=JSON.parse(e)}catch(n){console.error("[zustand devtools middleware] Could not parse the received json",n)}r!==void 0&&t(r)};function $Y(e,t){let r;try{r=e()}catch{return}return{getItem:o=>{var i;const a=c=>c===null?null:JSON.parse(c,t==null?void 0:t.reviver),s=(i=r.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>r.setItem(o,JSON.stringify(i,t==null?void 0:t.replacer)),removeItem:o=>r.removeItem(o)}}const rl=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return rl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return rl(n)(r)}}}},OY=(e,t)=>(r,n,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:m=>m,version:0,merge:(m,g)=>({...g,...m}),...t},a=!1;const s=new Set,c=new Set;let l;try{l=i.getStorage()}catch{}if(!l)return e((...m)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...m)},n,o);const u=rl(i.serialize),d=()=>{const m=i.partialize({...n()});let g;const v=u({state:m,version:i.version}).then(b=>l.setItem(i.name,b)).catch(b=>{g=b});if(g)throw g;return v},p=o.setState;o.setState=(m,g)=>{p(m,g),d()};const f=e((...m)=>{r(...m),d()},n,o);let h;const y=()=>{var m;if(!l)return;a=!1,s.forEach(v=>v(n()));const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,n()))||void 0;return rl(l.getItem.bind(l))(i.name).then(v=>{if(v)return i.deserialize(v)}).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate)return i.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var b;return h=i.merge(v,(b=n())!=null?b:f),r(h,!0),d()}).then(()=>{g==null||g(h,void 0),a=!0,c.forEach(v=>v(h))}).catch(v=>{g==null||g(void 0,v)})};return o.persist={setOptions:m=>{i={...i,...m},m.getStorage&&(l=m.getStorage())},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>y(),hasHydrated:()=>a,onHydrate:m=>(s.add(m),()=>{s.delete(m)}),onFinishHydration:m=>(c.add(m),()=>{c.delete(m)})},y(),h||f},CY=(e,t)=>(r,n,o)=>{let i={storage:$Y(()=>localStorage),partialize:y=>y,version:0,merge:(y,m)=>({...m,...y}),...t},a=!1;const s=new Set,c=new Set;let l=i.storage;if(!l)return e((...y)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),r(...y)},n,o);const u=()=>{const y=i.partialize({...n()});return l.setItem(i.name,{state:y,version:i.version})},d=o.setState;o.setState=(y,m)=>{d(y,m),u()};const p=e((...y)=>{r(...y),u()},n,o);let f;const h=()=>{var y,m;if(!l)return;a=!1,s.forEach(v=>{var b;return v((b=n())!=null?b:p)});const g=((m=i.onRehydrateStorage)==null?void 0:m.call(i,(y=n())!=null?y:p))||void 0;return rl(l.getItem.bind(l))(i.name).then(v=>{if(v)if(typeof v.version=="number"&&v.version!==i.version){if(i.migrate)return i.migrate(v.state,v.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return v.state}).then(v=>{var b;return f=i.merge(v,(b=n())!=null?b:p),r(f,!0),u()}).then(()=>{g==null||g(f,void 0),f=n(),a=!0,c.forEach(v=>v(f))}).catch(v=>{g==null||g(void 0,v)})};return o.persist={setOptions:y=>{i={...i,...y},y.storage&&(l=y.storage)},clearStorage:()=>{l==null||l.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:y=>(s.add(y),()=>{s.delete(y)}),onFinishHydration:y=>(c.add(y),()=>{c.delete(y)})},i.skipHydration||h(),f||p},AY=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?OY(e,t):CY(e,t),wn=kY()($C(AY((e,t)=>({messageHistory:{},addMessageToHistory:({userId:r,message:n})=>e(o=>({...o,messageHistory:{...o.messageHistory,[r]:[n,...(o.messageHistory[r]??[]).slice(0,100)]}})),clientMode:"",setClientMode:r=>{const{clearAll:n,clientMode:o}=t();o!==r&&n(),e(i=>({...i,clientMode:r}))},setUser:r=>e(n=>({...n,user:r})),setConversationId:r=>e(n=>({...n,conversationId:r})),clearAll:()=>{e(r=>({...r,messageHistory:{},user:void 0,conversationId:void 0}))}}),{name:"botpress-webchat"}))),OC=$.createContext(null),IY=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:()=>{},messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,o=wn.getState().setClientMode,i=wn.getState().setConversationId;return r&&o(r.mode),$.useEffect(()=>{n&&i(n)},[n]),vC()($C((a,s)=>{const c=d=>{const p=wn.getState().conversationId;if(p)return a(f=>{const h=f.messages[p]??[];return{...f,messages:{...f.messages,[p]:[...h.filter(y=>y.id!==d.id),{id:Td(),...d}]}}})},l=d=>{const p=wn.getState().conversationId;if(p)return a(f=>({...f,messages:{...f.messages,[p]:d}}))},u=wn.getState().addMessageToHistory;return{...t,...e,eventEmitter:k5,client:r,sendFile:d=>s().client.sendFile(d),sendTextMessage:async d=>{const p=s().client;c({id:Td(),direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:"bubble",block:{type:"text",text:d}}}),p&&await p.sendMessage(d),p!=null&&p.userId&&u({message:d,userId:p.userId})},on:(d,p)=>{const f=s().client;return f?f.on(d,p):()=>{}},getClientId:()=>{var d;return(d=s().client)==null?void 0:d.clientId},setState:d=>a(p=>({...p,...d})),setMessages:l,getMessages:()=>s().messages[wn.getState().conversationId??""]??[],setIsTyping:(d,p)=>{a(f=>({...f,isTyping:d})),d&&(a(f=>({...f,lastTypingHeartbeat:new Date})),p&&setTimeout(()=>{const f=s().lastTypingHeartbeat;f&&new Date().getTime()-f.getTime()>p&&a(h=>({...h,isTyping:!1}))},p+100))},setLastTypingHeartbeat:d=>a(p=>({...p,lastTypingHeartbeat:d})),addMessage:c,setConnected:d=>a(p=>({...p,connected:d})),restartConversation:async()=>{const d=s().client,p=s().setMessages;d&&(await d.newConversation(),p([]))}}},{name:"webchatStore"}))};function ft(e){const t=$.useContext(OC);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return kC(t,e)}const RY=({text:e,buttonValue:t,type:r,variant:n,groupId:o,reusable:i,...a})=>{const s=ft(v=>v.eventEmitter),c=ft(v=>v.sendTextMessage),l=ft(v=>v.isReadOnly),[u,d]=$.useState(!1),[p,f]=$.useState(!1),[h,y]=$.useState(!1),{message:{blocks:{button:m}}}=Ht;$.useEffect(()=>{if(o)return s.on(`button-group-${o}-click`,()=>{f(!0),i||y(!0)})},[s,o,i]);function g(){o&&s.emit(`button-group-${o}-click`),d(!0),i||y(!0),n!=="link"&&c(t)}return J.jsx(PY,{...a,variant:n,onClick:g,disabled:h||l,"data-activated":u?"":void 0,"data-group-activated":p?"":void 0,"data-type":n,value:t,...m,children:e})},PY=e=>{if(e.variant==="link"){const{value:n,variant:o,...i}=e;return J.jsx("a",{...i,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return J.jsx("button",{type:"button",...r})},NY=$.forwardRef(({block:e,type:t,...r},n)=>{const{message:{blocks:{bubble:o}}}=Ht;return J.jsx("div",{...r,...o,ref:n,children:J.jsx(xs,{block:e})})}),CC=$.createContext(null);function MY(){const e=$.useContext(CC);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const AC=$.createContext(null);function IC(){const e=$.useContext(AC);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const RC=$.createContext(null);function PC(){const e=$.useContext(RC);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const jY=$.forwardRef(({url:e,type:t,orientation:r="auto",...n},o)=>{const i=$.useId(),{setIsLoading:a}=MY(),[s,c]=$.useState(r),[l,u]=$.useState(!1),{message:{blocks:{image:d}}}=Ht;return $.useLayoutEffect(()=>{a(p=>[...p,i])},[]),$.useEffect(()=>{e&&s==="auto"&&mJ(e).then(({width:p,height:f})=>{c(DY(p,f)),a(h=>h.filter(y=>y!==i))})},[e]),J.jsxs(J.Fragment,{children:[l?null:J.jsx("div",{"data-orientation":s,...d.placeholder}),J.jsx("img",{"data-orientation":s,"data-loaded":l,...n,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function DY(e,t){const r={square:1,portrait:.75,landscape:1.3333333333333333},n=e/t;return Object.keys(r).reduce((i,a)=>Math.abs(r[a]-n)<Math.abs(r[i]-n)?a:i)}const LY=$.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:o}}}=Ht;return J.jsx("div",{children:J.jsx("video",{...r,controls:!0,src:e,...o,ref:n})})}),FY=$.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:o}}}=Ht;return J.jsx("div",{children:J.jsx("audio",{...r,controls:!0,src:e,...o,ref:n})})});function qY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.createElement("path",{fillRule:"evenodd",d:"M10 3a.75.75 0 0 1 .75.75v10.638l3.96-4.158a.75.75 0 1 1 1.08 1.04l-5.25 5.5a.75.75 0 0 1-1.08 0l-5.25-5.5a.75.75 0 1 1 1.08-1.04l3.96 4.158V3.75A.75.75 0 0 1 10 3Z",clipRule:"evenodd"}))}const BY=N.forwardRef(qY);function UY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 zY=N.forwardRef(UY);function ZY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 VY=N.forwardRef(ZY);function HY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 WY=N.forwardRef(HY);function KY({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 GY=N.forwardRef(KY),JY=$.forwardRef(({type:e,latitude:t,longitude:r,title:n,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${t},${r}`,{message:{blocks:{location:s}}}=Ht;return J.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[J.jsx("p",{...s.title,children:n}),J.jsx(GY,{...s.icon})]})}),YY=$.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{column:a}}}=Ht;return J.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>J.jsx(xs,{block:s},c))})}),XY=$.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{row:a}}}=Ht;return J.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>J.jsx(xs,{block:s},c))})});function QY(e){return Object.prototype.toString.call(e)==="[object Object]"}function NC(e){return QY(e)||Array.isArray(e)}function eX(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Qg(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:r.every(a=>{const s=e[a],c=t[a];return typeof s=="function"?`${s}`==`${c}`:!NC(s)||!NC(c)?s===c:Qg(s,c)})}function MC(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function tX(e,t){if(e.length!==t.length)return!1;const r=MC(e),n=MC(t);return r.every((o,i)=>{const a=n[i];return Qg(o,a)})}function ev(e){return typeof e=="number"}function jC(e){return typeof e=="string"}function tv(e){return typeof e=="boolean"}function DC(e){return Object.prototype.toString.call(e)==="[object Object]"}function or(e){return Math.abs(e)}function rv(e){return Math.sign(e)}function Gf(e,t){return or(e-t)}function rX(e,t){if(e===0||t===0||or(e)<=or(t))return 0;const r=Gf(or(e),or(t));return or(r/e)}function nl(e){return Yf(e).map(Number)}function Ho(e){return e[Jf(e)]}function Jf(e){return Math.max(0,e.length-1)}function Yf(e){return Object.keys(e)}function LC(e,t){return[e,t].reduce((r,n)=>(Yf(n).forEach(o=>{const i=r[o],a=n[o],s=DC(i)&&DC(a);r[o]=s?LC(i,a):a}),r),{})}function FC(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function nX(e,t){const r={start:n,center:o,end:i};function n(){return 0}function o(l){return i(l)/2}function i(l){return t-l}function a(){return t*Number(e)}function s(l){return ev(e)?a():r[e](l)}return{measure:s}}function oX(e,t){const r=e==="y"?"y":"x",n=e==="y"?"x":"y",o=s(),i=c();function a(u){const{width:d,height:p}=u;return r==="x"?d:p}function s(){return r==="y"?"top":t==="rtl"?"right":"left"}function c(){return r==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:r,cross:n,startEdge:o,endEdge:i,measureSize:a}}function Si(e,t){const r=or(e-t);function n(l){return l<e}function o(l){return l>t}function i(l){return n(l)||o(l)}function a(l){return i(l)?n(l)?e:t:l}function s(l){return r?l-r*Math.ceil((l-t)/r):l}return{length:r,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:n,removeOffset:s}}function qC(e,t,r){const{constrain:n}=Si(0,e),o=e+1;let i=a(t);function a(p){return r?or((o+p)%o):n(p)}function s(){return i}function c(p){return i=a(p),d}function l(p){return u().set(s()+p)}function u(){return qC(e,s(),r)}const d={get:s,set:c,add:l,clone:u};return d}function iX(e){const t=e==="rtl"?-1:1;function r(o){return o*t}return{apply:r}}function ol(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),n}function r(){e=e.filter(o=>o())}const n={add:t,clear:r};return n}function aX(e,t,r,n,o,i,a,s,c,l,u,d,p,f,h,y,m,g,v){const{cross:b}=e,x=["INPUT","SELECT","TEXTAREA"],w={passive:!1},S=ol(),C=ol(),I=Si(50,225).constrain(h.measure(20)),P={mouse:300,touch:400},A={mouse:500,touch:600},L=y?43:25;let K=!1,z=0,B=0,F=!1,j=!1,Z=!1,W=!1;function D(de,te){if(!te)return;function we(qe){(tv(te)||te(de,qe))&&pe(qe)}const Ae=r;S.add(Ae,"dragstart",qe=>qe.preventDefault(),w).add(Ae,"touchmove",()=>{},w).add(Ae,"touchend",()=>{}).add(Ae,"touchstart",we).add(Ae,"mousedown",we).add(Ae,"touchcancel",ve).add(Ae,"contextmenu",ve).add(Ae,"click",_e,!0)}function E(){S.clear(),C.clear()}function H(){const de=W?n:r;C.add(de,"touchmove",fe,w).add(de,"touchend",ve).add(de,"mousemove",fe,w).add(de,"mouseup",ve)}function Q(de){const te=de.nodeName||"";return x.includes(te)}function T(){return(y?A:P)[W?"mouse":"touch"]}function ce(de,te){const we=p.add(rv(de)*-1),Ae=d.byDistance(de,!y).distance;return y||or(de)<I?Ae:g&&te?Ae*.5:d.byIndex(we.get(),0).distance}function pe(de){const te=FC(de,o);W=te,!(te&&de.button!==0)&&(Q(de.target)||(Z=y&&te&&!de.buttons&&K,K=Gf(i.get(),s.get())>=2,F=!0,a.pointerDown(de),u.useFriction(0).useDuration(0),i.set(s),H(),z=a.readPoint(de),B=a.readPoint(de,b),f.emit("pointerDown")))}function fe(de){const te=a.readPoint(de),we=a.readPoint(de,b),Ae=Gf(te,z),qe=Gf(we,B);if(!j&&!W&&(!de.cancelable||(j=Ae>qe,!j)))return ve(de);const q=a.pointerMove(de);Ae>m&&(Z=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(q)),de.preventDefault()}function ve(de){const we=d.byDistance(0,!1).index!==p.get(),Ae=a.pointerUp(de)*T(),qe=ce(t.apply(Ae),we),q=rX(Ae,qe),le=L-10*q,he=v+q/50;j=!1,F=!1,C.clear(),u.useDuration(le).useFriction(he),l.distance(qe,!y),W=!1,f.emit("pointerUp")}function _e(de){Z&&(de.stopPropagation(),de.preventDefault())}function Ce(){return F}return{init:D,pointerDown:Ce,destroy:E}}function sX(e,t){let n,o;function i(d){return d.timeStamp}function a(d,p){const h=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(FC(d,t)?d:d.touches[0])[h]}function s(d){return n=d,o=d,a(d)}function c(d){const p=a(d)-a(o),f=i(d)-i(n)>170;return o=d,f&&(n=d),p}function l(d){if(!n||!o)return 0;const p=a(o)-a(n),f=i(d)-i(n),h=i(d)-i(o)>170,y=p/f;return f&&!h&&or(y)>.1?y:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function cX(e){function t(n){return e*(n/100)}return{measure:t}}function lX(e,t,r,n,o){let i,a,s=[],c=!1;function l(f){return o.measureSize(f.getBoundingClientRect())}function u(f,h){if(!h)return;a=l(e),s=n.map(l);function y(g){for(const v of g){const b=v.target===e,x=n.indexOf(v.target),w=b?a:s[x],S=l(b?e:n[x]);if(w!==S){r.requestAnimationFrame(()=>{f.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(g=>{c||(tv(h)||h(f,g))&&y(g)}),[e].concat(n).forEach(g=>i.observe(g))}function d(){i&&i.disconnect(),c=!0}return{init:u,destroy:d}}function uX(e,t,r,n){let o=!0,i=0,a=0,s=r,c=n,l=e.get(),u=0;function d(){const w=t.get()-e.get(),S=!s;let C=0;return S?(i=0,e.set(t),C=w):(i+=w/s,i*=c,l+=i,e.add(i),C=l-u),a=rv(C),u=l,o=or(w)<.001,x}function p(){return o}function f(){return s}function h(){return a}function y(){return i}function m(){return v(r)}function g(){return b(n)}function v(w){return s=w,x}function b(w){return c=w,x}const x={direction:h,duration:f,velocity:y,seek:d,settled:p,useBaseFriction:g,useBaseDuration:m,useFriction:b,useDuration:v};return x}function dX(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=Si(.1,.99);let c=!1;function l(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function u(f){if(!l())return;const h=e.reachedMin(t.get())?"min":"max",y=or(e[h]-t.get()),m=r.get()-t.get(),g=s.constrain(y/a);r.subtract(m*g),!f&&or(m)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(f){c=!f}return{constrain:u,toggleActive:d}}function fX(e,t,r,n){const o=Si(-t+e,r[0]),i=c(),a=l();function s(){const d=i[0],p=Ho(i),f=i.lastIndexOf(d),h=i.indexOf(p)+1;return Si(f,h)}function c(){return r.map(o.constrain).map(d=>parseFloat(d.toFixed(3)))}function l(){if(t<=e)return[o.max];if(n==="keepSnaps")return i;const{min:d,max:p}=s();return i.slice(d,p)}return{snapsContained:a}}function pX(e,t,r){const n=t[0],o=r?n-e:Ho(t);return{limit:Si(o,n)}}function hX(e,t,r,n){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=Si(i,a);function l(p){return p===1?c(r.get()):p===-1?s(r.get()):!1}function u(p){if(!l(p))return;const f=e*(p*-1);n.forEach(h=>h.add(f))}return{loop:u}}function mX(e){const{max:t,length:r}=e;function n(i){return(i-t)/-r}return{get:n}}function yX(e,t,r,n,o,i,a){const{startEdge:s,endEdge:c}=e,{groupSlides:l}=i,u=f().map(t.measure),d=h(),p=y();function f(){return l(n).map(g=>Ho(g)[c]-g[0][s]).map(or)}function h(){return n.map(g=>r[s]-g[s]).map(g=>-or(g))}function y(){const v=Ho(d)-Ho(o);return l(d).map(b=>b[0]).map((b,x,w)=>{const S=!x,C=x===Jf(w);return a&&S?0:a&&C?v:b+u[x]})}return{snaps:d,snapsAligned:p}}function gX(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function c(h){return h.concat().sort((y,m)=>or(y)-or(m))[0]}function l(h){const y=e?a(h):s(h),m=t.map(v=>v-y).map(v=>u(v,0)).map((v,b)=>({diff:v,index:b})).sort((v,b)=>or(v.diff)-or(b.diff)),{index:g}=m[0];return{index:g,distance:y}}function u(h,y){const m=[h,h+r,h-r];if(!e)return m[0];if(!y)return c(m);const g=m.filter(v=>rv(v)===y);return c(g)}function d(h,y){const m=t[h]-o.get(),g=u(m,y);return{index:h,distance:g}}function p(h,y){const m=o.get()+h,{index:g,distance:v}=l(m),b=!e&&i(m);if(!y||b)return{index:g,distance:h};const x=t[g]-v,w=h+u(x,0);return{index:g,distance:w}}return{byDistance:p,byIndex:d,shortcut:u}}function vX(e,t,r,n,o,i,a){function s(d){const p=d.distance,f=d.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),f&&(r.set(t.get()),t.set(d.index),a.emit("select"))}function c(d,p){const f=n.byDistance(d,p);s(f)}function l(d,p){const f=t.clone().set(d),h=n.byIndex(f.get(),p);s(h)}return{distance:c,index:l}}function Xf(e){let t=e;function r(){return t}function n(c){t=a(c)}function o(c){t+=a(c)}function i(c){t-=a(c)}function a(c){return ev(c)?c:c.get()}return{get:r,set:n,add:o,subtract:i}}function BC(e,t,r){const n=e.scroll==="x"?a:s,o=r.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function c(p){i||(o.transform=n(t.apply(p)))}function l(p){i=!p}function u(){i||(o.transform="",r.getAttribute("style")||r.removeAttribute("style"))}return{clear:u,to:c,toggleActive:l}}function bX(e,t,r,n,o,i,a,s,c){const l=nl(o),u=nl(o).reverse(),d=y().concat(m());function p(w,S){return w.reduce((C,I)=>C-o[I],S)}function f(w,S){return w.reduce((C,I)=>p(C,S)>0?C.concat([I]):C,[])}function h(w,S){const C=S==="start",I=C?-n:n,P=a.findSlideBounds([I]);return w.map(A=>{const L=C?0:-n,K=C?n:0,B=P.filter(F=>F.index===A)[0][C?"end":"start"];return{index:A,slideLocation:Xf(-1),translate:BC(e,t,c[A]),target:()=>s.get()>B?L:K}})}function y(){const w=i[0]-1,S=f(u,w);return h(S,"end")}function m(){const w=r-i[0]-1,S=f(l,w);return h(S,"start")}function g(){return d.every(({index:w})=>{const S=l.filter(C=>C!==w);return p(S,r)<=.1})}function v(){d.forEach(w=>{const{target:S,translate:C,slideLocation:I}=w,P=S();P!==I.get()&&(C.to(P),I.set(P))})}function b(){d.forEach(w=>w.translate.clear())}return{canLoop:g,clear:b,loop:v,loopPoints:d}}function wX(e,t){let r,n=!1;function o(s,c){if(!c)return;function l(u){for(const d of u)if(d.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}r=new MutationObserver(u=>{n||(tv(c)||c(s,u))&&l(u)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:o,destroy:i}}function xX(e,t,r,n,o,i,a){const{removeOffset:s,constrain:c}=o,l=.5,u=i?[0,t,-t]:[0],d=f(u,a);function p(m){const g=m||0;return r.map(v=>Si(l,v-l).constrain(v*g))}function f(m,g){const v=m||u,b=p(g);return v.reduce((x,w)=>{const S=n.map((C,I)=>({start:C-r[I]+b[I]+w,end:C+e-b[I]+w,index:I}));return x.concat(S)},[])}function h(m,g){const v=i?s(m):c(m);return(g||d).reduce((x,w)=>{const{index:S,start:C,end:I}=w,P=x.includes(S),A=C<v&&I>v;return!P&&A?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function SX(e,t,r,n,o,i){const{measureSize:a,startEdge:s,endEdge:c}=e,l=r[0]&&o,u=h(),d=y(),p=r.map(a),f=m();function h(){if(!l)return 0;const v=r[0];return or(t[s]-v[s])}function y(){if(!l)return 0;const v=i.getComputedStyle(Ho(n));return parseFloat(v.getPropertyValue(`margin-${c}`))}function m(){return r.map((v,b,x)=>{const w=!b,S=b===Jf(x);return w?p[b]+u:S?p[b]+d:x[b+1][s]-v[s]}).map(or)}return{slideSizes:p,slideSizesWithGaps:f}}function _X(e,t,r){const n=ev(r);function o(c,l){return nl(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return nl(c).reduce((l,u)=>{const p=t.slice(Ho(l),u+1).reduce((f,h)=>f+h,0);return!u||p>e?l.concat(u):l},[]).map((l,u,d)=>c.slice(l,d[u+1]))}function a(c){return n?o(c,r):i(c)}return{groupSlides:a}}function EX(e,t,r,n,o,i,a,s){const{align:c,axis:l,direction:u,startIndex:d,inViewThreshold:p,loop:f,duration:h,dragFree:y,dragThreshold:m,slidesToScroll:g,skipSnaps:v,containScroll:b}=i,x=t.getBoundingClientRect(),w=r.map(he=>he.getBoundingClientRect()),S=iX(u),C=oX(l,u),I=C.measureSize(x),P=cX(I),A=nX(c,I),L=!f&&!!b,K=f||!!b,{slideSizes:z,slideSizesWithGaps:B}=SX(C,x,w,r,K,o),F=_X(I,B,g),{snaps:j,snapsAligned:Z}=yX(C,A,x,w,B,F,L),W=-Ho(j)+Ho(B),{snapsContained:D}=fX(I,W,Z,b),E=L?D:Z,{limit:H}=pX(W,E,f),Q=qC(Jf(E),d,f),T=Q.clone(),ce=nl(r),pe=({dragHandler:he,scrollBody:me,scrollBounds:je,eventHandler:Ie,animation:Ue,options:{loop:pt}})=>{const Ke=he.pointerDown();pt||je.constrain(Ke);const G=me.seek().settled();G&&!Ke&&(Ue.stop(),Ie.emit("settle")),G||Ie.emit("scroll")},fe=({scrollBody:he,translate:me,location:je,offsetLocation:Ie,scrollLooper:Ue,slideLooper:pt,options:{loop:Ke}},G)=>{const se=he.velocity();Ie.set(je.get()-se+se*G),Ke&&(Ue.loop(he.direction()),pt.loop()),me.to(Ie.get())},ve={start:()=>s.start(le),stop:()=>s.stop(le),update:()=>pe(le),render:he=>fe(le,he)},_e=.68,Ce=E[Q.get()],be=Xf(Ce),de=Xf(Ce),te=Xf(Ce),we=uX(be,te,h,_e),Ae=gX(f,E,W,H,te),qe=vX(ve,Q,T,Ae,we,te,a),q=xX(I,W,z,j,H,f,p),le={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:x,slideRects:w,animation:ve,axis:C,direction:S,dragHandler:aX(C,S,e,n,o,te,sX(C,o),be,ve,qe,we,Ae,Q,a,P,y,m,v,_e),eventStore:ol(),percentOfView:P,index:Q,indexPrevious:T,limit:H,location:be,offsetLocation:de,options:i,resizeHandler:lX(t,a,o,r,C),scrollBody:we,scrollBounds:dX(H,be,te,we,P),scrollLooper:hX(W,H,de,[be,de,te]),scrollProgress:mX(H),scrollSnaps:E,scrollTarget:Ae,scrollTo:qe,slideLooper:bX(C,S,I,W,B,E,q,de,r),slidesHandler:wX(t,a),slidesInView:q,slideIndexes:ce,slidesToScroll:F,target:te,translate:BC(C,S,t)};return le}function kX(e){const t=16.666666666666668;let r=[],n=null,o=0,i=0;function a(d){n||(n=d);const p=d-n;for(n=d,o+=p;o>=t;)r.forEach(({animation:h})=>h.update()),o-=t;const f=or(o/t);r.forEach(({animation:h})=>h.render(f)),i&&e.requestAnimationFrame(a)}function s(d){r.includes(d)||r.push(d),!i&&(i=e.requestAnimationFrame(a))}function c(d){r=r.filter(p=>p!==d),!r.length&&(e.cancelAnimationFrame(i),n=null,o=0,i=0)}function l(){n=null,o=0}return{start:s,stop:c,reset:l,window:e}}function TX(){const e={};let t;function r(c){t=c}function n(c){return e[c]||[]}function o(c){return n(c).forEach(l=>l(t,c)),s}function i(c,l){return e[c]=n(c).concat([l]),s}function a(c,l){return e[c]=n(c).filter(u=>u!==l),s}const s={init:r,emit:o,off:a,on:i};return s}const $X={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 OX(e){function t(i,a){return LC(i,a||{})}function r(i){const a=i.breakpoints||{},s=Yf(a).filter(c=>e.matchMedia(c).matches).map(c=>a[c]).reduce((c,l)=>t(c,l),{});return t(i,s)}function n(i){return i.map(a=>Yf(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function CX(e){let t=[];function r(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,c)=>Object.assign(s,{[c.name]:c}),{})}function n(){t=t.filter(i=>i.destroy())}return{init:r,destroy:n}}function hs(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=OX(o),a=CX(i),s=ol(),c=ol(),l=TX(),{animationRealms:u}=hs,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:h,off:y,emit:m}=l,g=z;let v=!1,b,x=d($X,hs.globalOptions),w=d(x),S=[],C,I,P;function A(){const{container:we,slides:Ae}=w;I=(jC(we)?e.querySelector(we):we)||e.children[0];const q=jC(Ae)?I.querySelectorAll(Ae):Ae;P=[].slice.call(q||I.children)}function L(we,Ae){const qe=EX(e,I,P,n,o,we,l,Ae);if(we.loop&&!qe.slideLooper.canLoop()){const q=Object.assign({},we,{loop:!1});return L(q,Ae)}return qe}function K(we,Ae){if(v)return;const qe=u.find(le=>le.window===o),q=qe||kX(o);qe||u.push(q),x=d(x,we),w=p(x),S=Ae||S,A(),b=L(w,q),f([x,...S.map(({options:le})=>le)]).forEach(le=>s.add(le,"change",z)),w.active&&(b.translate.to(b.location.get()),b.eventHandler.init(te),b.resizeHandler.init(te,w.watchResize),b.slidesHandler.init(te,w.watchSlides),c.add(n,"visibilitychange",()=>{n.hidden&&q.reset()}),b.options.loop&&b.slideLooper.loop(),I.offsetParent&&P.length&&b.dragHandler.init(te,w.watchDrag),C=a.init(S,te))}function z(we,Ae){const qe=pe();B(),K(d({startIndex:qe},we),Ae),l.emit("reInit")}function B(){b.dragHandler.destroy(),b.animation.stop(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),a.destroy(),s.clear(),c.clear()}function F(){v||(v=!0,s.clear(),B(),l.emit("destroy"))}function j(we){const Ae=b[we?"target":"location"].get(),qe=w.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[qe](Ae))}function Z(we){const Ae=j(we);return b.slideIndexes.filter(qe=>!Ae.includes(qe))}function W(we,Ae,qe){!w.active||v||(b.scrollBody.useBaseFriction().useDuration(Ae?0:w.duration),b.scrollTo.index(we,qe||0))}function D(we){const Ae=b.index.add(1).get();W(Ae,we===!0,-1)}function E(we){const Ae=b.index.add(-1).get();W(Ae,we===!0,1)}function H(){return b.index.add(1).get()!==pe()}function Q(){return b.index.add(-1).get()!==pe()}function T(){return b.scrollSnaps.map(b.scrollProgress.get)}function ce(){return b.scrollProgress.get(b.location.get())}function pe(){return b.index.get()}function fe(){return b.indexPrevious.get()}function ve(){return C}function _e(){return b}function Ce(){return e}function be(){return I}function de(){return P}const te={canScrollNext:H,canScrollPrev:Q,containerNode:be,internalEngine:_e,destroy:F,off:y,on:h,emit:m,plugins:ve,previousScrollSnap:fe,reInit:g,rootNode:Ce,scrollNext:D,scrollPrev:E,scrollProgress:ce,scrollSnapList:T,scrollTo:W,selectedScrollSnap:pe,slideNodes:de,slidesInView:j,slidesNotInView:Z};return K(t,r),setTimeout(()=>l.emit("init"),0),te}hs.animationRealms=[],hs.globalOptions=void 0;function nv(e={},t=[]){const r=$.useRef(e),n=$.useRef(t),[o,i]=$.useState(),[a,s]=$.useState(),c=$.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return $.useEffect(()=>{if(eX()&&a){hs.globalOptions=nv.globalOptions;const l=hs(a,r.current,n.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),$.useEffect(()=>{Qg(r.current,e)||(r.current=e,c())},[e,c]),$.useEffect(()=>{tX(n.current,t)||(n.current=t,c())},[t,c]),[s,o]}nv.globalOptions=void 0;function AX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 IX=N.forwardRef(AX);function RX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 PX=N.forwardRef(RX);function NX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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"}),N.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 MX=N.forwardRef(NX);function jX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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"}),N.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 DX=N.forwardRef(jX);function LX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 FX=N.forwardRef(LX);function qX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 BX=N.forwardRef(qX);function UX({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 zX=N.forwardRef(UX),ZX=$.forwardRef(({blocks:e},t)=>{const[r,n]=nv({skipSnaps:!0}),[o,i]=$.useState(!0),[a,s]=$.useState(!0),c=$.useCallback(()=>n==null?void 0:n.scrollPrev(),[n]),l=$.useCallback(()=>n==null?void 0:n.scrollNext(),[n]),{message:{blocks:{carousel:u}}}=Ht,d=$.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return $.useEffect(()=>{n&&(d(n),n.on("reInit",d),n.on("select",d))},[n,d]),J.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:r,children:[J.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,f)=>J.jsx(xs,{block:p},f))}),J.jsx(IX,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),J.jsx(PX,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),ms=Math.min,xn=Math.max,Qf=Math.round,ys=Math.floor,_i=e=>({x:e,y:e});function UC(e,t,r){return xn(e,ms(t,r))}function ep(e,t){return typeof e=="function"?e(t):e}function il(e){return e.split("-")[0]}function ov(e){return e.split("-")[1]}function zC(e){return e==="x"?"y":"x"}function VX(e){return e==="y"?"height":"width"}function al(e){return["top","bottom"].includes(il(e))?"y":"x"}function HX(e){return zC(al(e))}function WX(e){return{top:0,right:0,bottom:0,left:0,...e}}function KX(e){return typeof e!="number"?WX(e):{top:e,right:e,bottom:e,left:e}}function tp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function Ei(e){return ZC(e)?(e.nodeName||"").toLowerCase():"#document"}function Sn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Wo(e){var t;return(t=(ZC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ZC(e){return e instanceof Node||e instanceof Sn(e).Node}function lr(e){return e instanceof Element||e instanceof Sn(e).Element}function Yr(e){return e instanceof HTMLElement||e instanceof Sn(e).HTMLElement}function iv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Sn(e).ShadowRoot}function sl(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=_n(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function GX(e){return["table","td","th"].includes(Ei(e))}function av(e){const t=sv(),r=_n(e);return r.transform!=="none"||r.perspective!=="none"||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||["transform","perspective","filter"].some(n=>(r.willChange||"").includes(n))||["paint","layout","strict","content"].some(n=>(r.contain||"").includes(n))}function JX(e){let t=ua(e);for(;Yr(t)&&!cl(t);){if(av(t))return t;t=ua(t)}return null}function sv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function cl(e){return["html","body","#document"].includes(Ei(e))}function _n(e){return Sn(e).getComputedStyle(e)}function rp(e){return lr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ua(e){if(Ei(e)==="html")return e;const t=e.assignedSlot||e.parentNode||iv(e)&&e.host||Wo(e);return iv(t)?t.host:t}function VC(e){const t=ua(e);return cl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Yr(t)&&sl(t)?t:VC(t)}function ki(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=VC(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Sn(o);return i?t.concat(a,a.visualViewport||[],sl(o)?o:[],a.frameElement&&r?ki(a.frameElement):[]):t.concat(o,ki(o,[],r))}function Ti(e){let t=e.activeElement;for(;((r=t)==null||(n=r.shadowRoot)==null?void 0:n.activeElement)!=null;){var r,n;t=t.shadowRoot.activeElement}return t}function fn(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&iv(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function HC(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function YX(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:r,version:n}=t;return r+"/"+n}).join(" "):navigator.userAgent}function WC(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(HC())||t.test(YX()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function KC(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 GC(){return/apple/i.test(navigator.vendor)}function XX(){return HC().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function JC(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function QX(e){return"nativeEvent"in e}function eQ(e){return e.matches("html,body")}function Yn(e){return(e==null?void 0:e.ownerDocument)||document}function cv(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const r=e;return r.target!=null&&t.contains(r.target)}function YC(e){return"composedPath"in e?e.composedPath()[0]:e.target}const tQ="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function XC(e){return Yr(e)&&e.matches(tQ)}function Fr(e){e.preventDefault(),e.stopPropagation()}function QC(e,t,r){let{reference:n,floating:o}=e;const i=al(t),a=HX(t),s=VX(a),c=il(t),l=i==="y",u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,p=n[s]/2-o[s]/2;let f;switch(c){case"top":f={x:u,y:n.y-o.height};break;case"bottom":f={x:u,y:n.y+n.height};break;case"right":f={x:n.x+n.width,y:d};break;case"left":f={x:n.x-o.width,y:d};break;default:f={x:n.x,y:n.y}}switch(ov(t)){case"start":f[a]-=p*(r&&l?-1:1);break;case"end":f[a]+=p*(r&&l?-1:1);break}return f}const rQ=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=QC(l,n,c),p=n,f={},h=0;for(let y=0;y<s.length;y++){const{name:m,fn:g}=s[y],{x:v,y:b,data:x,reset:w}=await g({x:u,y:d,initialPlacement:n,placement:p,strategy:o,middlewareData:f,rects:l,platform:a,elements:{reference:e,floating:t}});if(u=v??u,d=b??d,f={...f,[m]:{...f[m],...x}},w&&h<=50){h++,typeof w=="object"&&(w.placement&&(p=w.placement),w.rects&&(l=w.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:u,y:d}=QC(l,p,c)),y=-1;continue}}return{x:u,y:d,placement:p,strategy:o,middlewareData:f}};async function eA(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:f=0}=ep(t,e),h=KX(f),m=s[p?d==="floating"?"reference":"floating":d],g=tp(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(m)))==null||r?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),v=d==="floating"?{...a.floating,x:n,y:o}:a.reference,b=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),x=await(i.isElement==null?void 0:i.isElement(b))?await(i.getScale==null?void 0:i.getScale(b))||{x:1,y:1}:{x:1,y:1},w=tp(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:v,offsetParent:b,strategy:c}):v);return{top:(g.top-w.top+h.top)/x.y,bottom:(w.bottom-g.bottom+h.bottom)/x.y,left:(g.left-w.left+h.left)/x.x,right:(w.right-g.right+h.right)/x.x}}async function nQ(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=il(r),s=ov(r),c=al(r)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=ep(t,e);let{mainAxis:p,crossAxis:f,alignmentAxis:h}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&typeof h=="number"&&(f=s==="end"?h*-1:h),c?{x:f*u,y:p*l}:{x:p*l,y:f*u}}const oQ=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await nQ(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},iQ=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:m=>{let{x:g,y:v}=m;return{x:g,y:v}}},...c}=ep(e,t),l={x:r,y:n},u=await eA(t,c),d=al(il(o)),p=zC(d);let f=l[p],h=l[d];if(i){const m=p==="y"?"top":"left",g=p==="y"?"bottom":"right",v=f+u[m],b=f-u[g];f=UC(v,f,b)}if(a){const m=d==="y"?"top":"left",g=d==="y"?"bottom":"right",v=h+u[m],b=h-u[g];h=UC(v,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-r,y:y.y-n}}}}},aQ=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:a=()=>{},...s}=ep(e,t),c=await eA(t,s),l=il(r),u=ov(r),d=al(r)==="y",{width:p,height:f}=n.floating;let h,y;l==="top"||l==="bottom"?(h=l,y=u===(await(o.isRTL==null?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(y=l,h=u==="end"?"top":"bottom");const m=f-c[h],g=p-c[y],v=!t.middlewareData.shift;let b=m,x=g;if(d){const S=p-c.left-c.right;x=u||v?ms(g,S):S}else{const S=f-c.top-c.bottom;b=u||v?ms(m,S):S}if(v&&!u){const S=xn(c.left,0),C=xn(c.right,0),I=xn(c.top,0),P=xn(c.bottom,0);d?x=p-2*(S!==0||C!==0?S+C:xn(c.left,c.right)):b=f-2*(I!==0||P!==0?I+P:xn(c.top,c.bottom))}await a({...t,availableWidth:x,availableHeight:b});const w=await o.getDimensions(i.floating);return p!==w.width||f!==w.height?{reset:{rects:!0}}:{}}}};function tA(e){const t=_n(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Yr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=Qf(r)!==i||Qf(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function lv(e){return lr(e)?e:e.contextElement}function gs(e){const t=lv(e);if(!Yr(t))return _i(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=tA(t);let a=(i?Qf(r.width):r.width)/n,s=(i?Qf(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const sQ=_i(0);function rA(e){const t=Sn(e);return!sv()||!t.visualViewport?sQ:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cQ(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Sn(e)?!1:t}function da(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=lv(e);let a=_i(1);t&&(n?lr(n)&&(a=gs(n)):a=gs(e));const s=cQ(i,r,n)?rA(i):_i(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const p=Sn(i),f=n&&lr(n)?Sn(n):n;let h=p.frameElement;for(;h&&n&&f!==p;){const y=gs(h),m=h.getBoundingClientRect(),g=_n(h),v=m.left+(h.clientLeft+parseFloat(g.paddingLeft))*y.x,b=m.top+(h.clientTop+parseFloat(g.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=v,l+=b,h=Sn(h).frameElement}}return tp({width:u,height:d,x:c,y:l})}function lQ(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Yr(r),i=Wo(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=_i(1);const c=_i(0);if((o||!o&&n!=="fixed")&&((Ei(r)!=="body"||sl(i))&&(a=rp(r)),Yr(r))){const l=da(r);s=gs(r),c.x=l.x+r.clientLeft,c.y=l.y+r.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-a.scrollLeft*s.x+c.x,y:t.y*s.y-a.scrollTop*s.y+c.y}}function uQ(e){return Array.from(e.getClientRects())}function nA(e){return da(Wo(e)).left+rp(e).scrollLeft}function dQ(e){const t=Wo(e),r=rp(e),n=e.ownerDocument.body,o=xn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=xn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+nA(e);const s=-r.scrollTop;return _n(n).direction==="rtl"&&(a+=xn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function fQ(e,t){const r=Sn(e),n=Wo(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const l=sv();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function pQ(e,t){const r=da(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Yr(e)?gs(e):_i(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,c=o*i.x,l=n*i.y;return{width:a,height:s,x:c,y:l}}function oA(e,t,r){let n;if(t==="viewport")n=fQ(e,r);else if(t==="document")n=dQ(Wo(e));else if(lr(t))n=pQ(t,r);else{const o=rA(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return tp(n)}function iA(e,t){const r=ua(e);return r===t||!lr(r)||cl(r)?!1:_n(r).position==="fixed"||iA(r,t)}function hQ(e,t){const r=t.get(e);if(r)return r;let n=ki(e,[],!1).filter(s=>lr(s)&&Ei(s)!=="body"),o=null;const i=_n(e).position==="fixed";let a=i?ua(e):e;for(;lr(a)&&!cl(a);){const s=_n(a),c=av(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||sl(a)&&!c&&iA(e,a))?n=n.filter(u=>u!==a):o=s,a=ua(a)}return t.set(e,n),n}function mQ(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?hQ(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((l,u)=>{const d=oA(t,u,o);return l.top=xn(d.top,l.top),l.right=ms(d.right,l.right),l.bottom=ms(d.bottom,l.bottom),l.left=xn(d.left,l.left),l},oA(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yQ(e){return tA(e)}function gQ(e,t,r){const n=Yr(t),o=Wo(t),i=r==="fixed",a=da(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=_i(0);if(n||!n&&!i)if((Ei(t)!=="body"||sl(o))&&(s=rp(t)),n){const l=da(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=nA(o));return{x:a.left+s.scrollLeft-c.x,y:a.top+s.scrollTop-c.y,width:a.width,height:a.height}}function aA(e,t){return!Yr(e)||_n(e).position==="fixed"?null:t?t(e):e.offsetParent}function sA(e,t){const r=Sn(e);if(!Yr(e))return r;let n=aA(e,t);for(;n&&GX(n)&&_n(n).position==="static";)n=aA(n,t);return n&&(Ei(n)==="html"||Ei(n)==="body"&&_n(n).position==="static"&&!av(n))?r:n||JX(e)||r}const vQ=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||sA,i=this.getDimensions;return{reference:gQ(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function bQ(e){return _n(e).direction==="rtl"}const wQ={convertOffsetParentRelativeRectToViewportRelativeRect:lQ,getDocumentElement:Wo,getClippingRect:mQ,getOffsetParent:sA,getElementRects:vQ,getClientRects:uQ,getDimensions:yQ,getScale:gs,isElement:lr,isRTL:bQ};function xQ(e,t){let r=null,n;const o=Wo(e);function i(){clearTimeout(n),r&&r.disconnect(),r=null}function a(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),i();const{left:l,top:u,width:d,height:p}=e.getBoundingClientRect();if(s||t(),!d||!p)return;const f=ys(u),h=ys(o.clientWidth-(l+d)),y=ys(o.clientHeight-(u+p)),m=ys(l),v={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:xn(0,ms(1,c))||1};let b=!0;function x(w){const S=w[0].intersectionRatio;if(S!==c){if(!b)return a();S?a(!1,S):n=setTimeout(()=>{a(!1,1e-7)},100)}b=!1}try{r=new IntersectionObserver(x,{...v,root:o.ownerDocument})}catch{r=new IntersectionObserver(x,v)}r.observe(e)}return a(!0),i}function SQ(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,l=lv(e),u=o||i?[...l?ki(l):[],...ki(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=l&&s?xQ(l,r):null;let p=-1,f=null;a&&(f=new ResizeObserver(g=>{let[v]=g;v&&v.target===l&&f&&(f.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{f&&f.observe(t)})),r()}),l&&!c&&f.observe(l),f.observe(t));let h,y=c?da(e):null;c&&m();function m(){const g=da(e);y&&(g.x!==y.x||g.y!==y.y||g.width!==y.width||g.height!==y.height)&&r(),y=g,h=requestAnimationFrame(m)}return r(),()=>{u.forEach(g=>{o&&g.removeEventListener("scroll",r),i&&g.removeEventListener("resize",r)}),d&&d(),f&&f.disconnect(),f=null,c&&cancelAnimationFrame(h)}}const _Q=(e,t,r)=>{const n=new Map,o={platform:wQ,...r},i={...o.platform,_c:n};return rQ(e,t,{...o,platform:i})};var np=typeof document<"u"?$.useLayoutEffect:$.useEffect;function op(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!op(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const i=o[n];if(!(i==="_owner"&&e.$$typeof)&&!op(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function cA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lA(e,t){const r=cA(e);return Math.round(t*r)/r}function uA(e){const t=N.useRef(e);return np(()=>{t.current=e}),t}function EQ(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=N.useState(n);op(p,n)||f(n);const[h,y]=N.useState(null),[m,g]=N.useState(null),v=N.useCallback(j=>{j!=S.current&&(S.current=j,y(j))},[y]),b=N.useCallback(j=>{j!==C.current&&(C.current=j,g(j))},[g]),x=i||h,w=a||m,S=N.useRef(null),C=N.useRef(null),I=N.useRef(u),P=uA(c),A=uA(o),L=N.useCallback(()=>{if(!S.current||!C.current)return;const j={placement:t,strategy:r,middleware:p};A.current&&(j.platform=A.current),_Q(S.current,C.current,j).then(Z=>{const W={...Z,isPositioned:!0};K.current&&!op(I.current,W)&&(I.current=W,eD.flushSync(()=>{d(W)}))})},[p,t,r,A]);np(()=>{l===!1&&I.current.isPositioned&&(I.current.isPositioned=!1,d(j=>({...j,isPositioned:!1})))},[l]);const K=N.useRef(!1);np(()=>(K.current=!0,()=>{K.current=!1}),[]),np(()=>{if(x&&(S.current=x),w&&(C.current=w),x&&w){if(P.current)return P.current(x,w,L);L()}},[x,w,L,P]);const z=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:b}),[v,b]),B=N.useMemo(()=>({reference:x,floating:w}),[x,w]),F=N.useMemo(()=>{const j={position:r,left:0,top:0};if(!B.floating)return j;const Z=lA(B.floating,u.x),W=lA(B.floating,u.y);return s?{...j,transform:"translate("+Z+"px, "+W+"px)",...cA(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Z,top:W}},[r,s,B.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:L,refs:z,elements:B,floatingStyles:F}),[u,L,z,B,F])}/*!
357
357
  * tabbable 6.2.0
358
358
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
359
- */var kQ=["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])"],uv=kQ.join(","),dA=typeof Element>"u",ll=dA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ip=!dA&&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},ap=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",a=i||r&&t&&e(t.parentNode);return a},TQ=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},$Q=function(t,r,n){if(ap(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(uv));return r&&ll.call(t,uv)&&o.unshift(t),o=o.filter(n),o},OQ=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ap(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ll.call(a,uv);u&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!ap(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,n);n.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},fA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pA=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TQ(t))&&!fA(t)?0:t.tabIndex},CQ=function(t,r){var n=pA(t);return n<0&&r&&!fA(t)?0:n},AQ=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},hA=function(t){return t.tagName==="INPUT"},IQ=function(t){return hA(t)&&t.type==="hidden"},RQ=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},PQ=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},NQ=function(t){if(!t.name)return!0;var r=t.form||ip(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=PQ(o,t.form);return!i||i===t},MQ=function(t){return hA(t)&&t.type==="radio"},jQ=function(t){return MQ(t)&&!NQ(t)},DQ=function(t){var r,n=t&&ip(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,d;n=ip(o),o=(l=n)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},mA=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},LQ=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ll.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ll.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=ip(t);if(c&&!c.shadowRoot&&o(c)===!0)return mA(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(DQ(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return mA(t);return!1},FQ=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return ll.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},qQ=function(t,r){return!(r.disabled||ap(r)||IQ(r)||LQ(r,t)||RQ(r)||FQ(r))},yA=function(t,r){return!(jQ(r)||pA(r)<0||!qQ(t,r))},BQ=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},UQ=function e(t){var r=[],n=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=CQ(s,a),l=a?e(o.candidates):s;c===0?a?r.push.apply(r,l):r.push(s):n.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),n.sort(AQ).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},dv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=OQ([t],r.includeContainer,{filter:yA.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:BQ}):n=$Q(t,r.includeContainer,yA.bind(null,r)),UQ(n)};const fv="ArrowUp",sp="ArrowDown",vs="ArrowLeft",ul="ArrowRight";function cp(e,t,r){return Math.floor(e/t)!==r}function dl(e,t){return t<0||t>=e.current.length}function pv(e,t){return Xr(e,{disabledIndices:t})}function gA(e,t){return Xr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xr(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=r;do{var c,l;s=s+(n?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function zQ(e,t){let{event:r,orientation:n,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,d=l;if(r.key===fv){if(u&&Fr(r),l===-1)d=c;else if(d=Xr(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||d<0)){const p=l%i,f=c%i,h=c-(f-p);f===p?d=c:d=f>p?h:h-i}dl(e,d)&&(d=l)}if(r.key===sp&&(u&&Fr(r),l===-1?d=s:(d=Xr(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=Xr(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),dl(e,d)&&(d=l)),n==="both"){const p=ys(l/i);r.key===ul&&(u&&Fr(r),l%i!==i-1?(d=Xr(e,{startingIndex:l,disabledIndices:a}),o&&cp(d,i,p)&&(d=Xr(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=Xr(e,{startingIndex:l-l%i-1,disabledIndices:a})),cp(d,i,p)&&(d=l)),r.key===vs&&(u&&Fr(r),l%i!==0?(d=Xr(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&cp(d,i,p)&&(d=Xr(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=Xr(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),cp(d,i,p)&&(d=l));const f=ys(c/i)===p;dl(e,d)&&(o&&f?d=r.key===vs?c:Xr(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}let vA=0;function Ko(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(vA);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():vA=requestAnimationFrame(i)}var xr=typeof document<"u"?$.useLayoutEffect:$.useEffect;function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lp.apply(this,arguments)}let hv=!1,ZQ=0;const bA=()=>"floating-ui-"+ZQ++;function VQ(){const[e,t]=N.useState(()=>hv?bA():void 0);return xr(()=>{e==null&&t(bA())},[]),N.useEffect(()=>{hv||(hv=!0)},[]),e}const mv=N["useId".toString()]||VQ;function HQ(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const WQ=N.createContext(null),KQ=N.createContext(null),wA=()=>{var e;return((e=N.useContext(WQ))==null?void 0:e.id)||null},up=()=>N.useContext(KQ);function fl(e){return"data-floating-ui-"+e}function $i(e){const t=$.useRef(e);return xr(()=>{t.current=e}),t}function GQ(e,t){var r;let n=[],o=(r=e.find(i=>i.id===t))==null?void 0:r.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function bs(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}function JQ(e,t){let r,n=-1;function o(i,a){a>n&&(r=i,n=a),bs(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===r)}let ws=new WeakMap,dp=new WeakSet,fp={},yv=0;const YQ=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,xA=e=>e&&(e.host||xA(e.parentNode)),XQ=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=xA(r);return e.contains(n)?n:null}).filter(r=>r!=null);function QQ(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,a=XQ(t,e),s=new Set,c=new Set(a),l=[];fp[o]||(fp[o]=new WeakMap);const u=fp[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,h=>{if(s.has(h))p(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",g=(ws.get(h)||0)+1,v=(u.get(h)||0)+1;ws.set(h,g),u.set(h,v),l.push(h),g===1&&m&&dp.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return yv++,()=>{l.forEach(f=>{const h=(ws.get(f)||0)-1,y=(u.get(f)||0)-1;ws.set(f,h),u.set(f,y),h||(!dp.has(f)&&i&&f.removeAttribute(i),dp.delete(f)),y||f.removeAttribute(o)}),yv--,yv||(ws=new WeakMap,ws=new WeakMap,dp=new WeakSet,fp={})}}function SA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Yn(e[0]).body;return QQ(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const gv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _A(e,t){const r=dv(e,gv());t==="prev"&&r.reverse();const n=r.indexOf(Ti(Yn(e)));return r.slice(n+1)[0]}function EA(){return _A(document.body,"next")}function kA(){return _A(document.body,"prev")}function pl(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!fn(r,n)}function eee(e){dv(e,gv()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function tee(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const vv={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 ree;function TA(e){e.key==="Tab"&&(e.target,clearTimeout(ree))}const pp=N.forwardRef(function(t,r){const[n,o]=N.useState();xr(()=>(GC()&&o("button"),document.addEventListener("keydown",TA),()=>{document.removeEventListener("keydown",TA)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[fl("focus-guard")]:"",style:vv};return N.createElement("span",lp({},t,i))}),$A=N.createContext(null);function nee(e){let{id:t,root:r}=e===void 0?{}:e;const[n,o]=N.useState(null),i=mv(),a=OA(),s=N.useMemo(()=>({id:t,root:r,portalContext:a,uniqueId:i}),[t,r,a,i]),c=N.useRef();return xr(()=>()=>{n==null||n.remove()},[n,s]),xr(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:d,uniqueId:p}=s,f=l?document.getElementById(l):null,h=fl("portal");if(f){const y=document.createElement("div");y.id=p,y.setAttribute(h,""),f.appendChild(y),o(y)}else{let y=u||(d==null?void 0:d.portalNode);y&&!lr(y)&&(y=y.current),y=y||document.body;let m=null;l&&(m=document.createElement("div"),m.id=l,y.appendChild(m));const g=document.createElement("div");g.id=p,g.setAttribute(h,""),y=m||y,y.appendChild(g),o(g)}},[s]),n}function oee(e){let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const i=nee({id:r,root:n}),[a,s]=N.useState(null),c=N.useRef(null),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(n||i);return N.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&pl(h)&&(h.type==="focusin"?tee:eee)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),N.createElement($A.Provider,{value:N.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&N.createElement(pp,{"data-type":"outside",ref:c,onFocus:f=>{if(pl(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=kA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&N.createElement("span",{"aria-owns":i.id,style:vv}),i&&no.createPortal(t,i),p&&i&&N.createElement(pp,{"data-type":"outside",ref:l,onFocus:f=>{if(pl(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=EA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const OA=()=>N.useContext($A),iee=N.forwardRef(function(t,r){return N.createElement("button",lp({},t,{type:"button",ref:r,tabIndex:-1,style:vv}))});function aee(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:d,refs:p,nodeId:f,onOpenChange:h,events:y,dataRef:m,elements:{domReference:g,floating:v}}=t,b=YQ()?i:!0,x=$i(o),w=$i(a),S=$i(s),C=up(),I=OA(),P=typeof a=="number"&&a<0,A=N.useRef(null),L=N.useRef(null),W=N.useRef(!1),Z=N.useRef(null),B=N.useRef(!1),F=I!=null,j=g&&g.getAttribute("role")==="combobox"&&XC(g)&&P,U=N.useCallback(function(H){return H===void 0&&(H=v),H?dv(H,gv()):[]},[v]),K=N.useCallback(H=>{const Q=U(H);return x.current.map(T=>g&&T==="reference"?g:v&&T==="floating"?v:Q).filter(Boolean).flat()},[g,v,x,U]);N.useEffect(()=>{if(n||!c)return;function H(T){if(T.key==="Tab"){fn(v,Ti(Yn(v)))&&U().length===0&&!j&&Fr(T);const ce=K(),pe=YC(T);x.current[0]==="reference"&&pe===g&&(Fr(T),T.shiftKey?Ko(ce[ce.length-1]):Ko(ce[1])),x.current[1]==="floating"&&pe===v&&T.shiftKey&&(Fr(T),Ko(ce[0]))}}const Q=Yn(v);return Q.addEventListener("keydown",H),()=>{Q.removeEventListener("keydown",H)}},[n,g,v,c,x,p,j,U,K]),N.useEffect(()=>{if(n||!u)return;function H(){B.current=!0,setTimeout(()=>{B.current=!1})}function Q(T){const ce=T.relatedTarget;queueMicrotask(()=>{const pe=!(fn(g,ce)||fn(v,ce)||fn(ce,v)||fn(I==null?void 0:I.portalNode,ce)||ce!=null&&ce.hasAttribute(fl("focus-guard"))||C&&(bs(C.nodesRef.current,f).find(fe=>{var ve,_e;return fn((ve=fe.context)==null?void 0:ve.elements.floating,ce)||fn((_e=fe.context)==null?void 0:_e.elements.domReference,ce)})||GQ(C.nodesRef.current,f).find(fe=>{var ve,_e;return((ve=fe.context)==null?void 0:ve.elements.floating)===ce||((_e=fe.context)==null?void 0:_e.elements.domReference)===ce})));ce&&pe&&!B.current&&ce!==Z.current&&(W.current=!0,h(!1,T))})}if(v&&Yr(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",H),!c&&v.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",H),!c&&v.removeEventListener("focusout",Q)}},[n,g,v,c,f,C,I,h,u]),N.useEffect(()=>{var H;if(n)return;const Q=Array.from((I==null||(H=I.portalNode)==null?void 0:H.querySelectorAll("["+fl("portal")+"]"))||[]);if(v){const T=[v,...Q,A.current,L.current,x.current.includes("reference")||j?g:null].filter(pe=>pe!=null),ce=c?SA(T,b,!b):SA(T);return()=>{ce()}}},[n,g,v,c,x,I,j,b]),xr(()=>{if(n||!v)return;const H=Yn(v),Q=Ti(H);queueMicrotask(()=>{const T=K(v),ce=w.current,pe=(typeof ce=="number"?T[ce]:ce.current)||v,fe=fn(v,Q);!P&&!fe&&d&&Ko(pe,{preventScroll:pe===v})})},[n,d,v,P,K,w]),xr(()=>{if(n||!v)return;let H=!1;const Q=Yn(v),T=Ti(Q),ce=m.current;Z.current=T;function pe(fe){if(fe.type==="escapeKey"&&p.domReference.current&&(Z.current=p.domReference.current),["referencePress","escapeKey"].includes(fe.type))return;const ve=fe.data.returnFocus;typeof ve=="object"?(W.current=!1,H=ve.preventScroll):W.current=!ve}return y.on("dismiss",pe),()=>{y.off("dismiss",pe);const fe=Ti(Q);(fn(v,fe)||C&&bs(C.nodesRef.current,f).some(_e=>{var Ce;return fn((Ce=_e.context)==null?void 0:Ce.elements.floating,fe)})||ce.openEvent&&["click","mousedown"].includes(ce.openEvent.type))&&p.domReference.current&&(Z.current=p.domReference.current),S.current&&Yr(Z.current)&&!W.current&&Ko(Z.current,{cancelPrevious:!1,preventScroll:H})}},[n,v,S,m,p,y,C,f]),xr(()=>{if(!(n||!I))return I.setFocusManagerState({modal:c,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{I.setFocusManagerState(null)}},[n,I,c,d,h,p,u]),xr(()=>{if(!n&&v&&typeof MutationObserver=="function"&&!P){const H=()=>{const T=v.getAttribute("tabindex");x.current.includes("floating")||Ti(Yn(v))!==p.domReference.current&&U().length===0?T!=="0"&&v.setAttribute("tabindex","0"):T!=="-1"&&v.setAttribute("tabindex","-1")};H();const Q=new MutationObserver(H);return Q.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}}},[n,v,p,x,U,P]);function D(H){return n||!l||!c?null:N.createElement(iee,{ref:H==="start"?A:L,onClick:Q=>h(!1,Q.nativeEvent)},typeof l=="string"?l:"Dismiss")}const E=!n&&b&&!j&&(F||c);return N.createElement(N.Fragment,null,E&&N.createElement(pp,{"data-type":"inside",ref:I==null?void 0:I.beforeInsideRef,onFocus:H=>{if(c){const T=K();Ko(o[0]==="reference"?T[0]:T[T.length-1])}else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(W.current=!1,pl(H,I.portalNode)){const T=EA()||g;T==null||T.focus()}else{var Q;(Q=I.beforeOutsideRef.current)==null||Q.focus()}}}),!j&&D("start"),r,D("end"),E&&N.createElement(pp,{"data-type":"inside",ref:I==null?void 0:I.afterInsideRef,onFocus:H=>{if(c)Ko(K()[0]);else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(u&&(W.current=!0),pl(H,I.portalNode)){const T=kA()||g;T==null||T.focus()}else{var Q;(Q=I.afterOutsideRef.current)==null||Q.focus()}}}))}function CA(e){return Yr(e.target)&&e.target.tagName==="BUTTON"}function AA(e){return XC(e)}function see(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,d=N.useRef(),p=N.useRef(!1);return N.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(JC(d.current,!0)&&l||s!=="click"&&(r&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?n(!1,f.nativeEvent):(f.preventDefault(),n(!0,f.nativeEvent))))},onClick(f){if(s==="mousedown"&&d.current){d.current=void 0;return}JC(d.current,!0)&&l||(r&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?n(!1,f.nativeEvent):n(!0,f.nativeEvent))},onKeyDown(f){d.current=void 0,!(f.defaultPrevented||!u||CA(f))&&(f.key===" "&&!AA(i)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&n(!(r&&c),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||CA(f)||AA(i)||f.key===" "&&p.current&&(p.current=!1,n(!(r&&c),f.nativeEvent))}}}:{},[a,o,s,l,u,i,c,r,n])}const cee=N["useInsertionEffect".toString()]||(e=>e());function Oi(e){const t=N.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return cee(()=>{t.current=e}),N.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}const lee={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},uee={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},dee=e=>{var t,r;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function fee(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:y="pointerdown",ancestorScroll:m=!1,bubbles:g}=t,v=up(),b=wA()!=null,x=Oi(typeof p=="function"?p:()=>!1),w=typeof p=="function"?x:p,S=N.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:I}=dee(g),P=Oi(L=>{if(!r||!u||!d||L.key!=="Escape")return;const W=v?bs(v.nodesRef.current,i):[];if(!C&&(L.stopPropagation(),W.length>0)){let Z=!0;if(W.forEach(B=>{var F;if((F=B.context)!=null&&F.open&&!B.context.dataRef.current.__escapeKeyBubbles){Z=!1;return}}),!Z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,QX(L)?L.nativeEvent:L)}),A=Oi(L=>{const W=S.current;if(S.current=!1,W||typeof w=="function"&&!w(L))return;const Z=YC(L),B="["+fl("inert")+"]",F=Yn(c).querySelectorAll(B);let j=lr(Z)?Z:null;for(;j&&!cl(j);){const D=ua(j);if(D===Yn(c).body||!lr(D))break;j=D}if(F.length&&lr(Z)&&!eQ(Z)&&!fn(Z,c)&&Array.from(F).every(D=>!fn(j,D)))return;if(Yr(Z)&&c){const D=Z.clientWidth>0&&Z.scrollWidth>Z.clientWidth,E=Z.clientHeight>0&&Z.scrollHeight>Z.clientHeight;let H=E&&L.offsetX>Z.clientWidth;if(E&&_n(Z).direction==="rtl"&&(H=L.offsetX<=Z.offsetWidth-Z.clientWidth),H||D&&L.offsetY>Z.clientHeight)return}const U=v&&bs(v.nodesRef.current,i).some(D=>{var E;return cv(L,(E=D.context)==null?void 0:E.elements.floating)});if(cv(L,c)||cv(L,s)||U)return;const K=v?bs(v.nodesRef.current,i):[];if(K.length>0){let D=!0;if(K.forEach(E=>{var H;if((H=E.context)!=null&&H.open&&!E.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:WC(L)||KC(L)}}),n(!1,L)});return N.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=C,l.current.__outsidePressBubbles=I;function L(B){n(!1,B)}const W=Yn(c);d&&W.addEventListener("keydown",P),w&&W.addEventListener(f,A);let Z=[];return m&&(lr(s)&&(Z=ki(s)),lr(c)&&(Z=Z.concat(ki(c))),!lr(a)&&a&&a.contextElement&&(Z=Z.concat(ki(a.contextElement)))),Z=Z.filter(B=>{var F;return B!==((F=W.defaultView)==null?void 0:F.visualViewport)}),Z.forEach(B=>{B.addEventListener("scroll",L,{passive:!0})}),()=>{d&&W.removeEventListener("keydown",P),w&&W.removeEventListener(f,A),Z.forEach(B=>{B.removeEventListener("scroll",L)})}},[l,c,s,a,d,w,f,r,n,m,u,C,I,P,A]),N.useEffect(()=>{S.current=!1},[w,f]),N.useMemo(()=>u?{reference:{onKeyDown:P,[lee[y]]:L=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,L.nativeEvent))}},floating:{onKeyDown:P,[uee[f]]:()=>{S.current=!0}}}:{},[u,o,h,f,y,n,P])}let bv;process.env.NODE_ENV!=="production"&&(bv=new Set);function pee(e){var t;e===void 0&&(e={});const{open:r=!1,onOpenChange:n,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const C="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((i=e.elements)!=null&&i.reference&&!lr(e.elements.reference)){var a;if(!((a=bv)!=null&&a.has(C))){var s;(s=bv)==null||s.add(C),console.error(C)}}}const[c,l]=N.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,d=EQ(e),p=up(),f=Oi((C,I)=>{C&&(y.current.openEvent=I),n==null||n(C,I)}),h=N.useRef(null),y=N.useRef({}),m=N.useState(()=>HQ())[0],g=mv(),v=N.useCallback(C=>{const I=lr(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;d.refs.setReference(I)},[d.refs]),b=N.useCallback(C=>{(lr(C)||C===null)&&(h.current=C,l(C)),(lr(d.refs.reference.current)||d.refs.reference.current===null||C!==null&&!lr(C))&&d.refs.setReference(C)},[d.refs]),x=N.useMemo(()=>({...d.refs,setReference:b,setPositionReference:v,domReference:h}),[d.refs,b,v]),w=N.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=N.useMemo(()=>({...d,refs:x,elements:w,dataRef:y,nodeId:o,floatingId:g,events:m,open:r,onOpenChange:f}),[d,o,g,m,r,f,x,w]);return xr(()=>{const C=p==null?void 0:p.nodesRef.current.find(I=>I.id===o);C&&(C.context=S)}),N.useMemo(()=>({...d,context:S,refs:x,elements:w}),[d,x,w,S])}function wv(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var l;(l=n.get(s))==null||l.push(c),o[s]=function(){for(var u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return(u=n.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function hee(e){e===void 0&&(e=[]);const t=e,r=N.useCallback(i=>wv(i,e,"reference"),t),n=N.useCallback(i=>wv(i,e,"floating"),t),o=N.useCallback(i=>wv(i,e,"item"),e.map(i=>i==null?void 0:i.item));return N.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let IA=!1;function hp(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function RA(e,t){return hp(t,e===fv||e===sp,e===vs||e===ul)}function xv(e,t,r){return hp(t,e===sp,r?e===vs:e===ul)||e==="Enter"||e==" "||e===""}function mee(e,t,r){return hp(t,r?e===vs:e===ul,e===sp)}function PA(e,t,r){return hp(t,r?e===ul:e===vs,e===fv)}function yee(e,t){const{open:r,onOpenChange:n,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:p=!1,loop:f=!1,nested:h=!1,rtl:y=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:w="vertical",cols:S=1,scrollItemIntoView:C=!0,virtualItemRef:I}=t;process.env.NODE_ENV!=="production"&&(p&&(f||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),m||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),w==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const P=wA(),A=up(),L=Oi(l),W=N.useRef(g),Z=N.useRef(d??-1),B=N.useRef(null),F=N.useRef(!0),j=N.useRef(L),U=N.useRef(!!a),K=N.useRef(!1),D=N.useRef(!1),E=$i(x),H=$i(r),Q=$i(C),[T,ce]=N.useState(),[pe,fe]=N.useState(),ve=Oi(function(be,de,te){te===void 0&&(te=!1);const we=be.current[de.current];we&&(m?(ce(we.id),A==null||A.events.emit("virtualfocus",we),I&&(I.current=we)):Ko(we,{preventScroll:!0,sync:XX()&&GC()?IA||K.current:!1}),requestAnimationFrame(()=>{const Ae=Q.current;Ae&&we&&(te||!F.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof Ae=="boolean"?{block:"nearest",inline:"nearest"}:Ae))}))});xr(()=>{document.createElement("div").focus({get preventScroll(){return IA=!0,!1}})},[]),xr(()=>{u&&(r&&a?W.current&&d!=null&&(D.current=!0,L(d)):U.current&&(Z.current=-1,j.current(null)))},[u,r,a,d,L]),xr(()=>{if(u&&r&&a)if(c==null){if(K.current=!1,d!=null)return;if(U.current&&(Z.current=-1,ve(s,Z)),!U.current&&W.current&&(B.current!=null||W.current===!0&&B.current==null)){let be=0;const de=()=>{s.current[0]==null?(be<2&&(be?requestAnimationFrame:queueMicrotask)(de),be++):(Z.current=B.current==null||xv(B.current,w,y)||h?pv(s,E.current):gA(s,E.current),B.current=null,L(Z.current))};de()}}else dl(s,c)||(Z.current=c,ve(s,Z,D.current),D.current=!1)},[u,r,a,c,d,h,s,w,y,L,ve,E]),xr(()=>{var be,de;if(!u||a||!A||m||!U.current)return;const te=A.nodesRef.current,we=(be=te.find(q=>q.id===P))==null||(de=be.context)==null?void 0:de.elements.floating,Ae=Ti(Yn(a)),qe=te.some(q=>q.context&&fn(q.context.elements.floating,Ae));we&&!qe&&F.current&&we.focus({preventScroll:!0})},[u,a,A,P,m]),xr(()=>{if(!u||!A||!m||P)return;function be(de){fe(de.id),I&&(I.current=de)}return A.events.on("virtualfocus",be),()=>{A.events.off("virtualfocus",be)}},[u,A,m,P,I]),xr(()=>{j.current=L,U.current=!!a}),xr(()=>{r||(B.current=null)},[r]);const _e=c!=null,Ce=N.useMemo(()=>{function be(te){if(!r)return;const we=s.current.indexOf(te);we!==-1&&L(we)}return{onFocus(te){let{currentTarget:we}=te;be(we)},onClick:te=>{let{currentTarget:we}=te;return we.focus({preventScroll:!0})},...v&&{onMouseMove(te){let{currentTarget:we}=te;be(we)},onPointerLeave(te){let{pointerType:we}=te;!F.current||we==="touch"||(Z.current=-1,ve(s,Z),L(null),m||Ko(o.floating.current,{preventScroll:!0}))}}}},[r,o,ve,v,s,L,m]);return N.useMemo(()=>{if(!u)return{};const be=E.current;function de(q){if(F.current=!1,K.current=!0,!H.current&&q.currentTarget===o.floating.current)return;if(h&&PA(q.key,w,y)){Fr(q),n(!1,q.nativeEvent),Yr(i)&&!m&&i.focus();return}const le=Z.current,he=pv(s,be),me=gA(s,be);if(q.key==="Home"&&(Fr(q),Z.current=he,L(Z.current)),q.key==="End"&&(Fr(q),Z.current=me,L(Z.current)),!(S>1&&(Z.current=zQ(s,{event:q,orientation:w,loop:f,cols:S,disabledIndices:be,minIndex:he,maxIndex:me,prevIndex:Z.current,stopEvent:!0}),L(Z.current),w==="both"))&&RA(q.key,w)){if(Fr(q),r&&!m&&Ti(q.currentTarget.ownerDocument)===q.currentTarget){Z.current=xv(q.key,w,y)?he:me,L(Z.current);return}xv(q.key,w,y)?f?Z.current=le>=me?p&&le!==s.current.length?-1:he:Xr(s,{startingIndex:le,disabledIndices:be}):Z.current=Math.min(me,Xr(s,{startingIndex:le,disabledIndices:be})):f?Z.current=le<=he?p&&le!==-1?s.current.length:me:Xr(s,{startingIndex:le,decrement:!0,disabledIndices:be}):Z.current=Math.max(he,Xr(s,{startingIndex:le,decrement:!0,disabledIndices:be})),dl(s,Z.current)?L(null):L(Z.current)}}function te(q){g==="auto"&&WC(q.nativeEvent)&&(W.current=!0)}function we(q){W.current=g,g==="auto"&&KC(q.nativeEvent)&&(W.current=!0)}const Ae=m&&r&&_e&&{"aria-activedescendant":pe||T},qe=s.current.find(q=>(q==null?void 0:q.id)===T);return{reference:{...Ae,onKeyDown(q){F.current=!1;const le=q.key.indexOf("Arrow")===0,he=mee(q.key,w,y),me=PA(q.key,w,y),je=RA(q.key,w),Ie=(h?he:je)||q.key==="Enter"||q.key.trim()==="";if(m&&r){const G=A==null?void 0:A.nodesRef.current.find(Y=>Y.parentId==null),se=A&&G?JQ(A.nodesRef.current,G.id):null;if(le&&se&&I){const Y=new KeyboardEvent("keydown",{key:q.key,bubbles:!0});if(he||me){var Ue,pt;const ye=((Ue=se.context)==null?void 0:Ue.elements.domReference)===q.currentTarget,$e=me&&!ye?(pt=se.context)==null?void 0:pt.elements.domReference:he?qe:null;$e&&(Fr(q),$e.dispatchEvent(Y),fe(void 0))}if(je&&se.context&&se.context.open&&se.parentId&&q.currentTarget!==se.context.elements.domReference){var Ke;Fr(q),(Ke=se.context.elements.domReference)==null||Ke.dispatchEvent(Y);return}}return de(q)}if(!(!r&&!b&&le)){if(Ie&&(B.current=h&&je?null:q.key),h){he&&(Fr(q),r?(Z.current=pv(s,be),L(Z.current)):n(!0,q.nativeEvent));return}je&&(d!=null&&(Z.current=d),Fr(q),!r&&b?n(!0,q.nativeEvent):de(q),r&&L(Z.current))}},onFocus(){r&&L(null)},onPointerDown:we,onMouseDown:te,onClick:te},floating:{"aria-orientation":w==="both"?void 0:w,...Ae,onKeyDown:de,onPointerMove(){F.current=!0}},item:Ce}},[i,o,T,pe,E,H,s,u,w,y,m,r,_e,h,d,b,p,S,f,g,L,n,Ce,A,I])}function gee(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:o=!0,role:i="dialog"}=t,a=mv();return N.useMemo(()=>{const s={id:n,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?n:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,r,n,a])}function vee(e,t){var r;const{open:n,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=N.useRef(),y=N.useRef(""),m=N.useRef((r=f??a)!=null?r:-1),g=N.useRef(null),v=Oi(s),b=Oi(c),x=$i(u),w=$i(p);return xr(()=>{n&&(clearTimeout(h.current),g.current=null,y.current="")},[n]),xr(()=>{if(n&&y.current===""){var S;m.current=(S=f??a)!=null?S:-1}},[n,f,a]),N.useMemo(()=>{if(!l)return{};function S(P){P?o.current.typing||(o.current.typing=P,b(P)):o.current.typing&&(o.current.typing=P,b(P))}function C(P,A,L){const W=x.current?x.current(A,L):A.find(Z=>(Z==null?void 0:Z.toLocaleLowerCase().indexOf(L.toLocaleLowerCase()))===0);return W?P.indexOf(W):-1}function I(P){const A=i.current;if(y.current.length>0&&y.current[0]!==" "&&(C(A,A,y.current)===-1?S(!1):P.key===" "&&Fr(P)),A==null||w.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;n&&P.key!==" "&&(Fr(P),S(!0)),A.every(B=>{var F,j;return B?((F=B[0])==null?void 0:F.toLocaleLowerCase())!==((j=B[1])==null?void 0:j.toLocaleLowerCase()):!0})&&y.current===P.key&&(y.current="",m.current=g.current),y.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=g.current,S(!1)},d);const W=m.current,Z=C(A,[...A.slice((W||0)+1),...A.slice(0,(W||0)+1)],y.current);Z!==-1?(v(Z),g.current=Z):P.key!==" "&&(y.current="",S(!1))}return{reference:{onKeyDown:I},floating:{onKeyDown:I,onKeyUp(P){P.key===" "&&S(!1)}}}},[l,n,o,i,d,w,x,v,b])}const bee=({options:e,label:t,reusable:r})=>{var j,U,K,D,E;const n=ft(H=>H.sendTextMessage),o=ft(H=>H.messageContainerRef),i=ft(H=>H.isReadOnly),[a,s]=N.useState(!1),[c,l]=N.useState(null),[u,d]=N.useState(null),{message:{blocks:{dropdown:p}}}=Ht,f=e.reduce((H,Q)=>(H[Q.label]=Q.value,H),{}),h=f?Object.keys(f):[],y=H=>{s(u!==null&&!r?!1:H)},{refs:m,floatingStyles:g,context:v}=pee({placement:"bottom-start",open:a,onOpenChange:y,whileElementsMounted:SQ,middleware:[oQ(5),iQ({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),aQ({apply({rects:H,elements:Q,availableHeight:T}){Object.assign(Q.floating.style,{maxHeight:`${T}px`,minWidth:`${H.reference.width}px`})},padding:10})]}),b=N.useRef([]),x=N.useRef(h),w=N.useRef(!1),S=see(v,{event:"mousedown"}),C=fee(v),I=gee(v,{role:"listbox"}),P=yee(v,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),A=vee(v,{listRef:x,activeIndex:c,selectedIndex:u,onMatch:a?l:d,onTypingChange(H){w.current=H}}),{getReferenceProps:L,getFloatingProps:W,getItemProps:Z}=hee([C,I,P,A,S]),B=H=>{d(H),n(f[h[H]]),s(!1)},F=u!==null?h[u]:void 0;return J.jsxs(J.Fragment,{children:[J.jsxs("div",{tabIndex:0,ref:m.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!r?"":void 0,...(j=p.button)==null?void 0:j.container,...L(),children:[J.jsx("span",{...(U=p.button)==null?void 0:U.text,children:F||t||"Select..."}),J.jsx(VY,{...(K=p.button)==null?void 0:K.icon})]}),a&&J.jsx(oee,{children:J.jsx(aee,{context:v,modal:!1,children:J.jsx("div",{ref:m.setFloating,className:(E=(D=p.content)==null?void 0:D.container)==null?void 0:E.className,style:{...g},...W(),children:h.map((H,Q)=>{var T;return J.jsx("div",{ref:ce=>{b.current[Q]=ce},role:"option",tabIndex:Q===c?0:-1,"aria-selected":Q===u&&Q===c,"data-active":Q===c?"":void 0,...(T=p.content)==null?void 0:T.item,...Z({onClick(){i||B(Q)},onKeyDown(ce){i||(ce.key==="Enter"&&(ce.preventDefault(),B(Q)),ce.key===" "&&!w.current&&(ce.preventDefault(),B(Q)))}}),children:H},H)})})})})]})},wee=$.forwardRef(({type:e,title:t,url:r,...n},o)=>{const{message:{blocks:{file:i}}}=Ht;return J.jsxs("a",{...n,...i.container,href:r,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[J.jsx("p",{...i.title,children:t||r}),J.jsx(WY,{...i.icon})]})}),NA={audio:FY,bubble:NY,button:RY,carousel:ZX,column:YY,dropdown:bee,file:wee,image:jY,location:JY,row:XY,text:n8,video:LY},xs=({block:e,...t})=>{const n=ft(i=>i.renderers)[e.type]??NA[e.type],o={...t,...e};return J.jsx(n,{...o})};function xee({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 See=N.forwardRef(xee);function _ee({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 Eee=N.forwardRef(_ee),MA=$.memo($.forwardRef(({children:e,...t},r)=>{const{composer:n}=Ht,o=ft(I=>I.disableComposer),i=ft(I=>I.setIsTyping),a=ft(I=>I.isReadOnly),s=ft(I=>I.sendFile),c=ft(I=>I.addMessage),l=ft(I=>I.sendTextMessage),u=ft(I=>I.allowFileUpload),{composerPlaceholder:d,showPoweredBy:p}=PC(),[f,h]=$.useState(""),[y,m]=$.useState(-1),g=$.useRef(null),v=$.useRef(null),b=wn(I=>I.user),x=wn(I=>I.messageHistory);if(o8(v.current,f),a)return null;const w=()=>{var I;g.current&&((I=g.current)==null||I.click())},S=async I=>{var A;const P=(A=I.target.files)==null?void 0:A[0];if(P)try{const{fileUrl:L,type:W}=await s(P)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:W,url:L}})}catch(L){console.error("Error sending file:",L)}},C=()=>{f&&(l(f),setTimeout(()=>i(!0,9e3),500),h(""),m(-1))};return J.jsxs(J.Fragment,{children:[J.jsxs("div",{"data-disabled":o,...t,...n.container,ref:r,children:[u&&J.jsxs(J.Fragment,{children:[J.jsx("button",{type:"button",disabled:o,...n.uploadButton.container,onClick:w,children:J.jsx(Eee,{...n.uploadButton.icon})}),J.jsx("input",{type:"file",ref:g,style:{display:"none"},onChange:S})]}),J.jsx("textarea",{...n==null?void 0:n.input,placeholder:d??"Type your message...",ref:v,disabled:o,value:f,"data-has-value":!!f,onChange:I=>h(I.target.value),onKeyDown:I=>{if(!o){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),h(`${f}
359
+ */var kQ=["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])"],uv=kQ.join(","),dA=typeof Element>"u",ll=dA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,ip=!dA&&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},ap=function e(t,r){var n;r===void 0&&(r=!0);var o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"inert"),i=o===""||o==="true",a=i||r&&t&&e(t.parentNode);return a},TQ=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},$Q=function(t,r,n){if(ap(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(uv));return r&&ll.call(t,uv)&&o.unshift(t),o=o.filter(n),o},OQ=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!ap(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),c=s.length?s:a.children,l=e(c,!0,n);n.flatten?o.push.apply(o,l):o.push({scopeParent:a,candidates:l})}else{var u=ll.call(a,uv);u&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!ap(d,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(a));if(d&&p){var f=e(d===!0?a.children:d.children,!0,n);n.flatten?o.push.apply(o,f):o.push({scopeParent:a,candidates:f})}else i.unshift.apply(i,a.children)}}return o},fA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},pA=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||TQ(t))&&!fA(t)?0:t.tabIndex},CQ=function(t,r){var n=pA(t);return n<0&&r&&!fA(t)?0:n},AQ=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},hA=function(t){return t.tagName==="INPUT"},IQ=function(t){return hA(t)&&t.type==="hidden"},RQ=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},PQ=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},NQ=function(t){if(!t.name)return!0;var r=t.form||ip(t),n=function(s){return r.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=n(window.CSS.escape(t.name));else try{o=n(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=PQ(o,t.form);return!i||i===t},MQ=function(t){return hA(t)&&t.type==="radio"},jQ=function(t){return MQ(t)&&!NQ(t)},DQ=function(t){var r,n=t&&ip(t),o=(r=n)===null||r===void 0?void 0:r.host,i=!1;if(n&&n!==t){var a,s,c;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!i&&o;){var l,u,d;n=ip(o),o=(l=n)===null||l===void 0?void 0:l.host,i=!!((u=o)!==null&&u!==void 0&&(d=u.ownerDocument)!==null&&d!==void 0&&d.contains(o))}}return i},mA=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},LQ=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=ll.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(ll.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var c=t.parentElement,l=ip(t);if(c&&!c.shadowRoot&&o(c)===!0)return mA(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(DQ(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return mA(t);return!1},FQ=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var r=t.parentElement;r;){if(r.tagName==="FIELDSET"&&r.disabled){for(var n=0;n<r.children.length;n++){var o=r.children.item(n);if(o.tagName==="LEGEND")return ll.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},qQ=function(t,r){return!(r.disabled||ap(r)||IQ(r)||LQ(r,t)||RQ(r)||FQ(r))},yA=function(t,r){return!(jQ(r)||pA(r)<0||!qQ(t,r))},BQ=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},UQ=function e(t){var r=[],n=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=CQ(s,a),l=a?e(o.candidates):s;c===0?a?r.push.apply(r,l):r.push(s):n.push({documentOrder:i,tabIndex:c,item:o,isScope:a,content:l})}),n.sort(AQ).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},dv=function(t,r){r=r||{};var n;return r.getShadowRoot?n=OQ([t],r.includeContainer,{filter:yA.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:BQ}):n=$Q(t,r.includeContainer,yA.bind(null,r)),UQ(n)};const fv="ArrowUp",sp="ArrowDown",vs="ArrowLeft",ul="ArrowRight";function cp(e,t,r){return Math.floor(e/t)!==r}function dl(e,t){return t<0||t>=e.current.length}function pv(e,t){return Xr(e,{disabledIndices:t})}function gA(e,t){return Xr(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Xr(e,t){let{startingIndex:r=-1,decrement:n=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=r;do{var c,l;s=s+(n?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(c=a[s])!=null&&c.hasAttribute("disabled")||((l=a[s])==null?void 0:l.getAttribute("aria-disabled"))==="true"));return s}function zQ(e,t){let{event:r,orientation:n,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:c,prevIndex:l,stopEvent:u=!1}=t,d=l;if(r.key===fv){if(u&&Fr(r),l===-1)d=c;else if(d=Xr(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:a}),o&&(l-i<s||d<0)){const p=l%i,f=c%i,h=c-(f-p);f===p?d=c:d=f>p?h:h-i}dl(e,d)&&(d=l)}if(r.key===sp&&(u&&Fr(r),l===-1?d=s:(d=Xr(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=Xr(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),dl(e,d)&&(d=l)),n==="both"){const p=ys(l/i);r.key===ul&&(u&&Fr(r),l%i!==i-1?(d=Xr(e,{startingIndex:l,disabledIndices:a}),o&&cp(d,i,p)&&(d=Xr(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=Xr(e,{startingIndex:l-l%i-1,disabledIndices:a})),cp(d,i,p)&&(d=l)),r.key===vs&&(u&&Fr(r),l%i!==0?(d=Xr(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&cp(d,i,p)&&(d=Xr(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=Xr(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),cp(d,i,p)&&(d=l));const f=ys(c/i)===p;dl(e,d)&&(o&&f?d=r.key===vs?c:Xr(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}let vA=0;function Ko(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(vA);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():vA=requestAnimationFrame(i)}var xr=typeof document<"u"?$.useLayoutEffect:$.useEffect;function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},lp.apply(this,arguments)}let hv=!1,ZQ=0;const bA=()=>"floating-ui-"+ZQ++;function VQ(){const[e,t]=N.useState(()=>hv?bA():void 0);return xr(()=>{e==null&&t(bA())},[]),N.useEffect(()=>{hv||(hv=!0)},[]),e}const mv=N["useId".toString()]||VQ;function HQ(){const e=new Map;return{emit(t,r){var n;(n=e.get(t))==null||n.forEach(o=>o(r))},on(t,r){e.set(t,[...e.get(t)||[],r])},off(t,r){var n;e.set(t,((n=e.get(t))==null?void 0:n.filter(o=>o!==r))||[])}}}const WQ=N.createContext(null),KQ=N.createContext(null),wA=()=>{var e;return((e=N.useContext(WQ))==null?void 0:e.id)||null},up=()=>N.useContext(KQ);function fl(e){return"data-floating-ui-"+e}function $i(e){const t=$.useRef(e);return xr(()=>{t.current=e}),t}function GQ(e,t){var r;let n=[],o=(r=e.find(i=>i.id===t))==null?void 0:r.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(n=n.concat(i))}return n}function bs(e,t){let r=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),n=r;for(;n.length;)n=e.filter(o=>{var i;return(i=n)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),r=r.concat(n);return r}function JQ(e,t){let r,n=-1;function o(i,a){a>n&&(r=i,n=a),bs(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===r)}let ws=new WeakMap,dp=new WeakSet,fp={},yv=0;const YQ=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,xA=e=>e&&(e.host||xA(e.parentNode)),XQ=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=xA(r);return e.contains(n)?n:null}).filter(r=>r!=null);function QQ(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,a=XQ(t,e),s=new Set,c=new Set(a),l=[];fp[o]||(fp[o]=new WeakMap);const u=fp[o];a.forEach(d),p(t),s.clear();function d(f){!f||s.has(f)||(s.add(f),f.parentNode&&d(f.parentNode))}function p(f){!f||c.has(f)||Array.prototype.forEach.call(f.children,h=>{if(s.has(h))p(h);else{const y=i?h.getAttribute(i):null,m=y!==null&&y!=="false",g=(ws.get(h)||0)+1,v=(u.get(h)||0)+1;ws.set(h,g),u.set(h,v),l.push(h),g===1&&m&&dp.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return yv++,()=>{l.forEach(f=>{const h=(ws.get(f)||0)-1,y=(u.get(f)||0)-1;ws.set(f,h),u.set(f,y),h||(!dp.has(f)&&i&&f.removeAttribute(i),dp.delete(f)),y||f.removeAttribute(o)}),yv--,yv||(ws=new WeakMap,ws=new WeakMap,dp=new WeakSet,fp={})}}function SA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Yn(e[0]).body;return QQ(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const gv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function _A(e,t){const r=dv(e,gv());t==="prev"&&r.reverse();const n=r.indexOf(Ti(Yn(e)));return r.slice(n+1)[0]}function EA(){return _A(document.body,"next")}function kA(){return _A(document.body,"prev")}function pl(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!fn(r,n)}function eee(e){dv(e,gv()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function tee(e){e.querySelectorAll("[data-tabindex]").forEach(r=>{const n=r.dataset.tabindex;delete r.dataset.tabindex,n?r.setAttribute("tabindex",n):r.removeAttribute("tabindex")})}const vv={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 ree;function TA(e){e.key==="Tab"&&(e.target,clearTimeout(ree))}const pp=N.forwardRef(function(t,r){const[n,o]=N.useState();xr(()=>(GC()&&o("button"),document.addEventListener("keydown",TA),()=>{document.removeEventListener("keydown",TA)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[fl("focus-guard")]:"",style:vv};return N.createElement("span",lp({},t,i))}),$A=N.createContext(null);function nee(e){let{id:t,root:r}=e===void 0?{}:e;const[n,o]=N.useState(null),i=mv(),a=OA(),s=N.useMemo(()=>({id:t,root:r,portalContext:a,uniqueId:i}),[t,r,a,i]),c=N.useRef();return xr(()=>()=>{n==null||n.remove()},[n,s]),xr(()=>{if(c.current===s)return;c.current=s;const{id:l,root:u,portalContext:d,uniqueId:p}=s,f=l?document.getElementById(l):null,h=fl("portal");if(f){const y=document.createElement("div");y.id=p,y.setAttribute(h,""),f.appendChild(y),o(y)}else{let y=u||(d==null?void 0:d.portalNode);y&&!lr(y)&&(y=y.current),y=y||document.body;let m=null;l&&(m=document.createElement("div"),m.id=l,y.appendChild(m));const g=document.createElement("div");g.id=p,g.setAttribute(h,""),y=m||y,y.appendChild(g),o(g)}},[s]),n}function oee(e){let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const i=nee({id:r,root:n}),[a,s]=N.useState(null),c=N.useRef(null),l=N.useRef(null),u=N.useRef(null),d=N.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(n||i);return N.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&pl(h)&&(h.type==="focusin"?tee:eee)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,a==null?void 0:a.modal]),N.createElement($A.Provider,{value:N.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&N.createElement(pp,{"data-type":"outside",ref:c,onFocus:f=>{if(pl(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=kA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&N.createElement("span",{"aria-owns":i.id,style:vv}),i&&no.createPortal(t,i),p&&i&&N.createElement(pp,{"data-type":"outside",ref:l,onFocus:f=>{if(pl(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=EA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const OA=()=>N.useContext($A),iee=N.forwardRef(function(t,r){return N.createElement("button",lp({},t,{type:"button",ref:r,tabIndex:-1,style:vv}))});function aee(e){const{context:t,children:r,disabled:n=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:c=!0,visuallyHiddenDismiss:l=!1,closeOnFocusOut:u=!0}=e,{open:d,refs:p,nodeId:f,onOpenChange:h,events:y,dataRef:m,elements:{domReference:g,floating:v}}=t,b=YQ()?i:!0,x=$i(o),w=$i(a),S=$i(s),C=up(),I=OA(),P=typeof a=="number"&&a<0,A=N.useRef(null),L=N.useRef(null),K=N.useRef(!1),z=N.useRef(null),B=N.useRef(!1),F=I!=null,j=g&&g.getAttribute("role")==="combobox"&&XC(g)&&P,Z=N.useCallback(function(H){return H===void 0&&(H=v),H?dv(H,gv()):[]},[v]),W=N.useCallback(H=>{const Q=Z(H);return x.current.map(T=>g&&T==="reference"?g:v&&T==="floating"?v:Q).filter(Boolean).flat()},[g,v,x,Z]);N.useEffect(()=>{if(n||!c)return;function H(T){if(T.key==="Tab"){fn(v,Ti(Yn(v)))&&Z().length===0&&!j&&Fr(T);const ce=W(),pe=YC(T);x.current[0]==="reference"&&pe===g&&(Fr(T),T.shiftKey?Ko(ce[ce.length-1]):Ko(ce[1])),x.current[1]==="floating"&&pe===v&&T.shiftKey&&(Fr(T),Ko(ce[0]))}}const Q=Yn(v);return Q.addEventListener("keydown",H),()=>{Q.removeEventListener("keydown",H)}},[n,g,v,c,x,p,j,Z,W]),N.useEffect(()=>{if(n||!u)return;function H(){B.current=!0,setTimeout(()=>{B.current=!1})}function Q(T){const ce=T.relatedTarget;queueMicrotask(()=>{const pe=!(fn(g,ce)||fn(v,ce)||fn(ce,v)||fn(I==null?void 0:I.portalNode,ce)||ce!=null&&ce.hasAttribute(fl("focus-guard"))||C&&(bs(C.nodesRef.current,f).find(fe=>{var ve,_e;return fn((ve=fe.context)==null?void 0:ve.elements.floating,ce)||fn((_e=fe.context)==null?void 0:_e.elements.domReference,ce)})||GQ(C.nodesRef.current,f).find(fe=>{var ve,_e;return((ve=fe.context)==null?void 0:ve.elements.floating)===ce||((_e=fe.context)==null?void 0:_e.elements.domReference)===ce})));ce&&pe&&!B.current&&ce!==z.current&&(K.current=!0,h(!1,T))})}if(v&&Yr(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",H),!c&&v.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",H),!c&&v.removeEventListener("focusout",Q)}},[n,g,v,c,f,C,I,h,u]),N.useEffect(()=>{var H;if(n)return;const Q=Array.from((I==null||(H=I.portalNode)==null?void 0:H.querySelectorAll("["+fl("portal")+"]"))||[]);if(v){const T=[v,...Q,A.current,L.current,x.current.includes("reference")||j?g:null].filter(pe=>pe!=null),ce=c?SA(T,b,!b):SA(T);return()=>{ce()}}},[n,g,v,c,x,I,j,b]),xr(()=>{if(n||!v)return;const H=Yn(v),Q=Ti(H);queueMicrotask(()=>{const T=W(v),ce=w.current,pe=(typeof ce=="number"?T[ce]:ce.current)||v,fe=fn(v,Q);!P&&!fe&&d&&Ko(pe,{preventScroll:pe===v})})},[n,d,v,P,W,w]),xr(()=>{if(n||!v)return;let H=!1;const Q=Yn(v),T=Ti(Q),ce=m.current;z.current=T;function pe(fe){if(fe.type==="escapeKey"&&p.domReference.current&&(z.current=p.domReference.current),["referencePress","escapeKey"].includes(fe.type))return;const ve=fe.data.returnFocus;typeof ve=="object"?(K.current=!1,H=ve.preventScroll):K.current=!ve}return y.on("dismiss",pe),()=>{y.off("dismiss",pe);const fe=Ti(Q);(fn(v,fe)||C&&bs(C.nodesRef.current,f).some(_e=>{var Ce;return fn((Ce=_e.context)==null?void 0:Ce.elements.floating,fe)})||ce.openEvent&&["click","mousedown"].includes(ce.openEvent.type))&&p.domReference.current&&(z.current=p.domReference.current),S.current&&Yr(z.current)&&!K.current&&Ko(z.current,{cancelPrevious:!1,preventScroll:H})}},[n,v,S,m,p,y,C,f]),xr(()=>{if(!(n||!I))return I.setFocusManagerState({modal:c,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{I.setFocusManagerState(null)}},[n,I,c,d,h,p,u]),xr(()=>{if(!n&&v&&typeof MutationObserver=="function"&&!P){const H=()=>{const T=v.getAttribute("tabindex");x.current.includes("floating")||Ti(Yn(v))!==p.domReference.current&&Z().length===0?T!=="0"&&v.setAttribute("tabindex","0"):T!=="-1"&&v.setAttribute("tabindex","-1")};H();const Q=new MutationObserver(H);return Q.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}}},[n,v,p,x,Z,P]);function D(H){return n||!l||!c?null:N.createElement(iee,{ref:H==="start"?A:L,onClick:Q=>h(!1,Q.nativeEvent)},typeof l=="string"?l:"Dismiss")}const E=!n&&b&&!j&&(F||c);return N.createElement(N.Fragment,null,E&&N.createElement(pp,{"data-type":"inside",ref:I==null?void 0:I.beforeInsideRef,onFocus:H=>{if(c){const T=W();Ko(o[0]==="reference"?T[0]:T[T.length-1])}else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(K.current=!1,pl(H,I.portalNode)){const T=EA()||g;T==null||T.focus()}else{var Q;(Q=I.beforeOutsideRef.current)==null||Q.focus()}}}),!j&&D("start"),r,D("end"),E&&N.createElement(pp,{"data-type":"inside",ref:I==null?void 0:I.afterInsideRef,onFocus:H=>{if(c)Ko(W()[0]);else if(I!=null&&I.preserveTabOrder&&I.portalNode)if(u&&(K.current=!0),pl(H,I.portalNode)){const T=kA()||g;T==null||T.focus()}else{var Q;(Q=I.afterOutsideRef.current)==null||Q.focus()}}}))}function CA(e){return Yr(e.target)&&e.target.tagName==="BUTTON"}function AA(e){return XC(e)}function see(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:c=!0,ignoreMouse:l=!1,keyboardHandlers:u=!0}=t,d=N.useRef(),p=N.useRef(!1);return N.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(JC(d.current,!0)&&l||s!=="click"&&(r&&c&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?n(!1,f.nativeEvent):(f.preventDefault(),n(!0,f.nativeEvent))))},onClick(f){if(s==="mousedown"&&d.current){d.current=void 0;return}JC(d.current,!0)&&l||(r&&c&&(!o.current.openEvent||o.current.openEvent.type==="click")?n(!1,f.nativeEvent):n(!0,f.nativeEvent))},onKeyDown(f){d.current=void 0,!(f.defaultPrevented||!u||CA(f))&&(f.key===" "&&!AA(i)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&n(!(r&&c),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||CA(f)||AA(i)||f.key===" "&&p.current&&(p.current=!1,n(!(r&&c),f.nativeEvent))}}}:{},[a,o,s,l,u,i,c,r,n])}const cee=N["useInsertionEffect".toString()]||(e=>e());function Oi(e){const t=N.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return cee(()=>{t.current=e}),N.useCallback(function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return t.current==null?void 0:t.current(...n)},[])}const lee={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},uee={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},dee=e=>{var t,r;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(r=e==null?void 0:e.outsidePress)!=null?r:!0}};function fee(e,t){t===void 0&&(t={});const{open:r,onOpenChange:n,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:c},dataRef:l}=e,{enabled:u=!0,escapeKey:d=!0,outsidePress:p=!0,outsidePressEvent:f="pointerdown",referencePress:h=!1,referencePressEvent:y="pointerdown",ancestorScroll:m=!1,bubbles:g}=t,v=up(),b=wA()!=null,x=Oi(typeof p=="function"?p:()=>!1),w=typeof p=="function"?x:p,S=N.useRef(!1),{escapeKeyBubbles:C,outsidePressBubbles:I}=dee(g),P=Oi(L=>{if(!r||!u||!d||L.key!=="Escape")return;const K=v?bs(v.nodesRef.current,i):[];if(!C&&(L.stopPropagation(),K.length>0)){let z=!0;if(K.forEach(B=>{var F;if((F=B.context)!=null&&F.open&&!B.context.dataRef.current.__escapeKeyBubbles){z=!1;return}}),!z)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,QX(L)?L.nativeEvent:L)}),A=Oi(L=>{const K=S.current;if(S.current=!1,K||typeof w=="function"&&!w(L))return;const z=YC(L),B="["+fl("inert")+"]",F=Yn(c).querySelectorAll(B);let j=lr(z)?z:null;for(;j&&!cl(j);){const D=ua(j);if(D===Yn(c).body||!lr(D))break;j=D}if(F.length&&lr(z)&&!eQ(z)&&!fn(z,c)&&Array.from(F).every(D=>!fn(j,D)))return;if(Yr(z)&&c){const D=z.clientWidth>0&&z.scrollWidth>z.clientWidth,E=z.clientHeight>0&&z.scrollHeight>z.clientHeight;let H=E&&L.offsetX>z.clientWidth;if(E&&_n(z).direction==="rtl"&&(H=L.offsetX<=z.offsetWidth-z.clientWidth),H||D&&L.offsetY>z.clientHeight)return}const Z=v&&bs(v.nodesRef.current,i).some(D=>{var E;return cv(L,(E=D.context)==null?void 0:E.elements.floating)});if(cv(L,c)||cv(L,s)||Z)return;const W=v?bs(v.nodesRef.current,i):[];if(W.length>0){let D=!0;if(W.forEach(E=>{var H;if((H=E.context)!=null&&H.open&&!E.context.dataRef.current.__outsidePressBubbles){D=!1;return}}),!D)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:WC(L)||KC(L)}}),n(!1,L)});return N.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=C,l.current.__outsidePressBubbles=I;function L(B){n(!1,B)}const K=Yn(c);d&&K.addEventListener("keydown",P),w&&K.addEventListener(f,A);let z=[];return m&&(lr(s)&&(z=ki(s)),lr(c)&&(z=z.concat(ki(c))),!lr(a)&&a&&a.contextElement&&(z=z.concat(ki(a.contextElement)))),z=z.filter(B=>{var F;return B!==((F=K.defaultView)==null?void 0:F.visualViewport)}),z.forEach(B=>{B.addEventListener("scroll",L,{passive:!0})}),()=>{d&&K.removeEventListener("keydown",P),w&&K.removeEventListener(f,A),z.forEach(B=>{B.removeEventListener("scroll",L)})}},[l,c,s,a,d,w,f,r,n,m,u,C,I,P,A]),N.useEffect(()=>{S.current=!1},[w,f]),N.useMemo(()=>u?{reference:{onKeyDown:P,[lee[y]]:L=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,L.nativeEvent))}},floating:{onKeyDown:P,[uee[f]]:()=>{S.current=!0}}}:{},[u,o,h,f,y,n,P])}let bv;process.env.NODE_ENV!=="production"&&(bv=new Set);function pee(e){var t;e===void 0&&(e={});const{open:r=!1,onOpenChange:n,nodeId:o}=e;if(process.env.NODE_ENV!=="production"){var i;const C="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((i=e.elements)!=null&&i.reference&&!lr(e.elements.reference)){var a;if(!((a=bv)!=null&&a.has(C))){var s;(s=bv)==null||s.add(C),console.error(C)}}}const[c,l]=N.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,d=EQ(e),p=up(),f=Oi((C,I)=>{C&&(y.current.openEvent=I),n==null||n(C,I)}),h=N.useRef(null),y=N.useRef({}),m=N.useState(()=>HQ())[0],g=mv(),v=N.useCallback(C=>{const I=lr(C)?{getBoundingClientRect:()=>C.getBoundingClientRect(),contextElement:C}:C;d.refs.setReference(I)},[d.refs]),b=N.useCallback(C=>{(lr(C)||C===null)&&(h.current=C,l(C)),(lr(d.refs.reference.current)||d.refs.reference.current===null||C!==null&&!lr(C))&&d.refs.setReference(C)},[d.refs]),x=N.useMemo(()=>({...d.refs,setReference:b,setPositionReference:v,domReference:h}),[d.refs,b,v]),w=N.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=N.useMemo(()=>({...d,refs:x,elements:w,dataRef:y,nodeId:o,floatingId:g,events:m,open:r,onOpenChange:f}),[d,o,g,m,r,f,x,w]);return xr(()=>{const C=p==null?void 0:p.nodesRef.current.find(I=>I.id===o);C&&(C.context=S)}),N.useMemo(()=>({...d,context:S,refs:x,elements:w}),[d,x,w,S])}function wv(e,t,r){const n=new Map;return{...r==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[r]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,c]=a;if(s.indexOf("on")===0){if(n.has(s)||n.set(s,[]),typeof c=="function"){var l;(l=n.get(s))==null||l.push(c),o[s]=function(){for(var u,d=arguments.length,p=new Array(d),f=0;f<d;f++)p[f]=arguments[f];return(u=n.get(s))==null?void 0:u.map(h=>h(...p)).find(h=>h!==void 0)}}}else o[s]=c}),o),{})}}function hee(e){e===void 0&&(e=[]);const t=e,r=N.useCallback(i=>wv(i,e,"reference"),t),n=N.useCallback(i=>wv(i,e,"floating"),t),o=N.useCallback(i=>wv(i,e,"item"),e.map(i=>i==null?void 0:i.item));return N.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let IA=!1;function hp(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function RA(e,t){return hp(t,e===fv||e===sp,e===vs||e===ul)}function xv(e,t,r){return hp(t,e===sp,r?e===vs:e===ul)||e==="Enter"||e==" "||e===""}function mee(e,t,r){return hp(t,r?e===vs:e===ul,e===sp)}function PA(e,t,r){return hp(t,r?e===ul:e===vs,e===fv)}function yee(e,t){const{open:r,onOpenChange:n,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:c,onNavigate:l=()=>{},enabled:u=!0,selectedIndex:d=null,allowEscape:p=!1,loop:f=!1,nested:h=!1,rtl:y=!1,virtual:m=!1,focusItemOnOpen:g="auto",focusItemOnHover:v=!0,openOnArrowKeyDown:b=!0,disabledIndices:x=void 0,orientation:w="vertical",cols:S=1,scrollItemIntoView:C=!0,virtualItemRef:I}=t;process.env.NODE_ENV!=="production"&&(p&&(f||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),m||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),w==="vertical"&&S>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const P=wA(),A=up(),L=Oi(l),K=N.useRef(g),z=N.useRef(d??-1),B=N.useRef(null),F=N.useRef(!0),j=N.useRef(L),Z=N.useRef(!!a),W=N.useRef(!1),D=N.useRef(!1),E=$i(x),H=$i(r),Q=$i(C),[T,ce]=N.useState(),[pe,fe]=N.useState(),ve=Oi(function(be,de,te){te===void 0&&(te=!1);const we=be.current[de.current];we&&(m?(ce(we.id),A==null||A.events.emit("virtualfocus",we),I&&(I.current=we)):Ko(we,{preventScroll:!0,sync:XX()&&GC()?IA||W.current:!1}),requestAnimationFrame(()=>{const Ae=Q.current;Ae&&we&&(te||!F.current)&&(we.scrollIntoView==null||we.scrollIntoView(typeof Ae=="boolean"?{block:"nearest",inline:"nearest"}:Ae))}))});xr(()=>{document.createElement("div").focus({get preventScroll(){return IA=!0,!1}})},[]),xr(()=>{u&&(r&&a?K.current&&d!=null&&(D.current=!0,L(d)):Z.current&&(z.current=-1,j.current(null)))},[u,r,a,d,L]),xr(()=>{if(u&&r&&a)if(c==null){if(W.current=!1,d!=null)return;if(Z.current&&(z.current=-1,ve(s,z)),!Z.current&&K.current&&(B.current!=null||K.current===!0&&B.current==null)){let be=0;const de=()=>{s.current[0]==null?(be<2&&(be?requestAnimationFrame:queueMicrotask)(de),be++):(z.current=B.current==null||xv(B.current,w,y)||h?pv(s,E.current):gA(s,E.current),B.current=null,L(z.current))};de()}}else dl(s,c)||(z.current=c,ve(s,z,D.current),D.current=!1)},[u,r,a,c,d,h,s,w,y,L,ve,E]),xr(()=>{var be,de;if(!u||a||!A||m||!Z.current)return;const te=A.nodesRef.current,we=(be=te.find(q=>q.id===P))==null||(de=be.context)==null?void 0:de.elements.floating,Ae=Ti(Yn(a)),qe=te.some(q=>q.context&&fn(q.context.elements.floating,Ae));we&&!qe&&F.current&&we.focus({preventScroll:!0})},[u,a,A,P,m]),xr(()=>{if(!u||!A||!m||P)return;function be(de){fe(de.id),I&&(I.current=de)}return A.events.on("virtualfocus",be),()=>{A.events.off("virtualfocus",be)}},[u,A,m,P,I]),xr(()=>{j.current=L,Z.current=!!a}),xr(()=>{r||(B.current=null)},[r]);const _e=c!=null,Ce=N.useMemo(()=>{function be(te){if(!r)return;const we=s.current.indexOf(te);we!==-1&&L(we)}return{onFocus(te){let{currentTarget:we}=te;be(we)},onClick:te=>{let{currentTarget:we}=te;return we.focus({preventScroll:!0})},...v&&{onMouseMove(te){let{currentTarget:we}=te;be(we)},onPointerLeave(te){let{pointerType:we}=te;!F.current||we==="touch"||(z.current=-1,ve(s,z),L(null),m||Ko(o.floating.current,{preventScroll:!0}))}}}},[r,o,ve,v,s,L,m]);return N.useMemo(()=>{if(!u)return{};const be=E.current;function de(q){if(F.current=!1,W.current=!0,!H.current&&q.currentTarget===o.floating.current)return;if(h&&PA(q.key,w,y)){Fr(q),n(!1,q.nativeEvent),Yr(i)&&!m&&i.focus();return}const le=z.current,he=pv(s,be),me=gA(s,be);if(q.key==="Home"&&(Fr(q),z.current=he,L(z.current)),q.key==="End"&&(Fr(q),z.current=me,L(z.current)),!(S>1&&(z.current=zQ(s,{event:q,orientation:w,loop:f,cols:S,disabledIndices:be,minIndex:he,maxIndex:me,prevIndex:z.current,stopEvent:!0}),L(z.current),w==="both"))&&RA(q.key,w)){if(Fr(q),r&&!m&&Ti(q.currentTarget.ownerDocument)===q.currentTarget){z.current=xv(q.key,w,y)?he:me,L(z.current);return}xv(q.key,w,y)?f?z.current=le>=me?p&&le!==s.current.length?-1:he:Xr(s,{startingIndex:le,disabledIndices:be}):z.current=Math.min(me,Xr(s,{startingIndex:le,disabledIndices:be})):f?z.current=le<=he?p&&le!==-1?s.current.length:me:Xr(s,{startingIndex:le,decrement:!0,disabledIndices:be}):z.current=Math.max(he,Xr(s,{startingIndex:le,decrement:!0,disabledIndices:be})),dl(s,z.current)?L(null):L(z.current)}}function te(q){g==="auto"&&WC(q.nativeEvent)&&(K.current=!0)}function we(q){K.current=g,g==="auto"&&KC(q.nativeEvent)&&(K.current=!0)}const Ae=m&&r&&_e&&{"aria-activedescendant":pe||T},qe=s.current.find(q=>(q==null?void 0:q.id)===T);return{reference:{...Ae,onKeyDown(q){F.current=!1;const le=q.key.indexOf("Arrow")===0,he=mee(q.key,w,y),me=PA(q.key,w,y),je=RA(q.key,w),Ie=(h?he:je)||q.key==="Enter"||q.key.trim()==="";if(m&&r){const G=A==null?void 0:A.nodesRef.current.find(Y=>Y.parentId==null),se=A&&G?JQ(A.nodesRef.current,G.id):null;if(le&&se&&I){const Y=new KeyboardEvent("keydown",{key:q.key,bubbles:!0});if(he||me){var Ue,pt;const ye=((Ue=se.context)==null?void 0:Ue.elements.domReference)===q.currentTarget,$e=me&&!ye?(pt=se.context)==null?void 0:pt.elements.domReference:he?qe:null;$e&&(Fr(q),$e.dispatchEvent(Y),fe(void 0))}if(je&&se.context&&se.context.open&&se.parentId&&q.currentTarget!==se.context.elements.domReference){var Ke;Fr(q),(Ke=se.context.elements.domReference)==null||Ke.dispatchEvent(Y);return}}return de(q)}if(!(!r&&!b&&le)){if(Ie&&(B.current=h&&je?null:q.key),h){he&&(Fr(q),r?(z.current=pv(s,be),L(z.current)):n(!0,q.nativeEvent));return}je&&(d!=null&&(z.current=d),Fr(q),!r&&b?n(!0,q.nativeEvent):de(q),r&&L(z.current))}},onFocus(){r&&L(null)},onPointerDown:we,onMouseDown:te,onClick:te},floating:{"aria-orientation":w==="both"?void 0:w,...Ae,onKeyDown:de,onPointerMove(){F.current=!0}},item:Ce}},[i,o,T,pe,E,H,s,u,w,y,m,r,_e,h,d,b,p,S,f,g,L,n,Ce,A,I])}function gee(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:o=!0,role:i="dialog"}=t,a=mv();return N.useMemo(()=>{const s={id:n,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":r?n:void 0},floating:s}:{reference:{"aria-expanded":r?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":r?n:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,r,n,a])}function vee(e,t){var r;const{open:n,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:c,enabled:l=!0,findMatch:u=null,resetMs:d=750,ignoreKeys:p=[],selectedIndex:f=null}=t,h=N.useRef(),y=N.useRef(""),m=N.useRef((r=f??a)!=null?r:-1),g=N.useRef(null),v=Oi(s),b=Oi(c),x=$i(u),w=$i(p);return xr(()=>{n&&(clearTimeout(h.current),g.current=null,y.current="")},[n]),xr(()=>{if(n&&y.current===""){var S;m.current=(S=f??a)!=null?S:-1}},[n,f,a]),N.useMemo(()=>{if(!l)return{};function S(P){P?o.current.typing||(o.current.typing=P,b(P)):o.current.typing&&(o.current.typing=P,b(P))}function C(P,A,L){const K=x.current?x.current(A,L):A.find(z=>(z==null?void 0:z.toLocaleLowerCase().indexOf(L.toLocaleLowerCase()))===0);return K?P.indexOf(K):-1}function I(P){const A=i.current;if(y.current.length>0&&y.current[0]!==" "&&(C(A,A,y.current)===-1?S(!1):P.key===" "&&Fr(P)),A==null||w.current.includes(P.key)||P.key.length!==1||P.ctrlKey||P.metaKey||P.altKey)return;n&&P.key!==" "&&(Fr(P),S(!0)),A.every(B=>{var F,j;return B?((F=B[0])==null?void 0:F.toLocaleLowerCase())!==((j=B[1])==null?void 0:j.toLocaleLowerCase()):!0})&&y.current===P.key&&(y.current="",m.current=g.current),y.current+=P.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=g.current,S(!1)},d);const K=m.current,z=C(A,[...A.slice((K||0)+1),...A.slice(0,(K||0)+1)],y.current);z!==-1?(v(z),g.current=z):P.key!==" "&&(y.current="",S(!1))}return{reference:{onKeyDown:I},floating:{onKeyDown:I,onKeyUp(P){P.key===" "&&S(!1)}}}},[l,n,o,i,d,w,x,v,b])}const bee=({options:e,label:t,reusable:r})=>{var j,Z,W,D,E;const n=ft(H=>H.sendTextMessage),o=ft(H=>H.messageContainerRef),i=ft(H=>H.isReadOnly),[a,s]=N.useState(!1),[c,l]=N.useState(null),[u,d]=N.useState(null),{message:{blocks:{dropdown:p}}}=Ht,f=e.reduce((H,Q)=>(H[Q.label]=Q.value,H),{}),h=f?Object.keys(f):[],y=H=>{s(u!==null&&!r?!1:H)},{refs:m,floatingStyles:g,context:v}=pee({placement:"bottom-start",open:a,onOpenChange:y,whileElementsMounted:SQ,middleware:[oQ(5),iQ({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),aQ({apply({rects:H,elements:Q,availableHeight:T}){Object.assign(Q.floating.style,{maxHeight:`${T}px`,minWidth:`${H.reference.width}px`})},padding:10})]}),b=N.useRef([]),x=N.useRef(h),w=N.useRef(!1),S=see(v,{event:"mousedown"}),C=fee(v),I=gee(v,{role:"listbox"}),P=yee(v,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),A=vee(v,{listRef:x,activeIndex:c,selectedIndex:u,onMatch:a?l:d,onTypingChange(H){w.current=H}}),{getReferenceProps:L,getFloatingProps:K,getItemProps:z}=hee([C,I,P,A,S]),B=H=>{d(H),n(f[h[H]]),s(!1)},F=u!==null?h[u]:void 0;return J.jsxs(J.Fragment,{children:[J.jsxs("div",{tabIndex:0,ref:m.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!r?"":void 0,...(j=p.button)==null?void 0:j.container,...L(),children:[J.jsx("span",{...(Z=p.button)==null?void 0:Z.text,children:F||t||"Select..."}),J.jsx(VY,{...(W=p.button)==null?void 0:W.icon})]}),a&&J.jsx(oee,{children:J.jsx(aee,{context:v,modal:!1,children:J.jsx("div",{ref:m.setFloating,className:(E=(D=p.content)==null?void 0:D.container)==null?void 0:E.className,style:{...g},...K(),children:h.map((H,Q)=>{var T;return J.jsx("div",{ref:ce=>{b.current[Q]=ce},role:"option",tabIndex:Q===c?0:-1,"aria-selected":Q===u&&Q===c,"data-active":Q===c?"":void 0,...(T=p.content)==null?void 0:T.item,...z({onClick(){i||B(Q)},onKeyDown(ce){i||(ce.key==="Enter"&&(ce.preventDefault(),B(Q)),ce.key===" "&&!w.current&&(ce.preventDefault(),B(Q)))}}),children:H},H)})})})})]})},wee=$.forwardRef(({type:e,title:t,url:r,...n},o)=>{const{message:{blocks:{file:i}}}=Ht;return J.jsxs("a",{...n,...i.container,href:r,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[J.jsx("p",{...i.title,children:t||r}),J.jsx(WY,{...i.icon})]})}),NA={audio:FY,bubble:NY,button:RY,carousel:ZX,column:YY,dropdown:bee,file:wee,image:jY,location:JY,row:XY,text:n8,video:LY},xs=({block:e,...t})=>{const n=ft(i=>i.renderers)[e.type]??NA[e.type],o={...t,...e};return J.jsx(n,{...o})};function xee({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 See=N.forwardRef(xee);function _ee({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.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 Eee=N.forwardRef(_ee),MA=$.memo($.forwardRef(({children:e,...t},r)=>{const{composer:n}=Ht,o=ft(I=>I.disableComposer),i=ft(I=>I.setIsTyping),a=ft(I=>I.isReadOnly),s=ft(I=>I.sendFile),c=ft(I=>I.addMessage),l=ft(I=>I.sendTextMessage),u=ft(I=>I.allowFileUpload),{composerPlaceholder:d,showPoweredBy:p}=PC(),[f,h]=$.useState(""),[y,m]=$.useState(-1),g=$.useRef(null),v=$.useRef(null),b=wn(I=>I.user),x=wn(I=>I.messageHistory);if(o8(v.current,f),a)return null;const w=()=>{var I;g.current&&((I=g.current)==null||I.click())},S=async I=>{var A;const P=(A=I.target.files)==null?void 0:A[0];if(P)try{const{fileUrl:L,type:K}=await s(P)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:K,url:L}})}catch(L){console.error("Error sending file:",L)}},C=()=>{f&&(l(f),setTimeout(()=>i(!0,9e3),500),h(""),m(-1))};return J.jsxs(J.Fragment,{children:[J.jsxs("div",{"data-disabled":o,...t,...n.container,ref:r,children:[u&&J.jsxs(J.Fragment,{children:[J.jsx("button",{type:"button",disabled:o,...n.uploadButton.container,onClick:w,children:J.jsx(Eee,{...n.uploadButton.icon})}),J.jsx("input",{type:"file",ref:g,style:{display:"none"},onChange:S})]}),J.jsx("textarea",{...n==null?void 0:n.input,placeholder:d??"Type your message...",ref:v,disabled:o,value:f,"data-has-value":!!f,onChange:I=>h(I.target.value),onKeyDown:I=>{if(!o){if(I.key==="Enter"&&I.shiftKey?(I.preventDefault(),h(`${f}
360
360
  `),setTimeout(()=>{var P;return(P=v.current)==null?void 0:P.scroll({behavior:"instant",top:v.current.scrollHeight})},0)):I.key==="Enter"&&(I.preventDefault(),C()),I.key==="ArrowUp"){I.preventDefault();const P=x[(b==null?void 0:b.userId)??""]??[];y<P.length-1&&h(P[y+1]),m(()=>Math.min(y+1,P.length-1))}if(I.key==="ArrowDown"){I.preventDefault();const P=x[(b==null?void 0:b.userId)??""]??[];h(y===0?"":P[y-1]),m(()=>Math.max(y-1,-1))}}}}),J.jsx("button",{type:"button",...n.button.container,disabled:!f||o,onClick:C,children:J.jsx(See,{...n.button.icon})})]}),J.jsx("a",{...n.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com",children:"⚡ by Botpress"})]})})),jA=({children:e})=>{const[t,r]=$.useState(!1),[n,o]=$.useState(""),[i,a]=$.useState(null),s=({title:l,content:u})=>{o(l),a(u),r(!0)},c=()=>{r(!1)};return J.jsxs(AC.Provider,{value:{hideModal:c,showModal:s,title:n,content:i,open:t},children:[J.jsx(Ai,{open:t,onOpenChange:r,children:J.jsx(Ai.Content,{title:n,children:i})}),e]})},CSe="",kee=({children:e,...t})=>{const r=$.useRef(),n=$.useRef(null),o=IY({...t,messageContainerRef:n});return r.current||(r.current=o),J.jsx(RC.Provider,{value:{...t.configuration},children:J.jsx(OC.Provider,{value:r.current,children:J.jsx(Tee,{children:e})})})},Tee=({children:e})=>{const t=ft(g=>g.client),r=ft(g=>g.addMessage),n=ft(g=>g.setMessages),o=ft(g=>g.configuration),i=ft(g=>g.setConnected),a=ft(g=>g.userData),s=ft(g=>g.userName),c=ft(g=>g.userPictureUrl),l=ft(g=>g.setIsTyping),u=ft(g=>g.getMessages),d=wn(g=>g.setConversationId),p=wn(g=>g.user),f=wn(g=>g.conversationId),h=wn(g=>g.setUser),[y,m]=$.useState(0);return $.useEffect(()=>{if(t)return t.on("messageSent",g=>{const v=u(),b=v[v.length-1];(v.length===0||b.block.type==="bubble"&&b.block.block.type==="text"&&b.block.block.text!==g)&&r({direction:"outgoing",sender:{name:"You"},timestamp:new Date,block:{type:"bubble",block:{type:"text",text:g}},disableInput:!1})})},[f]),$.useEffect(()=>{if(t)return t.on("message",g=>{try{const{payload:v,disableInput:b,id:x,conversationId:w}=g;if(f!==w)return;l(!1,0),r({id:x,direction:"incoming",sender:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(g.sentOn),block:v,disableInput:b})}catch{console.error("Invalid message payload")}})},[f]),$.useEffect(()=>{if(t)return t.on("conversation",g=>{d(g)})},[]),yC(async()=>{if(t)return t.on("error",()=>{m(g=>g+1)})}),yC(async()=>{if(!t||f&&t.conversationId===f)return;let g;try{g=await t.connect(p,a,{name:s,pictureUrl:c}),i(!0)}catch(b){console.error(b),i(!1);return}h(g),f&&await t.conversationExists(f)?await t.switchConversation(f):await t.newConversation();const v=[];for(const b of await t.listMessages())try{const{payload:x,authorId:w,sentOn:S,disableInput:C,id:I}=b,P=w===t.userId?"outgoing":"incoming";v.push({id:I,direction:P,sender:P==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(S),block:x,disableInput:C})}catch{console.error("Invalid message payload")}return n(v.reverse()),()=>{t.disconnect()}},[y,f]),J.jsx(J.Fragment,{children:e})};function Go(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}const $ee=N["useId".toString()]||(()=>{});let Oee=0;function mp(e){const[t,r]=N.useState($ee());return yc(()=>{e||r(n=>n??String(Oee++))},[e]),e||(t?`radix-${t}`:"")}function DA({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=Cee({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=ai(r),c=$.useCallback(l=>{if(i){const d=typeof l=="function"?l(e):l;d!==e&&s(d)}else o(l)},[i,e,o,s]);return[a,c]}function Cee({defaultProp:e,onChange:t}){const r=$.useState(e),[n]=r,o=$.useRef(n),i=ai(t);return $.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}function Aee(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e);$.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Sv="dismissableLayer.update",Iee="dismissableLayer.pointerDownOutside",Ree="dismissableLayer.focusOutside";let LA;const Pee=$.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nee=$.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=$.useContext(Pee),[d,p]=$.useState(null),f=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,h]=$.useState({}),y=Zi(t,I=>p(I)),m=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=m.indexOf(g),b=d?m.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,w=b>=v,S=Mee(I=>{const P=I.target,A=[...u.branches].some(L=>L.contains(P));!w||A||(i==null||i(I),s==null||s(I),I.defaultPrevented||c==null||c())},f),C=jee(I=>{const P=I.target;[...u.branches].some(L=>L.contains(P))||(a==null||a(I),s==null||s(I),I.defaultPrevented||c==null||c())},f);return Aee(I=>{b===u.layers.size-1&&(o==null||o(I),!I.defaultPrevented&&c&&(I.preventDefault(),c()))},f),$.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(LA=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),FA(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=LA)}},[d,f,n,u]),$.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),FA())},[d,u]),$.useEffect(()=>{const I=()=>h({});return document.addEventListener(Sv,I),()=>document.removeEventListener(Sv,I)},[]),$.createElement(In.div,zi({},l,{ref:y,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Go(e.onFocusCapture,C.onFocusCapture),onBlurCapture:Go(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:Go(e.onPointerDownCapture,S.onPointerDownCapture)}))});function Mee(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e),n=$.useRef(!1),o=$.useRef(()=>{});return $.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){qA(Iee,r,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}n.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function jee(e,t=globalThis==null?void 0:globalThis.document){const r=ai(e),n=$.useRef(!1);return $.useEffect(()=>{const o=i=>{i.target&&!n.current&&qA(Ree,r,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function FA(){const e=new CustomEvent(Sv);document.dispatchEvent(e)}function qA(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?r5(o,i):o.dispatchEvent(i)}const _v="focusScope.autoFocusOnMount",Ev="focusScope.autoFocusOnUnmount",BA={bubbles:!1,cancelable:!0},Dee=$.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=$.useState(null),l=ai(o),u=ai(i),d=$.useRef(null),p=Zi(t,y=>c(y)),f=$.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;$.useEffect(()=>{if(n){let y=function(b){if(f.paused||!s)return;const x=b.target;s.contains(x)?d.current=x:Ci(d.current,{select:!0})},m=function(b){if(f.paused||!s)return;const x=b.relatedTarget;x!==null&&(s.contains(x)||Ci(d.current,{select:!0}))},g=function(b){const x=document.activeElement;for(const w of b)w.removedNodes.length>0&&(s!=null&&s.contains(x)||Ci(s))};document.addEventListener("focusin",y),document.addEventListener("focusout",m);const v=new MutationObserver(g);return s&&v.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",m),v.disconnect()}}},[n,s,f.paused]),$.useEffect(()=>{if(s){ZA.add(f);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(_v,BA);s.addEventListener(_v,l),s.dispatchEvent(g),g.defaultPrevented||(Lee(zee(UA(s)),{select:!0}),document.activeElement===y&&Ci(s))}return()=>{s.removeEventListener(_v,l),setTimeout(()=>{const g=new CustomEvent(Ev,BA);s.addEventListener(Ev,u),s.dispatchEvent(g),g.defaultPrevented||Ci(y??document.body,{select:!0}),s.removeEventListener(Ev,u),ZA.remove(f)},0)}}},[s,l,u,f]);const h=$.useCallback(y=>{if(!r&&!n||f.paused)return;const m=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,g=document.activeElement;if(m&&g){const v=y.currentTarget,[b,x]=Fee(v);b&&x?!y.shiftKey&&g===x?(y.preventDefault(),r&&Ci(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),r&&Ci(x,{select:!0})):g===v&&y.preventDefault()}},[r,n,f.paused]);return $.createElement(In.div,zi({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function Lee(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ci(n,{select:t}),document.activeElement!==r)return}function Fee(e){const t=UA(e),r=zA(t,e),n=zA(t.reverse(),e);return[r,n]}function UA(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zA(e,t){for(const r of e)if(!qee(r,{upTo:t}))return r}function qee(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 Bee(e){return e instanceof HTMLInputElement&&"select"in e}function Ci(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Bee(e)&&t&&e.select()}}const ZA=Uee();function Uee(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=VA(e,t),e.unshift(t)},remove(t){var r;e=VA(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function VA(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function zee(e){return e.filter(t=>t.tagName!=="A")}function Zee(e,t){return $.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const yp=e=>{const{present:t,children:r}=e,n=Vee(t),o=typeof r=="function"?r({present:n.isPresent}):$.Children.only(r),i=Zi(n.ref,o.ref);return typeof r=="function"||n.isPresent?$.cloneElement(o,{ref:i}):null};yp.displayName="Presence";function Vee(e){const[t,r]=$.useState(),n=$.useRef({}),o=$.useRef(e),i=$.useRef("none"),a=e?"mounted":"unmounted",[s,c]=Zee(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return $.useEffect(()=>{const l=gp(n.current);i.current=s==="mounted"?l:"none"},[s]),yc(()=>{const l=n.current,u=o.current;if(u!==e){const p=i.current,f=gp(l);e?c("MOUNT"):f==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&p!==f?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),yc(()=>{if(t){const l=d=>{const f=gp(n.current).includes(d.animationName);d.target===t&&f&&no.flushSync(()=>c("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=gp(n.current))};return t.addEventListener("animationstart",u),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{t.removeEventListener("animationstart",u),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:$.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function gp(e){return(e==null?void 0:e.animationName)||"none"}let kv=0;function Hee(){$.useEffect(()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=r[0])!==null&&e!==void 0?e:HA()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:HA()),kv++,()=>{kv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),kv--}},[])}function HA(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var wo=function(){return wo=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},wo.apply(this,arguments)};function WA(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Wee(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,i;n<o;n++)(i||!(n in t))&&(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var vp="right-scroll-bar-position",bp="width-before-scroll-bar",Kee="with-scroll-bars-hidden",Gee="--removed-body-scroll-bar-size";function Jee(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yee(e,t){var r=$.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}function Xee(e,t){return Yee(t||null,function(r){return e.forEach(function(n){return Jee(n,r)})})}function Qee(e){return e}function ete(e,t){t===void 0&&(t=Qee);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(i){var a=t(i,n);return r.push(a),function(){r=r.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(n=!0;r.length;){var a=r;r=[],a.forEach(i)}r={push:function(s){return i(s)},filter:function(){return r}}},assignMedium:function(i){n=!0;var a=[];if(r.length){var s=r;r=[],s.forEach(i),a=r}var c=function(){var u=a;a=[],u.forEach(i)},l=function(){return Promise.resolve().then(c)};l(),r={push:function(u){a.push(u),l()},filter:function(u){return a=a.filter(u),r}}}};return o}function tte(e){e===void 0&&(e={});var t=ete(null);return t.options=wo({async:!0,ssr:!1},e),t}var KA=function(e){var t=e.sideCar,r=WA(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return N.createElement(n,wo({},r))};KA.isSideCarExport=!0;function rte(e,t){return e.useMedium(t),KA}var GA=tte(),Tv=function(){},wp=N.forwardRef(function(e,t){var r=N.useRef(null),n=N.useState({onScrollCapture:Tv,onWheelCapture:Tv,onTouchMoveCapture:Tv}),o=n[0],i=n[1],a=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,p=e.sideCar,f=e.noIsolation,h=e.inert,y=e.allowPinchZoom,m=e.as,g=m===void 0?"div":m,v=WA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,x=Xee([r,t]),w=wo(wo({},v),o);return N.createElement(N.Fragment,null,u&&N.createElement(b,{sideCar:GA,removeScrollBar:l,shards:d,noIsolation:f,inert:h,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),a?N.cloneElement(N.Children.only(s),wo(wo({},w),{ref:x})):N.createElement(g,wo({},w,{className:c,ref:x}),s))});wp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wp.classNames={fullWidth:bp,zeroRight:vp};var JA,nte=function(){if(JA)return JA;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ote(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nte();return t&&e.setAttribute("nonce",t),e}function ite(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ate(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ste=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ote())&&(ite(t,r),ate(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cte=function(){var e=ste();return function(t,r){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},YA=function(){var e=cte(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},lte={left:0,top:0,right:0,gap:0},$v=function(e){return parseInt(e||"",10)||0},ute=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$v(r),$v(n),$v(o)]},dte=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lte;var t=ute(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},fte=YA(),pte=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
361
361
  .`.concat(Kee,` {
362
362
  overflow: hidden `).concat(n,`;
@@ -397,7 +397,7 @@ to {
397
397
  `)},hte=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=N.useMemo(function(){return dte(o)},[o]);return N.createElement(fte,{styles:pte(i,!t,o,r?"":"!important")})},Ov=!1;if(typeof window<"u")try{var xp=Object.defineProperty({},"passive",{get:function(){return Ov=!0,!0}});window.addEventListener("test",xp,xp),window.removeEventListener("test",xp,xp)}catch{Ov=!1}var Ss=Ov?{passive:!1}:!1,mte=function(e){return e.tagName==="TEXTAREA"},XA=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!mte(e)&&r[t]==="visible")},yte=function(e){return XA(e,"overflowY")},gte=function(e){return XA(e,"overflowX")},QA=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=eI(e,r);if(n){var o=tI(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},vte=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},bte=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},eI=function(e,t){return e==="v"?yte(t):gte(t)},tI=function(e,t){return e==="v"?vte(t):bte(t)},wte=function(e,t){return e==="h"&&t==="rtl"?-1:1},xte=function(e,t,r,n,o){var i=wte(e,window.getComputedStyle(t).direction),a=i*n,s=r.target,c=t.contains(s),l=!1,u=a>0,d=0,p=0;do{var f=tI(e,s),h=f[0],y=f[1],m=f[2],g=y-m-i*h;(h||g)&&eI(e,s)&&(d+=g,p+=h),s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(o&&d===0||!o&&a>d)||!u&&(o&&p===0||!o&&-a>p))&&(l=!0),l},Sp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},rI=function(e){return[e.deltaX,e.deltaY]},nI=function(e){return e&&"current"in e?e.current:e},Ste=function(e,t){return e[0]===t[0]&&e[1]===t[1]},_te=function(e){return`
398
398
  .block-interactivity-`.concat(e,` {pointer-events: none;}
399
399
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
400
- `)},Ete=0,_s=[];function kte(e){var t=N.useRef([]),r=N.useRef([0,0]),n=N.useRef(),o=N.useState(Ete++)[0],i=N.useState(function(){return YA()})[0],a=N.useRef(e);N.useEffect(function(){a.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=Wee([e.lockRef.current],(e.shards||[]).map(nI),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var g=Sp(y),v=r.current,b="deltaX"in y?y.deltaX:v[0]-g[0],x="deltaY"in y?y.deltaY:v[1]-g[1],w,S=y.target,C=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&C==="h"&&S.type==="range")return!1;var I=QA(C,S);if(!I)return!0;if(I?w=C:(w=C==="v"?"h":"v",I=QA(C,S)),!I)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=w),!w)return!0;var P=n.current||w;return xte(P,m,y,P==="h"?b:x,!0)},[]),c=N.useCallback(function(y){var m=y;if(!(!_s.length||_s[_s.length-1]!==i)){var g="deltaY"in m?rI(m):Sp(m),v=t.current.filter(function(w){return w.name===m.type&&w.target===m.target&&Ste(w.delta,g)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var b=(a.current.shards||[]).map(nI).filter(Boolean).filter(function(w){return w.contains(m.target)}),x=b.length>0?s(m,b[0]):!a.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=N.useCallback(function(y,m,g,v){var b={name:y,delta:m,target:g,should:v};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=N.useCallback(function(y){r.current=Sp(y),n.current=void 0},[]),d=N.useCallback(function(y){l(y.type,rI(y),y.target,s(y,e.lockRef.current))},[]),p=N.useCallback(function(y){l(y.type,Sp(y),y.target,s(y,e.lockRef.current))},[]);N.useEffect(function(){return _s.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ss),document.addEventListener("touchmove",c,Ss),document.addEventListener("touchstart",u,Ss),function(){_s=_s.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ss),document.removeEventListener("touchmove",c,Ss),document.removeEventListener("touchstart",u,Ss)}},[]);var f=e.removeScrollBar,h=e.inert;return N.createElement(N.Fragment,null,h?N.createElement(i,{styles:_te(o)}):null,f?N.createElement(hte,{gapMode:"margin"}):null)}const Tte=rte(GA,kte);var oI=N.forwardRef(function(e,t){return N.createElement(wp,wo({},e,{ref:t,sideCar:Tte}))});oI.classNames=wp.classNames;const $te=oI;var Ote=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Es=new WeakMap,_p=new WeakMap,Ep={},Cv=0,iI=function(e){return e&&(e.host||iI(e.parentNode))},Cte=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=iI(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ate=function(e,t,r,n){var o=Cte(t,Array.isArray(e)?e:[e]);Ep[r]||(Ep[r]=new WeakMap);var i=Ep[r],a=[],s=new Set,c=new Set(o),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var f=p.getAttribute(n),h=f!==null&&f!=="false",y=(Es.get(p)||0)+1,m=(i.get(p)||0)+1;Es.set(p,y),i.set(p,m),a.push(p),y===1&&h&&_p.set(p,!0),m===1&&p.setAttribute(r,"true"),h||p.setAttribute(n,"true")}})};return u(t),s.clear(),Cv++,function(){a.forEach(function(d){var p=Es.get(d)-1,f=i.get(d)-1;Es.set(d,p),i.set(d,f),p||(_p.has(d)||d.removeAttribute(n),_p.delete(d)),f||d.removeAttribute(r)}),Cv--,Cv||(Es=new WeakMap,Es=new WeakMap,_p=new WeakMap,Ep={})}},Ite=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||Ote(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Ate(n,o,r,"aria-hidden")):function(){return null}};const aI="Dialog",[sI,ASe]=Vm(aI),[Rte,Jo]=sI(aI),Pte=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=$.useRef(null),c=$.useRef(null),[l=!1,u]=DA({prop:n,defaultProp:o,onChange:i});return $.createElement(Rte,{scope:t,triggerRef:s,contentRef:c,contentId:mp(),titleId:mp(),descriptionId:mp(),open:l,onOpenChange:u,onOpenToggle:$.useCallback(()=>u(d=>!d),[u]),modal:a},r)},Nte="DialogTrigger",Mte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Nte,r),i=Zi(t,o.triggerRef);return $.createElement(In.button,vr({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Iv(o.open)},n,{ref:i,onClick:Go(e.onClick,o.onOpenToggle)}))}),jte="DialogPortal",[ISe,cI]=sI(jte,{forceMount:void 0}),Av="DialogOverlay",Dte=$.forwardRef((e,t)=>{const r=cI(Av,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Jo(Av,e.__scopeDialog);return i.modal?$.createElement(yp,{present:n||i.open},$.createElement(Lte,vr({},o,{ref:t}))):null}),Lte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Av,r);return $.createElement($te,{as:Hm,allowPinchZoom:!0,shards:[o.contentRef]},$.createElement(In.div,vr({"data-state":Iv(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),hl="DialogContent",Fte=$.forwardRef((e,t)=>{const r=cI(hl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Jo(hl,e.__scopeDialog);return $.createElement(yp,{present:n||i.open},i.modal?$.createElement(qte,vr({},o,{ref:t})):$.createElement(Bte,vr({},o,{ref:t})))}),qte=$.forwardRef((e,t)=>{const r=Jo(hl,e.__scopeDialog),n=$.useRef(null),o=Zi(t,r.contentRef,n);return $.useEffect(()=>{const i=n.current;if(i)return Ite(i)},[]),$.createElement(lI,vr({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Go(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Go(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Go(e.onFocusOutside,i=>i.preventDefault())}))}),Bte=$.forwardRef((e,t)=>{const r=Jo(hl,e.__scopeDialog),n=$.useRef(!1),o=$.useRef(!1);return $.createElement(lI,vr({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),lI=$.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Jo(hl,r),c=$.useRef(null),l=Zi(t,c);return Hee(),$.createElement($.Fragment,null,$.createElement(Dee,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},$.createElement(Nee,vr({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Iv(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Ute="DialogTitle",zte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Ute,r);return $.createElement(In.h2,vr({id:o.titleId},n,{ref:t}))}),Zte="DialogClose",Vte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Zte,r);return $.createElement(In.button,vr({type:"button"},n,{ref:t,onClick:Go(e.onClick,()=>o.onOpenChange(!1))}))});function Iv(e){return e?"open":"closed"}const Hte=Pte,Wte=Mte,Kte=Dte,Gte=Fte,Jte=zte,uI=Vte;function Yte({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const dI=N.forwardRef(Yte);function Ai({open:e,onOpenChange:t,children:r}){return J.jsx(Hte,{open:e,onOpenChange:t,children:r})}function Xte({title:e,children:t}){var n,o,i,a,s,c,l,u;const{modal:r}=Ht;return J.jsxs(J.Fragment,{children:[J.jsx(Kte,{...r==null?void 0:r.overlay}),J.jsx("div",{...r==null?void 0:r.container,children:J.jsxs(Gte,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[J.jsxs("div",{...(i=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[J.jsx(Jte,{...(s=(a=r==null?void 0:r.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),J.jsx(uI,{children:J.jsx(dI,{role:"button",tabIndex:0,...(l=(c=r==null?void 0:r.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),J.jsx("div",{...(u=r==null?void 0:r.dialog)==null?void 0:u.content,children:t})]})})]})}Ai.Button=Wte,Ai.Close=uI,Ai.Content=Xte;const fI=$.forwardRef(({children:e,...t},r)=>{const{container:n}=Ht;return J.jsxs("div",{...t,...n,ref:r,children:[J.jsx(iY,{}),J.jsxs(jA,{children:[J.jsx(Qte,{}),e]})]})}),Qte=()=>{const{modal:e}=Ht,t=ft(n=>n.connected),{showModal:r}=IC();return $.useEffect(()=>{var n,o,i,a;t||r({title:"Connection Error",content:J.jsxs(J.Fragment,{children:[J.jsx("p",{...(o=(n=e==null?void 0:e.dialog)==null?void 0:n.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),J.jsx(Ai.Close,{asChild:!0,children:J.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),J.jsx(J.Fragment,{})},ere=$.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:o}=Ht,{container:i,icon:a}=o??{};return J.jsx("div",{...r,...i,ref:n,onClick:t,children:J.jsx("div",{...a})})}),pI="Collapsible",[tre,PSe]=Vm(pI),[rre,Rv]=tre(pI),nre=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=DA({prop:n,defaultProp:o,onChange:a});return $.createElement(rre,{scope:r,disabled:i,contentId:mp(),open:c,onOpenToggle:$.useCallback(()=>l(u=>!u),[l])},$.createElement(In.div,vr({"data-state":Pv(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ore="CollapsibleTrigger",ire=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Rv(ore,r);return $.createElement(In.button,vr({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Pv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:Go(e.onClick,o.onOpenToggle)}))}),hI="CollapsibleContent",are=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Rv(hI,e.__scopeCollapsible);return $.createElement(yp,{present:r||o.open},({present:i})=>$.createElement(sre,vr({},n,{ref:t,present:i})))}),sre=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=Rv(hI,r),[s,c]=$.useState(n),l=$.useRef(null),u=Zi(t,l),d=$.useRef(0),p=d.current,f=$.useRef(0),h=f.current,y=a.open||s,m=$.useRef(y),g=$.useRef();return $.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),yc(()=>{const v=l.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();d.current=b.height,f.current=b.width,m.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(n)}},[a.open,n]),$.createElement(In.div,vr({"data-state":Pv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),y&&o)});function Pv(e){return e?"open":"closed"}const cre=nre,lre=are,ure=e=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},N.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),mI=({...e})=>{var a,s;const{header:t,modal:r}=Ht,n=ft(c=>c.restartConversation),{showModal:o}=IC(),i=c=>{var l,u,d,p;c.stopPropagation(),o({title:"Restart Conversation",content:J.jsxs(J.Fragment,{children:[J.jsx("p",{...(u=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),J.jsx(Ai.Close,{asChild:!0,children:J.jsx("button",{type:"button",...(p=(d=r==null?void 0:r.dialog)==null?void 0:d.newConversation)==null?void 0:p.button,onClick:n,children:"Restart"})})]})})};return J.jsx(zY,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},dre=({...e})=>{const{header:t}=Ht,r=ft(o=>o.closeWindow),n=o=>{o.stopPropagation(),r==null||r()};return J.jsx(dI,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{o.key==="Enter"&&n(o)}})},ml=({icon:e,title:t,link:r,...n})=>{var a,s,c,l,u,d,p,f,h,y,m,g;const{header:o}=Ht,i=e??ure;return!r&&!t?null:r?J.jsxs("a",{...n,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:r,target:"_blank",rel:"noreferrer noopener",children:[J.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),J.jsx("p",{...(d=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:d.link,children:t})]}):J.jsxs("div",{...n,...(f=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:f.container,children:[J.jsx(i,{...(y=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.icon}),J.jsx("p",{...(g=(m=o.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:g.text,children:t})]})},yI=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var p,f,h,y,m,g,v,b,x,w,S,C,I,P,A,L,W,Z,B,F,j;const{header:o}=Ht,i=ft(U=>U.configuration),a=ft(U=>U.closeWindow),s=ft(U=>U.getClientId)(),c=ft(U=>!U.disableRestartConversation),[l,u]=$.useState(!!e),d=!!((p=i.email)!=null&&p.title)||!!((f=i.phone)!=null&&f.title)||!!((h=i.website)!=null&&h.title)||!!((y=i.termsOfService)!=null&&y.link)||!!((m=i.privacyPolicy)!=null&&m.link);return J.jsxs(cre,{open:d?l:!1,onOpenChange:u,"data-disabled":d?void 0:"",...o.container,...n,children:[J.jsxs(ire,{...o.content.container,children:[J.jsx(ry,{...n,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),J.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&J.jsx("p",{...o.content.description,children:i.botDescription}),J.jsxs("div",{...o.content.actions.container,children:[c&&J.jsx(mI,{}),a&&J.jsx(dre,{})]})]}),J.jsxs(lre,{...o.expandedContent.container,children:[J.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[J.jsx(ml,{"data-email":"",icon:DX,title:(g=i.email)==null?void 0:g.title,link:(b=(v=i.email)==null?void 0:v.link)!=null&&b.startsWith("mailto:")?(x=i.email)==null?void 0:x.link:i.email?`mailto:${(w=i.email)==null?void 0:w.link}`:void 0}),J.jsx(ml,{"data-phone":"",icon:zX,title:(S=i.phone)==null?void 0:S.title,link:(I=(C=i.phone)==null?void 0:C.link)!=null&&I.startsWith("tel:")?(P=i.phone)==null?void 0:P.link:i.phone?`tel:${i.phone.link}`:void 0}),J.jsx(ml,{"data-website":"",link:(A=i.website)==null?void 0:A.link,icon:FX,title:(L=i.website)==null?void 0:L.title})]}),J.jsxs("div",{"data-legal":"",...(W=o.expandedContent)==null?void 0:W.group,children:[J.jsx(ml,{"data-terms":"",link:(Z=i.termsOfService)==null?void 0:Z.link,icon:MX,title:(B=i.termsOfService)==null?void 0:B.title}),J.jsx(ml,{"data-privacy":"",link:(F=i.privacyPolicy)==null?void 0:F.link,icon:BX,title:(j=i.privacyPolicy)==null?void 0:j.title})]})]})]})},gI=$.memo(({...e})=>{const{typingIndicator:t}=Ht;return J.jsx("div",{...e,...t==null?void 0:t.container,children:J.jsx("div",{...t==null?void 0:t.loader})})}),Nv=$.memo($.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:o,sender:i,...a},s)=>{var y,m,g,v;const[c,l]=$.useState([]),{message:u}=Ht,{botAvatar:d,botName:p}=ft(b=>b.configuration),f=ft(b=>b.getClientId)(),h=jE(f??"",15);return J.jsx(CC.Provider,{value:{isLoading:c,setIsLoading:l},children:J.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:s,children:[J.jsxs(kE,{"data-color":h,...(y=u==null?void 0:u.avatar)==null?void 0:y.container,children:[J.jsx(TE,{...(m=u==null?void 0:u.avatar)==null?void 0:m.image,src:(i==null?void 0:i.avatar)??d}),J.jsx($E,{...(g=u==null?void 0:u.avatar)==null?void 0:g.fallback,children:(i==null?void 0:i.name[0])??((v=p??"Bot")==null?void 0:v[0])})]}),t&&J.jsx(xs,{block:t}),o]})})}));function fre(){const e=ft(n=>n.getClientId)(),t=ft(n=>n.configuration),{messageList:{marquee:r}}=Ht;return J.jsxs("li",{...r.container,children:[J.jsx(ry,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),J.jsxs("div",{...r.content,children:[J.jsx("h1",{...r.title,children:t.botName||"Bot"}),J.jsx("p",{...r.description,children:t.botDescription})]})]})}function pre(e,t){try{var r=global,n=r.document;if(typeof n<"u"&&n.createElement&&n.head&&n.head.appendChild){var o=n.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||n.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),n.head.appendChild(o)}}catch{}}function hre(){pre("react-scroll-to-bottom:version","4.2.0")}var yl=function(e){return e&&e.Math===Math&&e},Sr=yl(typeof globalThis=="object"&&globalThis)||yl(typeof window=="object"&&window)||yl(typeof self=="object"&&self)||yl(typeof We=="object"&&We)||yl(typeof We=="object"&&We)||function(){return this}()||Function("return this")(),_r=function(e){try{return!!e()}catch{return!0}},mre=_r,kp=!mre(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),yre=kp,vI=Function.prototype,bI=vI.apply,wI=vI.call,Mv=typeof Reflect=="object"&&Reflect.apply||(yre?wI.bind(bI):function(){return wI.apply(bI,arguments)}),xI=kp,SI=Function.prototype,jv=SI.call,gre=xI&&SI.bind.bind(jv,jv),Er=xI?gre:function(e){return function(){return jv.apply(e,arguments)}},_I=Er,vre=_I({}.toString),bre=_I("".slice),fa=function(e){return bre(vre(e),8,-1)},wre=fa,xre=Er,Dv=function(e){if(wre(e)==="Function")return xre(e)},Lv=typeof document=="object"&&document.all,Qr=typeof Lv>"u"&&Lv!==void 0?function(e){return typeof e=="function"||e===Lv}:function(e){return typeof e=="function"},gl={},Sre=_r,pn=!Sre(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_re=kp,Tp=Function.prototype.call,xo=_re?Tp.bind(Tp):function(){return Tp.apply(Tp,arguments)},Fv={},EI={}.propertyIsEnumerable,kI=Object.getOwnPropertyDescriptor,Ere=kI&&!EI.call({1:2},1);Fv.f=Ere?function(t){var r=kI(this,t);return!!r&&r.enumerable}:EI;var vl=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},kre=Er,Tre=_r,$re=fa,qv=Object,Ore=kre("".split),TI=Tre(function(){return!qv("z").propertyIsEnumerable(0)})?function(e){return $re(e)==="String"?Ore(e,""):qv(e)}:qv,Bv=function(e){return e==null},Cre=Bv,Are=TypeError,Uv=function(e){if(Cre(e))throw new Are("Can't call method on "+e);return e},Ire=TI,Rre=Uv,So=function(e){return Ire(Rre(e))},Pre=Qr,Yo=function(e){return typeof e=="object"?e!==null:Pre(e)},qr={},zv=qr,Zv=Sr,Nre=Qr,$I=function(e){return Nre(e)?e:void 0},_o=function(e,t){return arguments.length<2?$I(zv[e])||$I(Zv[e]):zv[e]&&zv[e][t]||Zv[e]&&Zv[e][t]},Mre=Er,Xo=Mre({}.isPrototypeOf),jre=Sr,OI=jre.navigator,CI=OI&&OI.userAgent,Vv=CI?String(CI):"",AI=Sr,Hv=Vv,II=AI.process,RI=AI.Deno,PI=II&&II.versions||RI&&RI.version,NI=PI&&PI.v8,Xn,$p;NI&&(Xn=NI.split("."),$p=Xn[0]>0&&Xn[0]<4?1:+(Xn[0]+Xn[1])),!$p&&Hv&&(Xn=Hv.match(/Edge\/(\d+)/),(!Xn||Xn[1]>=74)&&(Xn=Hv.match(/Chrome\/(\d+)/),Xn&&($p=+Xn[1])));var Wv=$p,MI=Wv,Dre=_r,Lre=Sr,Fre=Lre.String,ks=!!Object.getOwnPropertySymbols&&!Dre(function(){var e=Symbol("symbol detection");return!Fre(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&MI&&MI<41}),qre=ks,jI=qre&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bre=_o,Ure=Qr,zre=Xo,Zre=jI,Vre=Object,bl=Zre?function(e){return typeof e=="symbol"}:function(e){var t=Bre("Symbol");return Ure(t)&&zre(t.prototype,Vre(e))},Hre=String,Op=function(e){try{return Hre(e)}catch{return"Object"}},Wre=Qr,Kre=Op,Gre=TypeError,Kv=function(e){if(Wre(e))return e;throw new Gre(Kre(e)+" is not a function")},Jre=Kv,Yre=Bv,Gv=function(e,t){var r=e[t];return Yre(r)?void 0:Jre(r)},Jv=xo,Yv=Qr,Xv=Yo,Xre=TypeError,Qre=function(e,t){var r,n;if(t==="string"&&Yv(r=e.toString)&&!Xv(n=Jv(r,e))||Yv(r=e.valueOf)&&!Xv(n=Jv(r,e))||t!=="string"&&Yv(r=e.toString)&&!Xv(n=Jv(r,e)))return n;throw new Xre("Can't convert object to primitive value")},DI={exports:{}},LI=Sr,ene=Object.defineProperty,tne=function(e,t){try{ene(LI,e,{value:t,configurable:!0,writable:!0})}catch{LI[e]=t}return t},rne=Sr,nne=tne,FI="__core-js_shared__",qI=DI.exports=rne[FI]||nne(FI,{});(qI.versions||(qI.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 Qv=DI.exports,BI=Qv,Ts=function(e,t){return BI[e]||(BI[e]=t||{})},one=Uv,ine=Object,Qo=function(e){return ine(one(e))},ane=Er,sne=Qo,cne=ane({}.hasOwnProperty),En=Object.hasOwn||function(t,r){return cne(sne(t),r)},lne=Er,une=0,dne=Math.random(),fne=lne(1 .toString),eb=function(e){return"Symbol("+(e===void 0?"":e)+")_"+fne(++une+dne,36)},pne=Sr,hne=Ts,UI=En,mne=eb,yne=ks,gne=jI,$s=pne.Symbol,tb=hne("wks"),vne=gne?$s.for||$s:$s&&$s.withoutSetter||mne,Cr=function(e){return UI(tb,e)||(tb[e]=yne&&UI($s,e)?$s[e]:vne("Symbol."+e)),tb[e]},bne=xo,zI=Yo,ZI=bl,wne=Gv,xne=Qre,Sne=Cr,_ne=TypeError,Ene=Sne("toPrimitive"),kne=function(e,t){if(!zI(e)||ZI(e))return e;var r=wne(e,Ene),n;if(r){if(t===void 0&&(t="default"),n=bne(r,e,t),!zI(n)||ZI(n))return n;throw new _ne("Can't convert object to primitive value")}return t===void 0&&(t="number"),xne(e,t)},Tne=kne,$ne=bl,rb=function(e){var t=Tne(e,"string");return $ne(t)?t:t+""},One=Sr,VI=Yo,nb=One.document,Cne=VI(nb)&&VI(nb.createElement),HI=function(e){return Cne?nb.createElement(e):{}},Ane=pn,Ine=_r,Rne=HI,WI=!Ane&&!Ine(function(){return Object.defineProperty(Rne("div"),"a",{get:function(){return 7}}).a!==7}),Pne=pn,Nne=xo,Mne=Fv,jne=vl,Dne=So,Lne=rb,Fne=En,qne=WI,KI=Object.getOwnPropertyDescriptor;gl.f=Pne?KI:function(t,r){if(t=Dne(t),r=Lne(r),qne)try{return KI(t,r)}catch{}if(Fne(t,r))return jne(!Nne(Mne.f,t,r),t[r])};var Bne=_r,Une=Qr,zne=/#|\.prototype\./,wl=function(e,t){var r=Vne[Zne(e)];return r===Wne?!0:r===Hne?!1:Une(t)?Bne(t):!!t},Zne=wl.normalize=function(e){return String(e).replace(zne,".").toLowerCase()},Vne=wl.data={},Hne=wl.NATIVE="N",Wne=wl.POLYFILL="P",Kne=wl,GI=Dv,Gne=Kv,Jne=kp,Yne=GI(GI.bind),ob=function(e,t){return Gne(e),t===void 0?e:Jne?Yne(e,t):function(){return e.apply(t,arguments)}},Qn={},Xne=pn,Qne=_r,JI=Xne&&Qne(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eoe=Yo,toe=String,roe=TypeError,Ii=function(e){if(eoe(e))return e;throw new roe(toe(e)+" is not an object")},noe=pn,ooe=WI,ioe=JI,Cp=Ii,YI=rb,aoe=TypeError,ib=Object.defineProperty,soe=Object.getOwnPropertyDescriptor,ab="enumerable",sb="configurable",cb="writable";Qn.f=noe?ioe?function(t,r,n){if(Cp(t),r=YI(r),Cp(n),typeof t=="function"&&r==="prototype"&&"value"in n&&cb in n&&!n[cb]){var o=soe(t,r);o&&o[cb]&&(t[r]=n.value,n={configurable:sb in n?n[sb]:o[sb],enumerable:ab in n?n[ab]:o[ab],writable:!1})}return ib(t,r,n)}:ib:function(t,r,n){if(Cp(t),r=YI(r),Cp(n),ooe)try{return ib(t,r,n)}catch{}if("get"in n||"set"in n)throw new aoe("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var coe=pn,loe=Qn,uoe=vl,Ap=coe?function(e,t,r){return loe.f(e,t,uoe(1,r))}:function(e,t,r){return e[t]=r,e},xl=Sr,doe=Mv,foe=Dv,poe=Qr,hoe=gl.f,moe=Kne,Os=qr,yoe=ob,Cs=Ap,XI=En,goe=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return doe(e,this,arguments)};return t.prototype=e.prototype,t},Bt=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?xl:o?xl[r]:xl[r]&&xl[r].prototype,s=n?Os:Os[r]||Cs(Os,r,{})[r],c=s.prototype,l,u,d,p,f,h,y,m,g;for(p in t)l=moe(n?p:r+(o?".":"#")+p,e.forced),u=!l&&a&&XI(a,p),h=s[p],u&&(e.dontCallGetSet?(g=hoe(a,p),y=g&&g.value):y=a[p]),f=u&&y?y:t[p],!(!l&&!i&&typeof h==typeof f)&&(e.bind&&u?m=yoe(f,xl):e.wrap&&u?m=goe(f):i&&poe(f)?m=foe(f):m=f,(e.sham||f&&f.sham||h&&h.sham)&&Cs(m,"sham",!0),Cs(s,p,m),i&&(d=r+"Prototype",XI(Os,d)||Cs(Os,d,{}),Cs(Os[d],p,f),e.real&&c&&(l||!c[p])&&Cs(c,p,f)))},voe=fa,As=Array.isArray||function(t){return voe(t)==="Array"},boe=Bt,woe=As;boe({target:"Array",stat:!0},{isArray:woe});var xoe=qr,Soe=xoe.Array.isArray,_oe=Soe,QI=_oe,Eoe=QI,koe=Eoe,Toe=koe,$oe=Toe,Ooe=$oe;const eR=St(Ooe);function Coe(e){if(eR(e))return e}var Aoe=Math.ceil,Ioe=Math.floor,Roe=Math.trunc||function(t){var r=+t;return(r>0?Ioe:Aoe)(r)},Poe=Roe,Ip=function(e){var t=+e;return t!==t||t===0?0:Poe(t)},Noe=Ip,Moe=Math.min,joe=function(e){var t=Noe(e);return t>0?Moe(t,9007199254740991):0},Doe=joe,pa=function(e){return Doe(e.length)},Loe=TypeError,Foe=9007199254740991,lb=function(e){if(e>Foe)throw Loe("Maximum allowed index exceeded");return e},qoe=pn,Boe=Qn,Uoe=vl,Sl=function(e,t,r){qoe?Boe.f(e,t,Uoe(0,r)):e[t]=r},zoe=Cr,Zoe=zoe("toStringTag"),tR={};tR[Zoe]="z";var ub=String(tR)==="[object z]",Voe=ub,Hoe=Qr,Rp=fa,Woe=Cr,Koe=Woe("toStringTag"),Goe=Object,Joe=Rp(function(){return arguments}())==="Arguments",Yoe=function(e,t){try{return e[t]}catch{}},_l=Voe?Rp:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Yoe(t=Goe(e),Koe))=="string"?r:Joe?Rp(t):(n=Rp(t))==="Object"&&Hoe(t.callee)?"Arguments":n},Xoe=Er,Qoe=Qr,db=Qv,eie=Xoe(Function.toString);Qoe(db.inspectSource)||(db.inspectSource=function(e){return eie(e)});var tie=db.inspectSource,rie=Er,nie=_r,rR=Qr,oie=_l,iie=_o,aie=tie,nR=function(){},oR=iie("Reflect","construct"),fb=/^\s*(?:class|function)\b/,sie=rie(fb.exec),cie=!fb.test(nR),El=function(t){if(!rR(t))return!1;try{return oR(nR,[],t),!0}catch{return!1}},iR=function(t){if(!rR(t))return!1;switch(oie(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cie||!!sie(fb,aie(t))}catch{return!0}};iR.sham=!0;var pb=!oR||nie(function(){var e;return El(El.call)||!El(Object)||!El(function(){e=!0})||e})?iR:El,aR=As,lie=pb,uie=Yo,die=Cr,fie=die("species"),sR=Array,pie=function(e){var t;return aR(e)&&(t=e.constructor,lie(t)&&(t===sR||aR(t.prototype))?t=void 0:uie(t)&&(t=t[fie],t===null&&(t=void 0))),t===void 0?sR:t},hie=pie,hb=function(e,t){return new(hie(e))(t===0?0:t)},mie=_r,yie=Cr,gie=Wv,vie=yie("species"),Pp=function(e){return gie>=51||!mie(function(){var t=[],r=t.constructor={};return r[vie]=function(){return{foo:1}},t[e](Boolean).foo!==1})},bie=Bt,wie=_r,xie=As,Sie=Yo,_ie=Qo,Eie=pa,cR=lb,lR=Sl,kie=hb,Tie=Pp,$ie=Cr,Oie=Wv,uR=$ie("isConcatSpreadable"),Cie=Oie>=51||!wie(function(){var e=[];return e[uR]=!1,e.concat()[0]!==e}),Aie=function(e){if(!Sie(e))return!1;var t=e[uR];return t!==void 0?!!t:xie(e)},Iie=!Cie||!Tie("concat");bie({target:"Array",proto:!0,arity:1,forced:Iie},{concat:function(t){var r=_ie(this),n=kie(r,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?r:arguments[i],Aie(l))for(c=Eie(l),cR(o+c),a=0;a<c;a++,o++)a in l&&lR(n,o,l[a]);else cR(o+1),lR(n,o++,l);return n.length=o,n}});var Rie=_l,Pie=String,kl=function(e){if(Rie(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Pie(e)},Np={},Nie=Ip,Mie=Math.max,jie=Math.min,mb=function(e,t){var r=Nie(e);return r<0?Mie(r+t,0):jie(r,t)},Die=So,Lie=mb,Fie=pa,dR=function(e){return function(t,r,n){var o=Die(t),i=Fie(o);if(i===0)return!e&&-1;var a=Lie(n,i),s;if(e&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},fR={includes:dR(!0),indexOf:dR(!1)},Mp={},qie=Er,yb=En,Bie=So,Uie=fR.indexOf,zie=Mp,pR=qie([].push),hR=function(e,t){var r=Bie(e),n=0,o=[],i;for(i in r)!yb(zie,i)&&yb(r,i)&&pR(o,i);for(;t.length>n;)yb(r,i=t[n++])&&(~Uie(o,i)||pR(o,i));return o},gb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zie=hR,Vie=gb,vb=Object.keys||function(t){return Zie(t,Vie)},Hie=pn,Wie=JI,Kie=Qn,Gie=Ii,Jie=So,Yie=vb;Np.f=Hie&&!Wie?Object.defineProperties:function(t,r){Gie(t);for(var n=Jie(r),o=Yie(r),i=o.length,a=0,s;i>a;)Kie.f(t,s=o[a++],n[s]);return t};var Xie=_o,Qie=Xie("document","documentElement"),eae=Ts,tae=eb,mR=eae("keys"),jp=function(e){return mR[e]||(mR[e]=tae(e))},rae=Ii,nae=Np,yR=gb,oae=Mp,iae=Qie,aae=HI,sae=jp,gR=">",vR="<",bb="prototype",wb="script",bR=sae("IE_PROTO"),xb=function(){},wR=function(e){return vR+wb+gR+e+vR+"/"+wb+gR},xR=function(e){e.write(wR("")),e.close();var t=e.parentWindow.Object;return e=null,t},cae=function(){var e=aae("iframe"),t="java"+wb+":",r;return e.style.display="none",iae.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(wR("document.F=Object")),r.close(),r.F},Dp,Lp=function(){try{Dp=new ActiveXObject("htmlfile")}catch{}Lp=typeof document<"u"?document.domain&&Dp?xR(Dp):cae():xR(Dp);for(var e=yR.length;e--;)delete Lp[bb][yR[e]];return Lp()};oae[bR]=!0;var Sb=Object.create||function(t,r){var n;return t!==null?(xb[bb]=rae(t),n=new xb,xb[bb]=null,n[bR]=t):n=Lp(),r===void 0?n:nae.f(n,r)},Fp={},lae=hR,uae=gb,dae=uae.concat("length","prototype");Fp.f=Object.getOwnPropertyNames||function(t){return lae(t,dae)};var SR={},fae=Er,qp=fae([].slice),pae=fa,hae=So,_R=Fp.f,mae=qp,ER=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],yae=function(e){try{return _R(e)}catch{return mae(ER)}};SR.f=function(t){return ER&&pae(t)==="Window"?yae(t):_R(hae(t))};var Bp={};Bp.f=Object.getOwnPropertySymbols;var gae=Ap,Up=function(e,t,r,n){return n&&n.enumerable?e[t]=r:gae(e,t,r),e},vae=Qn,bae=function(e,t,r){return vae.f(e,t,r)},Tl={},wae=Cr;Tl.f=wae;var kR=qr,xae=En,Sae=Tl,_ae=Qn.f,rr=function(e){var t=kR.Symbol||(kR.Symbol={});xae(t,e)||_ae(t,e,{value:Sae.f(e)})},Eae=xo,kae=_o,Tae=Cr,$ae=Up,TR=function(){var e=kae("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Tae("toPrimitive");t&&!t[n]&&$ae(t,n,function(o){return Eae(r,this)},{arity:1})},Oae=ub,Cae=_l,Aae=Oae?{}.toString:function(){return"[object "+Cae(this)+"]"},Iae=ub,Rae=Qn.f,Pae=Ap,Nae=En,Mae=Aae,jae=Cr,$R=jae("toStringTag"),Is=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(Nae(o,$R)||Rae(o,$R,{configurable:!0,value:t}),n&&!Iae&&Pae(o,"toString",Mae))},Dae=Sr,Lae=Qr,OR=Dae.WeakMap,Fae=Lae(OR)&&/native code/.test(String(OR)),qae=Fae,CR=Sr,Bae=Yo,Uae=Ap,_b=En,Eb=Qv,zae=jp,Zae=Mp,AR="Object already initialized",kb=CR.TypeError,Vae=CR.WeakMap,zp,$l,Zp,Hae=function(e){return Zp(e)?$l(e):zp(e,{})},Wae=function(e){return function(t){var r;if(!Bae(t)||(r=$l(t)).type!==e)throw new kb("Incompatible receiver, "+e+" required");return r}};if(qae||Eb.state){var Eo=Eb.state||(Eb.state=new Vae);Eo.get=Eo.get,Eo.has=Eo.has,Eo.set=Eo.set,zp=function(e,t){if(Eo.has(e))throw new kb(AR);return t.facade=e,Eo.set(e,t),t},$l=function(e){return Eo.get(e)||{}},Zp=function(e){return Eo.has(e)}}else{var Rs=zae("state");Zae[Rs]=!0,zp=function(e,t){if(_b(e,Rs))throw new kb(AR);return t.facade=e,Uae(e,Rs,t),t},$l=function(e){return _b(e,Rs)?e[Rs]:{}},Zp=function(e){return _b(e,Rs)}}var Tb={set:zp,get:$l,has:Zp,enforce:Hae,getterFor:Wae},Kae=ob,Gae=Er,Jae=TI,Yae=Qo,Xae=pa,Qae=hb,IR=Gae([].push),Ri=function(e){var t=e===1,r=e===2,n=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,d){for(var p=Yae(c),f=Jae(p),h=Xae(f),y=Kae(l,u),m=0,g=d||Qae,v=t?g(c,h):r||a?g(c,0):void 0,b,x;h>m;m++)if((s||m in f)&&(b=f[m],x=y(b,m,p),e))if(t)v[m]=x;else if(x)switch(e){case 3:return!0;case 5:return b;case 6:return m;case 2:IR(v,b)}else switch(e){case 4:return!1;case 7:IR(v,b)}return i?-1:n||o?o:v}},$b={forEach:Ri(0),map:Ri(1),filter:Ri(2),some:Ri(3),every:Ri(4),find:Ri(5),findIndex:Ri(6),filterReject:Ri(7)},Vp=Bt,Ol=Sr,Ob=xo,ese=Er,Ps=pn,Ns=ks,tse=_r,Ar=En,rse=Xo,Cb=Ii,Hp=So,Ab=rb,nse=kl,Ib=vl,Ms=Sb,RR=vb,ose=Fp,PR=SR,ise=Bp,NR=gl,MR=Qn,ase=Np,jR=Fv,DR=Up,sse=bae,Rb=Ts,cse=jp,LR=Mp,FR=eb,lse=Cr,use=Tl,dse=rr,fse=TR,pse=Is,qR=Tb,Wp=$b.forEach,hn=cse("hidden"),Kp="Symbol",Cl="prototype",hse=qR.set,BR=qR.getterFor(Kp),eo=Object[Cl],ha=Ol.Symbol,Al=ha&&ha[Cl],mse=Ol.RangeError,yse=Ol.TypeError,Pb=Ol.QObject,UR=NR.f,ma=MR.f,zR=PR.f,gse=jR.f,ZR=ese([].push),ei=Rb("symbols"),Il=Rb("op-symbols"),vse=Rb("wks"),Nb=!Pb||!Pb[Cl]||!Pb[Cl].findChild,VR=function(e,t,r){var n=UR(eo,t);n&&delete eo[t],ma(e,t,r),n&&e!==eo&&ma(eo,t,n)},Mb=Ps&&tse(function(){return Ms(ma({},"a",{get:function(){return ma(this,"a",{value:7}).a}})).a!==7})?VR:ma,jb=function(e,t){var r=ei[e]=Ms(Al);return hse(r,{type:Kp,tag:e,description:t}),Ps||(r.description=t),r},Gp=function(t,r,n){t===eo&&Gp(Il,r,n),Cb(t);var o=Ab(r);return Cb(n),Ar(ei,o)?(n.enumerable?(Ar(t,hn)&&t[hn][o]&&(t[hn][o]=!1),n=Ms(n,{enumerable:Ib(0,!1)})):(Ar(t,hn)||ma(t,hn,Ib(1,Ms(null))),t[hn][o]=!0),Mb(t,o,n)):ma(t,o,n)},Db=function(t,r){Cb(t);var n=Hp(r),o=RR(n).concat(GR(n));return Wp(o,function(i){(!Ps||Ob(HR,n,i))&&Gp(t,i,n[i])}),t},bse=function(t,r){return r===void 0?Ms(t):Db(Ms(t),r)},HR=function(t){var r=Ab(t),n=Ob(gse,this,r);return this===eo&&Ar(ei,r)&&!Ar(Il,r)?!1:n||!Ar(this,r)||!Ar(ei,r)||Ar(this,hn)&&this[hn][r]?n:!0},WR=function(t,r){var n=Hp(t),o=Ab(r);if(!(n===eo&&Ar(ei,o)&&!Ar(Il,o))){var i=UR(n,o);return i&&Ar(ei,o)&&!(Ar(n,hn)&&n[hn][o])&&(i.enumerable=!0),i}},KR=function(t){var r=zR(Hp(t)),n=[];return Wp(r,function(o){!Ar(ei,o)&&!Ar(LR,o)&&ZR(n,o)}),n},GR=function(e){var t=e===eo,r=zR(t?Il:Hp(e)),n=[];return Wp(r,function(o){Ar(ei,o)&&(!t||Ar(eo,o))&&ZR(n,ei[o])}),n};Ns||(ha=function(){if(rse(Al,this))throw new yse("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:nse(arguments[0]),r=FR(t),n=function(o){var i=this===void 0?Ol:this;i===eo&&Ob(n,Il,o),Ar(i,hn)&&Ar(i[hn],r)&&(i[hn][r]=!1);var a=Ib(1,o);try{Mb(i,r,a)}catch(s){if(!(s instanceof mse))throw s;VR(i,r,a)}};return Ps&&Nb&&Mb(eo,r,{configurable:!0,set:n}),jb(r,t)},Al=ha[Cl],DR(Al,"toString",function(){return BR(this).tag}),DR(ha,"withoutSetter",function(e){return jb(FR(e),e)}),jR.f=HR,MR.f=Gp,ase.f=Db,NR.f=WR,ose.f=PR.f=KR,ise.f=GR,use.f=function(e){return jb(lse(e),e)},Ps&&sse(Al,"description",{configurable:!0,get:function(){return BR(this).description}})),Vp({global:!0,constructor:!0,wrap:!0,forced:!Ns,sham:!Ns},{Symbol:ha}),Wp(RR(vse),function(e){dse(e)}),Vp({target:Kp,stat:!0,forced:!Ns},{useSetter:function(){Nb=!0},useSimple:function(){Nb=!1}}),Vp({target:"Object",stat:!0,forced:!Ns,sham:!Ps},{create:bse,defineProperty:Gp,defineProperties:Db,getOwnPropertyDescriptor:WR}),Vp({target:"Object",stat:!0,forced:!Ns},{getOwnPropertyNames:KR}),fse(),pse(ha,Kp),LR[hn]=!0;var wse=ks,JR=wse&&!!Symbol.for&&!!Symbol.keyFor,xse=Bt,Sse=_o,_se=En,Ese=kl,YR=Ts,kse=JR,Lb=YR("string-to-symbol-registry"),Tse=YR("symbol-to-string-registry");xse({target:"Symbol",stat:!0,forced:!kse},{for:function(e){var t=Ese(e);if(_se(Lb,t))return Lb[t];var r=Sse("Symbol")(t);return Lb[t]=r,Tse[r]=t,r}});var $se=Bt,Ose=En,Cse=bl,Ase=Op,Ise=Ts,Rse=JR,XR=Ise("symbol-to-string-registry");$se({target:"Symbol",stat:!0,forced:!Rse},{keyFor:function(t){if(!Cse(t))throw new TypeError(Ase(t)+" is not a symbol");if(Ose(XR,t))return XR[t]}});var Pse=Er,QR=As,Nse=Qr,eP=fa,Mse=kl,tP=Pse([].push),jse=function(e){if(Nse(e))return e;if(QR(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];typeof o=="string"?tP(r,o):(typeof o=="number"||eP(o)==="Number"||eP(o)==="String")&&tP(r,Mse(o))}var i=r.length,a=!0;return function(s,c){if(a)return a=!1,c;if(QR(this))return c;for(var l=0;l<i;l++)if(r[l]===s)return c}}},Dse=Bt,rP=_o,nP=Mv,Lse=xo,Rl=Er,oP=_r,iP=Qr,aP=bl,sP=qp,Fse=jse,qse=ks,Bse=String,Pi=rP("JSON","stringify"),Jp=Rl(/./.exec),cP=Rl("".charAt),Use=Rl("".charCodeAt),zse=Rl("".replace),Zse=Rl(1 .toString),Vse=/[\uD800-\uDFFF]/g,lP=/^[\uD800-\uDBFF]$/,uP=/^[\uDC00-\uDFFF]$/,dP=!qse||oP(function(){var e=rP("Symbol")("stringify detection");return Pi([e])!=="[null]"||Pi({a:e})!=="{}"||Pi(Object(e))!=="{}"}),fP=oP(function(){return Pi("\uDF06\uD834")!=='"\\udf06\\ud834"'||Pi("\uDEAD")!=='"\\udead"'}),Hse=function(e,t){var r=sP(arguments),n=Fse(t);if(!(!iP(n)&&(e===void 0||aP(e))))return r[1]=function(o,i){if(iP(n)&&(i=Lse(n,this,Bse(o),i)),!aP(i))return i},nP(Pi,null,r)},Wse=function(e,t,r){var n=cP(r,t-1),o=cP(r,t+1);return Jp(lP,e)&&!Jp(uP,o)||Jp(uP,e)&&!Jp(lP,n)?"\\u"+Zse(Use(e,0),16):e};Pi&&Dse({target:"JSON",stat:!0,arity:3,forced:dP||fP},{stringify:function(t,r,n){var o=sP(arguments),i=nP(dP?Hse:Pi,null,o);return fP&&typeof i=="string"?zse(i,Vse,Wse):i}});var Kse=Bt,Gse=ks,Jse=_r,pP=Bp,Yse=Qo,Xse=!Gse||Jse(function(){pP.f(1)});Kse({target:"Object",stat:!0,forced:Xse},{getOwnPropertySymbols:function(t){var r=pP.f;return r?r(Yse(t)):[]}});var Qse=rr;Qse("asyncIterator");var ece=rr;ece("hasInstance");var tce=rr;tce("isConcatSpreadable");var rce=rr;rce("iterator");var nce=rr;nce("match");var oce=rr;oce("matchAll");var ice=rr;ice("replace");var ace=rr;ace("search");var sce=rr;sce("species");var cce=rr;cce("split");var lce=rr,uce=TR;lce("toPrimitive"),uce();var dce=_o,fce=rr,pce=Is;fce("toStringTag"),pce(dce("Symbol"),"Symbol");var hce=rr;hce("unscopables");var mce=Sr,yce=Is;yce(mce.JSON,"JSON",!0);var gce=qr,vce=gce.Symbol,js={},Fb=pn,bce=En,hP=Function.prototype,wce=Fb&&Object.getOwnPropertyDescriptor,qb=bce(hP,"name"),xce=qb&&(function(){}).name==="something",Sce=qb&&(!Fb||Fb&&wce(hP,"name").configurable),_ce={EXISTS:qb,PROPER:xce,CONFIGURABLE:Sce},Ece=_r,kce=!Ece(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Tce=En,$ce=Qr,Oce=Qo,Cce=jp,Ace=kce,mP=Cce("IE_PROTO"),Bb=Object,Ice=Bb.prototype,yP=Ace?Bb.getPrototypeOf:function(e){var t=Oce(e);if(Tce(t,mP))return t[mP];var r=t.constructor;return $ce(r)&&t instanceof r?r.prototype:t instanceof Bb?Ice:null},Rce=_r,Pce=Qr,Nce=Yo,Mce=Sb,gP=yP,jce=Up,Dce=Cr,Ub=Dce("iterator"),vP=!1,ti,zb,Zb;[].keys&&(Zb=[].keys(),"next"in Zb?(zb=gP(gP(Zb)),zb!==Object.prototype&&(ti=zb)):vP=!0);var Lce=!Nce(ti)||Rce(function(){var e={};return ti[Ub].call(e)!==e});Lce?ti={}:ti=Mce(ti),Pce(ti[Ub])||jce(ti,Ub,function(){return this});var bP={IteratorPrototype:ti,BUGGY_SAFARI_ITERATORS:vP},Fce=bP.IteratorPrototype,qce=Sb,Bce=vl,Uce=Is,zce=js,Zce=function(){return this},Vce=function(e,t,r,n){var o=t+" Iterator";return e.prototype=qce(Fce,{next:Bce(+!n,r)}),Uce(e,o,!1,!0),zce[o]=Zce,e},Hce=Bt,Wce=xo,wP=_ce,Kce=Vce,Gce=yP,Jce=Is,xP=Up,Yce=Cr,SP=js,_P=bP,Xce=wP.PROPER;wP.CONFIGURABLE,_P.IteratorPrototype;var Yp=_P.BUGGY_SAFARI_ITERATORS,Vb=Yce("iterator"),EP="keys",Xp="values",kP="entries",Qce=function(){return this},TP=function(e,t,r,n,o,i,a){Kce(r,t,n);var s=function(g){if(g===o&&p)return p;if(!Yp&&g&&g in u)return u[g];switch(g){case EP:return function(){return new r(this,g)};case Xp:return function(){return new r(this,g)};case kP:return function(){return new r(this,g)}}return function(){return new r(this)}},c=t+" Iterator",l=!1,u=e.prototype,d=u[Vb]||u["@@iterator"]||o&&u[o],p=!Yp&&d||s(o),f=t==="Array"&&u.entries||d,h,y,m;if(f&&(h=Gce(f.call(new e)),h!==Object.prototype&&h.next&&(Jce(h,c,!0,!0),SP[c]=Qce)),Xce&&o===Xp&&d&&d.name!==Xp&&(l=!0,p=function(){return Wce(d,this)}),o)if(y={values:s(Xp),keys:i?p:s(EP),entries:s(kP)},a)for(m in y)(Yp||l||!(m in u))&&xP(u,m,y[m]);else Hce({target:t,proto:!0,forced:Yp||l},y);return a&&u[Vb]!==p&&xP(u,Vb,p,{name:o}),SP[t]=p,y},$P=function(e,t){return{value:e,done:t}},ele=So,OP=js,CP=Tb;Qn.f;var tle=TP,Qp=$P,AP="Array Iterator",rle=CP.set,nle=CP.getterFor(AP);tle(Array,"Array",function(e,t){rle(this,{type:AP,target:ele(e),index:0,kind:t})},function(){var e=nle(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Qp(void 0,!0);switch(e.kind){case"keys":return Qp(r,!1);case"values":return Qp(t[r],!1)}return Qp([r,t[r]],!1)},"values"),OP.Arguments=OP.Array;var ole={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},ile=ole,ale=Sr,sle=Is,IP=js;for(var Hb in ile)sle(ale[Hb],Hb),IP[Hb]=IP.Array;var cle=vce,lle=cle,ule=Cr,dle=Qn.f,RP=ule("metadata"),PP=Function.prototype;PP[RP]===void 0&&dle(PP,RP,{value:null});var fle=rr;fle("asyncDispose");var ple=rr;ple("dispose");var hle=rr;hle("metadata");var mle=lle,yle=mle,gle=_o,vle=Er,Wb=gle("Symbol"),ble=Wb.keyFor,wle=vle(Wb.prototype.valueOf),NP=Wb.isRegisteredSymbol||function(t){try{return ble(wle(t))!==void 0}catch{return!1}},xle=Bt,Sle=NP;xle({target:"Symbol",stat:!0},{isRegisteredSymbol:Sle});for(var _le=Ts,MP=_o,Ele=Er,kle=bl,Tle=Cr,eh=MP("Symbol"),jP=eh.isWellKnownSymbol,DP=MP("Object","getOwnPropertyNames"),$le=Ele(eh.prototype.valueOf),LP=_le("wks"),Kb=0,FP=DP(eh),Ole=FP.length;Kb<Ole;Kb++)try{var qP=FP[Kb];kle(eh[qP])&&Tle(qP)}catch{}var BP=function(t){if(jP&&jP(t))return!0;try{for(var r=$le(t),n=0,o=DP(LP),i=o.length;n<i;n++)if(LP[o[n]]==r)return!0}catch{}return!1},Cle=Bt,Ale=BP;Cle({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Ale});var Ile=rr;Ile("customMatcher");var Rle=rr;Rle("observable");var Ple=Bt,Nle=NP;Ple({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Nle});var Mle=Bt,jle=BP;Mle({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:jle});var Dle=rr;Dle("matcher");var Lle=rr;Lle("metadataKey");var Fle=rr;Fle("patternMatch");var qle=rr;qle("replaceAll");var Ble=yle,Ule=Ble,zle=Ule;const Ds=St(zle);var Gb=Er,Zle=Ip,Vle=kl,Hle=Uv,Wle=Gb("".charAt),UP=Gb("".charCodeAt),Kle=Gb("".slice),zP=function(e){return function(t,r){var n=Vle(Hle(t)),o=Zle(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=UP(n,o),a<55296||a>56319||o+1===i||(s=UP(n,o+1))<56320||s>57343?e?Wle(n,o):a:e?Kle(n,o,o+2):(a-55296<<10)+(s-56320)+65536)}},Gle={codeAt:zP(!1),charAt:zP(!0)},Jle=Gle.charAt,Yle=kl,ZP=Tb,Xle=TP,VP=$P,HP="String Iterator",Qle=ZP.set,eue=ZP.getterFor(HP);Xle(String,"String",function(e){Qle(this,{type:HP,string:Yle(e),index:0})},function(){var t=eue(this),r=t.string,n=t.index,o;return n>=r.length?VP(void 0,!0):(o=Jle(r,n),t.index+=o.length,VP(o,!1))});var tue=_l,WP=Gv,rue=Bv,nue=js,oue=Cr,iue=oue("iterator"),Jb=function(e){if(!rue(e))return WP(e,iue)||WP(e,"@@iterator")||nue[tue(e)]},aue=Jb,sue=aue,cue=sue,lue=cue,uue=lue,due=uue,fue=due,pue=fue,hue=pue;const KP=St(hue);var mue=pn,yue=As,gue=TypeError,vue=Object.getOwnPropertyDescriptor,bue=mue&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),GP=bue?function(e,t){if(yue(e)&&!vue(e,"length").writable)throw new gue("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wue=Bt,xue=Qo,Sue=pa,_ue=GP,Eue=lb,kue=_r,Tue=kue(function(){return[].push.call({length:4294967296},1)!==4294967297}),$ue=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Oue=Tue||!$ue();wue({target:"Array",proto:!0,arity:1,forced:Oue},{push:function(t){var r=xue(this),n=Sue(r),o=arguments.length;Eue(n+o);for(var i=0;i<o;i++)r[n]=arguments[i],n++;return _ue(r,n),n}});var Cue=Sr,Aue=qr,ya=function(e,t){var r=Aue[e+"Prototype"],n=r&&r[t];if(n)return n;var o=Cue[e],i=o&&o.prototype;return i&&i[t]},Iue=ya,Rue=Iue("Array","push"),Pue=Xo,Nue=Rue,Yb=Array.prototype,Mue=function(e){var t=e.push;return e===Yb||Pue(Yb,e)&&t===Yb.push?Nue:t},jue=Mue,Due=jue,Lue=Due,Fue=Lue,que=Fue,Bue=que,Uue=Bue;const zue=St(Uue);function Zue(e,t){var r=e==null?null:typeof Ds<"u"&&KP(e)||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(zue(s).call(s,n.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var Vue=Bt,JP=As,Hue=pb,Wue=Yo,YP=mb,Kue=pa,Gue=So,Jue=Sl,Yue=Cr,Xue=Pp,Que=qp,ede=Xue("slice"),tde=Yue("species"),Xb=Array,rde=Math.max;Vue({target:"Array",proto:!0,forced:!ede},{slice:function(t,r){var n=Gue(this),o=Kue(n),i=YP(t,o),a=YP(r===void 0?o:r,o),s,c,l;if(JP(n)&&(s=n.constructor,Hue(s)&&(s===Xb||JP(s.prototype))?s=void 0:Wue(s)&&(s=s[tde],s===null&&(s=void 0)),s===Xb||s===void 0))return Que(n,i,a);for(c=new(s===void 0?Xb:s)(rde(a-i,0)),l=0;i<a;i++,l++)i in n&&Jue(c,l,n[i]);return c.length=l,c}});var nde=ya,ode=nde("Array","slice"),ide=Xo,ade=ode,Qb=Array.prototype,sde=function(e){var t=e.slice;return e===Qb||ide(Qb,e)&&t===Qb.slice?ade:t},cde=sde,lde=cde,ude=lde,dde=ude,fde=dde,pde=fde,hde=pde;const mde=St(hde);var yde=xo,XP=Ii,gde=Gv,vde=function(e,t,r){var n,o;XP(e);try{if(n=gde(e,"return"),!n){if(t==="throw")throw r;return r}n=yde(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return XP(n),r},bde=Ii,wde=vde,xde=function(e,t,r,n){try{return n?t(bde(r)[0],r[1]):t(r)}catch(o){wde(e,"throw",o)}},Sde=Cr,_de=js,Ede=Sde("iterator"),kde=Array.prototype,Tde=function(e){return e!==void 0&&(_de.Array===e||kde[Ede]===e)},$de=xo,Ode=Kv,Cde=Ii,Ade=Op,Ide=Jb,Rde=TypeError,Pde=function(e,t){var r=arguments.length<2?Ide(e):t;if(Ode(r))return Cde($de(r,e));throw new Rde(Ade(e)+" is not iterable")},Nde=ob,Mde=xo,jde=Qo,Dde=xde,Lde=Tde,Fde=pb,qde=pa,QP=Sl,Bde=Pde,Ude=Jb,eN=Array,zde=function(t){var r=jde(t),n=Fde(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Nde(i,o>2?arguments[2]:void 0));var s=Ude(r),c=0,l,u,d,p,f,h;if(s&&!(this===eN&&Lde(s)))for(u=n?new this:[],p=Bde(r,s),f=p.next;!(d=Mde(f,p)).done;c++)h=a?Dde(p,i,[d.value,c],!0):d.value,QP(u,c,h);else for(l=qde(r),u=n?new this(l):eN(l);l>c;c++)h=a?i(r[c],c):r[c],QP(u,c,h);return u.length=c,u},Zde=Cr,tN=Zde("iterator"),rN=!1;try{var Vde=0,nN={next:function(){return{done:!!Vde++}},return:function(){rN=!0}};nN[tN]=function(){return this},Array.from(nN,function(){throw 2})}catch{}var Hde=function(e,t){try{if(!t&&!rN)return!1}catch{return!1}var r=!1;try{var n={};n[tN]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Wde=Bt,Kde=zde,Gde=Hde,Jde=!Gde(function(e){Array.from(e)});Wde({target:"Array",stat:!0,forced:Jde},{from:Kde});var Yde=qr,Xde=Yde.Array.from,Qde=Xde,efe=Qde,tfe=efe,rfe=tfe,nfe=rfe,ofe=nfe,ife=ofe;const oN=St(ife);function ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function iN(e,t){if(e){var r;if(typeof e=="string")return ew(e,t);var n=mde(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?oN(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ew(e,t):void 0}}function afe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
400
+ `)},Ete=0,_s=[];function kte(e){var t=N.useRef([]),r=N.useRef([0,0]),n=N.useRef(),o=N.useState(Ete++)[0],i=N.useState(function(){return YA()})[0],a=N.useRef(e);N.useEffect(function(){a.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=Wee([e.lockRef.current],(e.shards||[]).map(nI),!0).filter(Boolean);return y.forEach(function(m){return m.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),y.forEach(function(m){return m.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var g=Sp(y),v=r.current,b="deltaX"in y?y.deltaX:v[0]-g[0],x="deltaY"in y?y.deltaY:v[1]-g[1],w,S=y.target,C=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&C==="h"&&S.type==="range")return!1;var I=QA(C,S);if(!I)return!0;if(I?w=C:(w=C==="v"?"h":"v",I=QA(C,S)),!I)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=w),!w)return!0;var P=n.current||w;return xte(P,m,y,P==="h"?b:x,!0)},[]),c=N.useCallback(function(y){var m=y;if(!(!_s.length||_s[_s.length-1]!==i)){var g="deltaY"in m?rI(m):Sp(m),v=t.current.filter(function(w){return w.name===m.type&&w.target===m.target&&Ste(w.delta,g)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var b=(a.current.shards||[]).map(nI).filter(Boolean).filter(function(w){return w.contains(m.target)}),x=b.length>0?s(m,b[0]):!a.current.noIsolation;x&&m.cancelable&&m.preventDefault()}}},[]),l=N.useCallback(function(y,m,g,v){var b={name:y,delta:m,target:g,should:v};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(x){return x!==b})},1)},[]),u=N.useCallback(function(y){r.current=Sp(y),n.current=void 0},[]),d=N.useCallback(function(y){l(y.type,rI(y),y.target,s(y,e.lockRef.current))},[]),p=N.useCallback(function(y){l(y.type,Sp(y),y.target,s(y,e.lockRef.current))},[]);N.useEffect(function(){return _s.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Ss),document.addEventListener("touchmove",c,Ss),document.addEventListener("touchstart",u,Ss),function(){_s=_s.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Ss),document.removeEventListener("touchmove",c,Ss),document.removeEventListener("touchstart",u,Ss)}},[]);var f=e.removeScrollBar,h=e.inert;return N.createElement(N.Fragment,null,h?N.createElement(i,{styles:_te(o)}):null,f?N.createElement(hte,{gapMode:"margin"}):null)}const Tte=rte(GA,kte);var oI=N.forwardRef(function(e,t){return N.createElement(wp,wo({},e,{ref:t,sideCar:Tte}))});oI.classNames=wp.classNames;const $te=oI;var Ote=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Es=new WeakMap,_p=new WeakMap,Ep={},Cv=0,iI=function(e){return e&&(e.host||iI(e.parentNode))},Cte=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=iI(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Ate=function(e,t,r,n){var o=Cte(t,Array.isArray(e)?e:[e]);Ep[r]||(Ep[r]=new WeakMap);var i=Ep[r],a=[],s=new Set,c=new Set(o),l=function(d){!d||s.has(d)||(s.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var f=p.getAttribute(n),h=f!==null&&f!=="false",y=(Es.get(p)||0)+1,m=(i.get(p)||0)+1;Es.set(p,y),i.set(p,m),a.push(p),y===1&&h&&_p.set(p,!0),m===1&&p.setAttribute(r,"true"),h||p.setAttribute(n,"true")}})};return u(t),s.clear(),Cv++,function(){a.forEach(function(d){var p=Es.get(d)-1,f=i.get(d)-1;Es.set(d,p),i.set(d,f),p||(_p.has(d)||d.removeAttribute(n),_p.delete(d)),f||d.removeAttribute(r)}),Cv--,Cv||(Es=new WeakMap,Es=new WeakMap,_p=new WeakMap,Ep={})}},Ite=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||Ote(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),Ate(n,o,r,"aria-hidden")):function(){return null}};const aI="Dialog",[sI,ASe]=Vm(aI),[Rte,Jo]=sI(aI),Pte=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=$.useRef(null),c=$.useRef(null),[l=!1,u]=DA({prop:n,defaultProp:o,onChange:i});return $.createElement(Rte,{scope:t,triggerRef:s,contentRef:c,contentId:mp(),titleId:mp(),descriptionId:mp(),open:l,onOpenChange:u,onOpenToggle:$.useCallback(()=>u(d=>!d),[u]),modal:a},r)},Nte="DialogTrigger",Mte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Nte,r),i=Zi(t,o.triggerRef);return $.createElement(In.button,vr({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Iv(o.open)},n,{ref:i,onClick:Go(e.onClick,o.onOpenToggle)}))}),jte="DialogPortal",[ISe,cI]=sI(jte,{forceMount:void 0}),Av="DialogOverlay",Dte=$.forwardRef((e,t)=>{const r=cI(Av,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Jo(Av,e.__scopeDialog);return i.modal?$.createElement(yp,{present:n||i.open},$.createElement(Lte,vr({},o,{ref:t}))):null}),Lte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Av,r);return $.createElement($te,{as:Hm,allowPinchZoom:!0,shards:[o.contentRef]},$.createElement(In.div,vr({"data-state":Iv(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),hl="DialogContent",Fte=$.forwardRef((e,t)=>{const r=cI(hl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Jo(hl,e.__scopeDialog);return $.createElement(yp,{present:n||i.open},i.modal?$.createElement(qte,vr({},o,{ref:t})):$.createElement(Bte,vr({},o,{ref:t})))}),qte=$.forwardRef((e,t)=>{const r=Jo(hl,e.__scopeDialog),n=$.useRef(null),o=Zi(t,r.contentRef,n);return $.useEffect(()=>{const i=n.current;if(i)return Ite(i)},[]),$.createElement(lI,vr({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Go(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Go(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Go(e.onFocusOutside,i=>i.preventDefault())}))}),Bte=$.forwardRef((e,t)=>{const r=Jo(hl,e.__scopeDialog),n=$.useRef(!1),o=$.useRef(!1);return $.createElement(lI,vr({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a;if((a=e.onCloseAutoFocus)===null||a===void 0||a.call(e,i),!i.defaultPrevented){var s;n.current||(s=r.triggerRef.current)===null||s===void 0||s.focus(),i.preventDefault()}n.current=!1,o.current=!1},onInteractOutside:i=>{var a,s;(a=e.onInteractOutside)===null||a===void 0||a.call(e,i),i.defaultPrevented||(n.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=i.target;((s=r.triggerRef.current)===null||s===void 0?void 0:s.contains(c))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}}))}),lI=$.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Jo(hl,r),c=$.useRef(null),l=Zi(t,c);return Hee(),$.createElement($.Fragment,null,$.createElement(Dee,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},$.createElement(Nee,vr({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Iv(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),Ute="DialogTitle",zte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Ute,r);return $.createElement(In.h2,vr({id:o.titleId},n,{ref:t}))}),Zte="DialogClose",Vte=$.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Jo(Zte,r);return $.createElement(In.button,vr({type:"button"},n,{ref:t,onClick:Go(e.onClick,()=>o.onOpenChange(!1))}))});function Iv(e){return e?"open":"closed"}const Hte=Pte,Wte=Mte,Kte=Dte,Gte=Fte,Jte=zte,uI=Vte;function Yte({title:e,titleId:t,...r},n){return N.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?N.createElement("title",{id:t},e):null,N.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const dI=N.forwardRef(Yte);function Ai({open:e,onOpenChange:t,children:r}){return J.jsx(Hte,{open:e,onOpenChange:t,children:r})}function Xte({title:e,children:t}){var n,o,i,a,s,c,l,u;const{modal:r}=Ht;return J.jsxs(J.Fragment,{children:[J.jsx(Kte,{...r==null?void 0:r.overlay}),J.jsx("div",{...r==null?void 0:r.container,children:J.jsxs(Gte,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[J.jsxs("div",{...(i=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[J.jsx(Jte,{...(s=(a=r==null?void 0:r.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),J.jsx(uI,{children:J.jsx(dI,{role:"button",tabIndex:0,...(l=(c=r==null?void 0:r.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),J.jsx("div",{...(u=r==null?void 0:r.dialog)==null?void 0:u.content,children:t})]})})]})}Ai.Button=Wte,Ai.Close=uI,Ai.Content=Xte;const fI=$.forwardRef(({children:e,...t},r)=>{const{container:n}=Ht;return J.jsxs("div",{...t,...n,ref:r,children:[J.jsx(iY,{}),J.jsxs(jA,{children:[J.jsx(Qte,{}),e]})]})}),Qte=()=>{const{modal:e}=Ht,t=ft(n=>n.connected),{showModal:r}=IC();return $.useEffect(()=>{var n,o,i,a;t||r({title:"Connection Error",content:J.jsxs(J.Fragment,{children:[J.jsx("p",{...(o=(n=e==null?void 0:e.dialog)==null?void 0:n.newConversation)==null?void 0:o.text,children:"There was an error connecting to the server. Please check your internet connection and try again."}),J.jsx(Ai.Close,{asChild:!0,children:J.jsx("button",{type:"button",...(a=(i=e==null?void 0:e.dialog)==null?void 0:i.newConversation)==null?void 0:a.button,onClick:()=>window.location.reload(),children:"Restart"})})]})})},[t]),J.jsx(J.Fragment,{})},ere=$.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:o}=Ht,{container:i,icon:a}=o??{};return J.jsx("div",{...r,...i,ref:n,onClick:t,children:J.jsx("div",{...a})})}),pI="Collapsible",[tre,PSe]=Vm(pI),[rre,Rv]=tre(pI),nre=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=DA({prop:n,defaultProp:o,onChange:a});return $.createElement(rre,{scope:r,disabled:i,contentId:mp(),open:c,onOpenToggle:$.useCallback(()=>l(u=>!u),[l])},$.createElement(In.div,vr({"data-state":Pv(c),"data-disabled":i?"":void 0},s,{ref:t})))}),ore="CollapsibleTrigger",ire=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Rv(ore,r);return $.createElement(In.button,vr({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Pv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:Go(e.onClick,o.onOpenToggle)}))}),hI="CollapsibleContent",are=$.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Rv(hI,e.__scopeCollapsible);return $.createElement(yp,{present:r||o.open},({present:i})=>$.createElement(sre,vr({},n,{ref:t,present:i})))}),sre=$.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=Rv(hI,r),[s,c]=$.useState(n),l=$.useRef(null),u=Zi(t,l),d=$.useRef(0),p=d.current,f=$.useRef(0),h=f.current,y=a.open||s,m=$.useRef(y),g=$.useRef();return $.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),yc(()=>{const v=l.current;if(v){g.current=g.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();d.current=b.height,f.current=b.width,m.current||(v.style.transitionDuration=g.current.transitionDuration,v.style.animationName=g.current.animationName),c(n)}},[a.open,n]),$.createElement(In.div,vr({"data-state":Pv(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!y},i,{ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style}}),y&&o)});function Pv(e){return e?"open":"closed"}const cre=nre,lre=are,ure=e=>N.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},N.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",d:"M15.5 5.5v-5m0 0h-5m5 0L8.833 7.167m-2.5-5H4.5c-1.4 0-2.1 0-2.635.272A2.5 2.5 0 0 0 .772 3.532C.5 4.066.5 4.767.5 6.167V11.5c0 1.4 0 2.1.272 2.635a2.5 2.5 0 0 0 1.093 1.092C2.4 15.5 3.1 15.5 4.5 15.5h5.333c1.4 0 2.1 0 2.635-.273a2.5 2.5 0 0 0 1.093-1.092c.272-.535.272-1.235.272-2.635V9.667"})),mI=({...e})=>{var a,s;const{header:t,modal:r}=Ht,n=ft(c=>c.restartConversation),{showModal:o}=IC(),i=c=>{var l,u,d,p;c.stopPropagation(),o({title:"Restart Conversation",content:J.jsxs(J.Fragment,{children:[J.jsx("p",{...(u=(l=r==null?void 0:r.dialog)==null?void 0:l.newConversation)==null?void 0:u.text,children:"Are you sure you want to restart a new conversation?"}),J.jsx(Ai.Close,{asChild:!0,children:J.jsx("button",{type:"button",...(p=(d=r==null?void 0:r.dialog)==null?void 0:d.newConversation)==null?void 0:p.button,onClick:n,children:"Restart"})})]})})};return J.jsx(zY,{...e,...(s=(a=t==null?void 0:t.content)==null?void 0:a.actions)==null?void 0:s.icons,role:"button",tabIndex:0,onClick:i,onKeyDown:c=>{c.key==="Enter"&&i(c)}})},dre=({...e})=>{const{header:t}=Ht,r=ft(o=>o.closeWindow),n=o=>{o.stopPropagation(),r==null||r()};return J.jsx(dI,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{o.key==="Enter"&&n(o)}})},ml=({icon:e,title:t,link:r,...n})=>{var a,s,c,l,u,d,p,f,h,y,m,g;const{header:o}=Ht,i=e??ure;return t?r?J.jsxs("a",{...n,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:r,target:"_blank",rel:"noreferrer noopener",children:[J.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),J.jsx("p",{...(d=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:d.link,children:t})]}):J.jsxs("div",{...n,...(f=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:f.container,children:[J.jsx(i,{...(y=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.icon}),J.jsx("p",{...(g=(m=o.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:g.text,children:t})]}):null},yI=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var p,f,h,y,m,g,v,b,x,w,S,C,I,P,A,L,K,z,B,F,j,Z;const{header:o}=Ht,i=ft(W=>W.configuration),a=ft(W=>W.closeWindow),s=ft(W=>W.getClientId)(),c=ft(W=>!W.disableRestartConversation),[l,u]=$.useState(!!e),d=!!((p=i.email)!=null&&p.title)||!!((f=i.phone)!=null&&f.title)||!!((h=i.website)!=null&&h.title)||!!((y=i.termsOfService)!=null&&y.link)||!!((m=i.privacyPolicy)!=null&&m.link);return J.jsxs(cre,{open:d?l:!1,onOpenChange:u,"data-disabled":d?void 0:"",...o.container,...n,children:[J.jsxs(ire,{...o.content.container,children:[J.jsx(ry,{...n,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),J.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&J.jsx("p",{...o.content.description,children:i.botDescription}),J.jsxs("div",{...o.content.actions.container,children:[c&&J.jsx(mI,{}),a&&J.jsx(dre,{})]})]}),J.jsxs(lre,{...o.expandedContent.container,children:[J.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[J.jsx(ml,{"data-email":"",icon:DX,title:(g=i.email)==null?void 0:g.title,link:(b=(v=i.email)==null?void 0:v.link)!=null&&b.startsWith("mailto:")?(x=i.email)==null?void 0:x.link:`mailto:${(w=i.email)==null?void 0:w.link}`}),J.jsx(ml,{"data-phone":"",icon:zX,title:(S=i.phone)==null?void 0:S.title,link:(I=(C=i.phone)==null?void 0:C.link)!=null&&I.startsWith("tel:")?(P=i.phone)==null?void 0:P.link:`tel:${(A=i.phone)==null?void 0:A.link}`}),J.jsx(ml,{"data-website":"",link:(L=i.website)==null?void 0:L.link,icon:FX,title:(K=i.website)==null?void 0:K.title})]}),J.jsxs("div",{"data-legal":"",...(z=o.expandedContent)==null?void 0:z.group,children:[J.jsx(ml,{"data-terms":"",link:(B=i.termsOfService)==null?void 0:B.link,icon:MX,title:(F=i.termsOfService)==null?void 0:F.title}),J.jsx(ml,{"data-privacy":"",link:(j=i.privacyPolicy)==null?void 0:j.link,icon:BX,title:(Z=i.privacyPolicy)==null?void 0:Z.title})]})]})]})},gI=$.memo(({...e})=>{const{typingIndicator:t}=Ht;return J.jsx("div",{...e,...t==null?void 0:t.container,children:J.jsx("div",{...t==null?void 0:t.loader})})}),Nv=$.memo($.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:o,sender:i,...a},s)=>{var y,m,g,v;const[c,l]=$.useState([]),{message:u}=Ht,{botAvatar:d,botName:p}=ft(b=>b.configuration),f=ft(b=>b.getClientId)(),h=jE(f??"",15);return J.jsx(CC.Provider,{value:{isLoading:c,setIsLoading:l},children:J.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:s,children:[J.jsxs(kE,{"data-color":h,...(y=u==null?void 0:u.avatar)==null?void 0:y.container,children:[J.jsx(TE,{...(m=u==null?void 0:u.avatar)==null?void 0:m.image,src:(i==null?void 0:i.avatar)??d}),J.jsx($E,{...(g=u==null?void 0:u.avatar)==null?void 0:g.fallback,children:(i==null?void 0:i.name[0])??((v=p??"Bot")==null?void 0:v[0])})]}),t&&J.jsx(xs,{block:t}),o]})})}));function fre(){const e=ft(n=>n.getClientId)(),t=ft(n=>n.configuration),{messageList:{marquee:r}}=Ht;return J.jsxs("li",{...r.container,children:[J.jsx(ry,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),J.jsxs("div",{...r.content,children:[J.jsx("h1",{...r.title,children:t.botName||"Bot"}),J.jsx("p",{...r.description,children:t.botDescription})]})]})}function pre(e,t){try{var r=global,n=r.document;if(typeof n<"u"&&n.createElement&&n.head&&n.head.appendChild){var o=n.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||n.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),n.head.appendChild(o)}}catch{}}function hre(){pre("react-scroll-to-bottom:version","4.2.0")}var yl=function(e){return e&&e.Math===Math&&e},Sr=yl(typeof globalThis=="object"&&globalThis)||yl(typeof window=="object"&&window)||yl(typeof self=="object"&&self)||yl(typeof We=="object"&&We)||yl(typeof We=="object"&&We)||function(){return this}()||Function("return this")(),_r=function(e){try{return!!e()}catch{return!0}},mre=_r,kp=!mre(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),yre=kp,vI=Function.prototype,bI=vI.apply,wI=vI.call,Mv=typeof Reflect=="object"&&Reflect.apply||(yre?wI.bind(bI):function(){return wI.apply(bI,arguments)}),xI=kp,SI=Function.prototype,jv=SI.call,gre=xI&&SI.bind.bind(jv,jv),Er=xI?gre:function(e){return function(){return jv.apply(e,arguments)}},_I=Er,vre=_I({}.toString),bre=_I("".slice),fa=function(e){return bre(vre(e),8,-1)},wre=fa,xre=Er,Dv=function(e){if(wre(e)==="Function")return xre(e)},Lv=typeof document=="object"&&document.all,Qr=typeof Lv>"u"&&Lv!==void 0?function(e){return typeof e=="function"||e===Lv}:function(e){return typeof e=="function"},gl={},Sre=_r,pn=!Sre(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),_re=kp,Tp=Function.prototype.call,xo=_re?Tp.bind(Tp):function(){return Tp.apply(Tp,arguments)},Fv={},EI={}.propertyIsEnumerable,kI=Object.getOwnPropertyDescriptor,Ere=kI&&!EI.call({1:2},1);Fv.f=Ere?function(t){var r=kI(this,t);return!!r&&r.enumerable}:EI;var vl=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},kre=Er,Tre=_r,$re=fa,qv=Object,Ore=kre("".split),TI=Tre(function(){return!qv("z").propertyIsEnumerable(0)})?function(e){return $re(e)==="String"?Ore(e,""):qv(e)}:qv,Bv=function(e){return e==null},Cre=Bv,Are=TypeError,Uv=function(e){if(Cre(e))throw new Are("Can't call method on "+e);return e},Ire=TI,Rre=Uv,So=function(e){return Ire(Rre(e))},Pre=Qr,Yo=function(e){return typeof e=="object"?e!==null:Pre(e)},qr={},zv=qr,Zv=Sr,Nre=Qr,$I=function(e){return Nre(e)?e:void 0},_o=function(e,t){return arguments.length<2?$I(zv[e])||$I(Zv[e]):zv[e]&&zv[e][t]||Zv[e]&&Zv[e][t]},Mre=Er,Xo=Mre({}.isPrototypeOf),jre=Sr,OI=jre.navigator,CI=OI&&OI.userAgent,Vv=CI?String(CI):"",AI=Sr,Hv=Vv,II=AI.process,RI=AI.Deno,PI=II&&II.versions||RI&&RI.version,NI=PI&&PI.v8,Xn,$p;NI&&(Xn=NI.split("."),$p=Xn[0]>0&&Xn[0]<4?1:+(Xn[0]+Xn[1])),!$p&&Hv&&(Xn=Hv.match(/Edge\/(\d+)/),(!Xn||Xn[1]>=74)&&(Xn=Hv.match(/Chrome\/(\d+)/),Xn&&($p=+Xn[1])));var Wv=$p,MI=Wv,Dre=_r,Lre=Sr,Fre=Lre.String,ks=!!Object.getOwnPropertySymbols&&!Dre(function(){var e=Symbol("symbol detection");return!Fre(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&MI&&MI<41}),qre=ks,jI=qre&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Bre=_o,Ure=Qr,zre=Xo,Zre=jI,Vre=Object,bl=Zre?function(e){return typeof e=="symbol"}:function(e){var t=Bre("Symbol");return Ure(t)&&zre(t.prototype,Vre(e))},Hre=String,Op=function(e){try{return Hre(e)}catch{return"Object"}},Wre=Qr,Kre=Op,Gre=TypeError,Kv=function(e){if(Wre(e))return e;throw new Gre(Kre(e)+" is not a function")},Jre=Kv,Yre=Bv,Gv=function(e,t){var r=e[t];return Yre(r)?void 0:Jre(r)},Jv=xo,Yv=Qr,Xv=Yo,Xre=TypeError,Qre=function(e,t){var r,n;if(t==="string"&&Yv(r=e.toString)&&!Xv(n=Jv(r,e))||Yv(r=e.valueOf)&&!Xv(n=Jv(r,e))||t!=="string"&&Yv(r=e.toString)&&!Xv(n=Jv(r,e)))return n;throw new Xre("Can't convert object to primitive value")},DI={exports:{}},LI=Sr,ene=Object.defineProperty,tne=function(e,t){try{ene(LI,e,{value:t,configurable:!0,writable:!0})}catch{LI[e]=t}return t},rne=Sr,nne=tne,FI="__core-js_shared__",qI=DI.exports=rne[FI]||nne(FI,{});(qI.versions||(qI.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 Qv=DI.exports,BI=Qv,Ts=function(e,t){return BI[e]||(BI[e]=t||{})},one=Uv,ine=Object,Qo=function(e){return ine(one(e))},ane=Er,sne=Qo,cne=ane({}.hasOwnProperty),En=Object.hasOwn||function(t,r){return cne(sne(t),r)},lne=Er,une=0,dne=Math.random(),fne=lne(1 .toString),eb=function(e){return"Symbol("+(e===void 0?"":e)+")_"+fne(++une+dne,36)},pne=Sr,hne=Ts,UI=En,mne=eb,yne=ks,gne=jI,$s=pne.Symbol,tb=hne("wks"),vne=gne?$s.for||$s:$s&&$s.withoutSetter||mne,Cr=function(e){return UI(tb,e)||(tb[e]=yne&&UI($s,e)?$s[e]:vne("Symbol."+e)),tb[e]},bne=xo,zI=Yo,ZI=bl,wne=Gv,xne=Qre,Sne=Cr,_ne=TypeError,Ene=Sne("toPrimitive"),kne=function(e,t){if(!zI(e)||ZI(e))return e;var r=wne(e,Ene),n;if(r){if(t===void 0&&(t="default"),n=bne(r,e,t),!zI(n)||ZI(n))return n;throw new _ne("Can't convert object to primitive value")}return t===void 0&&(t="number"),xne(e,t)},Tne=kne,$ne=bl,rb=function(e){var t=Tne(e,"string");return $ne(t)?t:t+""},One=Sr,VI=Yo,nb=One.document,Cne=VI(nb)&&VI(nb.createElement),HI=function(e){return Cne?nb.createElement(e):{}},Ane=pn,Ine=_r,Rne=HI,WI=!Ane&&!Ine(function(){return Object.defineProperty(Rne("div"),"a",{get:function(){return 7}}).a!==7}),Pne=pn,Nne=xo,Mne=Fv,jne=vl,Dne=So,Lne=rb,Fne=En,qne=WI,KI=Object.getOwnPropertyDescriptor;gl.f=Pne?KI:function(t,r){if(t=Dne(t),r=Lne(r),qne)try{return KI(t,r)}catch{}if(Fne(t,r))return jne(!Nne(Mne.f,t,r),t[r])};var Bne=_r,Une=Qr,zne=/#|\.prototype\./,wl=function(e,t){var r=Vne[Zne(e)];return r===Wne?!0:r===Hne?!1:Une(t)?Bne(t):!!t},Zne=wl.normalize=function(e){return String(e).replace(zne,".").toLowerCase()},Vne=wl.data={},Hne=wl.NATIVE="N",Wne=wl.POLYFILL="P",Kne=wl,GI=Dv,Gne=Kv,Jne=kp,Yne=GI(GI.bind),ob=function(e,t){return Gne(e),t===void 0?e:Jne?Yne(e,t):function(){return e.apply(t,arguments)}},Qn={},Xne=pn,Qne=_r,JI=Xne&&Qne(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),eoe=Yo,toe=String,roe=TypeError,Ii=function(e){if(eoe(e))return e;throw new roe(toe(e)+" is not an object")},noe=pn,ooe=WI,ioe=JI,Cp=Ii,YI=rb,aoe=TypeError,ib=Object.defineProperty,soe=Object.getOwnPropertyDescriptor,ab="enumerable",sb="configurable",cb="writable";Qn.f=noe?ioe?function(t,r,n){if(Cp(t),r=YI(r),Cp(n),typeof t=="function"&&r==="prototype"&&"value"in n&&cb in n&&!n[cb]){var o=soe(t,r);o&&o[cb]&&(t[r]=n.value,n={configurable:sb in n?n[sb]:o[sb],enumerable:ab in n?n[ab]:o[ab],writable:!1})}return ib(t,r,n)}:ib:function(t,r,n){if(Cp(t),r=YI(r),Cp(n),ooe)try{return ib(t,r,n)}catch{}if("get"in n||"set"in n)throw new aoe("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var coe=pn,loe=Qn,uoe=vl,Ap=coe?function(e,t,r){return loe.f(e,t,uoe(1,r))}:function(e,t,r){return e[t]=r,e},xl=Sr,doe=Mv,foe=Dv,poe=Qr,hoe=gl.f,moe=Kne,Os=qr,yoe=ob,Cs=Ap,XI=En,goe=function(e){var t=function(r,n,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,o)}return doe(e,this,arguments)};return t.prototype=e.prototype,t},Bt=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?xl:o?xl[r]:xl[r]&&xl[r].prototype,s=n?Os:Os[r]||Cs(Os,r,{})[r],c=s.prototype,l,u,d,p,f,h,y,m,g;for(p in t)l=moe(n?p:r+(o?".":"#")+p,e.forced),u=!l&&a&&XI(a,p),h=s[p],u&&(e.dontCallGetSet?(g=hoe(a,p),y=g&&g.value):y=a[p]),f=u&&y?y:t[p],!(!l&&!i&&typeof h==typeof f)&&(e.bind&&u?m=yoe(f,xl):e.wrap&&u?m=goe(f):i&&poe(f)?m=foe(f):m=f,(e.sham||f&&f.sham||h&&h.sham)&&Cs(m,"sham",!0),Cs(s,p,m),i&&(d=r+"Prototype",XI(Os,d)||Cs(Os,d,{}),Cs(Os[d],p,f),e.real&&c&&(l||!c[p])&&Cs(c,p,f)))},voe=fa,As=Array.isArray||function(t){return voe(t)==="Array"},boe=Bt,woe=As;boe({target:"Array",stat:!0},{isArray:woe});var xoe=qr,Soe=xoe.Array.isArray,_oe=Soe,QI=_oe,Eoe=QI,koe=Eoe,Toe=koe,$oe=Toe,Ooe=$oe;const eR=St(Ooe);function Coe(e){if(eR(e))return e}var Aoe=Math.ceil,Ioe=Math.floor,Roe=Math.trunc||function(t){var r=+t;return(r>0?Ioe:Aoe)(r)},Poe=Roe,Ip=function(e){var t=+e;return t!==t||t===0?0:Poe(t)},Noe=Ip,Moe=Math.min,joe=function(e){var t=Noe(e);return t>0?Moe(t,9007199254740991):0},Doe=joe,pa=function(e){return Doe(e.length)},Loe=TypeError,Foe=9007199254740991,lb=function(e){if(e>Foe)throw Loe("Maximum allowed index exceeded");return e},qoe=pn,Boe=Qn,Uoe=vl,Sl=function(e,t,r){qoe?Boe.f(e,t,Uoe(0,r)):e[t]=r},zoe=Cr,Zoe=zoe("toStringTag"),tR={};tR[Zoe]="z";var ub=String(tR)==="[object z]",Voe=ub,Hoe=Qr,Rp=fa,Woe=Cr,Koe=Woe("toStringTag"),Goe=Object,Joe=Rp(function(){return arguments}())==="Arguments",Yoe=function(e,t){try{return e[t]}catch{}},_l=Voe?Rp:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Yoe(t=Goe(e),Koe))=="string"?r:Joe?Rp(t):(n=Rp(t))==="Object"&&Hoe(t.callee)?"Arguments":n},Xoe=Er,Qoe=Qr,db=Qv,eie=Xoe(Function.toString);Qoe(db.inspectSource)||(db.inspectSource=function(e){return eie(e)});var tie=db.inspectSource,rie=Er,nie=_r,rR=Qr,oie=_l,iie=_o,aie=tie,nR=function(){},oR=iie("Reflect","construct"),fb=/^\s*(?:class|function)\b/,sie=rie(fb.exec),cie=!fb.test(nR),El=function(t){if(!rR(t))return!1;try{return oR(nR,[],t),!0}catch{return!1}},iR=function(t){if(!rR(t))return!1;switch(oie(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return cie||!!sie(fb,aie(t))}catch{return!0}};iR.sham=!0;var pb=!oR||nie(function(){var e;return El(El.call)||!El(Object)||!El(function(){e=!0})||e})?iR:El,aR=As,lie=pb,uie=Yo,die=Cr,fie=die("species"),sR=Array,pie=function(e){var t;return aR(e)&&(t=e.constructor,lie(t)&&(t===sR||aR(t.prototype))?t=void 0:uie(t)&&(t=t[fie],t===null&&(t=void 0))),t===void 0?sR:t},hie=pie,hb=function(e,t){return new(hie(e))(t===0?0:t)},mie=_r,yie=Cr,gie=Wv,vie=yie("species"),Pp=function(e){return gie>=51||!mie(function(){var t=[],r=t.constructor={};return r[vie]=function(){return{foo:1}},t[e](Boolean).foo!==1})},bie=Bt,wie=_r,xie=As,Sie=Yo,_ie=Qo,Eie=pa,cR=lb,lR=Sl,kie=hb,Tie=Pp,$ie=Cr,Oie=Wv,uR=$ie("isConcatSpreadable"),Cie=Oie>=51||!wie(function(){var e=[];return e[uR]=!1,e.concat()[0]!==e}),Aie=function(e){if(!Sie(e))return!1;var t=e[uR];return t!==void 0?!!t:xie(e)},Iie=!Cie||!Tie("concat");bie({target:"Array",proto:!0,arity:1,forced:Iie},{concat:function(t){var r=_ie(this),n=kie(r,0),o=0,i,a,s,c,l;for(i=-1,s=arguments.length;i<s;i++)if(l=i===-1?r:arguments[i],Aie(l))for(c=Eie(l),cR(o+c),a=0;a<c;a++,o++)a in l&&lR(n,o,l[a]);else cR(o+1),lR(n,o++,l);return n.length=o,n}});var Rie=_l,Pie=String,kl=function(e){if(Rie(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return Pie(e)},Np={},Nie=Ip,Mie=Math.max,jie=Math.min,mb=function(e,t){var r=Nie(e);return r<0?Mie(r+t,0):jie(r,t)},Die=So,Lie=mb,Fie=pa,dR=function(e){return function(t,r,n){var o=Die(t),i=Fie(o);if(i===0)return!e&&-1;var a=Lie(n,i),s;if(e&&r!==r){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},fR={includes:dR(!0),indexOf:dR(!1)},Mp={},qie=Er,yb=En,Bie=So,Uie=fR.indexOf,zie=Mp,pR=qie([].push),hR=function(e,t){var r=Bie(e),n=0,o=[],i;for(i in r)!yb(zie,i)&&yb(r,i)&&pR(o,i);for(;t.length>n;)yb(r,i=t[n++])&&(~Uie(o,i)||pR(o,i));return o},gb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Zie=hR,Vie=gb,vb=Object.keys||function(t){return Zie(t,Vie)},Hie=pn,Wie=JI,Kie=Qn,Gie=Ii,Jie=So,Yie=vb;Np.f=Hie&&!Wie?Object.defineProperties:function(t,r){Gie(t);for(var n=Jie(r),o=Yie(r),i=o.length,a=0,s;i>a;)Kie.f(t,s=o[a++],n[s]);return t};var Xie=_o,Qie=Xie("document","documentElement"),eae=Ts,tae=eb,mR=eae("keys"),jp=function(e){return mR[e]||(mR[e]=tae(e))},rae=Ii,nae=Np,yR=gb,oae=Mp,iae=Qie,aae=HI,sae=jp,gR=">",vR="<",bb="prototype",wb="script",bR=sae("IE_PROTO"),xb=function(){},wR=function(e){return vR+wb+gR+e+vR+"/"+wb+gR},xR=function(e){e.write(wR("")),e.close();var t=e.parentWindow.Object;return e=null,t},cae=function(){var e=aae("iframe"),t="java"+wb+":",r;return e.style.display="none",iae.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(wR("document.F=Object")),r.close(),r.F},Dp,Lp=function(){try{Dp=new ActiveXObject("htmlfile")}catch{}Lp=typeof document<"u"?document.domain&&Dp?xR(Dp):cae():xR(Dp);for(var e=yR.length;e--;)delete Lp[bb][yR[e]];return Lp()};oae[bR]=!0;var Sb=Object.create||function(t,r){var n;return t!==null?(xb[bb]=rae(t),n=new xb,xb[bb]=null,n[bR]=t):n=Lp(),r===void 0?n:nae.f(n,r)},Fp={},lae=hR,uae=gb,dae=uae.concat("length","prototype");Fp.f=Object.getOwnPropertyNames||function(t){return lae(t,dae)};var SR={},fae=Er,qp=fae([].slice),pae=fa,hae=So,_R=Fp.f,mae=qp,ER=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],yae=function(e){try{return _R(e)}catch{return mae(ER)}};SR.f=function(t){return ER&&pae(t)==="Window"?yae(t):_R(hae(t))};var Bp={};Bp.f=Object.getOwnPropertySymbols;var gae=Ap,Up=function(e,t,r,n){return n&&n.enumerable?e[t]=r:gae(e,t,r),e},vae=Qn,bae=function(e,t,r){return vae.f(e,t,r)},Tl={},wae=Cr;Tl.f=wae;var kR=qr,xae=En,Sae=Tl,_ae=Qn.f,rr=function(e){var t=kR.Symbol||(kR.Symbol={});xae(t,e)||_ae(t,e,{value:Sae.f(e)})},Eae=xo,kae=_o,Tae=Cr,$ae=Up,TR=function(){var e=kae("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=Tae("toPrimitive");t&&!t[n]&&$ae(t,n,function(o){return Eae(r,this)},{arity:1})},Oae=ub,Cae=_l,Aae=Oae?{}.toString:function(){return"[object "+Cae(this)+"]"},Iae=ub,Rae=Qn.f,Pae=Ap,Nae=En,Mae=Aae,jae=Cr,$R=jae("toStringTag"),Is=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(Nae(o,$R)||Rae(o,$R,{configurable:!0,value:t}),n&&!Iae&&Pae(o,"toString",Mae))},Dae=Sr,Lae=Qr,OR=Dae.WeakMap,Fae=Lae(OR)&&/native code/.test(String(OR)),qae=Fae,CR=Sr,Bae=Yo,Uae=Ap,_b=En,Eb=Qv,zae=jp,Zae=Mp,AR="Object already initialized",kb=CR.TypeError,Vae=CR.WeakMap,zp,$l,Zp,Hae=function(e){return Zp(e)?$l(e):zp(e,{})},Wae=function(e){return function(t){var r;if(!Bae(t)||(r=$l(t)).type!==e)throw new kb("Incompatible receiver, "+e+" required");return r}};if(qae||Eb.state){var Eo=Eb.state||(Eb.state=new Vae);Eo.get=Eo.get,Eo.has=Eo.has,Eo.set=Eo.set,zp=function(e,t){if(Eo.has(e))throw new kb(AR);return t.facade=e,Eo.set(e,t),t},$l=function(e){return Eo.get(e)||{}},Zp=function(e){return Eo.has(e)}}else{var Rs=zae("state");Zae[Rs]=!0,zp=function(e,t){if(_b(e,Rs))throw new kb(AR);return t.facade=e,Uae(e,Rs,t),t},$l=function(e){return _b(e,Rs)?e[Rs]:{}},Zp=function(e){return _b(e,Rs)}}var Tb={set:zp,get:$l,has:Zp,enforce:Hae,getterFor:Wae},Kae=ob,Gae=Er,Jae=TI,Yae=Qo,Xae=pa,Qae=hb,IR=Gae([].push),Ri=function(e){var t=e===1,r=e===2,n=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(c,l,u,d){for(var p=Yae(c),f=Jae(p),h=Xae(f),y=Kae(l,u),m=0,g=d||Qae,v=t?g(c,h):r||a?g(c,0):void 0,b,x;h>m;m++)if((s||m in f)&&(b=f[m],x=y(b,m,p),e))if(t)v[m]=x;else if(x)switch(e){case 3:return!0;case 5:return b;case 6:return m;case 2:IR(v,b)}else switch(e){case 4:return!1;case 7:IR(v,b)}return i?-1:n||o?o:v}},$b={forEach:Ri(0),map:Ri(1),filter:Ri(2),some:Ri(3),every:Ri(4),find:Ri(5),findIndex:Ri(6),filterReject:Ri(7)},Vp=Bt,Ol=Sr,Ob=xo,ese=Er,Ps=pn,Ns=ks,tse=_r,Ar=En,rse=Xo,Cb=Ii,Hp=So,Ab=rb,nse=kl,Ib=vl,Ms=Sb,RR=vb,ose=Fp,PR=SR,ise=Bp,NR=gl,MR=Qn,ase=Np,jR=Fv,DR=Up,sse=bae,Rb=Ts,cse=jp,LR=Mp,FR=eb,lse=Cr,use=Tl,dse=rr,fse=TR,pse=Is,qR=Tb,Wp=$b.forEach,hn=cse("hidden"),Kp="Symbol",Cl="prototype",hse=qR.set,BR=qR.getterFor(Kp),eo=Object[Cl],ha=Ol.Symbol,Al=ha&&ha[Cl],mse=Ol.RangeError,yse=Ol.TypeError,Pb=Ol.QObject,UR=NR.f,ma=MR.f,zR=PR.f,gse=jR.f,ZR=ese([].push),ei=Rb("symbols"),Il=Rb("op-symbols"),vse=Rb("wks"),Nb=!Pb||!Pb[Cl]||!Pb[Cl].findChild,VR=function(e,t,r){var n=UR(eo,t);n&&delete eo[t],ma(e,t,r),n&&e!==eo&&ma(eo,t,n)},Mb=Ps&&tse(function(){return Ms(ma({},"a",{get:function(){return ma(this,"a",{value:7}).a}})).a!==7})?VR:ma,jb=function(e,t){var r=ei[e]=Ms(Al);return hse(r,{type:Kp,tag:e,description:t}),Ps||(r.description=t),r},Gp=function(t,r,n){t===eo&&Gp(Il,r,n),Cb(t);var o=Ab(r);return Cb(n),Ar(ei,o)?(n.enumerable?(Ar(t,hn)&&t[hn][o]&&(t[hn][o]=!1),n=Ms(n,{enumerable:Ib(0,!1)})):(Ar(t,hn)||ma(t,hn,Ib(1,Ms(null))),t[hn][o]=!0),Mb(t,o,n)):ma(t,o,n)},Db=function(t,r){Cb(t);var n=Hp(r),o=RR(n).concat(GR(n));return Wp(o,function(i){(!Ps||Ob(HR,n,i))&&Gp(t,i,n[i])}),t},bse=function(t,r){return r===void 0?Ms(t):Db(Ms(t),r)},HR=function(t){var r=Ab(t),n=Ob(gse,this,r);return this===eo&&Ar(ei,r)&&!Ar(Il,r)?!1:n||!Ar(this,r)||!Ar(ei,r)||Ar(this,hn)&&this[hn][r]?n:!0},WR=function(t,r){var n=Hp(t),o=Ab(r);if(!(n===eo&&Ar(ei,o)&&!Ar(Il,o))){var i=UR(n,o);return i&&Ar(ei,o)&&!(Ar(n,hn)&&n[hn][o])&&(i.enumerable=!0),i}},KR=function(t){var r=zR(Hp(t)),n=[];return Wp(r,function(o){!Ar(ei,o)&&!Ar(LR,o)&&ZR(n,o)}),n},GR=function(e){var t=e===eo,r=zR(t?Il:Hp(e)),n=[];return Wp(r,function(o){Ar(ei,o)&&(!t||Ar(eo,o))&&ZR(n,ei[o])}),n};Ns||(ha=function(){if(rse(Al,this))throw new yse("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:nse(arguments[0]),r=FR(t),n=function(o){var i=this===void 0?Ol:this;i===eo&&Ob(n,Il,o),Ar(i,hn)&&Ar(i[hn],r)&&(i[hn][r]=!1);var a=Ib(1,o);try{Mb(i,r,a)}catch(s){if(!(s instanceof mse))throw s;VR(i,r,a)}};return Ps&&Nb&&Mb(eo,r,{configurable:!0,set:n}),jb(r,t)},Al=ha[Cl],DR(Al,"toString",function(){return BR(this).tag}),DR(ha,"withoutSetter",function(e){return jb(FR(e),e)}),jR.f=HR,MR.f=Gp,ase.f=Db,NR.f=WR,ose.f=PR.f=KR,ise.f=GR,use.f=function(e){return jb(lse(e),e)},Ps&&sse(Al,"description",{configurable:!0,get:function(){return BR(this).description}})),Vp({global:!0,constructor:!0,wrap:!0,forced:!Ns,sham:!Ns},{Symbol:ha}),Wp(RR(vse),function(e){dse(e)}),Vp({target:Kp,stat:!0,forced:!Ns},{useSetter:function(){Nb=!0},useSimple:function(){Nb=!1}}),Vp({target:"Object",stat:!0,forced:!Ns,sham:!Ps},{create:bse,defineProperty:Gp,defineProperties:Db,getOwnPropertyDescriptor:WR}),Vp({target:"Object",stat:!0,forced:!Ns},{getOwnPropertyNames:KR}),fse(),pse(ha,Kp),LR[hn]=!0;var wse=ks,JR=wse&&!!Symbol.for&&!!Symbol.keyFor,xse=Bt,Sse=_o,_se=En,Ese=kl,YR=Ts,kse=JR,Lb=YR("string-to-symbol-registry"),Tse=YR("symbol-to-string-registry");xse({target:"Symbol",stat:!0,forced:!kse},{for:function(e){var t=Ese(e);if(_se(Lb,t))return Lb[t];var r=Sse("Symbol")(t);return Lb[t]=r,Tse[r]=t,r}});var $se=Bt,Ose=En,Cse=bl,Ase=Op,Ise=Ts,Rse=JR,XR=Ise("symbol-to-string-registry");$se({target:"Symbol",stat:!0,forced:!Rse},{keyFor:function(t){if(!Cse(t))throw new TypeError(Ase(t)+" is not a symbol");if(Ose(XR,t))return XR[t]}});var Pse=Er,QR=As,Nse=Qr,eP=fa,Mse=kl,tP=Pse([].push),jse=function(e){if(Nse(e))return e;if(QR(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];typeof o=="string"?tP(r,o):(typeof o=="number"||eP(o)==="Number"||eP(o)==="String")&&tP(r,Mse(o))}var i=r.length,a=!0;return function(s,c){if(a)return a=!1,c;if(QR(this))return c;for(var l=0;l<i;l++)if(r[l]===s)return c}}},Dse=Bt,rP=_o,nP=Mv,Lse=xo,Rl=Er,oP=_r,iP=Qr,aP=bl,sP=qp,Fse=jse,qse=ks,Bse=String,Pi=rP("JSON","stringify"),Jp=Rl(/./.exec),cP=Rl("".charAt),Use=Rl("".charCodeAt),zse=Rl("".replace),Zse=Rl(1 .toString),Vse=/[\uD800-\uDFFF]/g,lP=/^[\uD800-\uDBFF]$/,uP=/^[\uDC00-\uDFFF]$/,dP=!qse||oP(function(){var e=rP("Symbol")("stringify detection");return Pi([e])!=="[null]"||Pi({a:e})!=="{}"||Pi(Object(e))!=="{}"}),fP=oP(function(){return Pi("\uDF06\uD834")!=='"\\udf06\\ud834"'||Pi("\uDEAD")!=='"\\udead"'}),Hse=function(e,t){var r=sP(arguments),n=Fse(t);if(!(!iP(n)&&(e===void 0||aP(e))))return r[1]=function(o,i){if(iP(n)&&(i=Lse(n,this,Bse(o),i)),!aP(i))return i},nP(Pi,null,r)},Wse=function(e,t,r){var n=cP(r,t-1),o=cP(r,t+1);return Jp(lP,e)&&!Jp(uP,o)||Jp(uP,e)&&!Jp(lP,n)?"\\u"+Zse(Use(e,0),16):e};Pi&&Dse({target:"JSON",stat:!0,arity:3,forced:dP||fP},{stringify:function(t,r,n){var o=sP(arguments),i=nP(dP?Hse:Pi,null,o);return fP&&typeof i=="string"?zse(i,Vse,Wse):i}});var Kse=Bt,Gse=ks,Jse=_r,pP=Bp,Yse=Qo,Xse=!Gse||Jse(function(){pP.f(1)});Kse({target:"Object",stat:!0,forced:Xse},{getOwnPropertySymbols:function(t){var r=pP.f;return r?r(Yse(t)):[]}});var Qse=rr;Qse("asyncIterator");var ece=rr;ece("hasInstance");var tce=rr;tce("isConcatSpreadable");var rce=rr;rce("iterator");var nce=rr;nce("match");var oce=rr;oce("matchAll");var ice=rr;ice("replace");var ace=rr;ace("search");var sce=rr;sce("species");var cce=rr;cce("split");var lce=rr,uce=TR;lce("toPrimitive"),uce();var dce=_o,fce=rr,pce=Is;fce("toStringTag"),pce(dce("Symbol"),"Symbol");var hce=rr;hce("unscopables");var mce=Sr,yce=Is;yce(mce.JSON,"JSON",!0);var gce=qr,vce=gce.Symbol,js={},Fb=pn,bce=En,hP=Function.prototype,wce=Fb&&Object.getOwnPropertyDescriptor,qb=bce(hP,"name"),xce=qb&&(function(){}).name==="something",Sce=qb&&(!Fb||Fb&&wce(hP,"name").configurable),_ce={EXISTS:qb,PROPER:xce,CONFIGURABLE:Sce},Ece=_r,kce=!Ece(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),Tce=En,$ce=Qr,Oce=Qo,Cce=jp,Ace=kce,mP=Cce("IE_PROTO"),Bb=Object,Ice=Bb.prototype,yP=Ace?Bb.getPrototypeOf:function(e){var t=Oce(e);if(Tce(t,mP))return t[mP];var r=t.constructor;return $ce(r)&&t instanceof r?r.prototype:t instanceof Bb?Ice:null},Rce=_r,Pce=Qr,Nce=Yo,Mce=Sb,gP=yP,jce=Up,Dce=Cr,Ub=Dce("iterator"),vP=!1,ti,zb,Zb;[].keys&&(Zb=[].keys(),"next"in Zb?(zb=gP(gP(Zb)),zb!==Object.prototype&&(ti=zb)):vP=!0);var Lce=!Nce(ti)||Rce(function(){var e={};return ti[Ub].call(e)!==e});Lce?ti={}:ti=Mce(ti),Pce(ti[Ub])||jce(ti,Ub,function(){return this});var bP={IteratorPrototype:ti,BUGGY_SAFARI_ITERATORS:vP},Fce=bP.IteratorPrototype,qce=Sb,Bce=vl,Uce=Is,zce=js,Zce=function(){return this},Vce=function(e,t,r,n){var o=t+" Iterator";return e.prototype=qce(Fce,{next:Bce(+!n,r)}),Uce(e,o,!1,!0),zce[o]=Zce,e},Hce=Bt,Wce=xo,wP=_ce,Kce=Vce,Gce=yP,Jce=Is,xP=Up,Yce=Cr,SP=js,_P=bP,Xce=wP.PROPER;wP.CONFIGURABLE,_P.IteratorPrototype;var Yp=_P.BUGGY_SAFARI_ITERATORS,Vb=Yce("iterator"),EP="keys",Xp="values",kP="entries",Qce=function(){return this},TP=function(e,t,r,n,o,i,a){Kce(r,t,n);var s=function(g){if(g===o&&p)return p;if(!Yp&&g&&g in u)return u[g];switch(g){case EP:return function(){return new r(this,g)};case Xp:return function(){return new r(this,g)};case kP:return function(){return new r(this,g)}}return function(){return new r(this)}},c=t+" Iterator",l=!1,u=e.prototype,d=u[Vb]||u["@@iterator"]||o&&u[o],p=!Yp&&d||s(o),f=t==="Array"&&u.entries||d,h,y,m;if(f&&(h=Gce(f.call(new e)),h!==Object.prototype&&h.next&&(Jce(h,c,!0,!0),SP[c]=Qce)),Xce&&o===Xp&&d&&d.name!==Xp&&(l=!0,p=function(){return Wce(d,this)}),o)if(y={values:s(Xp),keys:i?p:s(EP),entries:s(kP)},a)for(m in y)(Yp||l||!(m in u))&&xP(u,m,y[m]);else Hce({target:t,proto:!0,forced:Yp||l},y);return a&&u[Vb]!==p&&xP(u,Vb,p,{name:o}),SP[t]=p,y},$P=function(e,t){return{value:e,done:t}},ele=So,OP=js,CP=Tb;Qn.f;var tle=TP,Qp=$P,AP="Array Iterator",rle=CP.set,nle=CP.getterFor(AP);tle(Array,"Array",function(e,t){rle(this,{type:AP,target:ele(e),index:0,kind:t})},function(){var e=nle(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,Qp(void 0,!0);switch(e.kind){case"keys":return Qp(r,!1);case"values":return Qp(t[r],!1)}return Qp([r,t[r]],!1)},"values"),OP.Arguments=OP.Array;var ole={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},ile=ole,ale=Sr,sle=Is,IP=js;for(var Hb in ile)sle(ale[Hb],Hb),IP[Hb]=IP.Array;var cle=vce,lle=cle,ule=Cr,dle=Qn.f,RP=ule("metadata"),PP=Function.prototype;PP[RP]===void 0&&dle(PP,RP,{value:null});var fle=rr;fle("asyncDispose");var ple=rr;ple("dispose");var hle=rr;hle("metadata");var mle=lle,yle=mle,gle=_o,vle=Er,Wb=gle("Symbol"),ble=Wb.keyFor,wle=vle(Wb.prototype.valueOf),NP=Wb.isRegisteredSymbol||function(t){try{return ble(wle(t))!==void 0}catch{return!1}},xle=Bt,Sle=NP;xle({target:"Symbol",stat:!0},{isRegisteredSymbol:Sle});for(var _le=Ts,MP=_o,Ele=Er,kle=bl,Tle=Cr,eh=MP("Symbol"),jP=eh.isWellKnownSymbol,DP=MP("Object","getOwnPropertyNames"),$le=Ele(eh.prototype.valueOf),LP=_le("wks"),Kb=0,FP=DP(eh),Ole=FP.length;Kb<Ole;Kb++)try{var qP=FP[Kb];kle(eh[qP])&&Tle(qP)}catch{}var BP=function(t){if(jP&&jP(t))return!0;try{for(var r=$le(t),n=0,o=DP(LP),i=o.length;n<i;n++)if(LP[o[n]]==r)return!0}catch{}return!1},Cle=Bt,Ale=BP;Cle({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Ale});var Ile=rr;Ile("customMatcher");var Rle=rr;Rle("observable");var Ple=Bt,Nle=NP;Ple({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Nle});var Mle=Bt,jle=BP;Mle({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:jle});var Dle=rr;Dle("matcher");var Lle=rr;Lle("metadataKey");var Fle=rr;Fle("patternMatch");var qle=rr;qle("replaceAll");var Ble=yle,Ule=Ble,zle=Ule;const Ds=St(zle);var Gb=Er,Zle=Ip,Vle=kl,Hle=Uv,Wle=Gb("".charAt),UP=Gb("".charCodeAt),Kle=Gb("".slice),zP=function(e){return function(t,r){var n=Vle(Hle(t)),o=Zle(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=UP(n,o),a<55296||a>56319||o+1===i||(s=UP(n,o+1))<56320||s>57343?e?Wle(n,o):a:e?Kle(n,o,o+2):(a-55296<<10)+(s-56320)+65536)}},Gle={codeAt:zP(!1),charAt:zP(!0)},Jle=Gle.charAt,Yle=kl,ZP=Tb,Xle=TP,VP=$P,HP="String Iterator",Qle=ZP.set,eue=ZP.getterFor(HP);Xle(String,"String",function(e){Qle(this,{type:HP,string:Yle(e),index:0})},function(){var t=eue(this),r=t.string,n=t.index,o;return n>=r.length?VP(void 0,!0):(o=Jle(r,n),t.index+=o.length,VP(o,!1))});var tue=_l,WP=Gv,rue=Bv,nue=js,oue=Cr,iue=oue("iterator"),Jb=function(e){if(!rue(e))return WP(e,iue)||WP(e,"@@iterator")||nue[tue(e)]},aue=Jb,sue=aue,cue=sue,lue=cue,uue=lue,due=uue,fue=due,pue=fue,hue=pue;const KP=St(hue);var mue=pn,yue=As,gue=TypeError,vue=Object.getOwnPropertyDescriptor,bue=mue&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),GP=bue?function(e,t){if(yue(e)&&!vue(e,"length").writable)throw new gue("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},wue=Bt,xue=Qo,Sue=pa,_ue=GP,Eue=lb,kue=_r,Tue=kue(function(){return[].push.call({length:4294967296},1)!==4294967297}),$ue=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Oue=Tue||!$ue();wue({target:"Array",proto:!0,arity:1,forced:Oue},{push:function(t){var r=xue(this),n=Sue(r),o=arguments.length;Eue(n+o);for(var i=0;i<o;i++)r[n]=arguments[i],n++;return _ue(r,n),n}});var Cue=Sr,Aue=qr,ya=function(e,t){var r=Aue[e+"Prototype"],n=r&&r[t];if(n)return n;var o=Cue[e],i=o&&o.prototype;return i&&i[t]},Iue=ya,Rue=Iue("Array","push"),Pue=Xo,Nue=Rue,Yb=Array.prototype,Mue=function(e){var t=e.push;return e===Yb||Pue(Yb,e)&&t===Yb.push?Nue:t},jue=Mue,Due=jue,Lue=Due,Fue=Lue,que=Fue,Bue=que,Uue=Bue;const zue=St(Uue);function Zue(e,t){var r=e==null?null:typeof Ds<"u"&&KP(e)||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(zue(s).call(s,n.value),s.length!==t);c=!0);}catch(u){l=!0,o=u}finally{try{if(!c&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}var Vue=Bt,JP=As,Hue=pb,Wue=Yo,YP=mb,Kue=pa,Gue=So,Jue=Sl,Yue=Cr,Xue=Pp,Que=qp,ede=Xue("slice"),tde=Yue("species"),Xb=Array,rde=Math.max;Vue({target:"Array",proto:!0,forced:!ede},{slice:function(t,r){var n=Gue(this),o=Kue(n),i=YP(t,o),a=YP(r===void 0?o:r,o),s,c,l;if(JP(n)&&(s=n.constructor,Hue(s)&&(s===Xb||JP(s.prototype))?s=void 0:Wue(s)&&(s=s[tde],s===null&&(s=void 0)),s===Xb||s===void 0))return Que(n,i,a);for(c=new(s===void 0?Xb:s)(rde(a-i,0)),l=0;i<a;i++,l++)i in n&&Jue(c,l,n[i]);return c.length=l,c}});var nde=ya,ode=nde("Array","slice"),ide=Xo,ade=ode,Qb=Array.prototype,sde=function(e){var t=e.slice;return e===Qb||ide(Qb,e)&&t===Qb.slice?ade:t},cde=sde,lde=cde,ude=lde,dde=ude,fde=dde,pde=fde,hde=pde;const mde=St(hde);var yde=xo,XP=Ii,gde=Gv,vde=function(e,t,r){var n,o;XP(e);try{if(n=gde(e,"return"),!n){if(t==="throw")throw r;return r}n=yde(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return XP(n),r},bde=Ii,wde=vde,xde=function(e,t,r,n){try{return n?t(bde(r)[0],r[1]):t(r)}catch(o){wde(e,"throw",o)}},Sde=Cr,_de=js,Ede=Sde("iterator"),kde=Array.prototype,Tde=function(e){return e!==void 0&&(_de.Array===e||kde[Ede]===e)},$de=xo,Ode=Kv,Cde=Ii,Ade=Op,Ide=Jb,Rde=TypeError,Pde=function(e,t){var r=arguments.length<2?Ide(e):t;if(Ode(r))return Cde($de(r,e));throw new Rde(Ade(e)+" is not iterable")},Nde=ob,Mde=xo,jde=Qo,Dde=xde,Lde=Tde,Fde=pb,qde=pa,QP=Sl,Bde=Pde,Ude=Jb,eN=Array,zde=function(t){var r=jde(t),n=Fde(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=Nde(i,o>2?arguments[2]:void 0));var s=Ude(r),c=0,l,u,d,p,f,h;if(s&&!(this===eN&&Lde(s)))for(u=n?new this:[],p=Bde(r,s),f=p.next;!(d=Mde(f,p)).done;c++)h=a?Dde(p,i,[d.value,c],!0):d.value,QP(u,c,h);else for(l=qde(r),u=n?new this(l):eN(l);l>c;c++)h=a?i(r[c],c):r[c],QP(u,c,h);return u.length=c,u},Zde=Cr,tN=Zde("iterator"),rN=!1;try{var Vde=0,nN={next:function(){return{done:!!Vde++}},return:function(){rN=!0}};nN[tN]=function(){return this},Array.from(nN,function(){throw 2})}catch{}var Hde=function(e,t){try{if(!t&&!rN)return!1}catch{return!1}var r=!1;try{var n={};n[tN]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},Wde=Bt,Kde=zde,Gde=Hde,Jde=!Gde(function(e){Array.from(e)});Wde({target:"Array",stat:!0,forced:Jde},{from:Kde});var Yde=qr,Xde=Yde.Array.from,Qde=Xde,efe=Qde,tfe=efe,rfe=tfe,nfe=rfe,ofe=nfe,ife=ofe;const oN=St(ife);function ew(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function iN(e,t){if(e){var r;if(typeof e=="string")return ew(e,t);var n=mde(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?oN(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ew(e,t):void 0}}function afe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
401
401
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ko(e,t){return Coe(e)||Zue(e,t)||iN(e,t)||afe()}var aN={exports:{}};/*!
402
402
  Copyright (c) 2018 Jed Watson.
403
403
  Licensed under the MIT License (MIT), see
@@ -416,12 +416,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
416
416
  *
417
417
  * This source code is licensed under the MIT license found in the
418
418
  * LICENSE file in the root directory of this source tree.
419
- */var cN;function lfe(){return cN||(cN=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===n||te===l||te===i||te===o||te===d||te===p||typeof te=="object"&&te!==null&&(te.$$typeof===h||te.$$typeof===f||te.$$typeof===a||te.$$typeof===s||te.$$typeof===u||te.$$typeof===m||te.$$typeof===g||te.$$typeof===v||te.$$typeof===y)}function x(te){if(typeof te=="object"&&te!==null){var we=te.$$typeof;switch(we){case t:var Ae=te.type;switch(Ae){case c:case l:case n:case i:case o:case d:return Ae;default:var qe=Ae&&Ae.$$typeof;switch(qe){case s:case u:case h:case f:case a:return qe;default:return we}}case r:return we}}}var w=c,S=l,C=s,I=a,P=t,A=u,L=n,W=h,Z=f,B=r,F=i,j=o,U=d,K=!1;function D(te){return K||(K=!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.")),E(te)||x(te)===c}function E(te){return x(te)===l}function H(te){return x(te)===s}function Q(te){return x(te)===a}function T(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function ce(te){return x(te)===u}function pe(te){return x(te)===n}function fe(te){return x(te)===h}function ve(te){return x(te)===f}function _e(te){return x(te)===r}function Ce(te){return x(te)===i}function be(te){return x(te)===o}function de(te){return x(te)===d}Lt.AsyncMode=w,Lt.ConcurrentMode=S,Lt.ContextConsumer=C,Lt.ContextProvider=I,Lt.Element=P,Lt.ForwardRef=A,Lt.Fragment=L,Lt.Lazy=W,Lt.Memo=Z,Lt.Portal=B,Lt.Profiler=F,Lt.StrictMode=j,Lt.Suspense=U,Lt.isAsyncMode=D,Lt.isConcurrentMode=E,Lt.isContextConsumer=H,Lt.isContextProvider=Q,Lt.isElement=T,Lt.isForwardRef=ce,Lt.isFragment=pe,Lt.isLazy=fe,Lt.isMemo=ve,Lt.isPortal=_e,Lt.isProfiler=Ce,Lt.isStrictMode=be,Lt.isSuspense=de,Lt.isValidElementType=b,Lt.typeOf=x}()),Lt}var lN;function uN(){return lN||(lN=1,process.env.NODE_ENV==="production"?th.exports=cfe():th.exports=lfe()),th.exports}/*
419
+ */var cN;function lfe(){return cN||(cN=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,n=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,l=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,y=e?Symbol.for("react.block"):60121,m=e?Symbol.for("react.fundamental"):60117,g=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(te){return typeof te=="string"||typeof te=="function"||te===n||te===l||te===i||te===o||te===d||te===p||typeof te=="object"&&te!==null&&(te.$$typeof===h||te.$$typeof===f||te.$$typeof===a||te.$$typeof===s||te.$$typeof===u||te.$$typeof===m||te.$$typeof===g||te.$$typeof===v||te.$$typeof===y)}function x(te){if(typeof te=="object"&&te!==null){var we=te.$$typeof;switch(we){case t:var Ae=te.type;switch(Ae){case c:case l:case n:case i:case o:case d:return Ae;default:var qe=Ae&&Ae.$$typeof;switch(qe){case s:case u:case h:case f:case a:return qe;default:return we}}case r:return we}}}var w=c,S=l,C=s,I=a,P=t,A=u,L=n,K=h,z=f,B=r,F=i,j=o,Z=d,W=!1;function D(te){return W||(W=!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.")),E(te)||x(te)===c}function E(te){return x(te)===l}function H(te){return x(te)===s}function Q(te){return x(te)===a}function T(te){return typeof te=="object"&&te!==null&&te.$$typeof===t}function ce(te){return x(te)===u}function pe(te){return x(te)===n}function fe(te){return x(te)===h}function ve(te){return x(te)===f}function _e(te){return x(te)===r}function Ce(te){return x(te)===i}function be(te){return x(te)===o}function de(te){return x(te)===d}Lt.AsyncMode=w,Lt.ConcurrentMode=S,Lt.ContextConsumer=C,Lt.ContextProvider=I,Lt.Element=P,Lt.ForwardRef=A,Lt.Fragment=L,Lt.Lazy=K,Lt.Memo=z,Lt.Portal=B,Lt.Profiler=F,Lt.StrictMode=j,Lt.Suspense=Z,Lt.isAsyncMode=D,Lt.isConcurrentMode=E,Lt.isContextConsumer=H,Lt.isContextProvider=Q,Lt.isElement=T,Lt.isForwardRef=ce,Lt.isFragment=pe,Lt.isLazy=fe,Lt.isMemo=ve,Lt.isPortal=_e,Lt.isProfiler=Ce,Lt.isStrictMode=be,Lt.isSuspense=de,Lt.isValidElementType=b,Lt.typeOf=x}()),Lt}var lN;function uN(){return lN||(lN=1,process.env.NODE_ENV==="production"?th.exports=cfe():th.exports=lfe()),th.exports}/*
420
420
  object-assign
421
421
  (c) Sindre Sorhus
422
422
  @license MIT
423
- */var nw,dN;function ufe(){if(dN)return nw;dN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return nw=o()?Object.assign:function(i,a){for(var s,c=n(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){l=e(s);for(var p=0;p<l.length;p++)r.call(s,l[p])&&(c[l[p]]=s[l[p]])}}return c},nw}var ow,fN;function iw(){if(fN)return ow;fN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ow=e,ow}var aw,pN;function dfe(){if(pN)return aw;pN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=iw(),r={},n=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(n(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}d=i[u](a,u,c,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var f=l?l():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},aw=o,aw}var sw,hN;function ffe(){if(hN)return sw;hN=1;var e=uN(),t=ufe(),r=iw(),n=dfe(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return sw=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var E=D&&(l&&D[l]||D[u]);if(typeof E=="function")return E}var p="<<anonymous>>",f={array:g("array"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:v(),arrayOf:b,element:x(),elementType:w(),instanceOf:S,node:A(),objectOf:I,oneOf:C,oneOfType:P,shape:L,exact:W};function h(D,E){return D===E?D!==0||1/D===1/E:D!==D&&E!==E}function y(D){this.message=D,this.stack=""}y.prototype=Error.prototype;function m(D){if(process.env.NODE_ENV!=="production")var E={},H=0;function Q(ce,pe,fe,ve,_e,Ce,be){if(ve=ve||p,Ce=Ce||fe,be!==r){if(c){var de=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 de.name="Invariant Violation",de}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var te=ve+":"+fe;!E[te]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Ce+"` prop on `"+ve+"`. 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."),E[te]=!0,H++)}}return pe[fe]==null?ce?pe[fe]===null?new y("The "+_e+" `"+Ce+"` is marked as required "+("in `"+ve+"`, but its value is `null`.")):new y("The "+_e+" `"+Ce+"` is marked as required in "+("`"+ve+"`, but its value is `undefined`.")):null:D(pe,fe,ve,_e,Ce)}var T=Q.bind(null,!1);return T.isRequired=Q.bind(null,!0),T}function g(D){function E(H,Q,T,ce,pe,fe){var ve=H[Q],_e=F(ve);if(_e!==D){var Ce=j(ve);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+Ce+"` supplied to `"+T+"`, expected ")+("`"+D+"`."))}return null}return m(E)}function v(){return m(a)}function b(D){function E(H,Q,T,ce,pe){if(typeof D!="function")return new y("Property `"+pe+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var fe=H[Q];if(!Array.isArray(fe)){var ve=F(fe);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected an array."))}for(var _e=0;_e<fe.length;_e++){var Ce=D(fe,_e,T,ce,pe+"["+_e+"]",r);if(Ce instanceof Error)return Ce}return null}return m(E)}function x(){function D(E,H,Q,T,ce){var pe=E[H];if(!s(pe)){var fe=F(pe);return new y("Invalid "+T+" `"+ce+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return m(D)}function w(){function D(E,H,Q,T,ce){var pe=E[H];if(!e.isValidElementType(pe)){var fe=F(pe);return new y("Invalid "+T+" `"+ce+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return m(D)}function S(D){function E(H,Q,T,ce,pe){if(!(H[Q]instanceof D)){var fe=D.name||p,ve=K(H[Q]);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected ")+("instance of `"+fe+"`."))}return null}return m(E)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function E(H,Q,T,ce,pe){for(var fe=H[Q],ve=0;ve<D.length;ve++)if(h(fe,D[ve]))return null;var _e=JSON.stringify(D,function(be,de){var te=j(de);return te==="symbol"?String(de):de});return new y("Invalid "+ce+" `"+pe+"` of value `"+String(fe)+"` "+("supplied to `"+T+"`, expected one of "+_e+"."))}return m(E)}function I(D){function E(H,Q,T,ce,pe){if(typeof D!="function")return new y("Property `"+pe+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected an object."));for(var _e in fe)if(o(fe,_e)){var Ce=D(fe,_e,T,ce,pe+"."+_e,r);if(Ce instanceof Error)return Ce}return null}return m(E)}function P(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var E=0;E<D.length;E++){var H=D[E];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+U(H)+" at index "+E+"."),a}function Q(T,ce,pe,fe,ve){for(var _e=0;_e<D.length;_e++){var Ce=D[_e];if(Ce(T,ce,pe,fe,ve,r)==null)return null}return new y("Invalid "+fe+" `"+ve+"` supplied to "+("`"+pe+"`."))}return m(Q)}function A(){function D(E,H,Q,T,ce){return Z(E[H])?null:new y("Invalid "+T+" `"+ce+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return m(D)}function L(D){function E(H,Q,T,ce,pe){var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type `"+ve+"` "+("supplied to `"+T+"`, expected `object`."));for(var _e in D){var Ce=D[_e];if(Ce){var be=Ce(fe,_e,T,ce,pe+"."+_e,r);if(be)return be}}return null}return m(E)}function W(D){function E(H,Q,T,ce,pe){var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type `"+ve+"` "+("supplied to `"+T+"`, expected `object`."));var _e=t({},H[Q],D);for(var Ce in _e){var be=D[Ce];if(!be)return new y("Invalid "+ce+" `"+pe+"` key `"+Ce+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(H[Q],null," ")+`
424
- Valid keys: `+JSON.stringify(Object.keys(D),null," "));var de=be(fe,Ce,T,ce,pe+"."+Ce,r);if(de)return de}return null}return m(E)}function Z(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(Z);if(D===null||s(D))return!0;var E=d(D);if(E){var H=E.call(D),Q;if(E!==D.entries){for(;!(Q=H.next()).done;)if(!Z(Q.value))return!1}else for(;!(Q=H.next()).done;){var T=Q.value;if(T&&!Z(T[1]))return!1}}else return!1;return!0;default:return!1}}function B(D,E){return D==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(D){var E=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":B(E,D)?"symbol":E}function j(D){if(typeof D>"u"||D===null)return""+D;var E=F(D);if(E==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return E}function U(D){var E=j(D);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function K(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=n,f.resetWarningCache=n.resetWarningCache,f.PropTypes=f,f},sw}var cw,mN;function pfe(){if(mN)return cw;mN=1;var e=iw();function t(){}function r(){}return r.resetWarningCache=t,cw=function(){function n(a,s,c,l,u,d){if(d!==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}}n.isRequired=n;function o(){return n}var i={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},cw}if(process.env.NODE_ENV!=="production"){var hfe=uN(),mfe=!0;rw.exports=ffe()(hfe.isElement,mfe)}else rw.exports=pfe()();var yfe=rw.exports;const Rt=St(yfe);var lw=$.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});lw.displayName="ScrollToBottomFunctionContext";function yN(){return $.useContext(lw)}function gfe(){var e=yN(),t=e.scrollToEnd;return t}var uw=$.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});uw.displayName="ScrollToBottomState1Context";var dw=$.createContext({animating:!1,animatingToEnd:!1,sticky:!0});dw.displayName="ScrollToBottomState2Context";var fw=$.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});fw.displayName="ScrollToBottomStateContext";var gN=[fw,uw,dw];function vfe(e){return $.useContext(gN[e]||gN[0])}function vN(){var e=vfe(2),t=e.sticky;return[t]}var rh=$.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});rh.displayName="ScrollToBottomInternalContext";function bfe(){return $.useContext(rh)}function pw(){var e=bfe(),t=e.styleToClassName;return t}var wfe={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)"}},hw=function(t){var r=t.children,n=t.className,o=vN(),i=ko(o,1),a=i[0],s=pw()(wfe),c=gfe();return!a&&$.createElement("button",{className:tw(s,(n||"")+""),onClick:c,type:"button"},r)};hw.defaultProps={children:void 0,className:""},hw.propTypes={children:Rt.any,className:Rt.string};var bN={exports:{}},xfe=Bt,Sfe=pn,wN=Qn.f;xfe({target:"Object",stat:!0,forced:Object.defineProperty!==wN,sham:!Sfe},{defineProperty:wN});var _fe=qr,xN=_fe.Object,Efe=bN.exports=function(t,r,n){return xN.defineProperty(t,r,n)};xN.defineProperty.sham&&(Efe.sham=!0);var kfe=bN.exports,Tfe=kfe,SN=Tfe,$fe=SN,Ofe=$fe,Cfe=Ofe,Afe=Cfe,Ife=Afe;const Rfe=St(Ife);var Pfe=Tl,Nfe=Pfe.f("iterator"),Mfe=Nfe,jfe=Mfe,Dfe=jfe,Lfe=Dfe,Ffe=Lfe,qfe=Ffe,Bfe=qfe;const Ufe=St(Bfe);function Pl(e){"@babel/helpers - typeof";return Pl=typeof Ds=="function"&&typeof Ufe=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ds=="function"&&t.constructor===Ds&&t!==Ds.prototype?"symbol":typeof t},Pl(e)}var zfe=Tl,Zfe=zfe.f("toPrimitive"),Vfe=Zfe,Hfe=Vfe,Wfe=Hfe,Kfe=Wfe,Gfe=Kfe,Jfe=Gfe,Yfe=Jfe;const Xfe=St(Yfe);function Qfe(e,t){if(Pl(e)!="object"||!e)return e;var r=e[Xfe];if(r!==void 0){var n=r.call(e,t||"default");if(Pl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function epe(e){var t=Qfe(e,"string");return Pl(t)=="symbol"?t:t+""}function tpe(e,t,r){return(t=epe(t))in e?Rfe(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rpe(e){if(eR(e))return ew(e)}function npe(e){if(typeof Ds<"u"&&KP(e)!=null||e["@@iterator"]!=null)return oN(e)}function ope(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
423
+ */var nw,dN;function ufe(){if(dN)return nw;dN=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function n(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var c=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(c.join("")!=="0123456789")return!1;var l={};return"abcdefghijklmnopqrst".split("").forEach(function(u){l[u]=u}),Object.keys(Object.assign({},l)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return nw=o()?Object.assign:function(i,a){for(var s,c=n(i),l,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var d in s)t.call(s,d)&&(c[d]=s[d]);if(e){l=e(s);for(var p=0;p<l.length;p++)r.call(s,l[p])&&(c[l[p]]=s[l[p]])}}return c},nw}var ow,fN;function iw(){if(fN)return ow;fN=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return ow=e,ow}var aw,pN;function dfe(){if(pN)return aw;pN=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=iw(),r={},n=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,c,l){if(process.env.NODE_ENV!=="production"){for(var u in i)if(n(i,u)){var d;try{if(typeof i[u]!="function"){var p=Error((c||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}d=i[u](a,u,c,s,null,t)}catch(h){d=h}if(d&&!(d instanceof Error)&&e((c||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in r)){r[d.message]=!0;var f=l?l():"";e("Failed "+s+" type: "+d.message+(f??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(r={})},aw=o,aw}var sw,hN;function ffe(){if(hN)return sw;hN=1;var e=uN(),t=ufe(),r=iw(),n=dfe(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var c="Warning: "+s;typeof console<"u"&&console.error(c);try{throw new Error(c)}catch{}});function a(){return null}return sw=function(s,c){var l=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function d(D){var E=D&&(l&&D[l]||D[u]);if(typeof E=="function")return E}var p="<<anonymous>>",f={array:g("array"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:v(),arrayOf:b,element:x(),elementType:w(),instanceOf:S,node:A(),objectOf:I,oneOf:C,oneOfType:P,shape:L,exact:K};function h(D,E){return D===E?D!==0||1/D===1/E:D!==D&&E!==E}function y(D){this.message=D,this.stack=""}y.prototype=Error.prototype;function m(D){if(process.env.NODE_ENV!=="production")var E={},H=0;function Q(ce,pe,fe,ve,_e,Ce,be){if(ve=ve||p,Ce=Ce||fe,be!==r){if(c){var de=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 de.name="Invariant Violation",de}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var te=ve+":"+fe;!E[te]&&H<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Ce+"` prop on `"+ve+"`. 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."),E[te]=!0,H++)}}return pe[fe]==null?ce?pe[fe]===null?new y("The "+_e+" `"+Ce+"` is marked as required "+("in `"+ve+"`, but its value is `null`.")):new y("The "+_e+" `"+Ce+"` is marked as required in "+("`"+ve+"`, but its value is `undefined`.")):null:D(pe,fe,ve,_e,Ce)}var T=Q.bind(null,!1);return T.isRequired=Q.bind(null,!0),T}function g(D){function E(H,Q,T,ce,pe,fe){var ve=H[Q],_e=F(ve);if(_e!==D){var Ce=j(ve);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+Ce+"` supplied to `"+T+"`, expected ")+("`"+D+"`."))}return null}return m(E)}function v(){return m(a)}function b(D){function E(H,Q,T,ce,pe){if(typeof D!="function")return new y("Property `"+pe+"` of component `"+T+"` has invalid PropType notation inside arrayOf.");var fe=H[Q];if(!Array.isArray(fe)){var ve=F(fe);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected an array."))}for(var _e=0;_e<fe.length;_e++){var Ce=D(fe,_e,T,ce,pe+"["+_e+"]",r);if(Ce instanceof Error)return Ce}return null}return m(E)}function x(){function D(E,H,Q,T,ce){var pe=E[H];if(!s(pe)){var fe=F(pe);return new y("Invalid "+T+" `"+ce+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement."))}return null}return m(D)}function w(){function D(E,H,Q,T,ce){var pe=E[H];if(!e.isValidElementType(pe)){var fe=F(pe);return new y("Invalid "+T+" `"+ce+"` of type "+("`"+fe+"` supplied to `"+Q+"`, expected a single ReactElement type."))}return null}return m(D)}function S(D){function E(H,Q,T,ce,pe){if(!(H[Q]instanceof D)){var fe=D.name||p,ve=W(H[Q]);return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected ")+("instance of `"+fe+"`."))}return null}return m(E)}function C(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("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])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function E(H,Q,T,ce,pe){for(var fe=H[Q],ve=0;ve<D.length;ve++)if(h(fe,D[ve]))return null;var _e=JSON.stringify(D,function(be,de){var te=j(de);return te==="symbol"?String(de):de});return new y("Invalid "+ce+" `"+pe+"` of value `"+String(fe)+"` "+("supplied to `"+T+"`, expected one of "+_e+"."))}return m(E)}function I(D){function E(H,Q,T,ce,pe){if(typeof D!="function")return new y("Property `"+pe+"` of component `"+T+"` has invalid PropType notation inside objectOf.");var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type "+("`"+ve+"` supplied to `"+T+"`, expected an object."));for(var _e in fe)if(o(fe,_e)){var Ce=D(fe,_e,T,ce,pe+"."+_e,r);if(Ce instanceof Error)return Ce}return null}return m(E)}function P(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var E=0;E<D.length;E++){var H=D[E];if(typeof H!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+Z(H)+" at index "+E+"."),a}function Q(T,ce,pe,fe,ve){for(var _e=0;_e<D.length;_e++){var Ce=D[_e];if(Ce(T,ce,pe,fe,ve,r)==null)return null}return new y("Invalid "+fe+" `"+ve+"` supplied to "+("`"+pe+"`."))}return m(Q)}function A(){function D(E,H,Q,T,ce){return z(E[H])?null:new y("Invalid "+T+" `"+ce+"` supplied to "+("`"+Q+"`, expected a ReactNode."))}return m(D)}function L(D){function E(H,Q,T,ce,pe){var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type `"+ve+"` "+("supplied to `"+T+"`, expected `object`."));for(var _e in D){var Ce=D[_e];if(Ce){var be=Ce(fe,_e,T,ce,pe+"."+_e,r);if(be)return be}}return null}return m(E)}function K(D){function E(H,Q,T,ce,pe){var fe=H[Q],ve=F(fe);if(ve!=="object")return new y("Invalid "+ce+" `"+pe+"` of type `"+ve+"` "+("supplied to `"+T+"`, expected `object`."));var _e=t({},H[Q],D);for(var Ce in _e){var be=D[Ce];if(!be)return new y("Invalid "+ce+" `"+pe+"` key `"+Ce+"` supplied to `"+T+"`.\nBad object: "+JSON.stringify(H[Q],null," ")+`
424
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var de=be(fe,Ce,T,ce,pe+"."+Ce,r);if(de)return de}return null}return m(E)}function z(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(z);if(D===null||s(D))return!0;var E=d(D);if(E){var H=E.call(D),Q;if(E!==D.entries){for(;!(Q=H.next()).done;)if(!z(Q.value))return!1}else for(;!(Q=H.next()).done;){var T=Q.value;if(T&&!z(T[1]))return!1}}else return!1;return!0;default:return!1}}function B(D,E){return D==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function F(D){var E=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":B(E,D)?"symbol":E}function j(D){if(typeof D>"u"||D===null)return""+D;var E=F(D);if(E==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return E}function Z(D){var E=j(D);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function W(D){return!D.constructor||!D.constructor.name?p:D.constructor.name}return f.checkPropTypes=n,f.resetWarningCache=n.resetWarningCache,f.PropTypes=f,f},sw}var cw,mN;function pfe(){if(mN)return cw;mN=1;var e=iw();function t(){}function r(){}return r.resetWarningCache=t,cw=function(){function n(a,s,c,l,u,d){if(d!==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}}n.isRequired=n;function o(){return n}var i={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:r,resetWarningCache:t};return i.PropTypes=i,i},cw}if(process.env.NODE_ENV!=="production"){var hfe=uN(),mfe=!0;rw.exports=ffe()(hfe.isElement,mfe)}else rw.exports=pfe()();var yfe=rw.exports;const Rt=St(yfe);var lw=$.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});lw.displayName="ScrollToBottomFunctionContext";function yN(){return $.useContext(lw)}function gfe(){var e=yN(),t=e.scrollToEnd;return t}var uw=$.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});uw.displayName="ScrollToBottomState1Context";var dw=$.createContext({animating:!1,animatingToEnd:!1,sticky:!0});dw.displayName="ScrollToBottomState2Context";var fw=$.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});fw.displayName="ScrollToBottomStateContext";var gN=[fw,uw,dw];function vfe(e){return $.useContext(gN[e]||gN[0])}function vN(){var e=vfe(2),t=e.sticky;return[t]}var rh=$.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});rh.displayName="ScrollToBottomInternalContext";function bfe(){return $.useContext(rh)}function pw(){var e=bfe(),t=e.styleToClassName;return t}var wfe={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)"}},hw=function(t){var r=t.children,n=t.className,o=vN(),i=ko(o,1),a=i[0],s=pw()(wfe),c=gfe();return!a&&$.createElement("button",{className:tw(s,(n||"")+""),onClick:c,type:"button"},r)};hw.defaultProps={children:void 0,className:""},hw.propTypes={children:Rt.any,className:Rt.string};var bN={exports:{}},xfe=Bt,Sfe=pn,wN=Qn.f;xfe({target:"Object",stat:!0,forced:Object.defineProperty!==wN,sham:!Sfe},{defineProperty:wN});var _fe=qr,xN=_fe.Object,Efe=bN.exports=function(t,r,n){return xN.defineProperty(t,r,n)};xN.defineProperty.sham&&(Efe.sham=!0);var kfe=bN.exports,Tfe=kfe,SN=Tfe,$fe=SN,Ofe=$fe,Cfe=Ofe,Afe=Cfe,Ife=Afe;const Rfe=St(Ife);var Pfe=Tl,Nfe=Pfe.f("iterator"),Mfe=Nfe,jfe=Mfe,Dfe=jfe,Lfe=Dfe,Ffe=Lfe,qfe=Ffe,Bfe=qfe;const Ufe=St(Bfe);function Pl(e){"@babel/helpers - typeof";return Pl=typeof Ds=="function"&&typeof Ufe=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Ds=="function"&&t.constructor===Ds&&t!==Ds.prototype?"symbol":typeof t},Pl(e)}var zfe=Tl,Zfe=zfe.f("toPrimitive"),Vfe=Zfe,Hfe=Vfe,Wfe=Hfe,Kfe=Wfe,Gfe=Kfe,Jfe=Gfe,Yfe=Jfe;const Xfe=St(Yfe);function Qfe(e,t){if(Pl(e)!="object"||!e)return e;var r=e[Xfe];if(r!==void 0){var n=r.call(e,t||"default");if(Pl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function epe(e){var t=Qfe(e,"string");return Pl(t)=="symbol"?t:t+""}function tpe(e,t,r){return(t=epe(t))in e?Rfe(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function rpe(e){if(eR(e))return ew(e)}function npe(e){if(typeof Ds<"u"&&KP(e)!=null||e["@@iterator"]!=null)return oN(e)}function ope(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
425
425
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function At(e){return rpe(e)||npe(e)||iN(e)||ope()}var nh=function(e){return e&&e.Math==Math&&e},kn=nh(typeof globalThis=="object"&&globalThis)||nh(typeof window=="object"&&window)||nh(typeof self=="object"&&self)||nh(typeof We=="object"&&We)||function(){return this}()||Function("return this")(),mw={},to=function(e){try{return!!e()}catch{return!0}},ipe=to,ga=!ipe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),_N={},EN={}.propertyIsEnumerable,kN=Object.getOwnPropertyDescriptor,ape=kN&&!EN.call({1:2},1);_N.f=ape?function(t){var r=kN(this,t);return!!r&&r.enumerable}:EN;var TN=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},spe={}.toString,yw=function(e){return spe.call(e).slice(8,-1)},cpe=to,lpe=yw,upe="".split,dpe=cpe(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return lpe(e)=="String"?upe.call(e,""):Object(e)}:Object,oh=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},fpe=dpe,ppe=oh,gw=function(e){return fpe(ppe(e))},jn=function(e){return typeof e=="function"},hpe=jn,Nl=function(e){return typeof e=="object"?e!==null:hpe(e)},vw=kn,mpe=jn,ype=function(e){return mpe(e)?e:void 0},ih=function(e,t){return arguments.length<2?ype(vw[e]):vw[e]&&vw[e][t]},gpe=ih,vpe=gpe("navigator","userAgent")||"",$N=kn,bw=vpe,ON=$N.process,CN=$N.Deno,AN=ON&&ON.versions||CN&&CN.version,IN=AN&&AN.v8,To,ah;IN?(To=IN.split("."),ah=To[0]<4?1:To[0]+To[1]):bw&&(To=bw.match(/Edge\/(\d+)/),(!To||To[1]>=74)&&(To=bw.match(/Chrome\/(\d+)/),To&&(ah=To[1])));var bpe=ah&&+ah,RN=bpe,wpe=to,PN=!!Object.getOwnPropertySymbols&&!wpe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&RN&&RN<41}),xpe=PN,NN=xpe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Spe=jn,_pe=ih,Epe=NN,MN=Epe?function(e){return typeof e=="symbol"}:function(e){var t=_pe("Symbol");return Spe(t)&&Object(e)instanceof t},kpe=function(e){try{return String(e)}catch{return"Object"}},Tpe=jn,$pe=kpe,Ope=function(e){if(Tpe(e))return e;throw TypeError($pe(e)+" is not a function")},Cpe=Ope,jN=function(e,t){var r=e[t];return r==null?void 0:Cpe(r)},ww=jn,xw=Nl,Ape=function(e,t){var r,n;if(t==="string"&&ww(r=e.toString)&&!xw(n=r.call(e))||ww(r=e.valueOf)&&!xw(n=r.call(e))||t!=="string"&&ww(r=e.toString)&&!xw(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},DN={exports:{}},LN=kn,Sw=function(e,t){try{Object.defineProperty(LN,e,{value:t,configurable:!0,writable:!0})}catch{LN[e]=t}return t},Ipe=kn,Rpe=Sw,FN="__core-js_shared__",Ppe=Ipe[FN]||Rpe(FN,{}),_w=Ppe,qN=_w;(DN.exports=function(e,t){return qN[e]||(qN[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Ew=DN.exports,Npe=oh,BN=function(e){return Object(Npe(e))},Mpe=BN,jpe={}.hasOwnProperty,va=Object.hasOwn||function(t,r){return jpe.call(Mpe(t),r)},Dpe=0,Lpe=Math.random(),UN=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++Dpe+Lpe).toString(36)},Fpe=kn,qpe=Ew,zN=va,Bpe=UN,ZN=PN,Upe=NN,Ml=qpe("wks"),jl=Fpe.Symbol,zpe=Upe?jl:jl&&jl.withoutSetter||Bpe,Dl=function(e){return(!zN(Ml,e)||!(ZN||typeof Ml[e]=="string"))&&(ZN&&zN(jl,e)?Ml[e]=jl[e]:Ml[e]=zpe("Symbol."+e)),Ml[e]},VN=Nl,HN=MN,Zpe=jN,Vpe=Ape,Hpe=Dl,Wpe=Hpe("toPrimitive"),Kpe=function(e,t){if(!VN(e)||HN(e))return e;var r=Zpe(e,Wpe),n;if(r){if(t===void 0&&(t="default"),n=r.call(e,t),!VN(n)||HN(n))return n;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),Vpe(e,t)},Gpe=Kpe,Jpe=MN,WN=function(e){var t=Gpe(e,"string");return Jpe(t)?t:String(t)},Ype=kn,KN=Nl,kw=Ype.document,Xpe=KN(kw)&&KN(kw.createElement),GN=function(e){return Xpe?kw.createElement(e):{}},Qpe=ga,ehe=to,the=GN,JN=!Qpe&&!ehe(function(){return Object.defineProperty(the("div"),"a",{get:function(){return 7}}).a!=7}),rhe=ga,nhe=_N,ohe=TN,ihe=gw,ahe=WN,she=va,che=JN,YN=Object.getOwnPropertyDescriptor;mw.f=rhe?YN:function(t,r){if(t=ihe(t),r=ahe(r),che)try{return YN(t,r)}catch{}if(she(t,r))return ohe(!nhe.f.call(t,r),t[r])};var Ll={},lhe=Nl,Ni=function(e){if(lhe(e))return e;throw TypeError(String(e)+" is not an object")},uhe=ga,dhe=JN,XN=Ni,fhe=WN,QN=Object.defineProperty;Ll.f=uhe?QN:function(t,r,n){if(XN(t),r=fhe(r),XN(n),dhe)try{return QN(t,r,n)}catch{}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var phe=ga,hhe=Ll,mhe=TN,sh=phe?function(e,t,r){return hhe.f(e,t,mhe(1,r))}:function(e,t,r){return e[t]=r,e},eM={exports:{}},yhe=jn,Tw=_w,ghe=Function.toString;yhe(Tw.inspectSource)||(Tw.inspectSource=function(e){return ghe.call(e)});var tM=Tw.inspectSource,vhe=kn,bhe=jn,whe=tM,rM=vhe.WeakMap,xhe=bhe(rM)&&/native code/.test(whe(rM)),She=Ew,_he=UN,nM=She("keys"),oM=function(e){return nM[e]||(nM[e]=_he(e))},$w={},Ehe=xhe,khe=kn,The=Nl,$he=sh,Ow=va,Cw=_w,Ohe=oM,Che=$w,iM="Object already initialized",Ahe=khe.WeakMap,ch,Fl,lh,Ihe=function(e){return lh(e)?Fl(e):ch(e,{})},Rhe=function(e){return function(t){var r;if(!The(t)||(r=Fl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(Ehe||Cw.state){var ba=Cw.state||(Cw.state=new Ahe),Phe=ba.get,aM=ba.has,Nhe=ba.set;ch=function(e,t){if(aM.call(ba,e))throw new TypeError(iM);return t.facade=e,Nhe.call(ba,e,t),t},Fl=function(e){return Phe.call(ba,e)||{}},lh=function(e){return aM.call(ba,e)}}else{var Ls=Ohe("state");Che[Ls]=!0,ch=function(e,t){if(Ow(e,Ls))throw new TypeError(iM);return t.facade=e,$he(e,Ls,t),t},Fl=function(e){return Ow(e,Ls)?e[Ls]:{}},lh=function(e){return Ow(e,Ls)}}var sM={set:ch,get:Fl,has:lh,enforce:Ihe,getterFor:Rhe},Aw=ga,Mhe=va,cM=Function.prototype,jhe=Aw&&Object.getOwnPropertyDescriptor,Iw=Mhe(cM,"name"),Dhe=Iw&&(function(){}).name==="something",Lhe=Iw&&(!Aw||Aw&&jhe(cM,"name").configurable),Rw={EXISTS:Iw,PROPER:Dhe,CONFIGURABLE:Lhe},Fhe=kn,lM=jn,qhe=va,uM=sh,Bhe=Sw,Uhe=tM,dM=sM,zhe=Rw.CONFIGURABLE,Zhe=dM.get,Vhe=dM.enforce,Hhe=String(String).split("String");(eM.exports=function(e,t,r,n){var o=n?!!n.unsafe:!1,i=n?!!n.enumerable:!1,a=n?!!n.noTargetGet:!1,s=n&&n.name!==void 0?n.name:t,c;if(lM(r)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!qhe(r,"name")||zhe&&r.name!==s)&&uM(r,"name",s),c=Vhe(r),c.source||(c.source=Hhe.join(typeof s=="string"?s:""))),e===Fhe){i?e[t]=r:Bhe(t,r);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=r:uM(e,t,r)})(Function.prototype,"toString",function(){return lM(this)&&Zhe(this).source||Uhe(this)});var ql=eM.exports,fM={},Whe=Math.ceil,Khe=Math.floor,uh=function(e){var t=+e;return t!==t||t===0?0:(t>0?Khe:Whe)(t)},Ghe=uh,Jhe=Math.max,Yhe=Math.min,Xhe=function(e,t){var r=Ghe(e);return r<0?Jhe(r+t,0):Yhe(r,t)},Qhe=uh,eme=Math.min,pM=function(e){return e>0?eme(Qhe(e),9007199254740991):0},tme=pM,rme=function(e){return tme(e.length)},nme=gw,ome=Xhe,ime=rme,hM=function(e){return function(t,r,n){var o=nme(t),i=ime(o),a=ome(n,i),s;if(e&&r!=r){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===r)return e||a||0;return!e&&-1}},ame={includes:hM(!0),indexOf:hM(!1)},Pw=va,sme=gw,cme=ame.indexOf,lme=$w,mM=function(e,t){var r=sme(e),n=0,o=[],i;for(i in r)!Pw(lme,i)&&Pw(r,i)&&o.push(i);for(;t.length>n;)Pw(r,i=t[n++])&&(~cme(o,i)||o.push(i));return o},Nw=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ume=mM,dme=Nw,fme=dme.concat("length","prototype");fM.f=Object.getOwnPropertyNames||function(t){return ume(t,fme)};var yM={};yM.f=Object.getOwnPropertySymbols;var pme=ih,hme=fM,mme=yM,yme=Ni,gme=pme("Reflect","ownKeys")||function(t){var r=hme.f(yme(t)),n=mme.f;return n?r.concat(n(t)):r},vme=va,bme=gme,wme=mw,xme=Ll,Sme=function(e,t){for(var r=bme(t),n=xme.f,o=wme.f,i=0;i<r.length;i++){var a=r[i];vme(e,a)||n(e,a,o(t,a))}},_me=to,Eme=jn,kme=/#|\.prototype\./,Bl=function(e,t){var r=$me[Tme(e)];return r==Cme?!0:r==Ome?!1:Eme(t)?_me(t):!!t},Tme=Bl.normalize=function(e){return String(e).replace(kme,".").toLowerCase()},$me=Bl.data={},Ome=Bl.NATIVE="N",Cme=Bl.POLYFILL="P",Ame=Bl,Mw=kn,Ime=mw.f,Rme=sh,Pme=ql,Nme=Sw,Mme=Sme,jme=Ame,Dme=function(e,t){var r=e.target,n=e.global,o=e.stat,i,a,s,c,l,u;if(n?a=Mw:o?a=Mw[r]||Nme(r,{}):a=(Mw[r]||{}).prototype,a)for(s in t){if(l=t[s],e.noTargetGet?(u=Ime(a,s),c=u&&u.value):c=a[s],i=jme(n?s:r+(o?".":"#")+s,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;Mme(l,c)}(e.sham||c&&c.sham)&&Rme(l,"sham",!0),Pme(a,s,l,e)}},Lme=Dl,Fme=Lme("toStringTag"),gM={};gM[Fme]="z";var jw=String(gM)==="[object z]",qme=jw,Bme=jn,dh=yw,Ume=Dl,zme=Ume("toStringTag"),Zme=dh(function(){return arguments}())=="Arguments",Vme=function(e,t){try{return e[t]}catch{}},vM=qme?dh:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=Vme(t=Object(e),zme))=="string"?r:Zme?dh(t):(n=dh(t))=="Object"&&Bme(t.callee)?"Arguments":n},Hme=vM,fh=function(e){if(Hme(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},Wme=Ni,bM=function(){var e=Wme(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},Dw={},wM=to,Kme=kn,xM=Kme.RegExp;Dw.UNSUPPORTED_Y=wM(function(){var e=xM("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Dw.BROKEN_CARET=wM(function(){var e=xM("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var Gme=mM,Jme=Nw,Yme=Object.keys||function(t){return Gme(t,Jme)},Xme=ga,Qme=Ll,eye=Ni,tye=Yme,rye=Xme?Object.defineProperties:function(t,r){eye(t);for(var n=tye(r),o=n.length,i=0,a;o>i;)Qme.f(t,a=n[i++],r[a]);return t},nye=ih,oye=nye("document","documentElement"),iye=Ni,aye=rye,SM=Nw,sye=$w,cye=oye,lye=GN,uye=oM,_M=">",EM="<",Lw="prototype",Fw="script",kM=uye("IE_PROTO"),qw=function(){},TM=function(e){return EM+Fw+_M+e+EM+"/"+Fw+_M},$M=function(e){e.write(TM("")),e.close();var t=e.parentWindow.Object;return e=null,t},dye=function(){var e=lye("iframe"),t="java"+Fw+":",r;return e.style.display="none",cye.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(TM("document.F=Object")),r.close(),r.F},ph,hh=function(){try{ph=new ActiveXObject("htmlfile")}catch{}hh=typeof document<"u"?document.domain&&ph?$M(ph):dye():$M(ph);for(var e=SM.length;e--;)delete hh[Lw][SM[e]];return hh()};sye[kM]=!0;var fye=Object.create||function(t,r){var n;return t!==null?(qw[Lw]=iye(t),n=new qw,qw[Lw]=null,n[kM]=t):n=hh(),r===void 0?n:aye(n,r)},pye=to,hye=kn,mye=hye.RegExp,yye=pye(function(){var e=mye(".","s");return!(e.dotAll&&e.exec(`
426
426
  `)&&e.flags==="s")}),gye=to,vye=kn,bye=vye.RegExp,wye=gye(function(){var e=bye("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),xye=fh,Sye=bM,OM=Dw,_ye=Ew,Eye=fye,kye=sM.get,Tye=yye,$ye=wye,mh=RegExp.prototype.exec,Oye=_ye("native-string-replace",String.prototype.replace),Bw=mh,Uw=function(){var e=/a/,t=/b*/g;return mh.call(e,"a"),mh.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),CM=OM.UNSUPPORTED_Y||OM.BROKEN_CARET,zw=/()??/.exec("")[1]!==void 0,Cye=Uw||zw||CM||Tye||$ye;Cye&&(Bw=function(t){var r=this,n=kye(r),o=xye(t),i=n.raw,a,s,c,l,u,d,p;if(i)return i.lastIndex=r.lastIndex,a=Bw.call(i,o),r.lastIndex=i.lastIndex,a;var f=n.groups,h=CM&&r.sticky,y=Sye.call(r),m=r.source,g=0,v=o;if(h&&(y=y.replace("y",""),y.indexOf("g")===-1&&(y+="g"),v=o.slice(r.lastIndex),r.lastIndex>0&&(!r.multiline||r.multiline&&o.charAt(r.lastIndex-1)!==`
427
- `)&&(m="(?: "+m+")",v=" "+v,g++),s=new RegExp("^(?:"+m+")",y)),zw&&(s=new RegExp("^"+m+"$(?!\\s)",y)),Uw&&(c=r.lastIndex),l=mh.call(h?s:r,v),h?l?(l.input=l.input.slice(g),l[0]=l[0].slice(g),l.index=r.lastIndex,r.lastIndex+=l[0].length):r.lastIndex=0:Uw&&l&&(r.lastIndex=r.global?l.index+l[0].length:c),zw&&l&&l.length>1&&Oye.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&f)for(l.groups=d=Eye(null),u=0;u<f.length;u++)p=f[u],d[p[0]]=l[p[1]];return l});var Zw=Bw,Aye=Dme,AM=Zw;Aye({target:"RegExp",proto:!0,forced:/./.exec!==AM},{exec:AM});var IM=ql,Iye=Zw,RM=to,PM=Dl,Rye=sh,Pye=PM("species"),Vw=RegExp.prototype,Nye=function(e,t,r,n){var o=PM(e),i=!RM(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!RM(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Pye]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return l=!0,null},u[o](""),!l});if(!i||!a||r){var s=/./[o],c=t(o,""[e],function(l,u,d,p,f){var h=u.exec;return h===Iye||h===Vw.exec?i&&!f?{done:!0,value:s.call(u,d,p)}:{done:!0,value:l.call(d,u,p)}:{done:!1}});IM(String.prototype,e,c[0]),IM(Vw,o,c[1])}n&&Rye(Vw[o],"sham",!0)},Mye=uh,jye=fh,Dye=oh,NM=function(e){return function(t,r){var n=jye(Dye(t)),o=Mye(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=n.charCodeAt(o),a<55296||a>56319||o+1===i||(s=n.charCodeAt(o+1))<56320||s>57343?e?n.charAt(o):a:e?n.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},Lye={codeAt:NM(!1),charAt:NM(!0)},Fye=Lye.charAt,qye=function(e,t,r){return t+(r?Fye(e,t).length:1)},Bye=BN,Uye=Math.floor,zye="".replace,Zye=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Vye=/\$([$&'`]|\d{1,2})/g,Hye=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=Vye;return o!==void 0&&(o=Bye(o),c=Zye),zye.call(i,c,function(l,u){var d;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":d=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return l;if(p>s){var f=Uye(p/10);return f===0?l:f<=s?n[f-1]===void 0?u.charAt(1):n[f-1]+u.charAt(1):l}d=n[p-1]}return d===void 0?"":d})},Wye=Ni,Kye=jn,Gye=yw,Jye=Zw,Yye=function(e,t){var r=e.exec;if(Kye(r)){var n=r.call(e,t);return n!==null&&Wye(n),n}if(Gye(e)==="RegExp")return Jye.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Xye=Nye,Qye=to,ege=Ni,tge=jn,rge=uh,nge=pM,Fs=fh,oge=oh,ige=qye,age=jN,sge=Hye,cge=Yye,lge=Dl,Hw=lge("replace"),uge=Math.max,dge=Math.min,fge=function(e){return e===void 0?e:String(e)},pge=function(){return"a".replace(/./,"$0")==="$0"}(),MM=function(){return/./[Hw]?/./[Hw]("a","$0")==="":!1}(),hge=!Qye(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Xye("replace",function(e,t,r){var n=MM?"$":"$0";return[function(i,a){var s=oge(this),c=i==null?void 0:age(i,Hw);return c?c.call(i,s,a):t.call(Fs(s),i,a)},function(o,i){var a=ege(this),s=Fs(o);if(typeof i=="string"&&i.indexOf(n)===-1&&i.indexOf("$<")===-1){var c=r(t,a,s,i);if(c.done)return c.value}var l=tge(i);l||(i=Fs(i));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var p=[];;){var f=cge(a,s);if(f===null||(p.push(f),!u))break;var h=Fs(f[0]);h===""&&(a.lastIndex=ige(s,nge(a.lastIndex),d))}for(var y="",m=0,g=0;g<p.length;g++){f=p[g];for(var v=Fs(f[0]),b=uge(dge(rge(f.index),s.length),0),x=[],w=1;w<f.length;w++)x.push(fge(f[w]));var S=f.groups;if(l){var C=[v].concat(x,b,s);S!==void 0&&C.push(S);var I=Fs(i.apply(void 0,C))}else I=sge(v,s,b,x,S,i);b>=m&&(y+=s.slice(m,b)+I,m=b+v.length)}return y+s.slice(m)}]},!hge||!pge||MM);var Ul=Sr,mge=Vv,yge=fa,yh=function(e){return mge.slice(0,e.length)===e},gge=function(){return yh("Bun/")?"BUN":yh("Cloudflare-Workers")?"CLOUDFLARE":yh("Deno/")?"DENO":yh("Node.js/")?"NODE":Ul.Bun&&typeof Bun.version=="string"?"BUN":Ul.Deno&&typeof Deno.version=="object"?"DENO":yge(Ul.process)==="process"?"NODE":Ul.window&&Ul.document?"BROWSER":"REST"}(),vge=TypeError,bge=function(e,t){if(e<t)throw new vge("Not enough arguments");return e},jM=Sr,wge=Mv,xge=Qr,Sge=gge,_ge=Vv,Ege=qp,kge=bge,Tge=jM.Function,$ge=/MSIE .\./.test(_ge)||Sge==="BUN"&&function(){var e=jM.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),DM=function(e,t){var r=t?2:1;return $ge?function(n,o){var i=kge(arguments.length,1)>r,a=xge(n)?n:Tge(n),s=i?Ege(arguments,r):[],c=i?function(){wge(a,this,s)}:a;return t?e(c,o):e(c)}:e},Oge=Bt,LM=Sr,Cge=DM,FM=Cge(LM.setInterval,!0);Oge({global:!0,bind:!0,forced:LM.setInterval!==FM},{setInterval:FM});var Age=Bt,qM=Sr,Ige=DM,BM=Ige(qM.setTimeout,!0);Age({global:!0,bind:!0,forced:qM.setTimeout!==BM},{setTimeout:BM});var Rge=qr,Pge=Rge.setInterval,Nge=Pge;const Mge=St(Nge);var jge=_r,UM=function(e,t){var r=[][e];return!!r&&jge(function(){r.call(null,t||function(){return 1},1)})},Dge=Bt,Lge=Dv,Fge=fR.indexOf,qge=UM,Ww=Lge([].indexOf),zM=!!Ww&&1/Ww([1],1,-0)<0,Bge=zM||!qge("indexOf");Dge({target:"Array",proto:!0,forced:Bge},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return zM?Ww(this,t,r)||0:Fge(this,t,r)}});var Uge=ya,zge=Uge("Array","indexOf"),Zge=Xo,Vge=zge,Kw=Array.prototype,Hge=function(e){var t=e.indexOf;return e===Kw||Zge(Kw,e)&&t===Kw.indexOf?Vge:t},Wge=Hge,Kge=Wge,Gge=Kge;const Jge=St(Gge);var ZM=Op,Yge=TypeError,Xge=function(e,t){if(!delete e[t])throw new Yge("Cannot delete property "+ZM(t)+" of "+ZM(e))},Qge=Bt,eve=Qo,tve=mb,rve=Ip,nve=pa,ove=GP,ive=lb,ave=hb,sve=Sl,Gw=Xge,cve=Pp,lve=cve("splice"),uve=Math.max,dve=Math.min;Qge({target:"Array",proto:!0,forced:!lve},{splice:function(t,r){var n=eve(this),o=nve(n),i=tve(t,o),a=arguments.length,s,c,l,u,d,p;for(a===0?s=c=0:a===1?(s=0,c=o-i):(s=a-2,c=dve(uve(rve(r),0),o-i)),ive(o+s-c),l=ave(n,c),u=0;u<c;u++)d=i+u,d in n&&sve(l,u,n[d]);if(l.length=c,s<c){for(u=i;u<o-c;u++)d=u+c,p=u+s,d in n?n[p]=n[d]:Gw(n,p);for(u=o;u>o-c+s;u--)Gw(n,u-1)}else if(s>c)for(u=o-c;u>i;u--)d=u+c-1,p=u+s-1,d in n?n[p]=n[d]:Gw(n,p);for(u=0;u<s;u++)n[u+i]=arguments[u+2];return ove(n,o-c+s),l}});var fve=ya,pve=fve("Array","splice"),hve=Xo,mve=pve,Jw=Array.prototype,yve=function(e){var t=e.splice;return e===Jw||hve(Jw,e)&&t===Jw.splice?mve:t},gve=yve,vve=gve,bve=vve;const wve=St(bve);var xve=ya,Sve=xve("Array","concat"),_ve=Xo,Eve=Sve,Yw=Array.prototype,kve=function(e){var t=e.concat;return e===Yw||_ve(Yw,e)&&t===Yw.concat?Eve:t},Tve=kve,$ve=Tve,Ove=$ve;const nr=St(Ove);var Cve=Bt,Ave=Er,VM=Date,Ive=Ave(VM.prototype.getTime);Cve({target:"Date",stat:!0},{now:function(){return Ive(new VM)}});var Rve=qr,Pve=Rve.Date.now,Nve=Pve,Mve=Nve,jve=Mve;const Mi=St(jve);var Dve=$b.forEach,Lve=UM,Fve=Lve("forEach"),qve=Fve?[].forEach:function(t){return Dve(this,t,arguments.length>1?arguments[1]:void 0)},Bve=Bt,HM=qve;Bve({target:"Array",proto:!0,forced:[].forEach!==HM},{forEach:HM});var Uve=ya,zve=Uve("Array","forEach"),Zve=zve,Vve=Zve,Hve=_l,Wve=En,Kve=Xo,Gve=Vve,Xw=Array.prototype,Jve={DOMTokenList:!0,NodeList:!0},Yve=function(e){var t=e.forEach;return e===Xw||Kve(Xw,e)&&t===Xw.forEach||Wve(Jve,Hve(e))?Gve:t},Xve=Yve;const gh=St(Xve);var Qve=Bt,ebe=Qo,WM=vb,tbe=_r,rbe=tbe(function(){WM(1)});Qve({target:"Object",stat:!0,forced:rbe},{keys:function(t){return WM(ebe(t))}});var nbe=qr,obe=nbe.Object.keys,ibe=obe,abe=ibe,sbe=abe;const cbe=St(sbe);var lbe=qr,ube=lbe.Object.getOwnPropertySymbols,dbe=ube,fbe=dbe,pbe=fbe;const KM=St(pbe);var hbe=Bt,mbe=$b.filter,ybe=Pp,gbe=ybe("filter");hbe({target:"Array",proto:!0,forced:!gbe},{filter:function(t){return mbe(this,t,arguments.length>1?arguments[1]:void 0)}});var vbe=ya,bbe=vbe("Array","filter"),wbe=Xo,xbe=bbe,Qw=Array.prototype,Sbe=function(e){var t=e.filter;return e===Qw||wbe(Qw,e)&&t===Qw.filter?xbe:t},_be=Sbe,Ebe=_be,kbe=Ebe;const Tbe=St(kbe);var GM={exports:{}},$be=Bt,Obe=_r,Cbe=So,JM=gl.f,YM=pn,Abe=!YM||Obe(function(){JM(1)});$be({target:"Object",stat:!0,forced:Abe,sham:!YM},{getOwnPropertyDescriptor:function(t,r){return JM(Cbe(t),r)}});var Ibe=qr,XM=Ibe.Object,Rbe=GM.exports=function(t,r){return XM.getOwnPropertyDescriptor(t,r)};XM.getOwnPropertyDescriptor.sham&&(Rbe.sham=!0);var Pbe=GM.exports,Nbe=Pbe,Mbe=Nbe,jbe=Mbe;const QM=St(jbe);var Dbe=_o,Lbe=Er,Fbe=Fp,qbe=Bp,Bbe=Ii,Ube=Lbe([].concat),zbe=Dbe("Reflect","ownKeys")||function(t){var r=Fbe.f(Bbe(t)),n=qbe.f;return n?Ube(r,n(t)):r},Zbe=Bt,Vbe=pn,Hbe=zbe,Wbe=So,Kbe=gl,Gbe=Sl;Zbe({target:"Object",stat:!0,sham:!Vbe},{getOwnPropertyDescriptors:function(t){for(var r=Wbe(t),n=Kbe.f,o=Hbe(r),i={},a=0,s,c;o.length>a;)c=n(r,s=o[a++]),c!==void 0&&Gbe(i,s,c);return i}});var Jbe=qr,Ybe=Jbe.Object.getOwnPropertyDescriptors,Xbe=Ybe,Qbe=Xbe,ewe=Qbe;const ej=St(ewe);var tj={exports:{}},twe=Bt,rwe=pn,rj=Np.f;twe({target:"Object",stat:!0,forced:Object.defineProperties!==rj,sham:!rwe},{defineProperties:rj});var nwe=qr,nj=nwe.Object,owe=tj.exports=function(t,r){return nj.defineProperties(t,r)};nj.defineProperties.sham&&(owe.sham=!0);var iwe=tj.exports,awe=iwe,swe=awe,cwe=swe;const lwe=St(cwe);var uwe=SN;const dwe=St(uwe);var fwe=!1;function pwe(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 hwe(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 mwe=function(){function e(r){var n=this;this._insertTag=function(o){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,i),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!fwe:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hwe(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=pwe(o);try{i.insertRule(n,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),en="-ms-",vh="-moz-",Mt="-webkit-",oj="comm",e0="rule",t0="decl",ywe="@import",ij="@keyframes",gwe="@layer",vwe=Math.abs,bh=String.fromCharCode,bwe=Object.assign;function wwe(e,t){return Br(e,0)^45?(((t<<2^Br(e,0))<<2^Br(e,1))<<2^Br(e,2))<<2^Br(e,3):0}function aj(e){return e.trim()}function xwe(e,t){return(e=t.exec(e))?e[0]:e}function jt(e,t,r){return e.replace(t,r)}function r0(e,t){return e.indexOf(t)}function Br(e,t){return e.charCodeAt(t)|0}function zl(e,t,r){return e.slice(t,r)}function $o(e){return e.length}function n0(e){return e.length}function wh(e,t){return t.push(e),e}function Swe(e,t){return e.map(t).join("")}var xh=1,qs=1,sj=0,mn=0,yr=0,Bs="";function Sh(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:xh,column:qs,length:a,return:""}}function Zl(e,t){return bwe(Sh("",null,null,"",null,null,0),e,{length:-e.length},t)}function _we(){return yr}function Ewe(){return yr=mn>0?Br(Bs,--mn):0,qs--,yr===10&&(qs=1,xh--),yr}function Tn(){return yr=mn<sj?Br(Bs,mn++):0,qs++,yr===10&&(qs=1,xh++),yr}function Oo(){return Br(Bs,mn)}function _h(){return mn}function Vl(e,t){return zl(Bs,e,t)}function Hl(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 cj(e){return xh=qs=1,sj=$o(Bs=e),mn=0,[]}function lj(e){return Bs="",e}function Eh(e){return aj(Vl(mn-1,o0(e===91?e+2:e===40?e+1:e)))}function kwe(e){for(;(yr=Oo())&&yr<33;)Tn();return Hl(e)>2||Hl(yr)>3?"":" "}function Twe(e,t){for(;--t&&Tn()&&!(yr<48||yr>102||yr>57&&yr<65||yr>70&&yr<97););return Vl(e,_h()+(t<6&&Oo()==32&&Tn()==32))}function o0(e){for(;Tn();)switch(yr){case e:return mn;case 34:case 39:e!==34&&e!==39&&o0(yr);break;case 40:e===41&&o0(e);break;case 92:Tn();break}return mn}function $we(e,t){for(;Tn()&&e+yr!==47+10;)if(e+yr===42+42&&Oo()===47)break;return"/*"+Vl(t,mn-1)+"*"+bh(e===47?e:Tn())}function Owe(e){for(;!Hl(Oo());)Tn();return Vl(e,mn)}function Cwe(e){return lj(kh("",null,null,null,[""],e=cj(e),0,[0],e))}function kh(e,t,r,n,o,i,a,s,c){for(var l=0,u=0,d=a,p=0,f=0,h=0,y=1,m=1,g=1,v=0,b="",x=o,w=i,S=n,C=b;m;)switch(h=v,v=Tn()){case 40:if(h!=108&&Br(C,d-1)==58){r0(C+=jt(Eh(v),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:C+=Eh(v);break;case 9:case 10:case 13:case 32:C+=kwe(h);break;case 92:C+=Twe(_h()-1,7);continue;case 47:switch(Oo()){case 42:case 47:wh(Awe($we(Tn(),_h()),t,r),c);break;default:C+="/"}break;case 123*y:s[l++]=$o(C)*g;case 125*y:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+u:g==-1&&(C=jt(C,/\f/g,"")),f>0&&$o(C)-d&&wh(f>32?dj(C+";",n,r,d-1):dj(jt(C," ","")+";",n,r,d-2),c);break;case 59:C+=";";default:if(wh(S=uj(C,t,r,l,u,o,s,b,x=[],w=[],d),i),v===123)if(u===0)kh(C,t,S,S,x,i,d,s,w);else switch(p===99&&Br(C,3)===110?100:p){case 100:case 108:case 109:case 115:kh(e,S,S,n&&wh(uj(e,S,S,0,0,o,s,b,o,x=[],d),w),o,w,d,s,n?x:w);break;default:kh(C,S,S,S,[""],w,0,s,w)}}l=u=f=0,y=g=1,b=C="",d=a;break;case 58:d=1+$o(C),f=h;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&Ewe()==125)continue}switch(C+=bh(v),v*y){case 38:g=u>0?1:(C+="\f",-1);break;case 44:s[l++]=($o(C)-1)*g,g=1;break;case 64:Oo()===45&&(C+=Eh(Tn())),p=Oo(),u=d=$o(b=C+=Owe(_h())),v++;break;case 45:h===45&&$o(C)==2&&(y=0)}}return i}function uj(e,t,r,n,o,i,a,s,c,l,u){for(var d=o-1,p=o===0?i:[""],f=n0(p),h=0,y=0,m=0;h<n;++h)for(var g=0,v=zl(e,d+1,d=vwe(y=a[h])),b=e;g<f;++g)(b=aj(y>0?p[g]+" "+v:jt(v,/&\f/g,p[g])))&&(c[m++]=b);return Sh(e,t,r,o===0?e0:s,c,l,u)}function Awe(e,t,r){return Sh(e,t,r,oj,bh(_we()),zl(e,2,-2),0)}function dj(e,t,r,n){return Sh(e,t,r,t0,zl(e,0,n),zl(e,n+1,-1),n)}function Us(e,t){for(var r="",n=n0(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Iwe(e,t,r,n){switch(e.type){case gwe:if(e.children.length)break;case ywe:case t0:return e.return=e.return||e.value;case oj:return"";case ij:return e.return=e.value+"{"+Us(e.children,n)+"}";case e0:e.value=e.props.join(",")}return $o(r=Us(e.children,n))?e.return=e.value+"{"+r+"}":""}function Rwe(e){var t=n0(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function Pwe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Nwe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Mwe=function(t,r,n){for(var o=0,i=0;o=i,i=Oo(),o===38&&i===12&&(r[n]=1),!Hl(i);)Tn();return Vl(t,mn)},jwe=function(t,r){var n=-1,o=44;do switch(Hl(o)){case 0:o===38&&Oo()===12&&(r[n]=1),t[n]+=Mwe(mn-1,r,n);break;case 2:t[n]+=Eh(o);break;case 4:if(o===44){t[++n]=Oo()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=bh(o)}while(o=Tn());return t},Dwe=function(t,r){return lj(jwe(cj(t),r))},fj=new WeakMap,Lwe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!fj.get(n))&&!o){fj.set(t,!0);for(var i=[],a=Dwe(r,i),s=n.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Fwe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function pj(e,t){switch(wwe(e,t)){case 5103:return Mt+"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 Mt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Mt+e+vh+e+en+e+e;case 6828:case 4268:return Mt+e+en+e+e;case 6165:return Mt+e+en+"flex-"+e+e;case 5187:return Mt+e+jt(e,/(\w+).+(:[^]+)/,Mt+"box-$1$2"+en+"flex-$1$2")+e;case 5443:return Mt+e+en+"flex-item-"+jt(e,/flex-|-self/,"")+e;case 4675:return Mt+e+en+"flex-line-pack"+jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Mt+e+en+jt(e,"shrink","negative")+e;case 5292:return Mt+e+en+jt(e,"basis","preferred-size")+e;case 6060:return Mt+"box-"+jt(e,"-grow","")+Mt+e+en+jt(e,"grow","positive")+e;case 4554:return Mt+jt(e,/([^-])(transform)/g,"$1"+Mt+"$2")+e;case 6187:return jt(jt(jt(e,/(zoom-|grab)/,Mt+"$1"),/(image-set)/,Mt+"$1"),e,"")+e;case 5495:case 3959:return jt(e,/(image-set\([^]*)/,Mt+"$1$`$1");case 4968:return jt(jt(e,/(.+:)(flex-)?(.*)/,Mt+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mt+e+e;case 4095:case 3583:case 4068:case 2532:return jt(e,/(.+)-inline(.+)/,Mt+"$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($o(e)-1-t>6)switch(Br(e,t+1)){case 109:if(Br(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+Mt+"$2-$3$1"+vh+(Br(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r0(e,"stretch")?pj(jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Br(e,t+1)!==115)break;case 6444:switch(Br(e,$o(e)-3-(~r0(e,"!important")&&10))){case 107:return jt(e,":",":"+Mt)+e;case 101:return jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mt+(Br(e,14)===45?"inline-":"")+"box$3$1"+Mt+"$2$3$1"+en+"$2box$3")+e}break;case 5936:switch(Br(e,t+11)){case 114:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mt+e+en+e+e}return e}var qwe=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case t0:t.return=pj(t.value,t.length);break;case ij:return Us([Zl(t,{value:jt(t.value,"@","@"+Mt)})],o);case e0:if(t.length)return Swe(t.props,function(i){switch(xwe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Us([Zl(t,{props:[jt(i,/:(read-\w+)/,":"+vh+"$1")]})],o);case"::placeholder":return Us([Zl(t,{props:[jt(i,/:(plac\w+)/,":"+Mt+"input-$1")]}),Zl(t,{props:[jt(i,/:(plac\w+)/,":"+vh+"$1")]}),Zl(t,{props:[jt(i,/:(plac\w+)/,en+"input-$1")]})],o)}return""})}},Bwe=[qwe],Uwe=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var m=y.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||Bwe,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var m=y.getAttribute("data-emotion").split(" "),g=1;g<m.length;g++)i[m[g]]=!0;s.push(y)});var c,l=[Lwe,Fwe];{var u,d=[Iwe,Pwe(function(y){u.insert(y)})],p=Rwe(l.concat(o,d)),f=function(m){return Us(Cwe(m),p)};c=function(m,g,v,b){u=v,f(m?m+"{"+g.styles+"}":g.styles),b&&(h.inserted[g.name]=!0)}}var h={key:r,sheet:new mwe({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return h.sheet.hydrate(s),h};function zwe(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Zwe={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},Vwe=!1,Hwe=/[A-Z]|^ms/g,Wwe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hj=function(t){return t.charCodeAt(1)===45},mj=function(t){return t!=null&&typeof t!="boolean"},i0=Nwe(function(e){return hj(e)?e:e.replace(Hwe,"-$&").toLowerCase()}),yj=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Wwe,function(n,o,i){return Co={name:o,styles:i,next:Co},o})}return Zwe[t]!==1&&!hj(t)&&typeof r=="number"&&r!==0?r+"px":r},Kwe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Wl(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Co={name:o.name,styles:o.styles,next:Co},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Co={name:a.name,styles:a.styles,next:Co},a=a.next;var s=i.styles+";";return s}return Gwe(e,t,r)}case"function":{if(e!==void 0){var c=Co,l=r(e);return Co=c,Wl(e,t,l)}break}}var u=r;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function Gwe(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Wl(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":mj(s)&&(n+=i0(i)+":"+yj(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Vwe)throw new Error(Kwe);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)mj(a[c])&&(n+=i0(i)+":"+yj(i,a[c])+";");else{var l=Wl(e,t,a);switch(i){case"animation":case"animationName":{n+=i0(i)+":"+l+";";break}default:n+=i+"{"+l+"}"}}}}return n}var gj=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Co;function a0(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Co=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Wl(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Wl(r,t,e[s]),n){var c=i;o+=c[s]}gj.lastIndex=0;for(var l="",u;(u=gj.exec(o))!==null;)l+="-"+u[1];var d=zwe(o)+l;return{name:d,styles:o,next:Co}}var Jwe=!0;function vj(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var Ywe=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Jwe===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Xwe=function(t,r,n){Ywe(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function bj(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function wj(e,t,r){var n=[],o=vj(e,n,r);return n.length<2?r:o+t(n)}var Qwe=function(t){var r=Uwe(t);r.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},r.compat=!0;var n=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered,void 0);return Xwe(r,d,!1),r.key+"-"+d.name},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered),p="animation-"+d.name;return bj(r,{name:d.name,styles:"@keyframes "+p+"{"+d.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered);bj(r,d)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return wj(r.registered,n,e0e(l))};return{css:n,cx:a,injectGlobal:i,keyframes:o,hydrate:function(c){c.forEach(function(l){r.inserted[l]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:vj.bind(null,r.registered),merge:wj.bind(null,r.registered,n)}},e0e=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},t0e=ql,s0=Date.prototype,xj="Invalid Date",Sj="toString",r0e=s0[Sj],n0e=s0.getTime;String(new Date(NaN))!=xj&&t0e(s0,Sj,function(){var t=n0e.call(this);return t===t?r0e.call(this):xj});var o0e=jw,i0e=vM,a0e=o0e?{}.toString:function(){return"[object "+i0e(this)+"]"},s0e=jw,c0e=ql,l0e=a0e;s0e||c0e(Object.prototype,"toString",l0e,{unsafe:!0});var u0e=Rw.PROPER,d0e=ql,f0e=Ni,_j=fh,p0e=to,h0e=bM,c0="toString",Ej=RegExp.prototype,kj=Ej[c0],m0e=p0e(function(){return kj.call({source:"a",flags:"b"})!="/a/b"}),y0e=u0e&&kj.name!=c0;(m0e||y0e)&&d0e(RegExp.prototype,c0,function(){var t=f0e(this),r=_j(t.source),n=t.flags,o=_j(n===void 0&&t instanceof RegExp&&!("flags"in Ej)?h0e.call(t):n);return"/"+r+"/"+o},{unsafe:!0});var Tj=typeof window<"u"?window:self,g0e=Tj.crypto||Tj.msCrypto,v0e=function(e){if(!e)return Math.random;var t=Math.pow(2,32),r=new Uint32Array(1);return function(){return e.getRandomValues(r)[0]/t}}(g0e);const b0e=St(v0e);function w0e(){return b0e().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var x0e=QI;const $j=St(x0e);function qt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",r="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(r+=" color: ".concat(t,";")),[r,""]}function Oj(e,t){for(var r,n,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return nr(r=[nr(n="%c".concat(e,"%c ")).call(n,t)]).call(r,At(qt("green","white")),i)}function S0e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.force,n=r===void 0?!1:r;return n?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,c=ko(s,1),l=c[0];typeof l=="function"&&(i=l());var u=$j(i[0])?i:[i],d=u.length===1;gh(u).call(u,function(p,f){if(d){var h,y;(h=console).log.apply(h,At(Oj.apply(void 0,nr(y=[e]).call(y,At(p)))))}else if(f){var m;(m=console).log.apply(m,At($j(p)?p:[p]))}else{var g,v;(g=console).groupCollapsed.apply(g,At(Oj.apply(void 0,nr(v=[e]).call(v,At(p)))))}}),d||console.groupEnd()}}:function(){return 0}}var _0e=ga,E0e=Rw.EXISTS,k0e=Ll.f,Cj=Function.prototype,T0e=Cj.toString,$0e=/^\s*function ([^ (]*)/,O0e="name";_0e&&!E0e&&k0e(Cj,O0e,{configurable:!0,get:function(){try{return T0e.call(this).match($0e)[1]}catch{return""}}});var C0e=qr,A0e=C0e.setTimeout,I0e=A0e;const R0e=St(I0e);function P0e(e,t){if(!t)return e;var r=0,n=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Mi();s-r>t?(e.apply(void 0,i),r=s):(clearTimeout(n),n=R0e(function(){e.apply(void 0,i),r=Mi()},Math.max(0,t-s+r)))}}var Aj=function(t){var r=t.debounce,n=t.name,o=t.onEvent,i=t.target,a=$.useRef();a.current=o;var s=$.useMemo(function(){return P0e(function(l){var u=a.current;u&&u(l)},r)},[r,a]),c=$.useCallback(function(l){l.timeStampLow=Mi(),s(l)},[s]);return $.useLayoutEffect(function(){return i.addEventListener(n,c,{passive:!0}),c({target:i,type:n}),function(){return i.removeEventListener(n,c)}},[n,c,i]),!1};Aj.defaultProps={debounce:200};var N0e=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},M0e=Bt,j0e=N0e;M0e({target:"Math",stat:!0},{sign:j0e});var D0e=qr,L0e=D0e.Math.sign,F0e=L0e,q0e=F0e,B0e=q0e;const U0e=St(B0e);function z0e(e,t){var r=U0e(t-e),n=Math.sqrt(Math.abs(t-e)),o=e+n*r;return r>0?Math.min(t,o):Math.max(t,o)}function Z0e(e,t,r,n){for(var o=e,i=0;i<n;i++)o=r(o,t);return o}var Ij=function(t){var r=t.name,n=t.onEnd,o=t.target,i=t.value,a=$.useRef(),s=$.useCallback(function(l,u,d,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mi();(d==="100%"||typeof d=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=d==="100%"?o.scrollHeight-o.offsetHeight:d,y=Z0e(u,h,z0e,(Mi()-f)/5);Math.abs(h-y)<1.5&&(y=h),o[l]=y,h===y?n&&n(!0):s(l,u,d,p+1,f)}}))},[a,n,o]),c=$.useCallback(function(){cancelAnimationFrame(a.current),n&&n(!1)},[n]);return $.useLayoutEffect(function(){return s(r,o[r],i,1),o?(o.addEventListener("pointerdown",c,{passive:!0}),o.addEventListener("wheel",c,{passive:!0}),function(){o.removeEventListener("pointerdown",c),o.removeEventListener("wheel",c),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,c,r,o,i]),!1};Ij.propTypes={name:Rt.string.isRequired,onEnd:Rt.func,target:Rt.any.isRequired,value:Rt.oneOfType([Rt.number,Rt.oneOf(["100%"])]).isRequired};function l0(e){var t=$.useState(e),r=ko(t,2),n=r[0],o=r[1],i=$.useRef(),a=$.useCallback(function(s){typeof s=="function"?a(function(c){return s=s(c),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=n,[n,o,i]}function Rj(e,t){var r=cbe(e);if(KM){var n=KM(e);t&&(n=Tbe(n).call(n,function(o){return QM(e,o).enumerable})),r.push.apply(r,n)}return r}function Pj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;gh(n=Rj(Object(r),!0)).call(n,function(i){tpe(e,i,r[i])})}else if(ej)lwe(e,ej(r));else{var o;gh(o=Rj(Object(r))).call(o,function(i){dwe(e,i,QM(r,i))})}}return e}var V0e=function(){return 1/0},Nj=17,H0e="bottom",ro="top",Mj=1,W0e=34,jj={};function K0e(e,t){return e(),Mge(e,t)}function Dj(e){var t=e.mode,r=e.target,n=r.offsetHeight,o=r.scrollHeight,i=r.scrollTop,a=o-i-n<Mj,s=i<Mj,c=t===ro?s:a,l=t!==ro?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function Kl(e,t){return e===(t===ro?0:"100%")}var u0=function(t){var r=t.checkInterval,n=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=$.useMemo(function(){return S0e("<ScrollToBottom>",{force:i})},[i]);s=s===ro?ro:H0e;var d=$.useRef(0),p=$.useRef(a),f=l0(s===ro?0:"100%"),h=ko(f,3),y=h[0],m=h[1],g=h[2],v=l0(null),b=ko(v,3),x=b[0],w=b[1],S=b[2],C=$.useRef(0),I=$.useRef(0),P=$.useRef(0),A=$.useState(!0),L=ko(A,2),W=L[0],Z=L[1],B=$.useState(!0),F=ko(B,2),j=F[0],U=F[1],K=$.useState(!0),D=ko(K,2),E=D[0],H=D[1],Q=$.useState(!1),T=ko(Q,2),ce=T[0],pe=T[1],fe=l0(!0),ve=ko(fe,3),_e=ve[0],Ce=ve[1],be=ve[2],de=$.useRef([]),te=$.useCallback(function(Y){var ye=S.current;return de.current.push(Y),ye&&Y({scrollTop:ye.scrollTop}),function(){var $e=de.current,tt=Jge($e).call($e,Y);~tt&&wve($e).call($e,tt,1)}},[de,S]),we=$.useCallback(function(){var Y=g.current;u(function(){var ye;return nr(ye=["%cSpineTo%c: %conEnd%c is fired."]).call(ye,At(qt("magenta")),At(qt("orange")),[{animateTo:Y}])}),d.current=Mi(),Kl(Y,s)||Ce(!1),m(null)},[g,u,d,s,m,Ce]),Ae=$.useCallback(function(Y){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$e=ye.behavior,tt=S.current;if(typeof Y!="number"&&Y!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ve;return[nr(Ve=["%cscrollTo%c: Will scroll to %c".concat(typeof Y=="number"?Y+"px":Y.replace(/%/g,"%%"),"%c")]).call(Ve,At(qt("lime","")),At(qt("purple"))),{behavior:$e,nextAnimateTo:Y,target:tt}]}),$e==="auto"?(we(),tt&&(tt.scrollTop=Y==="100%"?tt.scrollHeight-tt.offsetHeight:Y)):($e!=="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.'),m(Y)),Kl(Y,s)&&(u(function(){var Ve;return[nr(Ve=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ve,At(qt("lime","")),At(qt("purple"))),[{mode:s,nextAnimateTo:Y}]]}),Ce(!0))},[u,we,s,m,Ce,S]),qe=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var $e;return nr($e=["%cscrollToBottom%c: Called"]).call($e,At(qt("yellow","")))}),ye!=="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.'),Ae("100%",{behavior:ye||"smooth"})},[u,Ae]),q=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var $e;return nr($e=["%cscrollToTop%c: Called"]).call($e,At(qt("yellow","")))}),ye!=="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.'),Ae(0,{behavior:ye||"smooth"})},[u,Ae]),le=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var tt;return nr(tt=["%cscrollToEnd%c: Called"]).call(tt,At(qt("yellow","")))}),ye!=="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 $e={behavior:ye||"smooth"};s===ro?q($e):qe($e)},[u,s,qe,q]),he=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var tt;return nr(tt=["%cscrollToStart%c: Called"]).call(tt,At(qt("yellow","")))}),ye!=="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 $e={behavior:ye||"smooth"};s===ro?qe($e):q($e)},[u,s,qe,q]),me=$.useCallback(function(){var Y=S.current;if(Y){if(p.current==="auto"){u(function(){var ze;return nr(ze=["%ctarget changed%c: Initial scroll"]).call(ze,At(qt("blue")))}),Y.scrollTop=s===ro?0:Y.scrollHeight-Y.offsetHeight,p.current=!1;return}var ye=C.current,$e=Y.offsetHeight,tt=Y.scrollHeight,Ve=Y.scrollTop,ct=s===ro?0:Math.max(0,tt-$e-Ve),$t=Math.max(0,ye-Ve),Wt=l({maxValue:ct,minValue:$t,offsetHeight:$e,scrollHeight:tt,scrollTop:Ve}),z=Math.max(0,Math.min(ct,Wt)),X;s===ro||z!==ct?X=Ve+z:X="100%",u(function(){var ze,Ge,gt;return[nr(ze=[nr(Ge=nr(gt="%cscrollToSticky%c: Will animate from %c".concat(ye,"px%c to %c")).call(gt,typeof X=="number"?X+"px":X.replace(/%/g,"%%"),"%c (%c")).call(Ge,(X==="100%"?ct:X)+ye,"px%c)")]).call(ze,At(qt("orange")),At(qt("purple")),At(qt("purple")),At(qt("purple"))),{animateFrom:ye,maxValue:ct,minValue:$t,nextAnimateTo:X,nextValue:z,offsetHeight:$e,rawNextValue:Wt,scrollHeight:tt,scrollTop:Ve}]}),Ae(X,{behavior:"smooth"})}},[C,u,s,l,Ae,S]),je=$.useCallback(function(Y){var ye,$e=Y.timeStampLow,tt=g.current,Ve=S.current,ct=tt!==null;if(!($e<=d.current||!Ve)){var $t=Dj({mode:s,target:Ve}),Wt=$t.atBottom,z=$t.atEnd,X=$t.atStart,ze=$t.atTop;Z(Wt),U(z),pe(X),H(ze);var Ge=Ve.offsetHeight,gt=Ve.scrollHeight,Je=I.current,ir=P.current,kr=Ge!==Je,Kt=gt!==ir;if(kr&&(I.current=Ge),Kt&&(P.current=gt),!kr&&!Kt){var ar=ct&&Kl(tt,s)||z;be.current!==ar&&(u(function(){var vt,bt,Yt,Gt;return[nr(vt=["%conScroll%c: %csetSticky%c(%c".concat(ar,"%c)")]).call(vt,At(qt("red")),At(qt("red")),At(qt("purple"))),nr(bt=[nr(Yt=nr(Gt="(animating = %c".concat(ct,"%c && isEnd = %c")).call(Gt,Kl(tt,s),"%c) || atEnd = %c")).call(Yt,z,"%c")]).call(bt,At(qt("purple")),At(qt("purple")),At(qt("purple")),[{animating:ct,animateTo:tt,atEnd:z,mode:s,offsetHeight:Ve.offsetHeight,scrollHeight:Ve.scrollHeight,sticky:be.current,nextSticky:ar}])]}),Ce(ar))}else be.current&&(u(function(){var vt;return[nr(vt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(vt,At(qt("red")),At(qt("orange")),[{offsetHeightChanged:kr,scrollHeightChanged:Kt}]),{nextOffsetHeight:Ge,prevOffsetHeight:Je,nextScrollHeight:gt,prevScrollHeight:ir}]}),me());var sn=Ve.scrollTop;gh(ye=de.current).call(ye,function(vt){return vt({scrollTop:sn})})}},[g,u,d,s,I,P,de,me,Z,U,pe,H,Ce,be,S]);$.useEffect(function(){if(x){var Y=!1,ye=K0e(function(){var $e=S.current,tt=g.current!==null;be.current?Dj({mode:s,target:$e}).atEnd?Y=!1:Y?Mi()-Y>W0e&&(tt||(C.current=$e.scrollTop,u(function(){var Ve;return nr(Ve=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ve,At(qt("navy")),At(qt("orange")))}),me()),Y=!1):Y=Mi():$e.scrollHeight<=$e.offsetHeight&&!be.current&&(u(function(){var Ve;return[nr(Ve=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ve,At(qt("navy")),At(qt("purple"))),[{offsetHeight:$e.offsetHeight,scrollHeight:$e.scrollHeight,sticky:be.current}]]}),Ce(!0))},Math.max(Nj,r)||Nj);return function(){return clearInterval(ye)}}},[g,r,u,s,me,Ce,be,x,S]);var Ie=$.useMemo(function(){var Y=jj[c]||(jj[c]=Qwe({key:"react-scroll-to-bottom--css-"+w0e(),nonce:c}));return function(ye){return Y.css(ye)+""}},[c]),Ue=$.useMemo(function(){return{observeScrollPosition:te,setTarget:w,styleToClassName:Ie}},[te,w,Ie]),pt=$.useMemo(function(){return{atBottom:W,atEnd:j,atStart:ce,atTop:E,mode:s}},[W,j,ce,E,s]),Ke=$.useMemo(function(){var Y=y!==null;return{animating:Y,animatingToEnd:Y&&Kl(y,s),sticky:_e}},[y,s,_e]),G=$.useMemo(function(){return Pj(Pj({},pt),Ke)},[pt,Ke]),se=$.useMemo(function(){return{scrollTo:Ae,scrollToBottom:qe,scrollToEnd:le,scrollToStart:he,scrollToTop:q}},[Ae,qe,le,he,q]);return $.useEffect(function(){if(x){var Y=function(){P.current=x.scrollHeight};return x.addEventListener("focus",Y,{capture:!0,passive:!0}),function(){return x.removeEventListener("focus",Y)}}},[x]),u(function(){var Y;return[nr(Y=["%cRender%c: Render"]).call(Y,At(qt("cyan",""))),{animateTo:y,animating:y!==null,sticky:_e,target:x}]}),$.createElement(rh.Provider,{value:Ue},$.createElement(lw.Provider,{value:se},$.createElement(fw.Provider,{value:G},$.createElement(uw.Provider,{value:pt},$.createElement(dw.Provider,{value:Ke},n,x&&$.createElement(Aj,{debounce:o,name:"scroll",onEvent:je,target:x}),x&&y!==null&&$.createElement(Ij,{name:"scrollTop",onEnd:we,target:x,value:y}))))))};u0.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:V0e},u0.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 G0e={height:"100%",overflowY:"auto",width:"100%"},d0=function(t){var r=t.children,n=t.className,o=$.useContext(rh),i=o.setTarget,a=pw()(G0e);return $.createElement("div",{className:tw(a,(n||"")+""),ref:i},r)};d0.defaultProps={children:void 0,className:void 0},d0.propTypes={children:Rt.any,className:Rt.string};var J0e={position:"relative"},f0=function(t){var r=t.children,n=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=pw()(J0e);return $.createElement("div",{className:tw(a,(n||"")+"")},$.createElement(d0,{className:(i||"")+""},r),$.createElement(hw,{className:(o||"")+""}))};f0.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},f0.propTypes={children:Rt.any,className:Rt.string,followButtonClassName:Rt.string,scrollViewClassName:Rt.string};var p0=function(t){var r=t.checkInterval,n=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,d=t.scroller,p=t.scrollViewClassName;return $.createElement(u0,{checkInterval:r,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:d},$.createElement(f0,{className:o,followButtonClassName:s,scrollViewClassName:p},n))};p0.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},p0.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};function Y0e(){var e=yN(),t=e.scrollToBottom;return t}hre();const Lj=$.memo(({scrollDownButton:e,...t})=>{const{messageList:r}=Ht,n=wn(m=>m.conversationId),o=ft(m=>m.messages)[n??""]??[],i=ft(m=>m.setState),a=ft(m=>m.client),s=ft(m=>m.messageContainerRef),c=ft(m=>m.isTyping),l=ft(m=>m.setIsTyping),u=$.useMemo(()=>I5(o),[o]),[d,p]=$.useState(!0),{y:f}=gY(s),h=$.useCallback(()=>{if(!s.current)return;const{scrollHeight:m}=s.current;d&&s.current.scrollTo({top:m})},[]);$.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:m,timeout:g})=>{l(m,g)}),[]),$.useEffect(()=>{const m=o[o.length-1];i({disableComposer:!!(m!=null&&m.disableInput)})},[o.length]),$.useEffect(()=>{if(!s.current)return;const{offsetHeight:m,scrollHeight:g,scrollTop:v}=s.current;p(g<=v+m+100)},[f]);const y=e!=null&&e.icon?e==null?void 0:e.icon:BY;return J.jsxs(p0,{...t,...r.container,followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[J.jsx(fre,{}),u.map(m=>J.jsx(Nv,{scroll:h,...m},m.id)),c&&J.jsx(Nv,{scroll:h,direction:"incoming",children:J.jsx(gI,{})}),J.jsx("li",{"data-is-at-bottom":d,...r.scrollDownButton.container,children:J.jsxs(X0e,{children:[(e==null?void 0:e.text)??"Back"," ",J.jsx(y,{...r.scrollDownButton.icon})]})})]})}),X0e=e=>{const[t]=vN(),r=Y0e(),{messageList:{scrollDownButton:n}}=Ht;return!t&&J.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},Q0e=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:o}=PC(),i=$.useMemo(()=>sk({color:e,fontFamily:t,radius:r,themeMode:n,variant:o}),[e,t,r,n,o]);return J.jsxs(J.Fragment,{children:[J.jsxs(fI,{children:[J.jsx(yI,{}),J.jsx(Lj,{}),J.jsx(MA,{})]}),J.jsx("style",{children:i})]})};rt.Avatar=ry,rt.Block=xs,rt.Composer=MA,rt.Container=fI,rt.Fab=ere,rt.Header=yI,rt.Message=Nv,rt.MessageList=Lj,rt.Modal=Ai,rt.ModalProvider=jA,rt.RestartConversation=mI,rt.TypingIndicator=gI,rt.Webchat=Q0e,rt.WebchatProvider=kee,rt.WebchatThemeSchema=ty,rt.__adapters=KB,rt.avatarThemeSchema=Ud,rt.blockThemeSchema=tk,rt.clientModePropsSchema=ik,rt.configPropsSchema=ak,rt.configurationSchema=XE,rt.cssStyleSchema=ek,rt.descriptionItemSchema=Za,rt.fileTypes=cC,rt.generateThemeStylesheet=sk,rt.getClient=uC,rt.initPropsSchema=IU,rt.isFileType=lC,rt.markdownTypeSchema=QE,rt.renderers=NA,rt.statePropsSchema=nk,rt.styleOptionSchema=Oe,rt.themeSchema=rk,rt.useClient=hJ,rt.useWebchatStore=ft,rt.userPropsSchema=ok,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})});
427
+ `)&&(m="(?: "+m+")",v=" "+v,g++),s=new RegExp("^(?:"+m+")",y)),zw&&(s=new RegExp("^"+m+"$(?!\\s)",y)),Uw&&(c=r.lastIndex),l=mh.call(h?s:r,v),h?l?(l.input=l.input.slice(g),l[0]=l[0].slice(g),l.index=r.lastIndex,r.lastIndex+=l[0].length):r.lastIndex=0:Uw&&l&&(r.lastIndex=r.global?l.index+l[0].length:c),zw&&l&&l.length>1&&Oye.call(l[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(l[u]=void 0)}),l&&f)for(l.groups=d=Eye(null),u=0;u<f.length;u++)p=f[u],d[p[0]]=l[p[1]];return l});var Zw=Bw,Aye=Dme,AM=Zw;Aye({target:"RegExp",proto:!0,forced:/./.exec!==AM},{exec:AM});var IM=ql,Iye=Zw,RM=to,PM=Dl,Rye=sh,Pye=PM("species"),Vw=RegExp.prototype,Nye=function(e,t,r,n){var o=PM(e),i=!RM(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!RM(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[Pye]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return l=!0,null},u[o](""),!l});if(!i||!a||r){var s=/./[o],c=t(o,""[e],function(l,u,d,p,f){var h=u.exec;return h===Iye||h===Vw.exec?i&&!f?{done:!0,value:s.call(u,d,p)}:{done:!0,value:l.call(d,u,p)}:{done:!1}});IM(String.prototype,e,c[0]),IM(Vw,o,c[1])}n&&Rye(Vw[o],"sham",!0)},Mye=uh,jye=fh,Dye=oh,NM=function(e){return function(t,r){var n=jye(Dye(t)),o=Mye(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=n.charCodeAt(o),a<55296||a>56319||o+1===i||(s=n.charCodeAt(o+1))<56320||s>57343?e?n.charAt(o):a:e?n.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},Lye={codeAt:NM(!1),charAt:NM(!0)},Fye=Lye.charAt,qye=function(e,t,r){return t+(r?Fye(e,t).length:1)},Bye=BN,Uye=Math.floor,zye="".replace,Zye=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Vye=/\$([$&'`]|\d{1,2})/g,Hye=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=Vye;return o!==void 0&&(o=Bye(o),c=Zye),zye.call(i,c,function(l,u){var d;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(a);case"<":d=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return l;if(p>s){var f=Uye(p/10);return f===0?l:f<=s?n[f-1]===void 0?u.charAt(1):n[f-1]+u.charAt(1):l}d=n[p-1]}return d===void 0?"":d})},Wye=Ni,Kye=jn,Gye=yw,Jye=Zw,Yye=function(e,t){var r=e.exec;if(Kye(r)){var n=r.call(e,t);return n!==null&&Wye(n),n}if(Gye(e)==="RegExp")return Jye.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Xye=Nye,Qye=to,ege=Ni,tge=jn,rge=uh,nge=pM,Fs=fh,oge=oh,ige=qye,age=jN,sge=Hye,cge=Yye,lge=Dl,Hw=lge("replace"),uge=Math.max,dge=Math.min,fge=function(e){return e===void 0?e:String(e)},pge=function(){return"a".replace(/./,"$0")==="$0"}(),MM=function(){return/./[Hw]?/./[Hw]("a","$0")==="":!1}(),hge=!Qye(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Xye("replace",function(e,t,r){var n=MM?"$":"$0";return[function(i,a){var s=oge(this),c=i==null?void 0:age(i,Hw);return c?c.call(i,s,a):t.call(Fs(s),i,a)},function(o,i){var a=ege(this),s=Fs(o);if(typeof i=="string"&&i.indexOf(n)===-1&&i.indexOf("$<")===-1){var c=r(t,a,s,i);if(c.done)return c.value}var l=tge(i);l||(i=Fs(i));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var p=[];;){var f=cge(a,s);if(f===null||(p.push(f),!u))break;var h=Fs(f[0]);h===""&&(a.lastIndex=ige(s,nge(a.lastIndex),d))}for(var y="",m=0,g=0;g<p.length;g++){f=p[g];for(var v=Fs(f[0]),b=uge(dge(rge(f.index),s.length),0),x=[],w=1;w<f.length;w++)x.push(fge(f[w]));var S=f.groups;if(l){var C=[v].concat(x,b,s);S!==void 0&&C.push(S);var I=Fs(i.apply(void 0,C))}else I=sge(v,s,b,x,S,i);b>=m&&(y+=s.slice(m,b)+I,m=b+v.length)}return y+s.slice(m)}]},!hge||!pge||MM);var Ul=Sr,mge=Vv,yge=fa,yh=function(e){return mge.slice(0,e.length)===e},gge=function(){return yh("Bun/")?"BUN":yh("Cloudflare-Workers")?"CLOUDFLARE":yh("Deno/")?"DENO":yh("Node.js/")?"NODE":Ul.Bun&&typeof Bun.version=="string"?"BUN":Ul.Deno&&typeof Deno.version=="object"?"DENO":yge(Ul.process)==="process"?"NODE":Ul.window&&Ul.document?"BROWSER":"REST"}(),vge=TypeError,bge=function(e,t){if(e<t)throw new vge("Not enough arguments");return e},jM=Sr,wge=Mv,xge=Qr,Sge=gge,_ge=Vv,Ege=qp,kge=bge,Tge=jM.Function,$ge=/MSIE .\./.test(_ge)||Sge==="BUN"&&function(){var e=jM.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),DM=function(e,t){var r=t?2:1;return $ge?function(n,o){var i=kge(arguments.length,1)>r,a=xge(n)?n:Tge(n),s=i?Ege(arguments,r):[],c=i?function(){wge(a,this,s)}:a;return t?e(c,o):e(c)}:e},Oge=Bt,LM=Sr,Cge=DM,FM=Cge(LM.setInterval,!0);Oge({global:!0,bind:!0,forced:LM.setInterval!==FM},{setInterval:FM});var Age=Bt,qM=Sr,Ige=DM,BM=Ige(qM.setTimeout,!0);Age({global:!0,bind:!0,forced:qM.setTimeout!==BM},{setTimeout:BM});var Rge=qr,Pge=Rge.setInterval,Nge=Pge;const Mge=St(Nge);var jge=_r,UM=function(e,t){var r=[][e];return!!r&&jge(function(){r.call(null,t||function(){return 1},1)})},Dge=Bt,Lge=Dv,Fge=fR.indexOf,qge=UM,Ww=Lge([].indexOf),zM=!!Ww&&1/Ww([1],1,-0)<0,Bge=zM||!qge("indexOf");Dge({target:"Array",proto:!0,forced:Bge},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return zM?Ww(this,t,r)||0:Fge(this,t,r)}});var Uge=ya,zge=Uge("Array","indexOf"),Zge=Xo,Vge=zge,Kw=Array.prototype,Hge=function(e){var t=e.indexOf;return e===Kw||Zge(Kw,e)&&t===Kw.indexOf?Vge:t},Wge=Hge,Kge=Wge,Gge=Kge;const Jge=St(Gge);var ZM=Op,Yge=TypeError,Xge=function(e,t){if(!delete e[t])throw new Yge("Cannot delete property "+ZM(t)+" of "+ZM(e))},Qge=Bt,eve=Qo,tve=mb,rve=Ip,nve=pa,ove=GP,ive=lb,ave=hb,sve=Sl,Gw=Xge,cve=Pp,lve=cve("splice"),uve=Math.max,dve=Math.min;Qge({target:"Array",proto:!0,forced:!lve},{splice:function(t,r){var n=eve(this),o=nve(n),i=tve(t,o),a=arguments.length,s,c,l,u,d,p;for(a===0?s=c=0:a===1?(s=0,c=o-i):(s=a-2,c=dve(uve(rve(r),0),o-i)),ive(o+s-c),l=ave(n,c),u=0;u<c;u++)d=i+u,d in n&&sve(l,u,n[d]);if(l.length=c,s<c){for(u=i;u<o-c;u++)d=u+c,p=u+s,d in n?n[p]=n[d]:Gw(n,p);for(u=o;u>o-c+s;u--)Gw(n,u-1)}else if(s>c)for(u=o-c;u>i;u--)d=u+c-1,p=u+s-1,d in n?n[p]=n[d]:Gw(n,p);for(u=0;u<s;u++)n[u+i]=arguments[u+2];return ove(n,o-c+s),l}});var fve=ya,pve=fve("Array","splice"),hve=Xo,mve=pve,Jw=Array.prototype,yve=function(e){var t=e.splice;return e===Jw||hve(Jw,e)&&t===Jw.splice?mve:t},gve=yve,vve=gve,bve=vve;const wve=St(bve);var xve=ya,Sve=xve("Array","concat"),_ve=Xo,Eve=Sve,Yw=Array.prototype,kve=function(e){var t=e.concat;return e===Yw||_ve(Yw,e)&&t===Yw.concat?Eve:t},Tve=kve,$ve=Tve,Ove=$ve;const nr=St(Ove);var Cve=Bt,Ave=Er,VM=Date,Ive=Ave(VM.prototype.getTime);Cve({target:"Date",stat:!0},{now:function(){return Ive(new VM)}});var Rve=qr,Pve=Rve.Date.now,Nve=Pve,Mve=Nve,jve=Mve;const Mi=St(jve);var Dve=$b.forEach,Lve=UM,Fve=Lve("forEach"),qve=Fve?[].forEach:function(t){return Dve(this,t,arguments.length>1?arguments[1]:void 0)},Bve=Bt,HM=qve;Bve({target:"Array",proto:!0,forced:[].forEach!==HM},{forEach:HM});var Uve=ya,zve=Uve("Array","forEach"),Zve=zve,Vve=Zve,Hve=_l,Wve=En,Kve=Xo,Gve=Vve,Xw=Array.prototype,Jve={DOMTokenList:!0,NodeList:!0},Yve=function(e){var t=e.forEach;return e===Xw||Kve(Xw,e)&&t===Xw.forEach||Wve(Jve,Hve(e))?Gve:t},Xve=Yve;const gh=St(Xve);var Qve=Bt,ebe=Qo,WM=vb,tbe=_r,rbe=tbe(function(){WM(1)});Qve({target:"Object",stat:!0,forced:rbe},{keys:function(t){return WM(ebe(t))}});var nbe=qr,obe=nbe.Object.keys,ibe=obe,abe=ibe,sbe=abe;const cbe=St(sbe);var lbe=qr,ube=lbe.Object.getOwnPropertySymbols,dbe=ube,fbe=dbe,pbe=fbe;const KM=St(pbe);var hbe=Bt,mbe=$b.filter,ybe=Pp,gbe=ybe("filter");hbe({target:"Array",proto:!0,forced:!gbe},{filter:function(t){return mbe(this,t,arguments.length>1?arguments[1]:void 0)}});var vbe=ya,bbe=vbe("Array","filter"),wbe=Xo,xbe=bbe,Qw=Array.prototype,Sbe=function(e){var t=e.filter;return e===Qw||wbe(Qw,e)&&t===Qw.filter?xbe:t},_be=Sbe,Ebe=_be,kbe=Ebe;const Tbe=St(kbe);var GM={exports:{}},$be=Bt,Obe=_r,Cbe=So,JM=gl.f,YM=pn,Abe=!YM||Obe(function(){JM(1)});$be({target:"Object",stat:!0,forced:Abe,sham:!YM},{getOwnPropertyDescriptor:function(t,r){return JM(Cbe(t),r)}});var Ibe=qr,XM=Ibe.Object,Rbe=GM.exports=function(t,r){return XM.getOwnPropertyDescriptor(t,r)};XM.getOwnPropertyDescriptor.sham&&(Rbe.sham=!0);var Pbe=GM.exports,Nbe=Pbe,Mbe=Nbe,jbe=Mbe;const QM=St(jbe);var Dbe=_o,Lbe=Er,Fbe=Fp,qbe=Bp,Bbe=Ii,Ube=Lbe([].concat),zbe=Dbe("Reflect","ownKeys")||function(t){var r=Fbe.f(Bbe(t)),n=qbe.f;return n?Ube(r,n(t)):r},Zbe=Bt,Vbe=pn,Hbe=zbe,Wbe=So,Kbe=gl,Gbe=Sl;Zbe({target:"Object",stat:!0,sham:!Vbe},{getOwnPropertyDescriptors:function(t){for(var r=Wbe(t),n=Kbe.f,o=Hbe(r),i={},a=0,s,c;o.length>a;)c=n(r,s=o[a++]),c!==void 0&&Gbe(i,s,c);return i}});var Jbe=qr,Ybe=Jbe.Object.getOwnPropertyDescriptors,Xbe=Ybe,Qbe=Xbe,ewe=Qbe;const ej=St(ewe);var tj={exports:{}},twe=Bt,rwe=pn,rj=Np.f;twe({target:"Object",stat:!0,forced:Object.defineProperties!==rj,sham:!rwe},{defineProperties:rj});var nwe=qr,nj=nwe.Object,owe=tj.exports=function(t,r){return nj.defineProperties(t,r)};nj.defineProperties.sham&&(owe.sham=!0);var iwe=tj.exports,awe=iwe,swe=awe,cwe=swe;const lwe=St(cwe);var uwe=SN;const dwe=St(uwe);var fwe=!1;function pwe(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 hwe(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 mwe=function(){function e(r){var n=this;this._insertTag=function(o){var i;n.tags.length===0?n.insertionPoint?i=n.insertionPoint.nextSibling:n.prepend?i=n.container.firstChild:i=n.before:i=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(o,i),n.tags.push(o)},this.isSpeedy=r.speedy===void 0?!fwe:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hwe(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=pwe(o);try{i.insertRule(n,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var o;return(o=n.parentNode)==null?void 0:o.removeChild(n)}),this.tags=[],this.ctr=0},e}(),en="-ms-",vh="-moz-",Mt="-webkit-",oj="comm",e0="rule",t0="decl",ywe="@import",ij="@keyframes",gwe="@layer",vwe=Math.abs,bh=String.fromCharCode,bwe=Object.assign;function wwe(e,t){return Br(e,0)^45?(((t<<2^Br(e,0))<<2^Br(e,1))<<2^Br(e,2))<<2^Br(e,3):0}function aj(e){return e.trim()}function xwe(e,t){return(e=t.exec(e))?e[0]:e}function jt(e,t,r){return e.replace(t,r)}function r0(e,t){return e.indexOf(t)}function Br(e,t){return e.charCodeAt(t)|0}function zl(e,t,r){return e.slice(t,r)}function $o(e){return e.length}function n0(e){return e.length}function wh(e,t){return t.push(e),e}function Swe(e,t){return e.map(t).join("")}var xh=1,qs=1,sj=0,mn=0,yr=0,Bs="";function Sh(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:xh,column:qs,length:a,return:""}}function Zl(e,t){return bwe(Sh("",null,null,"",null,null,0),e,{length:-e.length},t)}function _we(){return yr}function Ewe(){return yr=mn>0?Br(Bs,--mn):0,qs--,yr===10&&(qs=1,xh--),yr}function Tn(){return yr=mn<sj?Br(Bs,mn++):0,qs++,yr===10&&(qs=1,xh++),yr}function Oo(){return Br(Bs,mn)}function _h(){return mn}function Vl(e,t){return zl(Bs,e,t)}function Hl(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 cj(e){return xh=qs=1,sj=$o(Bs=e),mn=0,[]}function lj(e){return Bs="",e}function Eh(e){return aj(Vl(mn-1,o0(e===91?e+2:e===40?e+1:e)))}function kwe(e){for(;(yr=Oo())&&yr<33;)Tn();return Hl(e)>2||Hl(yr)>3?"":" "}function Twe(e,t){for(;--t&&Tn()&&!(yr<48||yr>102||yr>57&&yr<65||yr>70&&yr<97););return Vl(e,_h()+(t<6&&Oo()==32&&Tn()==32))}function o0(e){for(;Tn();)switch(yr){case e:return mn;case 34:case 39:e!==34&&e!==39&&o0(yr);break;case 40:e===41&&o0(e);break;case 92:Tn();break}return mn}function $we(e,t){for(;Tn()&&e+yr!==47+10;)if(e+yr===42+42&&Oo()===47)break;return"/*"+Vl(t,mn-1)+"*"+bh(e===47?e:Tn())}function Owe(e){for(;!Hl(Oo());)Tn();return Vl(e,mn)}function Cwe(e){return lj(kh("",null,null,null,[""],e=cj(e),0,[0],e))}function kh(e,t,r,n,o,i,a,s,c){for(var l=0,u=0,d=a,p=0,f=0,h=0,y=1,m=1,g=1,v=0,b="",x=o,w=i,S=n,C=b;m;)switch(h=v,v=Tn()){case 40:if(h!=108&&Br(C,d-1)==58){r0(C+=jt(Eh(v),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:C+=Eh(v);break;case 9:case 10:case 13:case 32:C+=kwe(h);break;case 92:C+=Twe(_h()-1,7);continue;case 47:switch(Oo()){case 42:case 47:wh(Awe($we(Tn(),_h()),t,r),c);break;default:C+="/"}break;case 123*y:s[l++]=$o(C)*g;case 125*y:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+u:g==-1&&(C=jt(C,/\f/g,"")),f>0&&$o(C)-d&&wh(f>32?dj(C+";",n,r,d-1):dj(jt(C," ","")+";",n,r,d-2),c);break;case 59:C+=";";default:if(wh(S=uj(C,t,r,l,u,o,s,b,x=[],w=[],d),i),v===123)if(u===0)kh(C,t,S,S,x,i,d,s,w);else switch(p===99&&Br(C,3)===110?100:p){case 100:case 108:case 109:case 115:kh(e,S,S,n&&wh(uj(e,S,S,0,0,o,s,b,o,x=[],d),w),o,w,d,s,n?x:w);break;default:kh(C,S,S,S,[""],w,0,s,w)}}l=u=f=0,y=g=1,b=C="",d=a;break;case 58:d=1+$o(C),f=h;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&Ewe()==125)continue}switch(C+=bh(v),v*y){case 38:g=u>0?1:(C+="\f",-1);break;case 44:s[l++]=($o(C)-1)*g,g=1;break;case 64:Oo()===45&&(C+=Eh(Tn())),p=Oo(),u=d=$o(b=C+=Owe(_h())),v++;break;case 45:h===45&&$o(C)==2&&(y=0)}}return i}function uj(e,t,r,n,o,i,a,s,c,l,u){for(var d=o-1,p=o===0?i:[""],f=n0(p),h=0,y=0,m=0;h<n;++h)for(var g=0,v=zl(e,d+1,d=vwe(y=a[h])),b=e;g<f;++g)(b=aj(y>0?p[g]+" "+v:jt(v,/&\f/g,p[g])))&&(c[m++]=b);return Sh(e,t,r,o===0?e0:s,c,l,u)}function Awe(e,t,r){return Sh(e,t,r,oj,bh(_we()),zl(e,2,-2),0)}function dj(e,t,r,n){return Sh(e,t,r,t0,zl(e,0,n),zl(e,n+1,-1),n)}function Us(e,t){for(var r="",n=n0(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function Iwe(e,t,r,n){switch(e.type){case gwe:if(e.children.length)break;case ywe:case t0:return e.return=e.return||e.value;case oj:return"";case ij:return e.return=e.value+"{"+Us(e.children,n)+"}";case e0:e.value=e.props.join(",")}return $o(r=Us(e.children,n))?e.return=e.value+"{"+r+"}":""}function Rwe(e){var t=n0(e);return function(r,n,o,i){for(var a="",s=0;s<t;s++)a+=e[s](r,n,o,i)||"";return a}}function Pwe(e){return function(t){t.root||(t=t.return)&&e(t)}}function Nwe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var Mwe=function(t,r,n){for(var o=0,i=0;o=i,i=Oo(),o===38&&i===12&&(r[n]=1),!Hl(i);)Tn();return Vl(t,mn)},jwe=function(t,r){var n=-1,o=44;do switch(Hl(o)){case 0:o===38&&Oo()===12&&(r[n]=1),t[n]+=Mwe(mn-1,r,n);break;case 2:t[n]+=Eh(o);break;case 4:if(o===44){t[++n]=Oo()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=bh(o)}while(o=Tn());return t},Dwe=function(t,r){return lj(jwe(cj(t),r))},fj=new WeakMap,Lwe=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,o=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!fj.get(n))&&!o){fj.set(t,!0);for(var i=[],a=Dwe(r,i),s=n.props,c=0,l=0;c<a.length;c++)for(var u=0;u<s.length;u++,l++)t.props[l]=i[c]?a[c].replace(/&\f/g,s[u]):s[u]+" "+a[c]}}},Fwe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function pj(e,t){switch(wwe(e,t)){case 5103:return Mt+"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 Mt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Mt+e+vh+e+en+e+e;case 6828:case 4268:return Mt+e+en+e+e;case 6165:return Mt+e+en+"flex-"+e+e;case 5187:return Mt+e+jt(e,/(\w+).+(:[^]+)/,Mt+"box-$1$2"+en+"flex-$1$2")+e;case 5443:return Mt+e+en+"flex-item-"+jt(e,/flex-|-self/,"")+e;case 4675:return Mt+e+en+"flex-line-pack"+jt(e,/align-content|flex-|-self/,"")+e;case 5548:return Mt+e+en+jt(e,"shrink","negative")+e;case 5292:return Mt+e+en+jt(e,"basis","preferred-size")+e;case 6060:return Mt+"box-"+jt(e,"-grow","")+Mt+e+en+jt(e,"grow","positive")+e;case 4554:return Mt+jt(e,/([^-])(transform)/g,"$1"+Mt+"$2")+e;case 6187:return jt(jt(jt(e,/(zoom-|grab)/,Mt+"$1"),/(image-set)/,Mt+"$1"),e,"")+e;case 5495:case 3959:return jt(e,/(image-set\([^]*)/,Mt+"$1$`$1");case 4968:return jt(jt(e,/(.+:)(flex-)?(.*)/,Mt+"box-pack:$3"+en+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Mt+e+e;case 4095:case 3583:case 4068:case 2532:return jt(e,/(.+)-inline(.+)/,Mt+"$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($o(e)-1-t>6)switch(Br(e,t+1)){case 109:if(Br(e,t+4)!==45)break;case 102:return jt(e,/(.+:)(.+)-([^]+)/,"$1"+Mt+"$2-$3$1"+vh+(Br(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~r0(e,"stretch")?pj(jt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Br(e,t+1)!==115)break;case 6444:switch(Br(e,$o(e)-3-(~r0(e,"!important")&&10))){case 107:return jt(e,":",":"+Mt)+e;case 101:return jt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Mt+(Br(e,14)===45?"inline-":"")+"box$3$1"+Mt+"$2$3$1"+en+"$2box$3")+e}break;case 5936:switch(Br(e,t+11)){case 114:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Mt+e+en+jt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Mt+e+en+e+e}return e}var qwe=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case t0:t.return=pj(t.value,t.length);break;case ij:return Us([Zl(t,{value:jt(t.value,"@","@"+Mt)})],o);case e0:if(t.length)return Swe(t.props,function(i){switch(xwe(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Us([Zl(t,{props:[jt(i,/:(read-\w+)/,":"+vh+"$1")]})],o);case"::placeholder":return Us([Zl(t,{props:[jt(i,/:(plac\w+)/,":"+Mt+"input-$1")]}),Zl(t,{props:[jt(i,/:(plac\w+)/,":"+vh+"$1")]}),Zl(t,{props:[jt(i,/:(plac\w+)/,en+"input-$1")]})],o)}return""})}},Bwe=[qwe],Uwe=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(y){var m=y.getAttribute("data-emotion");m.indexOf(" ")!==-1&&(document.head.appendChild(y),y.setAttribute("data-s",""))})}var o=t.stylisPlugins||Bwe,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(y){for(var m=y.getAttribute("data-emotion").split(" "),g=1;g<m.length;g++)i[m[g]]=!0;s.push(y)});var c,l=[Lwe,Fwe];{var u,d=[Iwe,Pwe(function(y){u.insert(y)})],p=Rwe(l.concat(o,d)),f=function(m){return Us(Cwe(m),p)};c=function(m,g,v,b){u=v,f(m?m+"{"+g.styles+"}":g.styles),b&&(h.inserted[g.name]=!0)}}var h={key:r,sheet:new mwe({key:r,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:c};return h.sheet.hydrate(s),h};function zwe(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Zwe={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},Vwe=!1,Hwe=/[A-Z]|^ms/g,Wwe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,hj=function(t){return t.charCodeAt(1)===45},mj=function(t){return t!=null&&typeof t!="boolean"},i0=Nwe(function(e){return hj(e)?e:e.replace(Hwe,"-$&").toLowerCase()}),yj=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(Wwe,function(n,o,i){return Co={name:o,styles:i,next:Co},o})}return Zwe[t]!==1&&!hj(t)&&typeof r=="number"&&r!==0?r+"px":r},Kwe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Wl(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return Co={name:o.name,styles:o.styles,next:Co},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Co={name:a.name,styles:a.styles,next:Co},a=a.next;var s=i.styles+";";return s}return Gwe(e,t,r)}case"function":{if(e!==void 0){var c=Co,l=r(e);return Co=c,Wl(e,t,l)}break}}var u=r;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function Gwe(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=Wl(e,t,r[o])+";";else for(var i in r){var a=r[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?n+=i+"{"+t[s]+"}":mj(s)&&(n+=i0(i)+":"+yj(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Vwe)throw new Error(Kwe);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)mj(a[c])&&(n+=i0(i)+":"+yj(i,a[c])+";");else{var l=Wl(e,t,a);switch(i){case"animation":case"animationName":{n+=i0(i)+":"+l+";";break}default:n+=i+"{"+l+"}"}}}}return n}var gj=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Co;function a0(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,o="";Co=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=Wl(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=Wl(r,t,e[s]),n){var c=i;o+=c[s]}gj.lastIndex=0;for(var l="",u;(u=gj.exec(o))!==null;)l+="-"+u[1];var d=zwe(o)+l;return{name:d,styles:o,next:Co}}var Jwe=!0;function vj(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var Ywe=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Jwe===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Xwe=function(t,r,n){Ywe(t,r,n);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var i=r;do t.insert(r===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function bj(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function wj(e,t,r){var n=[],o=vj(e,n,r);return n.length<2?r:o+t(n)}var Qwe=function(t){var r=Uwe(t);r.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},r.compat=!0;var n=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered,void 0);return Xwe(r,d,!1),r.key+"-"+d.name},o=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered),p="animation-"+d.name;return bj(r,{name:d.name,styles:"@keyframes "+p+"{"+d.styles+"}"}),p},i=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];var d=a0(l,r.registered);bj(r,d)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return wj(r.registered,n,e0e(l))};return{css:n,cx:a,injectGlobal:i,keyframes:o,hydrate:function(c){c.forEach(function(l){r.inserted[l]=!0})},flush:function(){r.registered={},r.inserted={},r.sheet.flush()},sheet:r.sheet,cache:r,getRegisteredStyles:vj.bind(null,r.registered),merge:wj.bind(null,r.registered,n)}},e0e=function e(t){for(var r="",n=0;n<t.length;n++){var o=t[n];if(o!=null){var i=void 0;switch(typeof o){case"boolean":break;case"object":{if(Array.isArray(o))i=e(o);else{i="";for(var a in o)o[a]&&a&&(i&&(i+=" "),i+=a)}break}default:i=o}i&&(r&&(r+=" "),r+=i)}}return r},t0e=ql,s0=Date.prototype,xj="Invalid Date",Sj="toString",r0e=s0[Sj],n0e=s0.getTime;String(new Date(NaN))!=xj&&t0e(s0,Sj,function(){var t=n0e.call(this);return t===t?r0e.call(this):xj});var o0e=jw,i0e=vM,a0e=o0e?{}.toString:function(){return"[object "+i0e(this)+"]"},s0e=jw,c0e=ql,l0e=a0e;s0e||c0e(Object.prototype,"toString",l0e,{unsafe:!0});var u0e=Rw.PROPER,d0e=ql,f0e=Ni,_j=fh,p0e=to,h0e=bM,c0="toString",Ej=RegExp.prototype,kj=Ej[c0],m0e=p0e(function(){return kj.call({source:"a",flags:"b"})!="/a/b"}),y0e=u0e&&kj.name!=c0;(m0e||y0e)&&d0e(RegExp.prototype,c0,function(){var t=f0e(this),r=_j(t.source),n=t.flags,o=_j(n===void 0&&t instanceof RegExp&&!("flags"in Ej)?h0e.call(t):n);return"/"+r+"/"+o},{unsafe:!0});var Tj=typeof window<"u"?window:self,g0e=Tj.crypto||Tj.msCrypto,v0e=function(e){if(!e)return Math.random;var t=Math.pow(2,32),r=new Uint32Array(1);return function(){return e.getRandomValues(r)[0]/t}}(g0e);const b0e=St(v0e);function w0e(){return b0e().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var x0e=QI;const $j=St(x0e);function qt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",r="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(r+=" color: ".concat(t,";")),[r,""]}function Oj(e,t){for(var r,n,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return nr(r=[nr(n="%c".concat(e,"%c ")).call(n,t)]).call(r,At(qt("green","white")),i)}function S0e(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.force,n=r===void 0?!1:r;return n?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,c=ko(s,1),l=c[0];typeof l=="function"&&(i=l());var u=$j(i[0])?i:[i],d=u.length===1;gh(u).call(u,function(p,f){if(d){var h,y;(h=console).log.apply(h,At(Oj.apply(void 0,nr(y=[e]).call(y,At(p)))))}else if(f){var m;(m=console).log.apply(m,At($j(p)?p:[p]))}else{var g,v;(g=console).groupCollapsed.apply(g,At(Oj.apply(void 0,nr(v=[e]).call(v,At(p)))))}}),d||console.groupEnd()}}:function(){return 0}}var _0e=ga,E0e=Rw.EXISTS,k0e=Ll.f,Cj=Function.prototype,T0e=Cj.toString,$0e=/^\s*function ([^ (]*)/,O0e="name";_0e&&!E0e&&k0e(Cj,O0e,{configurable:!0,get:function(){try{return T0e.call(this).match($0e)[1]}catch{return""}}});var C0e=qr,A0e=C0e.setTimeout,I0e=A0e;const R0e=St(I0e);function P0e(e,t){if(!t)return e;var r=0,n=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Mi();s-r>t?(e.apply(void 0,i),r=s):(clearTimeout(n),n=R0e(function(){e.apply(void 0,i),r=Mi()},Math.max(0,t-s+r)))}}var Aj=function(t){var r=t.debounce,n=t.name,o=t.onEvent,i=t.target,a=$.useRef();a.current=o;var s=$.useMemo(function(){return P0e(function(l){var u=a.current;u&&u(l)},r)},[r,a]),c=$.useCallback(function(l){l.timeStampLow=Mi(),s(l)},[s]);return $.useLayoutEffect(function(){return i.addEventListener(n,c,{passive:!0}),c({target:i,type:n}),function(){return i.removeEventListener(n,c)}},[n,c,i]),!1};Aj.defaultProps={debounce:200};var N0e=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},M0e=Bt,j0e=N0e;M0e({target:"Math",stat:!0},{sign:j0e});var D0e=qr,L0e=D0e.Math.sign,F0e=L0e,q0e=F0e,B0e=q0e;const U0e=St(B0e);function z0e(e,t){var r=U0e(t-e),n=Math.sqrt(Math.abs(t-e)),o=e+n*r;return r>0?Math.min(t,o):Math.max(t,o)}function Z0e(e,t,r,n){for(var o=e,i=0;i<n;i++)o=r(o,t);return o}var Ij=function(t){var r=t.name,n=t.onEnd,o=t.target,i=t.value,a=$.useRef(),s=$.useCallback(function(l,u,d,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mi();(d==="100%"||typeof d=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=d==="100%"?o.scrollHeight-o.offsetHeight:d,y=Z0e(u,h,z0e,(Mi()-f)/5);Math.abs(h-y)<1.5&&(y=h),o[l]=y,h===y?n&&n(!0):s(l,u,d,p+1,f)}}))},[a,n,o]),c=$.useCallback(function(){cancelAnimationFrame(a.current),n&&n(!1)},[n]);return $.useLayoutEffect(function(){return s(r,o[r],i,1),o?(o.addEventListener("pointerdown",c,{passive:!0}),o.addEventListener("wheel",c,{passive:!0}),function(){o.removeEventListener("pointerdown",c),o.removeEventListener("wheel",c),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,c,r,o,i]),!1};Ij.propTypes={name:Rt.string.isRequired,onEnd:Rt.func,target:Rt.any.isRequired,value:Rt.oneOfType([Rt.number,Rt.oneOf(["100%"])]).isRequired};function l0(e){var t=$.useState(e),r=ko(t,2),n=r[0],o=r[1],i=$.useRef(),a=$.useCallback(function(s){typeof s=="function"?a(function(c){return s=s(c),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=n,[n,o,i]}function Rj(e,t){var r=cbe(e);if(KM){var n=KM(e);t&&(n=Tbe(n).call(n,function(o){return QM(e,o).enumerable})),r.push.apply(r,n)}return r}function Pj(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;gh(n=Rj(Object(r),!0)).call(n,function(i){tpe(e,i,r[i])})}else if(ej)lwe(e,ej(r));else{var o;gh(o=Rj(Object(r))).call(o,function(i){dwe(e,i,QM(r,i))})}}return e}var V0e=function(){return 1/0},Nj=17,H0e="bottom",ro="top",Mj=1,W0e=34,jj={};function K0e(e,t){return e(),Mge(e,t)}function Dj(e){var t=e.mode,r=e.target,n=r.offsetHeight,o=r.scrollHeight,i=r.scrollTop,a=o-i-n<Mj,s=i<Mj,c=t===ro?s:a,l=t!==ro?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function Kl(e,t){return e===(t===ro?0:"100%")}var u0=function(t){var r=t.checkInterval,n=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,c=t.nonce,l=t.scroller,u=$.useMemo(function(){return S0e("<ScrollToBottom>",{force:i})},[i]);s=s===ro?ro:H0e;var d=$.useRef(0),p=$.useRef(a),f=l0(s===ro?0:"100%"),h=ko(f,3),y=h[0],m=h[1],g=h[2],v=l0(null),b=ko(v,3),x=b[0],w=b[1],S=b[2],C=$.useRef(0),I=$.useRef(0),P=$.useRef(0),A=$.useState(!0),L=ko(A,2),K=L[0],z=L[1],B=$.useState(!0),F=ko(B,2),j=F[0],Z=F[1],W=$.useState(!0),D=ko(W,2),E=D[0],H=D[1],Q=$.useState(!1),T=ko(Q,2),ce=T[0],pe=T[1],fe=l0(!0),ve=ko(fe,3),_e=ve[0],Ce=ve[1],be=ve[2],de=$.useRef([]),te=$.useCallback(function(Y){var ye=S.current;return de.current.push(Y),ye&&Y({scrollTop:ye.scrollTop}),function(){var $e=de.current,tt=Jge($e).call($e,Y);~tt&&wve($e).call($e,tt,1)}},[de,S]),we=$.useCallback(function(){var Y=g.current;u(function(){var ye;return nr(ye=["%cSpineTo%c: %conEnd%c is fired."]).call(ye,At(qt("magenta")),At(qt("orange")),[{animateTo:Y}])}),d.current=Mi(),Kl(Y,s)||Ce(!1),m(null)},[g,u,d,s,m,Ce]),Ae=$.useCallback(function(Y){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},$e=ye.behavior,tt=S.current;if(typeof Y!="number"&&Y!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ve;return[nr(Ve=["%cscrollTo%c: Will scroll to %c".concat(typeof Y=="number"?Y+"px":Y.replace(/%/g,"%%"),"%c")]).call(Ve,At(qt("lime","")),At(qt("purple"))),{behavior:$e,nextAnimateTo:Y,target:tt}]}),$e==="auto"?(we(),tt&&(tt.scrollTop=Y==="100%"?tt.scrollHeight-tt.offsetHeight:Y)):($e!=="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.'),m(Y)),Kl(Y,s)&&(u(function(){var Ve;return[nr(Ve=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ve,At(qt("lime","")),At(qt("purple"))),[{mode:s,nextAnimateTo:Y}]]}),Ce(!0))},[u,we,s,m,Ce,S]),qe=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var $e;return nr($e=["%cscrollToBottom%c: Called"]).call($e,At(qt("yellow","")))}),ye!=="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.'),Ae("100%",{behavior:ye||"smooth"})},[u,Ae]),q=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var $e;return nr($e=["%cscrollToTop%c: Called"]).call($e,At(qt("yellow","")))}),ye!=="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.'),Ae(0,{behavior:ye||"smooth"})},[u,Ae]),le=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var tt;return nr(tt=["%cscrollToEnd%c: Called"]).call(tt,At(qt("yellow","")))}),ye!=="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 $e={behavior:ye||"smooth"};s===ro?q($e):qe($e)},[u,s,qe,q]),he=$.useCallback(function(){var Y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ye=Y.behavior;u(function(){var tt;return nr(tt=["%cscrollToStart%c: Called"]).call(tt,At(qt("yellow","")))}),ye!=="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 $e={behavior:ye||"smooth"};s===ro?qe($e):q($e)},[u,s,qe,q]),me=$.useCallback(function(){var Y=S.current;if(Y){if(p.current==="auto"){u(function(){var ze;return nr(ze=["%ctarget changed%c: Initial scroll"]).call(ze,At(qt("blue")))}),Y.scrollTop=s===ro?0:Y.scrollHeight-Y.offsetHeight,p.current=!1;return}var ye=C.current,$e=Y.offsetHeight,tt=Y.scrollHeight,Ve=Y.scrollTop,ct=s===ro?0:Math.max(0,tt-$e-Ve),$t=Math.max(0,ye-Ve),Wt=l({maxValue:ct,minValue:$t,offsetHeight:$e,scrollHeight:tt,scrollTop:Ve}),U=Math.max(0,Math.min(ct,Wt)),X;s===ro||U!==ct?X=Ve+U:X="100%",u(function(){var ze,Ge,gt;return[nr(ze=[nr(Ge=nr(gt="%cscrollToSticky%c: Will animate from %c".concat(ye,"px%c to %c")).call(gt,typeof X=="number"?X+"px":X.replace(/%/g,"%%"),"%c (%c")).call(Ge,(X==="100%"?ct:X)+ye,"px%c)")]).call(ze,At(qt("orange")),At(qt("purple")),At(qt("purple")),At(qt("purple"))),{animateFrom:ye,maxValue:ct,minValue:$t,nextAnimateTo:X,nextValue:U,offsetHeight:$e,rawNextValue:Wt,scrollHeight:tt,scrollTop:Ve}]}),Ae(X,{behavior:"smooth"})}},[C,u,s,l,Ae,S]),je=$.useCallback(function(Y){var ye,$e=Y.timeStampLow,tt=g.current,Ve=S.current,ct=tt!==null;if(!($e<=d.current||!Ve)){var $t=Dj({mode:s,target:Ve}),Wt=$t.atBottom,U=$t.atEnd,X=$t.atStart,ze=$t.atTop;z(Wt),Z(U),pe(X),H(ze);var Ge=Ve.offsetHeight,gt=Ve.scrollHeight,Je=I.current,ir=P.current,kr=Ge!==Je,Kt=gt!==ir;if(kr&&(I.current=Ge),Kt&&(P.current=gt),!kr&&!Kt){var ar=ct&&Kl(tt,s)||U;be.current!==ar&&(u(function(){var vt,bt,Yt,Gt;return[nr(vt=["%conScroll%c: %csetSticky%c(%c".concat(ar,"%c)")]).call(vt,At(qt("red")),At(qt("red")),At(qt("purple"))),nr(bt=[nr(Yt=nr(Gt="(animating = %c".concat(ct,"%c && isEnd = %c")).call(Gt,Kl(tt,s),"%c) || atEnd = %c")).call(Yt,U,"%c")]).call(bt,At(qt("purple")),At(qt("purple")),At(qt("purple")),[{animating:ct,animateTo:tt,atEnd:U,mode:s,offsetHeight:Ve.offsetHeight,scrollHeight:Ve.scrollHeight,sticky:be.current,nextSticky:ar}])]}),Ce(ar))}else be.current&&(u(function(){var vt;return[nr(vt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(vt,At(qt("red")),At(qt("orange")),[{offsetHeightChanged:kr,scrollHeightChanged:Kt}]),{nextOffsetHeight:Ge,prevOffsetHeight:Je,nextScrollHeight:gt,prevScrollHeight:ir}]}),me());var sn=Ve.scrollTop;gh(ye=de.current).call(ye,function(vt){return vt({scrollTop:sn})})}},[g,u,d,s,I,P,de,me,z,Z,pe,H,Ce,be,S]);$.useEffect(function(){if(x){var Y=!1,ye=K0e(function(){var $e=S.current,tt=g.current!==null;be.current?Dj({mode:s,target:$e}).atEnd?Y=!1:Y?Mi()-Y>W0e&&(tt||(C.current=$e.scrollTop,u(function(){var Ve;return nr(Ve=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ve,At(qt("navy")),At(qt("orange")))}),me()),Y=!1):Y=Mi():$e.scrollHeight<=$e.offsetHeight&&!be.current&&(u(function(){var Ve;return[nr(Ve=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ve,At(qt("navy")),At(qt("purple"))),[{offsetHeight:$e.offsetHeight,scrollHeight:$e.scrollHeight,sticky:be.current}]]}),Ce(!0))},Math.max(Nj,r)||Nj);return function(){return clearInterval(ye)}}},[g,r,u,s,me,Ce,be,x,S]);var Ie=$.useMemo(function(){var Y=jj[c]||(jj[c]=Qwe({key:"react-scroll-to-bottom--css-"+w0e(),nonce:c}));return function(ye){return Y.css(ye)+""}},[c]),Ue=$.useMemo(function(){return{observeScrollPosition:te,setTarget:w,styleToClassName:Ie}},[te,w,Ie]),pt=$.useMemo(function(){return{atBottom:K,atEnd:j,atStart:ce,atTop:E,mode:s}},[K,j,ce,E,s]),Ke=$.useMemo(function(){var Y=y!==null;return{animating:Y,animatingToEnd:Y&&Kl(y,s),sticky:_e}},[y,s,_e]),G=$.useMemo(function(){return Pj(Pj({},pt),Ke)},[pt,Ke]),se=$.useMemo(function(){return{scrollTo:Ae,scrollToBottom:qe,scrollToEnd:le,scrollToStart:he,scrollToTop:q}},[Ae,qe,le,he,q]);return $.useEffect(function(){if(x){var Y=function(){P.current=x.scrollHeight};return x.addEventListener("focus",Y,{capture:!0,passive:!0}),function(){return x.removeEventListener("focus",Y)}}},[x]),u(function(){var Y;return[nr(Y=["%cRender%c: Render"]).call(Y,At(qt("cyan",""))),{animateTo:y,animating:y!==null,sticky:_e,target:x}]}),$.createElement(rh.Provider,{value:Ue},$.createElement(lw.Provider,{value:se},$.createElement(fw.Provider,{value:G},$.createElement(uw.Provider,{value:pt},$.createElement(dw.Provider,{value:Ke},n,x&&$.createElement(Aj,{debounce:o,name:"scroll",onEvent:je,target:x}),x&&y!==null&&$.createElement(Ij,{name:"scrollTop",onEnd:we,target:x,value:y}))))))};u0.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:V0e},u0.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 G0e={height:"100%",overflowY:"auto",width:"100%"},d0=function(t){var r=t.children,n=t.className,o=$.useContext(rh),i=o.setTarget,a=pw()(G0e);return $.createElement("div",{className:tw(a,(n||"")+""),ref:i},r)};d0.defaultProps={children:void 0,className:void 0},d0.propTypes={children:Rt.any,className:Rt.string};var J0e={position:"relative"},f0=function(t){var r=t.children,n=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=pw()(J0e);return $.createElement("div",{className:tw(a,(n||"")+"")},$.createElement(d0,{className:(i||"")+""},r),$.createElement(hw,{className:(o||"")+""}))};f0.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},f0.propTypes={children:Rt.any,className:Rt.string,followButtonClassName:Rt.string,scrollViewClassName:Rt.string};var p0=function(t){var r=t.checkInterval,n=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,c=t.initialScrollBehavior,l=t.mode,u=t.nonce,d=t.scroller,p=t.scrollViewClassName;return $.createElement(u0,{checkInterval:r,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:d},$.createElement(f0,{className:o,followButtonClassName:s,scrollViewClassName:p},n))};p0.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},p0.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};function Y0e(){var e=yN(),t=e.scrollToBottom;return t}hre();const Lj=$.memo(({scrollDownButton:e,...t})=>{const{messageList:r}=Ht,n=wn(m=>m.conversationId),o=ft(m=>m.messages)[n??""]??[],i=ft(m=>m.setState),a=ft(m=>m.client),s=ft(m=>m.messageContainerRef),c=ft(m=>m.isTyping),l=ft(m=>m.setIsTyping),u=$.useMemo(()=>I5(o),[o]),[d,p]=$.useState(!0),{y:f}=gY(s),h=$.useCallback(()=>{if(!s.current)return;const{scrollHeight:m}=s.current;d&&s.current.scrollTo({top:m})},[]);$.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:m,timeout:g})=>{l(m,g)}),[]),$.useEffect(()=>{const m=o[o.length-1];i({disableComposer:!!(m!=null&&m.disableInput)})},[o.length]),$.useEffect(()=>{if(!s.current)return;const{offsetHeight:m,scrollHeight:g,scrollTop:v}=s.current;p(g<=v+m+100)},[f]);const y=e!=null&&e.icon?e==null?void 0:e.icon:BY;return J.jsxs(p0,{...t,...r.container,followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[J.jsx(fre,{}),u.map(m=>J.jsx(Nv,{scroll:h,...m},m.id)),c&&J.jsx(Nv,{scroll:h,direction:"incoming",children:J.jsx(gI,{})}),J.jsx("li",{"data-is-at-bottom":d,...r.scrollDownButton.container,children:J.jsxs(X0e,{children:[(e==null?void 0:e.text)??"Back"," ",J.jsx(y,{...r.scrollDownButton.icon})]})})]})}),X0e=e=>{const[t]=vN(),r=Y0e(),{messageList:{scrollDownButton:n}}=Ht;return!t&&J.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},Q0e=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:o}=PC(),i=$.useMemo(()=>sk({color:e,fontFamily:t,radius:r,themeMode:n,variant:o}),[e,t,r,n,o]);return J.jsxs(J.Fragment,{children:[J.jsxs(fI,{children:[J.jsx(yI,{}),J.jsx(Lj,{}),J.jsx(MA,{})]}),J.jsx("style",{children:i})]})};rt.Avatar=ry,rt.Block=xs,rt.Composer=MA,rt.Container=fI,rt.Fab=ere,rt.Header=yI,rt.Message=Nv,rt.MessageList=Lj,rt.Modal=Ai,rt.ModalProvider=jA,rt.RestartConversation=mI,rt.TypingIndicator=gI,rt.Webchat=Q0e,rt.WebchatProvider=kee,rt.WebchatThemeSchema=ty,rt.__adapters=KB,rt.avatarThemeSchema=Ud,rt.blockThemeSchema=tk,rt.clientModePropsSchema=ik,rt.configPropsSchema=ak,rt.configurationSchema=XE,rt.cssStyleSchema=ek,rt.descriptionItemSchema=Za,rt.fileTypes=cC,rt.generateThemeStylesheet=sk,rt.getClient=uC,rt.initPropsSchema=IU,rt.isFileType=lC,rt.markdownTypeSchema=QE,rt.renderers=NA,rt.statePropsSchema=nk,rt.styleOptionSchema=Oe,rt.themeSchema=rk,rt.useClient=hJ,rt.useWebchatStore=ft,rt.userPropsSchema=ok,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})});