@careshiphealth/widget 2.1.93 → 2.1.94

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.
@@ -151,7 +151,7 @@ Arguments: `+Array.prototype.slice.call(n).join("")+`
151
151
  `+new Error().stack),t=!1}return A.apply(this,arguments)},A)}var QU={};function wU(e,A){XA.deprecationHandler!=null&&XA.deprecationHandler(e,A),QU[e]||(GU(A),QU[e]=!0)}XA.suppressDeprecationWarnings=!1,XA.deprecationHandler=null;function ec(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function oL(e){var A,t;for(t in e)st(e,t)&&(A=e[t],ec(A)?this[t]=A:this["_"+t]=A);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function H0(e,A){var t=hg({},e),n;for(n in A)st(A,n)&&(ed(e[n])&&ed(A[n])?(t[n]={},hg(t[n],e[n]),hg(t[n],A[n])):A[n]!=null?t[n]=A[n]:delete t[n]);for(n in e)st(e,n)&&!st(A,n)&&ed(e[n])&&(t[n]=hg({},t[n]));return t}function E0(e){e!=null&&this.set(e)}var p0;Object.keys?p0=Object.keys:p0=function(e){var A,t=[];for(A in e)st(e,A)&&t.push(A);return t};var gL={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function lL(e,A,t){var n=this._calendar[e]||this._calendar.sameElse;return ec(n)?n.call(A,t):n}function tc(e,A,t){var n=""+Math.abs(e),B=A-n.length,a=e>=0;return(a?t?"+":"":"-")+Math.pow(10,Math.max(0,B)).toString().substr(1)+n}var m0=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,tC=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,y0={},Ru={};function ue(e,A,t,n){var B=n;typeof n=="string"&&(B=function(){return this[n]()}),e&&(Ru[e]=B),A&&(Ru[A[0]]=function(){return tc(B.apply(this,arguments),A[1],A[2])}),t&&(Ru[t]=function(){return this.localeData().ordinal(B.apply(this,arguments),e)})}function dL(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function uL(e){var A=e.match(m0),t,n;for(t=0,n=A.length;t<n;t++)Ru[A[t]]?A[t]=Ru[A[t]]:A[t]=dL(A[t]);return function(B){var a="",s;for(s=0;s<n;s++)a+=ec(A[s])?A[s].call(B,e):A[s];return a}}function nC(e,A){return e.isValid()?(A=fU(A,e.localeData()),y0[A]=y0[A]||uL(A),y0[A](e)):e.localeData().invalidDate()}function fU(e,A){var t=5;function n(B){return A.longDateFormat(B)||B}for(tC.lastIndex=0;t>=0&&tC.test(e);)e=e.replace(tC,n),tC.lastIndex=0,t-=1;return e}var GL={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function QL(e){var A=this._longDateFormat[e],t=this._longDateFormat[e.toUpperCase()];return A||!t?A:(this._longDateFormat[e]=t.match(m0).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var wL="Invalid date";function fL(){return this._invalidDate}var hL="%d",CL=/\d{1,2}/;function bL(e){return this._ordinal.replace("%d",e)}var vL={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function IL(e,A,t,n){var B=this._relativeTime[t];return ec(B)?B(e,A,t,n):B.replace(/%d/i,e)}function HL(e,A){var t=this._relativeTime[e>0?"future":"past"];return ec(t)?t(A):t.replace(/%s/i,A)}var hU={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ir(e){return typeof e=="string"?hU[e]||hU[e.toLowerCase()]:void 0}function Y0(e){var A={},t,n;for(n in e)st(e,n)&&(t=ir(n),t&&(A[t]=e[n]));return A}var EL={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function pL(e){var A=[],t;for(t in e)st(e,t)&&A.push({unit:t,priority:EL[t]});return A.sort(function(n,B){return n.priority-B.priority}),A}var CU=/\d/,vs=/\d\d/,bU=/\d{3}/,Z0=/\d{4}/,BC=/[+-]?\d{6}/,Ot=/\d\d?/,vU=/\d\d\d\d?/,IU=/\d\d\d\d\d\d?/,aC=/\d{1,3}/,k0=/\d{1,4}/,sC=/[+-]?\d{1,6}/,Vu=/\d+/,rC=/[+-]?\d+/,mL=/Z|[+-]\d\d:?\d\d/gi,iC=/Z|[+-]\d\d(?::?\d\d)?/gi,yL=/[+-]?\d+(\.\d{1,3})?/,aw=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Su=/^[1-9]\d?/,U0=/^([1-9]\d|\d)/,cC;cC={};function qA(e,A,t){cC[e]=ec(A)?A:function(n,B){return n&&t?t:A}}function YL(e,A){return st(cC,e)?cC[e](A._strict,A._locale):new RegExp(ZL(e))}function ZL(e){return $c(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(A,t,n,B,a){return t||n||B||a}))}function $c(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function cr(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Oe(e){var A=+e,t=0;return A!==0&&isFinite(A)&&(t=cr(A)),t}var D0={};function yt(e,A){var t,n=A,B;for(typeof e=="string"&&(e=[e]),_c(A)&&(n=function(a,s){s[A]=Oe(a)}),B=e.length,t=0;t<B;t++)D0[e[t]]=n}function sw(e,A){yt(e,function(t,n,B,a){B._w=B._w||{},A(t,B._w,B,a)})}function kL(e,A,t){A!=null&&st(D0,e)&&D0[e](A,t._a,t,e)}function oC(e){return e%4===0&&e%100!==0||e%400===0}var ta=0,Ao=1,nc=2,cB=3,Kr=4,eo=5,td=6,UL=7,DL=8;ue("Y",0,0,function(){var e=this.year();return e<=9999?tc(e,4):"+"+e}),ue(0,["YY",2],0,function(){return this.year()%100}),ue(0,["YYYY",4],0,"year"),ue(0,["YYYYY",5],0,"year"),ue(0,["YYYYYY",6,!0],0,"year"),qA("Y",rC),qA("YY",Ot,vs),qA("YYYY",k0,Z0),qA("YYYYY",sC,BC),qA("YYYYYY",sC,BC),yt(["YYYYY","YYYYYY"],ta),yt("YYYY",function(e,A){A[ta]=e.length===2?XA.parseTwoDigitYear(e):Oe(e)}),yt("YY",function(e,A){A[ta]=XA.parseTwoDigitYear(e)}),yt("Y",function(e,A){A[ta]=parseInt(e,10)});function rw(e){return oC(e)?366:365}XA.parseTwoDigitYear=function(e){return Oe(e)+(Oe(e)>68?1900:2e3)};var HU=Wu("FullYear",!0);function FL(){return oC(this.year())}function Wu(e,A){return function(t){return t!=null?(EU(this,e,t),XA.updateOffset(this,A),this):iw(this,e)}}function iw(e,A){if(!e.isValid())return NaN;var t=e._d,n=e._isUTC;switch(A){case"Milliseconds":return n?t.getUTCMilliseconds():t.getMilliseconds();case"Seconds":return n?t.getUTCSeconds():t.getSeconds();case"Minutes":return n?t.getUTCMinutes():t.getMinutes();case"Hours":return n?t.getUTCHours():t.getHours();case"Date":return n?t.getUTCDate():t.getDate();case"Day":return n?t.getUTCDay():t.getDay();case"Month":return n?t.getUTCMonth():t.getMonth();case"FullYear":return n?t.getUTCFullYear():t.getFullYear();default:return NaN}}function EU(e,A,t){var n,B,a,s,i;if(!(!e.isValid()||isNaN(t))){switch(n=e._d,B=e._isUTC,A){case"Milliseconds":return void(B?n.setUTCMilliseconds(t):n.setMilliseconds(t));case"Seconds":return void(B?n.setUTCSeconds(t):n.setSeconds(t));case"Minutes":return void(B?n.setUTCMinutes(t):n.setMinutes(t));case"Hours":return void(B?n.setUTCHours(t):n.setHours(t));case"Date":return void(B?n.setUTCDate(t):n.setDate(t));case"FullYear":break;default:return}a=t,s=e.month(),i=e.date(),i=i===29&&s===1&&!oC(a)?28:i,B?n.setUTCFullYear(a,s,i):n.setFullYear(a,s,i)}}function PL(e){return e=ir(e),ec(this[e])?this[e]():this}function ML(e,A){if(typeof e=="object"){e=Y0(e);var t=pL(e),n,B=t.length;for(n=0;n<B;n++)this[t[n].unit](e[t[n].unit])}else if(e=ir(e),ec(this[e]))return this[e](A);return this}function xL(e,A){return(e%A+A)%A}var Tn;Array.prototype.indexOf?Tn=Array.prototype.indexOf:Tn=function(e){var A;for(A=0;A<this.length;++A)if(this[A]===e)return A;return-1};function F0(e,A){if(isNaN(e)||isNaN(A))return NaN;var t=xL(A,12);return e+=(A-t)/12,t===1?oC(e)?29:28:31-t%7%2}ue("M",["MM",2],"Mo",function(){return this.month()+1}),ue("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),ue("MMMM",0,0,function(e){return this.localeData().months(this,e)}),qA("M",Ot,Su),qA("MM",Ot,vs),qA("MMM",function(e,A){return A.monthsShortRegex(e)}),qA("MMMM",function(e,A){return A.monthsRegex(e)}),yt(["M","MM"],function(e,A){A[Ao]=Oe(e)-1}),yt(["MMM","MMMM"],function(e,A,t,n){var B=t._locale.monthsParse(e,n,t._strict);B!=null?A[Ao]=B:Ue(t).invalidMonth=e});var TL="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),pU="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),mU=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,RL=aw,VL=aw;function SL(e,A){return e?Or(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||mU).test(A)?"format":"standalone"][e.month()]:Or(this._months)?this._months:this._months.standalone}function WL(e,A){return e?Or(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[mU.test(A)?"format":"standalone"][e.month()]:Or(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function zL(e,A,t){var n,B,a,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=Ac([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").toLocaleLowerCase();return t?A==="MMM"?(B=Tn.call(this._shortMonthsParse,s),B!==-1?B:null):(B=Tn.call(this._longMonthsParse,s),B!==-1?B:null):A==="MMM"?(B=Tn.call(this._shortMonthsParse,s),B!==-1?B:(B=Tn.call(this._longMonthsParse,s),B!==-1?B:null)):(B=Tn.call(this._longMonthsParse,s),B!==-1?B:(B=Tn.call(this._shortMonthsParse,s),B!==-1?B:null))}function NL(e,A,t){var n,B,a;if(this._monthsParseExact)return zL.call(this,e,A,t);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(B=Ac([2e3,n]),t&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(B,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(B,"").replace(".","")+"$","i")),!t&&!this._monthsParse[n]&&(a="^"+this.months(B,"")+"|^"+this.monthsShort(B,""),this._monthsParse[n]=new RegExp(a.replace(".",""),"i")),t&&A==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(t&&A==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!t&&this._monthsParse[n].test(e))return n}}function yU(e,A){if(!e.isValid())return e;if(typeof A=="string"){if(/^\d+$/.test(A))A=Oe(A);else if(A=e.localeData().monthsParse(A),!_c(A))return e}var t=A,n=e.date();return n=n<29?n:Math.min(n,F0(e.year(),t)),e._isUTC?e._d.setUTCMonth(t,n):e._d.setMonth(t,n),e}function YU(e){return e!=null?(yU(this,e),XA.updateOffset(this,!0),this):iw(this,"Month")}function XL(){return F0(this.year(),this.month())}function LL(e){return this._monthsParseExact?(st(this,"_monthsRegex")||ZU.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(st(this,"_monthsShortRegex")||(this._monthsShortRegex=RL),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function OL(e){return this._monthsParseExact?(st(this,"_monthsRegex")||ZU.call(this),e?this._monthsStrictRegex:this._monthsRegex):(st(this,"_monthsRegex")||(this._monthsRegex=VL),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function ZU(){function e(o,g){return g.length-o.length}var A=[],t=[],n=[],B,a,s,i;for(B=0;B<12;B++)a=Ac([2e3,B]),s=$c(this.monthsShort(a,"")),i=$c(this.months(a,"")),A.push(s),t.push(i),n.push(i),n.push(s);A.sort(e),t.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+A.join("|")+")","i")}function JL(e,A,t,n,B,a,s){var i;return e<100&&e>=0?(i=new Date(e+400,A,t,n,B,a,s),isFinite(i.getFullYear())&&i.setFullYear(e)):i=new Date(e,A,t,n,B,a,s),i}function cw(e){var A,t;return e<100&&e>=0?(t=Array.prototype.slice.call(arguments),t[0]=e+400,A=new Date(Date.UTC.apply(null,t)),isFinite(A.getUTCFullYear())&&A.setUTCFullYear(e)):A=new Date(Date.UTC.apply(null,arguments)),A}function gC(e,A,t){var n=7+A-t,B=(7+cw(e,0,n).getUTCDay()-A)%7;return-B+n-1}function kU(e,A,t,n,B){var a=(7+t-n)%7,s=gC(e,n,B),i=1+7*(A-1)+a+s,o,g;return i<=0?(o=e-1,g=rw(o)+i):i>rw(e)?(o=e+1,g=i-rw(e)):(o=e,g=i),{year:o,dayOfYear:g}}function ow(e,A,t){var n=gC(e.year(),A,t),B=Math.floor((e.dayOfYear()-n-1)/7)+1,a,s;return B<1?(s=e.year()-1,a=B+to(s,A,t)):B>to(e.year(),A,t)?(a=B-to(e.year(),A,t),s=e.year()+1):(s=e.year(),a=B),{week:a,year:s}}function to(e,A,t){var n=gC(e,A,t),B=gC(e+1,A,t);return(rw(e)-n+B)/7}ue("w",["ww",2],"wo","week"),ue("W",["WW",2],"Wo","isoWeek"),qA("w",Ot,Su),qA("ww",Ot,vs),qA("W",Ot,Su),qA("WW",Ot,vs),sw(["w","ww","W","WW"],function(e,A,t,n){A[n.substr(0,1)]=Oe(e)});function KL(e){return ow(e,this._week.dow,this._week.doy).week}var jL={dow:0,doy:6};function qL(){return this._week.dow}function _L(){return this._week.doy}function $L(e){var A=this.localeData().week(this);return e==null?A:this.add((e-A)*7,"d")}function AO(e){var A=ow(this,1,4).week;return e==null?A:this.add((e-A)*7,"d")}ue("d",0,"do","day"),ue("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),ue("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),ue("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),ue("e",0,0,"weekday"),ue("E",0,0,"isoWeekday"),qA("d",Ot),qA("e",Ot),qA("E",Ot),qA("dd",function(e,A){return A.weekdaysMinRegex(e)}),qA("ddd",function(e,A){return A.weekdaysShortRegex(e)}),qA("dddd",function(e,A){return A.weekdaysRegex(e)}),sw(["dd","ddd","dddd"],function(e,A,t,n){var B=t._locale.weekdaysParse(e,n,t._strict);B!=null?A.d=B:Ue(t).invalidWeekday=e}),sw(["d","e","E"],function(e,A,t,n){A[n]=Oe(e)});function eO(e,A){return typeof e!="string"?e:isNaN(e)?(e=A.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function tO(e,A){return typeof e=="string"?A.weekdaysParse(e)%7||7:isNaN(e)?null:e}function P0(e,A){return e.slice(A,7).concat(e.slice(0,A))}var nO="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),UU="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),BO="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),aO=aw,sO=aw,rO=aw;function iO(e,A){var t=Or(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(A)?"format":"standalone"];return e===!0?P0(t,this._week.dow):e?t[e.day()]:t}function cO(e){return e===!0?P0(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function oO(e){return e===!0?P0(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function gO(e,A,t){var n,B,a,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=Ac([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").toLocaleLowerCase();return t?A==="dddd"?(B=Tn.call(this._weekdaysParse,s),B!==-1?B:null):A==="ddd"?(B=Tn.call(this._shortWeekdaysParse,s),B!==-1?B:null):(B=Tn.call(this._minWeekdaysParse,s),B!==-1?B:null):A==="dddd"?(B=Tn.call(this._weekdaysParse,s),B!==-1||(B=Tn.call(this._shortWeekdaysParse,s),B!==-1)?B:(B=Tn.call(this._minWeekdaysParse,s),B!==-1?B:null)):A==="ddd"?(B=Tn.call(this._shortWeekdaysParse,s),B!==-1||(B=Tn.call(this._weekdaysParse,s),B!==-1)?B:(B=Tn.call(this._minWeekdaysParse,s),B!==-1?B:null)):(B=Tn.call(this._minWeekdaysParse,s),B!==-1||(B=Tn.call(this._weekdaysParse,s),B!==-1)?B:(B=Tn.call(this._shortWeekdaysParse,s),B!==-1?B:null))}function lO(e,A,t){var n,B,a;if(this._weekdaysParseExact)return gO.call(this,e,A,t);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(B=Ac([2e3,1]).day(n),t&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(B,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(B,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(B,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(a="^"+this.weekdays(B,"")+"|^"+this.weekdaysShort(B,"")+"|^"+this.weekdaysMin(B,""),this._weekdaysParse[n]=new RegExp(a.replace(".",""),"i")),t&&A==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(t&&A==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(t&&A==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!t&&this._weekdaysParse[n].test(e))return n}}function dO(e){if(!this.isValid())return e!=null?this:NaN;var A=iw(this,"Day");return e!=null?(e=eO(e,this.localeData()),this.add(e-A,"d")):A}function uO(e){if(!this.isValid())return e!=null?this:NaN;var A=(this.day()+7-this.localeData()._week.dow)%7;return e==null?A:this.add(e-A,"d")}function GO(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var A=tO(e,this.localeData());return this.day(this.day()%7?A:A-7)}else return this.day()||7}function QO(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||M0.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(st(this,"_weekdaysRegex")||(this._weekdaysRegex=aO),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function wO(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||M0.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(st(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=sO),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function fO(e){return this._weekdaysParseExact?(st(this,"_weekdaysRegex")||M0.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(st(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=rO),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function M0(){function e(d,G){return G.length-d.length}var A=[],t=[],n=[],B=[],a,s,i,o,g;for(a=0;a<7;a++)s=Ac([2e3,1]).day(a),i=$c(this.weekdaysMin(s,"")),o=$c(this.weekdaysShort(s,"")),g=$c(this.weekdays(s,"")),A.push(i),t.push(o),n.push(g),B.push(i),B.push(o),B.push(g);A.sort(e),t.sort(e),n.sort(e),B.sort(e),this._weekdaysRegex=new RegExp("^("+B.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+t.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+A.join("|")+")","i")}function x0(){return this.hours()%12||12}function hO(){return this.hours()||24}ue("H",["HH",2],0,"hour"),ue("h",["hh",2],0,x0),ue("k",["kk",2],0,hO),ue("hmm",0,0,function(){return""+x0.apply(this)+tc(this.minutes(),2)}),ue("hmmss",0,0,function(){return""+x0.apply(this)+tc(this.minutes(),2)+tc(this.seconds(),2)}),ue("Hmm",0,0,function(){return""+this.hours()+tc(this.minutes(),2)}),ue("Hmmss",0,0,function(){return""+this.hours()+tc(this.minutes(),2)+tc(this.seconds(),2)});function DU(e,A){ue(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),A)})}DU("a",!0),DU("A",!1);function FU(e,A){return A._meridiemParse}qA("a",FU),qA("A",FU),qA("H",Ot,U0),qA("h",Ot,Su),qA("k",Ot,Su),qA("HH",Ot,vs),qA("hh",Ot,vs),qA("kk",Ot,vs),qA("hmm",vU),qA("hmmss",IU),qA("Hmm",vU),qA("Hmmss",IU),yt(["H","HH"],cB),yt(["k","kk"],function(e,A,t){var n=Oe(e);A[cB]=n===24?0:n}),yt(["a","A"],function(e,A,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),yt(["h","hh"],function(e,A,t){A[cB]=Oe(e),Ue(t).bigHour=!0}),yt("hmm",function(e,A,t){var n=e.length-2;A[cB]=Oe(e.substr(0,n)),A[Kr]=Oe(e.substr(n)),Ue(t).bigHour=!0}),yt("hmmss",function(e,A,t){var n=e.length-4,B=e.length-2;A[cB]=Oe(e.substr(0,n)),A[Kr]=Oe(e.substr(n,2)),A[eo]=Oe(e.substr(B)),Ue(t).bigHour=!0}),yt("Hmm",function(e,A,t){var n=e.length-2;A[cB]=Oe(e.substr(0,n)),A[Kr]=Oe(e.substr(n))}),yt("Hmmss",function(e,A,t){var n=e.length-4,B=e.length-2;A[cB]=Oe(e.substr(0,n)),A[Kr]=Oe(e.substr(n,2)),A[eo]=Oe(e.substr(B))});function CO(e){return(e+"").toLowerCase().charAt(0)==="p"}var bO=/[ap]\.?m?\.?/i,vO=Wu("Hours",!0);function IO(e,A,t){return e>11?t?"pm":"PM":t?"am":"AM"}var PU={calendar:gL,longDateFormat:GL,invalidDate:wL,ordinal:hL,dayOfMonthOrdinalParse:CL,relativeTime:vL,months:TL,monthsShort:pU,week:jL,weekdays:nO,weekdaysMin:BO,weekdaysShort:UU,meridiemParse:bO},Bn={},gw={},lw;function HO(e,A){var t,n=Math.min(e.length,A.length);for(t=0;t<n;t+=1)if(e[t]!==A[t])return t;return n}function MU(e){return e&&e.toLowerCase().replace("_","-")}function EO(e){for(var A=0,t,n,B,a;A<e.length;){for(a=MU(e[A]).split("-"),t=a.length,n=MU(e[A+1]),n=n?n.split("-"):null;t>0;){if(B=lC(a.slice(0,t).join("-")),B)return B;if(n&&n.length>=t&&HO(a,n)>=t-1)break;t--}A++}return lw}function pO(e){return!!(e&&e.match("^[^/\\\\]*$"))}function lC(e){var A=null,t;if(Bn[e]===void 0&&typeof module<"u"&&module&&module.exports&&pO(e))try{A=lw._abbr,t=require,t("./locale/"+e),Cg(A)}catch{Bn[e]=null}return Bn[e]}function Cg(e,A){var t;return e&&(Ja(A)?t=no(e):t=T0(e,A),t?lw=t:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),lw._abbr}function T0(e,A){if(A!==null){var t,n=PU;if(A.abbr=e,Bn[e]!=null)wU("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=Bn[e]._config;else if(A.parentLocale!=null)if(Bn[A.parentLocale]!=null)n=Bn[A.parentLocale]._config;else if(t=lC(A.parentLocale),t!=null)n=t._config;else return gw[A.parentLocale]||(gw[A.parentLocale]=[]),gw[A.parentLocale].push({name:e,config:A}),null;return Bn[e]=new E0(H0(n,A)),gw[e]&&gw[e].forEach(function(B){T0(B.name,B.config)}),Cg(e),Bn[e]}else return delete Bn[e],null}function mO(e,A){if(A!=null){var t,n,B=PU;Bn[e]!=null&&Bn[e].parentLocale!=null?Bn[e].set(H0(Bn[e]._config,A)):(n=lC(e),n!=null&&(B=n._config),A=H0(B,A),n==null&&(A.abbr=e),t=new E0(A),t.parentLocale=Bn[e],Bn[e]=t),Cg(e)}else Bn[e]!=null&&(Bn[e].parentLocale!=null?(Bn[e]=Bn[e].parentLocale,e===Cg()&&Cg(e)):Bn[e]!=null&&delete Bn[e]);return Bn[e]}function no(e){var A;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return lw;if(!Or(e)){if(A=lC(e),A)return A;e=[e]}return EO(e)}function yO(){return p0(Bn)}function R0(e){var A,t=e._a;return t&&Ue(e).overflow===-2&&(A=t[Ao]<0||t[Ao]>11?Ao:t[nc]<1||t[nc]>F0(t[ta],t[Ao])?nc:t[cB]<0||t[cB]>24||t[cB]===24&&(t[Kr]!==0||t[eo]!==0||t[td]!==0)?cB:t[Kr]<0||t[Kr]>59?Kr:t[eo]<0||t[eo]>59?eo:t[td]<0||t[td]>999?td:-1,Ue(e)._overflowDayOfYear&&(A<ta||A>nc)&&(A=nc),Ue(e)._overflowWeeks&&A===-1&&(A=UL),Ue(e)._overflowWeekday&&A===-1&&(A=DL),Ue(e).overflow=A),e}var YO=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ZO=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,kO=/Z|[+-]\d\d(?::?\d\d)?/,dC=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],V0=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],UO=/^\/?Date\((-?\d+)/i,DO=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,FO={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function xU(e){var A,t,n=e._i,B=YO.exec(n)||ZO.exec(n),a,s,i,o,g=dC.length,d=V0.length;if(B){for(Ue(e).iso=!0,A=0,t=g;A<t;A++)if(dC[A][1].exec(B[1])){s=dC[A][0],a=dC[A][2]!==!1;break}if(s==null){e._isValid=!1;return}if(B[3]){for(A=0,t=d;A<t;A++)if(V0[A][1].exec(B[3])){i=(B[2]||" ")+V0[A][0];break}if(i==null){e._isValid=!1;return}}if(!a&&i!=null){e._isValid=!1;return}if(B[4])if(kO.exec(B[4]))o="Z";else{e._isValid=!1;return}e._f=s+(i||"")+(o||""),W0(e)}else e._isValid=!1}function PO(e,A,t,n,B,a){var s=[MO(e),pU.indexOf(A),parseInt(t,10),parseInt(n,10),parseInt(B,10)];return a&&s.push(parseInt(a,10)),s}function MO(e){var A=parseInt(e,10);return A<=49?2e3+A:A<=999?1900+A:A}function xO(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function TO(e,A,t){if(e){var n=UU.indexOf(e),B=new Date(A[0],A[1],A[2]).getDay();if(n!==B)return Ue(t).weekdayMismatch=!0,t._isValid=!1,!1}return!0}function RO(e,A,t){if(e)return FO[e];if(A)return 0;var n=parseInt(t,10),B=n%100,a=(n-B)/100;return a*60+B}function TU(e){var A=DO.exec(xO(e._i)),t;if(A){if(t=PO(A[4],A[3],A[2],A[5],A[6],A[7]),!TO(A[1],t,e))return;e._a=t,e._tzm=RO(A[8],A[9],A[10]),e._d=cw.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),Ue(e).rfc2822=!0}else e._isValid=!1}function VO(e){var A=UO.exec(e._i);if(A!==null){e._d=new Date(+A[1]);return}if(xU(e),e._isValid===!1)delete e._isValid;else return;if(TU(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:XA.createFromInputFallback(e)}XA.createFromInputFallback=rr("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function zu(e,A,t){return e??A??t}function SO(e){var A=new Date(XA.now());return e._useUTC?[A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate()]:[A.getFullYear(),A.getMonth(),A.getDate()]}function S0(e){var A,t,n=[],B,a,s;if(!e._d){for(B=SO(e),e._w&&e._a[nc]==null&&e._a[Ao]==null&&WO(e),e._dayOfYear!=null&&(s=zu(e._a[ta],B[ta]),(e._dayOfYear>rw(s)||e._dayOfYear===0)&&(Ue(e)._overflowDayOfYear=!0),t=cw(s,0,e._dayOfYear),e._a[Ao]=t.getUTCMonth(),e._a[nc]=t.getUTCDate()),A=0;A<3&&e._a[A]==null;++A)e._a[A]=n[A]=B[A];for(;A<7;A++)e._a[A]=n[A]=e._a[A]==null?A===2?1:0:e._a[A];e._a[cB]===24&&e._a[Kr]===0&&e._a[eo]===0&&e._a[td]===0&&(e._nextDay=!0,e._a[cB]=0),e._d=(e._useUTC?cw:JL).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[cB]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(Ue(e).weekdayMismatch=!0)}}function WO(e){var A,t,n,B,a,s,i,o,g;A=e._w,A.GG!=null||A.W!=null||A.E!=null?(a=1,s=4,t=zu(A.GG,e._a[ta],ow(Jt(),1,4).year),n=zu(A.W,1),B=zu(A.E,1),(B<1||B>7)&&(o=!0)):(a=e._locale._week.dow,s=e._locale._week.doy,g=ow(Jt(),a,s),t=zu(A.gg,e._a[ta],g.year),n=zu(A.w,g.week),A.d!=null?(B=A.d,(B<0||B>6)&&(o=!0)):A.e!=null?(B=A.e+a,(A.e<0||A.e>6)&&(o=!0)):B=a),n<1||n>to(t,a,s)?Ue(e)._overflowWeeks=!0:o!=null?Ue(e)._overflowWeekday=!0:(i=kU(t,n,B,a,s),e._a[ta]=i.year,e._dayOfYear=i.dayOfYear)}XA.ISO_8601=function(){},XA.RFC_2822=function(){};function W0(e){if(e._f===XA.ISO_8601){xU(e);return}if(e._f===XA.RFC_2822){TU(e);return}e._a=[],Ue(e).empty=!0;var A=""+e._i,t,n,B,a,s,i=A.length,o=0,g,d;for(B=fU(e._f,e._locale).match(m0)||[],d=B.length,t=0;t<d;t++)a=B[t],n=(A.match(YL(a,e))||[])[0],n&&(s=A.substr(0,A.indexOf(n)),s.length>0&&Ue(e).unusedInput.push(s),A=A.slice(A.indexOf(n)+n.length),o+=n.length),Ru[a]?(n?Ue(e).empty=!1:Ue(e).unusedTokens.push(a),kL(a,n,e)):e._strict&&!n&&Ue(e).unusedTokens.push(a);Ue(e).charsLeftOver=i-o,A.length>0&&Ue(e).unusedInput.push(A),e._a[cB]<=12&&Ue(e).bigHour===!0&&e._a[cB]>0&&(Ue(e).bigHour=void 0),Ue(e).parsedDateParts=e._a.slice(0),Ue(e).meridiem=e._meridiem,e._a[cB]=zO(e._locale,e._a[cB],e._meridiem),g=Ue(e).era,g!==null&&(e._a[ta]=e._locale.erasConvertYear(g,e._a[ta])),S0(e),R0(e)}function zO(e,A,t){var n;return t==null?A:e.meridiemHour!=null?e.meridiemHour(A,t):(e.isPM!=null&&(n=e.isPM(t),n&&A<12&&(A+=12),!n&&A===12&&(A=0)),A)}function NO(e){var A,t,n,B,a,s,i=!1,o=e._f.length;if(o===0){Ue(e).invalidFormat=!0,e._d=new Date(NaN);return}for(B=0;B<o;B++)a=0,s=!1,A=I0({},e),e._useUTC!=null&&(A._useUTC=e._useUTC),A._f=e._f[B],W0(A),b0(A)&&(s=!0),a+=Ue(A).charsLeftOver,a+=Ue(A).unusedTokens.length*10,Ue(A).score=a,i?a<n&&(n=a,t=A):(n==null||a<n||s)&&(n=a,t=A,s&&(i=!0));hg(e,t||A)}function XO(e){if(!e._d){var A=Y0(e._i),t=A.day===void 0?A.date:A.day;e._a=dU([A.year,A.month,t,A.hour,A.minute,A.second,A.millisecond],function(n){return n&&parseInt(n,10)}),S0(e)}}function LO(e){var A=new Bw(R0(RU(e)));return A._nextDay&&(A.add(1,"d"),A._nextDay=void 0),A}function RU(e){var A=e._i,t=e._f;return e._locale=e._locale||no(e._l),A===null||t===void 0&&A===""?eC({nullInput:!0}):(typeof A=="string"&&(e._i=A=e._locale.preparse(A)),Jr(A)?new Bw(R0(A)):(nw(A)?e._d=A:Or(t)?NO(e):t?W0(e):OO(e),b0(e)||(e._d=null),e))}function OO(e){var A=e._i;Ja(A)?e._d=new Date(XA.now()):nw(A)?e._d=new Date(A.valueOf()):typeof A=="string"?VO(e):Or(A)?(e._a=dU(A.slice(0),function(t){return parseInt(t,10)}),S0(e)):ed(A)?XO(e):_c(A)?e._d=new Date(A):XA.createFromInputFallback(e)}function VU(e,A,t,n,B){var a={};return(A===!0||A===!1)&&(n=A,A=void 0),(t===!0||t===!1)&&(n=t,t=void 0),(ed(e)&&h0(e)||Or(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=B,a._l=t,a._i=e,a._f=A,a._strict=n,LO(a)}function Jt(e,A,t,n){return VU(e,A,t,n,!1)}var JO=rr("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Jt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:eC()}),KO=rr("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=Jt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:eC()});function SU(e,A){var t,n;if(A.length===1&&Or(A[0])&&(A=A[0]),!A.length)return Jt();for(t=A[0],n=1;n<A.length;++n)(!A[n].isValid()||A[n][e](t))&&(t=A[n]);return t}function jO(){var e=[].slice.call(arguments,0);return SU("isBefore",e)}function qO(){var e=[].slice.call(arguments,0);return SU("isAfter",e)}var _O=function(){return Date.now?Date.now():+new Date},dw=["year","quarter","month","week","day","hour","minute","second","millisecond"];function $O(e){var A,t=!1,n,B=dw.length;for(A in e)if(st(e,A)&&!(Tn.call(dw,A)!==-1&&(e[A]==null||!isNaN(e[A]))))return!1;for(n=0;n<B;++n)if(e[dw[n]]){if(t)return!1;parseFloat(e[dw[n]])!==Oe(e[dw[n]])&&(t=!0)}return!0}function AJ(){return this._isValid}function eJ(){return jr(NaN)}function uC(e){var A=Y0(e),t=A.year||0,n=A.quarter||0,B=A.month||0,a=A.week||A.isoWeek||0,s=A.day||0,i=A.hour||0,o=A.minute||0,g=A.second||0,d=A.millisecond||0;this._isValid=$O(A),this._milliseconds=+d+g*1e3+o*6e4+i*1e3*60*60,this._days=+s+a*7,this._months=+B+n*3+t*12,this._data={},this._locale=no(),this._bubble()}function GC(e){return e instanceof uC}function z0(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function tJ(e,A,t){var n=Math.min(e.length,A.length),B=Math.abs(e.length-A.length),a=0,s;for(s=0;s<n;s++)Oe(e[s])!==Oe(A[s])&&a++;return a+B}function WU(e,A){ue(e,0,0,function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+tc(~~(t/60),2)+A+tc(~~t%60,2)})}WU("Z",":"),WU("ZZ",""),qA("Z",iC),qA("ZZ",iC),yt(["Z","ZZ"],function(e,A,t){t._useUTC=!0,t._tzm=N0(iC,e)});var nJ=/([\+\-]|\d\d)/gi;function N0(e,A){var t=(A||"").match(e),n,B,a;return t===null?null:(n=t[t.length-1]||[],B=(n+"").match(nJ)||["-",0,0],a=+(B[1]*60)+Oe(B[2]),a===0?0:B[0]==="+"?a:-a)}function X0(e,A){var t,n;return A._isUTC?(t=A.clone(),n=(Jr(e)||nw(e)?e.valueOf():Jt(e).valueOf())-t.valueOf(),t._d.setTime(t._d.valueOf()+n),XA.updateOffset(t,!1),t):Jt(e).local()}function L0(e){return-Math.round(e._d.getTimezoneOffset())}XA.updateOffset=function(){};function BJ(e,A,t){var n=this._offset||0,B;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=N0(iC,e),e===null)return this}else Math.abs(e)<16&&!t&&(e=e*60);return!this._isUTC&&A&&(B=L0(this)),this._offset=e,this._isUTC=!0,B!=null&&this.add(B,"m"),n!==e&&(!A||this._changeInProgress?LU(this,jr(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,XA.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:L0(this)}function aJ(e,A){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,A),this):-this.utcOffset()}function sJ(e){return this.utcOffset(0,e)}function rJ(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(L0(this),"m")),this}function iJ(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=N0(mL,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function cJ(e){return this.isValid()?(e=e?Jt(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function oJ(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function gJ(){if(!Ja(this._isDSTShifted))return this._isDSTShifted;var e={},A;return I0(e,this),e=RU(e),e._a?(A=e._isUTC?Ac(e._a):Jt(e._a),this._isDSTShifted=this.isValid()&&tJ(e._a,A.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function lJ(){return this.isValid()?!this._isUTC:!1}function dJ(){return this.isValid()?this._isUTC:!1}function zU(){return this.isValid()?this._isUTC&&this._offset===0:!1}var uJ=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,GJ=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function jr(e,A){var t=e,n=null,B,a,s;return GC(e)?t={ms:e._milliseconds,d:e._days,M:e._months}:_c(e)||!isNaN(+e)?(t={},A?t[A]=+e:t.milliseconds=+e):(n=uJ.exec(e))?(B=n[1]==="-"?-1:1,t={y:0,d:Oe(n[nc])*B,h:Oe(n[cB])*B,m:Oe(n[Kr])*B,s:Oe(n[eo])*B,ms:Oe(z0(n[td]*1e3))*B}):(n=GJ.exec(e))?(B=n[1]==="-"?-1:1,t={y:nd(n[2],B),M:nd(n[3],B),w:nd(n[4],B),d:nd(n[5],B),h:nd(n[6],B),m:nd(n[7],B),s:nd(n[8],B)}):t==null?t={}:typeof t=="object"&&("from"in t||"to"in t)&&(s=QJ(Jt(t.from),Jt(t.to)),t={},t.ms=s.milliseconds,t.M=s.months),a=new uC(t),GC(e)&&st(e,"_locale")&&(a._locale=e._locale),GC(e)&&st(e,"_isValid")&&(a._isValid=e._isValid),a}jr.fn=uC.prototype,jr.invalid=eJ;function nd(e,A){var t=e&&parseFloat(e.replace(",","."));return(isNaN(t)?0:t)*A}function NU(e,A){var t={};return t.months=A.month()-e.month()+(A.year()-e.year())*12,e.clone().add(t.months,"M").isAfter(A)&&--t.months,t.milliseconds=+A-+e.clone().add(t.months,"M"),t}function QJ(e,A){var t;return e.isValid()&&A.isValid()?(A=X0(A,e),e.isBefore(A)?t=NU(e,A):(t=NU(A,e),t.milliseconds=-t.milliseconds,t.months=-t.months),t):{milliseconds:0,months:0}}function XU(e,A){return function(t,n){var B,a;return n!==null&&!isNaN(+n)&&(wU(A,"moment()."+A+"(period, number) is deprecated. Please use moment()."+A+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=t,t=n,n=a),B=jr(t,n),LU(this,B,e),this}}function LU(e,A,t,n){var B=A._milliseconds,a=z0(A._days),s=z0(A._months);e.isValid()&&(n=n??!0,s&&yU(e,iw(e,"Month")+s*t),a&&EU(e,"Date",iw(e,"Date")+a*t),B&&e._d.setTime(e._d.valueOf()+B*t),n&&XA.updateOffset(e,a||s))}var wJ=XU(1,"add"),fJ=XU(-1,"subtract");function OU(e){return typeof e=="string"||e instanceof String}function hJ(e){return Jr(e)||nw(e)||OU(e)||_c(e)||bJ(e)||CJ(e)||e===null||e===void 0}function CJ(e){var A=ed(e)&&!h0(e),t=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],B,a,s=n.length;for(B=0;B<s;B+=1)a=n[B],t=t||st(e,a);return A&&t}function bJ(e){var A=Or(e),t=!1;return A&&(t=e.filter(function(n){return!_c(n)&&OU(e)}).length===0),A&&t}function vJ(e){var A=ed(e)&&!h0(e),t=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],B,a;for(B=0;B<n.length;B+=1)a=n[B],t=t||st(e,a);return A&&t}function IJ(e,A){var t=e.diff(A,"days",!0);return t<-6?"sameElse":t<-1?"lastWeek":t<0?"lastDay":t<1?"sameDay":t<2?"nextDay":t<7?"nextWeek":"sameElse"}function HJ(e,A){arguments.length===1&&(arguments[0]?hJ(arguments[0])?(e=arguments[0],A=void 0):vJ(arguments[0])&&(A=arguments[0],e=void 0):(e=void 0,A=void 0));var t=e||Jt(),n=X0(t,this).startOf("day"),B=XA.calendarFormat(this,n)||"sameElse",a=A&&(ec(A[B])?A[B].call(this,t):A[B]);return this.format(a||this.localeData().calendar(B,this,Jt(t)))}function EJ(){return new Bw(this)}function pJ(e,A){var t=Jr(e)?e:Jt(e);return this.isValid()&&t.isValid()?(A=ir(A)||"millisecond",A==="millisecond"?this.valueOf()>t.valueOf():t.valueOf()<this.clone().startOf(A).valueOf()):!1}function mJ(e,A){var t=Jr(e)?e:Jt(e);return this.isValid()&&t.isValid()?(A=ir(A)||"millisecond",A==="millisecond"?this.valueOf()<t.valueOf():this.clone().endOf(A).valueOf()<t.valueOf()):!1}function yJ(e,A,t,n){var B=Jr(e)?e:Jt(e),a=Jr(A)?A:Jt(A);return this.isValid()&&B.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(B,t):!this.isBefore(B,t))&&(n[1]===")"?this.isBefore(a,t):!this.isAfter(a,t))):!1}function YJ(e,A){var t=Jr(e)?e:Jt(e),n;return this.isValid()&&t.isValid()?(A=ir(A)||"millisecond",A==="millisecond"?this.valueOf()===t.valueOf():(n=t.valueOf(),this.clone().startOf(A).valueOf()<=n&&n<=this.clone().endOf(A).valueOf())):!1}function ZJ(e,A){return this.isSame(e,A)||this.isAfter(e,A)}function kJ(e,A){return this.isSame(e,A)||this.isBefore(e,A)}function UJ(e,A,t){var n,B,a;if(!this.isValid())return NaN;if(n=X0(e,this),!n.isValid())return NaN;switch(B=(n.utcOffset()-this.utcOffset())*6e4,A=ir(A),A){case"year":a=QC(this,n)/12;break;case"month":a=QC(this,n);break;case"quarter":a=QC(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-B)/864e5;break;case"week":a=(this-n-B)/6048e5;break;default:a=this-n}return t?a:cr(a)}function QC(e,A){if(e.date()<A.date())return-QC(A,e);var t=(A.year()-e.year())*12+(A.month()-e.month()),n=e.clone().add(t,"months"),B,a;return A-n<0?(B=e.clone().add(t-1,"months"),a=(A-n)/(n-B)):(B=e.clone().add(t+1,"months"),a=(A-n)/(B-n)),-(t+a)||0}XA.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",XA.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function DJ(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function FJ(e){if(!this.isValid())return null;var A=e!==!0,t=A?this.clone().utc():this;return t.year()<0||t.year()>9999?nC(t,A?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ec(Date.prototype.toISOString)?A?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",nC(t,"Z")):nC(t,A?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function PJ(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",A="",t,n,B,a;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",A="Z"),t="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",B="-MM-DD[T]HH:mm:ss.SSS",a=A+'[")]',this.format(t+n+B+a)}function MJ(e){e||(e=this.isUtc()?XA.defaultFormatUtc:XA.defaultFormat);var A=nC(this,e);return this.localeData().postformat(A)}function xJ(e,A){return this.isValid()&&(Jr(e)&&e.isValid()||Jt(e).isValid())?jr({to:this,from:e}).locale(this.locale()).humanize(!A):this.localeData().invalidDate()}function TJ(e){return this.from(Jt(),e)}function RJ(e,A){return this.isValid()&&(Jr(e)&&e.isValid()||Jt(e).isValid())?jr({from:this,to:e}).locale(this.locale()).humanize(!A):this.localeData().invalidDate()}function VJ(e){return this.to(Jt(),e)}function JU(e){var A;return e===void 0?this._locale._abbr:(A=no(e),A!=null&&(this._locale=A),this)}var KU=rr("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function jU(){return this._locale}var wC=1e3,Nu=60*wC,fC=60*Nu,qU=(365*400+97)*24*fC;function Xu(e,A){return(e%A+A)%A}function _U(e,A,t){return e<100&&e>=0?new Date(e+400,A,t)-qU:new Date(e,A,t).valueOf()}function $U(e,A,t){return e<100&&e>=0?Date.UTC(e+400,A,t)-qU:Date.UTC(e,A,t)}function SJ(e){var A,t;if(e=ir(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?$U:_U,e){case"year":A=t(this.year(),0,1);break;case"quarter":A=t(this.year(),this.month()-this.month()%3,1);break;case"month":A=t(this.year(),this.month(),1);break;case"week":A=t(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":A=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":A=t(this.year(),this.month(),this.date());break;case"hour":A=this._d.valueOf(),A-=Xu(A+(this._isUTC?0:this.utcOffset()*Nu),fC);break;case"minute":A=this._d.valueOf(),A-=Xu(A,Nu);break;case"second":A=this._d.valueOf(),A-=Xu(A,wC);break}return this._d.setTime(A),XA.updateOffset(this,!0),this}function WJ(e){var A,t;if(e=ir(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(t=this._isUTC?$U:_U,e){case"year":A=t(this.year()+1,0,1)-1;break;case"quarter":A=t(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":A=t(this.year(),this.month()+1,1)-1;break;case"week":A=t(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":A=t(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":A=t(this.year(),this.month(),this.date()+1)-1;break;case"hour":A=this._d.valueOf(),A+=fC-Xu(A+(this._isUTC?0:this.utcOffset()*Nu),fC)-1;break;case"minute":A=this._d.valueOf(),A+=Nu-Xu(A,Nu)-1;break;case"second":A=this._d.valueOf(),A+=wC-Xu(A,wC)-1;break}return this._d.setTime(A),XA.updateOffset(this,!0),this}function zJ(){return this._d.valueOf()-(this._offset||0)*6e4}function NJ(){return Math.floor(this.valueOf()/1e3)}function XJ(){return new Date(this.valueOf())}function LJ(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function OJ(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function JJ(){return this.isValid()?this.toISOString():null}function KJ(){return b0(this)}function jJ(){return hg({},Ue(this))}function qJ(){return Ue(this).overflow}function _J(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}ue("N",0,0,"eraAbbr"),ue("NN",0,0,"eraAbbr"),ue("NNN",0,0,"eraAbbr"),ue("NNNN",0,0,"eraName"),ue("NNNNN",0,0,"eraNarrow"),ue("y",["y",1],"yo","eraYear"),ue("y",["yy",2],0,"eraYear"),ue("y",["yyy",3],0,"eraYear"),ue("y",["yyyy",4],0,"eraYear"),qA("N",O0),qA("NN",O0),qA("NNN",O0),qA("NNNN",cK),qA("NNNNN",oK),yt(["N","NN","NNN","NNNN","NNNNN"],function(e,A,t,n){var B=t._locale.erasParse(e,n,t._strict);B?Ue(t).era=B:Ue(t).invalidEra=e}),qA("y",Vu),qA("yy",Vu),qA("yyy",Vu),qA("yyyy",Vu),qA("yo",gK),yt(["y","yy","yyy","yyyy"],ta),yt(["yo"],function(e,A,t,n){var B;t._locale._eraYearOrdinalRegex&&(B=e.match(t._locale._eraYearOrdinalRegex)),t._locale.eraYearOrdinalParse?A[ta]=t._locale.eraYearOrdinalParse(e,B):A[ta]=parseInt(e,10)});function $J(e,A){var t,n,B,a=this._eras||no("en")._eras;for(t=0,n=a.length;t<n;++t){switch(typeof a[t].since){case"string":B=XA(a[t].since).startOf("day"),a[t].since=B.valueOf();break}switch(typeof a[t].until){case"undefined":a[t].until=1/0;break;case"string":B=XA(a[t].until).startOf("day").valueOf(),a[t].until=B.valueOf();break}}return a}function AK(e,A,t){var n,B,a=this.eras(),s,i,o;for(e=e.toUpperCase(),n=0,B=a.length;n<B;++n)if(s=a[n].name.toUpperCase(),i=a[n].abbr.toUpperCase(),o=a[n].narrow.toUpperCase(),t)switch(A){case"N":case"NN":case"NNN":if(i===e)return a[n];break;case"NNNN":if(s===e)return a[n];break;case"NNNNN":if(o===e)return a[n];break}else if([s,i,o].indexOf(e)>=0)return a[n]}function eK(e,A){var t=e.since<=e.until?1:-1;return A===void 0?XA(e.since).year():XA(e.since).year()+(A-e.offset)*t}function tK(){var e,A,t,n=this.localeData().eras();for(e=0,A=n.length;e<A;++e)if(t=this.clone().startOf("day").valueOf(),n[e].since<=t&&t<=n[e].until||n[e].until<=t&&t<=n[e].since)return n[e].name;return""}function nK(){var e,A,t,n=this.localeData().eras();for(e=0,A=n.length;e<A;++e)if(t=this.clone().startOf("day").valueOf(),n[e].since<=t&&t<=n[e].until||n[e].until<=t&&t<=n[e].since)return n[e].narrow;return""}function BK(){var e,A,t,n=this.localeData().eras();for(e=0,A=n.length;e<A;++e)if(t=this.clone().startOf("day").valueOf(),n[e].since<=t&&t<=n[e].until||n[e].until<=t&&t<=n[e].since)return n[e].abbr;return""}function aK(){var e,A,t,n,B=this.localeData().eras();for(e=0,A=B.length;e<A;++e)if(t=B[e].since<=B[e].until?1:-1,n=this.clone().startOf("day").valueOf(),B[e].since<=n&&n<=B[e].until||B[e].until<=n&&n<=B[e].since)return(this.year()-XA(B[e].since).year())*t+B[e].offset;return this.year()}function sK(e){return st(this,"_erasNameRegex")||J0.call(this),e?this._erasNameRegex:this._erasRegex}function rK(e){return st(this,"_erasAbbrRegex")||J0.call(this),e?this._erasAbbrRegex:this._erasRegex}function iK(e){return st(this,"_erasNarrowRegex")||J0.call(this),e?this._erasNarrowRegex:this._erasRegex}function O0(e,A){return A.erasAbbrRegex(e)}function cK(e,A){return A.erasNameRegex(e)}function oK(e,A){return A.erasNarrowRegex(e)}function gK(e,A){return A._eraYearOrdinalRegex||Vu}function J0(){var e=[],A=[],t=[],n=[],B,a,s,i,o,g=this.eras();for(B=0,a=g.length;B<a;++B)s=$c(g[B].name),i=$c(g[B].abbr),o=$c(g[B].narrow),A.push(s),e.push(i),t.push(o),n.push(s),n.push(i),n.push(o);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+A.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+t.join("|")+")","i")}ue(0,["gg",2],0,function(){return this.weekYear()%100}),ue(0,["GG",2],0,function(){return this.isoWeekYear()%100});function hC(e,A){ue(0,[e,e.length],0,A)}hC("gggg","weekYear"),hC("ggggg","weekYear"),hC("GGGG","isoWeekYear"),hC("GGGGG","isoWeekYear"),qA("G",rC),qA("g",rC),qA("GG",Ot,vs),qA("gg",Ot,vs),qA("GGGG",k0,Z0),qA("gggg",k0,Z0),qA("GGGGG",sC,BC),qA("ggggg",sC,BC),sw(["gggg","ggggg","GGGG","GGGGG"],function(e,A,t,n){A[n.substr(0,2)]=Oe(e)}),sw(["gg","GG"],function(e,A,t,n){A[n]=XA.parseTwoDigitYear(e)});function lK(e){return AD.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function dK(e){return AD.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function uK(){return to(this.year(),1,4)}function GK(){return to(this.isoWeekYear(),1,4)}function QK(){var e=this.localeData()._week;return to(this.year(),e.dow,e.doy)}function wK(){var e=this.localeData()._week;return to(this.weekYear(),e.dow,e.doy)}function AD(e,A,t,n,B){var a;return e==null?ow(this,n,B).year:(a=to(e,n,B),A>a&&(A=a),fK.call(this,e,A,t,n,B))}function fK(e,A,t,n,B){var a=kU(e,A,t,n,B),s=cw(a.year,0,a.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}ue("Q",0,"Qo","quarter"),qA("Q",CU),yt("Q",function(e,A){A[Ao]=(Oe(e)-1)*3});function hK(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}ue("D",["DD",2],"Do","date"),qA("D",Ot,Su),qA("DD",Ot,vs),qA("Do",function(e,A){return e?A._dayOfMonthOrdinalParse||A._ordinalParse:A._dayOfMonthOrdinalParseLenient}),yt(["D","DD"],nc),yt("Do",function(e,A){A[nc]=Oe(e.match(Ot)[0])});var eD=Wu("Date",!0);ue("DDD",["DDDD",3],"DDDo","dayOfYear"),qA("DDD",aC),qA("DDDD",bU),yt(["DDD","DDDD"],function(e,A,t){t._dayOfYear=Oe(e)});function CK(e){var A=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?A:this.add(e-A,"d")}ue("m",["mm",2],0,"minute"),qA("m",Ot,U0),qA("mm",Ot,vs),yt(["m","mm"],Kr);var bK=Wu("Minutes",!1);ue("s",["ss",2],0,"second"),qA("s",Ot,U0),qA("ss",Ot,vs),yt(["s","ss"],eo);var vK=Wu("Seconds",!1);ue("S",0,0,function(){return~~(this.millisecond()/100)}),ue(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),ue(0,["SSS",3],0,"millisecond"),ue(0,["SSSS",4],0,function(){return this.millisecond()*10}),ue(0,["SSSSS",5],0,function(){return this.millisecond()*100}),ue(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),ue(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),ue(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),ue(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),qA("S",aC,CU),qA("SS",aC,vs),qA("SSS",aC,bU);var bg,tD;for(bg="SSSS";bg.length<=9;bg+="S")qA(bg,Vu);function IK(e,A){A[td]=Oe(("0."+e)*1e3)}for(bg="S";bg.length<=9;bg+="S")yt(bg,IK);tD=Wu("Milliseconds",!1),ue("z",0,0,"zoneAbbr"),ue("zz",0,0,"zoneName");function HK(){return this._isUTC?"UTC":""}function EK(){return this._isUTC?"Coordinated Universal Time":""}var xA=Bw.prototype;xA.add=wJ,xA.calendar=HJ,xA.clone=EJ,xA.diff=UJ,xA.endOf=WJ,xA.format=MJ,xA.from=xJ,xA.fromNow=TJ,xA.to=RJ,xA.toNow=VJ,xA.get=PL,xA.invalidAt=qJ,xA.isAfter=pJ,xA.isBefore=mJ,xA.isBetween=yJ,xA.isSame=YJ,xA.isSameOrAfter=ZJ,xA.isSameOrBefore=kJ,xA.isValid=KJ,xA.lang=KU,xA.locale=JU,xA.localeData=jU,xA.max=KO,xA.min=JO,xA.parsingFlags=jJ,xA.set=ML,xA.startOf=SJ,xA.subtract=fJ,xA.toArray=LJ,xA.toObject=OJ,xA.toDate=XJ,xA.toISOString=FJ,xA.inspect=PJ,typeof Symbol<"u"&&Symbol.for!=null&&(xA[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),xA.toJSON=JJ,xA.toString=DJ,xA.unix=NJ,xA.valueOf=zJ,xA.creationData=_J,xA.eraName=tK,xA.eraNarrow=nK,xA.eraAbbr=BK,xA.eraYear=aK,xA.year=HU,xA.isLeapYear=FL,xA.weekYear=lK,xA.isoWeekYear=dK,xA.quarter=xA.quarters=hK,xA.month=YU,xA.daysInMonth=XL,xA.week=xA.weeks=$L,xA.isoWeek=xA.isoWeeks=AO,xA.weeksInYear=QK,xA.weeksInWeekYear=wK,xA.isoWeeksInYear=uK,xA.isoWeeksInISOWeekYear=GK,xA.date=eD,xA.day=xA.days=dO,xA.weekday=uO,xA.isoWeekday=GO,xA.dayOfYear=CK,xA.hour=xA.hours=vO,xA.minute=xA.minutes=bK,xA.second=xA.seconds=vK,xA.millisecond=xA.milliseconds=tD,xA.utcOffset=BJ,xA.utc=sJ,xA.local=rJ,xA.parseZone=iJ,xA.hasAlignedHourOffset=cJ,xA.isDST=oJ,xA.isLocal=lJ,xA.isUtcOffset=dJ,xA.isUtc=zU,xA.isUTC=zU,xA.zoneAbbr=HK,xA.zoneName=EK,xA.dates=rr("dates accessor is deprecated. Use date instead.",eD),xA.months=rr("months accessor is deprecated. Use month instead",YU),xA.years=rr("years accessor is deprecated. Use year instead",HU),xA.zone=rr("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",aJ),xA.isDSTShifted=rr("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",gJ);function pK(e){return Jt(e*1e3)}function mK(){return Jt.apply(null,arguments).parseZone()}function nD(e){return e}var rt=E0.prototype;rt.calendar=lL,rt.longDateFormat=QL,rt.invalidDate=fL,rt.ordinal=bL,rt.preparse=nD,rt.postformat=nD,rt.relativeTime=IL,rt.pastFuture=HL,rt.set=oL,rt.eras=$J,rt.erasParse=AK,rt.erasConvertYear=eK,rt.erasAbbrRegex=rK,rt.erasNameRegex=sK,rt.erasNarrowRegex=iK,rt.months=SL,rt.monthsShort=WL,rt.monthsParse=NL,rt.monthsRegex=OL,rt.monthsShortRegex=LL,rt.week=KL,rt.firstDayOfYear=_L,rt.firstDayOfWeek=qL,rt.weekdays=iO,rt.weekdaysMin=oO,rt.weekdaysShort=cO,rt.weekdaysParse=lO,rt.weekdaysRegex=QO,rt.weekdaysShortRegex=wO,rt.weekdaysMinRegex=fO,rt.isPM=CO,rt.meridiem=IO;function CC(e,A,t,n){var B=no(),a=Ac().set(n,A);return B[t](a,e)}function BD(e,A,t){if(_c(e)&&(A=e,e=void 0),e=e||"",A!=null)return CC(e,A,t,"month");var n,B=[];for(n=0;n<12;n++)B[n]=CC(e,n,t,"month");return B}function K0(e,A,t,n){typeof e=="boolean"?(_c(A)&&(t=A,A=void 0),A=A||""):(A=e,t=A,e=!1,_c(A)&&(t=A,A=void 0),A=A||"");var B=no(),a=e?B._week.dow:0,s,i=[];if(t!=null)return CC(A,(t+a)%7,n,"day");for(s=0;s<7;s++)i[s]=CC(A,(s+a)%7,n,"day");return i}function yK(e,A){return BD(e,A,"months")}function YK(e,A){return BD(e,A,"monthsShort")}function ZK(e,A,t){return K0(e,A,t,"weekdays")}function kK(e,A,t){return K0(e,A,t,"weekdaysShort")}function UK(e,A,t){return K0(e,A,t,"weekdaysMin")}Cg("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var A=e%10,t=Oe(e%100/10)===1?"th":A===1?"st":A===2?"nd":A===3?"rd":"th";return e+t}}),XA.lang=rr("moment.lang is deprecated. Use moment.locale instead.",Cg),XA.langData=rr("moment.langData is deprecated. Use moment.localeData instead.",no);var Bo=Math.abs;function DK(){var e=this._data;return this._milliseconds=Bo(this._milliseconds),this._days=Bo(this._days),this._months=Bo(this._months),e.milliseconds=Bo(e.milliseconds),e.seconds=Bo(e.seconds),e.minutes=Bo(e.minutes),e.hours=Bo(e.hours),e.months=Bo(e.months),e.years=Bo(e.years),this}function aD(e,A,t,n){var B=jr(A,t);return e._milliseconds+=n*B._milliseconds,e._days+=n*B._days,e._months+=n*B._months,e._bubble()}function FK(e,A){return aD(this,e,A,1)}function PK(e,A){return aD(this,e,A,-1)}function sD(e){return e<0?Math.floor(e):Math.ceil(e)}function MK(){var e=this._milliseconds,A=this._days,t=this._months,n=this._data,B,a,s,i,o;return e>=0&&A>=0&&t>=0||e<=0&&A<=0&&t<=0||(e+=sD(j0(t)+A)*864e5,A=0,t=0),n.milliseconds=e%1e3,B=cr(e/1e3),n.seconds=B%60,a=cr(B/60),n.minutes=a%60,s=cr(a/60),n.hours=s%24,A+=cr(s/24),o=cr(rD(A)),t+=o,A-=sD(j0(o)),i=cr(t/12),t%=12,n.days=A,n.months=t,n.years=i,this}function rD(e){return e*4800/146097}function j0(e){return e*146097/4800}function xK(e){if(!this.isValid())return NaN;var A,t,n=this._milliseconds;if(e=ir(e),e==="month"||e==="quarter"||e==="year")switch(A=this._days+n/864e5,t=this._months+rD(A),e){case"month":return t;case"quarter":return t/3;case"year":return t/12}else switch(A=this._days+Math.round(j0(this._months)),e){case"week":return A/7+n/6048e5;case"day":return A+n/864e5;case"hour":return A*24+n/36e5;case"minute":return A*1440+n/6e4;case"second":return A*86400+n/1e3;case"millisecond":return Math.floor(A*864e5)+n;default:throw new Error("Unknown unit "+e)}}function ao(e){return function(){return this.as(e)}}var iD=ao("ms"),TK=ao("s"),RK=ao("m"),VK=ao("h"),SK=ao("d"),WK=ao("w"),zK=ao("M"),NK=ao("Q"),XK=ao("y"),LK=iD;function OK(){return jr(this)}function JK(e){return e=ir(e),this.isValid()?this[e+"s"]():NaN}function Bd(e){return function(){return this.isValid()?this._data[e]:NaN}}var KK=Bd("milliseconds"),jK=Bd("seconds"),qK=Bd("minutes"),_K=Bd("hours"),$K=Bd("days"),Aj=Bd("months"),ej=Bd("years");function tj(){return cr(this.days()/7)}var so=Math.round,Lu={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function nj(e,A,t,n,B){return B.relativeTime(A||1,!!t,e,n)}function Bj(e,A,t,n){var B=jr(e).abs(),a=so(B.as("s")),s=so(B.as("m")),i=so(B.as("h")),o=so(B.as("d")),g=so(B.as("M")),d=so(B.as("w")),G=so(B.as("y")),f=a<=t.ss&&["s",a]||a<t.s&&["ss",a]||s<=1&&["m"]||s<t.m&&["mm",s]||i<=1&&["h"]||i<t.h&&["hh",i]||o<=1&&["d"]||o<t.d&&["dd",o];return t.w!=null&&(f=f||d<=1&&["w"]||d<t.w&&["ww",d]),f=f||g<=1&&["M"]||g<t.M&&["MM",g]||G<=1&&["y"]||["yy",G],f[2]=A,f[3]=+e>0,f[4]=n,nj.apply(null,f)}function aj(e){return e===void 0?so:typeof e=="function"?(so=e,!0):!1}function sj(e,A){return Lu[e]===void 0?!1:A===void 0?Lu[e]:(Lu[e]=A,e==="s"&&(Lu.ss=A-1),!0)}function rj(e,A){if(!this.isValid())return this.localeData().invalidDate();var t=!1,n=Lu,B,a;return typeof e=="object"&&(A=e,e=!1),typeof e=="boolean"&&(t=e),typeof A=="object"&&(n=Object.assign({},Lu,A),A.s!=null&&A.ss==null&&(n.ss=A.s-1)),B=this.localeData(),a=Bj(this,!t,n,B),t&&(a=B.pastFuture(+this,a)),B.postformat(a)}var q0=Math.abs;function Ou(e){return(e>0)-(e<0)||+e}function bC(){if(!this.isValid())return this.localeData().invalidDate();var e=q0(this._milliseconds)/1e3,A=q0(this._days),t=q0(this._months),n,B,a,s,i=this.asSeconds(),o,g,d,G;return i?(n=cr(e/60),B=cr(n/60),e%=60,n%=60,a=cr(t/12),t%=12,s=e?e.toFixed(3).replace(/\.?0+$/,""):"",o=i<0?"-":"",g=Ou(this._months)!==Ou(i)?"-":"",d=Ou(this._days)!==Ou(i)?"-":"",G=Ou(this._milliseconds)!==Ou(i)?"-":"",o+"P"+(a?g+a+"Y":"")+(t?g+t+"M":"")+(A?d+A+"D":"")+(B||n||e?"T":"")+(B?G+B+"H":"")+(n?G+n+"M":"")+(e?G+s+"S":"")):"P0D"}var _e=uC.prototype;_e.isValid=AJ,_e.abs=DK,_e.add=FK,_e.subtract=PK,_e.as=xK,_e.asMilliseconds=iD,_e.asSeconds=TK,_e.asMinutes=RK,_e.asHours=VK,_e.asDays=SK,_e.asWeeks=WK,_e.asMonths=zK,_e.asQuarters=NK,_e.asYears=XK,_e.valueOf=LK,_e._bubble=MK,_e.clone=OK,_e.get=JK,_e.milliseconds=KK,_e.seconds=jK,_e.minutes=qK,_e.hours=_K,_e.days=$K,_e.weeks=tj,_e.months=Aj,_e.years=ej,_e.humanize=rj,_e.toISOString=bC,_e.toString=bC,_e.toJSON=bC,_e.locale=JU,_e.localeData=jU,_e.toIsoString=rr("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",bC),_e.lang=KU,ue("X",0,0,"unix"),ue("x",0,0,"valueOf"),qA("x",rC),qA("X",yL),yt("X",function(e,A,t){t._d=new Date(parseFloat(e)*1e3)}),yt("x",function(e,A,t){t._d=new Date(Oe(e))});//! moment.js
152
152
  XA.version="2.30.1",iL(Jt),XA.fn=xA,XA.min=jO,XA.max=qO,XA.now=_O,XA.utc=Ac,XA.unix=pK,XA.months=yK,XA.isDate=nw,XA.locale=Cg,XA.invalid=eC,XA.duration=jr,XA.isMoment=Jr,XA.weekdays=ZK,XA.parseZone=mK,XA.localeData=no,XA.isDuration=GC,XA.monthsShort=YK,XA.weekdaysMin=UK,XA.defineLocale=T0,XA.updateLocale=mO,XA.locales=yO,XA.weekdaysShort=kK,XA.normalizeUnits=ir,XA.relativeTimeRounding=aj,XA.relativeTimeThreshold=sj,XA.calendarFormat=IJ,XA.prototype=xA,XA.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const ij=({clinic:e="Supercare"})=>E.jsx("div",{children:E.jsxs("p",{className:"text-center text-supercare-grey-400 text-[13px]",children:["Š ",XA().format("Y")," â€ĸ ",e]})}),cj=()=>E.jsx("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:E.jsx("path",{d:"M0.999024 0.999999L5.99902 6L10.999 1",stroke:"black","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})}),oj=()=>{const{patient:e,organization:A}=kB(),t=A?.members?.[0],n=bs();return E.jsxs("div",{className:"border-t border-black flex text-sm justify-between py-2 px-6",children:[E.jsxs("p",{className:"text-supercare-grey-400 flex items-center gap-1 underline",children:[E.jsx(rL,{}),t?.user?.first_name," Š ",new Date().getFullYear()]}),E.jsxs("div",{className:"flex items-center gap-3",children:[E.jsx(ij,{clinic:e?.email?e?.email:""}),E.jsx("button",{onClick:()=>n("/"),children:E.jsx(cj,{})})]})]})},vC=({shape:e,ImageSrc:A,title:t,description:n,onClick:B,Icon:a,disabled:s})=>{const{settings:i}=kB();rz();const{IS_SMALL_SCREEN:o}=Th(),g=()=>{B&&B()};return E.jsx("div",{className:`relative before:absolute before:top-0 before:left-0 before:w-full before:h-full before:bg-[#f0f0f0] before:opacity-60 before:rounded-[10px] ${s?"before:z-10":"before:-z-10"}`,children:e=="circle"?E.jsxs("div",{children:[E.jsx(wB.div,{whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:15},onClick:g,className:`cursor-pointer mx-auto shadow-[0px_0px_4.42px_0px_#0000001A] border-[0.55px] border-[#C2C2C2] bg-white/70 ${o?"w-[78px] h-[78px]":"w-[83px] h-[83px]"} flex items-center justify-center rounded-full`,children:E.jsx("img",{src:A,alt:t})}),E.jsx("p",{className:`text-center ${o?"text-sm":"text-base"} pt-1`,children:t})]}):E.jsxs(wB.div,{whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:15},onClick:g,className:`cursor-pointer rounded-[10px] flex ${i?.use_branding?"border border-[#E3E3E3] bg-white":"bg-white/70"} ${n?"px-4 gap-2":"items-center justify-center gap-1 "} py-4 `,style:{boxShadow:i?.use_branding?"0px 0px 3.42px 0px #0000001C":"0px_0px_4.42px_0px_#0000001A"},children:[a,E.jsxs("div",{className:"flex flex-col",children:[E.jsx("p",{className:`${o?"text-sm":"text-base"} leading-[1]`,children:t}),n&&E.jsx("p",{className:`${o?"text-xs":"text-sm"} self-start text-center leading-[1.2] text-supercare-grey-500`,children:n})]})]})})};function uw(){return uw=Object.assign||function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},uw.apply(this,arguments)}function gj(e,A){if(e==null)return{};var t={},n=Object.keys(e),B,a;for(a=0;a<n.length;a++)B=n[a],!(A.indexOf(B)>=0)&&(t[B]=e[B]);return t}function _0(e,A){if(e==null)return{};var t=gj(e,A),n,B;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(B=0;B<a.length;B++)n=a[B],!(A.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}var lj=["variant","color","size"],dj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{fill:t,d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm2.79 10.53l-3.53 3.53c-.15.15-.34.22-.53.22s-.38-.07-.53-.22a.754.754 0 010-1.06l3-3-3-3a.754.754 0 010-1.06c.29-.29.77-.29 1.06 0l3.53 3.53c.3.29.3.77 0 1.06z"}))},uj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M4.87 4.99A9.936 9.936 0 002 12c0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-.69 0-1.36.07-2.02.2"}),O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10.74 15.53L14.26 12l-3.52-3.53"}))},Gj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{fill:t,d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z",opacity:".4"}),O.createElement("path",{fill:t,d:"M10.74 16.28c-.19 0-.38-.07-.53-.22a.754.754 0 010-1.06l3-3-3-3a.754.754 0 010-1.06c.29-.29.77-.29 1.06 0l3.53 3.53c.29.29.29.77 0 1.06l-3.53 3.53c-.15.15-.34.22-.53.22z"}))},cD=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"}),O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10.74 15.53L14.26 12l-3.52-3.53"}))},Qj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{fill:t,d:"M12 22.75C6.07 22.75 1.25 17.93 1.25 12S6.07 1.25 12 1.25 22.75 6.07 22.75 12 17.93 22.75 12 22.75zm0-20C6.9 2.75 2.75 6.9 2.75 12S6.9 21.25 12 21.25s9.25-4.15 9.25-9.25S17.1 2.75 12 2.75z"}),O.createElement("path",{fill:t,d:"M10.74 16.28c-.19 0-.38-.07-.53-.22a.754.754 0 010-1.06l3-3-3-3a.754.754 0 010-1.06c.29-.29.77-.29 1.06 0l3.53 3.53c.29.29.29.77 0 1.06l-3.53 3.53c-.15.15-.34.22-.53.22z"}))},wj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeMiterlimit:"10",strokeWidth:"1.5",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10z"}),O.createElement("path",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",d:"M10.74 15.53L14.26 12l-3.52-3.53",opacity:".4"}))},fj=function(A,t){switch(A){case"Bold":return O.createElement(dj,{color:t});case"Broken":return O.createElement(uj,{color:t});case"Bulk":return O.createElement(Gj,{color:t});case"Linear":return O.createElement(cD,{color:t});case"Outline":return O.createElement(Qj,{color:t});case"TwoTone":return O.createElement(wj,{color:t});default:return O.createElement(cD,{color:t})}},Gw=F.forwardRef(function(e,A){var t=e.variant,n=e.color,B=e.size,a=_0(e,lj);return O.createElement("svg",uw({},a,{xmlns:"http://www.w3.org/2000/svg",ref:A,width:B,height:B,viewBox:"0 0 24 24",fill:"none"}),fj(t,n))});Gw.propTypes={variant:LA.oneOf(["Linear","Bold","Broken","Bulk","Outline","TwoTone"]),color:LA.string,size:LA.oneOfType([LA.string,LA.number])},Gw.defaultProps={variant:"Linear",color:"currentColor",size:"24"},Gw.displayName="ArrowCircleRight";var hj=["variant","color","size"],Cj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2Zm4.78 7.7-5.67 5.67a.75.75 0 0 1-1.06 0l-2.83-2.83a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l2.3 2.3 5.14-5.14c.29-.29.77-.29 1.06 0 .29.29.29.76 0 1.06Z",fill:t}))},bj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M4 6c-1.25 1.67-2 3.75-2 6 0 5.52 4.48 10 10 10s10-4.48 10-10S17.52 2 12 2c-1.43 0-2.8.3-4.03.85M15 10.38l1.12-1.13",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{d:"m7.88 12 2.74 2.75 2.55-2.54",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},vj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{opacity:".4",d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z",fill:t}),O.createElement("path",{d:"M10.58 15.582a.75.75 0 0 1-.53-.22l-2.83-2.83a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l2.3 2.3 5.14-5.14c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06l-5.67 5.67a.75.75 0 0 1-.53.22Z",fill:t}))},oD=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{d:"m7.75 12 2.83 2.83 5.67-5.66",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},Ij=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M12 22.75C6.07 22.75 1.25 17.93 1.25 12S6.07 1.25 12 1.25 22.75 6.07 22.75 12 17.93 22.75 12 22.75Zm0-20C6.9 2.75 2.75 6.9 2.75 12S6.9 21.25 12 21.25s9.25-4.15 9.25-9.25S17.1 2.75 12 2.75Z",fill:t}),O.createElement("path",{d:"M10.58 15.582a.75.75 0 0 1-.53-.22l-2.83-2.83a.754.754 0 0 1 0-1.06c.29-.29.77-.29 1.06 0l2.3 2.3 5.14-5.14c.29-.29.77-.29 1.06 0 .29.29.29.77 0 1.06l-5.67 5.67a.75.75 0 0 1-.53.22Z",fill:t}))},Hj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M12 22c5.5 0 10-4.5 10-10S17.5 2 12 2 2 6.5 2 12s4.5 10 10 10Z",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:".34",d:"m7.75 12.002 2.83 2.83 5.67-5.66",stroke:t,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))},Ej=function(A,t){switch(A){case"Bold":return O.createElement(Cj,{color:t});case"Broken":return O.createElement(bj,{color:t});case"Bulk":return O.createElement(vj,{color:t});case"Linear":return O.createElement(oD,{color:t});case"Outline":return O.createElement(Ij,{color:t});case"TwoTone":return O.createElement(Hj,{color:t});default:return O.createElement(oD,{color:t})}},ad=F.forwardRef(function(e,A){var t=e.variant,n=e.color,B=e.size,a=_0(e,hj);return O.createElement("svg",uw({},a,{xmlns:"http://www.w3.org/2000/svg",ref:A,width:B,height:B,viewBox:"0 0 24 24",fill:"none"}),Ej(t,n))});ad.propTypes={variant:LA.oneOf(["Linear","Bold","Broken","Bulk","Outline","TwoTone"]),color:LA.string,size:LA.oneOfType([LA.string,LA.number])},ad.defaultProps={variant:"Linear",color:"currentColor",size:"24"},ad.displayName="TickCircle";var pj=["variant","color","size"],mj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M16.75 3.56V2c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-6.5V2c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.56c-2.7.25-4.01 1.86-4.21 4.25-.02.29.22.53.5.53h16.92c.29 0 .53-.25.5-.53-.2-2.39-1.51-4-4.21-4.25ZM20 9.84H4c-.55 0-1 .45-1 1V17c0 3 1.5 5 5 5h8c3.5 0 5-2 5-5v-6.16c0-.55-.45-1-1-1ZM9.21 18.21c-.05.04-.1.09-.15.12-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.13.02-.2.02-.13 0-.26-.03-.38-.08-.13-.05-.23-.12-.33-.21-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.1-.09.2-.16.33-.21.18-.08.38-.1.58-.06.06.01.12.03.18.06.06.02.12.05.18.09l.15.12c.18.19.29.45.29.71 0 .26-.11.52-.29.71Zm0-3.5c-.19.18-.45.29-.71.29-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.28-.28.72-.37 1.09-.21.13.05.24.12.33.21.18.19.29.45.29.71 0 .26-.11.52-.29.71Zm3.5 3.5c-.19.18-.45.29-.71.29-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.37-.37 1.05-.37 1.42 0 .18.19.29.45.29.71 0 .26-.11.52-.29.71Zm0-3.5-.15.12c-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.13.02-.2.02-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.09-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.18.19.29.45.29.71 0 .26-.11.52-.29.71Zm3.5 3.5c-.19.18-.45.29-.71.29-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.37-.37 1.05-.37 1.42 0 .18.19.29.45.29.71 0 .26-.11.52-.29.71Zm0-3.5-.15.12c-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.14.02-.2.02-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.1-.09.2-.16.33-.21.18-.08.38-.1.58-.06.06.01.12.03.18.06.06.02.12.05.18.09l.15.12c.18.19.29.45.29.71 0 .26-.11.52-.29.71Z",fill:t}))},yj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M8 2v3M16 2v3M3.5 9.09h17M3 13.01V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5",stroke:t,strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{d:"M15.694 13.7h.009M15.694 16.7h.009M11.995 13.7h.009M11.995 16.7h.009M8.295 13.7h.01M8.295 16.7h.01",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},Yj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M16.75 3.56V2c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.5h-6.5V2c0-.41-.34-.75-.75-.75s-.75.34-.75.75v1.56c-2.7.25-4.01 1.86-4.21 4.25-.02.29.22.53.5.53h16.92c.29 0 .53-.25.5-.53-.2-2.39-1.51-4-4.21-4.25Z",fill:t}),O.createElement("path",{opacity:".4",d:"M20 9.84c.55 0 1 .45 1 1V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5v-6.16c0-.55.45-1 1-1h16Z",fill:t}),O.createElement("path",{d:"M8.5 14.999c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.28-.28.72-.37 1.09-.21.13.05.24.12.33.21.18.19.29.45.29.71 0 .26-.11.52-.29.71-.19.18-.45.29-.71.29ZM12 14.999c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.09-.09.2-.16.33-.21.37-.16.81-.07 1.09.21.18.19.29.45.29.71 0 .26-.11.52-.29.71l-.15.12c-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.13.02-.2.02ZM15.5 15c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.1-.09.2-.16.33-.21.18-.08.38-.1.58-.06.06.01.12.03.18.06.06.02.12.05.18.09l.15.12c.18.19.29.45.29.71 0 .26-.11.52-.29.71l-.15.12c-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.14.02-.2.02ZM8.5 18.5c-.13 0-.26-.03-.38-.08-.13-.05-.23-.12-.33-.21-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.1-.09.2-.16.33-.21.18-.08.38-.1.58-.06.06.01.12.03.18.06.06.02.12.05.18.09l.15.12c.18.19.29.45.29.71 0 .26-.11.52-.29.71-.05.04-.1.09-.15.12-.06.04-.12.07-.18.09-.06.03-.12.05-.18.06-.07.01-.13.02-.2.02ZM12 18.5c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.37-.37 1.05-.37 1.42 0 .18.19.29.45.29.71 0 .26-.11.52-.29.71-.19.18-.45.29-.71.29ZM15.5 18.5c-.26 0-.52-.11-.71-.29-.18-.19-.29-.45-.29-.71 0-.26.11-.52.29-.71.37-.37 1.05-.37 1.42 0 .18.19.29.45.29.71 0 .26-.11.52-.29.71-.19.18-.45.29-.71.29Z",fill:t}))},gD=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M8 2v3M16 2v3M3.5 9.09h17M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z",stroke:t,strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{d:"M15.695 13.7h.009M15.695 16.7h.009M11.995 13.7h.01M11.995 16.7h.01M8.294 13.7h.01M8.294 16.7h.01",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},Zj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M8 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75ZM16 5.75c-.41 0-.75-.34-.75-.75V2c0-.41.34-.75.75-.75s.75.34.75.75v3c0 .41-.34.75-.75.75Z",fill:t}),O.createElement("path",{d:"M15 22.75H9c-5.62 0-6.75-2.65-6.75-6.93V9.65c0-4.74 1.6-6.67 5.71-6.9H16.04c4.11.23 5.71 2.16 5.71 6.9v6.17c0 4.28-1.13 6.93-6.75 6.93ZM8 4.25c-2.8.16-4.25 1.04-4.25 5.4v6.17c0 3.83.73 5.43 5.25 5.43h6c4.52 0 5.25-1.6 5.25-5.43V9.65c0-4.35-1.44-5.24-4.27-5.4H8Z",fill:t}),O.createElement("path",{d:"M20.75 18.352H3.25c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h17.5c.41 0 .75.34.75.75s-.34.75-.75.75ZM12 8.25c-1.23 0-2.27.67-2.27 1.97 0 .62.29 1.09.73 1.39-.61.36-.96.94-.96 1.62 0 1.24.95 2.01 2.5 2.01 1.54 0 2.5-.77 2.5-2.01 0-.68-.35-1.27-.97-1.62.45-.31.73-.77.73-1.39 0-1.3-1.03-1.97-2.26-1.97Zm0 2.84c-.52 0-.9-.31-.9-.8 0-.5.38-.79.9-.79s.9.29.9.79c0 .49-.38.8-.9.8ZM12 14c-.66 0-1.14-.33-1.14-.93 0-.6.48-.92 1.14-.92.66 0 1.14.33 1.14.92 0 .6-.48.93-1.14.93Z",fill:t}))},kj=function(A){var t=A.color;return O.createElement(O.Fragment,null,O.createElement("path",{d:"M8 2v3M16 2v3",stroke:t,strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:".4",d:"M3.5 9.09h17",stroke:t,strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{d:"M21 8.5V17c0 3-1.5 5-5 5H8c-3.5 0-5-2-5-5V8.5c0-3 1.5-5 5-5h8c3.5 0 5 2 5 5Z",stroke:t,strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),O.createElement("path",{opacity:".4",d:"M15.694 13.7h.009M15.694 16.7h.009M11.995 13.7h.009M11.995 16.7h.009M8.295 13.7h.01M8.295 16.7h.009",stroke:t,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))},Uj=function(A,t){switch(A){case"Bold":return O.createElement(mj,{color:t});case"Broken":return O.createElement(yj,{color:t});case"Bulk":return O.createElement(Yj,{color:t});case"Linear":return O.createElement(gD,{color:t});case"Outline":return O.createElement(Zj,{color:t});case"TwoTone":return O.createElement(kj,{color:t});default:return O.createElement(gD,{color:t})}},IC=F.forwardRef(function(e,A){var t=e.variant,n=e.color,B=e.size,a=_0(e,pj);return O.createElement("svg",uw({},a,{xmlns:"http://www.w3.org/2000/svg",ref:A,width:B,height:B,viewBox:"0 0 24 24",fill:"none"}),Uj(t,n))});IC.propTypes={variant:LA.oneOf(["Linear","Bold","Broken","Bulk","Outline","TwoTone"]),color:LA.string,size:LA.oneOfType([LA.string,LA.number])},IC.defaultProps={variant:"Linear",color:"currentColor",size:"24"},IC.displayName="Calendar";function Dj(e){try{return new URL(e).href}catch{return`https://${e.replace(/^\/+/,"")}`}}var lD={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dD=O.createContext&&O.createContext(lD),Fj=["attr","size","title"];function Pj(e,A){if(e==null)return{};var t=Mj(e,A),n,B;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(B=0;B<a.length;B++)n=a[B],!(A.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(t[n]=e[n])}return t}function Mj(e,A){if(e==null)return{};var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(A.indexOf(n)>=0)continue;t[n]=e[n]}return t}function HC(){return HC=Object.assign?Object.assign.bind():function(e){for(var A=1;A<arguments.length;A++){var t=arguments[A];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},HC.apply(this,arguments)}function uD(e,A){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);A&&(n=n.filter(function(B){return Object.getOwnPropertyDescriptor(e,B).enumerable})),t.push.apply(t,n)}return t}function EC(e){for(var A=1;A<arguments.length;A++){var t=arguments[A]!=null?arguments[A]:{};A%2?uD(Object(t),!0).forEach(function(n){xj(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):uD(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}function xj(e,A,t){return A=Tj(A),A in e?Object.defineProperty(e,A,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[A]=t,e}function Tj(e){var A=Rj(e,"string");return typeof A=="symbol"?A:A+""}function Rj(e,A){if(typeof e!="object"||!e)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var n=t.call(e,A);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(A==="string"?String:Number)(e)}function GD(e){return e&&e.map((A,t)=>O.createElement(A.tag,EC({key:t},A.attr),GD(A.child)))}function pC(e){return A=>O.createElement(Vj,HC({attr:EC({},e.attr)},A),GD(e.child))}function Vj(e){var A=t=>{var{attr:n,size:B,title:a}=e,s=Pj(e,Fj),i=B||t.size||"1em",o;return t.className&&(o=t.className),e.className&&(o=(o?o+" ":"")+e.className),O.createElement("svg",HC({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,n,s,{className:o,style:EC(EC({color:e.color||t.color},t.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&O.createElement("title",null,a),e.children)};return dD!==void 0?O.createElement(dD.Consumer,null,t=>A(t)):A(lD)}function Sj(e){return pC({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"M244 400 100 256l144-144M120 256h292"},child:[]}]})(e)}function Wj(e){return pC({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"48",d:"m268 112 144 144-144 144m124-144H100"},child:[]}]})(e)}function zj(e){return pC({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"m289.94 256 95-95A24 24 0 0 0 351 127l-95 95-95-95a24 24 0 0 0-34 34l95 95-95 95a24 24 0 1 0 34 34l95-95 95 95a24 24 0 0 0 34-34z"},child:[]}]})(e)}const vg=({size:e="md",color:A="primary",text:t,className:n=""})=>{const B={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"},a={primary:"border-black border-t-transparent",white:"border-white border-t-transparent",gray:"border-gray-400 border-t-transparent"};return E.jsxs("div",{className:`flex items-center gap-2 ${n}`,children:[E.jsx("div",{className:`${B[e]} ${a[A]} border-2 rounded-full animate-spin`}),t&&E.jsx("span",{className:`text-sm ${A==="white"?"text-white":"text-gray-600"}`,children:t})]})},Nj=({isLoading:e,text:A="Loading...",className:t=""})=>E.jsx("div",{className:`${t}`,children:e&&E.jsx("div",{className:"absolute inset-0 bg-white/80 backdrop-blur-sm flex items-center justify-center z-50",children:E.jsx("div",{className:"bg-white rounded-lg shadow-lg p-6 flex flex-col items-center gap-3",children:E.jsx(vg,{size:"lg",text:A})})})}),ro=({title:e,children:A,showback:t,className:n,rightComponent:B,backAction:a,hideTitle:s,nextPrevComponent:i,showMinMaxIcon:o,isLoading:g,loadingText:d,bgClassName:G="bg-white",fixHeight:f=!0})=>{const v=bs(),{settings:H}=kB(),y=MH(),{MAXED_WIDTH:Y,IS_SMALL_SCREEN:Z,screenWidth:P,screenHeight:x}=Th();return E.jsx("div",{style:{...P<1111&&H?.messenger_style=="modern"?{width:P-24}:{},maxWidth:H?.messenger_style=="classic"?GI:QI,marginInline:H?.messenger_style=="classic"?"12px":"",zIndex:999999999},className:`w-full border z-[99999999] border-black fixed bottom-3 ${H.messenger_style==="modern"?"left-1/2 -translate-x-1/2":"right-3"} ${G}`,children:E.jsxs("div",{className:"relative w-full z-[11]",children:[!s&&E.jsxs("div",{className:"border-b border-black p-4 flex items-center justify-between",children:[E.jsxs("div",{className:"flex gap-3 items-center",children:[!B&&(t||!i)&&E.jsx("button",{onClick:()=>{a?a():v(-1)},children:E.jsx(Gw,{size:20,color:"#fff",className:"bg-black text-white rounded-full -rotate-180"})}),i,!i&&E.jsx("h1",{className:"font_uxum text-[19px] font-bold",children:e})]}),i&&E.jsx("h1",{className:"font_uxum text-[19px] font-bold",children:e}),E.jsxs("div",{className:"flex items-center gap-2",children:[!Z&&o&&P>Y&&E.jsx("div",{className:`${H.maximized?"mb-[-8px]":""}`,children:H.maximized?E.jsx("button",{onClick:()=>y,children:E.jsx("img",{src:Vl.MINIMIZE_ICON,alt:""})}):E.jsx("button",{children:E.jsx("img",{src:Vl.MAXIMIZE_ICON,alt:""})})}),E.jsx("div",{className:"",children:B}),i?E.jsx("button",{onClick:()=>{a&&a()},children:E.jsx(zj,{size:20})}):E.jsx(E.Fragment,{})]})]}),E.jsx(Nj,{isLoading:g||!1,text:d}),E.jsx(wB.div,{initial:{height:f?!Z&&o&&H.maximized&&x>730?"40rem":"36rem":"auto"},animate:{height:f?!Z&&o&&H.maximized&&x>730?"42rem":"38rem":"auto"},transition:{duration:.1},className:`overflow-y-auto widget-scroll-container flex flex-col justify-between ${n}`,style:{scrollBehavior:"auto",overscrollBehavior:"contain",WebkitOverflowScrolling:"touch"},onWheel:V=>{V.stopPropagation()},onTouchMove:V=>{V.stopPropagation()},children:A}),E.jsx(oj,{})]})})},Xj=({imageSrc:e,index:A})=>{const{settings:t}=kB(),{IS_SMALL_SCREEN:n}=Th();return E.jsx("div",{style:{backgroundImage:`url(${e})`,backgroundSize:"cover",backgroundPosition:"center center",position:"relative",left:A*-15,zIndex:t?.brand_faces?.length-1-A,width:n?49:74,height:n?49:74},className:"size-[45px] rounded-full p-2"})},Lj=()=>{const{shades:e,tiles:A,settings:t,organization:n}=kB(),{IS_SMALL_SCREEN:B}=Th(),a=bs(),[s,i]=O.useState("");return E.jsx(ro,{title:!0,hideTitle:!0,bgClassName:t.use_branding?"":"brand-gradient",fixHeight:!1,children:E.jsx("div",{className:"relative z-[11]",children:E.jsxs("div",{className:"w-full relative",children:[E.jsx("div",{className:"absolute -top-4 right-4 flex items-center gap-1",children:E.jsxs("div",{className:"flex items-center gap-1 text-xs bg-white border border-black rounded-full px-2 py-0.5",children:[E.jsx("span",{className:"inline-block w-2 h-2 rounded-full bg-green-500"}),E.jsx("span",{children:"Online"})]})}),E.jsx("div",{className:"px-7 mt-8",children:E.jsxs("div",{className:"flex flex-col items-center",children:[E.jsxs("div",{className:"flex items-center",children:[E.jsx(gU,{color:t?.use_branding?n?.color:"black",size:"90"}),t.use_branding&&E.jsx("div",{className:"flex items-center relative -left-6.25",children:t?.brand_faces?.map((o,g)=>E.jsx(Xj,{imageSrc:o.url,index:g}))})]}),E.jsxs("h1",{className:"leading-[1] flex items-center justify-between font-[800] tracking-[-0.2px] font_uxum text-[30px]",style:t.use_branding?{color:n?.color}:{background:"linear-gradient(90deg, #FF907F 0%, #FF57CD 51.44%, #68A7FF 95.67%)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},children:[t?.pill_view_title," ",t?.pill_view_subtitle]}),E.jsxs("p",{className:"font_uxum font-normal",children:[t?.pop_view_title," ",t?.pop_view_subtitle]}),E.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-[474px] w-full",children:[E.jsxs("div",{className:"relative flex items-center mt-2.5 w-full",children:[E.jsx("input",{autoFocus:!B,style:{boxShadow:"0px_0px_4.42px_0px_#0000001A"},className:`py-3.5 pl-12 pr-24 outline-none w-full h-[55px] rounded-full shadow-[0px_0px_4.42px_0px_#0000001A] text-sm ${t?.use_branding?"border border-[#E3E3E3] bg-white":"bg-white/70"}`,type:"text",value:s,onChange:o=>i(o.target.value),placeholder:" Chat with me, ask anything",onKeyUp:o=>{o.key==="Enter"&&(Aa.setState({chats:{initialMessage:s}}),a("/chat"))}}),E.jsx("img",{src:Vl.AI_ASSISTANT_CHAT_ICON,alt:"Ela Chat",className:"absolute top-1/2 -translate-y-1/2 left-3.5"}),E.jsx("button",{className:"text-sm absolute right-3 top-1/2 -translate-y-1/2 hover:shadow-md transition-shadow text-white py-2 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",onClick:()=>{Aa.setState({chats:{initialMessage:s}}),a("/chat")},style:{backgroundColor:t?.use_branding?n?.color:"black"},children:"Ask me"})]}),E.jsxs("div",{className:"grid grid-cols-2 gap-2 my-2 w-full",children:[E.jsxs("div",{onClick:()=>{a("/clarity-call")},className:`w-full cursor-pointer ${t.use_branding?"border border-[#E3E3E3] bg-white":"bg-white/70"} rounded-full px-4 max-[545px]:px-2.5 py-3 flex items-center gap-1`,children:[E.jsx("img",{src:Vl.AI_ASSISTANT_TALK_ICON,alt:"Ela Talk"}),E.jsxs("div",{className:"leading-[15px]",children:[E.jsx("h1",{className:"max-[545px]:text-sm",children:"Talk"}),E.jsx("p",{className:"max-[545px]:text-xs text-sm text-supercare-grey-500",children:"Let's voice chat"})]})]}),E.jsxs("div",{onClick:()=>{a("/call-back")},className:`w-full cursor-pointer ${t.use_branding?"border border-[#E3E3E3] bg-white":"bg-white/70"} rounded-full px-4 max-[545px]:px-2.5 py-3 flex items-center gap-1`,children:[E.jsx("img",{src:Vl.AI_ASSISTANT__CALL_ICON,alt:"Ela Call"}),E.jsxs("div",{className:"leading-[15px]",children:[E.jsx("h1",{className:"max-[545px]:text-sm",children:"Call"}),E.jsx("p",{className:"max-[545px]:text-xs text-sm text-supercare-grey-500",children:"Let me call you"})]})]})]})]}),E.jsxs("div",{className:"max-w-[474px] w-full",children:[E.jsx("h1",{className:`text-sm relative mb-2 px-3 text-center font-medium
153
153
  before:absolute before:top-1/2 before:-translate-y-1/2 before:left-0 before:w-1/3 before:border-b before:border-dashed
154
- after:absolute after:top-1/2 after:-translate-y-1/2 after:right-0 after:w-1/3 after:border-b after:border-dashed`,children:"HELP YOURSELF"}),t.enable_book_membership_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Oj,{color:t.use_branding?n?.color:"black",size:"24"}),title:"Buy a membership",description:"Be a member",onClick:()=>a("/subscription-plans")}),E.jsxs("div",{className:`grid ${t.enable_book_appointment_widget&&t.enable_meet_and_greet_widget?"grid-cols-2":"grid-cols-1"} my-2 gap-2`,children:[t.enable_book_appointment_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(IC,{size:24,color:t.use_branding?n?.color:"black"}),title:"Appointment",description:"Book Instantly",onClick:()=>a("/appointment")}),t.enable_meet_and_greet_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Jj,{color:t.use_branding?n?.color:"black",size:"24"}),title:"Meet & Greet",description:"Book clinic tour",onClick:()=>a("/meet-and-greet")})]}),t.custom_widgets.length>0&&E.jsx("div",{className:"flex flex-col gap-y-2 mb-4",children:t.custom_widgets.map(o=>E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Kj,{color:t?.use_branding?n?.color:"black"}),title:o.title,description:o.sub_title,onClick:()=>{o.url&&(o.open_in_new_tab?window.open(Dj(o.url),"_blank"):a("/custom-widget",{state:{url:o.url,title:o.title,description:o.sub_title}}))}}))})]})]})})]})})})},Oj=({color:e="black",size:A=24})=>E.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:e,strokeWidth:"1.5"}),E.jsx("rect",{x:"6",y:"9",width:"6",height:"2",rx:"1",fill:e}),E.jsx("circle",{cx:"18",cy:"16",r:"1.5",fill:e})]}),Jj=({color:e="black",size:A=24})=>E.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M8 12l2 2 6-6",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),E.jsx("path",{d:"M4 19h16",stroke:e,strokeWidth:"1.5",strokeLinecap:"round"}),E.jsx("circle",{cx:"7",cy:"7",r:"2.5",stroke:e,strokeWidth:"1.5"}),E.jsx("circle",{cx:"17",cy:"7",r:"2.5",stroke:e,strokeWidth:"1.5"})]}),Kj=({color:e="black"})=>E.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M14 17H9M17 13H9M3 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V3C21 2.46957 20.7893 1.96086 20.4142 1.58579C20.0391 1.21071 19.5304 1 19 1H7C6.46957 1 5.96086 1.21071 5.58579 1.58579C5.21071 1.96086 5 2.46957 5 3V19C5 19.5304 4.78929 20.0391 4.41421 20.4142C4.03914 20.7893 3.53043 21 3 21ZM3 21C2.46957 21 1.96086 20.7893 1.58579 20.4142C1.21071 20.0391 1 19.5304 1 19V10C1 9.46957 1.21071 8.96086 1.58579 8.58579C1.96086 8.21071 2.46957 8 3 8H5",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),E.jsx("path",{d:"M16 5H10C9.44772 5 9 5.44772 9 6V8C9 8.55228 9.44772 9 10 9H16C16.5523 9 17 8.55228 17 8V6C17 5.44772 16.5523 5 16 5Z",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),jj=({input:e=1})=>{const[A,t]=F.useState([1]),n=35;F.useEffect(()=>{B();const a=setInterval(()=>{B()},100);return()=>clearInterval(a)},[]);const B=()=>{const a=[];for(let s=0;s<n;s++)a.push(Math.max(4,Number(Math.floor(Math.random()*20)+2)*e));t(a)};return E.jsx("div",{className:"flex gap-1 justify-evenly items-center h-4",children:A.map((a,s)=>E.jsx("div",{style:{height:`${a}px`,transition:"height 0.1s ease"},className:"w-1 bg-black"},s))})};function qj(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var B=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,B.get?B:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var _j=Object.defineProperty,$j=(e,A,t)=>A in e?_j(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,QD=(e,A,t)=>$j(e,typeof A!="symbol"?A+"":A,t);let Ca=class{constructor(){QD(this,"_locking"),QD(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(B=>A=()=>{this._locks-=1,B()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function Hn(e,A){if(!e)throw new Error(A)}const A6=34028234663852886e22,e6=-34028234663852886e22,t6=4294967295,n6=2147483647,B6=-2147483648;function mC(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>n6||e<B6)throw new Error("invalid int 32: "+e)}function $0(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>t6||e<0)throw new Error("invalid uint 32: "+e)}function wD(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>A6||e<e6))throw new Error("invalid float 32: "+e)}const fD=Symbol("@bufbuild/protobuf/enum-type");function a6(e){const A=e[fD];return Hn(A,"missing enum type on enum object"),A}function hD(e,A,t,n){e[fD]=CD(A,t.map(B=>({no:B.no,name:B.name,localName:e[B.no]})))}function CD(e,A,t){const n=Object.create(null),B=Object.create(null),a=[];for(const s of A){const i=bD(s);a.push(i),n[s.name]=i,B[s.no]=i}return{typeName:e,values:a,findName(s){return n[s]},findNumber(s){return B[s]}}}function s6(e,A,t){const n={};for(const B of A){const a=bD(B);n[a.localName]=a.no,n[a.no]=a.localName}return hD(n,e,A),n}function bD(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class AE{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),B=n.runtime.bin,a=B.makeReadOptions(t);return B.readMessage(this,a.readerFactory(A),A.byteLength,a),this}fromJson(A,t){const n=this.getType(),B=n.runtime.json,a=B.makeReadOptions(t);return B.readMessage(n,A,a,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(B){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(B instanceof Error?B.message:String(B)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,B=n.makeWriteOptions(A),a=B.writerFactory();return n.writeMessage(this,a,B),a.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,B=n.makeWriteOptions(A);return n.writeMessage(this,B)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function r6(e,A,t,n){var B;const a=(B=n?.localName)!==null&&B!==void 0?B:A.substring(A.lastIndexOf(".")+1),s={[a]:function(i){e.util.initFields(this),e.util.initPartial(i,this)}}[a];return Object.setPrototypeOf(s.prototype,new AE),Object.assign(s,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(i,o){return new s().fromBinary(i,o)},fromJson(i,o){return new s().fromJson(i,o)},fromJsonString(i,o){return new s().fromJsonString(i,o)},equals(i,o){return e.util.equals(s,i,o)}}),s}function i6(){let e=0,A=0;for(let n=0;n<28;n+=7){let B=this.buf[this.pos++];if(e|=(B&127)<<n,(B&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let B=this.buf[this.pos++];if(A|=(B&127)<<n,(B&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function eE(e,A,t){for(let a=0;a<28;a=a+7){const s=e>>>a,i=!(!(s>>>7)&&A==0),o=(i?s|128:s)&255;if(t.push(o),!i)return}const n=e>>>28&15|(A&7)<<4,B=A>>3!=0;if(t.push((B?n|128:n)&255),!!B){for(let a=3;a<31;a=a+7){const s=A>>>a,i=!!(s>>>7),o=(i?s|128:s)&255;if(t.push(o),!i)return}t.push(A>>>31&1)}}const yC=4294967296;function vD(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,B=0;function a(s,i){const o=Number(e.slice(s,i));B*=t,n=n*t+o,n>=yC&&(B=B+(n/yC|0),n=n%yC)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),A?HD(n,B):tE(n,B)}function c6(e,A){let t=tE(e,A);const n=t.hi&2147483648;n&&(t=HD(t.lo,t.hi));const B=ID(t.lo,t.hi);return n?"-"+B:B}function ID(e,A){if({lo:e,hi:A}=o6(e,A),A<=2097151)return String(yC*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,B=A>>16&65535;let a=t+n*6777216+B*6710656,s=n+B*8147497,i=B*2;const o=1e7;return a>=o&&(s+=Math.floor(a/o),a%=o),s>=o&&(i+=Math.floor(s/o),s%=o),i.toString()+ED(s)+ED(a)}function o6(e,A){return{lo:e>>>0,hi:A>>>0}}function tE(e,A){return{lo:e|0,hi:A|0}}function HD(e,A){return A=~A,e?e=~e+1:A+=1,tE(e,A)}const ED=e=>{const A=String(e);return"0000000".slice(A.length)+A};function pD(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function g6(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function l6(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const B=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),s=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(o){const g=typeof o=="bigint"?o:BigInt(o);if(g>a||g<B)throw new Error("int64 invalid: ".concat(o));return g},uParse(o){const g=typeof o=="bigint"?o:BigInt(o);if(g>i||g<s)throw new Error("uint64 invalid: ".concat(o));return g},enc(o){return e.setBigInt64(0,this.parse(o),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(o){return e.setBigInt64(0,this.uParse(o),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(o,g){return e.setInt32(0,o,!0),e.setInt32(4,g,!0),e.getBigInt64(0,!0)},uDec(o,g){return e.setInt32(0,o,!0),e.setInt32(4,g,!0),e.getBigUint64(0,!0)}}}const t=B=>Hn(/^-?[0-9]+$/.test(B),"int64 invalid: ".concat(B)),n=B=>Hn(/^[0-9]+$/.test(B),"uint64 invalid: ".concat(B));return{zero:"0",supported:!1,parse(B){return typeof B!="string"&&(B=B.toString()),t(B),B},uParse(B){return typeof B!="string"&&(B=B.toString()),n(B),B},enc(B){return typeof B!="string"&&(B=B.toString()),t(B),vD(B)},uEnc(B){return typeof B!="string"&&(B=B.toString()),n(B),vD(B)},dec(B,a){return c6(B,a)},uDec(B,a){return ID(B,a)}}}const an=l6();var YA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(YA||(YA={}));var Ig;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(Ig||(Ig={}));function Hg(e,A,t){if(A===t)return!0;if(e==YA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case YA.UINT64:case YA.FIXED64:case YA.INT64:case YA.SFIXED64:case YA.SINT64:return A==t}return!1}function Ju(e,A){switch(e){case YA.BOOL:return!1;case YA.UINT64:case YA.FIXED64:case YA.INT64:case YA.SFIXED64:case YA.SINT64:return A==0?an.zero:"0";case YA.DOUBLE:case YA.FLOAT:return 0;case YA.BYTES:return new Uint8Array(0);case YA.STRING:return"";default:return 0}}function mD(e,A){switch(e){case YA.BOOL:return A===!1;case YA.STRING:return A==="";case YA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var Rn;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(Rn||(Rn={}));class d6{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let B=0;B<this.chunks.length;B++)A+=this.chunks[B].length;let t=new Uint8Array(A),n=0;for(let B=0;B<this.chunks.length;B++)t.set(this.chunks[B],n),n+=this.chunks[B].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for($0(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return mC(A),pD(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){wD(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){$0(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){mC(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return mC(A),A=(A<<1^A>>31)>>>0,pD(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),B=an.enc(A);return n.setInt32(0,B.lo,!0),n.setInt32(4,B.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),B=an.uEnc(A);return n.setInt32(0,B.lo,!0),n.setInt32(4,B.hi,!0),this.raw(t)}int64(A){let t=an.enc(A);return eE(t.lo,t.hi,this.buf),this}sint64(A){let t=an.enc(A),n=t.hi>>31,B=t.lo<<1^n,a=(t.hi<<1|t.lo>>>31)^n;return eE(B,a,this.buf),this}uint64(A){let t=an.uEnc(A);return eE(t.lo,t.hi,this.buf),this}}class u6{constructor(A,t){this.varint64=i6,this.uint32=g6,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case Rn.Varint:for(;this.buf[this.pos++]&128;);break;case Rn.Bit64:this.pos+=4;case Rn.Bit32:this.pos+=4;break;case Rn.LengthDelimited:let B=this.uint32();this.pos+=B;break;case Rn.StartGroup:for(;;){const[a,s]=this.tag();if(s===Rn.EndGroup){if(t!==void 0&&a!==t)throw new Error("invalid end group tag");break}this.skip(s,a)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return an.dec(...this.varint64())}uint64(){return an.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,an.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return an.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return an.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function G6(e,A,t,n){let B;return{typeName:A,extendee:t,get field(){if(!B){const a=typeof n=="function"?n():n;a.name=A.split(".").pop(),a.jsonName="[".concat(A,"]"),B=e.util.newFieldList([a]).list()[0]}return B},runtime:e}}function yD(e){const A=e.field.localName,t=Object.create(null);return t[A]=Q6(e),[t,()=>t[A]]}function Q6(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return Ju(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function w6(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let io="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),YC=[];for(let e=0;e<io.length;e++)YC[io[e].charCodeAt(0)]=e;YC[45]=io.indexOf("+"),YC[95]=io.indexOf("/");const YD={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,B=0,a,s=0;for(let i=0;i<e.length;i++){if(a=YC[e.charCodeAt(i)],a===void 0)switch(e[i]){case"=":B=0;case`
154
+ after:absolute after:top-1/2 after:-translate-y-1/2 after:right-0 after:w-1/3 after:border-b after:border-dashed`,children:"HELP YOURSELF"}),t.enable_book_membership_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Oj,{color:t.use_branding?n?.color:"black",size:"24"}),title:"Buy a membership",description:"Be a member",onClick:()=>a("/subscription")}),E.jsxs("div",{className:`grid ${t.enable_book_appointment_widget&&t.enable_meet_and_greet_widget?"grid-cols-2":"grid-cols-1"} my-2 gap-2`,children:[t.enable_book_appointment_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(IC,{size:24,color:t.use_branding?n?.color:"black"}),title:"Appointment",description:"Book Instantly",onClick:()=>a("/appointment")}),t.enable_meet_and_greet_widget&&E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Jj,{color:t.use_branding?n?.color:"black",size:"24"}),title:"Meet & Greet",description:"Book clinic tour",onClick:()=>a("/meet-and-greet")})]}),t.custom_widgets.length>0&&E.jsx("div",{className:"flex flex-col gap-y-2 mb-4",children:t.custom_widgets.map(o=>E.jsx(vC,{shape:"rectangle",Icon:E.jsx(Kj,{color:t?.use_branding?n?.color:"black"}),title:o.title,description:o.sub_title,onClick:()=>{o.url&&(o.open_in_new_tab?window.open(Dj(o.url),"_blank"):a("/custom-widget",{state:{url:o.url,title:o.title,description:o.sub_title}}))}}))})]})]})})]})})})},Oj=({color:e="black",size:A=24})=>E.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2",stroke:e,strokeWidth:"1.5"}),E.jsx("rect",{x:"6",y:"9",width:"6",height:"2",rx:"1",fill:e}),E.jsx("circle",{cx:"18",cy:"16",r:"1.5",fill:e})]}),Jj=({color:e="black",size:A=24})=>E.jsxs("svg",{width:A,height:A,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M8 12l2 2 6-6",stroke:e,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),E.jsx("path",{d:"M4 19h16",stroke:e,strokeWidth:"1.5",strokeLinecap:"round"}),E.jsx("circle",{cx:"7",cy:"7",r:"2.5",stroke:e,strokeWidth:"1.5"}),E.jsx("circle",{cx:"17",cy:"7",r:"2.5",stroke:e,strokeWidth:"1.5"})]}),Kj=({color:e="black"})=>E.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("path",{d:"M14 17H9M17 13H9M3 21H19C19.5304 21 20.0391 20.7893 20.4142 20.4142C20.7893 20.0391 21 19.5304 21 19V3C21 2.46957 20.7893 1.96086 20.4142 1.58579C20.0391 1.21071 19.5304 1 19 1H7C6.46957 1 5.96086 1.21071 5.58579 1.58579C5.21071 1.96086 5 2.46957 5 3V19C5 19.5304 4.78929 20.0391 4.41421 20.4142C4.03914 20.7893 3.53043 21 3 21ZM3 21C2.46957 21 1.96086 20.7893 1.58579 20.4142C1.21071 20.0391 1 19.5304 1 19V10C1 9.46957 1.21071 8.96086 1.58579 8.58579C1.96086 8.21071 2.46957 8 3 8H5",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}),E.jsx("path",{d:"M16 5H10C9.44772 5 9 5.44772 9 6V8C9 8.55228 9.44772 9 10 9H16C16.5523 9 17 8.55228 17 8V6C17 5.44772 16.5523 5 16 5Z",stroke:e,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"})]}),jj=({input:e=1})=>{const[A,t]=F.useState([1]),n=35;F.useEffect(()=>{B();const a=setInterval(()=>{B()},100);return()=>clearInterval(a)},[]);const B=()=>{const a=[];for(let s=0;s<n;s++)a.push(Math.max(4,Number(Math.floor(Math.random()*20)+2)*e));t(a)};return E.jsx("div",{className:"flex gap-1 justify-evenly items-center h-4",children:A.map((a,s)=>E.jsx("div",{style:{height:`${a}px`,transition:"height 0.1s ease"},className:"w-1 bg-black"},s))})};function qj(e,A){return A.forEach(function(t){t&&typeof t!="string"&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if(n!=="default"&&!(n in e)){var B=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,B.get?B:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var _j=Object.defineProperty,$j=(e,A,t)=>A in e?_j(e,A,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[A]=t,QD=(e,A,t)=>$j(e,typeof A!="symbol"?A+"":A,t);let Ca=class{constructor(){QD(this,"_locking"),QD(this,"_locks"),this._locking=Promise.resolve(),this._locks=0}isLocked(){return this._locks>0}lock(){this._locks+=1;let A;const t=new Promise(B=>A=()=>{this._locks-=1,B()}),n=this._locking.then(()=>A);return this._locking=this._locking.then(()=>t),n}};function Hn(e,A){if(!e)throw new Error(A)}const A6=34028234663852886e22,e6=-34028234663852886e22,t6=4294967295,n6=2147483647,B6=-2147483648;function mC(e){if(typeof e!="number")throw new Error("invalid int 32: "+typeof e);if(!Number.isInteger(e)||e>n6||e<B6)throw new Error("invalid int 32: "+e)}function $0(e){if(typeof e!="number")throw new Error("invalid uint 32: "+typeof e);if(!Number.isInteger(e)||e>t6||e<0)throw new Error("invalid uint 32: "+e)}function wD(e){if(typeof e!="number")throw new Error("invalid float 32: "+typeof e);if(Number.isFinite(e)&&(e>A6||e<e6))throw new Error("invalid float 32: "+e)}const fD=Symbol("@bufbuild/protobuf/enum-type");function a6(e){const A=e[fD];return Hn(A,"missing enum type on enum object"),A}function hD(e,A,t,n){e[fD]=CD(A,t.map(B=>({no:B.no,name:B.name,localName:e[B.no]})))}function CD(e,A,t){const n=Object.create(null),B=Object.create(null),a=[];for(const s of A){const i=bD(s);a.push(i),n[s.name]=i,B[s.no]=i}return{typeName:e,values:a,findName(s){return n[s]},findNumber(s){return B[s]}}}function s6(e,A,t){const n={};for(const B of A){const a=bD(B);n[a.localName]=a.no,n[a.no]=a.localName}return hD(n,e,A),n}function bD(e){return"localName"in e?e:Object.assign(Object.assign({},e),{localName:e.name})}class AE{equals(A){return this.getType().runtime.util.equals(this.getType(),this,A)}clone(){return this.getType().runtime.util.clone(this)}fromBinary(A,t){const n=this.getType(),B=n.runtime.bin,a=B.makeReadOptions(t);return B.readMessage(this,a.readerFactory(A),A.byteLength,a),this}fromJson(A,t){const n=this.getType(),B=n.runtime.json,a=B.makeReadOptions(t);return B.readMessage(n,A,a,this),this}fromJsonString(A,t){let n;try{n=JSON.parse(A)}catch(B){throw new Error("cannot decode ".concat(this.getType().typeName," from JSON: ").concat(B instanceof Error?B.message:String(B)))}return this.fromJson(n,t)}toBinary(A){const t=this.getType(),n=t.runtime.bin,B=n.makeWriteOptions(A),a=B.writerFactory();return n.writeMessage(this,a,B),a.finish()}toJson(A){const t=this.getType(),n=t.runtime.json,B=n.makeWriteOptions(A);return n.writeMessage(this,B)}toJsonString(A){var t;const n=this.toJson(A);return JSON.stringify(n,null,(t=A?.prettySpaces)!==null&&t!==void 0?t:0)}toJSON(){return this.toJson({emitDefaultValues:!0})}getType(){return Object.getPrototypeOf(this).constructor}}function r6(e,A,t,n){var B;const a=(B=n?.localName)!==null&&B!==void 0?B:A.substring(A.lastIndexOf(".")+1),s={[a]:function(i){e.util.initFields(this),e.util.initPartial(i,this)}}[a];return Object.setPrototypeOf(s.prototype,new AE),Object.assign(s,{runtime:e,typeName:A,fields:e.util.newFieldList(t),fromBinary(i,o){return new s().fromBinary(i,o)},fromJson(i,o){return new s().fromJson(i,o)},fromJsonString(i,o){return new s().fromJsonString(i,o)},equals(i,o){return e.util.equals(s,i,o)}}),s}function i6(){let e=0,A=0;for(let n=0;n<28;n+=7){let B=this.buf[this.pos++];if(e|=(B&127)<<n,(B&128)==0)return this.assertBounds(),[e,A]}let t=this.buf[this.pos++];if(e|=(t&15)<<28,A=(t&112)>>4,(t&128)==0)return this.assertBounds(),[e,A];for(let n=3;n<=31;n+=7){let B=this.buf[this.pos++];if(A|=(B&127)<<n,(B&128)==0)return this.assertBounds(),[e,A]}throw new Error("invalid varint")}function eE(e,A,t){for(let a=0;a<28;a=a+7){const s=e>>>a,i=!(!(s>>>7)&&A==0),o=(i?s|128:s)&255;if(t.push(o),!i)return}const n=e>>>28&15|(A&7)<<4,B=A>>3!=0;if(t.push((B?n|128:n)&255),!!B){for(let a=3;a<31;a=a+7){const s=A>>>a,i=!!(s>>>7),o=(i?s|128:s)&255;if(t.push(o),!i)return}t.push(A>>>31&1)}}const yC=4294967296;function vD(e){const A=e[0]==="-";A&&(e=e.slice(1));const t=1e6;let n=0,B=0;function a(s,i){const o=Number(e.slice(s,i));B*=t,n=n*t+o,n>=yC&&(B=B+(n/yC|0),n=n%yC)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),A?HD(n,B):tE(n,B)}function c6(e,A){let t=tE(e,A);const n=t.hi&2147483648;n&&(t=HD(t.lo,t.hi));const B=ID(t.lo,t.hi);return n?"-"+B:B}function ID(e,A){if({lo:e,hi:A}=o6(e,A),A<=2097151)return String(yC*A+e);const t=e&16777215,n=(e>>>24|A<<8)&16777215,B=A>>16&65535;let a=t+n*6777216+B*6710656,s=n+B*8147497,i=B*2;const o=1e7;return a>=o&&(s+=Math.floor(a/o),a%=o),s>=o&&(i+=Math.floor(s/o),s%=o),i.toString()+ED(s)+ED(a)}function o6(e,A){return{lo:e>>>0,hi:A>>>0}}function tE(e,A){return{lo:e|0,hi:A|0}}function HD(e,A){return A=~A,e?e=~e+1:A+=1,tE(e,A)}const ED=e=>{const A=String(e);return"0000000".slice(A.length)+A};function pD(e,A){if(e>=0){for(;e>127;)A.push(e&127|128),e=e>>>7;A.push(e)}else{for(let t=0;t<9;t++)A.push(e&127|128),e=e>>7;A.push(1)}}function g6(){let e=this.buf[this.pos++],A=e&127;if((e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<7,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<14,(e&128)==0)return this.assertBounds(),A;if(e=this.buf[this.pos++],A|=(e&127)<<21,(e&128)==0)return this.assertBounds(),A;e=this.buf[this.pos++],A|=(e&15)<<28;for(let t=5;(e&128)!==0&&t<10;t++)e=this.buf[this.pos++];if((e&128)!=0)throw new Error("invalid varint");return this.assertBounds(),A>>>0}function l6(){const e=new DataView(new ArrayBuffer(8));if(typeof BigInt=="function"&&typeof e.getBigInt64=="function"&&typeof e.getBigUint64=="function"&&typeof e.setBigInt64=="function"&&typeof e.setBigUint64=="function"&&(typeof process!="object"||typeof process.env!="object"||process.env.BUF_BIGINT_DISABLE!=="1")){const B=BigInt("-9223372036854775808"),a=BigInt("9223372036854775807"),s=BigInt("0"),i=BigInt("18446744073709551615");return{zero:BigInt(0),supported:!0,parse(o){const g=typeof o=="bigint"?o:BigInt(o);if(g>a||g<B)throw new Error("int64 invalid: ".concat(o));return g},uParse(o){const g=typeof o=="bigint"?o:BigInt(o);if(g>i||g<s)throw new Error("uint64 invalid: ".concat(o));return g},enc(o){return e.setBigInt64(0,this.parse(o),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},uEnc(o){return e.setBigInt64(0,this.uParse(o),!0),{lo:e.getInt32(0,!0),hi:e.getInt32(4,!0)}},dec(o,g){return e.setInt32(0,o,!0),e.setInt32(4,g,!0),e.getBigInt64(0,!0)},uDec(o,g){return e.setInt32(0,o,!0),e.setInt32(4,g,!0),e.getBigUint64(0,!0)}}}const t=B=>Hn(/^-?[0-9]+$/.test(B),"int64 invalid: ".concat(B)),n=B=>Hn(/^[0-9]+$/.test(B),"uint64 invalid: ".concat(B));return{zero:"0",supported:!1,parse(B){return typeof B!="string"&&(B=B.toString()),t(B),B},uParse(B){return typeof B!="string"&&(B=B.toString()),n(B),B},enc(B){return typeof B!="string"&&(B=B.toString()),t(B),vD(B)},uEnc(B){return typeof B!="string"&&(B=B.toString()),n(B),vD(B)},dec(B,a){return c6(B,a)},uDec(B,a){return ID(B,a)}}}const an=l6();var YA;(function(e){e[e.DOUBLE=1]="DOUBLE",e[e.FLOAT=2]="FLOAT",e[e.INT64=3]="INT64",e[e.UINT64=4]="UINT64",e[e.INT32=5]="INT32",e[e.FIXED64=6]="FIXED64",e[e.FIXED32=7]="FIXED32",e[e.BOOL=8]="BOOL",e[e.STRING=9]="STRING",e[e.BYTES=12]="BYTES",e[e.UINT32=13]="UINT32",e[e.SFIXED32=15]="SFIXED32",e[e.SFIXED64=16]="SFIXED64",e[e.SINT32=17]="SINT32",e[e.SINT64=18]="SINT64"})(YA||(YA={}));var Ig;(function(e){e[e.BIGINT=0]="BIGINT",e[e.STRING=1]="STRING"})(Ig||(Ig={}));function Hg(e,A,t){if(A===t)return!0;if(e==YA.BYTES){if(!(A instanceof Uint8Array)||!(t instanceof Uint8Array)||A.length!==t.length)return!1;for(let n=0;n<A.length;n++)if(A[n]!==t[n])return!1;return!0}switch(e){case YA.UINT64:case YA.FIXED64:case YA.INT64:case YA.SFIXED64:case YA.SINT64:return A==t}return!1}function Ju(e,A){switch(e){case YA.BOOL:return!1;case YA.UINT64:case YA.FIXED64:case YA.INT64:case YA.SFIXED64:case YA.SINT64:return A==0?an.zero:"0";case YA.DOUBLE:case YA.FLOAT:return 0;case YA.BYTES:return new Uint8Array(0);case YA.STRING:return"";default:return 0}}function mD(e,A){switch(e){case YA.BOOL:return A===!1;case YA.STRING:return A==="";case YA.BYTES:return A instanceof Uint8Array&&!A.byteLength;default:return A==0}}var Rn;(function(e){e[e.Varint=0]="Varint",e[e.Bit64=1]="Bit64",e[e.LengthDelimited=2]="LengthDelimited",e[e.StartGroup=3]="StartGroup",e[e.EndGroup=4]="EndGroup",e[e.Bit32=5]="Bit32"})(Rn||(Rn={}));class d6{constructor(A){this.stack=[],this.textEncoder=A??new TextEncoder,this.chunks=[],this.buf=[]}finish(){this.chunks.push(new Uint8Array(this.buf));let A=0;for(let B=0;B<this.chunks.length;B++)A+=this.chunks[B].length;let t=new Uint8Array(A),n=0;for(let B=0;B<this.chunks.length;B++)t.set(this.chunks[B],n),n+=this.chunks[B].length;return this.chunks=[],t}fork(){return this.stack.push({chunks:this.chunks,buf:this.buf}),this.chunks=[],this.buf=[],this}join(){let A=this.finish(),t=this.stack.pop();if(!t)throw new Error("invalid state, fork stack empty");return this.chunks=t.chunks,this.buf=t.buf,this.uint32(A.byteLength),this.raw(A)}tag(A,t){return this.uint32((A<<3|t)>>>0)}raw(A){return this.buf.length&&(this.chunks.push(new Uint8Array(this.buf)),this.buf=[]),this.chunks.push(A),this}uint32(A){for($0(A);A>127;)this.buf.push(A&127|128),A=A>>>7;return this.buf.push(A),this}int32(A){return mC(A),pD(A,this.buf),this}bool(A){return this.buf.push(A?1:0),this}bytes(A){return this.uint32(A.byteLength),this.raw(A)}string(A){let t=this.textEncoder.encode(A);return this.uint32(t.byteLength),this.raw(t)}float(A){wD(A);let t=new Uint8Array(4);return new DataView(t.buffer).setFloat32(0,A,!0),this.raw(t)}double(A){let t=new Uint8Array(8);return new DataView(t.buffer).setFloat64(0,A,!0),this.raw(t)}fixed32(A){$0(A);let t=new Uint8Array(4);return new DataView(t.buffer).setUint32(0,A,!0),this.raw(t)}sfixed32(A){mC(A);let t=new Uint8Array(4);return new DataView(t.buffer).setInt32(0,A,!0),this.raw(t)}sint32(A){return mC(A),A=(A<<1^A>>31)>>>0,pD(A,this.buf),this}sfixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),B=an.enc(A);return n.setInt32(0,B.lo,!0),n.setInt32(4,B.hi,!0),this.raw(t)}fixed64(A){let t=new Uint8Array(8),n=new DataView(t.buffer),B=an.uEnc(A);return n.setInt32(0,B.lo,!0),n.setInt32(4,B.hi,!0),this.raw(t)}int64(A){let t=an.enc(A);return eE(t.lo,t.hi,this.buf),this}sint64(A){let t=an.enc(A),n=t.hi>>31,B=t.lo<<1^n,a=(t.hi<<1|t.lo>>>31)^n;return eE(B,a,this.buf),this}uint64(A){let t=an.uEnc(A);return eE(t.lo,t.hi,this.buf),this}}class u6{constructor(A,t){this.varint64=i6,this.uint32=g6,this.buf=A,this.len=A.length,this.pos=0,this.view=new DataView(A.buffer,A.byteOffset,A.byteLength),this.textDecoder=t??new TextDecoder}tag(){let A=this.uint32(),t=A>>>3,n=A&7;if(t<=0||n<0||n>5)throw new Error("illegal tag: field no "+t+" wire type "+n);return[t,n]}skip(A,t){let n=this.pos;switch(A){case Rn.Varint:for(;this.buf[this.pos++]&128;);break;case Rn.Bit64:this.pos+=4;case Rn.Bit32:this.pos+=4;break;case Rn.LengthDelimited:let B=this.uint32();this.pos+=B;break;case Rn.StartGroup:for(;;){const[a,s]=this.tag();if(s===Rn.EndGroup){if(t!==void 0&&a!==t)throw new Error("invalid end group tag");break}this.skip(s,a)}break;default:throw new Error("cant skip wire type "+A)}return this.assertBounds(),this.buf.subarray(n,this.pos)}assertBounds(){if(this.pos>this.len)throw new RangeError("premature EOF")}int32(){return this.uint32()|0}sint32(){let A=this.uint32();return A>>>1^-(A&1)}int64(){return an.dec(...this.varint64())}uint64(){return an.uDec(...this.varint64())}sint64(){let[A,t]=this.varint64(),n=-(A&1);return A=(A>>>1|(t&1)<<31)^n,t=t>>>1^n,an.dec(A,t)}bool(){let[A,t]=this.varint64();return A!==0||t!==0}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return an.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return an.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let A=this.uint32(),t=this.pos;return this.pos+=A,this.assertBounds(),this.buf.subarray(t,t+A)}string(){return this.textDecoder.decode(this.bytes())}}function G6(e,A,t,n){let B;return{typeName:A,extendee:t,get field(){if(!B){const a=typeof n=="function"?n():n;a.name=A.split(".").pop(),a.jsonName="[".concat(A,"]"),B=e.util.newFieldList([a]).list()[0]}return B},runtime:e}}function yD(e){const A=e.field.localName,t=Object.create(null);return t[A]=Q6(e),[t,()=>t[A]]}function Q6(e){const A=e.field;if(A.repeated)return[];if(A.default!==void 0)return A.default;switch(A.kind){case"enum":return A.T.values[0].no;case"scalar":return Ju(A.T,A.L);case"message":const t=A.T,n=new t;return t.fieldWrapper?t.fieldWrapper.unwrapField(n):n;case"map":throw"map fields are not allowed to be extensions"}}function w6(e,A){if(!A.repeated&&(A.kind=="enum"||A.kind=="scalar")){for(let t=e.length-1;t>=0;--t)if(e[t].no==A.no)return[e[t]];return[]}return e.filter(t=>t.no===A.no)}let io="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),YC=[];for(let e=0;e<io.length;e++)YC[io[e].charCodeAt(0)]=e;YC[45]=io.indexOf("+"),YC[95]=io.indexOf("/");const YD={dec(e){let A=e.length*3/4;e[e.length-2]=="="?A-=2:e[e.length-1]=="="&&(A-=1);let t=new Uint8Array(A),n=0,B=0,a,s=0;for(let i=0;i<e.length;i++){if(a=YC[e.charCodeAt(i)],a===void 0)switch(e[i]){case"=":B=0;case`
155
155
  `:case"\r":case" ":case" ":continue;default:throw Error("invalid base64 string.")}switch(B){case 0:s=a,B=1;break;case 1:t[n++]=s<<2|(a&48)>>4,s=a,B=2;break;case 2:t[n++]=(s&15)<<4|(a&60)>>2,s=a,B=3;break;case 3:t[n++]=(s&3)<<6|a,B=0;break}}if(B==1)throw Error("invalid base64 string.");return t.subarray(0,n)},enc(e){let A="",t=0,n,B=0;for(let a=0;a<e.length;a++)switch(n=e[a],t){case 0:A+=io[n>>2],B=(n&3)<<4,t=1;break;case 1:A+=io[B|n>>4],B=(n&15)<<2,t=2;break;case 2:A+=io[B|n>>6],A+=io[n&63],t=0;break}return t&&(A+=io[B],A+="=",t==1&&(A+="=")),A}};function f6(e,A,t){kD(A,e);const n=A.runtime.bin.makeReadOptions(t),B=w6(e.getType().runtime.bin.listUnknownFields(e),A.field),[a,s]=yD(A);for(const i of B)A.runtime.bin.readField(a,n.readerFactory(i.data),A.field,i.wireType,n);return s()}function h6(e,A,t,n){kD(A,e);const B=A.runtime.bin.makeReadOptions(n),a=A.runtime.bin.makeWriteOptions(n);if(ZD(e,A)){const g=e.getType().runtime.bin.listUnknownFields(e).filter(d=>d.no!=A.field.no);e.getType().runtime.bin.discardUnknownFields(e);for(const d of g)e.getType().runtime.bin.onUnknownField(e,d.no,d.wireType,d.data)}const s=a.writerFactory();let i=A.field;!i.opt&&!i.repeated&&(i.kind=="enum"||i.kind=="scalar")&&(i=Object.assign(Object.assign({},A.field),{opt:!0})),A.runtime.bin.writeField(i,t,s,a);const o=B.readerFactory(s.finish());for(;o.pos<o.len;){const[g,d]=o.tag(),G=o.skip(d,g);e.getType().runtime.bin.onUnknownField(e,g,d,G)}}function ZD(e,A){const t=e.getType();return A.extendee.typeName===t.typeName&&!!t.runtime.bin.listUnknownFields(e).find(n=>n.no==A.field.no)}function kD(e,A){Hn(e.extendee.typeName==A.getType().typeName,"extension ".concat(e.typeName," can only be applied to message ").concat(e.extendee.typeName))}function UD(e,A){const t=e.localName;if(e.repeated)return A[t].length>0;if(e.oneof)return A[e.oneof.localName].case===t;switch(e.kind){case"enum":case"scalar":return e.opt||e.req?A[t]!==void 0:e.kind=="enum"?A[t]!==e.T.values[0].no:!mD(e.T,A[t]);case"message":return A[t]!==void 0;case"map":return Object.keys(A[t]).length>0}}function DD(e,A){const t=e.localName,n=!e.opt&&!e.req;if(e.repeated)A[t]=[];else if(e.oneof)A[e.oneof.localName]={case:void 0};else switch(e.kind){case"map":A[t]={};break;case"enum":A[t]=n?e.T.values[0].no:void 0;break;case"scalar":A[t]=n?Ju(e.T,e.L):void 0;break;case"message":A[t]=void 0;break}}function co(e,A){if(e===null||typeof e!="object"||!Object.getOwnPropertyNames(AE.prototype).every(n=>n in e&&typeof e[n]=="function"))return!1;const t=e.getType();return t===null||typeof t!="function"||!("typeName"in t)||typeof t.typeName!="string"?!1:A===void 0?!0:t.typeName==A.typeName}function FD(e,A){return co(A)||!e.fieldWrapper?A:e.fieldWrapper.wrapField(A)}YA.DOUBLE,YA.FLOAT,YA.INT64,YA.UINT64,YA.INT32,YA.UINT32,YA.BOOL,YA.STRING,YA.BYTES;const PD={ignoreUnknownFields:!1},MD={emitDefaultValues:!1,enumAsInteger:!1,useProtoFieldName:!1,prettySpaces:0};function C6(e){return e?Object.assign(Object.assign({},PD),e):PD}function b6(e){return e?Object.assign(Object.assign({},MD),e):MD}const ZC=Symbol(),kC=Symbol();function v6(){return{makeReadOptions:C6,makeWriteOptions:b6,readMessage(e,A,t,n){if(A==null||Array.isArray(A)||typeof A!="object")throw new Error("cannot decode message ".concat(e.typeName," from JSON: ").concat(Bc(A)));n=n??new e;const B=new Map,a=t.typeRegistry;for(const[s,i]of Object.entries(A)){const o=e.fields.findJsonName(s);if(o){if(o.oneof){if(i===null&&o.kind=="scalar")continue;const g=B.get(o.oneof);if(g!==void 0)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: multiple keys for oneof "').concat(o.oneof.name,'" present: "').concat(g,'", "').concat(s,'"'));B.set(o.oneof,s)}xD(n,i,o,t,e)}else{let g=!1;if(a?.findExtension&&s.startsWith("[")&&s.endsWith("]")){const d=a.findExtension(s.substring(1,s.length-1));if(d&&d.extendee.typeName==e.typeName){g=!0;const[G,f]=yD(d);xD(G,i,d.field,t,d),h6(n,d,f(),t)}}if(!g&&!t.ignoreUnknownFields)throw new Error("cannot decode message ".concat(e.typeName,' from JSON: key "').concat(s,'" is unknown'))}}return n},writeMessage(e,A){const t=e.getType(),n={};let B;try{for(B of t.fields.byNumber()){if(!UD(B,e)){if(B.req)throw"required field not set";if(!A.emitDefaultValues||!H6(B))continue}const s=B.oneof?e[B.oneof.localName].value:e[B.localName],i=TD(B,s,A);i!==void 0&&(n[A.useProtoFieldName?B.name:B.jsonName]=i)}const a=A.typeRegistry;if(a?.findExtensionFor)for(const s of t.runtime.bin.listUnknownFields(e)){const i=a.findExtensionFor(t.typeName,s.no);if(i&&ZD(e,i)){const o=f6(e,i,A),g=TD(i.field,o,A);g!==void 0&&(n[i.field.jsonName]=g)}}}catch(a){const s=B?"cannot encode field ".concat(t.typeName,".").concat(B.name," to JSON"):"cannot encode message ".concat(t.typeName," to JSON"),i=a instanceof Error?a.message:String(a);throw new Error(s+(i.length>0?": ".concat(i):""))}return n},readScalar(e,A,t){return Qw(e,A,t??Ig.BIGINT,!0)},writeScalar(e,A,t){if(A!==void 0&&(t||mD(e,A)))return UC(e,A)},debug:Bc}}function Bc(e){if(e===null)return"null";switch(typeof e){case"object":return Array.isArray(e)?"array":"object";case"string":return e.length>100?"string":'"'.concat(e.split('"').join('\\"'),'"');default:return String(e)}}function xD(e,A,t,n,B){let a=t.localName;if(t.repeated){if(Hn(t.kind!="map"),A===null)return;if(!Array.isArray(A))throw new Error("cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(A)));const s=e[a];for(const i of A){if(i===null)throw new Error("cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(i)));switch(t.kind){case"message":s.push(t.T.fromJson(i,n));break;case"enum":const o=nE(t.T,i,n.ignoreUnknownFields,!0);o!==kC&&s.push(o);break;case"scalar":try{s.push(Qw(t.T,i,t.L,!0))}catch(g){let d="cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(i));throw g instanceof Error&&g.message.length>0&&(d+=": ".concat(g.message)),new Error(d)}break}}}else if(t.kind=="map"){if(A===null)return;if(typeof A!="object"||Array.isArray(A))throw new Error("cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(A)));const s=e[a];for(const[i,o]of Object.entries(A)){if(o===null)throw new Error("cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: map value null"));let g;try{g=I6(t.K,i)}catch(d){let G="cannot decode map key for field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(A));throw d instanceof Error&&d.message.length>0&&(G+=": ".concat(d.message)),new Error(G)}switch(t.V.kind){case"message":s[g]=t.V.T.fromJson(o,n);break;case"enum":const d=nE(t.V.T,o,n.ignoreUnknownFields,!0);d!==kC&&(s[g]=d);break;case"scalar":try{s[g]=Qw(t.V.T,o,Ig.BIGINT,!0)}catch(G){let f="cannot decode map value for field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(A));throw G instanceof Error&&G.message.length>0&&(f+=": ".concat(G.message)),new Error(f)}break}}}else switch(t.oneof&&(e=e[t.oneof.localName]={case:a},a="value"),t.kind){case"message":const s=t.T;if(A===null&&s.typeName!="google.protobuf.Value")return;let i=e[a];co(i)?i.fromJson(A,n):(e[a]=i=s.fromJson(A,n),s.fieldWrapper&&!t.oneof&&(e[a]=s.fieldWrapper.unwrapField(i)));break;case"enum":const o=nE(t.T,A,n.ignoreUnknownFields,!1);switch(o){case ZC:DD(t,e);break;case kC:break;default:e[a]=o;break}break;case"scalar":try{const g=Qw(t.T,A,t.L,!1);switch(g){case ZC:DD(t,e);break;default:e[a]=g;break}}catch(g){let d="cannot decode field ".concat(B.typeName,".").concat(t.name," from JSON: ").concat(Bc(A));throw g instanceof Error&&g.message.length>0&&(d+=": ".concat(g.message)),new Error(d)}break}}function I6(e,A){if(e===YA.BOOL)switch(A){case"true":A=!0;break;case"false":A=!1;break}return Qw(e,A,Ig.BIGINT,!0).toString()}function Qw(e,A,t,n){if(A===null)return n?Ju(e,t):ZC;switch(e){case YA.DOUBLE:case YA.FLOAT:if(A==="NaN")return Number.NaN;if(A==="Infinity")return Number.POSITIVE_INFINITY;if(A==="-Infinity")return Number.NEGATIVE_INFINITY;if(A===""||typeof A=="string"&&A.trim().length!==A.length||typeof A!="string"&&typeof A!="number")break;const B=Number(A);if(Number.isNaN(B)||!Number.isFinite(B))break;return e==YA.FLOAT&&wD(B),B;case YA.INT32:case YA.FIXED32:case YA.SFIXED32:case YA.SINT32:case YA.UINT32:let a;if(typeof A=="number"?a=A:typeof A=="string"&&A.length>0&&A.trim().length===A.length&&(a=Number(A)),a===void 0)break;return e==YA.UINT32||e==YA.FIXED32?$0(a):mC(a),a;case YA.INT64:case YA.SFIXED64:case YA.SINT64:if(typeof A!="number"&&typeof A!="string")break;const s=an.parse(A);return t?s.toString():s;case YA.FIXED64:case YA.UINT64:if(typeof A!="number"&&typeof A!="string")break;const i=an.uParse(A);return t?i.toString():i;case YA.BOOL:if(typeof A!="boolean")break;return A;case YA.STRING:if(typeof A!="string")break;try{encodeURIComponent(A)}catch{throw new Error("invalid UTF8")}return A;case YA.BYTES:if(A==="")return new Uint8Array(0);if(typeof A!="string")break;return YD.dec(A)}throw new Error}function nE(e,A,t,n){if(A===null)return e.typeName=="google.protobuf.NullValue"?0:n?e.values[0].no:ZC;switch(typeof A){case"number":if(Number.isInteger(A))return A;break;case"string":const B=e.findName(A);if(B!==void 0)return B.no;if(t)return kC;break}throw new Error("cannot decode enum ".concat(e.typeName," from JSON: ").concat(Bc(A)))}function H6(e){return e.repeated||e.kind=="map"?!0:!(e.oneof||e.kind=="message"||e.opt||e.req)}function TD(e,A,t){if(e.kind=="map"){Hn(typeof A=="object"&&A!=null);const n={},B=Object.entries(A);switch(e.V.kind){case"scalar":for(const[s,i]of B)n[s.toString()]=UC(e.V.T,i);break;case"message":for(const[s,i]of B)n[s.toString()]=i.toJson(t);break;case"enum":const a=e.V.T;for(const[s,i]of B)n[s.toString()]=BE(a,i,t.enumAsInteger);break}return t.emitDefaultValues||B.length>0?n:void 0}if(e.repeated){Hn(Array.isArray(A));const n=[];switch(e.kind){case"scalar":for(let B=0;B<A.length;B++)n.push(UC(e.T,A[B]));break;case"enum":for(let B=0;B<A.length;B++)n.push(BE(e.T,A[B],t.enumAsInteger));break;case"message":for(let B=0;B<A.length;B++)n.push(A[B].toJson(t));break}return t.emitDefaultValues||n.length>0?n:void 0}switch(e.kind){case"scalar":return UC(e.T,A);case"enum":return BE(e.T,A,t.enumAsInteger);case"message":return FD(e.T,A).toJson(t)}}function BE(e,A,t){var n;if(Hn(typeof A=="number"),e.typeName=="google.protobuf.NullValue")return null;if(t)return A;const B=e.findNumber(A);return(n=B?.name)!==null&&n!==void 0?n:A}function UC(e,A){switch(e){case YA.INT32:case YA.SFIXED32:case YA.SINT32:case YA.FIXED32:case YA.UINT32:return Hn(typeof A=="number"),A;case YA.FLOAT:case YA.DOUBLE:return Hn(typeof A=="number"),Number.isNaN(A)?"NaN":A===Number.POSITIVE_INFINITY?"Infinity":A===Number.NEGATIVE_INFINITY?"-Infinity":A;case YA.STRING:return Hn(typeof A=="string"),A;case YA.BOOL:return Hn(typeof A=="boolean"),A;case YA.UINT64:case YA.FIXED64:case YA.INT64:case YA.SFIXED64:case YA.SINT64:return Hn(typeof A=="bigint"||typeof A=="string"||typeof A=="number"),A.toString();case YA.BYTES:return Hn(A instanceof Uint8Array),YD.enc(A)}}const Ku=Symbol("@bufbuild/protobuf/unknown-fields"),RD={readUnknownFields:!0,readerFactory:e=>new u6(e)},VD={writeUnknownFields:!0,writerFactory:()=>new d6};function E6(e){return e?Object.assign(Object.assign({},RD),e):RD}function p6(e){return e?Object.assign(Object.assign({},VD),e):VD}function m6(){return{makeReadOptions:E6,makeWriteOptions:p6,listUnknownFields(e){var A;return(A=e[Ku])!==null&&A!==void 0?A:[]},discardUnknownFields(e){delete e[Ku]},writeUnknownFields(e,A){const n=e[Ku];if(n)for(const B of n)A.tag(B.no,B.wireType).raw(B.data)},onUnknownField(e,A,t,n){const B=e;Array.isArray(B[Ku])||(B[Ku]=[]),B[Ku].push({no:A,wireType:t,data:n})},readMessage(e,A,t,n,B){const a=e.getType(),s=B?A.len:A.pos+t;let i,o;for(;A.pos<s&&([i,o]=A.tag(),!(B===!0&&o==Rn.EndGroup));){const g=a.fields.find(i);if(!g){const d=A.skip(o,i);n.readUnknownFields&&this.onUnknownField(e,i,o,d);continue}SD(e,A,g,o,n)}if(B&&(o!=Rn.EndGroup||i!==t))throw new Error("invalid end group tag")},readField:SD,writeMessage(e,A,t){const n=e.getType();for(const B of n.fields.byNumber()){if(!UD(B,e)){if(B.req)throw new Error("cannot encode field ".concat(n.typeName,".").concat(B.name," to binary: required field not set"));continue}const a=B.oneof?e[B.oneof.localName].value:e[B.localName];WD(B,a,A,t)}return t.writeUnknownFields&&this.writeUnknownFields(e,A),A},writeField(e,A,t,n){A!==void 0&&WD(e,A,t,n)}}}function SD(e,A,t,n,B){let{repeated:a,localName:s}=t;switch(t.oneof&&(e=e[t.oneof.localName],e.case!=s&&delete e.value,e.case=s,s="value"),t.kind){case"scalar":case"enum":const i=t.kind=="enum"?YA.INT32:t.T;let o=FC;if(t.kind=="scalar"&&t.L>0&&(o=Y6),a){let f=e[s];if(n==Rn.LengthDelimited&&i!=YA.STRING&&i!=YA.BYTES){let H=A.uint32()+A.pos;for(;A.pos<H;)f.push(o(A,i))}else f.push(o(A,i))}else e[s]=o(A,i);break;case"message":const g=t.T;a?e[s].push(DC(A,new g,B,t)):co(e[s])?DC(A,e[s],B,t):(e[s]=DC(A,new g,B,t),g.fieldWrapper&&!t.oneof&&!t.repeated&&(e[s]=g.fieldWrapper.unwrapField(e[s])));break;case"map":let[d,G]=y6(t,A,B);e[s][d]=G;break}}function DC(e,A,t,n){const B=A.getType().runtime.bin,a=n?.delimited;return B.readMessage(A,e,a?n.no:e.uint32(),t,a),A}function y6(e,A,t){const n=A.uint32(),B=A.pos+n;let a,s;for(;A.pos<B;){const[i]=A.tag();switch(i){case 1:a=FC(A,e.K);break;case 2:switch(e.V.kind){case"scalar":s=FC(A,e.V.T);break;case"enum":s=A.int32();break;case"message":s=DC(A,new e.V.T,t,void 0);break}break}}if(a===void 0&&(a=Ju(e.K,Ig.BIGINT)),typeof a!="string"&&typeof a!="number"&&(a=a.toString()),s===void 0)switch(e.V.kind){case"scalar":s=Ju(e.V.T,Ig.BIGINT);break;case"enum":s=e.V.T.values[0].no;break;case"message":s=new e.V.T;break}return[a,s]}function Y6(e,A){const t=FC(e,A);return typeof t=="bigint"?t.toString():t}function FC(e,A){switch(A){case YA.STRING:return e.string();case YA.BOOL:return e.bool();case YA.DOUBLE:return e.double();case YA.FLOAT:return e.float();case YA.INT32:return e.int32();case YA.INT64:return e.int64();case YA.UINT64:return e.uint64();case YA.FIXED64:return e.fixed64();case YA.BYTES:return e.bytes();case YA.FIXED32:return e.fixed32();case YA.SFIXED32:return e.sfixed32();case YA.SFIXED64:return e.sfixed64();case YA.SINT64:return e.sint64();case YA.UINT32:return e.uint32();case YA.SINT32:return e.sint32()}}function WD(e,A,t,n){Hn(A!==void 0);const B=e.repeated;switch(e.kind){case"scalar":case"enum":let a=e.kind=="enum"?YA.INT32:e.T;if(B)if(Hn(Array.isArray(A)),e.packed)k6(t,a,e.no,A);else for(const s of A)ww(t,a,e.no,s);else ww(t,a,e.no,A);break;case"message":if(B){Hn(Array.isArray(A));for(const s of A)zD(t,n,e,s)}else zD(t,n,e,A);break;case"map":Hn(typeof A=="object"&&A!=null);for(const[s,i]of Object.entries(A))Z6(t,n,e,s,i);break}}function Z6(e,A,t,n,B){e.tag(t.no,Rn.LengthDelimited),e.fork();let a=n;switch(t.K){case YA.INT32:case YA.FIXED32:case YA.UINT32:case YA.SFIXED32:case YA.SINT32:a=Number.parseInt(n);break;case YA.BOOL:Hn(n=="true"||n=="false"),a=n=="true";break}switch(ww(e,t.K,1,a),t.V.kind){case"scalar":ww(e,t.V.T,2,B);break;case"enum":ww(e,YA.INT32,2,B);break;case"message":Hn(B!==void 0),e.tag(2,Rn.LengthDelimited).bytes(B.toBinary(A));break}e.join()}function zD(e,A,t,n){const B=FD(t.T,n);t.delimited?e.tag(t.no,Rn.StartGroup).raw(B.toBinary(A)).tag(t.no,Rn.EndGroup):e.tag(t.no,Rn.LengthDelimited).bytes(B.toBinary(A))}function ww(e,A,t,n){Hn(n!==void 0);let[B,a]=ND(A);e.tag(t,B)[a](n)}function k6(e,A,t,n){if(!n.length)return;e.tag(t,Rn.LengthDelimited).fork();let[,B]=ND(A);for(let a=0;a<n.length;a++)e[B](n[a]);e.join()}function ND(e){let A=Rn.Varint;switch(e){case YA.BYTES:case YA.STRING:A=Rn.LengthDelimited;break;case YA.DOUBLE:case YA.FIXED64:case YA.SFIXED64:A=Rn.Bit64;break;case YA.FIXED32:case YA.SFIXED32:case YA.FLOAT:A=Rn.Bit32;break}const t=YA[e].toLowerCase();return[A,t]}function U6(){return{setEnumType:hD,initPartial(e,A){if(e===void 0)return;const t=A.getType();for(const n of t.fields.byMember()){const B=n.localName,a=A,s=e;if(s[B]!=null)switch(n.kind){case"oneof":const i=s[B].case;if(i===void 0)continue;const o=n.findField(i);let g=s[B].value;o&&o.kind=="message"&&!co(g,o.T)?g=new o.T(g):o&&o.kind==="scalar"&&o.T===YA.BYTES&&(g=fw(g)),a[B]={case:i,value:g};break;case"scalar":case"enum":let d=s[B];n.T===YA.BYTES&&(d=n.repeated?d.map(fw):fw(d)),a[B]=d;break;case"map":switch(n.V.kind){case"scalar":case"enum":if(n.V.T===YA.BYTES)for(const[v,H]of Object.entries(s[B]))a[B][v]=fw(H);else Object.assign(a[B],s[B]);break;case"message":const f=n.V.T;for(const v of Object.keys(s[B])){let H=s[B][v];f.fieldWrapper||(H=new f(H)),a[B][v]=H}break}break;case"message":const G=n.T;if(n.repeated)a[B]=s[B].map(f=>co(f,G)?f:new G(f));else{const f=s[B];G.fieldWrapper?G.typeName==="google.protobuf.BytesValue"?a[B]=fw(f):a[B]=f:a[B]=co(f,G)?f:new G(f)}break}}},equals(e,A,t){return A===t?!0:!A||!t?!1:e.fields.byMember().every(n=>{const B=A[n.localName],a=t[n.localName];if(n.repeated){if(B.length!==a.length)return!1;switch(n.kind){case"message":return B.every((s,i)=>n.T.equals(s,a[i]));case"scalar":return B.every((s,i)=>Hg(n.T,s,a[i]));case"enum":return B.every((s,i)=>Hg(YA.INT32,s,a[i]))}throw new Error("repeated cannot contain ".concat(n.kind))}switch(n.kind){case"message":let s=B,i=a;return n.T.fieldWrapper&&(s!==void 0&&!co(s)&&(s=n.T.fieldWrapper.wrapField(s)),i!==void 0&&!co(i)&&(i=n.T.fieldWrapper.wrapField(i))),n.T.equals(s,i);case"enum":return Hg(YA.INT32,B,a);case"scalar":return Hg(n.T,B,a);case"oneof":if(B.case!==a.case)return!1;const o=n.findField(B.case);if(o===void 0)return!0;switch(o.kind){case"message":return o.T.equals(B.value,a.value);case"enum":return Hg(YA.INT32,B.value,a.value);case"scalar":return Hg(o.T,B.value,a.value)}throw new Error("oneof cannot contain ".concat(o.kind));case"map":const g=Object.keys(B).concat(Object.keys(a));switch(n.V.kind){case"message":const d=n.V.T;return g.every(f=>d.equals(B[f],a[f]));case"enum":return g.every(f=>Hg(YA.INT32,B[f],a[f]));case"scalar":const G=n.V.T;return g.every(f=>Hg(G,B[f],a[f]))}break}})},clone(e){const A=e.getType(),t=new A,n=t;for(const B of A.fields.byMember()){const a=e[B.localName];let s;if(B.repeated)s=a.map(PC);else if(B.kind=="map"){s=n[B.localName];for(const[i,o]of Object.entries(a))s[i]=PC(o)}else B.kind=="oneof"?s=B.findField(a.case)?{case:a.case,value:PC(a.value)}:{case:void 0}:s=PC(a);n[B.localName]=s}for(const B of A.runtime.bin.listUnknownFields(e))A.runtime.bin.onUnknownField(n,B.no,B.wireType,B.data);return t}}}function PC(e){if(e===void 0)return e;if(co(e))return e.clone();if(e instanceof Uint8Array){const A=new Uint8Array(e.byteLength);return A.set(e),A}return e}function fw(e){return e instanceof Uint8Array?e:new Uint8Array(e)}function D6(e,A,t){return{syntax:e,json:v6(),bin:m6(),util:Object.assign(Object.assign({},U6()),{newFieldList:A,initFields:t}),makeMessageType(n,B,a){return r6(this,n,B,a)},makeEnum:s6,makeEnumType:CD,getEnumType:a6,makeExtension(n,B,a){return G6(this,n,B,a)}}}class F6{constructor(A,t){this._fields=A,this._normalizer=t}findJsonName(A){if(!this.jsonNames){const t={};for(const n of this.list())t[n.jsonName]=t[n.name]=n;this.jsonNames=t}return this.jsonNames[A]}find(A){if(!this.numbers){const t={};for(const n of this.list())t[n.no]=n;this.numbers=t}return this.numbers[A]}list(){return this.all||(this.all=this._normalizer(this._fields)),this.all}byNumber(){return this.numbersAsc||(this.numbersAsc=this.list().concat().sort((A,t)=>A.no-t.no)),this.numbersAsc}byMember(){if(!this.members){this.members=[];const A=this.members;let t;for(const n of this.list())n.oneof?n.oneof!==t&&(t=n.oneof,A.push(t)):A.push(n)}return this.members}}function XD(e,A){const t=LD(e);return A?t:V6(R6(t))}function P6(e){return XD(e,!1)}const M6=LD;function LD(e){let A=!1;const t=[];for(let n=0;n<e.length;n++){let B=e.charAt(n);switch(B){case"_":A=!0;break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":t.push(B),A=!1;break;default:A&&(A=!1,B=B.toUpperCase()),t.push(B);break}}return t.join("")}const x6=new Set(["constructor","toString","toJSON","valueOf"]),T6=new Set(["getType","clone","equals","fromBinary","fromJson","fromJsonString","toBinary","toJson","toJsonString","toObject"]),OD=e=>"".concat(e,"$"),R6=e=>T6.has(e)?OD(e):e,V6=e=>x6.has(e)?OD(e):e;class S6{constructor(A){this.kind="oneof",this.repeated=!1,this.packed=!1,this.opt=!1,this.req=!1,this.default=void 0,this.fields=[],this.name=A,this.localName=P6(A)}addField(A){Hn(A.oneof===this,"field ".concat(A.name," not one of ").concat(this.name)),this.fields.push(A)}findField(A){if(!this._lookup){this._lookup=Object.create(null);for(let t=0;t<this.fields.length;t++)this._lookup[this.fields[t].localName]=this.fields[t]}return this._lookup[A]}}function W6(e,A){var t,n,B,a,s,i;const o=[];let g;for(const d of typeof e=="function"?e():e){const G=d;if(G.localName=XD(d.name,d.oneof!==void 0),G.jsonName=(t=d.jsonName)!==null&&t!==void 0?t:M6(d.name),G.repeated=(n=d.repeated)!==null&&n!==void 0?n:!1,d.kind=="scalar"&&(G.L=(B=d.L)!==null&&B!==void 0?B:Ig.BIGINT),G.delimited=(a=d.delimited)!==null&&a!==void 0?a:!1,G.req=(s=d.req)!==null&&s!==void 0?s:!1,G.opt=(i=d.opt)!==null&&i!==void 0?i:!1,d.packed===void 0&&(G.packed=d.kind=="enum"||d.kind=="scalar"&&d.T!=YA.BYTES&&d.T!=YA.STRING),d.oneof!==void 0){const f=typeof d.oneof=="string"?d.oneof:d.oneof.name;(!g||g.name!=f)&&(g=new S6(f)),G.oneof=g,g.addField(G)}o.push(G)}return o}const GA=D6("proto3",e=>new F6(e,A=>W6(A)),e=>{for(const A of e.getType().fields.byMember()){if(A.opt)continue;const t=A.localName,n=e;if(A.repeated){n[t]=[];continue}switch(A.kind){case"oneof":n[t]={case:void 0};break;case"enum":n[t]=0;break;case"map":n[t]={};break;case"scalar":n[t]=Ju(A.T,A.L);break}}});class Ka extends AE{constructor(A){super(),this.seconds=an.zero,this.nanos=0,GA.util.initPartial(A,this)}fromJson(A,t){if(typeof A!="string")throw new Error("cannot decode google.protobuf.Timestamp from JSON: ".concat(GA.json.debug(A)));const n=A.match(/^([0-9]{4})-([0-9]{2})-([0-9]{2})T([0-9]{2}):([0-9]{2}):([0-9]{2})(?:Z|\.([0-9]{3,9})Z|([+-][0-9][0-9]:[0-9][0-9]))$/);if(!n)throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");const B=Date.parse(n[1]+"-"+n[2]+"-"+n[3]+"T"+n[4]+":"+n[5]+":"+n[6]+(n[8]?n[8]:"Z"));if(Number.isNaN(B))throw new Error("cannot decode google.protobuf.Timestamp from JSON: invalid RFC 3339 string");if(B<Date.parse("0001-01-01T00:00:00Z")||B>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot decode message google.protobuf.Timestamp from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");return this.seconds=an.parse(B/1e3),this.nanos=0,n[7]&&(this.nanos=parseInt("1"+n[7]+"0".repeat(9-n[7].length))-1e9),this}toJson(A){const t=Number(this.seconds)*1e3;if(t<Date.parse("0001-01-01T00:00:00Z")||t>Date.parse("9999-12-31T23:59:59Z"))throw new Error("cannot encode google.protobuf.Timestamp to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive");if(this.nanos<0)throw new Error("cannot encode google.protobuf.Timestamp to JSON: nanos must not be negative");let n="Z";if(this.nanos>0){const B=(this.nanos+1e9).toString().substring(1);B.substring(3)==="000000"?n="."+B.substring(0,3)+"Z":B.substring(6)==="000"?n="."+B.substring(0,6)+"Z":n="."+B+"Z"}return new Date(t).toISOString().replace(".000Z",n)}toDate(){return new Date(Number(this.seconds)*1e3+Math.ceil(this.nanos/1e6))}static now(){return Ka.fromDate(new Date)}static fromDate(A){const t=A.getTime();return new Ka({seconds:an.parse(Math.floor(t/1e3)),nanos:t%1e3*1e6})}static fromBinary(A,t){return new Ka().fromBinary(A,t)}static fromJson(A,t){return new Ka().fromJson(A,t)}static fromJsonString(A,t){return new Ka().fromJsonString(A,t)}static equals(A,t){return GA.util.equals(Ka,A,t)}}Ka.runtime=GA,Ka.typeName="google.protobuf.Timestamp",Ka.fields=GA.util.newFieldList(()=>[{no:1,name:"seconds",kind:"scalar",T:3},{no:2,name:"nanos",kind:"scalar",T:5}]);const z6=GA.makeMessageType("livekit.MetricsBatch",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:Ka},{no:3,name:"str_data",kind:"scalar",T:9,repeated:!0},{no:4,name:"time_series",kind:"message",T:N6,repeated:!0},{no:5,name:"events",kind:"message",T:L6,repeated:!0}]),N6=GA.makeMessageType("livekit.TimeSeriesMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"samples",kind:"message",T:X6,repeated:!0},{no:5,name:"rid",kind:"scalar",T:13}]),X6=GA.makeMessageType("livekit.MetricSample",()=>[{no:1,name:"timestamp_ms",kind:"scalar",T:3},{no:2,name:"normalized_timestamp",kind:"message",T:Ka},{no:3,name:"value",kind:"scalar",T:2}]),L6=GA.makeMessageType("livekit.EventMetric",()=>[{no:1,name:"label",kind:"scalar",T:13},{no:2,name:"participant_identity",kind:"scalar",T:13},{no:3,name:"track_sid",kind:"scalar",T:13},{no:4,name:"start_timestamp_ms",kind:"scalar",T:3},{no:5,name:"end_timestamp_ms",kind:"scalar",T:3,opt:!0},{no:6,name:"normalized_start_timestamp",kind:"message",T:Ka},{no:7,name:"normalized_end_timestamp",kind:"message",T:Ka,opt:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"rid",kind:"scalar",T:13}]),JD=GA.makeEnum("livekit.BackupCodecPolicy",[{no:0,name:"PREFER_REGRESSION"},{no:1,name:"SIMULCAST"},{no:2,name:"REGRESSION"}]),qr=GA.makeEnum("livekit.TrackType",[{no:0,name:"AUDIO"},{no:1,name:"VIDEO"},{no:2,name:"DATA"}]),AB=GA.makeEnum("livekit.TrackSource",[{no:0,name:"UNKNOWN"},{no:1,name:"CAMERA"},{no:2,name:"MICROPHONE"},{no:3,name:"SCREEN_SHARE"},{no:4,name:"SCREEN_SHARE_AUDIO"}]),aE=GA.makeEnum("livekit.VideoQuality",[{no:0,name:"LOW"},{no:1,name:"MEDIUM"},{no:2,name:"HIGH"},{no:3,name:"OFF"}]),hw=GA.makeEnum("livekit.ConnectionQuality",[{no:0,name:"POOR"},{no:1,name:"GOOD"},{no:2,name:"EXCELLENT"},{no:3,name:"LOST"}]),Cw=GA.makeEnum("livekit.ClientConfigSetting",[{no:0,name:"UNSET"},{no:1,name:"DISABLED"},{no:2,name:"ENABLED"}]),_r=GA.makeEnum("livekit.DisconnectReason",[{no:0,name:"UNKNOWN_REASON"},{no:1,name:"CLIENT_INITIATED"},{no:2,name:"DUPLICATE_IDENTITY"},{no:3,name:"SERVER_SHUTDOWN"},{no:4,name:"PARTICIPANT_REMOVED"},{no:5,name:"ROOM_DELETED"},{no:6,name:"STATE_MISMATCH"},{no:7,name:"JOIN_FAILURE"},{no:8,name:"MIGRATION"},{no:9,name:"SIGNAL_CLOSE"},{no:10,name:"ROOM_CLOSED"},{no:11,name:"USER_UNAVAILABLE"},{no:12,name:"USER_REJECTED"},{no:13,name:"SIP_TRUNK_FAILURE"},{no:14,name:"CONNECTION_TIMEOUT"},{no:15,name:"MEDIA_FAILURE"}]),sd=GA.makeEnum("livekit.ReconnectReason",[{no:0,name:"RR_UNKNOWN"},{no:1,name:"RR_SIGNAL_DISCONNECTED"},{no:2,name:"RR_PUBLISHER_FAILED"},{no:3,name:"RR_SUBSCRIBER_FAILED"},{no:4,name:"RR_SWITCH_CANDIDATE"}]),O6=GA.makeEnum("livekit.SubscriptionError",[{no:0,name:"SE_UNKNOWN"},{no:1,name:"SE_CODEC_UNSUPPORTED"},{no:2,name:"SE_TRACK_NOTFOUND"}]),fB=GA.makeEnum("livekit.AudioTrackFeature",[{no:0,name:"TF_STEREO"},{no:1,name:"TF_NO_DTX"},{no:2,name:"TF_AUTO_GAIN_CONTROL"},{no:3,name:"TF_ECHO_CANCELLATION"},{no:4,name:"TF_NOISE_SUPPRESSION"},{no:5,name:"TF_ENHANCED_NOISE_CANCELLATION"},{no:6,name:"TF_PRECONNECT_BUFFER"}]),MC=GA.makeMessageType("livekit.Room",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"empty_timeout",kind:"scalar",T:13},{no:14,name:"departure_timeout",kind:"scalar",T:13},{no:4,name:"max_participants",kind:"scalar",T:13},{no:5,name:"creation_time",kind:"scalar",T:3},{no:15,name:"creation_time_ms",kind:"scalar",T:3},{no:6,name:"turn_password",kind:"scalar",T:9},{no:7,name:"enabled_codecs",kind:"message",T:xC,repeated:!0},{no:8,name:"metadata",kind:"scalar",T:9},{no:9,name:"num_participants",kind:"scalar",T:13},{no:11,name:"num_publishers",kind:"scalar",T:13},{no:10,name:"active_recording",kind:"scalar",T:8},{no:13,name:"version",kind:"message",T:iF}]),xC=GA.makeMessageType("livekit.Codec",()=>[{no:1,name:"mime",kind:"scalar",T:9},{no:2,name:"fmtp_line",kind:"scalar",T:9}]),J6=GA.makeMessageType("livekit.ParticipantPermission",()=>[{no:1,name:"can_subscribe",kind:"scalar",T:8},{no:2,name:"can_publish",kind:"scalar",T:8},{no:3,name:"can_publish_data",kind:"scalar",T:8},{no:9,name:"can_publish_sources",kind:"enum",T:GA.getEnumType(AB),repeated:!0},{no:7,name:"hidden",kind:"scalar",T:8},{no:8,name:"recorder",kind:"scalar",T:8},{no:10,name:"can_update_metadata",kind:"scalar",T:8},{no:11,name:"agent",kind:"scalar",T:8},{no:12,name:"can_subscribe_metrics",kind:"scalar",T:8}]),rd=GA.makeMessageType("livekit.ParticipantInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"identity",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(ju)},{no:4,name:"tracks",kind:"message",T:qu,repeated:!0},{no:5,name:"metadata",kind:"scalar",T:9},{no:6,name:"joined_at",kind:"scalar",T:3},{no:17,name:"joined_at_ms",kind:"scalar",T:3},{no:9,name:"name",kind:"scalar",T:9},{no:10,name:"version",kind:"scalar",T:13},{no:11,name:"permission",kind:"message",T:J6},{no:12,name:"region",kind:"scalar",T:9},{no:13,name:"is_publisher",kind:"scalar",T:8},{no:14,name:"kind",kind:"enum",T:GA.getEnumType(bw)},{no:15,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:16,name:"disconnect_reason",kind:"enum",T:GA.getEnumType(_r)},{no:18,name:"kind_details",kind:"enum",T:GA.getEnumType(K6),repeated:!0}]),ju=GA.makeEnum("livekit.ParticipantInfo.State",[{no:0,name:"JOINING"},{no:1,name:"JOINED"},{no:2,name:"ACTIVE"},{no:3,name:"DISCONNECTED"}]),bw=GA.makeEnum("livekit.ParticipantInfo.Kind",[{no:0,name:"STANDARD"},{no:1,name:"INGRESS"},{no:2,name:"EGRESS"},{no:3,name:"SIP"},{no:4,name:"AGENT"},{no:7,name:"CONNECTOR"}]),K6=GA.makeEnum("livekit.ParticipantInfo.KindDetail",[{no:0,name:"CLOUD_AGENT"},{no:1,name:"FORWARDED"}]),oB=GA.makeEnum("livekit.Encryption.Type",[{no:0,name:"NONE"},{no:1,name:"GCM"},{no:2,name:"CUSTOM"}]),j6=GA.makeMessageType("livekit.SimulcastCodecInfo",()=>[{no:1,name:"mime_type",kind:"scalar",T:9},{no:2,name:"mid",kind:"scalar",T:9},{no:3,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:Eg,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType(KD)},{no:6,name:"sdp_cid",kind:"scalar",T:9}]),qu=GA.makeMessageType("livekit.TrackInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"type",kind:"enum",T:GA.getEnumType(qr)},{no:3,name:"name",kind:"scalar",T:9},{no:4,name:"muted",kind:"scalar",T:8},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"simulcast",kind:"scalar",T:8},{no:8,name:"disable_dtx",kind:"scalar",T:8},{no:9,name:"source",kind:"enum",T:GA.getEnumType(AB)},{no:10,name:"layers",kind:"message",T:Eg,repeated:!0},{no:11,name:"mime_type",kind:"scalar",T:9},{no:12,name:"mid",kind:"scalar",T:9},{no:13,name:"codecs",kind:"message",T:j6,repeated:!0},{no:14,name:"stereo",kind:"scalar",T:8},{no:15,name:"disable_red",kind:"scalar",T:8},{no:16,name:"encryption",kind:"enum",T:GA.getEnumType(oB)},{no:17,name:"stream",kind:"scalar",T:9},{no:18,name:"version",kind:"message",T:iF},{no:19,name:"audio_features",kind:"enum",T:GA.getEnumType(fB),repeated:!0},{no:20,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(JD)}]),Eg=GA.makeMessageType("livekit.VideoLayer",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(aE)},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13},{no:4,name:"bitrate",kind:"scalar",T:13},{no:5,name:"ssrc",kind:"scalar",T:13},{no:6,name:"spatial_layer",kind:"scalar",T:5},{no:7,name:"rid",kind:"scalar",T:9}]),KD=GA.makeEnum("livekit.VideoLayer.Mode",[{no:0,name:"MODE_UNUSED"},{no:1,name:"ONE_SPATIAL_LAYER_PER_STREAM"},{no:2,name:"MULTIPLE_SPATIAL_LAYERS_PER_STREAM"},{no:3,name:"ONE_SPATIAL_LAYER_PER_STREAM_INCOMPLETE_RTCP_SR"}]),ba=GA.makeMessageType("livekit.DataPacket",()=>[{no:1,name:"kind",kind:"enum",T:GA.getEnumType(Ve)},{no:4,name:"participant_identity",kind:"scalar",T:9},{no:5,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:2,name:"user",kind:"message",T:sE,oneof:"value"},{no:3,name:"speaker",kind:"message",T:q6,oneof:"value"},{no:6,name:"sip_dtmf",kind:"message",T:$D,oneof:"value"},{no:7,name:"transcription",kind:"message",T:_6,oneof:"value"},{no:8,name:"metrics",kind:"message",T:z6,oneof:"value"},{no:9,name:"chat_message",kind:"message",T:TC,oneof:"value"},{no:10,name:"rpc_request",kind:"message",T:rE,oneof:"value"},{no:11,name:"rpc_ack",kind:"message",T:iE,oneof:"value"},{no:12,name:"rpc_response",kind:"message",T:cE,oneof:"value"},{no:13,name:"stream_header",kind:"message",T:RC,oneof:"value"},{no:14,name:"stream_chunk",kind:"message",T:VC,oneof:"value"},{no:15,name:"stream_trailer",kind:"message",T:SC,oneof:"value"},{no:18,name:"encrypted_packet",kind:"message",T:jD,oneof:"value"},{no:16,name:"sequence",kind:"scalar",T:13},{no:17,name:"participant_sid",kind:"scalar",T:9}]),Ve=GA.makeEnum("livekit.DataPacket.Kind",[{no:0,name:"RELIABLE"},{no:1,name:"LOSSY"}]),jD=GA.makeMessageType("livekit.EncryptedPacket",()=>[{no:1,name:"encryption_type",kind:"enum",T:GA.getEnumType(oB)},{no:2,name:"iv",kind:"scalar",T:12},{no:3,name:"key_index",kind:"scalar",T:13},{no:4,name:"encrypted_value",kind:"scalar",T:12}]),qD=GA.makeMessageType("livekit.EncryptedPacketPayload",()=>[{no:1,name:"user",kind:"message",T:sE,oneof:"value"},{no:3,name:"chat_message",kind:"message",T:TC,oneof:"value"},{no:4,name:"rpc_request",kind:"message",T:rE,oneof:"value"},{no:5,name:"rpc_ack",kind:"message",T:iE,oneof:"value"},{no:6,name:"rpc_response",kind:"message",T:cE,oneof:"value"},{no:7,name:"stream_header",kind:"message",T:RC,oneof:"value"},{no:8,name:"stream_chunk",kind:"message",T:VC,oneof:"value"},{no:9,name:"stream_trailer",kind:"message",T:SC,oneof:"value"}]),q6=GA.makeMessageType("livekit.ActiveSpeakerUpdate",()=>[{no:1,name:"speakers",kind:"message",T:_D,repeated:!0}]),_D=GA.makeMessageType("livekit.SpeakerInfo",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"level",kind:"scalar",T:2},{no:3,name:"active",kind:"scalar",T:8}]),sE=GA.makeMessageType("livekit.UserPacket",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:5,name:"participant_identity",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:12},{no:3,name:"destination_sids",kind:"scalar",T:9,repeated:!0},{no:6,name:"destination_identities",kind:"scalar",T:9,repeated:!0},{no:4,name:"topic",kind:"scalar",T:9,opt:!0},{no:8,name:"id",kind:"scalar",T:9,opt:!0},{no:9,name:"start_time",kind:"scalar",T:4,opt:!0},{no:10,name:"end_time",kind:"scalar",T:4,opt:!0},{no:11,name:"nonce",kind:"scalar",T:12}]),$D=GA.makeMessageType("livekit.SipDTMF",()=>[{no:3,name:"code",kind:"scalar",T:13},{no:4,name:"digit",kind:"scalar",T:9}]),_6=GA.makeMessageType("livekit.Transcription",()=>[{no:2,name:"transcribed_participant_identity",kind:"scalar",T:9},{no:3,name:"track_id",kind:"scalar",T:9},{no:4,name:"segments",kind:"message",T:$6,repeated:!0}]),$6=GA.makeMessageType("livekit.TranscriptionSegment",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"text",kind:"scalar",T:9},{no:3,name:"start_time",kind:"scalar",T:4},{no:4,name:"end_time",kind:"scalar",T:4},{no:5,name:"final",kind:"scalar",T:8},{no:6,name:"language",kind:"scalar",T:9}]),TC=GA.makeMessageType("livekit.ChatMessage",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"edit_timestamp",kind:"scalar",T:3,opt:!0},{no:4,name:"message",kind:"scalar",T:9},{no:5,name:"deleted",kind:"scalar",T:8},{no:6,name:"generated",kind:"scalar",T:8}]),rE=GA.makeMessageType("livekit.RpcRequest",()=>[{no:1,name:"id",kind:"scalar",T:9},{no:2,name:"method",kind:"scalar",T:9},{no:3,name:"payload",kind:"scalar",T:9},{no:4,name:"response_timeout_ms",kind:"scalar",T:13},{no:5,name:"version",kind:"scalar",T:13}]),iE=GA.makeMessageType("livekit.RpcAck",()=>[{no:1,name:"request_id",kind:"scalar",T:9}]),cE=GA.makeMessageType("livekit.RpcResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:9},{no:2,name:"payload",kind:"scalar",T:9,oneof:"value"},{no:3,name:"error",kind:"message",T:AF,oneof:"value"}]),AF=GA.makeMessageType("livekit.RpcError",()=>[{no:1,name:"code",kind:"scalar",T:13},{no:2,name:"message",kind:"scalar",T:9},{no:3,name:"data",kind:"scalar",T:9}]),eF=GA.makeMessageType("livekit.ParticipantTracks",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sids",kind:"scalar",T:9,repeated:!0}]),tF=GA.makeMessageType("livekit.ServerInfo",()=>[{no:1,name:"edition",kind:"enum",T:GA.getEnumType(nF)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"region",kind:"scalar",T:9},{no:5,name:"node_id",kind:"scalar",T:9},{no:6,name:"debug_info",kind:"scalar",T:9},{no:7,name:"agent_protocol",kind:"scalar",T:5}]),nF=GA.makeEnum("livekit.ServerInfo.Edition",[{no:0,name:"Standard"},{no:1,name:"Cloud"}]),BF=GA.makeMessageType("livekit.ClientInfo",()=>[{no:1,name:"sdk",kind:"enum",T:GA.getEnumType(aF)},{no:2,name:"version",kind:"scalar",T:9},{no:3,name:"protocol",kind:"scalar",T:5},{no:4,name:"os",kind:"scalar",T:9},{no:5,name:"os_version",kind:"scalar",T:9},{no:6,name:"device_model",kind:"scalar",T:9},{no:7,name:"browser",kind:"scalar",T:9},{no:8,name:"browser_version",kind:"scalar",T:9},{no:9,name:"address",kind:"scalar",T:9},{no:10,name:"network",kind:"scalar",T:9},{no:11,name:"other_sdks",kind:"scalar",T:9}]),aF=GA.makeEnum("livekit.ClientInfo.SDK",[{no:0,name:"UNKNOWN"},{no:1,name:"JS"},{no:2,name:"SWIFT"},{no:3,name:"ANDROID"},{no:4,name:"FLUTTER"},{no:5,name:"GO"},{no:6,name:"UNITY"},{no:7,name:"REACT_NATIVE"},{no:8,name:"RUST"},{no:9,name:"PYTHON"},{no:10,name:"CPP"},{no:11,name:"UNITY_WEB"},{no:12,name:"NODE"},{no:13,name:"UNREAL"},{no:14,name:"ESP32"}]),sF=GA.makeMessageType("livekit.ClientConfiguration",()=>[{no:1,name:"video",kind:"message",T:rF},{no:2,name:"screen",kind:"message",T:rF},{no:3,name:"resume_connection",kind:"enum",T:GA.getEnumType(Cw)},{no:4,name:"disabled_codecs",kind:"message",T:Aq},{no:5,name:"force_relay",kind:"enum",T:GA.getEnumType(Cw)}]),rF=GA.makeMessageType("livekit.VideoConfiguration",()=>[{no:1,name:"hardware_encoder",kind:"enum",T:GA.getEnumType(Cw)}]),Aq=GA.makeMessageType("livekit.DisabledCodecs",()=>[{no:1,name:"codecs",kind:"message",T:xC,repeated:!0},{no:2,name:"publish",kind:"message",T:xC,repeated:!0}]),iF=GA.makeMessageType("livekit.TimedVersion",()=>[{no:1,name:"unix_micro",kind:"scalar",T:3},{no:2,name:"ticks",kind:"scalar",T:5}]),oE=GA.makeEnum("livekit.DataStream.OperationType",[{no:0,name:"CREATE"},{no:1,name:"UPDATE"},{no:2,name:"DELETE"},{no:3,name:"REACTION"}]),cF=GA.makeMessageType("livekit.DataStream.TextHeader",()=>[{no:1,name:"operation_type",kind:"enum",T:GA.getEnumType(oE)},{no:2,name:"version",kind:"scalar",T:5},{no:3,name:"reply_to_stream_id",kind:"scalar",T:9},{no:4,name:"attached_stream_ids",kind:"scalar",T:9,repeated:!0},{no:5,name:"generated",kind:"scalar",T:8}],{localName:"DataStream_TextHeader"}),oF=GA.makeMessageType("livekit.DataStream.ByteHeader",()=>[{no:1,name:"name",kind:"scalar",T:9}],{localName:"DataStream_ByteHeader"}),RC=GA.makeMessageType("livekit.DataStream.Header",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"timestamp",kind:"scalar",T:3},{no:3,name:"topic",kind:"scalar",T:9},{no:4,name:"mime_type",kind:"scalar",T:9},{no:5,name:"total_length",kind:"scalar",T:4,opt:!0},{no:7,name:"encryption_type",kind:"enum",T:GA.getEnumType(oB)},{no:8,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:9,name:"text_header",kind:"message",T:cF,oneof:"content_header"},{no:10,name:"byte_header",kind:"message",T:oF,oneof:"content_header"}],{localName:"DataStream_Header"}),VC=GA.makeMessageType("livekit.DataStream.Chunk",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"chunk_index",kind:"scalar",T:4},{no:3,name:"content",kind:"scalar",T:12},{no:4,name:"version",kind:"scalar",T:5},{no:5,name:"iv",kind:"scalar",T:12,opt:!0}],{localName:"DataStream_Chunk"}),SC=GA.makeMessageType("livekit.DataStream.Trailer",()=>[{no:1,name:"stream_id",kind:"scalar",T:9},{no:2,name:"reason",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}}],{localName:"DataStream_Trailer"}),eq=GA.makeMessageType("livekit.SubscribedAudioCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"enabled",kind:"scalar",T:8}]),$r=GA.makeEnum("livekit.SignalTarget",[{no:0,name:"PUBLISHER"},{no:1,name:"SUBSCRIBER"}]),gE=GA.makeEnum("livekit.StreamState",[{no:0,name:"ACTIVE"},{no:1,name:"PAUSED"}]),tq=GA.makeEnum("livekit.CandidateProtocol",[{no:0,name:"UDP"},{no:1,name:"TCP"},{no:2,name:"TLS"}]),nq=GA.makeMessageType("livekit.SignalRequest",()=>[{no:1,name:"offer",kind:"message",T:pg,oneof:"message"},{no:2,name:"answer",kind:"message",T:pg,oneof:"message"},{no:3,name:"trickle",kind:"message",T:WC,oneof:"message"},{no:4,name:"add_track",kind:"message",T:vw,oneof:"message"},{no:5,name:"mute",kind:"message",T:zC,oneof:"message"},{no:6,name:"subscription",kind:"message",T:NC,oneof:"message"},{no:7,name:"track_setting",kind:"message",T:lF,oneof:"message"},{no:8,name:"leave",kind:"message",T:XC,oneof:"message"},{no:10,name:"update_layers",kind:"message",T:uF,oneof:"message"},{no:11,name:"subscription_permission",kind:"message",T:wF,oneof:"message"},{no:12,name:"sync_state",kind:"message",T:wE,oneof:"message"},{no:13,name:"simulate",kind:"message",T:ac,oneof:"message"},{no:14,name:"ping",kind:"scalar",T:3,oneof:"message"},{no:15,name:"update_metadata",kind:"message",T:GE,oneof:"message"},{no:16,name:"ping_req",kind:"message",T:CF,oneof:"message"},{no:17,name:"update_audio_track",kind:"message",T:uE,oneof:"message"},{no:18,name:"update_video_track",kind:"message",T:dF,oneof:"message"}]),gF=GA.makeMessageType("livekit.SignalResponse",()=>[{no:1,name:"join",kind:"message",T:Bq,oneof:"message"},{no:2,name:"answer",kind:"message",T:pg,oneof:"message"},{no:3,name:"offer",kind:"message",T:pg,oneof:"message"},{no:4,name:"trickle",kind:"message",T:WC,oneof:"message"},{no:5,name:"update",kind:"message",T:rq,oneof:"message"},{no:6,name:"track_published",kind:"message",T:dE,oneof:"message"},{no:8,name:"leave",kind:"message",T:XC,oneof:"message"},{no:9,name:"mute",kind:"message",T:zC,oneof:"message"},{no:10,name:"speakers_changed",kind:"message",T:iq,oneof:"message"},{no:11,name:"room_update",kind:"message",T:cq,oneof:"message"},{no:12,name:"connection_quality",kind:"message",T:gq,oneof:"message"},{no:13,name:"stream_state_update",kind:"message",T:dq,oneof:"message"},{no:14,name:"subscribed_quality_update",kind:"message",T:Gq,oneof:"message"},{no:15,name:"subscription_permission_update",kind:"message",T:wq,oneof:"message"},{no:16,name:"refresh_token",kind:"scalar",T:9,oneof:"message"},{no:17,name:"track_unpublished",kind:"message",T:sq,oneof:"message"},{no:18,name:"pong",kind:"scalar",T:3,oneof:"message"},{no:19,name:"reconnect",kind:"message",T:aq,oneof:"message"},{no:20,name:"pong_resp",kind:"message",T:hq,oneof:"message"},{no:21,name:"subscription_response",kind:"message",T:vq,oneof:"message"},{no:22,name:"request_response",kind:"message",T:Iq,oneof:"message"},{no:23,name:"track_subscribed",kind:"message",T:Hq,oneof:"message"},{no:24,name:"room_moved",kind:"message",T:fq,oneof:"message"},{no:25,name:"media_sections_requirement",kind:"message",T:yq,oneof:"message"},{no:26,name:"subscribed_audio_codec_update",kind:"message",T:Qq,oneof:"message"}]),lE=GA.makeMessageType("livekit.SimulcastCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"cid",kind:"scalar",T:9},{no:4,name:"layers",kind:"message",T:Eg,repeated:!0},{no:5,name:"video_layer_mode",kind:"enum",T:GA.getEnumType(KD)}]),vw=GA.makeMessageType("livekit.AddTrackRequest",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"type",kind:"enum",T:GA.getEnumType(qr)},{no:4,name:"width",kind:"scalar",T:13},{no:5,name:"height",kind:"scalar",T:13},{no:6,name:"muted",kind:"scalar",T:8},{no:7,name:"disable_dtx",kind:"scalar",T:8},{no:8,name:"source",kind:"enum",T:GA.getEnumType(AB)},{no:9,name:"layers",kind:"message",T:Eg,repeated:!0},{no:10,name:"simulcast_codecs",kind:"message",T:lE,repeated:!0},{no:11,name:"sid",kind:"scalar",T:9},{no:12,name:"stereo",kind:"scalar",T:8},{no:13,name:"disable_red",kind:"scalar",T:8},{no:14,name:"encryption",kind:"enum",T:GA.getEnumType(oB)},{no:15,name:"stream",kind:"scalar",T:9},{no:16,name:"backup_codec_policy",kind:"enum",T:GA.getEnumType(JD)},{no:17,name:"audio_features",kind:"enum",T:GA.getEnumType(fB),repeated:!0}]),WC=GA.makeMessageType("livekit.TrickleRequest",()=>[{no:1,name:"candidateInit",kind:"scalar",T:9},{no:2,name:"target",kind:"enum",T:GA.getEnumType($r)},{no:3,name:"final",kind:"scalar",T:8}]),zC=GA.makeMessageType("livekit.MuteTrackRequest",()=>[{no:1,name:"sid",kind:"scalar",T:9},{no:2,name:"muted",kind:"scalar",T:8}]),Bq=GA.makeMessageType("livekit.JoinResponse",()=>[{no:1,name:"room",kind:"message",T:MC},{no:2,name:"participant",kind:"message",T:rd},{no:3,name:"other_participants",kind:"message",T:rd,repeated:!0},{no:4,name:"server_version",kind:"scalar",T:9},{no:5,name:"ice_servers",kind:"message",T:GF,repeated:!0},{no:6,name:"subscriber_primary",kind:"scalar",T:8},{no:7,name:"alternative_url",kind:"scalar",T:9},{no:8,name:"client_configuration",kind:"message",T:sF},{no:9,name:"server_region",kind:"scalar",T:9},{no:10,name:"ping_timeout",kind:"scalar",T:5},{no:11,name:"ping_interval",kind:"scalar",T:5},{no:12,name:"server_info",kind:"message",T:tF},{no:13,name:"sif_trailer",kind:"scalar",T:12},{no:14,name:"enabled_publish_codecs",kind:"message",T:xC,repeated:!0},{no:15,name:"fast_publish",kind:"scalar",T:8}]),aq=GA.makeMessageType("livekit.ReconnectResponse",()=>[{no:1,name:"ice_servers",kind:"message",T:GF,repeated:!0},{no:2,name:"client_configuration",kind:"message",T:sF},{no:3,name:"server_info",kind:"message",T:tF},{no:4,name:"last_message_seq",kind:"scalar",T:13}]),dE=GA.makeMessageType("livekit.TrackPublishedResponse",()=>[{no:1,name:"cid",kind:"scalar",T:9},{no:2,name:"track",kind:"message",T:qu}]),sq=GA.makeMessageType("livekit.TrackUnpublishedResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),pg=GA.makeMessageType("livekit.SessionDescription",()=>[{no:1,name:"type",kind:"scalar",T:9},{no:2,name:"sdp",kind:"scalar",T:9},{no:3,name:"id",kind:"scalar",T:13},{no:4,name:"mid_to_track_id",kind:"map",K:9,V:{kind:"scalar",T:9}}]),rq=GA.makeMessageType("livekit.ParticipantUpdate",()=>[{no:1,name:"participants",kind:"message",T:rd,repeated:!0}]),NC=GA.makeMessageType("livekit.UpdateSubscription",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:2,name:"subscribe",kind:"scalar",T:8},{no:3,name:"participant_tracks",kind:"message",T:eF,repeated:!0}]),lF=GA.makeMessageType("livekit.UpdateTrackSettings",()=>[{no:1,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:3,name:"disabled",kind:"scalar",T:8},{no:4,name:"quality",kind:"enum",T:GA.getEnumType(aE)},{no:5,name:"width",kind:"scalar",T:13},{no:6,name:"height",kind:"scalar",T:13},{no:7,name:"fps",kind:"scalar",T:13},{no:8,name:"priority",kind:"scalar",T:13}]),uE=GA.makeMessageType("livekit.UpdateLocalAudioTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"features",kind:"enum",T:GA.getEnumType(fB),repeated:!0}]),dF=GA.makeMessageType("livekit.UpdateLocalVideoTrack",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"width",kind:"scalar",T:13},{no:3,name:"height",kind:"scalar",T:13}]),XC=GA.makeMessageType("livekit.LeaveRequest",()=>[{no:1,name:"can_reconnect",kind:"scalar",T:8},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(_r)},{no:3,name:"action",kind:"enum",T:GA.getEnumType(_u)},{no:4,name:"regions",kind:"message",T:Cq}]),_u=GA.makeEnum("livekit.LeaveRequest.Action",[{no:0,name:"DISCONNECT"},{no:1,name:"RESUME"},{no:2,name:"RECONNECT"}]),uF=GA.makeMessageType("livekit.UpdateVideoLayers",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"layers",kind:"message",T:Eg,repeated:!0}]),GE=GA.makeMessageType("livekit.UpdateParticipantMetadata",()=>[{no:1,name:"metadata",kind:"scalar",T:9},{no:2,name:"name",kind:"scalar",T:9},{no:3,name:"attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:4,name:"request_id",kind:"scalar",T:13}]),GF=GA.makeMessageType("livekit.ICEServer",()=>[{no:1,name:"urls",kind:"scalar",T:9,repeated:!0},{no:2,name:"username",kind:"scalar",T:9},{no:3,name:"credential",kind:"scalar",T:9}]),iq=GA.makeMessageType("livekit.SpeakersChanged",()=>[{no:1,name:"speakers",kind:"message",T:_D,repeated:!0}]),cq=GA.makeMessageType("livekit.RoomUpdate",()=>[{no:1,name:"room",kind:"message",T:MC}]),oq=GA.makeMessageType("livekit.ConnectionQualityInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"quality",kind:"enum",T:GA.getEnumType(hw)},{no:3,name:"score",kind:"scalar",T:2}]),gq=GA.makeMessageType("livekit.ConnectionQualityUpdate",()=>[{no:1,name:"updates",kind:"message",T:oq,repeated:!0}]),lq=GA.makeMessageType("livekit.StreamStateInfo",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"state",kind:"enum",T:GA.getEnumType(gE)}]),dq=GA.makeMessageType("livekit.StreamStateUpdate",()=>[{no:1,name:"stream_states",kind:"message",T:lq,repeated:!0}]),QE=GA.makeMessageType("livekit.SubscribedQuality",()=>[{no:1,name:"quality",kind:"enum",T:GA.getEnumType(aE)},{no:2,name:"enabled",kind:"scalar",T:8}]),uq=GA.makeMessageType("livekit.SubscribedCodec",()=>[{no:1,name:"codec",kind:"scalar",T:9},{no:2,name:"qualities",kind:"message",T:QE,repeated:!0}]),Gq=GA.makeMessageType("livekit.SubscribedQualityUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_qualities",kind:"message",T:QE,repeated:!0},{no:3,name:"subscribed_codecs",kind:"message",T:uq,repeated:!0}]),Qq=GA.makeMessageType("livekit.SubscribedAudioCodecUpdate",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"subscribed_audio_codecs",kind:"message",T:eq,repeated:!0}]),QF=GA.makeMessageType("livekit.TrackPermission",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"all_tracks",kind:"scalar",T:8},{no:3,name:"track_sids",kind:"scalar",T:9,repeated:!0},{no:4,name:"participant_identity",kind:"scalar",T:9}]),wF=GA.makeMessageType("livekit.SubscriptionPermission",()=>[{no:1,name:"all_participants",kind:"scalar",T:8},{no:2,name:"track_permissions",kind:"message",T:QF,repeated:!0}]),wq=GA.makeMessageType("livekit.SubscriptionPermissionUpdate",()=>[{no:1,name:"participant_sid",kind:"scalar",T:9},{no:2,name:"track_sid",kind:"scalar",T:9},{no:3,name:"allowed",kind:"scalar",T:8}]),fq=GA.makeMessageType("livekit.RoomMovedResponse",()=>[{no:1,name:"room",kind:"message",T:MC},{no:2,name:"token",kind:"scalar",T:9},{no:3,name:"participant",kind:"message",T:rd},{no:4,name:"other_participants",kind:"message",T:rd,repeated:!0}]),wE=GA.makeMessageType("livekit.SyncState",()=>[{no:1,name:"answer",kind:"message",T:pg},{no:2,name:"subscription",kind:"message",T:NC},{no:3,name:"publish_tracks",kind:"message",T:dE,repeated:!0},{no:4,name:"data_channels",kind:"message",T:hF,repeated:!0},{no:5,name:"offer",kind:"message",T:pg},{no:6,name:"track_sids_disabled",kind:"scalar",T:9,repeated:!0},{no:7,name:"datachannel_receive_states",kind:"message",T:fF,repeated:!0}]),fF=GA.makeMessageType("livekit.DataChannelReceiveState",()=>[{no:1,name:"publisher_sid",kind:"scalar",T:9},{no:2,name:"last_seq",kind:"scalar",T:13}]),hF=GA.makeMessageType("livekit.DataChannelInfo",()=>[{no:1,name:"label",kind:"scalar",T:9},{no:2,name:"id",kind:"scalar",T:13},{no:3,name:"target",kind:"enum",T:GA.getEnumType($r)}]),ac=GA.makeMessageType("livekit.SimulateScenario",()=>[{no:1,name:"speaker_update",kind:"scalar",T:5,oneof:"scenario"},{no:2,name:"node_failure",kind:"scalar",T:8,oneof:"scenario"},{no:3,name:"migration",kind:"scalar",T:8,oneof:"scenario"},{no:4,name:"server_leave",kind:"scalar",T:8,oneof:"scenario"},{no:5,name:"switch_candidate_protocol",kind:"enum",T:GA.getEnumType(tq),oneof:"scenario"},{no:6,name:"subscriber_bandwidth",kind:"scalar",T:3,oneof:"scenario"},{no:7,name:"disconnect_signal_on_resume",kind:"scalar",T:8,oneof:"scenario"},{no:8,name:"disconnect_signal_on_resume_no_messages",kind:"scalar",T:8,oneof:"scenario"},{no:9,name:"leave_request_full_reconnect",kind:"scalar",T:8,oneof:"scenario"}]),CF=GA.makeMessageType("livekit.Ping",()=>[{no:1,name:"timestamp",kind:"scalar",T:3},{no:2,name:"rtt",kind:"scalar",T:3}]),hq=GA.makeMessageType("livekit.Pong",()=>[{no:1,name:"last_ping_timestamp",kind:"scalar",T:3},{no:2,name:"timestamp",kind:"scalar",T:3}]),Cq=GA.makeMessageType("livekit.RegionSettings",()=>[{no:1,name:"regions",kind:"message",T:bq,repeated:!0}]),bq=GA.makeMessageType("livekit.RegionInfo",()=>[{no:1,name:"region",kind:"scalar",T:9},{no:2,name:"url",kind:"scalar",T:9},{no:3,name:"distance",kind:"scalar",T:3}]),vq=GA.makeMessageType("livekit.SubscriptionResponse",()=>[{no:1,name:"track_sid",kind:"scalar",T:9},{no:2,name:"err",kind:"enum",T:GA.getEnumType(O6)}]),Iq=GA.makeMessageType("livekit.RequestResponse",()=>[{no:1,name:"request_id",kind:"scalar",T:13},{no:2,name:"reason",kind:"enum",T:GA.getEnumType(fE)},{no:3,name:"message",kind:"scalar",T:9},{no:4,name:"trickle",kind:"message",T:WC,oneof:"request"},{no:5,name:"add_track",kind:"message",T:vw,oneof:"request"},{no:6,name:"mute",kind:"message",T:zC,oneof:"request"},{no:7,name:"update_metadata",kind:"message",T:GE,oneof:"request"},{no:8,name:"update_audio_track",kind:"message",T:uE,oneof:"request"},{no:9,name:"update_video_track",kind:"message",T:dF,oneof:"request"}]),fE=GA.makeEnum("livekit.RequestResponse.Reason",[{no:0,name:"OK"},{no:1,name:"NOT_FOUND"},{no:2,name:"NOT_ALLOWED"},{no:3,name:"LIMIT_EXCEEDED"},{no:4,name:"QUEUED"},{no:5,name:"UNSUPPORTED_TYPE"},{no:6,name:"UNCLASSIFIED_ERROR"}]),Hq=GA.makeMessageType("livekit.TrackSubscribed",()=>[{no:1,name:"track_sid",kind:"scalar",T:9}]),bF=GA.makeMessageType("livekit.ConnectionSettings",()=>[{no:1,name:"auto_subscribe",kind:"scalar",T:8},{no:2,name:"adaptive_stream",kind:"scalar",T:8},{no:3,name:"subscriber_allow_pause",kind:"scalar",T:8,opt:!0},{no:4,name:"disable_ice_lite",kind:"scalar",T:8}]),Eq=GA.makeMessageType("livekit.JoinRequest",()=>[{no:1,name:"client_info",kind:"message",T:BF},{no:2,name:"connection_settings",kind:"message",T:bF},{no:3,name:"metadata",kind:"scalar",T:9},{no:4,name:"participant_attributes",kind:"map",K:9,V:{kind:"scalar",T:9}},{no:5,name:"add_track_requests",kind:"message",T:vw,repeated:!0},{no:6,name:"publisher_offer",kind:"message",T:pg},{no:7,name:"reconnect",kind:"scalar",T:8},{no:8,name:"reconnect_reason",kind:"enum",T:GA.getEnumType(sd)},{no:9,name:"participant_sid",kind:"scalar",T:9},{no:10,name:"sync_state",kind:"message",T:wE}]),pq=GA.makeMessageType("livekit.WrappedJoinRequest",()=>[{no:1,name:"compression",kind:"enum",T:GA.getEnumType(mq)},{no:2,name:"join_request",kind:"scalar",T:12}]),mq=GA.makeEnum("livekit.WrappedJoinRequest.Compression",[{no:0,name:"NONE"},{no:1,name:"GZIP"}]),yq=GA.makeMessageType("livekit.MediaSectionsRequirement",()=>[{no:1,name:"num_audios",kind:"scalar",T:13},{no:2,name:"num_videos",kind:"scalar",T:13}]);function Yq(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var LC={exports:{}},Zq=LC.exports,vF;function kq(){return vF||(vF=1,(function(e){(function(A,t){e.exports?e.exports=t():A.log=t()})(Zq,function(){var A=function(){},t="undefined",n=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),B=["trace","debug","info","warn","error"],a={},s=null;function i(y,Y){var Z=y[Y];if(typeof Z.bind=="function")return Z.bind(y);try{return Function.prototype.bind.call(Z,y)}catch{return function(){return Function.prototype.apply.apply(Z,[y,arguments])}}}function o(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function g(y){return y==="debug"&&(y="log"),typeof console===t?!1:y==="trace"&&n?o:console[y]!==void 0?i(console,y):console.log!==void 0?i(console,"log"):A}function d(){for(var y=this.getLevel(),Y=0;Y<B.length;Y++){var Z=B[Y];this[Z]=Y<y?A:this.methodFactory(Z,y,this.name)}if(this.log=this.debug,typeof console===t&&y<this.levels.SILENT)return"No console available for logging"}function G(y){return function(){typeof console!==t&&(d.call(this),this[y].apply(this,arguments))}}function f(y,Y,Z){return g(y)||G.apply(this,arguments)}function v(y,Y){var Z=this,P,x,V,k="loglevel";typeof y=="string"?k+=":"+y:typeof y=="symbol"&&(k=void 0);function S(cA){var CA=(B[cA]||"silent").toUpperCase();if(!(typeof window===t||!k)){try{window.localStorage[k]=CA;return}catch{}try{window.document.cookie=encodeURIComponent(k)+"="+CA+";"}catch{}}}function K(){var cA;if(!(typeof window===t||!k)){try{cA=window.localStorage[k]}catch{}if(typeof cA===t)try{var CA=window.document.cookie,ZA=encodeURIComponent(k),UA=CA.indexOf(ZA+"=");UA!==-1&&(cA=/^([^;]+)/.exec(CA.slice(UA+ZA.length+1))[1])}catch{}return Z.levels[cA]===void 0&&(cA=void 0),cA}}function J(){if(!(typeof window===t||!k)){try{window.localStorage.removeItem(k)}catch{}try{window.document.cookie=encodeURIComponent(k)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch{}}}function eA(cA){var CA=cA;if(typeof CA=="string"&&Z.levels[CA.toUpperCase()]!==void 0&&(CA=Z.levels[CA.toUpperCase()]),typeof CA=="number"&&CA>=0&&CA<=Z.levels.SILENT)return CA;throw new TypeError("log.setLevel() called with invalid level: "+cA)}Z.name=y,Z.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},Z.methodFactory=Y||f,Z.getLevel=function(){return V??x??P},Z.setLevel=function(cA,CA){return V=eA(cA),CA!==!1&&S(V),d.call(Z)},Z.setDefaultLevel=function(cA){x=eA(cA),K()||Z.setLevel(cA,!1)},Z.resetLevel=function(){V=null,J(),d.call(Z)},Z.enableAll=function(cA){Z.setLevel(Z.levels.TRACE,cA)},Z.disableAll=function(cA){Z.setLevel(Z.levels.SILENT,cA)},Z.rebuild=function(){if(s!==Z&&(P=eA(s.getLevel())),d.call(Z),s===Z)for(var cA in a)a[cA].rebuild()},P=eA(s?s.getLevel():"WARN");var sA=K();sA!=null&&(V=eA(sA)),d.call(Z)}s=new v,s.getLogger=function(Y){if(typeof Y!="symbol"&&typeof Y!="string"||Y==="")throw new TypeError("You must supply a name when creating a logger.");var Z=a[Y];return Z||(Z=a[Y]=new v(Y,s.methodFactory)),Z};var H=typeof window!==t?window.log:void 0;return s.noConflict=function(){return typeof window!==t&&window.log===s&&(window.log=H),s},s.getLoggers=function(){return a},s.default=s,s})})(LC)),LC.exports}var OC=kq(),hE;(function(e){e[e.trace=0]="trace",e[e.debug=1]="debug",e[e.info=2]="info",e[e.warn=3]="warn",e[e.error=4]="error",e[e.silent=5]="silent"})(hE||(hE={}));var Ai;(function(e){e.Default="livekit",e.Room="livekit-room",e.TokenSource="livekit-token-source",e.Participant="livekit-participant",e.Track="livekit-track",e.Publication="livekit-track-publication",e.Engine="livekit-engine",e.Signal="livekit-signal",e.PCManager="livekit-pc-manager",e.PCTransport="livekit-pc-transport",e.E2EE="lk-e2ee"})(Ai||(Ai={}));let De=OC.getLogger("livekit");Object.values(Ai).map(e=>OC.getLogger(e)),De.setDefaultLevel(hE.info);function oo(e){const A=OC.getLogger(e);return A.setDefaultLevel(De.getLevel()),A}const Uq=OC.getLogger("lk-e2ee"),Iw=7e3,Dq=[0,300,4*300,9*300,16*300,Iw,Iw,Iw,Iw,Iw];class Fq{constructor(A){this._retryDelays=A!==void 0?[...A]:Dq}nextRetryDelayInMs(A){if(A.retryCount>=this._retryDelays.length)return null;const t=this._retryDelays[A.retryCount];return A.retryCount<=1?t:t+Math.random()*1e3}}function Pq(e,A){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&A.indexOf(n)<0&&(t[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var B=0,n=Object.getOwnPropertySymbols(e);B<n.length;B++)A.indexOf(n[B])<0&&Object.prototype.propertyIsEnumerable.call(e,n[B])&&(t[n[B]]=e[n[B]]);return t}function $(e,A,t,n){function B(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function i(d){try{g(n.next(d))}catch(G){s(G)}}function o(d){try{g(n.throw(d))}catch(G){s(G)}}function g(d){d.done?a(d.value):B(d.value).then(i,o)}g((n=n.apply(e,A||[])).next())})}function IF(e){var A=typeof Symbol=="function"&&Symbol.iterator,t=A&&e[A],n=0;if(t)return t.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(A?"Object is not iterable.":"Symbol.iterator is not defined.")}function go(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var A=e[Symbol.asyncIterator],t;return A?A.call(e):(e=typeof IF=="function"?IF(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(a){t[a]=e[a]&&function(s){return new Promise(function(i,o){s=e[a](s),B(i,o,s.done,s.value)})}}function B(a,s,i,o){Promise.resolve(o).then(function(g){a({value:g,done:i})},s)}}typeof SuppressedError=="function"&&SuppressedError;var JC={exports:{}},HF;function Mq(){if(HF)return JC.exports;HF=1;var e=typeof Reflect=="object"?Reflect:null,A=e&&typeof e.apply=="function"?e.apply:function(k,S,K){return Function.prototype.apply.call(k,S,K)},t;e&&typeof e.ownKeys=="function"?t=e.ownKeys:Object.getOwnPropertySymbols?t=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:t=function(k){return Object.getOwnPropertyNames(k)};function n(V){console&&console.warn&&console.warn(V)}var B=Number.isNaN||function(k){return k!==k};function a(){a.init.call(this)}JC.exports=a,JC.exports.once=Z,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var s=10;function i(V){if(typeof V!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof V)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(V){if(typeof V!="number"||V<0||B(V))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+V+".");s=V}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||B(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function o(V){return V._maxListeners===void 0?a.defaultMaxListeners:V._maxListeners}a.prototype.getMaxListeners=function(){return o(this)},a.prototype.emit=function(k){for(var S=[],K=1;K<arguments.length;K++)S.push(arguments[K]);var J=k==="error",eA=this._events;if(eA!==void 0)J=J&&eA.error===void 0;else if(!J)return!1;if(J){var sA;if(S.length>0&&(sA=S[0]),sA instanceof Error)throw sA;var cA=new Error("Unhandled error."+(sA?" ("+sA.message+")":""));throw cA.context=sA,cA}var CA=eA[k];if(CA===void 0)return!1;if(typeof CA=="function")A(CA,this,S);else for(var ZA=CA.length,UA=H(CA,ZA),K=0;K<ZA;++K)A(UA[K],this,S);return!0};function g(V,k,S,K){var J,eA,sA;if(i(S),eA=V._events,eA===void 0?(eA=V._events=Object.create(null),V._eventsCount=0):(eA.newListener!==void 0&&(V.emit("newListener",k,S.listener?S.listener:S),eA=V._events),sA=eA[k]),sA===void 0)sA=eA[k]=S,++V._eventsCount;else if(typeof sA=="function"?sA=eA[k]=K?[S,sA]:[sA,S]:K?sA.unshift(S):sA.push(S),J=o(V),J>0&&sA.length>J&&!sA.warned){sA.warned=!0;var cA=new Error("Possible EventEmitter memory leak detected. "+sA.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");cA.name="MaxListenersExceededWarning",cA.emitter=V,cA.type=k,cA.count=sA.length,n(cA)}return V}a.prototype.addListener=function(k,S){return g(this,k,S,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(k,S){return g(this,k,S,!0)};function d(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function G(V,k,S){var K={fired:!1,wrapFn:void 0,target:V,type:k,listener:S},J=d.bind(K);return J.listener=S,K.wrapFn=J,J}a.prototype.once=function(k,S){return i(S),this.on(k,G(this,k,S)),this},a.prototype.prependOnceListener=function(k,S){return i(S),this.prependListener(k,G(this,k,S)),this},a.prototype.removeListener=function(k,S){var K,J,eA,sA,cA;if(i(S),J=this._events,J===void 0)return this;if(K=J[k],K===void 0)return this;if(K===S||K.listener===S)--this._eventsCount===0?this._events=Object.create(null):(delete J[k],J.removeListener&&this.emit("removeListener",k,K.listener||S));else if(typeof K!="function"){for(eA=-1,sA=K.length-1;sA>=0;sA--)if(K[sA]===S||K[sA].listener===S){cA=K[sA].listener,eA=sA;break}if(eA<0)return this;eA===0?K.shift():y(K,eA),K.length===1&&(J[k]=K[0]),J.removeListener!==void 0&&this.emit("removeListener",k,cA||S)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(k){var S,K,J;if(K=this._events,K===void 0)return this;if(K.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):K[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete K[k]),this;if(arguments.length===0){var eA=Object.keys(K),sA;for(J=0;J<eA.length;++J)sA=eA[J],sA!=="removeListener"&&this.removeAllListeners(sA);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(S=K[k],typeof S=="function")this.removeListener(k,S);else if(S!==void 0)for(J=S.length-1;J>=0;J--)this.removeListener(k,S[J]);return this};function f(V,k,S){var K=V._events;if(K===void 0)return[];var J=K[k];return J===void 0?[]:typeof J=="function"?S?[J.listener||J]:[J]:S?Y(J):H(J,J.length)}a.prototype.listeners=function(k){return f(this,k,!0)},a.prototype.rawListeners=function(k){return f(this,k,!1)},a.listenerCount=function(V,k){return typeof V.listenerCount=="function"?V.listenerCount(k):v.call(V,k)},a.prototype.listenerCount=v;function v(V){var k=this._events;if(k!==void 0){var S=k[V];if(typeof S=="function")return 1;if(S!==void 0)return S.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function H(V,k){for(var S=new Array(k),K=0;K<k;++K)S[K]=V[K];return S}function y(V,k){for(;k+1<V.length;k++)V[k]=V[k+1];V.pop()}function Y(V){for(var k=new Array(V.length),S=0;S<k.length;++S)k[S]=V[S].listener||V[S];return k}function Z(V,k){return new Promise(function(S,K){function J(sA){V.removeListener(k,eA),K(sA)}function eA(){typeof V.removeListener=="function"&&V.removeListener("error",J),S([].slice.call(arguments))}x(V,k,eA,{once:!0}),k!=="error"&&P(V,J,{once:!0})})}function P(V,k,S){typeof V.on=="function"&&x(V,"error",k,S)}function x(V,k,S,K){if(typeof V.on=="function")K.once?V.once(k,S):V.on(k,S);else if(typeof V.addEventListener=="function")V.addEventListener(k,function J(eA){K.once&&V.removeEventListener(k,J),S(eA)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof V)}return JC.exports}var sc=Mq();let EF=!0,pF=!0;function Hw(e,A,t){const n=e.match(A);return n&&n.length>=t&&parseFloat(n[t],10)}function id(e,A,t){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,B=n.addEventListener;n.addEventListener=function(s,i){if(s!==A)return B.apply(this,arguments);const o=g=>{const d=t(g);d&&(i.handleEvent?i.handleEvent(d):i(d))};return this._eventMap=this._eventMap||{},this._eventMap[A]||(this._eventMap[A]=new Map),this._eventMap[A].set(i,o),B.apply(this,[s,o])};const a=n.removeEventListener;n.removeEventListener=function(s,i){if(s!==A||!this._eventMap||!this._eventMap[A])return a.apply(this,arguments);if(!this._eventMap[A].has(i))return a.apply(this,arguments);const o=this._eventMap[A].get(i);return this._eventMap[A].delete(i),this._eventMap[A].size===0&&delete this._eventMap[A],Object.keys(this._eventMap).length===0&&delete this._eventMap,a.apply(this,[s,o])},Object.defineProperty(n,"on"+A,{get(){return this["_on"+A]},set(s){this["_on"+A]&&(this.removeEventListener(A,this["_on"+A]),delete this["_on"+A]),s&&this.addEventListener(A,this["_on"+A]=s)},enumerable:!0,configurable:!0})}function xq(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(EF=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function Tq(e){return typeof e!="boolean"?new Error("Argument type: "+typeof e+". Please use a boolean."):(pF=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function mF(){if(typeof window=="object"){if(EF)return;typeof console<"u"&&typeof console.log=="function"&&console.log.apply(console,arguments)}}function CE(e,A){pF&&console.warn(e+" is deprecated, please use "+A+" instead.")}function Rq(e){const A={browser:null,version:null};if(typeof e>"u"||!e.navigator||!e.navigator.userAgent)return A.browser="Not a browser.",A;const{navigator:t}=e;if(t.userAgentData&&t.userAgentData.brands){const n=t.userAgentData.brands.find(B=>B.brand==="Chromium");if(n)return{browser:"chrome",version:parseInt(n.version,10)}}if(t.mozGetUserMedia)A.browser="firefox",A.version=parseInt(Hw(t.userAgent,/Firefox\/(\d+)\./,1));else if(t.webkitGetUserMedia||e.isSecureContext===!1&&e.webkitRTCPeerConnection)A.browser="chrome",A.version=parseInt(Hw(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2));else if(e.RTCPeerConnection&&t.userAgent.match(/AppleWebKit\/(\d+)\./))A.browser="safari",A.version=parseInt(Hw(t.userAgent,/AppleWebKit\/(\d+)\./,1)),A.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,A._safariVersion=Hw(t.userAgent,/Version\/(\d+(\.?\d+))/,1);else return A.browser="Not a supported browser.",A;return A}function yF(e){return Object.prototype.toString.call(e)==="[object Object]"}function YF(e){return yF(e)?Object.keys(e).reduce(function(A,t){const n=yF(e[t]),B=n?YF(e[t]):e[t],a=n&&!Object.keys(B).length;return B===void 0||a?A:Object.assign(A,{[t]:B})},{}):e}function bE(e,A,t){!A||t.has(A.id)||(t.set(A.id,A),Object.keys(A).forEach(n=>{n.endsWith("Id")?bE(e,e.get(A[n]),t):n.endsWith("Ids")&&A[n].forEach(B=>{bE(e,e.get(B),t)})}))}function ZF(e,A,t){const n=t?"outbound-rtp":"inbound-rtp",B=new Map;if(A===null)return B;const a=[];return e.forEach(s=>{s.type==="track"&&s.trackIdentifier===A.id&&a.push(s)}),a.forEach(s=>{e.forEach(i=>{i.type===n&&i.trackId===s.id&&bE(e,i,B)})}),B}const kF=mF;function UF(e,A){const t=e&&e.navigator;if(!t.mediaDevices)return;const n=function(i){if(typeof i!="object"||i.mandatory||i.optional)return i;const o={};return Object.keys(i).forEach(g=>{if(g==="require"||g==="advanced"||g==="mediaSource")return;const d=typeof i[g]=="object"?i[g]:{ideal:i[g]};d.exact!==void 0&&typeof d.exact=="number"&&(d.min=d.max=d.exact);const G=function(f,v){return f?f+v.charAt(0).toUpperCase()+v.slice(1):v==="deviceId"?"sourceId":v};if(d.ideal!==void 0){o.optional=o.optional||[];let f={};typeof d.ideal=="number"?(f[G("min",g)]=d.ideal,o.optional.push(f),f={},f[G("max",g)]=d.ideal,o.optional.push(f)):(f[G("",g)]=d.ideal,o.optional.push(f))}d.exact!==void 0&&typeof d.exact!="number"?(o.mandatory=o.mandatory||{},o.mandatory[G("",g)]=d.exact):["min","max"].forEach(f=>{d[f]!==void 0&&(o.mandatory=o.mandatory||{},o.mandatory[G(f,g)]=d[f])})}),i.advanced&&(o.optional=(o.optional||[]).concat(i.advanced)),o},B=function(i,o){if(A.version>=61)return o(i);if(i=JSON.parse(JSON.stringify(i)),i&&typeof i.audio=="object"){const g=function(d,G,f){G in d&&!(f in d)&&(d[f]=d[G],delete d[G])};i=JSON.parse(JSON.stringify(i)),g(i.audio,"autoGainControl","googAutoGainControl"),g(i.audio,"noiseSuppression","googNoiseSuppression"),i.audio=n(i.audio)}if(i&&typeof i.video=="object"){let g=i.video.facingMode;g=g&&(typeof g=="object"?g:{ideal:g});const d=A.version<66;if(g&&(g.exact==="user"||g.exact==="environment"||g.ideal==="user"||g.ideal==="environment")&&!(t.mediaDevices.getSupportedConstraints&&t.mediaDevices.getSupportedConstraints().facingMode&&!d)){delete i.video.facingMode;let G;if(g.exact==="environment"||g.ideal==="environment"?G=["back","rear"]:(g.exact==="user"||g.ideal==="user")&&(G=["front"]),G)return t.mediaDevices.enumerateDevices().then(f=>{f=f.filter(H=>H.kind==="videoinput");let v=f.find(H=>G.some(y=>H.label.toLowerCase().includes(y)));return!v&&f.length&&G.includes("back")&&(v=f[f.length-1]),v&&(i.video.deviceId=g.exact?{exact:v.deviceId}:{ideal:v.deviceId}),i.video=n(i.video),kF("chrome: "+JSON.stringify(i)),o(i)})}i.video=n(i.video)}return kF("chrome: "+JSON.stringify(i)),o(i)},a=function(i){return A.version>=64?i:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[i.name]||i.name,message:i.message,constraint:i.constraint||i.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}},s=function(i,o,g){B(i,d=>{t.webkitGetUserMedia(d,o,G=>{g&&g(a(G))})})};if(t.getUserMedia=s.bind(t),t.mediaDevices.getUserMedia){const i=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(o){return B(o,g=>i(g).then(d=>{if(g.audio&&!d.getAudioTracks().length||g.video&&!d.getVideoTracks().length)throw d.getTracks().forEach(G=>{G.stop()}),new DOMException("","NotFoundError");return d},d=>Promise.reject(a(d))))}}}function DF(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function FF(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(t){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=t)},enumerable:!0,configurable:!0});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",B=>{let a;e.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(i=>i.track&&i.track.id===B.track.id):a={track:B.track};const s=new Event("track");s.track=B.track,s.receiver=a,s.transceiver={receiver:a},s.streams=[n.stream],this.dispatchEvent(s)}),n.stream.getTracks().forEach(B=>{let a;e.RTCPeerConnection.prototype.getReceivers?a=this.getReceivers().find(i=>i.track&&i.track.id===B.id):a={track:B};const s=new Event("track");s.track=B,s.receiver=a,s.transceiver={receiver:a},s.streams=[n.stream],this.dispatchEvent(s)})},this.addEventListener("addstream",this._ontrackpoly)),A.apply(this,arguments)}}else id(e,"track",A=>(A.transceiver||Object.defineProperty(A,"transceiver",{value:{receiver:A.receiver}}),A))}function PF(e){if(typeof e=="object"&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const A=function(B,a){return{track:a,get dtmf(){return this._dtmf===void 0&&(a.kind==="audio"?this._dtmf=B.createDTMFSender(a):this._dtmf=null),this._dtmf},_pc:B}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const B=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(i,o){let g=B.apply(this,arguments);return g||(g=A(this,i),this._senders.push(g)),g};const a=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(i){a.apply(this,arguments);const o=this._senders.indexOf(i);o!==-1&&this._senders.splice(o,1)}}const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(a){this._senders=this._senders||[],t.apply(this,[a]),a.getTracks().forEach(s=>{this._senders.push(A(this,s))})};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(a){this._senders=this._senders||[],n.apply(this,[a]),a.getTracks().forEach(s=>{const i=this._senders.find(o=>o.track===s);i&&this._senders.splice(this._senders.indexOf(i),1)})}}else if(typeof e=="object"&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const A=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const n=A.apply(this,[]);return n.forEach(B=>B._pc=this),n},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return this._dtmf===void 0&&(this.track.kind==="audio"?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function MF(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const a=t.apply(this,[]);return a.forEach(s=>s._pc=this),a});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const a=n.apply(this,arguments);return a._pc=this,a}),e.RTCRtpSender.prototype.getStats=function(){const a=this;return this._pc.getStats().then(s=>ZF(s,a.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const B=t.apply(this,[]);return B.forEach(a=>a._pc=this),B}),id(e,"track",n=>(n.receiver._pc=n.srcElement,n)),e.RTCRtpReceiver.prototype.getStats=function(){const B=this;return this._pc.getStats().then(a=>ZF(a,B.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;const A=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const n=arguments[0];let B,a,s;return this.getSenders().forEach(i=>{i.track===n&&(B?s=!0:B=i)}),this.getReceivers().forEach(i=>(i.track===n&&(a?s=!0:a=i),i.track===n)),s||B&&a?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):B?B.getStats():a?a.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return A.apply(this,arguments)}}function xF(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(s=>this._shimmedLocalStreams[s][0])};const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(s,i){if(!i)return A.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const o=A.apply(this,arguments);return this._shimmedLocalStreams[i.id]?this._shimmedLocalStreams[i.id].indexOf(o)===-1&&this._shimmedLocalStreams[i.id].push(o):this._shimmedLocalStreams[i.id]=[i,o],o};const t=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(s){this._shimmedLocalStreams=this._shimmedLocalStreams||{},s.getTracks().forEach(g=>{if(this.getSenders().find(G=>G.track===g))throw new DOMException("Track already exists.","InvalidAccessError")});const i=this.getSenders();t.apply(this,arguments);const o=this.getSenders().filter(g=>i.indexOf(g)===-1);this._shimmedLocalStreams[s.id]=[s].concat(o)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(s){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[s.id],n.apply(this,arguments)};const B=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(s){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},s&&Object.keys(this._shimmedLocalStreams).forEach(i=>{const o=this._shimmedLocalStreams[i].indexOf(s);o!==-1&&this._shimmedLocalStreams[i].splice(o,1),this._shimmedLocalStreams[i].length===1&&delete this._shimmedLocalStreams[i]}),B.apply(this,arguments)}}function TF(e,A){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&A.version>=65)return xF(e);const t=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const d=t.apply(this);return this._reverseStreams=this._reverseStreams||{},d.map(G=>this._reverseStreams[G.id])};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(d){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},d.getTracks().forEach(G=>{if(this.getSenders().find(v=>v.track===G))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[d.id]){const G=new e.MediaStream(d.getTracks());this._streams[d.id]=G,this._reverseStreams[G.id]=d,d=G}n.apply(this,[d])};const B=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(d){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},B.apply(this,[this._streams[d.id]||d]),delete this._reverseStreams[this._streams[d.id]?this._streams[d.id].id:d.id],delete this._streams[d.id]},e.RTCPeerConnection.prototype.addTrack=function(d,G){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const f=[].slice.call(arguments,1);if(f.length!==1||!f[0].getTracks().find(y=>y===d))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(y=>y.track===d))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const H=this._streams[G.id];if(H)H.addTrack(d),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const y=new e.MediaStream([d]);this._streams[G.id]=y,this._reverseStreams[y.id]=G,this.addStream(y)}return this.getSenders().find(y=>y.track===d)};function a(g,d){let G=d.sdp;return Object.keys(g._reverseStreams||[]).forEach(f=>{const v=g._reverseStreams[f],H=g._streams[v.id];G=G.replace(new RegExp(H.id,"g"),v.id)}),new RTCSessionDescription({type:d.type,sdp:G})}function s(g,d){let G=d.sdp;return Object.keys(g._reverseStreams||[]).forEach(f=>{const v=g._reverseStreams[f],H=g._streams[v.id];G=G.replace(new RegExp(v.id,"g"),H.id)}),new RTCSessionDescription({type:d.type,sdp:G})}["createOffer","createAnswer"].forEach(function(g){const d=e.RTCPeerConnection.prototype[g],G={[g](){const f=arguments;return arguments.length&&typeof arguments[0]=="function"?d.apply(this,[H=>{const y=a(this,H);f[0].apply(null,[y])},H=>{f[1]&&f[1].apply(null,H)},arguments[2]]):d.apply(this,arguments).then(H=>a(this,H))}};e.RTCPeerConnection.prototype[g]=G[g]});const i=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return!arguments.length||!arguments[0].type?i.apply(this,arguments):(arguments[0]=s(this,arguments[0]),i.apply(this,arguments))};const o=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const g=o.get.apply(this);return g.type===""?g:a(this,g)}}),e.RTCPeerConnection.prototype.removeTrack=function(d){if(this.signalingState==="closed")throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!d._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(d._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{};let f;Object.keys(this._streams).forEach(v=>{this._streams[v].getTracks().find(y=>d.track===y)&&(f=this._streams[v])}),f&&(f.getTracks().length===1?this.removeStream(this._reverseStreams[f.id]):f.removeTrack(d.track),this.dispatchEvent(new Event("negotiationneeded")))}}function vE(e,A){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(t){const n=e.RTCPeerConnection.prototype[t],B={[t](){return arguments[0]=new(t==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=B[t]})}function RF(e,A){id(e,"negotiationneeded",t=>{const n=t.target;if(!((A.version<72||n.getConfiguration&&n.getConfiguration().sdpSemantics==="plan-b")&&n.signalingState!=="stable"))return t})}var VF=Object.freeze({__proto__:null,fixNegotiationNeeded:RF,shimAddTrackRemoveTrack:TF,shimAddTrackRemoveTrackWithNative:xF,shimGetSendersWithDtmf:PF,shimGetUserMedia:UF,shimMediaStream:DF,shimOnTrack:FF,shimPeerConnection:vE,shimSenderReceiverGetStats:MF});function SF(e,A){const t=e&&e.navigator,n=e&&e.MediaStreamTrack;if(t.getUserMedia=function(B,a,s){CE("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),t.mediaDevices.getUserMedia(B).then(a,s)},!(A.version>55&&"autoGainControl"in t.mediaDevices.getSupportedConstraints())){const B=function(s,i,o){i in s&&!(o in s)&&(s[o]=s[i],delete s[i])},a=t.mediaDevices.getUserMedia.bind(t.mediaDevices);if(t.mediaDevices.getUserMedia=function(s){return typeof s=="object"&&typeof s.audio=="object"&&(s=JSON.parse(JSON.stringify(s)),B(s.audio,"autoGainControl","mozAutoGainControl"),B(s.audio,"noiseSuppression","mozNoiseSuppression")),a(s)},n&&n.prototype.getSettings){const s=n.prototype.getSettings;n.prototype.getSettings=function(){const i=s.apply(this,arguments);return B(i,"mozAutoGainControl","autoGainControl"),B(i,"mozNoiseSuppression","noiseSuppression"),i}}if(n&&n.prototype.applyConstraints){const s=n.prototype.applyConstraints;n.prototype.applyConstraints=function(i){return this.kind==="audio"&&typeof i=="object"&&(i=JSON.parse(JSON.stringify(i)),B(i,"autoGainControl","mozAutoGainControl"),B(i,"noiseSuppression","mozNoiseSuppression")),s.apply(this,[i])}}}}function Vq(e,A){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!(n&&n.video)){const B=new DOMException("getDisplayMedia without video constraints is undefined");return B.name="NotFoundError",B.code=8,Promise.reject(B)}return n.video===!0?n.video={mediaSource:A}:n.video.mediaSource=A,e.navigator.mediaDevices.getUserMedia(n)})}function WF(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function IE(e,A){if(typeof e!="object"||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),A.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(B){const a=e.RTCPeerConnection.prototype[B],s={[B](){return arguments[0]=new(B==="addIceCandidate"?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),a.apply(this,arguments)}};e.RTCPeerConnection.prototype[B]=s[B]});const t={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[a,s,i]=arguments;return n.apply(this,[a||null]).then(o=>{if(A.version<53&&!s)try{o.forEach(g=>{g.type=t[g.type]||g.type})}catch(g){if(g.name!=="TypeError")throw g;o.forEach((d,G)=>{o.set(G,Object.assign({},d,{type:t[d.type]||d.type}))})}return o}).then(s,i)}}function zF(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const A=e.RTCPeerConnection.prototype.getSenders;A&&(e.RTCPeerConnection.prototype.getSenders=function(){const B=A.apply(this,[]);return B.forEach(a=>a._pc=this),B});const t=e.RTCPeerConnection.prototype.addTrack;t&&(e.RTCPeerConnection.prototype.addTrack=function(){const B=t.apply(this,arguments);return B._pc=this,B}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function NF(e){if(!(typeof e=="object"&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const A=e.RTCPeerConnection.prototype.getReceivers;A&&(e.RTCPeerConnection.prototype.getReceivers=function(){const n=A.apply(this,[]);return n.forEach(B=>B._pc=this),n}),id(e,"track",t=>(t.receiver._pc=t.srcElement,t)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function XF(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){CE("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&t.getTracks().includes(n.track)&&this.removeTrack(n)})})}function LF(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function OF(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.addTransceiver;A&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let n=arguments[1]&&arguments[1].sendEncodings;n===void 0&&(n=[]),n=[...n];const B=n.length>0;B&&n.forEach(s=>{if("rid"in s&&!/^[a-z0-9]{0,16}$/i.test(s.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in s&&!(parseFloat(s.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in s&&!(parseFloat(s.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const a=A.apply(this,arguments);if(B){const{sender:s}=a,i=s.getParameters();(!("encodings"in i)||i.encodings.length===1&&Object.keys(i.encodings[0]).length===0)&&(i.encodings=n,s.sendEncodings=n,this.setParametersPromises.push(s.setParameters(i).then(()=>{delete s.sendEncodings}).catch(()=>{delete s.sendEncodings})))}return a})}function JF(e){if(!(typeof e=="object"&&e.RTCRtpSender))return;const A=e.RTCRtpSender.prototype.getParameters;A&&(e.RTCRtpSender.prototype.getParameters=function(){const n=A.apply(this,arguments);return"encodings"in n||(n.encodings=[].concat(this.sendEncodings||[{}])),n})}function KF(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}function jF(e){if(!(typeof e=="object"&&e.RTCPeerConnection))return;const A=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>A.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):A.apply(this,arguments)}}var qF=Object.freeze({__proto__:null,shimAddTransceiver:OF,shimCreateAnswer:jF,shimCreateOffer:KF,shimGetDisplayMedia:Vq,shimGetParameters:JF,shimGetUserMedia:SF,shimOnTrack:WF,shimPeerConnection:IE,shimRTCDataChannel:LF,shimReceiverGetStats:NF,shimRemoveStream:XF,shimSenderGetStats:zF});function _F(e){if(!(typeof e!="object"||!e.RTCPeerConnection)){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const A=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(n){this._localStreams||(this._localStreams=[]),this._localStreams.includes(n)||this._localStreams.push(n),n.getAudioTracks().forEach(B=>A.call(this,B,n)),n.getVideoTracks().forEach(B=>A.call(this,B,n))},e.RTCPeerConnection.prototype.addTrack=function(n){for(var B=arguments.length,a=new Array(B>1?B-1:0),s=1;s<B;s++)a[s-1]=arguments[s];return a&&a.forEach(i=>{this._localStreams?this._localStreams.includes(i)||this._localStreams.push(i):this._localStreams=[i]}),A.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){this._localStreams||(this._localStreams=[]);const n=this._localStreams.indexOf(t);if(n===-1)return;this._localStreams.splice(n,1);const B=t.getTracks();this.getSenders().forEach(a=>{B.includes(a.track)&&this.removeTrack(a)})})}}function $F(e){if(!(typeof e!="object"||!e.RTCPeerConnection)&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(t){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=t),this.addEventListener("track",this._onaddstreampoly=n=>{n.streams.forEach(B=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(B))return;this._remoteStreams.push(B);const a=new Event("addstream");a.stream=B,this.dispatchEvent(a)})})}});const A=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const n=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(B){B.streams.forEach(a=>{if(n._remoteStreams||(n._remoteStreams=[]),n._remoteStreams.indexOf(a)>=0)return;n._remoteStreams.push(a);const s=new Event("addstream");s.stream=a,n.dispatchEvent(s)})}),A.apply(n,arguments)}}}function A2(e){if(typeof e!="object"||!e.RTCPeerConnection)return;const A=e.RTCPeerConnection.prototype,t=A.createOffer,n=A.createAnswer,B=A.setLocalDescription,a=A.setRemoteDescription,s=A.addIceCandidate;A.createOffer=function(g,d){const G=arguments.length>=2?arguments[2]:arguments[0],f=t.apply(this,[G]);return d?(f.then(g,d),Promise.resolve()):f},A.createAnswer=function(g,d){const G=arguments.length>=2?arguments[2]:arguments[0],f=n.apply(this,[G]);return d?(f.then(g,d),Promise.resolve()):f};let i=function(o,g,d){const G=B.apply(this,[o]);return d?(G.then(g,d),Promise.resolve()):G};A.setLocalDescription=i,i=function(o,g,d){const G=a.apply(this,[o]);return d?(G.then(g,d),Promise.resolve()):G},A.setRemoteDescription=i,i=function(o,g,d){const G=s.apply(this,[o]);return d?(G.then(g,d),Promise.resolve()):G},A.addIceCandidate=i}function e2(e){const A=e&&e.navigator;if(A.mediaDevices&&A.mediaDevices.getUserMedia){const t=A.mediaDevices,n=t.getUserMedia.bind(t);A.mediaDevices.getUserMedia=B=>n(t2(B))}!A.getUserMedia&&A.mediaDevices&&A.mediaDevices.getUserMedia&&(A.getUserMedia=(function(n,B,a){A.mediaDevices.getUserMedia(n).then(B,a)}).bind(A))}function t2(e){return e&&e.video!==void 0?Object.assign({},e,{video:YF(e.video)}):e}function n2(e){if(!e.RTCPeerConnection)return;const A=e.RTCPeerConnection;e.RTCPeerConnection=function(n,B){if(n&&n.iceServers){const a=[];for(let s=0;s<n.iceServers.length;s++){let i=n.iceServers[s];i.urls===void 0&&i.url?(CE("RTCIceServer.url","RTCIceServer.urls"),i=JSON.parse(JSON.stringify(i)),i.urls=i.url,delete i.url,a.push(i)):a.push(n.iceServers[s])}n.iceServers=a}return new A(n,B)},e.RTCPeerConnection.prototype=A.prototype,"generateCertificate"in A&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get(){return A.generateCertificate}})}function B2(e){typeof e=="object"&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function a2(e){const A=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(n){if(n){typeof n.offerToReceiveAudio<"u"&&(n.offerToReceiveAudio=!!n.offerToReceiveAudio);const B=this.getTransceivers().find(s=>s.receiver.track.kind==="audio");n.offerToReceiveAudio===!1&&B?B.direction==="sendrecv"?B.setDirection?B.setDirection("sendonly"):B.direction="sendonly":B.direction==="recvonly"&&(B.setDirection?B.setDirection("inactive"):B.direction="inactive"):n.offerToReceiveAudio===!0&&!B&&this.addTransceiver("audio",{direction:"recvonly"}),typeof n.offerToReceiveVideo<"u"&&(n.offerToReceiveVideo=!!n.offerToReceiveVideo);const a=this.getTransceivers().find(s=>s.receiver.track.kind==="video");n.offerToReceiveVideo===!1&&a?a.direction==="sendrecv"?a.setDirection?a.setDirection("sendonly"):a.direction="sendonly":a.direction==="recvonly"&&(a.setDirection?a.setDirection("inactive"):a.direction="inactive"):n.offerToReceiveVideo===!0&&!a&&this.addTransceiver("video",{direction:"recvonly"})}return A.apply(this,arguments)}}function s2(e){typeof e!="object"||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var r2=Object.freeze({__proto__:null,shimAudioContext:s2,shimCallbacksAPI:A2,shimConstraints:t2,shimCreateOfferLegacy:a2,shimGetUserMedia:e2,shimLocalStreamsAPI:_F,shimRTCIceServerUrls:n2,shimRemoteStreamsAPI:$F,shimTrackEventTransceiver:B2}),HE={exports:{}},i2;function Sq(){return i2||(i2=1,(function(e){const A={};A.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},A.localCName=A.generateIdentifier(),A.splitLines=function(t){return t.trim().split(`
156
156
  `).map(n=>n.trim())},A.splitSections=function(t){return t.split(`
157
157
  m=`).map((B,a)=>(a>0?"m="+B:B).trim()+`\r
@@ -466,7 +466,7 @@ attempted value: ${s}
466
466
  Schedule Meet and Greet
467
467
  </button>`),A=A.replace(/\[\[get membership\]\]/gi,()=>`<button onclick="window.__getMembershipFromBolt && window.__getMembershipFromBolt()" style="text-decoration:underline;color:#7D2CFF">
468
468
  Get Membership
469
- </button>`),A=A.replace(/((https?:\/\/[^\s]+))/g,'<a href="$1" target="_blank" style="color:#7D2CFF;text-decoration:underline;">$1</a>'),A},ET=({name:e,index:A,message:t})=>E.jsx("div",{className:"flex justify-end",children:E.jsxs(wB.div,{initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,delay:.1*(A||0)},children:[E.jsx("div",{className:"p-3 bg-[#EFEFEF] break-words",dangerouslySetInnerHTML:{__html:HT(t.content).trim()}}),E.jsxs("p",{className:"justify-self-end pt-1 text-[10px] text-supercare-grey-500",children:[XA(t.created_at).format("M/DD")," â€ĸ ",XA(t.created_at).format("H:mm A")]})]})}),Gv=({name:e,avatar:A,children:t,index:n,message:B,loading:a})=>{const s="guest_sender"in(B||{})&&B.guest_sender==="assistant",i=!s&&B&&B.sender_participant&&B.sender_participant.member&&B.sender_participant?.member?.is_bot;return E.jsxs(wB.div,{className:"",initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,delay:.1*(n||0)},children:[E.jsxs("div",{className:`relative p-3 max-w-[320px] ${s||i||a?"ai_response_bg bg-[#F9F6FF]":"border border-[#E4E4E4]"}`,children:[t?E.jsx(E.Fragment,{children:t}):E.jsx("div",{className:"break-words",dangerouslySetInnerHTML:{__html:HT(B?.content||"").trim()}}),E.jsx("div",{className:"absolute -bottom-2 -right-2"})]}),E.jsxs("p",{className:"justify-self-start pt-1 text-[10px]",children:[!(s||i)&&"sender"in(B||{})&&E.jsx("span",{className:"text-[13px] text-supercare-grey-500}",children:(B?.sender_participant?.member?.user?.email||"").length>20?B.sender_participant.member?.user.email.slice(0,20)+"... ":B.sender_participant.member?.user.email+" â€ĸ "}),!a&&E.jsxs("span",{className:"text-supercare-grey-500",children:[XA(B?.created_at).format("M/DD")," â€ĸ ",XA(B?.created_at).format("H:mm A")]})]})]})},qm=[`👋 Hey, I'm ${wI} !`,"I can clarify any questions you have regarding our services & memberships. How can I help you today?","In case the conversation discontinues, pls enter your email so that we can get back to you"],qlA=()=>{const e=bs(),{initialMessage:A}=xh(),[t,n]=F.useState([]),[B,a]=F.useState(A||""),[s,i]=F.useState(!1),[o,g]=F.useState(!1),[d,G]=F.useState(!1),{organization:f}=kB(),v=f?.members?.[0],{login:H,errMessage:y}=Pg(),Y=()=>{const x=B.trim();if(x==="")return;const V={id:`guest-msg-${Date.now()}-u`,content:x,guest_sender:"user",created_at:new Date};n(k=>[...k,V]),a(""),setTimeout(()=>{g(!0)},1e3),setTimeout(()=>{const k={id:`guest-msg-${Date.now()}-a`,content:qm[2],guest_sender:"assistant",created_at:new Date};n(S=>[...S,k]),g(!1)},1500),setTimeout(()=>{i(!0)},2500),Aa.setState(k=>({...k,chats:{...k.chats,initialMessage:x}}))},Z=()=>{if(B.trim()==="")return;const x={id:`guest-msg-${Date.now()}-u`,content:B.trim(),guest_sender:"user",created_at:new Date};H.mutate({email:B.trim(),initialMessages:[...t,x]}),a("")},P=E.jsx("button",{onClick:()=>{e("/home")},className:"rounded-full border border-black text-sm px-2",children:"End Chat"});return F.useEffect(()=>{let x=1e3;const V=[];if(t.length===0){const k=qm.slice(0,2);k.forEach((K,J)=>{const eA=window.setTimeout(()=>{n(sA=>[...sA,{id:`guest-msg-${J}`,content:K,guest_sender:"assistant",created_at:new Date}])},x+J*1e3);V.push(eA)}),V.push(window.setTimeout(()=>g(!0),500));const S=x+k.length*500;V.push(window.setTimeout(()=>{g(!1),G(!0)},S))}return()=>{V.forEach(k=>clearTimeout(k))}},[]),E.jsx(ro,{showMinMaxIcon:!0,title:`Chat with ${v?.user?.first_name}`,rightComponent:P,children:E.jsxs("div",{className:"flex flex-col justify-between h-full",children:[E.jsxs("div",{className:"pl-2 pr-6 text-sm flex flex-col gap-5 mt-3",children:[t.map((x,V)=>x.guest_sender==="user"?E.jsx(ET,{index:V,name:"You",message:x},V):E.jsxs(wB.div,{className:"flex items-start gap-2",initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6},children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:v?.user?.profile_picture?.url,alt:"Ela Icon",width:40}),E.jsx("p",{className:"text-xs tracking-[0.58px] ai_response_text",children:v?.user?.first_name})]}),E.jsx("div",{className:"flex flex-col items-start gap-1",children:E.jsx(Gv,{index:V,name:v?.user?.first_name||wI,message:x},V)})]})),s&&E.jsxs("div",{className:"",children:[E.jsxs("div",{className:"relative flex items-center -mt-3 ml-[50px]",children:[E.jsx("input",{autoFocus:s,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Your email ID please",value:B,onChange:x=>a(x.target.value),onKeyUp:x=>{if(x.key=="Enter"){if(H.isPending)return;Z()}}})," ",E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:Z,disabled:H.isPending,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:H.isPending?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]}),E.jsx("p",{className:"text-red-500 pl-3 text-sm",children:y})]}),o&&E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:v?.user?.profile_picture?.url,width:40,alt:`${v?.user?.first_name} Icon`}),E.jsx("p",{className:"text-xs ai_response_text",children:v?.user?.first_name})]}),E.jsx(Gv,{loading:!0,name:v?.user?.email||jy,children:E.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(x=>E.jsx(wB.div,{transition:{y:{duration:.8,repeat:1/0,ease:"easeOut",delay:x*.1}},animate:{y:["-100%","0%"]},children:E.jsxs("svg",{width:"7",height:"7",viewBox:"0 0 7 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("circle",{cx:"3.5",cy:"3.5",r:"3",fill:"#F9F6FF",stroke:"url(#paint0_linear_11221_1318)"}),E.jsx("defs",{children:E.jsxs("linearGradient",{id:"paint0_linear_11221_1318",x1:"1.66591e-07",y1:"0.649091",x2:"10.9417",y2:"4.14756",gradientUnits:"userSpaceOnUse",children:[E.jsx("stop",{"stop-color":"#FF7FF2"}),E.jsx("stop",{offset:"0.305","stop-color":"#526FFF"}),E.jsx("stop",{offset:"0.615","stop-color":"#58D3FF"}),E.jsx("stop",{offset:"0.99","stop-color":"#FF9CC5"})]})})]})},x))})})]})]}),!s&&d&&E.jsx("div",{className:"px-3 sticky bottom-0 bg-white pt-2 z-10 pb-3",children:E.jsx(wB.div,{initial:{y:6,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:E.jsxs("div",{className:"relative flex items-center mt-2.5",children:[E.jsx("input",{autoFocus:!0,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Ask AI",value:B,onChange:x=>a(x.target.value),onKeyUp:x=>{if(x.key=="Enter"){if(o)return;Y()}}}),E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:Y,disabled:o,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:o?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]})})})]})})},_lA=(e,A)=>(console.log({chatId:e}),La.get(`/chats/${e}/messages`,{params:A})),$lA=e=>e.sender_participant?.member?.is_bot===!0,AdA=e=>!!e.sender_participant?.patientId,edA=e=>!!(e.sender_participant?.member&&!e.sender_participant?.member?.is_bot),tdA=e=>$lA(e)?wI:AdA(e)?"You":edA(e)?e.sender_participant?.member?.user?.email||"Care Manager":"Guest",ndA=e=>{const A={};if(!e||e.length===0)return A;let t=0,n=null;for(let B=0;B<e.length;B++){const a=e[B],s=tdA(a);s!==n&&(t+=1,n=s);const i=`${s}_${t}`;A[i]||(A[i]=[]),A[i].push(a)}return A},BdA=({messages:e,hasNextPage:A,isFetchingNextPage:t,onLoadMore:n,awaitingTeamReplyCountdown:B,loadingBotResponse:a})=>{const{organization:s}=kB(),i=F.useRef(null),o=F.useRef(e.length),g=F.useRef(!1),d=s?.members?.[0],{awaitingTeamReply:G}=xh(),f=F.useMemo(()=>ndA(e),[e]);console.log({groupedMessages:f}),F.useEffect(()=>{g.current&&!t&&e.length>o.current&&i.current&&i.current.scrollTo({top:i.current.scrollHeight,behavior:"smooth"}),o.current=e.length,g.current=t||!1},[t,e.length]);const v=()=>{n&&n()},H=y=>y.split("_")[0];return E.jsxs("div",{ref:i,className:`flex-1 overflow-y-auto py-3 ${e.length<6&&"h-max"}`,children:[A&&E.jsx("div",{className:"flex justify-center",children:E.jsx("button",{onClick:v,disabled:t,className:"px-4 text-sm pb-3 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed",children:t?"Loading...":"Load older messages"})}),Object.keys(f).map((y,Y)=>H(y)=="You"||H(y)=="Guest"?f[y].filter((Z=>Z.type==="message")).map((Z,P)=>E.jsx(ET,{index:P,name:"You",message:Z},P)):E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[f[y][0].sender_participant?.member?.user?.profile_picture?.url?E.jsx("img",{src:f[y][0].sender_participant?.member?.user?.profile_picture?.url,alt:"Ela Icon",width:40}):E.jsx("div",{className:"w-[2.5rem] h-[2.5rem] leading-[2.5rem] text-[22px] bg-black text-white rounded-full text-center text-xs",children:E.jsx("span",{children:f[y][0].sender_participant?.member?.user?.email[0]})}),f[y][0].sender_participant?.member?.user?.email==d?.user?.email&&E.jsx("p",{className:"text-xs tracking-[0.58px] ai_response_text",children:H(y)})]}),E.jsx("div",{className:"flex flex-col items-start gap-1",children:f[y].filter((Z=>Z.type==="message")).map((Z,P)=>E.jsx(Gv,{index:P,name:Z.sender_participant?.member?.user?.email||"Ela",message:Z},P))})]})),G&&B>0&&B<60&&E.jsxs("div",{className:"text-supercare-grey-500 text-sm text-center my-5",children:[B,"s Awaiting on team"]}),a&&E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:d?.user?.profile_picture?.url,alt:`${d?.user?.first_name} Icon`,width:40}),E.jsx("p",{className:"text-xs ai_response_text",children:d?.user?.first_name})]}),E.jsx(Gv,{loading:!0,index:0,name:d?.user?.email||jy,children:E.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(y=>E.jsx(wB.div,{transition:{y:{duration:.8,repeat:1/0,ease:"easeOut",delay:y*.1}},animate:{y:["-100%","0%"]},children:E.jsxs("svg",{width:"7",height:"7",viewBox:"0 0 7 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("circle",{cx:"3.5",cy:"3.5",r:"3",fill:"#F9F6FF",stroke:"url(#paint0_linear_11221_1318)"}),E.jsx("defs",{children:E.jsxs("linearGradient",{id:"paint0_linear_11221_1318",x1:"1.66591e-07",y1:"0.649091",x2:"10.9417",y2:"4.14756",gradientUnits:"userSpaceOnUse",children:[E.jsx("stop",{"stop-color":"#FF7FF2"}),E.jsx("stop",{offset:"0.305","stop-color":"#526FFF"}),E.jsx("stop",{offset:"0.615","stop-color":"#58D3FF"}),E.jsx("stop",{offset:"0.99","stop-color":"#FF9CC5"})]})})]})},y))})})]})]})},bc=Object.create(null);bc.open="0",bc.close="1",bc.ping="2",bc.pong="3",bc.message="4",bc.upgrade="5",bc.noop="6";const Qv=Object.create(null);Object.keys(bc).forEach(e=>{Qv[bc[e]]=e});const _m={type:"error",data:"parser error"},pT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mT=typeof ArrayBuffer=="function",yT=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$m=({type:e,data:A},t,n)=>pT&&A instanceof Blob?t?n(A):YT(A,n):mT&&(A instanceof ArrayBuffer||yT(A))?t?n(A):YT(new Blob([A]),n):n(bc[e]+(A||"")),YT=(e,A)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];A("b"+(n||""))},t.readAsDataURL(e)};function ZT(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let A3;function adA(e,A){if(pT&&e.data instanceof Blob)return e.data.arrayBuffer().then(ZT).then(A);if(mT&&(e.data instanceof ArrayBuffer||yT(e.data)))return A(ZT(e.data));$m(e,!1,t=>{A3||(A3=new TextEncoder),A(A3.encode(t))})}const kT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kT.length;e++)uf[kT.charCodeAt(e)]=e;const sdA=e=>{let A=e.length*.75,t=e.length,n,B=0,a,s,i,o;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);const g=new ArrayBuffer(A),d=new Uint8Array(g);for(n=0;n<t;n+=4)a=uf[e.charCodeAt(n)],s=uf[e.charCodeAt(n+1)],i=uf[e.charCodeAt(n+2)],o=uf[e.charCodeAt(n+3)],d[B++]=a<<2|s>>4,d[B++]=(s&15)<<4|i>>2,d[B++]=(i&3)<<6|o&63;return g},rdA=typeof ArrayBuffer=="function",e3=(e,A)=>{if(typeof e!="string")return{type:"message",data:UT(e,A)};const t=e.charAt(0);return t==="b"?{type:"message",data:idA(e.substring(1),A)}:Qv[t]?e.length>1?{type:Qv[t],data:e.substring(1)}:{type:Qv[t]}:_m},idA=(e,A)=>{if(rdA){const t=sdA(e);return UT(t,A)}else return{base64:!0,data:e}},UT=(e,A)=>{switch(A){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},DT="",cdA=(e,A)=>{const t=e.length,n=new Array(t);let B=0;e.forEach((a,s)=>{$m(a,!1,i=>{n[s]=i,++B===t&&A(n.join(DT))})})},odA=(e,A)=>{const t=e.split(DT),n=[];for(let B=0;B<t.length;B++){const a=e3(t[B],A);if(n.push(a),a.type==="error")break}return n};function gdA(){return new TransformStream({transform(e,A){adA(e,t=>{const n=t.length;let B;if(n<126)B=new Uint8Array(1),new DataView(B.buffer).setUint8(0,n);else if(n<65536){B=new Uint8Array(3);const a=new DataView(B.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{B=new Uint8Array(9);const a=new DataView(B.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(B[0]|=128),A.enqueue(B),A.enqueue(t)})}})}let t3;function wv(e){return e.reduce((A,t)=>A+t.length,0)}function fv(e,A){if(e[0].length===A)return e.shift();const t=new Uint8Array(A);let n=0;for(let B=0;B<A;B++)t[B]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),t}function ldA(e,A){t3||(t3=new TextDecoder);const t=[];let n=0,B=-1,a=!1;return new TransformStream({transform(s,i){for(t.push(s);;){if(n===0){if(wv(t)<1)break;const o=fv(t,1);a=(o[0]&128)===128,B=o[0]&127,B<126?n=3:B===126?n=1:n=2}else if(n===1){if(wv(t)<2)break;const o=fv(t,2);B=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),n=3}else if(n===2){if(wv(t)<8)break;const o=fv(t,8),g=new DataView(o.buffer,o.byteOffset,o.length),d=g.getUint32(0);if(d>Math.pow(2,21)-1){i.enqueue(_m);break}B=d*Math.pow(2,32)+g.getUint32(4),n=3}else{if(wv(t)<B)break;const o=fv(t,B);i.enqueue(e3(a?o:t3.decode(o),A)),n=0}if(B===0||B>e){i.enqueue(_m);break}}}})}const FT=4;function eB(e){if(e)return ddA(e)}function ddA(e){for(var A in eB.prototype)e[A]=eB.prototype[A];return e}eB.prototype.on=eB.prototype.addEventListener=function(e,A){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(A),this},eB.prototype.once=function(e,A){function t(){this.off(e,t),A.apply(this,arguments)}return t.fn=A,this.on(e,t),this},eB.prototype.off=eB.prototype.removeListener=eB.prototype.removeAllListeners=eB.prototype.removeEventListener=function(e,A){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+e];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,B=0;B<t.length;B++)if(n=t[B],n===A||n.fn===A){t.splice(B,1);break}return t.length===0&&delete this._callbacks["$"+e],this},eB.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var A=new Array(arguments.length-1),t=this._callbacks["$"+e],n=1;n<arguments.length;n++)A[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,B=t.length;n<B;++n)t[n].apply(this,A)}return this},eB.prototype.emitReserved=eB.prototype.emit,eB.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},eB.prototype.hasListeners=function(e){return!!this.listeners(e).length};const hv=typeof Promise=="function"&&typeof Promise.resolve=="function"?A=>Promise.resolve().then(A):(A,t)=>t(A,0),vr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),udA="arraybuffer";function UQA(){}function PT(e,...A){return A.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const GdA=vr.setTimeout,QdA=vr.clearTimeout;function Cv(e,A){A.useNativeTimers?(e.setTimeoutFn=GdA.bind(vr),e.clearTimeoutFn=QdA.bind(vr)):(e.setTimeoutFn=vr.setTimeout.bind(vr),e.clearTimeoutFn=vr.clearTimeout.bind(vr))}const wdA=1.33;function fdA(e){return typeof e=="string"?hdA(e):Math.ceil((e.byteLength||e.size)*wdA)}function hdA(e){let A=0,t=0;for(let n=0,B=e.length;n<B;n++)A=e.charCodeAt(n),A<128?t+=1:A<2048?t+=2:A<55296||A>=57344?t+=3:(n++,t+=4);return t}function MT(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function CdA(e){let A="";for(let t in e)e.hasOwnProperty(t)&&(A.length&&(A+="&"),A+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return A}function bdA(e){let A={},t=e.split("&");for(let n=0,B=t.length;n<B;n++){let a=t[n].split("=");A[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return A}class vdA extends Error{constructor(A,t,n){super(A),this.description=t,this.context=n,this.type="TransportError"}}class n3 extends eB{constructor(A){super(),this.writable=!1,Cv(this,A),this.opts=A,this.query=A.query,this.socket=A.socket,this.supportsBinary=!A.forceBase64}onError(A,t,n){return super.emitReserved("error",new vdA(A,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(A){this.readyState==="open"&&this.write(A)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(A){const t=e3(A,this.socket.binaryType);this.onPacket(t)}onPacket(A){super.emitReserved("packet",A)}onClose(A){this.readyState="closed",super.emitReserved("close",A)}pause(A){}createUri(A,t={}){return A+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const A=this.opts.hostname;return A.indexOf(":")===-1?A:"["+A+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(A){const t=CdA(A);return t.length?"?"+t:""}}class IdA extends n3{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(A){this.readyState="pausing";const t=()=>{this.readyState="paused",A()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(A){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};odA(A,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const A=()=>{this.write([{type:"close"}])};this.readyState==="open"?A():this.once("open",A)}write(A){this.writable=!1,cdA(A,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const A=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MT()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(A,t)}}let xT=!1;try{xT=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HdA=xT;function EdA(){}class pdA extends IdA{constructor(A){if(super(A),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&A.hostname!==location.hostname||n!==A.port}}doWrite(A,t){const n=this.request({method:"POST",data:A});n.on("success",t),n.on("error",(B,a)=>{this.onError("xhr post error",B,a)})}doPoll(){const A=this.request();A.on("data",this.onData.bind(this)),A.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=A}}class vc extends eB{constructor(A,t,n){super(),this.createRequest=A,Cv(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var A;const t=PT(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let B in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(B)&&n.setRequestHeader(B,this._opts.extraHeaders[B])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(A=this._opts.cookieJar)===null||A===void 0||A.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var B;n.readyState===3&&((B=this._opts.cookieJar)===null||B===void 0||B.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(B){this.setTimeoutFn(()=>{this._onError(B)},0);return}typeof document<"u"&&(this._index=vc.requestsCount++,vc.requests[this._index]=this)}_onError(A){this.emitReserved("error",A,this._xhr),this._cleanup(!0)}_cleanup(A){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=EdA,A)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vc.requests[this._index],this._xhr=null}}_onLoad(){const A=this._xhr.responseText;A!==null&&(this.emitReserved("data",A),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(vc.requestsCount=0,vc.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",TT);else if(typeof addEventListener=="function"){const e="onpagehide"in vr?"pagehide":"unload";addEventListener(e,TT,!1)}}function TT(){for(let e in vc.requests)vc.requests.hasOwnProperty(e)&&vc.requests[e].abort()}const mdA=(function(){const e=RT({xdomain:!1});return e&&e.responseType!==null})();class ydA extends pdA{constructor(A){super(A);const t=A&&A.forceBase64;this.supportsBinary=mdA&&!t}request(A={}){return Object.assign(A,{xd:this.xd},this.opts),new vc(RT,this.uri(),A)}}function RT(e){const A=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!A||HdA))return new XMLHttpRequest}catch{}if(!A)try{return new vr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const VT=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class YdA extends n3{get name(){return"websocket"}doOpen(){const A=this.uri(),t=this.opts.protocols,n=VT?{}:PT(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(A,t,n)}catch(B){return this.emitReserved("error",B)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=A=>this.onClose({description:"websocket connection closed",context:A}),this.ws.onmessage=A=>this.onData(A.data),this.ws.onerror=A=>this.onError("websocket error",A)}write(A){this.writable=!1;for(let t=0;t<A.length;t++){const n=A[t],B=t===A.length-1;$m(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}B&&hv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const A=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=MT()),this.supportsBinary||(t.b64=1),this.createUri(A,t)}}const B3=vr.WebSocket||vr.MozWebSocket;class ZdA extends YdA{createSocket(A,t,n){return VT?new B3(A,t,n):t?new B3(A,t):new B3(A)}doWrite(A,t){this.ws.send(t)}}class kdA extends n3{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(A){return this.emitReserved("error",A)}this._transport.closed.then(()=>{this.onClose()}).catch(A=>{this.onError("webtransport error",A)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(A=>{const t=ldA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=A.readable.pipeThrough(t).getReader(),B=gdA();B.readable.pipeTo(A.writable),this._writer=B.writable.getWriter();const a=()=>{n.read().then(({done:i,value:o})=>{i||(this.onPacket(o),a())}).catch(i=>{})};a();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(A){this.writable=!1;for(let t=0;t<A.length;t++){const n=A[t],B=t===A.length-1;this._writer.write(n).then(()=>{B&&hv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var A;(A=this._transport)===null||A===void 0||A.close()}}const UdA={websocket:ZdA,webtransport:kdA,polling:ydA},DdA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FdA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function a3(e){if(e.length>8e3)throw"URI too long";const A=e,t=e.indexOf("["),n=e.indexOf("]");t!=-1&&n!=-1&&(e=e.substring(0,t)+e.substring(t,n).replace(/:/g,";")+e.substring(n,e.length));let B=DdA.exec(e||""),a={},s=14;for(;s--;)a[FdA[s]]=B[s]||"";return t!=-1&&n!=-1&&(a.source=A,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=PdA(a,a.path),a.queryKey=MdA(a,a.query),a}function PdA(e,A){const t=/\/{2,9}/g,n=A.replace(t,"/").split("/");return(A.slice(0,1)=="/"||A.length===0)&&n.splice(0,1),A.slice(-1)=="/"&&n.splice(n.length-1,1),n}function MdA(e,A){const t={};return A.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,B,a){B&&(t[B]=a)}),t}const s3=typeof addEventListener=="function"&&typeof removeEventListener=="function",bv=[];s3&&addEventListener("offline",()=>{bv.forEach(e=>e())},!1);class Og extends eB{constructor(A,t){if(super(),this.binaryType=udA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,A&&typeof A=="object"&&(t=A,A=null),A){const n=a3(A);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=a3(t.host).host);Cv(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const B=n.prototype.name;this.transports.push(B),this._transportsByName[B]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bdA(this.opts.query)),s3&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},bv.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(A){const t=Object.assign({},this.opts.query);t.EIO=FT,t.transport=A,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[A]);return new this._transportsByName[A](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const A=this.opts.rememberUpgrade&&Og.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(A);t.open(),this.setTransport(t)}setTransport(A){this.transport&&this.transport.removeAllListeners(),this.transport=A,A.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Og.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(A){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",A),this.emitReserved("heartbeat"),A.type){case"open":this.onHandshake(JSON.parse(A.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=A.data,this._onError(t);break;case"message":this.emitReserved("data",A.data),this.emitReserved("message",A.data);break}}onHandshake(A){this.emitReserved("handshake",A),this.id=A.sid,this.transport.query.sid=A.sid,this._pingInterval=A.pingInterval,this._pingTimeout=A.pingTimeout,this._maxPayload=A.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const A=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+A,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},A),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const A=this._getWritablePackets();this.transport.send(A),this._prevBufferLen=A.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const B=this.writeBuffer[n].data;if(B&&(t+=fdA(B)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const A=Date.now()>this._pingTimeoutTime;return A&&(this._pingTimeoutTime=0,hv(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),A}write(A,t,n){return this._sendPacket("message",A,t,n),this}send(A,t,n){return this._sendPacket("message",A,t,n),this}_sendPacket(A,t,n,B){if(typeof t=="function"&&(B=t,t=void 0),typeof n=="function"&&(B=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:A,data:t,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),B&&this.once("flush",B),this.flush()}close(){const A=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),A()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():A()}):this.upgrading?n():A()),this}_onError(A){if(Og.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",A),this._onClose("transport error",A)}_onClose(A,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),s3&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=bv.indexOf(this._offlineEventListener);n!==-1&&bv.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",A,t),this.writeBuffer=[],this._prevBufferLen=0}}}Og.protocol=FT;class xdA extends Og{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let A=0;A<this._upgrades.length;A++)this._probe(this._upgrades[A])}_probe(A){let t=this.createTransport(A),n=!1;Og.priorWebsocketSuccess=!1;const B=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",G=>{if(!n)if(G.type==="pong"&&G.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Og.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=t.name,this.emitReserved("upgradeError",f)}}))};function a(){n||(n=!0,d(),t.close(),t=null)}const s=G=>{const f=new Error("probe error: "+G);f.transport=t.name,a(),this.emitReserved("upgradeError",f)};function i(){s("transport closed")}function o(){s("socket closed")}function g(G){t&&G.name!==t.name&&a()}const d=()=>{t.removeListener("open",B),t.removeListener("error",s),t.removeListener("close",i),this.off("close",o),this.off("upgrading",g)};t.once("open",B),t.once("error",s),t.once("close",i),this.once("close",o),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&A!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(A){this._upgrades=this._filterUpgrades(A.upgrades),super.onHandshake(A)}_filterUpgrades(A){const t=[];for(let n=0;n<A.length;n++)~this.transports.indexOf(A[n])&&t.push(A[n]);return t}}let TdA=class extends xdA{constructor(A,t={}){const n=typeof A=="object"?A:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(B=>UdA[B]).filter(B=>!!B)),super(A,n)}};function RdA(e,A="",t){let n=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),n=a3(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+A,n.href=n.protocol+"://"+a+(t&&t.port===n.port?"":":"+n.port),n}const VdA=typeof ArrayBuffer=="function",SdA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ST=Object.prototype.toString,WdA=typeof Blob=="function"||typeof Blob<"u"&&ST.call(Blob)==="[object BlobConstructor]",zdA=typeof File=="function"||typeof File<"u"&&ST.call(File)==="[object FileConstructor]";function r3(e){return VdA&&(e instanceof ArrayBuffer||SdA(e))||WdA&&e instanceof Blob||zdA&&e instanceof File}function vv(e,A){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(vv(e[t]))return!0;return!1}if(r3(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vv(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&vv(e[t]))return!0;return!1}function NdA(e){const A=[],t=e.data,n=e;return n.data=i3(t,A),n.attachments=A.length,{packet:n,buffers:A}}function i3(e,A){if(!e)return e;if(r3(e)){const t={_placeholder:!0,num:A.length};return A.push(e),t}else if(Array.isArray(e)){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=i3(e[n],A);return t}else if(typeof e=="object"&&!(e instanceof Date)){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=i3(e[n],A));return t}return e}function XdA(e,A){return e.data=c3(e.data,A),delete e.attachments,e}function c3(e,A){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<A.length)return A[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=c3(e[t],A);else if(typeof e=="object")for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=c3(e[t],A));return e}const LdA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],OdA=5;var Ke;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class JdA{constructor(A){this.replacer=A}encode(A){return(A.type===Ke.EVENT||A.type===Ke.ACK)&&vv(A)?this.encodeAsBinary({type:A.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:A.nsp,data:A.data,id:A.id}):[this.encodeAsString(A)]}encodeAsString(A){let t=""+A.type;return(A.type===Ke.BINARY_EVENT||A.type===Ke.BINARY_ACK)&&(t+=A.attachments+"-"),A.nsp&&A.nsp!=="/"&&(t+=A.nsp+","),A.id!=null&&(t+=A.id),A.data!=null&&(t+=JSON.stringify(A.data,this.replacer)),t}encodeAsBinary(A){const t=NdA(A),n=this.encodeAsString(t.packet),B=t.buffers;return B.unshift(n),B}}function WT(e){return Object.prototype.toString.call(e)==="[object Object]"}class o3 extends eB{constructor(A){super(),this.reviver=A}add(A){let t;if(typeof A=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(A);const n=t.type===Ke.BINARY_EVENT;n||t.type===Ke.BINARY_ACK?(t.type=n?Ke.EVENT:Ke.ACK,this.reconstructor=new KdA(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(r3(A)||A.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(A),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+A)}decodeString(A){let t=0;const n={type:Number(A.charAt(0))};if(Ke[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ke.BINARY_EVENT||n.type===Ke.BINARY_ACK){const a=t+1;for(;A.charAt(++t)!=="-"&&t!=A.length;);const s=A.substring(a,t);if(s!=Number(s)||A.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(A.charAt(t+1)==="/"){const a=t+1;for(;++t&&!(A.charAt(t)===","||t===A.length););n.nsp=A.substring(a,t)}else n.nsp="/";const B=A.charAt(t+1);if(B!==""&&Number(B)==B){const a=t+1;for(;++t;){const s=A.charAt(t);if(s==null||Number(s)!=s){--t;break}if(t===A.length)break}n.id=Number(A.substring(a,t+1))}if(A.charAt(++t)){const a=this.tryParse(A.substr(t));if(o3.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(A){try{return JSON.parse(A,this.reviver)}catch{return!1}}static isPayloadValid(A,t){switch(A){case Ke.CONNECT:return WT(t);case Ke.DISCONNECT:return t===void 0;case Ke.CONNECT_ERROR:return typeof t=="string"||WT(t);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&LdA.indexOf(t[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class KdA{constructor(A){this.packet=A,this.buffers=[],this.reconPack=A}takeBinaryData(A){if(this.buffers.push(A),this.buffers.length===this.reconPack.attachments){const t=XdA(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const jdA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:o3,Encoder:JdA,get PacketType(){return Ke},protocol:OdA},Symbol.toStringTag,{value:"Module"}));function si(e,A,t){return e.on(A,t),function(){e.off(A,t)}}const qdA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zT extends eB{constructor(A,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=A,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const A=this.io;this.subs=[si(A,"open",this.onopen.bind(this)),si(A,"packet",this.onpacket.bind(this)),si(A,"error",this.onerror.bind(this)),si(A,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...A){return A.unshift("message"),this.emit.apply(this,A),this}emit(A,...t){var n,B,a;if(qdA.hasOwnProperty(A))throw new Error('"'+A.toString()+'" is a reserved event name');if(t.unshift(A),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const s={type:Ke.EVENT,data:t};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,G=t.pop();this._registerAckCallback(d,G),s.id=d}const i=(B=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||B===void 0?void 0:B.writable,o=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!i||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(A,t){var n;const B=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(B===void 0){this.acks[A]=t;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[A];for(let i=0;i<this.sendBuffer.length;i++)this.sendBuffer[i].id===A&&this.sendBuffer.splice(i,1);t.call(this,new Error("operation has timed out"))},B),s=(...i)=>{this.io.clearTimeoutFn(a),t.apply(this,i)};s.withError=!0,this.acks[A]=s}emitWithAck(A,...t){return new Promise((n,B)=>{const a=(s,i)=>s?B(s):n(i);a.withError=!0,t.push(a),this.emit(A,...t)})}_addToQueue(A){let t;typeof A[A.length-1]=="function"&&(t=A.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:A,flags:Object.assign({fromQueue:!0},this.flags)};A.push((B,...a)=>n!==this._queue[0]?void 0:(B!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(B)):(this._queue.shift(),t&&t(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(A=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!A||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(A){A.nsp=this.nsp,this.io._packet(A)}onopen(){typeof this.auth=="function"?this.auth(A=>{this._sendConnectPacket(A)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(A){this.packet({type:Ke.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},A):A})}onerror(A){this.connected||this.emitReserved("connect_error",A)}onclose(A,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",A,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(A=>{if(!this.sendBuffer.some(n=>String(n.id)===A)){const n=this.acks[A];delete this.acks[A],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(A){if(A.nsp===this.nsp)switch(A.type){case Ke.CONNECT:A.data&&A.data.sid?this.onconnect(A.data.sid,A.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(A);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(A);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const n=new Error(A.data.message);n.data=A.data.data,this.emitReserved("connect_error",n);break}}onevent(A){const t=A.data||[];A.id!=null&&t.push(this.ack(A.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(A){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,A)}super.emit.apply(this,A),this._pid&&A.length&&typeof A[A.length-1]=="string"&&(this._lastOffset=A[A.length-1])}ack(A){const t=this;let n=!1;return function(...B){n||(n=!0,t.packet({type:Ke.ACK,id:A,data:B}))}}onack(A){const t=this.acks[A.id];typeof t=="function"&&(delete this.acks[A.id],t.withError&&A.data.unshift(null),t.apply(this,A.data))}onconnect(A,t){this.id=A,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(A=>this.emitEvent(A)),this.receiveBuffer=[],this.sendBuffer.forEach(A=>{this.notifyOutgoingListeners(A),this.packet(A)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(A=>A()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(A){return this.flags.compress=A,this}get volatile(){return this.flags.volatile=!0,this}timeout(A){return this.flags.timeout=A,this}onAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(A),this}prependAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(A),this}offAny(A){if(!this._anyListeners)return this;if(A){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(A===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(A),this}prependAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(A),this}offAnyOutgoing(A){if(!this._anyOutgoingListeners)return this;if(A){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(A===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(A){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,A.data)}}}function ZG(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ZG.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var A=Math.random(),t=Math.floor(A*this.jitter*e);e=(Math.floor(A*10)&1)==0?e-t:e+t}return Math.min(e,this.max)|0},ZG.prototype.reset=function(){this.attempts=0},ZG.prototype.setMin=function(e){this.ms=e},ZG.prototype.setMax=function(e){this.max=e},ZG.prototype.setJitter=function(e){this.jitter=e};class g3 extends eB{constructor(A,t){var n;super(),this.nsps={},this.subs=[],A&&typeof A=="object"&&(t=A,A=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Cv(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ZG({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=A;const B=t.parser||jdA;this.encoder=new B.Encoder,this.decoder=new B.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(A){return arguments.length?(this._reconnection=!!A,A||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(A){return A===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=A,this)}reconnectionDelay(A){var t;return A===void 0?this._reconnectionDelay:(this._reconnectionDelay=A,(t=this.backoff)===null||t===void 0||t.setMin(A),this)}randomizationFactor(A){var t;return A===void 0?this._randomizationFactor:(this._randomizationFactor=A,(t=this.backoff)===null||t===void 0||t.setJitter(A),this)}reconnectionDelayMax(A){var t;return A===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=A,(t=this.backoff)===null||t===void 0||t.setMax(A),this)}timeout(A){return arguments.length?(this._timeout=A,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(A){if(~this._readyState.indexOf("open"))return this;this.engine=new TdA(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const B=si(t,"open",function(){n.onopen(),A&&A()}),a=i=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",i),A?A(i):this.maybeReconnectOnOpen()},s=si(t,"error",a);if(this._timeout!==!1){const i=this._timeout,o=this.setTimeoutFn(()=>{B(),a(new Error("timeout")),t.close()},i);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(B),this.subs.push(s),this}connect(A){return this.open(A)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const A=this.engine;this.subs.push(si(A,"ping",this.onping.bind(this)),si(A,"data",this.ondata.bind(this)),si(A,"error",this.onerror.bind(this)),si(A,"close",this.onclose.bind(this)),si(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(A){try{this.decoder.add(A)}catch(t){this.onclose("parse error",t)}}ondecoded(A){hv(()=>{this.emitReserved("packet",A)},this.setTimeoutFn)}onerror(A){this.emitReserved("error",A)}socket(A,t){let n=this.nsps[A];return n?this._autoConnect&&!n.active&&n.connect():(n=new zT(this,A,t),this.nsps[A]=n),n}_destroy(A){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(A){const t=this.encoder.encode(A);for(let n=0;n<t.length;n++)this.engine.write(t[n],A.options)}cleanup(){this.subs.forEach(A=>A()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(A,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",A,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const A=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{A.skipReconnect||(this.emitReserved("reconnect_attempt",A.backoff.attempts),!A.skipReconnect&&A.open(B=>{B?(A._reconnecting=!1,A.reconnect(),this.emitReserved("reconnect_error",B)):A.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const A=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",A)}}const Gf={};function Qf(e,A){typeof e=="object"&&(A=e,e=void 0),A=A||{};const t=RdA(e,A.path||"/socket.io"),n=t.source,B=t.id,a=t.path,s=Gf[B]&&a in Gf[B].nsps,i=A.forceNew||A["force new connection"]||A.multiplex===!1||s;let o;return i?o=new g3(n,A):(Gf[B]||(Gf[B]=new g3(n,A)),o=Gf[B]),t.query&&!A.query&&(A.query=t.queryKey),o.socket(t.path,A)}Object.assign(Qf,{Manager:g3,Socket:zT,io:Qf,connect:Qf});const NT=F.createContext({io:null,isConnected:!1}),_dA=({children:e})=>{const[A,t]=F.useState(null),[n,B]=F.useState(!1),a=F.useRef(null),s=F.useRef(!1),{token:i}=NZ();return F.useEffect(()=>{if(a.current?.connected||s.current)return;const o="https://api.beta.careshiphealth.com",g=wg("psid")||i,d=wg("woid");if(!g||!d||!o)return;s.current=!0;const G=Qf(`${o}/rt`,{withCredentials:!0,extraHeaders:{Authorization:`Bearer ${g}`,"x-org-id":d,"x-user-context":"lead"}});return a.current=G,t(G),G.on("connect",()=>{B(!0),s.current=!1}),G.on("disconnect",()=>{B(!1),s.current=!1}),G.on("error",f=>{console.error("Socket error:",f),s.current=!1}),()=>{G.connected&&G.disconnect(),a.current=null,t(null),B(!1),s.current=!1}},[i]),E.jsx(NT.Provider,{value:{io:A,isConnected:n},children:e})},$dA=()=>F.useContext(NT),XT=F.createContext({io:null,isConnected:!1}),AuA=({children:e})=>{const[A,t]=F.useState(null),[n,B]=F.useState(!1),a=F.useRef(null),s=F.useRef(!1),{bot_token:i}=NZ();return F.useEffect(()=>{if(a.current?.connected||s.current)return;const o="https://api.beta.careshiphealth.com",g=wg("bot_psid")||i,d=wg("woid");if(!g||!d||!o)return;s.current=!0;const G=Qf(`${o}/rt`,{withCredentials:!0,extraHeaders:{Authorization:`Bearer ${g}`,"x-org-id":d,"x-user-context":"user"}});return a.current=G,t(G),G.on("connect",()=>{B(!0),s.current=!1}),G.on("disconnect",()=>{B(!1),s.current=!1}),G.on("error",f=>{console.error("Socket error:",f),s.current=!1}),()=>{G.connected&&G.disconnect(),a.current=null,t(null),B(!1),s.current=!1}},[i]),E.jsx(XT.Provider,{value:{io:A,isConnected:n},children:e})},euA=()=>F.useContext(XT);var Iv=(e=>(e.EXCELLENT="excellent",e.GOOD="good",e.POOR="poor",e))(Iv||{});const tuA=e=>La.post("/chat-feedback/submit",e),nuA=e=>La.get(`/chat-feedback/check/${e}`),BuA=({isOpen:e,onClose:A,chatId:t,onSubmitSuccess:n})=>{const[B,a]=F.useState(null),[s,i]=F.useState(""),[o,g]=F.useState(!1),[d,G]=F.useState(!1),f=[{value:Iv.EXCELLENT,label:"Excellent",emoji:"🤩",color:"#10B981"},{value:Iv.GOOD,label:"Good",emoji:"😊",color:"#F59E0B"},{value:Iv.POOR,label:"Poor",emoji:"â˜šī¸",color:"#EF4444"}],v=async()=>{if(B)try{g(!0),await tuA({chatId:t,rating:B,comment:s.trim()||void 0}),G(!0),setTimeout(()=>{n?.(),A()},1500)}catch(H){console.error("Failed to submit feedback:",H),alert("Failed to submit feedback. Please try again.")}finally{g(!1)}};return e?E.jsx(YS,{children:E.jsx(wB.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:A,children:E.jsx(wB.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",duration:.3},className:"bg-white rounded-lg max-w-md w-full p-6 shadow-xl",onClick:H=>H.stopPropagation(),children:d?E.jsxs("div",{className:"text-center py-8",children:[E.jsx("div",{className:"text-6xl mb-4",children:"✅"}),E.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Thank you for your feedback!"}),E.jsx("p",{className:"text-gray-600 text-sm",children:"Your feedback helps us improve our service."})]}):E.jsxs(E.Fragment,{children:[E.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"How was your experience?"}),E.jsx("p",{className:"text-gray-600 text-sm mb-6",children:"Please rate your conversation with our assistant"}),E.jsx("div",{className:"grid grid-cols-3 gap-3 mb-6",children:f.map(H=>E.jsxs("button",{onClick:()=>a(H.value),className:`p-4 rounded-lg border-2 transition-all hover:scale-105 ${B===H.value?"border-purple-500 bg-purple-50":"border-gray-200 hover:border-gray-300"}`,children:[E.jsx("div",{className:"text-4xl mb-2",children:H.emoji}),E.jsx("div",{className:"text-sm font-medium text-gray-700",children:H.label})]},H.value))}),E.jsxs("div",{className:"mb-6",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Additional comments (optional)"}),E.jsx("textarea",{value:s,onChange:H=>i(H.target.value),placeholder:"Tell us more about your experience...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-purple-500",rows:3,maxLength:500}),E.jsxs("div",{className:"text-xs text-gray-500 mt-1 text-right",children:[s.length,"/500"]})]}),E.jsxs("div",{className:"flex gap-3",children:[E.jsx("button",{onClick:A,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",disabled:o,children:"Skip"}),E.jsx("button",{onClick:v,disabled:!B||o,className:"flex-1 px-4 py-2 bg-black text-white rounded-lg hover:bg-gray-800 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",children:o?"Submitting...":"Submit"})]})]})})})}):null},auA=()=>{const{token:e}=Pg(),{loginMutation:A}=xh(),t=MH(),n=bs(),{initialMessage:B}=xh(),[a,s]=F.useState(B||""),[i,o]=F.useState(!1),[g,d]=F.useState(!1),[G,f]=F.useState(60),{io:v,isConnected:H}=$dA(),{io:y}=euA(),Y=i0(),{patient:Z}=kB(),P=F.useMemo(()=>Aa.getState().organization,[]),x=F.useMemo(()=>P?.members?.[0],[P]),V=F.useRef(v),k=F.useRef(y),S=F.useMemo(()=>Aa.getState().patient?.id,[Z]),K=F.useRef(!1),J=F.useRef(null),eA=F.useRef(new Set),sA=F.useRef(!1),cA=F.useRef(null),[CA,ZA]=F.useState(!1),[UA,DA]=F.useState(!1),L=F.useRef(!1),j=F.useRef(0);F.useEffect(()=>{V.current=v},[v]),F.useEffect(()=>{k.current=y,console.log("bot scket changing"),console.log({botSocket:y})},[y]),F.useEffect(()=>{K.current=Aa.getState().chats.awaitingTeamReply??!1},[]);const q=Z?.chatMembers&&Z?.chatMembers.length>0?Z.chatMembers[0].chat?.id:null,WA=c0({queryKey:["feedback-status",q],queryFn:async()=>q?(await nuA(q)).data.data:null,enabled:!!q&&!!e,refetchOnWindowFocus:!1}),z=EX({queryKey:["chat-messages",q],queryFn:async({pageParam:NA=1})=>q?(await _lA(q,{page:NA,limit:5})).data:null,enabled:!!q,refetchOnWindowFocus:!0,getNextPageParam:NA=>{if(NA?.meta)return NA.meta.totalPages>NA.meta.currentPage?Number(NA.meta.currentPage)+1:void 0},initialPageParam:1}),_=F.useMemo(()=>z.data?.pages?z.data.pages.flatMap(_A=>_A?.data||[]).reverse():[],[z.data]),kA=F.useCallback(()=>{J.current||(J.current=setInterval(()=>{f(NA=>NA<=1?(clearInterval(J.current),J.current=null,0):NA-1)},1e3))},[]),HA=F.useCallback(()=>{J.current!==null&&(clearInterval(J.current),J.current=null),f(60)},[]),vA=F.useCallback(NA=>{const _A=k.current;console.log({bot:_A}),!(!NA.trim()||!q||!_A||!x?.id)&&(K.current||_A.emit("chat:bot-message",{content:NA.trim(),chatId:q,type:"message",sender:x.id}))},[q,x?.id]),KA=F.useCallback(NA=>{const _A=V.current;console.log({sock:_A,conversationId:q,loadingBotResponse:i,currentPatientCur:S}),!(!NA.trim()||!q||!_A||i||!S)&&(s(""),_A.emit("chat:message",{content:NA.trim(),chatId:q,type:"message",sender:S}),vA(NA))},[q,i,vA]),JA=F.useCallback(()=>{kA(),setTimeout(async()=>{if(K.current){HA(),Aa.setState(Ae=>({chats:{...Ae.chats,awaitingTeamReply:!1}}));const NA=`I am sorry. Looks like everyone is busy at the moment or un-available to respond instantly. We will get back to you ${Z?.email?`on ${Z?.email}`:"through your email"}`,_A=k.current;_A&&x?.id&&_A.emit("chat:message",{content:NA,chatId:q,type:"message",sender:x?.id}),ZA(!0)}},6e4)},[kA,HA,Z?.email,q,x?.id]);F.useEffect(()=>{console.log({initialMessage:B,loginSuccess:A?.isSuccess,messagesQuerySuccess:z?.isSuccess}),A?.isSuccess&&z?.isSuccess&&B&&(console.log("inittt"),vA(B),o(!0),s(""))},[A?.isSuccess,z?.isSuccess,B,vA]);const Ge=NA=>{NA.chatId===q&&!eA.current.has(NA.id)&&(eA.current.add(NA.id),Y.invalidateQueries({queryKey:["chat-messages",q]}),NA.sender_participant?.patientId===S&&!CA&&(o(!0),sA.current=!0,cA.current&&clearTimeout(cA.current),cA.current=setTimeout(()=>{sA.current&&(console.warn("Bot response timeout - clearing loading state"),o(!1),sA.current=!1)},3e4)),ZA(!1),K.current&&NA.sender_participant?.member?.user.id!==x?.id&&!NA.sender_participant.patientId&&(Aa.setState(_A=>({chats:{..._A.chats,awaitingTeamReply:!1}})),K.current=!1))};F.useEffect(()=>{const NA=V.current;if(!(!NA||!q))return NA.emit("chat:join",{chatId:q}),NA.on("chat:messages",Ge),NA.on("error",_A=>{console.error("Socket error:",_A.message)}),()=>{const _A=V.current;k.current,_A&&(_A.emit("chat:leave",{chatId:q}),_A.off("chat:messages",Ge),_A.off("error"))}},[v,q,Y,x?.id]),F.useEffect(()=>{const NA=k.current;if(!NA||!q)return;NA.emit("chat:join",{chatId:q});const _A=Yn=>{console.log("Bot message received:",{message:Yn,conversationId:q}),Yn.chatId===q&&!eA.current.has(Yn.id)&&(cA.current&&(clearTimeout(cA.current),cA.current=null),o(!1),sA.current=!1,eA.current.add(Yn.id),Y.invalidateQueries({queryKey:["chat-messages",q]}),t.updateLoginMutation({}))},Ae=Yn=>{_A(Yn),Aa.setState(ra=>({chats:{...ra.chats,awaitingTeamReply:!0}})),JA()};return NA.on("chat:bot-messages",_A),NA.on("chat:bot-messages:unanswered_query",Ae),NA.on("chat:bot-messages:human_agent_request",Ae),NA.on("chat:bot-messages:book_appointment",Ge),NA.on("chat:bot-messages:schedule_meet_and_greet",Ge),NA.on("chat:bot-messages:get_subscription",Ge),NA.on("error",Yn=>{console.error("Bot socket error:",Yn.message)}),()=>{NA.off("chat:bot-messages",_A),NA.off("chat:bot-messages:unanswered_query",Ae),NA.off("chat:bot-messages:human_agent_request",Ae),NA.off("chat:bot-messages:book_appointment",Ge),NA.off("chat:bot-messages:schedule_meet_and_greet",Ge),NA.off("chat:bot-messages:get_subscription",Ge),NA.off("error"),cA.current&&(clearTimeout(cA.current),cA.current=null)}},[y,q,Y,x?.id,JA]),F.useEffect(()=>Aa.subscribe(_A=>{K.current=_A.chats.awaitingTeamReply??!1}),[]),F.useEffect(()=>{if(!WA.data||!q||L.current)return;const{shouldPromptFeedback:NA,currentMessageCount:_A}=WA.data;if(!(!g||_A<4)&&NA&&j.current!==_A&&(j.current=_A,!i&&!K.current)){const Ae=setTimeout(()=>{DA(!0),L.current=!0},2e3);return()=>clearTimeout(Ae)}},[WA.data,q,g,i,_.length]);const Te=()=>{WA.refetch(),L.current=!1},yn=E.jsx("button",{onClick:()=>{n("/home")},className:"rounded-full border border-black text-sm px-2",children:"End Chat"});return F.useEffect(()=>{if(z.isPending||g)return;if(_.length>0){d(!0);return}const NA=qm.slice(0,2),_A=[];let Ae=500;NA.forEach(ra=>{const ri=setTimeout(()=>{KA(ra)},Ae);_A.push(ri),Ae+=1500});const Yn=setTimeout(()=>{d(!0)},Ae+NA.length*1500);return _A.push(Yn),()=>{_A.forEach(ra=>clearTimeout(ra))}},[z.isPending,_.length,g,KA]),e?E.jsxs(ro,{showMinMaxIcon:!0,title:`Chat with ${x?.user?.first_name}`,rightComponent:yn,children:[E.jsxs("div",{className:"flex flex-col justify-between h-full",children:[E.jsx("div",{className:"pl-2 pr-6 text-sm flex flex-col gap-5 mt-3",children:z.isLoading?E.jsx("div",{className:"flex justify-center mt-10",children:E.jsx(vg,{})}):z.isError?E.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-3 flex items-center justify-center",children:E.jsx("div",{className:"flex flex-col items-center justify-center text-center",children:E.jsx("p",{className:"text-sm text-gray-500 mt-4 max-w-[150px] mx-auto",children:"Error loading chats"})})}):E.jsx(BdA,{messages:_,hasNextPage:z.hasNextPage||!1,isFetchingNextPage:z.isFetchingNextPage,onLoadMore:()=>{z.fetchNextPage()},awaitingTeamReplyCountdown:G,loadingBotResponse:i})}),g&&E.jsx("div",{className:"px-3 sticky bottom-0 bg-white pt-2 z-10 pb-3",children:E.jsx(wB.div,{initial:{y:6,opacity:0},animate:{y:0,opacity:1},transition:{delay:.1},children:E.jsxs("div",{className:"relative flex items-center mt-2.5",children:[E.jsx("input",{autoFocus:!0,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Ask AI",value:a,onChange:NA=>s(NA.target.value),onKeyUp:NA=>{if(NA.key=="Enter"){if(i)return;KA(a)}}}),E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:()=>KA(a),disabled:i,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:i?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]})})})]}),q&&E.jsx(BuA,{isOpen:UA,onClose:()=>DA(!1),chatId:q,onSubmitSuccess:Te})]}):E.jsx(qlA,{})},suA=()=>E.jsx(J1,{children:E.jsxs(j1,{children:[E.jsx(Ki,{path:"*",element:E.jsx(sL,{})}),E.jsx(Ki,{path:"/home",element:E.jsx(Lj,{})}),E.jsx(Ki,{path:"/chat",element:E.jsx(auA,{})}),E.jsx(Ki,{path:"/call-back",element:E.jsx(jlA,{})}),E.jsx(Ki,{path:"/clarity-call",element:E.jsx(kAA,{})}),E.jsx(Ki,{path:"/custom-widget",element:E.jsx(UAA,{})}),E.jsx(Ki,{path:"/meet-and-greet",element:E.jsx(laA,{})}),E.jsx(Ki,{path:"/appointment",element:E.jsx(daA,{})}),E.jsx(Ki,{path:"/subscription-plans",element:E.jsx(LaA,{})})]})}),ruA=new dX,iuA=e=>{const[A,t]=O.useState("");return F.useEffect(()=>{if(RH("wak"),RH("woid"),e?.orgId&&e?.apiKey)return Uu("wak",e.apiKey),Uu("woid",e.orgId),t(e.orgId);if(typeof window<"u"){const B=(()=>{const a=document.getElementById("supercare-09u2ekhbpo-script");if(a)return a;const s=document.currentScript||null;return s||document.querySelector("script[data-org-id],script[data-supercare-org-id]")})();if(B){let a=null,s=null;try{if(B.src){const f=new URL(B.src,window.location.href).searchParams;a=f.get("orgId")||f.get("orgID")||f.get("orgid"),s=f.get("apiKey")||f.get("apikey")||f.get("api_key")}}catch{}const i=B.getAttribute("data-org-id")||B.getAttribute("data-supercare-org-id")||B?.dataset?.orgId||null,o=B.getAttribute("data-api-key")||B.getAttribute("data-supercare-api-key")||B?.dataset?.apiKey||null,g=a||i,d=s||o;d&&Uu("wak",d),g&&(Uu("woid",g),t(g))}}},[e.orgId]),E.jsxs(s1.div,{id:"supercare-09u2ekhbpo-root",className:`${M7} relative !font_graphik`,children:[E.jsx("style",{type:"text/css",children:P7}),E.jsx("style",{type:"text/css",children:x7}),E.jsx(uX,{client:ruA,children:E.jsx(aL,{orgId:A,children:E.jsx(_dA,{children:E.jsx(AuA,{children:E.jsx(vAA,{children:E.jsx(suA,{})})})})})})]})};var l3={exports:{}},wf={},d3={exports:{}},u3={};/**
469
+ </button>`),A=A.replace(/((https?:\/\/[^\s]+))/g,'<a href="$1" target="_blank" style="color:#7D2CFF;text-decoration:underline;">$1</a>'),A},ET=({name:e,index:A,message:t})=>E.jsx("div",{className:"flex justify-end",children:E.jsxs(wB.div,{initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,delay:.1*(A||0)},children:[E.jsx("div",{className:"p-3 bg-[#EFEFEF] break-words",dangerouslySetInnerHTML:{__html:HT(t.content).trim()}}),E.jsxs("p",{className:"justify-self-end pt-1 text-[10px] text-supercare-grey-500",children:[XA(t.created_at).format("M/DD")," â€ĸ ",XA(t.created_at).format("H:mm A")]})]})}),Gv=({name:e,avatar:A,children:t,index:n,message:B,loading:a})=>{const s="guest_sender"in(B||{})&&B.guest_sender==="assistant",i=!s&&B&&B.sender_participant&&B.sender_participant.member&&B.sender_participant?.member?.is_bot;return E.jsxs(wB.div,{className:"",initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6,delay:.1*(n||0)},children:[E.jsxs("div",{className:`relative p-3 max-w-[320px] ${s||i||a?"ai_response_bg bg-[#F9F6FF]":"border border-[#E4E4E4]"}`,children:[t?E.jsx(E.Fragment,{children:t}):E.jsx("div",{className:"break-words",dangerouslySetInnerHTML:{__html:HT(B?.content||"").trim()}}),E.jsx("div",{className:"absolute -bottom-2 -right-2"})]}),E.jsxs("p",{className:"justify-self-start pt-1 text-[10px]",children:[!(s||i)&&"sender"in(B||{})&&E.jsx("span",{className:"text-[13px] text-supercare-grey-500}",children:(B?.sender_participant?.member?.user?.email||"").length>20?B.sender_participant.member?.user.email.slice(0,20)+"... ":B.sender_participant.member?.user.email+" â€ĸ "}),!a&&E.jsxs("span",{className:"text-supercare-grey-500",children:[XA(B?.created_at).format("M/DD")," â€ĸ ",XA(B?.created_at).format("H:mm A")]})]})]})},qm=[`👋 Hey, I'm ${wI} !`,"I can clarify any questions you have regarding our services & memberships. How can I help you today?","In case the conversation discontinues, pls enter your email so that we can get back to you"],qlA=()=>{const e=bs(),{initialMessage:A}=xh(),[t,n]=F.useState([]),[B,a]=F.useState(A||""),[s,i]=F.useState(!1),[o,g]=F.useState(!1),[d,G]=F.useState(!1),{organization:f}=kB(),v=f?.members?.[0],{login:H,errMessage:y}=Pg(),Y=()=>{const x=B.trim();if(x==="")return;const V={id:`guest-msg-${Date.now()}-u`,content:x,guest_sender:"user",created_at:new Date};n(k=>[...k,V]),a(""),setTimeout(()=>{g(!0)},1e3),setTimeout(()=>{const k={id:`guest-msg-${Date.now()}-a`,content:qm[2],guest_sender:"assistant",created_at:new Date};n(S=>[...S,k]),g(!1)},1500),setTimeout(()=>{i(!0)},2500),Aa.setState(k=>({...k,chats:{...k.chats,initialMessage:x}}))},Z=()=>{if(B.trim()==="")return;const x={id:`guest-msg-${Date.now()}-u`,content:B.trim(),guest_sender:"user",created_at:new Date};H.mutate({email:B.trim(),initialMessages:[...t,x]}),a("")},P=E.jsx("button",{onClick:()=>{e("/home")},className:"rounded-full border border-black text-sm px-2",children:"End Chat"});return F.useEffect(()=>{let x=1e3;const V=[];if(t.length===0){const k=qm.slice(0,2);k.forEach((K,J)=>{const eA=window.setTimeout(()=>{n(sA=>[...sA,{id:`guest-msg-${J}`,content:K,guest_sender:"assistant",created_at:new Date}])},x+J*1e3);V.push(eA)}),V.push(window.setTimeout(()=>g(!0),500));const S=x+k.length*500;V.push(window.setTimeout(()=>{g(!1),G(!0)},S))}return()=>{V.forEach(k=>clearTimeout(k))}},[]),E.jsx(ro,{showMinMaxIcon:!0,title:`Chat with ${v?.user?.first_name}`,rightComponent:P,children:E.jsxs("div",{className:"flex flex-col justify-between h-full",children:[E.jsxs("div",{className:"pl-2 pr-6 text-sm flex flex-col gap-5 mt-3",children:[t.map((x,V)=>x.guest_sender==="user"?E.jsx(ET,{index:V,name:"You",message:x},V):E.jsxs(wB.div,{className:"flex items-start gap-2",initial:{y:3,opacity:0},animate:{y:0,opacity:1},transition:{duration:.6},children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:v?.user?.profile_picture?.url,alt:"Ela Icon",width:40}),E.jsx("p",{className:"text-xs tracking-[0.58px] ai_response_text",children:v?.user?.first_name})]}),E.jsx("div",{className:"flex flex-col items-start gap-1",children:E.jsx(Gv,{index:V,name:v?.user?.first_name||wI,message:x},V)})]})),s&&E.jsxs("div",{className:"",children:[E.jsxs("div",{className:"relative flex items-center -mt-3 ml-[50px]",children:[E.jsx("input",{autoFocus:s,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Your email ID please",value:B,onChange:x=>a(x.target.value),onKeyUp:x=>{if(x.key=="Enter"){if(H.isPending)return;Z()}}})," ",E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:Z,disabled:H.isPending,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:H.isPending?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]}),E.jsx("p",{className:"text-red-500 pl-3 text-sm",children:y})]}),o&&E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:v?.user?.profile_picture?.url,width:40,alt:`${v?.user?.first_name} Icon`}),E.jsx("p",{className:"text-xs ai_response_text",children:v?.user?.first_name})]}),E.jsx(Gv,{loading:!0,name:v?.user?.email||jy,children:E.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(x=>E.jsx(wB.div,{transition:{y:{duration:.8,repeat:1/0,ease:"easeOut",delay:x*.1}},animate:{y:["-100%","0%"]},children:E.jsxs("svg",{width:"7",height:"7",viewBox:"0 0 7 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("circle",{cx:"3.5",cy:"3.5",r:"3",fill:"#F9F6FF",stroke:"url(#paint0_linear_11221_1318)"}),E.jsx("defs",{children:E.jsxs("linearGradient",{id:"paint0_linear_11221_1318",x1:"1.66591e-07",y1:"0.649091",x2:"10.9417",y2:"4.14756",gradientUnits:"userSpaceOnUse",children:[E.jsx("stop",{"stop-color":"#FF7FF2"}),E.jsx("stop",{offset:"0.305","stop-color":"#526FFF"}),E.jsx("stop",{offset:"0.615","stop-color":"#58D3FF"}),E.jsx("stop",{offset:"0.99","stop-color":"#FF9CC5"})]})})]})},x))})})]})]}),!s&&d&&E.jsx("div",{className:"px-3 sticky bottom-0 bg-white pt-2 z-10 pb-3",children:E.jsx(wB.div,{initial:{y:6,opacity:0},animate:{y:0,opacity:1},transition:{delay:.4},children:E.jsxs("div",{className:"relative flex items-center mt-2.5",children:[E.jsx("input",{autoFocus:!0,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Ask AI",value:B,onChange:x=>a(x.target.value),onKeyUp:x=>{if(x.key=="Enter"){if(o)return;Y()}}}),E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:Y,disabled:o,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:o?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]})})})]})})},_lA=(e,A)=>(console.log({chatId:e}),La.get(`/chats/${e}/messages`,{params:A})),$lA=e=>e.sender_participant?.member?.is_bot===!0,AdA=e=>!!e.sender_participant?.patientId,edA=e=>!!(e.sender_participant?.member&&!e.sender_participant?.member?.is_bot),tdA=e=>$lA(e)?wI:AdA(e)?"You":edA(e)?e.sender_participant?.member?.user?.email||"Care Manager":"Guest",ndA=e=>{const A={};if(!e||e.length===0)return A;let t=0,n=null;for(let B=0;B<e.length;B++){const a=e[B],s=tdA(a);s!==n&&(t+=1,n=s);const i=`${s}_${t}`;A[i]||(A[i]=[]),A[i].push(a)}return A},BdA=({messages:e,hasNextPage:A,isFetchingNextPage:t,onLoadMore:n,awaitingTeamReplyCountdown:B,loadingBotResponse:a})=>{const{organization:s}=kB(),i=F.useRef(null),o=F.useRef(e.length),g=F.useRef(!1),d=s?.members?.[0],{awaitingTeamReply:G}=xh(),f=F.useMemo(()=>ndA(e),[e]);console.log({groupedMessages:f}),F.useEffect(()=>{g.current&&!t&&e.length>o.current&&i.current&&i.current.scrollTo({top:i.current.scrollHeight,behavior:"smooth"}),o.current=e.length,g.current=t||!1},[t,e.length]);const v=()=>{n&&n()},H=y=>y.split("_")[0];return E.jsxs("div",{ref:i,className:`flex-1 overflow-y-auto py-3 ${e.length<6&&"h-max"}`,children:[A&&E.jsx("div",{className:"flex justify-center",children:E.jsx("button",{onClick:v,disabled:t,className:"px-4 text-sm pb-3 text-gray-600 hover:text-gray-900 disabled:opacity-50 disabled:cursor-not-allowed",children:t?"Loading...":"Load older messages"})}),Object.keys(f).map((y,Y)=>H(y)=="You"||H(y)=="Guest"?f[y].filter((Z=>Z.type==="message")).map((Z,P)=>E.jsx(ET,{index:P,name:"You",message:Z},P)):E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[f[y][0].sender_participant?.member?.user?.profile_picture?.url?E.jsx("img",{src:f[y][0].sender_participant?.member?.user?.profile_picture?.url,alt:"Ela Icon",width:40}):E.jsx("div",{className:"w-[2.5rem] h-[2.5rem] leading-[2.5rem] text-[22px] bg-black text-white rounded-full text-center text-xs",children:E.jsx("span",{children:f[y][0].sender_participant?.member?.user?.email[0]})}),f[y][0].sender_participant?.member?.user?.email==d?.user?.email&&E.jsx("p",{className:"text-xs tracking-[0.58px] ai_response_text",children:H(y)})]}),E.jsx("div",{className:"flex flex-col items-start gap-1",children:f[y].filter((Z=>Z.type==="message")).map((Z,P)=>E.jsx(Gv,{index:P,name:Z.sender_participant?.member?.user?.email||"Ela",message:Z},P))})]})),G&&B>0&&B<60&&E.jsxs("div",{className:"text-supercare-grey-500 text-sm text-center my-5",children:[B,"s Awaiting on team"]}),a&&E.jsxs("div",{className:"flex items-start gap-2",children:[E.jsxs("div",{className:"flex flex-col gap-1 items-center",children:[E.jsx("img",{src:d?.user?.profile_picture?.url,alt:`${d?.user?.first_name} Icon`,width:40}),E.jsx("p",{className:"text-xs ai_response_text",children:d?.user?.first_name})]}),E.jsx(Gv,{loading:!0,index:0,name:d?.user?.email||jy,children:E.jsx("div",{className:"flex items-center gap-1",children:[0,1,2].map(y=>E.jsx(wB.div,{transition:{y:{duration:.8,repeat:1/0,ease:"easeOut",delay:y*.1}},animate:{y:["-100%","0%"]},children:E.jsxs("svg",{width:"7",height:"7",viewBox:"0 0 7 7",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[E.jsx("circle",{cx:"3.5",cy:"3.5",r:"3",fill:"#F9F6FF",stroke:"url(#paint0_linear_11221_1318)"}),E.jsx("defs",{children:E.jsxs("linearGradient",{id:"paint0_linear_11221_1318",x1:"1.66591e-07",y1:"0.649091",x2:"10.9417",y2:"4.14756",gradientUnits:"userSpaceOnUse",children:[E.jsx("stop",{"stop-color":"#FF7FF2"}),E.jsx("stop",{offset:"0.305","stop-color":"#526FFF"}),E.jsx("stop",{offset:"0.615","stop-color":"#58D3FF"}),E.jsx("stop",{offset:"0.99","stop-color":"#FF9CC5"})]})})]})},y))})})]})]})},bc=Object.create(null);bc.open="0",bc.close="1",bc.ping="2",bc.pong="3",bc.message="4",bc.upgrade="5",bc.noop="6";const Qv=Object.create(null);Object.keys(bc).forEach(e=>{Qv[bc[e]]=e});const _m={type:"error",data:"parser error"},pT=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mT=typeof ArrayBuffer=="function",yT=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$m=({type:e,data:A},t,n)=>pT&&A instanceof Blob?t?n(A):YT(A,n):mT&&(A instanceof ArrayBuffer||yT(A))?t?n(A):YT(new Blob([A]),n):n(bc[e]+(A||"")),YT=(e,A)=>{const t=new FileReader;return t.onload=function(){const n=t.result.split(",")[1];A("b"+(n||""))},t.readAsDataURL(e)};function ZT(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let A3;function adA(e,A){if(pT&&e.data instanceof Blob)return e.data.arrayBuffer().then(ZT).then(A);if(mT&&(e.data instanceof ArrayBuffer||yT(e.data)))return A(ZT(e.data));$m(e,!1,t=>{A3||(A3=new TextEncoder),A(A3.encode(t))})}const kT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<kT.length;e++)uf[kT.charCodeAt(e)]=e;const sdA=e=>{let A=e.length*.75,t=e.length,n,B=0,a,s,i,o;e[e.length-1]==="="&&(A--,e[e.length-2]==="="&&A--);const g=new ArrayBuffer(A),d=new Uint8Array(g);for(n=0;n<t;n+=4)a=uf[e.charCodeAt(n)],s=uf[e.charCodeAt(n+1)],i=uf[e.charCodeAt(n+2)],o=uf[e.charCodeAt(n+3)],d[B++]=a<<2|s>>4,d[B++]=(s&15)<<4|i>>2,d[B++]=(i&3)<<6|o&63;return g},rdA=typeof ArrayBuffer=="function",e3=(e,A)=>{if(typeof e!="string")return{type:"message",data:UT(e,A)};const t=e.charAt(0);return t==="b"?{type:"message",data:idA(e.substring(1),A)}:Qv[t]?e.length>1?{type:Qv[t],data:e.substring(1)}:{type:Qv[t]}:_m},idA=(e,A)=>{if(rdA){const t=sdA(e);return UT(t,A)}else return{base64:!0,data:e}},UT=(e,A)=>{switch(A){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},DT="",cdA=(e,A)=>{const t=e.length,n=new Array(t);let B=0;e.forEach((a,s)=>{$m(a,!1,i=>{n[s]=i,++B===t&&A(n.join(DT))})})},odA=(e,A)=>{const t=e.split(DT),n=[];for(let B=0;B<t.length;B++){const a=e3(t[B],A);if(n.push(a),a.type==="error")break}return n};function gdA(){return new TransformStream({transform(e,A){adA(e,t=>{const n=t.length;let B;if(n<126)B=new Uint8Array(1),new DataView(B.buffer).setUint8(0,n);else if(n<65536){B=new Uint8Array(3);const a=new DataView(B.buffer);a.setUint8(0,126),a.setUint16(1,n)}else{B=new Uint8Array(9);const a=new DataView(B.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(B[0]|=128),A.enqueue(B),A.enqueue(t)})}})}let t3;function wv(e){return e.reduce((A,t)=>A+t.length,0)}function fv(e,A){if(e[0].length===A)return e.shift();const t=new Uint8Array(A);let n=0;for(let B=0;B<A;B++)t[B]=e[0][n++],n===e[0].length&&(e.shift(),n=0);return e.length&&n<e[0].length&&(e[0]=e[0].slice(n)),t}function ldA(e,A){t3||(t3=new TextDecoder);const t=[];let n=0,B=-1,a=!1;return new TransformStream({transform(s,i){for(t.push(s);;){if(n===0){if(wv(t)<1)break;const o=fv(t,1);a=(o[0]&128)===128,B=o[0]&127,B<126?n=3:B===126?n=1:n=2}else if(n===1){if(wv(t)<2)break;const o=fv(t,2);B=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),n=3}else if(n===2){if(wv(t)<8)break;const o=fv(t,8),g=new DataView(o.buffer,o.byteOffset,o.length),d=g.getUint32(0);if(d>Math.pow(2,21)-1){i.enqueue(_m);break}B=d*Math.pow(2,32)+g.getUint32(4),n=3}else{if(wv(t)<B)break;const o=fv(t,B);i.enqueue(e3(a?o:t3.decode(o),A)),n=0}if(B===0||B>e){i.enqueue(_m);break}}}})}const FT=4;function eB(e){if(e)return ddA(e)}function ddA(e){for(var A in eB.prototype)e[A]=eB.prototype[A];return e}eB.prototype.on=eB.prototype.addEventListener=function(e,A){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(A),this},eB.prototype.once=function(e,A){function t(){this.off(e,t),A.apply(this,arguments)}return t.fn=A,this.on(e,t),this},eB.prototype.off=eB.prototype.removeListener=eB.prototype.removeAllListeners=eB.prototype.removeEventListener=function(e,A){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var t=this._callbacks["$"+e];if(!t)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,B=0;B<t.length;B++)if(n=t[B],n===A||n.fn===A){t.splice(B,1);break}return t.length===0&&delete this._callbacks["$"+e],this},eB.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var A=new Array(arguments.length-1),t=this._callbacks["$"+e],n=1;n<arguments.length;n++)A[n-1]=arguments[n];if(t){t=t.slice(0);for(var n=0,B=t.length;n<B;++n)t[n].apply(this,A)}return this},eB.prototype.emitReserved=eB.prototype.emit,eB.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},eB.prototype.hasListeners=function(e){return!!this.listeners(e).length};const hv=typeof Promise=="function"&&typeof Promise.resolve=="function"?A=>Promise.resolve().then(A):(A,t)=>t(A,0),vr=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),udA="arraybuffer";function UQA(){}function PT(e,...A){return A.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const GdA=vr.setTimeout,QdA=vr.clearTimeout;function Cv(e,A){A.useNativeTimers?(e.setTimeoutFn=GdA.bind(vr),e.clearTimeoutFn=QdA.bind(vr)):(e.setTimeoutFn=vr.setTimeout.bind(vr),e.clearTimeoutFn=vr.clearTimeout.bind(vr))}const wdA=1.33;function fdA(e){return typeof e=="string"?hdA(e):Math.ceil((e.byteLength||e.size)*wdA)}function hdA(e){let A=0,t=0;for(let n=0,B=e.length;n<B;n++)A=e.charCodeAt(n),A<128?t+=1:A<2048?t+=2:A<55296||A>=57344?t+=3:(n++,t+=4);return t}function MT(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function CdA(e){let A="";for(let t in e)e.hasOwnProperty(t)&&(A.length&&(A+="&"),A+=encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return A}function bdA(e){let A={},t=e.split("&");for(let n=0,B=t.length;n<B;n++){let a=t[n].split("=");A[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return A}class vdA extends Error{constructor(A,t,n){super(A),this.description=t,this.context=n,this.type="TransportError"}}class n3 extends eB{constructor(A){super(),this.writable=!1,Cv(this,A),this.opts=A,this.query=A.query,this.socket=A.socket,this.supportsBinary=!A.forceBase64}onError(A,t,n){return super.emitReserved("error",new vdA(A,t,n)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(A){this.readyState==="open"&&this.write(A)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(A){const t=e3(A,this.socket.binaryType);this.onPacket(t)}onPacket(A){super.emitReserved("packet",A)}onClose(A){this.readyState="closed",super.emitReserved("close",A)}pause(A){}createUri(A,t={}){return A+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const A=this.opts.hostname;return A.indexOf(":")===-1?A:"["+A+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(A){const t=CdA(A);return t.length?"?"+t:""}}class IdA extends n3{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(A){this.readyState="pausing";const t=()=>{this.readyState="paused",A()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||t()})),this.writable||(n++,this.once("drain",function(){--n||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(A){const t=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};odA(A,this.socket.binaryType).forEach(t),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const A=()=>{this.write([{type:"close"}])};this.readyState==="open"?A():this.once("open",A)}write(A){this.writable=!1,cdA(A,t=>{this.doWrite(t,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const A=this.opts.secure?"https":"http",t=this.query||{};return this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=MT()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(A,t)}}let xT=!1;try{xT=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const HdA=xT;function EdA(){}class pdA extends IdA{constructor(A){if(super(A),typeof location<"u"){const t=location.protocol==="https:";let n=location.port;n||(n=t?"443":"80"),this.xd=typeof location<"u"&&A.hostname!==location.hostname||n!==A.port}}doWrite(A,t){const n=this.request({method:"POST",data:A});n.on("success",t),n.on("error",(B,a)=>{this.onError("xhr post error",B,a)})}doPoll(){const A=this.request();A.on("data",this.onData.bind(this)),A.on("error",(t,n)=>{this.onError("xhr poll error",t,n)}),this.pollXhr=A}}class vc extends eB{constructor(A,t,n){super(),this.createRequest=A,Cv(this,n),this._opts=n,this._method=n.method||"GET",this._uri=t,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var A;const t=PT(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this._opts.xd;const n=this._xhr=this.createRequest(t);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let B in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(B)&&n.setRequestHeader(B,this._opts.extraHeaders[B])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(A=this._opts.cookieJar)===null||A===void 0||A.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var B;n.readyState===3&&((B=this._opts.cookieJar)===null||B===void 0||B.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(B){this.setTimeoutFn(()=>{this._onError(B)},0);return}typeof document<"u"&&(this._index=vc.requestsCount++,vc.requests[this._index]=this)}_onError(A){this.emitReserved("error",A,this._xhr),this._cleanup(!0)}_cleanup(A){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=EdA,A)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vc.requests[this._index],this._xhr=null}}_onLoad(){const A=this._xhr.responseText;A!==null&&(this.emitReserved("data",A),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(vc.requestsCount=0,vc.requests={},typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",TT);else if(typeof addEventListener=="function"){const e="onpagehide"in vr?"pagehide":"unload";addEventListener(e,TT,!1)}}function TT(){for(let e in vc.requests)vc.requests.hasOwnProperty(e)&&vc.requests[e].abort()}const mdA=(function(){const e=RT({xdomain:!1});return e&&e.responseType!==null})();class ydA extends pdA{constructor(A){super(A);const t=A&&A.forceBase64;this.supportsBinary=mdA&&!t}request(A={}){return Object.assign(A,{xd:this.xd},this.opts),new vc(RT,this.uri(),A)}}function RT(e){const A=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!A||HdA))return new XMLHttpRequest}catch{}if(!A)try{return new vr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const VT=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class YdA extends n3{get name(){return"websocket"}doOpen(){const A=this.uri(),t=this.opts.protocols,n=VT?{}:PT(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(A,t,n)}catch(B){return this.emitReserved("error",B)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=A=>this.onClose({description:"websocket connection closed",context:A}),this.ws.onmessage=A=>this.onData(A.data),this.ws.onerror=A=>this.onError("websocket error",A)}write(A){this.writable=!1;for(let t=0;t<A.length;t++){const n=A[t],B=t===A.length-1;$m(n,this.supportsBinary,a=>{try{this.doWrite(n,a)}catch{}B&&hv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const A=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=MT()),this.supportsBinary||(t.b64=1),this.createUri(A,t)}}const B3=vr.WebSocket||vr.MozWebSocket;class ZdA extends YdA{createSocket(A,t,n){return VT?new B3(A,t,n):t?new B3(A,t):new B3(A)}doWrite(A,t){this.ws.send(t)}}class kdA extends n3{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(A){return this.emitReserved("error",A)}this._transport.closed.then(()=>{this.onClose()}).catch(A=>{this.onError("webtransport error",A)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(A=>{const t=ldA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=A.readable.pipeThrough(t).getReader(),B=gdA();B.readable.pipeTo(A.writable),this._writer=B.writable.getWriter();const a=()=>{n.read().then(({done:i,value:o})=>{i||(this.onPacket(o),a())}).catch(i=>{})};a();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(A){this.writable=!1;for(let t=0;t<A.length;t++){const n=A[t],B=t===A.length-1;this._writer.write(n).then(()=>{B&&hv(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var A;(A=this._transport)===null||A===void 0||A.close()}}const UdA={websocket:ZdA,webtransport:kdA,polling:ydA},DdA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,FdA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function a3(e){if(e.length>8e3)throw"URI too long";const A=e,t=e.indexOf("["),n=e.indexOf("]");t!=-1&&n!=-1&&(e=e.substring(0,t)+e.substring(t,n).replace(/:/g,";")+e.substring(n,e.length));let B=DdA.exec(e||""),a={},s=14;for(;s--;)a[FdA[s]]=B[s]||"";return t!=-1&&n!=-1&&(a.source=A,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=PdA(a,a.path),a.queryKey=MdA(a,a.query),a}function PdA(e,A){const t=/\/{2,9}/g,n=A.replace(t,"/").split("/");return(A.slice(0,1)=="/"||A.length===0)&&n.splice(0,1),A.slice(-1)=="/"&&n.splice(n.length-1,1),n}function MdA(e,A){const t={};return A.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,B,a){B&&(t[B]=a)}),t}const s3=typeof addEventListener=="function"&&typeof removeEventListener=="function",bv=[];s3&&addEventListener("offline",()=>{bv.forEach(e=>e())},!1);class Og extends eB{constructor(A,t){if(super(),this.binaryType=udA,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,A&&typeof A=="object"&&(t=A,A=null),A){const n=a3(A);t.hostname=n.host,t.secure=n.protocol==="https"||n.protocol==="wss",t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=a3(t.host).host);Cv(this,t),this.secure=t.secure!=null?t.secure:typeof location<"u"&&location.protocol==="https:",t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=t.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},t.transports.forEach(n=>{const B=n.prototype.name;this.transports.push(B),this._transportsByName[B]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=bdA(this.opts.query)),s3&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},bv.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(A){const t=Object.assign({},this.opts.query);t.EIO=FT,t.transport=A,this.id&&(t.sid=this.id);const n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[A]);return new this._transportsByName[A](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const A=this.opts.rememberUpgrade&&Og.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const t=this.createTransport(A);t.open(),this.setTransport(t)}setTransport(A){this.transport&&this.transport.removeAllListeners(),this.transport=A,A.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",t=>this._onClose("transport close",t))}onOpen(){this.readyState="open",Og.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(A){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",A),this.emitReserved("heartbeat"),A.type){case"open":this.onHandshake(JSON.parse(A.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const t=new Error("server error");t.code=A.data,this._onError(t);break;case"message":this.emitReserved("data",A.data),this.emitReserved("message",A.data);break}}onHandshake(A){this.emitReserved("handshake",A),this.id=A.sid,this.transport.query.sid=A.sid,this._pingInterval=A.pingInterval,this._pingTimeout=A.pingTimeout,this._maxPayload=A.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const A=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+A,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},A),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const A=this._getWritablePackets();this.transport.send(A),this._prevBufferLen=A.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let n=0;n<this.writeBuffer.length;n++){const B=this.writeBuffer[n].data;if(B&&(t+=fdA(B)),n>0&&t>this._maxPayload)return this.writeBuffer.slice(0,n);t+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const A=Date.now()>this._pingTimeoutTime;return A&&(this._pingTimeoutTime=0,hv(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),A}write(A,t,n){return this._sendPacket("message",A,t,n),this}send(A,t,n){return this._sendPacket("message",A,t,n),this}_sendPacket(A,t,n,B){if(typeof t=="function"&&(B=t,t=void 0),typeof n=="function"&&(B=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;const a={type:A,data:t,options:n};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),B&&this.once("flush",B),this.flush()}close(){const A=()=>{this._onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),A()},n=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():A()}):this.upgrading?n():A()),this}_onError(A){if(Og.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",A),this._onClose("transport error",A)}_onClose(A,t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),s3&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const n=bv.indexOf(this._offlineEventListener);n!==-1&&bv.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",A,t),this.writeBuffer=[],this._prevBufferLen=0}}}Og.protocol=FT;class xdA extends Og{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let A=0;A<this._upgrades.length;A++)this._probe(this._upgrades[A])}_probe(A){let t=this.createTransport(A),n=!1;Og.priorWebsocketSuccess=!1;const B=()=>{n||(t.send([{type:"ping",data:"probe"}]),t.once("packet",G=>{if(!n)if(G.type==="pong"&&G.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Og.priorWebsocketSuccess=t.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(d(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=t.name,this.emitReserved("upgradeError",f)}}))};function a(){n||(n=!0,d(),t.close(),t=null)}const s=G=>{const f=new Error("probe error: "+G);f.transport=t.name,a(),this.emitReserved("upgradeError",f)};function i(){s("transport closed")}function o(){s("socket closed")}function g(G){t&&G.name!==t.name&&a()}const d=()=>{t.removeListener("open",B),t.removeListener("error",s),t.removeListener("close",i),this.off("close",o),this.off("upgrading",g)};t.once("open",B),t.once("error",s),t.once("close",i),this.once("close",o),this.once("upgrading",g),this._upgrades.indexOf("webtransport")!==-1&&A!=="webtransport"?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(A){this._upgrades=this._filterUpgrades(A.upgrades),super.onHandshake(A)}_filterUpgrades(A){const t=[];for(let n=0;n<A.length;n++)~this.transports.indexOf(A[n])&&t.push(A[n]);return t}}let TdA=class extends xdA{constructor(A,t={}){const n=typeof A=="object"?A:t;(!n.transports||n.transports&&typeof n.transports[0]=="string")&&(n.transports=(n.transports||["polling","websocket","webtransport"]).map(B=>UdA[B]).filter(B=>!!B)),super(A,n)}};function RdA(e,A="",t){let n=e;t=t||typeof location<"u"&&location,e==null&&(e=t.protocol+"//"+t.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=t.protocol+e:e=t.host+e),/^(https?|wss?):\/\//.test(e)||(typeof t<"u"?e=t.protocol+"//"+e:e="https://"+e),n=a3(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const a=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+a+":"+n.port+A,n.href=n.protocol+"://"+a+(t&&t.port===n.port?"":":"+n.port),n}const VdA=typeof ArrayBuffer=="function",SdA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ST=Object.prototype.toString,WdA=typeof Blob=="function"||typeof Blob<"u"&&ST.call(Blob)==="[object BlobConstructor]",zdA=typeof File=="function"||typeof File<"u"&&ST.call(File)==="[object FileConstructor]";function r3(e){return VdA&&(e instanceof ArrayBuffer||SdA(e))||WdA&&e instanceof Blob||zdA&&e instanceof File}function vv(e,A){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(vv(e[t]))return!0;return!1}if(r3(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vv(e.toJSON(),!0);for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&vv(e[t]))return!0;return!1}function NdA(e){const A=[],t=e.data,n=e;return n.data=i3(t,A),n.attachments=A.length,{packet:n,buffers:A}}function i3(e,A){if(!e)return e;if(r3(e)){const t={_placeholder:!0,num:A.length};return A.push(e),t}else if(Array.isArray(e)){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=i3(e[n],A);return t}else if(typeof e=="object"&&!(e instanceof Date)){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=i3(e[n],A));return t}return e}function XdA(e,A){return e.data=c3(e.data,A),delete e.attachments,e}function c3(e,A){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<A.length)return A[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let t=0;t<e.length;t++)e[t]=c3(e[t],A);else if(typeof e=="object")for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t]=c3(e[t],A));return e}const LdA=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],OdA=5;var Ke;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ke||(Ke={}));class JdA{constructor(A){this.replacer=A}encode(A){return(A.type===Ke.EVENT||A.type===Ke.ACK)&&vv(A)?this.encodeAsBinary({type:A.type===Ke.EVENT?Ke.BINARY_EVENT:Ke.BINARY_ACK,nsp:A.nsp,data:A.data,id:A.id}):[this.encodeAsString(A)]}encodeAsString(A){let t=""+A.type;return(A.type===Ke.BINARY_EVENT||A.type===Ke.BINARY_ACK)&&(t+=A.attachments+"-"),A.nsp&&A.nsp!=="/"&&(t+=A.nsp+","),A.id!=null&&(t+=A.id),A.data!=null&&(t+=JSON.stringify(A.data,this.replacer)),t}encodeAsBinary(A){const t=NdA(A),n=this.encodeAsString(t.packet),B=t.buffers;return B.unshift(n),B}}function WT(e){return Object.prototype.toString.call(e)==="[object Object]"}class o3 extends eB{constructor(A){super(),this.reviver=A}add(A){let t;if(typeof A=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");t=this.decodeString(A);const n=t.type===Ke.BINARY_EVENT;n||t.type===Ke.BINARY_ACK?(t.type=n?Ke.EVENT:Ke.ACK,this.reconstructor=new KdA(t),t.attachments===0&&super.emitReserved("decoded",t)):super.emitReserved("decoded",t)}else if(r3(A)||A.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(A),t&&(this.reconstructor=null,super.emitReserved("decoded",t));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+A)}decodeString(A){let t=0;const n={type:Number(A.charAt(0))};if(Ke[n.type]===void 0)throw new Error("unknown packet type "+n.type);if(n.type===Ke.BINARY_EVENT||n.type===Ke.BINARY_ACK){const a=t+1;for(;A.charAt(++t)!=="-"&&t!=A.length;);const s=A.substring(a,t);if(s!=Number(s)||A.charAt(t)!=="-")throw new Error("Illegal attachments");n.attachments=Number(s)}if(A.charAt(t+1)==="/"){const a=t+1;for(;++t&&!(A.charAt(t)===","||t===A.length););n.nsp=A.substring(a,t)}else n.nsp="/";const B=A.charAt(t+1);if(B!==""&&Number(B)==B){const a=t+1;for(;++t;){const s=A.charAt(t);if(s==null||Number(s)!=s){--t;break}if(t===A.length)break}n.id=Number(A.substring(a,t+1))}if(A.charAt(++t)){const a=this.tryParse(A.substr(t));if(o3.isPayloadValid(n.type,a))n.data=a;else throw new Error("invalid payload")}return n}tryParse(A){try{return JSON.parse(A,this.reviver)}catch{return!1}}static isPayloadValid(A,t){switch(A){case Ke.CONNECT:return WT(t);case Ke.DISCONNECT:return t===void 0;case Ke.CONNECT_ERROR:return typeof t=="string"||WT(t);case Ke.EVENT:case Ke.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&LdA.indexOf(t[0])===-1);case Ke.ACK:case Ke.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class KdA{constructor(A){this.packet=A,this.buffers=[],this.reconPack=A}takeBinaryData(A){if(this.buffers.push(A),this.buffers.length===this.reconPack.attachments){const t=XdA(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const jdA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:o3,Encoder:JdA,get PacketType(){return Ke},protocol:OdA},Symbol.toStringTag,{value:"Module"}));function si(e,A,t){return e.on(A,t),function(){e.off(A,t)}}const qdA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class zT extends eB{constructor(A,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=A,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const A=this.io;this.subs=[si(A,"open",this.onopen.bind(this)),si(A,"packet",this.onpacket.bind(this)),si(A,"error",this.onerror.bind(this)),si(A,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...A){return A.unshift("message"),this.emit.apply(this,A),this}emit(A,...t){var n,B,a;if(qdA.hasOwnProperty(A))throw new Error('"'+A.toString()+'" is a reserved event name');if(t.unshift(A),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;const s={type:Ke.EVENT,data:t};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof t[t.length-1]=="function"){const d=this.ids++,G=t.pop();this._registerAckCallback(d,G),s.id=d}const i=(B=(n=this.io.engine)===null||n===void 0?void 0:n.transport)===null||B===void 0?void 0:B.writable,o=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!i||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(A,t){var n;const B=(n=this.flags.timeout)!==null&&n!==void 0?n:this._opts.ackTimeout;if(B===void 0){this.acks[A]=t;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[A];for(let i=0;i<this.sendBuffer.length;i++)this.sendBuffer[i].id===A&&this.sendBuffer.splice(i,1);t.call(this,new Error("operation has timed out"))},B),s=(...i)=>{this.io.clearTimeoutFn(a),t.apply(this,i)};s.withError=!0,this.acks[A]=s}emitWithAck(A,...t){return new Promise((n,B)=>{const a=(s,i)=>s?B(s):n(i);a.withError=!0,t.push(a),this.emit(A,...t)})}_addToQueue(A){let t;typeof A[A.length-1]=="function"&&(t=A.pop());const n={id:this._queueSeq++,tryCount:0,pending:!1,args:A,flags:Object.assign({fromQueue:!0},this.flags)};A.push((B,...a)=>(this._queue[0],B!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(B)):(this._queue.shift(),t&&t(null,...a)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(A=!1){if(!this.connected||this._queue.length===0)return;const t=this._queue[0];t.pending&&!A||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(A){A.nsp=this.nsp,this.io._packet(A)}onopen(){typeof this.auth=="function"?this.auth(A=>{this._sendConnectPacket(A)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(A){this.packet({type:Ke.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},A):A})}onerror(A){this.connected||this.emitReserved("connect_error",A)}onclose(A,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",A,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(A=>{if(!this.sendBuffer.some(n=>String(n.id)===A)){const n=this.acks[A];delete this.acks[A],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(A){if(A.nsp===this.nsp)switch(A.type){case Ke.CONNECT:A.data&&A.data.sid?this.onconnect(A.data.sid,A.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ke.EVENT:case Ke.BINARY_EVENT:this.onevent(A);break;case Ke.ACK:case Ke.BINARY_ACK:this.onack(A);break;case Ke.DISCONNECT:this.ondisconnect();break;case Ke.CONNECT_ERROR:this.destroy();const n=new Error(A.data.message);n.data=A.data.data,this.emitReserved("connect_error",n);break}}onevent(A){const t=A.data||[];A.id!=null&&t.push(this.ack(A.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(A){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const n of t)n.apply(this,A)}super.emit.apply(this,A),this._pid&&A.length&&typeof A[A.length-1]=="string"&&(this._lastOffset=A[A.length-1])}ack(A){const t=this;let n=!1;return function(...B){n||(n=!0,t.packet({type:Ke.ACK,id:A,data:B}))}}onack(A){const t=this.acks[A.id];typeof t=="function"&&(delete this.acks[A.id],t.withError&&A.data.unshift(null),t.apply(this,A.data))}onconnect(A,t){this.id=A,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(A=>this.emitEvent(A)),this.receiveBuffer=[],this.sendBuffer.forEach(A=>{this.notifyOutgoingListeners(A),this.packet(A)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(A=>A()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ke.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(A){return this.flags.compress=A,this}get volatile(){return this.flags.volatile=!0,this}timeout(A){return this.flags.timeout=A,this}onAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(A),this}prependAny(A){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(A),this}offAny(A){if(!this._anyListeners)return this;if(A){const t=this._anyListeners;for(let n=0;n<t.length;n++)if(A===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(A),this}prependAnyOutgoing(A){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(A),this}offAnyOutgoing(A){if(!this._anyOutgoingListeners)return this;if(A){const t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(A===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(A){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const t=this._anyOutgoingListeners.slice();for(const n of t)n.apply(this,A.data)}}}function ZG(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}ZG.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var A=Math.random(),t=Math.floor(A*this.jitter*e);e=(Math.floor(A*10)&1)==0?e-t:e+t}return Math.min(e,this.max)|0},ZG.prototype.reset=function(){this.attempts=0},ZG.prototype.setMin=function(e){this.ms=e},ZG.prototype.setMax=function(e){this.max=e},ZG.prototype.setJitter=function(e){this.jitter=e};class g3 extends eB{constructor(A,t){var n;super(),this.nsps={},this.subs=[],A&&typeof A=="object"&&(t=A,A=void 0),t=t||{},t.path=t.path||"/socket.io",this.opts=t,Cv(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor((n=t.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ZG({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState="closed",this.uri=A;const B=t.parser||jdA;this.encoder=new B.Encoder,this.decoder=new B.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(A){return arguments.length?(this._reconnection=!!A,A||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(A){return A===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=A,this)}reconnectionDelay(A){var t;return A===void 0?this._reconnectionDelay:(this._reconnectionDelay=A,(t=this.backoff)===null||t===void 0||t.setMin(A),this)}randomizationFactor(A){var t;return A===void 0?this._randomizationFactor:(this._randomizationFactor=A,(t=this.backoff)===null||t===void 0||t.setJitter(A),this)}reconnectionDelayMax(A){var t;return A===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=A,(t=this.backoff)===null||t===void 0||t.setMax(A),this)}timeout(A){return arguments.length?(this._timeout=A,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(A){if(~this._readyState.indexOf("open"))return this;this.engine=new TdA(this.uri,this.opts);const t=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;const B=si(t,"open",function(){n.onopen(),A&&A()}),a=i=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",i),A?A(i):this.maybeReconnectOnOpen()},s=si(t,"error",a);if(this._timeout!==!1){const i=this._timeout,o=this.setTimeoutFn(()=>{B(),a(new Error("timeout")),t.close()},i);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(B),this.subs.push(s),this}connect(A){return this.open(A)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const A=this.engine;this.subs.push(si(A,"ping",this.onping.bind(this)),si(A,"data",this.ondata.bind(this)),si(A,"error",this.onerror.bind(this)),si(A,"close",this.onclose.bind(this)),si(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(A){try{this.decoder.add(A)}catch(t){this.onclose("parse error",t)}}ondecoded(A){hv(()=>{this.emitReserved("packet",A)},this.setTimeoutFn)}onerror(A){this.emitReserved("error",A)}socket(A,t){let n=this.nsps[A];return n?this._autoConnect&&!n.active&&n.connect():(n=new zT(this,A,t),this.nsps[A]=n),n}_destroy(A){const t=Object.keys(this.nsps);for(const n of t)if(this.nsps[n].active)return;this._close()}_packet(A){const t=this.encoder.encode(A);for(let n=0;n<t.length;n++)this.engine.write(t[n],A.options)}cleanup(){this.subs.forEach(A=>A()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(A,t){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",A,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const A=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const n=this.setTimeoutFn(()=>{A.skipReconnect||(this.emitReserved("reconnect_attempt",A.backoff.attempts),!A.skipReconnect&&A.open(B=>{B?(A._reconnecting=!1,A.reconnect(),this.emitReserved("reconnect_error",B)):A.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){const A=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",A)}}const Gf={};function Qf(e,A){typeof e=="object"&&(A=e,e=void 0),A=A||{};const t=RdA(e,A.path||"/socket.io"),n=t.source,B=t.id,a=t.path,s=Gf[B]&&a in Gf[B].nsps,i=A.forceNew||A["force new connection"]||A.multiplex===!1||s;let o;return i?o=new g3(n,A):(Gf[B]||(Gf[B]=new g3(n,A)),o=Gf[B]),t.query&&!A.query&&(A.query=t.queryKey),o.socket(t.path,A)}Object.assign(Qf,{Manager:g3,Socket:zT,io:Qf,connect:Qf});const NT=F.createContext({io:null,isConnected:!1}),_dA=({children:e})=>{const[A,t]=F.useState(null),[n,B]=F.useState(!1),a=F.useRef(null),s=F.useRef(!1),{token:i}=NZ();return F.useEffect(()=>{if(a.current?.connected||s.current)return;const o="https://api.beta.careshiphealth.com",g=wg("psid")||i,d=wg("woid");if(!g||!d||!o)return;s.current=!0;const G=Qf(`${o}/rt`,{withCredentials:!0,extraHeaders:{Authorization:`Bearer ${g}`,"x-org-id":d,"x-user-context":"lead"}});return a.current=G,t(G),G.on("connect",()=>{B(!0),s.current=!1}),G.on("disconnect",()=>{B(!1),s.current=!1}),G.on("error",f=>{console.error("Socket error:",f),s.current=!1}),()=>{G.connected&&G.disconnect(),a.current=null,t(null),B(!1),s.current=!1}},[i]),E.jsx(NT.Provider,{value:{io:A,isConnected:n},children:e})},$dA=()=>F.useContext(NT),XT=F.createContext({io:null,isConnected:!1}),AuA=({children:e})=>{const[A,t]=F.useState(null),[n,B]=F.useState(!1),a=F.useRef(null),s=F.useRef(!1),{bot_token:i}=NZ();return F.useEffect(()=>{if(a.current?.connected||s.current)return;const o="https://api.beta.careshiphealth.com",g=wg("bot_psid")||i,d=wg("woid");if(!g||!d||!o)return;s.current=!0;const G=Qf(`${o}/rt`,{withCredentials:!0,extraHeaders:{Authorization:`Bearer ${g}`,"x-org-id":d,"x-user-context":"user"}});return a.current=G,t(G),G.on("connect",()=>{B(!0),s.current=!1}),G.on("disconnect",()=>{B(!1),s.current=!1}),G.on("error",f=>{console.error("Socket error:",f),s.current=!1}),()=>{G.connected&&G.disconnect(),a.current=null,t(null),B(!1),s.current=!1}},[i]),E.jsx(XT.Provider,{value:{io:A,isConnected:n},children:e})},euA=()=>F.useContext(XT);var Iv=(e=>(e.EXCELLENT="excellent",e.GOOD="good",e.POOR="poor",e))(Iv||{});const tuA=e=>La.post("/chat-feedback/submit",e),nuA=e=>La.get(`/chat-feedback/check/${e}`),BuA=({isOpen:e,onClose:A,chatId:t,onSubmitSuccess:n})=>{const[B,a]=F.useState(null),[s,i]=F.useState(""),[o,g]=F.useState(!1),[d,G]=F.useState(!1),f=[{value:Iv.EXCELLENT,label:"Excellent",emoji:"🤩",color:"#10B981"},{value:Iv.GOOD,label:"Good",emoji:"😊",color:"#F59E0B"},{value:Iv.POOR,label:"Poor",emoji:"â˜šī¸",color:"#EF4444"}],v=async()=>{if(B)try{g(!0),await tuA({chatId:t,rating:B,comment:s.trim()||void 0}),G(!0),setTimeout(()=>{n?.(),A()},1500)}catch(H){console.error("Failed to submit feedback:",H),alert("Failed to submit feedback. Please try again.")}finally{g(!1)}};return e?E.jsx(YS,{children:E.jsx(wB.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50 p-4",onClick:A,children:E.jsx(wB.div,{initial:{scale:.9,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.9,opacity:0},transition:{type:"spring",duration:.3},className:"bg-white rounded-lg max-w-md w-full p-6 shadow-xl",onClick:H=>H.stopPropagation(),children:d?E.jsxs("div",{className:"text-center py-8",children:[E.jsx("div",{className:"text-6xl mb-4",children:"✅"}),E.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"Thank you for your feedback!"}),E.jsx("p",{className:"text-gray-600 text-sm",children:"Your feedback helps us improve our service."})]}):E.jsxs(E.Fragment,{children:[E.jsx("h3",{className:"text-xl font-semibold text-gray-900 mb-2",children:"How was your experience?"}),E.jsx("p",{className:"text-gray-600 text-sm mb-6",children:"Please rate your conversation with our assistant"}),E.jsx("div",{className:"grid grid-cols-3 gap-3 mb-6",children:f.map(H=>E.jsxs("button",{onClick:()=>a(H.value),className:`p-4 rounded-lg border-2 transition-all hover:scale-105 ${B===H.value?"border-purple-500 bg-purple-50":"border-gray-200 hover:border-gray-300"}`,children:[E.jsx("div",{className:"text-4xl mb-2",children:H.emoji}),E.jsx("div",{className:"text-sm font-medium text-gray-700",children:H.label})]},H.value))}),E.jsxs("div",{className:"mb-6",children:[E.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Additional comments (optional)"}),E.jsx("textarea",{value:s,onChange:H=>i(H.target.value),placeholder:"Tell us more about your experience...",className:"w-full px-3 py-2 border border-gray-300 rounded-lg resize-none focus:outline-none focus:ring-2 focus:ring-purple-500",rows:3,maxLength:500}),E.jsxs("div",{className:"text-xs text-gray-500 mt-1 text-right",children:[s.length,"/500"]})]}),E.jsxs("div",{className:"flex gap-3",children:[E.jsx("button",{onClick:A,className:"flex-1 px-4 py-2 border border-gray-300 rounded-lg text-gray-700 hover:bg-gray-50 transition-colors",disabled:o,children:"Skip"}),E.jsx("button",{onClick:v,disabled:!B||o,className:"flex-1 px-4 py-2 bg-black text-white rounded-lg hover:bg-gray-800 transition-colors disabled:bg-gray-300 disabled:cursor-not-allowed",children:o?"Submitting...":"Submit"})]})]})})})}):null},auA=()=>{const{token:e}=Pg(),{loginMutation:A}=xh(),t=MH(),n=bs(),{initialMessage:B}=xh(),[a,s]=F.useState(B||""),[i,o]=F.useState(!1),[g,d]=F.useState(!1),[G,f]=F.useState(60),{io:v,isConnected:H}=$dA(),{io:y}=euA(),Y=i0(),{patient:Z}=kB(),P=F.useMemo(()=>Aa.getState().organization,[]),x=F.useMemo(()=>P?.members?.[0],[P]),V=F.useRef(v),k=F.useRef(y),S=F.useMemo(()=>Aa.getState().patient?.id,[Z]),K=F.useRef(!1),J=F.useRef(null),eA=F.useRef(new Set),sA=F.useRef(!1),cA=F.useRef(null),[CA,ZA]=F.useState(!1),[UA,DA]=F.useState(!1),L=F.useRef(!1),j=F.useRef(0);F.useEffect(()=>{V.current=v},[v]),F.useEffect(()=>{k.current=y,console.log("bot scket changing"),console.log({botSocket:y})},[y]),F.useEffect(()=>{K.current=Aa.getState().chats.awaitingTeamReply??!1},[]);const q=Z?.chatMembers&&Z?.chatMembers.length>0?Z.chatMembers[0].chat?.id:null,WA=c0({queryKey:["feedback-status",q],queryFn:async()=>q?(await nuA(q)).data.data:null,enabled:!!q&&!!e,refetchOnWindowFocus:!1}),z=EX({queryKey:["chat-messages",q],queryFn:async({pageParam:NA=1})=>q?(await _lA(q,{page:NA,limit:5})).data:null,enabled:!!q,refetchOnWindowFocus:!0,getNextPageParam:NA=>{if(NA?.meta)return NA.meta.totalPages>NA.meta.currentPage?Number(NA.meta.currentPage)+1:void 0},initialPageParam:1}),_=F.useMemo(()=>z.data?.pages?z.data.pages.flatMap(_A=>_A?.data||[]).reverse():[],[z.data]),kA=F.useCallback(()=>{J.current||(J.current=setInterval(()=>{f(NA=>NA<=1?(clearInterval(J.current),J.current=null,0):NA-1)},1e3))},[]),HA=F.useCallback(()=>{J.current!==null&&(clearInterval(J.current),J.current=null),f(60)},[]),vA=F.useCallback(NA=>{const _A=k.current;console.log({bot:_A}),!(!NA.trim()||!q||!_A||!x?.id)&&(K.current||_A.emit("chat:bot-message",{content:NA.trim(),chatId:q,type:"message",sender:x.id}))},[q,x?.id]),KA=F.useCallback(NA=>{const _A=V.current;console.log({sock:_A,conversationId:q,loadingBotResponse:i,currentPatientCur:S}),!(!NA.trim()||!q||!_A||i||!S)&&(s(""),_A.emit("chat:message",{content:NA.trim(),chatId:q,type:"message",sender:S}),vA(NA))},[q,i,vA]),JA=F.useCallback(()=>{kA(),setTimeout(async()=>{if(K.current){HA(),Aa.setState(Ae=>({chats:{...Ae.chats,awaitingTeamReply:!1}}));const NA=`I am sorry. Looks like everyone is busy at the moment or un-available to respond instantly. We will get back to you ${Z?.email?`on ${Z?.email}`:"through your email"}`,_A=k.current;_A&&x?.id&&_A.emit("chat:message",{content:NA,chatId:q,type:"message",sender:x?.id}),ZA(!0)}},6e4)},[kA,HA,Z?.email,q,x?.id]);F.useEffect(()=>{console.log({initialMessage:B,loginSuccess:A?.isSuccess,messagesQuerySuccess:z?.isSuccess}),A?.isSuccess&&z?.isSuccess&&B&&(console.log("inittt"),vA(B),o(!0),s(""))},[A?.isSuccess,z?.isSuccess,B,vA]);const Ge=NA=>{NA.chatId===q&&!eA.current.has(NA.id)&&(eA.current.add(NA.id),Y.invalidateQueries({queryKey:["chat-messages",q]}),NA.sender_participant?.patientId===S&&!CA&&(o(!0),sA.current=!0,cA.current&&clearTimeout(cA.current),cA.current=setTimeout(()=>{sA.current&&(console.warn("Bot response timeout - clearing loading state"),o(!1),sA.current=!1)},3e4)),ZA(!1),K.current&&NA.sender_participant?.member?.user.id!==x?.id&&!NA.sender_participant.patientId&&(Aa.setState(_A=>({chats:{..._A.chats,awaitingTeamReply:!1}})),K.current=!1))};F.useEffect(()=>{const NA=V.current;if(!(!NA||!q))return NA.emit("chat:join",{chatId:q}),NA.on("chat:messages",Ge),NA.on("error",_A=>{console.error("Socket error:",_A.message)}),()=>{const _A=V.current;k.current,_A&&(_A.emit("chat:leave",{chatId:q}),_A.off("chat:messages",Ge),_A.off("error"))}},[v,q,Y,x?.id]),F.useEffect(()=>{const NA=k.current;if(!NA||!q)return;NA.emit("chat:join",{chatId:q});const _A=Yn=>{console.log("Bot message received:",{message:Yn,conversationId:q}),Yn.chatId===q&&!eA.current.has(Yn.id)&&(cA.current&&(clearTimeout(cA.current),cA.current=null),o(!1),sA.current=!1,eA.current.add(Yn.id),Y.invalidateQueries({queryKey:["chat-messages",q]}),t.updateLoginMutation({}))},Ae=Yn=>{_A(Yn),Aa.setState(ra=>({chats:{...ra.chats,awaitingTeamReply:!0}})),JA()};return NA.on("chat:bot-messages",_A),NA.on("chat:bot-messages:unanswered_query",Ae),NA.on("chat:bot-messages:human_agent_request",Ae),NA.on("chat:bot-messages:book_appointment",Ge),NA.on("chat:bot-messages:schedule_meet_and_greet",Ge),NA.on("chat:bot-messages:get_subscription",Ge),NA.on("error",Yn=>{console.error("Bot socket error:",Yn.message)}),()=>{NA.off("chat:bot-messages",_A),NA.off("chat:bot-messages:unanswered_query",Ae),NA.off("chat:bot-messages:human_agent_request",Ae),NA.off("chat:bot-messages:book_appointment",Ge),NA.off("chat:bot-messages:schedule_meet_and_greet",Ge),NA.off("chat:bot-messages:get_subscription",Ge),NA.off("error"),cA.current&&(clearTimeout(cA.current),cA.current=null)}},[y,q,Y,x?.id,JA]),F.useEffect(()=>Aa.subscribe(_A=>{K.current=_A.chats.awaitingTeamReply??!1}),[]),F.useEffect(()=>{if(!WA.data||!q||L.current)return;const{shouldPromptFeedback:NA,currentMessageCount:_A}=WA.data;if(!(!g||_A<4)&&NA&&j.current!==_A&&(j.current=_A,!i&&!K.current)){const Ae=setTimeout(()=>{DA(!0),L.current=!0},2e3);return()=>clearTimeout(Ae)}},[WA.data,q,g,i,_.length]);const Te=()=>{WA.refetch(),L.current=!1},yn=E.jsx("button",{onClick:()=>{n("/home")},className:"rounded-full border border-black text-sm px-2",children:"End Chat"});return F.useEffect(()=>{if(z.isPending||g)return;if(_.length>0){d(!0);return}const NA=qm.slice(0,2),_A=[];let Ae=500;NA.forEach(ra=>{const ri=setTimeout(()=>{KA(ra)},Ae);_A.push(ri),Ae+=1500});const Yn=setTimeout(()=>{d(!0)},Ae+NA.length*1500);return _A.push(Yn),()=>{_A.forEach(ra=>clearTimeout(ra))}},[z.isPending,_.length,g,KA]),e?E.jsxs(ro,{showMinMaxIcon:!0,title:`Chat with ${x?.user?.first_name}`,rightComponent:yn,children:[E.jsxs("div",{className:"flex flex-col justify-between h-full",children:[E.jsx("div",{className:"pl-2 pr-6 text-sm flex flex-col gap-5 mt-3",children:z.isLoading?E.jsx("div",{className:"flex justify-center mt-10",children:E.jsx(vg,{})}):z.isError?E.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-3 flex items-center justify-center",children:E.jsx("div",{className:"flex flex-col items-center justify-center text-center",children:E.jsx("p",{className:"text-sm text-gray-500 mt-4 max-w-[150px] mx-auto",children:"Error loading chats"})})}):E.jsx(BdA,{messages:_,hasNextPage:z.hasNextPage||!1,isFetchingNextPage:z.isFetchingNextPage,onLoadMore:()=>{z.fetchNextPage()},awaitingTeamReplyCountdown:G,loadingBotResponse:i})}),g&&E.jsx("div",{className:"px-3 sticky bottom-0 bg-white pt-2 z-10 pb-3",children:E.jsx(wB.div,{initial:{y:6,opacity:0},animate:{y:0,opacity:1},transition:{delay:.1},children:E.jsxs("div",{className:"relative flex items-center mt-2.5",children:[E.jsx("input",{autoFocus:!0,className:"py-3.5 pl-3 pr-21 outline-none w-full border border-[#CECECE] text-sm",type:"text",placeholder:"Ask AI",value:a,onChange:NA=>s(NA.target.value),onKeyUp:NA=>{if(NA.key=="Enter"){if(i)return;KA(a)}}}),E.jsx(wB.button,{whileTap:{scale:.95},whileHover:{scale:1},onClick:()=>KA(a),disabled:i,className:"text-sm disabled:opacity-60 disabled:cursor-default absolute right-2 top-1/2 -translate-y-1/2 bg-black hover:shadow-md transition-shadow text-white py-1.5 px-4 hover:opacity-80 rounded-full text-center flex items-center gap-2",children:i?E.jsx(vg,{size:"sm",color:"white"}):"Send"})]})})})]}),q&&E.jsx(BuA,{isOpen:UA,onClose:()=>DA(!1),chatId:q,onSubmitSuccess:Te})]}):E.jsx(qlA,{})},suA=()=>E.jsx(J1,{children:E.jsxs(j1,{children:[E.jsx(Ki,{path:"*",element:E.jsx(sL,{})}),E.jsx(Ki,{path:"/home",element:E.jsx(Lj,{})}),E.jsx(Ki,{path:"/chat",element:E.jsx(auA,{})}),E.jsx(Ki,{path:"/call-back",element:E.jsx(jlA,{})}),E.jsx(Ki,{path:"/clarity-call",element:E.jsx(kAA,{})}),E.jsx(Ki,{path:"/custom-widget",element:E.jsx(UAA,{})}),E.jsx(Ki,{path:"/meet-and-greet",element:E.jsx(laA,{})}),E.jsx(Ki,{path:"/appointment",element:E.jsx(daA,{})}),E.jsx(Ki,{path:"/subscription",element:E.jsx(LaA,{})})]})}),ruA=new dX,iuA=e=>{const[A,t]=O.useState("");return F.useEffect(()=>{if(RH("wak"),RH("woid"),e?.orgId&&e?.apiKey)return Uu("wak",e.apiKey),Uu("woid",e.orgId),t(e.orgId);if(typeof window<"u"){const B=(()=>{const a=document.getElementById("supercare-09u2ekhbpo-script");if(a)return a;const s=document.currentScript||null;return s||document.querySelector("script[data-org-id],script[data-supercare-org-id]")})();if(B){let a=null,s=null;try{if(B.src){const f=new URL(B.src,window.location.href).searchParams;a=f.get("orgId")||f.get("orgID")||f.get("orgid"),s=f.get("apiKey")||f.get("apikey")||f.get("api_key")}}catch{}const i=B.getAttribute("data-org-id")||B.getAttribute("data-supercare-org-id")||B?.dataset?.orgId||null,o=B.getAttribute("data-api-key")||B.getAttribute("data-supercare-api-key")||B?.dataset?.apiKey||null,g=a||i,d=s||o;d&&Uu("wak",d),g&&(Uu("woid",g),t(g))}}},[e.orgId]),E.jsxs(s1.div,{id:"supercare-09u2ekhbpo-root",className:`${M7} relative !font_graphik`,children:[E.jsx("style",{type:"text/css",children:P7}),E.jsx("style",{type:"text/css",children:x7}),E.jsx(uX,{client:ruA,children:E.jsx(aL,{orgId:A,children:E.jsx(_dA,{children:E.jsx(AuA,{children:E.jsx(vAA,{children:E.jsx(suA,{})})})})})})]})};var l3={exports:{}},wf={},d3={exports:{}},u3={};/**
470
470
  * @license React
471
471
  * scheduler.production.js
472
472
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@careshiphealth/widget",
3
3
  "private": false,
4
- "version": "2.1.93",
4
+ "version": "2.1.94",
5
5
  "type": "module",
6
6
  "module": "dist/widget.iife.js",
7
7
  "exports": {