@botpress/webchat 3.2.2 → 3.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +8 -8
- package/dist/index.d.ts +129 -15
- package/dist/index.js +7443 -7291
- package/dist/index.umd.cjs +100 -95
- package/dist/style.css +1 -1
- package/package.json +3 -3
package/dist/index.umd.cjs
CHANGED
|
@@ -1,215 +1,220 @@
|
|
|
1
|
-
(function(se,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],C):(se=typeof globalThis<"u"?globalThis:se||self,C(se.Webchat={},se.ReactJsxRuntime,se.React,se.ReactDOM))})(this,function(se,C,P,Gd){"use strict";var fX=Object.defineProperty;var dX=(se,C,P)=>C in se?fX(se,C,{enumerable:!0,configurable:!0,writable:!0,value:P}):se[C]=P;var Kd=(se,C,P)=>dX(se,typeof C!="symbol"?C+"":C,P);function Yd(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 k=Yd(P),Xd=Yd(Gd);function aE(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=k.useMemo(()=>v,Object.values(v));return C.jsx(h.Provider,{value:g,children:d})}function u(f,p){const d=(p==null?void 0:p[e][l])||s,v=k.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,sE(o,...t)]}function sE(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function bn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ir=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function lE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function cE(...e){return t=>e.forEach(n=>lE(n,t))}var Jd=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(fE);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(_s,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(_s,{...r,ref:t,children:n})});Jd.displayName="Slot";var _s=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=pE(n);return k.cloneElement(n,{...dE(r,n.props),ref:t?cE(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});_s.displayName="SlotClone";var uE=({children:e})=>C.jsx(C.Fragment,{children:e});function fE(e){return k.isValidElement(e)&&e.type===uE}function dE(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 pE(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 hE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ds=hE.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Jd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Ms="Avatar",[vE,pX]=aE(Ms),[mE,Zd]=vE(Ms),Ns=k.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=k.useState("idle");return C.jsx(mE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:C.jsx(Ds.span,{...r,ref:t})})});Ns.displayName=Ms;var Qd="AvatarImage",Ls=k.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=Zd(Qd,n),s=gE(r),l=bn(c=>{o(c),a.onImageLoadingStatusChange(c)});return ir(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(Ds.img,{...i,ref:t,src:r}):null});Ls.displayName=Qd;var ep="AvatarFallback",Rs=k.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=Zd(ep,n),[a,s]=k.useState(r===void 0);return k.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&i.imageLoadingStatus!=="loaded"?C.jsx(Ds.span,{...o,ref:t}):null});Rs.displayName=ep;function gE(e){const[t,n]=k.useState("idle");return ir(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function Fs(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 yE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const bE=(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 tp(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const wE=2.4,SE=.2126729,xE=.7151522,EE=.072175,kE=.56,CE=.57,$E=.62,TE=.65,ci=.022,np=1.414,OE=1.14,IE=1.14,PE=.035991,AE=.035991,_E=27.7847239587675,DE=27.7847239587675,rp=.027,op=.027,ip=.001,ME=5e-4;function ap(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**wE;return SE*o(t)+xE*o(n)+EE*o(r)}function sp(e,t){if(!e||!t)return 0;let n=ap(Fs(e)),r=ap(Fs(t)),o=0,i=0;return n=n>ci?n:n+(ci-n)**np,r=r>ci?r:r+(ci-r)**np,Math.abs(r-n)<ME?0:(r>n?(o=(r**kE-n**CE)*OE,i=o<ip?0:o<PE?o-o*_E*rp:o-rp):(o=(r**TE-n**$E)*IE,i=o>-ip?0:o>-AE?o-o*DE*op:o+op),Math.abs(i*100))}function lp(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function cp(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Lt=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 up={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Lt,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 M=["th","st","nd","rd"],L=B%100;return"["+B+(M[(L-20)%10]||M[L]||M[0])+"]"}},w=function(B,M,L){var G=String(B);return!G||G.length>=M?B:""+Array(M+1-G.length).join(L)+B},$={s:w,z:function(B){var M=-B.utcOffset(),L=Math.abs(M),G=Math.floor(L/60),H=L%60;return(M<=0?"+":"-")+w(G,2,"0")+":"+w(H,2,"0")},m:function B(M,L){if(M.date()<L.date())return-B(L,M);var G=12*(L.year()-M.year())+(L.month()-M.month()),H=M.clone().add(G,f),A=L-H<0,y=M.clone().add(G+(A?-1:1),f);return+(-(G+(L-H)/(A?H-y:y-H))||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",E={};E[x]=b;var T="$isDayjsObject",R=function(B){return B instanceof F||!(!B||!B[T])},U=function B(M,L,G){var H;if(!M)return x;if(typeof M=="string"){var A=M.toLowerCase();E[A]&&(H=A),L&&(E[A]=L,H=A);var y=M.split("-");if(!H&&y.length>1)return B(y[0])}else{var _=M.name;E[_]=M,H=_}return!G&&H&&(x=H),H||!G&&x},O=function(B,M){if(R(B))return B.clone();var L=typeof M=="object"?M:{};return L.date=B,L.args=arguments,new F(L)},D=$;D.l=U,D.i=R,D.w=function(B,M){return O(B,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var F=function(){function B(L){this.$L=U(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[T]=!0}var M=B.prototype;return M.parse=function(L){this.$d=function(G){var H=G.date,A=G.utc;if(H===null)return new Date(NaN);if(D.u(H))return new Date;if(H instanceof Date)return new Date(H);if(typeof H=="string"&&!/Z$/i.test(H)){var y=H.match(g);if(y){var _=y[2]-1||0,I=(y[7]||"0").substring(0,3);return A?new Date(Date.UTC(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,I)):new Date(y[1],_,y[3]||1,y[4]||0,y[5]||0,y[6]||0,I)}}return new Date(H)}(L),this.init()},M.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},M.$utils=function(){return D},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(L,G){var H=O(L);return this.startOf(G)<=H&&H<=this.endOf(G)},M.isAfter=function(L,G){return O(L)<this.startOf(G)},M.isBefore=function(L,G){return this.endOf(G)<O(L)},M.$g=function(L,G,H){return D.u(L)?this[G]:this.set(H,L)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(L,G){var H=this,A=!!D.u(G)||G,y=D.p(L),_=function(Q,X){var J=D.w(H.$u?Date.UTC(H.$y,X,Q):new Date(H.$y,X,Q),H);return A?J:J.endOf(c)},I=function(Q,X){return D.w(H.toDate()[Q].apply(H.toDate("s"),(A?[0,0,0,0]:[23,59,59,999]).slice(X)),H)},S=this.$W,N=this.$M,K=this.$D,V="set"+(this.$u?"UTC":"");switch(y){case d:return A?_(1,0):_(31,11);case f:return A?_(1,N):_(0,N+1);case u:var Y=this.$locale().weekStart||0,Z=(S<Y?S+7:S)-Y;return _(A?K-Z:K+(6-Z),N);case c:case v:return I(V+"Hours",0);case l:return I(V+"Minutes",1);case s:return I(V+"Seconds",2);case a:return I(V+"Milliseconds",3);default:return this.clone()}},M.endOf=function(L){return this.startOf(L,!1)},M.$set=function(L,G){var H,A=D.p(L),y="set"+(this.$u?"UTC":""),_=(H={},H[c]=y+"Date",H[v]=y+"Date",H[f]=y+"Month",H[d]=y+"FullYear",H[l]=y+"Hours",H[s]=y+"Minutes",H[a]=y+"Seconds",H[i]=y+"Milliseconds",H)[A],I=A===c?this.$D+(G-this.$W):G;if(A===f||A===d){var S=this.clone().set(v,1);S.$d[_](I),S.init(),this.$d=S.set(v,Math.min(this.$D,S.daysInMonth())).$d}else _&&this.$d[_](I);return this.init(),this},M.set=function(L,G){return this.clone().$set(L,G)},M.get=function(L){return this[D.p(L)]()},M.add=function(L,G){var H,A=this;L=Number(L);var y=D.p(G),_=function(N){var K=O(A);return D.w(K.date(K.date()+Math.round(N*L)),A)};if(y===f)return this.set(f,this.$M+L);if(y===d)return this.set(d,this.$y+L);if(y===c)return _(1);if(y===u)return _(7);var I=(H={},H[s]=r,H[l]=o,H[a]=n,H)[y]||1,S=this.$d.getTime()+L*I;return D.w(S,this)},M.subtract=function(L,G){return this.add(-1*L,G)},M.format=function(L){var G=this,H=this.$locale();if(!this.isValid())return H.invalidDate||h;var A=L||"YYYY-MM-DDTHH:mm:ssZ",y=D.z(this),_=this.$H,I=this.$m,S=this.$M,N=H.weekdays,K=H.months,V=H.meridiem,Y=function(X,J,q,ne){return X&&(X[J]||X(G,A))||q[J].slice(0,ne)},Z=function(X){return D.s(_%12||12,X,"0")},Q=V||function(X,J,q){var ne=X<12?"AM":"PM";return q?ne.toLowerCase():ne};return A.replace(m,function(X,J){return J||function(q){switch(q){case"YY":return String(G.$y).slice(-2);case"YYYY":return D.s(G.$y,4,"0");case"M":return S+1;case"MM":return D.s(S+1,2,"0");case"MMM":return Y(H.monthsShort,S,K,3);case"MMMM":return Y(K,S);case"D":return G.$D;case"DD":return D.s(G.$D,2,"0");case"d":return String(G.$W);case"dd":return Y(H.weekdaysMin,G.$W,N,2);case"ddd":return Y(H.weekdaysShort,G.$W,N,3);case"dddd":return N[G.$W];case"H":return String(_);case"HH":return D.s(_,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return Q(_,I,!0);case"A":return Q(_,I,!1);case"m":return String(I);case"mm":return D.s(I,2,"0");case"s":return String(G.$s);case"ss":return D.s(G.$s,2,"0");case"SSS":return D.s(G.$ms,3,"0");case"Z":return y}return null}(X)||y.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(L,G,H){var A,y=this,_=D.p(G),I=O(L),S=(I.utcOffset()-this.utcOffset())*r,N=this-I,K=function(){return D.m(y,I)};switch(_){case d:A=K()/12;break;case f:A=K();break;case p:A=K()/3;break;case u:A=(N-S)/6048e5;break;case c:A=(N-S)/864e5;break;case l:A=N/o;break;case s:A=N/r;break;case a:A=N/n;break;default:A=N}return H?A:D.a(A)},M.daysInMonth=function(){return this.endOf(f).$D},M.$locale=function(){return E[this.$L]},M.locale=function(L,G){if(!L)return this.$L;var H=this.clone(),A=U(L,G,!0);return A&&(H.$L=A),H},M.clone=function(){return D.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},B}(),j=F.prototype;return O.prototype=j,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",v]].forEach(function(B){j[B[1]]=function(M){return this.$g(M,B[0],B[1])}}),O.extend=function(B,M){return B.$i||(B(M,F,O),B.$i=!0),O},O.locale=U,O.isDayjs=R,O.unix=function(B){return O(1e3*B)},O.en=E[x],O.Ls=E,O.p={},O})})(up);var NE=up.exports;const ui=be(NE);var fp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Lt,function(){return function(n,r,o){r.prototype.isToday=function(){var i="YYYY-MM-DD",a=o();return this.format(i)===a.format(i)}}})})(fp);var LE=fp.exports;const RE=be(LE);var dp={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(Lt,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)}}})})(dp);var FE=dp.exports;const jE=be(FE);ui.extend(RE),ui.extend(jE);function pp(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 BE(e,t="day"){var r,o,i;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(hp(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;!ui(s).isSame(l,t)&&l&&n.push(hp(l))}return n}function hp(e){return{id:vp(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:vp(e)}}}function vp(e,t=!1){const n=ui(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 zE(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 UE(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function HE(e,t){return e.map(n=>Math.round(n*t))}const Zr=e=>t=>UE(t,e),Qr=e=>t=>HE(t,e),VE={50:Zr(.95),100:Zr(.9),200:Zr(.75),300:Zr(.6),400:Zr(.3),500:e=>e,600:Qr(.9),700:Qr(.6),800:Qr(.45),900:Qr(.3),950:Qr(.2)};function mp(e,t=VE){const n={},r=zE(e);for(const[o,i]of Object.entries(t))n[o]=WE(i(r));return n}function gp(e){const{fontFamily:t,...n}=e,r=yp(n);return lp(":root",r)+qE(t)}const qE=e=>{if(!e)return"";const n={Inter:"var(--inter-font)",Rubik:"var(--rubik-font)","IBM Plex Sans":"var(--ibm-font)","Fira Code":"var(--fira-font)"}[e]||`'${e}', sans-serif`;return lp(".bpReset",{"font-family":n})};function yp(e){const{radius:t,themeMode:n,color:r,variant:o,headerVariant:i}=e;let a={},s={};if(r){const p=mp(r),d=n==="dark"?tp(p):p,v=mp(yE(bE(Fs(r)))),h=n==="dark"?tp(v):v,g=n==="dark"?"#101010":"#fdfdfd";s=Object.entries({...d,1:g}).reduce((b,[w,$])=>({...b,[`--bpPrimary-${w}`]:$}),{});const m=Object.entries({...h,1:g}).reduce((b,[w,$])=>({...b,[`--bpGray-${w}`]:$}),{});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?sp(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?sp(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 KE=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))}),bp=["audio","file","image","video"],wp=e=>bp.includes(e),Sp="The Client ID is required to initialize the webchat.",GE="The API url is required to initialize the webchat.",YE="The Bot ID is required to initialize the webchat.",XE="No config URL provided.",xp=`Invalid API URL.
|
|
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.`,js={ResourceNotFound:{type:"configuration",message:Ep},Forbidden:{type:"bot",message:Cp}},Bs={MethodNotFound:{type:"configuration",message:kp},QuotaExceeded:{type:"bot",message:$p},Forbidden:{type:"bot",message:Tp}};function Ap(e){return e in js}function _p(e){return e in Bs}function Dp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Mp(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const ek=["networkerror","failedtofetch","errorininputstream"],fi=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return Dp(e)?e.message.includes("[Webhook Handler]")&&Ap(e.type)?t={id:e.id,...js[e.type]}:_p(e.type)?t={id:e.id,...Bs[e.type]}:t={id:e.id,type:e.type,message:e.message}:Mp(e)?Np(e.message)?t={type:"disconnected",message:Ip}:Lp(e.message).includes("invalidcontenttype")?t={type:"bot",message:Pp}:t={type:"event",message:e.message}:e instanceof Error&&Np(e.message)&&(t={type:"network",message:Op}),t};function Np(e){return ek.some(t=>Lp(e).includes(t))}function Lp(e){return e.replaceAll(" ","").toLowerCase()}const di=P.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=cp(e??"",15);return C.jsxs(Ns,{ref:a,"data-color":s,...n,...i,children:[C.jsx(Ls,{src:t,...r}),C.jsx(Rs,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});di.displayName="Avatar";function hX(){}function vX(){}function tk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const nk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ok={};function Rp(e,t){return(ok.jsx?rk:nk).test(e)}const ik=/[ \t\n\f\r]/g;function ak(e){return typeof e=="object"?e.type==="text"?Fp(e.value):!1:Fp(e)}function Fp(e){return e.replace(ik,"")===""}class eo{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}eo.prototype.property={},eo.prototype.normal={},eo.prototype.space=null;function jp(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 eo(n,r,t)}function zs(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 sk=0;const de=jn(),He=jn(),Bp=jn(),te=jn(),Me=jn(),ar=jn(),Et=jn();function jn(){return 2**++sk}const Ws=Object.freeze(Object.defineProperty({__proto__:null,boolean:de,booleanish:He,commaOrSpaceSeparated:Et,commaSeparated:ar,number:te,overloadedBoolean:Bp,spaceSeparated:Me},Symbol.toStringTag,{value:"Module"})),Us=Object.keys(Ws);class Hs extends It{constructor(t,n,r,o){let i=-1;if(super(t,n),zp(this,"space",o),typeof r=="number")for(;++i<Us.length;){const a=Us[i];zp(this,Us[i],(r&Ws[a])===Ws[a])}}}Hs.prototype.defined=!0;function zp(e,t,n){n&&(e[t]=n)}const lk={}.hasOwnProperty;function sr(e){const t={},n={};let r;for(r in e.properties)if(lk.call(e.properties,r)){const o=e.properties[r],i=new Hs(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[zs(r)]=r,n[zs(i.attribute)]=r}return new eo(t,n,e.space)}const Wp=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}}),Up=sr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Hp(e,t){return t in e?e[t]:t}function Vp(e,t){return Hp(e,t.toLowerCase())}const qp=sr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Vp,properties:{xmlns:null,xmlnsXLink:null}}),Kp=sr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:He,ariaAutoComplete:null,ariaBusy:He,ariaChecked:He,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:Me,ariaCurrent:null,ariaDescribedBy:Me,ariaDetails:null,ariaDisabled:He,ariaDropEffect:Me,ariaErrorMessage:null,ariaExpanded:He,ariaFlowTo:Me,ariaGrabbed:He,ariaHasPopup:null,ariaHidden:He,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Me,ariaLevel:te,ariaLive:null,ariaModal:He,ariaMultiLine:He,ariaMultiSelectable:He,ariaOrientation:null,ariaOwns:Me,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:He,ariaReadOnly:He,ariaRelevant:null,ariaRequired:He,ariaRoleDescription:Me,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:He,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null}}),ck=sr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Vp,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ar,acceptCharset:Me,accessKey:Me,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Me,autoFocus:de,autoPlay:de,blocking:Me,capture:null,charSet:null,checked:de,cite:null,className:Me,cols:te,colSpan:null,content:null,contentEditable:He,controls:de,controlsList:Me,coords:te|ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:Bp,draggable:He,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Me,height:te,hidden:de,high:te,href:null,hrefLang:null,htmlFor:Me,httpEquiv:Me,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Me,itemRef:Me,itemScope:de,itemType:Me,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:te,pattern:null,ping:Me,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Me,required:de,reversed:de,rows:te,rowSpan:te,sandbox:Me,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:He,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:He,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Me,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:He,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:te,security:null,unselectable:null}}),uk=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:Hp,properties:{about:Et,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,className:Me,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:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,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:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:Et,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,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:te,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:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Me,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Et,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Et,rev:Et,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Et,requiredFeatures:Et,requiredFonts:Et,requiredFormats:Et,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:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:Et,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Et,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Et,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),fk=/^data[-\w.:]+$/i,Gp=/-[a-z]/g,dk=/[A-Z]/g;function pk(e,t){const n=zs(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"&&fk.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(Gp,vk);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!Gp.test(i)){let a=i.replace(dk,hk);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Hs}return new o(r,t)}function hk(e){return"-"+e.toLowerCase()}function vk(e){return e.charAt(1).toUpperCase()}const mk={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"},gk=jp([Up,Wp,qp,Kp,ck],"html"),Vs=jp([Up,Wp,qp,Kp,uk],"svg");function yk(e){return e.join(" ").trim()}var Yp={},Xp=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,bk=/\n/g,wk=/^\s*/,Sk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,xk=/^:\s*/,Ek=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,kk=/^[;\s]*/,Ck=/^\s+|\s+$/g,$k=`
|
|
11
|
-
`,Jp="/",Zp="*",Bn="",Tk="comment",Ok="declaration",Ik=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(bk);h&&(n+=h.length);var g=v.lastIndexOf($k);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(wk)}function u(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=i();if(!(Jp!=e.charAt(0)||Zp!=e.charAt(1))){for(var h=2;Bn!=e.charAt(h)&&(Zp!=e.charAt(h)||Jp!=e.charAt(h+1));)++h;if(h+=2,Bn===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:Tk,comment:g})}}function p(){var v=i(),h=l(Sk);if(h){if(f(),!l(xk))return s("property missing ':'");var g=l(Ek),m=v({type:Ok,property:Qp(h[0].replace(Xp,Bn)),value:g?Qp(g[0].replace(Xp,Bn)):Bn});return l(kk),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 Qp(e){return e?e.replace(Ck,Bn):Bn}var Pk=Lt&&Lt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Yp,"__esModule",{value:!0});var eh=Yp.default=_k,Ak=Pk(Ik);function _k(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Ak.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 Dk=eh.default||eh,th=nh("end"),qs=nh("start");function nh(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 Mk(e){const t=qs(e),n=th(e);if(t&&n)return{start:t,end:n}}function to(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?rh(e.position):"start"in e||"end"in e?rh(e):"line"in e||"column"in e?Ks(e):""}function Ks(e){return oh(e&&e.line)+":"+oh(e&&e.column)}function rh(e){return Ks(e&&e.start)+"-"+Ks(e&&e.end)}function oh(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=to(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 Gs={}.hasOwnProperty,Nk=new Map,Lk=/[A-Z]/g,Rk=/-([a-z])/g,Fk=new Set(["table","tbody","thead","tfoot","tr"]),jk=new Set(["td","th"]),ih="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Bk(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=Gk(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=Kk(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"?Vs:gk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=ah(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function ah(e,t,n){if(t.type==="element")return zk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Wk(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hk(e,t,n);if(t.type==="mdxjsEsm")return Uk(e,t);if(t.type==="root")return Vk(e,t,n);if(t.type==="text")return qk(e,t)}function zk(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Vs,e.schema=o),e.ancestors.push(t);const i=lh(e,t.tagName,!1),a=Yk(e,t);let s=Xs(e,t);return Fk.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!ak(l):!0})),sh(e,a,i,t),Ys(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Wk(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)}no(e,t.position)}function Uk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);no(e,t.position)}function Hk(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Vs,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:lh(e,t.name,!0),a=Xk(e,t),s=Xs(e,t);return sh(e,a,i,t),Ys(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function Vk(e,t,n){const r={};return Ys(r,Xs(e,t)),e.create(t,e.Fragment,r,n)}function qk(e,t){return t.value}function sh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ys(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Kk(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 Gk(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=qs(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 Yk(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Gs.call(t.properties,o)){const i=Jk(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&jk.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 Xk(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 no(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 no(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function Xs(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:Nk;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=ah(e,i,a);s!==void 0&&n.push(s)}return n}function Jk(e,t,n){const r=pk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?tk(n):yk(n)),r.property==="style"){let o=typeof n=="object"?n:Zk(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Qk(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?mk[r.property]||r.property:r.attribute,n]}}function Zk(e,t){const n={};try{Dk(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=ih+"#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(Rk,tC)),n[a]=i}}function lh(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=Rp(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=Rp(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return Gs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);no(e)}function no(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=ih+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Qk(e){const t={};let n;for(n in e)Gs.call(e,n)&&(t[eC(n)]=e[n]);return t}function eC(e){let t=e.replace(Lk,nC);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function tC(e,t){return t.toUpperCase()}function nC(e){return"-"+e.toLowerCase()}const Js={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"]},rC={};function Zs(e,t){const n=rC,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ch(e,r,o)}function ch(e,t,n){if(oC(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 uh(e.children,t,n)}return Array.isArray(e)?uh(e,t,n):""}function uh(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=ch(e[o],t,n);return r.join("")}function oC(e){return!!(e&&typeof e=="object")}const fh=document.createElement("i");function Qs(e){const t="&"+e+";";fh.innerHTML=t;const n=fh.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 At(e,t){return e.length>0?(Pt(e,e.length,0,t),e):t}const dh={}.hasOwnProperty;function ph(e){const t={};let n=-1;for(;++n<e.length;)iC(t,e[n]);return t}function iC(e,t){let n;for(n in t){const o=(dh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){dh.call(o,a)||(o[a]=[]);const s=i[a];aC(o[a],Array.isArray(s)?s:s?[s]:[])}}}function aC(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 hh(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 Rt(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const dt=wn(/[A-Za-z]/),lt=wn(/[\dA-Za-z]/),sC=wn(/[#-'*+\--9=?A-Z^-~]/);function pi(e){return e!==null&&(e<32||e===127)}const el=wn(/\d/),lC=wn(/[\dA-Fa-f]/),cC=wn(/[!-/:-@[-`{-~]/);function ue(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function ve(e){return e===-2||e===-1||e===32}const hi=wn(new RegExp("\\p{P}|\\p{S}","u")),zn=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 ve(l)?(e.enter(n),s(l)):t(l)}function s(l){return ve(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const uC={tokenize:fC};function fC(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 ue(s)?(e.consume(s),e.exit("chunkText"),i):(e.consume(s),a)}}const dC={tokenize:pC},vh={tokenize:hC};function pC(e){const t=this,n=[];let r=0,o,i,a;return s;function s(w){if(r<n.length){const $=n[r];return t.containerState=$[1],e.attempt($[0].continuation,l,c)(w)}return c(w)}function l(w){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&b();const $=t.events.length;let x=$,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}m(r);let T=$;for(;T<t.events.length;)t.events[T][1].end=Object.assign({},E),T++;return Pt(t.events,x+1,0,t.events.slice($)),t.events.length=T,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(vh,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(vh,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 ue(w)?(e.consume(w),g(e.exit("chunkFlow")),r=0,t.interrupt=void 0,s):(e.consume(w),h)}function g(w,$){const x=t.sliceStream(w);if($&&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 E=o.events.length;for(;E--;)if(o.events[E][1].start.offset<a&&(!o.events[E][1].end||o.events[E][1].end.offset>a))return;const T=t.events.length;let R=T,U,O;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(U){O=t.events[R][1].end;break}U=!0}for(m(r),E=T;E<t.events.length;)t.events[E][1].end=Object.assign({},O),E++;Pt(t.events,R+1,0,t.events.slice(T)),t.events.length=E}}function m(w){let $=n.length;for(;$-- >w;){const x=n[$];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 hC(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 vi(e){if(e===null||_e(e)||zn(e))return 1;if(hi(e))return 2}function mi(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 tl={name:"attention",tokenize:mC,resolveAll:vC};function vC(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);mh(f,-l),mh(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=At(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=At(c,[["enter",o,t],["enter",a,t],["exit",a,t],["enter",i,t]]),c=At(c,mi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=At(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=At(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 mC(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=vi(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=vi(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 mh(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const gC={name:"autolink",tokenize:yC};function yC(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 dt(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||pi(d)?n(d):(e.consume(d),l)}function c(d){return d===64?(e.consume(d),u):sC(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 ro={tokenize:bC,partial:!0};function bC(e,t,n){return r;function r(i){return ve(i)?we(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||ue(i)?t(i):n(i)}}const gh={name:"blockQuote",tokenize:wC,continuation:{tokenize:SC},exit:xC};function wC(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 ve(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function SC(e,t,n){const r=this;return o;function o(a){return ve(a)?we(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(gh,t,n)(a)}}function xC(e){e.exit("blockQuote")}const yh={name:"characterEscape",tokenize:EC};function EC(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 cC(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const bh={name:"characterReference",tokenize:kC};function kC(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=lC,u):(e.enter("characterReferenceValue"),i=7,a=el,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===lt&&!Qs(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 wh={tokenize:$C,partial:!0},Sh={name:"codeFenced",tokenize:CC,concrete:!0};function CC(e,t,n){const r=this,o={tokenize:x,partial:!0};let i=0,a=0,s;return l;function l(E){return c(E)}function c(E){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===s?(a++,e.consume(E),u):a<3?n(E):(e.exit("codeFencedFenceSequence"),ve(E)?we(e,f,"whitespace")(E):f(E))}function f(E){return E===null||ue(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(wh,h,$)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||ue(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):ve(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),we(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||ue(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===null||ue(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),v)}function h(E){return e.attempt(o,$,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return i>0&&ve(E)?we(e,b,"linePrefix",i+1)(E):b(E)}function b(E){return E===null||ue(E)?e.check(wh,h,$)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||ue(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),w)}function $(E){return e.exit("codeFenced"),t(E)}function x(E,T,R){let U=0;return O;function O(M){return E.enter("lineEnding"),E.consume(M),E.exit("lineEnding"),D}function D(M){return E.enter("codeFencedFence"),ve(M)?we(E,F,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):F(M)}function F(M){return M===s?(E.enter("codeFencedFenceSequence"),j(M)):R(M)}function j(M){return M===s?(U++,E.consume(M),j):U>=a?(E.exit("codeFencedFenceSequence"),ve(M)?we(E,B,"whitespace")(M):B(M)):R(M)}function B(M){return M===null||ue(M)?(E.exit("codeFencedFence"),T(M)):R(M)}}}function $C(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 nl={name:"codeIndented",tokenize:OC},TC={tokenize:IC,partial:!0};function OC(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):ue(c)?e.attempt(TC,a,l)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||ue(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),s)}function l(c){return e.exit("codeIndented"),t(c)}}function IC(e,t,n){const r=this;return o;function o(a){return r.parser.lazy[r.now().line]?n(a):ue(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):ue(a)?o(a):n(a)}}const PC={name:"codeText",tokenize:DC,resolve:AC,previous:_C};function AC(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 _C(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function DC(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)):ue(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||ue(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 MC{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&&oo(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),oo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),oo(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);oo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);oo(this.left,n.reverse())}}}function oo(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 xh(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new MC(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,NC(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 NC(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 LC={tokenize:jC,resolve:FC},RC={tokenize:BC,partial:!0};function FC(e){return xh(e),e}function jC(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):ue(s)?e.check(RC,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 BC(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||ue(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 Eh(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||pi(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||ue(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||pi(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 kh(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):ue(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||ue(d)||s++>999?(e.exit("chunkString"),u(d)):(e.consume(d),l||(l=!ve(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function Ch(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):ue(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||ue(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 io(e,t){let n;return r;function r(o){return ue(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):ve(o)?we(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const zC={name:"definition",tokenize:UC},WC={tokenize:HC,partial:!0};function UC(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return kh.call(r,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function s(d){return o=Rt(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)?io(e,c)(d):c(d)}function c(d){return Eh(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(WC,f,f)(d)}function f(d){return ve(d)?we(e,p,"whitespace")(d):p(d)}function p(d){return d===null||ue(d)?(e.exit("definition"),r.parser.defined.push(o),t(d)):n(d)}}function HC(e,t,n){return r;function r(s){return _e(s)?io(e,o)(s):n(s)}function o(s){return Ch(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return ve(s)?we(e,a,"whitespace")(s):a(s)}function a(s){return s===null||ue(s)?t(s):n(s)}}const VC={name:"hardBreakEscape",tokenize:qC};function qC(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),o}function o(i){return ue(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const KC={name:"headingAtx",tokenize:YC,resolve:GC};function GC(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 YC(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||ue(u)?(e.exit("atxHeading"),t(u)):ve(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 XC=["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"],$h=["pre","script","style","textarea"],JC={name:"htmlFlow",tokenize:t$,resolveTo:e$,concrete:!0},ZC={tokenize:r$,partial:!0},QC={tokenize:n$,partial:!0};function e$(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 t$(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):dt(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):dt(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 N="CDATA[";return S===N.charCodeAt(s++)?(e.consume(S),s===N.length?r.interrupt?t:F:v):n(S)}function h(S){return dt(S)?(e.consume(S),a=String.fromCharCode(S),g):n(S)}function g(S){if(S===null||S===47||S===62||_e(S)){const N=S===47,K=a.toLowerCase();return!N&&!i&&$h.includes(K)?(o=1,r.interrupt?t(S):F(S)):XC.includes(a.toLowerCase())?(o=6,N?(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 ve(S)?(e.consume(S),b):O(S)}function w(S){return S===47?(e.consume(S),O):S===58||S===95||dt(S)?(e.consume(S),$):ve(S)?(e.consume(S),w):O(S)}function $(S){return S===45||S===46||S===58||S===95||lt(S)?(e.consume(S),$):x(S)}function x(S){return S===61?(e.consume(S),E):ve(S)?(e.consume(S),x):w(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,T):ve(S)?(e.consume(S),E):R(S)}function T(S){return S===l?(e.consume(S),l=null,U):S===null||ue(S)?n(S):(e.consume(S),T)}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 U(S){return S===47||S===62||ve(S)?w(S):n(S)}function O(S){return S===62?(e.consume(S),D):n(S)}function D(S){return S===null||ue(S)?F(S):ve(S)?(e.consume(S),D):n(S)}function F(S){return S===45&&o===2?(e.consume(S),L):S===60&&o===1?(e.consume(S),G):S===62&&o===4?(e.consume(S),_):S===63&&o===3?(e.consume(S),y):S===93&&o===5?(e.consume(S),A):ue(S)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(ZC,I,j)(S)):S===null||ue(S)?(e.exit("htmlFlowData"),j(S)):(e.consume(S),F)}function j(S){return e.check(QC,B,I)(S)}function B(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),M}function M(S){return S===null||ue(S)?j(S):(e.enter("htmlFlowData"),F(S))}function L(S){return S===45?(e.consume(S),y):F(S)}function G(S){return S===47?(e.consume(S),a="",H):F(S)}function H(S){if(S===62){const N=a.toLowerCase();return $h.includes(N)?(e.consume(S),_):F(S)}return dt(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),H):F(S)}function A(S){return S===93?(e.consume(S),y):F(S)}function y(S){return S===62?(e.consume(S),_):S===45&&o===2?(e.consume(S),y):F(S)}function _(S){return S===null||ue(S)?(e.exit("htmlFlowData"),I(S)):(e.consume(S),_)}function I(S){return e.exit("htmlFlow"),t(S)}}function n$(e,t,n){const r=this;return o;function o(a){return ue(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 r$(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ro,t,n)}}const o$={name:"htmlText",tokenize:i$};function i$(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):dt(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):dt(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):ue(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?L(y):y===45?p(y):f(y)}function v(y){const _="CDATA[";return y===_.charCodeAt(i++)?(e.consume(y),i===_.length?h:v):n(y)}function h(y){return y===null?n(y):y===93?(e.consume(y),g):ue(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?L(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?L(y):ue(y)?(a=b,G(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),$):ue(y)?(a=w,G(y)):(e.consume(y),w)}function $(y){return y===62?L(y):w(y)}function x(y){return dt(y)?(e.consume(y),E):n(y)}function E(y){return y===45||lt(y)?(e.consume(y),E):T(y)}function T(y){return ue(y)?(a=T,G(y)):ve(y)?(e.consume(y),T):L(y)}function R(y){return y===45||lt(y)?(e.consume(y),R):y===47||y===62||_e(y)?U(y):n(y)}function U(y){return y===47?(e.consume(y),L):y===58||y===95||dt(y)?(e.consume(y),O):ue(y)?(a=U,G(y)):ve(y)?(e.consume(y),U):L(y)}function O(y){return y===45||y===46||y===58||y===95||lt(y)?(e.consume(y),O):D(y)}function D(y){return y===61?(e.consume(y),F):ue(y)?(a=D,G(y)):ve(y)?(e.consume(y),D):U(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,j):ue(y)?(a=F,G(y)):ve(y)?(e.consume(y),F):(e.consume(y),B)}function j(y){return y===o?(e.consume(y),o=void 0,M):y===null?n(y):ue(y)?(a=j,G(y)):(e.consume(y),j)}function B(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||_e(y)?U(y):(e.consume(y),B)}function M(y){return y===47||y===62||_e(y)?U(y):n(y)}function L(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"),H}function H(y){return ve(y)?we(e,A,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y):A(y)}function A(y){return e.enter("htmlTextData"),a(y)}}const rl={name:"labelEnd",tokenize:f$,resolveTo:u$,resolveAll:c$},a$={tokenize:d$},s$={tokenize:p$},l$={tokenize:h$};function c$(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 u$(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=At(s,e.slice(i+1,i+r+3)),s=At(s,[["enter",u,t]]),s=At(s,mi(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),s=At(s,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),s=At(s,e.slice(a+1)),s=At(s,[["exit",l,t]]),Pt(e,i,e.length,s),e}function f$(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(Rt(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(a$,u,a?u:f)(p):p===91?e.attempt(s$,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(l$,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function d$(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)?io(e,i)(f):i(f)}function i(f){return f===41?u(f):Eh(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _e(f)?io(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?Ch(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return _e(f)?io(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 p$(e,t,n){const r=this;return o;function o(s){return kh.call(r,e,i,a,"reference","referenceMarker","referenceString")(s)}function i(s){return r.parser.defined.includes(Rt(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function a(s){return n(s)}}function h$(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 v$={name:"labelStartImage",tokenize:m$,resolveAll:rl.resolveAll};function m$(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 g$={name:"labelStartLink",tokenize:y$,resolveAll:rl.resolveAll};function y$(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 ol={name:"lineEnding",tokenize:b$};function b$(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),we(e,t,"linePrefix")}}const gi={name:"thematicBreak",tokenize:w$};function w$(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||ue(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===o?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ve(c)?we(e,s,"whitespace")(c):s(c))}}const vt={name:"list",tokenize:E$,continuation:{tokenize:k$},exit:$$},S$={tokenize:T$,partial:!0},x$={tokenize:C$,partial:!0};function E$(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:el(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(gi,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 el(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(ro,r.interrupt?n:u,e.attempt(S$,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return ve(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 k$(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ro,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||!ve(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(x$,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,we(e,e.attempt(vt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function C$(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 $$(e){e.exit(this.containerState.type)}function T$(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!ve(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Th={name:"setextUnderline",tokenize:I$,resolveTo:O$};function O$(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 I$(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"),ve(c)?we(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||ue(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const P$={tokenize:A$};function A$(e){const t=this,n=e.attempt(ro,r,e.attempt(this.parser.constructs.flowInitial,o,we(e,e.attempt(this.parser.constructs.flow,o,e.attempt(LC,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 _$={resolveAll:Ih()},D$=Oh("string"),M$=Oh("text");function Oh(e){return{tokenize:t,resolveAll:Ih(e==="text"?N$: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 Ih(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 N$(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 L$(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:$,attempt:T(x),check:T(E),interrupt:T(E,{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(D){return a=At(a,D),g(),a[a.length-1]!==null?[]:(R(t,0),c.events=mi(i,c.events,c),c.events)}function p(D,F){return F$(d(D),F)}function d(D){return R$(a,D)}function v(){const{line:D,column:F,offset:j,_index:B,_bufferIndex:M}=r;return{line:D,column:F,offset:j,_index:B,_bufferIndex:M}}function h(D){o[D.line]=D.column,O()}function g(){let D;for(;r._index<a.length;){const F=a[r._index];if(typeof F=="string")for(D=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===D&&r._bufferIndex<F.length;)m(F.charCodeAt(r._bufferIndex));else m(F)}}function m(D){u=u(D)}function b(D){ue(D)?(r.line++,r.column=1,r.offset+=D===-3?2:1,O()):D!==-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=D}function w(D,F){const j=F||{};return j.type=D,j.start=v(),c.events.push(["enter",j,c]),s.push(j),j}function $(D){const F=s.pop();return F.end=v(),c.events.push(["exit",F,c]),F}function x(D,F){R(D,F.from)}function E(D,F){F.restore()}function T(D,F){return j;function j(B,M,L){let G,H,A,y;return Array.isArray(B)?I(B):"tokenize"in B?I([B]):_(B);function _(V){return Y;function Y(Z){const Q=Z!==null&&V[Z],X=Z!==null&&V.null,J=[...Array.isArray(Q)?Q:Q?[Q]:[],...Array.isArray(X)?X:X?[X]:[]];return I(J)(Z)}}function I(V){return G=V,H=0,V.length===0?L:S(V[H])}function S(V){return Y;function Y(Z){return y=U(),A=V,V.partial||(c.currentConstruct=V),V.name&&c.parser.constructs.disable.null.includes(V.name)?K():V.tokenize.call(F?Object.assign(Object.create(c),F):c,l,N,K)(Z)}}function N(V){return D(A,y),M}function K(V){return y.restore(),++H<G.length?S(G[H]):L}}}function R(D,F){D.resolveAll&&!i.includes(D)&&i.push(D),D.resolve&&Pt(c.events,F,c.events.length-F,D.resolve(c.events.slice(F),c)),D.resolveTo&&(c.events=D.resolveTo(c.events,c))}function U(){const D=v(),F=c.previous,j=c.currentConstruct,B=c.events.length,M=Array.from(s);return{restore:L,from:B};function L(){r=D,c.previous=F,c.currentConstruct=j,c.events.length=B,s=M,O()}}function O(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function R$(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 F$(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(se,C){typeof exports=="object"&&typeof module<"u"?C(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],C):(se=typeof globalThis<"u"?globalThis:se||self,C(se.Webchat={},se.ReactJsxRuntime,se.React,se.ReactDOM))})(this,function(se,C,O,tp){"use strict";var wQ=Object.defineProperty;var SQ=(se,C,O)=>C in se?wQ(se,C,{enumerable:!0,configurable:!0,writable:!0,value:O}):se[C]=O;var Ms=(se,C,O)=>SQ(se,typeof C!="symbol"?C+"":C,O);var Ns=typeof document<"u"?document.currentScript:null;function np(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 k=np(O),rp=np(tp);function hE(e,t=[]){let n=[];function r(i,a){const s=k.createContext(a),l=n.length;n=[...n,a];function c(f){const{scope:p,children:d,...v}=f,h=(p==null?void 0:p[e][l])||s,g=k.useMemo(()=>v,Object.values(v));return C.jsx(h.Provider,{value:g,children:d})}function u(f,p){const d=(p==null?void 0:p[e][l])||s,v=k.useContext(d);if(v)return v;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${i}\``)}return c.displayName=i+"Provider",[c,u]}const o=()=>{const i=n.map(a=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,vE(o,...t)]}function vE(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function bn(e){const t=k.useRef(e);return k.useEffect(()=>{t.current=e}),k.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var ir=globalThis!=null&&globalThis.document?k.useLayoutEffect:()=>{};function mE(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function gE(...e){return t=>e.forEach(n=>mE(n,t))}var op=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(bE);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(Rs,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(Rs,{...r,ref:t,children:n})});op.displayName="Slot";var Rs=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=SE(n);return k.cloneElement(n,{...wE(r,n.props),ref:t?gE(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});Rs.displayName="SlotClone";var yE=({children:e})=>C.jsx(C.Fragment,{children:e});function bE(e){return k.isValidElement(e)&&e.type===yE}function wE(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 SE(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 xE=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ls=xE.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?op:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),Fs="Avatar",[EE,xQ]=hE(Fs),[CE,ip]=EE(Fs),Bs=k.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,i]=k.useState("idle");return C.jsx(CE,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:i,children:C.jsx(Ls.span,{...r,ref:t})})});Bs.displayName=Fs;var ap="AvatarImage",js=k.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...i}=e,a=ip(ap,n),s=kE(r),l=bn(c=>{o(c),a.onImageLoadingStatusChange(c)});return ir(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?C.jsx(Ls.img,{...i,ref:t,src:r}):null});js.displayName=ap;var sp="AvatarFallback",zs=k.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,i=ip(sp,n),[a,s]=k.useState(r===void 0);return k.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),a&&i.imageLoadingStatus!=="loaded"?C.jsx(Ls.span,{...o,ref:t}):null});zs.displayName=sp;function kE(e){const[t,n]=k.useState("idle");return ir(()=>{if(!e){n("error");return}let r=!0;const o=new window.Image,i=a=>()=>{r&&n(a)};return n("loading"),o.onload=i("loaded"),o.onerror=i("error"),o.src=e,()=>{r=!1}},[e]),t}function lp(e,t){let n=`${e} {`;for(const[r,o]of Object.entries(t))n+=`${r}: ${o}; `;return n+="}",n}function cp(e,t){let n=0;if(e.length==0)return n;for(let r=0;r<e.length;r++){const o=e.charCodeAt(r);n=(n<<5)-n+o,n=n&n}return Math.abs(n)%t}var Rt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ye(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var up={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(F){var D=["th","st","nd","rd"],L=F%100;return"["+F+(D[(L-20)%10]||D[L]||D[0])+"]"}},w=function(F,D,L){var q=String(F);return!q||q.length>=D?F:""+Array(D+1-q.length).join(L)+F},A={s:w,z:function(F){var D=-F.utcOffset(),L=Math.abs(D),q=Math.floor(L/60),W=L%60;return(D<=0?"+":"-")+w(q,2,"0")+":"+w(W,2,"0")},m:function F(D,L){if(D.date()<L.date())return-F(L,D);var q=12*(L.year()-D.year())+(L.month()-D.month()),W=D.clone().add(q,f),I=L-W<0,y=D.clone().add(q+(I?-1:1),f);return+(-(q+(L-W)/(I?W-y:y-W))||0)},a:function(F){return F<0?Math.ceil(F)||0:Math.floor(F)},p:function(F){return{M:f,y:d,w:u,d:c,D:v,h:l,m:s,s:a,ms:i,Q:p}[F]||String(F||"").toLowerCase().replace(/s$/,"")},u:function(F){return F===void 0}},x="en",E={};E[x]=b;var $="$isDayjsObject",R=function(F){return F instanceof U||!(!F||!F[$])},K=function F(D,L,q){var W;if(!D)return x;if(typeof D=="string"){var I=D.toLowerCase();E[I]&&(W=I),L&&(E[I]=L,W=I);var y=D.split("-");if(!W&&y.length>1)return F(y[0])}else{var P=D.name;E[P]=D,W=P}return!q&&W&&(x=W),W||!q&&x},T=function(F,D){if(R(F))return F.clone();var L=typeof D=="object"?D:{};return L.date=F,L.args=arguments,new U(L)},M=A;M.l=K,M.i=R,M.w=function(F,D){return T(F,{locale:D.$L,utc:D.$u,x:D.$x,$offset:D.$offset})};var U=function(){function F(L){this.$L=K(L.locale,null,!0),this.parse(L),this.$x=this.$x||L.x||{},this[$]=!0}var D=F.prototype;return D.parse=function(L){this.$d=function(q){var W=q.date,I=q.utc;if(W===null)return new Date(NaN);if(M.u(W))return new Date;if(W instanceof Date)return new Date(W);if(typeof W=="string"&&!/Z$/i.test(W)){var y=W.match(g);if(y){var P=y[2]-1||0,N=(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,N)):new Date(y[1],P,y[3]||1,y[4]||0,y[5]||0,y[6]||0,N)}}return new Date(W)}(L),this.init()},D.init=function(){var L=this.$d;this.$y=L.getFullYear(),this.$M=L.getMonth(),this.$D=L.getDate(),this.$W=L.getDay(),this.$H=L.getHours(),this.$m=L.getMinutes(),this.$s=L.getSeconds(),this.$ms=L.getMilliseconds()},D.$utils=function(){return M},D.isValid=function(){return this.$d.toString()!==h},D.isSame=function(L,q){var W=T(L);return this.startOf(q)<=W&&W<=this.endOf(q)},D.isAfter=function(L,q){return T(L)<this.startOf(q)},D.isBefore=function(L,q){return this.endOf(q)<T(L)},D.$g=function(L,q,W){return M.u(L)?this[q]:this.set(W,L)},D.unix=function(){return Math.floor(this.valueOf()/1e3)},D.valueOf=function(){return this.$d.getTime()},D.startOf=function(L,q){var W=this,I=!!M.u(q)||q,y=M.p(L),P=function(ee,Z){var _=M.w(W.$u?Date.UTC(W.$y,Z,ee):new Date(W.$y,Z,ee),W);return I?_:_.endOf(c)},N=function(ee,Z){return M.w(W.toDate()[ee].apply(W.toDate("s"),(I?[0,0,0,0]:[23,59,59,999]).slice(Z)),W)},S=this.$W,V=this.$M,Y=this.$D,G="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 N(G+"Hours",0);case l:return N(G+"Minutes",1);case s:return N(G+"Seconds",2);case a:return N(G+"Milliseconds",3);default:return this.clone()}},D.endOf=function(L){return this.startOf(L,!1)},D.$set=function(L,q){var W,I=M.p(L),y="set"+(this.$u?"UTC":""),P=(W={},W[c]=y+"Date",W[v]=y+"Date",W[f]=y+"Month",W[d]=y+"FullYear",W[l]=y+"Hours",W[s]=y+"Minutes",W[a]=y+"Seconds",W[i]=y+"Milliseconds",W)[I],N=I===c?this.$D+(q-this.$W):q;if(I===f||I===d){var S=this.clone().set(v,1);S.$d[P](N),S.init(),this.$d=S.set(v,Math.min(this.$D,S.daysInMonth())).$d}else P&&this.$d[P](N);return this.init(),this},D.set=function(L,q){return this.clone().$set(L,q)},D.get=function(L){return this[M.p(L)]()},D.add=function(L,q){var W,I=this;L=Number(L);var y=M.p(q),P=function(V){var Y=T(I);return M.w(Y.date(Y.date()+Math.round(V*L)),I)};if(y===f)return this.set(f,this.$M+L);if(y===d)return this.set(d,this.$y+L);if(y===c)return P(1);if(y===u)return P(7);var N=(W={},W[s]=r,W[l]=o,W[a]=n,W)[y]||1,S=this.$d.getTime()+L*N;return M.w(S,this)},D.subtract=function(L,q){return this.add(-1*L,q)},D.format=function(L){var q=this,W=this.$locale();if(!this.isValid())return W.invalidDate||h;var I=L||"YYYY-MM-DDTHH:mm:ssZ",y=M.z(this),P=this.$H,N=this.$m,S=this.$M,V=W.weekdays,Y=W.months,G=W.meridiem,Q=function(Z,_,j,J){return Z&&(Z[_]||Z(q,I))||j[_].slice(0,J)},X=function(Z){return M.s(P%12||12,Z,"0")},ee=G||function(Z,_,j){var J=Z<12?"AM":"PM";return j?J.toLowerCase():J};return I.replace(m,function(Z,_){return _||function(j){switch(j){case"YY":return String(q.$y).slice(-2);case"YYYY":return M.s(q.$y,4,"0");case"M":return S+1;case"MM":return M.s(S+1,2,"0");case"MMM":return Q(W.monthsShort,S,Y,3);case"MMMM":return Q(Y,S);case"D":return q.$D;case"DD":return M.s(q.$D,2,"0");case"d":return String(q.$W);case"dd":return Q(W.weekdaysMin,q.$W,V,2);case"ddd":return Q(W.weekdaysShort,q.$W,V,3);case"dddd":return V[q.$W];case"H":return String(P);case"HH":return M.s(P,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return ee(P,N,!0);case"A":return ee(P,N,!1);case"m":return String(N);case"mm":return M.s(N,2,"0");case"s":return String(q.$s);case"ss":return M.s(q.$s,2,"0");case"SSS":return M.s(q.$ms,3,"0");case"Z":return y}return null}(Z)||y.replace(":","")})},D.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},D.diff=function(L,q,W){var I,y=this,P=M.p(q),N=T(L),S=(N.utcOffset()-this.utcOffset())*r,V=this-N,Y=function(){return M.m(y,N)};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 W?I:M.a(I)},D.daysInMonth=function(){return this.endOf(f).$D},D.$locale=function(){return E[this.$L]},D.locale=function(L,q){if(!L)return this.$L;var W=this.clone(),I=K(L,q,!0);return I&&(W.$L=I),W},D.clone=function(){return M.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()},F}(),B=U.prototype;return T.prototype=B,[["$ms",i],["$s",a],["$m",s],["$H",l],["$W",c],["$M",f],["$y",d],["$D",v]].forEach(function(F){B[F[1]]=function(D){return this.$g(D,F[0],F[1])}}),T.extend=function(F,D){return F.$i||(F(D,U,T),F.$i=!0),T},T.locale=K,T.isDayjs=R,T.unix=function(F){return T(1e3*F)},T.en=E[x],T.Ls=E,T.p={},T})})(up);var AE=up.exports;const fi=ye(AE);var fp={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)}}})})(fp);var $E=fp.exports;const TE=ye($E);var dp={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)}}})})(dp);var OE=dp.exports;const IE=ye(OE);fi.extend(TE),fi.extend(IE);function pp(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 PE(e,t="day"){var r,o,i;if(!e||e.length===0)return[];const n=[];(r=e[0])!=null&&r.timestamp&&n.push(hp(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;!fi(s).isSame(l,t)&&l&&n.push(hp(l))}return n}function hp(e){return{id:vp(e),direction:"system",sender:{name:"system"},timestamp:e,block:{type:"text",text:vp(e)}}}function vp(e,t=!1){const n=fi(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 DE(e=""){if(typeof e!="string")throw new TypeError("Color should be string!");const t=/^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})$/i.exec(e);if(t)return t.splice(1).map(r=>Number.parseInt(r,16));const n=/^#?([\da-f])([\da-f])([\da-f])$/i.exec(e);if(n)return n.splice(1).map(r=>Number.parseInt(r+r,16));if(e.includes(","))return e.split(",").map(r=>Number.parseInt(r));throw new Error("Invalid color format! Use #ABC or #AABBCC or r,g,b")}function _E(e){return"#"+e.map(t=>`0${t.toString(16).toUpperCase()}`.slice(-2)).join("")}function ME(e,t){return e.map(n=>Math.round(n+(255-n)*t))}function NE(e,t){return e.map(n=>Math.round(n*t))}const Xr=e=>t=>ME(t,e),eo=e=>t=>NE(t,e),RE={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 mp(e,t=RE){const n={},r=DE(e);for(const[o,i]of Object.entries(t))n[o]=_E(i(r));return n}const gp=()=>{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 Us(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 LE(e){return`#${((1<<24)+(e.r<<16)+(e.g<<8)+e.b).toString(16).slice(1)}`}const FE=(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 yp(e){return Object.entries(e).reduce((t,[n,r])=>{const o=n.replace(/(\d+)/,i=>(1e3-parseInt(i)).toString());return{...t,[o]:r}},{})}const BE=2.4,jE=.2126729,zE=.7151522,UE=.072175,WE=.56,HE=.57,KE=.62,VE=.65,di=.022,bp=1.414,qE=1.14,GE=1.14,YE=.035991,QE=.035991,JE=27.7847239587675,ZE=27.7847239587675,wp=.027,Sp=.027,xp=.001,XE=5e-4;function Ep(e){const{r:t,g:n,b:r}=e,o=i=>(i/255)**BE;return jE*o(t)+zE*o(n)+UE*o(r)}function Cp(e,t){if(!e||!t)return 0;let n=Ep(Us(e)),r=Ep(Us(t)),o=0,i=0;return n=n>di?n:n+(di-n)**bp,r=r>di?r:r+(di-r)**bp,Math.abs(r-n)<XE?0:(r>n?(o=(r**WE-n**HE)*qE,i=o<xp?0:o<YE?o-o*JE*wp:o-wp):(o=(r**VE-n**KE)*GE,i=o>-xp?0:o>-QE?o-o*ZE*Sp:o+Sp),Math.abs(i*100))}function kp(e){const{fontFamily:t,...n}=e,r=Ap(n);return lp(":root",r)+eC(t)}const eC=e=>{if(!e)return"";const n={Inter:"var(--inter-font)",Rubik:"var(--rubik-font)","IBM Plex Sans":"var(--ibm-font)","Fira Code":"var(--fira-font)"}[e]||`'${e}', sans-serif`;return lp(".bpReset",{"font-family":n})};function Ap(e){const{radius:t,themeMode:n,color:r,variant:o,headerVariant:i}=e;let a={},s={};if(r){const p=mp(r),d=n==="dark"?yp(p):p,v=mp(LE(FE(Us(r)))),h=n==="dark"?yp(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?Cp(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?Cp(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 tC=(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 o=null;const i=new Image;i.addEventListener("load",()=>{o&&clearTimeout(o),n({width:i.naturalWidth,height:i.naturalHeight})}),i.addEventListener("error",a=>{o&&clearTimeout(o),r(`${a.type}: ${a.message}`)}),i.src=e,t.timeout&&(o=setTimeout(()=>r("Timeout"),t.timeout))}),$p=["audio","file","image","video"],Tp=e=>$p.includes(e),Op="The Client ID is required to initialize the webchat.",nC="The API url is required to initialize the webchat.",rC="The Bot ID is required to initialize the webchat.",oC="No config URL provided.",Ip=`Invalid API URL.
|
|
2
|
+
Please use a valid API URL.`,Pp=`Invalid Client ID.
|
|
3
|
+
Please use a valid Botpress Client ID.`,Dp=`Invalid URL.
|
|
4
|
+
Please make sure your client ID and API URL are valid`,iC=`Invalid config URL.
|
|
5
|
+
Please make sure your config URL is valid`,aC=`Invalid webchat configuration.
|
|
6
|
+
Please make sure your config file is valid`,sC="Access denied to configuration file. Please check your credentials or your configuration URL and try again.",_p=`This bot has temporarily paused.
|
|
7
|
+
Please check back later.`,Mp=`This bot has temporarily paused.
|
|
8
|
+
Please check back later.`,Np="Something went wrong. To fix it, please clear your browser's local and session storage and then refresh the page",Rp="Please check your internet connection and refresh the page.",Lp=`You've been disconnected from the conversation.
|
|
9
|
+
Please refresh the page.`,Fp=`Unable to process the message.
|
|
10
|
+
Please start a new conversation.`,Ws={ResourceNotFound:{type:"configuration",message:Pp},Forbidden:{type:"bot",message:_p}},Hs={MethodNotFound:{type:"configuration",message:Dp},QuotaExceeded:{type:"bot",message:Mp},Forbidden:{type:"bot",message:Np}};function Bp(e){return e in Ws}function jp(e){return e in Hs}function zp(e){return e!==null&&typeof e=="object"&&"id"in e&&"code"in e&&"type"in e}function Up(e){return e!==null&&typeof e=="object"&&"type"in e&&e.type==="error"&&"message"in e&&typeof e.message=="string"}const lC=["networkerror","failedtofetch","errorininputstream"],pi=e=>{console.error("An error occurred:",e);let t={type:"unknown",message:"An unexpected error occurred"};return zp(e)?e.message.includes("[Webhook Handler]")&&Bp(e.type)?t={id:e.id,...Ws[e.type]}:jp(e.type)?t={id:e.id,...Hs[e.type]}:t={id:e.id,type:e.type,message:e.message}:Up(e)?Wp(e.message)?t={type:"disconnected",message:Lp}:Hp(e.message).includes("invalidcontenttype")?t={type:"bot",message:Fp}:t={type:"event",message:e.message}:e instanceof Error&&Wp(e.message)&&(t={type:"network",message:Rp}),t};function Wp(e){return lC.some(t=>Hp(e).includes(t))}function Hp(e){return e.replaceAll(" ","").toLowerCase()}const hi=O.forwardRef(({userId:e,src:t,container:n,image:r,fallback:o,...i},a)=>{const s=cp(e??"",15);return C.jsxs(Bs,{ref:a,"data-color":s,...n,...i,children:[C.jsx(js,{src:t,...r}),C.jsx(zs,{...o,children:typeof i.children=="string"?i.children[0]:i.children})]})});hi.displayName="Avatar";function EQ(){}function CQ(){}function cC(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const uC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,dC={};function Kp(e,t){return(dC.jsx?fC:uC).test(e)}const pC=/[ \t\n\f\r]/g;function hC(e){return typeof e=="object"?e.type==="text"?Vp(e.value):!1:Vp(e)}function Vp(e){return e.replace(pC,"")===""}class to{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}to.prototype.property={},to.prototype.normal={},to.prototype.space=null;function qp(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 to(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 vC=0;const pe=jn(),Ke=jn(),Gp=jn(),ne=jn(),Ne=jn(),ar=jn(),Ct=jn();function jn(){return 2**++vC}const Vs=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:Ke,commaOrSpaceSeparated:Ct,commaSeparated:ar,number:ne,overloadedBoolean:Gp,spaceSeparated:Ne},Symbol.toStringTag,{value:"Module"})),qs=Object.keys(Vs);class Gs extends It{constructor(t,n,r,o){let i=-1;if(super(t,n),Yp(this,"space",o),typeof r=="number")for(;++i<qs.length;){const a=qs[i];Yp(this,qs[i],(r&Vs[a])===Vs[a])}}}Gs.prototype.defined=!0;function Yp(e,t,n){n&&(e[t]=n)}const mC={}.hasOwnProperty;function sr(e){const t={},n={};let r;for(r in e.properties)if(mC.call(e.properties,r)){const o=e.properties[r],i=new Gs(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 to(t,n,e.space)}const Qp=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}}),Jp=sr({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function Zp(e,t){return t in e?e[t]:t}function Xp(e,t){return Zp(e,t.toLowerCase())}const eh=sr({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:Xp,properties:{xmlns:null,xmlnsXLink:null}}),th=sr({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Ke,ariaAutoComplete:null,ariaBusy:Ke,ariaChecked:Ke,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:Ne,ariaCurrent:null,ariaDescribedBy:Ne,ariaDetails:null,ariaDisabled:Ke,ariaDropEffect:Ne,ariaErrorMessage:null,ariaExpanded:Ke,ariaFlowTo:Ne,ariaGrabbed:Ke,ariaHasPopup:null,ariaHidden:Ke,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ne,ariaLevel:ne,ariaLive:null,ariaModal:Ke,ariaMultiLine:Ke,ariaMultiSelectable:Ke,ariaOrientation:null,ariaOwns:Ne,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:Ke,ariaReadOnly:Ke,ariaRelevant:null,ariaRequired:Ke,ariaRoleDescription:Ne,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:Ke,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null}}),gC=sr({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:Xp,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:ne,colSpan:null,content:null,contentEditable:Ke,controls:pe,controlsList:Ne,coords:ne|ar,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Gp,draggable:Ke,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Ne,height:ne,hidden:pe,high:ne,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:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,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:ne,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:ne,rowSpan:ne,sandbox:Ne,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:Ke,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:Ke,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ne,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,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:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:Ke,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:ne,security:null,unselectable:null}}),yC=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:Zp,properties:{about:Ct,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,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:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,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:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:Ct,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,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:ne,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:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ne,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ct,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ct,rev:Ct,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ct,requiredFeatures:Ct,requiredFonts:Ct,requiredFormats:Ct,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:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:Ct,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ct,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ct,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),bC=/^data[-\w.:]+$/i,nh=/-[a-z]/g,wC=/[A-Z]/g;function SC(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"&&bC.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(nh,EC);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!nh.test(i)){let a=i.replace(wC,xC);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}o=Gs}return new o(r,t)}function xC(e){return"-"+e.toLowerCase()}function EC(e){return e.charAt(1).toUpperCase()}const CC={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"},kC=qp([Jp,Qp,eh,th,gC],"html"),Ys=qp([Jp,Qp,eh,th,yC],"svg");function AC(e){return e.join(" ").trim()}var rh={},oh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$C=/\n/g,TC=/^\s*/,OC=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,IC=/^:\s*/,PC=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,DC=/^[;\s]*/,_C=/^\s+|\s+$/g,MC=`
|
|
11
|
+
`,ih="/",ah="*",zn="",NC="comment",RC="declaration",LC=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($C);h&&(n+=h.length);var g=v.lastIndexOf(MC);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(TC)}function u(v){var h;for(v=v||[];h=f();)h!==!1&&v.push(h);return v}function f(){var v=i();if(!(ih!=e.charAt(0)||ah!=e.charAt(1))){for(var h=2;zn!=e.charAt(h)&&(ah!=e.charAt(h)||ih!=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:NC,comment:g})}}function p(){var v=i(),h=l(OC);if(h){if(f(),!l(IC))return s("property missing ':'");var g=l(PC),m=v({type:RC,property:sh(h[0].replace(oh,zn)),value:g?sh(g[0].replace(oh,zn)):zn});return l(DC),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 sh(e){return e?e.replace(_C,zn):zn}var FC=Rt&&Rt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(rh,"__esModule",{value:!0});var lh=rh.default=jC,BC=FC(LC);function jC(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,BC.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 zC=lh.default||lh,ch=uh("end"),Qs=uh("start");function uh(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 UC(e){const t=Qs(e),n=ch(e);if(t&&n)return{start:t,end:n}}function no(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?fh(e.position):"start"in e||"end"in e?fh(e):"line"in e||"column"in e?Js(e):""}function Js(e){return dh(e&&e.line)+":"+dh(e&&e.column)}function fh(e){return Js(e&&e.start)+"-"+Js(e&&e.end)}function dh(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=no(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 Zs={}.hasOwnProperty,WC=new Map,HC=/[A-Z]/g,KC=/-([a-z])/g,VC=new Set(["table","tbody","thead","tfoot","tr"]),qC=new Set(["td","th"]),ph="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GC(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=nk(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=tk(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"?Ys:kC,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=hh(o,e,void 0);return i&&typeof i!="string"?i:o.create(e,o.Fragment,{children:i||void 0},void 0)}function hh(e,t,n){if(t.type==="element")return YC(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QC(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZC(e,t,n);if(t.type==="mdxjsEsm")return JC(e,t);if(t.type==="root")return XC(e,t,n);if(t.type==="text")return ek(e,t)}function YC(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=mh(e,t.tagName,!1),a=rk(e,t);let s=el(e,t);return VC.has(t.tagName)&&(s=s.filter(function(l){return typeof l=="string"?!hC(l):!0})),vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function QC(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)}ro(e,t.position)}function JC(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ro(e,t.position)}function ZC(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ys,e.schema=o),e.ancestors.push(t);const i=t.name===null?e.Fragment:mh(e,t.name,!0),a=ok(e,t),s=el(e,t);return vh(e,a,i,t),Xs(a,s),e.ancestors.pop(),e.schema=r,e.create(t,i,a,n)}function XC(e,t,n){const r={};return Xs(r,el(e,t)),e.create(t,e.Fragment,r,n)}function ek(e,t){return t.value}function vh(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Xs(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function tk(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 nk(e,t){return n;function n(r,o,i,a){const s=Array.isArray(i.children),l=Qs(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 rk(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&Zs.call(t.properties,o)){const i=ik(e,o,t.properties[o]);if(i){const[a,s]=i;e.tableCellAlignToStyle&&a==="align"&&typeof s=="string"&&qC.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 ok(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 ro(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 ro(e,t.position);else i=r.value===null?!0:r.value;n[o]=i}return n}function el(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:WC;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=hh(e,i,a);s!==void 0&&n.push(s)}return n}function ik(e,t,n){const r=SC(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?cC(n):AC(n)),r.property==="style"){let o=typeof n=="object"?n:ak(e,String(n));return e.stylePropertyNameCase==="css"&&(o=sk(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?CC[r.property]||r.property:r.attribute,n]}}function ak(e,t){const n={};try{zC(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=ph+"#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(KC,ck)),n[a]=i}}function mh(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 Zs.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ro(e)}function ro(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=ph+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sk(e){const t={};let n;for(n in e)Zs.call(e,n)&&(t[lk(n)]=e[n]);return t}function lk(e){let t=e.replace(HC,uk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function ck(e,t){return t.toUpperCase()}function uk(e){return"-"+e.toLowerCase()}const tl={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"]},fk={};function nl(e,t){const n=fk,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return gh(e,r,o)}function gh(e,t,n){if(dk(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 yh(e.children,t,n)}return Array.isArray(e)?yh(e,t,n):""}function yh(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=gh(e[o],t,n);return r.join("")}function dk(e){return!!(e&&typeof e=="object")}const bh=document.createElement("i");function rl(e){const t="&"+e+";";bh.innerHTML=t;const n=bh.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 wh={}.hasOwnProperty;function Sh(e){const t={};let n=-1;for(;++n<e.length;)pk(t,e[n]);return t}function pk(e,t){let n;for(n in t){const o=(wh.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let a;if(i)for(a in i){wh.call(o,a)||(o[a]=[]);const s=i[a];hk(o[a],Array.isArray(s)?s:s?[s]:[])}}}function hk(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 xh(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]/),vk=wn(/[#-'*+\--9=?A-Z^-~]/);function vi(e){return e!==null&&(e<32||e===127)}const ol=wn(/\d/),mk=wn(/[\dA-Fa-f]/),gk=wn(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function _e(e){return e!==null&&(e<0||e===32)}function me(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 be(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(l){return me(l)?(e.enter(n),s(l)):t(l)}function s(l){return me(l)&&i++<o?(e.consume(l),s):(e.exit(n),t(l))}}const yk={tokenize:bk};function bk(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"),be(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 wk={tokenize:Sk},Eh={tokenize:xk};function Sk(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,E;for(;x--;)if(t.events[x][0]==="exit"&&t.events[x][1].type==="chunkFlow"){E=t.events[x][1].end;break}m(r);let $=A;for(;$<t.events.length;)t.events[$][1].end=Object.assign({},E),$++;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(Eh,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(Eh,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 E=o.events.length;for(;E--;)if(o.events[E][1].start.offset<a&&(!o.events[E][1].end||o.events[E][1].end.offset>a))return;const $=t.events.length;let R=$,K,T;for(;R--;)if(t.events[R][0]==="exit"&&t.events[R][1].type==="chunkFlow"){if(K){T=t.events[R][1].end;break}K=!0}for(m(r),E=$;E<t.events.length;)t.events[E][1].end=Object.assign({},T),E++;Pt(t.events,R+1,0,t.events.slice($)),t.events.length=E}}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 xk(e,t,n){return be(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 il={name:"attention",tokenize:Ck,resolveAll:Ek};function Ek(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 Ck(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 kk={name:"autolink",tokenize:Ak};function Ak(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):vk(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 oo={tokenize:$k,partial:!0};function $k(e,t,n){return r;function r(i){return me(i)?be(e,o,"linePrefix")(i):o(i)}function o(i){return i===null||fe(i)?t(i):n(i)}}const kh={name:"blockQuote",tokenize:Tk,continuation:{tokenize:Ok},exit:Ik};function Tk(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 me(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Ok(e,t,n){const r=this;return o;function o(a){return me(a)?be(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):i(a)}function i(a){return e.attempt(kh,t,n)(a)}}function Ik(e){e.exit("blockQuote")}const Ah={name:"characterEscape",tokenize:Pk};function Pk(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 gk(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const $h={name:"characterReference",tokenize:Dk};function Dk(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=mk,u):(e.enter("characterReferenceValue"),i=7,a=ol,u(f))}function u(f){if(f===59&&o){const p=e.exit("characterReferenceValue");return a===lt&&!rl(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 Th={tokenize:Mk,partial:!0},Oh={name:"codeFenced",tokenize:_k,concrete:!0};function _k(e,t,n){const r=this,o={tokenize:x,partial:!0};let i=0,a=0,s;return l;function l(E){return c(E)}function c(E){const $=r.events[r.events.length-1];return i=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,s=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===s?(a++,e.consume(E),u):a<3?n(E):(e.exit("codeFencedFenceSequence"),me(E)?be(e,f,"whitespace")(E):f(E))}function f(E){return E===null||fe(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Th,h,A)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||fe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):me(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),be(e,d,"whitespace")(E)):E===96&&E===s?n(E):(e.consume(E),p)}function d(E){return E===null||fe(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===null||fe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===s?n(E):(e.consume(E),v)}function h(E){return e.attempt(o,A,g)(E)}function g(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return i>0&&me(E)?be(e,b,"linePrefix",i+1)(E):b(E)}function b(E){return E===null||fe(E)?e.check(Th,h,A)(E):(e.enter("codeFlowValue"),w(E))}function w(E){return E===null||fe(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),w)}function A(E){return e.exit("codeFenced"),t(E)}function x(E,$,R){let K=0;return T;function T(D){return E.enter("lineEnding"),E.consume(D),E.exit("lineEnding"),M}function M(D){return E.enter("codeFencedFence"),me(D)?be(E,U,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):U(D)}function U(D){return D===s?(E.enter("codeFencedFenceSequence"),B(D)):R(D)}function B(D){return D===s?(K++,E.consume(D),B):K>=a?(E.exit("codeFencedFenceSequence"),me(D)?be(E,F,"whitespace")(D):F(D)):R(D)}function F(D){return D===null||fe(D)?(E.exit("codeFencedFence"),$(D)):R(D)}}}function Mk(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 al={name:"codeIndented",tokenize:Rk},Nk={tokenize:Lk,partial:!0};function Rk(e,t,n){const r=this;return o;function o(c){return e.enter("codeIndented"),be(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(Nk,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 Lk(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):be(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 Fk={name:"codeText",tokenize:zk,resolve:Bk,previous:jk};function Bk(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 jk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function zk(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 Uk{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&&io(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),io(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),io(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);io(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);io(this.left,n.reverse())}}}function io(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 Ih(e){const t={};let n=-1,r,o,i,a,s,l,c;const u=new Uk(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,Wk(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 Wk(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 Hk={tokenize:qk,resolve:Vk},Kk={tokenize:Gk,partial:!0};function Vk(e){return Ih(e),e}function qk(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(Kk,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 Gk(e,t,n){const r=this;return o;function o(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),be(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 Ph(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 Dh(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=!me(d)),d===92?p:f)}function p(d){return d===91||d===92||d===93?(e.consume(d),s++,f):f(d)}}function _h(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"),be(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 ao(e,t){let n;return r;function r(o){return fe(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):me(o)?be(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const Yk={name:"definition",tokenize:Jk},Qk={tokenize:Zk,partial:!0};function Jk(e,t,n){const r=this;let o;return i;function i(d){return e.enter("definition"),a(d)}function a(d){return Dh.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)?ao(e,c)(d):c(d)}function c(d){return Ph(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(Qk,f,f)(d)}function f(d){return me(d)?be(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 Zk(e,t,n){return r;function r(s){return _e(s)?ao(e,o)(s):n(s)}function o(s){return _h(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function i(s){return me(s)?be(e,a,"whitespace")(s):a(s)}function a(s){return s===null||fe(s)?t(s):n(s)}}const Xk={name:"hardBreakEscape",tokenize:eA};function eA(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 tA={name:"headingAtx",tokenize:rA,resolve:nA};function nA(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 rA(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)):me(u)?be(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 oA=["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"],Mh=["pre","script","style","textarea"],iA={name:"htmlFlow",tokenize:cA,resolveTo:lA,concrete:!0},aA={tokenize:fA,partial:!0},sA={tokenize:uA,partial:!0};function lA(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 cA(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:U: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&&Mh.includes(Y)?(o=1,r.interrupt?t(S):U(S)):oA.includes(a.toLowerCase())?(o=6,V?(e.consume(S),m):r.interrupt?t(S):U(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:U):n(S)}function b(S){return me(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):me(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),E):me(S)?(e.consume(S),x):w(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,$):me(S)?(e.consume(S),E):R(S)}function $(S){return S===l?(e.consume(S),l=null,K):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 K(S){return S===47||S===62||me(S)?w(S):n(S)}function T(S){return S===62?(e.consume(S),M):n(S)}function M(S){return S===null||fe(S)?U(S):me(S)?(e.consume(S),M):n(S)}function U(S){return S===45&&o===2?(e.consume(S),L):S===60&&o===1?(e.consume(S),q):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(aA,N,B)(S)):S===null||fe(S)?(e.exit("htmlFlowData"),B(S)):(e.consume(S),U)}function B(S){return e.check(sA,F,N)(S)}function F(S){return e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),D}function D(S){return S===null||fe(S)?B(S):(e.enter("htmlFlowData"),U(S))}function L(S){return S===45?(e.consume(S),y):U(S)}function q(S){return S===47?(e.consume(S),a="",W):U(S)}function W(S){if(S===62){const V=a.toLowerCase();return Mh.includes(V)?(e.consume(S),P):U(S)}return ht(S)&&a.length<8?(e.consume(S),a+=String.fromCharCode(S),W):U(S)}function I(S){return S===93?(e.consume(S),y):U(S)}function y(S){return S===62?(e.consume(S),P):S===45&&o===2?(e.consume(S),y):U(S)}function P(S){return S===null||fe(S)?(e.exit("htmlFlowData"),N(S)):(e.consume(S),P)}function N(S){return e.exit("htmlFlow"),t(S)}}function uA(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 fA(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(oo,t,n)}}const dA={name:"htmlText",tokenize:pA};function pA(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,q(y)):(e.consume(y),f)}function p(y){return y===45?(e.consume(y),d):f(y)}function d(y){return y===62?L(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,q(y)):(e.consume(y),h)}function g(y){return y===93?(e.consume(y),m):h(y)}function m(y){return y===62?L(y):y===93?(e.consume(y),m):h(y)}function b(y){return y===null||y===62?L(y):fe(y)?(a=b,q(y)):(e.consume(y),b)}function w(y){return y===null?n(y):y===63?(e.consume(y),A):fe(y)?(a=w,q(y)):(e.consume(y),w)}function A(y){return y===62?L(y):w(y)}function x(y){return ht(y)?(e.consume(y),E):n(y)}function E(y){return y===45||lt(y)?(e.consume(y),E):$(y)}function $(y){return fe(y)?(a=$,q(y)):me(y)?(e.consume(y),$):L(y)}function R(y){return y===45||lt(y)?(e.consume(y),R):y===47||y===62||_e(y)?K(y):n(y)}function K(y){return y===47?(e.consume(y),L):y===58||y===95||ht(y)?(e.consume(y),T):fe(y)?(a=K,q(y)):me(y)?(e.consume(y),K):L(y)}function T(y){return y===45||y===46||y===58||y===95||lt(y)?(e.consume(y),T):M(y)}function M(y){return y===61?(e.consume(y),U):fe(y)?(a=M,q(y)):me(y)?(e.consume(y),M):K(y)}function U(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,B):fe(y)?(a=U,q(y)):me(y)?(e.consume(y),U):(e.consume(y),F)}function B(y){return y===o?(e.consume(y),o=void 0,D):y===null?n(y):fe(y)?(a=B,q(y)):(e.consume(y),B)}function F(y){return y===null||y===34||y===39||y===60||y===61||y===96?n(y):y===47||y===62||_e(y)?K(y):(e.consume(y),F)}function D(y){return y===47||y===62||_e(y)?K(y):n(y)}function L(y){return y===62?(e.consume(y),e.exit("htmlTextData"),e.exit("htmlText"),t):n(y)}function q(y){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),W}function W(y){return me(y)?be(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 sl={name:"labelEnd",tokenize:bA,resolveTo:yA,resolveAll:gA},hA={tokenize:wA},vA={tokenize:SA},mA={tokenize:xA};function gA(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 yA(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 bA(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(hA,u,a?u:f)(p):p===91?e.attempt(vA,u,a?c:f)(p):a?u(p):f(p)}function c(p){return e.attempt(mA,u,f)(p)}function u(p){return t(p)}function f(p){return i._balanced=!0,n(p)}}function wA(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)?ao(e,i)(f):i(f)}function i(f){return f===41?u(f):Ph(e,a,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return _e(f)?ao(e,l)(f):u(f)}function s(f){return n(f)}function l(f){return f===34||f===39||f===40?_h(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return _e(f)?ao(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 SA(e,t,n){const r=this;return o;function o(s){return Dh.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 xA(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 EA={name:"labelStartImage",tokenize:CA,resolveAll:sl.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 kA={name:"labelStartLink",tokenize:AA,resolveAll:sl.resolveAll};function AA(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 ll={name:"lineEnding",tokenize:$A};function $A(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),be(e,t,"linePrefix")}}const bi={name:"thematicBreak",tokenize:TA};function TA(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"),me(c)?be(e,s,"whitespace")(c):s(c))}}const gt={name:"list",tokenize:PA,continuation:{tokenize:DA},exit:MA},OA={tokenize:NA,partial:!0},IA={tokenize:_A,partial:!0};function PA(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:ol(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 ol(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(oo,r.interrupt?n:u,e.attempt(OA,p,f))}function u(d){return r.containerState.initialBlankLine=!0,i++,p(d)}function f(d){return me(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 DA(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(oo,o,i);function o(s){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,be(e,t,"listItemIndent",r.containerState.size+1)(s)}function i(s){return r.containerState.furtherBlankLines||!me(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(IA,t,a)(s))}function a(s){return r.containerState._closeFlow=!0,r.interrupt=void 0,be(e,e.attempt(gt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function _A(e,t,n){const r=this;return be(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 MA(e){e.exit(this.containerState.type)}function NA(e,t,n){const r=this;return be(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!me(i)&&a&&a[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const Nh={name:"setextUnderline",tokenize:LA,resolveTo:RA};function RA(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 LA(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"),me(c)?be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const FA={tokenize:BA};function BA(e){const t=this,n=e.attempt(oo,r,e.attempt(this.parser.constructs.flowInitial,o,be(e,e.attempt(this.parser.constructs.flow,o,e.attempt(Hk,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 jA={resolveAll:Lh()},zA=Rh("string"),UA=Rh("text");function Rh(e){return{tokenize:t,resolveAll:Lh(e==="text"?WA: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 Lh(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 WA(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 HA(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:$(E),interrupt:$(E,{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(M){return a=Dt(a,M),g(),a[a.length-1]!==null?[]:(R(t,0),c.events=yi(i,c.events,c),c.events)}function p(M,U){return VA(d(M),U)}function d(M){return KA(a,M)}function v(){const{line:M,column:U,offset:B,_index:F,_bufferIndex:D}=r;return{line:M,column:U,offset:B,_index:F,_bufferIndex:D}}function h(M){o[M.line]=M.column,T()}function g(){let M;for(;r._index<a.length;){const U=a[r._index];if(typeof U=="string")for(M=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===M&&r._bufferIndex<U.length;)m(U.charCodeAt(r._bufferIndex));else m(U)}}function m(M){u=u(M)}function b(M){fe(M)?(r.line++,r.column=1,r.offset+=M===-3?2:1,T()):M!==-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=M}function w(M,U){const B=U||{};return B.type=M,B.start=v(),c.events.push(["enter",B,c]),s.push(B),B}function A(M){const U=s.pop();return U.end=v(),c.events.push(["exit",U,c]),U}function x(M,U){R(M,U.from)}function E(M,U){U.restore()}function $(M,U){return B;function B(F,D,L){let q,W,I,y;return Array.isArray(F)?N(F):"tokenize"in F?N([F]):P(F);function P(G){return Q;function Q(X){const ee=X!==null&&G[X],Z=X!==null&&G.null,_=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(Z)?Z:Z?[Z]:[]];return N(_)(X)}}function N(G){return q=G,W=0,G.length===0?L:S(G[W])}function S(G){return Q;function Q(X){return y=K(),I=G,G.partial||(c.currentConstruct=G),G.name&&c.parser.constructs.disable.null.includes(G.name)?Y():G.tokenize.call(U?Object.assign(Object.create(c),U):c,l,V,Y)(X)}}function V(G){return M(I,y),D}function Y(G){return y.restore(),++W<q.length?S(q[W]):L}}}function R(M,U){M.resolveAll&&!i.includes(M)&&i.push(M),M.resolve&&Pt(c.events,U,c.events.length-U,M.resolve(c.events.slice(U),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function K(){const M=v(),U=c.previous,B=c.currentConstruct,F=c.events.length,D=Array.from(s);return{restore:L,from:F};function L(){r=M,c.previous=U,c.currentConstruct=B,c.events.length=F,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 VA(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=`
|
|
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 j$=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:zC},disable:{null:[]},document:{42:vt,43:vt,45:vt,48:vt,49:vt,50:vt,51:vt,52:vt,53:vt,54:vt,55:vt,56:vt,57:vt,62:gh},flow:{35:KC,42:gi,45:[Th,gi],60:JC,61:Th,95:gi,96:Sh,126:Sh},flowInitial:{[-2]:nl,[-1]:nl,32:nl},insideSpan:{null:[tl,_$]},string:{38:bh,92:yh},text:{[-5]:ol,[-4]:ol,[-3]:ol,33:v$,38:bh,42:tl,60:[gC,o$],91:g$,92:[VC,yh],93:rl,95:tl,96:PC}},Symbol.toStringTag,{value:"Module"}));function B$(e){const n=ph([j$,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(uC),document:o(dC),flow:o(P$),string:o(D$),text:o(M$)};return r;function o(i){return a;function a(s){return L$(r,i,s)}}}function z$(e){for(;!xh(e););return e}const Ph=/[\0\t\n\r]/g;function W$(){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(Ph.lastIndex=f,c=Ph.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 U$=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function H$(e){return e.replace(U$,V$)}function V$(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return hh(n.slice(i?2:1),i?16:10)}return Qs(n)||e}const Ah={}.hasOwnProperty;function q$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),K$(n)(z$(B$(n).document().write(W$()(e,t,!0))))}function K$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Ne),autolinkProtocol:U,autolinkEmail:U,atxHeading:i(fe),blockQuote:i(X),characterEscape:U,characterReference:U,codeFenced:i(J),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(J,a),codeText:i(q,a),codeTextData:U,data:U,codeFlowValue:U,definition:i(ne),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(ae),hardBreakEscape:i(oe),hardBreakTrailing:i(oe),htmlFlow:i(pe,a),htmlFlowData:U,htmlText:i(pe,a),htmlTextData:U,image:i(ge),label:a,link:i(Ne),listItem:i(St),listItemValue:p,listOrdered:i(et,f),listUnordered:i(et),paragraph:i(Nt),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(fe),strong:i(xt),thematicBreak:i(le)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:Q,autolinkProtocol:Z,blockQuote:l(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:K,characterReferenceMarkerNumeric:K,characterReferenceValue:V,characterReference:Y,codeFenced:l(g),codeFencedFence:h,codeFencedFenceInfo:d,codeFencedFenceMeta:v,codeFlowValue:O,codeIndented:l(m),codeText:l(M),codeTextData:O,data:O,definition:l(),definitionDestinationString:$,definitionLabelString:b,definitionTitleString:w,emphasis:l(),hardBreakEscape:l(F),hardBreakTrailing:l(F),htmlFlow:l(j),htmlFlowData:O,htmlText:l(B),htmlTextData:O,image:l(G),label:A,labelText:H,lineEnding:D,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:N,resourceDestinationString:y,resourceTitleString:_,resource:I,setextHeading:l(R),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};_h(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(W){let z={type:"root",children:[]};const ee={stack:[z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},ie=[];let ce=-1;for(;++ce<W.length;)if(W[ce][1].type==="listOrdered"||W[ce][1].type==="listUnordered")if(W[ce][0]==="enter")ie.push(ce);else{const he=ie.pop();ce=o(W,he,ce)}for(ce=-1;++ce<W.length;){const he=t[W[ce][0]];Ah.call(he,W[ce][1].type)&&he[W[ce][1].type].call(Object.assign({sliceSerialize:W[ce][2].sliceSerialize},ee),W[ce][1])}if(ee.tokenStack.length>0){const he=ee.tokenStack[ee.tokenStack.length-1];(he[1]||Dh).call(ee,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})},ce=-1;++ce<t.transforms.length;)z=t.transforms[ce](z)||z;return z}function o(W,z,ee){let ie=z-1,ce=-1,he=!1,We,Ue,ht,tt;for(;++ie<=ee;){const Pe=W[ie];switch(Pe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Pe[0]==="enter"?ce++:ce--,tt=void 0;break}case"lineEndingBlank":{Pe[0]==="enter"&&(We&&!tt&&!ce&&!ht&&(ht=ie),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ce&&Pe[0]==="enter"&&Pe[1].type==="listItemPrefix"||ce===-1&&Pe[0]==="exit"&&(Pe[1].type==="listUnordered"||Pe[1].type==="listOrdered")){if(We){let nt=ie;for(Ue=void 0;nt--;){const Ke=W[nt];if(Ke[1].type==="lineEnding"||Ke[1].type==="lineEndingBlank"){if(Ke[0]==="exit")continue;Ue&&(W[Ue][1].type="lineEndingBlank",he=!0),Ke[1].type="lineEnding",Ue=nt}else if(!(Ke[1].type==="linePrefix"||Ke[1].type==="blockQuotePrefix"||Ke[1].type==="blockQuotePrefixWhitespace"||Ke[1].type==="blockQuoteMarker"||Ke[1].type==="listItemIndent"))break}ht&&(!Ue||ht<Ue)&&(We._spread=!0),We.end=Object.assign({},Ue?W[Ue][1].start:Pe[1].end),W.splice(Ue||ie,0,["exit",We,Pe[2]]),ie++,ee++}if(Pe[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Pe[1].start),end:void 0};We=nt,W.splice(ie,0,["enter",nt,Pe[2]]),ie++,ee++,ht=void 0,tt=!0}}}return W[z][1]._spread=he,ee}function i(W,z){return ee;function ee(ie){s.call(this,W(ie),ie),z&&z.call(this,ie)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(W,z,ee){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([z,ee]),W.position={start:Sn(z.start),end:void 0}}function l(W){return z;function z(ee){W&&W.call(this,ee),c.call(this,ee)}}function c(W,z){const ee=this.stack.pop(),ie=this.tokenStack.pop();if(ie)ie[0].type!==W.type&&(z?z.call(this,W,ie[0]):(ie[1]||Dh).call(this,W,ie[0]));else throw new Error("Cannot close `"+W.type+"` ("+to({start:W.start,end:W.end})+"): it’s not open");ee.position.end=Sn(W.end)}function u(){return Zs(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(),ee=this.stack[this.stack.length-1];ee.label=z,ee.identifier=Rt(this.sliceSerialize(W)).toLowerCase()}function w(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function $(){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 ee=this.sliceSerialize(W).length;z.depth=ee}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(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 U(W){const ee=this.stack[this.stack.length-1].children;let ie=ee[ee.length-1];(!ie||ie.type!=="text")&&(ie=re(),ie.position={start:Sn(W.start),end:void 0},ee.push(ie)),this.stack.push(ie)}function O(W){const z=this.stack.pop();z.value+=this.sliceSerialize(W),z.position.end=Sn(W.end)}function D(W){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ee=z.children[z.children.length-1];ee.position.end=Sn(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(U.call(this,W),O.call(this,W))}function F(){this.data.atHardBreak=!0}function j(){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 M(){const W=this.resume(),z=this.stack[this.stack.length-1];z.value=W}function L(){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 H(W){const z=this.sliceSerialize(W),ee=this.stack[this.stack.length-2];ee.label=H$(z),ee.identifier=Rt(z).toLowerCase()}function A(){const W=this.stack[this.stack.length-1],z=this.resume(),ee=this.stack[this.stack.length-1];if(this.data.inReference=!0,ee.type==="link"){const ie=W.children;ee.children=ie}else ee.alt=z}function y(){const W=this.resume(),z=this.stack[this.stack.length-1];z.url=W}function _(){const W=this.resume(),z=this.stack[this.stack.length-1];z.title=W}function I(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function N(W){const z=this.resume(),ee=this.stack[this.stack.length-1];ee.label=z,ee.identifier=Rt(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function K(W){this.data.characterReferenceType=W.type}function V(W){const z=this.sliceSerialize(W),ee=this.data.characterReferenceType;let ie;ee?(ie=hh(z,ee==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ie=Qs(z);const ce=this.stack[this.stack.length-1];ce.value+=ie}function Y(W){const z=this.stack.pop();z.position.end=Sn(W.end)}function Z(W){O.call(this,W);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(W)}function Q(W){O.call(this,W);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(W)}function X(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function q(){return{type:"inlineCode",value:""}}function ne(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ae(){return{type:"emphasis",children:[]}}function fe(){return{type:"heading",depth:0,children:[]}}function oe(){return{type:"break"}}function pe(){return{type:"html",value:""}}function ge(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function et(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function St(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function Nt(){return{type:"paragraph",children:[]}}function xt(){return{type:"strong",children:[]}}function re(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function _h(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?_h(e,r):G$(e,r)}}function G$(e,t){let n;for(n in t)if(Ah.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 Dh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+to({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+to({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+to({start:t.start,end:t.end})+") is still open")}function Y$(e){const t=this;t.parser=n;function n(r){return q$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function X$(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 J$(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 o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function
|
|
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 qA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:Yk},disable:{null:[]},document:{42:gt,43:gt,45:gt,48:gt,49:gt,50:gt,51:gt,52:gt,53:gt,54:gt,55:gt,56:gt,57:gt,62:kh},flow:{35:tA,42:bi,45:[Nh,bi],60:iA,61:Nh,95:bi,96:Oh,126:Oh},flowInitial:{[-2]:al,[-1]:al,32:al},insideSpan:{null:[il,jA]},string:{38:$h,92:Ah},text:{[-5]:ll,[-4]:ll,[-3]:ll,33:EA,38:$h,42:il,60:[kk,dA],91:kA,92:[Xk,Ah],93:sl,95:il,96:Fk}},Symbol.toStringTag,{value:"Module"}));function GA(e){const n=Sh([qA,...(e||{}).extensions||[]]),r={defined:[],lazy:{},constructs:n,content:o(yk),document:o(wk),flow:o(FA),string:o(zA),text:o(UA)};return r;function o(i){return a;function a(s){return HA(r,i,s)}}}function YA(e){for(;!Ih(e););return e}const Fh=/[\0\t\n\r]/g;function QA(){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(Fh.lastIndex=f,c=Fh.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 JA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ZA(e){return e.replace(JA,XA)}function XA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),i=o===120||o===88;return xh(n.slice(i?2:1),i?16:10)}return rl(n)||e}const Bh={}.hasOwnProperty;function e$(e,t,n){return typeof t!="string"&&(n=t,t=void 0),t$(n)(YA(GA(n).document().write(QA()(e,t,!0))))}function t$(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(De),autolinkProtocol:K,autolinkEmail:K,atxHeading:i(ue),blockQuote:i(Z),characterEscape:K,characterReference:K,codeFenced:i(_),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:i(_,a),codeText:i(j,a),codeTextData:K,data:K,codeFlowValue:K,definition:i(J),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:i(re),hardBreakEscape:i(ie),hardBreakTrailing:i(ie),htmlFlow:i(de,a),htmlFlowData:K,htmlText:i(de,a),htmlTextData:K,image:i(Se),label:a,link:i(De),listItem:i(dt),listItemValue:p,listOrdered:i(Ue,f),listUnordered:i(Ue),paragraph:i(Et),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:i(ue),strong:i(pt),thematicBreak:i(le)},exit:{atxHeading:l(),atxHeadingSequence:x,autolink:l(),autolinkEmail:ee,autolinkProtocol:X,blockQuote:l(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:Y,characterReferenceMarkerNumeric:Y,characterReferenceValue:G,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(U),hardBreakTrailing:l(U),htmlFlow:l(B),htmlFlowData:T,htmlText:l(F),htmlTextData:T,image:l(q),label:I,labelText:W,lineEnding:M,link:l(L),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:V,resourceDestinationString:y,resourceTitleString:P,resource:N,setextHeading:l(R),setextHeadingLineSequence:$,setextHeadingText:E,strong:l(),thematicBreak:l()}};jh(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(H){let z={type:"root",children:[]};const te={stack:[z],tokenStack:[],config:t,enter:s,exit:c,buffer:a,resume:u,data:n},ae=[];let ce=-1;for(;++ce<H.length;)if(H[ce][1].type==="listOrdered"||H[ce][1].type==="listUnordered")if(H[ce][0]==="enter")ae.push(ce);else{const he=ae.pop();ce=o(H,he,ce)}for(ce=-1;++ce<H.length;){const he=t[H[ce][0]];Bh.call(he,H[ce][1].type)&&he[H[ce][1].type].call(Object.assign({sliceSerialize:H[ce][2].sliceSerialize},te),H[ce][1])}if(te.tokenStack.length>0){const he=te.tokenStack[te.tokenStack.length-1];(he[1]||zh).call(te,void 0,he[0])}for(z.position={start:Sn(H.length>0?H[0][1].start:{line:1,column:1,offset:0}),end:Sn(H.length>0?H[H.length-2][1].end:{line:1,column:1,offset:0})},ce=-1;++ce<t.transforms.length;)z=t.transforms[ce](z)||z;return z}function o(H,z,te){let ae=z-1,ce=-1,he=!1,We,He,mt,tt;for(;++ae<=te;){const Ie=H[ae];switch(Ie[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ie[0]==="enter"?ce++:ce--,tt=void 0;break}case"lineEndingBlank":{Ie[0]==="enter"&&(We&&!tt&&!ce&&!mt&&(mt=ae),tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:tt=void 0}if(!ce&&Ie[0]==="enter"&&Ie[1].type==="listItemPrefix"||ce===-1&&Ie[0]==="exit"&&(Ie[1].type==="listUnordered"||Ie[1].type==="listOrdered")){if(We){let nt=ae;for(He=void 0;nt--;){const Ge=H[nt];if(Ge[1].type==="lineEnding"||Ge[1].type==="lineEndingBlank"){if(Ge[0]==="exit")continue;He&&(H[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}mt&&(!He||mt<He)&&(We._spread=!0),We.end=Object.assign({},He?H[He][1].start:Ie[1].end),H.splice(He||ae,0,["exit",We,Ie[2]]),ae++,te++}if(Ie[1].type==="listItemPrefix"){const nt={type:"listItem",_spread:!1,start:Object.assign({},Ie[1].start),end:void 0};We=nt,H.splice(ae,0,["enter",nt,Ie[2]]),ae++,te++,mt=void 0,tt=!0}}}return H[z][1]._spread=he,te}function i(H,z){return te;function te(ae){s.call(this,H(ae),ae),z&&z.call(this,ae)}}function a(){this.stack.push({type:"fragment",children:[]})}function s(H,z,te){this.stack[this.stack.length-1].children.push(H),this.stack.push(H),this.tokenStack.push([z,te]),H.position={start:Sn(z.start),end:void 0}}function l(H){return z;function z(te){H&&H.call(this,te),c.call(this,te)}}function c(H,z){const te=this.stack.pop(),ae=this.tokenStack.pop();if(ae)ae[0].type!==H.type&&(z?z.call(this,H,ae[0]):(ae[1]||zh).call(this,H,ae[0]));else throw new Error("Cannot close `"+H.type+"` ("+no({start:H.start,end:H.end})+"): it’s not open");te.position.end=Sn(H.end)}function u(){return nl(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(H){if(this.data.expectingFirstListItemValue){const z=this.stack[this.stack.length-2];z.start=Number.parseInt(this.sliceSerialize(H),10),this.data.expectingFirstListItemValue=void 0}}function d(){const H=this.resume(),z=this.stack[this.stack.length-1];z.lang=H}function v(){const H=this.resume(),z=this.stack[this.stack.length-1];z.meta=H}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){const H=this.resume(),z=this.stack[this.stack.length-1];z.value=H.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const H=this.resume(),z=this.stack[this.stack.length-1];z.value=H.replace(/(\r?\n|\r)$/g,"")}function b(H){const z=this.resume(),te=this.stack[this.stack.length-1];te.label=z,te.identifier=Lt(this.sliceSerialize(H)).toLowerCase()}function w(){const H=this.resume(),z=this.stack[this.stack.length-1];z.title=H}function A(){const H=this.resume(),z=this.stack[this.stack.length-1];z.url=H}function x(H){const z=this.stack[this.stack.length-1];if(!z.depth){const te=this.sliceSerialize(H).length;z.depth=te}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function $(H){const z=this.stack[this.stack.length-1];z.depth=this.sliceSerialize(H).codePointAt(0)===61?1:2}function R(){this.data.setextHeadingSlurpLineEnding=void 0}function K(H){const te=this.stack[this.stack.length-1].children;let ae=te[te.length-1];(!ae||ae.type!=="text")&&(ae=oe(),ae.position={start:Sn(H.start),end:void 0},te.push(ae)),this.stack.push(ae)}function T(H){const z=this.stack.pop();z.value+=this.sliceSerialize(H),z.position.end=Sn(H.end)}function M(H){const z=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=z.children[z.children.length-1];te.position.end=Sn(H.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(z.type)&&(K.call(this,H),T.call(this,H))}function U(){this.data.atHardBreak=!0}function B(){const H=this.resume(),z=this.stack[this.stack.length-1];z.value=H}function F(){const H=this.resume(),z=this.stack[this.stack.length-1];z.value=H}function D(){const H=this.resume(),z=this.stack[this.stack.length-1];z.value=H}function L(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=z,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function q(){const H=this.stack[this.stack.length-1];if(this.data.inReference){const z=this.data.referenceType||"shortcut";H.type+="Reference",H.referenceType=z,delete H.url,delete H.title}else delete H.identifier,delete H.label;this.data.referenceType=void 0}function W(H){const z=this.sliceSerialize(H),te=this.stack[this.stack.length-2];te.label=ZA(z),te.identifier=Lt(z).toLowerCase()}function I(){const H=this.stack[this.stack.length-1],z=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const ae=H.children;te.children=ae}else te.alt=z}function y(){const H=this.resume(),z=this.stack[this.stack.length-1];z.url=H}function P(){const H=this.resume(),z=this.stack[this.stack.length-1];z.title=H}function N(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function V(H){const z=this.resume(),te=this.stack[this.stack.length-1];te.label=z,te.identifier=Lt(this.sliceSerialize(H)).toLowerCase(),this.data.referenceType="full"}function Y(H){this.data.characterReferenceType=H.type}function G(H){const z=this.sliceSerialize(H),te=this.data.characterReferenceType;let ae;te?(ae=xh(z,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ae=rl(z);const ce=this.stack[this.stack.length-1];ce.value+=ae}function Q(H){const z=this.stack.pop();z.position.end=Sn(H.end)}function X(H){T.call(this,H);const z=this.stack[this.stack.length-1];z.url=this.sliceSerialize(H)}function ee(H){T.call(this,H);const z=this.stack[this.stack.length-1];z.url="mailto:"+this.sliceSerialize(H)}function Z(){return{type:"blockquote",children:[]}}function _(){return{type:"code",lang:null,meta:null,value:""}}function j(){return{type:"inlineCode",value:""}}function J(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function re(){return{type:"emphasis",children:[]}}function ue(){return{type:"heading",depth:0,children:[]}}function ie(){return{type:"break"}}function de(){return{type:"html",value:""}}function Se(){return{type:"image",title:null,url:"",alt:null}}function De(){return{type:"link",title:null,url:"",children:[]}}function Ue(H){return{type:"list",ordered:H.type==="listOrdered",start:null,spread:H._spread,children:[]}}function dt(H){return{type:"listItem",spread:H._spread,checked:null,children:[]}}function Et(){return{type:"paragraph",children:[]}}function pt(){return{type:"strong",children:[]}}function oe(){return{type:"text",value:""}}function le(){return{type:"thematicBreak"}}}function Sn(e){return{line:e.line,column:e.column,offset:e.offset}}function jh(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?jh(e,r):n$(e,r)}}function n$(e,t){let n;for(n in t)if(Bh.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 zh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+no({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+no({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+no({start:t.start,end:t.end})+") is still open")}function r$(e){const t=this;t.parser=n;function n(r){return e$(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function o$(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 i$(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
14
|
+
`}]}function a$(e,t){const n=t.value?t.value+`
|
|
15
|
+
`:"",r={};t.lang&&(r.className=["language-"+t.lang]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function s$(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l$(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function c$(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=lr(r.toLowerCase()),i=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=i+1,s+=1,e.footnoteCounts.set(r,s);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(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 u$(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 f$(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Uh(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 o=e.all(t),i=o[0];i&&i.type==="text"?i.value="["+i.value:o.unshift({type:"text",value:"["});const a=o[o.length-1];return a&&a.type==="text"?a.value+=r:o.push({type:"text",value:r}),o}function d$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Uh(e,t);const o={src:lr(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"img",properties:o,children:[]};return e.patch(t,i),e.applyData(t,i)}function p$(e,t){const n={src:lr(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 h$(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 v$(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Uh(e,t);const o={href:lr(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const i={type:"element",tagName:"a",properties:o,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function m$(e,t){const n={href:lr(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 g$(e,t,n){const r=e.all(t),o=n?y$(n):Wh(t),i={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let s=-1;for(;++s<r.length;){const u=r[s];(o||s!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|
|
16
16
|
`}),u.type==="element"&&u.tagName==="p"&&!o?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(o||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
17
|
-
`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function
|
|
17
|
+
`});const c={type:"element",tagName:"li",properties:i,children:a};return e.patch(t,c),e.applyData(t,c)}function y$(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=Wh(n[r])}return t}function Wh(e){const t=e.spread;return t??e.children.length>1}function b$(e,t){const n={},r=e.all(t);let o=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++o<r.length;){const a=r[o];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 i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function w$(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function S$(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function x$(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function E$(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),o.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Qs(t.children[1]),l=ch(t.children[t.children.length-1]);s&&l&&(a.position={start:s,end:l}),o.push(a)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,i),e.applyData(t,i)}function C$(e,t,n){const r=n?n.children:void 0,i=(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 f=t.children[l],p={},d=a?a[l]:void 0;d&&(p.align=d);let v={type:"element",tagName:i,properties:p,children:[]};f&&(v.children=e.all(f),e.patch(f,v),v=e.applyData(f,v)),c.push(v)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function k$(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Hh=9,Kh=32;function A$(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const i=[];for(;r;)i.push(Vh(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return i.push(Vh(t.slice(o),o>0,!1)),i.join("")}function Vh(e,t,n){let r=0,o=e.length;if(t){let i=e.codePointAt(r);for(;i===Hh||i===Kh;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(o-1);for(;i===Hh||i===Kh;)o--,i=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function $$(e,t){const n={type:"text",value:A$(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function T$(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const O$={blockquote:o$,break:i$,code:a$,delete:s$,emphasis:l$,footnoteReference:c$,heading:u$,html:f$,imageReference:d$,image:p$,inlineCode:h$,linkReference:v$,link:m$,listItem:g$,list:b$,paragraph:w$,root:S$,strong:x$,table:E$,tableCell:k$,tableRow:C$,text:$$,thematicBreak:T$,toml:wi,yaml:wi,definition:wi,footnoteDefinition:wi};function wi(){}const qh=-1,Si=0,xi=1,Ei=2,cl=3,ul=4,fl=5,dl=6,Gh=7,Yh=8,Qh=typeof self=="object"?self:globalThis,I$=(e,t)=>{const n=(o,i)=>(e.set(i,o),o),r=o=>{if(e.has(o))return e.get(o);const[i,a]=t[o];switch(i){case Si:case qh:return n(a,o);case xi:{const s=n([],o);for(const l of a)s.push(r(l));return s}case Ei:{const s=n({},o);for(const[l,c]of a)s[r(l)]=r(c);return s}case cl:return n(new Date(a),o);case ul:{const{source:s,flags:l}=a;return n(new RegExp(s,l),o)}case fl:{const s=n(new Map,o);for(const[l,c]of a)s.set(r(l),r(c));return s}case dl:{const s=n(new Set,o);for(const l of a)s.add(r(l));return s}case Gh:{const{name:s,message:l}=a;return n(new Qh[s](l),o)}case Yh:return n(BigInt(a),o);case"BigInt":return n(Object(BigInt(a)),o)}return n(new Qh[i](a),o)};return r},Jh=e=>I$(new Map,e)(0),cr="",{toString:P$}={},{keys:D$}=Object,so=e=>{const t=typeof e;if(t!=="object"||!e)return[Si,t];const n=P$.call(e).slice(8,-1);switch(n){case"Array":return[xi,cr];case"Object":return[Ei,cr];case"Date":return[cl,cr];case"RegExp":return[ul,cr];case"Map":return[fl,cr];case"Set":return[dl,cr]}return n.includes("Array")?[xi,n]:n.includes("Error")?[Gh,n]:[Ei,n]},Ci=([e,t])=>e===Si&&(t==="function"||t==="symbol"),_$=(e,t,n,r)=>{const o=(a,s)=>{const l=r.push(a)-1;return n.set(s,l),l},i=a=>{if(n.has(a))return n.get(a);let[s,l]=so(a);switch(s){case Si:{let u=a;switch(l){case"bigint":s=Yh,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return o([qh],a)}return o([s,u],a)}case xi:{if(l)return o([l,[...a]],a);const u=[],f=o([s,u],a);for(const p of a)u.push(i(p));return f}case Ei:{if(l)switch(l){case"BigInt":return o([l,a.toString()],a);case"Boolean":case"Number":case"String":return o([l,a.valueOf()],a)}if(t&&"toJSON"in a)return i(a.toJSON());const u=[],f=o([s,u],a);for(const p of D$(a))(e||!Ci(so(a[p])))&&u.push([i(p),i(a[p])]);return f}case cl:return o([s,a.toISOString()],a);case ul:{const{source:u,flags:f}=a;return o([s,{source:u,flags:f}],a)}case fl:{const u=[],f=o([s,u],a);for(const[p,d]of a)(e||!(Ci(so(p))||Ci(so(d))))&&u.push([i(p),i(d)]);return f}case dl:{const u=[],f=o([s,u],a);for(const p of a)(e||!Ci(so(p)))&&u.push(i(p));return f}}const{message:c}=a;return o([s,{name:l,message:c}],a)};return i},Zh=(e,{json:t,lossy:n}={})=>{const r=[];return _$(!(t||n),!!t,new Map,r)(e),r},ki=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jh(Zh(e,t)):structuredClone(e):(e,t)=>Jh(Zh(e,t));function M$(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 N$(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function R$(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||M$,r=e.options.footnoteBackLabel||N$,o=e.options.footnoteLabel||"Footnotes",i=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 u=e.all(c),f=String(c.identifier).toUpperCase(),p=lr(f.toLowerCase());let d=0;const v=[],h=e.footnoteCounts.get(f);for(;h!==void 0&&++d<=h;){v.length>0&&v.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,d);typeof b=="string"&&(b={type:"text",value:b}),v.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=u[u.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(...v)}else u.push(...v);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(u,!0)};e.patch(c,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ki(a),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
18
18
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
19
|
-
`}]}}const
|
|
19
|
+
`}]}}const Ai=function(e){if(e==null)return j$;if(typeof e=="function")return $i(e);if(typeof e=="object")return Array.isArray(e)?L$(e):F$(e);if(typeof e=="string")return B$(e);throw new Error("Expected function, string, or object as test")};function L$(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Ai(e[n]);return $i(r);function r(...o){let i=-1;for(;++i<t.length;)if(t[i].apply(this,o))return!0;return!1}}function F$(e){const t=e;return $i(n);function n(r){const o=r;let i;for(i in e)if(o[i]!==t[i])return!1;return!0}}function B$(e){return $i(t);function t(n){return n&&n.type===e}}function $i(e){return t;function t(n,r,o){return!!(z$(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function j$(){return!0}function z$(e){return e!==null&&typeof e=="object"&&"type"in e}function MQ(e){return e}const Xh=[],U$=!0,pl=!1,W$="skip";function ev(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const i=Ai(o),a=r?-1:1;s(e,void 0,[])();function s(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const d=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(d?"<"+d+">":""))+")"})}return p;function p(){let d=Xh,v,h,g;if((!t||i(l,c,u[u.length-1]||void 0))&&(d=H$(n(l,u)),d[0]===pl))return d;if("children"in l&&l.children){const m=l;if(m.children&&d[0]!==W$)for(h=(r?m.children.length:-1)+a,g=u.concat(m);h>-1&&h<m.children.length;){const b=m.children[h];if(v=s(b,h,g)(),v[0]===pl)return v;h=typeof v[1]=="number"?v[1]:h+a}}return d}}}function H$(e){return Array.isArray(e)?e:typeof e=="number"?[U$,e]:e==null?Xh:[e]}function hl(e,t,n,r){let o,i,a;typeof t=="function"&&typeof n!="function"?(i=void 0,a=t,o=n):(i=t,a=n,o=r),ev(e,i,s,o);function s(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return a(l,f,u)}}const vl={}.hasOwnProperty,K$={};function V$(e,t){const n=t||K$,r=new Map,o=new Map,i=new Map,a={...O$,...n.handlers},s={all:c,applyData:G$,definitionById:r,footnoteById:o,footnoteCounts:i,footnoteOrder:[],handlers:a,one:l,options:n,patch:q$,wrap:Q$};return hl(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:o,p=String(u.identifier).toUpperCase();f.has(p)||f.set(p,u)}}),s;function l(u,f){const p=u.type,d=s.handlers[p];if(vl.call(s.handlers,p)&&d)return d(s,u,f);if(s.options.passThrough&&s.options.passThrough.includes(p)){if("children"in u){const{children:h,...g}=u,m=ki(g);return m.children=s.all(u),m}return ki(u)}return(s.options.unknownHandler||Y$)(s,u,f)}function c(u){const f=[];if("children"in u){const p=u.children;let d=-1;for(;++d<p.length;){const v=s.one(p[d],u);if(v){if(d&&p[d-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=tv(v.value)),!Array.isArray(v)&&v.type==="element")){const h=v.children[0];h&&h.type==="text"&&(h.value=tv(h.value))}Array.isArray(v)?f.push(...v):f.push(v)}}}return f}}function q$(e,t){e.position&&(t.position=UC(e))}function G$(e,t){let n=t;if(e&&e.data){const r=e.data.hName,o=e.data.hChildren,i=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"&&i&&Object.assign(n.properties,ki(i)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function Y$(e,t){const n=t.data||{},r="value"in t&&!(vl.call(n,"hProperties")||vl.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 Q$(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 UT(e,t){return e&&"run"in e?async function(n,r){const o=Gh(n,{file:r,...t});await e.run(o,r)}:function(n,r){return Gh(n,{file:r,...e||t})}}function Yh(e){if(e)throw e}var $i=Object.prototype.hasOwnProperty,Xh=Object.prototype.toString,Jh=Object.defineProperty,Zh=Object.getOwnPropertyDescriptor,Qh=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Xh.call(t)==="[object Array]"},ev=function(t){if(!t||Xh.call(t)!=="[object Object]")return!1;var n=$i.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&$i.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var o;for(o in t);return typeof o>"u"||$i.call(t,o)},tv=function(t,n){Jh&&n.name==="__proto__"?Jh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},nv=function(t,n){if(n==="__proto__")if($i.call(t,n)){if(Zh)return Zh(t,n).value}else return;return t[n]},HT=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=nv(s,n),o=nv(t,n),s!==o&&(u&&o&&(ev(o)||(i=Qh(o)))?(i?(i=!1,a=r&&Qh(r)?r:[]):a=r&&ev(r)?r:{},tv(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&tv(s,{name:n,newValue:o}));return s};const dl=be(HT);function pl(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 VT(){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?qT(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 qT(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:KT,dirname:GT,extname:YT,join:XT,sep:"/"};function KT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');so(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 GT(e){if(so(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 YT(e){so(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 XT(...e){let t=-1,n;for(;++t<e.length;)so(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":JT(n)}function JT(e){so(e);const t=e.codePointAt(0)===47;let n=ZT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ZT(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 so(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const QT={cwd:eO};function eO(){return"/"}function hl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tO(e){if(typeof e=="string")e=new URL(e);else if(!hl(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 nO(e)}function nO(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 vl=["history","path","basename","stem","extname","dirname"];class rv{constructor(t){let n;t?hl(t)?n={path:t}:typeof t=="string"||rO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":QT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vl.length;){const i=vl[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)vl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){gl(t,"basename"),ml(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){ov(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(ml(t,"extname"),ov(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){hl(t)&&(t=tO(t)),gl(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){gl(t,"stem"),ml(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 ml(e,t){if(e&&e.includes(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function gl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ov(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function rO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const oO=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},iO={}.hasOwnProperty;class yl extends oO{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=VT()}copy(){const t=new yl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(dl(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Sl("data",this.frozen),this.namespace[t]=n,this):iO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Sl("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=Ti(t),r=this.parser||this.Parser;return bl("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),bl("process",this.parser||this.Parser),wl("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(i,a){const s=Ti(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);lO(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(),bl("processSync",this.parser||this.Parser),wl("processSync",this.compiler||this.Compiler),this.process(t,o),av("processSync","process",n),r;function o(i,a){n=!0,Yh(i),r=a}}run(t,n,r){iv(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=Ti(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),av("runSync","run",r),o;function i(a,s){Yh(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Ti(n),o=this.compiler||this.Compiler;return wl("stringify",o),iv(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Sl("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=dl(!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];pl(h)&&pl(d)&&(d=dl(!0,h,d)),r[p]=[c,d,...v]}}}}const aO=new yl().freeze();function bl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function wl(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Sl(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 iv(e){if(!pl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function av(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ti(e){return sO(e)?e:new rv(e)}function sO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function lO(e){return typeof e=="string"||cO(e)}function cO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const uO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sv=[],lv={allowDangerousHtml:!0},fO=/^(https?|ircs?|mailto|xmpp)$/i,dO=[{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 cv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||sv,l=e.remarkPlugins||sv,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lv}:lv,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||uv,d=aO().use(Y$).use(l).use(UT,c).use(s),v=new rv;typeof r=="string"&&(v.value=r);for(const b of dO)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+uO+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]}),ul(g,m),Bk(g,{Fragment:C.Fragment,components:i,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.jsxs,passKeys:!0,passNode:!0});function m(b,w,$){if(b.type==="raw"&&$&&typeof w=="number")return u?$.children.splice(w,1):$.children[w]={type:"text",value:b.value},w;if(b.type==="element"){let x;for(x in Js)if(Object.hasOwn(Js,x)&&Object.hasOwn(b.properties,x)){const E=b.properties[x],T=Js[x];(T===null||T.includes(b.tagName))&&(b.properties[x]=p(String(E||""),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,$)),x&&$&&typeof w=="number")return f&&b.children?$.children.splice(w,1,...b.children):$.children.splice(w,1),w}}}function uv(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||fO.test(e.slice(0,t))?e:""}function pO(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function fv(e,t,n){const o=ki((n||{}).ignore||[]),i=hO(t);let a=-1;for(;++a<i.length;)qh(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 $=w.index,x={index:w.index,input:w.input,stack:[...u,c]};let E=d(...w,x);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=$+1:(v!==$&&b.push({type:"text",value:c.value.slice(v,$)}),Array.isArray(E)?b.push(...E):E&&b.push(E),v=$+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 hO(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([vO(o[0]),mO(o[1])])}return t}function vO(e){return typeof e=="string"?new RegExp(pO(e),"g"):e}function mO(e){return typeof e=="function"?e:function(){return e}}function gO(e){fv(e,[/\r?\n|\r/g,yO])}function yO(){return{type:"break"}}function bO(){return function(e){gO(e)}}function dv(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 xl="phrasing",El=["autolink","link","image","label"];function wO(){return{transforms:[TO],enter:{literalAutolink:xO,literalAutolinkEmail:kl,literalAutolinkHttp:kl,literalAutolinkWww:kl},exit:{literalAutolink:$O,literalAutolinkEmail:CO,literalAutolinkHttp:EO,literalAutolinkWww:kO}}}function SO(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xl,notInConstruct:El},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xl,notInConstruct:El},{character:":",before:"[ps]",after:"\\/",inConstruct:xl,notInConstruct:El}]}}function xO(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function kl(e){this.config.enter.autolinkProtocol.call(this,e)}function EO(e){this.config.exit.autolinkProtocol.call(this,e)}function kO(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 CO(e){this.config.exit.autolinkEmail.call(this,e)}function $O(e){this.exit(e)}function TO(e){fv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OO],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),IO]],{ignore:["link","linkReference"]})}function OO(e,t,n,r,o){let i="";if(!pv(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!PO(n)))return!1;const a=AO(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 IO(e,t,n,r){return!pv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function PO(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 AO(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=dv(e,"(");let i=dv(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 pv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||zn(n)||hi(n))&&(!t||n!==47)}hv.peek=WO;function _O(){return{enter:{gfmFootnoteDefinition:MO,gfmFootnoteDefinitionLabelString:NO,gfmFootnoteCall:FO,gfmFootnoteCallString:jO},exit:{gfmFootnoteDefinition:RO,gfmFootnoteDefinitionLabelString:LO,gfmFootnoteCall:zO,gfmFootnoteCallString:BO}}}function DO(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:UO,footnoteReference:hv}}}function MO(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function NO(){this.buffer()}function LO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Rt(this.sliceSerialize(e)).toLowerCase()}function RO(e){this.exit(e)}function FO(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function jO(){this.buffer()}function BO(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.label=t,n.identifier=Rt(this.sliceSerialize(e)).toLowerCase()}function zO(e){this.exit(e)}function hv(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 WO(){return"["}function UO(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()),HO)),a(),i}function HO(e,t,n){return t===0?e:(n?"":" ")+e}const VO=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];vv.peek=XO;function qO(){return{canContainEols:["delete"],enter:{strikethrough:GO},exit:{strikethrough:YO}}}function KO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:VO}],handlers:{delete:vv}}}function GO(e){this.enter({type:"delete",children:[]},e)}function YO(e){this.exit(e)}function vv(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 XO(){return"~"}function JO(e){return e.length}function ZO(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||JO,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=QO(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]=mv(r[f]);else{const h=mv(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="",$="";if(n.alignDelimiters!==!1){const x=l[f]-(g[f]||0),E=i[f];E===114?w=" ".repeat(x):E===99?x%2?(w=" ".repeat(x/2+.5),$=" ".repeat(x/2-.5)):(w=" ".repeat(x/2),$=w):$=" ".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($),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
|
|
22
|
+
`}),n}function tv(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function nv(e,t){const n=V$(e,t),r=n.one(e,void 0),o=R$(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&i.children.push({type:"text",value:`
|
|
23
|
+
`},o),i}function J$(e,t){return e&&"run"in e?async function(n,r){const o=nv(n,{file:r,...t});await e.run(o,r)}:function(n,r){return nv(n,{file:r,...e||t})}}function rv(e){if(e)throw e}var Ti=Object.prototype.hasOwnProperty,ov=Object.prototype.toString,iv=Object.defineProperty,av=Object.getOwnPropertyDescriptor,sv=function(t){return typeof Array.isArray=="function"?Array.isArray(t):ov.call(t)==="[object Array]"},lv=function(t){if(!t||ov.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)},cv=function(t,n){iv&&n.name==="__proto__"?iv(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},uv=function(t,n){if(n==="__proto__")if(Ti.call(t,n)){if(av)return av(t,n).value}else return;return t[n]},Z$=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=uv(s,n),o=uv(t,n),s!==o&&(u&&o&&(lv(o)||(i=sv(o)))?(i?(i=!1,a=r&&sv(r)?r:[]):a=r&&lv(r)?r:{},cv(s,{name:n,newValue:e(u,a,o)})):typeof o<"u"&&cv(s,{name:n,newValue:o}));return s};const ml=ye(Z$);function gl(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 X$(){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?eT(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 eT(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:tT,dirname:nT,extname:rT,join:oT,sep:"/"};function tT(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');lo(e);let n=0,r=-1,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 nT(e){if(lo(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function rT(e){lo(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 oT(...e){let t=-1,n;for(;++t<e.length;)lo(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":iT(n)}function iT(e){lo(e);const t=e.codePointAt(0)===47;let n=aT(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function aT(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 lo(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const sT={cwd:lT};function lT(){return"/"}function yl(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function cT(e){if(typeof e=="string")e=new URL(e);else if(!yl(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 uT(e)}function uT(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 bl=["history","path","basename","stem","extname","dirname"];class fv{constructor(t){let n;t?yl(t)?n={path:t}:typeof t=="string"||fT(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":sT.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<bl.length;){const i=bl[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)bl.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Gt.basename(this.path):void 0}set basename(t){Sl(t,"basename"),wl(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){dv(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(wl(t,"extname"),dv(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){yl(t)&&(t=cT(t)),Sl(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){Sl(t,"stem"),wl(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 wl(e,t){if(e&&e.includes(Gt.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gt.sep+"`")}function Sl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function dv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function fT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dT=function(e){const r=this.constructor.prototype,o=r[e],i=function(){return o.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},pT={}.hasOwnProperty;class xl extends dT{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=X$()}copy(){const t=new xl;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ml(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(kl("data",this.frozen),this.namespace[t]=n,this):pT.call(this.namespace,t)&&this.namespace[t]||void 0:t?(kl("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 El("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),El("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);mT(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(),El("processSync",this.parser||this.Parser),Cl("processSync",this.compiler||this.Compiler),this.process(t,o),hv("processSync","process",n),r;function o(i,a){n=!0,rv(i),r=a}}run(t,n,r){pv(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),hv("runSync","run",r),o;function i(a,s){rv(a),o=s,r=!0}}stringify(t,n){this.freeze();const r=Oi(n),o=this.compiler||this.Compiler;return Cl("stringify",o),pv(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(kl("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=ml(!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];gl(h)&&gl(d)&&(d=ml(!0,h,d)),r[p]=[c,d,...v]}}}}const hT=new xl().freeze();function El(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 kl(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 pv(e){if(!gl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function hv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Oi(e){return vT(e)?e:new fv(e)}function vT(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function mT(e){return typeof e=="string"||gT(e)}function gT(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const yT="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",vv=[],mv={allowDangerousHtml:!0},bT=/^(https?|ircs?|mailto|xmpp)$/i,wT=[{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 gv(e){const t=e.allowedElements,n=e.allowElement,r=e.children||"",o=e.className,i=e.components,a=e.disallowedElements,s=e.rehypePlugins||vv,l=e.remarkPlugins||vv,c=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...mv}:mv,u=e.skipHtml,f=e.unwrapDisallowed,p=e.urlTransform||yv,d=hT().use(r$).use(l).use(J$,c).use(s),v=new fv;typeof r=="string"&&(v.value=r);for(const b of wT)Object.hasOwn(e,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+yT+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]}),hl(g,m),GC(g,{Fragment:C.Fragment,components:i,ignoreInvalidStyle:!0,jsx:C.jsx,jsxs:C.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 tl)if(Object.hasOwn(tl,x)&&Object.hasOwn(b.properties,x)){const E=b.properties[x],$=tl[x];($===null||$.includes(b.tagName))&&(b.properties[x]=p(String(E||""),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 yv(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||bT.test(e.slice(0,t))?e:""}function ST(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function bv(e,t,n){const o=Ai((n||{}).ignore||[]),i=xT(t);let a=-1;for(;++a<i.length;)ev(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 E=d(...w,x);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?p.lastIndex=A+1:(v!==A&&b.push({type:"text",value:c.value.slice(v,A)}),Array.isArray(E)?b.push(...E):E&&b.push(E),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 xT(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([ET(o[0]),CT(o[1])])}return t}function ET(e){return typeof e=="string"?new RegExp(ST(e),"g"):e}function CT(e){return typeof e=="function"?e:function(){return e}}function kT(e){bv(e,[/\r?\n|\r/g,AT])}function AT(){return{type:"break"}}function $T(){return function(e){kT(e)}}function wv(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 Al="phrasing",$l=["autolink","link","image","label"];function TT(){return{transforms:[NT],enter:{literalAutolink:IT,literalAutolinkEmail:Tl,literalAutolinkHttp:Tl,literalAutolinkWww:Tl},exit:{literalAutolink:MT,literalAutolinkEmail:_T,literalAutolinkHttp:PT,literalAutolinkWww:DT}}}function OT(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Al,notInConstruct:$l},{character:":",before:"[ps]",after:"\\/",inConstruct:Al,notInConstruct:$l}]}}function IT(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Tl(e){this.config.enter.autolinkProtocol.call(this,e)}function PT(e){this.config.exit.autolinkProtocol.call(this,e)}function DT(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 _T(e){this.config.exit.autolinkEmail.call(this,e)}function MT(e){this.exit(e)}function NT(e){bv(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,RT],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),LT]],{ignore:["link","linkReference"]})}function RT(e,t,n,r,o){let i="";if(!Sv(o)||(/^w/i.test(t)&&(n=t+n,t="",i="http://"),!FT(n)))return!1;const a=BT(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 LT(e,t,n,r){return!Sv(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function FT(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 BT(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=wv(e,"(");let i=wv(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 Sv(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Un(n)||mi(n))&&(!t||n!==47)}xv.peek=QT;function jT(){return{enter:{gfmFootnoteDefinition:UT,gfmFootnoteDefinitionLabelString:WT,gfmFootnoteCall:VT,gfmFootnoteCallString:qT},exit:{gfmFootnoteDefinition:KT,gfmFootnoteDefinitionLabelString:HT,gfmFootnoteCall:YT,gfmFootnoteCallString:GT}}}function zT(){return{unsafe:[{character:"[",inConstruct:["phrasing","label","reference"]}],handlers:{footnoteDefinition:JT,footnoteReference:xv}}}function UT(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function WT(){this.buffer()}function HT(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 VT(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function qT(){this.buffer()}function GT(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 YT(e){this.exit(e)}function xv(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 QT(){return"["}function JT(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()),ZT)),a(),i}function ZT(e,t,n){return t===0?e:(n?"":" ")+e}const XT=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ev.peek=oO;function eO(){return{canContainEols:["delete"],enter:{strikethrough:nO},exit:{strikethrough:rO}}}function tO(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:XT}],handlers:{delete:Ev}}}function nO(e){this.enter({type:"delete",children:[]},e)}function rO(e){this.exit(e)}function Ev(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 oO(){return"~"}function iO(e){return e.length}function aO(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||iO,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=sO(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),E=i[f];E===114?w=" ".repeat(x):E===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 sO(e){return e==null?"":String(e)}function Cv(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 lO(e,t,n,r){const o=n.enter("blockquote"),i=n.createTracker(r);i.move("> "),i.shift(2);const a=n.indentLines(n.containerFlow(e,i.current()),cO);return o(),a}function cO(e,t,n){return">"+(n?"":" ")+e}function uO(e,t){return kv(e,t.inConstruct,!0)&&!kv(e,t.notInConstruct,!1)}function kv(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 Av(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
25
|
+
`&&uO(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
26
|
+
`}function fO(e,t){const n=String(e);let r=n.indexOf(t),o=r,i=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++i>a&&(a=i):i=1,o=r+t.length,r=n.indexOf(t,o);return a}function dO(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 pO(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 hO(e,t,n,r){const o=pO(n),i=e.value||"",a=o==="`"?"GraveAccent":"Tilde";if(dO(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(i,vO);return f(),p}const s=n.createTracker(r),l=o.repeat(Math.max(fO(i,o)+1,3)),c=n.enter("codeFenced");let u=s.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=s.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=s.move(" "),u+=s.move(n.safe(e.meta,{before:u,after:`
|
|
27
27
|
`,encode:["`"],...s.current()})),f()}return u+=s.move(`
|
|
28
28
|
`),i&&(u+=s.move(i+`
|
|
29
|
-
`)),u+=s.move(l),c(),u}function
|
|
30
|
-
`,...l.current()}))),s(),e.title&&(s=n.enter(`title${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function
|
|
29
|
+
`)),u+=s.move(l),c(),u}function vO(e,t,n){return(n?"":" ")+e}function Ol(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 mO(e,t,n,r){const o=Ol(n),i=o==='"'?"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${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),a(),c}function gO(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}$v.peek=yO;function $v(e,t,n,r){const o=gO(n),i=n.enter("emphasis"),a=n.createTracker(r);let s=a.move(o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o),i(),s}function yO(e,t,n){return n.options.emphasis||"*"}function bO(e,t){let n=!1;return hl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,pl}),!!((!e.depth||e.depth<3)&&nl(e)&&(t.options.setext||n))}function wO(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),i=n.createTracker(r);if(bO(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...i.current(),before:`
|
|
31
31
|
`,after:`
|
|
32
32
|
`});return f(),u(),p+`
|
|
33
33
|
`+(o===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
|
|
34
34
|
`))+1))}const a="#".repeat(o),s=n.enter("headingAtx"),l=n.enter("phrasing");i.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
35
|
-
`,...i.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}
|
|
35
|
+
`,...i.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}Tv.peek=SO;function Tv(e){return e.value||""}function SO(){return"<"}Ov.peek=xO;function Ov(e,t,n,r){const o=Ol(n),i=o==='"'?"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${i}`),c+=l.move(" "+o),c+=l.move(n.safe(e.title,{before:c,after:o,...l.current()})),c+=l.move(o),s()),c+=l.move(")"),a(),c}function xO(){return"!"}Iv.peek=EO;function Iv(e,t,n,r){const o=e.referenceType,i=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 u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function EO(){return"!"}Pv.peek=CO;function Pv(e,t,n){let r=e.value||"",o="`",i=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++i<n.unsafe.length;){const a=n.unsafe[i],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 o+r+o}function CO(){return"`"}function Dv(e,t){const n=nl(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))}_v.peek=kO;function _v(e,t,n,r){const o=Ol(n),i=o==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let s,l;if(Dv(e,n)){const u=n.stack;n.stack=[],s=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),s(),n.stack=u,f}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${i}`),c+=a.move(" "+o),c+=a.move(n.safe(e.title,{before:c,after:o,...a.current()})),c+=a.move(o),l()),c+=a.move(")"),s(),c}function kO(e,t,n){return Dv(e,n)?"<":"["}Mv.peek=AO;function Mv(e,t,n,r){const o=e.referenceType,i=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 u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...s.current()});return a(),n.stack=u,i(),o==="full"||!c||c!==f?l+=s.move(f+"]"):o==="shortcut"?l=l.slice(0,-1):l+=s.move("]"),l}function AO(){return"["}function Il(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 $O(e){const t=Il(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 TO(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 Nv(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 OO(e,t,n,r){const o=n.enter("list"),i=n.bulletCurrent;let a=e.ordered?TO(n):Il(n);const s=e.ordered?a==="."?")":".":$O(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.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),Nv(n)===a&&u){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=s),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=i,o(),c}function IO(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 PO(e,t,n,r){const o=IO(n);let i=n.bulletCurrent||Il(n);t&&t.type==="list"&&t.ordered&&(i=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+i);let a=i.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const s=n.createTracker(r);s.move(i+" ".repeat(a-i.length)),s.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),u);return l(),c;function u(f,p,d){return p?(d?"":" ".repeat(a))+f:(d?i:i+" ".repeat(a-i.length))+f}}function DO(e,t,n,r){const o=n.enter("paragraph"),i=n.enter("phrasing"),a=n.containerPhrasing(e,r);return i(),o(),a}const _O=Ai(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function MO(e,t,n,r){return(e.children.some(function(a){return _O(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function NO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Rv.peek=RO;function Rv(e,t,n,r){const o=NO(n),i=n.enter("strong"),a=n.createTracker(r);let s=a.move(o+o);return s+=a.move(n.containerPhrasing(e,{before:s,after:o,...a.current()})),s+=a.move(o+o),i(),s}function RO(e,t,n){return n.options.strong||"*"}function LO(e,t,n,r){return n.safe(e.value,r)}function FO(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 BO(e,t,n){const r=(Nv(n)+(n.options.ruleSpaces?" ":"")).repeat(FO(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Lv={blockquote:lO,break:Av,code:hO,definition:mO,emphasis:$v,hardBreak:Av,heading:wO,html:Tv,image:Ov,imageReference:Iv,inlineCode:Pv,link:_v,linkReference:Mv,list:OO,listItem:PO,paragraph:DO,root:MO,strong:Rv,text:LO,thematicBreak:BO};function jO(){return{enter:{table:zO,tableData:Fv,tableHeader:Fv,tableRow:WO},exit:{codeText:HO,table:UO,tableData:Pl,tableHeader:Pl,tableRow:Pl}}}function zO(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 UO(e){this.exit(e),this.data.inTable=void 0}function WO(e){this.enter({type:"tableRow",children:[]},e)}function Pl(e){this.exit(e)}function Fv(e){this.enter({type:"tableCell",children:[]},e)}function HO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,KO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function KO(e,t){return t==="|"?t:e}function VO(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,i=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
36
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,v,h,g){return c(u(d,h,g),d.align)}function s(d,v,h,g){const m=f(d,h,g),b=c([m]);return b.slice(0,b.indexOf(`
|
|
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 ZO(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=Iv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function jI(){return{exit:{taskListCheckValueChecked:Av,taskListCheckValueUnchecked:Av,paragraph:zI}}}function BI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:WI}}}function Av(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function zI(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 WI(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=Iv.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 UI(){return[wO(),_O(),qO(),_I(),jI()]}function HI(e){return{extensions:[SO(),DO(),KO(),FI(e),BI()]}}const VI={tokenize:JI,partial:!0},_v={tokenize:ZI,partial:!0},Dv={tokenize:QI,partial:!0},Mv={tokenize:eP,partial:!0},qI={tokenize:tP,partial:!0},Nv={name:"wwwAutolink",tokenize:YI,previous:Rv},Lv={name:"protocolAutolink",tokenize:XI,previous:Fv},un={name:"emailAutolink",tokenize:GI,previous:jv},Yt={};function KI(){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,Lv],Yt[104]=[un,Lv],Yt[87]=[un,Nv],Yt[119]=[un,Nv];function GI(e,t,n){const r=this;let o,i;return a;function a(f){return!Ol(f)||!jv.call(r,r.previous)||Il(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Ol(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(qI,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&&dt(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function YI(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Rv.call(r,r.previous)||Il(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(VI,e.attempt(_v,e.attempt(Dv,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function XI(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&Fv.call(r,r.previous)&&!Il(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(dt(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||pi(f)||_e(f)||zn(f)||hi(f)?n(f):e.attempt(_v,e.attempt(Dv,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function JI(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 ZI(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Mv,l,s)(c):c===null||_e(c)||zn(c)||c!==45&&hi(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 QI(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(Mv,t,i)(a):a===null||_e(a)||zn(a)?t(a):(e.consume(a),o)}function i(a){return a===41&&r++,e.consume(a),o}}function eP(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)||zn(s)?t(s):n(s)}function o(s){return s===null||s===40||s===91||_e(s)||zn(s)?t(s):r(s)}function i(s){return dt(s)?a(s):n(s)}function a(s){return s===59?(e.consume(s),r):dt(s)?(e.consume(s),a):n(s)}}function tP(e,t,n){return r;function r(i){return e.consume(i),o}function o(i){return lt(i)?n(i):t(i)}}function Rv(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||_e(e)}function Fv(e){return!dt(e)}function jv(e){return!(e===47||Ol(e))}function Ol(e){return e===43||e===45||e===46||e===95||lt(e)}function Il(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 nP={tokenize:uP,partial:!0};function rP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sP,continuation:{tokenize:lP},exit:cP}},text:{91:{name:"gfmFootnoteCall",tokenize:aP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oP,resolveTo:iP}}}}function oP(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=Rt(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 iP(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 aP(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(Rt(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 sP(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=Rt(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 lP(e,t,n){return e.check(ro,t,e.attempt(nP,t,n))}function cP(e){e.exit("gfmFootnoteDefinition")}function uP(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 fP(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,mi(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=vi(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=vi(v);return g._open=!m||m===2&&!!h,g._close=!h||h===2&&!!m,s(v)}}}class dP{constructor(){this.map=[]}add(t,n,r){pP(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 pP(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 hP(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 vP(){return{flow:{null:{name:"table",tokenize:mP,resolveAll:gP}}}}function mP(e,t,n){const r=this;let o=0,i=0,a;return s;function s(O){let D=r.events.length-1;for(;D>-1;){const B=r.events[D][1].type;if(B==="lineEnding"||B==="linePrefix")D--;else break}const F=D>-1?r.events[D][1].type:null,j=F==="tableHead"||F==="tableRow"?E:l;return j===E&&r.parser.lazy[r.now().line]?n(O):j(O)}function l(O){return e.enter("tableHead"),e.enter("tableRow"),c(O)}function c(O){return O===124||(a=!0,i+=1),u(O)}function u(O){return O===null?n(O):ue(O)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),d):n(O):ve(O)?we(e,u,"whitespace")(O):(i+=1,a&&(a=!1,o+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(O)))}function f(O){return O===null||O===124||_e(O)?(e.exit("data"),u(O)):(e.consume(O),O===92?p:f)}function p(O){return O===92||O===124?(e.consume(O),f):f(O)}function d(O){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(O):(e.enter("tableDelimiterRow"),a=!1,ve(O)?we(e,v,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):v(O))}function v(O){return O===45||O===58?g(O):O===124?(a=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),h):x(O)}function h(O){return ve(O)?we(e,g,"whitespace")(O):g(O)}function g(O){return O===58?(i+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),m):O===45?(i+=1,m(O)):O===null||ue(O)?$(O):x(O)}function m(O){return O===45?(e.enter("tableDelimiterFiller"),b(O)):x(O)}function b(O){return O===45?(e.consume(O),b):O===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),w):(e.exit("tableDelimiterFiller"),w(O))}function w(O){return ve(O)?we(e,$,"whitespace")(O):$(O)}function $(O){return O===124?v(O):O===null||ue(O)?!a||o!==i?x(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):x(O)}function x(O){return n(O)}function E(O){return e.enter("tableRow"),T(O)}function T(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),T):O===null||ue(O)?(e.exit("tableRow"),t(O)):ve(O)?we(e,T,"whitespace")(O):(e.enter("data"),R(O))}function R(O){return O===null||O===124||_e(O)?(e.exit("data"),T(O)):(e.consume(O),O===92?U:R)}function U(O){return O===92||O===124?(e.consume(O),R):R(O)}}function gP(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 dP;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Bv(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=Oi(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=Oi(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=Oi(p,t,i,o,n,f)):a[1]!==0&&(f=Oi(p,t,a,o,n,f)),o=0):o&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&Bv(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=hP(t.events,n))}return e}function Oi(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 Bv(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 yP={name:"tasklistCheck",tokenize:wP};function bP(){return{text:{91:yP}}}function wP(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 ue(l)?t(l):ve(l)?e.check({tokenize:SP},t,n)(l):n(l)}}function SP(e,t,n){return we(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function xP(e){return ph([KI(),rP(),fP(e),vP(),bP()])}const EP={};function kP(e){const t=this,n=e||EP,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(xP(n)),i.push(UI()),a.push(HI(n))}const ye={container:{className:"bpReset bpContainer bpFont",dropzone:{overlay:{className:"bpDropzoneOverlay"},container:{className:"bpDropzoneContainer"}}},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"}}}},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"}},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:{className:"bpErrorHeader"},content:{className:"bpErrorContent"},errorTitle:{className:"bpErrorTitle"},errorMessage:{className:"bpErrorMessage"},icon:{className:"bpErrorIcon"}},typingIndicator:{container:{className:"bpTypingIndicatorContainer"},loader:{className:"bpTypingIndicatorLoader"}}};/**
|
|
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 aO(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=Lv.inlineCode(d,v,h);return h.stack.includes("tableCell")&&(g=g.replace(/\|/g,"\\$&")),g}}function qO(){return{exit:{taskListCheckValueChecked:Bv,taskListCheckValueUnchecked:Bv,paragraph:YO}}}function GO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:QO}}}function Bv(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function YO(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 QO(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=Lv.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 JO(){return[TT(),jT(),eO(),jO(),qO()]}function ZO(e){return{extensions:[OT(),zT(),tO(),VO(e),GO()]}}const XO={tokenize:iI,partial:!0},jv={tokenize:aI,partial:!0},zv={tokenize:sI,partial:!0},Uv={tokenize:lI,partial:!0},eI={tokenize:cI,partial:!0},Wv={name:"wwwAutolink",tokenize:rI,previous:Kv},Hv={name:"protocolAutolink",tokenize:oI,previous:Vv},un={name:"emailAutolink",tokenize:nI,previous:qv},Yt={};function tI(){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,Hv],Yt[104]=[un,Hv],Yt[87]=[un,Wv],Yt[119]=[un,Wv];function nI(e,t,n){const r=this;let o,i;return a;function a(f){return!Dl(f)||!qv.call(r,r.previous)||_l(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return Dl(f)?(e.consume(f),s):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(eI,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 rI(e,t,n){const r=this;return o;function o(a){return a!==87&&a!==119||!Kv.call(r,r.previous)||_l(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(XO,e.attempt(jv,e.attempt(zv,i),n),n)(a))}function i(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function oI(e,t,n){const r=this;let o="",i=!1;return a;function a(f){return(f===72||f===104)&&Vv.call(r,r.previous)&&!_l(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(jv,e.attempt(zv,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function iI(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 aI(e,t,n){let r,o,i;return a;function a(c){return c===46||c===95?e.check(Uv,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 sI(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(Uv,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 lI(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 cI(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 Vv(e){return!ht(e)}function qv(e){return!(e===47||Dl(e))}function Dl(e){return e===43||e===45||e===46||e===95||lt(e)}function _l(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 uI={tokenize:yI,partial:!0};function fI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vI,continuation:{tokenize:mI},exit:gI}},text:{91:{name:"gfmFootnoteCall",tokenize:hI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:dI,resolveTo:pI}}}}function dI(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 pI(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 hI(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 vI(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),be(e,d,"gfmFootnoteDefinitionWhitespace")):n(v)}function d(v){return t(v)}}function mI(e,t,n){return e.check(oo,t,e.attempt(uI,t,n))}function gI(e){e.exit("gfmFootnoteDefinition")}function yI(e,t,n){const r=this;return be(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 bI(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 wI{constructor(){this.map=[]}add(t,n,r){SI(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 SI(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 xI(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 EI(){return{flow:{null:{name:"table",tokenize:CI,resolveAll:kI}}}}function CI(e,t,n){const r=this;let o=0,i=0,a;return s;function s(T){let M=r.events.length-1;for(;M>-1;){const F=r.events[M][1].type;if(F==="lineEnding"||F==="linePrefix")M--;else break}const U=M>-1?r.events[M][1].type:null,B=U==="tableHead"||U==="tableRow"?E:l;return B===E&&r.parser.lazy[r.now().line]?n(T):B(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):me(T)?be(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,me(T)?be(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 me(T)?be(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 me(T)?be(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 E(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)):me(T)?be(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?K:R)}function K(T){return T===92||T===124?(e.consume(T),R):R(T)}}function kI(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 wI;for(;++n<e.length;){const d=e[n],v=d[1];d[0]==="enter"?v.type==="tableHead"?(s=!1,l!==0&&(Gv(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&&Gv(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=xI(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 Gv(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 AI={name:"tasklistCheck",tokenize:TI};function $I(){return{text:{91:AI}}}function TI(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):me(l)?e.check({tokenize:OI},t,n)(l):n(l)}}function OI(e,t,n){return be(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function II(e){return Sh([tI(),fI(),bI(e),EI(),$I()])}const PI={};function DI(e){const t=this,n=e||PI,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(II(n)),i.push(JO()),a.push(ZO(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"}}}},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"}}};/**
|
|
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 _I=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),MI=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Yv=e=>{const t=MI(e);return t.charAt(0).toUpperCase()+t.slice(1)},Qv=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),NI=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 RI={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 LI=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:i,iconNode:a,...s},l)=>O.createElement("svg",{ref:l,...RI,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Qv("lucide",o),...!i&&!NI(s)&&{"aria-hidden":"true"},...s},[...a.map(([c,u])=>O.createElement(c,u)),...Array.isArray(i)?i:[i]]));/**
|
|
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 Ee=(e,t)=>{const n=
|
|
57
|
+
*/const Ee=(e,t)=>{const n=O.forwardRef(({className:r,...o},i)=>O.createElement(LI,{ref:i,iconNode:t,className:Qv(`lucide-${_I(Yv(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Yv(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 FI=Ee("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 Jv=Ee("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 BI=Ee("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 jI=Ee("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 zI=Ee("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 UI=Ee("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 WI=Ee("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 Zv=Ee("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 HI=Ee("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 KI=Ee("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 VI=Ee("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 Xv=Ee("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 qI=Ee("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 GI=Ee("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 em=Ee("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 YI=Ee("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 QI=Ee("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 JI=Ee("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 ZI=Ee("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 XI=Ee("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 eP=Ee("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 tP=Ee("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 nP=Ee("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 rP=Ee("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 oP=Ee("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 iP=Ee("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 aP=Ee("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 sP=Ee("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 tm=Ee("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 lP=Ee("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 cP=Ee("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
|
+
* @license lucide-react v0.525.0 - ISC
|
|
214
|
+
*
|
|
215
|
+
* This source code is licensed under the ISC license.
|
|
216
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
+
*/const uP=Ee("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),fP=({text:e})=>{const{message:{blocks:{text:t}}}=ve,[n,r]=O.useState(new Map);function o(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))}}O.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=>{o(c)})},[e]);const i={h1:({node:a,...s})=>C.jsx("h1",{...s,...t.heading1}),h2:({node:a,...s})=>C.jsx("h2",{...s,...t.heading2}),h3:({node:a,...s})=>C.jsx("h3",{...s,...t.heading3}),h4:({node:a,...s})=>C.jsx("h4",{...s,...t.heading4}),h5:"h4",h6:"h4",em:({node:a,...s})=>C.jsx("em",{...s,...t.italic}),strong:({node:a,...s})=>C.jsx("strong",{...s,...t.bold}),p:({node:a,...s})=>C.jsx("p",{...s,...t.text}),hr:({node:a,...s})=>C.jsx("hr",{...s,...t.horizontalRule}),a:({node:a,href:s,children:l,...c})=>C.jsx("a",{...c,...t.link,onMouseUp:u=>{window.open(s,"_blank","noopener,noreferrer")},children:l}),img:({node:a,...s})=>{const l=s.src;return n.get(l)||!1?C.jsx("div",{"data-error":!0,...t.image,children:C.jsx(em,{strokeWidth:"1"})}):C.jsx("img",{...s,...t.image})},ol:({node:a,...s})=>C.jsx("ol",{...s,...t.orderedList}),ul:({node:a,...s})=>C.jsx("ul",{...s,...t.unorderedList}),li:({node:a,...s})=>C.jsx("li",{...s,...t.listItem}),br:({node:a,...s})=>C.jsx("br",{...s,...t.lineBreak}),pre:({node:a,...s})=>{var v,h;const l=a==null?void 0:a.children[0],c=dP(((h=(v=l==null?void 0:l.properties)==null?void 0:v.className)==null?void 0:h[0])||""),[u,f]=O.useState(!1),p=O.useRef(null),d=()=>{if(!p.current)return;const g=p.current.textContent||"";navigator.clipboard.writeText(g).then(()=>{f(!0),setTimeout(()=>{f(!1)},1500)}).catch(m=>{console.error("Failed to copy code to clipboard:",m)})};return C.jsxs("div",{...t.codeBlockContainer,children:[C.jsxs("div",{...t.codeBlockTitle,children:[c?C.jsx("span",{children:c}):"Code",u?C.jsx(BI,{...t.codeBlockCopyIcon}):C.jsx(qI,{...t.codeBlockCopyIcon,onClick:d})]}),C.jsx("pre",{ref:p,...s,...t.codeBlock})]})},input:({node:a,...s})=>C.jsx("input",{...s,...t.input,disabled:!1}),code:({node:a,...s})=>C.jsx("code",{...s,...t.code}),table:({node:a,...s})=>C.jsx("div",{...t.tableContainer,children:C.jsx("table",{...s,...t.table})}),th:({node:a,...s})=>C.jsx("th",{...s,...t.tableHeader}),tr:({node:a,...s})=>C.jsx("tr",{...s,...t.tableRow}),td:({node:a,...s})=>C.jsx("td",{...s,...t.tableData})};return C.jsx(gv,{urlTransform:a=>a.startsWith("tel:")?a:yv(a),components:i,remarkPlugins:[DI,$T],children:e})},dP=e=>{if(!e)return"";const t=e.match(/language-(\w+)/);return t?t[1]:""},pP={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},nm=e=>{let t;const n=new Set,r=(u,f)=>{const p=typeof u=="function"?u(t):u;if(!Object.is(p,t)){const d=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(v=>v(t,d))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>c,subscribe:u=>(n.add(u),()=>n.delete(u)),destroy:()=>{(pP?"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,o,l);return l},hP=e=>e?nm(e):nm;var Ml={exports:{}},Nl={},Pi={exports:{}},Rl={};/**
|
|
213
218
|
* @license React
|
|
214
219
|
* use-sync-external-store-shim.production.min.js
|
|
215
220
|
*
|
|
@@ -217,7 +222,7 @@ Please start a new conversation.`,js={ResourceNotFound:{type:"configuration",mes
|
|
|
217
222
|
*
|
|
218
223
|
* This source code is licensed under the MIT license found in the
|
|
219
224
|
* LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/var
|
|
225
|
+
*/var rm;function vP(){if(rm)return Rl;rm=1;var e=O;function t(f,p){return f===p&&(f!==0||1/f===1/p)||f!==f&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,i=e.useLayoutEffect,a=e.useDebugValue;function s(f,p){var d=p(),v=r({inst:{value:d,getSnapshot:p}}),h=v[0].inst,g=v[1];return i(function(){h.value=d,h.getSnapshot=p,l(h)&&g({inst:h})},[f,d,p]),o(function(){return l(h)&&g({inst:h}),f(function(){l(h)&&g({inst:h})})},[f]),a(d),d}function l(f){var p=f.getSnapshot;f=f.value;try{var d=p();return!n(f,d)}catch{return!0}}function c(f,p){return p()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:s;return Rl.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,Rl}var Ll={};/**
|
|
221
226
|
* @license React
|
|
222
227
|
* use-sync-external-store-shim.development.js
|
|
223
228
|
*
|
|
@@ -225,7 +230,7 @@ Please start a new conversation.`,js={ResourceNotFound:{type:"configuration",mes
|
|
|
225
230
|
*
|
|
226
231
|
* This source code is licensed under the MIT license found in the
|
|
227
232
|
* LICENSE file in the root directory of this source tree.
|
|
228
|
-
*/var
|
|
233
|
+
*/var om;function mP(){return om||(om=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=O,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(w){{for(var A=arguments.length,x=new Array(A>1?A-1:0),E=1;E<A;E++)x[E-1]=arguments[E];r("error",w,x)}}function r(w,A,x){{var E=t.ReactDebugCurrentFrame,$=E.getStackAddendum();$!==""&&(A+="%s",x=x.concat([$]));var R=x.map(function(K){return String(K)});R.unshift("Warning: "+A),Function.prototype.apply.call(console[w],console,R)}}function o(w,A){return w===A&&(w!==0||1/w===1/A)||w!==w&&A!==A}var i=typeof Object.is=="function"?Object.is:o,a=e.useState,s=e.useEffect,l=e.useLayoutEffect,c=e.useDebugValue,u=!1,f=!1;function p(w,A,x){u||e.startTransition!==void 0&&(u=!0,n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var E=A();if(!f){var $=A();i(E,$)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var R=a({inst:{value:E,getSnapshot:A}}),K=R[0].inst,T=R[1];return l(function(){K.value=E,K.getSnapshot=A,d(K)&&T({inst:K})},[w,E,A]),s(function(){d(K)&&T({inst:K});var M=function(){d(K)&&T({inst:K})};return w(M)},[w]),c(E),E}function d(w){var A=w.getSnapshot,x=w.value;try{var E=A();return!i(x,E)}catch{return!0}}function v(w,A,x){return A()}var h=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",g=!h,m=g?v:p,b=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m;Ll.useSyncExternalStore=b,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Ll}var im;function am(){return im||(im=1,process.env.NODE_ENV==="production"?Pi.exports=vP():Pi.exports=mP()),Pi.exports}/**
|
|
229
234
|
* @license React
|
|
230
235
|
* use-sync-external-store-shim/with-selector.production.min.js
|
|
231
236
|
*
|
|
@@ -233,7 +238,7 @@ Please start a new conversation.`,js={ResourceNotFound:{type:"configuration",mes
|
|
|
233
238
|
*
|
|
234
239
|
* This source code is licensed under the MIT license found in the
|
|
235
240
|
* LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/var
|
|
241
|
+
*/var sm;function gP(){if(sm)return Nl;sm=1;var e=O,t=am();function n(c,u){return c===u&&(c!==0||1/c===1/u)||c!==c&&u!==u}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;return Nl.useSyncExternalStoreWithSelector=function(c,u,f,p,d){var v=i(null);if(v.current===null){var h={hasValue:!1,value:null};v.current=h}else h=v.current;v=s(function(){function m(E){if(!b){if(b=!0,w=E,E=p(E),d!==void 0&&h.hasValue){var $=h.value;if(d($,E))return A=$}return A=E}if($=A,r(w,E))return $;var R=p(E);return d!==void 0&&d($,R)?$:(w=E,A=R)}var b=!1,w,A,x=f===void 0?null:f;return[function(){return m(u())},x===null?void 0:function(){return m(x())}]},[u,f,p,d]);var g=o(c,v[0],v[1]);return a(function(){h.hasValue=!0,h.value=g},[g]),l(g),g},Nl}var Fl={};/**
|
|
237
242
|
* @license React
|
|
238
243
|
* use-sync-external-store-shim/with-selector.development.js
|
|
239
244
|
*
|
|
@@ -241,56 +246,56 @@ Please start a new conversation.`,js={ResourceNotFound:{type:"configuration",mes
|
|
|
241
246
|
*
|
|
242
247
|
* This source code is licensed under the MIT license found in the
|
|
243
248
|
* LICENSE file in the root directory of this source tree.
|
|
244
|
-
*/var
|
|
249
|
+
*/var lm;function yP(){return lm||(lm=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=O,t=am();function n(u,f){return u===f&&(u!==0||1/u===1/f)||u!==u&&f!==f}var r=typeof Object.is=="function"?Object.is:n,o=t.useSyncExternalStore,i=e.useRef,a=e.useEffect,s=e.useMemo,l=e.useDebugValue;function c(u,f,p,d,v){var h=i(null),g;h.current===null?(g={hasValue:!1,value:null},h.current=g):g=h.current;var m=s(function(){var x=!1,E,$,R=function(U){if(!x){x=!0,E=U;var B=d(U);if(v!==void 0&&g.hasValue){var F=g.value;if(v(F,B))return $=F,F}return $=B,B}var D=E,L=$;if(r(D,U))return L;var q=d(U);return v!==void 0&&v(L,q)?L:(E=U,$=q,q)},K=p===void 0?null:p,T=function(){return R(f())},M=K===null?void 0:function(){return R(K())};return[T,M]},[f,p,d,v]),b=m[0],w=m[1],A=o(u,b,w);return a(function(){g.hasValue=!0,g.value=A},[A]),l(A),A}Fl.useSyncExternalStoreWithSelector=c,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()),Fl}process.env.NODE_ENV==="production"?Ml.exports=gP():Ml.exports=yP();var bP=Ml.exports;const wP=ye(bP),cm={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},{useDebugValue:SP}=O,{useSyncExternalStoreWithSelector:xP}=wP;let um=!1;const EP=e=>e;function CP(e,t=EP,n){(cm?"production":void 0)!=="production"&&n&&!um&&(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"),um=!0);const r=xP(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return SP(r),r}const kP=e=>{(cm?"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"?hP(e):e,n=(r,o)=>CP(t,r,o);return Object.assign(n,t),n},xn=e=>kP,Di={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Bl=new Map,_i=e=>{const t=Bl.get(e);return t?Object.fromEntries(Object.entries(t.stores).map(([n,r])=>[n,r.getState()])):{}},AP=(e,t,n)=>{if(e===void 0)return{type:"untracked",connection:t.connect(n)};const r=Bl.get(n.name);if(r)return{type:"tracked",store:e,...r};const o={connection:t.connect(n),stores:{}};return Bl.set(n.name,o),{type:"tracked",store:e,...o}},co=(e,t={})=>(n,r,o)=>{const{enabled:i,anonymousActionType:a,store:s,...l}=t;let c;try{c=(i??(Di?"production":void 0)!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!c)return(Di?"production":void 0)!=="production"&&i&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,o);const{connection:u,...f}=AP(s,c,l);let p=!0;o.setState=(h,g,m)=>{const b=n(h,g);if(!p)return b;const w=m===void 0?{type:a||"anonymous"}:typeof m=="string"?{type:m}:m;return s===void 0?(u==null||u.send(w,r()),b):(u==null||u.send({...w,type:`${s}/${w.type}`},{..._i(l.name),[s]:o.getState()}),b)};const d=(...h)=>{const g=p;p=!1,n(...h),p=g},v=e(o.setState,r,o);if(f.type==="untracked"?u==null||u.init(v):(f.stores[f.store]=o,u==null||u.init(Object.fromEntries(Object.entries(f.stores).map(([h,g])=>[h,h===f.store?v:g.getState()])))),o.dispatchFromDevtools&&typeof o.dispatch=="function"){let h=!1;const g=o.dispatch;o.dispatch=(...m)=>{(Di?"production":void 0)!=="production"&&m[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(...m)}}return u.subscribe(h=>{var g;switch(h.type){case"ACTION":if(typeof h.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return jl(h.payload,m=>{if(m.type==="__setState"){if(s===void 0){d(m.state);return}Object.keys(m.state).length!==1&&console.error(`
|
|
245
250
|
[zustand devtools middleware] Unsupported __setState action format.
|
|
246
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(),
|
|
247
252
|
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
|
248
|
-
`);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(Ai(l.name));case"COMMIT":if(s===void 0){u==null||u.init(o.getState());return}return u==null?void 0:u.init(Ai(l.name));case"ROLLBACK":return Ll(h.state,m=>{if(s===void 0){d(m),u==null||u.init(o.getState());return}d(m[s]),u==null||u.init(Ai(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return Ll(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},Ll=(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 nm(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 lo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return lo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return lo(r)(n)}}}},bA=(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=lo(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 lo(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},wA=(e,t)=>(n,r,o)=>{let i={storage:nm(()=>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 lo(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[$,x]=b;if(d=i.merge(x,(w=r())!=null?w:p),n(d,!0),$)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},rm=(e,t)=>"getStorage"in t||"serialize"in t||"deserialize"in t?((Pi?"production":void 0)!=="production"&&console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),bA(e,t)):wA(e,t),om=Un()(_i(rm(e=>({messageHistory:[],addMessageToHistory:t=>e(n=>({...n,messageHistory:[t,...(n.messageHistory??[]).slice(0,100)]}))}),{name:"botpress-message-history"})));let Di;const SA=new Uint8Array(16);function xA(){if(!Di&&(Di=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Di))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Di(SA)}const rt=[];for(let e=0;e<256;++e)rt.push((e+256).toString(16).slice(1));function EA(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 im={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function kA(e,t,n){if(im.randomUUID&&!t&&!e)return im.randomUUID();e=e||{};const r=e.random||(e.rng||xA)();return r[6]=r[6]&15|64,r[8]=r[8]&63|128,EA(r)}function Mi(e){var a;const{metadata:t,conversationId:n,userId:r}=e,{payload:o,disableInput:i}=am(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 am=e=>{switch(e.type){case"audio":return sm(e);case"card":return CA(e);case"carousel":return $A(e);case"choice":return TA(e);case"dropdown":return OA(e);case"file":return lm(e);case"image":return cm(e);case"location":return um(e);case"markdown":return fm(e);case"text":return dm(e);case"video":return pm(e);case"bloc":return IA(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},co=e=>({block:e,type:"bubble"}),sm=e=>({payload:{type:"audio",url:e.audioUrl}}),CA=e=>({payload:co(hm(e))}),$A=e=>({payload:{type:"carousel",blocks:e.items.map(t=>hm({type:"card",...t}))}}),TA=e=>{const t=e.options.map(i=>({title:i.label,value:i.value})),n=e.text,r=kA(),o=co({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}))}]}}},OA=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:co({type:"column",blocks:r})}},lm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),cm=e=>({payload:{type:"image",url:e.imageUrl}}),um=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),fm=e=>({payload:co({type:"text",text:e.markdown})}),dm=e=>({payload:co({type:"text",text:e.text,value:e.value})}),pm=e=>({payload:{type:"video",url:e.videoUrl}}),IA=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return sm({...n.payload,type:n.type}).payload;case"file":return lm({...n.payload,type:n.type}).payload;case"image":return cm({...n.payload,type:n.type}).payload;case"location":return um({...n.payload,type:n.type}).payload;case"markdown":return fm({...n.payload,type:n.type}).payload;case"text":return dm({...n.payload,type:n.type}).payload;case"video":return pm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),hm=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=Un()(_i(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=>Mi(i)).filter(Boolean)}}),{name:"messagesStore"})),PA=(e,t)=>Un()(_i(rm(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:nm(()=>t==="sessionStorage"?sessionStorage:localStorage)}))),Xr=class Xr{constructor(){}static getInstance(t="bp-webchat",n){return Xr._instances[t]||(Xr._instances[t]=PA(t,n)),Xr._instances[t]}};Kd(Xr,"_instances",{});let Rl=Xr;const vm=Rl.getInstance,mm=()=>{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()})}}},Ni=Un()(_i(e=>({eventEmitter:mm(),messageContainerRef:P.createRef(),setMessageContainerRef:t=>e({messageContainerRef:t})}),{name:"webchatStore"})),AA=8,_A=()=>Un()((e,t)=>({files:[],setFiles:n=>e({files:n}),upsertFile:n=>e(({files:r})=>({files:r.some(a=>a.name===n.name)?r.map(a=>a.name===n.name?{...a,...n}:a):[...r,{...n}]})),uploadFile:async(n,r)=>{const o=t().files.some(a=>a.name===n.name),i=t().files.length===AA;if(!(!o&&i)){t().upsertFile({name:n.name,type:"file",instance:n,status:"loading"});try{const{fileUrl:a,type:s}=await r(n);t().upsertFile({name:n.name,type:s,url:a,instance:n,status:"uploaded"})}catch(a){console.error("Error sending file:",a),t().upsertFile({name:n.name,type:"file",instance:n,status:"error"})}}},deleteFile:n=>e(({files:r})=>({files:r.filter(o=>o.name!=n)}))})),Jr=class Jr{constructor(){}static getInstance(t="bp-composer-file-store"){return Jr._instances[t]||(Jr._instances[t]=_A()),Jr._instances[t]}};Kd(Jr,"_instances",{});let Fl=Jr;const gm=Fl.getInstance,uo=Un()(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:[]})})),DA=({text:e,buttonValue:t,variant:n,groupId:r,reusable:o,sendMessage:i,isReadOnly:a,...s})=>{const l=Ni(w=>w.eventEmitter),[c,u]=P.useState(!1),[f,p]=P.useState(!1),[d,v]=P.useState(!1),{message:{blocks:{button:h}}}=ye;P.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"?C.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):C.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},ym=P.createContext(null);function MA(){const e=P.useContext(ym);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const bm=P.createContext({open:void 0,showModal:void 0,hideModal:void 0});function jl(){return P.useContext(bm)}const wm=P.forwardRef(({block:e,direction:t,sender:n,timestamp:r,messageId:o,feedback:i,metadata:a,isReadOnly:s,sendMessage:l,addMessageFeedback:c,...u},f)=>{const[p,d]=P.useState(""),{showModal:v,hideModal:h}=jl(),{message:{blocks:{bubble:{container:g,feedbackContainer:m,feedbackIcon:b}}}}=ye;return t=="incoming"?C.jsxs("div",{"data-direction":"incoming","data-feedback":!!i,...u,...g,ref:f,children:[C.jsx(qn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l}}),c&&v&&h&&e.type==="text"&&C.jsxs("div",{...m,children:[C.jsx(JP,{...b,"data-selected":i==="positive",onClick:()=>{c(o,{value:"positive"})}}),C.jsx(XP,{...b,"data-selected":i==="negative",onClick:()=>v({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{c(o,{value:"negative",comment:p}),h()},content:C.jsx(NA,{setFeedbackComment:d})})})]})]}):C.jsx("div",{"data-direction":"outgoing",...u,...g,ref:f,children:C.jsx(qn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});wm.displayName="Bubble";const NA=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=ye;return C.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 Sm(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 xm(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 Bl(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 LA(){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 RA(e,t,n){t===void 0&&(t=[]),n===void 0&&(n={loading:!1});var r=P.useRef(0),o=LA(),i=P.useState(n),a=i[0],s=i[1],l=P.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 Em(e,t){t===void 0&&(t=[]);var n=RA(e,t,{loading:!0}),r=n[0],o=n[1];return P.useEffect(function(){o()},[o]),r}const km=P.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=P.useId(),{setIsLoading:a}=MA(),[s,l]=P.useState(n),[c,u]=P.useState(!1),[f,p]=P.useState(!1),{message:{blocks:{image:d}}}=ye;return P.useLayoutEffect(()=>{a(v=>[...v,i])},[]),Em(async()=>{if(e){try{const{width:v,height:h}=await KE(e);s==="auto"&&l(FA(v,h))}catch(v){l("square"),console.error(v)}a(v=>v.filter(h=>h!==i))}},[e]),C.jsxs(C.Fragment,{children:[c?null:C.jsx("div",{"data-orientation":s,...d.placeholder}),f?C.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:o,children:C.jsx(qv,{size:"25%",strokeWidth:"5%"})}):C.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)}})]})});km.displayName="Image";function FA(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 Cm=P.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:o}}}=ye;return C.jsx("div",{children:C.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...o,ref:r})})});Cm.displayName="Video";const $m=P.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ye;return C.jsx("div",{children:C.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...o,ref:r})})});$m.displayName="Audio";const Tm=P.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}}}=ye;return C.jsxs("a",{...o,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:i,children:[C.jsx("p",{...s.title,children:n}),C.jsx(HP,{...s.icon})]})});Tm.displayName="Location";const Om=P.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}}}=ye;return C.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...f,ref:u,children:e.map((p,d)=>C.jsx(qn,{block:{...p,direction:r,timestamp:i,sender:o,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Om.displayName="Column";const Im=P.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}}}=ye;return C.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...p,ref:f,children:e.map((d,v)=>C.jsx(qn,{block:{...d,direction:r,timestamp:i,sender:o,messageId:s,isReadOnly:l,sendMessage:c}},v))})});Im.displayName="Row";function jA(e){return Object.prototype.toString.call(e)==="[object Object]"}function Pm(e){return jA(e)||Array.isArray(e)}function BA(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function zl(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}`:!Pm(s)||!Pm(l)?s===l:zl(s,l)})}function Am(e){return e.concat().sort((t,n)=>t.name>n.name?1:-1).map(t=>t.options)}function zA(e,t){if(e.length!==t.length)return!1;const n=Am(e),r=Am(t);return n.every((o,i)=>{const a=r[i];return zl(o,a)})}function Wl(e){return typeof e=="number"}function _m(e){return typeof e=="string"}function Ul(e){return typeof e=="boolean"}function Dm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Hl(e){return Math.sign(e)}function Li(e,t){return ze(e-t)}function WA(e,t){if(e===0||t===0||ze(e)<=ze(t))return 0;const n=Li(ze(e),ze(t));return ze(n/e)}function fo(e){return Fi(e).map(Number)}function fn(e){return e[Ri(e)]}function Ri(e){return Math.max(0,e.length-1)}function Fi(e){return Object.keys(e)}function Mm(e,t){return[e,t].reduce((n,r)=>(Fi(r).forEach(o=>{const i=n[o],a=r[o],s=Dm(i)&&Dm(a);n[o]=s?Mm(i,a):a}),n),{})}function Nm(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function UA(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 Wl(e)?a():n[e](c)}return{measure:s}}function HA(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 xn(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 Lm(e,t,n){const{constrain:r}=xn(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 Lm(e,s(),n)}const f={get:s,set:l,add:c,clone:u};return f}function VA(e){const t=e==="rtl"?-1:1;function n(o){return o*t}return{apply:n}}function po(){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 qA(e,t,n,r,o,i,a,s,l,c,u,f,p,d,v,h,g,m,b){const{cross:w}=e,$=["INPUT","SELECT","TEXTAREA"],x={passive:!1},E=po(),T=po(),R=xn(50,225).constrain(v.measure(20)),U={mouse:300,touch:400},O={mouse:500,touch:600},D=h?43:25;let F=!1,j=0,B=0,M=!1,L=!1,G=!1,H=!1;function A(J,q){if(!q)return;function ne(fe){(Ul(q)||q(J,fe))&&K(fe)}const ae=n;E.add(ae,"dragstart",fe=>fe.preventDefault(),x).add(ae,"touchmove",()=>{},x).add(ae,"touchend",()=>{}).add(ae,"touchstart",ne).add(ae,"mousedown",ne).add(ae,"touchcancel",Y).add(ae,"contextmenu",Y).add(ae,"click",Z,!0)}function y(){E.clear(),T.clear()}function _(){const J=H?r:n;T.add(J,"touchmove",V,x).add(J,"touchend",Y).add(J,"mousemove",V,x).add(J,"mouseup",Y)}function I(J){const q=J.nodeName||"";return $.includes(q)}function S(){return(h?O:U)[H?"mouse":"touch"]}function N(J,q){const ne=p.add(Hl(J)*-1),ae=f.byDistance(J,!h).distance;return h||ze(J)<R?ae:m&&q?ae*.5:f.byIndex(ne.get(),0).distance}function K(J){const q=Nm(J,o);H=q,!(q&&J.button!==0)&&(I(J.target)||(G=h&&q&&!J.buttons&&F,F=Li(i.get(),s.get())>=2,M=!0,a.pointerDown(J),u.useFriction(0).useDuration(0),i.set(s),_(),j=a.readPoint(J),B=a.readPoint(J,w),d.emit("pointerDown")))}function V(J){const q=a.readPoint(J),ne=a.readPoint(J,w),ae=Li(q,j),fe=Li(ne,B);if(!L&&!H&&(!J.cancelable||(L=ae>fe,!L)))return Y(J);const oe=a.pointerMove(J);ae>g&&(G=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(oe)),J.preventDefault()}function Y(J){const ne=f.byDistance(0,!1).index!==p.get(),ae=a.pointerUp(J)*S(),fe=N(t.apply(ae),ne),oe=WA(ae,fe),pe=D-10*oe,ge=b+oe/50;L=!1,M=!1,T.clear(),u.useDuration(pe).useFriction(ge),c.distance(fe,!h),H=!1,d.emit("pointerUp")}function Z(J){G&&(J.stopPropagation(),J.preventDefault())}function Q(){return M}return{init:A,pointerDown:Q,destroy:y}}function KA(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(Nm(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 GA(e){function t(r){return e*(r/100)}return{measure:t}}function YA(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,$=r.indexOf(b.target),x=w?a:s[$],E=c(w?e:r[$]);if(x!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(m=>{l||(Ul(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 XA(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(),E=!s;let T=0;return E?(i=0,e.set(t),T=x):(i+=x/s,i*=l,c+=i,e.add(i),T=c-u),a=Hl(T),u=c,o=ze(x)<.001,$}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,$}function w(x){return l=x,$}const $={direction:v,duration:d,velocity:h,seek:f,settled:p,useBaseFriction:m,useBaseDuration:g,useFriction:w,useDuration:b};return $}function JA(e,t,n,r,o){const i=o.measure(10),a=o.measure(50),s=xn(.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 ZA(e,t,n,r){const o=xn(-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 xn(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 QA(e,t,n){const r=t[0],o=n?r-e:fn(t);return{limit:xn(o,r)}}function e_(e,t,n,r){const i=t.min+.1,a=t.max+.1,{reachedMin:s,reachedMax:l}=xn(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 t_(e){const{max:t,length:n}=e;function r(i){return(i-t)/-n}return{get:r}}function n_(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,$,x)=>{const E=!$,T=$===Ri(x);return a&&E?0:a&&T?b:w+u[$]})}return{snaps:f,snapsAligned:p}}function r_(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=>Hl(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 $=t[m]-b,x=v+u($,0);return{index:m,distance:x}}return{byDistance:p,byIndex:f,shortcut:u}}function o_(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 ji(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 Wl(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function Rm(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 i_(e,t,n,r,o,i,a,s,l){const c=fo(o),u=fo(o).reverse(),f=h().concat(g());function p(x,E){return x.reduce((T,R)=>T-o[R],E)}function d(x,E){return x.reduce((T,R)=>p(T,E)>0?T.concat([R]):T,[])}function v(x,E){const T=E==="start",R=T?-r:r,U=a.findSlideBounds([R]);return x.map(O=>{const D=T?0:-r,F=T?r:0,B=U.filter(M=>M.index===O)[0][T?"end":"start"];return{index:O,slideLocation:ji(-1),translate:Rm(e,t,l[O]),target:()=>s.get()>B?D:F}})}function h(){const x=i[0]-1,E=d(u,x);return v(E,"end")}function g(){const x=n-i[0]-1,E=d(c,x);return v(E,"start")}function m(){return f.every(({index:x})=>{const E=c.filter(T=>T!==x);return p(E,n)<=.1})}function b(){f.forEach(x=>{const{target:E,translate:T,slideLocation:R}=x,U=E();U!==R.get()&&(T.to(U),R.set(U))})}function w(){f.forEach(x=>x.translate.clear())}return{canLoop:m,clear:w,loop:b,loopPoints:f}}function a_(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||(Ul(l)||l(s,u))&&c(u)}),n.observe(e,{childList:!0})}function i(){n&&n.disconnect(),r=!0}return{init:o,destroy:i}}function s_(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=>xn(c,b-c).constrain(b*m))}function d(g,m){const b=g||u,w=p(m);return b.reduce(($,x)=>{const E=r.map((T,R)=>({start:T-n[R]+w[R]+x,end:T+e-w[R]+x,index:R}));return $.concat(E)},[])}function v(g,m){const b=i?s(g):l(g);return(m||f).reduce(($,x)=>{const{index:E,start:T,end:R}=x,U=$.includes(E),O=T<b&&R>b;return!U&&O?$.concat([E]):$},[])}return{check:v,findSlideBounds:d}}function l_(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,$)=>{const x=!w,E=w===Ri($);return x?p[w]+u:E?p[w]+f:$[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function c_(e,t,n){const r=Wl(n);function o(l,c){return fo(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return fo(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 u_(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,$=t.getBoundingClientRect(),x=n.map(ge=>ge.getBoundingClientRect()),E=VA(u),T=HA(c,u),R=T.measureSize($),U=GA(R),O=UA(l,R),D=!d&&!!w,F=d||!!w,{slideSizes:j,slideSizesWithGaps:B}=l_(T,$,x,n,F,o),M=c_(R,B,m),{snaps:L,snapsAligned:G}=n_(T,O,$,x,B,M,D),H=-fn(L)+fn(B),{snapsContained:A}=ZA(R,H,G,w),y=D?A:G,{limit:_}=QA(H,y,d),I=Lm(Ri(y),f,d),S=I.clone(),N=fo(n),K=({dragHandler:ge,scrollBody:Ne,scrollBounds:et,eventHandler:St,animation:Nt,options:{loop:xt}})=>{const re=ge.pointerDown();xt||et.constrain(re);const le=Ne.seek().settled();le&&!re&&(Nt.stop(),St.emit("settle")),le||St.emit("scroll")},V=({scrollBody:ge,translate:Ne,location:et,offsetLocation:St,scrollLooper:Nt,slideLooper:xt,options:{loop:re}},le)=>{const W=ge.velocity();St.set(et.get()-W+W*le),re&&(Nt.loop(ge.direction()),xt.loop()),Ne.to(St.get())},Y={start:()=>s.start(pe),stop:()=>s.stop(pe),update:()=>K(pe),render:ge=>V(pe,ge)},Z=.68,Q=y[I.get()],X=ji(Q),J=ji(Q),q=ji(Q),ne=XA(X,q,v,Z),ae=r_(d,y,H,_,q),fe=o_(Y,I,S,ae,ne,q,a),oe=s_(R,H,j,L,_,d,p),pe={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:$,slideRects:x,animation:Y,axis:T,direction:E,dragHandler:qA(T,E,e,r,o,q,KA(T,o),X,Y,fe,ne,ae,I,a,U,h,g,b,Z),eventStore:po(),percentOfView:U,index:I,indexPrevious:S,limit:_,location:X,offsetLocation:J,options:i,resizeHandler:YA(t,a,o,n,T),scrollBody:ne,scrollBounds:JA(_,X,q,ne,U),scrollLooper:e_(H,_,J,[X,J,q]),scrollProgress:t_(_),scrollSnaps:y,scrollTarget:ae,scrollTo:fe,slideLooper:i_(T,E,R,H,B,y,oe,J,n),slidesHandler:a_(t,a),slidesInView:oe,slideIndexes:N,slidesToScroll:M,target:q,translate:Rm(T,E,t)};return pe}function f_(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 d_(){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 p_={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 h_(e){function t(i,a){return Mm(i,a||{})}function n(i){const a=i.breakpoints||{},s=Fi(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=>Fi(a.breakpoints||{})).reduce((a,s)=>a.concat(s),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:n,optionsMediaQueries:r}}function v_(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=h_(o),a=v_(i),s=po(),l=po(),c=d_(),{animationRealms:u}=pr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:v,off:h,emit:g}=c,m=j;let b=!1,w,$=f(p_,pr.globalOptions),x=f($),E=[],T,R,U;function O(){const{container:ne,slides:ae}=x;R=(_m(ne)?e.querySelector(ne):ne)||e.children[0];const oe=_m(ae)?R.querySelectorAll(ae):ae;U=[].slice.call(oe||R.children)}function D(ne,ae){const fe=u_(e,R,U,r,o,ne,c,ae);if(ne.loop&&!fe.slideLooper.canLoop()){const oe=Object.assign({},ne,{loop:!1});return D(oe,ae)}return fe}function F(ne,ae){if(b)return;const fe=u.find(pe=>pe.window===o),oe=fe||f_(o);fe||u.push(oe),$=f($,ne),x=p($),E=ae||E,O(),w=D(x,oe),d([$,...E.map(({options:pe})=>pe)]).forEach(pe=>s.add(pe,"change",j)),x.active&&(w.translate.to(w.location.get()),w.eventHandler.init(q),w.resizeHandler.init(q,x.watchResize),w.slidesHandler.init(q,x.watchSlides),l.add(r,"visibilitychange",()=>{r.hidden&&oe.reset()}),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&U.length&&w.dragHandler.init(q,x.watchDrag),T=a.init(E,q))}function j(ne,ae){const fe=K();B(),F(f({startIndex:fe},ne),ae),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 M(){b||(b=!0,s.clear(),B(),c.emit("destroy"))}function L(ne){const ae=w[ne?"target":"location"].get(),fe=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[fe](ae))}function G(ne){const ae=L(ne);return w.slideIndexes.filter(fe=>!ae.includes(fe))}function H(ne,ae,fe){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(ae?0:x.duration),w.scrollTo.index(ne,fe||0))}function A(ne){const ae=w.index.add(1).get();H(ae,ne===!0,-1)}function y(ne){const ae=w.index.add(-1).get();H(ae,ne===!0,1)}function _(){return w.index.add(1).get()!==K()}function I(){return w.index.add(-1).get()!==K()}function S(){return w.scrollSnaps.map(w.scrollProgress.get)}function N(){return w.scrollProgress.get(w.location.get())}function K(){return w.index.get()}function V(){return w.indexPrevious.get()}function Y(){return T}function Z(){return w}function Q(){return e}function X(){return R}function J(){return U}const q={canScrollNext:_,canScrollPrev:I,containerNode:X,internalEngine:Z,destroy:M,off:h,on:v,emit:g,plugins:Y,previousScrollSnap:V,reInit:m,rootNode:Q,scrollNext:A,scrollPrev:y,scrollProgress:N,scrollSnapList:S,scrollTo:H,selectedScrollSnap:K,slideNodes:J,slidesInView:L,slidesNotInView:G};return F(t,n),setTimeout(()=>c.emit("init"),0),q}pr.animationRealms=[],pr.globalOptions=void 0;function Vl(e={},t=[]){const n=P.useRef(e),r=P.useRef(t),[o,i]=P.useState(),[a,s]=P.useState(),l=P.useCallback(()=>{o&&o.reInit(n.current,r.current)},[o]);return P.useEffect(()=>{if(BA()&&a){pr.globalOptions=Vl.globalOptions;const c=pr(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),P.useEffect(()=>{zl(n.current,e)||(n.current=e,l())},[e,l]),P.useEffect(()=>{zA(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}Vl.globalOptions=void 0;const Fm=P.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:o,isReadOnly:i,sendMessage:a,addMessageFeedback:s},l)=>{const[c,u]=Vl({skipSnaps:!0,loop:!0}),[f,p]=P.useState(!0),[d,v]=P.useState(!0),h=P.useCallback(()=>u==null?void 0:u.scrollPrev(),[u]),g=P.useCallback(()=>u==null?void 0:u.scrollNext(),[u]),{message:{blocks:{carousel:m}}}=ye,b=P.useCallback(w=>{p(!w.canScrollPrev()),v(!w.canScrollNext())},[]);return P.useEffect(()=>{u&&(b(u),u.on("reInit",b),u.on("select",b))},[u,b]),C.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:c,children:[C.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,$)=>C.jsx(qn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:i}},$))}),e.length>1&&C.jsxs(C.Fragment,{children:[C.jsx(DP,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),C.jsx(MP,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Fm.displayName="Carousel";const jm=Math.floor;function Bm(e){return zm(e)?(e.nodeName||"").toLowerCase():"#document"}function ho(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function m_(e){var t;return(t=(zm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function zm(e){return e instanceof Node||e instanceof ho(e).Node}function Dt(e){return e instanceof Element||e instanceof ho(e).Element}function hr(e){return e instanceof HTMLElement||e instanceof ho(e).HTMLElement}function ql(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ho(e).ShadowRoot}function g_(e){return["html","body","#document"].includes(Bm(e))}function y_(e){return ho(e).getComputedStyle(e)}function b_(e){if(Bm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ql(e)&&e.host||m_(e);return ql(t)?t.host:t}function En(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 mt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ql(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Wm(){const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function w_(){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 Um(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Wm())||t.test(w_()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Hm(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 Vm(){return/apple/i.test(navigator.vendor)}function S_(){return Wm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function qm(e,t){return["mouse","pen"].includes(e)}function x_(e){return"nativeEvent"in e}function E_(e){return e.matches("html,body")}function Ft(e){return(e==null?void 0:e.ownerDocument)||document}function Kl(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 Km(e){return"composedPath"in e?e.composedPath()[0]:e.target}const k_="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Gm(e){return hr(e)&&e.matches(k_)}function ot(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,kt=Math.max,Bi=Math.round,zi=Math.floor,Xt=e=>({x:e,y:e});function Ym(e,t,n){return kt(e,vr(t,n))}function Wi(e,t){return typeof e=="function"?e(t):e}function vo(e){return e.split("-")[0]}function Gl(e){return e.split("-")[1]}function Xm(e){return e==="x"?"y":"x"}function C_(e){return e==="y"?"height":"width"}function mo(e){return["top","bottom"].includes(vo(e))?"y":"x"}function $_(e){return Xm(mo(e))}function T_(e){return{top:0,right:0,bottom:0,left:0,...e}}function O_(e){return typeof e!="number"?T_(e):{top:e,right:e,bottom:e,left:e}}function Ui(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 Jm(e,t,n){let{reference:r,floating:o}=e;const i=mo(t),a=$_(t),s=C_(a),l=vo(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(Gl(t)){case"start":d[a]-=p*(n&&c?-1:1);break;case"end":d[a]+=p*(n&&c?-1:1);break}return d}const I_=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}=Jm(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:$,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],...$}},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}=Jm(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function Zm(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}=Wi(t,e),v=O_(d),g=s[p?f==="floating"?"reference":"floating":f],m=Ui(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)),$=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=Ui(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:b,offsetParent:w,strategy:l}):b);return{top:(m.top-x.top+v.top)/$.y,bottom:(x.bottom-m.bottom+v.bottom)/$.y,left:(m.left-x.left+v.left)/$.x,right:(x.right-m.right+v.right)/$.x}}async function P_(e,t){const{placement:n,platform:r,elements:o}=e,i=await(r.isRTL==null?void 0:r.isRTL(o.floating)),a=vo(n),s=Gl(n),l=mo(n)==="y",c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,f=Wi(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 A_=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 P_(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}}}}},__=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}=Wi(e,t),c={x:n,y:r},u=await Zm(t,l),f=mo(vo(o)),p=Xm(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=Ym(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=Ym(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}}}}}},D_=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}=Wi(e,t),u=await Zm(t,c),f=vo(o),p=Gl(o),d=mo(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,$=vr(h-u[g],b),x=vr(v-u[m],w),E=!t.middlewareData.shift;let T=$,R=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=b),E&&!p){const O=kt(u.left,0),D=kt(u.right,0),F=kt(u.top,0),j=kt(u.bottom,0);d?R=v-2*(O!==0||D!==0?O+D:kt(u.left,u.right)):T=h-2*(F!==0||j!==0?F+j:kt(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:T});const U=await a.getDimensions(s.floating);return v!==U.width||h!==U.height?{reset:{rects:!0}}:{}}}};function Hi(){return typeof window<"u"}function mr(e){return Qm(e)?(e.nodeName||"").toLowerCase():"#document"}function Ct(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Jt(e){var t;return(t=(Qm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Qm(e){return Hi()?e instanceof Node||e instanceof Ct(e).Node:!1}function jt(e){return Hi()?e instanceof Element||e instanceof Ct(e).Element:!1}function Zt(e){return Hi()?e instanceof HTMLElement||e instanceof Ct(e).HTMLElement:!1}function eg(e){return!Hi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ct(e).ShadowRoot}function go(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Bt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function M_(e){return["table","td","th"].includes(mr(e))}function Vi(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Yl(e){const t=Xl(),n=jt(e)?Bt(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 N_(e){let t=kn(e);for(;Zt(t)&&!gr(t);){if(Yl(t))return t;if(Vi(t))return null;t=kn(t)}return null}function Xl(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function gr(e){return["html","body","#document"].includes(mr(e))}function Bt(e){return Ct(e).getComputedStyle(e)}function qi(e){return jt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function kn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||eg(e)&&e.host||Jt(e);return eg(t)?t.host:t}function tg(e){const t=kn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&go(t)?t:tg(t)}function Cn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=tg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=Ct(o);if(i){const s=Jl(a);return t.concat(a,a.visualViewport||[],go(o)?o:[],s&&n?Cn(s):[])}return t.concat(o,Cn(o,[],n))}function Jl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ng(e){const t=Bt(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=Bi(n)!==i||Bi(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function Zl(e){return jt(e)?e:e.contextElement}function yr(e){const t=Zl(e);if(!Zt(t))return Xt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ng(t);let a=(i?Bi(n.width):n.width)/r,s=(i?Bi(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const L_=Xt(0);function rg(e){const t=Ct(e);return!Xl()||!t.visualViewport?L_:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function R_(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ct(e)?!1:t}function Vn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=Zl(e);let a=Xt(1);t&&(r?jt(r)&&(a=yr(r)):a=yr(e));const s=R_(i,n,r)?rg(i):Xt(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=Ct(i),d=r&&jt(r)?Ct(r):r;let v=p,h=Jl(v);for(;h&&r&&d!==v;){const g=yr(h),m=h.getBoundingClientRect(),b=Bt(h),w=m.left+(h.clientLeft+parseFloat(b.paddingLeft))*g.x,$=m.top+(h.clientTop+parseFloat(b.paddingTop))*g.y;l*=g.x,c*=g.y,u*=g.x,f*=g.y,l+=w,c+=$,v=Ct(h),h=Jl(v)}}return Ui({width:u,height:f,x:l,y:c})}function Ql(e,t){const n=qi(e).scrollLeft;return t?t.left+n:Vn(Jt(e)).left+n}function og(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Ql(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function F_(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=o==="fixed",a=Jt(r),s=t?Vi(t.floating):!1;if(r===a||s&&i)return n;let l={scrollLeft:0,scrollTop:0},c=Xt(1);const u=Xt(0),f=Zt(r);if((f||!f&&!i)&&((mr(r)!=="body"||go(a))&&(l=qi(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?og(a,l,!0):Xt(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 j_(e){return Array.from(e.getClientRects())}function B_(e){const t=Jt(e),n=qi(e),r=e.ownerDocument.body,o=kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ql(e);const s=-n.scrollTop;return Bt(r).direction==="rtl"&&(a+=kt(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function z_(e,t){const n=Ct(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=Xl();(!c||c&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}function W_(e,t){const n=Vn(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Zt(e)?yr(e):Xt(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 ig(e,t,n){let r;if(t==="viewport")r=z_(e,n);else if(t==="document")r=B_(Jt(e));else if(jt(t))r=W_(t,n);else{const o=rg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ui(r)}function ag(e,t){const n=kn(e);return n===t||!jt(n)||gr(n)?!1:Bt(n).position==="fixed"||ag(n,t)}function U_(e,t){const n=t.get(e);if(n)return n;let r=Cn(e,[],!1).filter(s=>jt(s)&&mr(s)!=="body"),o=null;const i=Bt(e).position==="fixed";let a=i?kn(e):e;for(;jt(a)&&!gr(a);){const s=Bt(a),l=Yl(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||go(a)&&!l&&ag(e,a))?r=r.filter(u=>u!==a):o=s,a=kn(a)}return t.set(e,r),r}function H_(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const a=[...n==="clippingAncestors"?Vi(t)?[]:U_(t,this._c):[].concat(n),r],s=a[0],l=a.reduce((c,u)=>{const f=ig(t,u,o);return c.top=kt(f.top,c.top),c.right=vr(f.right,c.right),c.bottom=vr(f.bottom,c.bottom),c.left=kt(f.left,c.left),c},ig(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function V_(e){const{width:t,height:n}=ng(e);return{width:t,height:n}}function q_(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=Xt(0);function c(){l.x=Ql(o)}if(r||!r&&!i)if((mr(t)!=="body"||go(o))&&(s=qi(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?og(o,s):Xt(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 ec(e){return Bt(e).position==="static"}function sg(e,t){if(!Zt(e)||Bt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Jt(e)===n&&(n=n.ownerDocument.body),n}function lg(e,t){const n=Ct(e);if(Vi(e))return n;if(!Zt(e)){let o=kn(e);for(;o&&!gr(o);){if(jt(o)&&!ec(o))return o;o=kn(o)}return n}let r=sg(e,t);for(;r&&M_(r)&&ec(r);)r=sg(r,t);return r&&gr(r)&&ec(r)&&!Yl(r)?n:r||N_(e)||n}const K_=async function(e){const t=this.getOffsetParent||lg,n=this.getDimensions,r=await n(e.floating);return{reference:q_(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function G_(e){return Bt(e).direction==="rtl"}const Y_={convertOffsetParentRelativeRectToViewportRelativeRect:F_,getDocumentElement:Jt,getClippingRect:H_,getOffsetParent:lg,getElementRects:K_,getClientRects:j_,getDimensions:V_,getScale:yr,isElement:jt,isRTL:G_};function cg(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function X_(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=zi(f),h=zi(o.clientWidth-(u+p)),g=zi(o.clientHeight-(f+d)),m=zi(u),w={rootMargin:-v+"px "+-h+"px "+-g+"px "+-m+"px",threshold:kt(0,vr(1,l))||1};let $=!0;function x(E){const T=E[0].intersectionRatio;if(T!==l){if(!$)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!cg(c,e.getBoundingClientRect())&&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 J_(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=Zl(e),u=o||i?[...c?Cn(c):[],...Cn(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),i&&m.addEventListener("resize",n)});const f=c&&s?X_(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&&!cg(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 Z_=A_,Q_=__,eD=D_,tD=(e,t,n)=>{const r=new Map,o={platform:Y_,...n},i={...o.platform,_c:r};return I_(e,t,{...o,platform:i})};var Ki=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Gi(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(!Gi(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)&&!Gi(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function ug(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fg(e,t){const n=ug(e);return Math.round(t*n)/n}function tc(e){const t=k.useRef(e);return Ki(()=>{t.current=e}),t}function nD(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]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=k.useState(r);Gi(p,r)||d(r);const[v,h]=k.useState(null),[g,m]=k.useState(null),b=k.useCallback(H=>{H!==E.current&&(E.current=H,h(H))},[]),w=k.useCallback(H=>{H!==T.current&&(T.current=H,m(H))},[]),$=i||v,x=a||g,E=k.useRef(null),T=k.useRef(null),R=k.useRef(u),U=l!=null,O=tc(l),D=tc(o),F=tc(c),j=k.useCallback(()=>{if(!E.current||!T.current)return;const H={placement:t,strategy:n,middleware:p};D.current&&(H.platform=D.current),tD(E.current,T.current,H).then(A=>{const y={...A,isPositioned:F.current!==!1};B.current&&!Gi(R.current,y)&&(R.current=y,Xd.flushSync(()=>{f(y)}))})},[p,t,n,D,F]);Ki(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(H=>({...H,isPositioned:!1})))},[c]);const B=k.useRef(!1);Ki(()=>(B.current=!0,()=>{B.current=!1}),[]),Ki(()=>{if($&&(E.current=$),x&&(T.current=x),$&&x){if(O.current)return O.current($,x,j);j()}},[$,x,j,O,U]);const M=k.useMemo(()=>({reference:E,floating:T,setReference:b,setFloating:w}),[b,w]),L=k.useMemo(()=>({reference:$,floating:x}),[$,x]),G=k.useMemo(()=>{const H={position:n,left:0,top:0};if(!L.floating)return H;const A=fg(L.floating,u.x),y=fg(L.floating,u.y);return s?{...H,transform:"translate("+A+"px, "+y+"px)",...ug(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:A,top:y}},[n,s,L.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:j,refs:M,elements:L,floatingStyles:G}),[u,j,M,L,G])}const rD=(e,t)=>({...Z_(e),options:[e,t]}),oD=(e,t)=>({...Q_(e),options:[e,t]}),iD=(e,t)=>({...eD(e),options:[e,t]});/*!
|
|
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 jl(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 jl(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},jl=(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 zl(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 uo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return uo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return uo(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=uo(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 uo(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:zl(()=>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 uo(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),fm=xn()(co(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 dm={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function DP(e,t,n){if(dm.randomUUID&&!t&&!e)return dm.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}=pm(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 pm=e=>{switch(e.type){case"audio":return hm(e);case"card":return _P(e);case"carousel":return MP(e);case"choice":return NP(e);case"dropdown":return RP(e);case"file":return vm(e);case"image":return mm(e);case"location":return gm(e);case"markdown":return ym(e);case"text":return bm(e);case"video":return wm(e);case"bloc":return LP(e);case"custom":return{payload:e};default:{const t=e;throw new Error(`Unsuported message type ${t}`)}}},fo=e=>({block:e,type:"bubble"}),hm=e=>({payload:{type:"audio",url:e.audioUrl}}),_P=e=>({payload:fo(Sm(e))}),MP=e=>({payload:{type:"carousel",blocks:e.items.map(t=>Sm({type:"card",...t}))}}),NP=e=>{const t=e.options.map(i=>({title:i.label,value:i.value})),n=e.text,r=DP(),o=fo({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:fo({type:"column",blocks:r})}},vm=e=>({payload:{type:"file",url:e.fileUrl,title:e.title}}),mm=e=>({payload:{type:"image",url:e.imageUrl}}),gm=e=>({payload:{type:"location",latitude:e.latitude,longitude:e.longitude,title:e.title??e.address??"View on map"}}),ym=e=>({payload:fo({type:"text",text:e.markdown})}),bm=e=>({payload:fo({type:"text",text:e.text,value:e.value})}),wm=e=>({payload:{type:"video",url:e.videoUrl}}),LP=e=>({payload:{type:"column",blocks:e.items.map(n=>{switch(n.type){case"audio":return hm({...n.payload,type:n.type}).payload;case"file":return vm({...n.payload,type:n.type}).payload;case"image":return mm({...n.payload,type:n.type}).payload;case"location":return gm({...n.payload,type:n.type}).payload;case"markdown":return ym({...n.payload,type:n.type}).payload;case"text":return bm({...n.payload,type:n.type}).payload;case"video":return wm({...n.payload,type:n.type}).payload;default:throw new Error("Unsuported message type")}})}}),Sm=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()(co(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()(co(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:zl(()=>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 Ul=Qr;const xm=Ul.getInstance,Li=xn()(co(e=>({eventEmitter:gp(),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(s=>s.name===r.name),a=n().files.length===BP;if(!(!i&&a)){n().upsertFile({name:r.name,type:"file",instance:r,status:"loading"});try{const{fileUrl:s,type:l}=await o(r);n().upsertFile({name:r.name,type:l,url:s,instance:r,status:"uploaded"})}catch(s){console.error("Error sending file:",s),n().upsertFile({name:r.name,type:"file",instance:r,status:"error"})}}},deleteFile:r=>t(({files:o})=>({files:o.filter(i=>i.name!=r)}))}),{name:e,storage:zl(()=>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 Wl=Jr;const Em=Wl.getInstance,po=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()(co(Mi((t,n)=>({soundOn:!1,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 Hl=Zr;const Cm=Hl.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"?C.jsx("a",{...m,style:a?{pointerEvents:"none"}:void 0,href:t,target:"_blank",rel:"noopener noreferrer",children:e}):C.jsx("button",{...m,style:a?{pointerEvents:"none"}:void 0,disabled:b,children:e})},Kl=O.createContext(null);function km(){const e=O.useContext(Kl);if(!e)throw new Error("useMessageContext must be used within a Message");return e}const Vl=O.createContext({open:void 0,showModal:void 0,hideModal:void 0});function ql(){return O.useContext(Vl)}const Am=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[p,d]=O.useState(""),{showModal:v,hideModal:h}=ql(),{message:{blocks:{bubble:{container:g,feedbackContainer:m,feedbackIcon:b}}}}=ve;return t=="incoming"?C.jsxs("div",{"data-direction":"incoming","data-feedback":!!i,...u,...g,ref:f,children:[C.jsx(Vn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l}}),c&&v&&h&&e.type==="text"&&C.jsxs("div",{...m,children:[C.jsx(iP,{...b,"data-selected":i==="positive",onClick:()=>{c(o,{value:"positive"})}}),C.jsx(oP,{...b,"data-selected":i==="negative",onClick:()=>v({title:"Help us improve",description:"Please provide feedback to help us improve.",confirmButton:"Send feedback",cancelButton:"Cancel",onConfirm:()=>{c(o,{value:"negative",comment:p}),h()},content:C.jsx(WP,{setFeedbackComment:d})})})]})]}):C.jsx("div",{"data-direction":"outgoing",...u,...g,ref:f,children:C.jsx(Vn,{block:{...e,direction:t,timestamp:r,sender:n,messageId:o,isReadOnly:s,metadata:a,sendMessage:l,addMessageFeedback:c}})})});Am.displayName="Bubble";const WP=({setFeedbackComment:e})=>{const{modal:{dialog:{content:t}}}=ve;return C.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 $m(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 Tm(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 Gl(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 KP(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 Om(e,t){t===void 0&&(t=[]);var n=KP(e,t,{loading:!0}),r=n[0],o=n[1];return O.useEffect(function(){o()},[o]),r}const Im=O.forwardRef(({url:e,type:t,orientation:n="auto",...r},o)=>{const i=O.useId(),{setIsLoading:a}=km(),[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])},[]),Om(async()=>{if(e){try{const{width:v,height:h}=await tC(e);s==="auto"&&l(VP(v,h))}catch(v){l("square"),console.error(v)}a(v=>v.filter(h=>h!==i))}},[e]),C.jsxs(C.Fragment,{children:[c?null:C.jsx("div",{"data-orientation":s,...d.placeholder}),f?C.jsx("div",{"data-error":"true","data-orientation":s,...r,...d.image,ref:o,children:C.jsx(em,{size:"25%",strokeWidth:"5%"})}):C.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)}})]})});Im.displayName="Image";function VP(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 Pm=O.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{video:o}}}=ve;return C.jsx("div",{children:C.jsx("video",{...n,"data-chromatic":"ignore",style:t?{pointerEvents:"none"}:void 0,controls:!0,src:e,...o,ref:r})})});Pm.displayName="Video";const Dm=O.forwardRef(({url:e,isReadOnly:t,...n},r)=>{const{message:{blocks:{audio:o}}}=ve;return C.jsx("div",{children:C.jsx("audio",{...n,controls:!0,style:t?{pointerEvents:"none"}:void 0,src:e,...o,ref:r})})});Dm.displayName="Audio";const _m=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 C.jsxs("a",{...o,...s.container,style:r?{pointerEvents:"none"}:void 0,href:a,type:"_blank",rel:"noopener",ref:i,children:[C.jsx("p",{...s.title,children:n}),C.jsx(ZI,{...s.icon})]})});_m.displayName="Location";const Mm=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 C.jsx("div",{"data-horizontal":t,"data-vertical":n,...c,...f,ref:u,children:e.map((p,d)=>C.jsx(Vn,{block:{...p,direction:r,timestamp:i,sender:o,messageId:a,isReadOnly:s,sendMessage:l}},d))})});Mm.displayName="Column";const Nm=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 C.jsx("div",{"data-horizontal":t,"data-vertical":n,...u,...p,ref:f,children:e.map((d,v)=>C.jsx(Vn,{block:{...d,direction:r,timestamp:i,sender:o,messageId:s,isReadOnly:l,sendMessage:c}},v))})});Nm.displayName="Row";function qP(e){return Object.prototype.toString.call(e)==="[object Object]"}function Rm(e){return qP(e)||Array.isArray(e)}function GP(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Yl(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}`:!Rm(s)||!Rm(l)?s===l:Yl(s,l)})}function Lm(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=Lm(e),r=Lm(t);return n.every((o,i)=>{const a=r[i];return Yl(o,a)})}function Ql(e){return typeof e=="number"}function Fm(e){return typeof e=="string"}function Jl(e){return typeof e=="boolean"}function Bm(e){return Object.prototype.toString.call(e)==="[object Object]"}function ze(e){return Math.abs(e)}function Zl(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 ho(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 jm(e,t){return[e,t].reduce((n,r)=>(ji(r).forEach(o=>{const i=n[o],a=r[o],s=Bm(i)&&Bm(a);n[o]=s?jm(i,a):a}),n),{})}function zm(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 Ql(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 Um(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 Um(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 vo(){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},E=vo(),$=vo(),R=En(50,225).constrain(v.measure(20)),K={mouse:300,touch:400},T={mouse:500,touch:600},M=h?43:25;let U=!1,B=0,F=0,D=!1,L=!1,q=!1,W=!1;function I(_,j){if(!j)return;function J(ue){(Jl(j)||j(_,ue))&&Y(ue)}const re=n;E.add(re,"dragstart",ue=>ue.preventDefault(),x).add(re,"touchmove",()=>{},x).add(re,"touchend",()=>{}).add(re,"touchstart",J).add(re,"mousedown",J).add(re,"touchcancel",Q).add(re,"contextmenu",Q).add(re,"click",X,!0)}function y(){E.clear(),$.clear()}function P(){const _=W?r:n;$.add(_,"touchmove",G,x).add(_,"touchend",Q).add(_,"mousemove",G,x).add(_,"mouseup",Q)}function N(_){const j=_.nodeName||"";return A.includes(j)}function S(){return(h?T:K)[W?"mouse":"touch"]}function V(_,j){const J=p.add(Zl(_)*-1),re=f.byDistance(_,!h).distance;return h||ze(_)<R?re:m&&j?re*.5:f.byIndex(J.get(),0).distance}function Y(_){const j=zm(_,o);W=j,!(j&&_.button!==0)&&(N(_.target)||(q=h&&j&&!_.buttons&&U,U=Fi(i.get(),s.get())>=2,D=!0,a.pointerDown(_),u.useFriction(0).useDuration(0),i.set(s),P(),B=a.readPoint(_),F=a.readPoint(_,w),d.emit("pointerDown")))}function G(_){const j=a.readPoint(_),J=a.readPoint(_,w),re=Fi(j,B),ue=Fi(J,F);if(!L&&!W&&(!_.cancelable||(L=re>ue,!L)))return Q(_);const ie=a.pointerMove(_);re>g&&(q=!0),u.useFriction(.3).useDuration(1),l.start(),i.add(t.apply(ie)),_.preventDefault()}function Q(_){const J=f.byDistance(0,!1).index!==p.get(),re=a.pointerUp(_)*S(),ue=V(t.apply(re),J),ie=QP(re,ue),de=M-10*ie,Se=b+ie/50;L=!1,D=!1,$.clear(),u.useDuration(de).useFriction(Se),c.distance(ue,!h),W=!1,d.emit("pointerUp")}function X(_){q&&(_.stopPropagation(),_.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(zm(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],E=c(w?e:r[A]);if(x!==E){n.requestAnimationFrame(()=>{d.reInit(),t.emit("resize")});break}}}i=new ResizeObserver(m=>{l||(Jl(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(),E=!s;let $=0;return E?(i=0,e.set(t),$=x):(i+=x/s,i*=l,c+=i,e.add(i),$=c-u),a=Zl($),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 E=!A,$=A===Bi(x);return a&&E?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=>Zl(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 Ql(l)?l:l.get()}return{get:n,set:r,add:o,subtract:i}}function Wm(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=ho(o),u=ho(o).reverse(),f=h().concat(g());function p(x,E){return x.reduce(($,R)=>$-o[R],E)}function d(x,E){return x.reduce(($,R)=>p($,E)>0?$.concat([R]):$,[])}function v(x,E){const $=E==="start",R=$?-r:r,K=a.findSlideBounds([R]);return x.map(T=>{const M=$?0:-r,U=$?r:0,F=K.filter(D=>D.index===T)[0][$?"end":"start"];return{index:T,slideLocation:zi(-1),translate:Wm(e,t,l[T]),target:()=>s.get()>F?M:U}})}function h(){const x=i[0]-1,E=d(u,x);return v(E,"end")}function g(){const x=n-i[0]-1,E=d(c,x);return v(E,"start")}function m(){return f.every(({index:x})=>{const E=c.filter($=>$!==x);return p(E,n)<=.1})}function b(){f.forEach(x=>{const{target:E,translate:$,slideLocation:R}=x,K=E();K!==R.get()&&($.to(K),R.set(K))})}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||(Jl(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 E=r.map(($,R)=>({start:$-n[R]+w[R]+x,end:$+e-w[R]+x,index:R}));return A.concat(E)},[])}function v(g,m){const b=i?s(g):l(g);return(m||f).reduce((A,x)=>{const{index:E,start:$,end:R}=x,K=A.includes(E),T=$<b&&R>b;return!K&&T?A.concat([E]):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,E=w===Bi(A);return x?p[w]+u:E?p[w]+f:A[w+1][s]-b[s]}).map(ze)}return{slideSizes:p,slideSizesWithGaps:d}}function gD(e,t,n){const r=Ql(n);function o(l,c){return ho(l).filter(u=>u%c===0).map(u=>l.slice(u,u+c))}function i(l){return ho(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(Se=>Se.getBoundingClientRect()),E=XP(u),$=ZP(c,u),R=$.measureSize(A),K=nD(R),T=JP(l,R),M=!d&&!!w,U=d||!!w,{slideSizes:B,slideSizesWithGaps:F}=mD($,A,x,n,U,o),D=gD(R,F,m),{snaps:L,snapsAligned:q}=uD($,T,A,x,F,D,M),W=-fn(L)+fn(F),{snapsContained:I}=aD(R,W,q,w),y=M?I:q,{limit:P}=sD(W,y,d),N=Um(Bi(y),f,d),S=N.clone(),V=ho(n),Y=({dragHandler:Se,scrollBody:De,scrollBounds:Ue,eventHandler:dt,animation:Et,options:{loop:pt}})=>{const oe=Se.pointerDown();pt||Ue.constrain(oe);const le=De.seek().settled();le&&!oe&&(Et.stop(),dt.emit("settle")),le||dt.emit("scroll")},G=({scrollBody:Se,translate:De,location:Ue,offsetLocation:dt,scrollLooper:Et,slideLooper:pt,options:{loop:oe}},le)=>{const H=Se.velocity();dt.set(Ue.get()-H+H*le),oe&&(Et.loop(Se.direction()),pt.loop()),De.to(dt.get())},Q={start:()=>s.start(de),stop:()=>s.stop(de),update:()=>Y(de),render:Se=>G(de,Se)},X=.68,ee=y[N.get()],Z=zi(ee),_=zi(ee),j=zi(ee),J=oD(Z,j,v,X),re=fD(d,y,W,P,j),ue=dD(Q,N,S,re,J,j,a),ie=vD(R,W,B,L,P,d,p),de={ownerDocument:r,ownerWindow:o,eventHandler:a,containerRect:A,slideRects:x,animation:Q,axis:$,direction:E,dragHandler:eD($,E,e,r,o,j,tD($,o),Z,Q,ue,J,re,N,a,K,h,g,b,X),eventStore:vo(),percentOfView:K,index:N,indexPrevious:S,limit:P,location:Z,offsetLocation:_,options:i,resizeHandler:rD(t,a,o,n,$),scrollBody:J,scrollBounds:iD(P,Z,j,J,K),scrollLooper:lD(W,P,_,[Z,_,j]),scrollProgress:cD(P),scrollSnaps:y,scrollTarget:re,scrollTo:ue,slideLooper:pD($,E,R,W,F,y,ie,_,n),slidesHandler:hD(t,a),slidesInView:ie,slideIndexes:V,slidesToScroll:D,target:j,translate:Wm($,E,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 jm(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=vo(),l=vo(),c=wD(),{animationRealms:u}=pr,{mergeOptions:f,optionsAtMedia:p,optionsMediaQueries:d}=i,{on:v,off:h,emit:g}=c,m=B;let b=!1,w,A=f(SD,pr.globalOptions),x=f(A),E=[],$,R,K;function T(){const{container:J,slides:re}=x;R=(Fm(J)?e.querySelector(J):J)||e.children[0];const ie=Fm(re)?R.querySelectorAll(re):re;K=[].slice.call(ie||R.children)}function M(J,re){const ue=yD(e,R,K,r,o,J,c,re);if(J.loop&&!ue.slideLooper.canLoop()){const ie=Object.assign({},J,{loop:!1});return M(ie,re)}return ue}function U(J,re){if(b)return;const ue=u.find(de=>de.window===o),ie=ue||bD(o);ue||u.push(ie),A=f(A,J),x=p(A),E=re||E,T(),w=M(x,ie),d([A,...E.map(({options:de})=>de)]).forEach(de=>s.add(de,"change",B)),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&&ie.reset()}),w.options.loop&&w.slideLooper.loop(),R.offsetParent&&K.length&&w.dragHandler.init(j,x.watchDrag),$=a.init(E,j))}function B(J,re){const ue=Y();F(),U(f({startIndex:ue},J),re),c.emit("reInit")}function F(){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(),F(),c.emit("destroy"))}function L(J){const re=w[J?"target":"location"].get(),ue=x.loop?"removeOffset":"constrain";return w.slidesInView.check(w.limit[ue](re))}function q(J){const re=L(J);return w.slideIndexes.filter(ue=>!re.includes(ue))}function W(J,re,ue){!x.active||b||(w.scrollBody.useBaseFriction().useDuration(re?0:x.duration),w.scrollTo.index(J,ue||0))}function I(J){const re=w.index.add(1).get();W(re,J===!0,-1)}function y(J){const re=w.index.add(-1).get();W(re,J===!0,1)}function P(){return w.index.add(1).get()!==Y()}function N(){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 G(){return w.indexPrevious.get()}function Q(){return $}function X(){return w}function ee(){return e}function Z(){return R}function _(){return K}const j={canScrollNext:P,canScrollPrev:N,containerNode:Z,internalEngine:X,destroy:D,off:h,on:v,emit:g,plugins:Q,previousScrollSnap:G,reInit:m,rootNode:ee,scrollNext:I,scrollPrev:y,scrollProgress:V,scrollSnapList:S,scrollTo:W,selectedScrollSnap:Y,slideNodes:_,slidesInView:L,slidesNotInView:q};return U(t,n),setTimeout(()=>c.emit("init"),0),j}pr.animationRealms=[],pr.globalOptions=void 0;function Xl(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=Xl.globalOptions;const c=pr(a,n.current,r.current);return i(c),()=>c.destroy()}else i(void 0)},[a,i]),O.useEffect(()=>{Yl(n.current,e)||(n.current=e,l())},[e,l]),O.useEffect(()=>{YP(r.current,t)||(r.current=t,l())},[t,l]),[s,o]}Xl.globalOptions=void 0;const Hm=O.forwardRef(({blocks:e,direction:t,sender:n,timestamp:r,messageId:o,isReadOnly:i,sendMessage:a,addMessageFeedback:s},l)=>{const[c,u]=Xl({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]),C.jsxs("div",{...m==null?void 0:m.container,"data-container":"carousel",ref:c,children:[C.jsx("div",{ref:l,...m==null?void 0:m.slidesContainer,children:e.map((w,A)=>C.jsx(Vn,{block:{...w,direction:t,timestamp:r,sender:n,messageId:o,sendMessage:a,isReadOnly:i}},A))}),e.length>1&&C.jsxs(C.Fragment,{children:[C.jsx(zI,{...m==null?void 0:m.backButton,"data-disabled":f?"":void 0,onClick:h}),C.jsx(UI,{...m==null?void 0:m.nextButton,"data-disabled":d?"":void 0,onClick:g})]})]})});Hm.displayName="Carousel";const Km=Math.floor;function Vm(e){return qm(e)?(e.nodeName||"").toLowerCase():"#document"}function mo(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function CD(e){var t;return(t=(qm(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qm(e){return e instanceof Node||e instanceof mo(e).Node}function Mt(e){return e instanceof Element||e instanceof mo(e).Element}function hr(e){return e instanceof HTMLElement||e instanceof mo(e).HTMLElement}function ec(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof mo(e).ShadowRoot}function kD(e){return["html","body","#document"].includes(Vm(e))}function AD(e){return mo(e).getComputedStyle(e)}function $D(e){if(Vm(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ec(e)&&e.host||CD(e);return ec(t)?t.host:t}function Cn(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 yt(e,t){if(!e||!t)return!1;const n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&ec(n)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function Gm(){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 Ym(e){if(e.mozInputSource===0&&e.isTrusted)return!0;const t=/Android/i;return(t.test(Gm())||t.test(TD()))&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Qm(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 Jm(){return/apple/i.test(navigator.vendor)}function OD(){return Gm().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints}function Zm(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 tc(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 Xm(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 eg(e){return hr(e)&&e.matches(DD)}function ot(e){e.preventDefault(),e.stopPropagation()}const vr=Math.min,kt=Math.max,Ui=Math.round,Wi=Math.floor,Qt=e=>({x:e,y:e});function tg(e,t,n){return kt(e,vr(t,n))}function Hi(e,t){return typeof e=="function"?e(t):e}function go(e){return e.split("-")[0]}function nc(e){return e.split("-")[1]}function ng(e){return e==="x"?"y":"x"}function _D(e){return e==="y"?"height":"width"}function yo(e){return["top","bottom"].includes(go(e))?"y":"x"}function MD(e){return ng(yo(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 Ki(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 rg(e,t,n){let{reference:r,floating:o}=e;const i=yo(t),a=MD(t),s=_D(a),l=go(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(nc(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}=rg(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}=rg(c,p,l)),h=-1)}return{x:u,y:f,placement:p,strategy:o,middlewareData:d}};async function og(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=Ki(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=Ki(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=go(n),s=nc(n),l=yo(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 og(t,l),f=yo(go(o)),p=ng(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=tg(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=tg(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 og(t,c),f=go(o),p=nc(o),d=yo(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),E=!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),E&&!p){const T=kt(u.left,0),M=kt(u.right,0),U=kt(u.top,0),B=kt(u.bottom,0);d?R=v-2*(T!==0||M!==0?T+M:kt(u.left,u.right)):$=h-2*(U!==0||B!==0?U+B:kt(u.top,u.bottom))}await l({...t,availableWidth:R,availableHeight:$});const K=await a.getDimensions(s.floating);return v!==K.width||h!==K.height?{reset:{rects:!0}}:{}}}};function Vi(){return typeof window<"u"}function mr(e){return ig(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=(ig(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ig(e){return Vi()?e instanceof Node||e instanceof At(e).Node:!1}function Bt(e){return Vi()?e instanceof Element||e instanceof At(e).Element:!1}function Zt(e){return Vi()?e instanceof HTMLElement||e instanceof At(e).HTMLElement:!1}function ag(e){return!Vi()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof At(e).ShadowRoot}function bo(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 rc(e){const t=oc(),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=kn(e);for(;Zt(t)&&!gr(t);){if(rc(t))return t;if(qi(t))return null;t=kn(t)}return null}function oc(){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 kn(e){if(mr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ag(e)&&e.host||Jt(e);return ag(t)?t.host:t}function sg(e){const t=kn(e);return gr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Zt(t)&&bo(t)?t:sg(t)}function An(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=sg(e),i=o===((r=e.ownerDocument)==null?void 0:r.body),a=At(o);if(i){const s=ic(a);return t.concat(a,a.visualViewport||[],bo(o)?o:[],s&&n?An(s):[])}return t.concat(o,An(o,[],n))}function ic(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lg(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 ac(e){return Bt(e)?e:e.contextElement}function yr(e){const t=ac(e);if(!Zt(t))return Qt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=lg(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 cg(e){const t=At(e);return!oc()||!t.visualViewport?HD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==At(e)?!1:t}function Kn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),i=ac(e);let a=Qt(1);t&&(r?Bt(r)&&(a=yr(r)):a=yr(e));const s=KD(i,n,r)?cg(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=ic(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=ic(v)}}return Ki({width:u,height:f,x:l,y:c})}function sc(e,t){const n=Gi(e).scrollLeft;return t?t.left+n:Kn(Jt(e)).left+n}function ug(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:sc(e,r)),i=r.top+t.scrollTop;return{x:o,y:i}}function VD(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"||bo(a))&&(l=Gi(r)),Zt(r))){const d=Kn(r);c=yr(r),u.x=d.x+r.clientLeft,u.y=d.y+r.clientTop}const p=a&&!f&&!i?ug(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=kt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=kt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+sc(e);const s=-n.scrollTop;return jt(r).direction==="rtl"&&(a+=kt(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=oc();(!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=Kn(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 fg(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=cg(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ki(r)}function dg(e,t){const n=kn(e);return n===t||!Bt(n)||gr(n)?!1:jt(n).position==="fixed"||dg(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?kn(e):e;for(;Bt(a)&&!gr(a);){const s=jt(a),l=rc(a);!l&&s.position==="fixed"&&(o=null),(i?!l&&!o:!l&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||bo(a)&&!l&&dg(e,a))?r=r.filter(u=>u!==a):o=s,a=kn(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=fg(t,u,o);return c.top=kt(f.top,c.top),c.right=vr(f.right,c.right),c.bottom=vr(f.bottom,c.bottom),c.left=kt(f.left,c.left),c},fg(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}=lg(e);return{width:t,height:n}}function e_(e,t,n){const r=Zt(t),o=Jt(t),i=n==="fixed",a=Kn(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=Qt(0);function c(){l.x=sc(o)}if(r||!r&&!i)if((mr(t)!=="body"||bo(o))&&(s=Gi(t)),r){const d=Kn(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?ug(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 lc(e){return jt(e).position==="static"}function pg(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 hg(e,t){const n=At(e);if(qi(e))return n;if(!Zt(e)){let o=kn(e);for(;o&&!gr(o);){if(Bt(o)&&!lc(o))return o;o=kn(o)}return n}let r=pg(e,t);for(;r&&UD(r)&&lc(r);)r=pg(r,t);return r&&gr(r)&&lc(r)&&!rc(r)?n:r||WD(e)||n}const t_=async function(e){const t=this.getOffsetParent||hg,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:VD,getDocumentElement:Jt,getClippingRect:ZD,getOffsetParent:hg,getElementRects:t_,getClientRects:qD,getDimensions:XD,getScale:yr,isElement:Bt,isRTL:n_};function vg(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:kt(0,vr(1,l))||1};let A=!0;function x(E){const $=E[0].intersectionRatio;if($!==l){if(!A)return a();$?a(!1,$):r=setTimeout(()=>{a(!1,1e-7)},1e3)}$===1&&!vg(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=ac(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?Kn(e):null;l&&g();function g(){const m=Kn(e);h&&!vg(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 mg(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gg(e,t){const n=mg(e);return Math.round(t*n)/n}function cc(e){const t=k.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]=k.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,d]=k.useState(r);Qi(p,r)||d(r);const[v,h]=k.useState(null),[g,m]=k.useState(null),b=k.useCallback(W=>{W!==E.current&&(E.current=W,h(W))},[]),w=k.useCallback(W=>{W!==$.current&&($.current=W,m(W))},[]),A=i||v,x=a||g,E=k.useRef(null),$=k.useRef(null),R=k.useRef(u),K=l!=null,T=cc(l),M=cc(o),U=cc(c),B=k.useCallback(()=>{if(!E.current||!$.current)return;const W={placement:t,strategy:n,middleware:p};M.current&&(W.platform=M.current),c_(E.current,$.current,W).then(I=>{const y={...I,isPositioned:U.current!==!1};F.current&&!Qi(R.current,y)&&(R.current=y,rp.flushSync(()=>{f(y)}))})},[p,t,n,M,U]);Yi(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(W=>({...W,isPositioned:!1})))},[c]);const F=k.useRef(!1);Yi(()=>(F.current=!0,()=>{F.current=!1}),[]),Yi(()=>{if(A&&(E.current=A),x&&($.current=x),A&&x){if(T.current)return T.current(A,x,B);B()}},[A,x,B,T,K]);const D=k.useMemo(()=>({reference:E,floating:$,setReference:b,setFloating:w}),[b,w]),L=k.useMemo(()=>({reference:A,floating:x}),[A,x]),q=k.useMemo(()=>{const W={position:n,left:0,top:0};if(!L.floating)return W;const I=gg(L.floating,u.x),y=gg(L.floating,u.y);return s?{...W,transform:"translate("+I+"px, "+y+"px)",...mg(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:I,top:y}},[n,s,L.floating,u.x,u.y]);return k.useMemo(()=>({...u,update:B,refs:D,elements:L,floatingStyles:q}),[u,B,D,L,q])}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]});/*!
|
|
249
254
|
* tabbable 6.2.0
|
|
250
255
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
251
|
-
*/var aD=["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])"],nc=aD.join(","),dg=typeof Element>"u",yo=dg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Yi=!dg&&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},Xi=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},sD=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},lD=function(t,n,r){if(Xi(t))return[];var o=Array.prototype.slice.apply(t.querySelectorAll(nc));return n&&yo.call(t,nc)&&o.unshift(t),o=o.filter(r),o},cD=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var a=i.shift();if(!Xi(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=yo.call(a,nc);u&&r.filter(a)&&(n||!t.includes(a))&&o.push(a);var f=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),p=!Xi(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},pg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},hg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||sD(t))&&!pg(t)?0:t.tabIndex},uD=function(t,n){var r=hg(t);return r<0&&n&&!pg(t)?0:r},fD=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},vg=function(t){return t.tagName==="INPUT"},dD=function(t){return vg(t)&&t.type==="hidden"},pD=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},hD=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},vD=function(t){if(!t.name)return!0;var n=t.form||Yi(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=hD(o,t.form);return!i||i===t},mD=function(t){return vg(t)&&t.type==="radio"},gD=function(t){return mD(t)&&!vD(t)},yD=function(t){var n,r=t&&Yi(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=Yi(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},mg=function(t){var n=t.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},bD=function(t,n){var r=n.displayCheck,o=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var i=yo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(yo.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=Yi(t);if(l&&!l.shadowRoot&&o(l)===!0)return mg(t);t.assignedSlot?t=t.assignedSlot:!l&&c!==t.ownerDocument?t=c.host:t=l}t=s}if(yD(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return mg(t);return!1},wD=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 yo.call(n,"fieldset[disabled] *")?!0:!o.contains(t)}return!0}n=n.parentElement}return!1},SD=function(t,n){return!(n.disabled||Xi(n)||dD(n)||bD(n,t)||pD(n)||wD(n))},gg=function(t,n){return!(gD(n)||hg(n)<0||!SD(t,n))},xD=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},ED=function e(t){var n=[],r=[];return t.forEach(function(o,i){var a=!!o.scopeParent,s=a?o.scopeParent:o,l=uD(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(fD).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},rc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=cD([t],n.includeContainer,{filter:gg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:xD}):r=lD(t,n.includeContainer,gg.bind(null,n)),ED(r)};const oc="ArrowUp",Ji="ArrowDown",br="ArrowLeft",bo="ArrowRight";function Zi(e,t,n){return Math.floor(e/t)!==n}function wo(e,t){return t<0||t>=e.current.length}function ic(e,t){return ct(e,{disabledIndices:t})}function yg(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 kD(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===oc){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}wo(e,f)&&(f=c)}if(n.key===Ji&&(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}))),wo(e,f)&&(f=c)),r==="both"){const p=jm(c/i);n.key===bo&&(u&&ot(n),c%i!==i-1?(f=ct(e,{startingIndex:c,disabledIndices:a}),o&&Zi(f,i,p)&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a}))):o&&(f=ct(e,{startingIndex:c-c%i-1,disabledIndices:a})),Zi(f,i,p)&&(f=c)),n.key===br&&(u&&ot(n),c%i!==0?(f=ct(e,{startingIndex:c,disabledIndices:a,decrement:!0}),o&&Zi(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})),Zi(f,i,p)&&(f=c));const d=jm(l/i)===p;wo(e,f)&&(o&&d?f=n.key===br?l:ct(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let bg=0;function dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(bg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():bg=requestAnimationFrame(i)}var Ge=typeof document<"u"?P.useLayoutEffect:P.useEffect;function Qi(){return Qi=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},Qi.apply(this,arguments)}let ac=!1,CD=0;const wg=()=>"floating-ui-"+CD++;function $D(){const[e,t]=k.useState(()=>ac?wg():void 0);return Ge(()=>{e==null&&t(wg())},[]),k.useEffect(()=>{ac||(ac=!0)},[]),e}const sc=k.useId||$D;function TD(){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 OD=k.createContext(null),ID=k.createContext(null),Sg=()=>{var e;return((e=k.useContext(OD))==null?void 0:e.id)||null},ea=()=>k.useContext(ID);function So(e){return"data-floating-ui-"+e}function $n(e){const t=P.useRef(e);return Ge(()=>{t.current=e}),t}function PD(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 AD(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,ta=new WeakSet,na={},lc=0;const _D=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,xg=e=>e&&(e.host||xg(e.parentNode)),DD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=xg(n);return e.contains(r)?r:null}).filter(n=>n!=null);function MD(e,t,n,r){const o="data-floating-ui-inert",i=r?"inert":n?"aria-hidden":null,a=DD(t,e),s=new Set,l=new Set(a),c=[];na[o]||(na[o]=new WeakMap);const u=na[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&&ta.add(v),b===1&&v.setAttribute(o,""),!g&&i&&v.setAttribute(i,"true")}})}return lc++,()=>{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||(!ta.has(d)&&i&&d.removeAttribute(i),ta.delete(d)),h||d.removeAttribute(o)}),lc--,lc||(Sr=new WeakMap,Sr=new WeakMap,ta=new WeakSet,na={})}}function Eg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=Ft(e[0]).body;return MD(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const cc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kg(e,t){const n=rc(e,cc());t==="prev"&&n.reverse();const r=n.indexOf(En(Ft(e)));return n.slice(r+1)[0]}function Cg(){return kg(document.body,"next")}function $g(){return kg(document.body,"prev")}function xo(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!mt(n,r)}function ND(e){rc(e,cc()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function LD(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 uc={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 RD;function Tg(e){e.key==="Tab"&&(e.target,clearTimeout(RD))}const ra=k.forwardRef(function(t,n){const[r,o]=k.useState();Ge(()=>(Vm()&&o("button"),document.addEventListener("keydown",Tg),()=>{document.removeEventListener("keydown",Tg)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[So("focus-guard")]:"",style:uc};return k.createElement("span",Qi({},t,i))}),Og=k.createContext(null);function FD(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=k.useState(null),i=sc(),a=Ig(),s=k.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=k.useRef();return Ge(()=>()=>{r==null||r.remove()},[r,s]),Ge(()=>{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=So("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&&!Dt(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 jD(e){let{children:t,id:n,root:r=null,preserveTabOrder:o=!0}=e;const i=FD({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),f=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.useEffect(()=>{if(!i||!o||a!=null&&a.modal)return;function d(v){i&&xo(v)&&(v.type==="focusin"?LD:ND)(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]),k.createElement(Og.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(ra,{"data-type":"outside",ref:l,onFocus:d=>{if(xo(d,i)){var v;(v=u.current)==null||v.focus()}else{const h=$g()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:uc}),i&&Gd.createPortal(t,i),p&&i&&k.createElement(ra,{"data-type":"outside",ref:c,onFocus:d=>{if(xo(d,i)){var v;(v=f.current)==null||v.focus()}else{const h=Cg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Ig=()=>k.useContext(Og),BD=k.forwardRef(function(t,n){return k.createElement("button",Qi({},t,{type:"button",ref:n,tabIndex:-1,style:uc}))});function zD(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=_D()?i:!0,$=$n(o),x=$n(a),E=$n(s),T=ea(),R=Ig(),U=typeof a=="number"&&a<0,O=k.useRef(null),D=k.useRef(null),F=k.useRef(!1),j=k.useRef(null),B=k.useRef(!1),M=R!=null,L=m&&m.getAttribute("role")==="combobox"&&Gm(m)&&U,G=k.useCallback(function(_){return _===void 0&&(_=b),_?rc(_,cc()):[]},[b]),H=k.useCallback(_=>{const I=G(_);return $.current.map(S=>m&&S==="reference"?m:b&&S==="floating"?b:I).filter(Boolean).flat()},[m,b,$,G]);k.useEffect(()=>{if(r||!l)return;function _(S){if(S.key==="Tab"){mt(b,En(Ft(b)))&&G().length===0&&!L&&ot(S);const N=H(),K=Km(S);$.current[0]==="reference"&&K===m&&(ot(S),S.shiftKey?dn(N[N.length-1]):dn(N[1])),$.current[1]==="floating"&&K===b&&S.shiftKey&&(ot(S),dn(N[0]))}}const I=Ft(b);return I.addEventListener("keydown",_),()=>{I.removeEventListener("keydown",_)}},[r,m,b,l,$,p,L,G,H]),k.useEffect(()=>{if(r||!u)return;function _(){B.current=!0,setTimeout(()=>{B.current=!1})}function I(S){const N=S.relatedTarget;queueMicrotask(()=>{const K=!(mt(m,N)||mt(b,N)||mt(N,b)||mt(R==null?void 0:R.portalNode,N)||N!=null&&N.hasAttribute(So("focus-guard"))||T&&(wr(T.nodesRef.current,d).find(V=>{var Y,Z;return mt((Y=V.context)==null?void 0:Y.elements.floating,N)||mt((Z=V.context)==null?void 0:Z.elements.domReference,N)})||PD(T.nodesRef.current,d).find(V=>{var Y,Z;return((Y=V.context)==null?void 0:Y.elements.floating)===N||((Z=V.context)==null?void 0:Z.elements.domReference)===N})));N&&K&&!B.current&&N!==j.current&&(F.current=!0,v(!1,S))})}if(b&&hr(m))return m.addEventListener("focusout",I),m.addEventListener("pointerdown",_),!l&&b.addEventListener("focusout",I),()=>{m.removeEventListener("focusout",I),m.removeEventListener("pointerdown",_),!l&&b.removeEventListener("focusout",I)}},[r,m,b,l,d,T,R,v,u]),k.useEffect(()=>{var _;if(r)return;const I=Array.from((R==null||(_=R.portalNode)==null?void 0:_.querySelectorAll("["+So("portal")+"]"))||[]);if(b){const S=[b,...I,O.current,D.current,$.current.includes("reference")||L?m:null].filter(K=>K!=null),N=l?Eg(S,w,!w):Eg(S);return()=>{N()}}},[r,m,b,l,$,R,L,w]),Ge(()=>{if(r||!b)return;const _=Ft(b),I=En(_);queueMicrotask(()=>{const S=H(b),N=x.current,K=(typeof N=="number"?S[N]:N.current)||b,V=mt(b,I);!U&&!V&&f&&dn(K,{preventScroll:K===b})})},[r,f,b,U,H,x]),Ge(()=>{if(r||!b)return;let _=!1;const I=Ft(b),S=En(I),N=g.current;j.current=S;function K(V){if(V.type==="escapeKey"&&p.domReference.current&&(j.current=p.domReference.current),["referencePress","escapeKey"].includes(V.type))return;const Y=V.data.returnFocus;typeof Y=="object"?(F.current=!1,_=Y.preventScroll):F.current=!Y}return h.on("dismiss",K),()=>{h.off("dismiss",K);const V=En(I);(mt(b,V)||T&&wr(T.nodesRef.current,d).some(Z=>{var Q;return mt((Q=Z.context)==null?void 0:Q.elements.floating,V)})||N.openEvent&&["click","mousedown"].includes(N.openEvent.type))&&p.domReference.current&&(j.current=p.domReference.current),E.current&&hr(j.current)&&!F.current&&dn(j.current,{cancelPrevious:!1,preventScroll:_})}},[r,b,E,g,p,h,T,d]),Ge(()=>{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]),Ge(()=>{if(!r&&b&&typeof MutationObserver=="function"&&!U){const _=()=>{const S=b.getAttribute("tabindex");$.current.includes("floating")||En(Ft(b))!==p.domReference.current&&G().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};_();const I=new MutationObserver(_);return I.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{I.disconnect()}}},[r,b,p,$,G,U]);function A(_){return r||!c||!l?null:k.createElement(BD,{ref:_==="start"?O:D,onClick:I=>v(!1,I.nativeEvent)},typeof c=="string"?c:"Dismiss")}const y=!r&&w&&!L&&(M||l);return k.createElement(k.Fragment,null,y&&k.createElement(ra,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:_=>{if(l){const S=H();dn(o[0]==="reference"?S[0]:S[S.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(F.current=!1,xo(_,R.portalNode)){const S=Cg()||m;S==null||S.focus()}else{var I;(I=R.beforeOutsideRef.current)==null||I.focus()}}}),!L&&A("start"),n,A("end"),y&&k.createElement(ra,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:_=>{if(l)dn(H()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(F.current=!0),xo(_,R.portalNode)){const S=$g()||m;S==null||S.focus()}else{var I;(I=R.afterOutsideRef.current)==null||I.focus()}}}))}function Pg(e){return hr(e.target)&&e.target.tagName==="BUTTON"}function Ag(e){return Gm(e)}function WD(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=k.useRef(),p=k.useRef(!1);return k.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(qm(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}qm(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||Pg(d))&&(d.key===" "&&!Ag(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||Pg(d)||Ag(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const UD=k.useInsertionEffect||(e=>e());function Tn(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return UD(()=>{t.current=e}),k.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 HD={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},VD={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},qD=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 KD(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=ea(),w=Sg()!=null,$=Tn(typeof p=="function"?p:()=>!1),x=typeof p=="function"?$:p,E=k.useRef(!1),{escapeKeyBubbles:T,outsidePressBubbles:R}=qD(m),U=Tn(D=>{if(!n||!u||!f||D.key!=="Escape")return;const F=b?wr(b.nodesRef.current,i):[];if(!T&&(D.stopPropagation(),F.length>0)){let j=!0;if(F.forEach(B=>{var M;if((M=B.context)!=null&&M.open&&!B.context.dataRef.current.__escapeKeyBubbles){j=!1;return}}),!j)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,x_(D)?D.nativeEvent:D)}),O=Tn(D=>{const F=E.current;if(E.current=!1,F||typeof x=="function"&&!x(D))return;const j=Km(D),B="["+So("inert")+"]",M=Ft(l).querySelectorAll(B);let L=Dt(j)?j:null;for(;L&&!g_(L);){const A=b_(L);if(A===Ft(l).body||!Dt(A))break;L=A}if(M.length&&Dt(j)&&!E_(j)&&!mt(j,l)&&Array.from(M).every(A=>!mt(L,A)))return;if(hr(j)&&l){const A=j.clientWidth>0&&j.scrollWidth>j.clientWidth,y=j.clientHeight>0&&j.scrollHeight>j.clientHeight;let _=y&&D.offsetX>j.clientWidth;if(y&&y_(j).direction==="rtl"&&(_=D.offsetX<=j.offsetWidth-j.clientWidth),_||A&&D.offsetY>j.clientHeight)return}const G=b&&wr(b.nodesRef.current,i).some(A=>{var y;return Kl(D,(y=A.context)==null?void 0:y.elements.floating)});if(Kl(D,l)||Kl(D,s)||G)return;const H=b?wr(b.nodesRef.current,i):[];if(H.length>0){let A=!0;if(H.forEach(y=>{var _;if((_=y.context)!=null&&_.open&&!y.context.dataRef.current.__outsidePressBubbles){A=!1;return}}),!A)return}o.emit("dismiss",{type:"outsidePress",data:{returnFocus:w?{preventScroll:!0}:Um(D)||Hm(D)}}),r(!1,D)});return k.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=T,c.current.__outsidePressBubbles=R;function D(B){r(!1,B)}const F=Ft(l);f&&F.addEventListener("keydown",U),x&&F.addEventListener(d,O);let j=[];return g&&(Dt(s)&&(j=Cn(s)),Dt(l)&&(j=j.concat(Cn(l))),!Dt(a)&&a&&a.contextElement&&(j=j.concat(Cn(a.contextElement)))),j=j.filter(B=>{var M;return B!==((M=F.defaultView)==null?void 0:M.visualViewport)}),j.forEach(B=>{B.addEventListener("scroll",D,{passive:!0})}),()=>{f&&F.removeEventListener("keydown",U),x&&F.removeEventListener(d,O),j.forEach(B=>{B.removeEventListener("scroll",D)})}},[c,l,s,a,f,x,d,n,r,g,u,T,R,U,O]),k.useEffect(()=>{E.current=!1},[x,d]),k.useMemo(()=>u?{reference:{onKeyDown:U,[HD[h]]:D=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,D.nativeEvent))}},floating:{onKeyDown:U,[VD[d]]:()=>{E.current=!0}}}:{},[u,o,v,d,h,r,U])}let fc;process.env.NODE_ENV!=="production"&&(fc=new Set);function GD(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 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((i=e.elements)!=null&&i.reference&&!Dt(e.elements.reference)){var a;if(!((a=fc)!=null&&a.has(T))){var s;(s=fc)==null||s.add(T),console.error(T)}}}const[l,c]=k.useState(null),u=((t=e.elements)==null?void 0:t.reference)||l,f=nD(e),p=ea(),d=Tn((T,R)=>{T&&(h.current.openEvent=R),r==null||r(T,R)}),v=k.useRef(null),h=k.useRef({}),g=k.useState(()=>TD())[0],m=sc(),b=k.useCallback(T=>{const R=Dt(T)?{getBoundingClientRect:()=>T.getBoundingClientRect(),contextElement:T}:T;f.refs.setReference(R)},[f.refs]),w=k.useCallback(T=>{(Dt(T)||T===null)&&(v.current=T,c(T)),(Dt(f.refs.reference.current)||f.refs.reference.current===null||T!==null&&!Dt(T))&&f.refs.setReference(T)},[f.refs]),$=k.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),x=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),E=k.useMemo(()=>({...f,refs:$,elements:x,dataRef:h,nodeId:o,floatingId:m,events:g,open:n,onOpenChange:d}),[f,o,m,g,n,d,$,x]);return Ge(()=>{const T=p==null?void 0:p.nodesRef.current.find(R=>R.id===o);T&&(T.context=E)}),k.useMemo(()=>({...f,context:E,refs:$,elements:x}),[f,$,x,E])}function dc(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 YD(e){e===void 0&&(e=[]);const t=e,n=k.useCallback(i=>dc(i,e,"reference"),t),r=k.useCallback(i=>dc(i,e,"floating"),t),o=k.useCallback(i=>dc(i,e,"item"),e.map(i=>i==null?void 0:i.item));return k.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let _g=!1;function oa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Dg(e,t){return oa(t,e===oc||e===Ji,e===br||e===bo)}function pc(e,t,n){return oa(t,e===Ji,n?e===br:e===bo)||e==="Enter"||e==" "||e===""}function XD(e,t,n){return oa(t,n?e===br:e===bo,e===Ji)}function Mg(e,t,n){return oa(t,n?e===bo:e===br,e===oc)}function JD(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:$=void 0,orientation:x="vertical",cols:E=1,scrollItemIntoView:T=!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"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const U=Sg(),O=ea(),D=Tn(c),F=k.useRef(m),j=k.useRef(f??-1),B=k.useRef(null),M=k.useRef(!0),L=k.useRef(D),G=k.useRef(!!a),H=k.useRef(!1),A=k.useRef(!1),y=$n($),_=$n(n),I=$n(T),[S,N]=k.useState(),[K,V]=k.useState(),Y=Tn(function(X,J,q){q===void 0&&(q=!1);const ne=X.current[J.current];ne&&(g?(N(ne.id),O==null||O.events.emit("virtualfocus",ne),R&&(R.current=ne)):dn(ne,{preventScroll:!0,sync:S_()&&Vm()?_g||H.current:!1}),requestAnimationFrame(()=>{const ae=I.current;ae&&ne&&(q||!M.current)&&(ne.scrollIntoView==null||ne.scrollIntoView(typeof ae=="boolean"?{block:"nearest",inline:"nearest"}:ae))}))});Ge(()=>{document.createElement("div").focus({get preventScroll(){return _g=!0,!1}})},[]),Ge(()=>{u&&(n&&a?F.current&&f!=null&&(A.current=!0,D(f)):G.current&&(j.current=-1,L.current(null)))},[u,n,a,f,D]),Ge(()=>{if(u&&n&&a)if(l==null){if(H.current=!1,f!=null)return;if(G.current&&(j.current=-1,Y(s,j)),!G.current&&F.current&&(B.current!=null||F.current===!0&&B.current==null)){let X=0;const J=()=>{s.current[0]==null?(X<2&&(X?requestAnimationFrame:queueMicrotask)(J),X++):(j.current=B.current==null||pc(B.current,x,h)||v?ic(s,y.current):yg(s,y.current),B.current=null,D(j.current))};J()}}else wo(s,l)||(j.current=l,Y(s,j,A.current),A.current=!1)},[u,n,a,l,f,v,s,x,h,D,Y,y]),Ge(()=>{var X,J;if(!u||a||!O||g||!G.current)return;const q=O.nodesRef.current,ne=(X=q.find(oe=>oe.id===U))==null||(J=X.context)==null?void 0:J.elements.floating,ae=En(Ft(a)),fe=q.some(oe=>oe.context&&mt(oe.context.elements.floating,ae));ne&&!fe&&M.current&&ne.focus({preventScroll:!0})},[u,a,O,U,g]),Ge(()=>{if(!u||!O||!g||U)return;function X(J){V(J.id),R&&(R.current=J)}return O.events.on("virtualfocus",X),()=>{O.events.off("virtualfocus",X)}},[u,O,g,U,R]),Ge(()=>{L.current=D,G.current=!!a}),Ge(()=>{n||(B.current=null)},[n]);const Z=l!=null,Q=k.useMemo(()=>{function X(q){if(!n)return;const ne=s.current.indexOf(q);ne!==-1&&D(ne)}return{onFocus(q){let{currentTarget:ne}=q;X(ne)},onClick:q=>{let{currentTarget:ne}=q;return ne.focus({preventScroll:!0})},...b&&{onMouseMove(q){let{currentTarget:ne}=q;X(ne)},onPointerLeave(q){let{pointerType:ne}=q;!M.current||ne==="touch"||(j.current=-1,Y(s,j),D(null),g||dn(o.floating.current,{preventScroll:!0}))}}}},[n,o,Y,b,s,D,g]);return k.useMemo(()=>{if(!u)return{};const X=y.current;function J(oe){if(M.current=!1,H.current=!0,!_.current&&oe.currentTarget===o.floating.current)return;if(v&&Mg(oe.key,x,h)){ot(oe),r(!1,oe.nativeEvent),hr(i)&&!g&&i.focus();return}const pe=j.current,ge=ic(s,X),Ne=yg(s,X);if(oe.key==="Home"&&(ot(oe),j.current=ge,D(j.current)),oe.key==="End"&&(ot(oe),j.current=Ne,D(j.current)),!(E>1&&(j.current=kD(s,{event:oe,orientation:x,loop:d,cols:E,disabledIndices:X,minIndex:ge,maxIndex:Ne,prevIndex:j.current,stopEvent:!0}),D(j.current),x==="both"))&&Dg(oe.key,x)){if(ot(oe),n&&!g&&En(oe.currentTarget.ownerDocument)===oe.currentTarget){j.current=pc(oe.key,x,h)?ge:Ne,D(j.current);return}pc(oe.key,x,h)?d?j.current=pe>=Ne?p&&pe!==s.current.length?-1:ge:ct(s,{startingIndex:pe,disabledIndices:X}):j.current=Math.min(Ne,ct(s,{startingIndex:pe,disabledIndices:X})):d?j.current=pe<=ge?p&&pe!==-1?s.current.length:Ne:ct(s,{startingIndex:pe,decrement:!0,disabledIndices:X}):j.current=Math.max(ge,ct(s,{startingIndex:pe,decrement:!0,disabledIndices:X})),wo(s,j.current)?D(null):D(j.current)}}function q(oe){m==="auto"&&Um(oe.nativeEvent)&&(F.current=!0)}function ne(oe){F.current=m,m==="auto"&&Hm(oe.nativeEvent)&&(F.current=!0)}const ae=g&&n&&Z&&{"aria-activedescendant":K||S},fe=s.current.find(oe=>(oe==null?void 0:oe.id)===S);return{reference:{...ae,onKeyDown(oe){M.current=!1;const pe=oe.key.indexOf("Arrow")===0,ge=XD(oe.key,x,h),Ne=Mg(oe.key,x,h),et=Dg(oe.key,x),St=(v?ge:et)||oe.key==="Enter"||oe.key.trim()==="";if(g&&n){const le=O==null?void 0:O.nodesRef.current.find(z=>z.parentId==null),W=O&&le?AD(O.nodesRef.current,le.id):null;if(pe&&W&&R){const z=new KeyboardEvent("keydown",{key:oe.key,bubbles:!0});if(ge||Ne){var Nt,xt;const ee=((Nt=W.context)==null?void 0:Nt.elements.domReference)===oe.currentTarget,ie=Ne&&!ee?(xt=W.context)==null?void 0:xt.elements.domReference:ge?fe:null;ie&&(ot(oe),ie.dispatchEvent(z),V(void 0))}if(et&&W.context&&W.context.open&&W.parentId&&oe.currentTarget!==W.context.elements.domReference){var re;ot(oe),(re=W.context.elements.domReference)==null||re.dispatchEvent(z);return}}return J(oe)}if(!(!n&&!w&&pe)){if(St&&(B.current=v&&et?null:oe.key),v){ge&&(ot(oe),n?(j.current=ic(s,X),D(j.current)):r(!0,oe.nativeEvent));return}et&&(f!=null&&(j.current=f),ot(oe),!n&&w?r(!0,oe.nativeEvent):J(oe),n&&D(j.current))}},onFocus(){n&&D(null)},onPointerDown:ne,onMouseDown:q,onClick:q},floating:{"aria-orientation":x==="both"?void 0:x,...ae,onKeyDown:J,onPointerMove(){M.current=!0}},item:Q}},[i,o,S,K,y,_,s,u,x,h,g,n,Z,v,f,w,p,E,d,m,D,r,Q,O,R])}function ZD(e,t){t===void 0&&(t={});const{open:n,floatingId:r}=e,{enabled:o=!0,role:i="dialog"}=t,a=sc();return k.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 QD(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=k.useRef(),h=k.useRef(""),g=k.useRef((n=d??a)!=null?n:-1),m=k.useRef(null),b=Tn(s),w=Tn(l),$=$n(u),x=$n(p);return Ge(()=>{r&&(clearTimeout(v.current),m.current=null,h.current="")},[r]),Ge(()=>{if(r&&h.current===""){var E;g.current=(E=d??a)!=null?E:-1}},[r,d,a]),k.useMemo(()=>{if(!c)return{};function E(U){U?o.current.typing||(o.current.typing=U,w(U)):o.current.typing&&(o.current.typing=U,w(U))}function T(U,O,D){const F=$.current?$.current(O,D):O.find(j=>(j==null?void 0:j.toLocaleLowerCase().indexOf(D.toLocaleLowerCase()))===0);return F?U.indexOf(F):-1}function R(U){const O=i.current;if(h.current.length>0&&h.current[0]!==" "&&(T(O,O,h.current)===-1?E(!1):U.key===" "&&ot(U)),O==null||x.current.includes(U.key)||U.key.length!==1||U.ctrlKey||U.metaKey||U.altKey)return;r&&U.key!==" "&&(ot(U),E(!0)),O.every(B=>{var M,L;return B?((M=B[0])==null?void 0:M.toLocaleLowerCase())!==((L=B[1])==null?void 0:L.toLocaleLowerCase()):!0})&&h.current===U.key&&(h.current="",g.current=m.current),h.current+=U.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,E(!1)},f);const F=g.current,j=T(O,[...O.slice((F||0)+1),...O.slice(0,(F||0)+1)],h.current);j!==-1?(b(j),m.current=j):U.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(U){U.key===" "&&E(!1)}}}},[c,r,o,i,f,x,$,b,w])}const eM=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var B,M,L,G,H;const o=Ni(A=>A.messageContainerRef),[i,a]=k.useState(!1),[s,l]=k.useState(null),[c,u]=k.useState(null),{message:{blocks:{dropdown:f}}}=ye,p=e.reduce((A,y)=>(A[y.label]=y.value,A),{}),d=p?Object.keys(p):[],v=A=>{a(c!==null&&!t?!1:A)},{refs:h,floatingStyles:g,context:m}=GD({placement:"bottom-start",open:i,onOpenChange:v,whileElementsMounted:J_,middleware:[rD(5),oD({padding:10,boundary:(o==null?void 0:o.current)??void 0,crossAxis:!0}),iD({apply({rects:A,elements:y,availableHeight:_}){Object.assign(y.floating.style,{maxHeight:`${_}px`,minWidth:`${A.reference.width}px`})},padding:10})]}),b=k.useRef([]),w=k.useRef(d),$=k.useRef(!1),x=WD(m,{event:"mousedown"}),E=KD(m),T=ZD(m,{role:"listbox"}),R=JD(m,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),U=QD(m,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:i?l:u,onTypingChange(A){$.current=A}}),{getReferenceProps:O,getFloatingProps:D,getItemProps:F}=YD([E,T,R,U,x]),j=A=>{u(A),d[A]!==void 0&&(n==null||n({type:"text",text:d[A]??"",value:p[d[A]]??""})),a(!1)};return C.jsxs(C.Fragment,{children:[C.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,...O(),children:[C.jsx("span",{...(M=f.button)==null?void 0:M.text,children:c?d[c]:"Select..."}),C.jsx(_P,{...(L=f.button)==null?void 0:L.icon})]}),i&&C.jsx(jD,{children:C.jsx(zD,{context:m,modal:!1,children:C.jsx("div",{ref:h.setFloating,className:(H=(G=f.content)==null?void 0:G.container)==null?void 0:H.className,style:{...g},...D(),children:d.map((A,y)=>{var _;return C.jsx("div",{ref:I=>{b.current[y]=I},role:"option",tabIndex:y===s?0:-1,"aria-selected":y===c&&y===s,"data-active":y===s?"":void 0,...(_=f.content)==null?void 0:_.item,...F({onClick(){j(y)},onKeyDown(I){I.key==="Enter"&&(I.preventDefault(),j(y)),I.key===" "&&!$.current&&(I.preventDefault(),j(y))}}),children:A},A)})})})})]})},Ng=P.forwardRef(({title:e,url:t,isReadOnly:n,...r},o)=>{const{message:{blocks:{file:i}}}=ye;return C.jsxs("a",{...r,...i.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...i.title,children:e||t}),C.jsx(FP,{...i.icon})]})});Ng.displayName="File";const tM=Un()((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=P;const Lg={audio:$m,bubble:wm,button:DA,carousel:Fm,column:Om,dropdown:eM,file:Ng,image:km,location:Tm,row:Im,text:rA,video:Cm,custom:({url:e,name:t,data:n,...r})=>{const o=tM(c=>c.getCustomComponent),[i,a]=P.useState(null),[s,l]=P.useState(null);return P.useEffect(()=>{o(e).then(a).catch(c=>{l(c.message)})},[e]),s?C.jsx("div",{style:{color:"red"},children:s}):i?C.jsx(i,{...n,...r}):null}},qn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Lg[e.type],o={...n,...e};return C.jsx(r,{...o})};function Rg(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=Rg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Eo(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Rg(e))&&(r&&(r+=" "),r+=t);return r}const nM=({disabled:e,onFileSelected:t})=>{const n=P.useRef(null),{uploadButton:r}=ye.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 C.jsxs(C.Fragment,{children:[C.jsx(GP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:o}),C.jsx("input",{value:"",multiple:!0,type:"file",ref:n,style:{display:"none"},onChange:i})]})},rM=({name:e,type:t,instance:n,status:r,removeFile:o})=>{const{loader:i,fileIcon:a,removeIcon:s,errorIcon:l,previewImage:c}=ye.composer.fileWidget,u=["PNG","JPEG","JPG"].includes(aa(e)),f=P.useMemo(()=>u?URL.createObjectURL(n):"",[n]);return r==="loading"?C.jsx(ia,{name:e,status:r,removeButton:C.jsx("div",{...i}),extension:aa(e),children:C.jsx("div",{...a.container,children:C.jsx(hc,{type:t,...a.icon})})}):r==="error"?C.jsx(ia,{name:e,status:r,removeButton:C.jsx(Fg,{removeFile:()=>o(e)}),extension:"Upload Error",children:C.jsxs("div",{...a.container,children:[C.jsx(NP,{...l}),C.jsx(hc,{type:t,...a.icon})]})}):r=="uploaded"&&u?C.jsx(ia,{name:e,status:r,removeButton:C.jsx(Fg,{removeFile:()=>o(e)}),extension:aa(e),children:C.jsx("div",{...a.container,children:C.jsx("img",{src:f,alt:e,...c})})}):C.jsx(ia,{name:e,status:r,removeButton:C.jsx(Hv,{onClick:()=>o(e),...s}),extension:aa(e),children:C.jsx("div",{...a.container,children:C.jsx(hc,{type:t,...a.icon})})})},ia=({name:e,status:t,removeButton:n,children:r,extension:o})=>{const{container:i,metadata:a}=ye.composer.fileWidget;return C.jsxs("div",{"data-status":t,title:e,...i,children:[n,r,C.jsxs("div",{...a.container,children:[C.jsx("div",{...a.name,children:e}),C.jsx("div",{...a.type,children:o})]})]})},hc=({type:e,...t})=>e==="image"?C.jsx(zP,{...t}):e==="video"?C.jsx(QP,{...t}):e==="audio"?C.jsx(eA,{...t}):C.jsx(Vv,{...t}),aa=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Fg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ye;return C.jsx(Hv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function vc(){return vc=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},vc.apply(null,arguments)}function oM(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 iM=P.useLayoutEffect,aM=function(t){var n=k.useRef(t);return iM(function(){n.current=t}),n},jg=function(t,n){if(typeof t=="function"){t(n);return}t.current=n},sM=function(t,n){var r=P.useRef();return P.useCallback(function(o){t.current=o,r.current&&jg(r.current,null),r.current=n,n&&jg(n,o)},[n])},Bg={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},lM=function(t){Object.keys(Bg).forEach(function(n){t.style.setProperty(n,Bg[n],"important")})},zg=lM,pt=null,Wg=function(t,n){var r=t.scrollHeight;return n.sizingStyle.boxSizing==="border-box"?r+n.borderSize:r-n.paddingSize};function cM(e,t,n,r){n===void 0&&(n=1),r===void 0&&(r=1/0),pt||(pt=document.createElement("textarea"),pt.setAttribute("tabindex","-1"),pt.setAttribute("aria-hidden","true"),zg(pt)),pt.parentNode===null&&document.body.appendChild(pt);var o=e.paddingSize,i=e.borderSize,a=e.sizingStyle,s=a.boxSizing;Object.keys(a).forEach(function(p){var d=p;pt.style[d]=a[d]}),zg(pt),pt.value=t;var l=Wg(pt,e);pt.value=t,l=Wg(pt,e),pt.value="x";var c=pt.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 Ug=function(){},uM=function(t,n){return t.reduce(function(r,o){return r[o]=n[o],r},{})},fM=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak"],dM=!!document.documentElement.currentStyle,pM=function(t){var n=window.getComputedStyle(t);if(n===null)return null;var r=uM(fM,n),o=r.boxSizing;if(o==="")return null;dM&&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}},hM=pM;function Hg(e,t,n){var r=aM(n);k.useLayoutEffect(function(){var o=function(a){return r.current(a)};if(e)return e.addEventListener(t,o),function(){return e.removeEventListener(t,o)}},[])}var vM=function(t){Hg(window,"resize",t)},mM=function(t){Hg(document.fonts,"loadingdone",t)},gM=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],yM=function(t,n){var r=t.cacheMeasurements,o=t.maxRows,i=t.minRows,a=t.onChange,s=a===void 0?Ug:a,l=t.onHeightChange,c=l===void 0?Ug:l,u=oM(t,gM),f=u.value!==void 0,p=k.useRef(null),d=sM(p,n),v=k.useRef(0),h=k.useRef(),g=function(){var w=p.current,$=r&&h.current?h.current:hM(w);if($){h.current=$;var x=cM($,w.value||w.placeholder||"x",i,o),E=x[0],T=x[1];v.current!==E&&(v.current=E,w.style.setProperty("height",E+"px","important"),c(E,{rowHeight:T}))}},m=function(w){f||g(),s(w)};return k.useLayoutEffect(g),vM(g),mM(g),k.createElement("textarea",vc({},u,{onChange:m,ref:d}))},bM=k.forwardRef(yM);const wM=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:o,setTextInput:i,setHistoryIndex:a,sendComposerMessage:s})=>{const l=om(u=>u.messageHistory),{input:c}=ye.composer;return C.jsx(bM,{...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=>{n||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),i(`${r}
|
|
252
|
-
`)):u.key==="Enter"&&(u.preventDefault(),s()),u.key==="ArrowUp"&&(u.preventDefault(),o<l.length-1&&i(l[o+1]??""),a(Math.min(o+1,l.length-1))),u.key==="ArrowDown"&&(u.preventDefault(),i(o===0?"":l[o-1]??""),a(Math.max(o-1,-1))))}})},
|
|
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])"],uc=h_.join(","),yg=typeof Element>"u",wo=yg?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Ji=!yg&&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(uc));return n&&wo.call(t,uc)&&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=wo.call(a,uc);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},bg=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},wg=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||v_(t))&&!bg(t)?0:t.tabIndex},y_=function(t,n){var r=wg(t);return r<0&&n&&!bg(t)?0:r},b_=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Sg=function(t){return t.tagName==="INPUT"},w_=function(t){return Sg(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},C_=function(t){return Sg(t)&&t.type==="radio"},k_=function(t){return C_(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},xg=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=wo.call(t,"details>summary:first-of-type"),a=i?t.parentElement:t;if(wo.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 xg(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 xg(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 wo.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))},Eg=function(t,n){return!(k_(n)||wg(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)},fc=function(t,n){n=n||{};var r;return n.getShadowRoot?r=g_([t],n.includeContainer,{filter:Eg.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:I_}):r=m_(t,n.includeContainer,Eg.bind(null,n)),P_(r)};const dc="ArrowUp",Xi="ArrowDown",br="ArrowLeft",So="ArrowRight";function ea(e,t,n){return Math.floor(e/t)!==n}function xo(e,t){return t<0||t>=e.current.length}function pc(e,t){return ct(e,{disabledIndices:t})}function Cg(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===dc){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}xo(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}))),xo(e,f)&&(f=c)),r==="both"){const p=Km(c/i);n.key===So&&(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=Km(l/i)===p;xo(e,f)&&(o&&d?f=n.key===br?l:ct(e,{startingIndex:c-c%i-1,disabledIndices:a}):f=c)}return f}let kg=0;function dn(e,t){t===void 0&&(t={});const{preventScroll:n=!1,cancelPrevious:r=!0,sync:o=!1}=t;r&&cancelAnimationFrame(kg);const i=()=>e==null?void 0:e.focus({preventScroll:n});o?i():kg=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 hc=!1,__=0;const Ag=()=>"floating-ui-"+__++;function M_(){const[e,t]=k.useState(()=>hc?Ag():void 0);return Ye(()=>{e==null&&t(Ag())},[]),k.useEffect(()=>{hc||(hc=!0)},[]),e}const vc=k.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_=k.createContext(null),L_=k.createContext(null),$g=()=>{var e;return((e=k.useContext(R_))==null?void 0:e.id)||null},na=()=>k.useContext(L_);function Eo(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={},mc=0;const j_=()=>typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,Tg=e=>e&&(e.host||Tg(e.parentNode)),z_=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=Tg(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 mc++,()=>{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)}),mc--,mc||(Sr=new WeakMap,Sr=new WeakMap,ra=new WeakSet,oa={})}}function Og(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 gc=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ig(e,t){const n=fc(e,gc());t==="prev"&&n.reverse();const r=n.indexOf(Cn(Ft(e)));return n.slice(r+1)[0]}function Pg(){return Ig(document.body,"next")}function Dg(){return Ig(document.body,"prev")}function Co(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!yt(n,r)}function W_(e){fc(e,gc()).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 yc={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 K_;function _g(e){e.key==="Tab"&&(e.target,clearTimeout(K_))}const ia=k.forwardRef(function(t,n){const[r,o]=k.useState();Ye(()=>(Jm()&&o("button"),document.addEventListener("keydown",_g),()=>{document.removeEventListener("keydown",_g)}),[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[Eo("focus-guard")]:"",style:yc};return k.createElement("span",ta({},t,i))}),Mg=k.createContext(null);function V_(e){let{id:t,root:n}=e===void 0?{}:e;const[r,o]=k.useState(null),i=vc(),a=Ng(),s=k.useMemo(()=>({id:t,root:n,portalContext:a,uniqueId:i}),[t,n,a,i]),l=k.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=Eo("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=V_({id:n,root:r}),[a,s]=k.useState(null),l=k.useRef(null),c=k.useRef(null),u=k.useRef(null),f=k.useRef(null),p=!!a&&!a.modal&&a.open&&o&&!!(r||i);return k.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]),k.createElement(Mg.Provider,{value:k.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:l,afterOutsideRef:c,beforeInsideRef:u,afterInsideRef:f,portalNode:i,setFocusManagerState:s}),[o,i])},p&&i&&k.createElement(ia,{"data-type":"outside",ref:l,onFocus:d=>{if(Co(d,i)){var v;(v=u.current)==null||v.focus()}else{const h=Dg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus()}}}),p&&i&&k.createElement("span",{"aria-owns":i.id,style:yc}),i&&tp.createPortal(t,i),p&&i&&k.createElement(ia,{"data-type":"outside",ref:c,onFocus:d=>{if(Co(d,i)){var v;(v=f.current)==null||v.focus()}else{const h=Pg()||(a==null?void 0:a.refs.domReference.current);h==null||h.focus(),a!=null&&a.closeOnFocusOut&&(a==null||a.onOpenChange(!1,d.nativeEvent))}}}))}const Ng=()=>k.useContext(Mg),G_=k.forwardRef(function(t,n){return k.createElement("button",ta({},t,{type:"button",ref:n,tabIndex:-1,style:yc}))});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),E=$n(s),$=na(),R=Ng(),K=typeof a=="number"&&a<0,T=k.useRef(null),M=k.useRef(null),U=k.useRef(!1),B=k.useRef(null),F=k.useRef(!1),D=R!=null,L=m&&m.getAttribute("role")==="combobox"&&eg(m)&&K,q=k.useCallback(function(P){return P===void 0&&(P=b),P?fc(P,gc()):[]},[b]),W=k.useCallback(P=>{const N=q(P);return A.current.map(S=>m&&S==="reference"?m:b&&S==="floating"?b:N).filter(Boolean).flat()},[m,b,A,q]);k.useEffect(()=>{if(r||!l)return;function P(S){if(S.key==="Tab"){yt(b,Cn(Ft(b)))&&q().length===0&&!L&&ot(S);const V=W(),Y=Xm(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 N=Ft(b);return N.addEventListener("keydown",P),()=>{N.removeEventListener("keydown",P)}},[r,m,b,l,A,p,L,q,W]),k.useEffect(()=>{if(r||!u)return;function P(){F.current=!0,setTimeout(()=>{F.current=!1})}function N(S){const V=S.relatedTarget;queueMicrotask(()=>{const Y=!(yt(m,V)||yt(b,V)||yt(V,b)||yt(R==null?void 0:R.portalNode,V)||V!=null&&V.hasAttribute(Eo("focus-guard"))||$&&(wr($.nodesRef.current,d).find(G=>{var Q,X;return yt((Q=G.context)==null?void 0:Q.elements.floating,V)||yt((X=G.context)==null?void 0:X.elements.domReference,V)})||F_($.nodesRef.current,d).find(G=>{var Q,X;return((Q=G.context)==null?void 0:Q.elements.floating)===V||((X=G.context)==null?void 0:X.elements.domReference)===V})));V&&Y&&!F.current&&V!==B.current&&(U.current=!0,v(!1,S))})}if(b&&hr(m))return m.addEventListener("focusout",N),m.addEventListener("pointerdown",P),!l&&b.addEventListener("focusout",N),()=>{m.removeEventListener("focusout",N),m.removeEventListener("pointerdown",P),!l&&b.removeEventListener("focusout",N)}},[r,m,b,l,d,$,R,v,u]),k.useEffect(()=>{var P;if(r)return;const N=Array.from((R==null||(P=R.portalNode)==null?void 0:P.querySelectorAll("["+Eo("portal")+"]"))||[]);if(b){const S=[b,...N,T.current,M.current,A.current.includes("reference")||L?m:null].filter(Y=>Y!=null),V=l?Og(S,w,!w):Og(S);return()=>{V()}}},[r,m,b,l,A,R,L,w]),Ye(()=>{if(r||!b)return;const P=Ft(b),N=Cn(P);queueMicrotask(()=>{const S=W(b),V=x.current,Y=(typeof V=="number"?S[V]:V.current)||b,G=yt(b,N);!K&&!G&&f&&dn(Y,{preventScroll:Y===b})})},[r,f,b,K,W,x]),Ye(()=>{if(r||!b)return;let P=!1;const N=Ft(b),S=Cn(N),V=g.current;B.current=S;function Y(G){if(G.type==="escapeKey"&&p.domReference.current&&(B.current=p.domReference.current),["referencePress","escapeKey"].includes(G.type))return;const Q=G.data.returnFocus;typeof Q=="object"?(U.current=!1,P=Q.preventScroll):U.current=!Q}return h.on("dismiss",Y),()=>{h.off("dismiss",Y);const G=Cn(N);(yt(b,G)||$&&wr($.nodesRef.current,d).some(X=>{var ee;return yt((ee=X.context)==null?void 0:ee.elements.floating,G)})||V.openEvent&&["click","mousedown"].includes(V.openEvent.type))&&p.domReference.current&&(B.current=p.domReference.current),E.current&&hr(B.current)&&!U.current&&dn(B.current,{cancelPrevious:!1,preventScroll:P})}},[r,b,E,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"&&!K){const P=()=>{const S=b.getAttribute("tabindex");A.current.includes("floating")||Cn(Ft(b))!==p.domReference.current&&q().length===0?S!=="0"&&b.setAttribute("tabindex","0"):S!=="-1"&&b.setAttribute("tabindex","-1")};P();const N=new MutationObserver(P);return N.observe(b,{childList:!0,subtree:!0,attributes:!0}),()=>{N.disconnect()}}},[r,b,p,A,q,K]);function I(P){return r||!c||!l?null:k.createElement(G_,{ref:P==="start"?T:M,onClick:N=>v(!1,N.nativeEvent)},typeof c=="string"?c:"Dismiss")}const y=!r&&w&&!L&&(D||l);return k.createElement(k.Fragment,null,y&&k.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.beforeInsideRef,onFocus:P=>{if(l){const S=W();dn(o[0]==="reference"?S[0]:S[S.length-1])}else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(U.current=!1,Co(P,R.portalNode)){const S=Pg()||m;S==null||S.focus()}else{var N;(N=R.beforeOutsideRef.current)==null||N.focus()}}}),!L&&I("start"),n,I("end"),y&&k.createElement(ia,{"data-type":"inside",ref:R==null?void 0:R.afterInsideRef,onFocus:P=>{if(l)dn(W()[0]);else if(R!=null&&R.preserveTabOrder&&R.portalNode)if(u&&(U.current=!0),Co(P,R.portalNode)){const S=Dg()||m;S==null||S.focus()}else{var N;(N=R.afterOutsideRef.current)==null||N.focus()}}}))}function Rg(e){return hr(e.target)&&e.target.tagName==="BUTTON"}function Lg(e){return eg(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=k.useRef(),p=k.useRef(!1);return k.useMemo(()=>a?{reference:{onPointerDown(d){f.current=d.pointerType},onMouseDown(d){d.button===0&&(Zm(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}Zm(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||Rg(d))&&(d.key===" "&&!Lg(i)&&(d.preventDefault(),p.current=!0),d.key==="Enter"&&r(!(n&&l),d.nativeEvent))},onKeyUp(d){d.defaultPrevented||!u||Rg(d)||Lg(i)||d.key===" "&&p.current&&(p.current=!1,r(!(n&&l),d.nativeEvent))}}}:{},[a,o,s,c,u,i,l,n,r])}const J_=k.useInsertionEffect||(e=>e());function Tn(e){const t=k.useRef(()=>{if(process.env.NODE_ENV!=="production")throw new Error("Cannot call an event handler while rendering.")});return J_(()=>{t.current=e}),k.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=$g()!=null,A=Tn(typeof p=="function"?p:()=>!1),x=typeof p=="function"?A:p,E=k.useRef(!1),{escapeKeyBubbles:$,outsidePressBubbles:R}=eM(m),K=Tn(M=>{if(!n||!u||!f||M.key!=="Escape")return;const U=b?wr(b.nodesRef.current,i):[];if(!$&&(M.stopPropagation(),U.length>0)){let B=!0;if(U.forEach(F=>{var D;if((D=F.context)!=null&&D.open&&!F.context.dataRef.current.__escapeKeyBubbles){B=!1;return}}),!B)return}o.emit("dismiss",{type:"escapeKey",data:{returnFocus:{preventScroll:!1}}}),r(!1,ID(M)?M.nativeEvent:M)}),T=Tn(M=>{const U=E.current;if(E.current=!1,U||typeof x=="function"&&!x(M))return;const B=Xm(M),F="["+Eo("inert")+"]",D=Ft(l).querySelectorAll(F);let L=Mt(B)?B:null;for(;L&&!kD(L);){const I=$D(L);if(I===Ft(l).body||!Mt(I))break;L=I}if(D.length&&Mt(B)&&!PD(B)&&!yt(B,l)&&Array.from(D).every(I=>!yt(L,I)))return;if(hr(B)&&l){const I=B.clientWidth>0&&B.scrollWidth>B.clientWidth,y=B.clientHeight>0&&B.scrollHeight>B.clientHeight;let P=y&&M.offsetX>B.clientWidth;if(y&&AD(B).direction==="rtl"&&(P=M.offsetX<=B.offsetWidth-B.clientWidth),P||I&&M.offsetY>B.clientHeight)return}const q=b&&wr(b.nodesRef.current,i).some(I=>{var y;return tc(M,(y=I.context)==null?void 0:y.elements.floating)});if(tc(M,l)||tc(M,s)||q)return;const W=b?wr(b.nodesRef.current,i):[];if(W.length>0){let I=!0;if(W.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}:Ym(M)||Qm(M)}}),r(!1,M)});return k.useEffect(()=>{if(!n||!u)return;c.current.__escapeKeyBubbles=$,c.current.__outsidePressBubbles=R;function M(F){r(!1,F)}const U=Ft(l);f&&U.addEventListener("keydown",K),x&&U.addEventListener(d,T);let B=[];return g&&(Mt(s)&&(B=An(s)),Mt(l)&&(B=B.concat(An(l))),!Mt(a)&&a&&a.contextElement&&(B=B.concat(An(a.contextElement)))),B=B.filter(F=>{var D;return F!==((D=U.defaultView)==null?void 0:D.visualViewport)}),B.forEach(F=>{F.addEventListener("scroll",M,{passive:!0})}),()=>{f&&U.removeEventListener("keydown",K),x&&U.removeEventListener(d,T),B.forEach(F=>{F.removeEventListener("scroll",M)})}},[c,l,s,a,f,x,d,n,r,g,u,$,R,K,T]),k.useEffect(()=>{E.current=!1},[x,d]),k.useMemo(()=>u?{reference:{onKeyDown:K,[Z_[h]]:M=>{v&&(o.emit("dismiss",{type:"referencePress",data:{returnFocus:!1}}),r(!1,M.nativeEvent))}},floating:{onKeyDown:K,[X_[d]]:()=>{E.current=!0}}}:{},[u,o,v,d,h,r,K])}let bc;process.env.NODE_ENV!=="production"&&(bc=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=bc)!=null&&a.has($))){var s;(s=bc)==null||s.add($),console.error($)}}}const[l,c]=k.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=k.useRef(null),h=k.useRef({}),g=k.useState(()=>N_())[0],m=vc(),b=k.useCallback($=>{const R=Mt($)?{getBoundingClientRect:()=>$.getBoundingClientRect(),contextElement:$}:$;f.refs.setReference(R)},[f.refs]),w=k.useCallback($=>{(Mt($)||$===null)&&(v.current=$,c($)),(Mt(f.refs.reference.current)||f.refs.reference.current===null||$!==null&&!Mt($))&&f.refs.setReference($)},[f.refs]),A=k.useMemo(()=>({...f.refs,setReference:w,setPositionReference:b,domReference:v}),[f.refs,w,b]),x=k.useMemo(()=>({...f.elements,domReference:u}),[f.elements,u]),E=k.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=E)}),k.useMemo(()=>({...f,context:E,refs:A,elements:x}),[f,A,x,E])}function wc(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=k.useCallback(i=>wc(i,e,"reference"),t),r=k.useCallback(i=>wc(i,e,"floating"),t),o=k.useCallback(i=>wc(i,e,"item"),e.map(i=>i==null?void 0:i.item));return k.useMemo(()=>({getReferenceProps:n,getFloatingProps:r,getItemProps:o}),[n,r,o])}let Fg=!1;function aa(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bg(e,t){return aa(t,e===dc||e===Xi,e===br||e===So)}function Sc(e,t,n){return aa(t,e===Xi,n?e===br:e===So)||e==="Enter"||e==" "||e===""}function oM(e,t,n){return aa(t,n?e===br:e===So,e===Xi)}function jg(e,t,n){return aa(t,n?e===So:e===br,e===dc)}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:E=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"&&E>1&&console.warn(["Floating UI: In grid list navigation mode (`cols` > 1), the",'`orientation` should be either "horizontal" or "both".'].join(" ")));const K=$g(),T=na(),M=Tn(c),U=k.useRef(m),B=k.useRef(f??-1),F=k.useRef(null),D=k.useRef(!0),L=k.useRef(M),q=k.useRef(!!a),W=k.useRef(!1),I=k.useRef(!1),y=$n(A),P=$n(n),N=$n($),[S,V]=k.useState(),[Y,G]=k.useState(),Q=Tn(function(Z,_,j){j===void 0&&(j=!1);const J=Z.current[_.current];J&&(g?(V(J.id),T==null||T.events.emit("virtualfocus",J),R&&(R.current=J)):dn(J,{preventScroll:!0,sync:OD()&&Jm()?Fg||W.current:!1}),requestAnimationFrame(()=>{const re=N.current;re&&J&&(j||!D.current)&&(J.scrollIntoView==null||J.scrollIntoView(typeof re=="boolean"?{block:"nearest",inline:"nearest"}:re))}))});Ye(()=>{document.createElement("div").focus({get preventScroll(){return Fg=!0,!1}})},[]),Ye(()=>{u&&(n&&a?U.current&&f!=null&&(I.current=!0,M(f)):q.current&&(B.current=-1,L.current(null)))},[u,n,a,f,M]),Ye(()=>{if(u&&n&&a)if(l==null){if(W.current=!1,f!=null)return;if(q.current&&(B.current=-1,Q(s,B)),!q.current&&U.current&&(F.current!=null||U.current===!0&&F.current==null)){let Z=0;const _=()=>{s.current[0]==null?(Z<2&&(Z?requestAnimationFrame:queueMicrotask)(_),Z++):(B.current=F.current==null||Sc(F.current,x,h)||v?pc(s,y.current):Cg(s,y.current),F.current=null,M(B.current))};_()}}else xo(s,l)||(B.current=l,Q(s,B,I.current),I.current=!1)},[u,n,a,l,f,v,s,x,h,M,Q,y]),Ye(()=>{var Z,_;if(!u||a||!T||g||!q.current)return;const j=T.nodesRef.current,J=(Z=j.find(ie=>ie.id===K))==null||(_=Z.context)==null?void 0:_.elements.floating,re=Cn(Ft(a)),ue=j.some(ie=>ie.context&&yt(ie.context.elements.floating,re));J&&!ue&&D.current&&J.focus({preventScroll:!0})},[u,a,T,K,g]),Ye(()=>{if(!u||!T||!g||K)return;function Z(_){G(_.id),R&&(R.current=_)}return T.events.on("virtualfocus",Z),()=>{T.events.off("virtualfocus",Z)}},[u,T,g,K,R]),Ye(()=>{L.current=M,q.current=!!a}),Ye(()=>{n||(F.current=null)},[n]);const X=l!=null,ee=k.useMemo(()=>{function Z(j){if(!n)return;const J=s.current.indexOf(j);J!==-1&&M(J)}return{onFocus(j){let{currentTarget:J}=j;Z(J)},onClick:j=>{let{currentTarget:J}=j;return J.focus({preventScroll:!0})},...b&&{onMouseMove(j){let{currentTarget:J}=j;Z(J)},onPointerLeave(j){let{pointerType:J}=j;!D.current||J==="touch"||(B.current=-1,Q(s,B),M(null),g||dn(o.floating.current,{preventScroll:!0}))}}}},[n,o,Q,b,s,M,g]);return k.useMemo(()=>{if(!u)return{};const Z=y.current;function _(ie){if(D.current=!1,W.current=!0,!P.current&&ie.currentTarget===o.floating.current)return;if(v&&jg(ie.key,x,h)){ot(ie),r(!1,ie.nativeEvent),hr(i)&&!g&&i.focus();return}const de=B.current,Se=pc(s,Z),De=Cg(s,Z);if(ie.key==="Home"&&(ot(ie),B.current=Se,M(B.current)),ie.key==="End"&&(ot(ie),B.current=De,M(B.current)),!(E>1&&(B.current=D_(s,{event:ie,orientation:x,loop:d,cols:E,disabledIndices:Z,minIndex:Se,maxIndex:De,prevIndex:B.current,stopEvent:!0}),M(B.current),x==="both"))&&Bg(ie.key,x)){if(ot(ie),n&&!g&&Cn(ie.currentTarget.ownerDocument)===ie.currentTarget){B.current=Sc(ie.key,x,h)?Se:De,M(B.current);return}Sc(ie.key,x,h)?d?B.current=de>=De?p&&de!==s.current.length?-1:Se:ct(s,{startingIndex:de,disabledIndices:Z}):B.current=Math.min(De,ct(s,{startingIndex:de,disabledIndices:Z})):d?B.current=de<=Se?p&&de!==-1?s.current.length:De:ct(s,{startingIndex:de,decrement:!0,disabledIndices:Z}):B.current=Math.max(Se,ct(s,{startingIndex:de,decrement:!0,disabledIndices:Z})),xo(s,B.current)?M(null):M(B.current)}}function j(ie){m==="auto"&&Ym(ie.nativeEvent)&&(U.current=!0)}function J(ie){U.current=m,m==="auto"&&Qm(ie.nativeEvent)&&(U.current=!0)}const re=g&&n&&X&&{"aria-activedescendant":Y||S},ue=s.current.find(ie=>(ie==null?void 0:ie.id)===S);return{reference:{...re,onKeyDown(ie){D.current=!1;const de=ie.key.indexOf("Arrow")===0,Se=oM(ie.key,x,h),De=jg(ie.key,x,h),Ue=Bg(ie.key,x),dt=(v?Se:Ue)||ie.key==="Enter"||ie.key.trim()==="";if(g&&n){const le=T==null?void 0:T.nodesRef.current.find(z=>z.parentId==null),H=T&&le?B_(T.nodesRef.current,le.id):null;if(de&&H&&R){const z=new KeyboardEvent("keydown",{key:ie.key,bubbles:!0});if(Se||De){var Et,pt;const te=((Et=H.context)==null?void 0:Et.elements.domReference)===ie.currentTarget,ae=De&&!te?(pt=H.context)==null?void 0:pt.elements.domReference:Se?ue:null;ae&&(ot(ie),ae.dispatchEvent(z),G(void 0))}if(Ue&&H.context&&H.context.open&&H.parentId&&ie.currentTarget!==H.context.elements.domReference){var oe;ot(ie),(oe=H.context.elements.domReference)==null||oe.dispatchEvent(z);return}}return _(ie)}if(!(!n&&!w&&de)){if(dt&&(F.current=v&&Ue?null:ie.key),v){Se&&(ot(ie),n?(B.current=pc(s,Z),M(B.current)):r(!0,ie.nativeEvent));return}Ue&&(f!=null&&(B.current=f),ot(ie),!n&&w?r(!0,ie.nativeEvent):_(ie),n&&M(B.current))}},onFocus(){n&&M(null)},onPointerDown:J,onMouseDown:j,onClick:j},floating:{"aria-orientation":x==="both"?void 0:x,...re,onKeyDown:_,onPointerMove(){D.current=!0}},item:ee}},[i,o,S,Y,y,P,s,u,x,h,g,n,X,v,f,w,p,E,d,m,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=vc();return k.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=k.useRef(),h=k.useRef(""),g=k.useRef((n=d??a)!=null?n:-1),m=k.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 E;g.current=(E=d??a)!=null?E:-1}},[r,d,a]),k.useMemo(()=>{if(!c)return{};function E(K){K?o.current.typing||(o.current.typing=K,w(K)):o.current.typing&&(o.current.typing=K,w(K))}function $(K,T,M){const U=A.current?A.current(T,M):T.find(B=>(B==null?void 0:B.toLocaleLowerCase().indexOf(M.toLocaleLowerCase()))===0);return U?K.indexOf(U):-1}function R(K){const T=i.current;if(h.current.length>0&&h.current[0]!==" "&&($(T,T,h.current)===-1?E(!1):K.key===" "&&ot(K)),T==null||x.current.includes(K.key)||K.key.length!==1||K.ctrlKey||K.metaKey||K.altKey)return;r&&K.key!==" "&&(ot(K),E(!0)),T.every(F=>{var D,L;return F?((D=F[0])==null?void 0:D.toLocaleLowerCase())!==((L=F[1])==null?void 0:L.toLocaleLowerCase()):!0})&&h.current===K.key&&(h.current="",g.current=m.current),h.current+=K.key,clearTimeout(v.current),v.current=setTimeout(()=>{h.current="",g.current=m.current,E(!1)},f);const U=g.current,B=$(T,[...T.slice((U||0)+1),...T.slice(0,(U||0)+1)],h.current);B!==-1?(b(B),m.current=B):K.key!==" "&&(h.current="",E(!1))}return{reference:{onKeyDown:R},floating:{onKeyDown:R,onKeyUp(K){K.key===" "&&E(!1)}}}},[c,r,o,i,f,x,A,b,w])}const lM=({options:e,reusable:t,sendMessage:n,isReadOnly:r})=>{var F,D,L,q,W;const o=Li(I=>I.messageContainerRef),[i,a]=k.useState(!1),[s,l]=k.useState(null),[c,u]=k.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=k.useRef([]),w=k.useRef(d),A=k.useRef(!1),x=Q_(m,{event:"mousedown"}),E=tM(m),$=aM(m,{role:"listbox"}),R=iM(m,{listRef:b,activeIndex:s,selectedIndex:c,onNavigate:l,loop:!0}),K=sM(m,{listRef:w,activeIndex:s,selectedIndex:c,onMatch:i?l:u,onTypingChange(I){A.current=I}}),{getReferenceProps:T,getFloatingProps:M,getItemProps:U}=rM([E,$,R,K,x]),B=I=>{u(I),d[I]!==void 0&&(n==null||n({type:"text",text:d[I]??"",value:p[d[I]]??""})),a(!1)};return C.jsxs(C.Fragment,{children:[C.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,...(F=f.button)==null?void 0:F.container,...T(),children:[C.jsx("span",{...(D=f.button)==null?void 0:D.text,children:c?d[c]:"Select..."}),C.jsx(jI,{...(L=f.button)==null?void 0:L.icon})]}),i&&C.jsx(q_,{children:C.jsx(Y_,{context:m,modal:!1,children:C.jsx("div",{ref:h.setFloating,className:(W=(q=f.content)==null?void 0:q.container)==null?void 0:W.className,style:{...g},...M(),children:d.map((I,y)=>{var P;return C.jsx("div",{ref:N=>{b.current[y]=N},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,...U({onClick(){B(y)},onKeyDown(N){N.key==="Enter"&&(N.preventDefault(),B(y)),N.key===" "&&!A.current&&(N.preventDefault(),B(y))}}),children:I},I)})})})})]})},zg=O.forwardRef(({title:e,url:t,isReadOnly:n,...r},o)=>{const{message:{blocks:{file:i}}}=ve;return C.jsxs("a",{...r,...i.container,href:t,style:n?{pointerEvents:"none"}:void 0,download:!0,ref:o,target:"_blank",rel:"noreferrer",children:[C.jsx("p",{...i.title,children:e||t}),C.jsx(VI,{...i.icon})]})});zg.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 Ug={audio:Dm,bubble:Am,button:UP,carousel:Hm,column:Mm,dropdown:lM,file:zg,image:Im,location:_m,row:Nm,text:fP,video:Pm,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?C.jsx("div",{style:{color:"red"},children:s}):i?C.jsx(i,{...n,...r}):null}},Vn=({block:e,renderers:t,...n})=>{const r=(t==null?void 0:t[e.type])??Ug[e.type],o={...n,...e};return C.jsx(r,{...o})};function Wg(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=Wg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ko(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Wg(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 C.jsxs(C.Fragment,{children:[C.jsx(nP,{...r,role:"button",tabIndex:0,"aria-label":"Upload File Button","data-disabled":e,onClick:o}),C.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(()=>u?URL.createObjectURL(n):"",[n]);return r==="loading"?C.jsx(sa,{name:e,status:r,removeButton:C.jsx("div",{...i}),extension:la(e),children:C.jsx("div",{...a.container,children:C.jsx(xc,{type:t,...a.icon})})}):r==="error"?C.jsx(sa,{name:e,status:r,removeButton:C.jsx(Hg,{removeFile:()=>o(e)}),extension:"Upload Error",children:C.jsxs("div",{...a.container,children:[C.jsx(WI,{...l}),C.jsx(xc,{type:t,...a.icon})]})}):r=="uploaded"&&u?C.jsx(sa,{name:e,status:r,removeButton:C.jsx(Hg,{removeFile:()=>o(e)}),extension:la(e),children:C.jsx("div",{...a.container,children:C.jsx("img",{src:f,alt:e,...c})})}):C.jsx(sa,{name:e,status:r,removeButton:C.jsx(Zv,{onClick:()=>o(e),...s}),extension:la(e),children:C.jsx("div",{...a.container,children:C.jsx(xc,{type:t,...a.icon})})})},sa=({name:e,status:t,removeButton:n,children:r,extension:o})=>{const{container:i,metadata:a}=ve.composer.fileWidget;return C.jsxs("div",{"data-status":t,title:e,...i,children:[n,r,C.jsxs("div",{...a.container,children:[C.jsx("div",{...a.name,children:e}),C.jsx("div",{...a.type,children:o})]})]})},xc=({type:e,...t})=>e==="image"?C.jsx(YI,{...t}):e==="video"?C.jsx(sP,{...t}):e==="audio"?C.jsx(tm,{...t}):C.jsx(Xv,{...t}),la=e=>{const t=e.split(".").pop();return t?t.toUpperCase():"File"},Hg=({removeFile:e})=>{const{composer:{fileWidget:{removeIcon:t}}}=ve;return C.jsx(Zv,{role:"button",tabIndex:0,"aria-label":"Remove File Button",onClick:()=>e(),...t})};function Ec(){return Ec=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},Ec.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=k.useRef(t);return pM(function(){n.current=t}),n},Kg=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&&Kg(r.current,null),r.current=n,n&&Kg(n,o)},[n])},Vg={"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(Vg).forEach(function(n){t.style.setProperty(n,Vg[n],"important")})},qg=mM,vt=null,Gg=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"),qg(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]}),qg(vt),vt.value=t;var l=Gg(vt,e);vt.value=t,l=Gg(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 Yg=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 Qg(e,t,n){var r=hM(n);k.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){Qg(window,"resize",t)},CM=function(t){Qg(document.fonts,"loadingdone",t)},kM=["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?Yg:a,l=t.onHeightChange,c=l===void 0?Yg:l,u=dM(t,kM),f=u.value!==void 0,p=k.useRef(null),d=vM(p,n),v=k.useRef(0),h=k.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),E=x[0],$=x[1];v.current!==E&&(v.current=E,w.style.setProperty("height",E+"px","important"),c(E,{rowHeight:$}))}},m=function(w){f||g(),s(w)};return k.useLayoutEffect(g),EM(g),CM(g),k.createElement("textarea",Ec({},u,{onChange:m,ref:d}))},$M=k.forwardRef(AM);const TM=({inputRef:e,composerPlaceholder:t,composerDisabled:n,textInput:r,historyIndex:o,setTextInput:i,setHistoryIndex:a,sendComposerMessage:s})=>{const l=fm(u=>u.messageHistory),{input:c}=ve.composer;return C.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=>{n||(u.key==="Enter"&&u.shiftKey?(u.preventDefault(),i(`${r}
|
|
257
|
+
`)):u.key==="Enter"&&(u.preventDefault(),s()),u.key==="ArrowUp"&&(u.preventDefault(),o<l.length-1&&i(l[o+1]??""),a(Math.min(o+1,l.length-1))),u.key==="ArrowDown"&&(u.preventDefault(),i(o===0?"":l[o-1]??""),a(Math.max(o-1,-1))))}})},OM=({disabled:e,setTextInput:t})=>{const[n,r]=O.useState(!1),o=O.useRef(null),{voiceButton:i}=ve.composer,a=window.SpeechRecognition||window.webkitSpeechRecognition,s=()=>{o.current||(o.current=new a);const l=o.current;l&&(l.continuous=!0,l.onresult=c=>{var f,p,d;const u=((d=(p=(f=c.results)==null?void 0:f[0])==null?void 0:p[0])==null?void 0:d.transcript)??"";t(u??""),l.stop(),r(!1)},n?(l.stop(),r(!1)):(l.start(),r(!0)))};if(a)return C.jsx(XI,{...i,tabIndex:0,"aria-label":"Voice Input Button",role:"button","data-show":!e,"data-listens":!!n,onClick:s})},Jg=O.memo(O.forwardRef(({className:e,inputRef:t,disableComposer:n,isReadOnly:r,allowFileUpload:o,connected:i,composerPlaceholder:a,footer:s,sendMessage:l,uploadFile:c,storageKey:u,children:f,...p},d)=>{const{composer:v}=ve,h=n||r||!i,[g,m]=O.useState(""),[b,w]=O.useState(-1),A=Em(u),x=A(U=>U.files),E=A(U=>U.setFiles),$=A(U=>U.deleteFile),R=A(U=>U.uploadFile),K=fm(U=>U.addMessageToHistory),T=!!g||x.filter(U=>U.status==="uploaded").length>0;t=t??O.useRef(null);const M=()=>{const U=x.filter(D=>D.status==="uploaded");if(!U.length&&!g)return;const B=(U==null?void 0:U.map(D=>{const L=D.url,q=D.type;return{video:{type:"video",videoUrl:L},audio:{type:"audio",audioUrl:L},image:{type:"image",imageUrl:L}}[q]??{title:D.name,type:"file",fileUrl:L}}))??[];g&&B.push({type:"text",text:g});let F;B.length==1?F=B[0]:F={type:"bloc",items:B.map(L=>{const{type:q,...W}=L;return{type:q,payload:W}})},l==null||l(F),E([]),m(""),K(g),w(-1)};return r?null:C.jsxs(C.Fragment,{children:[C.jsxs("div",{"data-disabled":h,className:ko(v.container.className,e),ref:d,...p,children:[f,x.length>0&&C.jsx("div",{...v==null?void 0:v.fileContainer,children:x.map(U=>C.jsx(fM,{...U,removeFile:$},U.name))}),C.jsxs("div",{...v.inputContainer,onClick:()=>{t&&"current"in t&&t.current&&t.current.focus()},children:[o&&C.jsx(uM,{disabled:h,onFileSelected:U=>{c&&R(U,c)}}),C.jsx(TM,{inputRef:t,composerPlaceholder:a,composerDisabled:h,textInput:g,historyIndex:b,setTextInput:m,setHistoryIndex:w,sendComposerMessage:M}),!h&&C.jsxs(C.Fragment,{children:[C.jsx(FI,{...v.sendbutton,role:"button",tabIndex:0,"aria-label":"Send Message Button","data-show":T,onClick:()=>M()}),C.jsx(OM,{disabled:T,setTextInput:m})]})]})]}),C.jsx(gv,{components:{a:({node:U,...B})=>C.jsx("a",{...B,target:"_blank",rel:"noreferrer noopener"})},allowedElements:["a","strong","code","em","p","span"],...v.footer,children:s})]})}));var Cc={exports:{}},ca={exports:{}},Ae={};/** @license React v16.13.1
|
|
253
258
|
* react-is.production.min.js
|
|
254
259
|
*
|
|
255
260
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
256
261
|
*
|
|
257
262
|
* This source code is licensed under the MIT license found in the
|
|
258
263
|
* LICENSE file in the root directory of this source tree.
|
|
259
|
-
*/var
|
|
264
|
+
*/var Zg;function IM(){if(Zg)return Ae;Zg=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,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=e?Symbol.for("react.responder"):60118,b=e?Symbol.for("react.scope"):60119;function w(x){if(typeof x=="object"&&x!==null){var E=x.$$typeof;switch(E){case t:switch(x=x.type,x){case l:case c:case r:case i:case o:case f:return x;default:switch(x=x&&x.$$typeof,x){case s:case u:case v:case d:case a:return x;default:return E}}case n:return E}}}function A(x){return w(x)===c}return Ae.AsyncMode=l,Ae.ConcurrentMode=c,Ae.ContextConsumer=s,Ae.ContextProvider=a,Ae.Element=t,Ae.ForwardRef=u,Ae.Fragment=r,Ae.Lazy=v,Ae.Memo=d,Ae.Portal=n,Ae.Profiler=i,Ae.StrictMode=o,Ae.Suspense=f,Ae.isAsyncMode=function(x){return A(x)||w(x)===l},Ae.isConcurrentMode=A,Ae.isContextConsumer=function(x){return w(x)===s},Ae.isContextProvider=function(x){return w(x)===a},Ae.isElement=function(x){return typeof x=="object"&&x!==null&&x.$$typeof===t},Ae.isForwardRef=function(x){return w(x)===u},Ae.isFragment=function(x){return w(x)===r},Ae.isLazy=function(x){return w(x)===v},Ae.isMemo=function(x){return w(x)===d},Ae.isPortal=function(x){return w(x)===n},Ae.isProfiler=function(x){return w(x)===i},Ae.isStrictMode=function(x){return w(x)===o},Ae.isSuspense=function(x){return w(x)===f},Ae.isValidElementType=function(x){return typeof x=="string"||typeof x=="function"||x===r||x===c||x===i||x===o||x===f||x===p||typeof x=="object"&&x!==null&&(x.$$typeof===v||x.$$typeof===d||x.$$typeof===a||x.$$typeof===s||x.$$typeof===u||x.$$typeof===g||x.$$typeof===m||x.$$typeof===b||x.$$typeof===h)},Ae.typeOf=w,Ae}var $e={};/** @license React v16.13.1
|
|
260
265
|
* react-is.development.js
|
|
261
266
|
*
|
|
262
267
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
263
268
|
*
|
|
264
269
|
* This source code is licensed under the MIT license found in the
|
|
265
270
|
* LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/var
|
|
271
|
+
*/var Xg;function PM(){return Xg||(Xg=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,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,f=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,d=e?Symbol.for("react.memo"):60115,v=e?Symbol.for("react.lazy"):60116,h=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,m=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===i||j===o||j===f||j===p||typeof j=="object"&&j!==null&&(j.$$typeof===v||j.$$typeof===d||j.$$typeof===a||j.$$typeof===s||j.$$typeof===u||j.$$typeof===g||j.$$typeof===m||j.$$typeof===b||j.$$typeof===h)}function A(j){if(typeof j=="object"&&j!==null){var J=j.$$typeof;switch(J){case t:var re=j.type;switch(re){case l:case c:case r:case i:case o:case f:return re;default:var ue=re&&re.$$typeof;switch(ue){case s:case u:case v:case d:case a:return ue;default:return J}}case n:return J}}}var x=l,E=c,$=s,R=a,K=t,T=u,M=r,U=v,B=d,F=n,D=i,L=o,q=f,W=!1;function I(j){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),y(j)||A(j)===l}function y(j){return A(j)===c}function P(j){return A(j)===s}function N(j){return A(j)===a}function S(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function V(j){return A(j)===u}function Y(j){return A(j)===r}function G(j){return A(j)===v}function Q(j){return A(j)===d}function X(j){return A(j)===n}function ee(j){return A(j)===i}function Z(j){return A(j)===o}function _(j){return A(j)===f}$e.AsyncMode=x,$e.ConcurrentMode=E,$e.ContextConsumer=$,$e.ContextProvider=R,$e.Element=K,$e.ForwardRef=T,$e.Fragment=M,$e.Lazy=U,$e.Memo=B,$e.Portal=F,$e.Profiler=D,$e.StrictMode=L,$e.Suspense=q,$e.isAsyncMode=I,$e.isConcurrentMode=y,$e.isContextConsumer=P,$e.isContextProvider=N,$e.isElement=S,$e.isForwardRef=V,$e.isFragment=Y,$e.isLazy=G,$e.isMemo=Q,$e.isPortal=X,$e.isProfiler=ee,$e.isStrictMode=Z,$e.isSuspense=_,$e.isValidElementType=w,$e.typeOf=A}()),$e}var ey;function ua(){return ey||(ey=1,process.env.NODE_ENV==="production"?ca.exports=IM():ca.exports=PM()),ca.exports}/*
|
|
267
272
|
object-assign
|
|
268
273
|
(c) Sindre Sorhus
|
|
269
274
|
@license MIT
|
|
270
|
-
*/var
|
|
271
|
-
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var
|
|
272
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
273
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
274
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function
|
|
275
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function by(e,t){if(e){if(typeof e=="string")return Tc(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 Tc(e,t)}}function Tc(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 b2(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 w2(e){if(Array.isArray(e))return e}function wy(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?wy(Object(n),!0).forEach(function(r){Oc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Oc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function da(e,t){if(e==null)return{};var n=S2(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 S2(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 Ic=P.forwardRef(function(e,t){var n=e.children,r=da(e,u2),o=xy(r),i=o.open,a=da(o,f2);return P.useImperativeHandle(t,function(){return{open:i}},[i]),P.createElement(P.Fragment,null,n(Fe(Fe({},a),{},{open:i})))});Ic.displayName="Dropzone";var Sy={disabled:!1,getFilesFromEvent:DM,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};Ic.defaultProps=Sy,Ic.propTypes={children:De.func,accept:De.objectOf(De.arrayOf(De.string)),multiple:De.bool,preventDropOnDocument:De.bool,noClick:De.bool,noKeyboard:De.bool,noDrag:De.bool,noDragEventsBubbling:De.bool,minSize:De.number,maxSize:De.number,maxFiles:De.number,disabled:De.bool,getFilesFromEvent:De.func,onFileDialogCancel:De.func,onFileDialogOpen:De.func,useFsAccessApi:De.bool,autoFocus:De.bool,onDragEnter:De.func,onDragLeave:De.func,onDragOver:De.func,onDrop:De.func,onDropAccepted:De.func,onDropRejected:De.func,onError:De.func,validator:De.func};var Pc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function xy(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Fe(Fe({},Sy),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,$=t.noClick,x=t.noKeyboard,E=t.noDrag,T=t.noDragEventsBubbling,R=t.onError,U=t.validator,O=P.useMemo(function(){return s2(n)},[n]),D=P.useMemo(function(){return a2(n)},[n]),F=P.useMemo(function(){return typeof g=="function"?g:Ey},[g]),j=P.useMemo(function(){return typeof h=="function"?h:Ey},[h]),B=P.useRef(null),M=P.useRef(null),L=P.useReducer(x2,Pc),G=$c(L,2),H=G[0],A=G[1],y=H.isFocused,_=H.isFileDialogActive,I=P.useRef(typeof window<"u"&&window.isSecureContext&&m&&i2()),S=function(){!I.current&&_&&setTimeout(function(){if(M.current){var le=M.current.files;le.length||(A({type:"closeDialog"}),j())}},300)};P.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[M,_,j,I]);var N=P.useRef([]),K=function(le){B.current&&B.current.contains(le.target)||(le.preventDefault(),N.current=[])};P.useEffect(function(){return w&&(document.addEventListener("dragover",my,!1),document.addEventListener("drop",K,!1)),function(){w&&(document.removeEventListener("dragover",my),document.removeEventListener("drop",K))}},[B,w]),P.useEffect(function(){return!r&&b&&B.current&&B.current.focus(),function(){}},[B,b,r]);var V=P.useCallback(function(re){R?R(re):console.error(re)},[R]),Y=P.useCallback(function(re){re.preventDefault(),re.persist(),et(re),N.current=[].concat(h2(N.current),[re.target]),fa(re)&&Promise.resolve(o(re)).then(function(le){if(!(ua(re)&&!T)){var W=le.length,z=W>0&&t2({files:le,accept:O,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:U}),ee=W>0&&!z;A({isDragAccept:z,isDragReject:ee,isDragActive:!0,type:"setDraggedFiles"}),c&&c(re)}}).catch(function(le){return V(le)})},[o,c,V,T,O,a,i,s,l,U]),Z=P.useCallback(function(re){re.preventDefault(),re.persist(),et(re);var le=fa(re);if(le&&re.dataTransfer)try{re.dataTransfer.dropEffect="copy"}catch{}return le&&f&&f(re),!1},[f,T]),Q=P.useCallback(function(re){re.preventDefault(),re.persist(),et(re);var le=N.current.filter(function(z){return B.current&&B.current.contains(z)}),W=le.indexOf(re.target);W!==-1&&le.splice(W,1),N.current=le,!(le.length>0)&&(A({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),fa(re)&&u&&u(re))},[B,u,T]),X=P.useCallback(function(re,le){var W=[],z=[];re.forEach(function(ee){var ie=hy(ee,O),ce=$c(ie,2),he=ce[0],We=ce[1],Ue=vy(ee,a,i),ht=$c(Ue,2),tt=ht[0],Pe=ht[1],nt=U?U(ee):null;if(he&&tt&&!nt)W.push(ee);else{var Ke=[We,Pe];nt&&(Ke=Ke.concat(nt)),z.push({file:ee,errors:Ke.filter(function(Fn){return Fn})})}}),(!s&&W.length>1||s&&l>=1&&W.length>l)&&(W.forEach(function(ee){z.push({file:ee,errors:[e2]})}),W.splice(0)),A({acceptedFiles:W,fileRejections:z,type:"setFiles"}),p&&p(W,z,le),z.length>0&&v&&v(z,le),W.length>0&&d&&d(W,le)},[A,s,O,a,i,l,p,d,v,U]),J=P.useCallback(function(re){re.preventDefault(),re.persist(),et(re),N.current=[],fa(re)&&Promise.resolve(o(re)).then(function(le){ua(re)&&!T||X(le,re)}).catch(function(le){return V(le)}),A({type:"reset"})},[o,X,V,T]),q=P.useCallback(function(){if(I.current){A({type:"openDialog"}),F();var re={multiple:s,types:D};window.showOpenFilePicker(re).then(function(le){return o(le)}).then(function(le){X(le,null),A({type:"closeDialog"})}).catch(function(le){l2(le)?(j(le),A({type:"closeDialog"})):c2(le)?(I.current=!1,M.current?(M.current.value=null,M.current.click()):V(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."))):V(le)});return}M.current&&(A({type:"openDialog"}),F(),M.current.value=null,M.current.click())},[A,F,j,m,X,V,D,s]),ne=P.useCallback(function(re){!B.current||!B.current.isEqualNode(re.target)||(re.key===" "||re.key==="Enter"||re.keyCode===32||re.keyCode===13)&&(re.preventDefault(),q())},[B,q]),ae=P.useCallback(function(){A({type:"focus"})},[]),fe=P.useCallback(function(){A({type:"blur"})},[]),oe=P.useCallback(function(){$||(o2()?setTimeout(q,0):q())},[$,q]),pe=function(le){return r?null:le},ge=function(le){return x?null:pe(le)},Ne=function(le){return E?null:pe(le)},et=function(le){T&&le.stopPropagation()},St=P.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=re.refKey,W=le===void 0?"ref":le,z=re.role,ee=re.onKeyDown,ie=re.onFocus,ce=re.onBlur,he=re.onClick,We=re.onDragEnter,Ue=re.onDragOver,ht=re.onDragLeave,tt=re.onDrop,Pe=da(re,d2);return Fe(Fe(Oc({onKeyDown:ge(Qt(ee,ne)),onFocus:ge(Qt(ie,ae)),onBlur:ge(Qt(ce,fe)),onClick:pe(Qt(he,oe)),onDragEnter:Ne(Qt(We,Y)),onDragOver:Ne(Qt(Ue,Z)),onDragLeave:Ne(Qt(ht,Q)),onDrop:Ne(Qt(tt,J)),role:typeof z=="string"&&z!==""?z:"presentation"},W,B),!r&&!x?{tabIndex:0}:{}),Pe)}},[B,ne,ae,fe,oe,Y,Z,Q,J,x,E,r]),Nt=P.useCallback(function(re){re.stopPropagation()},[]),xt=P.useMemo(function(){return function(){var re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=re.refKey,W=le===void 0?"ref":le,z=re.onChange,ee=re.onClick,ie=da(re,p2),ce=Oc({accept:O,multiple:s,type:"file",style:{display:"none"},onChange:pe(Qt(z,J)),onClick:pe(Qt(ee,Nt)),tabIndex:-1},W,M);return Fe(Fe({},ce),ie)}},[M,n,s,J,r]);return Fe(Fe({},H),{},{isFocused:y&&!r,getRootProps:St,getInputProps:xt,rootRef:B,inputRef:M,open:pe(q)})}function x2(e,t){switch(t.type){case"focus":return Fe(Fe({},e),{},{isFocused:!0});case"blur":return Fe(Fe({},e),{},{isFocused:!1});case"openDialog":return Fe(Fe({},Pc),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Fe(Fe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Fe({},Pc);default:return e}}function Ey(){}const ky=({children:e})=>{const[t,n]=P.useState(!1),[r,o]=P.useState(""),[i,a]=P.useState(""),[s,l]=P.useState(""),[c,u]=P.useState(()=>{}),[f,p]=P.useState(""),[d,v]=P.useState(null),h=({title:m,description:b,confirmButton:w,onConfirm:$,cancelButton:x,content:E})=>{o(m),a(b),l(w),u(()=>$),p(x),v(E),n(!0)},g=()=>{n(!1)};return C.jsxs(bm.Provider,{value:{open:t,showModal:h,hideModal:g},children:[C.jsx(Yr,{open:t,onOpenChange:n,children:C.jsx(Yr.Content,{title:r,description:i,confirmButton:s,onConfirm:c,cancelButton:f,hideModal:g,children:d})}),e]})},E2=["Inter","Rubik","IBM Plex Sans","Fira Code"],k2=e=>E2.some(t=>t.toLowerCase()===e.toLowerCase()),C2=(e,t)=>new Promise((n,r)=>{const o=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim()){r(new Error("Invalid font family name"));return}const a=t.filter(f=>/^\d+$/.test(f)).join(";"),s=`https://fonts.googleapis.com/css2?family=${o}:wght@${a}&display=swap`,l=new Promise(f=>setTimeout(f,500));if(document.querySelector(`link[href="${s}"]`)){l.then(()=>n());return}const u=document.createElement("link");u.rel="stylesheet",u.href=s,u.onload=()=>{"fonts"in document?Promise.all([document.fonts.load(`400 16px "${e}"`),l]).then(()=>n()).catch(()=>l.then(()=>n())):l.then(()=>n())},u.onerror=()=>{l.then(()=>r(new Error("Font loading failed")))},document.head.appendChild(u)}),$2=e=>new Promise(t=>{"fonts"in document?document.fonts.load(`400 16px "${e}"`).then(()=>t()).catch(()=>t()):setTimeout(()=>t(),100)}),Cy=({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i})=>{const[a,s]=P.useState(),l=P.useMemo(()=>gp({color:e,fontFamily:a,radius:n,themeMode:r,variant:o,headerVariant:i}),[e,a,n,r,o,i]);return P.useEffect(()=>{t&&t!==a&&(k2(t)?$2(t).then(()=>s(t)).catch(()=>s(t)):C2(t,["400","500","600","700"]).then(()=>s(t)).catch(()=>s(t)))},[t,a]),C.jsx("style",{children:l})},Ac=({children:e,className:t,connected:n,uploadFile:r,allowFileUpload:o,storageKey:i,...a})=>{const{container:s}=ye,l=Ni(h=>h.setMessageContainerRef),u=gm(i)(h=>h.uploadFile),f=P.useRef(null);P.useEffect(()=>{l(f)},[f,l]);const p=P.useCallback(h=>{r&&h.forEach(g=>u(g,r))},[u,r]),{getRootProps:d,isDragActive:v}=xy({noClick:!0,noKeyboard:!0,onDrop:p,disabled:!(o&&r)});return C.jsxs("div",{...a,className:Eo(s.className,t),ref:f,children:[C.jsxs("div",{"data-hover":v,...s.dropzone.overlay,children:["Drop files to upload",C.jsx(LP,{style:{width:"50px"}})]}),C.jsxs(ky,{children:[C.jsx(T2,{connected:n}),C.jsx("div",{...s.dropzone.container,...d(),children:e})]})]})},T2=({connected:e})=>{const{open:t,showModal:n}=jl();return e===!1&&!t&&n&&n({title:"Connection Error",description:"There was an error connecting to the server. Please check your internet connection and try again.",confirmButton:"Restart",onConfirm:()=>window.parent.location.reload(),cancelButton:"Cancel"}),C.jsx(C.Fragment,{})};Ac.displayName="Container";const $y=P.forwardRef(({children:e,onClick:t,imgUrl:n,...r},o)=>{const{fab:i}=ye,{container:a,icon:s,image:l}=i??{};return n?C.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):C.jsx("div",{...r,...a,ref:o,onClick:t,children:C.jsx("div",{...s})})});$y.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 O2(e,t){const n=k.createContext(t),r=i=>{const{children:a,...s}=i,l=k.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=k.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 Ty(e,t=[]){let n=[];function r(i,a){const s=k.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=k.useMemo(()=>v,Object.values(v));return C.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=k.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=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,I2(o,...t)]}function I2(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function Oy({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=P2({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=bn(n),l=k.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 P2({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=bn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Iy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _c(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Iy(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():Iy(e[o],null)}}}}function On(...e){return k.useCallback(_c(...e),e)}var Py=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(_2);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(Dc,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(Dc,{...r,ref:t,children:n})});Py.displayName="Slot";var Dc=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=M2(n);return k.cloneElement(n,{...D2(r,n.props),ref:t?_c(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});Dc.displayName="SlotClone";var A2=({children:e})=>C.jsx(C.Fragment,{children:e});function _2(e){return k.isValidElement(e)&&e.type===A2}function D2(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 M2(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 N2=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Mc=N2.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Py:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function L2(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var pa=e=>{const{present:t,children:n}=e,r=R2(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=On(r.ref,F2(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};pa.displayName="Presence";function R2(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=L2(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.useEffect(()=>{const c=ha(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=ha(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=ha(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=ha(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:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ha(e){return(e==null?void 0:e.animationName)||"none"}function F2(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 j2=k.useId||(()=>{}),B2=0;function va(e){const[t,n]=k.useState(j2());return ir(()=>{e||n(r=>r??String(B2++))},[e]),e||(t?`radix-${t}`:"")}var Nc="Collapsible",[z2,cJ]=Ty(Nc),[W2,Lc]=z2(Nc),Ay=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=Oy({prop:r,defaultProp:o,onChange:a});return C.jsx(W2,{scope:n,disabled:i,contentId:va(),open:l,onOpenToggle:k.useCallback(()=>c(u=>!u),[c]),children:C.jsx(Mc.div,{"data-state":Fc(l),"data-disabled":i?"":void 0,...s,ref:t})})});Ay.displayName=Nc;var _y="CollapsibleTrigger",Dy=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Lc(_y,n);return C.jsx(Mc.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Fc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:pn(e.onClick,o.onOpenToggle)})});Dy.displayName=_y;var Rc="CollapsibleContent",My=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Lc(Rc,e.__scopeCollapsible);return C.jsx(pa,{present:n||o.open,children:({present:i})=>C.jsx(U2,{...r,ref:t,present:i})})});My.displayName=Rc;var U2=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Lc(Rc,n),[s,l]=k.useState(r),c=k.useRef(null),u=On(t,c),f=k.useRef(0),p=f.current,d=k.useRef(0),v=d.current,h=a.open||s,g=k.useRef(h),m=k.useRef(void 0);return k.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]),C.jsx(Mc.div,{"data-state":Fc(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 Fc(e){return e?"open":"closed"}var H2=Ay,V2=My;const jc=({restartConversation:e,...t})=>{var a,s;const{header:n}=ye,{showModal:r,hideModal:o}=jl(),i=l=>{l.stopPropagation(),r&&o?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),o()},cancelButton:"Cancel"}):e()};return C.jsx(YP,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:i})},Ny=({onClick:e,...t})=>{const{header:n}=ye,r=o=>{o.stopPropagation(),e==null||e()};return C.jsx(nA,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},$o=({icon:e,title:t,link:n,...r})=>{var a,s,l,c,u,f,p,d,v,h,g,m;const{header:o}=ye,i=e??RP;return t?n?C.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:[C.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),C.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[C.jsx(i,{...(h=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),C.jsx("p",{...(m=(g=o.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},Ly=({defaultOpen:e,closeWindow:t,configuration:n,restartConversation:r,disabled:o,...i})=>{var f,p,d,v,h,g,m,b,w,$,x,E,T,R,U,O,D,F,j,B,M,L;const{header:a}=ye,[s,l]=P.useState(e),c=!!((f=n.email)!=null&&f.title)||!!((p=n.phone)!=null&&p.title)||!!((d=n.website)!=null&&d.title)||!!((v=n.termsOfService)!=null&&v.link)||!!((h=n.privacyPolicy)!=null&&h.link),u=c&&!o;return C.jsxs(H2,{open:u?s:!1,onOpenChange:l,"data-disabled":u?void 0:"",...a.container,...i,children:[C.jsxs(Dy,{"aria-label":"Expand Header Button",...a.content.container,children:[C.jsx(di,{...i,src:n.botAvatar,...a.content.avatar,children:n.botName||"Bot"}),C.jsx("h2",{...a.content.title,children:n.botName||"Bot"}),n.botDescription&&C.jsx("p",{...a.content.description,children:n.botDescription}),C.jsxs("div",{...a.content.actions.container,children:[r&&C.jsx(jc,{restartConversation:r}),t&&C.jsx(Ny,{onClick:t})]})]}),c&&C.jsxs(V2,{...a.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...a.expandedContent.group,children:[C.jsx($o,{"data-email":"",icon:UP,title:(g=n.email)==null?void 0:g.title,link:(b=(m=n.email)==null?void 0:m.link)!=null&&b.startsWith("mailto:")?(w=n.email)==null?void 0:w.link:`mailto:${($=n.email)==null?void 0:$.link}`}),C.jsx($o,{"data-phone":"",icon:KP,title:(x=n.phone)==null?void 0:x.title,link:(T=(E=n.phone)==null?void 0:E.link)!=null&&T.startsWith("tel:")?(R=n.phone)==null?void 0:R.link:`tel:${(U=n.phone)==null?void 0:U.link}`}),C.jsx($o,{"data-website":"",link:(O=n.website)==null?void 0:O.link,icon:BP,title:(D=n.website)==null?void 0:D.title})]}),C.jsxs("div",{"data-legal":"",...(F=a.expandedContent)==null?void 0:F.group,children:[C.jsx($o,{"data-terms":"",link:(j=n.termsOfService)==null?void 0:j.link,icon:Vv,title:(B=n.termsOfService)==null?void 0:B.title}),C.jsx($o,{"data-privacy":"",link:(M=n.privacyPolicy)==null?void 0:M.link,icon:WP,title:(L=n.privacyPolicy)==null?void 0:L.title})]})]})]})},Bc=P.memo(({...e})=>{const{typingIndicator:t}=ye;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})});Bc.displayName="TypingIndicator";const zc=P.memo(P.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},g)=>{const[m,b]=P.useState([]),{message:{container:w,avatar:$,deliveryStatus:x}}=ye,E=cp(a??"",15),[T,R]=P.useState("idle");return C.jsx(ym.Provider,{value:{isLoading:m,setIsLoading:b},children:C.jsxs("div",{...w,className:Eo(w==null?void 0:w.className,u&&(x==null?void 0:x.className)),"data-loaded":m.length===0,"data-disable-input":!!n,"data-direction":e,ref:g,children:[C.jsxs(Ns,{"data-color":E,"data-loading-status":T,...$==null?void 0:$.container,children:[C.jsx(Ls,{...$==null?void 0:$.image,onLoadingStatusChange:R,src:o==null?void 0:o.avatar}),C.jsxs(Rs,{...$==null?void 0:$.fallback,children:[o==null?void 0:o.name[0]," "]})]}),t&&C.jsx(qn,{block:{...t,isReadOnly:c,direction:e,timestamp:p,sender:o,feedback:f,messageId:i,status:s,metadata:d,sendMessage:v,addMessageFeedback:h},renderers:l}),r]})})}));function q2({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ye;return C.jsxs("li",{...r.container,children:[C.jsx(di,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),C.jsxs("div",{...r.content,children:[C.jsx("h1",{...r.title,children:n||"Bot"}),C.jsx("p",{...r.description,children:t})]})]})}function K2(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 G2(){K2("react-scroll-to-bottom:version","4.2.0")}var To=function(e){return e&&e.Math===Math&&e},Ye=To(typeof globalThis=="object"&&globalThis)||To(typeof window=="object"&&window)||To(typeof self=="object"&&self)||To(typeof Lt=="object"&&Lt)||To(typeof Lt=="object"&&Lt)||function(){return this}()||Function("return this")(),Xe=function(e){try{return!!e()}catch{return!0}},Y2=Xe,ma=!Y2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),X2=ma,Ry=Function.prototype,Fy=Ry.apply,jy=Ry.call,Wc=typeof Reflect=="object"&&Reflect.apply||(X2?jy.bind(Fy):function(){return jy.apply(Fy,arguments)}),By=ma,zy=Function.prototype,Uc=zy.call,J2=By&&zy.bind.bind(Uc,Uc),Ve=By?J2:function(e){return function(){return Uc.apply(e,arguments)}},Wy=Ve,Z2=Wy({}.toString),Q2=Wy("".slice),Gn=function(e){return Q2(Z2(e),8,-1)},eN=Gn,tN=Ve,Hc=function(e){if(eN(e)==="Function")return tN(e)},Vc=typeof document=="object"&&document.all,ut=typeof Vc>"u"&&Vc!==void 0?function(e){return typeof e=="function"||e===Vc}:function(e){return typeof e=="function"},Oo={},nN=Xe,gt=!nN(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),rN=ma,ga=Function.prototype.call,en=rN?ga.bind(ga):function(){return ga.apply(ga,arguments)},qc={},Uy={}.propertyIsEnumerable,Hy=Object.getOwnPropertyDescriptor,oN=Hy&&!Uy.call({1:2},1);qc.f=oN?function(t){var n=Hy(this,t);return!!n&&n.enumerable}:Uy;var Io=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},iN=Ve,aN=Xe,sN=Gn,Kc=Object,lN=iN("".split),Vy=aN(function(){return!Kc("z").propertyIsEnumerable(0)})?function(e){return sN(e)==="String"?lN(e,""):Kc(e)}:Kc,Gc=function(e){return e==null},cN=Gc,uN=TypeError,ya=function(e){if(cN(e))throw new uN("Can't call method on "+e);return e},fN=Vy,dN=ya,tn=function(e){return fN(dN(e))},pN=ut,zt=function(e){return typeof e=="object"?e!==null:pN(e)},it={},Yc=it,Xc=Ye,hN=ut,qy=function(e){return hN(e)?e:void 0},nn=function(e,t){return arguments.length<2?qy(Yc[e])||qy(Xc[e]):Yc[e]&&Yc[e][t]||Xc[e]&&Xc[e][t]},vN=Ve,hn=vN({}.isPrototypeOf),mN=Ye,Ky=mN.navigator,Gy=Ky&&Ky.userAgent,Jc=Gy?String(Gy):"",Yy=Ye,Zc=Jc,Xy=Yy.process,Jy=Yy.Deno,Zy=Xy&&Xy.versions||Jy&&Jy.version,Qy=Zy&&Zy.v8,Wt,ba;Qy&&(Wt=Qy.split("."),ba=Wt[0]>0&&Wt[0]<4?1:+(Wt[0]+Wt[1])),!ba&&Zc&&(Wt=Zc.match(/Edge\/(\d+)/),(!Wt||Wt[1]>=74)&&(Wt=Zc.match(/Chrome\/(\d+)/),Wt&&(ba=+Wt[1])));var Qc=ba,eb=Qc,gN=Xe,yN=Ye,bN=yN.String,xr=!!Object.getOwnPropertySymbols&&!gN(function(){var e=Symbol("symbol detection");return!bN(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&eb&&eb<41}),wN=xr,tb=wN&&!Symbol.sham&&typeof Symbol.iterator=="symbol",SN=nn,xN=ut,EN=hn,kN=tb,CN=Object,Po=kN?function(e){return typeof e=="symbol"}:function(e){var t=SN("Symbol");return xN(t)&&EN(t.prototype,CN(e))},$N=String,wa=function(e){try{return $N(e)}catch{return"Object"}},TN=ut,ON=wa,IN=TypeError,Sa=function(e){if(TN(e))return e;throw new IN(ON(e)+" is not a function")},PN=Sa,AN=Gc,eu=function(e,t){var n=e[t];return AN(n)?void 0:PN(n)},tu=en,nu=ut,ru=zt,_N=TypeError,DN=function(e,t){var n,r;if(t==="string"&&nu(n=e.toString)&&!ru(r=tu(n,e))||nu(n=e.valueOf)&&!ru(r=tu(n,e))||t!=="string"&&nu(n=e.toString)&&!ru(r=tu(n,e)))return r;throw new _N("Can't convert object to primitive value")},nb={exports:{}},rb=Ye,MN=Object.defineProperty,NN=function(e,t){try{MN(rb,e,{value:t,configurable:!0,writable:!0})}catch{rb[e]=t}return t},LN=Ye,RN=NN,ob="__core-js_shared__",ib=nb.exports=LN[ob]||RN(ob,{});(ib.versions||(ib.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 ou=nb.exports,ab=ou,Er=function(e,t){return ab[e]||(ab[e]=t||{})},FN=ya,jN=Object,vn=function(e){return jN(FN(e))},BN=Ve,zN=vn,WN=BN({}.hasOwnProperty),$t=Object.hasOwn||function(t,n){return WN(zN(t),n)},UN=Ve,HN=0,VN=Math.random(),qN=UN(1 .toString),iu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+qN(++HN+VN,36)},KN=Ye,GN=Er,sb=$t,YN=iu,XN=xr,JN=tb,kr=KN.Symbol,au=GN("wks"),ZN=JN?kr.for||kr:kr&&kr.withoutSetter||YN,Ze=function(e){return sb(au,e)||(au[e]=XN&&sb(kr,e)?kr[e]:ZN("Symbol."+e)),au[e]},QN=en,lb=zt,cb=Po,eL=eu,tL=DN,nL=Ze,rL=TypeError,oL=nL("toPrimitive"),iL=function(e,t){if(!lb(e)||cb(e))return e;var n=eL(e,oL),r;if(n){if(t===void 0&&(t="default"),r=QN(n,e,t),!lb(r)||cb(r))return r;throw new rL("Can't convert object to primitive value")}return t===void 0&&(t="number"),tL(e,t)},aL=iL,sL=Po,su=function(e){var t=aL(e,"string");return sL(t)?t:t+""},lL=Ye,ub=zt,lu=lL.document,cL=ub(lu)&&ub(lu.createElement),fb=function(e){return cL?lu.createElement(e):{}},uL=gt,fL=Xe,dL=fb,db=!uL&&!fL(function(){return Object.defineProperty(dL("div"),"a",{get:function(){return 7}}).a!==7}),pL=gt,hL=en,vL=qc,mL=Io,gL=tn,yL=su,bL=$t,wL=db,pb=Object.getOwnPropertyDescriptor;Oo.f=pL?pb:function(t,n){if(t=gL(t),n=yL(n),wL)try{return pb(t,n)}catch{}if(bL(t,n))return mL(!hL(vL.f,t,n),t[n])};var SL=Xe,xL=ut,EL=/#|\.prototype\./,Ao=function(e,t){var n=CL[kL(e)];return n===TL?!0:n===$L?!1:xL(t)?SL(t):!!t},kL=Ao.normalize=function(e){return String(e).replace(EL,".").toLowerCase()},CL=Ao.data={},$L=Ao.NATIVE="N",TL=Ao.POLYFILL="P",OL=Ao,hb=Hc,IL=Sa,PL=ma,AL=hb(hb.bind),cu=function(e,t){return IL(e),t===void 0?e:PL?AL(e,t):function(){return e.apply(t,arguments)}},Ut={},_L=gt,DL=Xe,vb=_L&&DL(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),ML=zt,NL=String,LL=TypeError,In=function(e){if(ML(e))return e;throw new LL(NL(e)+" is not an object")},RL=gt,FL=db,jL=vb,xa=In,mb=su,BL=TypeError,uu=Object.defineProperty,zL=Object.getOwnPropertyDescriptor,fu="enumerable",du="configurable",pu="writable";Ut.f=RL?jL?function(t,n,r){if(xa(t),n=mb(n),xa(r),typeof t=="function"&&n==="prototype"&&"value"in r&&pu in r&&!r[pu]){var o=zL(t,n);o&&o[pu]&&(t[n]=r.value,r={configurable:du in r?r[du]:o[du],enumerable:fu in r?r[fu]:o[fu],writable:!1})}return uu(t,n,r)}:uu:function(t,n,r){if(xa(t),n=mb(n),xa(r),FL)try{return uu(t,n,r)}catch{}if("get"in r||"set"in r)throw new BL("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var WL=gt,UL=Ut,HL=Io,Ea=WL?function(e,t,n){return UL.f(e,t,HL(1,n))}:function(e,t,n){return e[t]=n,e},_o=Ye,VL=Wc,qL=Hc,KL=ut,GL=Oo.f,YL=OL,Cr=it,XL=cu,$r=Ea,gb=$t,JL=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 VL(e,this,arguments)};return t.prototype=e.prototype,t},Ae=function(e,t){var n=e.target,r=e.global,o=e.stat,i=e.proto,a=r?_o:o?_o[n]:_o[n]&&_o[n].prototype,s=r?Cr:Cr[n]||$r(Cr,n,{})[n],l=s.prototype,c,u,f,p,d,v,h,g,m;for(p in t)c=YL(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&gb(a,p),v=s[p],u&&(e.dontCallGetSet?(m=GL(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=XL(d,_o):e.wrap&&u?g=JL(d):i&&KL(d)?g=qL(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&$r(g,"sham",!0),$r(s,p,g),i&&(f=n+"Prototype",gb(Cr,f)||$r(Cr,f,{}),$r(Cr[f],p,d),e.real&&l&&(c||!l[p])&&$r(l,p,d)))},ZL=Gn,Tr=Array.isArray||function(t){return ZL(t)==="Array"},QL=Ae,eR=Tr;QL({target:"Array",stat:!0},{isArray:eR});var tR=it,nR=tR.Array.isArray,rR=nR,yb=rR,oR=yb,iR=oR,aR=iR,sR=aR,lR=sR;const bb=be(lR);function cR(e){if(bb(e))return e}var uR=Math.ceil,fR=Math.floor,dR=Math.trunc||function(t){var n=+t;return(n>0?fR:uR)(n)},pR=dR,ka=function(e){var t=+e;return t!==t||t===0?0:pR(t)},hR=ka,vR=Math.min,mR=function(e){var t=hR(e);return t>0?vR(t,9007199254740991):0},gR=mR,Yn=function(e){return gR(e.length)},yR=TypeError,bR=9007199254740991,hu=function(e){if(e>bR)throw yR("Maximum allowed index exceeded");return e},wR=gt,SR=Ut,xR=Io,Do=function(e,t,n){wR?SR.f(e,t,xR(0,n)):e[t]=n},ER=Ze,kR=ER("toStringTag"),wb={};wb[kR]="z";var vu=String(wb)==="[object z]",CR=vu,$R=ut,Ca=Gn,TR=Ze,OR=TR("toStringTag"),IR=Object,PR=Ca(function(){return arguments}())==="Arguments",AR=function(e,t){try{return e[t]}catch{}},Mo=CR?Ca:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=AR(t=IR(e),OR))=="string"?n:PR?Ca(t):(r=Ca(t))==="Object"&&$R(t.callee)?"Arguments":r},_R=Ve,DR=ut,mu=ou,MR=_R(Function.toString);DR(mu.inspectSource)||(mu.inspectSource=function(e){return MR(e)});var NR=mu.inspectSource,LR=Ve,RR=Xe,Sb=ut,FR=Mo,jR=nn,BR=NR,xb=function(){},Eb=jR("Reflect","construct"),gu=/^\s*(?:class|function)\b/,zR=LR(gu.exec),WR=!gu.test(xb),No=function(t){if(!Sb(t))return!1;try{return Eb(xb,[],t),!0}catch{return!1}},kb=function(t){if(!Sb(t))return!1;switch(FR(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return WR||!!zR(gu,BR(t))}catch{return!0}};kb.sham=!0;var yu=!Eb||RR(function(){var e;return No(No.call)||!No(Object)||!No(function(){e=!0})||e})?kb:No,Cb=Tr,UR=yu,HR=zt,VR=Ze,qR=VR("species"),$b=Array,KR=function(e){var t;return Cb(e)&&(t=e.constructor,UR(t)&&(t===$b||Cb(t.prototype))?t=void 0:HR(t)&&(t=t[qR],t===null&&(t=void 0))),t===void 0?$b:t},GR=KR,bu=function(e,t){return new(GR(e))(t===0?0:t)},YR=Xe,XR=Ze,JR=Qc,ZR=XR("species"),$a=function(e){return JR>=51||!YR(function(){var t=[],n=t.constructor={};return n[ZR]=function(){return{foo:1}},t[e](Boolean).foo!==1})},QR=Ae,eF=Xe,tF=Tr,nF=zt,rF=vn,oF=Yn,Tb=hu,Ob=Do,iF=bu,aF=$a,sF=Ze,lF=Qc,Ib=sF("isConcatSpreadable"),cF=lF>=51||!eF(function(){var e=[];return e[Ib]=!1,e.concat()[0]!==e}),uF=function(e){if(!nF(e))return!1;var t=e[Ib];return t!==void 0?!!t:tF(e)},fF=!cF||!aF("concat");QR({target:"Array",proto:!0,arity:1,forced:fF},{concat:function(t){var n=rF(this),r=iF(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],uF(c))for(l=oF(c),Tb(o+l),a=0;a<l;a++,o++)a in c&&Ob(r,o,c[a]);else Tb(o+1),Ob(r,o++,c);return r.length=o,r}});var dF=Mo,pF=String,Lo=function(e){if(dF(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return pF(e)},Ta={},hF=ka,vF=Math.max,mF=Math.min,wu=function(e,t){var n=hF(e);return n<0?vF(n+t,0):mF(n,t)},gF=tn,yF=wu,bF=Yn,Pb=function(e){return function(t,n,r){var o=gF(t),i=bF(o);if(i===0)return!e&&-1;var a=yF(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}},Ab={includes:Pb(!0),indexOf:Pb(!1)},Oa={},wF=Ve,Su=$t,SF=tn,xF=Ab.indexOf,EF=Oa,_b=wF([].push),Db=function(e,t){var n=SF(e),r=0,o=[],i;for(i in n)!Su(EF,i)&&Su(n,i)&&_b(o,i);for(;t.length>r;)Su(n,i=t[r++])&&(~xF(o,i)||_b(o,i));return o},xu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],kF=Db,CF=xu,Eu=Object.keys||function(t){return kF(t,CF)},$F=gt,TF=vb,OF=Ut,IF=In,PF=tn,AF=Eu;Ta.f=$F&&!TF?Object.defineProperties:function(t,n){IF(t);for(var r=PF(n),o=AF(n),i=o.length,a=0,s;i>a;)OF.f(t,s=o[a++],r[s]);return t};var _F=nn,DF=_F("document","documentElement"),MF=Er,NF=iu,Mb=MF("keys"),Ia=function(e){return Mb[e]||(Mb[e]=NF(e))},LF=In,RF=Ta,Nb=xu,FF=Oa,jF=DF,BF=fb,zF=Ia,Lb=">",Rb="<",ku="prototype",Cu="script",Fb=zF("IE_PROTO"),$u=function(){},jb=function(e){return Rb+Cu+Lb+e+Rb+"/"+Cu+Lb},Bb=function(e){e.write(jb("")),e.close();var t=e.parentWindow.Object;return e=null,t},WF=function(){var e=BF("iframe"),t="java"+Cu+":",n;return e.style.display="none",jF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(jb("document.F=Object")),n.close(),n.F},Pa,Aa=function(){try{Pa=new ActiveXObject("htmlfile")}catch{}Aa=typeof document<"u"?document.domain&&Pa?Bb(Pa):WF():Bb(Pa);for(var e=Nb.length;e--;)delete Aa[ku][Nb[e]];return Aa()};FF[Fb]=!0;var Tu=Object.create||function(t,n){var r;return t!==null?($u[ku]=LF(t),r=new $u,$u[ku]=null,r[Fb]=t):r=Aa(),n===void 0?r:RF.f(r,n)},_a={},UF=Db,HF=xu,VF=HF.concat("length","prototype");_a.f=Object.getOwnPropertyNames||function(t){return UF(t,VF)};var zb={},qF=Ve,Da=qF([].slice),KF=Gn,GF=tn,Wb=_a.f,YF=Da,Ub=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],XF=function(e){try{return Wb(e)}catch{return YF(Ub)}};zb.f=function(t){return Ub&&KF(t)==="Window"?XF(t):Wb(GF(t))};var Ma={};Ma.f=Object.getOwnPropertySymbols;var JF=Ea,Na=function(e,t,n,r){return r&&r.enumerable?e[t]=n:JF(e,t,n),e},ZF=Ut,QF=function(e,t,n){return ZF.f(e,t,n)},Ro={},ej=Ze;Ro.f=ej;var Hb=it,tj=$t,nj=Ro,rj=Ut.f,je=function(e){var t=Hb.Symbol||(Hb.Symbol={});tj(t,e)||rj(t,e,{value:nj.f(e)})},oj=en,ij=nn,aj=Ze,sj=Na,Vb=function(){var e=ij("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=aj("toPrimitive");t&&!t[r]&&sj(t,r,function(o){return oj(n,this)},{arity:1})},lj=vu,cj=Mo,uj=lj?{}.toString:function(){return"[object "+cj(this)+"]"},fj=vu,dj=Ut.f,pj=Ea,hj=$t,vj=uj,mj=Ze,qb=mj("toStringTag"),Or=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(hj(o,qb)||dj(o,qb,{configurable:!0,value:t}),r&&!fj&&pj(o,"toString",vj))},gj=Ye,yj=ut,Kb=gj.WeakMap,bj=yj(Kb)&&/native code/.test(String(Kb)),wj=bj,Gb=Ye,Sj=zt,xj=Ea,Ou=$t,Iu=ou,Ej=Ia,kj=Oa,Yb="Object already initialized",Pu=Gb.TypeError,Cj=Gb.WeakMap,La,Fo,Ra,$j=function(e){return Ra(e)?Fo(e):La(e,{})},Tj=function(e){return function(t){var n;if(!Sj(t)||(n=Fo(t)).type!==e)throw new Pu("Incompatible receiver, "+e+" required");return n}};if(wj||Iu.state){var rn=Iu.state||(Iu.state=new Cj);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,La=function(e,t){if(rn.has(e))throw new Pu(Yb);return t.facade=e,rn.set(e,t),t},Fo=function(e){return rn.get(e)||{}},Ra=function(e){return rn.has(e)}}else{var Ir=Ej("state");kj[Ir]=!0,La=function(e,t){if(Ou(e,Ir))throw new Pu(Yb);return t.facade=e,xj(e,Ir,t),t},Fo=function(e){return Ou(e,Ir)?e[Ir]:{}},Ra=function(e){return Ou(e,Ir)}}var Au={set:La,get:Fo,has:Ra,enforce:$j,getterFor:Tj},Oj=cu,Ij=Ve,Pj=Vy,Aj=vn,_j=Yn,Dj=bu,Xb=Ij([].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=Aj(l),d=Pj(p),v=_j(d),h=Oj(c,u),g=0,m=f||Dj,b=t?m(l,v):n||a?m(l,0):void 0,w,$;v>g;g++)if((s||g in d)&&(w=d[g],$=h(w,g,p),e))if(t)b[g]=$;else if($)switch(e){case 3:return!0;case 5:return w;case 6:return g;case 2:Xb(b,w)}else switch(e){case 4:return!1;case 7:Xb(b,w)}return i?-1:r||o?o:b}},_u={forEach:Pn(0),map:Pn(1),filter:Pn(2),some:Pn(3),every:Pn(4),find:Pn(5),findIndex:Pn(6),filterReject:Pn(7)},Fa=Ae,jo=Ye,Du=en,Mj=Ve,Pr=gt,Ar=xr,Nj=Xe,Qe=$t,Lj=hn,Mu=In,ja=tn,Nu=su,Rj=Lo,Lu=Io,_r=Tu,Jb=Eu,Fj=_a,Zb=zb,jj=Ma,Qb=Oo,ew=Ut,Bj=Ta,tw=qc,nw=Na,zj=QF,Ru=Er,Wj=Ia,rw=Oa,ow=iu,Uj=Ze,Hj=Ro,Vj=je,qj=Vb,Kj=Or,iw=Au,Ba=_u.forEach,yt=Wj("hidden"),za="Symbol",Bo="prototype",Gj=iw.set,aw=iw.getterFor(za),Ht=Object[Bo],Xn=jo.Symbol,zo=Xn&&Xn[Bo],Yj=jo.RangeError,Xj=jo.TypeError,Fu=jo.QObject,sw=Qb.f,Jn=ew.f,lw=Zb.f,Jj=tw.f,cw=Mj([].push),mn=Ru("symbols"),Wo=Ru("op-symbols"),Zj=Ru("wks"),ju=!Fu||!Fu[Bo]||!Fu[Bo].findChild,uw=function(e,t,n){var r=sw(Ht,t);r&&delete Ht[t],Jn(e,t,n),r&&e!==Ht&&Jn(Ht,t,r)},Bu=Pr&&Nj(function(){return _r(Jn({},"a",{get:function(){return Jn(this,"a",{value:7}).a}})).a!==7})?uw:Jn,zu=function(e,t){var n=mn[e]=_r(zo);return Gj(n,{type:za,tag:e,description:t}),Pr||(n.description=t),n},Wa=function(t,n,r){t===Ht&&Wa(Wo,n,r),Mu(t);var o=Nu(n);return Mu(r),Qe(mn,o)?(r.enumerable?(Qe(t,yt)&&t[yt][o]&&(t[yt][o]=!1),r=_r(r,{enumerable:Lu(0,!1)})):(Qe(t,yt)||Jn(t,yt,Lu(1,_r(null))),t[yt][o]=!0),Bu(t,o,r)):Jn(t,o,r)},Wu=function(t,n){Mu(t);var r=ja(n),o=Jb(r).concat(hw(r));return Ba(o,function(i){(!Pr||Du(fw,r,i))&&Wa(t,i,r[i])}),t},Qj=function(t,n){return n===void 0?_r(t):Wu(_r(t),n)},fw=function(t){var n=Nu(t),r=Du(Jj,this,n);return this===Ht&&Qe(mn,n)&&!Qe(Wo,n)?!1:r||!Qe(this,n)||!Qe(mn,n)||Qe(this,yt)&&this[yt][n]?r:!0},dw=function(t,n){var r=ja(t),o=Nu(n);if(!(r===Ht&&Qe(mn,o)&&!Qe(Wo,o))){var i=sw(r,o);return i&&Qe(mn,o)&&!(Qe(r,yt)&&r[yt][o])&&(i.enumerable=!0),i}},pw=function(t){var n=lw(ja(t)),r=[];return Ba(n,function(o){!Qe(mn,o)&&!Qe(rw,o)&&cw(r,o)}),r},hw=function(e){var t=e===Ht,n=lw(t?Wo:ja(e)),r=[];return Ba(n,function(o){Qe(mn,o)&&(!t||Qe(Ht,o))&&cw(r,mn[o])}),r};Ar||(Xn=function(){if(Lj(zo,this))throw new Xj("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:Rj(arguments[0]),n=ow(t),r=function(o){var i=this===void 0?jo:this;i===Ht&&Du(r,Wo,o),Qe(i,yt)&&Qe(i[yt],n)&&(i[yt][n]=!1);var a=Lu(1,o);try{Bu(i,n,a)}catch(s){if(!(s instanceof Yj))throw s;uw(i,n,a)}};return Pr&&ju&&Bu(Ht,n,{configurable:!0,set:r}),zu(n,t)},zo=Xn[Bo],nw(zo,"toString",function(){return aw(this).tag}),nw(Xn,"withoutSetter",function(e){return zu(ow(e),e)}),tw.f=fw,ew.f=Wa,Bj.f=Wu,Qb.f=dw,Fj.f=Zb.f=pw,jj.f=hw,Hj.f=function(e){return zu(Uj(e),e)},Pr&&zj(zo,"description",{configurable:!0,get:function(){return aw(this).description}})),Fa({global:!0,constructor:!0,wrap:!0,forced:!Ar,sham:!Ar},{Symbol:Xn}),Ba(Jb(Zj),function(e){Vj(e)}),Fa({target:za,stat:!0,forced:!Ar},{useSetter:function(){ju=!0},useSimple:function(){ju=!1}}),Fa({target:"Object",stat:!0,forced:!Ar,sham:!Pr},{create:Qj,defineProperty:Wa,defineProperties:Wu,getOwnPropertyDescriptor:dw}),Fa({target:"Object",stat:!0,forced:!Ar},{getOwnPropertyNames:pw}),qj(),Kj(Xn,za),rw[yt]=!0;var eB=xr,vw=eB&&!!Symbol.for&&!!Symbol.keyFor,tB=Ae,nB=nn,rB=$t,oB=Lo,mw=Er,iB=vw,Uu=mw("string-to-symbol-registry"),aB=mw("symbol-to-string-registry");tB({target:"Symbol",stat:!0,forced:!iB},{for:function(e){var t=oB(e);if(rB(Uu,t))return Uu[t];var n=nB("Symbol")(t);return Uu[t]=n,aB[n]=t,n}});var sB=Ae,lB=$t,cB=Po,uB=wa,fB=Er,dB=vw,gw=fB("symbol-to-string-registry");sB({target:"Symbol",stat:!0,forced:!dB},{keyFor:function(t){if(!cB(t))throw new TypeError(uB(t)+" is not a symbol");if(lB(gw,t))return gw[t]}});var pB=Ve,yw=Tr,hB=ut,bw=Gn,vB=Lo,ww=pB([].push),mB=function(e){if(hB(e))return e;if(yw(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?ww(n,o):(typeof o=="number"||bw(o)==="Number"||bw(o)==="String")&&ww(n,vB(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(yw(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},gB=Ae,Sw=nn,xw=Wc,yB=en,Uo=Ve,Ew=Xe,kw=ut,Cw=Po,$w=Da,bB=mB,wB=xr,SB=String,An=Sw("JSON","stringify"),Ua=Uo(/./.exec),Tw=Uo("".charAt),xB=Uo("".charCodeAt),EB=Uo("".replace),kB=Uo(1 .toString),CB=/[\uD800-\uDFFF]/g,Ow=/^[\uD800-\uDBFF]$/,Iw=/^[\uDC00-\uDFFF]$/,Pw=!wB||Ew(function(){var e=Sw("Symbol")("stringify detection");return An([e])!=="[null]"||An({a:e})!=="{}"||An(Object(e))!=="{}"}),Aw=Ew(function(){return An("\uDF06\uD834")!=='"\\udf06\\ud834"'||An("\uDEAD")!=='"\\udead"'}),$B=function(e,t){var n=$w(arguments),r=bB(t);if(!(!kw(r)&&(e===void 0||Cw(e))))return n[1]=function(o,i){if(kw(r)&&(i=yB(r,this,SB(o),i)),!Cw(i))return i},xw(An,null,n)},TB=function(e,t,n){var r=Tw(n,t-1),o=Tw(n,t+1);return Ua(Ow,e)&&!Ua(Iw,o)||Ua(Iw,e)&&!Ua(Ow,r)?"\\u"+kB(xB(e,0),16):e};An&&gB({target:"JSON",stat:!0,arity:3,forced:Pw||Aw},{stringify:function(t,n,r){var o=$w(arguments),i=xw(Pw?$B:An,null,o);return Aw&&typeof i=="string"?EB(i,CB,TB):i}});var OB=Ae,IB=xr,PB=Xe,_w=Ma,AB=vn,_B=!IB||PB(function(){_w.f(1)});OB({target:"Object",stat:!0,forced:_B},{getOwnPropertySymbols:function(t){var n=_w.f;return n?n(AB(t)):[]}});var DB=je;DB("asyncIterator");var MB=je;MB("hasInstance");var NB=je;NB("isConcatSpreadable");var LB=je;LB("iterator");var RB=je;RB("match");var FB=je;FB("matchAll");var jB=je;jB("replace");var BB=je;BB("search");var zB=je;zB("species");var WB=je;WB("split");var UB=je,HB=Vb;UB("toPrimitive"),HB();var VB=nn,qB=je,KB=Or;qB("toStringTag"),KB(VB("Symbol"),"Symbol");var GB=je;GB("unscopables");var YB=Ye,XB=Or;XB(YB.JSON,"JSON",!0);var JB=it,ZB=JB.Symbol,Dr={},Hu=gt,QB=$t,Dw=Function.prototype,e3=Hu&&Object.getOwnPropertyDescriptor,Vu=QB(Dw,"name"),t3=Vu&&(function(){}).name==="something",n3=Vu&&(!Hu||Hu&&e3(Dw,"name").configurable),r3={EXISTS:Vu,PROPER:t3,CONFIGURABLE:n3},o3=Xe,i3=!o3(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),a3=$t,s3=ut,l3=vn,c3=Ia,u3=i3,Mw=c3("IE_PROTO"),qu=Object,f3=qu.prototype,Nw=u3?qu.getPrototypeOf:function(e){var t=l3(e);if(a3(t,Mw))return t[Mw];var n=t.constructor;return s3(n)&&t instanceof n?n.prototype:t instanceof qu?f3:null},d3=Xe,p3=ut,h3=zt,v3=Tu,Lw=Nw,m3=Na,g3=Ze,Ku=g3("iterator"),Rw=!1,gn,Gu,Yu;[].keys&&(Yu=[].keys(),"next"in Yu?(Gu=Lw(Lw(Yu)),Gu!==Object.prototype&&(gn=Gu)):Rw=!0);var y3=!h3(gn)||d3(function(){var e={};return gn[Ku].call(e)!==e});y3?gn={}:gn=v3(gn),p3(gn[Ku])||m3(gn,Ku,function(){return this});var Fw={IteratorPrototype:gn,BUGGY_SAFARI_ITERATORS:Rw},b3=Fw.IteratorPrototype,w3=Tu,S3=Io,x3=Or,E3=Dr,k3=function(){return this},C3=function(e,t,n,r){var o=t+" Iterator";return e.prototype=w3(b3,{next:S3(+!r,n)}),x3(e,o,!1,!0),E3[o]=k3,e},$3=Ve,T3=Sa,O3=function(e,t,n){try{return $3(T3(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},I3=zt,P3=function(e){return I3(e)||e===null},A3=P3,_3=String,D3=TypeError,M3=function(e){if(A3(e))return e;throw new D3("Can't set "+_3(e)+" as a prototype")},N3=O3,L3=zt,R3=ya,F3=M3;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=N3(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(o,i){return R3(o),F3(i),L3(o)&&(e?n(o,i):o.__proto__=i),o}}();var j3=Ae,B3=en,jw=r3,z3=C3,W3=Nw,U3=Or,Bw=Na,H3=Ze,zw=Dr,Ww=Fw,V3=jw.PROPER;jw.CONFIGURABLE,Ww.IteratorPrototype;var Ha=Ww.BUGGY_SAFARI_ITERATORS,Xu=H3("iterator"),Uw="keys",Va="values",Hw="entries",q3=function(){return this},Vw=function(e,t,n,r,o,i,a){z3(n,t,r);var s=function(m){if(m===o&&p)return p;if(!Ha&&m&&m in u)return u[m];switch(m){case Uw:return function(){return new n(this,m)};case Va:return function(){return new n(this,m)};case Hw:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[Xu]||u["@@iterator"]||o&&u[o],p=!Ha&&f||s(o),d=t==="Array"&&u.entries||f,v,h,g;if(d&&(v=W3(d.call(new e)),v!==Object.prototype&&v.next&&(U3(v,l,!0,!0),zw[l]=q3)),V3&&o===Va&&f&&f.name!==Va&&(c=!0,p=function(){return B3(f,this)}),o)if(h={values:s(Va),keys:i?p:s(Uw),entries:s(Hw)},a)for(g in h)(Ha||c||!(g in u))&&Bw(u,g,h[g]);else j3({target:t,proto:!0,forced:Ha||c},h);return a&&u[Xu]!==p&&Bw(u,Xu,p,{name:o}),zw[t]=p,h},qw=function(e,t){return{value:e,done:t}},K3=tn,Kw=Dr,Gw=Au;Ut.f;var G3=Vw,qa=qw,Yw="Array Iterator",Y3=Gw.set,X3=Gw.getterFor(Yw);G3(Array,"Array",function(e,t){Y3(this,{type:Yw,target:K3(e),index:0,kind:t})},function(){var e=X3(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,qa(void 0,!0);switch(e.kind){case"keys":return qa(n,!1);case"values":return qa(t[n],!1)}return qa([n,t[n]],!1)},"values"),Kw.Arguments=Kw.Array;var J3={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},Z3=J3,Q3=Ye,e4=Or,Xw=Dr;for(var Ju in Z3)e4(Q3[Ju],Ju),Xw[Ju]=Xw.Array;var t4=ZB,n4=t4,r4=Ze,o4=Ut.f,Jw=r4("metadata"),Zw=Function.prototype;Zw[Jw]===void 0&&o4(Zw,Jw,{value:null});var i4=je;i4("asyncDispose");var a4=je;a4("dispose");var s4=je;s4("metadata");var l4=n4,c4=l4,u4=nn,f4=Ve,Zu=u4("Symbol"),d4=Zu.keyFor,p4=f4(Zu.prototype.valueOf),Qw=Zu.isRegisteredSymbol||function(t){try{return d4(p4(t))!==void 0}catch{return!1}},h4=Ae,v4=Qw;h4({target:"Symbol",stat:!0},{isRegisteredSymbol:v4});for(var m4=Er,e1=nn,g4=Ve,y4=Po,b4=Ze,Ka=e1("Symbol"),t1=Ka.isWellKnownSymbol,n1=e1("Object","getOwnPropertyNames"),w4=g4(Ka.prototype.valueOf),r1=m4("wks"),Qu=0,o1=n1(Ka),S4=o1.length;Qu<S4;Qu++)try{var i1=o1[Qu];y4(Ka[i1])&&b4(i1)}catch{}var a1=function(t){if(t1&&t1(t))return!0;try{for(var n=w4(t),r=0,o=n1(r1),i=o.length;r<i;r++)if(r1[o[r]]==n)return!0}catch{}return!1},x4=Ae,E4=a1;x4({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:E4});var k4=je;k4("customMatcher");var C4=je;C4("observable");var $4=Ae,T4=Qw;$4({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:T4});var O4=Ae,I4=a1;O4({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:I4});var P4=je;P4("matcher");var A4=je;A4("metadataKey");var _4=je;_4("patternMatch");var D4=je;D4("replaceAll");var M4=c4,N4=M4,L4=N4;const Mr=be(L4);var ef=Ve,R4=ka,F4=Lo,j4=ya,B4=ef("".charAt),s1=ef("".charCodeAt),z4=ef("".slice),l1=function(e){return function(t,n){var r=F4(j4(t)),o=R4(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=s1(r,o),a<55296||a>56319||o+1===i||(s=s1(r,o+1))<56320||s>57343?e?B4(r,o):a:e?z4(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},W4={codeAt:l1(!1),charAt:l1(!0)},U4=W4.charAt,H4=Lo,c1=Au,V4=Vw,u1=qw,f1="String Iterator",q4=c1.set,K4=c1.getterFor(f1);V4(String,"String",function(e){q4(this,{type:f1,string:H4(e),index:0})},function(){var t=K4(this),n=t.string,r=t.index,o;return r>=n.length?u1(void 0,!0):(o=U4(n,r),t.index+=o.length,u1(o,!1))});var G4=Mo,d1=eu,Y4=Gc,X4=Dr,J4=Ze,Z4=J4("iterator"),tf=function(e){if(!Y4(e))return d1(e,Z4)||d1(e,"@@iterator")||X4[G4(e)]},Q4=tf,ez=Q4,tz=ez,nz=tz,rz=nz,oz=rz,iz=oz,az=iz,sz=az;const p1=be(sz);var lz=gt,cz=Tr,uz=TypeError,fz=Object.getOwnPropertyDescriptor,dz=lz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),h1=dz?function(e,t){if(cz(e)&&!fz(e,"length").writable)throw new uz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},pz=Ae,hz=vn,vz=Yn,mz=h1,gz=hu,yz=Xe,bz=yz(function(){return[].push.call({length:4294967296},1)!==4294967297}),wz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Sz=bz||!wz();pz({target:"Array",proto:!0,arity:1,forced:Sz},{push:function(t){var n=hz(this),r=vz(n),o=arguments.length;gz(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return mz(n,r),r}});var xz=Ye,Ez=it,Zn=function(e,t){var n=Ez[e+"Prototype"],r=n&&n[t];if(r)return r;var o=xz[e],i=o&&o.prototype;return i&&i[t]},kz=Zn,Cz=kz("Array","push"),$z=hn,Tz=Cz,nf=Array.prototype,Oz=function(e){var t=e.push;return e===nf||$z(nf,e)&&t===nf.push?Tz:t},Iz=Oz,Pz=Iz,Az=Pz,_z=Az,Dz=_z,Mz=Dz,Nz=Mz;const Lz=be(Nz);function Rz(e,t){var n=e==null?null:typeof Mr<"u"&&p1(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)&&(Lz(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 Fz=Ae,v1=Tr,jz=yu,Bz=zt,m1=wu,zz=Yn,Wz=tn,Uz=Do,Hz=Ze,Vz=$a,qz=Da,Kz=Vz("slice"),Gz=Hz("species"),rf=Array,Yz=Math.max;Fz({target:"Array",proto:!0,forced:!Kz},{slice:function(t,n){var r=Wz(this),o=zz(r),i=m1(t,o),a=m1(n===void 0?o:n,o),s,l,c;if(v1(r)&&(s=r.constructor,jz(s)&&(s===rf||v1(s.prototype))?s=void 0:Bz(s)&&(s=s[Gz],s===null&&(s=void 0)),s===rf||s===void 0))return qz(r,i,a);for(l=new(s===void 0?rf:s)(Yz(a-i,0)),c=0;i<a;i++,c++)i in r&&Uz(l,c,r[i]);return l.length=c,l}});var Xz=Zn,Jz=Xz("Array","slice"),Zz=hn,Qz=Jz,of=Array.prototype,e5=function(e){var t=e.slice;return e===of||Zz(of,e)&&t===of.slice?Qz:t},t5=e5,n5=t5,r5=n5,o5=r5,i5=o5,a5=i5,s5=a5;const l5=be(s5);var c5=en,g1=In,u5=eu,f5=function(e,t,n){var r,o;g1(e);try{if(r=u5(e,"return"),!r){if(t==="throw")throw n;return n}r=c5(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return g1(r),n},d5=In,p5=f5,h5=function(e,t,n,r){try{return r?t(d5(n)[0],n[1]):t(n)}catch(o){p5(e,"throw",o)}},v5=Ze,m5=Dr,g5=v5("iterator"),y5=Array.prototype,b5=function(e){return e!==void 0&&(m5.Array===e||y5[g5]===e)},w5=en,S5=Sa,x5=In,E5=wa,k5=tf,C5=TypeError,$5=function(e,t){var n=arguments.length<2?k5(e):t;if(S5(n))return x5(w5(n,e));throw new C5(E5(e)+" is not iterable")},T5=cu,O5=en,I5=vn,P5=h5,A5=b5,_5=yu,D5=Yn,y1=Do,M5=$5,N5=tf,b1=Array,L5=function(t){var n=I5(t),r=_5(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=T5(i,o>2?arguments[2]:void 0));var s=N5(n),l=0,c,u,f,p,d,v;if(s&&!(this===b1&&A5(s)))for(u=r?new this:[],p=M5(n,s),d=p.next;!(f=O5(d,p)).done;l++)v=a?P5(p,i,[f.value,l],!0):f.value,y1(u,l,v);else for(c=D5(n),u=r?new this(c):b1(c);c>l;l++)v=a?i(n[l],l):n[l],y1(u,l,v);return u.length=l,u},R5=Ze,w1=R5("iterator"),S1=!1;try{var F5=0,x1={next:function(){return{done:!!F5++}},return:function(){S1=!0}};x1[w1]=function(){return this},Array.from(x1,function(){throw 2})}catch{}var j5=function(e,t){try{if(!t&&!S1)return!1}catch{return!1}var n=!1;try{var r={};r[w1]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},B5=Ae,z5=L5,W5=j5,U5=!W5(function(e){Array.from(e)});B5({target:"Array",stat:!0,forced:U5},{from:z5});var H5=it,V5=H5.Array.from,q5=V5,K5=q5,G5=K5,Y5=G5,X5=Y5,J5=X5,Z5=J5;const E1=be(Z5);function af(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 k1(e,t){if(e){var n;if(typeof e=="string")return af(e,t);var r=l5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?E1(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?af(e,t):void 0}}function Q5(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
276
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function on(e,t){return
|
|
275
|
+
*/var kc,ty;function ny(){if(ty)return kc;ty=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(i){if(i==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(i)}function o(){try{if(!Object.assign)return!1;var i=new String("abc");if(i[5]="de",Object.getOwnPropertyNames(i)[0]==="5")return!1;for(var a={},s=0;s<10;s++)a["_"+String.fromCharCode(s)]=s;var l=Object.getOwnPropertyNames(a).map(function(u){return a[u]});if(l.join("")!=="0123456789")return!1;var c={};return"abcdefghijklmnopqrst".split("").forEach(function(u){c[u]=u}),Object.keys(Object.assign({},c)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return kc=o()?Object.assign:function(i,a){for(var s,l=r(i),c,u=1;u<arguments.length;u++){s=Object(arguments[u]);for(var f in s)t.call(s,f)&&(l[f]=s[f]);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},kc}var Ac,ry;function $c(){if(ry)return Ac;ry=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return Ac=e,Ac}var Tc,oy;function iy(){return oy||(oy=1,Tc=Function.call.bind(Object.prototype.hasOwnProperty)),Tc}var Oc,ay;function DM(){if(ay)return Oc;ay=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=$c(),n={},r=iy();e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Oc=o,Oc}var Ic,sy;function _M(){if(sy)return Ic;sy=1;var e=ua(),t=ny(),n=$c(),r=iy(),o=DM(),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return Ic=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(y){var P=y&&(c&&y[c]||y[u]);if(typeof P=="function")return P}var p="<<anonymous>>",d={array:m("array"),bigint:m("bigint"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:E,node:T(),objectOf:R,oneOf:$,oneOfType:K,shape:U,exact:B};function v(y,P){return y===P?y!==0||1/y===1/P:y!==y&&P!==P}function h(y,P){this.message=y,this.data=P&&typeof P=="object"?P:{},this.stack=""}h.prototype=Error.prototype;function g(y){if(process.env.NODE_ENV!=="production")var P={},N=0;function S(Y,G,Q,X,ee,Z,_){if(X=X||p,Z=Z||Q,_!==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 J=X+":"+Q;!P[J]&&N<3&&(i("You are manually calling a React.PropTypes validation function for the `"+Z+"` prop on `"+X+"`. 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."),P[J]=!0,N++)}}return G[Q]==null?Y?G[Q]===null?new h("The "+ee+" `"+Z+"` is marked as required "+("in `"+X+"`, but its value is `null`.")):new h("The "+ee+" `"+Z+"` is marked as required in "+("`"+X+"`, but its value is `undefined`.")):null:y(G,Q,X,ee,Z)}var V=S.bind(null,!1);return V.isRequired=S.bind(null,!0),V}function m(y){function P(N,S,V,Y,G,Q){var X=N[S],ee=L(X);if(ee!==y){var Z=q(X);return new h("Invalid "+Y+" `"+G+"` of type "+("`"+Z+"` supplied to `"+V+"`, expected ")+("`"+y+"`."),{expectedType:y})}return null}return g(P)}function b(){return g(a)}function w(y){function P(N,S,V,Y,G){if(typeof y!="function")return new h("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside arrayOf.");var Q=N[S];if(!Array.isArray(Q)){var X=L(Q);return new h("Invalid "+Y+" `"+G+"` of type "+("`"+X+"` supplied to `"+V+"`, expected an array."))}for(var ee=0;ee<Q.length;ee++){var Z=y(Q,ee,V,Y,G+"["+ee+"]",n);if(Z instanceof Error)return Z}return null}return g(P)}function A(){function y(P,N,S,V,Y){var G=P[N];if(!s(G)){var Q=L(G);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement."))}return null}return g(y)}function x(){function y(P,N,S,V,Y){var G=P[N];if(!e.isValidElementType(G)){var Q=L(G);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected a single ReactElement type."))}return null}return g(y)}function E(y){function P(N,S,V,Y,G){if(!(N[S]instanceof y)){var Q=y.name||p,X=I(N[S]);return new h("Invalid "+Y+" `"+G+"` of type "+("`"+X+"` supplied to `"+V+"`, expected ")+("instance of `"+Q+"`."))}return null}return g(P)}function $(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function P(N,S,V,Y,G){for(var Q=N[S],X=0;X<y.length;X++)if(v(Q,y[X]))return null;var ee=JSON.stringify(y,function(_,j){var J=q(j);return J==="symbol"?String(j):j});return new h("Invalid "+Y+" `"+G+"` of value `"+String(Q)+"` "+("supplied to `"+V+"`, expected one of "+ee+"."))}return g(P)}function R(y){function P(N,S,V,Y,G){if(typeof y!="function")return new h("Property `"+G+"` of component `"+V+"` has invalid PropType notation inside objectOf.");var Q=N[S],X=L(Q);if(X!=="object")return new h("Invalid "+Y+" `"+G+"` of type "+("`"+X+"` supplied to `"+V+"`, expected an object."));for(var ee in Q)if(r(Q,ee)){var Z=y(Q,ee,V,Y,G+"."+ee,n);if(Z instanceof Error)return Z}return null}return g(P)}function K(y){if(!Array.isArray(y))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var P=0;P<y.length;P++){var N=y[P];if(typeof N!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(N)+" at index "+P+"."),a}function S(V,Y,G,Q,X){for(var ee=[],Z=0;Z<y.length;Z++){var _=y[Z],j=_(V,Y,G,Q,X,n);if(j==null)return null;j.data&&r(j.data,"expectedType")&&ee.push(j.data.expectedType)}var J=ee.length>0?", expected one of type ["+ee.join(", ")+"]":"";return new h("Invalid "+Q+" `"+X+"` supplied to "+("`"+G+"`"+J+"."))}return g(S)}function T(){function y(P,N,S,V,Y){return F(P[N])?null:new h("Invalid "+V+" `"+Y+"` supplied to "+("`"+S+"`, expected a ReactNode."))}return g(y)}function M(y,P,N,S,V){return new h((y||"React class")+": "+P+" type `"+N+"."+S+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+V+"`.")}function U(y){function P(N,S,V,Y,G){var Q=N[S],X=L(Q);if(X!=="object")return new h("Invalid "+Y+" `"+G+"` of type `"+X+"` "+("supplied to `"+V+"`, expected `object`."));for(var ee in y){var Z=y[ee];if(typeof Z!="function")return M(V,Y,G,ee,q(Z));var _=Z(Q,ee,V,Y,G+"."+ee,n);if(_)return _}return null}return g(P)}function B(y){function P(N,S,V,Y,G){var Q=N[S],X=L(Q);if(X!=="object")return new h("Invalid "+Y+" `"+G+"` of type `"+X+"` "+("supplied to `"+V+"`, expected `object`."));var ee=t({},N[S],y);for(var Z in ee){var _=y[Z];if(r(y,Z)&&typeof _!="function")return M(V,Y,G,Z,q(_));if(!_)return new h("Invalid "+Y+" `"+G+"` key `"+Z+"` supplied to `"+V+"`.\nBad object: "+JSON.stringify(N[S],null," ")+`
|
|
276
|
+
Valid keys: `+JSON.stringify(Object.keys(y),null," "));var j=_(Q,Z,V,Y,G+"."+Z,n);if(j)return j}return null}return g(P)}function F(y){switch(typeof y){case"number":case"string":case"undefined":return!0;case"boolean":return!y;case"object":if(Array.isArray(y))return y.every(F);if(y===null||s(y))return!0;var P=f(y);if(P){var N=P.call(y),S;if(P!==y.entries){for(;!(S=N.next()).done;)if(!F(S.value))return!1}else for(;!(S=N.next()).done;){var V=S.value;if(V&&!F(V[1]))return!1}}else return!1;return!0;default:return!1}}function D(y,P){return y==="symbol"?!0:P?P["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&P instanceof Symbol:!1}function L(y){var P=typeof y;return Array.isArray(y)?"array":y instanceof RegExp?"object":D(P,y)?"symbol":P}function q(y){if(typeof y>"u"||y===null)return""+y;var P=L(y);if(P==="object"){if(y instanceof Date)return"date";if(y instanceof RegExp)return"regexp"}return P}function W(y){var P=q(y);switch(P){case"array":case"object":return"an "+P;case"boolean":case"date":case"regexp":return"a "+P;default:return P}}function I(y){return!y.constructor||!y.constructor.name?p:y.constructor.name}return d.checkPropTypes=o,d.resetWarningCache=o.resetWarningCache,d.PropTypes=d,d},Ic}var Pc,ly;function MM(){if(ly)return Pc;ly=1;var e=$c();function t(){}function n(){}return n.resetWarningCache=t,Pc=function(){function r(a,s,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Pc}if(process.env.NODE_ENV!=="production"){var NM=ua(),RM=!0;Cc.exports=_M()(NM.isElement,RM)}else Cc.exports=MM()();var LM=Cc.exports;const Me=ye(LM);var FM=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 Ao(e,t){var n=BM(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 BM(e){var t=e.name,n=t&&t.lastIndexOf(".")!==-1;if(n&&!e.type){var r=t.split(".").pop().toLowerCase(),o=FM.get(r);o&&Object.defineProperty(e,"type",{value:o,writable:!1,configurable:!1,enumerable:!0})}return e}var jM=[".DS_Store","Thumbs.db"];function zM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return fa(e)&&UM(e.dataTransfer)?[2,VM(e.dataTransfer,e.type)]:WM(e)?[2,HM(e)]:Array.isArray(e)&&e.every(function(n){return"getFile"in n&&typeof n.getFile=="function"})?[2,KM(e)]:[2,[]]})})}function UM(e){return fa(e)}function WM(e){return fa(e)&&fa(e.target)}function fa(e){return typeof e=="object"&&e!==null}function HM(e){return Dc(e.target.files).map(function(t){return Ao(t)})}function KM(e){return fr(this,void 0,void 0,function(){var t;return dr(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 Ao(r)})]}})})}function VM(e,t){return fr(this,void 0,void 0,function(){var n,r;return dr(this,function(o){switch(o.label){case 0:return e.items?(n=Dc(e.items).filter(function(i){return i.kind==="file"}),t!=="drop"?[2,n]:[4,Promise.all(n.map(qM))]):[3,2];case 1:return r=o.sent(),[2,cy(uy(r))];case 2:return[2,cy(Dc(e.files).map(function(i){return Ao(i)}))]}})})}function cy(e){return e.filter(function(t){return jM.indexOf(t.name)===-1})}function Dc(e){if(e===null)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function qM(e){if(typeof e.webkitGetAsEntry!="function")return fy(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?dy(t):fy(e)}function uy(e){return e.reduce(function(t,n){return Gl(Gl([],Tm(t),!1),Tm(Array.isArray(n)?uy(n):[n]),!1)},[])}function fy(e){var t=e.getAsFile();if(!t)return Promise.reject("".concat(e," is not a File"));var n=Ao(t);return Promise.resolve(n)}function GM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,e.isDirectory?dy(e):YM(e)]})})}function dy(e){var t=e.createReader();return new Promise(function(n,r){var o=[];function i(){var a=this;t.readEntries(function(s){return fr(a,void 0,void 0,function(){var l,c,u;return dr(this,function(f){switch(f.label){case 0:if(s.length)return[3,5];f.label=1;case 1:return f.trys.push([1,3,,4]),[4,Promise.all(o)];case 2:return l=f.sent(),n(l),[3,4];case 3:return c=f.sent(),r(c),[3,4];case 4:return[3,6];case 5:u=Promise.all(s.map(GM)),o.push(u),i(),f.label=6;case 6:return[2]}})})},function(s){r(s)})}i()})}function YM(e){return fr(this,void 0,void 0,function(){return dr(this,function(t){return[2,new Promise(function(n,r){e.file(function(o){var i=Ao(o,e.fullPath);n(i)},function(o){r(o)})})]})})}var QM=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(",");if(n.length===0)return!0;var r=e.name||"",o=(e.type||"").toLowerCase(),i=o.replace(/\/.*$/,"");return n.some(function(a){var s=a.trim().toLowerCase();return s.charAt(0)==="."?r.toLowerCase().endsWith(s):s.endsWith("/*")?i===s.replace(/\/.*$/,""):o===s})}return!0};function py(e){return XM(e)||ZM(e)||gy(e)||JM()}function JM(){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 ZM(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function XM(e){if(Array.isArray(e))return _c(e)}function hy(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 vy(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hy(Object(n),!0).forEach(function(r){my(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hy(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function my(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $o(e,t){return nN(e)||tN(e,t)||gy(e,t)||eN()}function eN(){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 gy(e,t){if(e){if(typeof e=="string")return _c(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 _c(e,t)}}function _c(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 tN(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 nN(e){if(Array.isArray(e))return e}var rN="file-invalid-type",oN="file-too-large",iN="file-too-small",aN="too-many-files",sN=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:rN,message:"File type must be ".concat(n)}},yy=function(t){return{code:oN,message:"File is larger than ".concat(t," ").concat(t===1?"byte":"bytes")}},by=function(t){return{code:iN,message:"File is smaller than ".concat(t," ").concat(t===1?"byte":"bytes")}},lN={code:aN,message:"Too many files"};function wy(e,t){var n=e.type==="application/x-moz-file"||QM(e,t);return[n,n?null:sN(t)]}function Sy(e,t,n){if(qn(e.size))if(qn(t)&&qn(n)){if(e.size>n)return[!1,yy(n)];if(e.size<t)return[!1,by(t)]}else{if(qn(t)&&e.size<t)return[!1,by(t)];if(qn(n)&&e.size>n)return[!1,yy(n)]}return[!0,null]}function qn(e){return e!=null}function cN(e){var t=e.files,n=e.accept,r=e.minSize,o=e.maxSize,i=e.multiple,a=e.maxFiles,s=e.validator;return!i&&t.length>1||i&&a>=1&&t.length>a?!1:t.every(function(l){var c=wy(l,n),u=$o(c,1),f=u[0],p=Sy(l,r,o),d=$o(p,1),v=d[0],h=s?s(l):null;return f&&v&&!h})}function da(e){return typeof e.isPropagationStopped=="function"?e.isPropagationStopped():typeof e.cancelBubble<"u"?e.cancelBubble:!1}function pa(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 xy(e){e.preventDefault()}function uN(e){return e.indexOf("MSIE")!==-1||e.indexOf("Trident/")!==-1}function fN(e){return e.indexOf("Edge/")!==-1}function dN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.navigator.userAgent;return uN(e)||fN(e)}function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a<o;a++)i[a-1]=arguments[a];return t.some(function(s){return!da(r)&&s&&s.apply(void 0,[r].concat(i)),da(r)})}}function pN(){return"showOpenFilePicker"in window}function hN(e){if(qn(e)){var t=Object.entries(e).filter(function(n){var r=$o(n,2),o=r[0],i=r[1],a=!0;return Ey(o)||(console.warn('Skipped "'.concat(o,'" 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(i)||!i.every(Cy))&&(console.warn('Skipped "'.concat(o,'" because an invalid file extension was provided.')),a=!1),a}).reduce(function(n,r){var o=$o(r,2),i=o[0],a=o[1];return vy(vy({},n),{},my({},i,a))},{});return[{description:"Files",accept:t}]}return e}function vN(e){if(qn(e))return Object.entries(e).reduce(function(t,n){var r=$o(n,2),o=r[0],i=r[1];return[].concat(py(t),[o],py(i))},[]).filter(function(t){return Ey(t)||Cy(t)}).join(",")}function mN(e){return e instanceof DOMException&&(e.name==="AbortError"||e.code===e.ABORT_ERR)}function gN(e){return e instanceof DOMException&&(e.name==="SecurityError"||e.code===e.SECURITY_ERR)}function Ey(e){return e==="audio/*"||e==="video/*"||e==="image/*"||e==="text/*"||/\w+\/[-+.\w]+/g.test(e)}function Cy(e){return/^.*\.[\w]+$/.test(e)}var yN=["children"],bN=["open"],wN=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],SN=["refKey","onChange","onClick"];function xN(e){return kN(e)||CN(e)||ky(e)||EN()}function EN(){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 CN(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function kN(e){if(Array.isArray(e))return Nc(e)}function Mc(e,t){return TN(e)||$N(e,t)||ky(e,t)||AN()}function AN(){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 ky(e,t){if(e){if(typeof e=="string")return Nc(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 Nc(e,t)}}function Nc(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 Ay(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 Fe(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ay(Object(n),!0).forEach(function(r){Rc(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ay(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rc(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 Lc=O.forwardRef(function(e,t){var n=e.children,r=ha(e,yN),o=Ty(r),i=o.open,a=ha(o,bN);return O.useImperativeHandle(t,function(){return{open:i}},[i]),O.createElement(O.Fragment,null,n(Fe(Fe({},a),{},{open:i})))});Lc.displayName="Dropzone";var $y={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};Lc.defaultProps=$y,Lc.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 Fc={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,acceptedFiles:[],fileRejections:[]};function Ty(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=Fe(Fe({},$y),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,E=t.noDrag,$=t.noDragEventsBubbling,R=t.onError,K=t.validator,T=O.useMemo(function(){return vN(n)},[n]),M=O.useMemo(function(){return hN(n)},[n]),U=O.useMemo(function(){return typeof g=="function"?g:Oy},[g]),B=O.useMemo(function(){return typeof h=="function"?h:Oy},[h]),F=O.useRef(null),D=O.useRef(null),L=O.useReducer(IN,Fc),q=Mc(L,2),W=q[0],I=q[1],y=W.isFocused,P=W.isFileDialogActive,N=O.useRef(typeof window<"u"&&window.isSecureContext&&m&&pN()),S=function(){!N.current&&P&&setTimeout(function(){if(D.current){var le=D.current.files;le.length||(I({type:"closeDialog"}),B())}},300)};O.useEffect(function(){return window.addEventListener("focus",S,!1),function(){window.removeEventListener("focus",S,!1)}},[D,P,B,N]);var V=O.useRef([]),Y=function(le){F.current&&F.current.contains(le.target)||(le.preventDefault(),V.current=[])};O.useEffect(function(){return w&&(document.addEventListener("dragover",xy,!1),document.addEventListener("drop",Y,!1)),function(){w&&(document.removeEventListener("dragover",xy),document.removeEventListener("drop",Y))}},[F,w]),O.useEffect(function(){return!r&&b&&F.current&&F.current.focus(),function(){}},[F,b,r]);var G=O.useCallback(function(oe){R?R(oe):console.error(oe)},[R]),Q=O.useCallback(function(oe){oe.preventDefault(),oe.persist(),Ue(oe),V.current=[].concat(xN(V.current),[oe.target]),pa(oe)&&Promise.resolve(o(oe)).then(function(le){if(!(da(oe)&&!$)){var H=le.length,z=H>0&&cN({files:le,accept:T,minSize:a,maxSize:i,multiple:s,maxFiles:l,validator:K}),te=H>0&&!z;I({isDragAccept:z,isDragReject:te,isDragActive:!0,type:"setDraggedFiles"}),c&&c(oe)}}).catch(function(le){return G(le)})},[o,c,G,$,T,a,i,s,l,K]),X=O.useCallback(function(oe){oe.preventDefault(),oe.persist(),Ue(oe);var le=pa(oe);if(le&&oe.dataTransfer)try{oe.dataTransfer.dropEffect="copy"}catch{}return le&&f&&f(oe),!1},[f,$]),ee=O.useCallback(function(oe){oe.preventDefault(),oe.persist(),Ue(oe);var le=V.current.filter(function(z){return F.current&&F.current.contains(z)}),H=le.indexOf(oe.target);H!==-1&&le.splice(H,1),V.current=le,!(le.length>0)&&(I({type:"setDraggedFiles",isDragActive:!1,isDragAccept:!1,isDragReject:!1}),pa(oe)&&u&&u(oe))},[F,u,$]),Z=O.useCallback(function(oe,le){var H=[],z=[];oe.forEach(function(te){var ae=wy(te,T),ce=Mc(ae,2),he=ce[0],We=ce[1],He=Sy(te,a,i),mt=Mc(He,2),tt=mt[0],Ie=mt[1],nt=K?K(te):null;if(he&&tt&&!nt)H.push(te);else{var Ge=[We,Ie];nt&&(Ge=Ge.concat(nt)),z.push({file:te,errors:Ge.filter(function(Bn){return Bn})})}}),(!s&&H.length>1||s&&l>=1&&H.length>l)&&(H.forEach(function(te){z.push({file:te,errors:[lN]})}),H.splice(0)),I({acceptedFiles:H,fileRejections:z,type:"setFiles"}),p&&p(H,z,le),z.length>0&&v&&v(z,le),H.length>0&&d&&d(H,le)},[I,s,T,a,i,l,p,d,v,K]),_=O.useCallback(function(oe){oe.preventDefault(),oe.persist(),Ue(oe),V.current=[],pa(oe)&&Promise.resolve(o(oe)).then(function(le){da(oe)&&!$||Z(le,oe)}).catch(function(le){return G(le)}),I({type:"reset"})},[o,Z,G,$]),j=O.useCallback(function(){if(N.current){I({type:"openDialog"}),U();var oe={multiple:s,types:M};window.showOpenFilePicker(oe).then(function(le){return o(le)}).then(function(le){Z(le,null),I({type:"closeDialog"})}).catch(function(le){mN(le)?(B(le),I({type:"closeDialog"})):gN(le)?(N.current=!1,D.current?(D.current.value=null,D.current.click()):G(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."))):G(le)});return}D.current&&(I({type:"openDialog"}),U(),D.current.value=null,D.current.click())},[I,U,B,m,Z,G,M,s]),J=O.useCallback(function(oe){!F.current||!F.current.isEqualNode(oe.target)||(oe.key===" "||oe.key==="Enter"||oe.keyCode===32||oe.keyCode===13)&&(oe.preventDefault(),j())},[F,j]),re=O.useCallback(function(){I({type:"focus"})},[]),ue=O.useCallback(function(){I({type:"blur"})},[]),ie=O.useCallback(function(){A||(dN()?setTimeout(j,0):j())},[A,j]),de=function(le){return r?null:le},Se=function(le){return x?null:de(le)},De=function(le){return E?null:de(le)},Ue=function(le){$&&le.stopPropagation()},dt=O.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=oe.refKey,H=le===void 0?"ref":le,z=oe.role,te=oe.onKeyDown,ae=oe.onFocus,ce=oe.onBlur,he=oe.onClick,We=oe.onDragEnter,He=oe.onDragOver,mt=oe.onDragLeave,tt=oe.onDrop,Ie=ha(oe,wN);return Fe(Fe(Rc({onKeyDown:Se(Xt(te,J)),onFocus:Se(Xt(ae,re)),onBlur:Se(Xt(ce,ue)),onClick:de(Xt(he,ie)),onDragEnter:De(Xt(We,Q)),onDragOver:De(Xt(He,X)),onDragLeave:De(Xt(mt,ee)),onDrop:De(Xt(tt,_)),role:typeof z=="string"&&z!==""?z:"presentation"},H,F),!r&&!x?{tabIndex:0}:{}),Ie)}},[F,J,re,ue,ie,Q,X,ee,_,x,E,r]),Et=O.useCallback(function(oe){oe.stopPropagation()},[]),pt=O.useMemo(function(){return function(){var oe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},le=oe.refKey,H=le===void 0?"ref":le,z=oe.onChange,te=oe.onClick,ae=ha(oe,SN),ce=Rc({accept:T,multiple:s,type:"file",style:{display:"none"},onChange:de(Xt(z,_)),onClick:de(Xt(te,Et)),tabIndex:-1},H,D);return Fe(Fe({},ce),ae)}},[D,n,s,_,r]);return Fe(Fe({},W),{},{isFocused:y&&!r,getRootProps:dt,getInputProps:pt,rootRef:F,inputRef:D,open:de(j)})}function IN(e,t){switch(t.type){case"focus":return Fe(Fe({},e),{},{isFocused:!0});case"blur":return Fe(Fe({},e),{},{isFocused:!1});case"openDialog":return Fe(Fe({},Fc),{},{isFileDialogActive:!0});case"closeDialog":return Fe(Fe({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":return Fe(Fe({},e),{},{isDragActive:t.isDragActive,isDragAccept:t.isDragAccept,isDragReject:t.isDragReject});case"setFiles":return Fe(Fe({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Fe({},Fc);default:return e}}function Oy(){}const Iy=({children:e})=>{const[t,n]=O.useState(!1),[r,o]=O.useState(""),[i,a]=O.useState(""),[s,l]=O.useState(""),[c,u]=O.useState(()=>{}),[f,p]=O.useState(""),[d,v]=O.useState(null),h=({title:m,description:b,confirmButton:w,onConfirm:A,cancelButton:x,content:E})=>{o(m),a(b),l(w),u(()=>A),p(x),v(E),n(!0)},g=()=>{n(!1)};return C.jsxs(Vl.Provider,{value:{open:t,showModal:h,hideModal:g},children:[C.jsx(Yr,{open:t,onOpenChange:n,children:C.jsx(Yr.Content,{title:r,description:i,confirmButton:s,onConfirm:c,cancelButton:f,hideModal:g,children:d})}),e]})},PN=["Inter","Rubik","IBM Plex Sans","Fira Code"],DN=e=>PN.some(t=>t.toLowerCase()===e.toLowerCase()),_N=(e,t)=>new Promise((n,r)=>{const o=e.replace(/\s+/g,"+");if(!e.replace(/[^a-zA-Z0-9\s\-_]/g,"").trim()){r(new Error("Invalid font family name"));return}const a=t.filter(f=>/^\d+$/.test(f)).join(";"),s=`https://fonts.googleapis.com/css2?family=${o}:wght@${a}&display=swap`,l=new Promise(f=>setTimeout(f,500));if(document.querySelector(`link[href="${s}"]`)){l.then(()=>n());return}const u=document.createElement("link");u.rel="stylesheet",u.href=s,u.onload=()=>{"fonts"in document?Promise.all([document.fonts.load(`400 16px "${e}"`),l]).then(()=>n()).catch(()=>l.then(()=>n())):l.then(()=>n())},u.onerror=()=>{l.then(()=>r(new Error("Font loading failed")))},document.head.appendChild(u)}),MN=e=>new Promise(t=>{"fonts"in document?document.fonts.load(`400 16px "${e}"`).then(()=>t()).catch(()=>t()):setTimeout(()=>t(),100)}),Py=({color:e,fontFamily:t,radius:n,themeMode:r,variant:o,headerVariant:i,additionalStylesheetUrl:a})=>{const[s,l]=O.useState(),c=O.useMemo(()=>kp({color:e,fontFamily:s,radius:n,themeMode:r,variant:o,headerVariant:i}),[e,s,n,r,o,i]);return O.useEffect(()=>{t&&t!==s&&(DN(t)?MN(t).then(()=>l(t)).catch(()=>l(t)):_N(t,["400","500","600","700"]).then(()=>l(t)).catch(()=>l(t)))},[t,s]),C.jsxs(C.Fragment,{children:[a&&C.jsx("link",{rel:"stylesheet",href:a}),C.jsx("style",{children:c})]})},Bc=({children:e,className:t,uploadFile:n,allowFileUpload:r,storageKey:o,...i})=>{const{container:a}=ve,s=Li(h=>h.setMessageContainerRef),c=Em(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}=Ty({noClick:!0,noKeyboard:!0,onDrop:d,disabled:!(r&&n),onDragEnter:()=>f(h=>h+1),onDragLeave:()=>f(h=>h-1)});return C.jsxs("div",{...i,className:ko(a.className,t),...v(),ref:p,children:[C.jsxs("div",{"data-hover":u>0,...a.dropzone.overlay,children:["Drop files to upload",C.jsx(HI,{style:{width:"50px"}})]}),C.jsx(Iy,{children:e})]})};Bc.displayName="Container";const Dy=O.forwardRef(({children:e,onClick:t,imgUrl:n,...r},o)=>{const{fab:i}=ve,{container:a,icon:s,image:l}=i??{};return n?C.jsx("img",{src:n,role:"button",tabIndex:0,...l,draggable:"false",onClick:t}):C.jsx("div",{...r,...a,ref:o,onClick:t,children:C.jsx("div",{...s})})});Dy.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 NN(e,t){const n=k.createContext(t),r=i=>{const{children:a,...s}=i,l=k.useMemo(()=>s,Object.values(s));return C.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function o(i){const a=k.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 _y(e,t=[]){let n=[];function r(i,a){const s=k.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=k.useMemo(()=>v,Object.values(v));return C.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=k.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=>k.createContext(a));return function(s){const l=(s==null?void 0:s[e])||i;return k.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,RN(o,...t)]}function RN(...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 k.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}function My({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=LN({defaultProp:t,onChange:n}),i=e!==void 0,a=i?e:r,s=bn(n),l=k.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 LN({defaultProp:e,onChange:t}){const n=k.useState(e),[r]=n,o=k.useRef(r),i=bn(t);return k.useEffect(()=>{o.current!==r&&(i(r),o.current=r)},[r,o,i]),n}function Ny(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function jc(...e){return t=>{let n=!1;const r=e.map(o=>{const i=Ny(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():Ny(e[o],null)}}}}function On(...e){return k.useCallback(jc(...e),e)}var Ry=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(BN);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(zc,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(zc,{...r,ref:t,children:n})});Ry.displayName="Slot";var zc=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=zN(n);return k.cloneElement(n,{...jN(r,n.props),ref:t?jc(t,o):o})}return k.Children.count(n)>1?k.Children.only(null):null});zc.displayName="SlotClone";var FN=({children:e})=>C.jsx(C.Fragment,{children:e});function BN(e){return k.isValidElement(e)&&e.type===FN}function jN(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 zN(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 UN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Uc=UN.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ry:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function WN(e,t){return k.useReducer((n,r)=>t[n][r]??n,e)}var va=e=>{const{present:t,children:n}=e,r=HN(t),o=typeof n=="function"?n({present:r.isPresent}):k.Children.only(n),i=On(r.ref,KN(o));return typeof n=="function"||r.isPresent?k.cloneElement(o,{ref:i}):null};va.displayName="Presence";function HN(e){const[t,n]=k.useState(),r=k.useRef({}),o=k.useRef(e),i=k.useRef("none"),a=e?"mounted":"unmounted",[s,l]=WN(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return k.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:k.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function ma(e){return(e==null?void 0:e.animationName)||"none"}function KN(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 VN=k.useId||(()=>{}),qN=0;function ga(e){const[t,n]=k.useState(VN());return ir(()=>{e||n(r=>r??String(qN++))},[e]),e||(t?`radix-${t}`:"")}var Wc="Collapsible",[GN,bJ]=_y(Wc),[YN,Hc]=GN(Wc),Ly=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:i,onOpenChange:a,...s}=e,[l=!1,c]=My({prop:r,defaultProp:o,onChange:a});return C.jsx(YN,{scope:n,disabled:i,contentId:ga(),open:l,onOpenToggle:k.useCallback(()=>c(u=>!u),[c]),children:C.jsx(Uc.div,{"data-state":Vc(l),"data-disabled":i?"":void 0,...s,ref:t})})});Ly.displayName=Wc;var Fy="CollapsibleTrigger",By=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Hc(Fy,n);return C.jsx(Uc.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Vc(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:pn(e.onClick,o.onOpenToggle)})});By.displayName=Fy;var Kc="CollapsibleContent",jy=k.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Hc(Kc,e.__scopeCollapsible);return C.jsx(va,{present:n||o.open,children:({present:i})=>C.jsx(QN,{...r,ref:t,present:i})})});jy.displayName=Kc;var QN=k.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...i}=e,a=Hc(Kc,n),[s,l]=k.useState(r),c=k.useRef(null),u=On(t,c),f=k.useRef(0),p=f.current,d=k.useRef(0),v=d.current,h=a.open||s,g=k.useRef(h),m=k.useRef(void 0);return k.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]),C.jsx(Uc.div,{"data-state":Vc(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 Vc(e){return e?"open":"closed"}var JN=Ly,ZN=jy;const qc=({restartConversation:e,...t})=>{var a,s;const{header:n}=ve,{showModal:r,hideModal:o}=ql(),i=l=>{l.stopPropagation(),r&&o?r({title:"Create New Conversation",description:"This will clear the current conversation and start a new one.",confirmButton:"New conversation",onConfirm:()=>{e(),o()},cancelButton:"Cancel"}):e()};return C.jsx(rP,{...t,...(s=(a=n==null?void 0:n.content)==null?void 0:a.actions)==null?void 0:s.icons,"aria-label":"Restart Conversation Button",tabIndex:0,role:"button",onClick:i})},zy=({onClick:e,...t})=>{const{header:n}=ve,r=o=>{o.stopPropagation(),e==null||e()};return C.jsx(uP,{...t,...n.content.actions.icons,role:"button",tabIndex:0,"aria-label":"Close Chatbot Button",onClick:r,onKeyDown:o=>{o.key==="Enter"&&r(o)}})},To=({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?C.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:[C.jsx(i,{...(c=(l=o.expandedContent)==null?void 0:l.descriptionItems)==null?void 0:c.icon}),C.jsx("p",{...(f=(u=o.expandedContent)==null?void 0:u.descriptionItems)==null?void 0:f.link,children:t})]}):C.jsxs("div",{...r,...(d=(p=o.expandedContent)==null?void 0:p.descriptionItems)==null?void 0:d.container,children:[C.jsx(i,{...(h=(v=o.expandedContent)==null?void 0:v.descriptionItems)==null?void 0:h.icon}),C.jsx("p",{...(m=(g=o.expandedContent)==null?void 0:g.descriptionItems)==null?void 0:m.text,children:t})]}):null},XN=({soundOn:e,toggleSound:t})=>{const n=i=>{i.stopPropagation(),t==null||t()},{header:r}=ve,o=e?tm:lP;return C.jsx("button",{type:"button",onClick:n,title:e?"Disable chat sounds":"Enable chat sounds",...r.content.actions.icons,children:C.jsx(o,{size:16})})},Uy=({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,E,$,R,K,T,M,U,B,F,D,L,q,W;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 C.jsxs(JN,{open:p?c:!1,onOpenChange:u,"data-disabled":p?void 0:"",...l.container,...s,children:[C.jsxs(By,{"aria-label":"Expand Header Button",...l.content.container,children:[C.jsx(hi,{...s,src:n.botAvatar,...l.content.avatar,children:n.botName||"Bot"}),C.jsx("h2",{...l.content.title,children:n.botName||"Bot"}),n.botDescription&&C.jsx("p",{...l.content.description,children:n.botDescription}),C.jsxs("div",{...l.content.actions.container,children:[n.soundEnabled&&i!==void 0&&a&&C.jsx(XN,{soundOn:i,toggleSound:a})," ",r&&C.jsx(qc,{restartConversation:r}),t&&C.jsx(zy,{onClick:t})]})]}),f&&C.jsxs(ZN,{...l.expandedContent.container,children:[C.jsxs("div",{"data-links":"",...l.expandedContent.group,children:[C.jsx(To,{"data-email":"",icon:JI,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:${(E=n.email)==null?void 0:E.link}`}),C.jsx(To,{"data-phone":"",icon:tP,title:($=n.phone)==null?void 0:$.title,link:(K=(R=n.phone)==null?void 0:R.link)!=null&&K.startsWith("tel:")?(T=n.phone)==null?void 0:T.link:`tel:${(M=n.phone)==null?void 0:M.link}`}),C.jsx(To,{"data-website":"",link:(U=n.website)==null?void 0:U.link,icon:GI,title:(B=n.website)==null?void 0:B.title})]}),C.jsxs("div",{"data-legal":"",...(F=l.expandedContent)==null?void 0:F.group,children:[C.jsx(To,{"data-terms":"",link:(D=n.termsOfService)==null?void 0:D.link,icon:Xv,title:(L=n.termsOfService)==null?void 0:L.title}),C.jsx(To,{"data-privacy":"",link:(q=n.privacyPolicy)==null?void 0:q.link,icon:QI,title:(W=n.privacyPolicy)==null?void 0:W.title})]})]})]})},Gc=O.memo(({...e})=>{const{typingIndicator:t}=ve;return C.jsx("div",{...e,...t==null?void 0:t.container,children:C.jsx("div",{...t==null?void 0:t.loader})})});Gc.displayName="TypingIndicator";const Yc=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",C.jsx(Kl.Provider,{value:{isLoading:b,setIsLoading:w},children:C.jsxs("div",{...A,className:ko(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&&C.jsx(Wy,{authorId:a,sender:o}),t&&C.jsx(Vn,{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&&C.jsx(Wy,{authorId:a,sender:o}),r]})})})),Wy=({authorId:e,sender:t})=>{const{message:{avatar:n}}=ve,[r,o]=O.useState("idle"),i=cp(e??"",15);return C.jsxs(Bs,{"data-color":i,"data-loading-status":r,...n==null?void 0:n.container,children:[C.jsx(js,{...n==null?void 0:n.image,onLoadingStatusChange:o,src:t==null?void 0:t.avatar}),C.jsxs(zs,{...n==null?void 0:n.fallback,children:[t==null?void 0:t.name[0]," "]})]})};function e2({botAvatar:e,botDescription:t,botName:n}){const{messageList:{marquee:r}}=ve;return C.jsxs("li",{...r.container,children:[C.jsx(hi,{src:e,...r.avatar,children:(n||"Bot").slice(0,1)}),C.jsxs("div",{...r.content,children:[C.jsx("h1",{...r.title,children:n||"Bot"}),C.jsx("p",{...r.description,children:t})]})]})}function t2(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 n2(){t2("react-scroll-to-bottom:version","4.2.0")}var Oo=function(e){return e&&e.Math===Math&&e},Qe=Oo(typeof globalThis=="object"&&globalThis)||Oo(typeof window=="object"&&window)||Oo(typeof self=="object"&&self)||Oo(typeof Rt=="object"&&Rt)||Oo(typeof Rt=="object"&&Rt)||function(){return this}()||Function("return this")(),Je=function(e){try{return!!e()}catch{return!0}},r2=Je,ya=!r2(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),o2=ya,Hy=Function.prototype,Ky=Hy.apply,Vy=Hy.call,Qc=typeof Reflect=="object"&&Reflect.apply||(o2?Vy.bind(Ky):function(){return Vy.apply(Ky,arguments)}),qy=ya,Gy=Function.prototype,Jc=Gy.call,i2=qy&&Gy.bind.bind(Jc,Jc),Ve=qy?i2:function(e){return function(){return Jc.apply(e,arguments)}},Yy=Ve,a2=Yy({}.toString),s2=Yy("".slice),Gn=function(e){return s2(a2(e),8,-1)},l2=Gn,c2=Ve,Zc=function(e){if(l2(e)==="Function")return c2(e)},Xc=typeof document=="object"&&document.all,ut=typeof Xc>"u"&&Xc!==void 0?function(e){return typeof e=="function"||e===Xc}:function(e){return typeof e=="function"},Io={},u2=Je,bt=!u2(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),f2=ya,ba=Function.prototype.call,en=f2?ba.bind(ba):function(){return ba.apply(ba,arguments)},eu={},Qy={}.propertyIsEnumerable,Jy=Object.getOwnPropertyDescriptor,d2=Jy&&!Qy.call({1:2},1);eu.f=d2?function(t){var n=Jy(this,t);return!!n&&n.enumerable}:Qy;var Po=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},p2=Ve,h2=Je,v2=Gn,tu=Object,m2=p2("".split),Zy=h2(function(){return!tu("z").propertyIsEnumerable(0)})?function(e){return v2(e)==="String"?m2(e,""):tu(e)}:tu,nu=function(e){return e==null},g2=nu,y2=TypeError,wa=function(e){if(g2(e))throw new y2("Can't call method on "+e);return e},b2=Zy,w2=wa,tn=function(e){return b2(w2(e))},S2=ut,zt=function(e){return typeof e=="object"?e!==null:S2(e)},it={},ru=it,ou=Qe,x2=ut,Xy=function(e){return x2(e)?e:void 0},nn=function(e,t){return arguments.length<2?Xy(ru[e])||Xy(ou[e]):ru[e]&&ru[e][t]||ou[e]&&ou[e][t]},E2=Ve,hn=E2({}.isPrototypeOf),C2=Qe,eb=C2.navigator,tb=eb&&eb.userAgent,iu=tb?String(tb):"",nb=Qe,au=iu,rb=nb.process,ob=nb.Deno,ib=rb&&rb.versions||ob&&ob.version,ab=ib&&ib.v8,Ut,Sa;ab&&(Ut=ab.split("."),Sa=Ut[0]>0&&Ut[0]<4?1:+(Ut[0]+Ut[1])),!Sa&&au&&(Ut=au.match(/Edge\/(\d+)/),(!Ut||Ut[1]>=74)&&(Ut=au.match(/Chrome\/(\d+)/),Ut&&(Sa=+Ut[1])));var su=Sa,sb=su,k2=Je,A2=Qe,$2=A2.String,xr=!!Object.getOwnPropertySymbols&&!k2(function(){var e=Symbol("symbol detection");return!$2(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&sb&&sb<41}),T2=xr,lb=T2&&!Symbol.sham&&typeof Symbol.iterator=="symbol",O2=nn,I2=ut,P2=hn,D2=lb,_2=Object,Do=D2?function(e){return typeof e=="symbol"}:function(e){var t=O2("Symbol");return I2(t)&&P2(t.prototype,_2(e))},M2=String,xa=function(e){try{return M2(e)}catch{return"Object"}},N2=ut,R2=xa,L2=TypeError,Ea=function(e){if(N2(e))return e;throw new L2(R2(e)+" is not a function")},F2=Ea,B2=nu,lu=function(e,t){var n=e[t];return B2(n)?void 0:F2(n)},cu=en,uu=ut,fu=zt,j2=TypeError,z2=function(e,t){var n,r;if(t==="string"&&uu(n=e.toString)&&!fu(r=cu(n,e))||uu(n=e.valueOf)&&!fu(r=cu(n,e))||t!=="string"&&uu(n=e.toString)&&!fu(r=cu(n,e)))return r;throw new j2("Can't convert object to primitive value")},cb={exports:{}},ub=Qe,U2=Object.defineProperty,W2=function(e,t){try{U2(ub,e,{value:t,configurable:!0,writable:!0})}catch{ub[e]=t}return t},H2=Qe,K2=W2,fb="__core-js_shared__",db=cb.exports=H2[fb]||K2(fb,{});(db.versions||(db.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 du=cb.exports,pb=du,Er=function(e,t){return pb[e]||(pb[e]=t||{})},V2=wa,q2=Object,vn=function(e){return q2(V2(e))},G2=Ve,Y2=vn,Q2=G2({}.hasOwnProperty),$t=Object.hasOwn||function(t,n){return Q2(Y2(t),n)},J2=Ve,Z2=0,X2=Math.random(),eR=J2(1 .toString),pu=function(e){return"Symbol("+(e===void 0?"":e)+")_"+eR(++Z2+X2,36)},tR=Qe,nR=Er,hb=$t,rR=pu,oR=xr,iR=lb,Cr=tR.Symbol,hu=nR("wks"),aR=iR?Cr.for||Cr:Cr&&Cr.withoutSetter||rR,Xe=function(e){return hb(hu,e)||(hu[e]=oR&&hb(Cr,e)?Cr[e]:aR("Symbol."+e)),hu[e]},sR=en,vb=zt,mb=Do,lR=lu,cR=z2,uR=Xe,fR=TypeError,dR=uR("toPrimitive"),pR=function(e,t){if(!vb(e)||mb(e))return e;var n=lR(e,dR),r;if(n){if(t===void 0&&(t="default"),r=sR(n,e,t),!vb(r)||mb(r))return r;throw new fR("Can't convert object to primitive value")}return t===void 0&&(t="number"),cR(e,t)},hR=pR,vR=Do,vu=function(e){var t=hR(e,"string");return vR(t)?t:t+""},mR=Qe,gb=zt,mu=mR.document,gR=gb(mu)&&gb(mu.createElement),yb=function(e){return gR?mu.createElement(e):{}},yR=bt,bR=Je,wR=yb,bb=!yR&&!bR(function(){return Object.defineProperty(wR("div"),"a",{get:function(){return 7}}).a!==7}),SR=bt,xR=en,ER=eu,CR=Po,kR=tn,AR=vu,$R=$t,TR=bb,wb=Object.getOwnPropertyDescriptor;Io.f=SR?wb:function(t,n){if(t=kR(t),n=AR(n),TR)try{return wb(t,n)}catch{}if($R(t,n))return CR(!xR(ER.f,t,n),t[n])};var OR=Je,IR=ut,PR=/#|\.prototype\./,_o=function(e,t){var n=_R[DR(e)];return n===NR?!0:n===MR?!1:IR(t)?OR(t):!!t},DR=_o.normalize=function(e){return String(e).replace(PR,".").toLowerCase()},_R=_o.data={},MR=_o.NATIVE="N",NR=_o.POLYFILL="P",RR=_o,Sb=Zc,LR=Ea,FR=ya,BR=Sb(Sb.bind),gu=function(e,t){return LR(e),t===void 0?e:FR?BR(e,t):function(){return e.apply(t,arguments)}},Wt={},jR=bt,zR=Je,xb=jR&&zR(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),UR=zt,WR=String,HR=TypeError,In=function(e){if(UR(e))return e;throw new HR(WR(e)+" is not an object")},KR=bt,VR=bb,qR=xb,Ca=In,Eb=vu,GR=TypeError,yu=Object.defineProperty,YR=Object.getOwnPropertyDescriptor,bu="enumerable",wu="configurable",Su="writable";Wt.f=KR?qR?function(t,n,r){if(Ca(t),n=Eb(n),Ca(r),typeof t=="function"&&n==="prototype"&&"value"in r&&Su in r&&!r[Su]){var o=YR(t,n);o&&o[Su]&&(t[n]=r.value,r={configurable:wu in r?r[wu]:o[wu],enumerable:bu in r?r[bu]:o[bu],writable:!1})}return yu(t,n,r)}:yu:function(t,n,r){if(Ca(t),n=Eb(n),Ca(r),VR)try{return yu(t,n,r)}catch{}if("get"in r||"set"in r)throw new GR("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var QR=bt,JR=Wt,ZR=Po,ka=QR?function(e,t,n){return JR.f(e,t,ZR(1,n))}:function(e,t,n){return e[t]=n,e},Mo=Qe,XR=Qc,eL=Zc,tL=ut,nL=Io.f,rL=RR,kr=it,oL=gu,Ar=ka,Cb=$t,iL=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 XR(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?Mo:o?Mo[n]:Mo[n]&&Mo[n].prototype,s=r?kr:kr[n]||Ar(kr,n,{})[n],l=s.prototype,c,u,f,p,d,v,h,g,m;for(p in t)c=rL(r?p:n+(o?".":"#")+p,e.forced),u=!c&&a&&Cb(a,p),v=s[p],u&&(e.dontCallGetSet?(m=nL(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=oL(d,Mo):e.wrap&&u?g=iL(d):i&&tL(d)?g=eL(d):g=d,(e.sham||d&&d.sham||v&&v.sham)&&Ar(g,"sham",!0),Ar(s,p,g),i&&(f=n+"Prototype",Cb(kr,f)||Ar(kr,f,{}),Ar(kr[f],p,d),e.real&&l&&(c||!l[p])&&Ar(l,p,d)))},aL=Gn,$r=Array.isArray||function(t){return aL(t)==="Array"},sL=Pe,lL=$r;sL({target:"Array",stat:!0},{isArray:lL});var cL=it,uL=cL.Array.isArray,fL=uL,kb=fL,dL=kb,pL=dL,hL=pL,vL=hL,mL=vL;const Ab=ye(mL);function gL(e){if(Ab(e))return e}var yL=Math.ceil,bL=Math.floor,wL=Math.trunc||function(t){var n=+t;return(n>0?bL:yL)(n)},SL=wL,Aa=function(e){var t=+e;return t!==t||t===0?0:SL(t)},xL=Aa,EL=Math.min,CL=function(e){var t=xL(e);return t>0?EL(t,9007199254740991):0},kL=CL,Yn=function(e){return kL(e.length)},AL=TypeError,$L=9007199254740991,xu=function(e){if(e>$L)throw AL("Maximum allowed index exceeded");return e},TL=bt,OL=Wt,IL=Po,No=function(e,t,n){TL?OL.f(e,t,IL(0,n)):e[t]=n},PL=Xe,DL=PL("toStringTag"),$b={};$b[DL]="z";var Eu=String($b)==="[object z]",_L=Eu,ML=ut,$a=Gn,NL=Xe,RL=NL("toStringTag"),LL=Object,FL=$a(function(){return arguments}())==="Arguments",BL=function(e,t){try{return e[t]}catch{}},Ro=_L?$a:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=BL(t=LL(e),RL))=="string"?n:FL?$a(t):(r=$a(t))==="Object"&&ML(t.callee)?"Arguments":r},jL=Ve,zL=ut,Cu=du,UL=jL(Function.toString);zL(Cu.inspectSource)||(Cu.inspectSource=function(e){return UL(e)});var WL=Cu.inspectSource,HL=Ve,KL=Je,Tb=ut,VL=Ro,qL=nn,GL=WL,Ob=function(){},Ib=qL("Reflect","construct"),ku=/^\s*(?:class|function)\b/,YL=HL(ku.exec),QL=!ku.test(Ob),Lo=function(t){if(!Tb(t))return!1;try{return Ib(Ob,[],t),!0}catch{return!1}},Pb=function(t){if(!Tb(t))return!1;switch(VL(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return QL||!!YL(ku,GL(t))}catch{return!0}};Pb.sham=!0;var Au=!Ib||KL(function(){var e;return Lo(Lo.call)||!Lo(Object)||!Lo(function(){e=!0})||e})?Pb:Lo,Db=$r,JL=Au,ZL=zt,XL=Xe,eF=XL("species"),_b=Array,tF=function(e){var t;return Db(e)&&(t=e.constructor,JL(t)&&(t===_b||Db(t.prototype))?t=void 0:ZL(t)&&(t=t[eF],t===null&&(t=void 0))),t===void 0?_b:t},nF=tF,$u=function(e,t){return new(nF(e))(t===0?0:t)},rF=Je,oF=Xe,iF=su,aF=oF("species"),Ta=function(e){return iF>=51||!rF(function(){var t=[],n=t.constructor={};return n[aF]=function(){return{foo:1}},t[e](Boolean).foo!==1})},sF=Pe,lF=Je,cF=$r,uF=zt,fF=vn,dF=Yn,Mb=xu,Nb=No,pF=$u,hF=Ta,vF=Xe,mF=su,Rb=vF("isConcatSpreadable"),gF=mF>=51||!lF(function(){var e=[];return e[Rb]=!1,e.concat()[0]!==e}),yF=function(e){if(!uF(e))return!1;var t=e[Rb];return t!==void 0?!!t:cF(e)},bF=!gF||!hF("concat");sF({target:"Array",proto:!0,arity:1,forced:bF},{concat:function(t){var n=fF(this),r=pF(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],yF(c))for(l=dF(c),Mb(o+l),a=0;a<l;a++,o++)a in c&&Nb(r,o,c[a]);else Mb(o+1),Nb(r,o++,c);return r.length=o,r}});var wF=Ro,SF=String,Fo=function(e){if(wF(e)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return SF(e)},Oa={},xF=Aa,EF=Math.max,CF=Math.min,Tu=function(e,t){var n=xF(e);return n<0?EF(n+t,0):CF(n,t)},kF=tn,AF=Tu,$F=Yn,Lb=function(e){return function(t,n,r){var o=kF(t),i=$F(o);if(i===0)return!e&&-1;var a=AF(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}},Fb={includes:Lb(!0),indexOf:Lb(!1)},Ia={},TF=Ve,Ou=$t,OF=tn,IF=Fb.indexOf,PF=Ia,Bb=TF([].push),jb=function(e,t){var n=OF(e),r=0,o=[],i;for(i in n)!Ou(PF,i)&&Ou(n,i)&&Bb(o,i);for(;t.length>r;)Ou(n,i=t[r++])&&(~IF(o,i)||Bb(o,i));return o},Iu=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],DF=jb,_F=Iu,Pu=Object.keys||function(t){return DF(t,_F)},MF=bt,NF=xb,RF=Wt,LF=In,FF=tn,BF=Pu;Oa.f=MF&&!NF?Object.defineProperties:function(t,n){LF(t);for(var r=FF(n),o=BF(n),i=o.length,a=0,s;i>a;)RF.f(t,s=o[a++],r[s]);return t};var jF=nn,zF=jF("document","documentElement"),UF=Er,WF=pu,zb=UF("keys"),Pa=function(e){return zb[e]||(zb[e]=WF(e))},HF=In,KF=Oa,Ub=Iu,VF=Ia,qF=zF,GF=yb,YF=Pa,Wb=">",Hb="<",Du="prototype",_u="script",Kb=YF("IE_PROTO"),Mu=function(){},Vb=function(e){return Hb+_u+Wb+e+Hb+"/"+_u+Wb},qb=function(e){e.write(Vb("")),e.close();var t=e.parentWindow.Object;return e=null,t},QF=function(){var e=GF("iframe"),t="java"+_u+":",n;return e.style.display="none",qF.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(Vb("document.F=Object")),n.close(),n.F},Da,_a=function(){try{Da=new ActiveXObject("htmlfile")}catch{}_a=typeof document<"u"?document.domain&&Da?qb(Da):QF():qb(Da);for(var e=Ub.length;e--;)delete _a[Du][Ub[e]];return _a()};VF[Kb]=!0;var Nu=Object.create||function(t,n){var r;return t!==null?(Mu[Du]=HF(t),r=new Mu,Mu[Du]=null,r[Kb]=t):r=_a(),n===void 0?r:KF.f(r,n)},Ma={},JF=jb,ZF=Iu,XF=ZF.concat("length","prototype");Ma.f=Object.getOwnPropertyNames||function(t){return JF(t,XF)};var Gb={},eB=Ve,Na=eB([].slice),tB=Gn,nB=tn,Yb=Ma.f,rB=Na,Qb=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],oB=function(e){try{return Yb(e)}catch{return rB(Qb)}};Gb.f=function(t){return Qb&&tB(t)==="Window"?oB(t):Yb(nB(t))};var Ra={};Ra.f=Object.getOwnPropertySymbols;var iB=ka,La=function(e,t,n,r){return r&&r.enumerable?e[t]=n:iB(e,t,n),e},aB=Wt,sB=function(e,t,n){return aB.f(e,t,n)},Bo={},lB=Xe;Bo.f=lB;var Jb=it,cB=$t,uB=Bo,fB=Wt.f,Be=function(e){var t=Jb.Symbol||(Jb.Symbol={});cB(t,e)||fB(t,e,{value:uB.f(e)})},dB=en,pB=nn,hB=Xe,vB=La,Zb=function(){var e=pB("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,r=hB("toPrimitive");t&&!t[r]&&vB(t,r,function(o){return dB(n,this)},{arity:1})},mB=Eu,gB=Ro,yB=mB?{}.toString:function(){return"[object "+gB(this)+"]"},bB=Eu,wB=Wt.f,SB=ka,xB=$t,EB=yB,CB=Xe,Xb=CB("toStringTag"),Tr=function(e,t,n,r){var o=n?e:e&&e.prototype;o&&(xB(o,Xb)||wB(o,Xb,{configurable:!0,value:t}),r&&!bB&&SB(o,"toString",EB))},kB=Qe,AB=ut,e1=kB.WeakMap,$B=AB(e1)&&/native code/.test(String(e1)),TB=$B,t1=Qe,OB=zt,IB=ka,Ru=$t,Lu=du,PB=Pa,DB=Ia,n1="Object already initialized",Fu=t1.TypeError,_B=t1.WeakMap,Fa,jo,Ba,MB=function(e){return Ba(e)?jo(e):Fa(e,{})},NB=function(e){return function(t){var n;if(!OB(t)||(n=jo(t)).type!==e)throw new Fu("Incompatible receiver, "+e+" required");return n}};if(TB||Lu.state){var rn=Lu.state||(Lu.state=new _B);rn.get=rn.get,rn.has=rn.has,rn.set=rn.set,Fa=function(e,t){if(rn.has(e))throw new Fu(n1);return t.facade=e,rn.set(e,t),t},jo=function(e){return rn.get(e)||{}},Ba=function(e){return rn.has(e)}}else{var Or=PB("state");DB[Or]=!0,Fa=function(e,t){if(Ru(e,Or))throw new Fu(n1);return t.facade=e,IB(e,Or,t),t},jo=function(e){return Ru(e,Or)?e[Or]:{}},Ba=function(e){return Ru(e,Or)}}var Bu={set:Fa,get:jo,has:Ba,enforce:MB,getterFor:NB},RB=gu,LB=Ve,FB=Zy,BB=vn,jB=Yn,zB=$u,r1=LB([].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=BB(l),d=FB(p),v=jB(d),h=RB(c,u),g=0,m=f||zB,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:r1(b,w)}else switch(e){case 4:return!1;case 7:r1(b,w)}return i?-1:r||o?o:b}},ju={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,zo=Qe,zu=en,UB=Ve,Ir=bt,Pr=xr,WB=Je,et=$t,HB=hn,Uu=In,za=tn,Wu=vu,KB=Fo,Hu=Po,Dr=Nu,o1=Pu,VB=Ma,i1=Gb,qB=Ra,a1=Io,s1=Wt,GB=Oa,l1=eu,c1=La,YB=sB,Ku=Er,QB=Pa,u1=Ia,f1=pu,JB=Xe,ZB=Bo,XB=Be,ej=Zb,tj=Tr,d1=Bu,Ua=ju.forEach,wt=QB("hidden"),Wa="Symbol",Uo="prototype",nj=d1.set,p1=d1.getterFor(Wa),Ht=Object[Uo],Qn=zo.Symbol,Wo=Qn&&Qn[Uo],rj=zo.RangeError,oj=zo.TypeError,Vu=zo.QObject,h1=a1.f,Jn=s1.f,v1=i1.f,ij=l1.f,m1=UB([].push),mn=Ku("symbols"),Ho=Ku("op-symbols"),aj=Ku("wks"),qu=!Vu||!Vu[Uo]||!Vu[Uo].findChild,g1=function(e,t,n){var r=h1(Ht,t);r&&delete Ht[t],Jn(e,t,n),r&&e!==Ht&&Jn(Ht,t,r)},Gu=Ir&&WB(function(){return Dr(Jn({},"a",{get:function(){return Jn(this,"a",{value:7}).a}})).a!==7})?g1:Jn,Yu=function(e,t){var n=mn[e]=Dr(Wo);return nj(n,{type:Wa,tag:e,description:t}),Ir||(n.description=t),n},Ha=function(t,n,r){t===Ht&&Ha(Ho,n,r),Uu(t);var o=Wu(n);return Uu(r),et(mn,o)?(r.enumerable?(et(t,wt)&&t[wt][o]&&(t[wt][o]=!1),r=Dr(r,{enumerable:Hu(0,!1)})):(et(t,wt)||Jn(t,wt,Hu(1,Dr(null))),t[wt][o]=!0),Gu(t,o,r)):Jn(t,o,r)},Qu=function(t,n){Uu(t);var r=za(n),o=o1(r).concat(S1(r));return Ua(o,function(i){(!Ir||zu(y1,r,i))&&Ha(t,i,r[i])}),t},sj=function(t,n){return n===void 0?Dr(t):Qu(Dr(t),n)},y1=function(t){var n=Wu(t),r=zu(ij,this,n);return this===Ht&&et(mn,n)&&!et(Ho,n)?!1:r||!et(this,n)||!et(mn,n)||et(this,wt)&&this[wt][n]?r:!0},b1=function(t,n){var r=za(t),o=Wu(n);if(!(r===Ht&&et(mn,o)&&!et(Ho,o))){var i=h1(r,o);return i&&et(mn,o)&&!(et(r,wt)&&r[wt][o])&&(i.enumerable=!0),i}},w1=function(t){var n=v1(za(t)),r=[];return Ua(n,function(o){!et(mn,o)&&!et(u1,o)&&m1(r,o)}),r},S1=function(e){var t=e===Ht,n=v1(t?Ho:za(e)),r=[];return Ua(n,function(o){et(mn,o)&&(!t||et(Ht,o))&&m1(r,mn[o])}),r};Pr||(Qn=function(){if(HB(Wo,this))throw new oj("Symbol is not a constructor");var t=!arguments.length||arguments[0]===void 0?void 0:KB(arguments[0]),n=f1(t),r=function(o){var i=this===void 0?zo:this;i===Ht&&zu(r,Ho,o),et(i,wt)&&et(i[wt],n)&&(i[wt][n]=!1);var a=Hu(1,o);try{Gu(i,n,a)}catch(s){if(!(s instanceof rj))throw s;g1(i,n,a)}};return Ir&&qu&&Gu(Ht,n,{configurable:!0,set:r}),Yu(n,t)},Wo=Qn[Uo],c1(Wo,"toString",function(){return p1(this).tag}),c1(Qn,"withoutSetter",function(e){return Yu(f1(e),e)}),l1.f=y1,s1.f=Ha,GB.f=Qu,a1.f=b1,VB.f=i1.f=w1,qB.f=S1,ZB.f=function(e){return Yu(JB(e),e)},Ir&&YB(Wo,"description",{configurable:!0,get:function(){return p1(this).description}})),ja({global:!0,constructor:!0,wrap:!0,forced:!Pr,sham:!Pr},{Symbol:Qn}),Ua(o1(aj),function(e){XB(e)}),ja({target:Wa,stat:!0,forced:!Pr},{useSetter:function(){qu=!0},useSimple:function(){qu=!1}}),ja({target:"Object",stat:!0,forced:!Pr,sham:!Ir},{create:sj,defineProperty:Ha,defineProperties:Qu,getOwnPropertyDescriptor:b1}),ja({target:"Object",stat:!0,forced:!Pr},{getOwnPropertyNames:w1}),ej(),tj(Qn,Wa),u1[wt]=!0;var lj=xr,x1=lj&&!!Symbol.for&&!!Symbol.keyFor,cj=Pe,uj=nn,fj=$t,dj=Fo,E1=Er,pj=x1,Ju=E1("string-to-symbol-registry"),hj=E1("symbol-to-string-registry");cj({target:"Symbol",stat:!0,forced:!pj},{for:function(e){var t=dj(e);if(fj(Ju,t))return Ju[t];var n=uj("Symbol")(t);return Ju[t]=n,hj[n]=t,n}});var vj=Pe,mj=$t,gj=Do,yj=xa,bj=Er,wj=x1,C1=bj("symbol-to-string-registry");vj({target:"Symbol",stat:!0,forced:!wj},{keyFor:function(t){if(!gj(t))throw new TypeError(yj(t)+" is not a symbol");if(mj(C1,t))return C1[t]}});var Sj=Ve,k1=$r,xj=ut,A1=Gn,Ej=Fo,$1=Sj([].push),Cj=function(e){if(xj(e))return e;if(k1(e)){for(var t=e.length,n=[],r=0;r<t;r++){var o=e[r];typeof o=="string"?$1(n,o):(typeof o=="number"||A1(o)==="Number"||A1(o)==="String")&&$1(n,Ej(o))}var i=n.length,a=!0;return function(s,l){if(a)return a=!1,l;if(k1(this))return l;for(var c=0;c<i;c++)if(n[c]===s)return l}}},kj=Pe,T1=nn,O1=Qc,Aj=en,Ko=Ve,I1=Je,P1=ut,D1=Do,_1=Na,$j=Cj,Tj=xr,Oj=String,Dn=T1("JSON","stringify"),Ka=Ko(/./.exec),M1=Ko("".charAt),Ij=Ko("".charCodeAt),Pj=Ko("".replace),Dj=Ko(1 .toString),_j=/[\uD800-\uDFFF]/g,N1=/^[\uD800-\uDBFF]$/,R1=/^[\uDC00-\uDFFF]$/,L1=!Tj||I1(function(){var e=T1("Symbol")("stringify detection");return Dn([e])!=="[null]"||Dn({a:e})!=="{}"||Dn(Object(e))!=="{}"}),F1=I1(function(){return Dn("\uDF06\uD834")!=='"\\udf06\\ud834"'||Dn("\uDEAD")!=='"\\udead"'}),Mj=function(e,t){var n=_1(arguments),r=$j(t);if(!(!P1(r)&&(e===void 0||D1(e))))return n[1]=function(o,i){if(P1(r)&&(i=Aj(r,this,Oj(o),i)),!D1(i))return i},O1(Dn,null,n)},Nj=function(e,t,n){var r=M1(n,t-1),o=M1(n,t+1);return Ka(N1,e)&&!Ka(R1,o)||Ka(R1,e)&&!Ka(N1,r)?"\\u"+Dj(Ij(e,0),16):e};Dn&&kj({target:"JSON",stat:!0,arity:3,forced:L1||F1},{stringify:function(t,n,r){var o=_1(arguments),i=O1(L1?Mj:Dn,null,o);return F1&&typeof i=="string"?Pj(i,_j,Nj):i}});var Rj=Pe,Lj=xr,Fj=Je,B1=Ra,Bj=vn,jj=!Lj||Fj(function(){B1.f(1)});Rj({target:"Object",stat:!0,forced:jj},{getOwnPropertySymbols:function(t){var n=B1.f;return n?n(Bj(t)):[]}});var zj=Be;zj("asyncIterator");var Uj=Be;Uj("hasInstance");var Wj=Be;Wj("isConcatSpreadable");var Hj=Be;Hj("iterator");var Kj=Be;Kj("match");var Vj=Be;Vj("matchAll");var qj=Be;qj("replace");var Gj=Be;Gj("search");var Yj=Be;Yj("species");var Qj=Be;Qj("split");var Jj=Be,Zj=Zb;Jj("toPrimitive"),Zj();var Xj=nn,e4=Be,t4=Tr;e4("toStringTag"),t4(Xj("Symbol"),"Symbol");var n4=Be;n4("unscopables");var r4=Qe,o4=Tr;o4(r4.JSON,"JSON",!0);var i4=it,a4=i4.Symbol,_r={},Zu=bt,s4=$t,j1=Function.prototype,l4=Zu&&Object.getOwnPropertyDescriptor,Xu=s4(j1,"name"),c4=Xu&&(function(){}).name==="something",u4=Xu&&(!Zu||Zu&&l4(j1,"name").configurable),f4={EXISTS:Xu,PROPER:c4,CONFIGURABLE:u4},d4=Je,p4=!d4(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}),h4=$t,v4=ut,m4=vn,g4=Pa,y4=p4,z1=g4("IE_PROTO"),ef=Object,b4=ef.prototype,U1=y4?ef.getPrototypeOf:function(e){var t=m4(e);if(h4(t,z1))return t[z1];var n=t.constructor;return v4(n)&&t instanceof n?n.prototype:t instanceof ef?b4:null},w4=Je,S4=ut,x4=zt,E4=Nu,W1=U1,C4=La,k4=Xe,tf=k4("iterator"),H1=!1,gn,nf,rf;[].keys&&(rf=[].keys(),"next"in rf?(nf=W1(W1(rf)),nf!==Object.prototype&&(gn=nf)):H1=!0);var A4=!x4(gn)||w4(function(){var e={};return gn[tf].call(e)!==e});A4?gn={}:gn=E4(gn),S4(gn[tf])||C4(gn,tf,function(){return this});var K1={IteratorPrototype:gn,BUGGY_SAFARI_ITERATORS:H1},$4=K1.IteratorPrototype,T4=Nu,O4=Po,I4=Tr,P4=_r,D4=function(){return this},_4=function(e,t,n,r){var o=t+" Iterator";return e.prototype=T4($4,{next:O4(+!r,n)}),I4(e,o,!1,!0),P4[o]=D4,e},M4=Ve,N4=Ea,R4=function(e,t,n){try{return M4(N4(Object.getOwnPropertyDescriptor(e,t)[n]))}catch{}},L4=zt,F4=function(e){return L4(e)||e===null},B4=F4,j4=String,z4=TypeError,U4=function(e){if(B4(e))return e;throw new z4("Can't set "+j4(e)+" as a prototype")},W4=R4,H4=zt,K4=wa,V4=U4;Object.setPrototypeOf||"__proto__"in{}&&function(){var e=!1,t={},n;try{n=W4(Object.prototype,"__proto__","set"),n(t,[]),e=t instanceof Array}catch{}return function(o,i){return K4(o),V4(i),H4(o)&&(e?n(o,i):o.__proto__=i),o}}();var q4=Pe,G4=en,V1=f4,Y4=_4,Q4=U1,J4=Tr,q1=La,Z4=Xe,G1=_r,Y1=K1,X4=V1.PROPER;V1.CONFIGURABLE,Y1.IteratorPrototype;var Va=Y1.BUGGY_SAFARI_ITERATORS,of=Z4("iterator"),Q1="keys",qa="values",J1="entries",e3=function(){return this},Z1=function(e,t,n,r,o,i,a){Y4(n,t,r);var s=function(m){if(m===o&&p)return p;if(!Va&&m&&m in u)return u[m];switch(m){case Q1:return function(){return new n(this,m)};case qa:return function(){return new n(this,m)};case J1:return function(){return new n(this,m)}}return function(){return new n(this)}},l=t+" Iterator",c=!1,u=e.prototype,f=u[of]||u["@@iterator"]||o&&u[o],p=!Va&&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&&(J4(v,l,!0,!0),G1[l]=e3)),X4&&o===qa&&f&&f.name!==qa&&(c=!0,p=function(){return G4(f,this)}),o)if(h={values:s(qa),keys:i?p:s(Q1),entries:s(J1)},a)for(g in h)(Va||c||!(g in u))&&q1(u,g,h[g]);else q4({target:t,proto:!0,forced:Va||c},h);return a&&u[of]!==p&&q1(u,of,p,{name:o}),G1[t]=p,h},X1=function(e,t){return{value:e,done:t}},t3=tn,ew=_r,tw=Bu;Wt.f;var n3=Z1,Ga=X1,nw="Array Iterator",r3=tw.set,o3=tw.getterFor(nw);n3(Array,"Array",function(e,t){r3(this,{type:nw,target:t3(e),index:0,kind:t})},function(){var e=o3(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"),ew.Arguments=ew.Array;var i3={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},a3=i3,s3=Qe,l3=Tr,rw=_r;for(var af in a3)l3(s3[af],af),rw[af]=rw.Array;var c3=a4,u3=c3,f3=Xe,d3=Wt.f,ow=f3("metadata"),iw=Function.prototype;iw[ow]===void 0&&d3(iw,ow,{value:null});var p3=Be;p3("asyncDispose");var h3=Be;h3("dispose");var v3=Be;v3("metadata");var m3=u3,g3=m3,y3=nn,b3=Ve,sf=y3("Symbol"),w3=sf.keyFor,S3=b3(sf.prototype.valueOf),aw=sf.isRegisteredSymbol||function(t){try{return w3(S3(t))!==void 0}catch{return!1}},x3=Pe,E3=aw;x3({target:"Symbol",stat:!0},{isRegisteredSymbol:E3});for(var C3=Er,sw=nn,k3=Ve,A3=Do,$3=Xe,Ya=sw("Symbol"),lw=Ya.isWellKnownSymbol,cw=sw("Object","getOwnPropertyNames"),T3=k3(Ya.prototype.valueOf),uw=C3("wks"),lf=0,fw=cw(Ya),O3=fw.length;lf<O3;lf++)try{var dw=fw[lf];A3(Ya[dw])&&$3(dw)}catch{}var pw=function(t){if(lw&&lw(t))return!0;try{for(var n=T3(t),r=0,o=cw(uw),i=o.length;r<i;r++)if(uw[o[r]]==n)return!0}catch{}return!1},I3=Pe,P3=pw;I3({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:P3});var D3=Be;D3("customMatcher");var _3=Be;_3("observable");var M3=Pe,N3=aw;M3({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:N3});var R3=Pe,L3=pw;R3({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:L3});var F3=Be;F3("matcher");var B3=Be;B3("metadataKey");var j3=Be;j3("patternMatch");var z3=Be;z3("replaceAll");var U3=g3,W3=U3,H3=W3;const Mr=ye(H3);var cf=Ve,K3=Aa,V3=Fo,q3=wa,G3=cf("".charAt),hw=cf("".charCodeAt),Y3=cf("".slice),vw=function(e){return function(t,n){var r=V3(q3(t)),o=K3(n),i=r.length,a,s;return o<0||o>=i?e?"":void 0:(a=hw(r,o),a<55296||a>56319||o+1===i||(s=hw(r,o+1))<56320||s>57343?e?G3(r,o):a:e?Y3(r,o,o+2):(a-55296<<10)+(s-56320)+65536)}},Q3={codeAt:vw(!1),charAt:vw(!0)},J3=Q3.charAt,Z3=Fo,mw=Bu,X3=Z1,gw=X1,yw="String Iterator",ez=mw.set,tz=mw.getterFor(yw);X3(String,"String",function(e){ez(this,{type:yw,string:Z3(e),index:0})},function(){var t=tz(this),n=t.string,r=t.index,o;return r>=n.length?gw(void 0,!0):(o=J3(n,r),t.index+=o.length,gw(o,!1))});var nz=Ro,bw=lu,rz=nu,oz=_r,iz=Xe,az=iz("iterator"),uf=function(e){if(!rz(e))return bw(e,az)||bw(e,"@@iterator")||oz[nz(e)]},sz=uf,lz=sz,cz=lz,uz=cz,fz=uz,dz=fz,pz=dz,hz=pz,vz=hz;const ww=ye(vz);var mz=bt,gz=$r,yz=TypeError,bz=Object.getOwnPropertyDescriptor,wz=mz&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}(),Sw=wz?function(e,t){if(gz(e)&&!bz(e,"length").writable)throw new yz("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Sz=Pe,xz=vn,Ez=Yn,Cz=Sw,kz=xu,Az=Je,$z=Az(function(){return[].push.call({length:4294967296},1)!==4294967297}),Tz=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},Oz=$z||!Tz();Sz({target:"Array",proto:!0,arity:1,forced:Oz},{push:function(t){var n=xz(this),r=Ez(n),o=arguments.length;kz(r+o);for(var i=0;i<o;i++)n[r]=arguments[i],r++;return Cz(n,r),r}});var Iz=Qe,Pz=it,Zn=function(e,t){var n=Pz[e+"Prototype"],r=n&&n[t];if(r)return r;var o=Iz[e],i=o&&o.prototype;return i&&i[t]},Dz=Zn,_z=Dz("Array","push"),Mz=hn,Nz=_z,ff=Array.prototype,Rz=function(e){var t=e.push;return e===ff||Mz(ff,e)&&t===ff.push?Nz:t},Lz=Rz,Fz=Lz,Bz=Fz,jz=Bz,zz=jz,Uz=zz,Wz=Uz;const Hz=ye(Wz);function Kz(e,t){var n=e==null?null:typeof Mr<"u"&&ww(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)&&(Hz(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 Vz=Pe,xw=$r,qz=Au,Gz=zt,Ew=Tu,Yz=Yn,Qz=tn,Jz=No,Zz=Xe,Xz=Ta,e5=Na,t5=Xz("slice"),n5=Zz("species"),df=Array,r5=Math.max;Vz({target:"Array",proto:!0,forced:!t5},{slice:function(t,n){var r=Qz(this),o=Yz(r),i=Ew(t,o),a=Ew(n===void 0?o:n,o),s,l,c;if(xw(r)&&(s=r.constructor,qz(s)&&(s===df||xw(s.prototype))?s=void 0:Gz(s)&&(s=s[n5],s===null&&(s=void 0)),s===df||s===void 0))return e5(r,i,a);for(l=new(s===void 0?df:s)(r5(a-i,0)),c=0;i<a;i++,c++)i in r&&Jz(l,c,r[i]);return l.length=c,l}});var o5=Zn,i5=o5("Array","slice"),a5=hn,s5=i5,pf=Array.prototype,l5=function(e){var t=e.slice;return e===pf||a5(pf,e)&&t===pf.slice?s5:t},c5=l5,u5=c5,f5=u5,d5=f5,p5=d5,h5=p5,v5=h5;const m5=ye(v5);var g5=en,Cw=In,y5=lu,b5=function(e,t,n){var r,o;Cw(e);try{if(r=y5(e,"return"),!r){if(t==="throw")throw n;return n}r=g5(r,e)}catch(i){o=!0,r=i}if(t==="throw")throw n;if(o)throw r;return Cw(r),n},w5=In,S5=b5,x5=function(e,t,n,r){try{return r?t(w5(n)[0],n[1]):t(n)}catch(o){S5(e,"throw",o)}},E5=Xe,C5=_r,k5=E5("iterator"),A5=Array.prototype,$5=function(e){return e!==void 0&&(C5.Array===e||A5[k5]===e)},T5=en,O5=Ea,I5=In,P5=xa,D5=uf,_5=TypeError,M5=function(e,t){var n=arguments.length<2?D5(e):t;if(O5(n))return I5(T5(n,e));throw new _5(P5(e)+" is not iterable")},N5=gu,R5=en,L5=vn,F5=x5,B5=$5,j5=Au,z5=Yn,kw=No,U5=M5,W5=uf,Aw=Array,H5=function(t){var n=L5(t),r=j5(this),o=arguments.length,i=o>1?arguments[1]:void 0,a=i!==void 0;a&&(i=N5(i,o>2?arguments[2]:void 0));var s=W5(n),l=0,c,u,f,p,d,v;if(s&&!(this===Aw&&B5(s)))for(u=r?new this:[],p=U5(n,s),d=p.next;!(f=R5(d,p)).done;l++)v=a?F5(p,i,[f.value,l],!0):f.value,kw(u,l,v);else for(c=z5(n),u=r?new this(c):Aw(c);c>l;l++)v=a?i(n[l],l):n[l],kw(u,l,v);return u.length=l,u},K5=Xe,$w=K5("iterator"),Tw=!1;try{var V5=0,Ow={next:function(){return{done:!!V5++}},return:function(){Tw=!0}};Ow[$w]=function(){return this},Array.from(Ow,function(){throw 2})}catch{}var q5=function(e,t){try{if(!t&&!Tw)return!1}catch{return!1}var n=!1;try{var r={};r[$w]=function(){return{next:function(){return{done:n=!0}}}},e(r)}catch{}return n},G5=Pe,Y5=H5,Q5=q5,J5=!Q5(function(e){Array.from(e)});G5({target:"Array",stat:!0,forced:J5},{from:Y5});var Z5=it,X5=Z5.Array.from,eU=X5,tU=eU,nU=tU,rU=nU,oU=rU,iU=oU,aU=iU;const Iw=ye(aU);function hf(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 Pw(e,t){if(e){var n;if(typeof e=="string")return hf(e,t);var r=m5(n={}.toString.call(e)).call(n,8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Iw(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hf(e,t):void 0}}function sU(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
281
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function on(e,t){return gL(e)||Kz(e,t)||Pw(e,t)||sU()}var Dw={exports:{}};/*!
|
|
277
282
|
Copyright (c) 2018 Jed Watson.
|
|
278
283
|
Licensed under the MIT License (MIT), see
|
|
279
284
|
http://jedwatson.github.io/classnames
|
|
280
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(
|
|
281
|
-
Valid keys: `+JSON.stringify(Object.keys(
|
|
282
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(e){return G6(e)||Y6(e)||k1(e)||X6()}var Ya=function(e){return e&&e.Math==Math&&e},Tt=Ya(typeof globalThis=="object"&&globalThis)||Ya(typeof window=="object"&&window)||Ya(typeof self=="object"&&self)||Ya(typeof Lt=="object"&&Lt)||function(){return this}()||Function("return this")(),wf={},Vt=function(e){try{return!!e()}catch{return!0}},J6=Vt,Qn=!J6(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),N1={},L1={}.propertyIsEnumerable,R1=Object.getOwnPropertyDescriptor,Z6=R1&&!L1.call({1:2},1);N1.f=Z6?function(t){var n=R1(this,t);return!!n&&n.enumerable}:L1;var F1=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Q6={}.toString,Sf=function(e){return Q6.call(e).slice(8,-1)},eW=Vt,tW=Sf,nW="".split,rW=eW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return tW(e)=="String"?nW.call(e,""):Object(e)}:Object,Xa=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},oW=rW,iW=Xa,xf=function(e){return oW(iW(e))},Mt=function(e){return typeof e=="function"},aW=Mt,Vo=function(e){return typeof e=="object"?e!==null:aW(e)},Ef=Tt,sW=Mt,lW=function(e){return sW(e)?e:void 0},Ja=function(e,t){return arguments.length<2?lW(Ef[e]):Ef[e]&&Ef[e][t]},cW=Ja,uW=cW("navigator","userAgent")||"",j1=Tt,kf=uW,B1=j1.process,z1=j1.Deno,W1=B1&&B1.versions||z1&&z1.version,U1=W1&&W1.v8,an,Za;U1?(an=U1.split("."),Za=an[0]<4?1:an[0]+an[1]):kf&&(an=kf.match(/Edge\/(\d+)/),(!an||an[1]>=74)&&(an=kf.match(/Chrome\/(\d+)/),an&&(Za=an[1])));var fW=Za&&+Za,H1=fW,dW=Vt,V1=!!Object.getOwnPropertySymbols&&!dW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&H1&&H1<41}),pW=V1,q1=pW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",hW=Mt,vW=Ja,mW=q1,K1=mW?function(e){return typeof e=="symbol"}:function(e){var t=vW("Symbol");return hW(t)&&Object(e)instanceof t},gW=function(e){try{return String(e)}catch{return"Object"}},yW=Mt,bW=gW,wW=function(e){if(yW(e))return e;throw TypeError(bW(e)+" is not a function")},SW=wW,G1=function(e,t){var n=e[t];return n==null?void 0:SW(n)},Cf=Mt,$f=Vo,xW=function(e,t){var n,r;if(t==="string"&&Cf(n=e.toString)&&!$f(r=n.call(e))||Cf(n=e.valueOf)&&!$f(r=n.call(e))||t!=="string"&&Cf(n=e.toString)&&!$f(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},Y1={exports:{}},X1=Tt,Tf=function(e,t){try{Object.defineProperty(X1,e,{value:t,configurable:!0,writable:!0})}catch{X1[e]=t}return t},EW=Tt,kW=Tf,J1="__core-js_shared__",CW=EW[J1]||kW(J1,{}),Of=CW,Z1=Of;(Y1.exports=function(e,t){return Z1[e]||(Z1[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var If=Y1.exports,$W=Xa,Q1=function(e){return Object($W(e))},TW=Q1,OW={}.hasOwnProperty,er=Object.hasOwn||function(t,n){return OW.call(TW(t),n)},IW=0,PW=Math.random(),eS=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++IW+PW).toString(36)},AW=Tt,_W=If,tS=er,DW=eS,nS=V1,MW=q1,qo=_W("wks"),Ko=AW.Symbol,NW=MW?Ko:Ko&&Ko.withoutSetter||DW,Go=function(e){return(!tS(qo,e)||!(nS||typeof qo[e]=="string"))&&(nS&&tS(Ko,e)?qo[e]=Ko[e]:qo[e]=NW("Symbol."+e)),qo[e]},rS=Vo,oS=K1,LW=G1,RW=xW,FW=Go,jW=FW("toPrimitive"),BW=function(e,t){if(!rS(e)||oS(e))return e;var n=LW(e,jW),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!rS(r)||oS(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),RW(e,t)},zW=BW,WW=K1,iS=function(e){var t=zW(e,"string");return WW(t)?t:String(t)},UW=Tt,aS=Vo,Pf=UW.document,HW=aS(Pf)&&aS(Pf.createElement),sS=function(e){return HW?Pf.createElement(e):{}},VW=Qn,qW=Vt,KW=sS,lS=!VW&&!qW(function(){return Object.defineProperty(KW("div"),"a",{get:function(){return 7}}).a!=7}),GW=Qn,YW=N1,XW=F1,JW=xf,ZW=iS,QW=er,eU=lS,cS=Object.getOwnPropertyDescriptor;wf.f=GW?cS:function(t,n){if(t=JW(t),n=ZW(n),eU)try{return cS(t,n)}catch{}if(QW(t,n))return XW(!YW.f.call(t,n),t[n])};var Yo={},tU=Vo,_n=function(e){if(tU(e))return e;throw TypeError(String(e)+" is not an object")},nU=Qn,rU=lS,uS=_n,oU=iS,fS=Object.defineProperty;Yo.f=nU?fS:function(t,n,r){if(uS(t),n=oU(n),uS(r),rU)try{return fS(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 iU=Qn,aU=Yo,sU=F1,Qa=iU?function(e,t,n){return aU.f(e,t,sU(1,n))}:function(e,t,n){return e[t]=n,e},dS={exports:{}},lU=Mt,Af=Of,cU=Function.toString;lU(Af.inspectSource)||(Af.inspectSource=function(e){return cU.call(e)});var pS=Af.inspectSource,uU=Tt,fU=Mt,dU=pS,hS=uU.WeakMap,pU=fU(hS)&&/native code/.test(dU(hS)),hU=If,vU=eS,vS=hU("keys"),mS=function(e){return vS[e]||(vS[e]=vU(e))},_f={},mU=pU,gU=Tt,yU=Vo,bU=Qa,Df=er,Mf=Of,wU=mS,SU=_f,gS="Object already initialized",xU=gU.WeakMap,es,Xo,ts,EU=function(e){return ts(e)?Xo(e):es(e,{})},kU=function(e){return function(t){var n;if(!yU(t)||(n=Xo(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(mU||Mf.state){var tr=Mf.state||(Mf.state=new xU),CU=tr.get,yS=tr.has,$U=tr.set;es=function(e,t){if(yS.call(tr,e))throw new TypeError(gS);return t.facade=e,$U.call(tr,e,t),t},Xo=function(e){return CU.call(tr,e)||{}},ts=function(e){return yS.call(tr,e)}}else{var Nr=wU("state");SU[Nr]=!0,es=function(e,t){if(Df(e,Nr))throw new TypeError(gS);return t.facade=e,bU(e,Nr,t),t},Xo=function(e){return Df(e,Nr)?e[Nr]:{}},ts=function(e){return Df(e,Nr)}}var bS={set:es,get:Xo,has:ts,enforce:EU,getterFor:kU},Nf=Qn,TU=er,wS=Function.prototype,OU=Nf&&Object.getOwnPropertyDescriptor,Lf=TU(wS,"name"),IU=Lf&&(function(){}).name==="something",PU=Lf&&(!Nf||Nf&&OU(wS,"name").configurable),Rf={EXISTS:Lf,PROPER:IU,CONFIGURABLE:PU},AU=Tt,SS=Mt,_U=er,xS=Qa,DU=Tf,MU=pS,ES=bS,NU=Rf.CONFIGURABLE,LU=ES.get,RU=ES.enforce,FU=String(String).split("String");(dS.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(SS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!_U(n,"name")||NU&&n.name!==s)&&xS(n,"name",s),l=RU(n),l.source||(l.source=FU.join(typeof s=="string"?s:""))),e===AU){i?e[t]=n:DU(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:xS(e,t,n)})(Function.prototype,"toString",function(){return SS(this)&&LU(this).source||MU(this)});var Jo=dS.exports,kS={},jU=Math.ceil,BU=Math.floor,ns=function(e){var t=+e;return t!==t||t===0?0:(t>0?BU:jU)(t)},zU=ns,WU=Math.max,UU=Math.min,HU=function(e,t){var n=zU(e);return n<0?WU(n+t,0):UU(n,t)},VU=ns,qU=Math.min,CS=function(e){return e>0?qU(VU(e),9007199254740991):0},KU=CS,GU=function(e){return KU(e.length)},YU=xf,XU=HU,JU=GU,$S=function(e){return function(t,n,r){var o=YU(t),i=JU(o),a=XU(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}},ZU={includes:$S(!0),indexOf:$S(!1)},Ff=er,QU=xf,eH=ZU.indexOf,tH=_f,TS=function(e,t){var n=QU(e),r=0,o=[],i;for(i in n)!Ff(tH,i)&&Ff(n,i)&&o.push(i);for(;t.length>r;)Ff(n,i=t[r++])&&(~eH(o,i)||o.push(i));return o},jf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],nH=TS,rH=jf,oH=rH.concat("length","prototype");kS.f=Object.getOwnPropertyNames||function(t){return nH(t,oH)};var OS={};OS.f=Object.getOwnPropertySymbols;var iH=Ja,aH=kS,sH=OS,lH=_n,cH=iH("Reflect","ownKeys")||function(t){var n=aH.f(lH(t)),r=sH.f;return r?n.concat(r(t)):n},uH=er,fH=cH,dH=wf,pH=Yo,hH=function(e,t){for(var n=fH(t),r=pH.f,o=dH.f,i=0;i<n.length;i++){var a=n[i];uH(e,a)||r(e,a,o(t,a))}},vH=Vt,mH=Mt,gH=/#|\.prototype\./,Zo=function(e,t){var n=bH[yH(e)];return n==SH?!0:n==wH?!1:mH(t)?vH(t):!!t},yH=Zo.normalize=function(e){return String(e).replace(gH,".").toLowerCase()},bH=Zo.data={},wH=Zo.NATIVE="N",SH=Zo.POLYFILL="P",xH=Zo,Bf=Tt,EH=wf.f,kH=Qa,CH=Jo,$H=Tf,TH=hH,OH=xH,IH=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,l,c,u;if(r?a=Bf:o?a=Bf[n]||$H(n,{}):a=(Bf[n]||{}).prototype,a)for(s in t){if(c=t[s],e.noTargetGet?(u=EH(a,s),l=u&&u.value):l=a[s],i=OH(r?s:n+(o?".":"#")+s,e.forced),!i&&l!==void 0){if(typeof c==typeof l)continue;TH(c,l)}(e.sham||l&&l.sham)&&kH(c,"sham",!0),CH(a,s,c,e)}},PH=Go,AH=PH("toStringTag"),IS={};IS[AH]="z";var zf=String(IS)==="[object z]",_H=zf,DH=Mt,rs=Sf,MH=Go,NH=MH("toStringTag"),LH=rs(function(){return arguments}())=="Arguments",RH=function(e,t){try{return e[t]}catch{}},PS=_H?rs:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=RH(t=Object(e),NH))=="string"?n:LH?rs(t):(r=rs(t))=="Object"&&DH(t.callee)?"Arguments":r},FH=PS,os=function(e){if(FH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},jH=_n,AS=function(){var e=jH(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},Wf={},_S=Vt,BH=Tt,DS=BH.RegExp;Wf.UNSUPPORTED_Y=_S(function(){var e=DS("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Wf.BROKEN_CARET=_S(function(){var e=DS("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var zH=TS,WH=jf,UH=Object.keys||function(t){return zH(t,WH)},HH=Qn,VH=Yo,qH=_n,KH=UH,GH=HH?Object.defineProperties:function(t,n){qH(t);for(var r=KH(n),o=r.length,i=0,a;o>i;)VH.f(t,a=r[i++],n[a]);return t},YH=Ja,XH=YH("document","documentElement"),JH=_n,ZH=GH,MS=jf,QH=_f,e9=XH,t9=sS,n9=mS,NS=">",LS="<",Uf="prototype",Hf="script",RS=n9("IE_PROTO"),Vf=function(){},FS=function(e){return LS+Hf+NS+e+LS+"/"+Hf+NS},jS=function(e){e.write(FS("")),e.close();var t=e.parentWindow.Object;return e=null,t},r9=function(){var e=t9("iframe"),t="java"+Hf+":",n;return e.style.display="none",e9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(FS("document.F=Object")),n.close(),n.F},is,as=function(){try{is=new ActiveXObject("htmlfile")}catch{}as=typeof document<"u"?document.domain&&is?jS(is):r9():jS(is);for(var e=MS.length;e--;)delete as[Uf][MS[e]];return as()};QH[RS]=!0;var o9=Object.create||function(t,n){var r;return t!==null?(Vf[Uf]=JH(t),r=new Vf,Vf[Uf]=null,r[RS]=t):r=as(),n===void 0?r:ZH(r,n)},i9=Vt,a9=Tt,s9=a9.RegExp,l9=i9(function(){var e=s9(".","s");return!(e.dotAll&&e.exec(`
|
|
283
|
-
`)&&e.flags==="s")}),
|
|
284
|
-
`)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),Gf&&(s=new RegExp("^"+g+"$(?!\\s)",h)),Kf&&(l=n.lastIndex),c=ss.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:Kf&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),Gf&&c&&c.length>1&&w9.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=m9(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var Yf=qf,x9=IH,WS=Yf;x9({target:"RegExp",proto:!0,forced:/./.exec!==WS},{exec:WS});var US=Jo,E9=Yf,HS=Vt,VS=Go,k9=Qa,C9=VS("species"),Xf=RegExp.prototype,$9=function(e,t,n,r){var o=VS(e),i=!HS(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!HS(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[C9]=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===E9||v===Xf.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});US(String.prototype,e,l[0]),US(Xf,o,l[1])}r&&k9(Xf[o],"sham",!0)},T9=ns,O9=os,I9=Xa,qS=function(e){return function(t,n){var r=O9(I9(t)),o=T9(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)}},P9={codeAt:qS(!1),charAt:qS(!0)},A9=P9.charAt,_9=function(e,t,n){return t+(n?A9(e,t).length:1)},D9=Q1,M9=Math.floor,N9="".replace,L9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,R9=/\$([$&'`]|\d{1,2})/g,F9=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=R9;return o!==void 0&&(o=D9(o),l=L9),N9.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=M9(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})},j9=_n,B9=Mt,z9=Sf,W9=Yf,U9=function(e,t){var n=e.exec;if(B9(n)){var r=n.call(e,t);return r!==null&&j9(r),r}if(z9(e)==="RegExp")return W9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},H9=$9,V9=Vt,q9=_n,K9=Mt,G9=ns,Y9=CS,Lr=os,X9=Xa,J9=_9,Z9=G1,Q9=F9,eV=U9,tV=Go,Jf=tV("replace"),nV=Math.max,rV=Math.min,oV=function(e){return e===void 0?e:String(e)},iV=function(){return"a".replace(/./,"$0")==="$0"}(),KS=function(){return/./[Jf]?/./[Jf]("a","$0")==="":!1}(),aV=!V9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});H9("replace",function(e,t,n){var r=KS?"$":"$0";return[function(i,a){var s=X9(this),l=i==null?void 0:Z9(i,Jf);return l?l.call(i,s,a):t.call(Lr(s),i,a)},function(o,i){var a=q9(this),s=Lr(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=K9(i);c||(i=Lr(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=eV(a,s);if(d===null||(p.push(d),!u))break;var v=Lr(d[0]);v===""&&(a.lastIndex=J9(s,Y9(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=Lr(d[0]),w=nV(rV(G9(d.index),s.length),0),$=[],x=1;x<d.length;x++)$.push(oV(d[x]));var E=d.groups;if(c){var T=[b].concat($,w,s);E!==void 0&&T.push(E);var R=Lr(i.apply(void 0,T))}else R=Q9(b,s,w,$,E,i);w>=g&&(h+=s.slice(g,w)+R,g=w+b.length)}return h+s.slice(g)}]},!aV||!iV||KS);var Qo=Ye,sV=Jc,lV=Gn,ls=function(e){return sV.slice(0,e.length)===e},cV=function(){return ls("Bun/")?"BUN":ls("Cloudflare-Workers")?"CLOUDFLARE":ls("Deno/")?"DENO":ls("Node.js/")?"NODE":Qo.Bun&&typeof Bun.version=="string"?"BUN":Qo.Deno&&typeof Deno.version=="object"?"DENO":lV(Qo.process)==="process"?"NODE":Qo.window&&Qo.document?"BROWSER":"REST"}(),uV=TypeError,fV=function(e,t){if(e<t)throw new uV("Not enough arguments");return e},GS=Ye,dV=Wc,pV=ut,hV=cV,vV=Jc,mV=Da,gV=fV,yV=GS.Function,bV=/MSIE .\./.test(vV)||hV==="BUN"&&function(){var e=GS.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),YS=function(e,t){var n=t?2:1;return bV?function(r,o){var i=gV(arguments.length,1)>n,a=pV(r)?r:yV(r),s=i?mV(arguments,n):[],l=i?function(){dV(a,this,s)}:a;return t?e(l,o):e(l)}:e},wV=Ae,XS=Ye,SV=YS,JS=SV(XS.setInterval,!0);wV({global:!0,bind:!0,forced:XS.setInterval!==JS},{setInterval:JS});var xV=Ae,ZS=Ye,EV=YS,QS=EV(ZS.setTimeout,!0);xV({global:!0,bind:!0,forced:ZS.setTimeout!==QS},{setTimeout:QS});var kV=it,CV=kV.setInterval,$V=CV;const TV=be($V);var OV=Xe,e0=function(e,t){var n=[][e];return!!n&&OV(function(){n.call(null,t||function(){return 1},1)})},IV=Ae,PV=Hc,AV=Ab.indexOf,_V=e0,Zf=PV([].indexOf),t0=!!Zf&&1/Zf([1],1,-0)<0,DV=t0||!_V("indexOf");IV({target:"Array",proto:!0,forced:DV},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return t0?Zf(this,t,n)||0:AV(this,t,n)}});var MV=Zn,NV=MV("Array","indexOf"),LV=hn,RV=NV,Qf=Array.prototype,FV=function(e){var t=e.indexOf;return e===Qf||LV(Qf,e)&&t===Qf.indexOf?RV:t},jV=FV,BV=jV,zV=BV;const WV=be(zV);var n0=wa,UV=TypeError,HV=function(e,t){if(!delete e[t])throw new UV("Cannot delete property "+n0(t)+" of "+n0(e))},VV=Ae,qV=vn,KV=wu,GV=ka,YV=Yn,XV=h1,JV=hu,ZV=bu,QV=Do,ed=HV,e7=$a,t7=e7("splice"),n7=Math.max,r7=Math.min;VV({target:"Array",proto:!0,forced:!t7},{splice:function(t,n){var r=qV(this),o=YV(r),i=KV(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=r7(n7(GV(n),0),o-i)),JV(o+s-l),c=ZV(r,l),u=0;u<l;u++)f=i+u,f in r&&QV(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]:ed(r,p);for(u=o;u>o-l+s;u--)ed(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]:ed(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return XV(r,o-l+s),c}});var o7=Zn,i7=o7("Array","splice"),a7=hn,s7=i7,td=Array.prototype,l7=function(e){var t=e.splice;return e===td||a7(td,e)&&t===td.splice?s7:t},c7=l7,u7=c7,f7=u7;const d7=be(f7);var p7=Zn,h7=p7("Array","concat"),v7=hn,m7=h7,nd=Array.prototype,g7=function(e){var t=e.concat;return e===nd||v7(nd,e)&&t===nd.concat?m7:t},y7=g7,b7=y7,w7=b7;const Be=be(w7);var S7=Ae,x7=Ve,r0=Date,E7=x7(r0.prototype.getTime);S7({target:"Date",stat:!0},{now:function(){return E7(new r0)}});var k7=it,C7=k7.Date.now,$7=C7,T7=$7,O7=T7;const Dn=be(O7);var I7=_u.forEach,P7=e0,A7=P7("forEach"),_7=A7?[].forEach:function(t){return I7(this,t,arguments.length>1?arguments[1]:void 0)},D7=Ae,o0=_7;D7({target:"Array",proto:!0,forced:[].forEach!==o0},{forEach:o0});var M7=Zn,N7=M7("Array","forEach"),L7=N7,R7=L7,F7=Mo,j7=$t,B7=hn,z7=R7,rd=Array.prototype,W7={DOMTokenList:!0,NodeList:!0},U7=function(e){var t=e.forEach;return e===rd||B7(rd,e)&&t===rd.forEach||j7(W7,F7(e))?z7:t},H7=U7;const cs=be(H7);var V7=Ae,q7=vn,i0=Eu,K7=Xe,G7=K7(function(){i0(1)});V7({target:"Object",stat:!0,forced:G7},{keys:function(t){return i0(q7(t))}});var Y7=it,X7=Y7.Object.keys,J7=X7,Z7=J7,Q7=Z7;const e8=be(Q7);var t8=it,n8=t8.Object.getOwnPropertySymbols,r8=n8,o8=r8,i8=o8;const a0=be(i8);var a8=Ae,s8=_u.filter,l8=$a,c8=l8("filter");a8({target:"Array",proto:!0,forced:!c8},{filter:function(t){return s8(this,t,arguments.length>1?arguments[1]:void 0)}});var u8=Zn,f8=u8("Array","filter"),d8=hn,p8=f8,od=Array.prototype,h8=function(e){var t=e.filter;return e===od||d8(od,e)&&t===od.filter?p8:t},v8=h8,m8=v8,g8=m8;const y8=be(g8);var s0={exports:{}},b8=Ae,w8=Xe,S8=tn,l0=Oo.f,c0=gt,x8=!c0||w8(function(){l0(1)});b8({target:"Object",stat:!0,forced:x8,sham:!c0},{getOwnPropertyDescriptor:function(t,n){return l0(S8(t),n)}});var E8=it,u0=E8.Object,k8=s0.exports=function(t,n){return u0.getOwnPropertyDescriptor(t,n)};u0.getOwnPropertyDescriptor.sham&&(k8.sham=!0);var C8=s0.exports,$8=C8,T8=$8,O8=T8;const f0=be(O8);var I8=nn,P8=Ve,A8=_a,_8=Ma,D8=In,M8=P8([].concat),N8=I8("Reflect","ownKeys")||function(t){var n=A8.f(D8(t)),r=_8.f;return r?M8(n,r(t)):n},L8=Ae,R8=gt,F8=N8,j8=tn,B8=Oo,z8=Do;L8({target:"Object",stat:!0,sham:!R8},{getOwnPropertyDescriptors:function(t){for(var n=j8(t),r=B8.f,o=F8(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&z8(i,s,l);return i}});var W8=it,U8=W8.Object.getOwnPropertyDescriptors,H8=U8,V8=H8,q8=V8;const d0=be(q8);var p0={exports:{}},K8=Ae,G8=gt,h0=Ta.f;K8({target:"Object",stat:!0,forced:Object.defineProperties!==h0,sham:!G8},{defineProperties:h0});var Y8=it,v0=Y8.Object,X8=p0.exports=function(t,n){return v0.defineProperties(t,n)};v0.defineProperties.sham&&(X8.sham=!0);var J8=p0.exports,Z8=J8,Q8=Z8,eq=Q8;const tq=be(eq);var nq=M1;const rq=be(nq);var oq=!1;function iq(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 aq(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 sq=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?!oq: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(aq(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=iq(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-",us="-moz-",ke="-webkit-",m0="comm",id="rule",ad="decl",lq="@import",g0="@keyframes",cq="@layer",uq=Math.abs,fs=String.fromCharCode,fq=Object.assign;function dq(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 y0(e){return e.trim()}function pq(e,t){return(e=t.exec(e))?e[0]:e}function Ce(e,t,n){return e.replace(t,n)}function sd(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function ei(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function ld(e){return e.length}function ds(e,t){return t.push(e),e}function hq(e,t){return e.map(t).join("")}var ps=1,Rr=1,b0=0,bt=0,qe=0,Fr="";function hs(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ps,column:Rr,length:a,return:""}}function ti(e,t){return fq(hs("",null,null,"",null,null,0),e,{length:-e.length},t)}function vq(){return qe}function mq(){return qe=bt>0?at(Fr,--bt):0,Rr--,qe===10&&(Rr=1,ps--),qe}function Ot(){return qe=bt<b0?at(Fr,bt++):0,Rr++,qe===10&&(Rr=1,ps++),qe}function ln(){return at(Fr,bt)}function vs(){return bt}function ni(e,t){return ei(Fr,e,t)}function ri(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 w0(e){return ps=Rr=1,b0=sn(Fr=e),bt=0,[]}function S0(e){return Fr="",e}function ms(e){return y0(ni(bt-1,cd(e===91?e+2:e===40?e+1:e)))}function gq(e){for(;(qe=ln())&&qe<33;)Ot();return ri(e)>2||ri(qe)>3?"":" "}function yq(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return ni(e,vs()+(t<6&&ln()==32&&Ot()==32))}function cd(e){for(;Ot();)switch(qe){case e:return bt;case 34:case 39:e!==34&&e!==39&&cd(qe);break;case 40:e===41&&cd(e);break;case 92:Ot();break}return bt}function bq(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&ln()===47)break;return"/*"+ni(t,bt-1)+"*"+fs(e===47?e:Ot())}function wq(e){for(;!ri(ln());)Ot();return ni(e,bt)}function Sq(e){return S0(gs("",null,null,null,[""],e=w0(e),0,[0],e))}function gs(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="",$=o,x=i,E=r,T=w;g;)switch(v=b,b=Ot()){case 40:if(v!=108&&at(T,f-1)==58){sd(T+=Ce(ms(b),"&","&\f"),"&\f")!=-1&&(m=-1);break}case 34:case 39:case 91:T+=ms(b);break;case 9:case 10:case 13:case 32:T+=gq(v);break;case 92:T+=yq(vs()-1,7);continue;case 47:switch(ln()){case 42:case 47:ds(xq(bq(Ot(),vs()),t,n),l);break;default:T+="/"}break;case 123*h:s[c++]=sn(T)*m;case 125*h:case 59:case 0:switch(b){case 0:case 125:g=0;case 59+u:m==-1&&(T=Ce(T,/\f/g,"")),d>0&&sn(T)-f&&ds(d>32?E0(T+";",r,n,f-1):E0(Ce(T," ","")+";",r,n,f-2),l);break;case 59:T+=";";default:if(ds(E=x0(T,t,n,c,u,o,s,w,$=[],x=[],f),i),b===123)if(u===0)gs(T,t,E,E,$,i,f,s,x);else switch(p===99&&at(T,3)===110?100:p){case 100:case 108:case 109:case 115:gs(e,E,E,r&&ds(x0(e,E,E,0,0,o,s,w,o,$=[],f),x),o,x,f,s,r?$:x);break;default:gs(T,E,E,E,[""],x,0,s,x)}}c=u=d=0,h=m=1,w=T="",f=a;break;case 58:f=1+sn(T),d=v;default:if(h<1){if(b==123)--h;else if(b==125&&h++==0&&mq()==125)continue}switch(T+=fs(b),b*h){case 38:m=u>0?1:(T+="\f",-1);break;case 44:s[c++]=(sn(T)-1)*m,m=1;break;case 64:ln()===45&&(T+=ms(Ot())),p=ln(),u=f=sn(w=T+=wq(vs())),b++;break;case 45:v===45&&sn(T)==2&&(h=0)}}return i}function x0(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=ld(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=ei(e,f+1,f=uq(h=a[v])),w=e;m<d;++m)(w=y0(h>0?p[m]+" "+b:Ce(b,/&\f/g,p[m])))&&(l[g++]=w);return hs(e,t,n,o===0?id:s,l,c,u)}function xq(e,t,n){return hs(e,t,n,m0,fs(vq()),ei(e,2,-2),0)}function E0(e,t,n,r){return hs(e,t,n,ad,ei(e,0,r),ei(e,r+1,-1),r)}function jr(e,t){for(var n="",r=ld(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Eq(e,t,n,r){switch(e.type){case cq:if(e.children.length)break;case lq:case ad:return e.return=e.return||e.value;case m0:return"";case g0:return e.return=e.value+"{"+jr(e.children,r)+"}";case id:e.value=e.props.join(",")}return sn(n=jr(e.children,r))?e.return=e.value+"{"+n+"}":""}function kq(e){var t=ld(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 Cq(e){return function(t){t.root||(t=t.return)&&e(t)}}function $q(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Tq=function(t,n,r){for(var o=0,i=0;o=i,i=ln(),o===38&&i===12&&(n[r]=1),!ri(i);)Ot();return ni(t,bt)},Oq=function(t,n){var r=-1,o=44;do switch(ri(o)){case 0:o===38&&ln()===12&&(n[r]=1),t[r]+=Tq(bt-1,n,r);break;case 2:t[r]+=ms(o);break;case 4:if(o===44){t[++r]=ln()===58?"&\f":"",n[r]=t[r].length;break}default:t[r]+=fs(o)}while(o=Ot());return t},Iq=function(t,n){return S0(Oq(w0(t),n))},k0=new WeakMap,Pq=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&&!k0.get(r))&&!o){k0.set(t,!0);for(var i=[],a=Iq(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]}}},Aq=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function C0(e,t){switch(dq(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+us+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"+us+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~sd(e,"stretch")?C0(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-(~sd(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 _q=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case ad:t.return=C0(t.value,t.length);break;case g0:return jr([ti(t,{value:Ce(t.value,"@","@"+ke)})],o);case id:if(t.length)return hq(t.props,function(i){switch(pq(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return jr([ti(t,{props:[Ce(i,/:(read-\w+)/,":"+us+"$1")]})],o);case"::placeholder":return jr([ti(t,{props:[Ce(i,/:(plac\w+)/,":"+ke+"input-$1")]}),ti(t,{props:[Ce(i,/:(plac\w+)/,":"+us+"$1")]}),ti(t,{props:[Ce(i,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},Dq=[_q],Mq=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||Dq,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=[Pq,Aq];{var u,f=[Eq,Cq(function(h){u.insert(h)})],p=kq(c.concat(o,f)),d=function(g){return jr(Sq(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 sq({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 Nq(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 Lq={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},Rq=!1,Fq=/[A-Z]|^ms/g,jq=/_EMO_([^_]+?)_([^]*?)_EMO_/g,$0=function(t){return t.charCodeAt(1)===45},T0=function(t){return t!=null&&typeof t!="boolean"},ud=$q(function(e){return $0(e)?e:e.replace(Fq,"-$&").toLowerCase()}),O0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(jq,function(r,o,i){return Mn={name:o,styles:i,next:Mn},o})}return Lq[t]!==1&&!$0(t)&&typeof n=="number"&&n!==0?n+"px":n},Bq="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function ys(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 Mn={name:o.name,styles:o.styles,next:Mn},o.name;var i=n;if(i.styles!==void 0){var a=i.next;if(a!==void 0)for(;a!==void 0;)Mn={name:a.name,styles:a.styles,next:Mn},a=a.next;var s=i.styles+";";return s}return zq(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function zq(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=ys(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]+"}":T0(s)&&(r+=ud(i)+":"+O0(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&Rq)throw new Error(Bq);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)T0(a[l])&&(r+=ud(i)+":"+O0(i,a[l])+";");else{var c=ys(e,t,a);switch(i){case"animation":case"animationName":{r+=ud(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var I0=/label:\s*([^\s;{]+)\s*(;|$)/g,Mn;function fd(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="";Mn=void 0;var i=e[0];if(i==null||i.raw===void 0)r=!1,o+=ys(n,t,i);else{var a=i;o+=a[0]}for(var s=1;s<e.length;s++)if(o+=ys(n,t,e[s]),r){var l=i;o+=l[s]}I0.lastIndex=0;for(var c="",u;(u=I0.exec(o))!==null;)c+="-"+u[1];var f=Nq(o)+c;return{name:f,styles:o,next:Mn}}function P0(e,t,n){var r="";return n.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(r+=o+" ")}),r}var Wq=function(t,n,r){var o=t.key+"-"+n.name;t.registered[o]===void 0&&(t.registered[o]=n.styles)},Uq=function(t,n,r){Wq(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 A0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function _0(e,t,n){var r=[],o=P0(e,r,n);return r.length<2?n:o+t(r)}var Hq=function(t){var n=Mq(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=fd(c,n.registered,void 0);return Uq(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=fd(c,n.registered),p="animation-"+f.name;return A0(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=fd(c,n.registered);A0(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return _0(n.registered,r,Vq(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:P0.bind(null,n.registered),merge:_0.bind(null,n.registered,r)}},Vq=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},qq=Jo,dd=Date.prototype,D0="Invalid Date",M0="toString",Kq=dd[M0],Gq=dd.getTime;String(new Date(NaN))!=D0&&qq(dd,M0,function(){var t=Gq.call(this);return t===t?Kq.call(this):D0});var Yq=zf,Xq=PS,Jq=Yq?{}.toString:function(){return"[object "+Xq(this)+"]"},Zq=zf,Qq=Jo,eK=Jq;Zq||Qq(Object.prototype,"toString",eK,{unsafe:!0});var tK=Rf.PROPER,nK=Jo,rK=_n,N0=os,oK=Vt,iK=AS,pd="toString",L0=RegExp.prototype,R0=L0[pd],aK=oK(function(){return R0.call({source:"a",flags:"b"})!="/a/b"}),sK=tK&&R0.name!=pd;(aK||sK)&&nK(RegExp.prototype,pd,function(){var t=rK(this),n=N0(t.source),r=t.flags,o=N0(r===void 0&&t instanceof RegExp&&!("flags"in L0)?iK.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var F0=typeof window<"u"?window:self,lK=F0.crypto||F0.msCrypto,cK=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}}(lK);const uK=be(cK);function fK(){return uK().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var dK=yb;const j0=be(dK);function Oe(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 B0(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(Oe("green","white")),i)}function pK(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=j0(i[0])?i:[i],f=u.length===1;cs(u).call(u,function(p,d){if(f){var v,h;(v=console).log.apply(v,Se(B0.apply(void 0,Be(h=[e]).call(h,Se(p)))))}else if(d){var g;(g=console).log.apply(g,Se(j0(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,Se(B0.apply(void 0,Be(b=[e]).call(b,Se(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var hK=Qn,vK=Rf.EXISTS,mK=Yo.f,z0=Function.prototype,gK=z0.toString,yK=/^\s*function ([^ (]*)/,bK="name";hK&&!vK&&mK(z0,bK,{configurable:!0,get:function(){try{return gK.call(this).match(yK)[1]}catch{return""}}});var wK=it,SK=wK.setTimeout,xK=SK;const EK=be(xK);function kK(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=Dn();s-n>t?(e.apply(void 0,i),n=s):(clearTimeout(r),r=EK(function(){e.apply(void 0,i),n=Dn()},Math.max(0,t-s+n)))}}var W0=function(t){var n=t.debounce,r=t.name,o=t.onEvent,i=t.target,a=P.useRef();a.current=o;var s=P.useMemo(function(){return kK(function(c){var u=a.current;u&&u(c)},n)},[n,a]),l=P.useCallback(function(c){c.timeStampLow=Dn(),s(c)},[s]);return P.useLayoutEffect(function(){return i.addEventListener(r,l,{passive:!0}),l({target:i,type:r}),function(){return i.removeEventListener(r,l)}},[r,l,i]),!1};W0.defaultProps={debounce:200};var CK=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},$K=Ae,TK=CK;$K({target:"Math",stat:!0},{sign:TK});var OK=it,IK=OK.Math.sign,PK=IK,AK=PK,_K=AK;const DK=be(_K);function MK(e,t){var n=DK(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 NK(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var U0=function(t){var n=t.name,r=t.onEnd,o=t.target,i=t.value,a=P.useRef(),s=P.useCallback(function(c,u,f,p){var d=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Dn();(f==="100%"||typeof f=="number")&&(cancelAnimationFrame(a.current),a.current=requestAnimationFrame(function(){if(o){var v=f==="100%"?o.scrollHeight-o.offsetHeight:f,h=NK(u,v,MK,(Dn()-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=P.useCallback(function(){cancelAnimationFrame(a.current),r&&r(!1)},[r]);return P.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};U0.propTypes={name:xe.string.isRequired,onEnd:xe.func,target:xe.any.isRequired,value:xe.oneOfType([xe.number,xe.oneOf(["100%"])]).isRequired};function hd(e){var t=P.useState(e),n=on(t,2),r=n[0],o=n[1],i=P.useRef(),a=P.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 H0(e,t){var n=e8(e);if(a0){var r=a0(e);t&&(r=y8(r).call(r,function(o){return f0(e,o).enumerable})),n.push.apply(n,r)}return n}function V0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;cs(r=H0(Object(n),!0)).call(r,function(i){K6(e,i,n[i])})}else if(d0)tq(e,d0(n));else{var o;cs(o=H0(Object(n))).call(o,function(i){rq(e,i,f0(n,i))})}}return e}var LK=function(){return 1/0},q0=17,RK="bottom",qt="top",K0=1,FK=34,G0={};function jK(e,t){return e(),TV(e,t)}function Y0(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<K0,s=i<K0,l=t===qt?s:a,c=t!==qt?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function oi(e,t){return e===(t===qt?0:"100%")}var vd=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=P.useMemo(function(){return pK("<ScrollToBottom>",{force:i})},[i]);s=s===qt?qt:RK;var f=P.useRef(0),p=P.useRef(a),d=hd(s===qt?0:"100%"),v=on(d,3),h=v[0],g=v[1],m=v[2],b=hd(null),w=on(b,3),$=w[0],x=w[1],E=w[2],T=P.useRef(0),R=P.useRef(0),U=P.useRef(0),O=P.useState(!0),D=on(O,2),F=D[0],j=D[1],B=P.useState(!0),M=on(B,2),L=M[0],G=M[1],H=P.useState(!0),A=on(H,2),y=A[0],_=A[1],I=P.useState(!1),S=on(I,2),N=S[0],K=S[1],V=hd(!0),Y=on(V,3),Z=Y[0],Q=Y[1],X=Y[2],J=P.useRef([]),q=P.useCallback(function(z){var ee=E.current;return J.current.push(z),ee&&z({scrollTop:ee.scrollTop}),function(){var ie=J.current,ce=WV(ie).call(ie,z);~ce&&d7(ie).call(ie,ce,1)}},[J,E]),ne=P.useCallback(function(){var z=m.current;u(function(){var ee;return Be(ee=["%cSpineTo%c: %conEnd%c is fired."]).call(ee,Se(Oe("magenta")),Se(Oe("orange")),[{animateTo:z}])}),f.current=Dn(),oi(z,s)||Q(!1),g(null)},[m,u,f,s,g,Q]),ae=P.useCallback(function(z){var ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ie=ee.behavior,ce=E.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(Oe("lime","")),Se(Oe("purple"))),{behavior:ie,nextAnimateTo:z,target:ce}]}),ie==="auto"?(ne(),ce&&(ce.scrollTop=z==="100%"?ce.scrollHeight-ce.offsetHeight:z)):(ie!=="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)),oi(z,s)&&(u(function(){var he;return[Be(he=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(he,Se(Oe("lime","")),Se(Oe("purple"))),[{mode:s,nextAnimateTo:z}]]}),Q(!0))},[u,ne,s,g,Q,E]),fe=P.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;u(function(){var ie;return Be(ie=["%cscrollToBottom%c: Called"]).call(ie,Se(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToBottom". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ae("100%",{behavior:ee||"smooth"})},[u,ae]),oe=P.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;u(function(){var ie;return Be(ie=["%cscrollToTop%c: Called"]).call(ie,Se(Oe("yellow","")))}),ee!=="smooth"&&console.warn('react-scroll-to-bottom: Please set "behavior" when calling "scrollToTop". In future versions, the default behavior will be changed from smooth scrolling to discrete scrolling to align with HTML Standard.'),ae(0,{behavior:ee||"smooth"})},[u,ae]),pe=P.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;u(function(){var ce;return Be(ce=["%cscrollToEnd%c: Called"]).call(ce,Se(Oe("yellow","")))}),ee!=="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 ie={behavior:ee||"smooth"};s===qt?oe(ie):fe(ie)},[u,s,fe,oe]),ge=P.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},ee=z.behavior;u(function(){var ce;return Be(ce=["%cscrollToStart%c: Called"]).call(ce,Se(Oe("yellow","")))}),ee!=="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 ie={behavior:ee||"smooth"};s===qt?fe(ie):oe(ie)},[u,s,fe,oe]),Ne=P.useCallback(function(){var z=E.current;if(z){if(p.current==="auto"){u(function(){var nt;return Be(nt=["%ctarget changed%c: Initial scroll"]).call(nt,Se(Oe("blue")))}),z.scrollTop=s===qt?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var ee=T.current,ie=z.offsetHeight,ce=z.scrollHeight,he=z.scrollTop,We=s===qt?0:Math.max(0,ce-ie-he),Ue=Math.max(0,ee-he),ht=c({maxValue:We,minValue:Ue,offsetHeight:ie,scrollHeight:ce,scrollTop:he}),tt=Math.max(0,Math.min(We,ht)),Pe;s===qt||tt!==We?Pe=he+tt:Pe="100%",u(function(){var nt,Ke,Fn;return[Be(nt=[Be(Ke=Be(Fn="%cscrollToSticky%c: Will animate from %c".concat(ee,"px%c to %c")).call(Fn,typeof Pe=="number"?Pe+"px":Pe.replace(/%/g,"%%"),"%c (%c")).call(Ke,(Pe==="100%"?We:Pe)+ee,"px%c)")]).call(nt,Se(Oe("orange")),Se(Oe("purple")),Se(Oe("purple")),Se(Oe("purple"))),{animateFrom:ee,maxValue:We,minValue:Ue,nextAnimateTo:Pe,nextValue:tt,offsetHeight:ie,rawNextValue:ht,scrollHeight:ce,scrollTop:he}]}),ae(Pe,{behavior:"smooth"})}},[T,u,s,c,ae,E]),et=P.useCallback(function(z){var ee,ie=z.timeStampLow,ce=m.current,he=E.current,We=ce!==null;if(!(ie<=f.current||!he)){var Ue=Y0({mode:s,target:he}),ht=Ue.atBottom,tt=Ue.atEnd,Pe=Ue.atStart,nt=Ue.atTop;j(ht),G(tt),K(Pe),_(nt);var Ke=he.offsetHeight,Fn=he.scrollHeight,tE=R.current,nE=U.current,Vd=Ke!==tE,qd=Fn!==nE;if(Vd&&(R.current=Ke),qd&&(U.current=Fn),!Vd&&!qd){var As=We&&oi(ce,s)||tt;X.current!==As&&(u(function(){var or,rE,oE,iE;return[Be(or=["%conScroll%c: %csetSticky%c(%c".concat(As,"%c)")]).call(or,Se(Oe("red")),Se(Oe("red")),Se(Oe("purple"))),Be(rE=[Be(oE=Be(iE="(animating = %c".concat(We,"%c && isEnd = %c")).call(iE,oi(ce,s),"%c) || atEnd = %c")).call(oE,tt,"%c")]).call(rE,Se(Oe("purple")),Se(Oe("purple")),Se(Oe("purple")),[{animating:We,animateTo:ce,atEnd:tt,mode:s,offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:X.current,nextSticky:As}])]}),Q(As))}else X.current&&(u(function(){var or;return[Be(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,Se(Oe("red")),Se(Oe("orange")),[{offsetHeightChanged:Vd,scrollHeightChanged:qd}]),{nextOffsetHeight:Ke,prevOffsetHeight:tE,nextScrollHeight:Fn,prevScrollHeight:nE}]}),Ne());var uX=he.scrollTop;cs(ee=J.current).call(ee,function(or){return or({scrollTop:uX})})}},[m,u,f,s,R,U,J,Ne,j,G,K,_,Q,X,E]);P.useEffect(function(){if($){var z=!1,ee=jK(function(){var ie=E.current,ce=m.current!==null;X.current?Y0({mode:s,target:ie}).atEnd?z=!1:z?Dn()-z>FK&&(ce||(T.current=ie.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(Oe("navy")),Se(Oe("orange")))}),Ne()),z=!1):z=Dn():ie.scrollHeight<=ie.offsetHeight&&!X.current&&(u(function(){var he;return[Be(he=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(he,Se(Oe("navy")),Se(Oe("purple"))),[{offsetHeight:ie.offsetHeight,scrollHeight:ie.scrollHeight,sticky:X.current}]]}),Q(!0))},Math.max(q0,n)||q0);return function(){return clearInterval(ee)}}},[m,n,u,s,Ne,Q,X,$,E]);var St=P.useMemo(function(){var z=G0[l]||(G0[l]=Hq({key:"react-scroll-to-bottom--css-"+fK(),nonce:l}));return function(ee){return z.css(ee)+""}},[l]),Nt=P.useMemo(function(){return{observeScrollPosition:q,setTarget:x,styleToClassName:St}},[q,x,St]),xt=P.useMemo(function(){return{atBottom:F,atEnd:L,atStart:N,atTop:y,mode:s}},[F,L,N,y,s]),re=P.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&oi(h,s),sticky:Z}},[h,s,Z]),le=P.useMemo(function(){return V0(V0({},xt),re)},[xt,re]),W=P.useMemo(function(){return{scrollTo:ae,scrollToBottom:fe,scrollToEnd:pe,scrollToStart:ge,scrollToTop:oe}},[ae,fe,pe,ge,oe]);return P.useEffect(function(){if($){var z=function(){U.current=$.scrollHeight};return $.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return $.removeEventListener("focus",z)}}},[$]),u(function(){var z;return[Be(z=["%cRender%c: Render"]).call(z,Se(Oe("cyan",""))),{animateTo:h,animating:h!==null,sticky:Z,target:$}]}),P.createElement(Ga.Provider,{value:Nt},P.createElement(hf.Provider,{value:W},P.createElement(gf.Provider,{value:le},P.createElement(vf.Provider,{value:xt},P.createElement(mf.Provider,{value:re},r,$&&P.createElement(W0,{debounce:o,name:"scroll",onEvent:et,target:$}),$&&h!==null&&P.createElement(U0,{name:"scrollTop",onEnd:ne,target:$,value:h}))))))};vd.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:LK},vd.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 BK={height:"100%",overflowY:"auto",width:"100%"},md=function(t){var n=t.children,r=t.className,o=P.useContext(Ga),i=o.setTarget,a=yf()(BK);return P.createElement("div",{className:sf(a,(r||"")+""),ref:i},n)};md.defaultProps={children:void 0,className:void 0},md.propTypes={children:xe.any,className:xe.string};var zK={position:"relative"},gd=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=yf()(zK);return P.createElement("div",{className:sf(a,(r||"")+"")},P.createElement(md,{className:(i||"")+""},n),P.createElement(bf,{className:(o||"")+""}))};gd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},gd.propTypes={children:xe.any,className:xe.string,followButtonClassName:xe.string,scrollViewClassName:xe.string};var yd=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 P.createElement(vd,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},P.createElement(gd,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};yd.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},yd.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},G2();let X0=(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 bd=P.memo(({className:e,messages:t=[],isTyping:n,headerMessage:r,renderers:o,botAvatar:i,botDescription:a,botName:s,sendMessage:l,addMessageFeedback:c,showMarquee:u=!0,...f})=>{var h;const{messageList:p}=ye,d=P.useMemo(()=>BE(t),[t]),v=P.useMemo(()=>{var m;const g=d.filter(b=>b.direction==="outgoing"&&b.status!=="pending");return(m=g[g.length-1])==null?void 0:m.id},[d]);return C.jsxs(yd,{...f,className:Eo(p.container.className,e),followButtonClassName:p.scrollDownButton.className,scrollViewClassName:p.viewPort.className,children:[r&&C.jsx("span",{...p.headerMessage,children:r}),u&&C.jsx(q2,{botAvatar:i,botDescription:a,botName:s}),d.map(g=>{var m;return C.jsx(zc,{renderers:o,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:g.id===v,...g},((m=g.metadata)==null?void 0:m.clientMessageId)||g.id)}),n&&C.jsx(zc,{id:X0(),renderers:o,sendMessage:l,direction:"incoming",timestamp:new Date,block:void 0,sender:((h=t.filter(g=>g.direction==="incoming").at(-1))==null?void 0:h.sender)??{name:s||"Bot",avatar:i},children:C.jsx(Bc,{})})]})});bd.displayName="MessageList";const WK=({className:e,...t})=>{const{className:n}=ye.loader;return C.jsx("div",{...t,className:Eo(e,n)})};function J0({error:e,restartConversation:t,closeWindow:n}){let r,o;const{error:i}=ye;return e.type==="configuration"?(r="Configuration error",o=C.jsx(qP,{...i.icon})):e.type==="bot"?(r="Bot error",o=C.jsx(Uv,{...i.icon})):e.type==="network"?(r="Network error",o=C.jsx(tA,{...i.icon})):e.type==="disconnected"?(r="Disconnected",o=C.jsx(ZP,{...i.icon})):(r="Unexpected error",o=C.jsx(Uv,{...i.icon})),C.jsx(UK,{error:e,title:r,icon:o,restartConversation:t,closeWindow:n})}function UK({error:e,title:t,icon:n,restartConversation:r,closeWindow:o}){const{error:i}=ye;return C.jsxs("div",{...i.container,children:[C.jsxs("div",{...i.header,children:[`Webchat ${e.type} error`,r&&C.jsx(jc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),o&&C.jsx(Ny,{onClick:o})]}),C.jsxs("div",{...i.content,children:[n,C.jsx("div",{...i.errorTitle,children:t}),C.jsx("div",{...i.errorMessage,children:e.message}),e.id&&C.jsx("div",{...i.id,children:e.id})]})]})}const Z0=({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,storageKey:m,...b})=>{const{color:w,fontFamily:$,radius:x,themeMode:E,variant:T,headerVariant:R,botAvatar:U,botDescription:O,botName:D,composerPlaceholder:F,footer:j,feedbackEnabled:B}=t,M={color:w,fontFamily:$,radius:x,themeMode:E,variant:T,headerVariant:R};B||(h=void 0);const L=P.useMemo(()=>o?pp(r,f,o.id,D,U):[],[U,D,r,o,f]);return C.jsxs(C.Fragment,{children:[C.jsx(Cy,{...M}),C.jsx(Ac,{connected:e,allowFileUpload:c,uploadFile:v,storageKey:m,...b,children:u?C.jsx(J0,{error:u,restartConversation:g,closeWindow:p}):C.jsxs(C.Fragment,{children:[C.jsx(Ly,{closeWindow:p,configuration:t,restartConversation:g}),i?C.jsx(WK,{}):C.jsx(bd,{botAvatar:U,botDescription:O,botName:D,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:L}),C.jsx(Vg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:j,composerPlaceholder:F,allowFileUpload:c,storageKey:m})]})})]})};function HK(){const[e,t]=P.useState(!1),n=P.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 VK=Object.defineProperty,qK=(e,t,n)=>t in e?VK(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KK=(e,t,n)=>qK(e,t+"",n),GK=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},YK={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},XK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},JK=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},ZK=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},Q0=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let s=(e?o:o.map(l=>encodeURIComponent(l))).join(JK(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let i=XK(r),a=o.map(s=>r==="label"||r==="simple"?e?s:encodeURIComponent(s):bs({allowReserved:e,name:n,value:s})).join(i);return r==="label"||r==="matrix"?i+a:a},bs=({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)}`},ex=({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=ZK(r),a=Object.entries(o).map(([s,l])=>bs({allowReserved:e,name:r==="deepObject"?`${n}[${s}]`:s,value:l})).join(i);return r==="label"||r==="matrix"?i+a:a},QK=/\{[^{}]+\}/g,eG=({path:e,url:t})=>{let n=t,r=t.match(QK);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,Q0({explode:i,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(o,ex({explode:i,name:a,style:s,value:l}));continue}if(s==="matrix"){n=n.replace(o,`;${bs({name:a,value:l})}`);continue}let c=encodeURIComponent(s==="label"?`.${l}`:l);n=n.replace(o,c)}return n},tx=({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,Q0({allowReserved:e,explode:!0,name:i,style:"form",value:a,...t})];continue}if(typeof a=="object"){o=[...o,ex({allowReserved:e,explode:!0,name:i,style:"deepObject",value:a,...n})];continue}o=[...o,bs({allowReserved:e,name:i,value:a})]}}return o.join("&")},tG=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"}},nG=async({security:e,...t})=>{for(let n of e){let r=await GK(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}},nx=e=>rG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:tx(e.querySerializer),url:e.url}),rG=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{let i=o.startsWith("/")?o:`/${o}`,a=(e??"")+i;t&&(a=eG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},rx=(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=ox(e.headers,t.headers),r},ox=(...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},wd=class{constructor(){KK(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]}},oG=()=>({error:new wd,request:new wd,response:new wd}),iG=tx({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),aG={"Content-Type":"application/json"},ix=(e={})=>({...YK,headers:aG,parseAs:"auto",querySerializer:iG,...e}),sG=(e={})=>{let t=rx(ix(),e),n=()=>({...t}),r=a=>(t=rx(t,a),n()),o=oG(),i=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:ox(t.headers,a.headers)};s.security&&await nG({...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=nx(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"?tG(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:nx,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"})}},lG=sG,cG=ix;const Ie=lG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(cG({baseUrl:"https://webchat.botpress.cloud/"}))),uG=e=>(e.client??Ie).delete({url:"/conversations/{id}",...e}),fG=e=>(e.client??Ie).get({url:"/conversations/{id}",...e}),dG=e=>(e.client??Ie).get({url:"/conversations",...e}),pG=e=>(e.client??Ie).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),hG=e=>(e.client??Ie).get({url:"/conversations/{id}/messages",...e}),vG=e=>(e.client??Ie).get({url:"/conversations/{id}/participants",...e}),mG=e=>(e.client??Ie).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),gG=e=>(e.client??Ie).delete({url:"/conversations/{id}/participants/{userId}",...e}),yG=e=>(e.client??Ie).get({url:"/conversations/{id}/participants/{userId}",...e}),bG=e=>(e.client??Ie).delete({url:"/messages/{id}",...e}),wG=e=>(e.client??Ie).get({url:"/messages/{id}",...e}),SG=e=>(e.client??Ie).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Ie).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),EG=e=>(e.client??Ie).delete({url:"/messages/{id}/feedback",...e}),kG=e=>(e.client??Ie).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),CG=e=>(e.client??Ie).delete({url:"/users/me",...e}),$G=e=>(e.client??Ie).get({url:"/users/me",...e}),TG=e=>(e.client??Ie).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),ax=e=>((e==null?void 0:e.client)??Ie).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),OG=e=>((e==null?void 0:e.client)??Ie).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),IG=e=>(e.client??Ie).get({url:"/events/{id}",...e}),PG=e=>(e.client??Ie).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),AG=e=>(e.client??Ie).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let sx=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 Sd(e){}function _G(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=Sd,onError:n=Sd,onRetry:r=Sd,onComment:o}=e;let i="",a=!0,s,l="",c="";function u(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=DG(`${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}
|
|
285
|
-
`;break;case"id":s=g.includes("\0")?void 0:g;break;case"retry":/^\d+$/.test(g)?r(parseInt(g,10)):n(new
|
|
286
|
-
`)?l.slice(0,-1):l}),s=void 0,l="",c=""}function v(h={}){i&&h.consume&&f(i),a=!0,s=void 0,l="",c="",i=""}return{feed:u,reset:v}}function
|
|
285
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var i=arguments[o];if(i){var a=typeof i;if(a==="string"||a==="number")r.push(i);else if(Array.isArray(i)){if(i.length){var s=n.apply(null,i);s&&r.push(s)}}else if(a==="object")if(i.toString===Object.prototype.toString)for(var l in i)t.call(i,l)&&i[l]&&r.push(l);else r.push(i.toString())}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Dw);var lU=Dw.exports;const vf=ye(lU);var mf={exports:{}},gf,_w;function yf(){if(_w)return gf;_w=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return gf=e,gf}var bf,Mw;function cU(){if(Mw)return bf;Mw=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=yf(),n={},r=Function.call.bind(Object.prototype.hasOwnProperty);e=function(i){var a="Warning: "+i;typeof console<"u"&&console.error(a);try{throw new Error(a)}catch{}}}function o(i,a,s,l,c){if(process.env.NODE_ENV!=="production"){for(var u in i)if(r(i,u)){var f;try{if(typeof i[u]!="function"){var p=Error((l||"React class")+": "+s+" type `"+u+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof i[u]+"`.");throw p.name="Invariant Violation",p}f=i[u](a,u,l,s,null,t)}catch(v){f=v}if(f&&!(f instanceof Error)&&e((l||"React class")+": type specification of "+s+" `"+u+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof f+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),f instanceof Error&&!(f.message in n)){n[f.message]=!0;var d=c?c():"";e("Failed "+s+" type: "+f.message+(d??""))}}}}return o.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},bf=o,bf}var wf,Nw;function uU(){if(Nw)return wf;Nw=1;var e=ua(),t=ny(),n=yf(),r=cU(),o=Function.call.bind(Object.prototype.hasOwnProperty),i=function(){};process.env.NODE_ENV!=="production"&&(i=function(s){var l="Warning: "+s;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function a(){return null}return wf=function(s,l){var c=typeof Symbol=="function"&&Symbol.iterator,u="@@iterator";function f(I){var y=I&&(c&&I[c]||I[u]);if(typeof y=="function")return y}var p="<<anonymous>>",d={array:m("array"),bool:m("boolean"),func:m("function"),number:m("number"),object:m("object"),string:m("string"),symbol:m("symbol"),any:b(),arrayOf:w,element:A(),elementType:x(),instanceOf:E,node:T(),objectOf:R,oneOf:$,oneOfType:K,shape:M,exact:U};function v(I,y){return I===y?I!==0||1/I===1/y:I!==I&&y!==y}function h(I){this.message=I,this.stack=""}h.prototype=Error.prototype;function g(I){if(process.env.NODE_ENV!=="production")var y={},P=0;function N(V,Y,G,Q,X,ee,Z){if(Q=Q||p,ee=ee||G,Z!==n){if(l){var _=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 _.name="Invariant Violation",_}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var j=Q+":"+G;!y[j]&&P<3&&(i("You are manually calling a React.PropTypes validation function for the `"+ee+"` prop on `"+Q+"`. 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."),y[j]=!0,P++)}}return Y[G]==null?V?Y[G]===null?new h("The "+X+" `"+ee+"` is marked as required "+("in `"+Q+"`, but its value is `null`.")):new h("The "+X+" `"+ee+"` is marked as required in "+("`"+Q+"`, but its value is `undefined`.")):null:I(Y,G,Q,X,ee)}var S=N.bind(null,!1);return S.isRequired=N.bind(null,!0),S}function m(I){function y(P,N,S,V,Y,G){var Q=P[N],X=D(Q);if(X!==I){var ee=L(Q);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+ee+"` supplied to `"+S+"`, expected ")+("`"+I+"`."))}return null}return g(y)}function b(){return g(a)}function w(I){function y(P,N,S,V,Y){if(typeof I!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside arrayOf.");var G=P[N];if(!Array.isArray(G)){var Q=D(G);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an array."))}for(var X=0;X<G.length;X++){var ee=I(G,X,S,V,Y+"["+X+"]",n);if(ee instanceof Error)return ee}return null}return g(y)}function A(){function I(y,P,N,S,V){var Y=y[P];if(!s(Y)){var G=D(Y);return new h("Invalid "+S+" `"+V+"` of type "+("`"+G+"` supplied to `"+N+"`, expected a single ReactElement."))}return null}return g(I)}function x(){function I(y,P,N,S,V){var Y=y[P];if(!e.isValidElementType(Y)){var G=D(Y);return new h("Invalid "+S+" `"+V+"` of type "+("`"+G+"` supplied to `"+N+"`, expected a single ReactElement type."))}return null}return g(I)}function E(I){function y(P,N,S,V,Y){if(!(P[N]instanceof I)){var G=I.name||p,Q=W(P[N]);return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected ")+("instance of `"+G+"`."))}return null}return g(y)}function $(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&(arguments.length>1?i("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):i("Invalid argument supplied to oneOf, expected an array.")),a;function y(P,N,S,V,Y){for(var G=P[N],Q=0;Q<I.length;Q++)if(v(G,I[Q]))return null;var X=JSON.stringify(I,function(Z,_){var j=L(_);return j==="symbol"?String(_):_});return new h("Invalid "+V+" `"+Y+"` of value `"+String(G)+"` "+("supplied to `"+S+"`, expected one of "+X+"."))}return g(y)}function R(I){function y(P,N,S,V,Y){if(typeof I!="function")return new h("Property `"+Y+"` of component `"+S+"` has invalid PropType notation inside objectOf.");var G=P[N],Q=D(G);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type "+("`"+Q+"` supplied to `"+S+"`, expected an object."));for(var X in G)if(o(G,X)){var ee=I(G,X,S,V,Y+"."+X,n);if(ee instanceof Error)return ee}return null}return g(y)}function K(I){if(!Array.isArray(I))return process.env.NODE_ENV!=="production"&&i("Invalid argument supplied to oneOfType, expected an instance of array."),a;for(var y=0;y<I.length;y++){var P=I[y];if(typeof P!="function")return i("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+q(P)+" at index "+y+"."),a}function N(S,V,Y,G,Q){for(var X=0;X<I.length;X++){var ee=I[X];if(ee(S,V,Y,G,Q,n)==null)return null}return new h("Invalid "+G+" `"+Q+"` supplied to "+("`"+Y+"`."))}return g(N)}function T(){function I(y,P,N,S,V){return B(y[P])?null:new h("Invalid "+S+" `"+V+"` supplied to "+("`"+N+"`, expected a ReactNode."))}return g(I)}function M(I){function y(P,N,S,V,Y){var G=P[N],Q=D(G);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));for(var X in I){var ee=I[X];if(ee){var Z=ee(G,X,S,V,Y+"."+X,n);if(Z)return Z}}return null}return g(y)}function U(I){function y(P,N,S,V,Y){var G=P[N],Q=D(G);if(Q!=="object")return new h("Invalid "+V+" `"+Y+"` of type `"+Q+"` "+("supplied to `"+S+"`, expected `object`."));var X=t({},P[N],I);for(var ee in X){var Z=I[ee];if(!Z)return new h("Invalid "+V+" `"+Y+"` key `"+ee+"` supplied to `"+S+"`.\nBad object: "+JSON.stringify(P[N],null," ")+`
|
|
286
|
+
Valid keys: `+JSON.stringify(Object.keys(I),null," "));var _=Z(G,ee,S,V,Y+"."+ee,n);if(_)return _}return null}return g(y)}function B(I){switch(typeof I){case"number":case"string":case"undefined":return!0;case"boolean":return!I;case"object":if(Array.isArray(I))return I.every(B);if(I===null||s(I))return!0;var y=f(I);if(y){var P=y.call(I),N;if(y!==I.entries){for(;!(N=P.next()).done;)if(!B(N.value))return!1}else for(;!(N=P.next()).done;){var S=N.value;if(S&&!B(S[1]))return!1}}else return!1;return!0;default:return!1}}function F(I,y){return I==="symbol"?!0:y?y["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&y instanceof Symbol:!1}function D(I){var y=typeof I;return Array.isArray(I)?"array":I instanceof RegExp?"object":F(y,I)?"symbol":y}function L(I){if(typeof I>"u"||I===null)return""+I;var y=D(I);if(y==="object"){if(I instanceof Date)return"date";if(I instanceof RegExp)return"regexp"}return y}function q(I){var y=L(I);switch(y){case"array":case"object":return"an "+y;case"boolean":case"date":case"regexp":return"a "+y;default:return y}}function W(I){return!I.constructor||!I.constructor.name?p:I.constructor.name}return d.checkPropTypes=r,d.resetWarningCache=r.resetWarningCache,d.PropTypes=d,d},wf}var Sf,Rw;function fU(){if(Rw)return Sf;Rw=1;var e=yf();function t(){}function n(){}return n.resetWarningCache=t,Sf=function(){function r(a,s,l,c,u,f){if(f!==e){var p=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw p.name="Invariant Violation",p}}r.isRequired=r;function o(){return r}var i={array:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i},Sf}if(process.env.NODE_ENV!=="production"){var dU=ua(),pU=!0;mf.exports=uU()(dU.isElement,pU)}else mf.exports=fU()();var hU=mf.exports;const xe=ye(hU);var xf=O.createContext({scrollTo:function(){return 0},scrollToBottom:function(){return 0},scrollToEnd:function(){return 0},scrollToStart:function(){return 0},scrollToTop:function(){return 0}});xf.displayName="ScrollToBottomFunctionContext";function vU(){return O.useContext(xf)}function mU(){var e=vU(),t=e.scrollToEnd;return t}var Ef=O.createContext({atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom"});Ef.displayName="ScrollToBottomState1Context";var Cf=O.createContext({animating:!1,animatingToEnd:!1,sticky:!0});Cf.displayName="ScrollToBottomState2Context";var kf=O.createContext({animating:!1,animatingToEnd:!1,atBottom:!0,atEnd:!0,atStart:!1,atTop:!0,mode:"bottom",sticky:!0});kf.displayName="ScrollToBottomStateContext";var Lw=[kf,Ef,Cf];function gU(e){return O.useContext(Lw[e]||Lw[0])}function yU(){var e=gU(2),t=e.sticky;return[t]}var Qa=O.createContext({offsetHeight:0,scrollHeight:0,setTarget:function(){return 0},styleToClassName:function(){return""}});Qa.displayName="ScrollToBottomInternalContext";function bU(){return O.useContext(Qa)}function Af(){var e=bU(),t=e.styleToClassName;return t}var wU={backgroundColor:"rgba(0, 0, 0, .2)",borderRadius:10,borderWidth:0,bottom:5,cursor:"pointer",height:20,outline:0,position:"absolute",right:20,width:20,"&:hover":{backgroundColor:"rgba(0, 0, 0, .4)"},"&:active":{backgroundColor:"rgba(0, 0, 0, .6)"}},$f=function(t){var n=t.children,r=t.className,o=yU(),i=on(o,1),a=i[0],s=Af()(wU),l=mU();return!a&&O.createElement("button",{className:vf(s,(r||"")+""),onClick:l,type:"button"},n)};$f.defaultProps={children:void 0,className:""},$f.propTypes={children:xe.any,className:xe.string};var Fw={exports:{}},SU=Pe,xU=bt,Bw=Wt.f;SU({target:"Object",stat:!0,forced:Object.defineProperty!==Bw,sham:!xU},{defineProperty:Bw});var EU=it,jw=EU.Object,CU=Fw.exports=function(t,n,r){return jw.defineProperty(t,n,r)};jw.defineProperty.sham&&(CU.sham=!0);var kU=Fw.exports,AU=kU,zw=AU,$U=zw,TU=$U,OU=TU,IU=OU,PU=IU;const DU=ye(PU);var _U=Bo,MU=_U.f("iterator"),NU=MU,RU=NU,LU=RU,FU=LU,BU=FU,jU=BU,zU=jU;const UU=ye(zU);function Vo(e){"@babel/helpers - typeof";return Vo=typeof Mr=="function"&&typeof UU=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Mr=="function"&&t.constructor===Mr&&t!==Mr.prototype?"symbol":typeof t},Vo(e)}var WU=Bo,HU=WU.f("toPrimitive"),KU=HU,VU=KU,qU=VU,GU=qU,YU=GU,QU=YU,JU=QU;const ZU=ye(JU);function XU(e,t){if(Vo(e)!="object"||!e)return e;var n=e[ZU];if(n!==void 0){var r=n.call(e,t||"default");if(Vo(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eW(e){var t=XU(e,"string");return Vo(t)=="symbol"?t:t+""}function tW(e,t,n){return(t=eW(t))in e?DU(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nW(e){if(Ab(e))return hf(e)}function rW(e){if(typeof Mr<"u"&&ww(e)!=null||e["@@iterator"]!=null)return Iw(e)}function oW(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
287
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function we(e){return nW(e)||rW(e)||Pw(e)||oW()}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")(),Tf={},Kt=function(e){try{return!!e()}catch{return!0}},iW=Kt,Xn=!iW(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7}),Uw={},Ww={}.propertyIsEnumerable,Hw=Object.getOwnPropertyDescriptor,aW=Hw&&!Ww.call({1:2},1);Uw.f=aW?function(t){var n=Hw(this,t);return!!n&&n.enumerable}:Ww;var Kw=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},sW={}.toString,Of=function(e){return sW.call(e).slice(8,-1)},lW=Kt,cW=Of,uW="".split,fW=lW(function(){return!Object("z").propertyIsEnumerable(0)})?function(e){return cW(e)=="String"?uW.call(e,""):Object(e)}:Object,Za=function(e){if(e==null)throw TypeError("Can't call method on "+e);return e},dW=fW,pW=Za,If=function(e){return dW(pW(e))},Nt=function(e){return typeof e=="function"},hW=Nt,qo=function(e){return typeof e=="object"?e!==null:hW(e)},Pf=Tt,vW=Nt,mW=function(e){return vW(e)?e:void 0},Xa=function(e,t){return arguments.length<2?mW(Pf[e]):Pf[e]&&Pf[e][t]},gW=Xa,yW=gW("navigator","userAgent")||"",Vw=Tt,Df=yW,qw=Vw.process,Gw=Vw.Deno,Yw=qw&&qw.versions||Gw&&Gw.version,Qw=Yw&&Yw.v8,an,es;Qw?(an=Qw.split("."),es=an[0]<4?1:an[0]+an[1]):Df&&(an=Df.match(/Edge\/(\d+)/),(!an||an[1]>=74)&&(an=Df.match(/Chrome\/(\d+)/),an&&(es=an[1])));var bW=es&&+es,Jw=bW,wW=Kt,Zw=!!Object.getOwnPropertySymbols&&!wW(function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Jw&&Jw<41}),SW=Zw,Xw=SW&&!Symbol.sham&&typeof Symbol.iterator=="symbol",xW=Nt,EW=Xa,CW=Xw,eS=CW?function(e){return typeof e=="symbol"}:function(e){var t=EW("Symbol");return xW(t)&&Object(e)instanceof t},kW=function(e){try{return String(e)}catch{return"Object"}},AW=Nt,$W=kW,TW=function(e){if(AW(e))return e;throw TypeError($W(e)+" is not a function")},OW=TW,tS=function(e,t){var n=e[t];return n==null?void 0:OW(n)},_f=Nt,Mf=qo,IW=function(e,t){var n,r;if(t==="string"&&_f(n=e.toString)&&!Mf(r=n.call(e))||_f(n=e.valueOf)&&!Mf(r=n.call(e))||t!=="string"&&_f(n=e.toString)&&!Mf(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")},nS={exports:{}},rS=Tt,Nf=function(e,t){try{Object.defineProperty(rS,e,{value:t,configurable:!0,writable:!0})}catch{rS[e]=t}return t},PW=Tt,DW=Nf,oS="__core-js_shared__",_W=PW[oS]||DW(oS,{}),Rf=_W,iS=Rf;(nS.exports=function(e,t){return iS[e]||(iS[e]=t!==void 0?t:{})})("versions",[]).push({version:"3.18.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var Lf=nS.exports,MW=Za,aS=function(e){return Object(MW(e))},NW=aS,RW={}.hasOwnProperty,er=Object.hasOwn||function(t,n){return RW.call(NW(t),n)},LW=0,FW=Math.random(),sS=function(e){return"Symbol("+String(e===void 0?"":e)+")_"+(++LW+FW).toString(36)},BW=Tt,jW=Lf,lS=er,zW=sS,cS=Zw,UW=Xw,Go=jW("wks"),Yo=BW.Symbol,WW=UW?Yo:Yo&&Yo.withoutSetter||zW,Qo=function(e){return(!lS(Go,e)||!(cS||typeof Go[e]=="string"))&&(cS&&lS(Yo,e)?Go[e]=Yo[e]:Go[e]=WW("Symbol."+e)),Go[e]},uS=qo,fS=eS,HW=tS,KW=IW,VW=Qo,qW=VW("toPrimitive"),GW=function(e,t){if(!uS(e)||fS(e))return e;var n=HW(e,qW),r;if(n){if(t===void 0&&(t="default"),r=n.call(e,t),!uS(r)||fS(r))return r;throw TypeError("Can't convert object to primitive value")}return t===void 0&&(t="number"),KW(e,t)},YW=GW,QW=eS,dS=function(e){var t=YW(e,"string");return QW(t)?t:String(t)},JW=Tt,pS=qo,Ff=JW.document,ZW=pS(Ff)&&pS(Ff.createElement),hS=function(e){return ZW?Ff.createElement(e):{}},XW=Xn,e6=Kt,t6=hS,vS=!XW&&!e6(function(){return Object.defineProperty(t6("div"),"a",{get:function(){return 7}}).a!=7}),n6=Xn,r6=Uw,o6=Kw,i6=If,a6=dS,s6=er,l6=vS,mS=Object.getOwnPropertyDescriptor;Tf.f=n6?mS:function(t,n){if(t=i6(t),n=a6(n),l6)try{return mS(t,n)}catch{}if(s6(t,n))return o6(!r6.f.call(t,n),t[n])};var Jo={},c6=qo,_n=function(e){if(c6(e))return e;throw TypeError(String(e)+" is not an object")},u6=Xn,f6=vS,gS=_n,d6=dS,yS=Object.defineProperty;Jo.f=u6?yS:function(t,n,r){if(gS(t),n=d6(n),gS(r),f6)try{return yS(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 p6=Xn,h6=Jo,v6=Kw,ts=p6?function(e,t,n){return h6.f(e,t,v6(1,n))}:function(e,t,n){return e[t]=n,e},bS={exports:{}},m6=Nt,Bf=Rf,g6=Function.toString;m6(Bf.inspectSource)||(Bf.inspectSource=function(e){return g6.call(e)});var wS=Bf.inspectSource,y6=Tt,b6=Nt,w6=wS,SS=y6.WeakMap,S6=b6(SS)&&/native code/.test(w6(SS)),x6=Lf,E6=sS,xS=x6("keys"),ES=function(e){return xS[e]||(xS[e]=E6(e))},jf={},C6=S6,k6=Tt,A6=qo,$6=ts,zf=er,Uf=Rf,T6=ES,O6=jf,CS="Object already initialized",I6=k6.WeakMap,ns,Zo,rs,P6=function(e){return rs(e)?Zo(e):ns(e,{})},D6=function(e){return function(t){var n;if(!A6(t)||(n=Zo(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}};if(C6||Uf.state){var tr=Uf.state||(Uf.state=new I6),_6=tr.get,kS=tr.has,M6=tr.set;ns=function(e,t){if(kS.call(tr,e))throw new TypeError(CS);return t.facade=e,M6.call(tr,e,t),t},Zo=function(e){return _6.call(tr,e)||{}},rs=function(e){return kS.call(tr,e)}}else{var Nr=T6("state");O6[Nr]=!0,ns=function(e,t){if(zf(e,Nr))throw new TypeError(CS);return t.facade=e,$6(e,Nr,t),t},Zo=function(e){return zf(e,Nr)?e[Nr]:{}},rs=function(e){return zf(e,Nr)}}var AS={set:ns,get:Zo,has:rs,enforce:P6,getterFor:D6},Wf=Xn,N6=er,$S=Function.prototype,R6=Wf&&Object.getOwnPropertyDescriptor,Hf=N6($S,"name"),L6=Hf&&(function(){}).name==="something",F6=Hf&&(!Wf||Wf&&R6($S,"name").configurable),Kf={EXISTS:Hf,PROPER:L6,CONFIGURABLE:F6},B6=Tt,TS=Nt,j6=er,OS=ts,z6=Nf,U6=wS,IS=AS,W6=Kf.CONFIGURABLE,H6=IS.get,K6=IS.enforce,V6=String(String).split("String");(bS.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(TS(n)&&(String(s).slice(0,7)==="Symbol("&&(s="["+String(s).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!j6(n,"name")||W6&&n.name!==s)&&OS(n,"name",s),l=K6(n),l.source||(l.source=V6.join(typeof s=="string"?s:""))),e===B6){i?e[t]=n:z6(t,n);return}else o?!a&&e[t]&&(i=!0):delete e[t];i?e[t]=n:OS(e,t,n)})(Function.prototype,"toString",function(){return TS(this)&&H6(this).source||U6(this)});var Xo=bS.exports,PS={},q6=Math.ceil,G6=Math.floor,os=function(e){var t=+e;return t!==t||t===0?0:(t>0?G6:q6)(t)},Y6=os,Q6=Math.max,J6=Math.min,Z6=function(e,t){var n=Y6(e);return n<0?Q6(n+t,0):J6(n,t)},X6=os,eH=Math.min,DS=function(e){return e>0?eH(X6(e),9007199254740991):0},tH=DS,nH=function(e){return tH(e.length)},rH=If,oH=Z6,iH=nH,_S=function(e){return function(t,n,r){var o=rH(t),i=iH(o),a=oH(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}},aH={includes:_S(!0),indexOf:_S(!1)},Vf=er,sH=If,lH=aH.indexOf,cH=jf,MS=function(e,t){var n=sH(e),r=0,o=[],i;for(i in n)!Vf(cH,i)&&Vf(n,i)&&o.push(i);for(;t.length>r;)Vf(n,i=t[r++])&&(~lH(o,i)||o.push(i));return o},qf=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],uH=MS,fH=qf,dH=fH.concat("length","prototype");PS.f=Object.getOwnPropertyNames||function(t){return uH(t,dH)};var NS={};NS.f=Object.getOwnPropertySymbols;var pH=Xa,hH=PS,vH=NS,mH=_n,gH=pH("Reflect","ownKeys")||function(t){var n=hH.f(mH(t)),r=vH.f;return r?n.concat(r(t)):n},yH=er,bH=gH,wH=Tf,SH=Jo,xH=function(e,t){for(var n=bH(t),r=SH.f,o=wH.f,i=0;i<n.length;i++){var a=n[i];yH(e,a)||r(e,a,o(t,a))}},EH=Kt,CH=Nt,kH=/#|\.prototype\./,ei=function(e,t){var n=$H[AH(e)];return n==OH?!0:n==TH?!1:CH(t)?EH(t):!!t},AH=ei.normalize=function(e){return String(e).replace(kH,".").toLowerCase()},$H=ei.data={},TH=ei.NATIVE="N",OH=ei.POLYFILL="P",IH=ei,Gf=Tt,PH=Tf.f,DH=ts,_H=Xo,MH=Nf,NH=xH,RH=IH,LH=function(e,t){var n=e.target,r=e.global,o=e.stat,i,a,s,l,c,u;if(r?a=Gf:o?a=Gf[n]||MH(n,{}):a=(Gf[n]||{}).prototype,a)for(s in t){if(c=t[s],e.noTargetGet?(u=PH(a,s),l=u&&u.value):l=a[s],i=RH(r?s:n+(o?".":"#")+s,e.forced),!i&&l!==void 0){if(typeof c==typeof l)continue;NH(c,l)}(e.sham||l&&l.sham)&&DH(c,"sham",!0),_H(a,s,c,e)}},FH=Qo,BH=FH("toStringTag"),RS={};RS[BH]="z";var Yf=String(RS)==="[object z]",jH=Yf,zH=Nt,is=Of,UH=Qo,WH=UH("toStringTag"),HH=is(function(){return arguments}())=="Arguments",KH=function(e,t){try{return e[t]}catch{}},LS=jH?is:function(e){var t,n,r;return e===void 0?"Undefined":e===null?"Null":typeof(n=KH(t=Object(e),WH))=="string"?n:HH?is(t):(r=is(t))=="Object"&&zH(t.callee)?"Arguments":r},VH=LS,as=function(e){if(VH(e)==="Symbol")throw TypeError("Cannot convert a Symbol value to a string");return String(e)},qH=_n,FS=function(){var e=qH(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},Qf={},BS=Kt,GH=Tt,jS=GH.RegExp;Qf.UNSUPPORTED_Y=BS(function(){var e=jS("a","y");return e.lastIndex=2,e.exec("abcd")!=null}),Qf.BROKEN_CARET=BS(function(){var e=jS("^r","gy");return e.lastIndex=2,e.exec("str")!=null});var YH=MS,QH=qf,JH=Object.keys||function(t){return YH(t,QH)},ZH=Xn,XH=Jo,e9=_n,t9=JH,n9=ZH?Object.defineProperties:function(t,n){e9(t);for(var r=t9(n),o=r.length,i=0,a;o>i;)XH.f(t,a=r[i++],n[a]);return t},r9=Xa,o9=r9("document","documentElement"),i9=_n,a9=n9,zS=qf,s9=jf,l9=o9,c9=hS,u9=ES,US=">",WS="<",Jf="prototype",Zf="script",HS=u9("IE_PROTO"),Xf=function(){},KS=function(e){return WS+Zf+US+e+WS+"/"+Zf+US},VS=function(e){e.write(KS("")),e.close();var t=e.parentWindow.Object;return e=null,t},f9=function(){var e=c9("iframe"),t="java"+Zf+":",n;return e.style.display="none",l9.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(KS("document.F=Object")),n.close(),n.F},ss,ls=function(){try{ss=new ActiveXObject("htmlfile")}catch{}ls=typeof document<"u"?document.domain&&ss?VS(ss):f9():VS(ss);for(var e=zS.length;e--;)delete ls[Jf][zS[e]];return ls()};s9[HS]=!0;var d9=Object.create||function(t,n){var r;return t!==null?(Xf[Jf]=i9(t),r=new Xf,Xf[Jf]=null,r[HS]=t):r=ls(),n===void 0?r:a9(r,n)},p9=Kt,h9=Tt,v9=h9.RegExp,m9=p9(function(){var e=v9(".","s");return!(e.dotAll&&e.exec(`
|
|
288
|
+
`)&&e.flags==="s")}),g9=Kt,y9=Tt,b9=y9.RegExp,w9=g9(function(){var e=b9("(?<a>b)","g");return e.exec("b").groups.a!=="b"||"b".replace(e,"$<a>c")!=="bc"}),S9=as,x9=FS,qS=Qf,E9=Lf,C9=d9,k9=AS.get,A9=m9,$9=w9,cs=RegExp.prototype.exec,T9=E9("native-string-replace",String.prototype.replace),ed=cs,td=function(){var e=/a/,t=/b*/g;return cs.call(e,"a"),cs.call(t,"a"),e.lastIndex!==0||t.lastIndex!==0}(),GS=qS.UNSUPPORTED_Y||qS.BROKEN_CARET,nd=/()??/.exec("")[1]!==void 0,O9=td||nd||GS||A9||$9;O9&&(ed=function(t){var n=this,r=k9(n),o=S9(t),i=r.raw,a,s,l,c,u,f,p;if(i)return i.lastIndex=n.lastIndex,a=ed.call(i,o),n.lastIndex=i.lastIndex,a;var d=r.groups,v=GS&&n.sticky,h=x9.call(n),g=n.source,m=0,b=o;if(v&&(h=h.replace("y",""),h.indexOf("g")===-1&&(h+="g"),b=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
|
|
289
|
+
`)&&(g="(?: "+g+")",b=" "+b,m++),s=new RegExp("^(?:"+g+")",h)),nd&&(s=new RegExp("^"+g+"$(?!\\s)",h)),td&&(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:td&&c&&(n.lastIndex=n.global?c.index+c[0].length:l),nd&&c&&c.length>1&&T9.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=C9(null),u=0;u<d.length;u++)p=d[u],f[p[0]]=c[p[1]];return c});var rd=ed,I9=LH,YS=rd;I9({target:"RegExp",proto:!0,forced:/./.exec!==YS},{exec:YS});var QS=Xo,P9=rd,JS=Kt,ZS=Qo,D9=ts,_9=ZS("species"),od=RegExp.prototype,M9=function(e,t,n,r){var o=ZS(e),i=!JS(function(){var c={};return c[o]=function(){return 7},""[e](c)!=7}),a=i&&!JS(function(){var c=!1,u=/a/;return e==="split"&&(u={},u.constructor={},u.constructor[_9]=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===P9||v===od.exec?i&&!d?{done:!0,value:s.call(u,f,p)}:{done:!0,value:c.call(f,u,p)}:{done:!1}});QS(String.prototype,e,l[0]),QS(od,o,l[1])}r&&D9(od[o],"sham",!0)},N9=os,R9=as,L9=Za,XS=function(e){return function(t,n){var r=R9(L9(t)),o=N9(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)}},F9={codeAt:XS(!1),charAt:XS(!0)},B9=F9.charAt,j9=function(e,t,n){return t+(n?B9(e,t).length:1)},z9=aS,U9=Math.floor,W9="".replace,H9=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,K9=/\$([$&'`]|\d{1,2})/g,V9=function(e,t,n,r,o,i){var a=n+e.length,s=r.length,l=K9;return o!==void 0&&(o=z9(o),l=H9),W9.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=U9(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})},q9=_n,G9=Nt,Y9=Of,Q9=rd,J9=function(e,t){var n=e.exec;if(G9(n)){var r=n.call(e,t);return r!==null&&q9(r),r}if(Y9(e)==="RegExp")return Q9.call(e,t);throw TypeError("RegExp#exec called on incompatible receiver")},Z9=M9,X9=Kt,eK=_n,tK=Nt,nK=os,rK=DS,Rr=as,oK=Za,iK=j9,aK=tS,sK=V9,lK=J9,cK=Qo,id=cK("replace"),uK=Math.max,fK=Math.min,dK=function(e){return e===void 0?e:String(e)},pK=function(){return"a".replace(/./,"$0")==="$0"}(),e0=function(){return/./[id]?/./[id]("a","$0")==="":!1}(),hK=!X9(function(){var e=/./;return e.exec=function(){var t=[];return t.groups={a:"7"},t},"".replace(e,"$<a>")!=="7"});Z9("replace",function(e,t,n){var r=e0?"$":"$0";return[function(i,a){var s=oK(this),l=i==null?void 0:aK(i,id);return l?l.call(i,s,a):t.call(Rr(s),i,a)},function(o,i){var a=eK(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=tK(i);c||(i=Rr(i));var u=a.global;if(u){var f=a.unicode;a.lastIndex=0}for(var p=[];;){var d=lK(a,s);if(d===null||(p.push(d),!u))break;var v=Rr(d[0]);v===""&&(a.lastIndex=iK(s,rK(a.lastIndex),f))}for(var h="",g=0,m=0;m<p.length;m++){d=p[m];for(var b=Rr(d[0]),w=uK(fK(nK(d.index),s.length),0),A=[],x=1;x<d.length;x++)A.push(dK(d[x]));var E=d.groups;if(c){var $=[b].concat(A,w,s);E!==void 0&&$.push(E);var R=Rr(i.apply(void 0,$))}else R=sK(b,s,w,A,E,i);w>=g&&(h+=s.slice(g,w)+R,g=w+b.length)}return h+s.slice(g)}]},!hK||!pK||e0);var ti=Qe,vK=iu,mK=Gn,us=function(e){return vK.slice(0,e.length)===e},gK=function(){return us("Bun/")?"BUN":us("Cloudflare-Workers")?"CLOUDFLARE":us("Deno/")?"DENO":us("Node.js/")?"NODE":ti.Bun&&typeof Bun.version=="string"?"BUN":ti.Deno&&typeof Deno.version=="object"?"DENO":mK(ti.process)==="process"?"NODE":ti.window&&ti.document?"BROWSER":"REST"}(),yK=TypeError,bK=function(e,t){if(e<t)throw new yK("Not enough arguments");return e},t0=Qe,wK=Qc,SK=ut,xK=gK,EK=iu,CK=Na,kK=bK,AK=t0.Function,$K=/MSIE .\./.test(EK)||xK==="BUN"&&function(){var e=t0.Bun.version.split(".");return e.length<3||e[0]==="0"&&(e[1]<3||e[1]==="3"&&e[2]==="0")}(),n0=function(e,t){var n=t?2:1;return $K?function(r,o){var i=kK(arguments.length,1)>n,a=SK(r)?r:AK(r),s=i?CK(arguments,n):[],l=i?function(){wK(a,this,s)}:a;return t?e(l,o):e(l)}:e},TK=Pe,r0=Qe,OK=n0,o0=OK(r0.setInterval,!0);TK({global:!0,bind:!0,forced:r0.setInterval!==o0},{setInterval:o0});var IK=Pe,i0=Qe,PK=n0,a0=PK(i0.setTimeout,!0);IK({global:!0,bind:!0,forced:i0.setTimeout!==a0},{setTimeout:a0});var DK=it,_K=DK.setInterval,MK=_K;const NK=ye(MK);var RK=Je,s0=function(e,t){var n=[][e];return!!n&&RK(function(){n.call(null,t||function(){return 1},1)})},LK=Pe,FK=Zc,BK=Fb.indexOf,jK=s0,ad=FK([].indexOf),l0=!!ad&&1/ad([1],1,-0)<0,zK=l0||!jK("indexOf");LK({target:"Array",proto:!0,forced:zK},{indexOf:function(t){var n=arguments.length>1?arguments[1]:void 0;return l0?ad(this,t,n)||0:BK(this,t,n)}});var UK=Zn,WK=UK("Array","indexOf"),HK=hn,KK=WK,sd=Array.prototype,VK=function(e){var t=e.indexOf;return e===sd||HK(sd,e)&&t===sd.indexOf?KK:t},qK=VK,GK=qK,YK=GK;const QK=ye(YK);var c0=xa,JK=TypeError,ZK=function(e,t){if(!delete e[t])throw new JK("Cannot delete property "+c0(t)+" of "+c0(e))},XK=Pe,eV=vn,tV=Tu,nV=Aa,rV=Yn,oV=Sw,iV=xu,aV=$u,sV=No,ld=ZK,lV=Ta,cV=lV("splice"),uV=Math.max,fV=Math.min;XK({target:"Array",proto:!0,forced:!cV},{splice:function(t,n){var r=eV(this),o=rV(r),i=tV(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=fV(uV(nV(n),0),o-i)),iV(o+s-l),c=aV(r,l),u=0;u<l;u++)f=i+u,f in r&&sV(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]:ld(r,p);for(u=o;u>o-l+s;u--)ld(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]:ld(r,p);for(u=0;u<s;u++)r[u+i]=arguments[u+2];return oV(r,o-l+s),c}});var dV=Zn,pV=dV("Array","splice"),hV=hn,vV=pV,cd=Array.prototype,mV=function(e){var t=e.splice;return e===cd||hV(cd,e)&&t===cd.splice?vV:t},gV=mV,yV=gV,bV=yV;const wV=ye(bV);var SV=Zn,xV=SV("Array","concat"),EV=hn,CV=xV,ud=Array.prototype,kV=function(e){var t=e.concat;return e===ud||EV(ud,e)&&t===ud.concat?CV:t},AV=kV,$V=AV,TV=$V;const je=ye(TV);var OV=Pe,IV=Ve,u0=Date,PV=IV(u0.prototype.getTime);OV({target:"Date",stat:!0},{now:function(){return PV(new u0)}});var DV=it,_V=DV.Date.now,MV=_V,NV=MV,RV=NV;const Mn=ye(RV);var LV=ju.forEach,FV=s0,BV=FV("forEach"),jV=BV?[].forEach:function(t){return LV(this,t,arguments.length>1?arguments[1]:void 0)},zV=Pe,f0=jV;zV({target:"Array",proto:!0,forced:[].forEach!==f0},{forEach:f0});var UV=Zn,WV=UV("Array","forEach"),HV=WV,KV=HV,VV=Ro,qV=$t,GV=hn,YV=KV,fd=Array.prototype,QV={DOMTokenList:!0,NodeList:!0},JV=function(e){var t=e.forEach;return e===fd||GV(fd,e)&&t===fd.forEach||qV(QV,VV(e))?YV:t},ZV=JV;const fs=ye(ZV);var XV=Pe,e8=vn,d0=Pu,t8=Je,n8=t8(function(){d0(1)});XV({target:"Object",stat:!0,forced:n8},{keys:function(t){return d0(e8(t))}});var r8=it,o8=r8.Object.keys,i8=o8,a8=i8,s8=a8;const l8=ye(s8);var c8=it,u8=c8.Object.getOwnPropertySymbols,f8=u8,d8=f8,p8=d8;const p0=ye(p8);var h8=Pe,v8=ju.filter,m8=Ta,g8=m8("filter");h8({target:"Array",proto:!0,forced:!g8},{filter:function(t){return v8(this,t,arguments.length>1?arguments[1]:void 0)}});var y8=Zn,b8=y8("Array","filter"),w8=hn,S8=b8,dd=Array.prototype,x8=function(e){var t=e.filter;return e===dd||w8(dd,e)&&t===dd.filter?S8:t},E8=x8,C8=E8,k8=C8;const A8=ye(k8);var h0={exports:{}},$8=Pe,T8=Je,O8=tn,v0=Io.f,m0=bt,I8=!m0||T8(function(){v0(1)});$8({target:"Object",stat:!0,forced:I8,sham:!m0},{getOwnPropertyDescriptor:function(t,n){return v0(O8(t),n)}});var P8=it,g0=P8.Object,D8=h0.exports=function(t,n){return g0.getOwnPropertyDescriptor(t,n)};g0.getOwnPropertyDescriptor.sham&&(D8.sham=!0);var _8=h0.exports,M8=_8,N8=M8,R8=N8;const y0=ye(R8);var L8=nn,F8=Ve,B8=Ma,j8=Ra,z8=In,U8=F8([].concat),W8=L8("Reflect","ownKeys")||function(t){var n=B8.f(z8(t)),r=j8.f;return r?U8(n,r(t)):n},H8=Pe,K8=bt,V8=W8,q8=tn,G8=Io,Y8=No;H8({target:"Object",stat:!0,sham:!K8},{getOwnPropertyDescriptors:function(t){for(var n=q8(t),r=G8.f,o=V8(n),i={},a=0,s,l;o.length>a;)l=r(n,s=o[a++]),l!==void 0&&Y8(i,s,l);return i}});var Q8=it,J8=Q8.Object.getOwnPropertyDescriptors,Z8=J8,X8=Z8,e7=X8;const b0=ye(e7);var w0={exports:{}},t7=Pe,n7=bt,S0=Oa.f;t7({target:"Object",stat:!0,forced:Object.defineProperties!==S0,sham:!n7},{defineProperties:S0});var r7=it,x0=r7.Object,o7=w0.exports=function(t,n){return x0.defineProperties(t,n)};x0.defineProperties.sham&&(o7.sham=!0);var i7=w0.exports,a7=i7,s7=a7,l7=s7;const c7=ye(l7);var u7=zw;const f7=ye(u7);var d7=!1;function p7(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 h7(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 v7=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?!d7: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(h7(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var i=p7(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-",Ce="-webkit-",E0="comm",pd="rule",hd="decl",m7="@import",C0="@keyframes",g7="@layer",y7=Math.abs,ps=String.fromCharCode,b7=Object.assign;function w7(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 k0(e){return e.trim()}function S7(e,t){return(e=t.exec(e))?e[0]:e}function ke(e,t,n){return e.replace(t,n)}function vd(e,t){return e.indexOf(t)}function at(e,t){return e.charCodeAt(t)|0}function ni(e,t,n){return e.slice(t,n)}function sn(e){return e.length}function md(e){return e.length}function hs(e,t){return t.push(e),e}function x7(e,t){return e.map(t).join("")}var vs=1,Lr=1,A0=0,St=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 ri(e,t){return b7(ms("",null,null,"",null,null,0),e,{length:-e.length},t)}function E7(){return qe}function C7(){return qe=St>0?at(Fr,--St):0,Lr--,qe===10&&(Lr=1,vs--),qe}function Ot(){return qe=St<A0?at(Fr,St++):0,Lr++,qe===10&&(Lr=1,vs++),qe}function ln(){return at(Fr,St)}function gs(){return St}function oi(e,t){return ni(Fr,e,t)}function ii(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 $0(e){return vs=Lr=1,A0=sn(Fr=e),St=0,[]}function T0(e){return Fr="",e}function ys(e){return k0(oi(St-1,gd(e===91?e+2:e===40?e+1:e)))}function k7(e){for(;(qe=ln())&&qe<33;)Ot();return ii(e)>2||ii(qe)>3?"":" "}function A7(e,t){for(;--t&&Ot()&&!(qe<48||qe>102||qe>57&&qe<65||qe>70&&qe<97););return oi(e,gs()+(t<6&&ln()==32&&Ot()==32))}function gd(e){for(;Ot();)switch(qe){case e:return St;case 34:case 39:e!==34&&e!==39&&gd(qe);break;case 40:e===41&&gd(e);break;case 92:Ot();break}return St}function $7(e,t){for(;Ot()&&e+qe!==57;)if(e+qe===84&&ln()===47)break;return"/*"+oi(t,St-1)+"*"+ps(e===47?e:Ot())}function T7(e){for(;!ii(ln());)Ot();return oi(e,St)}function O7(e){return T0(bs("",null,null,null,[""],e=$0(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,E=r,$=w;g;)switch(v=b,b=Ot()){case 40:if(v!=108&&at($,f-1)==58){vd($+=ke(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:$+=k7(v);break;case 92:$+=A7(gs()-1,7);continue;case 47:switch(ln()){case 42:case 47:hs(I7($7(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&&($=ke($,/\f/g,"")),d>0&&sn($)-f&&hs(d>32?I0($+";",r,n,f-1):I0(ke($," ","")+";",r,n,f-2),l);break;case 59:$+=";";default:if(hs(E=O0($,t,n,c,u,o,s,w,A=[],x=[],f),i),b===123)if(u===0)bs($,t,E,E,A,i,f,s,x);else switch(p===99&&at($,3)===110?100:p){case 100:case 108:case 109:case 115:bs(e,E,E,r&&hs(O0(e,E,E,0,0,o,s,w,o,A=[],f),x),o,x,f,s,r?A:x);break;default:bs($,E,E,E,[""],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&&C7()==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=$+=T7(gs())),b++;break;case 45:v===45&&sn($)==2&&(h=0)}}return i}function O0(e,t,n,r,o,i,a,s,l,c,u){for(var f=o-1,p=o===0?i:[""],d=md(p),v=0,h=0,g=0;v<r;++v)for(var m=0,b=ni(e,f+1,f=y7(h=a[v])),w=e;m<d;++m)(w=k0(h>0?p[m]+" "+b:ke(b,/&\f/g,p[m])))&&(l[g++]=w);return ms(e,t,n,o===0?pd:s,l,c,u)}function I7(e,t,n){return ms(e,t,n,E0,ps(E7()),ni(e,2,-2),0)}function I0(e,t,n,r){return ms(e,t,n,hd,ni(e,0,r),ni(e,r+1,-1),r)}function Br(e,t){for(var n="",r=md(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function P7(e,t,n,r){switch(e.type){case g7:if(e.children.length)break;case m7:case hd:return e.return=e.return||e.value;case E0:return"";case C0:return e.return=e.value+"{"+Br(e.children,r)+"}";case pd:e.value=e.props.join(",")}return sn(n=Br(e.children,r))?e.return=e.value+"{"+n+"}":""}function D7(e){var t=md(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 _7(e){return function(t){t.root||(t=t.return)&&e(t)}}function M7(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var N7=function(t,n,r){for(var o=0,i=0;o=i,i=ln(),o===38&&i===12&&(n[r]=1),!ii(i);)Ot();return oi(t,St)},R7=function(t,n){var r=-1,o=44;do switch(ii(o)){case 0:o===38&&ln()===12&&(n[r]=1),t[r]+=N7(St-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},L7=function(t,n){return T0(R7($0(t),n))},P0=new WeakMap,F7=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&&!P0.get(r))&&!o){P0.set(t,!0);for(var i=[],a=L7(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]}}},B7=function(t){if(t.type==="decl"){var n=t.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(t.return="",t.value="")}};function D0(e,t){switch(w7(e,t)){case 5103:return Ce+"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 Ce+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Ce+e+ds+e+ft+e+e;case 6828:case 4268:return Ce+e+ft+e+e;case 6165:return Ce+e+ft+"flex-"+e+e;case 5187:return Ce+e+ke(e,/(\w+).+(:[^]+)/,Ce+"box-$1$2"+ft+"flex-$1$2")+e;case 5443:return Ce+e+ft+"flex-item-"+ke(e,/flex-|-self/,"")+e;case 4675:return Ce+e+ft+"flex-line-pack"+ke(e,/align-content|flex-|-self/,"")+e;case 5548:return Ce+e+ft+ke(e,"shrink","negative")+e;case 5292:return Ce+e+ft+ke(e,"basis","preferred-size")+e;case 6060:return Ce+"box-"+ke(e,"-grow","")+Ce+e+ft+ke(e,"grow","positive")+e;case 4554:return Ce+ke(e,/([^-])(transform)/g,"$1"+Ce+"$2")+e;case 6187:return ke(ke(ke(e,/(zoom-|grab)/,Ce+"$1"),/(image-set)/,Ce+"$1"),e,"")+e;case 5495:case 3959:return ke(e,/(image-set\([^]*)/,Ce+"$1$`$1");case 4968:return ke(ke(e,/(.+:)(flex-)?(.*)/,Ce+"box-pack:$3"+ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Ce+e+e;case 4095:case 3583:case 4068:case 2532:return ke(e,/(.+)-inline(.+)/,Ce+"$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 ke(e,/(.+:)(.+)-([^]+)/,"$1"+Ce+"$2-$3$1"+ds+(at(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~vd(e,"stretch")?D0(ke(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-(~vd(e,"!important")&&10))){case 107:return ke(e,":",":"+Ce)+e;case 101:return ke(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Ce+(at(e,14)===45?"inline-":"")+"box$3$1"+Ce+"$2$3$1"+ft+"$2box$3")+e}break;case 5936:switch(at(e,t+11)){case 114:return Ce+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Ce+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Ce+e+ft+ke(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Ce+e+ft+e+e}return e}var j7=function(t,n,r,o){if(t.length>-1&&!t.return)switch(t.type){case hd:t.return=D0(t.value,t.length);break;case C0:return Br([ri(t,{value:ke(t.value,"@","@"+Ce)})],o);case pd:if(t.length)return x7(t.props,function(i){switch(S7(i,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Br([ri(t,{props:[ke(i,/:(read-\w+)/,":"+ds+"$1")]})],o);case"::placeholder":return Br([ri(t,{props:[ke(i,/:(plac\w+)/,":"+Ce+"input-$1")]}),ri(t,{props:[ke(i,/:(plac\w+)/,":"+ds+"$1")]}),ri(t,{props:[ke(i,/:(plac\w+)/,ft+"input-$1")]})],o)}return""})}},z7=[j7],U7=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||z7,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=[F7,B7];{var u,f=[P7,_7(function(h){u.insert(h)})],p=D7(c.concat(o,f)),d=function(g){return Br(O7(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 v7({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 W7(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 H7={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},K7=!1,V7=/[A-Z]|^ms/g,q7=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_0=function(t){return t.charCodeAt(1)===45},M0=function(t){return t!=null&&typeof t!="boolean"},yd=M7(function(e){return _0(e)?e:e.replace(V7,"-$&").toLowerCase()}),N0=function(t,n){switch(t){case"animation":case"animationName":if(typeof n=="string")return n.replace(q7,function(r,o,i){return Nn={name:o,styles:i,next:Nn},o})}return H7[t]!==1&&!_0(t)&&typeof n=="number"&&n!==0?n+"px":n},G7="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 Y7(e,t,n)}}var l=n;if(t==null)return l;var c=t[l];return c!==void 0?c:l}function Y7(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]+"}":M0(s)&&(r+=yd(i)+":"+N0(i,s)+";")}else{if(i==="NO_COMPONENT_SELECTOR"&&K7)throw new Error(G7);if(Array.isArray(a)&&typeof a[0]=="string"&&(t==null||t[a[0]]===void 0))for(var l=0;l<a.length;l++)M0(a[l])&&(r+=yd(i)+":"+N0(i,a[l])+";");else{var c=ws(e,t,a);switch(i){case"animation":case"animationName":{r+=yd(i)+":"+c+";";break}default:r+=i+"{"+c+"}"}}}}return r}var R0=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;function bd(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]}R0.lastIndex=0;for(var c="",u;(u=R0.exec(o))!==null;)c+="-"+u[1];var f=W7(o)+c;return{name:f,styles:o,next:Nn}}function L0(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)},J7=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 F0(e,t){if(e.inserted[t.name]===void 0)return e.insert("",t,e.sheet,!0)}function B0(e,t,n){var r=[],o=L0(e,r,n);return r.length<2?n:o+t(r)}var Z7=function(t){var n=U7(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=bd(c,n.registered,void 0);return J7(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=bd(c,n.registered),p="animation-"+f.name;return F0(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=bd(c,n.registered);F0(n,f)},a=function(){for(var l=arguments.length,c=new Array(l),u=0;u<l;u++)c[u]=arguments[u];return B0(n.registered,r,X7(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:L0.bind(null,n.registered),merge:B0.bind(null,n.registered,r)}},X7=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},eq=Xo,wd=Date.prototype,j0="Invalid Date",z0="toString",tq=wd[z0],nq=wd.getTime;String(new Date(NaN))!=j0&&eq(wd,z0,function(){var t=nq.call(this);return t===t?tq.call(this):j0});var rq=Yf,oq=LS,iq=rq?{}.toString:function(){return"[object "+oq(this)+"]"},aq=Yf,sq=Xo,lq=iq;aq||sq(Object.prototype,"toString",lq,{unsafe:!0});var cq=Kf.PROPER,uq=Xo,fq=_n,U0=as,dq=Kt,pq=FS,Sd="toString",W0=RegExp.prototype,H0=W0[Sd],hq=dq(function(){return H0.call({source:"a",flags:"b"})!="/a/b"}),vq=cq&&H0.name!=Sd;(hq||vq)&&uq(RegExp.prototype,Sd,function(){var t=fq(this),n=U0(t.source),r=t.flags,o=U0(r===void 0&&t instanceof RegExp&&!("flags"in W0)?pq.call(t):r);return"/"+n+"/"+o},{unsafe:!0});var K0=typeof window<"u"?window:self,mq=K0.crypto||K0.msCrypto,gq=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}}(mq);const yq=ye(gq);function bq(){return yq().toString(26).substr(2,5).replace(/[0-9]/g,function(e){return String.fromCharCode(e.charCodeAt(0)+65)})}var wq=kb;const V0=ye(wq);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 q0(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 je(n=[je(r="%c".concat(e,"%c ")).call(r,t)]).call(n,we(Te("green","white")),i)}function Sq(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=V0(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,we(q0.apply(void 0,je(h=[e]).call(h,we(p)))))}else if(d){var g;(g=console).log.apply(g,we(V0(p)?p:[p]))}else{var m,b;(m=console).groupCollapsed.apply(m,we(q0.apply(void 0,je(b=[e]).call(b,we(p)))))}}),f||console.groupEnd()}}:function(){return 0}}var xq=Xn,Eq=Kf.EXISTS,Cq=Jo.f,G0=Function.prototype,kq=G0.toString,Aq=/^\s*function ([^ (]*)/,$q="name";xq&&!Eq&&Cq(G0,$q,{configurable:!0,get:function(){try{return kq.call(this).match(Aq)[1]}catch{return""}}});var Tq=it,Oq=Tq.setTimeout,Iq=Oq;const Pq=ye(Iq);function Dq(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=Pq(function(){e.apply(void 0,i),n=Mn()},Math.max(0,t-s+n)))}}var Y0=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 Dq(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};Y0.defaultProps={debounce:200};var _q=Math.sign||function(t){var n=+t;return n===0||n!==n?n:n<0?-1:1},Mq=Pe,Nq=_q;Mq({target:"Math",stat:!0},{sign:Nq});var Rq=it,Lq=Rq.Math.sign,Fq=Lq,Bq=Fq,jq=Bq;const zq=ye(jq);function Uq(e,t){var n=zq(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 Wq(e,t,n,r){for(var o=e,i=0;i<r;i++)o=n(o,t);return o}var Q0=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=Wq(u,v,Uq,(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};Q0.propTypes={name:xe.string.isRequired,onEnd:xe.func,target:xe.any.isRequired,value:xe.oneOfType([xe.number,xe.oneOf(["100%"])]).isRequired};function xd(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 J0(e,t){var n=l8(e);if(p0){var r=p0(e);t&&(r=A8(r).call(r,function(o){return y0(e,o).enumerable})),n.push.apply(n,r)}return n}function Z0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};if(t%2){var r;fs(r=J0(Object(n),!0)).call(r,function(i){tW(e,i,n[i])})}else if(b0)c7(e,b0(n));else{var o;fs(o=J0(Object(n))).call(o,function(i){f7(e,i,y0(n,i))})}}return e}var Hq=function(){return 1/0},X0=17,Kq="bottom",Vt="top",ex=1,Vq=34,tx={};function qq(e,t){return e(),NK(e,t)}function nx(e){var t=e.mode,n=e.target,r=n.offsetHeight,o=n.scrollHeight,i=n.scrollTop,a=o-i-r<ex,s=i<ex,l=t===Vt?s:a,c=t!==Vt?s:a;return{atBottom:a,atEnd:l,atStart:c,atTop:s}}function ai(e,t){return e===(t===Vt?0:"100%")}var Ed=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 Sq("<ScrollToBottom>",{force:i})},[i]);s=s===Vt?Vt:Kq;var f=O.useRef(0),p=O.useRef(a),d=xd(s===Vt?0:"100%"),v=on(d,3),h=v[0],g=v[1],m=v[2],b=xd(null),w=on(b,3),A=w[0],x=w[1],E=w[2],$=O.useRef(0),R=O.useRef(0),K=O.useRef(0),T=O.useState(!0),M=on(T,2),U=M[0],B=M[1],F=O.useState(!0),D=on(F,2),L=D[0],q=D[1],W=O.useState(!0),I=on(W,2),y=I[0],P=I[1],N=O.useState(!1),S=on(N,2),V=S[0],Y=S[1],G=xd(!0),Q=on(G,3),X=Q[0],ee=Q[1],Z=Q[2],_=O.useRef([]),j=O.useCallback(function(z){var te=E.current;return _.current.push(z),te&&z({scrollTop:te.scrollTop}),function(){var ae=_.current,ce=QK(ae).call(ae,z);~ce&&wV(ae).call(ae,ce,1)}},[_,E]),J=O.useCallback(function(){var z=m.current;u(function(){var te;return je(te=["%cSpineTo%c: %conEnd%c is fired."]).call(te,we(Te("magenta")),we(Te("orange")),[{animateTo:z}])}),f.current=Mn(),ai(z,s)||ee(!1),g(null)},[m,u,f,s,g,ee]),re=O.useCallback(function(z){var te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ae=te.behavior,ce=E.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[je(he=["%cscrollTo%c: Will scroll to %c".concat(typeof z=="number"?z+"px":z.replace(/%/g,"%%"),"%c")]).call(he,we(Te("lime","")),we(Te("purple"))),{behavior:ae,nextAnimateTo:z,target:ce}]}),ae==="auto"?(J(),ce&&(ce.scrollTop=z==="100%"?ce.scrollHeight-ce.offsetHeight:z)):(ae!=="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)),ai(z,s)&&(u(function(){var he;return[je(he=["%cscrollTo%c: Scrolling to end, will set sticky to %ctrue%c."]).call(he,we(Te("lime","")),we(Te("purple"))),[{mode:s,nextAnimateTo:z}]]}),ee(!0))},[u,J,s,g,ee,E]),ue=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ae;return je(ae=["%cscrollToBottom%c: Called"]).call(ae,we(Te("yellow","")))}),te!=="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.'),re("100%",{behavior:te||"smooth"})},[u,re]),ie=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ae;return je(ae=["%cscrollToTop%c: Called"]).call(ae,we(Te("yellow","")))}),te!=="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.'),re(0,{behavior:te||"smooth"})},[u,re]),de=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ce;return je(ce=["%cscrollToEnd%c: Called"]).call(ce,we(Te("yellow","")))}),te!=="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 ae={behavior:te||"smooth"};s===Vt?ie(ae):ue(ae)},[u,s,ue,ie]),Se=O.useCallback(function(){var z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},te=z.behavior;u(function(){var ce;return je(ce=["%cscrollToStart%c: Called"]).call(ce,we(Te("yellow","")))}),te!=="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 ae={behavior:te||"smooth"};s===Vt?ue(ae):ie(ae)},[u,s,ue,ie]),De=O.useCallback(function(){var z=E.current;if(z){if(p.current==="auto"){u(function(){var nt;return je(nt=["%ctarget changed%c: Initial scroll"]).call(nt,we(Te("blue")))}),z.scrollTop=s===Vt?0:z.scrollHeight-z.offsetHeight,p.current=!1;return}var te=$.current,ae=z.offsetHeight,ce=z.scrollHeight,he=z.scrollTop,We=s===Vt?0:Math.max(0,ce-ae-he),He=Math.max(0,te-he),mt=c({maxValue:We,minValue:He,offsetHeight:ae,scrollHeight:ce,scrollTop:he}),tt=Math.max(0,Math.min(We,mt)),Ie;s===Vt||tt!==We?Ie=he+tt:Ie="100%",u(function(){var nt,Ge,Bn;return[je(nt=[je(Ge=je(Bn="%cscrollToSticky%c: Will animate from %c".concat(te,"px%c to %c")).call(Bn,typeof Ie=="number"?Ie+"px":Ie.replace(/%/g,"%%"),"%c (%c")).call(Ge,(Ie==="100%"?We:Ie)+te,"px%c)")]).call(nt,we(Te("orange")),we(Te("purple")),we(Te("purple")),we(Te("purple"))),{animateFrom:te,maxValue:We,minValue:He,nextAnimateTo:Ie,nextValue:tt,offsetHeight:ae,rawNextValue:mt,scrollHeight:ce,scrollTop:he}]}),re(Ie,{behavior:"smooth"})}},[$,u,s,c,re,E]),Ue=O.useCallback(function(z){var te,ae=z.timeStampLow,ce=m.current,he=E.current,We=ce!==null;if(!(ae<=f.current||!he)){var He=nx({mode:s,target:he}),mt=He.atBottom,tt=He.atEnd,Ie=He.atStart,nt=He.atTop;B(mt),q(tt),Y(Ie),P(nt);var Ge=he.offsetHeight,Bn=he.scrollHeight,cE=R.current,uE=K.current,Xd=Ge!==cE,ep=Bn!==uE;if(Xd&&(R.current=Ge),ep&&(K.current=Bn),!Xd&&!ep){var _s=We&&ai(ce,s)||tt;Z.current!==_s&&(u(function(){var or,fE,dE,pE;return[je(or=["%conScroll%c: %csetSticky%c(%c".concat(_s,"%c)")]).call(or,we(Te("red")),we(Te("red")),we(Te("purple"))),je(fE=[je(dE=je(pE="(animating = %c".concat(We,"%c && isEnd = %c")).call(pE,ai(ce,s),"%c) || atEnd = %c")).call(dE,tt,"%c")]).call(fE,we(Te("purple")),we(Te("purple")),we(Te("purple")),[{animating:We,animateTo:ce,atEnd:tt,mode:s,offsetHeight:he.offsetHeight,scrollHeight:he.scrollHeight,sticky:Z.current,nextSticky:_s}])]}),ee(_s))}else Z.current&&(u(function(){var or;return[je(or=["%conScroll%c: Size changed while sticky, calling %cscrollToSticky()%c"]).call(or,we(Te("red")),we(Te("orange")),[{offsetHeightChanged:Xd,scrollHeightChanged:ep}]),{nextOffsetHeight:Ge,prevOffsetHeight:cE,nextScrollHeight:Bn,prevScrollHeight:uE}]}),De());var bQ=he.scrollTop;fs(te=_.current).call(te,function(or){return or({scrollTop:bQ})})}},[m,u,f,s,R,K,_,De,B,q,Y,P,ee,Z,E]);O.useEffect(function(){if(A){var z=!1,te=qq(function(){var ae=E.current,ce=m.current!==null;Z.current?nx({mode:s,target:ae}).atEnd?z=!1:z?Mn()-z>Vq&&(ce||($.current=ae.scrollTop,u(function(){var he;return je(he=["%cInterval check%c: Should sticky but not at end, calling %cscrollToSticky()%c to scroll"]).call(he,we(Te("navy")),we(Te("orange")))}),De()),z=!1):z=Mn():ae.scrollHeight<=ae.offsetHeight&&!Z.current&&(u(function(){var he;return[je(he=["%cInterval check%c: Container is emptied, setting sticky back to %ctrue%c"]).call(he,we(Te("navy")),we(Te("purple"))),[{offsetHeight:ae.offsetHeight,scrollHeight:ae.scrollHeight,sticky:Z.current}]]}),ee(!0))},Math.max(X0,n)||X0);return function(){return clearInterval(te)}}},[m,n,u,s,De,ee,Z,A,E]);var dt=O.useMemo(function(){var z=tx[l]||(tx[l]=Z7({key:"react-scroll-to-bottom--css-"+bq(),nonce:l}));return function(te){return z.css(te)+""}},[l]),Et=O.useMemo(function(){return{observeScrollPosition:j,setTarget:x,styleToClassName:dt}},[j,x,dt]),pt=O.useMemo(function(){return{atBottom:U,atEnd:L,atStart:V,atTop:y,mode:s}},[U,L,V,y,s]),oe=O.useMemo(function(){var z=h!==null;return{animating:z,animatingToEnd:z&&ai(h,s),sticky:X}},[h,s,X]),le=O.useMemo(function(){return Z0(Z0({},pt),oe)},[pt,oe]),H=O.useMemo(function(){return{scrollTo:re,scrollToBottom:ue,scrollToEnd:de,scrollToStart:Se,scrollToTop:ie}},[re,ue,de,Se,ie]);return O.useEffect(function(){if(A){var z=function(){K.current=A.scrollHeight};return A.addEventListener("focus",z,{capture:!0,passive:!0}),function(){return A.removeEventListener("focus",z)}}},[A]),u(function(){var z;return[je(z=["%cRender%c: Render"]).call(z,we(Te("cyan",""))),{animateTo:h,animating:h!==null,sticky:X,target:A}]}),O.createElement(Qa.Provider,{value:Et},O.createElement(xf.Provider,{value:H},O.createElement(kf.Provider,{value:le},O.createElement(Ef.Provider,{value:pt},O.createElement(Cf.Provider,{value:oe},r,A&&O.createElement(Y0,{debounce:o,name:"scroll",onEvent:Ue,target:A}),A&&h!==null&&O.createElement(Q0,{name:"scrollTop",onEnd:J,target:A,value:h}))))))};Ed.defaultProps={checkInterval:100,children:void 0,debounce:17,debug:void 0,initialScrollBehavior:"smooth",mode:void 0,nonce:void 0,scroller:Hq},Ed.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 Gq={height:"100%",overflowY:"auto",width:"100%"},Cd=function(t){var n=t.children,r=t.className,o=O.useContext(Qa),i=o.setTarget,a=Af()(Gq);return O.createElement("div",{className:vf(a,(r||"")+""),ref:i},n)};Cd.defaultProps={children:void 0,className:void 0},Cd.propTypes={children:xe.any,className:xe.string};var Yq={position:"relative"},kd=function(t){var n=t.children,r=t.className,o=t.followButtonClassName,i=t.scrollViewClassName,a=Af()(Yq);return O.createElement("div",{className:vf(a,(r||"")+"")},O.createElement(Cd,{className:(i||"")+""},n),O.createElement($f,{className:(o||"")+""}))};kd.defaultProps={children:void 0,className:void 0,followButtonClassName:void 0,scrollViewClassName:void 0},kd.propTypes={children:xe.any,className:xe.string,followButtonClassName:xe.string,scrollViewClassName:xe.string};var Ad=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(Ed,{checkInterval:n,debounce:i,debug:a,initialScrollBehavior:l,mode:c,nonce:u,scroller:f},O.createElement(kd,{className:o,followButtonClassName:s,scrollViewClassName:p},r))};Ad.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},Ad.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},n2();let rx=(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 $d=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?PE(t):t,[t]),b=O.useMemo(()=>{var E;const x=m.filter($=>$.direction==="outgoing"&&$.status!=="pending");return(E=x[x.length-1])==null?void 0:E.id},[m]),w=x=>{if(x.direction==="incoming")return d;if(x.direction==="outgoing")return v};return C.jsxs(Ad,{...h,className:ko(g.container.className,e),followButtonClassName:g.scrollDownButton.className,scrollViewClassName:g.viewPort.className,children:[r&&C.jsx("span",{...g.headerMessage,children:r}),u&&C.jsx(e2,{botAvatar:i,botDescription:a,botName:s}),m.map(x=>{var E;return C.jsx(Yc,{renderers:o,sendMessage:l,addMessageFeedback:c,isLastDeliveredMessage:p&&x.id===b,showAvatar:w(x),...x},((E=x.metadata)==null?void 0:E.clientMessageId)||x.id)}),n&&C.jsx(Yc,{id:rx(),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:C.jsx(Gc,{})})]})});$d.displayName="MessageList";const Qq=({className:e,...t})=>{const{className:n}=ve.loader;return C.jsx("div",{...t,className:ko(e,n)})};function ox({error:e,restartConversation:t,closeWindow:n}){let r,o;const{error:i}=ve;return e.type==="configuration"?(r="Configuration error",o=C.jsx(eP,{...i.icon})):e.type==="bot"?(r="Bot error",o=C.jsx(Jv,{...i.icon})):e.type==="network"?(r="Network error",o=C.jsx(cP,{...i.icon})):e.type==="disconnected"?(r="Disconnected",o=C.jsx(aP,{...i.icon})):(r="Unexpected error",o=C.jsx(Jv,{...i.icon})),C.jsx(Jq,{error:e,title:r,icon:o,restartConversation:t,closeWindow:n})}function Jq({error:e,title:t,icon:n,restartConversation:r,closeWindow:o}){const{error:i}=ve;return C.jsxs("div",{...i.container,children:[C.jsxs("div",{...i.header.container,children:[`Webchat ${e.type} error`,C.jsxs("div",{...i.header.actions,children:[r&&C.jsx(qc,{restartConversation:r,style:{color:"white",backgroundColor:"transparent"}}),o&&C.jsx(zy,{onClick:o,style:{color:"white",backgroundColor:"transparent"}})]})]}),C.jsxs("div",{...i.content,children:[n,C.jsx("div",{...i.errorTitle,children:t}),C.jsx("div",{...i.errorMessage,children:e.message}),e.id&&C.jsx("div",{...i.id,children:e.id})]})]})}const ix=({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:E,fontFamily:$,radius:R,themeMode:K,variant:T,headerVariant:M,botAvatar:U,botDescription:B,botName:F,composerPlaceholder:D,footer:L,feedbackEnabled:q,additionalStylesheetUrl:W}=t,I={color:E,fontFamily:$,radius:R,themeMode:K,variant:T,headerVariant:M,additionalStylesheetUrl:W};q||(h=void 0);const y=O.useMemo(()=>o?pp(r,f,o.id,F,U):[],[U,F,r,o,f]),P=S=>(S==null?void 0:S.type)==="network"||(S==null?void 0:S.type)==="disconnected",N=()=>{P(u)&&typeof navigator<"u"&&navigator.onLine&&g&&g()};return O.useEffect(()=>{if(g)return window.addEventListener("online",N),()=>{window.removeEventListener("online",N)}},[u,g]),O.useEffect(()=>{if(!P(u)||!g)return;const S=window.setInterval(()=>{N()},3e3);return()=>{window.clearInterval(S)}},[u,g]),C.jsxs(C.Fragment,{children:[C.jsx(Py,{...I}),C.jsx(Bc,{connected:e,allowFileUpload:c,uploadFile:v,storageKey:b,...x,children:u?C.jsx(ox,{error:u,restartConversation:g,closeWindow:p}):C.jsxs(C.Fragment,{children:[C.jsx(Uy,{closeWindow:p,configuration:t,restartConversation:g,clientId:m,soundOn:w,toggleSound:A}),i?C.jsx(Qq,{}):C.jsx($d,{botAvatar:U,botDescription:B,botName:F,renderers:a,isTyping:n,sendMessage:d,addMessageFeedback:h,messages:y}),C.jsx(Jg,{sendMessage:d,uploadFile:v,connected:e,isReadOnly:s,disableComposer:l,footer:L,composerPlaceholder:D,allowFileUpload:c,storageKey:b})]})})]})};function Zq(){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 Xq=Object.defineProperty,eG=(e,t,n)=>t in e?Xq(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,tG=(e,t,n)=>eG(e,t+"",n),nG=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},rG={bodySerializer:e=>JSON.stringify(e,(t,n)=>typeof n=="bigint"?n.toString():n)},oG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},iG=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},aG=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},ax=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let s=(e?o:o.map(l=>encodeURIComponent(l))).join(iG(r));switch(r){case"label":return`.${s}`;case"matrix":return`;${n}=${s}`;case"simple":return s;default:return`${n}=${s}`}}let i=oG(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)}`},sx=({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=aG(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},sG=/\{[^{}]+\}/g,lG=({path:e,url:t})=>{let n=t,r=t.match(sG);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,ax({explode:i,name:a,style:s,value:l}));continue}if(typeof l=="object"){n=n.replace(o,sx({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},lx=({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,ax({allowReserved:e,explode:!0,name:i,style:"form",value:a,...t})];continue}if(typeof a=="object"){o=[...o,sx({allowReserved:e,explode:!0,name:i,style:"deepObject",value:a,...n})];continue}o=[...o,Ss({allowReserved:e,name:i,value:a})]}}return o.join("&")},cG=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"}},uG=async({security:e,...t})=>{for(let n of e){let r=await nG(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}},cx=e=>fG({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:lx(e.querySerializer),url:e.url}),fG=({baseUrl:e,path:t,query:n,querySerializer:r,url:o})=>{let i=o.startsWith("/")?o:`/${o}`,a=(e??"")+i;t&&(a=lG({path:t,url:a}));let s=n?r(n):"";return s.startsWith("?")&&(s=s.substring(1)),s&&(a+=`?${s}`),a},ux=(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=fx(e.headers,t.headers),r},fx=(...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},Td=class{constructor(){tG(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]}},dG=()=>({error:new Td,request:new Td,response:new Td}),pG=lx({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),hG={"Content-Type":"application/json"},dx=(e={})=>({...rG,headers:hG,parseAs:"auto",querySerializer:pG,...e}),vG=(e={})=>{let t=ux(dx(),e),n=()=>({...t}),r=a=>(t=ux(t,a),n()),o=dG(),i=async a=>{let s={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:fx(t.headers,a.headers)};s.security&&await uG({...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=cx(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"?cG(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:cx,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"})}},mG=vG,gG=dx;const Oe=mG((e=>({...e,withCredentials:!0,timeout:6e4,maxBodyLength:104857600,maxContentLength:104857600,throwOnError:!0}))(gG({baseUrl:"https://webchat.botpress.cloud/"}))),yG=e=>(e.client??Oe).delete({url:"/conversations/{id}",...e}),bG=e=>(e.client??Oe).get({url:"/conversations/{id}",...e}),wG=e=>(e.client??Oe).get({url:"/conversations",...e}),SG=e=>(e.client??Oe).post({url:"/conversations",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),xG=e=>(e.client??Oe).get({url:"/conversations/{id}/messages",...e}),EG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants",...e}),CG=e=>(e.client??Oe).post({url:"/conversations/{id}/participants",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),kG=e=>(e.client??Oe).delete({url:"/conversations/{id}/participants/{userId}",...e}),AG=e=>(e.client??Oe).get({url:"/conversations/{id}/participants/{userId}",...e}),$G=e=>(e.client??Oe).delete({url:"/messages/{id}",...e}),TG=e=>(e.client??Oe).get({url:"/messages/{id}",...e}),OG=e=>(e.client??Oe).put({url:"/messages/{id}",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),IG=e=>(e.client??Oe).post({url:"/messages",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),PG=e=>(e.client??Oe).delete({url:"/messages/{id}/feedback",...e}),DG=e=>(e.client??Oe).put({url:"/messages/{id}/feedback",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),_G=e=>(e.client??Oe).delete({url:"/users/me",...e}),MG=e=>(e.client??Oe).get({url:"/users/me",...e}),NG=e=>(e.client??Oe).put({url:"/users/me",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),px=e=>((e==null?void 0:e.client)??Oe).post({url:"/users",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),RG=e=>((e==null?void 0:e.client)??Oe).post({url:"/users/key",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),LG=e=>(e.client??Oe).get({url:"/events/{id}",...e}),FG=e=>(e.client??Oe).post({url:"/events",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),BG=e=>(e.client??Oe).post({url:"/files",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}});let hx=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 Od(e){}function jG(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=Od,onError:n=Od,onRetry:r=Od,onComment:o}=e;let i="",a=!0,s,l="",c="";function u(h){const g=a?h.replace(/^\xEF\xBB\xBF/,""):h,[m,b]=zG(`${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 hx(`Invalid \`retry\` value: "${g}"`,{type:"invalid-retry",value:g,line:m}));break;default:n(new hx(`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
|
+
`)?l.slice(0,-1):l}),s=void 0,l="",c=""}function v(h={}){i&&h.consume&&f(i),a=!0,s=void 0,l="",c="",i=""}return{feed:u,reset:v}}function zG(e){const t=[];let n="",r=0;for(;r<e.length;){const o=e.indexOf("\r",r),i=e.indexOf(`
|
|
287
292
|
`,r);let a=-1;if(o!==-1&&i!==-1?a=Math.min(o,i):o!==-1?a=o:i!==-1&&(a=i),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]===`
|
|
288
|
-
`&&r++}}return[t,n]}class lx 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(cx(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(cx(this),n)}}function MG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function xd(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(xd).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${xd(e.cause)}`:e.message:`${e}`}function cx(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var ux=e=>{throw TypeError(e)},Ed=(e,t,n)=>t.has(e)||ux("Cannot "+n),me=(e,t,n)=>(Ed(e,t,"read from private field"),n?n.call(e):t.get(e)),Je=(e,t,n)=>t.has(e)?ux("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Le=(e,t,n,r)=>(Ed(e,t,"write to private field"),t.set(e,n),n),yn=(e,t,n)=>(Ed(e,t,"access private method"),n),wt,nr,Br,ws,Ss,ii,zr,ai,Nn,Wr,Ur,Hr,si,Kt,kd,Cd,$d,fx,Td,Od,li,Id,Pd;class xs extends EventTarget{constructor(t,n){var r,o;super(),Je(this,Kt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Je(this,wt),Je(this,nr),Je(this,Br),Je(this,ws),Je(this,Ss),Je(this,ii),Je(this,zr),Je(this,ai,null),Je(this,Nn),Je(this,Wr),Je(this,Ur,null),Je(this,Hr,null),Je(this,si,null),Je(this,Cd,async i=>{var a;me(this,Wr).reset();const{body:s,redirected:l,status:c,headers:u}=i;if(c===204){yn(this,Kt,li).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(l?Le(this,Br,new URL(i.url)):Le(this,Br,void 0),c!==200){yn(this,Kt,li).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){yn(this,Kt,li).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(me(this,wt)===this.CLOSED)return;Le(this,wt,this.OPEN);const f=new Event("open");if((a=me(this,si))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){yn(this,Kt,li).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&&me(this,Wr).feed(p.decode(g,{stream:!h})),h&&(v=!1,me(this,Wr).reset(),yn(this,Kt,Id).call(this))}while(v)}),Je(this,$d,i=>{Le(this,Nn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&yn(this,Kt,Id).call(this,xd(i))}),Je(this,Td,i=>{typeof i.id=="string"&&Le(this,ai,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:me(this,Br)?me(this,Br).origin:me(this,nr).origin,lastEventId:i.id||""});me(this,Hr)&&(!i.event||i.event==="message")&&me(this,Hr).call(this,a),this.dispatchEvent(a)}),Je(this,Od,i=>{Le(this,ii,i)}),Je(this,Pd,()=>{Le(this,zr,void 0),me(this,wt)===this.CONNECTING&&yn(this,Kt,kd).call(this)});try{if(t instanceof URL)Le(this,nr,t);else if(typeof t=="string")Le(this,nr,new URL(t,NG()));else throw new Error("Invalid URL")}catch{throw MG("An invalid or illegal string was specified")}Le(this,Wr,_G({onEvent:me(this,Td),onRetry:me(this,Od)})),Le(this,wt,this.CONNECTING),Le(this,ii,3e3),Le(this,Ss,(r=n==null?void 0:n.fetch)!=null?r:globalThis.fetch),Le(this,ws,(o=n==null?void 0:n.withCredentials)!=null?o:!1),yn(this,Kt,kd).call(this)}get readyState(){return me(this,wt)}get url(){return me(this,nr).href}get withCredentials(){return me(this,ws)}get onerror(){return me(this,Ur)}set onerror(t){Le(this,Ur,t)}get onmessage(){return me(this,Hr)}set onmessage(t){Le(this,Hr,t)}get onopen(){return me(this,si)}set onopen(t){Le(this,si,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(){me(this,zr)&&clearTimeout(me(this,zr)),me(this,wt)!==this.CLOSED&&(me(this,Nn)&&me(this,Nn).abort(),Le(this,wt,this.CLOSED),Le(this,Nn,void 0))}}wt=new WeakMap,nr=new WeakMap,Br=new WeakMap,ws=new WeakMap,Ss=new WeakMap,ii=new WeakMap,zr=new WeakMap,ai=new WeakMap,Nn=new WeakMap,Wr=new WeakMap,Ur=new WeakMap,Hr=new WeakMap,si=new WeakMap,Kt=new WeakSet,kd=function(){Le(this,wt,this.CONNECTING),Le(this,Nn,new AbortController),me(this,Ss)(me(this,nr),yn(this,Kt,fx).call(this)).then(me(this,Cd)).catch(me(this,$d))},Cd=new WeakMap,$d=new WeakMap,fx=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...me(this,ai)?{"Last-Event-ID":me(this,ai)}:void 0},cache:"no-store",signal:(e=me(this,Nn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Td=new WeakMap,Od=new WeakMap,li=function(e,t){var n;me(this,wt)!==this.CLOSED&&Le(this,wt,this.CLOSED);const r=new lx("error",{code:t,message:e});(n=me(this,Ur))==null||n.call(this,r),this.dispatchEvent(r)},Id=function(e,t){var n;if(me(this,wt)===this.CLOSED)return;Le(this,wt,this.CONNECTING);const r=new lx("error",{code:t,message:e});(n=me(this,Ur))==null||n.call(this,r),this.dispatchEvent(r),Le(this,zr,setTimeout(me(this,Pd),me(this,ii)))},Pd=new WeakMap,xs.CONNECTING=0,xs.OPEN=1,xs.CLOSED=2;function NG(){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 dx(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 LG=()=>{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}))}}},Re=e=>e.data,px={throwOnError:!0},RG=async({clientId:e,apiUrl:t,adminKey:n})=>{const r=`${t||Ie.getConfig().baseUrl}/${e}`;Ie.interceptors.response._fns.length===0&&Ie.interceptors.response.use(dx);const o={...px,baseUrl:r};return ax({...o,body:{},headers:n?{"x-admin-key":n}:void 0}).then(Re)},FG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},o=`${n||Ie.getConfig().baseUrl}/${t}`,i={...px,baseUrl:o};return Ie.interceptors.response._fns.length===0&&Ie.interceptors.response.use(dx),{createConversation:()=>pG({...i,headers:r,body:{}}).then(Re),getConversation:({conversationId:a})=>fG({...i,headers:r,path:{id:a}}).then(Re),deleteConversation:({conversationId:a})=>uG({...i,headers:r,path:{id:a}}).then(Re),listConversations:({nextToken:a})=>dG({...i,headers:r,query:{nextToken:a}}).then(Re),listConversationMessages:({conversationId:a,nextToken:s})=>hG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Re),addParticipant:({conversationId:a,userId:s})=>mG({...i,headers:r,path:{id:a},body:{userId:s}}).then(Re),removeParticipant:({conversationId:a,userId:s})=>gG({...i,headers:r,path:{id:a,userId:s}}).then(Re),getParticipant:({conversationId:a,userId:s})=>yG({...i,headers:r,path:{id:a,userId:s}}).then(Re),listParticipants:({conversationId:a,nextToken:s})=>vG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Re),createMessage:a=>xG({...i,headers:r,body:a}).then(Re),updateMessage:({messageId:a,...s})=>SG({...i,headers:r,path:{id:a},body:s}).then(Re),getMessage:({messageId:a})=>wG({...i,headers:r,path:{id:a}}).then(Re),deleteMessage:({messageId:a})=>bG({...i,headers:r,path:{id:a}}).then(Re),createFile:a=>AG({...i,headers:r,body:a}).then(Re),createUser:a=>ax({...i,headers:r,body:a}).then(Re),getUser:()=>$G({...i,headers:r}).then(Re),updateUser:a=>TG({...i,headers:r,body:a}).then(Re),deleteUser:()=>CG({...i,headers:r}).then(Re),createEvent:a=>PG({...i,headers:r,body:a}).then(Re),getEvent:({eventId:a})=>IG({...i,headers:r,path:{id:a}}).then(Re),addMessageFeedback:({messageId:a,...s})=>kG({...i,headers:r,path:{id:a},body:s}).then(Re),removeMessageFeedback:({messageId:a})=>EG({...i,headers:r,path:{id:a}}).then(Re),generateUserKey:({adminKey:a,...s})=>OG({...i,headers:{"x-admin-key":a},body:s}).then(Re),listenConversation:({conversationId:a})=>{let s=0,l=null;const c=LG(),u=()=>{l&&l.close();const f=`${o}/conversations/${a}/listen`;l=new xs(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>c.emit("open"),l.onerror=p=>{c.emit("error",p),s<10&&(s++,setTimeout(()=>u(),3e3))},l.onmessage=p=>{const d=jG(p.data);c.emit(d.type,d.data)}};return u(),c.on}}},jG=e=>{try{return JSON.parse(e)}catch{return e}};function hx({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminKey:o,...i}){const a=vm(n,r),s=a(I=>I.conversationId),l=a(I=>I.user),c=a(I=>I.setConversationId),u=a(I=>I.setUser),f=Hn(I=>I.messages),p=Hn(I=>I.saveMessage),d=Hn(I=>I.updateMessage),v=Hn(I=>I.fetchMessages),h=Hn(I=>I.setMessages),g=Hn(I=>I.clearMessages),m=Hn(I=>I.isFetching),b=uo(I=>I.participants),w=uo(I=>I.setParticipants),$=uo(I=>I.addParticipant),x=uo(I=>I.removeParticipant),E=uo(I=>I.clearParticipants),[T,R]=P.useState("connecting"),{isTyping:U,setIsTyping:O}=HK(),D=P.useMemo(()=>mm(),[]),[F,j]=P.useState(i.conversationId),[B,M]=P.useState(i.user),[L,G]=P.useState(void 0),[H,A]=P.useState(void 0),y=P.useRef(!1);if(P.useEffect(()=>{A(void 0)},[i.conversationId,i.user,t,e]),Em(async()=>{if(!t){A({type:"configuration",message:Sp});return}if(!e||!e.startsWith("https://")){A({type:"configuration",message:xp});return}async function I(){const S=i.user||l;let N=S;if(!N){const{key:Z,user:Q}=await RG({clientId:t,apiUrl:e,adminKey:o});N={userId:Q.id,userToken:Z}}const K=FG({userKey:N.userToken,clientId:t,apiUrl:e});let V=i.conversationId||s;const Y=!!V;if(!V||!S){const{conversation:Z}=await K.createConversation();V=Z.id}if(Y){const Z=await v({client:K,conversationId:V});h(Z);const{participants:Q}=await K.listParticipants({conversationId:V});w(Q)}else g(),E();M(N),u(N),G(K),j(V),c(V),R("connected")}try{if(y.current)return;y.current=!0,await I(),y.current=!1}catch(S){g(),A(fi(S)),R("error")}},[i.user,i.conversationId]),P.useEffect(()=>{if(!L||!F)return;const I=L.listenConversation({conversationId:F}),S=[I("open",async()=>{var K,V;const{event:N}=await L.createEvent({conversationId:F,payload:{type:"conversation_started",data:{}}});(V=(K=N.payload.data)==null?void 0:K.status)!=null&&V.isInitial&&D.emit("conversation",F),R("connected")}),I("error",N=>{A(K=>K||fi(N)),D.emit("error",new Error(`Connection to conversation lost: ${N.message}`)),R("error")}),I("message_created",N=>{const K=Mi(N);(B==null?void 0:B.userId)!==K.authorId&&(O(!1),D.emit("isTyping",{isTyping:!1,timeout:0})),p(K),D.emit("message",K)}),I("message_status_changed",N=>{N.newStatus==="processing"&&(O(!0),D.emit("isTyping",{isTyping:!0,timeout:5e3}),d(N.message.metadata.clientMessageId,{status:N.newStatus}))}),I("participant_added",N=>{$(N.participant),D.emit("participantAdded",N.participant)}),I("participant_removed",N=>{x(N.participantId),D.emit("participantRemoved",N.participantId)}),I("webchat_visibility",N=>D.emit("webchatVisibility",N.visibility)),I("webchat_config",N=>D.emit("webchatConfig",N.config)),I("custom",N=>D.emit("customEvent",N.event))];return()=>{S.forEach(N=>N())}},[F,L]),H)return{clientState:"error",on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:m,participants:[],error:H};if(T==="connecting"||!B||!F||!L)return{clientState:"connecting",on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:async()=>{},user:void 0,isTyping:void 0,isFetchingMessages:m,participants:[]};const _={sendMessage:async I=>{const S=X0(),N={id:S,createdAt:new Date().toISOString(),userId:B.userId,conversationId:F,payload:I,metadata:{clientMessageId:S,delivered:!1}},K=Mi(N);K.status="pending",p(K),await L.createMessage({conversationId:F,payload:I,metadata:{clientMessageId:S}}).catch(V=>D.emit("error",V))},sendEvent:async I=>{await L.createEvent({conversationId:F,payload:{type:"custom",data:I}})},uploadFile:async I=>{const{size:S,name:N}=I,V=await(ne=>new Promise((ae,fe)=>{const oe=new FileReader;oe.onload=pe=>{var ge;return ae((ge=pe.target)==null?void 0:ge.result)},oe.onerror=pe=>{var ge;return fe((ge=pe.target)==null?void 0:ge.error)},oe.readAsArrayBuffer(ne)}))(I),Y=new Date;Y.setDate(Y.getDate()+30);const{file:{uploadUrl:Z,contentType:Q,url:X}}=await L.createFile({size:S,key:N,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:Y.toISOString()});await fetch(Z,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Q},body:V});const J=Q.split("/").shift()??"",q=wp(J)?J:"file";return{fileUrl:X,name:N,type:q}},addMessageFeedback:async(I,S)=>{d(I,{feedback:S.value}),await L.addMessageFeedback({messageId:I,...S})},getUser:async()=>{const{user:I}=await L.getUser();return I},updateUser:async I=>{const{user:S}=await L.updateUser({name:I.name,pictureUrl:I.pictureUrl,userData:I.data});return S}};return{clientState:T,on:D.on,client:_,messages:f,conversationId:F,newConversation:async()=>{try{g(),O(!1);const{conversation:I}=await L.createConversation();j(I.id),c(I.id)}catch(I){A(fi(I))}},user:l,isTyping:U,isFetchingMessages:m,participants:b,error:H}}const BG=({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}=hx({clientId:e,apiUrl:o,conversationId:a,user:i,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminKey:n==null?void 0:n.adminKey}),{sendMessage:b,uploadFile:w,addMessageFeedback:$}=u??{};return C.jsx(Z0,{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:b,uploadFile:w,addMessageFeedback:$,allowFileUpload:r,restartConversation:d,participants:h,error:m,...s})};var Ad=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(WG);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(_d,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(_d,{...r,ref:t,children:n})});Ad.displayName="Slot";var _d=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=HG(n),i=UG(r,n.props);return n.type!==k.Fragment&&(i.ref=t?_c(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});_d.displayName="SlotClone";var zG=({children:e})=>C.jsx(C.Fragment,{children:e});function WG(e){return k.isValidElement(e)&&e.type===zG}function UG(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 HG(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 VG=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=VG.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Ad:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function qG(e,t){e&&Xd.flushSync(()=>e.dispatchEvent(t))}function KG(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e);k.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 GG="DismissableLayer",Dd="dismissableLayer.update",YG="dismissableLayer.pointerDownOutside",XG="dismissableLayer.focusOutside",vx,mx=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gx=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(mx),[u,f]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=k.useState({}),v=On(t,T=>f(T)),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,$=b>=m,x=QG(T=>{const R=T.target,U=[...c.branches].some(O=>O.contains(R));!$||U||(o==null||o(T),a==null||a(T),T.defaultPrevented||s==null||s())},p),E=eY(T=>{const R=T.target;[...c.branches].some(O=>O.contains(R))||(i==null||i(T),a==null||a(T),T.defaultPrevented||s==null||s())},p);return KG(T=>{b===c.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&s&&(T.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(vx=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),yx(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=vx)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),yx())},[u,c]),k.useEffect(()=>{const T=()=>d({});return document.addEventListener(Dd,T),()=>document.removeEventListener(Dd,T)},[]),C.jsx(Ln.div,{...l,ref:v,style:{pointerEvents:w?$?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,x.onPointerDownCapture)})});gx.displayName=GG;var JG="DismissableLayerBranch",ZG=k.forwardRef((e,t)=>{const n=k.useContext(mx),r=k.useRef(null),o=On(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(Ln.div,{...e,ref:o})});ZG.displayName=JG;function QG(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){bx(YG,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 eY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&bx(XG,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 yx(){const e=new CustomEvent(Dd);document.dispatchEvent(e)}function bx(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?qG(o,i):o.dispatchEvent(i)}var Md="focusScope.autoFocusOnMount",Nd="focusScope.autoFocusOnUnmount",wx={bubbles:!1,cancelable:!0},tY="FocusScope",Sx=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=k.useState(null),c=bn(o),u=bn(i),f=k.useRef(null),p=On(t,h=>l(h)),d=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(r){let h=function(w){if(d.paused||!s)return;const $=w.target;s.contains($)?f.current=$:Rn(f.current,{select:!0})},g=function(w){if(d.paused||!s)return;const $=w.relatedTarget;$!==null&&(s.contains($)||Rn(f.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const x of w)x.removedNodes.length>0&&Rn(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]),k.useEffect(()=>{if(s){kx.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Md,wx);s.addEventListener(Md,c),s.dispatchEvent(m),m.defaultPrevented||(nY(sY(xx(s)),{select:!0}),document.activeElement===h&&Rn(s))}return()=>{s.removeEventListener(Md,c),setTimeout(()=>{const m=new CustomEvent(Nd,wx);s.addEventListener(Nd,u),s.dispatchEvent(m),m.defaultPrevented||Rn(h??document.body,{select:!0}),s.removeEventListener(Nd,u),kx.remove(d)},0)}}},[s,c,u,d]);const v=k.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,$]=rY(b);w&&$?!h.shiftKey&&m===$?(h.preventDefault(),n&&Rn(w,{select:!0})):h.shiftKey&&m===w&&(h.preventDefault(),n&&Rn($,{select:!0})):m===b&&h.preventDefault()}},[n,r,d.paused]);return C.jsx(Ln.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Sx.displayName=tY;function nY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Rn(r,{select:t}),document.activeElement!==n)return}function rY(e){const t=xx(e),n=Ex(t,e),r=Ex(t.reverse(),e);return[n,r]}function xx(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 Ex(e,t){for(const n of e)if(!oY(n,{upTo:t}))return n}function oY(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 iY(e){return e instanceof HTMLInputElement&&"select"in e}function Rn(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&iY(e)&&t&&e.select()}}var kx=aY();function aY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Cx(e,t),e.unshift(t)},remove(t){var n;e=Cx(e,t),(n=e[0])==null||n.resume()}}}function Cx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function sY(e){return e.filter(t=>t.tagName!=="A")}var Ld=0;function lY(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$x()),document.body.insertAdjacentElement("beforeend",e[1]??$x()),Ld++,()=>{Ld===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ld--}},[])}function $x(){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 Es="right-scroll-bar-position",ks="width-before-scroll-bar",cY="with-scroll-bars-hidden",uY="--removed-body-scroll-bar-size";function Rd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function fY(e,t){var n=P.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 dY=typeof window<"u"?k.useLayoutEffect:k.useEffect,Tx=new WeakMap;function pY(e,t){var n=fY(null,function(r){return e.forEach(function(o){return Rd(o,r)})});return dY(function(){var r=Tx.get(n);if(r){var o=new Set(r),i=new Set(e),a=n.current;o.forEach(function(s){i.has(s)||Rd(s,null)}),i.forEach(function(s){o.has(s)||Rd(s,a)})}Tx.set(n,e)},[e]),n}function hY(e){return e}function vY(e,t){t===void 0&&(t=hY);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 mY(e){e===void 0&&(e={});var t=vY(null);return t.options=_t({async:!0,ssr:!1},e),t}var Ox=function(e){var t=e.sideCar,n=Sm(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 k.createElement(r,_t({},n))};Ox.isSideCarExport=!0;function gY(e,t){return e.useMedium(t),Ox}var Ix=mY(),Fd=function(){},Cs=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:Fd,onWheelCapture:Fd,onTouchMoveCapture:Fd}),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,$=Sm(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,E=pY([n,t]),T=_t(_t({},$),o);return k.createElement(k.Fragment,null,u&&k.createElement(x,{sideCar:Ix,removeScrollBar:c,shards:f,noRelative:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?k.cloneElement(k.Children.only(s),_t(_t({},T),{ref:E})):k.createElement(b,_t({},T,{className:l,ref:E}),s))});Cs.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Cs.classNames={fullWidth:ks,zeroRight:Es};var yY=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=yY();return t&&e.setAttribute("nonce",t),e}function wY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function SY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var xY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=bY())&&(wY(t,n),SY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},EY=function(){var e=xY();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Px=function(){var e=EY(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},kY={left:0,top:0,right:0,gap:0},jd=function(e){return parseInt(e||"",10)||0},CY=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[jd(n),jd(r),jd(o)]},$Y=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return kY;var t=CY(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])}},TY=Px(),Vr="data-scroll-locked",OY=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
289
|
-
.`.concat(
|
|
293
|
+
`&&r++}}return[t,n]}class vx 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(mx(this),n)}[Symbol.for("Deno.customInspect")](t,n){return t(mx(this),n)}}function UG(e){const t=globalThis.DOMException;return typeof t=="function"?new t(e,"SyntaxError"):new SyntaxError(e)}function Id(e){return e instanceof Error?"errors"in e&&Array.isArray(e.errors)?e.errors.map(Id).join(", "):"cause"in e&&e.cause instanceof Error?`${e}: ${Id(e.cause)}`:e.message:`${e}`}function mx(e){return{type:e.type,message:e.message,code:e.code,defaultPrevented:e.defaultPrevented,cancelable:e.cancelable,timeStamp:e.timeStamp}}var gx=e=>{throw TypeError(e)},Pd=(e,t,n)=>t.has(e)||gx("Cannot "+n),ge=(e,t,n)=>(Pd(e,t,"read from private field"),n?n.call(e):t.get(e)),Ze=(e,t,n)=>t.has(e)?gx("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Re=(e,t,n,r)=>(Pd(e,t,"write to private field"),t.set(e,n),n),yn=(e,t,n)=>(Pd(e,t,"access private method"),n),xt,nr,jr,xs,Es,si,zr,li,Rn,Ur,Wr,Hr,ci,qt,Dd,_d,Md,yx,Nd,Rd,ui,Ld,Fd;class Cs extends EventTarget{constructor(t,n){var r,o;super(),Ze(this,qt),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,Ze(this,xt),Ze(this,nr),Ze(this,jr),Ze(this,xs),Ze(this,Es),Ze(this,si),Ze(this,zr),Ze(this,li,null),Ze(this,Rn),Ze(this,Ur),Ze(this,Wr,null),Ze(this,Hr,null),Ze(this,ci,null),Ze(this,_d,async i=>{var a;ge(this,Ur).reset();const{body:s,redirected:l,status:c,headers:u}=i;if(c===204){yn(this,qt,ui).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,ui).call(this,`Non-200 status code (${c})`,c);return}if(!(u.get("content-type")||"").startsWith("text/event-stream")){yn(this,qt,ui).call(this,'Invalid content type, expected "text/event-stream"',c);return}if(ge(this,xt)===this.CLOSED)return;Re(this,xt,this.OPEN);const f=new Event("open");if((a=ge(this,ci))==null||a.call(this,f),this.dispatchEvent(f),typeof s!="object"||!s||!("getReader"in s)){yn(this,qt,ui).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&&ge(this,Ur).feed(p.decode(g,{stream:!h})),h&&(v=!1,ge(this,Ur).reset(),yn(this,qt,Ld).call(this))}while(v)}),Ze(this,Md,i=>{Re(this,Rn,void 0),!(i.name==="AbortError"||i.type==="aborted")&&yn(this,qt,Ld).call(this,Id(i))}),Ze(this,Nd,i=>{typeof i.id=="string"&&Re(this,li,i.id);const a=new MessageEvent(i.event||"message",{data:i.data,origin:ge(this,jr)?ge(this,jr).origin:ge(this,nr).origin,lastEventId:i.id||""});ge(this,Hr)&&(!i.event||i.event==="message")&&ge(this,Hr).call(this,a),this.dispatchEvent(a)}),Ze(this,Rd,i=>{Re(this,si,i)}),Ze(this,Fd,()=>{Re(this,zr,void 0),ge(this,xt)===this.CONNECTING&&yn(this,qt,Dd).call(this)});try{if(t instanceof URL)Re(this,nr,t);else if(typeof t=="string")Re(this,nr,new URL(t,WG()));else throw new Error("Invalid URL")}catch{throw UG("An invalid or illegal string was specified")}Re(this,Ur,jG({onEvent:ge(this,Nd),onRetry:ge(this,Rd)})),Re(this,xt,this.CONNECTING),Re(this,si,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,Dd).call(this)}get readyState(){return ge(this,xt)}get url(){return ge(this,nr).href}get withCredentials(){return ge(this,xs)}get onerror(){return ge(this,Wr)}set onerror(t){Re(this,Wr,t)}get onmessage(){return ge(this,Hr)}set onmessage(t){Re(this,Hr,t)}get onopen(){return ge(this,ci)}set onopen(t){Re(this,ci,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(){ge(this,zr)&&clearTimeout(ge(this,zr)),ge(this,xt)!==this.CLOSED&&(ge(this,Rn)&&ge(this,Rn).abort(),Re(this,xt,this.CLOSED),Re(this,Rn,void 0))}}xt=new WeakMap,nr=new WeakMap,jr=new WeakMap,xs=new WeakMap,Es=new WeakMap,si=new WeakMap,zr=new WeakMap,li=new WeakMap,Rn=new WeakMap,Ur=new WeakMap,Wr=new WeakMap,Hr=new WeakMap,ci=new WeakMap,qt=new WeakSet,Dd=function(){Re(this,xt,this.CONNECTING),Re(this,Rn,new AbortController),ge(this,Es)(ge(this,nr),yn(this,qt,yx).call(this)).then(ge(this,_d)).catch(ge(this,Md))},_d=new WeakMap,Md=new WeakMap,yx=function(){var e;const t={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...ge(this,li)?{"Last-Event-ID":ge(this,li)}:void 0},cache:"no-store",signal:(e=ge(this,Rn))==null?void 0:e.signal};return"window"in globalThis&&(t.credentials=this.withCredentials?"include":"same-origin"),t},Nd=new WeakMap,Rd=new WeakMap,ui=function(e,t){var n;ge(this,xt)!==this.CLOSED&&Re(this,xt,this.CLOSED);const r=new vx("error",{code:t,message:e});(n=ge(this,Wr))==null||n.call(this,r),this.dispatchEvent(r)},Ld=function(e,t){var n;if(ge(this,xt)===this.CLOSED)return;Re(this,xt,this.CONNECTING);const r=new vx("error",{code:t,message:e});(n=ge(this,Wr))==null||n.call(this,r),this.dispatchEvent(r),Re(this,zr,setTimeout(ge(this,Fd),ge(this,si)))},Fd=new WeakMap,Cs.CONNECTING=0,Cs.OPEN=1,Cs.CLOSED=2;function WG(){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 bx(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 HG=()=>{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}))}}},Le=e=>e.data,wx={throwOnError:!0},KG=async({clientId:e,apiUrl:t,adminKey:n})=>{const r=`${t||Oe.getConfig().baseUrl}/${e}`;Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(bx);const o={...wx,baseUrl:r};return px({...o,body:{},headers:n?{"x-admin-key":n}:void 0}).then(Le)},VG=({userKey:e,clientId:t,apiUrl:n})=>{const r={"x-user-key":e},o=`${n||Oe.getConfig().baseUrl}/${t}`,i={...wx,baseUrl:o};return Oe.interceptors.response._fns.length===0&&Oe.interceptors.response.use(bx),{createConversation:()=>SG({...i,headers:r,body:{}}).then(Le),getConversation:({conversationId:a})=>bG({...i,headers:r,path:{id:a}}).then(Le),deleteConversation:({conversationId:a})=>yG({...i,headers:r,path:{id:a}}).then(Le),listConversations:({nextToken:a})=>wG({...i,headers:r,query:{nextToken:a}}).then(Le),listConversationMessages:({conversationId:a,nextToken:s})=>xG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),addParticipant:({conversationId:a,userId:s})=>CG({...i,headers:r,path:{id:a},body:{userId:s}}).then(Le),removeParticipant:({conversationId:a,userId:s})=>kG({...i,headers:r,path:{id:a,userId:s}}).then(Le),getParticipant:({conversationId:a,userId:s})=>AG({...i,headers:r,path:{id:a,userId:s}}).then(Le),listParticipants:({conversationId:a,nextToken:s})=>EG({...i,headers:r,path:{id:a},query:{nextToken:s}}).then(Le),createMessage:a=>IG({...i,headers:r,body:a}).then(Le),updateMessage:({messageId:a,...s})=>OG({...i,headers:r,path:{id:a},body:s}).then(Le),getMessage:({messageId:a})=>TG({...i,headers:r,path:{id:a}}).then(Le),deleteMessage:({messageId:a})=>$G({...i,headers:r,path:{id:a}}).then(Le),createFile:a=>BG({...i,headers:r,body:a}).then(Le),createUser:a=>px({...i,headers:r,body:a}).then(Le),getUser:()=>MG({...i,headers:r}).then(Le),updateUser:a=>NG({...i,headers:r,body:a}).then(Le),deleteUser:()=>_G({...i,headers:r}).then(Le),createEvent:a=>FG({...i,headers:r,body:a}).then(Le),getEvent:({eventId:a})=>LG({...i,headers:r,path:{id:a}}).then(Le),addMessageFeedback:({messageId:a,...s})=>DG({...i,headers:r,path:{id:a},body:s}).then(Le),removeMessageFeedback:({messageId:a})=>PG({...i,headers:r,path:{id:a}}).then(Le),generateUserKey:({adminKey:a,...s})=>RG({...i,headers:{"x-admin-key":a},body:s}).then(Le),listenConversation:({conversationId:a})=>{let s=0,l=null;const c=HG(),u=()=>{l&&l.close();const f=`${o}/conversations/${a}/listen`;l=new Cs(f,{fetch:(p,d)=>fetch(p,{...d,headers:{...d==null?void 0:d.headers,...r,timeout:"60_000"}})}),l.onopen=()=>c.emit("open"),l.onerror=p=>{s<10?(s++,setTimeout(()=>u(),3e3)):c.emit("error",p)},l.onmessage=p=>{const d=qG(p.data);c.emit(d.type,d.data)}};return u(),c.on}}},qG=e=>{try{return JSON.parse(e)}catch{return e}},Sx={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 xx({apiUrl:e="https://webchat.botpress.cloud",clientId:t,storageKey:n,storageLocation:r,adminKey:o,soundEnabled:i,...a}){const s=xm(n,r),l=s(_=>_.conversationId),c=s(_=>_.user),u=s(_=>_.setConversationId),f=s(_=>_.setUser),p=Hn(_=>_.messages),d=Hn(_=>_.saveMessage),v=Hn(_=>_.updateMessage),h=Hn(_=>_.fetchMessages),g=Hn(_=>_.setMessages),m=Hn(_=>_.clearMessages),b=Hn(_=>_.isFetching),w=po(_=>_.participants),A=po(_=>_.setParticipants),x=po(_=>_.addParticipant),E=po(_=>_.removeParticipant),$=po(_=>_.clearParticipants),R=Cm(`webchat-soundEnabled-${t}`),K=R(_=>_.soundOn),T=R(_=>_.toggleSound),M=O.useRef(K);O.useEffect(()=>{M.current=K},[K]);const U=O.useRef(i??!0);O.useEffect(()=>{U.current=i??!0},[i]);const{isTyping:B,setIsTyping:F}=Zq(),D=O.useMemo(()=>gp(),[]),[L,q]=O.useState("connecting"),[W,I]=O.useState(a.conversationId),[y,P]=O.useState(a.user),[N,S]=O.useState(void 0),[V,Y]=O.useState(void 0),G=O.useRef(!1),Q=O.useRef(null),X=async()=>{if(!G.current){G.current=!0;try{const _=a.user||c;let j=_;if(!j){const{key:ie,user:de}=await KG({clientId:t,apiUrl:e,adminKey:o});j={userId:de.id,userToken:ie}}const J=VG({userKey:j.userToken,clientId:t,apiUrl:e});let re=a.conversationId||l;const ue=!!re;if(!re||!_){const{conversation:ie}=await J.createConversation();re=ie.id}if(ue){const ie=await h({client:J,conversationId:re});g(ie);const{participants:de}=await J.listParticipants({conversationId:re});A(de)}else m(),$();P(j),f(j),S(J),I(re),u(re),Q.current=new Audio,Q.current.preload="auto",Q.current.src=Sx.chatMessageNotification,Q.current.volume=.9,q("connected")}catch(_){m(),Y(pi(_)),q("error")}finally{G.current=!1}}};Om(async()=>{const _=GG(t,e);if(_){Y(_),q("error");return}await X()},[a.user,a.conversationId]);const ee=async()=>{m(),$(),F(!1),Y(void 0),q("connecting"),await X()};if(O.useEffect(()=>{if(!N||!W)return;const _=N.listenConversation({conversationId:W}),j=[_("open",async()=>{var re,ue;Y(void 0);const{event:J}=await N.createEvent({conversationId:W,payload:{type:"conversation_started",data:{}}});(ue=(re=J.payload.data)==null?void 0:re.status)!=null&&ue.isInitial&&D.emit("conversation",W),q("connected")}),_("error",J=>{Y(re=>re||pi(J)),q("error"),D.emit("error",new Error(`Connection to conversation lost: ${J.message}`))}),_("message_created",J=>{const re=Ri(J);(y==null?void 0:y.userId)!==re.authorId&&(U.current&&M.current&&Q.current&&Q.current.play().catch(()=>{}),F(!1),D.emit("isTyping",{isTyping:!1,timeout:0})),d(re),D.emit("message",re)}),_("message_status_changed",J=>{J.newStatus==="processing"&&(F(!0),D.emit("isTyping",{isTyping:!0,timeout:5e3}),v(J.message.metadata.clientMessageId,{status:J.newStatus}))}),_("participant_added",J=>{x(J.participant),D.emit("participantAdded",J.participant)}),_("participant_removed",J=>{E(J.participantId),D.emit("participantRemoved",J.participantId)}),_("webchat_visibility",J=>D.emit("webchatVisibility",J.visibility)),_("webchat_config",J=>D.emit("webchatConfig",J.config)),_("custom",J=>D.emit("customEvent",J.event))];return()=>{j.forEach(J=>J())}},[W,N]),L!=="connected"||!y||!W||!N)return{clientState:L,on:D.on,client:void 0,messages:[],conversationId:void 0,newConversation:ee,user:void 0,isTyping:void 0,isFetchingMessages:b,participants:[],toggleSound:T,soundOn:K};const Z={sendMessage:async _=>{const j=rx(),J={id:j,createdAt:new Date().toISOString(),userId:y.userId,conversationId:W,payload:_,metadata:{clientMessageId:j,delivered:!1}},re=Ri(J);re.status="pending",d(re),await N.createMessage({conversationId:W,payload:_,metadata:{clientMessageId:j}}).catch(ue=>D.emit("error",ue))},sendEvent:async _=>{await N.createEvent({conversationId:W,payload:{type:"custom",data:_}})},uploadFile:async _=>{const{size:j,name:J}=_,ue=await(Et=>new Promise((pt,oe)=>{const le=new FileReader;le.onload=H=>{var z;return pt((z=H.target)==null?void 0:z.result)},le.onerror=H=>{var z;return oe((z=H.target)==null?void 0:z.error)},le.readAsArrayBuffer(Et)}))(_),ie=new Date;ie.setDate(ie.getDate()+30);const{file:{uploadUrl:de,contentType:Se,url:De}}=await N.createFile({size:j,key:J,accessPolicies:["public_content"],index:!1,tags:{source:"integration",integrationName:"webchat"},expiresAt:ie.toISOString()});await fetch(de,{method:"PUT",headers:{"x-amz-tagging":"public=true","content-type":Se},body:ue});const Ue=Se.split("/").shift()??"",dt=Tp(Ue)?Ue:"file";return{fileUrl:De,name:J,type:dt}},addMessageFeedback:async(_,j)=>{v(_,{feedback:j.value}),await N.addMessageFeedback({messageId:_,...j})},getUser:async()=>{const{user:_}=await N.getUser();return _},updateUser:async _=>{const{user:j}=await N.updateUser({name:_.name,pictureUrl:_.pictureUrl,userData:_.data});return j}};return{clientState:"connected",on:D.on,client:Z,messages:p,conversationId:W,newConversation:async()=>{try{m(),$(),F(!1);const{conversation:_}=await N.createConversation();I(_.id),u(_.id)}catch(_){Y(pi(_))}},user:c,isTyping:B,isFetchingMessages:b,participants:w,error:V,soundOn:K,toggleSound:T}}const GG=(e,t)=>{if(!e)return{type:"configuration",message:Op};if(!t||!t.startsWith("https://")||!t.startsWith("https://"))return{type:"configuration",message:Ip}},YG=({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}=xx({clientId:e,apiUrl:o,conversationId:a,user:i,storageKey:l,storageLocation:n==null?void 0:n.storageLocation,adminKey:n==null?void 0:n.adminKey,soundEnabled:n==null?void 0:n.soundEnabled}),{sendMessage:A,uploadFile:x,addMessageFeedback:E}=u??{};return C.jsx(ix,{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:E,allowFileUpload:r,restartConversation:d,...s,participants:h,error:m,clientId:e,soundOn:b,toggleSound:w})};var Bd=k.forwardRef((e,t)=>{const{children:n,...r}=e,o=k.Children.toArray(n),i=o.find(JG);if(i){const a=i.props.children,s=o.map(l=>l===i?k.Children.count(a)>1?k.Children.only(null):k.isValidElement(a)?a.props.children:null:l);return C.jsx(jd,{...r,ref:t,children:k.isValidElement(a)?k.cloneElement(a,void 0,s):null})}return C.jsx(jd,{...r,ref:t,children:n})});Bd.displayName="Slot";var jd=k.forwardRef((e,t)=>{const{children:n,...r}=e;if(k.isValidElement(n)){const o=XG(n),i=ZG(r,n.props);return n.type!==k.Fragment&&(i.ref=t?jc(t,o):o),k.cloneElement(n,i)}return k.Children.count(n)>1?k.Children.only(null):null});jd.displayName="SlotClone";var QG=({children:e})=>C.jsx(C.Fragment,{children:e});function JG(e){return k.isValidElement(e)&&e.type===QG}function ZG(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 XG(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 eY=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ln=eY.reduce((e,t)=>{const n=k.forwardRef((r,o)=>{const{asChild:i,...a}=r,s=i?Bd:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),C.jsx(s,{...a,ref:o})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function tY(e,t){e&&rp.flushSync(()=>e.dispatchEvent(t))}function nY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e);k.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 rY="DismissableLayer",zd="dismissableLayer.update",oY="dismissableLayer.pointerDownOutside",iY="dismissableLayer.focusOutside",Ex,Cx=k.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kx=k.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...l}=e,c=k.useContext(Cx),[u,f]=k.useState(null),p=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,d]=k.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=lY($=>{const R=$.target,K=[...c.branches].some(T=>T.contains(R));!A||K||(o==null||o($),a==null||a($),$.defaultPrevented||s==null||s())},p),E=cY($=>{const R=$.target;[...c.branches].some(T=>T.contains(R))||(i==null||i($),a==null||a($),$.defaultPrevented||s==null||s())},p);return nY($=>{b===c.layers.size-1&&(r==null||r($),!$.defaultPrevented&&s&&($.preventDefault(),s()))},p),k.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Ex=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Ax(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ex)}},[u,p,n,c]),k.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Ax())},[u,c]),k.useEffect(()=>{const $=()=>d({});return document.addEventListener(zd,$),()=>document.removeEventListener(zd,$)},[]),C.jsx(Ln.div,{...l,ref:v,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:pn(e.onFocusCapture,E.onFocusCapture),onBlurCapture:pn(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:pn(e.onPointerDownCapture,x.onPointerDownCapture)})});kx.displayName=rY;var aY="DismissableLayerBranch",sY=k.forwardRef((e,t)=>{const n=k.useContext(Cx),r=k.useRef(null),o=On(t,r);return k.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),C.jsx(Ln.div,{...e,ref:o})});sY.displayName=aY;function lY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=k.useRef(!1),o=k.useRef(()=>{});return k.useEffect(()=>{const i=s=>{if(s.target&&!r.current){let l=function(){$x(oY,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 cY(e,t=globalThis==null?void 0:globalThis.document){const n=bn(e),r=k.useRef(!1);return k.useEffect(()=>{const o=i=>{i.target&&!r.current&&$x(iY,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 Ax(){const e=new CustomEvent(zd);document.dispatchEvent(e)}function $x(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?tY(o,i):o.dispatchEvent(i)}var Ud="focusScope.autoFocusOnMount",Wd="focusScope.autoFocusOnUnmount",Tx={bubbles:!1,cancelable:!0},uY="FocusScope",Ox=k.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,l]=k.useState(null),c=bn(o),u=bn(i),f=k.useRef(null),p=On(t,h=>l(h)),d=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.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]),k.useEffect(()=>{if(s){Dx.add(d);const h=document.activeElement;if(!s.contains(h)){const m=new CustomEvent(Ud,Tx);s.addEventListener(Ud,c),s.dispatchEvent(m),m.defaultPrevented||(fY(mY(Ix(s)),{select:!0}),document.activeElement===h&&Fn(s))}return()=>{s.removeEventListener(Ud,c),setTimeout(()=>{const m=new CustomEvent(Wd,Tx);s.addEventListener(Wd,u),s.dispatchEvent(m),m.defaultPrevented||Fn(h??document.body,{select:!0}),s.removeEventListener(Wd,u),Dx.remove(d)},0)}}},[s,c,u,d]);const v=k.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]=dY(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 C.jsx(Ln.div,{tabIndex:-1,...a,ref:p,onKeyDown:v})});Ox.displayName=uY;function fY(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Fn(r,{select:t}),document.activeElement!==n)return}function dY(e){const t=Ix(e),n=Px(t,e),r=Px(t.reverse(),e);return[n,r]}function Ix(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 Px(e,t){for(const n of e)if(!pY(n,{upTo:t}))return n}function pY(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 hY(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&&hY(e)&&t&&e.select()}}var Dx=vY();function vY(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=_x(e,t),e.unshift(t)},remove(t){var n;e=_x(e,t),(n=e[0])==null||n.resume()}}}function _x(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mY(e){return e.filter(t=>t.tagName!=="A")}var Hd=0;function gY(){k.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mx()),document.body.insertAdjacentElement("beforeend",e[1]??Mx()),Hd++,()=>{Hd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hd--}},[])}function Mx(){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 ks="right-scroll-bar-position",As="width-before-scroll-bar",yY="with-scroll-bars-hidden",bY="--removed-body-scroll-bar-size";function Kd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wY(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 SY=typeof window<"u"?k.useLayoutEffect:k.useEffect,Nx=new WeakMap;function xY(e,t){var n=wY(null,function(r){return e.forEach(function(o){return Kd(o,r)})});return SY(function(){var r=Nx.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)})}Nx.set(n,e)},[e]),n}function EY(e){return e}function CY(e,t){t===void 0&&(t=EY);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 kY(e){e===void 0&&(e={});var t=CY(null);return t.options=_t({async:!0,ssr:!1},e),t}var Rx=function(e){var t=e.sideCar,n=$m(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 k.createElement(r,_t({},n))};Rx.isSideCarExport=!0;function AY(e,t){return e.useMedium(t),Rx}var Lx=kY(),Vd=function(){},$s=k.forwardRef(function(e,t){var n=k.useRef(null),r=k.useState({onScrollCapture:Vd,onWheelCapture:Vd,onTouchMoveCapture:Vd}),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=$m(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),x=p,E=xY([n,t]),$=_t(_t({},A),o);return k.createElement(k.Fragment,null,u&&k.createElement(x,{sideCar:Lx,removeScrollBar:c,shards:f,noRelative:d,noIsolation:v,inert:h,setCallbacks:i,allowPinchZoom:!!g,lockRef:n,gapMode:w}),a?k.cloneElement(k.Children.only(s),_t(_t({},$),{ref:E})):k.createElement(b,_t({},$,{className:l,ref:E}),s))});$s.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},$s.classNames={fullWidth:As,zeroRight:ks};var $Y=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function TY(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=$Y();return t&&e.setAttribute("nonce",t),e}function OY(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function IY(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var PY=function(){var e=0,t=null;return{add:function(n){e==0&&(t=TY())&&(OY(t,n),IY(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},DY=function(){var e=PY();return function(t,n){k.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Fx=function(){var e=DY(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},_Y={left:0,top:0,right:0,gap:0},qd=function(e){return parseInt(e||"",10)||0},MY=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[qd(n),qd(r),qd(o)]},NY=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return _Y;var t=MY(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])}},RY=Fx(),Kr="data-scroll-locked",LY=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(yY,` {
|
|
290
295
|
overflow: hidden `).concat(r,`;
|
|
291
296
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
292
297
|
}
|
|
293
|
-
body[`).concat(
|
|
298
|
+
body[`).concat(Kr,`] {
|
|
294
299
|
overflow: hidden `).concat(r,`;
|
|
295
300
|
overscroll-behavior: contain;
|
|
296
301
|
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
@@ -303,30 +308,30 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
303
308
|
`),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
304
309
|
}
|
|
305
310
|
|
|
306
|
-
.`).concat(
|
|
311
|
+
.`).concat(ks,` {
|
|
307
312
|
right: `).concat(s,"px ").concat(r,`;
|
|
308
313
|
}
|
|
309
314
|
|
|
310
|
-
.`).concat(
|
|
315
|
+
.`).concat(As,` {
|
|
311
316
|
margin-right: `).concat(s,"px ").concat(r,`;
|
|
312
317
|
}
|
|
313
318
|
|
|
314
|
-
.`).concat(
|
|
319
|
+
.`).concat(ks," .").concat(ks,` {
|
|
315
320
|
right: 0 `).concat(r,`;
|
|
316
321
|
}
|
|
317
322
|
|
|
318
|
-
.`).concat(
|
|
323
|
+
.`).concat(As," .").concat(As,` {
|
|
319
324
|
margin-right: 0 `).concat(r,`;
|
|
320
325
|
}
|
|
321
326
|
|
|
322
|
-
body[`).concat(
|
|
323
|
-
`).concat(
|
|
327
|
+
body[`).concat(Kr,`] {
|
|
328
|
+
`).concat(bY,": ").concat(s,`px;
|
|
324
329
|
}
|
|
325
|
-
`)},
|
|
330
|
+
`)},Bx=function(){var e=parseInt(document.body.getAttribute(Kr)||"0",10);return isFinite(e)?e:0},FY=function(){k.useEffect(function(){return document.body.setAttribute(Kr,(Bx()+1).toString()),function(){var e=Bx()-1;e<=0?document.body.removeAttribute(Kr):document.body.setAttribute(Kr,e.toString())}},[])},BY=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;FY();var i=k.useMemo(function(){return NY(o)},[o]);return k.createElement(RY,{styles:LY(i,!t,o,n?"":"!important")})},Gd=!1;if(typeof window<"u")try{var Ts=Object.defineProperty({},"passive",{get:function(){return Gd=!0,!0}});window.addEventListener("test",Ts,Ts),window.removeEventListener("test",Ts,Ts)}catch{Gd=!1}var Vr=Gd?{passive:!1}:!1,jY=function(e){return e.tagName==="TEXTAREA"},jx=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!jY(e)&&n[t]==="visible")},zY=function(e){return jx(e,"overflowY")},UY=function(e){return jx(e,"overflowX")},zx=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ux(e,r);if(o){var i=Wx(e,r),a=i[1],s=i[2];if(a>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},WY=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},HY=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ux=function(e,t){return e==="v"?zY(t):UY(t)},Wx=function(e,t){return e==="v"?WY(t):HY(t)},KY=function(e,t){return e==="h"&&t==="rtl"?-1:1},VY=function(e,t,n,r,o){var i=KY(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,l=t.contains(s),c=!1,u=a>0,f=0,p=0;do{if(!s)break;var d=Wx(e,s),v=d[0],h=d[1],g=d[2],m=h-g-i*v;(v||m)&&Ux(e,s)&&(f+=m,p+=v);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(u&&(Math.abs(f)<1||!o)||!u&&(Math.abs(p)<1||!o))&&(c=!0),c},Os=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hx=function(e){return[e.deltaX,e.deltaY]},Kx=function(e){return e&&"current"in e?e.current:e},qY=function(e,t){return e[0]===t[0]&&e[1]===t[1]},GY=function(e){return`
|
|
326
331
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
327
332
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
328
|
-
`)},
|
|
333
|
+
`)},YY=0,qr=[];function QY(e){var t=k.useRef([]),n=k.useRef([0,0]),r=k.useRef(),o=k.useState(YY++)[0],i=k.useState(Fx)[0],a=k.useRef(e);k.useEffect(function(){a.current=e},[e]),k.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var h=Gl([e.lockRef.current],(e.shards||[]).map(Kx),!0).filter(Boolean);return h.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),h.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=k.useCallback(function(h,g){if("touches"in h&&h.touches.length===2||h.type==="wheel"&&h.ctrlKey)return!a.current.allowPinchZoom;var m=Os(h),b=n.current,w="deltaX"in h?h.deltaX:b[0]-m[0],A="deltaY"in h?h.deltaY:b[1]-m[1],x,E=h.target,$=Math.abs(w)>Math.abs(A)?"h":"v";if("touches"in h&&$==="h"&&E.type==="range")return!1;var R=zx($,E);if(!R)return!0;if(R?x=$:(x=$==="v"?"h":"v",R=zx($,E)),!R)return!1;if(!r.current&&"changedTouches"in h&&(w||A)&&(r.current=x),!x)return!0;var K=r.current||x;return VY(K,g,h,K==="h"?w:A,!0)},[]),l=k.useCallback(function(h){var g=h;if(!(!qr.length||qr[qr.length-1]!==i)){var m="deltaY"in g?Hx(g):Os(g),b=t.current.filter(function(x){return x.name===g.type&&(x.target===g.target||g.target===x.shadowParent)&&qY(x.delta,m)})[0];if(b&&b.should){g.cancelable&&g.preventDefault();return}if(!b){var w=(a.current.shards||[]).map(Kx).filter(Boolean).filter(function(x){return x.contains(g.target)}),A=w.length>0?s(g,w[0]):!a.current.noIsolation;A&&g.cancelable&&g.preventDefault()}}},[]),c=k.useCallback(function(h,g,m,b){var w={name:h,delta:g,target:m,should:b,shadowParent:JY(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(A){return A!==w})},1)},[]),u=k.useCallback(function(h){n.current=Os(h),r.current=void 0},[]),f=k.useCallback(function(h){c(h.type,Hx(h),h.target,s(h,e.lockRef.current))},[]),p=k.useCallback(function(h){c(h.type,Os(h),h.target,s(h,e.lockRef.current))},[]);k.useEffect(function(){return qr.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Vr),document.addEventListener("touchmove",l,Vr),document.addEventListener("touchstart",u,Vr),function(){qr=qr.filter(function(h){return h!==i}),document.removeEventListener("wheel",l,Vr),document.removeEventListener("touchmove",l,Vr),document.removeEventListener("touchstart",u,Vr)}},[]);var d=e.removeScrollBar,v=e.inert;return k.createElement(k.Fragment,null,v?k.createElement(i,{styles:GY(o)}):null,d?k.createElement(BY,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function JY(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ZY=AY(Lx,QY);var Vx=k.forwardRef(function(e,t){return k.createElement($s,_t({},e,{ref:t,sideCar:ZY}))});Vx.classNames=$s.classNames;var XY=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Gr=new WeakMap,Is=new WeakMap,Ps={},Yd=0,qx=function(e){return e&&(e.host||qx(e.parentNode))},eQ=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=qx(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})},tQ=function(e,t,n,r){var o=eQ(t,Array.isArray(e)?e:[e]);Ps[n]||(Ps[n]=new WeakMap);var i=Ps[n],a=[],s=new Set,l=new Set(o),c=function(f){!f||s.has(f)||(s.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(p){if(s.has(p))u(p);else try{var d=p.getAttribute(r),v=d!==null&&d!=="false",h=(Gr.get(p)||0)+1,g=(i.get(p)||0)+1;Gr.set(p,h),i.set(p,g),a.push(p),h===1&&v&&Is.set(p,!0),g===1&&p.setAttribute(n,"true"),v||p.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",p,m)}})};return u(t),s.clear(),Yd++,function(){a.forEach(function(f){var p=Gr.get(f)-1,d=i.get(f)-1;Gr.set(f,p),i.set(f,d),p||(Is.has(f)||f.removeAttribute(r),Is.delete(f)),d||f.removeAttribute(n)}),Yd--,Yd||(Gr=new WeakMap,Gr=new WeakMap,Is=new WeakMap,Ps={})}},nQ=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=XY(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),tQ(r,o,n,"aria-hidden")):function(){return null}},Qd="Dialog",[Gx,SJ]=_y(Qd),[rQ,cn]=Gx(Qd),Yx=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=k.useRef(null),l=k.useRef(null),[c=!1,u]=My({prop:r,defaultProp:o,onChange:i});return C.jsx(rQ,{scope:t,triggerRef:s,contentRef:l,contentId:ga(),titleId:ga(),descriptionId:ga(),open:c,onOpenChange:u,onOpenToggle:k.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};Yx.displayName=Qd;var Qx="DialogTrigger",Jx=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Qx,n),i=On(t,o.triggerRef);return C.jsx(Ln.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Zd(o.open),...r,ref:i,onClick:pn(e.onClick,o.onOpenToggle)})});Jx.displayName=Qx;var oQ="DialogPortal",[xJ,Zx]=Gx(oQ,{forceMount:void 0}),Ds="DialogOverlay",Xx=k.forwardRef((e,t)=>{const n=Zx(Ds,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(Ds,e.__scopeDialog);return i.modal?C.jsx(va,{present:r||i.open,children:C.jsx(iQ,{...o,ref:t})}):null});Xx.displayName=Ds;var iQ=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Ds,n);return C.jsx(Vx,{as:Bd,allowPinchZoom:!0,shards:[o.contentRef],children:C.jsx(Ln.div,{"data-state":Zd(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rr="DialogContent",eE=k.forwardRef((e,t)=>{const n=Zx(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=cn(rr,e.__scopeDialog);return C.jsx(va,{present:r||i.open,children:i.modal?C.jsx(aQ,{...o,ref:t}):C.jsx(sQ,{...o,ref:t})})});eE.displayName=rr;var aQ=k.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=k.useRef(null),o=On(t,n.contentRef,r);return k.useEffect(()=>{const i=r.current;if(i)return nQ(i)},[]),C.jsx(tE,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:pn(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:pn(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,s=a.button===0&&a.ctrlKey===!0;(a.button===2||s)&&i.preventDefault()}),onFocusOutside:pn(e.onFocusOutside,i=>i.preventDefault())})}),sQ=k.forwardRef((e,t)=>{const n=cn(rr,e.__scopeDialog),r=k.useRef(!1),o=k.useRef(!1);return C.jsx(tE,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var a,s;(a=e.onCloseAutoFocus)==null||a.call(e,i),i.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),i.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:i=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const a=i.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&o.current&&i.preventDefault()}})}),tE=k.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=cn(rr,n),l=k.useRef(null),c=On(t,l);return gY(),C.jsxs(C.Fragment,{children:[C.jsx(Ox,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:C.jsx(kx,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Zd(s.open),...a,ref:c,onDismiss:()=>s.onOpenChange(!1)})}),C.jsxs(C.Fragment,{children:[C.jsx(lQ,{titleId:s.titleId}),C.jsx(uQ,{contentRef:l,descriptionId:s.descriptionId})]})]})}),Jd="DialogTitle",nE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(Jd,n);return C.jsx(Ln.h2,{id:o.titleId,...r,ref:t})});nE.displayName=Jd;var rE="DialogDescription",oE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(rE,n);return C.jsx(Ln.p,{id:o.descriptionId,...r,ref:t})});oE.displayName=rE;var iE="DialogClose",aE=k.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=cn(iE,n);return C.jsx(Ln.button,{type:"button",...r,ref:t,onClick:pn(e.onClick,()=>o.onOpenChange(!1))})});aE.displayName=iE;function Zd(e){return e?"open":"closed"}var sE="DialogTitleWarning",[EJ,lE]=NN(sE,{contentName:rr,titleName:Jd,docsSlug:"dialog"}),lQ=({titleId:e})=>{const t=lE(sE),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
329
334
|
|
|
330
335
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
331
336
|
|
|
332
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},
|
|
337
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return k.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cQ="DialogDescriptionWarning",uQ=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${lE(cQ).contentName}}.`;return k.useEffect(()=>{var i;const o=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},fQ=Yx,dQ=Jx,pQ=Xx,hQ=eE,vQ=nE,mQ=oE,gQ=aE;function Yr({open:e,onOpenChange:t,children:n}){const{modal:r}=ve;return C.jsxs(fQ,{open:e,onOpenChange:t,children:[C.jsx(pQ,{...r==null?void 0:r.overlay}),n]})}function yQ({children:e,title:t,description:n,confirmButton:r,onConfirm:o,cancelButton:i,hideModal:a}){const{modal:s}=ve;return C.jsx(C.Fragment,{children:C.jsxs(hQ,{...s.dialog.container,children:[C.jsx(vQ,{...s.dialog.title,children:t}),C.jsx(mQ,{...s.dialog.description,children:n}),C.jsx("div",{...s.dialog.content.container,children:e}),C.jsxs("div",{...s.dialog.button.container,children:[C.jsx("button",{...s.dialog.button.confirm,type:"button",onClick:o,children:r}),C.jsx("button",{...s.dialog.button.cancel,type:"button",onClick:a,children:i})]})]})})}Yr.Button=dQ,Yr.Close=gQ,Yr.Content=yQ,se.Avatar=hi,se.BOT_IS_BLOCKED=_p,se.Block=Vn,se.CONFIG_ACCESS_DENIED=sC,se.Chat=ix,se.Composer=Jg,se.Container=Bc,se.ErrorState=ox,se.Fab=Dy,se.Header=Uy,se.INVALID_API_URL=Ip,se.INVALID_BOTPRESS_URL=Dp,se.INVALID_CLIENT_ID=Pp,se.INVALID_CONFIGURATION=aC,se.INVALID_CONFIG_URL=iC,se.INVALID_MESSAGE_CONTENT_TYPE=Fp,se.MISSING_API_URL=nC,se.MISSING_BOT_ID=rC,se.MISSING_CLIENT_ID=Op,se.MISSING_CONFIG_URL=oC,se.Message=Yc,se.MessageContext=Kl,se.MessageList=$d,se.Modal=Yr,se.ModalContext=Vl,se.ModalProvider=Iy,se.NETWORK_ERROR=Rp,se.NOT_A_PARTICIPANT=Np,se.QUOTA_EXCEEDED=Mp,se.RestartConversationButton=qc,se.SOUND_EFFECTS=Sx,se.SSE_DISCONNECTED_ERROR=Lp,se.StylesheetProvider=Py,se.TypingIndicator=Gc,se.Webchat=YG,se.commonApiErrorMap=Hs,se.enrichMessage=pp,se.fileTypes=$p,se.generateThemeOverride=Ap,se.generateThemeStylesheet=kp,se.getUseChatSoundStore=Cm,se.getUseWebchatClientStore=xm,se.handleIntegrationError=pi,se.integrationMessagePayloadToBlockPayload=pm,se.integrationMessageToBlockMessage=Ri,se.isCommonApiErrorType=jp,se.isEventError=Up,se.isFileType=Tp,se.isIntegrationError=zp,se.isWebhookHandlerErrorType=Bp,se.renderers=Ug,se.useMessageContext=km,se.useModalContext=ql,se.useWebchat=xx,se.useWebchatStore=Li,se.webchatClasses=ve,se.webhookHandlerErrorMap=Ws,Object.defineProperty(se,Symbol.toStringTag,{value:"Module"})});
|