@botpress/webchat 3.2.12 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +8058 -11512
- package/dist/index.umd.cjs +110 -109
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/vitest.config.ts +3 -0
package/dist/index.umd.cjs
CHANGED
|
@@ -1,220 +1,220 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
Please use a valid API URL.`,
|
|
3
|
-
Please use a valid Botpress Client ID.`,
|
|
4
|
-
Please make sure your client ID and API URL are valid`,
|
|
5
|
-
Please make sure your config URL is valid`,
|
|
6
|
-
Please make sure your config file is valid`,
|
|
7
|
-
Please check back later
|
|
8
|
-
Please check back later.`,
|
|
9
|
-
Please refresh the page.`,
|
|
10
|
-
Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",message:vp},Forbidden:{type:"bot",message:gp}},Hs={MethodNotFound:{type:"configuration",message:mp},QuotaExceeded:{type:"bot",message:yp},Forbidden:{type:"bot",message:bp}};function Ep(e){return e in Ws}function kp(e){return e in Hs}function Cp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Ap(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const NE=["networkerror","failedtofetch","errorininputstream"],di=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return Cp(e)?e.message.includes("[Webhook Handler]")&&Ep(e.type)?t={id:e.id,...Ws[e.type]}:kp(e.type)?t={id:e.id,...Hs[e.type]}:t={id:e.id,type:e.type,message:e.message}:Ap(e)?$p(e.message)?t={type:"disconnected",message:Sp}:Tp(e.message).includes("invalidcontenttype")?t={type:"bot",message:xp}:t={type:"event",message:e.message}:e instanceof Error&&$p(e.message)&&(t={type:"network",message:wp}),t};function $p(e){return NE.some(t=>Tp(e).includes(t))}function Tp(e){return e.replaceAll(" ","").toLowerCase()}var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Op={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){var n=1e3,r=6e4,o=36e5,i="millisecond",a="second",s="minute",l="hour",c="day",u="week",f="month",p="quarter",d="year",v="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(B){var D=["th","st","nd","rd"],M=B%100;return"["+B+(D[(M-20)%10]||D[M]||D[0])+"]"}},w=function(B,D,M){var G=String(B);return!G||G.length>=D?B:""+Array(D+1-G.length).join(M)+B},A={s:w,z:function(B){var D=-B.utcOffset(),M=Math.abs(D),G=Math.floor(M/60),U=M%60;return(D<=0?"+":"-")+w(G,2,"0")+":"+w(U,2,"0")},m:function B(D,M){if(D.date()<M.date())return-B(M,D);var G=12*(M.year()-D.year())+(M.month()-D.month()),U=D.clone().add(G,f),I=M-U<0,y=D.clone().add(G+(I?-1:1),f);return+(-(G+(M-U)/(I?U-y:y-U))||0)},a:function(B){return B<0?Math.ceil(B)||0:Math.floor(B)},p:function(B){return{M:f,y:d,w:u,d:c,D:v,h:l,m:s,s:a,ms:i,Q:p}[B]||String(B||"").toLowerCase().replace(/s$/,"")},u:function(B){return B===void 0}},x="en",k={};k[x]=b;var $="$isDayjsObject",R=function(B){return B instanceof F||!(!B||!B[$])},H=function B(D,M,G){var U;if(!D)return x;if(typeof D=="string"){var I=D.toLowerCase();k[I]&&(U=I),M&&(k[I]=M,U=I);var y=D.split("-");if(!U&&y.length>1)return B(y[0])}else{var P=D.name;k[P]=D,U=P}return!G&&U&&(x=U),U||!G&&x},T=function(B,D){if(R(B))return B.clone();var M=typeof D=="object"?D:{};return M.date=B,M.args=arguments,new F(M)},_=A;_.l=H,_.i=R,_.w=function(B,D){return T(B,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var F=function(){function B(M){this.$L=H(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[$]=!0}var D=B.prototype;return D.parse=function(M){this.$d=function(G){var U=G.date,I=G.utc;if(U===null)return new Date(NaN);if(_.u(U))return new Date;if(U instanceof Date)return new Date(U);if(typeof U=="string"&&!/Z$/i.test(U)){var y=U.match(g);if(y){var P=y[2]-1||0,j=(y[7]||"0").substring(0,3);return I?new Date(Date.UTC(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)):new Date(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,j)}}return new Date(U)}(M),this.init()},D.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},D.$utils=function(){return _},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(M,G){var U=T(M);return this.startOf(G)<=U&&U<=this.endOf(G)},D.isAfter=function(M,G){return T(M)<this.startOf(G)},D.isBefore=function(M,G){return this.endOf(G)<T(M)},D.$g=function(M,G,U){return _.u(M)?this[G]:this.set(U,M)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(M,G){var U=this,I=!!_.u(G)||G,y=_.p(M),P=function(ee,J){var Z=_.w(U.$u?Date.UTC(U.$y,J,ee):new Date(U.$y,J,ee),U);return I?Z:Z.endOf(c)},j=function(ee,J){return _.w(U.toDate()[ee].apply(U.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(J)),U)},S=this.$W,V=this.$M,Y=this.$D,q="set"+(this.$u?"UTC":"");switch(y){case d:return I?P(1,0):P(31,11);case f:return I?P(1,V):P(0,V+1);case u:var Q=this.$locale().weekStart||0,X=(S<Q?S+7:S)-Q;return P(I?Y-X:Y+(6-X),V);case c:case v:return j(q+"Hours",0);case l:return j(q+"Minutes",1);case s:return j(q+"Seconds",2);case a:return j(q+"Milliseconds",3);default:return this.clone()}},D.endOf=function(M){return this.startOf(M,!1)},D.$set=function(M,G){var U,I=_.p(M),y="set"+(this.$u?"UTC":""),P=(U={},U[c]=y+"Date",U[v]=y+"Date",U[f]=y+"Month",U[d]=y+"FullYear",U[l]=y+"Hours",U[s]=y+"Minutes",U[a]=y+"Seconds",U[i]=y+"Milliseconds",U)[I],j=I===c?this.$D+(G-this.$W):G;if(I===f||I===d){var S=this.clone().set(v,1);S.$d[P](j),S.init(),this.$d=S.set(v,Math.min(this.$D,S.daysInMonth())).$d}else P&&this.$d[P](j);return this.init(),this},D.set=function(M,G){return this.clone().$set(M,G)},D.get=function(M){return this[_.p(M)]()},D.add=function(M,G){var U,I=this;M=Number(M);var y=_.p(G),P=function(V){var Y=T(I);return _.w(Y.date(Y.date()+Math.round(V*M)),I)};if(y===f)return this.set(f,this.$M+M);if(y===d)return this.set(d,this.$y+M);if(y===c)return P(1);if(y===u)return P(7);var j=(U={},U[s]=r,U[l]=o,U[a]=n,U)[y]||1,S=this.$d.getTime()+M*j;return _.w(S,this)},D.subtract=function(M,G){return this.add(-1*M,G)},D.format=function(M){var G=this,U=this.$locale();if(!this.isValid())return U.invalidDate||h;var I=M||"YYYY-MM-DDTHH:mm:ssZ",y=_.z(this),P=this.$H,j=this.$m,S=this.$M,V=U.weekdays,Y=U.months,q=U.meridiem,Q=function(J,Z,K,L){return J&&(J[Z]||J(G,I))||K[Z].slice(0,L)},X=function(J){return _.s(P%12||12,J,"0")},ee=q||function(J,Z,K){var L=J<12?"AM":"PM";return K?L.toLowerCase():L};return I.replace(m,function(J,Z){return Z||function(K){switch(K){case"YY":return String(G.$y).slice(-2);case"YYYY":return _.s(G.$y,4,"0");case"M":return S+1;case"MM":return _.s(S+1,2,"0");case"MMM":return Q(U.monthsShort,S,Y,3);case"MMMM":return Q(Y,S);case"D":return G.$D;case"DD":return _.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Q(U.weekdaysMin,G.$W,V,2);case"ddd":return Q(U.weekdaysShort,G.$W,V,3);case"dddd":return V[G.$W];case"H":return String(P);case"HH":return _.s(P,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ee(P,j,!0);case"A":return ee(P,j,!1);case"m":return String(j);case"mm":return _.s(j,2,"0");case"s":return String(G.$s);case"ss":return _.s(G.$s,2,"0");case"SSS":return _.s(G.$ms,3,"0");case"Z":return y}return null}(J)||y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(M,G,U){var I,y=this,P=_.p(G),j=T(M),S=(j.utcOffset()-this.utcOffset())*r,V=this-j,Y=function(){return _.m(y,j)};switch(P){case d:I=Y()/12;break;case f:I=Y();break;case p:I=Y()/3;break;case u:I=(V-S)/6048e5;break;case c:I=(V-S)/864e5;break;case l:I=V/o;break;case s:I=V/r;break;case a:I=V/n;break;default:I=V}return U?I:_.a(I)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return k[this.$L]},D.locale=function(M,G){if(!M)return this.$L;var U=this.clone(),I=H(M,G,!0);return I&&(U.$L=I),U},D.clone=function(){return _.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},B}(),N=F.prototype;return T.prototype=N,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",v]].forEach(function(B){N[B[1]]=function(D){return this.$g(D,B[0],B[1])}}),T.extend=function(B,D){return B.$i||(B(D,F,T),B.$i=!0),T},T.locale=H,T.isDayjs=R,T.unix=function(B){return T(1e3*B)},T.en=k[x],T.Ls=k,T.p={},T})})(Op);var RE=Op.exports;const pi=be(RE);var Ip={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(Ip);var LE=Ip.exports;const FE=be(LE);var Pp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Rt,function(){return function(n,r,o){r.prototype.isYesterday=function(){var i="YYYY-MM-DD",a=o().subtract(1,"day");return this.format(i)===a.format(i)}}})})(Pp);var BE=Pp.exports;const jE=be(BE);pi.extend(FE),pi.extend(jE);function Dp(e,t,n,r,o){return e.map(i=>{const{authorId:a}=i,s=a===n?"outgoing":"incoming",l=t.find(u=>u.id===a);let c;return l&&l.id===n?c={name:l.name||"You",avatar:l.pictureUrl}:l?c={name:l.name||"Agent",avatar:l.pictureUrl}:c={name:r||"Bot",avatar:o},{...i,direction:s,sender:c}})}function zE(e,t="day"){var r,o,i;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(_p(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(o=e[a])==null?void 0:o.timestamp,l=(i=e[a+1])==null?void 0:i.timestamp;!pi(s).isSame(l,t)&&l&&n.push(_p(l))}return n}function _p(e){return{id:Mp(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:Mp(e)}}}function Mp(e,t=!1){const n=pi(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function UE(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function WE(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function HE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function VE(e,t){return e.map(n=>Math.round(n*t))}const Xr=e=>t=>HE(t,e),eo=e=>t=>VE(t,e),KE={50:Xr(.95),100:Xr(.9),200:Xr(.75),300:Xr(.6),400:Xr(.3),500:e=>e,600:eo(.9),700:eo(.6),800:eo(.45),900:eo(.3),950:eo(.2)};function Np(e,t=KE){const n={},r=UE(e);for(const[o,i]of Object.entries(t))n[o]=WE(i(r));return n}const Rp=()=>{const e={};return{on:(o,i)=>{var a;return e[o]||(e[o]=new Set),(a=e[o])==null||a.add(i),()=>{var s;return(s=e[o])==null?void 0:s.delete(i)}},emit:(o,i)=>{var a,s;(a=e[o])==null||a.forEach(l=>l(i)),(s=e["*"])==null||s.forEach(l=>l({type:o,payload:i}))},removeAllListeners:o=>{var i;o?(i=e[o])==null||i.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};function Vs(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const o=parseInt(r,16),i=o>>16&255,a=o>>8&255,s=o&255;return{r:i,g:a,b:s}}function qE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const GE=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function Lp(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const YE=2.4,QE=.2126729,JE=.7151522,ZE=.072175,XE=.56,ek=.57,tk=.62,nk=.65,hi=.022,Fp=1.414,rk=1.14,ok=1.14,ik=.035991,ak=.035991,sk=27.7847239587675,lk=27.7847239587675,Bp=.027,jp=.027,zp=.001,ck=5e-4;function Up(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**YE;return QE*o(t)+JE*o(n)+ZE*o(r)}function Wp(e,t){if(!e||!t)return 0;let n=Up(Vs(e)),r=Up(Vs(t)),o=0,i=0;return n=n>hi?n:n+(hi-n)**Fp,r=r>hi?r:r+(hi-r)**Fp,Math.abs(r-n)<ck?0:(r>n?(o=(r**XE-n**ek)*rk,i=o<zp?0:o<ik?o-o*sk*Bp:o-Bp):(o=(r**nk-n**tk)*ok,i=o>-zp?0:o>-ak?o-o*lk*jp:o+jp),Math.abs(i*100))}function Hp(e){const{fontFamily:t,...n}=e,r=Vp(n);return cp(":root",r)+cp(".bpReset",{"font-family":`'${t}', sans-serif`})}function Vp(e){const{radius:t,themeMode:n,color:r,variant:o,headerVariant:i}=e;let a={},s={};if(r){const p=Np(r),d=n==="dark"?Lp(p):p,v=Np(qE(GE(Vs(r)))),h=n==="dark"?Lp(v):v,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((b,[w,A])=>({...b,[`--bpPrimary-${w}`]:A}),{});const m=Object.entries({...h,1:g}).reduce((b,[w,A])=>({...b,[`--bpGray-${w}`]:A}),{});a={...s,...m}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=s?Wp(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",u=o==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?Wp(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)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},f=i==="solid"?{"--header-bg":"var(--bpPrimary-600)","--header-bg-hover":"var(--bpPrimary-700)","--header-hover-dark":"var(--bpPrimary-800)","--header-title":c,"--header-description":c,"--header-description-icon":c,"--header-description-link":c,"--header-avatar-bg":"var(--bpPrimary-300)","--header-avatar-text":"var(--bpPrimary-700)"}:{"--header-bg":l.bg,"--header-bg-hover":l.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return{...a,...u,...f}}const to=O.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=up(e??"",15);return E.jsxs(Bs,{ref:a,"data-color":s,...n,...i,children:[E.jsx(js,{src:t,...r}),E.jsx(zs,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});to.displayName="Avatar";function CQ(){}function AQ(){}function uk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const fk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,pk={};function Kp(e,t){return(pk.jsx?dk:fk).test(e)}const hk=/[ \t\n\f\r]/g;function vk(e){return typeof e=="object"?e.type==="text"?qp(e.value):!1:qp(e)}function qp(e){return e.replace(hk,"")===""}class no{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}no.prototype.property={},no.prototype.normal={},no.prototype.space=null;function Gp(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new no(n,r,t)}function Ks(e){return e.toLowerCase()}class It{constructor(t,n){this.property=t,this.attribute=n}}It.prototype.space=null,It.prototype.boolean=!1,It.prototype.booleanish=!1,It.prototype.overloadedBoolean=!1,It.prototype.number=!1,It.prototype.commaSeparated=!1,It.prototype.spaceSeparated=!1,It.prototype.commaOrSpaceSeparated=!1,It.prototype.mustUseProperty=!1,It.prototype.defined=!1;let mk=0;const pe=jn(),Ve=jn(),Yp=jn(),oe=jn(),Ne=jn(),ar=jn(),kt=jn();function jn(){return 2**++mk}const qs=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ve,commaOrSpaceSeparated:kt,commaSeparated:ar,number:oe,overloadedBoolean:Yp,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),Gs=Object.keys(qs);class Ys extends It{constructor(t,n,r,o){let i=-1;if(super(t,n),Qp(this,"space",o),typeof r=="number")for(;++i<Gs.length;){const a=Gs[i];Qp(this,Gs[i],(r&qs[a])===qs[a])}}}Ys.prototype.defined=!0;function Qp(e,t,n){n&&(e[t]=n)}const gk={}.hasOwnProperty;function sr(e){const t={},n={};let r;for(r in e.properties)if(gk.call(e.properties,r)){const o=e.properties[r],i=new Ys(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Ks(r)]=r,n[Ks(i.attribute)]=r}return new no(t,n,e.space)}const Jp=sr({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}}),Zp=sr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Xp(e,t){return t in e?e[t]:t}function eh(e,t){return Xp(e,t.toLowerCase())}const th=sr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:eh,properties:{xmlns:null,xmlnsXLink:null}}),nh=sr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ve,ariaAutoComplete:null,ariaBusy:Ve,ariaChecked:Ve,ariaColCount:oe,ariaColIndex:oe,ariaColSpan:oe,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ve,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ve,ariaFlowTo:Ne,ariaGrabbed:Ve,ariaHasPopup:null,ariaHidden:Ve,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:oe,ariaLive:null,ariaModal:Ve,ariaMultiLine:Ve,ariaMultiSelectable:Ve,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:oe,ariaPressed:Ve,ariaReadOnly:Ve,ariaRelevant:null,ariaRequired:Ve,ariaRoleDescription:Ne,ariaRowCount:oe,ariaRowIndex:oe,ariaRowSpan:oe,ariaSelected:Ve,ariaSetSize:oe,ariaSort:null,ariaValueMax:oe,ariaValueMin:oe,ariaValueNow:oe,ariaValueText:null,role:null}}),yk=sr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:eh,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ar,acceptCharset:Ne,accessKey:Ne,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Ne,autoFocus:pe,autoPlay:pe,blocking:Ne,capture:null,charSet:null,checked:pe,cite:null,className:Ne,cols:oe,colSpan:null,content:null,contentEditable:Ve,controls:pe,controlsList:Ne,coords:oe|ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Yp,draggable:Ve,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Ne,height:oe,hidden:pe,high:oe,href:null,hrefLang:null,htmlFor:Ne,httpEquiv:Ne,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Ne,itemRef:Ne,itemScope:pe,itemType:Ne,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:oe,manifest:null,max:null,maxLength:oe,media:null,method:null,min:null,minLength:oe,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:oe,pattern:null,ping:Ne,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Ne,required:pe,reversed:pe,rows:oe,rowSpan:oe,sandbox:Ne,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:oe,sizes:null,slot:null,span:oe,spellCheck:Ve,src:null,srcDoc:null,srcLang:null,srcSet:null,start:oe,step:null,style:null,tabIndex:oe,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ve,width:oe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:oe,borderColor:null,bottomMargin:oe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:oe,leftMargin:oe,link:null,longDesc:null,lowSrc:null,marginHeight:oe,marginWidth:oe,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:oe,rules:null,scheme:null,scrolling:Ve,standby:null,summary:null,text:null,topMargin:oe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:oe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:oe,security:null,unselectable:null}}),bk=sr({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:Xp,properties:{about:kt,accentHeight:oe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:oe,amplitude:oe,arabicForm:null,ascent:oe,attributeName:null,attributeType:null,azimuth:oe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:oe,by:null,calcMode:null,capHeight:oe,className:Ne,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:oe,diffuseConstant:oe,direction:null,display:null,dur:null,divisor:oe,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:oe,enableBackground:null,end:null,event:null,exponent:oe,externalResourcesRequired:null,fill:null,fillOpacity:oe,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:ar,g2:ar,glyphName:ar,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:oe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:oe,horizOriginX:oe,horizOriginY:oe,id:null,ideographic:oe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:oe,k:oe,k1:oe,k2:oe,k3:oe,k4:oe,kernelMatrix:kt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:oe,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:oe,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:oe,overlineThickness:oe,paintOrder:null,panose1:null,path:null,pathLength:oe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:oe,pointsAtY:oe,pointsAtZ:oe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:kt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:kt,rev:kt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:kt,requiredFeatures:kt,requiredFonts:kt,requiredFormats:kt,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:oe,specularExponent:oe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:oe,strikethroughThickness:oe,string:null,stroke:null,strokeDashArray:kt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:oe,strokeOpacity:oe,strokeWidth:null,style:null,surfaceScale:oe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:kt,tabIndex:oe,tableValues:null,target:null,targetX:oe,targetY:oe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:kt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:oe,underlineThickness:oe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:oe,values:null,vAlphabetic:oe,vMathematical:oe,vectorEffect:null,vHanging:oe,vIdeographic:oe,version:null,vertAdvY:oe,vertOriginX:oe,vertOriginY:oe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:oe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),wk=/^data[-\w.:]+$/i,rh=/-[a-z]/g,Sk=/[A-Z]/g;function xk(e,t){const n=Ks(t);let r=t,o=It;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wk.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(rh,kk);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!rh.test(i)){let a=i.replace(Sk,Ek);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Ys}return new o(r,t)}function Ek(e){return"-"+e.toLowerCase()}function kk(e){return e.charAt(1).toUpperCase()}const Ck={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"},Ak=Gp([Zp,Jp,th,nh,yk],"html"),Qs=Gp([Zp,Jp,th,nh,bk],"svg");function $k(e){return e.join(" ").trim()}var oh={},ih=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Tk=/\n/g,Ok=/^\s*/,Ik=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Pk=/^:\s*/,Dk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,_k=/^[;\s]*/,Mk=/^\s+|\s+$/g,Nk=`
|
|
11
|
-
`,ah="/",sh="*",zn="",Rk="comment",Lk="declaration",Fk=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function o(v){var h=v.match(Tk);h&&(n+=h.length);var g=v.lastIndexOf(Nk);r=~g?v.length-g:r+v.length}function i(){var v={line:n,column:r};return function(h){return h.position=new a(v),c(),h}}function a(v){this.start=v,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(v){var h=new Error(t.source+":"+n+":"+r+": "+v);if(h.reason=v,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(v){var h=v.exec(e);if(h){var g=h[0];return o(g),e=e.slice(g.length),h}}function c(){l(Ok)}function u(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=i();if(!(ah!=e.charAt(0)||sh!=e.charAt(1))){for(var h=2;zn!=e.charAt(h)&&(sh!=e.charAt(h)||ah!=e.charAt(h+1));)++h;if(h+=2,zn===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,o(g),e=e.slice(h),r+=2,v({type:Rk,comment:g})}}function p(){var v=i(),h=l(Ik);if(h){if(f(),!l(Pk))return s("property missing ':'");var g=l(Dk),m=v({type:Lk,property:lh(h[0].replace(ih,zn)),value:g?lh(g[0].replace(ih,zn)):zn});return l(_k),m}}function d(){var v=[];u(v);for(var h;h=p();)h!==!1&&(v.push(h),u(v));return v}return c(),d()};function lh(e){return e?e.replace(Mk,zn):zn}var Bk=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(oh,"__esModule",{value:!0});var ch=oh.default=zk,jk=Bk(Fk);function zk(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,jk.default)(e),o=typeof t=="function";return r.forEach(function(i){if(i.type==="declaration"){var a=i.property,s=i.value;o?t(a,s,i):s&&(n=n||{},n[a]=s)}}),n}const Uk=ch.default||ch,uh=fh("end"),Js=fh("start");function fh(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Wk(e){const t=Js(e),n=uh(e);if(t&&n)return{start:t,end:n}}function ro(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?dh(e.position):"start"in e||"end"in e?dh(e):"line"in e||"column"in e?Zs(e):""}function Zs(e){return ph(e&&e.line)+":"+ph(e&&e.column)}function dh(e){return Zs(e&&e.start)+"-"+Zs(e&&e.end)}function ph(e){return e&&typeof e=="number"?e:1}class st extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",i={},a=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?o=t:!i.cause&&t&&(a=!0,o=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?i.ruleId=r:(i.source=r.slice(0,l),i.ruleId=r.slice(l+1))}if(!i.place&&i.ancestors&&i.ancestors){const l=i.ancestors[i.ancestors.length-1];l&&(i.place=l.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=ro(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}}st.prototype.file="",st.prototype.name="",st.prototype.reason="",st.prototype.message="",st.prototype.stack="",st.prototype.column=void 0,st.prototype.line=void 0,st.prototype.ancestors=void 0,st.prototype.cause=void 0,st.prototype.fatal=void 0,st.prototype.place=void 0,st.prototype.ruleId=void 0,st.prototype.source=void 0;const Xs={}.hasOwnProperty,Hk=new Map,Vk=/[A-Z]/g,Kk=/-([a-z])/g,qk=new Set(["table","tbody","thead","tfoot","tr"]),Gk=new Set(["td","th"]),hh="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Yk(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rC(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=nC(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Qs:Ak,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=vh(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function vh(e,t,n){if(t.type==="element")return Qk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Jk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Xk(e,t,n);if(t.type==="mdxjsEsm")return Zk(e,t);if(t.type==="root")return eC(e,t,n);if(t.type==="text")return tC(e,t)}function Qk(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Qs,e.schema=o),e.ancestors.push(t);const i=gh(e,t.tagName,!1),a=oC(e,t);let s=tl(e,t);return qk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!vk(l):!0})),mh(e,a,i,t),el(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Jk(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}oo(e,t.position)}function Zk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oo(e,t.position)}function Xk(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Qs,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:gh(e,t.name,!0),a=iC(e,t),s=tl(e,t);return mh(e,a,i,t),el(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function eC(e,t,n){const r={};return el(r,tl(e,t)),e.create(t,e.Fragment,r,n)}function tC(e,t){return t.value}function mh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function el(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nC(e,t,n){return r;function r(o,i,a,s){const c=Array.isArray(a.children)?n:t;return s?c(i,a,s):c(i,a)}}function rC(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=Js(r);return t(o,i,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function oC(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Xs.call(t.properties,o)){const i=aC(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&Gk.has(t.tagName)?r=s:n[a]=s}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function iC(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const a=i.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else oo(e,t.position);else{const o=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,i=e.evaluater.evaluateExpression(s.expression)}else oo(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function tl(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Hk;for(;++r<t.children.length;){const i=t.children[r];let a;if(e.passKeys){const l=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(l){const c=o.get(l)||0;a=l+"-"+c,o.set(l,c+1)}}const s=vh(e,i,a);s!==void 0&&n.push(s)}return n}function aC(e,t,n){const r=xk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?uk(n):$k(n)),r.property==="style"){let o=typeof n=="object"?n:sC(e,String(n));return e.stylePropertyNameCase==="css"&&(o=lC(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?Ck[r.property]||r.property:r.attribute,n]}}function sC(e,t){const n={};try{Uk(t,r)}catch(o){if(!e.ignoreInvalidStyle){const i=o,a=new st("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=hh+"#cannot-parse-style-attribute",a}}return n;function r(o,i){let a=o;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(Kk,uC)),n[a]=i}}function gh(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let i=-1,a;for(;++i<o.length;){const s=Kp(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}r=a}else r=Kp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Xs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);oo(e)}function oo(e,t){const n=new st("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=hh+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lC(e){const t={};let n;for(n in e)Xs.call(e,n)&&(t[cC(n)]=e[n]);return t}function cC(e){let t=e.replace(Vk,fC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function uC(e,t){return t.toUpperCase()}function fC(e){return"-"+e.toLowerCase()}const nl={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"]},dC={};function rl(e,t){const n=dC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yh(e,r,o)}function yh(e,t,n){if(pC(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bh(e.children,t,n)}return Array.isArray(e)?bh(e,t,n):""}function bh(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=yh(e[o],t,n);return r.join("")}function pC(e){return!!(e&&typeof e=="object")}const wh=document.createElement("i");function ol(e){const t="&"+e+";";wh.innerHTML=t;const n=wh.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Pt(e,t,n,r){const o=e.length;let i=0,a;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);i<r.length;)a=r.slice(i,i+1e4),a.unshift(t,0),e.splice(...a),i+=1e4,t+=1e4}function Dt(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const Sh={}.hasOwnProperty;function xh(e){const t={};let n=-1;for(;++n<e.length;)hC(t,e[n]);return t}function hC(e,t){let n;for(n in t){const o=(Sh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){Sh.call(o,a)||(o[a]=[]);const s=i[a];vC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function vC(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Pt(e,0,0,r)}function Eh(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Lt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ht=wn(/[A-Za-z]/),lt=wn(/[\dA-Za-z]/),mC=wn(/[#-'*+\--9=?A-Z^-~]/);function vi(e){return e!==null&&(e<32||e===127)}const il=wn(/\d/),gC=wn(/[\dA-Fa-f]/),yC=wn(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function ge(e){return e===-2||e===-1||e===32}const mi=wn(new RegExp("\\p{P}|\\p{S}","u")),Un=wn(/\s/);function wn(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function lr(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const i=e.charCodeAt(n);let a="";if(i===37&<(e.charCodeAt(n+1))&<(e.charCodeAt(n+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(n+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(r,n),encodeURIComponent(a)),r=n+o+1,a=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function we(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return ge(l)?(e.enter(n),s(l)):t(l)}function s(l){return ge(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const bC={tokenize:wC};function wC(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),we(e,t,"linePrefix")}function o(s){return e.enter("paragraph"),i(s)}function i(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return fe(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const SC={tokenize:xC},kh={tokenize:EC};function xC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(w){if(r<n.length){const A=n[r];return t.containerState=A[1],e.attempt(A[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const A=t.events.length;let x=A,k;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){k=t.events[x][1].end;break}m(r);let $=A;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},k),$++;return Pt(t.events,x+1,0,t.events.slice(A)),t.events.length=$,c(w)}return s(w)}function c(w){if(r===n.length){if(!o)return p(w);if(o.currentConstruct&&o.currentConstruct.concrete)return v(w);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(kh,u,f)(w)}function u(w){return o&&b(),m(r),p(w)}function f(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,v(w)}function p(w){return t.containerState={},e.attempt(kh,d,v)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function v(w){if(w===null){o&&b(),m(0),e.consume(w);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:i,_tokenizer:o}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),m(0),e.consume(w);return}return fe(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,A){const x=t.sliceStream(w);if(A&&x.push(null),w.previous=i,i&&(i.next=w),i=w,o.defineSkip(w.start),o.write(x),t.parser.lazy[w.start.line]){let k=o.events.length;for(;k--;)if(o.events[k][1].start.offset<a&&(!o.events[k][1].end||o.events[k][1].end.offset>a))return;const $=t.events.length;let R=$,H,T;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(H){T=t.events[R][1].end;break}H=!0}for(m(r),k=$;k<t.events.length;)t.events[k][1].end=Object.assign({},T),k++;Pt(t.events,R+1,0,t.events.slice($)),t.events.length=k}}function m(w){let A=n.length;for(;A-- >w;){const x=n[A];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function b(){o.write([null]),i=void 0,o=void 0,t.containerState._closeFlow=void 0}}function EC(e,t,n){return we(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(e){if(e===null||_e(e)||Un(e))return 1;if(mi(e))return 2}function yi(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const i=e[o].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const al={name:"attention",tokenize:CC,resolveAll:kC};function kC(e,t){let n=-1,r,o,i,a,s,l,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);Ch(f,-l),Ch(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},i={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Dt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Dt(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=Dt(c,yi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Dt(c,[["exit",i,t],["enter",s,t],["exit",s,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Dt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,Pt(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function CC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=gi(r);let i;return a;function a(l){return i=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===i)return e.consume(l),s;const c=e.exit("attentionSequence"),u=gi(l),f=!u||u===2&&o||n.includes(l),p=!o||o===2&&u||n.includes(r);return c._open=!!(i===42?f:f&&(o||!p)),c._close=!!(i===42?p:p&&(u||!f)),t(l)}}function Ch(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const AC={name:"autolink",tokenize:$C};function $C(e,t,n){let r=0;return o;function o(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return ht(d)?(e.consume(d),a):d===64?n(d):c(d)}function a(d){return d===43||d===45||d===46||lt(d)?(r=1,s(d)):c(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||lt(d))&&r++<32?(e.consume(d),s):(r=0,c(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||vi(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):mC(d)?(e.consume(d),c):n(d)}function u(d){return lt(d)?f(d):n(d)}function f(d){return d===46?(e.consume(d),r=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||lt(d))&&r++<63){const v=d===45?p:f;return e.consume(d),v}return n(d)}}const io={tokenize:TC,partial:!0};function TC(e,t,n){return r;function r(i){return ge(i)?we(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||fe(i)?t(i):n(i)}}const Ah={name:"blockQuote",tokenize:OC,continuation:{tokenize:IC},exit:PC};function OC(e,t,n){const r=this;return o;function o(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),i}return n(a)}function i(a){return ge(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function IC(e,t,n){const r=this;return o;function o(a){return ge(a)?we(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(Ah,t,n)(a)}}function PC(e){e.exit("blockQuote")}const $h={name:"characterEscape",tokenize:DC};function DC(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),o}function o(i){return yC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const Th={name:"characterReference",tokenize:_C};function _C(e,t,n){const r=this;let o=0,i,a;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,a=lt,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,a=gC,u):(e.enter("characterReferenceValue"),i=7,a=il,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===lt&&!ol(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&o++<i?(e.consume(f),u):n(f)}}const Oh={tokenize:NC,partial:!0},Ih={name:"codeFenced",tokenize:MC,concrete:!0};function MC(e,t,n){const r=this,o={tokenize:x,partial:!0};let i=0,a=0,s;return l;function l(k){return c(k)}function c(k){const $=r.events[r.events.length-1];return i=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=k,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(k)}function u(k){return k===s?(a++,e.consume(k),u):a<3?n(k):(e.exit("codeFencedFenceSequence"),ge(k)?we(e,f,"whitespace")(k):f(k))}function f(k){return k===null||fe(k)?(e.exit("codeFencedFence"),r.interrupt?t(k):e.check(Oh,h,A)(k)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(k))}function p(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(k)):ge(k)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,d,"whitespace")(k)):k===96&&k===s?n(k):(e.consume(k),p)}function d(k){return k===null||fe(k)?f(k):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(k))}function v(k){return k===null||fe(k)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(k)):k===96&&k===s?n(k):(e.consume(k),v)}function h(k){return e.attempt(o,A,g)(k)}function g(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),m}function m(k){return i>0&&ge(k)?we(e,b,"linePrefix",i+1)(k):b(k)}function b(k){return k===null||fe(k)?e.check(Oh,h,A)(k):(e.enter("codeFlowValue"),w(k))}function w(k){return k===null||fe(k)?(e.exit("codeFlowValue"),b(k)):(e.consume(k),w)}function A(k){return e.exit("codeFenced"),t(k)}function x(k,$,R){let H=0;return T;function T(D){return k.enter("lineEnding"),k.consume(D),k.exit("lineEnding"),_}function _(D){return k.enter("codeFencedFence"),ge(D)?we(k,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):F(D)}function F(D){return D===s?(k.enter("codeFencedFenceSequence"),N(D)):R(D)}function N(D){return D===s?(H++,k.consume(D),N):H>=a?(k.exit("codeFencedFenceSequence"),ge(D)?we(k,B,"whitespace")(D):B(D)):R(D)}function B(D){return D===null||fe(D)?(k.exit("codeFencedFence"),$(D)):R(D)}}}function NC(e,t,n){const r=this;return o;function o(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const sl={name:"codeIndented",tokenize:LC},RC={tokenize:FC,partial:!0};function LC(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),we(e,i,"linePrefix",5)(c)}function i(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(RC,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function FC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):we(e,i,"linePrefix",5)(a)}function i(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):fe(a)?o(a):n(a)}}const BC={name:"codeText",tokenize:UC,resolve:jC,previous:zC};function jC(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function zC(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function UC(e,t,n){let r=0,o,i;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),r++,s):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(i=e.enter("codeTextSequence"),o=0,u(f)):fe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||fe(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),o++,u):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",c(f))}}class WC{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&ao(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ao(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ao(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);ao(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ao(this.left,n.reverse())}}}function ao(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Ph(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new WC(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,i=0,i<l.length&&l[i][1].type==="lineEndingBlank"&&(i+=2),i<l.length&&l[i][1].type==="content"))for(;++i<l.length&&l[i][1].type!=="content";)l[i][1].type==="chunkText"&&(l[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,HC(u,n)),n=t[n],c=!0);else if(r[1]._container){for(i=n,o=void 0;i--&&(a=u.get(i),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(o&&(u.get(o)[1].type="lineEndingBlank"),a[1].type="lineEnding",o=i);o&&(r[1].end=Object.assign({},u.get(o)[1].start),s=u.slice(o,n),s.unshift(r),u.splice(o,n-o+1,s))}}return Pt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function HC(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const i=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let u,f,p=-1,d=n,v=0,h=0;const g=[h];for(;d;){for(;e.get(++o)[1]!==d;);i.push(o),d._tokenizer||(u=r.sliceStream(d),d.next||u.push(null),f&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const m=s.slice(g[p],g[p+1]),b=i.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),p=-1;++p<l.length;)c[v+l[p][0]]=v+l[p][1],v+=l[p][1]-l[p][0]-1;return c}const VC={tokenize:GC,resolve:qC},KC={tokenize:YC,partial:!0};function qC(e){return Ph(e),e}function GC(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(s)}function o(s){return s===null?i(s):fe(s)?e.check(KC,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"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function YC(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),we(e,i,"linePrefix")}function i(a){if(a===null||fe(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Dh(e,t,n,r,o,i,a,s,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(m){return m===60?(e.enter(r),e.enter(o),e.enter(i),e.consume(m),e.exit(i),p):m===null||m===32||m===41||vi(m)?n(m):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(m))}function p(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(o),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(s),p(m)):m===null||m===60||fe(m)?n(m):(e.consume(m),m===92?v:d)}function v(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function h(m){return!u&&(m===null||m===41||_e(m))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(m)):u<c&&m===40?(e.consume(m),u++,h):m===41?(e.consume(m),u--,h):m===null||m===32||m===40||vi(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===40||m===41||m===92?(e.consume(m),h):h(m)}}function _h(e,t,n,r,o,i){const a=this;let s=0,l;return c;function c(d){return e.enter(r),e.enter(o),e.consume(d),e.exit(o),e.enter(i),u}function u(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(i),e.enter(o),e.consume(d),e.exit(o),e.exit(r),t):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===null||d===91||d===93||fe(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!ge(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Mh(e,t,n,r,o,i){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(o),e.consume(p),e.exit(o),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(o),e.consume(p),e.exit(o),e.exit(r),t):(e.enter(i),c(p))}function c(p){return p===a?(e.exit(i),l(a)):p===null?n(p):fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),we(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(p))}function u(p){return p===a||p===null||fe(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?f:u)}function f(p){return p===a||p===92?(e.consume(p),u):u(p)}}function so(e,t){let n;return r;function r(o){return fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ge(o)?we(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const QC={name:"definition",tokenize:ZC},JC={tokenize:XC,partial:!0};function ZC(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return _h.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return _e(d)?so(e,c)(d):c(d)}function c(d){return Dh(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(JC,f,f)(d)}function f(d){return ge(d)?we(e,p,"whitespace")(d):p(d)}function p(d){return d===null||fe(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function XC(e,t,n){return r;function r(s){return _e(s)?so(e,o)(s):n(s)}function o(s){return Mh(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return ge(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||fe(s)?t(s):n(s)}}const eA={name:"hardBreakEscape",tokenize:tA};function tA(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return fe(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const nA={name:"headingAtx",tokenize:oA,resolve:rA};function rA(e,t){let n=e.length-2,r=3,o,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Pt(e,r,n-r+1,[["enter",o,t],["enter",i,t],["exit",i,t],["exit",o,t]])),e}function oA(e,t,n){let r=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&&r++<6?(e.consume(u),a):u===null||_e(u)?(e.exit("atxHeadingSequence"),s(u)):n(u)}function s(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||fe(u)?(e.exit("atxHeading"),t(u)):ge(u)?we(e,s,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),s(u))}function c(u){return u===null||u===35||_e(u)?(e.exit("atxHeadingText"),s(u)):(e.consume(u),c)}}const iA=["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"],Nh=["pre","script","style","textarea"],aA={name:"htmlFlow",tokenize:uA,resolveTo:cA,concrete:!0},sA={tokenize:dA,partial:!0},lA={tokenize:fA,partial:!0};function cA(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 uA(e,t,n){const r=this;let o,i,a,s,l;return c;function c(S){return u(S)}function u(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),f}function f(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),i=!0,h):S===63?(e.consume(S),o=3,r.interrupt?t:y):ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function p(S){return S===45?(e.consume(S),o=2,d):S===91?(e.consume(S),o=5,s=0,v):ht(S)?(e.consume(S),o=4,r.interrupt?t:y):n(S)}function d(S){return S===45?(e.consume(S),r.interrupt?t:y):n(S)}function v(S){const V="CDATA[";return S===V.charCodeAt(s++)?(e.consume(S),s===V.length?r.interrupt?t:F:v):n(S)}function h(S){return ht(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function g(S){if(S===null||S===47||S===62||_e(S)){const V=S===47,Y=a.toLowerCase();return!V&&!i&&Nh.includes(Y)?(o=1,r.interrupt?t(S):F(S)):iA.includes(a.toLowerCase())?(o=6,V?(e.consume(S),m):r.interrupt?t(S):F(S)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):i?b(S):w(S))}return S===45||lt(S)?(e.consume(S),a+=String.fromCharCode(S),g):n(S)}function m(S){return S===62?(e.consume(S),r.interrupt?t:F):n(S)}function b(S){return ge(S)?(e.consume(S),b):T(S)}function w(S){return S===47?(e.consume(S),T):S===58||S===95||ht(S)?(e.consume(S),A):ge(S)?(e.consume(S),w):T(S)}function A(S){return S===45||S===46||S===58||S===95||lt(S)?(e.consume(S),A):x(S)}function x(S){return S===61?(e.consume(S),k):ge(S)?(e.consume(S),x):w(S)}function k(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,$):ge(S)?(e.consume(S),k):R(S)}function $(S){return S===l?(e.consume(S),l=null,H):S===null||fe(S)?n(S):(e.consume(S),$)}function R(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||_e(S)?x(S):(e.consume(S),R)}function H(S){return S===47||S===62||ge(S)?w(S):n(S)}function T(S){return S===62?(e.consume(S),_):n(S)}function _(S){return S===null||fe(S)?F(S):ge(S)?(e.consume(S),_):n(S)}function F(S){return S===45&&o===2?(e.consume(S),M):S===60&&o===1?(e.consume(S),G):S===62&&o===4?(e.consume(S),P):S===63&&o===3?(e.consume(S),y):S===93&&o===5?(e.consume(S),I):fe(S)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(sA,j,N)(S)):S===null||fe(S)?(e.exit("htmlFlowData"),N(S)):(e.consume(S),F)}function N(S){return e.check(lA,B,j)(S)}function B(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return S===null||fe(S)?N(S):(e.enter("htmlFlowData"),F(S))}function M(S){return S===45?(e.consume(S),y):F(S)}function G(S){return S===47?(e.consume(S),a="",U):F(S)}function U(S){if(S===62){const V=a.toLowerCase();return Nh.includes(V)?(e.consume(S),P):F(S)}return ht(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),U):F(S)}function I(S){return S===93?(e.consume(S),y):F(S)}function y(S){return S===62?(e.consume(S),P):S===45&&o===2?(e.consume(S),y):F(S)}function P(S){return S===null||fe(S)?(e.exit("htmlFlowData"),j(S)):(e.consume(S),P)}function j(S){return e.exit("htmlFlow"),t(S)}}function fA(e,t,n){const r=this;return o;function o(a){return fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):n(a)}function i(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function dA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(io,t,n)}}const pA={name:"htmlText",tokenize:hA};function hA(e,t,n){const r=this;let o,i,a;return s;function s(y){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(y),l}function l(y){return y===33?(e.consume(y),c):y===47?(e.consume(y),x):y===63?(e.consume(y),w):ht(y)?(e.consume(y),R):n(y)}function c(y){return y===45?(e.consume(y),u):y===91?(e.consume(y),i=0,v):ht(y)?(e.consume(y),b):n(y)}function u(y){return y===45?(e.consume(y),d):n(y)}function f(y){return y===null?n(y):y===45?(e.consume(y),p):fe(y)?(a=f,G(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?M(y):y===45?p(y):f(y)}function v(y){const P="CDATA[";return y===P.charCodeAt(i++)?(e.consume(y),i===P.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):fe(y)?(a=h,G(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?M(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?M(y):fe(y)?(a=b,G(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),A):fe(y)?(a=w,G(y)):(e.consume(y),w)}function A(y){return y===62?M(y):w(y)}function x(y){return ht(y)?(e.consume(y),k):n(y)}function k(y){return y===45||lt(y)?(e.consume(y),k):$(y)}function $(y){return fe(y)?(a=$,G(y)):ge(y)?(e.consume(y),$):M(y)}function R(y){return y===45||lt(y)?(e.consume(y),R):y===47||y===62||_e(y)?H(y):n(y)}function H(y){return y===47?(e.consume(y),M):y===58||y===95||ht(y)?(e.consume(y),T):fe(y)?(a=H,G(y)):ge(y)?(e.consume(y),H):M(y)}function T(y){return y===45||y===46||y===58||y===95||lt(y)?(e.consume(y),T):_(y)}function _(y){return y===61?(e.consume(y),F):fe(y)?(a=_,G(y)):ge(y)?(e.consume(y),_):H(y)}function F(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,N):fe(y)?(a=F,G(y)):ge(y)?(e.consume(y),F):(e.consume(y),B)}function N(y){return y===o?(e.consume(y),o=void 0,D):y===null?n(y):fe(y)?(a=N,G(y)):(e.consume(y),N)}function B(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||_e(y)?H(y):(e.consume(y),B)}function D(y){return y===47||y===62||_e(y)?H(y):n(y)}function M(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function G(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),U}function U(y){return ge(y)?we(e,I,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):I(y)}function I(y){return e.enter("htmlTextData"),a(y)}}const ll={name:"labelEnd",tokenize:wA,resolveTo:bA,resolveAll:yA},vA={tokenize:SA},mA={tokenize:xA},gA={tokenize:EA};function yA(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function bA(e,t){let n=e.length,r=0,o,i,a,s;for(;n--;)if(o=e[n][1],i){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(i=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(a=n);const l={type:e[i][1].type==="labelLink"?"link":"image",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[i][1].start),end:Object.assign({},e[a][1].end)},u={type:"labelText",start:Object.assign({},e[i+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=Dt(s,e.slice(i+1,i+r+3)),s=Dt(s,[["enter",u,t]]),s=Dt(s,yi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=Dt(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=Dt(s,e.slice(a+1)),s=Dt(s,[["exit",l,t]]),Pt(e,i,e.length,s),e}function wA(e,t,n){const r=this;let o=r.events.length,i,a;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){i=r.events[o][1];break}return s;function s(p){return i?i._inactive?f(p):(a=r.parser.defined.includes(Lt(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(vA,u,a?u:f)(p):p===91?e.attempt(mA,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(gA,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function SA(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),o}function o(f){return _e(f)?so(e,i)(f):i(f)}function i(f){return f===41?u(f):Dh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _e(f)?so(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Mh(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return _e(f)?so(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function xA(e,t,n){const r=this;return o;function o(s){return _h.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Lt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function EA(e,t,n){return r;function r(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):n(i)}}const kA={name:"labelStartImage",tokenize:CA,resolveAll:ll.resolveAll};function CA(e,t,n){const r=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):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const AA={name:"labelStartLink",tokenize:$A,resolveAll:ll.resolveAll};function $A(e,t,n){const r=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 r.parser.constructs?n(a):t(a)}}const cl={name:"lineEnding",tokenize:TA};function TA(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const bi={name:"thematicBreak",tokenize:OA};function OA(e,t,n){let r=0,o;return i;function i(c){return e.enter("thematicBreak"),a(c)}function a(c){return o=c,s(c)}function s(c){return c===o?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ge(c)?we(e,s,"whitespace")(c):s(c))}}const yt={name:"list",tokenize:DA,continuation:{tokenize:_A},exit:NA},IA={tokenize:RA,partial:!0},PA={tokenize:MA,partial:!0};function DA(e,t,n){const r=this,o=r.events[r.events.length-1];let i=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,a=0;return s;function s(d){const v=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:il(d)){if(r.containerState.type||(r.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(bi,n,c)(d):c(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return il(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(io,r.interrupt?n:u,e.attempt(IA,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return ge(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function _A(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(io,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,we(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!ge(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(PA,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(yt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function MA(e,t,n){const r=this;return we(e,o,"listItemIndent",r.containerState.size+1);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(i):n(i)}}function NA(e){e.exit(this.containerState.type)}function RA(e,t,n){const r=this;return we(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(i){const a=r.events[r.events.length-1];return!ge(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Rh={name:"setextUnderline",tokenize:FA,resolveTo:LA};function LA(e,t){let n=e.length,r,o,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);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[r][1],t]),e[r][1].end=Object.assign({},e[i][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function FA(e,t,n){const r=this;let o;return i;function i(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),o=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===o?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ge(c)?we(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const BA={tokenize:jA};function jA(e){const t=this,n=e.attempt(io,r,e.attempt(this.parser.constructs.flowInitial,o,we(e,e.attempt(this.parser.constructs.flow,o,e.attempt(VC,o)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const zA={resolveAll:Fh()},UA=Lh("string"),WA=Lh("text");function Lh(e){return{tokenize:t,resolveAll:Fh(e==="text"?HA:void 0)};function t(n){const r=this,o=this.parser.constructs[e],i=n.attempt(o,a,s);return a;function a(u){return c(u)?i(u):s(u)}function s(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=o[u];let p=-1;if(f)for(;++p<f.length;){const d=f[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function Fh(e){return t;function t(n,r){let o=-1,i;for(;++o<=n.length;)i===void 0?n[o]&&n[o][1].type==="data"&&(i=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==i+2&&(n[i][1].end=n[o-1][1].end,n.splice(i+2,o-i-2),o=i+2),i=void 0);return e?e(n,r):n}}function HA(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let i=o.length,a=-1,s=0,l;for(;i--;){const c=o[i];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){i++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+i,_bufferIndex:i?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function VA(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const o={},i=[];let a=[],s=[];const l={consume:b,enter:w,exit:A,attempt:$(x),check:$(k),interrupt:$(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:v,defineSkip:h,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&i.push(t),c;function f(_){return a=Dt(a,_),g(),a[a.length-1]!==null?[]:(R(t,0),c.events=yi(i,c.events,c),c.events)}function p(_,F){return qA(d(_),F)}function d(_){return KA(a,_)}function v(){const{line:_,column:F,offset:N,_index:B,_bufferIndex:D}=r;return{line:_,column:F,offset:N,_index:B,_bufferIndex:D}}function h(_){o[_.line]=_.column,T()}function g(){let _;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(_=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===_&&r._bufferIndex<F.length;)m(F.charCodeAt(r._bufferIndex));else m(F)}}function m(_){u=u(_)}function b(_){fe(_)?(r.line++,r.column=1,r.offset+=_===-3?2:1,T()):_!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=_}function w(_,F){const N=F||{};return N.type=_,N.start=v(),c.events.push(["enter",N,c]),s.push(N),N}function A(_){const F=s.pop();return F.end=v(),c.events.push(["exit",F,c]),F}function x(_,F){R(_,F.from)}function k(_,F){F.restore()}function $(_,F){return N;function N(B,D,M){let G,U,I,y;return Array.isArray(B)?j(B):"tokenize"in B?j([B]):P(B);function P(q){return Q;function Q(X){const ee=X!==null&&q[X],J=X!==null&&q.null,Z=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(J)?J:J?[J]:[]];return j(Z)(X)}}function j(q){return G=q,U=0,q.length===0?M:S(q[U])}function S(q){return Q;function Q(X){return y=H(),I=q,q.partial||(c.currentConstruct=q),q.name&&c.parser.constructs.disable.null.includes(q.name)?Y():q.tokenize.call(F?Object.assign(Object.create(c),F):c,l,V,Y)(X)}}function V(q){return _(I,y),D}function Y(q){return y.restore(),++U<G.length?S(G[U]):M}}}function R(_,F){_.resolveAll&&!i.includes(_)&&i.push(_),_.resolve&&Pt(c.events,F,c.events.length-F,_.resolve(c.events.slice(F),c)),_.resolveTo&&(c.events=_.resolveTo(c.events,c))}function H(){const _=v(),F=c.previous,N=c.currentConstruct,B=c.events.length,D=Array.from(s);return{restore:M,from:B};function M(){r=_,c.previous=F,c.currentConstruct=N,c.events.length=B,s=D,T()}}function T(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function KA(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,i=t.end._bufferIndex;let a;if(n===o)a=[e[n].slice(r,i)];else{if(a=e.slice(n,o),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}i>0&&a.push(e[o].slice(0,i))}return a}function qA(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const i=e[n];let a;if(typeof i=="string")a=i;else switch(i){case-5:{a="\r";break}case-4:{a=`
|
|
1
|
+
(function(ie,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],k):(ie=typeof globalThis<"u"?globalThis:ie||self,k(ie.Webchat={},ie.ReactJsxRuntime,ie.React,ie.ReactDOM))})(this,function(ie,k,P,ks){"use strict";var WI=Object.defineProperty;var VI=(ie,k,P)=>k in ie?WI(ie,k,{enumerable:!0,configurable:!0,writable:!0,value:P}):ie[k]=P;var Di=(ie,k,P)=>VI(ie,typeof k!="symbol"?k+"":k,P);var Ch,Ah,Ih;var Mi=typeof document<"u"?document.currentScript:null;function Ss(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const E=Ss(P),Es=Ss(ks);function Th(e,t=[]){let n=[];function r(o,a){const s=E.createContext(a),l=n.length;n=[...n,a];function c(u){const{scope:p,children:d,...m}=u,h=(p==null?void 0:p[e][l])||s,g=E.useMemo(()=>m,Object.values(m));return k.jsx(h.Provider,{value:g,children:d})}function f(u,p){const d=(p==null?void 0:p[e][l])||s,m=E.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${o}\``)}return c.displayName=o+"Provider",[c,f]}const i=()=>{const o=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,Oh(i,...t)]}function Oh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const u=l(o)[`__scope${c}`];return{...s,...u}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function It(e){const t=E.useRef(e);return E.useEffect(()=>{t.current=e}),E.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Gt=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{};function Dh(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function Mh(...e){return t=>e.forEach(n=>Dh(n,t))}var Cs=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),o=i.find(Nh);if(o){const a=o.props.children,s=i.map(l=>l===o?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:l);return k.jsx(Pi,{...r,ref:t,children:E.isValidElement(a)?E.cloneElement(a,void 0,s):null})}return k.jsx(Pi,{...r,ref:t,children:n})});Cs.displayName="Slot";var Pi=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=Lh(n);return E.cloneElement(n,{..._h(r,n.props),ref:t?Mh(t,i):i})}return E.Children.count(n)>1?E.Children.only(null):null});Pi.displayName="SlotClone";var Ph=({children:e})=>k.jsx(k.Fragment,{children:e});function Nh(e){return E.isValidElement(e)&&e.type===Ph}function _h(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function Lh(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Fh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ni=Fh.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?Cs:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),_i="Avatar",[Rh,qI]=Th(_i),[Bh,As]=Rh(_i),Li=E.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[i,o]=E.useState("idle");return k.jsx(Bh,{scope:n,imageLoadingStatus:i,onImageLoadingStatusChange:o,children:k.jsx(Ni.span,{...r,ref:t})})});Li.displayName=_i;var Is="AvatarImage",Fi=E.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:i=()=>{},...o}=e,a=As(Is,n),s=zh(r),l=It(c=>{i(c),a.onImageLoadingStatusChange(c)});return Gt(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?k.jsx(Ni.img,{...o,ref:t,src:r}):null});Fi.displayName=Is;var Ts="AvatarFallback",Ri=E.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...i}=e,o=As(Ts,n),[a,s]=E.useState(r===void 0);return E.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&o.imageLoadingStatus!=="loaded"?k.jsx(Ni.span,{...i,ref:t}):null});Ri.displayName=Ts;function zh(e){const[t,n]=E.useState("idle");return Gt(()=>{if(!e){n("error");return}let r=!0;const i=new window.Image,o=a=>()=>{r&&n(a)};return n("loading"),i.onload=o("loaded"),i.onerror=o("error"),i.src=e,()=>{r=!1}},[e]),t}const Os=e=>{const t=e.split("_"),n=t[0]??"";return isNaN(Date.parse(n))?e:t[1]??e},Ds=e=>{const t=Os(e),n=/\s*\(\d+\)(?=\.[^.]+$|$)/;return t.replace(n,"")};function Ms(e,t){let n=`${e} {`;for(const[r,i]of Object.entries(t))n+=`${r}: ${i}; `;return n+="}",n}function Ps(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const i=e.charCodeAt(r);n=(n<<5)-n+i,n=n&n}return Math.abs(n)%t}const $h=(e,t={})=>new Promise((n,r)=>{if(typeof window>"u")return r("Window is not defined");if(!e)return r("Url is not defined");let i=null;const o=new Image;o.addEventListener("load",()=>{i&&clearTimeout(i),n({width:o.naturalWidth,height:o.naturalHeight})}),o.addEventListener("error",a=>{i&&clearTimeout(i),r(`${a.type}: ${a.message}`)}),o.src=e,t.timeout&&(i=setTimeout(()=>r("Timeout"),t.timeout))}),Ns=["audio","file","image","video"],_s=e=>Ns.includes(e),Ls="The Client ID is required to initialize the webchat.",jh="The API url is required to initialize the webchat.",Uh="The Bot ID is required to initialize the webchat.",Hh="No config URL provided.",Fs=`Invalid API URL.
|
|
2
|
+
Please use a valid API URL.`,Rs=`Invalid Client ID.
|
|
3
|
+
Please use a valid Botpress Client ID.`,Bs=`Invalid URL.
|
|
4
|
+
Please make sure your client ID and API URL are valid`,Wh=`Invalid config URL.
|
|
5
|
+
Please make sure your config URL is valid`,Vh=`Invalid webchat configuration.
|
|
6
|
+
Please make sure your config file is valid`,qh="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",zs=`This bot has temporarily paused.
|
|
7
|
+
Please check back later.`,$s=`This bot has temporarily paused.
|
|
8
|
+
Please check back later.`,Bi="Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page",On="Please check your internet connection and refresh the page.",js=`You've been disconnected from the conversation.
|
|
9
|
+
Please refresh the page.`,Us=`Unable to process the message.
|
|
10
|
+
Please start a new conversation.`,zi={ResourceNotFound:{type:"configuration",message:Rs},Forbidden:{type:"bot",message:zs}},$i={MethodNotFound:{type:"configuration",message:Bs},QuotaExceeded:{type:"bot",message:$s},Forbidden:{type:"bot",message:Bi}};function Hs(e){return e in zi}function Ws(e){return e in $i}function Vs(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function qs(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const Ks=async(e,t=3,n=1e3)=>{let r;for(let i=1;i<=t;i++)try{return await e()}catch(o){if(r=o,i===t)throw r;const a=n*Math.pow(2,i-1);await new Promise(s=>setTimeout(s,a))}throw new Error("Unreachable: retry loop should always return or throw")},Kh=["networkerror","failedtofetch","errorininputstream"],dr=e=>{var n;console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};if(Vs(e))e.type==="network"?t={id:e.id,type:"network",message:On}:(n=e.message)!=null&&n.includes("[Webhook Handler]")&&Hs(e.type)?t={id:e.id,...zi[e.type]}:Ws(e.type)?t={id:e.id,...$i[e.type]}:t={id:e.id,type:e.type,message:e.message||"An error occurred"};else if(qs(e))Ys(e.message)?t={type:"disconnected",message:js}:Qs(e.message).includes("invalidcontenttype")?t={type:"bot",message:Us}:t={type:"event",message:e.message};else if(e instanceof Error&&Ys(e.message))t={type:"network",message:On};else if(e&&typeof e=="object"&&"type"in e&&"message"in e){const r=e;r.type==="network"?t={type:"network",message:On}:t={type:r.type,message:r.message}}return t};function Ys(e){return Kh.some(t=>Qs(e).includes(t))}function Qs(e){return e.replaceAll(" ","").toLowerCase()}var Dn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jt(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Gs={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Dn,function(){var n=1e3,r=6e4,i=36e5,o="millisecond",a="second",s="minute",l="hour",c="day",f="week",u="month",p="quarter",d="year",m="date",h="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(R){var D=["th","st","nd","rd"],_=R%100;return"["+R+(D[(_-20)%10]||D[_]||D[0])+"]"}},w=function(R,D,_){var U=String(R);return!U||U.length>=D?R:""+Array(D+1-U.length).join(_)+R},C={s:w,z:function(R){var D=-R.utcOffset(),_=Math.abs(D),U=Math.floor(_/60),$=_%60;return(D<=0?"+":"-")+w(U,2,"0")+":"+w($,2,"0")},m:function R(D,_){if(D.date()<_.date())return-R(_,D);var U=12*(_.year()-D.year())+(_.month()-D.month()),$=D.clone().add(U,u),H=_-$<0,v=D.clone().add(U+(H?-1:1),u);return+(-(U+(_-$)/(H?$-v:v-$))||0)},a:function(R){return R<0?Math.ceil(R)||0:Math.floor(R)},p:function(R){return{M:u,y:d,w:f,d:c,D:m,h:l,m:s,s:a,ms:o,Q:p}[R]||String(R||"").toLowerCase().replace(/s$/,"")},u:function(R){return R===void 0}},x="en",A={};A[x]=b;var T="$isDayjsObject",M=function(R){return R instanceof F||!(!R||!R[T])},z=function R(D,_,U){var $;if(!D)return x;if(typeof D=="string"){var H=D.toLowerCase();A[H]&&($=H),_&&(A[H]=_,$=H);var v=D.split("-");if(!$&&v.length>1)return R(v[0])}else{var L=D.name;A[L]=D,$=L}return!U&&$&&(x=$),$||!U&&x},I=function(R,D){if(M(R))return R.clone();var _=typeof D=="object"?D:{};return _.date=R,_.args=arguments,new F(_)},O=C;O.l=z,O.i=M,O.w=function(R,D){return I(R,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var F=function(){function R(_){this.$L=z(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[T]=!0}var D=R.prototype;return D.parse=function(_){this.$d=function(U){var $=U.date,H=U.utc;if($===null)return new Date(NaN);if(O.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var v=$.match(g);if(v){var L=v[2]-1||0,W=(v[7]||"0").substring(0,3);return H?new Date(Date.UTC(v[1],L,v[3]||1,v[4]||0,v[5]||0,v[6]||0,W)):new Date(v[1],L,v[3]||1,v[4]||0,v[5]||0,v[6]||0,W)}}return new Date($)}(_),this.init()},D.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},D.$utils=function(){return O},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(_,U){var $=I(_);return this.startOf(U)<=$&&$<=this.endOf(U)},D.isAfter=function(_,U){return I(_)<this.startOf(U)},D.isBefore=function(_,U){return this.endOf(U)<I(_)},D.$g=function(_,U,$){return O.u(_)?this[U]:this.set($,_)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(_,U){var $=this,H=!!O.u(U)||U,v=O.p(_),L=function(ae,J){var G=O.w($.$u?Date.UTC($.$y,J,ae):new Date($.$y,J,ae),$);return H?G:G.endOf(c)},W=function(ae,J){return O.w($.toDate()[ae].apply($.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(J)),$)},S=this.$W,V=this.$M,te=this.$D,Y="set"+(this.$u?"UTC":"");switch(v){case d:return H?L(1,0):L(31,11);case u:return H?L(1,V):L(0,V+1);case f:var X=this.$locale().weekStart||0,oe=(S<X?S+7:S)-X;return L(H?te-oe:te+(6-oe),V);case c:case m:return W(Y+"Hours",0);case l:return W(Y+"Minutes",1);case s:return W(Y+"Seconds",2);case a:return W(Y+"Milliseconds",3);default:return this.clone()}},D.endOf=function(_){return this.startOf(_,!1)},D.$set=function(_,U){var $,H=O.p(_),v="set"+(this.$u?"UTC":""),L=($={},$[c]=v+"Date",$[m]=v+"Date",$[u]=v+"Month",$[d]=v+"FullYear",$[l]=v+"Hours",$[s]=v+"Minutes",$[a]=v+"Seconds",$[o]=v+"Milliseconds",$)[H],W=H===c?this.$D+(U-this.$W):U;if(H===u||H===d){var S=this.clone().set(m,1);S.$d[L](W),S.init(),this.$d=S.set(m,Math.min(this.$D,S.daysInMonth())).$d}else L&&this.$d[L](W);return this.init(),this},D.set=function(_,U){return this.clone().$set(_,U)},D.get=function(_){return this[O.p(_)]()},D.add=function(_,U){var $,H=this;_=Number(_);var v=O.p(U),L=function(V){var te=I(H);return O.w(te.date(te.date()+Math.round(V*_)),H)};if(v===u)return this.set(u,this.$M+_);if(v===d)return this.set(d,this.$y+_);if(v===c)return L(1);if(v===f)return L(7);var W=($={},$[s]=r,$[l]=i,$[a]=n,$)[v]||1,S=this.$d.getTime()+_*W;return O.w(S,this)},D.subtract=function(_,U){return this.add(-1*_,U)},D.format=function(_){var U=this,$=this.$locale();if(!this.isValid())return $.invalidDate||h;var H=_||"YYYY-MM-DDTHH:mm:ssZ",v=O.z(this),L=this.$H,W=this.$m,S=this.$M,V=$.weekdays,te=$.months,Y=$.meridiem,X=function(J,G,j,ne){return J&&(J[G]||J(U,H))||j[G].slice(0,ne)},oe=function(J){return O.s(L%12||12,J,"0")},ae=Y||function(J,G,j){var ne=J<12?"AM":"PM";return j?ne.toLowerCase():ne};return H.replace(y,function(J,G){return G||function(j){switch(j){case"YY":return String(U.$y).slice(-2);case"YYYY":return O.s(U.$y,4,"0");case"M":return S+1;case"MM":return O.s(S+1,2,"0");case"MMM":return X($.monthsShort,S,te,3);case"MMMM":return X(te,S);case"D":return U.$D;case"DD":return O.s(U.$D,2,"0");case"d":return String(U.$W);case"dd":return X($.weekdaysMin,U.$W,V,2);case"ddd":return X($.weekdaysShort,U.$W,V,3);case"dddd":return V[U.$W];case"H":return String(L);case"HH":return O.s(L,2,"0");case"h":return oe(1);case"hh":return oe(2);case"a":return ae(L,W,!0);case"A":return ae(L,W,!1);case"m":return String(W);case"mm":return O.s(W,2,"0");case"s":return String(U.$s);case"ss":return O.s(U.$s,2,"0");case"SSS":return O.s(U.$ms,3,"0");case"Z":return v}return null}(J)||v.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(_,U,$){var H,v=this,L=O.p(U),W=I(_),S=(W.utcOffset()-this.utcOffset())*r,V=this-W,te=function(){return O.m(v,W)};switch(L){case d:H=te()/12;break;case u:H=te();break;case p:H=te()/3;break;case f:H=(V-S)/6048e5;break;case c:H=(V-S)/864e5;break;case l:H=V/i;break;case s:H=V/r;break;case a:H=V/n;break;default:H=V}return $?H:O.a(H)},D.daysInMonth=function(){return this.endOf(u).$D},D.$locale=function(){return A[this.$L]},D.locale=function(_,U){if(!_)return this.$L;var $=this.clone(),H=z(_,U,!0);return H&&($.$L=H),$},D.clone=function(){return O.w(this.$d,this)},D.toDate=function(){return new Date(this.valueOf())},D.toJSON=function(){return this.isValid()?this.toISOString():null},D.toISOString=function(){return this.$d.toISOString()},D.toString=function(){return this.$d.toUTCString()},R}(),N=F.prototype;return I.prototype=N,[["$ms",o],["$s",a],["$m",s],["$H",l],["$W",c],["$M",u],["$y",d],["$D",m]].forEach(function(R){N[R[1]]=function(D){return this.$g(D,R[0],R[1])}}),I.extend=function(R,D){return R.$i||(R(D,F,I),R.$i=!0),I},I.locale=z,I.isDayjs=M,I.unix=function(R){return I(1e3*R)},I.en=A[x],I.Ls=A,I.p={},I})})(Gs);var Yh=Gs.exports;const pr=Jt(Yh);var Js={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Dn,function(){return function(n,r,i){r.prototype.isToday=function(){var o="YYYY-MM-DD",a=i();return this.format(o)===a.format(o)}}})})(Js);var Qh=Js.exports;const Gh=Jt(Qh);var Zs={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Dn,function(){return function(n,r,i){r.prototype.isYesterday=function(){var o="YYYY-MM-DD",a=i().subtract(1,"day");return this.format(o)===a.format(o)}}})})(Zs);var Jh=Zs.exports;const Zh=Jt(Jh);pr.extend(Gh),pr.extend(Zh);function Xs(e,t,n,r,i){return e.map(o=>{const{authorId:a}=o,s=a===n?"outgoing":"incoming",l=t.find(f=>f.id===a);let c;return l&&l.id===n?c={name:l.name||"You",avatar:l.pictureUrl}:l?c={name:l.name||"Agent",avatar:l.pictureUrl}:c={name:r||"Bot",avatar:i},{...o,direction:s,sender:c}})}function Xh(e,t="day"){var r,i,o;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(el(e[0].timestamp));for(let a=0;a<e.length;a++)if(e[a]&&n.push(e[a]),a+1<e.length){const s=(i=e[a])==null?void 0:i.timestamp,l=(o=e[a+1])==null?void 0:o.timestamp;!pr(s).isSame(l,t)&&l&&n.push(el(l))}return n}function el(e){return{id:tl(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:tl(e)}}}function tl(e,t=!1){const n=pr(e),r="h:mma";return n.isToday()?t?`Today • ${n.format(r)}`:"Today":n.isYesterday()?t?`Yesterday • ${n.format(r)}`:"Yesterday":t?n.format(`YYYY-MM-DD • ${r}`):n.format("YYYY-MM-DD")}function em(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function tm(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function nm(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function rm(e,t){return e.map(n=>Math.round(n*t))}const Mn=e=>t=>nm(t,e),Pn=e=>t=>rm(t,e),im={50:Mn(.95),100:Mn(.9),200:Mn(.75),300:Mn(.6),400:Mn(.3),500:e=>e,600:Pn(.9),700:Pn(.6),800:Pn(.45),900:Pn(.3),950:Pn(.2)};function nl(e,t=im){const n={},r=em(e);for(const[i,o]of Object.entries(t))n[i]=tm(o(r));return n}const rl=()=>{const e={};return{on:(i,o)=>{var a;return e[i]||(e[i]=new Set),(a=e[i])==null||a.add(o),()=>{var s;return(s=e[i])==null?void 0:s.delete(o)}},emit:(i,o)=>{var a,s;(a=e[i])==null||a.forEach(l=>l(o)),(s=e["*"])==null||s.forEach(l=>l({type:i,payload:o}))},removeAllListeners:i=>{var o;i?(o=e[i])==null||o.clear():Object.keys(e).forEach(a=>{var s;(s=e[a])==null||s.clear()})}}};function ji(e){if(!/^#?([a-fA-F\d]{6}|[a-fA-F\d]{3})$/.test(e))return{r:0,g:0,b:0};const n=e.replace(/^#/,"");let r=n;n.length===3&&(r=n.split("").map(l=>l+l).join(""));const i=parseInt(r,16),o=i>>16&255,a=i>>8&255,s=i&255;return{r:o,g:a,b:s}}function om(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const am=(e,t=30)=>{const n=Math.min(e.r,e.g,e.b),r=Math.max(e.r,e.g,e.b,n+1);return{r:Math.floor((e.r-n)/(r-n)*t*(1-.299)+120-t/2),g:Math.floor((e.g-n)/(r-n)*t*(1-.587)+120-t/2),b:Math.floor((e.b-n)/(r-n)*t*(1-.114)+120-t/2)}};function il(e){return Object.entries(e).reduce((t,[n,r])=>{const i=n.replace(/(\d+)/,o=>(1e3-parseInt(o)).toString());return{...t,[i]:r}},{})}const sm=2.4,lm=.2126729,cm=.7151522,um=.072175,fm=.56,dm=.57,pm=.62,hm=.65,hr=.022,ol=1.414,mm=1.14,gm=1.14,ym=.035991,bm=.035991,vm=27.7847239587675,wm=27.7847239587675,al=.027,sl=.027,ll=.001,xm=5e-4;function cl(e){const{r:t,g:n,b:r}=e,i=o=>(o/255)**sm;return lm*i(t)+cm*i(n)+um*i(r)}function ul(e,t){if(!e||!t)return 0;let n=cl(ji(e)),r=cl(ji(t)),i=0,o=0;return n=n>hr?n:n+(hr-n)**ol,r=r>hr?r:r+(hr-r)**ol,Math.abs(r-n)<xm?0:(r>n?(i=(r**fm-n**dm)*mm,o=i<ll?0:i<ym?i-i*vm*al:i-al):(i=(r**hm-n**pm)*gm,o=i>-ll?0:i>-bm?i-i*wm*sl:i+sl),Math.abs(o*100))}function fl(e){const{fontFamily:t,...n}=e,r=dl(n);return Ms(":root, :host",r)+Ms(".bpReset",{"font-family":`'${t}', sans-serif`})}function dl(e){const{radius:t,themeMode:n,color:r,variant:i,headerVariant:o}=e;let a={},s={};if(r){const p=nl(r),d=n==="dark"?il(p):p,m=nl(om(am(ji(r)))),h=n==="dark"?il(m):m,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((b,[w,C])=>({...b,[`--bpPrimary-${w}`]:C}),{});const y=Object.entries({...h,1:g}).reduce((b,[w,C])=>({...b,[`--bpGray-${w}`]:C}),{});a={...s,...y}}t&&(a={...a,"--bpRadius-scale":t.toString()});const l=n==="dark"?{bg:"var(--transparent-dark)",bgHover:"var(--transparent-dark-hover)"}:{bg:"var(--transparent-light)",bgHover:"var(--transparent-light-hover)"},c=s?ul(s["--bpPrimary-600"],s["--bpPrimary-50"])>40?"var(--bpPrimary-50)":"var(--bpPrimary-900)":"var(--bpPrimary-50)",f=i==="solid"?{"--message-bg":"var(--bpPrimary-600)","--message-bg-hover":"var(--bpPrimary-700)","--message-text":c,"--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-200)","--button-bg-hover":"var(--bpPrimary-300)","--button-text":"var(--bpPrimary-800)","--fab-bg":"var(--bpPrimary-600)","--fab-bg-hover":"var(--bpPrimary-700)","--fab-icon":c,"--modal-submit-bg":"var(--bpPrimary-600)","--modal-submit-bg-hover":"var(--bpPrimary-700)"}:{"--message-bg":"var(--bpPrimary-100)","--message-bg-hover":"var(--bpPrimary-200)","--message-text":"var(--bpPrimary-900)","--send-button-bg":"var(--bpPrimary-600)","--send-button-bg-hover":"var(--bpPrimary-700)","--send-button-text":"var(--bpPrimary-50)","--button-bg":"var(--bpPrimary-500)","--button-bg-hover":"var(--bpPrimary-600)","--button-text":s?ul(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)","--scrollbar":"var(--bpGray-500)","--scrollbar-hover":"var(--bpGray-400)","--modal-submit-bg":"var(--bpPrimary-200)","--modal-submit-bg-hover":"var(--bpPrimary-300)"},u=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)"}:{"--header-bg":l.bg,"--header-bg-hover":l.bgHover,"--header-hover-dark":"var(--bpGray-200)","--header-title":"var(--bpGray-900)","--header-description":"var(--bpGray-600)","--header-description-icon":"var(--bpPrimary-700)","--header-description-link":"var(--bpPrimary-800)","--header-avatar-bg":"var(--bpPrimary-600)","--header-avatar-text":"var(--bpPrimary-50)"};return{...a,...f,...u}}const Nn=P.forwardRef(({userId:e,src:t,container:n,image:r,fallback:i,...o},a)=>{const s=Ps(e??"",15);return k.jsxs(Li,{ref:a,"data-color":s,...n,...o,children:[k.jsx(Fi,{src:t,...r}),k.jsx(Ri,{...i,children:typeof o.children=="string"?o.children[0]:o.children})]})});Nn.displayName="Avatar";function KI(){}function YI(){}function km(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Sm=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Em=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Cm={};function pl(e,t){return(Cm.jsx?Em:Sm).test(e)}const Am=/[ \t\n\f\r]/g;function Im(e){return typeof e=="object"?e.type==="text"?hl(e.value):!1:hl(e)}function hl(e){return e.replace(Am,"")===""}class _n{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}_n.prototype.property={},_n.prototype.normal={},_n.prototype.space=null;function ml(e,t){const n={},r={};let i=-1;for(;++i<e.length;)Object.assign(n,e[i].property),Object.assign(r,e[i].normal);return new _n(n,r,t)}function Ui(e){return e.toLowerCase()}class tt{constructor(t,n){this.property=t,this.attribute=n}}tt.prototype.space=null,tt.prototype.boolean=!1,tt.prototype.booleanish=!1,tt.prototype.overloadedBoolean=!1,tt.prototype.number=!1,tt.prototype.commaSeparated=!1,tt.prototype.spaceSeparated=!1,tt.prototype.commaOrSpaceSeparated=!1,tt.prototype.mustUseProperty=!1,tt.prototype.defined=!1;let Tm=0;const pe=jt(),Ne=jt(),gl=jt(),Z=jt(),Ce=jt(),Zt=jt(),Ge=jt();function jt(){return 2**++Tm}const Hi=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ne,commaOrSpaceSeparated:Ge,commaSeparated:Zt,number:Z,overloadedBoolean:gl,spaceSeparated:Ce},Symbol.toStringTag,{value:"Module"})),Wi=Object.keys(Hi);class Vi extends tt{constructor(t,n,r,i){let o=-1;if(super(t,n),yl(this,"space",i),typeof r=="number")for(;++o<Wi.length;){const a=Wi[o];yl(this,Wi[o],(r&Hi[a])===Hi[a])}}}Vi.prototype.defined=!0;function yl(e,t,n){n&&(e[t]=n)}const Om={}.hasOwnProperty;function Xt(e){const t={},n={};let r;for(r in e.properties)if(Om.call(e.properties,r)){const i=e.properties[r],o=new Vi(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Ui(r)]=r,n[Ui(o.attribute)]=r}return new _n(t,n,e.space)}const bl=Xt({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}}),vl=Xt({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function wl(e,t){return t in e?e[t]:t}function xl(e,t){return wl(e,t.toLowerCase())}const kl=Xt({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:xl,properties:{xmlns:null,xmlnsXLink:null}}),Sl=Xt({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:Ce,ariaCurrent:null,ariaDescribedBy:Ce,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:Ce,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:Ce,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ce,ariaLevel:Z,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:Ce,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:Ce,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:Ne,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null}}),Dm=Xt({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:xl,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Zt,acceptCharset:Ce,accessKey:Ce,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Ce,autoFocus:pe,autoPlay:pe,blocking:Ce,capture:null,charSet:null,checked:pe,cite:null,className:Ce,cols:Z,colSpan:null,content:null,contentEditable:Ne,controls:pe,controlsList:Ce,coords:Z|Zt,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:gl,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Ce,height:Z,hidden:pe,high:Z,href:null,hrefLang:null,htmlFor:Ce,httpEquiv:Ce,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Ce,itemRef:Ce,itemScope:pe,itemType:Ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:pe,optimum:Z,pattern:null,ping:Ce,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Ce,required:pe,reversed:pe,rows:Z,rowSpan:Z,sandbox:Ce,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ne,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ce,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:Z,security:null,unselectable:null}}),Mm=Xt({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:wl,properties:{about:Ge,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:Ce,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:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,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:Zt,g2:Zt,glyphName:Zt,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:Ge,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,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:Z,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:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ge,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ge,rev:Ge,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ge,requiredFeatures:Ge,requiredFonts:Ge,requiredFormats:Ge,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:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:Ge,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ge,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ge,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),Pm=/^data[-\w.:]+$/i,El=/-[a-z]/g,Nm=/[A-Z]/g;function _m(e,t){const n=Ui(t);let r=t,i=tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Pm.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(El,Fm);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!El.test(o)){let a=o.replace(Nm,Lm);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=Vi}return new i(r,t)}function Lm(e){return"-"+e.toLowerCase()}function Fm(e){return e.charAt(1).toUpperCase()}const Rm={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"},Bm=ml([vl,bl,kl,Sl,Dm],"html"),qi=ml([vl,bl,kl,Sl,Mm],"svg");function zm(e){return e.join(" ").trim()}var Cl={},Al=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$m=/\n/g,jm=/^\s*/,Um=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Hm=/^:\s*/,Wm=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Vm=/^[;\s]*/,qm=/^\s+|\s+$/g,Km=`
|
|
11
|
+
`,Il="/",Tl="*",Ut="",Ym="comment",Qm="declaration",Gm=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(m){var h=m.match($m);h&&(n+=h.length);var g=m.lastIndexOf(Km);r=~g?m.length-g:r+m.length}function o(){var m={line:n,column:r};return function(h){return h.position=new a(m),c(),h}}function a(m){this.start=m,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function s(m){var h=new Error(t.source+":"+n+":"+r+": "+m);if(h.reason=m,h.filename=t.source,h.line=n,h.column=r,h.source=e,!t.silent)throw h}function l(m){var h=m.exec(e);if(h){var g=h[0];return i(g),e=e.slice(g.length),h}}function c(){l(jm)}function f(m){var h;for(m=m||[];h=u();)h!==!1&&m.push(h);return m}function u(){var m=o();if(!(Il!=e.charAt(0)||Tl!=e.charAt(1))){for(var h=2;Ut!=e.charAt(h)&&(Tl!=e.charAt(h)||Il!=e.charAt(h+1));)++h;if(h+=2,Ut===e.charAt(h-1))return s("End of comment missing");var g=e.slice(2,h-2);return r+=2,i(g),e=e.slice(h),r+=2,m({type:Ym,comment:g})}}function p(){var m=o(),h=l(Um);if(h){if(u(),!l(Hm))return s("property missing ':'");var g=l(Wm),y=m({type:Qm,property:Ol(h[0].replace(Al,Ut)),value:g?Ol(g[0].replace(Al,Ut)):Ut});return l(Vm),y}}function d(){var m=[];f(m);for(var h;h=p();)h!==!1&&(m.push(h),f(m));return m}return c(),d()};function Ol(e){return e?e.replace(qm,Ut):Ut}var Jm=Dn&&Dn.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Cl,"__esModule",{value:!0});var Dl=Cl.default=Xm,Zm=Jm(Gm);function Xm(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Zm.default)(e),i=typeof t=="function";return r.forEach(function(o){if(o.type==="declaration"){var a=o.property,s=o.value;i?t(a,s,o):s&&(n=n||{},n[a]=s)}}),n}const eg=Dl.default||Dl,Ml=Pl("end"),Ki=Pl("start");function Pl(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function tg(e){const t=Ki(e),n=Ml(e);if(t&&n)return{start:t,end:n}}function Ln(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nl(e.position):"start"in e||"end"in e?Nl(e):"line"in e||"column"in e?Yi(e):""}function Yi(e){return _l(e&&e.line)+":"+_l(e&&e.column)}function Nl(e){return Yi(e&&e.start)+"-"+Yi(e&&e.end)}function _l(e){return e&&typeof e=="number"?e:1}class ze extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?o.ruleId=r:(o.source=r.slice(0,l),o.ruleId=r.slice(l+1))}if(!o.place&&o.ancestors&&o.ancestors){const l=o.ancestors[o.ancestors.length-1];l&&(o.place=l.position)}const s=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file,this.message=i,this.line=s?s.line:void 0,this.name=Ln(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual,this.expected,this.note,this.url}}ze.prototype.file="",ze.prototype.name="",ze.prototype.reason="",ze.prototype.message="",ze.prototype.stack="",ze.prototype.column=void 0,ze.prototype.line=void 0,ze.prototype.ancestors=void 0,ze.prototype.cause=void 0,ze.prototype.fatal=void 0,ze.prototype.place=void 0,ze.prototype.ruleId=void 0,ze.prototype.source=void 0;const Qi={}.hasOwnProperty,ng=new Map,rg=/[A-Z]/g,ig=/-([a-z])/g,og=new Set(["table","tbody","thead","tfoot","tr"]),ag=new Set(["td","th"]),Ll="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function sg(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=mg(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=hg(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?qi:Bm,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Fl(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Fl(e,t,n){if(t.type==="element")return lg(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return cg(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fg(e,t,n);if(t.type==="mdxjsEsm")return ug(e,t);if(t.type==="root")return dg(e,t,n);if(t.type==="text")return pg(e,t)}function lg(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=qi,e.schema=i),e.ancestors.push(t);const o=Bl(e,t.tagName,!1),a=gg(e,t);let s=Ji(e,t);return og.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!Im(l):!0})),Rl(e,a,o,t),Gi(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function cg(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Fn(e,t.position)}function ug(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Fn(e,t.position)}function fg(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=qi,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Bl(e,t.name,!0),a=yg(e,t),s=Ji(e,t);return Rl(e,a,o,t),Gi(a,s),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function dg(e,t,n){const r={};return Gi(r,Ji(e,t)),e.create(t,e.Fragment,r,n)}function pg(e,t){return t.value}function Rl(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gi(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function hg(e,t,n){return r;function r(i,o,a,s){const c=Array.isArray(a.children)?n:t;return s?c(o,a,s):c(o,a)}}function mg(e,t){return n;function n(r,i,o,a){const s=Array.isArray(o.children),l=Ki(r);return t(i,o,a,s,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function gg(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Qi.call(t.properties,i)){const o=bg(e,i,t.properties[i]);if(o){const[a,s]=o;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&ag.has(t.tagName)?r=s:n[a]=s}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function yg(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const s=a.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else Fn(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const s=r.value.data.estree.body[0];s.type,o=e.evaluater.evaluateExpression(s.expression)}else Fn(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function Ji(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ng;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const l=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const s=Fl(e,o,a);s!==void 0&&n.push(s)}return n}function bg(e,t,n){const r=_m(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?km(n):zm(n)),r.property==="style"){let i=typeof n=="object"?n:vg(e,String(n));return e.stylePropertyNameCase==="css"&&(i=wg(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Rm[r.property]||r.property:r.attribute,n]}}function vg(e,t){const n={};try{eg(t,r)}catch(i){if(!e.ignoreInvalidStyle){const o=i,a=new ze("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:o,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=Ll+"#cannot-parse-style-attribute",a}}return n;function r(i,o){let a=i;a.slice(0,2)!=="--"&&(a.slice(0,4)==="-ms-"&&(a="ms-"+a.slice(4)),a=a.replace(ig,kg)),n[a]=o}}function Bl(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const s=pl(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:s,computed:!!(o&&s.type==="Literal"),optional:!1}:s}r=a}else r=pl(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Qi.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Fn(e)}function Fn(e,t){const n=new ze("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=Ll+"#cannot-handle-mdx-estrees-without-createevaluater",n}function wg(e){const t={};let n;for(n in e)Qi.call(e,n)&&(t[xg(n)]=e[n]);return t}function xg(e){let t=e.replace(rg,Sg);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function kg(e,t){return t.toUpperCase()}function Sg(e){return"-"+e.toLowerCase()}const Zi={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"]},Eg={};function Xi(e,t){const n=Eg,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return zl(e,r,i)}function zl(e,t,n){if(Cg(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $l(e.children,t,n)}return Array.isArray(e)?$l(e,t,n):""}function $l(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=zl(e[i],t,n);return r.join("")}function Cg(e){return!!(e&&typeof e=="object")}const jl=document.createElement("i");function eo(e){const t="&"+e+";";jl.innerHTML=t;const n=jl.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function nt(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function rt(e,t){return e.length>0?(nt(e,e.length,0,t),e):t}const Ul={}.hasOwnProperty;function Hl(e){const t={};let n=-1;for(;++n<e.length;)Ag(t,e[n]);return t}function Ag(e,t){let n;for(n in t){const i=(Ul.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){Ul.call(i,a)||(i[a]=[]);const s=o[a];Ig(i[a],Array.isArray(s)?s:s?[s]:[])}}}function Ig(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);nt(e,0,0,r)}function Wl(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function at(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const We=Tt(/[A-Za-z]/),$e=Tt(/[\dA-Za-z]/),Tg=Tt(/[#-'*+\--9=?A-Z^-~]/);function mr(e){return e!==null&&(e<32||e===127)}const to=Tt(/\d/),Og=Tt(/[\dA-Fa-f]/),Dg=Tt(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function Se(e){return e!==null&&(e<0||e===32)}function ye(e){return e===-2||e===-1||e===32}const gr=Tt(new RegExp("\\p{P}|\\p{S}","u")),Ht=Tt(/\s/);function Tt(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function en(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&$e(e.charCodeAt(n+1))&&$e(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const s=e.charCodeAt(n+1);o<56320&&s>56319&&s<57344?(a=String.fromCharCode(o,s),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ve(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(l){return ye(l)?(e.enter(n),s(l)):t(l)}function s(l){return ye(l)&&o++<i?(e.consume(l),s):(e.exit(n),t(l))}}const Mg={tokenize:Pg};function Pg(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),ve(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),o(s)}function o(s){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(s)}function a(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return fe(s)?(e.consume(s),e.exit("chunkText"),o):(e.consume(s),a)}}const Ng={tokenize:_g},Vl={tokenize:Lg};function _g(e){const t=this,n=[];let r=0,i,o,a;return s;function s(w){if(r<n.length){const C=n[r];return t.containerState=C[1],e.attempt(C[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const C=t.events.length;let x=C,A;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){A=t.events[x][1].end;break}y(r);let T=C;for(;T<t.events.length;)t.events[T][1].end=Object.assign({},A),T++;return nt(t.events,x+1,0,t.events.slice(C)),t.events.length=T,c(w)}return s(w)}function c(w){if(r===n.length){if(!i)return p(w);if(i.currentConstruct&&i.currentConstruct.concrete)return m(w);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Vl,f,u)(w)}function f(w){return i&&b(),y(r),p(w)}function u(w){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,m(w)}function p(w){return t.containerState={},e.attempt(Vl,d,m)(w)}function d(w){return r++,n.push([t.currentConstruct,t.containerState]),p(w)}function m(w){if(w===null){i&&b(),y(0),e.consume(w);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{contentType:"flow",previous:o,_tokenizer:i}),h(w)}function h(w){if(w===null){g(e.exit("chunkFlow"),!0),y(0),e.consume(w);return}return fe(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,C){const x=t.sliceStream(w);if(C&&x.push(null),w.previous=o,o&&(o.next=w),o=w,i.defineSkip(w.start),i.write(x),t.parser.lazy[w.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;const T=t.events.length;let M=T,z,I;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(z){I=t.events[M][1].end;break}z=!0}for(y(r),A=T;A<t.events.length;)t.events[A][1].end=Object.assign({},I),A++;nt(t.events,M+1,0,t.events.slice(T)),t.events.length=A}}function y(w){let C=n.length;for(;C-- >w;){const x=n[C];t.containerState=x[1],x[0].exit.call(t,e)}n.length=w}function b(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Lg(e,t,n){return ve(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function yr(e){if(e===null||Se(e)||Ht(e))return 1;if(gr(e))return 2}function br(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const no={name:"attention",tokenize:Rg,resolveAll:Fg};function Fg(e,t){let n=-1,r,i,o,a,s,l,c,f;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const u=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);ql(u,-l),ql(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:Object.assign({},e[r][1].end)},s={type:l>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},o={type:l>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},i={type:l>1?"strong":"emphasis",start:Object.assign({},a.start),end:Object.assign({},s.end)},e[r][1].end=Object.assign({},a.start),e[n][1].start=Object.assign({},s.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=rt(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=rt(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),c=rt(c,br(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=rt(c,[["exit",o,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=rt(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,nt(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Rg(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=yr(r);let o;return a;function a(l){return o=l,e.enter("attentionSequence"),s(l)}function s(l){if(l===o)return e.consume(l),s;const c=e.exit("attentionSequence"),f=yr(l),u=!f||f===2&&i||n.includes(l),p=!i||i===2&&f||n.includes(r);return c._open=!!(o===42?u:u&&(i||!p)),c._close=!!(o===42?p:p&&(f||!u)),t(l)}}function ql(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Bg={name:"autolink",tokenize:zg};function zg(e,t,n){let r=0;return i;function i(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(d){return We(d)?(e.consume(d),a):d===64?n(d):c(d)}function a(d){return d===43||d===45||d===46||$e(d)?(r=1,s(d)):c(d)}function s(d){return d===58?(e.consume(d),r=0,l):(d===43||d===45||d===46||$e(d))&&r++<32?(e.consume(d),s):(r=0,c(d))}function l(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||mr(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),f):Tg(d)?(e.consume(d),c):n(d)}function f(d){return $e(d)?u(d):n(d)}function u(d){return d===46?(e.consume(d),r=0,f):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):p(d)}function p(d){if((d===45||$e(d))&&r++<63){const m=d===45?p:u;return e.consume(d),m}return n(d)}}const Rn={tokenize:$g,partial:!0};function $g(e,t,n){return r;function r(o){return ye(o)?ve(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||fe(o)?t(o):n(o)}}const Kl={name:"blockQuote",tokenize:jg,continuation:{tokenize:Ug},exit:Hg};function jg(e,t,n){const r=this;return i;function i(a){if(a===62){const s=r.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return ye(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Ug(e,t,n){const r=this;return i;function i(a){return ye(a)?ve(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(Kl,t,n)(a)}}function Hg(e){e.exit("blockQuote")}const Yl={name:"characterEscape",tokenize:Wg};function Wg(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return Dg(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Ql={name:"characterReference",tokenize:Vg};function Vg(e,t,n){const r=this;let i=0,o,a;return s;function s(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),o=31,a=$e,f(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=Og,f):(e.enter("characterReferenceValue"),o=7,a=to,f(u))}function f(u){if(u===59&&i){const p=e.exit("characterReferenceValue");return a===$e&&!eo(r.sliceSerialize(p))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&i++<o?(e.consume(u),f):n(u)}}const Gl={tokenize:Kg,partial:!0},Jl={name:"codeFenced",tokenize:qg,concrete:!0};function qg(e,t,n){const r=this,i={tokenize:x,partial:!0};let o=0,a=0,s;return l;function l(A){return c(A)}function c(A){const T=r.events[r.events.length-1];return o=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(A)}function f(A){return A===s?(a++,e.consume(A),f):a<3?n(A):(e.exit("codeFencedFenceSequence"),ye(A)?ve(e,u,"whitespace")(A):u(A))}function u(A){return A===null||fe(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Gl,h,C)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||fe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(A)):ye(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ve(e,d,"whitespace")(A)):A===96&&A===s?n(A):(e.consume(A),p)}function d(A){return A===null||fe(A)?u(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),m(A))}function m(A){return A===null||fe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(A)):A===96&&A===s?n(A):(e.consume(A),m)}function h(A){return e.attempt(i,C,g)(A)}function g(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),y}function y(A){return o>0&&ye(A)?ve(e,b,"linePrefix",o+1)(A):b(A)}function b(A){return A===null||fe(A)?e.check(Gl,h,C)(A):(e.enter("codeFlowValue"),w(A))}function w(A){return A===null||fe(A)?(e.exit("codeFlowValue"),b(A)):(e.consume(A),w)}function C(A){return e.exit("codeFenced"),t(A)}function x(A,T,M){let z=0;return I;function I(D){return A.enter("lineEnding"),A.consume(D),A.exit("lineEnding"),O}function O(D){return A.enter("codeFencedFence"),ye(D)?ve(A,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):F(D)}function F(D){return D===s?(A.enter("codeFencedFenceSequence"),N(D)):M(D)}function N(D){return D===s?(z++,A.consume(D),N):z>=a?(A.exit("codeFencedFenceSequence"),ye(D)?ve(A,R,"whitespace")(D):R(D)):M(D)}function R(D){return D===null||fe(D)?(A.exit("codeFencedFence"),T(D)):M(D)}}}function Kg(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const ro={name:"codeIndented",tokenize:Qg},Yg={tokenize:Gg,partial:!0};function Qg(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),ve(e,o,"linePrefix",5)(c)}function o(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(Yg,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function Gg(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ve(e,o,"linePrefix",5)(a)}function o(a){const s=r.events[r.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):fe(a)?i(a):n(a)}}const Jg={name:"codeText",tokenize:ey,resolve:Zg,previous:Xg};function Zg(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Xg(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ey(e,t,n){let r=0,i,o;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),s(u)}function s(u){return u===96?(e.consume(u),r++,s):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(o=e.enter("codeTextSequence"),i=0,f(u)):fe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||fe(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function f(u){return u===96?(e.consume(u),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(o.type="codeTextData",c(u))}}class ty{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Bn(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Bn(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Bn(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Bn(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Bn(this.left,n.reverse())}}}function Bn(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Zl(e){const t={};let n=-1,r,i,o,a,s,l,c;const f=new ty(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,o=0,o<l.length&&l[o][1].type==="lineEndingBlank"&&(o+=2),o<l.length&&l[o][1].type==="content"))for(;++o<l.length&&l[o][1].type!=="content";)l[o][1].type==="chunkText"&&(l[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,ny(f,n)),n=t[n],c=!0);else if(r[1]._container){for(o=n,i=void 0;o--&&(a=f.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank");)a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);i&&(r[1].end=Object.assign({},f.get(i)[1].start),s=f.slice(i,n),s.unshift(r),f.splice(i,n-i+1,s))}}return nt(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function ny(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[],a=n._tokenizer||r.parser[n.contentType](n.start),s=a.events,l=[],c={};let f,u,p=-1,d=n,m=0,h=0;const g=[h];for(;d;){for(;e.get(++i)[1]!==d;);o.push(i),d._tokenizer||(f=r.sliceStream(d),d.next||f.push(null),u&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=d,d=d.next}for(d=n;++p<s.length;)s[p][0]==="exit"&&s[p-1][0]==="enter"&&s[p][1].type===s[p-1][1].type&&s[p][1].start.line!==s[p][1].end.line&&(h=p+1,g.push(h),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):g.pop(),p=g.length;p--;){const y=s.slice(g[p],g[p+1]),b=o.pop();l.push([b,b+y.length-1]),e.splice(b,2,y)}for(l.reverse(),p=-1;++p<l.length;)c[m+l[p][0]]=m+l[p][1],m+=l[p][1]-l[p][0]-1;return c}const ry={tokenize:ay,resolve:oy},iy={tokenize:sy,partial:!0};function oy(e){return Zl(e),e}function ay(e,t){let n;return r;function r(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?o(s):fe(s)?e.check(iy,a,o)(s):(e.consume(s),i)}function o(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function a(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function sy(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ve(e,o,"linePrefix")}function o(a){if(a===null||fe(a))return n(a);const s=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function Xl(e,t,n,r,i,o,a,s,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return u;function u(y){return y===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(y),e.exit(o),p):y===null||y===32||y===41||mr(y)?n(y):(e.enter(r),e.enter(a),e.enter(s),e.enter("chunkString",{contentType:"string"}),h(y))}function p(y){return y===62?(e.enter(o),e.consume(y),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),d(y))}function d(y){return y===62?(e.exit("chunkString"),e.exit(s),p(y)):y===null||y===60||fe(y)?n(y):(e.consume(y),y===92?m:d)}function m(y){return y===60||y===62||y===92?(e.consume(y),d):d(y)}function h(y){return!f&&(y===null||y===41||Se(y))?(e.exit("chunkString"),e.exit(s),e.exit(a),e.exit(r),t(y)):f<c&&y===40?(e.consume(y),f++,h):y===41?(e.consume(y),f--,h):y===null||y===32||y===40||mr(y)?n(y):(e.consume(y),y===92?g:h)}function g(y){return y===40||y===41||y===92?(e.consume(y),h):h(y)}}function ec(e,t,n,r,i,o){const a=this;let s=0,l;return c;function c(d){return e.enter(r),e.enter(i),e.consume(d),e.exit(i),e.enter(o),f}function f(d){return s>999||d===null||d===91||d===93&&!l||d===94&&!s&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(e.exit(o),e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===null||d===91||d===93||fe(d)||s++>999?(e.exit("chunkString"),f(d)):(e.consume(d),l||(l=!ye(d)),d===92?p:u)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,u):u(d)}}function tc(e,t,n,r,i,o){let a;return s;function s(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(o),c(p))}function c(p){return p===a?(e.exit(o),l(a)):p===null?n(p):fe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ve(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===a||p===null||fe(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?u:f)}function u(p){return p===a||p===92?(e.consume(p),f):f(p)}}function zn(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ye(i)?ve(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const ly={name:"definition",tokenize:uy},cy={tokenize:fy,partial:!0};function uy(e,t,n){const r=this;let i;return o;function o(d){return e.enter("definition"),a(d)}function a(d){return ec.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return i=at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),l):n(d)}function l(d){return Se(d)?zn(e,c)(d):c(d)}function c(d){return Xl(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return e.attempt(cy,u,u)(d)}function u(d){return ye(d)?ve(e,p,"whitespace")(d):p(d)}function p(d){return d===null||fe(d)?(e.exit("definition"),r.parser.defined.push(i),t(d)):n(d)}}function fy(e,t,n){return r;function r(s){return Se(s)?zn(e,i)(s):n(s)}function i(s){return tc(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function o(s){return ye(s)?ve(e,a,"whitespace")(s):a(s)}function a(s){return s===null||fe(s)?t(s):n(s)}}const dy={name:"hardBreakEscape",tokenize:py};function py(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return fe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const hy={name:"headingAtx",tokenize:gy,resolve:my};function my(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},nt(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function gy(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),o(f)}function o(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||Se(f)?(e.exit("atxHeadingSequence"),s(f)):n(f)}function s(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||fe(f)?(e.exit("atxHeading"),t(f)):ye(f)?ve(e,s,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),s(f))}function c(f){return f===null||f===35||Se(f)?(e.exit("atxHeadingText"),s(f)):(e.consume(f),c)}}const yy=["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"],nc=["pre","script","style","textarea"],by={name:"htmlFlow",tokenize:ky,resolveTo:xy,concrete:!0},vy={tokenize:Ey,partial:!0},wy={tokenize:Sy,partial:!0};function xy(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 ky(e,t,n){const r=this;let i,o,a,s,l;return c;function c(S){return f(S)}function f(S){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),p):S===47?(e.consume(S),o=!0,h):S===63?(e.consume(S),i=3,r.interrupt?t:v):We(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function p(S){return S===45?(e.consume(S),i=2,d):S===91?(e.consume(S),i=5,s=0,m):We(S)?(e.consume(S),i=4,r.interrupt?t:v):n(S)}function d(S){return S===45?(e.consume(S),r.interrupt?t:v):n(S)}function m(S){const V="CDATA[";return S===V.charCodeAt(s++)?(e.consume(S),s===V.length?r.interrupt?t:F:m):n(S)}function h(S){return We(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function g(S){if(S===null||S===47||S===62||Se(S)){const V=S===47,te=a.toLowerCase();return!V&&!o&&nc.includes(te)?(i=1,r.interrupt?t(S):F(S)):yy.includes(a.toLowerCase())?(i=6,V?(e.consume(S),y):r.interrupt?t(S):F(S)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(S):o?b(S):w(S))}return S===45||$e(S)?(e.consume(S),a+=String.fromCharCode(S),g):n(S)}function y(S){return S===62?(e.consume(S),r.interrupt?t:F):n(S)}function b(S){return ye(S)?(e.consume(S),b):I(S)}function w(S){return S===47?(e.consume(S),I):S===58||S===95||We(S)?(e.consume(S),C):ye(S)?(e.consume(S),w):I(S)}function C(S){return S===45||S===46||S===58||S===95||$e(S)?(e.consume(S),C):x(S)}function x(S){return S===61?(e.consume(S),A):ye(S)?(e.consume(S),x):w(S)}function A(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,T):ye(S)?(e.consume(S),A):M(S)}function T(S){return S===l?(e.consume(S),l=null,z):S===null||fe(S)?n(S):(e.consume(S),T)}function M(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||Se(S)?x(S):(e.consume(S),M)}function z(S){return S===47||S===62||ye(S)?w(S):n(S)}function I(S){return S===62?(e.consume(S),O):n(S)}function O(S){return S===null||fe(S)?F(S):ye(S)?(e.consume(S),O):n(S)}function F(S){return S===45&&i===2?(e.consume(S),_):S===60&&i===1?(e.consume(S),U):S===62&&i===4?(e.consume(S),L):S===63&&i===3?(e.consume(S),v):S===93&&i===5?(e.consume(S),H):fe(S)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vy,W,N)(S)):S===null||fe(S)?(e.exit("htmlFlowData"),N(S)):(e.consume(S),F)}function N(S){return e.check(wy,R,W)(S)}function R(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return S===null||fe(S)?N(S):(e.enter("htmlFlowData"),F(S))}function _(S){return S===45?(e.consume(S),v):F(S)}function U(S){return S===47?(e.consume(S),a="",$):F(S)}function $(S){if(S===62){const V=a.toLowerCase();return nc.includes(V)?(e.consume(S),L):F(S)}return We(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),$):F(S)}function H(S){return S===93?(e.consume(S),v):F(S)}function v(S){return S===62?(e.consume(S),L):S===45&&i===2?(e.consume(S),v):F(S)}function L(S){return S===null||fe(S)?(e.exit("htmlFlowData"),W(S)):(e.consume(S),L)}function W(S){return e.exit("htmlFlow"),t(S)}}function Sy(e,t,n){const r=this;return i;function i(a){return fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Ey(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Rn,t,n)}}const Cy={name:"htmlText",tokenize:Ay};function Ay(e,t,n){const r=this;let i,o,a;return s;function s(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),l}function l(v){return v===33?(e.consume(v),c):v===47?(e.consume(v),x):v===63?(e.consume(v),w):We(v)?(e.consume(v),M):n(v)}function c(v){return v===45?(e.consume(v),f):v===91?(e.consume(v),o=0,m):We(v)?(e.consume(v),b):n(v)}function f(v){return v===45?(e.consume(v),d):n(v)}function u(v){return v===null?n(v):v===45?(e.consume(v),p):fe(v)?(a=u,U(v)):(e.consume(v),u)}function p(v){return v===45?(e.consume(v),d):u(v)}function d(v){return v===62?_(v):v===45?p(v):u(v)}function m(v){const L="CDATA[";return v===L.charCodeAt(o++)?(e.consume(v),o===L.length?h:m):n(v)}function h(v){return v===null?n(v):v===93?(e.consume(v),g):fe(v)?(a=h,U(v)):(e.consume(v),h)}function g(v){return v===93?(e.consume(v),y):h(v)}function y(v){return v===62?_(v):v===93?(e.consume(v),y):h(v)}function b(v){return v===null||v===62?_(v):fe(v)?(a=b,U(v)):(e.consume(v),b)}function w(v){return v===null?n(v):v===63?(e.consume(v),C):fe(v)?(a=w,U(v)):(e.consume(v),w)}function C(v){return v===62?_(v):w(v)}function x(v){return We(v)?(e.consume(v),A):n(v)}function A(v){return v===45||$e(v)?(e.consume(v),A):T(v)}function T(v){return fe(v)?(a=T,U(v)):ye(v)?(e.consume(v),T):_(v)}function M(v){return v===45||$e(v)?(e.consume(v),M):v===47||v===62||Se(v)?z(v):n(v)}function z(v){return v===47?(e.consume(v),_):v===58||v===95||We(v)?(e.consume(v),I):fe(v)?(a=z,U(v)):ye(v)?(e.consume(v),z):_(v)}function I(v){return v===45||v===46||v===58||v===95||$e(v)?(e.consume(v),I):O(v)}function O(v){return v===61?(e.consume(v),F):fe(v)?(a=O,U(v)):ye(v)?(e.consume(v),O):z(v)}function F(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),i=v,N):fe(v)?(a=F,U(v)):ye(v)?(e.consume(v),F):(e.consume(v),R)}function N(v){return v===i?(e.consume(v),i=void 0,D):v===null?n(v):fe(v)?(a=N,U(v)):(e.consume(v),N)}function R(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||Se(v)?z(v):(e.consume(v),R)}function D(v){return v===47||v===62||Se(v)?z(v):n(v)}function _(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function U(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),$}function $(v){return ye(v)?ve(e,H,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):H(v)}function H(v){return e.enter("htmlTextData"),a(v)}}const io={name:"labelEnd",tokenize:Py,resolveTo:My,resolveAll:Dy},Iy={tokenize:Ny},Ty={tokenize:_y},Oy={tokenize:Ly};function Dy(e){let t=-1;for(;++t<e.length;){const n=e[t][1];(n.type==="labelImage"||n.type==="labelLink"||n.type==="labelEnd")&&(e.splice(t+1,n.type==="labelImage"?4:2),n.type="data",t++)}return e}function My(e,t){let n=e.length,r=0,i,o,a,s;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[o][1].type==="labelLink"?"link":"image",start:Object.assign({},e[o][1].start),end:Object.assign({},e[e.length-1][1].end)},c={type:"label",start:Object.assign({},e[o][1].start),end:Object.assign({},e[a][1].end)},f={type:"labelText",start:Object.assign({},e[o+r+2][1].end),end:Object.assign({},e[a-2][1].start)};return s=[["enter",l,t],["enter",c,t]],s=rt(s,e.slice(o+1,o+r+3)),s=rt(s,[["enter",f,t]]),s=rt(s,br(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),s=rt(s,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),s=rt(s,e.slice(a+1)),s=rt(s,[["exit",l,t]]),nt(e,o,e.length,s),e}function Py(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return s;function s(p){return o?o._inactive?u(p):(a=r.parser.defined.includes(at(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(Iy,f,a?f:u)(p):p===91?e.attempt(Ty,f,a?c:u)(p):a?f(p):u(p)}function c(p){return e.attempt(Oy,f,u)(p)}function f(p){return t(p)}function u(p){return o._balanced=!0,n(p)}}function Ny(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return Se(u)?zn(e,o)(u):o(u)}function o(u){return u===41?f(u):Xl(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return Se(u)?zn(e,l)(u):f(u)}function s(u){return n(u)}function l(u){return u===34||u===39||u===40?tc(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):f(u)}function c(u){return Se(u)?zn(e,f)(u):f(u)}function f(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function _y(e,t,n){const r=this;return i;function i(s){return ec.call(r,e,o,a,"reference","referenceMarker","referenceString")(s)}function o(s){return r.parser.defined.includes(at(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function Ly(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Fy={name:"labelStartImage",tokenize:Ry,resolveAll:io.resolveAll};function Ry(e,t,n){const r=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),o}function o(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),a):n(s)}function a(s){return s===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(s):t(s)}}const By={name:"labelStartLink",tokenize:zy,resolveAll:io.resolveAll};function zy(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const oo={name:"lineEnding",tokenize:$y};function $y(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ve(e,t,"linePrefix")}}const vr={name:"thematicBreak",tokenize:jy};function jy(e,t,n){let r=0,i;return o;function o(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,s(c)}function s(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ye(c)?ve(e,s,"whitespace")(c):s(c))}}const Ke={name:"list",tokenize:Wy,continuation:{tokenize:Vy},exit:Ky},Uy={tokenize:Yy,partial:!0},Hy={tokenize:qy,partial:!0};function Wy(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return s;function s(d){const m=r.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(m==="listUnordered"?!r.containerState.marker||d===r.containerState.marker:to(d)){if(r.containerState.type||(r.containerState.type=m,e.enter(m,{_container:!0})),m==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(vr,n,c)(d):c(d);if(!r.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(d)}return n(d)}function l(d){return to(d)&&++a<10?(e.consume(d),l):(!r.interrupt||a<2)&&(r.containerState.marker?d===r.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||d,e.check(Rn,r.interrupt?n:f,e.attempt(Uy,p,u))}function f(d){return r.containerState.initialBlankLine=!0,o++,p(d)}function u(d){return ye(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),p):n(d)}function p(d){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function Vy(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Rn,i,o);function i(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ve(e,t,"listItemIndent",r.containerState.size+1)(s)}function o(s){return r.containerState.furtherBlankLines||!ye(s)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(s)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Hy,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,ve(e,e.attempt(Ke,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function qy(e,t,n){const r=this;return ve(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function Ky(e){e.exit(this.containerState.type)}function Yy(e,t,n){const r=this;return ve(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!ye(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const rc={name:"setextUnderline",tokenize:Gy,resolveTo:Qy};function Qy(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:Object.assign({},e[i][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[o][1].end)):e[r][1]=a,e.push(["exit",a,t]),e}function Gy(e,t,n){const r=this;let i;return o;function o(c){let f=r.events.length,u;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){u=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===i?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ye(c)?ve(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Jy={tokenize:Zy};function Zy(e){const t=this,n=e.attempt(Rn,r,e.attempt(this.parser.constructs.flowInitial,i,ve(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ry,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Xy={resolveAll:oc()},eb=ic("string"),tb=ic("text");function ic(e){return{tokenize:t,resolveAll:oc(e==="text"?nb:void 0)};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,s);return a;function a(f){return c(f)?o(f):s(f)}function s(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),o(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const u=i[f];let p=-1;if(u)for(;++p<u.length;){const d=u[p];if(!d.previous||d.previous.call(r,r.previous))return!0}return!1}}}function oc(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function nb(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,s=0,l;for(;o--;){const c=i[o];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)s++,a--;if(a)break;a=-1}else if(c===-2)l=!0,s++;else if(c!==-1){o++;break}}if(s){const c={type:n===e.length||l||s<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-s,offset:r.end.offset-s,_index:r.start._index+o,_bufferIndex:o?a:r.start._bufferIndex+a},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function rb(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const i={},o=[];let a=[],s=[];const l={consume:b,enter:w,exit:C,attempt:T(x),check:T(A),interrupt:T(A,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:d,sliceSerialize:p,now:m,defineSkip:h,write:u};let f=t.tokenize.call(c,l);return t.resolveAll&&o.push(t),c;function u(O){return a=rt(a,O),g(),a[a.length-1]!==null?[]:(M(t,0),c.events=br(o,c.events,c),c.events)}function p(O,F){return ob(d(O),F)}function d(O){return ib(a,O)}function m(){const{line:O,column:F,offset:N,_index:R,_bufferIndex:D}=r;return{line:O,column:F,offset:N,_index:R,_bufferIndex:D}}function h(O){i[O.line]=O.column,I()}function g(){let O;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(O=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===O&&r._bufferIndex<F.length;)y(F.charCodeAt(r._bufferIndex));else y(F)}}function y(O){f=f(O)}function b(O){fe(O)?(r.line++,r.column=1,r.offset+=O===-3?2:1,I()):O!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=O}function w(O,F){const N=F||{};return N.type=O,N.start=m(),c.events.push(["enter",N,c]),s.push(N),N}function C(O){const F=s.pop();return F.end=m(),c.events.push(["exit",F,c]),F}function x(O,F){M(O,F.from)}function A(O,F){F.restore()}function T(O,F){return N;function N(R,D,_){let U,$,H,v;return Array.isArray(R)?W(R):"tokenize"in R?W([R]):L(R);function L(Y){return X;function X(oe){const ae=oe!==null&&Y[oe],J=oe!==null&&Y.null,G=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(J)?J:J?[J]:[]];return W(G)(oe)}}function W(Y){return U=Y,$=0,Y.length===0?_:S(Y[$])}function S(Y){return X;function X(oe){return v=z(),H=Y,Y.partial||(c.currentConstruct=Y),Y.name&&c.parser.constructs.disable.null.includes(Y.name)?te():Y.tokenize.call(F?Object.assign(Object.create(c),F):c,l,V,te)(oe)}}function V(Y){return O(H,v),D}function te(Y){return v.restore(),++$<U.length?S(U[$]):_}}}function M(O,F){O.resolveAll&&!o.includes(O)&&o.push(O),O.resolve&&nt(c.events,F,c.events.length-F,O.resolve(c.events.slice(F),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function z(){const O=m(),F=c.previous,N=c.currentConstruct,R=c.events.length,D=Array.from(s);return{restore:_,from:R};function _(){r=O,c.previous=F,c.currentConstruct=N,c.events.length=R,s=D,I()}}function I(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ib(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const s=a[0];typeof s=="string"?a[0]=s.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function ob(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
12
12
|
`;break}case-3:{a=`\r
|
|
13
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&o)continue;a=" ";break}default:a=String.fromCharCode(i)}o=i===-2,r.push(a)}return r.join("")}const GA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:QC},disable:{null:[]},document:{42:yt,43:yt,45:yt,48:yt,49:yt,50:yt,51:yt,52:yt,53:yt,54:yt,55:yt,56:yt,57:yt,62:Ah},flow:{35:nA,42:bi,45:[Rh,bi],60:aA,61:Rh,95:bi,96:Ih,126:Ih},flowInitial:{[-2]:sl,[-1]:sl,32:sl},insideSpan:{null:[al,zA]},string:{38:Th,92:$h},text:{[-5]:cl,[-4]:cl,[-3]:cl,33:kA,38:Th,42:al,60:[AC,pA],91:AA,92:[eA,$h],93:ll,95:al,96:BC}},Symbol.toStringTag,{value:"Module"}));function YA(e){const n=xh([GA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(bC),document:o(SC),flow:o(BA),string:o(UA),text:o(WA)};return r;function o(i){return a;function a(s){return VA(r,i,s)}}}function QA(e){for(;!Ph(e););return e}const Bh=/[\0\t\n\r]/g;function JA(){let e=1,t="",n=!0,r;return o;function o(i,a,s){const l=[];let c,u,f,p,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(a||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Bh.lastIndex=f,c=Bh.exec(i),p=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(p),!c){t=i.slice(f);break}if(d===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(i.slice(f,p)),e+=p-f),d){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ZA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function XA(e){return e.replace(ZA,e$)}function e$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return Eh(n.slice(i?2:1),i?16:10)}return ol(n)||e}const jh={}.hasOwnProperty;function t$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),n$(n)(QA(YA(n).document().write(JA()(e,t,!0))))}function n$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(De),autolinkProtocol:H,autolinkEmail:H,atxHeading:i(ae),blockQuote:i(J),characterEscape:H,characterReference:H,codeFenced:i(Z),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(Z,a),codeText:i(K,a),codeTextData:H,data:H,codeFlowValue:H,definition:i(L),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ne),hardBreakEscape:i(te),hardBreakTrailing:i(te),htmlFlow:i(de,a),htmlFlowData:H,htmlText:i(de,a),htmlTextData:H,image:i(me),label:a,link:i(De),listItem:i(dt),listItemValue:p,listOrdered:i(Ue,f),listUnordered:i(Ue),paragraph:i(mt),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ae),strong:i(pt),thematicBreak:i(ce)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ee,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:q,characterReference:Q,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:T,codeIndented:l(m),codeText:l(D),codeTextData:T,data:T,definition:l(),definitionDestinationString:A,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(N),htmlFlowData:T,htmlText:l(B),htmlTextData:T,image:l(G),label:I,labelText:U,lineEnding:_,link:l(M),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:y,resourceTitleString:P,resource:j,setextHeading:l(R),setextHeadingLineSequence:$,setextHeadingText:k,strong:l(),thematicBreak:l()}};zh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let z={type:"root",children:[]};const re={stack:[z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},se=[];let ue=-1;for(;++ue<W.length;)if(W[ue][1].type==="listOrdered"||W[ue][1].type==="listUnordered")if(W[ue][0]==="enter")se.push(ue);else{const he=se.pop();ue=o(W,he,ue)}for(ue=-1;++ue<W.length;){const he=t[W[ue][0]];jh.call(he,W[ue][1].type)&&he[W[ue][1].type].call(Object.assign({sliceSerialize:W[ue][2].sliceSerialize},re),W[ue][1])}if(re.tokenStack.length>0){const he=re.tokenStack[re.tokenStack.length-1];(he[1]||Uh).call(re,void 0,he[0])}for(z.position={start:Sn(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Sn(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},ue=-1;++ue<t.transforms.length;)z=t.transforms[ue](z)||z;return z}function o(W,z,re){let se=z-1,ue=-1,he=!1,We,He,gt,tt;for(;++se<=re;){const Ie=W[se];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ue++:ue--,tt=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(We&&!tt&&!ue&&!gt&&(gt=se),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ue&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ue===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(We){let nt=se;for(He=void 0;nt--;){const Ge=W[nt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;He&&(W[He][1].type="lineEndingBlank",he=!0),Ge[1].type="lineEnding",He=nt}else if(!(Ge[1].type==="linePrefix"||Ge[1].type==="blockQuotePrefix"||Ge[1].type==="blockQuotePrefixWhitespace"||Ge[1].type==="blockQuoteMarker"||Ge[1].type==="listItemIndent"))break}gt&&(!He||gt<He)&&(We._spread=!0),We.end=Object.assign({},He?W[He][1].start:Ie[1].end),W.splice(He||se,0,["exit",We,Ie[2]]),se++,re++}if(Ie[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};We=nt,W.splice(se,0,["enter",nt,Ie[2]]),se++,re++,gt=void 0,tt=!0}}}return W[z][1]._spread=he,re}function i(W,z){return re;function re(se){s.call(this,W(se),se),z&&z.call(this,se)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,z,re){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([z,re]),W.position={start:Sn(z.start),end:void 0}}function l(W){return z;function z(re){W&&W.call(this,re),c.call(this,re)}}function c(W,z){const re=this.stack.pop(),se=this.tokenStack.pop();if(se)se[0].type!==W.type&&(z?z.call(this,W,se[0]):(se[1]||Uh).call(this,W,se[0]));else throw new Error("Cannot close `"+W.type+"` ("+ro({start:W.start,end:W.end})+"): it’s not open");re.position.end=Sn(W.end)}function u(){return rl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(W){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function d(){const W=this.resume(),z=this.stack[this.stack.length-1];z.lang=W}function v(){const W=this.resume(),z=this.stack[this.stack.length-1];z.meta=W}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W.replace(/(\r?\n|\r)$/g,"")}function b(W){const z=this.resume(),re=this.stack[this.stack.length-1];re.label=z,re.identifier=Lt(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function A(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function x(W){const z=this.stack[this.stack.length-1];if(!z.depth){const re=this.sliceSerialize(W).length;z.depth=re}}function k(){this.data.setextHeadingSlurpLineEnding=!0}function $(W){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function H(W){const re=this.stack[this.stack.length-1].children;let se=re[re.length-1];(!se||se.type!=="text")&&(se=ie(),se.position={start:Sn(W.start),end:void 0},re.push(se)),this.stack.push(se)}function T(W){const z=this.stack.pop();z.value+=this.sliceSerialize(W),z.position.end=Sn(W.end)}function _(W){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const re=z.children[z.children.length-1];re.position.end=Sn(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(H.call(this,W),T.call(this,W))}function F(){this.data.atHardBreak=!0}function N(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function B(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function D(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function M(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function G(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=z,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function U(W){const z=this.sliceSerialize(W),re=this.stack[this.stack.length-2];re.label=XA(z),re.identifier=Lt(z).toLowerCase()}function I(){const W=this.stack[this.stack.length-1],z=this.resume(),re=this.stack[this.stack.length-1];if(this.data.inReference=!0,re.type==="link"){const se=W.children;re.children=se}else re.alt=z}function y(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function P(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function j(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function V(W){const z=this.resume(),re=this.stack[this.stack.length-1];re.label=z,re.identifier=Lt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function Y(W){this.data.characterReferenceType=W.type}function q(W){const z=this.sliceSerialize(W),re=this.data.characterReferenceType;let se;re?(se=Eh(z,re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):se=ol(z);const ue=this.stack[this.stack.length-1];ue.value+=se}function Q(W){const z=this.stack.pop();z.position.end=Sn(W.end)}function X(W){T.call(this,W);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(W)}function ee(W){T.call(this,W);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(W)}function J(){return{type:"blockquote",children:[]}}function Z(){return{type:"code",lang:null,meta:null,value:""}}function K(){return{type:"inlineCode",value:""}}function L(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function ae(){return{type:"heading",depth:0,children:[]}}function te(){return{type:"break"}}function de(){return{type:"html",value:""}}function me(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function Ue(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function dt(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function pt(){return{type:"strong",children:[]}}function ie(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function zh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?zh(e,r):r$(e,r)}}function r$(e,t){let n;for(n in t)if(jh.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Uh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ro({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ro({start:t.start,end:t.end})+") is still open")}function o$(e){const t=this;t.parser=n;function n(r){return t$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function i$(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function a$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
-
`}]}function
|
|
15
|
-
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let
|
|
16
|
-
`}),
|
|
17
|
-
`});const c={type:"element",tagName:"li",properties:
|
|
13
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}const ab=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:ly},disable:{null:[]},document:{42:Ke,43:Ke,45:Ke,48:Ke,49:Ke,50:Ke,51:Ke,52:Ke,53:Ke,54:Ke,55:Ke,56:Ke,57:Ke,62:Kl},flow:{35:hy,42:vr,45:[rc,vr],60:by,61:rc,95:vr,96:Jl,126:Jl},flowInitial:{[-2]:ro,[-1]:ro,32:ro},insideSpan:{null:[no,Xy]},string:{38:Ql,92:Yl},text:{[-5]:oo,[-4]:oo,[-3]:oo,33:Fy,38:Ql,42:no,60:[Bg,Cy],91:By,92:[dy,Yl],93:io,95:no,96:Jg}},Symbol.toStringTag,{value:"Module"}));function sb(e){const n=Hl([ab,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:i(Mg),document:i(Ng),flow:i(Jy),string:i(eb),text:i(tb)};return r;function i(o){return a;function a(s){return rb(r,o,s)}}}function lb(e){for(;!Zl(e););return e}const ac=/[\0\t\n\r]/g;function cb(){let e=1,t="",n=!0,r;return i;function i(o,a,s){const l=[];let c,f,u,p,d;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),u=0,t="",n&&(o.charCodeAt(0)===65279&&u++,n=void 0);u<o.length;){if(ac.lastIndex=u,c=ac.exec(o),p=c&&c.index!==void 0?c.index:o.length,d=o.charCodeAt(p),!c){t=o.slice(u);break}if(d===10&&u===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<p&&(l.push(o.slice(u,p)),e+=p-u),d){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=p+1}return s&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const ub=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function fb(e){return e.replace(ub,db)}function db(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return Wl(n.slice(o?2:1),o?16:10)}return eo(n)||e}const sc={}.hasOwnProperty;function pb(e,t,n){return typeof t!="string"&&(n=t,t=void 0),hb(n)(lb(sb(n).document().write(cb()(e,t,!0))))}function hb(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(me),autolinkProtocol:z,autolinkEmail:z,atxHeading:o(K),blockQuote:o(J),characterEscape:z,characterReference:z,codeFenced:o(G),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(G,a),codeText:o(j,a),codeTextData:z,data:z,codeFlowValue:z,definition:o(ne),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(se),hardBreakEscape:o(Q),hardBreakTrailing:o(Q),htmlFlow:o(ue,a),htmlFlowData:z,htmlText:o(ue,a),htmlTextData:z,image:o(he),label:a,link:o(me),listItem:o(Ue),listItemValue:p,listOrdered:o(De,u),listUnordered:o(De),paragraph:o(He),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(K),strong:o(qe),thematicBreak:o(ce)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ae,autolinkProtocol:oe,blockQuote:l(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:te,characterReferenceMarkerNumeric:te,characterReferenceValue:Y,characterReference:X,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:m,codeFlowValue:I,codeIndented:l(y),codeText:l(D),codeTextData:I,data:I,definition:l(),definitionDestinationString:C,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(N),htmlFlowData:I,htmlText:l(R),htmlTextData:I,image:l(U),label:H,labelText:$,lineEnding:O,link:l(_),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:v,resourceTitleString:L,resource:W,setextHeading:l(M),setextHeadingLineSequence:T,setextHeadingText:A,strong:l(),thematicBreak:l()}};lc(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(B){let q={type:"root",children:[]};const le={stack:[q],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:f,data:n},re=[];let de=-1;for(;++de<B.length;)if(B[de][1].type==="listOrdered"||B[de][1].type==="listUnordered")if(B[de][0]==="enter")re.push(de);else{const Te=re.pop();de=i(B,Te,de)}for(de=-1;++de<B.length;){const Te=t[B[de][0]];sc.call(Te,B[de][1].type)&&Te[B[de][1].type].call(Object.assign({sliceSerialize:B[de][2].sliceSerialize},le),B[de][1])}if(le.tokenStack.length>0){const Te=le.tokenStack[le.tokenStack.length-1];(Te[1]||cc).call(le,void 0,Te[0])}for(q.position={start:Ot(B.length>0?B[0][1].start:{line:1,column:1,offset:0}),end:Ot(B.length>0?B[B.length-2][1].end:{line:1,column:1,offset:0})},de=-1;++de<t.transforms.length;)q=t.transforms[de](q)||q;return q}function i(B,q,le){let re=q-1,de=-1,Te=!1,ft,Xe,vt,At;for(;++re<=le;){const Be=B[re];switch(Be[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Be[0]==="enter"?de++:de--,At=void 0;break}case"lineEndingBlank":{Be[0]==="enter"&&(ft&&!At&&!de&&!vt&&(vt=re),At=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:At=void 0}if(!de&&Be[0]==="enter"&&Be[1].type==="listItemPrefix"||de===-1&&Be[0]==="exit"&&(Be[1].type==="listUnordered"||Be[1].type==="listOrdered")){if(ft){let wt=re;for(Xe=void 0;wt--;){const et=B[wt];if(et[1].type==="lineEnding"||et[1].type==="lineEndingBlank"){if(et[0]==="exit")continue;Xe&&(B[Xe][1].type="lineEndingBlank",Te=!0),et[1].type="lineEnding",Xe=wt}else if(!(et[1].type==="linePrefix"||et[1].type==="blockQuotePrefix"||et[1].type==="blockQuotePrefixWhitespace"||et[1].type==="blockQuoteMarker"||et[1].type==="listItemIndent"))break}vt&&(!Xe||vt<Xe)&&(ft._spread=!0),ft.end=Object.assign({},Xe?B[Xe][1].start:Be[1].end),B.splice(Xe||re,0,["exit",ft,Be[2]]),re++,le++}if(Be[1].type==="listItemPrefix"){const wt={type:"listItem",_spread:!1,start:Object.assign({},Be[1].start),end:void 0};ft=wt,B.splice(re,0,["enter",wt,Be[2]]),re++,le++,vt=void 0,At=!0}}}return B[q][1]._spread=Te,le}function o(B,q){return le;function le(re){s.call(this,B(re),re),q&&q.call(this,re)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(B,q,le){this.stack[this.stack.length-1].children.push(B),this.stack.push(B),this.tokenStack.push([q,le]),B.position={start:Ot(q.start),end:void 0}}function l(B){return q;function q(le){B&&B.call(this,le),c.call(this,le)}}function c(B,q){const le=this.stack.pop(),re=this.tokenStack.pop();if(re)re[0].type!==B.type&&(q?q.call(this,B,re[0]):(re[1]||cc).call(this,B,re[0]));else throw new Error("Cannot close `"+B.type+"` ("+Ln({start:B.start,end:B.end})+"): it’s not open");le.position.end=Ot(B.end)}function f(){return Xi(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function p(B){if(this.data.expectingFirstListItemValue){const q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(B),10),this.data.expectingFirstListItemValue=void 0}}function d(){const B=this.resume(),q=this.stack[this.stack.length-1];q.lang=B}function m(){const B=this.resume(),q=this.stack[this.stack.length-1];q.meta=B}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function y(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B.replace(/(\r?\n|\r)$/g,"")}function b(B){const q=this.resume(),le=this.stack[this.stack.length-1];le.label=q,le.identifier=at(this.sliceSerialize(B)).toLowerCase()}function w(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function C(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function x(B){const q=this.stack[this.stack.length-1];if(!q.depth){const le=this.sliceSerialize(B).length;q.depth=le}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function T(B){const q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(B).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function z(B){const le=this.stack[this.stack.length-1].children;let re=le[le.length-1];(!re||re.type!=="text")&&(re=ee(),re.position={start:Ot(B.start),end:void 0},le.push(re)),this.stack.push(re)}function I(B){const q=this.stack.pop();q.value+=this.sliceSerialize(B),q.position.end=Ot(B.end)}function O(B){const q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const le=q.children[q.children.length-1];le.position.end=Ot(B.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(q.type)&&(z.call(this,B),I.call(this,B))}function F(){this.data.atHardBreak=!0}function N(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function R(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function D(){const B=this.resume(),q=this.stack[this.stack.length-1];q.value=B}function _(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function U(){const B=this.stack[this.stack.length-1];if(this.data.inReference){const q=this.data.referenceType||"shortcut";B.type+="Reference",B.referenceType=q,delete B.url,delete B.title}else delete B.identifier,delete B.label;this.data.referenceType=void 0}function $(B){const q=this.sliceSerialize(B),le=this.stack[this.stack.length-2];le.label=fb(q),le.identifier=at(q).toLowerCase()}function H(){const B=this.stack[this.stack.length-1],q=this.resume(),le=this.stack[this.stack.length-1];if(this.data.inReference=!0,le.type==="link"){const re=B.children;le.children=re}else le.alt=q}function v(){const B=this.resume(),q=this.stack[this.stack.length-1];q.url=B}function L(){const B=this.resume(),q=this.stack[this.stack.length-1];q.title=B}function W(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function V(B){const q=this.resume(),le=this.stack[this.stack.length-1];le.label=q,le.identifier=at(this.sliceSerialize(B)).toLowerCase(),this.data.referenceType="full"}function te(B){this.data.characterReferenceType=B.type}function Y(B){const q=this.sliceSerialize(B),le=this.data.characterReferenceType;let re;le?(re=Wl(q,le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):re=eo(q);const de=this.stack[this.stack.length-1];de.value+=re}function X(B){const q=this.stack.pop();q.position.end=Ot(B.end)}function oe(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(B)}function ae(B){I.call(this,B);const q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(B)}function J(){return{type:"blockquote",children:[]}}function G(){return{type:"code",lang:null,meta:null,value:""}}function j(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function se(){return{type:"emphasis",children:[]}}function K(){return{type:"heading",depth:0,children:[]}}function Q(){return{type:"break"}}function ue(){return{type:"html",value:""}}function he(){return{type:"image",title:null,url:"",alt:null}}function me(){return{type:"link",title:null,url:"",children:[]}}function De(B){return{type:"list",ordered:B.type==="listOrdered",start:null,spread:B._spread,children:[]}}function Ue(B){return{type:"listItem",spread:B._spread,checked:null,children:[]}}function He(){return{type:"paragraph",children:[]}}function qe(){return{type:"strong",children:[]}}function ee(){return{type:"text",value:""}}function ce(){return{type:"thematicBreak"}}}function Ot(e){return{line:e.line,column:e.column,offset:e.offset}}function lc(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?lc(e,r):mb(e,r)}}function mb(e,t){let n;for(n in t)if(sc.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function cc(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ln({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ln({start:t.start,end:t.end})+") is still open")}function gb(e){const t=this;t.parser=n;function n(r){return pb(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function yb(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function bb(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
+
`}]}function vb(e,t){const n=t.value?t.value+`
|
|
15
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function wb(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xb(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kb(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=en(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function Sb(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Eb(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function uc(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Cb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uc(e,t);const i={src:en(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Ab(e,t){const n={src:en(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ib(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Tb(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return uc(e,t);const i={href:en(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function Ob(e,t){const n={href:en(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Db(e,t,n){const r=e.all(t),i=n?Mb(n):fc(t),o={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const f=r[s];(i||s!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
16
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
17
|
+
`});const c={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,c),e.applyData(t,c)}function Mb(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=fc(n[r])}return t}function fc(e){const t=e.spread;return t??e.children.length>1}function Pb(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function Nb(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function _b(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Lb(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Fb(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Ki(t.children[1]),l=Ml(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function Rb(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,s=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<s;){const u=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let m={type:"element",tagName:o,properties:p,children:[]};u&&(m.children=e.all(u),e.patch(u,m),m=e.applyData(u,m)),c.push(m)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function Bb(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const dc=9,pc=32;function zb(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(hc(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(hc(t.slice(i),i>0,!1)),o.join("")}function hc(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===dc||o===pc;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===dc||o===pc;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function $b(e,t){const n={type:"text",value:zb(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function jb(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Ub={blockquote:yb,break:bb,code:vb,delete:wb,emphasis:xb,footnoteReference:kb,heading:Sb,html:Eb,imageReference:Cb,image:Ab,inlineCode:Ib,linkReference:Tb,link:Ob,listItem:Db,list:Pb,paragraph:Nb,root:_b,strong:Lb,table:Fb,tableCell:Bb,tableRow:Rb,text:$b,thematicBreak:jb,toml:wr,yaml:wr,definition:wr,footnoteDefinition:wr};function wr(){}const mc=-1,xr=0,kr=1,Sr=2,ao=3,so=4,lo=5,co=6,gc=7,yc=8,bc=typeof self=="object"?self:globalThis,Hb=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case xr:case mc:return n(a,i);case kr:{const s=n([],i);for(const l of a)s.push(r(l));return s}case Sr:{const s=n({},i);for(const[l,c]of a)s[r(l)]=r(c);return s}case ao:return n(new Date(a),i);case so:{const{source:s,flags:l}=a;return n(new RegExp(s,l),i)}case lo:{const s=n(new Map,i);for(const[l,c]of a)s.set(r(l),r(c));return s}case co:{const s=n(new Set,i);for(const l of a)s.add(r(l));return s}case gc:{const{name:s,message:l}=a;return n(new bc[s](l),i)}case yc:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i)}return n(new bc[o](a),i)};return r},vc=e=>Hb(new Map,e)(0),tn="",{toString:Wb}={},{keys:Vb}=Object,$n=e=>{const t=typeof e;if(t!=="object"||!e)return[xr,t];const n=Wb.call(e).slice(8,-1);switch(n){case"Array":return[kr,tn];case"Object":return[Sr,tn];case"Date":return[ao,tn];case"RegExp":return[so,tn];case"Map":return[lo,tn];case"Set":return[co,tn]}return n.includes("Array")?[kr,n]:n.includes("Error")?[gc,n]:[Sr,n]},Er=([e,t])=>e===xr&&(t==="function"||t==="symbol"),qb=(e,t,n,r)=>{const i=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},o=a=>{if(n.has(a))return n.get(a);let[s,l]=$n(a);switch(s){case xr:{let f=a;switch(l){case"bigint":s=yc,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([mc],a)}return i([s,f],a)}case kr:{if(l)return i([l,[...a]],a);const f=[],u=i([s,f],a);for(const p of a)f.push(o(p));return u}case Sr:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const f=[],u=i([s,f],a);for(const p of Vb(a))(e||!Er($n(a[p])))&&f.push([o(p),o(a[p])]);return u}case ao:return i([s,a.toISOString()],a);case so:{const{source:f,flags:u}=a;return i([s,{source:f,flags:u}],a)}case lo:{const f=[],u=i([s,f],a);for(const[p,d]of a)(e||!(Er($n(p))||Er($n(d))))&&f.push([o(p),o(d)]);return u}case co:{const f=[],u=i([s,f],a);for(const p of a)(e||!Er($n(p)))&&f.push(o(p));return u}}const{message:c}=a;return i([s,{name:l,message:c}],a)};return o},wc=(e,{json:t,lossy:n}={})=>{const r=[];return qb(!(t||n),!!t,new Map,r)(e),r},Cr=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?vc(wc(e,t)):structuredClone(e):(e,t)=>vc(wc(e,t));function Kb(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Yb(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Qb(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Kb,r=e.options.footnoteBackLabel||Yb,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),u=String(c.identifier).toUpperCase(),p=en(u.toLowerCase());let d=0;const m=[],h=e.footnoteCounts.get(u);for(;h!==void 0&&++d<=h;){m.length>0&&m.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),m.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,d),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const g=f[f.length-1];if(g&&g.type==="element"&&g.tagName==="p"){const b=g.children[g.children.length-1];b&&b.type==="text"?b.value+=" ":g.children.push({type:"text",value:" "}),g.children.push(...m)}else f.push(...m);const y={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(f,!0)};e.patch(c,y),s.push(y)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Cr(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
18
18
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
19
|
-
`}]}}const
|
|
19
|
+
`}]}}const Ar=function(e){if(e==null)return Xb;if(typeof e=="function")return Ir(e);if(typeof e=="object")return Array.isArray(e)?Gb(e):Jb(e);if(typeof e=="string")return Zb(e);throw new Error("Expected function, string, or object as test")};function Gb(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ar(e[n]);return Ir(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Jb(e){const t=e;return Ir(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Zb(e){return Ir(t);function t(n){return n&&n.type===e}}function Ir(e){return t;function t(n,r,i){return!!(ev(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function Xb(){return!0}function ev(e){return e!==null&&typeof e=="object"&&"type"in e}function iT(e){return e}const xc=[],tv=!0,uo=!1,nv="skip";function kc(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=Ar(i),a=r?-1:1;s(e,void 0,[])();function s(l,c,f){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const d=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=xc,m,h,g;if((!t||o(l,c,f[f.length-1]||void 0))&&(d=rv(n(l,f)),d[0]===uo))return d;if("children"in l&&l.children){const y=l;if(y.children&&d[0]!==nv)for(h=(r?y.children.length:-1)+a,g=f.concat(y);h>-1&&h<y.children.length;){const b=y.children[h];if(m=s(b,h,g)(),m[0]===uo)return m;h=typeof m[1]=="number"?m[1]:h+a}}return d}}}function rv(e){return Array.isArray(e)?e:typeof e=="number"?[tv,e]:e==null?xc:[e]}function fo(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),kc(e,o,s,i);function s(l,c){const f=c[c.length-1],u=f?f.children.indexOf(l):void 0;return a(l,u,f)}}const po={}.hasOwnProperty,iv={};function ov(e,t){const n=t||iv,r=new Map,i=new Map,o=new Map,a={...Ub,...n.handlers},s={all:c,applyData:sv,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:l,options:n,patch:av,wrap:cv};return fo(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const u=f.type==="definition"?r:i,p=String(f.identifier).toUpperCase();u.has(p)||u.set(p,f)}}),s;function l(f,u){const p=f.type,d=s.handlers[p];if(po.call(s.handlers,p)&&d)return d(s,f,u);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in f){const{children:h,...g}=f,y=Cr(g);return y.children=s.all(f),y}return Cr(f)}return(s.options.unknownHandler||lv)(s,f,u)}function c(f){const u=[];if("children"in f){const p=f.children;let d=-1;for(;++d<p.length;){const m=s.one(p[d],f);if(m){if(d&&p[d-1].type==="break"&&(!Array.isArray(m)&&m.type==="text"&&(m.value=Sc(m.value)),!Array.isArray(m)&&m.type==="element")){const h=m.children[0];h&&h.type==="text"&&(h.value=Sc(h.value))}Array.isArray(m)?u.push(...m):u.push(m)}}}return u}}function av(e,t){e.position&&(t.position=tg(e))}function sv(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,Cr(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function lv(e,t){const n=t.data||{},r="value"in t&&!(po.call(n,"hProperties")||po.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function cv(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
20
20
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
21
21
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
22
|
-
`}),n}function
|
|
23
|
-
`},o),i}function Z$(e,t){return e&&"run"in e?async function(n,r){const o=rv(n,{file:r,...t});await e.run(o,r)}:function(n,r){return rv(n,{file:r,...e||t})}}function ov(e){if(e)throw e}var Ti=Object.prototype.hasOwnProperty,iv=Object.prototype.toString,av=Object.defineProperty,sv=Object.getOwnPropertyDescriptor,lv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):iv.call(t)==="[object Array]"},cv=function(t){if(!t||iv.call(t)!=="[object Object]")return!1;var n=Ti.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Ti.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||Ti.call(t,o)},uv=function(t,n){av&&n.name==="__proto__"?av(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},fv=function(t,n){if(n==="__proto__")if(Ti.call(t,n)){if(sv)return sv(t,n).value}else return;return t[n]},X$=function e(){var t,n,r,o,i,a,s=arguments[0],l=1,c=arguments.length,u=!1;for(typeof s=="boolean"&&(u=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=fv(s,n),o=fv(t,n),s!==o&&(u&&o&&(cv(o)||(i=lv(o)))?(i?(i=!1,a=r&&lv(r)?r:[]):a=r&&cv(r)?r:{},uv(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&uv(s,{name:n,newValue:o}));return s};const gl=be(X$);function yl(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function eT(){const e=[],t={run:n,use:r};return t;function n(...o){let i=-1;const a=o.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...o);function s(l,...c){const u=e[++i];let f=-1;if(l){a(l);return}for(;++f<o.length;)(c[f]===null||c[f]===void 0)&&(c[f]=o[f]);o=c,u?tT(u,s)(...c):a(null,...c)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function tT(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(o);try{l=e.apply(this,a)}catch(c){const u=c;if(s&&n)throw u;return o(u)}s||(l&&l.then&&typeof l.then=="function"?l.then(i,o):l instanceof Error?o(l):i(l))}function o(a,...s){n||(n=!0,t(a,...s))}function i(a){o(null,a)}}const Gt={basename:nT,dirname:rT,extname:oT,join:iT,sep:"/"};function nT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');co(e);let n=0,r=-1,o=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else r<0&&(i=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(i){n=o+1;break}}else a<0&&(i=!0,a=o+1),s>-1&&(e.codePointAt(o)===t.codePointAt(s--)?s<0&&(r=o):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function rT(e){if(co(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function oT(e){co(e);let t=e.length,n=-1,r=0,o=-1,i=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?o<0?o=t:i!==1&&(i=1):o>-1&&(i=-1)}return o<0||n<0||i===0||i===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function iT(...e){let t=-1,n;for(;++t<e.length;)co(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":aT(n)}function aT(e){co(e);const t=e.codePointAt(0)===47;let n=sT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function sT(e,t){let n="",r=0,o=-1,i=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(o===a-1||i===1))if(o!==a-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),o=a,i=0;continue}}else if(n.length>0){n="",r=0,o=a,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,a):n=e.slice(o+1,a),r=a-o-1;o=a,i=0}else s===46&&i>-1?i++:i=-1}return n}function co(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const lT={cwd:cT};function cT(){return"/"}function bl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function uT(e){if(typeof e=="string")e=new URL(e);else if(!bl(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return fT(e)}function fT(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const wl=["history","path","basename","stem","extname","dirname"];class dv{constructor(t){let n;t?bl(t)?n={path:t}:typeof t=="string"||dT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":lT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<wl.length;){const i=wl[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let o;for(o in n)wl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){xl(t,"basename"),Sl(t,"basename"),this.path=Gt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gt.dirname(this.path):void 0}set dirname(t){pv(this.basename,"dirname"),this.path=Gt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gt.extname(this.path):void 0}set extname(t){if(Sl(t,"extname"),pv(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Gt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){bl(t)&&(t=uT(t)),xl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gt.basename(this.path,this.extname):void 0}set stem(t){xl(t,"stem"),Sl(t,"stem"),this.path=Gt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new st(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Sl(e,t){if(e&&e.includes(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function xl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function pv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function dT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const pT=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},hT={}.hasOwnProperty;class El extends pT{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=eT()}copy(){const t=new El;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(gl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Al("data",this.frozen),this.namespace[t]=n,this):hT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Al("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Oi(t),r=this.parser||this.Parser;return kl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),kl("process",this.parser||this.Parser),Cl("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Oi(t),l=r.parse(s);r.run(l,s,function(u,f,p){if(u||!f||!p)return c(u);const d=f,v=r.stringify(d,p);gT(v)?p.value=v:p.result=v,c(u,p)});function c(u,f){u||!f?a(u):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),kl("processSync",this.parser||this.Parser),Cl("processSync",this.compiler||this.Compiler),this.process(t,o),vv("processSync","process",n),r;function o(i,a){n=!0,ov(i),r=a}}run(t,n,r){hv(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(a,s){const l=Oi(n);o.run(t,l,c);function c(u,f,p){const d=f||t;u?s(u):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,o;return this.run(t,n,i),vv("runSync","run",r),o;function i(a,s){ov(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Oi(n),o=this.compiler||this.Compiler;return Cl("stringify",o),hv(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Al("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[u,...f]=c;l(u,f)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(o.settings=gl(!0,o.settings,c.settings))}function s(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];i(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===c){p=f;break}if(p===-1)r.push([c,...u]);else if(u.length>0){let[d,...v]=u;const h=r[p][1];yl(h)&&yl(d)&&(d=gl(!0,h,d)),r[p]=[c,d,...v]}}}}const vT=new El().freeze();function kl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Cl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Al(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function hv(e){if(!yl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Oi(e){return mT(e)?e:new dv(e)}function mT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function gT(e){return typeof e=="string"||yT(e)}function yT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const bT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",mv=[],gv={allowDangerousHtml:!0},wT=/^(https?|ircs?|mailto|xmpp)$/i,ST=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function yv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||mv,l=e.remarkPlugins||mv,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...gv}:gv,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||bv,d=vT().use(o$).use(l).use(Z$,c).use(s),v=new dv;typeof r=="string"&&(v.value=r);for(const b of ST)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+bT+b.id,void 0);const h=d.parse(v);let g=d.runSync(h,v);return o&&(g={type:"element",tagName:"div",properties:{className:o},children:g.type==="root"?g.children:[g]}),vl(g,m),Yk(g,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function m(b,w,A){if(b.type==="raw"&&A&&typeof w=="number")return u?A.children.splice(w,1):A.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let x;for(x in nl)if(Object.hasOwn(nl,x)&&Object.hasOwn(b.properties,x)){const k=b.properties[x],$=nl[x];($===null||$.includes(b.tagName))&&(b.properties[x]=p(String(k||""),x,b))}}if(b.type==="element"){let x=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!x&&n&&typeof w=="number"&&(x=!n(b,w,A)),x&&A&&typeof w=="number")return f&&b.children?A.children.splice(w,1,...b.children):A.children.splice(w,1),w}}}function bv(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t<0||o>-1&&t>o||n>-1&&t>n||r>-1&&t>r||wT.test(e.slice(0,t))?e:""}function xT(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wv(e,t,n){const o=Ai((n||{}).ignore||[]),i=ET(t);let a=-1;for(;++a<i.length;)tv(e,"text",s);function s(c,u){let f=-1,p;for(;++f<u.length;){const d=u[f],v=p?p.children:void 0;if(o(d,v?v.indexOf(d):void 0,p))return;p=d}if(p)return l(c,u)}function l(c,u){const f=u[u.length-1],p=i[a][0],d=i[a][1];let v=0;const g=f.children.indexOf(c);let m=!1,b=[];p.lastIndex=0;let w=p.exec(c.value);for(;w;){const A=w.index,x={index:w.index,input:w.input,stack:[...u,c]};let k=d(...w,x);if(typeof k=="string"&&(k=k.length>0?{type:"text",value:k}:void 0),k===!1?p.lastIndex=A+1:(v!==A&&b.push({type:"text",value:c.value.slice(v,A)}),Array.isArray(k)?b.push(...k):k&&b.push(k),v=A+w[0].length,m=!0),!p.global)break;w=p.exec(c.value)}return m?(v<c.value.length&&b.push({type:"text",value:c.value.slice(v)}),f.children.splice(g,1,...b)):b=[c],g+b.length}}function ET(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([kT(o[0]),CT(o[1])])}return t}function kT(e){return typeof e=="string"?new RegExp(xT(e),"g"):e}function CT(e){return typeof e=="function"?e:function(){return e}}function AT(e){wv(e,[/\r?\n|\r/g,$T])}function $T(){return{type:"break"}}function TT(){return function(e){AT(e)}}function Sv(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}const $l="phrasing",Tl=["autolink","link","image","label"];function OT(){return{transforms:[RT],enter:{literalAutolink:PT,literalAutolinkEmail:Ol,literalAutolinkHttp:Ol,literalAutolinkWww:Ol},exit:{literalAutolink:NT,literalAutolinkEmail:MT,literalAutolinkHttp:DT,literalAutolinkWww:_T}}}function IT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:$l,notInConstruct:Tl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:$l,notInConstruct:Tl},{character:":",before:"[ps]",after:"\\/",inConstruct:$l,notInConstruct:Tl}]}}function PT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ol(e){this.config.enter.autolinkProtocol.call(this,e)}function DT(e){this.config.exit.autolinkProtocol.call(this,e)}function _T(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function MT(e){this.config.exit.autolinkEmail.call(this,e)}function NT(e){this.exit(e)}function RT(e){wv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),FT]],{ignore:["link","linkReference"]})}function LT(e,t,n,r,o){let i="";if(!xv(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!BT(n)))return!1;const a=jT(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:i+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function FT(e,t,n,r){return!xv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function BT(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function jT(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Sv(e,"(");let i=Sv(e,")");for(;r!==-1&&o>i;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),i++;return[e,n]}function xv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Un(n)||mi(n))&&(!t||n!==47)}Ev.peek=JT;function zT(){return{enter:{gfmFootnoteDefinition:WT,gfmFootnoteDefinitionLabelString:HT,gfmFootnoteCall:qT,gfmFootnoteCallString:GT},exit:{gfmFootnoteDefinition:KT,gfmFootnoteDefinitionLabelString:VT,gfmFootnoteCall:QT,gfmFootnoteCallString:YT}}}function UT(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:ZT,footnoteReference:Ev}}}function WT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function HT(){this.buffer()}function VT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function KT(e){this.exit(e)}function qT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function GT(){this.buffer()}function YT(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Lt(this.sliceSerialize(e)).toLowerCase()}function QT(e){this.exit(e)}function Ev(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),a(),i+=o.move("]"),i}function JT(){return"["}function ZT(e,t,n,r){const o=n.createTracker(r);let i=o.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return i+=o.move(n.safe(n.associationId(e),{...o.current(),before:i,after:"]"})),s(),i+=o.move("]:"+(e.children&&e.children.length>0?" ":"")),o.shift(4),i+=o.move(n.indentLines(n.containerFlow(e,o.current()),XT)),a(),i}function XT(e,t,n){return t===0?e:(n?"":" ")+e}const eO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];kv.peek=iO;function tO(){return{canContainEols:["delete"],enter:{strikethrough:rO},exit:{strikethrough:oO}}}function nO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:eO}],handlers:{delete:kv}}}function rO(e){this.enter({type:"delete",children:[]},e)}function oO(e){this.exit(e)}function kv(e,t,n,r){const o=n.createTracker(r),i=n.enter("strikethrough");let a=o.move("~~");return a+=n.containerPhrasing(e,{...o.current(),before:a,after:"~"}),a+=o.move("~~"),i(),a}function iO(){return"~"}function aO(e){return e.length}function sO(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||aO,i=[],a=[],s=[],l=[];let c=0,u=-1;for(;++u<e.length;){const h=[],g=[];let m=-1;for(e[u].length>c&&(c=e[u].length);++m<e[u].length;){const b=lO(e[u][m]);if(n.alignDelimiters!==!1){const w=o(b);g[m]=w,(l[m]===void 0||w>l[m])&&(l[m]=w)}h.push(b)}a[u]=h,s[u]=g}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)i[f]=Cv(r[f]);else{const h=Cv(r);for(;++f<c;)i[f]=h}f=-1;const p=[],d=[];for(;++f<c;){const h=i[f];let g="",m="";h===99?(g=":",m=":"):h===108?g=":":h===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[f]-g.length-m.length);const w=g+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=g.length+b+m.length,b>l[f]&&(l[f]=b),d[f]=b),p[f]=w}a.splice(1,0,p),s.splice(1,0,d),u=-1;const v=[];for(;++u<a.length;){const h=a[u],g=s[u];f=-1;const m=[];for(;++f<c;){const b=h[f]||"";let w="",A="";if(n.alignDelimiters!==!1){const x=l[f]-(g[f]||0),k=i[f];k===114?w=" ".repeat(x):k===99?x%2?(w=" ".repeat(x/2+.5),A=" ".repeat(x/2-.5)):(w=" ".repeat(x/2),A=w):A=" ".repeat(x)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(w),m.push(b),n.alignDelimiters!==!1&&m.push(A),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&m.push("|")}v.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return v.join(`
|
|
24
|
-
`)}function
|
|
25
|
-
`&&
|
|
26
|
-
`}function
|
|
27
|
-
`,encode:["`"],...s.current()})),
|
|
28
|
-
`),
|
|
29
|
-
`)),
|
|
30
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${
|
|
22
|
+
`}),n}function Sc(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ec(e,t){const n=ov(e,t),r=n.one(e,void 0),i=Qb(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
23
|
+
`},i),o}function uv(e,t){return e&&"run"in e?async function(n,r){const i=Ec(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Ec(n,{file:r,...e||t})}}function Cc(e){if(e)throw e}var Tr=Object.prototype.hasOwnProperty,Ac=Object.prototype.toString,Ic=Object.defineProperty,Tc=Object.getOwnPropertyDescriptor,Oc=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ac.call(t)==="[object Array]"},Dc=function(t){if(!t||Ac.call(t)!=="[object Object]")return!1;var n=Tr.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Tr.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Tr.call(t,i)},Mc=function(t,n){Ic&&n.name==="__proto__"?Ic(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Pc=function(t,n){if(n==="__proto__")if(Tr.call(t,n)){if(Tc)return Tc(t,n).value}else return;return t[n]},fv=function e(){var t,n,r,i,o,a,s=arguments[0],l=1,c=arguments.length,f=!1;for(typeof s=="boolean"&&(f=s,s=arguments[1]||{},l=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=Pc(s,n),i=Pc(t,n),s!==i&&(f&&i&&(Dc(i)||(o=Oc(i)))?(o?(o=!1,a=r&&Oc(r)?r:[]):a=r&&Dc(r)?r:{},Mc(s,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&Mc(s,{name:n,newValue:i}));return s};const ho=Jt(fv);function mo(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function dv(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);s(null,...i);function s(l,...c){const f=e[++o];let u=-1;if(l){a(l);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,f?pv(f,s)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function pv(e,t){let n;return r;function r(...a){const s=e.length>a.length;let l;s&&a.push(i);try{l=e.apply(this,a)}catch(c){const f=c;if(s&&n)throw f;return i(f)}s||(l&&l.then&&typeof l.then=="function"?l.then(o,i):l instanceof Error?i(l):o(l))}function i(a,...s){n||(n=!0,t(a,...s))}function o(a){i(null,a)}}const dt={basename:hv,dirname:mv,extname:gv,join:yv,sep:"/"};function hv(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');jn(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function mv(e){if(jn(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function gv(e){jn(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const s=e.codePointAt(t);if(s===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),s===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function yv(...e){let t=-1,n;for(;++t<e.length;)jn(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":bv(n)}function bv(e){jn(e);const t=e.codePointAt(0)===47;let n=vv(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vv(e,t){let n="",r=0,i=-1,o=0,a=-1,s,l;for(;++a<=e.length;){if(a<e.length)s=e.codePointAt(a);else{if(s===47)break;s=47}if(s===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else s===46&&o>-1?o++:o=-1}return n}function jn(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const wv={cwd:xv};function xv(){return"/"}function go(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function kv(e){if(typeof e=="string")e=new URL(e);else if(!go(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Sv(e)}function Sv(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const yo=["history","path","basename","stem","extname","dirname"];class Nc{constructor(t){let n;t?go(t)?n={path:t}:typeof t=="string"||Ev(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":wv.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yo.length;){const o=yo[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)yo.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?dt.basename(this.path):void 0}set basename(t){vo(t,"basename"),bo(t,"basename"),this.path=dt.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?dt.dirname(this.path):void 0}set dirname(t){_c(this.basename,"dirname"),this.path=dt.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?dt.extname(this.path):void 0}set extname(t){if(bo(t,"extname"),_c(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=dt.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){go(t)&&(t=kv(t)),vo(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?dt.basename(this.path,this.extname):void 0}set stem(t){vo(t,"stem"),bo(t,"stem"),this.path=dt.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new ze(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function bo(e,t){if(e&&e.includes(dt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+dt.sep+"`")}function vo(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function _c(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Ev(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Cv=function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o},Av={}.hasOwnProperty;class wo extends Cv{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=dv()}copy(){const t=new wo;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ho(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(So("data",this.frozen),this.namespace[t]=n,this):Av.call(this.namespace,t)&&this.namespace[t]||void 0:t?(So("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Or(t),r=this.parser||this.Parser;return xo("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),xo("process",this.parser||this.Parser),ko("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const s=Or(t),l=r.parse(s);r.run(l,s,function(f,u,p){if(f||!u||!p)return c(f);const d=u,m=r.stringify(d,p);Ov(m)?p.value=m:p.result=m,c(f,p)});function c(f,u){f||!u?a(f):o?o(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),xo("processSync",this.parser||this.Parser),ko("processSync",this.compiler||this.Compiler),this.process(t,i),Fc("processSync","process",n),r;function i(o,a){n=!0,Cc(o),r=a}}run(t,n,r){Lc(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,s){const l=Or(n);i.run(t,l,c);function c(f,u,p){const d=u||t;f?s(f):a?a(d):r(void 0,d,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),Fc("runSync","run",r),i;function o(a,s){Cc(a),i=s,r=!0}}stringify(t,n){this.freeze();const r=Or(n),i=this.compiler||this.Compiler;return ko("stringify",i),Lc(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(So("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...u]=c;l(f,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");s(c.plugins),c.settings&&(i.settings=ho(!0,i.settings,c.settings))}function s(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const u=c[f];o(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let u=-1,p=-1;for(;++u<r.length;)if(r[u][0]===c){p=u;break}if(p===-1)r.push([c,...f]);else if(f.length>0){let[d,...m]=f;const h=r[p][1];mo(h)&&mo(d)&&(d=ho(!0,h,d)),r[p]=[c,d,...m]}}}}const Iv=new wo().freeze();function xo(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function ko(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function So(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Lc(e){if(!mo(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fc(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Or(e){return Tv(e)?e:new Nc(e)}function Tv(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function Ov(e){return typeof e=="string"||Dv(e)}function Dv(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Mv="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Rc=[],Bc={allowDangerousHtml:!0},Pv=/^(https?|ircs?|mailto|xmpp)$/i,Nv=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function zc(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",i=e.className,o=e.components,a=e.disallowedElements,s=e.rehypePlugins||Rc,l=e.remarkPlugins||Rc,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Bc}:Bc,f=e.skipHtml,u=e.unwrapDisallowed,p=e.urlTransform||$c,d=Iv().use(gb).use(l).use(uv,c).use(s),m=new Nc;typeof r=="string"&&(m.value=r);for(const b of Nv)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Mv+b.id,void 0);const h=d.parse(m);let g=d.runSync(h,m);return i&&(g={type:"element",tagName:"div",properties:{className:i},children:g.type==="root"?g.children:[g]}),fo(g,y),sg(g,{Fragment:k.Fragment,components:o,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function y(b,w,C){if(b.type==="raw"&&C&&typeof w=="number")return f?C.children.splice(w,1):C.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let x;for(x in Zi)if(Object.hasOwn(Zi,x)&&Object.hasOwn(b.properties,x)){const A=b.properties[x],T=Zi[x];(T===null||T.includes(b.tagName))&&(b.properties[x]=p(String(A||""),x,b))}}if(b.type==="element"){let x=t?!t.includes(b.tagName):a?a.includes(b.tagName):!1;if(!x&&n&&typeof w=="number"&&(x=!n(b,w,C)),x&&C&&typeof w=="number")return u&&b.children?C.children.splice(w,1,...b.children):C.children.splice(w,1),w}}}function $c(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t<0||i>-1&&t>i||n>-1&&t>n||r>-1&&t>r||Pv.test(e.slice(0,t))?e:""}function _v(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function jc(e,t,n){const i=Ar((n||{}).ignore||[]),o=Lv(t);let a=-1;for(;++a<o.length;)kc(e,"text",s);function s(c,f){let u=-1,p;for(;++u<f.length;){const d=f[u],m=p?p.children:void 0;if(i(d,m?m.indexOf(d):void 0,p))return;p=d}if(p)return l(c,f)}function l(c,f){const u=f[f.length-1],p=o[a][0],d=o[a][1];let m=0;const g=u.children.indexOf(c);let y=!1,b=[];p.lastIndex=0;let w=p.exec(c.value);for(;w;){const C=w.index,x={index:w.index,input:w.input,stack:[...f,c]};let A=d(...w,x);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=C+1:(m!==C&&b.push({type:"text",value:c.value.slice(m,C)}),Array.isArray(A)?b.push(...A):A&&b.push(A),m=C+w[0].length,y=!0),!p.global)break;w=p.exec(c.value)}return y?(m<c.value.length&&b.push({type:"text",value:c.value.slice(m)}),u.children.splice(g,1,...b)):b=[c],g+b.length}}function Lv(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Fv(i[0]),Rv(i[1])])}return t}function Fv(e){return typeof e=="string"?new RegExp(_v(e),"g"):e}function Rv(e){return typeof e=="function"?e:function(){return e}}function Bv(e){jc(e,[/\r?\n|\r/g,zv])}function zv(){return{type:"break"}}function $v(){return function(e){Bv(e)}}function Uc(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const Eo="phrasing",Co=["autolink","link","image","label"];function jv(){return{transforms:[Yv],enter:{literalAutolink:Hv,literalAutolinkEmail:Ao,literalAutolinkHttp:Ao,literalAutolinkWww:Ao},exit:{literalAutolink:Kv,literalAutolinkEmail:qv,literalAutolinkHttp:Wv,literalAutolinkWww:Vv}}}function Uv(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Eo,notInConstruct:Co},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Eo,notInConstruct:Co},{character:":",before:"[ps]",after:"\\/",inConstruct:Eo,notInConstruct:Co}]}}function Hv(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ao(e){this.config.enter.autolinkProtocol.call(this,e)}function Wv(e){this.config.exit.autolinkProtocol.call(this,e)}function Vv(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function qv(e){this.config.exit.autolinkEmail.call(this,e)}function Kv(e){this.exit(e)}function Yv(e){jc(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Qv],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Gv]],{ignore:["link","linkReference"]})}function Qv(e,t,n,r,i){let o="";if(!Hc(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Jv(n)))return!1;const a=Zv(n+r);if(!a[0])return!1;const s={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[s,{type:"text",value:a[1]}]:s}function Gv(e,t,n,r){return!Hc(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Jv(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Zv(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Uc(e,"(");let o=Uc(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function Hc(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ht(n)||gr(n))&&(!t||n!==47)}Wc.peek=cw;function Xv(){return{enter:{gfmFootnoteDefinition:tw,gfmFootnoteDefinitionLabelString:nw,gfmFootnoteCall:ow,gfmFootnoteCallString:aw},exit:{gfmFootnoteDefinition:iw,gfmFootnoteDefinitionLabelString:rw,gfmFootnoteCall:lw,gfmFootnoteCallString:sw}}}function ew(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:uw,footnoteReference:Wc}}}function tw(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function nw(){this.buffer()}function rw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=at(this.sliceSerialize(e)).toLowerCase()}function iw(e){this.exit(e)}function ow(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function aw(){this.buffer()}function sw(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=at(this.sliceSerialize(e)).toLowerCase()}function lw(e){this.exit(e)}function Wc(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),s=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),a(),o+=i.move("]"),o}function cw(){return"["}function uw(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteDefinition"),s=n.enter("label");return o+=i.move(n.safe(n.associationId(e),{...i.current(),before:o,after:"]"})),s(),o+=i.move("]:"+(e.children&&e.children.length>0?" ":"")),i.shift(4),o+=i.move(n.indentLines(n.containerFlow(e,i.current()),fw)),a(),o}function fw(e,t,n){return t===0?e:(n?"":" ")+e}const dw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vc.peek=yw;function pw(){return{canContainEols:["delete"],enter:{strikethrough:mw},exit:{strikethrough:gw}}}function hw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:dw}],handlers:{delete:Vc}}}function mw(e){this.enter({type:"delete",children:[]},e)}function gw(e){this.exit(e)}function Vc(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function yw(){return"~"}function bw(e){return e.length}function vw(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||bw,o=[],a=[],s=[],l=[];let c=0,f=-1;for(;++f<e.length;){const h=[],g=[];let y=-1;for(e[f].length>c&&(c=e[f].length);++y<e[f].length;){const b=ww(e[f][y]);if(n.alignDelimiters!==!1){const w=i(b);g[y]=w,(l[y]===void 0||w>l[y])&&(l[y]=w)}h.push(b)}a[f]=h,s[f]=g}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)o[u]=qc(r[u]);else{const h=qc(r);for(;++u<c;)o[u]=h}u=-1;const p=[],d=[];for(;++u<c;){const h=o[u];let g="",y="";h===99?(g=":",y=":"):h===108?g=":":h===114&&(y=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[u]-g.length-y.length);const w=g+"-".repeat(b)+y;n.alignDelimiters!==!1&&(b=g.length+b+y.length,b>l[u]&&(l[u]=b),d[u]=b),p[u]=w}a.splice(1,0,p),s.splice(1,0,d),f=-1;const m=[];for(;++f<a.length;){const h=a[f],g=s[f];u=-1;const y=[];for(;++u<c;){const b=h[u]||"";let w="",C="";if(n.alignDelimiters!==!1){const x=l[u]-(g[u]||0),A=o[u];A===114?w=" ".repeat(x):A===99?x%2?(w=" ".repeat(x/2+.5),C=" ".repeat(x/2-.5)):(w=" ".repeat(x/2),C=w):C=" ".repeat(x)}n.delimiterStart!==!1&&!u&&y.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||u)&&y.push(" "),n.alignDelimiters!==!1&&y.push(w),y.push(b),n.alignDelimiters!==!1&&y.push(C),n.padding!==!1&&y.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&y.push("|")}m.push(n.delimiterEnd===!1?y.join("").replace(/ +$/,""):y.join(""))}return m.join(`
|
|
24
|
+
`)}function ww(e){return e==null?"":String(e)}function qc(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function xw(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),kw);return i(),a}function kw(e,t,n){return">"+(n?"":" ")+e}function Sw(e,t){return Kc(e,t.inConstruct,!0)&&!Kc(e,t.notInConstruct,!1)}function Kc(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function Yc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
25
|
+
`&&Sw(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
26
|
+
`}function Ew(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function Cw(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Aw(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Iw(e,t,n,r){const i=Aw(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(Cw(e,n)){const u=n.enter("codeIndented"),p=n.indentLines(o,Tw);return u(),p}const s=n.createTracker(r),l=i.repeat(Math.max(Ew(o,i)+1,3)),c=n.enter("codeFenced");let f=s.move(l);if(e.lang){const u=n.enter(`codeFencedLang${a}`);f+=s.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...s.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${a}`);f+=s.move(" "),f+=s.move(n.safe(e.meta,{before:f,after:`
|
|
27
|
+
`,encode:["`"],...s.current()})),u()}return f+=s.move(`
|
|
28
|
+
`),o&&(f+=s.move(o+`
|
|
29
|
+
`)),f+=s.move(l),c(),f}function Tw(e,t,n){return(n?"":" ")+e}function Io(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function Ow(e,t,n,r){const i=Io(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
30
|
+
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),a(),c}function Dw(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}Qc.peek=Mw;function Qc(e,t,n,r){const i=Dw(n),o=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i),o(),s}function Mw(e,t,n){return n.options.emphasis||"*"}function Pw(e,t){let n=!1;return fo(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,uo}),!!((!e.depth||e.depth<3)&&Xi(e)&&(t.options.setext||n))}function Nw(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Pw(e,n)){const f=n.enter("headingSetext"),u=n.enter("phrasing"),p=n.containerPhrasing(e,{...o.current(),before:`
|
|
31
31
|
`,after:`
|
|
32
|
-
`});return
|
|
33
|
-
`+(
|
|
34
|
-
`))+1))}const a="#".repeat(
|
|
35
|
-
`,...
|
|
36
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,
|
|
37
|
-
`))}function l(d,v,h,g){const m=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:i,after:i});return b(),m(),w}function c(d,v){return sO(d,{align:v,alignDelimiters:r,padding:n,stringLength:o})}function u(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("table");for(;++m<g.length;)b[m]=f(g[m],v,h);return w(),b}function f(d,v,h){const g=d.children;let m=-1;const b=[],w=v.enter("tableRow");for(;++m<g.length;)b[m]=l(g[m],d,v,h);return w(),b}function p(d,v,h){let g=Fv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function GO(){return{exit:{taskListCheckValueChecked:jv,taskListCheckValueUnchecked:jv,paragraph:QO}}}function YO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:JO}}}function jv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function QO(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let i=-1,a;for(;++i<o.length;){const s=o[i];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function JO(e,t,n,r){const o=e.children[0],i=typeof e.checked=="boolean"&&o&&o.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);i&&s.move(a);let l=Fv.listItem(e,t,n,{...r,...s.current()});return i&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function ZO(){return[OT(),zT(),tO(),zO(),GO()]}function XO(e){return{extensions:[IT(),UT(),nO(),qO(e),YO()]}}const eI={tokenize:aI,partial:!0},zv={tokenize:sI,partial:!0},Uv={tokenize:lI,partial:!0},Wv={tokenize:cI,partial:!0},tI={tokenize:uI,partial:!0},Hv={name:"wwwAutolink",tokenize:oI,previous:Kv},Vv={name:"protocolAutolink",tokenize:iI,previous:qv},un={name:"emailAutolink",tokenize:rI,previous:Gv},Yt={};function nI(){return{text:Yt}}let Wn=48;for(;Wn<123;)Yt[Wn]=un,Wn++,Wn===58?Wn=65:Wn===91&&(Wn=97);Yt[43]=un,Yt[45]=un,Yt[46]=un,Yt[95]=un,Yt[72]=[un,Vv],Yt[104]=[un,Vv],Yt[87]=[un,Hv],Yt[119]=[un,Hv];function rI(e,t,n){const r=this;let o,i;return a;function a(f){return!_l(f)||!Gv.call(r,r.previous)||Ml(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return _l(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(tI,u,c)(f):f===45||f===95||lt(f)?(i=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),o=!0,l}function u(f){return i&&o&&ht(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function oI(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Kv.call(r,r.previous)||Ml(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(eI,e.attempt(zv,e.attempt(Uv,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function iI(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&qv.call(r,r.previous)&&!Ml(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(ht(f)&&o.length<5)return o+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const p=o.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),i?c:(i=!0,l)):n(f)}function c(f){return f===null||vi(f)||_e(f)||Un(f)||mi(f)?n(f):e.attempt(zv,e.attempt(Uv,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function aI(e,t,n){let r=0;return o;function o(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),o):a===46&&r===3?(e.consume(a),i):n(a)}function i(a){return a===null?n(a):t(a)}}function sI(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Wv,l,s)(c):c===null||_e(c)||Un(c)||c!==45&&mi(c)?l(c):(i=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(o=r,r=void 0),e.consume(c),a}function l(c){return o||r||!i?n(c):t(c)}}function lI(e,t){let n=0,r=0;return o;function o(a){return a===40?(n++,e.consume(a),o):a===41&&r<n?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(Wv,t,i)(a):a===null||_e(a)||Un(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function cI(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),i):s===93?(e.consume(s),o):s===60||s===null||_e(s)||Un(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||_e(s)||Un(s)?t(s):r(s)}function i(s){return ht(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):ht(s)?(e.consume(s),a):n(s)}}function uI(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return lt(i)?n(i):t(i)}}function Kv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_e(e)}function qv(e){return!ht(e)}function Gv(e){return!(e===47||_l(e))}function _l(e){return e===43||e===45||e===46||e===95||lt(e)}function Ml(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const fI={tokenize:bI,partial:!0};function dI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mI,continuation:{tokenize:gI},exit:yI}},text:{91:{name:"gfmFootnoteCall",tokenize:vI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:pI,resolveTo:hI}}}}function pI(e,t,n){const r=this;let o=r.events.length;const i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;o--;){const l=r.events[o][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=Lt(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!i.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function hI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+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[n+1],e[n+2],["enter",r,t],e[n+3],e[n+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",r,t]];return e.splice(n,e.length-n+1,...s),e}function vI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i=0,a;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(i>999||f===93&&!a||f===null||f===91||_e(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return o.includes(Lt(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return _e(f)||(a=!0),i++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),i++,c):c(f)}}function mI(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let i,a=0,s;return l;function l(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(v)}function u(v){if(a>999||v===93&&!s||v===null||v===91||_e(v))return n(v);if(v===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return i=Lt(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return _e(v)||(s=!0),a++,e.consume(v),v===92?f:u}function f(v){return v===91||v===92||v===93?(e.consume(v),a++,u):u(v)}function p(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),o.includes(i)||o.push(i),we(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function gI(e,t,n){return e.check(io,t,e.attempt(fI,t,n))}function yI(e){e.exit("gfmFootnoteDefinition")}function bI(e,t,n){const r=this;return we(e,o,"gfmFootnoteDefinitionIndent",5);function o(i){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(i):n(i)}}function wI(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:i,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",u,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",f,s]],d=s.parser.constructs.insideSpan.null;d&&Pt(p,p.length,0,yi(d,a.slice(c+1,l),s)),Pt(p,p.length,0,[["exit",f,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",u,s]]),Pt(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function i(a,s,l){const c=this.previous,u=this.events;let f=0;return p;function p(v){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(v):(a.enter("strikethroughSequenceTemporary"),d(v))}function d(v){const h=gi(c);if(v===126)return f>1?l(v):(a.consume(v),f++,d);if(f<2&&!n)return l(v);const g=a.exit("strikethroughSequenceTemporary"),m=gi(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class SI{constructor(){this.map=[]}add(t,n,r){xI(this,t,n,r)}consume(t){if(this.map.sort(function(i,a){return i[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let o=r.pop();for(;o;)t.push(...o),o=r.pop();this.map.length=0}}function xI(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function EI(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const i=r.length-1;r[i]=r[i]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function kI(){return{flow:{null:{name:"table",tokenize:CI,resolveAll:AI}}}}function CI(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let _=r.events.length-1;for(;_>-1;){const B=r.events[_][1].type;if(B==="lineEnding"||B==="linePrefix")_--;else break}const F=_>-1?r.events[_][1].type:null,N=F==="tableHead"||F==="tableRow"?k:l;return N===k&&r.parser.lazy[r.now().line]?n(T):N(T)}function l(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(a=!0,i+=1),u(T)}function u(T){return T===null?n(T):fe(T)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),d):n(T):ge(T)?we(e,u,"whitespace")(T):(i+=1,a&&(a=!1,o+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||_e(T)?(e.exit("data"),u(T)):(e.consume(T),T===92?p:f)}function p(T){return T===92||T===124?(e.consume(T),f):f(T)}function d(T){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(T):(e.enter("tableDelimiterRow"),a=!1,ge(T)?we(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):v(T))}function v(T){return T===45||T===58?g(T):T===124?(a=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),h):x(T)}function h(T){return ge(T)?we(e,g,"whitespace")(T):g(T)}function g(T){return T===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),m):T===45?(i+=1,m(T)):T===null||fe(T)?A(T):x(T)}function m(T){return T===45?(e.enter("tableDelimiterFiller"),b(T)):x(T)}function b(T){return T===45?(e.consume(T),b):T===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(T))}function w(T){return ge(T)?we(e,A,"whitespace")(T):A(T)}function A(T){return T===124?v(T):T===null||fe(T)?!a||o!==i?x(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):x(T)}function x(T){return n(T)}function k(T){return e.enter("tableRow"),$(T)}function $(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),$):T===null||fe(T)?(e.exit("tableRow"),t(T)):ge(T)?we(e,$,"whitespace")(T):(e.enter("data"),R(T))}function R(T){return T===null||T===124||_e(T)?(e.exit("data"),$(T)):(e.consume(T),T===92?H:R)}function H(T){return T===92||T===124?(e.consume(T),R):R(T)}}function AI(e,t){let n=-1,r=!0,o=0,i=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,u,f;const p=new SI;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Yv(p,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",c,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(r=!0,f=void 0,i=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,u={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},p.add(n,0,[["enter",u,t]])),o=v.type==="tableDelimiterRow"?2:u?3:1):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(i[1]!==0&&(a[0]=a[1],f=Ii(p,t,i,o,void 0,f),i=[0,0,0,0]),a[2]=n)):v.type==="tableCellDivider"&&(r?r=!1:(i[1]!==0&&(a[0]=a[1],f=Ii(p,t,i,o,void 0,f)),i=a,a=[i[1],n,0,0])):v.type==="tableHead"?(s=!0,l=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(l=n,i[1]!==0?(a[0]=a[1],f=Ii(p,t,i,o,n,f)):a[1]!==0&&(f=Ii(p,t,a,o,n,f)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Yv(p,t,l,c,u),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=EI(t.events,n))}return e}function Ii(e,t,n,r,o,i){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(i.end=Object.assign({},ur(t.events,n[0])),e.add(n[0],0,[["exit",i,t]]));const l=ur(t.events,n[1]);if(i={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",i,t]]),n[2]!==0){const c=ur(t.events,n[2]),u=ur(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,h=n[3]-n[2]-1;e.add(v,h,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return o!==void 0&&(i.end=Object.assign({},ur(t.events,o)),e.add(o,0,[["exit",i,t]]),i=void 0),i}function Yv(e,t,n,r,o){const i=[],a=ur(t.events,n);o&&(o.end=Object.assign({},a),i.push(["exit",o,t])),r.end=Object.assign({},a),i.push(["exit",r,t]),e.add(n+1,0,i)}function ur(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const $I={name:"tasklistCheck",tokenize:OI};function TI(){return{text:{91:$I}}}function OI(e,t,n){const r=this;return o;function o(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),i)}function i(l){return _e(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return fe(l)?t(l):ge(l)?e.check({tokenize:II},t,n)(l):n(l)}}function II(e,t,n){return we(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function PI(e){return xh([nI(),dI(),wI(e),kI(),TI()])}const DI={};function _I(e){const t=this,n=e||DI,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(PI(n)),i.push(ZO()),a.push(XO(n))}const ve={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},toggleSound:{className:"bpHeaderSoundToggleButton"},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},imageError:{className:"bpMessageBlocksTextImageError"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},error:{container:{className:"bpReset bpErrorContainer"},id:{className:"bpErrorId"},header:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}};/**
|
|
32
|
+
`});return u(),f(),p+`
|
|
33
|
+
`+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
34
|
+
`))+1))}const a="#".repeat(i),s=n.enter("headingAtx"),l=n.enter("phrasing");o.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
35
|
+
`,...o.current()});return/^[\t ]/.test(c)&&(c="&#x"+c.charCodeAt(0).toString(16).toUpperCase()+";"+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),s(),c}Gc.peek=_w;function Gc(e){return e.value||""}function _w(){return"<"}Jc.peek=Lw;function Jc(e,t,n,r){const i=Io(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let s=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(s=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),s(),e.title&&(s=n.enter(`title${o}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),s()),c+=l.move(")"),a(),c}function Lw(){return"!"}Zc.peek=Fw;function Zc(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("![");const c=n.safe(e.alt,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!c||c!==u?l+=s.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function Fw(){return"!"}Xc.peek=Rw;function Xc(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],s=n.compilePattern(a);let l;if(a.atBreak)for(;l=s.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function Rw(){return"`"}function eu(e,t){const n=Xi(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tu.peek=Bw;function tu(e,t,n,r){const i=Io(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(eu(e,n)){const f=n.stack;n.stack=[],s=n.enter("autolink");let u=a.move("<");return u+=a.move(n.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),s(),n.stack=f,u}s=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${o}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),s(),c}function Bw(e,t,n){return eu(e,n)?"<":"["}nu.peek=zw;function nu(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const s=n.createTracker(r);let l=s.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...s.current()});l+=s.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=f,o(),i==="full"||!c||c!==u?l+=s.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function zw(){return"["}function To(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 $w(e){const t=To(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jw(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 ru(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 Uw(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?jw(n):To(n);const s=e.ordered?a==="."?")":".":$w(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),ru(n)===a&&f){let u=-1;for(;++u<e.children.length;){const p=e.children[u];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),c}function Hw(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 Ww(e,t,n,r){const i=Hw(n);let o=n.bulletCurrent||To(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(o+" ".repeat(a-o.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),f);return l(),c;function f(u,p,d){return p?(d?"":" ".repeat(a))+u:(d?o:o+" ".repeat(a-o.length))+u}}function Vw(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const qw=Ar(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Kw(e,t,n,r){return(e.children.some(function(a){return qw(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Yw(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}iu.peek=Qw;function iu(e,t,n,r){const i=Yw(n),o=n.enter("strong"),a=n.createTracker(r);let s=a.move(i+i);return s+=a.move(n.containerPhrasing(e,{before:s,after:i,...a.current()})),s+=a.move(i+i),o(),s}function Qw(e,t,n){return n.options.strong||"*"}function Gw(e,t,n,r){return n.safe(e.value,r)}function Jw(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 Zw(e,t,n){const r=(ru(n)+(n.options.ruleSpaces?" ":"")).repeat(Jw(n));return n.options.ruleSpaces?r.slice(0,-1):r}const ou={blockquote:xw,break:Yc,code:Iw,definition:Ow,emphasis:Qc,hardBreak:Yc,heading:Nw,html:Gc,image:Jc,imageReference:Zc,inlineCode:Xc,link:tu,linkReference:nu,list:Uw,listItem:Ww,paragraph:Vw,root:Kw,strong:iu,text:Gw,thematicBreak:Zw};function Xw(){return{enter:{table:ex,tableData:au,tableHeader:au,tableRow:nx},exit:{codeText:rx,table:tx,tableData:Oo,tableHeader:Oo,tableRow:Oo}}}function ex(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function tx(e){this.exit(e),this.data.inTable=void 0}function nx(e){this.enter({type:"tableRow",children:[]},e)}function Oo(e){this.exit(e)}function au(e){this.enter({type:"tableCell",children:[]},e)}function rx(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ix));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ix(e,t){return t==="|"?t:e}function ox(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
36
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:s}};function a(d,m,h,g){return c(f(d,h,g),d.align)}function s(d,m,h,g){const y=u(d,h,g),b=c([y]);return b.slice(0,b.indexOf(`
|
|
37
|
+
`))}function l(d,m,h,g){const y=h.enter("tableCell"),b=h.enter("phrasing"),w=h.containerPhrasing(d,{...g,before:o,after:o});return b(),y(),w}function c(d,m){return vw(d,{align:m,alignDelimiters:r,padding:n,stringLength:i})}function f(d,m,h){const g=d.children;let y=-1;const b=[],w=m.enter("table");for(;++y<g.length;)b[y]=u(g[y],m,h);return w(),b}function u(d,m,h){const g=d.children;let y=-1;const b=[],w=m.enter("tableRow");for(;++y<g.length;)b[y]=l(g[y],d,m,h);return w(),b}function p(d,m,h){let g=ou.inlineCode(d,m,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function ax(){return{exit:{taskListCheckValueChecked:su,taskListCheckValueUnchecked:su,paragraph:lx}}}function sx(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cx}}}function su(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function lx(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const s=i[o];if(s.type==="paragraph"){a=s;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function cx(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",s=n.createTracker(r);o&&s.move(a);let l=ou.listItem(e,t,n,{...r,...s.current()});return o&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+a}}function ux(){return[jv(),Xv(),pw(),Xw(),ax()]}function fx(e){return{extensions:[Uv(),ew(),hw(),ox(e),sx()]}}const dx={tokenize:bx,partial:!0},lu={tokenize:vx,partial:!0},cu={tokenize:wx,partial:!0},uu={tokenize:xx,partial:!0},px={tokenize:kx,partial:!0},fu={name:"wwwAutolink",tokenize:gx,previous:pu},du={name:"protocolAutolink",tokenize:yx,previous:hu},xt={name:"emailAutolink",tokenize:mx,previous:mu},pt={};function hx(){return{text:pt}}let Wt=48;for(;Wt<123;)pt[Wt]=xt,Wt++,Wt===58?Wt=65:Wt===91&&(Wt=97);pt[43]=xt,pt[45]=xt,pt[46]=xt,pt[95]=xt,pt[72]=[xt,du],pt[104]=[xt,du],pt[87]=[xt,fu],pt[119]=[xt,fu];function mx(e,t,n){const r=this;let i,o;return a;function a(u){return!Do(u)||!mu.call(r,r.previous)||Mo(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(u))}function s(u){return Do(u)?(e.consume(u),s):u===64?(e.consume(u),l):n(u)}function l(u){return u===46?e.check(px,f,c)(u):u===45||u===95||$e(u)?(o=!0,e.consume(u),l):f(u)}function c(u){return e.consume(u),i=!0,l}function f(u){return o&&i&&We(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function gx(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!pu.call(r,r.previous)||Mo(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(dx,e.attempt(lu,e.attempt(cu,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function yx(e,t,n){const r=this;let i="",o=!1;return a;function a(u){return(u===72||u===104)&&hu.call(r,r.previous)&&!Mo(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),s):n(u)}function s(u){if(We(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),s;if(u===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(u),l}return n(u)}function l(u){return u===47?(e.consume(u),o?c:(o=!0,l)):n(u)}function c(u){return u===null||mr(u)||Se(u)||Ht(u)||gr(u)?n(u):e.attempt(lu,e.attempt(cu,f),n)(u)}function f(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function bx(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function vx(e,t,n){let r,i,o;return a;function a(c){return c===46||c===95?e.check(uu,l,s)(c):c===null||Se(c)||Ht(c)||c!==45&&gr(c)?l(c):(o=!0,e.consume(c),a)}function s(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!o?n(c):t(c)}}function wx(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(uu,t,o)(a):a===null||Se(a)||Ht(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function xx(e,t,n){return r;function r(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),r):s===38?(e.consume(s),o):s===93?(e.consume(s),i):s===60||s===null||Se(s)||Ht(s)?t(s):n(s)}function i(s){return s===null||s===40||s===91||Se(s)||Ht(s)?t(s):r(s)}function o(s){return We(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):We(s)?(e.consume(s),a):n(s)}}function kx(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return $e(o)?n(o):t(o)}}function pu(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Se(e)}function hu(e){return!We(e)}function mu(e){return!(e===47||Do(e))}function Do(e){return e===43||e===45||e===46||e===95||$e(e)}function Mo(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Sx={tokenize:Mx,partial:!0};function Ex(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Tx,continuation:{tokenize:Ox},exit:Dx}},text:{91:{name:"gfmFootnoteCall",tokenize:Ix},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Cx,resolveTo:Ax}}}}function Cx(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return s;function s(l){if(!a||!a._balanced)return n(l);const c=at(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!o.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Ax(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},s=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...s),e}function Ix(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return s;function s(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(o>999||u===93&&!a||u===null||u===91||Se(u))return n(u);if(u===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(at(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return Se(u)||(a=!0),o++,e.consume(u),u===92?f:c}function f(u){return u===91||u===92||u===93?(e.consume(u),o++,c):c(u)}}function Tx(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,s;return l;function l(m){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(m){return m===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(m)}function f(m){if(a>999||m===93&&!s||m===null||m===91||Se(m))return n(m);if(m===93){e.exit("chunkString");const h=e.exit("gfmFootnoteDefinitionLabelString");return o=at(r.sliceSerialize(h)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(m),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Se(m)||(s=!0),a++,e.consume(m),m===92?u:f}function u(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}function p(m){return m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),i.includes(o)||i.push(o),ve(e,d,"gfmFootnoteDefinitionWhitespace")):n(m)}function d(m){return t(m)}}function Ox(e,t,n){return e.check(Rn,t,e.attempt(Sx,t,n))}function Dx(e){e.exit("gfmFootnoteDefinition")}function Mx(e,t,n){const r=this;return ve(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Px(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,s){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",f,s],["enter",a[c][1],s],["exit",a[c][1],s],["enter",u,s]],d=s.parser.constructs.insideSpan.null;d&&nt(p,p.length,0,br(d,a.slice(c+1,l),s)),nt(p,p.length,0,[["exit",u,s],["enter",a[l][1],s],["exit",a[l][1],s],["exit",f,s]]),nt(a,c-1,l-c+3,p),l=c+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function o(a,s,l){const c=this.previous,f=this.events;let u=0;return p;function p(m){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(m):(a.enter("strikethroughSequenceTemporary"),d(m))}function d(m){const h=yr(c);if(m===126)return u>1?l(m):(a.consume(m),u++,d);if(u<2&&!n)return l(m);const g=a.exit("strikethroughSequenceTemporary"),y=yr(m);return g._open=!y||y===2&&!!h,g._close=!h||h===2&&!!y,s(m)}}}class Nx{constructor(){this.map=[]}add(t,n,r){_x(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push([...t]),t.length=0;let i=r.pop();for(;i;)t.push(...i),i=r.pop();this.map.length=0}}function _x(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Lx(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function Fx(){return{flow:{null:{name:"table",tokenize:Rx,resolveAll:Bx}}}}function Rx(e,t,n){const r=this;let i=0,o=0,a;return s;function s(I){let O=r.events.length-1;for(;O>-1;){const R=r.events[O][1].type;if(R==="lineEnding"||R==="linePrefix")O--;else break}const F=O>-1?r.events[O][1].type:null,N=F==="tableHead"||F==="tableRow"?A:l;return N===A&&r.parser.lazy[r.now().line]?n(I):N(I)}function l(I){return e.enter("tableHead"),e.enter("tableRow"),c(I)}function c(I){return I===124||(a=!0,o+=1),f(I)}function f(I){return I===null?n(I):fe(I)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),d):n(I):ye(I)?ve(e,f,"whitespace")(I):(o+=1,a&&(a=!1,i+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),u(I)))}function u(I){return I===null||I===124||Se(I)?(e.exit("data"),f(I)):(e.consume(I),I===92?p:u)}function p(I){return I===92||I===124?(e.consume(I),u):u(I)}function d(I){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(I):(e.enter("tableDelimiterRow"),a=!1,ye(I)?ve(e,m,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):m(I))}function m(I){return I===45||I===58?g(I):I===124?(a=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),h):x(I)}function h(I){return ye(I)?ve(e,g,"whitespace")(I):g(I)}function g(I){return I===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),y):I===45?(o+=1,y(I)):I===null||fe(I)?C(I):x(I)}function y(I){return I===45?(e.enter("tableDelimiterFiller"),b(I)):x(I)}function b(I){return I===45?(e.consume(I),b):I===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(I))}function w(I){return ye(I)?ve(e,C,"whitespace")(I):C(I)}function C(I){return I===124?m(I):I===null||fe(I)?!a||i!==o?x(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(I)):x(I)}function x(I){return n(I)}function A(I){return e.enter("tableRow"),T(I)}function T(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),T):I===null||fe(I)?(e.exit("tableRow"),t(I)):ye(I)?ve(e,T,"whitespace")(I):(e.enter("data"),M(I))}function M(I){return I===null||I===124||Se(I)?(e.exit("data"),T(I)):(e.consume(I),I===92?z:M)}function z(I){return I===92||I===124?(e.consume(I),M):M(I)}}function Bx(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],s=!1,l=0,c,f,u;const p=new Nx;for(;++n<e.length;){const d=e[n],m=d[1];d[0]==="enter"?m.type==="tableHead"?(s=!1,l!==0&&(gu(p,t,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",c,t]])):m.type==="tableRow"||m.type==="tableDelimiterRow"?(r=!0,u=void 0,o=[0,0,0,0],a=[0,n+1,0,0],s&&(s=!1,f={type:"tableBody",start:Object.assign({},m.start),end:Object.assign({},m.end)},p.add(n,0,[["enter",f,t]])),i=m.type==="tableDelimiterRow"?2:f?3:1):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],u=Dr(p,t,o,i,void 0,u),o=[0,0,0,0]),a[2]=n)):m.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],u=Dr(p,t,o,i,void 0,u)),o=a,a=[o[1],n,0,0])):m.type==="tableHead"?(s=!0,l=n):m.type==="tableRow"||m.type==="tableDelimiterRow"?(l=n,o[1]!==0?(a[0]=a[1],u=Dr(p,t,o,i,n,u)):a[1]!==0&&(u=Dr(p,t,a,i,n,u)),i=0):i&&(m.type==="data"||m.type==="tableDelimiterMarker"||m.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&gu(p,t,l,c,f),p.consume(t.events),n=-1;++n<t.events.length;){const d=t.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Lx(t.events,n))}return e}function Dr(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(o.end=Object.assign({},nn(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const l=nn(t.events,n[1]);if(o={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const c=nn(t.events,n[2]),f=nn(t.events,n[3]),u={type:s,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const p=t.events[n[2]],d=t.events[n[3]];if(p[1].end=Object.assign({},d[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const m=n[2]+1,h=n[3]-n[2]-1;e.add(m,h,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(o.end=Object.assign({},nn(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function gu(e,t,n,r,i){const o=[],a=nn(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function nn(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const zx={name:"tasklistCheck",tokenize:jx};function $x(){return{text:{91:zx}}}function jx(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),o)}function o(l){return Se(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(l)}function s(l){return fe(l)?t(l):ye(l)?e.check({tokenize:Ux},t,n)(l):n(l)}}function Ux(e,t,n){return ve(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Hx(e){return Hl([hx(),Ex(),Px(e),Fx(),$x()])}const Wx={};function Vx(e){const t=this,n=e||Wx,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Hx(n)),o.push(ux()),a.push(fx(n))}const ge={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"}}},loader:{className:"bpReset bpLoader"},modal:{overlay:{className:"bpModalOverlay"},dialog:{container:{className:"bpReset bpModalContainer"},title:{className:"bpModalTitle"},description:{className:"bpModalDescription"},content:{container:{className:"bpModalContentContainer"},textarea:{className:"bpModalContentTextArea"}},button:{container:{className:"bpModalButtonContainer"},confirm:{className:"bpModalButtonConfirm"},cancel:{className:"bpModalButtonCancel"}}}},messagePreview:{container:{className:"bpMessagePreviewContainer"},message:{className:"bpMessagePreviewMessage"},description:{className:"bpMessagePreviewDescription"},closeButton:{className:"bpMessagePreviewCloseButton"},avatar:{container:{className:"bpMessagePreviewAvatarContainer"},image:{className:"bpMessagePreviewAvatarImage"},fallback:{className:"bpMessagePreviewAvatarFallback"}}},fab:{container:{className:"bpReset bpFabContainer"},icon:{className:"bpFabIcon"},image:{className:"bpFabImage"}},notification:{container:{className:"bpReset bpNotificationContainer"},title:{className:"bpNotificationTitle"},description:{className:"bpNotificationDescription"},icon:{className:"bpNotificationIcon"},closeIcon:{className:"bpNotificationCloseIcon"}},header:{container:{className:"bpReset bpHeaderContainer bpFont"},content:{container:{className:"bpReset bpHeaderContentContainer"},title:{className:"bpHeaderContentTitle"},description:{className:"bpHeaderContentDescription"},avatar:{container:{className:"bpReset bpHeaderContentAvatarContainer"},image:{className:"bpHeaderContentAvatarImage"},fallback:{className:"bpHeaderContentAvatarFallback"}},toggleSound:{className:"bpHeaderSoundToggleButton"},actions:{container:{className:"bpReset bpHeaderContentActionsContainer"},icons:{className:"bpHeaderContentActionsIcons"}}},expandedContent:{container:{className:"bpReset bpHeaderExpandedContentContainer"},descriptionItems:{container:{className:"bpReset bpHeaderExpandedContentDescriptionItemsContainer"},icon:{className:"bpHeaderExpandedContentDescriptionItemsIcon"},text:{className:"bpHeaderExpandedContentDescriptionItemsText"},link:{className:"bpHeaderExpandedContentDescriptionItemsLink"}},group:{className:"bpHeaderExpandedContentGroup"}},newConversationIcon:{className:"bpHeaderNewConversationIcon"}},composer:{wrapper:{className:"bpReset bpComposerWrapper"},container:{className:"bpReset bpComposerContainer bpFont"},footer:{className:"bpComposerFooter"},inputContainer:{className:"bpComposerInputContainer"},input:{className:"bpComposerInput"},sendbutton:{className:"bpComposerSendButton"},uploadButton:{className:"bpComposerUploadButton"},voiceButton:{className:"bpComposerVoiceButton"},fileContainer:{className:"bpComposerFileContainer"},fileWidget:{container:{className:"bpComposerFileAttachement"},loader:{className:"bpComposerFileLoader"},fileIcon:{container:{className:"bpComposerFileIconWrapper"},icon:{className:"bpComposerFileIcon"}},metadata:{container:{className:"bpComposerFileMetadata"},name:{className:"bpComposerFileName"},type:{className:"bpComposerFileExtension"}},removeIcon:{className:"bpComposerFileRemoveIcon"},errorIcon:{className:"bpComposerFileErrorIcon"},previewImage:{className:"bpComposerFilePreviewImage"}}},messageList:{scrollDownButton:{className:"bpMessageListScrollDownButton"},container:{className:"bpReset bpMessageListContainer bpFont"},viewPort:{className:"bpMessageListViewport"},marquee:{container:{className:"bpReset bpMessageListMarqueeContainer"},content:{className:"bpMessageListMarqueeContent"},title:{className:"bpMessageListMarqueeTitle"},description:{className:"bpMessageListMarqueeDescription"},avatar:{container:{className:"bpReset bpMessageListMarqueeAvatarContainer"},image:{className:"bpMessageListMarqueeAvatarImage"},fallback:{className:"bpMessageListMarqueeAvatarFallback"}}},headerMessage:{className:"bpMessageListHeaderMessage"}},message:{container:{className:"bpReset bpMessageContainer"},avatar:{container:{className:"bpReset bpMessageAvatarContainer"},image:{className:"bpMessageAvatarImage"},fallback:{className:"bpMessageAvatarFallback"}},deliveryStatus:{className:"bpMessageDeliveryStatus"},blocks:{text:{heading1:{className:"bpMessageBlocksTextHeading1"},heading2:{className:"bpMessageBlocksTextHeading2"},heading3:{className:"bpMessageBlocksTextHeading3"},heading4:{className:"bpMessageBlocksTextHeading4"},unorderedList:{className:"bpMessageBlocksTextUnorderedList"},orderedList:{className:"bpMessageBlocksTextOrderedList"},listItem:{className:"bpMessageBlocksTextListItem"},link:{className:"bpMessageBlocksTextLink"},italic:{className:"bpMessageBlocksTextItalic"},bold:{className:"bpMessageBlocksTextBold"},text:{className:"bpMessageBlocksTextText"},image:{className:"bpMessageBlocksTextImage"},imageError:{className:"bpMessageBlocksTextImageError"},horizontalRule:{className:"bpMessageBlocksTextHorizontalRule"},lineBreak:{className:"bpMessageBlocksTextLineBreak"},input:{className:"bpMessageBlocksTextInput"},codeBlockContainer:{className:"bpMessageBlocksTextCodeBlockContainer"},codeBlockTitle:{className:"bpMessageBlocksTextCodeBlockTitle"},codeBlockCopyIcon:{className:"bpMessageBlocksTextCodeBlockCopyIcon"},codeBlock:{className:"bpMessageBlocksTextCodeBlock"},code:{className:"bpMessageBlocksTextCode"},tableContainer:{className:"bpMessageBlocksTextTableContainer"},table:{className:"bpMessageBlocksTextTable"},tableHeader:{className:"bpMessageBlocksTextTableHeader"},tableData:{className:"bpMessageBlocksTextTableData"},tableRow:{className:"bpMessageBlocksTextTableRow"}},audio:{className:"bpMessageBlocksAudio"},image:{image:{className:"bpMessageBlocksImageImage"},placeholder:{className:"bpMessageBlocksImagePlaceholder"},skeleton:{className:"bpSkeleton"}},video:{className:"bpMessageBlocksVideo"},location:{container:{className:"bpMessageBlocksLocationContainer"},title:{className:"bpMessageBlocksLocationTitle"},icon:{className:"bpMessageBlocksLocationIcon"}},file:{container:{className:"bpMessageBlocksFileContainer"},title:{className:"bpMessageBlocksFileTitle"},icon:{className:"bpMessageBlocksFileIcon"}},row:{className:"bpMessageBlocksRow"},column:{className:"bpMessageBlocksColumn"},bubble:{container:{className:"bpMessageBlocksBubble"},feedbackContainer:{className:"bpMessageBlocksBubbleFeedbackContainer"},feedbackIcon:{className:"bpMessageBlocksBubbleFeedbackIcon"}},carousel:{container:{className:"bpMessageBlocksCarouselContainer"},slidesContainer:{className:"bpMessageBlocksCarouselSlidesContainer"},backButton:{className:"bpMessageBlocksCarouselBackButton"},nextButton:{className:"bpMessageBlocksCarouselNextButton"}},dropdown:{button:{container:{className:"bpMessageBlocksDropdownButtonContainer"},text:{className:"bpMessageBlocksDropdownButtonText"},icon:{className:"bpMessageBlocksDropdownButtonIcon"}},content:{container:{className:"bpMessageBlocksDropdownContentContainer"},item:{className:"bpMessageBlocksDropdownContentItem"}}},button:{className:"bpMessageBlocksButton"}}},error:{container:{className:"bpReset bpErrorContainer"},id:{className:"bpErrorId"},header:{container:{className:"bpErrorHeader"},actions:{className:"bpErrorHeaderActions"}},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}},proactiveBubble:{container:{className:"bpProactiveBubbleContainer"},content:{className:"bpProactiveBubbleContent"},layout:{className:"bpProactiveBubbleLayout"},icon:{className:"bpProactiveBubbleIcon"},message:{className:"bpProactiveBubbleMessage"},closeButton:{className:"bpProactiveBubbleCloseButton"},arrow:{className:"bpProactiveBubbleArrow"}}};/**
|
|
38
38
|
* @license lucide-react v0.525.0 - ISC
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the ISC license.
|
|
41
41
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/const
|
|
42
|
+
*/const qx=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kx=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),yu=e=>{const t=Kx(e);return t.charAt(0).toUpperCase()+t.slice(1)},bu=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Yx=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
43
43
|
* @license lucide-react v0.525.0 - ISC
|
|
44
44
|
*
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
|
-
*/var
|
|
47
|
+
*/var Qx={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
48
48
|
* @license lucide-react v0.525.0 - ISC
|
|
49
49
|
*
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
|
-
*/const
|
|
52
|
+
*/const Gx=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...s},l)=>P.createElement("svg",{ref:l,...Qx,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:bu("lucide",i),...!o&&!Yx(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,f])=>P.createElement(c,f)),...Array.isArray(o)?o:[o]]));/**
|
|
53
53
|
* @license lucide-react v0.525.0 - ISC
|
|
54
54
|
*
|
|
55
55
|
* This source code is licensed under the ISC license.
|
|
56
56
|
* See the LICENSE file in the root directory of this source tree.
|
|
57
|
-
*/const
|
|
57
|
+
*/const we=(e,t)=>{const n=P.forwardRef(({className:r,...i},o)=>P.createElement(Gx,{ref:o,iconNode:t,className:bu(`lucide-${qx(yu(e))}`,`lucide-${e}`,r),...i}));return n.displayName=yu(e),n};/**
|
|
58
58
|
* @license lucide-react v0.525.0 - ISC
|
|
59
59
|
*
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
|
-
*/const
|
|
62
|
+
*/const Jx=we("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
|
|
63
63
|
* @license lucide-react v0.525.0 - ISC
|
|
64
64
|
*
|
|
65
65
|
* This source code is licensed under the ISC license.
|
|
66
66
|
* See the LICENSE file in the root directory of this source tree.
|
|
67
|
-
*/const
|
|
67
|
+
*/const vu=we("bot-off",[["path",{d:"M13.67 8H18a2 2 0 0 1 2 2v4.33",key:"7az073"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M22 22 2 2",key:"1r8tn9"}],["path",{d:"M8 8H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 1.414-.586",key:"s09a7a"}],["path",{d:"M9 13v2",key:"rq6x2g"}],["path",{d:"M9.67 4H12v2.33",key:"110xot"}]]);/**
|
|
68
68
|
* @license lucide-react v0.525.0 - ISC
|
|
69
69
|
*
|
|
70
70
|
* This source code is licensed under the ISC license.
|
|
71
71
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
|
-
*/const
|
|
72
|
+
*/const Zx=we("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
73
73
|
* @license lucide-react v0.525.0 - ISC
|
|
74
74
|
*
|
|
75
75
|
* This source code is licensed under the ISC license.
|
|
76
76
|
* See the LICENSE file in the root directory of this source tree.
|
|
77
|
-
*/const
|
|
77
|
+
*/const Xx=we("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
78
78
|
* @license lucide-react v0.525.0 - ISC
|
|
79
79
|
*
|
|
80
80
|
* This source code is licensed under the ISC license.
|
|
81
81
|
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const
|
|
82
|
+
*/const e0=we("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
83
83
|
* @license lucide-react v0.525.0 - ISC
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the ISC license.
|
|
86
86
|
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const
|
|
87
|
+
*/const t0=we("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
88
88
|
* @license lucide-react v0.525.0 - ISC
|
|
89
89
|
*
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const
|
|
92
|
+
*/const n0=we("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/**
|
|
93
93
|
* @license lucide-react v0.525.0 - ISC
|
|
94
94
|
*
|
|
95
95
|
* This source code is licensed under the ISC license.
|
|
96
96
|
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const
|
|
97
|
+
*/const wu=we("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
98
98
|
* @license lucide-react v0.525.0 - ISC
|
|
99
99
|
*
|
|
100
100
|
* This source code is licensed under the ISC license.
|
|
101
101
|
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/const
|
|
102
|
+
*/const r0=we("cloud-upload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]);/**
|
|
103
103
|
* @license lucide-react v0.525.0 - ISC
|
|
104
104
|
*
|
|
105
105
|
* This source code is licensed under the ISC license.
|
|
106
106
|
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const
|
|
107
|
+
*/const i0=we("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/**
|
|
108
108
|
* @license lucide-react v0.525.0 - ISC
|
|
109
109
|
*
|
|
110
110
|
* This source code is licensed under the ISC license.
|
|
111
111
|
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const
|
|
112
|
+
*/const o0=we("file-down",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M12 18v-6",key:"17g6i2"}],["path",{d:"m9 15 3 3 3-3",key:"1npd3o"}]]);/**
|
|
113
113
|
* @license lucide-react v0.525.0 - ISC
|
|
114
114
|
*
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const
|
|
117
|
+
*/const xu=we("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
|
|
118
118
|
* @license lucide-react v0.525.0 - ISC
|
|
119
119
|
*
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const
|
|
122
|
+
*/const a0=we("files",[["path",{d:"M20 7h-3a2 2 0 0 1-2-2V2",key:"x099mo"}],["path",{d:"M9 18a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h7l4 4v10a2 2 0 0 1-2 2Z",key:"18t6ie"}],["path",{d:"M3 7.6v12.8A1.6 1.6 0 0 0 4.6 22h9.8",key:"1nja0z"}]]);/**
|
|
123
123
|
* @license lucide-react v0.525.0 - ISC
|
|
124
124
|
*
|
|
125
125
|
* This source code is licensed under the ISC license.
|
|
126
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const
|
|
127
|
+
*/const s0=we("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
|
|
128
128
|
* @license lucide-react v0.525.0 - ISC
|
|
129
129
|
*
|
|
130
130
|
* This source code is licensed under the ISC license.
|
|
131
131
|
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const
|
|
132
|
+
*/const ku=we("image-off",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M10.41 10.41a2 2 0 1 1-2.83-2.83",key:"1bzlo9"}],["line",{x1:"13.5",x2:"6",y1:"13.5",y2:"21",key:"1q0aeu"}],["line",{x1:"18",x2:"21",y1:"12",y2:"15",key:"5mozeu"}],["path",{d:"M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59",key:"mmje98"}],["path",{d:"M21 15V5a2 2 0 0 0-2-2H9",key:"43el77"}]]);/**
|
|
133
133
|
* @license lucide-react v0.525.0 - ISC
|
|
134
134
|
*
|
|
135
135
|
* This source code is licensed under the ISC license.
|
|
136
136
|
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const
|
|
137
|
+
*/const l0=we("image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]);/**
|
|
138
138
|
* @license lucide-react v0.525.0 - ISC
|
|
139
139
|
*
|
|
140
140
|
* This source code is licensed under the ISC license.
|
|
141
141
|
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const
|
|
142
|
+
*/const c0=we("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
|
|
143
143
|
* @license lucide-react v0.525.0 - ISC
|
|
144
144
|
*
|
|
145
145
|
* This source code is licensed under the ISC license.
|
|
146
146
|
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const
|
|
147
|
+
*/const u0=we("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]]);/**
|
|
148
148
|
* @license lucide-react v0.525.0 - ISC
|
|
149
149
|
*
|
|
150
150
|
* This source code is licensed under the ISC license.
|
|
151
151
|
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const
|
|
152
|
+
*/const f0=we("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/**
|
|
153
153
|
* @license lucide-react v0.525.0 - ISC
|
|
154
154
|
*
|
|
155
155
|
* This source code is licensed under the ISC license.
|
|
156
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const
|
|
157
|
+
*/const d0=we("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);/**
|
|
158
158
|
* @license lucide-react v0.525.0 - ISC
|
|
159
159
|
*
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const
|
|
162
|
+
*/const p0=we("monitor-cog",[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]);/**
|
|
163
163
|
* @license lucide-react v0.525.0 - ISC
|
|
164
164
|
*
|
|
165
165
|
* This source code is licensed under the ISC license.
|
|
166
166
|
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const
|
|
167
|
+
*/const h0=we("phone",[["path",{d:"M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",key:"9njp5v"}]]);/**
|
|
168
168
|
* @license lucide-react v0.525.0 - ISC
|
|
169
169
|
*
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const
|
|
172
|
+
*/const m0=we("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
173
173
|
* @license lucide-react v0.525.0 - ISC
|
|
174
174
|
*
|
|
175
175
|
* This source code is licensed under the ISC license.
|
|
176
176
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const
|
|
177
|
+
*/const g0=we("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/**
|
|
178
178
|
* @license lucide-react v0.525.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const
|
|
182
|
+
*/const y0=we("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]]);/**
|
|
183
183
|
* @license lucide-react v0.525.0 - ISC
|
|
184
184
|
*
|
|
185
185
|
* This source code is licensed under the ISC license.
|
|
186
186
|
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const
|
|
187
|
+
*/const b0=we("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]]);/**
|
|
188
188
|
* @license lucide-react v0.525.0 - ISC
|
|
189
189
|
*
|
|
190
190
|
* This source code is licensed under the ISC license.
|
|
191
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const
|
|
192
|
+
*/const v0=we("unplug",[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]);/**
|
|
193
193
|
* @license lucide-react v0.525.0 - ISC
|
|
194
194
|
*
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const
|
|
197
|
+
*/const w0=we("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]);/**
|
|
198
198
|
* @license lucide-react v0.525.0 - ISC
|
|
199
199
|
*
|
|
200
200
|
* This source code is licensed under the ISC license.
|
|
201
201
|
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const
|
|
202
|
+
*/const Su=we("volume-2",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["path",{d:"M16 9a5 5 0 0 1 0 6",key:"1q6k2b"}],["path",{d:"M19.364 18.364a9 9 0 0 0 0-12.728",key:"ijwkga"}]]);/**
|
|
203
203
|
* @license lucide-react v0.525.0 - ISC
|
|
204
204
|
*
|
|
205
205
|
* This source code is licensed under the ISC license.
|
|
206
206
|
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const
|
|
207
|
+
*/const x0=we("volume-x",[["path",{d:"M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",key:"uqj9uw"}],["line",{x1:"22",x2:"16",y1:"9",y2:"15",key:"1ewh16"}],["line",{x1:"16",x2:"22",y1:"9",y2:"15",key:"5ykzw1"}]]);/**
|
|
208
208
|
* @license lucide-react v0.525.0 - ISC
|
|
209
209
|
*
|
|
210
210
|
* This source code is licensed under the ISC license.
|
|
211
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const
|
|
212
|
+
*/const k0=we("wifi-off",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);/**
|
|
213
213
|
* @license lucide-react v0.525.0 - ISC
|
|
214
214
|
*
|
|
215
215
|
* This source code is licensed under the ISC license.
|
|
216
216
|
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const
|
|
217
|
+
*/const Eu=we("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),S0=({text:e})=>{const{message:{blocks:{text:t}}}=ge,[n,r]=P.useState(new Map);function i(a){if(n.has(a))return;const s=new Image;s.src=a,s.onerror=()=>{r(l=>new Map(l).set(a,!0))},s.onload=()=>{r(l=>new Map(l).set(a,!1))}}P.useEffect(()=>{const a=/!\[.*?\]\((.*?)\)/g,s=[];let l;for(;(l=a.exec(e))!==null;){const c=l[1];c&&!s.includes(c)&&s.push(c)}s.forEach(c=>{i(c)})},[e]);const o={h1:({node:a,...s})=>k.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>k.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>k.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>k.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>k.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>k.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>k.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>k.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...c})=>k.jsx("a",{...c,...t.link,onMouseUp:f=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?k.jsx("div",{"data-error":!0,...t.image,children:k.jsx(ku,{strokeWidth:"1"})}):k.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>k.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>k.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>k.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>k.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var m,h;const l=a==null?void 0:a.children[0],c=E0(((h=(m=l==null?void 0:l.properties)==null?void 0:m.className)==null?void 0:h[0])||""),[f,u]=P.useState(!1),p=P.useRef(null),d=()=>{if(!p.current)return;const g=p.current.textContent||"";navigator.clipboard.writeText(g).then(()=>{u(!0),setTimeout(()=>{u(!1)},1500)}).catch(y=>{console.error("Failed to copy code to clipboard:",y)})};return k.jsxs("div",{...t.codeBlockContainer,children:[k.jsxs("div",{...t.codeBlockTitle,children:[c?k.jsx("span",{children:c}):"Code",f?k.jsx(Zx,{...t.codeBlockCopyIcon}):k.jsx(a0,{...t.codeBlockCopyIcon,onClick:d})]}),k.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>k.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>k.jsx("code",{...s,...t.code}),table:({node:a,...s})=>k.jsx("div",{...t.tableContainer,children:k.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>k.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>k.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>k.jsx("td",{...s,...t.tableData})};return k.jsx(zc,{urlTransform:a=>a.startsWith("tel:")?a:$c(a),components:o,remarkPlugins:[Vx,$v],children:e})},E0=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},C0={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Cu=e=>{let t;const n=new Set,r=(f,u)=>{const p=typeof f=="function"?f(t):f;if(!Object.is(p,t)){const d=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(m=>m(t,d))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>c,subscribe:f=>(n.add(f),()=>n.delete(f)),destroy:()=>{(C0?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},c=t=e(r,i,l);return l},A0=e=>e?Cu(e):Cu;var Po={exports:{}},No={},Mr={exports:{}},_o={};/**
|
|
218
218
|
* @license React
|
|
219
219
|
* use-sync-external-store-shim.production.min.js
|
|
220
220
|
*
|
|
@@ -222,7 +222,7 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
|
|
|
222
222
|
*
|
|
223
223
|
* This source code is licensed under the MIT license found in the
|
|
224
224
|
* LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/var
|
|
225
|
+
*/var Au;function I0(){if(Au)return _o;Au=1;var e=P;function t(u,p){return u===p&&(u!==0||1/u===1/p)||u!==u&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function s(u,p){var d=p(),m=r({inst:{value:d,getSnapshot:p}}),h=m[0].inst,g=m[1];return o(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[u,d,p]),i(function(){return l(h)&&g({inst:h}),u(function(){l(h)&&g({inst:h})})},[u]),a(d),d}function l(u){var p=u.getSnapshot;u=u.value;try{var d=p();return!n(u,d)}catch{return!0}}function c(u,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return _o.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,_o}var Lo={};/**
|
|
226
226
|
* @license React
|
|
227
227
|
* use-sync-external-store-shim.development.js
|
|
228
228
|
*
|
|
@@ -230,7 +230,7 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
|
|
|
230
230
|
*
|
|
231
231
|
* This source code is licensed under the MIT license found in the
|
|
232
232
|
* LICENSE file in the root directory of this source tree.
|
|
233
|
-
*/var
|
|
233
|
+
*/var Iu;function T0(){return Iu||(Iu=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=P,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var C=arguments.length,x=new Array(C>1?C-1:0),A=1;A<C;A++)x[A-1]=arguments[A];r("error",w,x)}}function r(w,C,x){{var A=t.ReactDebugCurrentFrame,T=A.getStackAddendum();T!==""&&(C+="%s",x=x.concat([T]));var M=x.map(function(z){return String(z)});M.unshift("Warning: "+C),Function.prototype.apply.call(console[w],console,M)}}function i(w,C){return w===C&&(w!==0||1/w===1/C)||w!==w&&C!==C}var o=typeof Object.is=="function"?Object.is:i,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,f=!1,u=!1;function p(w,C,x){f||e.startTransition!==void 0&&(f=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var A=C();if(!u){var T=C();o(A,T)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}var M=a({inst:{value:A,getSnapshot:C}}),z=M[0].inst,I=M[1];return l(function(){z.value=A,z.getSnapshot=C,d(z)&&I({inst:z})},[w,A,C]),s(function(){d(z)&&I({inst:z});var O=function(){d(z)&&I({inst:z})};return w(O)},[w]),c(A),A}function d(w){var C=w.getSnapshot,x=w.value;try{var A=C();return!o(x,A)}catch{return!0}}function m(w,C,x){return C()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,y=g?m:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:y;Lo.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Lo}var Tu;function Ou(){return Tu||(Tu=1,process.env.NODE_ENV==="production"?Mr.exports=I0():Mr.exports=T0()),Mr.exports}/**
|
|
234
234
|
* @license React
|
|
235
235
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
236
236
|
*
|
|
@@ -238,7 +238,7 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
|
|
|
238
238
|
*
|
|
239
239
|
* This source code is licensed under the MIT license found in the
|
|
240
240
|
* LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/var
|
|
241
|
+
*/var Du;function O0(){if(Du)return No;Du=1;var e=P,t=Ou();function n(c,f){return c===f&&(c!==0||1/c===1/f)||c!==c&&f!==f}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return No.useSyncExternalStoreWithSelector=function(c,f,u,p,d){var m=o(null);if(m.current===null){var h={hasValue:!1,value:null};m.current=h}else h=m.current;m=s(function(){function y(A){if(!b){if(b=!0,w=A,A=p(A),d!==void 0&&h.hasValue){var T=h.value;if(d(T,A))return C=T}return C=A}if(T=C,r(w,A))return T;var M=p(A);return d!==void 0&&d(T,M)?T:(w=A,C=M)}var b=!1,w,C,x=u===void 0?null:u;return[function(){return y(f())},x===null?void 0:function(){return y(x())}]},[f,u,p,d]);var g=i(c,m[0],m[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},No}var Fo={};/**
|
|
242
242
|
* @license React
|
|
243
243
|
* use-sync-external-store-shim/with-selector.development.js
|
|
244
244
|
*
|
|
@@ -246,61 +246,62 @@ Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",mes
|
|
|
246
246
|
*
|
|
247
247
|
* This source code is licensed under the MIT license found in the
|
|
248
248
|
* LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/var
|
|
249
|
+
*/var Mu;function D0(){return Mu||(Mu=1,process.env.NODE_ENV!=="production"&&function(){typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=P,t=Ou();function n(f,u){return f===u&&(f!==0||1/f===1/u)||f!==f&&u!==u}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(f,u,p,d,m){var h=o(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var y=s(function(){var x=!1,A,T,M=function(F){if(!x){x=!0,A=F;var N=d(F);if(m!==void 0&&g.hasValue){var R=g.value;if(m(R,N))return T=R,R}return T=N,N}var D=A,_=T;if(r(D,F))return _;var U=d(F);return m!==void 0&&m(_,U)?_:(A=F,T=U,U)},z=p===void 0?null:p,I=function(){return M(u())},O=z===null?void 0:function(){return M(z())};return[I,O]},[u,p,d,m]),b=y[0],w=y[1],C=i(f,b,w);return a(function(){g.hasValue=!0,g.value=C},[C]),l(C),C}Fo.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fo}process.env.NODE_ENV==="production"?Po.exports=O0():Po.exports=D0();var M0=Po.exports;const P0=Jt(M0),Pu={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:N0}=P,{useSyncExternalStoreWithSelector:_0}=P0;let Nu=!1;const L0=e=>e;function F0(e,t=L0,n){(Pu?"production":void 0)!=="production"&&n&&!Nu&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),Nu=!0);const r=_0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return N0(r),r}const R0=e=>{(Pu?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?A0(e):e,n=(r,i)=>F0(t,r,i);return Object.assign(n,t),n},Dt=e=>R0,Pr={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Ro=new Map,Nr=e=>{const t=Ro.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},B0=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Ro.get(n.name);if(r)return{type:"tracked",store:e,...r};const i={connection:t.connect(n),stores:{}};return Ro.set(n.name,i),{type:"tracked",store:e,...i}},Un=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:a,store:s,...l}=t;let c;try{c=(o??(Pr?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Pr?"production":void 0)!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const{connection:f,...u}=B0(s,c,l);let p=!0;i.setState=(h,g,y)=>{const b=n(h,g);if(!p)return b;const w=y===void 0?{type:a||"anonymous"}:typeof y=="string"?{type:y}:y;return s===void 0?(f==null||f.send(w,r()),b):(f==null||f.send({...w,type:`${s}/${w.type}`},{...Nr(l.name),[s]:i.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},m=e(i.setState,r,i);if(u.type==="untracked"?f==null||f.init(m):(u.stores[u.store]=i,f==null||f.init(Object.fromEntries(Object.entries(u.stores).map(([h,g])=>[h,h===u.store?m:g.getState()])))),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let h=!1;const g=i.dispatch;i.dispatch=(...y)=>{(Pr?"production":void 0)!=="production"&&y[0].type==="__setState"&&!h&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),h=!0),g(...y)}}return f.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return Bo(h.payload,y=>{if(y.type==="__setState"){if(s===void 0){d(y.state);return}Object.keys(y.state).length!==1&&console.error(`
|
|
250
250
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
251
251
|
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
|
252
252
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
253
|
-
`);const b=m.state[s];if(b==null)return;JSON.stringify(o.getState())!==JSON.stringify(b)&&d(b);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(m)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(v),s===void 0?u==null?void 0:u.init(o.getState()):u==null?void 0:u.init(_i(l.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(_i(l.name));case"ROLLBACK":return zl(h.state,m=>{if(s===void 0){d(m),u==null||u.init(o.getState());return}d(m[s]),u==null||u.init(_i(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return zl(h.state,m=>{if(s===void 0){d(m);return}JSON.stringify(o.getState())!==JSON.stringify(m[s])&&d(m[s])});case"IMPORT_STATE":{const{nextLiftedState:m}=h.payload,b=(g=m.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),u==null||u.send(null,m);return}case"PAUSE_RECORDING":return p=!p}return}}),v},zl=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function Ul(e,t){let n;try{n=e()}catch{return}return{getItem:o=>{var i;const a=l=>l===null?null:JSON.parse(l,void 0),s=(i=n.getItem(o))!=null?i:null;return s instanceof Promise?s.then(a):a(s)},setItem:(o,i)=>n.setItem(o,JSON.stringify(i,void 0)),removeItem:o=>n.removeItem(o)}}const fo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return fo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return fo(r)(n)}}}},$P=(e,t)=>(n,r,o)=>{let i={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,m)=>({...m,...g}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=i.getStorage()}catch{}if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...g)},r,o);const u=fo(i.serialize),f=()=>{const g=i.partialize({...r()});let m;const b=u({state:g,version:i.version}).then(w=>c.setItem(i.name,w)).catch(w=>{m=w});if(m)throw m;return b},p=o.setState;o.setState=(g,m)=>{p(g,m),f()};const d=e((...g)=>{n(...g),f()},r,o);let v;const h=()=>{var g;if(!c)return;a=!1,s.forEach(b=>b(r()));const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,r()))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)return i.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return i.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return v=i.merge(b,(w=r())!=null?w:d),n(v,!0),f()}).then(()=>{m==null||m(v,void 0),a=!0,l.forEach(b=>b(v))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:g=>{i={...i,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),v||d},TP=(e,t)=>(n,r,o)=>{let i={storage:Ul(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let c=i.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...h)},r,o);const u=()=>{const h=i.partialize({...r()});return c.setItem(i.name,{state:h,version:i.version})},f=o.setState;o.setState=(h,g)=>{f(h,g),u()};const p=e((...h)=>{n(...h),u()},r,o);o.getInitialState=()=>p;let d;const v=()=>{var h,g;if(!c)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const m=((g=i.onRehydrateStorage)==null?void 0:g.call(i,(h=r())!=null?h:p))||void 0;return fo(c.getItem.bind(c))(i.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==i.version){if(i.migrate)return[!0,i.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[A,x]=b;if(d=i.merge(x,(w=r())!=null?w:p),n(d,!0),A)return u()}).then(()=>{m==null||m(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{m==null||m(void 0,b)})};return o.persist={setOptions:h=>{i={...i,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>v(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},i.skipHydration||v(),d||p},Mi=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Di?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),$P(e,t)):TP(e,t),pm=xn()(uo(Mi(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Ni;const OP=new Uint8Array(16);function IP(){if(!Ni&&(Ni=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Ni))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ni(OP)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));function PP(e,t=0){return rt[e[t+0]]+rt[e[t+1]]+rt[e[t+2]]+rt[e[t+3]]+"-"+rt[e[t+4]]+rt[e[t+5]]+"-"+rt[e[t+6]]+rt[e[t+7]]+"-"+rt[e[t+8]]+rt[e[t+9]]+"-"+rt[e[t+10]]+rt[e[t+11]]+rt[e[t+12]]+rt[e[t+13]]+rt[e[t+14]]+rt[e[t+15]]}const hm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function DP(e,t,n){if(hm.randomUUID&&!t&&!e)return hm.randomUUID();e=e||{};const r=e.random||(e.rng||IP)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,PP(r)}function Ri(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:o,disableInput:i}=vm(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:o,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:i,metadata:t}}const vm=e=>{switch(e.type){case"audio":return mm(e);case"card":return _P(e);case"carousel":return MP(e);case"choice":return NP(e);case"dropdown":return RP(e);case"file":return gm(e);case"image":return ym(e);case"location":return bm(e);case"markdown":return wm(e);case"text":return Sm(e);case"video":return xm(e);case"bloc":return LP(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},po=e=>({block:e,type:"bubble"}),mm=e=>({payload:{type:"audio",url:e.audioUrl}}),_P=e=>({payload:po(Em(e))}),MP=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Em({type:"card",...t}))}}),NP=e=>{const t=e.options.map(i=>({title:i.label,value:i.value})),n=e.text,r=DP(),o=po({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:o}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[o,{type:"row",blocks:t.map(({title:i,value:a})=>({type:"button",variant:"action",text:i,buttonValue:a,groupId:r}))}]}}},RP=e=>{const t=e.options.map(o=>({label:o.label,value:o.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:po({type:"column",blocks:r})}},gm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),ym=e=>({payload:{type:"image",url:e.imageUrl}}),bm=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),wm=e=>({payload:po({type:"text",text:e.markdown})}),Sm=e=>({payload:po({type:"text",text:e.text,value:e.value})}),xm=e=>({payload:{type:"video",url:e.videoUrl}}),LP=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return mm({...n.payload,type:n.type}).payload;case"file":return gm({...n.payload,type:n.type}).payload;case"image":return ym({...n.payload,type:n.type}).payload;case"location":return bm({...n.payload,type:n.type}).payload;case"markdown":return wm({...n.payload,type:n.type}).payload;case"text":return Sm({...n.payload,type:n.type}).payload;case"video":return xm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Em=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,o=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),i=[];return r&&i.push({type:"image",url:r}),t&&i.push({type:"text",text:`#### ${t}`}),n&&i.push({type:"text",text:n}),o.length>0&&i.push({type:"row",blocks:o}),{type:"column",horizontalAlignment:"center",blocks:[...i]}},Hn=xn()(uo(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var o;const r=(o=t.metadata)==null?void 0:o.clientMessageId;if(r){const i=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[i];if(i!==-1)return{messages:[...n.slice(0,i),{...a,...t},...n.slice(i+1)]}}return{messages:[...n.filter(i=>i.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(o=>o.id===t?{...o,...n}:o)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});let o;do{const{messages:i,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:o});r.push(...i),o=a.nextToken}while(o);return e({isFetching:!1}),r.reverse().map(i=>Ri(i)).filter(Boolean)}}),{name:"messagesStore"})),FP=(e,t)=>xn()(uo(Mi(n=>({setUser:r=>n(o=>({...o,user:r})),setConversationId:r=>n(o=>({...o,conversationId:r})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:Ul(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Qr=class Qr{constructor(){}static getInstance(t="bp-webchat",n){return Qr._instances[t]||(Qr._instances[t]=FP(t,n)),Qr._instances[t]}};Ms(Qr,"_instances",{});let Wl=Qr;const km=Wl.getInstance,Li=xn()(uo(e=>({eventEmitter:Rp(),messageContainerRef:O.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),BP=8,jP=e=>xn()(Mi((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:o})=>({files:o.some(s=>s.name===r.name)?o.map(s=>s.name===r.name?{...s,...r}:s):[...o,{...r}]})),uploadFile:async(r,o)=>{const i=n().files.some(d=>d.name===r.name),a=n().files.length===BP;if(!i&&a)return;const s=new Date().toISOString(),l=n().files.filter(d=>Us(d.name)===Us(r.name)).length,c=r.name.substring(0,r.name.lastIndexOf(".")),u=r.name.lastIndexOf(".")===-1?"":r.name.substring(r.name.lastIndexOf(".")+1),f=l===0?`${s}_${c}${u?`.${u}`:""}`:`${s}_${c} (${l})${u?`.${u}`:""}`,p=new File([r],f,{type:r.type});n().upsertFile({name:f,type:"file",instance:p,status:"loading"});try{const{fileUrl:d,type:v}=await o(p);n().upsertFile({name:f,type:v,url:d,instance:p,status:"uploaded"})}catch{n().upsertFile({name:f,type:"file",instance:p,status:"error"})}},deleteFile:r=>t(({files:o})=>({files:o.filter(i=>i.name!=r)}))}),{name:e,storage:Ul(()=>sessionStorage)})),Jr=class Jr{constructor(){}static getInstance(t="bp-composer-file-store"){return Jr._instances[t]||(Jr._instances[t]=jP(t)),Jr._instances[t]}};Ms(Jr,"_instances",{});let Hl=Jr;const Cm=Hl.getInstance,ho=xn()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)})),clearParticipants:()=>e({participants:[]})})),zP=e=>xn()(uo(Mi((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Zr=class Zr{constructor(){}static getInstance(t="webchat:soundEnabled"){return Zr._instances[t]||(Zr._instances[t]=zP(t)),Zr._instances[t]}};Ms(Zr,"_instances",{});let Vl=Zr;const Am=Vl.getInstance,UP=({text:e,buttonValue:t,variant:n,groupId:r,reusable:o,sendMessage:i,isReadOnly:a,...s})=>{const l=Li(w=>w.eventEmitter),[c,u]=O.useState(!1),[f,p]=O.useState(!1),[d,v]=O.useState(!1),{message:{blocks:{button:h}}}=ve;O.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),o||v(!0)})},[l,r,o]);const m={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}u(!0),o||v(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&i&&(i==null||i({type:"text",text:e,value:t}))},"data-activated":c?"":void 0,"data-group-activated":f?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?E.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):E.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Kl=O.createContext(null);function $m(){const e=O.useContext(Kl);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const ql=O.createContext({showInputModal:void 0});function Gl(){return O.useContext(ql)}const Tm=O.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:o,feedback:i,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:c,...u},f)=>{const{showInputModal:p}=Gl(),{message:{blocks:{bubble:{container:d,feedbackContainer:v,feedbackIcon:h}}}}=ve;return t=="incoming"?E.jsxs("div",{"data-direction":"incoming","data-feedback":!!i,...u,...d,ref:f,children:[E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l}}),c&&p&&e.type==="text"&&E.jsxs("div",{...v,children:[E.jsx(aP,{...h,"data-selected":i==="positive",onClick:()=>c(o,{value:"positive"})}),E.jsx(iP,{...h,"data-selected":i==="negative",onClick:async()=>{const g=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:WP});c(o,{value:"negative",comment:g})}})]})]}):E.jsx("div",{"data-direction":"outgoing",...u,...d,ref:f,children:E.jsx(Kn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});Tm.displayName="Bubble";const WP=({setValue:e})=>{const{modal:{dialog:{content:t}}}=ve;return E.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})};var _t=function(){return _t=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},_t.apply(this,arguments)};function Om(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function fr(e,t,n,r){function o(i){return i instanceof n?i:new n(function(a){a(i)})}return new(n||(n=Promise))(function(i,a){function s(u){try{c(r.next(u))}catch(f){a(f)}}function l(u){try{c(r.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function dr(e,t){var n={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,o,i,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,o&&(i=c[0]&2?o.return:c[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,c[1])).done)return i;switch(o=0,i&&(c=[c[0]&2,i.value]),c[0]){case 0:case 1:i=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,o=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(i=n.trys,!(i=i.length>0&&i[i.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!i||c[1]>i[0]&&c[1]<i[3])){n.label=c[1];break}if(c[0]===6&&n.label<i[1]){n.label=i[1],i=c;break}if(i&&n.label<i[2]){n.label=i[2],n.ops.push(c);break}i[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(u){c=[6,u],o=0}finally{r=i=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Im(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,i=[],a;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)i.push(o.value)}catch(s){a={error:s}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return i}function Yl(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,i;r<o;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function HP(){var e=O.useRef(!1),t=O.useCallback(function(){return e.current},[]);return O.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function VP(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=O.useRef(0),o=HP(),i=O.useState(n),a=i[0],s=i[1],l=O.useCallback(function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var f=++r.current;return a.loading||s(function(p){return _t(_t({},p),{loading:!0})}),e.apply(void 0,c).then(function(p){return o()&&f===r.current&&s({value:p,loading:!1}),p},function(p){return o()&&f===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function Pm(e,t){t===void 0&&(t=[]);var n=VP(e,t,{loading:!0}),r=n[0],o=n[1];return O.useEffect(function(){o()},[o]),r}const Dm=O.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=O.useId(),{setIsLoading:a}=$m(),[s,l]=O.useState(n),[c,u]=O.useState(!1),[f,p]=O.useState(!1),{message:{blocks:{image:d}}}=ve;return O.useLayoutEffect(()=>{a(v=>[...v,i])},[]),Pm(async()=>{if(e){try{const{width:v,height:h}=await TE(e);s==="auto"&&l(KP(v,h))}catch(v){l("square"),console.error(v)}a(v=>v.filter(h=>h!==i))}},[e]),E.jsxs(E.Fragment,{children:[c?null:E.jsx("div",{"data-orientation":s,...d.placeholder}),f?E.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:o,children:E.jsx(tm,{size:"25%",strokeWidth:"5%"})}):E.jsx("img",{"data-orientation":s,"data-loaded":c,...r,...d.image,src:e,alt:"",ref:o,loading:"lazy",onLoad:()=>{u(!0)},onError:()=>{p(!0),u(!0)}})]})});Dm.displayName="Image";function KP(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((i,a)=>Math.abs(n[a]-r)<Math.abs(n[i]-r)?a:i)}const _m=O.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:o}}}=ve;return E.jsx("div",{children:E.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...o,ref:r})})});_m.displayName="Video";const Mm=O.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ve;return E.jsx("div",{children:E.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...o,ref:r})})});Mm.displayName="Audio";const Nm=O.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...o},i)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=ve;return E.jsxs("a",{...o,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:i,children:[E.jsx("p",{...s.title,children:n}),E.jsx(XI,{...s.icon})]})});Nm.displayName="Location";const Rm=O.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,messageId:a,isReadOnly:s,sendMessage:l,...c},u)=>{const{message:{blocks:{column:f}}}=ve;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...f,ref:u,children:e.map((p,d)=>E.jsx(Kn,{block:{...p,direction:r,timestamp:i,sender:o,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Rm.displayName="Column";const Lm=O.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:o,timestamp:i,metadata:a,messageId:s,isReadOnly:l,sendMessage:c,...u},f)=>{const{message:{blocks:{row:p}}}=ve;return E.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...p,ref:f,children:e.map((d,v)=>E.jsx(Kn,{block:{...d,direction:r,timestamp:i,sender:o,messageId:s,isReadOnly:l,sendMessage:c}},v))})});Lm.displayName="Row";function qP(e){return Object.prototype.toString.call(e)==="[object Object]"}function Fm(e){return qP(e)||Array.isArray(e)}function GP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ql(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),i=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==i?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!Fm(s)||!Fm(l)?s===l:Ql(s,l)})}function Bm(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function YP(e,t){if(e.length!==t.length)return!1;const n=Bm(e),r=Bm(t);return n.every((o,i)=>{const a=r[i];return Ql(o,a)})}function Jl(e){return typeof e=="number"}function jm(e){return typeof e=="string"}function Zl(e){return typeof e=="boolean"}function zm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Xl(e){return Math.sign(e)}function Fi(e,t){return ze(e-t)}function QP(e,t){if(e===0||t===0||ze(e)<=ze(t))return 0;const n=Fi(ze(e),ze(t));return ze(n/e)}function vo(e){return ji(e).map(Number)}function fn(e){return e[Bi(e)]}function Bi(e){return Math.max(0,e.length-1)}function ji(e){return Object.keys(e)}function Um(e,t){return[e,t].reduce((n,r)=>(ji(r).forEach(o=>{const i=n[o],a=r[o],s=zm(i)&&zm(a);n[o]=s?Um(i,a):a}),n),{})}function Wm(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function JP(e,t){const n={start:r,center:o,end:i};function r(){return 0}function o(c){return i(c)/2}function i(c){return t-c}function a(){return t*Number(e)}function s(c){return Jl(e)?a():n[e](c)}return{measure:s}}function ZP(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",o=s(),i=l();function a(u){const{width:f,height:p}=u;return n==="x"?f:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:o,endEdge:i,measureSize:a}}function En(e,t){const n=ze(e-t);function r(c){return c<e}function o(c){return c>t}function i(c){return r(c)||o(c)}function a(c){return i(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:s}}function Hm(e,t,n){const{constrain:r}=En(0,e),o=e+1;let i=a(t);function a(p){return n?ze((o+p)%o):r(p)}function s(){return i}function l(p){return i=a(p),f}function c(p){return u().set(s()+p)}function u(){return Hm(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function XP(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function mo(){let e=[];function t(o,i,a,s={passive:!0}){return o.addEventListener(i,a,s),e.push(()=>o.removeEventListener(i,a,s)),r}function n(){e=e.filter(o=>o())}const r={add:t,clear:n};return r}function eD(e,t,n,r,o,i,a,s,l,c,u,f,p,d,v,h,g,m,b){const{cross:w}=e,A=["INPUT","SELECT","TEXTAREA"],x={passive:!1},k=mo(),$=mo(),R=En(50,225).constrain(v.measure(20)),H={mouse:300,touch:400},T={mouse:500,touch:600},_=h?43:25;let F=!1,N=0,B=0,D=!1,M=!1,G=!1,U=!1;function I(Z,K){if(!K)return;function L(ae){(Zl(K)||K(Z,ae))&&Y(ae)}const ne=n;k.add(ne,"dragstart",ae=>ae.preventDefault(),x).add(ne,"touchmove",()=>{},x).add(ne,"touchend",()=>{}).add(ne,"touchstart",L).add(ne,"mousedown",L).add(ne,"touchcancel",Q).add(ne,"contextmenu",Q).add(ne,"click",X,!0)}function y(){k.clear(),$.clear()}function P(){const Z=U?r:n;$.add(Z,"touchmove",q,x).add(Z,"touchend",Q).add(Z,"mousemove",q,x).add(Z,"mouseup",Q)}function j(Z){const K=Z.nodeName||"";return A.includes(K)}function S(){return(h?T:H)[U?"mouse":"touch"]}function V(Z,K){const L=p.add(Xl(Z)*-1),ne=f.byDistance(Z,!h).distance;return h||ze(Z)<R?ne:m&&K?ne*.5:f.byIndex(L.get(),0).distance}function Y(Z){const K=Wm(Z,o);U=K,!(K&&Z.button!==0)&&(j(Z.target)||(G=h&&K&&!Z.buttons&&F,F=Fi(i.get(),s.get())>=2,D=!0,a.pointerDown(Z),u.useFriction(0).useDuration(0),i.set(s),P(),N=a.readPoint(Z),B=a.readPoint(Z,w),d.emit("pointerDown")))}function q(Z){const K=a.readPoint(Z),L=a.readPoint(Z,w),ne=Fi(K,N),ae=Fi(L,B);if(!M&&!U&&(!Z.cancelable||(M=ne>ae,!M)))return Q(Z);const te=a.pointerMove(Z);ne>g&&(G=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(te)),Z.preventDefault()}function Q(Z){const L=f.byDistance(0,!1).index!==p.get(),ne=a.pointerUp(Z)*S(),ae=V(t.apply(ne),L),te=QP(ne,ae),de=_-10*te,me=b+te/50;M=!1,D=!1,$.clear(),u.useDuration(de).useFriction(me),c.distance(ae,!h),U=!1,d.emit("pointerUp")}function X(Z){G&&(Z.stopPropagation(),Z.preventDefault())}function ee(){return D}return{init:I,pointerDown:ee,destroy:y}}function tD(e,t){let r,o;function i(f){return f.timeStamp}function a(f,p){const v=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(Wm(f,t)?f:f.touches[0])[v]}function s(f){return r=f,o=f,a(f)}function l(f){const p=a(f)-a(o),d=i(f)-i(r)>170;return o=f,d&&(r=f),p}function c(f){if(!r||!o)return 0;const p=a(o)-a(r),d=i(f)-i(r),v=i(f)-i(o)>170,h=p/d;return d&&!v&&ze(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function nD(e){function t(r){return e*(r/100)}return{measure:t}}function rD(e,t,n,r,o){let i,a,s=[],l=!1;function c(d){return o.measureSize(d.getBoundingClientRect())}function u(d,v){if(!v)return;a=c(e),s=r.map(c);function h(m){for(const b of m){const w=b.target===e,A=r.indexOf(b.target),x=w?a:s[A],k=c(w?e:r[A]);if(x!==k){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(m=>{l||(Zl(v)||v(d,m))&&h(m)}),[e].concat(r).forEach(m=>i.observe(m))}function f(){i&&i.disconnect(),l=!0}return{init:u,destroy:f}}function oD(e,t,n,r){let o=!0,i=0,a=0,s=n,l=r,c=e.get(),u=0;function f(){const x=t.get()-e.get(),k=!s;let $=0;return k?(i=0,e.set(t),$=x):(i+=x/s,i*=l,c+=i,e.add(i),$=c-u),a=Xl($),u=c,o=ze(x)<.001,A}function p(){return o}function d(){return s}function v(){return a}function h(){return i}function g(){return b(n)}function m(){return w(r)}function b(x){return s=x,A}function w(x){return l=x,A}const A={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:w,useDuration:b};return A}function iD(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=En(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function u(d){if(!c())return;const v=e.reachedMin(t.get())?"min":"max",h=ze(e[v]-t.get()),g=n.get()-t.get(),m=s.constrain(h/a);n.subtract(g*m),!d&&ze(g)<i&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function f(d){l=!d}return{constrain:u,toggleActive:f}}function aD(e,t,n,r){const o=En(-t+e,n[0]),i=l(),a=c();function s(){const f=i[0],p=fn(i),d=i.lastIndexOf(f),v=i.indexOf(p)+1;return En(d,v)}function l(){return n.map(o.constrain).map(f=>parseFloat(f.toFixed(3)))}function c(){if(t<=e)return[o.max];if(r==="keepSnaps")return i;const{min:f,max:p}=s();return i.slice(f,p)}return{snapsContained:a}}function sD(e,t,n){const r=t[0],o=n?r-e:fn(t);return{limit:En(o,r)}}function lD(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=En(i,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function u(p){if(!c(p))return;const d=e*(p*-1);r.forEach(v=>v.add(d))}return{loop:u}}function cD(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function uD(e,t,n,r,o,i,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=i,u=d().map(t.measure),f=v(),p=h();function d(){return c(r).map(m=>fn(m)[l]-m[0][s]).map(ze)}function v(){return r.map(m=>n[s]-m[s]).map(m=>-ze(m))}function h(){const b=fn(f)-fn(o);return c(f).map(w=>w[0]).map((w,A,x)=>{const k=!A,$=A===Bi(x);return a&&k?0:a&&$?b:w+u[A]})}return{snaps:f,snapsAligned:p}}function fD(e,t,n,r,o){const{reachedAny:i,removeOffset:a,constrain:s}=r;function l(v){return v.concat().sort((h,g)=>ze(h)-ze(g))[0]}function c(v){const h=e?a(v):s(v),g=t.map(b=>b-h).map(b=>u(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>ze(b.diff)-ze(w.diff)),{index:m}=g[0];return{index:m,distance:h}}function u(v,h){const g=[v,v+n,v-n];if(!e)return g[0];if(!h)return l(g);const m=g.filter(b=>Xl(b)===h);return l(m)}function f(v,h){const g=t[v]-o.get(),m=u(g,h);return{index:v,distance:m}}function p(v,h){const g=o.get()+v,{index:m,distance:b}=c(g),w=!e&&i(g);if(!h||w)return{index:m,distance:v};const A=t[m]-b,x=v+u(A,0);return{index:m,distance:x}}return{byDistance:p,byIndex:f,shortcut:u}}function dD(e,t,n,r,o,i,a){function s(f){const p=f.distance,d=f.index!==t.get();i.add(p),p&&(o.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(f.index),a.emit("select"))}function l(f,p){const d=r.byDistance(f,p);s(d)}function c(f,p){const d=t.clone().set(f),v=r.byIndex(d.get(),p);s(v)}return{distance:l,index:c}}function zi(e){let t=e;function n(){return t}function r(l){t=a(l)}function o(l){t+=a(l)}function i(l){t-=a(l)}function a(l){return Jl(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function Vm(e,t,n){const r=e.scroll==="x"?a:s,o=n.style;let i=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){i||(o.transform=r(t.apply(p)))}function c(p){i=!p}function u(){i||(o.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:u,to:l,toggleActive:c}}function pD(e,t,n,r,o,i,a,s,l){const c=vo(o),u=vo(o).reverse(),f=h().concat(g());function p(x,k){return x.reduce(($,R)=>$-o[R],k)}function d(x,k){return x.reduce(($,R)=>p($,k)>0?$.concat([R]):$,[])}function v(x,k){const $=k==="start",R=$?-r:r,H=a.findSlideBounds([R]);return x.map(T=>{const _=$?0:-r,F=$?r:0,B=H.filter(D=>D.index===T)[0][$?"end":"start"];return{index:T,slideLocation:zi(-1),translate:Vm(e,t,l[T]),target:()=>s.get()>B?_:F}})}function h(){const x=i[0]-1,k=d(u,x);return v(k,"end")}function g(){const x=n-i[0]-1,k=d(c,x);return v(k,"start")}function m(){return f.every(({index:x})=>{const k=c.filter($=>$!==x);return p(k,n)<=.1})}function b(){f.forEach(x=>{const{target:k,translate:$,slideLocation:R}=x,H=k();H!==R.get()&&($.to(H),R.set(H))})}function w(){f.forEach(x=>x.translate.clear())}return{canLoop:m,clear:w,loop:b,loopPoints:f}}function hD(e,t){let n,r=!1;function o(s,l){if(!l)return;function c(u){for(const f of u)if(f.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(u=>{r||(Zl(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function vD(e,t,n,r,o,i,a){const{removeOffset:s,constrain:l}=o,c=.5,u=i?[0,t,-t]:[0],f=d(u,a);function p(g){const m=g||0;return n.map(b=>En(c,b-c).constrain(b*m))}function d(g,m){const b=g||u,w=p(m);return b.reduce((A,x)=>{const k=r.map(($,R)=>({start:$-n[R]+w[R]+x,end:$+e-w[R]+x,index:R}));return A.concat(k)},[])}function v(g,m){const b=i?s(g):l(g);return(m||f).reduce((A,x)=>{const{index:k,start:$,end:R}=x,H=A.includes(k),T=$<b&&R>b;return!H&&T?A.concat([k]):A},[])}return{check:v,findSlideBounds:d}}function mD(e,t,n,r,o,i){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&o,u=v(),f=h(),p=n.map(a),d=g();function v(){if(!c)return 0;const b=n[0];return ze(t[s]-b[s])}function h(){if(!c)return 0;const b=i.getComputedStyle(fn(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,w,A)=>{const x=!w,k=w===Bi(A);return x?p[w]+u:k?p[w]+f:A[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function gD(e,t,n){const r=Jl(n);function o(l,c){return vo(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return vo(l).reduce((c,u)=>{const p=t.slice(fn(c),u+1).reduce((d,v)=>d+v,0);return!u||p>e?c.concat(u):c},[]).map((c,u,f)=>l.slice(c,f[u+1]))}function a(l){return r?o(l,n):i(l)}return{groupSlides:a}}function yD(e,t,n,r,o,i,a,s){const{align:l,axis:c,direction:u,startIndex:f,inViewThreshold:p,loop:d,duration:v,dragFree:h,dragThreshold:g,slidesToScroll:m,skipSnaps:b,containScroll:w}=i,A=t.getBoundingClientRect(),x=n.map(me=>me.getBoundingClientRect()),k=XP(u),$=ZP(c,u),R=$.measureSize(A),H=nD(R),T=JP(l,R),_=!d&&!!w,F=d||!!w,{slideSizes:N,slideSizesWithGaps:B}=mD($,A,x,n,F,o),D=gD(R,B,m),{snaps:M,snapsAligned:G}=uD($,T,A,x,B,D,_),U=-fn(M)+fn(B),{snapsContained:I}=aD(R,U,G,w),y=_?I:G,{limit:P}=sD(U,y,d),j=Hm(Bi(y),f,d),S=j.clone(),V=vo(n),Y=({dragHandler:me,scrollBody:De,scrollBounds:Ue,eventHandler:dt,animation:mt,options:{loop:pt}})=>{const ie=me.pointerDown();pt||Ue.constrain(ie);const ce=De.seek().settled();ce&&!ie&&(mt.stop(),dt.emit("settle")),ce||dt.emit("scroll")},q=({scrollBody:me,translate:De,location:Ue,offsetLocation:dt,scrollLooper:mt,slideLooper:pt,options:{loop:ie}},ce)=>{const W=me.velocity();dt.set(Ue.get()-W+W*ce),ie&&(mt.loop(me.direction()),pt.loop()),De.to(dt.get())},Q={start:()=>s.start(de),stop:()=>s.stop(de),update:()=>Y(de),render:me=>q(de,me)},X=.68,ee=y[j.get()],J=zi(ee),Z=zi(ee),K=zi(ee),L=oD(J,K,v,X),ne=fD(d,y,U,P,K),ae=dD(Q,j,S,ne,L,K,a),te=vD(R,U,N,M,P,d,p),de={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:A,slideRects:x,animation:Q,axis:$,direction:k,dragHandler:eD($,k,e,r,o,K,tD($,o),J,Q,ae,L,ne,j,a,H,h,g,b,X),eventStore:mo(),percentOfView:H,index:j,indexPrevious:S,limit:P,location:J,offsetLocation:Z,options:i,resizeHandler:rD(t,a,o,n,$),scrollBody:L,scrollBounds:iD(P,J,K,L,H),scrollLooper:lD(U,P,Z,[J,Z,K]),scrollProgress:cD(P),scrollSnaps:y,scrollTarget:ne,scrollTo:ae,slideLooper:pD($,k,R,U,B,y,te,Z,n),slidesHandler:hD(t,a),slidesInView:te,slideIndexes:V,slidesToScroll:D,target:K,translate:Vm($,k,t)};return de}function bD(e){const t=16.666666666666668;let n=[],r=null,o=0,i=0;function a(f){r||(r=f);const p=f-r;for(r=f,o+=p;o>=t;)n.forEach(({animation:v})=>v.update()),o-=t;const d=ze(o/t);n.forEach(({animation:v})=>v.render(d)),i&&e.requestAnimationFrame(a)}function s(f){n.includes(f)||n.push(f),!i&&(i=e.requestAnimationFrame(a))}function l(f){n=n.filter(p=>p!==f),!n.length&&(e.cancelAnimationFrame(i),r=null,o=0,i=0)}function c(){r=null,o=0}return{start:s,stop:l,reset:c,window:e}}function wD(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function o(l){return r(l).forEach(c=>c(t,l)),s}function i(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(u=>u!==c),s}const s={init:n,emit:o,off:a,on:i};return s}const SD={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 xD(e){function t(i,a){return Um(i,a||{})}function n(i){const a=i.breakpoints||{},s=ji(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(i,s)}function r(i){return i.map(a=>ji(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function ED(e){let t=[];function n(i,a){return t=i.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),i.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(i=>i.destroy())}return{init:n,destroy:r}}function pr(e,t,n){const r=e.ownerDocument,o=r.defaultView,i=xD(o),a=ED(i),s=mo(),l=mo(),c=wD(),{animationRealms:u}=pr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:v,off:h,emit:g}=c,m=N;let b=!1,w,A=f(SD,pr.globalOptions),x=f(A),k=[],$,R,H;function T(){const{container:L,slides:ne}=x;R=(jm(L)?e.querySelector(L):L)||e.children[0];const te=jm(ne)?R.querySelectorAll(ne):ne;H=[].slice.call(te||R.children)}function _(L,ne){const ae=yD(e,R,H,r,o,L,c,ne);if(L.loop&&!ae.slideLooper.canLoop()){const te=Object.assign({},L,{loop:!1});return _(te,ne)}return ae}function F(L,ne){if(b)return;const ae=u.find(de=>de.window===o),te=ae||bD(o);ae||u.push(te),A=f(A,L),x=p(A),k=ne||k,T(),w=_(x,te),d([A,...k.map(({options:de})=>de)]).forEach(de=>s.add(de,"change",N)),x.active&&(w.translate.to(w.location.get()),w.eventHandler.init(K),w.resizeHandler.init(K,x.watchResize),w.slidesHandler.init(K,x.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&te.reset()}),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&H.length&&w.dragHandler.init(K,x.watchDrag),$=a.init(k,K))}function N(L,ne){const ae=Y();B(),F(f({startIndex:ae},L),ne),c.emit("reInit")}function B(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(){b||(b=!0,s.clear(),B(),c.emit("destroy"))}function M(L){const ne=w[L?"target":"location"].get(),ae=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[ae](ne))}function G(L){const ne=M(L);return w.slideIndexes.filter(ae=>!ne.includes(ae))}function U(L,ne,ae){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(ne?0:x.duration),w.scrollTo.index(L,ae||0))}function I(L){const ne=w.index.add(1).get();U(ne,L===!0,-1)}function y(L){const ne=w.index.add(-1).get();U(ne,L===!0,1)}function P(){return w.index.add(1).get()!==Y()}function j(){return w.index.add(-1).get()!==Y()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function V(){return w.scrollProgress.get(w.location.get())}function Y(){return w.index.get()}function q(){return w.indexPrevious.get()}function Q(){return $}function X(){return w}function ee(){return e}function J(){return R}function Z(){return H}const K={canScrollNext:P,canScrollPrev:j,containerNode:J,internalEngine:X,destroy:D,off:h,on:v,emit:g,plugins:Q,previousScrollSnap:q,reInit:m,rootNode:ee,scrollNext:I,scrollPrev:y,scrollProgress:V,scrollSnapList:S,scrollTo:U,selectedScrollSnap:Y,slideNodes:Z,slidesInView:M,slidesNotInView:G};return F(t,n),setTimeout(()=>c.emit("init"),0),K}pr.animationRealms=[],pr.globalOptions=void 0;function ec(e={},t=[]){const n=O.useRef(e),r=O.useRef(t),[o,i]=O.useState(),[a,s]=O.useState(),l=O.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return O.useEffect(()=>{if(GP()&&a){pr.globalOptions=ec.globalOptions;const c=pr(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),O.useEffect(()=>{Ql(n.current,e)||(n.current=e,l())},[e,l]),O.useEffect(()=>{YP(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}ec.globalOptions=void 0;const Km=O.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:o,isReadOnly:i,sendMessage:a,addMessageFeedback:s},l)=>{const[c,u]=ec({skipSnaps:!0,loop:!0}),[f,p]=O.useState(!0),[d,v]=O.useState(!0),h=O.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),g=O.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:m}}}=ve,b=O.useCallback(w=>{p(!w.canScrollPrev()),v(!w.canScrollNext())},[]);return O.useEffect(()=>{u&&(b(u),u.on("reInit",b),u.on("select",b))},[u,b]),E.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:c,children:[E.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,A)=>E.jsx(Kn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:i}},A))}),e.length>1&&E.jsxs(E.Fragment,{children:[E.jsx(UI,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),E.jsx(WI,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Km.displayName="Carousel";const qm=Math.floor;function Gm(e){return Ym(e)?(e.nodeName||"").toLowerCase():"#document"}function go(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kD(e){var t;return(t=(Ym(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ym(e){return e instanceof Node||e instanceof go(e).Node}function Mt(e){return e instanceof Element||e instanceof go(e).Element}function hr(e){return e instanceof HTMLElement||e instanceof go(e).HTMLElement}function tc(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof go(e).ShadowRoot}function CD(e){return["html","body","#document"].includes(Gm(e))}function AD(e){return go(e).getComputedStyle(e)}function $D(e){if(Gm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||tc(e)&&e.host||kD(e);return tc(t)?t.host:t}function kn(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function bt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&tc(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Qm(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function TD(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function Jm(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Qm())||t.test(TD()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Zm(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 Xm(){return/apple/i.test(navigator.vendor)}function OD(){return Qm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function eg(e,t){return["mouse","pen"].includes(e)}function ID(e){return"nativeEvent"in e}function PD(e){return e.matches("html,body")}function Ft(e){return(e==null?void 0:e.ownerDocument)||document}function nc(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function tg(e){return"composedPath"in e?e.composedPath()[0]:e.target}const DD="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function ng(e){return hr(e)&&e.matches(DD)}function ot(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,Ct=Math.max,Ui=Math.round,Wi=Math.floor,Qt=e=>({x:e,y:e});function rg(e,t,n){return Ct(e,vr(t,n))}function Hi(e,t){return typeof e=="function"?e(t):e}function yo(e){return e.split("-")[0]}function rc(e){return e.split("-")[1]}function og(e){return e==="x"?"y":"x"}function _D(e){return e==="y"?"height":"width"}function bo(e){return["top","bottom"].includes(yo(e))?"y":"x"}function MD(e){return og(bo(e))}function ND(e){return{top:0,right:0,bottom:0,left:0,...e}}function RD(e){return typeof e!="number"?ND(e):{top:e,right:e,bottom:e,left:e}}function Vi(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function ig(e,t,n){let{reference:r,floating:o}=e;const i=bo(t),a=MD(t),s=_D(a),l=yo(t),c=i==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let d;switch(l){case"top":d={x:u,y:r.y-o.height};break;case"bottom":d={x:u,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:f};break;case"left":d={x:r.x-o.width,y:f};break;default:d={x:r.x,y:r.y}}switch(rc(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const LD=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=ig(c,r,l),p=r,d={},v=0;for(let h=0;h<s.length;h++){const{name:g,fn:m}=s[h],{x:b,y:w,data:A,reset:x}=await m({x:u,y:f,initialPlacement:r,placement:p,strategy:o,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});u=b??u,f=w??f,d={...d,[g]:{...d[g],...A}},x&&v<=50&&(v++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:o}):x.rects),{x:u,y:f}=ig(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function ag(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:d=0}=Hi(t,e),v=RD(d),g=s[p?f==="floating"?"reference":"floating":f],m=Vi(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(g)))==null||n?g:g.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="floating"?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,w=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s.floating)),A=await(i.isElement==null?void 0:i.isElement(w))?await(i.getScale==null?void 0:i.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Vi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-x.top+v.top)/A.y,bottom:(x.bottom-m.bottom+v.bottom)/A.y,left:(m.left-x.left+v.left)/A.x,right:(x.right-m.right+v.right)/A.x}}async function FD(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=yo(n),s=rc(n),l=bo(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Hi(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:v}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&typeof v=="number"&&(d=s==="end"?v*-1:v),l?{x:d*u,y:p*c}:{x:p*c,y:d*u}}const BD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await FD(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}},jD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:m,y:b}=g;return{x:m,y:b}}},...l}=Hi(e,t),c={x:n,y:r},u=await ag(t,l),f=bo(yo(o)),p=og(f);let d=c[p],v=c[f];if(i){const g=p==="y"?"top":"left",m=p==="y"?"bottom":"right",b=d+u[g],w=d-u[m];d=rg(b,d,w)}if(a){const g=f==="y"?"top":"left",m=f==="y"?"bottom":"right",b=v+u[g],w=v-u[m];v=rg(b,v,w)}const h=s.fn({...t,[p]:d,[f]:v});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:i,[f]:a}}}}}},zD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Hi(e,t),u=await ag(t,c),f=yo(o),p=rc(o),d=bo(o)==="y",{width:v,height:h}=i.floating;let g,m;f==="top"||f==="bottom"?(g=f,m=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(m=f,g=p==="end"?"top":"bottom");const b=h-u.top-u.bottom,w=v-u.left-u.right,A=vr(h-u[g],b),x=vr(v-u[m],w),k=!t.middlewareData.shift;let $=A,R=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=b),k&&!p){const T=Ct(u.left,0),_=Ct(u.right,0),F=Ct(u.top,0),N=Ct(u.bottom,0);d?R=v-2*(T!==0||_!==0?T+_:Ct(u.left,u.right)):$=h-2*(F!==0||N!==0?F+N:Ct(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:$});const H=await a.getDimensions(s.floating);return v!==H.width||h!==H.height?{reset:{rects:!0}}:{}}}};function Ki(){return typeof window<"u"}function mr(e){return sg(e)?(e.nodeName||"").toLowerCase():"#document"}function At(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(sg(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sg(e){return Ki()?e instanceof Node||e instanceof At(e).Node:!1}function Bt(e){return Ki()?e instanceof Element||e instanceof At(e).Element:!1}function Zt(e){return Ki()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function lg(e){return!Ki()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}function wo(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=jt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function UD(e){return["table","td","th"].includes(mr(e))}function qi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function oc(e){const t=ic(),n=Bt(e)?jt(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function WD(e){let t=Cn(e);for(;Zt(t)&&!gr(t);){if(oc(t))return t;if(qi(t))return null;t=Cn(t)}return null}function ic(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(mr(e))}function jt(e){return At(e).getComputedStyle(e)}function Gi(e){return Bt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Cn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||lg(e)&&e.host||Jt(e);return lg(t)?t.host:t}function cg(e){const t=Cn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&wo(t)?t:cg(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=cg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=At(o);if(i){const s=ac(a);return t.concat(a,a.visualViewport||[],wo(o)?o:[],s&&n?An(s):[])}return t.concat(o,An(o,[],n))}function ac(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ug(e){const t=jt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Zt(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Ui(n)!==i||Ui(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function sc(e){return Bt(e)?e:e.contextElement}function yr(e){const t=sc(e);if(!Zt(t))return Qt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ug(t);let a=(i?Ui(n.width):n.width)/r,s=(i?Ui(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const HD=Qt(0);function fg(e){const t=At(e);return!ic()||!t.visualViewport?HD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function VD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==At(e)?!1:t}function Vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=sc(e);let a=Qt(1);t&&(r?Bt(r)&&(a=yr(r)):a=yr(e));const s=VD(i,n,r)?fg(i):Qt(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,u=o.width/a.x,f=o.height/a.y;if(i){const p=At(i),d=r&&Bt(r)?At(r):r;let v=p,h=ac(v);for(;h&&r&&d!==v;){const g=yr(h),m=h.getBoundingClientRect(),b=jt(h),w=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,A=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=A,v=At(h),h=ac(v)}}return Vi({width:u,height:f,x:l,y:c})}function lc(e,t){const n=Gi(e).scrollLeft;return t?t.left+n:Vn(Jt(e)).left+n}function dg(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:lc(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function KD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jt(r),s=t?qi(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Qt(1);const u=Qt(0),f=Zt(r);if((f||!f&&!i)&&((mr(r)!=="body"||wo(a))&&(l=Gi(r)),Zt(r))){const d=Vn(r);c=yr(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const p=a&&!f&&!i?dg(a,l,!0):Qt(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-l.scrollTop*c.y+u.y+p.y}}function qD(e){return Array.from(e.getClientRects())}function GD(e){const t=Jt(e),n=Gi(e),r=e.ownerDocument.body,o=Ct(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Ct(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+lc(e);const s=-n.scrollTop;return jt(r).direction==="rtl"&&(a+=Ct(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function YD(e,t){const n=At(e),r=Jt(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const c=ic();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function QD(e,t){const n=Vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zt(e)?yr(e):Qt(1),a=e.clientWidth*i.x,s=e.clientHeight*i.y,l=o*i.x,c=r*i.y;return{width:a,height:s,x:l,y:c}}function pg(e,t,n){let r;if(t==="viewport")r=YD(e,n);else if(t==="document")r=GD(Jt(e));else if(Bt(t))r=QD(t,n);else{const o=fg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Vi(r)}function hg(e,t){const n=Cn(e);return n===t||!Bt(n)||gr(n)?!1:jt(n).position==="fixed"||hg(n,t)}function JD(e,t){const n=t.get(e);if(n)return n;let r=An(e,[],!1).filter(s=>Bt(s)&&mr(s)!=="body"),o=null;const i=jt(e).position==="fixed";let a=i?Cn(e):e;for(;Bt(a)&&!gr(a);){const s=jt(a),l=oc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||wo(a)&&!l&&hg(e,a))?r=r.filter(u=>u!==a):o=s,a=Cn(a)}return t.set(e,r),r}function ZD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?qi(t)?[]:JD(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const f=pg(t,u,o);return c.top=Ct(f.top,c.top),c.right=vr(f.right,c.right),c.bottom=vr(f.bottom,c.bottom),c.left=Ct(f.left,c.left),c},pg(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function XD(e){const{width:t,height:n}=ug(e);return{width:t,height:n}}function e_(e,t,n){const r=Zt(t),o=Jt(t),i=n==="fixed",a=Vn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Qt(0);function c(){l.x=lc(o)}if(r||!r&&!i)if((mr(t)!=="body"||wo(o))&&(s=Gi(t)),r){const d=Vn(t,!0,i,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else o&&c();i&&!r&&o&&c();const u=o&&!r&&!i?dg(o,s):Qt(0),f=a.left+s.scrollLeft-l.x-u.x,p=a.top+s.scrollTop-l.y-u.y;return{x:f,y:p,width:a.width,height:a.height}}function cc(e){return jt(e).position==="static"}function vg(e,t){if(!Zt(e)||jt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jt(e)===n&&(n=n.ownerDocument.body),n}function mg(e,t){const n=At(e);if(qi(e))return n;if(!Zt(e)){let o=Cn(e);for(;o&&!gr(o);){if(Bt(o)&&!cc(o))return o;o=Cn(o)}return n}let r=vg(e,t);for(;r&&UD(r)&&cc(r);)r=vg(r,t);return r&&gr(r)&&cc(r)&&!oc(r)?n:r||WD(e)||n}const t_=async function(e){const t=this.getOffsetParent||mg,n=this.getDimensions,r=await n(e.floating);return{reference:e_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function n_(e){return jt(e).direction==="rtl"}const r_={convertOffsetParentRelativeRectToViewportRelativeRect:KD,getDocumentElement:Jt,getClippingRect:ZD,getOffsetParent:mg,getElementRects:t_,getClientRects:qD,getDimensions:XD,getScale:yr,isElement:Bt,isRTL:n_};function gg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function o_(e,t){let n=null,r;const o=Jt(e);function i(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),i();const c=e.getBoundingClientRect(),{left:u,top:f,width:p,height:d}=c;if(s||t(),!p||!d)return;const v=Wi(f),h=Wi(o.clientWidth-(u+p)),g=Wi(o.clientHeight-(f+d)),m=Wi(u),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:Ct(0,vr(1,l))||1};let A=!0;function x(k){const $=k[0].intersectionRatio;if($!==l){if(!A)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!gg(c,e.getBoundingClientRect())&&a(),A=!1}try{n=new IntersectionObserver(x,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return a(!0),i}function i_(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=sc(e),u=o||i?[...c?An(c):[],...An(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=c&&s?o_(c,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let v,h=l?Vn(e):null;l&&g();function g(){const m=Vn(e);h&&!gg(h,m)&&n(),h=m,v=requestAnimationFrame(g)}return n(),()=>{var m;u.forEach(b=>{o&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f==null||f(),(m=d)==null||m.disconnect(),d=null,l&&cancelAnimationFrame(v)}}const a_=BD,s_=jD,l_=zD,c_=(e,t,n)=>{const r=new Map,o={platform:r_,...n},i={...o.platform,_c:r};return LD(e,t,{...o,platform:i})};var Yi=typeof document<"u"?O.useLayoutEffect:O.useEffect;function Qi(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qi(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&e.$$typeof)&&!Qi(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function yg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function bg(e,t){const n=yg(e);return Math.round(t*n)/n}function uc(e){const t=C.useRef(e);return Yi(()=>{t.current=e}),t}function u_(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,f]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=C.useState(r);Qi(p,r)||d(r);const[v,h]=C.useState(null),[g,m]=C.useState(null),b=C.useCallback(U=>{U!==k.current&&(k.current=U,h(U))},[]),w=C.useCallback(U=>{U!==$.current&&($.current=U,m(U))},[]),A=i||v,x=a||g,k=C.useRef(null),$=C.useRef(null),R=C.useRef(u),H=l!=null,T=uc(l),_=uc(o),F=uc(c),N=C.useCallback(()=>{if(!k.current||!$.current)return;const U={placement:t,strategy:n,middleware:p};_.current&&(U.platform=_.current),c_(k.current,$.current,U).then(I=>{const y={...I,isPositioned:F.current!==!1};B.current&&!Qi(R.current,y)&&(R.current=y,op.flushSync(()=>{f(y)}))})},[p,t,n,_,F]);Yi(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(U=>({...U,isPositioned:!1})))},[c]);const B=C.useRef(!1);Yi(()=>(B.current=!0,()=>{B.current=!1}),[]),Yi(()=>{if(A&&(k.current=A),x&&($.current=x),A&&x){if(T.current)return T.current(A,x,N);N()}},[A,x,N,T,H]);const D=C.useMemo(()=>({reference:k,floating:$,setReference:b,setFloating:w}),[b,w]),M=C.useMemo(()=>({reference:A,floating:x}),[A,x]),G=C.useMemo(()=>{const U={position:n,left:0,top:0};if(!M.floating)return U;const I=bg(M.floating,u.x),y=bg(M.floating,u.y);return s?{...U,transform:"translate("+I+"px, "+y+"px)",...yg(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:y}},[n,s,M.floating,u.x,u.y]);return C.useMemo(()=>({...u,update:N,refs:D,elements:M,floatingStyles:G}),[u,N,D,M,G])}const f_=(e,t)=>({...a_(e),options:[e,t]}),d_=(e,t)=>({...s_(e),options:[e,t]}),p_=(e,t)=>({...l_(e),options:[e,t]});/*!
|
|
253
|
+
`);const b=y.state[s];if(b==null)return;JSON.stringify(i.getState())!==JSON.stringify(b)&&d(b);return}i.dispatchFromDevtools&&typeof i.dispatch=="function"&&i.dispatch(y)});case"DISPATCH":switch(h.payload.type){case"RESET":return d(m),s===void 0?f==null?void 0:f.init(i.getState()):f==null?void 0:f.init(Nr(l.name));case"COMMIT":if(s===void 0){f==null||f.init(i.getState());return}return f==null?void 0:f.init(Nr(l.name));case"ROLLBACK":return Bo(h.state,y=>{if(s===void 0){d(y),f==null||f.init(i.getState());return}d(y[s]),f==null||f.init(Nr(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Bo(h.state,y=>{if(s===void 0){d(y);return}JSON.stringify(i.getState())!==JSON.stringify(y[s])&&d(y[s])});case"IMPORT_STATE":{const{nextLiftedState:y}=h.payload,b=(g=y.computedStates.slice(-1)[0])==null?void 0:g.state;if(!b)return;d(s===void 0?b:b[s]),f==null||f.send(null,y);return}case"PAUSE_RECORDING":return p=!p}return}}),m},Bo=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)};function zo(e,t){let n;try{n=e()}catch{return}return{getItem:i=>{var o;const a=l=>l===null?null:JSON.parse(l,void 0),s=(o=n.getItem(i))!=null?o:null;return s instanceof Promise?s.then(a):a(s)},setItem:(i,o)=>n.setItem(i,JSON.stringify(o,void 0)),removeItem:i=>n.removeItem(i)}}const Hn=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Hn(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Hn(r)(n)}}}},z0=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:g=>g,version:0,merge:(g,y)=>({...y,...g}),...t},a=!1;const s=new Set,l=new Set;let c;try{c=o.getStorage()}catch{}if(!c)return e((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...g)},r,i);const f=Hn(o.serialize),u=()=>{const g=o.partialize({...r()});let y;const b=f({state:g,version:o.version}).then(w=>c.setItem(o.name,w)).catch(w=>{y=w});if(y)throw y;return b},p=i.setState;i.setState=(g,y)=>{p(g,y),u()};const d=e((...g)=>{n(...g),u()},r,i);let m;const h=()=>{var g;if(!c)return;a=!1,s.forEach(b=>b(r()));const y=((g=o.onRehydrateStorage)==null?void 0:g.call(o,r()))||void 0;return Hn(c.getItem.bind(c))(o.name).then(b=>{if(b)return o.deserialize(b)}).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return o.migrate(b.state,b.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return b.state}).then(b=>{var w;return m=o.merge(b,(w=r())!=null?w:d),n(m,!0),u()}).then(()=>{y==null||y(m,void 0),a=!0,l.forEach(b=>b(m))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:g=>{o={...o,...g},g.getStorage&&(c=g.getStorage())},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>h(),hasHydrated:()=>a,onHydrate:g=>(s.add(g),()=>{s.delete(g)}),onFinishHydration:g=>(l.add(g),()=>{l.delete(g)})},h(),m||d},$0=(e,t)=>(n,r,i)=>{let o={storage:zo(()=>localStorage),partialize:h=>h,version:0,merge:(h,g)=>({...g,...h}),...t},a=!1;const s=new Set,l=new Set;let c=o.storage;if(!c)return e((...h)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...h)},r,i);const f=()=>{const h=o.partialize({...r()});return c.setItem(o.name,{state:h,version:o.version})},u=i.setState;i.setState=(h,g)=>{u(h,g),f()};const p=e((...h)=>{n(...h),f()},r,i);i.getInitialState=()=>p;let d;const m=()=>{var h,g;if(!c)return;a=!1,s.forEach(b=>{var w;return b((w=r())!=null?w:p)});const y=((g=o.onRehydrateStorage)==null?void 0:g.call(o,(h=r())!=null?h:p))||void 0;return Hn(c.getItem.bind(c))(o.name).then(b=>{if(b)if(typeof b.version=="number"&&b.version!==o.version){if(o.migrate)return[!0,o.migrate(b.state,b.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,b.state];return[!1,void 0]}).then(b=>{var w;const[C,x]=b;if(d=o.merge(x,(w=r())!=null?w:p),n(d,!0),C)return f()}).then(()=>{y==null||y(d,void 0),d=r(),a=!0,l.forEach(b=>b(d))}).catch(b=>{y==null||y(void 0,b)})};return i.persist={setOptions:h=>{o={...o,...h},h.storage&&(c=h.storage)},clearStorage:()=>{c==null||c.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>m(),hasHydrated:()=>a,onHydrate:h=>(s.add(h),()=>{s.delete(h)}),onFinishHydration:h=>(l.add(h),()=>{l.delete(h)})},o.skipHydration||m(),d||p},_r=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Pr?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),z0(e,t)):$0(e,t),_u=Dt()(Un(_r(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Lr;const j0=new Uint8Array(16);function U0(){if(!Lr&&(Lr=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Lr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Lr(j0)}const Fe=[];for(let e=0;e<256;++e)Fe.push((e+256).toString(16).slice(1));function H0(e,t=0){return Fe[e[t+0]]+Fe[e[t+1]]+Fe[e[t+2]]+Fe[e[t+3]]+"-"+Fe[e[t+4]]+Fe[e[t+5]]+"-"+Fe[e[t+6]]+Fe[e[t+7]]+"-"+Fe[e[t+8]]+Fe[e[t+9]]+"-"+Fe[e[t+10]]+Fe[e[t+11]]+Fe[e[t+12]]+Fe[e[t+13]]+Fe[e[t+14]]+Fe[e[t+15]]}const Lu={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function W0(e,t,n){if(Lu.randomUUID&&!t&&!e)return Lu.randomUUID();e=e||{};const r=e.random||(e.rng||U0)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,H0(r)}function Wn(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:i,disableInput:o}=Fu(e.payload);return{id:e.id,conversationId:n,authorId:r,timestamp:new Date(e.createdAt),block:i,feedback:(a=e.feedback)==null?void 0:a.value,disableInput:o,metadata:t}}const Fu=e=>{switch(e.type){case"audio":return Ru(e);case"card":return V0(e);case"carousel":return q0(e);case"choice":return K0(e);case"dropdown":return Y0(e);case"file":return Bu(e);case"image":return zu(e);case"location":return $u(e);case"markdown":return ju(e);case"text":return Uu(e);case"video":return Hu(e);case"bloc":return Q0(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},Vn=e=>({block:e,type:"bubble"}),Ru=e=>({payload:{type:"audio",url:e.audioUrl}}),V0=e=>({payload:Vn(Wu(e))}),q0=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Wu({type:"card",...t}))}}),K0=e=>{const t=e.options.map(o=>({title:o.label,value:o.value})),n=e.text,r=W0(),i=Vn({type:"text",text:n});return t.length===0?{disableInput:e.disableFreeText,payload:i}:{disableInput:e.disableFreeText,payload:{type:"column",blocks:[i,{type:"row",blocks:t.map(({title:o,value:a})=>({type:"button",variant:"action",text:o,buttonValue:a,groupId:r}))}]}}},Y0=e=>{const t=e.options.map(i=>({label:i.label,value:i.value})),n=e.text,r=[{type:"dropdown",label:n??"Select an option",options:t}];return n&&r.unshift({type:"text",text:n}),{disableInput:!0,payload:Vn({type:"column",blocks:r})}},Bu=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),zu=e=>({payload:{type:"image",url:e.imageUrl}}),$u=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),ju=e=>({payload:Vn({type:"text",text:e.markdown})}),Uu=e=>({payload:Vn({type:"text",text:e.text,value:e.value})}),Hu=e=>({payload:{type:"video",url:e.videoUrl}}),Q0=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return Ru({...n.payload,type:n.type}).payload;case"file":return Bu({...n.payload,type:n.type}).payload;case"image":return zu({...n.payload,type:n.type}).payload;case"location":return $u({...n.payload,type:n.type}).payload;case"markdown":return ju({...n.payload,type:n.type}).payload;case"text":return Uu({...n.payload,type:n.type}).payload;case"video":return Hu({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Wu=e=>{const t=e.title,n=e.subtitle,r=e.imageUrl,i=e.actions.map(a=>{switch(a.action){case"postback":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};case"url":return{type:"button",variant:"link",text:a.label,buttonValue:a.value,reusable:!0};case"say":return{type:"button",variant:"action",text:a.label,buttonValue:a.value,reusable:!0};default:throw new Error(`Unknown action type ${a.action}`)}}),o=[];return r&&o.push({type:"image",url:r}),t&&o.push({type:"text",text:`#### ${t}`}),n&&o.push({type:"text",text:n}),i.length>0&&o.push({type:"row",blocks:i}),{type:"column",horizontalAlignment:"center",blocks:[...o]}},rn=Dt()(Un(e=>({messages:[],isFetching:!1,setMessages:t=>e({messages:t}),saveMessage:t=>e(({messages:n})=>{var i;const r=(i=t.metadata)==null?void 0:i.clientMessageId;if(r){const o=n.findIndex(s=>{var l;return((l=s.metadata)==null?void 0:l.clientMessageId)===r}),a=n[o];if(o!==-1)return{messages:[...n.slice(0,o),{...a,...t},...n.slice(o+1)]}}return{messages:[...n.filter(o=>o.id!==t.id),t]}}),updateMessage:(t,n)=>e(({messages:r})=>({messages:r.map(i=>i.id===t?{...i,...n}:i)})),clearMessages:()=>e({messages:[]}),fetchMessages:async({client:t,conversationId:n})=>{const r=[];e({isFetching:!0});try{let i;do{const{messages:o,meta:a}=await t.listConversationMessages({conversationId:n,nextToken:i});r.push(...o),i=a.nextToken}while(i);return r.reverse().map(o=>Wn(o)).filter(Boolean)}finally{e({isFetching:!1})}}}),{name:"messagesStore"})),G0=(e,t)=>Dt()(Un(_r(n=>({setUser:r=>n(i=>({...i,user:r})),setConversationId:r=>n(i=>({...i,conversationId:r})),clearConversationId:()=>n(r=>({...r,conversationId:void 0})),clearAll:()=>{n(r=>({...r,user:void 0,conversationId:void 0}))}}),{name:e,storage:zo(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),An=class An{constructor(){}static getInstance(t="bp-webchat",n){return An._instances[t]||(An._instances[t]=G0(t,n)),An._instances[t]}};Di(An,"_instances",{});let $o=An;const Vu=$o.getInstance,Fr=Dt()(Un(e=>({eventEmitter:rl(),messageContainerRef:P.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),J0=8,Z0=e=>Dt()(_r((t,n)=>({files:[],setFiles:r=>t({files:r}),upsertFile:r=>t(({files:i})=>({files:i.some(s=>s.name===r.name)?i.map(s=>s.name===r.name?{...s,...r}:s):[...i,{...r}]})),uploadFile:async(r,i)=>{const o=n().files.some(y=>y.name===r.name),a=n().files.length===J0;if(!o&&a)return;const s=new Date().toISOString(),l=Ds(r.name),c=n().files.filter(y=>Ds(y.name)===l).length,f=r.name.lastIndexOf("."),u=f>0&&f<r.name.length-1,p=u?r.name.substring(0,f):r.name,d=u?r.name.substring(f):"",m=c>0?` (${c})`:"",h=`${s}_${p}${m}${d}`,g=new File([r],h,{type:r.type});n().upsertFile({name:h,type:"file",instance:g,status:"loading"});try{const{fileUrl:y,type:b}=await i(g);n().upsertFile({name:h,type:b,url:y,instance:g,status:"uploaded"})}catch{n().upsertFile({name:h,type:"file",instance:g,status:"error"})}},deleteFile:r=>t(({files:i})=>({files:i.filter(o=>o.name!=r)}))}),{name:e,storage:zo(()=>sessionStorage)})),In=class In{constructor(){}static getInstance(t="bp-composer-file-store"){return In._instances[t]||(In._instances[t]=Z0(t)),In._instances[t]}};Di(In,"_instances",{});let jo=In;const qu=jo.getInstance,qn=Dt()(e=>({participants:[],setParticipants:t=>e({participants:t}),addParticipant:t=>e(n=>({participants:[...n.participants,t]})),removeParticipant:t=>e(n=>({participants:n.participants.filter(r=>r.id!==t)})),clearParticipants:()=>e({participants:[]})})),X0=e=>Dt()(Un(_r((t,n)=>({soundOn:!0,setSoundEnabled:r=>t({soundOn:r}),toggleSound:()=>t({soundOn:!n().soundOn})}),{name:e}))),Tn=class Tn{constructor(){}static getInstance(t="webchat:soundEnabled"){return Tn._instances[t]||(Tn._instances[t]=X0(t)),Tn._instances[t]}};Di(Tn,"_instances",{});let Uo=Tn;const Ku=Uo.getInstance,ek=({text:e,buttonValue:t,variant:n,groupId:r,reusable:i,sendMessage:o,isReadOnly:a,...s})=>{const l=Fr(w=>w.eventEmitter),[c,f]=P.useState(!1),[u,p]=P.useState(!1),[d,m]=P.useState(!1),{message:{blocks:{button:h}}}=ge;P.useEffect(()=>{if(r)return l.on(`button-group-${r}-click`,()=>{p(!0),i||m(!0)})},[l,r,i]);const y={...s,onClick:w=>{if((d||a)&&n==="link"){w.preventDefault();return}f(!0),i||m(!0),r&&l.emit(`button-group-${r}-click`),n!=="link"&&o&&(o==null||o({type:"text",text:e,value:t}))},"data-activated":c?"":void 0,"data-group-activated":u?"":void 0,"data-type":n,...h},b=d||a;return n==="link"?k.jsx("a",{...y,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):k.jsx("button",{...y,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Ho=P.createContext(null);function Yu(){const e=P.useContext(Ho);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Wo=P.createContext({showInputModal:void 0});function Vo(){return P.useContext(Wo)}const Qu=P.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:i,feedback:o,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:c,...f},u)=>{const{showInputModal:p}=Vo(),{message:{blocks:{bubble:{container:d,feedbackContainer:m,feedbackIcon:h}}}}=ge;return t=="incoming"?k.jsxs("div",{"data-direction":"incoming","data-feedback":!!o,...f,...d,ref:u,children:[k.jsx(qt,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l}}),c&&p&&e.type==="text"&&k.jsxs("div",{...m,children:[k.jsx(b0,{...h,"data-selected":o==="positive",onClick:()=>c(i,{value:"positive"})}),k.jsx(y0,{...h,"data-selected":o==="negative",onClick:async()=>{const g=await p({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButtonText:"Send feedback",cancelButtonText:"Cancel",Content:tk});c(i,{value:"negative",comment:g})}})]})]}):k.jsx("div",{"data-direction":"outgoing",...f,...d,ref:u,children:k.jsx(qt,{block:{...e,direction:t,timestamp:r,sender:n,messageId:i,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});Qu.displayName="Bubble";const tk=({setValue:e})=>{const{modal:{dialog:{content:t}}}=ge;return k.jsx("textarea",{...t.textarea,placeholder:"Let us know what went wrong...",onChange:n=>e(n.target.value)})},Gu=({className:e,...t})=>k.jsx("div",{"data-slot":"skeleton",className:`bpSkeleton ${e||""}`,...t});Gu.displayName="Skeleton";var it=function(){return it=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},it.apply(this,arguments)};function Ju(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function on(e,t,n,r){function i(o){return o instanceof n?o:new n(function(a){a(o)})}return new(n||(n=Promise))(function(o,a){function s(f){try{c(r.next(f))}catch(u){a(u)}}function l(f){try{c(r.throw(f))}catch(u){a(u)}}function c(f){f.done?o(f.value):i(f.value).then(s,l)}c((r=r.apply(e,t||[])).next())})}function an(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},r,i,o,a=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(f){return l([c,f])}}function l(c){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(n=0)),n;)try{if(r=1,i&&(o=c[0]&2?i.return:c[0]?i.throw||((o=i.return)&&o.call(i),0):i.next)&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[c[0]&2,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return n.label++,{value:c[1],done:!1};case 5:n.label++,i=c[1],c=[0];continue;case 7:c=n.ops.pop(),n.trys.pop();continue;default:if(o=n.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){n=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){n.label=c[1];break}if(c[0]===6&&n.label<o[1]){n.label=o[1],o=c;break}if(o&&n.label<o[2]){n.label=o[2],n.ops.push(c);break}o[2]&&n.ops.pop(),n.trys.pop();continue}c=t.call(e,n)}catch(f){c=[6,f],i=0}finally{r=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function Zu(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(a)throw a.error}}return o}function qo(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function nk(){var e=P.useRef(!1),t=P.useCallback(function(){return e.current},[]);return P.useEffect(function(){return e.current=!0,function(){e.current=!1}},[]),t}function rk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=P.useRef(0),i=nk(),o=P.useState(n),a=o[0],s=o[1],l=P.useCallback(function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var u=++r.current;return a.loading||s(function(p){return it(it({},p),{loading:!0})}),e.apply(void 0,c).then(function(p){return i()&&u===r.current&&s({value:p,loading:!1}),p},function(p){return i()&&u===r.current&&s({error:p,loading:!1}),p})},t);return[a,l]}function ik(e,t){t===void 0&&(t=[]);var n=rk(e,t,{loading:!0}),r=n[0],i=n[1];return P.useEffect(function(){i()},[i]),r}const Xu=P.forwardRef(({url:e,type:t,orientation:n="auto",...r},i)=>{const o=P.useId(),{setIsLoading:a}=Yu(),[s,l]=P.useState(n==="auto"?"square":n),[c,f]=P.useState("initial"),{message:{blocks:{image:u}}}=ge;return P.useLayoutEffect(()=>(a(p=>[...p,o]),()=>{a(p=>p.filter(d=>d!==o))}),[o,a]),ik(async()=>{if(!e)return;const p=new Image;try{const{width:d,height:m}=await $h(e);n==="auto"&&l(ok(d,m)),p.onload=()=>{f("loaded"),a(h=>h.filter(g=>g!==o))},p.onerror=()=>{f("error"),l("square"),a(h=>h.filter(g=>g!==o))},p.src=e,p.complete&&(p.naturalWidth>0?(f("loaded"),a(h=>h.filter(g=>g!==o))):(f("error"),l("square"),a(h=>h.filter(g=>g!==o))))}catch(d){console.error(d),f("error"),a(m=>m.filter(h=>h!==o))}return()=>{p.onload=null,p.onerror=null}},[e,o,a,n]),e?c==="error"?k.jsx("div",{"data-error":"true","data-orientation":s,...r,...u.image,ref:i,children:k.jsx(ku,{size:"25%",strokeWidth:"5%"})}):c==="initial"?k.jsx(Gu,{"data-orientation":s,...u.placeholder}):k.jsx("img",{"data-orientation":s,"data-loaded":c==="loaded",...r,...u.image,src:e,alt:"",ref:i}):null});Xu.displayName="Image";function ok(e,t){const n={square:1,portrait:.75,landscape:1.3333333333333333},r=e/t;return Object.keys(n).reduce((o,a)=>Math.abs(n[a]-r)<Math.abs(n[o]-r)?a:o)}const ef=P.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:i}}}=ge;return k.jsx("div",{children:k.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...i,ref:r})})});ef.displayName="Video";const tf=P.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:i}}}=ge;return k.jsx("div",{children:k.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...i,ref:r})})});tf.displayName="Audio";const nf=P.forwardRef(({latitude:e,longitude:t,title:n,isReadOnly:r,...i},o)=>{const a=`https://www.google.com/maps/search/?api=1&query=${e},${t}`,{message:{blocks:{location:s}}}=ge;return k.jsxs("a",{...i,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:o,children:[k.jsx("p",{...s.title,children:n}),k.jsx(f0,{...s.icon})]})});nf.displayName="Location";const rf=P.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,messageId:a,isReadOnly:s,sendMessage:l,...c},f)=>{const{message:{blocks:{column:u}}}=ge;return k.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...u,ref:f,children:e.map((p,d)=>k.jsx(qt,{block:{...p,direction:r,timestamp:o,sender:i,messageId:a,isReadOnly:s,sendMessage:l}},d))})});rf.displayName="Column";const of=P.forwardRef(({blocks:e,horizontalAlignment:t,verticalAlignment:n,direction:r,sender:i,timestamp:o,metadata:a,messageId:s,isReadOnly:l,sendMessage:c,...f},u)=>{const{message:{blocks:{row:p}}}=ge;return k.jsx("div",{"data-horizontal":t,"data-vertical":n,...f,...p,ref:u,children:e.map((d,m)=>k.jsx(qt,{block:{...d,direction:r,timestamp:o,sender:i,messageId:s,isReadOnly:l,sendMessage:c}},m))})});of.displayName="Row";function ak(e){return Object.prototype.toString.call(e)==="[object Object]"}function af(e){return ak(e)||Array.isArray(e)}function sk(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ko(e,t){const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i!==o?!1:n.every(a=>{const s=e[a],l=t[a];return typeof s=="function"?`${s}`==`${l}`:!af(s)||!af(l)?s===l:Ko(s,l)})}function sf(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function lk(e,t){if(e.length!==t.length)return!1;const n=sf(e),r=sf(t);return n.every((i,o)=>{const a=r[o];return Ko(i,a)})}function Yo(e){return typeof e=="number"}function lf(e){return typeof e=="string"}function Qo(e){return typeof e=="boolean"}function cf(e){return Object.prototype.toString.call(e)==="[object Object]"}function Me(e){return Math.abs(e)}function Go(e){return Math.sign(e)}function Rr(e,t){return Me(e-t)}function ck(e,t){if(e===0||t===0||Me(e)<=Me(t))return 0;const n=Rr(Me(e),Me(t));return Me(n/e)}function Kn(e){return zr(e).map(Number)}function kt(e){return e[Br(e)]}function Br(e){return Math.max(0,e.length-1)}function zr(e){return Object.keys(e)}function uf(e,t){return[e,t].reduce((n,r)=>(zr(r).forEach(i=>{const o=n[i],a=r[i],s=cf(o)&&cf(a);n[i]=s?uf(o,a):a}),n),{})}function ff(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function uk(e,t){const n={start:r,center:i,end:o};function r(){return 0}function i(c){return o(c)/2}function o(c){return t-c}function a(){return t*Number(e)}function s(c){return Yo(e)?a():n[e](c)}return{measure:s}}function fk(e,t){const n=e==="y"?"y":"x",r=e==="y"?"x":"y",i=s(),o=l();function a(f){const{width:u,height:p}=f;return n==="x"?u:p}function s(){return n==="y"?"top":t==="rtl"?"right":"left"}function l(){return n==="y"?"bottom":t==="rtl"?"left":"right"}return{scroll:n,cross:r,startEdge:i,endEdge:o,measureSize:a}}function Mt(e,t){const n=Me(e-t);function r(c){return c<e}function i(c){return c>t}function o(c){return r(c)||i(c)}function a(c){return o(c)?r(c)?e:t:c}function s(c){return n?c-n*Math.ceil((c-t)/n):c}return{length:n,max:t,min:e,constrain:a,reachedAny:o,reachedMax:i,reachedMin:r,removeOffset:s}}function df(e,t,n){const{constrain:r}=Mt(0,e),i=e+1;let o=a(t);function a(p){return n?Me((i+p)%i):r(p)}function s(){return o}function l(p){return o=a(p),u}function c(p){return f().set(s()+p)}function f(){return df(e,s(),n)}const u={get:s,set:l,add:c,clone:f};return u}function dk(e){const t=e==="rtl"?-1:1;function n(i){return i*t}return{apply:n}}function Yn(){let e=[];function t(i,o,a,s={passive:!0}){return i.addEventListener(o,a,s),e.push(()=>i.removeEventListener(o,a,s)),r}function n(){e=e.filter(i=>i())}const r={add:t,clear:n};return r}function pk(e,t,n,r,i,o,a,s,l,c,f,u,p,d,m,h,g,y,b){const{cross:w}=e,C=["INPUT","SELECT","TEXTAREA"],x={passive:!1},A=Yn(),T=Yn(),M=Mt(50,225).constrain(m.measure(20)),z={mouse:300,touch:400},I={mouse:500,touch:600},O=h?43:25;let F=!1,N=0,R=0,D=!1,_=!1,U=!1,$=!1;function H(G,j){if(!j)return;function ne(K){(Qo(j)||j(G,K))&&te(K)}const se=n;A.add(se,"dragstart",K=>K.preventDefault(),x).add(se,"touchmove",()=>{},x).add(se,"touchend",()=>{}).add(se,"touchstart",ne).add(se,"mousedown",ne).add(se,"touchcancel",X).add(se,"contextmenu",X).add(se,"click",oe,!0)}function v(){A.clear(),T.clear()}function L(){const G=$?r:n;T.add(G,"touchmove",Y,x).add(G,"touchend",X).add(G,"mousemove",Y,x).add(G,"mouseup",X)}function W(G){const j=G.nodeName||"";return C.includes(j)}function S(){return(h?I:z)[$?"mouse":"touch"]}function V(G,j){const ne=p.add(Go(G)*-1),se=u.byDistance(G,!h).distance;return h||Me(G)<M?se:y&&j?se*.5:u.byIndex(ne.get(),0).distance}function te(G){const j=ff(G,i);$=j,!(j&&G.button!==0)&&(W(G.target)||(U=h&&j&&!G.buttons&&F,F=Rr(o.get(),s.get())>=2,D=!0,a.pointerDown(G),f.useFriction(0).useDuration(0),o.set(s),L(),N=a.readPoint(G),R=a.readPoint(G,w),d.emit("pointerDown")))}function Y(G){const j=a.readPoint(G),ne=a.readPoint(G,w),se=Rr(j,N),K=Rr(ne,R);if(!_&&!$&&(!G.cancelable||(_=se>K,!_)))return X(G);const Q=a.pointerMove(G);se>g&&(U=!0),f.useFriction(.3).useDuration(1),l.start(),o.add(t.apply(Q)),G.preventDefault()}function X(G){const ne=u.byDistance(0,!1).index!==p.get(),se=a.pointerUp(G)*S(),K=V(t.apply(se),ne),Q=ck(se,K),ue=O-10*Q,he=b+Q/50;_=!1,D=!1,T.clear(),f.useDuration(ue).useFriction(he),c.distance(K,!h),$=!1,d.emit("pointerUp")}function oe(G){U&&(G.stopPropagation(),G.preventDefault())}function ae(){return D}return{init:H,pointerDown:ae,destroy:v}}function hk(e,t){let r,i;function o(u){return u.timeStamp}function a(u,p){const m=`client${(p||e.scroll)==="x"?"X":"Y"}`;return(ff(u,t)?u:u.touches[0])[m]}function s(u){return r=u,i=u,a(u)}function l(u){const p=a(u)-a(i),d=o(u)-o(r)>170;return i=u,d&&(r=u),p}function c(u){if(!r||!i)return 0;const p=a(i)-a(r),d=o(u)-o(r),m=o(u)-o(i)>170,h=p/d;return d&&!m&&Me(h)>.1?h:0}return{pointerDown:s,pointerMove:l,pointerUp:c,readPoint:a}}function mk(e){function t(r){return e*(r/100)}return{measure:t}}function gk(e,t,n,r,i){let o,a,s=[],l=!1;function c(d){return i.measureSize(d.getBoundingClientRect())}function f(d,m){if(!m)return;a=c(e),s=r.map(c);function h(y){for(const b of y){const w=b.target===e,C=r.indexOf(b.target),x=w?a:s[C],A=c(w?e:r[C]);if(x!==A){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}o=new ResizeObserver(y=>{l||(Qo(m)||m(d,y))&&h(y)}),[e].concat(r).forEach(y=>o.observe(y))}function u(){o&&o.disconnect(),l=!0}return{init:f,destroy:u}}function yk(e,t,n,r){let i=!0,o=0,a=0,s=n,l=r,c=e.get(),f=0;function u(){const x=t.get()-e.get(),A=!s;let T=0;return A?(o=0,e.set(t),T=x):(o+=x/s,o*=l,c+=o,e.add(o),T=c-f),a=Go(T),f=c,i=Me(x)<.001,C}function p(){return i}function d(){return s}function m(){return a}function h(){return o}function g(){return b(n)}function y(){return w(r)}function b(x){return s=x,C}function w(x){return l=x,C}const C={direction:m,duration:d,velocity:h,seek:u,settled:p,useBaseFriction:y,useBaseDuration:g,useFriction:w,useDuration:b};return C}function bk(e,t,n,r,i){const o=i.measure(10),a=i.measure(50),s=Mt(.1,.99);let l=!1;function c(){return!(l||!e.reachedAny(n.get())||!e.reachedAny(t.get()))}function f(d){if(!c())return;const m=e.reachedMin(t.get())?"min":"max",h=Me(e[m]-t.get()),g=n.get()-t.get(),y=s.constrain(h/a);n.subtract(g*y),!d&&Me(g)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())}function u(d){l=!d}return{constrain:f,toggleActive:u}}function vk(e,t,n,r){const i=Mt(-t+e,n[0]),o=l(),a=c();function s(){const u=o[0],p=kt(o),d=o.lastIndexOf(u),m=o.indexOf(p)+1;return Mt(d,m)}function l(){return n.map(i.constrain).map(u=>parseFloat(u.toFixed(3)))}function c(){if(t<=e)return[i.max];if(r==="keepSnaps")return o;const{min:u,max:p}=s();return o.slice(u,p)}return{snapsContained:a}}function wk(e,t,n){const r=t[0],i=n?r-e:kt(t);return{limit:Mt(i,r)}}function xk(e,t,n,r){const o=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=Mt(o,a);function c(p){return p===1?l(n.get()):p===-1?s(n.get()):!1}function f(p){if(!c(p))return;const d=e*(p*-1);r.forEach(m=>m.add(d))}return{loop:f}}function kk(e){const{max:t,length:n}=e;function r(o){return(o-t)/-n}return{get:r}}function Sk(e,t,n,r,i,o,a){const{startEdge:s,endEdge:l}=e,{groupSlides:c}=o,f=d().map(t.measure),u=m(),p=h();function d(){return c(r).map(y=>kt(y)[l]-y[0][s]).map(Me)}function m(){return r.map(y=>n[s]-y[s]).map(y=>-Me(y))}function h(){const b=kt(u)-kt(i);return c(u).map(w=>w[0]).map((w,C,x)=>{const A=!C,T=C===Br(x);return a&&A?0:a&&T?b:w+f[C]})}return{snaps:u,snapsAligned:p}}function Ek(e,t,n,r,i){const{reachedAny:o,removeOffset:a,constrain:s}=r;function l(m){return m.concat().sort((h,g)=>Me(h)-Me(g))[0]}function c(m){const h=e?a(m):s(m),g=t.map(b=>b-h).map(b=>f(b,0)).map((b,w)=>({diff:b,index:w})).sort((b,w)=>Me(b.diff)-Me(w.diff)),{index:y}=g[0];return{index:y,distance:h}}function f(m,h){const g=[m,m+n,m-n];if(!e)return g[0];if(!h)return l(g);const y=g.filter(b=>Go(b)===h);return l(y)}function u(m,h){const g=t[m]-i.get(),y=f(g,h);return{index:m,distance:y}}function p(m,h){const g=i.get()+m,{index:y,distance:b}=c(g),w=!e&&o(g);if(!h||w)return{index:y,distance:m};const C=t[y]-b,x=m+f(C,0);return{index:y,distance:x}}return{byDistance:p,byIndex:u,shortcut:f}}function Ck(e,t,n,r,i,o,a){function s(u){const p=u.distance,d=u.index!==t.get();o.add(p),p&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),d&&(n.set(t.get()),t.set(u.index),a.emit("select"))}function l(u,p){const d=r.byDistance(u,p);s(d)}function c(u,p){const d=t.clone().set(u),m=r.byIndex(d.get(),p);s(m)}return{distance:l,index:c}}function $r(e){let t=e;function n(){return t}function r(l){t=a(l)}function i(l){t+=a(l)}function o(l){t-=a(l)}function a(l){return Yo(l)?l:l.get()}return{get:n,set:r,add:i,subtract:o}}function pf(e,t,n){const r=e.scroll==="x"?a:s,i=n.style;let o=!1;function a(p){return`translate3d(${p}px,0px,0px)`}function s(p){return`translate3d(0px,${p}px,0px)`}function l(p){o||(i.transform=r(t.apply(p)))}function c(p){o=!p}function f(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))}return{clear:f,to:l,toggleActive:c}}function Ak(e,t,n,r,i,o,a,s,l){const c=Kn(i),f=Kn(i).reverse(),u=h().concat(g());function p(x,A){return x.reduce((T,M)=>T-i[M],A)}function d(x,A){return x.reduce((T,M)=>p(T,A)>0?T.concat([M]):T,[])}function m(x,A){const T=A==="start",M=T?-r:r,z=a.findSlideBounds([M]);return x.map(I=>{const O=T?0:-r,F=T?r:0,R=z.filter(D=>D.index===I)[0][T?"end":"start"];return{index:I,slideLocation:$r(-1),translate:pf(e,t,l[I]),target:()=>s.get()>R?O:F}})}function h(){const x=o[0]-1,A=d(f,x);return m(A,"end")}function g(){const x=n-o[0]-1,A=d(c,x);return m(A,"start")}function y(){return u.every(({index:x})=>{const A=c.filter(T=>T!==x);return p(A,n)<=.1})}function b(){u.forEach(x=>{const{target:A,translate:T,slideLocation:M}=x,z=A();z!==M.get()&&(T.to(z),M.set(z))})}function w(){u.forEach(x=>x.translate.clear())}return{canLoop:y,clear:w,loop:b,loopPoints:u}}function Ik(e,t){let n,r=!1;function i(s,l){if(!l)return;function c(f){for(const u of f)if(u.type==="childList"){s.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(f=>{r||(Qo(l)||l(s,f))&&c(f)}),n.observe(e,{childList:!0})}function o(){n&&n.disconnect(),r=!0}return{init:i,destroy:o}}function Tk(e,t,n,r,i,o,a){const{removeOffset:s,constrain:l}=i,c=.5,f=o?[0,t,-t]:[0],u=d(f,a);function p(g){const y=g||0;return n.map(b=>Mt(c,b-c).constrain(b*y))}function d(g,y){const b=g||f,w=p(y);return b.reduce((C,x)=>{const A=r.map((T,M)=>({start:T-n[M]+w[M]+x,end:T+e-w[M]+x,index:M}));return C.concat(A)},[])}function m(g,y){const b=o?s(g):l(g);return(y||u).reduce((C,x)=>{const{index:A,start:T,end:M}=x,z=C.includes(A),I=T<b&&M>b;return!z&&I?C.concat([A]):C},[])}return{check:m,findSlideBounds:d}}function Ok(e,t,n,r,i,o){const{measureSize:a,startEdge:s,endEdge:l}=e,c=n[0]&&i,f=m(),u=h(),p=n.map(a),d=g();function m(){if(!c)return 0;const b=n[0];return Me(t[s]-b[s])}function h(){if(!c)return 0;const b=o.getComputedStyle(kt(r));return parseFloat(b.getPropertyValue(`margin-${l}`))}function g(){return n.map((b,w,C)=>{const x=!w,A=w===Br(C);return x?p[w]+f:A?p[w]+u:C[w+1][s]-b[s]}).map(Me)}return{slideSizes:p,slideSizesWithGaps:d}}function Dk(e,t,n){const r=Yo(n);function i(l,c){return Kn(l).filter(f=>f%c===0).map(f=>l.slice(f,f+c))}function o(l){return Kn(l).reduce((c,f)=>{const p=t.slice(kt(c),f+1).reduce((d,m)=>d+m,0);return!f||p>e?c.concat(f):c},[]).map((c,f,u)=>l.slice(c,u[f+1]))}function a(l){return r?i(l,n):o(l)}return{groupSlides:a}}function Mk(e,t,n,r,i,o,a,s){const{align:l,axis:c,direction:f,startIndex:u,inViewThreshold:p,loop:d,duration:m,dragFree:h,dragThreshold:g,slidesToScroll:y,skipSnaps:b,containScroll:w}=o,C=t.getBoundingClientRect(),x=n.map(he=>he.getBoundingClientRect()),A=dk(f),T=fk(c,f),M=T.measureSize(C),z=mk(M),I=uk(l,M),O=!d&&!!w,F=d||!!w,{slideSizes:N,slideSizesWithGaps:R}=Ok(T,C,x,n,F,i),D=Dk(M,R,y),{snaps:_,snapsAligned:U}=Sk(T,I,C,x,R,D,O),$=-kt(_)+kt(R),{snapsContained:H}=vk(M,$,U,w),v=O?H:U,{limit:L}=wk($,v,d),W=df(Br(v),u,d),S=W.clone(),V=Kn(n),te=({dragHandler:he,scrollBody:me,scrollBounds:De,eventHandler:Ue,animation:He,options:{loop:qe}})=>{const ee=he.pointerDown();qe||De.constrain(ee);const ce=me.seek().settled();ce&&!ee&&(He.stop(),Ue.emit("settle")),ce||Ue.emit("scroll")},Y=({scrollBody:he,translate:me,location:De,offsetLocation:Ue,scrollLooper:He,slideLooper:qe,options:{loop:ee}},ce)=>{const B=he.velocity();Ue.set(De.get()-B+B*ce),ee&&(He.loop(he.direction()),qe.loop()),me.to(Ue.get())},X={start:()=>s.start(ue),stop:()=>s.stop(ue),update:()=>te(ue),render:he=>Y(ue,he)},oe=.68,ae=v[W.get()],J=$r(ae),G=$r(ae),j=$r(ae),ne=yk(J,j,m,oe),se=Ek(d,v,$,L,j),K=Ck(X,W,S,se,ne,j,a),Q=Tk(M,$,N,_,L,d,p),ue={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:C,slideRects:x,animation:X,axis:T,direction:A,dragHandler:pk(T,A,e,r,i,j,hk(T,i),J,X,K,ne,se,W,a,z,h,g,b,oe),eventStore:Yn(),percentOfView:z,index:W,indexPrevious:S,limit:L,location:J,offsetLocation:G,options:o,resizeHandler:gk(t,a,i,n,T),scrollBody:ne,scrollBounds:bk(L,J,j,ne,z),scrollLooper:xk($,L,G,[J,G,j]),scrollProgress:kk(L),scrollSnaps:v,scrollTarget:se,scrollTo:K,slideLooper:Ak(T,A,M,$,R,v,Q,G,n),slidesHandler:Ik(t,a),slidesInView:Q,slideIndexes:V,slidesToScroll:D,target:j,translate:pf(T,A,t)};return ue}function Pk(e){const t=16.666666666666668;let n=[],r=null,i=0,o=0;function a(u){r||(r=u);const p=u-r;for(r=u,i+=p;i>=t;)n.forEach(({animation:m})=>m.update()),i-=t;const d=Me(i/t);n.forEach(({animation:m})=>m.render(d)),o&&e.requestAnimationFrame(a)}function s(u){n.includes(u)||n.push(u),!o&&(o=e.requestAnimationFrame(a))}function l(u){n=n.filter(p=>p!==u),!n.length&&(e.cancelAnimationFrame(o),r=null,i=0,o=0)}function c(){r=null,i=0}return{start:s,stop:l,reset:c,window:e}}function Nk(){const e={};let t;function n(l){t=l}function r(l){return e[l]||[]}function i(l){return r(l).forEach(c=>c(t,l)),s}function o(l,c){return e[l]=r(l).concat([c]),s}function a(l,c){return e[l]=r(l).filter(f=>f!==c),s}const s={init:n,emit:i,off:a,on:o};return s}const _k={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 Lk(e){function t(o,a){return uf(o,a||{})}function n(o){const a=o.breakpoints||{},s=zr(a).filter(l=>e.matchMedia(l).matches).map(l=>a[l]).reduce((l,c)=>t(l,c),{});return t(o,s)}function r(o){return o.map(a=>zr(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function Fk(e){let t=[];function n(o,a){return t=o.filter(({options:s})=>e.optionsAtMedia(s).active!==!1),t.forEach(s=>s.init(a,e)),o.reduce((s,l)=>Object.assign(s,{[l.name]:l}),{})}function r(){t=t.filter(o=>o.destroy())}return{init:n,destroy:r}}function sn(e,t,n){const r=e.ownerDocument,i=r.defaultView,o=Lk(i),a=Fk(o),s=Yn(),l=Yn(),c=Nk(),{animationRealms:f}=sn,{mergeOptions:u,optionsAtMedia:p,optionsMediaQueries:d}=o,{on:m,off:h,emit:g}=c,y=N;let b=!1,w,C=u(_k,sn.globalOptions),x=u(C),A=[],T,M,z;function I(){const{container:ne,slides:se}=x;M=(lf(ne)?e.querySelector(ne):ne)||e.children[0];const Q=lf(se)?M.querySelectorAll(se):se;z=[].slice.call(Q||M.children)}function O(ne,se){const K=Mk(e,M,z,r,i,ne,c,se);if(ne.loop&&!K.slideLooper.canLoop()){const Q=Object.assign({},ne,{loop:!1});return O(Q,se)}return K}function F(ne,se){if(b)return;const K=f.find(ue=>ue.window===i),Q=K||Pk(i);K||f.push(Q),C=u(C,ne),x=p(C),A=se||A,I(),w=O(x,Q),d([C,...A.map(({options:ue})=>ue)]).forEach(ue=>s.add(ue,"change",N)),x.active&&(w.translate.to(w.location.get()),w.eventHandler.init(j),w.resizeHandler.init(j,x.watchResize),w.slidesHandler.init(j,x.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&Q.reset()}),w.options.loop&&w.slideLooper.loop(),M.offsetParent&&z.length&&w.dragHandler.init(j,x.watchDrag),T=a.init(A,j))}function N(ne,se){const K=te();R(),F(u({startIndex:K},ne),se),c.emit("reInit")}function R(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),a.destroy(),s.clear(),l.clear()}function D(){b||(b=!0,s.clear(),R(),c.emit("destroy"))}function _(ne){const se=w[ne?"target":"location"].get(),K=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[K](se))}function U(ne){const se=_(ne);return w.slideIndexes.filter(K=>!se.includes(K))}function $(ne,se,K){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(se?0:x.duration),w.scrollTo.index(ne,K||0))}function H(ne){const se=w.index.add(1).get();$(se,ne===!0,-1)}function v(ne){const se=w.index.add(-1).get();$(se,ne===!0,1)}function L(){return w.index.add(1).get()!==te()}function W(){return w.index.add(-1).get()!==te()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function V(){return w.scrollProgress.get(w.location.get())}function te(){return w.index.get()}function Y(){return w.indexPrevious.get()}function X(){return T}function oe(){return w}function ae(){return e}function J(){return M}function G(){return z}const j={canScrollNext:L,canScrollPrev:W,containerNode:J,internalEngine:oe,destroy:D,off:h,on:m,emit:g,plugins:X,previousScrollSnap:Y,reInit:y,rootNode:ae,scrollNext:H,scrollPrev:v,scrollProgress:V,scrollSnapList:S,scrollTo:$,selectedScrollSnap:te,slideNodes:G,slidesInView:_,slidesNotInView:U};return F(t,n),setTimeout(()=>c.emit("init"),0),j}sn.animationRealms=[],sn.globalOptions=void 0;function Jo(e={},t=[]){const n=P.useRef(e),r=P.useRef(t),[i,o]=P.useState(),[a,s]=P.useState(),l=P.useCallback(()=>{i&&i.reInit(n.current,r.current)},[i]);return P.useEffect(()=>{if(sk()&&a){sn.globalOptions=Jo.globalOptions;const c=sn(a,n.current,r.current);return o(c),()=>c.destroy()}else o(void 0)},[a,o]),P.useEffect(()=>{Ko(n.current,e)||(n.current=e,l())},[e,l]),P.useEffect(()=>{lk(r.current,t)||(r.current=t,l())},[t,l]),[s,i]}Jo.globalOptions=void 0;const hf=P.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:i,isReadOnly:o,sendMessage:a,addMessageFeedback:s},l)=>{const[c,f]=Jo({skipSnaps:!0,loop:!0}),[u,p]=P.useState(!0),[d,m]=P.useState(!0),h=P.useCallback(()=>f==null?void 0:f.scrollPrev(),[f]),g=P.useCallback(()=>f==null?void 0:f.scrollNext(),[f]),{message:{blocks:{carousel:y}}}=ge,b=P.useCallback(w=>{p(!w.canScrollPrev()),m(!w.canScrollNext())},[]);return P.useEffect(()=>{f&&(b(f),f.on("reInit",b),f.on("select",b))},[f,b]),k.jsxs("div",{...y==null?void 0:y.container,"data-container":"carousel",ref:c,children:[k.jsx("div",{ref:l,...y==null?void 0:y.slidesContainer,children:e.map((w,C)=>k.jsx(qt,{block:{...w,direction:t,timestamp:r,sender:n,messageId:i,sendMessage:a,isReadOnly:o}},C))}),e.length>1&&k.jsxs(k.Fragment,{children:[k.jsx(e0,{...y==null?void 0:y.backButton,"data-disabled":u?"":void 0,onClick:h}),k.jsx(t0,{...y==null?void 0:y.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});hf.displayName="Carousel";const mf=Math.floor;function gf(e){return yf(e)?(e.nodeName||"").toLowerCase():"#document"}function Qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Rk(e){var t;return(t=(yf(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function yf(e){return e instanceof Node||e instanceof Qn(e).Node}function ot(e){return e instanceof Element||e instanceof Qn(e).Element}function ln(e){return e instanceof HTMLElement||e instanceof Qn(e).HTMLElement}function Zo(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Qn(e).ShadowRoot}function Bk(e){return["html","body","#document"].includes(gf(e))}function zk(e){return Qn(e).getComputedStyle(e)}function $k(e){if(gf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Zo(e)&&e.host||Rk(e);return Zo(t)?t.host:t}function Pt(e){let t=e.activeElement;for(;((n=t)==null||(r=n.shadowRoot)==null?void 0:r.activeElement)!=null;){var n,r;t=t.shadowRoot.activeElement}return t}function Ye(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Zo(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function bf(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function jk(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(t=>{let{brand:n,version:r}=t;return n+"/"+r}).join(" "):navigator.userAgent}function vf(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(bf())||t.test(jk()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function wf(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 xf(){return/apple/i.test(navigator.vendor)}function Uk(){return bf().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function kf(e,t){return["mouse","pen"].includes(e)}function Hk(e){return"nativeEvent"in e}function Wk(e){return e.matches("html,body")}function st(e){return(e==null?void 0:e.ownerDocument)||document}function Xo(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Sf(e){return"composedPath"in e?e.composedPath()[0]:e.target}const Vk="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ef(e){return ln(e)&&e.matches(Vk)}function Re(e){e.preventDefault(),e.stopPropagation()}const cn=Math.min,Je=Math.max,jr=Math.round,Ur=Math.floor,ht=e=>({x:e,y:e});function Cf(e,t,n){return Je(e,cn(t,n))}function Hr(e,t){return typeof e=="function"?e(t):e}function Gn(e){return e.split("-")[0]}function ea(e){return e.split("-")[1]}function Af(e){return e==="x"?"y":"x"}function qk(e){return e==="y"?"height":"width"}function Jn(e){return["top","bottom"].includes(Gn(e))?"y":"x"}function Kk(e){return Af(Jn(e))}function Yk(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qk(e){return typeof e!="number"?Yk(e):{top:e,right:e,bottom:e,left:e}}function Wr(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function If(e,t,n){let{reference:r,floating:i}=e;const o=Jn(t),a=Kk(t),s=qk(a),l=Gn(t),c=o==="y",f=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,p=r[s]/2-i[s]/2;let d;switch(l){case"top":d={x:f,y:r.y-i.height};break;case"bottom":d={x:f,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:u};break;case"left":d={x:r.x-i.width,y:u};break;default:d={x:r.x,y:r.y}}switch(ea(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const Gk=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,s=o.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=If(c,r,l),p=r,d={},m=0;for(let h=0;h<s.length;h++){const{name:g,fn:y}=s[h],{x:b,y:w,data:C,reset:x}=await y({x:f,y:u,initialPlacement:r,placement:p,strategy:i,middlewareData:d,rects:c,platform:a,elements:{reference:e,floating:t}});f=b??f,u=w??u,d={...d,[g]:{...d[g],...C}},x&&m<=50&&(m++,typeof x=="object"&&(x.placement&&(p=x.placement),x.rects&&(c=x.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:f,y:u}=If(c,p,l)),h=-1)}return{x:f,y:u,placement:p,strategy:i,middlewareData:d}};async function Tf(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:p=!1,padding:d=0}=Hr(t,e),m=Qk(d),g=s[p?u==="floating"?"reference":"floating":u],y=Wr(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(g)))==null||n?g:g.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(s.floating)),boundary:c,rootBoundary:f,strategy:l})),b=u==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,w=await(o.getOffsetParent==null?void 0:o.getOffsetParent(s.floating)),C=await(o.isElement==null?void 0:o.isElement(w))?await(o.getScale==null?void 0:o.getScale(w))||{x:1,y:1}:{x:1,y:1},x=Wr(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(y.top-x.top+m.top)/C.y,bottom:(x.bottom-y.bottom+m.bottom)/C.y,left:(y.left-x.left+m.left)/C.x,right:(x.right-y.right+m.right)/C.x}}async function Jk(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Gn(n),s=ea(n),l=Jn(n)==="y",c=["left","top"].includes(a)?-1:1,f=o&&l?-1:1,u=Hr(t,e);let{mainAxis:p,crossAxis:d,alignmentAxis:m}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return s&&typeof m=="number"&&(d=s==="end"?m*-1:m),l?{x:d*f,y:p*c}:{x:p*c,y:d*f}}const Zk=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:s}=t,l=await Jk(t,e);return a===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:o+l.y,data:{...l,placement:a}}}}},Xk=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:a=!1,limiter:s={fn:g=>{let{x:y,y:b}=g;return{x:y,y:b}}},...l}=Hr(e,t),c={x:n,y:r},f=await Tf(t,l),u=Jn(Gn(i)),p=Af(u);let d=c[p],m=c[u];if(o){const g=p==="y"?"top":"left",y=p==="y"?"bottom":"right",b=d+f[g],w=d-f[y];d=Cf(b,d,w)}if(a){const g=u==="y"?"top":"left",y=u==="y"?"bottom":"right",b=m+f[g],w=m-f[y];m=Cf(b,m,w)}const h=s.fn({...t,[p]:d,[u]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[p]:o,[u]:a}}}}}},e1=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:s}=t,{apply:l=()=>{},...c}=Hr(e,t),f=await Tf(t,c),u=Gn(i),p=ea(i),d=Jn(i)==="y",{width:m,height:h}=o.floating;let g,y;u==="top"||u==="bottom"?(g=u,y=p===(await(a.isRTL==null?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=u,g=p==="end"?"top":"bottom");const b=h-f.top-f.bottom,w=m-f.left-f.right,C=cn(h-f[g],b),x=cn(m-f[y],w),A=!t.middlewareData.shift;let T=C,M=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=b),A&&!p){const I=Je(f.left,0),O=Je(f.right,0),F=Je(f.top,0),N=Je(f.bottom,0);d?M=m-2*(I!==0||O!==0?I+O:Je(f.left,f.right)):T=h-2*(F!==0||N!==0?F+N:Je(f.top,f.bottom))}await l({...t,availableWidth:M,availableHeight:T});const z=await a.getDimensions(s.floating);return m!==z.width||h!==z.height?{reset:{rects:!0}}:{}}}};function Vr(){return typeof window<"u"}function un(e){return Of(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function mt(e){var t;return(t=(Of(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Of(e){return Vr()?e instanceof Node||e instanceof Ze(e).Node:!1}function lt(e){return Vr()?e instanceof Element||e instanceof Ze(e).Element:!1}function gt(e){return Vr()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function Df(e){return!Vr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}function Zn(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ct(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(i)}function t1(e){return["table","td","th"].includes(un(e))}function qr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ta(e){const t=na(),n=lt(e)?ct(e):e;return["transform","translate","scale","rotate","perspective"].some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function n1(e){let t=Nt(e);for(;gt(t)&&!fn(t);){if(ta(t))return t;if(qr(t))return null;t=Nt(t)}return null}function na(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function fn(e){return["html","body","#document"].includes(un(e))}function ct(e){return Ze(e).getComputedStyle(e)}function Kr(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nt(e){if(un(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Df(e)&&e.host||mt(e);return Df(t)?t.host:t}function Mf(e){const t=Nt(e);return fn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&Zn(t)?t:Mf(t)}function _t(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=Mf(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=Ze(i);if(o){const s=ra(a);return t.concat(a,a.visualViewport||[],Zn(i)?i:[],s&&n?_t(s):[])}return t.concat(i,_t(i,[],n))}function ra(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Pf(e){const t=ct(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=gt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,s=jr(n)!==o||jr(r)!==a;return s&&(n=o,r=a),{width:n,height:r,$:s}}function ia(e){return lt(e)?e:e.contextElement}function dn(e){const t=ia(e);if(!gt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Pf(t);let a=(o?jr(n.width):n.width)/r,s=(o?jr(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const r1=ht(0);function Nf(e){const t=Ze(e);return!na()||!t.visualViewport?r1:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function i1(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Vt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=ia(e);let a=ht(1);t&&(r?lt(r)&&(a=dn(r)):a=dn(e));const s=i1(o,n,r)?Nf(o):ht(0);let l=(i.left+s.x)/a.x,c=(i.top+s.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(o){const p=Ze(o),d=r&<(r)?Ze(r):r;let m=p,h=ra(m);for(;h&&r&&d!==m;){const g=dn(h),y=h.getBoundingClientRect(),b=ct(h),w=y.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,C=y.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,f*=g.x,u*=g.y,l+=w,c+=C,m=Ze(h),h=ra(m)}}return Wr({width:f,height:u,x:l,y:c})}function oa(e,t){const n=Kr(e).scrollLeft;return t?t.left+n:Vt(mt(e)).left+n}function _f(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),i=r.left+t.scrollLeft-(n?0:oa(e,r)),o=r.top+t.scrollTop;return{x:i,y:o}}function o1(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=mt(r),s=t?qr(t.floating):!1;if(r===a||s&&o)return n;let l={scrollLeft:0,scrollTop:0},c=ht(1);const f=ht(0),u=gt(r);if((u||!u&&!o)&&((un(r)!=="body"||Zn(a))&&(l=Kr(r)),gt(r))){const d=Vt(r);c=dn(r),f.x=d.x+r.clientLeft,f.y=d.y+r.clientTop}const p=a&&!u&&!o?_f(a,l,!0):ht(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+p.x,y:n.y*c.y-l.scrollTop*c.y+f.y+p.y}}function a1(e){return Array.from(e.getClientRects())}function s1(e){const t=mt(e),n=Kr(e),r=e.ownerDocument.body,i=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+oa(e);const s=-n.scrollTop;return ct(r).direction==="rtl"&&(a+=Je(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:s}}function l1(e,t){const n=Ze(e),r=mt(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;const c=na();(!c||c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s,y:l}}function c1(e,t){const n=Vt(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=gt(e)?dn(e):ht(1),a=e.clientWidth*o.x,s=e.clientHeight*o.y,l=i*o.x,c=r*o.y;return{width:a,height:s,x:l,y:c}}function Lf(e,t,n){let r;if(t==="viewport")r=l1(e,n);else if(t==="document")r=s1(mt(e));else if(lt(t))r=c1(t,n);else{const i=Nf(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Wr(r)}function Ff(e,t){const n=Nt(e);return n===t||!lt(n)||fn(n)?!1:ct(n).position==="fixed"||Ff(n,t)}function u1(e,t){const n=t.get(e);if(n)return n;let r=_t(e,[],!1).filter(s=>lt(s)&&un(s)!=="body"),i=null;const o=ct(e).position==="fixed";let a=o?Nt(e):e;for(;lt(a)&&!fn(a);){const s=ct(a),l=ta(a);!l&&s.position==="fixed"&&(i=null),(o?!l&&!i:!l&&s.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Zn(a)&&!l&&Ff(e,a))?r=r.filter(f=>f!==a):i=s,a=Nt(a)}return t.set(e,r),r}function f1(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?qr(t)?[]:u1(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,f)=>{const u=Lf(t,f,i);return c.top=Je(u.top,c.top),c.right=cn(u.right,c.right),c.bottom=cn(u.bottom,c.bottom),c.left=Je(u.left,c.left),c},Lf(t,s,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function d1(e){const{width:t,height:n}=Pf(e);return{width:t,height:n}}function p1(e,t,n){const r=gt(t),i=mt(t),o=n==="fixed",a=Vt(e,!0,o,t);let s={scrollLeft:0,scrollTop:0};const l=ht(0);function c(){l.x=oa(i)}if(r||!r&&!o)if((un(t)!=="body"||Zn(i))&&(s=Kr(t)),r){const d=Vt(t,!0,o,t);l.x=d.x+t.clientLeft,l.y=d.y+t.clientTop}else i&&c();o&&!r&&i&&c();const f=i&&!r&&!o?_f(i,s):ht(0),u=a.left+s.scrollLeft-l.x-f.x,p=a.top+s.scrollTop-l.y-f.y;return{x:u,y:p,width:a.width,height:a.height}}function aa(e){return ct(e).position==="static"}function Rf(e,t){if(!gt(e)||ct(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return mt(e)===n&&(n=n.ownerDocument.body),n}function Bf(e,t){const n=Ze(e);if(qr(e))return n;if(!gt(e)){let i=Nt(e);for(;i&&!fn(i);){if(lt(i)&&!aa(i))return i;i=Nt(i)}return n}let r=Rf(e,t);for(;r&&t1(r)&&aa(r);)r=Rf(r,t);return r&&fn(r)&&aa(r)&&!ta(r)?n:r||n1(e)||n}const h1=async function(e){const t=this.getOffsetParent||Bf,n=this.getDimensions,r=await n(e.floating);return{reference:p1(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function m1(e){return ct(e).direction==="rtl"}const g1={convertOffsetParentRelativeRectToViewportRelativeRect:o1,getDocumentElement:mt,getClippingRect:f1,getOffsetParent:Bf,getElementRects:h1,getClientRects:a1,getDimensions:d1,getScale:dn,isElement:lt,isRTL:m1};function zf(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function y1(e,t){let n=null,r;const i=mt(e);function o(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function a(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),o();const c=e.getBoundingClientRect(),{left:f,top:u,width:p,height:d}=c;if(s||t(),!p||!d)return;const m=Ur(u),h=Ur(i.clientWidth-(f+p)),g=Ur(i.clientHeight-(u+d)),y=Ur(f),w={rootMargin:-m+"px "+-h+"px "+-g+"px "+-y+"px",threshold:Je(0,cn(1,l))||1};let C=!0;function x(A){const T=A[0].intersectionRatio;if(T!==l){if(!C)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!zf(c,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(x,{...w,root:i.ownerDocument})}catch{n=new IntersectionObserver(x,w)}n.observe(e)}return a(!0),o}function b1(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=ia(e),f=i||o?[...c?_t(c):[],..._t(t)]:[];f.forEach(y=>{i&&y.addEventListener("scroll",n,{passive:!0}),o&&y.addEventListener("resize",n)});const u=c&&s?y1(c,n):null;let p=-1,d=null;a&&(d=new ResizeObserver(y=>{let[b]=y;b&&b.target===c&&d&&(d.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=d)==null||w.observe(t)})),n()}),c&&!l&&d.observe(c),d.observe(t));let m,h=l?Vt(e):null;l&&g();function g(){const y=Vt(e);h&&!zf(h,y)&&n(),h=y,m=requestAnimationFrame(g)}return n(),()=>{var y;f.forEach(b=>{i&&b.removeEventListener("scroll",n),o&&b.removeEventListener("resize",n)}),u==null||u(),(y=d)==null||y.disconnect(),d=null,l&&cancelAnimationFrame(m)}}const v1=Zk,w1=Xk,x1=e1,k1=(e,t,n)=>{const r=new Map,i={platform:g1,...n},o={...i.platform,_c:r};return Gk(e,t,{...i,platform:o})};var Yr=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Qr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Qr(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!Qr(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function $f(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jf(e,t){const n=$f(e);return Math.round(t*n)/n}function sa(e){const t=E.useRef(e);return Yr(()=>{t.current=e}),t}function S1(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[f,u]=E.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=E.useState(r);Qr(p,r)||d(r);const[m,h]=E.useState(null),[g,y]=E.useState(null),b=E.useCallback($=>{$!==A.current&&(A.current=$,h($))},[]),w=E.useCallback($=>{$!==T.current&&(T.current=$,y($))},[]),C=o||m,x=a||g,A=E.useRef(null),T=E.useRef(null),M=E.useRef(f),z=l!=null,I=sa(l),O=sa(i),F=sa(c),N=E.useCallback(()=>{if(!A.current||!T.current)return;const $={placement:t,strategy:n,middleware:p};O.current&&($.platform=O.current),k1(A.current,T.current,$).then(H=>{const v={...H,isPositioned:F.current!==!1};R.current&&!Qr(M.current,v)&&(M.current=v,Es.flushSync(()=>{u(v)}))})},[p,t,n,O,F]);Yr(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u($=>({...$,isPositioned:!1})))},[c]);const R=E.useRef(!1);Yr(()=>(R.current=!0,()=>{R.current=!1}),[]),Yr(()=>{if(C&&(A.current=C),x&&(T.current=x),C&&x){if(I.current)return I.current(C,x,N);N()}},[C,x,N,I,z]);const D=E.useMemo(()=>({reference:A,floating:T,setReference:b,setFloating:w}),[b,w]),_=E.useMemo(()=>({reference:C,floating:x}),[C,x]),U=E.useMemo(()=>{const $={position:n,left:0,top:0};if(!_.floating)return $;const H=jf(_.floating,f.x),v=jf(_.floating,f.y);return s?{...$,transform:"translate("+H+"px, "+v+"px)",...$f(_.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:H,top:v}},[n,s,_.floating,f.x,f.y]);return E.useMemo(()=>({...f,update:N,refs:D,elements:_,floatingStyles:U}),[f,N,D,_,U])}const E1=(e,t)=>({...v1(e),options:[e,t]}),C1=(e,t)=>({...w1(e),options:[e,t]}),A1=(e,t)=>({...x1(e),options:[e,t]});/*!
|
|
254
254
|
* tabbable 6.2.0
|
|
255
255
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
256
|
-
*/var h_=["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])"],fc=h_.join(","),wg=typeof Element>"u",So=wg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ji=!wg&&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},Zi=function e(t,n){var r;n===void 0&&(n=!0);var o=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),i=o===""||o==="true",a=i||n&&t&&e(t.parentNode);return a},v_=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},m_=function(t,n,r){if(Zi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(fc));return n&&So.call(t,fc)&&o.unshift(t),o=o.filter(r),o},g_=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Zi(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?o.push.apply(o,c):o.push({scopeParent:a,candidates:c})}else{var u=So.call(a,fc);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Zi(f,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(f&&p){var d=e(f===!0?a.children:f.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:a,candidates:d})}else i.unshift.apply(i,a.children)}}return o},Sg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},xg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v_(t))&&!Sg(t)?0:t.tabIndex},y_=function(t,n){var r=xg(t);return r<0&&n&&!Sg(t)?0:r},b_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Eg=function(t){return t.tagName==="INPUT"},w_=function(t){return Eg(t)&&t.type==="hidden"},S_=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},x_=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},E_=function(t){if(!t.name)return!0;var n=t.form||Ji(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(t.name));else try{o=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var i=x_(o,t.form);return!i||i===t},k_=function(t){return Eg(t)&&t.type==="radio"},C_=function(t){return k_(t)&&!E_(t)},A_=function(t){var n,r=t&&Ji(t),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==t){var a,s,l;for(i=!!((a=o)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(o)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!i&&o;){var c,u,f;r=Ji(o),o=(c=r)===null||c===void 0?void 0:c.host,i=!!((u=o)!==null&&u!==void 0&&(f=u.ownerDocument)!==null&&f!==void 0&&f.contains(o))}}return i},kg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},$_=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=So.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(So.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof o=="function"){for(var s=t;t;){var l=t.parentElement,c=Ji(t);if(l&&!l.shadowRoot&&o(l)===!0)return kg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(A_(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return kg(t);return!1},T_=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return So.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},O_=function(t,n){return!(n.disabled||Zi(n)||w_(n)||$_(n,t)||S_(n)||T_(n))},Cg=function(t,n){return!(C_(n)||xg(n)<0||!O_(t,n))},I_=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},P_=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=y_(s,a),c=a?e(o.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:i,tabIndex:l,item:o,isScope:a,content:c})}),r.sort(b_).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},dc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=g_([t],n.includeContainer,{filter:Cg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:I_}):r=m_(t,n.includeContainer,Cg.bind(null,n)),P_(r)};const pc="ArrowUp",Xi="ArrowDown",br="ArrowLeft",xo="ArrowRight";function ea(e,t,n){return Math.floor(e/t)!==n}function Eo(e,t){return t<0||t>=e.current.length}function hc(e,t){return ct(e,{disabledIndices:t})}function Ag(e,t){return ct(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ct(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:o,amount:i=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-i:i)}while(s>=0&&s<=a.length-1&&(o?o.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function D_(e,t){let{event:n,orientation:r,loop:o,cols:i,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:u=!1}=t,f=c;if(n.key===pc){if(u&&ot(n),c===-1)f=l;else if(f=ct(e,{startingIndex:f,amount:i,decrement:!0,disabledIndices:a}),o&&(c-i<s||f<0)){const p=c%i,d=l%i,v=l-(d-p);d===p?f=l:f=d>p?v:v-i}Eo(e,f)&&(f=c)}if(n.key===Xi&&(u&&ot(n),c===-1?f=s:(f=ct(e,{startingIndex:c,amount:i,disabledIndices:a}),o&&c+i>l&&(f=ct(e,{startingIndex:c%i-i,amount:i,disabledIndices:a}))),Eo(e,f)&&(f=c)),r==="both"){const p=qm(c/i);n.key===xo&&(u&&ot(n),c%i!==i-1?(f=ct(e,{startingIndex:c,disabledIndices:a}),o&&ea(f,i,p)&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a})),ea(f,i,p)&&(f=c)),n.key===br&&(u&&ot(n),c%i!==0?(f=ct(e,{startingIndex:c,disabledIndices:a,decrement:!0}),o&&ea(f,i,p)&&(f=ct(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a}))):o&&(f=ct(e,{startingIndex:c+(i-c%i),decrement:!0,disabledIndices:a})),ea(f,i,p)&&(f=c));const d=qm(l/i)===p;Eo(e,f)&&(o&&d?f=n.key===br?l:ct(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let $g=0;function dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame($g);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():$g=requestAnimationFrame(i)}var Ye=typeof document<"u"?O.useLayoutEffect:O.useEffect;function ta(){return ta=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ta.apply(this,arguments)}let vc=!1,__=0;const Tg=()=>"floating-ui-"+__++;function M_(){const[e,t]=C.useState(()=>vc?Tg():void 0);return Ye(()=>{e==null&&t(Tg())},[]),C.useEffect(()=>{vc||(vc=!0)},[]),e}const mc=C.useId||M_;function N_(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(o=>o(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(o=>o!==n))||[])}}}const R_=C.createContext(null),L_=C.createContext(null),Og=()=>{var e;return((e=C.useContext(R_))==null?void 0:e.id)||null},na=()=>C.useContext(L_);function ko(e){return"data-floating-ui-"+e}function $n(e){const t=O.useRef(e);return Ye(()=>{t.current=e}),t}function F_(e,t){var n;let r=[],o=(n=e.find(i=>i.id===t))==null?void 0:n.parentId;for(;o;){const i=e.find(a=>a.id===o);o=i==null?void 0:i.parentId,i&&(r=r.concat(i))}return r}function wr(e,t){let n=e.filter(o=>{var i;return o.parentId===t&&((i=o.context)==null?void 0:i.open)}),r=n;for(;r.length;)r=e.filter(o=>{var i;return(i=r)==null?void 0:i.some(a=>{var s;return o.parentId===a.id&&((s=o.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function B_(e,t){let n,r=-1;function o(i,a){a>r&&(n=i,r=a),wr(e,i).forEach(l=>{o(l.id,a+1)})}return o(t,0),e.find(i=>i.id===n)}let Sr=new WeakMap,ra=new WeakSet,oa={},gc=0;const j_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Ig=e=>e&&(e.host||Ig(e.parentNode)),z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Ig(n);return e.contains(r)?r:null}).filter(n=>n!=null);function U_(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=z_(t,e),s=new Set,l=new Set(a),c=[];oa[o]||(oa[o]=new WeakMap);const u=oa[o];a.forEach(f),p(t),s.clear();function f(d){!d||s.has(d)||(s.add(d),d.parentNode&&f(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,v=>{if(s.has(v))p(v);else{const h=i?v.getAttribute(i):null,g=h!==null&&h!=="false",m=(Sr.get(v)||0)+1,b=(u.get(v)||0)+1;Sr.set(v,m),u.set(v,b),c.push(v),m===1&&g&&ra.add(v),b===1&&v.setAttribute(o,""),!g&&i&&v.setAttribute(i,"true")}})}return gc++,()=>{c.forEach(d=>{const v=(Sr.get(d)||0)-1,h=(u.get(d)||0)-1;Sr.set(d,v),u.set(d,h),v||(!ra.has(d)&&i&&d.removeAttribute(i),ra.delete(d)),h||d.removeAttribute(o)}),gc--,gc||(Sr=new WeakMap,Sr=new WeakMap,ra=new WeakSet,oa={})}}function Pg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ft(e[0]).body;return U_(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const yc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Dg(e,t){const n=dc(e,yc());t==="prev"&&n.reverse();const r=n.indexOf(kn(Ft(e)));return n.slice(r+1)[0]}function _g(){return Dg(document.body,"next")}function Mg(){return Dg(document.body,"prev")}function Co(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!bt(n,r)}function W_(e){dc(e,yc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function H_(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const bc={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 V_;function Ng(e){e.key==="Tab"&&(e.target,clearTimeout(V_))}const ia=C.forwardRef(function(t,n){const[r,o]=C.useState();Ye(()=>(Xm()&&o("button"),document.addEventListener("keydown",Ng),()=>{document.removeEventListener("keydown",Ng)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[ko("focus-guard")]:"",style:bc};return C.createElement("span",ta({},t,i))}),Rg=C.createContext(null);function K_(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=C.useState(null),i=mc(),a=Lg(),s=C.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=C.useRef();return Ye(()=>()=>{r==null||r.remove()},[r,s]),Ye(()=>{if(l.current===s)return;l.current=s;const{id:c,root:u,portalContext:f,uniqueId:p}=s,d=c?document.getElementById(c):null,v=ko("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(v,""),d.appendChild(h),o(h)}else{let h=u||(f==null?void 0:f.portalNode);h&&!Mt(h)&&(h=h.current),h=h||document.body;let g=null;c&&(g=document.createElement("div"),g.id=c,h.appendChild(g));const m=document.createElement("div");m.id=p,m.setAttribute(v,""),h=g||h,h.appendChild(m),o(m)}},[s]),r}function q_(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=K_({id:n,root:r}),[a,s]=C.useState(null),l=C.useRef(null),c=C.useRef(null),u=C.useRef(null),f=C.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return C.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(v){i&&Co(v)&&(v.type==="focusin"?H_:W_)(i)}return i.addEventListener("focusin",d,!0),i.addEventListener("focusout",d,!0),()=>{i.removeEventListener("focusin",d,!0),i.removeEventListener("focusout",d,!0)}},[i,o,a==null?void 0:a.modal]),C.createElement(Rg.Provider,{value:C.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&C.createElement(ia,{"data-type":"outside",ref:l,onFocus:d=>{if(Co(d,i)){var v;(v=u.current)==null||v.focus()}else{const h=Mg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&i&&C.createElement("span",{"aria-owns":i.id,style:bc}),i&&np.createPortal(t,i),p&&i&&C.createElement(ia,{"data-type":"outside",ref:c,onFocus:d=>{if(Co(d,i)){var v;(v=f.current)==null||v.focus()}else{const h=_g()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Lg=()=>C.useContext(Rg),G_=C.forwardRef(function(t,n){return C.createElement("button",ta({},t,{type:"button",ref:n,tabIndex:-1,style:bc}))});function Y_(e){const{context:t,children:n,disabled:r=!1,order:o=["content"],guards:i=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:u=!0}=e,{open:f,refs:p,nodeId:d,onOpenChange:v,events:h,dataRef:g,elements:{domReference:m,floating:b}}=t,w=j_()?i:!0,A=$n(o),x=$n(a),k=$n(s),$=na(),R=Lg(),H=typeof a=="number"&&a<0,T=C.useRef(null),_=C.useRef(null),F=C.useRef(!1),N=C.useRef(null),B=C.useRef(!1),D=R!=null,M=m&&m.getAttribute("role")==="combobox"&&ng(m)&&H,G=C.useCallback(function(P){return P===void 0&&(P=b),P?dc(P,yc()):[]},[b]),U=C.useCallback(P=>{const j=G(P);return A.current.map(S=>m&&S==="reference"?m:b&&S==="floating"?b:j).filter(Boolean).flat()},[m,b,A,G]);C.useEffect(()=>{if(r||!l)return;function P(S){if(S.key==="Tab"){bt(b,kn(Ft(b)))&&G().length===0&&!M&&ot(S);const V=U(),Y=tg(S);A.current[0]==="reference"&&Y===m&&(ot(S),S.shiftKey?dn(V[V.length-1]):dn(V[1])),A.current[1]==="floating"&&Y===b&&S.shiftKey&&(ot(S),dn(V[0]))}}const j=Ft(b);return j.addEventListener("keydown",P),()=>{j.removeEventListener("keydown",P)}},[r,m,b,l,A,p,M,G,U]),C.useEffect(()=>{if(r||!u)return;function P(){B.current=!0,setTimeout(()=>{B.current=!1})}function j(S){const V=S.relatedTarget;queueMicrotask(()=>{const Y=!(bt(m,V)||bt(b,V)||bt(V,b)||bt(R==null?void 0:R.portalNode,V)||V!=null&&V.hasAttribute(ko("focus-guard"))||$&&(wr($.nodesRef.current,d).find(q=>{var Q,X;return bt((Q=q.context)==null?void 0:Q.elements.floating,V)||bt((X=q.context)==null?void 0:X.elements.domReference,V)})||F_($.nodesRef.current,d).find(q=>{var Q,X;return((Q=q.context)==null?void 0:Q.elements.floating)===V||((X=q.context)==null?void 0:X.elements.domReference)===V})));V&&Y&&!B.current&&V!==N.current&&(F.current=!0,v(!1,S))})}if(b&&hr(m))return m.addEventListener("focusout",j),m.addEventListener("pointerdown",P),!l&&b.addEventListener("focusout",j),()=>{m.removeEventListener("focusout",j),m.removeEventListener("pointerdown",P),!l&&b.removeEventListener("focusout",j)}},[r,m,b,l,d,$,R,v,u]),C.useEffect(()=>{var P;if(r)return;const j=Array.from((R==null||(P=R.portalNode)==null?void 0:P.querySelectorAll("["+ko("portal")+"]"))||[]);if(b){const S=[b,...j,T.current,_.current,A.current.includes("reference")||M?m:null].filter(Y=>Y!=null),V=l?Pg(S,w,!w):Pg(S);return()=>{V()}}},[r,m,b,l,A,R,M,w]),Ye(()=>{if(r||!b)return;const P=Ft(b),j=kn(P);queueMicrotask(()=>{const S=U(b),V=x.current,Y=(typeof V=="number"?S[V]:V.current)||b,q=bt(b,j);!H&&!q&&f&&dn(Y,{preventScroll:Y===b})})},[r,f,b,H,U,x]),Ye(()=>{if(r||!b)return;let P=!1;const j=Ft(b),S=kn(j),V=g.current;N.current=S;function Y(q){if(q.type==="escapeKey"&&p.domReference.current&&(N.current=p.domReference.current),["referencePress","escapeKey"].includes(q.type))return;const Q=q.data.returnFocus;typeof Q=="object"?(F.current=!1,P=Q.preventScroll):F.current=!Q}return h.on("dismiss",Y),()=>{h.off("dismiss",Y);const q=kn(j);(bt(b,q)||$&&wr($.nodesRef.current,d).some(X=>{var ee;return bt((ee=X.context)==null?void 0:ee.elements.floating,q)})||V.openEvent&&["click","mousedown"].includes(V.openEvent.type))&&p.domReference.current&&(N.current=p.domReference.current),k.current&&hr(N.current)&&!F.current&&dn(N.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,k,g,p,h,$,d]),Ye(()=>{if(!(r||!R))return R.setFocusManagerState({modal:l,closeOnFocusOut:u,open:f,onOpenChange:v,refs:p}),()=>{R.setFocusManagerState(null)}},[r,R,l,f,v,p,u]),Ye(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!H){const P=()=>{const S=b.getAttribute("tabindex");A.current.includes("floating")||kn(Ft(b))!==p.domReference.current&&G().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};P();const j=new MutationObserver(P);return j.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{j.disconnect()}}},[r,b,p,A,G,H]);function I(P){return r||!c||!l?null:C.createElement(G_,{ref:P==="start"?T:_,onClick:j=>v(!1,j.nativeEvent)},typeof c=="string"?c:"Dismiss")}const y=!r&&w&&!M&&(D||l);return C.createElement(C.Fragment,null,y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:P=>{if(l){const S=U();dn(o[0]==="reference"?S[0]:S[S.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(F.current=!1,Co(P,R.portalNode)){const S=_g()||m;S==null||S.focus()}else{var j;(j=R.beforeOutsideRef.current)==null||j.focus()}}}),!M&&I("start"),n,I("end"),y&&C.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:P=>{if(l)dn(U()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(F.current=!0),Co(P,R.portalNode)){const S=Mg()||m;S==null||S.focus()}else{var j;(j=R.afterOutsideRef.current)==null||j.focus()}}}))}function Fg(e){return hr(e.target)&&e.target.tagName==="BUTTON"}function Bg(e){return ng(e)}function Q_(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:u=!0}=t,f=C.useRef(),p=C.useRef(!1);return C.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(eg(f.current)&&c||s!=="click"&&(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&f.current){f.current=void 0;return}eg(f.current)&&c||(n&&l&&(!o.current.openEvent||o.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){f.current=void 0,!(d.defaultPrevented||!u||Fg(d))&&(d.key===" "&&!Bg(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||Fg(d)||Bg(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const J_=C.useInsertionEffect||(e=>e());function Tn(e){const t=C.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return J_(()=>{t.current=e}),C.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}const Z_={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},X_={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},eM=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function tM(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:o,nodeId:i,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:u=!0,escapeKey:f=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:v=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:m}=t,b=na(),w=Og()!=null,A=Tn(typeof p=="function"?p:()=>!1),x=typeof p=="function"?A:p,k=C.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=eM(m),H=Tn(_=>{if(!n||!u||!f||_.key!=="Escape")return;const F=b?wr(b.nodesRef.current,i):[];if(!$&&(_.stopPropagation(),F.length>0)){let N=!0;if(F.forEach(B=>{var D;if((D=B.context)!=null&&D.open&&!B.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,ID(_)?_.nativeEvent:_)}),T=Tn(_=>{const F=k.current;if(k.current=!1,F||typeof x=="function"&&!x(_))return;const N=tg(_),B="["+ko("inert")+"]",D=Ft(l).querySelectorAll(B);let M=Mt(N)?N:null;for(;M&&!CD(M);){const I=$D(M);if(I===Ft(l).body||!Mt(I))break;M=I}if(D.length&&Mt(N)&&!PD(N)&&!bt(N,l)&&Array.from(D).every(I=>!bt(M,I)))return;if(hr(N)&&l){const I=N.clientWidth>0&&N.scrollWidth>N.clientWidth,y=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let P=y&&_.offsetX>N.clientWidth;if(y&&AD(N).direction==="rtl"&&(P=_.offsetX<=N.offsetWidth-N.clientWidth),P||I&&_.offsetY>N.clientHeight)return}const G=b&&wr(b.nodesRef.current,i).some(I=>{var y;return nc(_,(y=I.context)==null?void 0:y.elements.floating)});if(nc(_,l)||nc(_,s)||G)return;const U=b?wr(b.nodesRef.current,i):[];if(U.length>0){let I=!0;if(U.forEach(y=>{var P;if((P=y.context)!=null&&P.open&&!y.context.dataRef.current.__outsidePressBubbles){I=!1;return}}),!I)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Jm(_)||Zm(_)}}),r(!1,_)});return C.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=R;function _(B){r(!1,B)}const F=Ft(l);f&&F.addEventListener("keydown",H),x&&F.addEventListener(d,T);let N=[];return g&&(Mt(s)&&(N=An(s)),Mt(l)&&(N=N.concat(An(l))),!Mt(a)&&a&&a.contextElement&&(N=N.concat(An(a.contextElement)))),N=N.filter(B=>{var D;return B!==((D=F.defaultView)==null?void 0:D.visualViewport)}),N.forEach(B=>{B.addEventListener("scroll",_,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",H),x&&F.removeEventListener(d,T),N.forEach(B=>{B.removeEventListener("scroll",_)})}},[c,l,s,a,f,x,d,n,r,g,u,$,R,H,T]),C.useEffect(()=>{k.current=!1},[x,d]),C.useMemo(()=>u?{reference:{onKeyDown:H,[Z_[h]]:_=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,_.nativeEvent))}},floating:{onKeyDown:H,[X_[d]]:()=>{k.current=!0}}}:{},[u,o,v,d,h,r,H])}let wc;process.env.NODE_ENV!=="production"&&(wc=new Set);function nM(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,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&&!Mt(e.elements.reference)){var a;if(!((a=wc)!=null&&a.has($))){var s;(s=wc)==null||s.add($),console.error($)}}}const[l,c]=C.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=u_(e),p=na(),d=Tn(($,R)=>{$&&(h.current.openEvent=R),r==null||r($,R)}),v=C.useRef(null),h=C.useRef({}),g=C.useState(()=>N_())[0],m=mc(),b=C.useCallback($=>{const R=Mt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(R)},[f.refs]),w=C.useCallback($=>{(Mt($)||$===null)&&(v.current=$,c($)),(Mt(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Mt($))&&f.refs.setReference($)},[f.refs]),A=C.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),x=C.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),k=C.useMemo(()=>({...f,refs:A,elements:x,dataRef:h,nodeId:o,floatingId:m,events:g,open:n,onOpenChange:d}),[f,o,m,g,n,d,A,x]);return Ye(()=>{const $=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);$&&($.context=k)}),C.useMemo(()=>({...f,context:k,refs:A,elements:x}),[f,A,x,k])}function Sc(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(o=>o?o[n]:null).concat(e).reduce((o,i)=>(i&&Object.entries(i).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),o[s]=function(){for(var u,f=arguments.length,p=new Array(f),d=0;d<f;d++)p[d]=arguments[d];return(u=r.get(s))==null?void 0:u.map(v=>v(...p)).find(v=>v!==void 0)}}}else o[s]=l}),o),{})}}function rM(e){e===void 0&&(e=[]);const t=e,n=C.useCallback(i=>Sc(i,e,"reference"),t),r=C.useCallback(i=>Sc(i,e,"floating"),t),o=C.useCallback(i=>Sc(i,e,"item"),e.map(i=>i==null?void 0:i.item));return C.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let jg=!1;function aa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function zg(e,t){return aa(t,e===pc||e===Xi,e===br||e===xo)}function xc(e,t,n){return aa(t,e===Xi,n?e===br:e===xo)||e==="Enter"||e==" "||e===""}function oM(e,t,n){return aa(t,n?e===br:e===xo,e===Xi)}function Ug(e,t,n){return aa(t,n?e===xo:e===br,e===pc)}function iM(e,t){const{open:n,onOpenChange:r,refs:o,elements:{domReference:i,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:u=!0,selectedIndex:f=null,allowEscape:p=!1,loop:d=!1,nested:v=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:m="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:A=void 0,orientation:x="vertical",cols:k=1,scrollItemIntoView:$=!0,virtualItemRef:R}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&k>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const H=Og(),T=na(),_=Tn(c),F=C.useRef(m),N=C.useRef(f??-1),B=C.useRef(null),D=C.useRef(!0),M=C.useRef(_),G=C.useRef(!!a),U=C.useRef(!1),I=C.useRef(!1),y=$n(A),P=$n(n),j=$n($),[S,V]=C.useState(),[Y,q]=C.useState(),Q=Tn(function(J,Z,K){K===void 0&&(K=!1);const L=J.current[Z.current];L&&(g?(V(L.id),T==null||T.events.emit("virtualfocus",L),R&&(R.current=L)):dn(L,{preventScroll:!0,sync:OD()&&Xm()?jg||U.current:!1}),requestAnimationFrame(()=>{const ne=j.current;ne&&L&&(K||!D.current)&&(L.scrollIntoView==null||L.scrollIntoView(typeof ne=="boolean"?{block:"nearest",inline:"nearest"}:ne))}))});Ye(()=>{document.createElement("div").focus({get preventScroll(){return jg=!0,!1}})},[]),Ye(()=>{u&&(n&&a?F.current&&f!=null&&(I.current=!0,_(f)):G.current&&(N.current=-1,M.current(null)))},[u,n,a,f,_]),Ye(()=>{if(u&&n&&a)if(l==null){if(U.current=!1,f!=null)return;if(G.current&&(N.current=-1,Q(s,N)),!G.current&&F.current&&(B.current!=null||F.current===!0&&B.current==null)){let J=0;const Z=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(Z),J++):(N.current=B.current==null||xc(B.current,x,h)||v?hc(s,y.current):Ag(s,y.current),B.current=null,_(N.current))};Z()}}else Eo(s,l)||(N.current=l,Q(s,N,I.current),I.current=!1)},[u,n,a,l,f,v,s,x,h,_,Q,y]),Ye(()=>{var J,Z;if(!u||a||!T||g||!G.current)return;const K=T.nodesRef.current,L=(J=K.find(te=>te.id===H))==null||(Z=J.context)==null?void 0:Z.elements.floating,ne=kn(Ft(a)),ae=K.some(te=>te.context&&bt(te.context.elements.floating,ne));L&&!ae&&D.current&&L.focus({preventScroll:!0})},[u,a,T,H,g]),Ye(()=>{if(!u||!T||!g||H)return;function J(Z){q(Z.id),R&&(R.current=Z)}return T.events.on("virtualfocus",J),()=>{T.events.off("virtualfocus",J)}},[u,T,g,H,R]),Ye(()=>{M.current=_,G.current=!!a}),Ye(()=>{n||(B.current=null)},[n]);const X=l!=null,ee=C.useMemo(()=>{function J(K){if(!n)return;const L=s.current.indexOf(K);L!==-1&&_(L)}return{onFocus(K){let{currentTarget:L}=K;J(L)},onClick:K=>{let{currentTarget:L}=K;return L.focus({preventScroll:!0})},...b&&{onMouseMove(K){let{currentTarget:L}=K;J(L)},onPointerLeave(K){let{pointerType:L}=K;!D.current||L==="touch"||(N.current=-1,Q(s,N),_(null),g||dn(o.floating.current,{preventScroll:!0}))}}}},[n,o,Q,b,s,_,g]);return C.useMemo(()=>{if(!u)return{};const J=y.current;function Z(te){if(D.current=!1,U.current=!0,!P.current&&te.currentTarget===o.floating.current)return;if(v&&Ug(te.key,x,h)){ot(te),r(!1,te.nativeEvent),hr(i)&&!g&&i.focus();return}const de=N.current,me=hc(s,J),De=Ag(s,J);if(te.key==="Home"&&(ot(te),N.current=me,_(N.current)),te.key==="End"&&(ot(te),N.current=De,_(N.current)),!(k>1&&(N.current=D_(s,{event:te,orientation:x,loop:d,cols:k,disabledIndices:J,minIndex:me,maxIndex:De,prevIndex:N.current,stopEvent:!0}),_(N.current),x==="both"))&&zg(te.key,x)){if(ot(te),n&&!g&&kn(te.currentTarget.ownerDocument)===te.currentTarget){N.current=xc(te.key,x,h)?me:De,_(N.current);return}xc(te.key,x,h)?d?N.current=de>=De?p&&de!==s.current.length?-1:me:ct(s,{startingIndex:de,disabledIndices:J}):N.current=Math.min(De,ct(s,{startingIndex:de,disabledIndices:J})):d?N.current=de<=me?p&&de!==-1?s.current.length:De:ct(s,{startingIndex:de,decrement:!0,disabledIndices:J}):N.current=Math.max(me,ct(s,{startingIndex:de,decrement:!0,disabledIndices:J})),Eo(s,N.current)?_(null):_(N.current)}}function K(te){m==="auto"&&Jm(te.nativeEvent)&&(F.current=!0)}function L(te){F.current=m,m==="auto"&&Zm(te.nativeEvent)&&(F.current=!0)}const ne=g&&n&&X&&{"aria-activedescendant":Y||S},ae=s.current.find(te=>(te==null?void 0:te.id)===S);return{reference:{...ne,onKeyDown(te){D.current=!1;const de=te.key.indexOf("Arrow")===0,me=oM(te.key,x,h),De=Ug(te.key,x,h),Ue=zg(te.key,x),dt=(v?me:Ue)||te.key==="Enter"||te.key.trim()==="";if(g&&n){const ce=T==null?void 0:T.nodesRef.current.find(z=>z.parentId==null),W=T&&ce?B_(T.nodesRef.current,ce.id):null;if(de&&W&&R){const z=new KeyboardEvent("keydown",{key:te.key,bubbles:!0});if(me||De){var mt,pt;const re=((mt=W.context)==null?void 0:mt.elements.domReference)===te.currentTarget,se=De&&!re?(pt=W.context)==null?void 0:pt.elements.domReference:me?ae:null;se&&(ot(te),se.dispatchEvent(z),q(void 0))}if(Ue&&W.context&&W.context.open&&W.parentId&&te.currentTarget!==W.context.elements.domReference){var ie;ot(te),(ie=W.context.elements.domReference)==null||ie.dispatchEvent(z);return}}return Z(te)}if(!(!n&&!w&&de)){if(dt&&(B.current=v&&Ue?null:te.key),v){me&&(ot(te),n?(N.current=hc(s,J),_(N.current)):r(!0,te.nativeEvent));return}Ue&&(f!=null&&(N.current=f),ot(te),!n&&w?r(!0,te.nativeEvent):Z(te),n&&_(N.current))}},onFocus(){n&&_(null)},onPointerDown:L,onMouseDown:K,onClick:K},floating:{"aria-orientation":x==="both"?void 0:x,...ne,onKeyDown:Z,onPointerMove(){D.current=!0}},item:ee}},[i,o,S,Y,y,P,s,u,x,h,g,n,X,v,f,w,p,k,d,m,_,r,ee,T,R])}function aM(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=mc();return C.useMemo(()=>{const s={id:r,role:i};return o?i==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":i==="alertdialog"?"dialog":i,"aria-controls":n?r:void 0,...i==="listbox"&&{role:"combobox"},...i==="menu"&&{id:a}},floating:{...s,...i==="menu"&&{"aria-labelledby":a}}}:{}},[o,i,n,r,a])}function sM(e,t){var n;const{open:r,dataRef:o}=e,{listRef:i,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:u=null,resetMs:f=750,ignoreKeys:p=[],selectedIndex:d=null}=t,v=C.useRef(),h=C.useRef(""),g=C.useRef((n=d??a)!=null?n:-1),m=C.useRef(null),b=Tn(s),w=Tn(l),A=$n(u),x=$n(p);return Ye(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),Ye(()=>{if(r&&h.current===""){var k;g.current=(k=d??a)!=null?k:-1}},[r,d,a]),C.useMemo(()=>{if(!c)return{};function k(H){H?o.current.typing||(o.current.typing=H,w(H)):o.current.typing&&(o.current.typing=H,w(H))}function $(H,T,_){const F=A.current?A.current(T,_):T.find(N=>(N==null?void 0:N.toLocaleLowerCase().indexOf(_.toLocaleLowerCase()))===0);return F?H.indexOf(F):-1}function R(H){const T=i.current;if(h.current.length>0&&h.current[0]!==" "&&($(T,T,h.current)===-1?k(!1):H.key===" "&&ot(H)),T==null||x.current.includes(H.key)||H.key.length!==1||H.ctrlKey||H.metaKey||H.altKey)return;r&&H.key!==" "&&(ot(H),k(!0)),T.every(B=>{var D,M;return B?((D=B[0])==null?void 0:D.toLocaleLowerCase())!==((M=B[1])==null?void 0:M.toLocaleLowerCase()):!0})&&h.current===H.key&&(h.current="",g.current=m.current),h.current+=H.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,k(!1)},f);const F=g.current,N=$(T,[...T.slice((F||0)+1),...T.slice(0,(F||0)+1)],h.current);N!==-1?(b(N),m.current=N):H.key!==" "&&(h.current="",k(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(H){H.key===" "&&k(!1)}}}},[c,r,o,i,f,x,A,b,w])}const lM=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var B,D,M,G,U;const o=Li(I=>I.messageContainerRef),[i,a]=C.useState(!1),[s,l]=C.useState(null),[c,u]=C.useState(null),{message:{blocks:{dropdown:f}}}=ve,p=e.reduce((I,y)=>(I[y.label]=y.value,I),{}),d=p?Object.keys(p):[],v=I=>{a(c!==null&&!t?!1:I)},{refs:h,floatingStyles:g,context:m}=nM({placement:"bottom-start",open:i,onOpenChange:v,whileElementsMounted:i_,middleware:[f_(5),d_({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),p_({apply({rects:I,elements:y,availableHeight:P}){Object.assign(y.floating.style,{maxHeight:`${P}px`,minWidth:`${I.reference.width}px`})},padding:10})]}),b=C.useRef([]),w=C.useRef(d),A=C.useRef(!1),x=Q_(m,{event:"mousedown"}),k=tM(m),$=aM(m,{role:"listbox"}),R=iM(m,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),H=sM(m,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:i?l:u,onTypingChange(I){A.current=I}}),{getReferenceProps:T,getFloatingProps:_,getItemProps:F}=rM([k,$,R,H,x]),N=I=>{u(I),d[I]!==void 0&&(n==null||n({type:"text",text:d[I]??"",value:p[d[I]]??""})),a(!1)};return E.jsxs(E.Fragment,{children:[E.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(B=f.button)==null?void 0:B.container,...T(),children:[E.jsx("span",{...(D=f.button)==null?void 0:D.text,children:c?d[c]:"Select..."}),E.jsx(zI,{...(M=f.button)==null?void 0:M.icon})]}),i&&E.jsx(q_,{children:E.jsx(Y_,{context:m,modal:!1,children:E.jsx("div",{ref:h.setFloating,className:(U=(G=f.content)==null?void 0:G.container)==null?void 0:U.className,style:{...g},..._(),children:d.map((I,y)=>{var P;return E.jsx("div",{ref:j=>{b.current[y]=j},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===c&&y===s,"data-active":y===s?"":void 0,...(P=f.content)==null?void 0:P.item,...F({onClick(){N(y)},onKeyDown(j){j.key==="Enter"&&(j.preventDefault(),N(y)),j.key===" "&&!A.current&&(j.preventDefault(),N(y))}}),children:I},I)})})})})]})},Wg=O.forwardRef(({title:e,url:t,isReadOnly:n,...r},o)=>{const{message:{blocks:{file:i}}}=ve;return E.jsxs("a",{...r,...i.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[E.jsx("p",{...i.title,children:e||t}),E.jsx(qI,{...i.icon})]})});Wg.displayName="File";const cM=xn()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const o=await fetch(n).then(c=>c.text()),i=new Blob([o],{type:"application/javascript"}),s=await import(URL.createObjectURL(i)),l=()=>s.default;return e(c=>({components:{...c.components,[n]:l}})),l}}));globalThis.React=O;const Hg={audio:Mm,bubble:Tm,button:UP,carousel:Km,column:Rm,dropdown:lM,file:Wg,image:Dm,location:Nm,row:Lm,text:fP,video:_m,custom:({url:e,name:t,data:n,...r})=>{const o=cM(c=>c.getCustomComponent),[i,a]=O.useState(null),[s,l]=O.useState(null);return O.useEffect(()=>{o(e).then(a).catch(c=>{l(c.message)})},[e]),s?E.jsx("div",{style:{color:"red"},children:s}):i?E.jsx(i,{...n,...r}):null}},Kn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Hg[e.type],o={...n,...e};return E.jsx(r,{...o})};function Vg(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Vg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ao(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vg(e))&&(r&&(r+=" "),r+=t);return r}const uM=({disabled:e,onFileSelected:t})=>{const n=O.useRef(null),{uploadButton:r}=ve.composer,o=()=>{n.current&&n.current.click()},i=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return E.jsxs(E.Fragment,{children:[E.jsx(rP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:o}),E.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:i})]})},fM=({name:e,type:t,instance:n,status:r,removeFile:o})=>{const{loader:i,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:c}=ve.composer.fileWidget,u=["PNG","JPEG","JPG"].includes(la(e)),f=O.useMemo(()=>{if(!n)return"";const p=n;return(p instanceof File||p instanceof Blob)&&u?URL.createObjectURL(p):""},[n,u]);return O.useEffect(()=>{if(f)return()=>{URL.revokeObjectURL(f)}},[f]),r==="loading"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx("div",{...i}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(Ec,{type:t,...a.icon})})}):r==="error"?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Kg,{removeFile:()=>o(e)}),extension:"Upload Error",children:E.jsxs("div",{...a.container,children:[E.jsx(HI,{...l}),E.jsx(Ec,{type:t,...a.icon})]})}):r=="uploaded"&&u?E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Kg,{removeFile:()=>o(e)}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx("img",{src:f,alt:e,...c})})}):E.jsx(sa,{name:e,status:r,removeButton:E.jsx(Xv,{onClick:()=>o(e),...s}),extension:la(e),children:E.jsx("div",{...a.container,children:E.jsx(Ec,{type:t,...a.icon})})})},sa=({name:e,status:t,removeButton:n,children:r,extension:o})=>{const{container:i,metadata:a}=ve.composer.fileWidget,s=Us(e);return E.jsxs("div",{"data-status":t,title:e,...i,children:[n,r,E.jsxs("div",{...a.container,children:[E.jsx("div",{...a.name,children:s}),E.jsx("div",{...a.type,children:o})]})]})},Ec=({type:e,...t})=>e==="image"?E.jsx(QI,{...t}):e==="video"?E.jsx(lP,{...t}):e==="audio"?E.jsx(nm,{...t}):E.jsx(em,{...t}),la=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Kg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ve;return E.jsx(Xv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function kc(){return kc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kc.apply(null,arguments)}function dM(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var pM=O.useLayoutEffect,hM=function(t){var n=C.useRef(t);return pM(function(){n.current=t}),n},qg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},vM=function(t,n){var r=O.useRef();return O.useCallback(function(o){t.current=o,r.current&&qg(r.current,null),r.current=n,n&&qg(n,o)},[n])},Gg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},mM=function(t){Object.keys(Gg).forEach(function(n){t.style.setProperty(n,Gg[n],"important")})},Yg=mM,vt=null,Qg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function gM(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),vt||(vt=document.createElement("textarea"),vt.setAttribute("tabindex","-1"),vt.setAttribute("aria-hidden","true"),Yg(vt)),vt.parentNode===null&&document.body.appendChild(vt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;vt.style[d]=a[d]}),Yg(vt),vt.value=t;var l=Qg(vt,e);vt.value=t,l=Qg(vt,e),vt.value="x";var c=vt.scrollHeight-o,u=c*n;s==="border-box"&&(u=u+o+i),l=Math.max(u,l);var f=c*r;return s==="border-box"&&(f=f+o+i),l=Math.min(f,l),[l,c]}var Jg=function(){},yM=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},bM=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],wM=!!document.documentElement.currentStyle,SM=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=yM(bM,n),o=r.boxSizing;if(o==="")return null;wM&&o==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var i=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:i,borderSize:a}},xM=SM;function Zg(e,t,n){var r=hM(n);C.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var EM=function(t){Zg(window,"resize",t)},kM=function(t){Zg(document.fonts,"loadingdone",t)},CM=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],AM=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Jg:a,l=t.onHeightChange,c=l===void 0?Jg:l,u=dM(t,CM),f=u.value!==void 0,p=C.useRef(null),d=vM(p,n),v=C.useRef(0),h=C.useRef(),g=function(){var w=p.current,A=r&&h.current?h.current:xM(w);if(A){h.current=A;var x=gM(A,w.value||w.placeholder||"x",i,o),k=x[0],$=x[1];v.current!==k&&(v.current=k,w.style.setProperty("height",k+"px","important"),c(k,{rowHeight:$}))}},m=function(w){f||g(),s(w)};return C.useLayoutEffect(g),EM(g),kM(g),C.createElement("textarea",kc({},u,{onChange:m,ref:d}))},$M=C.forwardRef(AM);const TM=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:o,setTextInput:i,setHistoryIndex:a,sendComposerMessage:s})=>{const l=pm(u=>u.messageHistory),{input:c}=ve.composer;return E.jsx($M,{...c,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:u=>i(u.target.value),maxRows:5,onKeyDown:u=>{if(n)return;const f=u.nativeEvent;f.isComposing||f.keyCode===229||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),i(`${r}
|
|
257
|
-
`)):
|
|
256
|
+
*/var I1=["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])"],la=I1.join(","),Uf=typeof Element>"u",Xn=Uf?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Gr=!Uf&&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},Jr=function e(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&e(t.parentNode);return a},T1=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},O1=function(t,n,r){if(Jr(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(la));return n&&Xn.call(t,la)&&i.unshift(t),i=i.filter(r),i},D1=function e(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!Jr(a,!1))if(a.tagName==="SLOT"){var s=a.assignedElements(),l=s.length?s:a.children,c=e(l,!0,r);r.flatten?i.push.apply(i,c):i.push({scopeParent:a,candidates:c})}else{var f=Xn.call(a,la);f&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var u=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Jr(u,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(u&&p){var d=e(u===!0?a.children:u.children,!0,r);r.flatten?i.push.apply(i,d):i.push({scopeParent:a,candidates:d})}else o.unshift.apply(o,a.children)}}return i},Hf=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Wf=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||T1(t))&&!Hf(t)?0:t.tabIndex},M1=function(t,n){var r=Wf(t);return r<0&&n&&!Hf(t)?0:r},P1=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Vf=function(t){return t.tagName==="INPUT"},N1=function(t){return Vf(t)&&t.type==="hidden"},_1=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},L1=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},F1=function(t){if(!t.name)return!0;var n=t.form||Gr(t),r=function(s){return n.querySelectorAll('input[type="radio"][name="'+s+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=L1(i,t.form);return!o||o===t},R1=function(t){return Vf(t)&&t.type==="radio"},B1=function(t){return R1(t)&&!F1(t)},z1=function(t){var n,r=t&&Gr(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,s,l;for(o=!!((a=i)!==null&&a!==void 0&&(s=a.ownerDocument)!==null&&s!==void 0&&s.contains(i)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!o&&i;){var c,f,u;r=Gr(i),i=(c=r)===null||c===void 0?void 0:c.host,o=!!((f=i)!==null&&f!==void 0&&(u=f.ownerDocument)!==null&&u!==void 0&&u.contains(i))}}return o},qf=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},$1=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var o=Xn.call(t,"details>summary:first-of-type"),a=o?t.parentElement:t;if(Xn.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof i=="function"){for(var s=t;t;){var l=t.parentElement,c=Gr(t);if(l&&!l.shadowRoot&&i(l)===!0)return qf(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(z1(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return qf(t);return!1},j1=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Xn.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},U1=function(t,n){return!(n.disabled||Jr(n)||N1(n)||$1(n,t)||_1(n)||j1(n))},Kf=function(t,n){return!(B1(n)||Wf(n)<0||!U1(t,n))},H1=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},W1=function e(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,s=a?i.scopeParent:i,l=M1(s,a),c=a?e(i.candidates):s;l===0?a?n.push.apply(n,c):n.push(s):r.push({documentOrder:o,tabIndex:l,item:i,isScope:a,content:c})}),r.sort(P1).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},ca=function(t,n){n=n||{};var r;return n.getShadowRoot?r=D1([t],n.includeContainer,{filter:Kf.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:H1}):r=O1(t,n.includeContainer,Kf.bind(null,n)),W1(r)};const ua="ArrowUp",Zr="ArrowDown",pn="ArrowLeft",er="ArrowRight";function Xr(e,t,n){return Math.floor(e/t)!==n}function tr(e,t){return t<0||t>=e.current.length}function fa(e,t){return je(e,{disabledIndices:t})}function Yf(e,t){return je(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function je(e,t){let{startingIndex:n=-1,decrement:r=!1,disabledIndices:i,amount:o=1}=t===void 0?{}:t;const a=e.current;let s=n;do{var l,c;s=s+(r?-o:o)}while(s>=0&&s<=a.length-1&&(i?i.includes(s):a[s]==null||(l=a[s])!=null&&l.hasAttribute("disabled")||((c=a[s])==null?void 0:c.getAttribute("aria-disabled"))==="true"));return s}function V1(e,t){let{event:n,orientation:r,loop:i,cols:o,disabledIndices:a,minIndex:s,maxIndex:l,prevIndex:c,stopEvent:f=!1}=t,u=c;if(n.key===ua){if(f&&Re(n),c===-1)u=l;else if(u=je(e,{startingIndex:u,amount:o,decrement:!0,disabledIndices:a}),i&&(c-o<s||u<0)){const p=c%o,d=l%o,m=l-(d-p);d===p?u=l:u=d>p?m:m-o}tr(e,u)&&(u=c)}if(n.key===Zr&&(f&&Re(n),c===-1?u=s:(u=je(e,{startingIndex:c,amount:o,disabledIndices:a}),i&&c+o>l&&(u=je(e,{startingIndex:c%o-o,amount:o,disabledIndices:a}))),tr(e,u)&&(u=c)),r==="both"){const p=mf(c/o);n.key===er&&(f&&Re(n),c%o!==o-1?(u=je(e,{startingIndex:c,disabledIndices:a}),i&&Xr(u,o,p)&&(u=je(e,{startingIndex:c-c%o-1,disabledIndices:a}))):i&&(u=je(e,{startingIndex:c-c%o-1,disabledIndices:a})),Xr(u,o,p)&&(u=c)),n.key===pn&&(f&&Re(n),c%o!==0?(u=je(e,{startingIndex:c,disabledIndices:a,decrement:!0}),i&&Xr(u,o,p)&&(u=je(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a}))):i&&(u=je(e,{startingIndex:c+(o-c%o),decrement:!0,disabledIndices:a})),Xr(u,o,p)&&(u=c));const d=mf(l/o)===p;tr(e,u)&&(i&&d?u=n.key===pn?l:je(e,{startingIndex:c-c%o-1,disabledIndices:a}):u=c)}return u}let Qf=0;function St(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(Qf);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():Qf=requestAnimationFrame(o)}var _e=typeof document<"u"?P.useLayoutEffect:P.useEffect;function ei(){return ei=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ei.apply(this,arguments)}let da=!1,q1=0;const Gf=()=>"floating-ui-"+q1++;function K1(){const[e,t]=E.useState(()=>da?Gf():void 0);return _e(()=>{e==null&&t(Gf())},[]),E.useEffect(()=>{da||(da=!0)},[]),e}const pa=E.useId||K1;function Y1(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,((r=e.get(t))==null?void 0:r.filter(i=>i!==n))||[])}}}const Q1=E.createContext(null),G1=E.createContext(null),Jf=()=>{var e;return((e=E.useContext(Q1))==null?void 0:e.id)||null},ti=()=>E.useContext(G1);function nr(e){return"data-floating-ui-"+e}function Lt(e){const t=P.useRef(e);return _e(()=>{t.current=e}),t}function J1(e,t){var n;let r=[],i=(n=e.find(o=>o.id===t))==null?void 0:n.parentId;for(;i;){const o=e.find(a=>a.id===i);i=o==null?void 0:o.parentId,o&&(r=r.concat(o))}return r}function hn(e,t){let n=e.filter(i=>{var o;return i.parentId===t&&((o=i.context)==null?void 0:o.open)}),r=n;for(;r.length;)r=e.filter(i=>{var o;return(o=r)==null?void 0:o.some(a=>{var s;return i.parentId===a.id&&((s=i.context)==null?void 0:s.open)})}),n=n.concat(r);return n}function Z1(e,t){let n,r=-1;function i(o,a){a>r&&(n=o,r=a),hn(e,o).forEach(l=>{i(l.id,a+1)})}return i(t,0),e.find(o=>o.id===n)}let mn=new WeakMap,ni=new WeakSet,ri={},ha=0;const X1=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Zf=e=>e&&(e.host||Zf(e.parentNode)),eS=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Zf(n);return e.contains(r)?r:null}).filter(n=>n!=null);function tS(e,t,n,r){const i="data-floating-ui-inert",o=r?"inert":n?"aria-hidden":null,a=eS(t,e),s=new Set,l=new Set(a),c=[];ri[i]||(ri[i]=new WeakMap);const f=ri[i];a.forEach(u),p(t),s.clear();function u(d){!d||s.has(d)||(s.add(d),d.parentNode&&u(d.parentNode))}function p(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,m=>{if(s.has(m))p(m);else{const h=o?m.getAttribute(o):null,g=h!==null&&h!=="false",y=(mn.get(m)||0)+1,b=(f.get(m)||0)+1;mn.set(m,y),f.set(m,b),c.push(m),y===1&&g&&ni.add(m),b===1&&m.setAttribute(i,""),!g&&o&&m.setAttribute(o,"true")}})}return ha++,()=>{c.forEach(d=>{const m=(mn.get(d)||0)-1,h=(f.get(d)||0)-1;mn.set(d,m),f.set(d,h),m||(!ni.has(d)&&o&&d.removeAttribute(o),ni.delete(d)),h||d.removeAttribute(i)}),ha--,ha||(mn=new WeakMap,mn=new WeakMap,ni=new WeakSet,ri={})}}function Xf(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=st(e[0]).body;return tS(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const ma=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ed(e,t){const n=ca(e,ma());t==="prev"&&n.reverse();const r=n.indexOf(Pt(st(e)));return n.slice(r+1)[0]}function td(){return ed(document.body,"next")}function nd(){return ed(document.body,"prev")}function rr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Ye(n,r)}function nS(e){ca(e,ma()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function rS(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const ga={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 iS;function rd(e){e.key==="Tab"&&(e.target,clearTimeout(iS))}const ii=E.forwardRef(function(t,n){const[r,i]=E.useState();_e(()=>(xf()&&i("button"),document.addEventListener("keydown",rd),()=>{document.removeEventListener("keydown",rd)}),[]);const o={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[nr("focus-guard")]:"",style:ga};return E.createElement("span",ei({},t,o))}),id=E.createContext(null);function oS(e){let{id:t,root:n}=e===void 0?{}:e;const[r,i]=E.useState(null),o=pa(),a=od(),s=E.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:o}),[t,n,a,o]),l=E.useRef();return _e(()=>()=>{r==null||r.remove()},[r,s]),_e(()=>{if(l.current===s)return;l.current=s;const{id:c,root:f,portalContext:u,uniqueId:p}=s,d=c?document.getElementById(c):null,m=nr("portal");if(d){const h=document.createElement("div");h.id=p,h.setAttribute(m,""),d.appendChild(h),i(h)}else{let h=f||(u==null?void 0:u.portalNode);h&&!ot(h)&&(h=h.current),h=h||document.body;let g=null;c&&(g=document.createElement("div"),g.id=c,h.appendChild(g));const y=document.createElement("div");y.id=p,y.setAttribute(m,""),h=g||h,h.appendChild(y),i(y)}},[s]),r}function aS(e){let{children:t,id:n,root:r=null,preserveTabOrder:i=!0}=e;const o=oS({id:n,root:r}),[a,s]=E.useState(null),l=E.useRef(null),c=E.useRef(null),f=E.useRef(null),u=E.useRef(null),p=!!a&&!a.modal&&a.open&&i&&!!(r||o);return E.useEffect(()=>{if(!o||!i||a!=null&&a.modal)return;function d(m){o&&rr(m)&&(m.type==="focusin"?rS:nS)(o)}return o.addEventListener("focusin",d,!0),o.addEventListener("focusout",d,!0),()=>{o.removeEventListener("focusin",d,!0),o.removeEventListener("focusout",d,!0)}},[o,i,a==null?void 0:a.modal]),E.createElement(id.Provider,{value:E.useMemo(()=>({preserveTabOrder:i,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:f,afterInsideRef:u,portalNode:o,setFocusManagerState:s}),[i,o])},p&&o&&E.createElement(ii,{"data-type":"outside",ref:l,onFocus:d=>{if(rr(d,o)){var m;(m=f.current)==null||m.focus()}else{const h=nd()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&o&&E.createElement("span",{"aria-owns":o.id,style:ga}),o&&ks.createPortal(t,o),p&&o&&E.createElement(ii,{"data-type":"outside",ref:c,onFocus:d=>{if(rr(d,o)){var m;(m=u.current)==null||m.focus()}else{const h=td()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const od=()=>E.useContext(id),sS=E.forwardRef(function(t,n){return E.createElement("button",ei({},t,{type:"button",ref:n,tabIndex:-1,style:ga}))});function lS(e){const{context:t,children:n,disabled:r=!1,order:i=["content"],guards:o=!0,initialFocus:a=0,returnFocus:s=!0,modal:l=!0,visuallyHiddenDismiss:c=!1,closeOnFocusOut:f=!0}=e,{open:u,refs:p,nodeId:d,onOpenChange:m,events:h,dataRef:g,elements:{domReference:y,floating:b}}=t,w=X1()?o:!0,C=Lt(i),x=Lt(a),A=Lt(s),T=ti(),M=od(),z=typeof a=="number"&&a<0,I=E.useRef(null),O=E.useRef(null),F=E.useRef(!1),N=E.useRef(null),R=E.useRef(!1),D=M!=null,_=y&&y.getAttribute("role")==="combobox"&&Ef(y)&&z,U=E.useCallback(function(L){return L===void 0&&(L=b),L?ca(L,ma()):[]},[b]),$=E.useCallback(L=>{const W=U(L);return C.current.map(S=>y&&S==="reference"?y:b&&S==="floating"?b:W).filter(Boolean).flat()},[y,b,C,U]);E.useEffect(()=>{if(r||!l)return;function L(S){if(S.key==="Tab"){Ye(b,Pt(st(b)))&&U().length===0&&!_&&Re(S);const V=$(),te=Sf(S);C.current[0]==="reference"&&te===y&&(Re(S),S.shiftKey?St(V[V.length-1]):St(V[1])),C.current[1]==="floating"&&te===b&&S.shiftKey&&(Re(S),St(V[0]))}}const W=st(b);return W.addEventListener("keydown",L),()=>{W.removeEventListener("keydown",L)}},[r,y,b,l,C,p,_,U,$]),E.useEffect(()=>{if(r||!f)return;function L(){R.current=!0,setTimeout(()=>{R.current=!1})}function W(S){const V=S.relatedTarget;queueMicrotask(()=>{const te=!(Ye(y,V)||Ye(b,V)||Ye(V,b)||Ye(M==null?void 0:M.portalNode,V)||V!=null&&V.hasAttribute(nr("focus-guard"))||T&&(hn(T.nodesRef.current,d).find(Y=>{var X,oe;return Ye((X=Y.context)==null?void 0:X.elements.floating,V)||Ye((oe=Y.context)==null?void 0:oe.elements.domReference,V)})||J1(T.nodesRef.current,d).find(Y=>{var X,oe;return((X=Y.context)==null?void 0:X.elements.floating)===V||((oe=Y.context)==null?void 0:oe.elements.domReference)===V})));V&&te&&!R.current&&V!==N.current&&(F.current=!0,m(!1,S))})}if(b&&ln(y))return y.addEventListener("focusout",W),y.addEventListener("pointerdown",L),!l&&b.addEventListener("focusout",W),()=>{y.removeEventListener("focusout",W),y.removeEventListener("pointerdown",L),!l&&b.removeEventListener("focusout",W)}},[r,y,b,l,d,T,M,m,f]),E.useEffect(()=>{var L;if(r)return;const W=Array.from((M==null||(L=M.portalNode)==null?void 0:L.querySelectorAll("["+nr("portal")+"]"))||[]);if(b){const S=[b,...W,I.current,O.current,C.current.includes("reference")||_?y:null].filter(te=>te!=null),V=l?Xf(S,w,!w):Xf(S);return()=>{V()}}},[r,y,b,l,C,M,_,w]),_e(()=>{if(r||!b)return;const L=st(b),W=Pt(L);queueMicrotask(()=>{const S=$(b),V=x.current,te=(typeof V=="number"?S[V]:V.current)||b,Y=Ye(b,W);!z&&!Y&&u&&St(te,{preventScroll:te===b})})},[r,u,b,z,$,x]),_e(()=>{if(r||!b)return;let L=!1;const W=st(b),S=Pt(W),V=g.current;N.current=S;function te(Y){if(Y.type==="escapeKey"&&p.domReference.current&&(N.current=p.domReference.current),["referencePress","escapeKey"].includes(Y.type))return;const X=Y.data.returnFocus;typeof X=="object"?(F.current=!1,L=X.preventScroll):F.current=!X}return h.on("dismiss",te),()=>{h.off("dismiss",te);const Y=Pt(W);(Ye(b,Y)||T&&hn(T.nodesRef.current,d).some(oe=>{var ae;return Ye((ae=oe.context)==null?void 0:ae.elements.floating,Y)})||V.openEvent&&["click","mousedown"].includes(V.openEvent.type))&&p.domReference.current&&(N.current=p.domReference.current),A.current&&ln(N.current)&&!F.current&&St(N.current,{cancelPrevious:!1,preventScroll:L})}},[r,b,A,g,p,h,T,d]),_e(()=>{if(!(r||!M))return M.setFocusManagerState({modal:l,closeOnFocusOut:f,open:u,onOpenChange:m,refs:p}),()=>{M.setFocusManagerState(null)}},[r,M,l,u,m,p,f]),_e(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!z){const L=()=>{const S=b.getAttribute("tabindex");C.current.includes("floating")||Pt(st(b))!==p.domReference.current&&U().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};L();const W=new MutationObserver(L);return W.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{W.disconnect()}}},[r,b,p,C,U,z]);function H(L){return r||!c||!l?null:E.createElement(sS,{ref:L==="start"?I:O,onClick:W=>m(!1,W.nativeEvent)},typeof c=="string"?c:"Dismiss")}const v=!r&&w&&!_&&(D||l);return E.createElement(E.Fragment,null,v&&E.createElement(ii,{"data-type":"inside",ref:M==null?void 0:M.beforeInsideRef,onFocus:L=>{if(l){const S=$();St(i[0]==="reference"?S[0]:S[S.length-1])}else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(F.current=!1,rr(L,M.portalNode)){const S=td()||y;S==null||S.focus()}else{var W;(W=M.beforeOutsideRef.current)==null||W.focus()}}}),!_&&H("start"),n,H("end"),v&&E.createElement(ii,{"data-type":"inside",ref:M==null?void 0:M.afterInsideRef,onFocus:L=>{if(l)St($()[0]);else if(M!=null&&M.preserveTabOrder&&M.portalNode)if(f&&(F.current=!0),rr(L,M.portalNode)){const S=nd()||y;S==null||S.focus()}else{var W;(W=M.afterOutsideRef.current)==null||W.focus()}}}))}function ad(e){return ln(e.target)&&e.target.tagName==="BUTTON"}function sd(e){return Ef(e)}function cS(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,dataRef:i,elements:{domReference:o}}=e,{enabled:a=!0,event:s="click",toggle:l=!0,ignoreMouse:c=!1,keyboardHandlers:f=!0}=t,u=E.useRef(),p=E.useRef(!1);return E.useMemo(()=>a?{reference:{onPointerDown(d){u.current=d.pointerType},onMouseDown(d){d.button===0&&(kf(u.current)&&c||s!=="click"&&(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="mousedown")?r(!1,d.nativeEvent):(d.preventDefault(),r(!0,d.nativeEvent))))},onClick(d){if(s==="mousedown"&&u.current){u.current=void 0;return}kf(u.current)&&c||(n&&l&&(!i.current.openEvent||i.current.openEvent.type==="click")?r(!1,d.nativeEvent):r(!0,d.nativeEvent))},onKeyDown(d){u.current=void 0,!(d.defaultPrevented||!f||ad(d))&&(d.key===" "&&!sd(o)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!f||ad(d)||sd(o)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,i,s,c,f,o,l,n,r])}const uS=E.useInsertionEffect||(e=>e());function Ft(e){const t=E.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return uS(()=>{t.current=e}),E.useCallback(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return t.current==null?void 0:t.current(...r)},[])}const fS={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},dS={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},pS=e=>{var t,n;return{escapeKeyBubbles:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePressBubbles:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}};function hS(e,t){t===void 0&&(t={});const{open:n,onOpenChange:r,events:i,nodeId:o,elements:{reference:a,domReference:s,floating:l},dataRef:c}=e,{enabled:f=!0,escapeKey:u=!0,outsidePress:p=!0,outsidePressEvent:d="pointerdown",referencePress:m=!1,referencePressEvent:h="pointerdown",ancestorScroll:g=!1,bubbles:y}=t,b=ti(),w=Jf()!=null,C=Ft(typeof p=="function"?p:()=>!1),x=typeof p=="function"?C:p,A=E.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:M}=pS(y),z=Ft(O=>{if(!n||!f||!u||O.key!=="Escape")return;const F=b?hn(b.nodesRef.current,o):[];if(!T&&(O.stopPropagation(),F.length>0)){let N=!0;if(F.forEach(R=>{var D;if((D=R.context)!=null&&D.open&&!R.context.dataRef.current.__escapeKeyBubbles){N=!1;return}}),!N)return}i.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,Hk(O)?O.nativeEvent:O)}),I=Ft(O=>{const F=A.current;if(A.current=!1,F||typeof x=="function"&&!x(O))return;const N=Sf(O),R="["+nr("inert")+"]",D=st(l).querySelectorAll(R);let _=ot(N)?N:null;for(;_&&!Bk(_);){const H=$k(_);if(H===st(l).body||!ot(H))break;_=H}if(D.length&&ot(N)&&!Wk(N)&&!Ye(N,l)&&Array.from(D).every(H=>!Ye(_,H)))return;if(ln(N)&&l){const H=N.clientWidth>0&&N.scrollWidth>N.clientWidth,v=N.clientHeight>0&&N.scrollHeight>N.clientHeight;let L=v&&O.offsetX>N.clientWidth;if(v&&zk(N).direction==="rtl"&&(L=O.offsetX<=N.offsetWidth-N.clientWidth),L||H&&O.offsetY>N.clientHeight)return}const U=b&&hn(b.nodesRef.current,o).some(H=>{var v;return Xo(O,(v=H.context)==null?void 0:v.elements.floating)});if(Xo(O,l)||Xo(O,s)||U)return;const $=b?hn(b.nodesRef.current,o):[];if($.length>0){let H=!0;if($.forEach(v=>{var L;if((L=v.context)!=null&&L.open&&!v.context.dataRef.current.__outsidePressBubbles){H=!1;return}}),!H)return}i.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:vf(O)||wf(O)}}),r(!1,O)});return E.useEffect(()=>{if(!n||!f)return;c.current.__escapeKeyBubbles=T,c.current.__outsidePressBubbles=M;function O(R){r(!1,R)}const F=st(l);u&&F.addEventListener("keydown",z),x&&F.addEventListener(d,I);let N=[];return g&&(ot(s)&&(N=_t(s)),ot(l)&&(N=N.concat(_t(l))),!ot(a)&&a&&a.contextElement&&(N=N.concat(_t(a.contextElement)))),N=N.filter(R=>{var D;return R!==((D=F.defaultView)==null?void 0:D.visualViewport)}),N.forEach(R=>{R.addEventListener("scroll",O,{passive:!0})}),()=>{u&&F.removeEventListener("keydown",z),x&&F.removeEventListener(d,I),N.forEach(R=>{R.removeEventListener("scroll",O)})}},[c,l,s,a,u,x,d,n,r,g,f,T,M,z,I]),E.useEffect(()=>{A.current=!1},[x,d]),E.useMemo(()=>f?{reference:{onKeyDown:z,[fS[h]]:O=>{m&&(i.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,O.nativeEvent))}},floating:{onKeyDown:z,[dS[d]]:()=>{A.current=!0}}}:{},[f,i,m,d,h,r,z])}let ya;process.env.NODE_ENV!=="production"&&(ya=new Set);function mS(e){var t;e===void 0&&(e={});const{open:n=!1,onOpenChange:r,nodeId:i}=e;if(process.env.NODE_ENV!=="production"){var o;const T="Floating UI: Cannot pass a virtual element to the `elements.reference` option, as it must be a real DOM element. Use `refs.setPositionReference` instead.";if((o=e.elements)!=null&&o.reference&&!ot(e.elements.reference)){var a;if(!((a=ya)!=null&&a.has(T))){var s;(s=ya)==null||s.add(T),console.error(T)}}}const[l,c]=E.useState(null),f=((t=e.elements)==null?void 0:t.reference)||l,u=S1(e),p=ti(),d=Ft((T,M)=>{T&&(h.current.openEvent=M),r==null||r(T,M)}),m=E.useRef(null),h=E.useRef({}),g=E.useState(()=>Y1())[0],y=pa(),b=E.useCallback(T=>{const M=ot(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;u.refs.setReference(M)},[u.refs]),w=E.useCallback(T=>{(ot(T)||T===null)&&(m.current=T,c(T)),(ot(u.refs.reference.current)||u.refs.reference.current===null||T!==null&&!ot(T))&&u.refs.setReference(T)},[u.refs]),C=E.useMemo(()=>({...u.refs,setReference:w,setPositionReference:b,domReference:m}),[u.refs,w,b]),x=E.useMemo(()=>({...u.elements,domReference:f}),[u.elements,f]),A=E.useMemo(()=>({...u,refs:C,elements:x,dataRef:h,nodeId:i,floatingId:y,events:g,open:n,onOpenChange:d}),[u,i,y,g,n,d,C,x]);return _e(()=>{const T=p==null?void 0:p.nodesRef.current.find(M=>M.id===i);T&&(T.context=A)}),E.useMemo(()=>({...u,context:A,refs:C,elements:x}),[u,C,x,A])}function ba(e,t,n){const r=new Map;return{...n==="floating"&&{tabIndex:-1},...e,...t.map(i=>i?i[n]:null).concat(e).reduce((i,o)=>(o&&Object.entries(o).forEach(a=>{let[s,l]=a;if(s.indexOf("on")===0){if(r.has(s)||r.set(s,[]),typeof l=="function"){var c;(c=r.get(s))==null||c.push(l),i[s]=function(){for(var f,u=arguments.length,p=new Array(u),d=0;d<u;d++)p[d]=arguments[d];return(f=r.get(s))==null?void 0:f.map(m=>m(...p)).find(m=>m!==void 0)}}}else i[s]=l}),i),{})}}function gS(e){e===void 0&&(e=[]);const t=e,n=E.useCallback(o=>ba(o,e,"reference"),t),r=E.useCallback(o=>ba(o,e,"floating"),t),i=E.useCallback(o=>ba(o,e,"item"),e.map(o=>o==null?void 0:o.item));return E.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:i}),[n,r,i])}let ld=!1;function oi(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function cd(e,t){return oi(t,e===ua||e===Zr,e===pn||e===er)}function va(e,t,n){return oi(t,e===Zr,n?e===pn:e===er)||e==="Enter"||e==" "||e===""}function yS(e,t,n){return oi(t,n?e===pn:e===er,e===Zr)}function ud(e,t,n){return oi(t,n?e===er:e===pn,e===ua)}function bS(e,t){const{open:n,onOpenChange:r,refs:i,elements:{domReference:o,floating:a}}=e,{listRef:s,activeIndex:l,onNavigate:c=()=>{},enabled:f=!0,selectedIndex:u=null,allowEscape:p=!1,loop:d=!1,nested:m=!1,rtl:h=!1,virtual:g=!1,focusItemOnOpen:y="auto",focusItemOnHover:b=!0,openOnArrowKeyDown:w=!0,disabledIndices:C=void 0,orientation:x="vertical",cols:A=1,scrollItemIntoView:T=!0,virtualItemRef:M}=t;process.env.NODE_ENV!=="production"&&(p&&(d||console.warn(["Floating UI: `useListNavigation` looping must be enabled to allow","escaping."].join(" ")),g||console.warn(["Floating UI: `useListNavigation` must be virtual to allow","escaping."].join(" "))),x==="vertical"&&A>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const z=Jf(),I=ti(),O=Ft(c),F=E.useRef(y),N=E.useRef(u??-1),R=E.useRef(null),D=E.useRef(!0),_=E.useRef(O),U=E.useRef(!!a),$=E.useRef(!1),H=E.useRef(!1),v=Lt(C),L=Lt(n),W=Lt(T),[S,V]=E.useState(),[te,Y]=E.useState(),X=Ft(function(J,G,j){j===void 0&&(j=!1);const ne=J.current[G.current];ne&&(g?(V(ne.id),I==null||I.events.emit("virtualfocus",ne),M&&(M.current=ne)):St(ne,{preventScroll:!0,sync:Uk()&&xf()?ld||$.current:!1}),requestAnimationFrame(()=>{const se=W.current;se&&ne&&(j||!D.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof se=="boolean"?{block:"nearest",inline:"nearest"}:se))}))});_e(()=>{document.createElement("div").focus({get preventScroll(){return ld=!0,!1}})},[]),_e(()=>{f&&(n&&a?F.current&&u!=null&&(H.current=!0,O(u)):U.current&&(N.current=-1,_.current(null)))},[f,n,a,u,O]),_e(()=>{if(f&&n&&a)if(l==null){if($.current=!1,u!=null)return;if(U.current&&(N.current=-1,X(s,N)),!U.current&&F.current&&(R.current!=null||F.current===!0&&R.current==null)){let J=0;const G=()=>{s.current[0]==null?(J<2&&(J?requestAnimationFrame:queueMicrotask)(G),J++):(N.current=R.current==null||va(R.current,x,h)||m?fa(s,v.current):Yf(s,v.current),R.current=null,O(N.current))};G()}}else tr(s,l)||(N.current=l,X(s,N,H.current),H.current=!1)},[f,n,a,l,u,m,s,x,h,O,X,v]),_e(()=>{var J,G;if(!f||a||!I||g||!U.current)return;const j=I.nodesRef.current,ne=(J=j.find(Q=>Q.id===z))==null||(G=J.context)==null?void 0:G.elements.floating,se=Pt(st(a)),K=j.some(Q=>Q.context&&Ye(Q.context.elements.floating,se));ne&&!K&&D.current&&ne.focus({preventScroll:!0})},[f,a,I,z,g]),_e(()=>{if(!f||!I||!g||z)return;function J(G){Y(G.id),M&&(M.current=G)}return I.events.on("virtualfocus",J),()=>{I.events.off("virtualfocus",J)}},[f,I,g,z,M]),_e(()=>{_.current=O,U.current=!!a}),_e(()=>{n||(R.current=null)},[n]);const oe=l!=null,ae=E.useMemo(()=>{function J(j){if(!n)return;const ne=s.current.indexOf(j);ne!==-1&&O(ne)}return{onFocus(j){let{currentTarget:ne}=j;J(ne)},onClick:j=>{let{currentTarget:ne}=j;return ne.focus({preventScroll:!0})},...b&&{onMouseMove(j){let{currentTarget:ne}=j;J(ne)},onPointerLeave(j){let{pointerType:ne}=j;!D.current||ne==="touch"||(N.current=-1,X(s,N),O(null),g||St(i.floating.current,{preventScroll:!0}))}}}},[n,i,X,b,s,O,g]);return E.useMemo(()=>{if(!f)return{};const J=v.current;function G(Q){if(D.current=!1,$.current=!0,!L.current&&Q.currentTarget===i.floating.current)return;if(m&&ud(Q.key,x,h)){Re(Q),r(!1,Q.nativeEvent),ln(o)&&!g&&o.focus();return}const ue=N.current,he=fa(s,J),me=Yf(s,J);if(Q.key==="Home"&&(Re(Q),N.current=he,O(N.current)),Q.key==="End"&&(Re(Q),N.current=me,O(N.current)),!(A>1&&(N.current=V1(s,{event:Q,orientation:x,loop:d,cols:A,disabledIndices:J,minIndex:he,maxIndex:me,prevIndex:N.current,stopEvent:!0}),O(N.current),x==="both"))&&cd(Q.key,x)){if(Re(Q),n&&!g&&Pt(Q.currentTarget.ownerDocument)===Q.currentTarget){N.current=va(Q.key,x,h)?he:me,O(N.current);return}va(Q.key,x,h)?d?N.current=ue>=me?p&&ue!==s.current.length?-1:he:je(s,{startingIndex:ue,disabledIndices:J}):N.current=Math.min(me,je(s,{startingIndex:ue,disabledIndices:J})):d?N.current=ue<=he?p&&ue!==-1?s.current.length:me:je(s,{startingIndex:ue,decrement:!0,disabledIndices:J}):N.current=Math.max(he,je(s,{startingIndex:ue,decrement:!0,disabledIndices:J})),tr(s,N.current)?O(null):O(N.current)}}function j(Q){y==="auto"&&vf(Q.nativeEvent)&&(F.current=!0)}function ne(Q){F.current=y,y==="auto"&&wf(Q.nativeEvent)&&(F.current=!0)}const se=g&&n&&oe&&{"aria-activedescendant":te||S},K=s.current.find(Q=>(Q==null?void 0:Q.id)===S);return{reference:{...se,onKeyDown(Q){D.current=!1;const ue=Q.key.indexOf("Arrow")===0,he=yS(Q.key,x,h),me=ud(Q.key,x,h),De=cd(Q.key,x),Ue=(m?he:De)||Q.key==="Enter"||Q.key.trim()==="";if(g&&n){const ce=I==null?void 0:I.nodesRef.current.find(q=>q.parentId==null),B=I&&ce?Z1(I.nodesRef.current,ce.id):null;if(ue&&B&&M){const q=new KeyboardEvent("keydown",{key:Q.key,bubbles:!0});if(he||me){var He,qe;const le=((He=B.context)==null?void 0:He.elements.domReference)===Q.currentTarget,re=me&&!le?(qe=B.context)==null?void 0:qe.elements.domReference:he?K:null;re&&(Re(Q),re.dispatchEvent(q),Y(void 0))}if(De&&B.context&&B.context.open&&B.parentId&&Q.currentTarget!==B.context.elements.domReference){var ee;Re(Q),(ee=B.context.elements.domReference)==null||ee.dispatchEvent(q);return}}return G(Q)}if(!(!n&&!w&&ue)){if(Ue&&(R.current=m&&De?null:Q.key),m){he&&(Re(Q),n?(N.current=fa(s,J),O(N.current)):r(!0,Q.nativeEvent));return}De&&(u!=null&&(N.current=u),Re(Q),!n&&w?r(!0,Q.nativeEvent):G(Q),n&&O(N.current))}},onFocus(){n&&O(null)},onPointerDown:ne,onMouseDown:j,onClick:j},floating:{"aria-orientation":x==="both"?void 0:x,...se,onKeyDown:G,onPointerMove(){D.current=!0}},item:ae}},[o,i,S,te,v,L,s,f,x,h,g,n,oe,m,u,w,p,A,d,y,O,r,ae,I,M])}function vS(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:i=!0,role:o="dialog"}=t,a=pa();return E.useMemo(()=>{const s={id:r,role:o};return i?o==="tooltip"?{reference:{"aria-describedby":n?r:void 0},floating:s}:{reference:{"aria-expanded":n?"true":"false","aria-haspopup":o==="alertdialog"?"dialog":o,"aria-controls":n?r:void 0,...o==="listbox"&&{role:"combobox"},...o==="menu"&&{id:a}},floating:{...s,...o==="menu"&&{"aria-labelledby":a}}}:{}},[i,o,n,r,a])}function wS(e,t){var n;const{open:r,dataRef:i}=e,{listRef:o,activeIndex:a,onMatch:s,onTypingChange:l,enabled:c=!0,findMatch:f=null,resetMs:u=750,ignoreKeys:p=[],selectedIndex:d=null}=t,m=E.useRef(),h=E.useRef(""),g=E.useRef((n=d??a)!=null?n:-1),y=E.useRef(null),b=Ft(s),w=Ft(l),C=Lt(f),x=Lt(p);return _e(()=>{r&&(clearTimeout(m.current),y.current=null,h.current="")},[r]),_e(()=>{if(r&&h.current===""){var A;g.current=(A=d??a)!=null?A:-1}},[r,d,a]),E.useMemo(()=>{if(!c)return{};function A(z){z?i.current.typing||(i.current.typing=z,w(z)):i.current.typing&&(i.current.typing=z,w(z))}function T(z,I,O){const F=C.current?C.current(I,O):I.find(N=>(N==null?void 0:N.toLocaleLowerCase().indexOf(O.toLocaleLowerCase()))===0);return F?z.indexOf(F):-1}function M(z){const I=o.current;if(h.current.length>0&&h.current[0]!==" "&&(T(I,I,h.current)===-1?A(!1):z.key===" "&&Re(z)),I==null||x.current.includes(z.key)||z.key.length!==1||z.ctrlKey||z.metaKey||z.altKey)return;r&&z.key!==" "&&(Re(z),A(!0)),I.every(R=>{var D,_;return R?((D=R[0])==null?void 0:D.toLocaleLowerCase())!==((_=R[1])==null?void 0:_.toLocaleLowerCase()):!0})&&h.current===z.key&&(h.current="",g.current=y.current),h.current+=z.key,clearTimeout(m.current),m.current=setTimeout(()=>{h.current="",g.current=y.current,A(!1)},u);const F=g.current,N=T(I,[...I.slice((F||0)+1),...I.slice(0,(F||0)+1)],h.current);N!==-1?(b(N),y.current=N):z.key!==" "&&(h.current="",A(!1))}return{reference:{onKeyDown:M},floating:{onKeyDown:M,onKeyUp(z){z.key===" "&&A(!1)}}}},[c,r,i,o,u,x,C,b,w])}const xS=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var R,D,_,U,$;const i=Fr(H=>H.messageContainerRef),[o,a]=E.useState(!1),[s,l]=E.useState(null),[c,f]=E.useState(null),{message:{blocks:{dropdown:u}}}=ge,p=e.reduce((H,v)=>(H[v.label]=v.value,H),{}),d=p?Object.keys(p):[],m=H=>{a(c!==null&&!t?!1:H)},{refs:h,floatingStyles:g,context:y}=mS({placement:"bottom-start",open:o,onOpenChange:m,whileElementsMounted:b1,middleware:[E1(5),C1({padding:10,boundary:(i==null?void 0:i.current)??void 0,crossAxis:!0}),A1({apply({rects:H,elements:v,availableHeight:L}){Object.assign(v.floating.style,{maxHeight:`${L}px`,minWidth:`${H.reference.width}px`})},padding:10})]}),b=E.useRef([]),w=E.useRef(d),C=E.useRef(!1),x=cS(y,{event:"mousedown"}),A=hS(y),T=vS(y,{role:"listbox"}),M=bS(y,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),z=wS(y,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:o?l:f,onTypingChange(H){C.current=H}}),{getReferenceProps:I,getFloatingProps:O,getItemProps:F}=gS([A,T,M,z,x]),N=H=>{f(H),d[H]!==void 0&&(n==null||n({type:"text",text:d[H]??"",value:p[d[H]]??""})),a(!1)};return k.jsxs(k.Fragment,{children:[k.jsxs("div",{tabIndex:0,ref:h.setReference,"aria-labelledby":"select-label","aria-autocomplete":"none","data-disabled":c!==null&&!t?"":void 0,style:r?{pointerEvents:"none"}:void 0,...(R=u.button)==null?void 0:R.container,...I(),children:[k.jsx("span",{...(D=u.button)==null?void 0:D.text,children:c?d[c]:"Select..."}),k.jsx(Xx,{...(_=u.button)==null?void 0:_.icon})]}),o&&k.jsx(aS,{children:k.jsx(lS,{context:y,modal:!1,children:k.jsx("div",{ref:h.setFloating,className:($=(U=u.content)==null?void 0:U.container)==null?void 0:$.className,style:{...g},...O(),children:d.map((H,v)=>{var L;return k.jsx("div",{ref:W=>{b.current[v]=W},role:"option",tabIndex:v===s?0:-1,"aria-selected":v===c&&v===s,"data-active":v===s?"":void 0,...(L=u.content)==null?void 0:L.item,...F({onClick(){N(v)},onKeyDown(W){W.key==="Enter"&&(W.preventDefault(),N(v)),W.key===" "&&!C.current&&(W.preventDefault(),N(v))}}),children:H},H)})})})})]})},fd=P.forwardRef(({title:e,url:t,isReadOnly:n,...r},i)=>{const{message:{blocks:{file:o}}}=ge;return k.jsxs("a",{...r,...o.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:i,target:"_blank",rel:"noreferrer",children:[k.jsx("p",{...o.title,children:e||t}),k.jsx(o0,{...o.icon})]})});fd.displayName="File";const kS=Dt()((e,t)=>({components:{},getCustomComponent:async n=>{const r=t().components[n];if(r)return r;const i=await fetch(n).then(c=>c.text()),o=new Blob([i],{type:"application/javascript"}),s=await import(URL.createObjectURL(o)),l=()=>s.default;return e(c=>({components:{...c.components,[n]:l}})),l}}));globalThis.React=P;const dd={audio:tf,bubble:Qu,button:ek,carousel:hf,column:rf,dropdown:xS,file:fd,image:Xu,location:nf,row:of,text:S0,video:ef,custom:({url:e,name:t,data:n,...r})=>{const i=kS(c=>c.getCustomComponent),[o,a]=P.useState(null),[s,l]=P.useState(null);return P.useEffect(()=>{i(e).then(a).catch(c=>{l(c.message)})},[e]),s?k.jsx("div",{style:{color:"red"},children:s}):o?k.jsx(o,{...n,...r}):null}},qt=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??dd[e.type],i={...n,...e};return k.jsx(r,{...i})};function pd(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=pd(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ir(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=pd(e))&&(r&&(r+=" "),r+=t);return r}const SS=({disabled:e,onFileSelected:t})=>{const n=P.useRef(null),{uploadButton:r}=ge.composer,i=()=>{n.current&&n.current.click()},o=a=>{const s=a.target.files;s&&s.length>0&&Array.from(s).forEach(l=>{t(l)})};return k.jsxs(k.Fragment,{children:[k.jsx(m0,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:i}),k.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:o})]})},ES=({name:e,type:t,instance:n,status:r,removeFile:i})=>{const{loader:o,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:c}=ge.composer.fileWidget,f=["PNG","JPEG","JPG"].includes(si(e)),[u,p]=P.useState("");return P.useEffect(()=>{if(!n||!f){p("");return}const d=n;if(!(d instanceof File||d instanceof Blob)){p("");return}const h=URL.createObjectURL(d);return p(h),()=>{h&&URL.revokeObjectURL(h)}},[n,f]),r==="loading"?k.jsx(ai,{name:e,status:r,removeButton:k.jsx("div",{...o}),extension:si(e),children:k.jsx("div",{...a.container,children:k.jsx(wa,{type:t,...a.icon})})}):r==="error"?k.jsx(ai,{name:e,status:r,removeButton:k.jsx(hd,{removeFile:()=>i(e)}),extension:"Upload Error",children:k.jsxs("div",{...a.container,children:[k.jsx(n0,{...l}),k.jsx(wa,{type:t,...a.icon})]})}):r=="uploaded"&&f?k.jsx(ai,{name:e,status:r,removeButton:k.jsx(hd,{removeFile:()=>i(e)}),extension:si(e),children:k.jsx("div",{...a.container,children:k.jsx("img",{src:u,alt:e,...c})})}):k.jsx(ai,{name:e,status:r,removeButton:k.jsx(wu,{onClick:()=>i(e),...s}),extension:si(e),children:k.jsx("div",{...a.container,children:k.jsx(wa,{type:t,...a.icon})})})},ai=({name:e,status:t,removeButton:n,children:r,extension:i})=>{const{container:o,metadata:a}=ge.composer.fileWidget,s=Os(e);return k.jsxs("div",{"data-status":t,title:e,...o,children:[n,r,k.jsxs("div",{...a.container,children:[k.jsx("div",{...a.name,children:s}),k.jsx("div",{...a.type,children:i})]})]})},wa=({type:e,...t})=>e==="image"?k.jsx(l0,{...t}):e==="video"?k.jsx(w0,{...t}):e==="audio"?k.jsx(Su,{...t}):k.jsx(xu,{...t}),si=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},hd=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ge;return k.jsx(wu,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function xa(){return xa=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xa.apply(null,arguments)}function CS(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}var AS=P.useLayoutEffect,IS=function(t){var n=E.useRef(t);return AS(function(){n.current=t}),n},md=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},TS=function(t,n){var r=P.useRef();return P.useCallback(function(i){t.current=i,r.current&&md(r.current,null),r.current=n,n&&md(n,i)},[n])},gd={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},OS=function(t){Object.keys(gd).forEach(function(n){t.style.setProperty(n,gd[n],"important")})},yd=OS,Ve=null,bd=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function DS(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),Ve||(Ve=document.createElement("textarea"),Ve.setAttribute("tabindex","-1"),Ve.setAttribute("aria-hidden","true"),yd(Ve)),Ve.parentNode===null&&document.body.appendChild(Ve);var i=e.paddingSize,o=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;Ve.style[d]=a[d]}),yd(Ve),Ve.value=t;var l=bd(Ve,e);Ve.value=t,l=bd(Ve,e),Ve.value="x";var c=Ve.scrollHeight-i,f=c*n;s==="border-box"&&(f=f+i+o),l=Math.max(f,l);var u=c*r;return s==="border-box"&&(u=u+i+o),l=Math.min(u,l),[l,c]}var vd=function(){},MS=function(t,n){return t.reduce(function(r,i){return r[i]=n[i],r},{})},PS=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],NS=!!document.documentElement.currentStyle,_S=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=MS(PS,n),i=r.boxSizing;if(i==="")return null;NS&&i==="border-box"&&(r.width=parseFloat(r.width)+parseFloat(r.borderRightWidth)+parseFloat(r.borderLeftWidth)+parseFloat(r.paddingRight)+parseFloat(r.paddingLeft)+"px");var o=parseFloat(r.paddingBottom)+parseFloat(r.paddingTop),a=parseFloat(r.borderBottomWidth)+parseFloat(r.borderTopWidth);return{sizingStyle:r,paddingSize:o,borderSize:a}},LS=_S;function wd(e,t,n){var r=IS(n);E.useLayoutEffect(function(){var i=function(a){return r.current(a)};if(e)return e.addEventListener(t,i),function(){return e.removeEventListener(t,i)}},[])}var FS=function(t){wd(window,"resize",t)},RS=function(t){wd(document.fonts,"loadingdone",t)},BS=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],zS=function(t,n){var r=t.cacheMeasurements,i=t.maxRows,o=t.minRows,a=t.onChange,s=a===void 0?vd:a,l=t.onHeightChange,c=l===void 0?vd:l,f=CS(t,BS),u=f.value!==void 0,p=E.useRef(null),d=TS(p,n),m=E.useRef(0),h=E.useRef(),g=function(){var w=p.current,C=r&&h.current?h.current:LS(w);if(C){h.current=C;var x=DS(C,w.value||w.placeholder||"x",o,i),A=x[0],T=x[1];m.current!==A&&(m.current=A,w.style.setProperty("height",A+"px","important"),c(A,{rowHeight:T}))}},y=function(w){u||g(),s(w)};return E.useLayoutEffect(g),FS(g),RS(g),E.createElement("textarea",xa({},f,{onChange:y,ref:d}))},$S=E.forwardRef(zS);const jS=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:i,setTextInput:o,setHistoryIndex:a,sendComposerMessage:s,allowFileUpload:l,onFilePasted:c})=>{const f=_u(d=>d.messageHistory),{input:u}=ge.composer,p=d=>{if(!l||!c||!d.clipboardData)return;const m=Array.from(d.clipboardData.files);m.length>0&&(d.preventDefault(),m.forEach(h=>{c(h)}))};return k.jsx($S,{...u,"aria-label":"Message Input",ref:e,placeholder:t??"Type your message...",disabled:n,value:r,"data-has-value":!!r,onChange:d=>{const m=d.target.value;o(m),f.includes(m)||a(-1)},onPaste:p,maxRows:5,onKeyDown:d=>{if(n)return;const m=d.nativeEvent;m.isComposing||m.keyCode===229||(d.key==="Enter"&&d.shiftKey?(d.preventDefault(),o(`${r}
|
|
257
|
+
`)):d.key==="Enter"&&(d.preventDefault(),s()),d.key==="ArrowUp"&&(r.trim()===""||f.includes(r)&&i>=0)&&(d.preventDefault(),i<f.length-1&&o(f[i+1]??""),a(Math.min(i+1,f.length-1))),d.key==="ArrowDown"&&(r.trim()===""||f.includes(r))&&i>=0&&(d.preventDefault(),o(i===0?"":f[i-1]??""),a(Math.max(i-1,-1))))}})},US=({disabled:e,setTextInput:t})=>{const[n,r]=P.useState(!1),i=P.useRef(null),{voiceButton:o}=ge.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{i.current||(i.current=new a);const l=i.current;l&&(l.continuous=!0,l.onresult=c=>{var u,p,d;const f=((d=(p=(u=c.results)==null?void 0:u[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(f??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return k.jsx(d0,{...o,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},xd=P.memo(P.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:i,connected:o,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:c,storageKey:f,children:u,...p},d)=>{const{composer:m}=ge,h=n||r||!o,[g,y]=P.useState(""),[b,w]=P.useState(-1),C=qu(f),x=C(F=>F.files),A=C(F=>F.setFiles),T=C(F=>F.deleteFile),M=C(F=>F.uploadFile),z=_u(F=>F.addMessageToHistory),I=!!g||x.filter(F=>F.status==="uploaded").length>0;t=t??P.useRef(null);const O=()=>{const F=x.filter(D=>D.status==="uploaded");if(!F.length&&!g)return;const N=(F==null?void 0:F.map(D=>{const _=D.url,U=D.type;return{video:{type:"video",videoUrl:_},audio:{type:"audio",audioUrl:_},image:{type:"image",imageUrl:_}}[U]??{title:D.name,type:"file",fileUrl:_}}))??[];g&&N.push({type:"text",text:g});let R;N.length==1?R=N[0]:R={type:"bloc",items:N.map(_=>{const{type:U,...$}=_;return{type:U,payload:$}})},l==null||l(R),A([]),y(""),z(g),w(-1)};return r?null:k.jsxs(k.Fragment,{children:[k.jsxs("div",{"data-disabled":h,className:ir(m.container.className,e),ref:d,...p,children:[u,x.length>0&&k.jsx("div",{...m==null?void 0:m.fileContainer,children:x.map(F=>k.jsx(ES,{...F,removeFile:T},F.name))}),k.jsxs("div",{...m.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[i&&k.jsx(SS,{disabled:h,onFileSelected:F=>{c&&M(F,c)}}),k.jsx(jS,{inputRef:t,composerPlaceholder:a,composerDisabled:h,textInput:g,historyIndex:b,setTextInput:y,setHistoryIndex:w,sendComposerMessage:O,allowFileUpload:i,onFilePasted:F=>{c&&M(F,c)}}),!h&&k.jsxs(k.Fragment,{children:[k.jsx(Jx,{...m.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":I,onClick:()=>O()}),k.jsx(US,{disabled:I,setTextInput:y})]})]})]}),k.jsx(zc,{components:{a:({node:F,...N})=>k.jsx("a",{...N,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...m.footer,children:s})]})}));var ka={exports:{}},li={exports:{}},xe={};/** @license React v16.13.1
|
|
258
258
|
* react-is.production.min.js
|
|
259
259
|
*
|
|
260
260
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
261
261
|
*
|
|
262
262
|
* This source code is licensed under the MIT license found in the
|
|
263
263
|
* LICENSE file in the root directory of this source tree.
|
|
264
|
-
*/var
|
|
264
|
+
*/var kd;function HS(){if(kd)return xe;kd=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var A=x.$$typeof;switch(A){case t:switch(x=x.type,x){case l:case c:case r:case o:case i:case u:return x;default:switch(x=x&&x.$$typeof,x){case s:case f:case m:case d:case a:return x;default:return A}}case n:return A}}}function C(x){return w(x)===c}return xe.AsyncMode=l,xe.ConcurrentMode=c,xe.ContextConsumer=s,xe.ContextProvider=a,xe.Element=t,xe.ForwardRef=f,xe.Fragment=r,xe.Lazy=m,xe.Memo=d,xe.Portal=n,xe.Profiler=o,xe.StrictMode=i,xe.Suspense=u,xe.isAsyncMode=function(x){return C(x)||w(x)===l},xe.isConcurrentMode=C,xe.isContextConsumer=function(x){return w(x)===s},xe.isContextProvider=function(x){return w(x)===a},xe.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},xe.isForwardRef=function(x){return w(x)===f},xe.isFragment=function(x){return w(x)===r},xe.isLazy=function(x){return w(x)===m},xe.isMemo=function(x){return w(x)===d},xe.isPortal=function(x){return w(x)===n},xe.isProfiler=function(x){return w(x)===o},xe.isStrictMode=function(x){return w(x)===i},xe.isSuspense=function(x){return w(x)===u},xe.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===o||x===i||x===u||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===m||x.$$typeof===d||x.$$typeof===a||x.$$typeof===s||x.$$typeof===f||x.$$typeof===g||x.$$typeof===y||x.$$typeof===b||x.$$typeof===h)},xe.typeOf=w,xe}var ke={};/** @license React v16.13.1
|
|
265
265
|
* react-is.development.js
|
|
266
266
|
*
|
|
267
267
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
268
268
|
*
|
|
269
269
|
* This source code is licensed under the MIT license found in the
|
|
270
270
|
* LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/var
|
|
271
|
+
*/var Sd;function WS(){return Sd||(Sd=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,o=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,f=e?Symbol.for("react.forward_ref"):60112,u=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(j){return typeof j=="string"||typeof j=="function"||j===r||j===c||j===o||j===i||j===u||j===p||typeof j=="object"&&j!==null&&(j.$$typeof===m||j.$$typeof===d||j.$$typeof===a||j.$$typeof===s||j.$$typeof===f||j.$$typeof===g||j.$$typeof===y||j.$$typeof===b||j.$$typeof===h)}function C(j){if(typeof j=="object"&&j!==null){var ne=j.$$typeof;switch(ne){case t:var se=j.type;switch(se){case l:case c:case r:case o:case i:case u:return se;default:var K=se&&se.$$typeof;switch(K){case s:case f:case m:case d:case a:return K;default:return ne}}case n:return ne}}}var x=l,A=c,T=s,M=a,z=t,I=f,O=r,F=m,N=d,R=n,D=o,_=i,U=u,$=!1;function H(j){return $||($=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),v(j)||C(j)===l}function v(j){return C(j)===c}function L(j){return C(j)===s}function W(j){return C(j)===a}function S(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function V(j){return C(j)===f}function te(j){return C(j)===r}function Y(j){return C(j)===m}function X(j){return C(j)===d}function oe(j){return C(j)===n}function ae(j){return C(j)===o}function J(j){return C(j)===i}function G(j){return C(j)===u}ke.AsyncMode=x,ke.ConcurrentMode=A,ke.ContextConsumer=T,ke.ContextProvider=M,ke.Element=z,ke.ForwardRef=I,ke.Fragment=O,ke.Lazy=F,ke.Memo=N,ke.Portal=R,ke.Profiler=D,ke.StrictMode=_,ke.Suspense=U,ke.isAsyncMode=H,ke.isConcurrentMode=v,ke.isContextConsumer=L,ke.isContextProvider=W,ke.isElement=S,ke.isForwardRef=V,ke.isFragment=te,ke.isLazy=Y,ke.isMemo=X,ke.isPortal=oe,ke.isProfiler=ae,ke.isStrictMode=J,ke.isSuspense=G,ke.isValidElementType=w,ke.typeOf=C}()),ke}var Ed;function Cd(){return Ed||(Ed=1,process.env.NODE_ENV==="production"?li.exports=HS():li.exports=WS()),li.exports}/*
|
|
272
272
|
object-assign
|
|
273
273
|
(c) Sindre Sorhus
|
|
274
274
|
@license MIT
|
|
275
|
-
*/var
|
|
276
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
277
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
278
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
279
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
280
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $y(e,t){if(e){if(typeof e=="string")return Rc(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Rc(e,t)}}function Rc(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $N(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],o=!0,i=!1,a,s;try{for(n=n.call(e);!(o=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));o=!0);}catch(l){i=!0,s=l}finally{try{!o&&n.return!=null&&n.return()}finally{if(i)throw s}}return r}}function TN(e){if(Array.isArray(e))return e}function Ty(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ty(Object(n),!0).forEach(function(r){Lc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ty(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Lc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ha(e,t){if(e==null)return{};var n=ON(e,t),r,o;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ON(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,i;for(i=0;i<r.length;i++)o=r[i],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}var Fc=O.forwardRef(function(e,t){var n=e.children,r=ha(e,yN),o=Iy(r),i=o.open,a=ha(o,bN);return O.useImperativeHandle(t,function(){return{open:i}},[i]),O.createElement(O.Fragment,null,n(Le(Le({},a),{},{open:i})))});Fc.displayName="Dropzone";var Oy={disabled:!1,getFilesFromEvent:zM,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};Fc.defaultProps=Oy,Fc.propTypes={children:Me.func,accept:Me.objectOf(Me.arrayOf(Me.string)),multiple:Me.bool,preventDropOnDocument:Me.bool,noClick:Me.bool,noKeyboard:Me.bool,noDrag:Me.bool,noDragEventsBubbling:Me.bool,minSize:Me.number,maxSize:Me.number,maxFiles:Me.number,disabled:Me.bool,getFilesFromEvent:Me.func,onFileDialogCancel:Me.func,onFileDialogOpen:Me.func,useFsAccessApi:Me.bool,autoFocus:Me.bool,onDragEnter:Me.func,onDragLeave:Me.func,onDragOver:Me.func,onDrop:Me.func,onDropAccepted:Me.func,onDropRejected:Me.func,onError:Me.func,validator:Me.func};var Bc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Iy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Le(Le({},Oy),e),n=t.accept,r=t.disabled,o=t.getFilesFromEvent,i=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,u=t.onDragLeave,f=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,v=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,m=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,A=t.noClick,x=t.noKeyboard,k=t.noDrag,$=t.noDragEventsBubbling,R=t.onError,H=t.validator,T=O.useMemo(function(){return vN(n)},[n]),_=O.useMemo(function(){return hN(n)},[n]),F=O.useMemo(function(){return typeof g=="function"?g:Py},[g]),N=O.useMemo(function(){return typeof h=="function"?h:Py},[h]),B=O.useRef(null),D=O.useRef(null),M=O.useReducer(IN,Bc),G=Nc(M,2),U=G[0],I=G[1],y=U.isFocused,P=U.isFileDialogActive,j=O.useRef(typeof window<"u"&&window.isSecureContext&&m&&pN()),S=function(){!j.current&&P&&setTimeout(function(){if(D.current){var ce=D.current.files;ce.length||(I({type:"closeDialog"}),N())}},300)};O.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[D,P,N,j]);var V=O.useRef([]),Y=function(ce){B.current&&B.current.contains(ce.target)||(ce.preventDefault(),V.current=[])};O.useEffect(function(){return w&&(document.addEventListener("dragover",ky,!1),document.addEventListener("drop",Y,!1)),function(){w&&(document.removeEventListener("dragover",ky),document.removeEventListener("drop",Y))}},[B,w]),O.useEffect(function(){return!r&&b&&B.current&&B.current.focus(),function(){}},[B,b,r]);var q=O.useCallback(function(ie){R?R(ie):console.error(ie)},[R]),Q=O.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie),V.current=[].concat(xN(V.current),[ie.target]),pa(ie)&&Promise.resolve(o(ie)).then(function(ce){if(!(da(ie)&&!$)){var W=ce.length,z=W>0&&cN({files:ce,accept:T,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:H}),re=W>0&&!z;I({isDragAccept:z,isDragReject:re,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ie)}}).catch(function(ce){return q(ce)})},[o,c,q,$,T,a,i,s,l,H]),X=O.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie);var ce=pa(ie);if(ce&&ie.dataTransfer)try{ie.dataTransfer.dropEffect="copy"}catch{}return ce&&f&&f(ie),!1},[f,$]),ee=O.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie);var ce=V.current.filter(function(z){return B.current&&B.current.contains(z)}),W=ce.indexOf(ie.target);W!==-1&&ce.splice(W,1),V.current=ce,!(ce.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),pa(ie)&&u&&u(ie))},[B,u,$]),J=O.useCallback(function(ie,ce){var W=[],z=[];ie.forEach(function(re){var se=xy(re,T),ue=Nc(se,2),he=ue[0],We=ue[1],He=Ey(re,a,i),gt=Nc(He,2),tt=gt[0],Ie=gt[1],nt=H?H(re):null;if(he&&tt&&!nt)W.push(re);else{var Ge=[We,Ie];nt&&(Ge=Ge.concat(nt)),z.push({file:re,errors:Ge.filter(function(Bn){return Bn})})}}),(!s&&W.length>1||s&&l>=1&&W.length>l)&&(W.forEach(function(re){z.push({file:re,errors:[lN]})}),W.splice(0)),I({acceptedFiles:W,fileRejections:z,type:"setFiles"}),p&&p(W,z,ce),z.length>0&&v&&v(z,ce),W.length>0&&d&&d(W,ce)},[I,s,T,a,i,l,p,d,v,H]),Z=O.useCallback(function(ie){ie.preventDefault(),ie.persist(),Ue(ie),V.current=[],pa(ie)&&Promise.resolve(o(ie)).then(function(ce){da(ie)&&!$||J(ce,ie)}).catch(function(ce){return q(ce)}),I({type:"reset"})},[o,J,q,$]),K=O.useCallback(function(){if(j.current){I({type:"openDialog"}),F();var ie={multiple:s,types:_};window.showOpenFilePicker(ie).then(function(ce){return o(ce)}).then(function(ce){J(ce,null),I({type:"closeDialog"})}).catch(function(ce){mN(ce)?(N(ce),I({type:"closeDialog"})):gN(ce)?(j.current=!1,D.current?(D.current.value=null,D.current.click()):q(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):q(ce)});return}D.current&&(I({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[I,F,N,m,J,q,_,s]),L=O.useCallback(function(ie){!B.current||!B.current.isEqualNode(ie.target)||(ie.key===" "||ie.key==="Enter"||ie.keyCode===32||ie.keyCode===13)&&(ie.preventDefault(),K())},[B,K]),ne=O.useCallback(function(){I({type:"focus"})},[]),ae=O.useCallback(function(){I({type:"blur"})},[]),te=O.useCallback(function(){A||(dN()?setTimeout(K,0):K())},[A,K]),de=function(ce){return r?null:ce},me=function(ce){return x?null:de(ce)},De=function(ce){return k?null:de(ce)},Ue=function(ce){$&&ce.stopPropagation()},dt=O.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ie.refKey,W=ce===void 0?"ref":ce,z=ie.role,re=ie.onKeyDown,se=ie.onFocus,ue=ie.onBlur,he=ie.onClick,We=ie.onDragEnter,He=ie.onDragOver,gt=ie.onDragLeave,tt=ie.onDrop,Ie=ha(ie,wN);return Le(Le(Lc({onKeyDown:me(Xt(re,L)),onFocus:me(Xt(se,ne)),onBlur:me(Xt(ue,ae)),onClick:de(Xt(he,te)),onDragEnter:De(Xt(We,Q)),onDragOver:De(Xt(He,X)),onDragLeave:De(Xt(gt,ee)),onDrop:De(Xt(tt,Z)),role:typeof z=="string"&&z!==""?z:"presentation"},W,B),!r&&!x?{tabIndex:0}:{}),Ie)}},[B,L,ne,ae,te,Q,X,ee,Z,x,k,r]),mt=O.useCallback(function(ie){ie.stopPropagation()},[]),pt=O.useMemo(function(){return function(){var ie=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ie.refKey,W=ce===void 0?"ref":ce,z=ie.onChange,re=ie.onClick,se=ha(ie,SN),ue=Lc({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:de(Xt(z,Z)),onClick:de(Xt(re,mt)),tabIndex:-1},W,D);return Le(Le({},ue),se)}},[D,n,s,Z,r]);return Le(Le({},U),{},{isFocused:y&&!r,getRootProps:dt,getInputProps:pt,rootRef:B,inputRef:D,open:de(K)})}function IN(e,t){switch(t.type){case"focus":return Le(Le({},e),{},{isFocused:!0});case"blur":return Le(Le({},e),{},{isFocused:!1});case"openDialog":return Le(Le({},Bc),{},{isFileDialogActive:!0});case"closeDialog":return Le(Le({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Le(Le({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Le(Le({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Le({},Bc);default:return e}}function Py(){}const Dy=({children:e})=>{const t=O.useRef(),[n,r]=O.useState({open:!1}),o=({title:a,description:s,confirmButtonText:l,cancelButtonText:c,onConfirm:u,onCancel:f,initialValue:p,Content:d})=>new Promise((v,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:c,content:d?E.jsx(d,{value:p,setValue:g=>{t.current=g}}):null,onConfirm:()=>{u==null||u(),v(t.current),i()},onCancel:()=>{f==null||f(),h(),i()}})}),i=()=>{r(a=>({...a,open:!1}))};return E.jsxs(ql.Provider,{value:{showInputModal:o},children:[E.jsx(Yr,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:E.jsx(Yr.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},PN=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const o=t.filter(l=>/^\d+$/.test(l)).join(";"),i=`https://fonts.googleapis.com/css2?family=${n}:wght@${o}&display=swap`;if(document.querySelector(`link[href="${i}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=i,document.head.appendChild(s)},_y=({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i,additionalStylesheetUrl:a})=>{O.useMemo(()=>{t&&PN(t,["100","200","300","400","500","600","700","800"])},[t]);const s=O.useMemo(()=>Hp({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i}),[e,t,n,r,o,i]);return E.jsxs(E.Fragment,{children:[a&&E.jsx("link",{rel:"stylesheet",href:a}),E.jsx("style",{children:s})]})},jc=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:o,...i})=>{const{container:a}=ve,s=Li(h=>h.setMessageContainerRef),c=Cm(o)(h=>h.uploadFile),[u,f]=O.useState(0),p=O.useRef(null);O.useEffect(()=>{s(p)},[p,s]);const d=O.useCallback(h=>{n&&(h.forEach(g=>c(g,n)),f(0))},[c,n]),{getRootProps:v}=Iy({noClick:!0,noKeyboard:!0,onDrop:d,disabled:!(r&&n),onDragEnter:()=>f(h=>h+1),onDragLeave:()=>f(h=>h-1)});return E.jsxs("div",{...i,className:Ao(a.className,t),...v(),ref:p,children:[E.jsxs("div",{"data-hover":u>0,...a.dropzone.overlay,children:["Drop files to upload",E.jsx(VI,{style:{width:"50px"}})]}),E.jsx(Dy,{children:e})]})};jc.displayName="Container";const My=O.forwardRef(({children:e,onClick:t,imgUrl:n,...r},o)=>{const{fab:i}=ve,{container:a,icon:s,image:l}=i??{};return n?E.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):E.jsx("div",{...r,...a,ref:o,onClick:t,children:E.jsx("div",{...s})})});My.displayName="Fab";function pn(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function DN(e,t){const n=C.createContext(t),r=i=>{const{children:a,...s}=i,l=C.useMemo(()=>s,Object.values(s));return E.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=C.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,o]}function Ny(e,t=[]){let n=[];function r(i,a){const s=C.createContext(a),l=n.length;n=[...n,a];const c=f=>{var m;const{scope:p,children:d,...v}=f,h=((m=p==null?void 0:p[e])==null?void 0:m[l])||s,g=C.useMemo(()=>v,Object.values(v));return E.jsx(h.Provider,{value:g,children:d})};c.displayName=i+"Provider";function u(f,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,v=C.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[c,u]}const o=()=>{const i=n.map(a=>C.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return C.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,_N(o,...t)]}function _N(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(i){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const f=l(i)[`__scope${c}`];return{...s,...f}},{});return C.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Ry({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=MN({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=bn(n),l=C.useCallback(c=>{if(i){const f=typeof c=="function"?c(e):c;f!==e&&s(f)}else o(c)},[i,e,o,s]);return[a,l]}function MN({defaultProp:e,onChange:t}){const n=C.useState(e),[r]=n,o=C.useRef(r),i=bn(t);return C.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ly(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zc(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ly(o,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let o=0;o<r.length;o++){const i=r[o];typeof i=="function"?i():Ly(e[o],null)}}}}function On(...e){return C.useCallback(zc(...e),e)}var Fy=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(RN);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(Uc,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(Uc,{...r,ref:t,children:n})});Fy.displayName="Slot";var Uc=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=FN(n);return C.cloneElement(n,{...LN(r,n.props),ref:t?zc(t,o):o})}return C.Children.count(n)>1?C.Children.only(null):null});Uc.displayName="SlotClone";var NN=({children:e})=>E.jsx(E.Fragment,{children:e});function RN(e){return C.isValidElement(e)&&e.type===NN}function LN(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function FN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var BN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Wc=BN.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Fy:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function jN(e,t){return C.useReducer((n,r)=>t[n][r]??n,e)}var va=e=>{const{present:t,children:n}=e,r=zN(t),o=typeof n=="function"?n({present:r.isPresent}):C.Children.only(n),i=On(r.ref,UN(o));return typeof n=="function"||r.isPresent?C.cloneElement(o,{ref:i}):null};va.displayName="Presence";function zN(e){const[t,n]=C.useState(),r=C.useRef({}),o=C.useRef(e),i=C.useRef("none"),a=e?"mounted":"unmounted",[s,l]=jN(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return C.useEffect(()=>{const c=ma(r.current);i.current=s==="mounted"?c:"none"},[s]),ir(()=>{const c=r.current,u=o.current;if(u!==e){const p=i.current,d=ma(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&p!==d?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),ir(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=d=>{const h=ma(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(i.current=ma(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:C.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ma(e){return(e==null?void 0:e.animationName)||"none"}function UN(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var WN=C.useId||(()=>{}),HN=0;function ga(e){const[t,n]=C.useState(WN());return ir(()=>{e||n(r=>r??String(HN++))},[e]),e||(t?`radix-${t}`:"")}var Hc="Collapsible",[VN,SJ]=Ny(Hc),[KN,Vc]=VN(Hc),By=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=Ry({prop:r,defaultProp:o,onChange:a});return E.jsx(KN,{scope:n,disabled:i,contentId:ga(),open:l,onOpenToggle:C.useCallback(()=>c(u=>!u),[c]),children:E.jsx(Wc.div,{"data-state":qc(l),"data-disabled":i?"":void 0,...s,ref:t})})});By.displayName=Hc;var jy="CollapsibleTrigger",zy=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Vc(jy,n);return E.jsx(Wc.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":qc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:pn(e.onClick,o.onOpenToggle)})});zy.displayName=jy;var Kc="CollapsibleContent",Uy=C.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Vc(Kc,e.__scopeCollapsible);return E.jsx(va,{present:n||o.open,children:({present:i})=>E.jsx(qN,{...r,ref:t,present:i})})});Uy.displayName=Kc;var qN=C.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Vc(Kc,n),[s,l]=C.useState(r),c=C.useRef(null),u=On(t,c),f=C.useRef(0),p=f.current,d=C.useRef(0),v=d.current,h=a.open||s,g=C.useRef(h),m=C.useRef(void 0);return C.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),ir(()=>{const b=c.current;if(b){m.current=m.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,d.current=w.width,g.current||(b.style.transitionDuration=m.current.transitionDuration,b.style.animationName=m.current.animationName),l(r)}},[a.open,r]),E.jsx(Wc.div,{"data-state":qc(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...i,ref:u,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":v?`${v}px`:void 0,...e.style},children:h&&o})});function qc(e){return e?"open":"closed"}var GN=By,YN=Uy;const Gc=({restartConversation:e,...t})=>{var i,a;const{header:n}=ve,{showInputModal:r}=Gl(),o=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return E.jsx(oP,{...t,...(a=(i=n==null?void 0:n.content)==null?void 0:i.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:o})},Wy=({onClick:e,...t})=>{const{header:n}=ve,r=o=>{o.stopPropagation(),e==null||e()};return E.jsx(rm,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},Oo=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,u,f,p,d,v,h,g,m;const{header:o}=ve,i=e??KI;return t?n?E.jsxs("a",{...r,...(s=(a=o.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[E.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),E.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):E.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[E.jsx(i,{...(h=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),E.jsx("p",{...(m=(g=o.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},QN=({soundOn:e,toggleSound:t})=>{const n=i=>{i.stopPropagation(),t==null||t()},{header:r}=ve,o=e?nm:cP;return E.jsx("button",{type:"button",onClick:n,title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:E.jsx(o,{size:16})})},Hy=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:o,soundOn:i,toggleSound:a,...s})=>{var d,v,h,g,m,b,w,A,x,k,$,R,H,T,_,F,N,B,D,M,G,U,I,y;const{header:l}=ve,[c,u]=O.useState(e),f=!!((d=n.email)!=null&&d.title)||!!((v=n.phone)!=null&&v.title)||!!((h=n.website)!=null&&h.title)||!!((g=n.termsOfService)!=null&&g.link)||!!((m=n.privacyPolicy)!=null&&m.link),p=f&&!o;return E.jsxs(GN,{open:p?c:!1,onOpenChange:u,"data-disabled":p?void 0:"",...l.container,...s,children:[E.jsxs(zy,{"aria-label":"Expand Header Button",...l.content.container,children:[E.jsx(to,{...s,src:n.botAvatar,...l.content.avatar,children:n.botName||"Bot"}),E.jsx("h2",{...l.content.title,children:n.botName||"Bot"}),n.botDescription&&E.jsx("p",{...l.content.description,children:n.botDescription}),E.jsxs("div",{...l.content.actions.container,children:[n.soundEnabled&&i!==void 0&&a&&E.jsx(QN,{soundOn:i,toggleSound:a})," ",r&&E.jsx(Gc,{restartConversation:r}),t&&E.jsx(Wy,{onClick:t})]})]}),f&&E.jsxs(YN,{...l.expandedContent.container,children:[E.jsxs("div",{"data-links":"",...l.expandedContent.group,children:[E.jsx(Oo,{"data-email":"",icon:ZI,title:(b=n.email)==null?void 0:b.title,link:(A=(w=n.email)==null?void 0:w.link)!=null&&A.startsWith("mailto:")?(x=n.email)==null?void 0:x.link:`mailto:${(k=n.email)==null?void 0:k.link}`}),E.jsx(Oo,{"data-phone":"",icon:nP,title:($=n.phone)==null?void 0:$.title,link:(H=(R=n.phone)==null?void 0:R.link)!=null&&H.startsWith("tel:")?(T=n.phone)==null?void 0:T.link:`tel:${(_=n.phone)==null?void 0:_.link}`}),E.jsx(Oo,{"data-website":"",link:(F=n.website)==null?void 0:F.link,icon:YI,title:(N=n.website)==null?void 0:N.title})]}),E.jsxs("div",{"data-legal":"",...(B=l.expandedContent)==null?void 0:B.group,children:[((D=n.termsOfService)==null?void 0:D.link)&&E.jsx(Oo,{"data-terms":"",link:(M=n.termsOfService)==null?void 0:M.link,icon:em,title:(G=n.termsOfService)==null?void 0:G.title}),((U=n.privacyPolicy)==null?void 0:U.link)&&E.jsx(Oo,{"data-privacy":"",link:(I=n.privacyPolicy)==null?void 0:I.link,icon:JI,title:(y=n.privacyPolicy)==null?void 0:y.title})]})]})]})},Yc=O.memo(({...e})=>{const{typingIndicator:t}=ve;return E.jsx("div",{...e,...t==null?void 0:t.container,children:E.jsx("div",{...t==null?void 0:t.loader})})});Yc.displayName="TypingIndicator";const Qc=O.memo(O.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:o,id:i,authorId:a,status:s,renderers:l,isReadOnly:c,isLastDeliveredMessage:u,feedback:f,timestamp:p,metadata:d,sendMessage:v,addMessageFeedback:h,showAvatar:g},m)=>{const[b,w]=O.useState([]),{message:{container:A,deliveryStatus:x}}=ve;return g=g??e==="incoming",E.jsx(Kl.Provider,{value:{isLoading:b,setIsLoading:w},children:E.jsxs("div",{...A,className:Ao(A==null?void 0:A.className,u&&(x==null?void 0:x.className)),"data-loaded":b.length===0,"data-disable-input":!!n,"data-direction":e,dir:"auto",ref:m,children:[e==="incoming"&&g&&E.jsx(Vy,{authorId:a,sender:o}),t&&E.jsx(Kn,{block:{...t,isReadOnly:c,direction:e,timestamp:p,sender:o,feedback:f,messageId:i,status:s,metadata:d,sendMessage:v,addMessageFeedback:h},renderers:l}),e==="outgoing"&&g&&E.jsx(Vy,{authorId:a,sender:o}),r]})})})),Vy=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ve,[r,o]=O.useState("idle"),i=up(e??"",15);return E.jsxs(Bs,{"data-color":i,"data-loading-status":r,...n==null?void 0:n.container,children:[E.jsx(js,{...n==null?void 0:n.image,onLoadingStatusChange:o,src:t==null?void 0:t.avatar}),E.jsxs(zs,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function JN({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ve;return E.jsxs("li",{...r.container,children:[E.jsx(to,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),E.jsxs("div",{...r.content,children:[E.jsx("h1",{...r.title,children:n||"Bot"}),E.jsx("p",{...r.description,children:t})]})]})}function ZN(e,t){try{var n=global,r=n.document;if(typeof r<"u"&&r.createElement&&r.head&&r.head.appendChild){var o=r.querySelector('html meta[name="'.concat(encodeURI(e),'"]'))||r.createElement("meta");o.setAttribute("name",e),o.setAttribute("content",t),r.head.appendChild(o)}}catch{}}function XN(){ZN("react-scroll-to-bottom:version","4.2.0")}var Io=function(e){return e&&e.Math===Math&&e},Qe=Io(typeof globalThis=="object"&&globalThis)||Io(typeof window=="object"&&window)||Io(typeof self=="object"&&self)||Io(typeof Rt=="object"&&Rt)||Io(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},e2=Je,ya=!e2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),t2=ya,Ky=Function.prototype,qy=Ky.apply,Gy=Ky.call,Jc=typeof Reflect=="object"&&Reflect.apply||(t2?Gy.bind(qy):function(){return Gy.apply(qy,arguments)}),Yy=ya,Qy=Function.prototype,Zc=Qy.call,n2=Yy&&Qy.bind.bind(Zc,Zc),Ke=Yy?n2:function(e){return function(){return Zc.apply(e,arguments)}},Jy=Ke,r2=Jy({}.toString),o2=Jy("".slice),Gn=function(e){return o2(r2(e),8,-1)},i2=Gn,a2=Ke,Xc=function(e){if(i2(e)==="Function")return a2(e)},eu=typeof document=="object"&&document.all,ut=typeof eu>"u"&&eu!==void 0?function(e){return typeof e=="function"||e===eu}:function(e){return typeof e=="function"},Po={},s2=Je,wt=!s2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),l2=ya,ba=Function.prototype.call,en=l2?ba.bind(ba):function(){return ba.apply(ba,arguments)},tu={},Zy={}.propertyIsEnumerable,Xy=Object.getOwnPropertyDescriptor,c2=Xy&&!Zy.call({1:2},1);tu.f=c2?function(t){var n=Xy(this,t);return!!n&&n.enumerable}:Zy;var Do=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},u2=Ke,f2=Je,d2=Gn,nu=Object,p2=u2("".split),eb=f2(function(){return!nu("z").propertyIsEnumerable(0)})?function(e){return d2(e)==="String"?p2(e,""):nu(e)}:nu,ru=function(e){return e==null},h2=ru,v2=TypeError,wa=function(e){if(h2(e))throw new v2("Can't call method on "+e);return e},m2=eb,g2=wa,tn=function(e){return m2(g2(e))},y2=ut,zt=function(e){return typeof e=="object"?e!==null:y2(e)},it={},ou=it,iu=Qe,b2=ut,tb=function(e){return b2(e)?e:void 0},nn=function(e,t){return arguments.length<2?tb(ou[e])||tb(iu[e]):ou[e]&&ou[e][t]||iu[e]&&iu[e][t]},w2=Ke,hn=w2({}.isPrototypeOf),S2=Qe,nb=S2.navigator,rb=nb&&nb.userAgent,au=rb?String(rb):"",ob=Qe,su=au,ib=ob.process,ab=ob.Deno,sb=ib&&ib.versions||ab&&ab.version,lb=sb&&sb.v8,Ut,Sa;lb&&(Ut=lb.split("."),Sa=Ut[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Sa&&su&&(Ut=su.match(/Edge\/(\d+)/),(!Ut||Ut[1]>=74)&&(Ut=su.match(/Chrome\/(\d+)/),Ut&&(Sa=+Ut[1])));var lu=Sa,cb=lu,x2=Je,E2=Qe,k2=E2.String,xr=!!Object.getOwnPropertySymbols&&!x2(function(){var e=Symbol("symbol detection");return!k2(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&cb&&cb<41}),C2=xr,ub=C2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",A2=nn,$2=ut,T2=hn,O2=ub,I2=Object,_o=O2?function(e){return typeof e=="symbol"}:function(e){var t=A2("Symbol");return $2(t)&&T2(t.prototype,I2(e))},P2=String,xa=function(e){try{return P2(e)}catch{return"Object"}},D2=ut,_2=xa,M2=TypeError,Ea=function(e){if(D2(e))return e;throw new M2(_2(e)+" is not a function")},N2=Ea,R2=ru,cu=function(e,t){var n=e[t];return R2(n)?void 0:N2(n)},uu=en,fu=ut,du=zt,L2=TypeError,F2=function(e,t){var n,r;if(t==="string"&&fu(n=e.toString)&&!du(r=uu(n,e))||fu(n=e.valueOf)&&!du(r=uu(n,e))||t!=="string"&&fu(n=e.toString)&&!du(r=uu(n,e)))return r;throw new L2("Can't convert object to primitive value")},fb={exports:{}},db=Qe,B2=Object.defineProperty,j2=function(e,t){try{B2(db,e,{value:t,configurable:!0,writable:!0})}catch{db[e]=t}return t},z2=Qe,U2=j2,pb="__core-js_shared__",hb=fb.exports=z2[pb]||U2(pb,{});(hb.versions||(hb.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 pu=fb.exports,vb=pu,Er=function(e,t){return vb[e]||(vb[e]=t||{})},W2=wa,H2=Object,vn=function(e){return H2(W2(e))},V2=Ke,K2=vn,q2=V2({}.hasOwnProperty),$t=Object.hasOwn||function(t,n){return q2(K2(t),n)},G2=Ke,Y2=0,Q2=Math.random(),J2=G2(1 .toString),hu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+J2(++Y2+Q2,36)},Z2=Qe,X2=Er,mb=$t,eR=hu,tR=xr,nR=ub,kr=Z2.Symbol,vu=X2("wks"),rR=nR?kr.for||kr:kr&&kr.withoutSetter||eR,Xe=function(e){return mb(vu,e)||(vu[e]=tR&&mb(kr,e)?kr[e]:rR("Symbol."+e)),vu[e]},oR=en,gb=zt,yb=_o,iR=cu,aR=F2,sR=Xe,lR=TypeError,cR=sR("toPrimitive"),uR=function(e,t){if(!gb(e)||yb(e))return e;var n=iR(e,cR),r;if(n){if(t===void 0&&(t="default"),r=oR(n,e,t),!gb(r)||yb(r))return r;throw new lR("Can't convert object to primitive value")}return t===void 0&&(t="number"),aR(e,t)},fR=uR,dR=_o,mu=function(e){var t=fR(e,"string");return dR(t)?t:t+""},pR=Qe,bb=zt,gu=pR.document,hR=bb(gu)&&bb(gu.createElement),wb=function(e){return hR?gu.createElement(e):{}},vR=wt,mR=Je,gR=wb,Sb=!vR&&!mR(function(){return Object.defineProperty(gR("div"),"a",{get:function(){return 7}}).a!==7}),yR=wt,bR=en,wR=tu,SR=Do,xR=tn,ER=mu,kR=$t,CR=Sb,xb=Object.getOwnPropertyDescriptor;Po.f=yR?xb:function(t,n){if(t=xR(t),n=ER(n),CR)try{return xb(t,n)}catch{}if(kR(t,n))return SR(!bR(wR.f,t,n),t[n])};var AR=Je,$R=ut,TR=/#|\.prototype\./,Mo=function(e,t){var n=IR[OR(e)];return n===DR?!0:n===PR?!1:$R(t)?AR(t):!!t},OR=Mo.normalize=function(e){return String(e).replace(TR,".").toLowerCase()},IR=Mo.data={},PR=Mo.NATIVE="N",DR=Mo.POLYFILL="P",_R=Mo,Eb=Xc,MR=Ea,NR=ya,RR=Eb(Eb.bind),yu=function(e,t){return MR(e),t===void 0?e:NR?RR(e,t):function(){return e.apply(t,arguments)}},Wt={},LR=wt,FR=Je,kb=LR&&FR(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),BR=zt,jR=String,zR=TypeError,In=function(e){if(BR(e))return e;throw new zR(jR(e)+" is not an object")},UR=wt,WR=Sb,HR=kb,ka=In,Cb=mu,VR=TypeError,bu=Object.defineProperty,KR=Object.getOwnPropertyDescriptor,wu="enumerable",Su="configurable",xu="writable";Wt.f=UR?HR?function(t,n,r){if(ka(t),n=Cb(n),ka(r),typeof t=="function"&&n==="prototype"&&"value"in r&&xu in r&&!r[xu]){var o=KR(t,n);o&&o[xu]&&(t[n]=r.value,r={configurable:Su in r?r[Su]:o[Su],enumerable:wu in r?r[wu]:o[wu],writable:!1})}return bu(t,n,r)}:bu:function(t,n,r){if(ka(t),n=Cb(n),ka(r),WR)try{return bu(t,n,r)}catch{}if("get"in r||"set"in r)throw new VR("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var qR=wt,GR=Wt,YR=Do,Ca=qR?function(e,t,n){return GR.f(e,t,YR(1,n))}:function(e,t,n){return e[t]=n,e},No=Qe,QR=Jc,JR=Xc,ZR=ut,XR=Po.f,eL=_R,Cr=it,tL=yu,Ar=Ca,Ab=$t,nL=function(e){var t=function(n,r,o){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(n);case 2:return new e(n,r)}return new e(n,r,o)}return QR(e,this,arguments)};return t.prototype=e.prototype,t},Pe=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?No:o?No[n]:No[n]&&No[n].prototype,s=r?Cr:Cr[n]||Ar(Cr,n,{})[n],l=s.prototype,c,u,f,p,d,v,h,g,m;for(p in t)c=eL(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&Ab(a,p),v=s[p],u&&(e.dontCallGetSet?(m=XR(a,p),h=m&&m.value):h=a[p]),d=u&&h?h:t[p],!(!c&&!i&&typeof v==typeof d)&&(e.bind&&u?g=tL(d,No):e.wrap&&u?g=nL(d):i&&ZR(d)?g=JR(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&Ar(g,"sham",!0),Ar(s,p,g),i&&(f=n+"Prototype",Ab(Cr,f)||Ar(Cr,f,{}),Ar(Cr[f],p,d),e.real&&l&&(c||!l[p])&&Ar(l,p,d)))},rL=Gn,$r=Array.isArray||function(t){return rL(t)==="Array"},oL=Pe,iL=$r;oL({target:"Array",stat:!0},{isArray:iL});var aL=it,sL=aL.Array.isArray,lL=sL,$b=lL,cL=$b,uL=cL,fL=uL,dL=fL,pL=dL;const Tb=be(pL);function hL(e){if(Tb(e))return e}var vL=Math.ceil,mL=Math.floor,gL=Math.trunc||function(t){var n=+t;return(n>0?mL:vL)(n)},yL=gL,Aa=function(e){var t=+e;return t!==t||t===0?0:yL(t)},bL=Aa,wL=Math.min,SL=function(e){var t=bL(e);return t>0?wL(t,9007199254740991):0},xL=SL,Yn=function(e){return xL(e.length)},EL=TypeError,kL=9007199254740991,Eu=function(e){if(e>kL)throw EL("Maximum allowed index exceeded");return e},CL=wt,AL=Wt,$L=Do,Ro=function(e,t,n){CL?AL.f(e,t,$L(0,n)):e[t]=n},TL=Xe,OL=TL("toStringTag"),Ob={};Ob[OL]="z";var ku=String(Ob)==="[object z]",IL=ku,PL=ut,$a=Gn,DL=Xe,_L=DL("toStringTag"),ML=Object,NL=$a(function(){return arguments}())==="Arguments",RL=function(e,t){try{return e[t]}catch{}},Lo=IL?$a:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=RL(t=ML(e),_L))=="string"?n:NL?$a(t):(r=$a(t))==="Object"&&PL(t.callee)?"Arguments":r},LL=Ke,FL=ut,Cu=pu,BL=LL(Function.toString);FL(Cu.inspectSource)||(Cu.inspectSource=function(e){return BL(e)});var jL=Cu.inspectSource,zL=Ke,UL=Je,Ib=ut,WL=Lo,HL=nn,VL=jL,Pb=function(){},Db=HL("Reflect","construct"),Au=/^\s*(?:class|function)\b/,KL=zL(Au.exec),qL=!Au.test(Pb),Fo=function(t){if(!Ib(t))return!1;try{return Db(Pb,[],t),!0}catch{return!1}},_b=function(t){if(!Ib(t))return!1;switch(WL(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return qL||!!KL(Au,VL(t))}catch{return!0}};_b.sham=!0;var $u=!Db||UL(function(){var e;return Fo(Fo.call)||!Fo(Object)||!Fo(function(){e=!0})||e})?_b:Fo,Mb=$r,GL=$u,YL=zt,QL=Xe,JL=QL("species"),Nb=Array,ZL=function(e){var t;return Mb(e)&&(t=e.constructor,GL(t)&&(t===Nb||Mb(t.prototype))?t=void 0:YL(t)&&(t=t[JL],t===null&&(t=void 0))),t===void 0?Nb:t},XL=ZL,Tu=function(e,t){return new(XL(e))(t===0?0:t)},eF=Je,tF=Xe,nF=lu,rF=tF("species"),Ta=function(e){return nF>=51||!eF(function(){var t=[],n=t.constructor={};return n[rF]=function(){return{foo:1}},t[e](Boolean).foo!==1})},oF=Pe,iF=Je,aF=$r,sF=zt,lF=vn,cF=Yn,Rb=Eu,Lb=Ro,uF=Tu,fF=Ta,dF=Xe,pF=lu,Fb=dF("isConcatSpreadable"),hF=pF>=51||!iF(function(){var e=[];return e[Fb]=!1,e.concat()[0]!==e}),vF=function(e){if(!sF(e))return!1;var t=e[Fb];return t!==void 0?!!t:aF(e)},mF=!hF||!fF("concat");oF({target:"Array",proto:!0,arity:1,forced:mF},{concat:function(t){var n=lF(this),r=uF(n,0),o=0,i,a,s,l,c;for(i=-1,s=arguments.length;i<s;i++)if(c=i===-1?n:arguments[i],vF(c))for(l=cF(c),Rb(o+l),a=0;a<l;a++,o++)a in c&&Lb(r,o,c[a]);else Rb(o+1),Lb(r,o++,c);return r.length=o,r}});var gF=Lo,yF=String,Bo=function(e){if(gF(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return yF(e)},Oa={},bF=Aa,wF=Math.max,SF=Math.min,Ou=function(e,t){var n=bF(e);return n<0?wF(n+t,0):SF(n,t)},xF=tn,EF=Ou,kF=Yn,Bb=function(e){return function(t,n,r){var o=xF(t),i=kF(o);if(i===0)return!e&&-1;var a=EF(r,i),s;if(e&&n!==n){for(;i>a;)if(s=o[a++],s!==s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},jb={includes:Bb(!0),indexOf:Bb(!1)},Ia={},CF=Ke,Iu=$t,AF=tn,$F=jb.indexOf,TF=Ia,zb=CF([].push),Ub=function(e,t){var n=AF(e),r=0,o=[],i;for(i in n)!Iu(TF,i)&&Iu(n,i)&&zb(o,i);for(;t.length>r;)Iu(n,i=t[r++])&&(~$F(o,i)||zb(o,i));return o},Pu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],OF=Ub,IF=Pu,Du=Object.keys||function(t){return OF(t,IF)},PF=wt,DF=kb,_F=Wt,MF=In,NF=tn,RF=Du;Oa.f=PF&&!DF?Object.defineProperties:function(t,n){MF(t);for(var r=NF(n),o=RF(n),i=o.length,a=0,s;i>a;)_F.f(t,s=o[a++],r[s]);return t};var LF=nn,FF=LF("document","documentElement"),BF=Er,jF=hu,Wb=BF("keys"),Pa=function(e){return Wb[e]||(Wb[e]=jF(e))},zF=In,UF=Oa,Hb=Pu,WF=Ia,HF=FF,VF=wb,KF=Pa,Vb=">",Kb="<",_u="prototype",Mu="script",qb=KF("IE_PROTO"),Nu=function(){},Gb=function(e){return Kb+Mu+Vb+e+Kb+"/"+Mu+Vb},Yb=function(e){e.write(Gb("")),e.close();var t=e.parentWindow.Object;return e=null,t},qF=function(){var e=VF("iframe"),t="java"+Mu+":",n;return e.style.display="none",HF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Gb("document.F=Object")),n.close(),n.F},Da,_a=function(){try{Da=new ActiveXObject("htmlfile")}catch{}_a=typeof document<"u"?document.domain&&Da?Yb(Da):qF():Yb(Da);for(var e=Hb.length;e--;)delete _a[_u][Hb[e]];return _a()};WF[qb]=!0;var Ru=Object.create||function(t,n){var r;return t!==null?(Nu[_u]=zF(t),r=new Nu,Nu[_u]=null,r[qb]=t):r=_a(),n===void 0?r:UF.f(r,n)},Ma={},GF=Ub,YF=Pu,QF=YF.concat("length","prototype");Ma.f=Object.getOwnPropertyNames||function(t){return GF(t,QF)};var Qb={},JF=Ke,Na=JF([].slice),ZF=Gn,XF=tn,Jb=Ma.f,eB=Na,Zb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],tB=function(e){try{return Jb(e)}catch{return eB(Zb)}};Qb.f=function(t){return Zb&&ZF(t)==="Window"?tB(t):Jb(XF(t))};var Ra={};Ra.f=Object.getOwnPropertySymbols;var nB=Ca,La=function(e,t,n,r){return r&&r.enumerable?e[t]=n:nB(e,t,n),e},rB=Wt,oB=function(e,t,n){return rB.f(e,t,n)},jo={},iB=Xe;jo.f=iB;var Xb=it,aB=$t,sB=jo,lB=Wt.f,Fe=function(e){var t=Xb.Symbol||(Xb.Symbol={});aB(t,e)||lB(t,e,{value:sB.f(e)})},cB=en,uB=nn,fB=Xe,dB=La,ew=function(){var e=uB("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=fB("toPrimitive");t&&!t[r]&&dB(t,r,function(o){return cB(n,this)},{arity:1})},pB=ku,hB=Lo,vB=pB?{}.toString:function(){return"[object "+hB(this)+"]"},mB=ku,gB=Wt.f,yB=Ca,bB=$t,wB=vB,SB=Xe,tw=SB("toStringTag"),Tr=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(bB(o,tw)||gB(o,tw,{configurable:!0,value:t}),r&&!mB&&yB(o,"toString",wB))},xB=Qe,EB=ut,nw=xB.WeakMap,kB=EB(nw)&&/native code/.test(String(nw)),CB=kB,rw=Qe,AB=zt,$B=Ca,Lu=$t,Fu=pu,TB=Pa,OB=Ia,ow="Object already initialized",Bu=rw.TypeError,IB=rw.WeakMap,Fa,zo,Ba,PB=function(e){return Ba(e)?zo(e):Fa(e,{})},DB=function(e){return function(t){var n;if(!AB(t)||(n=zo(t)).type!==e)throw new Bu("Incompatible receiver, "+e+" required");return n}};if(CB||Fu.state){var rn=Fu.state||(Fu.state=new IB);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,Fa=function(e,t){if(rn.has(e))throw new Bu(ow);return t.facade=e,rn.set(e,t),t},zo=function(e){return rn.get(e)||{}},Ba=function(e){return rn.has(e)}}else{var Or=TB("state");OB[Or]=!0,Fa=function(e,t){if(Lu(e,Or))throw new Bu(ow);return t.facade=e,$B(e,Or,t),t},zo=function(e){return Lu(e,Or)?e[Or]:{}},Ba=function(e){return Lu(e,Or)}}var ju={set:Fa,get:zo,has:Ba,enforce:PB,getterFor:DB},_B=yu,MB=Ke,NB=eb,RB=vn,LB=Yn,FB=Tu,iw=MB([].push),Pn=function(e){var t=e===1,n=e===2,r=e===3,o=e===4,i=e===6,a=e===7,s=e===5||i;return function(l,c,u,f){for(var p=RB(l),d=NB(p),v=LB(d),h=_B(c,u),g=0,m=f||FB,b=t?m(l,v):n||a?m(l,0):void 0,w,A;v>g;g++)if((s||g in d)&&(w=d[g],A=h(w,g,p),e))if(t)b[g]=A;else if(A)switch(e){case 3:return!0;case 5:return w;case 6:return g;case 2:iw(b,w)}else switch(e){case 4:return!1;case 7:iw(b,w)}return i?-1:r||o?o:b}},zu={forEach:Pn(0),map:Pn(1),filter:Pn(2),some:Pn(3),every:Pn(4),find:Pn(5),findIndex:Pn(6),filterReject:Pn(7)},ja=Pe,Uo=Qe,Uu=en,BB=Ke,Ir=wt,Pr=xr,jB=Je,et=$t,zB=hn,Wu=In,za=tn,Hu=mu,UB=Bo,Vu=Do,Dr=Ru,aw=Du,WB=Ma,sw=Qb,HB=Ra,lw=Po,cw=Wt,VB=Oa,uw=tu,fw=La,KB=oB,Ku=Er,qB=Pa,dw=Ia,pw=hu,GB=Xe,YB=jo,QB=Fe,JB=ew,ZB=Tr,hw=ju,Ua=zu.forEach,St=qB("hidden"),Wa="Symbol",Wo="prototype",XB=hw.set,vw=hw.getterFor(Wa),Ht=Object[Wo],Qn=Uo.Symbol,Ho=Qn&&Qn[Wo],ej=Uo.RangeError,tj=Uo.TypeError,qu=Uo.QObject,mw=lw.f,Jn=cw.f,gw=sw.f,nj=uw.f,yw=BB([].push),mn=Ku("symbols"),Vo=Ku("op-symbols"),rj=Ku("wks"),Gu=!qu||!qu[Wo]||!qu[Wo].findChild,bw=function(e,t,n){var r=mw(Ht,t);r&&delete Ht[t],Jn(e,t,n),r&&e!==Ht&&Jn(Ht,t,r)},Yu=Ir&&jB(function(){return Dr(Jn({},"a",{get:function(){return Jn(this,"a",{value:7}).a}})).a!==7})?bw:Jn,Qu=function(e,t){var n=mn[e]=Dr(Ho);return XB(n,{type:Wa,tag:e,description:t}),Ir||(n.description=t),n},Ha=function(t,n,r){t===Ht&&Ha(Vo,n,r),Wu(t);var o=Hu(n);return Wu(r),et(mn,o)?(r.enumerable?(et(t,St)&&t[St][o]&&(t[St][o]=!1),r=Dr(r,{enumerable:Vu(0,!1)})):(et(t,St)||Jn(t,St,Vu(1,Dr(null))),t[St][o]=!0),Yu(t,o,r)):Jn(t,o,r)},Ju=function(t,n){Wu(t);var r=za(n),o=aw(r).concat(Ew(r));return Ua(o,function(i){(!Ir||Uu(ww,r,i))&&Ha(t,i,r[i])}),t},oj=function(t,n){return n===void 0?Dr(t):Ju(Dr(t),n)},ww=function(t){var n=Hu(t),r=Uu(nj,this,n);return this===Ht&&et(mn,n)&&!et(Vo,n)?!1:r||!et(this,n)||!et(mn,n)||et(this,St)&&this[St][n]?r:!0},Sw=function(t,n){var r=za(t),o=Hu(n);if(!(r===Ht&&et(mn,o)&&!et(Vo,o))){var i=mw(r,o);return i&&et(mn,o)&&!(et(r,St)&&r[St][o])&&(i.enumerable=!0),i}},xw=function(t){var n=gw(za(t)),r=[];return Ua(n,function(o){!et(mn,o)&&!et(dw,o)&&yw(r,o)}),r},Ew=function(e){var t=e===Ht,n=gw(t?Vo:za(e)),r=[];return Ua(n,function(o){et(mn,o)&&(!t||et(Ht,o))&&yw(r,mn[o])}),r};Pr||(Qn=function(){if(zB(Ho,this))throw new tj("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:UB(arguments[0]),n=pw(t),r=function(o){var i=this===void 0?Uo:this;i===Ht&&Uu(r,Vo,o),et(i,St)&&et(i[St],n)&&(i[St][n]=!1);var a=Vu(1,o);try{Yu(i,n,a)}catch(s){if(!(s instanceof ej))throw s;bw(i,n,a)}};return Ir&&Gu&&Yu(Ht,n,{configurable:!0,set:r}),Qu(n,t)},Ho=Qn[Wo],fw(Ho,"toString",function(){return vw(this).tag}),fw(Qn,"withoutSetter",function(e){return Qu(pw(e),e)}),uw.f=ww,cw.f=Ha,VB.f=Ju,lw.f=Sw,WB.f=sw.f=xw,HB.f=Ew,YB.f=function(e){return Qu(GB(e),e)},Ir&&KB(Ho,"description",{configurable:!0,get:function(){return vw(this).description}})),ja({global:!0,constructor:!0,wrap:!0,forced:!Pr,sham:!Pr},{Symbol:Qn}),Ua(aw(rj),function(e){QB(e)}),ja({target:Wa,stat:!0,forced:!Pr},{useSetter:function(){Gu=!0},useSimple:function(){Gu=!1}}),ja({target:"Object",stat:!0,forced:!Pr,sham:!Ir},{create:oj,defineProperty:Ha,defineProperties:Ju,getOwnPropertyDescriptor:Sw}),ja({target:"Object",stat:!0,forced:!Pr},{getOwnPropertyNames:xw}),JB(),ZB(Qn,Wa),dw[St]=!0;var ij=xr,kw=ij&&!!Symbol.for&&!!Symbol.keyFor,aj=Pe,sj=nn,lj=$t,cj=Bo,Cw=Er,uj=kw,Zu=Cw("string-to-symbol-registry"),fj=Cw("symbol-to-string-registry");aj({target:"Symbol",stat:!0,forced:!uj},{for:function(e){var t=cj(e);if(lj(Zu,t))return Zu[t];var n=sj("Symbol")(t);return Zu[t]=n,fj[n]=t,n}});var dj=Pe,pj=$t,hj=_o,vj=xa,mj=Er,gj=kw,Aw=mj("symbol-to-string-registry");dj({target:"Symbol",stat:!0,forced:!gj},{keyFor:function(t){if(!hj(t))throw new TypeError(vj(t)+" is not a symbol");if(pj(Aw,t))return Aw[t]}});var yj=Ke,$w=$r,bj=ut,Tw=Gn,wj=Bo,Ow=yj([].push),Sj=function(e){if(bj(e))return e;if($w(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?Ow(n,o):(typeof o=="number"||Tw(o)==="Number"||Tw(o)==="String")&&Ow(n,wj(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if($w(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},xj=Pe,Iw=nn,Pw=Jc,Ej=en,Ko=Ke,Dw=Je,_w=ut,Mw=_o,Nw=Na,kj=Sj,Cj=xr,Aj=String,Dn=Iw("JSON","stringify"),Va=Ko(/./.exec),Rw=Ko("".charAt),$j=Ko("".charCodeAt),Tj=Ko("".replace),Oj=Ko(1 .toString),Ij=/[\uD800-\uDFFF]/g,Lw=/^[\uD800-\uDBFF]$/,Fw=/^[\uDC00-\uDFFF]$/,Bw=!Cj||Dw(function(){var e=Iw("Symbol")("stringify detection");return Dn([e])!=="[null]"||Dn({a:e})!=="{}"||Dn(Object(e))!=="{}"}),jw=Dw(function(){return Dn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Dn("\uDEAD")!=='"\\udead"'}),Pj=function(e,t){var n=Nw(arguments),r=kj(t);if(!(!_w(r)&&(e===void 0||Mw(e))))return n[1]=function(o,i){if(_w(r)&&(i=Ej(r,this,Aj(o),i)),!Mw(i))return i},Pw(Dn,null,n)},Dj=function(e,t,n){var r=Rw(n,t-1),o=Rw(n,t+1);return Va(Lw,e)&&!Va(Fw,o)||Va(Fw,e)&&!Va(Lw,r)?"\\u"+Oj($j(e,0),16):e};Dn&&xj({target:"JSON",stat:!0,arity:3,forced:Bw||jw},{stringify:function(t,n,r){var o=Nw(arguments),i=Pw(Bw?Pj:Dn,null,o);return jw&&typeof i=="string"?Tj(i,Ij,Dj):i}});var _j=Pe,Mj=xr,Nj=Je,zw=Ra,Rj=vn,Lj=!Mj||Nj(function(){zw.f(1)});_j({target:"Object",stat:!0,forced:Lj},{getOwnPropertySymbols:function(t){var n=zw.f;return n?n(Rj(t)):[]}});var Fj=Fe;Fj("asyncIterator");var Bj=Fe;Bj("hasInstance");var jj=Fe;jj("isConcatSpreadable");var zj=Fe;zj("iterator");var Uj=Fe;Uj("match");var Wj=Fe;Wj("matchAll");var Hj=Fe;Hj("replace");var Vj=Fe;Vj("search");var Kj=Fe;Kj("species");var qj=Fe;qj("split");var Gj=Fe,Yj=ew;Gj("toPrimitive"),Yj();var Qj=nn,Jj=Fe,Zj=Tr;Jj("toStringTag"),Zj(Qj("Symbol"),"Symbol");var Xj=Fe;Xj("unscopables");var e4=Qe,t4=Tr;t4(e4.JSON,"JSON",!0);var n4=it,r4=n4.Symbol,_r={},Xu=wt,o4=$t,Uw=Function.prototype,i4=Xu&&Object.getOwnPropertyDescriptor,ef=o4(Uw,"name"),a4=ef&&(function(){}).name==="something",s4=ef&&(!Xu||Xu&&i4(Uw,"name").configurable),l4={EXISTS:ef,PROPER:a4,CONFIGURABLE:s4},c4=Je,u4=!c4(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),f4=$t,d4=ut,p4=vn,h4=Pa,v4=u4,Ww=h4("IE_PROTO"),tf=Object,m4=tf.prototype,Hw=v4?tf.getPrototypeOf:function(e){var t=p4(e);if(f4(t,Ww))return t[Ww];var n=t.constructor;return d4(n)&&t instanceof n?n.prototype:t instanceof tf?m4:null},g4=Je,y4=ut,b4=zt,w4=Ru,Vw=Hw,S4=La,x4=Xe,nf=x4("iterator"),Kw=!1,gn,rf,of;[].keys&&(of=[].keys(),"next"in of?(rf=Vw(Vw(of)),rf!==Object.prototype&&(gn=rf)):Kw=!0);var E4=!b4(gn)||g4(function(){var e={};return gn[nf].call(e)!==e});E4?gn={}:gn=w4(gn),y4(gn[nf])||S4(gn,nf,function(){return this});var qw={IteratorPrototype:gn,BUGGY_SAFARI_ITERATORS:Kw},k4=qw.IteratorPrototype,C4=Ru,A4=Do,$4=Tr,T4=_r,O4=function(){return this},I4=function(e,t,n,r){var o=t+" Iterator";return e.prototype=C4(k4,{next:A4(+!r,n)}),$4(e,o,!1,!0),T4[o]=O4,e},P4=Ke,D4=Ea,_4=function(e,t,n){try{return P4(D4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},M4=zt,N4=function(e){return M4(e)||e===null},R4=N4,L4=String,F4=TypeError,B4=function(e){if(R4(e))return e;throw new F4("Can't set "+L4(e)+" as a prototype")},j4=_4,z4=zt,U4=wa,W4=B4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=j4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(o,i){return U4(o),W4(i),z4(o)&&(e?n(o,i):o.__proto__=i),o}}();var H4=Pe,V4=en,Gw=l4,K4=I4,q4=Hw,G4=Tr,Yw=La,Y4=Xe,Qw=_r,Jw=qw,Q4=Gw.PROPER;Gw.CONFIGURABLE,Jw.IteratorPrototype;var Ka=Jw.BUGGY_SAFARI_ITERATORS,af=Y4("iterator"),Zw="keys",qa="values",Xw="entries",J4=function(){return this},e1=function(e,t,n,r,o,i,a){K4(n,t,r);var s=function(m){if(m===o&&p)return p;if(!Ka&&m&&m in u)return u[m];switch(m){case Zw:return function(){return new n(this,m)};case qa:return function(){return new n(this,m)};case Xw:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[af]||u["@@iterator"]||o&&u[o],p=!Ka&&f||s(o),d=t==="Array"&&u.entries||f,v,h,g;if(d&&(v=q4(d.call(new e)),v!==Object.prototype&&v.next&&(G4(v,l,!0,!0),Qw[l]=J4)),Q4&&o===qa&&f&&f.name!==qa&&(c=!0,p=function(){return V4(f,this)}),o)if(h={values:s(qa),keys:i?p:s(Zw),entries:s(Xw)},a)for(g in h)(Ka||c||!(g in u))&&Yw(u,g,h[g]);else H4({target:t,proto:!0,forced:Ka||c},h);return a&&u[af]!==p&&Yw(u,af,p,{name:o}),Qw[t]=p,h},t1=function(e,t){return{value:e,done:t}},Z4=tn,n1=_r,r1=ju;Wt.f;var X4=e1,Ga=t1,o1="Array Iterator",e3=r1.set,t3=r1.getterFor(o1);X4(Array,"Array",function(e,t){e3(this,{type:o1,target:Z4(e),index:0,kind:t})},function(){var e=t3(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,Ga(void 0,!0);switch(e.kind){case"keys":return Ga(n,!1);case"values":return Ga(t[n],!1)}return Ga([n,t[n]],!1)},"values"),n1.Arguments=n1.Array;var n3={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},r3=n3,o3=Qe,i3=Tr,i1=_r;for(var sf in r3)i3(o3[sf],sf),i1[sf]=i1.Array;var a3=r4,s3=a3,l3=Xe,c3=Wt.f,a1=l3("metadata"),s1=Function.prototype;s1[a1]===void 0&&c3(s1,a1,{value:null});var u3=Fe;u3("asyncDispose");var f3=Fe;f3("dispose");var d3=Fe;d3("metadata");var p3=s3,h3=p3,v3=nn,m3=Ke,lf=v3("Symbol"),g3=lf.keyFor,y3=m3(lf.prototype.valueOf),l1=lf.isRegisteredSymbol||function(t){try{return g3(y3(t))!==void 0}catch{return!1}},b3=Pe,w3=l1;b3({target:"Symbol",stat:!0},{isRegisteredSymbol:w3});for(var S3=Er,c1=nn,x3=Ke,E3=_o,k3=Xe,Ya=c1("Symbol"),u1=Ya.isWellKnownSymbol,f1=c1("Object","getOwnPropertyNames"),C3=x3(Ya.prototype.valueOf),d1=S3("wks"),cf=0,p1=f1(Ya),A3=p1.length;cf<A3;cf++)try{var h1=p1[cf];E3(Ya[h1])&&k3(h1)}catch{}var v1=function(t){if(u1&&u1(t))return!0;try{for(var n=C3(t),r=0,o=f1(d1),i=o.length;r<i;r++)if(d1[o[r]]==n)return!0}catch{}return!1},$3=Pe,T3=v1;$3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:T3});var O3=Fe;O3("customMatcher");var I3=Fe;I3("observable");var P3=Pe,D3=l1;P3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:D3});var _3=Pe,M3=v1;_3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:M3});var N3=Fe;N3("matcher");var R3=Fe;R3("metadataKey");var L3=Fe;L3("patternMatch");var F3=Fe;F3("replaceAll");var B3=h3,j3=B3,z3=j3;const Mr=be(z3);var uf=Ke,U3=Aa,W3=Bo,H3=wa,V3=uf("".charAt),m1=uf("".charCodeAt),K3=uf("".slice),g1=function(e){return function(t,n){var r=W3(H3(t)),o=U3(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=m1(r,o),a<55296||a>56319||o+1===i||(s=m1(r,o+1))<56320||s>57343?e?V3(r,o):a:e?K3(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},q3={codeAt:g1(!1),charAt:g1(!0)},G3=q3.charAt,Y3=Bo,y1=ju,Q3=e1,b1=t1,w1="String Iterator",J3=y1.set,Z3=y1.getterFor(w1);Q3(String,"String",function(e){J3(this,{type:w1,string:Y3(e),index:0})},function(){var t=Z3(this),n=t.string,r=t.index,o;return r>=n.length?b1(void 0,!0):(o=G3(n,r),t.index+=o.length,b1(o,!1))});var X3=Lo,S1=cu,ez=ru,tz=_r,nz=Xe,rz=nz("iterator"),ff=function(e){if(!ez(e))return S1(e,rz)||S1(e,"@@iterator")||tz[X3(e)]},oz=ff,iz=oz,az=iz,sz=az,lz=sz,cz=lz,uz=cz,fz=uz,dz=fz;const x1=be(dz);var pz=wt,hz=$r,vz=TypeError,mz=Object.getOwnPropertyDescriptor,gz=pz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),E1=gz?function(e,t){if(hz(e)&&!mz(e,"length").writable)throw new vz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},yz=Pe,bz=vn,wz=Yn,Sz=E1,xz=Eu,Ez=Je,kz=Ez(function(){return[].push.call({length:4294967296},1)!==4294967297}),Cz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Az=kz||!Cz();yz({target:"Array",proto:!0,arity:1,forced:Az},{push:function(t){var n=bz(this),r=wz(n),o=arguments.length;xz(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return Sz(n,r),r}});var $z=Qe,Tz=it,Zn=function(e,t){var n=Tz[e+"Prototype"],r=n&&n[t];if(r)return r;var o=$z[e],i=o&&o.prototype;return i&&i[t]},Oz=Zn,Iz=Oz("Array","push"),Pz=hn,Dz=Iz,df=Array.prototype,_z=function(e){var t=e.push;return e===df||Pz(df,e)&&t===df.push?Dz:t},Mz=_z,Nz=Mz,Rz=Nz,Lz=Rz,Fz=Lz,Bz=Fz,jz=Bz;const zz=be(jz);function Uz(e,t){var n=e==null?null:typeof Mr<"u"&&x1(e)||e["@@iterator"];if(n!=null){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(zz(s).call(s,r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}var Wz=Pe,k1=$r,Hz=$u,Vz=zt,C1=Ou,Kz=Yn,qz=tn,Gz=Ro,Yz=Xe,Qz=Ta,Jz=Na,Zz=Qz("slice"),Xz=Yz("species"),pf=Array,e5=Math.max;Wz({target:"Array",proto:!0,forced:!Zz},{slice:function(t,n){var r=qz(this),o=Kz(r),i=C1(t,o),a=C1(n===void 0?o:n,o),s,l,c;if(k1(r)&&(s=r.constructor,Hz(s)&&(s===pf||k1(s.prototype))?s=void 0:Vz(s)&&(s=s[Xz],s===null&&(s=void 0)),s===pf||s===void 0))return Jz(r,i,a);for(l=new(s===void 0?pf:s)(e5(a-i,0)),c=0;i<a;i++,c++)i in r&&Gz(l,c,r[i]);return l.length=c,l}});var t5=Zn,n5=t5("Array","slice"),r5=hn,o5=n5,hf=Array.prototype,i5=function(e){var t=e.slice;return e===hf||r5(hf,e)&&t===hf.slice?o5:t},a5=i5,s5=a5,l5=s5,c5=l5,u5=c5,f5=u5,d5=f5;const p5=be(d5);var h5=en,A1=In,v5=cu,m5=function(e,t,n){var r,o;A1(e);try{if(r=v5(e,"return"),!r){if(t==="throw")throw n;return n}r=h5(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return A1(r),n},g5=In,y5=m5,b5=function(e,t,n,r){try{return r?t(g5(n)[0],n[1]):t(n)}catch(o){y5(e,"throw",o)}},w5=Xe,S5=_r,x5=w5("iterator"),E5=Array.prototype,k5=function(e){return e!==void 0&&(S5.Array===e||E5[x5]===e)},C5=en,A5=Ea,$5=In,T5=xa,O5=ff,I5=TypeError,P5=function(e,t){var n=arguments.length<2?O5(e):t;if(A5(n))return $5(C5(n,e));throw new I5(T5(e)+" is not iterable")},D5=yu,_5=en,M5=vn,N5=b5,R5=k5,L5=$u,F5=Yn,$1=Ro,B5=P5,j5=ff,T1=Array,z5=function(t){var n=M5(t),r=L5(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=D5(i,o>2?arguments[2]:void 0));var s=j5(n),l=0,c,u,f,p,d,v;if(s&&!(this===T1&&R5(s)))for(u=r?new this:[],p=B5(n,s),d=p.next;!(f=_5(d,p)).done;l++)v=a?N5(p,i,[f.value,l],!0):f.value,$1(u,l,v);else for(c=F5(n),u=r?new this(c):T1(c);c>l;l++)v=a?i(n[l],l):n[l],$1(u,l,v);return u.length=l,u},U5=Xe,O1=U5("iterator"),I1=!1;try{var W5=0,P1={next:function(){return{done:!!W5++}},return:function(){I1=!0}};P1[O1]=function(){return this},Array.from(P1,function(){throw 2})}catch{}var H5=function(e,t){try{if(!t&&!I1)return!1}catch{return!1}var n=!1;try{var r={};r[O1]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},V5=Pe,K5=z5,q5=H5,G5=!q5(function(e){Array.from(e)});V5({target:"Array",stat:!0,forced:G5},{from:K5});var Y5=it,Q5=Y5.Array.from,J5=Q5,Z5=J5,X5=Z5,eU=X5,tU=eU,nU=tU,rU=nU;const D1=be(rU);function vf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _1(e,t){if(e){var n;if(typeof e=="string")return vf(e,t);var r=p5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?D1(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?vf(e,t):void 0}}function oU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(e){return XU(e)||eW(e)||_1(e)||tW()}var Ja=function(e){return e&&e.Math==Math&&e},Tt=Ja(typeof globalThis=="object"&&globalThis)||Ja(typeof window=="object"&&window)||Ja(typeof self=="object"&&self)||Ja(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Of={},Vt=function(e){try{return!!e()}catch{return!0}},nW=Vt,Xn=!nW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),H1={},V1={}.propertyIsEnumerable,K1=Object.getOwnPropertyDescriptor,rW=K1&&!V1.call({1:2},1);H1.f=rW?function(t){var n=K1(this,t);return!!n&&n.enumerable}:V1;var q1=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},oW={}.toString,If=function(e){return oW.call(e).slice(8,-1)},iW=Vt,aW=If,sW="".split,lW=iW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return aW(e)=="String"?sW.call(e,""):Object(e)}:Object,Za=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},cW=lW,uW=Za,Pf=function(e){return cW(uW(e))},Nt=function(e){return typeof e=="function"},fW=Nt,Go=function(e){return typeof e=="object"?e!==null:fW(e)},Df=Tt,dW=Nt,pW=function(e){return dW(e)?e:void 0},Xa=function(e,t){return arguments.length<2?pW(Df[e]):Df[e]&&Df[e][t]},hW=Xa,vW=hW("navigator","userAgent")||"",G1=Tt,_f=vW,Y1=G1.process,Q1=G1.Deno,J1=Y1&&Y1.versions||Q1&&Q1.version,Z1=J1&&J1.v8,an,es;Z1?(an=Z1.split("."),es=an[0]<4?1:an[0]+an[1]):_f&&(an=_f.match(/Edge\/(\d+)/),(!an||an[1]>=74)&&(an=_f.match(/Chrome\/(\d+)/),an&&(es=an[1])));var mW=es&&+es,X1=mW,gW=Vt,eS=!!Object.getOwnPropertySymbols&&!gW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&X1&&X1<41}),yW=eS,tS=yW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",bW=Nt,wW=Xa,SW=tS,nS=SW?function(e){return typeof e=="symbol"}:function(e){var t=wW("Symbol");return bW(t)&&Object(e)instanceof t},xW=function(e){try{return String(e)}catch{return"Object"}},EW=Nt,kW=xW,CW=function(e){if(EW(e))return e;throw TypeError(kW(e)+" is not a function")},AW=CW,rS=function(e,t){var n=e[t];return n==null?void 0:AW(n)},Mf=Nt,Nf=Go,$W=function(e,t){var n,r;if(t==="string"&&Mf(n=e.toString)&&!Nf(r=n.call(e))||Mf(n=e.valueOf)&&!Nf(r=n.call(e))||t!=="string"&&Mf(n=e.toString)&&!Nf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},oS={exports:{}},iS=Tt,Rf=function(e,t){try{Object.defineProperty(iS,e,{value:t,configurable:!0,writable:!0})}catch{iS[e]=t}return t},TW=Tt,OW=Rf,aS="__core-js_shared__",IW=TW[aS]||OW(aS,{}),Lf=IW,sS=Lf;(oS.exports=function(e,t){return sS[e]||(sS[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Ff=oS.exports,PW=Za,lS=function(e){return Object(PW(e))},DW=lS,_W={}.hasOwnProperty,er=Object.hasOwn||function(t,n){return _W.call(DW(t),n)},MW=0,NW=Math.random(),cS=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++MW+NW).toString(36)},RW=Tt,LW=Ff,uS=er,FW=cS,fS=eS,BW=tS,Yo=LW("wks"),Qo=RW.Symbol,jW=BW?Qo:Qo&&Qo.withoutSetter||FW,Jo=function(e){return(!uS(Yo,e)||!(fS||typeof Yo[e]=="string"))&&(fS&&uS(Qo,e)?Yo[e]=Qo[e]:Yo[e]=jW("Symbol."+e)),Yo[e]},dS=Go,pS=nS,zW=rS,UW=$W,WW=Jo,HW=WW("toPrimitive"),VW=function(e,t){if(!dS(e)||pS(e))return e;var n=zW(e,HW),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!dS(r)||pS(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),UW(e,t)},KW=VW,qW=nS,hS=function(e){var t=KW(e,"string");return qW(t)?t:String(t)},GW=Tt,vS=Go,Bf=GW.document,YW=vS(Bf)&&vS(Bf.createElement),mS=function(e){return YW?Bf.createElement(e):{}},QW=Xn,JW=Vt,ZW=mS,gS=!QW&&!JW(function(){return Object.defineProperty(ZW("div"),"a",{get:function(){return 7}}).a!=7}),XW=Xn,e6=H1,t6=q1,n6=Pf,r6=hS,o6=er,i6=gS,yS=Object.getOwnPropertyDescriptor;Of.f=XW?yS:function(t,n){if(t=n6(t),n=r6(n),i6)try{return yS(t,n)}catch{}if(o6(t,n))return t6(!e6.f.call(t,n),t[n])};var Zo={},a6=Go,_n=function(e){if(a6(e))return e;throw TypeError(String(e)+" is not an object")},s6=Xn,l6=gS,bS=_n,c6=hS,wS=Object.defineProperty;Zo.f=s6?wS:function(t,n,r){if(bS(t),n=c6(n),bS(r),l6)try{return wS(t,n,r)}catch{}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var u6=Xn,f6=Zo,d6=q1,ts=u6?function(e,t,n){return f6.f(e,t,d6(1,n))}:function(e,t,n){return e[t]=n,e},SS={exports:{}},p6=Nt,jf=Lf,h6=Function.toString;p6(jf.inspectSource)||(jf.inspectSource=function(e){return h6.call(e)});var xS=jf.inspectSource,v6=Tt,m6=Nt,g6=xS,ES=v6.WeakMap,y6=m6(ES)&&/native code/.test(g6(ES)),b6=Ff,w6=cS,kS=b6("keys"),CS=function(e){return kS[e]||(kS[e]=w6(e))},zf={},S6=y6,x6=Tt,E6=Go,k6=ts,Uf=er,Wf=Lf,C6=CS,A6=zf,AS="Object already initialized",$6=x6.WeakMap,ns,Xo,rs,T6=function(e){return rs(e)?Xo(e):ns(e,{})},O6=function(e){return function(t){var n;if(!E6(t)||(n=Xo(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(S6||Wf.state){var tr=Wf.state||(Wf.state=new $6),I6=tr.get,$S=tr.has,P6=tr.set;ns=function(e,t){if($S.call(tr,e))throw new TypeError(AS);return t.facade=e,P6.call(tr,e,t),t},Xo=function(e){return I6.call(tr,e)||{}},rs=function(e){return $S.call(tr,e)}}else{var Nr=C6("state");A6[Nr]=!0,ns=function(e,t){if(Uf(e,Nr))throw new TypeError(AS);return t.facade=e,k6(e,Nr,t),t},Xo=function(e){return Uf(e,Nr)?e[Nr]:{}},rs=function(e){return Uf(e,Nr)}}var TS={set:ns,get:Xo,has:rs,enforce:T6,getterFor:O6},Hf=Xn,D6=er,OS=Function.prototype,_6=Hf&&Object.getOwnPropertyDescriptor,Vf=D6(OS,"name"),M6=Vf&&(function(){}).name==="something",N6=Vf&&(!Hf||Hf&&_6(OS,"name").configurable),Kf={EXISTS:Vf,PROPER:M6,CONFIGURABLE:N6},R6=Tt,IS=Nt,L6=er,PS=ts,F6=Rf,B6=xS,DS=TS,j6=Kf.CONFIGURABLE,z6=DS.get,U6=DS.enforce,W6=String(String).split("String");(SS.exports=function(e,t,n,r){var o=r?!!r.unsafe:!1,i=r?!!r.enumerable:!1,a=r?!!r.noTargetGet:!1,s=r&&r.name!==void 0?r.name:t,l;if(IS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!L6(n,"name")||j6&&n.name!==s)&&PS(n,"name",s),l=U6(n),l.source||(l.source=W6.join(typeof s=="string"?s:""))),e===R6){i?e[t]=n:F6(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:PS(e,t,n)})(Function.prototype,"toString",function(){return IS(this)&&z6(this).source||B6(this)});var ei=SS.exports,_S={},H6=Math.ceil,V6=Math.floor,os=function(e){var t=+e;return t!==t||t===0?0:(t>0?V6:H6)(t)},K6=os,q6=Math.max,G6=Math.min,Y6=function(e,t){var n=K6(e);return n<0?q6(n+t,0):G6(n,t)},Q6=os,J6=Math.min,MS=function(e){return e>0?J6(Q6(e),9007199254740991):0},Z6=MS,X6=function(e){return Z6(e.length)},eH=Pf,tH=Y6,nH=X6,NS=function(e){return function(t,n,r){var o=eH(t),i=nH(o),a=tH(r,i),s;if(e&&n!=n){for(;i>a;)if(s=o[a++],s!=s)return!0}else for(;i>a;a++)if((e||a in o)&&o[a]===n)return e||a||0;return!e&&-1}},rH={includes:NS(!0),indexOf:NS(!1)},qf=er,oH=Pf,iH=rH.indexOf,aH=zf,RS=function(e,t){var n=oH(e),r=0,o=[],i;for(i in n)!qf(aH,i)&&qf(n,i)&&o.push(i);for(;t.length>r;)qf(n,i=t[r++])&&(~iH(o,i)||o.push(i));return o},Gf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],sH=RS,lH=Gf,cH=lH.concat("length","prototype");_S.f=Object.getOwnPropertyNames||function(t){return sH(t,cH)};var LS={};LS.f=Object.getOwnPropertySymbols;var uH=Xa,fH=_S,dH=LS,pH=_n,hH=uH("Reflect","ownKeys")||function(t){var n=fH.f(pH(t)),r=dH.f;return r?n.concat(r(t)):n},vH=er,mH=hH,gH=Of,yH=Zo,bH=function(e,t){for(var n=mH(t),r=yH.f,o=gH.f,i=0;i<n.length;i++){var a=n[i];vH(e,a)||r(e,a,o(t,a))}},wH=Vt,SH=Nt,xH=/#|\.prototype\./,ti=function(e,t){var n=kH[EH(e)];return n==AH?!0:n==CH?!1:SH(t)?wH(t):!!t},EH=ti.normalize=function(e){return String(e).replace(xH,".").toLowerCase()},kH=ti.data={},CH=ti.NATIVE="N",AH=ti.POLYFILL="P",$H=ti,Yf=Tt,TH=Of.f,OH=ts,IH=ei,PH=Rf,DH=bH,_H=$H,MH=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,l,c,u;if(r?a=Yf:o?a=Yf[n]||PH(n,{}):a=(Yf[n]||{}).prototype,a)for(s in t){if(c=t[s],e.noTargetGet?(u=TH(a,s),l=u&&u.value):l=a[s],i=_H(r?s:n+(o?".":"#")+s,e.forced),!i&&l!==void 0){if(typeof c==typeof l)continue;DH(c,l)}(e.sham||l&&l.sham)&&OH(c,"sham",!0),IH(a,s,c,e)}},NH=Jo,RH=NH("toStringTag"),FS={};FS[RH]="z";var Qf=String(FS)==="[object z]",LH=Qf,FH=Nt,is=If,BH=Jo,jH=BH("toStringTag"),zH=is(function(){return arguments}())=="Arguments",UH=function(e,t){try{return e[t]}catch{}},BS=LH?is:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=UH(t=Object(e),jH))=="string"?n:zH?is(t):(r=is(t))=="Object"&&FH(t.callee)?"Arguments":r},WH=BS,as=function(e){if(WH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},HH=_n,jS=function(){var e=HH(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},Jf={},zS=Vt,VH=Tt,US=VH.RegExp;Jf.UNSUPPORTED_Y=zS(function(){var e=US("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Jf.BROKEN_CARET=zS(function(){var e=US("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var KH=RS,qH=Gf,GH=Object.keys||function(t){return KH(t,qH)},YH=Xn,QH=Zo,JH=_n,ZH=GH,XH=YH?Object.defineProperties:function(t,n){JH(t);for(var r=ZH(n),o=r.length,i=0,a;o>i;)QH.f(t,a=r[i++],n[a]);return t},e9=Xa,t9=e9("document","documentElement"),n9=_n,r9=XH,WS=Gf,o9=zf,i9=t9,a9=mS,s9=CS,HS=">",VS="<",Zf="prototype",Xf="script",KS=s9("IE_PROTO"),ed=function(){},qS=function(e){return VS+Xf+HS+e+VS+"/"+Xf+HS},GS=function(e){e.write(qS("")),e.close();var t=e.parentWindow.Object;return e=null,t},l9=function(){var e=a9("iframe"),t="java"+Xf+":",n;return e.style.display="none",i9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(qS("document.F=Object")),n.close(),n.F},ss,ls=function(){try{ss=new ActiveXObject("htmlfile")}catch{}ls=typeof document<"u"?document.domain&&ss?GS(ss):l9():GS(ss);for(var e=WS.length;e--;)delete ls[Zf][WS[e]];return ls()};o9[KS]=!0;var c9=Object.create||function(t,n){var r;return t!==null?(ed[Zf]=n9(t),r=new ed,ed[Zf]=null,r[KS]=t):r=ls(),n===void 0?r:r9(r,n)},u9=Vt,f9=Tt,d9=f9.RegExp,p9=u9(function(){var e=d9(".","s");return!(e.dotAll&&e.exec(`
|
|
288
|
-
|
|
289
|
-
`)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),rd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),nd&&(l=n.lastIndex),c=cs.call(v?s:n,b),v?c?(c.input=c.input.slice(m),c[0]=c[0].slice(m),c.index=n.lastIndex,n.lastIndex+=c[0].length):n.lastIndex=0:nd&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),rd&&c&&c.length>1&&C9.call(c[0],s,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(c[u]=void 0)}),c&&d)for(c.groups=f=S9(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var od=td,$9=MH,JS=od;$9({target:"RegExp",proto:!0,forced:/./.exec!==JS},{exec:JS});var ZS=ei,T9=od,XS=Vt,e0=Jo,O9=ts,I9=e0("species"),id=RegExp.prototype,P9=function(e,t,n,r){var o=e0(e),i=!XS(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!XS(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[I9]=function(){return u},u.flags="",u[o]=/./[o]),u.exec=function(){return c=!0,null},u[o](""),!c});if(!i||!a||n){var s=/./[o],l=t(o,""[e],function(c,u,f,p,d){var v=u.exec;return v===T9||v===id.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});ZS(String.prototype,e,l[0]),ZS(id,o,l[1])}r&&O9(id[o],"sham",!0)},D9=os,_9=as,M9=Za,t0=function(e){return function(t,n){var r=_9(M9(t)),o=D9(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=r.charCodeAt(o),a<55296||a>56319||o+1===i||(s=r.charCodeAt(o+1))<56320||s>57343?e?r.charAt(o):a:e?r.slice(o,o+2):(a-55296<<10)+(s-56320)+65536)}},N9={codeAt:t0(!1),charAt:t0(!0)},R9=N9.charAt,L9=function(e,t,n){return t+(n?R9(e,t).length:1)},F9=lS,B9=Math.floor,j9="".replace,z9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,U9=/\$([$&'`]|\d{1,2})/g,W9=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=U9;return o!==void 0&&(o=F9(o),l=z9),j9.call(i,l,function(c,u){var f;switch(u.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,n);case"'":return t.slice(a);case"<":f=o[u.slice(1,-1)];break;default:var p=+u;if(p===0)return c;if(p>s){var d=B9(p/10);return d===0?c:d<=s?r[d-1]===void 0?u.charAt(1):r[d-1]+u.charAt(1):c}f=r[p-1]}return f===void 0?"":f})},H9=_n,V9=Nt,K9=If,q9=od,G9=function(e,t){var n=e.exec;if(V9(n)){var r=n.call(e,t);return r!==null&&H9(r),r}if(K9(e)==="RegExp")return q9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Y9=P9,Q9=Vt,J9=_n,Z9=Nt,X9=os,eV=MS,Rr=as,tV=Za,nV=L9,rV=rS,oV=W9,iV=G9,aV=Jo,ad=aV("replace"),sV=Math.max,lV=Math.min,cV=function(e){return e===void 0?e:String(e)},uV=function(){return"a".replace(/./,"$0")==="$0"}(),n0=function(){return/./[ad]?/./[ad]("a","$0")==="":!1}(),fV=!Q9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Y9("replace",function(e,t,n){var r=n0?"$":"$0";return[function(i,a){var s=tV(this),l=i==null?void 0:rV(i,ad);return l?l.call(i,s,a):t.call(Rr(s),i,a)},function(o,i){var a=J9(this),s=Rr(o);if(typeof i=="string"&&i.indexOf(r)===-1&&i.indexOf("$<")===-1){var l=n(t,a,s,i);if(l.done)return l.value}var c=Z9(i);c||(i=Rr(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=iV(a,s);if(d===null||(p.push(d),!u))break;var v=Rr(d[0]);v===""&&(a.lastIndex=nV(s,eV(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=Rr(d[0]),w=sV(lV(X9(d.index),s.length),0),A=[],x=1;x<d.length;x++)A.push(cV(d[x]));var k=d.groups;if(c){var $=[b].concat(A,w,s);k!==void 0&&$.push(k);var R=Rr(i.apply(void 0,$))}else R=oV(b,s,w,A,k,i);w>=g&&(h+=s.slice(g,w)+R,g=w+b.length)}return h+s.slice(g)}]},!fV||!uV||n0);var ni=Qe,dV=au,pV=Gn,us=function(e){return dV.slice(0,e.length)===e},hV=function(){return us("Bun/")?"BUN":us("Cloudflare-Workers")?"CLOUDFLARE":us("Deno/")?"DENO":us("Node.js/")?"NODE":ni.Bun&&typeof Bun.version=="string"?"BUN":ni.Deno&&typeof Deno.version=="object"?"DENO":pV(ni.process)==="process"?"NODE":ni.window&&ni.document?"BROWSER":"REST"}(),vV=TypeError,mV=function(e,t){if(e<t)throw new vV("Not enough arguments");return e},r0=Qe,gV=Jc,yV=ut,bV=hV,wV=au,SV=Na,xV=mV,EV=r0.Function,kV=/MSIE .\./.test(wV)||bV==="BUN"&&function(){var e=r0.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),o0=function(e,t){var n=t?2:1;return kV?function(r,o){var i=xV(arguments.length,1)>n,a=yV(r)?r:EV(r),s=i?SV(arguments,n):[],l=i?function(){gV(a,this,s)}:a;return t?e(l,o):e(l)}:e},CV=Pe,i0=Qe,AV=o0,a0=AV(i0.setInterval,!0);CV({global:!0,bind:!0,forced:i0.setInterval!==a0},{setInterval:a0});var $V=Pe,s0=Qe,TV=o0,l0=TV(s0.setTimeout,!0);$V({global:!0,bind:!0,forced:s0.setTimeout!==l0},{setTimeout:l0});var OV=it,IV=OV.setInterval,PV=IV;const DV=be(PV);var _V=Je,c0=function(e,t){var n=[][e];return!!n&&_V(function(){n.call(null,t||function(){return 1},1)})},MV=Pe,NV=Xc,RV=jb.indexOf,LV=c0,sd=NV([].indexOf),u0=!!sd&&1/sd([1],1,-0)<0,FV=u0||!LV("indexOf");MV({target:"Array",proto:!0,forced:FV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return u0?sd(this,t,n)||0:RV(this,t,n)}});var BV=Zn,jV=BV("Array","indexOf"),zV=hn,UV=jV,ld=Array.prototype,WV=function(e){var t=e.indexOf;return e===ld||zV(ld,e)&&t===ld.indexOf?UV:t},HV=WV,VV=HV,KV=VV;const qV=be(KV);var f0=xa,GV=TypeError,YV=function(e,t){if(!delete e[t])throw new GV("Cannot delete property "+f0(t)+" of "+f0(e))},QV=Pe,JV=vn,ZV=Ou,XV=Aa,eK=Yn,tK=E1,nK=Eu,rK=Tu,oK=Ro,cd=YV,iK=Ta,aK=iK("splice"),sK=Math.max,lK=Math.min;QV({target:"Array",proto:!0,forced:!aK},{splice:function(t,n){var r=JV(this),o=eK(r),i=ZV(t,o),a=arguments.length,s,l,c,u,f,p;for(a===0?s=l=0:a===1?(s=0,l=o-i):(s=a-2,l=lK(sK(XV(n),0),o-i)),nK(o+s-l),c=rK(r,l),u=0;u<l;u++)f=i+u,f in r&&oK(c,u,r[f]);if(c.length=l,s<l){for(u=i;u<o-l;u++)f=u+l,p=u+s,f in r?r[p]=r[f]:cd(r,p);for(u=o;u>o-l+s;u--)cd(r,u-1)}else if(s>l)for(u=o-l;u>i;u--)f=u+l-1,p=u+s-1,f in r?r[p]=r[f]:cd(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return tK(r,o-l+s),c}});var cK=Zn,uK=cK("Array","splice"),fK=hn,dK=uK,ud=Array.prototype,pK=function(e){var t=e.splice;return e===ud||fK(ud,e)&&t===ud.splice?dK:t},hK=pK,vK=hK,mK=vK;const gK=be(mK);var yK=Zn,bK=yK("Array","concat"),wK=hn,SK=bK,fd=Array.prototype,xK=function(e){var t=e.concat;return e===fd||wK(fd,e)&&t===fd.concat?SK:t},EK=xK,kK=EK,CK=kK;const Be=be(CK);var AK=Pe,$K=Ke,d0=Date,TK=$K(d0.prototype.getTime);AK({target:"Date",stat:!0},{now:function(){return TK(new d0)}});var OK=it,IK=OK.Date.now,PK=IK,DK=PK,_K=DK;const Mn=be(_K);var MK=zu.forEach,NK=c0,RK=NK("forEach"),LK=RK?[].forEach:function(t){return MK(this,t,arguments.length>1?arguments[1]:void 0)},FK=Pe,p0=LK;FK({target:"Array",proto:!0,forced:[].forEach!==p0},{forEach:p0});var BK=Zn,jK=BK("Array","forEach"),zK=jK,UK=zK,WK=Lo,HK=$t,VK=hn,KK=UK,dd=Array.prototype,qK={DOMTokenList:!0,NodeList:!0},GK=function(e){var t=e.forEach;return e===dd||VK(dd,e)&&t===dd.forEach||HK(qK,WK(e))?KK:t},YK=GK;const fs=be(YK);var QK=Pe,JK=vn,h0=Du,ZK=Je,XK=ZK(function(){h0(1)});QK({target:"Object",stat:!0,forced:XK},{keys:function(t){return h0(JK(t))}});var e8=it,t8=e8.Object.keys,n8=t8,r8=n8,o8=r8;const i8=be(o8);var a8=it,s8=a8.Object.getOwnPropertySymbols,l8=s8,c8=l8,u8=c8;const v0=be(u8);var f8=Pe,d8=zu.filter,p8=Ta,h8=p8("filter");f8({target:"Array",proto:!0,forced:!h8},{filter:function(t){return d8(this,t,arguments.length>1?arguments[1]:void 0)}});var v8=Zn,m8=v8("Array","filter"),g8=hn,y8=m8,pd=Array.prototype,b8=function(e){var t=e.filter;return e===pd||g8(pd,e)&&t===pd.filter?y8:t},w8=b8,S8=w8,x8=S8;const E8=be(x8);var m0={exports:{}},k8=Pe,C8=Je,A8=tn,g0=Po.f,y0=wt,$8=!y0||C8(function(){g0(1)});k8({target:"Object",stat:!0,forced:$8,sham:!y0},{getOwnPropertyDescriptor:function(t,n){return g0(A8(t),n)}});var T8=it,b0=T8.Object,O8=m0.exports=function(t,n){return b0.getOwnPropertyDescriptor(t,n)};b0.getOwnPropertyDescriptor.sham&&(O8.sham=!0);var I8=m0.exports,P8=I8,D8=P8,_8=D8;const w0=be(_8);var M8=nn,N8=Ke,R8=Ma,L8=Ra,F8=In,B8=N8([].concat),j8=M8("Reflect","ownKeys")||function(t){var n=R8.f(F8(t)),r=L8.f;return r?B8(n,r(t)):n},z8=Pe,U8=wt,W8=j8,H8=tn,V8=Po,K8=Ro;z8({target:"Object",stat:!0,sham:!U8},{getOwnPropertyDescriptors:function(t){for(var n=H8(t),r=V8.f,o=W8(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&K8(i,s,l);return i}});var q8=it,G8=q8.Object.getOwnPropertyDescriptors,Y8=G8,Q8=Y8,J8=Q8;const S0=be(J8);var x0={exports:{}},Z8=Pe,X8=wt,E0=Oa.f;Z8({target:"Object",stat:!0,forced:Object.defineProperties!==E0,sham:!X8},{defineProperties:E0});var e7=it,k0=e7.Object,t7=x0.exports=function(t,n){return k0.defineProperties(t,n)};k0.defineProperties.sham&&(t7.sham=!0);var n7=x0.exports,r7=n7,o7=r7,i7=o7;const a7=be(i7);var s7=W1;const l7=be(s7);var c7=!1;function u7(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 f7(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 d7=function(){function e(n){var r=this;this._insertTag=function(o){var i;r.tags.length===0?r.insertionPoint?i=r.insertionPoint.nextSibling:r.prepend?i=r.container.firstChild:i=r.before:i=r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(o,i),r.tags.push(o)},this.isSpeedy=n.speedy===void 0?!c7:n.speedy,this.tags=[],this.ctr=0,this.nonce=n.nonce,this.key=n.key,this.container=n.container,this.prepend=n.prepend,this.insertionPoint=n.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(r){r.forEach(this._insertTag)},t.insert=function(r){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(f7(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=u7(o);try{i.insertRule(r,i.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(r));this.ctr++},t.flush=function(){this.tags.forEach(function(r){var o;return(o=r.parentNode)==null?void 0:o.removeChild(r)}),this.tags=[],this.ctr=0},e}(),ft="-ms-",ds="-moz-",ke="-webkit-",C0="comm",hd="rule",vd="decl",p7="@import",A0="@keyframes",h7="@layer",v7=Math.abs,ps=String.fromCharCode,m7=Object.assign;function g7(e,t){return at(e,0)^45?(((t<<2^at(e,0))<<2^at(e,1))<<2^at(e,2))<<2^at(e,3):0}function $0(e){return e.trim()}function y7(e,t){return(e=t.exec(e))?e[0]:e}function Ce(e,t,n){return e.replace(t,n)}function md(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function ri(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function gd(e){return e.length}function hs(e,t){return t.push(e),e}function b7(e,t){return e.map(t).join("")}var vs=1,Lr=1,T0=0,xt=0,qe=0,Fr="";function ms(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:vs,column:Lr,length:a,return:""}}function oi(e,t){return m7(ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function w7(){return qe}function S7(){return qe=xt>0?at(Fr,--xt):0,Lr--,qe===10&&(Lr=1,vs--),qe}function Ot(){return qe=xt<T0?at(Fr,xt++):0,Lr++,qe===10&&(Lr=1,vs++),qe}function ln(){return at(Fr,xt)}function gs(){return xt}function ii(e,t){return ri(Fr,e,t)}function ai(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 O0(e){return vs=Lr=1,T0=sn(Fr=e),xt=0,[]}function I0(e){return Fr="",e}function ys(e){return $0(ii(xt-1,yd(e===91?e+2:e===40?e+1:e)))}function x7(e){for(;(qe=ln())&&qe<33;)Ot();return ai(e)>2||ai(qe)>3?"":" "}function E7(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return ii(e,gs()+(t<6&&ln()==32&&Ot()==32))}function yd(e){for(;Ot();)switch(qe){case e:return xt;case 34:case 39:e!==34&&e!==39&&yd(qe);break;case 40:e===41&&yd(e);break;case 92:Ot();break}return xt}function k7(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&ln()===47)break;return"/*"+ii(t,xt-1)+"*"+ps(e===47?e:Ot())}function C7(e){for(;!ai(ln());)Ot();return ii(e,xt)}function A7(e){return I0(bs("",null,null,null,[""],e=O0(e),0,[0],e))}function bs(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,d=0,v=0,h=1,g=1,m=1,b=0,w="",A=o,x=i,k=r,$=w;g;)switch(v=b,b=Ot()){case 40:if(v!=108&&at($,f-1)==58){md($+=Ce(ys(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:$+=ys(b);break;case 9:case 10:case 13:case 32:$+=x7(v);break;case 92:$+=E7(gs()-1,7);continue;case 47:switch(ln()){case 42:case 47:hs($7(k7(Ot(),gs()),t,n),l);break;default:$+="/"}break;case 123*h:s[c++]=sn($)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m==-1&&($=Ce($,/\f/g,"")),d>0&&sn($)-f&&hs(d>32?D0($+";",r,n,f-1):D0(Ce($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(hs(k=P0($,t,n,c,u,o,s,w,A=[],x=[],f),i),b===123)if(u===0)bs($,t,k,k,A,i,f,s,x);else switch(p===99&&at($,3)===110?100:p){case 100:case 108:case 109:case 115:bs(e,k,k,r&&hs(P0(e,k,k,0,0,o,s,w,o,A=[],f),x),o,x,f,s,r?A:x);break;default:bs($,k,k,k,[""],x,0,s,x)}}c=u=d=0,h=m=1,w=$="",f=a;break;case 58:f=1+sn($),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&S7()==125)continue}switch($+=ps(b),b*h){case 38:m=u>0?1:($+="\f",-1);break;case 44:s[c++]=(sn($)-1)*m,m=1;break;case 64:ln()===45&&($+=ys(Ot())),p=ln(),u=f=sn(w=$+=C7(gs())),b++;break;case 45:v===45&&sn($)==2&&(h=0)}}return i}function P0(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=gd(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=ri(e,f+1,f=v7(h=a[v])),w=e;m<d;++m)(w=$0(h>0?p[m]+" "+b:Ce(b,/&\f/g,p[m])))&&(l[g++]=w);return ms(e,t,n,o===0?hd:s,l,c,u)}function $7(e,t,n){return ms(e,t,n,C0,ps(w7()),ri(e,2,-2),0)}function D0(e,t,n,r){return ms(e,t,n,vd,ri(e,0,r),ri(e,r+1,-1),r)}function Br(e,t){for(var n="",r=gd(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function T7(e,t,n,r){switch(e.type){case h7:if(e.children.length)break;case p7:case vd:return e.return=e.return||e.value;case C0:return"";case A0:return e.return=e.value+"{"+Br(e.children,r)+"}";case hd:e.value=e.props.join(",")}return sn(n=Br(e.children,r))?e.return=e.value+"{"+n+"}":""}function O7(e){var t=gd(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function I7(e){return function(t){t.root||(t=t.return)&&e(t)}}function P7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var D7=function(t,n,r){for(var o=0,i=0;o=i,i=ln(),o===38&&i===12&&(n[r]=1),!ai(i);)Ot();return ii(t,xt)},_7=function(t,n){var r=-1,o=44;do switch(ai(o)){case 0:o===38&&ln()===12&&(n[r]=1),t[r]+=D7(xt-1,n,r);break;case 2:t[r]+=ys(o);break;case 4:if(o===44){t[++r]=ln()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=ps(o)}while(o=Ot());return t},M7=function(t,n){return I0(_7(O0(t),n))},_0=new WeakMap,N7=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var n=t.value,r=t.parent,o=t.column===r.column&&t.line===r.line;r.type!=="rule";)if(r=r.parent,!r)return;if(!(t.props.length===1&&n.charCodeAt(0)!==58&&!_0.get(r))&&!o){_0.set(t,!0);for(var i=[],a=M7(n,i),s=r.props,l=0,c=0;l<a.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=i[l]?a[l].replace(/&\f/g,s[u]):s[u]+" "+a[l]}}},R7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function M0(e,t){switch(g7(e,t)){case 5103:return ke+"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 ke+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ke+e+ds+e+ft+e+e;case 6828:case 4268:return ke+e+ft+e+e;case 6165:return ke+e+ft+"flex-"+e+e;case 5187:return ke+e+Ce(e,/(\w+).+(:[^]+)/,ke+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return ke+e+ft+"flex-item-"+Ce(e,/flex-|-self/,"")+e;case 4675:return ke+e+ft+"flex-line-pack"+Ce(e,/align-content|flex-|-self/,"")+e;case 5548:return ke+e+ft+Ce(e,"shrink","negative")+e;case 5292:return ke+e+ft+Ce(e,"basis","preferred-size")+e;case 6060:return ke+"box-"+Ce(e,"-grow","")+ke+e+ft+Ce(e,"grow","positive")+e;case 4554:return ke+Ce(e,/([^-])(transform)/g,"$1"+ke+"$2")+e;case 6187:return Ce(Ce(Ce(e,/(zoom-|grab)/,ke+"$1"),/(image-set)/,ke+"$1"),e,"")+e;case 5495:case 3959:return Ce(e,/(image-set\([^]*)/,ke+"$1$`$1");case 4968:return Ce(Ce(e,/(.+:)(flex-)?(.*)/,ke+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ke+e+e;case 4095:case 3583:case 4068:case 2532:return Ce(e,/(.+)-inline(.+)/,ke+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(sn(e)-1-t>6)switch(at(e,t+1)){case 109:if(at(e,t+4)!==45)break;case 102:return Ce(e,/(.+:)(.+)-([^]+)/,"$1"+ke+"$2-$3$1"+ds+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~md(e,"stretch")?M0(Ce(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(at(e,t+1)!==115)break;case 6444:switch(at(e,sn(e)-3-(~md(e,"!important")&&10))){case 107:return Ce(e,":",":"+ke)+e;case 101:return Ce(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ke+(at(e,14)===45?"inline-":"")+"box$3$1"+ke+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(at(e,t+11)){case 114:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ke+e+ft+Ce(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ke+e+ft+e+e}return e}var L7=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case vd:t.return=M0(t.value,t.length);break;case A0:return Br([oi(t,{value:Ce(t.value,"@","@"+ke)})],o);case hd:if(t.length)return b7(t.props,function(i){switch(y7(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Br([oi(t,{props:[Ce(i,/:(read-\w+)/,":"+ds+"$1")]})],o);case"::placeholder":return Br([oi(t,{props:[Ce(i,/:(plac\w+)/,":"+ke+"input-$1")]}),oi(t,{props:[Ce(i,/:(plac\w+)/,":"+ds+"$1")]}),oi(t,{props:[Ce(i,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},F7=[L7],B7=function(t){var n=t.key;if(n==="css"){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,function(h){var g=h.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(h),h.setAttribute("data-s",""))})}var o=t.stylisPlugins||F7,i={},a,s=[];a=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(h){for(var g=h.getAttribute("data-emotion").split(" "),m=1;m<g.length;m++)i[g[m]]=!0;s.push(h)});var l,c=[N7,R7];{var u,f=[T7,I7(function(h){u.insert(h)})],p=O7(c.concat(o,f)),d=function(g){return Br(A7(g),p)};l=function(g,m,b,w){u=b,d(g?g+"{"+m.styles+"}":m.styles),w&&(v.inserted[m.name]=!0)}}var v={key:n,sheet:new d7({key:n,container:a,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:i,registered:{},insert:l};return v.sheet.hydrate(s),v};function j7(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var z7={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},U7=!1,W7=/[A-Z]|^ms/g,H7=/_EMO_([^_]+?)_([^]*?)_EMO_/g,N0=function(t){return t.charCodeAt(1)===45},R0=function(t){return t!=null&&typeof t!="boolean"},bd=P7(function(e){return N0(e)?e:e.replace(W7,"-$&").toLowerCase()}),L0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(H7,function(r,o,i){return Nn={name:o,styles:i,next:Nn},o})}return z7[t]!==1&&!N0(t)&&typeof n=="number"&&n!==0?n+"px":n},V7="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ws(e,t,n){if(n==null)return"";var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case"boolean":return"";case"object":{var o=n;if(o.anim===1)return Nn={name:o.name,styles:o.styles,next:Nn},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Nn={name:a.name,styles:a.styles,next:Nn},a=a.next;var s=i.styles+";";return s}return K7(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function K7(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ws(e,t,n[o])+";";else for(var i in n){var a=n[i];if(typeof a!="object"){var s=a;t!=null&&t[s]!==void 0?r+=i+"{"+t[s]+"}":R0(s)&&(r+=bd(i)+":"+L0(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&U7)throw new Error(V7);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)R0(a[l])&&(r+=bd(i)+":"+L0(i,a[l])+";");else{var c=ws(e,t,a);switch(i){case"animation":case"animationName":{r+=bd(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var F0=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;function wd(e,t,n){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,o="";Nn=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=ws(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ws(n,t,e[s]),r){var l=i;o+=l[s]}F0.lastIndex=0;for(var c="",u;(u=F0.exec(o))!==null;)c+="-"+u[1];var f=j7(o)+c;return{name:f,styles:o,next:Nn}}function B0(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var q7=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},G7=function(t,n,r){q7(t,n);var o=t.key+"-"+n.name;if(t.inserted[n.name]===void 0){var i=n;do t.insert(n===i?"."+o:"",i,t.sheet,!0),i=i.next;while(i!==void 0)}};function j0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function z0(e,t,n){var r=[],o=B0(e,r,n);return r.length<2?n:o+t(r)}var Y7=function(t){var n=B7(t);n.sheet.speedy=function(s){if(process.env.NODE_ENV!=="production"&&this.ctr!==0)throw new Error("speedy must be changed before any rules are inserted");this.isSpeedy=s},n.compat=!0;var r=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=wd(c,n.registered,void 0);return G7(n,f),n.key+"-"+f.name},o=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=wd(c,n.registered),p="animation-"+f.name;return j0(n,{name:f.name,styles:"@keyframes "+p+"{"+f.styles+"}"}),p},i=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];var f=wd(c,n.registered);j0(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return z0(n.registered,r,Q7(c))};return{css:r,cx:a,injectGlobal:i,keyframes:o,hydrate:function(l){l.forEach(function(c){n.inserted[c]=!0})},flush:function(){n.registered={},n.inserted={},n.sheet.flush()},sheet:n.sheet,cache:n,getRegisteredStyles:B0.bind(null,n.registered),merge:z0.bind(null,n.registered,r)}},Q7=function e(t){for(var n="",r=0;r<t.length;r++){var o=t[r];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&&(n&&(n+=" "),n+=i)}}return n},J7=ei,Sd=Date.prototype,U0="Invalid Date",W0="toString",Z7=Sd[W0],X7=Sd.getTime;String(new Date(NaN))!=U0&&J7(Sd,W0,function(){var t=X7.call(this);return t===t?Z7.call(this):U0});var eq=Qf,tq=BS,nq=eq?{}.toString:function(){return"[object "+tq(this)+"]"},rq=Qf,oq=ei,iq=nq;rq||oq(Object.prototype,"toString",iq,{unsafe:!0});var aq=Kf.PROPER,sq=ei,lq=_n,H0=as,cq=Vt,uq=jS,xd="toString",V0=RegExp.prototype,K0=V0[xd],fq=cq(function(){return K0.call({source:"a",flags:"b"})!="/a/b"}),dq=aq&&K0.name!=xd;(fq||dq)&&sq(RegExp.prototype,xd,function(){var t=lq(this),n=H0(t.source),r=t.flags,o=H0(r===void 0&&t instanceof RegExp&&!("flags"in V0)?uq.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var q0=typeof window<"u"?window:self,pq=q0.crypto||q0.msCrypto,hq=function(e){if(!e)return Math.random;var t=Math.pow(2,32),n=new Uint32Array(1);return function(){return e.getRandomValues(n)[0]/t}}(pq);const vq=be(hq);function mq(){return vq().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var gq=$b;const G0=be(gq);function Te(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"white",n="background-color: ".concat(e,"; border-radius: 4px; padding: 2px 4px;");return t&&(n+=" color: ".concat(t,";")),[n,""]}function Y0(e,t){for(var n,r,o=arguments.length,i=new Array(o>2?o-2:0),a=2;a<o;a++)i[a-2]=arguments[a];return Be(n=[Be(r="%c".concat(e,"%c ")).call(r,t)]).call(n,Se(Te("green","white")),i)}function yq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.force,r=n===void 0?!1:n;return r?function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];if(i.length){var s=i,l=on(s,1),c=l[0];typeof c=="function"&&(i=c());var u=G0(i[0])?i:[i],f=u.length===1;fs(u).call(u,function(p,d){if(f){var v,h;(v=console).log.apply(v,Se(Y0.apply(void 0,Be(h=[e]).call(h,Se(p)))))}else if(d){var g;(g=console).log.apply(g,Se(G0(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,Se(Y0.apply(void 0,Be(b=[e]).call(b,Se(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var bq=Xn,wq=Kf.EXISTS,Sq=Zo.f,Q0=Function.prototype,xq=Q0.toString,Eq=/^\s*function ([^ (]*)/,kq="name";bq&&!wq&&Sq(Q0,kq,{configurable:!0,get:function(){try{return xq.call(this).match(Eq)[1]}catch{return""}}});var Cq=it,Aq=Cq.setTimeout,$q=Aq;const Tq=be($q);function Oq(e,t){if(!t)return e;var n=0,r=null;return function(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var s=Mn();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=Tq(function(){e.apply(void 0,i),n=Mn()},Math.max(0,t-s+n)))}}var J0=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=O.useRef();a.current=o;var s=O.useMemo(function(){return Oq(function(c){var u=a.current;u&&u(c)},n)},[n,a]),l=O.useCallback(function(c){c.timeStampLow=Mn(),s(c)},[s]);return O.useLayoutEffect(function(){return i.addEventListener(r,l,{passive:!0}),l({target:i,type:r}),function(){return i.removeEventListener(r,l)}},[r,l,i]),!1};J0.defaultProps={debounce:200};var Iq=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Pq=Pe,Dq=Iq;Pq({target:"Math",stat:!0},{sign:Dq});var _q=it,Mq=_q.Math.sign,Nq=Mq,Rq=Nq,Lq=Rq;const Fq=be(Lq);function Bq(e,t){var n=Fq(t-e),r=Math.sqrt(Math.abs(t-e)),o=e+r*n;return n>0?Math.min(t,o):Math.max(t,o)}function jq(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var Z0=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=O.useRef(),s=O.useCallback(function(c,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Mn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var v=f==="100%"?o.scrollHeight-o.offsetHeight:f,h=jq(u,v,Bq,(Mn()-d)/5);Math.abs(v-h)<1.5&&(h=v),o[c]=h,v===h?r&&r(!0):s(c,u,f,p+1,d)}}))},[a,r,o]),l=O.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return O.useLayoutEffect(function(){return s(n,o[n],i,1),o?(o.addEventListener("pointerdown",l,{passive:!0}),o.addEventListener("wheel",l,{passive:!0}),function(){o.removeEventListener("pointerdown",l),o.removeEventListener("wheel",l),cancelAnimationFrame(a.current)}):function(){return cancelAnimationFrame(a.current)}},[s,a,l,n,o,i]),!1};Z0.propTypes={name:xe.string.isRequired,onEnd:xe.func,target:xe.any.isRequired,value:xe.oneOfType([xe.number,xe.oneOf(["100%"])]).isRequired};function Ed(e){var t=O.useState(e),n=on(t,2),r=n[0],o=n[1],i=O.useRef(),a=O.useCallback(function(s){typeof s=="function"?a(function(l){return s=s(l),i.current=s,s}):(i.current=s,a(s))},[i]);return i.current=r,[r,o,i]}function X0(e,t){var n=i8(e);if(v0){var r=v0(e);t&&(r=E8(r).call(r,function(o){return w0(e,o).enumerable})),n.push.apply(n,r)}return n}function ex(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;fs(r=X0(Object(n),!0)).call(r,function(i){ZU(e,i,n[i])})}else if(S0)a7(e,S0(n));else{var o;fs(o=X0(Object(n))).call(o,function(i){l7(e,i,w0(n,i))})}}return e}var zq=function(){return 1/0},tx=17,Uq="bottom",Kt="top",nx=1,Wq=34,rx={};function Hq(e,t){return e(),DV(e,t)}function ox(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<nx,s=i<nx,l=t===Kt?s:a,c=t!==Kt?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function si(e,t){return e===(t===Kt?0:"100%")}var kd=function(t){var n=t.checkInterval,r=t.children,o=t.debounce,i=t.debug,a=t.initialScrollBehavior,s=t.mode,l=t.nonce,c=t.scroller,u=O.useMemo(function(){return yq("<ScrollToBottom>",{force:i})},[i]);s=s===Kt?Kt:Uq;var f=O.useRef(0),p=O.useRef(a),d=Ed(s===Kt?0:"100%"),v=on(d,3),h=v[0],g=v[1],m=v[2],b=Ed(null),w=on(b,3),A=w[0],x=w[1],k=w[2],$=O.useRef(0),R=O.useRef(0),H=O.useRef(0),T=O.useState(!0),_=on(T,2),F=_[0],N=_[1],B=O.useState(!0),D=on(B,2),M=D[0],G=D[1],U=O.useState(!0),I=on(U,2),y=I[0],P=I[1],j=O.useState(!1),S=on(j,2),V=S[0],Y=S[1],q=Ed(!0),Q=on(q,3),X=Q[0],ee=Q[1],J=Q[2],Z=O.useRef([]),K=O.useCallback(function(z){var re=k.current;return Z.current.push(z),re&&z({scrollTop:re.scrollTop}),function(){var se=Z.current,ue=qV(se).call(se,z);~ue&&gK(se).call(se,ue,1)}},[Z,k]),L=O.useCallback(function(){var z=m.current;u(function(){var re;return Be(re=["%cSpineTo%c: %conEnd%c is fired."]).call(re,Se(Te("magenta")),Se(Te("orange")),[{animateTo:z}])}),f.current=Mn(),si(z,s)||ee(!1),g(null)},[m,u,f,s,g,ee]),ne=O.useCallback(function(z){var re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},se=re.behavior,ue=k.current;if(typeof z!="number"&&z!=="100%")return console.warn('react-scroll-to-bottom: Arguments passed to scrollTo() must be either number or "100%".');u(function(){var he;return[Be(he=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(he,Se(Te("lime","")),Se(Te("purple"))),{behavior:se,nextAnimateTo:z,target:ue}]}),se==="auto"?(L(),ue&&(ue.scrollTop=z==="100%"?ue.scrollHeight-ue.offsetHeight:z)):(se!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollTo". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),g(z)),si(z,s)&&(u(function(){var he;return[Be(he=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(he,Se(Te("lime","")),Se(Te("purple"))),[{mode:s,nextAnimateTo:z}]]}),ee(!0))},[u,L,s,g,ee,k]),ae=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=z.behavior;u(function(){var se;return Be(se=["%cscrollToBottom%c: Called"]).call(se,Se(Te("yellow","")))}),re!=="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.'),ne("100%",{behavior:re||"smooth"})},[u,ne]),te=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=z.behavior;u(function(){var se;return Be(se=["%cscrollToTop%c: Called"]).call(se,Se(Te("yellow","")))}),re!=="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.'),ne(0,{behavior:re||"smooth"})},[u,ne]),de=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=z.behavior;u(function(){var ue;return Be(ue=["%cscrollToEnd%c: Called"]).call(ue,Se(Te("yellow","")))}),re!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToEnd". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:re||"smooth"};s===Kt?te(se):ae(se)},[u,s,ae,te]),me=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},re=z.behavior;u(function(){var ue;return Be(ue=["%cscrollToStart%c: Called"]).call(ue,Se(Te("yellow","")))}),re!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToStart". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.');var se={behavior:re||"smooth"};s===Kt?ae(se):te(se)},[u,s,ae,te]),De=O.useCallback(function(){var z=k.current;if(z){if(p.current==="auto"){u(function(){var nt;return Be(nt=["%ctarget changed%c: Initial scroll"]).call(nt,Se(Te("blue")))}),z.scrollTop=s===Kt?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var re=$.current,se=z.offsetHeight,ue=z.scrollHeight,he=z.scrollTop,We=s===Kt?0:Math.max(0,ue-se-he),He=Math.max(0,re-he),gt=c({maxValue:We,minValue:He,offsetHeight:se,scrollHeight:ue,scrollTop:he}),tt=Math.max(0,Math.min(We,gt)),Ie;s===Kt||tt!==We?Ie=he+tt:Ie="100%",u(function(){var nt,Ge,Bn;return[Be(nt=[Be(Ge=Be(Bn="%cscrollToSticky%c: Will animate from %c".concat(re,"px%c to %c")).call(Bn,typeof Ie=="number"?Ie+"px":Ie.replace(/%/g,"%%"),"%c (%c")).call(Ge,(Ie==="100%"?We:Ie)+re,"px%c)")]).call(nt,Se(Te("orange")),Se(Te("purple")),Se(Te("purple")),Se(Te("purple"))),{animateFrom:re,maxValue:We,minValue:He,nextAnimateTo:Ie,nextValue:tt,offsetHeight:se,rawNextValue:gt,scrollHeight:ue,scrollTop:he}]}),ne(Ie,{behavior:"smooth"})}},[$,u,s,c,ne,k]),Ue=O.useCallback(function(z){var re,se=z.timeStampLow,ue=m.current,he=k.current,We=ue!==null;if(!(se<=f.current||!he)){var He=ox({mode:s,target:he}),gt=He.atBottom,tt=He.atEnd,Ie=He.atStart,nt=He.atTop;N(gt),G(tt),Y(Ie),P(nt);var Ge=he.offsetHeight,Bn=he.scrollHeight,fE=R.current,dE=H.current,ep=Ge!==fE,tp=Bn!==dE;if(ep&&(R.current=Ge),tp&&(H.current=Bn),!ep&&!tp){var _s=We&&si(ue,s)||tt;J.current!==_s&&(u(function(){var or,pE,hE,vE;return[Be(or=["%conScroll%c: %csetSticky%c(%c".concat(_s,"%c)")]).call(or,Se(Te("red")),Se(Te("red")),Se(Te("purple"))),Be(pE=[Be(hE=Be(vE="(animating = %c".concat(We,"%c && isEnd = %c")).call(vE,si(ue,s),"%c) || atEnd = %c")).call(hE,tt,"%c")]).call(pE,Se(Te("purple")),Se(Te("purple")),Se(Te("purple")),[{animating:We,animateTo:ue,atEnd:tt,mode:s,offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:J.current,nextSticky:_s}])]}),ee(_s))}else J.current&&(u(function(){var or;return[Be(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,Se(Te("red")),Se(Te("orange")),[{offsetHeightChanged:ep,scrollHeightChanged:tp}]),{nextOffsetHeight:Ge,prevOffsetHeight:fE,nextScrollHeight:Bn,prevScrollHeight:dE}]}),De());var SQ=he.scrollTop;fs(re=Z.current).call(re,function(or){return or({scrollTop:SQ})})}},[m,u,f,s,R,H,Z,De,N,G,Y,P,ee,J,k]);O.useEffect(function(){if(A){var z=!1,re=Hq(function(){var se=k.current,ue=m.current!==null;J.current?ox({mode:s,target:se}).atEnd?z=!1:z?Mn()-z>Wq&&(ue||($.current=se.scrollTop,u(function(){var he;return Be(he=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(he,Se(Te("navy")),Se(Te("orange")))}),De()),z=!1):z=Mn():se.scrollHeight<=se.offsetHeight&&!J.current&&(u(function(){var he;return[Be(he=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(he,Se(Te("navy")),Se(Te("purple"))),[{offsetHeight:se.offsetHeight,scrollHeight:se.scrollHeight,sticky:J.current}]]}),ee(!0))},Math.max(tx,n)||tx);return function(){return clearInterval(re)}}},[m,n,u,s,De,ee,J,A,k]);var dt=O.useMemo(function(){var z=rx[l]||(rx[l]=Y7({key:"react-scroll-to-bottom--css-"+mq(),nonce:l}));return function(re){return z.css(re)+""}},[l]),mt=O.useMemo(function(){return{observeScrollPosition:K,setTarget:x,styleToClassName:dt}},[K,x,dt]),pt=O.useMemo(function(){return{atBottom:F,atEnd:M,atStart:V,atTop:y,mode:s}},[F,M,V,y,s]),ie=O.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&si(h,s),sticky:X}},[h,s,X]),ce=O.useMemo(function(){return ex(ex({},pt),ie)},[pt,ie]),W=O.useMemo(function(){return{scrollTo:ne,scrollToBottom:ae,scrollToEnd:de,scrollToStart:me,scrollToTop:te}},[ne,ae,de,me,te]);return O.useEffect(function(){if(A){var z=function(){H.current=A.scrollHeight};return A.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return A.removeEventListener("focus",z)}}},[A]),u(function(){var z;return[Be(z=["%cRender%c: Render"]).call(z,Se(Te("cyan",""))),{animateTo:h,animating:h!==null,sticky:X,target:A}]}),O.createElement(Qa.Provider,{value:mt},O.createElement(Ef.Provider,{value:W},O.createElement(Af.Provider,{value:ce},O.createElement(kf.Provider,{value:pt},O.createElement(Cf.Provider,{value:ie},r,A&&O.createElement(J0,{debounce:o,name:"scroll",onEvent:Ue,target:A}),A&&h!==null&&O.createElement(Z0,{name:"scrollTop",onEnd:L,target:A,value:h}))))))};kd.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:zq},kd.propTypes={checkInterval:xe.number,children:xe.any,debounce:xe.number,debug:xe.bool,initialScrollBehavior:xe.oneOf(["auto","smooth"]),mode:xe.oneOf(["bottom","top"]),nonce:xe.string,scroller:xe.func};var Vq={height:"100%",overflowY:"auto",width:"100%"},Cd=function(t){var n=t.children,r=t.className,o=O.useContext(Qa),i=o.setTarget,a=$f()(Vq);return O.createElement("div",{className:mf(a,(r||"")+""),ref:i},n)};Cd.defaultProps={children:void 0,className:void 0},Cd.propTypes={children:xe.any,className:xe.string};var Kq={position:"relative"},Ad=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=$f()(Kq);return O.createElement("div",{className:mf(a,(r||"")+"")},O.createElement(Cd,{className:(i||"")+""},n),O.createElement(Tf,{className:(o||"")+""}))};Ad.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},Ad.propTypes={children:xe.any,className:xe.string,followButtonClassName:xe.string,scrollViewClassName:xe.string};var $d=function(t){var n=t.checkInterval,r=t.children,o=t.className,i=t.debounce,a=t.debug,s=t.followButtonClassName,l=t.initialScrollBehavior,c=t.mode,u=t.nonce,f=t.scroller,p=t.scrollViewClassName;return O.createElement(kd,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},O.createElement(Ad,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};$d.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},$d.propTypes={checkInterval:xe.number,children:xe.any,className:xe.string,debounce:xe.number,debug:xe.bool,followButtonClassName:xe.string,initialScrollBehavior:xe.oneOf(["auto","smooth"]),mode:xe.oneOf(["bottom","top"]),nonce:xe.string,scroller:xe.func,scrollViewClassName:xe.string},XN();let ix=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");const Td=O.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:o,botAvatar:i,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:c,showMarquee:u=!0,showDateSystemMessage:f=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:v=!1,...h})=>{var A;const{messageList:g}=ve,m=O.useMemo(()=>f?zE(t):t,[t]),b=O.useMemo(()=>{var k;const x=m.filter($=>$.direction==="outgoing"&&$.status!=="pending");return(k=x[x.length-1])==null?void 0:k.id},[m]),w=x=>{if(x.direction==="incoming")return d;if(x.direction==="outgoing")return v};return E.jsxs($d,{...h,className:Ao(g.container.className,e),followButtonClassName:g.scrollDownButton.className,scrollViewClassName:g.viewPort.className,children:[r&&E.jsx("span",{...g.headerMessage,children:r}),u&&E.jsx(JN,{botAvatar:i,botDescription:a,botName:s}),m.map(x=>{var k;return E.jsx(Qc,{renderers:o,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:p&&x.id===b,showAvatar:w(x),...x},((k=x.metadata)==null?void 0:k.clientMessageId)||x.id)}),n&&E.jsx(Qc,{id:ix(),renderers:o,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((A=t.filter(x=>x.direction==="incoming").at(-1))==null?void 0:A.sender)??{name:s||"Bot",avatar:i},children:E.jsx(Yc,{})})]})});Td.displayName="MessageList";const qq=({className:e,...t})=>{const{className:n}=ve.loader;return E.jsx("div",{...t,className:Ao(e,n)})};function ax({error:e,restartConversation:t,closeWindow:n}){let r,o;const{error:i}=ve;return e.type==="configuration"?(r="Configuration error",o=E.jsx(tP,{...i.icon})):e.type==="bot"?(r="Bot error",o=E.jsx(Zv,{...i.icon})):e.type==="network"?(r="Network error",o=E.jsx(uP,{...i.icon})):e.type==="disconnected"?(r="Disconnected",o=E.jsx(sP,{...i.icon})):(r="Unexpected error",o=E.jsx(Zv,{...i.icon})),E.jsx(Gq,{error:e,title:r,icon:o,restartConversation:t,closeWindow:n})}function Gq({error:e,title:t,icon:n,restartConversation:r,closeWindow:o}){const{error:i}=ve;return E.jsxs("div",{...i.container,children:[E.jsxs("div",{...i.header.container,children:[`Webchat ${e.type} error`,E.jsxs("div",{...i.header.actions,children:[r&&E.jsx(Gc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),o&&E.jsx(Wy,{onClick:o,style:{color:"white",backgroundColor:"transparent"}})]})]}),E.jsxs("div",{...i.content,children:[n,E.jsx("div",{...i.errorTitle,children:t}),E.jsx("div",{...i.errorMessage,children:e.message}),e.id&&E.jsx("div",{...i.id,children:e.id})]})]})}const sx=({connected:e,configuration:t,isTyping:n,messages:r,user:o,isLoading:i,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:c,error:u,participants:f,closeWindow:p,sendMessage:d,uploadFile:v,addMessageFeedback:h,restartConversation:g,clientId:m,storageKey:b,soundOn:w,toggleSound:A,...x})=>{const{color:k,fontFamily:$,radius:R,themeMode:H,variant:T,headerVariant:_,botAvatar:F,botDescription:N,botName:B,composerPlaceholder:D,footer:M,feedbackEnabled:G,additionalStylesheetUrl:U}=t,I={color:k,fontFamily:$,radius:R,themeMode:H,variant:T,headerVariant:_,additionalStylesheetUrl:U};G||(h=void 0);const y=O.useMemo(()=>o?Dp(r,f,o.id,B,F):[],[F,B,r,o,f]),P=S=>(S==null?void 0:S.type)==="network"||(S==null?void 0:S.type)==="disconnected",j=()=>{P(u)&&typeof navigator<"u"&&navigator.onLine&&g&&g()};return O.useEffect(()=>{if(g)return window.addEventListener("online",j),()=>{window.removeEventListener("online",j)}},[u,g]),O.useEffect(()=>{if(!P(u)||!g)return;const S=window.setInterval(()=>{j()},3e3);return()=>{window.clearInterval(S)}},[u,g]),E.jsxs(E.Fragment,{children:[E.jsx(_y,{...I}),E.jsx(jc,{connected:e,allowFileUpload:c,uploadFile:v,storageKey:b,...x,children:u?E.jsx(ax,{error:u,restartConversation:g,closeWindow:p}):E.jsxs(E.Fragment,{children:[E.jsx(Hy,{closeWindow:p,configuration:t,restartConversation:g,clientId:m,soundOn:w,toggleSound:A}),i?E.jsx(qq,{}):E.jsx(Td,{botAvatar:F,botDescription:N,botName:B,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:y}),E.jsx(Xg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:M,composerPlaceholder:D,allowFileUpload:c,storageKey:b})]})})]})};function Yq(){const[e,t]=O.useState(!1),n=O.useRef(null);return{isTyping:e,setIsTyping:(r,o)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!o)return()=>{};const i=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>o&&t(!1)},o+100);return()=>clearTimeout(i)}}}var Qq=Object.defineProperty,Jq=(e,t,n)=>t in e?Qq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zq=(e,t,n)=>Jq(e,t+"",n),Xq=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},eG={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},tG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},nG=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},rG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},lx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let s=(e?o:o.map(l=>encodeURIComponent(l))).join(nG(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let i=tG(r),a=o.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):Ss({allowReserved:e,name:n,value:s})).join(i);return r==="label"||r==="matrix"?i+a:a},Ss=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},cx=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(o instanceof Date)return`${n}=${o.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(o).forEach(([c,u])=>{s=[...s,c,e?u:encodeURIComponent(u)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let i=rG(r),a=Object.entries(o).map(([s,l])=>Ss({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(i);return r==="label"||r==="matrix"?i+a:a},oG=/\{[^{}]+\}/g,iG=({path:e,url:t})=>{let n=t,r=t.match(oG);if(r)for(let o of r){let i=!1,a=o.substring(1,o.length-1),s="simple";a.endsWith("*")&&(i=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(o,lx({explode:i,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(o,cx({explode:i,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(o,`;${Ss({name:a,value:l})}`);continue}let c=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(o,c)}return n},ux=({allowReserved:e,array:t,object:n}={})=>r=>{let o=[];if(r&&typeof r=="object")for(let i in r){let a=r[i];if(a!=null){if(Array.isArray(a)){o=[...o,lx({allowReserved:e,explode:!0,name:i,style:"form",value:a,...t})];continue}if(typeof a=="object"){o=[...o,cx({allowReserved:e,explode:!0,name:i,style:"deepObject",value:a,...n})];continue}o=[...o,Ss({allowReserved:e,name:i,value:a})]}}return o.join("&")},aG=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},sG=async({security:e,...t})=>{for(let n of e){let r=await Xq(n,t.auth);if(!r)continue;let o=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[o]=r;break;case"cookie":t.headers.append("Cookie",`${o}=${r}`);break;case"header":default:t.headers.set(o,r);break}return}},fx=e=>lG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:ux(e.querySerializer),url:e.url}),lG=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{let i=o.startsWith("/")?o:`/${o}`,a=(e??"")+i;t&&(a=iG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},dx=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=px(e.headers,t.headers),r},px=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[o,i]of r)if(i===null)t.delete(o);else if(Array.isArray(i))for(let a of i)t.append(o,a);else i!==void 0&&t.set(o,typeof i=="object"?JSON.stringify(i):i)}return t},Od=class{constructor(){Zq(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},cG=()=>({error:new Od,request:new Od,response:new Od}),uG=ux({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),fG={"Content-Type":"application/json"},hx=(e={})=>({...eG,headers:fG,parseAs:"auto",querySerializer:uG,...e}),dG=(e={})=>{let t=dx(hx(),e),n=()=>({...t}),r=a=>(t=dx(t,a),n()),o=cG(),i=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:px(t.headers,a.headers)};s.security&&await sG({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=fx(s),c={redirect:"follow",...s},u=new Request(l,c);for(let g of o.request._fns)u=await g(u,s);let f=s.fetch,p=await f(u);for(let g of o.response._fns)p=await g(p,u,s);let d={request:u,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?aG(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let m=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(m),s.responseTransformer&&(m=await s.responseTransformer(m))),{data:m,...d}}let v=await p.text();try{v=JSON.parse(v)}catch{}let h=v;for(let g of o.error._fns)h=await g(v,p,u,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:fx,connect:a=>i({...a,method:"CONNECT"}),delete:a=>i({...a,method:"DELETE"}),get:a=>i({...a,method:"GET"}),getConfig:n,head:a=>i({...a,method:"HEAD"}),interceptors:o,options:a=>i({...a,method:"OPTIONS"}),patch:a=>i({...a,method:"PATCH"}),post:a=>i({...a,method:"POST"}),put:a=>i({...a,method:"PUT"}),request:i,setConfig:r,trace:a=>i({...a,method:"TRACE"})}},pG=dG,hG=hx;const Oe=pG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(hG({baseUrl:"https://webchat.botpress.cloud/"}))),vG=e=>(e.client??Oe).delete({url:"/conversations/{id}",...e}),mG=e=>(e.client??Oe).get({url:"/conversations/{id}",...e}),gG=e=>(e.client??Oe).get({url:"/conversations",...e}),yG=e=>(e.client??Oe).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),bG=e=>(e.client??Oe).get({url:"/conversations/{id}/messages",...e}),wG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants",...e}),SG=e=>(e.client??Oe).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Oe).delete({url:"/conversations/{id}/participants/{userId}",...e}),EG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants/{userId}",...e}),kG=e=>(e.client??Oe).delete({url:"/messages/{id}",...e}),CG=e=>(e.client??Oe).get({url:"/messages/{id}",...e}),AG=e=>(e.client??Oe).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),$G=e=>(e.client??Oe).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),TG=e=>(e.client??Oe).delete({url:"/messages/{id}/feedback",...e}),OG=e=>(e.client??Oe).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),IG=e=>(e.client??Oe).delete({url:"/users/me",...e}),PG=e=>(e.client??Oe).get({url:"/users/me",...e}),DG=e=>(e.client??Oe).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),_G=e=>((e==null?void 0:e.client)??Oe).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),MG=e=>((e==null?void 0:e.client)??Oe).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),NG=e=>(e.client??Oe).get({url:"/events/{id}",...e}),RG=e=>(e.client??Oe).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),LG=e=>(e.client??Oe).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let vx=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function Id(e){}function FG(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Id,onError:n=Id,onRetry:r=Id,onComment:o}=e;let i="",a=!0,s,l="",c="";function u(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=BG(`${i}${g}`);for(const w of m)f(w);i=b,a=!1}function f(h){if(h===""){d();return}if(h.startsWith(":")){o&&o(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const m=h.slice(0,g),b=h[g+1]===" "?2:1,w=h.slice(g+b);p(m,w,h);return}p(h,"",h)}function p(h,g,m){switch(h){case"event":c=g;break;case"data":l=`${l}${g}
|
|
290
|
-
`;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new vx(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:m}));break;default:n(new vx(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:m}));break}}function d(){l.length>0&&t({id:s,event:c||void 0,data:l.endsWith(`
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
`&&r++}}return[t,n]}class mx extends Event{constructor(t,n){var r,o;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(o=n==null?void 0:n.message)!=null?o:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(gx(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(gx(this),n)}}function jG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Pd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Pd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Pd(e.cause)}`:e.message:`${e}`}function gx(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var yx=e=>{throw TypeError(e)},Dd=(e,t,n)=>t.has(e)||yx("Cannot "+n),ye=(e,t,n)=>(Dd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?yx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(Dd(e,t,"write to private field"),t.set(e,n),n),yn=(e,t,n)=>(Dd(e,t,"access private method"),n),Et,nr,jr,xs,Es,li,zr,ci,Rn,Ur,Wr,Hr,ui,qt,_d,Md,Nd,bx,Rd,Ld,fi,Fd,Bd;class ks extends EventTarget{constructor(t,n){var r,o;super(),Ze(this,qt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ze(this,Et),Ze(this,nr),Ze(this,jr),Ze(this,xs),Ze(this,Es),Ze(this,li),Ze(this,zr),Ze(this,ci,null),Ze(this,Rn),Ze(this,Ur),Ze(this,Wr,null),Ze(this,Hr,null),Ze(this,ui,null),Ze(this,Md,async i=>{var a;ye(this,Ur).reset();const{body:s,redirected:l,status:c,headers:u}=i;if(c===204){yn(this,qt,fi).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Re(this,jr,new URL(i.url)):Re(this,jr,void 0),c!==200){yn(this,qt,fi).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){yn(this,qt,fi).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(ye(this,Et)===this.CLOSED)return;Re(this,Et,this.OPEN);const f=new Event("open");if((a=ye(this,ui))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){yn(this,qt,fi).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const p=new TextDecoder,d=s.getReader();let v=!0;do{const{done:h,value:g}=await d.read();g&&ye(this,Ur).feed(p.decode(g,{stream:!h})),h&&(v=!1,ye(this,Ur).reset(),yn(this,qt,Fd).call(this))}while(v)}),Ze(this,Nd,i=>{Re(this,Rn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&yn(this,qt,Fd).call(this,Pd(i))}),Ze(this,Rd,i=>{typeof i.id=="string"&&Re(this,ci,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:ye(this,jr)?ye(this,jr).origin:ye(this,nr).origin,lastEventId:i.id||""});ye(this,Hr)&&(!i.event||i.event==="message")&&ye(this,Hr).call(this,a),this.dispatchEvent(a)}),Ze(this,Ld,i=>{Re(this,li,i)}),Ze(this,Bd,()=>{Re(this,zr,void 0),ye(this,Et)===this.CONNECTING&&yn(this,qt,_d).call(this)});try{if(t instanceof URL)Re(this,nr,t);else if(typeof t=="string")Re(this,nr,new URL(t,zG()));else throw new Error("Invalid URL")}catch{throw jG("An invalid or illegal string was specified")}Re(this,Ur,FG({onEvent:ye(this,Rd),onRetry:ye(this,Ld)})),Re(this,Et,this.CONNECTING),Re(this,li,3e3),Re(this,Es,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Re(this,xs,(o=n==null?void 0:n.withCredentials)!=null?o:!1),yn(this,qt,_d).call(this)}get readyState(){return ye(this,Et)}get url(){return ye(this,nr).href}get withCredentials(){return ye(this,xs)}get onerror(){return ye(this,Wr)}set onerror(t){Re(this,Wr,t)}get onmessage(){return ye(this,Hr)}set onmessage(t){Re(this,Hr,t)}get onopen(){return ye(this,ui)}set onopen(t){Re(this,ui,t)}addEventListener(t,n,r){const o=n;super.addEventListener(t,o,r)}removeEventListener(t,n,r){const o=n;super.removeEventListener(t,o,r)}close(){ye(this,zr)&&clearTimeout(ye(this,zr)),ye(this,Et)!==this.CLOSED&&(ye(this,Rn)&&ye(this,Rn).abort(),Re(this,Et,this.CLOSED),Re(this,Rn,void 0))}}Et=new WeakMap,nr=new WeakMap,jr=new WeakMap,xs=new WeakMap,Es=new WeakMap,li=new WeakMap,zr=new WeakMap,ci=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,ui=new WeakMap,qt=new WeakSet,_d=function(){Re(this,Et,this.CONNECTING),Re(this,Rn,new AbortController),ye(this,Es)(ye(this,nr),yn(this,qt,bx).call(this)).then(ye(this,Md)).catch(ye(this,Nd))},Md=new WeakMap,Nd=new WeakMap,bx=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ye(this,ci)?{"Last-Event-ID":ye(this,ci)}:void 0},cache:"no-store",signal:(e=ye(this,Rn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Rd=new WeakMap,Ld=new WeakMap,fi=function(e,t){var n;ye(this,Et)!==this.CLOSED&&Re(this,Et,this.CLOSED);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r)},Fd=function(e,t){var n;if(ye(this,Et)===this.CLOSED)return;Re(this,Et,this.CONNECTING);const r=new mx("error",{code:t,message:e});(n=ye(this,Wr))==null||n.call(this,r),this.dispatchEvent(r),Re(this,zr,setTimeout(ye(this,Bd),ye(this,li)))},Bd=new WeakMap,ks.CONNECTING=0,ks.OPEN=1,ks.CLOSED=2;function zG(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function wx(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const UG=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var o;return(o=e[t])==null?void 0:o.delete(n)}},emit:(t,n)=>{var r,o;(r=e[t])==null||r.forEach(i=>i(n)),(o=e["*"])==null||o.forEach(i=>i({type:t,payload:n}))}}},je=e=>e.data,WG=10,HG=3e3,VG="60000",Sx={throwOnError:!0},KG=async({clientId:e,apiUrl:t,adminSecret:n,customHeaders:r,...o})=>{const i=`${t||Oe.getConfig().baseUrl}/${e}`;Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(wx);const a={...Sx,baseUrl:i},s={...n?{"x-admin-secret":n}:{},...r};return _G({...a,headers:Object.keys(s).length>0?s:void 0,body:o}).then(je)},qG=({userKey:e,clientId:t,apiUrl:n,customHeaders:r})=>{const o={"x-user-key":e,...r},i=`${n||Oe.getConfig().baseUrl}/${t}`,a={...Sx,baseUrl:i};return Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(wx),{createConversation:()=>yG({...a,headers:o,body:{}}).then(je),getConversation:({conversationId:s})=>mG({...a,headers:o,path:{id:s}}).then(je),deleteConversation:({conversationId:s})=>vG({...a,headers:o,path:{id:s}}).then(je),listConversations:({nextToken:s})=>gG({...a,headers:o,query:{nextToken:s}}).then(je),listConversationMessages:({conversationId:s,nextToken:l})=>bG({...a,headers:o,path:{id:s},query:{nextToken:l}}).then(je),addParticipant:({conversationId:s,userId:l})=>SG({...a,headers:o,path:{id:s},body:{userId:l}}).then(je),removeParticipant:({conversationId:s,userId:l})=>xG({...a,headers:o,path:{id:s,userId:l}}).then(je),getParticipant:({conversationId:s,userId:l})=>EG({...a,headers:o,path:{id:s,userId:l}}).then(je),listParticipants:({conversationId:s,nextToken:l})=>wG({...a,headers:o,path:{id:s},query:{nextToken:l}}).then(je),createMessage:s=>$G({...a,headers:o,body:s}).then(je),updateMessage:({messageId:s,...l})=>AG({...a,headers:o,path:{id:s},body:l}).then(je),getMessage:({messageId:s})=>CG({...a,headers:o,path:{id:s}}).then(je),deleteMessage:({messageId:s})=>kG({...a,headers:o,path:{id:s}}).then(je),createFile:s=>LG({...a,headers:o,body:s}).then(je),getUser:()=>PG({...a,headers:o}).then(je),updateUser:s=>DG({...a,headers:o,body:s}).then(je),deleteUser:()=>IG({...a,headers:o}).then(je),createEvent:s=>RG({...a,headers:o,body:s}).then(je),getEvent:({eventId:s})=>NG({...a,headers:o,path:{id:s}}).then(je),addMessageFeedback:({messageId:s,...l})=>OG({...a,headers:o,path:{id:s},body:l}).then(je),removeMessageFeedback:({messageId:s})=>TG({...a,headers:o,path:{id:s}}).then(je),generateUserKey:({adminSecret:s,...l})=>MG({...a,headers:{"x-admin-secret":s},body:l}).then(je),listenConversation:({conversationId:s})=>{let l=0,c=null;const u=UG(),f=()=>{c&&c.close();const p=`${i}/conversations/${s}/listen`;c=YG(p,o),c.onopen=()=>u.emit("open"),c.onerror=d=>{l<WG?(l++,setTimeout(()=>f(),HG)):u.emit("error",d)},c.onmessage=d=>{const v=GG(d.data);u.emit(v.type,v.data)}};return f(),u.on}}},GG=e=>{try{return JSON.parse(e)}catch{return e}},YG=(e,t)=>new ks(e,{fetch:(n,r)=>fetch(n,{...r,headers:{...r==null?void 0:r.headers,...t,timeout:VG}})}),xx={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ns&&Ns.tagName.toUpperCase()==="SCRIPT"&&Ns.src||new URL("index.umd.cjs",document.baseURI).href).href};function Ex({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:o,soundEnabled:i,...a}){var Z,K;const s=km(n,r),l=s(L=>L.conversationId),c=s(L=>L.user),u=s(L=>L.setConversationId),f=s(L=>L.setUser),p=Hn(L=>L.messages),d=Hn(L=>L.saveMessage),v=Hn(L=>L.updateMessage),h=Hn(L=>L.fetchMessages),g=Hn(L=>L.setMessages),m=Hn(L=>L.clearMessages),b=Hn(L=>L.isFetching),w=ho(L=>L.participants),A=ho(L=>L.setParticipants),x=ho(L=>L.addParticipant),k=ho(L=>L.removeParticipant),$=ho(L=>L.clearParticipants),R=Am(`webchat-sound-${t}`),H=R(L=>L.soundOn),T=R(L=>L.toggleSound),{isTyping:_,setIsTyping:F}=Yq(),N=O.useMemo(()=>Rp(),[]),[B,D]=O.useState("connecting"),[M,G]=O.useState(a.conversationId),[U,I]=O.useState(a.user),[y,P]=O.useState(void 0),[j,S]=O.useState(void 0),V=O.useRef(!1),Y=O.useRef(null),q=O.useRef(i??!1);O.useEffect(()=>{q.current=i??!1},[i]);const Q=O.useRef(H);O.useEffect(()=>{Q.current=H},[H]);const X=async()=>{if(!V.current){V.current=!0,S(void 0),F(!1),D("connecting");try{const L=a.user||c;let ne=L;if(!ne){const{key:de,user:me}=await KG({clientId:t,apiUrl:e,adminSecret:o});ne={userId:me.id,userToken:de}}const ae=qG({userKey:ne.userToken,clientId:t,apiUrl:e});let te=a.conversationId||l;if(!te||!L){m(),$();const{conversation:de}=await ae.createConversation();te=de.id}else{const de=await h({client:ae,conversationId:te});g(de);const{participants:me}=await ae.listParticipants({conversationId:te});A(me)}I(ne),f(ne),P(ae),G(te),u(te),Y.current=new Audio,Y.current.preload="auto",Y.current.src=xx.chatMessageNotification,Y.current.volume=.9,D("connected")}catch(L){m(),S(di(L)),D("error")}finally{V.current=!1}}};Pm(async()=>{const L=QG(t,e);if(L){S(L),D("error");return}await X()},[(Z=a.user)==null?void 0:Z.userId,(K=a.user)==null?void 0:K.userToken,a.conversationId]);const ee=async()=>{await X()};if(O.useEffect(()=>{if(!y||!M)return;const L=y.listenConversation({conversationId:M}),ne=[L("open",async()=>{var te,de;S(void 0);const{event:ae}=await y.createEvent({conversationId:M,payload:{type:"conversation_started",data:{}}});(de=(te=ae.payload.data)==null?void 0:te.status)!=null&&de.isInitial&&N.emit("conversation",M),D("connected")}),L("error",ae=>{S(te=>te||di(ae)),D("error"),N.emit("error",new Error(`Connection to conversation lost: ${ae==null?void 0:ae.message}`))}),L("message_created",ae=>{const te=Ri(ae);(U==null?void 0:U.userId)!==te.authorId&&(q.current&&Q.current&&Y.current&&Y.current.play().catch(()=>{}),F(!1),N.emit("isTyping",{isTyping:!1,timeout:0})),d(te),N.emit("message",te)}),L("message_status_changed",ae=>{var te;ae.newStatus==="processing"&&(F(!0),N.emit("isTyping",{isTyping:!0,timeout:5e3}),v((te=ae.message.metadata)==null?void 0:te.clientMessageId,{status:ae.newStatus}))}),L("participant_added",ae=>{x(ae.participant),N.emit("participantAdded",ae.participant)}),L("participant_removed",ae=>{k(ae.participantId),N.emit("participantRemoved",ae.participantId)}),L("webchat_visibility",ae=>N.emit("webchatVisibility",ae.visibility)),L("webchat_config",ae=>N.emit("webchatConfig",ae.config)),L("custom",ae=>N.emit("customEvent",ae.event))];return()=>{ne.forEach(ae=>ae())}},[M,y]),B!=="connected"||!U||!M||!y)return{clientState:B,on:N.on,client:void 0,messages:[],conversationId:void 0,newConversation:ee,user:void 0,isTyping:void 0,isFetchingMessages:b,participants:[],toggleSound:T,soundOn:H,error:j};const J={sendMessage:async L=>{const ne=ix(),ae={id:ne,createdAt:new Date().toISOString(),userId:U.userId,conversationId:M,payload:L,metadata:{clientMessageId:ne,delivered:!1}},te=Ri(ae);te.status="pending",d(te),await y.createMessage({conversationId:M,payload:L,metadata:{clientMessageId:ne}}).catch(de=>N.emit("error",de))},sendEvent:async(L,ne)=>{await y.createEvent({conversationId:M,payload:{type:"custom",data:L},bindConversation:(ne==null?void 0:ne.bindConversation)??!0,bindUser:(ne==null?void 0:ne.bindUser)??!0})},uploadFile:async L=>{const{size:ne,name:ae}=L,de=await(ie=>new Promise((ce,W)=>{const z=new FileReader;z.onload=re=>{var se;return ce((se=re.target)==null?void 0:se.result)},z.onerror=re=>{var se;return W((se=re.target)==null?void 0:se.error)},z.readAsArrayBuffer(ie)}))(L),me=new Date;me.setDate(me.getDate()+30);const{file:{uploadUrl:De,contentType:Ue,url:dt}}=await y.createFile({size:ne,key:ae,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:me.toISOString()});await fetch(De,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Ue},body:de});const mt=Ue.split("/").shift()??"",pt=dp(mt)?mt:"file";return{fileUrl:dt,name:ae,type:pt}},addMessageFeedback:async(L,ne)=>{v(L,{feedback:ne.value}),await y.addMessageFeedback({messageId:L,...ne})},getUser:async()=>{const{user:L}=await y.getUser();return L},updateUser:async L=>{const{user:ne}=await y.updateUser({name:L.name,pictureUrl:L.pictureUrl,userData:L.data});return ne}};return{clientState:"connected",on:N.on,client:J,messages:p,conversationId:M,newConversation:async()=>{try{m(),$(),F(!1);const{conversation:L}=await y.createConversation();G(L.id),u(L.id)}catch(L){S(di(L)),D("error")}},user:c,isTyping:_,isFetchingMessages:b,participants:w,error:j,soundOn:H,toggleSound:T}}const QG=(e,t)=>{if(!e)return{type:"configuration",message:pp};if(!URL.canParse(t))return{type:"configuration",message:hp}},JG=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:o,user:i,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:c,client:u,isFetchingMessages:f,isTyping:p,newConversation:d,messages:v,participants:h,user:g,error:m,soundOn:b,toggleSound:w}=Ex({clientId:e,apiUrl:o,conversationId:a,user:i,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:x,addMessageFeedback:k}=u??{};return E.jsx(sx,{configuration:n??{},user:g!=null&&g.userId?{id:g==null?void 0:g.userId}:void 0,isLoading:f||c==="connecting",isTyping:p,connected:c==="connected"?!0:c==="disconnected"?!1:void 0,messages:v,sendMessage:A,uploadFile:x,addMessageFeedback:k,allowFileUpload:r,restartConversation:d,...s,participants:h,error:m,clientId:e,soundOn:b,toggleSound:w})};var jd=C.forwardRef((e,t)=>{const{children:n,...r}=e,o=C.Children.toArray(n),i=o.find(XG);if(i){const a=i.props.children,s=o.map(l=>l===i?C.Children.count(a)>1?C.Children.only(null):C.isValidElement(a)?a.props.children:null:l);return E.jsx(zd,{...r,ref:t,children:C.isValidElement(a)?C.cloneElement(a,void 0,s):null})}return E.jsx(zd,{...r,ref:t,children:n})});jd.displayName="Slot";var zd=C.forwardRef((e,t)=>{const{children:n,...r}=e;if(C.isValidElement(n)){const o=tY(n),i=eY(r,n.props);return n.type!==C.Fragment&&(i.ref=t?zc(t,o):o),C.cloneElement(n,i)}return C.Children.count(n)>1?C.Children.only(null):null});zd.displayName="SlotClone";var ZG=({children:e})=>E.jsx(E.Fragment,{children:e});function XG(e){return C.isValidElement(e)&&e.type===ZG}function eY(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{i(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function tY(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var nY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=nY.reduce((e,t)=>{const n=C.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?jd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),E.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function rY(e,t){e&&op.flushSync(()=>e.dispatchEvent(t))}function oY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e);C.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var iY="DismissableLayer",Ud="dismissableLayer.update",aY="dismissableLayer.pointerDownOutside",sY="dismissableLayer.focusOutside",kx,Cx=C.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ax=C.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=C.useContext(Cx),[u,f]=C.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=C.useState({}),v=On(t,$=>f($)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=h.indexOf(g),b=u?h.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,A=b>=m,x=uY($=>{const R=$.target,H=[...c.branches].some(T=>T.contains(R));!A||H||(o==null||o($),a==null||a($),$.defaultPrevented||s==null||s())},p),k=fY($=>{const R=$.target;[...c.branches].some(T=>T.contains(R))||(i==null||i($),a==null||a($),$.defaultPrevented||s==null||s())},p);return oY($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},p),C.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(kx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),$x(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=kx)}},[u,p,n,c]),C.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),$x())},[u,c]),C.useEffect(()=>{const $=()=>d({});return document.addEventListener(Ud,$),()=>document.removeEventListener(Ud,$)},[]),E.jsx(Ln.div,{...l,ref:v,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,k.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,x.onPointerDownCapture)})});Ax.displayName=iY;var lY="DismissableLayerBranch",cY=C.forwardRef((e,t)=>{const n=C.useContext(Cx),r=C.useRef(null),o=On(t,r);return C.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),E.jsx(Ln.div,{...e,ref:o})});cY.displayName=lY;function uY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1),o=C.useRef(()=>{});return C.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){Tx(aY,n,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()}else t.removeEventListener("click",o.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",i),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function fY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=C.useRef(!1);return C.useEffect(()=>{const o=i=>{i.target&&!r.current&&Tx(sY,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function $x(){const e=new CustomEvent(Ud);document.dispatchEvent(e)}function Tx(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?rY(o,i):o.dispatchEvent(i)}var Wd="focusScope.autoFocusOnMount",Hd="focusScope.autoFocusOnUnmount",Ox={bubbles:!1,cancelable:!0},dY="FocusScope",Ix=C.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=C.useState(null),c=bn(o),u=bn(i),f=C.useRef(null),p=On(t,h=>l(h)),d=C.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;C.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const A=w.target;s.contains(A)?f.current=A:Fn(f.current,{select:!0})},g=function(w){if(d.paused||!s)return;const A=w.relatedTarget;A!==null&&(s.contains(A)||Fn(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&Fn(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(m);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),C.useEffect(()=>{if(s){_x.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Wd,Ox);s.addEventListener(Wd,c),s.dispatchEvent(m),m.defaultPrevented||(pY(yY(Px(s)),{select:!0}),document.activeElement===h&&Fn(s))}return()=>{s.removeEventListener(Wd,c),setTimeout(()=>{const m=new CustomEvent(Hd,Ox);s.addEventListener(Hd,u),s.dispatchEvent(m),m.defaultPrevented||Fn(h??document.body,{select:!0}),s.removeEventListener(Hd,u),_x.remove(d)},0)}}},[s,c,u,d]);const v=C.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,m=document.activeElement;if(g&&m){const b=h.currentTarget,[w,A]=hY(b);w&&A?!h.shiftKey&&m===A?(h.preventDefault(),n&&Fn(w,{select:!0})):h.shiftKey&&m===w&&(h.preventDefault(),n&&Fn(A,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return E.jsx(Ln.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Ix.displayName=dY;function pY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fn(r,{select:t}),document.activeElement!==n)return}function hY(e){const t=Px(e),n=Dx(t,e),r=Dx(t.reverse(),e);return[n,r]}function Px(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Dx(e,t){for(const n of e)if(!vY(n,{upTo:t}))return n}function vY(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 mY(e){return e instanceof HTMLInputElement&&"select"in e}function Fn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mY(e)&&t&&e.select()}}var _x=gY();function gY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Mx(e,t),e.unshift(t)},remove(t){var n;e=Mx(e,t),(n=e[0])==null||n.resume()}}}function Mx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function yY(e){return e.filter(t=>t.tagName!=="A")}var Vd=0;function bY(){C.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Nx()),document.body.insertAdjacentElement("beforeend",e[1]??Nx()),Vd++,()=>{Vd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Vd--}},[])}function Nx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Cs="right-scroll-bar-position",As="width-before-scroll-bar",wY="with-scroll-bars-hidden",SY="--removed-body-scroll-bar-size";function Kd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xY(e,t){var n=O.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var EY=typeof window<"u"?C.useLayoutEffect:C.useEffect,Rx=new WeakMap;function kY(e,t){var n=xY(null,function(r){return e.forEach(function(o){return Kd(o,r)})});return EY(function(){var r=Rx.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Kd(s,null)}),i.forEach(function(s){o.has(s)||Kd(s,a)})}Rx.set(n,e)},[e]),n}function CY(e){return e}function AY(e,t){t===void 0&&(t=CY);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(i){var a=t(i,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(i){for(r=!0;n.length;){var a=n;n=[],a.forEach(i)}n={push:function(s){return i(s)},filter:function(){return n}}},assignMedium:function(i){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(i),a=n}var l=function(){var u=a;a=[],u.forEach(i)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return o}function $Y(e){e===void 0&&(e={});var t=AY(null);return t.options=_t({async:!0,ssr:!1},e),t}var Lx=function(e){var t=e.sideCar,n=Om(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return C.createElement(r,_t({},n))};Lx.isSideCarExport=!0;function TY(e,t){return e.useMedium(t),Lx}var Fx=$Y(),qd=function(){},$s=C.forwardRef(function(e,t){var n=C.useRef(null),r=C.useState({onScrollCapture:qd,onWheelCapture:qd,onTouchMoveCapture:qd}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,p=e.sideCar,d=e.noRelative,v=e.noIsolation,h=e.inert,g=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,w=e.gapMode,A=Om(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,k=kY([n,t]),$=_t(_t({},A),o);return C.createElement(C.Fragment,null,u&&C.createElement(x,{sideCar:Fx,removeScrollBar:c,shards:f,noRelative:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?C.cloneElement(C.Children.only(s),_t(_t({},$),{ref:k})):C.createElement(b,_t({},$,{className:l,ref:k}),s))});$s.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$s.classNames={fullWidth:As,zeroRight:Cs};var OY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function IY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=OY();return t&&e.setAttribute("nonce",t),e}function PY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function DY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var _Y=function(){var e=0,t=null;return{add:function(n){e==0&&(t=IY())&&(PY(t,n),DY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},MY=function(){var e=_Y();return function(t,n){C.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Bx=function(){var e=MY(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},NY={left:0,top:0,right:0,gap:0},Gd=function(e){return parseInt(e||"",10)||0},RY=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Gd(n),Gd(r),Gd(o)]},LY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NY;var t=RY(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},FY=Bx(),Vr="data-scroll-locked",BY=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
294
|
-
.`.concat(wY,` {
|
|
275
|
+
*/var Sa,Ad;function VS(){if(Ad)return Sa;Ad=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(o){if(o==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(o)}function i(){try{if(!Object.assign)return!1;var o=new String("abc");if(o[5]="de",Object.getOwnPropertyNames(o)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(f){return a[f]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(f){c[f]=f}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Sa=i()?Object.assign:function(o,a){for(var s,l=r(o),c,f=1;f<arguments.length;f++){s=Object(arguments[f]);for(var u in s)t.call(s,u)&&(l[u]=s[u]);if(e){c=e(s);for(var p=0;p<c.length;p++)n.call(s,c[p])&&(l[c[p]]=s[c[p]])}}return l},Sa}var Ea,Id;function Ca(){if(Id)return Ea;Id=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ea=e,Ea}var Aa,Td;function Od(){return Td||(Td=1,Aa=Function.call.bind(Object.prototype.hasOwnProperty)),Aa}var Ia,Dd;function qS(){if(Dd)return Ia;Dd=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Ca(),n={},r=Od();e=function(o){var a="Warning: "+o;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function i(o,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var f in o)if(r(o,f)){var u;try{if(typeof o[f]!="function"){var p=Error((l||"React class")+": "+s+" type `"+f+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[f]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}u=o[f](a,f,l,s,null,t)}catch(m){u=m}if(u&&!(u instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+f+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in n)){n[u.message]=!0;var d=c?c():"";e("Failed "+s+" type: "+u.message+(d??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Ia=i,Ia}var Ta,Md;function KS(){if(Md)return Ta;Md=1;var e=Cd(),t=VS(),n=Ca(),r=Od(),i=qS(),o=function(){};process.env.NODE_ENV!=="production"&&(o=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Ta=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,f="@@iterator";function u(v){var L=v&&(c&&v[c]||v[f]);if(typeof L=="function")return L}var p="<<anonymous>>",d={array:y("array"),bigint:y("bigint"),bool:y("boolean"),func:y("function"),number:y("number"),object:y("object"),string:y("string"),symbol:y("symbol"),any:b(),arrayOf:w,element:C(),elementType:x(),instanceOf:A,node:I(),objectOf:M,oneOf:T,oneOfType:z,shape:F,exact:N};function m(v,L){return v===L?v!==0||1/v===1/L:v!==v&&L!==L}function h(v,L){this.message=v,this.data=L&&typeof L=="object"?L:{},this.stack=""}h.prototype=Error.prototype;function g(v){if(process.env.NODE_ENV!=="production")var L={},W=0;function S(te,Y,X,oe,ae,J,G){if(oe=oe||p,J=J||X,G!==n){if(l){var j=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 j.name="Invariant Violation",j}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=oe+":"+X;!L[ne]&&W<3&&(o("You are manually calling a React.PropTypes validation function for the `"+J+"` prop on `"+oe+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),L[ne]=!0,W++)}}return Y[X]==null?te?Y[X]===null?new h("The "+ae+" `"+J+"` is marked as required "+("in `"+oe+"`, but its value is `null`.")):new h("The "+ae+" `"+J+"` is marked as required in "+("`"+oe+"`, but its value is `undefined`.")):null:v(Y,X,oe,ae,J)}var V=S.bind(null,!1);return V.isRequired=S.bind(null,!0),V}function y(v){function L(W,S,V,te,Y,X){var oe=W[S],ae=_(oe);if(ae!==v){var J=U(oe);return new h("Invalid "+te+" `"+Y+"` of type "+("`"+J+"` supplied to `"+V+"`, expected ")+("`"+v+"`."),{expectedType:v})}return null}return g(L)}function b(){return g(a)}function w(v){function L(W,S,V,te,Y){if(typeof v!="function")return new h("Property `"+Y+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var X=W[S];if(!Array.isArray(X)){var oe=_(X);return new h("Invalid "+te+" `"+Y+"` of type "+("`"+oe+"` supplied to `"+V+"`, expected an array."))}for(var ae=0;ae<X.length;ae++){var J=v(X,ae,V,te,Y+"["+ae+"]",n);if(J instanceof Error)return J}return null}return g(L)}function C(){function v(L,W,S,V,te){var Y=L[W];if(!s(Y)){var X=_(Y);return new h("Invalid "+V+" `"+te+"` of type "+("`"+X+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(v)}function x(){function v(L,W,S,V,te){var Y=L[W];if(!e.isValidElementType(Y)){var X=_(Y);return new h("Invalid "+V+" `"+te+"` of type "+("`"+X+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(v)}function A(v){function L(W,S,V,te,Y){if(!(W[S]instanceof v)){var X=v.name||p,oe=H(W[S]);return new h("Invalid "+te+" `"+Y+"` of type "+("`"+oe+"` supplied to `"+V+"`, expected ")+("instance of `"+X+"`."))}return null}return g(L)}function T(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&(arguments.length>1?o("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):o("Invalid argument supplied to oneOf, expected an array.")),a;function L(W,S,V,te,Y){for(var X=W[S],oe=0;oe<v.length;oe++)if(m(X,v[oe]))return null;var ae=JSON.stringify(v,function(G,j){var ne=U(j);return ne==="symbol"?String(j):j});return new h("Invalid "+te+" `"+Y+"` of value `"+String(X)+"` "+("supplied to `"+V+"`, expected one of "+ae+"."))}return g(L)}function M(v){function L(W,S,V,te,Y){if(typeof v!="function")return new h("Property `"+Y+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var X=W[S],oe=_(X);if(oe!=="object")return new h("Invalid "+te+" `"+Y+"` of type "+("`"+oe+"` supplied to `"+V+"`, expected an object."));for(var ae in X)if(r(X,ae)){var J=v(X,ae,V,te,Y+"."+ae,n);if(J instanceof Error)return J}return null}return g(L)}function z(v){if(!Array.isArray(v))return process.env.NODE_ENV!=="production"&&o("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var L=0;L<v.length;L++){var W=v[L];if(typeof W!="function")return o("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+$(W)+" at index "+L+"."),a}function S(V,te,Y,X,oe){for(var ae=[],J=0;J<v.length;J++){var G=v[J],j=G(V,te,Y,X,oe,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&ae.push(j.data.expectedType)}var ne=ae.length>0?", expected one of type ["+ae.join(", ")+"]":"";return new h("Invalid "+X+" `"+oe+"` supplied to "+("`"+Y+"`"+ne+"."))}return g(S)}function I(){function v(L,W,S,V,te){return R(L[W])?null:new h("Invalid "+V+" `"+te+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(v)}function O(v,L,W,S,V){return new h((v||"React class")+": "+L+" type `"+W+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function F(v){function L(W,S,V,te,Y){var X=W[S],oe=_(X);if(oe!=="object")return new h("Invalid "+te+" `"+Y+"` of type `"+oe+"` "+("supplied to `"+V+"`, expected `object`."));for(var ae in v){var J=v[ae];if(typeof J!="function")return O(V,te,Y,ae,U(J));var G=J(X,ae,V,te,Y+"."+ae,n);if(G)return G}return null}return g(L)}function N(v){function L(W,S,V,te,Y){var X=W[S],oe=_(X);if(oe!=="object")return new h("Invalid "+te+" `"+Y+"` of type `"+oe+"` "+("supplied to `"+V+"`, expected `object`."));var ae=t({},W[S],v);for(var J in ae){var G=v[J];if(r(v,J)&&typeof G!="function")return O(V,te,Y,J,U(G));if(!G)return new h("Invalid "+te+" `"+Y+"` key `"+J+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(W[S],null," ")+`
|
|
276
|
+
Valid keys: `+JSON.stringify(Object.keys(v),null," "));var j=G(X,J,V,te,Y+"."+J,n);if(j)return j}return null}return g(L)}function R(v){switch(typeof v){case"number":case"string":case"undefined":return!0;case"boolean":return!v;case"object":if(Array.isArray(v))return v.every(R);if(v===null||s(v))return!0;var L=u(v);if(L){var W=L.call(v),S;if(L!==v.entries){for(;!(S=W.next()).done;)if(!R(S.value))return!1}else for(;!(S=W.next()).done;){var V=S.value;if(V&&!R(V[1]))return!1}}else return!1;return!0;default:return!1}}function D(v,L){return v==="symbol"?!0:L?L["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&L instanceof Symbol:!1}function _(v){var L=typeof v;return Array.isArray(v)?"array":v instanceof RegExp?"object":D(L,v)?"symbol":L}function U(v){if(typeof v>"u"||v===null)return""+v;var L=_(v);if(L==="object"){if(v instanceof Date)return"date";if(v instanceof RegExp)return"regexp"}return L}function $(v){var L=U(v);switch(L){case"array":case"object":return"an "+L;case"boolean":case"date":case"regexp":return"a "+L;default:return L}}function H(v){return!v.constructor||!v.constructor.name?p:v.constructor.name}return d.checkPropTypes=i,d.resetWarningCache=i.resetWarningCache,d.PropTypes=d,d},Ta}var Oa,Pd;function YS(){if(Pd)return Oa;Pd=1;var e=Ca();function t(){}function n(){}return n.resetWarningCache=t,Oa=function(){function r(a,s,l,c,f,u){if(u!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function i(){return r}var o={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return o.PropTypes=o,o},Oa}if(process.env.NODE_ENV!=="production"){var QS=Cd(),GS=!0;ka.exports=KS()(QS.isElement,GS)}else ka.exports=YS()();var JS=ka.exports;const Ee=Jt(JS);var ZS=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function or(e,t){var n=XS(e);if(typeof n.path!="string"){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:typeof t=="string"?t:typeof r=="string"&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}function XS(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),i=ZS.get(r);i&&Object.defineProperty(e,"type",{value:i,writable:!1,configurable:!1,enumerable:!0})}return e}var eE=[".DS_Store","Thumbs.db"];function tE(e){return on(this,void 0,void 0,function(){return an(this,function(t){return ci(e)&&nE(e.dataTransfer)?[2,aE(e.dataTransfer,e.type)]:rE(e)?[2,iE(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,oE(e)]:[2,[]]})})}function nE(e){return ci(e)}function rE(e){return ci(e)&&ci(e.target)}function ci(e){return typeof e=="object"&&e!==null}function iE(e){return Da(e.target.files).map(function(t){return or(t)})}function oE(e){return on(this,void 0,void 0,function(){var t;return an(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(r){return r.getFile()}))];case 1:return t=n.sent(),[2,t.map(function(r){return or(r)})]}})})}function aE(e,t){return on(this,void 0,void 0,function(){var n,r;return an(this,function(i){switch(i.label){case 0:return e.items?(n=Da(e.items).filter(function(o){return o.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(sE))]):[3,2];case 1:return r=i.sent(),[2,Nd(_d(r))];case 2:return[2,Nd(Da(e.files).map(function(o){return or(o)}))]}})})}function Nd(e){return e.filter(function(t){return eE.indexOf(t.name)===-1})}function Da(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function sE(e){if(typeof e.webkitGetAsEntry!="function")return Ld(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?Fd(t):Ld(e)}function _d(e){return e.reduce(function(t,n){return qo(qo([],Zu(t),!1),Zu(Array.isArray(n)?_d(n):[n]),!1)},[])}function Ld(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=or(t);return Promise.resolve(n)}function lE(e){return on(this,void 0,void 0,function(){return an(this,function(t){return[2,e.isDirectory?Fd(e):cE(e)]})})}function Fd(e){var t=e.createReader();return new Promise(function(n,r){var i=[];function o(){var a=this;t.readEntries(function(s){return on(a,void 0,void 0,function(){var l,c,f;return an(this,function(u){switch(u.label){case 0:if(s.length)return[3,5];u.label=1;case 1:return u.trys.push([1,3,,4]),[4,Promise.all(i)];case 2:return l=u.sent(),n(l),[3,4];case 3:return c=u.sent(),r(c),[3,4];case 4:return[3,6];case 5:f=Promise.all(s.map(lE)),i.push(f),o(),u.label=6;case 6:return[2]}})})},function(s){r(s)})}o()})}function cE(e){return on(this,void 0,void 0,function(){return an(this,function(t){return[2,new Promise(function(n,r){e.file(function(i){var o=or(i,e.fullPath);n(o)},function(i){r(i)})})]})})}var uE=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",i=(e.type||"").toLowerCase(),o=i.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?o===s.replace(/\/.*$/,""):i===s})}return!0};function Rd(e){return pE(e)||dE(e)||jd(e)||fE()}function fE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
277
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function dE(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pE(e){if(Array.isArray(e))return Ma(e)}function Bd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function zd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Bd(Object(n),!0).forEach(function(r){$d(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ar(e,t){return gE(e)||mE(e,t)||jd(e,t)||hE()}function hE(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
278
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jd(e,t){if(e){if(typeof e=="string")return Ma(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(e,t)}}function Ma(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function mE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function gE(e){if(Array.isArray(e))return e}var yE="file-invalid-type",bE="file-too-large",vE="file-too-small",wE="too-many-files",xE=function(t){t=Array.isArray(t)&&t.length===1?t[0]:t;var n=Array.isArray(t)?"one of ".concat(t.join(", ")):t;return{code:yE,message:"File type must be ".concat(n)}},Ud=function(t){return{code:bE,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},Hd=function(t){return{code:vE,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},kE={code:wE,message:"Too many files"};function Wd(e,t){var n=e.type==="application/x-moz-file"||uE(e,t);return[n,n?null:xE(t)]}function Vd(e,t,n){if(Kt(e.size))if(Kt(t)&&Kt(n)){if(e.size>n)return[!1,Ud(n)];if(e.size<t)return[!1,Hd(t)]}else{if(Kt(t)&&e.size<t)return[!1,Hd(t)];if(Kt(n)&&e.size>n)return[!1,Ud(n)]}return[!0,null]}function Kt(e){return e!=null}function SE(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,o=e.multiple,a=e.maxFiles,s=e.validator;return!o&&t.length>1||o&&a>=1&&t.length>a?!1:t.every(function(l){var c=Wd(l,n),f=ar(c,1),u=f[0],p=Vd(l,r,i),d=ar(p,1),m=d[0],h=s?s(l):null;return u&&m&&!h})}function ui(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function fi(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,function(t){return t==="Files"||t==="application/x-moz-file"}):!!e.target&&!!e.target.files}function qd(e){e.preventDefault()}function EE(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function CE(e){return e.indexOf("Edge/")!==-1}function AE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return EE(e)||CE(e)}function yt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];return t.some(function(s){return!ui(r)&&s&&s.apply(void 0,[r].concat(o)),ui(r)})}}function IE(){return"showOpenFilePicker"in window}function TE(e){if(Kt(e)){var t=Object.entries(e).filter(function(n){var r=ar(n,2),i=r[0],o=r[1],a=!0;return Kd(i)||(console.warn('Skipped "'.concat(i,'" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')),a=!1),(!Array.isArray(o)||!o.every(Yd))&&(console.warn('Skipped "'.concat(i,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var i=ar(r,2),o=i[0],a=i[1];return zd(zd({},n),{},$d({},o,a))},{});return[{description:"Files",accept:t}]}return e}function OE(e){if(Kt(e))return Object.entries(e).reduce(function(t,n){var r=ar(n,2),i=r[0],o=r[1];return[].concat(Rd(t),[i],Rd(o))},[]).filter(function(t){return Kd(t)||Yd(t)}).join(",")}function DE(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function ME(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Kd(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Yd(e){return/^.*\.[\w]+$/.test(e)}var PE=["children"],NE=["open"],_E=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],LE=["refKey","onChange","onClick"];function FE(e){return zE(e)||BE(e)||Qd(e)||RE()}function RE(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
279
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function BE(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zE(e){if(Array.isArray(e))return Na(e)}function Pa(e,t){return UE(e)||jE(e,t)||Qd(e,t)||$E()}function $E(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
280
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Qd(e,t){if(e){if(typeof e=="string")return Na(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Na(e,t)}}function Na(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jE(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],i=!0,o=!1,a,s;try{for(n=n.call(e);!(i=(a=n.next()).done)&&(r.push(a.value),!(t&&r.length===t));i=!0);}catch(l){o=!0,s=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(o)throw s}}return r}}function UE(e){if(Array.isArray(e))return e}function Gd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gd(Object(n),!0).forEach(function(r){_a(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function di(e,t){if(e==null)return{};var n=HE(e,t),r,i;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function HE(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var La=P.forwardRef(function(e,t){var n=e.children,r=di(e,PE),i=Zd(r),o=i.open,a=di(i,NE);return P.useImperativeHandle(t,function(){return{open:o}},[o]),P.createElement(P.Fragment,null,n(Oe(Oe({},a),{},{open:o})))});La.displayName="Dropzone";var Jd={disabled:!1,getFilesFromEvent:tE,maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0,autoFocus:!1};La.defaultProps=Jd,La.propTypes={children:Ee.func,accept:Ee.objectOf(Ee.arrayOf(Ee.string)),multiple:Ee.bool,preventDropOnDocument:Ee.bool,noClick:Ee.bool,noKeyboard:Ee.bool,noDrag:Ee.bool,noDragEventsBubbling:Ee.bool,minSize:Ee.number,maxSize:Ee.number,maxFiles:Ee.number,disabled:Ee.bool,getFilesFromEvent:Ee.func,onFileDialogCancel:Ee.func,onFileDialogOpen:Ee.func,useFsAccessApi:Ee.bool,autoFocus:Ee.bool,onDragEnter:Ee.func,onDragLeave:Ee.func,onDragOver:Ee.func,onDrop:Ee.func,onDropAccepted:Ee.func,onDropRejected:Ee.func,onError:Ee.func,validator:Ee.func};var Fa={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Zd(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Oe(Oe({},Jd),e),n=t.accept,r=t.disabled,i=t.getFilesFromEvent,o=t.maxSize,a=t.minSize,s=t.multiple,l=t.maxFiles,c=t.onDragEnter,f=t.onDragLeave,u=t.onDragOver,p=t.onDrop,d=t.onDropAccepted,m=t.onDropRejected,h=t.onFileDialogCancel,g=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.autoFocus,w=t.preventDropOnDocument,C=t.noClick,x=t.noKeyboard,A=t.noDrag,T=t.noDragEventsBubbling,M=t.onError,z=t.validator,I=P.useMemo(function(){return OE(n)},[n]),O=P.useMemo(function(){return TE(n)},[n]),F=P.useMemo(function(){return typeof g=="function"?g:Xd},[g]),N=P.useMemo(function(){return typeof h=="function"?h:Xd},[h]),R=P.useRef(null),D=P.useRef(null),_=P.useReducer(WE,Fa),U=Pa(_,2),$=U[0],H=U[1],v=$.isFocused,L=$.isFileDialogActive,W=P.useRef(typeof window<"u"&&window.isSecureContext&&y&&IE()),S=function(){!W.current&&L&&setTimeout(function(){if(D.current){var ce=D.current.files;ce.length||(H({type:"closeDialog"}),N())}},300)};P.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[D,L,N,W]);var V=P.useRef([]),te=function(ce){R.current&&R.current.contains(ce.target)||(ce.preventDefault(),V.current=[])};P.useEffect(function(){return w&&(document.addEventListener("dragover",qd,!1),document.addEventListener("drop",te,!1)),function(){w&&(document.removeEventListener("dragover",qd),document.removeEventListener("drop",te))}},[R,w]),P.useEffect(function(){return!r&&b&&R.current&&R.current.focus(),function(){}},[R,b,r]);var Y=P.useCallback(function(ee){M?M(ee):console.error(ee)},[M]),X=P.useCallback(function(ee){ee.preventDefault(),ee.persist(),De(ee),V.current=[].concat(FE(V.current),[ee.target]),fi(ee)&&Promise.resolve(i(ee)).then(function(ce){if(!(ui(ee)&&!T)){var B=ce.length,q=B>0&&SE({files:ce,accept:I,minSize:a,maxSize:o,multiple:s,maxFiles:l,validator:z}),le=B>0&&!q;H({isDragAccept:q,isDragReject:le,isDragActive:!0,type:"setDraggedFiles"}),c&&c(ee)}}).catch(function(ce){return Y(ce)})},[i,c,Y,T,I,a,o,s,l,z]),oe=P.useCallback(function(ee){ee.preventDefault(),ee.persist(),De(ee);var ce=fi(ee);if(ce&&ee.dataTransfer)try{ee.dataTransfer.dropEffect="copy"}catch{}return ce&&u&&u(ee),!1},[u,T]),ae=P.useCallback(function(ee){ee.preventDefault(),ee.persist(),De(ee);var ce=V.current.filter(function(q){return R.current&&R.current.contains(q)}),B=ce.indexOf(ee.target);B!==-1&&ce.splice(B,1),V.current=ce,!(ce.length>0)&&(H({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fi(ee)&&f&&f(ee))},[R,f,T]),J=P.useCallback(function(ee,ce){var B=[],q=[];ee.forEach(function(le){var re=Wd(le,I),de=Pa(re,2),Te=de[0],ft=de[1],Xe=Vd(le,a,o),vt=Pa(Xe,2),At=vt[0],Be=vt[1],wt=z?z(le):null;if(Te&&At&&!wt)B.push(le);else{var et=[ft,Be];wt&&(et=et.concat(wt)),q.push({file:le,errors:et.filter(function(HI){return HI})})}}),(!s&&B.length>1||s&&l>=1&&B.length>l)&&(B.forEach(function(le){q.push({file:le,errors:[kE]})}),B.splice(0)),H({acceptedFiles:B,fileRejections:q,type:"setFiles"}),p&&p(B,q,ce),q.length>0&&m&&m(q,ce),B.length>0&&d&&d(B,ce)},[H,s,I,a,o,l,p,d,m,z]),G=P.useCallback(function(ee){ee.preventDefault(),ee.persist(),De(ee),V.current=[],fi(ee)&&Promise.resolve(i(ee)).then(function(ce){ui(ee)&&!T||J(ce,ee)}).catch(function(ce){return Y(ce)}),H({type:"reset"})},[i,J,Y,T]),j=P.useCallback(function(){if(W.current){H({type:"openDialog"}),F();var ee={multiple:s,types:O};window.showOpenFilePicker(ee).then(function(ce){return i(ce)}).then(function(ce){J(ce,null),H({type:"closeDialog"})}).catch(function(ce){DE(ce)?(N(ce),H({type:"closeDialog"})):ME(ce)?(W.current=!1,D.current?(D.current.value=null,D.current.click()):Y(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))):Y(ce)});return}D.current&&(H({type:"openDialog"}),F(),D.current.value=null,D.current.click())},[H,F,N,y,J,Y,O,s]),ne=P.useCallback(function(ee){!R.current||!R.current.isEqualNode(ee.target)||(ee.key===" "||ee.key==="Enter"||ee.keyCode===32||ee.keyCode===13)&&(ee.preventDefault(),j())},[R,j]),se=P.useCallback(function(){H({type:"focus"})},[]),K=P.useCallback(function(){H({type:"blur"})},[]),Q=P.useCallback(function(){C||(AE()?setTimeout(j,0):j())},[C,j]),ue=function(ce){return r?null:ce},he=function(ce){return x?null:ue(ce)},me=function(ce){return A?null:ue(ce)},De=function(ce){T&&ce.stopPropagation()},Ue=P.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ee.refKey,B=ce===void 0?"ref":ce,q=ee.role,le=ee.onKeyDown,re=ee.onFocus,de=ee.onBlur,Te=ee.onClick,ft=ee.onDragEnter,Xe=ee.onDragOver,vt=ee.onDragLeave,At=ee.onDrop,Be=di(ee,_E);return Oe(Oe(_a({onKeyDown:he(yt(le,ne)),onFocus:he(yt(re,se)),onBlur:he(yt(de,K)),onClick:ue(yt(Te,Q)),onDragEnter:me(yt(ft,X)),onDragOver:me(yt(Xe,oe)),onDragLeave:me(yt(vt,ae)),onDrop:me(yt(At,G)),role:typeof q=="string"&&q!==""?q:"presentation"},B,R),!r&&!x?{tabIndex:0}:{}),Be)}},[R,ne,se,K,Q,X,oe,ae,G,x,A,r]),He=P.useCallback(function(ee){ee.stopPropagation()},[]),qe=P.useMemo(function(){return function(){var ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ce=ee.refKey,B=ce===void 0?"ref":ce,q=ee.onChange,le=ee.onClick,re=di(ee,LE),de=_a({accept:I,multiple:s,type:"file",style:{display:"none"},onChange:ue(yt(q,G)),onClick:ue(yt(le,He)),tabIndex:-1},B,D);return Oe(Oe({},de),re)}},[D,n,s,G,r]);return Oe(Oe({},$),{},{isFocused:v&&!r,getRootProps:Ue,getInputProps:qe,rootRef:R,inputRef:D,open:ue(j)})}function WE(e,t){switch(t.type){case"focus":return Oe(Oe({},e),{},{isFocused:!0});case"blur":return Oe(Oe({},e),{},{isFocused:!1});case"openDialog":return Oe(Oe({},Fa),{},{isFileDialogActive:!0});case"closeDialog":return Oe(Oe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Oe(Oe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Oe(Oe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Oe({},Fa);default:return e}}function Xd(){}const ep=({children:e})=>{const t=P.useRef(),[n,r]=P.useState({open:!1}),i=({title:a,description:s,confirmButtonText:l,cancelButtonText:c,onConfirm:f,onCancel:u,initialValue:p,Content:d})=>new Promise((m,h)=>{t.current=p,r({open:!0,title:a,description:s,confirmButtonText:l,cancelButtonText:c,content:d?k.jsx(d,{value:p,setValue:g=>{t.current=g}}):null,onConfirm:()=>{f==null||f(),m(t.current),o()},onCancel:()=>{u==null||u(),h(),o()}})}),o=()=>{r(a=>({...a,open:!1}))};return k.jsxs(Wo.Provider,{value:{showInputModal:i},children:[k.jsx(Cn,{open:n.open,onOpenChange:a=>r(s=>({...s,open:a})),children:k.jsx(Cn.Content,{title:n.title,description:n.description,confirmButtonText:n.confirmButtonText,cancelButtonText:n.cancelButtonText,onConfirm:n.onConfirm,onCancel:n.onCancel,children:n.content})}),e]})},VE=(e,t)=>{const n=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim())return;const i=t.filter(l=>/^\d+$/.test(l)).join(";"),o=`https://fonts.googleapis.com/css2?family=${n}:wght@${i}&display=swap`;if(document.querySelector(`link[href="${o}"]`))return;const s=document.createElement("link");s.rel="stylesheet",s.href=o,document.head.appendChild(s)},tp=({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o,additionalStylesheetUrl:a})=>{P.useMemo(()=>{t&&VE(t,["100","200","300","400","500","600","700","800"])},[t]);const s=P.useMemo(()=>fl({color:e,fontFamily:t,radius:n,themeMode:r,variant:i,headerVariant:o}),[e,t,n,r,i,o]);return k.jsxs(k.Fragment,{children:[a&&k.jsx("link",{rel:"stylesheet",href:a}),k.jsxs("style",{children:[s,`
|
|
281
|
+
.bpWebchat {
|
|
282
|
+
border-radius: ${.375*(n??1)}rem;
|
|
283
|
+
}
|
|
284
|
+
.bpMessagePreview {
|
|
285
|
+
border-radius: ${.125*(n??1)}rem;
|
|
286
|
+
}
|
|
287
|
+
`]})]})},Ra=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:i,connected:o,...a})=>{const{container:s}=ge,l=Fr(g=>g.setMessageContainerRef),f=qu(i)(g=>g.uploadFile),[u,p]=P.useState(0),d=P.useRef(null);P.useEffect(()=>{l(d)},[d,l]);const m=P.useCallback(g=>{n&&(g.forEach(y=>f(y,n)),p(0))},[f,n]),{getRootProps:h}=Zd({noClick:!0,noKeyboard:!0,onDrop:m,disabled:!(r&&n),onDragEnter:()=>p(g=>g+1),onDragLeave:()=>p(g=>g-1)});return k.jsxs("div",{...a,className:ir(s.className,t),...h(),ref:d,children:[k.jsxs("div",{"data-hover":u>0,...s.dropzone.overlay,children:["Drop files to upload",k.jsx(r0,{style:{width:"50px"}})]}),k.jsx(ep,{children:e})]})};Ra.displayName="Container";const np=P.forwardRef(({onClick:e,imgUrl:t,...n},r)=>{const{fab:i}=ge,{container:o,icon:a,image:s}=i??{};return t?k.jsx("img",{src:t,role:"button",tabIndex:0,...s,draggable:"false",onClick:e}):k.jsx("div",{...n,...o,ref:r,onClick:e,children:k.jsx("div",{...a})})});np.displayName="Fab";function Et(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function qE(e,t){const n=E.createContext(t),r=o=>{const{children:a,...s}=o,l=E.useMemo(()=>s,Object.values(s));return k.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(o){const a=E.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}return[r,i]}function rp(e,t=[]){let n=[];function r(o,a){const s=E.createContext(a),l=n.length;n=[...n,a];const c=u=>{var y;const{scope:p,children:d,...m}=u,h=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,g=E.useMemo(()=>m,Object.values(m));return k.jsx(h.Provider,{value:g,children:d})};c.displayName=o+"Provider";function f(u,p){var h;const d=((h=p==null?void 0:p[e])==null?void 0:h[l])||s,m=E.useContext(d);if(m)return m;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${o}\``)}return[c,f]}const i=()=>{const o=n.map(a=>E.createContext(a));return function(s){const l=(s==null?void 0:s[e])||o;return E.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return i.scopeName=e,[r,KE(i,...t)]}function KE(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const a=r.reduce((s,{useScope:l,scopeName:c})=>{const u=l(o)[`__scope${c}`];return{...s,...u}},{});return E.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function ip({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,i]=YE({defaultProp:t,onChange:n}),o=e!==void 0,a=o?e:r,s=It(n),l=E.useCallback(c=>{if(o){const u=typeof c=="function"?c(e):c;u!==e&&s(u)}else i(c)},[o,e,i,s]);return[a,l]}function YE({defaultProp:e,onChange:t}){const n=E.useState(e),[r]=n,i=E.useRef(r),o=It(t);return E.useEffect(()=>{i.current!==r&&(o(r),i.current=r)},[r,i,o]),n}function op(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ba(...e){return t=>{let n=!1;const r=e.map(i=>{const o=op(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():op(e[i],null)}}}}function Rt(...e){return E.useCallback(Ba(...e),e)}var ap=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),o=i.find(GE);if(o){const a=o.props.children,s=i.map(l=>l===o?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:l);return k.jsx(za,{...r,ref:t,children:E.isValidElement(a)?E.cloneElement(a,void 0,s):null})}return k.jsx(za,{...r,ref:t,children:n})});ap.displayName="Slot";var za=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=ZE(n);return E.cloneElement(n,{...JE(r,n.props),ref:t?Ba(t,i):i})}return E.Children.count(n)>1?E.Children.only(null):null});za.displayName="SlotClone";var QE=({children:e})=>k.jsx(k.Fragment,{children:e});function GE(e){return E.isValidElement(e)&&e.type===QE}function JE(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function ZE(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var XE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],$a=XE.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?ap:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function eC(e,t){return E.useReducer((n,r)=>t[n][r]??n,e)}var pi=e=>{const{present:t,children:n}=e,r=tC(t),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),o=Rt(r.ref,nC(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:o}):null};pi.displayName="Presence";function tC(e){const[t,n]=E.useState(),r=E.useRef({}),i=E.useRef(e),o=E.useRef("none"),a=e?"mounted":"unmounted",[s,l]=eC(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=hi(r.current);o.current=s==="mounted"?c:"none"},[s]),Gt(()=>{const c=r.current,f=i.current;if(f!==e){const p=o.current,d=hi(c);e?l("MOUNT"):d==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&p!==d?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Gt(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,u=d=>{const h=hi(r.current).includes(d.animationName);if(d.target===t&&h&&(l("ANIMATION_END"),!i.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=d=>{d.target===t&&(o.current=hi(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:E.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function hi(e){return(e==null?void 0:e.animationName)||"none"}function nC(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var rC=E.useId||(()=>{}),iC=0;function mi(e){const[t,n]=E.useState(rC());return Gt(()=>{e||n(r=>r??String(iC++))},[e]),e||(t?`radix-${t}`:"")}var ja="Collapsible",[oC,HT]=rp(ja),[aC,Ua]=oC(ja),sp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:a,...s}=e,[l=!1,c]=ip({prop:r,defaultProp:i,onChange:a});return k.jsx(aC,{scope:n,disabled:o,contentId:mi(),open:l,onOpenToggle:E.useCallback(()=>c(f=>!f),[c]),children:k.jsx($a.div,{"data-state":Wa(l),"data-disabled":o?"":void 0,...s,ref:t})})});sp.displayName=ja;var lp="CollapsibleTrigger",cp=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=Ua(lp,n);return k.jsx($a.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":Wa(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Et(e.onClick,i.onOpenToggle)})});cp.displayName=lp;var Ha="CollapsibleContent",up=E.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=Ua(Ha,e.__scopeCollapsible);return k.jsx(pi,{present:n||i.open,children:({present:o})=>k.jsx(sC,{...r,ref:t,present:o})})});up.displayName=Ha;var sC=E.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,a=Ua(Ha,n),[s,l]=E.useState(r),c=E.useRef(null),f=Rt(t,c),u=E.useRef(0),p=u.current,d=E.useRef(0),m=d.current,h=a.open||s,g=E.useRef(h),y=E.useRef(void 0);return E.useEffect(()=>{const b=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(b)},[]),Gt(()=>{const b=c.current;if(b){y.current=y.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();u.current=w.height,d.current=w.width,g.current||(b.style.transitionDuration=y.current.transitionDuration,b.style.animationName=y.current.animationName),l(r)}},[a.open,r]),k.jsx($a.div,{"data-state":Wa(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!h,...o,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:h&&i})});function Wa(e){return e?"open":"closed"}var lC=sp,cC=up;const Va=({restartConversation:e,...t})=>{var o,a;const{header:n}=ge,{showInputModal:r}=Vo(),i=async s=>{s.stopPropagation(),r?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButtonText:"New conversation",cancelButtonText:"Cancel"}).then(()=>e()):e()};return k.jsx(g0,{...t,...(a=(o=n==null?void 0:n.content)==null?void 0:o.actions)==null?void 0:a.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:i})},fp=({onClick:e,...t})=>{const{header:n}=ge,r=i=>{i.stopPropagation(),e==null||e()};return k.jsx(Eu,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:i=>{i.key==="Enter"&&r(i)}})},sr=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,f,u,p,d,m,h,g,y;const{header:i}=ge,o=e??i0;return t?n?k.jsxs("a",{...r,...(s=(a=i.expandedContent)==null?void 0:a.descriptionItems)==null?void 0:s.container,href:n,target:"_blank",rel:"noreferrer noopener",children:[k.jsx(o,{...(c=(l=i.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),k.jsx("p",{...(u=(f=i.expandedContent)==null?void 0:f.descriptionItems)==null?void 0:u.link,children:t})]}):k.jsxs("div",{...r,...(d=(p=i.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[k.jsx(o,{...(h=(m=i.expandedContent)==null?void 0:m.descriptionItems)==null?void 0:h.icon}),k.jsx("p",{...(y=(g=i.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:y.text,children:t})]}):null},uC=({soundOn:e,toggleSound:t})=>{const n=o=>{o.stopPropagation(),t==null||t()},{header:r}=ge,i=e?Su:x0;return k.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n(o))},title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:k.jsx(i,{size:16})})},dp=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:i,soundOn:o,toggleSound:a,clientId:s,...l})=>{var m,h,g,y,b,w,C,x,A,T,M,z,I,O,F,N,R,D,_,U,$,H,v,L;const{header:c}=ge,[f,u]=P.useState(e),p=!!((m=n.email)!=null&&m.title)||!!((h=n.phone)!=null&&h.title)||!!((g=n.website)!=null&&g.title)||!!((y=n.termsOfService)!=null&&y.link)||!!((b=n.privacyPolicy)!=null&&b.link),d=p&&!i;return k.jsxs(lC,{open:d?f:!1,onOpenChange:u,"data-disabled":d?void 0:"",...c.container,...l,children:[k.jsxs(cp,{"aria-label":"Expand Header Button",...c.content.container,children:[k.jsx(Nn,{userId:s,src:n.botAvatar,...c.content.avatar,children:n.botName||"Bot"}),k.jsx("h2",{...c.content.title,children:n.botName||"Bot"}),n.botDescription&&k.jsx("p",{...c.content.description,children:n.botDescription}),k.jsxs("div",{...c.content.actions.container,children:[n.soundEnabled&&o!==void 0&&a&&k.jsx(uC,{soundOn:o,toggleSound:a})," ",r&&k.jsx(Va,{restartConversation:r}),t&&k.jsx(fp,{onClick:t})]})]}),p&&k.jsxs(cC,{...c.expandedContent.container,children:[k.jsxs("div",{"data-links":"",...c.expandedContent.group,children:[k.jsx(sr,{"data-email":"",icon:u0,title:(w=n.email)==null?void 0:w.title,link:(x=(C=n.email)==null?void 0:C.link)!=null&&x.startsWith("mailto:")?(A=n.email)==null?void 0:A.link:`mailto:${(T=n.email)==null?void 0:T.link}`}),k.jsx(sr,{"data-phone":"",icon:h0,title:(M=n.phone)==null?void 0:M.title,link:(I=(z=n.phone)==null?void 0:z.link)!=null&&I.startsWith("tel:")?(O=n.phone)==null?void 0:O.link:`tel:${(F=n.phone)==null?void 0:F.link}`}),k.jsx(sr,{"data-website":"",link:(N=n.website)==null?void 0:N.link,icon:s0,title:(R=n.website)==null?void 0:R.title})]}),k.jsxs("div",{"data-legal":"",...(D=c.expandedContent)==null?void 0:D.group,children:[((_=n.termsOfService)==null?void 0:_.link)&&k.jsx(sr,{"data-terms":"",link:(U=n.termsOfService)==null?void 0:U.link,icon:xu,title:($=n.termsOfService)==null?void 0:$.title}),((H=n.privacyPolicy)==null?void 0:H.link)&&k.jsx(sr,{"data-privacy":"",link:(v=n.privacyPolicy)==null?void 0:v.link,icon:c0,title:(L=n.privacyPolicy)==null?void 0:L.title})]})]})]})},qa=P.memo(({...e})=>{const{typingIndicator:t}=ge;return k.jsx("div",{...e,...t==null?void 0:t.container,children:k.jsx("div",{...t==null?void 0:t.loader})})});qa.displayName="TypingIndicator";const Ka=P.memo(P.forwardRef(({direction:e,block:t,disableInput:n,children:r,sender:i,id:o,authorId:a,status:s,renderers:l,isReadOnly:c,isLastDeliveredMessage:f,feedback:u,timestamp:p,metadata:d,sendMessage:m,addMessageFeedback:h,showAvatar:g},y)=>{const[b,w]=P.useState([]),{message:{container:C,deliveryStatus:x}}=ge;return g=g??e==="incoming",k.jsx(Ho.Provider,{value:{isLoading:b,setIsLoading:w},children:k.jsxs("div",{...C,className:ir(C==null?void 0:C.className,f&&(x==null?void 0:x.className)),"data-loaded":b.length===0,"data-disable-input":!!n,"data-direction":e,dir:"auto",ref:y,children:[e==="incoming"&&g&&k.jsx(pp,{authorId:a,sender:i}),t&&k.jsx(qt,{block:{...t,isReadOnly:c,direction:e,timestamp:p,sender:i,feedback:u,messageId:o,status:s,metadata:d,sendMessage:m,addMessageFeedback:h},renderers:l}),e==="outgoing"&&g&&k.jsx(pp,{authorId:a,sender:i}),r]})})})),pp=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ge,[r,i]=P.useState("idle"),o=Ps(e??"",15);return k.jsxs(Li,{"data-color":o,"data-loading-status":r,...n==null?void 0:n.container,children:[k.jsx(Fi,{...n==null?void 0:n.image,onLoadingStatusChange:i,src:t==null?void 0:t.avatar}),k.jsxs(Ri,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function fC({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ge;return k.jsxs("li",{...r.container,children:[k.jsx(Nn,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),k.jsxs("div",{...r.content,children:[k.jsx("h1",{...r.title,children:n||"Bot"}),k.jsx("p",{...r.description,children:t})]})]})}let hp=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");/*!---------------------------------------------------------------------------------------------
|
|
288
|
+
* Copyright (c) StackBlitz. All rights reserved.
|
|
289
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
290
|
+
*--------------------------------------------------------------------------------------------*/const dC={damping:.7,stiffness:.05,mass:1.25},pC=70,hC=1e3/60,mC=350;let gi=!1;(Ch=globalThis.document)==null||Ch.addEventListener("mousedown",()=>{gi=!0}),(Ah=globalThis.document)==null||Ah.addEventListener("mouseup",()=>{gi=!1}),(Ih=globalThis.document)==null||Ih.addEventListener("click",()=>{gi=!1});const gC=(e={})=>{const[t,n]=P.useState(!1),[r,i]=P.useState(e.initial!==!1),[o,a]=P.useState(!1),s=P.useRef(null);s.current=e;const l=P.useCallback(()=>{var C;if(!gi)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const w=b.getRangeAt(0);return w.commonAncestorContainer.contains(g.current)||((C=g.current)==null?void 0:C.contains(w.commonAncestorContainer))},[]),c=P.useCallback(b=>{u.isAtBottom=b,i(b)},[]),f=P.useCallback(b=>{u.escapedFromLock=b,n(b)},[]),u=P.useMemo(()=>{let b;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var w;return((w=g.current)==null?void 0:w.scrollTop)??0},set scrollTop(w){g.current&&(g.current.scrollTop=w,u.ignoreScrollToTop=g.current.scrollTop)},get targetScrollTop(){return!g.current||!y.current?0:g.current.scrollHeight-1-g.current.clientHeight},get calculatedTargetScrollTop(){if(!g.current||!y.current)return 0;const{targetScrollTop:w}=this;if(!e.targetScrollTop)return w;if((b==null?void 0:b.targetScrollTop)===w)return b.calculatedScrollTop;const C=Math.max(Math.min(e.targetScrollTop(w,{scrollElement:g.current,contentElement:y.current}),w),0);return b={targetScrollTop:w,calculatedScrollTop:C},requestAnimationFrame(()=>{b=void 0}),C},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=pC}}},[]),p=P.useCallback((b={})=>{var z;typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||c(!0);const w=Date.now()+(Number(b.wait)||0),C=Qa(s.current,b.animation),{ignoreEscapes:x=!1}=b;let A,T=u.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{A=Date.now()}):A=w+(b.duration??0);const M=async()=>{const I=new Promise(requestAnimationFrame).then(()=>{var R;if(!u.isAtBottom)return u.animation=void 0,!1;const{scrollTop:O}=u,F=performance.now(),N=(F-(u.lastTick??F))/hC;if(u.animation||(u.animation={behavior:C,promise:I,ignoreEscapes:x}),u.animation.behavior===C&&(u.lastTick=F),l()||w>Date.now())return M();if(O<Math.min(T,u.calculatedTargetScrollTop)){if(((R=u.animation)==null?void 0:R.behavior)===C){if(C==="instant")return u.scrollTop=u.calculatedTargetScrollTop,M();u.velocity=(C.damping*u.velocity+C.stiffness*u.scrollDifference)/C.mass,u.accumulated+=u.velocity*N,u.scrollTop+=u.accumulated,u.scrollTop!==O&&(u.accumulated=0)}return M()}return A>Date.now()?(T=u.calculatedTargetScrollTop,M()):(u.animation=void 0,u.scrollTop<u.calculatedTargetScrollTop?p({animation:Qa(s.current,s.current.resize),ignoreEscapes:x,duration:Math.max(0,A-Date.now())||void 0}):u.isAtBottom)});return I.then(O=>(requestAnimationFrame(()=>{u.animation||(u.lastTick=void 0,u.velocity=0)}),O))};return b.wait!==!0&&(u.animation=void 0),((z=u.animation)==null?void 0:z.behavior)===C?u.animation.promise:M()},[c,l,u]),d=P.useCallback(()=>{f(!0),c(!1)},[f,c]),m=P.useCallback(({target:b})=>{if(b!==g.current)return;const{scrollTop:w,ignoreScrollToTop:C}=u;let{lastScrollTop:x=w}=u;u.lastScrollTop=w,u.ignoreScrollToTop=void 0,C&&C>w&&(x=C),a(u.isNearBottom),setTimeout(()=>{var M;if(u.resizeDifference||w===C)return;if(l()){f(!0),c(!1);return}const A=w>x,T=w<x;if((M=u.animation)!=null&&M.ignoreEscapes){u.scrollTop=x;return}T&&(f(!0),c(!1)),A&&f(!1),!u.escapedFromLock&&u.isNearBottom&&c(!0)},1)},[f,c,l,u]),h=P.useCallback(({target:b,deltaY:w})=>{var x;let C=b;for(;!["scroll","auto"].includes(getComputedStyle(C).overflow);){if(!C.parentElement)return;C=C.parentElement}C===g.current&&w<0&&g.current.scrollHeight>g.current.clientHeight&&!((x=u.animation)!=null&&x.ignoreEscapes)&&(f(!0),c(!1))},[f,c,u]),g=mp(b=>{var w,C;(w=g.current)==null||w.removeEventListener("scroll",m),(C=g.current)==null||C.removeEventListener("wheel",h),b==null||b.addEventListener("scroll",m,{passive:!0}),b==null||b.addEventListener("wheel",h,{passive:!0})},[]),y=mp(b=>{var C,x;if((C=u.resizeObserver)==null||C.disconnect(),!b)return;let w;u.resizeObserver=new ResizeObserver(([A])=>{const{height:T}=A.contentRect,M=T-(w??T);if(u.resizeDifference=M,u.scrollTop>u.targetScrollTop&&(u.scrollTop=u.targetScrollTop),a(u.isNearBottom),M>=0){const z=Qa(s.current,w?s.current.resize:s.current.initial);p({animation:z,wait:!0,preserveScrollPosition:!0,duration:z==="instant"?void 0:mC})}else u.isNearBottom&&(f(!1),c(!0));w=T,requestAnimationFrame(()=>{setTimeout(()=>{u.resizeDifference===M&&(u.resizeDifference=0)},1)})}),(x=u.resizeObserver)==null||x.observe(b)},[]);return{contentRef:y,scrollRef:g,scrollToBottom:p,stopScroll:d,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:u}};function mp(e,t){const n=P.useCallback(r=>(n.current=r,e(r)),t);return n}const Ya=new Map;function Qa(...e){const t={...dC};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return Ya.has(r)||Ya.set(r,Object.freeze(t)),n?"instant":Ya.get(r)}const gp=P.createContext(null),yC=typeof window<"u"?P.useLayoutEffect:P.useEffect;function yi({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:a,targetScrollTop:s,contextRef:l,...c}){const f=P.useRef(null),u=E.useCallback((x,A)=>{const T=(C==null?void 0:C.targetScrollTop)??s;return(T==null?void 0:T(x,A))??x},[s]),p=gC({mass:i,damping:o,stiffness:a,resize:n,initial:r,targetScrollTop:u}),{scrollRef:d,contentRef:m,scrollToBottom:h,stopScroll:g,isAtBottom:y,escapedFromLock:b,state:w}=e??p,C=P.useMemo(()=>({scrollToBottom:h,stopScroll:g,scrollRef:d,isAtBottom:y,escapedFromLock:b,contentRef:m,state:w,get targetScrollTop(){return f.current},set targetScrollTop(x){f.current=x}}),[h,y,m,d,g,b,w]);return P.useImperativeHandle(l,()=>C,[C]),yC(()=>{d.current&&getComputedStyle(d.current).overflow==="visible"&&(d.current.style.overflow="auto")},[]),k.jsx(gp.Provider,{value:C,children:k.jsx("div",{...c,children:typeof t=="function"?t(C):t})})}(function(e){function t({children:n,...r}){const i=yp();return k.jsx("div",{ref:i.scrollRef,style:{height:"100%",width:"100%"},children:k.jsx("div",{...r,ref:i.contentRef,children:typeof n=="function"?n(i):n})})}e.Content=t})(yi||(yi={}));function yp(){const e=P.useContext(gp);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const Ga=P.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:i,botAvatar:o,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:c,showMarquee:f=!0,showDateSystemMessage:u=!0,showMessageStatus:p=!0,showIncomingMessageAvatar:d=!0,showOutgoingMessageAvatar:m=!1,...h})=>{var C;const{messageList:g}=ge,y=P.useMemo(()=>u?Xh(t):t,[t]),b=P.useMemo(()=>{var A;const x=y.filter(T=>T.direction==="outgoing"&&T.status!=="pending");return(A=x[x.length-1])==null?void 0:A.id},[y]),w=x=>{if(x.direction==="incoming")return d;if(x.direction==="outgoing")return m};return k.jsxs(yi,{...h,resize:"smooth",initial:"instant",className:ir(g.container.className,e),children:[k.jsxs(yi.Content,{className:g.viewPort.className,children:[r&&k.jsx("span",{...g.headerMessage,children:r}),f&&k.jsx(fC,{botAvatar:o,botDescription:a,botName:s}),y.map(x=>{var A;return k.jsx(Ka,{renderers:i,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:p&&x.id===b,showAvatar:w(x),...x},((A=x.metadata)==null?void 0:A.clientMessageId)||x.id)}),n&&k.jsx(Ka,{id:hp(),renderers:i,sendMessage:l,direction:"incoming",timestamp:new Date,showAvatar:d,block:void 0,sender:((C=t.filter(x=>x.direction==="incoming").at(-1))==null?void 0:C.sender)??{name:s||"Bot",avatar:o},children:k.jsx(qa,{})})]}),k.jsx(bC,{})]})}),bC=()=>{const{isAtBottom:e,scrollToBottom:t}=yp(),{messageList:n}=ge;return e?null:k.jsx("button",{className:n.scrollDownButton.className,onClick:()=>t()})};Ga.displayName="MessageList";const vC=({className:e,...t})=>{const{className:n}=ge.loader;return k.jsx("div",{...t,className:ir(e,n)})};function bp({error:e,restartConversation:t,closeWindow:n}){let r,i;const{error:o}=ge;return e.type==="configuration"?(r="Configuration error",i=k.jsx(p0,{...o.icon})):e.type==="bot"?(r="Bot error",i=k.jsx(vu,{...o.icon})):e.type==="network"?(r="Network error",i=k.jsx(k0,{...o.icon})):e.type==="disconnected"?(r="Disconnected",i=k.jsx(v0,{...o.icon})):(r="Unexpected error",i=k.jsx(vu,{...o.icon})),k.jsx(wC,{error:e,title:r,icon:i,restartConversation:t,closeWindow:n})}function wC({error:e,title:t,icon:n,restartConversation:r,closeWindow:i}){const{error:o}=ge;return k.jsxs("div",{...o.container,children:[k.jsxs("div",{...o.header.container,children:[`Webchat ${e.type} error`,k.jsxs("div",{...o.header.actions,children:[r&&k.jsx(Va,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),i&&k.jsx(fp,{onClick:i,style:{color:"white",backgroundColor:"transparent"}})]})]}),k.jsxs("div",{...o.content,children:[n,k.jsx("div",{...o.errorTitle,children:t}),k.jsx("div",{...o.errorMessage,children:e.message}),e.id&&k.jsx("div",{...o.id,children:e.id})]})]})}const vp=({connected:e,configuration:t,isTyping:n,messages:r,user:i,isLoading:o,renderers:a,isReadOnly:s,disableComposer:l,allowFileUpload:c,error:f,participants:u,closeWindow:p,sendMessage:d,uploadFile:m,addMessageFeedback:h,restartConversation:g,clientId:y,storageKey:b,soundOn:w,toggleSound:C,...x})=>{const{color:A,fontFamily:T,radius:M,themeMode:z,variant:I,headerVariant:O,botAvatar:F,botDescription:N,botName:R,composerPlaceholder:D,footer:_,feedbackEnabled:U,additionalStylesheetUrl:$}=t,H={color:A,fontFamily:T,radius:M,themeMode:z,variant:I,headerVariant:O,additionalStylesheetUrl:$};U||(h=void 0);const v=P.useMemo(()=>i?Xs(r,u,i.id,R,F):[],[F,R,r,i,u]);return k.jsxs(k.Fragment,{children:[k.jsx(tp,{...H}),k.jsx(Ra,{connected:e,allowFileUpload:c,uploadFile:m,storageKey:b,...x,children:f?k.jsx(bp,{error:f,restartConversation:g,closeWindow:p}):k.jsxs(k.Fragment,{children:[k.jsx(dp,{closeWindow:p,configuration:t,restartConversation:g,clientId:y,soundOn:w,toggleSound:C}),o?k.jsx(vC,{}):k.jsx(Ga,{botAvatar:F,botDescription:N,botName:R,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:v}),k.jsx(xd,{sendMessage:d,uploadFile:m,connected:e,isReadOnly:s,disableComposer:l,footer:_,composerPlaceholder:D,allowFileUpload:c,storageKey:b})]})})]})};function xC(){const[e,t]=P.useState(!1),n=P.useRef(null);return{isTyping:e,setIsTyping:(r,i)=>{if(t(r),!r)return()=>{};if(n.current=new Date,!i)return()=>{};const o=setTimeout(()=>{const a=n.current;a&&new Date().getTime()-a.getTime()>i&&t(!1)},i+100);return()=>clearTimeout(o)}}}const wp={chatMessageNotification:new URL("data:audio/ogg;base64,T2dnUwACAAAAAAAAAAAVJAEzAAAAAOU+A6UBHgF2b3JiaXMAAAAAASJWAAD/////AH0AAP////+pAU9nZ1MAAAAAAAAAAAAAFSQBMwEAAAD3T/UfDpz////////////////FA3ZvcmJpcwwAAABMYXZmNjEuNy4xMDAEAAAAHwAAAGVuY29kZXI9TGF2YzYxLjE5LjEwMSBsaWJ2b3JiaXMrAAAAZW5jb2RlZF9ieT1BZG9iZSBQcmVtaWVyZSBQcm8gMjAyNS4wIChNYWNpbhcAAAB0aW1lX3JlZmVyZW5jZT0xMjExMDQwMA8AAABkYXRlPTIwMjUtMDgtMDUBBXZvcmJpcyJCQ1YBAEAAABhCECoFrWOOOsgVIYwZoqBCyinHHULQIaMkQ4g6xjXHGGNHuWSKQsmB0JBVAABAAACkHFdQckkt55xzoxhXzHHoIOecc+UgZ8xxCSXnnHOOOeeSco4x55xzoxhXDnIpLeecc4EUR4pxpxjnnHOkHEeKcagY55xzbTG3knLOOeecc+Ygh1JyrjXnnHOkGGcOcgsl55xzxiBnzHHrIOecc4w1t9RyzjnnnHPOOeecc84555xzjDHnnHPOOeecc24x5xZzrjnnnHPOOeccc84555xzIDRkFQCQAACgoSiK4igOEBqyCgDIAAAQQHEUR5EUS7Ecy9EkDQgNWQUAAAEACAAAoEiGpEiKpViOZmmeJnqiKJqiKquyacqyLMuy67ouEBqyCgBIAABQURTFcBQHCA1ZBQBkAAAIYCiKoziO5FiSpVmeB4SGrAIAgAAABAAAUAxHsRRN8STP8jzP8zzP8zzP8zzP8zzP8zzP8zwNCA1ZBQAgAAAAgihkGANCQ1YBAEAAAAghGhlDnVISXAoWQhwRQx1CzkOppYPgKYUlY9JTrEEIIXzvPffee++B0JBVAAAQAABhFDiIgcckCCGEYhQnRHGmIAghhOUkWMp56CQI3YMQQrice8u59957IDRkFQAACADAIIQQQgghhBBCCCmklFJIKaaYYoopxxxzzDHHIIMMMuigk046yaSSTjrKJKOOUmsptRRTTLHlFmOttdacc69BKWOMMcYYY4wxxhhjjDHGGCMIDVkFAIAAABAGGWSQQQghhBRSSCmmmHLMMcccA0JDVgEAgAAAAgAAABxFUiRHciRHkiTJkixJkzzLszzLszxN1ERNFVXVVW3X9m1f9m3f1WXf9mXb1WVdlmXdtW1d1l1d13Vd13Vd13Vd13Vd13Vd14HQkFUAgAQAgI7kOI7kOI7kSI6kSAoQGrIKAJABABAAgKM4iuNIjuRYjiVZkiZplmd5lqd5mqiJHhAasgoAAAQAEAAAAAAAgKIoiqM4jiRZlqZpnqd6oiiaqqqKpqmqqmqapmmapmmapmmapmmapmmapmmapmmapmmapmmapmmapmkCoSGrAAAJAAAdx3EcR3Ecx3EkR5IkIDRkFQAgAwAgAABDURxFcizHkjRLszzL00TP9FxRNnVTV20gNGQVAAAIACAAAAAAAADHczzHczzJkzzLczzHkzxJ0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRN0zRNA0JDVgIAZAAAEJOQSk6xV0YpxiS0XiqkFJPUe6iYYkw67alCBikHuYdKIaWg094ypZBSDHunmELIGOqhg5AxhbDX2nPPvfceCA1ZEQBEAQAAxiDGEGPIMSYlgxIxxyRkUiLnnJROSialpFZazKSEmEqLkXNOSiclk1JaC6llkkprJaYCAAACHAAAAiyEQkNWBABRAACIMUgppBRSSjGnmENKKceUY0gp5ZxyTjnHmHQQKucYdA5KpJRyjjmnnHMSMgeVcw5CJp0AAIAABwCAAAuh0JAVAUCcAACAkHOKMQgRYxBCCSmFUFKqnJPSQUmpg5JSSanFklKMlXNSOgkpdRJSKinFWFKKLaRUY2kt19JSjS3GnFuMvYaUYi2p1Vpaq7nFWHOLNffIOUqdlNY6Ka2l1mpNrdXaSWktpNZiaS3G1mLNKcacMymthZZiK6nF2GLLNbWYc2kt1xRjzynGnmusucecgzCt1ZxayznFmHvMseeYcw+Sc5Q6Ka11UlpLrdWaWqs1k9Jaaa3GkFqLLcacW4sxZ1JaLKnFWFqKMcWYc4st19BarinGnFOLOcdag5Kx9l5aqznFmHuKreeYczA2x547SrmW1nourfVecy5C1tyLaC3n1GoPKsaec87B2NyDEK3lnGrsPcXYe+45GNtz8K3W4FvNRcicg9C5+KZ7MEbV2oPMtQiZcxA66CJ08Ml4lGoureVcWus91hp8zTkI0VruKcbeU4u9156bsL0HIVrLPcXYg4ox+JpzMDrnYlStwcecg5C1FqF7L0rnIJSqtQeZa1Ay1yJ08MXooIsvAABgwAEAIMCEMlBoyIoAIE4AgEHIOaUYhEopCKGElEIoKVWMSciYg5IxJ6WUUloIJbWKMQiZY1Iyx6SEEloqJbQSSmmplNJaKKW1llqMKbUWQymphVJaK6W0llqqMbVWY8SYlMw5KZljUkoprZVSWqsck5IxKKmDkEopKcVSUouVc1Iy6Kh0EEoqqcRUUmmtpNJSKaXFklJsKcVUW4u1hlJaLKnEVlJqMbVUW4sx14gxKRlzUjLnpJRSUiultJY5J6WDjkrmoKSSUmulpBQz5qR0DkrKIKNSUootpRJTKKW1klJspaTWWoy1ptRaLSW1VlJqsZQSW4sx1xZLTZ2U1koqMYZSWmsx5ppaizGUElspKcaSSmytxZpbbDmGUlosqcRWSmqx1ZZja7Hm1FKNKbWaW2y5xpRTj7X2nFqrNbVUY2ux5lhbb7XWnDsprYVSWislxZhai7HFWHMoJbaSUmylpBhbbLm2FmMPobRYSmqxpBJjazHmGFuOqbVaW2y5ptRirbX2HFtuPaUWa4ux5tJSjTXX3mNNORUAADDgAAAQYEIZKDRkJQAQBQAAGMMYYxAapZxzTkqDlHPOScmcgxBCSplzEEJIKXNOQkotZc5BSKm1UEpKrcUWSkmptRYLAAAocAAACLBBU2JxgEJDVgIAUQAAiDFKMQahMUYp5yA0xijFGIRKKcack1ApxZhzUDLHnINQSuaccxBKCSGUUkpKIYRSSkmpAACAAgcAgAAbNCUWByg0ZEUAEAUAABhjnDPOIQqdpc5SJKmj1lFrKKUaS4ydxlZ767nTGnttuTeUSo2p1o5ry7nV3mlNPbccCwAAO3AAADuwEAoNWQkA5AEAEMYoxZhzzhmFGHPOOecMUow555xzijHnnIMQQsWYc85BCCFzzjkIoYSSOecchBBK6JyDUEoppXTOQQihlFI65yCEUkopnXMQSimllAIAgAocAAACbBTZnGAkqNCQlQBAHgAAYAxCzklprWHMOQgt1dgwxhyUlGKLnIOQUou5RsxBSCnGoDsoKbUYbPCdhJRaizkHk1KLNefeg0iptZqDzj3VVnPPvfecYqw1595zLwAAd8EBAOzARpHNCUaCCg1ZCQDkAQAQCCnFmHPOGaUYc8w554xSjDHmnHOKMcacc85BxRhjzjkHIWPMOecghJAx5pxzEELonHMOQgghdM45ByGEEDrnoIMQQgidcxBCCCGEAgCAChwAAAJsFNmcYCSo0JCVAEA4AAAAIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEELonHPOOeecc84555xzzjnnnHPOOScAyLfCAcD/wcYZVpLOCkeDCw1ZCQCEAwAACkEopWIQSiklkk46KZ2TUEopkYNSSumklFJKCaWUUkoIpZRSSggdlFJCKaWUUkoppZRSSimllFI6KaWUUkoppZTKOSmlk1JKKaVEzkkpIZRSSimlhFJKKaWUUkoppZRSSimllFJKKaWEEEIIIYQQQgghhBBCCCGEEEIIIYQQQgghhBBCCCGEEEIIIYQCALgbHAAgEmycYSXprHA0uNCQlQBASAAAoBRzjkoIKZSQUqiYoo5CKSmkUkoKEWPOSeochVBSKKmDyjkIpaSUQiohdc5BByWFkFIJIZWOOugolFBSKiWU0jkopYQUSkoplZBCSKl0lFIoJZWUQiohlVJKSCWVEEoKnaRUSgqppFRSCJ10kEInJaSSSgqpk5RSKiWllEpKJXRSQioppRBCSqmUEEpIKaVOUkmppBRCKCGFlFJKJaWSSkohlVRCCaWklFIooaRUUkoppZJSKQAA4MABACDACDrJqLIIG0248AAUGrISACADAECUdNZpp0kiCDFFmScNKcYgtaQswxBTkonxFGOMOShGQw4x5JQYF0oIoYNiPCaVQ8pQUbm31DkFxRZjfO+xFwEAAAgCAASEBAAYICiYAQAGBwgjBwIdAQQObQCAgQiZCQwKocFBJgA8QERIBQCJCYrShS4IIYJ0EWTxwIUTN5644YQObRAAAAAAABAA8AEAkFAAERHRzFVYXGBkaGxwdHh8gIQEAAAAAAAIAHwAACQiQERENHMVFhcYGRobHB0eHyAhAQAAAAAAAAAAQEBAAAAAAAAgAAAAQEBPZ2dTAASuMwAAAAAAABUkATMCAAAACYS6sR4BAUQxGR89NxobGiEkKCknJiYmJSUhISEaFgwBAQEAAnyfvULHAlAEJgh2vpgQBMHIyMjIyNhIQOjz+ePz58+fL89xAwYBAFaH//3//7/xNw0MBoNB6qlPfWrUKQng+/0FABAAhLEjKuHFBwA4AHC9Fx4Oh7EwDEOgvnJ3RtV+Op0+nU6n5cyzEwAoltTpwed5dgVKMPoru90zNHGA7F0CP98BAAAAAHl9ePviAgCW+3rugPIDwC6BbWoTAFEAAADh5GpCCACgc+0zxlAAVKddkjDsA14GDoJtf7R+NkE4W23hI5mF3d74iVGvzg9PpA4cCQs66joePTmOfhgl7vNZzYzQADDyz30FAGSvVUZ6wJ4MAKbCGeb4+v5NLIdK3YvrLkCu98uV//FpXQNyKAKAV7r186fTktcJJgjAlVp1fUmaGgtrdAAuDXYJSPs/AAAAAHDnAeHxciEUAB76CvfarGjDzIjALoEd+/0EAAAAQNYeMrkBAF6ZKm8xuw94NtgloHDUCAAAAIAMJ5Qz2iUAvjhKL8lkfmA6wi6BWfNHgiAAAABq4eeqGgCg8+LAAXQAfhgqz2RKHzAVYJeAynEAIQEAALwq6tFbIQAEEIIO8iULngMAXhgajrw3D5iFWhe7BLZNrwCVKAAA0t2TfT8mADx0aMfS4CULeACvA14YWnasNht80ZpdAhv8BEiiAADgcbm4jo0JANAVCTRV6JqQS0OTADoAXhg6zWy+AZ3GsiDRAYJzgiQAAICnb9FLAQAUNQFd44AioMNJICUAfhi67ZRjA2IMSHTAJK0KkgAAAG7W0uLlEgC6KnQdDkgBlAAdJAB+GHpL40hATAASHSC5CZIAAAAGZ3J60ioBoKsBTQKE5KFJIJFAAp4Y+jp7cg4qINEBi+MASQAAAM8rmdZcAKApwFhNPHQkQEBRQwIAnhj6OZ8KIBwDiQ4Q9ApIFAAAQHRFd6FEALA0NaApQAegnPrDA54Y+nN+AYAIJDoAfgIkCgAAcLRlPVsLALqmKqFpHIwUwQEJCwCeKPpzEQA8kOgAyTlBAgAAgPnK3q8jAWAuJFBYOsbAAgCeKPolEQA8rMFCohQAAMxD2BdSAJYFdNThKcCkBQCOgwKeGPpzEQA8rEEhCQAAoCz4MRGA41gaQMBRjACexHugAACeGPqFCAAeugQAAHryFgBdRYGFhGeow8x7AJ4Y+iURADyIigIAliFAAcYWCQC11gGeGPolEQA8UAAAABoODg4=",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Mi&&Mi.tagName.toUpperCase()==="SCRIPT"&&Mi.src||new URL("index.umd.cjs",document.baseURI).href).href};var kC=Object.defineProperty,SC=(e,t,n)=>t in e?kC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,EC=(e,t,n)=>SC(e,t+"",n),CC=async(e,t)=>{let n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},AC={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},IC=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},TC=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},OC=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xp=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(!t){let s=(e?i:i.map(l=>encodeURIComponent(l))).join(TC(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let o=IC(r),a=i.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):bi({allowReserved:e,name:n,value:s})).join(o);return r==="label"||r==="matrix"?o+a:a},bi=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},kp=({allowReserved:e,explode:t,name:n,style:r,value:i})=>{if(i instanceof Date)return`${n}=${i.toISOString()}`;if(r!=="deepObject"&&!t){let s=[];Object.entries(i).forEach(([c,f])=>{s=[...s,c,e?f:encodeURIComponent(f)]});let l=s.join(",");switch(r){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}let o=OC(r),a=Object.entries(i).map(([s,l])=>bi({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(o);return r==="label"||r==="matrix"?o+a:a},DC=/\{[^{}]+\}/g,MC=({path:e,url:t})=>{let n=t,r=t.match(DC);if(r)for(let i of r){let o=!1,a=i.substring(1,i.length-1),s="simple";a.endsWith("*")&&(o=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),s="label"):a.startsWith(";")&&(a=a.substring(1),s="matrix");let l=e[a];if(l==null)continue;if(Array.isArray(l)){n=n.replace(i,xp({explode:o,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(i,kp({explode:o,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(i,`;${bi({name:a,value:l})}`);continue}let c=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(i,c)}return n},Sp=({allowReserved:e,array:t,object:n}={})=>r=>{let i=[];if(r&&typeof r=="object")for(let o in r){let a=r[o];if(a!=null){if(Array.isArray(a)){i=[...i,xp({allowReserved:e,explode:!0,name:o,style:"form",value:a,...t})];continue}if(typeof a=="object"){i=[...i,kp({allowReserved:e,explode:!0,name:o,style:"deepObject",value:a,...n})];continue}i=[...i,bi({allowReserved:e,name:o,value:a})]}}return i.join("&")},PC=e=>{var t;if(!e)return"stream";let n=(t=e.split(";")[0])==null?void 0:t.trim();if(n){if(n.startsWith("application/json")||n.endsWith("+json"))return"json";if(n==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(r=>n.startsWith(r)))return"blob";if(n.startsWith("text/"))return"text"}},NC=async({security:e,...t})=>{for(let n of e){let r=await CC(n,t.auth);if(!r)continue;let i=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[i]=r;break;case"cookie":t.headers.append("Cookie",`${i}=${r}`);break;case"header":default:t.headers.set(i,r);break}return}},Ep=e=>_C({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Sp(e.querySerializer),url:e.url}),_C=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let o=i.startsWith("/")?i:`/${i}`,a=(e??"")+o;t&&(a=MC({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},Cp=(e,t)=>{var n;let r={...e,...t};return(n=r.baseUrl)!=null&&n.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=Ap(e.headers,t.headers),r},Ap=(...e)=>{let t=new Headers;for(let n of e){if(!n||typeof n!="object")continue;let r=n instanceof Headers?n.entries():Object.entries(n);for(let[i,o]of r)if(o===null)t.delete(i);else if(Array.isArray(o))for(let a of o)t.append(i,a);else o!==void 0&&t.set(i,typeof o=="object"?JSON.stringify(o):o)}return t},Ja=class{constructor(){EC(this,"_fns"),this._fns=[]}clear(){this._fns=[]}exists(t){return this._fns.indexOf(t)!==-1}eject(t){let n=this._fns.indexOf(t);n!==-1&&(this._fns=[...this._fns.slice(0,n),...this._fns.slice(n+1)])}use(t){this._fns=[...this._fns,t]}},LC=()=>({error:new Ja,request:new Ja,response:new Ja}),FC=Sp({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),RC={"Content-Type":"application/json"},Ip=(e={})=>({...AC,headers:RC,parseAs:"auto",querySerializer:FC,...e}),BC=(e={})=>{let t=Cp(Ip(),e),n=()=>({...t}),r=a=>(t=Cp(t,a),n()),i=LC(),o=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:Ap(t.headers,a.headers)};s.security&&await NC({...s,security:s.security}),s.body&&s.bodySerializer&&(s.body=s.bodySerializer(s.body)),(s.body===void 0||s.body==="")&&s.headers.delete("Content-Type");let l=Ep(s),c={redirect:"follow",...s},f=new Request(l,c);for(let g of i.request._fns)f=await g(f,s);let u=s.fetch,p=await u(f);for(let g of i.response._fns)p=await g(p,f,s);let d={request:f,response:p};if(p.ok){if(p.status===204||p.headers.get("Content-Length")==="0")return{data:{},...d};let g=(s.parseAs==="auto"?PC(p.headers.get("Content-Type")):s.parseAs)??"json";if(g==="stream")return{data:p.body,...d};let y=await p[g]();return g==="json"&&(s.responseValidator&&await s.responseValidator(y),s.responseTransformer&&(y=await s.responseTransformer(y))),{data:y,...d}}let m=await p.text();try{m=JSON.parse(m)}catch{}let h=m;for(let g of i.error._fns)h=await g(m,p,f,s);if(h=h||{},s.throwOnError)throw h;return{error:h,...d}};return{buildUrl:Ep,connect:a=>o({...a,method:"CONNECT"}),delete:a=>o({...a,method:"DELETE"}),get:a=>o({...a,method:"GET"}),getConfig:n,head:a=>o({...a,method:"HEAD"}),interceptors:i,options:a=>o({...a,method:"OPTIONS"}),patch:a=>o({...a,method:"PATCH"}),post:a=>o({...a,method:"POST"}),put:a=>o({...a,method:"PUT"}),request:o,setConfig:r,trace:a=>o({...a,method:"TRACE"})}},zC=BC,$C=Ip;const Ae=zC((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))($C({baseUrl:"https://webchat.botpress.cloud/"}))),jC=e=>(e.client??Ae).delete({url:"/conversations/{id}",...e}),UC=e=>(e.client??Ae).get({url:"/conversations/{id}",...e}),HC=e=>(e.client??Ae).get({url:"/conversations",...e}),WC=e=>(e.client??Ae).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),VC=e=>(e.client??Ae).get({url:"/conversations/{id}/messages",...e}),qC=e=>(e.client??Ae).get({url:"/conversations/{id}/participants",...e}),KC=e=>(e.client??Ae).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),YC=e=>(e.client??Ae).delete({url:"/conversations/{id}/participants/{userId}",...e}),QC=e=>(e.client??Ae).get({url:"/conversations/{id}/participants/{userId}",...e}),GC=e=>(e.client??Ae).delete({url:"/messages/{id}",...e}),JC=e=>(e.client??Ae).get({url:"/messages/{id}",...e}),ZC=e=>(e.client??Ae).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),XC=e=>(e.client??Ae).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),eA=e=>(e.client??Ae).delete({url:"/messages/{id}/feedback",...e}),tA=e=>(e.client??Ae).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),nA=e=>(e.client??Ae).delete({url:"/users/me",...e}),rA=e=>(e.client??Ae).get({url:"/users/me",...e}),iA=e=>(e.client??Ae).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),oA=e=>((e==null?void 0:e.client)??Ae).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),aA=e=>(e.client??Ae).get({url:"/events/{id}",...e}),sA=e=>(e.client??Ae).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),lA=e=>(e.client??Ae).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let Tp=class extends Error{constructor(t,n){super(t),this.name="ParseError",this.type=n.type,this.field=n.field,this.value=n.value,this.line=n.line}};function Za(e){}function cA(e){if(typeof e=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent:t=Za,onError:n=Za,onRetry:r=Za,onComment:i}=e;let o="",a=!0,s,l="",c="";function f(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[y,b]=uA(`${o}${g}`);for(const w of y)u(w);o=b,a=!1}function u(h){if(h===""){d();return}if(h.startsWith(":")){i&&i(h.slice(h.startsWith(": ")?2:1));return}const g=h.indexOf(":");if(g!==-1){const y=h.slice(0,g),b=h[g+1]===" "?2:1,w=h.slice(g+b);p(y,w,h);return}p(h,"",h)}function p(h,g,y){switch(h){case"event":c=g;break;case"data":l=`${l}${g}
|
|
291
|
+
`;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new Tp(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:y}));break;default:n(new Tp(`Unknown field "${h.length>20?`${h.slice(0,20)}…`:h}"`,{type:"unknown-field",field:h,value:g,line:y}));break}}function d(){l.length>0&&t({id:s,event:c||void 0,data:l.endsWith(`
|
|
292
|
+
`)?l.slice(0,-1):l}),s=void 0,l="",c=""}function m(h={}){o&&h.consume&&u(o),a=!0,s=void 0,l="",c="",o=""}return{feed:f,reset:m}}function uA(e){const t=[];let n="",r=0;for(;r<e.length;){const i=e.indexOf("\r",r),o=e.indexOf(`
|
|
293
|
+
`,r);let a=-1;if(i!==-1&&o!==-1?a=Math.min(i,o):i!==-1?a=i:o!==-1&&(a=o),a===-1){n=e.slice(r);break}else{const s=e.slice(r,a);t.push(s),r=a+1,e[r-1]==="\r"&&e[r]===`
|
|
294
|
+
`&&r++}}return[t,n]}class Op extends Event{constructor(t,n){var r,i;super(t),this.code=(r=n==null?void 0:n.code)!=null?r:void 0,this.message=(i=n==null?void 0:n.message)!=null?i:void 0}[Symbol.for("nodejs.util.inspect.custom")](t,n,r){return r(Dp(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(Dp(this),n)}}function fA(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Xa(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Xa).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Xa(e.cause)}`:e.message:`${e}`}function Dp(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var Mp=e=>{throw TypeError(e)},es=(e,t,n)=>t.has(e)||Mp("Cannot "+n),be=(e,t,n)=>(es(e,t,"read from private field"),n?n.call(e):t.get(e)),Le=(e,t,n)=>t.has(e)?Mp("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Ie=(e,t,n,r)=>(es(e,t,"write to private field"),t.set(e,n),n),Ct=(e,t,n)=>(es(e,t,"access private method"),n),Qe,Yt,gn,vi,wi,lr,yn,cr,Bt,bn,vn,wn,ur,ut,ts,ns,rs,Pp,is,os,fr,as,ss;class xi extends EventTarget{constructor(t,n){var r,i;super(),Le(this,ut),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Le(this,Qe),Le(this,Yt),Le(this,gn),Le(this,vi),Le(this,wi),Le(this,lr),Le(this,yn),Le(this,cr,null),Le(this,Bt),Le(this,bn),Le(this,vn,null),Le(this,wn,null),Le(this,ur,null),Le(this,ns,async o=>{var a;be(this,bn).reset();const{body:s,redirected:l,status:c,headers:f}=o;if(c===204){Ct(this,ut,fr).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Ie(this,gn,new URL(o.url)):Ie(this,gn,void 0),c!==200){Ct(this,ut,fr).call(this,`Non-200 status code (${c})`,c);return}if(!(f.get("content-type")||"").startsWith("text/event-stream")){Ct(this,ut,fr).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(be(this,Qe)===this.CLOSED)return;Ie(this,Qe,this.OPEN);const u=new Event("open");if((a=be(this,ur))==null||a.call(this,u),this.dispatchEvent(u),typeof s!="object"||!s||!("getReader"in s)){Ct(this,ut,fr).call(this,"Invalid response body, expected a web ReadableStream",c),this.close();return}const p=new TextDecoder,d=s.getReader();let m=!0;do{const{done:h,value:g}=await d.read();g&&be(this,bn).feed(p.decode(g,{stream:!h})),h&&(m=!1,be(this,bn).reset(),Ct(this,ut,as).call(this))}while(m)}),Le(this,rs,o=>{Ie(this,Bt,void 0),!(o.name==="AbortError"||o.type==="aborted")&&Ct(this,ut,as).call(this,Xa(o))}),Le(this,is,o=>{typeof o.id=="string"&&Ie(this,cr,o.id);const a=new MessageEvent(o.event||"message",{data:o.data,origin:be(this,gn)?be(this,gn).origin:be(this,Yt).origin,lastEventId:o.id||""});be(this,wn)&&(!o.event||o.event==="message")&&be(this,wn).call(this,a),this.dispatchEvent(a)}),Le(this,os,o=>{Ie(this,lr,o)}),Le(this,ss,()=>{Ie(this,yn,void 0),be(this,Qe)===this.CONNECTING&&Ct(this,ut,ts).call(this)});try{if(t instanceof URL)Ie(this,Yt,t);else if(typeof t=="string")Ie(this,Yt,new URL(t,dA()));else throw new Error("Invalid URL")}catch{throw fA("An invalid or illegal string was specified")}Ie(this,bn,cA({onEvent:be(this,is),onRetry:be(this,os)})),Ie(this,Qe,this.CONNECTING),Ie(this,lr,3e3),Ie(this,wi,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Ie(this,vi,(i=n==null?void 0:n.withCredentials)!=null?i:!1),Ct(this,ut,ts).call(this)}get readyState(){return be(this,Qe)}get url(){return be(this,Yt).href}get withCredentials(){return be(this,vi)}get onerror(){return be(this,vn)}set onerror(t){Ie(this,vn,t)}get onmessage(){return be(this,wn)}set onmessage(t){Ie(this,wn,t)}get onopen(){return be(this,ur)}set onopen(t){Ie(this,ur,t)}addEventListener(t,n,r){const i=n;super.addEventListener(t,i,r)}removeEventListener(t,n,r){const i=n;super.removeEventListener(t,i,r)}close(){be(this,yn)&&clearTimeout(be(this,yn)),be(this,Qe)!==this.CLOSED&&(be(this,Bt)&&be(this,Bt).abort(),Ie(this,Qe,this.CLOSED),Ie(this,Bt,void 0))}}Qe=new WeakMap,Yt=new WeakMap,gn=new WeakMap,vi=new WeakMap,wi=new WeakMap,lr=new WeakMap,yn=new WeakMap,cr=new WeakMap,Bt=new WeakMap,bn=new WeakMap,vn=new WeakMap,wn=new WeakMap,ur=new WeakMap,ut=new WeakSet,ts=function(){Ie(this,Qe,this.CONNECTING),Ie(this,Bt,new AbortController),be(this,wi)(be(this,Yt),Ct(this,ut,Pp).call(this)).then(be(this,ns)).catch(be(this,rs))},ns=new WeakMap,rs=new WeakMap,Pp=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...be(this,cr)?{"Last-Event-ID":be(this,cr)}:void 0},cache:"no-store",signal:(e=be(this,Bt))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},is=new WeakMap,os=new WeakMap,fr=function(e,t){var n;be(this,Qe)!==this.CLOSED&&Ie(this,Qe,this.CLOSED);const r=new Op("error",{code:t,message:e});(n=be(this,vn))==null||n.call(this,r),this.dispatchEvent(r)},as=function(e,t){var n;if(be(this,Qe)===this.CLOSED)return;Ie(this,Qe,this.CONNECTING);const r=new Op("error",{code:t,message:e});(n=be(this,vn))==null||n.call(this,r),this.dispatchEvent(r),Ie(this,yn,setTimeout(be(this,ss),be(this,lr)))},ss=new WeakMap,xi.CONNECTING=0,xi.OPEN=1,xi.CLOSED=2;function dA(){const e="document"in globalThis?globalThis.document:void 0;return e&&typeof e=="object"&&"baseURI"in e&&typeof e.baseURI=="string"?e.baseURI:void 0}async function pA(e){var t;const n=await e.clone().json();if((t=n==null?void 0:n.id)!=null&&t.startsWith("err_")){const r=new Error(n.message);throw r.id=n.id,r.code=n.code,r.type=n.type,r}return e}const Np=()=>{const e={};return{on:(t,n)=>{var r;return e[t]||(e[t]=new Set),(r=e[t])==null||r.add(n),()=>{var i;return(i=e[t])==null?void 0:i.delete(n)}},emit:(t,n)=>{var r,i;(r=e[t])==null||r.forEach(o=>o(n)),(i=e["*"])==null||i.forEach(o=>o({type:t,payload:n}))}}},Pe=e=>e.data,_p=10,Lp=3e3,hA="60000",mA={throwOnError:!0},gA=({conversationId:e,userToken:t,clientId:n,apiUrl:r,adminSecret:i})=>{let o=0,a=null;const s=Np(),l=()=>{a&&a.close();const c=`${`${r||Ae.getConfig().baseUrl}/${n}`}/initialize${e?`?conversationId=${e}`:""}`,f={...i?{"x-admin-secret":i}:{},...t?{"x-user-key":t}:{}};a=Rp(c,f),a.onopen=()=>s.emit("open"),a.onerror=u=>{o<_p?(o++,setTimeout(()=>l(),Lp)):s.emit("error",u)},a.onmessage=u=>{const p=Fp(u.data);s.emit(p.type,p.data)}};return l(),s.on},yA=({userKey:e,clientId:t,apiUrl:n,customHeaders:r})=>{const i={"x-user-key":e,...r},o=`${n||Ae.getConfig().baseUrl}/${t}`,a={...mA,baseUrl:o};return Ae.interceptors.response._fns.length===0&&Ae.interceptors.response.use(pA),{createConversation:()=>WC({...a,headers:i,body:{}}).then(Pe),getConversation:({conversationId:s})=>UC({...a,headers:i,path:{id:s}}).then(Pe),deleteConversation:({conversationId:s})=>jC({...a,headers:i,path:{id:s}}).then(Pe),listConversations:({nextToken:s})=>HC({...a,headers:i,query:{nextToken:s}}).then(Pe),listConversationMessages:({conversationId:s,nextToken:l})=>VC({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Pe),addParticipant:({conversationId:s,userId:l})=>KC({...a,headers:i,path:{id:s},body:{userId:l}}).then(Pe),removeParticipant:({conversationId:s,userId:l})=>YC({...a,headers:i,path:{id:s,userId:l}}).then(Pe),getParticipant:({conversationId:s,userId:l})=>QC({...a,headers:i,path:{id:s,userId:l}}).then(Pe),listParticipants:({conversationId:s,nextToken:l})=>qC({...a,headers:i,path:{id:s},query:{nextToken:l}}).then(Pe),createMessage:s=>XC({...a,headers:i,body:s}).then(Pe),updateMessage:({messageId:s,...l})=>ZC({...a,headers:i,path:{id:s},body:l}).then(Pe),getMessage:({messageId:s})=>JC({...a,headers:i,path:{id:s}}).then(Pe),deleteMessage:({messageId:s})=>GC({...a,headers:i,path:{id:s}}).then(Pe),createFile:s=>lA({...a,headers:i,body:s}).then(Pe),getUser:()=>rA({...a,headers:i}).then(Pe),updateUser:s=>iA({...a,headers:i,body:s}).then(Pe),deleteUser:()=>nA({...a,headers:i}).then(Pe),createEvent:s=>sA({...a,headers:i,body:s}).then(Pe),getEvent:({eventId:s})=>aA({...a,headers:i,path:{id:s}}).then(Pe),addMessageFeedback:({messageId:s,...l})=>tA({...a,headers:i,path:{id:s},body:l}).then(Pe),removeMessageFeedback:({messageId:s})=>eA({...a,headers:i,path:{id:s}}).then(Pe),generateUserKey:({adminSecret:s,...l})=>oA({...a,headers:{"x-admin-secret":s},body:l}).then(Pe),listenConversation:({conversationId:s})=>{let l=0,c=null;const f=Np(),u=()=>{c&&c.close();const p=`${o}/conversations/${s}/listen`;c=Rp(p,i),c.onopen=()=>f.emit("open"),c.onerror=d=>{l<_p?(l++,setTimeout(()=>u(),Lp)):f.emit("error",d)},c.onmessage=d=>{const m=Fp(d.data);f.emit(m.type,m.data)}};return u(),f.on}}},Fp=e=>{try{return JSON.parse(e)}catch{return e}},Rp=(e,t)=>new xi(e,{fetch:(n,r)=>fetch(n,{...r,headers:{...r==null?void 0:r.headers,...t,timeout:hA}})});function Bp({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminSecret:i,soundEnabled:o,...a}){var se;const s=Vu(n,r),l=s(K=>K.conversationId),c=s(K=>K.user),f=s(K=>K.setConversationId),u=s(K=>K.setUser),p=s(K=>K.clearConversationId),d=rn(K=>K.messages),m=rn(K=>K.saveMessage),h=rn(K=>K.updateMessage),g=rn(K=>K.fetchMessages),y=rn(K=>K.setMessages),b=rn(K=>K.clearMessages),w=qn(K=>K.participants),C=qn(K=>K.setParticipants),x=qn(K=>K.addParticipant),A=qn(K=>K.removeParticipant),T=qn(K=>K.clearParticipants),M=Ku(`webchat-sound-${t}`),z=M(K=>K.soundOn),I=M(K=>K.toggleSound),{isTyping:O,setIsTyping:F}=xC(),N=P.useMemo(()=>rl(),[]),[R,D]=P.useState("connecting"),[_,U]=P.useState(a.conversationId),[$,H]=P.useState(a.user),[v,L]=P.useState(void 0),[W,S]=P.useState(!1),[V,te]=P.useState(void 0),Y=P.useRef(!1),X=P.useRef(null),oe=P.useRef(o??!1);P.useEffect(()=>{oe.current=o??!1},[o]);const ae=P.useRef(z);P.useEffect(()=>{ae.current=z},[z]),P.useEffect(()=>{var De,Ue,He,qe;const K=bA(t,e);if(K){te(K),D("error");return}if(Y.current)return;Y.current=!0,F(!1),D("connecting"),X.current=new Audio,X.current.preload="auto",X.current.src=wp.chatMessageNotification,X.current.volume=.9;let Q;(De=a.user)!=null&&De.userToken&&a.conversationId?Q={conversationId:a.conversationId,userToken:(Ue=a.user)==null?void 0:Ue.userToken}:(He=a.user)!=null&&He.userToken?Q={conversationId:void 0,userToken:(qe=a.user)==null?void 0:qe.userToken}:Q={conversationId:l,userToken:c==null?void 0:c.userToken};const ue=gA({apiUrl:e,clientId:t,userToken:Q.userToken,conversationId:Q.conversationId,adminSecret:i});let he=[];const me=ue("init",({conversation:ee,messages:ce,participants:B,user:q})=>{const le=yA({clientId:t,apiUrl:e,userKey:q.userKey});le.createEvent({conversationId:ee.id,payload:{type:"conversation_started",data:{}}}).then(({event:re})=>{var de,Te;(Te=(de=re.payload.data)==null?void 0:de.status)!=null&&Te.isInitial&&N.emit("conversation",ee.id)}),he=[...he,ue("error",re=>{te(de=>de||dr(re)),D("error"),N.emit("error",new Error(`Connection to conversation lost: ${re==null?void 0:re.message}`))}),ue("message_created",re=>{const de=Wn(re);q.id!==de.authorId&&(oe.current&&ae.current&&X.current&&X.current.play().catch(()=>{}),F(!1),N.emit("isTyping",{isTyping:!1,timeout:0})),m(de),N.emit("message",de)}),ue("message_status_changed",re=>{var de;re.newStatus==="processing"&&h((de=re.message.metadata)==null?void 0:de.clientMessageId,{status:re.newStatus})}),ue("typing_started",()=>{F(!0),N.emit("isTyping",{isTyping:!0,timeout:5e3})}),ue("participant_added",re=>{x(re.participant),N.emit("participantAdded",re.participant)}),ue("participant_removed",re=>{A(re.participantId),N.emit("participantRemoved",re.participantId)}),ue("webchat_visibility",re=>N.emit("webchatVisibility",re.visibility)),ue("webchat_config",re=>N.emit("webchatConfig",re.config)),ue("custom",re=>N.emit("customEvent",re.event))],U(ee.id),f(ee.id),H({userId:q.id,userToken:q.userKey}),u({userId:q.id,userToken:q.userKey}),C(B),y(ce.reverse().map(re=>Wn(re)).filter(Boolean)),te(void 0),D("connected"),L(le)});return he.push(me),()=>{Y.current=!1,he.forEach(ee=>ee())}},[a.conversationId,(se=a.user)==null?void 0:se.userToken,W]);const J=async(K,Q)=>{const ue=Q||_;if(!K||!ue)return;const he=await g({client:K,conversationId:ue});y(he);const{participants:me}=await K.listParticipants({conversationId:ue});C(me)},G=async K=>{if(!K)throw new Error("Cannot start new conversation: client is not initialized");p(),b(),T(),U(void 0),S(Q=>!Q)};async function j(K,Q){const he=[{predicate:me=>me.message===Bi||me.type==="ResourceNotFound",recover:()=>G(Q)},{predicate:me=>me.type==="network"||me.type==="disconnected"||me.message===On,recover:()=>J(Q,_)}].find(me=>me.predicate(K));if(!he){D("error"),te(K);return}try{await Ks(he.recover,3,5e3),te(void 0),D("connected")}catch(me){te(dr(me)),D("error")}}if(R!=="connected"||!$||!_||!v)return{clientState:R,on:N.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{await G(v)},user:void 0,isTyping:void 0,participants:[],toggleSound:I,soundOn:z,error:V};const ne={sendMessage:async K=>{const Q=hp(),ue={id:Q,createdAt:new Date().toISOString(),userId:$.userId,conversationId:_,payload:K,metadata:{clientMessageId:Q,delivered:!1}},he=Wn(ue);he.status="pending",m(he);try{await v.createMessage({conversationId:_,payload:K,metadata:{clientMessageId:Q}})}catch(me){await j(dr(me),v),N.emit("error",me)}},sendEvent:async(K,Q)=>{await v.createEvent({conversationId:_,payload:{type:"custom",data:K},bindConversation:(Q==null?void 0:Q.bindConversation)??!0,bindUser:(Q==null?void 0:Q.bindUser)??!0})},uploadFile:async K=>{const{size:Q,name:ue}=K,me=await(B=>new Promise((q,le)=>{const re=new FileReader;re.onload=de=>{var Te;return q((Te=de.target)==null?void 0:Te.result)},re.onerror=de=>{var Te;return le((Te=de.target)==null?void 0:Te.error)},re.readAsArrayBuffer(B)}))(K),De=new Date;De.setDate(De.getDate()+30);const{file:{uploadUrl:Ue,contentType:He,url:qe}}=await v.createFile({size:Q,key:ue,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:De.toISOString()});await fetch(Ue,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":He},body:me});const ee=He.split("/").shift()??"",ce=_s(ee)?ee:"file";return{fileUrl:qe,name:ue,type:ce}},addMessageFeedback:async(K,Q)=>{h(K,{feedback:Q.value}),await v.addMessageFeedback({messageId:K,...Q})},getUser:async()=>{const{user:K}=await v.getUser();return K},updateUser:async K=>{const{user:Q}=await v.updateUser({name:K.name,pictureUrl:K.pictureUrl,userData:K.data});return Q}};return{clientState:"connected",on:N.on,client:ne,messages:d,conversationId:_,newConversation:async()=>{await G(v)},user:$,isTyping:O,participants:w,error:V,soundOn:z,toggleSound:I}}const bA=(e,t)=>{if(!e)return{type:"configuration",message:Ls};if(!URL.canParse(t))return{type:"configuration",message:Fs}},vA=({clientId:e,storageKey:t,configuration:n,allowFileUpload:r,apiUrl:i,user:o,conversationId:a,...s})=>{const l=t||`bp-webchat-${e}`,{clientState:c,client:f,isTyping:u,newConversation:p,messages:d,participants:m,user:h,error:g,soundOn:y,toggleSound:b}=Bp({clientId:e,apiUrl:i,conversationId:a,user:o,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminSecret:n==null?void 0:n.adminSecret,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:w,uploadFile:C,addMessageFeedback:x}=f??{};return k.jsx(vp,{configuration:n??{},user:h!=null&&h.userId?{id:h==null?void 0:h.userId}:void 0,isLoading:c==="connecting",isTyping:u,connected:c==="connected"?!0:c==="disconnected"?!1:void 0,messages:d,sendMessage:w,uploadFile:C,addMessageFeedback:x,allowFileUpload:r,restartConversation:p,...s,participants:m,error:g,clientId:e,soundOn:y,toggleSound:b})};var ls=E.forwardRef((e,t)=>{const{children:n,...r}=e,i=E.Children.toArray(n),o=i.find(xA);if(o){const a=o.props.children,s=i.map(l=>l===o?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:l);return k.jsx(cs,{...r,ref:t,children:E.isValidElement(a)?E.cloneElement(a,void 0,s):null})}return k.jsx(cs,{...r,ref:t,children:n})});ls.displayName="Slot";var cs=E.forwardRef((e,t)=>{const{children:n,...r}=e;if(E.isValidElement(n)){const i=SA(n),o=kA(r,n.props);return n.type!==E.Fragment&&(o.ref=t?Ba(t,i):i),E.cloneElement(n,o)}return E.Children.count(n)>1?E.Children.only(null):null});cs.displayName="SlotClone";var wA=({children:e})=>k.jsx(k.Fragment,{children:e});function xA(e){return E.isValidElement(e)&&e.type===wA}function kA(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...s)=>{o(...s),i(...s)}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function SA(e){var r,i;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var EA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],zt=EA.reduce((e,t)=>{const n=E.forwardRef((r,i)=>{const{asChild:o,...a}=r,s=o?ls:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),k.jsx(s,{...a,ref:i})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function CA(e,t){e&&Es.flushSync(()=>e.dispatchEvent(t))}function AA(e,t=globalThis==null?void 0:globalThis.document){const n=It(e);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var IA="DismissableLayer",us="dismissableLayer.update",TA="dismissableLayer.pointerDownOutside",OA="dismissableLayer.focusOutside",zp,$p=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jp=E.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:o,onInteractOutside:a,onDismiss:s,...l}=e,c=E.useContext($p),[f,u]=E.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=E.useState({}),m=Rt(t,T=>u(T)),h=Array.from(c.layers),[g]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),y=h.indexOf(g),b=f?h.indexOf(f):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,C=b>=y,x=PA(T=>{const M=T.target,z=[...c.branches].some(I=>I.contains(M));!C||z||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())},p),A=NA(T=>{const M=T.target;[...c.branches].some(I=>I.contains(M))||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},p);return AA(T=>{b===c.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},p),E.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(zp=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),Up(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=zp)}},[f,p,n,c]),E.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),Up())},[f,c]),E.useEffect(()=>{const T=()=>d({});return document.addEventListener(us,T),()=>document.removeEventListener(us,T)},[]),k.jsx(zt.div,{...l,ref:m,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:Et(e.onFocusCapture,A.onFocusCapture),onBlurCapture:Et(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:Et(e.onPointerDownCapture,x.onPointerDownCapture)})});jp.displayName=IA;var DA="DismissableLayerBranch",MA=E.forwardRef((e,t)=>{const n=E.useContext($p),r=E.useRef(null),i=Rt(t,r);return E.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),k.jsx(zt.div,{...e,ref:i})});MA.displayName=DA;function PA(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const o=s=>{if(s.target&&!r.current){let l=function(){Hp(TA,n,c,{discrete:!0})};const c={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",o)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",o),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function NA(e,t=globalThis==null?void 0:globalThis.document){const n=It(e),r=E.useRef(!1);return E.useEffect(()=>{const i=o=>{o.target&&!r.current&&Hp(OA,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Up(){const e=new CustomEvent(us);document.dispatchEvent(e)}function Hp(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?CA(i,o):i.dispatchEvent(o)}var fs="focusScope.autoFocusOnMount",ds="focusScope.autoFocusOnUnmount",Wp={bubbles:!1,cancelable:!0},_A="FocusScope",Vp=E.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...a}=e,[s,l]=E.useState(null),c=It(i),f=It(o),u=E.useRef(null),p=Rt(t,h=>l(h)),d=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const C=w.target;s.contains(C)?u.current=C:$t(u.current,{select:!0})},g=function(w){if(d.paused||!s)return;const C=w.relatedTarget;C!==null&&(s.contains(C)||$t(u.current,{select:!0}))},y=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&$t(s)};document.addEventListener("focusin",h),document.addEventListener("focusout",g);const b=new MutationObserver(y);return s&&b.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",h),document.removeEventListener("focusout",g),b.disconnect()}}},[r,s,d.paused]),E.useEffect(()=>{if(s){Yp.add(d);const h=document.activeElement;if(!s.contains(h)){const y=new CustomEvent(fs,Wp);s.addEventListener(fs,c),s.dispatchEvent(y),y.defaultPrevented||(LA($A(qp(s)),{select:!0}),document.activeElement===h&&$t(s))}return()=>{s.removeEventListener(fs,c),setTimeout(()=>{const y=new CustomEvent(ds,Wp);s.addEventListener(ds,f),s.dispatchEvent(y),y.defaultPrevented||$t(h??document.body,{select:!0}),s.removeEventListener(ds,f),Yp.remove(d)},0)}}},[s,c,f,d]);const m=E.useCallback(h=>{if(!n&&!r||d.paused)return;const g=h.key==="Tab"&&!h.altKey&&!h.ctrlKey&&!h.metaKey,y=document.activeElement;if(g&&y){const b=h.currentTarget,[w,C]=FA(b);w&&C?!h.shiftKey&&y===C?(h.preventDefault(),n&&$t(w,{select:!0})):h.shiftKey&&y===w&&(h.preventDefault(),n&&$t(C,{select:!0})):y===b&&h.preventDefault()}},[n,r,d.paused]);return k.jsx(zt.div,{tabIndex:-1,...a,ref:p,onKeyDown:m})});Vp.displayName=_A;function LA(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($t(r,{select:t}),document.activeElement!==n)return}function FA(e){const t=qp(e),n=Kp(t,e),r=Kp(t.reverse(),e);return[n,r]}function qp(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Kp(e,t){for(const n of e)if(!RA(n,{upTo:t}))return n}function RA(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 BA(e){return e instanceof HTMLInputElement&&"select"in e}function $t(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&BA(e)&&t&&e.select()}}var Yp=zA();function zA(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Qp(e,t),e.unshift(t)},remove(t){var n;e=Qp(e,t),(n=e[0])==null||n.resume()}}}function Qp(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function $A(e){return e.filter(t=>t.tagName!=="A")}var ps=0;function jA(){E.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gp()),document.body.insertAdjacentElement("beforeend",e[1]??Gp()),ps++,()=>{ps===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ps--}},[])}function Gp(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ki="right-scroll-bar-position",Si="width-before-scroll-bar",UA="with-scroll-bars-hidden",HA="--removed-body-scroll-bar-size";function hs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function WA(e,t){var n=P.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var VA=typeof window<"u"?E.useLayoutEffect:E.useEffect,Jp=new WeakMap;function qA(e,t){var n=WA(null,function(r){return e.forEach(function(i){return hs(i,r)})});return VA(function(){var r=Jp.get(n);if(r){var i=new Set(r),o=new Set(e),a=n.current;i.forEach(function(s){o.has(s)||hs(s,null)}),o.forEach(function(s){i.has(s)||hs(s,a)})}Jp.set(n,e)},[e]),n}function KA(e){return e}function YA(e,t){t===void 0&&(t=KA);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var a=t(o,r);return n.push(a),function(){n=n.filter(function(s){return s!==a})}},assignSyncMedium:function(o){for(r=!0;n.length;){var a=n;n=[],a.forEach(o)}n={push:function(s){return o(s)},filter:function(){return n}}},assignMedium:function(o){r=!0;var a=[];if(n.length){var s=n;n=[],s.forEach(o),a=n}var l=function(){var f=a;a=[],f.forEach(o)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(f){a.push(f),c()},filter:function(f){return a=a.filter(f),n}}}};return i}function QA(e){e===void 0&&(e={});var t=YA(null);return t.options=it({async:!0,ssr:!1},e),t}var Zp=function(e){var t=e.sideCar,n=Ju(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,it({},n))};Zp.isSideCarExport=!0;function GA(e,t){return e.useMedium(t),Zp}var Xp=QA(),ms=function(){},Ei=E.forwardRef(function(e,t){var n=E.useRef(null),r=E.useState({onScrollCapture:ms,onWheelCapture:ms,onTouchMoveCapture:ms}),i=r[0],o=r[1],a=e.forwardProps,s=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,u=e.shards,p=e.sideCar,d=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,y=e.as,b=y===void 0?"div":y,w=e.gapMode,C=Ju(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,A=qA([n,t]),T=it(it({},C),i);return E.createElement(E.Fragment,null,f&&E.createElement(x,{sideCar:Xp,removeScrollBar:c,shards:u,noRelative:d,noIsolation:m,inert:h,setCallbacks:o,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?E.cloneElement(E.Children.only(s),it(it({},T),{ref:A})):E.createElement(b,it({},T,{className:l,ref:A}),s))});Ei.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ei.classNames={fullWidth:Si,zeroRight:ki};var JA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ZA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=JA();return t&&e.setAttribute("nonce",t),e}function XA(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eI(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ZA())&&(XA(t,n),eI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nI=function(){var e=tI();return function(t,n){E.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},eh=function(){var e=nI(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},rI={left:0,top:0,right:0,gap:0},gs=function(e){return parseInt(e||"",10)||0},iI=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[gs(n),gs(r),gs(i)]},oI=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rI;var t=iI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},aI=eh(),xn="data-scroll-locked",sI=function(e,t,n,r){var i=e.left,o=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
295
|
+
.`.concat(UA,` {
|
|
295
296
|
overflow: hidden `).concat(r,`;
|
|
296
297
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
297
298
|
}
|
|
298
|
-
body[`).concat(
|
|
299
|
+
body[`).concat(xn,`] {
|
|
299
300
|
overflow: hidden `).concat(r,`;
|
|
300
301
|
overscroll-behavior: contain;
|
|
301
302
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
302
|
-
padding-left: `.concat(
|
|
303
|
-
padding-top: `).concat(
|
|
303
|
+
padding-left: `.concat(i,`px;
|
|
304
|
+
padding-top: `).concat(o,`px;
|
|
304
305
|
padding-right: `).concat(a,`px;
|
|
305
306
|
margin-left:0;
|
|
306
307
|
margin-top:0;
|
|
@@ -308,30 +309,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
308
309
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
309
310
|
}
|
|
310
311
|
|
|
311
|
-
.`).concat(
|
|
312
|
+
.`).concat(ki,` {
|
|
312
313
|
right: `).concat(s,"px ").concat(r,`;
|
|
313
314
|
}
|
|
314
315
|
|
|
315
|
-
.`).concat(
|
|
316
|
+
.`).concat(Si,` {
|
|
316
317
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
317
318
|
}
|
|
318
319
|
|
|
319
|
-
.`).concat(
|
|
320
|
+
.`).concat(ki," .").concat(ki,` {
|
|
320
321
|
right: 0 `).concat(r,`;
|
|
321
322
|
}
|
|
322
323
|
|
|
323
|
-
.`).concat(
|
|
324
|
+
.`).concat(Si," .").concat(Si,` {
|
|
324
325
|
margin-right: 0 `).concat(r,`;
|
|
325
326
|
}
|
|
326
327
|
|
|
327
|
-
body[`).concat(
|
|
328
|
-
`).concat(
|
|
328
|
+
body[`).concat(xn,`] {
|
|
329
|
+
`).concat(HA,": ").concat(s,`px;
|
|
329
330
|
}
|
|
330
|
-
`)},
|
|
331
|
+
`)},th=function(){var e=parseInt(document.body.getAttribute(xn)||"0",10);return isFinite(e)?e:0},lI=function(){E.useEffect(function(){return document.body.setAttribute(xn,(th()+1).toString()),function(){var e=th()-1;e<=0?document.body.removeAttribute(xn):document.body.setAttribute(xn,e.toString())}},[])},cI=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;lI();var o=E.useMemo(function(){return oI(i)},[i]);return E.createElement(aI,{styles:sI(o,!t,i,n?"":"!important")})},ys=!1;if(typeof window<"u")try{var Ci=Object.defineProperty({},"passive",{get:function(){return ys=!0,!0}});window.addEventListener("test",Ci,Ci),window.removeEventListener("test",Ci,Ci)}catch{ys=!1}var kn=ys?{passive:!1}:!1,uI=function(e){return e.tagName==="TEXTAREA"},nh=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!uI(e)&&n[t]==="visible")},fI=function(e){return nh(e,"overflowY")},dI=function(e){return nh(e,"overflowX")},rh=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=ih(e,r);if(i){var o=oh(e,r),a=o[1],s=o[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pI=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},hI=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ih=function(e,t){return e==="v"?fI(t):dI(t)},oh=function(e,t){return e==="v"?pI(t):hI(t)},mI=function(e,t){return e==="h"&&t==="rtl"?-1:1},gI=function(e,t,n,r,i){var o=mI(e,window.getComputedStyle(t).direction),a=o*r,s=n.target,l=t.contains(s),c=!1,f=a>0,u=0,p=0;do{if(!s)break;var d=oh(e,s),m=d[0],h=d[1],g=d[2],y=h-g-o*m;(m||y)&&ih(e,s)&&(u+=y,p+=m);var b=s.parentNode;s=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&(Math.abs(u)<1||!i)||!f&&(Math.abs(p)<1||!i))&&(c=!0),c},Ai=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ah=function(e){return[e.deltaX,e.deltaY]},sh=function(e){return e&&"current"in e?e.current:e},yI=function(e,t){return e[0]===t[0]&&e[1]===t[1]},bI=function(e){return`
|
|
331
332
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
332
333
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
333
|
-
`)},
|
|
334
|
+
`)},vI=0,Sn=[];function wI(e){var t=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(vI++)[0],o=E.useState(eh)[0],a=E.useRef(e);E.useEffect(function(){a.current=e},[e]),E.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var h=qo([e.lockRef.current],(e.shards||[]).map(sh),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var s=E.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var y=Ai(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-y[0],C="deltaY"in h?h.deltaY:b[1]-y[1],x,A=h.target,T=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in h&&T==="h"&&A.type==="range")return!1;var M=rh(T,A);if(!M)return!0;if(M?x=T:(x=T==="v"?"h":"v",M=rh(T,A)),!M)return!1;if(!r.current&&"changedTouches"in h&&(w||C)&&(r.current=x),!x)return!0;var z=r.current||x;return gI(z,g,h,z==="h"?w:C,!0)},[]),l=E.useCallback(function(h){var g=h;if(!(!Sn.length||Sn[Sn.length-1]!==o)){var y="deltaY"in g?ah(g):Ai(g),b=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&yI(x.delta,y)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(sh).filter(Boolean).filter(function(x){return x.contains(g.target)}),C=w.length>0?s(g,w[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),c=E.useCallback(function(h,g,y,b){var w={name:h,delta:g,target:y,should:b,shadowParent:xI(y)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=E.useCallback(function(h){n.current=Ai(h),r.current=void 0},[]),u=E.useCallback(function(h){c(h.type,ah(h),h.target,s(h,e.lockRef.current))},[]),p=E.useCallback(function(h){c(h.type,Ai(h),h.target,s(h,e.lockRef.current))},[]);E.useEffect(function(){return Sn.push(o),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:p}),document.addEventListener("wheel",l,kn),document.addEventListener("touchmove",l,kn),document.addEventListener("touchstart",f,kn),function(){Sn=Sn.filter(function(h){return h!==o}),document.removeEventListener("wheel",l,kn),document.removeEventListener("touchmove",l,kn),document.removeEventListener("touchstart",f,kn)}},[]);var d=e.removeScrollBar,m=e.inert;return E.createElement(E.Fragment,null,m?E.createElement(o,{styles:bI(i)}):null,d?E.createElement(cI,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function xI(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const kI=GA(Xp,wI);var lh=E.forwardRef(function(e,t){return E.createElement(Ei,it({},e,{ref:t,sideCar:kI}))});lh.classNames=Ei.classNames;var SI=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},En=new WeakMap,Ii=new WeakMap,Ti={},bs=0,ch=function(e){return e&&(e.host||ch(e.parentNode))},EI=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=ch(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},CI=function(e,t,n,r){var i=EI(t,Array.isArray(e)?e:[e]);Ti[n]||(Ti[n]=new WeakMap);var o=Ti[n],a=[],s=new Set,l=new Set(i),c=function(u){!u||s.has(u)||(s.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(p){if(s.has(p))f(p);else try{var d=p.getAttribute(r),m=d!==null&&d!=="false",h=(En.get(p)||0)+1,g=(o.get(p)||0)+1;En.set(p,h),o.set(p,g),a.push(p),h===1&&m&&Ii.set(p,!0),g===1&&p.setAttribute(n,"true"),m||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),s.clear(),bs++,function(){a.forEach(function(u){var p=En.get(u)-1,d=o.get(u)-1;En.set(u,p),o.set(u,d),p||(Ii.has(u)||u.removeAttribute(r),Ii.delete(u)),d||u.removeAttribute(n)}),bs--,bs||(En=new WeakMap,En=new WeakMap,Ii=new WeakMap,Ti={})}},AI=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=SI(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),CI(r,i,n,"aria-hidden")):function(){return null}},vs="Dialog",[uh,VT]=rp(vs),[II,bt]=uh(vs),fh=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:a=!0}=e,s=E.useRef(null),l=E.useRef(null),[c=!1,f]=ip({prop:r,defaultProp:i,onChange:o});return k.jsx(II,{scope:t,triggerRef:s,contentRef:l,contentId:mi(),titleId:mi(),descriptionId:mi(),open:c,onOpenChange:f,onOpenToggle:E.useCallback(()=>f(u=>!u),[f]),modal:a,children:n})};fh.displayName=vs;var dh="DialogTrigger",ph=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bt(dh,n),o=Rt(t,i.triggerRef);return k.jsx(zt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xs(i.open),...r,ref:o,onClick:Et(e.onClick,i.onOpenToggle)})});ph.displayName=dh;var TI="DialogPortal",[qT,hh]=uh(TI,{forceMount:void 0}),Oi="DialogOverlay",OI=E.forwardRef((e,t)=>{const n=hh(Oi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=bt(Oi,e.__scopeDialog);return o.modal?k.jsx(pi,{present:r||o.open,children:k.jsx(DI,{...i,ref:t})}):null});OI.displayName=Oi;var DI=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bt(Oi,n);return k.jsx(lh,{as:ls,allowPinchZoom:!0,shards:[i.contentRef],children:k.jsx(zt.div,{"data-state":xs(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Qt="DialogContent",mh=E.forwardRef((e,t)=>{const n=hh(Qt,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=bt(Qt,e.__scopeDialog);return k.jsx(pi,{present:r||o.open,children:o.modal?k.jsx(MI,{...i,ref:t}):k.jsx(PI,{...i,ref:t})})});mh.displayName=Qt;var MI=E.forwardRef((e,t)=>{const n=bt(Qt,e.__scopeDialog),r=E.useRef(null),i=Rt(t,n.contentRef,r);return E.useEffect(()=>{const o=r.current;if(o)return AI(o)},[]),k.jsx(gh,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Et(e.onCloseAutoFocus,o=>{var a;o.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:Et(e.onPointerDownOutside,o=>{const a=o.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&o.preventDefault()}),onFocusOutside:Et(e.onFocusOutside,o=>o.preventDefault())})}),PI=E.forwardRef((e,t)=>{const n=bt(Qt,e.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return k.jsx(gh,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,o),o.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=o.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),gh=E.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...a}=e,s=bt(Qt,n),l=E.useRef(null),c=Rt(t,l);return jA(),k.jsxs(k.Fragment,{children:[k.jsx(Vp,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:k.jsx(jp,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":xs(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(NI,{titleId:s.titleId}),k.jsx(LI,{contentRef:l,descriptionId:s.descriptionId})]})]})}),ws="DialogTitle",yh=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bt(ws,n);return k.jsx(zt.h2,{id:i.titleId,...r,ref:t})});yh.displayName=ws;var bh="DialogDescription",vh=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bt(bh,n);return k.jsx(zt.p,{id:i.descriptionId,...r,ref:t})});vh.displayName=bh;var wh="DialogClose",xh=E.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=bt(wh,n);return k.jsx(zt.button,{type:"button",...r,ref:t,onClick:Et(e.onClick,()=>i.onOpenChange(!1))})});xh.displayName=wh;function xs(e){return e?"open":"closed"}var kh="DialogTitleWarning",[KT,Sh]=qE(kh,{contentName:Qt,titleName:ws,docsSlug:"dialog"}),NI=({titleId:e})=>{const t=Sh(kh),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
334
335
|
|
|
335
336
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
336
337
|
|
|
337
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return
|
|
338
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return E.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_I="DialogDescriptionWarning",LI=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sh(_I).contentName}}.`;return E.useEffect(()=>{var o;const i=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},FI=fh,RI=ph,BI=mh,zI=yh,$I=vh,jI=xh;function Cn({open:e,onOpenChange:t,children:n}){const{modal:r}=ge;return k.jsxs(FI,{open:e,modal:!1,onOpenChange:t,children:[e&&k.jsx("div",{...r==null?void 0:r.overlay}),n]})}function UI({title:e,description:t,onConfirm:n,onCancel:r,confirmButtonText:i,cancelButtonText:o,children:a}){const{modal:s}=ge;return k.jsx(k.Fragment,{children:k.jsxs(BI,{...s.dialog.container,children:[k.jsx(zI,{...s.dialog.title,children:e}),k.jsx($I,{...s.dialog.description,children:t}),k.jsx("div",{...s.dialog.content.container,children:a}),k.jsxs("div",{...s.dialog.button.container,children:[i&&k.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:n,children:i}),o&&k.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:r,children:o})]})]})})}Cn.Button=RI,Cn.Close=jI,Cn.Content=UI;const Eh=P.forwardRef(({children:e,onClick:t,avatarUrl:n,botName:r,description:i,onClose:o,...a},s)=>{const{messagePreview:l}=ge,{container:c,closeButton:f,message:u,avatar:p,description:d}=l??{};return k.jsxs("div",{...a,...c,ref:s,onClick:t,children:[k.jsx(Nn,{src:n,...p,children:r||"Bot"}),k.jsx("p",{...u,children:e}),k.jsx("p",{...d,children:i}),k.jsx(Eu,{...f,onClick:m=>{m.stopPropagation(),o==null||o()}})]})});Eh.displayName="MessagePreview",ie.Avatar=Nn,ie.BOT_IS_BLOCKED=zs,ie.Block=qt,ie.CONFIG_ACCESS_DENIED=qh,ie.Chat=vp,ie.Composer=xd,ie.Container=Ra,ie.ErrorState=bp,ie.Fab=np,ie.Header=dp,ie.INVALID_API_URL=Fs,ie.INVALID_BOTPRESS_URL=Bs,ie.INVALID_CLIENT_ID=Rs,ie.INVALID_CONFIGURATION=Vh,ie.INVALID_CONFIG_URL=Wh,ie.INVALID_MESSAGE_CONTENT_TYPE=Us,ie.MISSING_API_URL=jh,ie.MISSING_BOT_ID=Uh,ie.MISSING_CLIENT_ID=Ls,ie.MISSING_CONFIG_URL=Hh,ie.Message=Ka,ie.MessageContext=Ho,ie.MessageList=Ga,ie.MessagePreview=Eh,ie.Modal=Cn,ie.ModalContext=Wo,ie.ModalProvider=ep,ie.NETWORK_ERROR=On,ie.NOT_A_PARTICIPANT=Bi,ie.QUOTA_EXCEEDED=$s,ie.RestartConversationButton=Va,ie.SOUND_EFFECTS=wp,ie.SSE_DISCONNECTED_ERROR=js,ie.StylesheetProvider=tp,ie.TypingIndicator=qa,ie.Webchat=vA,ie.commonApiErrorMap=$i,ie.enrichMessage=Xs,ie.fileTypes=Ns,ie.generateThemeOverride=dl,ie.generateThemeStylesheet=fl,ie.getUseChatSoundStore=Ku,ie.getUseWebchatClientStore=Vu,ie.integrationMessagePayloadToBlockPayload=Fu,ie.integrationMessageToBlockMessage=Wn,ie.isCommonApiErrorType=Ws,ie.isEventError=qs,ie.isFileType=_s,ie.isIntegrationError=Vs,ie.isWebhookHandlerErrorType=Hs,ie.mapToWebchatError=dr,ie.renderers=dd,ie.retryWithBackoff=Ks,ie.useMessageContext=Yu,ie.useModalContext=Vo,ie.useWebchat=Bp,ie.useWebchatStore=Fr,ie.webchatClasses=ge,ie.webhookHandlerErrorMap=zi,Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"})});
|