@botpress/webchat 2.2.11 → 2.2.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +86 -85
- package/dist/index.umd.cjs +18 -18
- package/dist/styles/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(nt,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],O):(nt=typeof globalThis<"u"?globalThis:nt||self,O(nt.Webchat={},nt.React,nt.ReactDOM))})(this,function(nt,O,ao){"use strict";var ZSe=Object.defineProperty;var VSe=(nt,O,ao)=>O in nt?ZSe(nt,O,{enumerable:!0,configurable:!0,writable:!0,value:ao}):nt[O]=ao;var k=(nt,O,ao)=>(VSe(nt,typeof O!="symbol"?O+"":O,ao),ao);function D0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const P=D0(O),ID=D0(ao);var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hh(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var F0={exports:{}},RD=Object.create,Ta=Object.defineProperty,PD=Object.defineProperties,ND=Object.getOwnPropertyDescriptor,MD=Object.getOwnPropertyDescriptors,jD=Object.getOwnPropertyNames,du=Object.getOwnPropertySymbols,DD=Object.getPrototypeOf,Wh=Object.prototype.hasOwnProperty,L0=Object.prototype.propertyIsEnumerable,q0=(e,t,r)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))Wh.call(t,r)&&q0(e,r,t[r]);if(du)for(var r of du(t))L0.call(t,r)&&q0(e,r,t[r]);return e},ee=(e,t)=>PD(e,MD(t)),C=(e,t)=>Ta(e,"name",{value:t,configurable:!0}),B0=(e,t)=>{var r={};for(var n in e)Wh.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&du)for(var n of du(e))t.indexOf(n)<0&&L0.call(e,n)&&(r[n]=e[n]);return r},U0=(e,t)=>{for(var r in t)Ta(e,r,{get:t[r],enumerable:!0})},z0=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jD(t))!Wh.call(e,o)&&o!==r&&Ta(e,o,{get:()=>t[o],enumerable:!(n=ND(t,o))||n.enumerable});return e},fu=(e,t,r)=>(r=e!=null?RD(DD(e)):{},z0(t||!e||!e.__esModule?Ta(r,"default",{value:e,enumerable:!0}):r,e)),FD=e=>z0(Ta({},"__esModule",{value:!0}),e),Z0={};U0(Z0,{BRAND:()=>Ex,DIRTY:()=>Ui,EMPTY_PATH:()=>Sx,ErrorBoundary:()=>Da,INVALID:()=>Xe,NEVER:()=>i_,OK:()=>Hr,ParseInputLazyPath:()=>In,ParseStatus:()=>nn,Schema:()=>st,UntitledDeclarationError:()=>ix,ZodAny:()=>Ia,ZodArray:()=>Ra,ZodBigInt:()=>nc,ZodBoolean:()=>oc,ZodBranded:()=>ic,ZodCatch:()=>Ou,ZodDate:()=>Au,ZodDefault:()=>Ru,ZodDiscriminatedUnion:()=>em,ZodEffects:()=>Do,ZodEnum:()=>Mo,ZodError:()=>so,ZodFirstPartyTypeKind:()=>Gh,ZodFunction:()=>rm,ZodIntersection:()=>Mu,ZodIssueCode:()=>xe,ZodLazy:()=>Du,ZodLiteral:()=>sc,ZodMap:()=>nm,ZodNaN:()=>om,ZodNativeEnum:()=>cc,ZodNever:()=>oi,ZodNull:()=>lc,ZodNullable:()=>jo,ZodNumber:()=>uc,ZodObject:()=>Zi,ZodOptional:()=>Bn,ZodParsedType:()=>Re,ZodPipeline:()=>Wu,ZodPromise:()=>dc,ZodReadonly:()=>Ju,ZodRecord:()=>im,ZodRef:()=>am,ZodSchema:()=>st,ZodSet:()=>sm,ZodString:()=>Dr,ZodSymbol:()=>lm,ZodTemplateLiteral:()=>cd,ZodTemplateLiteralUnsupportedCheckError:()=>wu,ZodTemplateLiteralUnsupportedTypeError:()=>Yh,ZodTransformer:()=>Do,ZodTuple:()=>Vi,ZodType:()=>st,ZodUndefined:()=>hc,ZodUnion:()=>mc,ZodUnknown:()=>Na,ZodVoid:()=>um,ZuiForm:()=>N2,addIssueToContext:()=>Pe,agent:()=>dS,aimodel:()=>yS,any:()=>$S,array:()=>IS,bigint:()=>SS,boolean:()=>ym,coerce:()=>o_,conversation:()=>cS,createZodEnum:()=>ac,cuid2Regex:()=>ed,cuidRegex:()=>Qu,custom:()=>Qh,datasource:()=>gS,date:()=>_S,datetimeRegex:()=>od,defaultComponentDefinitions:()=>M2,discriminatedUnion:()=>MS,effect:()=>yd,emailRegex:()=>nd,enum:()=>VS,errorUtil:()=>Ve,event:()=>fS,fromJsonSchema:()=>r_,fromObject:()=>n_,function:()=>US,getErrorMap:()=>Ca,getParsedType:()=>Po,instanceof:()=>wS,intent:()=>mS,intersection:()=>jS,ipv4Regex:()=>fc,ipv6Regex:()=>pc,isAborted:()=>xu,isAsync:()=>rc,isDirty:()=>Su,isEmojiRegex:()=>Rx,isValid:()=>Aa,jsonSchemaToZui:()=>wc,knowledgebase:()=>vS,late:()=>bS,lazy:()=>zS,literal:()=>ZS,makeIssue:()=>tc,map:()=>qS,message:()=>uS,nan:()=>xS,nativeEnum:()=>HS,never:()=>CS,null:()=>TS,nullable:()=>GS,number:()=>mm,object:()=>RS,objectToZui:()=>Ma,objectUtil:()=>vu,oboolean:()=>t_,onumber:()=>e_,optional:()=>KS,ostring:()=>QS,pipeline:()=>YS,preprocess:()=>JS,processCreateParams:()=>ct,promise:()=>WS,quotelessJson:()=>vx,record:()=>FS,ref:()=>LS,set:()=>BS,setErrorMap:()=>Xh,strictObject:()=>PS,string:()=>hm,symbol:()=>ES,table:()=>pS,tablerow:()=>hS,templateLiteral:()=>XS,transformer:()=>yd,transforms:()=>j2,tuple:()=>DS,ulidRegex:()=>td,undefined:()=>kS,union:()=>NS,unknown:()=>OS,user:()=>lS,util:()=>_t,uuidRegex:()=>rd,variable:()=>sS,void:()=>AS,withErrorBoundary:()=>l_,z:()=>jr,zuiToJsonSchema:()=>md});var pu=FD(Z0),jr={};U0(jr,{BRAND:()=>Ex,DIRTY:()=>Ui,EMPTY_PATH:()=>Sx,INVALID:()=>Xe,NEVER:()=>i_,OK:()=>Hr,ParseInputLazyPath:()=>In,ParseStatus:()=>nn,Schema:()=>st,ZodAny:()=>Ia,ZodArray:()=>Ra,ZodBigInt:()=>nc,ZodBoolean:()=>oc,ZodBranded:()=>ic,ZodCatch:()=>Ou,ZodDate:()=>Au,ZodDefault:()=>Ru,ZodDiscriminatedUnion:()=>em,ZodEffects:()=>Do,ZodEnum:()=>Mo,ZodError:()=>so,ZodFirstPartyTypeKind:()=>Gh,ZodFunction:()=>rm,ZodIntersection:()=>Mu,ZodIssueCode:()=>xe,ZodLazy:()=>Du,ZodLiteral:()=>sc,ZodMap:()=>nm,ZodNaN:()=>om,ZodNativeEnum:()=>cc,ZodNever:()=>oi,ZodNull:()=>lc,ZodNullable:()=>jo,ZodNumber:()=>uc,ZodObject:()=>Zi,ZodOptional:()=>Bn,ZodParsedType:()=>Re,ZodPipeline:()=>Wu,ZodPromise:()=>dc,ZodReadonly:()=>Ju,ZodRecord:()=>im,ZodRef:()=>am,ZodSchema:()=>st,ZodSet:()=>sm,ZodString:()=>Dr,ZodSymbol:()=>lm,ZodTemplateLiteral:()=>cd,ZodTemplateLiteralUnsupportedCheckError:()=>wu,ZodTemplateLiteralUnsupportedTypeError:()=>Yh,ZodTransformer:()=>Do,ZodTuple:()=>Vi,ZodType:()=>st,ZodUndefined:()=>hc,ZodUnion:()=>mc,ZodUnknown:()=>Na,ZodVoid:()=>um,addIssueToContext:()=>Pe,agent:()=>dS,aimodel:()=>yS,any:()=>$S,array:()=>IS,bigint:()=>SS,boolean:()=>ym,coerce:()=>o_,conversation:()=>cS,createZodEnum:()=>ac,cuid2Regex:()=>ed,cuidRegex:()=>Qu,custom:()=>Qh,datasource:()=>gS,date:()=>_S,datetimeRegex:()=>od,discriminatedUnion:()=>MS,effect:()=>yd,emailRegex:()=>nd,enum:()=>VS,errorUtil:()=>Ve,event:()=>fS,fromJsonSchema:()=>r_,fromObject:()=>n_,function:()=>US,getErrorMap:()=>Ca,getParsedType:()=>Po,instanceof:()=>wS,intent:()=>mS,intersection:()=>jS,ipv4Regex:()=>fc,ipv6Regex:()=>pc,isAborted:()=>xu,isAsync:()=>rc,isDirty:()=>Su,isEmojiRegex:()=>Rx,isValid:()=>Aa,jsonSchemaToZui:()=>wc,knowledgebase:()=>vS,late:()=>bS,lazy:()=>zS,literal:()=>ZS,makeIssue:()=>tc,map:()=>qS,message:()=>uS,nan:()=>xS,nativeEnum:()=>HS,never:()=>CS,null:()=>TS,nullable:()=>GS,number:()=>mm,object:()=>RS,objectToZui:()=>Ma,objectUtil:()=>vu,oboolean:()=>t_,onumber:()=>e_,optional:()=>KS,ostring:()=>QS,pipeline:()=>YS,preprocess:()=>JS,processCreateParams:()=>ct,promise:()=>WS,quotelessJson:()=>vx,record:()=>FS,ref:()=>LS,set:()=>BS,setErrorMap:()=>Xh,strictObject:()=>PS,string:()=>hm,symbol:()=>ES,table:()=>pS,tablerow:()=>hS,templateLiteral:()=>XS,transformer:()=>yd,tuple:()=>DS,ulidRegex:()=>td,undefined:()=>kS,union:()=>NS,unknown:()=>OS,user:()=>lS,util:()=>_t,uuidRegex:()=>rd,variable:()=>sS,void:()=>AS,zuiToJsonSchema:()=>md});var Ot="x-zui",V0=O,Vr=fu(O,1),H0=(0,Vr.createContext)({formData:void 0,formSchema:void 0,setFormData:C(()=>{throw new Error("Must be within a FormDataProvider")},"setFormData"),setHiddenState:C(()=>{throw new Error("Must be within a FormDataProvider")},"setHiddenState"),setDisabledState:C(()=>{throw new Error("Must be within a FormDataProvider")},"setDisabledState"),hiddenState:{},disabledState:{},validation:{formValid:null,formErrors:null}}),W0=C((e,t,r)=>{var n;const o=(n=t[Ot])==null?void 0:n[e];if(typeof o>"u")return!1;if(typeof o=="boolean")return o;if(typeof o=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+o)()(r);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),K0=C((e,t)=>{const r=(0,Vr.useContext)(H0);if(r===void 0)throw new Error("useFormData must be used within a FormDataProvider");const n=(0,Vr.useMemo)(()=>Bi(r.formData,t),[r.formData,t]),o=(0,Vr.useMemo)(()=>{var f;return r.validation.formValid===null?{formValid:null,formErrors:null}:r.validation.formValid===!1?{formValid:!1,formErrors:((f=r.validation.formErrors)==null?void 0:f.filter(h=>Y0(h.path,t)).map(h=>({message:h.message,code:h.code,path:t})))||null}:{formValid:!0,formErrors:[]}},[r.validation.formValid,r.validation.formErrors,t]),i=r.dataTransform?r.dataTransform(n):n,a=(0,Vr.useMemo)(()=>W0("hidden",e,i),[e,i]),s=(0,Vr.useMemo)(()=>W0("disabled",e,i),[e,i]);(0,Vr.useEffect)(()=>{r.setHiddenState(f=>$a(f,t,a||{})),r.setDisabledState(f=>$a(f,t,s||{}))},[JSON.stringify({fieldSchema:e,data:n})]);const{disabled:c,hidden:l}=(0,Vr.useMemo)(()=>{const f=a===!0||Bi(r.hiddenState,t),h=s===!0||Bi(r.disabledState,t);return{hidden:f===!0,disabled:h===!0}},[r.hiddenState,r.disabledState,a,s,t]),u=(0,Vr.useCallback)((f,h)=>{r.setFormData(y=>$a(y,f,h))},[r.setFormData]),d=(0,Vr.useCallback)((f,h=void 0)=>{const y=Oa(e.items);r.setFormData(m=>{const g=Bi(m,f)||[];return h===void 0&&(h=y),$a(m,f,Array.isArray(g)?[...g,h]:[h])})},[r.setFormData]),p=(0,Vr.useCallback)((f,h)=>{r.setFormData(y=>{const m=Bi(y,f)||[];return Array.isArray(m)?(m.splice(h,1),$a(y,f,m)):y})},[r.setFormData]);return I(ee(I({},r),{data:n,disabled:c,hidden:l,handlePropertyChange:u,addArrayItem:d,removeArrayItem:p}),o)},"useFormData");function $a(e,t,r){if(t.length===0)return r;const n=t.length;return t.reduce((o,i,a)=>(a===n-1?o[i]=r:o[i]||(o[i]=isNaN(Number(i))?{}:[]),o[i]),e??{}),I({},e)}C($a,"setObjectPath");var Oa=C((e,t)=>{var r,n,o,i;if(Array.isArray(e))return Oa(e[0]);if(e.default)return e.default;if(e.nullable)return null;if(!t){if((r=e.anyOf)!=null&&r.length)return Oa(e.anyOf[0]);if(e.type==="object"&&e.properties){const a={};return Object.entries(e.properties).map(([s,c])=>{var l;a[s]=Oa(c,!((l=e.required)!=null&&l.includes(s))||G0(c)||!1)}),a}if(e.type==="array")return e.minItems&&e.minItems>0?[Oa(e.items)]:[];if(e.type==="string")return(n=e.enum)!=null&&n.length?e.enum[0]:"";if(e.type==="number")return(o=e.enum)!=null&&o.length?e.enum[0]:0;if(e.type==="boolean")return(i=e.enum)!=null&&i.length?e.enum[0]:!1}},"getDefaultValues"),LD=C(({children:e,setFormData:t,formData:r,formSchema:n,disableValidation:o,onValidation:i,dataTransform:a})=>{const[s,c]=(0,Vr.useState)({}),[l,u]=(0,Vr.useState)({}),d=a?a(r):r,p=(0,Vr.useMemo)(()=>{if(o)return{formValid:null,formErrors:null};if(!n)return{formValid:null,formErrors:null};const f=wc(n).safeParse(d);return f.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:f.error.issues}},[JSON.stringify({transformedData:d})]);return(0,Vr.useEffect)(()=>{i&&i(p)},[p]),Vr.default.createElement(H0.Provider,{value:{formData:r,setFormData:t,formSchema:n,validation:p,hiddenState:s,setHiddenState:c,disabledState:l,setDisabledState:u,dataTransform:a}},e)},"FormDataProvider");function Bi(e,t){return t.reduce((r,n)=>r?r[n]:null,e)}C(Bi,"getPathData");function G0(e){var t;return((t=e.anyOf)==null?void 0:t.some(r=>r.not&&Object.keys(r.not).length===0))||!1}C(G0,"isOptional");function hu(e,t){const r=I({},e);for(const n in t)t.hasOwnProperty(n)&&(typeof t[n]=="object"&&t[n]!==null&&!Array.isArray(t[n])?typeof r[n]=="object"&&r[n]!==null&&!Array.isArray(r[n])?r[n]=hu(r[n],t[n]):r[n]=hu({},t[n]):r[n]=t[n]);return r}C(hu,"deepMerge");var qD=C((e,t)=>{const{handlePropertyChange:r,data:n}=K0(e,t),{discriminator:o,value:i,discriminatedSchema:a}=(0,V0.useMemo)(()=>{const s=J0(e.anyOf),c=s!=null&&s.key?n==null?void 0:n[s.key]:e.default||null,l=BD((s==null?void 0:s.key)||null,c,e.anyOf);return{discriminator:s,value:c,discriminatedSchema:l}},[e.anyOf,n]);return(0,V0.useEffect)(()=>{o!=null&&o.key&&(o!=null&&o.values.length)&&Object.keys(n||{}).length<1&&!e.default&&r(t,{[o.key]:o.values[0]})},[]),{discriminator:o,discriminatorValue:i,discriminatedSchema:a}},"useDiscriminator"),J0=C(e=>{const t=e==null?void 0:e.map(r=>r.type!=="object"||!r.properties?null:Object.entries(r.properties).map(([n,o])=>{var i;return o.type==="string"&&((i=o.enum)!=null&&i.length)?{key:n,value:o.enum[0]}:null}).filter(n=>!!n)).flat().reduce((r,n)=>{if(!n)return r;const{key:o,value:i}=n;return r.key===null&&(r.key=o),r.key===o&&r.values.push(i),r},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),BD=C((e,t,r)=>{var n,o;if(!(r!=null&&r.length)||!e||!t)return null;for(const i of r){if(i.type!=="object")continue;const a=(n=i.properties)==null?void 0:n[e];if((a==null?void 0:a.type)==="string"&&((o=a.enum)!=null&&o.length)&&a.enum[0]===t)return ee(I({},i),{properties:ee(I({},i.properties),{[e]:ee(I({},a),{[Ot]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),UD=C(e=>{var t;return(t=e.anyOf)!=null&&t.length?J0(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),zD=C((e,t)=>{var r,n,o;const i=UD(t),a=((r=t[Ot])==null?void 0:r.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const u=(n=e==null?void 0:e[i])==null?void 0:n.default;return u?{Component:u,type:i,id:"default",params:{}}:null}const s=a[0],c=((o=e==null?void 0:e[i])==null?void 0:o[s])||null;if(!c)return console.warn(`Component ${i}.${s} not found`),null;const l=a[1]||{};return{Component:c,type:i,id:s,params:l}},"resolveComponent");function Y0(e,t){return e.length!==t.length?!1:e.every((r,n)=>r===t[n])}C(Y0,"pathMatches");function Kh(e,t){return t||(t=new RegExp("/s|-|_| ","g")),ex(e).split(t).map(X0).map(tx).reduce(Q0)}C(Kh,"formatTitle");function X0(e){return e.charAt(0).toUpperCase()+e.substring(1)}C(X0,"capitalize");function Q0(e,t){return`${e} ${t}`}C(Q0,"combine");function ex(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}C(ex,"decamelize");function tx(e,t,r){const n=e.toLowerCase(),o=e.toUpperCase();for(const i of KD)if(i.toLowerCase()===n)return i;return ZD.includes(o)?o:t===0||t===r.length-1||e.length>=4?e:WD.includes(n)||HD.includes(n)||VD.includes(n)?n:e}C(tx,"handleSpecialWords");var ZD=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],VD=["a","an","the"],HD=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],WD=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],KD=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"];function mu(e){if(typeof e!="string")return"";const t=String.raw`${e}`;return t.includes("`")?`"${t.replace(/"/g,'\\"')}"`:t.includes("'")?`'${t.replace(/'/g,"\\'")}'`:`'${t}'`}C(mu,"escapeString");var rx=C(e=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e)?e:mu(e),"toPropertyKey"),br=C(e=>{const t=(e??"").split(`
|
|
1
|
+
(function(rt,O){typeof exports=="object"&&typeof module<"u"?O(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],O):(rt=typeof globalThis<"u"?globalThis:rt||self,O(rt.Webchat={},rt.React,rt.ReactDOM))})(this,function(rt,O,ao){"use strict";var ZSe=Object.defineProperty;var VSe=(rt,O,ao)=>O in rt?ZSe(rt,O,{enumerable:!0,configurable:!0,writable:!0,value:ao}):rt[O]=ao;var k=(rt,O,ao)=>(VSe(rt,typeof O!="symbol"?O+"":O,ao),ao);function D0(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const P=D0(O),ID=D0(ao);var He=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function St(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Hh(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){return this instanceof n?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,o.get?o:{enumerable:!0,get:function(){return e[n]}})}),r}var F0={exports:{}},RD=Object.create,Ta=Object.defineProperty,PD=Object.defineProperties,ND=Object.getOwnPropertyDescriptor,MD=Object.getOwnPropertyDescriptors,jD=Object.getOwnPropertyNames,du=Object.getOwnPropertySymbols,DD=Object.getPrototypeOf,Wh=Object.prototype.hasOwnProperty,L0=Object.prototype.propertyIsEnumerable,q0=(e,t,r)=>t in e?Ta(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t)=>{for(var r in t||(t={}))Wh.call(t,r)&&q0(e,r,t[r]);if(du)for(var r of du(t))L0.call(t,r)&&q0(e,r,t[r]);return e},ee=(e,t)=>PD(e,MD(t)),C=(e,t)=>Ta(e,"name",{value:t,configurable:!0}),B0=(e,t)=>{var r={};for(var n in e)Wh.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&du)for(var n of du(e))t.indexOf(n)<0&&L0.call(e,n)&&(r[n]=e[n]);return r},U0=(e,t)=>{for(var r in t)Ta(e,r,{get:t[r],enumerable:!0})},z0=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of jD(t))!Wh.call(e,o)&&o!==r&&Ta(e,o,{get:()=>t[o],enumerable:!(n=ND(t,o))||n.enumerable});return e},fu=(e,t,r)=>(r=e!=null?RD(DD(e)):{},z0(t||!e||!e.__esModule?Ta(r,"default",{value:e,enumerable:!0}):r,e)),FD=e=>z0(Ta({},"__esModule",{value:!0}),e),Z0={};U0(Z0,{BRAND:()=>Ex,DIRTY:()=>Ui,EMPTY_PATH:()=>Sx,ErrorBoundary:()=>Da,INVALID:()=>Xe,NEVER:()=>i_,OK:()=>Hr,ParseInputLazyPath:()=>In,ParseStatus:()=>nn,Schema:()=>st,UntitledDeclarationError:()=>ix,ZodAny:()=>Ia,ZodArray:()=>Ra,ZodBigInt:()=>nc,ZodBoolean:()=>oc,ZodBranded:()=>ic,ZodCatch:()=>Ou,ZodDate:()=>Au,ZodDefault:()=>Ru,ZodDiscriminatedUnion:()=>em,ZodEffects:()=>Do,ZodEnum:()=>Mo,ZodError:()=>so,ZodFirstPartyTypeKind:()=>Gh,ZodFunction:()=>rm,ZodIntersection:()=>Mu,ZodIssueCode:()=>xe,ZodLazy:()=>Du,ZodLiteral:()=>sc,ZodMap:()=>nm,ZodNaN:()=>om,ZodNativeEnum:()=>cc,ZodNever:()=>oi,ZodNull:()=>lc,ZodNullable:()=>jo,ZodNumber:()=>uc,ZodObject:()=>Zi,ZodOptional:()=>Bn,ZodParsedType:()=>Re,ZodPipeline:()=>Wu,ZodPromise:()=>dc,ZodReadonly:()=>Ju,ZodRecord:()=>im,ZodRef:()=>am,ZodSchema:()=>st,ZodSet:()=>sm,ZodString:()=>Dr,ZodSymbol:()=>lm,ZodTemplateLiteral:()=>cd,ZodTemplateLiteralUnsupportedCheckError:()=>wu,ZodTemplateLiteralUnsupportedTypeError:()=>Yh,ZodTransformer:()=>Do,ZodTuple:()=>Vi,ZodType:()=>st,ZodUndefined:()=>hc,ZodUnion:()=>mc,ZodUnknown:()=>Na,ZodVoid:()=>um,ZuiForm:()=>N2,addIssueToContext:()=>Pe,agent:()=>dS,aimodel:()=>yS,any:()=>$S,array:()=>IS,bigint:()=>SS,boolean:()=>ym,coerce:()=>o_,conversation:()=>cS,createZodEnum:()=>ac,cuid2Regex:()=>ed,cuidRegex:()=>Qu,custom:()=>Qh,datasource:()=>gS,date:()=>_S,datetimeRegex:()=>od,defaultComponentDefinitions:()=>M2,discriminatedUnion:()=>MS,effect:()=>yd,emailRegex:()=>nd,enum:()=>VS,errorUtil:()=>Ve,event:()=>fS,fromJsonSchema:()=>r_,fromObject:()=>n_,function:()=>US,getErrorMap:()=>Ca,getParsedType:()=>Po,instanceof:()=>wS,intent:()=>mS,intersection:()=>jS,ipv4Regex:()=>fc,ipv6Regex:()=>pc,isAborted:()=>xu,isAsync:()=>rc,isDirty:()=>Su,isEmojiRegex:()=>Rx,isValid:()=>Aa,jsonSchemaToZui:()=>wc,knowledgebase:()=>vS,late:()=>bS,lazy:()=>zS,literal:()=>ZS,makeIssue:()=>tc,map:()=>qS,message:()=>uS,nan:()=>xS,nativeEnum:()=>HS,never:()=>CS,null:()=>TS,nullable:()=>GS,number:()=>mm,object:()=>RS,objectToZui:()=>Ma,objectUtil:()=>vu,oboolean:()=>t_,onumber:()=>e_,optional:()=>KS,ostring:()=>QS,pipeline:()=>YS,preprocess:()=>JS,processCreateParams:()=>ct,promise:()=>WS,quotelessJson:()=>vx,record:()=>FS,ref:()=>LS,set:()=>BS,setErrorMap:()=>Xh,strictObject:()=>PS,string:()=>hm,symbol:()=>ES,table:()=>pS,tablerow:()=>hS,templateLiteral:()=>XS,transformer:()=>yd,transforms:()=>j2,tuple:()=>DS,ulidRegex:()=>td,undefined:()=>kS,union:()=>NS,unknown:()=>OS,user:()=>lS,util:()=>_t,uuidRegex:()=>rd,variable:()=>sS,void:()=>AS,withErrorBoundary:()=>l_,z:()=>jr,zuiToJsonSchema:()=>md});var pu=FD(Z0),jr={};U0(jr,{BRAND:()=>Ex,DIRTY:()=>Ui,EMPTY_PATH:()=>Sx,INVALID:()=>Xe,NEVER:()=>i_,OK:()=>Hr,ParseInputLazyPath:()=>In,ParseStatus:()=>nn,Schema:()=>st,ZodAny:()=>Ia,ZodArray:()=>Ra,ZodBigInt:()=>nc,ZodBoolean:()=>oc,ZodBranded:()=>ic,ZodCatch:()=>Ou,ZodDate:()=>Au,ZodDefault:()=>Ru,ZodDiscriminatedUnion:()=>em,ZodEffects:()=>Do,ZodEnum:()=>Mo,ZodError:()=>so,ZodFirstPartyTypeKind:()=>Gh,ZodFunction:()=>rm,ZodIntersection:()=>Mu,ZodIssueCode:()=>xe,ZodLazy:()=>Du,ZodLiteral:()=>sc,ZodMap:()=>nm,ZodNaN:()=>om,ZodNativeEnum:()=>cc,ZodNever:()=>oi,ZodNull:()=>lc,ZodNullable:()=>jo,ZodNumber:()=>uc,ZodObject:()=>Zi,ZodOptional:()=>Bn,ZodParsedType:()=>Re,ZodPipeline:()=>Wu,ZodPromise:()=>dc,ZodReadonly:()=>Ju,ZodRecord:()=>im,ZodRef:()=>am,ZodSchema:()=>st,ZodSet:()=>sm,ZodString:()=>Dr,ZodSymbol:()=>lm,ZodTemplateLiteral:()=>cd,ZodTemplateLiteralUnsupportedCheckError:()=>wu,ZodTemplateLiteralUnsupportedTypeError:()=>Yh,ZodTransformer:()=>Do,ZodTuple:()=>Vi,ZodType:()=>st,ZodUndefined:()=>hc,ZodUnion:()=>mc,ZodUnknown:()=>Na,ZodVoid:()=>um,addIssueToContext:()=>Pe,agent:()=>dS,aimodel:()=>yS,any:()=>$S,array:()=>IS,bigint:()=>SS,boolean:()=>ym,coerce:()=>o_,conversation:()=>cS,createZodEnum:()=>ac,cuid2Regex:()=>ed,cuidRegex:()=>Qu,custom:()=>Qh,datasource:()=>gS,date:()=>_S,datetimeRegex:()=>od,discriminatedUnion:()=>MS,effect:()=>yd,emailRegex:()=>nd,enum:()=>VS,errorUtil:()=>Ve,event:()=>fS,fromJsonSchema:()=>r_,fromObject:()=>n_,function:()=>US,getErrorMap:()=>Ca,getParsedType:()=>Po,instanceof:()=>wS,intent:()=>mS,intersection:()=>jS,ipv4Regex:()=>fc,ipv6Regex:()=>pc,isAborted:()=>xu,isAsync:()=>rc,isDirty:()=>Su,isEmojiRegex:()=>Rx,isValid:()=>Aa,jsonSchemaToZui:()=>wc,knowledgebase:()=>vS,late:()=>bS,lazy:()=>zS,literal:()=>ZS,makeIssue:()=>tc,map:()=>qS,message:()=>uS,nan:()=>xS,nativeEnum:()=>HS,never:()=>CS,null:()=>TS,nullable:()=>GS,number:()=>mm,object:()=>RS,objectToZui:()=>Ma,objectUtil:()=>vu,oboolean:()=>t_,onumber:()=>e_,optional:()=>KS,ostring:()=>QS,pipeline:()=>YS,preprocess:()=>JS,processCreateParams:()=>ct,promise:()=>WS,quotelessJson:()=>vx,record:()=>FS,ref:()=>LS,set:()=>BS,setErrorMap:()=>Xh,strictObject:()=>PS,string:()=>hm,symbol:()=>ES,table:()=>pS,tablerow:()=>hS,templateLiteral:()=>XS,transformer:()=>yd,tuple:()=>DS,ulidRegex:()=>td,undefined:()=>kS,union:()=>NS,unknown:()=>OS,user:()=>lS,util:()=>_t,uuidRegex:()=>rd,variable:()=>sS,void:()=>AS,zuiToJsonSchema:()=>md});var Ot="x-zui",V0=O,Vr=fu(O,1),H0=(0,Vr.createContext)({formData:void 0,formSchema:void 0,setFormData:C(()=>{throw new Error("Must be within a FormDataProvider")},"setFormData"),setHiddenState:C(()=>{throw new Error("Must be within a FormDataProvider")},"setHiddenState"),setDisabledState:C(()=>{throw new Error("Must be within a FormDataProvider")},"setDisabledState"),hiddenState:{},disabledState:{},validation:{formValid:null,formErrors:null}}),W0=C((e,t,r)=>{var n;const o=(n=t[Ot])==null?void 0:n[e];if(typeof o>"u")return!1;if(typeof o=="boolean")return o;if(typeof o=="string"){if(typeof window>"u")return console.warn("Function evaluation is not supported in server side rendering"),!1;const a=new Function("return "+o)()(r);switch(typeof a){case"object":case"boolean":return a;default:return!1}}return!1},"parseMaskableField"),K0=C((e,t)=>{const r=(0,Vr.useContext)(H0);if(r===void 0)throw new Error("useFormData must be used within a FormDataProvider");const n=(0,Vr.useMemo)(()=>Bi(r.formData,t),[r.formData,t]),o=(0,Vr.useMemo)(()=>{var f;return r.validation.formValid===null?{formValid:null,formErrors:null}:r.validation.formValid===!1?{formValid:!1,formErrors:((f=r.validation.formErrors)==null?void 0:f.filter(h=>Y0(h.path,t)).map(h=>({message:h.message,code:h.code,path:t})))||null}:{formValid:!0,formErrors:[]}},[r.validation.formValid,r.validation.formErrors,t]),i=r.dataTransform?r.dataTransform(n):n,a=(0,Vr.useMemo)(()=>W0("hidden",e,i),[e,i]),s=(0,Vr.useMemo)(()=>W0("disabled",e,i),[e,i]);(0,Vr.useEffect)(()=>{r.setHiddenState(f=>$a(f,t,a||{})),r.setDisabledState(f=>$a(f,t,s||{}))},[JSON.stringify({fieldSchema:e,data:n})]);const{disabled:c,hidden:l}=(0,Vr.useMemo)(()=>{const f=a===!0||Bi(r.hiddenState,t),h=s===!0||Bi(r.disabledState,t);return{hidden:f===!0,disabled:h===!0}},[r.hiddenState,r.disabledState,a,s,t]),u=(0,Vr.useCallback)((f,h)=>{r.setFormData(y=>$a(y,f,h))},[r.setFormData]),d=(0,Vr.useCallback)((f,h=void 0)=>{const y=Oa(e.items);r.setFormData(m=>{const g=Bi(m,f)||[];return h===void 0&&(h=y),$a(m,f,Array.isArray(g)?[...g,h]:[h])})},[r.setFormData]),p=(0,Vr.useCallback)((f,h)=>{r.setFormData(y=>{const m=Bi(y,f)||[];return Array.isArray(m)?(m.splice(h,1),$a(y,f,m)):y})},[r.setFormData]);return I(ee(I({},r),{data:n,disabled:c,hidden:l,handlePropertyChange:u,addArrayItem:d,removeArrayItem:p}),o)},"useFormData");function $a(e,t,r){if(t.length===0)return r;const n=t.length;return t.reduce((o,i,a)=>(a===n-1?o[i]=r:o[i]||(o[i]=isNaN(Number(i))?{}:[]),o[i]),e??{}),I({},e)}C($a,"setObjectPath");var Oa=C((e,t)=>{var r,n,o,i;if(Array.isArray(e))return Oa(e[0]);if(e.default)return e.default;if(e.nullable)return null;if(!t){if((r=e.anyOf)!=null&&r.length)return Oa(e.anyOf[0]);if(e.type==="object"&&e.properties){const a={};return Object.entries(e.properties).map(([s,c])=>{var l;a[s]=Oa(c,!((l=e.required)!=null&&l.includes(s))||G0(c)||!1)}),a}if(e.type==="array")return e.minItems&&e.minItems>0?[Oa(e.items)]:[];if(e.type==="string")return(n=e.enum)!=null&&n.length?e.enum[0]:"";if(e.type==="number")return(o=e.enum)!=null&&o.length?e.enum[0]:0;if(e.type==="boolean")return(i=e.enum)!=null&&i.length?e.enum[0]:!1}},"getDefaultValues"),LD=C(({children:e,setFormData:t,formData:r,formSchema:n,disableValidation:o,onValidation:i,dataTransform:a})=>{const[s,c]=(0,Vr.useState)({}),[l,u]=(0,Vr.useState)({}),d=a?a(r):r,p=(0,Vr.useMemo)(()=>{if(o)return{formValid:null,formErrors:null};if(!n)return{formValid:null,formErrors:null};const f=wc(n).safeParse(d);return f.success?{formValid:!0,formErrors:[]}:{formValid:!1,formErrors:f.error.issues}},[JSON.stringify({transformedData:d})]);return(0,Vr.useEffect)(()=>{i&&i(p)},[p]),Vr.default.createElement(H0.Provider,{value:{formData:r,setFormData:t,formSchema:n,validation:p,hiddenState:s,setHiddenState:c,disabledState:l,setDisabledState:u,dataTransform:a}},e)},"FormDataProvider");function Bi(e,t){return t.reduce((r,n)=>r?r[n]:null,e)}C(Bi,"getPathData");function G0(e){var t;return((t=e.anyOf)==null?void 0:t.some(r=>r.not&&Object.keys(r.not).length===0))||!1}C(G0,"isOptional");function hu(e,t){const r=I({},e);for(const n in t)t.hasOwnProperty(n)&&(typeof t[n]=="object"&&t[n]!==null&&!Array.isArray(t[n])?typeof r[n]=="object"&&r[n]!==null&&!Array.isArray(r[n])?r[n]=hu(r[n],t[n]):r[n]=hu({},t[n]):r[n]=t[n]);return r}C(hu,"deepMerge");var qD=C((e,t)=>{const{handlePropertyChange:r,data:n}=K0(e,t),{discriminator:o,value:i,discriminatedSchema:a}=(0,V0.useMemo)(()=>{const s=J0(e.anyOf),c=s!=null&&s.key?n==null?void 0:n[s.key]:e.default||null,l=BD((s==null?void 0:s.key)||null,c,e.anyOf);return{discriminator:s,value:c,discriminatedSchema:l}},[e.anyOf,n]);return(0,V0.useEffect)(()=>{o!=null&&o.key&&(o!=null&&o.values.length)&&Object.keys(n||{}).length<1&&!e.default&&r(t,{[o.key]:o.values[0]})},[]),{discriminator:o,discriminatorValue:i,discriminatedSchema:a}},"useDiscriminator"),J0=C(e=>{const t=e==null?void 0:e.map(r=>r.type!=="object"||!r.properties?null:Object.entries(r.properties).map(([n,o])=>{var i;return o.type==="string"&&((i=o.enum)!=null&&i.length)?{key:n,value:o.enum[0]}:null}).filter(n=>!!n)).flat().reduce((r,n)=>{if(!n)return r;const{key:o,value:i}=n;return r.key===null&&(r.key=o),r.key===o&&r.values.push(i),r},{key:null,values:[]});return(t==null?void 0:t.key)===null||!(t!=null&&t.values.length)?null:t},"resolveDiscriminator"),BD=C((e,t,r)=>{var n,o;if(!(r!=null&&r.length)||!e||!t)return null;for(const i of r){if(i.type!=="object")continue;const a=(n=i.properties)==null?void 0:n[e];if((a==null?void 0:a.type)==="string"&&((o=a.enum)!=null&&o.length)&&a.enum[0]===t)return ee(I({},i),{properties:ee(I({},i.properties),{[e]:ee(I({},a),{[Ot]:{hidden:!0}})})})}return null},"resolveDiscriminatedSchema"),UD=C(e=>{var t;return(t=e.anyOf)!=null&&t.length?J0(e.anyOf)?"discriminatedUnion":"object":e.type==="integer"?"number":e.type},"getSchemaType"),zD=C((e,t)=>{var r,n,o;const i=UD(t),a=((r=t[Ot])==null?void 0:r.displayAs)||null;if(!a||!Array.isArray(a)||a.length<2){const u=(n=e==null?void 0:e[i])==null?void 0:n.default;return u?{Component:u,type:i,id:"default",params:{}}:null}const s=a[0],c=((o=e==null?void 0:e[i])==null?void 0:o[s])||null;if(!c)return console.warn(`Component ${i}.${s} not found`),null;const l=a[1]||{};return{Component:c,type:i,id:s,params:l}},"resolveComponent");function Y0(e,t){return e.length!==t.length?!1:e.every((r,n)=>r===t[n])}C(Y0,"pathMatches");function Kh(e,t){return t||(t=new RegExp("/s|-|_| ","g")),ex(e).split(t).map(X0).map(tx).reduce(Q0)}C(Kh,"formatTitle");function X0(e){return e.charAt(0).toUpperCase()+e.substring(1)}C(X0,"capitalize");function Q0(e,t){return`${e} ${t}`}C(Q0,"combine");function ex(e){return e.replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g,"$1_$2").toLowerCase()}C(ex,"decamelize");function tx(e,t,r){const n=e.toLowerCase(),o=e.toUpperCase();for(const i of KD)if(i.toLowerCase()===n)return i;return ZD.includes(o)?o:t===0||t===r.length-1||e.length>=4?e:WD.includes(n)||HD.includes(n)||VD.includes(n)?n:e}C(tx,"handleSpecialWords");var ZD=["2D","3D","4WD","A2O","API","BIOS","CCTV","CC","CCV","CD","CD-ROM","COBOL","CIA","CMS","CSS","CSV","CV","DIY","DVD","DB","DNA","E3","EIN","ESPN","FAQ","FAQs","FTP","FPS","FORTRAN","FBI","HTML","HTTP","ID","IP","ISO","JS","JSON","LASER","M2A","M2M","M2MM","M2O","MMORPG","NAFTA","NASA","NDA","O2M","PDF","PHP","POP","RAM","RNGR","ROM","RPG","RTFM","RTS","SCUBA","SITCOM","SKU","SMTP","SQL","SSN","SWAT","TBS","TTL","TV","TNA","UI","URL","USB","UWP","VIP","W3C","WYSIWYG","WWW","WWE","WWF"],VD=["a","an","the"],HD=["and","that","but","or","as","if","when","than","because","while","where","after","so","though","since","until","whether","before","although","nor","like","once","unless","now","except"],WD=["about","above","across","after","against","along","among","around","at","because of","before","behind","below","beneath","beside","besides","between","beyond","but","by","concerning","despite","down","during","except","excepting","for","from","in","in front of","inside","in spite of","instead of","into","like","near","of","off","on","onto","out","outside","over","past","regarding","since","through","throughout","to","toward","under","underneath","until","up","upon","up to","with","within","without","with regard to","with respect to"],KD=["2FA","3D","4K","5K","8K","AGI","BI","ChatGPT","CTA","DateTime","GitHub","GPT","HD","IBMid","ID","IDs","iMac","IMAX","iOS","IP","iPad","iPhone","iPod","LDAP","LinkedIn","LLM","M2M","M2O","macOS","McDonalds","ML","MySQL","NLG","NLP","NLU","O2M","OpenAI","PDFs","PEFT","pH","PostgreSQL","SEO","TTS","UHD","UUID","XSS","YouTube"];function mu(e){if(typeof e!="string")return"";const t=String.raw`${e}`;return t.includes("`")?`"${t.replace(/"/g,'\\"')}"`:t.includes("'")?`'${t.replace(/'/g,"\\'")}'`:`'${t}'`}C(mu,"escapeString");var rx=C(e=>/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(e)?e:mu(e),"toPropertyKey"),br=C(e=>{const t=(e??"").split(`
|
|
2
2
|
`).filter(r=>r.trim().length>0);return t.length===0?"":t.length===1?`/** ${t[0]} */`:`/**
|
|
3
3
|
* ${t.join(`
|
|
4
4
|
* `)}
|
|
@@ -71,10 +71,10 @@ ${mu(e.value)}`.trim();case Qe.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
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[A_]=this[A_]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=_c(a);n[s]||(DF(o,a),n[s]=!0)}return oe.isArray(t)?t.forEach(i):i(t),this}};kd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(kd.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),oe.freezeMethods(kd);const Zn=kd;function Cm(e,t){const r=this||$m,n=t||r,o=Zn.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 I_(e){return!!(e&&e.__CANCEL__)}function La(e,t,r){dt.call(this,e??"canceled",dt.ERR_CANCELED,t,r),this.name="CanceledError"}oe.inherits(La,dt,{__CANCEL__:!0});function R_(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new dt("Request failed with status code "+r.status,[dt.ERR_BAD_REQUEST,dt.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function FF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LF(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 qF(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 Td=(e,t,r=3)=>{let n=0;const o=LF(50,250);return qF(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)},BF=zn.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}}(),UF=zn.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 zF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function ZF(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function P_(e,t){return e&&!zF(t)?ZF(e,t):t}const N_=e=>e instanceof Zn?{...e}:e;function Wi(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(N_(l),N_(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 M_=e=>{const t=Wi({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;t.headers=a=Zn.from(a),t.url=T_(P_(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(zn.hasStandardBrowserEnv||zn.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(zn.hasStandardBrowserEnv&&(n&&oe.isFunction(n)&&(n=n(t)),n||n!==!1&&BF(t.url))){const l=o&&i&&UF.read(i);l&&a.set(o,l)}return t},VF=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const o=M_(e);let i=o.data;const a=Zn.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=Zn.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};R_(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 dt("Request aborted",dt.ECONNABORTED,o,u)),u=null)},u.onerror=function(){n(new dt("Network Error",dt.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||O_;o.timeoutErrorMessage&&(h=o.timeoutErrorMessage),n(new dt(h,y.clarifyTimeoutError?dt.ETIMEDOUT:dt.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",Td(o.onDownloadProgress,!0)),typeof o.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",Td(o.onUploadProgress)),(o.cancelToken||o.signal)&&(c=f=>{u&&(n(!f||f.type?new La(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=FF(o.url);if(p&&zn.protocols.indexOf(p)===-1){n(new dt("Unsupported protocol "+p+":",dt.ERR_BAD_REQUEST,e));return}u.send(i||null)})},HF=(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 dt?l:new La(l instanceof Error?l.message:l))}};let i=t&&setTimeout(()=>{o(new dt(`timeout ${t} of ms exceeded`,dt.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}]},WF=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},KF=async function*(e,t,r){for await(const n of e)yield*WF(ArrayBuffer.isView(n)?n:await r(String(n)),t)},j_=(e,t,r,n,o)=>{const i=KF(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})},D_=(e,t)=>{const r=e!=null;return n=>setTimeout(()=>t({lengthComputable:r,total:e,loaded:n}))},$d=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",F_=$d&&typeof ReadableStream=="function",Am=$d&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),GF=F_&&(()=>{let e=!1;const t=new Request(zn.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t})(),L_=64*1024,Im=F_&&!!(()=>{try{return oe.isReadableStream(new Response("").body)}catch{}})(),Od={stream:Im&&(e=>e.body)};$d&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Od[t]&&(Od[t]=oe.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new dt(`Response type '${t}' is not supported`,dt.ERR_NOT_SUPPORT,n)})})})(new Response);const JF=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 Am(e)).byteLength},YF=async(e,t)=>{const r=oe.toFiniteNumber(e.getContentLength());return r??JF(t)},Rm={http:wF,xhr:VF,fetch:$d&&(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}=M_(e);l=l?(l+"").toLowerCase():"text";let[f,h]=o||i||a?HF([o,i],a):[],y,m;const g=()=>{!y&&setTimeout(()=>{f&&f.unsubscribe()}),y=!0};let v;try{if(c&&GF&&r!=="get"&&r!=="head"&&(v=await YF(u,n))!==0){let S=new Request(t,{method:"POST",body:n,duplex:"half"}),$;oe.isFormData(n)&&($=S.headers.get("content-type"))&&u.setContentType($),S.body&&(n=j_(S.body,L_,D_(v,Td(c)),null,Am))}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=Im&&(l==="stream"||l==="response");if(Im&&(s||x)){const S={};["status","statusText","headers"].forEach(R=>{S[R]=b[R]});const $=oe.toFiniteNumber(b.headers.get("content-length"));b=new Response(j_(b.body,L_,s&&D_($,Td(s,!0)),x&&g,Am),S)}l=l||"text";let w=await Od[oe.findKey(Od,l)||"text"](b,e);return!x&&g(),h&&h(),await new Promise((S,$)=>{R_(S,$,{data:w,headers:Zn.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 dt("Network Error",dt.ERR_NETWORK,e,m),{cause:b.cause||b}):dt.from(b,b&&b.code,e,m)}})};oe.forEach(Rm,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const q_=e=>`- ${e}`,XF=e=>oe.isFunction(e)||e===null||e===!1,B_={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,!XF(r)&&(n=Rm[(a=String(r)).toLowerCase()],n===void 0))throw new dt(`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(q_).join(`
|
|
73
73
|
`):" "+q_(i[0]):"as no adapter specified";throw new dt("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return n},adapters:Rm};function Pm(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new La(null,e)}function U_(e){return Pm(e),e.headers=Zn.from(e.headers),e.data=Cm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),B_.getAdapter(e.adapter||$m.adapter)(e).then(function(n){return Pm(e),n.data=Cm.call(e,e.transformResponse,n),n.headers=Zn.from(n.headers),n},function(n){return I_(n)||(Pm(e),n&&n.response&&(n.response.data=Cm.call(e,e.transformResponse,n.response),n.response.headers=Zn.from(n.response.headers))),Promise.reject(n)})}const z_="1.7.2",Nm={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Nm[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const Z_={};Nm.transitional=function(t,r,n){function o(i,a){return"[Axios v"+z_+"] Transitional option '"+i+"'"+a+(n?". "+n:"")}return(i,a,s)=>{if(t===!1)throw new dt(o(a," has been removed"+(r?" in "+r:"")),dt.ERR_DEPRECATED);return r&&!Z_[a]&&(Z_[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 QF(e,t,r){if(typeof e!="object")throw new dt("options must be an object",dt.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 dt("option "+i+" must be "+c,dt.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new dt("Unknown option "+i,dt.ERR_BAD_OPTION)}}const Mm={assertOptions:QF,validators:Nm},ai=Mm.validators;let Cd=class{constructor(t){this.defaults=t,this.interceptors={request:new $_,response:new $_}}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=Wi(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Mm.assertOptions(n,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean)},!1),o!=null&&(oe.isFunction(o)?r.paramsSerializer={serialize:o}:Mm.assertOptions(o,{encode:ai.function,serialize:ai.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=Zn.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=[U_.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=U_.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=Wi(this.defaults,t);const r=P_(t.baseURL,t.url);return T_(r,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){Cd.prototype[t]=function(r,n){return this.request(Wi(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(Wi(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Cd.prototype[t]=r(),Cd.prototype[t+"Form"]=r(!0)});const Ad=Cd,eL=class AD{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 La(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 AD(function(o){t=o}),cancel:t}}};function tL(e){return function(r){return e.apply(null,r)}}function rL(e){return oe.isObject(e)&&e.isAxiosError===!0}const jm={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(jm).forEach(([e,t])=>{jm[t]=e});const nL=jm;function V_(e){const t=new Ad(e),r=u_(Ad.prototype.request,t);return oe.extend(r,Ad.prototype,t,{allOwnKeys:!0}),oe.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return V_(Wi(e,o))},r}const pr=V_($m);pr.Axios=Ad,pr.CanceledError=La,pr.CancelToken=eL,pr.isCancel=I_,pr.VERSION=z_,pr.toFormData=_d,pr.AxiosError=dt,pr.Cancel=pr.CanceledError,pr.all=function(t){return Promise.all(t)},pr.spread=tL,pr.isAxiosError=rL,pr.mergeConfig=Wi,pr.AxiosHeaders=Zn,pr.formToJSON=e=>C_(oe.isHTMLForm(e)?new FormData(e):e),pr.getAdapter=B_.getAdapter,pr.HttpStatusCode=nL,pr.default=pr;const qa=pr,{Axios:oL,AxiosError:iL,CanceledError:aL,isCancel:sL,CancelToken:cL,VERSION:lL,all:uL,Cancel:dL,isAxiosError:fL,spread:pL,toFormData:hL,AxiosHeaders:mL,HttpStatusCode:yL,formToJSON:gL,getAdapter:vL,mergeConfig:bL}=qa,wL=Object.freeze(Object.defineProperty({__proto__:null,Axios:oL,AxiosError:iL,AxiosHeaders:mL,Cancel:dL,CancelToken:cL,CanceledError:aL,HttpStatusCode:yL,VERSION:lL,all:uL,default:qa,formToJSON:gL,getAdapter:vL,isAxiosError:fL,isCancel:sL,mergeConfig:bL,spread:pL,toFormData:hL},Symbol.toStringTag,{value:"Module"}));var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var xL=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},SL=typeof window<"u"&&typeof window.document<"u",_L=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,EL=(typeof self>"u"?"undefined":xL(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")),TL=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",H_=Ba.isBrowser=SL;Ba.isWebWorker=EL;var Dm=Ba.isNode=_L;Ba.isJsDom=kL,Ba.isDeno=TL;var $L=Object.create,Fm=Object.defineProperty,OL=Object.getOwnPropertyDescriptor,CL=Object.getOwnPropertyNames,AL=Object.getPrototypeOf,IL=Object.prototype.hasOwnProperty,Nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),RL=(e,t)=>{for(var r in t)Fm(e,r,{get:t[r],enumerable:!0})},PL=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of CL(t))!IL.call(e,o)&&o!==r&&Fm(e,o,{get:()=>t[o],enumerable:!(n=OL(t,o))||n.enumerable});return e},Id=(e,t,r)=>(r=e!=null?$L(AL(e)):{},PL(t||!e||!e.__esModule?Fm(r,"default",{value:e,enumerable:!0}):r,e)),NL=Nt((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)}),ML=Nt(()=>{}),jL=Nt(()=>{}),DL=Nt((e,t)=>{t.exports=Error}),FL=Nt((e,t)=>{t.exports=EvalError}),LL=Nt((e,t)=>{t.exports=RangeError}),qL=Nt((e,t)=>{t.exports=ReferenceError}),W_=Nt((e,t)=>{t.exports=SyntaxError}),Rd=Nt((e,t)=>{t.exports=TypeError}),BL=Nt((e,t)=>{t.exports=URIError}),UL=Nt((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}}),zL=Nt((e,t)=>{var r=typeof Symbol<"u"&&Symbol,n=UL();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),ZL=Nt((e,t)=>{var r={__proto__:null,foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof n)}}),VL=Nt((e,t)=>{var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(l,u){for(var d=[],p=0;p<l.length;p+=1)d[p]=l[p];for(var f=0;f<u.length;f+=1)d[f+l.length]=u[f];return d},s=function(l,u){for(var d=[],p=u||0,f=0;p<l.length;p+=1,f+=1)d[f]=l[p];return d},c=function(l,u){for(var d="",p=0;p<l.length;p+=1)d+=l[p],p+1<l.length&&(d+=u);return d};t.exports=function(l){var u=this;if(typeof u!="function"||n.apply(u)!==i)throw new TypeError(r+u);for(var d=s(arguments,1),p,f=function(){if(this instanceof p){var v=u.apply(this,a(d,arguments));return Object(v)===v?v:this}return u.apply(l,a(d,arguments))},h=o(0,u.length-d.length),y=[],m=0;m<h;m++)y[m]="$"+m;if(p=Function("binder","return function ("+c(y,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var g=function(){};g.prototype=u.prototype,p.prototype=new g,g.prototype=null}return p}}),Lm=Nt((e,t)=>{var r=VL();t.exports=Function.prototype.bind||r}),HL=Nt((e,t)=>{var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=Lm();t.exports=o.call(r,n)}),Ua=Nt((e,t)=>{var r,n=DL(),o=FL(),i=LL(),a=qL(),s=W_(),c=Rd(),l=BL(),u=Function,d=function(M){try{return u('"use strict"; return ('+M+").constructor;")()}catch{}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch{p=null}var f=function(){throw new c},h=p?function(){try{return arguments.callee,f}catch{try{return p(arguments,"callee").get}catch{return f}}}():f,y=zL()(),m=ZL()(),g=Object.getPrototypeOf||(m?function(M){return M.__proto__}:null),v={},b=typeof Uint8Array>"u"||!g?r:g(Uint8Array),x={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%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%":n,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":v,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!g?r:g(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%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&g?g(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":b,"%TypeError%":c,"%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%":l,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch(M){w=g(g(M)),x["%Error.prototype%"]=w}var w,S=function M(E){var B;if(E==="%AsyncFunction%")B=d("async function () {}");else if(E==="%GeneratorFunction%")B=d("function* () {}");else if(E==="%AsyncGeneratorFunction%")B=d("async function* () {}");else if(E==="%AsyncGenerator%"){var Q=M("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(E==="%AsyncIteratorPrototype%"){var T=M("%AsyncGenerator%");T&&g&&(B=g(T.prototype))}return x[E]=B,B},$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=Lm(),N=HL(),A=R.call(Function.call,Array.prototype.concat),D=R.call(Function.apply,Array.prototype.splice),H=R.call(Function.call,String.prototype.replace),U=R.call(Function.call,String.prototype.slice),Z=R.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,W=function(M){var E=U(M,0,1),B=U(M,-1);if(E==="%"&&B!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&E!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var Q=[];return H(M,L,function(T,ce,pe,he){Q[Q.length]=pe?H(he,q,"$1"):ce||T}),Q},J=function(M,E){var B=M,Q;if(N($,B)&&(Q=$[B],B="%"+Q[0]+"%"),N(x,B)){var T=x[B];if(T===v&&(T=S(B)),typeof T>"u"&&!E)throw new c("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:Q,name:B,value:T}}throw new s("intrinsic "+M+" does not exist!")};t.exports=function(M,E){if(typeof M!="string"||M.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,M)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=W(M),Q=B.length>0?B[0]:"",T=J("%"+Q+"%",E),ce=T.name,pe=T.value,he=!1,be=T.alias;be&&(Q=be[0],D(B,A([0,1],be)));for(var Ee=1,_e=!0;Ee<B.length;Ee+=1){var ye=B[Ee],le=U(ye,0,1),te=U(ye,-1);if((le==='"'||le==="'"||le==="`"||te==='"'||te==="'"||te==="`")&&le!==te)throw new s("property names with quotes must have matching quotes");if((ye==="constructor"||!_e)&&(he=!0),Q+="."+ye,ce="%"+Q+"%",N(x,ce))pe=x[ce];else if(pe!=null){if(!(ye in pe)){if(!E)throw new c("base intrinsic for "+M+" exists, but the property is not available.");return}if(p&&Ee+1>=B.length){var ve=p(pe,ye);_e=!!ve,_e&&"get"in ve&&!("originalValue"in ve.get)?pe=ve.get:pe=pe[ye]}else _e=N(pe,ye),pe=pe[ye];_e&&!he&&(x[ce]=pe)}}return pe}}),qm=Nt((e,t)=>{var r=Ua(),n=r("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}t.exports=n}),K_=Nt((e,t)=>{var r=Ua(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}),WL=Nt((e,t)=>{var r=qm(),n=W_(),o=Rd(),i=K_();t.exports=function(a,s,c){if(!a||typeof a!="object"&&typeof a!="function")throw new o("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new o("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,f=!!i&&i(a,s);if(r)r(a,s,{configurable:d===null&&f?f.configurable:!d,enumerable:l===null&&f?f.enumerable:!l,value:c,writable:u===null&&f?f.writable:!u});else if(p||!l&&!u&&!d)a[s]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),KL=Nt((e,t)=>{var r=qm(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},t.exports=n}),GL=Nt((e,t)=>{var r=Ua(),n=WL(),o=KL()(),i=K_(),a=Rd(),s=r("%Math.floor%");t.exports=function(c,l){if(typeof c!="function")throw new a("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new a("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],d=!0,p=!0;if("length"in c&&i){var f=i(c,"length");f&&!f.configurable&&(d=!1),f&&!f.writable&&(p=!1)}return(d||p||!u)&&(o?n(c,"length",l,!0,!0):n(c,"length",l)),c}}),JL=Nt((e,t)=>{var r=Lm(),n=Ua(),o=GL(),i=Rd(),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),c=n("%Reflect.apply%",!0)||r.call(s,a),l=qm(),u=n("%Math.max%");t.exports=function(p){if(typeof p!="function")throw new i("a function is required");var f=c(r,s,arguments);return o(f,1+u(0,p.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}),YL=Nt((e,t)=>{var r=Ua(),n=JL(),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}}),XL=Nt(()=>{}),QL=Nt((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,$=String.prototype.toLowerCase,R=RegExp.prototype.test,N=Array.prototype.concat,A=Array.prototype.join,D=Array.prototype.slice,H=Math.floor,U=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Z=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,q=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===q||"symbol")?Symbol.toStringTag:null,J=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(z){return z.__proto__}:null);function E(z,G){if(z===1/0||z===-1/0||z!==z||z&&z>-1e3&&z<1e3||R.call(/e/,G))return G;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof z=="number"){var Ke=z<0?-H(-z):H(z);if(Ke!==z){var gt=String(Ke),Ge=x.call(G,gt.length+1);return w.call(gt,ze,"$&_")+"."+w.call(w.call(Ge,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(G,ze,"$&_")}var B=XL(),Q=B.custom,T=ve(Q)?Q:null;t.exports=function z(G,ze,Ke,gt){var Ge=ze||{};if(F(Ge,"quoteStyle")&&Ge.quoteStyle!=="single"&&Ge.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(F(Ge,"maxStringLength")&&(typeof Ge.maxStringLength=="number"?Ge.maxStringLength<0&&Ge.maxStringLength!==1/0:Ge.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var sr=F(Ge,"customInspect")?Ge.customInspect:!0;if(typeof sr!="boolean"&&sr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(F(Ge,"indent")&&Ge.indent!==null&&Ge.indent!==" "&&!(parseInt(Ge.indent,10)===Ge.indent&&Ge.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(F(Ge,"numericSeparator")&&typeof Ge.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var $r=Ge.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return ae(G,Ge);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var Yt=String(G);return $r?E(G,Yt):Yt}if(typeof G=="bigint"){var cr=String(G)+"n";return $r?E(G,cr):cr}var ln=typeof Ge.depth>"u"?5:Ge.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=ln&&ln>0&&typeof G=="object")return he(G)?"[Array]":"[Object]";var vt=ht(Ge,Ke);if(typeof gt>"u")gt=[];else if(fe(gt,G)>=0)return"[Circular]";function bt(rt,ur,zt){if(ur&&(gt=D.call(gt),gt.push(ur)),zt){var Xt={depth:Ge.depth};return F(Ge,"quoteStyle")&&(Xt.quoteStyle=Ge.quoteStyle),z(rt,Xt,Ke+1,gt)}return z(rt,Ge,Ke+1,gt)}if(typeof G=="function"&&!Ee(G)){var er=we(G),tr=Vt(G,bt);return"[Function"+(er?": "+er:" (anonymous)")+"]"+(tr.length>0?" { "+A.call(tr,", ")+" }":"")}if(ve(G)){var lr=q?w.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(G);return typeof G=="object"&&!q?me(lr):lr}if(K(G)){for(var Kt="<"+$.call(String(G.nodeName)),Or=G.attributes||[],vr=0;vr<Or.length;vr++)Kt+=" "+Or[vr].name+"="+ce(pe(Or[vr].value),"double",Ge);return Kt+=">",G.childNodes&&G.childNodes.length&&(Kt+="..."),Kt+="</"+$.call(String(G.nodeName))+">",Kt}if(he(G)){if(G.length===0)return"[]";var vn=Vt(G,bt);return vt&&!Ze(vn)?"["+Tt(vn,vt)+"]":"[ "+A.call(vn,", ")+" ]"}if(_e(G)){var Li=Vt(G,bt);return!("cause"in Error.prototype)&&"cause"in G&&!J.call(G,"cause")?"{ ["+String(G)+"] "+A.call(N.call("[cause]: "+bt(G.cause),Li),", ")+" }":Li.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+A.call(Li,", ")+" }"}if(typeof G=="object"&&sr){if(T&&typeof G[T]=="function"&&B)return B(G,{depth:ln-Ke});if(sr!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(De(G)){var Xs=[];return i&&i.call(G,function(rt,ur){Xs.push(bt(ur,G,!0)+" => "+bt(rt,G))}),tt("Map",o.call(G),Xs,vt)}if(ut(G)){var j=[];return l&&l.call(G,function(rt){j.push(bt(rt,G))}),tt("Set",c.call(G),j,vt)}if(Ie(G))return Oe("WeakMap");if(We(G))return Oe("WeakSet");if(je(G))return Oe("WeakRef");if(le(G))return me(bt(Number(G)));if(Ce(G))return me(bt(U.call(G)));if(te(G))return me(m.call(G));if(ye(G))return me(bt(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof global<"u"&&G===global)return"{ [object globalThis] }";if(!be(G)&&!Ee(G)){var ge=Vt(G,bt),Ae=M?M(G)===Object.prototype:G instanceof Object||G.constructor===Object,Ye=G instanceof Object?"":"null prototype",$t=!Ae&&W&&Object(G)===G&&W in G?x.call(ue(G),8,-1):Ye?"Object":"",Ft=Ae||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",it=Ft+($t||Ye?"["+A.call(N.call([],$t||[],Ye||[]),": ")+"] ":"");return ge.length===0?it+"{}":vt?it+"{"+Tt(ge,vt)+"}":it+"{ "+A.call(ge,", ")+" }"}return String(G)};function ce(z,G,ze){var Ke=(ze.quoteStyle||G)==="double"?'"':"'";return Ke+z+Ke}function pe(z){return w.call(String(z),/"/g,""")}function he(z){return ue(z)==="[object Array]"&&(!W||!(typeof z=="object"&&W in z))}function be(z){return ue(z)==="[object Date]"&&(!W||!(typeof z=="object"&&W in z))}function Ee(z){return ue(z)==="[object RegExp]"&&(!W||!(typeof z=="object"&&W in z))}function _e(z){return ue(z)==="[object Error]"&&(!W||!(typeof z=="object"&&W in z))}function ye(z){return ue(z)==="[object String]"&&(!W||!(typeof z=="object"&&W in z))}function le(z){return ue(z)==="[object Number]"&&(!W||!(typeof z=="object"&&W in z))}function te(z){return ue(z)==="[object Boolean]"&&(!W||!(typeof z=="object"&&W in z))}function ve(z){if(q)return z&&typeof z=="object"&&z instanceof Symbol;if(typeof z=="symbol")return!0;if(!z||typeof z!="object"||!L)return!1;try{return L.call(z),!0}catch{}return!1}function Ce(z){if(!z||typeof z!="object"||!U)return!1;try{return U.call(z),!0}catch{}return!1}var Ue=Object.prototype.hasOwnProperty||function(z){return z in this};function F(z,G){return Ue.call(z,G)}function ue(z){return g.call(z)}function we(z){if(z.name)return z.name;var G=b.call(v.call(z),/^function\s*([\w$]+)/);return G?G[1]:null}function fe(z,G){if(z.indexOf)return z.indexOf(G);for(var ze=0,Ke=z.length;ze<Ke;ze++)if(z[ze]===G)return ze;return-1}function De(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 je(z){if(!y||!z||typeof z!="object")return!1;try{return y.call(z),!0}catch{}return!1}function ut(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 We(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 K(z){return!z||typeof z!="object"?!1:typeof HTMLElement<"u"&&z instanceof HTMLElement?!0:typeof z.nodeName=="string"&&typeof z.getAttribute=="function"}function ae(z,G){if(z.length>G.maxStringLength){var ze=z.length-G.maxStringLength,Ke="... "+ze+" more character"+(ze>1?"s":"");return ae(x.call(z,0,G.maxStringLength),G)+Ke}var gt=w.call(w.call(z,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X);return ce(gt,"single",G)}function X(z){var G=z.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return ze?"\\"+ze:"\\x"+(G<16?"0":"")+S.call(G.toString(16))}function me(z){return"Object("+z+")"}function Oe(z){return z+" { ? }"}function tt(z,G,ze,Ke){var gt=Ke?Tt(ze,Ke):A.call(ze,", ");return z+" ("+G+") {"+gt+"}"}function Ze(z){for(var G=0;G<z.length;G++)if(fe(z[G],`
|
|
74
|
+
`+i):n.stack=i}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=Wi(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Mm.assertOptions(n,{silentJSONParsing:ai.transitional(ai.boolean),forcedJSONParsing:ai.transitional(ai.boolean),clarifyTimeoutError:ai.transitional(ai.boolean)},!1),o!=null&&(oe.isFunction(o)?r.paramsSerializer={serialize:o}:Mm.assertOptions(o,{encode:ai.function,serialize:ai.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=Zn.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=[U_.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=U_.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=Wi(this.defaults,t);const r=P_(t.baseURL,t.url);return T_(r,t.params,t.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(t){Cd.prototype[t]=function(r,n){return this.request(Wi(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(Wi(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Cd.prototype[t]=r(),Cd.prototype[t+"Form"]=r(!0)});const Ad=Cd,eL=class AD{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 La(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 AD(function(o){t=o}),cancel:t}}};function tL(e){return function(r){return e.apply(null,r)}}function rL(e){return oe.isObject(e)&&e.isAxiosError===!0}const jm={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(jm).forEach(([e,t])=>{jm[t]=e});const nL=jm;function V_(e){const t=new Ad(e),r=u_(Ad.prototype.request,t);return oe.extend(r,Ad.prototype,t,{allOwnKeys:!0}),oe.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return V_(Wi(e,o))},r}const pr=V_($m);pr.Axios=Ad,pr.CanceledError=La,pr.CancelToken=eL,pr.isCancel=I_,pr.VERSION=z_,pr.toFormData=_d,pr.AxiosError=dt,pr.Cancel=pr.CanceledError,pr.all=function(t){return Promise.all(t)},pr.spread=tL,pr.isAxiosError=rL,pr.mergeConfig=Wi,pr.AxiosHeaders=Zn,pr.formToJSON=e=>C_(oe.isHTMLForm(e)?new FormData(e):e),pr.getAdapter=B_.getAdapter,pr.HttpStatusCode=nL,pr.default=pr;const qa=pr,{Axios:oL,AxiosError:iL,CanceledError:aL,isCancel:sL,CancelToken:cL,VERSION:lL,all:uL,Cancel:dL,isAxiosError:fL,spread:pL,toFormData:hL,AxiosHeaders:mL,HttpStatusCode:yL,formToJSON:gL,getAdapter:vL,mergeConfig:bL}=qa,wL=Object.freeze(Object.defineProperty({__proto__:null,Axios:oL,AxiosError:iL,AxiosHeaders:mL,Cancel:dL,CancelToken:cL,CanceledError:aL,HttpStatusCode:yL,VERSION:lL,all:uL,default:qa,formToJSON:gL,getAdapter:vL,isAxiosError:fL,isCancel:sL,mergeConfig:bL,spread:pL,toFormData:hL},Symbol.toStringTag,{value:"Module"}));var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});var xL=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},SL=typeof window<"u"&&typeof window.document<"u",_L=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,EL=(typeof self>"u"?"undefined":xL(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")),TL=typeof Deno<"u"&&typeof Deno.version<"u"&&typeof Deno.version.deno<"u",H_=Ba.isBrowser=SL;Ba.isWebWorker=EL;var Dm=Ba.isNode=_L;Ba.isJsDom=kL,Ba.isDeno=TL;var $L=Object.create,Fm=Object.defineProperty,OL=Object.getOwnPropertyDescriptor,CL=Object.getOwnPropertyNames,AL=Object.getPrototypeOf,IL=Object.prototype.hasOwnProperty,Nt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),RL=(e,t)=>{for(var r in t)Fm(e,r,{get:t[r],enumerable:!0})},PL=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of CL(t))!IL.call(e,o)&&o!==r&&Fm(e,o,{get:()=>t[o],enumerable:!(n=OL(t,o))||n.enumerable});return e},Id=(e,t,r)=>(r=e!=null?$L(AL(e)):{},PL(t||!e||!e.__esModule?Fm(r,"default",{value:e,enumerable:!0}):r,e)),NL=Nt((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)}),ML=Nt(()=>{}),jL=Nt(()=>{}),DL=Nt((e,t)=>{t.exports=Error}),FL=Nt((e,t)=>{t.exports=EvalError}),LL=Nt((e,t)=>{t.exports=RangeError}),qL=Nt((e,t)=>{t.exports=ReferenceError}),W_=Nt((e,t)=>{t.exports=SyntaxError}),Rd=Nt((e,t)=>{t.exports=TypeError}),BL=Nt((e,t)=>{t.exports=URIError}),UL=Nt((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}}),zL=Nt((e,t)=>{var r=typeof Symbol<"u"&&Symbol,n=UL();t.exports=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:n()}}),ZL=Nt((e,t)=>{var r={__proto__:null,foo:{}},n=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!(r instanceof n)}}),VL=Nt((e,t)=>{var r="Function.prototype.bind called on incompatible ",n=Object.prototype.toString,o=Math.max,i="[object Function]",a=function(l,u){for(var d=[],p=0;p<l.length;p+=1)d[p]=l[p];for(var f=0;f<u.length;f+=1)d[f+l.length]=u[f];return d},s=function(l,u){for(var d=[],p=u||0,f=0;p<l.length;p+=1,f+=1)d[f]=l[p];return d},c=function(l,u){for(var d="",p=0;p<l.length;p+=1)d+=l[p],p+1<l.length&&(d+=u);return d};t.exports=function(l){var u=this;if(typeof u!="function"||n.apply(u)!==i)throw new TypeError(r+u);for(var d=s(arguments,1),p,f=function(){if(this instanceof p){var v=u.apply(this,a(d,arguments));return Object(v)===v?v:this}return u.apply(l,a(d,arguments))},h=o(0,u.length-d.length),y=[],m=0;m<h;m++)y[m]="$"+m;if(p=Function("binder","return function ("+c(y,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var g=function(){};g.prototype=u.prototype,p.prototype=new g,g.prototype=null}return p}}),Lm=Nt((e,t)=>{var r=VL();t.exports=Function.prototype.bind||r}),HL=Nt((e,t)=>{var r=Function.prototype.call,n=Object.prototype.hasOwnProperty,o=Lm();t.exports=o.call(r,n)}),Ua=Nt((e,t)=>{var r,n=DL(),o=FL(),i=LL(),a=qL(),s=W_(),c=Rd(),l=BL(),u=Function,d=function(M){try{return u('"use strict"; return ('+M+").constructor;")()}catch{}},p=Object.getOwnPropertyDescriptor;if(p)try{p({},"")}catch{p=null}var f=function(){throw new c},h=p?function(){try{return arguments.callee,f}catch{try{return p(arguments,"callee").get}catch{return f}}}():f,y=zL()(),m=ZL()(),g=Object.getPrototypeOf||(m?function(M){return M.__proto__}:null),v={},b=typeof Uint8Array>"u"||!g?r:g(Uint8Array),x={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":y&&g?g([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":v,"%AsyncGenerator%":v,"%AsyncGeneratorFunction%":v,"%AsyncIteratorPrototype%":v,"%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%":n,"%eval%":eval,"%EvalError%":o,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":u,"%GeneratorFunction%":v,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&g?g(g([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!y||!g?r:g(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%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!y||!g?r:g(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&g?g(""[Symbol.iterator]()):r,"%Symbol%":y?Symbol:r,"%SyntaxError%":s,"%ThrowTypeError%":h,"%TypedArray%":b,"%TypeError%":c,"%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%":l,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet};if(g)try{null.error}catch(M){w=g(g(M)),x["%Error.prototype%"]=w}var w,S=function M(E){var B;if(E==="%AsyncFunction%")B=d("async function () {}");else if(E==="%GeneratorFunction%")B=d("function* () {}");else if(E==="%AsyncGeneratorFunction%")B=d("async function* () {}");else if(E==="%AsyncGenerator%"){var Q=M("%AsyncGeneratorFunction%");Q&&(B=Q.prototype)}else if(E==="%AsyncIteratorPrototype%"){var T=M("%AsyncGenerator%");T&&g&&(B=g(T.prototype))}return x[E]=B,B},$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=Lm(),N=HL(),A=R.call(Function.call,Array.prototype.concat),D=R.call(Function.apply,Array.prototype.splice),H=R.call(Function.call,String.prototype.replace),U=R.call(Function.call,String.prototype.slice),Z=R.call(Function.call,RegExp.prototype.exec),L=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,W=function(M){var E=U(M,0,1),B=U(M,-1);if(E==="%"&&B!=="%")throw new s("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&E!=="%")throw new s("invalid intrinsic syntax, expected opening `%`");var Q=[];return H(M,L,function(T,ce,pe,he){Q[Q.length]=pe?H(he,q,"$1"):ce||T}),Q},J=function(M,E){var B=M,Q;if(N($,B)&&(Q=$[B],B="%"+Q[0]+"%"),N(x,B)){var T=x[B];if(T===v&&(T=S(B)),typeof T>"u"&&!E)throw new c("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:Q,name:B,value:T}}throw new s("intrinsic "+M+" does not exist!")};t.exports=function(M,E){if(typeof M!="string"||M.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof E!="boolean")throw new c('"allowMissing" argument must be a boolean');if(Z(/^%?[^%]*%?$/,M)===null)throw new s("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=W(M),Q=B.length>0?B[0]:"",T=J("%"+Q+"%",E),ce=T.name,pe=T.value,he=!1,be=T.alias;be&&(Q=be[0],D(B,A([0,1],be)));for(var Ee=1,_e=!0;Ee<B.length;Ee+=1){var ye=B[Ee],le=U(ye,0,1),te=U(ye,-1);if((le==='"'||le==="'"||le==="`"||te==='"'||te==="'"||te==="`")&&le!==te)throw new s("property names with quotes must have matching quotes");if((ye==="constructor"||!_e)&&(he=!0),Q+="."+ye,ce="%"+Q+"%",N(x,ce))pe=x[ce];else if(pe!=null){if(!(ye in pe)){if(!E)throw new c("base intrinsic for "+M+" exists, but the property is not available.");return}if(p&&Ee+1>=B.length){var ve=p(pe,ye);_e=!!ve,_e&&"get"in ve&&!("originalValue"in ve.get)?pe=ve.get:pe=pe[ye]}else _e=N(pe,ye),pe=pe[ye];_e&&!he&&(x[ce]=pe)}}return pe}}),qm=Nt((e,t)=>{var r=Ua(),n=r("%Object.defineProperty%",!0)||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}t.exports=n}),K_=Nt((e,t)=>{var r=Ua(),n=r("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch{n=null}t.exports=n}),WL=Nt((e,t)=>{var r=qm(),n=W_(),o=Rd(),i=K_();t.exports=function(a,s,c){if(!a||typeof a!="object"&&typeof a!="function")throw new o("`obj` must be an object or a function`");if(typeof s!="string"&&typeof s!="symbol")throw new o("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new o("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new o("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new o("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new o("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,d=arguments.length>5?arguments[5]:null,p=arguments.length>6?arguments[6]:!1,f=!!i&&i(a,s);if(r)r(a,s,{configurable:d===null&&f?f.configurable:!d,enumerable:l===null&&f?f.enumerable:!l,value:c,writable:u===null&&f?f.writable:!u});else if(p||!l&&!u&&!d)a[s]=c;else throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}),KL=Nt((e,t)=>{var r=qm(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},t.exports=n}),GL=Nt((e,t)=>{var r=Ua(),n=WL(),o=KL()(),i=K_(),a=Rd(),s=r("%Math.floor%");t.exports=function(c,l){if(typeof c!="function")throw new a("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||s(l)!==l)throw new a("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],d=!0,p=!0;if("length"in c&&i){var f=i(c,"length");f&&!f.configurable&&(d=!1),f&&!f.writable&&(p=!1)}return(d||p||!u)&&(o?n(c,"length",l,!0,!0):n(c,"length",l)),c}}),JL=Nt((e,t)=>{var r=Lm(),n=Ua(),o=GL(),i=Rd(),a=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),c=n("%Reflect.apply%",!0)||r.call(s,a),l=qm(),u=n("%Math.max%");t.exports=function(p){if(typeof p!="function")throw new i("a function is required");var f=c(r,s,arguments);return o(f,1+u(0,p.length-(arguments.length-1)),!0)};var d=function(){return c(r,a,arguments)};l?l(t.exports,"apply",{value:d}):t.exports.apply=d}),YL=Nt((e,t)=>{var r=Ua(),n=JL(),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}}),XL=Nt(()=>{}),QL=Nt((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,$=String.prototype.toLowerCase,R=RegExp.prototype.test,N=Array.prototype.concat,A=Array.prototype.join,D=Array.prototype.slice,H=Math.floor,U=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Z=Object.getOwnPropertySymbols,L=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,q=typeof Symbol=="function"&&typeof Symbol.iterator=="object",W=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===q||"symbol")?Symbol.toStringTag:null,J=Object.prototype.propertyIsEnumerable,M=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(z){return z.__proto__}:null);function E(z,G){if(z===1/0||z===-1/0||z!==z||z&&z>-1e3&&z<1e3||R.call(/e/,G))return G;var ze=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof z=="number"){var Ke=z<0?-H(-z):H(z);if(Ke!==z){var gt=String(Ke),Ge=x.call(G,gt.length+1);return w.call(gt,ze,"$&_")+"."+w.call(w.call(Ge,/([0-9]{3})/g,"$&_"),/_$/,"")}}return w.call(G,ze,"$&_")}var B=XL(),Q=B.custom,T=ve(Q)?Q:null;t.exports=function z(G,ze,Ke,gt){var Ge=ze||{};if(F(Ge,"quoteStyle")&&Ge.quoteStyle!=="single"&&Ge.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(F(Ge,"maxStringLength")&&(typeof Ge.maxStringLength=="number"?Ge.maxStringLength<0&&Ge.maxStringLength!==1/0:Ge.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var sr=F(Ge,"customInspect")?Ge.customInspect:!0;if(typeof sr!="boolean"&&sr!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(F(Ge,"indent")&&Ge.indent!==null&&Ge.indent!==" "&&!(parseInt(Ge.indent,10)===Ge.indent&&Ge.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(F(Ge,"numericSeparator")&&typeof Ge.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var $r=Ge.numericSeparator;if(typeof G>"u")return"undefined";if(G===null)return"null";if(typeof G=="boolean")return G?"true":"false";if(typeof G=="string")return ae(G,Ge);if(typeof G=="number"){if(G===0)return 1/0/G>0?"0":"-0";var Yt=String(G);return $r?E(G,Yt):Yt}if(typeof G=="bigint"){var cr=String(G)+"n";return $r?E(G,cr):cr}var ln=typeof Ge.depth>"u"?5:Ge.depth;if(typeof Ke>"u"&&(Ke=0),Ke>=ln&&ln>0&&typeof G=="object")return he(G)?"[Array]":"[Object]";var vt=ht(Ge,Ke);if(typeof gt>"u")gt=[];else if(fe(gt,G)>=0)return"[Circular]";function bt(nt,ur,zt){if(ur&&(gt=D.call(gt),gt.push(ur)),zt){var Xt={depth:Ge.depth};return F(Ge,"quoteStyle")&&(Xt.quoteStyle=Ge.quoteStyle),z(nt,Xt,Ke+1,gt)}return z(nt,Ge,Ke+1,gt)}if(typeof G=="function"&&!Ee(G)){var er=we(G),tr=Vt(G,bt);return"[Function"+(er?": "+er:" (anonymous)")+"]"+(tr.length>0?" { "+A.call(tr,", ")+" }":"")}if(ve(G)){var lr=q?w.call(String(G),/^(Symbol\(.*\))_[^)]*$/,"$1"):L.call(G);return typeof G=="object"&&!q?me(lr):lr}if(K(G)){for(var Gt="<"+$.call(String(G.nodeName)),Or=G.attributes||[],vr=0;vr<Or.length;vr++)Gt+=" "+Or[vr].name+"="+ce(pe(Or[vr].value),"double",Ge);return Gt+=">",G.childNodes&&G.childNodes.length&&(Gt+="..."),Gt+="</"+$.call(String(G.nodeName))+">",Gt}if(he(G)){if(G.length===0)return"[]";var vn=Vt(G,bt);return vt&&!Ze(vn)?"["+Tt(vn,vt)+"]":"[ "+A.call(vn,", ")+" ]"}if(_e(G)){var Li=Vt(G,bt);return!("cause"in Error.prototype)&&"cause"in G&&!J.call(G,"cause")?"{ ["+String(G)+"] "+A.call(N.call("[cause]: "+bt(G.cause),Li),", ")+" }":Li.length===0?"["+String(G)+"]":"{ ["+String(G)+"] "+A.call(Li,", ")+" }"}if(typeof G=="object"&&sr){if(T&&typeof G[T]=="function"&&B)return B(G,{depth:ln-Ke});if(sr!=="symbol"&&typeof G.inspect=="function")return G.inspect()}if(De(G)){var Xs=[];return i&&i.call(G,function(nt,ur){Xs.push(bt(ur,G,!0)+" => "+bt(nt,G))}),tt("Map",o.call(G),Xs,vt)}if(ut(G)){var j=[];return l&&l.call(G,function(nt){j.push(bt(nt,G))}),tt("Set",c.call(G),j,vt)}if(Ie(G))return Oe("WeakMap");if(We(G))return Oe("WeakSet");if(je(G))return Oe("WeakRef");if(le(G))return me(bt(Number(G)));if(Ce(G))return me(bt(U.call(G)));if(te(G))return me(m.call(G));if(ye(G))return me(bt(String(G)));if(typeof window<"u"&&G===window)return"{ [object Window] }";if(typeof globalThis<"u"&&G===globalThis||typeof global<"u"&&G===global)return"{ [object globalThis] }";if(!be(G)&&!Ee(G)){var ge=Vt(G,bt),Ae=M?M(G)===Object.prototype:G instanceof Object||G.constructor===Object,Ye=G instanceof Object?"":"null prototype",$t=!Ae&&W&&Object(G)===G&&W in G?x.call(ue(G),8,-1):Ye?"Object":"",Ft=Ae||typeof G.constructor!="function"?"":G.constructor.name?G.constructor.name+" ":"",it=Ft+($t||Ye?"["+A.call(N.call([],$t||[],Ye||[]),": ")+"] ":"");return ge.length===0?it+"{}":vt?it+"{"+Tt(ge,vt)+"}":it+"{ "+A.call(ge,", ")+" }"}return String(G)};function ce(z,G,ze){var Ke=(ze.quoteStyle||G)==="double"?'"':"'";return Ke+z+Ke}function pe(z){return w.call(String(z),/"/g,""")}function he(z){return ue(z)==="[object Array]"&&(!W||!(typeof z=="object"&&W in z))}function be(z){return ue(z)==="[object Date]"&&(!W||!(typeof z=="object"&&W in z))}function Ee(z){return ue(z)==="[object RegExp]"&&(!W||!(typeof z=="object"&&W in z))}function _e(z){return ue(z)==="[object Error]"&&(!W||!(typeof z=="object"&&W in z))}function ye(z){return ue(z)==="[object String]"&&(!W||!(typeof z=="object"&&W in z))}function le(z){return ue(z)==="[object Number]"&&(!W||!(typeof z=="object"&&W in z))}function te(z){return ue(z)==="[object Boolean]"&&(!W||!(typeof z=="object"&&W in z))}function ve(z){if(q)return z&&typeof z=="object"&&z instanceof Symbol;if(typeof z=="symbol")return!0;if(!z||typeof z!="object"||!L)return!1;try{return L.call(z),!0}catch{}return!1}function Ce(z){if(!z||typeof z!="object"||!U)return!1;try{return U.call(z),!0}catch{}return!1}var Ue=Object.prototype.hasOwnProperty||function(z){return z in this};function F(z,G){return Ue.call(z,G)}function ue(z){return g.call(z)}function we(z){if(z.name)return z.name;var G=b.call(v.call(z),/^function\s*([\w$]+)/);return G?G[1]:null}function fe(z,G){if(z.indexOf)return z.indexOf(G);for(var ze=0,Ke=z.length;ze<Ke;ze++)if(z[ze]===G)return ze;return-1}function De(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 je(z){if(!y||!z||typeof z!="object")return!1;try{return y.call(z),!0}catch{}return!1}function ut(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 We(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 K(z){return!z||typeof z!="object"?!1:typeof HTMLElement<"u"&&z instanceof HTMLElement?!0:typeof z.nodeName=="string"&&typeof z.getAttribute=="function"}function ae(z,G){if(z.length>G.maxStringLength){var ze=z.length-G.maxStringLength,Ke="... "+ze+" more character"+(ze>1?"s":"");return ae(x.call(z,0,G.maxStringLength),G)+Ke}var gt=w.call(w.call(z,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,X);return ce(gt,"single",G)}function X(z){var G=z.charCodeAt(0),ze={8:"b",9:"t",10:"n",12:"f",13:"r"}[G];return ze?"\\"+ze:"\\x"+(G<16?"0":"")+S.call(G.toString(16))}function me(z){return"Object("+z+")"}function Oe(z){return z+" { ? }"}function tt(z,G,ze,Ke){var gt=Ke?Tt(ze,Ke):A.call(ze,", ");return z+" ("+G+") {"+gt+"}"}function Ze(z){for(var G=0;G<z.length;G++)if(fe(z[G],`
|
|
75
75
|
`)>=0)return!1;return!0}function ht(z,G){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(G+1),ze)}}function Tt(z,G){if(z.length===0)return"";var ze=`
|
|
76
76
|
`+G.prev+G.base;return ze+A.call(z,","+ze)+`
|
|
77
|
-
`+G.prev}function Vt(z,G){var ze=he(z),Ke=[];if(ze){Ke.length=z.length;for(var gt=0;gt<z.length;gt++)Ke[gt]=F(z,gt)?G(z[gt],z):""}var Ge=typeof Z=="function"?Z(z):[],sr;if(q){sr={};for(var $r=0;$r<Ge.length;$r++)sr["$"+Ge[$r]]=Ge[$r]}for(var Yt in z)F(z,Yt)&&(ze&&String(Number(Yt))===Yt&&Yt<z.length||q&&sr["$"+Yt]instanceof Symbol||(R.call(/[^\w$]/,Yt)?Ke.push(G(Yt,z)+": "+G(z[Yt],z)):Ke.push(Yt+": "+G(z[Yt],z))));if(typeof Z=="function")for(var cr=0;cr<Ge.length;cr++)J.call(z,Ge[cr])&&Ke.push("["+G(Ge[cr])+"]: "+G(z[Ge[cr]],z));return Ke}}),eq=Nt((e,t)=>{var r=Ua(),n=YL(),o=QL(),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,$){a&&S&&(typeof S=="object"||typeof S=="function")?(v||(v=new a),l(v,S,$)):s?(b||(b=new s),p(b,S,$)):(x||(x={key:{},next:null}),m(x,S,$))}};return w}}),Bm=Nt((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}}),G_=Nt((e,t)=>{var r=Bm(),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,$){if(n.call(v,$)){var R=v[$];R&&typeof R=="object"&&S&&typeof S=="object"?v[$]=g(R,S,x):v.push(S)}else v[$]=S}),v):Object.keys(b).reduce(function(S,$){var R=b[$];return n.call(S,$)?S[$]=g(S[$],R,x):S[$]=R,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 $="",R=0;R<S.length;++R){var N=S.charCodeAt(R);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===r.RFC1738&&(N===40||N===41)){$+=S.charAt(R);continue}if(N<128){$=$+i[N];continue}if(N<2048){$=$+(i[192|N>>6]+i[128|N&63]);continue}if(N<55296||N>=57344){$=$+(i[224|N>>12]+i[128|N>>6&63]+i[128|N&63]);continue}R+=1,N=65536+((N&1023)<<10|S.charCodeAt(R)&1023),$+=i[240|N>>18]+i[128|N>>12&63]+i[128|N>>6&63]+i[128|N&63]}return $},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],$=Object.keys(S),R=0;R<$.length;++R){var N=$[R],A=S[N];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:S,prop:N}),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}}),tq=Nt((e,t)=>{var r=eq(),n=G_(),o=Bm(),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,$,R,N,A,D,H,U,Z,L,q,W,J){for(var M=b,E=J,B=0,Q=!1;(E=E.get(y))!==void 0&&!Q;){var T=E.get(b);if(B+=1,typeof T<"u"){if(T===B)throw new RangeError("Cyclic object value");Q=!0}typeof E.get(y)>"u"&&(B=0)}if(typeof A=="function"?M=A(x,M):M instanceof Date?M=U(M):w==="comma"&&s(M)&&(M=n.maybeMap(M,function(ue){return ue instanceof Date?U(ue):ue})),M===null){if($)return N&&!q?N(x,f.encoder,W,"key",Z):x;M=""}if(h(M)||n.isBuffer(M)){if(N){var ce=q?x:N(x,f.encoder,W,"key",Z);if(w==="comma"&&q){for(var pe=c.call(String(M),","),he="",be=0;be<pe.length;++be)he+=(be===0?"":",")+L(N(pe[be],f.encoder,W,"value",Z));return[L(ce)+(S&&s(M)&&pe.length===1?"[]":"")+"="+he]}return[L(ce)+"="+L(N(M,f.encoder,W,"value",Z))]}return[L(x)+"="+L(String(M))]}var Ee=[];if(typeof M>"u")return Ee;var _e;if(w==="comma"&&s(M))_e=[{value:M.length>0?M.join(",")||null:void 0}];else if(s(A))_e=A;else{var ye=Object.keys(M);_e=D?ye.sort(D):ye}for(var le=S&&s(M)&&M.length===1?x+"[]":x,te=0;te<_e.length;++te){var ve=_e[te],Ce=typeof ve=="object"&&typeof ve.value<"u"?ve.value:M[ve];if(!(R&&Ce===null)){var Ue=s(M)?typeof w=="function"?w(le,ve):le:le+(H?"."+ve:"["+ve+"]");J.set(b,B);var F=r();F.set(y,J),u(Ee,v(Ce,Ue,w,S,$,R,N,A,D,H,U,Z,L,q,W,F))}}return Ee},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,$;typeof w.filter=="function"?($=w.filter,x=$("",x)):s(w.filter)&&($=w.filter,S=$);var R=[];if(typeof x!="object"||x===null)return"";var N;b&&b.arrayFormat in a?N=b.arrayFormat:b&&"indices"in b?N=b.indices?"indices":"repeat":N="indices";var A=a[N];if(b&&"commaRoundTrip"in b&&typeof b.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var D=A==="comma"&&b&&b.commaRoundTrip;S||(S=Object.keys(x)),w.sort&&S.sort(w.sort);for(var H=r(),U=0;U<S.length;++U){var Z=S[U];w.skipNulls&&x[Z]===null||u(R,m(x[Z],Z,A,D,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,H))}var L=R.join(w.delimiter),q=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?q+="utf8=%26%2310003%3B&":q+="utf8=%E2%9C%93&"),L.length>0?q+L:""}}),rq=Nt((e,t)=>{var r=G_(),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 $=b[w],R=$.indexOf("]="),N=R===-1?$.indexOf("="):R+1,A,D;N===-1?(A=y.decoder($,i.decoder,S,"key"),D=y.strictNullHandling?null:""):(A=y.decoder($.slice(0,N),i.decoder,S,"key"),D=r.maybeMap(s($.slice(N+1),y),function(H){return y.decoder(H,i.decoder,S,"value")})),D&&y.interpretNumericEntities&&S==="iso-8859-1"&&(D=a(D)),$.indexOf("[]=")>-1&&(D=o(D)?[D]:D),n.call(m,A)?m[A]=r.combine(m[A],D):m[A]=D}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,$=parseInt(S,10);!m.parseArrays&&S===""?x={0:v}:!isNaN($)&&w!==S&&String($)===S&&$>=0&&m.parseArrays&&$<=m.arrayLimit?(x=[],x[$]=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,$=[];if(S){if(!m.plainObjects&&n.call(Object.prototype,S)&&!m.allowPrototypes)return;$.push(S)}for(var R=0;m.depth>0&&(w=x.exec(v))!==null&&R<m.depth;){if(R+=1,!m.plainObjects&&n.call(Object.prototype,w[1].slice(1,-1))&&!m.allowPrototypes)return;$.push(w[1])}return w&&$.push("["+v.slice(w.index)+"]"),d($,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)}}),nq=Nt((e,t)=>{var r=tq(),n=rq(),o=Bm();t.exports={formats:o,parse:n,stringify:r}}),J_={};RL(J_,{DEFAULT_OPTIONS:()=>t1,default:()=>n1,exponentialDelay:()=>Q_,isIdempotentRequestError:()=>zm,isNetworkError:()=>Um,isNetworkOrIdempotentRequestError:()=>Zm,isRetryableError:()=>Nd,isSafeRequestError:()=>X_,linearDelay:()=>e1,namespace:()=>Pd,retryAfter:()=>Md});var oq=Id(NL(),1),Pd="axios-retry";function Um(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,oq.default)(e)}var Y_=["get","head","options"],iq=Y_.concat(["put","delete"]);function Nd(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function X_(e){var t;return(t=e.config)!=null&&t.method?Nd(e)&&Y_.indexOf(e.config.method)!==-1:!1}function zm(e){var t;return(t=e.config)!=null&&t.method?Nd(e)&&iq.indexOf(e.config.method)!==-1:!1}function Zm(e){return Um(e)||zm(e)}function Md(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 aq(e=0,t=void 0){return Math.max(0,Md(t))}function Q_(e=0,t=void 0,r=100){let n=2**e*r,o=Math.max(n,Md(t)),i=o*.2*Math.random();return o+i}function e1(e=100){return(t=0,r=void 0)=>{let n=t*e;return Math.max(n,Md(r))}}var t1={retries:3,retryCondition:Zm,retryDelay:aq,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function sq(e,t){return{...t1,...t,...e[Pd]}}function r1(e,t,r=!1){let n=sq(e,t||{});return n.retryCount=n.retryCount||0,(!n.lastRequestTime||r)&&(n.lastRequestTime=Date.now()),e[Pd]=n,n}function cq(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 lq(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 uq(e,t,r,n){var c;t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,r);if(cq(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 dq(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var si=(e,t)=>{let r=e.interceptors.request.use(o=>{var i;return r1(o,t,!0),(i=o[Pd])!=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=r1(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await lq(a,o)?uq(e,a,o,i):(await dq(a,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:n}};si.isNetworkError=Um,si.isSafeRequestError=X_,si.isIdempotentRequestError=zm,si.isNetworkOrIdempotentRequestError=Zm,si.exponentialDelay=Q_,si.linearDelay=e1,si.isRetryableError=Nd;var n1=si,fq={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Vm=typeof window<"u"&&typeof window.document<"u"?window.crypto:vm;Vm.getRandomValues||(Vm=fq);var Gt=class 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=Gt.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 r=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(Vm.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"}},pq=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,o1=e=>e instanceof Gt||pq(e)&&e.isApiError===!0,za=class extends Gt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},i1=class extends Gt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},a1=class extends Gt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},s1=class extends Gt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},c1=class extends Gt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},l1=class extends Gt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},u1=class extends Gt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},d1=class extends Gt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},f1=class extends Gt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},p1=class extends Gt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},h1=class extends Gt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},m1=class extends Gt{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 Gt{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)}},g1=class extends Gt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},v1=class extends Gt{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)}},b1=class extends Gt{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)}},w1=class extends Gt{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)}},x1=class extends Gt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},S1=class extends Gt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},_1=class extends Gt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},E1=class extends Gt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},k1=class extends Gt{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)}},T1=class extends Gt{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)}},$1=class extends Gt{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)}},hq={Unknown:za,Internal:i1,Unauthorized:a1,Forbidden:s1,PayloadTooLarge:c1,InvalidPayload:l1,UnsupportedMediaType:u1,MethodNotFound:d1,ResourceNotFound:f1,InvalidJsonSchema:p1,InvalidDataFormat:h1,InvalidIdentifier:m1,RelationConflict:y1,ReferenceConstraint:g1,ResourceLockedConflict:v1,ReferenceNotFound:b1,InvalidQuery:w1,Runtime:x1,AlreadyExists:S1,RateLimited:_1,PaymentRequired:E1,QuotaExceeded:k1,LimitExceeded:T1,BreakingChanges:$1},Hm=e=>o1(e)?e:e instanceof Error?new za(e.message,e):typeof e=="string"?new za(e):mq(e);function mq(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=hq[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new za(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new za("An invalid error occurred: "+JSON.stringify(e))}var Za=class extends Error{constructor(t,r,n){super(t),this.innerError=r,this.file=n,this.name="FileUploadError"}},yq=Id(ML()),gq=Id(jL()),vq="https://api.botpress.cloud",bq=6e4,wq="BP_API_URL",xq="BP_BOT_ID",Sq="BP_INTEGRATION_ID",_q="BP_WORKSPACE_ID",Eq="BP_TOKEN";function kq(e){let t=Tq(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??vq,o=t.timeout??bq;return{apiUrl:n,timeout:o,withCredentials:H_,headers:r}}function Tq(e){return H_?e:Dm?$q(e):e}function $q(e){let t={...e,apiUrl:e.apiUrl??process.env[wq],botId:e.botId??process.env[xq],integrationId:e.integrationId??process.env[Sq],workspaceId:e.workspaceId??process.env[_q]},r=t.token??process.env[Eq];return r&&(t.token=r),t}var Oq=Id(nq()),Cq=e=>e[1]!==void 0,re=e=>{let{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(Cq),s=Object.fromEntries(a),c=Oq.default.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},Aq=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Iq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Rq=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:{}}),Pq=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Nq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),Mq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Dq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Fq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Lq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),qq=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}}),Bq=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uq=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:{}}),zq=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}}),Zq=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}}),Vq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Hq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),Wq=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Kq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Gq=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Jq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Yq=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Xq=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Qq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),e3=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),t3=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/expiry`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{expiry:e.expiry}}),r3=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:{}}),n3=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}}),o3=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}}),i3=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}}),a3=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),s3=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),c3=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),l3=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}}),u3=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}}),d3=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),f3=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:{}}),p3=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),h3=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),m3=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),y3=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),g3=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),v3=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),b3=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),w3=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),x3=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),S3=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),_3=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),E3=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),k3=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}}),T3=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}}),$3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),O3=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),C3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),A3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),I3=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:{}}),R3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),P3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),N3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),M3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),j3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),D3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),F3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}}),L3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}}),q3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}}),B3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}}),U3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),z3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),Z3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),V3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),H3=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),W3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),K3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),G3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),J3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Y3=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),X3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Q3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),eB=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}}),tB=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),rB=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),nB=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),oB=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),iB=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),aB=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),sB=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),cB=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lB=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),uB=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),dB=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),fB=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),pB=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),hB=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,configurations:e.configurations,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,interfaces:e.interfaces,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}}),mB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,configurations:e.configurations,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}}),yB=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),gB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vB=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:{}}),bB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),wB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xB=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}}),SB=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),_B=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),EB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),kB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),TB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),$B=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),OB=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),CB=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),AB=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),IB=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),RB=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),PB=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),NB=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,publicContentImmediatelyAccessible:e.publicContentImmediatelyAccessible}}),MB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jB=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),DB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),FB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}}),LB=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,consolidate:e.consolidate,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}}),qB=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}}),BB=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),UB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),zB=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}}),ZB=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}}),VB=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),HB=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}}),WB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),KB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),GB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),JB=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}}),YB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),XB=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}}),QB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),eU=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}}),tU=class{constructor(t,r={}){k(this,"createConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Aq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Iq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listConversations",async t=>{let{path:r,headers:n,query:o,body:i}=Rq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Pq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Nq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Mq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listParticipants",async t=>{let{path:r,headers:n,query:o,body:i}=jq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"addParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Dq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Fq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"removeParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Lq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createEvent",async t=>{let{path:r,headers:n,query:o,body:i}=qq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getEvent",async t=>{let{path:r,headers:n,query:o,body:i}=Bq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listEvents",async t=>{let{path:r,headers:n,query:o,body:i}=Uq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createMessage",async t=>{let{path:r,headers:n,query:o,body:i}=zq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Zq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Vq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Hq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listMessages",async t=>{let{path:r,headers:n,query:o,body:i}=Wq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Kq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createUser",async t=>{let{path:r,headers:n,query:o,body:i}=Gq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUser",async t=>{let{path:r,headers:n,query:o,body:i}=Jq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listUsers",async t=>{let{path:r,headers:n,query:o,body:i}=Yq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateUser",async t=>{let{path:r,headers:n,query:o,body:i}=Xq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateUser",async t=>{let{path:r,headers:n,query:o,body:i}=Qq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteUser",async t=>{let{path:r,headers:n,query:o,body:i}=e3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setStateExpiry",async t=>{let{path:r,headers:n,query:o,body:i}=t3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getState",async t=>{let{path:r,headers:n,query:o,body:i}=r3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setState",async t=>{let{path:r,headers:n,query:o,body:i}=n3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrSetState",async t=>{let{path:r,headers:n,query:o,body:i}=o3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"patchState",async t=>{let{path:r,headers:n,query:o,body:i}=i3(t),a=(this.props.toAxiosRequest??re)({method:"patch",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"callAction",async t=>{let{path:r,headers:n,query:o,body:i}=a3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"configureIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=s3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTask",async t=>{let{path:r,headers:n,query:o,body:i}=c3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTask",async t=>{let{path:r,headers:n,query:o,body:i}=l3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTask",async t=>{let{path:r,headers:n,query:o,body:i}=u3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTask",async t=>{let{path:r,headers:n,query:o,body:i}=d3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listTasks",async t=>{let{path:r,headers:n,query:o,body:i}=f3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"trackAnalytics",async t=>{let{path:r,headers:n,query:o,body:i}=p3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"runVrl",async t=>{let{path:r,headers:n,query:o,body:i}=h3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAccount",async t=>{let{path:r,headers:n,query:o,body:i}=m3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateAccount",async t=>{let{path:r,headers:n,query:o,body:i}=y3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPersonalAccessTokens",async t=>{let{path:r,headers:n,query:o,body:i}=g3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createPersonalAccessToken",async t=>{let{path:r,headers:n,query:o,body:i}=v3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deletePersonalAccessToken",async t=>{let{path:r,headers:n,query:o,body:i}=b3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setAccountPreference",async t=>{let{path:r,headers:n,query:o,body:i}=w3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAccountPreference",async t=>{let{path:r,headers:n,query:o,body:i}=x3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPublicIntegrations",async t=>{let{path:r,headers:n,query:o,body:i}=S3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicIntegrationById",async t=>{let{path:r,headers:n,query:o,body:i}=_3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=E3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createBot",async t=>{let{path:r,headers:n,query:o,body:i}=k3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateBot",async t=>{let{path:r,headers:n,query:o,body:i}=T3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"transferBot",async t=>{let{path:r,headers:n,query:o,body:i}=$3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBots",async t=>{let{path:r,headers:n,query:o,body:i}=O3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBot",async t=>{let{path:r,headers:n,query:o,body:i}=C3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteBot",async t=>{let{path:r,headers:n,query:o,body:i}=A3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotLogs",async t=>{let{path:r,headers:n,query:o,body:i}=I3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotWebchat",async t=>{let{path:r,headers:n,query:o,body:i}=R3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotAnalytics",async t=>{let{path:r,headers:n,query:o,body:i}=P3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotIssue",async t=>{let{path:r,headers:n,query:o,body:i}=N3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotIssues",async t=>{let{path:r,headers:n,query:o,body:i}=M3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteBotIssue",async t=>{let{path:r,headers:n,query:o,body:i}=j3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotIssueEvents",async t=>{let{path:r,headers:n,query:o,body:i}=D3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotVersions",async t=>{let{path:r,headers:n,query:o,body:i}=F3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=L3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=q3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deployBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=B3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setWorkspacePaymentMethod",async t=>{let{path:r,headers:n,query:o,body:i}=U3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceInvoices",async t=>{let{path:r,headers:n,query:o,body:i}=z3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUpcomingInvoice",async t=>{let{path:r,headers:n,query:o,body:i}=Z3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:r,headers:n,query:o,body:i}=V3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=H3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=W3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=K3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceUsages",async t=>{let{path:r,headers:n,query:o,body:i}=G3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:r,headers:n,query:o,body:i}=J3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:r,headers:n,query:o,body:i}=Y3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspaceQuota",async t=>{let{path:r,headers:n,query:o,body:i}=X3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceQuotas",async t=>{let{path:r,headers:n,query:o,body:i}=Q3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=eB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"checkHandleAvailability",async t=>{let{path:r,headers:n,query:o,body:i}=tB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaces",async t=>{let{path:r,headers:n,query:o,body:i}=rB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPublicWorkspaces",async t=>{let{path:r,headers:n,query:o,body:i}=nB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=oB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAuditRecords",async t=>{let{path:r,headers:n,query:o,body:i}=iB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceMembers",async t=>{let{path:r,headers:n,query:o,body:i}=aB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=sB(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=cB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=lB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=uB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listIntegrationApiKeys",async t=>{let{path:r,headers:n,query:o,body:i}=dB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createIntegrationApiKey",async t=>{let{path:r,headers:n,query:o,body:i}=fB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteIntegrationApiKey",async t=>{let{path:r,headers:n,query:o,body:i}=pB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=hB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=mB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listIntegrations",async t=>{let{path:r,headers:n,query:o,body:i}=yB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=gB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegrationLogs",async t=>{let{path:r,headers:n,query:o,body:i}=vB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegrationByName",async t=>{let{path:r,headers:n,query:o,body:i}=bB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=wB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"requestIntegrationVerification",async t=>{let{path:r,headers:n,query:o,body:i}=xB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createInterface",async t=>{let{path:r,headers:n,query:o,body:i}=SB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getInterface",async t=>{let{path:r,headers:n,query:o,body:i}=_B(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getInterfaceByName",async t=>{let{path:r,headers:n,query:o,body:i}=EB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateInterface",async t=>{let{path:r,headers:n,query:o,body:i}=kB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteInterface",async t=>{let{path:r,headers:n,query:o,body:i}=TB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listInterfaces",async t=>{let{path:r,headers:n,query:o,body:i}=$B(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUsage",async t=>{let{path:r,headers:n,query:o,body:i}=OB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getMultipleUsages",async t=>{let{path:r,headers:n,query:o,body:i}=CB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listUsageHistory",async t=>{let{path:r,headers:n,query:o,body:i}=AB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"changeAISpendQuota",async t=>{let{path:r,headers:n,query:o,body:i}=IB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listActivities",async t=>{let{path:r,headers:n,query:o,body:i}=RB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"introspect",async t=>{let{path:r,headers:n,query:o,body:i}=PB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"upsertFile",async t=>{let{path:r,headers:n,query:o,body:i}=NB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteFile",async t=>{let{path:r,headers:n,query:o,body:i}=MB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listFiles",async t=>{let{path:r,headers:n,query:o,body:i}=jB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getFile",async t=>{let{path:r,headers:n,query:o,body:i}=DB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateFileMetadata",async t=>{let{path:r,headers:n,query:o,body:i}=FB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"searchFiles",async t=>{let{path:r,headers:n,query:o,body:i}=LB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listFilePassages",async t=>{let{path:r,headers:n,query:o,body:i}=qB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listTables",async t=>{let{path:r,headers:n,query:o,body:i}=BB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTable",async t=>{let{path:r,headers:n,query:o,body:i}=UB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateTable",async t=>{let{path:r,headers:n,query:o,body:i}=zB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTable",async t=>{let{path:r,headers:n,query:o,body:i}=ZB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"duplicateTable",async t=>{let{path:r,headers:n,query:o,body:i}=VB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTable",async t=>{let{path:r,headers:n,query:o,body:i}=HB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"renameTableColumn",async t=>{let{path:r,headers:n,query:o,body:i}=WB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTable",async t=>{let{path:r,headers:n,query:o,body:i}=KB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTableRow",async t=>{let{path:r,headers:n,query:o,body:i}=GB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"findTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=JB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=YB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=XB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=QB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"upsertTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=eU(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});this.axiosInstance=t,this.props=r}};function ne(e){var t;return qa.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Hm(e.response.data):Hm(e)}var Fr=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}},rU=class{constructor(e){k(this,"conversations",e=>new Fr(({nextToken:t})=>this._client.listConversations({nextToken:t,...e}).then(r=>({...r,items:r.conversations}))));k(this,"participants",e=>new Fr(({nextToken:t})=>this._client.listParticipants({nextToken:t,...e}).then(r=>({...r,items:r.participants}))));k(this,"events",e=>new Fr(({nextToken:t})=>this._client.listEvents({nextToken:t,...e}).then(r=>({...r,items:r.events}))));k(this,"messages",e=>new Fr(({nextToken:t})=>this._client.listMessages({nextToken:t,...e}).then(r=>({...r,items:r.messages}))));k(this,"users",e=>new Fr(({nextToken:t})=>this._client.listUsers({nextToken:t,...e}).then(r=>({...r,items:r.users}))));k(this,"tasks",e=>new Fr(({nextToken:t})=>this._client.listTasks({nextToken:t,...e}).then(r=>({...r,items:r.tasks}))));k(this,"publicIntegrations",e=>new Fr(({nextToken:t})=>this._client.listPublicIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"bots",e=>new Fr(({nextToken:t})=>this._client.listBots({nextToken:t,...e}).then(r=>({...r,items:r.bots}))));k(this,"botIssues",e=>new Fr(({nextToken:t})=>this._client.listBotIssues({nextToken:t,...e}).then(r=>({...r,items:r.issues}))));k(this,"workspaces",e=>new Fr(({nextToken:t})=>this._client.listWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"publicWorkspaces",e=>new Fr(({nextToken:t})=>this._client.listPublicWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"workspaceMembers",e=>new Fr(({nextToken:t})=>this._client.listWorkspaceMembers({nextToken:t,...e}).then(r=>({...r,items:r.members}))));k(this,"integrations",e=>new Fr(({nextToken:t})=>this._client.listIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"interfaces",e=>new Fr(({nextToken:t})=>this._client.listInterfaces({nextToken:t,...e}).then(r=>({...r,items:r.interfaces}))));k(this,"activities",e=>new Fr(({nextToken:t})=>this._client.listActivities({nextToken:t,...e}).then(r=>({...r,items:r.activities}))));k(this,"files",e=>new Fr(({nextToken:t})=>this._client.listFiles({nextToken:t,...e}).then(r=>({...r,items:r.files}))));k(this,"filePassages",e=>new Fr(({nextToken:t})=>this._client.listFilePassages({nextToken:t,...e}).then(r=>({...r,items:r.passages}))));this._client=e}},O1=100*1024*1024,nU=O1,oU=O1,iU=class extends tU{constructor(t={}){let r=kq(t),{apiUrl:n,headers:o,withCredentials:i,timeout:a}=r,s=qa.create({baseURL:n,headers:o,withCredentials:i,timeout:a,maxBodyLength:nU,maxContentLength:oU,httpAgent:Dm?new yq.default.Agent({keepAlive:!0}):void 0,httpsAgent:Dm?new gq.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,publicContentImmediatelyAccessible:l})=>{if(s&&a)throw new Za("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await qa.get(s,{responseType:"arraybuffer"}).then(h=>h.data).catch(h=>{throw new Za(`Failed to download file from provided URL: ${h.message}`,h)})),!a)throw new Za("No content was provided for the file");let u,d;if(typeof a=="string"){let h=new TextEncoder().encode(a);u=h,d=h.byteLength}else if(a instanceof Uint8Array)u=a,d=u.byteLength;else if(a instanceof ArrayBuffer)u=a,d=u.byteLength;else if(a instanceof Blob)u=a,d=a.size;else throw new Za("The provided content is not supported");let{file:p}=await this.upsertFile({key:t,tags:n,index:r,accessPolicies:i,contentType:o,size:d,expiresAt:c,publicContentImmediatelyAccessible:l}),f={"Content-Type":p.contentType};l&&(f["x-amz-tagging"]="public=true");try{await qa.put(p.uploadUrl,u,{maxBodyLength:1/0,headers:f})}catch(h){throw new Za(`Failed to upload file: ${h.message}`,h,p)}return{file:{...p,size:d}}});t.retry&&n1(s,t.retry),this.config=r}get list(){return new rU(this)}};const jd=Hh(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:S1,BreakingChangesError:$1,Client:iU,ForbiddenError:s1,InternalError:i1,InvalidDataFormatError:h1,InvalidIdentifierError:m1,InvalidJsonSchemaError:p1,InvalidPayloadError:l1,InvalidQueryError:w1,LimitExceededError:T1,MethodNotFoundError:d1,PayloadTooLargeError:c1,PaymentRequiredError:E1,QuotaExceededError:k1,RateLimitedError:_1,ReferenceConstraintError:g1,ReferenceNotFoundError:b1,RelationConflictError:y1,ResourceLockedConflictError:v1,ResourceNotFoundError:f1,RuntimeError:x1,UnauthorizedError:a1,UnknownError:za,UnsupportedMediaTypeError:u1,UploadFileError:Za,axios:wL,axiosRetry:J_,errorFrom:Hm,isApiError:o1},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=(_,se)=>{for(var Te in se)r(_,Te,{get:se[Te],enumerable:!0})},c=(_,se,Te,Fe)=>{if(se&&typeof se=="object"||typeof se=="function")for(let Le of o(se))!a.call(_,Le)&&Le!==Te&&r(_,Le,{get:()=>se[Le],enumerable:!(Fe=n(se,Le))||Fe.enumerable});return _},l=(_,se,Te)=>(c(_,se,"default"),Te&&c(Te,se,"default")),u=(_,se,Te)=>(Te=_!=null?t(i(_)):{},c(se||!_||!_.__esModule?r(Te,"default",{value:_,enumerable:!0}):Te,_)),d=_=>c(r({},"__esModule",{value:!0}),_),p={};s(p,{Bot:()=>USe,BotSpecificClient:()=>vD,Integration:()=>cr,IntegrationDefinition:()=>we,IntegrationSpecificClient:()=>Ze,InterfaceDeclaration:()=>fe,RuntimeError:()=>gD.RuntimeError,botIdHeader:()=>E,botUserIdHeader:()=>B,configurationHeader:()=>pe,configurationTypeHeader:()=>ce,integrationIdHeader:()=>Q,interfaces:()=>L,isApiError:()=>gD.isApiError,messages:()=>f,operationHeader:()=>he,parseBody:()=>je,serve:()=>ut,typeHeader:()=>be,webhookIdHeader:()=>T}),e.exports=d(p);var f={};s(f,{defaults:()=>Z});var h={};s(h,{default:()=>m});var y=pu;l(h,pu);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}),$=h.z.object({fileUrl:g,title:g.optional()}),R=h.z.object({latitude:h.z.number(),longitude:h.z.number(),address:h.z.string().optional(),title:h.z.string().optional()}),N=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}))}),D=h.z.object({items:h.z.array(N)}),H=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:$}),h.z.object({type:h.z.literal("location"),payload:R})]),U=h.z.object({items:h.z.array(H)}),Z={text:{schema:v},markdown:{schema:b},image:{schema:x},audio:{schema:w},video:{schema:S},file:{schema:$},location:{schema:R},carousel:{schema:D},card:{schema:N},dropdown:{schema:A},choice:{schema:A},bloc:{schema:U}},L={};s(L,{creatable:()=>qi,deletable:()=>OSe,hitl:()=>tr,listable:()=>bn,llm:()=>j,readable:()=>Uh,schemas:()=>q,speechToText:()=>Ft,textToImage:()=>ISe,typingIndicator:()=>RSe,updatable:()=>io});var q={};s(q,{speechToText:()=>W});var W={};s(W,{OpenAITranscribeAudioOutputSchema:()=>J});var J=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.")}))}),M=pu,E="x-bot-id",B="x-bot-user-id",Q="x-integration-id",T="x-webhook-id",ce="x-bp-configuration-type",pe="x-bp-configuration",he="x-bp-operation",be="x-bp-type",Ee=M.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),_e=_=>{let se=_[E],Te=_[B],Fe=_[Q],Le=_[T],qe=_[ce],Be=_[pe],at=Ee.parse(_[he]);if(!se)throw new Error("Missing bot headers");if(!Te)throw new Error("Missing bot user headers");if(!Fe)throw new Error("Missing integration headers");if(!Le)throw new Error("Missing webhook headers");if(!Be)throw new Error("Missing configuration headers");if(!at)throw new Error("Missing operation headers");return{botId:se,botUserId:Te,integrationId:Fe,webhookId:Le,operation:at,configurationType:qe??null,configuration:Be?JSON.parse(Buffer.from(Be,"base64").toString("utf-8")):{}}},ye=_=>Array.from(new Set(_)),le=_=>Object.entries(_),te=(_,se)=>Object.fromEntries(le(_).map(([Te,Fe])=>[Te,se(Fe,Te)])),ve=(_,se,Te)=>{let Fe=ye([...Object.keys(_),...Object.keys(se)]),Le={};for(let qe of Fe){let Be=_[qe],at=se[qe];Be&&at?Le[qe]=Te(Be,at):Be?Le[qe]=Be:at&&(Le[qe]=at)}return Le},Ce=Symbol("schemaName"),Ue=_=>_?te(_,(se,Te)=>({...se,[Ce]:Te})):{},F=_=>_[Ce]!==void 0,ue=_=>_[Ce],we=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,"configurations");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",(_,se)=>({..._,...se,input:{schema:_.input.schema.merge(se.input.schema)},output:{schema:_.output.schema.merge(se.output.schema)}}));k(this,"_mergeEvents",(_,se)=>({..._,...se,schema:_.schema.merge(se.schema)}));k(this,"_mergeChannels",(_,se)=>{let Te=ve(_.messages,se.messages,this._mergeMessage);return{..._,...se,messages:Te}});k(this,"_mergeMessage",(_,se)=>({schema:_.schema.merge(se.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.configurations=_.configurations,this.events=_.events,this.actions=_.actions,this.channels=_.channels,this.states=_.states,this.user=_.user,this.secrets=_.secrets,this.entities=_.entities}clone(_){let se=new we({...this,..._});for(let[Te,Fe]of Object.entries(this.interfaces))se.interfaces[Te]=Fe;return se}extend(_,se){let Te=se(Ue(this.entities)),Fe=le(Te).find(([wn,Qs])=>!F(Qs));if(Fe)throw new Error(`Cannot extend interface "${_.name}" with entity "${Fe[0]}"; the provided schema is not part of the integration's entities.`);let Le=te(Te,wn=>({name:ue(wn),schema:wn.schema})),{resolved:qe,implementStatement:Be}=_.resolve({entities:Le}),at=this;at.actions=ve(at.actions??{},qe.actions,this._mergeActions),at.channels=ve(at.channels??{},qe.channels,this._mergeChannels),at.events=ve(at.events??{},qe.events,this._mergeEvents);let Cr=Object.values(Le).map(wn=>wn.name),Zr=Cr.length===0?_.name:`${_.name}<${Cr.join(",")}>`;return this.interfaces[Zr]=Be,this}},fe=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:se}=_,Te={name:this.name,version:this.version,entities:te(se,Be=>({name:Be.name})),actions:{},events:{}},Fe={},Le={},qe={};for(let[Be,at]of le(this.actions)){let Cr=this._dereference(at.input.schema,se),Zr=this._dereference(at.output.schema,se),wn=this._rename(se,Be);Fe[wn]={...at,input:{schema:Cr},output:{schema:Zr}},Te.actions[Be]={name:wn}}for(let[Be,at]of le(this.events)){let Cr=this._dereference(at.schema,se),Zr=this._rename(se,Be);Le[Zr]={...at,schema:Cr},Te.events[Be]={name:Zr}}for(let[Be,at]of le(this.channels)){let Cr={};for(let[Zr,wn]of le(at.messages)){let Qs=this._dereference(wn.schema,se);Cr[Zr]={...wn,schema:Qs}}qe[Be]={...at,messages:Cr}}return{resolved:{actions:Fe,events:Le,channels:qe},implementStatement:Te}}_dereference(_,se){let Te={},Fe={};for(let[Le,qe]of le(se))Te[Le]=qe.schema,Fe[Le]=m.ref(Le);return _(Fe).dereference(Te)}_rename(_,se){if(!this.templateName)return se;let Te=te(_,Fe=>Fe.name);return this.templateName(se,Te)}},De=bm,Ie=console;function je(_){if(!_.body)throw new Error("Missing body");return JSON.parse(_.body)}async function ut(_,se=8072,Te=X){let Fe=(0,De.createServer)(async(Le,qe)=>{try{let Be=await We(Le);if(Be.path==="/health"){qe.writeHead(200).end("ok");return}let at=await _(Be);qe.writeHead((at==null?void 0:at.status)??200,(at==null?void 0:at.headers)??{}).end((at==null?void 0:at.body)??"{}")}catch(Be){Ie.error("Error while handling request",{error:(Be==null?void 0:Be.message)??"Internal error occured"}),qe.writeHead(500).end(JSON.stringify({error:(Be==null?void 0:Be.message)??"Internal error occured"}))}});return Fe.listen(se,()=>Te(se)),Fe}async function We(_){var Le;let se=await ae(_),Te={};for(let qe=0;qe<_.rawHeaders.length;qe+=2){let Be=_.rawHeaders[qe].toLowerCase(),at=_.rawHeaders[qe+1];Te[Be]=at}let Fe=new URL(_.url??"",_.headers.host?`http://${_.headers.host}`:"http://botpress.cloud");return{body:se,path:Fe.pathname,query:K(Fe.search,"?"),headers:Te,method:((Le=_.method)==null?void 0:Le.toUpperCase())??"GET"}}function K(_,se){return _.indexOf(se)===0?_.slice(se.length):_}async function ae(_){return new Promise((se,Te)=>{if(_.method!=="POST"&&_.method!=="PUT"&&_.method!=="PATCH")return se(void 0);let Fe="";_.on("data",Le=>Fe+=Le.toString()),_.on("error",Le=>Te(Le)),_.on("end",()=>se(Fe))})}function X(_){Ie.info(`Listening on port ${_}`)}var me=jd,Oe=jd,tt={retries:3,retryCondition:_=>{var se;return Oe.axiosRetry.isNetworkOrIdempotentRequestError(_)||[429,502].includes(((se=_.response)==null?void 0:se.status)??0)},retryDelay:_=>_*1e3},Ze=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=_}},ht=u(bm),Tt=_=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:ht.default.format(..._),visible_to_bot_owner:!0});{let[se,...Te]=_;return ht.default.format(`[For Bot Owner] ${se}`,...Te)}},Vt={forBot:()=>({info:(..._)=>{console.info(Tt(_))},warn:(..._)=>{console.warn(Tt(_))},error:(..._)=>{console.error(Tt(_))},debug:(..._)=>{console.debug(Tt(_))}})},z=_=>async se=>{let Te=_e(se.headers),Fe=new me.Client({botId:Te.botId,integrationId:Te.integrationId,retry:tt}),Le=new Ze(Fe),qe={ctx:Te,req:se,client:Le,logger:Vt,instance:_};try{let Be;switch(Te.operation){case"webhook_received":Be=await ze(qe);break;case"register":Be=await Ke(qe);break;case"unregister":Be=await gt(qe);break;case"message_created":Be=await $r(qe);break;case"action_triggered":Be=await Yt(qe);break;case"ping":Be=await G(qe);break;case"create_user":Be=await Ge(qe);break;case"create_conversation":Be=await sr(qe);break;default:throw new Error(`Unknown operation ${Te.operation}`)}return Be?{...Be,status:Be.status??200}:{status:200}}catch(Be){if((0,me.isApiError)(Be)){let Cr=new me.RuntimeError(Be.message,Be);return Vt.forBot().error(Cr.message),{status:Cr.code,body:JSON.stringify(Cr.toJSON())}}console.error(Be);let at=new me.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 Vt.forBot().error(at.message),{status:at.code,body:JSON.stringify(at.toJSON())}}},G=async _=>{},ze=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{let{req:qe}=je(Te);return Le.webhook({client:_,ctx:se,req:qe,logger:Fe})},Ke=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.register)return;let{webhookUrl:qe}=je(Te);await Le.register({client:_,ctx:se,webhookUrl:qe,logger:Fe})},gt=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.unregister)return;let{webhookUrl:qe}=je(Te);await Le.unregister({ctx:se,webhookUrl:qe,client:_,logger:Fe})},Ge=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.createUser)return;let{tags:qe}=je(Te);return await Le.createUser({ctx:se,client:_,tags:qe,logger:Fe})},sr=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.createConversation)return;let{channel:qe,tags:Be}=je(Te);return await Le.createConversation({ctx:se,client:_,channel:qe,tags:Be,logger:Fe})},$r=async({ctx:_,req:se,client:Te,logger:Fe,instance:Le})=>{let{conversation:qe,user:Be,type:at,payload:Cr,message:Zr}=je(se),wn=Le.channels[qe.channel];if(!wn)throw new Error(`Channel ${qe.channel} not found`);let Qs=wn.messages[at];if(!Qs)throw new Error(`Message of type ${at} not found in channel ${qe.channel}`);await Qs({ctx:_,conversation:qe,message:Zr,user:Be,type:at,client:Te,payload:Cr,ack:async({tags:zSe})=>{await Te.updateMessage({id:Zr.id,tags:zSe})},logger:Fe})},Yt=async({req:_,ctx:se,client:Te,logger:Fe,instance:Le})=>{let{input:qe,type:Be}=je(_);if(!Be)throw new Error("Missing action type");let at=Le.actions[Be];if(!at)throw new Error(`Action ${Be} not found`);let Cr=await at({ctx:se,input:qe,client:Te,type:Be,logger:Fe});return{body:JSON.stringify({output:Cr})}},cr=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",z(this));k(this,"start",_=>ut(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}},ln=_=>({..._,schema:()=>_.schema.extend({userId:m.string().optional().describe("Allows sending a message pretending to be a certain user")})}),vt=m.union([m.object({type:m.literal("user"),userId:m.string()}),m.object({type:m.literal("bot")})]),bt=Object.entries(Z).map(([_,se])=>m.object({source:vt,type:m.literal(_),payload:se.schema})),er=m.union(bt),tr=new fe({name:"hitl",version:"0.4.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(),messageHistory:m.array(er).optional().describe("Message history to display in the HITL session")})},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:ln(Z.text)}}}}),lr=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.")})}),Kt=m.object({type:m.enum(["auto","specific","any","none",""]).optional(),functionName:m.string().optional().describe('Required if `type` is "specific"')}),Or=m.object({role:m.enum(["user","assistant"]),type:m.enum(["text","tool_calls","tool_result","multipart"]).default("text"),toolCalls:m.array(lr).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.')}),vr=m.object({id:m.string()}),vn=vr.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")})}),Li=_=>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(Or).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:Kt.optional(),userId:m.string().optional(),debug:m.boolean().optional().describe("Set to `true` to output debug information to the bot logs")});Li(vr);var Xs=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(Or.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")}),botpress:m.object({cost:m.number().describe("Total cost of the content generation, in U.S. dollars")})}),j=new fe({name:"llm",version:"5.0.0",entities:{modelRef:{schema:vr}},events:{},actions:{generateContent:{billable:!0,cacheable:!0,input:{schema:({modelRef:_})=>Li(_)},output:{schema:()=>Xs}},listLanguageModels:{input:{schema:()=>m.object({})},output:{schema:({modelRef:_})=>m.object({models:m.array(m.intersection(vn,_))})}}}}),ge=m.object({id:m.string()}),Ae=ge.extend({name:m.string(),costPerMinute:m.number().describe("Cost per minute of speech transcription, in U.S. dollars")}),Ye=_=>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.")});Ye(ge);var $t=J.extend({model:m.string().describe("Model name used"),cost:m.number().describe("Total cost of the transcription, in U.S. dollars (DEPRECATED)"),botpress:m.object({cost:m.number().describe("Total cost of the transcription, in U.S. dollars")})}),Ft=new fe({name:"speechToText",version:"2.0.0",entities:{speechToTextModelRef:{schema:ge}},actions:{transcribeAudio:{billable:!0,cacheable:!0,input:{schema:({speechToTextModelRef:_})=>Ye(_)},output:{schema:()=>$t}},listSpeechToTextModels:{input:{schema:()=>m.object({})},output:{schema:({speechToTextModelRef:_})=>m.object({models:m.array(m.intersection(Ae,_))})}}}}),it=m.object({id:m.string()}),rt=_=>m.intersection(_,it),ur=_=>_[0].toUpperCase()+_.slice(1),zt=(..._)=>{let[se,...Te]=_.filter(Fe=>Fe.length>0).map(Fe=>Fe.toLowerCase());return se?[se,...Te.map(ur)].join(""):""},Xt=m.string().optional(),bn=new fe({name:"listable",version:"0.0.1",entities:{item:{schema:it}},events:{},actions:{list:{input:{schema:()=>m.object({nextToken:Xt})},output:{schema:_=>m.object({items:m.array(rt(_.item)),meta:m.object({nextToken:Xt})})}}},templateName:(_,se)=>zt(se.item,_)}),qi=new fe({name:"creatable",version:"0.0.1",entities:{item:{schema:it}},events:{created:{schema:_=>m.object({item:rt(_.item)})}},actions:{create:{input:{schema:_=>m.object({item:_.item})},output:{schema:_=>m.object({item:rt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),Uh=new fe({name:"readable",version:"0.0.1",entities:{item:{schema:it}},events:{},actions:{read:{input:{schema:()=>it},output:{schema:_=>m.object({item:rt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),io=new fe({name:"updatable",version:"0.0.1",entities:{item:{schema:it}},events:{updated:{schema:_=>m.object({item:rt(_.item)})}},actions:{update:{input:{schema:_=>it.extend({item:_.item})},output:{schema:_=>m.object({item:rt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),OSe=new fe({name:"deletable",version:"0.0.1",entities:{item:{schema:it}},events:{deleted:{schema:()=>it}},actions:{delete:{input:{schema:()=>it},output:{schema:()=>m.object({})}}},templateName:(_,se)=>zt(se.item,_)}),A0=m.object({id:m.string()}),CSe=A0.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")}),mD=m.object({}).describe("Model-specific parameters for image generation"),yD=(_,se)=>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:se.optional()});yD(A0,mD);var ASe=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 (DEPRECATED)"),botpress:m.object({cost:m.number().describe("Cost of the image generation, in U.S. dollars")})}),ISe=new fe({name:"textToImage",version:"2.1.0",entities:{imageModelRef:{schema:A0},imageGenerationParams:{schema:mD}},actions:{generateImage:{billable:!0,cacheable:!0,input:{schema:({imageModelRef:_,imageGenerationParams:se})=>yD(_,se)},output:{schema:()=>ASe}},listImageModels:{input:{schema:()=>m.object({})},output:{schema:({imageModelRef:_})=>m.object({models:m.array(m.intersection(CSe,_))})}}}}),RSe=new fe({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 gD=jd,PSe=u(jd),vD=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(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"setState",_=>this._client.setState(_).then(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"getOrSetState",_=>this._client.getOrSetState(_).then(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"patchState",_=>this._client.patchState(_).then(se=>({state:{...se.state,payload:se.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=_}},NSe=pu,MSe=NSe.z.enum(["event_received","register","unregister","ping","action_triggered"]),jSe=_=>{let se=_[E],Te=_[pe],Fe=_[be],Le=MSe.parse(_[he]);if(!se)throw new Error("Missing bot headers");if(!Fe)throw new Error("Missing type headers");if(!Te)throw new Error("Missing configuration headers");if(!Le)throw new Error("Missing operation headers");return{botId:se,operation:Le,type:Fe,configuration:Te?JSON.parse(Buffer.from(Te,"base64").toString("utf-8")):{}}},DSe=_=>async se=>{let Te=jSe(se.headers);Te.operation!=="ping"&&Ie.info(`Received ${Te.operation} operation for bot ${Te.botId} of type ${Te.type}`);let Fe=new PSe.Client({botId:Te.botId,retry:tt}),Le=new vD(Fe),qe={req:se,ctx:Te,client:Le,instance:_};switch(Te.operation){case"action_triggered":throw new Error(`Operation ${Te.operation} not supported yet`);case"event_received":await BSe(qe);break;case"register":await LSe();break;case"unregister":await qSe();break;case"ping":await FSe();break;default:throw new Error(`Unknown operation ${Te.operation}`)}return{status:200}},FSe=async _=>{},LSe=async _=>{},qSe=async _=>{},BSe=async({ctx:_,req:se,client:Te,instance:Fe})=>{Ie.debug(`Received event ${_.type}`);let Le=je(se),qe=Le.event;switch(_.type){case"message_created":let Be={user:qe.payload.user,conversation:qe.payload.conversation,message:qe.payload.message,states:qe.payload.states,event:qe};await Promise.all(Fe.messageHandlers.map(Zr=>Zr({client:Te,ctx:_,...Be})));break;case"state_expired":let at={state:qe.payload.state};await Promise.all(Fe.stateExpiredHandlers.map(Zr=>Zr({client:Te,ctx:_,...at})));break;default:let Cr={event:Le.event};await Promise.all(Fe.eventHandlers.map(Zr=>Zr({client:Te,ctx:_,...Cr})))}},USe=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",DSe(this._state));k(this,"start",_=>ut(this.handler,_));this.props=_}}})(F0);var ie=F0.exports;const{defaults:co}=ie.messages,Vn={className:ie.z.string().describe("CSS className to apply to the message").optional()},C1=co.audio.schema.extend({...Vn,type:ie.z.literal("audio")}),Wm=co.card.schema.extend({type:ie.z.literal("card"),subtitle:ie.z.string().optional(),imageUrl:ie.z.string().optional(),...Vn}),aU=Wm.omit({type:!0}),A1=ie.z.object({items:ie.z.array(aU),...Vn,type:ie.z.literal("carousel")}),I1=co.choice.schema.extend({text:ie.z.string(),...Vn,type:ie.z.literal("choice"),disableFreeText:ie.z.boolean().optional()}),R1=co.dropdown.schema.extend({text:ie.z.string(),...Vn,type:ie.z.literal("dropdown")}),P1=co.file.schema.extend({...Vn,type:ie.z.literal("file")}),N1=co.image.schema.extend({...Vn,type:ie.z.literal("image")}),M1=co.location.schema.extend({...Vn,type:ie.z.literal("location")}),j1=co.markdown.schema.extend({...Vn,type:ie.z.literal("markdown")}),D1=co.text.schema.extend({...Vn,type:ie.z.literal("text")}),F1=co.video.schema.extend({...Vn,type:ie.z.literal("video")}),L1=ie.z.union([C1,Wm,A1,I1,R1,P1,N1,M1,j1,D1,F1]),q1=ie.z.object({type:ie.z.literal("webchat_visibility"),data:ie.z.object({visibility:ie.z.union([ie.z.literal("show"),ie.z.literal("hide"),ie.z.literal("toggle")])})}),B1=ie.z.object({type:ie.z.literal("webchat_config"),data:ie.z.object({config:ie.z.record(ie.z.any())})}),U1=ie.z.object({type:ie.z.literal("custom"),data:ie.z.object({event:ie.z.record(ie.z.any())})}),z1=ie.z.union([q1,B1,U1]),sU=z1,cU=ie.z.object({type:ie.z.literal("message_created"),data:L1}),Z1=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:C1,cardSchema:Wm,carouselSchema:A1,choiceSchema:I1,customSchema:U1,dropdownSchema:R1,fileSchema:P1,imageSchema:N1,locationSchema:M1,markdownSchema:j1,messageCreatedSchema:cU,messageSchema:L1,textSchema:D1,triggerSchema:z1,triggerSignalSchema:sU,videoSchema:F1,webchatConfigSchema:B1,webchatVisibilitySchema:q1},Symbol.toStringTag,{value:"Module"})),lo=ie.z.object({className:ie.z.string().optional(),avatarUrl:ie.z.string().url().optional()}),V1=lo.extend({type:ie.z.literal("audio"),audio:ie.z.string(),title:ie.z.string().optional()}),lU=ie.z.union([ie.z.object({title:ie.z.string(),action:ie.z.literal("Say something"),text:ie.z.string()}),ie.z.object({title:ie.z.string(),action:ie.z.literal("Open URL"),url:ie.z.string()}),ie.z.object({title:ie.z.string(),action:ie.z.literal("Postback"),payload:ie.z.string()})]),Km=lo.extend({type:ie.z.literal("card"),title:ie.z.string(),subtitle:ie.z.string().optional(),image:ie.z.string().optional(),actions:ie.z.array(lU)}),H1=lo.extend({type:ie.z.literal("carousel"),items:ie.z.array(Km)}),W1=lo.extend({type:ie.z.literal("dropdown"),message:ie.z.string().optional(),options:ie.z.array(ie.z.object({label:ie.z.string(),value:ie.z.string()})),allowCreation:ie.z.boolean().optional(),placeholderText:ie.z.string().optional(),allowMultiple:ie.z.boolean().optional(),buttonText:ie.z.string().optional(),width:ie.z.number().optional(),displayInKeyboard:ie.z.boolean().optional(),markdown:ie.z.boolean().optional(),text:ie.z.string().optional()}),K1=lo.extend({type:ie.z.literal("file"),file:ie.z.string(),title:ie.z.string().optional()}),G1=lo.extend({type:ie.z.literal("image"),image:ie.z.string()}),J1=lo.extend({type:ie.z.literal("location"),latitude:ie.z.number(),longitude:ie.z.number(),address:ie.z.string().optional(),title:ie.z.string().optional()}),Y1=lo.extend({type:ie.z.literal("single-choice"),text:ie.z.string(),disableFreeText:ie.z.boolean().optional(),choices:ie.z.array(ie.z.object({title:ie.z.string(),value:ie.z.string()}))}),X1=lo.extend({type:ie.z.literal("text"),text:ie.z.string(),markdown:ie.z.boolean().optional()}),Q1=lo.extend({type:ie.z.literal("video"),video:ie.z.string(),title:ie.z.string().optional()}),eE=ie.z.object({type:ie.z.literal("quick_reply"),text:ie.z.string(),payload:ie.z.string().optional()}),Dd=ie.z.union([V1,Km,H1,W1,K1,G1,J1,Y1,X1,Q1,eE]),tE=ie.z.object({type:ie.z.literal("webchat-visibility"),visibility:ie.z.union([ie.z.literal("show"),ie.z.literal("hide"),ie.z.literal("toggle")])}),rE=ie.z.object({type:ie.z.literal("webchat-config"),config:ie.z.record(ie.z.any())}),nE=ie.z.object({type:ie.z.literal("custom-event"),event:ie.z.record(ie.z.any())}),oE=ie.z.union([tE,rE,nE]),uU=ie.z.object({type:ie.z.literal("trigger"),trigger:oE}),iE=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:V1,cardSchema:Km,carouselSchame:H1,customEventSchema:nE,dropdownSchema:W1,fileSchema:K1,imageSchema:G1,locationSchema:J1,messageSchema:Dd,messageSignalSchema:Dd,quickReplySchema:eE,singleChoiceSchema:Y1,textSchema:X1,triggerSchema:oE,triggerSignalSchema:uU,videoSchema:Q1,webchatConfigSchema:rE,webchatVisibilitySchema:tE},Symbol.toStringTag,{value:"Module"})),aE=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(dU)}),dU=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}`)}},sE=e=>({...e,type:"audio",audio:e.audioUrl}),cE=e=>aE(e),lE=e=>({...e,type:"carousel",items:e.items.map(aE)}),uE=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),dE=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),fE=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),pE=e=>({...e,type:"image",image:e.imageUrl}),hE=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),mE=e=>({...e,type:"text",text:e.markdown,markdown:!0}),yE=e=>({...e,type:"text",text:e.text,markdown:!0}),gE=e=>({...e,type:"video",video:e.videoUrl}),fU=e=>{switch(e.type){case"audio":return sE(e);case"card":return cE(e);case"carousel":return lE(e);case"choice":return uE(e);case"dropdown":return dE(e);case"file":return fE(e);case"image":return pE(e);case"location":return hE(e);case"markdown":return mE(e);case"text":return yE(e);case"video":return gE(e);default:throw new Error("Unsuported message type")}},vE=e=>({type:"webchat-visibility",visibility:e.data.visibility}),bE=e=>({type:"webchat-config",config:e.data.config}),wE=e=>({type:"custom-event",event:e.data.event}),xE=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:sE,cardAdapter:cE,carouselAdapter:lE,choiceAdapter:uE,customAdapter:wE,dropdownAdapter:dE,fileAdapter:fE,imageAdapter:pE,locationAdapter:hE,markdownAdapter:mE,messageAdapter:fU,textAdapter:yE,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return vE(e);case"webchat_config":return bE(e);case"custom":return wE(e);default:throw new Error("unknown trigger type")}},videoAdapter:gE,webchatConfigAdapter:bE,webchatVisibilityAdapter:vE},Symbol.toStringTag,{value:"Module"})),SE=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(pU)}),pU=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")}},hU=e=>({...e,type:"audio",audioUrl:e.audio}),mU=e=>SE(e),yU=e=>({...e,type:"carousel",items:e.items.map(SE)}),gU=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),vU=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),bU=e=>({...e,type:"image",imageUrl:e.image}),wU=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),xU=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),SU=e=>({...e,type:"text",text:e.text}),_U=e=>({...e,type:"video",videoUrl:e.video}),EU=e=>({...e,type:"text",text:e.text??e.payload}),_E=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return hU(e);case"card":return mU(e);case"carousel":return yU(e);case"dropdown":return gU(e);case"file":return vU(e);case"image":return bU(e);case"location":return wU(e);case"single-choice":return xU(e);case"text":return SU(e);case"video":return _U(e);case"quick_reply":return EU(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),kU=Object.freeze(Object.defineProperty({__proto__:null,messaging:iE,messagingToWebChat:_E,webchat:Z1,webchatToMessaging:xE},Symbol.toStringTag,{value:"Module"})),TU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let Fd;const $U=new Uint8Array(16);function OU(){if(!Fd&&(Fd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fd($U)}const Lr=[];for(let e=0;e<256;++e)Lr.push((e+256).toString(16).slice(1));function CU(e,t=0){return Lr[e[t+0]]+Lr[e[t+1]]+Lr[e[t+2]]+Lr[e[t+3]]+"-"+Lr[e[t+4]]+Lr[e[t+5]]+"-"+Lr[e[t+6]]+Lr[e[t+7]]+"-"+Lr[e[t+8]]+Lr[e[t+9]]+"-"+Lr[e[t+10]]+Lr[e[t+11]]+Lr[e[t+12]]+Lr[e[t+13]]+Lr[e[t+14]]+Lr[e[t+15]]}const EE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ld(e,t,r){if(EE.randomUUID&&!t&&!e)return EE.randomUUID();e=e||{};const n=e.random||(e.rng||OU)();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 CU(n)}const qd=e=>({block:e,type:"bubble"}),AU=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},kE=({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(AU)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},IU=({choices:e,text:t})=>{const r=Ld(),n=qd({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}))}]}},RU=({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}},Gm=({type:e,audio:t})=>({payload:{type:e,url:t}}),Jm=e=>({payload:qd(kE(e))}),Ym=({items:e})=>({payload:{type:"carousel",blocks:e.map(kE)}}),Xm=e=>({disableInput:e.disableFreeText,payload:IU(e)}),Qm=e=>({disableInput:!0,payload:qd(RU(e))}),ey=({file:e,...t})=>({payload:{url:e,...t}}),ty=({type:e,image:t})=>({payload:{type:e,url:t}}),ry=({type:e,latitude:t,longitude:r,title:n,address:o})=>({payload:{type:e,latitude:t,longitude:r,title:n??o??"View on map"}}),TE=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Bd=({type:e,text:t})=>({payload:qd({type:e,text:t})}),ny=({type:e,video:t})=>({payload:{type:e,url:t}}),oy=e=>{switch(e.type){case"audio":return Gm(e);case"card":return Jm(e);case"carousel":return Ym(e);case"single-choice":return Xm(e);case"dropdown":return Qm(e);case"file":return ey(e);case"image":return ty(e);case"location":return ry(e);case"quick_reply":return TE(e);case"text":return Bd(e);case"video":return ny(e);default:throw new Error("Unsuported message type")}},PU=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Gm,cardAdapter:Jm,carouselAdapter:Ym,choiceAdapter:Xm,dropdownAdapter:Qm,fileAdapter:ey,imageAdapter:ty,locationAdapter:ry,messageAdapter:oy,quickReplyAdapter:TE,textAdapter:Bd,videoAdapter:ny},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:Hn}=kU,$E=e=>{const t=Hn.audioAdapter(e);return Gm(t)},OE=e=>{const t=Hn.cardAdapter(e);return Jm(t)},CE=e=>{const t=Hn.carouselAdapter(e);return Ym(t)},AE=e=>{const t=Hn.choiceAdapter(e);return Xm(t)},IE=e=>{const t=Hn.dropdownAdapter(e);return Qm(t)},RE=e=>{const t=Hn.fileAdapter(e);return ey(t)},PE=e=>{const t=Hn.imageAdapter(e);return ty(t)},NE=e=>{const t=Hn.locationAdapter(e);return ry(t)},ME=e=>{const t=Hn.markdownAdapter(e);return Bd(t)},jE=e=>{const t=Hn.textAdapter(e);return Bd(t)},DE=e=>{const t=Hn.videoAdapter(e);return ny(t)},FE=e=>{switch(e.type){case"audio":return $E(e);case"card":return OE(e);case"carousel":return CE(e);case"choice":return AE(e);case"dropdown":return IE(e);case"file":return RE(e);case"image":return PE(e);case"location":return NE(e);case"markdown":return ME(e);case"text":return jE(e);case"video":return DE(e);default:throw new Error("Unsuported message type")}},NU=Object.freeze(Object.defineProperty({__proto__:null,messaging:iE,messagingToTarget:PU,messagingToWebChat:_E,target:TU,webchat:Z1,webchatToMessaging:xE,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:$E,cardAdapter:OE,carouselAdapter:CE,choiceAdapter:AE,dropdownAdapter:IE,fileAdapter:RE,imageAdapter:PE,locationAdapter:NE,markdownAdapter:ME,messageAdapter:FE,textAdapter:jE,videoAdapter:DE},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var iy={exports:{}},Ec={};/**
|
|
77
|
+
`+G.prev}function Vt(z,G){var ze=he(z),Ke=[];if(ze){Ke.length=z.length;for(var gt=0;gt<z.length;gt++)Ke[gt]=F(z,gt)?G(z[gt],z):""}var Ge=typeof Z=="function"?Z(z):[],sr;if(q){sr={};for(var $r=0;$r<Ge.length;$r++)sr["$"+Ge[$r]]=Ge[$r]}for(var Yt in z)F(z,Yt)&&(ze&&String(Number(Yt))===Yt&&Yt<z.length||q&&sr["$"+Yt]instanceof Symbol||(R.call(/[^\w$]/,Yt)?Ke.push(G(Yt,z)+": "+G(z[Yt],z)):Ke.push(Yt+": "+G(z[Yt],z))));if(typeof Z=="function")for(var cr=0;cr<Ge.length;cr++)J.call(z,Ge[cr])&&Ke.push("["+G(Ge[cr])+"]: "+G(z[Ge[cr]],z));return Ke}}),eq=Nt((e,t)=>{var r=Ua(),n=YL(),o=QL(),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,$){a&&S&&(typeof S=="object"||typeof S=="function")?(v||(v=new a),l(v,S,$)):s?(b||(b=new s),p(b,S,$)):(x||(x={key:{},next:null}),m(x,S,$))}};return w}}),Bm=Nt((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}}),G_=Nt((e,t)=>{var r=Bm(),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,$){if(n.call(v,$)){var R=v[$];R&&typeof R=="object"&&S&&typeof S=="object"?v[$]=g(R,S,x):v.push(S)}else v[$]=S}),v):Object.keys(b).reduce(function(S,$){var R=b[$];return n.call(S,$)?S[$]=g(S[$],R,x):S[$]=R,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 $="",R=0;R<S.length;++R){var N=S.charCodeAt(R);if(N===45||N===46||N===95||N===126||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122||w===r.RFC1738&&(N===40||N===41)){$+=S.charAt(R);continue}if(N<128){$=$+i[N];continue}if(N<2048){$=$+(i[192|N>>6]+i[128|N&63]);continue}if(N<55296||N>=57344){$=$+(i[224|N>>12]+i[128|N>>6&63]+i[128|N&63]);continue}R+=1,N=65536+((N&1023)<<10|S.charCodeAt(R)&1023),$+=i[240|N>>18]+i[128|N>>12&63]+i[128|N>>6&63]+i[128|N&63]}return $},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],$=Object.keys(S),R=0;R<$.length;++R){var N=$[R],A=S[N];typeof A=="object"&&A!==null&&b.indexOf(A)===-1&&(v.push({obj:S,prop:N}),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}}),tq=Nt((e,t)=>{var r=eq(),n=G_(),o=Bm(),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,$,R,N,A,D,H,U,Z,L,q,W,J){for(var M=b,E=J,B=0,Q=!1;(E=E.get(y))!==void 0&&!Q;){var T=E.get(b);if(B+=1,typeof T<"u"){if(T===B)throw new RangeError("Cyclic object value");Q=!0}typeof E.get(y)>"u"&&(B=0)}if(typeof A=="function"?M=A(x,M):M instanceof Date?M=U(M):w==="comma"&&s(M)&&(M=n.maybeMap(M,function(ue){return ue instanceof Date?U(ue):ue})),M===null){if($)return N&&!q?N(x,f.encoder,W,"key",Z):x;M=""}if(h(M)||n.isBuffer(M)){if(N){var ce=q?x:N(x,f.encoder,W,"key",Z);if(w==="comma"&&q){for(var pe=c.call(String(M),","),he="",be=0;be<pe.length;++be)he+=(be===0?"":",")+L(N(pe[be],f.encoder,W,"value",Z));return[L(ce)+(S&&s(M)&&pe.length===1?"[]":"")+"="+he]}return[L(ce)+"="+L(N(M,f.encoder,W,"value",Z))]}return[L(x)+"="+L(String(M))]}var Ee=[];if(typeof M>"u")return Ee;var _e;if(w==="comma"&&s(M))_e=[{value:M.length>0?M.join(",")||null:void 0}];else if(s(A))_e=A;else{var ye=Object.keys(M);_e=D?ye.sort(D):ye}for(var le=S&&s(M)&&M.length===1?x+"[]":x,te=0;te<_e.length;++te){var ve=_e[te],Ce=typeof ve=="object"&&typeof ve.value<"u"?ve.value:M[ve];if(!(R&&Ce===null)){var Ue=s(M)?typeof w=="function"?w(le,ve):le:le+(H?"."+ve:"["+ve+"]");J.set(b,B);var F=r();F.set(y,J),u(Ee,v(Ce,Ue,w,S,$,R,N,A,D,H,U,Z,L,q,W,F))}}return Ee},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,$;typeof w.filter=="function"?($=w.filter,x=$("",x)):s(w.filter)&&($=w.filter,S=$);var R=[];if(typeof x!="object"||x===null)return"";var N;b&&b.arrayFormat in a?N=b.arrayFormat:b&&"indices"in b?N=b.indices?"indices":"repeat":N="indices";var A=a[N];if(b&&"commaRoundTrip"in b&&typeof b.commaRoundTrip!="boolean")throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var D=A==="comma"&&b&&b.commaRoundTrip;S||(S=Object.keys(x)),w.sort&&S.sort(w.sort);for(var H=r(),U=0;U<S.length;++U){var Z=S[U];w.skipNulls&&x[Z]===null||u(R,m(x[Z],Z,A,D,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,H))}var L=R.join(w.delimiter),q=w.addQueryPrefix===!0?"?":"";return w.charsetSentinel&&(w.charset==="iso-8859-1"?q+="utf8=%26%2310003%3B&":q+="utf8=%E2%9C%93&"),L.length>0?q+L:""}}),rq=Nt((e,t)=>{var r=G_(),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 $=b[w],R=$.indexOf("]="),N=R===-1?$.indexOf("="):R+1,A,D;N===-1?(A=y.decoder($,i.decoder,S,"key"),D=y.strictNullHandling?null:""):(A=y.decoder($.slice(0,N),i.decoder,S,"key"),D=r.maybeMap(s($.slice(N+1),y),function(H){return y.decoder(H,i.decoder,S,"value")})),D&&y.interpretNumericEntities&&S==="iso-8859-1"&&(D=a(D)),$.indexOf("[]=")>-1&&(D=o(D)?[D]:D),n.call(m,A)?m[A]=r.combine(m[A],D):m[A]=D}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,$=parseInt(S,10);!m.parseArrays&&S===""?x={0:v}:!isNaN($)&&w!==S&&String($)===S&&$>=0&&m.parseArrays&&$<=m.arrayLimit?(x=[],x[$]=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,$=[];if(S){if(!m.plainObjects&&n.call(Object.prototype,S)&&!m.allowPrototypes)return;$.push(S)}for(var R=0;m.depth>0&&(w=x.exec(v))!==null&&R<m.depth;){if(R+=1,!m.plainObjects&&n.call(Object.prototype,w[1].slice(1,-1))&&!m.allowPrototypes)return;$.push(w[1])}return w&&$.push("["+v.slice(w.index)+"]"),d($,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)}}),nq=Nt((e,t)=>{var r=tq(),n=rq(),o=Bm();t.exports={formats:o,parse:n,stringify:r}}),J_={};RL(J_,{DEFAULT_OPTIONS:()=>t1,default:()=>n1,exponentialDelay:()=>Q_,isIdempotentRequestError:()=>zm,isNetworkError:()=>Um,isNetworkOrIdempotentRequestError:()=>Zm,isRetryableError:()=>Nd,isSafeRequestError:()=>X_,linearDelay:()=>e1,namespace:()=>Pd,retryAfter:()=>Md});var oq=Id(NL(),1),Pd="axios-retry";function Um(e){let t=["ERR_CANCELED","ECONNABORTED"];return e.response||!e.code||t.includes(e.code)?!1:(0,oq.default)(e)}var Y_=["get","head","options"],iq=Y_.concat(["put","delete"]);function Nd(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status===429||e.response.status>=500&&e.response.status<=599)}function X_(e){var t;return(t=e.config)!=null&&t.method?Nd(e)&&Y_.indexOf(e.config.method)!==-1:!1}function zm(e){var t;return(t=e.config)!=null&&t.method?Nd(e)&&iq.indexOf(e.config.method)!==-1:!1}function Zm(e){return Um(e)||zm(e)}function Md(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 aq(e=0,t=void 0){return Math.max(0,Md(t))}function Q_(e=0,t=void 0,r=100){let n=2**e*r,o=Math.max(n,Md(t)),i=o*.2*Math.random();return o+i}function e1(e=100){return(t=0,r=void 0)=>{let n=t*e;return Math.max(n,Md(r))}}var t1={retries:3,retryCondition:Zm,retryDelay:aq,shouldResetTimeout:!1,onRetry:()=>{},onMaxRetryTimesExceeded:()=>{},validateResponse:null};function sq(e,t){return{...t1,...t,...e[Pd]}}function r1(e,t,r=!1){let n=sq(e,t||{});return n.retryCount=n.retryCount||0,(!n.lastRequestTime||r)&&(n.lastRequestTime=Date.now()),e[Pd]=n,n}function cq(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 lq(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 uq(e,t,r,n){var c;t.retryCount+=1;let{retryDelay:o,shouldResetTimeout:i,onRetry:a}=t,s=o(t.retryCount,r);if(cq(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 dq(e,t){e.retryCount>=e.retries&&await e.onMaxRetryTimesExceeded(t,e.retryCount)}var si=(e,t)=>{let r=e.interceptors.request.use(o=>{var i;return r1(o,t,!0),(i=o[Pd])!=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=r1(i,t);return o.response&&((s=a.validateResponse)!=null&&s.call(a,o.response))?o.response:await lq(a,o)?uq(e,a,o,i):(await dq(a,o),Promise.reject(o))});return{requestInterceptorId:r,responseInterceptorId:n}};si.isNetworkError=Um,si.isSafeRequestError=X_,si.isIdempotentRequestError=zm,si.isNetworkOrIdempotentRequestError=Zm,si.exponentialDelay=Q_,si.linearDelay=e1,si.isRetryableError=Nd;var n1=si,fq={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))},Vm=typeof window<"u"&&typeof window.document<"u"?window.crypto:vm;Vm.getRandomValues||(Vm=fq);var Jt=class 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=Jt.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 r=this.getPrefix(),n=new Date().toISOString().replace(/[\-:TZ]/g,"").split(".")[0],o=4,i=Array.from(Vm.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"}},pq=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,o1=e=>e instanceof Jt||pq(e)&&e.isApiError===!0,za=class extends Jt{constructor(e,t,r){super(500,"An unknown error occurred","Unknown",e,t,r)}},i1=class extends Jt{constructor(e,t,r){super(500,"An internal error occurred","Internal",e,t,r)}},a1=class extends Jt{constructor(e,t,r){super(401,"The request requires to be authenticated.","Unauthorized",e,t,r)}},s1=class extends Jt{constructor(e,t,r){super(403,"The requested action can't be peform by this resource.","Forbidden",e,t,r)}},c1=class extends Jt{constructor(e,t,r){super(413,"The request payload is too large.","PayloadTooLarge",e,t,r)}},l1=class extends Jt{constructor(e,t,r){super(400,"The request payload is invalid.","InvalidPayload",e,t,r)}},u1=class extends Jt{constructor(e,t,r){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",e,t,r)}},d1=class extends Jt{constructor(e,t,r){super(405,"The requested method does not exist.","MethodNotFound",e,t,r)}},f1=class extends Jt{constructor(e,t,r){super(404,"The requested resource does not exist.","ResourceNotFound",e,t,r)}},p1=class extends Jt{constructor(e,t,r){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",e,t,r)}},h1=class extends Jt{constructor(e,t,r){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",e,t,r)}},m1=class extends Jt{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 Jt{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)}},g1=class extends Jt{constructor(e,t,r){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",e,t,r)}},v1=class extends Jt{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)}},b1=class extends Jt{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)}},w1=class extends Jt{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)}},x1=class extends Jt{constructor(e,t,r){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",e,t,r)}},S1=class extends Jt{constructor(e,t,r){super(409,"The record attempted to be created already exists.","AlreadyExists",e,t,r)}},_1=class extends Jt{constructor(e,t,r){super(429,"The request has been rate limited.","RateLimited",e,t,r)}},E1=class extends Jt{constructor(e,t,r){super(402,"A payment is required to perform this request.","PaymentRequired",e,t,r)}},k1=class extends Jt{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)}},T1=class extends Jt{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)}},$1=class extends Jt{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)}},hq={Unknown:za,Internal:i1,Unauthorized:a1,Forbidden:s1,PayloadTooLarge:c1,InvalidPayload:l1,UnsupportedMediaType:u1,MethodNotFound:d1,ResourceNotFound:f1,InvalidJsonSchema:p1,InvalidDataFormat:h1,InvalidIdentifier:m1,RelationConflict:y1,ReferenceConstraint:g1,ResourceLockedConflict:v1,ReferenceNotFound:b1,InvalidQuery:w1,Runtime:x1,AlreadyExists:S1,RateLimited:_1,PaymentRequired:E1,QuotaExceeded:k1,LimitExceeded:T1,BreakingChanges:$1},Hm=e=>o1(e)?e:e instanceof Error?new za(e.message,e):typeof e=="string"?new za(e):mq(e);function mq(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=hq[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new za(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new za("An invalid error occurred: "+JSON.stringify(e))}var Za=class extends Error{constructor(t,r,n){super(t),this.innerError=r,this.file=n,this.name="FileUploadError"}},yq=Id(ML()),gq=Id(jL()),vq="https://api.botpress.cloud",bq=6e4,wq="BP_API_URL",xq="BP_BOT_ID",Sq="BP_INTEGRATION_ID",_q="BP_WORKSPACE_ID",Eq="BP_TOKEN";function kq(e){let t=Tq(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??vq,o=t.timeout??bq;return{apiUrl:n,timeout:o,withCredentials:H_,headers:r}}function Tq(e){return H_?e:Dm?$q(e):e}function $q(e){let t={...e,apiUrl:e.apiUrl??process.env[wq],botId:e.botId??process.env[xq],integrationId:e.integrationId??process.env[Sq],workspaceId:e.workspaceId??process.env[_q]},r=t.token??process.env[Eq];return r&&(t.token=r),t}var Oq=Id(nq()),Cq=e=>e[1]!==void 0,re=e=>{let{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(Cq),s=Object.fromEntries(a),c=Oq.default.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},Aq=e=>({path:"/v1/chat/conversations",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Iq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Rq=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:{}}),Pq=e=>({path:"/v1/chat/conversations/get-or-create",headers:{},query:{},params:{},body:{channel:e.channel,tags:e.tags,integrationName:e.integrationName}}),Nq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{currentTaskId:e.currentTaskId,tags:e.tags}}),Mq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),Dq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants`,headers:{},query:{},params:{id:e.id},body:{userId:e.userId}}),Fq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),Lq=e=>({path:`/v1/chat/conversations/${encodeURIComponent(e.id)}/participants/${encodeURIComponent(e.userId)}`,headers:{},query:{},params:{id:e.id,userId:e.userId},body:{}}),qq=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}}),Bq=e=>({path:`/v1/chat/events/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Uq=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:{}}),zq=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}}),Zq=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}}),Vq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Hq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags}}),Wq=e=>({path:"/v1/chat/messages",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Kq=e=>({path:`/v1/chat/messages/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Gq=e=>({path:"/v1/chat/users",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Jq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),Yq=e=>({path:"/v1/chat/users",headers:{},query:{nextToken:e.nextToken,conversationId:e.conversationId,tags:e.tags},params:{},body:{}}),Xq=e=>({path:"/v1/chat/users/get-or-create",headers:{},query:{},params:{},body:{tags:e.tags,integrationName:e.integrationName,name:e.name,pictureUrl:e.pictureUrl}}),Qq=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,name:e.name,pictureUrl:e.pictureUrl}}),e3=e=>({path:`/v1/chat/users/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),t3=e=>({path:`/v1/chat/states/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}/${encodeURIComponent(e.name)}/expiry`,headers:{},query:{},params:{type:e.type,id:e.id,name:e.name},body:{expiry:e.expiry}}),r3=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:{}}),n3=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}}),o3=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}}),i3=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}}),a3=e=>({path:"/v1/chat/actions",headers:{},query:{},params:{},body:{type:e.type,input:e.input}}),s3=e=>({path:"/v1/chat/integrations/configure",headers:{},query:{},params:{},body:{identifier:e.identifier}}),c3=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),l3=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}}),u3=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}}),d3=e=>({path:`/v1/chat/tasks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),f3=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:{}}),p3=e=>({path:"/v1/chat/analytics",headers:{},query:{},params:{},body:{name:e.name,count:e.count}}),h3=e=>({path:"/v1/admin/helper/vrl",headers:{},query:{},params:{},body:{data:e.data,script:e.script}}),m3=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{}}),y3=e=>({path:"/v1/admin/account/me",headers:{},query:{},params:{},body:{displayName:e.displayName,profilePicture:e.profilePicture,refresh:e.refresh}}),g3=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{}}),v3=e=>({path:"/v1/admin/account/pats",headers:{},query:{},params:{},body:{note:e.note}}),b3=e=>({path:`/v1/admin/account/pats/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),w3=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{value:e.value}}),x3=e=>({path:`/v1/admin/account/preferences/${encodeURIComponent(e.key)}`,headers:{},query:{},params:{key:e.key},body:{}}),S3=e=>({path:"/v1/admin/hub/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version},params:{},body:{}}),_3=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),E3=e=>({path:`/v1/admin/hub/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),k3=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}}),T3=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}}),$3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/transfer`,headers:{},query:{},params:{id:e.id},body:{targetWorkspaceId:e.targetWorkspaceId}}),O3=e=>({path:"/v1/admin/bots",headers:{},query:{dev:e.dev,nextToken:e.nextToken,sortField:e.sortField,sortDirection:e.sortDirection},params:{},body:{}}),C3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),A3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),I3=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:{}}),R3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/webchat`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),P3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/analytics`,headers:{},query:{startDate:e.startDate,endDate:e.endDate},params:{id:e.id},body:{}}),N3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),M3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),j3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),D3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/issues/${encodeURIComponent(e.issueId)}/events`,headers:{},query:{},params:{id:e.id,issueId:e.issueId},body:{}}),F3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{}}),L3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/${encodeURIComponent(e.versionId)}`,headers:{},query:{},params:{id:e.id,versionId:e.versionId},body:{}}),q3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions`,headers:{},query:{},params:{id:e.id},body:{name:e.name,description:e.description}}),B3=e=>({path:`/v1/admin/bots/${encodeURIComponent(e.id)}/versions/deploy`,headers:{},query:{},params:{id:e.id},body:{versionId:e.versionId}}),U3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/payment-method`,headers:{},query:{},params:{id:e.id},body:{stripePaymentMethodId:e.stripePaymentMethodId}}),z3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices`,headers:{},query:{},params:{id:e.id},body:{}}),Z3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/upcoming-invoice`,headers:{},query:{},params:{id:e.id},body:{}}),V3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/billing/invoices/charge-unpaid`,headers:{},query:{},params:{id:e.id},body:{invoiceIds:e.invoiceIds}}),H3=e=>({path:"/v1/admin/workspaces",headers:{},query:{},params:{},body:{name:e.name}}),W3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/public`,headers:{},query:{},params:{id:e.id},body:{}}),K3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),G3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),J3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/usages/by-bot`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Y3=e=>({path:"/v1/admin/workspaces/usages/quota-completion",headers:{},query:{},params:{},body:{}}),X3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quota`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),Q3=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/quotas`,headers:{},query:{period:e.period},params:{id:e.id},body:{}}),eB=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}}),tB=e=>({path:"/v1/admin/workspaces/handle-availability",headers:{},query:{},params:{},body:{handle:e.handle}}),rB=e=>({path:"/v1/admin/workspaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),nB=e=>({path:"/v1/admin/workspaces/public",headers:{},query:{nextToken:e.nextToken,workspaceIds:e.workspaceIds,search:e.search},params:{},body:{}}),oB=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),iB=e=>({path:`/v1/admin/workspaces/${encodeURIComponent(e.id)}/audit-records`,headers:{},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),aB=e=>({path:"/v1/admin/workspace-members",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),sB=e=>({path:"/v1/admin/workspace-members/me",headers:{},query:{},params:{},body:{}}),cB=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),lB=e=>({path:"/v1/admin/workspace-members",headers:{},query:{},params:{},body:{email:e.email,role:e.role}}),uB=e=>({path:`/v1/admin/workspace-members/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{role:e.role}}),dB=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{integrationId:e.integrationId},params:{},body:{}}),fB=e=>({path:"/v1/admin/integrations/iaks",headers:{},query:{},params:{},body:{integrationId:e.integrationId,note:e.note}}),pB=e=>({path:`/v1/admin/integrations/iaks/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),hB=e=>({path:"/v1/admin/integrations",headers:{},query:{},params:{},body:{name:e.name,version:e.version,configuration:e.configuration,configurations:e.configurations,states:e.states,events:e.events,actions:e.actions,entities:e.entities,identifier:e.identifier,channels:e.channels,user:e.user,interfaces:e.interfaces,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}}),mB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{configuration:e.configuration,configurations:e.configurations,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}}),yB=e=>({path:"/v1/admin/integrations",headers:{},query:{nextToken:e.nextToken,name:e.name,version:e.version,dev:e.dev},params:{},body:{}}),gB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),vB=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:{}}),bB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),wB=e=>({path:`/v1/admin/integrations/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),xB=e=>({path:"/v1/admin/integrations/request-verification",headers:{},query:{},params:{},body:{integrationId:e.integrationId}}),SB=e=>({path:"/v1/admin/interfaces",headers:{},query:{},params:{},body:{name:e.name,version:e.version,events:e.events,actions:e.actions,entities:e.entities}}),_B=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),EB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.name)}/${encodeURIComponent(e.version)}`,headers:{},query:{},params:{name:e.name,version:e.version},body:{}}),kB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{events:e.events,actions:e.actions,entities:e.entities}}),TB=e=>({path:`/v1/admin/interfaces/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),$B=e=>({path:"/v1/admin/interfaces",headers:{},query:{nextToken:e.nextToken},params:{},body:{}}),OB=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}`,headers:{},query:{type:e.type,period:e.period},params:{id:e.id},body:{}}),CB=e=>({path:"/v1/admin/usages/multiple",headers:{},query:{types:e.types,ids:e.ids,period:e.period},params:{},body:{}}),AB=e=>({path:`/v1/admin/usages/${encodeURIComponent(e.id)}/history`,headers:{},query:{type:e.type},params:{id:e.id},body:{}}),IB=e=>({path:"/v1/admin/quotas/ai-spend",headers:{},query:{},params:{},body:{monthlySpendingLimit:e.monthlySpendingLimit}}),RB=e=>({path:"/v1/admin/activities",headers:{},query:{nextToken:e.nextToken,taskId:e.taskId,botId:e.botId},params:{},body:{}}),PB=e=>({path:"/v1/admin/introspect",headers:{},query:{},params:{},body:{botId:e.botId}}),NB=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,publicContentImmediatelyAccessible:e.publicContentImmediatelyAccessible}}),MB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),jB=e=>({path:"/v1/files",headers:{},query:{nextToken:e.nextToken,tags:e.tags},params:{},body:{}}),DB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{}}),FB=e=>({path:`/v1/files/${encodeURIComponent(e.id)}`,headers:{},query:{},params:{id:e.id},body:{tags:e.tags,accessPolicies:e.accessPolicies,expiresAt:e.expiresAt}}),LB=e=>({path:"/v1/files/search",headers:{},query:{tags:e.tags,query:e.query,contextDepth:e.contextDepth,limit:e.limit,consolidate:e.consolidate,includeBreadcrumb:e.includeBreadcrumb},params:{},body:{}}),qB=e=>({path:`/v1/files/${encodeURIComponent(e.fileId)}/passages`,headers:{},query:{nextToken:e.nextToken,limit:e.limit},params:{fileId:e.fileId},body:{}}),BB=e=>({path:"/v1/tables",headers:{},query:{tags:e.tags},params:{},body:{}}),UB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),zB=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}}),ZB=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}}),VB=e=>({path:`/v1/tables/${encodeURIComponent(e.sourceTableId)}/duplicate`,headers:{},query:{},params:{sourceTableId:e.sourceTableId},body:{tableName:e.tableName,schemaOnly:e.schemaOnly,factor:e.factor}}),HB=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}}),WB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/column`,headers:{},query:{},params:{table:e.table},body:{name:e.name,newName:e.newName}}),KB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}`,headers:{},query:{},params:{table:e.table},body:{}}),GB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/row`,headers:{},query:{id:e.id},params:{table:e.table},body:{}}),JB=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}}),YB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),XB=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}}),QB=e=>({path:`/v1/tables/${encodeURIComponent(e.table)}/rows`,headers:{},query:{},params:{table:e.table},body:{rows:e.rows,waitComputed:e.waitComputed}}),eU=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}}),tU=class{constructor(t,r={}){k(this,"createConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Aq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Iq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listConversations",async t=>{let{path:r,headers:n,query:o,body:i}=Rq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Pq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Nq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteConversation",async t=>{let{path:r,headers:n,query:o,body:i}=Mq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listParticipants",async t=>{let{path:r,headers:n,query:o,body:i}=jq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"addParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Dq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Fq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"removeParticipant",async t=>{let{path:r,headers:n,query:o,body:i}=Lq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createEvent",async t=>{let{path:r,headers:n,query:o,body:i}=qq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getEvent",async t=>{let{path:r,headers:n,query:o,body:i}=Bq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listEvents",async t=>{let{path:r,headers:n,query:o,body:i}=Uq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createMessage",async t=>{let{path:r,headers:n,query:o,body:i}=zq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Zq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Vq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Hq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listMessages",async t=>{let{path:r,headers:n,query:o,body:i}=Wq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteMessage",async t=>{let{path:r,headers:n,query:o,body:i}=Kq(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createUser",async t=>{let{path:r,headers:n,query:o,body:i}=Gq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUser",async t=>{let{path:r,headers:n,query:o,body:i}=Jq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listUsers",async t=>{let{path:r,headers:n,query:o,body:i}=Yq(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateUser",async t=>{let{path:r,headers:n,query:o,body:i}=Xq(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateUser",async t=>{let{path:r,headers:n,query:o,body:i}=Qq(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteUser",async t=>{let{path:r,headers:n,query:o,body:i}=e3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setStateExpiry",async t=>{let{path:r,headers:n,query:o,body:i}=t3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getState",async t=>{let{path:r,headers:n,query:o,body:i}=r3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setState",async t=>{let{path:r,headers:n,query:o,body:i}=n3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrSetState",async t=>{let{path:r,headers:n,query:o,body:i}=o3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"patchState",async t=>{let{path:r,headers:n,query:o,body:i}=i3(t),a=(this.props.toAxiosRequest??re)({method:"patch",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"callAction",async t=>{let{path:r,headers:n,query:o,body:i}=a3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"configureIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=s3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTask",async t=>{let{path:r,headers:n,query:o,body:i}=c3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTask",async t=>{let{path:r,headers:n,query:o,body:i}=l3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTask",async t=>{let{path:r,headers:n,query:o,body:i}=u3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTask",async t=>{let{path:r,headers:n,query:o,body:i}=d3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listTasks",async t=>{let{path:r,headers:n,query:o,body:i}=f3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"trackAnalytics",async t=>{let{path:r,headers:n,query:o,body:i}=p3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"runVrl",async t=>{let{path:r,headers:n,query:o,body:i}=h3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAccount",async t=>{let{path:r,headers:n,query:o,body:i}=m3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateAccount",async t=>{let{path:r,headers:n,query:o,body:i}=y3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPersonalAccessTokens",async t=>{let{path:r,headers:n,query:o,body:i}=g3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createPersonalAccessToken",async t=>{let{path:r,headers:n,query:o,body:i}=v3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deletePersonalAccessToken",async t=>{let{path:r,headers:n,query:o,body:i}=b3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setAccountPreference",async t=>{let{path:r,headers:n,query:o,body:i}=w3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAccountPreference",async t=>{let{path:r,headers:n,query:o,body:i}=x3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPublicIntegrations",async t=>{let{path:r,headers:n,query:o,body:i}=S3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicIntegrationById",async t=>{let{path:r,headers:n,query:o,body:i}=_3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=E3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createBot",async t=>{let{path:r,headers:n,query:o,body:i}=k3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateBot",async t=>{let{path:r,headers:n,query:o,body:i}=T3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"transferBot",async t=>{let{path:r,headers:n,query:o,body:i}=$3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBots",async t=>{let{path:r,headers:n,query:o,body:i}=O3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBot",async t=>{let{path:r,headers:n,query:o,body:i}=C3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteBot",async t=>{let{path:r,headers:n,query:o,body:i}=A3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotLogs",async t=>{let{path:r,headers:n,query:o,body:i}=I3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotWebchat",async t=>{let{path:r,headers:n,query:o,body:i}=R3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotAnalytics",async t=>{let{path:r,headers:n,query:o,body:i}=P3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotIssue",async t=>{let{path:r,headers:n,query:o,body:i}=N3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotIssues",async t=>{let{path:r,headers:n,query:o,body:i}=M3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteBotIssue",async t=>{let{path:r,headers:n,query:o,body:i}=j3(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotIssueEvents",async t=>{let{path:r,headers:n,query:o,body:i}=D3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listBotVersions",async t=>{let{path:r,headers:n,query:o,body:i}=F3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=L3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=q3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deployBotVersion",async t=>{let{path:r,headers:n,query:o,body:i}=B3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"setWorkspacePaymentMethod",async t=>{let{path:r,headers:n,query:o,body:i}=U3(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceInvoices",async t=>{let{path:r,headers:n,query:o,body:i}=z3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUpcomingInvoice",async t=>{let{path:r,headers:n,query:o,body:i}=Z3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"chargeWorkspaceUnpaidInvoices",async t=>{let{path:r,headers:n,query:o,body:i}=V3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=H3(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getPublicWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=W3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=K3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceUsages",async t=>{let{path:r,headers:n,query:o,body:i}=G3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"breakDownWorkspaceUsageByBot",async t=>{let{path:r,headers:n,query:o,body:i}=J3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAllWorkspaceQuotaCompletion",async t=>{let{path:r,headers:n,query:o,body:i}=Y3(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspaceQuota",async t=>{let{path:r,headers:n,query:o,body:i}=X3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceQuotas",async t=>{let{path:r,headers:n,query:o,body:i}=Q3(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=eB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"checkHandleAvailability",async t=>{let{path:r,headers:n,query:o,body:i}=tB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaces",async t=>{let{path:r,headers:n,query:o,body:i}=rB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listPublicWorkspaces",async t=>{let{path:r,headers:n,query:o,body:i}=nB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteWorkspace",async t=>{let{path:r,headers:n,query:o,body:i}=oB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getAuditRecords",async t=>{let{path:r,headers:n,query:o,body:i}=iB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listWorkspaceMembers",async t=>{let{path:r,headers:n,query:o,body:i}=aB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=sB(),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=cB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=lB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateWorkspaceMember",async t=>{let{path:r,headers:n,query:o,body:i}=uB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listIntegrationApiKeys",async t=>{let{path:r,headers:n,query:o,body:i}=dB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createIntegrationApiKey",async t=>{let{path:r,headers:n,query:o,body:i}=fB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteIntegrationApiKey",async t=>{let{path:r,headers:n,query:o,body:i}=pB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=hB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=mB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listIntegrations",async t=>{let{path:r,headers:n,query:o,body:i}=yB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=gB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegrationLogs",async t=>{let{path:r,headers:n,query:o,body:i}=vB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getIntegrationByName",async t=>{let{path:r,headers:n,query:o,body:i}=bB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteIntegration",async t=>{let{path:r,headers:n,query:o,body:i}=wB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"requestIntegrationVerification",async t=>{let{path:r,headers:n,query:o,body:i}=xB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createInterface",async t=>{let{path:r,headers:n,query:o,body:i}=SB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getInterface",async t=>{let{path:r,headers:n,query:o,body:i}=_B(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getInterfaceByName",async t=>{let{path:r,headers:n,query:o,body:i}=EB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateInterface",async t=>{let{path:r,headers:n,query:o,body:i}=kB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteInterface",async t=>{let{path:r,headers:n,query:o,body:i}=TB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listInterfaces",async t=>{let{path:r,headers:n,query:o,body:i}=$B(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getUsage",async t=>{let{path:r,headers:n,query:o,body:i}=OB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getMultipleUsages",async t=>{let{path:r,headers:n,query:o,body:i}=CB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listUsageHistory",async t=>{let{path:r,headers:n,query:o,body:i}=AB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"changeAISpendQuota",async t=>{let{path:r,headers:n,query:o,body:i}=IB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listActivities",async t=>{let{path:r,headers:n,query:o,body:i}=RB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"introspect",async t=>{let{path:r,headers:n,query:o,body:i}=PB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"upsertFile",async t=>{let{path:r,headers:n,query:o,body:i}=NB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteFile",async t=>{let{path:r,headers:n,query:o,body:i}=MB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listFiles",async t=>{let{path:r,headers:n,query:o,body:i}=jB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getFile",async t=>{let{path:r,headers:n,query:o,body:i}=DB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateFileMetadata",async t=>{let{path:r,headers:n,query:o,body:i}=FB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"searchFiles",async t=>{let{path:r,headers:n,query:o,body:i}=LB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listFilePassages",async t=>{let{path:r,headers:n,query:o,body:i}=qB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"listTables",async t=>{let{path:r,headers:n,query:o,body:i}=BB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTable",async t=>{let{path:r,headers:n,query:o,body:i}=UB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getOrCreateTable",async t=>{let{path:r,headers:n,query:o,body:i}=zB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTable",async t=>{let{path:r,headers:n,query:o,body:i}=ZB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"duplicateTable",async t=>{let{path:r,headers:n,query:o,body:i}=VB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTable",async t=>{let{path:r,headers:n,query:o,body:i}=HB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"renameTableColumn",async t=>{let{path:r,headers:n,query:o,body:i}=WB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTable",async t=>{let{path:r,headers:n,query:o,body:i}=KB(t),a=(this.props.toAxiosRequest??re)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"getTableRow",async t=>{let{path:r,headers:n,query:o,body:i}=GB(t),a=(this.props.toAxiosRequest??re)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"findTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=JB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"createTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=YB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"deleteTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=XB(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"updateTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=QB(t),a=(this.props.toAxiosRequest??re)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});k(this,"upsertTableRows",async t=>{let{path:r,headers:n,query:o,body:i}=eU(t),a=(this.props.toAxiosRequest??re)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(a).then(s=>s.data).catch(s=>{throw ne(s)})});this.axiosInstance=t,this.props=r}};function ne(e){var t;return qa.isAxiosError(e)&&((t=e.response)!=null&&t.data)?Hm(e.response.data):Hm(e)}var Fr=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}},rU=class{constructor(e){k(this,"conversations",e=>new Fr(({nextToken:t})=>this._client.listConversations({nextToken:t,...e}).then(r=>({...r,items:r.conversations}))));k(this,"participants",e=>new Fr(({nextToken:t})=>this._client.listParticipants({nextToken:t,...e}).then(r=>({...r,items:r.participants}))));k(this,"events",e=>new Fr(({nextToken:t})=>this._client.listEvents({nextToken:t,...e}).then(r=>({...r,items:r.events}))));k(this,"messages",e=>new Fr(({nextToken:t})=>this._client.listMessages({nextToken:t,...e}).then(r=>({...r,items:r.messages}))));k(this,"users",e=>new Fr(({nextToken:t})=>this._client.listUsers({nextToken:t,...e}).then(r=>({...r,items:r.users}))));k(this,"tasks",e=>new Fr(({nextToken:t})=>this._client.listTasks({nextToken:t,...e}).then(r=>({...r,items:r.tasks}))));k(this,"publicIntegrations",e=>new Fr(({nextToken:t})=>this._client.listPublicIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"bots",e=>new Fr(({nextToken:t})=>this._client.listBots({nextToken:t,...e}).then(r=>({...r,items:r.bots}))));k(this,"botIssues",e=>new Fr(({nextToken:t})=>this._client.listBotIssues({nextToken:t,...e}).then(r=>({...r,items:r.issues}))));k(this,"workspaces",e=>new Fr(({nextToken:t})=>this._client.listWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"publicWorkspaces",e=>new Fr(({nextToken:t})=>this._client.listPublicWorkspaces({nextToken:t,...e}).then(r=>({...r,items:r.workspaces}))));k(this,"workspaceMembers",e=>new Fr(({nextToken:t})=>this._client.listWorkspaceMembers({nextToken:t,...e}).then(r=>({...r,items:r.members}))));k(this,"integrations",e=>new Fr(({nextToken:t})=>this._client.listIntegrations({nextToken:t,...e}).then(r=>({...r,items:r.integrations}))));k(this,"interfaces",e=>new Fr(({nextToken:t})=>this._client.listInterfaces({nextToken:t,...e}).then(r=>({...r,items:r.interfaces}))));k(this,"activities",e=>new Fr(({nextToken:t})=>this._client.listActivities({nextToken:t,...e}).then(r=>({...r,items:r.activities}))));k(this,"files",e=>new Fr(({nextToken:t})=>this._client.listFiles({nextToken:t,...e}).then(r=>({...r,items:r.files}))));k(this,"filePassages",e=>new Fr(({nextToken:t})=>this._client.listFilePassages({nextToken:t,...e}).then(r=>({...r,items:r.passages}))));this._client=e}},O1=100*1024*1024,nU=O1,oU=O1,iU=class extends tU{constructor(t={}){let r=kq(t),{apiUrl:n,headers:o,withCredentials:i,timeout:a}=r,s=qa.create({baseURL:n,headers:o,withCredentials:i,timeout:a,maxBodyLength:nU,maxContentLength:oU,httpAgent:Dm?new yq.default.Agent({keepAlive:!0}):void 0,httpsAgent:Dm?new gq.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,publicContentImmediatelyAccessible:l})=>{if(s&&a)throw new Za("Cannot provide both content and URL, please provide only one of them");if(s&&(a=await qa.get(s,{responseType:"arraybuffer"}).then(h=>h.data).catch(h=>{throw new Za(`Failed to download file from provided URL: ${h.message}`,h)})),!a)throw new Za("No content was provided for the file");let u,d;if(typeof a=="string"){let h=new TextEncoder().encode(a);u=h,d=h.byteLength}else if(a instanceof Uint8Array)u=a,d=u.byteLength;else if(a instanceof ArrayBuffer)u=a,d=u.byteLength;else if(a instanceof Blob)u=a,d=a.size;else throw new Za("The provided content is not supported");let{file:p}=await this.upsertFile({key:t,tags:n,index:r,accessPolicies:i,contentType:o,size:d,expiresAt:c,publicContentImmediatelyAccessible:l}),f={"Content-Type":p.contentType};l&&(f["x-amz-tagging"]="public=true");try{await qa.put(p.uploadUrl,u,{maxBodyLength:1/0,headers:f})}catch(h){throw new Za(`Failed to upload file: ${h.message}`,h,p)}return{file:{...p,size:d}}});t.retry&&n1(s,t.retry),this.config=r}get list(){return new rU(this)}};const jd=Hh(Object.freeze(Object.defineProperty({__proto__:null,AlreadyExistsError:S1,BreakingChangesError:$1,Client:iU,ForbiddenError:s1,InternalError:i1,InvalidDataFormatError:h1,InvalidIdentifierError:m1,InvalidJsonSchemaError:p1,InvalidPayloadError:l1,InvalidQueryError:w1,LimitExceededError:T1,MethodNotFoundError:d1,PayloadTooLargeError:c1,PaymentRequiredError:E1,QuotaExceededError:k1,RateLimitedError:_1,ReferenceConstraintError:g1,ReferenceNotFoundError:b1,RelationConflictError:y1,ResourceLockedConflictError:v1,ResourceNotFoundError:f1,RuntimeError:x1,UnauthorizedError:a1,UnknownError:za,UnsupportedMediaTypeError:u1,UploadFileError:Za,axios:wL,axiosRetry:J_,errorFrom:Hm,isApiError:o1},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=(_,se)=>{for(var Te in se)r(_,Te,{get:se[Te],enumerable:!0})},c=(_,se,Te,Fe)=>{if(se&&typeof se=="object"||typeof se=="function")for(let Le of o(se))!a.call(_,Le)&&Le!==Te&&r(_,Le,{get:()=>se[Le],enumerable:!(Fe=n(se,Le))||Fe.enumerable});return _},l=(_,se,Te)=>(c(_,se,"default"),Te&&c(Te,se,"default")),u=(_,se,Te)=>(Te=_!=null?t(i(_)):{},c(se||!_||!_.__esModule?r(Te,"default",{value:_,enumerable:!0}):Te,_)),d=_=>c(r({},"__esModule",{value:!0}),_),p={};s(p,{Bot:()=>USe,BotSpecificClient:()=>vD,Integration:()=>cr,IntegrationDefinition:()=>we,IntegrationSpecificClient:()=>Ze,InterfaceDeclaration:()=>fe,RuntimeError:()=>gD.RuntimeError,botIdHeader:()=>E,botUserIdHeader:()=>B,configurationHeader:()=>pe,configurationTypeHeader:()=>ce,integrationIdHeader:()=>Q,interfaces:()=>L,isApiError:()=>gD.isApiError,messages:()=>f,operationHeader:()=>he,parseBody:()=>je,serve:()=>ut,typeHeader:()=>be,webhookIdHeader:()=>T}),e.exports=d(p);var f={};s(f,{defaults:()=>Z});var h={};s(h,{default:()=>m});var y=pu;l(h,pu);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}),$=h.z.object({fileUrl:g,title:g.optional()}),R=h.z.object({latitude:h.z.number(),longitude:h.z.number(),address:h.z.string().optional(),title:h.z.string().optional()}),N=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}))}),D=h.z.object({items:h.z.array(N)}),H=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:$}),h.z.object({type:h.z.literal("location"),payload:R})]),U=h.z.object({items:h.z.array(H)}),Z={text:{schema:v},markdown:{schema:b},image:{schema:x},audio:{schema:w},video:{schema:S},file:{schema:$},location:{schema:R},carousel:{schema:D},card:{schema:N},dropdown:{schema:A},choice:{schema:A},bloc:{schema:U}},L={};s(L,{creatable:()=>qi,deletable:()=>OSe,hitl:()=>tr,listable:()=>bn,llm:()=>j,readable:()=>Uh,schemas:()=>q,speechToText:()=>Ft,textToImage:()=>ISe,typingIndicator:()=>RSe,updatable:()=>io});var q={};s(q,{speechToText:()=>W});var W={};s(W,{OpenAITranscribeAudioOutputSchema:()=>J});var J=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.")}))}),M=pu,E="x-bot-id",B="x-bot-user-id",Q="x-integration-id",T="x-webhook-id",ce="x-bp-configuration-type",pe="x-bp-configuration",he="x-bp-operation",be="x-bp-type",Ee=M.z.enum(["webhook_received","message_created","action_triggered","register","unregister","ping","create_user","create_conversation"]),_e=_=>{let se=_[E],Te=_[B],Fe=_[Q],Le=_[T],qe=_[ce],Be=_[pe],at=Ee.parse(_[he]);if(!se)throw new Error("Missing bot headers");if(!Te)throw new Error("Missing bot user headers");if(!Fe)throw new Error("Missing integration headers");if(!Le)throw new Error("Missing webhook headers");if(!Be)throw new Error("Missing configuration headers");if(!at)throw new Error("Missing operation headers");return{botId:se,botUserId:Te,integrationId:Fe,webhookId:Le,operation:at,configurationType:qe??null,configuration:Be?JSON.parse(Buffer.from(Be,"base64").toString("utf-8")):{}}},ye=_=>Array.from(new Set(_)),le=_=>Object.entries(_),te=(_,se)=>Object.fromEntries(le(_).map(([Te,Fe])=>[Te,se(Fe,Te)])),ve=(_,se,Te)=>{let Fe=ye([...Object.keys(_),...Object.keys(se)]),Le={};for(let qe of Fe){let Be=_[qe],at=se[qe];Be&&at?Le[qe]=Te(Be,at):Be?Le[qe]=Be:at&&(Le[qe]=at)}return Le},Ce=Symbol("schemaName"),Ue=_=>_?te(_,(se,Te)=>({...se,[Ce]:Te})):{},F=_=>_[Ce]!==void 0,ue=_=>_[Ce],we=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,"configurations");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",(_,se)=>({..._,...se,input:{schema:_.input.schema.merge(se.input.schema)},output:{schema:_.output.schema.merge(se.output.schema)}}));k(this,"_mergeEvents",(_,se)=>({..._,...se,schema:_.schema.merge(se.schema)}));k(this,"_mergeChannels",(_,se)=>{let Te=ve(_.messages,se.messages,this._mergeMessage);return{..._,...se,messages:Te}});k(this,"_mergeMessage",(_,se)=>({schema:_.schema.merge(se.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.configurations=_.configurations,this.events=_.events,this.actions=_.actions,this.channels=_.channels,this.states=_.states,this.user=_.user,this.secrets=_.secrets,this.entities=_.entities}clone(_){let se=new we({...this,..._});for(let[Te,Fe]of Object.entries(this.interfaces))se.interfaces[Te]=Fe;return se}extend(_,se){let Te=se(Ue(this.entities)),Fe=le(Te).find(([wn,Qs])=>!F(Qs));if(Fe)throw new Error(`Cannot extend interface "${_.name}" with entity "${Fe[0]}"; the provided schema is not part of the integration's entities.`);let Le=te(Te,wn=>({name:ue(wn),schema:wn.schema})),{resolved:qe,implementStatement:Be}=_.resolve({entities:Le}),at=this;at.actions=ve(at.actions??{},qe.actions,this._mergeActions),at.channels=ve(at.channels??{},qe.channels,this._mergeChannels),at.events=ve(at.events??{},qe.events,this._mergeEvents);let Cr=Object.values(Le).map(wn=>wn.name),Zr=Cr.length===0?_.name:`${_.name}<${Cr.join(",")}>`;return this.interfaces[Zr]=Be,this}},fe=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:se}=_,Te={name:this.name,version:this.version,entities:te(se,Be=>({name:Be.name})),actions:{},events:{}},Fe={},Le={},qe={};for(let[Be,at]of le(this.actions)){let Cr=this._dereference(at.input.schema,se),Zr=this._dereference(at.output.schema,se),wn=this._rename(se,Be);Fe[wn]={...at,input:{schema:Cr},output:{schema:Zr}},Te.actions[Be]={name:wn}}for(let[Be,at]of le(this.events)){let Cr=this._dereference(at.schema,se),Zr=this._rename(se,Be);Le[Zr]={...at,schema:Cr},Te.events[Be]={name:Zr}}for(let[Be,at]of le(this.channels)){let Cr={};for(let[Zr,wn]of le(at.messages)){let Qs=this._dereference(wn.schema,se);Cr[Zr]={...wn,schema:Qs}}qe[Be]={...at,messages:Cr}}return{resolved:{actions:Fe,events:Le,channels:qe},implementStatement:Te}}_dereference(_,se){let Te={},Fe={};for(let[Le,qe]of le(se))Te[Le]=qe.schema,Fe[Le]=m.ref(Le);return _(Fe).dereference(Te)}_rename(_,se){if(!this.templateName)return se;let Te=te(_,Fe=>Fe.name);return this.templateName(se,Te)}},De=bm,Ie=console;function je(_){if(!_.body)throw new Error("Missing body");return JSON.parse(_.body)}async function ut(_,se=8072,Te=X){let Fe=(0,De.createServer)(async(Le,qe)=>{try{let Be=await We(Le);if(Be.path==="/health"){qe.writeHead(200).end("ok");return}let at=await _(Be);qe.writeHead((at==null?void 0:at.status)??200,(at==null?void 0:at.headers)??{}).end((at==null?void 0:at.body)??"{}")}catch(Be){Ie.error("Error while handling request",{error:(Be==null?void 0:Be.message)??"Internal error occured"}),qe.writeHead(500).end(JSON.stringify({error:(Be==null?void 0:Be.message)??"Internal error occured"}))}});return Fe.listen(se,()=>Te(se)),Fe}async function We(_){var Le;let se=await ae(_),Te={};for(let qe=0;qe<_.rawHeaders.length;qe+=2){let Be=_.rawHeaders[qe].toLowerCase(),at=_.rawHeaders[qe+1];Te[Be]=at}let Fe=new URL(_.url??"",_.headers.host?`http://${_.headers.host}`:"http://botpress.cloud");return{body:se,path:Fe.pathname,query:K(Fe.search,"?"),headers:Te,method:((Le=_.method)==null?void 0:Le.toUpperCase())??"GET"}}function K(_,se){return _.indexOf(se)===0?_.slice(se.length):_}async function ae(_){return new Promise((se,Te)=>{if(_.method!=="POST"&&_.method!=="PUT"&&_.method!=="PATCH")return se(void 0);let Fe="";_.on("data",Le=>Fe+=Le.toString()),_.on("error",Le=>Te(Le)),_.on("end",()=>se(Fe))})}function X(_){Ie.info(`Listening on port ${_}`)}var me=jd,Oe=jd,tt={retries:3,retryCondition:_=>{var se;return Oe.axiosRetry.isNetworkOrIdempotentRequestError(_)||[429,502].includes(((se=_.response)==null?void 0:se.status)??0)},retryDelay:_=>_*1e3},Ze=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=_}},ht=u(bm),Tt=_=>{if(process.env.BP_LOG_FORMAT==="json")return JSON.stringify({msg:ht.default.format(..._),visible_to_bot_owner:!0});{let[se,...Te]=_;return ht.default.format(`[For Bot Owner] ${se}`,...Te)}},Vt={forBot:()=>({info:(..._)=>{console.info(Tt(_))},warn:(..._)=>{console.warn(Tt(_))},error:(..._)=>{console.error(Tt(_))},debug:(..._)=>{console.debug(Tt(_))}})},z=_=>async se=>{let Te=_e(se.headers),Fe=new me.Client({botId:Te.botId,integrationId:Te.integrationId,retry:tt}),Le=new Ze(Fe),qe={ctx:Te,req:se,client:Le,logger:Vt,instance:_};try{let Be;switch(Te.operation){case"webhook_received":Be=await ze(qe);break;case"register":Be=await Ke(qe);break;case"unregister":Be=await gt(qe);break;case"message_created":Be=await $r(qe);break;case"action_triggered":Be=await Yt(qe);break;case"ping":Be=await G(qe);break;case"create_user":Be=await Ge(qe);break;case"create_conversation":Be=await sr(qe);break;default:throw new Error(`Unknown operation ${Te.operation}`)}return Be?{...Be,status:Be.status??200}:{status:200}}catch(Be){if((0,me.isApiError)(Be)){let Cr=new me.RuntimeError(Be.message,Be);return Vt.forBot().error(Cr.message),{status:Cr.code,body:JSON.stringify(Cr.toJSON())}}console.error(Be);let at=new me.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 Vt.forBot().error(at.message),{status:at.code,body:JSON.stringify(at.toJSON())}}},G=async _=>{},ze=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{let{req:qe}=je(Te);return Le.webhook({client:_,ctx:se,req:qe,logger:Fe})},Ke=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.register)return;let{webhookUrl:qe}=je(Te);await Le.register({client:_,ctx:se,webhookUrl:qe,logger:Fe})},gt=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.unregister)return;let{webhookUrl:qe}=je(Te);await Le.unregister({ctx:se,webhookUrl:qe,client:_,logger:Fe})},Ge=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.createUser)return;let{tags:qe}=je(Te);return await Le.createUser({ctx:se,client:_,tags:qe,logger:Fe})},sr=async({client:_,ctx:se,req:Te,logger:Fe,instance:Le})=>{if(!Le.createConversation)return;let{channel:qe,tags:Be}=je(Te);return await Le.createConversation({ctx:se,client:_,channel:qe,tags:Be,logger:Fe})},$r=async({ctx:_,req:se,client:Te,logger:Fe,instance:Le})=>{let{conversation:qe,user:Be,type:at,payload:Cr,message:Zr}=je(se),wn=Le.channels[qe.channel];if(!wn)throw new Error(`Channel ${qe.channel} not found`);let Qs=wn.messages[at];if(!Qs)throw new Error(`Message of type ${at} not found in channel ${qe.channel}`);await Qs({ctx:_,conversation:qe,message:Zr,user:Be,type:at,client:Te,payload:Cr,ack:async({tags:zSe})=>{await Te.updateMessage({id:Zr.id,tags:zSe})},logger:Fe})},Yt=async({req:_,ctx:se,client:Te,logger:Fe,instance:Le})=>{let{input:qe,type:Be}=je(_);if(!Be)throw new Error("Missing action type");let at=Le.actions[Be];if(!at)throw new Error(`Action ${Be} not found`);let Cr=await at({ctx:se,input:qe,client:Te,type:Be,logger:Fe});return{body:JSON.stringify({output:Cr})}},cr=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",z(this));k(this,"start",_=>ut(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}},ln=_=>({..._,schema:()=>_.schema.extend({userId:m.string().optional().describe("Allows sending a message pretending to be a certain user")})}),vt=m.union([m.object({type:m.literal("user"),userId:m.string()}),m.object({type:m.literal("bot")})]),bt=Object.entries(Z).map(([_,se])=>m.object({source:vt,type:m.literal(_),payload:se.schema})),er=m.union(bt),tr=new fe({name:"hitl",version:"0.4.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(),messageHistory:m.array(er).optional().describe("Message history to display in the HITL session")})},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:ln(Z.text)}}}}),lr=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.")})}),Gt=m.object({type:m.enum(["auto","specific","any","none",""]).optional(),functionName:m.string().optional().describe('Required if `type` is "specific"')}),Or=m.object({role:m.enum(["user","assistant"]),type:m.enum(["text","tool_calls","tool_result","multipart"]).default("text"),toolCalls:m.array(lr).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.')}),vr=m.object({id:m.string()}),vn=vr.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")})}),Li=_=>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(Or).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:Gt.optional(),userId:m.string().optional(),debug:m.boolean().optional().describe("Set to `true` to output debug information to the bot logs")});Li(vr);var Xs=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(Or.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")}),botpress:m.object({cost:m.number().describe("Total cost of the content generation, in U.S. dollars")})}),j=new fe({name:"llm",version:"5.0.0",entities:{modelRef:{schema:vr}},events:{},actions:{generateContent:{billable:!0,cacheable:!0,input:{schema:({modelRef:_})=>Li(_)},output:{schema:()=>Xs}},listLanguageModels:{input:{schema:()=>m.object({})},output:{schema:({modelRef:_})=>m.object({models:m.array(m.intersection(vn,_))})}}}}),ge=m.object({id:m.string()}),Ae=ge.extend({name:m.string(),costPerMinute:m.number().describe("Cost per minute of speech transcription, in U.S. dollars")}),Ye=_=>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.")});Ye(ge);var $t=J.extend({model:m.string().describe("Model name used"),cost:m.number().describe("Total cost of the transcription, in U.S. dollars (DEPRECATED)"),botpress:m.object({cost:m.number().describe("Total cost of the transcription, in U.S. dollars")})}),Ft=new fe({name:"speechToText",version:"2.0.0",entities:{speechToTextModelRef:{schema:ge}},actions:{transcribeAudio:{billable:!0,cacheable:!0,input:{schema:({speechToTextModelRef:_})=>Ye(_)},output:{schema:()=>$t}},listSpeechToTextModels:{input:{schema:()=>m.object({})},output:{schema:({speechToTextModelRef:_})=>m.object({models:m.array(m.intersection(Ae,_))})}}}}),it=m.object({id:m.string()}),nt=_=>m.intersection(_,it),ur=_=>_[0].toUpperCase()+_.slice(1),zt=(..._)=>{let[se,...Te]=_.filter(Fe=>Fe.length>0).map(Fe=>Fe.toLowerCase());return se?[se,...Te.map(ur)].join(""):""},Xt=m.string().optional(),bn=new fe({name:"listable",version:"0.0.1",entities:{item:{schema:it}},events:{},actions:{list:{input:{schema:()=>m.object({nextToken:Xt})},output:{schema:_=>m.object({items:m.array(nt(_.item)),meta:m.object({nextToken:Xt})})}}},templateName:(_,se)=>zt(se.item,_)}),qi=new fe({name:"creatable",version:"0.0.1",entities:{item:{schema:it}},events:{created:{schema:_=>m.object({item:nt(_.item)})}},actions:{create:{input:{schema:_=>m.object({item:_.item})},output:{schema:_=>m.object({item:nt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),Uh=new fe({name:"readable",version:"0.0.1",entities:{item:{schema:it}},events:{},actions:{read:{input:{schema:()=>it},output:{schema:_=>m.object({item:nt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),io=new fe({name:"updatable",version:"0.0.1",entities:{item:{schema:it}},events:{updated:{schema:_=>m.object({item:nt(_.item)})}},actions:{update:{input:{schema:_=>it.extend({item:_.item})},output:{schema:_=>m.object({item:nt(_.item)})}}},templateName:(_,se)=>zt(se.item,_)}),OSe=new fe({name:"deletable",version:"0.0.1",entities:{item:{schema:it}},events:{deleted:{schema:()=>it}},actions:{delete:{input:{schema:()=>it},output:{schema:()=>m.object({})}}},templateName:(_,se)=>zt(se.item,_)}),A0=m.object({id:m.string()}),CSe=A0.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")}),mD=m.object({}).describe("Model-specific parameters for image generation"),yD=(_,se)=>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:se.optional()});yD(A0,mD);var ASe=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 (DEPRECATED)"),botpress:m.object({cost:m.number().describe("Cost of the image generation, in U.S. dollars")})}),ISe=new fe({name:"textToImage",version:"2.1.0",entities:{imageModelRef:{schema:A0},imageGenerationParams:{schema:mD}},actions:{generateImage:{billable:!0,cacheable:!0,input:{schema:({imageModelRef:_,imageGenerationParams:se})=>yD(_,se)},output:{schema:()=>ASe}},listImageModels:{input:{schema:()=>m.object({})},output:{schema:({imageModelRef:_})=>m.object({models:m.array(m.intersection(CSe,_))})}}}}),RSe=new fe({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 gD=jd,PSe=u(jd),vD=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(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"setState",_=>this._client.setState(_).then(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"getOrSetState",_=>this._client.getOrSetState(_).then(se=>({state:{...se.state,payload:se.state.payload}})));k(this,"patchState",_=>this._client.patchState(_).then(se=>({state:{...se.state,payload:se.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=_}},NSe=pu,MSe=NSe.z.enum(["event_received","register","unregister","ping","action_triggered"]),jSe=_=>{let se=_[E],Te=_[pe],Fe=_[be],Le=MSe.parse(_[he]);if(!se)throw new Error("Missing bot headers");if(!Fe)throw new Error("Missing type headers");if(!Te)throw new Error("Missing configuration headers");if(!Le)throw new Error("Missing operation headers");return{botId:se,operation:Le,type:Fe,configuration:Te?JSON.parse(Buffer.from(Te,"base64").toString("utf-8")):{}}},DSe=_=>async se=>{let Te=jSe(se.headers);Te.operation!=="ping"&&Ie.info(`Received ${Te.operation} operation for bot ${Te.botId} of type ${Te.type}`);let Fe=new PSe.Client({botId:Te.botId,retry:tt}),Le=new vD(Fe),qe={req:se,ctx:Te,client:Le,instance:_};switch(Te.operation){case"action_triggered":throw new Error(`Operation ${Te.operation} not supported yet`);case"event_received":await BSe(qe);break;case"register":await LSe();break;case"unregister":await qSe();break;case"ping":await FSe();break;default:throw new Error(`Unknown operation ${Te.operation}`)}return{status:200}},FSe=async _=>{},LSe=async _=>{},qSe=async _=>{},BSe=async({ctx:_,req:se,client:Te,instance:Fe})=>{Ie.debug(`Received event ${_.type}`);let Le=je(se),qe=Le.event;switch(_.type){case"message_created":let Be={user:qe.payload.user,conversation:qe.payload.conversation,message:qe.payload.message,states:qe.payload.states,event:qe};await Promise.all(Fe.messageHandlers.map(Zr=>Zr({client:Te,ctx:_,...Be})));break;case"state_expired":let at={state:qe.payload.state};await Promise.all(Fe.stateExpiredHandlers.map(Zr=>Zr({client:Te,ctx:_,...at})));break;default:let Cr={event:Le.event};await Promise.all(Fe.eventHandlers.map(Zr=>Zr({client:Te,ctx:_,...Cr})))}},USe=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",DSe(this._state));k(this,"start",_=>ut(this.handler,_));this.props=_}}})(F0);var ie=F0.exports;const{defaults:co}=ie.messages,Vn={className:ie.z.string().describe("CSS className to apply to the message").optional()},C1=co.audio.schema.extend({...Vn,type:ie.z.literal("audio")}),Wm=co.card.schema.extend({type:ie.z.literal("card"),subtitle:ie.z.string().optional(),imageUrl:ie.z.string().optional(),...Vn}),aU=Wm.omit({type:!0}),A1=ie.z.object({items:ie.z.array(aU),...Vn,type:ie.z.literal("carousel")}),I1=co.choice.schema.extend({text:ie.z.string(),...Vn,type:ie.z.literal("choice"),disableFreeText:ie.z.boolean().optional()}),R1=co.dropdown.schema.extend({text:ie.z.string(),...Vn,type:ie.z.literal("dropdown")}),P1=co.file.schema.extend({...Vn,type:ie.z.literal("file")}),N1=co.image.schema.extend({...Vn,type:ie.z.literal("image")}),M1=co.location.schema.extend({...Vn,type:ie.z.literal("location")}),j1=co.markdown.schema.extend({...Vn,type:ie.z.literal("markdown")}),D1=co.text.schema.extend({...Vn,type:ie.z.literal("text")}),F1=co.video.schema.extend({...Vn,type:ie.z.literal("video")}),L1=ie.z.union([C1,Wm,A1,I1,R1,P1,N1,M1,j1,D1,F1]),q1=ie.z.object({type:ie.z.literal("webchat_visibility"),data:ie.z.object({visibility:ie.z.union([ie.z.literal("show"),ie.z.literal("hide"),ie.z.literal("toggle")])})}),B1=ie.z.object({type:ie.z.literal("webchat_config"),data:ie.z.object({config:ie.z.record(ie.z.any())})}),U1=ie.z.object({type:ie.z.literal("custom"),data:ie.z.object({event:ie.z.record(ie.z.any())})}),z1=ie.z.union([q1,B1,U1]),sU=z1,cU=ie.z.object({type:ie.z.literal("message_created"),data:L1}),Z1=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:C1,cardSchema:Wm,carouselSchema:A1,choiceSchema:I1,customSchema:U1,dropdownSchema:R1,fileSchema:P1,imageSchema:N1,locationSchema:M1,markdownSchema:j1,messageCreatedSchema:cU,messageSchema:L1,textSchema:D1,triggerSchema:z1,triggerSignalSchema:sU,videoSchema:F1,webchatConfigSchema:B1,webchatVisibilitySchema:q1},Symbol.toStringTag,{value:"Module"})),lo=ie.z.object({className:ie.z.string().optional(),avatarUrl:ie.z.string().url().optional()}),V1=lo.extend({type:ie.z.literal("audio"),audio:ie.z.string(),title:ie.z.string().optional()}),lU=ie.z.union([ie.z.object({title:ie.z.string(),action:ie.z.literal("Say something"),text:ie.z.string()}),ie.z.object({title:ie.z.string(),action:ie.z.literal("Open URL"),url:ie.z.string()}),ie.z.object({title:ie.z.string(),action:ie.z.literal("Postback"),payload:ie.z.string()})]),Km=lo.extend({type:ie.z.literal("card"),title:ie.z.string(),subtitle:ie.z.string().optional(),image:ie.z.string().optional(),actions:ie.z.array(lU)}),H1=lo.extend({type:ie.z.literal("carousel"),items:ie.z.array(Km)}),W1=lo.extend({type:ie.z.literal("dropdown"),message:ie.z.string().optional(),options:ie.z.array(ie.z.object({label:ie.z.string(),value:ie.z.string()})),allowCreation:ie.z.boolean().optional(),placeholderText:ie.z.string().optional(),allowMultiple:ie.z.boolean().optional(),buttonText:ie.z.string().optional(),width:ie.z.number().optional(),displayInKeyboard:ie.z.boolean().optional(),markdown:ie.z.boolean().optional(),text:ie.z.string().optional()}),K1=lo.extend({type:ie.z.literal("file"),file:ie.z.string(),title:ie.z.string().optional()}),G1=lo.extend({type:ie.z.literal("image"),image:ie.z.string()}),J1=lo.extend({type:ie.z.literal("location"),latitude:ie.z.number(),longitude:ie.z.number(),address:ie.z.string().optional(),title:ie.z.string().optional()}),Y1=lo.extend({type:ie.z.literal("single-choice"),text:ie.z.string(),disableFreeText:ie.z.boolean().optional(),choices:ie.z.array(ie.z.object({title:ie.z.string(),value:ie.z.string()}))}),X1=lo.extend({type:ie.z.literal("text"),text:ie.z.string(),markdown:ie.z.boolean().optional()}),Q1=lo.extend({type:ie.z.literal("video"),video:ie.z.string(),title:ie.z.string().optional()}),eE=ie.z.object({type:ie.z.literal("quick_reply"),text:ie.z.string(),payload:ie.z.string().optional()}),Dd=ie.z.union([V1,Km,H1,W1,K1,G1,J1,Y1,X1,Q1,eE]),tE=ie.z.object({type:ie.z.literal("webchat-visibility"),visibility:ie.z.union([ie.z.literal("show"),ie.z.literal("hide"),ie.z.literal("toggle")])}),rE=ie.z.object({type:ie.z.literal("webchat-config"),config:ie.z.record(ie.z.any())}),nE=ie.z.object({type:ie.z.literal("custom-event"),event:ie.z.record(ie.z.any())}),oE=ie.z.union([tE,rE,nE]),uU=ie.z.object({type:ie.z.literal("trigger"),trigger:oE}),iE=Object.freeze(Object.defineProperty({__proto__:null,audioSchema:V1,cardSchema:Km,carouselSchame:H1,customEventSchema:nE,dropdownSchema:W1,fileSchema:K1,imageSchema:G1,locationSchema:J1,messageSchema:Dd,messageSignalSchema:Dd,quickReplySchema:eE,singleChoiceSchema:Y1,textSchema:X1,triggerSchema:oE,triggerSignalSchema:uU,videoSchema:Q1,webchatConfigSchema:rE,webchatVisibilitySchema:tE},Symbol.toStringTag,{value:"Module"})),aE=e=>({type:"card",title:e.title,subtitle:e.subtitle,image:e.imageUrl,actions:e.actions.map(dU)}),dU=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}`)}},sE=e=>({...e,type:"audio",audio:e.audioUrl}),cE=e=>aE(e),lE=e=>({...e,type:"carousel",items:e.items.map(aE)}),uE=e=>({...e,type:"single-choice",text:e.text,choices:e.options.map(t=>({title:t.label,value:t.value})),disableFreeText:e.disableFreeText}),dE=e=>({...e,type:"dropdown",message:e.text,options:e.options.map(t=>({label:t.label,value:t.value}))}),fE=e=>({...e,type:"file",file:e.fileUrl,title:e.title}),pE=e=>({...e,type:"image",image:e.imageUrl}),hE=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),mE=e=>({...e,type:"text",text:e.markdown,markdown:!0}),yE=e=>({...e,type:"text",text:e.text,markdown:!0}),gE=e=>({...e,type:"video",video:e.videoUrl}),fU=e=>{switch(e.type){case"audio":return sE(e);case"card":return cE(e);case"carousel":return lE(e);case"choice":return uE(e);case"dropdown":return dE(e);case"file":return fE(e);case"image":return pE(e);case"location":return hE(e);case"markdown":return mE(e);case"text":return yE(e);case"video":return gE(e);default:throw new Error("Unsuported message type")}},vE=e=>({type:"webchat-visibility",visibility:e.data.visibility}),bE=e=>({type:"webchat-config",config:e.data.config}),wE=e=>({type:"custom-event",event:e.data.event}),xE=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:sE,cardAdapter:cE,carouselAdapter:lE,choiceAdapter:uE,customAdapter:wE,dropdownAdapter:dE,fileAdapter:fE,imageAdapter:pE,locationAdapter:hE,markdownAdapter:mE,messageAdapter:fU,textAdapter:yE,triggerAdapter:e=>{switch(e.type){case"webchat_visibility":return vE(e);case"webchat_config":return bE(e);case"custom":return wE(e);default:throw new Error("unknown trigger type")}},videoAdapter:gE,webchatConfigAdapter:bE,webchatVisibilityAdapter:vE},Symbol.toStringTag,{value:"Module"})),SE=e=>({type:"card",title:e.title,subtitle:e.subtitle,imageUrl:e.image,actions:e.actions.map(pU)}),pU=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")}},hU=e=>({...e,type:"audio",audioUrl:e.audio}),mU=e=>SE(e),yU=e=>({...e,type:"carousel",items:e.items.map(SE)}),gU=e=>({...e,type:"dropdown",text:e.message??"",options:e.options.map(t=>({label:t.label,value:t.value}))}),vU=e=>({...e,type:"file",fileUrl:e.file,title:e.title}),bU=e=>({...e,type:"image",imageUrl:e.image}),wU=e=>({...e,type:"location",latitude:e.latitude,longitude:e.longitude}),xU=e=>({...e,type:"choice",text:e.text,options:e.choices.map(t=>({label:t.title,value:t.value})),disableFreeText:e.disableFreeText}),SU=e=>({...e,type:"text",text:e.text}),_U=e=>({...e,type:"video",videoUrl:e.video}),EU=e=>({...e,type:"text",text:e.text??e.payload}),_E=Object.freeze(Object.defineProperty({__proto__:null,messageAdapter:e=>{switch(e.type){case"audio":return hU(e);case"card":return mU(e);case"carousel":return yU(e);case"dropdown":return gU(e);case"file":return vU(e);case"image":return bU(e);case"location":return wU(e);case"single-choice":return xU(e);case"text":return SU(e);case"video":return _U(e);case"quick_reply":return EU(e);default:throw new Error("Unsuported message type")}}},Symbol.toStringTag,{value:"Module"})),kU=Object.freeze(Object.defineProperty({__proto__:null,messaging:iE,messagingToWebChat:_E,webchat:Z1,webchatToMessaging:xE},Symbol.toStringTag,{value:"Module"})),TU=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));let Fd;const $U=new Uint8Array(16);function OU(){if(!Fd&&(Fd=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Fd))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Fd($U)}const Lr=[];for(let e=0;e<256;++e)Lr.push((e+256).toString(16).slice(1));function CU(e,t=0){return Lr[e[t+0]]+Lr[e[t+1]]+Lr[e[t+2]]+Lr[e[t+3]]+"-"+Lr[e[t+4]]+Lr[e[t+5]]+"-"+Lr[e[t+6]]+Lr[e[t+7]]+"-"+Lr[e[t+8]]+Lr[e[t+9]]+"-"+Lr[e[t+10]]+Lr[e[t+11]]+Lr[e[t+12]]+Lr[e[t+13]]+Lr[e[t+14]]+Lr[e[t+15]]}const EE={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Ld(e,t,r){if(EE.randomUUID&&!t&&!e)return EE.randomUUID();e=e||{};const n=e.random||(e.rng||OU)();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 CU(n)}const qd=e=>({block:e,type:"bubble"}),AU=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},kE=({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(AU)}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},IU=({choices:e,text:t})=>{const r=Ld(),n=qd({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}))}]}},RU=({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}},Gm=({type:e,audio:t})=>({payload:{type:e,url:t}}),Jm=e=>({payload:qd(kE(e))}),Ym=({items:e})=>({payload:{type:"carousel",blocks:e.map(kE)}}),Xm=e=>({disableInput:e.disableFreeText,payload:IU(e)}),Qm=e=>({disableInput:!0,payload:qd(RU(e))}),ey=({file:e,...t})=>({payload:{url:e,...t}}),ty=({type:e,image:t})=>({payload:{type:e,url:t}}),ry=({type:e,latitude:t,longitude:r,title:n,address:o})=>({payload:{type:e,latitude:t,longitude:r,title:n??o??"View on map"}}),TE=({text:e,payload:t})=>({payload:{type:"text",text:e??t}}),Bd=({type:e,text:t})=>({payload:qd({type:e,text:t})}),ny=({type:e,video:t})=>({payload:{type:e,url:t}}),oy=e=>{switch(e.type){case"audio":return Gm(e);case"card":return Jm(e);case"carousel":return Ym(e);case"single-choice":return Xm(e);case"dropdown":return Qm(e);case"file":return ey(e);case"image":return ty(e);case"location":return ry(e);case"quick_reply":return TE(e);case"text":return Bd(e);case"video":return ny(e);default:throw new Error("Unsuported message type")}},PU=Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:Gm,cardAdapter:Jm,carouselAdapter:Ym,choiceAdapter:Xm,dropdownAdapter:Qm,fileAdapter:ey,imageAdapter:ty,locationAdapter:ry,messageAdapter:oy,quickReplyAdapter:TE,textAdapter:Bd,videoAdapter:ny},Symbol.toStringTag,{value:"Module"})),{webchatToMessaging:Hn}=kU,$E=e=>{const t=Hn.audioAdapter(e);return Gm(t)},OE=e=>{const t=Hn.cardAdapter(e);return Jm(t)},CE=e=>{const t=Hn.carouselAdapter(e);return Ym(t)},AE=e=>{const t=Hn.choiceAdapter(e);return Xm(t)},IE=e=>{const t=Hn.dropdownAdapter(e);return Qm(t)},RE=e=>{const t=Hn.fileAdapter(e);return ey(t)},PE=e=>{const t=Hn.imageAdapter(e);return ty(t)},NE=e=>{const t=Hn.locationAdapter(e);return ry(t)},ME=e=>{const t=Hn.markdownAdapter(e);return Bd(t)},jE=e=>{const t=Hn.textAdapter(e);return Bd(t)},DE=e=>{const t=Hn.videoAdapter(e);return ny(t)},FE=e=>{switch(e.type){case"audio":return $E(e);case"card":return OE(e);case"carousel":return CE(e);case"choice":return AE(e);case"dropdown":return IE(e);case"file":return RE(e);case"image":return PE(e);case"location":return NE(e);case"markdown":return ME(e);case"text":return jE(e);case"video":return DE(e);default:throw new Error("Unsuported message type")}},NU=Object.freeze(Object.defineProperty({__proto__:null,messaging:iE,messagingToTarget:PU,messagingToWebChat:_E,target:TU,webchat:Z1,webchatToMessaging:xE,webchatToTarget:Object.freeze(Object.defineProperty({__proto__:null,audioAdapter:$E,cardAdapter:OE,carouselAdapter:CE,choiceAdapter:AE,dropdownAdapter:IE,fileAdapter:RE,imageAdapter:PE,locationAdapter:NE,markdownAdapter:ME,messageAdapter:FE,textAdapter:jE,videoAdapter:DE},Symbol.toStringTag,{value:"Module"}))},Symbol.toStringTag,{value:"Module"}));var iy={exports:{}},Ec={};/**
|
|
78
78
|
* @license React
|
|
79
79
|
* react-jsx-runtime.production.min.js
|
|
80
80
|
*
|
|
@@ -91,16 +91,16 @@ ${mu(e.value)}`.trim();case Qe.ZodFirstPartyTypeKind.ZodEnum:return s.values.map
|
|
|
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
93
|
*/var qE;function jU(){return qE||(qE=1,process.env.NODE_ENV!=="production"&&function(){var e=O,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(j){if(j===null||typeof j!="object")return null;var ge=h&&j[h]||j[y];return typeof ge=="function"?ge:null}var g=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function v(j){{for(var ge=arguments.length,Ae=new Array(ge>1?ge-1:0),Ye=1;Ye<ge;Ye++)Ae[Ye-1]=arguments[Ye];b("error",j,Ae)}}function b(j,ge,Ae){{var Ye=g.ReactDebugCurrentFrame,$t=Ye.getStackAddendum();$t!==""&&(ge+="%s",Ae=Ae.concat([$t]));var Ft=Ae.map(function(it){return String(it)});Ft.unshift("Warning: "+ge),Function.prototype.apply.call(console[j],console,Ft)}}var x=!1,w=!1,S=!1,$=!1,R=!1,N;N=Symbol.for("react.module.reference");function A(j){return!!(typeof j=="string"||typeof j=="function"||j===n||j===i||R||j===o||j===l||j===u||$||j===f||x||w||S||typeof j=="object"&&j!==null&&(j.$$typeof===p||j.$$typeof===d||j.$$typeof===a||j.$$typeof===s||j.$$typeof===c||j.$$typeof===N||j.getModuleId!==void 0))}function D(j,ge,Ae){var Ye=j.displayName;if(Ye)return Ye;var $t=ge.displayName||ge.name||"";return $t!==""?Ae+"("+$t+")":Ae}function H(j){return j.displayName||"Context"}function U(j){if(j==null)return null;if(typeof j.tag=="number"&&v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof j=="function")return j.displayName||j.name||null;if(typeof j=="string")return j;switch(j){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 j=="object")switch(j.$$typeof){case s:var ge=j;return H(ge)+".Consumer";case a:var Ae=j;return H(Ae._context)+".Provider";case c:return D(j,j.render,"ForwardRef");case d:var Ye=j.displayName||null;return Ye!==null?Ye:U(j.type)||"Memo";case p:{var $t=j,Ft=$t._payload,it=$t._init;try{return U(it(Ft))}catch{return null}}}return null}var Z=Object.assign,L=0,q,W,J,M,E,B,Q;function T(){}T.__reactDisabledLog=!0;function ce(){{if(L===0){q=console.log,W=console.info,J=console.warn,M=console.error,E=console.group,B=console.groupCollapsed,Q=console.groupEnd;var j={configurable:!0,enumerable:!0,value:T,writable:!0};Object.defineProperties(console,{info:j,log:j,warn:j,error:j,group:j,groupCollapsed:j,groupEnd:j})}L++}}function pe(){{if(L--,L===0){var j={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Z({},j,{value:q}),info:Z({},j,{value:W}),warn:Z({},j,{value:J}),error:Z({},j,{value:M}),group:Z({},j,{value:E}),groupCollapsed:Z({},j,{value:B}),groupEnd:Z({},j,{value:Q})})}L<0&&v("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var he=g.ReactCurrentDispatcher,be;function Ee(j,ge,Ae){{if(be===void 0)try{throw Error()}catch($t){var Ye=$t.stack.trim().match(/\n( *(at )?)/);be=Ye&&Ye[1]||""}return`
|
|
94
|
-
`+be+j}}var _e=!1,ye;{var le=typeof WeakMap=="function"?WeakMap:Map;ye=new le}function te(j,ge){if(!j||_e)return"";{var Ae=ye.get(j);if(Ae!==void 0)return Ae}var Ye;_e=!0;var $t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ft;Ft=he.current,he.current=null,ce();try{if(ge){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(io){Ye=io}Reflect.construct(j,[],it)}else{try{it.call()}catch(io){Ye=io}j.call(it.prototype)}}else{try{throw Error()}catch(io){Ye=io}j()}}catch(io){if(io&&Ye&&typeof io.stack=="string"){for(var
|
|
94
|
+
`+be+j}}var _e=!1,ye;{var le=typeof WeakMap=="function"?WeakMap:Map;ye=new le}function te(j,ge){if(!j||_e)return"";{var Ae=ye.get(j);if(Ae!==void 0)return Ae}var Ye;_e=!0;var $t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ft;Ft=he.current,he.current=null,ce();try{if(ge){var it=function(){throw Error()};if(Object.defineProperty(it.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(it,[])}catch(io){Ye=io}Reflect.construct(j,[],it)}else{try{it.call()}catch(io){Ye=io}j.call(it.prototype)}}else{try{throw Error()}catch(io){Ye=io}j()}}catch(io){if(io&&Ye&&typeof io.stack=="string"){for(var nt=io.stack.split(`
|
|
95
95
|
`),ur=Ye.stack.split(`
|
|
96
|
-
`),zt=
|
|
97
|
-
`+
|
|
96
|
+
`),zt=nt.length-1,Xt=ur.length-1;zt>=1&&Xt>=0&&nt[zt]!==ur[Xt];)Xt--;for(;zt>=1&&Xt>=0;zt--,Xt--)if(nt[zt]!==ur[Xt]){if(zt!==1||Xt!==1)do if(zt--,Xt--,Xt<0||nt[zt]!==ur[Xt]){var bn=`
|
|
97
|
+
`+nt[zt].replace(" at new "," at ");return j.displayName&&bn.includes("<anonymous>")&&(bn=bn.replace("<anonymous>",j.displayName)),typeof j=="function"&&ye.set(j,bn),bn}while(zt>=1&&Xt>=0);break}}}finally{_e=!1,he.current=Ft,pe(),Error.prepareStackTrace=$t}var qi=j?j.displayName||j.name:"",Uh=qi?Ee(qi):"";return typeof j=="function"&&ye.set(j,Uh),Uh}function ve(j,ge,Ae){return te(j,!1)}function Ce(j){var ge=j.prototype;return!!(ge&&ge.isReactComponent)}function Ue(j,ge,Ae){if(j==null)return"";if(typeof j=="function")return te(j,Ce(j));if(typeof j=="string")return Ee(j);switch(j){case l:return Ee("Suspense");case u:return Ee("SuspenseList")}if(typeof j=="object")switch(j.$$typeof){case c:return ve(j.render);case d:return Ue(j.type,ge,Ae);case p:{var Ye=j,$t=Ye._payload,Ft=Ye._init;try{return Ue(Ft($t),ge,Ae)}catch{}}}return""}var F=Object.prototype.hasOwnProperty,ue={},we=g.ReactDebugCurrentFrame;function fe(j){if(j){var ge=j._owner,Ae=Ue(j.type,j._source,ge?ge.type:null);we.setExtraStackFrame(Ae)}else we.setExtraStackFrame(null)}function De(j,ge,Ae,Ye,$t){{var Ft=Function.call.bind(F);for(var it in j)if(Ft(j,it)){var nt=void 0;try{if(typeof j[it]!="function"){var ur=Error((Ye||"React class")+": "+Ae+" type `"+it+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof j[it]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ur.name="Invariant Violation",ur}nt=j[it](ge,it,Ye,Ae,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(zt){nt=zt}nt&&!(nt instanceof Error)&&(fe($t),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).",Ye||"React class",Ae,it,typeof nt),fe(null)),nt instanceof Error&&!(nt.message in ue)&&(ue[nt.message]=!0,fe($t),v("Failed %s type: %s",Ae,nt.message),fe(null))}}}var Ie=Array.isArray;function je(j){return Ie(j)}function ut(j){{var ge=typeof Symbol=="function"&&Symbol.toStringTag,Ae=ge&&j[Symbol.toStringTag]||j.constructor.name||"Object";return Ae}}function We(j){try{return K(j),!1}catch{return!0}}function K(j){return""+j}function ae(j){if(We(j))return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ut(j)),K(j)}var X=g.ReactCurrentOwner,me={key:!0,ref:!0,__self:!0,__source:!0},Oe,tt,Ze;Ze={};function ht(j){if(F.call(j,"ref")){var ge=Object.getOwnPropertyDescriptor(j,"ref").get;if(ge&&ge.isReactWarning)return!1}return j.ref!==void 0}function Tt(j){if(F.call(j,"key")){var ge=Object.getOwnPropertyDescriptor(j,"key").get;if(ge&&ge.isReactWarning)return!1}return j.key!==void 0}function Vt(j,ge){if(typeof j.ref=="string"&&X.current&&ge&&X.current.stateNode!==ge){var Ae=U(X.current.type);Ze[Ae]||(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',U(X.current.type),j.ref),Ze[Ae]=!0)}}function z(j,ge){{var Ae=function(){Oe||(Oe=!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))};Ae.isReactWarning=!0,Object.defineProperty(j,"key",{get:Ae,configurable:!0})}}function G(j,ge){{var Ae=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))};Ae.isReactWarning=!0,Object.defineProperty(j,"ref",{get:Ae,configurable:!0})}}var ze=function(j,ge,Ae,Ye,$t,Ft,it){var nt={$$typeof:t,type:j,key:ge,ref:Ae,props:it,_owner:Ft};return nt._store={},Object.defineProperty(nt._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(nt,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Ye}),Object.defineProperty(nt,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$t}),Object.freeze&&(Object.freeze(nt.props),Object.freeze(nt)),nt};function Ke(j,ge,Ae,Ye,$t){{var Ft,it={},nt=null,ur=null;Ae!==void 0&&(ae(Ae),nt=""+Ae),Tt(ge)&&(ae(ge.key),nt=""+ge.key),ht(ge)&&(ur=ge.ref,Vt(ge,$t));for(Ft in ge)F.call(ge,Ft)&&!me.hasOwnProperty(Ft)&&(it[Ft]=ge[Ft]);if(j&&j.defaultProps){var zt=j.defaultProps;for(Ft in zt)it[Ft]===void 0&&(it[Ft]=zt[Ft])}if(nt||ur){var Xt=typeof j=="function"?j.displayName||j.name||"Unknown":j;nt&&z(it,Xt),ur&&G(it,Xt)}return ze(j,nt,ur,$t,Ye,X.current,it)}}var gt=g.ReactCurrentOwner,Ge=g.ReactDebugCurrentFrame;function sr(j){if(j){var ge=j._owner,Ae=Ue(j.type,j._source,ge?ge.type:null);Ge.setExtraStackFrame(Ae)}else Ge.setExtraStackFrame(null)}var $r;$r=!1;function Yt(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function cr(){{if(gt.current){var j=U(gt.current.type);if(j)return`
|
|
98
98
|
|
|
99
99
|
Check the render method of \``+j+"`."}return""}}function ln(j){{if(j!==void 0){var ge=j.fileName.replace(/^.*[\\\/]/,""),Ae=j.lineNumber;return`
|
|
100
100
|
|
|
101
101
|
Check your code at `+ge+":"+Ae+"."}return""}}var vt={};function bt(j){{var ge=cr();if(!ge){var Ae=typeof j=="string"?j:j.displayName||j.name;Ae&&(ge=`
|
|
102
102
|
|
|
103
|
-
Check the top-level render call using <`+Ae+">.")}return ge}}function er(j,ge){{if(!j._store||j._store.validated||j.key!=null)return;j._store.validated=!0;var Ae=bt(ge);if(vt[Ae])return;vt[Ae]=!0;var Ye="";j&&j._owner&&j._owner!==gt.current&&(Ye=" It was passed a child from "+U(j._owner.type)+"."),sr(j),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ae,Ye),sr(null)}}function tr(j,ge){{if(typeof j!="object")return;if(je(j))for(var Ae=0;Ae<j.length;Ae++){var Ye=j[Ae];Yt(Ye)&&er(Ye,ge)}else if(Yt(j))j._store&&(j._store.validated=!0);else if(j){var $t=m(j);if(typeof $t=="function"&&$t!==j.entries)for(var Ft=$t.call(j),it;!(it=Ft.next()).done;)Yt(it.value)&&er(it.value,ge)}}}function lr(j){{var ge=j.type;if(ge==null||typeof ge=="string")return;var Ae;if(typeof ge=="function")Ae=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))Ae=ge.propTypes;else return;if(Ae){var Ye=U(ge);De(Ae,j.props,"prop",Ye,j)}else if(ge.PropTypes!==void 0&&!$r){$r=!0;var $t=U(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$t||"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 Kt(j){{for(var ge=Object.keys(j.props),Ae=0;Ae<ge.length;Ae++){var Ye=ge[Ae];if(Ye!=="children"&&Ye!=="key"){sr(j),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ye),sr(null);break}}j.ref!==null&&(sr(j),v("Invalid attribute `ref` supplied to `React.Fragment`."),sr(null))}}function Or(j,ge,Ae,Ye,$t,Ft){{var it=A(j);if(!it){var rt="";(j===void 0||typeof j=="object"&&j!==null&&Object.keys(j).length===0)&&(rt+=" 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 ur=ln($t);ur?rt+=ur:rt+=cr();var zt;j===null?zt="null":je(j)?zt="array":j!==void 0&&j.$$typeof===t?(zt="<"+(U(j.type)||"Unknown")+" />",rt=" Did you accidentally export a JSX literal instead of a component?"):zt=typeof j,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",zt,rt)}var Xt=Ke(j,ge,Ae,$t,Ft);if(Xt==null)return Xt;if(it){var bn=ge.children;if(bn!==void 0)if(Ye)if(je(bn)){for(var qi=0;qi<bn.length;qi++)tr(bn[qi],j);Object.freeze&&Object.freeze(bn)}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 tr(bn,j)}return j===n?Kt(Xt):lr(Xt),Xt}}function vr(j,ge,Ae){return Or(j,ge,Ae,!0)}function vn(j,ge,Ae){return Or(j,ge,Ae,!1)}var Li=vn,Xs=vr;kc.Fragment=n,kc.jsx=Li,kc.jsxs=Xs}()),kc}process.env.NODE_ENV==="production"?iy.exports=MU():iy.exports=jU();var Y=iy.exports;function wr(){return wr=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},wr.apply(this,arguments)}function ay(e,t=[]){let r=[];function n(i,a){const s=O.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=O.useMemo(()=>h,Object.values(h));return O.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=O.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=>O.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return O.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,DU(o,...t)]}function DU(...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 O.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ci(e){const t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Tc=globalThis!=null&&globalThis.document?O.useLayoutEffect:()=>{};function li(){return li=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},li.apply(null,arguments)}function FU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function BE(...e){return t=>e.forEach(r=>FU(r,t))}function Ki(...e){return O.useCallback(BE(...e),e)}const sy=O.forwardRef((e,t)=>{const{children:r,...n}=e,o=O.Children.toArray(r),i=o.find(qU);if(i){const a=i.props.children,s=o.map(c=>c===i?O.Children.count(a)>1?O.Children.only(null):O.isValidElement(a)?a.props.children:null:c);return O.createElement(cy,li({},n,{ref:t}),O.isValidElement(a)?O.cloneElement(a,void 0,s):null)}return O.createElement(cy,li({},n,{ref:t}),r)});sy.displayName="Slot";const cy=O.forwardRef((e,t)=>{const{children:r,...n}=e;return O.isValidElement(r)?O.cloneElement(r,{...BU(n,r.props),ref:t?BE(t,r.ref):r.ref}):O.Children.count(r)>1?O.Children.only(null):null});cy.displayName="SlotClone";const LU=({children:e})=>O.createElement(O.Fragment,null,e);function qU(e){return O.isValidElement(e)&&e.type===LU}function BU(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 Nn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=O.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?sy:t;return O.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),O.createElement(s,li({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function UU(e,t){e&&ao.flushSync(()=>e.dispatchEvent(t))}const UE="Avatar",[zU,u_e]=ay(UE),[ZU,zE]=zU(UE),ZE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=O.useState("idle");return O.createElement(ZU,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},O.createElement(Nn.span,wr({},n,{ref:t})))}),VU="AvatarImage",VE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=zE(VU,r),s=WU(n),c=ci(l=>{o(l),a.onImageLoadingStatusChange(l)});return Tc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?O.createElement(Nn.img,wr({},i,{ref:t,src:n})):null}),HU="AvatarFallback",HE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=zE(HU,r),[a,s]=O.useState(n===void 0);return O.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?O.createElement(Nn.span,wr({},o,{ref:t})):null});function WU(e){const[t,r]=O.useState("idle");return O.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 ly(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 KU(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const GU=(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 WE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const JU=2.4,YU=.2126729,XU=.7151522,QU=.072175,e5=.56,t5=.57,r5=.62,n5=.65,Ud=.022,KE=1.414,o5=1.14,i5=1.14,a5=.035991,s5=.035991,c5=27.7847239587675,l5=27.7847239587675,GE=.027,JE=.027,YE=.001,u5=5e-4;function XE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**JU;return YU*o(t)+XU*o(r)+QU*o(n)}function QE(e,t){if(!e||!t)return 0;let r=XE(ly(e)),n=XE(ly(t)),o=0,i=0;return r=r>Ud?r:r+(Ud-r)**KE,n=n>Ud?n:n+(Ud-n)**KE,Math.abs(n-r)<u5?0:(n>r?(o=(n**e5-r**t5)*o5,i=o<YE?0:o<a5?o-o*c5*GE:o-GE):(o=(n**n5-r**r5)*i5,i=o>-YE?0:o>-s5?o-o*l5*JE:o+JE),Math.abs(i*100))}let uy=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 d5=new uy;function ek(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function tk(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 rk={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,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(Z){var L=["th","st","nd","rd"],q=Z%100;return"["+Z+(L[(q-20)%10]||L[q]||L[0])+"]"}},b=function(Z,L,q){var W=String(Z);return!W||W.length>=L?Z:""+Array(L+1-W.length).join(q)+Z},x={s:b,z:function(Z){var L=-Z.utcOffset(),q=Math.abs(L),W=Math.floor(q/60),J=q%60;return(L<=0?"+":"-")+b(W,2,"0")+":"+b(J,2,"0")},m:function Z(L,q){if(L.date()<q.date())return-Z(q,L);var W=12*(q.year()-L.year())+(q.month()-L.month()),J=L.clone().add(W,d),M=q-J<0,E=L.clone().add(W+(M?-1:1),d);return+(-(W+(q-J)/(M?J-E:E-J))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},w="en",S={};S[w]=v;var $="$isDayjsObject",R=function(Z){return Z instanceof H||!(!Z||!Z[$])},N=function Z(L,q,W){var J;if(!L)return w;if(typeof L=="string"){var M=L.toLowerCase();S[M]&&(J=M),q&&(S[M]=q,J=M);var E=L.split("-");if(!J&&E.length>1)return Z(E[0])}else{var B=L.name;S[B]=L,J=B}return!W&&J&&(w=J),J||!W&&w},A=function(Z,L){if(R(Z))return Z.clone();var q=typeof L=="object"?L:{};return q.date=Z,q.args=arguments,new H(q)},D=x;D.l=N,D.i=R,D.w=function(Z,L){return A(Z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var H=function(){function Z(q){this.$L=N(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[$]=!0}var L=Z.prototype;return L.parse=function(q){this.$d=function(W){var J=W.date,M=W.utc;if(J===null)return new Date(NaN);if(D.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var E=J.match(m);if(E){var B=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return M?new Date(Date.UTC(E[1],B,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],B,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(J)}(q),this.init()},L.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},L.$utils=function(){return D},L.isValid=function(){return this.$d.toString()!==y},L.isSame=function(q,W){var J=A(q);return this.startOf(W)<=J&&J<=this.endOf(W)},L.isAfter=function(q,W){return A(q)<this.startOf(W)},L.isBefore=function(q,W){return this.endOf(W)<A(q)},L.$g=function(q,W,J){return D.u(q)?this[W]:this.set(J,q)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(q,W){var J=this,M=!!D.u(W)||W,E=D.p(q),B=function(_e,ye){var le=D.w(J.$u?Date.UTC(J.$y,ye,_e):new Date(J.$y,ye,_e),J);return M?le:le.endOf(l)},Q=function(_e,ye){return D.w(J.toDate()[_e].apply(J.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(ye)),J)},T=this.$W,ce=this.$M,pe=this.$D,he="set"+(this.$u?"UTC":"");switch(E){case f:return M?B(1,0):B(31,11);case d:return M?B(1,ce):B(0,ce+1);case u:var be=this.$locale().weekStart||0,Ee=(T<be?T+7:T)-be;return B(M?pe-Ee:pe+(6-Ee),ce);case l:case h:return Q(he+"Hours",0);case c:return Q(he+"Minutes",1);case s:return Q(he+"Seconds",2);case a:return Q(he+"Milliseconds",3);default:return this.clone()}},L.endOf=function(q){return this.startOf(q,!1)},L.$set=function(q,W){var J,M=D.p(q),E="set"+(this.$u?"UTC":""),B=(J={},J[l]=E+"Date",J[h]=E+"Date",J[d]=E+"Month",J[f]=E+"FullYear",J[c]=E+"Hours",J[s]=E+"Minutes",J[a]=E+"Seconds",J[i]=E+"Milliseconds",J)[M],Q=M===l?this.$D+(W-this.$W):W;if(M===d||M===f){var T=this.clone().set(h,1);T.$d[B](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},L.set=function(q,W){return this.clone().$set(q,W)},L.get=function(q){return this[D.p(q)]()},L.add=function(q,W){var J,M=this;q=Number(q);var E=D.p(W),B=function(ce){var pe=A(M);return D.w(pe.date(pe.date()+Math.round(ce*q)),M)};if(E===d)return this.set(d,this.$M+q);if(E===f)return this.set(f,this.$y+q);if(E===l)return B(1);if(E===u)return B(7);var Q=(J={},J[s]=n,J[c]=o,J[a]=r,J)[E]||1,T=this.$d.getTime()+q*Q;return D.w(T,this)},L.subtract=function(q,W){return this.add(-1*q,W)},L.format=function(q){var W=this,J=this.$locale();if(!this.isValid())return J.invalidDate||y;var M=q||"YYYY-MM-DDTHH:mm:ssZ",E=D.z(this),B=this.$H,Q=this.$m,T=this.$M,ce=J.weekdays,pe=J.months,he=J.meridiem,be=function(ye,le,te,ve){return ye&&(ye[le]||ye(W,M))||te[le].slice(0,ve)},Ee=function(ye){return D.s(B%12||12,ye,"0")},_e=he||function(ye,le,te){var ve=ye<12?"AM":"PM";return te?ve.toLowerCase():ve};return M.replace(g,function(ye,le){return le||function(te){switch(te){case"YY":return String(W.$y).slice(-2);case"YYYY":return D.s(W.$y,4,"0");case"M":return T+1;case"MM":return D.s(T+1,2,"0");case"MMM":return be(J.monthsShort,T,pe,3);case"MMMM":return be(pe,T);case"D":return W.$D;case"DD":return D.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return be(J.weekdaysMin,W.$W,ce,2);case"ddd":return be(J.weekdaysShort,W.$W,ce,3);case"dddd":return ce[W.$W];case"H":return String(B);case"HH":return D.s(B,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return _e(B,Q,!0);case"A":return _e(B,Q,!1);case"m":return String(Q);case"mm":return D.s(Q,2,"0");case"s":return String(W.$s);case"ss":return D.s(W.$s,2,"0");case"SSS":return D.s(W.$ms,3,"0");case"Z":return E}return null}(ye)||E.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(q,W,J){var M,E=this,B=D.p(W),Q=A(q),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return D.m(E,Q)};switch(B){case f:M=pe()/12;break;case d:M=pe();break;case p:M=pe()/3;break;case u:M=(ce-T)/6048e5;break;case l:M=(ce-T)/864e5;break;case c:M=ce/o;break;case s:M=ce/n;break;case a:M=ce/r;break;default:M=ce}return J?M:D.a(M)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return S[this.$L]},L.locale=function(q,W){if(!q)return this.$L;var J=this.clone(),M=N(q,W,!0);return M&&(J.$L=M),J},L.clone=function(){return D.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Z}(),U=H.prototype;return A.prototype=U,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(Z){U[Z[1]]=function(L){return this.$g(L,Z[0],Z[1])}}),A.extend=function(Z,L){return Z.$i||(Z(L,H,A),Z.$i=!0),A},A.locale=N,A.isDayjs=R,A.unix=function(Z){return A(1e3*Z)},A.en=S[w],A.Ls=S,A.p={},A})})(rk);var f5=rk.exports;const zd=St(f5);var nk={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(nk);var p5=nk.exports;const h5=St(p5);var ok={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,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)}}})})(ok);var m5=ok.exports;const y5=St(m5);zd.extend(h5),zd.extend(y5);function g5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(ik(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;zd(o).isSame(i,t)||r.push(ik(i))}return r}function ik(e){return{id:Ld(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:v5(e)}}}function v5(e,t=!1){const r=zd(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 b5(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 w5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function x5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function S5(e,t){return e.map(r=>Math.round(r*t))}const $c=e=>t=>x5(t,e),Oc=e=>t=>S5(t,e),_5={50:$c(.95),100:$c(.9),200:$c(.75),300:$c(.6),400:$c(.3),500:e=>e,600:Oc(.9),700:Oc(.6),800:Oc(.45),900:Oc(.3),950:Oc(.2)};function ak(e,t=_5){const r={},n=b5(e);for(const[o,i]of Object.entries(t))r[o]=w5(i(n));return r}var Mt;(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})(Mt||(Mt={}));var dy;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(dy||(dy={}));const Ne=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ui=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}},ke=Mt.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"]),E5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Wn 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,Mt.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()}}Wn.create=e=>new Wn(e);const Cc=(e,t)=>{let r;switch(e.code){case ke.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case ke.invalid_union:r="Invalid input";break;case ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case ke.invalid_enum_value:r=`Invalid enum value. Expected ${Mt.joinValues(e.options)}, received '${e.received}'`;break;case ke.invalid_arguments:r="Invalid function arguments";break;case ke.invalid_return_type:r="Invalid function return type";break;case ke.invalid_date:r="Invalid date";break;case ke.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}"`:Mt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ke.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 ke.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 ke.custom:r="Invalid input";break;case ke.invalid_intersection_types:r="Intersection results could not be merged";break;case ke.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ke.not_finite:r="Number must be finite";break;default:r=t.defaultError,Mt.assertNever(e)}return{message:r}};let sk=Cc;function k5(e){sk=e}function Zd(){return sk}const Vd=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}},T5=[];function Me(e,t){const r=Vd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Zd(),Cc].filter(n=>!!n)});e.common.issues.push(r)}class Kr{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 lt;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 Kr.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 lt;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 lt=Object.freeze({status:"aborted"}),ck=e=>({status:"dirty",value:e}),on=e=>({status:"valid",value:e}),fy=e=>e.status==="aborted",py=e=>e.status==="dirty",Ac=e=>e.status==="valid",Hd=e=>typeof Promise<"u"&&e instanceof Promise;var Je;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Je||(Je={}));class uo{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 lk=(e,t)=>{if(Ac(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 Wn(e.common.issues);return this._error=r,this._error}}};function ft(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 ui(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Kr,ctx:{common:t.parent.common,data:t.data,parsedType:ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Hd(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:ui(t)},i=this._parseSync({data:t,path:o.path,parent:o});return lk(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:ui(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Hd(o)?o:Promise.resolve(o));return lk(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:ke.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 Jn({schema:this,typeName:ot.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qo.create(this,this._def)}nullable(){return Xi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gn.create(this,this._def)}promise(){return Ka.create(this,this._def)}or(t){return Nc.create([this,t],this._def)}and(t){return Mc.create(this,t,this._def)}transform(t){return new Jn({...ft(this._def),schema:this,typeName:ot.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new qc({...ft(this._def),innerType:this,defaultValue:r,typeName:ot.ZodDefault})}brand(){return new dk({typeName:ot.ZodBranded,type:this,...ft(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Xd({...ft(this._def),innerType:this,catchValue:r,typeName:ot.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Bc.create(this,t)}readonly(){return ef.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $5=/^c[^\s-]{8,}$/i,O5=/^[a-z][a-z0-9]*$/,C5=/^[0-9A-HJKMNP-TV-Z]{26}$/,A5=/^[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,I5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hy;const P5=/^(((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}))$/,N5=/^(([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})))$/,M5=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)&&P5.test(e)||(t==="v6"||!t)&&N5.test(e))}class Kn 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:ke.invalid_type,expected:Ne.string,received:i.parsedType}),lt}const n=new Kr;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:ke.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:ke.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:ke.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:ke.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")I5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hy||(hy=new RegExp(R5,"u")),hy.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")A5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")O5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")C5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:ke.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:ke.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:ke.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:ke.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:ke.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:ke.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?M5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:ke.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:ke.invalid_string,message:i.message}),n.dirty()):Mt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:ke.invalid_string,...Je.errToObj(n)})}_addCheck(t){return new Kn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Je.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Je.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Je.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Je.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Je.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Je.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Je.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Je.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,...Je.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Je.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Je.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Je.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Je.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Je.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Je.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Je.errToObj(r)})}nonempty(t){return this.min(1,Je.errToObj(t))}trim(){return new Kn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Kn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Kn({...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}}Kn.create=e=>{var t;return new Kn({checks:[],typeName:ot.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ft(e)})};function D5(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 di 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:ke.invalid_type,expected:Ne.number,received:i.parsedType}),lt}let n;const o=new Kr;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:ke.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:ke.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:ke.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?D5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:ke.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:ke.not_finite,message:i.message}),o.dirty()):Mt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Je.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Je.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Je.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Je.toString(r))}setLimit(t,r,n,o){return new di({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Je.toString(o)}]})}_addCheck(t){return new di({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Je.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Je.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Je.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Je.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Je.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Je.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"&&Mt.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)}}di.create=e=>new di({checks:[],typeName:ot.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ft(e)});class fi 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:ke.invalid_type,expected:Ne.bigint,received:i.parsedType}),lt}let n;const o=new Kr;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:ke.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:ke.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:ke.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Mt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Je.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Je.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Je.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Je.toString(r))}setLimit(t,r,n,o){return new fi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Je.toString(o)}]})}_addCheck(t){return new fi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Je.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Je.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}}fi.create=e=>{var t;return new fi({checks:[],typeName:ot.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ft(e)})};class Ic 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:ke.invalid_type,expected:Ne.boolean,received:n.parsedType}),lt}return on(t.data)}}Ic.create=e=>new Ic({typeName:ot.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ft(e)});class Gi 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:ke.invalid_type,expected:Ne.date,received:i.parsedType}),lt}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:ke.invalid_date}),lt}const n=new Kr;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:ke.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:ke.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Mt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Je.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Je.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}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ot.ZodDate,...ft(e)});class Wd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.symbol,received:n.parsedType}),lt}return on(t.data)}}Wd.create=e=>new Wd({typeName:ot.ZodSymbol,...ft(e)});class Rc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.undefined,received:n.parsedType}),lt}return on(t.data)}}Rc.create=e=>new Rc({typeName:ot.ZodUndefined,...ft(e)});class Pc extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.null,received:n.parsedType}),lt}return on(t.data)}}Pc.create=e=>new Pc({typeName:ot.ZodNull,...ft(e)});class Va extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return on(t.data)}}Va.create=e=>new Va({typeName:ot.ZodAny,...ft(e)});class Ji extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return on(t.data)}}Ji.create=e=>new Ji({typeName:ot.ZodUnknown,...ft(e)});class Lo extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:ke.invalid_type,expected:Ne.never,received:r.parsedType}),lt}}Lo.create=e=>new Lo({typeName:ot.ZodNever,...ft(e)});class Kd extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.void,received:n.parsedType}),lt}return on(t.data)}}Kd.create=e=>new Kd({typeName:ot.ZodVoid,...ft(e)});class Gn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:ke.invalid_type,expected:Ne.array,received:r.parsedType}),lt;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?ke.too_big:ke.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:ke.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:ke.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 uo(r,a,r.path,s)))).then(a=>Kr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new uo(r,a,r.path,s)));return Kr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Gn({...this._def,minLength:{value:t,message:Je.toString(r)}})}max(t,r){return new Gn({...this._def,maxLength:{value:t,message:Je.toString(r)}})}length(t,r){return new Gn({...this._def,exactLength:{value:t,message:Je.toString(r)}})}nonempty(t){return this.min(1,t)}}Gn.create=(e,t)=>new Gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ot.ZodArray,...ft(t)});function Ha(e){if(e instanceof rr){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=qo.create(Ha(n))}return new rr({...e._def,shape:()=>t})}else return e instanceof Gn?new Gn({...e._def,type:Ha(e.element)}):e instanceof qo?qo.create(Ha(e.unwrap())):e instanceof Xi?Xi.create(Ha(e.unwrap())):e instanceof fo?fo.create(e.items.map(t=>Ha(t))):e}class rr 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=Mt.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:ke.invalid_type,expected:Ne.object,received:l.parsedType}),lt}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Lo&&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 uo(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Lo){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:ke.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 uo(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=>Kr.mergeObjectSync(n,l)):Kr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Je.errToObj,new rr({...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=Je.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new rr({...this._def,unknownKeys:"strip"})}passthrough(){return new rr({...this._def,unknownKeys:"passthrough"})}extend(t){return new rr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ot.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new rr({...this._def,catchall:t})}pick(t){const r={};return Mt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new rr({...this._def,shape:()=>r})}omit(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new rr({...this._def,shape:()=>r})}deepPartial(){return Ha(this)}partial(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new rr({...this._def,shape:()=>r})}required(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof qo;)i=i._def.innerType;r[n]=i}}),new rr({...this._def,shape:()=>r})}keyof(){return uk(Mt.objectKeys(this.shape))}}rr.create=(e,t)=>new rr({shape:()=>e,unknownKeys:"strip",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)}),rr.strictCreate=(e,t)=>new rr({shape:()=>e,unknownKeys:"strict",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)}),rr.lazycreate=(e,t)=>new rr({shape:e,unknownKeys:"strip",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)});class Nc 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 Wn(s.ctx.common.issues));return Me(r,{code:ke.invalid_union,unionErrors:a}),lt}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 Wn(c));return Me(r,{code:ke.invalid_union,unionErrors:s}),lt}}get options(){return this._def.options}}Nc.create=(e,t)=>new Nc({options:e,typeName:ot.ZodUnion,...ft(t)});const Gd=e=>e instanceof Dc?Gd(e.schema):e instanceof Jn?Gd(e.innerType()):e instanceof Fc?[e.value]:e instanceof pi?e.options:e instanceof Lc?Object.keys(e.enum):e instanceof qc?Gd(e._def.innerType):e instanceof Rc?[void 0]:e instanceof Pc?[null]:null;class Jd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:ke.invalid_type,expected:Ne.object,received:r.parsedType}),lt;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:ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),lt)}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=Gd(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 Jd({typeName:ot.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...ft(n)})}}function my(e,t){const r=ui(e),n=ui(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=my(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=my(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 Mc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(fy(i)||fy(a))return lt;const s=my(i.value,a.value);return s.valid?((py(i)||py(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:ke.invalid_intersection_types}),lt)};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}))}}Mc.create=(e,t,r)=>new Mc({left:e,right:t,typeName:ot.ZodIntersection,...ft(r)});class fo extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:ke.invalid_type,expected:Ne.array,received:n.parsedType}),lt;if(n.data.length<this._def.items.length)return Me(n,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),lt;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:ke.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 uo(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Kr.mergeArray(r,a)):Kr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new fo({...this._def,rest:t})}}fo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fo({items:e,typeName:ot.ZodTuple,rest:null,...ft(t)})};class jc 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:ke.invalid_type,expected:Ne.object,received:n.parsedType}),lt;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new uo(n,s,n.path,s)),value:a._parse(new uo(n,n.data[s],n.path,s))});return n.common.async?Kr.mergeObjectAsync(r,o):Kr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new jc({keyType:t,valueType:r,typeName:ot.ZodRecord,...ft(n)}):new jc({keyType:Kn.create(),valueType:t,typeName:ot.ZodRecord,...ft(r)})}}class Yd 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:ke.invalid_type,expected:Ne.map,received:n.parsedType}),lt;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new uo(n,s,n.path,[l,"key"])),value:i._parse(new uo(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 lt;(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 lt;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Yd.create=(e,t,r)=>new Yd({valueType:t,keyType:e,typeName:ot.ZodMap,...ft(r)});class Yi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:ke.invalid_type,expected:Ne.set,received:n.parsedType}),lt;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:ke.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:ke.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 lt;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 uo(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Yi({...this._def,minSize:{value:t,message:Je.toString(r)}})}max(t,r){return new Yi({...this._def,maxSize:{value:t,message:Je.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Yi.create=(e,t)=>new Yi({valueType:e,minSize:null,maxSize:null,typeName:ot.ZodSet,...ft(t)});class Wa 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:ke.invalid_type,expected:Ne.function,received:r.parsedType}),lt;function n(s,c){return Vd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zd(),Cc].filter(l=>!!l),issueData:{code:ke.invalid_arguments,argumentsError:c}})}function o(s,c){return Vd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zd(),Cc].filter(l=>!!l),issueData:{code:ke.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Ka){const s=this;return on(async function(...c){const l=new Wn([]),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 on(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Wn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Wn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Wa({...this._def,args:fo.create(t).rest(Ji.create())})}returns(t){return new Wa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Wa({args:t||fo.create([]).rest(Ji.create()),returns:r||Ji.create(),typeName:ot.ZodFunction,...ft(n)})}}class Dc 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})}}Dc.create=(e,t)=>new Dc({getter:e,typeName:ot.ZodLazy,...ft(t)});class Fc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:ke.invalid_literal,expected:this._def.value}),lt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Fc.create=(e,t)=>new Fc({value:e,typeName:ot.ZodLiteral,...ft(t)});function uk(e,t){return new pi({values:e,typeName:ot.ZodEnum,...ft(t)})}class pi extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Mt.joinValues(n),received:r.parsedType,code:ke.invalid_type}),lt}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:ke.invalid_enum_value,options:n}),lt}return on(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 pi.create(t)}exclude(t){return pi.create(this.options.filter(r=>!t.includes(r)))}}pi.create=uk;class Lc extends mt{_parse(t){const r=Mt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Mt.objectValues(r);return Me(n,{expected:Mt.joinValues(o),received:n.parsedType,code:ke.invalid_type}),lt}if(r.indexOf(t.data)===-1){const o=Mt.objectValues(r);return Me(n,{received:n.data,code:ke.invalid_enum_value,options:o}),lt}return on(t.data)}get enum(){return this._def.values}}Lc.create=(e,t)=>new Lc({values:e,typeName:ot.ZodNativeEnum,...ft(t)});class Ka 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:ke.invalid_type,expected:Ne.promise,received:r.parsedType}),lt;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return on(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ka.create=(e,t)=>new Ka({type:e,typeName:ot.ZodPromise,...ft(t)});class Jn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ot.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"?lt:(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"?lt:(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(!Ac(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=>Ac(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Mt.assertNever(o)}}Jn.create=(e,t,r)=>new Jn({schema:e,typeName:ot.ZodEffects,effect:t,...ft(r)}),Jn.createWithPreprocess=(e,t,r)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:ot.ZodEffects,...ft(r)});class qo extends mt{_parse(t){return this._getType(t)===Ne.undefined?on(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qo.create=(e,t)=>new qo({innerType:e,typeName:ot.ZodOptional,...ft(t)});class Xi extends mt{_parse(t){return this._getType(t)===Ne.null?on(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xi.create=(e,t)=>new Xi({innerType:e,typeName:ot.ZodNullable,...ft(t)});class qc 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}}qc.create=(e,t)=>new qc({innerType:e,typeName:ot.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ft(t)});class Xd 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 Hd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Wn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Xd.create=(e,t)=>new Xd({innerType:e,typeName:ot.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ft(t)});class Qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.nan,received:n.parsedType}),lt}return{status:"valid",value:t.data}}}Qd.create=e=>new Qd({typeName:ot.ZodNaN,...ft(e)});const F5=Symbol("zod_brand");class dk 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 Bc 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"?lt:i.status==="dirty"?(r.dirty(),ck(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"?lt: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 Bc({in:t,out:r,typeName:ot.ZodPipeline})}}class ef extends mt{_parse(t){const r=this._def.innerType._parse(t);return Ac(r)&&(r.value=Object.freeze(r.value)),r}}ef.create=(e,t)=>new ef({innerType:e,typeName:ot.ZodReadonly,...ft(t)});const fk=(e,t={},r)=>e?Va.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})}}):Va.create(),L5={object:rr.lazycreate};var ot;(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"})(ot||(ot={}));const q5=(e,t={message:`Input not instance of ${e.name}`})=>fk(r=>r instanceof e,t),pk=Kn.create,hk=di.create,B5=Qd.create,U5=fi.create,mk=Ic.create,z5=Gi.create,Z5=Wd.create,V5=Rc.create,H5=Pc.create,W5=Va.create,K5=Ji.create,G5=Lo.create,J5=Kd.create,Y5=Gn.create,X5=rr.create,Q5=rr.strictCreate,e4=Nc.create,t4=Jd.create,r4=Mc.create,n4=fo.create,o4=jc.create,i4=Yd.create,a4=Yi.create,s4=Wa.create,c4=Dc.create,l4=Fc.create,u4=pi.create,d4=Lc.create,f4=Ka.create,yk=Jn.create,p4=qo.create,h4=Xi.create,m4=Jn.createWithPreprocess,y4=Bc.create;var V=Object.freeze({__proto__:null,defaultErrorMap:Cc,setErrorMap:k5,getErrorMap:Zd,makeIssue:Vd,EMPTY_PATH:T5,addIssueToContext:Me,ParseStatus:Kr,INVALID:lt,DIRTY:ck,OK:on,isAborted:fy,isDirty:py,isValid:Ac,isAsync:Hd,get util(){return Mt},get objectUtil(){return dy},ZodParsedType:Ne,getParsedType:ui,ZodType:mt,ZodString:Kn,ZodNumber:di,ZodBigInt:fi,ZodBoolean:Ic,ZodDate:Gi,ZodSymbol:Wd,ZodUndefined:Rc,ZodNull:Pc,ZodAny:Va,ZodUnknown:Ji,ZodNever:Lo,ZodVoid:Kd,ZodArray:Gn,ZodObject:rr,ZodUnion:Nc,ZodDiscriminatedUnion:Jd,ZodIntersection:Mc,ZodTuple:fo,ZodRecord:jc,ZodMap:Yd,ZodSet:Yi,ZodFunction:Wa,ZodLazy:Dc,ZodLiteral:Fc,ZodEnum:pi,ZodNativeEnum:Lc,ZodPromise:Ka,ZodEffects:Jn,ZodTransformer:Jn,ZodOptional:qo,ZodNullable:Xi,ZodDefault:qc,ZodCatch:Xd,ZodNaN:Qd,BRAND:F5,ZodBranded:dk,ZodPipeline:Bc,ZodReadonly:ef,custom:fk,Schema:mt,ZodSchema:mt,late:L5,get ZodFirstPartyTypeKind(){return ot},coerce:{string:e=>Kn.create({...e,coerce:!0}),number:e=>di.create({...e,coerce:!0}),boolean:e=>Ic.create({...e,coerce:!0}),bigint:e=>fi.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:W5,array:Y5,bigint:U5,boolean:mk,date:z5,discriminatedUnion:t4,effect:yk,enum:u4,function:s4,instanceof:q5,intersection:r4,lazy:c4,literal:l4,map:i4,nan:B5,nativeEnum:d4,never:G5,null:H5,nullable:h4,number:hk,object:X5,oboolean:()=>mk().optional(),onumber:()=>hk().optional(),optional:p4,ostring:()=>pk().optional(),pipeline:y4,preprocess:m4,promise:f4,record:o4,set:a4,strictObject:Q5,string:pk,symbol:Z5,transformer:yk,tuple:n4,undefined:V5,union:e4,unknown:K5,void:J5,NEVER:lt,ZodIssueCode:ke,quotelessJson:E5,ZodError:Wn});const Ga=V.object({title:V.string().optional(),link:V.string().optional()}),yy=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()}),gk=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Ga.optional(),email:Ga.optional(),phone:Ga.optional(),privacyPolicy:Ga.optional(),termsOfService:Ga.optional(),showPoweredBy:V.boolean().optional()}).merge(yy),vk=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),bk=V.object({}).passthrough().transform(e=>e),$e=V.object({className:V.string().optional(),style:bk.optional()}),tf=V.object({container:$e.optional(),image:$e.optional(),fallback:$e.optional()}),wk=V.object({button:$e.optional(),text:V.record(vk,$e.optional()),image:V.object({image:$e.optional(),placeholder:$e.optional()}).optional(),audio:$e.optional(),video:$e.optional(),file:V.object({container:$e.optional(),title:$e.optional(),icon:$e.optional()}).optional(),location:V.object({container:$e.optional(),title:$e.optional(),icon:$e.optional()}).optional(),column:$e.optional(),row:$e.optional(),bubble:$e.optional(),carousel:V.object({container:$e.optional(),slidesContainer:$e.optional(),backButton:$e.optional(),nextButton:$e.optional()}).optional(),dropdown:V.object({button:V.object({container:$e.optional(),icon:$e.optional(),text:$e.optional()}).optional(),content:V.object({container:$e.optional(),item:$e.optional()}).optional()}).optional()}),xk=V.object({container:$e.optional(),modal:V.object({overlay:$e.optional(),container:$e.optional(),dialog:V.object({container:$e.optional(),title:V.object({container:$e.optional(),text:$e.optional(),closeIcon:$e.optional()}).optional(),content:$e.optional(),newConversation:V.object({text:$e.optional(),button:$e.optional()}).optional()}).optional()}).optional(),notification:V.object({container:$e.optional(),title:$e.optional(),description:$e.optional(),icon:$e.optional(),closeIcon:$e.optional()}).optional(),header:V.object({container:$e.optional(),content:V.object({container:$e.optional(),title:$e.optional(),description:$e.optional(),avatar:tf.optional(),actions:V.object({container:$e.optional(),icons:$e.optional()}).optional()}),expandedContent:V.object({container:$e.optional(),group:$e.optional(),descriptionItems:V.object({container:$e.optional(),icon:$e.optional(),text:$e.optional(),link:$e.optional(),poweredBy:$e.optional()}).optional()}).optional(),description:V.object({container:$e.optional(),title:$e.optional(),subtitle:$e.optional()}).optional(),newConversationIcon:$e.optional()}).optional(),composer:V.object({container:$e.optional(),input:$e.optional(),uploadButton:V.object({container:$e.optional(),icon:$e.optional()}).optional(),button:V.object({container:$e.optional(),icon:$e.optional()}).optional()}).optional(),fab:V.object({icon:$e.optional(),container:$e.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:$e.optional(),viewport:$e.optional(),thumb:$e.optional(),corner:$e.optional(),background:$e.optional()}).optional(),container:$e.optional(),marquee:V.object({content:$e.optional(),title:$e.optional(),description:$e.optional(),avatar:tf.optional(),container:$e.optional()}).optional(),scrollDownButton:V.object({container:$e.optional(),button:$e.optional(),icon:$e.optional()}).optional()}).optional(),message:V.object({container:$e.optional(),avatar:tf.optional(),blocks:wk.optional()}).optional(),loadingIndicator:V.object({container:$e.optional(),loader:$e.optional()}).optional()}),Sk=V.enum(["opened","closed","initial"]),_k=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),Ek=V.enum(["messaging","pushpin"]),kk=V.object({configuration:gk.optional().catch(void 0),theme:xk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:_k.optional().catch(void 0)}),g4=kk.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:Ek.optional().catch(void 0),defaultState:Sk.optional().catch(void 0)});function Tk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=yy.parse(e);let a={},s={};if(i){const u=ak(i),d=n==="dark"?WE(u):u,p=ak(KU(GU(ly(i)))),f=n==="dark"?WE(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?QE(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?QE(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},ek(":root",a)+(t?ek(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const gy=O.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=tk(e??"",15);return Y.jsxs(ZE,{ref:a,"data-color":s,...r,...i,children:[Y.jsx(VE,{src:t,...n}),Y.jsx(HE,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function y_e(){}function g_e(){}function v4(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const b4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x4={};function $k(e,t){return((t||x4).jsx?w4:b4).test(e)}const S4=/[ \t\n\f\r]/g;function _4(e){return typeof e=="object"?e.type==="text"?Ok(e.value):!1:Ok(e)}function Ok(e){return e.replace(S4,"")===""}class Uc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Uc.prototype.property={},Uc.prototype.normal={},Uc.prototype.space=null;function Ck(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 Uc(r,n,t)}function vy(e){return e.toLowerCase()}class Mn{constructor(t,r){this.property=t,this.attribute=r}}Mn.prototype.space=null,Mn.prototype.boolean=!1,Mn.prototype.booleanish=!1,Mn.prototype.overloadedBoolean=!1,Mn.prototype.number=!1,Mn.prototype.commaSeparated=!1,Mn.prototype.spaceSeparated=!1,Mn.prototype.commaOrSpaceSeparated=!1,Mn.prototype.mustUseProperty=!1,Mn.prototype.defined=!1;let E4=0;const yt=Qi(),hr=Qi(),Ak=Qi(),Se=Qi(),Qt=Qi(),Ja=Qi(),xn=Qi();function Qi(){return 2**++E4}const by=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:hr,commaOrSpaceSeparated:xn,commaSeparated:Ja,number:Se,overloadedBoolean:Ak,spaceSeparated:Qt},Symbol.toStringTag,{value:"Module"})),wy=Object.keys(by);class xy extends Mn{constructor(t,r,n,o){let i=-1;if(super(t,r),Ik(this,"space",o),typeof n=="number")for(;++i<wy.length;){const a=wy[i];Ik(this,wy[i],(n&by[a])===by[a])}}}xy.prototype.defined=!0;function Ik(e,t,r){r&&(e[t]=r)}const k4={}.hasOwnProperty;function Ya(e){const t={},r={};let n;for(n in e.properties)if(k4.call(e.properties,n)){const o=e.properties[n],i=new xy(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[vy(n)]=n,r[vy(i.attribute)]=n}return new Uc(t,r,e.space)}const Rk=Ya({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Pk=Ya({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Nk(e,t){return t in e?e[t]:t}function Mk(e,t){return Nk(e,t.toLowerCase())}const jk=Ya({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Mk,properties:{xmlns:null,xmlnsXLink:null}}),Dk=Ya({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:hr,ariaAutoComplete:null,ariaBusy:hr,ariaChecked:hr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Qt,ariaCurrent:null,ariaDescribedBy:Qt,ariaDetails:null,ariaDisabled:hr,ariaDropEffect:Qt,ariaErrorMessage:null,ariaExpanded:hr,ariaFlowTo:Qt,ariaGrabbed:hr,ariaHasPopup:null,ariaHidden:hr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qt,ariaLevel:Se,ariaLive:null,ariaModal:hr,ariaMultiLine:hr,ariaMultiSelectable:hr,ariaOrientation:null,ariaOwns:Qt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:hr,ariaReadOnly:hr,ariaRelevant:null,ariaRequired:hr,ariaRoleDescription:Qt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:hr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),T4=Ya({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Mk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ja,acceptCharset:Qt,accessKey:Qt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Qt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Qt,cols:Se,colSpan:null,content:null,contentEditable:hr,controls:yt,controlsList:Qt,coords:Se|Ja,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:Ak,draggable:hr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Qt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Qt,httpEquiv:Qt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Qt,itemRef:Qt,itemScope:yt,itemType:Qt,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:Qt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Qt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Qt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:hr,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:hr,width:Se,wrap:null,align:null,aLink:null,archive:Qt,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:hr,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}}),$4=Ya({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",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:Nk,properties:{about:xn,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:Qt,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:Ja,g2:Ja,glyphName:Ja,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:xn,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:Qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,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:xn,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:xn,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:xn,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}}),O4=/^data[-\w.:]+$/i,Fk=/-[a-z]/g,C4=/[A-Z]/g;function A4(e,t){const r=vy(t);let n=t,o=Mn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&O4.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Fk,R4);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Fk.test(i)){let a=i.replace(C4,I4);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=xy}return new o(n,t)}function I4(e){return"-"+e.toLowerCase()}function R4(e){return e.charAt(1).toUpperCase()}const P4={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"},N4=Ck([Pk,Rk,jk,Dk,T4],"html"),Sy=Ck([Pk,Rk,jk,Dk,$4],"svg");function M4(e){return e.join(" ").trim()}var Lk={},qk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,j4=/\n/g,D4=/^\s*/,F4=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,L4=/^:\s*/,q4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,B4=/^[;\s]*/,U4=/^\s+|\s+$/g,z4=`
|
|
103
|
+
Check the top-level render call using <`+Ae+">.")}return ge}}function er(j,ge){{if(!j._store||j._store.validated||j.key!=null)return;j._store.validated=!0;var Ae=bt(ge);if(vt[Ae])return;vt[Ae]=!0;var Ye="";j&&j._owner&&j._owner!==gt.current&&(Ye=" It was passed a child from "+U(j._owner.type)+"."),sr(j),v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',Ae,Ye),sr(null)}}function tr(j,ge){{if(typeof j!="object")return;if(je(j))for(var Ae=0;Ae<j.length;Ae++){var Ye=j[Ae];Yt(Ye)&&er(Ye,ge)}else if(Yt(j))j._store&&(j._store.validated=!0);else if(j){var $t=m(j);if(typeof $t=="function"&&$t!==j.entries)for(var Ft=$t.call(j),it;!(it=Ft.next()).done;)Yt(it.value)&&er(it.value,ge)}}}function lr(j){{var ge=j.type;if(ge==null||typeof ge=="string")return;var Ae;if(typeof ge=="function")Ae=ge.propTypes;else if(typeof ge=="object"&&(ge.$$typeof===c||ge.$$typeof===d))Ae=ge.propTypes;else return;if(Ae){var Ye=U(ge);De(Ae,j.props,"prop",Ye,j)}else if(ge.PropTypes!==void 0&&!$r){$r=!0;var $t=U(ge);v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",$t||"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 Gt(j){{for(var ge=Object.keys(j.props),Ae=0;Ae<ge.length;Ae++){var Ye=ge[Ae];if(Ye!=="children"&&Ye!=="key"){sr(j),v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Ye),sr(null);break}}j.ref!==null&&(sr(j),v("Invalid attribute `ref` supplied to `React.Fragment`."),sr(null))}}function Or(j,ge,Ae,Ye,$t,Ft){{var it=A(j);if(!it){var nt="";(j===void 0||typeof j=="object"&&j!==null&&Object.keys(j).length===0)&&(nt+=" 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 ur=ln($t);ur?nt+=ur:nt+=cr();var zt;j===null?zt="null":je(j)?zt="array":j!==void 0&&j.$$typeof===t?(zt="<"+(U(j.type)||"Unknown")+" />",nt=" Did you accidentally export a JSX literal instead of a component?"):zt=typeof j,v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",zt,nt)}var Xt=Ke(j,ge,Ae,$t,Ft);if(Xt==null)return Xt;if(it){var bn=ge.children;if(bn!==void 0)if(Ye)if(je(bn)){for(var qi=0;qi<bn.length;qi++)tr(bn[qi],j);Object.freeze&&Object.freeze(bn)}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 tr(bn,j)}return j===n?Gt(Xt):lr(Xt),Xt}}function vr(j,ge,Ae){return Or(j,ge,Ae,!0)}function vn(j,ge,Ae){return Or(j,ge,Ae,!1)}var Li=vn,Xs=vr;kc.Fragment=n,kc.jsx=Li,kc.jsxs=Xs}()),kc}process.env.NODE_ENV==="production"?iy.exports=MU():iy.exports=jU();var Y=iy.exports;function wr(){return wr=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},wr.apply(this,arguments)}function ay(e,t=[]){let r=[];function n(i,a){const s=O.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=O.useMemo(()=>h,Object.values(h));return O.createElement(y.Provider,{value:m},f)}function u(d,p){const f=(p==null?void 0:p[e][c])||s,h=O.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=>O.createContext(a));return function(s){const c=(s==null?void 0:s[e])||i;return O.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[n,DU(o,...t)]}function DU(...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 O.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return r.scopeName=t.scopeName,r}function ci(e){const t=O.useRef(e);return O.useEffect(()=>{t.current=e}),O.useMemo(()=>(...r)=>{var n;return(n=t.current)===null||n===void 0?void 0:n.call(t,...r)},[])}const Tc=globalThis!=null&&globalThis.document?O.useLayoutEffect:()=>{};function li(){return li=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},li.apply(null,arguments)}function FU(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function BE(...e){return t=>e.forEach(r=>FU(r,t))}function Ki(...e){return O.useCallback(BE(...e),e)}const sy=O.forwardRef((e,t)=>{const{children:r,...n}=e,o=O.Children.toArray(r),i=o.find(qU);if(i){const a=i.props.children,s=o.map(c=>c===i?O.Children.count(a)>1?O.Children.only(null):O.isValidElement(a)?a.props.children:null:c);return O.createElement(cy,li({},n,{ref:t}),O.isValidElement(a)?O.cloneElement(a,void 0,s):null)}return O.createElement(cy,li({},n,{ref:t}),r)});sy.displayName="Slot";const cy=O.forwardRef((e,t)=>{const{children:r,...n}=e;return O.isValidElement(r)?O.cloneElement(r,{...BU(n,r.props),ref:t?BE(t,r.ref):r.ref}):O.Children.count(r)>1?O.Children.only(null):null});cy.displayName="SlotClone";const LU=({children:e})=>O.createElement(O.Fragment,null,e);function qU(e){return O.isValidElement(e)&&e.type===LU}function BU(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 Nn=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{const r=O.forwardRef((n,o)=>{const{asChild:i,...a}=n,s=i?sy:t;return O.useEffect(()=>{window[Symbol.for("radix-ui")]=!0},[]),O.createElement(s,li({},a,{ref:o}))});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function UU(e,t){e&&ao.flushSync(()=>e.dispatchEvent(t))}const UE="Avatar",[zU,u_e]=ay(UE),[ZU,zE]=zU(UE),ZE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,...n}=e,[o,i]=O.useState("idle");return O.createElement(ZU,{scope:r,imageLoadingStatus:o,onImageLoadingStatusChange:i},O.createElement(Nn.span,wr({},n,{ref:t})))}),VU="AvatarImage",VE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:o=()=>{},...i}=e,a=zE(VU,r),s=WU(n),c=ci(l=>{o(l),a.onImageLoadingStatusChange(l)});return Tc(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?O.createElement(Nn.img,wr({},i,{ref:t,src:n})):null}),HU="AvatarFallback",HE=O.forwardRef((e,t)=>{const{__scopeAvatar:r,delayMs:n,...o}=e,i=zE(HU,r),[a,s]=O.useState(n===void 0);return O.useEffect(()=>{if(n!==void 0){const c=window.setTimeout(()=>s(!0),n);return()=>window.clearTimeout(c)}},[n]),a&&i.imageLoadingStatus!=="loaded"?O.createElement(Nn.span,wr({},o,{ref:t})):null});function WU(e){const[t,r]=O.useState("idle");return O.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 ly(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 KU(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const GU=(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 WE(e){return Object.entries(e).reduce((t,[r,n])=>{const o=r.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:n}},{})}const JU=2.4,YU=.2126729,XU=.7151522,QU=.072175,e5=.56,t5=.57,r5=.62,n5=.65,Ud=.022,KE=1.414,o5=1.14,i5=1.14,a5=.035991,s5=.035991,c5=27.7847239587675,l5=27.7847239587675,GE=.027,JE=.027,YE=.001,u5=5e-4;function XE(e){const{r:t,g:r,b:n}=e,o=i=>(i/255)**JU;return YU*o(t)+XU*o(r)+QU*o(n)}function QE(e,t){if(!e||!t)return 0;let r=XE(ly(e)),n=XE(ly(t)),o=0,i=0;return r=r>Ud?r:r+(Ud-r)**KE,n=n>Ud?n:n+(Ud-n)**KE,Math.abs(n-r)<u5?0:(n>r?(o=(n**e5-r**t5)*o5,i=o<YE?0:o<a5?o-o*c5*GE:o-GE):(o=(n**n5-r**r5)*i5,i=o>-YE?0:o>-s5?o-o*l5*JE:o+JE),Math.abs(i*100))}let uy=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 d5=new uy;function ek(e,t){let r=`${e} {`;for(const[n,o]of Object.entries(t))r+=`${n}: ${o}; `;return r+="}",r}function tk(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 rk={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,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(Z){var L=["th","st","nd","rd"],q=Z%100;return"["+Z+(L[(q-20)%10]||L[q]||L[0])+"]"}},b=function(Z,L,q){var W=String(Z);return!W||W.length>=L?Z:""+Array(L+1-W.length).join(q)+Z},x={s:b,z:function(Z){var L=-Z.utcOffset(),q=Math.abs(L),W=Math.floor(q/60),J=q%60;return(L<=0?"+":"-")+b(W,2,"0")+":"+b(J,2,"0")},m:function Z(L,q){if(L.date()<q.date())return-Z(q,L);var W=12*(q.year()-L.year())+(q.month()-L.month()),J=L.clone().add(W,d),M=q-J<0,E=L.clone().add(W+(M?-1:1),d);return+(-(W+(q-J)/(M?J-E:E-J))||0)},a:function(Z){return Z<0?Math.ceil(Z)||0:Math.floor(Z)},p:function(Z){return{M:d,y:f,w:u,d:l,D:h,h:c,m:s,s:a,ms:i,Q:p}[Z]||String(Z||"").toLowerCase().replace(/s$/,"")},u:function(Z){return Z===void 0}},w="en",S={};S[w]=v;var $="$isDayjsObject",R=function(Z){return Z instanceof H||!(!Z||!Z[$])},N=function Z(L,q,W){var J;if(!L)return w;if(typeof L=="string"){var M=L.toLowerCase();S[M]&&(J=M),q&&(S[M]=q,J=M);var E=L.split("-");if(!J&&E.length>1)return Z(E[0])}else{var B=L.name;S[B]=L,J=B}return!W&&J&&(w=J),J||!W&&w},A=function(Z,L){if(R(Z))return Z.clone();var q=typeof L=="object"?L:{};return q.date=Z,q.args=arguments,new H(q)},D=x;D.l=N,D.i=R,D.w=function(Z,L){return A(Z,{locale:L.$L,utc:L.$u,x:L.$x,$offset:L.$offset})};var H=function(){function Z(q){this.$L=N(q.locale,null,!0),this.parse(q),this.$x=this.$x||q.x||{},this[$]=!0}var L=Z.prototype;return L.parse=function(q){this.$d=function(W){var J=W.date,M=W.utc;if(J===null)return new Date(NaN);if(D.u(J))return new Date;if(J instanceof Date)return new Date(J);if(typeof J=="string"&&!/Z$/i.test(J)){var E=J.match(m);if(E){var B=E[2]-1||0,Q=(E[7]||"0").substring(0,3);return M?new Date(Date.UTC(E[1],B,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)):new Date(E[1],B,E[3]||1,E[4]||0,E[5]||0,E[6]||0,Q)}}return new Date(J)}(q),this.init()},L.init=function(){var q=this.$d;this.$y=q.getFullYear(),this.$M=q.getMonth(),this.$D=q.getDate(),this.$W=q.getDay(),this.$H=q.getHours(),this.$m=q.getMinutes(),this.$s=q.getSeconds(),this.$ms=q.getMilliseconds()},L.$utils=function(){return D},L.isValid=function(){return this.$d.toString()!==y},L.isSame=function(q,W){var J=A(q);return this.startOf(W)<=J&&J<=this.endOf(W)},L.isAfter=function(q,W){return A(q)<this.startOf(W)},L.isBefore=function(q,W){return this.endOf(W)<A(q)},L.$g=function(q,W,J){return D.u(q)?this[W]:this.set(J,q)},L.unix=function(){return Math.floor(this.valueOf()/1e3)},L.valueOf=function(){return this.$d.getTime()},L.startOf=function(q,W){var J=this,M=!!D.u(W)||W,E=D.p(q),B=function(_e,ye){var le=D.w(J.$u?Date.UTC(J.$y,ye,_e):new Date(J.$y,ye,_e),J);return M?le:le.endOf(l)},Q=function(_e,ye){return D.w(J.toDate()[_e].apply(J.toDate("s"),(M?[0,0,0,0]:[23,59,59,999]).slice(ye)),J)},T=this.$W,ce=this.$M,pe=this.$D,he="set"+(this.$u?"UTC":"");switch(E){case f:return M?B(1,0):B(31,11);case d:return M?B(1,ce):B(0,ce+1);case u:var be=this.$locale().weekStart||0,Ee=(T<be?T+7:T)-be;return B(M?pe-Ee:pe+(6-Ee),ce);case l:case h:return Q(he+"Hours",0);case c:return Q(he+"Minutes",1);case s:return Q(he+"Seconds",2);case a:return Q(he+"Milliseconds",3);default:return this.clone()}},L.endOf=function(q){return this.startOf(q,!1)},L.$set=function(q,W){var J,M=D.p(q),E="set"+(this.$u?"UTC":""),B=(J={},J[l]=E+"Date",J[h]=E+"Date",J[d]=E+"Month",J[f]=E+"FullYear",J[c]=E+"Hours",J[s]=E+"Minutes",J[a]=E+"Seconds",J[i]=E+"Milliseconds",J)[M],Q=M===l?this.$D+(W-this.$W):W;if(M===d||M===f){var T=this.clone().set(h,1);T.$d[B](Q),T.init(),this.$d=T.set(h,Math.min(this.$D,T.daysInMonth())).$d}else B&&this.$d[B](Q);return this.init(),this},L.set=function(q,W){return this.clone().$set(q,W)},L.get=function(q){return this[D.p(q)]()},L.add=function(q,W){var J,M=this;q=Number(q);var E=D.p(W),B=function(ce){var pe=A(M);return D.w(pe.date(pe.date()+Math.round(ce*q)),M)};if(E===d)return this.set(d,this.$M+q);if(E===f)return this.set(f,this.$y+q);if(E===l)return B(1);if(E===u)return B(7);var Q=(J={},J[s]=n,J[c]=o,J[a]=r,J)[E]||1,T=this.$d.getTime()+q*Q;return D.w(T,this)},L.subtract=function(q,W){return this.add(-1*q,W)},L.format=function(q){var W=this,J=this.$locale();if(!this.isValid())return J.invalidDate||y;var M=q||"YYYY-MM-DDTHH:mm:ssZ",E=D.z(this),B=this.$H,Q=this.$m,T=this.$M,ce=J.weekdays,pe=J.months,he=J.meridiem,be=function(ye,le,te,ve){return ye&&(ye[le]||ye(W,M))||te[le].slice(0,ve)},Ee=function(ye){return D.s(B%12||12,ye,"0")},_e=he||function(ye,le,te){var ve=ye<12?"AM":"PM";return te?ve.toLowerCase():ve};return M.replace(g,function(ye,le){return le||function(te){switch(te){case"YY":return String(W.$y).slice(-2);case"YYYY":return D.s(W.$y,4,"0");case"M":return T+1;case"MM":return D.s(T+1,2,"0");case"MMM":return be(J.monthsShort,T,pe,3);case"MMMM":return be(pe,T);case"D":return W.$D;case"DD":return D.s(W.$D,2,"0");case"d":return String(W.$W);case"dd":return be(J.weekdaysMin,W.$W,ce,2);case"ddd":return be(J.weekdaysShort,W.$W,ce,3);case"dddd":return ce[W.$W];case"H":return String(B);case"HH":return D.s(B,2,"0");case"h":return Ee(1);case"hh":return Ee(2);case"a":return _e(B,Q,!0);case"A":return _e(B,Q,!1);case"m":return String(Q);case"mm":return D.s(Q,2,"0");case"s":return String(W.$s);case"ss":return D.s(W.$s,2,"0");case"SSS":return D.s(W.$ms,3,"0");case"Z":return E}return null}(ye)||E.replace(":","")})},L.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},L.diff=function(q,W,J){var M,E=this,B=D.p(W),Q=A(q),T=(Q.utcOffset()-this.utcOffset())*n,ce=this-Q,pe=function(){return D.m(E,Q)};switch(B){case f:M=pe()/12;break;case d:M=pe();break;case p:M=pe()/3;break;case u:M=(ce-T)/6048e5;break;case l:M=(ce-T)/864e5;break;case c:M=ce/o;break;case s:M=ce/n;break;case a:M=ce/r;break;default:M=ce}return J?M:D.a(M)},L.daysInMonth=function(){return this.endOf(d).$D},L.$locale=function(){return S[this.$L]},L.locale=function(q,W){if(!q)return this.$L;var J=this.clone(),M=N(q,W,!0);return M&&(J.$L=M),J},L.clone=function(){return D.w(this.$d,this)},L.toDate=function(){return new Date(this.valueOf())},L.toJSON=function(){return this.isValid()?this.toISOString():null},L.toISOString=function(){return this.$d.toISOString()},L.toString=function(){return this.$d.toUTCString()},Z}(),U=H.prototype;return A.prototype=U,[["$ms",i],["$s",a],["$m",s],["$H",c],["$W",l],["$M",d],["$y",f],["$D",h]].forEach(function(Z){U[Z[1]]=function(L){return this.$g(L,Z[0],Z[1])}}),A.extend=function(Z,L){return Z.$i||(Z(L,H,A),Z.$i=!0),A},A.locale=N,A.isDayjs=R,A.unix=function(Z){return A(1e3*Z)},A.en=S[w],A.Ls=S,A.p={},A})})(rk);var f5=rk.exports;const zd=St(f5);var nk={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,function(){return function(r,n,o){n.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(nk);var p5=nk.exports;const h5=St(p5);var ok={exports:{}};(function(e,t){(function(r,n){e.exports=n()})(He,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)}}})})(ok);var m5=ok.exports;const y5=St(m5);zd.extend(h5),zd.extend(y5);function g5(e,t="day"){if(!e||e.length===0)return[];const r=[];r.push(ik(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;zd(o).isSame(i,t)||r.push(ik(i))}return r}function ik(e){return{id:Ld(),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:v5(e)}}}function v5(e,t=!1){const r=zd(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 b5(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 w5(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function x5(e,t){return e.map(r=>Math.round(r+(255-r)*t))}function S5(e,t){return e.map(r=>Math.round(r*t))}const $c=e=>t=>x5(t,e),Oc=e=>t=>S5(t,e),_5={50:$c(.95),100:$c(.9),200:$c(.75),300:$c(.6),400:$c(.3),500:e=>e,600:Oc(.9),700:Oc(.6),800:Oc(.45),900:Oc(.3),950:Oc(.2)};function ak(e,t=_5){const r={},n=b5(e);for(const[o,i]of Object.entries(t))r[o]=w5(i(n));return r}var Mt;(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})(Mt||(Mt={}));var dy;(function(e){e.mergeShapes=(t,r)=>({...t,...r})})(dy||(dy={}));const Ne=Mt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),ui=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}},ke=Mt.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"]),E5=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Wn 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,Mt.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()}}Wn.create=e=>new Wn(e);const Cc=(e,t)=>{let r;switch(e.code){case ke.invalid_type:e.received===Ne.undefined?r="Required":r=`Expected ${e.expected}, received ${e.received}`;break;case ke.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,Mt.jsonStringifyReplacer)}`;break;case ke.unrecognized_keys:r=`Unrecognized key(s) in object: ${Mt.joinValues(e.keys,", ")}`;break;case ke.invalid_union:r="Invalid input";break;case ke.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Mt.joinValues(e.options)}`;break;case ke.invalid_enum_value:r=`Invalid enum value. Expected ${Mt.joinValues(e.options)}, received '${e.received}'`;break;case ke.invalid_arguments:r="Invalid function arguments";break;case ke.invalid_return_type:r="Invalid function return type";break;case ke.invalid_date:r="Invalid date";break;case ke.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}"`:Mt.assertNever(e.validation):e.validation!=="regex"?r=`Invalid ${e.validation}`:r="Invalid";break;case ke.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 ke.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 ke.custom:r="Invalid input";break;case ke.invalid_intersection_types:r="Intersection results could not be merged";break;case ke.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case ke.not_finite:r="Number must be finite";break;default:r=t.defaultError,Mt.assertNever(e)}return{message:r}};let sk=Cc;function k5(e){sk=e}function Zd(){return sk}const Vd=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}},T5=[];function Me(e,t){const r=Vd({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,Zd(),Cc].filter(n=>!!n)});e.common.issues.push(r)}class Kr{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 lt;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 Kr.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 lt;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 lt=Object.freeze({status:"aborted"}),ck=e=>({status:"dirty",value:e}),on=e=>({status:"valid",value:e}),fy=e=>e.status==="aborted",py=e=>e.status==="dirty",Ac=e=>e.status==="valid",Hd=e=>typeof Promise<"u"&&e instanceof Promise;var Je;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Je||(Je={}));class uo{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 lk=(e,t)=>{if(Ac(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 Wn(e.common.issues);return this._error=r,this._error}}};function ft(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 ui(t.data)}_getOrReturnCtx(t,r){return r||{common:t.parent.common,data:t.data,parsedType:ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Kr,ctx:{common:t.parent.common,data:t.data,parsedType:ui(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const r=this._parse(t);if(Hd(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:ui(t)},i=this._parseSync({data:t,path:o.path,parent:o});return lk(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:ui(t)},o=this._parse({data:t,path:n.path,parent:n}),i=await(Hd(o)?o:Promise.resolve(o));return lk(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:ke.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 Jn({schema:this,typeName:ot.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return qo.create(this,this._def)}nullable(){return Xi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Gn.create(this,this._def)}promise(){return Ka.create(this,this._def)}or(t){return Nc.create([this,t],this._def)}and(t){return Mc.create(this,t,this._def)}transform(t){return new Jn({...ft(this._def),schema:this,typeName:ot.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const r=typeof t=="function"?t:()=>t;return new qc({...ft(this._def),innerType:this,defaultValue:r,typeName:ot.ZodDefault})}brand(){return new dk({typeName:ot.ZodBranded,type:this,...ft(this._def)})}catch(t){const r=typeof t=="function"?t:()=>t;return new Xd({...ft(this._def),innerType:this,catchValue:r,typeName:ot.ZodCatch})}describe(t){const r=this.constructor;return new r({...this._def,description:t})}pipe(t){return Bc.create(this,t)}readonly(){return ef.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $5=/^c[^\s-]{8,}$/i,O5=/^[a-z][a-z0-9]*$/,C5=/^[0-9A-HJKMNP-TV-Z]{26}$/,A5=/^[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,I5=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,R5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let hy;const P5=/^(((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}))$/,N5=/^(([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})))$/,M5=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)&&P5.test(e)||(t==="v6"||!t)&&N5.test(e))}class Kn 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:ke.invalid_type,expected:Ne.string,received:i.parsedType}),lt}const n=new Kr;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:ke.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:ke.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:ke.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):s&&Me(o,{code:ke.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),n.dirty())}else if(i.kind==="email")I5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"email",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="emoji")hy||(hy=new RegExp(R5,"u")),hy.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"emoji",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="uuid")A5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"uuid",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid")$5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="cuid2")O5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"cuid2",code:ke.invalid_string,message:i.message}),n.dirty());else if(i.kind==="ulid")C5.test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{validation:"ulid",code:ke.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:ke.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:ke.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:ke.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:ke.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:ke.invalid_string,validation:{endsWith:i.value},message:i.message}),n.dirty()):i.kind==="datetime"?M5(i).test(t.data)||(o=this._getOrReturnCtx(t,o),Me(o,{code:ke.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:ke.invalid_string,message:i.message}),n.dirty()):Mt.assertNever(i);return{status:n.value,value:t.data}}_regex(t,r,n){return this.refinement(o=>t.test(o),{validation:r,code:ke.invalid_string,...Je.errToObj(n)})}_addCheck(t){return new Kn({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Je.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Je.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Je.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Je.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Je.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Je.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Je.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Je.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,...Je.errToObj(t==null?void 0:t.message)})}regex(t,r){return this._addCheck({kind:"regex",regex:t,...Je.errToObj(r)})}includes(t,r){return this._addCheck({kind:"includes",value:t,position:r==null?void 0:r.position,...Je.errToObj(r==null?void 0:r.message)})}startsWith(t,r){return this._addCheck({kind:"startsWith",value:t,...Je.errToObj(r)})}endsWith(t,r){return this._addCheck({kind:"endsWith",value:t,...Je.errToObj(r)})}min(t,r){return this._addCheck({kind:"min",value:t,...Je.errToObj(r)})}max(t,r){return this._addCheck({kind:"max",value:t,...Je.errToObj(r)})}length(t,r){return this._addCheck({kind:"length",value:t,...Je.errToObj(r)})}nonempty(t){return this.min(1,Je.errToObj(t))}trim(){return new Kn({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Kn({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Kn({...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}}Kn.create=e=>{var t;return new Kn({checks:[],typeName:ot.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ft(e)})};function D5(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 di 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:ke.invalid_type,expected:Ne.number,received:i.parsedType}),lt}let n;const o=new Kr;for(const i of this._def.checks)i.kind==="int"?Mt.isInteger(t.data)||(n=this._getOrReturnCtx(t,n),Me(n,{code:ke.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:ke.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:ke.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),o.dirty()):i.kind==="multipleOf"?D5(t.data,i.value)!==0&&(n=this._getOrReturnCtx(t,n),Me(n,{code:ke.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:ke.not_finite,message:i.message}),o.dirty()):Mt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Je.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Je.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Je.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Je.toString(r))}setLimit(t,r,n,o){return new di({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Je.toString(o)}]})}_addCheck(t){return new di({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Je.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Je.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Je.toString(r)})}finite(t){return this._addCheck({kind:"finite",message:Je.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Je.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Je.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"&&Mt.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)}}di.create=e=>new di({checks:[],typeName:ot.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...ft(e)});class fi 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:ke.invalid_type,expected:Ne.bigint,received:i.parsedType}),lt}let n;const o=new Kr;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:ke.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:ke.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:ke.not_multiple_of,multipleOf:i.value,message:i.message}),o.dirty()):Mt.assertNever(i);return{status:o.value,value:t.data}}gte(t,r){return this.setLimit("min",t,!0,Je.toString(r))}gt(t,r){return this.setLimit("min",t,!1,Je.toString(r))}lte(t,r){return this.setLimit("max",t,!0,Je.toString(r))}lt(t,r){return this.setLimit("max",t,!1,Je.toString(r))}setLimit(t,r,n,o){return new fi({...this._def,checks:[...this._def.checks,{kind:t,value:r,inclusive:n,message:Je.toString(o)}]})}_addCheck(t){return new fi({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Je.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Je.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Je.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Je.toString(t)})}multipleOf(t,r){return this._addCheck({kind:"multipleOf",value:t,message:Je.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}}fi.create=e=>{var t;return new fi({checks:[],typeName:ot.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...ft(e)})};class Ic 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:ke.invalid_type,expected:Ne.boolean,received:n.parsedType}),lt}return on(t.data)}}Ic.create=e=>new Ic({typeName:ot.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...ft(e)});class Gi 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:ke.invalid_type,expected:Ne.date,received:i.parsedType}),lt}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return Me(i,{code:ke.invalid_date}),lt}const n=new Kr;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:ke.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:ke.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),n.dirty()):Mt.assertNever(i);return{status:n.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Gi({...this._def,checks:[...this._def.checks,t]})}min(t,r){return this._addCheck({kind:"min",value:t.getTime(),message:Je.toString(r)})}max(t,r){return this._addCheck({kind:"max",value:t.getTime(),message:Je.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}}Gi.create=e=>new Gi({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:ot.ZodDate,...ft(e)});class Wd extends mt{_parse(t){if(this._getType(t)!==Ne.symbol){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.symbol,received:n.parsedType}),lt}return on(t.data)}}Wd.create=e=>new Wd({typeName:ot.ZodSymbol,...ft(e)});class Rc extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.undefined,received:n.parsedType}),lt}return on(t.data)}}Rc.create=e=>new Rc({typeName:ot.ZodUndefined,...ft(e)});class Pc extends mt{_parse(t){if(this._getType(t)!==Ne.null){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.null,received:n.parsedType}),lt}return on(t.data)}}Pc.create=e=>new Pc({typeName:ot.ZodNull,...ft(e)});class Va extends mt{constructor(){super(...arguments),this._any=!0}_parse(t){return on(t.data)}}Va.create=e=>new Va({typeName:ot.ZodAny,...ft(e)});class Ji extends mt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return on(t.data)}}Ji.create=e=>new Ji({typeName:ot.ZodUnknown,...ft(e)});class Lo extends mt{_parse(t){const r=this._getOrReturnCtx(t);return Me(r,{code:ke.invalid_type,expected:Ne.never,received:r.parsedType}),lt}}Lo.create=e=>new Lo({typeName:ot.ZodNever,...ft(e)});class Kd extends mt{_parse(t){if(this._getType(t)!==Ne.undefined){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.void,received:n.parsedType}),lt}return on(t.data)}}Kd.create=e=>new Kd({typeName:ot.ZodVoid,...ft(e)});class Gn extends mt{_parse(t){const{ctx:r,status:n}=this._processInputParams(t),o=this._def;if(r.parsedType!==Ne.array)return Me(r,{code:ke.invalid_type,expected:Ne.array,received:r.parsedType}),lt;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?ke.too_big:ke.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:ke.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:ke.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 uo(r,a,r.path,s)))).then(a=>Kr.mergeArray(n,a));const i=[...r.data].map((a,s)=>o.type._parseSync(new uo(r,a,r.path,s)));return Kr.mergeArray(n,i)}get element(){return this._def.type}min(t,r){return new Gn({...this._def,minLength:{value:t,message:Je.toString(r)}})}max(t,r){return new Gn({...this._def,maxLength:{value:t,message:Je.toString(r)}})}length(t,r){return new Gn({...this._def,exactLength:{value:t,message:Je.toString(r)}})}nonempty(t){return this.min(1,t)}}Gn.create=(e,t)=>new Gn({type:e,minLength:null,maxLength:null,exactLength:null,typeName:ot.ZodArray,...ft(t)});function Ha(e){if(e instanceof rr){const t={};for(const r in e.shape){const n=e.shape[r];t[r]=qo.create(Ha(n))}return new rr({...e._def,shape:()=>t})}else return e instanceof Gn?new Gn({...e._def,type:Ha(e.element)}):e instanceof qo?qo.create(Ha(e.unwrap())):e instanceof Xi?Xi.create(Ha(e.unwrap())):e instanceof fo?fo.create(e.items.map(t=>Ha(t))):e}class rr 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=Mt.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:ke.invalid_type,expected:Ne.object,received:l.parsedType}),lt}const{status:n,ctx:o}=this._processInputParams(t),{shape:i,keys:a}=this._getCached(),s=[];if(!(this._def.catchall instanceof Lo&&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 uo(o,d,o.path,l)),alwaysSet:l in o.data})}if(this._def.catchall instanceof Lo){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:ke.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 uo(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=>Kr.mergeObjectSync(n,l)):Kr.mergeObjectSync(n,c)}get shape(){return this._def.shape()}strict(t){return Je.errToObj,new rr({...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=Je.errToObj(t).message)!==null&&s!==void 0?s:c}:{message:c}}}:{}})}strip(){return new rr({...this._def,unknownKeys:"strip"})}passthrough(){return new rr({...this._def,unknownKeys:"passthrough"})}extend(t){return new rr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new rr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:ot.ZodObject})}setKey(t,r){return this.augment({[t]:r})}catchall(t){return new rr({...this._def,catchall:t})}pick(t){const r={};return Mt.objectKeys(t).forEach(n=>{t[n]&&this.shape[n]&&(r[n]=this.shape[n])}),new rr({...this._def,shape:()=>r})}omit(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{t[n]||(r[n]=this.shape[n])}),new rr({...this._def,shape:()=>r})}deepPartial(){return Ha(this)}partial(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{const o=this.shape[n];t&&!t[n]?r[n]=o:r[n]=o.optional()}),new rr({...this._def,shape:()=>r})}required(t){const r={};return Mt.objectKeys(this.shape).forEach(n=>{if(t&&!t[n])r[n]=this.shape[n];else{let i=this.shape[n];for(;i instanceof qo;)i=i._def.innerType;r[n]=i}}),new rr({...this._def,shape:()=>r})}keyof(){return uk(Mt.objectKeys(this.shape))}}rr.create=(e,t)=>new rr({shape:()=>e,unknownKeys:"strip",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)}),rr.strictCreate=(e,t)=>new rr({shape:()=>e,unknownKeys:"strict",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)}),rr.lazycreate=(e,t)=>new rr({shape:e,unknownKeys:"strip",catchall:Lo.create(),typeName:ot.ZodObject,...ft(t)});class Nc 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 Wn(s.ctx.common.issues));return Me(r,{code:ke.invalid_union,unionErrors:a}),lt}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 Wn(c));return Me(r,{code:ke.invalid_union,unionErrors:s}),lt}}get options(){return this._def.options}}Nc.create=(e,t)=>new Nc({options:e,typeName:ot.ZodUnion,...ft(t)});const Gd=e=>e instanceof Dc?Gd(e.schema):e instanceof Jn?Gd(e.innerType()):e instanceof Fc?[e.value]:e instanceof pi?e.options:e instanceof Lc?Object.keys(e.enum):e instanceof qc?Gd(e._def.innerType):e instanceof Rc?[void 0]:e instanceof Pc?[null]:null;class Jd extends mt{_parse(t){const{ctx:r}=this._processInputParams(t);if(r.parsedType!==Ne.object)return Me(r,{code:ke.invalid_type,expected:Ne.object,received:r.parsedType}),lt;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:ke.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),lt)}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=Gd(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 Jd({typeName:ot.ZodDiscriminatedUnion,discriminator:t,options:r,optionsMap:o,...ft(n)})}}function my(e,t){const r=ui(e),n=ui(t);if(e===t)return{valid:!0,data:e};if(r===Ne.object&&n===Ne.object){const o=Mt.objectKeys(t),i=Mt.objectKeys(e).filter(s=>o.indexOf(s)!==-1),a={...e,...t};for(const s of i){const c=my(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=my(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 Mc extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t),o=(i,a)=>{if(fy(i)||fy(a))return lt;const s=my(i.value,a.value);return s.valid?((py(i)||py(a))&&r.dirty(),{status:r.value,value:s.data}):(Me(n,{code:ke.invalid_intersection_types}),lt)};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}))}}Mc.create=(e,t,r)=>new Mc({left:e,right:t,typeName:ot.ZodIntersection,...ft(r)});class fo extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.array)return Me(n,{code:ke.invalid_type,expected:Ne.array,received:n.parsedType}),lt;if(n.data.length<this._def.items.length)return Me(n,{code:ke.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),lt;!this._def.rest&&n.data.length>this._def.items.length&&(Me(n,{code:ke.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 uo(n,a,n.path,s)):null}).filter(a=>!!a);return n.common.async?Promise.all(i).then(a=>Kr.mergeArray(r,a)):Kr.mergeArray(r,i)}get items(){return this._def.items}rest(t){return new fo({...this._def,rest:t})}}fo.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new fo({items:e,typeName:ot.ZodTuple,rest:null,...ft(t)})};class jc 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:ke.invalid_type,expected:Ne.object,received:n.parsedType}),lt;const o=[],i=this._def.keyType,a=this._def.valueType;for(const s in n.data)o.push({key:i._parse(new uo(n,s,n.path,s)),value:a._parse(new uo(n,n.data[s],n.path,s))});return n.common.async?Kr.mergeObjectAsync(r,o):Kr.mergeObjectSync(r,o)}get element(){return this._def.valueType}static create(t,r,n){return r instanceof mt?new jc({keyType:t,valueType:r,typeName:ot.ZodRecord,...ft(n)}):new jc({keyType:Kn.create(),valueType:t,typeName:ot.ZodRecord,...ft(r)})}}class Yd 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:ke.invalid_type,expected:Ne.map,received:n.parsedType}),lt;const o=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([s,c],l)=>({key:o._parse(new uo(n,s,n.path,[l,"key"])),value:i._parse(new uo(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 lt;(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 lt;(l.status==="dirty"||u.status==="dirty")&&r.dirty(),s.set(l.value,u.value)}return{status:r.value,value:s}}}}Yd.create=(e,t,r)=>new Yd({valueType:t,keyType:e,typeName:ot.ZodMap,...ft(r)});class Yi extends mt{_parse(t){const{status:r,ctx:n}=this._processInputParams(t);if(n.parsedType!==Ne.set)return Me(n,{code:ke.invalid_type,expected:Ne.set,received:n.parsedType}),lt;const o=this._def;o.minSize!==null&&n.data.size<o.minSize.value&&(Me(n,{code:ke.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:ke.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 lt;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 uo(n,c,n.path,l)));return n.common.async?Promise.all(s).then(c=>a(c)):a(s)}min(t,r){return new Yi({...this._def,minSize:{value:t,message:Je.toString(r)}})}max(t,r){return new Yi({...this._def,maxSize:{value:t,message:Je.toString(r)}})}size(t,r){return this.min(t,r).max(t,r)}nonempty(t){return this.min(1,t)}}Yi.create=(e,t)=>new Yi({valueType:e,minSize:null,maxSize:null,typeName:ot.ZodSet,...ft(t)});class Wa 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:ke.invalid_type,expected:Ne.function,received:r.parsedType}),lt;function n(s,c){return Vd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zd(),Cc].filter(l=>!!l),issueData:{code:ke.invalid_arguments,argumentsError:c}})}function o(s,c){return Vd({data:s,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,Zd(),Cc].filter(l=>!!l),issueData:{code:ke.invalid_return_type,returnTypeError:c}})}const i={errorMap:r.common.contextualErrorMap},a=r.data;if(this._def.returns instanceof Ka){const s=this;return on(async function(...c){const l=new Wn([]),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 on(function(...c){const l=s._def.args.safeParse(c,i);if(!l.success)throw new Wn([n(c,l.error)]);const u=Reflect.apply(a,this,l.data),d=s._def.returns.safeParse(u,i);if(!d.success)throw new Wn([o(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new Wa({...this._def,args:fo.create(t).rest(Ji.create())})}returns(t){return new Wa({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,r,n){return new Wa({args:t||fo.create([]).rest(Ji.create()),returns:r||Ji.create(),typeName:ot.ZodFunction,...ft(n)})}}class Dc 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})}}Dc.create=(e,t)=>new Dc({getter:e,typeName:ot.ZodLazy,...ft(t)});class Fc extends mt{_parse(t){if(t.data!==this._def.value){const r=this._getOrReturnCtx(t);return Me(r,{received:r.data,code:ke.invalid_literal,expected:this._def.value}),lt}return{status:"valid",value:t.data}}get value(){return this._def.value}}Fc.create=(e,t)=>new Fc({value:e,typeName:ot.ZodLiteral,...ft(t)});function uk(e,t){return new pi({values:e,typeName:ot.ZodEnum,...ft(t)})}class pi extends mt{_parse(t){if(typeof t.data!="string"){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{expected:Mt.joinValues(n),received:r.parsedType,code:ke.invalid_type}),lt}if(this._def.values.indexOf(t.data)===-1){const r=this._getOrReturnCtx(t),n=this._def.values;return Me(r,{received:r.data,code:ke.invalid_enum_value,options:n}),lt}return on(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 pi.create(t)}exclude(t){return pi.create(this.options.filter(r=>!t.includes(r)))}}pi.create=uk;class Lc extends mt{_parse(t){const r=Mt.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(t);if(n.parsedType!==Ne.string&&n.parsedType!==Ne.number){const o=Mt.objectValues(r);return Me(n,{expected:Mt.joinValues(o),received:n.parsedType,code:ke.invalid_type}),lt}if(r.indexOf(t.data)===-1){const o=Mt.objectValues(r);return Me(n,{received:n.data,code:ke.invalid_enum_value,options:o}),lt}return on(t.data)}get enum(){return this._def.values}}Lc.create=(e,t)=>new Lc({values:e,typeName:ot.ZodNativeEnum,...ft(t)});class Ka 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:ke.invalid_type,expected:Ne.promise,received:r.parsedType}),lt;const n=r.parsedType===Ne.promise?r.data:Promise.resolve(r.data);return on(n.then(o=>this._def.type.parseAsync(o,{path:r.path,errorMap:r.common.contextualErrorMap})))}}Ka.create=(e,t)=>new Ka({type:e,typeName:ot.ZodPromise,...ft(t)});class Jn extends mt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===ot.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"?lt:(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"?lt:(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(!Ac(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=>Ac(a)?Promise.resolve(o.transform(a.value,i)).then(s=>({status:r.value,value:s})):a);Mt.assertNever(o)}}Jn.create=(e,t,r)=>new Jn({schema:e,typeName:ot.ZodEffects,effect:t,...ft(r)}),Jn.createWithPreprocess=(e,t,r)=>new Jn({schema:t,effect:{type:"preprocess",transform:e},typeName:ot.ZodEffects,...ft(r)});class qo extends mt{_parse(t){return this._getType(t)===Ne.undefined?on(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}qo.create=(e,t)=>new qo({innerType:e,typeName:ot.ZodOptional,...ft(t)});class Xi extends mt{_parse(t){return this._getType(t)===Ne.null?on(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Xi.create=(e,t)=>new Xi({innerType:e,typeName:ot.ZodNullable,...ft(t)});class qc 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}}qc.create=(e,t)=>new qc({innerType:e,typeName:ot.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...ft(t)});class Xd 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 Hd(o)?o.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Wn(n.common.issues)},input:n.data})})):{status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new Wn(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Xd.create=(e,t)=>new Xd({innerType:e,typeName:ot.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...ft(t)});class Qd extends mt{_parse(t){if(this._getType(t)!==Ne.nan){const n=this._getOrReturnCtx(t);return Me(n,{code:ke.invalid_type,expected:Ne.nan,received:n.parsedType}),lt}return{status:"valid",value:t.data}}}Qd.create=e=>new Qd({typeName:ot.ZodNaN,...ft(e)});const F5=Symbol("zod_brand");class dk 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 Bc 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"?lt:i.status==="dirty"?(r.dirty(),ck(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"?lt: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 Bc({in:t,out:r,typeName:ot.ZodPipeline})}}class ef extends mt{_parse(t){const r=this._def.innerType._parse(t);return Ac(r)&&(r.value=Object.freeze(r.value)),r}}ef.create=(e,t)=>new ef({innerType:e,typeName:ot.ZodReadonly,...ft(t)});const fk=(e,t={},r)=>e?Va.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})}}):Va.create(),L5={object:rr.lazycreate};var ot;(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"})(ot||(ot={}));const q5=(e,t={message:`Input not instance of ${e.name}`})=>fk(r=>r instanceof e,t),pk=Kn.create,hk=di.create,B5=Qd.create,U5=fi.create,mk=Ic.create,z5=Gi.create,Z5=Wd.create,V5=Rc.create,H5=Pc.create,W5=Va.create,K5=Ji.create,G5=Lo.create,J5=Kd.create,Y5=Gn.create,X5=rr.create,Q5=rr.strictCreate,e4=Nc.create,t4=Jd.create,r4=Mc.create,n4=fo.create,o4=jc.create,i4=Yd.create,a4=Yi.create,s4=Wa.create,c4=Dc.create,l4=Fc.create,u4=pi.create,d4=Lc.create,f4=Ka.create,yk=Jn.create,p4=qo.create,h4=Xi.create,m4=Jn.createWithPreprocess,y4=Bc.create;var V=Object.freeze({__proto__:null,defaultErrorMap:Cc,setErrorMap:k5,getErrorMap:Zd,makeIssue:Vd,EMPTY_PATH:T5,addIssueToContext:Me,ParseStatus:Kr,INVALID:lt,DIRTY:ck,OK:on,isAborted:fy,isDirty:py,isValid:Ac,isAsync:Hd,get util(){return Mt},get objectUtil(){return dy},ZodParsedType:Ne,getParsedType:ui,ZodType:mt,ZodString:Kn,ZodNumber:di,ZodBigInt:fi,ZodBoolean:Ic,ZodDate:Gi,ZodSymbol:Wd,ZodUndefined:Rc,ZodNull:Pc,ZodAny:Va,ZodUnknown:Ji,ZodNever:Lo,ZodVoid:Kd,ZodArray:Gn,ZodObject:rr,ZodUnion:Nc,ZodDiscriminatedUnion:Jd,ZodIntersection:Mc,ZodTuple:fo,ZodRecord:jc,ZodMap:Yd,ZodSet:Yi,ZodFunction:Wa,ZodLazy:Dc,ZodLiteral:Fc,ZodEnum:pi,ZodNativeEnum:Lc,ZodPromise:Ka,ZodEffects:Jn,ZodTransformer:Jn,ZodOptional:qo,ZodNullable:Xi,ZodDefault:qc,ZodCatch:Xd,ZodNaN:Qd,BRAND:F5,ZodBranded:dk,ZodPipeline:Bc,ZodReadonly:ef,custom:fk,Schema:mt,ZodSchema:mt,late:L5,get ZodFirstPartyTypeKind(){return ot},coerce:{string:e=>Kn.create({...e,coerce:!0}),number:e=>di.create({...e,coerce:!0}),boolean:e=>Ic.create({...e,coerce:!0}),bigint:e=>fi.create({...e,coerce:!0}),date:e=>Gi.create({...e,coerce:!0})},any:W5,array:Y5,bigint:U5,boolean:mk,date:z5,discriminatedUnion:t4,effect:yk,enum:u4,function:s4,instanceof:q5,intersection:r4,lazy:c4,literal:l4,map:i4,nan:B5,nativeEnum:d4,never:G5,null:H5,nullable:h4,number:hk,object:X5,oboolean:()=>mk().optional(),onumber:()=>hk().optional(),optional:p4,ostring:()=>pk().optional(),pipeline:y4,preprocess:m4,promise:f4,record:o4,set:a4,strictObject:Q5,string:pk,symbol:Z5,transformer:yk,tuple:n4,undefined:V5,union:e4,unknown:K5,void:J5,NEVER:lt,ZodIssueCode:ke,quotelessJson:E5,ZodError:Wn});const Ga=V.object({title:V.string().optional(),link:V.string().optional()}),yy=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()}),gk=V.object({composerPlaceholder:V.string().optional(),botName:V.string().optional(),botAvatar:V.string().optional(),botDescription:V.string().optional(),website:Ga.optional(),email:Ga.optional(),phone:Ga.optional(),privacyPolicy:Ga.optional(),termsOfService:Ga.optional(),showPoweredBy:V.boolean().optional()}).merge(yy),vk=V.enum(["heading1","heading2","heading3","text","horizontalRule","link","italic","bold","orderedList","unorderedList","listItem","lineBreak","pre"]),bk=V.object({}).passthrough().transform(e=>e),$e=V.object({className:V.string().optional(),style:bk.optional()}),tf=V.object({container:$e.optional(),image:$e.optional(),fallback:$e.optional()}),wk=V.object({button:$e.optional(),text:V.record(vk,$e.optional()),image:V.object({image:$e.optional(),placeholder:$e.optional()}).optional(),audio:$e.optional(),video:$e.optional(),file:V.object({container:$e.optional(),title:$e.optional(),icon:$e.optional()}).optional(),location:V.object({container:$e.optional(),title:$e.optional(),icon:$e.optional()}).optional(),column:$e.optional(),row:$e.optional(),bubble:$e.optional(),carousel:V.object({container:$e.optional(),slidesContainer:$e.optional(),backButton:$e.optional(),nextButton:$e.optional()}).optional(),dropdown:V.object({button:V.object({container:$e.optional(),icon:$e.optional(),text:$e.optional()}).optional(),content:V.object({container:$e.optional(),item:$e.optional()}).optional()}).optional()}),xk=V.object({container:$e.optional(),modal:V.object({overlay:$e.optional(),container:$e.optional(),dialog:V.object({container:$e.optional(),title:V.object({container:$e.optional(),text:$e.optional(),closeIcon:$e.optional()}).optional(),content:$e.optional(),newConversation:V.object({text:$e.optional(),button:$e.optional()}).optional()}).optional()}).optional(),notification:V.object({container:$e.optional(),title:$e.optional(),description:$e.optional(),icon:$e.optional(),closeIcon:$e.optional()}).optional(),header:V.object({container:$e.optional(),content:V.object({container:$e.optional(),title:$e.optional(),description:$e.optional(),avatar:tf.optional(),actions:V.object({container:$e.optional(),icons:$e.optional()}).optional()}),expandedContent:V.object({container:$e.optional(),group:$e.optional(),descriptionItems:V.object({container:$e.optional(),icon:$e.optional(),text:$e.optional(),link:$e.optional(),poweredBy:$e.optional()}).optional()}).optional(),description:V.object({container:$e.optional(),title:$e.optional(),subtitle:$e.optional()}).optional(),newConversationIcon:$e.optional()}).optional(),composer:V.object({container:$e.optional(),input:$e.optional(),uploadButton:V.object({container:$e.optional(),icon:$e.optional()}).optional(),button:V.object({container:$e.optional(),icon:$e.optional()}).optional()}).optional(),fab:V.object({icon:$e.optional(),container:$e.optional()}).optional(),messageList:V.object({scrollbar:V.object({container:$e.optional(),viewport:$e.optional(),thumb:$e.optional(),corner:$e.optional(),background:$e.optional()}).optional(),container:$e.optional(),marquee:V.object({content:$e.optional(),title:$e.optional(),description:$e.optional(),avatar:tf.optional(),container:$e.optional()}).optional(),scrollDownButton:V.object({container:$e.optional(),button:$e.optional(),icon:$e.optional()}).optional()}).optional(),message:V.object({container:$e.optional(),avatar:tf.optional(),blocks:wk.optional()}).optional(),loadingIndicator:V.object({container:$e.optional(),loader:$e.optional()}).optional()}),Sk=V.enum(["opened","closed","initial"]),_k=V.object({name:V.string().optional(),pictureUrl:V.string().optional(),data:V.record(V.unknown()).optional()}),Ek=V.enum(["messaging","pushpin"]),kk=V.object({configuration:gk.optional().catch(void 0),theme:xk.optional().catch(void 0),style:V.string().optional().catch(void 0),user:_k.optional().catch(void 0)}),g4=kk.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:Ek.optional().catch(void 0),defaultState:Sk.optional().catch(void 0)});function Tk(e){const{fontFamily:t,radius:r,themeMode:n,variant:o,color:i}=yy.parse(e);let a={},s={};if(i){const u=ak(i),d=n==="dark"?WE(u):u,p=ak(KU(GU(ly(i)))),f=n==="dark"?WE(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?QE(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?QE(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},ek(":root",a)+(t?ek(".bpContainer",{"font-family":`var(--${t}-font)`}):"")}const gy=O.forwardRef(({userId:e,src:t,container:r,image:n,fallback:o,...i},a)=>{const s=tk(e??"",15);return Y.jsxs(ZE,{ref:a,"data-color":s,...r,...i,children:[Y.jsx(VE,{src:t,...n}),Y.jsx(HE,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});function y_e(){}function g_e(){}function v4(e,t){const r=t||{};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const b4=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,w4=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,x4={};function $k(e,t){return((t||x4).jsx?w4:b4).test(e)}const S4=/[ \t\n\f\r]/g;function _4(e){return typeof e=="object"?e.type==="text"?Ok(e.value):!1:Ok(e)}function Ok(e){return e.replace(S4,"")===""}class Uc{constructor(t,r,n){this.property=t,this.normal=r,n&&(this.space=n)}}Uc.prototype.property={},Uc.prototype.normal={},Uc.prototype.space=null;function Ck(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 Uc(r,n,t)}function vy(e){return e.toLowerCase()}class Mn{constructor(t,r){this.property=t,this.attribute=r}}Mn.prototype.space=null,Mn.prototype.boolean=!1,Mn.prototype.booleanish=!1,Mn.prototype.overloadedBoolean=!1,Mn.prototype.number=!1,Mn.prototype.commaSeparated=!1,Mn.prototype.spaceSeparated=!1,Mn.prototype.commaOrSpaceSeparated=!1,Mn.prototype.mustUseProperty=!1,Mn.prototype.defined=!1;let E4=0;const yt=Qi(),hr=Qi(),Ak=Qi(),Se=Qi(),Qt=Qi(),Ja=Qi(),xn=Qi();function Qi(){return 2**++E4}const by=Object.freeze(Object.defineProperty({__proto__:null,boolean:yt,booleanish:hr,commaOrSpaceSeparated:xn,commaSeparated:Ja,number:Se,overloadedBoolean:Ak,spaceSeparated:Qt},Symbol.toStringTag,{value:"Module"})),wy=Object.keys(by);class xy extends Mn{constructor(t,r,n,o){let i=-1;if(super(t,r),Ik(this,"space",o),typeof n=="number")for(;++i<wy.length;){const a=wy[i];Ik(this,wy[i],(n&by[a])===by[a])}}}xy.prototype.defined=!0;function Ik(e,t,r){r&&(e[t]=r)}const k4={}.hasOwnProperty;function Ya(e){const t={},r={};let n;for(n in e.properties)if(k4.call(e.properties,n)){const o=e.properties[n],i=new xy(n,e.transform(e.attributes||{},n),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(n)&&(i.mustUseProperty=!0),t[n]=i,r[vy(n)]=n,r[vy(i.attribute)]=n}return new Uc(t,r,e.space)}const Rk=Ya({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),Pk=Ya({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Nk(e,t){return t in e?e[t]:t}function Mk(e,t){return Nk(e,t.toLowerCase())}const jk=Ya({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Mk,properties:{xmlns:null,xmlnsXLink:null}}),Dk=Ya({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:hr,ariaAutoComplete:null,ariaBusy:hr,ariaChecked:hr,ariaColCount:Se,ariaColIndex:Se,ariaColSpan:Se,ariaControls:Qt,ariaCurrent:null,ariaDescribedBy:Qt,ariaDetails:null,ariaDisabled:hr,ariaDropEffect:Qt,ariaErrorMessage:null,ariaExpanded:hr,ariaFlowTo:Qt,ariaGrabbed:hr,ariaHasPopup:null,ariaHidden:hr,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qt,ariaLevel:Se,ariaLive:null,ariaModal:hr,ariaMultiLine:hr,ariaMultiSelectable:hr,ariaOrientation:null,ariaOwns:Qt,ariaPlaceholder:null,ariaPosInSet:Se,ariaPressed:hr,ariaReadOnly:hr,ariaRelevant:null,ariaRequired:hr,ariaRoleDescription:Qt,ariaRowCount:Se,ariaRowIndex:Se,ariaRowSpan:Se,ariaSelected:hr,ariaSetSize:Se,ariaSort:null,ariaValueMax:Se,ariaValueMin:Se,ariaValueNow:Se,ariaValueText:null,role:null}}),T4=Ya({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Mk,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ja,acceptCharset:Qt,accessKey:Qt,action:null,allow:null,allowFullScreen:yt,allowPaymentRequest:yt,allowUserMedia:yt,alt:null,as:null,async:yt,autoCapitalize:null,autoComplete:Qt,autoFocus:yt,autoPlay:yt,capture:yt,charSet:null,checked:yt,cite:null,className:Qt,cols:Se,colSpan:null,content:null,contentEditable:hr,controls:yt,controlsList:Qt,coords:Se|Ja,crossOrigin:null,data:null,dateTime:null,decoding:null,default:yt,defer:yt,dir:null,dirName:null,disabled:yt,download:Ak,draggable:hr,encType:null,enterKeyHint:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:yt,formTarget:null,headers:Qt,height:Se,hidden:yt,high:Se,href:null,hrefLang:null,htmlFor:Qt,httpEquiv:Qt,id:null,imageSizes:null,imageSrcSet:null,inputMode:null,integrity:null,is:null,isMap:yt,itemId:null,itemProp:Qt,itemRef:Qt,itemScope:yt,itemType:Qt,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:Qt,placeholder:null,playsInline:yt,poster:null,preload:null,readOnly:yt,referrerPolicy:null,rel:Qt,required:yt,reversed:yt,rows:Se,rowSpan:Se,sandbox:Qt,scope:null,scoped:yt,seamless:yt,selected:yt,shape:null,size:Se,sizes:null,slot:null,span:Se,spellCheck:hr,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:hr,width:Se,wrap:null,align:null,aLink:null,archive:Qt,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:hr,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}}),$4=Ya({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",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:Nk,properties:{about:xn,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:Qt,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:Ja,g2:Ja,glyphName:Ja,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:xn,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:Qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Se,pointsAtY:Se,pointsAtZ:Se,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:xn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:xn,rev:xn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:xn,requiredFeatures:xn,requiredFonts:xn,requiredFormats:xn,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:xn,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:xn,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:xn,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}}),O4=/^data[-\w.:]+$/i,Fk=/-[a-z]/g,C4=/[A-Z]/g;function A4(e,t){const r=vy(t);let n=t,o=Mn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&O4.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Fk,R4);n="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Fk.test(i)){let a=i.replace(C4,I4);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=xy}return new o(n,t)}function I4(e){return"-"+e.toLowerCase()}function R4(e){return e.charAt(1).toUpperCase()}const P4={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"},N4=Ck([Pk,Rk,jk,Dk,T4],"html"),Sy=Ck([Pk,Rk,jk,Dk,$4],"svg");function M4(e){return e.join(" ").trim()}var Lk={},qk=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,j4=/\n/g,D4=/^\s*/,F4=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,L4=/^:\s*/,q4=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,B4=/^[;\s]*/,U4=/^\s+|\s+$/g,z4=`
|
|
104
104
|
`,Bk="/",Uk="*",ea="",Z4="comment",V4="declaration",H4=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(j4);y&&(r+=y.length);var m=h.lastIndexOf(z4);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(D4)}function u(h){var y;for(h=h||[];y=d();)y!==!1&&h.push(y);return h}function d(){var h=i();if(!(Bk!=e.charAt(0)||Uk!=e.charAt(1))){for(var y=2;ea!=e.charAt(y)&&(Uk!=e.charAt(y)||Bk!=e.charAt(y+1));)++y;if(y+=2,ea===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:Z4,comment:m})}}function p(){var h=i(),y=c(F4);if(y){if(d(),!c(L4))return s("property missing ':'");var m=c(q4),g=h({type:V4,property:zk(y[0].replace(qk,ea)),value:m?zk(m[0].replace(qk,ea)):ea});return c(B4),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 zk(e){return e?e.replace(U4,ea):ea}var W4=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lk,"__esModule",{value:!0});var K4=W4(H4);function G4(e,t){var r=null;if(!e||typeof e!="string")return r;var n=(0,K4.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 Zk=Lk.default=G4;const J4=Zk.default||Zk,Vk=Hk("end"),_y=Hk("start");function Hk(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 Y4(e){const t=_y(e),r=Vk(e);if(t&&r)return{start:t,end:r}}function zc(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Wk(e.position):"start"in e||"end"in e?Wk(e):"line"in e||"column"in e?Ey(e):""}function Ey(e){return Kk(e&&e.line)+":"+Kk(e&&e.column)}function Wk(e){return Ey(e&&e.start)+"-"+Ey(e&&e.end)}function Kk(e){return e&&typeof e=="number"?e:1}class Gr 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=zc(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}}Gr.prototype.file="",Gr.prototype.name="",Gr.prototype.reason="",Gr.prototype.message="",Gr.prototype.stack="",Gr.prototype.column=void 0,Gr.prototype.line=void 0,Gr.prototype.ancestors=void 0,Gr.prototype.cause=void 0,Gr.prototype.fatal=void 0,Gr.prototype.place=void 0,Gr.prototype.ruleId=void 0,Gr.prototype.source=void 0;const ky={}.hasOwnProperty,X4=new Map,Q4=/[A-Z]/g,ez=/-([a-z])/g,tz=new Set(["table","tbody","thead","tfoot","tr"]),rz=new Set(["td","th"]),Gk="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nz(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=dz(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=uz(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:N4,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=Jk(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function Jk(e,t,r){if(t.type==="element")return oz(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return iz(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return sz(e,t,r);if(t.type==="mdxjsEsm")return az(e,t);if(t.type==="root")return cz(e,t,r);if(t.type==="text")return lz(e,t)}function oz(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=Xk(e,t.tagName,!1),a=fz(e,t);let s=$y(e,t);return tz.has(t.tagName)&&(s=s.filter(function(c){return typeof c=="string"?!_4(c):!0})),Yk(e,a,i,t),Ty(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function iz(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)}Zc(e,t.position)}function az(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Zc(e,t.position)}function sz(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:Xk(e,t.name,!0),a=pz(e,t),s=$y(e,t);return Yk(e,a,i,t),Ty(a,s),e.ancestors.pop(),e.schema=n,e.create(t,i,a,r)}function cz(e,t,r){const n={};return Ty(n,$y(e,t)),e.create(t,e.Fragment,n,r)}function lz(e,t){return t.value}function Yk(e,t,r,n){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=n)}function Ty(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function uz(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 dz(e,t){return r;function r(n,o,i,a){const s=Array.isArray(i.children),c=_y(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 fz(e,t){const r={};let n,o;for(o in t.properties)if(o!=="children"&&ky.call(t.properties,o)){const i=hz(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&rz.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 pz(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 Zc(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 Zc(e,t.position);else i=n.value===null?!0:n.value;r[o]=i}return r}function $y(e,t){const r=[];let n=-1;const o=e.passKeys?new Map:X4;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=Jk(e,i,a);s!==void 0&&r.push(s)}return r}function hz(e,t,r){const n=A4(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=n.commaSeparated?v4(r):M4(r)),n.property==="style"){let o=typeof r=="object"?r:mz(e,String(r));return e.stylePropertyNameCase==="css"&&(o=yz(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&n.space?P4[n.property]||n.property:n.attribute,r]}}function mz(e,t){const r={};try{J4(t,n)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new Gr("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=Gk+"#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(ez,vz)),r[a]=i}}function Xk(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=$k(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=$k(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(n.type==="Literal"){const o=n.value;return ky.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(n);Zc(e)}function Zc(e,t){const r=new Gr("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=Gk+"#cannot-handle-mdx-estrees-without-createevaluater",r}function yz(e){const t={};let r;for(r in e)ky.call(e,r)&&(t[gz(r)]=e[r]);return t}function gz(e){let t=e.replace(Q4,bz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vz(e,t){return t.toUpperCase()}function bz(e){return"-"+e.toLowerCase()}const Oy={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"]},wz={};function Cy(e,t){const r=t||wz,n=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Qk(e,n,o)}function Qk(e,t,r){if(xz(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 eT(e.children,t,r)}return Array.isArray(e)?eT(e,t,r):""}function eT(e,t,r){const n=[];let o=-1;for(;++o<e.length;)n[o]=Qk(e[o],t,r);return n.join("")}function xz(e){return!!(e&&typeof e=="object")}const tT=document.createElement("i");function Ay(e){const t="&"+e+";";tT.innerHTML=t;const r=tT.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function Sn(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 jn(e,t){return e.length>0?(Sn(e,e.length,0,t),e):t}const rT={}.hasOwnProperty;function nT(e){const t={};let r=-1;for(;++r<e.length;)Sz(t,e[r]);return t}function Sz(e,t){let r;for(r in t){const o=(rT.call(e,r)?e[r]:void 0)||(e[r]={}),i=t[r];let a;if(i)for(a in i){rT.call(o,a)||(o[a]=[]);const s=i[a];_z(o[a],Array.isArray(s)?s:s?[s]:[])}}}function _z(e,t){let r=-1;const n=[];for(;++r<t.length;)(t[r].add==="after"?e:n).push(t[r]);Sn(e,0,0,n)}function oT(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 Yn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const an=hi(/[A-Za-z]/),Jr=hi(/[\dA-Za-z]/),Ez=hi(/[#-'*+\--9=?A-Z^-~]/);function rf(e){return e!==null&&(e<32||e===127)}const Iy=hi(/\d/),kz=hi(/[\dA-Fa-f]/),Tz=hi(/[!-/:-@[-`{-~]/);function et(e){return e!==null&&e<-2}function Ht(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const nf=hi(/\p{P}|\p{S}/u),ta=hi(/\s/);function hi(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Xa(e){const t=[];let r=-1,n=0,o=0;for(;++r<e.length;){const i=e.charCodeAt(r);let a="";if(i===37&&Jr(e.charCodeAt(r+1))&&Jr(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 $z={tokenize:Oz};function Oz(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 Cz={tokenize:Az},iT={tokenize:Iz};function Az(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 $=x;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},S),$++;return Sn(t.events,w+1,0,t.events.slice(x)),t.events.length=$,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(iT,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(iT,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 $=t.events.length;let R=$,N,A;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(N){A=t.events[R][1].end;break}N=!0}for(g(n),S=$;S<t.events.length;)t.events[S][1].end=Object.assign({},A),S++;Sn(t.events,R+1,0,t.events.slice($)),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 Iz(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 of(e){if(e===null||Ht(e)||ta(e))return 1;if(nf(e))return 2}function af(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 Ry={name:"attention",tokenize:Pz,resolveAll:Rz};function Rz(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);aT(d,-c),aT(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=jn(l,[["enter",e[n][1],t],["exit",e[n][1],t]])),l=jn(l,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),l=jn(l,af(t.parser.constructs.insideSpan.null,e.slice(n+1,r),t)),l=jn(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=jn(l,[["enter",e[r][1],t],["exit",e[r][1],t]])):u=0,Sn(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 Pz(e,t){const r=this.parser.constructs.attentionMarkers.null,n=this.previous,o=of(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=of(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 aT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Nz={name:"autolink",tokenize:Mz};function Mz(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 an(f)?(e.consume(f),a):l(f)}function a(f){return f===43||f===45||f===46||Jr(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||Jr(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||rf(f)?r(f):(e.consume(f),c)}function l(f){return f===64?(e.consume(f),u):Ez(f)?(e.consume(f),l):r(f)}function u(f){return Jr(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||Jr(f))&&n++<63){const h=f===45?p:d;return e.consume(f),h}return r(f)}}const Vc={tokenize:jz,partial:!0};function jz(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 sT={name:"blockQuote",tokenize:Dz,continuation:{tokenize:Fz},exit:Lz};function Dz(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 Fz(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(sT,t,r)(a)}}function Lz(e){e.exit("blockQuote")}const cT={name:"characterEscape",tokenize:qz};function qz(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 Tz(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(i)}}const lT={name:"characterReference",tokenize:Bz};function Bz(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=Jr,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=kz,u):(e.enter("characterReferenceValue"),i=7,a=Iy,u(d))}function u(d){if(d===59&&o){const p=e.exit("characterReferenceValue");return a===Jr&&!Ay(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 uT={tokenize:zz,partial:!0},dT={name:"codeFenced",tokenize:Uz,concrete:!0};function Uz(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 $=n.events[n.events.length-1];return i=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[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(uT,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(uT,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,$,R){let N=0;return A;function A(L){return S.enter("lineEnding"),S.consume(L),S.exit("lineEnding"),D}function D(L){return S.enter("codeFencedFence"),xt(L)?Ct(S,H,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):H(L)}function H(L){return L===s?(S.enter("codeFencedFenceSequence"),U(L)):R(L)}function U(L){return L===s?(N++,S.consume(L),U):N>=a?(S.exit("codeFencedFenceSequence"),xt(L)?Ct(S,Z,"whitespace")(L):Z(L)):R(L)}function Z(L){return L===null||et(L)?(S.exit("codeFencedFence"),$(L)):R(L)}}}function zz(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 Py={name:"codeIndented",tokenize:Vz},Zz={tokenize:Hz,partial:!0};function Vz(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(Zz,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 Hz(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 Wz={name:"codeText",tokenize:Jz,resolve:Kz,previous:Gz};function Kz(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 Gz(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Jz(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 fT(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,Yz(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),Sn(e,o,r-o+1,s))}}return!l}function Yz(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]),Sn(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 Xz={tokenize:t6,resolve:e6},Qz={tokenize:r6,partial:!0};function e6(e){return fT(e),e}function t6(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(Qz,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 r6(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 pT(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||rf(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||Ht(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||rf(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 hT(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 mT(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 Hc(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 n6={name:"definition",tokenize:i6},o6={tokenize:a6,partial:!0};function i6(e,t,r){const n=this;let o;return i;function i(f){return e.enter("definition"),a(f)}function a(f){return hT.call(n,e,s,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return o=Yn(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 Ht(f)?Hc(e,l)(f):l(f)}function l(f){return pT(e,u,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function u(f){return e.attempt(o6,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 a6(e,t,r){return n;function n(s){return Ht(s)?Hc(e,o)(s):r(s)}function o(s){return mT(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 s6={name:"hardBreakEscape",tokenize:c6};function c6(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 l6={name:"headingAtx",tokenize:d6,resolve:u6};function u6(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"},Sn(e,n,r-n+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function d6(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||Ht(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||Ht(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),l)}}const f6=["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"],yT=["pre","script","style","textarea"],p6={name:"htmlFlow",tokenize:g6,resolveTo:y6,concrete:!0},h6={tokenize:b6,partial:!0},m6={tokenize:v6,partial:!0};function y6(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 g6(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):an(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):an(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:H:h):r(T)}function y(T){return an(T)?(e.consume(T),a=String.fromCharCode(T),m):r(T)}function m(T){if(T===null||T===47||T===62||Ht(T)){const ce=T===47,pe=a.toLowerCase();return!ce&&!i&&yT.includes(pe)?(o=1,n.interrupt?t(T):H(T)):f6.includes(a.toLowerCase())?(o=6,ce?(e.consume(T),g):n.interrupt?t(T):H(T)):(o=7,n.interrupt&&!n.parser.lazy[n.now().line]?r(T):i?v(T):b(T))}return T===45||Jr(T)?(e.consume(T),a+=String.fromCharCode(T),m):r(T)}function g(T){return T===62?(e.consume(T),n.interrupt?t:H):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||an(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||Jr(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,$):xt(T)?(e.consume(T),S):R(T)}function $(T){return T===c?(e.consume(T),c=null,N):T===null||et(T)?r(T):(e.consume(T),$)}function R(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Ht(T)?w(T):(e.consume(T),R)}function N(T){return T===47||T===62||xt(T)?b(T):r(T)}function A(T){return T===62?(e.consume(T),D):r(T)}function D(T){return T===null||et(T)?H(T):xt(T)?(e.consume(T),D):r(T)}function H(T){return T===45&&o===2?(e.consume(T),q):T===60&&o===1?(e.consume(T),W):T===62&&o===4?(e.consume(T),B):T===63&&o===3?(e.consume(T),E):T===93&&o===5?(e.consume(T),M):et(T)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(h6,Q,U)(T)):T===null||et(T)?(e.exit("htmlFlowData"),U(T)):(e.consume(T),H)}function U(T){return e.check(m6,Z,Q)(T)}function Z(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),L}function L(T){return T===null||et(T)?U(T):(e.enter("htmlFlowData"),H(T))}function q(T){return T===45?(e.consume(T),E):H(T)}function W(T){return T===47?(e.consume(T),a="",J):H(T)}function J(T){if(T===62){const ce=a.toLowerCase();return yT.includes(ce)?(e.consume(T),B):H(T)}return an(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),J):H(T)}function M(T){return T===93?(e.consume(T),E):H(T)}function E(T){return T===62?(e.consume(T),B):T===45&&o===2?(e.consume(T),E):H(T)}function B(T){return T===null||et(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),B)}function Q(T){return e.exit("htmlFlow"),t(T)}}function v6(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 b6(e,t,r){return n;function n(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Vc,t,r)}}const w6={name:"htmlText",tokenize:x6};function x6(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):an(E)?(e.consume(E),R):r(E)}function l(E){return E===45?(e.consume(E),u):E===91?(e.consume(E),i=0,h):an(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,W(E)):(e.consume(E),d)}function p(E){return E===45?(e.consume(E),f):d(E)}function f(E){return E===62?q(E):E===45?p(E):d(E)}function h(E){const B="CDATA[";return E===B.charCodeAt(i++)?(e.consume(E),i===B.length?y:h):r(E)}function y(E){return E===null?r(E):E===93?(e.consume(E),m):et(E)?(a=y,W(E)):(e.consume(E),y)}function m(E){return E===93?(e.consume(E),g):y(E)}function g(E){return E===62?q(E):E===93?(e.consume(E),g):y(E)}function v(E){return E===null||E===62?q(E):et(E)?(a=v,W(E)):(e.consume(E),v)}function b(E){return E===null?r(E):E===63?(e.consume(E),x):et(E)?(a=b,W(E)):(e.consume(E),b)}function x(E){return E===62?q(E):b(E)}function w(E){return an(E)?(e.consume(E),S):r(E)}function S(E){return E===45||Jr(E)?(e.consume(E),S):$(E)}function $(E){return et(E)?(a=$,W(E)):xt(E)?(e.consume(E),$):q(E)}function R(E){return E===45||Jr(E)?(e.consume(E),R):E===47||E===62||Ht(E)?N(E):r(E)}function N(E){return E===47?(e.consume(E),q):E===58||E===95||an(E)?(e.consume(E),A):et(E)?(a=N,W(E)):xt(E)?(e.consume(E),N):q(E)}function A(E){return E===45||E===46||E===58||E===95||Jr(E)?(e.consume(E),A):D(E)}function D(E){return E===61?(e.consume(E),H):et(E)?(a=D,W(E)):xt(E)?(e.consume(E),D):N(E)}function H(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(e.consume(E),o=E,U):et(E)?(a=H,W(E)):xt(E)?(e.consume(E),H):(e.consume(E),Z)}function U(E){return E===o?(e.consume(E),o=void 0,L):E===null?r(E):et(E)?(a=U,W(E)):(e.consume(E),U)}function Z(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||Ht(E)?N(E):(e.consume(E),Z)}function L(E){return E===47||E===62||Ht(E)?N(E):r(E)}function q(E){return E===62?(e.consume(E),e.exit("htmlTextData"),e.exit("htmlText"),t):r(E)}function W(E){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),J}function J(E){return xt(E)?Ct(e,M,"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):M(E)}function M(E){return e.enter("htmlTextData"),a(E)}}const Ny={name:"labelEnd",tokenize:$6,resolveTo:T6,resolveAll:k6},S6={tokenize:O6},_6={tokenize:C6},E6={tokenize:A6};function k6(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 T6(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=jn(s,e.slice(i+1,i+n+3)),s=jn(s,[["enter",u,t]]),s=jn(s,af(t.parser.constructs.insideSpan.null,e.slice(i+n+4,a-3),t)),s=jn(s,[["exit",u,t],e[a-2],e[a-1],["exit",l,t]]),s=jn(s,e.slice(a+1)),s=jn(s,[["exit",c,t]]),Sn(e,i,e.length,s),e}function $6(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(Yn(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(S6,u,a?u:d)(p):p===91?e.attempt(_6,u,a?l:d)(p):a?u(p):d(p)}function l(p){return e.attempt(E6,u,d)(p)}function u(p){return t(p)}function d(p){return i._balanced=!0,r(p)}}function O6(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 Ht(d)?Hc(e,i)(d):i(d)}function i(d){return d===41?u(d):pT(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(d)}function a(d){return Ht(d)?Hc(e,c)(d):u(d)}function s(d){return r(d)}function c(d){return d===34||d===39||d===40?mT(e,l,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(d):u(d)}function l(d){return Ht(d)?Hc(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 C6(e,t,r){const n=this;return o;function o(s){return hT.call(n,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return n.parser.defined.includes(Yn(n.sliceSerialize(n.events[n.events.length-1][1]).slice(1,-1)))?t(s):r(s)}function a(s){return r(s)}}function A6(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 I6={name:"labelStartImage",tokenize:R6,resolveAll:Ny.resolveAll};function R6(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 P6={name:"labelStartLink",tokenize:N6,resolveAll:Ny.resolveAll};function N6(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 My={name:"lineEnding",tokenize:M6};function M6(e,t){return r;function r(n){return e.enter("lineEnding"),e.consume(n),e.exit("lineEnding"),Ct(e,t,"linePrefix")}}const sf={name:"thematicBreak",tokenize:j6};function j6(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 un={name:"list",tokenize:L6,continuation:{tokenize:q6},exit:U6},D6={tokenize:z6,partial:!0},F6={tokenize:B6,partial:!0};function L6(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:Iy(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(sf,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 Iy(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(Vc,n.interrupt?r:u,e.attempt(D6,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 q6(e,t,r){const n=this;return n.containerState._closeFlow=void 0,e.check(Vc,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(F6,t,a)(s))}function a(s){return n.containerState._closeFlow=!0,n.interrupt=void 0,Ct(e,e.attempt(un,t,r),"linePrefix",n.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function B6(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 U6(e){e.exit(this.containerState.type)}function z6(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 gT={name:"setextUnderline",tokenize:V6,resolveTo:Z6};function Z6(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 V6(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 H6={tokenize:W6};function W6(e){const t=this,r=e.attempt(Vc,n,e.attempt(this.parser.constructs.flowInitial,o,Ct(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Xz,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 K6={resolveAll:bT()},G6=vT("string"),J6=vT("text");function vT(e){return{tokenize:t,resolveAll:bT(e==="text"?Y6: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 bT(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 Y6(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 X6(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:$(w),check:$(S),interrupt:$(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(D){return a=jn(a,D),m(),a[a.length-1]!==null?[]:(R(t,0),l.events=af(i,l.events,l),l.events)}function p(D,H){return eZ(f(D),H)}function f(D){return Q6(a,D)}function h(){const{line:D,column:H,offset:U,_index:Z,_bufferIndex:L}=n;return{line:D,column:H,offset:U,_index:Z,_bufferIndex:L}}function y(D){o[D.line]=D.column,A()}function m(){let D;for(;n._index<a.length;){const H=a[n._index];if(typeof H=="string")for(D=n._index,n._bufferIndex<0&&(n._bufferIndex=0);n._index===D&&n._bufferIndex<H.length;)g(H.charCodeAt(n._bufferIndex));else g(H)}}function g(D){u=u(D)}function v(D){et(D)?(n.line++,n.column=1,n.offset+=D===-3?2:1,A()):D!==-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=D}function b(D,H){const U=H||{};return U.type=D,U.start=h(),l.events.push(["enter",U,l]),s.push(U),U}function x(D){const H=s.pop();return H.end=h(),l.events.push(["exit",H,l]),H}function w(D,H){R(D,H.from)}function S(D,H){H.restore()}function $(D,H){return U;function U(Z,L,q){let W,J,M,E;return Array.isArray(Z)?Q(Z):"tokenize"in Z?Q([Z]):B(Z);function B(he){return be;function be(Ee){const _e=Ee!==null&&he[Ee],ye=Ee!==null&&he.null,le=[...Array.isArray(_e)?_e:_e?[_e]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return Q(le)(Ee)}}function Q(he){return W=he,J=0,he.length===0?q:T(he[J])}function T(he){return be;function be(Ee){return E=N(),M=he,he.partial||(l.currentConstruct=he),he.name&&l.parser.constructs.disable.null.includes(he.name)?pe():he.tokenize.call(H?Object.assign(Object.create(l),H):l,c,ce,pe)(Ee)}}function ce(he){return D(M,E),L}function pe(he){return E.restore(),++J<W.length?T(W[J]):q}}}function R(D,H){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&Sn(l.events,H,l.events.length-H,D.resolve(l.events.slice(H),l)),D.resolveTo&&(l.events=D.resolveTo(l.events,l))}function N(){const D=h(),H=l.previous,U=l.currentConstruct,Z=l.events.length,L=Array.from(s);return{restore:q,from:Z};function q(){n=D,l.previous=H,l.currentConstruct=U,l.events.length=Z,s=L,A()}}function A(){n.line in o&&n.column<2&&(n.column=o[n.line],n.offset+=o[n.line]-1)}}function Q6(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 eZ(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
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 tZ=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:n6},disable:{null:[]},document:{42:un,43:un,45:un,48:un,49:un,50:un,51:un,52:un,53:un,54:un,55:un,56:un,57:un,62:sT},flow:{35:l6,42:sf,45:[gT,sf],60:p6,61:gT,95:sf,96:dT,126:dT},flowInitial:{[-2]:Py,[-1]:Py,32:Py},insideSpan:{null:[Ry,K6]},string:{38:lT,92:cT},text:{[-5]:My,[-4]:My,[-3]:My,33:I6,38:lT,42:Ry,60:[Nz,w6],91:P6,92:[s6,cT],93:Ny,95:Ry,96:Wz}},Symbol.toStringTag,{value:"Module"}));function rZ(e){const r=nT([tZ,...(e||{}).extensions||[]]),n={defined:[],lazy:{},constructs:r,content:o($z),document:o(Cz),flow:o(H6),string:o(G6),text:o(J6)};return n;function o(i){return a;function a(s){return X6(n,i,s)}}}function nZ(e){for(;!fT(e););return e}const wT=/[\0\t\n\r]/g;function oZ(){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(wT.lastIndex=d,l=wT.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 iZ=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aZ(e){return e.replace(iZ,sZ)}function sZ(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),i=o===120||o===88;return oT(r.slice(i?2:1),i?16:10)}return Ay(r)||e}const xT={}.hasOwnProperty;function cZ(e,t,r){return typeof t!="string"&&(r=t,t=void 0),lZ(r)(nZ(rZ(r).document().write(oZ()(e,t,!0))))}function lZ(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(we),autolinkProtocol:N,autolinkEmail:N,atxHeading:i(Ce),blockQuote:i(_e),characterEscape:N,characterReference:N,codeFenced:i(ye),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(ye,a),codeText:i(le,a),codeTextData:N,data:N,codeFlowValue:N,definition:i(te),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ve),hardBreakEscape:i(Ue),hardBreakTrailing:i(Ue),htmlFlow:i(F,a),htmlFlowData:N,htmlText:i(F,a),htmlTextData:N,image:i(ue),label:a,link:i(we),listItem:i(De),listItemValue:p,listOrdered:i(fe,d),listUnordered:i(fe),paragraph:i(Ie),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(Ce),strong:i(je),thematicBreak:i(We)},exit:{atxHeading:c(),atxHeadingSequence:w,autolink:c(),autolinkEmail:Ee,autolinkProtocol:be,blockQuote:c(),characterEscapeValue:A,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:he,codeFenced:c(m),codeFencedFence:y,codeFencedFenceInfo:f,codeFencedFenceMeta:h,codeFlowValue:A,codeIndented:c(g),codeText:c(L),codeTextData:A,data:A,definition:c(),definitionDestinationString:x,definitionLabelString:v,definitionTitleString:b,emphasis:c(),hardBreakEscape:c(H),hardBreakTrailing:c(H),htmlFlow:c(U),htmlFlowData:A,htmlText:c(Z),htmlTextData:A,image:c(W),label:M,labelText:J,lineEnding:D,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ce,resourceDestinationString:E,resourceTitleString:B,resource:Q,setextHeading:c(R),setextHeadingLineSequence:$,setextHeadingText:S,strong:c(),thematicBreak:c()}};ST(t,(e||{}).mdastExtensions||[]);const r={};return n;function n(K){let ae={type:"root",children:[]};const X={stack:[ae],tokenStack:[],config:t,enter:s,exit:l,buffer:a,resume:u,data:r},me=[];let Oe=-1;for(;++Oe<K.length;)if(K[Oe][1].type==="listOrdered"||K[Oe][1].type==="listUnordered")if(K[Oe][0]==="enter")me.push(Oe);else{const tt=me.pop();Oe=o(K,tt,Oe)}for(Oe=-1;++Oe<K.length;){const tt=t[K[Oe][0]];xT.call(tt,K[Oe][1].type)&&tt[K[Oe][1].type].call(Object.assign({sliceSerialize:K[Oe][2].sliceSerialize},X),K[Oe][1])}if(X.tokenStack.length>0){const tt=X.tokenStack[X.tokenStack.length-1];(tt[1]||_T).call(X,void 0,tt[0])}for(ae.position={start:mi(K.length>0?K[0][1].start:{line:1,column:1,offset:0}),end:mi(K.length>0?K[K.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<t.transforms.length;)ae=t.transforms[Oe](ae)||ae;return ae}function o(K,ae,X){let me=ae-1,Oe=-1,tt=!1,Ze,ht,Tt,Vt;for(;++me<=X;){const z=K[me];switch(z[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{z[0]==="enter"?Oe++:Oe--,Vt=void 0;break}case"lineEndingBlank":{z[0]==="enter"&&(Ze&&!Vt&&!Oe&&!Tt&&(Tt=me),Vt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vt=void 0}if(!Oe&&z[0]==="enter"&&z[1].type==="listItemPrefix"||Oe===-1&&z[0]==="exit"&&(z[1].type==="listUnordered"||z[1].type==="listOrdered")){if(Ze){let G=me;for(ht=void 0;G--;){const ze=K[G];if(ze[1].type==="lineEnding"||ze[1].type==="lineEndingBlank"){if(ze[0]==="exit")continue;ht&&(K[ht][1].type="lineEndingBlank",tt=!0),ze[1].type="lineEnding",ht=G}else if(!(ze[1].type==="linePrefix"||ze[1].type==="blockQuotePrefix"||ze[1].type==="blockQuotePrefixWhitespace"||ze[1].type==="blockQuoteMarker"||ze[1].type==="listItemIndent"))break}Tt&&(!ht||Tt<ht)&&(Ze._spread=!0),Ze.end=Object.assign({},ht?K[ht][1].start:z[1].end),K.splice(ht||me,0,["exit",Ze,z[2]]),me++,X++}if(z[1].type==="listItemPrefix"){const G={type:"listItem",_spread:!1,start:Object.assign({},z[1].start),end:void 0};Ze=G,K.splice(me,0,["enter",G,z[2]]),me++,X++,Tt=void 0,Vt=!0}}}return K[ae][1]._spread=tt,X}function i(K,ae){return X;function X(me){s.call(this,K(me),me),ae&&ae.call(this,me)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(K,ae,X){this.stack[this.stack.length-1].children.push(K),this.stack.push(K),this.tokenStack.push([ae,X]),K.position={start:mi(ae.start),end:void 0}}function c(K){return ae;function ae(X){K&&K.call(this,X),l.call(this,X)}}function l(K,ae){const X=this.stack.pop(),me=this.tokenStack.pop();if(me)me[0].type!==K.type&&(ae?ae.call(this,K,me[0]):(me[1]||_T).call(this,K,me[0]));else throw new Error("Cannot close `"+K.type+"` ("+zc({start:K.start,end:K.end})+"): it’s not open");X.position.end=mi(K.end)}function u(){return Cy(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function p(K){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(K),10),this.data.expectingFirstListItemValue=void 0}}function f(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=K}function h(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=K}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function m(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K.replace(/(\r?\n|\r)$/g,"")}function v(K){const ae=this.resume(),X=this.stack[this.stack.length-1];X.label=ae,X.identifier=Yn(this.sliceSerialize(K)).toLowerCase()}function b(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.title=K}function x(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.url=K}function w(K){const ae=this.stack[this.stack.length-1];if(!ae.depth){const X=this.sliceSerialize(K).length;ae.depth=X}}function S(){this.data.setextHeadingSlurpLineEnding=!0}function $(K){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(K).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function N(K){const X=this.stack[this.stack.length-1].children;let me=X[X.length-1];(!me||me.type!=="text")&&(me=ut(),me.position={start:mi(K.start),end:void 0},X.push(me)),this.stack.push(me)}function A(K){const ae=this.stack.pop();ae.value+=this.sliceSerialize(K),ae.position.end=mi(K.end)}function D(K){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const X=ae.children[ae.children.length-1];X.position.end=mi(K.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ae.type)&&(N.call(this,K),A.call(this,K))}function H(){this.data.atHardBreak=!0}function U(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function Z(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function L(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.value=K}function q(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ae,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function W(){const K=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";K.type+="Reference",K.referenceType=ae,delete K.url,delete K.title}else delete K.identifier,delete K.label;this.data.referenceType=void 0}function J(K){const ae=this.sliceSerialize(K),X=this.stack[this.stack.length-2];X.label=aZ(ae),X.identifier=Yn(ae).toLowerCase()}function M(){const K=this.stack[this.stack.length-1],ae=this.resume(),X=this.stack[this.stack.length-1];if(this.data.inReference=!0,X.type==="link"){const me=K.children;X.children=me}else X.alt=ae}function E(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.url=K}function B(){const K=this.resume(),ae=this.stack[this.stack.length-1];ae.title=K}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(K){const ae=this.resume(),X=this.stack[this.stack.length-1];X.label=ae,X.identifier=Yn(this.sliceSerialize(K)).toLowerCase(),this.data.referenceType="full"}function pe(K){this.data.characterReferenceType=K.type}function he(K){const ae=this.sliceSerialize(K),X=this.data.characterReferenceType;let me;X?(me=oT(ae,X==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):me=Ay(ae);const Oe=this.stack.pop();Oe.value+=me,Oe.position.end=mi(K.end)}function be(K){A.call(this,K);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(K)}function Ee(K){A.call(this,K);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(K)}function _e(){return{type:"blockquote",children:[]}}function ye(){return{type:"code",lang:null,meta:null,value:""}}function le(){return{type:"inlineCode",value:""}}function te(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ve(){return{type:"emphasis",children:[]}}function Ce(){return{type:"heading",depth:0,children:[]}}function Ue(){return{type:"break"}}function F(){return{type:"html",value:""}}function ue(){return{type:"image",title:null,url:"",alt:null}}function we(){return{type:"link",title:null,url:"",children:[]}}function fe(K){return{type:"list",ordered:K.type==="listOrdered",start:null,spread:K._spread,children:[]}}function De(K){return{type:"listItem",spread:K._spread,checked:null,children:[]}}function Ie(){return{type:"paragraph",children:[]}}function je(){return{type:"strong",children:[]}}function ut(){return{type:"text",value:""}}function We(){return{type:"thematicBreak"}}}function mi(e){return{line:e.line,column:e.column,offset:e.offset}}function ST(e,t){let r=-1;for(;++r<t.length;){const n=t[r];Array.isArray(n)?ST(e,n):uZ(e,n)}}function uZ(e,t){let r;for(r in t)if(xT.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 _T(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+zc({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+zc({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+zc({start:t.start,end:t.end})+") is still open")}function dZ(e){const t=this;t.parser=r;function r(n){return cZ(n,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function fZ(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 pZ(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
|
|
@@ -127,9 +127,9 @@ Check the top-level render call using <`+Ae+">.")}return ge}}function er(j,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}c$.peek=I7;function c$(e){return e.value||""}function I7(){return"<"}l$.peek=R7;function l$(e,t,r,n){const o=rg(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 R7(){return"!"}u$.peek=P7;function u$(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 P7(){return"!"}d$.peek=N7;function d$(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 N7(){return"`"}function f$(e,t){const r=Cy(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))}p$.peek=M7;function p$(e,t,r,n){const o=rg(r),i=o==='"'?"Quote":"Apostrophe",a=r.createTracker(n);let s,c;if(f$(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 M7(e,t,r){return f$(e,r)?"<":"["}h$.peek=j7;function h$(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 j7(){return"["}function ng(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 D7(e){const t=ng(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 F7(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 m$(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 L7(e,t,r,n){const o=r.enter("list"),i=r.bulletCurrent;let a=e.ordered?F7(r):ng(r);const s=e.ordered?a==="."?")":".":D7(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),m$(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 q7(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 B7(e,t,r,n){const o=q7(r);let i=r.bulletCurrent||ng(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 U7(e,t,r,n){const o=r.enter("paragraph"),i=r.enter("phrasing"),a=r.containerPhrasing(e,n);return i(),o(),a}const z7=hf(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Z7(e,t,r,n){return(e.children.some(function(a){return z7(a)})?r.containerPhrasing:r.containerFlow).call(r,e,n)}function V7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}y$.peek=H7;function y$(e,t,r,n){const o=V7(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 H7(e,t,r){return r.options.strong||"*"}function W7(e,t,r,n){return r.safe(e.value,n)}function K7(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 G7(e,t,r){const n=(m$(r)+(r.options.ruleSpaces?" ":"")).repeat(K7(r));return r.options.ruleSpaces?n.slice(0,-1):n}const g$={blockquote:v7,break:a$,code:E7,definition:T7,emphasis:s$,hardBreak:a$,heading:A7,html:c$,image:l$,imageReference:u$,inlineCode:d$,link:p$,linkReference:h$,list:L7,listItem:B7,paragraph:U7,root:Z7,strong:y$,text:W7,thematicBreak:G7};function J7(){return{enter:{table:Y7,tableData:v$,tableHeader:v$,tableRow:Q7},exit:{codeText:e8,table:X7,tableData:og,tableHeader:og,tableRow:og}}}function Y7(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 X7(e){this.exit(e),this.data.inTable=void 0}function Q7(e){this.enter({type:"tableRow",children:[]},e)}function og(e){this.exit(e)}function v$(e){this.enter({type:"tableCell",children:[]},e)}function e8(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,t8));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function t8(e,t){return t==="|"?t:e}function r8(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 m7(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=g$.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function n8(){return{exit:{taskListCheckValueChecked:b$,taskListCheckValueUnchecked:b$,paragraph:i8}}}function o8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a8}}}function b$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function i8(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 a8(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=g$.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 s8(){return[F9(),J9(),u7(),J7(),n8()]}function c8(e){return{extensions:[L9(),Y9(),d7(),r8(e),o8()]}}const l8={tokenize:m8,partial:!0},w$={tokenize:y8,partial:!0},x$={tokenize:g8,partial:!0},S$={tokenize:v8,partial:!0},u8={tokenize:b8,partial:!0},_$={tokenize:p8,previous:k$},E$={tokenize:h8,previous:T$},Bo={tokenize:f8,previous:$$},ho={};function d8(){return{text:ho}}let ra=48;for(;ra<123;)ho[ra]=Bo,ra++,ra===58?ra=65:ra===91&&(ra=97);ho[43]=Bo,ho[45]=Bo,ho[46]=Bo,ho[95]=Bo,ho[72]=[Bo,E$],ho[104]=[Bo,E$],ho[87]=[Bo,_$],ho[119]=[Bo,_$];function f8(e,t,r){const n=this;let o,i;return a;function a(d){return!ig(d)||!$$.call(n,n.previous)||ag(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return ig(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(u8,u,l)(d):d===45||d===95||Jr(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&&an(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function p8(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!k$.call(n,n.previous)||ag(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(l8,e.attempt(w$,e.attempt(x$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function h8(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&T$.call(n,n.previous)&&!ag(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(an(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||rf(d)||Ht(d)||ta(d)||nf(d)?r(d):e.attempt(w$,e.attempt(x$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function m8(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 y8(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(S$,c,s)(l):l===null||Ht(l)||ta(l)||l!==45&&nf(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 g8(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(S$,t,i)(a):a===null||Ht(a)||ta(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function v8(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||Ht(s)||ta(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||Ht(s)||ta(s)?t(s):n(s)}function i(s){return an(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):an(s)?(e.consume(s),a):r(s)}}function b8(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Jr(i)?r(i):t(i)}}function k$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function T$(e){return!an(e)}function $$(e){return!(e===47||ig(e))}function ig(e){return e===43||e===45||e===46||e===95||Jr(e)}function ag(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 w8={tokenize:O8,partial:!0};function x8(){return{document:{91:{tokenize:k8,continuation:{tokenize:T8},exit:$8}},text:{91:{tokenize:E8},93:{add:"after",tokenize:S8,resolveTo:_8}}}}function S8(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=Yn(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 _8(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 E8(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||Ht(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Yn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return Ht(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 k8(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||Ht(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Yn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ht(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 T8(e,t,r){return e.check(Vc,t,e.attempt(w8,t,r))}function $8(e){e.exit("gfmFootnoteDefinition")}function O8(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 C8(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&&Sn(p,p.length,0,af(f,a.slice(l+1,c),s)),Sn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),Sn(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=of(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=of(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class A8{constructor(){this.map=[]}add(t,r,n){I8(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 I8(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 R8(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 P8(){return{flow:{null:{tokenize:N8,resolveAll:M8}}}}function N8(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let D=n.events.length-1;for(;D>-1;){const Z=n.events[D][1].type;if(Z==="lineEnding"||Z==="linePrefix")D--;else break}const H=D>-1?n.events[D][1].type:null,U=H==="tableHead"||H==="tableRow"?S:c;return U===S&&n.parser.lazy[n.now().line]?r(A):U(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||Ht(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"),$(A)}function $(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),$):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,$,"whitespace")(A):(e.enter("data"),R(A))}function R(A){return A===null||A===124||Ht(A)?(e.exit("data"),$(A)):(e.consume(A),A===92?N:R)}function N(A){return A===92||A===124?(e.consume(A),R):R(A)}}function M8(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 A8;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(O$(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=vf(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=vf(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=vf(p,t,i,o,r,d)):a[1]!==0&&(d=vf(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&O$(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=R8(t.events,r))}return e}function vf(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},es(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=es(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=es(t.events,r[2]),u=es(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({},es(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function O$(e,t,r,n,o){const i=[],a=es(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 es(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const j8={tokenize:F8};function D8(){return{text:{91:j8}}}function F8(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 Ht(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:L8},t,r)(c):r(c)}}function L8(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function q8(e){return nT([d8(),x8(),C8(e),P8(),D8()])}const B8={};function U8(e){const t=this,r=e||B8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(q8(r)),i.push(s8()),a.push(c8(r))}const Jt={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"}}},z8=({text:e})=>{const{message:{blocks:{text:t}}}=Jt,r={h1:({node:n,...o})=>Y.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>Y.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>Y.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>Y.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>Y.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>Y.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>Y.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>Y.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>Y.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>Y.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>Y.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>Y.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>Y.jsx("pre",{...o,...t==null?void 0:t.pre})};return Y.jsx(C9,{components:r,remarkPlugins:[U8,D9],children:e})};var C$={},sg={},A$={};Object.defineProperty(A$,"__esModule",{value:!0});var bf={},Z8=He&&He.__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(bf,"__esModule",{value:!0}),bf.Emitter=void 0;let V8=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 Z8(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})}};bf.Emitter=V8;var I$={};Object.defineProperty(I$,"__esModule",{value:!0});var R$={};(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={}))})(R$);var P$={};Object.defineProperty(P$,"__esModule",{value:!0});var N$={};Object.defineProperty(N$,"__esModule",{value:!0});var M$={};Object.defineProperty(M$,"__esModule",{value:!0});var j$={};Object.defineProperty(j$,"__esModule",{value:!0}),function(e){var t=He&&He.__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=He&&He.__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(A$,e),r(bf,e),r(I$,e),r(R$,e),r(P$,e),r(N$,e),r(M$,e),r(j$,e)}(sg);var wf={},D$={},cg={exports:{}},xf={},lg={},Sf={},Gc={},ts={},na={},rs={},ns={},mo={};Object.defineProperty(mo,"__esModule",{value:!0}),mo.ERROR_PACKET=mo.PACKET_TYPES_REVERSE=mo.PACKET_TYPES=void 0;const yo=Object.create(null);mo.PACKET_TYPES=yo,yo.open="0",yo.close="1",yo.ping="2",yo.pong="3",yo.message="4",yo.upgrade="5",yo.noop="6";const F$=Object.create(null);mo.PACKET_TYPES_REVERSE=F$,Object.keys(yo).forEach(e=>{F$[yo[e]]=e});const H8={type:"error",data:"parser error"};mo.ERROR_PACKET=H8,Object.defineProperty(ns,"__esModule",{value:!0}),ns.encodePacket=ns.encodePacketToBinary=void 0;const W8=mo,L$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",q$=typeof ArrayBuffer=="function",B$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,U$=({type:e,data:t},r,n)=>L$&&t instanceof Blob?r?n(t):z$(t,n):q$&&(t instanceof ArrayBuffer||B$(t))?r?n(t):z$(new Blob([t]),n):n(W8.PACKET_TYPES[e]+(t||""));ns.encodePacket=U$;const z$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function Z$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ug;function K8(e,t){if(L$&&e.data instanceof Blob)return e.data.arrayBuffer().then(Z$).then(t);if(q$&&(e.data instanceof ArrayBuffer||B$(e.data)))return t(Z$(e.data));U$(e,!1,r=>{ug||(ug=new TextEncoder),t(ug.encode(r))})}ns.encodePacketToBinary=K8;var _f={},os={};Object.defineProperty(os,"__esModule",{value:!0}),os.decode=os.encode=void 0;const is="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<is.length;e++)Jc[is.charCodeAt(e)]=e;const G8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=is[t[r]>>2],o+=is[(t[r]&3)<<4|t[r+1]>>4],o+=is[(t[r+1]&15)<<2|t[r+2]>>6],o+=is[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};os.encode=G8;const J8=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=Jc[e.charCodeAt(n)],a=Jc[e.charCodeAt(n+1)],s=Jc[e.charCodeAt(n+2)],c=Jc[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};os.decode=J8,Object.defineProperty(_f,"__esModule",{value:!0}),_f.decodePacket=void 0;const Ef=mo,Y8=os,X8=typeof ArrayBuffer=="function",Q8=(e,t)=>{if(typeof e!="string")return{type:"message",data:V$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:eV(e.substring(1),t)}:Ef.PACKET_TYPES_REVERSE[r]?e.length>1?{type:Ef.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:Ef.PACKET_TYPES_REVERSE[r]}:Ef.ERROR_PACKET};_f.decodePacket=Q8;const eV=(e,t)=>{if(X8){const r=(0,Y8.decode)(e);return V$(r,t)}else return{base64:!0,data:e}},V$=(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=ns;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=_f;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=mo,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})(rs);function sn(e){if(e)return tV(e)}function tV(e){for(var t in sn.prototype)e[t]=sn.prototype[t];return e}sn.prototype.on=sn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},sn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},sn.prototype.off=sn.prototype.removeListener=sn.prototype.removeAllListeners=sn.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},sn.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},sn.prototype.emitReserved=sn.prototype.emit,sn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},sn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const as=Hh(Object.freeze(Object.defineProperty({__proto__:null,Emitter:sn},Symbol.toStringTag,{value:"Module"})));var Dn={},oa={};Object.defineProperty(oa,"__esModule",{value:!0}),oa.globalThisShim=void 0,oa.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.byteLength=Dn.installTimerFunctions=Dn.pick=void 0;const yi=oa;function rV(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Dn.pick=rV;const nV=yi.globalThisShim.setTimeout,oV=yi.globalThisShim.clearTimeout;function iV(e,t){t.useNativeTimers?(e.setTimeoutFn=nV.bind(yi.globalThisShim),e.clearTimeoutFn=oV.bind(yi.globalThisShim)):(e.setTimeoutFn=yi.globalThisShim.setTimeout.bind(yi.globalThisShim),e.clearTimeoutFn=yi.globalThisShim.clearTimeout.bind(yi.globalThisShim))}Dn.installTimerFunctions=iV;const aV=1.33;function sV(e){return typeof e=="string"?cV(e):Math.ceil((e.byteLength||e.size)*aV)}Dn.byteLength=sV;function cV(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 dg={exports:{}},fg,H$;function lV(){if(H$)return fg;H$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;fg=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 fg}function uV(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=lV(),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,$)=>{if(S==="%%")return"%";x++;const R=r.formatters[$];if(typeof R=="function"){const N=m[x];S=R.call(g,N),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 dV=uV;(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(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return 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&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[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=dV(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(dg,dg.exports);var go=dg.exports,ia={};Object.defineProperty(ia,"__esModule",{value:!0}),ia.decode=ia.encode=void 0;function fV(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ia.encode=fV;function pV(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}ia.decode=pV;var hV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(na,"__esModule",{value:!0}),na.Transport=void 0;const mV=rs,yV=as,gV=Dn,vV=hV(go),bV=ia,wV=(0,vV.default)("engine.io-client:transport");class xV extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class SV extends yV.Emitter{constructor(t){super(),this.writable=!1,(0,gV.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new xV(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):wV("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,mV.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,bV.encode)(t);return r.length?"?"+r:""}}na.Transport=SV;var Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.yeast=Uo.decode=Uo.encode=void 0;const W$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),kf=64,K$={};let G$=0,gi=0,J$;function pg(e){let t="";do t=W$[e%kf]+t,e=Math.floor(e/kf);while(e>0);return t}Uo.encode=pg;function _V(e){let t=0;for(gi=0;gi<e.length;gi++)t=t*kf+K$[e.charAt(gi)];return t}Uo.decode=_V;function EV(){const e=pg(+new Date);return e!==J$?(G$=0,J$=e):e+"."+pg(G$++)}for(Uo.yeast=EV;gi<kf;gi++)K$[W$[gi]]=gi;var ss={},Tf={};Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.hasCORS=void 0;let Y$=!1;try{Y$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Tf.hasCORS=Y$,Object.defineProperty(ss,"__esModule",{value:!0}),ss.createCookieJar=ss.XHR=void 0;const kV=Tf,TV=oa;function $V(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||kV.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new TV.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}ss.XHR=$V;function OV(){}ss.createCookieJar=OV;var CV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ts,"__esModule",{value:!0}),ts.Request=ts.Polling=void 0;const AV=na,IV=CV(go),RV=Uo,X$=rs,hg=ss,PV=as,Q$=Dn,NV=oa,dn=(0,IV.default)("engine.io-client:polling");function MV(){}const jV=function(){return new hg.XHR({xdomain:!1}).responseType!=null}();class DV extends AV.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=jV&&!r,this.opts.withCredentials&&(this.cookieJar=(0,hg.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{dn("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(dn("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){dn("pre-pause polling complete"),--n||r()})),this.writable||(dn("we are currently writing - waiting to pause"),n++,this.once("drain",function(){dn("pre-pause writing complete"),--n||r()}))}else r()}poll(){dn("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){dn("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,X$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():dn('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{dn("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(dn("transport open - closing"),t()):(dn("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,X$.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,RV.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 aa(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(){dn("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}}ts.Polling=DV;let aa=class Vh extends PV.Emitter{constructor(t,r){super(),(0,Q$.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,Q$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new hg.XHR(r);try{dn("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))},dn("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Vh.requestsCount++,Vh.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=MV,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Vh.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(ts.Request=aa,aa.requestsCount=0,aa.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",eO);else if(typeof addEventListener=="function"){const e="onpagehide"in NV.globalThisShim?"pagehide":"unload";addEventListener(e,eO,!1)}}function eO(){for(let e in aa.requests)aa.requests.hasOwnProperty(e)&&aa.requests[e].abort()}var $f={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.defaultBinaryType=_n.usingBrowserWebSocket=_n.WebSocket=_n.nextTick=void 0;const tO=oa;_n.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),_n.WebSocket=tO.globalThisShim.WebSocket||tO.globalThisShim.MozWebSocket,_n.usingBrowserWebSocket=!0,_n.defaultBinaryType="arraybuffer";var FV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($f,"__esModule",{value:!0}),$f.WS=void 0;const LV=na,qV=Uo,BV=Dn,vi=_n,UV=FV(go),zV=rs,ZV=(0,UV.default)("engine.io-client:websocket"),rO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VV extends LV.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=rO?{}:(0,BV.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=vi.usingBrowserWebSocket&&!rO?r?new vi.WebSocket(t,r):new vi.WebSocket(t):new vi.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,zV.encodePacket)(n,this.supportsBinary,i=>{const a={};vi.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{vi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{ZV("websocket closed before onclose event")}o&&(0,vi.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,qV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!vi.WebSocket}}$f.WS=VV;var Of={},HV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Of,"__esModule",{value:!0}),Of.WT=void 0;const WV=na,KV=_n,nO=rs,Yc=(0,HV(go).default)("engine.io-client:webtransport");class GV extends WV.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(()=>{Yc("transport closed gracefully"),this.onClose()}).catch(t=>{Yc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,nO.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,nO.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Yc("session is closed");return}Yc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Yc("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,KV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}Of.WT=GV,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.transports=void 0;const JV=ts,YV=$f,XV=Of;Gc.transports={websocket:YV.WS,webtransport:XV.WT,polling:JV.Polling};var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.parse=void 0;const QV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eH=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function tH(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=QV.exec(e||""),i={},a=14;for(;a--;)i[eH[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=rH(i,i.path),i.queryKey=nH(i,i.query),i}Xc.parse=tH;function rH(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 nH(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var oH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Socket=void 0;const iH=Gc,oO=Dn,aH=ia,iO=Xc,sH=oH(go),cH=as,aO=rs,lH=_n,nr=(0,sH.default)("engine.io-client:socket");let sO=class ec extends cH.Emitter{constructor(t,r={}){super(),this.binaryType=lH.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,iO.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,iO.parse)(r.host).host),(0,oO.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,aH.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){nr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=aO.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 nr("options: %j",n),new iH.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&ec.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){nr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){nr("setting transport %s",t.name),this.transport&&(nr("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){nr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;ec.priorWebsocketSuccess=!1;const o=()=>{n||(nr('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(nr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ec.priorWebsocketSuccess=r.name==="websocket",nr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(nr("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{nr('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(),nr('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&&(nr('"%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(nr("socket open"),this.readyState="open",ec.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){nr("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(nr('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 nr('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();nr("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,oO.byteLength)(o)),n>0&&r>this.maxPayload)return nr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return nr("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"),nr("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){nr("socket error %j",t),ec.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(nr('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}};Sf.Socket=sO,sO.protocol=aO.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=Sf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=na;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Gc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Dn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Xc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=_n;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(lg);var uH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xf,"__esModule",{value:!0}),xf.url=void 0;const dH=lg,cO=uH(go).default("socket.io-client:url");function fH(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)||(cO("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),cO("parse %s",e),n=dH.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}xf.url=fH;var Cf={},Qc={},Af={},cs={},sa={};Object.defineProperty(sa,"__esModule",{value:!0}),sa.hasBinary=sa.isBinary=void 0;const pH=typeof ArrayBuffer=="function",hH=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,lO=Object.prototype.toString,mH=typeof Blob=="function"||typeof Blob<"u"&&lO.call(Blob)==="[object BlobConstructor]",yH=typeof File=="function"||typeof File<"u"&&lO.call(File)==="[object FileConstructor]";function uO(e){return pH&&(e instanceof ArrayBuffer||hH(e))||mH&&e instanceof Blob||yH&&e instanceof File}sa.isBinary=uO;function If(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(If(e[r]))return!0;return!1}if(uO(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return If(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&If(e[r]))return!0;return!1}sa.hasBinary=If,Object.defineProperty(cs,"__esModule",{value:!0}),cs.reconstructPacket=cs.deconstructPacket=void 0;const gH=sa;function vH(e){const t=[],r=e.data,n=e;return n.data=mg(r,t),n.attachments=t.length,{packet:n,buffers:t}}cs.deconstructPacket=vH;function mg(e,t){if(!e)return e;if((0,gH.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]=mg(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]=mg(e[n],t));return r}return e}function bH(e,t){return e.data=yg(e.data,t),delete e.attachments,e}cs.reconstructPacket=bH;function yg(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]=yg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=yg(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=as,r=cs,n=sa,i=(0,go.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=[]}}})(Af);var el={};Object.defineProperty(el,"__esModule",{value:!0}),el.on=void 0;function wH(e,t,r){return e.on(t,r),function(){e.off(t,r)}}el.on=wH;var xH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.Socket=void 0;const Xn=Af,Rf=el,SH=as,xr=xH(go).default("socket.io-client:socket"),_H=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class EH extends SH.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=[Rf.on(t,"open",this.onopen.bind(this)),Rf.on(t,"packet",this.onpacket.bind(this)),Rf.on(t,"error",this.onerror.bind(this)),Rf.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(_H.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:Xn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;xr("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)?xr("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&&(xr("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));xr("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&&(xr("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(xr("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(xr("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){xr("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,xr("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(){xr("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Xn.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){xr("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 Xn.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 Xn.PacketType.EVENT:case Xn.PacketType.BINARY_EVENT:this.onevent(t);break;case Xn.PacketType.ACK:case Xn.PacketType.BINARY_ACK:this.onack(t);break;case Xn.PacketType.DISCONNECT:this.ondisconnect();break;case Xn.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||[];xr("emitting event %j",r),t.id!=null&&(xr("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,xr("sending ack %j",o),r.packet({type:Xn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(xr("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):xr("bad ack %s",t.id)}onconnect(t,r){xr("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(){xr("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&&(xr("performing disconnect (%s)",this.nsp),this.packet({type:Xn.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)}}}Qc.Socket=EH;var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.Backoff=void 0;function ls(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}Pf.Backoff=ls,ls.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},ls.prototype.reset=function(){this.attempts=0},ls.prototype.setMin=function(e){this.ms=e},ls.prototype.setMax=function(e){this.max=e},ls.prototype.setJitter=function(e){this.jitter=e};var kH=He&&He.__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]}),TH=He&&He.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$H=He&&He.__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)&&kH(t,e,r);return TH(t,e),t},OH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Manager=void 0;const gg=lg,CH=Qc,AH=$H(Af),ca=el,IH=Pf,RH=as,qr=OH(go).default("socket.io-client:manager");class PH extends RH.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,gg.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 IH.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||AH;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(qr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;qr("opening %s",this.uri),this.engine=new gg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=ca.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{qr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=ca.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;qr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{qr("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(){qr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ca.on(t,"ping",this.onping.bind(this)),ca.on(t,"data",this.ondata.bind(this)),ca.on(t,"error",this.onerror.bind(this)),ca.on(t,"close",this.onclose.bind(this)),ca.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){gg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){qr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new CH.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){qr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){qr("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(){qr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){qr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){qr("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)qr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();qr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(qr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(qr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(qr("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)}}Cf.Manager=PH,function(e,t){var r=He&&He.__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=xf,o=Cf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Qc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(go).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=Af;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(cg,cg.exports);var NH=cg.exports;(function(e){var t=He&&He.__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=He&&He.__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=sg,o=r(NH);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})(D$);var Nf={},MH=He&&He.__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(Nf,"__esModule",{value:!0}),Nf.SocketEmitter=void 0;class jH{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 MH(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})}}Nf.SocketEmitter=jH;var fn=He&&He.__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(wf,"__esModule",{value:!0}),wf.MessagingSocket=void 0;const dO=D$,DH=Nf;class FH extends DH.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new dO.SocketCom(t.url),this.com.events.on(dO.SocketComEvents.Message,r=>fn(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 fn(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 fn(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return fn(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return fn(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return fn(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 fn(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return fn(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return fn(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 fn(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return fn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return fn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return fn(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return fn(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}wf.MessagingSocket=FH,function(e){var t=He&&He.__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=He&&He.__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(sg,e),r(wf,e)}(C$);class LH{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 C$.MessagingSocket(t),this.emitter=new uy,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=Dd.parse(n),{payload:i,disableInput:a}=oy(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=Dd.parse(n.payload),{payload:i,disableInput:a}=oy(o);return{...n,payload:i,disableInput:a}})}}function fO(e,t){return function(){return e.apply(t,arguments)}}const{toString:pO}=Object.prototype,{getPrototypeOf:vg}=Object,bg=(e=>t=>{const r=pO.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),zo=e=>(e=e.toLowerCase(),t=>bg(t)===e),Mf=e=>t=>typeof t===e,{isArray:us}=Array,tl=Mf("undefined");function qH(e){return e!==null&&!tl(e)&&e.constructor!==null&&!tl(e.constructor)&&la(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hO=zo("ArrayBuffer");function BH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hO(e.buffer),t}const UH=Mf("string"),la=Mf("function"),mO=Mf("number"),wg=e=>e!==null&&typeof e=="object",zH=e=>e===!0||e===!1,jf=e=>{if(bg(e)!=="object")return!1;const t=vg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ZH=zo("Date"),VH=zo("File"),HH=zo("Blob"),WH=zo("FileList"),KH=e=>wg(e)&&la(e.pipe),GH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||pO.call(e)===t||la(e.toString)&&e.toString()===t)},JH=zo("URLSearchParams"),YH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rl(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),us(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 yO(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 gO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vO=e=>!tl(e)&&e!==gO;function xg(){const{caseless:e}=vO(this)&&this||{},t={},r=(n,o)=>{const i=e&&yO(t,o)||o;jf(t[i])&&jf(n)?t[i]=xg(t[i],n):jf(n)?t[i]=xg({},n):us(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&rl(arguments[n],r);return t}const XH=(e,t,r,{allOwnKeys:n}={})=>(rl(t,(o,i)=>{r&&la(o)?e[i]=fO(o,r):e[i]=o},{allOwnKeys:n}),e),QH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eW=(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)},tW=(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&&vg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},rW=(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},nW=e=>{if(!e)return null;if(us(e))return e;let t=e.length;if(!mO(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},oW=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vg(Uint8Array)),iW=(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])}},aW=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},sW=zo("HTMLFormElement"),cW=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),bO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),lW=zo("RegExp"),wO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};rl(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},de={isArray:us,isArrayBuffer:hO,isBuffer:qH,isFormData:GH,isArrayBufferView:BH,isString:UH,isNumber:mO,isBoolean:zH,isObject:wg,isPlainObject:jf,isUndefined:tl,isDate:ZH,isFile:VH,isBlob:HH,isRegExp:lW,isFunction:la,isStream:KH,isURLSearchParams:JH,isTypedArray:oW,isFileList:WH,forEach:rl,merge:xg,extend:XH,trim:YH,stripBOM:QH,inherits:eW,toFlatObject:tW,kindOf:bg,kindOfTest:zo,endsWith:rW,toArray:nW,forEachEntry:iW,matchAll:aW,isHTMLForm:sW,hasOwnProperty:bO,hasOwnProp:bO,reduceDescriptors:wO,freezeMethods:e=>{wO(e,(t,r)=>{if(la(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(la(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 us(e)?n(e):n(String(e).split(t)),r},toCamelCase:cW,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:yO,global:gO,isContextDefined:vO,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(wg(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=us(n)?[]:{};return rl(n,(a,s)=>{const c=r(a,o+1);!tl(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)}de.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:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xO=It.prototype,SO={};["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=>{SO[e]={value:e}}),Object.defineProperties(It,SO),Object.defineProperty(xO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(xO);return de.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 uW=typeof self=="object"?self.FormData:window.FormData;const dW=St(uW);function Sg(e){return de.isPlainObject(e)||de.isArray(e)}function _O(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function EO(e,t,r){return e?e.concat(t).map(function(o,i){return o=_O(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function fW(e){return de.isArray(e)&&!e.some(Sg)}const pW=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function hW(e){return e&&de.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Df(e,t,r){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new(dW||FormData),r=de.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!de.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&hW(t);if(!de.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(de.isDate(h))return h.toISOString();if(!c&&de.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(h)||de.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(de.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(de.isArray(h)&&fW(h)||de.isFileList(h)||de.endsWith(y,"[]")&&(g=de.toArray(h)))return y=_O(y),g.forEach(function(b,x){!(de.isUndefined(b)||b===null)&&t.append(a===!0?EO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return Sg(h)?!0:(t.append(EO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(pW,{defaultVisitor:u,convertValue:l,isVisitable:Sg});function f(h,y){if(!de.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),de.forEach(h,function(g,v){(!(de.isUndefined(g)||g===null)&&o.call(t,g,de.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return f(e),t}function kO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function _g(e,t){this._pairs=[],e&&Df(e,this,t)}const TO=_g.prototype;TO.append=function(t,r){this._pairs.push([t,r])},TO.toString=function(t){const r=t?function(n){return t.call(this,n,kO)}:kO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function mW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $O(e,t,r){if(!t)return e;const n=r&&r.encode||mW,o=r&&r.serialize;let i;if(o?i=o(t,r):i=de.isURLSearchParams(t)?t.toString():new _g(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class yW{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){de.forEach(this.handlers,function(n){n!==null&&t(n)})}}const OO=yW,CO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gW=typeof URLSearchParams<"u"?URLSearchParams:_g,vW=FormData,bW=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wW=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),vo={isBrowser:!0,classes:{URLSearchParams:gW,FormData:vW,Blob},isStandardBrowserEnv:bW,isStandardBrowserWebWorkerEnv:wW,protocols:["http","https","file","blob","url","data"]};function xW(e,t){return Df(e,new vo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return vo.isNode&&de.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function SW(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _W(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 AO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&de.isArray(o)?o.length:a,c?(de.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!de.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&de.isArray(o[a])&&(o[a]=_W(o[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const r={};return de.forEachEntry(e,(n,o)=>{t(SW(n),o,r,0)}),r}return null}const EW={"Content-Type":void 0};function kW(e,t,r){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ff={transitional:CO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=de.isObject(t);if(i&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return o&&o?JSON.stringify(AO(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.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 xW(t,this.formSerializer).toString();if((s=de.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Df(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),kW(t)):t}],transformResponse:[function(t){const r=this.transitional||Ff.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&de.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:vo.classes.FormData,Blob:vo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};de.forEach(["delete","get","head"],function(t){Ff.headers[t]={}}),de.forEach(["post","put","patch"],function(t){Ff.headers[t]=de.merge(EW)});const Eg=Ff,TW=de.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"]),$W=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 m7(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=g$.inlineCode(f,h,y);return y.stack.includes("tableCell")&&(m=m.replace(/\|/g,"\\$&")),m}}function n8(){return{exit:{taskListCheckValueChecked:b$,taskListCheckValueUnchecked:b$,paragraph:i8}}}function o8(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:a8}}}function b$(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function i8(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 a8(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=g$.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 s8(){return[F9(),J9(),u7(),J7(),n8()]}function c8(e){return{extensions:[L9(),Y9(),d7(),r8(e),o8()]}}const l8={tokenize:m8,partial:!0},w$={tokenize:y8,partial:!0},x$={tokenize:g8,partial:!0},S$={tokenize:v8,partial:!0},u8={tokenize:b8,partial:!0},_$={tokenize:p8,previous:k$},E$={tokenize:h8,previous:T$},Bo={tokenize:f8,previous:$$},ho={};function d8(){return{text:ho}}let ra=48;for(;ra<123;)ho[ra]=Bo,ra++,ra===58?ra=65:ra===91&&(ra=97);ho[43]=Bo,ho[45]=Bo,ho[46]=Bo,ho[95]=Bo,ho[72]=[Bo,E$],ho[104]=[Bo,E$],ho[87]=[Bo,_$],ho[119]=[Bo,_$];function f8(e,t,r){const n=this;let o,i;return a;function a(d){return!ig(d)||!$$.call(n,n.previous)||ag(n.events)?r(d):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(d))}function s(d){return ig(d)?(e.consume(d),s):d===64?(e.consume(d),c):r(d)}function c(d){return d===46?e.check(u8,u,l)(d):d===45||d===95||Jr(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&&an(n.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(d)):r(d)}}function p8(e,t,r){const n=this;return o;function o(a){return a!==87&&a!==119||!k$.call(n,n.previous)||ag(n.events)?r(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(l8,e.attempt(w$,e.attempt(x$,i),r),r)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function h8(e,t,r){const n=this;let o="",i=!1;return a;function a(d){return(d===72||d===104)&&T$.call(n,n.previous)&&!ag(n.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(d),e.consume(d),s):r(d)}function s(d){if(an(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||rf(d)||Ht(d)||ta(d)||nf(d)?r(d):e.attempt(w$,e.attempt(x$,u),r)(d)}function u(d){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(d)}}function m8(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 y8(e,t,r){let n,o,i;return a;function a(l){return l===46||l===95?e.check(S$,c,s)(l):l===null||Ht(l)||ta(l)||l!==45&&nf(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 g8(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(S$,t,i)(a):a===null||Ht(a)||ta(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&n++,e.consume(a),o}}function v8(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||Ht(s)||ta(s)?t(s):r(s)}function o(s){return s===null||s===40||s===91||Ht(s)||ta(s)?t(s):n(s)}function i(s){return an(s)?a(s):r(s)}function a(s){return s===59?(e.consume(s),n):an(s)?(e.consume(s),a):r(s)}}function b8(e,t,r){return n;function n(i){return e.consume(i),o}function o(i){return Jr(i)?r(i):t(i)}}function k$(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Ht(e)}function T$(e){return!an(e)}function $$(e){return!(e===47||ig(e))}function ig(e){return e===43||e===45||e===46||e===95||Jr(e)}function ag(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 w8={tokenize:O8,partial:!0};function x8(){return{document:{91:{tokenize:k8,continuation:{tokenize:T8},exit:$8}},text:{91:{tokenize:E8},93:{add:"after",tokenize:S8,resolveTo:_8}}}}function S8(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=Yn(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 _8(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 E8(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||Ht(d))return r(d);if(d===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Yn(n.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(d)}return Ht(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 k8(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||Ht(h))return r(h);if(h===93){e.exit("chunkString");const y=e.exit("gfmFootnoteDefinitionLabelString");return i=Yn(n.sliceSerialize(y)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(h),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Ht(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 T8(e,t,r){return e.check(Vc,t,e.attempt(w8,t,r))}function $8(e){e.exit("gfmFootnoteDefinition")}function O8(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 C8(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&&Sn(p,p.length,0,af(f,a.slice(l+1,c),s)),Sn(p,p.length,0,[["exit",d,s],["enter",a[c][1],s],["exit",a[c][1],s],["exit",u,s]]),Sn(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=of(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=of(h);return m._open=!g||g===2&&!!y,m._close=!y||y===2&&!!g,s(h)}}}class A8{constructor(){this.map=[]}add(t,r,n){I8(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 I8(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 R8(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 P8(){return{flow:{null:{tokenize:N8,resolveAll:M8}}}}function N8(e,t,r){const n=this;let o=0,i=0,a;return s;function s(A){let D=n.events.length-1;for(;D>-1;){const Z=n.events[D][1].type;if(Z==="lineEnding"||Z==="linePrefix")D--;else break}const H=D>-1?n.events[D][1].type:null,U=H==="tableHead"||H==="tableRow"?S:c;return U===S&&n.parser.lazy[n.now().line]?r(A):U(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||Ht(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"),$(A)}function $(A){return A===124?(e.enter("tableCellDivider"),e.consume(A),e.exit("tableCellDivider"),$):A===null||et(A)?(e.exit("tableRow"),t(A)):xt(A)?Ct(e,$,"whitespace")(A):(e.enter("data"),R(A))}function R(A){return A===null||A===124||Ht(A)?(e.exit("data"),$(A)):(e.consume(A),A===92?N:R)}function N(A){return A===92||A===124?(e.consume(A),R):R(A)}}function M8(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 A8;for(;++r<e.length;){const f=e[r],h=f[1];f[0]==="enter"?h.type==="tableHead"?(s=!1,c!==0&&(O$(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=vf(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=vf(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=vf(p,t,i,o,r,d)):a[1]!==0&&(d=vf(p,t,a,o,r,d)),o=0):o&&(h.type==="data"||h.type==="tableDelimiterMarker"||h.type==="tableDelimiterFiller")&&(a[3]=r)}for(c!==0&&O$(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=R8(t.events,r))}return e}function vf(e,t,r,n,o,i){const a=n===1?"tableHeader":n===2?"tableDelimiter":"tableData",s="tableContent";r[0]!==0&&(i.end=Object.assign({},es(t.events,r[0])),e.add(r[0],0,[["exit",i,t]]));const c=es(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=es(t.events,r[2]),u=es(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({},es(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function O$(e,t,r,n,o){const i=[],a=es(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 es(e,t){const r=e[t],n=r[0]==="enter"?"start":"end";return r[1][n]}const j8={tokenize:F8};function D8(){return{text:{91:j8}}}function F8(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 Ht(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:L8},t,r)(c):r(c)}}function L8(e,t,r){return Ct(e,n,"whitespace");function n(o){return o===null?r(o):t(o)}}function q8(e){return nT([d8(),x8(),C8(e),P8(),D8()])}const B8={};function U8(e){const t=this,r=e||B8,n=t.data(),o=n.micromarkExtensions||(n.micromarkExtensions=[]),i=n.fromMarkdownExtensions||(n.fromMarkdownExtensions=[]),a=n.toMarkdownExtensions||(n.toMarkdownExtensions=[]);o.push(q8(r)),i.push(s8()),a.push(c8(r))}const Wt={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"}}},z8=({text:e})=>{const{message:{blocks:{text:t}}}=Wt,r={h1:({node:n,...o})=>Y.jsx("h1",{...o,...t==null?void 0:t.heading1}),h2:({node:n,...o})=>Y.jsx("h2",{...o,...t==null?void 0:t.heading2}),h3:({node:n,...o})=>Y.jsx("h3",{...o,...t==null?void 0:t.heading3}),h4:"h3",h5:"h3",h6:"h3",em:({node:n,...o})=>Y.jsx("em",{...o,...t==null?void 0:t.italic}),strong:({node:n,...o})=>Y.jsx("strong",{...o,...t==null?void 0:t.bold}),p:({node:n,...o})=>Y.jsx("p",{...o,...t==null?void 0:t.text}),hr:({node:n,...o})=>Y.jsx("hr",{...o,...t==null?void 0:t.horizontalRule}),a:({node:n,...o})=>Y.jsx("a",{...o,...t==null?void 0:t.link,target:"_blank"}),ol:({node:n,...o})=>Y.jsx("ol",{...o,...t==null?void 0:t.orderedList}),ul:({node:n,...o})=>Y.jsx("ul",{...o,...t==null?void 0:t.unorderedList}),li:({node:n,...o})=>Y.jsx("li",{...o,...t==null?void 0:t.listItem}),br:({node:n,...o})=>Y.jsx("br",{...o,...t==null?void 0:t.lineBreak}),img:()=>null,pre:({node:n,...o})=>Y.jsx("pre",{...o,...t==null?void 0:t.pre})};return Y.jsx(C9,{components:r,remarkPlugins:[U8,D9],children:e})};var C$={},sg={},A$={};Object.defineProperty(A$,"__esModule",{value:!0});var bf={},Z8=He&&He.__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(bf,"__esModule",{value:!0}),bf.Emitter=void 0;let V8=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 Z8(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})}};bf.Emitter=V8;var I$={};Object.defineProperty(I$,"__esModule",{value:!0});var R$={};(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={}))})(R$);var P$={};Object.defineProperty(P$,"__esModule",{value:!0});var N$={};Object.defineProperty(N$,"__esModule",{value:!0});var M$={};Object.defineProperty(M$,"__esModule",{value:!0});var j$={};Object.defineProperty(j$,"__esModule",{value:!0}),function(e){var t=He&&He.__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=He&&He.__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(A$,e),r(bf,e),r(I$,e),r(R$,e),r(P$,e),r(N$,e),r(M$,e),r(j$,e)}(sg);var wf={},D$={},cg={exports:{}},xf={},lg={},Sf={},Gc={},ts={},na={},rs={},ns={},mo={};Object.defineProperty(mo,"__esModule",{value:!0}),mo.ERROR_PACKET=mo.PACKET_TYPES_REVERSE=mo.PACKET_TYPES=void 0;const yo=Object.create(null);mo.PACKET_TYPES=yo,yo.open="0",yo.close="1",yo.ping="2",yo.pong="3",yo.message="4",yo.upgrade="5",yo.noop="6";const F$=Object.create(null);mo.PACKET_TYPES_REVERSE=F$,Object.keys(yo).forEach(e=>{F$[yo[e]]=e});const H8={type:"error",data:"parser error"};mo.ERROR_PACKET=H8,Object.defineProperty(ns,"__esModule",{value:!0}),ns.encodePacket=ns.encodePacketToBinary=void 0;const W8=mo,L$=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",q$=typeof ArrayBuffer=="function",B$=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,U$=({type:e,data:t},r,n)=>L$&&t instanceof Blob?r?n(t):z$(t,n):q$&&(t instanceof ArrayBuffer||B$(t))?r?n(t):z$(new Blob([t]),n):n(W8.PACKET_TYPES[e]+(t||""));ns.encodePacket=U$;const z$=(e,t)=>{const r=new FileReader;return r.onload=function(){const n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function Z$(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ug;function K8(e,t){if(L$&&e.data instanceof Blob)return e.data.arrayBuffer().then(Z$).then(t);if(q$&&(e.data instanceof ArrayBuffer||B$(e.data)))return t(Z$(e.data));U$(e,!1,r=>{ug||(ug=new TextEncoder),t(ug.encode(r))})}ns.encodePacketToBinary=K8;var _f={},os={};Object.defineProperty(os,"__esModule",{value:!0}),os.decode=os.encode=void 0;const is="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jc=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<is.length;e++)Jc[is.charCodeAt(e)]=e;const G8=e=>{let t=new Uint8Array(e),r,n=t.length,o="";for(r=0;r<n;r+=3)o+=is[t[r]>>2],o+=is[(t[r]&3)<<4|t[r+1]>>4],o+=is[(t[r+1]&15)<<2|t[r+2]>>6],o+=is[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};os.encode=G8;const J8=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=Jc[e.charCodeAt(n)],a=Jc[e.charCodeAt(n+1)],s=Jc[e.charCodeAt(n+2)],c=Jc[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};os.decode=J8,Object.defineProperty(_f,"__esModule",{value:!0}),_f.decodePacket=void 0;const Ef=mo,Y8=os,X8=typeof ArrayBuffer=="function",Q8=(e,t)=>{if(typeof e!="string")return{type:"message",data:V$(e,t)};const r=e.charAt(0);return r==="b"?{type:"message",data:eV(e.substring(1),t)}:Ef.PACKET_TYPES_REVERSE[r]?e.length>1?{type:Ef.PACKET_TYPES_REVERSE[r],data:e.substring(1)}:{type:Ef.PACKET_TYPES_REVERSE[r]}:Ef.ERROR_PACKET};_f.decodePacket=Q8;const eV=(e,t)=>{if(X8){const r=(0,Y8.decode)(e);return V$(r,t)}else return{base64:!0,data:e}},V$=(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=ns;Object.defineProperty(e,"encodePacket",{enumerable:!0,get:function(){return t.encodePacket}});const r=_f;Object.defineProperty(e,"decodePacket",{enumerable:!0,get:function(){return r.decodePacket}});const n=mo,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})(rs);function sn(e){if(e)return tV(e)}function tV(e){for(var t in sn.prototype)e[t]=sn.prototype[t];return e}sn.prototype.on=sn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},sn.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this},sn.prototype.off=sn.prototype.removeListener=sn.prototype.removeAllListeners=sn.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},sn.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},sn.prototype.emitReserved=sn.prototype.emit,sn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},sn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const as=Hh(Object.freeze(Object.defineProperty({__proto__:null,Emitter:sn},Symbol.toStringTag,{value:"Module"})));var Dn={},oa={};Object.defineProperty(oa,"__esModule",{value:!0}),oa.globalThisShim=void 0,oa.globalThisShim=(()=>typeof self<"u"?self:typeof window<"u"?window:Function("return this")())(),Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.byteLength=Dn.installTimerFunctions=Dn.pick=void 0;const yi=oa;function rV(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}Dn.pick=rV;const nV=yi.globalThisShim.setTimeout,oV=yi.globalThisShim.clearTimeout;function iV(e,t){t.useNativeTimers?(e.setTimeoutFn=nV.bind(yi.globalThisShim),e.clearTimeoutFn=oV.bind(yi.globalThisShim)):(e.setTimeoutFn=yi.globalThisShim.setTimeout.bind(yi.globalThisShim),e.clearTimeoutFn=yi.globalThisShim.clearTimeout.bind(yi.globalThisShim))}Dn.installTimerFunctions=iV;const aV=1.33;function sV(e){return typeof e=="string"?cV(e):Math.ceil((e.byteLength||e.size)*aV)}Dn.byteLength=sV;function cV(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 dg={exports:{}},fg,H$;function lV(){if(H$)return fg;H$=1;var e=1e3,t=e*60,r=t*60,n=r*24,o=n*7,i=n*365.25;fg=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 fg}function uV(e){r.debug=r,r.default=r,r.coerce=c,r.disable=i,r.enable=o,r.enabled=a,r.humanize=lV(),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,$)=>{if(S==="%%")return"%";x++;const R=r.formatters[$];if(typeof R=="function"){const N=m[x];S=R.call(g,N),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 dV=uV;(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(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let c;return 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&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[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=dV(t);const{formatters:s}=e.exports;s.j=function(c){try{return JSON.stringify(c)}catch(l){return"[UnexpectedJSONParseError]: "+l.message}}})(dg,dg.exports);var go=dg.exports,ia={};Object.defineProperty(ia,"__esModule",{value:!0}),ia.decode=ia.encode=void 0;function fV(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}ia.encode=fV;function pV(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}ia.decode=pV;var hV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(na,"__esModule",{value:!0}),na.Transport=void 0;const mV=rs,yV=as,gV=Dn,vV=hV(go),bV=ia,wV=(0,vV.default)("engine.io-client:transport");class xV extends Error{constructor(t,r,n){super(t),this.description=r,this.context=n,this.type="TransportError"}}class SV extends yV.Emitter{constructor(t){super(),this.writable=!1,(0,gV.installTimerFunctions)(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,r,n){return super.emitReserved("error",new xV(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):wV("transport is not open, discarding packets")}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const r=(0,mV.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,bV.encode)(t);return r.length?"?"+r:""}}na.Transport=SV;var Uo={};Object.defineProperty(Uo,"__esModule",{value:!0}),Uo.yeast=Uo.decode=Uo.encode=void 0;const W$="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),kf=64,K$={};let G$=0,gi=0,J$;function pg(e){let t="";do t=W$[e%kf]+t,e=Math.floor(e/kf);while(e>0);return t}Uo.encode=pg;function _V(e){let t=0;for(gi=0;gi<e.length;gi++)t=t*kf+K$[e.charAt(gi)];return t}Uo.decode=_V;function EV(){const e=pg(+new Date);return e!==J$?(G$=0,J$=e):e+"."+pg(G$++)}for(Uo.yeast=EV;gi<kf;gi++)K$[W$[gi]]=gi;var ss={},Tf={};Object.defineProperty(Tf,"__esModule",{value:!0}),Tf.hasCORS=void 0;let Y$=!1;try{Y$=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}Tf.hasCORS=Y$,Object.defineProperty(ss,"__esModule",{value:!0}),ss.createCookieJar=ss.XHR=void 0;const kV=Tf,TV=oa;function $V(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||kV.hasCORS))return new XMLHttpRequest}catch{}if(!t)try{return new TV.globalThisShim[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}ss.XHR=$V;function OV(){}ss.createCookieJar=OV;var CV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ts,"__esModule",{value:!0}),ts.Request=ts.Polling=void 0;const AV=na,IV=CV(go),RV=Uo,X$=rs,hg=ss,PV=as,Q$=Dn,NV=oa,dn=(0,IV.default)("engine.io-client:polling");function MV(){}const jV=function(){return new hg.XHR({xdomain:!1}).responseType!=null}();class DV extends AV.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=jV&&!r,this.opts.withCredentials&&(this.cookieJar=(0,hg.createCookieJar)())}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const r=()=>{dn("paused"),this.readyState="paused",t()};if(this.polling||!this.writable){let n=0;this.polling&&(dn("we are currently polling - waiting to pause"),n++,this.once("pollComplete",function(){dn("pre-pause polling complete"),--n||r()})),this.writable||(dn("we are currently writing - waiting to pause"),n++,this.once("drain",function(){dn("pre-pause writing complete"),--n||r()}))}else r()}poll(){dn("polling"),this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){dn("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,X$.decodePayload)(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"?this.poll():dn('ignoring poll - transport state "%s"',this.readyState))}doClose(){const t=()=>{dn("writing close packet"),this.write([{type:"close"}])};this.readyState==="open"?(dn("transport open - closing"),t()):(dn("transport not open - deferring close"),this.once("open",t))}write(t){this.writable=!1,(0,X$.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,RV.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 aa(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(){dn("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}}ts.Polling=DV;let aa=class Vh extends PV.Emitter{constructor(t,r){super(),(0,Q$.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,Q$.pick)(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this.opts.xd;const n=this.xhr=new hg.XHR(r);try{dn("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))},dn("xhr data %s",this.data),n.send(this.data)}catch(o){this.setTimeoutFn(()=>{this.onError(o)},0);return}typeof document<"u"&&(this.index=Vh.requestsCount++,Vh.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=MV,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Vh.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(ts.Request=aa,aa.requestsCount=0,aa.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",eO);else if(typeof addEventListener=="function"){const e="onpagehide"in NV.globalThisShim?"pagehide":"unload";addEventListener(e,eO,!1)}}function eO(){for(let e in aa.requests)aa.requests.hasOwnProperty(e)&&aa.requests[e].abort()}var $f={},_n={};Object.defineProperty(_n,"__esModule",{value:!0}),_n.defaultBinaryType=_n.usingBrowserWebSocket=_n.WebSocket=_n.nextTick=void 0;const tO=oa;_n.nextTick=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,r)=>r(t,0))(),_n.WebSocket=tO.globalThisShim.WebSocket||tO.globalThisShim.MozWebSocket,_n.usingBrowserWebSocket=!0,_n.defaultBinaryType="arraybuffer";var FV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($f,"__esModule",{value:!0}),$f.WS=void 0;const LV=na,qV=Uo,BV=Dn,vi=_n,UV=FV(go),zV=rs,ZV=(0,UV.default)("engine.io-client:websocket"),rO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VV extends LV.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=rO?{}:(0,BV.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=vi.usingBrowserWebSocket&&!rO?r?new vi.WebSocket(t,r):new vi.WebSocket(t):new vi.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,zV.encodePacket)(n,this.supportsBinary,i=>{const a={};vi.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{vi.usingBrowserWebSocket?this.ws.send(i):this.ws.send(i,a)}catch{ZV("websocket closed before onclose event")}o&&(0,vi.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,qV.yeast)()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}check(){return!!vi.WebSocket}}$f.WS=VV;var Of={},HV=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Of,"__esModule",{value:!0}),Of.WT=void 0;const WV=na,KV=_n,nO=rs,Yc=(0,HV(go).default)("engine.io-client:webtransport");class GV extends WV.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(()=>{Yc("transport closed gracefully"),this.onClose()}).catch(t=>{Yc("transport closed due to %s",t),this.onError("webtransport error",t)}),this.transport.ready.then(()=>{this.transport.createBidirectionalStream().then(t=>{const r=(0,nO.createPacketDecoderStream)(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=(0,nO.createPacketEncoderStream)();o.readable.pipeTo(t.writable),this.writer=o.writable.getWriter();const i=()=>{n.read().then(({done:s,value:c})=>{if(s){Yc("session is closed");return}Yc("received chunk: %o",c),this.onPacket(c),i()}).catch(s=>{Yc("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,KV.nextTick)(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this.transport)===null||t===void 0||t.close()}}Of.WT=GV,Object.defineProperty(Gc,"__esModule",{value:!0}),Gc.transports=void 0;const JV=ts,YV=$f,XV=Of;Gc.transports={websocket:YV.WS,webtransport:XV.WT,polling:JV.Polling};var Xc={};Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.parse=void 0;const QV=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,eH=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function tH(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=QV.exec(e||""),i={},a=14;for(;a--;)i[eH[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=rH(i,i.path),i.queryKey=nH(i,i.query),i}Xc.parse=tH;function rH(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 nH(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var oH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Sf,"__esModule",{value:!0}),Sf.Socket=void 0;const iH=Gc,oO=Dn,aH=ia,iO=Xc,sH=oH(go),cH=as,aO=rs,lH=_n,nr=(0,sH.default)("engine.io-client:socket");let sO=class ec extends cH.Emitter{constructor(t,r={}){super(),this.binaryType=lH.defaultBinaryType,this.writeBuffer=[],t&&typeof t=="object"&&(r=t,t=null),t?(t=(0,iO.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,iO.parse)(r.host).host),(0,oO.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,aH.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){nr('creating transport "%s"',t);const r=Object.assign({},this.opts.query);r.EIO=aO.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 nr("options: %j",n),new iH.transports[t](n)}open(){let t;if(this.opts.rememberUpgrade&&ec.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){nr("error while creating transport: %s",r),this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){nr("setting transport %s",t.name),this.transport&&(nr("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){nr('probing transport "%s"',t);let r=this.createTransport(t),n=!1;ec.priorWebsocketSuccess=!1;const o=()=>{n||(nr('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(nr('probe transport "%s" pong',t),this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;ec.priorWebsocketSuccess=r.name==="websocket",nr('pausing current transport "%s"',this.transport.name),this.transport.pause(()=>{n||this.readyState!=="closed"&&(nr("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{nr('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(),nr('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&&(nr('"%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(nr("socket open"),this.readyState="open",ec.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){nr("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(nr('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 nr('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();nr("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,oO.byteLength)(o)),n>0&&r>this.maxPayload)return nr("only send %d out of %d packets",n,this.writeBuffer.length),this.writeBuffer.slice(0,n);r+=2}return nr("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"),nr("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){nr("socket error %j",t),ec.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,r){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(nr('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}};Sf.Socket=sO,sO.protocol=aO.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=Sf;Object.defineProperty(e,"Socket",{enumerable:!0,get:function(){return t.Socket}}),e.protocol=t.Socket.protocol;var r=na;Object.defineProperty(e,"Transport",{enumerable:!0,get:function(){return r.Transport}});var n=Gc;Object.defineProperty(e,"transports",{enumerable:!0,get:function(){return n.transports}});var o=Dn;Object.defineProperty(e,"installTimerFunctions",{enumerable:!0,get:function(){return o.installTimerFunctions}});var i=Xc;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return i.parse}});var a=_n;Object.defineProperty(e,"nextTick",{enumerable:!0,get:function(){return a.nextTick}})}(lg);var uH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xf,"__esModule",{value:!0}),xf.url=void 0;const dH=lg,cO=uH(go).default("socket.io-client:url");function fH(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)||(cO("protocol-less url %s",e),typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),cO("parse %s",e),n=dH.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}xf.url=fH;var Cf={},Qc={},Af={},cs={},sa={};Object.defineProperty(sa,"__esModule",{value:!0}),sa.hasBinary=sa.isBinary=void 0;const pH=typeof ArrayBuffer=="function",hH=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,lO=Object.prototype.toString,mH=typeof Blob=="function"||typeof Blob<"u"&&lO.call(Blob)==="[object BlobConstructor]",yH=typeof File=="function"||typeof File<"u"&&lO.call(File)==="[object FileConstructor]";function uO(e){return pH&&(e instanceof ArrayBuffer||hH(e))||mH&&e instanceof Blob||yH&&e instanceof File}sa.isBinary=uO;function If(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r<n;r++)if(If(e[r]))return!0;return!1}if(uO(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return If(e.toJSON(),!0);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&If(e[r]))return!0;return!1}sa.hasBinary=If,Object.defineProperty(cs,"__esModule",{value:!0}),cs.reconstructPacket=cs.deconstructPacket=void 0;const gH=sa;function vH(e){const t=[],r=e.data,n=e;return n.data=mg(r,t),n.attachments=t.length,{packet:n,buffers:t}}cs.deconstructPacket=vH;function mg(e,t){if(!e)return e;if((0,gH.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]=mg(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]=mg(e[n],t));return r}return e}function bH(e,t){return e.data=yg(e.data,t),delete e.attachments,e}cs.reconstructPacket=bH;function yg(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]=yg(e[r],t);else if(typeof e=="object")for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=yg(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=as,r=cs,n=sa,i=(0,go.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=[]}}})(Af);var el={};Object.defineProperty(el,"__esModule",{value:!0}),el.on=void 0;function wH(e,t,r){return e.on(t,r),function(){e.off(t,r)}}el.on=wH;var xH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qc,"__esModule",{value:!0}),Qc.Socket=void 0;const Xn=Af,Rf=el,SH=as,xr=xH(go).default("socket.io-client:socket"),_H=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class EH extends SH.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=[Rf.on(t,"open",this.onopen.bind(this)),Rf.on(t,"packet",this.onpacket.bind(this)),Rf.on(t,"error",this.onerror.bind(this)),Rf.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(_H.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:Xn.PacketType.EVENT,data:r};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof r[r.length-1]=="function"){const a=this.ids++;xr("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)?xr("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&&(xr("removing packet with ack id %d from the buffer",t),this.sendBuffer.splice(a,1));xr("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&&(xr("packet [%d] is discarded after %d tries",n.id,n.tryCount),this._queue.shift(),r&&r(o)):(xr("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(xr("draining queue"),!this.connected||this._queue.length===0)return;const r=this._queue[0];if(r.pending&&!t){xr("packet [%d] has already been sent and is waiting for an ack",r.id);return}r.pending=!0,r.tryCount++,xr("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(){xr("transport is open - connecting"),typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Xn.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){xr("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 Xn.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 Xn.PacketType.EVENT:case Xn.PacketType.BINARY_EVENT:this.onevent(t);break;case Xn.PacketType.ACK:case Xn.PacketType.BINARY_ACK:this.onack(t);break;case Xn.PacketType.DISCONNECT:this.ondisconnect();break;case Xn.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||[];xr("emitting event %j",r),t.id!=null&&(xr("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,xr("sending ack %j",o),r.packet({type:Xn.PacketType.ACK,id:t,data:o}))}}onack(t){const r=this.acks[t.id];typeof r=="function"?(xr("calling ack %s with %j",t.id,t.data),r.apply(this,t.data),delete this.acks[t.id]):xr("bad ack %s",t.id)}onconnect(t,r){xr("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(){xr("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&&(xr("performing disconnect (%s)",this.nsp),this.packet({type:Xn.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)}}}Qc.Socket=EH;var Pf={};Object.defineProperty(Pf,"__esModule",{value:!0}),Pf.Backoff=void 0;function ls(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}Pf.Backoff=ls,ls.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},ls.prototype.reset=function(){this.attempts=0},ls.prototype.setMin=function(e){this.ms=e},ls.prototype.setMax=function(e){this.max=e},ls.prototype.setJitter=function(e){this.jitter=e};var kH=He&&He.__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]}),TH=He&&He.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),$H=He&&He.__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)&&kH(t,e,r);return TH(t,e),t},OH=He&&He.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cf,"__esModule",{value:!0}),Cf.Manager=void 0;const gg=lg,CH=Qc,AH=$H(Af),ca=el,IH=Pf,RH=as,qr=OH(go).default("socket.io-client:manager");class PH extends RH.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,gg.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 IH.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||AH;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(qr("readyState %s",this._readyState),~this._readyState.indexOf("open"))return this;qr("opening %s",this.uri),this.engine=new gg.Socket(this.uri,this.opts);const r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const o=ca.on(r,"open",function(){n.onopen(),t&&t()}),i=s=>{qr("error"),this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=ca.on(r,"error",i);if(this._timeout!==!1){const s=this._timeout;qr("connect attempt will timeout after %d",s);const c=this.setTimeoutFn(()=>{qr("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(){qr("open"),this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ca.on(t,"ping",this.onping.bind(this)),ca.on(t,"data",this.ondata.bind(this)),ca.on(t,"error",this.onerror.bind(this)),ca.on(t,"close",this.onclose.bind(this)),ca.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){gg.nextTick(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){qr("error",t),this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new CH.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){qr("socket %s is still active, skipping close",n);return}this._close()}_packet(t){qr("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(){qr("cleanup"),this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){qr("disconnect"),this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,r){qr("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)qr("reconnect failed"),this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const r=this.backoff.duration();qr("will wait %dms before reconnect attempt",r),this._reconnecting=!0;const n=this.setTimeoutFn(()=>{t.skipReconnect||(qr("attempting reconnect"),this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(qr("reconnect attempt error"),t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):(qr("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)}}Cf.Manager=PH,function(e,t){var r=He&&He.__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=xf,o=Cf;Object.defineProperty(t,"Manager",{enumerable:!0,get:function(){return o.Manager}});const i=Qc;Object.defineProperty(t,"Socket",{enumerable:!0,get:function(){return i.Socket}});const s=r(go).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=Af;Object.defineProperty(t,"protocol",{enumerable:!0,get:function(){return u.protocol}}),e.exports=l}(cg,cg.exports);var NH=cg.exports;(function(e){var t=He&&He.__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=He&&He.__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=sg,o=r(NH);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})(D$);var Nf={},MH=He&&He.__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(Nf,"__esModule",{value:!0}),Nf.SocketEmitter=void 0;class jH{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 MH(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})}}Nf.SocketEmitter=jH;var fn=He&&He.__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(wf,"__esModule",{value:!0}),wf.MessagingSocket=void 0;const dO=D$,DH=Nf;class FH extends DH.SocketEmitter{constructor(t){super(),this.clientId=t.clientId,this.com=new dO.SocketCom(t.url),this.com.events.on(dO.SocketComEvents.Message,r=>fn(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 fn(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 fn(this,void 0,void 0,function*(){this.com.disconnect(),yield this.emit("disconnect",void 0)})}getUser(){return fn(this,void 0,void 0,function*(){return this.request("users.get",{})})}switchConversation(t){return fn(this,void 0,void 0,function*(){this._conversationId=t,yield this.emit("conversation",this._conversationId)})}createConversation(t){return fn(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 fn(this,void 0,void 0,function*(){yield this.request("conversations.start",{id:t||this._conversationId})})}getConversation(t){return fn(this,void 0,void 0,function*(){return this.request("conversations.get",{id:t||this._conversationId})})}deleteConversation(t){return fn(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 fn(this,void 0,void 0,function*(){return this.request("conversations.list",{limit:t||20})})}sendText(t){return fn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:{type:"text",text:t}})})}sendPayload(t){return fn(this,void 0,void 0,function*(){return this.request("messages.create",{conversationId:this._conversationId,payload:t})})}listMessages(t){return fn(this,void 0,void 0,function*(){return this.request("messages.list",{conversationId:this._conversationId,limit:t||20})})}sendFeedback(t,r){return fn(this,void 0,void 0,function*(){yield this.request("messages.feedback",{messageId:t,feedback:r})})}request(t,r){return this.com.request(t,r)}}wf.MessagingSocket=FH,function(e){var t=He&&He.__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=He&&He.__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(sg,e),r(wf,e)}(C$);class LH{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 C$.MessagingSocket(t),this.emitter=new uy,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=Dd.parse(n),{payload:i,disableInput:a}=oy(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=Dd.parse(n.payload),{payload:i,disableInput:a}=oy(o);return{...n,payload:i,disableInput:a}})}}function fO(e,t){return function(){return e.apply(t,arguments)}}const{toString:pO}=Object.prototype,{getPrototypeOf:vg}=Object,bg=(e=>t=>{const r=pO.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),zo=e=>(e=e.toLowerCase(),t=>bg(t)===e),Mf=e=>t=>typeof t===e,{isArray:us}=Array,tl=Mf("undefined");function qH(e){return e!==null&&!tl(e)&&e.constructor!==null&&!tl(e.constructor)&&la(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hO=zo("ArrayBuffer");function BH(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hO(e.buffer),t}const UH=Mf("string"),la=Mf("function"),mO=Mf("number"),wg=e=>e!==null&&typeof e=="object",zH=e=>e===!0||e===!1,jf=e=>{if(bg(e)!=="object")return!1;const t=vg(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},ZH=zo("Date"),VH=zo("File"),HH=zo("Blob"),WH=zo("FileList"),KH=e=>wg(e)&&la(e.pipe),GH=e=>{const t="[object FormData]";return e&&(typeof FormData=="function"&&e instanceof FormData||pO.call(e)===t||la(e.toString)&&e.toString()===t)},JH=zo("URLSearchParams"),YH=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function rl(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,o;if(typeof e!="object"&&(e=[e]),us(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 yO(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 gO=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),vO=e=>!tl(e)&&e!==gO;function xg(){const{caseless:e}=vO(this)&&this||{},t={},r=(n,o)=>{const i=e&&yO(t,o)||o;jf(t[i])&&jf(n)?t[i]=xg(t[i],n):jf(n)?t[i]=xg({},n):us(n)?t[i]=n.slice():t[i]=n};for(let n=0,o=arguments.length;n<o;n++)arguments[n]&&rl(arguments[n],r);return t}const XH=(e,t,r,{allOwnKeys:n}={})=>(rl(t,(o,i)=>{r&&la(o)?e[i]=fO(o,r):e[i]=o},{allOwnKeys:n}),e),QH=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),eW=(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)},tW=(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&&vg(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},rW=(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},nW=e=>{if(!e)return null;if(us(e))return e;let t=e.length;if(!mO(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},oW=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&vg(Uint8Array)),iW=(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])}},aW=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},sW=zo("HTMLFormElement"),cW=e=>e.toLowerCase().replace(/[_-\s]([a-z\d])(\w*)/g,function(r,n,o){return n.toUpperCase()+o}),bO=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),lW=zo("RegExp"),wO=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};rl(r,(o,i)=>{t(o,i,e)!==!1&&(n[i]=o)}),Object.defineProperties(e,n)},de={isArray:us,isArrayBuffer:hO,isBuffer:qH,isFormData:GH,isArrayBufferView:BH,isString:UH,isNumber:mO,isBoolean:zH,isObject:wg,isPlainObject:jf,isUndefined:tl,isDate:ZH,isFile:VH,isBlob:HH,isRegExp:lW,isFunction:la,isStream:KH,isURLSearchParams:JH,isTypedArray:oW,isFileList:WH,forEach:rl,merge:xg,extend:XH,trim:YH,stripBOM:QH,inherits:eW,toFlatObject:tW,kindOf:bg,kindOfTest:zo,endsWith:rW,toArray:nW,forEachEntry:iW,matchAll:aW,isHTMLForm:sW,hasOwnProperty:bO,hasOwnProp:bO,reduceDescriptors:wO,freezeMethods:e=>{wO(e,(t,r)=>{if(la(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(la(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 us(e)?n(e):n(String(e).split(t)),r},toCamelCase:cW,noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:yO,global:gO,isContextDefined:vO,toJSONObject:e=>{const t=new Array(10),r=(n,o)=>{if(wg(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[o]=n;const i=us(n)?[]:{};return rl(n,(a,s)=>{const c=r(a,o+1);!tl(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)}de.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:de.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const xO=It.prototype,SO={};["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=>{SO[e]={value:e}}),Object.defineProperties(It,SO),Object.defineProperty(xO,"isAxiosError",{value:!0}),It.from=(e,t,r,n,o,i)=>{const a=Object.create(xO);return de.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 uW=typeof self=="object"?self.FormData:window.FormData;const dW=St(uW);function Sg(e){return de.isPlainObject(e)||de.isArray(e)}function _O(e){return de.endsWith(e,"[]")?e.slice(0,-2):e}function EO(e,t,r){return e?e.concat(t).map(function(o,i){return o=_O(o),!r&&i?"["+o+"]":o}).join(r?".":""):t}function fW(e){return de.isArray(e)&&!e.some(Sg)}const pW=de.toFlatObject(de,{},null,function(t){return/^is[A-Z]/.test(t)});function hW(e){return e&&de.isFunction(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator]}function Df(e,t,r){if(!de.isObject(e))throw new TypeError("target must be an object");t=t||new(dW||FormData),r=de.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,m){return!de.isUndefined(m[y])});const n=r.metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&hW(t);if(!de.isFunction(o))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(de.isDate(h))return h.toISOString();if(!c&&de.isBlob(h))throw new It("Blob is not supported. Use a Buffer instead.");return de.isArrayBuffer(h)||de.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(de.endsWith(y,"{}"))y=n?y:y.slice(0,-2),h=JSON.stringify(h);else if(de.isArray(h)&&fW(h)||de.isFileList(h)||de.endsWith(y,"[]")&&(g=de.toArray(h)))return y=_O(y),g.forEach(function(b,x){!(de.isUndefined(b)||b===null)&&t.append(a===!0?EO([y],x,i):a===null?y:y+"[]",l(b))}),!1}return Sg(h)?!0:(t.append(EO(m,y,i),l(h)),!1)}const d=[],p=Object.assign(pW,{defaultVisitor:u,convertValue:l,isVisitable:Sg});function f(h,y){if(!de.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+y.join("."));d.push(h),de.forEach(h,function(g,v){(!(de.isUndefined(g)||g===null)&&o.call(t,g,de.isString(v)?v.trim():v,y,p))===!0&&f(g,y?y.concat(v):[v])}),d.pop()}}if(!de.isObject(e))throw new TypeError("data must be an object");return f(e),t}function kO(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function _g(e,t){this._pairs=[],e&&Df(e,this,t)}const TO=_g.prototype;TO.append=function(t,r){this._pairs.push([t,r])},TO.toString=function(t){const r=t?function(n){return t.call(this,n,kO)}:kO;return this._pairs.map(function(o){return r(o[0])+"="+r(o[1])},"").join("&")};function mW(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function $O(e,t,r){if(!t)return e;const n=r&&r.encode||mW,o=r&&r.serialize;let i;if(o?i=o(t,r):i=de.isURLSearchParams(t)?t.toString():new _g(t,r).toString(n),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class yW{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){de.forEach(this.handlers,function(n){n!==null&&t(n)})}}const OO=yW,CO={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},gW=typeof URLSearchParams<"u"?URLSearchParams:_g,vW=FormData,bW=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wW=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),vo={isBrowser:!0,classes:{URLSearchParams:gW,FormData:vW,Blob},isStandardBrowserEnv:bW,isStandardBrowserWebWorkerEnv:wW,protocols:["http","https","file","blob","url","data"]};function xW(e,t){return Df(e,new vo.classes.URLSearchParams,Object.assign({visitor:function(r,n,o,i){return vo.isNode&&de.isBuffer(r)?(this.append(n,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function SW(e){return de.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _W(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 AO(e){function t(r,n,o,i){let a=r[i++];const s=Number.isFinite(+a),c=i>=r.length;return a=!a&&de.isArray(o)?o.length:a,c?(de.hasOwnProp(o,a)?o[a]=[o[a],n]:o[a]=n,!s):((!o[a]||!de.isObject(o[a]))&&(o[a]=[]),t(r,n,o[a],i)&&de.isArray(o[a])&&(o[a]=_W(o[a])),!s)}if(de.isFormData(e)&&de.isFunction(e.entries)){const r={};return de.forEachEntry(e,(n,o)=>{t(SW(n),o,r,0)}),r}return null}const EW={"Content-Type":void 0};function kW(e,t,r){if(de.isString(e))try{return(t||JSON.parse)(e),de.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ff={transitional:CO,adapter:["xhr","http"],transformRequest:[function(t,r){const n=r.getContentType()||"",o=n.indexOf("application/json")>-1,i=de.isObject(t);if(i&&de.isHTMLForm(t)&&(t=new FormData(t)),de.isFormData(t))return o&&o?JSON.stringify(AO(t)):t;if(de.isArrayBuffer(t)||de.isBuffer(t)||de.isStream(t)||de.isFile(t)||de.isBlob(t))return t;if(de.isArrayBufferView(t))return t.buffer;if(de.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 xW(t,this.formSerializer).toString();if((s=de.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return Df(s?{"files[]":t}:t,c&&new c,this.formSerializer)}}return i||o?(r.setContentType("application/json",!1),kW(t)):t}],transformResponse:[function(t){const r=this.transitional||Ff.transitional,n=r&&r.forcedJSONParsing,o=this.responseType==="json";if(t&&de.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:vo.classes.FormData,Blob:vo.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};de.forEach(["delete","get","head"],function(t){Ff.headers[t]={}}),de.forEach(["post","put","patch"],function(t){Ff.headers[t]=de.merge(EW)});const Eg=Ff,TW=de.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"]),$W=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]&&TW[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},IO=Symbol("internals");function nl(e){return e&&String(e).trim().toLowerCase()}function Lf(e){return e===!1||e==null?e:de.isArray(e)?e.map(Lf):String(e)}function OW(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 CW(e){return/^[-_a-zA-Z]+$/.test(e.trim())}function RO(e,t,r,n){if(de.isFunction(n))return n.call(this,t,r);if(de.isString(t)){if(de.isString(n))return t.indexOf(n)!==-1;if(de.isRegExp(n))return n.test(t)}}function AW(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function IW(e,t){const r=de.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 qf{constructor(t){t&&this.set(t)}set(t,r,n){const o=this;function i(s,c,l){const u=nl(c);if(!u)throw new Error("header name must be a non-empty string");const d=de.findKey(o,u);(!d||o[d]===void 0||l===!0||l===void 0&&o[d]!==!1)&&(o[d||c]=Lf(s))}const a=(s,c)=>de.forEach(s,(l,u)=>i(l,u,c));return de.isPlainObject(t)||t instanceof this.constructor?a(t,r):de.isString(t)&&(t=t.trim())&&!CW(t)?a($W(t),r):t!=null&&i(r,t,n),this}get(t,r){if(t=nl(t),t){const n=de.findKey(this,t);if(n){const o=this[n];if(!r)return o;if(r===!0)return OW(o);if(de.isFunction(r))return r.call(this,o,n);if(de.isRegExp(r))return r.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=nl(t),t){const n=de.findKey(this,t);return!!(n&&(!r||RO(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let o=!1;function i(a){if(a=nl(a),a){const s=de.findKey(n,a);s&&(!r||RO(n,n[s],s,r))&&(delete n[s],o=!0)}}return de.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 de.forEach(this,(o,i)=>{const a=de.findKey(n,i);if(a){r[a]=Lf(o),delete r[i];return}const s=t?AW(i):String(i).trim();s!==i&&delete r[i],r[s]=Lf(o),n[s]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return de.forEach(this,(n,o)=>{n!=null&&n!==!1&&(r[o]=t&&de.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[IO]=this[IO]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=nl(a);n[s]||(IW(o,a),n[s]=!0)}return de.isArray(t)?t.forEach(i):i(t),this}}qf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),de.freezeMethods(qf.prototype),de.freezeMethods(qf);const Zo=qf;function kg(e,t){const r=this||Eg,n=t||r,o=Zo.from(n.headers);let i=n.data;return de.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function PO(e){return!!(e&&e.__CANCEL__)}function ol(e,t,r){It.call(this,e??"canceled",It.ERR_CANCELED,t,r),this.name="CanceledError"}de.inherits(ol,It,{__CANCEL__:!0});const RW=null;function PW(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 NW=vo.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,a,s){const c=[];c.push(r+"="+encodeURIComponent(n)),de.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),de.isString(i)&&c.push("path="+i),de.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 MW(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jW(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function NO(e,t){return e&&!MW(t)?jW(e,t):t}const DW=vo.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=de.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function FW(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LW(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 MO(e,t){let r=0;const n=LW(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 Bf={http:RW,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let o=e.data;const i=Zo.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}de.isFormData(o)&&(vo.isStandardBrowserEnv||vo.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=NO(e.baseURL,e.url);l.open(e.method.toUpperCase(),$O(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;const f=Zo.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};PW(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||CO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new It(h,y.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,l)),l=null},vo.isStandardBrowserEnv){const f=(e.withCredentials||DW(u))&&e.xsrfCookieName&&NW.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&de.forEach(i.toJSON(),function(h,y){l.setRequestHeader(y,h)}),de.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",MO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",MO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{l&&(n(!f||f.type?new ol(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=FW(u);if(p&&vo.protocols.indexOf(p)===-1){n(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};de.forEach(Bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qW={getAdapter:e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=de.isString(r)?Bf[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new It(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(de.hasOwnProp(Bf,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!de.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Bf};function Tg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ol(null,e)}function jO(e){return Tg(e),e.headers=Zo.from(e.headers),e.data=kg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qW.getAdapter(e.adapter||Eg.adapter)(e).then(function(n){return Tg(e),n.data=kg.call(e,e.transformResponse,n),n.headers=Zo.from(n.headers),n},function(n){return PO(n)||(Tg(e),n&&n.response&&(n.response.data=kg.call(e,e.transformResponse,n.response),n.response.headers=Zo.from(n.response.headers))),Promise.reject(n)})}const DO=e=>e instanceof Zo?e.toJSON():e;function ds(e,t){t=t||{};const r={};function n(l,u,d){return de.isPlainObject(l)&&de.isPlainObject(u)?de.merge.call({caseless:d},l,u):de.isPlainObject(u)?de.merge({},u):de.isArray(u)?u.slice():u}function o(l,u,d){if(de.isUndefined(u)){if(!de.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!de.isUndefined(u))return n(void 0,u)}function a(l,u){if(de.isUndefined(u)){if(!de.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(DO(l),DO(u),!0)};return de.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);de.isUndefined(p)&&d!==s||(r[u]=p)}),r}const FO="1.2.5",$g={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$g[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const LO={};$g.transitional=function(t,r,n){function o(i,a){return"[Axios v"+FO+"] 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&&!LO[a]&&(LO[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 BW(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 Og={assertOptions:BW,validators:$g},bi=Og.validators;class Uf{constructor(t){this.defaults=t,this.interceptors={request:new OO,response:new OO}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ds(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Og.assertOptions(n,{silentJSONParsing:bi.transitional(bi.boolean),forcedJSONParsing:bi.transitional(bi.boolean),clarifyTimeoutError:bi.transitional(bi.boolean)},!1),o!==void 0&&Og.assertOptions(o,{encode:bi.function,serialize:bi.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a;a=i&&de.merge(i.common,i[r.method]),a&&de.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Zo.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=[jO.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=jO.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=ds(this.defaults,t);const r=NO(t.baseURL,t.url);return $O(r,t.params,t.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(t){Uf.prototype[t]=function(r,n){return this.request(ds(n||{},{method:t,url:r,data:(n||{}).data}))}}),de.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(ds(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Uf.prototype[t]=r(),Uf.prototype[t+"Form"]=r(!0)});const zf=Uf;class Cg{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 ol(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 Cg(function(o){t=o}),cancel:t}}}const UW=Cg;function zW(e){return function(r){return e.apply(null,r)}}function ZW(e){return de.isObject(e)&&e.isAxiosError===!0}const Ag={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(Ag).forEach(([e,t])=>{Ag[t]=e});const VW=Ag;function qO(e){const t=new zf(e),r=fO(zf.prototype.request,t);return de.extend(r,zf.prototype,t,{allOwnKeys:!0}),de.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return qO(ds(e,o))},r}const Sr=qO(Eg);Sr.Axios=zf,Sr.CanceledError=ol,Sr.CancelToken=UW,Sr.isCancel=PO,Sr.VERSION=FO,Sr.toFormData=Df,Sr.AxiosError=It,Sr.Cancel=Sr.CanceledError,Sr.all=function(t){return Promise.all(t)},Sr.spread=zW,Sr.isAxiosError=ZW,Sr.mergeConfig=ds,Sr.AxiosHeaders=Zo,Sr.formToJSON=e=>AO(de.isHTMLForm(e)?new FormData(e):e),Sr.HttpStatusCode=VW,Sr.default=Sr;const BO=Sr,HW={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Ig=typeof window<"u"&&typeof window.document<"u"?window.crypto:vm;Ig.getRandomValues||(Ig=HW);class Wt 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=Wt.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(Ig.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 WW=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Rg=e=>e instanceof Wt||WW(e)&&e.isApiError===!0;class il extends Wt{constructor(t,r,n){super(500,"An unknown error occurred","Unknown",t,r,n)}}class KW extends Wt{constructor(t,r,n){super(500,"An internal error occurred","Internal",t,r,n)}}class GW extends Wt{constructor(t,r,n){super(401,"The request requires to be authenticated.","Unauthorized",t,r,n)}}class JW extends Wt{constructor(t,r,n){super(403,"The requested action can't be peform by this resource.","Forbidden",t,r,n)}}class YW extends Wt{constructor(t,r,n){super(413,"The request payload is too large.","PayloadTooLarge",t,r,n)}}class XW extends Wt{constructor(t,r,n){super(400,"The request payload is invalid.","InvalidPayload",t,r,n)}}class QW extends Wt{constructor(t,r,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,r,n)}}class eK extends Wt{constructor(t,r,n){super(405,"The requested method does not exist.","MethodNotFound",t,r,n)}}class tK extends Wt{constructor(t,r,n){super(404,"The requested resource does not exist.","ResourceNotFound",t,r,n)}}class rK extends Wt{constructor(t,r,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,r,n)}}class nK extends Wt{constructor(t,r,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,r,n)}}class oK extends Wt{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 iK extends Wt{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 aK extends Wt{constructor(t,r,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,r,n)}}class sK extends Wt{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 cK extends Wt{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 lK extends Wt{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 uK extends Wt{constructor(t,r,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,r,n)}}class dK extends Wt{constructor(t,r,n){super(409,"The record attempted to be created already exists.","AlreadyExists",t,r,n)}}class fK extends Wt{constructor(t,r,n){super(429,"The request has been rate limited.","RateLimited",t,r,n)}}class pK extends Wt{constructor(t,r,n){super(402,"A payment is required to perform this request.","PaymentRequired",t,r,n)}}class hK extends Wt{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 mK extends Wt{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 yK extends Wt{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 gK={Unknown:il,Internal:KW,Unauthorized:GW,Forbidden:JW,PayloadTooLarge:YW,InvalidPayload:XW,UnsupportedMediaType:QW,MethodNotFound:eK,ResourceNotFound:tK,InvalidJsonSchema:rK,InvalidDataFormat:nK,InvalidIdentifier:oK,RelationConflict:iK,ReferenceConstraint:aK,ResourceLockedConflict:sK,ReferenceNotFound:cK,InvalidQuery:lK,Runtime:uK,AlreadyExists:dK,RateLimited:fK,PaymentRequired:pK,QuotaExceeded:hK,LimitExceeded:mK,BreakingChanges:yK},UO=e=>Rg(e)?e:e instanceof Error?new il(e.message,e):typeof e=="string"?new il(e):vK(e);function vK(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=gK[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new il(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new il("An invalid error occurred: "+JSON.stringify(e))}var bK=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},zO=typeof Symbol<"u"&&Symbol,wK=bK,ZO=function(){return typeof zO!="function"||typeof Symbol!="function"||typeof zO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wK()},Pg={__proto__:null,foo:{}},xK=Object,VO=function(){return{__proto__:Pg}.foo===Pg.foo&&!(Pg instanceof xK)},SK="Function.prototype.bind called on incompatible ",_K=Object.prototype.toString,EK=Math.max,kK="[object Function]",HO=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},TK=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},$K=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},OK=function(t){var r=this;if(typeof r!="function"||_K.apply(r)!==kK)throw new TypeError(SK+r);for(var n=TK(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,HO(n,arguments));return Object(u)===u?u:this}return r.apply(t,HO(n,arguments))},a=EK(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+$K(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},CK=OK,al=Function.prototype.bind||CK,AK=al,IK=AK.call(Function.call,Object.prototype.hasOwnProperty),Et,fs=SyntaxError,WO=Function,ps=TypeError,Ng=function(e){try{return WO('"use strict"; return ('+e+").constructor;")()}catch{}},ua=Object.getOwnPropertyDescriptor;if(ua)try{ua({},"")}catch{ua=null}var Mg=function(){throw new ps},RK=ua?function(){try{return arguments.callee,Mg}catch{try{return ua(arguments,"callee").get}catch{return Mg}}}():Mg,hs=ZO(),PK=VO(),Ir=Object.getPrototypeOf||(PK?function(e){return e.__proto__}:null),ms={},NK=typeof Uint8Array>"u"||!Ir?Et:Ir(Uint8Array),da={"%AggregateError%":typeof AggregateError>"u"?Et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Et:ArrayBuffer,"%ArrayIteratorPrototype%":hs&&Ir?Ir([][Symbol.iterator]()):Et,"%AsyncFromSyncIteratorPrototype%":Et,"%AsyncFunction%":ms,"%AsyncGenerator%":ms,"%AsyncGeneratorFunction%":ms,"%AsyncIteratorPrototype%":ms,"%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%":WO,"%GeneratorFunction%":ms,"%Int8Array%":typeof Int8Array>"u"?Et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hs&&Ir?Ir(Ir([][Symbol.iterator]())):Et,"%JSON%":typeof JSON=="object"?JSON:Et,"%Map%":typeof Map>"u"?Et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hs||!Ir?Et:Ir(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"||!hs||!Ir?Et:Ir(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hs&&Ir?Ir(""[Symbol.iterator]()):Et,"%Symbol%":hs?Symbol:Et,"%SyntaxError%":fs,"%ThrowTypeError%":RK,"%TypedArray%":NK,"%TypeError%":ps,"%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(Ir)try{null.error}catch(e){var MK=Ir(Ir(e));da["%Error.prototype%"]=MK}var jK=function e(t){var r;if(t==="%AsyncFunction%")r=Ng("async function () {}");else if(t==="%GeneratorFunction%")r=Ng("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ng("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Ir&&(r=Ir(o.prototype))}return da[t]=r,r},KO={"%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"]},sl=al,Zf=IK,DK=sl.call(Function.call,Array.prototype.concat),FK=sl.call(Function.apply,Array.prototype.splice),GO=sl.call(Function.call,String.prototype.replace),Vf=sl.call(Function.call,String.prototype.slice),LK=sl.call(Function.call,RegExp.prototype.exec),qK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,BK=/\\(\\)?/g,UK=function(t){var r=Vf(t,0,1),n=Vf(t,-1);if(r==="%"&&n!=="%")throw new fs("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fs("invalid intrinsic syntax, expected opening `%`");var o=[];return GO(t,qK,function(i,a,s,c){o[o.length]=s?GO(c,BK,"$1"):a||i}),o},zK=function(t,r){var n=t,o;if(Zf(KO,n)&&(o=KO[n],n="%"+o[0]+"%"),Zf(da,n)){var i=da[n];if(i===ms&&(i=jK(n)),typeof i>"u"&&!r)throw new ps("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new fs("intrinsic "+t+" does not exist!")},ZK=function(t,r){if(typeof t!="string"||t.length===0)throw new ps("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ps('"allowMissing" argument must be a boolean');if(LK(/^%?[^%]*%?$/,t)===null)throw new fs("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=UK(t),o=n.length>0?n[0]:"",i=zK("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],FK(n,DK([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Vf(p,0,1),h=Vf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new fs("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",Zf(da,a))s=da[a];else if(s!=null){if(!(p in s)){if(!r)throw new ps("base intrinsic for "+t+" exists, but the property is not available.");return}if(ua&&u+1>=n.length){var y=ua(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=Zf(s,p),s=s[p];d&&!c&&(da[a]=s)}}return s},VK=Error,HK=EvalError,WK=RangeError,KK=ReferenceError,GK=SyntaxError,JK=TypeError,YK=URIError,XK=Function.prototype.call,QK=Object.prototype.hasOwnProperty,eG=al,tG=eG.call(XK,QK),kt,rG=VK,nG=HK,oG=WK,iG=KK,ys=GK,gs=JK,aG=YK,JO=Function,jg=function(e){try{return JO('"use strict"; return ('+e+").constructor;")()}catch{}},fa=Object.getOwnPropertyDescriptor;if(fa)try{fa({},"")}catch{fa=null}var Dg=function(){throw new gs},sG=fa?function(){try{return arguments.callee,Dg}catch{try{return fa(arguments,"callee").get}catch{return Dg}}}():Dg,vs=ZO(),cG=VO(),Rr=Object.getPrototypeOf||(cG?function(e){return e.__proto__}:null),bs={},lG=typeof Uint8Array>"u"||!Rr?kt:Rr(Uint8Array),pa={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?kt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?kt:ArrayBuffer,"%ArrayIteratorPrototype%":vs&&Rr?Rr([][Symbol.iterator]()):kt,"%AsyncFromSyncIteratorPrototype%":kt,"%AsyncFunction%":bs,"%AsyncGenerator%":bs,"%AsyncGeneratorFunction%":bs,"%AsyncIteratorPrototype%":bs,"%Atomics%":typeof Atomics>"u"?kt:Atomics,"%BigInt%":typeof BigInt>"u"?kt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?kt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?kt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?kt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rG,"%eval%":eval,"%EvalError%":nG,"%Float32Array%":typeof Float32Array>"u"?kt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?kt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?kt:FinalizationRegistry,"%Function%":JO,"%GeneratorFunction%":bs,"%Int8Array%":typeof Int8Array>"u"?kt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?kt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?kt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vs&&Rr?Rr(Rr([][Symbol.iterator]())):kt,"%JSON%":typeof JSON=="object"?JSON:kt,"%Map%":typeof Map>"u"?kt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vs||!Rr?kt:Rr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?kt:Promise,"%Proxy%":typeof Proxy>"u"?kt:Proxy,"%RangeError%":oG,"%ReferenceError%":iG,"%Reflect%":typeof Reflect>"u"?kt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?kt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vs||!Rr?kt:Rr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?kt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vs&&Rr?Rr(""[Symbol.iterator]()):kt,"%Symbol%":vs?Symbol:kt,"%SyntaxError%":ys,"%ThrowTypeError%":sG,"%TypedArray%":lG,"%TypeError%":gs,"%Uint8Array%":typeof Uint8Array>"u"?kt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?kt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?kt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?kt:Uint32Array,"%URIError%":aG,"%WeakMap%":typeof WeakMap>"u"?kt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?kt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?kt:WeakSet};if(Rr)try{null.error}catch(e){var uG=Rr(Rr(e));pa["%Error.prototype%"]=uG}var dG=function e(t){var r;if(t==="%AsyncFunction%")r=jg("async function () {}");else if(t==="%GeneratorFunction%")r=jg("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=jg("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Rr&&(r=Rr(o.prototype))}return pa[t]=r,r},YO={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},cl=al,Hf=tG,fG=cl.call(Function.call,Array.prototype.concat),pG=cl.call(Function.apply,Array.prototype.splice),XO=cl.call(Function.call,String.prototype.replace),Wf=cl.call(Function.call,String.prototype.slice),hG=cl.call(Function.call,RegExp.prototype.exec),mG=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yG=/\\(\\)?/g,gG=function(t){var r=Wf(t,0,1),n=Wf(t,-1);if(r==="%"&&n!=="%")throw new ys("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ys("invalid intrinsic syntax, expected opening `%`");var o=[];return XO(t,mG,function(i,a,s,c){o[o.length]=s?XO(c,yG,"$1"):a||i}),o},vG=function(t,r){var n=t,o;if(Hf(YO,n)&&(o=YO[n],n="%"+o[0]+"%"),Hf(pa,n)){var i=pa[n];if(i===bs&&(i=dG(n)),typeof i>"u"&&!r)throw new gs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ys("intrinsic "+t+" does not exist!")},QO=function(t,r){if(typeof t!="string"||t.length===0)throw new gs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new gs('"allowMissing" argument must be a boolean');if(hG(/^%?[^%]*%?$/,t)===null)throw new ys("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=gG(t),o=n.length>0?n[0]:"",i=vG("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],pG(n,fG([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Wf(p,0,1),h=Wf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new ys("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",Hf(pa,a))s=pa[a];else if(s!=null){if(!(p in s)){if(!r)throw new gs("base intrinsic for "+t+" exists, but the property is not available.");return}if(fa&&u+1>=n.length){var y=fa(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=Hf(s,p),s=s[p];d&&!c&&(pa[a]=s)}}return s},eC={exports:{}};(function(e){var t=al,r=QO,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})(eC);var bG=eC.exports,tC=QO,rC=bG,wG=rC(tC("String.prototype.indexOf")),xG=function(t,r){var n=tC(t,!!r);return typeof n=="function"&&wG(t,".prototype.")>-1?rC(n):n},Fg=typeof Map=="function"&&Map.prototype,Lg=Object.getOwnPropertyDescriptor&&Fg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kf=Fg&&Lg&&typeof Lg.get=="function"?Lg.get:null,nC=Fg&&Map.prototype.forEach,qg=typeof Set=="function"&&Set.prototype,Bg=Object.getOwnPropertyDescriptor&&qg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gf=qg&&Bg&&typeof Bg.get=="function"?Bg.get:null,oC=qg&&Set.prototype.forEach,SG=typeof WeakMap=="function"&&WeakMap.prototype,ll=SG?WeakMap.prototype.has:null,_G=typeof WeakSet=="function"&&WeakSet.prototype,ul=_G?WeakSet.prototype.has:null,EG=typeof WeakRef=="function"&&WeakRef.prototype,iC=EG?WeakRef.prototype.deref:null,kG=Boolean.prototype.valueOf,TG=Object.prototype.toString,$G=Function.prototype.toString,OG=String.prototype.match,Ug=String.prototype.slice,wi=String.prototype.replace,CG=String.prototype.toUpperCase,aC=String.prototype.toLowerCase,sC=RegExp.prototype.test,cC=Array.prototype.concat,bo=Array.prototype.join,AG=Array.prototype.slice,lC=Math.floor,zg=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Zg=Object.getOwnPropertySymbols,Vg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ws=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Yr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ws||"symbol")?Symbol.toStringTag:null,uC=Object.prototype.propertyIsEnumerable,dC=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fC(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||sC.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-lC(-e):lC(e);if(n!==e){var o=String(n),i=Ug.call(t,o.length+1);return wi.call(o,r,"$&_")+"."+wi.call(wi.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wi.call(t,r,"$&_")}var Hg=bm,pC=Hg.custom,hC=gC(pC)?pC:null,IG=function e(t,r,n,o){var i=r||{};if(xi(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xi(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=xi(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(xi(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(xi(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 bC(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?fC(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?fC(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 Wg(t)?"[Array]":"[Object]";var d=GG(i,n);if(typeof o>"u")o=[];else if(vC(o,t)>=0)return"[Circular]";function p(U,Z,L){if(Z&&(o=AG.call(o),o.push(Z)),L){var q={depth:i.depth};return xi(i,"quoteStyle")&&(q.quoteStyle=i.quoteStyle),e(U,q,n+1,o)}return e(U,i,n+1,o)}if(typeof t=="function"&&!yC(t)){var f=qG(t),h=Jf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+bo.call(h,", ")+" }":"")}if(gC(t)){var y=ws?wi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Vg.call(t);return typeof t=="object"&&!ws?dl(y):y}if(HG(t)){for(var m="<"+aC.call(String(t.nodeName)),g=t.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+mC(RG(g[v].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+aC.call(String(t.nodeName))+">",m}if(Wg(t)){if(t.length===0)return"[]";var b=Jf(t,p);return d&&!KG(b)?"["+Gg(b,d)+"]":"[ "+bo.call(b,", ")+" ]"}if(NG(t)){var x=Jf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!uC.call(t,"cause")?"{ ["+String(t)+"] "+bo.call(cC.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bo.call(x,", ")+" }"}if(typeof t=="object"&&a){if(hC&&typeof t[hC]=="function"&&Hg)return Hg(t,{depth:u-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(BG(t)){var w=[];return nC&&nC.call(t,function(U,Z){w.push(p(Z,t,!0)+" => "+p(U,t))}),wC("Map",Kf.call(t),w,d)}if(ZG(t)){var S=[];return oC&&oC.call(t,function(U){S.push(p(U,t))}),wC("Set",Gf.call(t),S,d)}if(UG(t))return Kg("WeakMap");if(VG(t))return Kg("WeakSet");if(zG(t))return Kg("WeakRef");if(jG(t))return dl(p(Number(t)));if(FG(t))return dl(p(zg.call(t)));if(DG(t))return dl(kG.call(t));if(MG(t))return dl(p(String(t)));if(!PG(t)&&!yC(t)){var $=Jf(t,p),R=dC?dC(t)===Object.prototype:t instanceof Object||t.constructor===Object,N=t instanceof Object?"":"null prototype",A=!R&&Yr&&Object(t)===t&&Yr in t?Ug.call(Si(t),8,-1):N?"Object":"",D=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=D+(A||N?"["+bo.call(cC.call([],A||[],N||[]),": ")+"] ":"");return $.length===0?H+"{}":d?H+"{"+Gg($,d)+"}":H+"{ "+bo.call($,", ")+" }"}return String(t)};function mC(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function RG(e){return wi.call(String(e),/"/g,""")}function Wg(e){return Si(e)==="[object Array]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function PG(e){return Si(e)==="[object Date]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function yC(e){return Si(e)==="[object RegExp]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function NG(e){return Si(e)==="[object Error]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function MG(e){return Si(e)==="[object String]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function jG(e){return Si(e)==="[object Number]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function DG(e){return Si(e)==="[object Boolean]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function gC(e){if(ws)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Vg)return!1;try{return Vg.call(e),!0}catch{}return!1}function FG(e){if(!e||typeof e!="object"||!zg)return!1;try{return zg.call(e),!0}catch{}return!1}var LG=Object.prototype.hasOwnProperty||function(e){return e in this};function xi(e,t){return LG.call(e,t)}function Si(e){return TG.call(e)}function qG(e){if(e.name)return e.name;var t=OG.call($G.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function vC(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 BG(e){if(!Kf||!e||typeof e!="object")return!1;try{Kf.call(e);try{Gf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function UG(e){if(!ll||!e||typeof e!="object")return!1;try{ll.call(e,ll);try{ul.call(e,ul)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function zG(e){if(!iC||!e||typeof e!="object")return!1;try{return iC.call(e),!0}catch{}return!1}function ZG(e){if(!Gf||!e||typeof e!="object")return!1;try{Gf.call(e);try{Kf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function VG(e){if(!ul||!e||typeof e!="object")return!1;try{ul.call(e,ul);try{ll.call(e,ll)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function HG(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bC(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return bC(Ug.call(e,0,t.maxStringLength),t)+n}var o=wi.call(wi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WG);return mC(o,"single",t)}function WG(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":"")+CG.call(t.toString(16))}function dl(e){return"Object("+e+")"}function Kg(e){return e+" { ? }"}function wC(e,t,r,n){var o=n?Gg(r,n):bo.call(r,", ");return e+" ("+t+") {"+o+"}"}function KG(e){for(var t=0;t<e.length;t++)if(vC(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[IO]=this[IO]={accessors:{}}).accessors,o=this.prototype;function i(a){const s=nl(a);n[s]||(IW(o,a),n[s]=!0)}return de.isArray(t)?t.forEach(i):i(t),this}}qf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent"]),de.freezeMethods(qf.prototype),de.freezeMethods(qf);const Zo=qf;function kg(e,t){const r=this||Eg,n=t||r,o=Zo.from(n.headers);let i=n.data;return de.forEach(e,function(s){i=s.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function PO(e){return!!(e&&e.__CANCEL__)}function ol(e,t,r){It.call(this,e??"canceled",It.ERR_CANCELED,t,r),this.name="CanceledError"}de.inherits(ol,It,{__CANCEL__:!0});const RW=null;function PW(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 NW=vo.isStandardBrowserEnv?function(){return{write:function(r,n,o,i,a,s){const c=[];c.push(r+"="+encodeURIComponent(n)),de.isNumber(o)&&c.push("expires="+new Date(o).toGMTString()),de.isString(i)&&c.push("path="+i),de.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 MW(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function jW(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function NO(e,t){return e&&!MW(t)?jW(e,t):t}const DW=vo.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=de.isString(a)?o(a):a;return s.protocol===n.protocol&&s.host===n.host}}():function(){return function(){return!0}}();function FW(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function LW(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 MO(e,t){let r=0;const n=LW(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 Bf={http:RW,xhr:typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){let o=e.data;const i=Zo.from(e.headers).normalize(),a=e.responseType;let s;function c(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}de.isFormData(o)&&(vo.isStandardBrowserEnv||vo.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=NO(e.baseURL,e.url);l.open(e.method.toUpperCase(),$O(u,e.params,e.paramsSerializer),!0),l.timeout=e.timeout;function d(){if(!l)return;const f=Zo.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};PW(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||CO;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),n(new It(h,y.clarifyTimeoutError?It.ETIMEDOUT:It.ECONNABORTED,e,l)),l=null},vo.isStandardBrowserEnv){const f=(e.withCredentials||DW(u))&&e.xsrfCookieName&&NW.read(e.xsrfCookieName);f&&i.set(e.xsrfHeaderName,f)}o===void 0&&i.setContentType(null),"setRequestHeader"in l&&de.forEach(i.toJSON(),function(h,y){l.setRequestHeader(y,h)}),de.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),a&&a!=="json"&&(l.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&l.addEventListener("progress",MO(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&l.upload&&l.upload.addEventListener("progress",MO(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=f=>{l&&(n(!f||f.type?new ol(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=FW(u);if(p&&vo.protocols.indexOf(p)===-1){n(new It("Unsupported protocol "+p+":",It.ERR_BAD_REQUEST,e));return}l.send(o||null)})}};de.forEach(Bf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const qW={getAdapter:e=>{e=de.isArray(e)?e:[e];const{length:t}=e;let r,n;for(let o=0;o<t&&(r=e[o],!(n=de.isString(r)?Bf[r.toLowerCase()]:r));o++);if(!n)throw n===!1?new It(`Adapter ${r} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(de.hasOwnProp(Bf,r)?`Adapter '${r}' is not available in the build`:`Unknown adapter '${r}'`);if(!de.isFunction(n))throw new TypeError("adapter is not a function");return n},adapters:Bf};function Tg(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ol(null,e)}function jO(e){return Tg(e),e.headers=Zo.from(e.headers),e.data=kg.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),qW.getAdapter(e.adapter||Eg.adapter)(e).then(function(n){return Tg(e),n.data=kg.call(e,e.transformResponse,n),n.headers=Zo.from(n.headers),n},function(n){return PO(n)||(Tg(e),n&&n.response&&(n.response.data=kg.call(e,e.transformResponse,n.response),n.response.headers=Zo.from(n.response.headers))),Promise.reject(n)})}const DO=e=>e instanceof Zo?e.toJSON():e;function ds(e,t){t=t||{};const r={};function n(l,u,d){return de.isPlainObject(l)&&de.isPlainObject(u)?de.merge.call({caseless:d},l,u):de.isPlainObject(u)?de.merge({},u):de.isArray(u)?u.slice():u}function o(l,u,d){if(de.isUndefined(u)){if(!de.isUndefined(l))return n(void 0,l,d)}else return n(l,u,d)}function i(l,u){if(!de.isUndefined(u))return n(void 0,u)}function a(l,u){if(de.isUndefined(u)){if(!de.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(DO(l),DO(u),!0)};return de.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=c[u]||o,p=d(e[u],t[u],u);de.isUndefined(p)&&d!==s||(r[u]=p)}),r}const FO="1.2.5",$g={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$g[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const LO={};$g.transitional=function(t,r,n){function o(i,a){return"[Axios v"+FO+"] 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&&!LO[a]&&(LO[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 BW(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 Og={assertOptions:BW,validators:$g},bi=Og.validators;class Uf{constructor(t){this.defaults=t,this.interceptors={request:new OO,response:new OO}}request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=ds(this.defaults,r);const{transitional:n,paramsSerializer:o,headers:i}=r;n!==void 0&&Og.assertOptions(n,{silentJSONParsing:bi.transitional(bi.boolean),forcedJSONParsing:bi.transitional(bi.boolean),clarifyTimeoutError:bi.transitional(bi.boolean)},!1),o!==void 0&&Og.assertOptions(o,{encode:bi.function,serialize:bi.function},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a;a=i&&de.merge(i.common,i[r.method]),a&&de.forEach(["delete","get","head","post","put","patch","common"],h=>{delete i[h]}),r.headers=Zo.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=[jO.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=jO.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=ds(this.defaults,t);const r=NO(t.baseURL,t.url);return $O(r,t.params,t.paramsSerializer)}}de.forEach(["delete","get","head","options"],function(t){Uf.prototype[t]=function(r,n){return this.request(ds(n||{},{method:t,url:r,data:(n||{}).data}))}}),de.forEach(["post","put","patch"],function(t){function r(n){return function(i,a,s){return this.request(ds(s||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}Uf.prototype[t]=r(),Uf.prototype[t+"Form"]=r(!0)});const zf=Uf;class Cg{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 ol(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 Cg(function(o){t=o}),cancel:t}}}const UW=Cg;function zW(e){return function(r){return e.apply(null,r)}}function ZW(e){return de.isObject(e)&&e.isAxiosError===!0}const Ag={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(Ag).forEach(([e,t])=>{Ag[t]=e});const VW=Ag;function qO(e){const t=new zf(e),r=fO(zf.prototype.request,t);return de.extend(r,zf.prototype,t,{allOwnKeys:!0}),de.extend(r,t,null,{allOwnKeys:!0}),r.create=function(o){return qO(ds(e,o))},r}const Sr=qO(Eg);Sr.Axios=zf,Sr.CanceledError=ol,Sr.CancelToken=UW,Sr.isCancel=PO,Sr.VERSION=FO,Sr.toFormData=Df,Sr.AxiosError=It,Sr.Cancel=Sr.CanceledError,Sr.all=function(t){return Promise.all(t)},Sr.spread=zW,Sr.isAxiosError=ZW,Sr.mergeConfig=ds,Sr.AxiosHeaders=Zo,Sr.formToJSON=e=>AO(de.isHTMLForm(e)?new FormData(e):e),Sr.HttpStatusCode=VW,Sr.default=Sr;const BO=Sr,HW={getRandomValues:e=>new Uint8Array(e.map(()=>Math.floor(Math.random()*256)))};let Ig=typeof window<"u"&&typeof window.document<"u"?window.crypto:vm;Ig.getRandomValues||(Ig=HW);class Kt 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=Kt.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(Ig.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 WW=e=>typeof e=="object"&&!Array.isArray(e)&&e!==null,Rg=e=>e instanceof Kt||WW(e)&&e.isApiError===!0;class il extends Kt{constructor(t,r,n){super(500,"An unknown error occurred","Unknown",t,r,n)}}class KW extends Kt{constructor(t,r,n){super(500,"An internal error occurred","Internal",t,r,n)}}class GW extends Kt{constructor(t,r,n){super(401,"The request requires to be authenticated.","Unauthorized",t,r,n)}}class JW extends Kt{constructor(t,r,n){super(403,"The requested action can't be peform by this resource.","Forbidden",t,r,n)}}class YW extends Kt{constructor(t,r,n){super(413,"The request payload is too large.","PayloadTooLarge",t,r,n)}}class XW extends Kt{constructor(t,r,n){super(400,"The request payload is invalid.","InvalidPayload",t,r,n)}}class QW extends Kt{constructor(t,r,n){super(415,"The request is invalid because the content-type is not supported.","UnsupportedMediaType",t,r,n)}}class eK extends Kt{constructor(t,r,n){super(405,"The requested method does not exist.","MethodNotFound",t,r,n)}}class tK extends Kt{constructor(t,r,n){super(404,"The requested resource does not exist.","ResourceNotFound",t,r,n)}}class rK extends Kt{constructor(t,r,n){super(400,"The provided JSON schema is invalid.","InvalidJsonSchema",t,r,n)}}class nK extends Kt{constructor(t,r,n){super(400,"The provided data doesn't respect the provided JSON schema.","InvalidDataFormat",t,r,n)}}class oK extends Kt{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 iK extends Kt{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 aK extends Kt{constructor(t,r,n){super(409,"The resource cannot be deleted because it's referenced by another resource","ReferenceConstraint",t,r,n)}}class sK extends Kt{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 cK extends Kt{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 lK extends Kt{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 uK extends Kt{constructor(t,r,n){super(400,"An error happened during the execution of a runtime (bot or integration).","Runtime",t,r,n)}}class dK extends Kt{constructor(t,r,n){super(409,"The record attempted to be created already exists.","AlreadyExists",t,r,n)}}class fK extends Kt{constructor(t,r,n){super(429,"The request has been rate limited.","RateLimited",t,r,n)}}class pK extends Kt{constructor(t,r,n){super(402,"A payment is required to perform this request.","PaymentRequired",t,r,n)}}class hK extends Kt{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 mK extends Kt{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 yK extends Kt{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 gK={Unknown:il,Internal:KW,Unauthorized:GW,Forbidden:JW,PayloadTooLarge:YW,InvalidPayload:XW,UnsupportedMediaType:QW,MethodNotFound:eK,ResourceNotFound:tK,InvalidJsonSchema:rK,InvalidDataFormat:nK,InvalidIdentifier:oK,RelationConflict:iK,ReferenceConstraint:aK,ResourceLockedConflict:sK,ReferenceNotFound:cK,InvalidQuery:lK,Runtime:uK,AlreadyExists:dK,RateLimited:fK,PaymentRequired:pK,QuotaExceeded:hK,LimitExceeded:mK,BreakingChanges:yK},UO=e=>Rg(e)?e:e instanceof Error?new il(e.message,e):typeof e=="string"?new il(e):vK(e);function vK(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=gK[e.type];return t?new t(e.message,void 0,e.id||"UNKNOWN"):new il(`An unclassified API error occurred: ${e.message} (Type: ${e.type}, Code: ${e.code})`)}return new il("An invalid error occurred: "+JSON.stringify(e))}var bK=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},zO=typeof Symbol<"u"&&Symbol,wK=bK,ZO=function(){return typeof zO!="function"||typeof Symbol!="function"||typeof zO("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:wK()},Pg={__proto__:null,foo:{}},xK=Object,VO=function(){return{__proto__:Pg}.foo===Pg.foo&&!(Pg instanceof xK)},SK="Function.prototype.bind called on incompatible ",_K=Object.prototype.toString,EK=Math.max,kK="[object Function]",HO=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},TK=function(t,r){for(var n=[],o=r||0,i=0;o<t.length;o+=1,i+=1)n[i]=t[o];return n},$K=function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},OK=function(t){var r=this;if(typeof r!="function"||_K.apply(r)!==kK)throw new TypeError(SK+r);for(var n=TK(arguments,1),o,i=function(){if(this instanceof o){var u=r.apply(this,HO(n,arguments));return Object(u)===u?u:this}return r.apply(t,HO(n,arguments))},a=EK(0,r.length-n.length),s=[],c=0;c<a;c++)s[c]="$"+c;if(o=Function("binder","return function ("+$K(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},CK=OK,al=Function.prototype.bind||CK,AK=al,IK=AK.call(Function.call,Object.prototype.hasOwnProperty),Et,fs=SyntaxError,WO=Function,ps=TypeError,Ng=function(e){try{return WO('"use strict"; return ('+e+").constructor;")()}catch{}},ua=Object.getOwnPropertyDescriptor;if(ua)try{ua({},"")}catch{ua=null}var Mg=function(){throw new ps},RK=ua?function(){try{return arguments.callee,Mg}catch{try{return ua(arguments,"callee").get}catch{return Mg}}}():Mg,hs=ZO(),PK=VO(),Ir=Object.getPrototypeOf||(PK?function(e){return e.__proto__}:null),ms={},NK=typeof Uint8Array>"u"||!Ir?Et:Ir(Uint8Array),da={"%AggregateError%":typeof AggregateError>"u"?Et:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Et:ArrayBuffer,"%ArrayIteratorPrototype%":hs&&Ir?Ir([][Symbol.iterator]()):Et,"%AsyncFromSyncIteratorPrototype%":Et,"%AsyncFunction%":ms,"%AsyncGenerator%":ms,"%AsyncGeneratorFunction%":ms,"%AsyncIteratorPrototype%":ms,"%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%":WO,"%GeneratorFunction%":ms,"%Int8Array%":typeof Int8Array>"u"?Et:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Et:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Et:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":hs&&Ir?Ir(Ir([][Symbol.iterator]())):Et,"%JSON%":typeof JSON=="object"?JSON:Et,"%Map%":typeof Map>"u"?Et:Map,"%MapIteratorPrototype%":typeof Map>"u"||!hs||!Ir?Et:Ir(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"||!hs||!Ir?Et:Ir(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Et:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":hs&&Ir?Ir(""[Symbol.iterator]()):Et,"%Symbol%":hs?Symbol:Et,"%SyntaxError%":fs,"%ThrowTypeError%":RK,"%TypedArray%":NK,"%TypeError%":ps,"%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(Ir)try{null.error}catch(e){var MK=Ir(Ir(e));da["%Error.prototype%"]=MK}var jK=function e(t){var r;if(t==="%AsyncFunction%")r=Ng("async function () {}");else if(t==="%GeneratorFunction%")r=Ng("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ng("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Ir&&(r=Ir(o.prototype))}return da[t]=r,r},KO={"%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"]},sl=al,Zf=IK,DK=sl.call(Function.call,Array.prototype.concat),FK=sl.call(Function.apply,Array.prototype.splice),GO=sl.call(Function.call,String.prototype.replace),Vf=sl.call(Function.call,String.prototype.slice),LK=sl.call(Function.call,RegExp.prototype.exec),qK=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,BK=/\\(\\)?/g,UK=function(t){var r=Vf(t,0,1),n=Vf(t,-1);if(r==="%"&&n!=="%")throw new fs("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new fs("invalid intrinsic syntax, expected opening `%`");var o=[];return GO(t,qK,function(i,a,s,c){o[o.length]=s?GO(c,BK,"$1"):a||i}),o},zK=function(t,r){var n=t,o;if(Zf(KO,n)&&(o=KO[n],n="%"+o[0]+"%"),Zf(da,n)){var i=da[n];if(i===ms&&(i=jK(n)),typeof i>"u"&&!r)throw new ps("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new fs("intrinsic "+t+" does not exist!")},ZK=function(t,r){if(typeof t!="string"||t.length===0)throw new ps("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new ps('"allowMissing" argument must be a boolean');if(LK(/^%?[^%]*%?$/,t)===null)throw new fs("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=UK(t),o=n.length>0?n[0]:"",i=zK("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],FK(n,DK([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Vf(p,0,1),h=Vf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new fs("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",Zf(da,a))s=da[a];else if(s!=null){if(!(p in s)){if(!r)throw new ps("base intrinsic for "+t+" exists, but the property is not available.");return}if(ua&&u+1>=n.length){var y=ua(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=Zf(s,p),s=s[p];d&&!c&&(da[a]=s)}}return s},VK=Error,HK=EvalError,WK=RangeError,KK=ReferenceError,GK=SyntaxError,JK=TypeError,YK=URIError,XK=Function.prototype.call,QK=Object.prototype.hasOwnProperty,eG=al,tG=eG.call(XK,QK),kt,rG=VK,nG=HK,oG=WK,iG=KK,ys=GK,gs=JK,aG=YK,JO=Function,jg=function(e){try{return JO('"use strict"; return ('+e+").constructor;")()}catch{}},fa=Object.getOwnPropertyDescriptor;if(fa)try{fa({},"")}catch{fa=null}var Dg=function(){throw new gs},sG=fa?function(){try{return arguments.callee,Dg}catch{try{return fa(arguments,"callee").get}catch{return Dg}}}():Dg,vs=ZO(),cG=VO(),Rr=Object.getPrototypeOf||(cG?function(e){return e.__proto__}:null),bs={},lG=typeof Uint8Array>"u"||!Rr?kt:Rr(Uint8Array),pa={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?kt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?kt:ArrayBuffer,"%ArrayIteratorPrototype%":vs&&Rr?Rr([][Symbol.iterator]()):kt,"%AsyncFromSyncIteratorPrototype%":kt,"%AsyncFunction%":bs,"%AsyncGenerator%":bs,"%AsyncGeneratorFunction%":bs,"%AsyncIteratorPrototype%":bs,"%Atomics%":typeof Atomics>"u"?kt:Atomics,"%BigInt%":typeof BigInt>"u"?kt:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?kt:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?kt:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?kt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":rG,"%eval%":eval,"%EvalError%":nG,"%Float32Array%":typeof Float32Array>"u"?kt:Float32Array,"%Float64Array%":typeof Float64Array>"u"?kt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?kt:FinalizationRegistry,"%Function%":JO,"%GeneratorFunction%":bs,"%Int8Array%":typeof Int8Array>"u"?kt:Int8Array,"%Int16Array%":typeof Int16Array>"u"?kt:Int16Array,"%Int32Array%":typeof Int32Array>"u"?kt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":vs&&Rr?Rr(Rr([][Symbol.iterator]())):kt,"%JSON%":typeof JSON=="object"?JSON:kt,"%Map%":typeof Map>"u"?kt:Map,"%MapIteratorPrototype%":typeof Map>"u"||!vs||!Rr?kt:Rr(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?kt:Promise,"%Proxy%":typeof Proxy>"u"?kt:Proxy,"%RangeError%":oG,"%ReferenceError%":iG,"%Reflect%":typeof Reflect>"u"?kt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?kt:Set,"%SetIteratorPrototype%":typeof Set>"u"||!vs||!Rr?kt:Rr(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?kt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":vs&&Rr?Rr(""[Symbol.iterator]()):kt,"%Symbol%":vs?Symbol:kt,"%SyntaxError%":ys,"%ThrowTypeError%":sG,"%TypedArray%":lG,"%TypeError%":gs,"%Uint8Array%":typeof Uint8Array>"u"?kt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?kt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?kt:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?kt:Uint32Array,"%URIError%":aG,"%WeakMap%":typeof WeakMap>"u"?kt:WeakMap,"%WeakRef%":typeof WeakRef>"u"?kt:WeakRef,"%WeakSet%":typeof WeakSet>"u"?kt:WeakSet};if(Rr)try{null.error}catch(e){var uG=Rr(Rr(e));pa["%Error.prototype%"]=uG}var dG=function e(t){var r;if(t==="%AsyncFunction%")r=jg("async function () {}");else if(t==="%GeneratorFunction%")r=jg("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=jg("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&Rr&&(r=Rr(o.prototype))}return pa[t]=r,r},YO={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},cl=al,Hf=tG,fG=cl.call(Function.call,Array.prototype.concat),pG=cl.call(Function.apply,Array.prototype.splice),XO=cl.call(Function.call,String.prototype.replace),Wf=cl.call(Function.call,String.prototype.slice),hG=cl.call(Function.call,RegExp.prototype.exec),mG=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,yG=/\\(\\)?/g,gG=function(t){var r=Wf(t,0,1),n=Wf(t,-1);if(r==="%"&&n!=="%")throw new ys("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new ys("invalid intrinsic syntax, expected opening `%`");var o=[];return XO(t,mG,function(i,a,s,c){o[o.length]=s?XO(c,yG,"$1"):a||i}),o},vG=function(t,r){var n=t,o;if(Hf(YO,n)&&(o=YO[n],n="%"+o[0]+"%"),Hf(pa,n)){var i=pa[n];if(i===bs&&(i=dG(n)),typeof i>"u"&&!r)throw new gs("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:i}}throw new ys("intrinsic "+t+" does not exist!")},QO=function(t,r){if(typeof t!="string"||t.length===0)throw new gs("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new gs('"allowMissing" argument must be a boolean');if(hG(/^%?[^%]*%?$/,t)===null)throw new ys("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=gG(t),o=n.length>0?n[0]:"",i=vG("%"+o+"%",r),a=i.name,s=i.value,c=!1,l=i.alias;l&&(o=l[0],pG(n,fG([0,1],l)));for(var u=1,d=!0;u<n.length;u+=1){var p=n[u],f=Wf(p,0,1),h=Wf(p,-1);if((f==='"'||f==="'"||f==="`"||h==='"'||h==="'"||h==="`")&&f!==h)throw new ys("property names with quotes must have matching quotes");if((p==="constructor"||!d)&&(c=!0),o+="."+p,a="%"+o+"%",Hf(pa,a))s=pa[a];else if(s!=null){if(!(p in s)){if(!r)throw new gs("base intrinsic for "+t+" exists, but the property is not available.");return}if(fa&&u+1>=n.length){var y=fa(s,p);d=!!y,d&&"get"in y&&!("originalValue"in y.get)?s=y.get:s=s[p]}else d=Hf(s,p),s=s[p];d&&!c&&(pa[a]=s)}}return s},eC={exports:{}};(function(e){var t=al,r=QO,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})(eC);var bG=eC.exports,tC=QO,rC=bG,wG=rC(tC("String.prototype.indexOf")),xG=function(t,r){var n=tC(t,!!r);return typeof n=="function"&&wG(t,".prototype.")>-1?rC(n):n},Fg=typeof Map=="function"&&Map.prototype,Lg=Object.getOwnPropertyDescriptor&&Fg?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Kf=Fg&&Lg&&typeof Lg.get=="function"?Lg.get:null,nC=Fg&&Map.prototype.forEach,qg=typeof Set=="function"&&Set.prototype,Bg=Object.getOwnPropertyDescriptor&&qg?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Gf=qg&&Bg&&typeof Bg.get=="function"?Bg.get:null,oC=qg&&Set.prototype.forEach,SG=typeof WeakMap=="function"&&WeakMap.prototype,ll=SG?WeakMap.prototype.has:null,_G=typeof WeakSet=="function"&&WeakSet.prototype,ul=_G?WeakSet.prototype.has:null,EG=typeof WeakRef=="function"&&WeakRef.prototype,iC=EG?WeakRef.prototype.deref:null,kG=Boolean.prototype.valueOf,TG=Object.prototype.toString,$G=Function.prototype.toString,OG=String.prototype.match,Ug=String.prototype.slice,wi=String.prototype.replace,CG=String.prototype.toUpperCase,aC=String.prototype.toLowerCase,sC=RegExp.prototype.test,cC=Array.prototype.concat,bo=Array.prototype.join,AG=Array.prototype.slice,lC=Math.floor,zg=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Zg=Object.getOwnPropertySymbols,Vg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,ws=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Yr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===ws||"symbol")?Symbol.toStringTag:null,uC=Object.prototype.propertyIsEnumerable,dC=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function fC(e,t){if(e===1/0||e===-1/0||e!==e||e&&e>-1e3&&e<1e3||sC.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof e=="number"){var n=e<0?-lC(-e):lC(e);if(n!==e){var o=String(n),i=Ug.call(t,o.length+1);return wi.call(o,r,"$&_")+"."+wi.call(wi.call(i,/([0-9]{3})/g,"$&_"),/_$/,"")}}return wi.call(t,r,"$&_")}var Hg=bm,pC=Hg.custom,hC=gC(pC)?pC:null,IG=function e(t,r,n,o){var i=r||{};if(xi(i,"quoteStyle")&&i.quoteStyle!=="single"&&i.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(xi(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=xi(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(xi(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(xi(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 bC(t,i);if(typeof t=="number"){if(t===0)return 1/0/t>0?"0":"-0";var c=String(t);return s?fC(t,c):c}if(typeof t=="bigint"){var l=String(t)+"n";return s?fC(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 Wg(t)?"[Array]":"[Object]";var d=GG(i,n);if(typeof o>"u")o=[];else if(vC(o,t)>=0)return"[Circular]";function p(U,Z,L){if(Z&&(o=AG.call(o),o.push(Z)),L){var q={depth:i.depth};return xi(i,"quoteStyle")&&(q.quoteStyle=i.quoteStyle),e(U,q,n+1,o)}return e(U,i,n+1,o)}if(typeof t=="function"&&!yC(t)){var f=qG(t),h=Jf(t,p);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(h.length>0?" { "+bo.call(h,", ")+" }":"")}if(gC(t)){var y=ws?wi.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):Vg.call(t);return typeof t=="object"&&!ws?dl(y):y}if(HG(t)){for(var m="<"+aC.call(String(t.nodeName)),g=t.attributes||[],v=0;v<g.length;v++)m+=" "+g[v].name+"="+mC(RG(g[v].value),"double",i);return m+=">",t.childNodes&&t.childNodes.length&&(m+="..."),m+="</"+aC.call(String(t.nodeName))+">",m}if(Wg(t)){if(t.length===0)return"[]";var b=Jf(t,p);return d&&!KG(b)?"["+Gg(b,d)+"]":"[ "+bo.call(b,", ")+" ]"}if(NG(t)){var x=Jf(t,p);return!("cause"in Error.prototype)&&"cause"in t&&!uC.call(t,"cause")?"{ ["+String(t)+"] "+bo.call(cC.call("[cause]: "+p(t.cause),x),", ")+" }":x.length===0?"["+String(t)+"]":"{ ["+String(t)+"] "+bo.call(x,", ")+" }"}if(typeof t=="object"&&a){if(hC&&typeof t[hC]=="function"&&Hg)return Hg(t,{depth:u-n});if(a!=="symbol"&&typeof t.inspect=="function")return t.inspect()}if(BG(t)){var w=[];return nC&&nC.call(t,function(U,Z){w.push(p(Z,t,!0)+" => "+p(U,t))}),wC("Map",Kf.call(t),w,d)}if(ZG(t)){var S=[];return oC&&oC.call(t,function(U){S.push(p(U,t))}),wC("Set",Gf.call(t),S,d)}if(UG(t))return Kg("WeakMap");if(VG(t))return Kg("WeakSet");if(zG(t))return Kg("WeakRef");if(jG(t))return dl(p(Number(t)));if(FG(t))return dl(p(zg.call(t)));if(DG(t))return dl(kG.call(t));if(MG(t))return dl(p(String(t)));if(!PG(t)&&!yC(t)){var $=Jf(t,p),R=dC?dC(t)===Object.prototype:t instanceof Object||t.constructor===Object,N=t instanceof Object?"":"null prototype",A=!R&&Yr&&Object(t)===t&&Yr in t?Ug.call(Si(t),8,-1):N?"Object":"",D=R||typeof t.constructor!="function"?"":t.constructor.name?t.constructor.name+" ":"",H=D+(A||N?"["+bo.call(cC.call([],A||[],N||[]),": ")+"] ":"");return $.length===0?H+"{}":d?H+"{"+Gg($,d)+"}":H+"{ "+bo.call($,", ")+" }"}return String(t)};function mC(e,t,r){var n=(r.quoteStyle||t)==="double"?'"':"'";return n+e+n}function RG(e){return wi.call(String(e),/"/g,""")}function Wg(e){return Si(e)==="[object Array]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function PG(e){return Si(e)==="[object Date]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function yC(e){return Si(e)==="[object RegExp]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function NG(e){return Si(e)==="[object Error]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function MG(e){return Si(e)==="[object String]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function jG(e){return Si(e)==="[object Number]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function DG(e){return Si(e)==="[object Boolean]"&&(!Yr||!(typeof e=="object"&&Yr in e))}function gC(e){if(ws)return e&&typeof e=="object"&&e instanceof Symbol;if(typeof e=="symbol")return!0;if(!e||typeof e!="object"||!Vg)return!1;try{return Vg.call(e),!0}catch{}return!1}function FG(e){if(!e||typeof e!="object"||!zg)return!1;try{return zg.call(e),!0}catch{}return!1}var LG=Object.prototype.hasOwnProperty||function(e){return e in this};function xi(e,t){return LG.call(e,t)}function Si(e){return TG.call(e)}function qG(e){if(e.name)return e.name;var t=OG.call($G.call(e),/^function\s*([\w$]+)/);return t?t[1]:null}function vC(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 BG(e){if(!Kf||!e||typeof e!="object")return!1;try{Kf.call(e);try{Gf.call(e)}catch{return!0}return e instanceof Map}catch{}return!1}function UG(e){if(!ll||!e||typeof e!="object")return!1;try{ll.call(e,ll);try{ul.call(e,ul)}catch{return!0}return e instanceof WeakMap}catch{}return!1}function zG(e){if(!iC||!e||typeof e!="object")return!1;try{return iC.call(e),!0}catch{}return!1}function ZG(e){if(!Gf||!e||typeof e!="object")return!1;try{Gf.call(e);try{Kf.call(e)}catch{return!0}return e instanceof Set}catch{}return!1}function VG(e){if(!ul||!e||typeof e!="object")return!1;try{ul.call(e,ul);try{ll.call(e,ll)}catch{return!0}return e instanceof WeakSet}catch{}return!1}function HG(e){return!e||typeof e!="object"?!1:typeof HTMLElement<"u"&&e instanceof HTMLElement?!0:typeof e.nodeName=="string"&&typeof e.getAttribute=="function"}function bC(e,t){if(e.length>t.maxStringLength){var r=e.length-t.maxStringLength,n="... "+r+" more character"+(r>1?"s":"");return bC(Ug.call(e,0,t.maxStringLength),t)+n}var o=wi.call(wi.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,WG);return mC(o,"single",t)}function WG(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":"")+CG.call(t.toString(16))}function dl(e){return"Object("+e+")"}function Kg(e){return e+" { ? }"}function wC(e,t,r,n){var o=n?Gg(r,n):bo.call(r,", ");return e+" ("+t+") {"+o+"}"}function KG(e){for(var t=0;t<e.length;t++)if(vC(e[t],`
|
|
133
133
|
`)>=0)return!1;return!0}function GG(e,t){var r;if(e.indent===" ")r=" ";else if(typeof e.indent=="number"&&e.indent>0)r=bo.call(Array(e.indent+1)," ");else return null;return{base:r,prev:bo.call(Array(t+1),r)}}function Gg(e,t){if(e.length===0)return"";var r=`
|
|
134
134
|
`+t.prev+t.base;return r+bo.call(e,","+r)+`
|
|
135
135
|
`+t.prev}function Jf(e,t){var r=Wg(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=xi(e,o)?t(e[o],e):""}var i=typeof Zg=="function"?Zg(e):[],a;if(ws){a={};for(var s=0;s<i.length;s++)a["$"+i[s]]=i[s]}for(var c in e)xi(e,c)&&(r&&String(Number(c))===c&&c<e.length||ws&&a["$"+c]instanceof Symbol||(sC.call(/[^\w$]/,c)?n.push(t(c,e)+": "+t(e[c],e)):n.push(c+": "+t(e[c],e))));if(typeof Zg=="function")for(var l=0;l<i.length;l++)uC.call(e,i[l])&&n.push("["+t(i[l])+"]: "+t(e[i[l]],e));return n}var Jg=ZK,xs=xG,JG=IG,YG=Jg("%TypeError%"),Yf=Jg("%WeakMap%",!0),Xf=Jg("%Map%",!0),XG=xs("WeakMap.prototype.get",!0),QG=xs("WeakMap.prototype.set",!0),eJ=xs("WeakMap.prototype.has",!0),tJ=xs("Map.prototype.get",!0),rJ=xs("Map.prototype.set",!0),nJ=xs("Map.prototype.has",!0),Yg=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},oJ=function(e,t){var r=Yg(e,t);return r&&r.value},iJ=function(e,t,r){var n=Yg(e,t);n?n.value=r:e.next={key:t,next:e.next,value:r}},aJ=function(e,t){return!!Yg(e,t)},sJ=function(){var t,r,n,o={assert:function(i){if(!o.has(i))throw new YG("Side channel does not contain "+JG(i))},get:function(i){if(Yf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return XG(t,i)}else if(Xf){if(r)return tJ(r,i)}else if(n)return oJ(n,i)},has:function(i){if(Yf&&i&&(typeof i=="object"||typeof i=="function")){if(t)return eJ(t,i)}else if(Xf){if(r)return nJ(r,i)}else if(n)return aJ(n,i);return!1},set:function(i,a){Yf&&i&&(typeof i=="object"||typeof i=="function")?(t||(t=new Yf),QG(t,i,a)):Xf?(r||(r=new Xf),rJ(r,i,a)):(n||(n={key:{},next:null}),iJ(n,i,a))}};return o},cJ=String.prototype.replace,lJ=/%20/g,Xg={RFC1738:"RFC1738",RFC3986:"RFC3986"},Qg={default:Xg.RFC3986,formatters:{RFC1738:function(e){return cJ.call(e,lJ,"+")},RFC3986:function(e){return String(e)}},RFC1738:Xg.RFC1738,RFC3986:Xg.RFC3986},uJ=Qg,ev=Object.prototype.hasOwnProperty,ha=Array.isArray,wo=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}(),dJ=function(t){for(;t.length>1;){var r=t.pop(),n=r.obj[r.prop];if(ha(n)){for(var o=[],i=0;i<n.length;++i)typeof n[i]<"u"&&o.push(n[i]);r.obj[r.prop]=o}}},xC=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},fJ=function e(t,r,n){if(!r)return t;if(typeof r!="object"){if(ha(t))t.push(r);else if(t&&typeof t=="object")(n&&(n.plainObjects||n.allowPrototypes)||!ev.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 ha(t)&&!ha(r)&&(o=xC(t,n)),ha(t)&&ha(r)?(r.forEach(function(i,a){if(ev.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 ev.call(i,a)?i[a]=e(i[a],s,n):i[a]=s,i},o)},pJ=function(t,r){return Object.keys(r).reduce(function(n,o){return n[o]=r[o],n},t)},hJ=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}},mJ=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===uJ.RFC1738&&(l===40||l===41)){s+=a.charAt(c);continue}if(l<128){s=s+wo[l];continue}if(l<2048){s=s+(wo[192|l>>6]+wo[128|l&63]);continue}if(l<55296||l>=57344){s=s+(wo[224|l>>12]+wo[128|l>>6&63]+wo[128|l&63]);continue}c+=1,l=65536+((l&1023)<<10|a.charCodeAt(c)&1023),s+=wo[240|l>>18]+wo[128|l>>12&63]+wo[128|l>>6&63]+wo[128|l&63]}return s},yJ=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 dJ(r),t},gJ=function(t){return Object.prototype.toString.call(t)==="[object RegExp]"},vJ=function(t){return!t||typeof t!="object"?!1:!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},bJ=function(t,r){return[].concat(t,r)},wJ=function(t,r){if(ha(t)){for(var n=[],o=0;o<t.length;o+=1)n.push(r(t[o]));return n}return r(t)},SC={arrayToObject:xC,assign:pJ,combine:bJ,compact:yJ,decode:hJ,encode:mJ,isBuffer:vJ,isRegExp:gJ,maybeMap:wJ,merge:fJ},_C=sJ,Qf=SC,fl=Qg,xJ=Object.prototype.hasOwnProperty,EC={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,r){return t+"["+r+"]"},repeat:function(t){return t}},Vo=Array.isArray,SJ=Array.prototype.push,kC=function(e,t){SJ.apply(e,Vo(t)?t:[t])},_J=Date.prototype.toISOString,TC=fl.default,Xr={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:Qf.encode,encodeValuesOnly:!1,format:TC,formatter:fl.formatters[TC],indices:!1,serializeDate:function(t){return _J.call(t)},skipNulls:!1,strictNullHandling:!1},EJ=function(t){return typeof t=="string"||typeof t=="number"||typeof t=="boolean"||typeof t=="symbol"||typeof t=="bigint"},tv={},kJ=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(tv))!==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(tv)>"u"&&(b=0)}if(typeof c=="function"?g=c(r,g):g instanceof Date?g=d(g):n==="comma"&&Vo(g)&&(g=Qf.maybeMap(g,function(q){return q instanceof Date?d(q):q})),g===null){if(i)return s&&!h?s(r,Xr.encoder,y,"key",p):r;g=""}if(EJ(g)||Qf.isBuffer(g)){if(s){var S=h?r:s(r,Xr.encoder,y,"key",p);return[f(S)+"="+f(s(g,Xr.encoder,y,"value",p))]}return[f(r)+"="+f(String(g))]}var $=[];if(typeof g>"u")return $;var R;if(n==="comma"&&Vo(g))h&&s&&(g=Qf.maybeMap(g,s)),R=[{value:g.length>0?g.join(",")||null:void 0}];else if(Vo(c))R=c;else{var N=Object.keys(g);R=l?N.sort(l):N}for(var A=o&&Vo(g)&&g.length===1?r+"[]":r,D=0;D<R.length;++D){var H=R[D],U=typeof H=="object"&&typeof H.value<"u"?H.value:g[H];if(!(a&&U===null)){var Z=Vo(g)?typeof n=="function"?n(A,H):A:A+(u?"."+H:"["+H+"]");m.set(t,b);var L=_C();L.set(tv,m),kC($,e(U,Z,n,o,i,a,n==="comma"&&h&&Vo(g)?null:s,c,l,u,d,p,f,h,y,L))}}return $},TJ=function(t){if(!t)return Xr;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||Xr.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=fl.default;if(typeof t.format<"u"){if(!xJ.call(fl.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var o=fl.formatters[n],i=Xr.filter;return(typeof t.filter=="function"||Vo(t.filter))&&(i=t.filter),{addQueryPrefix:typeof t.addQueryPrefix=="boolean"?t.addQueryPrefix:Xr.addQueryPrefix,allowDots:typeof t.allowDots>"u"?Xr.allowDots:!!t.allowDots,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Xr.charsetSentinel,delimiter:typeof t.delimiter>"u"?Xr.delimiter:t.delimiter,encode:typeof t.encode=="boolean"?t.encode:Xr.encode,encoder:typeof t.encoder=="function"?t.encoder:Xr.encoder,encodeValuesOnly:typeof t.encodeValuesOnly=="boolean"?t.encodeValuesOnly:Xr.encodeValuesOnly,filter:i,format:n,formatter:o,serializeDate:typeof t.serializeDate=="function"?t.serializeDate:Xr.serializeDate,skipNulls:typeof t.skipNulls=="boolean"?t.skipNulls:Xr.skipNulls,sort:typeof t.sort=="function"?t.sort:null,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Xr.strictNullHandling}},$J=function(e,t){var r=e,n=TJ(t),o,i;typeof n.filter=="function"?(i=n.filter,r=i("",r)):Vo(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=_C(),d=0;d<o.length;++d){var p=o[d];n.skipNulls&&r[p]===null||kC(a,kJ(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:""},Ss=SC,rv=Object.prototype.hasOwnProperty,OJ=Array.isArray,Pr={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Ss.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},CJ=function(e){return e.replace(/&#(\d+);/g,function(t,r){return String.fromCharCode(parseInt(r,10))})},$C=function(e,t){return e&&typeof e=="string"&&t.comma&&e.indexOf(",")>-1?e.split(","):e},AJ="utf8=%26%2310003%3B",IJ="utf8=%E2%9C%93",RJ=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]===IJ?l="utf-8":a[c]===AJ&&(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,Pr.decoder,l,"key"),h=r.strictNullHandling?null:""):(f=r.decoder(u.slice(0,p),Pr.decoder,l,"key"),h=Ss.maybeMap($C(u.slice(p+1),r),function(y){return r.decoder(y,Pr.decoder,l,"value")})),h&&r.interpretNumericEntities&&l==="iso-8859-1"&&(h=CJ(h)),u.indexOf("[]=")>-1&&(h=OJ(h)?[h]:h),rv.call(n,f)?n[f]=Ss.combine(n[f],h):n[f]=h}return n},PJ=function(e,t,r,n){for(var o=n?t:$C(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},NJ=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&&rv.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&&rv.call(Object.prototype,c[1].slice(1,-1))&&!n.allowPrototypes)return;u.push(c[1])}return c&&u.push("["+i.slice(c.index)+"]"),PJ(u,r,n,o)}},MJ=function(t){if(!t)return Pr;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"?Pr.charset:t.charset;return{allowDots:typeof t.allowDots>"u"?Pr.allowDots:!!t.allowDots,allowPrototypes:typeof t.allowPrototypes=="boolean"?t.allowPrototypes:Pr.allowPrototypes,allowSparse:typeof t.allowSparse=="boolean"?t.allowSparse:Pr.allowSparse,arrayLimit:typeof t.arrayLimit=="number"?t.arrayLimit:Pr.arrayLimit,charset:r,charsetSentinel:typeof t.charsetSentinel=="boolean"?t.charsetSentinel:Pr.charsetSentinel,comma:typeof t.comma=="boolean"?t.comma:Pr.comma,decoder:typeof t.decoder=="function"?t.decoder:Pr.decoder,delimiter:typeof t.delimiter=="string"||Ss.isRegExp(t.delimiter)?t.delimiter:Pr.delimiter,depth:typeof t.depth=="number"||t.depth===!1?+t.depth:Pr.depth,ignoreQueryPrefix:t.ignoreQueryPrefix===!0,interpretNumericEntities:typeof t.interpretNumericEntities=="boolean"?t.interpretNumericEntities:Pr.interpretNumericEntities,parameterLimit:typeof t.parameterLimit=="number"?t.parameterLimit:Pr.parameterLimit,parseArrays:t.parseArrays!==!1,plainObjects:typeof t.plainObjects=="boolean"?t.plainObjects:Pr.plainObjects,strictNullHandling:typeof t.strictNullHandling=="boolean"?t.strictNullHandling:Pr.strictNullHandling}},jJ=function(e,t){var r=MJ(t);if(e===""||e===null||typeof e>"u")return r.plainObjects?Object.create(null):{};for(var n=typeof e=="string"?RJ(e,r):e,o=r.plainObjects?Object.create(null):{},i=Object.keys(n),a=0;a<i.length;++a){var s=i[a],c=NJ(s,n[s],r,typeof e=="string");o=Ss.merge(o,c,r)}return r.allowSparse===!0?o:Ss.compact(o)},DJ=$J,FJ=jJ,LJ=Qg,qJ={formats:LJ,parse:FJ,stringify:DJ};const BJ=St(qJ),UJ=e=>e[1]!==void 0,mr=e=>{const{method:t,path:r,query:n,headers:o,body:i}=e,a=Object.entries(o).filter(UJ),s=Object.fromEntries(a),c=BJ.stringify(n,{encode:!0,arrayFormat:"repeat",allowDots:!0}),l=c?[r,c].join("?"):r;return{method:t,url:l,headers:s,data:i}},zJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{userId:e.userId}}),ZJ=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{_:e._}}),VJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),HJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),WJ=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:{}}),KJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}/messages`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),GJ=e=>({path:"/conversations",headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{},body:{}}),JJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}/participants`,headers:{"x-user-key":e["x-user-key"]},query:{nextToken:e.nextToken},params:{id:e.id},body:{}}),YJ=e=>({path:`/conversations/${encodeURIComponent(e.id)}/listen`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),XJ=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:{}}),QJ=e=>({path:"/messages",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),eY=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),tY=e=>({path:`/messages/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),rY=e=>({path:"/users",headers:{},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),nY=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),oY=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{}}),iY=e=>({path:"/users/me",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{name:e.name,pictureUrl:e.pictureUrl,userData:e.userData}}),aY=e=>({path:"/events",headers:{"x-user-key":e["x-user-key"]},query:{},params:{},body:{payload:e.payload,conversationId:e.conversationId}}),sY=e=>({path:`/events/${encodeURIComponent(e.id)}`,headers:{"x-user-key":e["x-user-key"]},query:{},params:{id:e.id},body:{}}),cY=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 lY=class{constructor(t,r={}){k(this,"addParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=zJ(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"createConversation",async t=>{const{path:r,headers:n,query:o,body:i}=ZJ(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"deleteConversation",async t=>{const{path:r,headers:n,query:o,body:i}=VJ(t),s=(this.props.toAxiosRequest??mr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"getConversation",async t=>{const{path:r,headers:n,query:o,body:i}=HJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"getParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=WJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"listConversationMessages",async t=>{const{path:r,headers:n,query:o,body:i}=KJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"listConversations",async t=>{const{path:r,headers:n,query:o,body:i}=GJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"listParticipants",async t=>{const{path:r,headers:n,query:o,body:i}=JJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"listenConversation",async t=>{const{path:r,headers:n,query:o,body:i}=YJ(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"removeParticipant",async t=>{const{path:r,headers:n,query:o,body:i}=XJ(t),s=(this.props.toAxiosRequest??mr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"createMessage",async t=>{const{path:r,headers:n,query:o,body:i}=QJ(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"deleteMessage",async t=>{const{path:r,headers:n,query:o,body:i}=eY(t),s=(this.props.toAxiosRequest??mr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"getMessage",async t=>{const{path:r,headers:n,query:o,body:i}=tY(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"createUser",async t=>{const{path:r,headers:n,query:o,body:i}=rY(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"deleteUser",async t=>{const{path:r,headers:n,query:o,body:i}=nY(t),s=(this.props.toAxiosRequest??mr)({method:"delete",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"getUser",async t=>{const{path:r,headers:n,query:o,body:i}=oY(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"updateUser",async t=>{const{path:r,headers:n,query:o,body:i}=iY(t),s=(this.props.toAxiosRequest??mr)({method:"put",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"createEvent",async t=>{const{path:r,headers:n,query:o,body:i}=aY(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"getEvent",async t=>{const{path:r,headers:n,query:o,body:i}=sY(t),s=(this.props.toAxiosRequest??mr)({method:"get",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});k(this,"createFile",async t=>{const{path:r,headers:n,query:o,body:i}=cY(t),s=(this.props.toAxiosRequest??mr)({method:"post",path:r,headers:{...n},query:{...o},body:i});return this.axiosInstance.request(s).then(c=>c.data).catch(c=>{throw yr(c)})});this.axiosInstance=t,this.props=r}};function yr(e){var t;return BO.isAxiosError(e)&&((t=e.response)!=null&&t.data)?UO(e.response.data):UO(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 nv={exports:{}};/** @license
|
|
@@ -137,11 +137,11 @@ Check the top-level render call using <`+Ae+">.")}return ge}}function er(j,ge){{
|
|
|
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(F){l.readyState="complete"},!1)),i==null&&s!=null&&(i=function(){return new s("Microsoft.XMLHTTP")}),Object.create==null&&(Object.create=function(F){function ue(){}return ue.prototype=F,new ue}),Date.now||(Date.now=function(){return new Date().getTime()}),y==null){var m=d;d=function(F,ue){var we=ue.signal;return m(F,{headers:ue.headers,credentials:ue.credentials,cache:ue.cache}).then(function(fe){var De=fe.body.getReader();return we._reader=De,we._aborted&&we._reader.cancel(),{status:fe.status,statusText:fe.statusText,headers:fe.headers,body:{getReader:function(){return De}}}})},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(F){function ue(K,ae,X){if(X===1)return K>=128>>ae&&K<<ae<=2047;if(X===2)return K>=2048>>ae&&K<<ae<=55295||K>=57344>>ae&&K<<ae<=65535;if(X===3)return K>=65536>>ae&&K<<ae<=1114111;throw new Error}function we(K,ae){if(K===6*1)return ae>>6>15?3:ae>31?2:1;if(K===6*2)return ae>15?3:2;if(K===6*3)return 3;throw new Error}for(var fe=65533,De="",Ie=this.bitsNeeded,je=this.codePoint,ut=0;ut<F.length;ut+=1){var We=F[ut];Ie!==0&&(We<128||We>191||!ue(je<<6|We&63,Ie-6,we(Ie,je)))&&(Ie=0,je=fe,De+=String.fromCharCode(je)),Ie===0?(We>=0&&We<=127?(Ie=0,je=We):We>=192&&We<=223?(Ie=6*1,je=We&31):We>=224&&We<=239?(Ie=6*2,je=We&15):We>=240&&We<=247?(Ie=6*3,je=We&7):(Ie=0,je=fe),Ie!==0&&!ue(je,Ie,we(Ie,je))&&(Ie=0,je=fe)):(Ie-=6,je=je<<6|We&63),Ie===0&&(je<=65535?De+=String.fromCharCode(je):(De+=String.fromCharCode(55296+(je-65535-1>>10)),De+=String.fromCharCode(56320+(je-65535-1&1023))))}return this.bitsNeeded=Ie,this.codePoint=je,De};var v=function(){try{return new f().decode(new h().encode("test"),{stream:!0})==="test"}catch(F){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+F)}return!1};(f==null||h==null||!v())&&(f=g);var b=function(){};function x(F){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=F,this._sendTimeout=0,this._abort=b}x.prototype.open=function(F,ue){this._abort(!0);var we=this,fe=this._xhr,De=1,Ie=0;this._abort=function(X){we._sendTimeout!==0&&(o(we._sendTimeout),we._sendTimeout=0),(De===1||De===2||De===3)&&(De=4,fe.onload=b,fe.onerror=b,fe.onabort=b,fe.onprogress=b,fe.onreadystatechange=b,fe.abort(),Ie!==0&&(o(Ie),Ie=0),X||(we.readyState=4,we.onabort(null),we.onreadystatechange())),De=0};var je=function(){if(De===1){var X=0,me="",Oe=void 0;if("contentType"in fe)X=200,me="OK",Oe=fe.contentType;else try{X=fe.status,me=fe.statusText,Oe=fe.getResponseHeader("Content-Type")}catch{X=0,me="",Oe=void 0}X!==0&&(De=2,we.readyState=2,we.status=X,we.statusText=me,we._contentType=Oe,we.onreadystatechange())}},ut=function(){if(je(),De===2||De===3){De=3;var X="";try{X=fe.responseText}catch{}we.readyState=3,we.responseText=X,we.onprogress()}},We=function(X,me){if((me==null||me.preventDefault==null)&&(me={preventDefault:b}),ut(),De===1||De===2||De===3){if(De=4,Ie!==0&&(o(Ie),Ie=0),we.readyState=4,X==="load")we.onload(me);else if(X==="error")we.onerror(me);else if(X==="abort")we.onabort(me);else throw new TypeError;we.onreadystatechange()}},K=function(X){fe!=null&&(fe.readyState===4?(!("onload"in fe)||!("onerror"in fe)||!("onabort"in fe))&&We(fe.responseText===""?"error":"load",X):fe.readyState===3?"onprogress"in fe||ut():fe.readyState===2&&je())},ae=function(){Ie=n(function(){ae()},500),fe.readyState===3&&ut()};"onload"in fe&&(fe.onload=function(X){We("load",X)}),"onerror"in fe&&(fe.onerror=function(X){We("error",X)}),"onabort"in fe&&(fe.onabort=function(X){We("abort",X)}),"onprogress"in fe&&(fe.onprogress=ut),"onreadystatechange"in fe&&(fe.onreadystatechange=function(X){K(X)}),("contentType"in fe||!("ontimeout"in i.prototype))&&(ue+=(ue.indexOf("?")===-1?"?":"&")+"padding=true"),fe.open(F,ue,!0),"readyState"in fe&&(Ie=n(function(){ae()},0))},x.prototype.abort=function(){this._abort(!1)},x.prototype.getResponseHeader=function(F){return this._contentType},x.prototype.setRequestHeader=function(F,ue){var we=this._xhr;"setRequestHeader"in we&&we.setRequestHeader(F,ue)},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 F=this;F._sendTimeout=n(function(){F._sendTimeout=0,F.send()},4);return}var ue=this._xhr;"withCredentials"in ue&&(ue.withCredentials=this.withCredentials);try{ue.send(void 0)}catch(we){throw we}};function w(F){return F.replace(/[A-Z]/g,function(ue){return String.fromCharCode(ue.charCodeAt(0)+32)})}function S(F){for(var ue=Object.create(null),we=F.split(`\r
|
|
140
|
-
`),fe=0;fe<we.length;fe+=1){var De=we[fe],Ie=De.split(": "),je=Ie.shift(),ut=Ie.join(": ");ue[w(je)]=ut}this._map=ue}S.prototype.get=function(F){return this._map[w(F)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function $(){}$.prototype.open=function(F,ue,we,fe,De,Ie,je){F.open("GET",De);var ut=0;F.onprogress=function(){var K=F.responseText,ae=K.slice(ut);ut+=ae.length,we(ae)},F.onerror=function(K){K.preventDefault(),fe(new Error("NetworkError"))},F.onload=function(){fe(null)},F.onabort=function(){fe(null)},F.onreadystatechange=function(){if(F.readyState===i.HEADERS_RECEIVED){var K=F.status,ae=F.statusText,X=F.getResponseHeader("Content-Type"),me=F.getAllResponseHeaders();ue(K,ae,X,new S(me))}},F.withCredentials=Ie;for(var We in je)Object.prototype.hasOwnProperty.call(je,We)&&F.setRequestHeader(We,je[We]);return F.send(),F};function R(F){this._headers=F}R.prototype.get=function(F){return this._headers.get(F)};function N(){}N.prototype.open=function(F,ue,we,fe,De,Ie,je){var ut=null,We=new y,K=We.signal,ae=new f;return d(De,{headers:je,credentials:Ie?"include":"same-origin",signal:K,cache:"no-store"}).then(function(X){return ut=X.body.getReader(),ue(X.status,X.statusText,X.headers.get("Content-Type"),new R(X.headers)),new u(function(me,Oe){var tt=function(){ut.read().then(function(Ze){if(Ze.done)me(void 0);else{var ht=ae.decode(Ze.value,{stream:!0});we(ht),tt()}}).catch(function(Ze){Oe(Ze)})};tt()})}).catch(function(X){if(X.name!=="AbortError")return X}).then(function(X){fe(X)}),{abort:function(){ut!=null&&ut.cancel(),We.abort()}}};function A(){this._listeners=Object.create(null)}function D(F){n(function(){throw F},0)}A.prototype.dispatchEvent=function(F){F.target=this;var ue=this._listeners[F.type];if(ue!=null)for(var we=ue.length,fe=0;fe<we;fe+=1){var De=ue[fe];try{typeof De.handleEvent=="function"?De.handleEvent(F):De.call(this,F)}catch(Ie){D(Ie)}}},A.prototype.addEventListener=function(F,ue){F=String(F);var we=this._listeners,fe=we[F];fe==null&&(fe=[],we[F]=fe);for(var De=!1,Ie=0;Ie<fe.length;Ie+=1)fe[Ie]===ue&&(De=!0);De||fe.push(ue)},A.prototype.removeEventListener=function(F,ue){F=String(F);var we=this._listeners,fe=we[F];if(fe!=null){for(var De=[],Ie=0;Ie<fe.length;Ie+=1)fe[Ie]!==ue&&De.push(fe[Ie]);De.length===0?delete we[F]:we[F]=De}};function H(F){this.type=F,this.target=void 0}function U(F,ue){H.call(this,F),this.data=ue.data,this.lastEventId=ue.lastEventId}U.prototype=Object.create(H.prototype);function Z(F,ue){H.call(this,F),this.status=ue.status,this.statusText=ue.statusText,this.headers=ue.headers}Z.prototype=Object.create(H.prototype);function L(F,ue){H.call(this,F),this.error=ue.error}L.prototype=Object.create(H.prototype);var q=-1,W=0,J=1,M=2,E=-1,B=0,Q=1,T=2,ce=3,pe=/^text\/event\-stream(;.*)?$/i,he=1e3,be=18e6,Ee=function(F,ue){var we=F==null?ue:parseInt(F,10);return we!==we&&(we=ue),_e(we)},_e=function(F){return Math.min(Math.max(F,he),be)},ye=function(F,ue,we){try{typeof ue=="function"&&ue.call(F,we)}catch(fe){D(fe)}};function le(F,ue){A.call(this),ue=ue||{},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,Ce(this,F,ue)}function te(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var ve=d!=null&&p!=null&&"body"in p.prototype;function Ce(F,ue,we){ue=String(ue);var fe=!!we.withCredentials,De=we.lastEventIdQueryParameterName||"lastEventId",Ie=_e(1e3),je=Ee(we.heartbeatTimeout,45e3),ut="",We=Ie,K=!1,ae=0,X=we.headers||{},me=we.Transport,Oe=ve&&me==null?void 0:new x(me!=null?new me:te()),tt=me!=null&&typeof me!="string"?new me:Oe==null?new N:new $,Ze=void 0,ht=0,Tt=q,Vt="",z="",G="",ze="",Ke=B,gt=0,Ge=0,sr=function(vt,bt,er,tr){if(Tt===W)if(vt===200&&er!=null&&pe.test(er)){Tt=J,K=Date.now(),We=Ie,F.readyState=J;var lr=new Z("open",{status:vt,statusText:bt,headers:tr});F.dispatchEvent(lr),ye(F,F.onopen,lr)}else{var
|
|
141
|
-
`.charCodeAt(0)||tr==="\r".charCodeAt(0))&&(bt=er)}var lr=(bt!==-1?ze:"")+vt.slice(0,bt+1);ze=(bt===-1?ze:"")+vt.slice(bt+1),vt!==""&&(K=Date.now(),ae+=vt.length);for(var
|
|
140
|
+
`),fe=0;fe<we.length;fe+=1){var De=we[fe],Ie=De.split(": "),je=Ie.shift(),ut=Ie.join(": ");ue[w(je)]=ut}this._map=ue}S.prototype.get=function(F){return this._map[w(F)]},i!=null&&i.HEADERS_RECEIVED==null&&(i.HEADERS_RECEIVED=2);function $(){}$.prototype.open=function(F,ue,we,fe,De,Ie,je){F.open("GET",De);var ut=0;F.onprogress=function(){var K=F.responseText,ae=K.slice(ut);ut+=ae.length,we(ae)},F.onerror=function(K){K.preventDefault(),fe(new Error("NetworkError"))},F.onload=function(){fe(null)},F.onabort=function(){fe(null)},F.onreadystatechange=function(){if(F.readyState===i.HEADERS_RECEIVED){var K=F.status,ae=F.statusText,X=F.getResponseHeader("Content-Type"),me=F.getAllResponseHeaders();ue(K,ae,X,new S(me))}},F.withCredentials=Ie;for(var We in je)Object.prototype.hasOwnProperty.call(je,We)&&F.setRequestHeader(We,je[We]);return F.send(),F};function R(F){this._headers=F}R.prototype.get=function(F){return this._headers.get(F)};function N(){}N.prototype.open=function(F,ue,we,fe,De,Ie,je){var ut=null,We=new y,K=We.signal,ae=new f;return d(De,{headers:je,credentials:Ie?"include":"same-origin",signal:K,cache:"no-store"}).then(function(X){return ut=X.body.getReader(),ue(X.status,X.statusText,X.headers.get("Content-Type"),new R(X.headers)),new u(function(me,Oe){var tt=function(){ut.read().then(function(Ze){if(Ze.done)me(void 0);else{var ht=ae.decode(Ze.value,{stream:!0});we(ht),tt()}}).catch(function(Ze){Oe(Ze)})};tt()})}).catch(function(X){if(X.name!=="AbortError")return X}).then(function(X){fe(X)}),{abort:function(){ut!=null&&ut.cancel(),We.abort()}}};function A(){this._listeners=Object.create(null)}function D(F){n(function(){throw F},0)}A.prototype.dispatchEvent=function(F){F.target=this;var ue=this._listeners[F.type];if(ue!=null)for(var we=ue.length,fe=0;fe<we;fe+=1){var De=ue[fe];try{typeof De.handleEvent=="function"?De.handleEvent(F):De.call(this,F)}catch(Ie){D(Ie)}}},A.prototype.addEventListener=function(F,ue){F=String(F);var we=this._listeners,fe=we[F];fe==null&&(fe=[],we[F]=fe);for(var De=!1,Ie=0;Ie<fe.length;Ie+=1)fe[Ie]===ue&&(De=!0);De||fe.push(ue)},A.prototype.removeEventListener=function(F,ue){F=String(F);var we=this._listeners,fe=we[F];if(fe!=null){for(var De=[],Ie=0;Ie<fe.length;Ie+=1)fe[Ie]!==ue&&De.push(fe[Ie]);De.length===0?delete we[F]:we[F]=De}};function H(F){this.type=F,this.target=void 0}function U(F,ue){H.call(this,F),this.data=ue.data,this.lastEventId=ue.lastEventId}U.prototype=Object.create(H.prototype);function Z(F,ue){H.call(this,F),this.status=ue.status,this.statusText=ue.statusText,this.headers=ue.headers}Z.prototype=Object.create(H.prototype);function L(F,ue){H.call(this,F),this.error=ue.error}L.prototype=Object.create(H.prototype);var q=-1,W=0,J=1,M=2,E=-1,B=0,Q=1,T=2,ce=3,pe=/^text\/event\-stream(;.*)?$/i,he=1e3,be=18e6,Ee=function(F,ue){var we=F==null?ue:parseInt(F,10);return we!==we&&(we=ue),_e(we)},_e=function(F){return Math.min(Math.max(F,he),be)},ye=function(F,ue,we){try{typeof ue=="function"&&ue.call(F,we)}catch(fe){D(fe)}};function le(F,ue){A.call(this),ue=ue||{},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,Ce(this,F,ue)}function te(){return i!=null&&"withCredentials"in i.prototype||a==null?new i:new a}var ve=d!=null&&p!=null&&"body"in p.prototype;function Ce(F,ue,we){ue=String(ue);var fe=!!we.withCredentials,De=we.lastEventIdQueryParameterName||"lastEventId",Ie=_e(1e3),je=Ee(we.heartbeatTimeout,45e3),ut="",We=Ie,K=!1,ae=0,X=we.headers||{},me=we.Transport,Oe=ve&&me==null?void 0:new x(me!=null?new me:te()),tt=me!=null&&typeof me!="string"?new me:Oe==null?new N:new $,Ze=void 0,ht=0,Tt=q,Vt="",z="",G="",ze="",Ke=B,gt=0,Ge=0,sr=function(vt,bt,er,tr){if(Tt===W)if(vt===200&&er!=null&&pe.test(er)){Tt=J,K=Date.now(),We=Ie,F.readyState=J;var lr=new Z("open",{status:vt,statusText:bt,headers:tr});F.dispatchEvent(lr),ye(F,F.onopen,lr)}else{var Gt="";vt!==200?(bt&&(bt=bt.replace(/\s+/g," ")),Gt="EventSource's response has a status "+vt+" "+bt+" that is not 200. Aborting the connection."):Gt="EventSource's response has a Content-Type specifying an unsupported type: "+(er==null?"-":er.replace(/\s+/g," "))+". Aborting the connection.",cr();var lr=new Z("error",{status:vt,statusText:bt,headers:tr});F.dispatchEvent(lr),ye(F,F.onerror,lr),console.error(Gt)}},$r=function(vt){if(Tt===J){for(var bt=-1,er=0;er<vt.length;er+=1){var tr=vt.charCodeAt(er);(tr===`
|
|
141
|
+
`.charCodeAt(0)||tr==="\r".charCodeAt(0))&&(bt=er)}var lr=(bt!==-1?ze:"")+vt.slice(0,bt+1);ze=(bt===-1?ze:"")+vt.slice(bt+1),vt!==""&&(K=Date.now(),ae+=vt.length);for(var Gt=0;Gt<lr.length;Gt+=1){var tr=lr.charCodeAt(Gt);if(Ke===E&&tr===`
|
|
142
142
|
`.charCodeAt(0))Ke=B;else if(Ke===E&&(Ke=B),tr==="\r".charCodeAt(0)||tr===`
|
|
143
|
-
`.charCodeAt(0)){if(Ke!==B){Ke===Q&&(Ge=
|
|
144
|
-
`,Vt+=vr):Or==="id"?z=vr:Or==="event"?G=vr:Or==="retry"?(Ie=Ee(vr,Ie),We=Ie):Or==="heartbeatTimeout"&&(je=Ee(vr,je),ht!==0&&(o(ht),ht=n(function(){ln()},je)))}if(Ke===B){if(Vt!==""){ut=z,G===""&&(G="message");var vn=new U(G,{data:Vt.slice(1),lastEventId:z});if(F.dispatchEvent(vn),G==="open"?ye(F,F.onopen,vn):G==="message"?ye(F,F.onmessage,vn):G==="error"&&ye(F,F.onerror,vn),Tt===M)return}Vt="",G=""}Ke=tr==="\r".charCodeAt(0)?E:B}else Ke===B&&(gt=Kt,Ke=Q),Ke===Q?tr===":".charCodeAt(0)&&(Ge=Kt+1,Ke=T):Ke===T&&(Ke=ce)}}},Yt=function(vt){if(Tt===J||Tt===W){Tt=q,ht!==0&&(o(ht),ht=0),ht=n(function(){ln()},We),We=_e(Math.min(Ie*16,We*2)),F.readyState=W;var bt=new L("error",{error:vt});F.dispatchEvent(bt),ye(F,F.onerror,bt),vt!=null&&console.error(vt)}},cr=function(){Tt=M,Ze!=null&&(Ze.abort(),Ze=void 0),ht!==0&&(o(ht),ht=0),F.readyState=M},ln=function(){if(ht=0,Tt!==q){if(!K&&Ze!=null)Yt(new Error("No activity within "+je+" milliseconds. "+(Tt===W?"No response received.":ae+" chars received.")+" Reconnecting.")),Ze!=null&&(Ze.abort(),Ze=void 0);else{var vt=Math.max((K||Date.now())+je-Date.now(),1);K=!1,ht=n(function(){ln()},vt)}return}K=!1,ae=0,ht=n(function(){ln()},je),Tt=W,Vt="",G="",z=ut,ze="",gt=0,Ge=0,Ke=B;var bt=ue;if(ue.slice(0,5)!=="data:"&&ue.slice(0,5)!=="blob:"&&ut!==""){var er=ue.indexOf("?");bt=er===-1?ue:ue.slice(0,er+1)+ue.slice(er+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(vr,vn){return vn===De?"":vr}),bt+=(ue.indexOf("?")===-1?"?":"&")+De+"="+encodeURIComponent(ut)}var tr=F.withCredentials,lr={};lr.Accept="text/event-stream";var Kt=F.headers;if(Kt!=null)for(var Or in Kt)Object.prototype.hasOwnProperty.call(Kt,Or)&&(lr[Or]=Kt[Or]);try{Ze=tt.open(Oe,sr,$r,Yt,bt,tr,lr)}catch(vr){throw cr(),vr}};F.url=ue,F.readyState=W,F.withCredentials=fe,F.headers=X,F._close=cr,ln()}le.prototype=Object.create(A.prototype),le.prototype.CONNECTING=W,le.prototype.OPEN=J,le.prototype.CLOSED=M,le.prototype.close=function(){this._close()},le.CONNECTING=W,le.OPEN=J,le.CLOSED=M,le.prototype.withCredentials=void 0;var Ue=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(Ue=le),function(F){{var ue=F(t);ue!==void 0&&(e.exports=ue)}}(function(F){F.EventSourcePolyfill=le,F.NativeEventSource=c,F.EventSource=Ue})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:He:globalThis)})(nv,nv.exports);var uY=nv.exports;const dY=St(uY),fY=(e,t={})=>{const r=new dY.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}},pY=async(e,t={})=>{const{emitter:r,source:n}=fY(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()}}},hY=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).")}),mY=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),yY=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),gY=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),vY=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),bY=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),wY={messageCreated:hY,webchatVisibility:mY,webchatConfig:yY,custom:gY,typingStarted:vY,typingStopped:bY},CC="unknown error",Bh=class Bh 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 pY(`${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(wY)){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(CC);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(CC)}});this._props=r}get status(){return this._state.status}};k(Bh,"listen",async r=>{const n=new Bh(r);return await n.connect(),n});let ov=Bh;const AC=100*1024*1024,xY=AC,SY=AC,_Y=6e4;class EY{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 ov.listen({url:this.props.apiUrl,conversationId:t,userKey:r}));this.props=t;const{apiUrl:r}=t,n={...t.headers},o=t.timeout??_Y,i=BO.create({baseURL:r,headers:n,withCredentials:!0,timeout:o,maxBodyLength:xY,maxContentLength:SY});this._auto=new lY(i)}}const ep={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},pn=(e,t)=>e.status===t,xo=(e,t)=>ep[e.status]<ep[t],IC=(e,t)=>ep[e.status]>=ep[t];class So extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const RC=["audio","file","image","video"],PC=e=>RC.includes(e);class kY extends uy{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(IC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(pn(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(IC(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return pn(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}=FE(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 EY({apiUrl:n})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!xo(this._state,"user_created"))return this._state.userId}async getUser(){if(xo(this._state,"user_created"))throw new So(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(xo(this._state,"user_created"))throw new So(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(!xo(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(){pn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():pn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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=PC(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(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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(xo(this._state,"user_created"))throw new So(this._state);pn(this._state,"conversation_created")&&this._state.conversationId===r||pn(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(xo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(Rg(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(Rg(n)&&o(n))return!1;throw n}}async newConversation(){if(xo(this._state,"user_created"))throw new So(this._state);pn(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(!pn(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 NC=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>r==="messaging"?new LH({url:t,clientId:e}):new kY({apiUrl:t,clientId:e}),TY=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>{const[n]=O.useState(NC({clientId:e,apiUrl:t,mode:r}));return n},$Y=(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 OY={data:""},CY=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||OY,AY=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,IY=/\/\*[^]*?\*\/| +/g,MC=/\n+/g,_i=(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"?_i(a,i):i+"{"+_i(a,i[1]=="k"?"":t)+"}":typeof a=="object"?n+=_i(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+=_i.p?_i.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},Ho={},jC=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+jC(e[r]);return t}return e},RY=(e,t,r,n,o)=>{let i=jC(e),a=Ho[i]||(Ho[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Ho[a]){let c=i!==e?e:(l=>{let u,d,p=[{}];for(;u=AY.exec(l.replace(IY,""));)u[4]?p.shift():u[3]?(d=u[3].replace(MC," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(MC," ").trim();return p[0]})(e);Ho[a]=_i(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let s=r&&Ho.g?Ho.g:null;return r&&(Ho.g=Ho[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)})(Ho[a],t,n,s),a},PY=(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?"":_i(s,""):s===!1?"":s}return n+o+(a??"")},"");function tp(e){let t=this||{},r=e.call?e(t.p):e;return RY(r.unshift?r.raw?PY(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,CY(t.target),t.g,t.o,t.k)}let DC,iv,av;tp.bind({g:1});let Wo=tp.bind({k:1});function NY(e,t,r,n){_i.p=t,DC=e,iv=r,av=n}function Ei(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:iv&&iv()},s),r.o=/ *go\d+/.test(c),s.className=tp.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),av&&l[0]&&av(s),DC(l,s)}return t?t(o):o}}var MY=e=>typeof e=="function",rp=(e,t)=>MY(e)?e(t):e,jY=(()=>{let e=0;return()=>(++e).toString()})(),FC=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),DY=20,np=new Map,FY=1e3,LC=e=>{if(np.has(e))return;let t=setTimeout(()=>{np.delete(e),ma({type:4,toastId:e})},FY);np.set(e,t)},LY=e=>{let t=np.get(e);t&&clearTimeout(t)},sv=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,DY)};case 1:return t.toast.id&&LY(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)?sv(e,{type:1,toast:r}):sv(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?LC(n):e.toasts.forEach(i=>{LC(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}))}}},op=[],ip={toasts:[],pausedAt:void 0},ma=e=>{ip=sv(ip,e),op.forEach(t=>{t(ip)})},qY={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},BY=(e={})=>{let[t,r]=O.useState(ip);O.useEffect(()=>(op.push(r),()=>{let o=op.indexOf(r);o>-1&&op.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)||qY[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:n}},UY=(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)||jY()}),pl=e=>(t,r)=>{let n=UY(t,e,r);return ma({type:2,toast:n}),n.id},Fn=(e,t)=>pl("blank")(e,t);Fn.error=pl("error"),Fn.success=pl("success"),Fn.loading=pl("loading"),Fn.custom=pl("custom"),Fn.dismiss=e=>{ma({type:3,toastId:e})},Fn.remove=e=>ma({type:4,toastId:e}),Fn.promise=(e,t,r)=>{let n=Fn.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Fn.success(rp(t.success,o),{id:n,...r,...r==null?void 0:r.success}),o)).catch(o=>{Fn.error(rp(t.error,o),{id:n,...r,...r==null?void 0:r.error})}),e};var zY=(e,t)=>{ma({type:1,toast:{id:e,height:t}})},ZY=()=>{ma({type:5,time:Date.now()})},VY=e=>{let{toasts:t,pausedAt:r}=BY(e);O.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&&Fn.dismiss(s.id);return}return setTimeout(()=>Fn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=O.useCallback(()=>{r&&ma({type:6,time:Date.now()})},[r]),o=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:zY,startPause:ZY,endPause:n,calculateOffset:o}}},HY=Wo`
|
|
143
|
+
`.charCodeAt(0)){if(Ke!==B){Ke===Q&&(Ge=Gt+1);var Or=lr.slice(gt,Ge-1),vr=lr.slice(Ge+(Ge<Gt&&lr.charCodeAt(Ge)===" ".charCodeAt(0)?1:0),Gt);Or==="data"?(Vt+=`
|
|
144
|
+
`,Vt+=vr):Or==="id"?z=vr:Or==="event"?G=vr:Or==="retry"?(Ie=Ee(vr,Ie),We=Ie):Or==="heartbeatTimeout"&&(je=Ee(vr,je),ht!==0&&(o(ht),ht=n(function(){ln()},je)))}if(Ke===B){if(Vt!==""){ut=z,G===""&&(G="message");var vn=new U(G,{data:Vt.slice(1),lastEventId:z});if(F.dispatchEvent(vn),G==="open"?ye(F,F.onopen,vn):G==="message"?ye(F,F.onmessage,vn):G==="error"&&ye(F,F.onerror,vn),Tt===M)return}Vt="",G=""}Ke=tr==="\r".charCodeAt(0)?E:B}else Ke===B&&(gt=Gt,Ke=Q),Ke===Q?tr===":".charCodeAt(0)&&(Ge=Gt+1,Ke=T):Ke===T&&(Ke=ce)}}},Yt=function(vt){if(Tt===J||Tt===W){Tt=q,ht!==0&&(o(ht),ht=0),ht=n(function(){ln()},We),We=_e(Math.min(Ie*16,We*2)),F.readyState=W;var bt=new L("error",{error:vt});F.dispatchEvent(bt),ye(F,F.onerror,bt),vt!=null&&console.error(vt)}},cr=function(){Tt=M,Ze!=null&&(Ze.abort(),Ze=void 0),ht!==0&&(o(ht),ht=0),F.readyState=M},ln=function(){if(ht=0,Tt!==q){if(!K&&Ze!=null)Yt(new Error("No activity within "+je+" milliseconds. "+(Tt===W?"No response received.":ae+" chars received.")+" Reconnecting.")),Ze!=null&&(Ze.abort(),Ze=void 0);else{var vt=Math.max((K||Date.now())+je-Date.now(),1);K=!1,ht=n(function(){ln()},vt)}return}K=!1,ae=0,ht=n(function(){ln()},je),Tt=W,Vt="",G="",z=ut,ze="",gt=0,Ge=0,Ke=B;var bt=ue;if(ue.slice(0,5)!=="data:"&&ue.slice(0,5)!=="blob:"&&ut!==""){var er=ue.indexOf("?");bt=er===-1?ue:ue.slice(0,er+1)+ue.slice(er+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,function(vr,vn){return vn===De?"":vr}),bt+=(ue.indexOf("?")===-1?"?":"&")+De+"="+encodeURIComponent(ut)}var tr=F.withCredentials,lr={};lr.Accept="text/event-stream";var Gt=F.headers;if(Gt!=null)for(var Or in Gt)Object.prototype.hasOwnProperty.call(Gt,Or)&&(lr[Or]=Gt[Or]);try{Ze=tt.open(Oe,sr,$r,Yt,bt,tr,lr)}catch(vr){throw cr(),vr}};F.url=ue,F.readyState=W,F.withCredentials=fe,F.headers=X,F._close=cr,ln()}le.prototype=Object.create(A.prototype),le.prototype.CONNECTING=W,le.prototype.OPEN=J,le.prototype.CLOSED=M,le.prototype.close=function(){this._close()},le.CONNECTING=W,le.OPEN=J,le.CLOSED=M,le.prototype.withCredentials=void 0;var Ue=c;i!=null&&(c==null||!("withCredentials"in c.prototype))&&(Ue=le),function(F){{var ue=F(t);ue!==void 0&&(e.exports=ue)}}(function(F){F.EventSourcePolyfill=le,F.NativeEventSource=c,F.EventSource=Ue})})(typeof globalThis>"u"?typeof window<"u"?window:typeof self<"u"?self:He:globalThis)})(nv,nv.exports);var uY=nv.exports;const dY=St(uY),fY=(e,t={})=>{const r=new dY.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}},pY=async(e,t={})=>{const{emitter:r,source:n}=fY(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()}}},hY=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).")}),mY=V.object({type:V.literal("webchat_visibility"),data:V.object({visibility:V.union([V.literal("show"),V.literal("hide"),V.literal("toggle")])})}),yY=V.object({type:V.literal("webchat_config"),data:V.object({config:V.record(V.union([V.any(),V.null()]))})}),gY=V.object({type:V.literal("custom"),data:V.object({event:V.record(V.union([V.any(),V.null()]))})}),vY=V.object({type:V.literal("typing_started"),data:V.object({timeout:V.number().optional()})}),bY=V.object({type:V.literal("typing_stopped"),data:V.record(V.never())}),wY={messageCreated:hY,webchatVisibility:mY,webchatConfig:yY,custom:gY,typingStarted:vY,typingStopped:bY},CC="unknown error",Bh=class Bh 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 pY(`${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(wY)){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(CC);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(CC)}});this._props=r}get status(){return this._state.status}};k(Bh,"listen",async r=>{const n=new Bh(r);return await n.connect(),n});let ov=Bh;const AC=100*1024*1024,xY=AC,SY=AC,_Y=6e4;class EY{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 ov.listen({url:this.props.apiUrl,conversationId:t,userKey:r}));this.props=t;const{apiUrl:r}=t,n={...t.headers},o=t.timeout??_Y,i=BO.create({baseURL:r,headers:n,withCredentials:!0,timeout:o,maxBodyLength:xY,maxContentLength:SY});this._auto=new lY(i)}}const ep={disconnected:0,user_creating:1,user_created:2,conversation_creating:3,conversation_created:4},pn=(e,t)=>e.status===t,xo=(e,t)=>ep[e.status]<ep[t],IC=(e,t)=>ep[e.status]>=ep[t];class So extends Error{constructor(t){super(`Unexpected state: ${t.status}`),this.state=t}}const RC=["audio","file","image","video"],PC=e=>RC.includes(e);class kY extends uy{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(IC(this._state,"user_created"))throw new Error("Client is already connected. Please disconnect first.");if(pn(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(IC(this._state,"user_created")){if(this._state.userId!==r.userId)throw new Error("Client is already connected. Please disconnect first.");return r}return pn(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}=FE(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 EY({apiUrl:n})}get apiUrl(){return this._apiUrl}get clientId(){return this._webhookId}get userId(){if(!xo(this._state,"user_created"))return this._state.userId}async getUser(){if(xo(this._state,"user_created"))throw new So(this._state);const{user:r}=await this._client.getUser({"x-user-key":this._state.userKey});return{data:r.data}}async updateUser(r){if(xo(this._state,"user_created"))throw new So(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(!xo(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(){pn(this._state,"conversation_created")?this._state.signalEmitter.cleanup():pn(this._state,"conversation_creating")&&console.warn("zombie conversation..."),this._state={status:"disconnected"}}async sendFile(r){if(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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=PC(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(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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(xo(this._state,"user_created"))throw new So(this._state);if(pn(this._state,"conversation_creating"))throw new So(this._state);let n;pn(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(xo(this._state,"user_created"))throw new So(this._state);pn(this._state,"conversation_created")&&this._state.conversationId===r||pn(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(xo(this._state,"user_created"))return!1;try{return await this._client.getConversation({"x-user-key":this._state.userKey,id:r}),!0}catch(n){if(Rg(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(Rg(n)&&o(n))return!1;throw n}}async newConversation(){if(xo(this._state,"user_created"))throw new So(this._state);pn(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(!pn(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 NC=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>r==="messaging"?new LH({url:t,clientId:e}):new kY({apiUrl:t,clientId:e}),TY=({clientId:e,apiUrl:t="https://webchat.botpress.cloud",mode:r="pushpin"})=>{const[n]=O.useState(NC({clientId:e,apiUrl:t,mode:r}));return n},$Y=(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 OY={data:""},CY=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||OY,AY=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,IY=/\/\*[^]*?\*\/| +/g,MC=/\n+/g,_i=(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"?_i(a,i):i+"{"+_i(a,i[1]=="k"?"":t)+"}":typeof a=="object"?n+=_i(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+=_i.p?_i.p(i,a):i+":"+a+";")}return r+(t&&o?t+"{"+o+"}":o)+n},Ho={},jC=e=>{if(typeof e=="object"){let t="";for(let r in e)t+=r+jC(e[r]);return t}return e},RY=(e,t,r,n,o)=>{let i=jC(e),a=Ho[i]||(Ho[i]=(c=>{let l=0,u=11;for(;l<c.length;)u=101*u+c.charCodeAt(l++)>>>0;return"go"+u})(i));if(!Ho[a]){let c=i!==e?e:(l=>{let u,d,p=[{}];for(;u=AY.exec(l.replace(IY,""));)u[4]?p.shift():u[3]?(d=u[3].replace(MC," ").trim(),p.unshift(p[0][d]=p[0][d]||{})):p[0][u[1]]=u[2].replace(MC," ").trim();return p[0]})(e);Ho[a]=_i(o?{["@keyframes "+a]:c}:c,r?"":"."+a)}let s=r&&Ho.g?Ho.g:null;return r&&(Ho.g=Ho[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)})(Ho[a],t,n,s),a},PY=(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?"":_i(s,""):s===!1?"":s}return n+o+(a??"")},"");function tp(e){let t=this||{},r=e.call?e(t.p):e;return RY(r.unshift?r.raw?PY(r,[].slice.call(arguments,1),t.p):r.reduce((n,o)=>Object.assign(n,o&&o.call?o(t.p):o),{}):r,CY(t.target),t.g,t.o,t.k)}let DC,iv,av;tp.bind({g:1});let Wo=tp.bind({k:1});function NY(e,t,r,n){_i.p=t,DC=e,iv=r,av=n}function Ei(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:iv&&iv()},s),r.o=/ *go\d+/.test(c),s.className=tp.apply(r,n)+(c?" "+c:""),t&&(s.ref=a);let l=e;return e[0]&&(l=s.as||e,delete s.as),av&&l[0]&&av(s),DC(l,s)}return t?t(o):o}}var MY=e=>typeof e=="function",rp=(e,t)=>MY(e)?e(t):e,jY=(()=>{let e=0;return()=>(++e).toString()})(),FC=(()=>{let e;return()=>{if(e===void 0&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),DY=20,np=new Map,FY=1e3,LC=e=>{if(np.has(e))return;let t=setTimeout(()=>{np.delete(e),ma({type:4,toastId:e})},FY);np.set(e,t)},LY=e=>{let t=np.get(e);t&&clearTimeout(t)},sv=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,DY)};case 1:return t.toast.id&&LY(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)?sv(e,{type:1,toast:r}):sv(e,{type:0,toast:r});case 3:let{toastId:n}=t;return n?LC(n):e.toasts.forEach(i=>{LC(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}))}}},op=[],ip={toasts:[],pausedAt:void 0},ma=e=>{ip=sv(ip,e),op.forEach(t=>{t(ip)})},qY={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},BY=(e={})=>{let[t,r]=O.useState(ip);O.useEffect(()=>(op.push(r),()=>{let o=op.indexOf(r);o>-1&&op.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)||qY[o.type],style:{...e.style,...(a=e[o.type])==null?void 0:a.style,...o.style}}});return{...t,toasts:n}},UY=(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)||jY()}),pl=e=>(t,r)=>{let n=UY(t,e,r);return ma({type:2,toast:n}),n.id},Fn=(e,t)=>pl("blank")(e,t);Fn.error=pl("error"),Fn.success=pl("success"),Fn.loading=pl("loading"),Fn.custom=pl("custom"),Fn.dismiss=e=>{ma({type:3,toastId:e})},Fn.remove=e=>ma({type:4,toastId:e}),Fn.promise=(e,t,r)=>{let n=Fn.loading(t.loading,{...r,...r==null?void 0:r.loading});return e.then(o=>(Fn.success(rp(t.success,o),{id:n,...r,...r==null?void 0:r.success}),o)).catch(o=>{Fn.error(rp(t.error,o),{id:n,...r,...r==null?void 0:r.error})}),e};var zY=(e,t)=>{ma({type:1,toast:{id:e,height:t}})},ZY=()=>{ma({type:5,time:Date.now()})},VY=e=>{let{toasts:t,pausedAt:r}=BY(e);O.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&&Fn.dismiss(s.id);return}return setTimeout(()=>Fn.dismiss(s.id),c)});return()=>{a.forEach(s=>s&&clearTimeout(s))}},[t,r]);let n=O.useCallback(()=>{r&&ma({type:6,time:Date.now()})},[r]),o=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:zY,startPause:ZY,endPause:n,calculateOffset:o}}},HY=Wo`
|
|
145
145
|
from {
|
|
146
146
|
transform: scale(0) rotate(45deg);
|
|
147
147
|
opacity: 0;
|
|
@@ -353,11 +353,11 @@ to {
|
|
|
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(lp(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(lp(c.name));case"ROLLBACK":return hv(y.state,g=>{if(s===void 0){f(g),u==null||u.init(o.getState());return}f(g[s]),u==null||u.init(lp(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return hv(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},hv=(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 LX(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 hl=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return hl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return hl(n)(r)}}}},qX=(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=hl(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 hl(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},BX=(e,t)=>(r,n,o)=>{let i={storage:LX(()=>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 hl(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},UX=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?qX(e,t):BX(e,t),En=DX()(YC(UX((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"}))),XC=O.createContext(null),zX=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,o=En.getState().setClientMode,i=En.getState().setConversationId;return r&&o(r.mode),O.useEffect(()=>{n&&i(n)},[n]),UC()(YC((a,s)=>{const c=d=>{const p=En.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:Ld(),...d}]}}})},l=d=>{const p=En.getState().conversationId;if(p)return a(f=>({...f,messages:{...f.messages,[p]:d}}))},u=En.getState().addMessageToHistory;return{...t,...e,eventEmitter:d5,client:r,sendFile:d=>s().client.sendFile(d),sendTextMessage:async d=>{const p=s().client;c({id:Ld(),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[En.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 pt(e){const t=O.useContext(XC);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return GC(t,e)}const ZX=({text:e,buttonValue:t,type:r,variant:n,groupId:o,reusable:i,...a})=>{const s=pt(v=>v.eventEmitter),c=pt(v=>v.sendTextMessage),l=pt(v=>v.isReadOnly),[u,d]=O.useState(!1),[p,f]=O.useState(!1),[h,y]=O.useState(!1),{message:{blocks:{button:m}}}=Jt;O.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 Y.jsx(VX,{...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})},VX=e=>{if(e.variant==="link"){const{value:n,variant:o,...i}=e;return Y.jsx("a",{...i,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return Y.jsx("button",{type:"button",...r})},HX=O.forwardRef(({block:e,type:t,...r},n)=>{const{message:{blocks:{bubble:o}}}=Jt;return Y.jsx("div",{...r,...o,ref:n,children:Y.jsx(As,{block:e})})}),QC=O.createContext(null);function WX(){const e=O.useContext(QC);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const eA=O.createContext(null);function tA(){const e=O.useContext(eA);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const rA=O.createContext(null);function nA(){const e=O.useContext(rA);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const KX=O.forwardRef(({url:e,type:t,orientation:r="auto",...n},o)=>{const i=O.useId(),{setIsLoading:a}=WX(),[s,c]=O.useState(r),[l,u]=O.useState(!1),{message:{blocks:{image:d}}}=Jt;return O.useLayoutEffect(()=>{a(p=>[...p,i])},[]),O.useEffect(()=>{e&&s==="auto"&&$Y(e).then(({width:p,height:f})=>{c(GX(p,f)),a(h=>h.filter(y=>y!==i))})},[e]),Y.jsxs(Y.Fragment,{children:[l?null:Y.jsx("div",{"data-orientation":s,...d.placeholder}),Y.jsx("img",{"data-orientation":s,"data-loaded":l,...n,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function GX(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 JX=O.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:o}}}=Jt;return Y.jsx("div",{children:Y.jsx("video",{...r,controls:!0,src:e,...o,ref:n})})}),YX=O.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:o}}}=Jt;return Y.jsx("div",{children:Y.jsx("audio",{...r,controls:!0,src:e,...o,ref:n})})});function XX({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 QX=P.forwardRef(XX);function eQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 tQ=P.forwardRef(eQ);function rQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 nQ=P.forwardRef(rQ);function oQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 iQ=P.forwardRef(oQ);function aQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 sQ=P.forwardRef(aQ),cQ=O.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}}}=Jt;return Y.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[Y.jsx("p",{...s.title,children:n}),Y.jsx(sQ,{...s.icon})]})}),lQ=O.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{column:a}}}=Jt;return Y.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>Y.jsx(As,{block:s},c))})}),uQ=O.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{row:a}}}=Jt;return Y.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>Y.jsx(As,{block:s},c))})});function dQ(e){return Object.prototype.toString.call(e)==="[object Object]"}function oA(e){return dQ(e)||Array.isArray(e)}function fQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function mv(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}`:!oA(s)||!oA(c)?s===c:mv(s,c)})}function iA(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function pQ(e,t){if(e.length!==t.length)return!1;const r=iA(e),n=iA(t);return r.every((o,i)=>{const a=n[i];return mv(o,a)})}function yv(e){return typeof e=="number"}function aA(e){return typeof e=="string"}function gv(e){return typeof e=="boolean"}function sA(e){return Object.prototype.toString.call(e)==="[object Object]"}function ar(e){return Math.abs(e)}function vv(e){return Math.sign(e)}function up(e,t){return ar(e-t)}function hQ(e,t){if(e===0||t===0||ar(e)<=ar(t))return 0;const r=up(ar(e),ar(t));return ar(r/e)}function ml(e){return fp(e).map(Number)}function Ko(e){return e[dp(e)]}function dp(e){return Math.max(0,e.length-1)}function fp(e){return Object.keys(e)}function cA(e,t){return[e,t].reduce((r,n)=>(fp(n).forEach(o=>{const i=r[o],a=n[o],s=sA(i)&&sA(a);r[o]=s?cA(i,a):a}),r),{})}function lA(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function mQ(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 yv(e)?a():r[e](l)}return{measure:s}}function yQ(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 ki(e,t){const r=ar(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 uA(e,t,r){const{constrain:n}=ki(0,e),o=e+1;let i=a(t);function a(p){return r?ar((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 uA(e,s(),r)}const d={get:s,set:c,add:l,clone:u};return d}function gQ(e){const t=e==="rtl"?-1:1;function r(o){return o*t}return{apply:r}}function yl(){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 vQ(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=yl(),$=yl(),R=ki(50,225).constrain(h.measure(20)),N={mouse:300,touch:400},A={mouse:500,touch:600},D=y?43:25;let H=!1,U=0,Z=0,L=!1,q=!1,W=!1,J=!1;function M(le,te){if(!te)return;function ve(Ue){(gv(te)||te(le,Ue))&&pe(Ue)}const Ce=r;S.add(Ce,"dragstart",Ue=>Ue.preventDefault(),w).add(Ce,"touchmove",()=>{},w).add(Ce,"touchend",()=>{}).add(Ce,"touchstart",ve).add(Ce,"mousedown",ve).add(Ce,"touchcancel",be).add(Ce,"contextmenu",be).add(Ce,"click",Ee,!0)}function E(){S.clear(),$.clear()}function B(){const le=J?n:r;$.add(le,"touchmove",he,w).add(le,"touchend",be).add(le,"mousemove",he,w).add(le,"mouseup",be)}function Q(le){const te=le.nodeName||"";return x.includes(te)}function T(){return(y?A:N)[J?"mouse":"touch"]}function ce(le,te){const ve=p.add(vv(le)*-1),Ce=d.byDistance(le,!y).distance;return y||ar(le)<R?Ce:g&&te?Ce*.5:d.byIndex(ve.get(),0).distance}function pe(le){const te=lA(le,o);J=te,!(te&&le.button!==0)&&(Q(le.target)||(W=y&&te&&!le.buttons&&H,H=up(i.get(),s.get())>=2,L=!0,a.pointerDown(le),u.useFriction(0).useDuration(0),i.set(s),B(),U=a.readPoint(le),Z=a.readPoint(le,b),f.emit("pointerDown")))}function he(le){const te=a.readPoint(le),ve=a.readPoint(le,b),Ce=up(te,U),Ue=up(ve,Z);if(!q&&!J&&(!le.cancelable||(q=Ce>Ue,!q)))return be(le);const F=a.pointerMove(le);Ce>m&&(W=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(F)),le.preventDefault()}function be(le){const ve=d.byDistance(0,!1).index!==p.get(),Ce=a.pointerUp(le)*T(),Ue=ce(t.apply(Ce),ve),F=hQ(Ce,Ue),ue=D-10*F,we=v+F/50;q=!1,L=!1,$.clear(),u.useDuration(ue).useFriction(we),l.distance(Ue,!y),J=!1,f.emit("pointerUp")}function Ee(le){W&&(le.stopPropagation(),le.preventDefault())}function _e(){return L}return{init:M,pointerDown:_e,destroy:E}}function bQ(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(lA(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&&ar(y)>.1?y:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function wQ(e){function t(n){return e*(n/100)}return{measure:t}}function xQ(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||(gv(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 SQ(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 $=0;return S?(i=0,e.set(t),$=w):(i+=w/s,i*=c,l+=i,e.add(i),$=l-u),a=vv($),u=l,o=ar(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 _Q(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=ki(.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=ar(e[h]-t.get()),m=r.get()-t.get(),g=s.constrain(y/a);r.subtract(m*g),!f&&ar(m)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(f){c=!f}return{constrain:u,toggleActive:d}}function EQ(e,t,r,n){const o=ki(-t+e,r[0]),i=c(),a=l();function s(){const d=i[0],p=Ko(i),f=i.lastIndexOf(d),h=i.indexOf(p)+1;return ki(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 kQ(e,t,r){const n=t[0],o=r?n-e:Ko(t);return{limit:ki(o,n)}}function TQ(e,t,r,n){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=ki(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 $Q(e){const{max:t,length:r}=e;function n(i){return(i-t)/-r}return{get:n}}function OQ(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=>Ko(g)[c]-g[0][s]).map(ar)}function h(){return n.map(g=>r[s]-g[s]).map(g=>-ar(g))}function y(){const v=Ko(d)-Ko(o);return l(d).map(b=>b[0]).map((b,x,w)=>{const S=!x,$=x===dp(w);return a&&S?0:a&&$?v:b+u[x]})}return{snaps:d,snapsAligned:p}}function CQ(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function c(h){return h.concat().sort((y,m)=>ar(y)-ar(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)=>ar(v.diff)-ar(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=>vv(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 AQ(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 pp(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 yv(c)?c:c.get()}return{get:r,set:n,add:o,subtract:i}}function dA(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 IQ(e,t,r,n,o,i,a,s,c){const l=ml(o),u=ml(o).reverse(),d=y().concat(m());function p(w,S){return w.reduce(($,R)=>$-o[R],S)}function f(w,S){return w.reduce(($,R)=>p($,S)>0?$.concat([R]):$,[])}function h(w,S){const $=S==="start",R=$?-n:n,N=a.findSlideBounds([R]);return w.map(A=>{const D=$?0:-n,H=$?n:0,Z=N.filter(L=>L.index===A)[0][$?"end":"start"];return{index:A,slideLocation:pp(-1),translate:dA(e,t,c[A]),target:()=>s.get()>Z?D:H}})}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($=>$!==w);return p(S,r)<=.1})}function v(){d.forEach(w=>{const{target:S,translate:$,slideLocation:R}=w,N=S();N!==R.get()&&($.to(N),R.set(N))})}function b(){d.forEach(w=>w.translate.clear())}return{canLoop:g,clear:b,loop:v,loopPoints:d}}function RQ(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||(gv(c)||c(s,u))&&l(u)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:o,destroy:i}}function PQ(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=>ki(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(($,R)=>({start:$-r[R]+b[R]+w,end:$+e-b[R]+w,index:R}));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:$,end:R}=w,N=x.includes(S),A=$<v&&R>v;return!N&&A?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function NQ(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 ar(t[s]-v[s])}function y(){if(!l)return 0;const v=i.getComputedStyle(Ko(n));return parseFloat(v.getPropertyValue(`margin-${c}`))}function m(){return r.map((v,b,x)=>{const w=!b,S=b===dp(x);return w?p[b]+u:S?p[b]+d:x[b+1][s]-v[s]}).map(ar)}return{slideSizes:p,slideSizesWithGaps:f}}function MQ(e,t,r){const n=yv(r);function o(c,l){return ml(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ml(c).reduce((l,u)=>{const p=t.slice(Ko(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 jQ(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(we=>we.getBoundingClientRect()),S=gQ(u),$=yQ(l,u),R=$.measureSize(x),N=wQ(R),A=mQ(c,R),D=!f&&!!b,H=f||!!b,{slideSizes:U,slideSizesWithGaps:Z}=NQ($,x,w,r,H,o),L=MQ(R,Z,g),{snaps:q,snapsAligned:W}=OQ($,A,x,w,Z,L,D),J=-Ko(q)+Ko(Z),{snapsContained:M}=EQ(R,J,W,b),E=D?M:W,{limit:B}=kQ(J,E,f),Q=uA(dp(E),d,f),T=Q.clone(),ce=ml(r),pe=({dragHandler:we,scrollBody:fe,scrollBounds:De,eventHandler:Ie,animation:je,options:{loop:ut}})=>{const We=we.pointerDown();ut||De.constrain(We);const K=fe.seek().settled();K&&!We&&(je.stop(),Ie.emit("settle")),K||Ie.emit("scroll")},he=({scrollBody:we,translate:fe,location:De,offsetLocation:Ie,scrollLooper:je,slideLooper:ut,options:{loop:We}},K)=>{const ae=we.velocity();Ie.set(De.get()-ae+ae*K),We&&(je.loop(we.direction()),ut.loop()),fe.to(Ie.get())},be={start:()=>s.start(ue),stop:()=>s.stop(ue),update:()=>pe(ue),render:we=>he(ue,we)},Ee=.68,_e=E[Q.get()],ye=pp(_e),le=pp(_e),te=pp(_e),ve=SQ(ye,te,h,Ee),Ce=CQ(f,E,J,B,te),Ue=AQ(be,Q,T,Ce,ve,te,a),F=PQ(R,J,U,q,B,f,p),ue={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:x,slideRects:w,animation:be,axis:$,direction:S,dragHandler:vQ($,S,e,n,o,te,bQ($,o),ye,be,Ue,ve,Ce,Q,a,N,y,m,v,Ee),eventStore:yl(),percentOfView:N,index:Q,indexPrevious:T,limit:B,location:ye,offsetLocation:le,options:i,resizeHandler:xQ(t,a,o,r,$),scrollBody:ve,scrollBounds:_Q(B,ye,te,ve,N),scrollLooper:TQ(J,B,le,[ye,le,te]),scrollProgress:$Q(B),scrollSnaps:E,scrollTarget:Ce,scrollTo:Ue,slideLooper:IQ($,S,R,J,Z,E,F,le,r),slidesHandler:RQ(t,a),slidesInView:F,slideIndexes:ce,slidesToScroll:L,target:te,translate:dA($,S,t)};return ue}function DQ(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=ar(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 FQ(){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 LQ={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 qQ(e){function t(i,a){return cA(i,a||{})}function r(i){const a=i.breakpoints||{},s=fp(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=>fp(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function BQ(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 _s(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=qQ(o),a=BQ(i),s=yl(),c=yl(),l=FQ(),{animationRealms:u}=_s,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:h,off:y,emit:m}=l,g=U;let v=!1,b,x=d(LQ,_s.globalOptions),w=d(x),S=[],$,R,N;function A(){const{container:ve,slides:Ce}=w;R=(aA(ve)?e.querySelector(ve):ve)||e.children[0];const F=aA(Ce)?R.querySelectorAll(Ce):Ce;N=[].slice.call(F||R.children)}function D(ve,Ce){const Ue=jQ(e,R,N,n,o,ve,l,Ce);if(ve.loop&&!Ue.slideLooper.canLoop()){const F=Object.assign({},ve,{loop:!1});return D(F,Ce)}return Ue}function H(ve,Ce){if(v)return;const Ue=u.find(ue=>ue.window===o),F=Ue||DQ(o);Ue||u.push(F),x=d(x,ve),w=p(x),S=Ce||S,A(),b=D(w,F),f([x,...S.map(({options:ue})=>ue)]).forEach(ue=>s.add(ue,"change",U)),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&&F.reset()}),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&N.length&&b.dragHandler.init(te,w.watchDrag),$=a.init(S,te))}function U(ve,Ce){const Ue=pe();Z(),H(d({startIndex:Ue},ve),Ce),l.emit("reInit")}function Z(){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 L(){v||(v=!0,s.clear(),Z(),l.emit("destroy"))}function q(ve){const Ce=b[ve?"target":"location"].get(),Ue=w.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ue](Ce))}function W(ve){const Ce=q(ve);return b.slideIndexes.filter(Ue=>!Ce.includes(Ue))}function J(ve,Ce,Ue){!w.active||v||(b.scrollBody.useBaseFriction().useDuration(Ce?0:w.duration),b.scrollTo.index(ve,Ue||0))}function M(ve){const Ce=b.index.add(1).get();J(Ce,ve===!0,-1)}function E(ve){const Ce=b.index.add(-1).get();J(Ce,ve===!0,1)}function B(){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 he(){return b.indexPrevious.get()}function be(){return $}function Ee(){return b}function _e(){return e}function ye(){return R}function le(){return N}const te={canScrollNext:B,canScrollPrev:Q,containerNode:ye,internalEngine:Ee,destroy:L,off:y,on:h,emit:m,plugins:be,previousScrollSnap:he,reInit:g,rootNode:_e,scrollNext:M,scrollPrev:E,scrollProgress:ce,scrollSnapList:T,scrollTo:J,selectedScrollSnap:pe,slideNodes:le,slidesInView:q,slidesNotInView:W};return H(t,r),setTimeout(()=>l.emit("init"),0),te}_s.animationRealms=[],_s.globalOptions=void 0;function bv(e={},t=[]){const r=O.useRef(e),n=O.useRef(t),[o,i]=O.useState(),[a,s]=O.useState(),c=O.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return O.useEffect(()=>{if(fQ()&&a){_s.globalOptions=bv.globalOptions;const l=_s(a,r.current,n.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),O.useEffect(()=>{mv(r.current,e)||(r.current=e,c())},[e,c]),O.useEffect(()=>{pQ(n.current,t)||(n.current=t,c())},[t,c]),[s,o]}bv.globalOptions=void 0;function UQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 zQ=P.forwardRef(UQ);function ZQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 VQ=P.forwardRef(ZQ);function HQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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"}),P.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 WQ=P.forwardRef(HQ);function KQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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"}),P.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 GQ=P.forwardRef(KQ);function JQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 YQ=P.forwardRef(JQ);function XQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 QQ=P.forwardRef(XQ);function eee({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 tee=P.forwardRef(eee),ree=O.forwardRef(({blocks:e},t)=>{const[r,n]=bv({skipSnaps:!0}),[o,i]=O.useState(!0),[a,s]=O.useState(!0),c=O.useCallback(()=>n==null?void 0:n.scrollPrev(),[n]),l=O.useCallback(()=>n==null?void 0:n.scrollNext(),[n]),{message:{blocks:{carousel:u}}}=Jt,d=O.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return O.useEffect(()=>{n&&(d(n),n.on("reInit",d),n.on("select",d))},[n,d]),Y.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:r,children:[Y.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,f)=>Y.jsx(As,{block:p},f))}),Y.jsx(zQ,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),Y.jsx(VQ,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Es=Math.min,kn=Math.max,hp=Math.round,ks=Math.floor,Ti=e=>({x:e,y:e});function fA(e,t,r){return kn(e,Es(t,r))}function mp(e,t){return typeof e=="function"?e(t):e}function gl(e){return e.split("-")[0]}function wv(e){return e.split("-")[1]}function pA(e){return e==="x"?"y":"x"}function nee(e){return e==="y"?"height":"width"}function vl(e){return["top","bottom"].includes(gl(e))?"y":"x"}function oee(e){return pA(vl(e))}function iee(e){return{top:0,right:0,bottom:0,left:0,...e}}function aee(e){return typeof e!="number"?iee(e):{top:e,right:e,bottom:e,left:e}}function yp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function $i(e){return hA(e)?(e.nodeName||"").toLowerCase():"#document"}function Tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(hA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hA(e){return e instanceof Node||e instanceof Tn(e).Node}function dr(e){return e instanceof Element||e instanceof Tn(e).Element}function Qr(e){return e instanceof HTMLElement||e instanceof Tn(e).HTMLElement}function xv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tn(e).ShadowRoot}function bl(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 see(e){return["table","td","th"].includes($i(e))}function Sv(e){const t=_v(),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 cee(e){let t=ya(e);for(;Qr(t)&&!wl(t);){if(Sv(t))return t;t=ya(t)}return null}function _v(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wl(e){return["html","body","#document"].includes($i(e))}function $n(e){return Tn(e).getComputedStyle(e)}function gp(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ya(e){if($i(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xv(e)&&e.host||Go(e);return xv(t)?t.host:t}function mA(e){const t=ya(e);return wl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qr(t)&&bl(t)?t:mA(t)}function Oi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=mA(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Tn(o);return i?t.concat(a,a.visualViewport||[],bl(o)?o:[],a.frameElement&&r?Oi(a.frameElement):[]):t.concat(o,Oi(o,[],r))}function Ci(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 hn(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xv(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yA(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function lee(){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 gA(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(yA())||t.test(lee()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function vA(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 bA(){return/apple/i.test(navigator.vendor)}function uee(){return yA().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function wA(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function dee(e){return"nativeEvent"in e}function fee(e){return e.matches("html,body")}function Qn(e){return(e==null?void 0:e.ownerDocument)||document}function Ev(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 xA(e){return"composedPath"in e?e.composedPath()[0]:e.target}const pee="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function SA(e){return Qr(e)&&e.matches(pee)}function Br(e){e.preventDefault(),e.stopPropagation()}function _A(e,t,r){let{reference:n,floating:o}=e;const i=vl(t),a=oee(t),s=nee(a),c=gl(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(wv(t)){case"start":f[a]-=p*(r&&l?-1:1);break;case"end":f[a]+=p*(r&&l?-1:1);break}return f}const hee=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}=_A(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}=_A(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}=mp(t,e),h=aee(f),m=s[p?d==="floating"?"reference":"floating":d],g=yp(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=yp(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 mee(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=gl(r),s=wv(r),c=vl(r)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=mp(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 yee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await mee(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},gee=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}=mp(e,t),l={x:r,y:n},u=await EA(t,c),d=vl(gl(o)),p=pA(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=fA(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=fA(v,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-r,y:y.y-n}}}}},vee=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}=mp(e,t),c=await EA(t,s),l=gl(r),u=wv(r),d=vl(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?Es(g,S):S}else{const S=f-c.top-c.bottom;b=u||v?Es(m,S):S}if(v&&!u){const S=kn(c.left,0),$=kn(c.right,0),R=kn(c.top,0),N=kn(c.bottom,0);d?x=p-2*(S!==0||$!==0?S+$:kn(c.left,c.right)):b=f-2*(R!==0||N!==0?R+N:kn(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 kA(e){const t=$n(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Qr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=hp(r)!==i||hp(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function kv(e){return dr(e)?e:e.contextElement}function Ts(e){const t=kv(e);if(!Qr(t))return Ti(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=kA(t);let a=(i?hp(r.width):r.width)/n,s=(i?hp(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const bee=Ti(0);function TA(e){const t=Tn(e);return!_v()||!t.visualViewport?bee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wee(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Tn(e)?!1:t}function ga(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=kv(e);let a=Ti(1);t&&(n?dr(n)&&(a=Ts(n)):a=Ts(e));const s=wee(i,r,n)?TA(i):Ti(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=Tn(i),f=n&&dr(n)?Tn(n):n;let h=p.frameElement;for(;h&&n&&f!==p;){const y=Ts(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=Tn(h).frameElement}}return yp({width:u,height:d,x:c,y:l})}function xee(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Qr(r),i=Go(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=Ti(1);const c=Ti(0);if((o||!o&&n!=="fixed")&&(($i(r)!=="body"||bl(i))&&(a=gp(r)),Qr(r))){const l=ga(r);s=Ts(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 See(e){return Array.from(e.getClientRects())}function $A(e){return ga(Go(e)).left+gp(e).scrollLeft}function _ee(e){const t=Go(e),r=gp(e),n=e.ownerDocument.body,o=kn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=kn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+$A(e);const s=-r.scrollTop;return $n(n).direction==="rtl"&&(a+=kn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Eee(e,t){const r=Tn(e),n=Go(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=_v();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function kee(e,t){const r=ga(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Qr(e)?Ts(e):Ti(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=Eee(e,r);else if(t==="document")n=_ee(Go(e));else if(dr(t))n=kee(t,r);else{const o=TA(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return yp(n)}function CA(e,t){const r=ya(e);return r===t||!dr(r)||wl(r)?!1:$n(r).position==="fixed"||CA(r,t)}function Tee(e,t){const r=t.get(e);if(r)return r;let n=Oi(e,[],!1).filter(s=>dr(s)&&$i(s)!=="body"),o=null;const i=$n(e).position==="fixed";let a=i?ya(e):e;for(;dr(a)&&!wl(a);){const s=$n(a),c=Sv(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bl(a)&&!c&&CA(e,a))?n=n.filter(u=>u!==a):o=s,a=ya(a)}return t.set(e,n),n}function $ee(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Tee(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((l,u)=>{const d=OA(t,u,o);return l.top=kn(d.top,l.top),l.right=Es(d.right,l.right),l.bottom=Es(d.bottom,l.bottom),l.left=kn(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 Oee(e){return kA(e)}function Cee(e,t,r){const n=Qr(t),o=Go(t),i=r==="fixed",a=ga(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Ti(0);if(n||!n&&!i)if(($i(t)!=="body"||bl(o))&&(s=gp(t)),n){const l=ga(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=$A(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!Qr(e)||$n(e).position==="fixed"?null:t?t(e):e.offsetParent}function IA(e,t){const r=Tn(e);if(!Qr(e))return r;let n=AA(e,t);for(;n&&see(n)&&$n(n).position==="static";)n=AA(n,t);return n&&($i(n)==="html"||$i(n)==="body"&&$n(n).position==="static"&&!Sv(n))?r:n||cee(e)||r}const Aee=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||IA,i=this.getDimensions;return{reference:Cee(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function Iee(e){return $n(e).direction==="rtl"}const Ree={convertOffsetParentRelativeRectToViewportRelativeRect:xee,getDocumentElement:Go,getClippingRect:$ee,getOffsetParent:IA,getElementRects:Aee,getClientRects:See,getDimensions:Oee,getScale:Ts,isElement:dr,isRTL:Iee};function Pee(e,t){let r=null,n;const o=Go(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=ks(u),h=ks(o.clientWidth-(l+d)),y=ks(o.clientHeight-(u+p)),m=ks(l),v={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:kn(0,Es(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 Nee(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=kv(e),u=o||i?[...l?Oi(l):[],...Oi(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=l&&s?Pee(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?ga(e):null;c&&m();function m(){const g=ga(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 Mee=(e,t,r)=>{const n=new Map,o={platform:Ree,...r},i={...o.platform,_c:n};return hee(e,t,{...o,platform:i})};var vp=typeof document<"u"?O.useLayoutEffect:O.useEffect;function bp(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(!bp(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)&&!bp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function RA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PA(e,t){const r=RA(e);return Math.round(t*r)/r}function NA(e){const t=P.useRef(e);return vp(()=>{t.current=e}),t}function jee(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]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(n);bp(p,n)||f(n);const[h,y]=P.useState(null),[m,g]=P.useState(null),v=P.useCallback(q=>{q!=S.current&&(S.current=q,y(q))},[y]),b=P.useCallback(q=>{q!==$.current&&($.current=q,g(q))},[g]),x=i||h,w=a||m,S=P.useRef(null),$=P.useRef(null),R=P.useRef(u),N=NA(c),A=NA(o),D=P.useCallback(()=>{if(!S.current||!$.current)return;const q={placement:t,strategy:r,middleware:p};A.current&&(q.platform=A.current),Mee(S.current,$.current,q).then(W=>{const J={...W,isPositioned:!0};H.current&&!bp(R.current,J)&&(R.current=J,ID.flushSync(()=>{d(J)}))})},[p,t,r,A]);vp(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[l]);const H=P.useRef(!1);vp(()=>(H.current=!0,()=>{H.current=!1}),[]),vp(()=>{if(x&&(S.current=x),w&&($.current=w),x&&w){if(N.current)return N.current(x,w,D);D()}},[x,w,D,N]);const U=P.useMemo(()=>({reference:S,floating:$,setReference:v,setFloating:b}),[v,b]),Z=P.useMemo(()=>({reference:x,floating:w}),[x,w]),L=P.useMemo(()=>{const q={position:r,left:0,top:0};if(!Z.floating)return q;const W=PA(Z.floating,u.x),J=PA(Z.floating,u.y);return s?{...q,transform:"translate("+W+"px, "+J+"px)",...RA(Z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:W,top:J}},[r,s,Z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:D,refs:U,elements:Z,floatingStyles:L}),[u,D,U,Z,L])}/*!
|
|
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(lp(c.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(lp(c.name));case"ROLLBACK":return hv(y.state,g=>{if(s===void 0){f(g),u==null||u.init(o.getState());return}f(g[s]),u==null||u.init(lp(c.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return hv(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},hv=(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 LX(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 hl=e=>t=>{try{const r=e(t);return r instanceof Promise?r:{then(n){return hl(n)(r)},catch(n){return this}}}catch(r){return{then(n){return this},catch(n){return hl(n)(r)}}}},qX=(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=hl(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 hl(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},BX=(e,t)=>(r,n,o)=>{let i={storage:LX(()=>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 hl(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},UX=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?qX(e,t):BX(e,t),En=DX()(YC(UX((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"}))),XC=O.createContext(null),zX=e=>{const t={configuration:{},messages:{},connected:!0,disableComposer:!1,renderers:{},isReadOnly:!1,userData:{},userName:void 0,userPictureUrl:void 0,closeWindow:void 0,messageContainerRef:{current:null},isTyping:!1,lastTypingHeartbeat:null,allowFileUpload:!1,conversationId:void 0,disableRestartConversation:!1},r=e==null?void 0:e.client,n=e==null?void 0:e.conversationId,o=En.getState().setClientMode,i=En.getState().setConversationId;return r&&o(r.mode),O.useEffect(()=>{n&&i(n)},[n]),UC()(YC((a,s)=>{const c=d=>{const p=En.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:Ld(),...d}]}}})},l=d=>{const p=En.getState().conversationId;if(p)return a(f=>({...f,messages:{...f.messages,[p]:d}}))},u=En.getState().addMessageToHistory;return{...t,...e,eventEmitter:d5,client:r,sendFile:d=>s().client.sendFile(d),sendTextMessage:async d=>{const p=s().client;c({id:Ld(),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[En.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 pt(e){const t=O.useContext(XC);if(!t)throw new Error("Missing WebchatContext.Provider in the tree");return GC(t,e)}const ZX=({text:e,buttonValue:t,type:r,variant:n,groupId:o,reusable:i,...a})=>{const s=pt(v=>v.eventEmitter),c=pt(v=>v.sendTextMessage),l=pt(v=>v.isReadOnly),[u,d]=O.useState(!1),[p,f]=O.useState(!1),[h,y]=O.useState(!1),{message:{blocks:{button:m}}}=Wt;O.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 Y.jsx(VX,{...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})},VX=e=>{if(e.variant==="link"){const{value:n,variant:o,...i}=e;return Y.jsx("a",{...i,href:n,target:"_blank",rel:"noopener noreferrer"})}const{variant:t,...r}=e;return Y.jsx("button",{type:"button",...r})},HX=O.forwardRef(({block:e,type:t,...r},n)=>{const{message:{blocks:{bubble:o}}}=Wt;return Y.jsx("div",{...r,...o,ref:n,children:Y.jsx(As,{block:e})})}),QC=O.createContext(null);function WX(){const e=O.useContext(QC);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const eA=O.createContext(null);function tA(){const e=O.useContext(eA);if(!e)throw new Error("useModalContext must be used within a ModalProvider");return e}const rA=O.createContext(null);function nA(){const e=O.useContext(rA);if(!e)throw new Error("useWebchatConfig must be used within a WebchatConfigProvider");return e}const KX=O.forwardRef(({url:e,type:t,orientation:r="auto",...n},o)=>{const i=O.useId(),{setIsLoading:a}=WX(),[s,c]=O.useState(r),[l,u]=O.useState(!1),{message:{blocks:{image:d}}}=Wt;return O.useLayoutEffect(()=>{a(p=>[...p,i])},[]),O.useEffect(()=>{e&&s==="auto"&&$Y(e).then(({width:p,height:f})=>{c(GX(p,f)),a(h=>h.filter(y=>y!==i))})},[e]),Y.jsxs(Y.Fragment,{children:[l?null:Y.jsx("div",{"data-orientation":s,...d.placeholder}),Y.jsx("img",{"data-orientation":s,"data-loaded":l,...n,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)}})]})});function GX(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 JX=O.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{video:o}}}=Wt;return Y.jsx("div",{children:Y.jsx("video",{...r,controls:!0,src:e,...o,ref:n})})}),YX=O.forwardRef(({url:e,type:t,...r},n)=>{const{message:{blocks:{audio:o}}}=Wt;return Y.jsx("div",{children:Y.jsx("audio",{...r,controls:!0,src:e,...o,ref:n})})});function XX({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 QX=P.forwardRef(XX);function eQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 tQ=P.forwardRef(eQ);function rQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 nQ=P.forwardRef(rQ);function oQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 iQ=P.forwardRef(oQ);function aQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 sQ=P.forwardRef(aQ),cQ=O.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}}}=Wt;return Y.jsxs("a",{...o,...s.container,href:a,type:"_blank",rel:"noopener",ref:i,children:[Y.jsx("p",{...s.title,children:n}),Y.jsx(sQ,{...s.icon})]})}),lQ=O.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{column:a}}}=Wt;return Y.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>Y.jsx(As,{block:s},c))})}),uQ=O.forwardRef(({blocks:e,type:t,horizontalAlignment:r,verticalAlignment:n,...o},i)=>{const{message:{blocks:{row:a}}}=Wt;return Y.jsx("div",{"data-horizontal":r,"data-vertical":n,...o,...a,ref:i,children:e.map((s,c)=>Y.jsx(As,{block:s},c))})});function dQ(e){return Object.prototype.toString.call(e)==="[object Object]"}function oA(e){return dQ(e)||Array.isArray(e)}function fQ(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function mv(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}`:!oA(s)||!oA(c)?s===c:mv(s,c)})}function iA(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function pQ(e,t){if(e.length!==t.length)return!1;const r=iA(e),n=iA(t);return r.every((o,i)=>{const a=n[i];return mv(o,a)})}function yv(e){return typeof e=="number"}function aA(e){return typeof e=="string"}function gv(e){return typeof e=="boolean"}function sA(e){return Object.prototype.toString.call(e)==="[object Object]"}function ar(e){return Math.abs(e)}function vv(e){return Math.sign(e)}function up(e,t){return ar(e-t)}function hQ(e,t){if(e===0||t===0||ar(e)<=ar(t))return 0;const r=up(ar(e),ar(t));return ar(r/e)}function ml(e){return fp(e).map(Number)}function Ko(e){return e[dp(e)]}function dp(e){return Math.max(0,e.length-1)}function fp(e){return Object.keys(e)}function cA(e,t){return[e,t].reduce((r,n)=>(fp(n).forEach(o=>{const i=r[o],a=n[o],s=sA(i)&&sA(a);r[o]=s?cA(i,a):a}),r),{})}function lA(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function mQ(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 yv(e)?a():r[e](l)}return{measure:s}}function yQ(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 ki(e,t){const r=ar(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 uA(e,t,r){const{constrain:n}=ki(0,e),o=e+1;let i=a(t);function a(p){return r?ar((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 uA(e,s(),r)}const d={get:s,set:c,add:l,clone:u};return d}function gQ(e){const t=e==="rtl"?-1:1;function r(o){return o*t}return{apply:r}}function yl(){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 vQ(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=yl(),$=yl(),R=ki(50,225).constrain(h.measure(20)),N={mouse:300,touch:400},A={mouse:500,touch:600},D=y?43:25;let H=!1,U=0,Z=0,L=!1,q=!1,W=!1,J=!1;function M(le,te){if(!te)return;function ve(Ue){(gv(te)||te(le,Ue))&&pe(Ue)}const Ce=r;S.add(Ce,"dragstart",Ue=>Ue.preventDefault(),w).add(Ce,"touchmove",()=>{},w).add(Ce,"touchend",()=>{}).add(Ce,"touchstart",ve).add(Ce,"mousedown",ve).add(Ce,"touchcancel",be).add(Ce,"contextmenu",be).add(Ce,"click",Ee,!0)}function E(){S.clear(),$.clear()}function B(){const le=J?n:r;$.add(le,"touchmove",he,w).add(le,"touchend",be).add(le,"mousemove",he,w).add(le,"mouseup",be)}function Q(le){const te=le.nodeName||"";return x.includes(te)}function T(){return(y?A:N)[J?"mouse":"touch"]}function ce(le,te){const ve=p.add(vv(le)*-1),Ce=d.byDistance(le,!y).distance;return y||ar(le)<R?Ce:g&&te?Ce*.5:d.byIndex(ve.get(),0).distance}function pe(le){const te=lA(le,o);J=te,!(te&&le.button!==0)&&(Q(le.target)||(W=y&&te&&!le.buttons&&H,H=up(i.get(),s.get())>=2,L=!0,a.pointerDown(le),u.useFriction(0).useDuration(0),i.set(s),B(),U=a.readPoint(le),Z=a.readPoint(le,b),f.emit("pointerDown")))}function he(le){const te=a.readPoint(le),ve=a.readPoint(le,b),Ce=up(te,U),Ue=up(ve,Z);if(!q&&!J&&(!le.cancelable||(q=Ce>Ue,!q)))return be(le);const F=a.pointerMove(le);Ce>m&&(W=!0),u.useFriction(.3).useDuration(1),c.start(),i.add(t.apply(F)),le.preventDefault()}function be(le){const ve=d.byDistance(0,!1).index!==p.get(),Ce=a.pointerUp(le)*T(),Ue=ce(t.apply(Ce),ve),F=hQ(Ce,Ue),ue=D-10*F,we=v+F/50;q=!1,L=!1,$.clear(),u.useDuration(ue).useFriction(we),l.distance(Ue,!y),J=!1,f.emit("pointerUp")}function Ee(le){W&&(le.stopPropagation(),le.preventDefault())}function _e(){return L}return{init:M,pointerDown:_e,destroy:E}}function bQ(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(lA(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&&ar(y)>.1?y:0}return{pointerDown:s,pointerMove:c,pointerUp:l,readPoint:a}}function wQ(e){function t(n){return e*(n/100)}return{measure:t}}function xQ(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||(gv(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 SQ(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 $=0;return S?(i=0,e.set(t),$=w):(i+=w/s,i*=c,l+=i,e.add(i),$=l-u),a=vv($),u=l,o=ar(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 _Q(e,t,r,n,o){const i=o.measure(10),a=o.measure(50),s=ki(.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=ar(e[h]-t.get()),m=r.get()-t.get(),g=s.constrain(y/a);r.subtract(m*g),!f&&ar(m)<i&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function d(f){c=!f}return{constrain:u,toggleActive:d}}function EQ(e,t,r,n){const o=ki(-t+e,r[0]),i=c(),a=l();function s(){const d=i[0],p=Ko(i),f=i.lastIndexOf(d),h=i.indexOf(p)+1;return ki(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 kQ(e,t,r){const n=t[0],o=r?n-e:Ko(t);return{limit:ki(o,n)}}function TQ(e,t,r,n){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:c}=ki(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 $Q(e){const{max:t,length:r}=e;function n(i){return(i-t)/-r}return{get:n}}function OQ(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=>Ko(g)[c]-g[0][s]).map(ar)}function h(){return n.map(g=>r[s]-g[s]).map(g=>-ar(g))}function y(){const v=Ko(d)-Ko(o);return l(d).map(b=>b[0]).map((b,x,w)=>{const S=!x,$=x===dp(w);return a&&S?0:a&&$?v:b+u[x]})}return{snaps:d,snapsAligned:p}}function CQ(e,t,r,n,o){const{reachedAny:i,removeOffset:a,constrain:s}=n;function c(h){return h.concat().sort((y,m)=>ar(y)-ar(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)=>ar(v.diff)-ar(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=>vv(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 AQ(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 pp(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 yv(c)?c:c.get()}return{get:r,set:n,add:o,subtract:i}}function dA(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 IQ(e,t,r,n,o,i,a,s,c){const l=ml(o),u=ml(o).reverse(),d=y().concat(m());function p(w,S){return w.reduce(($,R)=>$-o[R],S)}function f(w,S){return w.reduce(($,R)=>p($,S)>0?$.concat([R]):$,[])}function h(w,S){const $=S==="start",R=$?-n:n,N=a.findSlideBounds([R]);return w.map(A=>{const D=$?0:-n,H=$?n:0,Z=N.filter(L=>L.index===A)[0][$?"end":"start"];return{index:A,slideLocation:pp(-1),translate:dA(e,t,c[A]),target:()=>s.get()>Z?D:H}})}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($=>$!==w);return p(S,r)<=.1})}function v(){d.forEach(w=>{const{target:S,translate:$,slideLocation:R}=w,N=S();N!==R.get()&&($.to(N),R.set(N))})}function b(){d.forEach(w=>w.translate.clear())}return{canLoop:g,clear:b,loop:v,loopPoints:d}}function RQ(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||(gv(c)||c(s,u))&&l(u)}),r.observe(e,{childList:!0})}function i(){r&&r.disconnect(),n=!0}return{init:o,destroy:i}}function PQ(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=>ki(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(($,R)=>({start:$-r[R]+b[R]+w,end:$+e-b[R]+w,index:R}));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:$,end:R}=w,N=x.includes(S),A=$<v&&R>v;return!N&&A?x.concat([S]):x},[])}return{check:h,findSlideBounds:f}}function NQ(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 ar(t[s]-v[s])}function y(){if(!l)return 0;const v=i.getComputedStyle(Ko(n));return parseFloat(v.getPropertyValue(`margin-${c}`))}function m(){return r.map((v,b,x)=>{const w=!b,S=b===dp(x);return w?p[b]+u:S?p[b]+d:x[b+1][s]-v[s]}).map(ar)}return{slideSizes:p,slideSizesWithGaps:f}}function MQ(e,t,r){const n=yv(r);function o(c,l){return ml(c).filter(u=>u%l===0).map(u=>c.slice(u,u+l))}function i(c){return ml(c).reduce((l,u)=>{const p=t.slice(Ko(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 jQ(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(we=>we.getBoundingClientRect()),S=gQ(u),$=yQ(l,u),R=$.measureSize(x),N=wQ(R),A=mQ(c,R),D=!f&&!!b,H=f||!!b,{slideSizes:U,slideSizesWithGaps:Z}=NQ($,x,w,r,H,o),L=MQ(R,Z,g),{snaps:q,snapsAligned:W}=OQ($,A,x,w,Z,L,D),J=-Ko(q)+Ko(Z),{snapsContained:M}=EQ(R,J,W,b),E=D?M:W,{limit:B}=kQ(J,E,f),Q=uA(dp(E),d,f),T=Q.clone(),ce=ml(r),pe=({dragHandler:we,scrollBody:fe,scrollBounds:De,eventHandler:Ie,animation:je,options:{loop:ut}})=>{const We=we.pointerDown();ut||De.constrain(We);const K=fe.seek().settled();K&&!We&&(je.stop(),Ie.emit("settle")),K||Ie.emit("scroll")},he=({scrollBody:we,translate:fe,location:De,offsetLocation:Ie,scrollLooper:je,slideLooper:ut,options:{loop:We}},K)=>{const ae=we.velocity();Ie.set(De.get()-ae+ae*K),We&&(je.loop(we.direction()),ut.loop()),fe.to(Ie.get())},be={start:()=>s.start(ue),stop:()=>s.stop(ue),update:()=>pe(ue),render:we=>he(ue,we)},Ee=.68,_e=E[Q.get()],ye=pp(_e),le=pp(_e),te=pp(_e),ve=SQ(ye,te,h,Ee),Ce=CQ(f,E,J,B,te),Ue=AQ(be,Q,T,Ce,ve,te,a),F=PQ(R,J,U,q,B,f,p),ue={ownerDocument:n,ownerWindow:o,eventHandler:a,containerRect:x,slideRects:w,animation:be,axis:$,direction:S,dragHandler:vQ($,S,e,n,o,te,bQ($,o),ye,be,Ue,ve,Ce,Q,a,N,y,m,v,Ee),eventStore:yl(),percentOfView:N,index:Q,indexPrevious:T,limit:B,location:ye,offsetLocation:le,options:i,resizeHandler:xQ(t,a,o,r,$),scrollBody:ve,scrollBounds:_Q(B,ye,te,ve,N),scrollLooper:TQ(J,B,le,[ye,le,te]),scrollProgress:$Q(B),scrollSnaps:E,scrollTarget:Ce,scrollTo:Ue,slideLooper:IQ($,S,R,J,Z,E,F,le,r),slidesHandler:RQ(t,a),slidesInView:F,slideIndexes:ce,slidesToScroll:L,target:te,translate:dA($,S,t)};return ue}function DQ(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=ar(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 FQ(){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 LQ={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 qQ(e){function t(i,a){return cA(i,a||{})}function r(i){const a=i.breakpoints||{},s=fp(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=>fp(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function BQ(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 _s(e,t,r){const n=e.ownerDocument,o=n.defaultView,i=qQ(o),a=BQ(i),s=yl(),c=yl(),l=FQ(),{animationRealms:u}=_s,{mergeOptions:d,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:h,off:y,emit:m}=l,g=U;let v=!1,b,x=d(LQ,_s.globalOptions),w=d(x),S=[],$,R,N;function A(){const{container:ve,slides:Ce}=w;R=(aA(ve)?e.querySelector(ve):ve)||e.children[0];const F=aA(Ce)?R.querySelectorAll(Ce):Ce;N=[].slice.call(F||R.children)}function D(ve,Ce){const Ue=jQ(e,R,N,n,o,ve,l,Ce);if(ve.loop&&!Ue.slideLooper.canLoop()){const F=Object.assign({},ve,{loop:!1});return D(F,Ce)}return Ue}function H(ve,Ce){if(v)return;const Ue=u.find(ue=>ue.window===o),F=Ue||DQ(o);Ue||u.push(F),x=d(x,ve),w=p(x),S=Ce||S,A(),b=D(w,F),f([x,...S.map(({options:ue})=>ue)]).forEach(ue=>s.add(ue,"change",U)),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&&F.reset()}),b.options.loop&&b.slideLooper.loop(),R.offsetParent&&N.length&&b.dragHandler.init(te,w.watchDrag),$=a.init(S,te))}function U(ve,Ce){const Ue=pe();Z(),H(d({startIndex:Ue},ve),Ce),l.emit("reInit")}function Z(){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 L(){v||(v=!0,s.clear(),Z(),l.emit("destroy"))}function q(ve){const Ce=b[ve?"target":"location"].get(),Ue=w.loop?"removeOffset":"constrain";return b.slidesInView.check(b.limit[Ue](Ce))}function W(ve){const Ce=q(ve);return b.slideIndexes.filter(Ue=>!Ce.includes(Ue))}function J(ve,Ce,Ue){!w.active||v||(b.scrollBody.useBaseFriction().useDuration(Ce?0:w.duration),b.scrollTo.index(ve,Ue||0))}function M(ve){const Ce=b.index.add(1).get();J(Ce,ve===!0,-1)}function E(ve){const Ce=b.index.add(-1).get();J(Ce,ve===!0,1)}function B(){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 he(){return b.indexPrevious.get()}function be(){return $}function Ee(){return b}function _e(){return e}function ye(){return R}function le(){return N}const te={canScrollNext:B,canScrollPrev:Q,containerNode:ye,internalEngine:Ee,destroy:L,off:y,on:h,emit:m,plugins:be,previousScrollSnap:he,reInit:g,rootNode:_e,scrollNext:M,scrollPrev:E,scrollProgress:ce,scrollSnapList:T,scrollTo:J,selectedScrollSnap:pe,slideNodes:le,slidesInView:q,slidesNotInView:W};return H(t,r),setTimeout(()=>l.emit("init"),0),te}_s.animationRealms=[],_s.globalOptions=void 0;function bv(e={},t=[]){const r=O.useRef(e),n=O.useRef(t),[o,i]=O.useState(),[a,s]=O.useState(),c=O.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return O.useEffect(()=>{if(fQ()&&a){_s.globalOptions=bv.globalOptions;const l=_s(a,r.current,n.current);return i(l),()=>l.destroy()}else i(void 0)},[a,i]),O.useEffect(()=>{mv(r.current,e)||(r.current=e,c())},[e,c]),O.useEffect(()=>{pQ(n.current,t)||(n.current=t,c())},[t,c]),[s,o]}bv.globalOptions=void 0;function UQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 zQ=P.forwardRef(UQ);function ZQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 VQ=P.forwardRef(ZQ);function HQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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"}),P.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 WQ=P.forwardRef(HQ);function KQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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"}),P.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 GQ=P.forwardRef(KQ);function JQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 YQ=P.forwardRef(JQ);function XQ({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 QQ=P.forwardRef(XQ);function eee({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 tee=P.forwardRef(eee),ree=O.forwardRef(({blocks:e},t)=>{const[r,n]=bv({skipSnaps:!0}),[o,i]=O.useState(!0),[a,s]=O.useState(!0),c=O.useCallback(()=>n==null?void 0:n.scrollPrev(),[n]),l=O.useCallback(()=>n==null?void 0:n.scrollNext(),[n]),{message:{blocks:{carousel:u}}}=Wt,d=O.useCallback(p=>{i(!p.canScrollPrev()),s(!p.canScrollNext())},[]);return O.useEffect(()=>{n&&(d(n),n.on("reInit",d),n.on("select",d))},[n,d]),Y.jsxs("div",{...u==null?void 0:u.container,"data-container":"carousel",ref:r,children:[Y.jsx("div",{ref:t,...u==null?void 0:u.slidesContainer,children:e.map((p,f)=>Y.jsx(As,{block:p},f))}),Y.jsx(zQ,{...u==null?void 0:u.backButton,"data-disabled":o?"":void 0,onClick:c}),Y.jsx(VQ,{...u==null?void 0:u.nextButton,"data-disabled":a?"":void 0,onClick:l})]})}),Es=Math.min,kn=Math.max,hp=Math.round,ks=Math.floor,Ti=e=>({x:e,y:e});function fA(e,t,r){return kn(e,Es(t,r))}function mp(e,t){return typeof e=="function"?e(t):e}function gl(e){return e.split("-")[0]}function wv(e){return e.split("-")[1]}function pA(e){return e==="x"?"y":"x"}function nee(e){return e==="y"?"height":"width"}function vl(e){return["top","bottom"].includes(gl(e))?"y":"x"}function oee(e){return pA(vl(e))}function iee(e){return{top:0,right:0,bottom:0,left:0,...e}}function aee(e){return typeof e!="number"?iee(e):{top:e,right:e,bottom:e,left:e}}function yp(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function $i(e){return hA(e)?(e.nodeName||"").toLowerCase():"#document"}function Tn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Go(e){var t;return(t=(hA(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function hA(e){return e instanceof Node||e instanceof Tn(e).Node}function dr(e){return e instanceof Element||e instanceof Tn(e).Element}function Qr(e){return e instanceof HTMLElement||e instanceof Tn(e).HTMLElement}function xv(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Tn(e).ShadowRoot}function bl(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 see(e){return["table","td","th"].includes($i(e))}function Sv(e){const t=_v(),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 cee(e){let t=ya(e);for(;Qr(t)&&!wl(t);){if(Sv(t))return t;t=ya(t)}return null}function _v(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function wl(e){return["html","body","#document"].includes($i(e))}function $n(e){return Tn(e).getComputedStyle(e)}function gp(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function ya(e){if($i(e)==="html")return e;const t=e.assignedSlot||e.parentNode||xv(e)&&e.host||Go(e);return xv(t)?t.host:t}function mA(e){const t=ya(e);return wl(t)?e.ownerDocument?e.ownerDocument.body:e.body:Qr(t)&&bl(t)?t:mA(t)}function Oi(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=mA(e),i=o===((n=e.ownerDocument)==null?void 0:n.body),a=Tn(o);return i?t.concat(a,a.visualViewport||[],bl(o)?o:[],a.frameElement&&r?Oi(a.frameElement):[]):t.concat(o,Oi(o,[],r))}function Ci(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 hn(e,t){if(!e||!t)return!1;const r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xv(r)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function yA(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function lee(){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 gA(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(yA())||t.test(lee()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function vA(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 bA(){return/apple/i.test(navigator.vendor)}function uee(){return yA().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function wA(e,t){const r=["mouse","pen"];return t||r.push("",void 0),r.includes(e)}function dee(e){return"nativeEvent"in e}function fee(e){return e.matches("html,body")}function Qn(e){return(e==null?void 0:e.ownerDocument)||document}function Ev(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 xA(e){return"composedPath"in e?e.composedPath()[0]:e.target}const pee="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function SA(e){return Qr(e)&&e.matches(pee)}function Br(e){e.preventDefault(),e.stopPropagation()}function _A(e,t,r){let{reference:n,floating:o}=e;const i=vl(t),a=oee(t),s=nee(a),c=gl(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(wv(t)){case"start":f[a]-=p*(r&&l?-1:1);break;case"end":f[a]+=p*(r&&l?-1:1);break}return f}const hee=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}=_A(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}=_A(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}=mp(t,e),h=aee(f),m=s[p?d==="floating"?"reference":"floating":d],g=yp(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=yp(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 mee(e,t){const{placement:r,platform:n,elements:o}=e,i=await(n.isRTL==null?void 0:n.isRTL(o.floating)),a=gl(r),s=wv(r),c=vl(r)==="y",l=["left","top"].includes(a)?-1:1,u=i&&c?-1:1,d=mp(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 yee=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:r,y:n}=t,o=await mee(t,e);return{x:r+o.x,y:n+o.y,data:o}}}},gee=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}=mp(e,t),l={x:r,y:n},u=await EA(t,c),d=vl(gl(o)),p=pA(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=fA(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=fA(v,h,b)}const y=s.fn({...t,[p]:f,[d]:h});return{...y,data:{x:y.x-r,y:y.y-n}}}}},vee=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}=mp(e,t),c=await EA(t,s),l=gl(r),u=wv(r),d=vl(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?Es(g,S):S}else{const S=f-c.top-c.bottom;b=u||v?Es(m,S):S}if(v&&!u){const S=kn(c.left,0),$=kn(c.right,0),R=kn(c.top,0),N=kn(c.bottom,0);d?x=p-2*(S!==0||$!==0?S+$:kn(c.left,c.right)):b=f-2*(R!==0||N!==0?R+N:kn(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 kA(e){const t=$n(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Qr(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=hp(r)!==i||hp(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function kv(e){return dr(e)?e:e.contextElement}function Ts(e){const t=kv(e);if(!Qr(t))return Ti(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=kA(t);let a=(i?hp(r.width):r.width)/n,s=(i?hp(r.height):r.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const bee=Ti(0);function TA(e){const t=Tn(e);return!_v()||!t.visualViewport?bee:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wee(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Tn(e)?!1:t}function ga(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),i=kv(e);let a=Ti(1);t&&(n?dr(n)&&(a=Ts(n)):a=Ts(e));const s=wee(i,r,n)?TA(i):Ti(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=Tn(i),f=n&&dr(n)?Tn(n):n;let h=p.frameElement;for(;h&&n&&f!==p;){const y=Ts(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=Tn(h).frameElement}}return yp({width:u,height:d,x:c,y:l})}function xee(e){let{rect:t,offsetParent:r,strategy:n}=e;const o=Qr(r),i=Go(r);if(r===i)return t;let a={scrollLeft:0,scrollTop:0},s=Ti(1);const c=Ti(0);if((o||!o&&n!=="fixed")&&(($i(r)!=="body"||bl(i))&&(a=gp(r)),Qr(r))){const l=ga(r);s=Ts(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 See(e){return Array.from(e.getClientRects())}function $A(e){return ga(Go(e)).left+gp(e).scrollLeft}function _ee(e){const t=Go(e),r=gp(e),n=e.ownerDocument.body,o=kn(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=kn(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+$A(e);const s=-r.scrollTop;return $n(n).direction==="rtl"&&(a+=kn(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:s}}function Eee(e,t){const r=Tn(e),n=Go(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=_v();(!l||l&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}function kee(e,t){const r=ga(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=Qr(e)?Ts(e):Ti(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=Eee(e,r);else if(t==="document")n=_ee(Go(e));else if(dr(t))n=kee(t,r);else{const o=TA(e);n={...t,x:t.x-o.x,y:t.y-o.y}}return yp(n)}function CA(e,t){const r=ya(e);return r===t||!dr(r)||wl(r)?!1:$n(r).position==="fixed"||CA(r,t)}function Tee(e,t){const r=t.get(e);if(r)return r;let n=Oi(e,[],!1).filter(s=>dr(s)&&$i(s)!=="body"),o=null;const i=$n(e).position==="fixed";let a=i?ya(e):e;for(;dr(a)&&!wl(a);){const s=$n(a),c=Sv(a);!c&&s.position==="fixed"&&(o=null),(i?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bl(a)&&!c&&CA(e,a))?n=n.filter(u=>u!==a):o=s,a=ya(a)}return t.set(e,n),n}function $ee(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const a=[...r==="clippingAncestors"?Tee(t,this._c):[].concat(r),n],s=a[0],c=a.reduce((l,u)=>{const d=OA(t,u,o);return l.top=kn(d.top,l.top),l.right=Es(d.right,l.right),l.bottom=Es(d.bottom,l.bottom),l.left=kn(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 Oee(e){return kA(e)}function Cee(e,t,r){const n=Qr(t),o=Go(t),i=r==="fixed",a=ga(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=Ti(0);if(n||!n&&!i)if(($i(t)!=="body"||bl(o))&&(s=gp(t)),n){const l=ga(t,!0,i,t);c.x=l.x+t.clientLeft,c.y=l.y+t.clientTop}else o&&(c.x=$A(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!Qr(e)||$n(e).position==="fixed"?null:t?t(e):e.offsetParent}function IA(e,t){const r=Tn(e);if(!Qr(e))return r;let n=AA(e,t);for(;n&&see(n)&&$n(n).position==="static";)n=AA(n,t);return n&&($i(n)==="html"||$i(n)==="body"&&$n(n).position==="static"&&!Sv(n))?r:n||cee(e)||r}const Aee=async function(e){let{reference:t,floating:r,strategy:n}=e;const o=this.getOffsetParent||IA,i=this.getDimensions;return{reference:Cee(t,await o(r),n),floating:{x:0,y:0,...await i(r)}}};function Iee(e){return $n(e).direction==="rtl"}const Ree={convertOffsetParentRelativeRectToViewportRelativeRect:xee,getDocumentElement:Go,getClippingRect:$ee,getOffsetParent:IA,getElementRects:Aee,getClientRects:See,getDimensions:Oee,getScale:Ts,isElement:dr,isRTL:Iee};function Pee(e,t){let r=null,n;const o=Go(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=ks(u),h=ks(o.clientWidth-(l+d)),y=ks(o.clientHeight-(u+p)),m=ks(l),v={rootMargin:-f+"px "+-h+"px "+-y+"px "+-m+"px",threshold:kn(0,Es(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 Nee(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=kv(e),u=o||i?[...l?Oi(l):[],...Oi(t)]:[];u.forEach(g=>{o&&g.addEventListener("scroll",r,{passive:!0}),i&&g.addEventListener("resize",r)});const d=l&&s?Pee(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?ga(e):null;c&&m();function m(){const g=ga(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 Mee=(e,t,r)=>{const n=new Map,o={platform:Ree,...r},i={...o.platform,_c:n};return hee(e,t,{...o,platform:i})};var vp=typeof document<"u"?O.useLayoutEffect:O.useEffect;function bp(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(!bp(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)&&!bp(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function RA(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function PA(e,t){const r=RA(e);return Math.round(t*r)/r}function NA(e){const t=P.useRef(e);return vp(()=>{t.current=e}),t}function jee(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]=P.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,f]=P.useState(n);bp(p,n)||f(n);const[h,y]=P.useState(null),[m,g]=P.useState(null),v=P.useCallback(q=>{q!=S.current&&(S.current=q,y(q))},[y]),b=P.useCallback(q=>{q!==$.current&&($.current=q,g(q))},[g]),x=i||h,w=a||m,S=P.useRef(null),$=P.useRef(null),R=P.useRef(u),N=NA(c),A=NA(o),D=P.useCallback(()=>{if(!S.current||!$.current)return;const q={placement:t,strategy:r,middleware:p};A.current&&(q.platform=A.current),Mee(S.current,$.current,q).then(W=>{const J={...W,isPositioned:!0};H.current&&!bp(R.current,J)&&(R.current=J,ID.flushSync(()=>{d(J)}))})},[p,t,r,A]);vp(()=>{l===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(q=>({...q,isPositioned:!1})))},[l]);const H=P.useRef(!1);vp(()=>(H.current=!0,()=>{H.current=!1}),[]),vp(()=>{if(x&&(S.current=x),w&&($.current=w),x&&w){if(N.current)return N.current(x,w,D);D()}},[x,w,D,N]);const U=P.useMemo(()=>({reference:S,floating:$,setReference:v,setFloating:b}),[v,b]),Z=P.useMemo(()=>({reference:x,floating:w}),[x,w]),L=P.useMemo(()=>{const q={position:r,left:0,top:0};if(!Z.floating)return q;const W=PA(Z.floating,u.x),J=PA(Z.floating,u.y);return s?{...q,transform:"translate("+W+"px, "+J+"px)",...RA(Z.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:W,top:J}},[r,s,Z.floating,u.x,u.y]);return P.useMemo(()=>({...u,update:D,refs:U,elements:Z,floatingStyles:L}),[u,D,U,Z,L])}/*!
|
|
357
357
|
* tabbable 6.2.0
|
|
358
358
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
359
|
-
*/var Dee=["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])"],Tv=Dee.join(","),MA=typeof Element>"u",xl=MA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wp=!MA&&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},xp=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},Fee=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Lee=function(t,r,n){if(xp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Tv));return r&&xl.call(t,Tv)&&o.unshift(t),o=o.filter(n),o},qee=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!xp(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=xl.call(a,Tv);u&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!xp(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},jA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},DA=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fee(t))&&!jA(t)?0:t.tabIndex},Bee=function(t,r){var n=DA(t);return n<0&&r&&!jA(t)?0:n},Uee=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},FA=function(t){return t.tagName==="INPUT"},zee=function(t){return FA(t)&&t.type==="hidden"},Zee=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},Vee=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},Hee=function(t){if(!t.name)return!0;var r=t.form||wp(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=Vee(o,t.form);return!i||i===t},Wee=function(t){return FA(t)&&t.type==="radio"},Kee=function(t){return Wee(t)&&!Hee(t)},Gee=function(t){var r,n=t&&wp(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=wp(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},LA=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},Jee=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=xl.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(xl.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=wp(t);if(c&&!c.shadowRoot&&o(c)===!0)return LA(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(Gee(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return LA(t);return!1},Yee=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 xl.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},Xee=function(t,r){return!(r.disabled||xp(r)||zee(r)||Jee(r,t)||Zee(r)||Yee(r))},qA=function(t,r){return!(Kee(r)||DA(r)<0||!Xee(t,r))},Qee=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},ete=function e(t){var r=[],n=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=Bee(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(Uee).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},$v=function(t,r){r=r||{};var n;return r.getShadowRoot?n=qee([t],r.includeContainer,{filter:qA.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Qee}):n=Lee(t,r.includeContainer,qA.bind(null,r)),ete(n)};const Ov="ArrowUp",Sp="ArrowDown",$s="ArrowLeft",Sl="ArrowRight";function _p(e,t,r){return Math.floor(e/t)!==r}function _l(e,t){return t<0||t>=e.current.length}function Cv(e,t){return en(e,{disabledIndices:t})}function BA(e,t){return en(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function en(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 tte(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===Ov){if(u&&Br(r),l===-1)d=c;else if(d=en(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}_l(e,d)&&(d=l)}if(r.key===Sp&&(u&&Br(r),l===-1?d=s:(d=en(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=en(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),_l(e,d)&&(d=l)),n==="both"){const p=ks(l/i);r.key===Sl&&(u&&Br(r),l%i!==i-1?(d=en(e,{startingIndex:l,disabledIndices:a}),o&&_p(d,i,p)&&(d=en(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=en(e,{startingIndex:l-l%i-1,disabledIndices:a})),_p(d,i,p)&&(d=l)),r.key===$s&&(u&&Br(r),l%i!==0?(d=en(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&_p(d,i,p)&&(d=en(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=en(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),_p(d,i,p)&&(d=l));const f=ks(c/i)===p;_l(e,d)&&(o&&f?d=r.key===$s?c:en(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}let UA=0;function Jo(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(UA);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():UA=requestAnimationFrame(i)}var _r=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Ep(){return Ep=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},Ep.apply(this,arguments)}let Av=!1,rte=0;const zA=()=>"floating-ui-"+rte++;function nte(){const[e,t]=P.useState(()=>Av?zA():void 0);return _r(()=>{e==null&&t(zA())},[]),P.useEffect(()=>{Av||(Av=!0)},[]),e}const Iv=P["useId".toString()]||nte;function ote(){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 ite=P.createContext(null),ate=P.createContext(null),ZA=()=>{var e;return((e=P.useContext(ite))==null?void 0:e.id)||null},kp=()=>P.useContext(ate);function El(e){return"data-floating-ui-"+e}function Ai(e){const t=O.useRef(e);return _r(()=>{t.current=e}),t}function ste(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 Os(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 cte(e,t){let r,n=-1;function o(i,a){a>n&&(r=i,n=a),Os(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===r)}let Cs=new WeakMap,Tp=new WeakSet,$p={},Rv=0;const lte=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,VA=e=>e&&(e.host||VA(e.parentNode)),ute=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=VA(r);return e.contains(n)?n:null}).filter(r=>r!=null);function dte(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,a=ute(t,e),s=new Set,c=new Set(a),l=[];$p[o]||($p[o]=new WeakMap);const u=$p[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=(Cs.get(h)||0)+1,v=(u.get(h)||0)+1;Cs.set(h,g),u.set(h,v),l.push(h),g===1&&m&&Tp.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return Rv++,()=>{l.forEach(f=>{const h=(Cs.get(f)||0)-1,y=(u.get(f)||0)-1;Cs.set(f,h),u.set(f,y),h||(!Tp.has(f)&&i&&f.removeAttribute(i),Tp.delete(f)),y||f.removeAttribute(o)}),Rv--,Rv||(Cs=new WeakMap,Cs=new WeakMap,Tp=new WeakSet,$p={})}}function HA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Qn(e[0]).body;return dte(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const Pv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function WA(e,t){const r=$v(e,Pv());t==="prev"&&r.reverse();const n=r.indexOf(Ci(Qn(e)));return r.slice(n+1)[0]}function KA(){return WA(document.body,"next")}function GA(){return WA(document.body,"prev")}function kl(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!hn(r,n)}function fte(e){$v(e,Pv()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function pte(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 Nv={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 hte;function JA(e){e.key==="Tab"&&(e.target,clearTimeout(hte))}const Op=P.forwardRef(function(t,r){const[n,o]=P.useState();_r(()=>(bA()&&o("button"),document.addEventListener("keydown",JA),()=>{document.removeEventListener("keydown",JA)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[El("focus-guard")]:"",style:Nv};return P.createElement("span",Ep({},t,i))}),YA=P.createContext(null);function mte(e){let{id:t,root:r}=e===void 0?{}:e;const[n,o]=P.useState(null),i=Iv(),a=XA(),s=P.useMemo(()=>({id:t,root:r,portalContext:a,uniqueId:i}),[t,r,a,i]),c=P.useRef();return _r(()=>()=>{n==null||n.remove()},[n,s]),_r(()=>{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=El("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&&!dr(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 yte(e){let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const i=mte({id:r,root:n}),[a,s]=P.useState(null),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(n||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&kl(h)&&(h.type==="focusin"?pte:fte)(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]),P.createElement(YA.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Op,{"data-type":"outside",ref:c,onFocus:f=>{if(kl(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=GA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:Nv}),i&&ao.createPortal(t,i),p&&i&&P.createElement(Op,{"data-type":"outside",ref:l,onFocus:f=>{if(kl(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=KA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const XA=()=>P.useContext(YA),gte=P.forwardRef(function(t,r){return P.createElement("button",Ep({},t,{type:"button",ref:r,tabIndex:-1,style:Nv}))});function vte(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=lte()?i:!0,x=Ai(o),w=Ai(a),S=Ai(s),$=kp(),R=XA(),N=typeof a=="number"&&a<0,A=P.useRef(null),D=P.useRef(null),H=P.useRef(!1),U=P.useRef(null),Z=P.useRef(!1),L=R!=null,q=g&&g.getAttribute("role")==="combobox"&&SA(g)&&N,W=P.useCallback(function(B){return B===void 0&&(B=v),B?$v(B,Pv()):[]},[v]),J=P.useCallback(B=>{const Q=W(B);return x.current.map(T=>g&&T==="reference"?g:v&&T==="floating"?v:Q).filter(Boolean).flat()},[g,v,x,W]);P.useEffect(()=>{if(n||!c)return;function B(T){if(T.key==="Tab"){hn(v,Ci(Qn(v)))&&W().length===0&&!q&&Br(T);const ce=J(),pe=xA(T);x.current[0]==="reference"&&pe===g&&(Br(T),T.shiftKey?Jo(ce[ce.length-1]):Jo(ce[1])),x.current[1]==="floating"&&pe===v&&T.shiftKey&&(Br(T),Jo(ce[0]))}}const Q=Qn(v);return Q.addEventListener("keydown",B),()=>{Q.removeEventListener("keydown",B)}},[n,g,v,c,x,p,q,W,J]),P.useEffect(()=>{if(n||!u)return;function B(){Z.current=!0,setTimeout(()=>{Z.current=!1})}function Q(T){const ce=T.relatedTarget;queueMicrotask(()=>{const pe=!(hn(g,ce)||hn(v,ce)||hn(ce,v)||hn(R==null?void 0:R.portalNode,ce)||ce!=null&&ce.hasAttribute(El("focus-guard"))||$&&(Os($.nodesRef.current,f).find(he=>{var be,Ee;return hn((be=he.context)==null?void 0:be.elements.floating,ce)||hn((Ee=he.context)==null?void 0:Ee.elements.domReference,ce)})||ste($.nodesRef.current,f).find(he=>{var be,Ee;return((be=he.context)==null?void 0:be.elements.floating)===ce||((Ee=he.context)==null?void 0:Ee.elements.domReference)===ce})));ce&&pe&&!Z.current&&ce!==U.current&&(H.current=!0,h(!1,T))})}if(v&&Qr(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",B),!c&&v.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",B),!c&&v.removeEventListener("focusout",Q)}},[n,g,v,c,f,$,R,h,u]),P.useEffect(()=>{var B;if(n)return;const Q=Array.from((R==null||(B=R.portalNode)==null?void 0:B.querySelectorAll("["+El("portal")+"]"))||[]);if(v){const T=[v,...Q,A.current,D.current,x.current.includes("reference")||q?g:null].filter(pe=>pe!=null),ce=c?HA(T,b,!b):HA(T);return()=>{ce()}}},[n,g,v,c,x,R,q,b]),_r(()=>{if(n||!v)return;const B=Qn(v),Q=Ci(B);queueMicrotask(()=>{const T=J(v),ce=w.current,pe=(typeof ce=="number"?T[ce]:ce.current)||v,he=hn(v,Q);!N&&!he&&d&&Jo(pe,{preventScroll:pe===v})})},[n,d,v,N,J,w]),_r(()=>{if(n||!v)return;let B=!1;const Q=Qn(v),T=Ci(Q),ce=m.current;U.current=T;function pe(he){if(he.type==="escapeKey"&&p.domReference.current&&(U.current=p.domReference.current),["referencePress","escapeKey"].includes(he.type))return;const be=he.data.returnFocus;typeof be=="object"?(H.current=!1,B=be.preventScroll):H.current=!be}return y.on("dismiss",pe),()=>{y.off("dismiss",pe);const he=Ci(Q);(hn(v,he)||$&&Os($.nodesRef.current,f).some(Ee=>{var _e;return hn((_e=Ee.context)==null?void 0:_e.elements.floating,he)})||ce.openEvent&&["click","mousedown"].includes(ce.openEvent.type))&&p.domReference.current&&(U.current=p.domReference.current),S.current&&Qr(U.current)&&!H.current&&Jo(U.current,{cancelPrevious:!1,preventScroll:B})}},[n,v,S,m,p,y,$,f]),_r(()=>{if(!(n||!R))return R.setFocusManagerState({modal:c,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{R.setFocusManagerState(null)}},[n,R,c,d,h,p,u]),_r(()=>{if(!n&&v&&typeof MutationObserver=="function"&&!N){const B=()=>{const T=v.getAttribute("tabindex");x.current.includes("floating")||Ci(Qn(v))!==p.domReference.current&&W().length===0?T!=="0"&&v.setAttribute("tabindex","0"):T!=="-1"&&v.setAttribute("tabindex","-1")};B();const Q=new MutationObserver(B);return Q.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}}},[n,v,p,x,W,N]);function M(B){return n||!l||!c?null:P.createElement(gte,{ref:B==="start"?A:D,onClick:Q=>h(!1,Q.nativeEvent)},typeof l=="string"?l:"Dismiss")}const E=!n&&b&&!q&&(L||c);return P.createElement(P.Fragment,null,E&&P.createElement(Op,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:B=>{if(c){const T=J();Jo(o[0]==="reference"?T[0]:T[T.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(H.current=!1,kl(B,R.portalNode)){const T=KA()||g;T==null||T.focus()}else{var Q;(Q=R.beforeOutsideRef.current)==null||Q.focus()}}}),!q&&M("start"),r,M("end"),E&&P.createElement(Op,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:B=>{if(c)Jo(J()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(H.current=!0),kl(B,R.portalNode)){const T=GA()||g;T==null||T.focus()}else{var Q;(Q=R.afterOutsideRef.current)==null||Q.focus()}}}))}function QA(e){return Qr(e.target)&&e.target.tagName==="BUTTON"}function eI(e){return SA(e)}function bte(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=P.useRef(),p=P.useRef(!1);return P.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(wA(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}wA(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||QA(f))&&(f.key===" "&&!eI(i)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&n(!(r&&c),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||QA(f)||eI(i)||f.key===" "&&p.current&&(p.current=!1,n(!(r&&c),f.nativeEvent))}}}:{},[a,o,s,l,u,i,c,r,n])}const wte=P["useInsertionEffect".toString()]||(e=>e());function Ii(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wte(()=>{t.current=e}),P.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 xte={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ste={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},_te=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 Ete(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=kp(),b=ZA()!=null,x=Ii(typeof p=="function"?p:()=>!1),w=typeof p=="function"?x:p,S=P.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=_te(g),N=Ii(D=>{if(!r||!u||!d||D.key!=="Escape")return;const H=v?Os(v.nodesRef.current,i):[];if(!$&&(D.stopPropagation(),H.length>0)){let U=!0;if(H.forEach(Z=>{var L;if((L=Z.context)!=null&&L.open&&!Z.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,dee(D)?D.nativeEvent:D)}),A=Ii(D=>{const H=S.current;if(S.current=!1,H||typeof w=="function"&&!w(D))return;const U=xA(D),Z="["+El("inert")+"]",L=Qn(c).querySelectorAll(Z);let q=dr(U)?U:null;for(;q&&!wl(q);){const M=ya(q);if(M===Qn(c).body||!dr(M))break;q=M}if(L.length&&dr(U)&&!fee(U)&&!hn(U,c)&&Array.from(L).every(M=>!hn(q,M)))return;if(Qr(U)&&c){const M=U.clientWidth>0&&U.scrollWidth>U.clientWidth,E=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let B=E&&D.offsetX>U.clientWidth;if(E&&$n(U).direction==="rtl"&&(B=D.offsetX<=U.offsetWidth-U.clientWidth),B||M&&D.offsetY>U.clientHeight)return}const W=v&&Os(v.nodesRef.current,i).some(M=>{var E;return Ev(D,(E=M.context)==null?void 0:E.elements.floating)});if(Ev(D,c)||Ev(D,s)||W)return;const J=v?Os(v.nodesRef.current,i):[];if(J.length>0){let M=!0;if(J.forEach(E=>{var B;if((B=E.context)!=null&&B.open&&!E.context.dataRef.current.__outsidePressBubbles){M=!1;return}}),!M)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:gA(D)||vA(D)}}),n(!1,D)});return P.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=$,l.current.__outsidePressBubbles=R;function D(Z){n(!1,Z)}const H=Qn(c);d&&H.addEventListener("keydown",N),w&&H.addEventListener(f,A);let U=[];return m&&(dr(s)&&(U=Oi(s)),dr(c)&&(U=U.concat(Oi(c))),!dr(a)&&a&&a.contextElement&&(U=U.concat(Oi(a.contextElement)))),U=U.filter(Z=>{var L;return Z!==((L=H.defaultView)==null?void 0:L.visualViewport)}),U.forEach(Z=>{Z.addEventListener("scroll",D,{passive:!0})}),()=>{d&&H.removeEventListener("keydown",N),w&&H.removeEventListener(f,A),U.forEach(Z=>{Z.removeEventListener("scroll",D)})}},[l,c,s,a,d,w,f,r,n,m,u,$,R,N,A]),P.useEffect(()=>{S.current=!1},[w,f]),P.useMemo(()=>u?{reference:{onKeyDown:N,[xte[y]]:D=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,D.nativeEvent))}},floating:{onKeyDown:N,[Ste[f]]:()=>{S.current=!0}}}:{},[u,o,h,f,y,n,N])}let Mv;process.env.NODE_ENV!=="production"&&(Mv=new Set);function kte(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 $="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&&!dr(e.elements.reference)){var a;if(!((a=Mv)!=null&&a.has($))){var s;(s=Mv)==null||s.add($),console.error($)}}}const[c,l]=P.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,d=jee(e),p=kp(),f=Ii(($,R)=>{$&&(y.current.openEvent=R),n==null||n($,R)}),h=P.useRef(null),y=P.useRef({}),m=P.useState(()=>ote())[0],g=Iv(),v=P.useCallback($=>{const R=dr($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;d.refs.setReference(R)},[d.refs]),b=P.useCallback($=>{(dr($)||$===null)&&(h.current=$,l($)),(dr(d.refs.reference.current)||d.refs.reference.current===null||$!==null&&!dr($))&&d.refs.setReference($)},[d.refs]),x=P.useMemo(()=>({...d.refs,setReference:b,setPositionReference:v,domReference:h}),[d.refs,b,v]),w=P.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=P.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 _r(()=>{const $=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);$&&($.context=S)}),P.useMemo(()=>({...d,context:S,refs:x,elements:w}),[d,x,w,S])}function jv(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 Tte(e){e===void 0&&(e=[]);const t=e,r=P.useCallback(i=>jv(i,e,"reference"),t),n=P.useCallback(i=>jv(i,e,"floating"),t),o=P.useCallback(i=>jv(i,e,"item"),e.map(i=>i==null?void 0:i.item));return P.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let tI=!1;function Cp(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function rI(e,t){return Cp(t,e===Ov||e===Sp,e===$s||e===Sl)}function Dv(e,t,r){return Cp(t,e===Sp,r?e===$s:e===Sl)||e==="Enter"||e==" "||e===""}function $te(e,t,r){return Cp(t,r?e===$s:e===Sl,e===Sp)}function nI(e,t,r){return Cp(t,r?e===Sl:e===$s,e===Ov)}function Ote(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:$=!0,virtualItemRef:R}=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 N=ZA(),A=kp(),D=Ii(l),H=P.useRef(g),U=P.useRef(d??-1),Z=P.useRef(null),L=P.useRef(!0),q=P.useRef(D),W=P.useRef(!!a),J=P.useRef(!1),M=P.useRef(!1),E=Ai(x),B=Ai(r),Q=Ai($),[T,ce]=P.useState(),[pe,he]=P.useState(),be=Ii(function(ye,le,te){te===void 0&&(te=!1);const ve=ye.current[le.current];ve&&(m?(ce(ve.id),A==null||A.events.emit("virtualfocus",ve),R&&(R.current=ve)):Jo(ve,{preventScroll:!0,sync:uee()&&bA()?tI||J.current:!1}),requestAnimationFrame(()=>{const Ce=Q.current;Ce&&ve&&(te||!L.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof Ce=="boolean"?{block:"nearest",inline:"nearest"}:Ce))}))});_r(()=>{document.createElement("div").focus({get preventScroll(){return tI=!0,!1}})},[]),_r(()=>{u&&(r&&a?H.current&&d!=null&&(M.current=!0,D(d)):W.current&&(U.current=-1,q.current(null)))},[u,r,a,d,D]),_r(()=>{if(u&&r&&a)if(c==null){if(J.current=!1,d!=null)return;if(W.current&&(U.current=-1,be(s,U)),!W.current&&H.current&&(Z.current!=null||H.current===!0&&Z.current==null)){let ye=0;const le=()=>{s.current[0]==null?(ye<2&&(ye?requestAnimationFrame:queueMicrotask)(le),ye++):(U.current=Z.current==null||Dv(Z.current,w,y)||h?Cv(s,E.current):BA(s,E.current),Z.current=null,D(U.current))};le()}}else _l(s,c)||(U.current=c,be(s,U,M.current),M.current=!1)},[u,r,a,c,d,h,s,w,y,D,be,E]),_r(()=>{var ye,le;if(!u||a||!A||m||!W.current)return;const te=A.nodesRef.current,ve=(ye=te.find(F=>F.id===N))==null||(le=ye.context)==null?void 0:le.elements.floating,Ce=Ci(Qn(a)),Ue=te.some(F=>F.context&&hn(F.context.elements.floating,Ce));ve&&!Ue&&L.current&&ve.focus({preventScroll:!0})},[u,a,A,N,m]),_r(()=>{if(!u||!A||!m||N)return;function ye(le){he(le.id),R&&(R.current=le)}return A.events.on("virtualfocus",ye),()=>{A.events.off("virtualfocus",ye)}},[u,A,m,N,R]),_r(()=>{q.current=D,W.current=!!a}),_r(()=>{r||(Z.current=null)},[r]);const Ee=c!=null,_e=P.useMemo(()=>{function ye(te){if(!r)return;const ve=s.current.indexOf(te);ve!==-1&&D(ve)}return{onFocus(te){let{currentTarget:ve}=te;ye(ve)},onClick:te=>{let{currentTarget:ve}=te;return ve.focus({preventScroll:!0})},...v&&{onMouseMove(te){let{currentTarget:ve}=te;ye(ve)},onPointerLeave(te){let{pointerType:ve}=te;!L.current||ve==="touch"||(U.current=-1,be(s,U),D(null),m||Jo(o.floating.current,{preventScroll:!0}))}}}},[r,o,be,v,s,D,m]);return P.useMemo(()=>{if(!u)return{};const ye=E.current;function le(F){if(L.current=!1,J.current=!0,!B.current&&F.currentTarget===o.floating.current)return;if(h&&nI(F.key,w,y)){Br(F),n(!1,F.nativeEvent),Qr(i)&&!m&&i.focus();return}const ue=U.current,we=Cv(s,ye),fe=BA(s,ye);if(F.key==="Home"&&(Br(F),U.current=we,D(U.current)),F.key==="End"&&(Br(F),U.current=fe,D(U.current)),!(S>1&&(U.current=tte(s,{event:F,orientation:w,loop:f,cols:S,disabledIndices:ye,minIndex:we,maxIndex:fe,prevIndex:U.current,stopEvent:!0}),D(U.current),w==="both"))&&rI(F.key,w)){if(Br(F),r&&!m&&Ci(F.currentTarget.ownerDocument)===F.currentTarget){U.current=Dv(F.key,w,y)?we:fe,D(U.current);return}Dv(F.key,w,y)?f?U.current=ue>=fe?p&&ue!==s.current.length?-1:we:en(s,{startingIndex:ue,disabledIndices:ye}):U.current=Math.min(fe,en(s,{startingIndex:ue,disabledIndices:ye})):f?U.current=ue<=we?p&&ue!==-1?s.current.length:fe:en(s,{startingIndex:ue,decrement:!0,disabledIndices:ye}):U.current=Math.max(we,en(s,{startingIndex:ue,decrement:!0,disabledIndices:ye})),_l(s,U.current)?D(null):D(U.current)}}function te(F){g==="auto"&&gA(F.nativeEvent)&&(H.current=!0)}function ve(F){H.current=g,g==="auto"&&vA(F.nativeEvent)&&(H.current=!0)}const Ce=m&&r&&Ee&&{"aria-activedescendant":pe||T},Ue=s.current.find(F=>(F==null?void 0:F.id)===T);return{reference:{...Ce,onKeyDown(F){L.current=!1;const ue=F.key.indexOf("Arrow")===0,we=$te(F.key,w,y),fe=nI(F.key,w,y),De=rI(F.key,w),Ie=(h?we:De)||F.key==="Enter"||F.key.trim()==="";if(m&&r){const K=A==null?void 0:A.nodesRef.current.find(X=>X.parentId==null),ae=A&&K?cte(A.nodesRef.current,K.id):null;if(ue&&ae&&R){const X=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(we||fe){var je,ut;const me=((je=ae.context)==null?void 0:je.elements.domReference)===F.currentTarget,Oe=fe&&!me?(ut=ae.context)==null?void 0:ut.elements.domReference:we?Ue:null;Oe&&(Br(F),Oe.dispatchEvent(X),he(void 0))}if(De&&ae.context&&ae.context.open&&ae.parentId&&F.currentTarget!==ae.context.elements.domReference){var We;Br(F),(We=ae.context.elements.domReference)==null||We.dispatchEvent(X);return}}return le(F)}if(!(!r&&!b&&ue)){if(Ie&&(Z.current=h&&De?null:F.key),h){we&&(Br(F),r?(U.current=Cv(s,ye),D(U.current)):n(!0,F.nativeEvent));return}De&&(d!=null&&(U.current=d),Br(F),!r&&b?n(!0,F.nativeEvent):le(F),r&&D(U.current))}},onFocus(){r&&D(null)},onPointerDown:ve,onMouseDown:te,onClick:te},floating:{"aria-orientation":w==="both"?void 0:w,...Ce,onKeyDown:le,onPointerMove(){L.current=!0}},item:_e}},[i,o,T,pe,E,B,s,u,w,y,m,r,Ee,h,d,b,p,S,f,g,D,n,_e,A,R])}function Cte(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:o=!0,role:i="dialog"}=t,a=Iv();return P.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 Ate(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=P.useRef(),y=P.useRef(""),m=P.useRef((r=f??a)!=null?r:-1),g=P.useRef(null),v=Ii(s),b=Ii(c),x=Ai(u),w=Ai(p);return _r(()=>{n&&(clearTimeout(h.current),g.current=null,y.current="")},[n]),_r(()=>{if(n&&y.current===""){var S;m.current=(S=f??a)!=null?S:-1}},[n,f,a]),P.useMemo(()=>{if(!l)return{};function S(N){N?o.current.typing||(o.current.typing=N,b(N)):o.current.typing&&(o.current.typing=N,b(N))}function $(N,A,D){const H=x.current?x.current(A,D):A.find(U=>(U==null?void 0:U.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return H?N.indexOf(H):-1}function R(N){const A=i.current;if(y.current.length>0&&y.current[0]!==" "&&($(A,A,y.current)===-1?S(!1):N.key===" "&&Br(N)),A==null||w.current.includes(N.key)||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;n&&N.key!==" "&&(Br(N),S(!0)),A.every(Z=>{var L,q;return Z?((L=Z[0])==null?void 0:L.toLocaleLowerCase())!==((q=Z[1])==null?void 0:q.toLocaleLowerCase()):!0})&&y.current===N.key&&(y.current="",m.current=g.current),y.current+=N.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=g.current,S(!1)},d);const H=m.current,U=$(A,[...A.slice((H||0)+1),...A.slice(0,(H||0)+1)],y.current);U!==-1?(v(U),g.current=U):N.key!==" "&&(y.current="",S(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(N){N.key===" "&&S(!1)}}}},[l,n,o,i,d,w,x,v,b])}const Ite=({options:e,label:t,reusable:r})=>{var q,W,J,M,E;const n=pt(B=>B.sendTextMessage),o=pt(B=>B.messageContainerRef),i=pt(B=>B.isReadOnly),[a,s]=P.useState(!1),[c,l]=P.useState(null),[u,d]=P.useState(null),{message:{blocks:{dropdown:p}}}=Jt,f=e.reduce((B,Q)=>(B[Q.label]=Q.value,B),{}),h=f?Object.keys(f):[],y=B=>{s(u!==null&&!r?!1:B)},{refs:m,floatingStyles:g,context:v}=kte({placement:"bottom-start",open:a,onOpenChange:y,whileElementsMounted:Nee,middleware:[yee(5),gee({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),vee({apply({rects:B,elements:Q,availableHeight:T}){Object.assign(Q.floating.style,{maxHeight:`${T}px`,minWidth:`${B.reference.width}px`})},padding:10})]}),b=P.useRef([]),x=P.useRef(h),w=P.useRef(!1),S=bte(v,{event:"mousedown"}),$=Ete(v),R=Cte(v,{role:"listbox"}),N=Ote(v,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),A=Ate(v,{listRef:x,activeIndex:c,selectedIndex:u,onMatch:a?l:d,onTypingChange(B){w.current=B}}),{getReferenceProps:D,getFloatingProps:H,getItemProps:U}=Tte([$,R,N,A,S]),Z=B=>{d(B),n(f[h[B]]),s(!1)},L=u!==null?h[u]:void 0;return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{tabIndex:0,ref:m.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!r?"":void 0,...(q=p.button)==null?void 0:q.container,...D(),children:[Y.jsx("span",{...(W=p.button)==null?void 0:W.text,children:L||t||"Select..."}),Y.jsx(nQ,{...(J=p.button)==null?void 0:J.icon})]}),a&&Y.jsx(yte,{children:Y.jsx(vte,{context:v,modal:!1,children:Y.jsx("div",{ref:m.setFloating,className:(E=(M=p.content)==null?void 0:M.container)==null?void 0:E.className,style:{...g},...H(),children:h.map((B,Q)=>{var T;return Y.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,...U({onClick(){i||Z(Q)},onKeyDown(ce){i||(ce.key==="Enter"&&(ce.preventDefault(),Z(Q)),ce.key===" "&&!w.current&&(ce.preventDefault(),Z(Q)))}}),children:B},B)})})})})]})},Rte=O.forwardRef(({type:e,title:t,url:r,...n},o)=>{const{message:{blocks:{file:i}}}=Jt;return Y.jsxs("a",{...n,...i.container,href:r,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[Y.jsx("p",{...i.title,children:t||r}),Y.jsx(iQ,{...i.icon})]})}),oI={audio:YX,bubble:HX,button:ZX,carousel:ree,column:lQ,dropdown:Ite,file:Rte,image:KX,location:cQ,row:uQ,text:z8,video:JX},As=({block:e,...t})=>{const n=pt(i=>i.renderers)[e.type]??oI[e.type],o={...t,...e};return Y.jsx(n,{...o})};function Pte({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 Nte=P.forwardRef(Pte);function Mte({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 jte=P.forwardRef(Mte);function Dte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Fte=O.useLayoutEffect,Lte=function(t){var r=P.useRef(t);return Fte(function(){r.current=t}),r},iI=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},qte=function(t,r){var n=O.useRef();return O.useCallback(function(o){t.current=o,n.current&&iI(n.current,null),n.current=r,r&&iI(r,o)},[r])},aI={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Bte=function(t){Object.keys(aI).forEach(function(r){t.style.setProperty(r,aI[r],"important")})},sI=Bte,cn=null,cI=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Ute(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),cn||(cn=document.createElement("textarea"),cn.setAttribute("tabindex","-1"),cn.setAttribute("aria-hidden","true"),sI(cn)),cn.parentNode===null&&document.body.appendChild(cn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var f=p;cn.style[f]=a[f]}),sI(cn),cn.value=t;var c=cI(cn,e);cn.value=t,c=cI(cn,e),cn.value="x";var l=cn.scrollHeight-o,u=l*r;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var d=l*n;return s==="border-box"&&(d=d+o+i),c=Math.min(d,c),[c,l]}var lI=function(){},zte=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Zte=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Vte=!!document.documentElement.currentStyle,Hte=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=zte(Zte,r),o=n.boxSizing;if(o==="")return null;Vte&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Wte=Hte;function uI(e,t,r){var n=Lte(r);P.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Kte=function(t){uI(window,"resize",t)},Gte=function(t){uI(document.fonts,"loadingdone",t)},Jte=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Yte=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?lI:a,c=t.onHeightChange,l=c===void 0?lI:c,u=Dte(t,Jte),d=u.value!==void 0,p=P.useRef(null),f=qte(p,r),h=P.useRef(0),y=P.useRef(),m=function(){var b=p.current,x=n&&y.current?y.current:Wte(b);if(x){y.current=x;var w=Ute(x,b.value||b.placeholder||"x",i,o),S=w[0],$=w[1];h.current!==S&&(h.current=S,b.style.setProperty("height",S+"px","important"),l(S,{rowHeight:$}))}},g=function(b){d||m(),s(b)};return P.useLayoutEffect(m),Kte(m),Gte(m),P.createElement("textarea",li({},u,{onChange:g,ref:f}))},Xte=P.forwardRef(Yte);const dI=O.memo(O.forwardRef(({children:e,...t},r)=>{const{composer:n}=Jt,o=pt($=>$.disableComposer),i=pt($=>$.setIsTyping),a=pt($=>$.isReadOnly),s=pt($=>$.sendFile),c=pt($=>$.addMessage),l=pt($=>$.sendTextMessage),u=pt($=>$.allowFileUpload),{composerPlaceholder:d,showPoweredBy:p}=nA(),[f,h]=O.useState(""),[y,m]=O.useState(-1),g=O.useRef(null);O.useRef(null);const v=En($=>$.user),b=En($=>$.messageHistory);if(a)return null;const x=()=>{var $;g.current&&(($=g.current)==null||$.click())},w=async $=>{var N;const R=(N=$.target.files)==null?void 0:N[0];if(R)try{const{fileUrl:A,type:D}=await s(R)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:D,url:A}})}catch(A){console.error("Error sending file:",A)}},S=()=>{f&&(l(f),setTimeout(()=>i(!0,9e3),500),h(""),m(-1))};return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{"data-disabled":o,...t,...n.container,ref:r,children:[u&&Y.jsxs(Y.Fragment,{children:[Y.jsx("button",{type:"button",disabled:o,...n.uploadButton.container,onClick:x,children:Y.jsx(jte,{...n.uploadButton.icon})}),Y.jsx("input",{type:"file",ref:g,style:{display:"none"},onChange:w})]}),Y.jsx(Xte,{...n==null?void 0:n.input,placeholder:d??"Type your message...",disabled:o,value:f,"data-has-value":!!f,onChange:$=>h($.target.value),maxRows:5,onKeyDown:$=>{if(!o){if($.key==="Enter"&&$.shiftKey?($.preventDefault(),h(`${f}
|
|
360
|
-
`)):$.key==="Enter"&&($.preventDefault(),S()),$.key==="ArrowUp"){$.preventDefault();const R=b[(v==null?void 0:v.userId)??""]??[];y<R.length-1&&h(R[y+1]),m(()=>Math.min(y+1,R.length-1))}if($.key==="ArrowDown"){$.preventDefault();const R=b[(v==null?void 0:v.userId)??""]??[];h(y===0?"":R[y-1]),m(()=>Math.max(y-1,-1))}}}}),Y.jsx("button",{type:"button",...n.button.container,disabled:!f||o,onClick:S,children:Y.jsx(Nte,{...n.button.icon})})]}),Y.jsx("a",{...n.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com",children:"⚡ by Botpress"})]})})),fI=({children:e})=>{const[t,r]=O.useState(!1),[n,o]=O.useState(""),[i,a]=O.useState(null),s=({title:l,content:u})=>{o(l),a(u),r(!0)},c=()=>{r(!1)};return Y.jsxs(eA.Provider,{value:{hideModal:c,showModal:s,title:n,content:i,open:t},children:[Y.jsx(Pi,{open:t,onOpenChange:r,children:Y.jsx(Pi.Content,{title:n,children:i})}),e]})},i1e="",Qte=({children:e,...t})=>{const r=O.useRef(),n=O.useRef(null),o=zX({...t,messageContainerRef:n});return r.current||(r.current=o),Y.jsx(rA.Provider,{value:{...t.configuration},children:Y.jsx(XC.Provider,{value:r.current,children:Y.jsx(ere,{children:e})})})},ere=({children:e})=>{const t=pt(g=>g.client),r=pt(g=>g.addMessage),n=pt(g=>g.setMessages),o=pt(g=>g.configuration),i=pt(g=>g.setConnected),a=pt(g=>g.userData),s=pt(g=>g.userName),c=pt(g=>g.userPictureUrl),l=pt(g=>g.setIsTyping),u=pt(g=>g.getMessages),d=En(g=>g.setConversationId),p=En(g=>g.user),f=En(g=>g.conversationId),h=En(g=>g.setUser),[y,m]=O.useState(0);return O.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]),O.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]),O.useEffect(()=>{if(t)return t.on("conversation",g=>{d(g)})},[]),qC(async()=>{if(t)return t.on("error",()=>{m(g=>g+1)})}),qC(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:$,id:R}=b,N=w===t.userId?"outgoing":"incoming";v.push({id:R,direction:N,sender:N==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(S),block:x,disableInput:$})}catch{console.error("Invalid message payload")}return n(v.reverse()),()=>{t.disconnect()}},[y,f]),Y.jsx(Y.Fragment,{children:e})};function Yo(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 tre=P["useId".toString()]||(()=>{});let rre=0;function Ap(e){const[t,r]=P.useState(tre());return Tc(()=>{e||r(n=>n??String(rre++))},[e]),e||(t?`radix-${t}`:"")}function pI({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=nre({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=ci(r),c=O.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 nre({defaultProp:e,onChange:t}){const r=O.useState(e),[n]=r,o=O.useRef(n),i=ci(t);return O.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}function ore(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e);O.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Fv="dismissableLayer.update",ire="dismissableLayer.pointerDownOutside",are="dismissableLayer.focusOutside";let hI;const sre=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cre=O.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=O.useContext(sre),[d,p]=O.useState(null),f=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,h]=O.useState({}),y=Ki(t,R=>p(R)),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=lre(R=>{const N=R.target,A=[...u.branches].some(D=>D.contains(N));!w||A||(i==null||i(R),s==null||s(R),R.defaultPrevented||c==null||c())},f),$=ure(R=>{const N=R.target;[...u.branches].some(D=>D.contains(N))||(a==null||a(R),s==null||s(R),R.defaultPrevented||c==null||c())},f);return ore(R=>{b===u.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},f),O.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hI=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),mI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hI)}},[d,f,n,u]),O.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),mI())},[d,u]),O.useEffect(()=>{const R=()=>h({});return document.addEventListener(Fv,R),()=>document.removeEventListener(Fv,R)},[]),O.createElement(Nn.div,li({},l,{ref:y,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Yo(e.onFocusCapture,$.onFocusCapture),onBlurCapture:Yo(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:Yo(e.onPointerDownCapture,S.onPointerDownCapture)}))});function lre(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e),n=O.useRef(!1),o=O.useRef(()=>{});return O.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){yI(ire,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 ure(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e),n=O.useRef(!1);return O.useEffect(()=>{const o=i=>{i.target&&!n.current&&yI(are,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 mI(){const e=new CustomEvent(Fv);document.dispatchEvent(e)}function yI(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?UU(o,i):o.dispatchEvent(i)}const Lv="focusScope.autoFocusOnMount",qv="focusScope.autoFocusOnUnmount",gI={bubbles:!1,cancelable:!0},dre=O.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=O.useState(null),l=ci(o),u=ci(i),d=O.useRef(null),p=Ki(t,y=>c(y)),f=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(n){let y=function(b){if(f.paused||!s)return;const x=b.target;s.contains(x)?d.current=x:Ri(d.current,{select:!0})},m=function(b){if(f.paused||!s)return;const x=b.relatedTarget;x!==null&&(s.contains(x)||Ri(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)||Ri(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]),O.useEffect(()=>{if(s){wI.add(f);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Lv,gI);s.addEventListener(Lv,l),s.dispatchEvent(g),g.defaultPrevented||(fre(gre(vI(s)),{select:!0}),document.activeElement===y&&Ri(s))}return()=>{s.removeEventListener(Lv,l),setTimeout(()=>{const g=new CustomEvent(qv,gI);s.addEventListener(qv,u),s.dispatchEvent(g),g.defaultPrevented||Ri(y??document.body,{select:!0}),s.removeEventListener(qv,u),wI.remove(f)},0)}}},[s,l,u,f]);const h=O.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]=pre(v);b&&x?!y.shiftKey&&g===x?(y.preventDefault(),r&&Ri(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),r&&Ri(x,{select:!0})):g===v&&y.preventDefault()}},[r,n,f.paused]);return O.createElement(Nn.div,li({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function fre(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ri(n,{select:t}),document.activeElement!==r)return}function pre(e){const t=vI(e),r=bI(t,e),n=bI(t.reverse(),e);return[r,n]}function vI(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 bI(e,t){for(const r of e)if(!hre(r,{upTo:t}))return r}function hre(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 mre(e){return e instanceof HTMLInputElement&&"select"in e}function Ri(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mre(e)&&t&&e.select()}}const wI=yre();function yre(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=xI(e,t),e.unshift(t)},remove(t){var r;e=xI(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function xI(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gre(e){return e.filter(t=>t.tagName!=="A")}function vre(e,t){return O.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ip=e=>{const{present:t,children:r}=e,n=bre(t),o=typeof r=="function"?r({present:n.isPresent}):O.Children.only(r),i=Ki(n.ref,o.ref);return typeof r=="function"||n.isPresent?O.cloneElement(o,{ref:i}):null};Ip.displayName="Presence";function bre(e){const[t,r]=O.useState(),n=O.useRef({}),o=O.useRef(e),i=O.useRef("none"),a=e?"mounted":"unmounted",[s,c]=vre(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const l=Rp(n.current);i.current=s==="mounted"?l:"none"},[s]),Tc(()=>{const l=n.current,u=o.current;if(u!==e){const p=i.current,f=Rp(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]),Tc(()=>{if(t){const l=d=>{const f=Rp(n.current).includes(d.animationName);d.target===t&&f&&ao.flushSync(()=>c("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=Rp(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:O.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function Rp(e){return(e==null?void 0:e.animationName)||"none"}let Bv=0;function wre(){O.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:SI()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:SI()),Bv++,()=>{Bv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Bv--}},[])}function SI(){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 _o=function(){return _o=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},_o.apply(this,arguments)};function _I(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 xre(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 Pp="right-scroll-bar-position",Np="width-before-scroll-bar",Sre="with-scroll-bars-hidden",_re="--removed-body-scroll-bar-size";function Ere(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kre(e,t){var r=O.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 Tre(e,t){return kre(t||null,function(r){return e.forEach(function(n){return Ere(n,r)})})}function $re(e){return e}function Ore(e,t){t===void 0&&(t=$re);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 Cre(e){e===void 0&&(e={});var t=Ore(null);return t.options=_o({async:!0,ssr:!1},e),t}var EI=function(e){var t=e.sideCar,r=_I(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 P.createElement(n,_o({},r))};EI.isSideCarExport=!0;function Are(e,t){return e.useMedium(t),EI}var kI=Cre(),Uv=function(){},Mp=P.forwardRef(function(e,t){var r=P.useRef(null),n=P.useState({onScrollCapture:Uv,onWheelCapture:Uv,onTouchMoveCapture:Uv}),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=_I(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,x=Tre([r,t]),w=_o(_o({},v),o);return P.createElement(P.Fragment,null,u&&P.createElement(b,{sideCar:kI,removeScrollBar:l,shards:d,noIsolation:f,inert:h,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),a?P.cloneElement(P.Children.only(s),_o(_o({},w),{ref:x})):P.createElement(g,_o({},w,{className:c,ref:x}),s))});Mp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mp.classNames={fullWidth:Np,zeroRight:Pp};var TI,Ire=function(){if(TI)return TI;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rre(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ire();return t&&e.setAttribute("nonce",t),e}function Pre(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nre(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Mre=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rre())&&(Pre(t,r),Nre(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jre=function(){var e=Mre();return function(t,r){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$I=function(){var e=jre(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Dre={left:0,top:0,right:0,gap:0},zv=function(e){return parseInt(e||"",10)||0},Fre=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[zv(r),zv(n),zv(o)]},Lre=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dre;var t=Fre(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])}},qre=$I(),Bre=function(e,t,r,n){var o=e.left,i=e.top,a=e.right,s=e.gap;return r===void 0&&(r="margin"),`
|
|
359
|
+
*/var Dee=["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])"],Tv=Dee.join(","),MA=typeof Element>"u",xl=MA?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,wp=!MA&&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},xp=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},Fee=function(t){var r,n=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"contenteditable");return n===""||n==="true"},Lee=function(t,r,n){if(xp(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(Tv));return r&&xl.call(t,Tv)&&o.unshift(t),o=o.filter(n),o},qee=function e(t,r,n){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!xp(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=xl.call(a,Tv);u&&n.filter(a)&&(r||!t.includes(a))&&o.push(a);var d=a.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(a),p=!xp(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},jA=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},DA=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||Fee(t))&&!jA(t)?0:t.tabIndex},Bee=function(t,r){var n=DA(t);return n<0&&r&&!jA(t)?0:n},Uee=function(t,r){return t.tabIndex===r.tabIndex?t.documentOrder-r.documentOrder:t.tabIndex-r.tabIndex},FA=function(t){return t.tagName==="INPUT"},zee=function(t){return FA(t)&&t.type==="hidden"},Zee=function(t){var r=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(n){return n.tagName==="SUMMARY"});return r},Vee=function(t,r){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===r)return t[n]},Hee=function(t){if(!t.name)return!0;var r=t.form||wp(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=Vee(o,t.form);return!i||i===t},Wee=function(t){return FA(t)&&t.type==="radio"},Kee=function(t){return Wee(t)&&!Hee(t)},Gee=function(t){var r,n=t&&wp(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=wp(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},LA=function(t){var r=t.getBoundingClientRect(),n=r.width,o=r.height;return n===0&&o===0},Jee=function(t,r){var n=r.displayCheck,o=r.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=xl.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(xl.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=wp(t);if(c&&!c.shadowRoot&&o(c)===!0)return LA(t);t.assignedSlot?t=t.assignedSlot:!c&&l!==t.ownerDocument?t=l.host:t=c}t=s}if(Gee(t))return!t.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return LA(t);return!1},Yee=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 xl.call(r,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}r=r.parentElement}return!1},Xee=function(t,r){return!(r.disabled||xp(r)||zee(r)||Jee(r,t)||Zee(r)||Yee(r))},qA=function(t,r){return!(Kee(r)||DA(r)<0||!Xee(t,r))},Qee=function(t){var r=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(r)||r>=0)},ete=function e(t){var r=[],n=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,c=Bee(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(Uee).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(r)},$v=function(t,r){r=r||{};var n;return r.getShadowRoot?n=qee([t],r.includeContainer,{filter:qA.bind(null,r),flatten:!1,getShadowRoot:r.getShadowRoot,shadowRootFilter:Qee}):n=Lee(t,r.includeContainer,qA.bind(null,r)),ete(n)};const Ov="ArrowUp",Sp="ArrowDown",$s="ArrowLeft",Sl="ArrowRight";function _p(e,t,r){return Math.floor(e/t)!==r}function _l(e,t){return t<0||t>=e.current.length}function Cv(e,t){return en(e,{disabledIndices:t})}function BA(e,t){return en(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function en(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 tte(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===Ov){if(u&&Br(r),l===-1)d=c;else if(d=en(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}_l(e,d)&&(d=l)}if(r.key===Sp&&(u&&Br(r),l===-1?d=s:(d=en(e,{startingIndex:l,amount:i,disabledIndices:a}),o&&l+i>c&&(d=en(e,{startingIndex:l%i-i,amount:i,disabledIndices:a}))),_l(e,d)&&(d=l)),n==="both"){const p=ks(l/i);r.key===Sl&&(u&&Br(r),l%i!==i-1?(d=en(e,{startingIndex:l,disabledIndices:a}),o&&_p(d,i,p)&&(d=en(e,{startingIndex:l-l%i-1,disabledIndices:a}))):o&&(d=en(e,{startingIndex:l-l%i-1,disabledIndices:a})),_p(d,i,p)&&(d=l)),r.key===$s&&(u&&Br(r),l%i!==0?(d=en(e,{startingIndex:l,disabledIndices:a,decrement:!0}),o&&_p(d,i,p)&&(d=en(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a}))):o&&(d=en(e,{startingIndex:l+(i-l%i),decrement:!0,disabledIndices:a})),_p(d,i,p)&&(d=l));const f=ks(c/i)===p;_l(e,d)&&(o&&f?d=r.key===$s?c:en(e,{startingIndex:l-l%i-1,disabledIndices:a}):d=l)}return d}let UA=0;function Jo(e,t){t===void 0&&(t={});const{preventScroll:r=!1,cancelPrevious:n=!0,sync:o=!1}=t;n&&cancelAnimationFrame(UA);const i=()=>e==null?void 0:e.focus({preventScroll:r});o?i():UA=requestAnimationFrame(i)}var _r=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Ep(){return Ep=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},Ep.apply(this,arguments)}let Av=!1,rte=0;const zA=()=>"floating-ui-"+rte++;function nte(){const[e,t]=P.useState(()=>Av?zA():void 0);return _r(()=>{e==null&&t(zA())},[]),P.useEffect(()=>{Av||(Av=!0)},[]),e}const Iv=P["useId".toString()]||nte;function ote(){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 ite=P.createContext(null),ate=P.createContext(null),ZA=()=>{var e;return((e=P.useContext(ite))==null?void 0:e.id)||null},kp=()=>P.useContext(ate);function El(e){return"data-floating-ui-"+e}function Ai(e){const t=O.useRef(e);return _r(()=>{t.current=e}),t}function ste(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 Os(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 cte(e,t){let r,n=-1;function o(i,a){a>n&&(r=i,n=a),Os(e,i).forEach(c=>{o(c.id,a+1)})}return o(t,0),e.find(i=>i.id===r)}let Cs=new WeakMap,Tp=new WeakSet,$p={},Rv=0;const lte=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,VA=e=>e&&(e.host||VA(e.parentNode)),ute=(e,t)=>t.map(r=>{if(e.contains(r))return r;const n=VA(r);return e.contains(n)?n:null}).filter(r=>r!=null);function dte(e,t,r,n){const o="data-floating-ui-inert",i=n?"inert":r?"aria-hidden":null,a=ute(t,e),s=new Set,c=new Set(a),l=[];$p[o]||($p[o]=new WeakMap);const u=$p[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=(Cs.get(h)||0)+1,v=(u.get(h)||0)+1;Cs.set(h,g),u.set(h,v),l.push(h),g===1&&m&&Tp.add(h),v===1&&h.setAttribute(o,""),!m&&i&&h.setAttribute(i,"true")}})}return Rv++,()=>{l.forEach(f=>{const h=(Cs.get(f)||0)-1,y=(u.get(f)||0)-1;Cs.set(f,h),u.set(f,y),h||(!Tp.has(f)&&i&&f.removeAttribute(i),Tp.delete(f)),y||f.removeAttribute(o)}),Rv--,Rv||(Cs=new WeakMap,Cs=new WeakMap,Tp=new WeakSet,$p={})}}function HA(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);const n=Qn(e[0]).body;return dte(e.concat(Array.from(n.querySelectorAll("[aria-live]"))),n,t,r)}const Pv=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function WA(e,t){const r=$v(e,Pv());t==="prev"&&r.reverse();const n=r.indexOf(Ci(Qn(e)));return r.slice(n+1)[0]}function KA(){return WA(document.body,"next")}function GA(){return WA(document.body,"prev")}function kl(e,t){const r=t||e.currentTarget,n=e.relatedTarget;return!n||!hn(r,n)}function fte(e){$v(e,Pv()).forEach(r=>{r.dataset.tabindex=r.getAttribute("tabindex")||"",r.setAttribute("tabindex","-1")})}function pte(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 Nv={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 hte;function JA(e){e.key==="Tab"&&(e.target,clearTimeout(hte))}const Op=P.forwardRef(function(t,r){const[n,o]=P.useState();_r(()=>(bA()&&o("button"),document.addEventListener("keydown",JA),()=>{document.removeEventListener("keydown",JA)}),[]);const i={ref:r,tabIndex:0,role:n,"aria-hidden":n?void 0:!0,[El("focus-guard")]:"",style:Nv};return P.createElement("span",Ep({},t,i))}),YA=P.createContext(null);function mte(e){let{id:t,root:r}=e===void 0?{}:e;const[n,o]=P.useState(null),i=Iv(),a=XA(),s=P.useMemo(()=>({id:t,root:r,portalContext:a,uniqueId:i}),[t,r,a,i]),c=P.useRef();return _r(()=>()=>{n==null||n.remove()},[n,s]),_r(()=>{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=El("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&&!dr(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 yte(e){let{children:t,id:r,root:n=null,preserveTabOrder:o=!0}=e;const i=mte({id:r,root:n}),[a,s]=P.useState(null),c=P.useRef(null),l=P.useRef(null),u=P.useRef(null),d=P.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(n||i);return P.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function f(h){i&&kl(h)&&(h.type==="focusin"?pte:fte)(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]),P.createElement(YA.Provider,{value:P.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:c,afterOutsideRef:l,beforeInsideRef:u,afterInsideRef:d,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&P.createElement(Op,{"data-type":"outside",ref:c,onFocus:f=>{if(kl(f,i)){var h;(h=u.current)==null||h.focus()}else{const y=GA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus()}}}),p&&i&&P.createElement("span",{"aria-owns":i.id,style:Nv}),i&&ao.createPortal(t,i),p&&i&&P.createElement(Op,{"data-type":"outside",ref:l,onFocus:f=>{if(kl(f,i)){var h;(h=d.current)==null||h.focus()}else{const y=KA()||(a==null?void 0:a.refs.domReference.current);y==null||y.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,f.nativeEvent))}}}))}const XA=()=>P.useContext(YA),gte=P.forwardRef(function(t,r){return P.createElement("button",Ep({},t,{type:"button",ref:r,tabIndex:-1,style:Nv}))});function vte(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=lte()?i:!0,x=Ai(o),w=Ai(a),S=Ai(s),$=kp(),R=XA(),N=typeof a=="number"&&a<0,A=P.useRef(null),D=P.useRef(null),H=P.useRef(!1),U=P.useRef(null),Z=P.useRef(!1),L=R!=null,q=g&&g.getAttribute("role")==="combobox"&&SA(g)&&N,W=P.useCallback(function(B){return B===void 0&&(B=v),B?$v(B,Pv()):[]},[v]),J=P.useCallback(B=>{const Q=W(B);return x.current.map(T=>g&&T==="reference"?g:v&&T==="floating"?v:Q).filter(Boolean).flat()},[g,v,x,W]);P.useEffect(()=>{if(n||!c)return;function B(T){if(T.key==="Tab"){hn(v,Ci(Qn(v)))&&W().length===0&&!q&&Br(T);const ce=J(),pe=xA(T);x.current[0]==="reference"&&pe===g&&(Br(T),T.shiftKey?Jo(ce[ce.length-1]):Jo(ce[1])),x.current[1]==="floating"&&pe===v&&T.shiftKey&&(Br(T),Jo(ce[0]))}}const Q=Qn(v);return Q.addEventListener("keydown",B),()=>{Q.removeEventListener("keydown",B)}},[n,g,v,c,x,p,q,W,J]),P.useEffect(()=>{if(n||!u)return;function B(){Z.current=!0,setTimeout(()=>{Z.current=!1})}function Q(T){const ce=T.relatedTarget;queueMicrotask(()=>{const pe=!(hn(g,ce)||hn(v,ce)||hn(ce,v)||hn(R==null?void 0:R.portalNode,ce)||ce!=null&&ce.hasAttribute(El("focus-guard"))||$&&(Os($.nodesRef.current,f).find(he=>{var be,Ee;return hn((be=he.context)==null?void 0:be.elements.floating,ce)||hn((Ee=he.context)==null?void 0:Ee.elements.domReference,ce)})||ste($.nodesRef.current,f).find(he=>{var be,Ee;return((be=he.context)==null?void 0:be.elements.floating)===ce||((Ee=he.context)==null?void 0:Ee.elements.domReference)===ce})));ce&&pe&&!Z.current&&ce!==U.current&&(H.current=!0,h(!1,T))})}if(v&&Qr(g))return g.addEventListener("focusout",Q),g.addEventListener("pointerdown",B),!c&&v.addEventListener("focusout",Q),()=>{g.removeEventListener("focusout",Q),g.removeEventListener("pointerdown",B),!c&&v.removeEventListener("focusout",Q)}},[n,g,v,c,f,$,R,h,u]),P.useEffect(()=>{var B;if(n)return;const Q=Array.from((R==null||(B=R.portalNode)==null?void 0:B.querySelectorAll("["+El("portal")+"]"))||[]);if(v){const T=[v,...Q,A.current,D.current,x.current.includes("reference")||q?g:null].filter(pe=>pe!=null),ce=c?HA(T,b,!b):HA(T);return()=>{ce()}}},[n,g,v,c,x,R,q,b]),_r(()=>{if(n||!v)return;const B=Qn(v),Q=Ci(B);queueMicrotask(()=>{const T=J(v),ce=w.current,pe=(typeof ce=="number"?T[ce]:ce.current)||v,he=hn(v,Q);!N&&!he&&d&&Jo(pe,{preventScroll:pe===v})})},[n,d,v,N,J,w]),_r(()=>{if(n||!v)return;let B=!1;const Q=Qn(v),T=Ci(Q),ce=m.current;U.current=T;function pe(he){if(he.type==="escapeKey"&&p.domReference.current&&(U.current=p.domReference.current),["referencePress","escapeKey"].includes(he.type))return;const be=he.data.returnFocus;typeof be=="object"?(H.current=!1,B=be.preventScroll):H.current=!be}return y.on("dismiss",pe),()=>{y.off("dismiss",pe);const he=Ci(Q);(hn(v,he)||$&&Os($.nodesRef.current,f).some(Ee=>{var _e;return hn((_e=Ee.context)==null?void 0:_e.elements.floating,he)})||ce.openEvent&&["click","mousedown"].includes(ce.openEvent.type))&&p.domReference.current&&(U.current=p.domReference.current),S.current&&Qr(U.current)&&!H.current&&Jo(U.current,{cancelPrevious:!1,preventScroll:B})}},[n,v,S,m,p,y,$,f]),_r(()=>{if(!(n||!R))return R.setFocusManagerState({modal:c,closeOnFocusOut:u,open:d,onOpenChange:h,refs:p}),()=>{R.setFocusManagerState(null)}},[n,R,c,d,h,p,u]),_r(()=>{if(!n&&v&&typeof MutationObserver=="function"&&!N){const B=()=>{const T=v.getAttribute("tabindex");x.current.includes("floating")||Ci(Qn(v))!==p.domReference.current&&W().length===0?T!=="0"&&v.setAttribute("tabindex","0"):T!=="-1"&&v.setAttribute("tabindex","-1")};B();const Q=new MutationObserver(B);return Q.observe(v,{childList:!0,subtree:!0,attributes:!0}),()=>{Q.disconnect()}}},[n,v,p,x,W,N]);function M(B){return n||!l||!c?null:P.createElement(gte,{ref:B==="start"?A:D,onClick:Q=>h(!1,Q.nativeEvent)},typeof l=="string"?l:"Dismiss")}const E=!n&&b&&!q&&(L||c);return P.createElement(P.Fragment,null,E&&P.createElement(Op,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:B=>{if(c){const T=J();Jo(o[0]==="reference"?T[0]:T[T.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(H.current=!1,kl(B,R.portalNode)){const T=KA()||g;T==null||T.focus()}else{var Q;(Q=R.beforeOutsideRef.current)==null||Q.focus()}}}),!q&&M("start"),r,M("end"),E&&P.createElement(Op,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:B=>{if(c)Jo(J()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(H.current=!0),kl(B,R.portalNode)){const T=GA()||g;T==null||T.focus()}else{var Q;(Q=R.afterOutsideRef.current)==null||Q.focus()}}}))}function QA(e){return Qr(e.target)&&e.target.tagName==="BUTTON"}function eI(e){return SA(e)}function bte(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=P.useRef(),p=P.useRef(!1);return P.useMemo(()=>a?{reference:{onPointerDown(f){d.current=f.pointerType},onMouseDown(f){f.button===0&&(wA(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}wA(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||QA(f))&&(f.key===" "&&!eI(i)&&(f.preventDefault(),p.current=!0),f.key==="Enter"&&n(!(r&&c),f.nativeEvent))},onKeyUp(f){f.defaultPrevented||!u||QA(f)||eI(i)||f.key===" "&&p.current&&(p.current=!1,n(!(r&&c),f.nativeEvent))}}}:{},[a,o,s,l,u,i,c,r,n])}const wte=P["useInsertionEffect".toString()]||(e=>e());function Ii(e){const t=P.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return wte(()=>{t.current=e}),P.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 xte={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Ste={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},_te=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 Ete(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=kp(),b=ZA()!=null,x=Ii(typeof p=="function"?p:()=>!1),w=typeof p=="function"?x:p,S=P.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=_te(g),N=Ii(D=>{if(!r||!u||!d||D.key!=="Escape")return;const H=v?Os(v.nodesRef.current,i):[];if(!$&&(D.stopPropagation(),H.length>0)){let U=!0;if(H.forEach(Z=>{var L;if((L=Z.context)!=null&&L.open&&!Z.context.dataRef.current.__escapeKeyBubbles){U=!1;return}}),!U)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),n(!1,dee(D)?D.nativeEvent:D)}),A=Ii(D=>{const H=S.current;if(S.current=!1,H||typeof w=="function"&&!w(D))return;const U=xA(D),Z="["+El("inert")+"]",L=Qn(c).querySelectorAll(Z);let q=dr(U)?U:null;for(;q&&!wl(q);){const M=ya(q);if(M===Qn(c).body||!dr(M))break;q=M}if(L.length&&dr(U)&&!fee(U)&&!hn(U,c)&&Array.from(L).every(M=>!hn(q,M)))return;if(Qr(U)&&c){const M=U.clientWidth>0&&U.scrollWidth>U.clientWidth,E=U.clientHeight>0&&U.scrollHeight>U.clientHeight;let B=E&&D.offsetX>U.clientWidth;if(E&&$n(U).direction==="rtl"&&(B=D.offsetX<=U.offsetWidth-U.clientWidth),B||M&&D.offsetY>U.clientHeight)return}const W=v&&Os(v.nodesRef.current,i).some(M=>{var E;return Ev(D,(E=M.context)==null?void 0:E.elements.floating)});if(Ev(D,c)||Ev(D,s)||W)return;const J=v?Os(v.nodesRef.current,i):[];if(J.length>0){let M=!0;if(J.forEach(E=>{var B;if((B=E.context)!=null&&B.open&&!E.context.dataRef.current.__outsidePressBubbles){M=!1;return}}),!M)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:b?{preventScroll:!0}:gA(D)||vA(D)}}),n(!1,D)});return P.useEffect(()=>{if(!r||!u)return;l.current.__escapeKeyBubbles=$,l.current.__outsidePressBubbles=R;function D(Z){n(!1,Z)}const H=Qn(c);d&&H.addEventListener("keydown",N),w&&H.addEventListener(f,A);let U=[];return m&&(dr(s)&&(U=Oi(s)),dr(c)&&(U=U.concat(Oi(c))),!dr(a)&&a&&a.contextElement&&(U=U.concat(Oi(a.contextElement)))),U=U.filter(Z=>{var L;return Z!==((L=H.defaultView)==null?void 0:L.visualViewport)}),U.forEach(Z=>{Z.addEventListener("scroll",D,{passive:!0})}),()=>{d&&H.removeEventListener("keydown",N),w&&H.removeEventListener(f,A),U.forEach(Z=>{Z.removeEventListener("scroll",D)})}},[l,c,s,a,d,w,f,r,n,m,u,$,R,N,A]),P.useEffect(()=>{S.current=!1},[w,f]),P.useMemo(()=>u?{reference:{onKeyDown:N,[xte[y]]:D=>{h&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),n(!1,D.nativeEvent))}},floating:{onKeyDown:N,[Ste[f]]:()=>{S.current=!0}}}:{},[u,o,h,f,y,n,N])}let Mv;process.env.NODE_ENV!=="production"&&(Mv=new Set);function kte(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 $="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&&!dr(e.elements.reference)){var a;if(!((a=Mv)!=null&&a.has($))){var s;(s=Mv)==null||s.add($),console.error($)}}}const[c,l]=P.useState(null),u=((t=e.elements)==null?void 0:t.reference)||c,d=jee(e),p=kp(),f=Ii(($,R)=>{$&&(y.current.openEvent=R),n==null||n($,R)}),h=P.useRef(null),y=P.useRef({}),m=P.useState(()=>ote())[0],g=Iv(),v=P.useCallback($=>{const R=dr($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;d.refs.setReference(R)},[d.refs]),b=P.useCallback($=>{(dr($)||$===null)&&(h.current=$,l($)),(dr(d.refs.reference.current)||d.refs.reference.current===null||$!==null&&!dr($))&&d.refs.setReference($)},[d.refs]),x=P.useMemo(()=>({...d.refs,setReference:b,setPositionReference:v,domReference:h}),[d.refs,b,v]),w=P.useMemo(()=>({...d.elements,domReference:u}),[d.elements,u]),S=P.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 _r(()=>{const $=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);$&&($.context=S)}),P.useMemo(()=>({...d,context:S,refs:x,elements:w}),[d,x,w,S])}function jv(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 Tte(e){e===void 0&&(e=[]);const t=e,r=P.useCallback(i=>jv(i,e,"reference"),t),n=P.useCallback(i=>jv(i,e,"floating"),t),o=P.useCallback(i=>jv(i,e,"item"),e.map(i=>i==null?void 0:i.item));return P.useMemo(()=>({getReferenceProps:r,getFloatingProps:n,getItemProps:o}),[r,n,o])}let tI=!1;function Cp(e,t,r){switch(e){case"vertical":return t;case"horizontal":return r;default:return t||r}}function rI(e,t){return Cp(t,e===Ov||e===Sp,e===$s||e===Sl)}function Dv(e,t,r){return Cp(t,e===Sp,r?e===$s:e===Sl)||e==="Enter"||e==" "||e===""}function $te(e,t,r){return Cp(t,r?e===$s:e===Sl,e===Sp)}function nI(e,t,r){return Cp(t,r?e===Sl:e===$s,e===Ov)}function Ote(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:$=!0,virtualItemRef:R}=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 N=ZA(),A=kp(),D=Ii(l),H=P.useRef(g),U=P.useRef(d??-1),Z=P.useRef(null),L=P.useRef(!0),q=P.useRef(D),W=P.useRef(!!a),J=P.useRef(!1),M=P.useRef(!1),E=Ai(x),B=Ai(r),Q=Ai($),[T,ce]=P.useState(),[pe,he]=P.useState(),be=Ii(function(ye,le,te){te===void 0&&(te=!1);const ve=ye.current[le.current];ve&&(m?(ce(ve.id),A==null||A.events.emit("virtualfocus",ve),R&&(R.current=ve)):Jo(ve,{preventScroll:!0,sync:uee()&&bA()?tI||J.current:!1}),requestAnimationFrame(()=>{const Ce=Q.current;Ce&&ve&&(te||!L.current)&&(ve.scrollIntoView==null||ve.scrollIntoView(typeof Ce=="boolean"?{block:"nearest",inline:"nearest"}:Ce))}))});_r(()=>{document.createElement("div").focus({get preventScroll(){return tI=!0,!1}})},[]),_r(()=>{u&&(r&&a?H.current&&d!=null&&(M.current=!0,D(d)):W.current&&(U.current=-1,q.current(null)))},[u,r,a,d,D]),_r(()=>{if(u&&r&&a)if(c==null){if(J.current=!1,d!=null)return;if(W.current&&(U.current=-1,be(s,U)),!W.current&&H.current&&(Z.current!=null||H.current===!0&&Z.current==null)){let ye=0;const le=()=>{s.current[0]==null?(ye<2&&(ye?requestAnimationFrame:queueMicrotask)(le),ye++):(U.current=Z.current==null||Dv(Z.current,w,y)||h?Cv(s,E.current):BA(s,E.current),Z.current=null,D(U.current))};le()}}else _l(s,c)||(U.current=c,be(s,U,M.current),M.current=!1)},[u,r,a,c,d,h,s,w,y,D,be,E]),_r(()=>{var ye,le;if(!u||a||!A||m||!W.current)return;const te=A.nodesRef.current,ve=(ye=te.find(F=>F.id===N))==null||(le=ye.context)==null?void 0:le.elements.floating,Ce=Ci(Qn(a)),Ue=te.some(F=>F.context&&hn(F.context.elements.floating,Ce));ve&&!Ue&&L.current&&ve.focus({preventScroll:!0})},[u,a,A,N,m]),_r(()=>{if(!u||!A||!m||N)return;function ye(le){he(le.id),R&&(R.current=le)}return A.events.on("virtualfocus",ye),()=>{A.events.off("virtualfocus",ye)}},[u,A,m,N,R]),_r(()=>{q.current=D,W.current=!!a}),_r(()=>{r||(Z.current=null)},[r]);const Ee=c!=null,_e=P.useMemo(()=>{function ye(te){if(!r)return;const ve=s.current.indexOf(te);ve!==-1&&D(ve)}return{onFocus(te){let{currentTarget:ve}=te;ye(ve)},onClick:te=>{let{currentTarget:ve}=te;return ve.focus({preventScroll:!0})},...v&&{onMouseMove(te){let{currentTarget:ve}=te;ye(ve)},onPointerLeave(te){let{pointerType:ve}=te;!L.current||ve==="touch"||(U.current=-1,be(s,U),D(null),m||Jo(o.floating.current,{preventScroll:!0}))}}}},[r,o,be,v,s,D,m]);return P.useMemo(()=>{if(!u)return{};const ye=E.current;function le(F){if(L.current=!1,J.current=!0,!B.current&&F.currentTarget===o.floating.current)return;if(h&&nI(F.key,w,y)){Br(F),n(!1,F.nativeEvent),Qr(i)&&!m&&i.focus();return}const ue=U.current,we=Cv(s,ye),fe=BA(s,ye);if(F.key==="Home"&&(Br(F),U.current=we,D(U.current)),F.key==="End"&&(Br(F),U.current=fe,D(U.current)),!(S>1&&(U.current=tte(s,{event:F,orientation:w,loop:f,cols:S,disabledIndices:ye,minIndex:we,maxIndex:fe,prevIndex:U.current,stopEvent:!0}),D(U.current),w==="both"))&&rI(F.key,w)){if(Br(F),r&&!m&&Ci(F.currentTarget.ownerDocument)===F.currentTarget){U.current=Dv(F.key,w,y)?we:fe,D(U.current);return}Dv(F.key,w,y)?f?U.current=ue>=fe?p&&ue!==s.current.length?-1:we:en(s,{startingIndex:ue,disabledIndices:ye}):U.current=Math.min(fe,en(s,{startingIndex:ue,disabledIndices:ye})):f?U.current=ue<=we?p&&ue!==-1?s.current.length:fe:en(s,{startingIndex:ue,decrement:!0,disabledIndices:ye}):U.current=Math.max(we,en(s,{startingIndex:ue,decrement:!0,disabledIndices:ye})),_l(s,U.current)?D(null):D(U.current)}}function te(F){g==="auto"&&gA(F.nativeEvent)&&(H.current=!0)}function ve(F){H.current=g,g==="auto"&&vA(F.nativeEvent)&&(H.current=!0)}const Ce=m&&r&&Ee&&{"aria-activedescendant":pe||T},Ue=s.current.find(F=>(F==null?void 0:F.id)===T);return{reference:{...Ce,onKeyDown(F){L.current=!1;const ue=F.key.indexOf("Arrow")===0,we=$te(F.key,w,y),fe=nI(F.key,w,y),De=rI(F.key,w),Ie=(h?we:De)||F.key==="Enter"||F.key.trim()==="";if(m&&r){const K=A==null?void 0:A.nodesRef.current.find(X=>X.parentId==null),ae=A&&K?cte(A.nodesRef.current,K.id):null;if(ue&&ae&&R){const X=new KeyboardEvent("keydown",{key:F.key,bubbles:!0});if(we||fe){var je,ut;const me=((je=ae.context)==null?void 0:je.elements.domReference)===F.currentTarget,Oe=fe&&!me?(ut=ae.context)==null?void 0:ut.elements.domReference:we?Ue:null;Oe&&(Br(F),Oe.dispatchEvent(X),he(void 0))}if(De&&ae.context&&ae.context.open&&ae.parentId&&F.currentTarget!==ae.context.elements.domReference){var We;Br(F),(We=ae.context.elements.domReference)==null||We.dispatchEvent(X);return}}return le(F)}if(!(!r&&!b&&ue)){if(Ie&&(Z.current=h&&De?null:F.key),h){we&&(Br(F),r?(U.current=Cv(s,ye),D(U.current)):n(!0,F.nativeEvent));return}De&&(d!=null&&(U.current=d),Br(F),!r&&b?n(!0,F.nativeEvent):le(F),r&&D(U.current))}},onFocus(){r&&D(null)},onPointerDown:ve,onMouseDown:te,onClick:te},floating:{"aria-orientation":w==="both"?void 0:w,...Ce,onKeyDown:le,onPointerMove(){L.current=!0}},item:_e}},[i,o,T,pe,E,B,s,u,w,y,m,r,Ee,h,d,b,p,S,f,g,D,n,_e,A,R])}function Cte(e,t){t===void 0&&(t={});const{open:r,floatingId:n}=e,{enabled:o=!0,role:i="dialog"}=t,a=Iv();return P.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 Ate(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=P.useRef(),y=P.useRef(""),m=P.useRef((r=f??a)!=null?r:-1),g=P.useRef(null),v=Ii(s),b=Ii(c),x=Ai(u),w=Ai(p);return _r(()=>{n&&(clearTimeout(h.current),g.current=null,y.current="")},[n]),_r(()=>{if(n&&y.current===""){var S;m.current=(S=f??a)!=null?S:-1}},[n,f,a]),P.useMemo(()=>{if(!l)return{};function S(N){N?o.current.typing||(o.current.typing=N,b(N)):o.current.typing&&(o.current.typing=N,b(N))}function $(N,A,D){const H=x.current?x.current(A,D):A.find(U=>(U==null?void 0:U.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return H?N.indexOf(H):-1}function R(N){const A=i.current;if(y.current.length>0&&y.current[0]!==" "&&($(A,A,y.current)===-1?S(!1):N.key===" "&&Br(N)),A==null||w.current.includes(N.key)||N.key.length!==1||N.ctrlKey||N.metaKey||N.altKey)return;n&&N.key!==" "&&(Br(N),S(!0)),A.every(Z=>{var L,q;return Z?((L=Z[0])==null?void 0:L.toLocaleLowerCase())!==((q=Z[1])==null?void 0:q.toLocaleLowerCase()):!0})&&y.current===N.key&&(y.current="",m.current=g.current),y.current+=N.key,clearTimeout(h.current),h.current=setTimeout(()=>{y.current="",m.current=g.current,S(!1)},d);const H=m.current,U=$(A,[...A.slice((H||0)+1),...A.slice(0,(H||0)+1)],y.current);U!==-1?(v(U),g.current=U):N.key!==" "&&(y.current="",S(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(N){N.key===" "&&S(!1)}}}},[l,n,o,i,d,w,x,v,b])}const Ite=({options:e,label:t,reusable:r})=>{var q,W,J,M,E;const n=pt(B=>B.sendTextMessage),o=pt(B=>B.messageContainerRef),i=pt(B=>B.isReadOnly),[a,s]=P.useState(!1),[c,l]=P.useState(null),[u,d]=P.useState(null),{message:{blocks:{dropdown:p}}}=Wt,f=e.reduce((B,Q)=>(B[Q.label]=Q.value,B),{}),h=f?Object.keys(f):[],y=B=>{s(u!==null&&!r?!1:B)},{refs:m,floatingStyles:g,context:v}=kte({placement:"bottom-start",open:a,onOpenChange:y,whileElementsMounted:Nee,middleware:[yee(5),gee({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),vee({apply({rects:B,elements:Q,availableHeight:T}){Object.assign(Q.floating.style,{maxHeight:`${T}px`,minWidth:`${B.reference.width}px`})},padding:10})]}),b=P.useRef([]),x=P.useRef(h),w=P.useRef(!1),S=bte(v,{event:"mousedown"}),$=Ete(v),R=Cte(v,{role:"listbox"}),N=Ote(v,{listRef:b,activeIndex:c,selectedIndex:u,onNavigate:l,loop:!0}),A=Ate(v,{listRef:x,activeIndex:c,selectedIndex:u,onMatch:a?l:d,onTypingChange(B){w.current=B}}),{getReferenceProps:D,getFloatingProps:H,getItemProps:U}=Tte([$,R,N,A,S]),Z=B=>{d(B),n(f[h[B]]),s(!1)},L=u!==null?h[u]:void 0;return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{tabIndex:0,ref:m.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":u!==null&&!r?"":void 0,...(q=p.button)==null?void 0:q.container,...D(),children:[Y.jsx("span",{...(W=p.button)==null?void 0:W.text,children:L||t||"Select..."}),Y.jsx(nQ,{...(J=p.button)==null?void 0:J.icon})]}),a&&Y.jsx(yte,{children:Y.jsx(vte,{context:v,modal:!1,children:Y.jsx("div",{ref:m.setFloating,className:(E=(M=p.content)==null?void 0:M.container)==null?void 0:E.className,style:{...g},...H(),children:h.map((B,Q)=>{var T;return Y.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,...U({onClick(){i||Z(Q)},onKeyDown(ce){i||(ce.key==="Enter"&&(ce.preventDefault(),Z(Q)),ce.key===" "&&!w.current&&(ce.preventDefault(),Z(Q)))}}),children:B},B)})})})})]})},Rte=O.forwardRef(({type:e,title:t,url:r,...n},o)=>{const{message:{blocks:{file:i}}}=Wt;return Y.jsxs("a",{...n,...i.container,href:r,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[Y.jsx("p",{...i.title,children:t||r}),Y.jsx(iQ,{...i.icon})]})}),oI={audio:YX,bubble:HX,button:ZX,carousel:ree,column:lQ,dropdown:Ite,file:Rte,image:KX,location:cQ,row:uQ,text:z8,video:JX},As=({block:e,...t})=>{const n=pt(i=>i.renderers)[e.type]??oI[e.type],o={...t,...e};return Y.jsx(n,{...o})};function Pte({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 Nte=P.forwardRef(Pte);function Mte({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.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 jte=P.forwardRef(Mte);function Dte(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var Fte=O.useLayoutEffect,Lte=function(t){var r=P.useRef(t);return Fte(function(){r.current=t}),r},iI=function(t,r){if(typeof t=="function"){t(r);return}t.current=r},qte=function(t,r){var n=O.useRef();return O.useCallback(function(o){t.current=o,n.current&&iI(n.current,null),n.current=r,r&&iI(r,o)},[r])},aI={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},Bte=function(t){Object.keys(aI).forEach(function(r){t.style.setProperty(r,aI[r],"important")})},sI=Bte,cn=null,cI=function(t,r){var n=t.scrollHeight;return r.sizingStyle.boxSizing==="border-box"?n+r.borderSize:n-r.paddingSize};function Ute(e,t,r,n){r===void 0&&(r=1),n===void 0&&(n=1/0),cn||(cn=document.createElement("textarea"),cn.setAttribute("tabindex","-1"),cn.setAttribute("aria-hidden","true"),sI(cn)),cn.parentNode===null&&document.body.appendChild(cn);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var f=p;cn.style[f]=a[f]}),sI(cn),cn.value=t;var c=cI(cn,e);cn.value=t,c=cI(cn,e),cn.value="x";var l=cn.scrollHeight-o,u=l*r;s==="border-box"&&(u=u+o+i),c=Math.max(u,c);var d=l*n;return s==="border-box"&&(d=d+o+i),c=Math.min(d,c),[c,l]}var lI=function(){},zte=function(t,r){return t.reduce(function(n,o){return n[o]=r[o],n},{})},Zte=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],Vte=!!document.documentElement.currentStyle,Hte=function(t){var r=window.getComputedStyle(t);if(r===null)return null;var n=zte(Zte,r),o=n.boxSizing;if(o==="")return null;Vte&&o==="border-box"&&(n.width=parseFloat(n.width)+parseFloat(n.borderRightWidth)+parseFloat(n.borderLeftWidth)+parseFloat(n.paddingRight)+parseFloat(n.paddingLeft)+"px");var i=parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),a=parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth);return{sizingStyle:n,paddingSize:i,borderSize:a}},Wte=Hte;function uI(e,t,r){var n=Lte(r);P.useLayoutEffect(function(){var o=function(a){return n.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var Kte=function(t){uI(window,"resize",t)},Gte=function(t){uI(document.fonts,"loadingdone",t)},Jte=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],Yte=function(t,r){var n=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?lI:a,c=t.onHeightChange,l=c===void 0?lI:c,u=Dte(t,Jte),d=u.value!==void 0,p=P.useRef(null),f=qte(p,r),h=P.useRef(0),y=P.useRef(),m=function(){var b=p.current,x=n&&y.current?y.current:Wte(b);if(x){y.current=x;var w=Ute(x,b.value||b.placeholder||"x",i,o),S=w[0],$=w[1];h.current!==S&&(h.current=S,b.style.setProperty("height",S+"px","important"),l(S,{rowHeight:$}))}},g=function(b){d||m(),s(b)};return P.useLayoutEffect(m),Kte(m),Gte(m),P.createElement("textarea",li({},u,{onChange:g,ref:f}))},Xte=P.forwardRef(Yte);const dI=O.memo(O.forwardRef(({children:e,...t},r)=>{const{composer:n}=Wt,o=pt($=>$.disableComposer),i=pt($=>$.setIsTyping),a=pt($=>$.isReadOnly),s=pt($=>$.sendFile),c=pt($=>$.addMessage),l=pt($=>$.sendTextMessage),u=pt($=>$.allowFileUpload),{composerPlaceholder:d,showPoweredBy:p}=nA(),[f,h]=O.useState(""),[y,m]=O.useState(-1),g=O.useRef(null),v=En($=>$.user),b=En($=>$.messageHistory);if(a)return null;const x=()=>{var $;g.current&&(($=g.current)==null||$.click())},w=async $=>{var N;const R=(N=$.target.files)==null?void 0:N[0];if(R)try{const{fileUrl:A,type:D}=await s(R)??"";c({direction:"outgoing",sender:{name:"You"},timestamp:new Date,disableInput:!1,block:{type:D,url:A}})}catch(A){console.error("Error sending file:",A)}},S=()=>{f&&(l(f),setTimeout(()=>i(!0,9e3),500),h(""),m(-1))};return Y.jsxs(Y.Fragment,{children:[Y.jsxs("div",{"data-disabled":o,...t,...n.container,ref:r,children:[u&&Y.jsxs(Y.Fragment,{children:[Y.jsx("button",{type:"button",disabled:o,...n.uploadButton.container,onClick:x,children:Y.jsx(jte,{...n.uploadButton.icon})}),Y.jsx("input",{type:"file",ref:g,style:{display:"none"},onChange:w})]}),Y.jsx(Xte,{...n==null?void 0:n.input,placeholder:d??"Type your message...",disabled:o,value:f,"data-has-value":!!f,onChange:$=>h($.target.value),maxRows:5,onKeyDown:$=>{if(!o){if($.key==="Enter"&&$.shiftKey?($.preventDefault(),h(`${f}
|
|
360
|
+
`)):$.key==="Enter"&&($.preventDefault(),S()),$.key==="ArrowUp"){$.preventDefault();const R=b[(v==null?void 0:v.userId)??""]??[];y<R.length-1&&h(R[y+1]),m(()=>Math.min(y+1,R.length-1))}if($.key==="ArrowDown"){$.preventDefault();const R=b[(v==null?void 0:v.userId)??""]??[];h(y===0?"":R[y-1]),m(()=>Math.max(y-1,-1))}}}}),Y.jsx("button",{type:"button",...n.button.container,disabled:!f||o,onClick:S,children:Y.jsx(Nte,{...n.button.icon})})]}),Y.jsx("a",{...n.poweredBy,"data-hidden":p===!1,hidden:p===!1,href:"https://botpress.com",target:"_blank",rel:"noopener noreferrer",children:"⚡ by Botpress"})]})})),fI=({children:e})=>{const[t,r]=O.useState(!1),[n,o]=O.useState(""),[i,a]=O.useState(null),s=({title:l,content:u})=>{o(l),a(u),r(!0)},c=()=>{r(!1)};return Y.jsxs(eA.Provider,{value:{hideModal:c,showModal:s,title:n,content:i,open:t},children:[Y.jsx(Pi,{open:t,onOpenChange:r,children:Y.jsx(Pi.Content,{title:n,children:i})}),e]})},i1e="",Qte=({children:e,...t})=>{const r=O.useRef(),n=O.useRef(null),o=zX({...t,messageContainerRef:n});return r.current||(r.current=o),Y.jsx(rA.Provider,{value:{...t.configuration},children:Y.jsx(XC.Provider,{value:r.current,children:Y.jsx(ere,{children:e})})})},ere=({children:e})=>{const t=pt(g=>g.client),r=pt(g=>g.addMessage),n=pt(g=>g.setMessages),o=pt(g=>g.configuration),i=pt(g=>g.setConnected),a=pt(g=>g.userData),s=pt(g=>g.userName),c=pt(g=>g.userPictureUrl),l=pt(g=>g.setIsTyping),u=pt(g=>g.getMessages),d=En(g=>g.setConversationId),p=En(g=>g.user),f=En(g=>g.conversationId),h=En(g=>g.setUser),[y,m]=O.useState(0);return O.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]),O.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]),O.useEffect(()=>{if(t)return t.on("conversation",g=>{d(g)})},[]),qC(async()=>{if(t)return t.on("error",()=>{m(g=>g+1)})}),qC(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:$,id:R}=b,N=w===t.userId?"outgoing":"incoming";v.push({id:R,direction:N,sender:N==="outgoing"?{name:"You"}:{name:o.botName??"Bot",avatar:o.botAvatar},timestamp:new Date(S),block:x,disableInput:$})}catch{console.error("Invalid message payload")}return n(v.reverse()),()=>{t.disconnect()}},[y,f]),Y.jsx(Y.Fragment,{children:e})};function Yo(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 tre=P["useId".toString()]||(()=>{});let rre=0;function Ap(e){const[t,r]=P.useState(tre());return Tc(()=>{e||r(n=>n??String(rre++))},[e]),e||(t?`radix-${t}`:"")}function pI({prop:e,defaultProp:t,onChange:r=()=>{}}){const[n,o]=nre({defaultProp:t,onChange:r}),i=e!==void 0,a=i?e:n,s=ci(r),c=O.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 nre({defaultProp:e,onChange:t}){const r=O.useState(e),[n]=r,o=O.useRef(n),i=ci(t);return O.useEffect(()=>{o.current!==n&&(i(n),o.current=n)},[n,o,i]),r}function ore(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e);O.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n),()=>t.removeEventListener("keydown",n)},[r,t])}const Fv="dismissableLayer.update",ire="dismissableLayer.pointerDownOutside",are="dismissableLayer.focusOutside";let hI;const sre=O.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),cre=O.forwardRef((e,t)=>{var r;const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=e,u=O.useContext(sre),[d,p]=O.useState(null),f=(r=d==null?void 0:d.ownerDocument)!==null&&r!==void 0?r:globalThis==null?void 0:globalThis.document,[,h]=O.useState({}),y=Ki(t,R=>p(R)),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=lre(R=>{const N=R.target,A=[...u.branches].some(D=>D.contains(N));!w||A||(i==null||i(R),s==null||s(R),R.defaultPrevented||c==null||c())},f),$=ure(R=>{const N=R.target;[...u.branches].some(D=>D.contains(N))||(a==null||a(R),s==null||s(R),R.defaultPrevented||c==null||c())},f);return ore(R=>{b===u.layers.size-1&&(o==null||o(R),!R.defaultPrevented&&c&&(R.preventDefault(),c()))},f),O.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hI=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),mI(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=hI)}},[d,f,n,u]),O.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),mI())},[d,u]),O.useEffect(()=>{const R=()=>h({});return document.addEventListener(Fv,R),()=>document.removeEventListener(Fv,R)},[]),O.createElement(Nn.div,li({},l,{ref:y,style:{pointerEvents:x?w?"auto":"none":void 0,...e.style},onFocusCapture:Yo(e.onFocusCapture,$.onFocusCapture),onBlurCapture:Yo(e.onBlurCapture,$.onBlurCapture),onPointerDownCapture:Yo(e.onPointerDownCapture,S.onPointerDownCapture)}))});function lre(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e),n=O.useRef(!1),o=O.useRef(()=>{});return O.useEffect(()=>{const i=s=>{if(s.target&&!n.current){let l=function(){yI(ire,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 ure(e,t=globalThis==null?void 0:globalThis.document){const r=ci(e),n=O.useRef(!1);return O.useEffect(()=>{const o=i=>{i.target&&!n.current&&yI(are,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 mI(){const e=new CustomEvent(Fv);document.dispatchEvent(e)}function yI(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?UU(o,i):o.dispatchEvent(i)}const Lv="focusScope.autoFocusOnMount",qv="focusScope.autoFocusOnUnmount",gI={bubbles:!1,cancelable:!0},dre=O.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,c]=O.useState(null),l=ci(o),u=ci(i),d=O.useRef(null),p=Ki(t,y=>c(y)),f=O.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;O.useEffect(()=>{if(n){let y=function(b){if(f.paused||!s)return;const x=b.target;s.contains(x)?d.current=x:Ri(d.current,{select:!0})},m=function(b){if(f.paused||!s)return;const x=b.relatedTarget;x!==null&&(s.contains(x)||Ri(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)||Ri(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]),O.useEffect(()=>{if(s){wI.add(f);const y=document.activeElement;if(!s.contains(y)){const g=new CustomEvent(Lv,gI);s.addEventListener(Lv,l),s.dispatchEvent(g),g.defaultPrevented||(fre(gre(vI(s)),{select:!0}),document.activeElement===y&&Ri(s))}return()=>{s.removeEventListener(Lv,l),setTimeout(()=>{const g=new CustomEvent(qv,gI);s.addEventListener(qv,u),s.dispatchEvent(g),g.defaultPrevented||Ri(y??document.body,{select:!0}),s.removeEventListener(qv,u),wI.remove(f)},0)}}},[s,l,u,f]);const h=O.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]=pre(v);b&&x?!y.shiftKey&&g===x?(y.preventDefault(),r&&Ri(b,{select:!0})):y.shiftKey&&g===b&&(y.preventDefault(),r&&Ri(x,{select:!0})):g===v&&y.preventDefault()}},[r,n,f.paused]);return O.createElement(Nn.div,li({tabIndex:-1},a,{ref:p,onKeyDown:h}))});function fre(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(Ri(n,{select:t}),document.activeElement!==r)return}function pre(e){const t=vI(e),r=bI(t,e),n=bI(t.reverse(),e);return[r,n]}function vI(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 bI(e,t){for(const r of e)if(!hre(r,{upTo:t}))return r}function hre(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 mre(e){return e instanceof HTMLInputElement&&"select"in e}function Ri(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&mre(e)&&t&&e.select()}}const wI=yre();function yre(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=xI(e,t),e.unshift(t)},remove(t){var r;e=xI(e,t),(r=e[0])===null||r===void 0||r.resume()}}}function xI(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function gre(e){return e.filter(t=>t.tagName!=="A")}function vre(e,t){return O.useReducer((r,n)=>{const o=t[r][n];return o??r},e)}const Ip=e=>{const{present:t,children:r}=e,n=bre(t),o=typeof r=="function"?r({present:n.isPresent}):O.Children.only(r),i=Ki(n.ref,o.ref);return typeof r=="function"||n.isPresent?O.cloneElement(o,{ref:i}):null};Ip.displayName="Presence";function bre(e){const[t,r]=O.useState(),n=O.useRef({}),o=O.useRef(e),i=O.useRef("none"),a=e?"mounted":"unmounted",[s,c]=vre(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return O.useEffect(()=>{const l=Rp(n.current);i.current=s==="mounted"?l:"none"},[s]),Tc(()=>{const l=n.current,u=o.current;if(u!==e){const p=i.current,f=Rp(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]),Tc(()=>{if(t){const l=d=>{const f=Rp(n.current).includes(d.animationName);d.target===t&&f&&ao.flushSync(()=>c("ANIMATION_END"))},u=d=>{d.target===t&&(i.current=Rp(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:O.useCallback(l=>{l&&(n.current=getComputedStyle(l)),r(l)},[])}}function Rp(e){return(e==null?void 0:e.animationName)||"none"}let Bv=0;function wre(){O.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:SI()),document.body.insertAdjacentElement("beforeend",(t=r[1])!==null&&t!==void 0?t:SI()),Bv++,()=>{Bv===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Bv--}},[])}function SI(){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 _o=function(){return _o=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},_o.apply(this,arguments)};function _I(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 xre(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 Pp="right-scroll-bar-position",Np="width-before-scroll-bar",Sre="with-scroll-bars-hidden",_re="--removed-body-scroll-bar-size";function Ere(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function kre(e,t){var r=O.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 Tre(e,t){return kre(t||null,function(r){return e.forEach(function(n){return Ere(n,r)})})}function $re(e){return e}function Ore(e,t){t===void 0&&(t=$re);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 Cre(e){e===void 0&&(e={});var t=Ore(null);return t.options=_o({async:!0,ssr:!1},e),t}var EI=function(e){var t=e.sideCar,r=_I(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 P.createElement(n,_o({},r))};EI.isSideCarExport=!0;function Are(e,t){return e.useMedium(t),EI}var kI=Cre(),Uv=function(){},Mp=P.forwardRef(function(e,t){var r=P.useRef(null),n=P.useState({onScrollCapture:Uv,onWheelCapture:Uv,onTouchMoveCapture:Uv}),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=_I(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),b=p,x=Tre([r,t]),w=_o(_o({},v),o);return P.createElement(P.Fragment,null,u&&P.createElement(b,{sideCar:kI,removeScrollBar:l,shards:d,noIsolation:f,inert:h,setCallbacks:i,allowPinchZoom:!!y,lockRef:r}),a?P.cloneElement(P.Children.only(s),_o(_o({},w),{ref:x})):P.createElement(g,_o({},w,{className:c,ref:x}),s))});Mp.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Mp.classNames={fullWidth:Np,zeroRight:Pp};var TI,Ire=function(){if(TI)return TI;if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Rre(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ire();return t&&e.setAttribute("nonce",t),e}function Pre(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Nre(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Mre=function(){var e=0,t=null;return{add:function(r){e==0&&(t=Rre())&&(Pre(t,r),Nre(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jre=function(){var e=Mre();return function(t,r){P.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},$I=function(){var e=jre(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},Dre={left:0,top:0,right:0,gap:0},zv=function(e){return parseInt(e||"",10)||0},Fre=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[zv(r),zv(n),zv(o)]},Lre=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dre;var t=Fre(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])}},qre=$I(),Bre=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(Sre,` {
|
|
362
362
|
overflow: hidden `).concat(n,`;
|
|
363
363
|
padding-right: `).concat(s,"px ").concat(n,`;
|
|
@@ -397,7 +397,7 @@ to {
|
|
|
397
397
|
`)},Ure=function(e){var t=e.noRelative,r=e.noImportant,n=e.gapMode,o=n===void 0?"margin":n,i=P.useMemo(function(){return Lre(o)},[o]);return P.createElement(qre,{styles:Bre(i,!t,o,r?"":"!important")})},Zv=!1;if(typeof window<"u")try{var jp=Object.defineProperty({},"passive",{get:function(){return Zv=!0,!0}});window.addEventListener("test",jp,jp),window.removeEventListener("test",jp,jp)}catch{Zv=!1}var Is=Zv?{passive:!1}:!1,zre=function(e){return e.tagName==="TEXTAREA"},OI=function(e,t){var r=window.getComputedStyle(e);return r[t]!=="hidden"&&!(r.overflowY===r.overflowX&&!zre(e)&&r[t]==="visible")},Zre=function(e){return OI(e,"overflowY")},Vre=function(e){return OI(e,"overflowX")},CI=function(e,t){var r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var n=AI(e,r);if(n){var o=II(e,r),i=o[1],a=o[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==document.body);return!1},Hre=function(e){var t=e.scrollTop,r=e.scrollHeight,n=e.clientHeight;return[t,r,n]},Wre=function(e){var t=e.scrollLeft,r=e.scrollWidth,n=e.clientWidth;return[t,r,n]},AI=function(e,t){return e==="v"?Zre(t):Vre(t)},II=function(e,t){return e==="v"?Hre(t):Wre(t)},Kre=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gre=function(e,t,r,n,o){var i=Kre(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=II(e,s),h=f[0],y=f[1],m=f[2],g=y-m-i*h;(h||g)&&AI(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},Dp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},RI=function(e){return[e.deltaX,e.deltaY]},PI=function(e){return e&&"current"in e?e.current:e},Jre=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yre=function(e){return`
|
|
398
398
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
399
399
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
400
|
-
`)},Xre=0,Rs=[];function Qre(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),o=P.useState(Xre++)[0],i=P.useState(function(){return $I()})[0],a=P.useRef(e);P.useEffect(function(){a.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=xre([e.lockRef.current],(e.shards||[]).map(PI),!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=P.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var g=Dp(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,$=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&$==="h"&&S.type==="range")return!1;var R=CI($,S);if(!R)return!0;if(R?w=$:(w=$==="v"?"h":"v",R=CI($,S)),!R)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=w),!w)return!0;var N=n.current||w;return Gre(N,m,y,N==="h"?b:x,!0)},[]),c=P.useCallback(function(y){var m=y;if(!(!Rs.length||Rs[Rs.length-1]!==i)){var g="deltaY"in m?RI(m):Dp(m),v=t.current.filter(function(w){return w.name===m.type&&w.target===m.target&&Jre(w.delta,g)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var b=(a.current.shards||[]).map(PI).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=P.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=P.useCallback(function(y){r.current=Dp(y),n.current=void 0},[]),d=P.useCallback(function(y){l(y.type,RI(y),y.target,s(y,e.lockRef.current))},[]),p=P.useCallback(function(y){l(y.type,Dp(y),y.target,s(y,e.lockRef.current))},[]);P.useEffect(function(){return Rs.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Is),document.addEventListener("touchmove",c,Is),document.addEventListener("touchstart",u,Is),function(){Rs=Rs.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Is),document.removeEventListener("touchmove",c,Is),document.removeEventListener("touchstart",u,Is)}},[]);var f=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(i,{styles:Yre(o)}):null,f?P.createElement(Ure,{gapMode:"margin"}):null)}const ene=Are(kI,Qre);var NI=P.forwardRef(function(e,t){return P.createElement(Mp,_o({},e,{ref:t,sideCar:ene}))});NI.classNames=Mp.classNames;const tne=NI;var rne=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ps=new WeakMap,Fp=new WeakMap,Lp={},Vv=0,MI=function(e){return e&&(e.host||MI(e.parentNode))},nne=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=MI(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})},one=function(e,t,r,n){var o=nne(t,Array.isArray(e)?e:[e]);Lp[r]||(Lp[r]=new WeakMap);var i=Lp[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=(Ps.get(p)||0)+1,m=(i.get(p)||0)+1;Ps.set(p,y),i.set(p,m),a.push(p),y===1&&h&&Fp.set(p,!0),m===1&&p.setAttribute(r,"true"),h||p.setAttribute(n,"true")}})};return u(t),s.clear(),Vv++,function(){a.forEach(function(d){var p=Ps.get(d)-1,f=i.get(d)-1;Ps.set(d,p),i.set(d,f),p||(Fp.has(d)||d.removeAttribute(n),Fp.delete(d)),f||d.removeAttribute(r)}),Vv--,Vv||(Ps=new WeakMap,Ps=new WeakMap,Fp=new WeakMap,Lp={})}},ine=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||rne(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),one(n,o,r,"aria-hidden")):function(){return null}};const jI="Dialog",[DI,a1e]=ay(jI),[ane,Xo]=DI(jI),sne=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=O.useRef(null),c=O.useRef(null),[l=!1,u]=pI({prop:n,defaultProp:o,onChange:i});return O.createElement(ane,{scope:t,triggerRef:s,contentRef:c,contentId:Ap(),titleId:Ap(),descriptionId:Ap(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(d=>!d),[u]),modal:a},r)},cne="DialogTrigger",lne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(cne,r),i=Ki(t,o.triggerRef);return O.createElement(Nn.button,wr({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wv(o.open)},n,{ref:i,onClick:Yo(e.onClick,o.onOpenToggle)}))}),une="DialogPortal",[s1e,FI]=DI(une,{forceMount:void 0}),Hv="DialogOverlay",dne=O.forwardRef((e,t)=>{const r=FI(Hv,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Xo(Hv,e.__scopeDialog);return i.modal?O.createElement(Ip,{present:n||i.open},O.createElement(fne,wr({},o,{ref:t}))):null}),fne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(Hv,r);return O.createElement(tne,{as:sy,allowPinchZoom:!0,shards:[o.contentRef]},O.createElement(Nn.div,wr({"data-state":Wv(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Tl="DialogContent",pne=O.forwardRef((e,t)=>{const r=FI(Tl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Xo(Tl,e.__scopeDialog);return O.createElement(Ip,{present:n||i.open},i.modal?O.createElement(hne,wr({},o,{ref:t})):O.createElement(mne,wr({},o,{ref:t})))}),hne=O.forwardRef((e,t)=>{const r=Xo(Tl,e.__scopeDialog),n=O.useRef(null),o=Ki(t,r.contentRef,n);return O.useEffect(()=>{const i=n.current;if(i)return ine(i)},[]),O.createElement(LI,wr({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yo(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Yo(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Yo(e.onFocusOutside,i=>i.preventDefault())}))}),mne=O.forwardRef((e,t)=>{const r=Xo(Tl,e.__scopeDialog),n=O.useRef(!1),o=O.useRef(!1);return O.createElement(LI,wr({},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=O.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Xo(Tl,r),c=O.useRef(null),l=Ki(t,c);return wre(),O.createElement(O.Fragment,null,O.createElement(dre,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},O.createElement(cre,wr({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Wv(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),yne="DialogTitle",gne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(yne,r);return O.createElement(Nn.h2,wr({id:o.titleId},n,{ref:t}))}),vne="DialogClose",bne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(vne,r);return O.createElement(Nn.button,wr({type:"button"},n,{ref:t,onClick:Yo(e.onClick,()=>o.onOpenChange(!1))}))});function Wv(e){return e?"open":"closed"}const wne=sne,xne=lne,Sne=dne,_ne=pne,Ene=gne,qI=bne;function kne({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const BI=P.forwardRef(kne);function Pi({open:e,onOpenChange:t,children:r}){return Y.jsx(wne,{open:e,onOpenChange:t,children:r})}function Tne({title:e,children:t}){var n,o,i,a,s,c,l,u;const{modal:r}=Jt;return Y.jsxs(Y.Fragment,{children:[Y.jsx(Sne,{...r==null?void 0:r.overlay}),Y.jsx("div",{...r==null?void 0:r.container,children:Y.jsxs(_ne,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[Y.jsxs("div",{...(i=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[Y.jsx(Ene,{...(s=(a=r==null?void 0:r.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),Y.jsx(qI,{children:Y.jsx(BI,{role:"button",tabIndex:0,...(l=(c=r==null?void 0:r.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),Y.jsx("div",{...(u=r==null?void 0:r.dialog)==null?void 0:u.content,children:t})]})})]})}Pi.Button=xne,Pi.Close=qI,Pi.Content=Tne;const UI=O.forwardRef(({children:e,...t},r)=>{const{container:n}=Jt;return Y.jsxs("div",{...t,...n,ref:r,children:[Y.jsx(gX,{}),Y.jsxs(fI,{children:[Y.jsx($ne,{}),e]})]})}),$ne=()=>{const{modal:e}=Jt,t=pt(n=>n.connected),{showModal:r}=tA();return O.useEffect(()=>{var n,o,i,a;t||r({title:"Connection Error",content:Y.jsxs(Y.Fragment,{children:[Y.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."}),Y.jsx(Pi.Close,{asChild:!0,children:Y.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]),Y.jsx(Y.Fragment,{})},One=O.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:o}=Jt,{container:i,icon:a}=o??{};return Y.jsx("div",{...r,...i,ref:n,onClick:t,children:Y.jsx("div",{...a})})}),zI="Collapsible",[Cne,l1e]=ay(zI),[Ane,Kv]=Cne(zI),Ine=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=pI({prop:n,defaultProp:o,onChange:a});return O.createElement(Ane,{scope:r,disabled:i,contentId:Ap(),open:c,onOpenToggle:O.useCallback(()=>l(u=>!u),[l])},O.createElement(Nn.div,wr({"data-state":Gv(c),"data-disabled":i?"":void 0},s,{ref:t})))}),Rne="CollapsibleTrigger",Pne=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Kv(Rne,r);return O.createElement(Nn.button,wr({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Gv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:Yo(e.onClick,o.onOpenToggle)}))}),ZI="CollapsibleContent",Nne=O.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Kv(ZI,e.__scopeCollapsible);return O.createElement(Ip,{present:r||o.open},({present:i})=>O.createElement(Mne,wr({},n,{ref:t,present:i})))}),Mne=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=Kv(ZI,r),[s,c]=O.useState(n),l=O.useRef(null),u=Ki(t,l),d=O.useRef(0),p=d.current,f=O.useRef(0),h=f.current,y=a.open||s,m=O.useRef(y),g=O.useRef();return O.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),Tc(()=>{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]),O.createElement(Nn.div,wr({"data-state":Gv(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 Gv(e){return e?"open":"closed"}const jne=Ine,Dne=Nne,Fne=e=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},P.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"})),VI=({...e})=>{var a,s;const{header:t,modal:r}=Jt,n=pt(c=>c.restartConversation),{showModal:o}=tA(),i=c=>{var l,u,d,p;c.stopPropagation(),o({title:"Restart Conversation",content:Y.jsxs(Y.Fragment,{children:[Y.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?"}),Y.jsx(Pi.Close,{asChild:!0,children:Y.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 Y.jsx(tQ,{...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)}})},Lne=({...e})=>{const{header:t}=Jt,r=pt(o=>o.closeWindow),n=o=>{o.stopPropagation(),r==null||r()};return Y.jsx(BI,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{o.key==="Enter"&&n(o)}})},$l=({icon:e,title:t,link:r,...n})=>{var a,s,c,l,u,d,p,f,h,y,m,g;const{header:o}=Jt,i=e??Fne;return t?r?Y.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:[Y.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),Y.jsx("p",{...(d=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:d.link,children:t})]}):Y.jsxs("div",{...n,...(f=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:f.container,children:[Y.jsx(i,{...(y=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.icon}),Y.jsx("p",{...(g=(m=o.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:g.text,children:t})]}):null},HI=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var p,f,h,y,m,g,v,b,x,w,S,$,R,N,A,D,H,U,Z,L,q,W;const{header:o}=Jt,i=pt(J=>J.configuration),a=pt(J=>J.closeWindow),s=pt(J=>J.getClientId)(),c=pt(J=>!J.disableRestartConversation),[l,u]=O.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 Y.jsxs(jne,{open:d?l:!1,onOpenChange:u,"data-disabled":d?void 0:"",...o.container,...n,children:[Y.jsxs(Pne,{...o.content.container,children:[Y.jsx(gy,{...n,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),Y.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&Y.jsx("p",{...o.content.description,children:i.botDescription}),Y.jsxs("div",{...o.content.actions.container,children:[c&&Y.jsx(VI,{}),a&&Y.jsx(Lne,{})]})]}),Y.jsxs(Dne,{...o.expandedContent.container,children:[Y.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[Y.jsx($l,{"data-email":"",icon:GQ,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}`}),Y.jsx($l,{"data-phone":"",icon:tee,title:(S=i.phone)==null?void 0:S.title,link:(R=($=i.phone)==null?void 0:$.link)!=null&&R.startsWith("tel:")?(N=i.phone)==null?void 0:N.link:`tel:${(A=i.phone)==null?void 0:A.link}`}),Y.jsx($l,{"data-website":"",link:(D=i.website)==null?void 0:D.link,icon:YQ,title:(H=i.website)==null?void 0:H.title})]}),Y.jsxs("div",{"data-legal":"",...(U=o.expandedContent)==null?void 0:U.group,children:[Y.jsx($l,{"data-terms":"",link:(Z=i.termsOfService)==null?void 0:Z.link,icon:WQ,title:(L=i.termsOfService)==null?void 0:L.title}),Y.jsx($l,{"data-privacy":"",link:(q=i.privacyPolicy)==null?void 0:q.link,icon:QQ,title:(W=i.privacyPolicy)==null?void 0:W.title})]})]})]})},WI=O.memo(({...e})=>{const{typingIndicator:t}=Jt;return Y.jsx("div",{...e,...t==null?void 0:t.container,children:Y.jsx("div",{...t==null?void 0:t.loader})})}),Jv=O.memo(O.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:o,sender:i,...a},s)=>{var y,m,g,v;const[c,l]=O.useState([]),{message:u}=Jt,{botAvatar:d,botName:p}=pt(b=>b.configuration),f=pt(b=>b.getClientId)(),h=tk(f??"",15);return Y.jsx(QC.Provider,{value:{isLoading:c,setIsLoading:l},children:Y.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:s,children:[Y.jsxs(ZE,{"data-color":h,...(y=u==null?void 0:u.avatar)==null?void 0:y.container,children:[Y.jsx(VE,{...(m=u==null?void 0:u.avatar)==null?void 0:m.image,src:(i==null?void 0:i.avatar)??d}),Y.jsx(HE,{...(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&&Y.jsx(As,{block:t}),o]})})}));function qne(){const e=pt(n=>n.getClientId)(),t=pt(n=>n.configuration),{messageList:{marquee:r}}=Jt;return Y.jsxs("li",{...r.container,children:[Y.jsx(gy,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),Y.jsxs("div",{...r.content,children:[Y.jsx("h1",{...r.title,children:t.botName||"Bot"}),Y.jsx("p",{...r.description,children:t.botDescription})]})]})}function Bne(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 Une(){Bne("react-scroll-to-bottom:version","4.2.0")}var Ol=function(e){return e&&e.Math===Math&&e},Er=Ol(typeof globalThis=="object"&&globalThis)||Ol(typeof window=="object"&&window)||Ol(typeof self=="object"&&self)||Ol(typeof He=="object"&&He)||Ol(typeof He=="object"&&He)||function(){return this}()||Function("return this")(),kr=function(e){try{return!!e()}catch{return!0}},zne=kr,qp=!zne(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zne=qp,KI=Function.prototype,GI=KI.apply,JI=KI.call,Yv=typeof Reflect=="object"&&Reflect.apply||(Zne?JI.bind(GI):function(){return JI.apply(GI,arguments)}),YI=qp,XI=Function.prototype,Xv=XI.call,Vne=YI&&XI.bind.bind(Xv,Xv),Tr=YI?Vne:function(e){return function(){return Xv.apply(e,arguments)}},QI=Tr,Hne=QI({}.toString),Wne=QI("".slice),va=function(e){return Wne(Hne(e),8,-1)},Kne=va,Gne=Tr,Qv=function(e){if(Kne(e)==="Function")return Gne(e)},eb=typeof document=="object"&&document.all,tn=typeof eb>"u"&&eb!==void 0?function(e){return typeof e=="function"||e===eb}:function(e){return typeof e=="function"},Cl={},Jne=kr,mn=!Jne(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Yne=qp,Bp=Function.prototype.call,Eo=Yne?Bp.bind(Bp):function(){return Bp.apply(Bp,arguments)},tb={},eR={}.propertyIsEnumerable,tR=Object.getOwnPropertyDescriptor,Xne=tR&&!eR.call({1:2},1);tb.f=Xne?function(t){var r=tR(this,t);return!!r&&r.enumerable}:eR;var Al=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Qne=Tr,eoe=kr,toe=va,rb=Object,roe=Qne("".split),rR=eoe(function(){return!rb("z").propertyIsEnumerable(0)})?function(e){return toe(e)==="String"?roe(e,""):rb(e)}:rb,nb=function(e){return e==null},noe=nb,ooe=TypeError,ob=function(e){if(noe(e))throw new ooe("Can't call method on "+e);return e},ioe=rR,aoe=ob,ko=function(e){return ioe(aoe(e))},soe=tn,Qo=function(e){return typeof e=="object"?e!==null:soe(e)},Ur={},ib=Ur,ab=Er,coe=tn,nR=function(e){return coe(e)?e:void 0},To=function(e,t){return arguments.length<2?nR(ib[e])||nR(ab[e]):ib[e]&&ib[e][t]||ab[e]&&ab[e][t]},loe=Tr,ei=loe({}.isPrototypeOf),uoe=Er,oR=uoe.navigator,iR=oR&&oR.userAgent,sb=iR?String(iR):"",aR=Er,cb=sb,sR=aR.process,cR=aR.Deno,lR=sR&&sR.versions||cR&&cR.version,uR=lR&&lR.v8,eo,Up;uR&&(eo=uR.split("."),Up=eo[0]>0&&eo[0]<4?1:+(eo[0]+eo[1])),!Up&&cb&&(eo=cb.match(/Edge\/(\d+)/),(!eo||eo[1]>=74)&&(eo=cb.match(/Chrome\/(\d+)/),eo&&(Up=+eo[1])));var lb=Up,dR=lb,doe=kr,foe=Er,poe=foe.String,Ns=!!Object.getOwnPropertySymbols&&!doe(function(){var e=Symbol("symbol detection");return!poe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&dR&&dR<41}),hoe=Ns,fR=hoe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",moe=To,yoe=tn,goe=ei,voe=fR,boe=Object,Il=voe?function(e){return typeof e=="symbol"}:function(e){var t=moe("Symbol");return yoe(t)&&goe(t.prototype,boe(e))},woe=String,zp=function(e){try{return woe(e)}catch{return"Object"}},xoe=tn,Soe=zp,_oe=TypeError,ub=function(e){if(xoe(e))return e;throw new _oe(Soe(e)+" is not a function")},Eoe=ub,koe=nb,db=function(e,t){var r=e[t];return koe(r)?void 0:Eoe(r)},fb=Eo,pb=tn,hb=Qo,Toe=TypeError,$oe=function(e,t){var r,n;if(t==="string"&&pb(r=e.toString)&&!hb(n=fb(r,e))||pb(r=e.valueOf)&&!hb(n=fb(r,e))||t!=="string"&&pb(r=e.toString)&&!hb(n=fb(r,e)))return n;throw new Toe("Can't convert object to primitive value")},pR={exports:{}},hR=Er,Ooe=Object.defineProperty,Coe=function(e,t){try{Ooe(hR,e,{value:t,configurable:!0,writable:!0})}catch{hR[e]=t}return t},Aoe=Er,Ioe=Coe,mR="__core-js_shared__",yR=pR.exports=Aoe[mR]||Ioe(mR,{});(yR.versions||(yR.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 mb=pR.exports,gR=mb,Ms=function(e,t){return gR[e]||(gR[e]=t||{})},Roe=ob,Poe=Object,ti=function(e){return Poe(Roe(e))},Noe=Tr,Moe=ti,joe=Noe({}.hasOwnProperty),On=Object.hasOwn||function(t,r){return joe(Moe(t),r)},Doe=Tr,Foe=0,Loe=Math.random(),qoe=Doe(1 .toString),yb=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qoe(++Foe+Loe,36)},Boe=Er,Uoe=Ms,vR=On,zoe=yb,Zoe=Ns,Voe=fR,js=Boe.Symbol,gb=Uoe("wks"),Hoe=Voe?js.for||js:js&&js.withoutSetter||zoe,Nr=function(e){return vR(gb,e)||(gb[e]=Zoe&&vR(js,e)?js[e]:Hoe("Symbol."+e)),gb[e]},Woe=Eo,bR=Qo,wR=Il,Koe=db,Goe=$oe,Joe=Nr,Yoe=TypeError,Xoe=Joe("toPrimitive"),Qoe=function(e,t){if(!bR(e)||wR(e))return e;var r=Koe(e,Xoe),n;if(r){if(t===void 0&&(t="default"),n=Woe(r,e,t),!bR(n)||wR(n))return n;throw new Yoe("Can't convert object to primitive value")}return t===void 0&&(t="number"),Goe(e,t)},eie=Qoe,tie=Il,vb=function(e){var t=eie(e,"string");return tie(t)?t:t+""},rie=Er,xR=Qo,bb=rie.document,nie=xR(bb)&&xR(bb.createElement),SR=function(e){return nie?bb.createElement(e):{}},oie=mn,iie=kr,aie=SR,_R=!oie&&!iie(function(){return Object.defineProperty(aie("div"),"a",{get:function(){return 7}}).a!==7}),sie=mn,cie=Eo,lie=tb,uie=Al,die=ko,fie=vb,pie=On,hie=_R,ER=Object.getOwnPropertyDescriptor;Cl.f=sie?ER:function(t,r){if(t=die(t),r=fie(r),hie)try{return ER(t,r)}catch{}if(pie(t,r))return uie(!cie(lie.f,t,r),t[r])};var mie=kr,yie=tn,gie=/#|\.prototype\./,Rl=function(e,t){var r=bie[vie(e)];return r===xie?!0:r===wie?!1:yie(t)?mie(t):!!t},vie=Rl.normalize=function(e){return String(e).replace(gie,".").toLowerCase()},bie=Rl.data={},wie=Rl.NATIVE="N",xie=Rl.POLYFILL="P",Sie=Rl,kR=Qv,_ie=ub,Eie=qp,kie=kR(kR.bind),wb=function(e,t){return _ie(e),t===void 0?e:Eie?kie(e,t):function(){return e.apply(t,arguments)}},to={},Tie=mn,$ie=kr,TR=Tie&&$ie(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oie=Qo,Cie=String,Aie=TypeError,Ni=function(e){if(Oie(e))return e;throw new Aie(Cie(e)+" is not an object")},Iie=mn,Rie=_R,Pie=TR,Zp=Ni,$R=vb,Nie=TypeError,xb=Object.defineProperty,Mie=Object.getOwnPropertyDescriptor,Sb="enumerable",_b="configurable",Eb="writable";to.f=Iie?Pie?function(t,r,n){if(Zp(t),r=$R(r),Zp(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Eb in n&&!n[Eb]){var o=Mie(t,r);o&&o[Eb]&&(t[r]=n.value,n={configurable:_b in n?n[_b]:o[_b],enumerable:Sb in n?n[Sb]:o[Sb],writable:!1})}return xb(t,r,n)}:xb:function(t,r,n){if(Zp(t),r=$R(r),Zp(n),Rie)try{return xb(t,r,n)}catch{}if("get"in n||"set"in n)throw new Nie("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var jie=mn,Die=to,Fie=Al,Vp=jie?function(e,t,r){return Die.f(e,t,Fie(1,r))}:function(e,t,r){return e[t]=r,e},Pl=Er,Lie=Yv,qie=Qv,Bie=tn,Uie=Cl.f,zie=Sie,Ds=Ur,Zie=wb,Fs=Vp,OR=On,Vie=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 Lie(e,this,arguments)};return t.prototype=e.prototype,t},Zt=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?Pl:o?Pl[r]:Pl[r]&&Pl[r].prototype,s=n?Ds:Ds[r]||Fs(Ds,r,{})[r],c=s.prototype,l,u,d,p,f,h,y,m,g;for(p in t)l=zie(n?p:r+(o?".":"#")+p,e.forced),u=!l&&a&&OR(a,p),h=s[p],u&&(e.dontCallGetSet?(g=Uie(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=Zie(f,Pl):e.wrap&&u?m=Vie(f):i&&Bie(f)?m=qie(f):m=f,(e.sham||f&&f.sham||h&&h.sham)&&Fs(m,"sham",!0),Fs(s,p,m),i&&(d=r+"Prototype",OR(Ds,d)||Fs(Ds,d,{}),Fs(Ds[d],p,f),e.real&&c&&(l||!c[p])&&Fs(c,p,f)))},Hie=va,Ls=Array.isArray||function(t){return Hie(t)==="Array"},Wie=Zt,Kie=Ls;Wie({target:"Array",stat:!0},{isArray:Kie});var Gie=Ur,Jie=Gie.Array.isArray,Yie=Jie,CR=Yie,Xie=CR,Qie=Xie,eae=Qie,tae=eae,rae=tae;const AR=St(rae);function nae(e){if(AR(e))return e}var oae=Math.ceil,iae=Math.floor,aae=Math.trunc||function(t){var r=+t;return(r>0?iae:oae)(r)},sae=aae,Hp=function(e){var t=+e;return t!==t||t===0?0:sae(t)},cae=Hp,lae=Math.min,uae=function(e){var t=cae(e);return t>0?lae(t,9007199254740991):0},dae=uae,ba=function(e){return dae(e.length)},fae=TypeError,pae=9007199254740991,kb=function(e){if(e>pae)throw fae("Maximum allowed index exceeded");return e},hae=mn,mae=to,yae=Al,Nl=function(e,t,r){hae?mae.f(e,t,yae(0,r)):e[t]=r},gae=Nr,vae=gae("toStringTag"),IR={};IR[vae]="z";var Tb=String(IR)==="[object z]",bae=Tb,wae=tn,Wp=va,xae=Nr,Sae=xae("toStringTag"),_ae=Object,Eae=Wp(function(){return arguments}())==="Arguments",kae=function(e,t){try{return e[t]}catch{}},Ml=bae?Wp:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=kae(t=_ae(e),Sae))=="string"?r:Eae?Wp(t):(n=Wp(t))==="Object"&&wae(t.callee)?"Arguments":n},Tae=Tr,$ae=tn,$b=mb,Oae=Tae(Function.toString);$ae($b.inspectSource)||($b.inspectSource=function(e){return Oae(e)});var Cae=$b.inspectSource,Aae=Tr,Iae=kr,RR=tn,Rae=Ml,Pae=To,Nae=Cae,PR=function(){},NR=Pae("Reflect","construct"),Ob=/^\s*(?:class|function)\b/,Mae=Aae(Ob.exec),jae=!Ob.test(PR),jl=function(t){if(!RR(t))return!1;try{return NR(PR,[],t),!0}catch{return!1}},MR=function(t){if(!RR(t))return!1;switch(Rae(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return jae||!!Mae(Ob,Nae(t))}catch{return!0}};MR.sham=!0;var Cb=!NR||Iae(function(){var e;return jl(jl.call)||!jl(Object)||!jl(function(){e=!0})||e})?MR:jl,jR=Ls,Dae=Cb,Fae=Qo,Lae=Nr,qae=Lae("species"),DR=Array,Bae=function(e){var t;return jR(e)&&(t=e.constructor,Dae(t)&&(t===DR||jR(t.prototype))?t=void 0:Fae(t)&&(t=t[qae],t===null&&(t=void 0))),t===void 0?DR:t},Uae=Bae,Ab=function(e,t){return new(Uae(e))(t===0?0:t)},zae=kr,Zae=Nr,Vae=lb,Hae=Zae("species"),Kp=function(e){return Vae>=51||!zae(function(){var t=[],r=t.constructor={};return r[Hae]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Wae=Zt,Kae=kr,Gae=Ls,Jae=Qo,Yae=ti,Xae=ba,FR=kb,LR=Nl,Qae=Ab,ese=Kp,tse=Nr,rse=lb,qR=tse("isConcatSpreadable"),nse=rse>=51||!Kae(function(){var e=[];return e[qR]=!1,e.concat()[0]!==e}),ose=function(e){if(!Jae(e))return!1;var t=e[qR];return t!==void 0?!!t:Gae(e)},ise=!nse||!ese("concat");Wae({target:"Array",proto:!0,arity:1,forced:ise},{concat:function(t){var r=Yae(this),n=Qae(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],ose(l))for(c=Xae(l),FR(o+c),a=0;a<c;a++,o++)a in l&&LR(n,o,l[a]);else FR(o+1),LR(n,o++,l);return n.length=o,n}});var ase=Ml,sse=String,Dl=function(e){if(ase(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return sse(e)},Gp={},cse=Hp,lse=Math.max,use=Math.min,Ib=function(e,t){var r=cse(e);return r<0?lse(r+t,0):use(r,t)},dse=ko,fse=Ib,pse=ba,BR=function(e){return function(t,r,n){var o=dse(t),i=pse(o);if(i===0)return!e&&-1;var a=fse(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}},UR={includes:BR(!0),indexOf:BR(!1)},Jp={},hse=Tr,Rb=On,mse=ko,yse=UR.indexOf,gse=Jp,zR=hse([].push),ZR=function(e,t){var r=mse(e),n=0,o=[],i;for(i in r)!Rb(gse,i)&&Rb(r,i)&&zR(o,i);for(;t.length>n;)Rb(r,i=t[n++])&&(~yse(o,i)||zR(o,i));return o},Pb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vse=ZR,bse=Pb,Nb=Object.keys||function(t){return vse(t,bse)},wse=mn,xse=TR,Sse=to,_se=Ni,Ese=ko,kse=Nb;Gp.f=wse&&!xse?Object.defineProperties:function(t,r){_se(t);for(var n=Ese(r),o=kse(r),i=o.length,a=0,s;i>a;)Sse.f(t,s=o[a++],n[s]);return t};var Tse=To,$se=Tse("document","documentElement"),Ose=Ms,Cse=yb,VR=Ose("keys"),Yp=function(e){return VR[e]||(VR[e]=Cse(e))},Ase=Ni,Ise=Gp,HR=Pb,Rse=Jp,Pse=$se,Nse=SR,Mse=Yp,WR=">",KR="<",Mb="prototype",jb="script",GR=Mse("IE_PROTO"),Db=function(){},JR=function(e){return KR+jb+WR+e+KR+"/"+jb+WR},YR=function(e){e.write(JR("")),e.close();var t=e.parentWindow.Object;return e=null,t},jse=function(){var e=Nse("iframe"),t="java"+jb+":",r;return e.style.display="none",Pse.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(JR("document.F=Object")),r.close(),r.F},Xp,Qp=function(){try{Xp=new ActiveXObject("htmlfile")}catch{}Qp=typeof document<"u"?document.domain&&Xp?YR(Xp):jse():YR(Xp);for(var e=HR.length;e--;)delete Qp[Mb][HR[e]];return Qp()};Rse[GR]=!0;var Fb=Object.create||function(t,r){var n;return t!==null?(Db[Mb]=Ase(t),n=new Db,Db[Mb]=null,n[GR]=t):n=Qp(),r===void 0?n:Ise.f(n,r)},eh={},Dse=ZR,Fse=Pb,Lse=Fse.concat("length","prototype");eh.f=Object.getOwnPropertyNames||function(t){return Dse(t,Lse)};var XR={},qse=Tr,th=qse([].slice),Bse=va,Use=ko,QR=eh.f,zse=th,eP=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Zse=function(e){try{return QR(e)}catch{return zse(eP)}};XR.f=function(t){return eP&&Bse(t)==="Window"?Zse(t):QR(Use(t))};var rh={};rh.f=Object.getOwnPropertySymbols;var Vse=Vp,nh=function(e,t,r,n){return n&&n.enumerable?e[t]=r:Vse(e,t,r),e},Hse=to,Wse=function(e,t,r){return Hse.f(e,t,r)},Fl={},Kse=Nr;Fl.f=Kse;var tP=Ur,Gse=On,Jse=Fl,Yse=to.f,or=function(e){var t=tP.Symbol||(tP.Symbol={});Gse(t,e)||Yse(t,e,{value:Jse.f(e)})},Xse=Eo,Qse=To,ece=Nr,tce=nh,rP=function(){var e=Qse("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ece("toPrimitive");t&&!t[n]&&tce(t,n,function(o){return Xse(r,this)},{arity:1})},rce=Tb,nce=Ml,oce=rce?{}.toString:function(){return"[object "+nce(this)+"]"},ice=Tb,ace=to.f,sce=Vp,cce=On,lce=oce,uce=Nr,nP=uce("toStringTag"),qs=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(cce(o,nP)||ace(o,nP,{configurable:!0,value:t}),n&&!ice&&sce(o,"toString",lce))},dce=Er,fce=tn,oP=dce.WeakMap,pce=fce(oP)&&/native code/.test(String(oP)),hce=pce,iP=Er,mce=Qo,yce=Vp,Lb=On,qb=mb,gce=Yp,vce=Jp,aP="Object already initialized",Bb=iP.TypeError,bce=iP.WeakMap,oh,Ll,ih,wce=function(e){return ih(e)?Ll(e):oh(e,{})},xce=function(e){return function(t){var r;if(!mce(t)||(r=Ll(t)).type!==e)throw new Bb("Incompatible receiver, "+e+" required");return r}};if(hce||qb.state){var $o=qb.state||(qb.state=new bce);$o.get=$o.get,$o.has=$o.has,$o.set=$o.set,oh=function(e,t){if($o.has(e))throw new Bb(aP);return t.facade=e,$o.set(e,t),t},Ll=function(e){return $o.get(e)||{}},ih=function(e){return $o.has(e)}}else{var Bs=gce("state");vce[Bs]=!0,oh=function(e,t){if(Lb(e,Bs))throw new Bb(aP);return t.facade=e,yce(e,Bs,t),t},Ll=function(e){return Lb(e,Bs)?e[Bs]:{}},ih=function(e){return Lb(e,Bs)}}var Ub={set:oh,get:Ll,has:ih,enforce:wce,getterFor:xce},Sce=wb,_ce=Tr,Ece=rR,kce=ti,Tce=ba,$ce=Ab,sP=_ce([].push),Mi=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=kce(c),f=Ece(p),h=Tce(f),y=Sce(l,u),m=0,g=d||$ce,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:sP(v,b)}else switch(e){case 4:return!1;case 7:sP(v,b)}return i?-1:n||o?o:v}},zb={forEach:Mi(0),map:Mi(1),filter:Mi(2),some:Mi(3),every:Mi(4),find:Mi(5),findIndex:Mi(6),filterReject:Mi(7)},ah=Zt,ql=Er,Zb=Eo,Oce=Tr,Us=mn,zs=Ns,Cce=kr,Mr=On,Ace=ei,Vb=Ni,sh=ko,Hb=vb,Ice=Dl,Wb=Al,Zs=Fb,cP=Nb,Rce=eh,lP=XR,Pce=rh,uP=Cl,dP=to,Nce=Gp,fP=tb,pP=nh,Mce=Wse,Kb=Ms,jce=Yp,hP=Jp,mP=yb,Dce=Nr,Fce=Fl,Lce=or,qce=rP,Bce=qs,yP=Ub,ch=zb.forEach,yn=jce("hidden"),lh="Symbol",Bl="prototype",Uce=yP.set,gP=yP.getterFor(lh),ro=Object[Bl],wa=ql.Symbol,Ul=wa&&wa[Bl],zce=ql.RangeError,Zce=ql.TypeError,Gb=ql.QObject,vP=uP.f,xa=dP.f,bP=lP.f,Vce=fP.f,wP=Oce([].push),ri=Kb("symbols"),zl=Kb("op-symbols"),Hce=Kb("wks"),Jb=!Gb||!Gb[Bl]||!Gb[Bl].findChild,xP=function(e,t,r){var n=vP(ro,t);n&&delete ro[t],xa(e,t,r),n&&e!==ro&&xa(ro,t,n)},Yb=Us&&Cce(function(){return Zs(xa({},"a",{get:function(){return xa(this,"a",{value:7}).a}})).a!==7})?xP:xa,Xb=function(e,t){var r=ri[e]=Zs(Ul);return Uce(r,{type:lh,tag:e,description:t}),Us||(r.description=t),r},uh=function(t,r,n){t===ro&&uh(zl,r,n),Vb(t);var o=Hb(r);return Vb(n),Mr(ri,o)?(n.enumerable?(Mr(t,yn)&&t[yn][o]&&(t[yn][o]=!1),n=Zs(n,{enumerable:Wb(0,!1)})):(Mr(t,yn)||xa(t,yn,Wb(1,Zs(null))),t[yn][o]=!0),Yb(t,o,n)):xa(t,o,n)},Qb=function(t,r){Vb(t);var n=sh(r),o=cP(n).concat(kP(n));return ch(o,function(i){(!Us||Zb(SP,n,i))&&uh(t,i,n[i])}),t},Wce=function(t,r){return r===void 0?Zs(t):Qb(Zs(t),r)},SP=function(t){var r=Hb(t),n=Zb(Vce,this,r);return this===ro&&Mr(ri,r)&&!Mr(zl,r)?!1:n||!Mr(this,r)||!Mr(ri,r)||Mr(this,yn)&&this[yn][r]?n:!0},_P=function(t,r){var n=sh(t),o=Hb(r);if(!(n===ro&&Mr(ri,o)&&!Mr(zl,o))){var i=vP(n,o);return i&&Mr(ri,o)&&!(Mr(n,yn)&&n[yn][o])&&(i.enumerable=!0),i}},EP=function(t){var r=bP(sh(t)),n=[];return ch(r,function(o){!Mr(ri,o)&&!Mr(hP,o)&&wP(n,o)}),n},kP=function(e){var t=e===ro,r=bP(t?zl:sh(e)),n=[];return ch(r,function(o){Mr(ri,o)&&(!t||Mr(ro,o))&&wP(n,ri[o])}),n};zs||(wa=function(){if(Ace(Ul,this))throw new Zce("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:Ice(arguments[0]),r=mP(t),n=function(o){var i=this===void 0?ql:this;i===ro&&Zb(n,zl,o),Mr(i,yn)&&Mr(i[yn],r)&&(i[yn][r]=!1);var a=Wb(1,o);try{Yb(i,r,a)}catch(s){if(!(s instanceof zce))throw s;xP(i,r,a)}};return Us&&Jb&&Yb(ro,r,{configurable:!0,set:n}),Xb(r,t)},Ul=wa[Bl],pP(Ul,"toString",function(){return gP(this).tag}),pP(wa,"withoutSetter",function(e){return Xb(mP(e),e)}),fP.f=SP,dP.f=uh,Nce.f=Qb,uP.f=_P,Rce.f=lP.f=EP,Pce.f=kP,Fce.f=function(e){return Xb(Dce(e),e)},Us&&Mce(Ul,"description",{configurable:!0,get:function(){return gP(this).description}})),ah({global:!0,constructor:!0,wrap:!0,forced:!zs,sham:!zs},{Symbol:wa}),ch(cP(Hce),function(e){Lce(e)}),ah({target:lh,stat:!0,forced:!zs},{useSetter:function(){Jb=!0},useSimple:function(){Jb=!1}}),ah({target:"Object",stat:!0,forced:!zs,sham:!Us},{create:Wce,defineProperty:uh,defineProperties:Qb,getOwnPropertyDescriptor:_P}),ah({target:"Object",stat:!0,forced:!zs},{getOwnPropertyNames:EP}),qce(),Bce(wa,lh),hP[yn]=!0;var Kce=Ns,TP=Kce&&!!Symbol.for&&!!Symbol.keyFor,Gce=Zt,Jce=To,Yce=On,Xce=Dl,$P=Ms,Qce=TP,ew=$P("string-to-symbol-registry"),ele=$P("symbol-to-string-registry");Gce({target:"Symbol",stat:!0,forced:!Qce},{for:function(e){var t=Xce(e);if(Yce(ew,t))return ew[t];var r=Jce("Symbol")(t);return ew[t]=r,ele[r]=t,r}});var tle=Zt,rle=On,nle=Il,ole=zp,ile=Ms,ale=TP,OP=ile("symbol-to-string-registry");tle({target:"Symbol",stat:!0,forced:!ale},{keyFor:function(t){if(!nle(t))throw new TypeError(ole(t)+" is not a symbol");if(rle(OP,t))return OP[t]}});var sle=Tr,CP=Ls,cle=tn,AP=va,lle=Dl,IP=sle([].push),ule=function(e){if(cle(e))return e;if(CP(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];typeof o=="string"?IP(r,o):(typeof o=="number"||AP(o)==="Number"||AP(o)==="String")&&IP(r,lle(o))}var i=r.length,a=!0;return function(s,c){if(a)return a=!1,c;if(CP(this))return c;for(var l=0;l<i;l++)if(r[l]===s)return c}}},dle=Zt,RP=To,PP=Yv,fle=Eo,Zl=Tr,NP=kr,MP=tn,jP=Il,DP=th,ple=ule,hle=Ns,mle=String,ji=RP("JSON","stringify"),dh=Zl(/./.exec),FP=Zl("".charAt),yle=Zl("".charCodeAt),gle=Zl("".replace),vle=Zl(1 .toString),ble=/[\uD800-\uDFFF]/g,LP=/^[\uD800-\uDBFF]$/,qP=/^[\uDC00-\uDFFF]$/,BP=!hle||NP(function(){var e=RP("Symbol")("stringify detection");return ji([e])!=="[null]"||ji({a:e})!=="{}"||ji(Object(e))!=="{}"}),UP=NP(function(){return ji("\uDF06\uD834")!=='"\\udf06\\ud834"'||ji("\uDEAD")!=='"\\udead"'}),wle=function(e,t){var r=DP(arguments),n=ple(t);if(!(!MP(n)&&(e===void 0||jP(e))))return r[1]=function(o,i){if(MP(n)&&(i=fle(n,this,mle(o),i)),!jP(i))return i},PP(ji,null,r)},xle=function(e,t,r){var n=FP(r,t-1),o=FP(r,t+1);return dh(LP,e)&&!dh(qP,o)||dh(qP,e)&&!dh(LP,n)?"\\u"+vle(yle(e,0),16):e};ji&&dle({target:"JSON",stat:!0,arity:3,forced:BP||UP},{stringify:function(t,r,n){var o=DP(arguments),i=PP(BP?wle:ji,null,o);return UP&&typeof i=="string"?gle(i,ble,xle):i}});var Sle=Zt,_le=Ns,Ele=kr,zP=rh,kle=ti,Tle=!_le||Ele(function(){zP.f(1)});Sle({target:"Object",stat:!0,forced:Tle},{getOwnPropertySymbols:function(t){var r=zP.f;return r?r(kle(t)):[]}});var $le=or;$le("asyncIterator");var Ole=or;Ole("hasInstance");var Cle=or;Cle("isConcatSpreadable");var Ale=or;Ale("iterator");var Ile=or;Ile("match");var Rle=or;Rle("matchAll");var Ple=or;Ple("replace");var Nle=or;Nle("search");var Mle=or;Mle("species");var jle=or;jle("split");var Dle=or,Fle=rP;Dle("toPrimitive"),Fle();var Lle=To,qle=or,Ble=qs;qle("toStringTag"),Ble(Lle("Symbol"),"Symbol");var Ule=or;Ule("unscopables");var zle=Er,Zle=qs;Zle(zle.JSON,"JSON",!0);var Vle=Ur,Hle=Vle.Symbol,Vs={},tw=mn,Wle=On,ZP=Function.prototype,Kle=tw&&Object.getOwnPropertyDescriptor,rw=Wle(ZP,"name"),Gle=rw&&(function(){}).name==="something",Jle=rw&&(!tw||tw&&Kle(ZP,"name").configurable),Yle={EXISTS:rw,PROPER:Gle,CONFIGURABLE:Jle},Xle=kr,Qle=!Xle(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),eue=On,tue=tn,rue=ti,nue=Yp,oue=Qle,VP=nue("IE_PROTO"),nw=Object,iue=nw.prototype,HP=oue?nw.getPrototypeOf:function(e){var t=rue(e);if(eue(t,VP))return t[VP];var r=t.constructor;return tue(r)&&t instanceof r?r.prototype:t instanceof nw?iue:null},aue=kr,sue=tn,cue=Qo,lue=Fb,WP=HP,uue=nh,due=Nr,ow=due("iterator"),KP=!1,ni,iw,aw;[].keys&&(aw=[].keys(),"next"in aw?(iw=WP(WP(aw)),iw!==Object.prototype&&(ni=iw)):KP=!0);var fue=!cue(ni)||aue(function(){var e={};return ni[ow].call(e)!==e});fue?ni={}:ni=lue(ni),sue(ni[ow])||uue(ni,ow,function(){return this});var GP={IteratorPrototype:ni,BUGGY_SAFARI_ITERATORS:KP},pue=GP.IteratorPrototype,hue=Fb,mue=Al,yue=qs,gue=Vs,vue=function(){return this},bue=function(e,t,r,n){var o=t+" Iterator";return e.prototype=hue(pue,{next:mue(+!n,r)}),yue(e,o,!1,!0),gue[o]=vue,e},wue=Zt,xue=Eo,JP=Yle,Sue=bue,_ue=HP,Eue=qs,YP=nh,kue=Nr,XP=Vs,QP=GP,Tue=JP.PROPER;JP.CONFIGURABLE,QP.IteratorPrototype;var fh=QP.BUGGY_SAFARI_ITERATORS,sw=kue("iterator"),eN="keys",ph="values",tN="entries",$ue=function(){return this},rN=function(e,t,r,n,o,i,a){Sue(r,t,n);var s=function(g){if(g===o&&p)return p;if(!fh&&g&&g in u)return u[g];switch(g){case eN:return function(){return new r(this,g)};case ph:return function(){return new r(this,g)};case tN:return function(){return new r(this,g)}}return function(){return new r(this)}},c=t+" Iterator",l=!1,u=e.prototype,d=u[sw]||u["@@iterator"]||o&&u[o],p=!fh&&d||s(o),f=t==="Array"&&u.entries||d,h,y,m;if(f&&(h=_ue(f.call(new e)),h!==Object.prototype&&h.next&&(Eue(h,c,!0,!0),XP[c]=$ue)),Tue&&o===ph&&d&&d.name!==ph&&(l=!0,p=function(){return xue(d,this)}),o)if(y={values:s(ph),keys:i?p:s(eN),entries:s(tN)},a)for(m in y)(fh||l||!(m in u))&&YP(u,m,y[m]);else wue({target:t,proto:!0,forced:fh||l},y);return a&&u[sw]!==p&&YP(u,sw,p,{name:o}),XP[t]=p,y},nN=function(e,t){return{value:e,done:t}},Oue=ko,oN=Vs,iN=Ub;to.f;var Cue=rN,hh=nN,aN="Array Iterator",Aue=iN.set,Iue=iN.getterFor(aN);Cue(Array,"Array",function(e,t){Aue(this,{type:aN,target:Oue(e),index:0,kind:t})},function(){var e=Iue(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,hh(void 0,!0);switch(e.kind){case"keys":return hh(r,!1);case"values":return hh(t[r],!1)}return hh([r,t[r]],!1)},"values"),oN.Arguments=oN.Array;var Rue={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},Pue=Rue,Nue=Er,Mue=qs,sN=Vs;for(var cw in Pue)Mue(Nue[cw],cw),sN[cw]=sN.Array;var jue=Hle,Due=jue,Fue=Nr,Lue=to.f,cN=Fue("metadata"),lN=Function.prototype;lN[cN]===void 0&&Lue(lN,cN,{value:null});var que=or;que("asyncDispose");var Bue=or;Bue("dispose");var Uue=or;Uue("metadata");var zue=Due,Zue=zue,Vue=To,Hue=Tr,lw=Vue("Symbol"),Wue=lw.keyFor,Kue=Hue(lw.prototype.valueOf),uN=lw.isRegisteredSymbol||function(t){try{return Wue(Kue(t))!==void 0}catch{return!1}},Gue=Zt,Jue=uN;Gue({target:"Symbol",stat:!0},{isRegisteredSymbol:Jue});for(var Yue=Ms,dN=To,Xue=Tr,Que=Il,ede=Nr,mh=dN("Symbol"),fN=mh.isWellKnownSymbol,pN=dN("Object","getOwnPropertyNames"),tde=Xue(mh.prototype.valueOf),hN=Yue("wks"),uw=0,mN=pN(mh),rde=mN.length;uw<rde;uw++)try{var yN=mN[uw];Que(mh[yN])&&ede(yN)}catch{}var gN=function(t){if(fN&&fN(t))return!0;try{for(var r=tde(t),n=0,o=pN(hN),i=o.length;n<i;n++)if(hN[o[n]]==r)return!0}catch{}return!1},nde=Zt,ode=gN;nde({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:ode});var ide=or;ide("customMatcher");var ade=or;ade("observable");var sde=Zt,cde=uN;sde({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:cde});var lde=Zt,ude=gN;lde({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:ude});var dde=or;dde("matcher");var fde=or;fde("metadataKey");var pde=or;pde("patternMatch");var hde=or;hde("replaceAll");var mde=Zue,yde=mde,gde=yde;const Hs=St(gde);var dw=Tr,vde=Hp,bde=Dl,wde=ob,xde=dw("".charAt),vN=dw("".charCodeAt),Sde=dw("".slice),bN=function(e){return function(t,r){var n=bde(wde(t)),o=vde(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=vN(n,o),a<55296||a>56319||o+1===i||(s=vN(n,o+1))<56320||s>57343?e?xde(n,o):a:e?Sde(n,o,o+2):(a-55296<<10)+(s-56320)+65536)}},_de={codeAt:bN(!1),charAt:bN(!0)},Ede=_de.charAt,kde=Dl,wN=Ub,Tde=rN,xN=nN,SN="String Iterator",$de=wN.set,Ode=wN.getterFor(SN);Tde(String,"String",function(e){$de(this,{type:SN,string:kde(e),index:0})},function(){var t=Ode(this),r=t.string,n=t.index,o;return n>=r.length?xN(void 0,!0):(o=Ede(r,n),t.index+=o.length,xN(o,!1))});var Cde=Ml,_N=db,Ade=nb,Ide=Vs,Rde=Nr,Pde=Rde("iterator"),fw=function(e){if(!Ade(e))return _N(e,Pde)||_N(e,"@@iterator")||Ide[Cde(e)]},Nde=fw,Mde=Nde,jde=Mde,Dde=jde,Fde=Dde,Lde=Fde,qde=Lde,Bde=qde,Ude=Bde;const EN=St(Ude);var zde=mn,Zde=Ls,Vde=TypeError,Hde=Object.getOwnPropertyDescriptor,Wde=zde&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),kN=Wde?function(e,t){if(Zde(e)&&!Hde(e,"length").writable)throw new Vde("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Kde=Zt,Gde=ti,Jde=ba,Yde=kN,Xde=kb,Qde=kr,efe=Qde(function(){return[].push.call({length:4294967296},1)!==4294967297}),tfe=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},rfe=efe||!tfe();Kde({target:"Array",proto:!0,arity:1,forced:rfe},{push:function(t){var r=Gde(this),n=Jde(r),o=arguments.length;Xde(n+o);for(var i=0;i<o;i++)r[n]=arguments[i],n++;return Yde(r,n),n}});var nfe=Er,ofe=Ur,Sa=function(e,t){var r=ofe[e+"Prototype"],n=r&&r[t];if(n)return n;var o=nfe[e],i=o&&o.prototype;return i&&i[t]},ife=Sa,afe=ife("Array","push"),sfe=ei,cfe=afe,pw=Array.prototype,lfe=function(e){var t=e.push;return e===pw||sfe(pw,e)&&t===pw.push?cfe:t},ufe=lfe,dfe=ufe,ffe=dfe,pfe=ffe,hfe=pfe,mfe=hfe,yfe=mfe;const gfe=St(yfe);function vfe(e,t){var r=e==null?null:typeof Hs<"u"&&EN(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)&&(gfe(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 bfe=Zt,TN=Ls,wfe=Cb,xfe=Qo,$N=Ib,Sfe=ba,_fe=ko,Efe=Nl,kfe=Nr,Tfe=Kp,$fe=th,Ofe=Tfe("slice"),Cfe=kfe("species"),hw=Array,Afe=Math.max;bfe({target:"Array",proto:!0,forced:!Ofe},{slice:function(t,r){var n=_fe(this),o=Sfe(n),i=$N(t,o),a=$N(r===void 0?o:r,o),s,c,l;if(TN(n)&&(s=n.constructor,wfe(s)&&(s===hw||TN(s.prototype))?s=void 0:xfe(s)&&(s=s[Cfe],s===null&&(s=void 0)),s===hw||s===void 0))return $fe(n,i,a);for(c=new(s===void 0?hw:s)(Afe(a-i,0)),l=0;i<a;i++,l++)i in n&&Efe(c,l,n[i]);return c.length=l,c}});var Ife=Sa,Rfe=Ife("Array","slice"),Pfe=ei,Nfe=Rfe,mw=Array.prototype,Mfe=function(e){var t=e.slice;return e===mw||Pfe(mw,e)&&t===mw.slice?Nfe:t},jfe=Mfe,Dfe=jfe,Ffe=Dfe,Lfe=Ffe,qfe=Lfe,Bfe=qfe,Ufe=Bfe;const zfe=St(Ufe);var Zfe=Eo,ON=Ni,Vfe=db,Hfe=function(e,t,r){var n,o;ON(e);try{if(n=Vfe(e,"return"),!n){if(t==="throw")throw r;return r}n=Zfe(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return ON(n),r},Wfe=Ni,Kfe=Hfe,Gfe=function(e,t,r,n){try{return n?t(Wfe(r)[0],r[1]):t(r)}catch(o){Kfe(e,"throw",o)}},Jfe=Nr,Yfe=Vs,Xfe=Jfe("iterator"),Qfe=Array.prototype,epe=function(e){return e!==void 0&&(Yfe.Array===e||Qfe[Xfe]===e)},tpe=Eo,rpe=ub,npe=Ni,ope=zp,ipe=fw,ape=TypeError,spe=function(e,t){var r=arguments.length<2?ipe(e):t;if(rpe(r))return npe(tpe(r,e));throw new ape(ope(e)+" is not iterable")},cpe=wb,lpe=Eo,upe=ti,dpe=Gfe,fpe=epe,ppe=Cb,hpe=ba,CN=Nl,mpe=spe,ype=fw,AN=Array,gpe=function(t){var r=upe(t),n=ppe(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=cpe(i,o>2?arguments[2]:void 0));var s=ype(r),c=0,l,u,d,p,f,h;if(s&&!(this===AN&&fpe(s)))for(u=n?new this:[],p=mpe(r,s),f=p.next;!(d=lpe(f,p)).done;c++)h=a?dpe(p,i,[d.value,c],!0):d.value,CN(u,c,h);else for(l=hpe(r),u=n?new this(l):AN(l);l>c;c++)h=a?i(r[c],c):r[c],CN(u,c,h);return u.length=c,u},vpe=Nr,IN=vpe("iterator"),RN=!1;try{var bpe=0,PN={next:function(){return{done:!!bpe++}},return:function(){RN=!0}};PN[IN]=function(){return this},Array.from(PN,function(){throw 2})}catch{}var wpe=function(e,t){try{if(!t&&!RN)return!1}catch{return!1}var r=!1;try{var n={};n[IN]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},xpe=Zt,Spe=gpe,_pe=wpe,Epe=!_pe(function(e){Array.from(e)});xpe({target:"Array",stat:!0,forced:Epe},{from:Spe});var kpe=Ur,Tpe=kpe.Array.from,$pe=Tpe,Ope=$pe,Cpe=Ope,Ape=Cpe,Ipe=Ape,Rpe=Ipe,Ppe=Rpe;const NN=St(Ppe);function yw(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 MN(e,t){if(e){var r;if(typeof e=="string")return yw(e,t);var n=zfe(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?NN(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yw(e,t):void 0}}function Npe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
400
|
+
`)},Xre=0,Rs=[];function Qre(e){var t=P.useRef([]),r=P.useRef([0,0]),n=P.useRef(),o=P.useState(Xre++)[0],i=P.useState(function(){return $I()})[0],a=P.useRef(e);P.useEffect(function(){a.current=e},[e]),P.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var y=xre([e.lockRef.current],(e.shards||[]).map(PI),!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=P.useCallback(function(y,m){if("touches"in y&&y.touches.length===2)return!a.current.allowPinchZoom;var g=Dp(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,$=Math.abs(b)>Math.abs(x)?"h":"v";if("touches"in y&&$==="h"&&S.type==="range")return!1;var R=CI($,S);if(!R)return!0;if(R?w=$:(w=$==="v"?"h":"v",R=CI($,S)),!R)return!1;if(!n.current&&"changedTouches"in y&&(b||x)&&(n.current=w),!w)return!0;var N=n.current||w;return Gre(N,m,y,N==="h"?b:x,!0)},[]),c=P.useCallback(function(y){var m=y;if(!(!Rs.length||Rs[Rs.length-1]!==i)){var g="deltaY"in m?RI(m):Dp(m),v=t.current.filter(function(w){return w.name===m.type&&w.target===m.target&&Jre(w.delta,g)})[0];if(v&&v.should){m.cancelable&&m.preventDefault();return}if(!v){var b=(a.current.shards||[]).map(PI).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=P.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=P.useCallback(function(y){r.current=Dp(y),n.current=void 0},[]),d=P.useCallback(function(y){l(y.type,RI(y),y.target,s(y,e.lockRef.current))},[]),p=P.useCallback(function(y){l(y.type,Dp(y),y.target,s(y,e.lockRef.current))},[]);P.useEffect(function(){return Rs.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Is),document.addEventListener("touchmove",c,Is),document.addEventListener("touchstart",u,Is),function(){Rs=Rs.filter(function(y){return y!==i}),document.removeEventListener("wheel",c,Is),document.removeEventListener("touchmove",c,Is),document.removeEventListener("touchstart",u,Is)}},[]);var f=e.removeScrollBar,h=e.inert;return P.createElement(P.Fragment,null,h?P.createElement(i,{styles:Yre(o)}):null,f?P.createElement(Ure,{gapMode:"margin"}):null)}const ene=Are(kI,Qre);var NI=P.forwardRef(function(e,t){return P.createElement(Mp,_o({},e,{ref:t,sideCar:ene}))});NI.classNames=Mp.classNames;const tne=NI;var rne=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ps=new WeakMap,Fp=new WeakMap,Lp={},Vv=0,MI=function(e){return e&&(e.host||MI(e.parentNode))},nne=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=MI(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})},one=function(e,t,r,n){var o=nne(t,Array.isArray(e)?e:[e]);Lp[r]||(Lp[r]=new WeakMap);var i=Lp[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=(Ps.get(p)||0)+1,m=(i.get(p)||0)+1;Ps.set(p,y),i.set(p,m),a.push(p),y===1&&h&&Fp.set(p,!0),m===1&&p.setAttribute(r,"true"),h||p.setAttribute(n,"true")}})};return u(t),s.clear(),Vv++,function(){a.forEach(function(d){var p=Ps.get(d)-1,f=i.get(d)-1;Ps.set(d,p),i.set(d,f),p||(Fp.has(d)||d.removeAttribute(n),Fp.delete(d)),f||d.removeAttribute(r)}),Vv--,Vv||(Ps=new WeakMap,Ps=new WeakMap,Fp=new WeakMap,Lp={})}},ine=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=t||rne(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live]"))),one(n,o,r,"aria-hidden")):function(){return null}};const jI="Dialog",[DI,a1e]=ay(jI),[ane,Xo]=DI(jI),sne=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=O.useRef(null),c=O.useRef(null),[l=!1,u]=pI({prop:n,defaultProp:o,onChange:i});return O.createElement(ane,{scope:t,triggerRef:s,contentRef:c,contentId:Ap(),titleId:Ap(),descriptionId:Ap(),open:l,onOpenChange:u,onOpenToggle:O.useCallback(()=>u(d=>!d),[u]),modal:a},r)},cne="DialogTrigger",lne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(cne,r),i=Ki(t,o.triggerRef);return O.createElement(Nn.button,wr({type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Wv(o.open)},n,{ref:i,onClick:Yo(e.onClick,o.onOpenToggle)}))}),une="DialogPortal",[s1e,FI]=DI(une,{forceMount:void 0}),Hv="DialogOverlay",dne=O.forwardRef((e,t)=>{const r=FI(Hv,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Xo(Hv,e.__scopeDialog);return i.modal?O.createElement(Ip,{present:n||i.open},O.createElement(fne,wr({},o,{ref:t}))):null}),fne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(Hv,r);return O.createElement(tne,{as:sy,allowPinchZoom:!0,shards:[o.contentRef]},O.createElement(Nn.div,wr({"data-state":Wv(o.open)},n,{ref:t,style:{pointerEvents:"auto",...n.style}})))}),Tl="DialogContent",pne=O.forwardRef((e,t)=>{const r=FI(Tl,e.__scopeDialog),{forceMount:n=r.forceMount,...o}=e,i=Xo(Tl,e.__scopeDialog);return O.createElement(Ip,{present:n||i.open},i.modal?O.createElement(hne,wr({},o,{ref:t})):O.createElement(mne,wr({},o,{ref:t})))}),hne=O.forwardRef((e,t)=>{const r=Xo(Tl,e.__scopeDialog),n=O.useRef(null),o=Ki(t,r.contentRef,n);return O.useEffect(()=>{const i=n.current;if(i)return ine(i)},[]),O.createElement(LI,wr({},e,{ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Yo(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=r.triggerRef.current)===null||a===void 0||a.focus()}),onPointerDownOutside:Yo(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:Yo(e.onFocusOutside,i=>i.preventDefault())}))}),mne=O.forwardRef((e,t)=>{const r=Xo(Tl,e.__scopeDialog),n=O.useRef(!1),o=O.useRef(!1);return O.createElement(LI,wr({},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=O.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=Xo(Tl,r),c=O.useRef(null),l=Ki(t,c);return wre(),O.createElement(O.Fragment,null,O.createElement(dre,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:i},O.createElement(cre,wr({role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Wv(s.open)},a,{ref:l,onDismiss:()=>s.onOpenChange(!1)}))),!1)}),yne="DialogTitle",gne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(yne,r);return O.createElement(Nn.h2,wr({id:o.titleId},n,{ref:t}))}),vne="DialogClose",bne=O.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,o=Xo(vne,r);return O.createElement(Nn.button,wr({type:"button"},n,{ref:t,onClick:Yo(e.onClick,()=>o.onOpenChange(!1))}))});function Wv(e){return e?"open":"closed"}const wne=sne,xne=lne,Sne=dne,_ne=pne,Ene=gne,qI=bne;function kne({title:e,titleId:t,...r},n){return P.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?P.createElement("title",{id:t},e):null,P.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18 18 6M6 6l12 12"}))}const BI=P.forwardRef(kne);function Pi({open:e,onOpenChange:t,children:r}){return Y.jsx(wne,{open:e,onOpenChange:t,children:r})}function Tne({title:e,children:t}){var n,o,i,a,s,c,l,u;const{modal:r}=Wt;return Y.jsxs(Y.Fragment,{children:[Y.jsx(Sne,{...r==null?void 0:r.overlay}),Y.jsx("div",{...r==null?void 0:r.container,children:Y.jsxs(_ne,{...(n=r==null?void 0:r.dialog)==null?void 0:n.container,children:[Y.jsxs("div",{...(i=(o=r==null?void 0:r.dialog)==null?void 0:o.title)==null?void 0:i.container,children:[Y.jsx(Ene,{...(s=(a=r==null?void 0:r.dialog)==null?void 0:a.title)==null?void 0:s.text,children:e}),Y.jsx(qI,{children:Y.jsx(BI,{role:"button",tabIndex:0,...(l=(c=r==null?void 0:r.dialog)==null?void 0:c.title)==null?void 0:l.closeIcon})})]}),Y.jsx("div",{...(u=r==null?void 0:r.dialog)==null?void 0:u.content,children:t})]})})]})}Pi.Button=xne,Pi.Close=qI,Pi.Content=Tne;const UI=O.forwardRef(({children:e,...t},r)=>{const{container:n}=Wt;return Y.jsxs("div",{...t,...n,ref:r,children:[Y.jsx(gX,{}),Y.jsxs(fI,{children:[Y.jsx($ne,{}),e]})]})}),$ne=()=>{const{modal:e}=Wt,t=pt(n=>n.connected),{showModal:r}=tA();return O.useEffect(()=>{var n,o,i,a;t||r({title:"Connection Error",content:Y.jsxs(Y.Fragment,{children:[Y.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."}),Y.jsx(Pi.Close,{asChild:!0,children:Y.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]),Y.jsx(Y.Fragment,{})},One=O.forwardRef(({children:e,onClick:t,...r},n)=>{const{fab:o}=Wt,{container:i,icon:a}=o??{};return Y.jsx("div",{...r,...i,ref:n,onClick:t,children:Y.jsx("div",{...a})})}),zI="Collapsible",[Cne,l1e]=ay(zI),[Ane,Kv]=Cne(zI),Ine=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[c=!1,l]=pI({prop:n,defaultProp:o,onChange:a});return O.createElement(Ane,{scope:r,disabled:i,contentId:Ap(),open:c,onOpenToggle:O.useCallback(()=>l(u=>!u),[l])},O.createElement(Nn.div,wr({"data-state":Gv(c),"data-disabled":i?"":void 0},s,{ref:t})))}),Rne="CollapsibleTrigger",Pne=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=Kv(Rne,r);return O.createElement(Nn.button,wr({type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Gv(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled},n,{ref:t,onClick:Yo(e.onClick,o.onOpenToggle)}))}),ZI="CollapsibleContent",Nne=O.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=Kv(ZI,e.__scopeCollapsible);return O.createElement(Ip,{present:r||o.open},({present:i})=>O.createElement(Mne,wr({},n,{ref:t,present:i})))}),Mne=O.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...i}=e,a=Kv(ZI,r),[s,c]=O.useState(n),l=O.useRef(null),u=Ki(t,l),d=O.useRef(0),p=d.current,f=O.useRef(0),h=f.current,y=a.open||s,m=O.useRef(y),g=O.useRef();return O.useEffect(()=>{const v=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(v)},[]),Tc(()=>{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]),O.createElement(Nn.div,wr({"data-state":Gv(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 Gv(e){return e?"open":"closed"}const jne=Ine,Dne=Nne,Fne=e=>P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 16 16",...e},P.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"})),VI=({...e})=>{var a,s;const{header:t,modal:r}=Wt,n=pt(c=>c.restartConversation),{showModal:o}=tA(),i=c=>{var l,u,d,p;c.stopPropagation(),o({title:"Restart Conversation",content:Y.jsxs(Y.Fragment,{children:[Y.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?"}),Y.jsx(Pi.Close,{asChild:!0,children:Y.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 Y.jsx(tQ,{...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)}})},Lne=({...e})=>{const{header:t}=Wt,r=pt(o=>o.closeWindow),n=o=>{o.stopPropagation(),r==null||r()};return Y.jsx(BI,{...e,...t.content.actions.icons,role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{o.key==="Enter"&&n(o)}})},$l=({icon:e,title:t,link:r,...n})=>{var a,s,c,l,u,d,p,f,h,y,m,g;const{header:o}=Wt,i=e??Fne;return t?r?Y.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:[Y.jsx(i,{...(l=(c=o.expandedContent)==null?void 0:c.descriptionItems)==null?void 0:l.icon}),Y.jsx("p",{...(d=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:d.link,children:t})]}):Y.jsxs("div",{...n,...(f=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:f.container,children:[Y.jsx(i,{...(y=(h=o.expandedContent)==null?void 0:h.descriptionItems)==null?void 0:y.icon}),Y.jsx("p",{...(g=(m=o.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:g.text,children:t})]}):null},HI=({defaultOpen:e,disabled:t,onOpenChange:r,...n})=>{var p,f,h,y,m,g,v,b,x,w,S,$,R,N,A,D,H,U,Z,L,q,W;const{header:o}=Wt,i=pt(J=>J.configuration),a=pt(J=>J.closeWindow),s=pt(J=>J.getClientId)(),c=pt(J=>!J.disableRestartConversation),[l,u]=O.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 Y.jsxs(jne,{open:d?l:!1,onOpenChange:u,"data-disabled":d?void 0:"",...o.container,...n,children:[Y.jsxs(Pne,{...o.content.container,children:[Y.jsx(gy,{...n,userId:s,src:i.botAvatar,...o.content.avatar,children:i.botName||"Bot"}),Y.jsx("h2",{...o.content.title,children:i.botName||"Bot"}),i.botDescription&&Y.jsx("p",{...o.content.description,children:i.botDescription}),Y.jsxs("div",{...o.content.actions.container,children:[c&&Y.jsx(VI,{}),a&&Y.jsx(Lne,{})]})]}),Y.jsxs(Dne,{...o.expandedContent.container,children:[Y.jsxs("div",{"data-links":"",...o.expandedContent.group,children:[Y.jsx($l,{"data-email":"",icon:GQ,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}`}),Y.jsx($l,{"data-phone":"",icon:tee,title:(S=i.phone)==null?void 0:S.title,link:(R=($=i.phone)==null?void 0:$.link)!=null&&R.startsWith("tel:")?(N=i.phone)==null?void 0:N.link:`tel:${(A=i.phone)==null?void 0:A.link}`}),Y.jsx($l,{"data-website":"",link:(D=i.website)==null?void 0:D.link,icon:YQ,title:(H=i.website)==null?void 0:H.title})]}),Y.jsxs("div",{"data-legal":"",...(U=o.expandedContent)==null?void 0:U.group,children:[Y.jsx($l,{"data-terms":"",link:(Z=i.termsOfService)==null?void 0:Z.link,icon:WQ,title:(L=i.termsOfService)==null?void 0:L.title}),Y.jsx($l,{"data-privacy":"",link:(q=i.privacyPolicy)==null?void 0:q.link,icon:QQ,title:(W=i.privacyPolicy)==null?void 0:W.title})]})]})]})},WI=O.memo(({...e})=>{const{typingIndicator:t}=Wt;return Y.jsx("div",{...e,...t==null?void 0:t.container,children:Y.jsx("div",{...t==null?void 0:t.loader})})}),Jv=O.memo(O.forwardRef(({direction:e,block:t,scroll:r,disableInput:n,children:o,sender:i,...a},s)=>{var y,m,g,v;const[c,l]=O.useState([]),{message:u}=Wt,{botAvatar:d,botName:p}=pt(b=>b.configuration),f=pt(b=>b.getClientId)(),h=tk(f??"",15);return Y.jsx(QC.Provider,{value:{isLoading:c,setIsLoading:l},children:Y.jsxs("div",{...a,...u==null?void 0:u.container,"data-loaded":c.length===0,"data-disable-input":!!n,"data-direction":e,ref:s,children:[Y.jsxs(ZE,{"data-color":h,...(y=u==null?void 0:u.avatar)==null?void 0:y.container,children:[Y.jsx(VE,{...(m=u==null?void 0:u.avatar)==null?void 0:m.image,src:(i==null?void 0:i.avatar)??d}),Y.jsx(HE,{...(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&&Y.jsx(As,{block:t}),o]})})}));function qne(){const e=pt(n=>n.getClientId)(),t=pt(n=>n.configuration),{messageList:{marquee:r}}=Wt;return Y.jsxs("li",{...r.container,children:[Y.jsx(gy,{userId:e,src:t.botAvatar,...r.avatar,children:(t.botName||"Bot").slice(0,1)}),Y.jsxs("div",{...r.content,children:[Y.jsx("h1",{...r.title,children:t.botName||"Bot"}),Y.jsx("p",{...r.description,children:t.botDescription})]})]})}function Bne(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 Une(){Bne("react-scroll-to-bottom:version","4.2.0")}var Ol=function(e){return e&&e.Math===Math&&e},Er=Ol(typeof globalThis=="object"&&globalThis)||Ol(typeof window=="object"&&window)||Ol(typeof self=="object"&&self)||Ol(typeof He=="object"&&He)||Ol(typeof He=="object"&&He)||function(){return this}()||Function("return this")(),kr=function(e){try{return!!e()}catch{return!0}},zne=kr,qp=!zne(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Zne=qp,KI=Function.prototype,GI=KI.apply,JI=KI.call,Yv=typeof Reflect=="object"&&Reflect.apply||(Zne?JI.bind(GI):function(){return JI.apply(GI,arguments)}),YI=qp,XI=Function.prototype,Xv=XI.call,Vne=YI&&XI.bind.bind(Xv,Xv),Tr=YI?Vne:function(e){return function(){return Xv.apply(e,arguments)}},QI=Tr,Hne=QI({}.toString),Wne=QI("".slice),va=function(e){return Wne(Hne(e),8,-1)},Kne=va,Gne=Tr,Qv=function(e){if(Kne(e)==="Function")return Gne(e)},eb=typeof document=="object"&&document.all,tn=typeof eb>"u"&&eb!==void 0?function(e){return typeof e=="function"||e===eb}:function(e){return typeof e=="function"},Cl={},Jne=kr,mn=!Jne(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Yne=qp,Bp=Function.prototype.call,Eo=Yne?Bp.bind(Bp):function(){return Bp.apply(Bp,arguments)},tb={},eR={}.propertyIsEnumerable,tR=Object.getOwnPropertyDescriptor,Xne=tR&&!eR.call({1:2},1);tb.f=Xne?function(t){var r=tR(this,t);return!!r&&r.enumerable}:eR;var Al=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Qne=Tr,eoe=kr,toe=va,rb=Object,roe=Qne("".split),rR=eoe(function(){return!rb("z").propertyIsEnumerable(0)})?function(e){return toe(e)==="String"?roe(e,""):rb(e)}:rb,nb=function(e){return e==null},noe=nb,ooe=TypeError,ob=function(e){if(noe(e))throw new ooe("Can't call method on "+e);return e},ioe=rR,aoe=ob,ko=function(e){return ioe(aoe(e))},soe=tn,Qo=function(e){return typeof e=="object"?e!==null:soe(e)},Ur={},ib=Ur,ab=Er,coe=tn,nR=function(e){return coe(e)?e:void 0},To=function(e,t){return arguments.length<2?nR(ib[e])||nR(ab[e]):ib[e]&&ib[e][t]||ab[e]&&ab[e][t]},loe=Tr,ei=loe({}.isPrototypeOf),uoe=Er,oR=uoe.navigator,iR=oR&&oR.userAgent,sb=iR?String(iR):"",aR=Er,cb=sb,sR=aR.process,cR=aR.Deno,lR=sR&&sR.versions||cR&&cR.version,uR=lR&&lR.v8,eo,Up;uR&&(eo=uR.split("."),Up=eo[0]>0&&eo[0]<4?1:+(eo[0]+eo[1])),!Up&&cb&&(eo=cb.match(/Edge\/(\d+)/),(!eo||eo[1]>=74)&&(eo=cb.match(/Chrome\/(\d+)/),eo&&(Up=+eo[1])));var lb=Up,dR=lb,doe=kr,foe=Er,poe=foe.String,Ns=!!Object.getOwnPropertySymbols&&!doe(function(){var e=Symbol("symbol detection");return!poe(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&dR&&dR<41}),hoe=Ns,fR=hoe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",moe=To,yoe=tn,goe=ei,voe=fR,boe=Object,Il=voe?function(e){return typeof e=="symbol"}:function(e){var t=moe("Symbol");return yoe(t)&&goe(t.prototype,boe(e))},woe=String,zp=function(e){try{return woe(e)}catch{return"Object"}},xoe=tn,Soe=zp,_oe=TypeError,ub=function(e){if(xoe(e))return e;throw new _oe(Soe(e)+" is not a function")},Eoe=ub,koe=nb,db=function(e,t){var r=e[t];return koe(r)?void 0:Eoe(r)},fb=Eo,pb=tn,hb=Qo,Toe=TypeError,$oe=function(e,t){var r,n;if(t==="string"&&pb(r=e.toString)&&!hb(n=fb(r,e))||pb(r=e.valueOf)&&!hb(n=fb(r,e))||t!=="string"&&pb(r=e.toString)&&!hb(n=fb(r,e)))return n;throw new Toe("Can't convert object to primitive value")},pR={exports:{}},hR=Er,Ooe=Object.defineProperty,Coe=function(e,t){try{Ooe(hR,e,{value:t,configurable:!0,writable:!0})}catch{hR[e]=t}return t},Aoe=Er,Ioe=Coe,mR="__core-js_shared__",yR=pR.exports=Aoe[mR]||Ioe(mR,{});(yR.versions||(yR.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 mb=pR.exports,gR=mb,Ms=function(e,t){return gR[e]||(gR[e]=t||{})},Roe=ob,Poe=Object,ti=function(e){return Poe(Roe(e))},Noe=Tr,Moe=ti,joe=Noe({}.hasOwnProperty),On=Object.hasOwn||function(t,r){return joe(Moe(t),r)},Doe=Tr,Foe=0,Loe=Math.random(),qoe=Doe(1 .toString),yb=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qoe(++Foe+Loe,36)},Boe=Er,Uoe=Ms,vR=On,zoe=yb,Zoe=Ns,Voe=fR,js=Boe.Symbol,gb=Uoe("wks"),Hoe=Voe?js.for||js:js&&js.withoutSetter||zoe,Nr=function(e){return vR(gb,e)||(gb[e]=Zoe&&vR(js,e)?js[e]:Hoe("Symbol."+e)),gb[e]},Woe=Eo,bR=Qo,wR=Il,Koe=db,Goe=$oe,Joe=Nr,Yoe=TypeError,Xoe=Joe("toPrimitive"),Qoe=function(e,t){if(!bR(e)||wR(e))return e;var r=Koe(e,Xoe),n;if(r){if(t===void 0&&(t="default"),n=Woe(r,e,t),!bR(n)||wR(n))return n;throw new Yoe("Can't convert object to primitive value")}return t===void 0&&(t="number"),Goe(e,t)},eie=Qoe,tie=Il,vb=function(e){var t=eie(e,"string");return tie(t)?t:t+""},rie=Er,xR=Qo,bb=rie.document,nie=xR(bb)&&xR(bb.createElement),SR=function(e){return nie?bb.createElement(e):{}},oie=mn,iie=kr,aie=SR,_R=!oie&&!iie(function(){return Object.defineProperty(aie("div"),"a",{get:function(){return 7}}).a!==7}),sie=mn,cie=Eo,lie=tb,uie=Al,die=ko,fie=vb,pie=On,hie=_R,ER=Object.getOwnPropertyDescriptor;Cl.f=sie?ER:function(t,r){if(t=die(t),r=fie(r),hie)try{return ER(t,r)}catch{}if(pie(t,r))return uie(!cie(lie.f,t,r),t[r])};var mie=kr,yie=tn,gie=/#|\.prototype\./,Rl=function(e,t){var r=bie[vie(e)];return r===xie?!0:r===wie?!1:yie(t)?mie(t):!!t},vie=Rl.normalize=function(e){return String(e).replace(gie,".").toLowerCase()},bie=Rl.data={},wie=Rl.NATIVE="N",xie=Rl.POLYFILL="P",Sie=Rl,kR=Qv,_ie=ub,Eie=qp,kie=kR(kR.bind),wb=function(e,t){return _ie(e),t===void 0?e:Eie?kie(e,t):function(){return e.apply(t,arguments)}},to={},Tie=mn,$ie=kr,TR=Tie&&$ie(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Oie=Qo,Cie=String,Aie=TypeError,Ni=function(e){if(Oie(e))return e;throw new Aie(Cie(e)+" is not an object")},Iie=mn,Rie=_R,Pie=TR,Zp=Ni,$R=vb,Nie=TypeError,xb=Object.defineProperty,Mie=Object.getOwnPropertyDescriptor,Sb="enumerable",_b="configurable",Eb="writable";to.f=Iie?Pie?function(t,r,n){if(Zp(t),r=$R(r),Zp(n),typeof t=="function"&&r==="prototype"&&"value"in n&&Eb in n&&!n[Eb]){var o=Mie(t,r);o&&o[Eb]&&(t[r]=n.value,n={configurable:_b in n?n[_b]:o[_b],enumerable:Sb in n?n[Sb]:o[Sb],writable:!1})}return xb(t,r,n)}:xb:function(t,r,n){if(Zp(t),r=$R(r),Zp(n),Rie)try{return xb(t,r,n)}catch{}if("get"in n||"set"in n)throw new Nie("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var jie=mn,Die=to,Fie=Al,Vp=jie?function(e,t,r){return Die.f(e,t,Fie(1,r))}:function(e,t,r){return e[t]=r,e},Pl=Er,Lie=Yv,qie=Qv,Bie=tn,Uie=Cl.f,zie=Sie,Ds=Ur,Zie=wb,Fs=Vp,OR=On,Vie=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 Lie(e,this,arguments)};return t.prototype=e.prototype,t},Zt=function(e,t){var r=e.target,n=e.global,o=e.stat,i=e.proto,a=n?Pl:o?Pl[r]:Pl[r]&&Pl[r].prototype,s=n?Ds:Ds[r]||Fs(Ds,r,{})[r],c=s.prototype,l,u,d,p,f,h,y,m,g;for(p in t)l=zie(n?p:r+(o?".":"#")+p,e.forced),u=!l&&a&&OR(a,p),h=s[p],u&&(e.dontCallGetSet?(g=Uie(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=Zie(f,Pl):e.wrap&&u?m=Vie(f):i&&Bie(f)?m=qie(f):m=f,(e.sham||f&&f.sham||h&&h.sham)&&Fs(m,"sham",!0),Fs(s,p,m),i&&(d=r+"Prototype",OR(Ds,d)||Fs(Ds,d,{}),Fs(Ds[d],p,f),e.real&&c&&(l||!c[p])&&Fs(c,p,f)))},Hie=va,Ls=Array.isArray||function(t){return Hie(t)==="Array"},Wie=Zt,Kie=Ls;Wie({target:"Array",stat:!0},{isArray:Kie});var Gie=Ur,Jie=Gie.Array.isArray,Yie=Jie,CR=Yie,Xie=CR,Qie=Xie,eae=Qie,tae=eae,rae=tae;const AR=St(rae);function nae(e){if(AR(e))return e}var oae=Math.ceil,iae=Math.floor,aae=Math.trunc||function(t){var r=+t;return(r>0?iae:oae)(r)},sae=aae,Hp=function(e){var t=+e;return t!==t||t===0?0:sae(t)},cae=Hp,lae=Math.min,uae=function(e){var t=cae(e);return t>0?lae(t,9007199254740991):0},dae=uae,ba=function(e){return dae(e.length)},fae=TypeError,pae=9007199254740991,kb=function(e){if(e>pae)throw fae("Maximum allowed index exceeded");return e},hae=mn,mae=to,yae=Al,Nl=function(e,t,r){hae?mae.f(e,t,yae(0,r)):e[t]=r},gae=Nr,vae=gae("toStringTag"),IR={};IR[vae]="z";var Tb=String(IR)==="[object z]",bae=Tb,wae=tn,Wp=va,xae=Nr,Sae=xae("toStringTag"),_ae=Object,Eae=Wp(function(){return arguments}())==="Arguments",kae=function(e,t){try{return e[t]}catch{}},Ml=bae?Wp:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=kae(t=_ae(e),Sae))=="string"?r:Eae?Wp(t):(n=Wp(t))==="Object"&&wae(t.callee)?"Arguments":n},Tae=Tr,$ae=tn,$b=mb,Oae=Tae(Function.toString);$ae($b.inspectSource)||($b.inspectSource=function(e){return Oae(e)});var Cae=$b.inspectSource,Aae=Tr,Iae=kr,RR=tn,Rae=Ml,Pae=To,Nae=Cae,PR=function(){},NR=Pae("Reflect","construct"),Ob=/^\s*(?:class|function)\b/,Mae=Aae(Ob.exec),jae=!Ob.test(PR),jl=function(t){if(!RR(t))return!1;try{return NR(PR,[],t),!0}catch{return!1}},MR=function(t){if(!RR(t))return!1;switch(Rae(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return jae||!!Mae(Ob,Nae(t))}catch{return!0}};MR.sham=!0;var Cb=!NR||Iae(function(){var e;return jl(jl.call)||!jl(Object)||!jl(function(){e=!0})||e})?MR:jl,jR=Ls,Dae=Cb,Fae=Qo,Lae=Nr,qae=Lae("species"),DR=Array,Bae=function(e){var t;return jR(e)&&(t=e.constructor,Dae(t)&&(t===DR||jR(t.prototype))?t=void 0:Fae(t)&&(t=t[qae],t===null&&(t=void 0))),t===void 0?DR:t},Uae=Bae,Ab=function(e,t){return new(Uae(e))(t===0?0:t)},zae=kr,Zae=Nr,Vae=lb,Hae=Zae("species"),Kp=function(e){return Vae>=51||!zae(function(){var t=[],r=t.constructor={};return r[Hae]=function(){return{foo:1}},t[e](Boolean).foo!==1})},Wae=Zt,Kae=kr,Gae=Ls,Jae=Qo,Yae=ti,Xae=ba,FR=kb,LR=Nl,Qae=Ab,ese=Kp,tse=Nr,rse=lb,qR=tse("isConcatSpreadable"),nse=rse>=51||!Kae(function(){var e=[];return e[qR]=!1,e.concat()[0]!==e}),ose=function(e){if(!Jae(e))return!1;var t=e[qR];return t!==void 0?!!t:Gae(e)},ise=!nse||!ese("concat");Wae({target:"Array",proto:!0,arity:1,forced:ise},{concat:function(t){var r=Yae(this),n=Qae(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],ose(l))for(c=Xae(l),FR(o+c),a=0;a<c;a++,o++)a in l&&LR(n,o,l[a]);else FR(o+1),LR(n,o++,l);return n.length=o,n}});var ase=Ml,sse=String,Dl=function(e){if(ase(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return sse(e)},Gp={},cse=Hp,lse=Math.max,use=Math.min,Ib=function(e,t){var r=cse(e);return r<0?lse(r+t,0):use(r,t)},dse=ko,fse=Ib,pse=ba,BR=function(e){return function(t,r,n){var o=dse(t),i=pse(o);if(i===0)return!e&&-1;var a=fse(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}},UR={includes:BR(!0),indexOf:BR(!1)},Jp={},hse=Tr,Rb=On,mse=ko,yse=UR.indexOf,gse=Jp,zR=hse([].push),ZR=function(e,t){var r=mse(e),n=0,o=[],i;for(i in r)!Rb(gse,i)&&Rb(r,i)&&zR(o,i);for(;t.length>n;)Rb(r,i=t[n++])&&(~yse(o,i)||zR(o,i));return o},Pb=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],vse=ZR,bse=Pb,Nb=Object.keys||function(t){return vse(t,bse)},wse=mn,xse=TR,Sse=to,_se=Ni,Ese=ko,kse=Nb;Gp.f=wse&&!xse?Object.defineProperties:function(t,r){_se(t);for(var n=Ese(r),o=kse(r),i=o.length,a=0,s;i>a;)Sse.f(t,s=o[a++],n[s]);return t};var Tse=To,$se=Tse("document","documentElement"),Ose=Ms,Cse=yb,VR=Ose("keys"),Yp=function(e){return VR[e]||(VR[e]=Cse(e))},Ase=Ni,Ise=Gp,HR=Pb,Rse=Jp,Pse=$se,Nse=SR,Mse=Yp,WR=">",KR="<",Mb="prototype",jb="script",GR=Mse("IE_PROTO"),Db=function(){},JR=function(e){return KR+jb+WR+e+KR+"/"+jb+WR},YR=function(e){e.write(JR("")),e.close();var t=e.parentWindow.Object;return e=null,t},jse=function(){var e=Nse("iframe"),t="java"+jb+":",r;return e.style.display="none",Pse.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(JR("document.F=Object")),r.close(),r.F},Xp,Qp=function(){try{Xp=new ActiveXObject("htmlfile")}catch{}Qp=typeof document<"u"?document.domain&&Xp?YR(Xp):jse():YR(Xp);for(var e=HR.length;e--;)delete Qp[Mb][HR[e]];return Qp()};Rse[GR]=!0;var Fb=Object.create||function(t,r){var n;return t!==null?(Db[Mb]=Ase(t),n=new Db,Db[Mb]=null,n[GR]=t):n=Qp(),r===void 0?n:Ise.f(n,r)},eh={},Dse=ZR,Fse=Pb,Lse=Fse.concat("length","prototype");eh.f=Object.getOwnPropertyNames||function(t){return Dse(t,Lse)};var XR={},qse=Tr,th=qse([].slice),Bse=va,Use=ko,QR=eh.f,zse=th,eP=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Zse=function(e){try{return QR(e)}catch{return zse(eP)}};XR.f=function(t){return eP&&Bse(t)==="Window"?Zse(t):QR(Use(t))};var rh={};rh.f=Object.getOwnPropertySymbols;var Vse=Vp,nh=function(e,t,r,n){return n&&n.enumerable?e[t]=r:Vse(e,t,r),e},Hse=to,Wse=function(e,t,r){return Hse.f(e,t,r)},Fl={},Kse=Nr;Fl.f=Kse;var tP=Ur,Gse=On,Jse=Fl,Yse=to.f,or=function(e){var t=tP.Symbol||(tP.Symbol={});Gse(t,e)||Yse(t,e,{value:Jse.f(e)})},Xse=Eo,Qse=To,ece=Nr,tce=nh,rP=function(){var e=Qse("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=ece("toPrimitive");t&&!t[n]&&tce(t,n,function(o){return Xse(r,this)},{arity:1})},rce=Tb,nce=Ml,oce=rce?{}.toString:function(){return"[object "+nce(this)+"]"},ice=Tb,ace=to.f,sce=Vp,cce=On,lce=oce,uce=Nr,nP=uce("toStringTag"),qs=function(e,t,r,n){var o=r?e:e&&e.prototype;o&&(cce(o,nP)||ace(o,nP,{configurable:!0,value:t}),n&&!ice&&sce(o,"toString",lce))},dce=Er,fce=tn,oP=dce.WeakMap,pce=fce(oP)&&/native code/.test(String(oP)),hce=pce,iP=Er,mce=Qo,yce=Vp,Lb=On,qb=mb,gce=Yp,vce=Jp,aP="Object already initialized",Bb=iP.TypeError,bce=iP.WeakMap,oh,Ll,ih,wce=function(e){return ih(e)?Ll(e):oh(e,{})},xce=function(e){return function(t){var r;if(!mce(t)||(r=Ll(t)).type!==e)throw new Bb("Incompatible receiver, "+e+" required");return r}};if(hce||qb.state){var $o=qb.state||(qb.state=new bce);$o.get=$o.get,$o.has=$o.has,$o.set=$o.set,oh=function(e,t){if($o.has(e))throw new Bb(aP);return t.facade=e,$o.set(e,t),t},Ll=function(e){return $o.get(e)||{}},ih=function(e){return $o.has(e)}}else{var Bs=gce("state");vce[Bs]=!0,oh=function(e,t){if(Lb(e,Bs))throw new Bb(aP);return t.facade=e,yce(e,Bs,t),t},Ll=function(e){return Lb(e,Bs)?e[Bs]:{}},ih=function(e){return Lb(e,Bs)}}var Ub={set:oh,get:Ll,has:ih,enforce:wce,getterFor:xce},Sce=wb,_ce=Tr,Ece=rR,kce=ti,Tce=ba,$ce=Ab,sP=_ce([].push),Mi=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=kce(c),f=Ece(p),h=Tce(f),y=Sce(l,u),m=0,g=d||$ce,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:sP(v,b)}else switch(e){case 4:return!1;case 7:sP(v,b)}return i?-1:n||o?o:v}},zb={forEach:Mi(0),map:Mi(1),filter:Mi(2),some:Mi(3),every:Mi(4),find:Mi(5),findIndex:Mi(6),filterReject:Mi(7)},ah=Zt,ql=Er,Zb=Eo,Oce=Tr,Us=mn,zs=Ns,Cce=kr,Mr=On,Ace=ei,Vb=Ni,sh=ko,Hb=vb,Ice=Dl,Wb=Al,Zs=Fb,cP=Nb,Rce=eh,lP=XR,Pce=rh,uP=Cl,dP=to,Nce=Gp,fP=tb,pP=nh,Mce=Wse,Kb=Ms,jce=Yp,hP=Jp,mP=yb,Dce=Nr,Fce=Fl,Lce=or,qce=rP,Bce=qs,yP=Ub,ch=zb.forEach,yn=jce("hidden"),lh="Symbol",Bl="prototype",Uce=yP.set,gP=yP.getterFor(lh),ro=Object[Bl],wa=ql.Symbol,Ul=wa&&wa[Bl],zce=ql.RangeError,Zce=ql.TypeError,Gb=ql.QObject,vP=uP.f,xa=dP.f,bP=lP.f,Vce=fP.f,wP=Oce([].push),ri=Kb("symbols"),zl=Kb("op-symbols"),Hce=Kb("wks"),Jb=!Gb||!Gb[Bl]||!Gb[Bl].findChild,xP=function(e,t,r){var n=vP(ro,t);n&&delete ro[t],xa(e,t,r),n&&e!==ro&&xa(ro,t,n)},Yb=Us&&Cce(function(){return Zs(xa({},"a",{get:function(){return xa(this,"a",{value:7}).a}})).a!==7})?xP:xa,Xb=function(e,t){var r=ri[e]=Zs(Ul);return Uce(r,{type:lh,tag:e,description:t}),Us||(r.description=t),r},uh=function(t,r,n){t===ro&&uh(zl,r,n),Vb(t);var o=Hb(r);return Vb(n),Mr(ri,o)?(n.enumerable?(Mr(t,yn)&&t[yn][o]&&(t[yn][o]=!1),n=Zs(n,{enumerable:Wb(0,!1)})):(Mr(t,yn)||xa(t,yn,Wb(1,Zs(null))),t[yn][o]=!0),Yb(t,o,n)):xa(t,o,n)},Qb=function(t,r){Vb(t);var n=sh(r),o=cP(n).concat(kP(n));return ch(o,function(i){(!Us||Zb(SP,n,i))&&uh(t,i,n[i])}),t},Wce=function(t,r){return r===void 0?Zs(t):Qb(Zs(t),r)},SP=function(t){var r=Hb(t),n=Zb(Vce,this,r);return this===ro&&Mr(ri,r)&&!Mr(zl,r)?!1:n||!Mr(this,r)||!Mr(ri,r)||Mr(this,yn)&&this[yn][r]?n:!0},_P=function(t,r){var n=sh(t),o=Hb(r);if(!(n===ro&&Mr(ri,o)&&!Mr(zl,o))){var i=vP(n,o);return i&&Mr(ri,o)&&!(Mr(n,yn)&&n[yn][o])&&(i.enumerable=!0),i}},EP=function(t){var r=bP(sh(t)),n=[];return ch(r,function(o){!Mr(ri,o)&&!Mr(hP,o)&&wP(n,o)}),n},kP=function(e){var t=e===ro,r=bP(t?zl:sh(e)),n=[];return ch(r,function(o){Mr(ri,o)&&(!t||Mr(ro,o))&&wP(n,ri[o])}),n};zs||(wa=function(){if(Ace(Ul,this))throw new Zce("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:Ice(arguments[0]),r=mP(t),n=function(o){var i=this===void 0?ql:this;i===ro&&Zb(n,zl,o),Mr(i,yn)&&Mr(i[yn],r)&&(i[yn][r]=!1);var a=Wb(1,o);try{Yb(i,r,a)}catch(s){if(!(s instanceof zce))throw s;xP(i,r,a)}};return Us&&Jb&&Yb(ro,r,{configurable:!0,set:n}),Xb(r,t)},Ul=wa[Bl],pP(Ul,"toString",function(){return gP(this).tag}),pP(wa,"withoutSetter",function(e){return Xb(mP(e),e)}),fP.f=SP,dP.f=uh,Nce.f=Qb,uP.f=_P,Rce.f=lP.f=EP,Pce.f=kP,Fce.f=function(e){return Xb(Dce(e),e)},Us&&Mce(Ul,"description",{configurable:!0,get:function(){return gP(this).description}})),ah({global:!0,constructor:!0,wrap:!0,forced:!zs,sham:!zs},{Symbol:wa}),ch(cP(Hce),function(e){Lce(e)}),ah({target:lh,stat:!0,forced:!zs},{useSetter:function(){Jb=!0},useSimple:function(){Jb=!1}}),ah({target:"Object",stat:!0,forced:!zs,sham:!Us},{create:Wce,defineProperty:uh,defineProperties:Qb,getOwnPropertyDescriptor:_P}),ah({target:"Object",stat:!0,forced:!zs},{getOwnPropertyNames:EP}),qce(),Bce(wa,lh),hP[yn]=!0;var Kce=Ns,TP=Kce&&!!Symbol.for&&!!Symbol.keyFor,Gce=Zt,Jce=To,Yce=On,Xce=Dl,$P=Ms,Qce=TP,ew=$P("string-to-symbol-registry"),ele=$P("symbol-to-string-registry");Gce({target:"Symbol",stat:!0,forced:!Qce},{for:function(e){var t=Xce(e);if(Yce(ew,t))return ew[t];var r=Jce("Symbol")(t);return ew[t]=r,ele[r]=t,r}});var tle=Zt,rle=On,nle=Il,ole=zp,ile=Ms,ale=TP,OP=ile("symbol-to-string-registry");tle({target:"Symbol",stat:!0,forced:!ale},{keyFor:function(t){if(!nle(t))throw new TypeError(ole(t)+" is not a symbol");if(rle(OP,t))return OP[t]}});var sle=Tr,CP=Ls,cle=tn,AP=va,lle=Dl,IP=sle([].push),ule=function(e){if(cle(e))return e;if(CP(e)){for(var t=e.length,r=[],n=0;n<t;n++){var o=e[n];typeof o=="string"?IP(r,o):(typeof o=="number"||AP(o)==="Number"||AP(o)==="String")&&IP(r,lle(o))}var i=r.length,a=!0;return function(s,c){if(a)return a=!1,c;if(CP(this))return c;for(var l=0;l<i;l++)if(r[l]===s)return c}}},dle=Zt,RP=To,PP=Yv,fle=Eo,Zl=Tr,NP=kr,MP=tn,jP=Il,DP=th,ple=ule,hle=Ns,mle=String,ji=RP("JSON","stringify"),dh=Zl(/./.exec),FP=Zl("".charAt),yle=Zl("".charCodeAt),gle=Zl("".replace),vle=Zl(1 .toString),ble=/[\uD800-\uDFFF]/g,LP=/^[\uD800-\uDBFF]$/,qP=/^[\uDC00-\uDFFF]$/,BP=!hle||NP(function(){var e=RP("Symbol")("stringify detection");return ji([e])!=="[null]"||ji({a:e})!=="{}"||ji(Object(e))!=="{}"}),UP=NP(function(){return ji("\uDF06\uD834")!=='"\\udf06\\ud834"'||ji("\uDEAD")!=='"\\udead"'}),wle=function(e,t){var r=DP(arguments),n=ple(t);if(!(!MP(n)&&(e===void 0||jP(e))))return r[1]=function(o,i){if(MP(n)&&(i=fle(n,this,mle(o),i)),!jP(i))return i},PP(ji,null,r)},xle=function(e,t,r){var n=FP(r,t-1),o=FP(r,t+1);return dh(LP,e)&&!dh(qP,o)||dh(qP,e)&&!dh(LP,n)?"\\u"+vle(yle(e,0),16):e};ji&&dle({target:"JSON",stat:!0,arity:3,forced:BP||UP},{stringify:function(t,r,n){var o=DP(arguments),i=PP(BP?wle:ji,null,o);return UP&&typeof i=="string"?gle(i,ble,xle):i}});var Sle=Zt,_le=Ns,Ele=kr,zP=rh,kle=ti,Tle=!_le||Ele(function(){zP.f(1)});Sle({target:"Object",stat:!0,forced:Tle},{getOwnPropertySymbols:function(t){var r=zP.f;return r?r(kle(t)):[]}});var $le=or;$le("asyncIterator");var Ole=or;Ole("hasInstance");var Cle=or;Cle("isConcatSpreadable");var Ale=or;Ale("iterator");var Ile=or;Ile("match");var Rle=or;Rle("matchAll");var Ple=or;Ple("replace");var Nle=or;Nle("search");var Mle=or;Mle("species");var jle=or;jle("split");var Dle=or,Fle=rP;Dle("toPrimitive"),Fle();var Lle=To,qle=or,Ble=qs;qle("toStringTag"),Ble(Lle("Symbol"),"Symbol");var Ule=or;Ule("unscopables");var zle=Er,Zle=qs;Zle(zle.JSON,"JSON",!0);var Vle=Ur,Hle=Vle.Symbol,Vs={},tw=mn,Wle=On,ZP=Function.prototype,Kle=tw&&Object.getOwnPropertyDescriptor,rw=Wle(ZP,"name"),Gle=rw&&(function(){}).name==="something",Jle=rw&&(!tw||tw&&Kle(ZP,"name").configurable),Yle={EXISTS:rw,PROPER:Gle,CONFIGURABLE:Jle},Xle=kr,Qle=!Xle(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),eue=On,tue=tn,rue=ti,nue=Yp,oue=Qle,VP=nue("IE_PROTO"),nw=Object,iue=nw.prototype,HP=oue?nw.getPrototypeOf:function(e){var t=rue(e);if(eue(t,VP))return t[VP];var r=t.constructor;return tue(r)&&t instanceof r?r.prototype:t instanceof nw?iue:null},aue=kr,sue=tn,cue=Qo,lue=Fb,WP=HP,uue=nh,due=Nr,ow=due("iterator"),KP=!1,ni,iw,aw;[].keys&&(aw=[].keys(),"next"in aw?(iw=WP(WP(aw)),iw!==Object.prototype&&(ni=iw)):KP=!0);var fue=!cue(ni)||aue(function(){var e={};return ni[ow].call(e)!==e});fue?ni={}:ni=lue(ni),sue(ni[ow])||uue(ni,ow,function(){return this});var GP={IteratorPrototype:ni,BUGGY_SAFARI_ITERATORS:KP},pue=GP.IteratorPrototype,hue=Fb,mue=Al,yue=qs,gue=Vs,vue=function(){return this},bue=function(e,t,r,n){var o=t+" Iterator";return e.prototype=hue(pue,{next:mue(+!n,r)}),yue(e,o,!1,!0),gue[o]=vue,e},wue=Zt,xue=Eo,JP=Yle,Sue=bue,_ue=HP,Eue=qs,YP=nh,kue=Nr,XP=Vs,QP=GP,Tue=JP.PROPER;JP.CONFIGURABLE,QP.IteratorPrototype;var fh=QP.BUGGY_SAFARI_ITERATORS,sw=kue("iterator"),eN="keys",ph="values",tN="entries",$ue=function(){return this},rN=function(e,t,r,n,o,i,a){Sue(r,t,n);var s=function(g){if(g===o&&p)return p;if(!fh&&g&&g in u)return u[g];switch(g){case eN:return function(){return new r(this,g)};case ph:return function(){return new r(this,g)};case tN:return function(){return new r(this,g)}}return function(){return new r(this)}},c=t+" Iterator",l=!1,u=e.prototype,d=u[sw]||u["@@iterator"]||o&&u[o],p=!fh&&d||s(o),f=t==="Array"&&u.entries||d,h,y,m;if(f&&(h=_ue(f.call(new e)),h!==Object.prototype&&h.next&&(Eue(h,c,!0,!0),XP[c]=$ue)),Tue&&o===ph&&d&&d.name!==ph&&(l=!0,p=function(){return xue(d,this)}),o)if(y={values:s(ph),keys:i?p:s(eN),entries:s(tN)},a)for(m in y)(fh||l||!(m in u))&&YP(u,m,y[m]);else wue({target:t,proto:!0,forced:fh||l},y);return a&&u[sw]!==p&&YP(u,sw,p,{name:o}),XP[t]=p,y},nN=function(e,t){return{value:e,done:t}},Oue=ko,oN=Vs,iN=Ub;to.f;var Cue=rN,hh=nN,aN="Array Iterator",Aue=iN.set,Iue=iN.getterFor(aN);Cue(Array,"Array",function(e,t){Aue(this,{type:aN,target:Oue(e),index:0,kind:t})},function(){var e=Iue(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=null,hh(void 0,!0);switch(e.kind){case"keys":return hh(r,!1);case"values":return hh(t[r],!1)}return hh([r,t[r]],!1)},"values"),oN.Arguments=oN.Array;var Rue={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},Pue=Rue,Nue=Er,Mue=qs,sN=Vs;for(var cw in Pue)Mue(Nue[cw],cw),sN[cw]=sN.Array;var jue=Hle,Due=jue,Fue=Nr,Lue=to.f,cN=Fue("metadata"),lN=Function.prototype;lN[cN]===void 0&&Lue(lN,cN,{value:null});var que=or;que("asyncDispose");var Bue=or;Bue("dispose");var Uue=or;Uue("metadata");var zue=Due,Zue=zue,Vue=To,Hue=Tr,lw=Vue("Symbol"),Wue=lw.keyFor,Kue=Hue(lw.prototype.valueOf),uN=lw.isRegisteredSymbol||function(t){try{return Wue(Kue(t))!==void 0}catch{return!1}},Gue=Zt,Jue=uN;Gue({target:"Symbol",stat:!0},{isRegisteredSymbol:Jue});for(var Yue=Ms,dN=To,Xue=Tr,Que=Il,ede=Nr,mh=dN("Symbol"),fN=mh.isWellKnownSymbol,pN=dN("Object","getOwnPropertyNames"),tde=Xue(mh.prototype.valueOf),hN=Yue("wks"),uw=0,mN=pN(mh),rde=mN.length;uw<rde;uw++)try{var yN=mN[uw];Que(mh[yN])&&ede(yN)}catch{}var gN=function(t){if(fN&&fN(t))return!0;try{for(var r=tde(t),n=0,o=pN(hN),i=o.length;n<i;n++)if(hN[o[n]]==r)return!0}catch{}return!1},nde=Zt,ode=gN;nde({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:ode});var ide=or;ide("customMatcher");var ade=or;ade("observable");var sde=Zt,cde=uN;sde({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:cde});var lde=Zt,ude=gN;lde({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:ude});var dde=or;dde("matcher");var fde=or;fde("metadataKey");var pde=or;pde("patternMatch");var hde=or;hde("replaceAll");var mde=Zue,yde=mde,gde=yde;const Hs=St(gde);var dw=Tr,vde=Hp,bde=Dl,wde=ob,xde=dw("".charAt),vN=dw("".charCodeAt),Sde=dw("".slice),bN=function(e){return function(t,r){var n=bde(wde(t)),o=vde(r),i=n.length,a,s;return o<0||o>=i?e?"":void 0:(a=vN(n,o),a<55296||a>56319||o+1===i||(s=vN(n,o+1))<56320||s>57343?e?xde(n,o):a:e?Sde(n,o,o+2):(a-55296<<10)+(s-56320)+65536)}},_de={codeAt:bN(!1),charAt:bN(!0)},Ede=_de.charAt,kde=Dl,wN=Ub,Tde=rN,xN=nN,SN="String Iterator",$de=wN.set,Ode=wN.getterFor(SN);Tde(String,"String",function(e){$de(this,{type:SN,string:kde(e),index:0})},function(){var t=Ode(this),r=t.string,n=t.index,o;return n>=r.length?xN(void 0,!0):(o=Ede(r,n),t.index+=o.length,xN(o,!1))});var Cde=Ml,_N=db,Ade=nb,Ide=Vs,Rde=Nr,Pde=Rde("iterator"),fw=function(e){if(!Ade(e))return _N(e,Pde)||_N(e,"@@iterator")||Ide[Cde(e)]},Nde=fw,Mde=Nde,jde=Mde,Dde=jde,Fde=Dde,Lde=Fde,qde=Lde,Bde=qde,Ude=Bde;const EN=St(Ude);var zde=mn,Zde=Ls,Vde=TypeError,Hde=Object.getOwnPropertyDescriptor,Wde=zde&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),kN=Wde?function(e,t){if(Zde(e)&&!Hde(e,"length").writable)throw new Vde("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Kde=Zt,Gde=ti,Jde=ba,Yde=kN,Xde=kb,Qde=kr,efe=Qde(function(){return[].push.call({length:4294967296},1)!==4294967297}),tfe=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},rfe=efe||!tfe();Kde({target:"Array",proto:!0,arity:1,forced:rfe},{push:function(t){var r=Gde(this),n=Jde(r),o=arguments.length;Xde(n+o);for(var i=0;i<o;i++)r[n]=arguments[i],n++;return Yde(r,n),n}});var nfe=Er,ofe=Ur,Sa=function(e,t){var r=ofe[e+"Prototype"],n=r&&r[t];if(n)return n;var o=nfe[e],i=o&&o.prototype;return i&&i[t]},ife=Sa,afe=ife("Array","push"),sfe=ei,cfe=afe,pw=Array.prototype,lfe=function(e){var t=e.push;return e===pw||sfe(pw,e)&&t===pw.push?cfe:t},ufe=lfe,dfe=ufe,ffe=dfe,pfe=ffe,hfe=pfe,mfe=hfe,yfe=mfe;const gfe=St(yfe);function vfe(e,t){var r=e==null?null:typeof Hs<"u"&&EN(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)&&(gfe(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 bfe=Zt,TN=Ls,wfe=Cb,xfe=Qo,$N=Ib,Sfe=ba,_fe=ko,Efe=Nl,kfe=Nr,Tfe=Kp,$fe=th,Ofe=Tfe("slice"),Cfe=kfe("species"),hw=Array,Afe=Math.max;bfe({target:"Array",proto:!0,forced:!Ofe},{slice:function(t,r){var n=_fe(this),o=Sfe(n),i=$N(t,o),a=$N(r===void 0?o:r,o),s,c,l;if(TN(n)&&(s=n.constructor,wfe(s)&&(s===hw||TN(s.prototype))?s=void 0:xfe(s)&&(s=s[Cfe],s===null&&(s=void 0)),s===hw||s===void 0))return $fe(n,i,a);for(c=new(s===void 0?hw:s)(Afe(a-i,0)),l=0;i<a;i++,l++)i in n&&Efe(c,l,n[i]);return c.length=l,c}});var Ife=Sa,Rfe=Ife("Array","slice"),Pfe=ei,Nfe=Rfe,mw=Array.prototype,Mfe=function(e){var t=e.slice;return e===mw||Pfe(mw,e)&&t===mw.slice?Nfe:t},jfe=Mfe,Dfe=jfe,Ffe=Dfe,Lfe=Ffe,qfe=Lfe,Bfe=qfe,Ufe=Bfe;const zfe=St(Ufe);var Zfe=Eo,ON=Ni,Vfe=db,Hfe=function(e,t,r){var n,o;ON(e);try{if(n=Vfe(e,"return"),!n){if(t==="throw")throw r;return r}n=Zfe(n,e)}catch(i){o=!0,n=i}if(t==="throw")throw r;if(o)throw n;return ON(n),r},Wfe=Ni,Kfe=Hfe,Gfe=function(e,t,r,n){try{return n?t(Wfe(r)[0],r[1]):t(r)}catch(o){Kfe(e,"throw",o)}},Jfe=Nr,Yfe=Vs,Xfe=Jfe("iterator"),Qfe=Array.prototype,epe=function(e){return e!==void 0&&(Yfe.Array===e||Qfe[Xfe]===e)},tpe=Eo,rpe=ub,npe=Ni,ope=zp,ipe=fw,ape=TypeError,spe=function(e,t){var r=arguments.length<2?ipe(e):t;if(rpe(r))return npe(tpe(r,e));throw new ape(ope(e)+" is not iterable")},cpe=wb,lpe=Eo,upe=ti,dpe=Gfe,fpe=epe,ppe=Cb,hpe=ba,CN=Nl,mpe=spe,ype=fw,AN=Array,gpe=function(t){var r=upe(t),n=ppe(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=cpe(i,o>2?arguments[2]:void 0));var s=ype(r),c=0,l,u,d,p,f,h;if(s&&!(this===AN&&fpe(s)))for(u=n?new this:[],p=mpe(r,s),f=p.next;!(d=lpe(f,p)).done;c++)h=a?dpe(p,i,[d.value,c],!0):d.value,CN(u,c,h);else for(l=hpe(r),u=n?new this(l):AN(l);l>c;c++)h=a?i(r[c],c):r[c],CN(u,c,h);return u.length=c,u},vpe=Nr,IN=vpe("iterator"),RN=!1;try{var bpe=0,PN={next:function(){return{done:!!bpe++}},return:function(){RN=!0}};PN[IN]=function(){return this},Array.from(PN,function(){throw 2})}catch{}var wpe=function(e,t){try{if(!t&&!RN)return!1}catch{return!1}var r=!1;try{var n={};n[IN]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch{}return r},xpe=Zt,Spe=gpe,_pe=wpe,Epe=!_pe(function(e){Array.from(e)});xpe({target:"Array",stat:!0,forced:Epe},{from:Spe});var kpe=Ur,Tpe=kpe.Array.from,$pe=Tpe,Ope=$pe,Cpe=Ope,Ape=Cpe,Ipe=Ape,Rpe=Ipe,Ppe=Rpe;const NN=St(Ppe);function yw(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 MN(e,t){if(e){var r;if(typeof e=="string")return yw(e,t);var n=zfe(r={}.toString.call(e)).call(r,8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?NN(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yw(e,t):void 0}}function Npe(){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 Oo(e,t){return nae(e)||vfe(e,t)||MN(e,t)||Npe()}var jN={exports:{}};/*!
|
|
402
402
|
Copyright (c) 2018 Jed Watson.
|
|
403
403
|
Licensed under the MIT License (MIT), see
|
|
@@ -424,4 +424,4 @@ object-assign
|
|
|
424
424
|
Valid keys: `+JSON.stringify(Object.keys(M),null," "));var le=ye(he,_e,T,ce,pe+"."+_e,r);if(le)return le}return null}return m(E)}function U(M){switch(typeof M){case"number":case"string":case"undefined":return!0;case"boolean":return!M;case"object":if(Array.isArray(M))return M.every(U);if(M===null||s(M))return!0;var E=d(M);if(E){var B=E.call(M),Q;if(E!==M.entries){for(;!(Q=B.next()).done;)if(!U(Q.value))return!1}else for(;!(Q=B.next()).done;){var T=Q.value;if(T&&!U(T[1]))return!1}}else return!1;return!0;default:return!1}}function Z(M,E){return M==="symbol"?!0:E?E["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&E instanceof Symbol:!1}function L(M){var E=typeof M;return Array.isArray(M)?"array":M instanceof RegExp?"object":Z(E,M)?"symbol":E}function q(M){if(typeof M>"u"||M===null)return""+M;var E=L(M);if(E==="object"){if(M instanceof Date)return"date";if(M instanceof RegExp)return"regexp"}return E}function W(M){var E=q(M);switch(E){case"array":case"object":return"an "+E;case"boolean":case"date":case"regexp":return"a "+E;default:return E}}function J(M){return!M.constructor||!M.constructor.name?p:M.constructor.name}return f.checkPropTypes=n,f.resetWarningCache=n.resetWarningCache,f.PropTypes=f,f},_w}var Ew,VN;function Bpe(){if(VN)return Ew;VN=1;var e=xw();function t(){}function r(){}return r.resetWarningCache=t,Ew=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},Ew}if(process.env.NODE_ENV!=="production"){var Upe=qN(),zpe=!0;vw.exports=qpe()(Upe.isElement,zpe)}else vw.exports=Bpe()();var Zpe=vw.exports;const Rt=St(Zpe);var kw=O.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});kw.displayName="ScrollToBottomFunctionContext";function HN(){return O.useContext(kw)}function Vpe(){var e=HN(),t=e.scrollToEnd;return t}var Tw=O.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Tw.displayName="ScrollToBottomState1Context";var $w=O.createContext({animating:!1,animatingToEnd:!1,sticky:!0});$w.displayName="ScrollToBottomState2Context";var Ow=O.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});Ow.displayName="ScrollToBottomStateContext";var WN=[Ow,Tw,$w];function Hpe(e){return O.useContext(WN[e]||WN[0])}function KN(){var e=Hpe(2),t=e.sticky;return[t]}var gh=O.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});gh.displayName="ScrollToBottomInternalContext";function Wpe(){return O.useContext(gh)}function Cw(){var e=Wpe(),t=e.styleToClassName;return t}var Kpe={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)"}},Aw=function(t){var r=t.children,n=t.className,o=KN(),i=Oo(o,1),a=i[0],s=Cw()(Kpe),c=Vpe();return!a&&O.createElement("button",{className:gw(s,(n||"")+""),onClick:c,type:"button"},r)};Aw.defaultProps={children:void 0,className:""},Aw.propTypes={children:Rt.any,className:Rt.string};var GN={exports:{}},Gpe=Zt,Jpe=mn,JN=to.f;Gpe({target:"Object",stat:!0,forced:Object.defineProperty!==JN,sham:!Jpe},{defineProperty:JN});var Ype=Ur,YN=Ype.Object,Xpe=GN.exports=function(t,r,n){return YN.defineProperty(t,r,n)};YN.defineProperty.sham&&(Xpe.sham=!0);var Qpe=GN.exports,ehe=Qpe,XN=ehe,the=XN,rhe=the,nhe=rhe,ohe=nhe,ihe=ohe;const ahe=St(ihe);var she=Fl,che=she.f("iterator"),lhe=che,uhe=lhe,dhe=uhe,fhe=dhe,phe=fhe,hhe=phe,mhe=hhe;const yhe=St(mhe);function Vl(e){"@babel/helpers - typeof";return Vl=typeof Hs=="function"&&typeof yhe=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Hs=="function"&&t.constructor===Hs&&t!==Hs.prototype?"symbol":typeof t},Vl(e)}var ghe=Fl,vhe=ghe.f("toPrimitive"),bhe=vhe,whe=bhe,xhe=whe,She=xhe,_he=She,Ehe=_he,khe=Ehe;const The=St(khe);function $he(e,t){if(Vl(e)!="object"||!e)return e;var r=e[The];if(r!==void 0){var n=r.call(e,t||"default");if(Vl(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ohe(e){var t=$he(e,"string");return Vl(t)=="symbol"?t:t+""}function Che(e,t,r){return(t=Ohe(t))in e?ahe(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Ahe(e){if(AR(e))return yw(e)}function Ihe(e){if(typeof Hs<"u"&&EN(e)!=null||e["@@iterator"]!=null)return NN(e)}function Rhe(){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 Ahe(e)||Ihe(e)||MN(e)||Rhe()}var vh=function(e){return e&&e.Math==Math&&e},Cn=vh(typeof globalThis=="object"&&globalThis)||vh(typeof window=="object"&&window)||vh(typeof self=="object"&&self)||vh(typeof He=="object"&&He)||function(){return this}()||Function("return this")(),Iw={},no=function(e){try{return!!e()}catch{return!0}},Phe=no,_a=!Phe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),QN={},eM={}.propertyIsEnumerable,tM=Object.getOwnPropertyDescriptor,Nhe=tM&&!eM.call({1:2},1);QN.f=Nhe?function(t){var r=tM(this,t);return!!r&&r.enumerable}:eM;var rM=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Mhe={}.toString,Rw=function(e){return Mhe.call(e).slice(8,-1)},jhe=no,Dhe=Rw,Fhe="".split,Lhe=jhe(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return Dhe(e)=="String"?Fhe.call(e,""):Object(e)}:Object,bh=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},qhe=Lhe,Bhe=bh,Pw=function(e){return qhe(Bhe(e))},Ln=function(e){return typeof e=="function"},Uhe=Ln,Hl=function(e){return typeof e=="object"?e!==null:Uhe(e)},Nw=Cn,zhe=Ln,Zhe=function(e){return zhe(e)?e:void 0},wh=function(e,t){return arguments.length<2?Zhe(Nw[e]):Nw[e]&&Nw[e][t]},Vhe=wh,Hhe=Vhe("navigator","userAgent")||"",nM=Cn,Mw=Hhe,oM=nM.process,iM=nM.Deno,aM=oM&&oM.versions||iM&&iM.version,sM=aM&&aM.v8,Co,xh;sM?(Co=sM.split("."),xh=Co[0]<4?1:Co[0]+Co[1]):Mw&&(Co=Mw.match(/Edge\/(\d+)/),(!Co||Co[1]>=74)&&(Co=Mw.match(/Chrome\/(\d+)/),Co&&(xh=Co[1])));var Whe=xh&&+xh,cM=Whe,Khe=no,lM=!!Object.getOwnPropertySymbols&&!Khe(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&cM&&cM<41}),Ghe=lM,uM=Ghe&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Jhe=Ln,Yhe=wh,Xhe=uM,dM=Xhe?function(e){return typeof e=="symbol"}:function(e){var t=Yhe("Symbol");return Jhe(t)&&Object(e)instanceof t},Qhe=function(e){try{return String(e)}catch{return"Object"}},eme=Ln,tme=Qhe,rme=function(e){if(eme(e))return e;throw TypeError(tme(e)+" is not a function")},nme=rme,fM=function(e,t){var r=e[t];return r==null?void 0:nme(r)},jw=Ln,Dw=Hl,ome=function(e,t){var r,n;if(t==="string"&&jw(r=e.toString)&&!Dw(n=r.call(e))||jw(r=e.valueOf)&&!Dw(n=r.call(e))||t!=="string"&&jw(r=e.toString)&&!Dw(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},pM={exports:{}},hM=Cn,Fw=function(e,t){try{Object.defineProperty(hM,e,{value:t,configurable:!0,writable:!0})}catch{hM[e]=t}return t},ime=Cn,ame=Fw,mM="__core-js_shared__",sme=ime[mM]||ame(mM,{}),Lw=sme,yM=Lw;(pM.exports=function(e,t){return yM[e]||(yM[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var qw=pM.exports,cme=bh,gM=function(e){return Object(cme(e))},lme=gM,ume={}.hasOwnProperty,Ea=Object.hasOwn||function(t,r){return ume.call(lme(t),r)},dme=0,fme=Math.random(),vM=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++dme+fme).toString(36)},pme=Cn,hme=qw,bM=Ea,mme=vM,wM=lM,yme=uM,Wl=hme("wks"),Kl=pme.Symbol,gme=yme?Kl:Kl&&Kl.withoutSetter||mme,Gl=function(e){return(!bM(Wl,e)||!(wM||typeof Wl[e]=="string"))&&(wM&&bM(Kl,e)?Wl[e]=Kl[e]:Wl[e]=gme("Symbol."+e)),Wl[e]},xM=Hl,SM=dM,vme=fM,bme=ome,wme=Gl,xme=wme("toPrimitive"),Sme=function(e,t){if(!xM(e)||SM(e))return e;var r=vme(e,xme),n;if(r){if(t===void 0&&(t="default"),n=r.call(e,t),!xM(n)||SM(n))return n;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),bme(e,t)},_me=Sme,Eme=dM,_M=function(e){var t=_me(e,"string");return Eme(t)?t:String(t)},kme=Cn,EM=Hl,Bw=kme.document,Tme=EM(Bw)&&EM(Bw.createElement),kM=function(e){return Tme?Bw.createElement(e):{}},$me=_a,Ome=no,Cme=kM,TM=!$me&&!Ome(function(){return Object.defineProperty(Cme("div"),"a",{get:function(){return 7}}).a!=7}),Ame=_a,Ime=QN,Rme=rM,Pme=Pw,Nme=_M,Mme=Ea,jme=TM,$M=Object.getOwnPropertyDescriptor;Iw.f=Ame?$M:function(t,r){if(t=Pme(t),r=Nme(r),jme)try{return $M(t,r)}catch{}if(Mme(t,r))return Rme(!Ime.f.call(t,r),t[r])};var Jl={},Dme=Hl,Di=function(e){if(Dme(e))return e;throw TypeError(String(e)+" is not an object")},Fme=_a,Lme=TM,OM=Di,qme=_M,CM=Object.defineProperty;Jl.f=Fme?CM:function(t,r,n){if(OM(t),r=qme(r),OM(n),Lme)try{return CM(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 Bme=_a,Ume=Jl,zme=rM,Sh=Bme?function(e,t,r){return Ume.f(e,t,zme(1,r))}:function(e,t,r){return e[t]=r,e},AM={exports:{}},Zme=Ln,Uw=Lw,Vme=Function.toString;Zme(Uw.inspectSource)||(Uw.inspectSource=function(e){return Vme.call(e)});var IM=Uw.inspectSource,Hme=Cn,Wme=Ln,Kme=IM,RM=Hme.WeakMap,Gme=Wme(RM)&&/native code/.test(Kme(RM)),Jme=qw,Yme=vM,PM=Jme("keys"),NM=function(e){return PM[e]||(PM[e]=Yme(e))},zw={},Xme=Gme,Qme=Cn,eye=Hl,tye=Sh,Zw=Ea,Vw=Lw,rye=NM,nye=zw,MM="Object already initialized",oye=Qme.WeakMap,_h,Yl,Eh,iye=function(e){return Eh(e)?Yl(e):_h(e,{})},aye=function(e){return function(t){var r;if(!eye(t)||(r=Yl(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return r}};if(Xme||Vw.state){var ka=Vw.state||(Vw.state=new oye),sye=ka.get,jM=ka.has,cye=ka.set;_h=function(e,t){if(jM.call(ka,e))throw new TypeError(MM);return t.facade=e,cye.call(ka,e,t),t},Yl=function(e){return sye.call(ka,e)||{}},Eh=function(e){return jM.call(ka,e)}}else{var Ws=rye("state");nye[Ws]=!0,_h=function(e,t){if(Zw(e,Ws))throw new TypeError(MM);return t.facade=e,tye(e,Ws,t),t},Yl=function(e){return Zw(e,Ws)?e[Ws]:{}},Eh=function(e){return Zw(e,Ws)}}var DM={set:_h,get:Yl,has:Eh,enforce:iye,getterFor:aye},Hw=_a,lye=Ea,FM=Function.prototype,uye=Hw&&Object.getOwnPropertyDescriptor,Ww=lye(FM,"name"),dye=Ww&&(function(){}).name==="something",fye=Ww&&(!Hw||Hw&&uye(FM,"name").configurable),Kw={EXISTS:Ww,PROPER:dye,CONFIGURABLE:fye},pye=Cn,LM=Ln,hye=Ea,qM=Sh,mye=Fw,yye=IM,BM=DM,gye=Kw.CONFIGURABLE,vye=BM.get,bye=BM.enforce,wye=String(String).split("String");(AM.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")+"]"),(!hye(r,"name")||gye&&r.name!==s)&&qM(r,"name",s),c=bye(r),c.source||(c.source=wye.join(typeof s=="string"?s:""))),e===pye){i?e[t]=r:mye(t,r);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=r:qM(e,t,r)})(Function.prototype,"toString",function(){return LM(this)&&vye(this).source||yye(this)});var Xl=AM.exports,UM={},xye=Math.ceil,Sye=Math.floor,kh=function(e){var t=+e;return t!==t||t===0?0:(t>0?Sye:xye)(t)},_ye=kh,Eye=Math.max,kye=Math.min,Tye=function(e,t){var r=_ye(e);return r<0?Eye(r+t,0):kye(r,t)},$ye=kh,Oye=Math.min,zM=function(e){return e>0?Oye($ye(e),9007199254740991):0},Cye=zM,Aye=function(e){return Cye(e.length)},Iye=Pw,Rye=Tye,Pye=Aye,ZM=function(e){return function(t,r,n){var o=Iye(t),i=Pye(o),a=Rye(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}},Nye={includes:ZM(!0),indexOf:ZM(!1)},Gw=Ea,Mye=Pw,jye=Nye.indexOf,Dye=zw,VM=function(e,t){var r=Mye(e),n=0,o=[],i;for(i in r)!Gw(Dye,i)&&Gw(r,i)&&o.push(i);for(;t.length>n;)Gw(r,i=t[n++])&&(~jye(o,i)||o.push(i));return o},Jw=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Fye=VM,Lye=Jw,qye=Lye.concat("length","prototype");UM.f=Object.getOwnPropertyNames||function(t){return Fye(t,qye)};var HM={};HM.f=Object.getOwnPropertySymbols;var Bye=wh,Uye=UM,zye=HM,Zye=Di,Vye=Bye("Reflect","ownKeys")||function(t){var r=Uye.f(Zye(t)),n=zye.f;return n?r.concat(n(t)):r},Hye=Ea,Wye=Vye,Kye=Iw,Gye=Jl,Jye=function(e,t){for(var r=Wye(t),n=Gye.f,o=Kye.f,i=0;i<r.length;i++){var a=r[i];Hye(e,a)||n(e,a,o(t,a))}},Yye=no,Xye=Ln,Qye=/#|\.prototype\./,Ql=function(e,t){var r=tge[ege(e)];return r==nge?!0:r==rge?!1:Xye(t)?Yye(t):!!t},ege=Ql.normalize=function(e){return String(e).replace(Qye,".").toLowerCase()},tge=Ql.data={},rge=Ql.NATIVE="N",nge=Ql.POLYFILL="P",oge=Ql,Yw=Cn,ige=Iw.f,age=Sh,sge=Xl,cge=Fw,lge=Jye,uge=oge,dge=function(e,t){var r=e.target,n=e.global,o=e.stat,i,a,s,c,l,u;if(n?a=Yw:o?a=Yw[r]||cge(r,{}):a=(Yw[r]||{}).prototype,a)for(s in t){if(l=t[s],e.noTargetGet?(u=ige(a,s),c=u&&u.value):c=a[s],i=uge(n?s:r+(o?".":"#")+s,e.forced),!i&&c!==void 0){if(typeof l==typeof c)continue;lge(l,c)}(e.sham||c&&c.sham)&&age(l,"sham",!0),sge(a,s,l,e)}},fge=Gl,pge=fge("toStringTag"),WM={};WM[pge]="z";var Xw=String(WM)==="[object z]",hge=Xw,mge=Ln,Th=Rw,yge=Gl,gge=yge("toStringTag"),vge=Th(function(){return arguments}())=="Arguments",bge=function(e,t){try{return e[t]}catch{}},KM=hge?Th:function(e){var t,r,n;return e===void 0?"Undefined":e===null?"Null":typeof(r=bge(t=Object(e),gge))=="string"?r:vge?Th(t):(n=Th(t))=="Object"&&mge(t.callee)?"Arguments":n},wge=KM,$h=function(e){if(wge(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},xge=Di,GM=function(){var e=xge(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},Qw={},JM=no,Sge=Cn,YM=Sge.RegExp;Qw.UNSUPPORTED_Y=JM(function(){var e=YM("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Qw.BROKEN_CARET=JM(function(){var e=YM("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var _ge=VM,Ege=Jw,kge=Object.keys||function(t){return _ge(t,Ege)},Tge=_a,$ge=Jl,Oge=Di,Cge=kge,Age=Tge?Object.defineProperties:function(t,r){Oge(t);for(var n=Cge(r),o=n.length,i=0,a;o>i;)$ge.f(t,a=n[i++],r[a]);return t},Ige=wh,Rge=Ige("document","documentElement"),Pge=Di,Nge=Age,XM=Jw,Mge=zw,jge=Rge,Dge=kM,Fge=NM,QM=">",ej="<",e0="prototype",t0="script",tj=Fge("IE_PROTO"),r0=function(){},rj=function(e){return ej+t0+QM+e+ej+"/"+t0+QM},nj=function(e){e.write(rj("")),e.close();var t=e.parentWindow.Object;return e=null,t},Lge=function(){var e=Dge("iframe"),t="java"+t0+":",r;return e.style.display="none",jge.appendChild(e),e.src=String(t),r=e.contentWindow.document,r.open(),r.write(rj("document.F=Object")),r.close(),r.F},Oh,Ch=function(){try{Oh=new ActiveXObject("htmlfile")}catch{}Ch=typeof document<"u"?document.domain&&Oh?nj(Oh):Lge():nj(Oh);for(var e=XM.length;e--;)delete Ch[e0][XM[e]];return Ch()};Mge[tj]=!0;var qge=Object.create||function(t,r){var n;return t!==null?(r0[e0]=Pge(t),n=new r0,r0[e0]=null,n[tj]=t):n=Ch(),r===void 0?n:Nge(n,r)},Bge=no,Uge=Cn,zge=Uge.RegExp,Zge=Bge(function(){var e=zge(".","s");return!(e.dotAll&&e.exec(`
|
|
426
426
|
`)&&e.flags==="s")}),Vge=no,Hge=Cn,Wge=Hge.RegExp,Kge=Vge(function(){var e=Wge("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),Gge=$h,Jge=GM,oj=Qw,Yge=qw,Xge=qge,Qge=DM.get,eve=Zge,tve=Kge,Ah=RegExp.prototype.exec,rve=Yge("native-string-replace",String.prototype.replace),n0=Ah,o0=function(){var e=/a/,t=/b*/g;return Ah.call(e,"a"),Ah.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),ij=oj.UNSUPPORTED_Y||oj.BROKEN_CARET,i0=/()??/.exec("")[1]!==void 0,nve=o0||i0||ij||eve||tve;nve&&(n0=function(t){var r=this,n=Qge(r),o=Gge(t),i=n.raw,a,s,c,l,u,d,p;if(i)return i.lastIndex=r.lastIndex,a=n0.call(i,o),r.lastIndex=i.lastIndex,a;var f=n.groups,h=ij&&r.sticky,y=Jge.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)),i0&&(s=new RegExp("^"+m+"$(?!\\s)",y)),o0&&(c=r.lastIndex),l=Ah.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:o0&&l&&(r.lastIndex=r.global?l.index+l[0].length:c),i0&&l&&l.length>1&&rve.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=Xge(null),u=0;u<f.length;u++)p=f[u],d[p[0]]=l[p[1]];return l});var a0=n0,ove=dge,aj=a0;ove({target:"RegExp",proto:!0,forced:/./.exec!==aj},{exec:aj});var sj=Xl,ive=a0,cj=no,lj=Gl,ave=Sh,sve=lj("species"),s0=RegExp.prototype,cve=function(e,t,r,n){var o=lj(e),i=!cj(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!cj(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[sve]=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===ive||h===s0.exec?i&&!f?{done:!0,value:s.call(u,d,p)}:{done:!0,value:l.call(d,u,p)}:{done:!1}});sj(String.prototype,e,c[0]),sj(s0,o,c[1])}n&&ave(s0[o],"sham",!0)},lve=kh,uve=$h,dve=bh,uj=function(e){return function(t,r){var n=uve(dve(t)),o=lve(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)}},fve={codeAt:uj(!1),charAt:uj(!0)},pve=fve.charAt,hve=function(e,t,r){return t+(r?pve(e,t).length:1)},mve=gM,yve=Math.floor,gve="".replace,vve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bve=/\$([$&'`]|\d{1,2})/g,wve=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=bve;return o!==void 0&&(o=mve(o),c=vve),gve.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=yve(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})},xve=Di,Sve=Ln,_ve=Rw,Eve=a0,kve=function(e,t){var r=e.exec;if(Sve(r)){var n=r.call(e,t);return n!==null&&xve(n),n}if(_ve(e)==="RegExp")return Eve.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Tve=cve,$ve=no,Ove=Di,Cve=Ln,Ave=kh,Ive=zM,Ks=$h,Rve=bh,Pve=hve,Nve=fM,Mve=wve,jve=kve,Dve=Gl,c0=Dve("replace"),Fve=Math.max,Lve=Math.min,qve=function(e){return e===void 0?e:String(e)},Bve=function(){return"a".replace(/./,"$0")==="$0"}(),dj=function(){return/./[c0]?/./[c0]("a","$0")==="":!1}(),Uve=!$ve(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Tve("replace",function(e,t,r){var n=dj?"$":"$0";return[function(i,a){var s=Rve(this),c=i==null?void 0:Nve(i,c0);return c?c.call(i,s,a):t.call(Ks(s),i,a)},function(o,i){var a=Ove(this),s=Ks(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=Cve(i);l||(i=Ks(i));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var p=[];;){var f=jve(a,s);if(f===null||(p.push(f),!u))break;var h=Ks(f[0]);h===""&&(a.lastIndex=Pve(s,Ive(a.lastIndex),d))}for(var y="",m=0,g=0;g<p.length;g++){f=p[g];for(var v=Ks(f[0]),b=Fve(Lve(Ave(f.index),s.length),0),x=[],w=1;w<f.length;w++)x.push(qve(f[w]));var S=f.groups;if(l){var $=[v].concat(x,b,s);S!==void 0&&$.push(S);var R=Ks(i.apply(void 0,$))}else R=Mve(v,s,b,x,S,i);b>=m&&(y+=s.slice(m,b)+R,m=b+v.length)}return y+s.slice(m)}]},!Uve||!Bve||dj);var eu=Er,zve=sb,Zve=va,Ih=function(e){return zve.slice(0,e.length)===e},Vve=function(){return Ih("Bun/")?"BUN":Ih("Cloudflare-Workers")?"CLOUDFLARE":Ih("Deno/")?"DENO":Ih("Node.js/")?"NODE":eu.Bun&&typeof Bun.version=="string"?"BUN":eu.Deno&&typeof Deno.version=="object"?"DENO":Zve(eu.process)==="process"?"NODE":eu.window&&eu.document?"BROWSER":"REST"}(),Hve=TypeError,Wve=function(e,t){if(e<t)throw new Hve("Not enough arguments");return e},fj=Er,Kve=Yv,Gve=tn,Jve=Vve,Yve=sb,Xve=th,Qve=Wve,ebe=fj.Function,tbe=/MSIE .\./.test(Yve)||Jve==="BUN"&&function(){var e=fj.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),pj=function(e,t){var r=t?2:1;return tbe?function(n,o){var i=Qve(arguments.length,1)>r,a=Gve(n)?n:ebe(n),s=i?Xve(arguments,r):[],c=i?function(){Kve(a,this,s)}:a;return t?e(c,o):e(c)}:e},rbe=Zt,hj=Er,nbe=pj,mj=nbe(hj.setInterval,!0);rbe({global:!0,bind:!0,forced:hj.setInterval!==mj},{setInterval:mj});var obe=Zt,yj=Er,ibe=pj,gj=ibe(yj.setTimeout,!0);obe({global:!0,bind:!0,forced:yj.setTimeout!==gj},{setTimeout:gj});var abe=Ur,sbe=abe.setInterval,cbe=sbe;const lbe=St(cbe);var ube=kr,vj=function(e,t){var r=[][e];return!!r&&ube(function(){r.call(null,t||function(){return 1},1)})},dbe=Zt,fbe=Qv,pbe=UR.indexOf,hbe=vj,l0=fbe([].indexOf),bj=!!l0&&1/l0([1],1,-0)<0,mbe=bj||!hbe("indexOf");dbe({target:"Array",proto:!0,forced:mbe},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return bj?l0(this,t,r)||0:pbe(this,t,r)}});var ybe=Sa,gbe=ybe("Array","indexOf"),vbe=ei,bbe=gbe,u0=Array.prototype,wbe=function(e){var t=e.indexOf;return e===u0||vbe(u0,e)&&t===u0.indexOf?bbe:t},xbe=wbe,Sbe=xbe,_be=Sbe;const Ebe=St(_be);var wj=zp,kbe=TypeError,Tbe=function(e,t){if(!delete e[t])throw new kbe("Cannot delete property "+wj(t)+" of "+wj(e))},$be=Zt,Obe=ti,Cbe=Ib,Abe=Hp,Ibe=ba,Rbe=kN,Pbe=kb,Nbe=Ab,Mbe=Nl,d0=Tbe,jbe=Kp,Dbe=jbe("splice"),Fbe=Math.max,Lbe=Math.min;$be({target:"Array",proto:!0,forced:!Dbe},{splice:function(t,r){var n=Obe(this),o=Ibe(n),i=Cbe(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=Lbe(Fbe(Abe(r),0),o-i)),Pbe(o+s-c),l=Nbe(n,c),u=0;u<c;u++)d=i+u,d in n&&Mbe(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]:d0(n,p);for(u=o;u>o-c+s;u--)d0(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]:d0(n,p);for(u=0;u<s;u++)n[u+i]=arguments[u+2];return Rbe(n,o-c+s),l}});var qbe=Sa,Bbe=qbe("Array","splice"),Ube=ei,zbe=Bbe,f0=Array.prototype,Zbe=function(e){var t=e.splice;return e===f0||Ube(f0,e)&&t===f0.splice?zbe:t},Vbe=Zbe,Hbe=Vbe,Wbe=Hbe;const Kbe=St(Wbe);var Gbe=Sa,Jbe=Gbe("Array","concat"),Ybe=ei,Xbe=Jbe,p0=Array.prototype,Qbe=function(e){var t=e.concat;return e===p0||Ybe(p0,e)&&t===p0.concat?Xbe:t},ewe=Qbe,twe=ewe,rwe=twe;const ir=St(rwe);var nwe=Zt,owe=Tr,xj=Date,iwe=owe(xj.prototype.getTime);nwe({target:"Date",stat:!0},{now:function(){return iwe(new xj)}});var awe=Ur,swe=awe.Date.now,cwe=swe,lwe=cwe,uwe=lwe;const Fi=St(uwe);var dwe=zb.forEach,fwe=vj,pwe=fwe("forEach"),hwe=pwe?[].forEach:function(t){return dwe(this,t,arguments.length>1?arguments[1]:void 0)},mwe=Zt,Sj=hwe;mwe({target:"Array",proto:!0,forced:[].forEach!==Sj},{forEach:Sj});var ywe=Sa,gwe=ywe("Array","forEach"),vwe=gwe,bwe=vwe,wwe=Ml,xwe=On,Swe=ei,_we=bwe,h0=Array.prototype,Ewe={DOMTokenList:!0,NodeList:!0},kwe=function(e){var t=e.forEach;return e===h0||Swe(h0,e)&&t===h0.forEach||xwe(Ewe,wwe(e))?_we:t},Twe=kwe;const Rh=St(Twe);var $we=Zt,Owe=ti,_j=Nb,Cwe=kr,Awe=Cwe(function(){_j(1)});$we({target:"Object",stat:!0,forced:Awe},{keys:function(t){return _j(Owe(t))}});var Iwe=Ur,Rwe=Iwe.Object.keys,Pwe=Rwe,Nwe=Pwe,Mwe=Nwe;const jwe=St(Mwe);var Dwe=Ur,Fwe=Dwe.Object.getOwnPropertySymbols,Lwe=Fwe,qwe=Lwe,Bwe=qwe;const Ej=St(Bwe);var Uwe=Zt,zwe=zb.filter,Zwe=Kp,Vwe=Zwe("filter");Uwe({target:"Array",proto:!0,forced:!Vwe},{filter:function(t){return zwe(this,t,arguments.length>1?arguments[1]:void 0)}});var Hwe=Sa,Wwe=Hwe("Array","filter"),Kwe=ei,Gwe=Wwe,m0=Array.prototype,Jwe=function(e){var t=e.filter;return e===m0||Kwe(m0,e)&&t===m0.filter?Gwe:t},Ywe=Jwe,Xwe=Ywe,Qwe=Xwe;const e0e=St(Qwe);var kj={exports:{}},t0e=Zt,r0e=kr,n0e=ko,Tj=Cl.f,$j=mn,o0e=!$j||r0e(function(){Tj(1)});t0e({target:"Object",stat:!0,forced:o0e,sham:!$j},{getOwnPropertyDescriptor:function(t,r){return Tj(n0e(t),r)}});var i0e=Ur,Oj=i0e.Object,a0e=kj.exports=function(t,r){return Oj.getOwnPropertyDescriptor(t,r)};Oj.getOwnPropertyDescriptor.sham&&(a0e.sham=!0);var s0e=kj.exports,c0e=s0e,l0e=c0e,u0e=l0e;const Cj=St(u0e);var d0e=To,f0e=Tr,p0e=eh,h0e=rh,m0e=Ni,y0e=f0e([].concat),g0e=d0e("Reflect","ownKeys")||function(t){var r=p0e.f(m0e(t)),n=h0e.f;return n?y0e(r,n(t)):r},v0e=Zt,b0e=mn,w0e=g0e,x0e=ko,S0e=Cl,_0e=Nl;v0e({target:"Object",stat:!0,sham:!b0e},{getOwnPropertyDescriptors:function(t){for(var r=x0e(t),n=S0e.f,o=w0e(r),i={},a=0,s,c;o.length>a;)c=n(r,s=o[a++]),c!==void 0&&_0e(i,s,c);return i}});var E0e=Ur,k0e=E0e.Object.getOwnPropertyDescriptors,T0e=k0e,$0e=T0e,O0e=$0e;const Aj=St(O0e);var Ij={exports:{}},C0e=Zt,A0e=mn,Rj=Gp.f;C0e({target:"Object",stat:!0,forced:Object.defineProperties!==Rj,sham:!A0e},{defineProperties:Rj});var I0e=Ur,Pj=I0e.Object,R0e=Ij.exports=function(t,r){return Pj.defineProperties(t,r)};Pj.defineProperties.sham&&(R0e.sham=!0);var P0e=Ij.exports,N0e=P0e,M0e=N0e,j0e=M0e;const D0e=St(j0e);var F0e=XN;const L0e=St(F0e);var q0e=!1;function B0e(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 U0e(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 z0e=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?!q0e: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(U0e(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=B0e(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}(),rn="-ms-",Ph="-moz-",jt="-webkit-",Nj="comm",y0="rule",g0="decl",Z0e="@import",Mj="@keyframes",V0e="@layer",H0e=Math.abs,Nh=String.fromCharCode,W0e=Object.assign;function K0e(e,t){return zr(e,0)^45?(((t<<2^zr(e,0))<<2^zr(e,1))<<2^zr(e,2))<<2^zr(e,3):0}function jj(e){return e.trim()}function G0e(e,t){return(e=t.exec(e))?e[0]:e}function Dt(e,t,r){return e.replace(t,r)}function v0(e,t){return e.indexOf(t)}function zr(e,t){return e.charCodeAt(t)|0}function tu(e,t,r){return e.slice(t,r)}function Ao(e){return e.length}function b0(e){return e.length}function Mh(e,t){return t.push(e),e}function J0e(e,t){return e.map(t).join("")}var jh=1,Gs=1,Dj=0,gn=0,gr=0,Js="";function Dh(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:jh,column:Gs,length:a,return:""}}function ru(e,t){return W0e(Dh("",null,null,"",null,null,0),e,{length:-e.length},t)}function Y0e(){return gr}function X0e(){return gr=gn>0?zr(Js,--gn):0,Gs--,gr===10&&(Gs=1,jh--),gr}function An(){return gr=gn<Dj?zr(Js,gn++):0,Gs++,gr===10&&(Gs=1,jh++),gr}function Io(){return zr(Js,gn)}function Fh(){return gn}function nu(e,t){return tu(Js,e,t)}function ou(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 Fj(e){return jh=Gs=1,Dj=Ao(Js=e),gn=0,[]}function Lj(e){return Js="",e}function Lh(e){return jj(nu(gn-1,w0(e===91?e+2:e===40?e+1:e)))}function Q0e(e){for(;(gr=Io())&&gr<33;)An();return ou(e)>2||ou(gr)>3?"":" "}function exe(e,t){for(;--t&&An()&&!(gr<48||gr>102||gr>57&&gr<65||gr>70&&gr<97););return nu(e,Fh()+(t<6&&Io()==32&&An()==32))}function w0(e){for(;An();)switch(gr){case e:return gn;case 34:case 39:e!==34&&e!==39&&w0(gr);break;case 40:e===41&&w0(e);break;case 92:An();break}return gn}function txe(e,t){for(;An()&&e+gr!==47+10;)if(e+gr===42+42&&Io()===47)break;return"/*"+nu(t,gn-1)+"*"+Nh(e===47?e:An())}function rxe(e){for(;!ou(Io());)An();return nu(e,gn)}function nxe(e){return Lj(qh("",null,null,null,[""],e=Fj(e),0,[0],e))}function qh(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,$=b;m;)switch(h=v,v=An()){case 40:if(h!=108&&zr($,d-1)==58){v0($+=Dt(Lh(v),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:$+=Lh(v);break;case 9:case 10:case 13:case 32:$+=Q0e(h);break;case 92:$+=exe(Fh()-1,7);continue;case 47:switch(Io()){case 42:case 47:Mh(oxe(txe(An(),Fh()),t,r),c);break;default:$+="/"}break;case 123*y:s[l++]=Ao($)*g;case 125*y:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+u:g==-1&&($=Dt($,/\f/g,"")),f>0&&Ao($)-d&&Mh(f>32?Bj($+";",n,r,d-1):Bj(Dt($," ","")+";",n,r,d-2),c);break;case 59:$+=";";default:if(Mh(S=qj($,t,r,l,u,o,s,b,x=[],w=[],d),i),v===123)if(u===0)qh($,t,S,S,x,i,d,s,w);else switch(p===99&&zr($,3)===110?100:p){case 100:case 108:case 109:case 115:qh(e,S,S,n&&Mh(qj(e,S,S,0,0,o,s,b,o,x=[],d),w),o,w,d,s,n?x:w);break;default:qh($,S,S,S,[""],w,0,s,w)}}l=u=f=0,y=g=1,b=$="",d=a;break;case 58:d=1+Ao($),f=h;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&X0e()==125)continue}switch($+=Nh(v),v*y){case 38:g=u>0?1:($+="\f",-1);break;case 44:s[l++]=(Ao($)-1)*g,g=1;break;case 64:Io()===45&&($+=Lh(An())),p=Io(),u=d=Ao(b=$+=rxe(Fh())),v++;break;case 45:h===45&&Ao($)==2&&(y=0)}}return i}function qj(e,t,r,n,o,i,a,s,c,l,u){for(var d=o-1,p=o===0?i:[""],f=b0(p),h=0,y=0,m=0;h<n;++h)for(var g=0,v=tu(e,d+1,d=H0e(y=a[h])),b=e;g<f;++g)(b=jj(y>0?p[g]+" "+v:Dt(v,/&\f/g,p[g])))&&(c[m++]=b);return Dh(e,t,r,o===0?y0:s,c,l,u)}function oxe(e,t,r){return Dh(e,t,r,Nj,Nh(Y0e()),tu(e,2,-2),0)}function Bj(e,t,r,n){return Dh(e,t,r,g0,tu(e,0,n),tu(e,n+1,-1),n)}function Ys(e,t){for(var r="",n=b0(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function ixe(e,t,r,n){switch(e.type){case V0e:if(e.children.length)break;case Z0e:case g0:return e.return=e.return||e.value;case Nj:return"";case Mj:return e.return=e.value+"{"+Ys(e.children,n)+"}";case y0:e.value=e.props.join(",")}return Ao(r=Ys(e.children,n))?e.return=e.value+"{"+r+"}":""}function axe(e){var t=b0(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 sxe(e){return function(t){t.root||(t=t.return)&&e(t)}}function cxe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var lxe=function(t,r,n){for(var o=0,i=0;o=i,i=Io(),o===38&&i===12&&(r[n]=1),!ou(i);)An();return nu(t,gn)},uxe=function(t,r){var n=-1,o=44;do switch(ou(o)){case 0:o===38&&Io()===12&&(r[n]=1),t[n]+=lxe(gn-1,r,n);break;case 2:t[n]+=Lh(o);break;case 4:if(o===44){t[++n]=Io()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Nh(o)}while(o=An());return t},dxe=function(t,r){return Lj(uxe(Fj(t),r))},Uj=new WeakMap,fxe=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&&!Uj.get(n))&&!o){Uj.set(t,!0);for(var i=[],a=dxe(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]}}},pxe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function zj(e,t){switch(K0e(e,t)){case 5103:return jt+"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 jt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return jt+e+Ph+e+rn+e+e;case 6828:case 4268:return jt+e+rn+e+e;case 6165:return jt+e+rn+"flex-"+e+e;case 5187:return jt+e+Dt(e,/(\w+).+(:[^]+)/,jt+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return jt+e+rn+"flex-item-"+Dt(e,/flex-|-self/,"")+e;case 4675:return jt+e+rn+"flex-line-pack"+Dt(e,/align-content|flex-|-self/,"")+e;case 5548:return jt+e+rn+Dt(e,"shrink","negative")+e;case 5292:return jt+e+rn+Dt(e,"basis","preferred-size")+e;case 6060:return jt+"box-"+Dt(e,"-grow","")+jt+e+rn+Dt(e,"grow","positive")+e;case 4554:return jt+Dt(e,/([^-])(transform)/g,"$1"+jt+"$2")+e;case 6187:return Dt(Dt(Dt(e,/(zoom-|grab)/,jt+"$1"),/(image-set)/,jt+"$1"),e,"")+e;case 5495:case 3959:return Dt(e,/(image-set\([^]*)/,jt+"$1$`$1");case 4968:return Dt(Dt(e,/(.+:)(flex-)?(.*)/,jt+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+jt+e+e;case 4095:case 3583:case 4068:case 2532:return Dt(e,/(.+)-inline(.+)/,jt+"$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(Ao(e)-1-t>6)switch(zr(e,t+1)){case 109:if(zr(e,t+4)!==45)break;case 102:return Dt(e,/(.+:)(.+)-([^]+)/,"$1"+jt+"$2-$3$1"+Ph+(zr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~v0(e,"stretch")?zj(Dt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(zr(e,t+1)!==115)break;case 6444:switch(zr(e,Ao(e)-3-(~v0(e,"!important")&&10))){case 107:return Dt(e,":",":"+jt)+e;case 101:return Dt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+jt+(zr(e,14)===45?"inline-":"")+"box$3$1"+jt+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(zr(e,t+11)){case 114:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return jt+e+rn+e+e}return e}var hxe=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case g0:t.return=zj(t.value,t.length);break;case Mj:return Ys([ru(t,{value:Dt(t.value,"@","@"+jt)})],o);case y0:if(t.length)return J0e(t.props,function(i){switch(G0e(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ys([ru(t,{props:[Dt(i,/:(read-\w+)/,":"+Ph+"$1")]})],o);case"::placeholder":return Ys([ru(t,{props:[Dt(i,/:(plac\w+)/,":"+jt+"input-$1")]}),ru(t,{props:[Dt(i,/:(plac\w+)/,":"+Ph+"$1")]}),ru(t,{props:[Dt(i,/:(plac\w+)/,rn+"input-$1")]})],o)}return""})}},mxe=[hxe],yxe=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||mxe,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=[fxe,pxe];{var u,d=[ixe,sxe(function(y){u.insert(y)})],p=axe(l.concat(o,d)),f=function(m){return Ys(nxe(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 z0e({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 gxe(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 vxe={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},bxe=!1,wxe=/[A-Z]|^ms/g,xxe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zj=function(t){return t.charCodeAt(1)===45},Vj=function(t){return t!=null&&typeof t!="boolean"},x0=cxe(function(e){return Zj(e)?e:e.replace(wxe,"-$&").toLowerCase()}),Hj=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(xxe,function(n,o,i){return Ro={name:o,styles:i,next:Ro},o})}return vxe[t]!==1&&!Zj(t)&&typeof r=="number"&&r!==0?r+"px":r},Sxe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function iu(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 Ro={name:o.name,styles:o.styles,next:Ro},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Ro={name:a.name,styles:a.styles,next:Ro},a=a.next;var s=i.styles+";";return s}return _xe(e,t,r)}case"function":{if(e!==void 0){var c=Ro,l=r(e);return Ro=c,iu(e,t,l)}break}}var u=r;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function _xe(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=iu(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]+"}":Vj(s)&&(n+=x0(i)+":"+Hj(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&bxe)throw new Error(Sxe);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)Vj(a[c])&&(n+=x0(i)+":"+Hj(i,a[c])+";");else{var l=iu(e,t,a);switch(i){case"animation":case"animationName":{n+=x0(i)+":"+l+";";break}default:n+=i+"{"+l+"}"}}}}return n}var Wj=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ro;function S0(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="";Ro=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=iu(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=iu(r,t,e[s]),n){var c=i;o+=c[s]}Wj.lastIndex=0;for(var l="",u;(u=Wj.exec(o))!==null;)l+="-"+u[1];var d=gxe(o)+l;return{name:d,styles:o,next:Ro}}var Exe=!0;function Kj(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var kxe=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Exe===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Txe=function(t,r,n){kxe(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 Gj(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Jj(e,t,r){var n=[],o=Kj(e,n,r);return n.length<2?r:o+t(n)}var $xe=function(t){var r=yxe(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=S0(l,r.registered,void 0);return Txe(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=S0(l,r.registered),p="animation-"+d.name;return Gj(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=S0(l,r.registered);Gj(r,d)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return Jj(r.registered,n,Oxe(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:Kj.bind(null,r.registered),merge:Jj.bind(null,r.registered,n)}},Oxe=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},Cxe=Xl,_0=Date.prototype,Yj="Invalid Date",Xj="toString",Axe=_0[Xj],Ixe=_0.getTime;String(new Date(NaN))!=Yj&&Cxe(_0,Xj,function(){var t=Ixe.call(this);return t===t?Axe.call(this):Yj});var Rxe=Xw,Pxe=KM,Nxe=Rxe?{}.toString:function(){return"[object "+Pxe(this)+"]"},Mxe=Xw,jxe=Xl,Dxe=Nxe;Mxe||jxe(Object.prototype,"toString",Dxe,{unsafe:!0});var Fxe=Kw.PROPER,Lxe=Xl,qxe=Di,Qj=$h,Bxe=no,Uxe=GM,E0="toString",eD=RegExp.prototype,tD=eD[E0],zxe=Bxe(function(){return tD.call({source:"a",flags:"b"})!="/a/b"}),Zxe=Fxe&&tD.name!=E0;(zxe||Zxe)&&Lxe(RegExp.prototype,E0,function(){var t=qxe(this),r=Qj(t.source),n=t.flags,o=Qj(n===void 0&&t instanceof RegExp&&!("flags"in eD)?Uxe.call(t):n);return"/"+r+"/"+o},{unsafe:!0});var rD=typeof window<"u"?window:self,Vxe=rD.crypto||rD.msCrypto,Hxe=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}}(Vxe);const Wxe=St(Hxe);function Kxe(){return Wxe().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Gxe=CR;const nD=St(Gxe);function Ut(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 oD(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 ir(r=[ir(n="%c".concat(e,"%c ")).call(n,t)]).call(r,At(Ut("green","white")),i)}function Jxe(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=Oo(s,1),l=c[0];typeof l=="function"&&(i=l());var u=nD(i[0])?i:[i],d=u.length===1;Rh(u).call(u,function(p,f){if(d){var h,y;(h=console).log.apply(h,At(oD.apply(void 0,ir(y=[e]).call(y,At(p)))))}else if(f){var m;(m=console).log.apply(m,At(nD(p)?p:[p]))}else{var g,v;(g=console).groupCollapsed.apply(g,At(oD.apply(void 0,ir(v=[e]).call(v,At(p)))))}}),d||console.groupEnd()}}:function(){return 0}}var Yxe=_a,Xxe=Kw.EXISTS,Qxe=Jl.f,iD=Function.prototype,eSe=iD.toString,tSe=/^\s*function ([^ (]*)/,rSe="name";Yxe&&!Xxe&&Qxe(iD,rSe,{configurable:!0,get:function(){try{return eSe.call(this).match(tSe)[1]}catch{return""}}});var nSe=Ur,oSe=nSe.setTimeout,iSe=oSe;const aSe=St(iSe);function sSe(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=Fi();s-r>t?(e.apply(void 0,i),r=s):(clearTimeout(n),n=aSe(function(){e.apply(void 0,i),r=Fi()},Math.max(0,t-s+r)))}}var aD=function(t){var r=t.debounce,n=t.name,o=t.onEvent,i=t.target,a=O.useRef();a.current=o;var s=O.useMemo(function(){return sSe(function(l){var u=a.current;u&&u(l)},r)},[r,a]),c=O.useCallback(function(l){l.timeStampLow=Fi(),s(l)},[s]);return O.useLayoutEffect(function(){return i.addEventListener(n,c,{passive:!0}),c({target:i,type:n}),function(){return i.removeEventListener(n,c)}},[n,c,i]),!1};aD.defaultProps={debounce:200};var cSe=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},lSe=Zt,uSe=cSe;lSe({target:"Math",stat:!0},{sign:uSe});var dSe=Ur,fSe=dSe.Math.sign,pSe=fSe,hSe=pSe,mSe=hSe;const ySe=St(mSe);function gSe(e,t){var r=ySe(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 vSe(e,t,r,n){for(var o=e,i=0;i<n;i++)o=r(o,t);return o}var sD=function(t){var r=t.name,n=t.onEnd,o=t.target,i=t.value,a=O.useRef(),s=O.useCallback(function(l,u,d,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Fi();(d==="100%"||typeof d=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=d==="100%"?o.scrollHeight-o.offsetHeight:d,y=vSe(u,h,gSe,(Fi()-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=O.useCallback(function(){cancelAnimationFrame(a.current),n&&n(!1)},[n]);return O.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};sD.propTypes={name:Rt.string.isRequired,onEnd:Rt.func,target:Rt.any.isRequired,value:Rt.oneOfType([Rt.number,Rt.oneOf(["100%"])]).isRequired};function k0(e){var t=O.useState(e),r=Oo(t,2),n=r[0],o=r[1],i=O.useRef(),a=O.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 cD(e,t){var r=jwe(e);if(Ej){var n=Ej(e);t&&(n=e0e(n).call(n,function(o){return Cj(e,o).enumerable})),r.push.apply(r,n)}return r}function lD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;Rh(n=cD(Object(r),!0)).call(n,function(i){Che(e,i,r[i])})}else if(Aj)D0e(e,Aj(r));else{var o;Rh(o=cD(Object(r))).call(o,function(i){L0e(e,i,Cj(r,i))})}}return e}var bSe=function(){return 1/0},uD=17,wSe="bottom",oo="top",dD=1,xSe=34,fD={};function SSe(e,t){return e(),lbe(e,t)}function pD(e){var t=e.mode,r=e.target,n=r.offsetHeight,o=r.scrollHeight,i=r.scrollTop,a=o-i-n<dD,s=i<dD,c=t===oo?s:a,l=t!==oo?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function au(e,t){return e===(t===oo?0:"100%")}var T0=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=O.useMemo(function(){return Jxe("<ScrollToBottom>",{force:i})},[i]);s=s===oo?oo:wSe;var d=O.useRef(0),p=O.useRef(a),f=k0(s===oo?0:"100%"),h=Oo(f,3),y=h[0],m=h[1],g=h[2],v=k0(null),b=Oo(v,3),x=b[0],w=b[1],S=b[2],$=O.useRef(0),R=O.useRef(0),N=O.useRef(0),A=O.useState(!0),D=Oo(A,2),H=D[0],U=D[1],Z=O.useState(!0),L=Oo(Z,2),q=L[0],W=L[1],J=O.useState(!0),M=Oo(J,2),E=M[0],B=M[1],Q=O.useState(!1),T=Oo(Q,2),ce=T[0],pe=T[1],he=k0(!0),be=Oo(he,3),Ee=be[0],_e=be[1],ye=be[2],le=O.useRef([]),te=O.useCallback(function(X){var me=S.current;return le.current.push(X),me&&X({scrollTop:me.scrollTop}),function(){var Oe=le.current,tt=Ebe(Oe).call(Oe,X);~tt&&Kbe(Oe).call(Oe,tt,1)}},[le,S]),ve=O.useCallback(function(){var X=g.current;u(function(){var me;return ir(me=["%cSpineTo%c: %conEnd%c is fired."]).call(me,At(Ut("magenta")),At(Ut("orange")),[{animateTo:X}])}),d.current=Fi(),au(X,s)||_e(!1),m(null)},[g,u,d,s,m,_e]),Ce=O.useCallback(function(X){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=me.behavior,tt=S.current;if(typeof X!="number"&&X!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ze;return[ir(Ze=["%cscrollTo%c: Will scroll to %c".concat(typeof X=="number"?X+"px":X.replace(/%/g,"%%"),"%c")]).call(Ze,At(Ut("lime","")),At(Ut("purple"))),{behavior:Oe,nextAnimateTo:X,target:tt}]}),Oe==="auto"?(ve(),tt&&(tt.scrollTop=X==="100%"?tt.scrollHeight-tt.offsetHeight:X)):(Oe!=="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(X)),au(X,s)&&(u(function(){var Ze;return[ir(Ze=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ze,At(Ut("lime","")),At(Ut("purple"))),[{mode:s,nextAnimateTo:X}]]}),_e(!0))},[u,ve,s,m,_e,S]),Ue=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var Oe;return ir(Oe=["%cscrollToBottom%c: Called"]).call(Oe,At(Ut("yellow","")))}),me!=="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.'),Ce("100%",{behavior:me||"smooth"})},[u,Ce]),F=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var Oe;return ir(Oe=["%cscrollToTop%c: Called"]).call(Oe,At(Ut("yellow","")))}),me!=="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.'),Ce(0,{behavior:me||"smooth"})},[u,Ce]),ue=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var tt;return ir(tt=["%cscrollToEnd%c: Called"]).call(tt,At(Ut("yellow","")))}),me!=="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 Oe={behavior:me||"smooth"};s===oo?F(Oe):Ue(Oe)},[u,s,Ue,F]),we=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var tt;return ir(tt=["%cscrollToStart%c: Called"]).call(tt,At(Ut("yellow","")))}),me!=="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 Oe={behavior:me||"smooth"};s===oo?Ue(Oe):F(Oe)},[u,s,Ue,F]),fe=O.useCallback(function(){var X=S.current;if(X){if(p.current==="auto"){u(function(){var ze;return ir(ze=["%ctarget changed%c: Initial scroll"]).call(ze,At(Ut("blue")))}),X.scrollTop=s===oo?0:X.scrollHeight-X.offsetHeight,p.current=!1;return}var me=$.current,Oe=X.offsetHeight,tt=X.scrollHeight,Ze=X.scrollTop,ht=s===oo?0:Math.max(0,tt-Oe-Ze),Tt=Math.max(0,me-Ze),Vt=l({maxValue:ht,minValue:Tt,offsetHeight:Oe,scrollHeight:tt,scrollTop:Ze}),z=Math.max(0,Math.min(ht,Vt)),G;s===oo||z!==ht?G=Ze+z:G="100%",u(function(){var ze,Ke,gt;return[ir(ze=[ir(Ke=ir(gt="%cscrollToSticky%c: Will animate from %c".concat(me,"px%c to %c")).call(gt,typeof G=="number"?G+"px":G.replace(/%/g,"%%"),"%c (%c")).call(Ke,(G==="100%"?ht:G)+me,"px%c)")]).call(ze,At(Ut("orange")),At(Ut("purple")),At(Ut("purple")),At(Ut("purple"))),{animateFrom:me,maxValue:ht,minValue:Tt,nextAnimateTo:G,nextValue:z,offsetHeight:Oe,rawNextValue:Vt,scrollHeight:tt,scrollTop:Ze}]}),Ce(G,{behavior:"smooth"})}},[$,u,s,l,Ce,S]),De=O.useCallback(function(X){var me,Oe=X.timeStampLow,tt=g.current,Ze=S.current,ht=tt!==null;if(!(Oe<=d.current||!Ze)){var Tt=pD({mode:s,target:Ze}),Vt=Tt.atBottom,z=Tt.atEnd,G=Tt.atStart,ze=Tt.atTop;U(Vt),W(z),pe(G),B(ze);var Ke=Ze.offsetHeight,gt=Ze.scrollHeight,Ge=R.current,sr=N.current,$r=Ke!==Ge,Yt=gt!==sr;if($r&&(R.current=Ke),Yt&&(N.current=gt),!$r&&!Yt){var cr=ht&&au(tt,s)||z;ye.current!==cr&&(u(function(){var vt,bt,er,tr;return[ir(vt=["%conScroll%c: %csetSticky%c(%c".concat(cr,"%c)")]).call(vt,At(Ut("red")),At(Ut("red")),At(Ut("purple"))),ir(bt=[ir(er=ir(tr="(animating = %c".concat(ht,"%c && isEnd = %c")).call(tr,au(tt,s),"%c) || atEnd = %c")).call(er,z,"%c")]).call(bt,At(Ut("purple")),At(Ut("purple")),At(Ut("purple")),[{animating:ht,animateTo:tt,atEnd:z,mode:s,offsetHeight:Ze.offsetHeight,scrollHeight:Ze.scrollHeight,sticky:ye.current,nextSticky:cr}])]}),_e(cr))}else ye.current&&(u(function(){var vt;return[ir(vt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(vt,At(Ut("red")),At(Ut("orange")),[{offsetHeightChanged:$r,scrollHeightChanged:Yt}]),{nextOffsetHeight:Ke,prevOffsetHeight:Ge,nextScrollHeight:gt,prevScrollHeight:sr}]}),fe());var ln=Ze.scrollTop;Rh(me=le.current).call(me,function(vt){return vt({scrollTop:ln})})}},[g,u,d,s,R,N,le,fe,U,W,pe,B,_e,ye,S]);O.useEffect(function(){if(x){var X=!1,me=SSe(function(){var Oe=S.current,tt=g.current!==null;ye.current?pD({mode:s,target:Oe}).atEnd?X=!1:X?Fi()-X>xSe&&(tt||($.current=Oe.scrollTop,u(function(){var Ze;return ir(Ze=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ze,At(Ut("navy")),At(Ut("orange")))}),fe()),X=!1):X=Fi():Oe.scrollHeight<=Oe.offsetHeight&&!ye.current&&(u(function(){var Ze;return[ir(Ze=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ze,At(Ut("navy")),At(Ut("purple"))),[{offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ye.current}]]}),_e(!0))},Math.max(uD,r)||uD);return function(){return clearInterval(me)}}},[g,r,u,s,fe,_e,ye,x,S]);var Ie=O.useMemo(function(){var X=fD[c]||(fD[c]=$xe({key:"react-scroll-to-bottom--css-"+Kxe(),nonce:c}));return function(me){return X.css(me)+""}},[c]),je=O.useMemo(function(){return{observeScrollPosition:te,setTarget:w,styleToClassName:Ie}},[te,w,Ie]),ut=O.useMemo(function(){return{atBottom:H,atEnd:q,atStart:ce,atTop:E,mode:s}},[H,q,ce,E,s]),We=O.useMemo(function(){var X=y!==null;return{animating:X,animatingToEnd:X&&au(y,s),sticky:Ee}},[y,s,Ee]),K=O.useMemo(function(){return lD(lD({},ut),We)},[ut,We]),ae=O.useMemo(function(){return{scrollTo:Ce,scrollToBottom:Ue,scrollToEnd:ue,scrollToStart:we,scrollToTop:F}},[Ce,Ue,ue,we,F]);return O.useEffect(function(){if(x){var X=function(){N.current=x.scrollHeight};return x.addEventListener("focus",X,{capture:!0,passive:!0}),function(){return x.removeEventListener("focus",X)}}},[x]),u(function(){var X;return[ir(X=["%cRender%c: Render"]).call(X,At(Ut("cyan",""))),{animateTo:y,animating:y!==null,sticky:Ee,target:x}]}),O.createElement(gh.Provider,{value:je},O.createElement(kw.Provider,{value:ae},O.createElement(Ow.Provider,{value:K},O.createElement(Tw.Provider,{value:ut},O.createElement($w.Provider,{value:We},n,x&&O.createElement(aD,{debounce:o,name:"scroll",onEvent:De,target:x}),x&&y!==null&&O.createElement(sD,{name:"scrollTop",onEnd:ve,target:x,value:y}))))))};T0.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:bSe},T0.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 _Se={height:"100%",overflowY:"auto",width:"100%"},$0=function(t){var r=t.children,n=t.className,o=O.useContext(gh),i=o.setTarget,a=Cw()(_Se);return O.createElement("div",{className:gw(a,(n||"")+""),ref:i},r)};$0.defaultProps={children:void 0,className:void 0},$0.propTypes={children:Rt.any,className:Rt.string};var ESe={position:"relative"},O0=function(t){var r=t.children,n=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Cw()(ESe);return O.createElement("div",{className:gw(a,(n||"")+"")},O.createElement($0,{className:(i||"")+""},r),O.createElement(Aw,{className:(o||"")+""}))};O0.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},O0.propTypes={children:Rt.any,className:Rt.string,followButtonClassName:Rt.string,scrollViewClassName:Rt.string};var C0=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 O.createElement(T0,{checkInterval:r,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:d},O.createElement(O0,{className:o,followButtonClassName:s,scrollViewClassName:p},n))};C0.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},C0.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 kSe(){var e=HN(),t=e.scrollToBottom;return t}Une();const hD=O.memo(({scrollDownButton:e,...t})=>{const{messageList:r}=Jt,n=En(m=>m.conversationId),o=pt(m=>m.messages)[n??""]??[],i=pt(m=>m.setState),a=pt(m=>m.client),s=pt(m=>m.messageContainerRef),c=pt(m=>m.isTyping),l=pt(m=>m.setIsTyping),u=O.useMemo(()=>g5(o),[o]),[d,p]=O.useState(!0),{y:f}=CX(s),h=O.useCallback(()=>{if(!s.current)return;const{scrollHeight:m}=s.current;d&&s.current.scrollTo({top:m})},[]);O.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:m,timeout:g})=>{l(m,g)}),[]),O.useEffect(()=>{const m=o[o.length-1];i({disableComposer:!!(m!=null&&m.disableInput)})},[o.length]),O.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:QX;return Y.jsxs(C0,{...t,...r.container,followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[Y.jsx(qne,{}),u.map(m=>Y.jsx(Jv,{scroll:h,...m},m.id)),c&&Y.jsx(Jv,{scroll:h,direction:"incoming",children:Y.jsx(WI,{})}),Y.jsx("li",{"data-is-at-bottom":d,...r.scrollDownButton.container,children:Y.jsxs(TSe,{children:[(e==null?void 0:e.text)??"Back"," ",Y.jsx(y,{...r.scrollDownButton.icon})]})})]})}),TSe=e=>{const[t]=KN(),r=kSe(),{messageList:{scrollDownButton:n}}=Jt;return!t&&Y.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},$Se=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:o}=nA(),i=O.useMemo(()=>Tk({color:e,fontFamily:t,radius:r,themeMode:n,variant:o}),[e,t,r,n,o]);return Y.jsxs(Y.Fragment,{children:[Y.jsxs(UI,{children:[Y.jsx(HI,{}),Y.jsx(hD,{}),Y.jsx(dI,{})]}),Y.jsx("style",{children:i})]})};nt.Avatar=gy,nt.Block=As,nt.Composer=dI,nt.Container=UI,nt.Fab=One,nt.Header=HI,nt.Message=Jv,nt.MessageList=hD,nt.Modal=Pi,nt.ModalProvider=fI,nt.RestartConversation=VI,nt.TypingIndicator=WI,nt.Webchat=$Se,nt.WebchatProvider=Qte,nt.WebchatThemeSchema=yy,nt.__adapters=NU,nt.avatarThemeSchema=tf,nt.blockThemeSchema=wk,nt.clientModePropsSchema=Ek,nt.configPropsSchema=kk,nt.configurationSchema=gk,nt.cssStyleSchema=bk,nt.descriptionItemSchema=Ga,nt.fileTypes=RC,nt.generateThemeStylesheet=Tk,nt.getClient=NC,nt.initPropsSchema=g4,nt.isFileType=PC,nt.markdownTypeSchema=vk,nt.renderers=oI,nt.statePropsSchema=Sk,nt.styleOptionSchema=$e,nt.themeSchema=xk,nt.useClient=TY,nt.useWebchatStore=pt,nt.userPropsSchema=_k,Object.defineProperty(nt,Symbol.toStringTag,{value:"Module"})});
|
|
427
|
+
`)&&(m="(?: "+m+")",v=" "+v,g++),s=new RegExp("^(?:"+m+")",y)),i0&&(s=new RegExp("^"+m+"$(?!\\s)",y)),o0&&(c=r.lastIndex),l=Ah.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:o0&&l&&(r.lastIndex=r.global?l.index+l[0].length:c),i0&&l&&l.length>1&&rve.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=Xge(null),u=0;u<f.length;u++)p=f[u],d[p[0]]=l[p[1]];return l});var a0=n0,ove=dge,aj=a0;ove({target:"RegExp",proto:!0,forced:/./.exec!==aj},{exec:aj});var sj=Xl,ive=a0,cj=no,lj=Gl,ave=Sh,sve=lj("species"),s0=RegExp.prototype,cve=function(e,t,r,n){var o=lj(e),i=!cj(function(){var l={};return l[o]=function(){return 7},""[e](l)!=7}),a=i&&!cj(function(){var l=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[sve]=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===ive||h===s0.exec?i&&!f?{done:!0,value:s.call(u,d,p)}:{done:!0,value:l.call(d,u,p)}:{done:!1}});sj(String.prototype,e,c[0]),sj(s0,o,c[1])}n&&ave(s0[o],"sham",!0)},lve=kh,uve=$h,dve=bh,uj=function(e){return function(t,r){var n=uve(dve(t)),o=lve(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)}},fve={codeAt:uj(!1),charAt:uj(!0)},pve=fve.charAt,hve=function(e,t,r){return t+(r?pve(e,t).length:1)},mve=gM,yve=Math.floor,gve="".replace,vve=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,bve=/\$([$&'`]|\d{1,2})/g,wve=function(e,t,r,n,o,i){var a=r+e.length,s=n.length,c=bve;return o!==void 0&&(o=mve(o),c=vve),gve.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=yve(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})},xve=Di,Sve=Ln,_ve=Rw,Eve=a0,kve=function(e,t){var r=e.exec;if(Sve(r)){var n=r.call(e,t);return n!==null&&xve(n),n}if(_ve(e)==="RegExp")return Eve.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Tve=cve,$ve=no,Ove=Di,Cve=Ln,Ave=kh,Ive=zM,Ks=$h,Rve=bh,Pve=hve,Nve=fM,Mve=wve,jve=kve,Dve=Gl,c0=Dve("replace"),Fve=Math.max,Lve=Math.min,qve=function(e){return e===void 0?e:String(e)},Bve=function(){return"a".replace(/./,"$0")==="$0"}(),dj=function(){return/./[c0]?/./[c0]("a","$0")==="":!1}(),Uve=!$ve(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Tve("replace",function(e,t,r){var n=dj?"$":"$0";return[function(i,a){var s=Rve(this),c=i==null?void 0:Nve(i,c0);return c?c.call(i,s,a):t.call(Ks(s),i,a)},function(o,i){var a=Ove(this),s=Ks(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=Cve(i);l||(i=Ks(i));var u=a.global;if(u){var d=a.unicode;a.lastIndex=0}for(var p=[];;){var f=jve(a,s);if(f===null||(p.push(f),!u))break;var h=Ks(f[0]);h===""&&(a.lastIndex=Pve(s,Ive(a.lastIndex),d))}for(var y="",m=0,g=0;g<p.length;g++){f=p[g];for(var v=Ks(f[0]),b=Fve(Lve(Ave(f.index),s.length),0),x=[],w=1;w<f.length;w++)x.push(qve(f[w]));var S=f.groups;if(l){var $=[v].concat(x,b,s);S!==void 0&&$.push(S);var R=Ks(i.apply(void 0,$))}else R=Mve(v,s,b,x,S,i);b>=m&&(y+=s.slice(m,b)+R,m=b+v.length)}return y+s.slice(m)}]},!Uve||!Bve||dj);var eu=Er,zve=sb,Zve=va,Ih=function(e){return zve.slice(0,e.length)===e},Vve=function(){return Ih("Bun/")?"BUN":Ih("Cloudflare-Workers")?"CLOUDFLARE":Ih("Deno/")?"DENO":Ih("Node.js/")?"NODE":eu.Bun&&typeof Bun.version=="string"?"BUN":eu.Deno&&typeof Deno.version=="object"?"DENO":Zve(eu.process)==="process"?"NODE":eu.window&&eu.document?"BROWSER":"REST"}(),Hve=TypeError,Wve=function(e,t){if(e<t)throw new Hve("Not enough arguments");return e},fj=Er,Kve=Yv,Gve=tn,Jve=Vve,Yve=sb,Xve=th,Qve=Wve,ebe=fj.Function,tbe=/MSIE .\./.test(Yve)||Jve==="BUN"&&function(){var e=fj.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),pj=function(e,t){var r=t?2:1;return tbe?function(n,o){var i=Qve(arguments.length,1)>r,a=Gve(n)?n:ebe(n),s=i?Xve(arguments,r):[],c=i?function(){Kve(a,this,s)}:a;return t?e(c,o):e(c)}:e},rbe=Zt,hj=Er,nbe=pj,mj=nbe(hj.setInterval,!0);rbe({global:!0,bind:!0,forced:hj.setInterval!==mj},{setInterval:mj});var obe=Zt,yj=Er,ibe=pj,gj=ibe(yj.setTimeout,!0);obe({global:!0,bind:!0,forced:yj.setTimeout!==gj},{setTimeout:gj});var abe=Ur,sbe=abe.setInterval,cbe=sbe;const lbe=St(cbe);var ube=kr,vj=function(e,t){var r=[][e];return!!r&&ube(function(){r.call(null,t||function(){return 1},1)})},dbe=Zt,fbe=Qv,pbe=UR.indexOf,hbe=vj,l0=fbe([].indexOf),bj=!!l0&&1/l0([1],1,-0)<0,mbe=bj||!hbe("indexOf");dbe({target:"Array",proto:!0,forced:mbe},{indexOf:function(t){var r=arguments.length>1?arguments[1]:void 0;return bj?l0(this,t,r)||0:pbe(this,t,r)}});var ybe=Sa,gbe=ybe("Array","indexOf"),vbe=ei,bbe=gbe,u0=Array.prototype,wbe=function(e){var t=e.indexOf;return e===u0||vbe(u0,e)&&t===u0.indexOf?bbe:t},xbe=wbe,Sbe=xbe,_be=Sbe;const Ebe=St(_be);var wj=zp,kbe=TypeError,Tbe=function(e,t){if(!delete e[t])throw new kbe("Cannot delete property "+wj(t)+" of "+wj(e))},$be=Zt,Obe=ti,Cbe=Ib,Abe=Hp,Ibe=ba,Rbe=kN,Pbe=kb,Nbe=Ab,Mbe=Nl,d0=Tbe,jbe=Kp,Dbe=jbe("splice"),Fbe=Math.max,Lbe=Math.min;$be({target:"Array",proto:!0,forced:!Dbe},{splice:function(t,r){var n=Obe(this),o=Ibe(n),i=Cbe(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=Lbe(Fbe(Abe(r),0),o-i)),Pbe(o+s-c),l=Nbe(n,c),u=0;u<c;u++)d=i+u,d in n&&Mbe(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]:d0(n,p);for(u=o;u>o-c+s;u--)d0(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]:d0(n,p);for(u=0;u<s;u++)n[u+i]=arguments[u+2];return Rbe(n,o-c+s),l}});var qbe=Sa,Bbe=qbe("Array","splice"),Ube=ei,zbe=Bbe,f0=Array.prototype,Zbe=function(e){var t=e.splice;return e===f0||Ube(f0,e)&&t===f0.splice?zbe:t},Vbe=Zbe,Hbe=Vbe,Wbe=Hbe;const Kbe=St(Wbe);var Gbe=Sa,Jbe=Gbe("Array","concat"),Ybe=ei,Xbe=Jbe,p0=Array.prototype,Qbe=function(e){var t=e.concat;return e===p0||Ybe(p0,e)&&t===p0.concat?Xbe:t},ewe=Qbe,twe=ewe,rwe=twe;const ir=St(rwe);var nwe=Zt,owe=Tr,xj=Date,iwe=owe(xj.prototype.getTime);nwe({target:"Date",stat:!0},{now:function(){return iwe(new xj)}});var awe=Ur,swe=awe.Date.now,cwe=swe,lwe=cwe,uwe=lwe;const Fi=St(uwe);var dwe=zb.forEach,fwe=vj,pwe=fwe("forEach"),hwe=pwe?[].forEach:function(t){return dwe(this,t,arguments.length>1?arguments[1]:void 0)},mwe=Zt,Sj=hwe;mwe({target:"Array",proto:!0,forced:[].forEach!==Sj},{forEach:Sj});var ywe=Sa,gwe=ywe("Array","forEach"),vwe=gwe,bwe=vwe,wwe=Ml,xwe=On,Swe=ei,_we=bwe,h0=Array.prototype,Ewe={DOMTokenList:!0,NodeList:!0},kwe=function(e){var t=e.forEach;return e===h0||Swe(h0,e)&&t===h0.forEach||xwe(Ewe,wwe(e))?_we:t},Twe=kwe;const Rh=St(Twe);var $we=Zt,Owe=ti,_j=Nb,Cwe=kr,Awe=Cwe(function(){_j(1)});$we({target:"Object",stat:!0,forced:Awe},{keys:function(t){return _j(Owe(t))}});var Iwe=Ur,Rwe=Iwe.Object.keys,Pwe=Rwe,Nwe=Pwe,Mwe=Nwe;const jwe=St(Mwe);var Dwe=Ur,Fwe=Dwe.Object.getOwnPropertySymbols,Lwe=Fwe,qwe=Lwe,Bwe=qwe;const Ej=St(Bwe);var Uwe=Zt,zwe=zb.filter,Zwe=Kp,Vwe=Zwe("filter");Uwe({target:"Array",proto:!0,forced:!Vwe},{filter:function(t){return zwe(this,t,arguments.length>1?arguments[1]:void 0)}});var Hwe=Sa,Wwe=Hwe("Array","filter"),Kwe=ei,Gwe=Wwe,m0=Array.prototype,Jwe=function(e){var t=e.filter;return e===m0||Kwe(m0,e)&&t===m0.filter?Gwe:t},Ywe=Jwe,Xwe=Ywe,Qwe=Xwe;const e0e=St(Qwe);var kj={exports:{}},t0e=Zt,r0e=kr,n0e=ko,Tj=Cl.f,$j=mn,o0e=!$j||r0e(function(){Tj(1)});t0e({target:"Object",stat:!0,forced:o0e,sham:!$j},{getOwnPropertyDescriptor:function(t,r){return Tj(n0e(t),r)}});var i0e=Ur,Oj=i0e.Object,a0e=kj.exports=function(t,r){return Oj.getOwnPropertyDescriptor(t,r)};Oj.getOwnPropertyDescriptor.sham&&(a0e.sham=!0);var s0e=kj.exports,c0e=s0e,l0e=c0e,u0e=l0e;const Cj=St(u0e);var d0e=To,f0e=Tr,p0e=eh,h0e=rh,m0e=Ni,y0e=f0e([].concat),g0e=d0e("Reflect","ownKeys")||function(t){var r=p0e.f(m0e(t)),n=h0e.f;return n?y0e(r,n(t)):r},v0e=Zt,b0e=mn,w0e=g0e,x0e=ko,S0e=Cl,_0e=Nl;v0e({target:"Object",stat:!0,sham:!b0e},{getOwnPropertyDescriptors:function(t){for(var r=x0e(t),n=S0e.f,o=w0e(r),i={},a=0,s,c;o.length>a;)c=n(r,s=o[a++]),c!==void 0&&_0e(i,s,c);return i}});var E0e=Ur,k0e=E0e.Object.getOwnPropertyDescriptors,T0e=k0e,$0e=T0e,O0e=$0e;const Aj=St(O0e);var Ij={exports:{}},C0e=Zt,A0e=mn,Rj=Gp.f;C0e({target:"Object",stat:!0,forced:Object.defineProperties!==Rj,sham:!A0e},{defineProperties:Rj});var I0e=Ur,Pj=I0e.Object,R0e=Ij.exports=function(t,r){return Pj.defineProperties(t,r)};Pj.defineProperties.sham&&(R0e.sham=!0);var P0e=Ij.exports,N0e=P0e,M0e=N0e,j0e=M0e;const D0e=St(j0e);var F0e=XN;const L0e=St(F0e);var q0e=!1;function B0e(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 U0e(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 z0e=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?!q0e: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(U0e(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=B0e(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}(),rn="-ms-",Ph="-moz-",jt="-webkit-",Nj="comm",y0="rule",g0="decl",Z0e="@import",Mj="@keyframes",V0e="@layer",H0e=Math.abs,Nh=String.fromCharCode,W0e=Object.assign;function K0e(e,t){return zr(e,0)^45?(((t<<2^zr(e,0))<<2^zr(e,1))<<2^zr(e,2))<<2^zr(e,3):0}function jj(e){return e.trim()}function G0e(e,t){return(e=t.exec(e))?e[0]:e}function Dt(e,t,r){return e.replace(t,r)}function v0(e,t){return e.indexOf(t)}function zr(e,t){return e.charCodeAt(t)|0}function tu(e,t,r){return e.slice(t,r)}function Ao(e){return e.length}function b0(e){return e.length}function Mh(e,t){return t.push(e),e}function J0e(e,t){return e.map(t).join("")}var jh=1,Gs=1,Dj=0,gn=0,gr=0,Js="";function Dh(e,t,r,n,o,i,a){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:jh,column:Gs,length:a,return:""}}function ru(e,t){return W0e(Dh("",null,null,"",null,null,0),e,{length:-e.length},t)}function Y0e(){return gr}function X0e(){return gr=gn>0?zr(Js,--gn):0,Gs--,gr===10&&(Gs=1,jh--),gr}function An(){return gr=gn<Dj?zr(Js,gn++):0,Gs++,gr===10&&(Gs=1,jh++),gr}function Io(){return zr(Js,gn)}function Fh(){return gn}function nu(e,t){return tu(Js,e,t)}function ou(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 Fj(e){return jh=Gs=1,Dj=Ao(Js=e),gn=0,[]}function Lj(e){return Js="",e}function Lh(e){return jj(nu(gn-1,w0(e===91?e+2:e===40?e+1:e)))}function Q0e(e){for(;(gr=Io())&&gr<33;)An();return ou(e)>2||ou(gr)>3?"":" "}function exe(e,t){for(;--t&&An()&&!(gr<48||gr>102||gr>57&&gr<65||gr>70&&gr<97););return nu(e,Fh()+(t<6&&Io()==32&&An()==32))}function w0(e){for(;An();)switch(gr){case e:return gn;case 34:case 39:e!==34&&e!==39&&w0(gr);break;case 40:e===41&&w0(e);break;case 92:An();break}return gn}function txe(e,t){for(;An()&&e+gr!==47+10;)if(e+gr===42+42&&Io()===47)break;return"/*"+nu(t,gn-1)+"*"+Nh(e===47?e:An())}function rxe(e){for(;!ou(Io());)An();return nu(e,gn)}function nxe(e){return Lj(qh("",null,null,null,[""],e=Fj(e),0,[0],e))}function qh(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,$=b;m;)switch(h=v,v=An()){case 40:if(h!=108&&zr($,d-1)==58){v0($+=Dt(Lh(v),"&","&\f"),"&\f")!=-1&&(g=-1);break}case 34:case 39:case 91:$+=Lh(v);break;case 9:case 10:case 13:case 32:$+=Q0e(h);break;case 92:$+=exe(Fh()-1,7);continue;case 47:switch(Io()){case 42:case 47:Mh(oxe(txe(An(),Fh()),t,r),c);break;default:$+="/"}break;case 123*y:s[l++]=Ao($)*g;case 125*y:case 59:case 0:switch(v){case 0:case 125:m=0;case 59+u:g==-1&&($=Dt($,/\f/g,"")),f>0&&Ao($)-d&&Mh(f>32?Bj($+";",n,r,d-1):Bj(Dt($," ","")+";",n,r,d-2),c);break;case 59:$+=";";default:if(Mh(S=qj($,t,r,l,u,o,s,b,x=[],w=[],d),i),v===123)if(u===0)qh($,t,S,S,x,i,d,s,w);else switch(p===99&&zr($,3)===110?100:p){case 100:case 108:case 109:case 115:qh(e,S,S,n&&Mh(qj(e,S,S,0,0,o,s,b,o,x=[],d),w),o,w,d,s,n?x:w);break;default:qh($,S,S,S,[""],w,0,s,w)}}l=u=f=0,y=g=1,b=$="",d=a;break;case 58:d=1+Ao($),f=h;default:if(y<1){if(v==123)--y;else if(v==125&&y++==0&&X0e()==125)continue}switch($+=Nh(v),v*y){case 38:g=u>0?1:($+="\f",-1);break;case 44:s[l++]=(Ao($)-1)*g,g=1;break;case 64:Io()===45&&($+=Lh(An())),p=Io(),u=d=Ao(b=$+=rxe(Fh())),v++;break;case 45:h===45&&Ao($)==2&&(y=0)}}return i}function qj(e,t,r,n,o,i,a,s,c,l,u){for(var d=o-1,p=o===0?i:[""],f=b0(p),h=0,y=0,m=0;h<n;++h)for(var g=0,v=tu(e,d+1,d=H0e(y=a[h])),b=e;g<f;++g)(b=jj(y>0?p[g]+" "+v:Dt(v,/&\f/g,p[g])))&&(c[m++]=b);return Dh(e,t,r,o===0?y0:s,c,l,u)}function oxe(e,t,r){return Dh(e,t,r,Nj,Nh(Y0e()),tu(e,2,-2),0)}function Bj(e,t,r,n){return Dh(e,t,r,g0,tu(e,0,n),tu(e,n+1,-1),n)}function Ys(e,t){for(var r="",n=b0(e),o=0;o<n;o++)r+=t(e[o],o,e,t)||"";return r}function ixe(e,t,r,n){switch(e.type){case V0e:if(e.children.length)break;case Z0e:case g0:return e.return=e.return||e.value;case Nj:return"";case Mj:return e.return=e.value+"{"+Ys(e.children,n)+"}";case y0:e.value=e.props.join(",")}return Ao(r=Ys(e.children,n))?e.return=e.value+"{"+r+"}":""}function axe(e){var t=b0(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 sxe(e){return function(t){t.root||(t=t.return)&&e(t)}}function cxe(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var lxe=function(t,r,n){for(var o=0,i=0;o=i,i=Io(),o===38&&i===12&&(r[n]=1),!ou(i);)An();return nu(t,gn)},uxe=function(t,r){var n=-1,o=44;do switch(ou(o)){case 0:o===38&&Io()===12&&(r[n]=1),t[n]+=lxe(gn-1,r,n);break;case 2:t[n]+=Lh(o);break;case 4:if(o===44){t[++n]=Io()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=Nh(o)}while(o=An());return t},dxe=function(t,r){return Lj(uxe(Fj(t),r))},Uj=new WeakMap,fxe=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&&!Uj.get(n))&&!o){Uj.set(t,!0);for(var i=[],a=dxe(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]}}},pxe=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function zj(e,t){switch(K0e(e,t)){case 5103:return jt+"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 jt+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return jt+e+Ph+e+rn+e+e;case 6828:case 4268:return jt+e+rn+e+e;case 6165:return jt+e+rn+"flex-"+e+e;case 5187:return jt+e+Dt(e,/(\w+).+(:[^]+)/,jt+"box-$1$2"+rn+"flex-$1$2")+e;case 5443:return jt+e+rn+"flex-item-"+Dt(e,/flex-|-self/,"")+e;case 4675:return jt+e+rn+"flex-line-pack"+Dt(e,/align-content|flex-|-self/,"")+e;case 5548:return jt+e+rn+Dt(e,"shrink","negative")+e;case 5292:return jt+e+rn+Dt(e,"basis","preferred-size")+e;case 6060:return jt+"box-"+Dt(e,"-grow","")+jt+e+rn+Dt(e,"grow","positive")+e;case 4554:return jt+Dt(e,/([^-])(transform)/g,"$1"+jt+"$2")+e;case 6187:return Dt(Dt(Dt(e,/(zoom-|grab)/,jt+"$1"),/(image-set)/,jt+"$1"),e,"")+e;case 5495:case 3959:return Dt(e,/(image-set\([^]*)/,jt+"$1$`$1");case 4968:return Dt(Dt(e,/(.+:)(flex-)?(.*)/,jt+"box-pack:$3"+rn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+jt+e+e;case 4095:case 3583:case 4068:case 2532:return Dt(e,/(.+)-inline(.+)/,jt+"$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(Ao(e)-1-t>6)switch(zr(e,t+1)){case 109:if(zr(e,t+4)!==45)break;case 102:return Dt(e,/(.+:)(.+)-([^]+)/,"$1"+jt+"$2-$3$1"+Ph+(zr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~v0(e,"stretch")?zj(Dt(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(zr(e,t+1)!==115)break;case 6444:switch(zr(e,Ao(e)-3-(~v0(e,"!important")&&10))){case 107:return Dt(e,":",":"+jt)+e;case 101:return Dt(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+jt+(zr(e,14)===45?"inline-":"")+"box$3$1"+jt+"$2$3$1"+rn+"$2box$3")+e}break;case 5936:switch(zr(e,t+11)){case 114:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return jt+e+rn+Dt(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return jt+e+rn+e+e}return e}var hxe=function(t,r,n,o){if(t.length>-1&&!t.return)switch(t.type){case g0:t.return=zj(t.value,t.length);break;case Mj:return Ys([ru(t,{value:Dt(t.value,"@","@"+jt)})],o);case y0:if(t.length)return J0e(t.props,function(i){switch(G0e(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ys([ru(t,{props:[Dt(i,/:(read-\w+)/,":"+Ph+"$1")]})],o);case"::placeholder":return Ys([ru(t,{props:[Dt(i,/:(plac\w+)/,":"+jt+"input-$1")]}),ru(t,{props:[Dt(i,/:(plac\w+)/,":"+Ph+"$1")]}),ru(t,{props:[Dt(i,/:(plac\w+)/,rn+"input-$1")]})],o)}return""})}},mxe=[hxe],yxe=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||mxe,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=[fxe,pxe];{var u,d=[ixe,sxe(function(y){u.insert(y)})],p=axe(l.concat(o,d)),f=function(m){return Ys(nxe(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 z0e({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 gxe(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 vxe={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},bxe=!1,wxe=/[A-Z]|^ms/g,xxe=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Zj=function(t){return t.charCodeAt(1)===45},Vj=function(t){return t!=null&&typeof t!="boolean"},x0=cxe(function(e){return Zj(e)?e:e.replace(wxe,"-$&").toLowerCase()}),Hj=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(xxe,function(n,o,i){return Ro={name:o,styles:i,next:Ro},o})}return vxe[t]!==1&&!Zj(t)&&typeof r=="number"&&r!==0?r+"px":r},Sxe="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function iu(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 Ro={name:o.name,styles:o.styles,next:Ro},o.name;var i=r;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Ro={name:a.name,styles:a.styles,next:Ro},a=a.next;var s=i.styles+";";return s}return _xe(e,t,r)}case"function":{if(e!==void 0){var c=Ro,l=r(e);return Ro=c,iu(e,t,l)}break}}var u=r;if(t==null)return u;var d=t[u];return d!==void 0?d:u}function _xe(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o<r.length;o++)n+=iu(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]+"}":Vj(s)&&(n+=x0(i)+":"+Hj(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&bxe)throw new Error(Sxe);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var c=0;c<a.length;c++)Vj(a[c])&&(n+=x0(i)+":"+Hj(i,a[c])+";");else{var l=iu(e,t,a);switch(i){case"animation":case"animationName":{n+=x0(i)+":"+l+";";break}default:n+=i+"{"+l+"}"}}}}return n}var Wj=/label:\s*([^\s;\n{]+)\s*(;|$)/g,Ro;function S0(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="";Ro=void 0;var i=e[0];if(i==null||i.raw===void 0)n=!1,o+=iu(r,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=iu(r,t,e[s]),n){var c=i;o+=c[s]}Wj.lastIndex=0;for(var l="",u;(u=Wj.exec(o))!==null;)l+="-"+u[1];var d=gxe(o)+l;return{name:d,styles:o,next:Ro}}var Exe=!0;function Kj(e,t,r){var n="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):n+=o+" "}),n}var kxe=function(t,r,n){var o=t.key+"-"+r.name;(n===!1||Exe===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},Txe=function(t,r,n){kxe(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 Gj(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function Jj(e,t,r){var n=[],o=Kj(e,n,r);return n.length<2?r:o+t(n)}var $xe=function(t){var r=yxe(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=S0(l,r.registered,void 0);return Txe(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=S0(l,r.registered),p="animation-"+d.name;return Gj(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=S0(l,r.registered);Gj(r,d)},a=function(){for(var c=arguments.length,l=new Array(c),u=0;u<c;u++)l[u]=arguments[u];return Jj(r.registered,n,Oxe(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:Kj.bind(null,r.registered),merge:Jj.bind(null,r.registered,n)}},Oxe=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},Cxe=Xl,_0=Date.prototype,Yj="Invalid Date",Xj="toString",Axe=_0[Xj],Ixe=_0.getTime;String(new Date(NaN))!=Yj&&Cxe(_0,Xj,function(){var t=Ixe.call(this);return t===t?Axe.call(this):Yj});var Rxe=Xw,Pxe=KM,Nxe=Rxe?{}.toString:function(){return"[object "+Pxe(this)+"]"},Mxe=Xw,jxe=Xl,Dxe=Nxe;Mxe||jxe(Object.prototype,"toString",Dxe,{unsafe:!0});var Fxe=Kw.PROPER,Lxe=Xl,qxe=Di,Qj=$h,Bxe=no,Uxe=GM,E0="toString",eD=RegExp.prototype,tD=eD[E0],zxe=Bxe(function(){return tD.call({source:"a",flags:"b"})!="/a/b"}),Zxe=Fxe&&tD.name!=E0;(zxe||Zxe)&&Lxe(RegExp.prototype,E0,function(){var t=qxe(this),r=Qj(t.source),n=t.flags,o=Qj(n===void 0&&t instanceof RegExp&&!("flags"in eD)?Uxe.call(t):n);return"/"+r+"/"+o},{unsafe:!0});var rD=typeof window<"u"?window:self,Vxe=rD.crypto||rD.msCrypto,Hxe=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}}(Vxe);const Wxe=St(Hxe);function Kxe(){return Wxe().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var Gxe=CR;const nD=St(Gxe);function Ut(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 oD(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 ir(r=[ir(n="%c".concat(e,"%c ")).call(n,t)]).call(r,At(Ut("green","white")),i)}function Jxe(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=Oo(s,1),l=c[0];typeof l=="function"&&(i=l());var u=nD(i[0])?i:[i],d=u.length===1;Rh(u).call(u,function(p,f){if(d){var h,y;(h=console).log.apply(h,At(oD.apply(void 0,ir(y=[e]).call(y,At(p)))))}else if(f){var m;(m=console).log.apply(m,At(nD(p)?p:[p]))}else{var g,v;(g=console).groupCollapsed.apply(g,At(oD.apply(void 0,ir(v=[e]).call(v,At(p)))))}}),d||console.groupEnd()}}:function(){return 0}}var Yxe=_a,Xxe=Kw.EXISTS,Qxe=Jl.f,iD=Function.prototype,eSe=iD.toString,tSe=/^\s*function ([^ (]*)/,rSe="name";Yxe&&!Xxe&&Qxe(iD,rSe,{configurable:!0,get:function(){try{return eSe.call(this).match(tSe)[1]}catch{return""}}});var nSe=Ur,oSe=nSe.setTimeout,iSe=oSe;const aSe=St(iSe);function sSe(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=Fi();s-r>t?(e.apply(void 0,i),r=s):(clearTimeout(n),n=aSe(function(){e.apply(void 0,i),r=Fi()},Math.max(0,t-s+r)))}}var aD=function(t){var r=t.debounce,n=t.name,o=t.onEvent,i=t.target,a=O.useRef();a.current=o;var s=O.useMemo(function(){return sSe(function(l){var u=a.current;u&&u(l)},r)},[r,a]),c=O.useCallback(function(l){l.timeStampLow=Fi(),s(l)},[s]);return O.useLayoutEffect(function(){return i.addEventListener(n,c,{passive:!0}),c({target:i,type:n}),function(){return i.removeEventListener(n,c)}},[n,c,i]),!1};aD.defaultProps={debounce:200};var cSe=Math.sign||function(t){var r=+t;return r===0||r!==r?r:r<0?-1:1},lSe=Zt,uSe=cSe;lSe({target:"Math",stat:!0},{sign:uSe});var dSe=Ur,fSe=dSe.Math.sign,pSe=fSe,hSe=pSe,mSe=hSe;const ySe=St(mSe);function gSe(e,t){var r=ySe(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 vSe(e,t,r,n){for(var o=e,i=0;i<n;i++)o=r(o,t);return o}var sD=function(t){var r=t.name,n=t.onEnd,o=t.target,i=t.value,a=O.useRef(),s=O.useCallback(function(l,u,d,p){var f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Fi();(d==="100%"||typeof d=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var h=d==="100%"?o.scrollHeight-o.offsetHeight:d,y=vSe(u,h,gSe,(Fi()-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=O.useCallback(function(){cancelAnimationFrame(a.current),n&&n(!1)},[n]);return O.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};sD.propTypes={name:Rt.string.isRequired,onEnd:Rt.func,target:Rt.any.isRequired,value:Rt.oneOfType([Rt.number,Rt.oneOf(["100%"])]).isRequired};function k0(e){var t=O.useState(e),r=Oo(t,2),n=r[0],o=r[1],i=O.useRef(),a=O.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 cD(e,t){var r=jwe(e);if(Ej){var n=Ej(e);t&&(n=e0e(n).call(n,function(o){return Cj(e,o).enumerable})),r.push.apply(r,n)}return r}function lD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};if(t%2){var n;Rh(n=cD(Object(r),!0)).call(n,function(i){Che(e,i,r[i])})}else if(Aj)D0e(e,Aj(r));else{var o;Rh(o=cD(Object(r))).call(o,function(i){L0e(e,i,Cj(r,i))})}}return e}var bSe=function(){return 1/0},uD=17,wSe="bottom",oo="top",dD=1,xSe=34,fD={};function SSe(e,t){return e(),lbe(e,t)}function pD(e){var t=e.mode,r=e.target,n=r.offsetHeight,o=r.scrollHeight,i=r.scrollTop,a=o-i-n<dD,s=i<dD,c=t===oo?s:a,l=t!==oo?s:a;return{atBottom:a,atEnd:c,atStart:l,atTop:s}}function au(e,t){return e===(t===oo?0:"100%")}var T0=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=O.useMemo(function(){return Jxe("<ScrollToBottom>",{force:i})},[i]);s=s===oo?oo:wSe;var d=O.useRef(0),p=O.useRef(a),f=k0(s===oo?0:"100%"),h=Oo(f,3),y=h[0],m=h[1],g=h[2],v=k0(null),b=Oo(v,3),x=b[0],w=b[1],S=b[2],$=O.useRef(0),R=O.useRef(0),N=O.useRef(0),A=O.useState(!0),D=Oo(A,2),H=D[0],U=D[1],Z=O.useState(!0),L=Oo(Z,2),q=L[0],W=L[1],J=O.useState(!0),M=Oo(J,2),E=M[0],B=M[1],Q=O.useState(!1),T=Oo(Q,2),ce=T[0],pe=T[1],he=k0(!0),be=Oo(he,3),Ee=be[0],_e=be[1],ye=be[2],le=O.useRef([]),te=O.useCallback(function(X){var me=S.current;return le.current.push(X),me&&X({scrollTop:me.scrollTop}),function(){var Oe=le.current,tt=Ebe(Oe).call(Oe,X);~tt&&Kbe(Oe).call(Oe,tt,1)}},[le,S]),ve=O.useCallback(function(){var X=g.current;u(function(){var me;return ir(me=["%cSpineTo%c: %conEnd%c is fired."]).call(me,At(Ut("magenta")),At(Ut("orange")),[{animateTo:X}])}),d.current=Fi(),au(X,s)||_e(!1),m(null)},[g,u,d,s,m,_e]),Ce=O.useCallback(function(X){var me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Oe=me.behavior,tt=S.current;if(typeof X!="number"&&X!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var Ze;return[ir(Ze=["%cscrollTo%c: Will scroll to %c".concat(typeof X=="number"?X+"px":X.replace(/%/g,"%%"),"%c")]).call(Ze,At(Ut("lime","")),At(Ut("purple"))),{behavior:Oe,nextAnimateTo:X,target:tt}]}),Oe==="auto"?(ve(),tt&&(tt.scrollTop=X==="100%"?tt.scrollHeight-tt.offsetHeight:X)):(Oe!=="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(X)),au(X,s)&&(u(function(){var Ze;return[ir(Ze=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(Ze,At(Ut("lime","")),At(Ut("purple"))),[{mode:s,nextAnimateTo:X}]]}),_e(!0))},[u,ve,s,m,_e,S]),Ue=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var Oe;return ir(Oe=["%cscrollToBottom%c: Called"]).call(Oe,At(Ut("yellow","")))}),me!=="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.'),Ce("100%",{behavior:me||"smooth"})},[u,Ce]),F=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var Oe;return ir(Oe=["%cscrollToTop%c: Called"]).call(Oe,At(Ut("yellow","")))}),me!=="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.'),Ce(0,{behavior:me||"smooth"})},[u,Ce]),ue=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var tt;return ir(tt=["%cscrollToEnd%c: Called"]).call(tt,At(Ut("yellow","")))}),me!=="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 Oe={behavior:me||"smooth"};s===oo?F(Oe):Ue(Oe)},[u,s,Ue,F]),we=O.useCallback(function(){var X=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},me=X.behavior;u(function(){var tt;return ir(tt=["%cscrollToStart%c: Called"]).call(tt,At(Ut("yellow","")))}),me!=="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 Oe={behavior:me||"smooth"};s===oo?Ue(Oe):F(Oe)},[u,s,Ue,F]),fe=O.useCallback(function(){var X=S.current;if(X){if(p.current==="auto"){u(function(){var ze;return ir(ze=["%ctarget changed%c: Initial scroll"]).call(ze,At(Ut("blue")))}),X.scrollTop=s===oo?0:X.scrollHeight-X.offsetHeight,p.current=!1;return}var me=$.current,Oe=X.offsetHeight,tt=X.scrollHeight,Ze=X.scrollTop,ht=s===oo?0:Math.max(0,tt-Oe-Ze),Tt=Math.max(0,me-Ze),Vt=l({maxValue:ht,minValue:Tt,offsetHeight:Oe,scrollHeight:tt,scrollTop:Ze}),z=Math.max(0,Math.min(ht,Vt)),G;s===oo||z!==ht?G=Ze+z:G="100%",u(function(){var ze,Ke,gt;return[ir(ze=[ir(Ke=ir(gt="%cscrollToSticky%c: Will animate from %c".concat(me,"px%c to %c")).call(gt,typeof G=="number"?G+"px":G.replace(/%/g,"%%"),"%c (%c")).call(Ke,(G==="100%"?ht:G)+me,"px%c)")]).call(ze,At(Ut("orange")),At(Ut("purple")),At(Ut("purple")),At(Ut("purple"))),{animateFrom:me,maxValue:ht,minValue:Tt,nextAnimateTo:G,nextValue:z,offsetHeight:Oe,rawNextValue:Vt,scrollHeight:tt,scrollTop:Ze}]}),Ce(G,{behavior:"smooth"})}},[$,u,s,l,Ce,S]),De=O.useCallback(function(X){var me,Oe=X.timeStampLow,tt=g.current,Ze=S.current,ht=tt!==null;if(!(Oe<=d.current||!Ze)){var Tt=pD({mode:s,target:Ze}),Vt=Tt.atBottom,z=Tt.atEnd,G=Tt.atStart,ze=Tt.atTop;U(Vt),W(z),pe(G),B(ze);var Ke=Ze.offsetHeight,gt=Ze.scrollHeight,Ge=R.current,sr=N.current,$r=Ke!==Ge,Yt=gt!==sr;if($r&&(R.current=Ke),Yt&&(N.current=gt),!$r&&!Yt){var cr=ht&&au(tt,s)||z;ye.current!==cr&&(u(function(){var vt,bt,er,tr;return[ir(vt=["%conScroll%c: %csetSticky%c(%c".concat(cr,"%c)")]).call(vt,At(Ut("red")),At(Ut("red")),At(Ut("purple"))),ir(bt=[ir(er=ir(tr="(animating = %c".concat(ht,"%c && isEnd = %c")).call(tr,au(tt,s),"%c) || atEnd = %c")).call(er,z,"%c")]).call(bt,At(Ut("purple")),At(Ut("purple")),At(Ut("purple")),[{animating:ht,animateTo:tt,atEnd:z,mode:s,offsetHeight:Ze.offsetHeight,scrollHeight:Ze.scrollHeight,sticky:ye.current,nextSticky:cr}])]}),_e(cr))}else ye.current&&(u(function(){var vt;return[ir(vt=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(vt,At(Ut("red")),At(Ut("orange")),[{offsetHeightChanged:$r,scrollHeightChanged:Yt}]),{nextOffsetHeight:Ke,prevOffsetHeight:Ge,nextScrollHeight:gt,prevScrollHeight:sr}]}),fe());var ln=Ze.scrollTop;Rh(me=le.current).call(me,function(vt){return vt({scrollTop:ln})})}},[g,u,d,s,R,N,le,fe,U,W,pe,B,_e,ye,S]);O.useEffect(function(){if(x){var X=!1,me=SSe(function(){var Oe=S.current,tt=g.current!==null;ye.current?pD({mode:s,target:Oe}).atEnd?X=!1:X?Fi()-X>xSe&&(tt||($.current=Oe.scrollTop,u(function(){var Ze;return ir(Ze=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(Ze,At(Ut("navy")),At(Ut("orange")))}),fe()),X=!1):X=Fi():Oe.scrollHeight<=Oe.offsetHeight&&!ye.current&&(u(function(){var Ze;return[ir(Ze=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(Ze,At(Ut("navy")),At(Ut("purple"))),[{offsetHeight:Oe.offsetHeight,scrollHeight:Oe.scrollHeight,sticky:ye.current}]]}),_e(!0))},Math.max(uD,r)||uD);return function(){return clearInterval(me)}}},[g,r,u,s,fe,_e,ye,x,S]);var Ie=O.useMemo(function(){var X=fD[c]||(fD[c]=$xe({key:"react-scroll-to-bottom--css-"+Kxe(),nonce:c}));return function(me){return X.css(me)+""}},[c]),je=O.useMemo(function(){return{observeScrollPosition:te,setTarget:w,styleToClassName:Ie}},[te,w,Ie]),ut=O.useMemo(function(){return{atBottom:H,atEnd:q,atStart:ce,atTop:E,mode:s}},[H,q,ce,E,s]),We=O.useMemo(function(){var X=y!==null;return{animating:X,animatingToEnd:X&&au(y,s),sticky:Ee}},[y,s,Ee]),K=O.useMemo(function(){return lD(lD({},ut),We)},[ut,We]),ae=O.useMemo(function(){return{scrollTo:Ce,scrollToBottom:Ue,scrollToEnd:ue,scrollToStart:we,scrollToTop:F}},[Ce,Ue,ue,we,F]);return O.useEffect(function(){if(x){var X=function(){N.current=x.scrollHeight};return x.addEventListener("focus",X,{capture:!0,passive:!0}),function(){return x.removeEventListener("focus",X)}}},[x]),u(function(){var X;return[ir(X=["%cRender%c: Render"]).call(X,At(Ut("cyan",""))),{animateTo:y,animating:y!==null,sticky:Ee,target:x}]}),O.createElement(gh.Provider,{value:je},O.createElement(kw.Provider,{value:ae},O.createElement(Ow.Provider,{value:K},O.createElement(Tw.Provider,{value:ut},O.createElement($w.Provider,{value:We},n,x&&O.createElement(aD,{debounce:o,name:"scroll",onEvent:De,target:x}),x&&y!==null&&O.createElement(sD,{name:"scrollTop",onEnd:ve,target:x,value:y}))))))};T0.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:bSe},T0.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 _Se={height:"100%",overflowY:"auto",width:"100%"},$0=function(t){var r=t.children,n=t.className,o=O.useContext(gh),i=o.setTarget,a=Cw()(_Se);return O.createElement("div",{className:gw(a,(n||"")+""),ref:i},r)};$0.defaultProps={children:void 0,className:void 0},$0.propTypes={children:Rt.any,className:Rt.string};var ESe={position:"relative"},O0=function(t){var r=t.children,n=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Cw()(ESe);return O.createElement("div",{className:gw(a,(n||"")+"")},O.createElement($0,{className:(i||"")+""},r),O.createElement(Aw,{className:(o||"")+""}))};O0.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},O0.propTypes={children:Rt.any,className:Rt.string,followButtonClassName:Rt.string,scrollViewClassName:Rt.string};var C0=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 O.createElement(T0,{checkInterval:r,debounce:i,debug:a,initialScrollBehavior:c,mode:l,nonce:u,scroller:d},O.createElement(O0,{className:o,followButtonClassName:s,scrollViewClassName:p},n))};C0.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},C0.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 kSe(){var e=HN(),t=e.scrollToBottom;return t}Une();const hD=O.memo(({scrollDownButton:e,...t})=>{const{messageList:r}=Wt,n=En(m=>m.conversationId),o=pt(m=>m.messages)[n??""]??[],i=pt(m=>m.setState),a=pt(m=>m.client),s=pt(m=>m.messageContainerRef),c=pt(m=>m.isTyping),l=pt(m=>m.setIsTyping),u=O.useMemo(()=>g5(o),[o]),[d,p]=O.useState(!0),{y:f}=CX(s),h=O.useCallback(()=>{if(!s.current)return;const{scrollHeight:m}=s.current;d&&s.current.scrollTo({top:m})},[]);O.useEffect(()=>a==null?void 0:a.on("isTyping",({isTyping:m,timeout:g})=>{l(m,g)}),[]),O.useEffect(()=>{const m=o[o.length-1];i({disableComposer:!!(m!=null&&m.disableInput)})},[o.length]),O.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:QX;return Y.jsxs(C0,{...t,...r.container,followButtonClassName:"bpHidden",scrollViewClassName:r.viewPort.className,children:[Y.jsx(qne,{}),u.map(m=>Y.jsx(Jv,{scroll:h,...m},m.id)),c&&Y.jsx(Jv,{scroll:h,direction:"incoming",children:Y.jsx(WI,{})}),Y.jsx("li",{"data-is-at-bottom":d,...r.scrollDownButton.container,children:Y.jsxs(TSe,{children:[(e==null?void 0:e.text)??"Back"," ",Y.jsx(y,{...r.scrollDownButton.icon})]})})]})}),TSe=e=>{const[t]=KN(),r=kSe(),{messageList:{scrollDownButton:n}}=Wt;return!t&&Y.jsx("button",{type:"button",...n.button,onClick:()=>r(),...e})},$Se=()=>{const{color:e,fontFamily:t,radius:r,themeMode:n,variant:o}=nA(),i=O.useMemo(()=>Tk({color:e,fontFamily:t,radius:r,themeMode:n,variant:o}),[e,t,r,n,o]);return Y.jsxs(Y.Fragment,{children:[Y.jsxs(UI,{children:[Y.jsx(HI,{}),Y.jsx(hD,{}),Y.jsx(dI,{})]}),Y.jsx("style",{children:i})]})};rt.Avatar=gy,rt.Block=As,rt.Composer=dI,rt.Container=UI,rt.Fab=One,rt.Header=HI,rt.Message=Jv,rt.MessageList=hD,rt.Modal=Pi,rt.ModalProvider=fI,rt.RestartConversation=VI,rt.TypingIndicator=WI,rt.Webchat=$Se,rt.WebchatProvider=Qte,rt.WebchatThemeSchema=yy,rt.__adapters=NU,rt.avatarThemeSchema=tf,rt.blockThemeSchema=wk,rt.clientModePropsSchema=Ek,rt.configPropsSchema=kk,rt.configurationSchema=gk,rt.cssStyleSchema=bk,rt.descriptionItemSchema=Ga,rt.fileTypes=RC,rt.generateThemeStylesheet=Tk,rt.getClient=NC,rt.initPropsSchema=g4,rt.isFileType=PC,rt.markdownTypeSchema=vk,rt.renderers=oI,rt.statePropsSchema=Sk,rt.styleOptionSchema=$e,rt.themeSchema=xk,rt.useClient=TY,rt.useWebchatStore=pt,rt.userPropsSchema=_k,rt.webchatClasses=Wt,Object.defineProperty(rt,Symbol.toStringTag,{value:"Module"})});
|