From 4ada0f7b0155f474a928e19d9d0781bafd3a7055 Mon Sep 17 00:00:00 2001 From: MrQuackDuck Date: Thu, 12 Dec 2024 20:57:52 +0000 Subject: [PATCH] deploy: 2b925a6e18d13be23a0a8df9de641cf2fcb04e50 --- assets/{howler-C_yWAEoa.js => howler-BJguJDIs.js} | 2 +- assets/{index-D545Nfkx.js => index-BFrDtn-0.js} | 4 ++-- index.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename assets/{howler-C_yWAEoa.js => howler-BJguJDIs.js} (99%) rename assets/{index-D545Nfkx.js => index-BFrDtn-0.js} (99%) diff --git a/assets/howler-C_yWAEoa.js b/assets/howler-BJguJDIs.js similarity index 99% rename from assets/howler-C_yWAEoa.js rename to assets/howler-BJguJDIs.js index 47421ac..ce01714 100644 --- a/assets/howler-C_yWAEoa.js +++ b/assets/howler-BJguJDIs.js @@ -1,4 +1,4 @@ -import{g as L,c as S}from"./index-D545Nfkx.js";function D(b,g){for(var r=0;ru[i]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var O={};/*! +import{g as L,c as S}from"./index-BFrDtn-0.js";function D(b,g){for(var r=0;ru[i]})}}}return Object.freeze(Object.defineProperty(b,Symbol.toStringTag,{value:"Module"}))}var O={};/*! * howler.js v2.2.4 * howlerjs.com * diff --git a/assets/index-D545Nfkx.js b/assets/index-BFrDtn-0.js similarity index 99% rename from assets/index-D545Nfkx.js rename to assets/index-BFrDtn-0.js index dd7a7ae..8c882b6 100644 --- a/assets/index-D545Nfkx.js +++ b/assets/index-BFrDtn-0.js @@ -543,7 +543,7 @@ var Zq;function st(){return Zq.apply(null,arguments)}function KBe(e){Zq=e}functi [`+s+"] ";for(i in arguments[0])sn(arguments[0],i)&&(a+=i+": "+arguments[0][i]+", ");a=a.slice(0,-2)}else a=arguments[s];r.push(a)}eK(e+` Arguments: `+Array.prototype.slice.call(r).join("")+` `+new Error().stack),n=!1}return t.apply(this,arguments)},t)}var t3={};function tK(e,t){st.deprecationHandler!=null&&st.deprecationHandler(e,t),t3[e]||(eK(t),t3[e]=!0)}st.suppressDeprecationWarnings=!1;st.deprecationHandler=null;function Io(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function XBe(e){var t,n;for(n in e)sn(e,n)&&(t=e[n],Io(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function TN(e,t){var n=pu({},e),r;for(r in t)sn(t,r)&&(ed(e[r])&&ed(t[r])?(n[r]={},pu(n[r],e[r]),pu(n[r],t[r])):t[r]!=null?n[r]=t[r]:delete n[r]);for(r in e)sn(e,r)&&!sn(t,r)&&ed(e[r])&&(n[r]=pu({},n[r]));return n}function TI(e){e!=null&&this.set(e)}var vN;Object.keys?vN=Object.keys:vN=function(e){var t,n=[];for(t in e)sn(e,t)&&n.push(t);return n};var ZBe={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function QBe(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return Io(r)?r.call(t,n):r}function Oo(e,t,n){var r=""+Math.abs(e),a=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,a)).toString().substr(1)+r}var vI=/(\[[^\[]*\])|(\\)?([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,x0=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,aL={},qf={};function vt(e,t,n,r){var a=r;typeof r=="string"&&(a=function(){return this[r]()}),e&&(qf[e]=a),t&&(qf[t[0]]=function(){return Oo(a.apply(this,arguments),t[1],t[2])}),n&&(qf[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function e5e(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function t5e(e){var t=e.match(vI),n,r;for(n=0,r=t.length;n=0&&x0.test(e);)e=e.replace(x0,r),x0.lastIndex=0,n-=1;return e}var n5e={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 r5e(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(vI).map(function(r){return r==="MMMM"||r==="MM"||r==="DD"||r==="dddd"?r.slice(1):r}).join(""),this._longDateFormat[e])}var a5e="Invalid date";function s5e(){return this._invalidDate}var i5e="%d",o5e=/\d{1,2}/;function l5e(e){return this._ordinal.replace("%d",e)}var u5e={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 c5e(e,t,n,r){var a=this._relativeTime[n];return Io(a)?a(e,t,n,r):a.replace(/%d/i,e)}function d5e(e,t){var n=this._relativeTime[e>0?"future":"past"];return Io(n)?n(t):n.replace(/%s/i,t)}var n3={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 ui(e){return typeof e=="string"?n3[e]||n3[e.toLowerCase()]:void 0}function bI(e){var t={},n,r;for(r in e)sn(e,r)&&(n=ui(r),n&&(t[n]=e[r]));return t}var f5e={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 m5e(e){var t=[],n;for(n in e)sn(e,n)&&t.push({unit:n,priority:f5e[n]});return t.sort(function(r,a){return r.priority-a.priority}),t}var rK=/\d/,ks=/\d\d/,aK=/\d{3}/,SI=/\d{4}/,nv=/[+-]?\d{6}/,kn=/\d\d?/,sK=/\d\d\d\d?/,iK=/\d\d\d\d\d\d?/,rv=/\d{1,3}/,MI=/\d{1,4}/,av=/[+-]?\d{1,6}/,Vm=/\d+/,sv=/[+-]?\d+/,_5e=/Z|[+-]\d\d:?\d\d/gi,iv=/Z|[+-]\d\d(?::?\d\d)?/gi,p5e=/[+-]?\d+(\.\d{1,3})?/,Hg=/[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,qm=/^[1-9]\d?/,LI=/^([1-9]\d|\d)/,yy;yy={};function mt(e,t,n){yy[e]=Io(t)?t:function(r,a){return r&&n?n:t}}function h5e(e,t){return sn(yy,e)?yy[e](t._strict,t._locale):new RegExp(g5e(e))}function g5e(e){return Ml(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,r,a,s){return n||r||a||s}))}function Ml(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Js(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function Jt(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=Js(t)),n}var bN={};function En(e,t){var n,r=t,a;for(typeof e=="string"&&(e=[e]),Pl(t)&&(r=function(s,i){i[t]=Jt(s)}),a=e.length,n=0;n68?1900:2e3)};var oK=Km("FullYear",!0);function v5e(){return ov(this.year())}function Km(e,t){return function(n){return n!=null?(lK(this,e,n),st.updateOffset(this,t),this):Xh(this,e)}}function Xh(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function lK(e,t,n){var r,a,s,i,o;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,a=e._isUTC,t){case"Milliseconds":return void(a?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(a?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(a?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(a?r.setUTCHours(n):r.setHours(n));case"Date":return void(a?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,i=e.month(),o=e.date(),o=o===29&&i===1&&!ov(s)?28:o,a?r.setUTCFullYear(s,i,o):r.setFullYear(s,i,o)}}function b5e(e){return e=ui(e),Io(this[e])?this[e]():this}function S5e(e,t){if(typeof e=="object"){e=bI(e);var n=m5e(e),r,a=n.length;for(r=0;r=0?(o=new Date(e+400,t,n,r,a,s,i),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,r,a,s,i),o}function Zh(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Ty(e,t,n){var r=7+t-n,a=(7+Zh(e,0,r).getUTCDay()-t)%7;return-a+r-1}function _K(e,t,n,r,a){var s=(7+n-r)%7,i=Ty(e,r,a),o=1+7*(t-1)+s+i,u,c;return o<=0?(u=e-1,c=Qp(u)+o):o>Qp(e)?(u=e+1,c=o-Qp(e)):(u=e,c=o),{year:u,dayOfYear:c}}function Qh(e,t,n){var r=Ty(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1,s,i;return a<1?(i=e.year()-1,s=a+Ll(i,t,n)):a>Ll(e.year(),t,n)?(s=a-Ll(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function Ll(e,t,n){var r=Ty(e,t,n),a=Ty(e+1,t,n);return(Qp(e)-r+a)/7}vt("w",["ww",2],"wo","week");vt("W",["WW",2],"Wo","isoWeek");mt("w",kn,qm);mt("ww",kn,ks);mt("W",kn,qm);mt("WW",kn,ks);jg(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=Jt(e)});function P5e(e){return Qh(e,this._week.dow,this._week.doy).week}var Y5e={dow:0,doy:6};function F5e(){return this._week.dow}function U5e(){return this._week.doy}function H5e(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function j5e(e){var t=Qh(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}vt("d",0,"do","day");vt("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)});vt("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)});vt("dddd",0,0,function(e){return this.localeData().weekdays(this,e)});vt("e",0,0,"weekday");vt("E",0,0,"isoWeekday");mt("d",kn);mt("e",kn);mt("E",kn);mt("dd",function(e,t){return t.weekdaysMinRegex(e)});mt("ddd",function(e,t){return t.weekdaysShortRegex(e)});mt("dddd",function(e,t){return t.weekdaysRegex(e)});jg(["dd","ddd","dddd"],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);a!=null?t.d=a:jt(n).invalidWeekday=e});jg(["d","e","E"],function(e,t,n,r){t[r]=Jt(e)});function B5e(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function $5e(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function AI(e,t){return e.slice(t,7).concat(e.slice(0,t))}var W5e="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),pK="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),G5e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),z5e=Hg,V5e=Hg,q5e=Hg;function K5e(e,t){var n=Wi(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?AI(n,this._week.dow):e?n[e.day()]:n}function J5e(e){return e===!0?AI(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function X5e(e){return e===!0?AI(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Z5e(e,t,n){var r,a,s,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=Ro([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?t==="dddd"?(a=er.call(this._weekdaysParse,i),a!==-1?a:null):t==="ddd"?(a=er.call(this._shortWeekdaysParse,i),a!==-1?a:null):(a=er.call(this._minWeekdaysParse,i),a!==-1?a:null):t==="dddd"?(a=er.call(this._weekdaysParse,i),a!==-1||(a=er.call(this._shortWeekdaysParse,i),a!==-1)?a:(a=er.call(this._minWeekdaysParse,i),a!==-1?a:null)):t==="ddd"?(a=er.call(this._shortWeekdaysParse,i),a!==-1||(a=er.call(this._weekdaysParse,i),a!==-1)?a:(a=er.call(this._minWeekdaysParse,i),a!==-1?a:null)):(a=er.call(this._minWeekdaysParse,i),a!==-1||(a=er.call(this._weekdaysParse,i),a!==-1)?a:(a=er.call(this._shortWeekdaysParse,i),a!==-1?a:null))}function Q5e(e,t,n){var r,a,s;if(this._weekdaysParseExact)return Z5e.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(a=Ro([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(a,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(a,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(a,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(a,"")+"|^"+this.weekdaysShort(a,"")+"|^"+this.weekdaysMin(a,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&t==="dddd"&&this._fullWeekdaysParse[r].test(e))return r;if(n&&t==="ddd"&&this._shortWeekdaysParse[r].test(e))return r;if(n&&t==="dd"&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function e8e(e){if(!this.isValid())return e!=null?this:NaN;var t=Xh(this,"Day");return e!=null?(e=B5e(e,this.localeData()),this.add(e-t,"d")):t}function t8e(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function n8e(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=$5e(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function r8e(e){return this._weekdaysParseExact?(sn(this,"_weekdaysRegex")||wI.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(sn(this,"_weekdaysRegex")||(this._weekdaysRegex=z5e),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function a8e(e){return this._weekdaysParseExact?(sn(this,"_weekdaysRegex")||wI.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(sn(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=V5e),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function s8e(e){return this._weekdaysParseExact?(sn(this,"_weekdaysRegex")||wI.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(sn(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=q5e),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function wI(){function e(d,_){return _.length-d.length}var t=[],n=[],r=[],a=[],s,i,o,u,c;for(s=0;s<7;s++)i=Ro([2e3,1]).day(s),o=Ml(this.weekdaysMin(i,"")),u=Ml(this.weekdaysShort(i,"")),c=Ml(this.weekdays(i,"")),t.push(o),n.push(u),r.push(c),a.push(o),a.push(u),a.push(c);t.sort(e),n.sort(e),r.sort(e),a.sort(e),this._weekdaysRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function OI(){return this.hours()%12||12}function i8e(){return this.hours()||24}vt("H",["HH",2],0,"hour");vt("h",["hh",2],0,OI);vt("k",["kk",2],0,i8e);vt("hmm",0,0,function(){return""+OI.apply(this)+Oo(this.minutes(),2)});vt("hmmss",0,0,function(){return""+OI.apply(this)+Oo(this.minutes(),2)+Oo(this.seconds(),2)});vt("Hmm",0,0,function(){return""+this.hours()+Oo(this.minutes(),2)});vt("Hmmss",0,0,function(){return""+this.hours()+Oo(this.minutes(),2)+Oo(this.seconds(),2)});function hK(e,t){vt(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}hK("a",!0);hK("A",!1);function gK(e,t){return t._meridiemParse}mt("a",gK);mt("A",gK);mt("H",kn,LI);mt("h",kn,qm);mt("k",kn,qm);mt("HH",kn,ks);mt("hh",kn,ks);mt("kk",kn,ks);mt("hmm",sK);mt("hmmss",iK);mt("Hmm",sK);mt("Hmmss",iK);En(["H","HH"],yr);En(["k","kk"],function(e,t,n){var r=Jt(e);t[yr]=r===24?0:r});En(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e});En(["h","hh"],function(e,t,n){t[yr]=Jt(e),jt(n).bigHour=!0});En("hmm",function(e,t,n){var r=e.length-2;t[yr]=Jt(e.substr(0,r)),t[Di]=Jt(e.substr(r)),jt(n).bigHour=!0});En("hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[yr]=Jt(e.substr(0,r)),t[Di]=Jt(e.substr(r,2)),t[El]=Jt(e.substr(a)),jt(n).bigHour=!0});En("Hmm",function(e,t,n){var r=e.length-2;t[yr]=Jt(e.substr(0,r)),t[Di]=Jt(e.substr(r))});En("Hmmss",function(e,t,n){var r=e.length-4,a=e.length-2;t[yr]=Jt(e.substr(0,r)),t[Di]=Jt(e.substr(r,2)),t[El]=Jt(e.substr(a))});function o8e(e){return(e+"").toLowerCase().charAt(0)==="p"}var l8e=/[ap]\.?m?\.?/i,u8e=Km("Hours",!0);function c8e(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var EK={calendar:ZBe,longDateFormat:n5e,invalidDate:a5e,ordinal:i5e,dayOfMonthOrdinalParse:o5e,relativeTime:u5e,months:L5e,monthsShort:uK,week:Y5e,weekdays:W5e,weekdaysMin:G5e,weekdaysShort:pK,meridiemParse:l8e},In={},gp={},eg;function d8e(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n0;){if(a=lv(s.slice(0,n).join("-")),a)return a;if(r&&r.length>=n&&d8e(s,r)>=n-1)break;n--}t++}return eg}function m8e(e){return!!(e&&e.match("^[^/\\\\]*$"))}function lv(e){var t=null,n;if(In[e]===void 0&&typeof module<"u"&&module&&module.exports&&m8e(e))try{t=eg._abbr,n=require,n("./locale/"+e),Ou(t)}catch{In[e]=null}return In[e]}function Ou(e,t){var n;return e&&(Pa(t)?n=jl(e):n=DI(e,t),n?eg=n:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),eg._abbr}function DI(e,t){if(t!==null){var n,r=EK;if(t.abbr=e,In[e]!=null)tK("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."),r=In[e]._config;else if(t.parentLocale!=null)if(In[t.parentLocale]!=null)r=In[t.parentLocale]._config;else if(n=lv(t.parentLocale),n!=null)r=n._config;else return gp[t.parentLocale]||(gp[t.parentLocale]=[]),gp[t.parentLocale].push({name:e,config:t}),null;return In[e]=new TI(TN(r,t)),gp[e]&&gp[e].forEach(function(a){DI(a.name,a.config)}),Ou(e),In[e]}else return delete In[e],null}function _8e(e,t){if(t!=null){var n,r,a=EK;In[e]!=null&&In[e].parentLocale!=null?In[e].set(TN(In[e]._config,t)):(r=lv(e),r!=null&&(a=r._config),t=TN(a,t),r==null&&(t.abbr=e),n=new TI(t),n.parentLocale=In[e],In[e]=n),Ou(e)}else In[e]!=null&&(In[e].parentLocale!=null?(In[e]=In[e].parentLocale,e===Ou()&&Ou(e)):In[e]!=null&&delete In[e]);return In[e]}function jl(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return eg;if(!Wi(e)){if(t=lv(e),t)return t;e=[e]}return f8e(e)}function p8e(){return vN(In)}function kI(e){var t,n=e._a;return n&&jt(e).overflow===-2&&(t=n[gl]<0||n[gl]>11?gl:n[mo]<1||n[mo]>xI(n[ea],n[gl])?mo:n[yr]<0||n[yr]>24||n[yr]===24&&(n[Di]!==0||n[El]!==0||n[$c]!==0)?yr:n[Di]<0||n[Di]>59?Di:n[El]<0||n[El]>59?El:n[$c]<0||n[$c]>999?$c:-1,jt(e)._overflowDayOfYear&&(tmo)&&(t=mo),jt(e)._overflowWeeks&&t===-1&&(t=y5e),jt(e)._overflowWeekday&&t===-1&&(t=T5e),jt(e).overflow=t),e}var h8e=/^\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)?)?$/,g8e=/^\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)?)?$/,E8e=/Z|[+-]\d\d(?::?\d\d)?/,A0=[["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]],sL=[["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/]],y8e=/^\/?Date\((-?\d+)/i,T8e=/^(?:(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}))$/,v8e={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function yK(e){var t,n,r=e._i,a=h8e.exec(r)||g8e.exec(r),s,i,o,u,c=A0.length,d=sL.length;if(a){for(jt(e).iso=!0,t=0,n=c;tQp(i)||e._dayOfYear===0)&&(jt(e)._overflowDayOfYear=!0),n=Zh(i,0,e._dayOfYear),e._a[gl]=n.getUTCMonth(),e._a[mo]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=a[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[yr]===24&&e._a[Di]===0&&e._a[El]===0&&e._a[$c]===0&&(e._nextDay=!0,e._a[yr]=0),e._d=(e._useUTC?Zh:I5e).apply(null,r),s=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[yr]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==s&&(jt(e).weekdayMismatch=!0)}}function O8e(e){var t,n,r,a,s,i,o,u,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(s=1,i=4,n=_f(t.GG,e._a[ea],Qh(Dn(),1,4).year),r=_f(t.W,1),a=_f(t.E,1),(a<1||a>7)&&(u=!0)):(s=e._locale._week.dow,i=e._locale._week.doy,c=Qh(Dn(),s,i),n=_f(t.gg,e._a[ea],c.year),r=_f(t.w,c.week),t.d!=null?(a=t.d,(a<0||a>6)&&(u=!0)):t.e!=null?(a=t.e+s,(t.e<0||t.e>6)&&(u=!0)):a=s),r<1||r>Ll(n,s,i)?jt(e)._overflowWeeks=!0:u!=null?jt(e)._overflowWeekday=!0:(o=_K(n,r,a,s,i),e._a[ea]=o.year,e._dayOfYear=o.dayOfYear)}st.ISO_8601=function(){};st.RFC_2822=function(){};function CI(e){if(e._f===st.ISO_8601){yK(e);return}if(e._f===st.RFC_2822){TK(e);return}e._a=[],jt(e).empty=!0;var t=""+e._i,n,r,a,s,i,o=t.length,u=0,c,d;for(a=nK(e._f,e._locale).match(vI)||[],d=a.length,n=0;n0&&jt(e).unusedInput.push(i),t=t.slice(t.indexOf(r)+r.length),u+=r.length),qf[s]?(r?jt(e).empty=!1:jt(e).unusedTokens.push(s),E5e(s,r,e)):e._strict&&!r&&jt(e).unusedTokens.push(s);jt(e).charsLeftOver=o-u,t.length>0&&jt(e).unusedInput.push(t),e._a[yr]<=12&&jt(e).bigHour===!0&&e._a[yr]>0&&(jt(e).bigHour=void 0),jt(e).parsedDateParts=e._a.slice(0),jt(e).meridiem=e._meridiem,e._a[yr]=D8e(e._locale,e._a[yr],e._meridiem),c=jt(e).era,c!==null&&(e._a[ea]=e._locale.erasConvertYear(c,e._a[ea])),NI(e),kI(e)}function D8e(e,t,n){var r;return n==null?t:e.meridiemHour!=null?e.meridiemHour(t,n):(e.isPM!=null&&(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t)}function k8e(e){var t,n,r,a,s,i,o=!1,u=e._f.length;if(u===0){jt(e).invalidFormat=!0,e._d=new Date(NaN);return}for(a=0;athis?this:e:tv()});function SK(e,t){var n,r;if(t.length===1&&Wi(t[0])&&(t=t[0]),!t.length)return Dn();for(n=t[0],r=1;rthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Z8e(){if(!Pa(this._isDSTShifted))return this._isDSTShifted;var e={},t;return yI(e,this),e=vK(e),e._a?(t=e._isUTC?Ro(e._a):Dn(e._a),this._isDSTShifted=this.isValid()&&$8e(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Q8e(){return this.isValid()?!this._isUTC:!1}function e$e(){return this.isValid()?this._isUTC:!1}function LK(){return this.isValid()?this._isUTC&&this._offset===0:!1}var t$e=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,n$e=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ji(e,t){var n=e,r=null,a,s,i;return iE(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:Pl(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=t$e.exec(e))?(a=r[1]==="-"?-1:1,n={y:0,d:Jt(r[mo])*a,h:Jt(r[yr])*a,m:Jt(r[Di])*a,s:Jt(r[El])*a,ms:Jt(SN(r[$c]*1e3))*a}):(r=n$e.exec(e))?(a=r[1]==="-"?-1:1,n={y:kc(r[2],a),M:kc(r[3],a),w:kc(r[4],a),d:kc(r[5],a),h:kc(r[6],a),m:kc(r[7],a),s:kc(r[8],a)}):n==null?n={}:typeof n=="object"&&("from"in n||"to"in n)&&(i=r$e(Dn(n.from),Dn(n.to)),n={},n.ms=i.milliseconds,n.M=i.months),s=new uv(n),iE(e)&&sn(e,"_locale")&&(s._locale=e._locale),iE(e)&&sn(e,"_isValid")&&(s._isValid=e._isValid),s}Ji.fn=uv.prototype;Ji.invalid=B8e;function kc(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function a3(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function r$e(e,t){var n;return e.isValid()&&t.isValid()?(t=II(t,e),e.isBefore(t)?n=a3(e,t):(n=a3(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function xK(e,t){return function(n,r){var a,s;return r!==null&&!isNaN(+r)&&(tK(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),a=Ji(n,r),AK(this,a,e),this}}function AK(e,t,n,r){var a=t._milliseconds,s=SN(t._days),i=SN(t._months);e.isValid()&&(r=r??!0,i&&dK(e,Xh(e,"Month")+i*n),s&&lK(e,"Date",Xh(e,"Date")+s*n),a&&e._d.setTime(e._d.valueOf()+a*n),r&&st.updateOffset(e,s||i))}var a$e=xK(1,"add"),s$e=xK(-1,"subtract");function wK(e){return typeof e=="string"||e instanceof String}function i$e(e){return Gi(e)||Fg(e)||wK(e)||Pl(e)||l$e(e)||o$e(e)||e===null||e===void 0}function o$e(e){var t=ed(e)&&!gI(e),n=!1,r=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],a,s,i=r.length;for(a=0;an.valueOf():n.valueOf()9999?sE(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):Io(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",sE(n,"Z")):sE(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function b$e(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",n,r,a,s;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),n="["+e+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",a="-MM-DD[T]HH:mm:ss.SSS",s=t+'[")]',this.format(n+r+a+s)}function S$e(e){e||(e=this.isUtc()?st.defaultFormatUtc:st.defaultFormat);var t=sE(this,e);return this.localeData().postformat(t)}function M$e(e,t){return this.isValid()&&(Gi(e)&&e.isValid()||Dn(e).isValid())?Ji({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function L$e(e){return this.from(Dn(),e)}function x$e(e,t){return this.isValid()&&(Gi(e)&&e.isValid()||Dn(e).isValid())?Ji({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function A$e(e){return this.to(Dn(),e)}function OK(e){var t;return e===void 0?this._locale._abbr:(t=jl(e),t!=null&&(this._locale=t),this)}var DK=li("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 kK(){return this._locale}var vy=1e3,Kf=60*vy,by=60*Kf,NK=(365*400+97)*24*by;function Jf(e,t){return(e%t+t)%t}function CK(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-NK:new Date(e,t,n).valueOf()}function RK(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-NK:Date.UTC(e,t,n)}function w$e(e){var t,n;if(e=ui(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?RK:CK,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Jf(t+(this._isUTC?0:this.utcOffset()*Kf),by);break;case"minute":t=this._d.valueOf(),t-=Jf(t,Kf);break;case"second":t=this._d.valueOf(),t-=Jf(t,vy);break}return this._d.setTime(t),st.updateOffset(this,!0),this}function O$e(e){var t,n;if(e=ui(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(n=this._isUTC?RK:CK,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=by-Jf(t+(this._isUTC?0:this.utcOffset()*Kf),by)-1;break;case"minute":t=this._d.valueOf(),t+=Kf-Jf(t,Kf)-1;break;case"second":t=this._d.valueOf(),t+=vy-Jf(t,vy)-1;break}return this._d.setTime(t),st.updateOffset(this,!0),this}function D$e(){return this._d.valueOf()-(this._offset||0)*6e4}function k$e(){return Math.floor(this.valueOf()/1e3)}function N$e(){return new Date(this.valueOf())}function C$e(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function R$e(){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 I$e(){return this.isValid()?this.toISOString():null}function P$e(){return EI(this)}function Y$e(){return pu({},jt(this))}function F$e(){return jt(this).overflow}function U$e(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}vt("N",0,0,"eraAbbr");vt("NN",0,0,"eraAbbr");vt("NNN",0,0,"eraAbbr");vt("NNNN",0,0,"eraName");vt("NNNNN",0,0,"eraNarrow");vt("y",["y",1],"yo","eraYear");vt("y",["yy",2],0,"eraYear");vt("y",["yyy",3],0,"eraYear");vt("y",["yyyy",4],0,"eraYear");mt("N",PI);mt("NN",PI);mt("NNN",PI);mt("NNNN",J$e);mt("NNNNN",X$e);En(["N","NN","NNN","NNNN","NNNNN"],function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?jt(n).era=a:jt(n).invalidEra=e});mt("y",Vm);mt("yy",Vm);mt("yyy",Vm);mt("yyyy",Vm);mt("yo",Z$e);En(["y","yy","yyy","yyyy"],ea);En(["yo"],function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[ea]=n._locale.eraYearOrdinalParse(e,a):t[ea]=parseInt(e,10)});function H$e(e,t){var n,r,a,s=this._eras||jl("en")._eras;for(n=0,r=s.length;n=0)return s[r]}function B$e(e,t){var n=e.since<=e.until?1:-1;return t===void 0?st(e.since).year():st(e.since).year()+(t-e.offset)*n}function $$e(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;es&&(t=s),sWe.call(this,e,t,n,r,a))}function sWe(e,t,n,r,a){var s=_K(e,t,n,r,a),i=Zh(s.year,0,s.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}vt("Q",0,"Qo","quarter");mt("Q",rK);En("Q",function(e,t){t[gl]=(Jt(e)-1)*3});function iWe(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}vt("D",["DD",2],"Do","date");mt("D",kn,qm);mt("DD",kn,ks);mt("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient});En(["D","DD"],mo);En("Do",function(e,t){t[mo]=Jt(e.match(kn)[0])});var PK=Km("Date",!0);vt("DDD",["DDDD",3],"DDDo","dayOfYear");mt("DDD",rv);mt("DDDD",aK);En(["DDD","DDDD"],function(e,t,n){n._dayOfYear=Jt(e)});function oWe(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}vt("m",["mm",2],0,"minute");mt("m",kn,LI);mt("mm",kn,ks);En(["m","mm"],Di);var lWe=Km("Minutes",!1);vt("s",["ss",2],0,"second");mt("s",kn,LI);mt("ss",kn,ks);En(["s","ss"],El);var uWe=Km("Seconds",!1);vt("S",0,0,function(){return~~(this.millisecond()/100)});vt(0,["SS",2],0,function(){return~~(this.millisecond()/10)});vt(0,["SSS",3],0,"millisecond");vt(0,["SSSS",4],0,function(){return this.millisecond()*10});vt(0,["SSSSS",5],0,function(){return this.millisecond()*100});vt(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3});vt(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4});vt(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5});vt(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6});mt("S",rv,rK);mt("SS",rv,ks);mt("SSS",rv,aK);var hu,YK;for(hu="SSSS";hu.length<=9;hu+="S")mt(hu,Vm);function cWe(e,t){t[$c]=Jt(("0."+e)*1e3)}for(hu="S";hu.length<=9;hu+="S")En(hu,cWe);YK=Km("Milliseconds",!1);vt("z",0,0,"zoneAbbr");vt("zz",0,0,"zoneName");function dWe(){return this._isUTC?"UTC":""}function fWe(){return this._isUTC?"Coordinated Universal Time":""}var $e=Ug.prototype;$e.add=a$e;$e.calendar=d$e;$e.clone=f$e;$e.diff=y$e;$e.endOf=O$e;$e.format=S$e;$e.from=M$e;$e.fromNow=L$e;$e.to=x$e;$e.toNow=A$e;$e.get=b5e;$e.invalidAt=F$e;$e.isAfter=m$e;$e.isBefore=_$e;$e.isBetween=p$e;$e.isSame=h$e;$e.isSameOrAfter=g$e;$e.isSameOrBefore=E$e;$e.isValid=P$e;$e.lang=DK;$e.locale=OK;$e.localeData=kK;$e.max=P8e;$e.min=I8e;$e.parsingFlags=Y$e;$e.set=S5e;$e.startOf=w$e;$e.subtract=s$e;$e.toArray=C$e;$e.toObject=R$e;$e.toDate=N$e;$e.toISOString=v$e;$e.inspect=b$e;typeof Symbol<"u"&&Symbol.for!=null&&($e[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"});$e.toJSON=I$e;$e.toString=T$e;$e.unix=k$e;$e.valueOf=D$e;$e.creationData=U$e;$e.eraName=$$e;$e.eraNarrow=W$e;$e.eraAbbr=G$e;$e.eraYear=z$e;$e.year=oK;$e.isLeapYear=v5e;$e.weekYear=Q$e;$e.isoWeekYear=eWe;$e.quarter=$e.quarters=iWe;$e.month=fK;$e.daysInMonth=N5e;$e.week=$e.weeks=H5e;$e.isoWeek=$e.isoWeeks=j5e;$e.weeksInYear=rWe;$e.weeksInWeekYear=aWe;$e.isoWeeksInYear=tWe;$e.isoWeeksInISOWeekYear=nWe;$e.date=PK;$e.day=$e.days=e8e;$e.weekday=t8e;$e.isoWeekday=n8e;$e.dayOfYear=oWe;$e.hour=$e.hours=u8e;$e.minute=$e.minutes=lWe;$e.second=$e.seconds=uWe;$e.millisecond=$e.milliseconds=YK;$e.utcOffset=G8e;$e.utc=V8e;$e.local=q8e;$e.parseZone=K8e;$e.hasAlignedHourOffset=J8e;$e.isDST=X8e;$e.isLocal=Q8e;$e.isUtcOffset=e$e;$e.isUtc=LK;$e.isUTC=LK;$e.zoneAbbr=dWe;$e.zoneName=fWe;$e.dates=li("dates accessor is deprecated. Use date instead.",PK);$e.months=li("months accessor is deprecated. Use month instead",fK);$e.years=li("years accessor is deprecated. Use year instead",oK);$e.zone=li("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",z8e);$e.isDSTShifted=li("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Z8e);function mWe(e){return Dn(e*1e3)}function _We(){return Dn.apply(null,arguments).parseZone()}function FK(e){return e}var on=TI.prototype;on.calendar=QBe;on.longDateFormat=r5e;on.invalidDate=s5e;on.ordinal=l5e;on.preparse=FK;on.postformat=FK;on.relativeTime=c5e;on.pastFuture=d5e;on.set=XBe;on.eras=H$e;on.erasParse=j$e;on.erasConvertYear=B$e;on.erasAbbrRegex=q$e;on.erasNameRegex=V$e;on.erasNarrowRegex=K$e;on.months=w5e;on.monthsShort=O5e;on.monthsParse=k5e;on.monthsRegex=R5e;on.monthsShortRegex=C5e;on.week=P5e;on.firstDayOfYear=U5e;on.firstDayOfWeek=F5e;on.weekdays=K5e;on.weekdaysMin=X5e;on.weekdaysShort=J5e;on.weekdaysParse=Q5e;on.weekdaysRegex=r8e;on.weekdaysShortRegex=a8e;on.weekdaysMinRegex=s8e;on.isPM=o8e;on.meridiem=c8e;function Sy(e,t,n,r){var a=jl(),s=Ro().set(r,t);return a[n](s,e)}function UK(e,t,n){if(Pl(e)&&(t=e,e=void 0),e=e||"",t!=null)return Sy(e,t,n,"month");var r,a=[];for(r=0;r<12;r++)a[r]=Sy(e,r,n,"month");return a}function FI(e,t,n,r){typeof e=="boolean"?(Pl(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,Pl(t)&&(n=t,t=void 0),t=t||"");var a=jl(),s=e?a._week.dow:0,i,o=[];if(n!=null)return Sy(t,(n+s)%7,r,"day");for(i=0;i<7;i++)o[i]=Sy(t,(i+s)%7,r,"day");return o}function pWe(e,t){return UK(e,t,"months")}function hWe(e,t){return UK(e,t,"monthsShort")}function gWe(e,t,n){return FI(e,t,n,"weekdays")}function EWe(e,t,n){return FI(e,t,n,"weekdaysShort")}function yWe(e,t,n){return FI(e,t,n,"weekdaysMin")}Ou("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 t=e%10,n=Jt(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+n}});st.lang=li("moment.lang is deprecated. Use moment.locale instead.",Ou);st.langData=li("moment.langData is deprecated. Use moment.localeData instead.",jl);var il=Math.abs;function TWe(){var e=this._data;return this._milliseconds=il(this._milliseconds),this._days=il(this._days),this._months=il(this._months),e.milliseconds=il(e.milliseconds),e.seconds=il(e.seconds),e.minutes=il(e.minutes),e.hours=il(e.hours),e.months=il(e.months),e.years=il(e.years),this}function HK(e,t,n,r){var a=Ji(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function vWe(e,t){return HK(this,e,t,1)}function bWe(e,t){return HK(this,e,t,-1)}function s3(e){return e<0?Math.floor(e):Math.ceil(e)}function SWe(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,a,s,i,o,u;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=s3(LN(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,a=Js(e/1e3),r.seconds=a%60,s=Js(a/60),r.minutes=s%60,i=Js(s/60),r.hours=i%24,t+=Js(i/24),u=Js(jK(t)),n+=u,t-=s3(LN(u)),o=Js(n/12),n%=12,r.days=t,r.months=n,r.years=o,this}function jK(e){return e*4800/146097}function LN(e){return e*146097/4800}function MWe(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=ui(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+r/864e5,n=this._months+jK(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(LN(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return t*24+r/36e5;case"minute":return t*1440+r/6e4;case"second":return t*86400+r/1e3;case"millisecond":return Math.floor(t*864e5)+r;default:throw new Error("Unknown unit "+e)}}function Bl(e){return function(){return this.as(e)}}var BK=Bl("ms"),LWe=Bl("s"),xWe=Bl("m"),AWe=Bl("h"),wWe=Bl("d"),OWe=Bl("w"),DWe=Bl("M"),kWe=Bl("Q"),NWe=Bl("y"),CWe=BK;function RWe(){return Ji(this)}function IWe(e){return e=ui(e),this.isValid()?this[e+"s"]():NaN}function kd(e){return function(){return this.isValid()?this._data[e]:NaN}}var PWe=kd("milliseconds"),YWe=kd("seconds"),FWe=kd("minutes"),UWe=kd("hours"),HWe=kd("days"),jWe=kd("months"),BWe=kd("years");function $We(){return Js(this.days()/7)}var cl=Math.round,Nf={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function WWe(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}function GWe(e,t,n,r){var a=Ji(e).abs(),s=cl(a.as("s")),i=cl(a.as("m")),o=cl(a.as("h")),u=cl(a.as("d")),c=cl(a.as("M")),d=cl(a.as("w")),_=cl(a.as("y")),p=s<=n.ss&&["s",s]||s0,p[4]=r,WWe.apply(null,p)}function zWe(e){return e===void 0?cl:typeof e=="function"?(cl=e,!0):!1}function VWe(e,t){return Nf[e]===void 0?!1:t===void 0?Nf[e]:(Nf[e]=t,e==="s"&&(Nf.ss=t-1),!0)}function qWe(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=Nf,a,s;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(n=e),typeof t=="object"&&(r=Object.assign({},Nf,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),a=this.localeData(),s=GWe(this,!n,r,a),n&&(s=a.pastFuture(+this,s)),a.postformat(s)}var iL=Math.abs;function lf(e){return(e>0)-(e<0)||+e}function dv(){if(!this.isValid())return this.localeData().invalidDate();var e=iL(this._milliseconds)/1e3,t=iL(this._days),n=iL(this._months),r,a,s,i,o=this.asSeconds(),u,c,d,_;return o?(r=Js(e/60),a=Js(r/60),e%=60,r%=60,s=Js(n/12),n%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",u=o<0?"-":"",c=lf(this._months)!==lf(o)?"-":"",d=lf(this._days)!==lf(o)?"-":"",_=lf(this._milliseconds)!==lf(o)?"-":"",u+"P"+(s?c+s+"Y":"")+(n?c+n+"M":"")+(t?d+t+"D":"")+(a||r||e?"T":"")+(a?_+a+"H":"")+(r?_+r+"M":"")+(e?_+i+"S":"")):"P0D"}var tn=uv.prototype;tn.isValid=j8e;tn.abs=TWe;tn.add=vWe;tn.subtract=bWe;tn.as=MWe;tn.asMilliseconds=BK;tn.asSeconds=LWe;tn.asMinutes=xWe;tn.asHours=AWe;tn.asDays=wWe;tn.asWeeks=OWe;tn.asMonths=DWe;tn.asQuarters=kWe;tn.asYears=NWe;tn.valueOf=CWe;tn._bubble=SWe;tn.clone=RWe;tn.get=IWe;tn.milliseconds=PWe;tn.seconds=YWe;tn.minutes=FWe;tn.hours=UWe;tn.days=HWe;tn.weeks=$We;tn.months=jWe;tn.years=BWe;tn.humanize=qWe;tn.toISOString=dv;tn.toString=dv;tn.toJSON=dv;tn.locale=OK;tn.localeData=kK;tn.toIsoString=li("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",dv);tn.lang=DK;vt("X",0,0,"unix");vt("x",0,0,"valueOf");mt("x",sv);mt("X",p5e);En("X",function(e,t,n){n._d=new Date(parseFloat(e)*1e3)});En("x",function(e,t,n){n._d=new Date(Jt(e))});//! moment.js -st.version="2.30.1";KBe(Dn);st.fn=$e;st.min=Y8e;st.max=F8e;st.now=U8e;st.utc=Ro;st.unix=mWe;st.months=pWe;st.isDate=Fg;st.locale=Ou;st.invalid=tv;st.duration=Ji;st.isMoment=Gi;st.weekdays=gWe;st.parseZone=_We;st.localeData=jl;st.isDuration=iE;st.monthsShort=hWe;st.weekdaysMin=yWe;st.defineLocale=DI;st.updateLocale=_8e;st.locales=p8e;st.weekdaysShort=EWe;st.normalizeUnits=ui;st.relativeTimeRounding=zWe;st.relativeTimeThreshold=VWe;st.calendarFormat=c$e;st.prototype=$e;st.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"};var pf=(e=>(e[e.Anonymous=0]="Anonymous",e[e.Github=1]="Github",e[e.Google=2]="Google",e))(pf||{});const KWe=bg("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function JWe({className:e,variant:t,...n}){return f.jsx("div",{className:Ie(KWe({variant:t}),e),...n})}function $K(e){const t=Ft();return f.jsx(JWe,{className:Ie("my-1.5",e.authType==pf.Google&&"bg-red-500 hover:bg-red-600 text-white",e.authType==pf.Github&&"bg-gray-800 hover:bg-gray-700 text-white",e.className),children:e.authType===pf.Anonymous?t("ANONYMOUS_BADGE"):e.authType===pf.Google?"Google":e.authType===pf.Github?"GitHub":t("UNKNOWN_BADGE")})}const zi=vr({selectedRoom:{},setSelectedRoom:()=>{}}),XWe=({children:e})=>{let t=ve(ws,a=>a.joinedRooms);const[n,r]=S.useState(t==null?void 0:t[0]);return S.useEffect(()=>{(!n||t.length==1)&&r(t[0])},[t]),S.useEffect(()=>{if(!t)return;let a=t==null?void 0:t.find(s=>s.guid===(n==null?void 0:n.guid));a&&r(a)},[t]),f.jsx(zi.Provider,{value:{selectedRoom:n,setSelectedRoom:r},children:e})};function Bg(e,t=[]){let n=[];function r(s,i){const o=S.createContext(i),u=n.length;n=[...n,i];const c=_=>{var L;const{scope:p,children:g,...y}=_,T=((L=p==null?void 0:p[e])==null?void 0:L[u])||o,M=S.useMemo(()=>y,Object.values(y));return f.jsx(T.Provider,{value:M,children:g})};c.displayName=s+"Provider";function d(_,p){var T;const g=((T=p==null?void 0:p[e])==null?void 0:T[u])||o,y=S.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${_}\` must be used within \`${s}\``)}return[c,d]}const a=()=>{const s=n.map(i=>S.createContext(i));return function(o){const u=(o==null?void 0:o[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return a.scopeName=e,[r,ZWe(a,...t)]}function ZWe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=r.reduce((o,{useScope:u,scopeName:c})=>{const _=u(s)[`__scope${c}`];return{...o,..._}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var WK=["PageUp","PageDown"],GK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zK={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Jm="Slider",[xN,QWe,e9e]=Tg(Jm),[VK,Xft]=Bg(Jm,[e9e]),[t9e,fv]=VK(Jm),qK=S.forwardRef((e,t)=>{const{name:n,min:r=0,max:a=100,step:s=1,orientation:i="horizontal",disabled:o=!1,minStepsBetweenThumbs:u=0,defaultValue:c=[r],value:d,onValueChange:_=()=>{},onValueCommit:p=()=>{},inverted:g=!1,form:y,...T}=e,M=S.useRef(new Set),L=S.useRef(0),b=i==="horizontal"?n9e:r9e,[w=[],N]=As({prop:d,defaultProp:c,onChange:j=>{var z;(z=[...M.current][L.current])==null||z.focus(),_(j)}}),k=S.useRef(w);function I(j){const W=l9e(w,j);U(j,W)}function Y(j){U(j,L.current)}function H(){const j=k.current[L.current];w[L.current]!==j&&p(w)}function U(j,W,{commit:z}={commit:!1}){const Q=f9e(s),te=m9e(Math.round((j-r)/s)*s+r,Q),fe=Gh(te,[r,a]);N((he=[])=>{const K=i9e(he,fe,W);if(d9e(K,u*s)){L.current=K.indexOf(fe);const q=String(K)!==String(he);return q&&z&&p(K),q?K:he}else return he})}return f.jsx(t9e,{scope:e.__scopeSlider,name:n,disabled:o,min:r,max:a,valueIndexToChangeRef:L,thumbs:M.current,values:w,orientation:i,form:y,children:f.jsx(xN.Provider,{scope:e.__scopeSlider,children:f.jsx(xN.Slot,{scope:e.__scopeSlider,children:f.jsx(b,{"aria-disabled":o,"data-disabled":o?"":void 0,...T,ref:t,onPointerDown:Fe(T.onPointerDown,()=>{o||(k.current=w)}),min:r,max:a,inverted:g,onSlideStart:o?void 0:I,onSlideMove:o?void 0:Y,onSlideEnd:o?void 0:H,onHomeKeyDown:()=>!o&&U(r,0,{commit:!0}),onEndKeyDown:()=>!o&&U(a,w.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:W})=>{if(!o){const te=WK.includes(j.key)||j.shiftKey&&GK.includes(j.key)?10:1,fe=L.current,he=w[fe],K=s*te*W;U(he+K,fe,{commit:!0})}}})})})})});qK.displayName=Jm;var[KK,JK]=VK(Jm,{startEdge:"left",endEdge:"right",size:"width",direction:1}),n9e=S.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:u,onStepKeyDown:c,...d}=e,[_,p]=S.useState(null),g=wt(t,b=>p(b)),y=S.useRef(),T=wd(a),M=T==="ltr",L=M&&!s||!M&&s;function v(b){const w=y.current||_.getBoundingClientRect(),N=[0,w.width],I=UI(N,L?[n,r]:[r,n]);return y.current=w,I(b-w.left)}return f.jsx(KK,{scope:e.__scopeSlider,startEdge:L?"left":"right",endEdge:L?"right":"left",direction:L?1:-1,size:"width",children:f.jsx(XK,{dir:T,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const w=v(b.clientX);i==null||i(w)},onSlideMove:b=>{const w=v(b.clientX);o==null||o(w)},onSlideEnd:()=>{y.current=void 0,u==null||u()},onStepKeyDown:b=>{const N=zK[L?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:N?-1:1})}})})}),r9e=S.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:s,onSlideMove:i,onSlideEnd:o,onStepKeyDown:u,...c}=e,d=S.useRef(null),_=wt(t,d),p=S.useRef(),g=!a;function y(T){const M=p.current||d.current.getBoundingClientRect(),L=[0,M.height],b=UI(L,g?[r,n]:[n,r]);return p.current=M,b(T-M.top)}return f.jsx(KK,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:f.jsx(XK,{"data-orientation":"vertical",...c,ref:_,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:T=>{const M=y(T.clientY);s==null||s(M)},onSlideMove:T=>{const M=y(T.clientY);i==null||i(M)},onSlideEnd:()=>{p.current=void 0,o==null||o()},onStepKeyDown:T=>{const L=zK[g?"from-bottom":"from-top"].includes(T.key);u==null||u({event:T,direction:L?-1:1})}})})}),XK=S.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:o,onStepKeyDown:u,...c}=e,d=fv(Jm,n);return f.jsx(ft.span,{...c,ref:t,onKeyDown:Fe(e.onKeyDown,_=>{_.key==="Home"?(i(_),_.preventDefault()):_.key==="End"?(o(_),_.preventDefault()):WK.concat(GK).includes(_.key)&&(u(_),_.preventDefault())}),onPointerDown:Fe(e.onPointerDown,_=>{const p=_.target;p.setPointerCapture(_.pointerId),_.preventDefault(),d.thumbs.has(p)?p.focus():r(_)}),onPointerMove:Fe(e.onPointerMove,_=>{_.target.hasPointerCapture(_.pointerId)&&a(_)}),onPointerUp:Fe(e.onPointerUp,_=>{const p=_.target;p.hasPointerCapture(_.pointerId)&&(p.releasePointerCapture(_.pointerId),s(_))})})}),ZK="SliderTrack",QK=S.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=fv(ZK,n);return f.jsx(ft.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});QK.displayName=ZK;var AN="SliderRange",eJ=S.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=fv(AN,n),s=JK(AN,n),i=S.useRef(null),o=wt(t,i),u=a.values.length,c=a.values.map(p=>nJ(p,a.min,a.max)),d=u>1?Math.min(...c):0,_=100-Math.max(...c);return f.jsx(ft.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:o,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:_+"%"}})});eJ.displayName=AN;var wN="SliderThumb",tJ=S.forwardRef((e,t)=>{const n=QWe(e.__scopeSlider),[r,a]=S.useState(null),s=wt(t,o=>a(o)),i=S.useMemo(()=>r?n().findIndex(o=>o.ref.current===r):-1,[n,r]);return f.jsx(a9e,{...e,ref:s,index:i})}),a9e=S.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...s}=e,i=fv(wN,n),o=JK(wN,n),[u,c]=S.useState(null),d=wt(t,v=>c(v)),_=u?i.form||!!u.closest("form"):!0,p=kT(u),g=i.values[r],y=g===void 0?0:nJ(g,i.min,i.max),T=o9e(r,i.values.length),M=p==null?void 0:p[o.size],L=M?u9e(M,y,o.direction):0;return S.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${y}% + ${L}px)`},children:[f.jsx(xN.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(ft.span,{role:"slider","aria-label":e["aria-label"]||T,"aria-valuemin":i.min,"aria-valuenow":g,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:d,style:g===void 0?{display:"none"}:e.style,onFocus:Fe(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),_&&f.jsx(s9e,{name:a??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:g},r)]})});tJ.displayName=wN;var s9e=e=>{const{value:t,...n}=e,r=S.useRef(null),a=IT(t);return S.useEffect(()=>{const s=r.current,i=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(i,"value").set;if(a!==t&&u){const c=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(c)}},[a,t]),f.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function i9e(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,s)=>a-s)}function nJ(e,t,n){const s=100/(n-t)*(e-t);return Gh(s,[0,100])}function o9e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function l9e(e,t){if(e.length===1)return 0;const n=e.map(a=>Math.abs(a-t)),r=Math.min(...n);return n.indexOf(r)}function u9e(e,t,n){const r=e/2,s=UI([0,50],[0,r]);return(r-s(t)*n)*n}function c9e(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function d9e(e,t){if(t>0){const n=c9e(e);return Math.min(...n)>=t}return!0}function UI(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function f9e(e){return(String(e).split(".")[1]||"").length}function m9e(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var rJ=qK,_9e=QK,p9e=eJ,h9e=tJ;const Do=S.forwardRef(({className:e,...t},n)=>f.jsxs(rJ,{ref:n,className:Ie("relative flex w-full touch-none select-none items-center",t.disabled&&"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),...t,children:[f.jsx(_9e,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-secondary",children:f.jsx(p9e,{className:"absolute h-full bg-primary"})}),!(e!=null&&e.includes("thumbDisabled"))&&f.jsx(h9e,{className:"block h-3 w-3 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Do.displayName=rJ.displayName;const tg=vr({userVolumes:{},setVolumeForUser:()=>{}}),g9e=({children:e})=>{const{setToLocalStorage:t,getFromLocalStorage:n}=Ul(),[r,a]=S.useState(n("userVolumes")??{}),s=(i,o)=>{const u={...r,[i]:o};a(u),t("userVolumes",u)};return f.jsx(tg.Provider,{value:{userVolumes:r,setVolumeForUser:s},children:e})},aJ=Et.memo(function({user:t,colorString:n}){var y;const r=Ft(),a=ve(dr,T=>T.currentUser),s=ve(zi,T=>T.selectedRoom),[i,o]=S.useState(!1),u=ve(tg,T=>T.setVolumeForUser),c=ve(tg,T=>T.userVolumes),d=(a==null?void 0:a.hexId)===((y=s==null?void 0:s.owner)==null?void 0:y.hexId)&&a.hexId!==(t==null?void 0:t.hexId)&&(t==null?void 0:t.authType)!=null&&s.joinedUsers.find(T=>T.hexId===(t==null?void 0:t.hexId))!=null;function _(){To.KickMember({roomGuid:s.guid,targetHexId:t==null?void 0:t.hexId}).then(()=>{o(!1)})}function p(T){return T?st(T).format("MM/DD/YYYY"):r("UNKNOWN_DATE")}function g(T){u(t==null?void 0:t.hexId,T[0])}return f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{color:n,lineBreak:"anywhere"},children:(t==null?void 0:t.username)??r("UNKNOWN_USER")}),f.jsx($K,{authType:t==null?void 0:t.authType}),f.jsxs("div",{className:"text-sm text-primary/80",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium",children:"Colir ID"}),": ",t?fR(t.hexId):r("UNKNOWN_COLIR_ID")]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium",children:r("REGISTRATION_DATE")}),": ",p(t==null?void 0:t.registrationDate)]}),(a==null?void 0:a.hexId)!=(t==null?void 0:t.hexId)&&f.jsxs("div",{className:"flex flex-row items-center gap-1 pt-1",children:[f.jsxs("p",{className:"font-semibold flex-shrink-0",children:[r("VOLUME"),":"]}),f.jsx(Do,{className:"cursor-pointer",value:[c[t==null?void 0:t.hexId]??50],onValueChange:g,step:.1})]})]}),d&&f.jsxs(et,{onClick:()=>o(!0),className:"mt-2 w-full",variant:"destructive",children:[f.jsx(boe,{className:"mr-2 h-4 w-4"})," ",r("KICK")]}),d&&f.jsx(Ls,{open:i,onOpenChange:o,children:f.jsxs(za,{children:[f.jsx(Pi,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsx(Ga,{children:f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:r("ARE_YOU_SURE")}),f.jsxs(ri,{children:[r("YOU_ARE_ABOUT_TO_KICK")," ",f.jsx("span",{className:"font-semibold",children:t==null?void 0:t.username})," ",r("FROM_THE_ROOM")]}),f.jsx(Ur,{className:"px-0 py-1",children:f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:()=>o(!1),className:"w-[100%]",variant:"outline",children:r("CANCEL")}),f.jsx(et,{onClick:_,className:"w-[100%]",variant:"destructive",children:r("CONFIRM")})]})})]})})]})})]})}),ng=Et.memo(function({user:t,className:n}){const r=Ft(),a=16777215,{colorString:s,isAdjusted:i}=DR(t?t.hexId:a);return f.jsxs(Pg,{children:[f.jsx(Yg,{style:{color:s},className:"max-w-56 rounded-sm text-nowrap overflow-hidden text-ellipsis focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",children:f.jsxs(Tm,{children:[f.jsx(vm,{asChild:!0,children:f.jsx("span",{style:{color:s},className:Ie("cursor-pointer text-left text-nowrap overflow-hidden text-ellipsis hover:underline text-sm",n),children:t?t.username:r("UNKNOWN_USER")})}),i&&t&&f.jsx(gd,{children:f.jsx("p",{children:r("COLOR_WAS_ADJUSTED_TO_FIT_THEME")})})]})}),f.jsx(zm,{children:f.jsx(aJ,{user:t,colorString:s})})]})});function E9e({message:e,sender:t,className:n,decryptionKey:r,onReplyCancelled:a,onClicked:s}){let i=bl((e==null?void 0:e.content)??"",r);return f.jsxs("div",{className:Ie("flex flex-row overflow-hidden text-ellipsis pl-2.5 pr-3 h-5 justify-between items-center w-[100%]",n),children:[f.jsxs("div",{onClick:s,className:"flex flex-row cursor-pointer overflow-hidden text-ellipsis items-center text-[11px] gap-1 select-none",children:[f.jsx(M9,{className:"w-3 h-3"}),f.jsx(ng,{className:"text-[12px]",user:t}),f.jsxs("span",{className:"max-w-screen-sm overflow-hidden text-ellipsis whitespace-nowrap",children:[f.jsxs("span",{className:"flex flex-row overflow-hidden whitespace-nowrap text-ellipsis mr-1",children:[i,i===void 0&&f.jsx("span",{className:"text-destructive",children:f.jsx(f.Fragment,{children:'t("COULD_NOT_DECRYPT")'})})]}),f.jsx("div",{className:"flex flex-row gap-1",children:e==null?void 0:e.attachments.map(o=>f.jsxs("span",{className:"flex flex-row text-nowrap overflow-hidden text-ellipsis flex-nowrap text-primary/70",children:["[",bl(o.filename,r),"]"," "]},o.id))})]})]}),f.jsx("div",{className:"flex flex-row pl-1 items-center text-[11px] gap-1 select-none",children:f.jsx(poe,{onClick:a,className:"cursor-pointer w-4 h-4 stroke-slate-400/80 hover:stroke-slate-400/100"})})]})}function y9e(e){let{theme:t}=Dm();function n(r){return r.type.startsWith("image")}return f.jsxs("div",{className:Ie("flex flex-col gap-1 justify-center p-2 items-center aspect-square h-28 rounded-[6px]",t=="light"?"bg-gray-200":"bg-gray-900"),children:[n(e.file)&&f.jsx("img",{draggable:!1,src:URL.createObjectURL(e.file),className:"object-cover h-full rounded-[3px]"}),f.jsx("span",{style:{lineBreak:"anywhere"},className:"text-[11px] text-ellipsis overflow-hidden text-primary/90 select-none whitespace-break-spaces",children:e.file.name}),f.jsx(et,{onClick:()=>e.removeClicked(),className:"w-5 h-5 absolute z-[1] top-[-8px] right-[-4px] rounded-sm",variant:"destructive",size:"icon",children:f.jsx(dm,{className:"w-3 h-3"})})]})}function T9e(e){return f.jsx("div",{className:Ie("flex flex-row gap-1.5 p-1.5 pt-3 w-full flex-wrap",e.className,e.isDisabled&&"opacity-50 pointer-events-none"),children:e.files.map((t,n)=>f.jsx(y9e,{removeClicked:()=>e.onFileRemoved(t),file:t},n))})}function v9e({onSend:e,messageToReply:t,messageToReplyAuthor:n,className:r,encryptionKey:a,onReplyCancelled:s,variant:i="default",onReplySectionClicked:o}){const u=Ft();let c=S.useRef(),d=S.useRef(),_=S.useRef();const p=S.useRef(document);S.useEffect(()=>{const j=Q=>{var fe;if(Q.ctrlKey&&Q.keyCode!=86||Q.altKey||Q.keyCode==16||Q.keyCode==9||Q.keyCode==32)return;let te=(fe=document.activeElement)==null?void 0:fe.tagName;te==="TEXTAREA"||te==="INPUT"||te==="VIDEO"&&Q.keyCode==32||c.current&&(Q.key==="Enter"&&Q.preventDefault(),Q.key=="Escape"&&s(),c.current.textArea.focus())},W=Q=>{Q.preventDefault()},z=Q=>{var te;if(Q.preventDefault(),(te=Q.dataTransfer)!=null&&te.items)for(let fe=0;fe[...q,K])}}};return p.current.addEventListener("keydown",j),p.current.addEventListener("dragover",W),p.current.addEventListener("drop",z),()=>{p.current.removeEventListener("keydown",j),p.current.removeEventListener("dragover",W),p.current.removeEventListener("drop",z)}},[]);function g(){I([]),c.current.textArea.value="",c.current.textArea.style.height="42px"}let[y,T]=Et.useState(!1);const M=S.useRef(y);S.useEffect(()=>{M.current=y},[y]);async function L(){if(c.current.textArea.disabled)return;const j=k.length>0?await Promise.all([...k].map(W=>due(W,a))):[];T(!0),e({content:Im(c.current.textArea.value,a)??"",attachments:j,replyMessageId:t==null?void 0:t.id}).then(()=>{g()}).finally(()=>{T(!1)})}function v(j,W){if(c.current.textArea.disabled)return;let z=c.current.textArea.value;c.current.textArea.value=z.substr(0,j)+W+z.substr(j),N(j+W.length)}function b(j){var W;if(j.key=="Escape"&&s(),j.key=="Enter"&&!j.shiftKey){if(j.preventDefault(),((W=j.target.value)==null?void 0:W.length)===0&&k.length===0){j.preventDefault();return}if(M.current)return;M.current=!0,L()}}function w(){return c.current.textArea.selectionStart}function N(j){c.current.textArea.selectionEnd=j}let[k,I]=Et.useState([]);function Y(j){let W=j.target.files;if(W.length!=0)for(let z=0;z[...te,Q])}}function H(j){I(W=>W.filter(z=>z!==j))}function U(j){const W=j.clipboardData.items;for(let z=0;z[...fe,te])}}}return S.useEffect(()=>{setTimeout(()=>c.current.textArea.focus(),10)},[t]),f.jsx(f.Fragment,{children:f.jsxs("div",{className:Ie("flex flex-col items-center",r),children:[f.jsxs("div",{ref:_,className:"flex flex-col bg-accent/80 w-full items-center rounded-t-[6px] gap-0.5",children:[f.jsx(E9e,{onClicked:o,onReplyCancelled:s,decryptionKey:a,message:t,sender:n,className:t&&i=="default"?"":"hidden"}),t&&k.length>0&&f.jsx(Fn,{className:"bg-secondary outline-none border-none"}),k.length>0&&f.jsx(T9e,{className:Ie(!t&&"rounded-t-[6px]"),isDisabled:y,onFileRemoved:H,files:k})]}),f.jsxs("div",{className:Ie("flex items-center",r),children:[(t||k.length>0)&&i=="default"&&f.jsx("div",{className:"absolute top-0 h-4 bg-accent/80 w-full"}),i==="default"&&f.jsxs(f.Fragment,{children:[f.jsx(Boe,{tabIndex:0,onClick:()=>d.current.click(),onKeyDown:j=>j.keyCode==32&&d.current.click(),strokeWidth:1.5,className:Ie(`cursor-pointer absolute z-10 stroke-slate-400/80 hover:stroke-slate-400 left-2 top-[20px] h-5 w-5 +st.version="2.30.1";KBe(Dn);st.fn=$e;st.min=Y8e;st.max=F8e;st.now=U8e;st.utc=Ro;st.unix=mWe;st.months=pWe;st.isDate=Fg;st.locale=Ou;st.invalid=tv;st.duration=Ji;st.isMoment=Gi;st.weekdays=gWe;st.parseZone=_We;st.localeData=jl;st.isDuration=iE;st.monthsShort=hWe;st.weekdaysMin=yWe;st.defineLocale=DI;st.updateLocale=_8e;st.locales=p8e;st.weekdaysShort=EWe;st.normalizeUnits=ui;st.relativeTimeRounding=zWe;st.relativeTimeThreshold=VWe;st.calendarFormat=c$e;st.prototype=$e;st.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"};var pf=(e=>(e[e.Anonymous=0]="Anonymous",e[e.Github=1]="Github",e[e.Google=2]="Google",e))(pf||{});const KWe=bg("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function JWe({className:e,variant:t,...n}){return f.jsx("div",{className:Ie(KWe({variant:t}),e),...n})}function $K(e){const t=Ft();return f.jsx(JWe,{className:Ie("my-1.5",e.authType==pf.Google&&"bg-red-500 hover:bg-red-600 text-white",e.authType==pf.Github&&"bg-gray-800 hover:bg-gray-700 text-white",e.className),children:e.authType===pf.Anonymous?t("ANONYMOUS_BADGE"):e.authType===pf.Google?"Google":e.authType===pf.Github?"GitHub":t("UNKNOWN_BADGE")})}const zi=vr({selectedRoom:{},setSelectedRoom:()=>{}}),XWe=({children:e})=>{let t=ve(ws,a=>a.joinedRooms);const[n,r]=S.useState(t==null?void 0:t[0]);return S.useEffect(()=>{(!n||t.length==1)&&r(t[0])},[t]),S.useEffect(()=>{if(!t)return;let a=t==null?void 0:t.find(s=>s.guid===(n==null?void 0:n.guid));a&&r(a)},[t]),f.jsx(zi.Provider,{value:{selectedRoom:n,setSelectedRoom:r},children:e})};function Bg(e,t=[]){let n=[];function r(s,i){const o=S.createContext(i),u=n.length;n=[...n,i];const c=_=>{var L;const{scope:p,children:g,...y}=_,T=((L=p==null?void 0:p[e])==null?void 0:L[u])||o,M=S.useMemo(()=>y,Object.values(y));return f.jsx(T.Provider,{value:M,children:g})};c.displayName=s+"Provider";function d(_,p){var T;const g=((T=p==null?void 0:p[e])==null?void 0:T[u])||o,y=S.useContext(g);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${_}\` must be used within \`${s}\``)}return[c,d]}const a=()=>{const s=n.map(i=>S.createContext(i));return function(o){const u=(o==null?void 0:o[e])||s;return S.useMemo(()=>({[`__scope${e}`]:{...o,[e]:u}}),[o,u])}};return a.scopeName=e,[r,ZWe(a,...t)]}function ZWe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(s){const i=r.reduce((o,{useScope:u,scopeName:c})=>{const _=u(s)[`__scope${c}`];return{...o,..._}},{});return S.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var WK=["PageUp","PageDown"],GK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],zK={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Jm="Slider",[xN,QWe,e9e]=Tg(Jm),[VK,Xft]=Bg(Jm,[e9e]),[t9e,fv]=VK(Jm),qK=S.forwardRef((e,t)=>{const{name:n,min:r=0,max:a=100,step:s=1,orientation:i="horizontal",disabled:o=!1,minStepsBetweenThumbs:u=0,defaultValue:c=[r],value:d,onValueChange:_=()=>{},onValueCommit:p=()=>{},inverted:g=!1,form:y,...T}=e,M=S.useRef(new Set),L=S.useRef(0),b=i==="horizontal"?n9e:r9e,[w=[],N]=As({prop:d,defaultProp:c,onChange:j=>{var z;(z=[...M.current][L.current])==null||z.focus(),_(j)}}),k=S.useRef(w);function I(j){const W=l9e(w,j);U(j,W)}function Y(j){U(j,L.current)}function H(){const j=k.current[L.current];w[L.current]!==j&&p(w)}function U(j,W,{commit:z}={commit:!1}){const Q=f9e(s),te=m9e(Math.round((j-r)/s)*s+r,Q),fe=Gh(te,[r,a]);N((he=[])=>{const K=i9e(he,fe,W);if(d9e(K,u*s)){L.current=K.indexOf(fe);const q=String(K)!==String(he);return q&&z&&p(K),q?K:he}else return he})}return f.jsx(t9e,{scope:e.__scopeSlider,name:n,disabled:o,min:r,max:a,valueIndexToChangeRef:L,thumbs:M.current,values:w,orientation:i,form:y,children:f.jsx(xN.Provider,{scope:e.__scopeSlider,children:f.jsx(xN.Slot,{scope:e.__scopeSlider,children:f.jsx(b,{"aria-disabled":o,"data-disabled":o?"":void 0,...T,ref:t,onPointerDown:Fe(T.onPointerDown,()=>{o||(k.current=w)}),min:r,max:a,inverted:g,onSlideStart:o?void 0:I,onSlideMove:o?void 0:Y,onSlideEnd:o?void 0:H,onHomeKeyDown:()=>!o&&U(r,0,{commit:!0}),onEndKeyDown:()=>!o&&U(a,w.length-1,{commit:!0}),onStepKeyDown:({event:j,direction:W})=>{if(!o){const te=WK.includes(j.key)||j.shiftKey&&GK.includes(j.key)?10:1,fe=L.current,he=w[fe],K=s*te*W;U(he+K,fe,{commit:!0})}}})})})})});qK.displayName=Jm;var[KK,JK]=VK(Jm,{startEdge:"left",endEdge:"right",size:"width",direction:1}),n9e=S.forwardRef((e,t)=>{const{min:n,max:r,dir:a,inverted:s,onSlideStart:i,onSlideMove:o,onSlideEnd:u,onStepKeyDown:c,...d}=e,[_,p]=S.useState(null),g=wt(t,b=>p(b)),y=S.useRef(),T=wd(a),M=T==="ltr",L=M&&!s||!M&&s;function v(b){const w=y.current||_.getBoundingClientRect(),N=[0,w.width],I=UI(N,L?[n,r]:[r,n]);return y.current=w,I(b-w.left)}return f.jsx(KK,{scope:e.__scopeSlider,startEdge:L?"left":"right",endEdge:L?"right":"left",direction:L?1:-1,size:"width",children:f.jsx(XK,{dir:T,"data-orientation":"horizontal",...d,ref:g,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:b=>{const w=v(b.clientX);i==null||i(w)},onSlideMove:b=>{const w=v(b.clientX);o==null||o(w)},onSlideEnd:()=>{y.current=void 0,u==null||u()},onStepKeyDown:b=>{const N=zK[L?"from-left":"from-right"].includes(b.key);c==null||c({event:b,direction:N?-1:1})}})})}),r9e=S.forwardRef((e,t)=>{const{min:n,max:r,inverted:a,onSlideStart:s,onSlideMove:i,onSlideEnd:o,onStepKeyDown:u,...c}=e,d=S.useRef(null),_=wt(t,d),p=S.useRef(),g=!a;function y(T){const M=p.current||d.current.getBoundingClientRect(),L=[0,M.height],b=UI(L,g?[r,n]:[n,r]);return p.current=M,b(T-M.top)}return f.jsx(KK,{scope:e.__scopeSlider,startEdge:g?"bottom":"top",endEdge:g?"top":"bottom",size:"height",direction:g?1:-1,children:f.jsx(XK,{"data-orientation":"vertical",...c,ref:_,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:T=>{const M=y(T.clientY);s==null||s(M)},onSlideMove:T=>{const M=y(T.clientY);i==null||i(M)},onSlideEnd:()=>{p.current=void 0,o==null||o()},onStepKeyDown:T=>{const L=zK[g?"from-bottom":"from-top"].includes(T.key);u==null||u({event:T,direction:L?-1:1})}})})}),XK=S.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:a,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:o,onStepKeyDown:u,...c}=e,d=fv(Jm,n);return f.jsx(ft.span,{...c,ref:t,onKeyDown:Fe(e.onKeyDown,_=>{_.key==="Home"?(i(_),_.preventDefault()):_.key==="End"?(o(_),_.preventDefault()):WK.concat(GK).includes(_.key)&&(u(_),_.preventDefault())}),onPointerDown:Fe(e.onPointerDown,_=>{const p=_.target;p.setPointerCapture(_.pointerId),_.preventDefault(),d.thumbs.has(p)?p.focus():r(_)}),onPointerMove:Fe(e.onPointerMove,_=>{_.target.hasPointerCapture(_.pointerId)&&a(_)}),onPointerUp:Fe(e.onPointerUp,_=>{const p=_.target;p.hasPointerCapture(_.pointerId)&&(p.releasePointerCapture(_.pointerId),s(_))})})}),ZK="SliderTrack",QK=S.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=fv(ZK,n);return f.jsx(ft.span,{"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation,...r,ref:t})});QK.displayName=ZK;var AN="SliderRange",eJ=S.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,a=fv(AN,n),s=JK(AN,n),i=S.useRef(null),o=wt(t,i),u=a.values.length,c=a.values.map(p=>nJ(p,a.min,a.max)),d=u>1?Math.min(...c):0,_=100-Math.max(...c);return f.jsx(ft.span,{"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0,...r,ref:o,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:_+"%"}})});eJ.displayName=AN;var wN="SliderThumb",tJ=S.forwardRef((e,t)=>{const n=QWe(e.__scopeSlider),[r,a]=S.useState(null),s=wt(t,o=>a(o)),i=S.useMemo(()=>r?n().findIndex(o=>o.ref.current===r):-1,[n,r]);return f.jsx(a9e,{...e,ref:s,index:i})}),a9e=S.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:a,...s}=e,i=fv(wN,n),o=JK(wN,n),[u,c]=S.useState(null),d=wt(t,v=>c(v)),_=u?i.form||!!u.closest("form"):!0,p=kT(u),g=i.values[r],y=g===void 0?0:nJ(g,i.min,i.max),T=o9e(r,i.values.length),M=p==null?void 0:p[o.size],L=M?u9e(M,y,o.direction):0;return S.useEffect(()=>{if(u)return i.thumbs.add(u),()=>{i.thumbs.delete(u)}},[u,i.thumbs]),f.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[o.startEdge]:`calc(${y}% + ${L}px)`},children:[f.jsx(xN.ItemSlot,{scope:e.__scopeSlider,children:f.jsx(ft.span,{role:"slider","aria-label":e["aria-label"]||T,"aria-valuemin":i.min,"aria-valuenow":g,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:d,style:g===void 0?{display:"none"}:e.style,onFocus:Fe(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),_&&f.jsx(s9e,{name:a??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:g},r)]})});tJ.displayName=wN;var s9e=e=>{const{value:t,...n}=e,r=S.useRef(null),a=IT(t);return S.useEffect(()=>{const s=r.current,i=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(i,"value").set;if(a!==t&&u){const c=new Event("input",{bubbles:!0});u.call(s,t),s.dispatchEvent(c)}},[a,t]),f.jsx("input",{style:{display:"none"},...n,ref:r,defaultValue:t})};function i9e(e=[],t,n){const r=[...e];return r[n]=t,r.sort((a,s)=>a-s)}function nJ(e,t,n){const s=100/(n-t)*(e-t);return Gh(s,[0,100])}function o9e(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function l9e(e,t){if(e.length===1)return 0;const n=e.map(a=>Math.abs(a-t)),r=Math.min(...n);return n.indexOf(r)}function u9e(e,t,n){const r=e/2,s=UI([0,50],[0,r]);return(r-s(t)*n)*n}function c9e(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function d9e(e,t){if(t>0){const n=c9e(e);return Math.min(...n)>=t}return!0}function UI(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function f9e(e){return(String(e).split(".")[1]||"").length}function m9e(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var rJ=qK,_9e=QK,p9e=eJ,h9e=tJ;const Do=S.forwardRef(({className:e,...t},n)=>f.jsxs(rJ,{ref:n,className:Ie("relative flex w-full touch-none select-none items-center",t.disabled&&"data-[disabled]:opacity-50 data-[disabled]:cursor-not-allowed",e),...t,children:[f.jsx(_9e,{className:"relative h-1 w-full grow overflow-hidden rounded-full bg-secondary",children:f.jsx(p9e,{className:"absolute h-full bg-primary"})}),!(e!=null&&e.includes("thumbDisabled"))&&f.jsx(h9e,{className:"block h-3 w-3 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));Do.displayName=rJ.displayName;const tg=vr({userVolumes:{},setVolumeForUser:()=>{}}),g9e=({children:e})=>{const{setToLocalStorage:t,getFromLocalStorage:n}=Ul(),[r,a]=S.useState(n("userVolumes")??{}),s=(i,o)=>{const u={...r,[i]:o};a(u),t("userVolumes",u)};return f.jsx(tg.Provider,{value:{userVolumes:r,setVolumeForUser:s},children:e})},aJ=Et.memo(function({user:t,colorString:n}){var y;const r=Ft(),a=ve(dr,T=>T.currentUser),s=ve(zi,T=>T.selectedRoom),[i,o]=S.useState(!1),u=ve(tg,T=>T.setVolumeForUser),c=ve(tg,T=>T.userVolumes),d=(a==null?void 0:a.hexId)===((y=s==null?void 0:s.owner)==null?void 0:y.hexId)&&a.hexId!==(t==null?void 0:t.hexId)&&(t==null?void 0:t.authType)!=null&&s.joinedUsers.find(T=>T.hexId===(t==null?void 0:t.hexId))!=null;function _(){To.KickMember({roomGuid:s.guid,targetHexId:t==null?void 0:t.hexId}).then(()=>{o(!1)})}function p(T){return T?st(T).format("MM/DD/YYYY"):r("UNKNOWN_DATE")}function g(T){u(t==null?void 0:t.hexId,T[0])}return f.jsxs(f.Fragment,{children:[f.jsx("p",{style:{color:n,lineBreak:"anywhere"},children:(t==null?void 0:t.username)??r("UNKNOWN_USER")}),f.jsx($K,{authType:t==null?void 0:t.authType}),f.jsxs("div",{className:"text-sm text-primary/80",children:[f.jsxs("p",{children:[f.jsx("span",{className:"font-medium",children:"Colir ID"}),": ",t?fR(t.hexId):r("UNKNOWN_COLIR_ID")]}),f.jsxs("p",{children:[f.jsx("span",{className:"font-medium",children:r("REGISTRATION_DATE")}),": ",p(t==null?void 0:t.registrationDate)]}),(a==null?void 0:a.hexId)!=(t==null?void 0:t.hexId)&&f.jsxs("div",{className:"flex flex-row items-center gap-1 pt-1",children:[f.jsxs("p",{className:"font-semibold flex-shrink-0",children:[r("VOLUME"),":"]}),f.jsx(Do,{className:"cursor-pointer",value:[c[t==null?void 0:t.hexId]??50],onValueChange:g,step:.1})]})]}),d&&f.jsxs(et,{onClick:()=>o(!0),className:"mt-2 w-full",variant:"destructive",children:[f.jsx(boe,{className:"mr-2 h-4 w-4"})," ",r("KICK")]}),d&&f.jsx(Ls,{open:i,onOpenChange:o,children:f.jsxs(za,{children:[f.jsx(Pi,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsx(Ga,{children:f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:r("ARE_YOU_SURE")}),f.jsxs(ri,{children:[r("YOU_ARE_ABOUT_TO_KICK")," ",f.jsx("span",{className:"font-semibold",children:t==null?void 0:t.username})," ",r("FROM_THE_ROOM")]}),f.jsx(Ur,{className:"px-0 py-1",children:f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:()=>o(!1),className:"w-[100%]",variant:"outline",children:r("CANCEL")}),f.jsx(et,{onClick:_,className:"w-[100%]",variant:"destructive",children:r("CONFIRM")})]})})]})})]})})]})}),ng=Et.memo(function({user:t,className:n}){const r=Ft(),a=16777215,{colorString:s,isAdjusted:i}=DR(t?t.hexId:a);return f.jsxs(Pg,{children:[f.jsx(Yg,{style:{color:s},className:"max-w-56 rounded-sm text-nowrap overflow-hidden text-ellipsis focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1",children:f.jsxs(Tm,{children:[f.jsx(vm,{asChild:!0,children:f.jsx("span",{style:{color:s},className:Ie("cursor-pointer text-left text-nowrap overflow-hidden text-ellipsis hover:underline text-sm",n),children:t?t.username:r("UNKNOWN_USER")})}),i&&t&&f.jsx(gd,{children:f.jsx("p",{children:r("COLOR_WAS_ADJUSTED_TO_FIT_THEME")})})]})}),f.jsx(zm,{children:f.jsx(aJ,{user:t,colorString:s})})]})});function E9e({message:e,sender:t,className:n,decryptionKey:r,onReplyCancelled:a,onClicked:s}){let i=bl((e==null?void 0:e.content)??"",r);return f.jsxs("div",{className:Ie("flex flex-row overflow-hidden text-ellipsis pl-2.5 pr-3 h-5 justify-between items-center w-[100%]",n),children:[f.jsxs("div",{onClick:s,className:"flex flex-row cursor-pointer overflow-hidden text-ellipsis items-center text-[11px] gap-1 select-none",children:[f.jsx(M9,{className:"w-3 h-3"}),f.jsx(ng,{className:"text-[12px]",user:t}),f.jsxs("span",{className:"max-w-screen-sm overflow-hidden text-ellipsis whitespace-nowrap",children:[f.jsxs("span",{className:"flex flex-row overflow-hidden whitespace-nowrap text-ellipsis mr-1",children:[i,i===void 0&&f.jsx("span",{className:"text-destructive",children:f.jsx(f.Fragment,{children:'t("COULD_NOT_DECRYPT")'})})]}),f.jsx("div",{className:"flex flex-row gap-1",children:e==null?void 0:e.attachments.map(o=>f.jsxs("span",{className:"flex flex-row text-nowrap overflow-hidden text-ellipsis flex-nowrap text-primary/70",children:["[",bl(o.filename,r),"]"," "]},o.id))})]})]}),f.jsx("div",{className:"flex flex-row pl-1 items-center text-[11px] gap-1 select-none",children:f.jsx(poe,{onClick:a,className:"cursor-pointer w-4 h-4 stroke-slate-400/80 hover:stroke-slate-400/100"})})]})}function y9e(e){let{theme:t}=Dm();function n(r){return r.type.startsWith("image")}return f.jsxs("div",{className:Ie("flex flex-col gap-1 justify-center p-2 items-center aspect-square h-28 rounded-[6px]",t=="light"?"bg-gray-200":"bg-gray-900"),children:[n(e.file)&&f.jsx("img",{draggable:!1,src:URL.createObjectURL(e.file),className:"object-cover h-full rounded-[3px]"}),f.jsx("span",{style:{lineBreak:"anywhere"},className:"text-[11px] text-ellipsis overflow-hidden text-primary/90 select-none whitespace-break-spaces",children:e.file.name}),f.jsx(et,{onClick:()=>e.removeClicked(),className:"w-5 h-5 absolute z-[1] top-[-8px] right-[-4px] rounded-sm",variant:"destructive",size:"icon",children:f.jsx(dm,{className:"w-3 h-3"})})]})}function T9e(e){return f.jsx("div",{className:Ie("flex flex-row gap-1.5 p-1.5 pt-3 w-full flex-wrap",e.className,e.isDisabled&&"opacity-50 pointer-events-none"),children:e.files.map((t,n)=>f.jsx(y9e,{removeClicked:()=>e.onFileRemoved(t),file:t},n))})}function v9e({onSend:e,messageToReply:t,messageToReplyAuthor:n,className:r,encryptionKey:a,onReplyCancelled:s,variant:i="default",onReplySectionClicked:o}){const u=Ft();let c=S.useRef(),d=S.useRef(),_=S.useRef();const p=S.useRef(document);S.useEffect(()=>{const j=Q=>{var fe;if(Q.ctrlKey&&Q.keyCode!=86||Q.altKey||Q.keyCode==16||Q.keyCode==9||Q.keyCode==32)return;let te=(fe=document.activeElement)==null?void 0:fe.tagName;te==="TEXTAREA"||te==="INPUT"||te==="VIDEO"&&Q.keyCode==32||c.current&&(Q.key==="Enter"&&Q.preventDefault(),Q.key=="Escape"&&s(),c.current.textArea.focus())},W=Q=>{Q.preventDefault()},z=Q=>{var te;if(Q.preventDefault(),(te=Q.dataTransfer)!=null&&te.items)for(let fe=0;fe[...q,K])}}};return p.current.addEventListener("keydown",j),p.current.addEventListener("dragover",W),p.current.addEventListener("drop",z),()=>{p.current.removeEventListener("keydown",j),p.current.removeEventListener("dragover",W),p.current.removeEventListener("drop",z)}},[]);function g(){I([]),c.current.textArea.value="",c.current.textArea.style.height="42px"}let[y,T]=Et.useState(!1);const M=S.useRef(y);S.useEffect(()=>{M.current=y},[y]);async function L(){if(c.current.textArea.disabled||c.current.textArea.value.trim()===""&&k.length===0)return;const j=k.length>0?await Promise.all([...k].map(W=>due(W,a))):[];T(!0),e({content:Im(c.current.textArea.value,a)??"",attachments:j,replyMessageId:t==null?void 0:t.id}).then(()=>{g()}).finally(()=>{T(!1)})}function v(j,W){if(c.current.textArea.disabled)return;let z=c.current.textArea.value;c.current.textArea.value=z.substr(0,j)+W+z.substr(j),N(j+W.length)}function b(j){var W;if(j.key=="Escape"&&s(),j.key=="Enter"&&!j.shiftKey){if(j.preventDefault(),((W=j.target.value)==null?void 0:W.length)===0&&k.length===0){j.preventDefault();return}if(M.current)return;M.current=!0,L()}}function w(){return c.current.textArea.selectionStart}function N(j){c.current.textArea.selectionEnd=j}let[k,I]=Et.useState([]);function Y(j){let W=j.target.files;if(W.length!=0)for(let z=0;z[...te,Q])}}function H(j){I(W=>W.filter(z=>z!==j))}function U(j){const W=j.clipboardData.items;for(let z=0;z[...fe,te])}}}return S.useEffect(()=>{setTimeout(()=>c.current.textArea.focus(),10)},[t]),f.jsx(f.Fragment,{children:f.jsxs("div",{className:Ie("flex flex-col items-center",r),children:[f.jsxs("div",{ref:_,className:"flex flex-col bg-accent/80 w-full items-center rounded-t-[6px] gap-0.5",children:[f.jsx(E9e,{onClicked:o,onReplyCancelled:s,decryptionKey:a,message:t,sender:n,className:t&&i=="default"?"":"hidden"}),t&&k.length>0&&f.jsx(Fn,{className:"bg-secondary outline-none border-none"}),k.length>0&&f.jsx(T9e,{className:Ie(!t&&"rounded-t-[6px]"),isDisabled:y,onFileRemoved:H,files:k})]}),f.jsxs("div",{className:Ie("flex items-center",r),children:[(t||k.length>0)&&i=="default"&&f.jsx("div",{className:"absolute top-0 h-4 bg-accent/80 w-full"}),i==="default"&&f.jsxs(f.Fragment,{children:[f.jsx(Boe,{tabIndex:0,onClick:()=>d.current.click(),onKeyDown:j=>j.keyCode==32&&d.current.click(),strokeWidth:1.5,className:Ie(`cursor-pointer absolute z-10 stroke-slate-400/80 hover:stroke-slate-400 left-2 top-[20px] h-5 w-5 -translate-y-1/2 transform rounded-sm overflow-visible focus:outline-none focus-visible:ring-2 focus:ring-ring`,y&&"cursor-not-allowed text-primary/50 pointer-events-none")}),f.jsx("input",{onChange:Y,multiple:!0,className:"hidden",ref:d,type:"file"})]}),i==="connecting"&&f.jsx(lT,{className:"absolute z-10 pointer-events-none stroke-slate-400/80 animate-spin m-auto left-2 h-5 w-5"}),i=="connecting"&&f.jsx("span",{className:"z-10 absolute left pointer-events-none text-muted-foreground/90 text-sm pl-9",children:u("CONNECTING")}),i==="disconnected"&&f.jsx(Goe,{className:"absolute z-10 pointer-events-none stroke-primary m-auto left-2 h-5 w-5"}),i=="disconnected"&&f.jsx("span",{className:"z-10 absolute pointer-events-none left text-primary text-sm pl-9",children:u("DISCONNECTED_FROM_SERVER")}),f.jsx(uI,{onPaste:U,contentHidden:i==="connecting"||i==="disconnected",readOnly:i!=="default",disabled:y&&i==="default",autoFocus:!0,ref:c,onKeyDown:b,placeholder:i=="default"?u("WRITE_MESSAGE"):"",className:Ie(`flex items-center w-full !max-h-72 rounded-md border border-input bg-background px-3 py-2.5 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed h-11 pl-8 pr-20 resize-none ring-0 focus-visible:ring-0 focus-visible:ring-offset-0`,i=="connecting"&&"cursor-default",i=="disconnected"&&"cursor-not-allowed bg-destructive/25 border-destructive")}),i==="default"&&f.jsxs("div",{className:"absolute h-[100%] py-2 right-3 flex flex-row gap-2.5",children:[f.jsx($q,{onChange:j=>v(w(),j),disabled:y,className:"z-10 cursor-pointer stroke-slate-400/80 hover:stroke-slate-400 top-[14px] h-6 w-6 -translate-y-1/2 transform"},1),f.jsx(Fn,{orientation:"vertical"}),f.jsx(qoe,{tabIndex:0,onClick:L,onKeyDown:j=>j.keyCode==32&&L(),strokeWidth:1.5,className:Ie(`z-10 cursor-pointer stroke-slate-400/80 hover:stroke-slate-400 top-[14px] h-6 w-6 -translate-y-1/2 transform rounded-sm overflow-visible focus:outline-none focus-visible:ring-2 focus:ring-ring`,y&&"cursor-not-allowed text-primary/50 pointer-events-none")})]})]})]})})}function oL({className:e,...t}){return f.jsx("div",{className:Ie("animate-pulse rounded-md bg-muted",e),...t})}function b9e(){return f.jsxs("div",{className:"pl-2 py-0.5 my-1 flex flex-col gap-0.5",children:[f.jsxs("div",{className:"flex h-5 items-center max-w-24 flex-row gap-1",children:[f.jsx(oL,{className:"w-[60%] h-3"}),f.jsx(oL,{className:"w-[40%] h-3"})]}),f.jsx(oL,{className:"max-w-56 h-3"})]})}function S9e({parentRef:e}){let[t,n]=S.useState(0);return S.useEffect(()=>{var s;let r=(s=e==null?void 0:e.current)==null?void 0:s.offsetHeight,a=Math.floor(r/42);n(a)}),f.jsx(f.Fragment,{children:Array.from(Array(t).keys()).map(r=>f.jsx(b9e,{},r))})}class M9e{static async UploadAttachments(t){const n=new FormData;return n.append("roomGuid",t.roomGuid),t.files.forEach(r=>{n.append("files",r)}),await Bn.post(`${Fm}/Upload/UploadAttachments`,n)}}const My=e=>{const t=[];return e.map(n=>{t.find(r=>r.id==n.id)||t.push(n)}),t};function w0(e){return Number((e/1024/1024).toFixed(2))}const HI=()=>{const{getFromLocalStorage:e}=Ul();async function t(){return await Cu.IsAuthenticated().then(()=>e("jwtToken"))}return t};var jI="Progress",BI=100,[L9e,Zft]=Ja(jI),[x9e,A9e]=L9e(jI),sJ=S.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:s=w9e,...i}=e;(a||a===0)&&!i3(a)&&console.error(O9e(`${a}`,"Progress"));const o=i3(a)?a:BI;r!==null&&!o3(r,o)&&console.error(D9e(`${r}`,"Progress"));const u=o3(r,o)?r:null,c=Ly(u)?s(u,o):void 0;return f.jsx(x9e,{scope:n,value:u,max:o,children:f.jsx(ft.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":Ly(u)?u:void 0,"aria-valuetext":c,role:"progressbar","data-state":lJ(u,o),"data-value":u??void 0,"data-max":o,...i,ref:t})})});sJ.displayName=jI;var iJ="ProgressIndicator",oJ=S.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=A9e(iJ,n);return f.jsx(ft.div,{"data-state":lJ(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});oJ.displayName=iJ;function w9e(e,t){return`${Math.round(e/t*100)}%`}function lJ(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Ly(e){return typeof e=="number"}function i3(e){return Ly(e)&&!isNaN(e)&&e>0}function o3(e,t){return Ly(e)&&!isNaN(e)&&e<=t&&e>=0}function O9e(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${BI}\`.`}function D9e(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be: @@ -857,7 +857,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ${i[a]} ${t||""} `,children:f.jsxs("div",{className:"relative h-full w-full p-6",children:[e,f.jsxs("button",{onClick:()=>r(!1),className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",children:[f.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"h-4 w-4",children:f.jsx("path",{d:"M18 6L6 18M6 6l12 12"})}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})})};function cnt({room:e,isSelected:t,onClick:n,onMarkAsReadClicked:r,unreadRepliesCount:a}){var he;const s=Ft(),i=Nd(),o=Xa(),u=ve(Yr,K=>K.setIsFaqOpen),c=ve(Yr,K=>K.setSelectedFaqTab),[d,_]=S.useState(!1),[p,g]=S.useState(!1),[y,T]=S.useState(!1);let M=ve(zi,K=>K.selectedRoom),L=ve(zi,K=>K.setSelectedRoom),v=ve(ws,K=>K.setJoinedRooms),b=ve(dr,K=>K.currentUser),w=ve(ju,K=>K.setEncryptionKey),k=ve(ju,K=>K.getEncryptionKey)(e.guid);const I=Xr.object({roomName:Xr.string().min(2,{message:s("ROOM_NAME_MUST_BE_AT_LEAST_N_CHARACTERS",2)}).max(50,{message:s("ROOM_NAME_CANT_BE_LONGER_THAN_N_CHARACTERS",50)}),encryptionKey:Xr.string().min(2,{message:s("ENCRYPTION_KEY_MUST_BE_AT_LEAST_N_CHATACTER",2)})});function Y(){To.LeaveRoom({roomGuid:e.guid}).then(()=>{let K=[];v(q=>(K=q.filter($=>$.guid!==e.guid),K)),(M==null?void 0:M.guid)==e.guid&&K.length>0&&L(K[0]),_(!1)}).catch(()=>o(s("OOPS"),s("UNABLE_TO_LEAVE_FROM_ROOM")))}function H(){navigator.clipboard.writeText(e.guid),i(s("COPIED"),s("ROOM_GUID_COPIED_TO_CLIPBOARD"))}function U(){To.DeleteRoom({roomGuid:e.guid}).then(()=>{v(K=>K.filter(q=>q.guid!==e.guid)),T(!1)}).catch(()=>o(s("OOPS"),s("UNABLE_TO_DELETE_ROOM")))}function j(K){K.preventDefault(),g(!1),setTimeout(()=>Q.reset({roomName:e.name,encryptionKey:k||""}),100)}function W(K){K.preventDefault(),g(!1),T(!0)}function z(K){K.preventDefault(),T(!1),g(!0)}const Q=Um({resolver:Hm(I),defaultValues:{roomName:e.name,encryptionKey:k||""}});function te(K){K.roomName!=e.name&&To.RenameRoom({roomGuid:e.guid,newName:K.roomName}).then(()=>{v(q=>{let $=q.find(X=>X.guid==e.guid);return $&&($.name=K.roomName),[...q]})}).catch(()=>o(s("AN_ERROR_OCCURRED"),s("UNABLE_TO_CHANGE_ROOM_NAME"))),K.encryptionKey!=k&&w(e.guid,K.encryptionKey),g(!1)}function fe(K){g(!1),K.preventDefault(),c(gn.HowKeysWork),u(!0)}return f.jsxs(f.Fragment,{children:[f.jsxs(WI,{children:[f.jsx(GI,{asChild:!0,children:f.jsxs("button",{onClick:n,className:`flex gap-0.5 justify-between items-center rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-[-1.5px] disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer - hover:bg-accent hover:text-accent-foreground h-9 px-2 ${t?"bg-accent":null}`,children:[f.jsxs("div",{className:"flex overflow-hidden items-center whitespace-nowrap",children:[f.jsx(iR,{className:"text-slate-400 h-4 min-w-4 max-w-4 mr-2"}),f.jsx("span",{className:"text-popover-foreground text-ellipsis text-nowrap inline-block overflow-hidden max-w-[100%]",children:e.name})]}),a>0&&f.jsx("span",{className:"flex text-white rounded-full bg-destructive justify-center items-center shrink-0 w-4 h-4 text-[12px]",children:a})]})}),f.jsxs(mv,{children:[f.jsxs(Qs,{onClick:()=>g(!0),children:[f.jsx(Koe,{className:"mr-2 h-4 w-4"})," ",s("ROOM_SETTINGS")]}),f.jsxs(Qs,{onClick:()=>H(),children:[f.jsx(sR,{className:"mr-2 h-4 w-4"})," ",s("COPY_GUID")]}),f.jsxs(Qs,{disabled:a<=0,onClick:()=>r(e),children:[f.jsx(Ioe,{className:"mr-2 h-4 w-4"})," ",s("MARK_AS_READ")]}),f.jsxs(Qs,{onClick:()=>_(!0),children:[f.jsx(Roe,{className:"mr-2 h-4 w-4"})," ",s("LEAVE")]})]})]}),f.jsx(Ls,{open:d,onOpenChange:_,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ARE_YOU_SURE")}),f.jsx(ri,{children:s("YOU_ARE_ABOUT_TO_LEAVE_ROOM")})]}),f.jsxs(Ur,{children:[f.jsx("span",{className:"text-[15px]",children:s("YOU_WILL_BE_ABLE_TO_REJOIN_WITH_GUID")}),f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:()=>_(!1),className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsx(et,{onClick:()=>Y(),className:"w-[100%]",variant:"destructive",children:s("CONFIRM")})]})]})]})]})}),f.jsx(Ls,{open:p,onOpenChange:g,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ROOM_SETTINGS")}),f.jsx(ri,{children:s("HERE_YOU_CAN_MANAGE_ROOM")}),f.jsx(Fn,{})]}),f.jsx(Ur,{children:f.jsx(jm,{...Q,children:f.jsxs("form",{onSubmit:Q.handleSubmit(te),autoComplete:"off",className:"flex flex-col gap-2.5",children:[f.jsx(bo,{name:"roomName",control:Q.control,render:({field:K})=>{var q;return f.jsxs(Ii,{className:"space-y-1",children:[f.jsx(xo,{children:s("ROOM_NAME")}),f.jsx(Ao,{children:f.jsx(Hi,{disabled:((q=e==null?void 0:e.owner)==null?void 0:q.hexId)!=(b==null?void 0:b.hexId),autoComplete:"off",id:"roomName",placeholder:s("ROOM_NAME_PLACEHOLDER"),...K})}),f.jsx(Nl,{className:"text-slate-500 text-sm",children:s("NAME_DISPLAYED_TO_MEMBERS")}),f.jsx(Cl,{})]})}}),f.jsx(bo,{name:"encryptionKey",control:Q.control,render:({field:K})=>f.jsxs(Ii,{className:"space-y-1",children:[f.jsx(xo,{children:s("ENCRYPTION_KEY")}),f.jsxs("div",{className:"relative flex items-center",children:[f.jsx(oT,{strokeWidth:2.5,className:"absolute z-10 pointer-events-none stroke-slate-400 left-2 top-1/2 h-4 w-4 -translate-y-1/2 transform"}),f.jsx(Ao,{children:f.jsx(Hi,{type:"text",id:"encryptionKey",placeholder:s("SOMETHING_SECRET_HERE"),className:"pl-7 password",...K})})]}),f.jsxs(Nl,{className:"text-slate-500 text-sm",children:[s("ENTER_KEY_FOR_ENCRYPTION_DECRYPTION")," ",f.jsx(rT,{onClick:fe,className:"underline",to:"/",children:s("WHY")})]}),f.jsx(Cl,{})]})}),f.jsxs("div",{className:"flex flex-col gap gap-2",children:[((he=e==null?void 0:e.owner)==null?void 0:he.hexId)==(b==null?void 0:b.hexId)&&f.jsxs(et,{type:"button",onClick:W,className:"w-[100%]",variant:"destructive",children:[f.jsx(dm,{className:"mr-1 h-4 w-4"}),s("DELETE_ROOM")]}),f.jsxs("div",{className:"flex flex-row gap-2",children:[f.jsx(et,{type:"button",onClick:j,className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsxs(et,{type:"submit",className:"w-[100%]",children:[f.jsx(Cm,{className:"mr-1 h-4 w-4"}),s("APPLY")]})]})]})]})})})]})]})}),f.jsx(Ls,{open:y,onOpenChange:T,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ARE_YOU_SURE")}),f.jsx(ri,{children:s("YOU_ARE_ABOUT_TO_DELETE_ROOM")})]}),f.jsxs(Ur,{children:[f.jsxs("span",{className:"text-[15px]",children:[s("THIS_ACTION_WILL_DELETE_ROOM"),f.jsx("br",{}),s("THIS_ACTION_CANT_BE_UNDONE")]}),f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:z,className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsx(et,{onClick:U,className:"w-[100%]",variant:"destructive",children:s("CONFIRM")})]})]})]})]})})]})}function dnt(){let e=ve(ws,o=>o.joinedRooms),t=ve(zi,o=>o.selectedRoom),n=ve(zi,o=>o.setSelectedRoom),r=ve(yl,o=>o.unreadReplies),a=ve(yl,o=>o.setUnreadReplies);function s(o){n(o)}function i(o){To.UpdateLastReadMessage({roomGuid:o.guid}),a(u=>u.filter(c=>c.roomGuid!=o.guid))}return f.jsx(Xu,{className:"overflow-hidden scrollbar-hidden",children:f.jsx("div",{className:"flex flex-col gap-2",children:e.sort((o,u)=>o.name.localeCompare(u.name)).map(o=>f.jsx(cnt,{unreadRepliesCount:r.filter(u=>u.roomGuid==o.guid).length,onClick:()=>s(o),isSelected:o.guid==(t==null?void 0:t.guid),room:o,onMarkAsReadClicked:i},o.guid))})})}const Eu=vr({isMuted:!0,isDeafened:!1,setIsMuted:()=>{},setIsDeafened:()=>{}}),fnt=({children:e})=>{const[t,n]=S.useState(!0),[r,a]=S.useState(!1);return f.jsx(Eu.Provider,{value:{isMuted:t,isDeafened:r,setIsMuted:n,setIsDeafened:a},children:e})},Tl=vr({voiceChatConnections:[],setVoiceChatConnections:()=>{},joinedVoiceConnection:void 0,setJoinedVoiceConnection:()=>{}}),mnt=({children:e})=>{const[t,n]=S.useState(),[r,a]=S.useState([]);return f.jsx(Tl.Provider,{value:{voiceChatConnections:r,setVoiceChatConnections:a,joinedVoiceConnection:t,setJoinedVoiceConnection:n},children:e})};function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}function pnt(e){S.useEffect(e,[])}var hnt=["id","volume","playbackRate","soundEnabled","interrupt","onload"];function If(e,t){var n=t===void 0?{}:t,r=n.volume,a=r===void 0?1:r,s=n.playbackRate,i=s===void 0?1:s,o=n.soundEnabled,u=o===void 0?!0:o,c=n.interrupt,d=c===void 0?!1:c,_=n.onload,p=_nt(n,hnt),g=Et.useRef(null),y=Et.useRef(!1),T=Et.useState(null),M=T[0],L=T[1],v=Et.useState(null),b=v[0],w=v[1],N=function(){typeof _=="function"&&_.call(this),y.current&&L(this.duration()*1e3),w(this)};pnt(function(){return at(()=>import("./howler-C_yWAEoa.js").then(U=>U.h),[]).then(function(U){if(!y.current){var j;g.current=(j=U.Howl)!==null&&j!==void 0?j:U.default.Howl,y.current=!0,new g.current(Oy({src:Array.isArray(e)?e:[e],volume:a,rate:i,onload:N},p))}}),function(){y.current=!1}}),Et.useEffect(function(){g.current&&b&&w(new g.current(Oy({src:Array.isArray(e)?e:[e],volume:a,onload:N},p)))},[JSON.stringify(e)]),Et.useEffect(function(){b&&(b.volume(a),b.rate(i))},[a,i]);var k=Et.useCallback(function(U){typeof U>"u"&&(U={}),!(!b||!u&&!U.forceSoundEnabled)&&(d&&b.stop(),U.playbackRate&&b.rate(U.playbackRate),b.play(U.id))},[b,u,d]),I=Et.useCallback(function(U){b&&b.stop(U)},[b]),Y=Et.useCallback(function(U){b&&b.pause(U)},[b]),H=[k,{sound:b,stop:I,pause:Y,duration:M}];return H}const gnt="https://colir.net/assets/mute-B0eRhPAn.mp3",Ent="https://colir.net/assets/unmute-JloucqNZ.mp3",ynt="https://colir.net/assets/deafen-rikx6uCV.mp3",Tnt="https://colir.net/assets/undeafen-KO1ZulLc.mp3";function wZ({className:e}){const t=ve(Eu,p=>p.isMuted),n=ve(Eu,p=>p.setIsMuted),r=ve(Eu,p=>p.isDeafened),a=ve(Eu,p=>p.setIsDeafened),s=ve(Tl,p=>p.joinedVoiceConnection),[i]=If(gnt,{volume:.5}),[o]=If(Ent,{volume:.5}),[u]=If(ynt,{volume:.5}),[c]=If(Tnt,{volume:.5});function d(){t?setTimeout(()=>o(),25):i(),r&&a(!1),n(!t)}function _(){r||n(!0),a(!r),r?c():u()}return S.useEffect(()=>{s&&s.connection.state==Wt.Connected&&(t?s.connection.invoke("MuteSelf"):s.connection.invoke("UnmuteSelf"))},[t]),S.useEffect(()=>{s&&s.connection.state==Wt.Connected&&(r?s.connection.invoke("DeafenSelf"):s.connection.invoke("UndeafenSelf"))},[r]),f.jsxs("div",{className:Ie("flex flex-col gap-2",e),children:[f.jsx(et,{onClick:d,variant:"ghost",className:"w-8 h-8 focus-visible:ring-offset-0",size:"icon",children:f.jsxs("span",{className:Ie("transition-colors duration-100",t&&"text-destructive",!t&&"text-slate-400"),children:[t&&f.jsx(A9,{strokeWidth:1.7,className:"text-destructive w-6 h-6"}),!t&&f.jsx(w9,{strokeWidth:1.7,className:"text-slate-400 w-6 h-6"})]})}),f.jsx(et,{onClick:_,variant:"ghost",className:"w-8 h-8 focus-visible:ring-offset-0",size:"icon",children:f.jsxs("span",{className:Ie("transition-colors duration-100",r&&"text-destructive",!r&&"text-slate-400"),children:[r&&f.jsx(L9,{strokeWidth:1.7,className:"w-6 h-6"}),!r&&f.jsx(Loe,{strokeWidth:1.7,className:"w-6 h-6"})]})})]})}function $B(){const e=Ft();let[t,n]=S.useState(!1),r=ve(ws,u=>u.joinedRooms),a=ve(ws,u=>u.setJoinedRooms),s=ve(zi,u=>u.setSelectedRoom);const i=ve(Yr,u=>u.isFaqOpen);function o(u){a([...r,u]),n(!1),s(u)}return S.useEffect(()=>{i&&n(!1)},[i]),f.jsxs("div",{className:"flex gap-1 w-full h-full p-2.5 pb-0",children:[f.jsxs("div",{className:"flex flex-col h-full w-full overflow-hidden gap-2.5",children:[f.jsxs(et,{className:"h-19",onClick:()=>n(!0),variant:"secondary",children:[f.jsx(zoe,{className:"mr-1 h-4 w-4"})," ",e("NEW_ROOM")]}),f.jsx(dnt,{}),f.jsx(Ls,{open:t,onOpenChange:n,children:f.jsxs(za,{children:[f.jsx(Pi,{className:"hidden"}),f.jsx(Rg,{className:"hidden"}),f.jsx(Yz,{onJoinedRoom:u=>o(u),onRoomCreated:u=>o(u)})]})})]}),f.jsx("div",{className:"h-full shrink-0",children:f.jsx(wZ,{})})]})}const{createElement:Sm,createContext:vnt,createRef:tmt,forwardRef:OZ,useCallback:Ca,useContext:DZ,useEffect:td,useImperativeHandle:kZ,useLayoutEffect:bnt,useMemo:Snt,useRef:Fa,useState:Zf}=Hy,WB=Hy[`useId${Math.random()}`.slice(0,5)],Mnt=bnt,Sv=vnt(null);Sv.displayName="PanelGroupContext";const nd=Mnt,Lnt=typeof WB=="function"?WB:()=>null;let xnt=0;function b2(e=null){const t=Lnt(),n=Fa(e||t||null);return n.current===null&&(n.current=""+xnt++),e??n.current}function NZ({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:a,forwardedRef:s,id:i,maxSize:o,minSize:u,onCollapse:c,onExpand:d,onResize:_,order:p,style:g,tagName:y="div",...T}){const M=DZ(Sv);if(M===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:L,expandPanel:v,getPanelSize:b,getPanelStyle:w,groupId:N,isPanelCollapsed:k,reevaluatePanelConstraints:I,registerPanel:Y,resizePanel:H,unregisterPanel:U}=M,j=b2(i),W=Fa({callbacks:{onCollapse:c,onExpand:d,onResize:_},constraints:{collapsedSize:n,collapsible:r,defaultSize:a,maxSize:o,minSize:u},id:j,idIsFromProps:i!==void 0,order:p});Fa({didLogMissingDefaultSizeWarning:!1}),nd(()=>{const{callbacks:Q,constraints:te}=W.current,fe={...te};W.current.id=j,W.current.idIsFromProps=i!==void 0,W.current.order=p,Q.onCollapse=c,Q.onExpand=d,Q.onResize=_,te.collapsedSize=n,te.collapsible=r,te.defaultSize=a,te.maxSize=o,te.minSize=u,(fe.collapsedSize!==te.collapsedSize||fe.collapsible!==te.collapsible||fe.maxSize!==te.maxSize||fe.minSize!==te.minSize)&&I(W.current,fe)}),nd(()=>{const Q=W.current;return Y(Q),()=>{U(Q)}},[p,j,Y,U]),kZ(s,()=>({collapse:()=>{L(W.current)},expand:Q=>{v(W.current,Q)},getId(){return j},getSize(){return b(W.current)},isCollapsed(){return k(W.current)},isExpanded(){return!k(W.current)},resize:Q=>{H(W.current,Q)}}),[L,v,b,k,j,H]);const z=w(W.current,a);return Sm(y,{...T,children:e,className:t,id:i,style:{...z,...g},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":N,"data-panel-id":j,"data-panel-size":parseFloat(""+z.flexGrow).toFixed(1)})}const CZ=OZ((e,t)=>Sm(NZ,{...e,forwardedRef:t}));NZ.displayName="Panel";CZ.displayName="forwardRef(Panel)";let FN=null,Wc=null;function Ant(e,t){if(t){const n=(t&FZ)!==0,r=(t&UZ)!==0,a=(t&HZ)!==0,s=(t&jZ)!==0;if(n)return a?"se-resize":s?"ne-resize":"e-resize";if(r)return a?"sw-resize":s?"nw-resize":"w-resize";if(a)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function wnt(){Wc!==null&&(document.head.removeChild(Wc),FN=null,Wc=null)}function hD(e,t){const n=Ant(e,t);FN!==n&&(FN=n,Wc===null&&(Wc=document.createElement("style"),document.head.appendChild(Wc)),Wc.innerHTML=`*{cursor: ${n}!important;}`)}function RZ(e){return e.type==="keydown"}function IZ(e){return e.type.startsWith("pointer")}function PZ(e){return e.type.startsWith("mouse")}function Mv(e){if(IZ(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(PZ(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Ont(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dnt(e,t,n){return e.xt.x&&e.yt.y}function knt(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:VB(e),b:VB(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Bt(r,"Stacking order can only be calculated for elements with a common ancestor");const a={a:zB(GB(n.a)),b:zB(GB(n.b))};if(a.a===a.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let o=s.length;for(;o--;){const u=s[o];if(u===i.a)return 1;if(u===i.b)return-1}}return Math.sign(a.a-a.b)}const Nnt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Cnt(e){var t;const n=getComputedStyle((t=YZ(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function Rnt(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Cnt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Nnt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function GB(e){let t=e.length;for(;t--;){const n=e[t];if(Bt(n,"Missing node"),Rnt(n))return n}return null}function zB(e){return e&&Number(getComputedStyle(e).zIndex)||0}function VB(e){const t=[];for(;e;)t.push(e),e=YZ(e);return t}function YZ(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const FZ=1,UZ=2,HZ=4,jZ=8,Int=Ont()==="coarse";let Fi=[],Qf=!1,cu=new Map,Lv=new Map;const ag=new Set;function Pnt(e,t,n,r,a){var s;const{ownerDocument:i}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:a},u=(s=cu.get(i))!==null&&s!==void 0?s:0;return cu.set(i,u+1),ag.add(o),Dy(),function(){var d;Lv.delete(e),ag.delete(o);const _=(d=cu.get(i))!==null&&d!==void 0?d:1;if(cu.set(i,_-1),Dy(),_===1&&cu.delete(i),Fi.includes(o)){const p=Fi.indexOf(o);p>=0&&Fi.splice(p,1),M2(),a("up",!0,null)}}}function qB(e){const{target:t}=e,{x:n,y:r}=Mv(e);Qf=!0,S2({target:t,x:n,y:r}),Dy(),Fi.length>0&&(ky("down",e),e.preventDefault(),e.stopPropagation())}function Tp(e){const{x:t,y:n}=Mv(e);if(Qf&&e.buttons===0&&(Qf=!1,ky("up",e)),!Qf){const{target:r}=e;S2({target:r,x:t,y:n})}ky("move",e),M2(),Fi.length>0&&e.preventDefault()}function cf(e){const{target:t}=e,{x:n,y:r}=Mv(e);Lv.clear(),Qf=!1,Fi.length>0&&e.preventDefault(),ky("up",e),S2({target:t,x:n,y:r}),M2(),Dy()}function S2({target:e,x:t,y:n}){Fi.splice(0);let r=null;e instanceof HTMLElement&&(r=e),ag.forEach(a=>{const{element:s,hitAreaMargins:i}=a,o=s.getBoundingClientRect(),{bottom:u,left:c,right:d,top:_}=o,p=Int?i.coarse:i.fine;if(t>=c-p&&t<=d+p&&n>=_-p&&n<=u+p){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&knt(r,s)>0){let y=r,T=!1;for(;y&&!y.contains(s);){if(Dnt(y.getBoundingClientRect(),o)){T=!0;break}y=y.parentElement}if(T)return}Fi.push(a)}})}function gD(e,t){Lv.set(e,t)}function M2(){let e=!1,t=!1;Fi.forEach(r=>{const{direction:a}=r;a==="horizontal"?e=!0:t=!0});let n=0;Lv.forEach(r=>{n|=r}),e&&t?hD("intersection",n):e?hD("horizontal",n):t?hD("vertical",n):wnt()}function Dy(){cu.forEach((e,t)=>{const{body:n}=t;n.removeEventListener("contextmenu",cf),n.removeEventListener("pointerdown",qB),n.removeEventListener("pointerleave",Tp),n.removeEventListener("pointermove",Tp)}),window.removeEventListener("pointerup",cf),window.removeEventListener("pointercancel",cf),ag.size>0&&(Qf?(Fi.length>0&&cu.forEach((e,t)=>{const{body:n}=t;e>0&&(n.addEventListener("contextmenu",cf),n.addEventListener("pointerleave",Tp),n.addEventListener("pointermove",Tp))}),window.addEventListener("pointerup",cf),window.addEventListener("pointercancel",cf)):cu.forEach((e,t)=>{const{body:n}=t;e>0&&(n.addEventListener("pointerdown",qB,{capture:!0}),n.addEventListener("pointermove",Tp))}))}function ky(e,t){ag.forEach(n=>{const{setResizeHandlerState:r}=n,a=Fi.includes(n);r(e,a,t)})}function Ynt(){const[e,t]=Zf(0);return Ca(()=>t(n=>n+1),[])}function Bt(e,t){if(!e)throw console.error(t),Error(t)}const L2=10;function Ed(e,t,n=L2){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function ml(e,t,n=L2){return Ed(e,t,n)===0}function ps(e,t,n){return Ed(e,t,n)===0}function Fnt(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r0&&(e=e<0?0-L:L)}}}{const _=e<0?o:u,p=n[_];Bt(p,`No panel constraints found for index ${_}`);const{collapsedSize:g=0,collapsible:y,minSize:T=0}=p;if(y){const M=t[_];if(Bt(M!=null,`Previous layout not found for panel index ${_}`),ps(M,T)){const L=M-g;Ed(L,Math.abs(e))>0&&(e=e<0?0-L:L)}}}}{const _=e<0?1:-1;let p=e<0?u:o,g=0;for(;;){const T=t[p];Bt(T!=null,`Previous layout not found for panel index ${p}`);const L=Pf({panelConstraints:n,panelIndex:p,size:100})-T;if(g+=L,p+=_,p<0||p>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-y:y}{let p=e<0?o:u;for(;p>=0&&p=0))break;e<0?p--:p++}}if(Fnt(a,i))return a;{const _=e<0?u:o,p=t[_];Bt(p!=null,`Previous layout not found for panel index ${_}`);const g=p+c,y=Pf({panelConstraints:n,panelIndex:_,size:g});if(i[_]=y,!ps(y,g)){let T=g-y,L=e<0?u:o;for(;L>=0&&L0?L--:L++}}}const d=i.reduce((_,p)=>p+_,0);return ps(d,100)?i:a}function Unt({layout:e,panelsArray:t,pivotIndices:n}){let r=0,a=100,s=0,i=0;const o=n[0];Bt(o!=null,"No pivot index found"),t.forEach((_,p)=>{const{constraints:g}=_,{maxSize:y=100,minSize:T=0}=g;p===o?(r=T,a=y):(s+=T,i+=y)});const u=Math.min(a,100-s),c=Math.max(r,100-i),d=e[o];return{valueMax:u,valueMin:c,valueNow:d}}function sg(e,t=document){return Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`))}function BZ(e,t,n=document){const a=sg(e,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===t);return a??null}function $Z(e,t,n){const r=BZ(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function WZ(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function xv(e,t=document){const n=t.querySelector(`[data-panel-resize-handle-id="${e}"]`);return n||null}function Hnt(e,t,n,r=document){var a,s,i,o;const u=xv(t,r),c=sg(e,r),d=u?c.indexOf(u):-1,_=(a=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,p=(i=(o=n[d+1])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null;return[_,p]}function jnt({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:a,panelGroupElement:s,setLayout:i}){Fa({didWarnAboutMissingResizeHandle:!1}),nd(()=>{if(!s)return;const o=sg(n,s);for(let u=0;u{o.forEach((u,c)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,a,s]),td(()=>{if(!s)return;const o=t.current;Bt(o,"Eager values not found");const{panelDataArray:u}=o,c=WZ(n,s);Bt(c!=null,`No group found for id "${n}"`);const d=sg(n,s);Bt(d,`No resize handles found for group id "${n}"`);const _=d.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");Bt(g,"Resize handle element has no handle id attribute");const[y,T]=Hnt(n,g,u,s);if(y==null||T==null)return()=>{};const M=L=>{if(!L.defaultPrevented)switch(L.key){case"Enter":{L.preventDefault();const v=u.findIndex(b=>b.id===y);if(v>=0){const b=u[v];Bt(b,`No panel data found for index ${v}`);const w=r[v],{collapsedSize:N=0,collapsible:k,minSize:I=0}=b.constraints;if(w!=null&&k){const Y=Yp({delta:ps(w,N)?I-N:N-w,initialLayout:r,panelConstraints:u.map(H=>H.constraints),pivotIndices:$Z(n,g,s),prevLayout:r,trigger:"keyboard"});r!==Y&&i(Y)}}break}}};return p.addEventListener("keydown",M),()=>{p.removeEventListener("keydown",M)}});return()=>{_.forEach(p=>p())}},[s,e,t,n,r,a,i])}function KB(e,t){if(e.length!==t.length)return!1;for(let n=0;ns.constraints);let r=0,a=100;for(let s=0;s{const s=e[a];Bt(s,`Panel data not found for index ${a}`);const{callbacks:i,constraints:o,id:u}=s,{collapsedSize:c=0,collapsible:d}=o,_=n[u];if(_==null||r!==_){n[u]=r;const{onCollapse:p,onExpand:g,onResize:y}=i;y&&y(r,_),d&&(p||g)&&(g&&(_==null||ml(_,c))&&!ml(r,c)&&g(),p&&(_==null||!ml(_,c))&&ml(r,c)&&p())}})}function N0(e,t){if(e.length!==t.length)return!1;for(let n=0;n{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...a)},t)}}function JB(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function zZ(e){return`react-resizable-panels:${e}`}function VZ(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:a,order:s}=t;return a?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function qZ(e,t){try{const n=zZ(e),r=t.getItem(n);if(r){const a=JSON.parse(r);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function Vnt(e,t,n){var r,a;const s=(r=qZ(e,n))!==null&&r!==void 0?r:{},i=VZ(t);return(a=s[i])!==null&&a!==void 0?a:null}function qnt(e,t,n,r,a){var s;const i=zZ(e),o=VZ(t),u=(s=qZ(e,a))!==null&&s!==void 0?s:{};u[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{a.setItem(i,JSON.stringify(u))}catch(c){console.error(c)}}function XB({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!ps(r,100)&&n.length>0)for(let s=0;s(JB(Fp),Fp.getItem(e)),setItem:(e,t)=>{JB(Fp),Fp.setItem(e,t)}},ZB={};function KZ({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:a,id:s=null,onLayout:i=null,keyboardResizeBy:o=null,storage:u=Fp,style:c,tagName:d="div",..._}){const p=b2(s),g=Fa(null),[y,T]=Zf(null),[M,L]=Zf([]),v=Ynt(),b=Fa({}),w=Fa(new Map),N=Fa(0),k=Fa({autoSaveId:e,direction:r,dragState:y,id:p,keyboardResizeBy:o,onLayout:i,storage:u}),I=Fa({layout:M,panelDataArray:[],panelDataArrayChanged:!1});Fa({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),kZ(a,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:B}=I.current;return B},setLayout:B=>{const{onLayout:ue}=k.current,{layout:oe,panelDataArray:Se}=I.current,Te=XB({layout:B,panelConstraints:Se.map(be=>be.constraints)});KB(oe,Te)||(L(Te),I.current.layout=Te,ue&&ue(Te),df(Se,Te,b.current))}}),[]),nd(()=>{k.current.autoSaveId=e,k.current.direction=r,k.current.dragState=y,k.current.id=p,k.current.onLayout=i,k.current.storage=u}),jnt({committedValuesRef:k,eagerValuesRef:I,groupId:p,layout:M,panelDataArray:I.current.panelDataArray,setLayout:L,panelGroupElement:g.current}),td(()=>{const{panelDataArray:B}=I.current;if(e){if(M.length===0||M.length!==B.length)return;let ue=ZB[e];ue==null&&(ue=znt(qnt,Knt),ZB[e]=ue);const oe=[...B],Se=new Map(w.current);ue(e,oe,Se,M,u)}},[e,M,u]),td(()=>{});const Y=Ca(B=>{const{onLayout:ue}=k.current,{layout:oe,panelDataArray:Se}=I.current;if(B.constraints.collapsible){const Te=Se.map(Pe=>Pe.constraints),{collapsedSize:be=0,panelSize:We,pivotIndices:ye}=Cc(Se,B,oe);if(Bt(We!=null,`Panel size not found for panel "${B.id}"`),!ml(We,be)){w.current.set(B.id,We);const Ve=gf(Se,B)===Se.length-1?We-be:be-We,Ge=Yp({delta:Ve,initialLayout:oe,panelConstraints:Te,pivotIndices:ye,prevLayout:oe,trigger:"imperative-api"});N0(oe,Ge)||(L(Ge),I.current.layout=Ge,ue&&ue(Ge),df(Se,Ge,b.current))}}},[]),H=Ca((B,ue)=>{const{onLayout:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current;if(B.constraints.collapsible){const be=Te.map(Ze=>Ze.constraints),{collapsedSize:We=0,panelSize:ye=0,minSize:Pe=0,pivotIndices:Ve}=Cc(Te,B,Se),Ge=ue??Pe;if(ml(ye,We)){const Ze=w.current.get(B.id),Lt=Ze!=null&&Ze>=Ge?Ze:Ge,yt=gf(Te,B)===Te.length-1?ye-Lt:Lt-ye,ne=Yp({delta:yt,initialLayout:Se,panelConstraints:be,pivotIndices:Ve,prevLayout:Se,trigger:"imperative-api"});N0(Se,ne)||(L(ne),I.current.layout=ne,oe&&oe(ne),df(Te,ne,b.current))}}},[]),U=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{panelSize:Se}=Cc(oe,B,ue);return Bt(Se!=null,`Panel size not found for panel "${B.id}"`),Se},[]),j=Ca((B,ue)=>{const{panelDataArray:oe}=I.current,Se=gf(oe,B);return Gnt({defaultSize:ue,dragState:y,layout:M,panelData:oe,panelIndex:Se})},[y,M]),W=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{collapsedSize:Se=0,collapsible:Te,panelSize:be}=Cc(oe,B,ue);return Bt(be!=null,`Panel size not found for panel "${B.id}"`),Te===!0&&ml(be,Se)},[]),z=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{collapsedSize:Se=0,collapsible:Te,panelSize:be}=Cc(oe,B,ue);return Bt(be!=null,`Panel size not found for panel "${B.id}"`),!Te||Ed(be,Se)>0},[]),Q=Ca(B=>{const{panelDataArray:ue}=I.current;ue.push(B),ue.sort((oe,Se)=>{const Te=oe.order,be=Se.order;return Te==null&&be==null?0:Te==null?-1:be==null?1:Te-be}),I.current.panelDataArrayChanged=!0,v()},[v]);nd(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:B,onLayout:ue,storage:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current;let be=null;if(B){const ye=Vnt(B,Te,oe);ye&&(w.current=new Map(Object.entries(ye.expandToSizes)),be=ye.layout)}be==null&&(be=Wnt({panelDataArray:Te}));const We=XB({layout:be,panelConstraints:Te.map(ye=>ye.constraints)});KB(Se,We)||(L(We),I.current.layout=We,ue&&ue(We),df(Te,We,b.current))}}),nd(()=>{const B=I.current;return()=>{B.layout=[]}},[]);const te=Ca(B=>function(oe){oe.preventDefault();const Se=g.current;if(!Se)return()=>null;const{direction:Te,dragState:be,id:We,keyboardResizeBy:ye,onLayout:Pe}=k.current,{layout:Ve,panelDataArray:Ge}=I.current,{initialLayout:Ze}=be??{},Lt=$Z(We,B,Se);let ct=$nt(oe,B,Te,be,ye,Se);const yt=Te==="horizontal";document.dir==="rtl"&&yt&&(ct=-ct);const ne=Ge.map(Le=>Le.constraints),ie=Yp({delta:ct,initialLayout:Ze??Ve,panelConstraints:ne,pivotIndices:Lt,prevLayout:Ve,trigger:RZ(oe)?"keyboard":"mouse-or-touch"}),ge=!N0(Ve,ie);(IZ(oe)||PZ(oe))&&N.current!=ct&&(N.current=ct,!ge&&ct!==0?yt?gD(B,ct<0?FZ:UZ):gD(B,ct<0?HZ:jZ):gD(B,0)),ge&&(L(ie),I.current.layout=ie,Pe&&Pe(ie),df(Ge,ie,b.current))},[]),fe=Ca((B,ue)=>{const{onLayout:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current,be=Te.map(Ze=>Ze.constraints),{panelSize:We,pivotIndices:ye}=Cc(Te,B,Se);Bt(We!=null,`Panel size not found for panel "${B.id}"`);const Ve=gf(Te,B)===Te.length-1?We-ue:ue-We,Ge=Yp({delta:Ve,initialLayout:Se,panelConstraints:be,pivotIndices:ye,prevLayout:Se,trigger:"imperative-api"});N0(Se,Ge)||(L(Ge),I.current.layout=Ge,oe&&oe(Ge),df(Te,Ge,b.current))},[]),he=Ca((B,ue)=>{const{layout:oe,panelDataArray:Se}=I.current,{collapsedSize:Te=0,collapsible:be}=ue,{collapsedSize:We=0,collapsible:ye,maxSize:Pe=100,minSize:Ve=0}=B.constraints,{panelSize:Ge}=Cc(Se,B,oe);Ge!=null&&(be&&ye&&ml(Ge,Te)?ml(Te,We)||fe(B,We):GePe&&fe(B,Pe))},[fe]),K=Ca((B,ue)=>{const{direction:oe}=k.current,{layout:Se}=I.current;if(!g.current)return;const Te=xv(B,g.current);Bt(Te,`Drag handle element not found for id "${B}"`);const be=GZ(oe,ue);T({dragHandleId:B,dragHandleRect:Te.getBoundingClientRect(),initialCursorPosition:be,initialLayout:Se})},[]),q=Ca(()=>{T(null)},[]),$=Ca(B=>{const{panelDataArray:ue}=I.current,oe=gf(ue,B);oe>=0&&(ue.splice(oe,1),delete b.current[B.id],I.current.panelDataArrayChanged=!0,v())},[v]),X=Snt(()=>({collapsePanel:Y,direction:r,dragState:y,expandPanel:H,getPanelSize:U,getPanelStyle:j,groupId:p,isPanelCollapsed:W,isPanelExpanded:z,reevaluatePanelConstraints:he,registerPanel:Q,registerResizeHandle:te,resizePanel:fe,startDragging:K,stopDragging:q,unregisterPanel:$,panelGroupElement:g.current}),[Y,y,r,H,U,j,p,W,z,he,Q,te,fe,K,q,$]),ce={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sm(Sv.Provider,{value:X},Sm(d,{..._,children:t,className:n,id:s,ref:g,style:{...ce,...c},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":p}))}const JZ=OZ((e,t)=>Sm(KZ,{...e,forwardedRef:t}));KZ.displayName="PanelGroup";JZ.displayName="forwardRef(PanelGroup)";function gf(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Cc(e,t,n){const r=gf(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Jnt({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){td(()=>{if(e||n==null||r==null)return;const a=xv(t,r);if(a==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const o=a.getAttribute("data-panel-group-id");Bt(o,`No group element found for id "${o}"`);const u=sg(o,r),c=BZ(o,t,r);Bt(c!==null,`No resize element found for id "${t}"`);const d=i.shiftKey?c>0?c-1:u.length-1:c+1{a.removeEventListener("keydown",s)}},[r,e,t,n])}function XZ({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:a,onBlur:s,onDragging:i,onFocus:o,style:u={},tabIndex:c=0,tagName:d="div",..._}){var p,g;const y=Fa(null),T=Fa({onDragging:i});td(()=>{T.current.onDragging=i});const M=DZ(Sv);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:L,groupId:v,registerResizeHandle:b,startDragging:w,stopDragging:N,panelGroupElement:k}=M,I=b2(a),[Y,H]=Zf("inactive"),[U,j]=Zf(!1),[W,z]=Zf(null),Q=Fa({state:Y});nd(()=>{Q.current.state=Y}),td(()=>{if(n)z(null);else{const K=b(I);z(()=>K)}},[n,I,b]);const te=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,fe=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return td(()=>{if(n||W==null)return;const K=y.current;return Bt(K,"Element ref not attached"),Pnt(I,K,L,{coarse:te,fine:fe},($,X,ce)=>{if(X)switch($){case"down":{H("drag"),Bt(ce,'Expected event to be defined for "down" action'),w(I,ce);const{onDragging:B}=T.current;B&&B(!0);break}case"move":{const{state:B}=Q.current;B!=="drag"&&H("hover"),Bt(ce,'Expected event to be defined for "move" action'),W(ce);break}case"up":{H("hover"),N();const{onDragging:B}=T.current;B&&B(!1);break}}else H("inactive")})},[te,L,n,fe,b,I,W,w,N]),Jnt({disabled:n,handleId:I,resizeHandler:W,panelGroupElement:k}),Sm(d,{..._,children:e,className:t,id:a,onBlur:()=>{j(!1),s==null||s()},onFocus:()=>{j(!0),o==null||o()},ref:y,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...u},tabIndex:c,"data-panel-group-direction":L,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":Y==="drag"?"pointer":U?"keyboard":void 0,"data-resize-handle-state":Y,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":I})}XZ.displayName="PanelResizeHandle";const Xnt=({className:e,...t})=>f.jsx(JZ,{className:Ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),QB=CZ,Znt=({withHandle:e,className:t,...n})=>f.jsx(XZ,{className:Ie("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&f.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:f.jsx(Moe,{className:"h-2.5 w-2.5"})})}),Qnt="https://colir.net/assets/ping-CCl3cumC.mp3",Vi=vr({pingVolume:50,isPingSoundDisabled:!1,setPingVolume:()=>{},setIsPingSoundDisabled:()=>{},joinLeaveVolume:50,isJoinLeaveSoundDisabled:!1,setJoinLeaveVolume:()=>{},setIsJoinLeaveSoundDisabled:()=>{}}),ert=({children:e})=>{let{getFromLocalStorage:t,setToLocalStorage:n}=Ul();const[r,a]=S.useState(t("pingVolume")??50),[s,i]=S.useState(t("isPingSoundDisabled")??!1),[o,u]=S.useState(t("joinLeaveVolume")??50),[c,d]=S.useState(t("isJoinLeaveSoundDisabled")??!1);function _(){n("pingVolume",r),n("isPingSoundDisabled",s),n("joinLeaveVolume",o),n("isJoinLeaveSoundDisabled",c)}return S.useEffect(()=>{_()},[r,s,o,c]),f.jsx(Vi.Provider,{value:{pingVolume:r,isPingSoundDisabled:s,setPingVolume:a,setIsPingSoundDisabled:i,joinLeaveVolume:o,isJoinLeaveSoundDisabled:c,setJoinLeaveVolume:u,setIsJoinLeaveSoundDisabled:d},children:e})},trt=(e,t,n,r,a,s,i,o,u)=>{const c=Nd(),d=Xa(),_=HI(),p=S.useRef(t),g=S.useRef(o),y=ve(Vi,N=>N.pingVolume),T=ve(Vi,N=>N.isPingSoundDisabled),M=S.useRef(T),L=S.useRef(y);S.useEffect(()=>{M.current=T,L.current=y},[y,T]),S.useEffect(()=>{p.current=t,g.current=o},[t,o]);const v=()=>{if(M.current)return;let N=new Audio(Qnt);N.volume=L.current/100,N.play()},b=()=>{if(!p.current||!e)return;let N=[];p.current.forEach(k=>{k.joinedUsers.forEach(I=>{N.push(I.hexId)})}),i(k=>[...k.filter(I=>N.find(Y=>Y==I.hexId))])},w=(N,k)=>{!t||!e||k.state==Wt.Disconnected&&(k.start().then(()=>{k.invoke("GetMessages",{count:1,skipCount:0}).then(I=>{k.invoke("GetUnreadRepliesAsync").then(Y=>{if(Y.content.length>0){s(j=>[...j,...Y.content]);let H=I.content[0],U=Y.content[0];k.invoke("GetMessagesRange",{startId:U.id,endId:H.id}).then(j=>{a(W=>j!=null&&j.content?My([...W,...j.content]):W)})}else k.invoke("GetMessages",{count:25,skipCount:0}).then(H=>{a(U=>H!=null&&H.content?My([...U,...H.content]):U)})})}),k.on("ReceiveMessage",I=>{var Y;I.repliedMessage&&I.repliedMessage.authorHexId==e.hexId&&((Y=g==null?void 0:g.current)==null?void 0:Y.guid)!=I.roomGuid&&(s(H=>[...H,I]),v()),a(H=>[...H,I])}),k.on("MessageDeleted",I=>{s(Y=>Y.filter(H=>H.id!=I)),a(Y=>[...Y.filter(H=>H.id!=I)])}),k.on("MessageEdited",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,content:I.content,editDate:I.editDate}:H))),k.on("MessageGotReaction",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,reactions:I.reactions}:H))),k.on("MessageLostReaction",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,reactions:I.reactions}:H))),k.on("UserJoined",I=>{var Y;e.hexId!=I.hexId&&(((Y=g==null?void 0:g.current)==null?void 0:Y.guid)==N&&c("User joined",`${I.username} has joined the room.`),i(H=>[...H,I]),n(H=>{let U=H.find(j=>j.guid==N);return U==null||U.joinedUsers.push(I),[...H]}))}),k.on("UserLeft",I=>{if(n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]}),e.hexId==I){r(Y=>[...Y.filter(H=>H.roomGuid!=N)]),k.stop();return}}),k.on("UserKicked",I=>{if(n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]}),e.hexId==I){r(H=>[...H.filter(U=>U.roomGuid!=N)]);let Y=[...p.current.filter(H=>H.guid!=N)];n(Y),a(H=>H.filter(U=>U.roomGuid!=N)),Y.length>0&&g.current.guid==N&&u(Y[0]),k.stop();return}}),k.on("RoomRenamed",I=>{n(Y=>{let H=Y.find(U=>U.guid==g.current.guid);return H&&(H.name=I),[...Y]})}),k.on("RoomDeleted",()=>{n(I=>[...I.filter(Y=>Y.guid!=g.current.guid)]),a(I=>[...I.filter(Y=>Y.roomGuid!=g.current.guid)])}),k.on("RoomSizeChanged",I=>{let Y=p.current.find(H=>H.guid==N);(Y==null?void 0:Y.usedMemoryInBytes)!=I&&n(H=>{let U=H.find(j=>j.guid==N);if(U){let j=U.freeMemoryInBytes+U.usedMemoryInBytes;U.freeMemoryInBytes=j-I,U.usedMemoryInBytes=I}return[...H]})}),k.on("RoomCleared",()=>{a(I=>I.map(Y=>Y.roomGuid===N?{...Y,attachments:[]}:Y)),n(I=>{let Y=I.find(H=>H.guid==N);if(Y){let H=Y.freeMemoryInBytes+Y.usedMemoryInBytes;Y.freeMemoryInBytes=H,Y.usedMemoryInBytes=0}return[...I]})}),k.on("UserRenamed",({hexId:I,newName:Y})=>{i(H=>{var U;return((U=H.find(j=>j.hexId==I))==null?void 0:U.username)==Y?H:H.map(j=>j.hexId==I?{...j,username:Y}:j)}),n(H=>H.map(U=>({...U,joinedUsers:U.joinedUsers.map(j=>j.hexId==I?{...j,username:Y}:j)})))}),k.on("UserDeleted",I=>{n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]})})}).catch(I=>{d("Couldn't connect to the room",`We weren't able to establish a connection. Error: ${I}.`)}),k.onclose(()=>{k.off("ReceiveMessage"),k.off("MessageDeleted"),k.off("MessageEdited"),k.off("MessageGotReaction"),k.off("MessageLostReaction"),k.off("UserJoined"),k.off("UserLeft"),k.off("UserKicked"),k.off("RoomRenamed"),k.off("RoomDeleted"),k.off("RoomSizeChanged"),k.off("RoomCleared"),k.off("UserRenamed"),k.off("UserDeleted")}))};return S.useEffect(()=>{t&&(b(),_().then(N=>{t.map(k=>{let I=new xT().withUrl(`${Fm}/Chat?roomGuid=${k.guid}`,{accessTokenFactory:()=>N}).withAutomaticReconnect(Array.from({length:20},()=>1e3)).build();r(Y=>Y.find(H=>H.roomGuid==k.guid)?Y:[...Y,{roomGuid:k.guid,connection:I}])})}))},[t.length,e]),S.useEffect(()=>{b()},[t]),{startChatConnection:w}};function nrt(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Av=e=>{const{present:t,children:n}=e,r=rrt(t),a=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=wt(r.ref,art(a));return typeof n=="function"||r.isPresent?S.cloneElement(a,{ref:s}):null};Av.displayName="Presence";function rrt(e){const[t,n]=S.useState(),r=S.useRef({}),a=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[o,u]=nrt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=C0(r.current);s.current=o==="mounted"?c:"none"},[o]),ur(()=>{const c=r.current,d=a.current;if(d!==e){const p=s.current,g=C0(c);e?u("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),ur(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,_=g=>{const T=C0(r.current).includes(g.animationName);if(g.target===t&&T&&(u("ANIMATION_END"),!a.current)){const M=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=M)})}},p=g=>{g.target===t&&(s.current=C0(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",_),t.addEventListener("animationend",_),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",_),t.removeEventListener("animationend",_)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:S.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function C0(e){return(e==null?void 0:e.animationName)||"none"}function art(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x2="Collapsible",[srt,nmt]=Bg(x2),[irt,A2]=srt(x2),ZZ=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:s,onOpenChange:i,...o}=e,[u=!1,c]=As({prop:r,defaultProp:a,onChange:i});return f.jsx(irt,{scope:n,disabled:s,contentId:Ss(),open:u,onOpenToggle:S.useCallback(()=>c(d=>!d),[c]),children:f.jsx(ft.div,{"data-state":O2(u),"data-disabled":s?"":void 0,...o,ref:t})})});ZZ.displayName=x2;var QZ="CollapsibleTrigger",ort=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=A2(QZ,n);return f.jsx(ft.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":O2(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:Fe(e.onClick,a.onOpenToggle)})});ort.displayName=QZ;var w2="CollapsibleContent",eQ=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=A2(w2,e.__scopeCollapsible);return f.jsx(Av,{present:n||a.open,children:({present:s})=>f.jsx(lrt,{...r,ref:t,present:s})})});eQ.displayName=w2;var lrt=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...s}=e,i=A2(w2,n),[o,u]=S.useState(r),c=S.useRef(null),d=wt(t,c),_=S.useRef(0),p=_.current,g=S.useRef(0),y=g.current,T=i.open||o,M=S.useRef(T),L=S.useRef();return S.useEffect(()=>{const v=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(v)},[]),ur(()=>{const v=c.current;if(v){L.current=L.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();_.current=b.height,g.current=b.width,M.current||(v.style.transitionDuration=L.current.transitionDuration,v.style.animationName=L.current.animationName),u(r)}},[i.open,r]),f.jsx(ft.div,{"data-state":O2(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!T,...s,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:T&&a})});function O2(e){return e?"open":"closed"}var urt=ZZ;const crt=urt,drt=eQ;function frt({voiceChatUser:e,user:t,isTalking:n,couldDecrypt:r,className:a}){const{colorString:i}=DR(t?t.hexId:16777215);let[o,u]=S.useState(!1);return f.jsxs(Pg,{open:o,onOpenChange:u,children:[f.jsx(Yg,{tabIndex:0,asChild:!0,onKeyDown:c=>c.keyCode==32&&u(!0),children:f.jsxs("div",{className:`flex p-2 cursor-pointer transition-colors duration-150 hover:bg-secondary items-center justify-between gap-2 select-none + hover:bg-accent hover:text-accent-foreground h-9 px-2 ${t?"bg-accent":null}`,children:[f.jsxs("div",{className:"flex overflow-hidden items-center whitespace-nowrap",children:[f.jsx(iR,{className:"text-slate-400 h-4 min-w-4 max-w-4 mr-2"}),f.jsx("span",{className:"text-popover-foreground text-ellipsis text-nowrap inline-block overflow-hidden max-w-[100%]",children:e.name})]}),a>0&&f.jsx("span",{className:"flex text-white rounded-full bg-destructive justify-center items-center shrink-0 w-4 h-4 text-[12px]",children:a})]})}),f.jsxs(mv,{children:[f.jsxs(Qs,{onClick:()=>g(!0),children:[f.jsx(Koe,{className:"mr-2 h-4 w-4"})," ",s("ROOM_SETTINGS")]}),f.jsxs(Qs,{onClick:()=>H(),children:[f.jsx(sR,{className:"mr-2 h-4 w-4"})," ",s("COPY_GUID")]}),f.jsxs(Qs,{disabled:a<=0,onClick:()=>r(e),children:[f.jsx(Ioe,{className:"mr-2 h-4 w-4"})," ",s("MARK_AS_READ")]}),f.jsxs(Qs,{onClick:()=>_(!0),children:[f.jsx(Roe,{className:"mr-2 h-4 w-4"})," ",s("LEAVE")]})]})]}),f.jsx(Ls,{open:d,onOpenChange:_,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ARE_YOU_SURE")}),f.jsx(ri,{children:s("YOU_ARE_ABOUT_TO_LEAVE_ROOM")})]}),f.jsxs(Ur,{children:[f.jsx("span",{className:"text-[15px]",children:s("YOU_WILL_BE_ABLE_TO_REJOIN_WITH_GUID")}),f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:()=>_(!1),className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsx(et,{onClick:()=>Y(),className:"w-[100%]",variant:"destructive",children:s("CONFIRM")})]})]})]})]})}),f.jsx(Ls,{open:p,onOpenChange:g,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ROOM_SETTINGS")}),f.jsx(ri,{children:s("HERE_YOU_CAN_MANAGE_ROOM")}),f.jsx(Fn,{})]}),f.jsx(Ur,{children:f.jsx(jm,{...Q,children:f.jsxs("form",{onSubmit:Q.handleSubmit(te),autoComplete:"off",className:"flex flex-col gap-2.5",children:[f.jsx(bo,{name:"roomName",control:Q.control,render:({field:K})=>{var q;return f.jsxs(Ii,{className:"space-y-1",children:[f.jsx(xo,{children:s("ROOM_NAME")}),f.jsx(Ao,{children:f.jsx(Hi,{disabled:((q=e==null?void 0:e.owner)==null?void 0:q.hexId)!=(b==null?void 0:b.hexId),autoComplete:"off",id:"roomName",placeholder:s("ROOM_NAME_PLACEHOLDER"),...K})}),f.jsx(Nl,{className:"text-slate-500 text-sm",children:s("NAME_DISPLAYED_TO_MEMBERS")}),f.jsx(Cl,{})]})}}),f.jsx(bo,{name:"encryptionKey",control:Q.control,render:({field:K})=>f.jsxs(Ii,{className:"space-y-1",children:[f.jsx(xo,{children:s("ENCRYPTION_KEY")}),f.jsxs("div",{className:"relative flex items-center",children:[f.jsx(oT,{strokeWidth:2.5,className:"absolute z-10 pointer-events-none stroke-slate-400 left-2 top-1/2 h-4 w-4 -translate-y-1/2 transform"}),f.jsx(Ao,{children:f.jsx(Hi,{type:"text",id:"encryptionKey",placeholder:s("SOMETHING_SECRET_HERE"),className:"pl-7 password",...K})})]}),f.jsxs(Nl,{className:"text-slate-500 text-sm",children:[s("ENTER_KEY_FOR_ENCRYPTION_DECRYPTION")," ",f.jsx(rT,{onClick:fe,className:"underline",to:"/",children:s("WHY")})]}),f.jsx(Cl,{})]})}),f.jsxs("div",{className:"flex flex-col gap gap-2",children:[((he=e==null?void 0:e.owner)==null?void 0:he.hexId)==(b==null?void 0:b.hexId)&&f.jsxs(et,{type:"button",onClick:W,className:"w-[100%]",variant:"destructive",children:[f.jsx(dm,{className:"mr-1 h-4 w-4"}),s("DELETE_ROOM")]}),f.jsxs("div",{className:"flex flex-row gap-2",children:[f.jsx(et,{type:"button",onClick:j,className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsxs(et,{type:"submit",className:"w-[100%]",children:[f.jsx(Cm,{className:"mr-1 h-4 w-4"}),s("APPLY")]})]})]})]})})})]})]})}),f.jsx(Ls,{open:y,onOpenChange:T,children:f.jsxs(za,{children:[f.jsx(Zp,{className:"hidden"}),f.jsx(Yi,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:s("ARE_YOU_SURE")}),f.jsx(ri,{children:s("YOU_ARE_ABOUT_TO_DELETE_ROOM")})]}),f.jsxs(Ur,{children:[f.jsxs("span",{className:"text-[15px]",children:[s("THIS_ACTION_WILL_DELETE_ROOM"),f.jsx("br",{}),s("THIS_ACTION_CANT_BE_UNDONE")]}),f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:z,className:"w-[100%]",variant:"outline",children:s("CANCEL")}),f.jsx(et,{onClick:U,className:"w-[100%]",variant:"destructive",children:s("CONFIRM")})]})]})]})]})})]})}function dnt(){let e=ve(ws,o=>o.joinedRooms),t=ve(zi,o=>o.selectedRoom),n=ve(zi,o=>o.setSelectedRoom),r=ve(yl,o=>o.unreadReplies),a=ve(yl,o=>o.setUnreadReplies);function s(o){n(o)}function i(o){To.UpdateLastReadMessage({roomGuid:o.guid}),a(u=>u.filter(c=>c.roomGuid!=o.guid))}return f.jsx(Xu,{className:"overflow-hidden scrollbar-hidden",children:f.jsx("div",{className:"flex flex-col gap-2",children:e.sort((o,u)=>o.name.localeCompare(u.name)).map(o=>f.jsx(cnt,{unreadRepliesCount:r.filter(u=>u.roomGuid==o.guid).length,onClick:()=>s(o),isSelected:o.guid==(t==null?void 0:t.guid),room:o,onMarkAsReadClicked:i},o.guid))})})}const Eu=vr({isMuted:!0,isDeafened:!1,setIsMuted:()=>{},setIsDeafened:()=>{}}),fnt=({children:e})=>{const[t,n]=S.useState(!0),[r,a]=S.useState(!1);return f.jsx(Eu.Provider,{value:{isMuted:t,isDeafened:r,setIsMuted:n,setIsDeafened:a},children:e})},Tl=vr({voiceChatConnections:[],setVoiceChatConnections:()=>{},joinedVoiceConnection:void 0,setJoinedVoiceConnection:()=>{}}),mnt=({children:e})=>{const[t,n]=S.useState(),[r,a]=S.useState([]);return f.jsx(Tl.Provider,{value:{voiceChatConnections:r,setVoiceChatConnections:a,joinedVoiceConnection:t,setJoinedVoiceConnection:n},children:e})};function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)continue;n[r]=e[r]}return n}function pnt(e){S.useEffect(e,[])}var hnt=["id","volume","playbackRate","soundEnabled","interrupt","onload"];function If(e,t){var n=t===void 0?{}:t,r=n.volume,a=r===void 0?1:r,s=n.playbackRate,i=s===void 0?1:s,o=n.soundEnabled,u=o===void 0?!0:o,c=n.interrupt,d=c===void 0?!1:c,_=n.onload,p=_nt(n,hnt),g=Et.useRef(null),y=Et.useRef(!1),T=Et.useState(null),M=T[0],L=T[1],v=Et.useState(null),b=v[0],w=v[1],N=function(){typeof _=="function"&&_.call(this),y.current&&L(this.duration()*1e3),w(this)};pnt(function(){return at(()=>import("./howler-BJguJDIs.js").then(U=>U.h),[]).then(function(U){if(!y.current){var j;g.current=(j=U.Howl)!==null&&j!==void 0?j:U.default.Howl,y.current=!0,new g.current(Oy({src:Array.isArray(e)?e:[e],volume:a,rate:i,onload:N},p))}}),function(){y.current=!1}}),Et.useEffect(function(){g.current&&b&&w(new g.current(Oy({src:Array.isArray(e)?e:[e],volume:a,onload:N},p)))},[JSON.stringify(e)]),Et.useEffect(function(){b&&(b.volume(a),b.rate(i))},[a,i]);var k=Et.useCallback(function(U){typeof U>"u"&&(U={}),!(!b||!u&&!U.forceSoundEnabled)&&(d&&b.stop(),U.playbackRate&&b.rate(U.playbackRate),b.play(U.id))},[b,u,d]),I=Et.useCallback(function(U){b&&b.stop(U)},[b]),Y=Et.useCallback(function(U){b&&b.pause(U)},[b]),H=[k,{sound:b,stop:I,pause:Y,duration:M}];return H}const gnt="https://colir.net/assets/mute-B0eRhPAn.mp3",Ent="https://colir.net/assets/unmute-JloucqNZ.mp3",ynt="https://colir.net/assets/deafen-rikx6uCV.mp3",Tnt="https://colir.net/assets/undeafen-KO1ZulLc.mp3";function wZ({className:e}){const t=ve(Eu,p=>p.isMuted),n=ve(Eu,p=>p.setIsMuted),r=ve(Eu,p=>p.isDeafened),a=ve(Eu,p=>p.setIsDeafened),s=ve(Tl,p=>p.joinedVoiceConnection),[i]=If(gnt,{volume:.5}),[o]=If(Ent,{volume:.5}),[u]=If(ynt,{volume:.5}),[c]=If(Tnt,{volume:.5});function d(){t?setTimeout(()=>o(),25):i(),r&&a(!1),n(!t)}function _(){r||n(!0),a(!r),r?c():u()}return S.useEffect(()=>{s&&s.connection.state==Wt.Connected&&(t?s.connection.invoke("MuteSelf"):s.connection.invoke("UnmuteSelf"))},[t]),S.useEffect(()=>{s&&s.connection.state==Wt.Connected&&(r?s.connection.invoke("DeafenSelf"):s.connection.invoke("UndeafenSelf"))},[r]),f.jsxs("div",{className:Ie("flex flex-col gap-2",e),children:[f.jsx(et,{onClick:d,variant:"ghost",className:"w-8 h-8 focus-visible:ring-offset-0",size:"icon",children:f.jsxs("span",{className:Ie("transition-colors duration-100",t&&"text-destructive",!t&&"text-slate-400"),children:[t&&f.jsx(A9,{strokeWidth:1.7,className:"text-destructive w-6 h-6"}),!t&&f.jsx(w9,{strokeWidth:1.7,className:"text-slate-400 w-6 h-6"})]})}),f.jsx(et,{onClick:_,variant:"ghost",className:"w-8 h-8 focus-visible:ring-offset-0",size:"icon",children:f.jsxs("span",{className:Ie("transition-colors duration-100",r&&"text-destructive",!r&&"text-slate-400"),children:[r&&f.jsx(L9,{strokeWidth:1.7,className:"w-6 h-6"}),!r&&f.jsx(Loe,{strokeWidth:1.7,className:"w-6 h-6"})]})})]})}function $B(){const e=Ft();let[t,n]=S.useState(!1),r=ve(ws,u=>u.joinedRooms),a=ve(ws,u=>u.setJoinedRooms),s=ve(zi,u=>u.setSelectedRoom);const i=ve(Yr,u=>u.isFaqOpen);function o(u){a([...r,u]),n(!1),s(u)}return S.useEffect(()=>{i&&n(!1)},[i]),f.jsxs("div",{className:"flex gap-1 w-full h-full p-2.5 pb-0",children:[f.jsxs("div",{className:"flex flex-col h-full w-full overflow-hidden gap-2.5",children:[f.jsxs(et,{className:"h-19",onClick:()=>n(!0),variant:"secondary",children:[f.jsx(zoe,{className:"mr-1 h-4 w-4"})," ",e("NEW_ROOM")]}),f.jsx(dnt,{}),f.jsx(Ls,{open:t,onOpenChange:n,children:f.jsxs(za,{children:[f.jsx(Pi,{className:"hidden"}),f.jsx(Rg,{className:"hidden"}),f.jsx(Yz,{onJoinedRoom:u=>o(u),onRoomCreated:u=>o(u)})]})})]}),f.jsx("div",{className:"h-full shrink-0",children:f.jsx(wZ,{})})]})}const{createElement:Sm,createContext:vnt,createRef:tmt,forwardRef:OZ,useCallback:Ca,useContext:DZ,useEffect:td,useImperativeHandle:kZ,useLayoutEffect:bnt,useMemo:Snt,useRef:Fa,useState:Zf}=Hy,WB=Hy[`useId${Math.random()}`.slice(0,5)],Mnt=bnt,Sv=vnt(null);Sv.displayName="PanelGroupContext";const nd=Mnt,Lnt=typeof WB=="function"?WB:()=>null;let xnt=0;function b2(e=null){const t=Lnt(),n=Fa(e||t||null);return n.current===null&&(n.current=""+xnt++),e??n.current}function NZ({children:e,className:t="",collapsedSize:n,collapsible:r,defaultSize:a,forwardedRef:s,id:i,maxSize:o,minSize:u,onCollapse:c,onExpand:d,onResize:_,order:p,style:g,tagName:y="div",...T}){const M=DZ(Sv);if(M===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:L,expandPanel:v,getPanelSize:b,getPanelStyle:w,groupId:N,isPanelCollapsed:k,reevaluatePanelConstraints:I,registerPanel:Y,resizePanel:H,unregisterPanel:U}=M,j=b2(i),W=Fa({callbacks:{onCollapse:c,onExpand:d,onResize:_},constraints:{collapsedSize:n,collapsible:r,defaultSize:a,maxSize:o,minSize:u},id:j,idIsFromProps:i!==void 0,order:p});Fa({didLogMissingDefaultSizeWarning:!1}),nd(()=>{const{callbacks:Q,constraints:te}=W.current,fe={...te};W.current.id=j,W.current.idIsFromProps=i!==void 0,W.current.order=p,Q.onCollapse=c,Q.onExpand=d,Q.onResize=_,te.collapsedSize=n,te.collapsible=r,te.defaultSize=a,te.maxSize=o,te.minSize=u,(fe.collapsedSize!==te.collapsedSize||fe.collapsible!==te.collapsible||fe.maxSize!==te.maxSize||fe.minSize!==te.minSize)&&I(W.current,fe)}),nd(()=>{const Q=W.current;return Y(Q),()=>{U(Q)}},[p,j,Y,U]),kZ(s,()=>({collapse:()=>{L(W.current)},expand:Q=>{v(W.current,Q)},getId(){return j},getSize(){return b(W.current)},isCollapsed(){return k(W.current)},isExpanded(){return!k(W.current)},resize:Q=>{H(W.current,Q)}}),[L,v,b,k,j,H]);const z=w(W.current,a);return Sm(y,{...T,children:e,className:t,id:i,style:{...z,...g},"data-panel":"","data-panel-collapsible":r||void 0,"data-panel-group-id":N,"data-panel-id":j,"data-panel-size":parseFloat(""+z.flexGrow).toFixed(1)})}const CZ=OZ((e,t)=>Sm(NZ,{...e,forwardedRef:t}));NZ.displayName="Panel";CZ.displayName="forwardRef(Panel)";let FN=null,Wc=null;function Ant(e,t){if(t){const n=(t&FZ)!==0,r=(t&UZ)!==0,a=(t&HZ)!==0,s=(t&jZ)!==0;if(n)return a?"se-resize":s?"ne-resize":"e-resize";if(r)return a?"sw-resize":s?"nw-resize":"w-resize";if(a)return"s-resize";if(s)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function wnt(){Wc!==null&&(document.head.removeChild(Wc),FN=null,Wc=null)}function hD(e,t){const n=Ant(e,t);FN!==n&&(FN=n,Wc===null&&(Wc=document.createElement("style"),document.head.appendChild(Wc)),Wc.innerHTML=`*{cursor: ${n}!important;}`)}function RZ(e){return e.type==="keydown"}function IZ(e){return e.type.startsWith("pointer")}function PZ(e){return e.type.startsWith("mouse")}function Mv(e){if(IZ(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(PZ(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function Ont(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Dnt(e,t,n){return e.xt.x&&e.yt.y}function knt(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:VB(e),b:VB(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),r=e;Bt(r,"Stacking order can only be calculated for elements with a common ancestor");const a={a:zB(GB(n.a)),b:zB(GB(n.b))};if(a.a===a.b){const s=r.childNodes,i={a:n.a.at(-1),b:n.b.at(-1)};let o=s.length;for(;o--;){const u=s[o];if(u===i.a)return 1;if(u===i.b)return-1}}return Math.sign(a.a-a.b)}const Nnt=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Cnt(e){var t;const n=getComputedStyle((t=YZ(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function Rnt(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Cnt(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Nnt.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function GB(e){let t=e.length;for(;t--;){const n=e[t];if(Bt(n,"Missing node"),Rnt(n))return n}return null}function zB(e){return e&&Number(getComputedStyle(e).zIndex)||0}function VB(e){const t=[];for(;e;)t.push(e),e=YZ(e);return t}function YZ(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const FZ=1,UZ=2,HZ=4,jZ=8,Int=Ont()==="coarse";let Fi=[],Qf=!1,cu=new Map,Lv=new Map;const ag=new Set;function Pnt(e,t,n,r,a){var s;const{ownerDocument:i}=t,o={direction:n,element:t,hitAreaMargins:r,setResizeHandlerState:a},u=(s=cu.get(i))!==null&&s!==void 0?s:0;return cu.set(i,u+1),ag.add(o),Dy(),function(){var d;Lv.delete(e),ag.delete(o);const _=(d=cu.get(i))!==null&&d!==void 0?d:1;if(cu.set(i,_-1),Dy(),_===1&&cu.delete(i),Fi.includes(o)){const p=Fi.indexOf(o);p>=0&&Fi.splice(p,1),M2(),a("up",!0,null)}}}function qB(e){const{target:t}=e,{x:n,y:r}=Mv(e);Qf=!0,S2({target:t,x:n,y:r}),Dy(),Fi.length>0&&(ky("down",e),e.preventDefault(),e.stopPropagation())}function Tp(e){const{x:t,y:n}=Mv(e);if(Qf&&e.buttons===0&&(Qf=!1,ky("up",e)),!Qf){const{target:r}=e;S2({target:r,x:t,y:n})}ky("move",e),M2(),Fi.length>0&&e.preventDefault()}function cf(e){const{target:t}=e,{x:n,y:r}=Mv(e);Lv.clear(),Qf=!1,Fi.length>0&&e.preventDefault(),ky("up",e),S2({target:t,x:n,y:r}),M2(),Dy()}function S2({target:e,x:t,y:n}){Fi.splice(0);let r=null;e instanceof HTMLElement&&(r=e),ag.forEach(a=>{const{element:s,hitAreaMargins:i}=a,o=s.getBoundingClientRect(),{bottom:u,left:c,right:d,top:_}=o,p=Int?i.coarse:i.fine;if(t>=c-p&&t<=d+p&&n>=_-p&&n<=u+p){if(r!==null&&document.contains(r)&&s!==r&&!s.contains(r)&&!r.contains(s)&&knt(r,s)>0){let y=r,T=!1;for(;y&&!y.contains(s);){if(Dnt(y.getBoundingClientRect(),o)){T=!0;break}y=y.parentElement}if(T)return}Fi.push(a)}})}function gD(e,t){Lv.set(e,t)}function M2(){let e=!1,t=!1;Fi.forEach(r=>{const{direction:a}=r;a==="horizontal"?e=!0:t=!0});let n=0;Lv.forEach(r=>{n|=r}),e&&t?hD("intersection",n):e?hD("horizontal",n):t?hD("vertical",n):wnt()}function Dy(){cu.forEach((e,t)=>{const{body:n}=t;n.removeEventListener("contextmenu",cf),n.removeEventListener("pointerdown",qB),n.removeEventListener("pointerleave",Tp),n.removeEventListener("pointermove",Tp)}),window.removeEventListener("pointerup",cf),window.removeEventListener("pointercancel",cf),ag.size>0&&(Qf?(Fi.length>0&&cu.forEach((e,t)=>{const{body:n}=t;e>0&&(n.addEventListener("contextmenu",cf),n.addEventListener("pointerleave",Tp),n.addEventListener("pointermove",Tp))}),window.addEventListener("pointerup",cf),window.addEventListener("pointercancel",cf)):cu.forEach((e,t)=>{const{body:n}=t;e>0&&(n.addEventListener("pointerdown",qB,{capture:!0}),n.addEventListener("pointermove",Tp))}))}function ky(e,t){ag.forEach(n=>{const{setResizeHandlerState:r}=n,a=Fi.includes(n);r(e,a,t)})}function Ynt(){const[e,t]=Zf(0);return Ca(()=>t(n=>n+1),[])}function Bt(e,t){if(!e)throw console.error(t),Error(t)}const L2=10;function Ed(e,t,n=L2){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function ml(e,t,n=L2){return Ed(e,t,n)===0}function ps(e,t,n){return Ed(e,t,n)===0}function Fnt(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r0&&(e=e<0?0-L:L)}}}{const _=e<0?o:u,p=n[_];Bt(p,`No panel constraints found for index ${_}`);const{collapsedSize:g=0,collapsible:y,minSize:T=0}=p;if(y){const M=t[_];if(Bt(M!=null,`Previous layout not found for panel index ${_}`),ps(M,T)){const L=M-g;Ed(L,Math.abs(e))>0&&(e=e<0?0-L:L)}}}}{const _=e<0?1:-1;let p=e<0?u:o,g=0;for(;;){const T=t[p];Bt(T!=null,`Previous layout not found for panel index ${p}`);const L=Pf({panelConstraints:n,panelIndex:p,size:100})-T;if(g+=L,p+=_,p<0||p>=n.length)break}const y=Math.min(Math.abs(e),Math.abs(g));e=e<0?0-y:y}{let p=e<0?o:u;for(;p>=0&&p=0))break;e<0?p--:p++}}if(Fnt(a,i))return a;{const _=e<0?u:o,p=t[_];Bt(p!=null,`Previous layout not found for panel index ${_}`);const g=p+c,y=Pf({panelConstraints:n,panelIndex:_,size:g});if(i[_]=y,!ps(y,g)){let T=g-y,L=e<0?u:o;for(;L>=0&&L0?L--:L++}}}const d=i.reduce((_,p)=>p+_,0);return ps(d,100)?i:a}function Unt({layout:e,panelsArray:t,pivotIndices:n}){let r=0,a=100,s=0,i=0;const o=n[0];Bt(o!=null,"No pivot index found"),t.forEach((_,p)=>{const{constraints:g}=_,{maxSize:y=100,minSize:T=0}=g;p===o?(r=T,a=y):(s+=T,i+=y)});const u=Math.min(a,100-s),c=Math.max(r,100-i),d=e[o];return{valueMax:u,valueMin:c,valueNow:d}}function sg(e,t=document){return Array.from(t.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${e}"]`))}function BZ(e,t,n=document){const a=sg(e,n).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===t);return a??null}function $Z(e,t,n){const r=BZ(e,t,n);return r!=null?[r,r+1]:[-1,-1]}function WZ(e,t=document){var n;if(t instanceof HTMLElement&&(t==null||(n=t.dataset)===null||n===void 0?void 0:n.panelGroupId)==e)return t;const r=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return r||null}function xv(e,t=document){const n=t.querySelector(`[data-panel-resize-handle-id="${e}"]`);return n||null}function Hnt(e,t,n,r=document){var a,s,i,o;const u=xv(t,r),c=sg(e,r),d=u?c.indexOf(u):-1,_=(a=(s=n[d])===null||s===void 0?void 0:s.id)!==null&&a!==void 0?a:null,p=(i=(o=n[d+1])===null||o===void 0?void 0:o.id)!==null&&i!==void 0?i:null;return[_,p]}function jnt({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:r,panelDataArray:a,panelGroupElement:s,setLayout:i}){Fa({didWarnAboutMissingResizeHandle:!1}),nd(()=>{if(!s)return;const o=sg(n,s);for(let u=0;u{o.forEach((u,c)=>{u.removeAttribute("aria-controls"),u.removeAttribute("aria-valuemax"),u.removeAttribute("aria-valuemin"),u.removeAttribute("aria-valuenow")})}},[n,r,a,s]),td(()=>{if(!s)return;const o=t.current;Bt(o,"Eager values not found");const{panelDataArray:u}=o,c=WZ(n,s);Bt(c!=null,`No group found for id "${n}"`);const d=sg(n,s);Bt(d,`No resize handles found for group id "${n}"`);const _=d.map(p=>{const g=p.getAttribute("data-panel-resize-handle-id");Bt(g,"Resize handle element has no handle id attribute");const[y,T]=Hnt(n,g,u,s);if(y==null||T==null)return()=>{};const M=L=>{if(!L.defaultPrevented)switch(L.key){case"Enter":{L.preventDefault();const v=u.findIndex(b=>b.id===y);if(v>=0){const b=u[v];Bt(b,`No panel data found for index ${v}`);const w=r[v],{collapsedSize:N=0,collapsible:k,minSize:I=0}=b.constraints;if(w!=null&&k){const Y=Yp({delta:ps(w,N)?I-N:N-w,initialLayout:r,panelConstraints:u.map(H=>H.constraints),pivotIndices:$Z(n,g,s),prevLayout:r,trigger:"keyboard"});r!==Y&&i(Y)}}break}}};return p.addEventListener("keydown",M),()=>{p.removeEventListener("keydown",M)}});return()=>{_.forEach(p=>p())}},[s,e,t,n,r,a,i])}function KB(e,t){if(e.length!==t.length)return!1;for(let n=0;ns.constraints);let r=0,a=100;for(let s=0;s{const s=e[a];Bt(s,`Panel data not found for index ${a}`);const{callbacks:i,constraints:o,id:u}=s,{collapsedSize:c=0,collapsible:d}=o,_=n[u];if(_==null||r!==_){n[u]=r;const{onCollapse:p,onExpand:g,onResize:y}=i;y&&y(r,_),d&&(p||g)&&(g&&(_==null||ml(_,c))&&!ml(r,c)&&g(),p&&(_==null||!ml(_,c))&&ml(r,c)&&p())}})}function N0(e,t){if(e.length!==t.length)return!1;for(let n=0;n{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...a)},t)}}function JB(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function zZ(e){return`react-resizable-panels:${e}`}function VZ(e){return e.map(t=>{const{constraints:n,id:r,idIsFromProps:a,order:s}=t;return a?r:s?`${s}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function qZ(e,t){try{const n=zZ(e),r=t.getItem(n);if(r){const a=JSON.parse(r);if(typeof a=="object"&&a!=null)return a}}catch{}return null}function Vnt(e,t,n){var r,a;const s=(r=qZ(e,n))!==null&&r!==void 0?r:{},i=VZ(t);return(a=s[i])!==null&&a!==void 0?a:null}function qnt(e,t,n,r,a){var s;const i=zZ(e),o=VZ(t),u=(s=qZ(e,a))!==null&&s!==void 0?s:{};u[o]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{a.setItem(i,JSON.stringify(u))}catch(c){console.error(c)}}function XB({layout:e,panelConstraints:t}){const n=[...e],r=n.reduce((s,i)=>s+i,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(s=>`${s}%`).join(", ")}`);if(!ps(r,100)&&n.length>0)for(let s=0;s(JB(Fp),Fp.getItem(e)),setItem:(e,t)=>{JB(Fp),Fp.setItem(e,t)}},ZB={};function KZ({autoSaveId:e=null,children:t,className:n="",direction:r,forwardedRef:a,id:s=null,onLayout:i=null,keyboardResizeBy:o=null,storage:u=Fp,style:c,tagName:d="div",..._}){const p=b2(s),g=Fa(null),[y,T]=Zf(null),[M,L]=Zf([]),v=Ynt(),b=Fa({}),w=Fa(new Map),N=Fa(0),k=Fa({autoSaveId:e,direction:r,dragState:y,id:p,keyboardResizeBy:o,onLayout:i,storage:u}),I=Fa({layout:M,panelDataArray:[],panelDataArrayChanged:!1});Fa({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),kZ(a,()=>({getId:()=>k.current.id,getLayout:()=>{const{layout:B}=I.current;return B},setLayout:B=>{const{onLayout:ue}=k.current,{layout:oe,panelDataArray:Se}=I.current,Te=XB({layout:B,panelConstraints:Se.map(be=>be.constraints)});KB(oe,Te)||(L(Te),I.current.layout=Te,ue&&ue(Te),df(Se,Te,b.current))}}),[]),nd(()=>{k.current.autoSaveId=e,k.current.direction=r,k.current.dragState=y,k.current.id=p,k.current.onLayout=i,k.current.storage=u}),jnt({committedValuesRef:k,eagerValuesRef:I,groupId:p,layout:M,panelDataArray:I.current.panelDataArray,setLayout:L,panelGroupElement:g.current}),td(()=>{const{panelDataArray:B}=I.current;if(e){if(M.length===0||M.length!==B.length)return;let ue=ZB[e];ue==null&&(ue=znt(qnt,Knt),ZB[e]=ue);const oe=[...B],Se=new Map(w.current);ue(e,oe,Se,M,u)}},[e,M,u]),td(()=>{});const Y=Ca(B=>{const{onLayout:ue}=k.current,{layout:oe,panelDataArray:Se}=I.current;if(B.constraints.collapsible){const Te=Se.map(Pe=>Pe.constraints),{collapsedSize:be=0,panelSize:We,pivotIndices:ye}=Cc(Se,B,oe);if(Bt(We!=null,`Panel size not found for panel "${B.id}"`),!ml(We,be)){w.current.set(B.id,We);const Ve=gf(Se,B)===Se.length-1?We-be:be-We,Ge=Yp({delta:Ve,initialLayout:oe,panelConstraints:Te,pivotIndices:ye,prevLayout:oe,trigger:"imperative-api"});N0(oe,Ge)||(L(Ge),I.current.layout=Ge,ue&&ue(Ge),df(Se,Ge,b.current))}}},[]),H=Ca((B,ue)=>{const{onLayout:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current;if(B.constraints.collapsible){const be=Te.map(Ze=>Ze.constraints),{collapsedSize:We=0,panelSize:ye=0,minSize:Pe=0,pivotIndices:Ve}=Cc(Te,B,Se),Ge=ue??Pe;if(ml(ye,We)){const Ze=w.current.get(B.id),Lt=Ze!=null&&Ze>=Ge?Ze:Ge,yt=gf(Te,B)===Te.length-1?ye-Lt:Lt-ye,ne=Yp({delta:yt,initialLayout:Se,panelConstraints:be,pivotIndices:Ve,prevLayout:Se,trigger:"imperative-api"});N0(Se,ne)||(L(ne),I.current.layout=ne,oe&&oe(ne),df(Te,ne,b.current))}}},[]),U=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{panelSize:Se}=Cc(oe,B,ue);return Bt(Se!=null,`Panel size not found for panel "${B.id}"`),Se},[]),j=Ca((B,ue)=>{const{panelDataArray:oe}=I.current,Se=gf(oe,B);return Gnt({defaultSize:ue,dragState:y,layout:M,panelData:oe,panelIndex:Se})},[y,M]),W=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{collapsedSize:Se=0,collapsible:Te,panelSize:be}=Cc(oe,B,ue);return Bt(be!=null,`Panel size not found for panel "${B.id}"`),Te===!0&&ml(be,Se)},[]),z=Ca(B=>{const{layout:ue,panelDataArray:oe}=I.current,{collapsedSize:Se=0,collapsible:Te,panelSize:be}=Cc(oe,B,ue);return Bt(be!=null,`Panel size not found for panel "${B.id}"`),!Te||Ed(be,Se)>0},[]),Q=Ca(B=>{const{panelDataArray:ue}=I.current;ue.push(B),ue.sort((oe,Se)=>{const Te=oe.order,be=Se.order;return Te==null&&be==null?0:Te==null?-1:be==null?1:Te-be}),I.current.panelDataArrayChanged=!0,v()},[v]);nd(()=>{if(I.current.panelDataArrayChanged){I.current.panelDataArrayChanged=!1;const{autoSaveId:B,onLayout:ue,storage:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current;let be=null;if(B){const ye=Vnt(B,Te,oe);ye&&(w.current=new Map(Object.entries(ye.expandToSizes)),be=ye.layout)}be==null&&(be=Wnt({panelDataArray:Te}));const We=XB({layout:be,panelConstraints:Te.map(ye=>ye.constraints)});KB(Se,We)||(L(We),I.current.layout=We,ue&&ue(We),df(Te,We,b.current))}}),nd(()=>{const B=I.current;return()=>{B.layout=[]}},[]);const te=Ca(B=>function(oe){oe.preventDefault();const Se=g.current;if(!Se)return()=>null;const{direction:Te,dragState:be,id:We,keyboardResizeBy:ye,onLayout:Pe}=k.current,{layout:Ve,panelDataArray:Ge}=I.current,{initialLayout:Ze}=be??{},Lt=$Z(We,B,Se);let ct=$nt(oe,B,Te,be,ye,Se);const yt=Te==="horizontal";document.dir==="rtl"&&yt&&(ct=-ct);const ne=Ge.map(Le=>Le.constraints),ie=Yp({delta:ct,initialLayout:Ze??Ve,panelConstraints:ne,pivotIndices:Lt,prevLayout:Ve,trigger:RZ(oe)?"keyboard":"mouse-or-touch"}),ge=!N0(Ve,ie);(IZ(oe)||PZ(oe))&&N.current!=ct&&(N.current=ct,!ge&&ct!==0?yt?gD(B,ct<0?FZ:UZ):gD(B,ct<0?HZ:jZ):gD(B,0)),ge&&(L(ie),I.current.layout=ie,Pe&&Pe(ie),df(Ge,ie,b.current))},[]),fe=Ca((B,ue)=>{const{onLayout:oe}=k.current,{layout:Se,panelDataArray:Te}=I.current,be=Te.map(Ze=>Ze.constraints),{panelSize:We,pivotIndices:ye}=Cc(Te,B,Se);Bt(We!=null,`Panel size not found for panel "${B.id}"`);const Ve=gf(Te,B)===Te.length-1?We-ue:ue-We,Ge=Yp({delta:Ve,initialLayout:Se,panelConstraints:be,pivotIndices:ye,prevLayout:Se,trigger:"imperative-api"});N0(Se,Ge)||(L(Ge),I.current.layout=Ge,oe&&oe(Ge),df(Te,Ge,b.current))},[]),he=Ca((B,ue)=>{const{layout:oe,panelDataArray:Se}=I.current,{collapsedSize:Te=0,collapsible:be}=ue,{collapsedSize:We=0,collapsible:ye,maxSize:Pe=100,minSize:Ve=0}=B.constraints,{panelSize:Ge}=Cc(Se,B,oe);Ge!=null&&(be&&ye&&ml(Ge,Te)?ml(Te,We)||fe(B,We):GePe&&fe(B,Pe))},[fe]),K=Ca((B,ue)=>{const{direction:oe}=k.current,{layout:Se}=I.current;if(!g.current)return;const Te=xv(B,g.current);Bt(Te,`Drag handle element not found for id "${B}"`);const be=GZ(oe,ue);T({dragHandleId:B,dragHandleRect:Te.getBoundingClientRect(),initialCursorPosition:be,initialLayout:Se})},[]),q=Ca(()=>{T(null)},[]),$=Ca(B=>{const{panelDataArray:ue}=I.current,oe=gf(ue,B);oe>=0&&(ue.splice(oe,1),delete b.current[B.id],I.current.panelDataArrayChanged=!0,v())},[v]),X=Snt(()=>({collapsePanel:Y,direction:r,dragState:y,expandPanel:H,getPanelSize:U,getPanelStyle:j,groupId:p,isPanelCollapsed:W,isPanelExpanded:z,reevaluatePanelConstraints:he,registerPanel:Q,registerResizeHandle:te,resizePanel:fe,startDragging:K,stopDragging:q,unregisterPanel:$,panelGroupElement:g.current}),[Y,y,r,H,U,j,p,W,z,he,Q,te,fe,K,q,$]),ce={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Sm(Sv.Provider,{value:X},Sm(d,{..._,children:t,className:n,id:s,ref:g,style:{...ce,...c},"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":p}))}const JZ=OZ((e,t)=>Sm(KZ,{...e,forwardedRef:t}));KZ.displayName="PanelGroup";JZ.displayName="forwardRef(PanelGroup)";function gf(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function Cc(e,t,n){const r=gf(e,t),s=r===e.length-1?[r-1,r]:[r,r+1],i=n[r];return{...t.constraints,panelSize:i,pivotIndices:s}}function Jnt({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:r}){td(()=>{if(e||n==null||r==null)return;const a=xv(t,r);if(a==null)return;const s=i=>{if(!i.defaultPrevented)switch(i.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{i.preventDefault(),n(i);break}case"F6":{i.preventDefault();const o=a.getAttribute("data-panel-group-id");Bt(o,`No group element found for id "${o}"`);const u=sg(o,r),c=BZ(o,t,r);Bt(c!==null,`No resize element found for id "${t}"`);const d=i.shiftKey?c>0?c-1:u.length-1:c+1{a.removeEventListener("keydown",s)}},[r,e,t,n])}function XZ({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:r,id:a,onBlur:s,onDragging:i,onFocus:o,style:u={},tabIndex:c=0,tagName:d="div",..._}){var p,g;const y=Fa(null),T=Fa({onDragging:i});td(()=>{T.current.onDragging=i});const M=DZ(Sv);if(M===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:L,groupId:v,registerResizeHandle:b,startDragging:w,stopDragging:N,panelGroupElement:k}=M,I=b2(a),[Y,H]=Zf("inactive"),[U,j]=Zf(!1),[W,z]=Zf(null),Q=Fa({state:Y});nd(()=>{Q.current.state=Y}),td(()=>{if(n)z(null);else{const K=b(I);z(()=>K)}},[n,I,b]);const te=(p=r==null?void 0:r.coarse)!==null&&p!==void 0?p:15,fe=(g=r==null?void 0:r.fine)!==null&&g!==void 0?g:5;return td(()=>{if(n||W==null)return;const K=y.current;return Bt(K,"Element ref not attached"),Pnt(I,K,L,{coarse:te,fine:fe},($,X,ce)=>{if(X)switch($){case"down":{H("drag"),Bt(ce,'Expected event to be defined for "down" action'),w(I,ce);const{onDragging:B}=T.current;B&&B(!0);break}case"move":{const{state:B}=Q.current;B!=="drag"&&H("hover"),Bt(ce,'Expected event to be defined for "move" action'),W(ce);break}case"up":{H("hover"),N();const{onDragging:B}=T.current;B&&B(!1);break}}else H("inactive")})},[te,L,n,fe,b,I,W,w,N]),Jnt({disabled:n,handleId:I,resizeHandler:W,panelGroupElement:k}),Sm(d,{..._,children:e,className:t,id:a,onBlur:()=>{j(!1),s==null||s()},onFocus:()=>{j(!0),o==null||o()},ref:y,role:"separator",style:{...{touchAction:"none",userSelect:"none"},...u},tabIndex:c,"data-panel-group-direction":L,"data-panel-group-id":v,"data-resize-handle":"","data-resize-handle-active":Y==="drag"?"pointer":U?"keyboard":void 0,"data-resize-handle-state":Y,"data-panel-resize-handle-enabled":!n,"data-panel-resize-handle-id":I})}XZ.displayName="PanelResizeHandle";const Xnt=({className:e,...t})=>f.jsx(JZ,{className:Ie("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),QB=CZ,Znt=({withHandle:e,className:t,...n})=>f.jsx(XZ,{className:Ie("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&f.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:f.jsx(Moe,{className:"h-2.5 w-2.5"})})}),Qnt="https://colir.net/assets/ping-CCl3cumC.mp3",Vi=vr({pingVolume:50,isPingSoundDisabled:!1,setPingVolume:()=>{},setIsPingSoundDisabled:()=>{},joinLeaveVolume:50,isJoinLeaveSoundDisabled:!1,setJoinLeaveVolume:()=>{},setIsJoinLeaveSoundDisabled:()=>{}}),ert=({children:e})=>{let{getFromLocalStorage:t,setToLocalStorage:n}=Ul();const[r,a]=S.useState(t("pingVolume")??50),[s,i]=S.useState(t("isPingSoundDisabled")??!1),[o,u]=S.useState(t("joinLeaveVolume")??50),[c,d]=S.useState(t("isJoinLeaveSoundDisabled")??!1);function _(){n("pingVolume",r),n("isPingSoundDisabled",s),n("joinLeaveVolume",o),n("isJoinLeaveSoundDisabled",c)}return S.useEffect(()=>{_()},[r,s,o,c]),f.jsx(Vi.Provider,{value:{pingVolume:r,isPingSoundDisabled:s,setPingVolume:a,setIsPingSoundDisabled:i,joinLeaveVolume:o,isJoinLeaveSoundDisabled:c,setJoinLeaveVolume:u,setIsJoinLeaveSoundDisabled:d},children:e})},trt=(e,t,n,r,a,s,i,o,u)=>{const c=Nd(),d=Xa(),_=HI(),p=S.useRef(t),g=S.useRef(o),y=ve(Vi,N=>N.pingVolume),T=ve(Vi,N=>N.isPingSoundDisabled),M=S.useRef(T),L=S.useRef(y);S.useEffect(()=>{M.current=T,L.current=y},[y,T]),S.useEffect(()=>{p.current=t,g.current=o},[t,o]);const v=()=>{if(M.current)return;let N=new Audio(Qnt);N.volume=L.current/100,N.play()},b=()=>{if(!p.current||!e)return;let N=[];p.current.forEach(k=>{k.joinedUsers.forEach(I=>{N.push(I.hexId)})}),i(k=>[...k.filter(I=>N.find(Y=>Y==I.hexId))])},w=(N,k)=>{!t||!e||k.state==Wt.Disconnected&&(k.start().then(()=>{k.invoke("GetMessages",{count:1,skipCount:0}).then(I=>{k.invoke("GetUnreadRepliesAsync").then(Y=>{if(Y.content.length>0){s(j=>[...j,...Y.content]);let H=I.content[0],U=Y.content[0];k.invoke("GetMessagesRange",{startId:U.id,endId:H.id}).then(j=>{a(W=>j!=null&&j.content?My([...W,...j.content]):W)})}else k.invoke("GetMessages",{count:25,skipCount:0}).then(H=>{a(U=>H!=null&&H.content?My([...U,...H.content]):U)})})}),k.on("ReceiveMessage",I=>{var Y;I.repliedMessage&&I.repliedMessage.authorHexId==e.hexId&&((Y=g==null?void 0:g.current)==null?void 0:Y.guid)!=I.roomGuid&&(s(H=>[...H,I]),v()),a(H=>[...H,I])}),k.on("MessageDeleted",I=>{s(Y=>Y.filter(H=>H.id!=I)),a(Y=>[...Y.filter(H=>H.id!=I)])}),k.on("MessageEdited",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,content:I.content,editDate:I.editDate}:H))),k.on("MessageGotReaction",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,reactions:I.reactions}:H))),k.on("MessageLostReaction",I=>a(Y=>Y.map(H=>H.id===I.id?{...H,reactions:I.reactions}:H))),k.on("UserJoined",I=>{var Y;e.hexId!=I.hexId&&(((Y=g==null?void 0:g.current)==null?void 0:Y.guid)==N&&c("User joined",`${I.username} has joined the room.`),i(H=>[...H,I]),n(H=>{let U=H.find(j=>j.guid==N);return U==null||U.joinedUsers.push(I),[...H]}))}),k.on("UserLeft",I=>{if(n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]}),e.hexId==I){r(Y=>[...Y.filter(H=>H.roomGuid!=N)]),k.stop();return}}),k.on("UserKicked",I=>{if(n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]}),e.hexId==I){r(H=>[...H.filter(U=>U.roomGuid!=N)]);let Y=[...p.current.filter(H=>H.guid!=N)];n(Y),a(H=>H.filter(U=>U.roomGuid!=N)),Y.length>0&&g.current.guid==N&&u(Y[0]),k.stop();return}}),k.on("RoomRenamed",I=>{n(Y=>{let H=Y.find(U=>U.guid==g.current.guid);return H&&(H.name=I),[...Y]})}),k.on("RoomDeleted",()=>{n(I=>[...I.filter(Y=>Y.guid!=g.current.guid)]),a(I=>[...I.filter(Y=>Y.roomGuid!=g.current.guid)])}),k.on("RoomSizeChanged",I=>{let Y=p.current.find(H=>H.guid==N);(Y==null?void 0:Y.usedMemoryInBytes)!=I&&n(H=>{let U=H.find(j=>j.guid==N);if(U){let j=U.freeMemoryInBytes+U.usedMemoryInBytes;U.freeMemoryInBytes=j-I,U.usedMemoryInBytes=I}return[...H]})}),k.on("RoomCleared",()=>{a(I=>I.map(Y=>Y.roomGuid===N?{...Y,attachments:[]}:Y)),n(I=>{let Y=I.find(H=>H.guid==N);if(Y){let H=Y.freeMemoryInBytes+Y.usedMemoryInBytes;Y.freeMemoryInBytes=H,Y.usedMemoryInBytes=0}return[...I]})}),k.on("UserRenamed",({hexId:I,newName:Y})=>{i(H=>{var U;return((U=H.find(j=>j.hexId==I))==null?void 0:U.username)==Y?H:H.map(j=>j.hexId==I?{...j,username:Y}:j)}),n(H=>H.map(U=>({...U,joinedUsers:U.joinedUsers.map(j=>j.hexId==I?{...j,username:Y}:j)})))}),k.on("UserDeleted",I=>{n(Y=>{let H=Y.find(U=>U.guid==N);return H&&(H.joinedUsers=H.joinedUsers.filter(U=>U.hexId!=I)),[...Y]})})}).catch(I=>{d("Couldn't connect to the room",`We weren't able to establish a connection. Error: ${I}.`)}),k.onclose(()=>{k.off("ReceiveMessage"),k.off("MessageDeleted"),k.off("MessageEdited"),k.off("MessageGotReaction"),k.off("MessageLostReaction"),k.off("UserJoined"),k.off("UserLeft"),k.off("UserKicked"),k.off("RoomRenamed"),k.off("RoomDeleted"),k.off("RoomSizeChanged"),k.off("RoomCleared"),k.off("UserRenamed"),k.off("UserDeleted")}))};return S.useEffect(()=>{t&&(b(),_().then(N=>{t.map(k=>{let I=new xT().withUrl(`${Fm}/Chat?roomGuid=${k.guid}`,{accessTokenFactory:()=>N}).withAutomaticReconnect(Array.from({length:20},()=>1e3)).build();r(Y=>Y.find(H=>H.roomGuid==k.guid)?Y:[...Y,{roomGuid:k.guid,connection:I}])})}))},[t.length,e]),S.useEffect(()=>{b()},[t]),{startChatConnection:w}};function nrt(e,t){return S.useReducer((n,r)=>t[n][r]??n,e)}var Av=e=>{const{present:t,children:n}=e,r=rrt(t),a=typeof n=="function"?n({present:r.isPresent}):S.Children.only(n),s=wt(r.ref,art(a));return typeof n=="function"||r.isPresent?S.cloneElement(a,{ref:s}):null};Av.displayName="Presence";function rrt(e){const[t,n]=S.useState(),r=S.useRef({}),a=S.useRef(e),s=S.useRef("none"),i=e?"mounted":"unmounted",[o,u]=nrt(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return S.useEffect(()=>{const c=C0(r.current);s.current=o==="mounted"?c:"none"},[o]),ur(()=>{const c=r.current,d=a.current;if(d!==e){const p=s.current,g=C0(c);e?u("MOUNT"):g==="none"||(c==null?void 0:c.display)==="none"?u("UNMOUNT"):u(d&&p!==g?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,u]),ur(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,_=g=>{const T=C0(r.current).includes(g.animationName);if(g.target===t&&T&&(u("ANIMATION_END"),!a.current)){const M=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=M)})}},p=g=>{g.target===t&&(s.current=C0(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",_),t.addEventListener("animationend",_),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",_),t.removeEventListener("animationend",_)}}else u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:S.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function C0(e){return(e==null?void 0:e.animationName)||"none"}function art(e){var r,a;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var x2="Collapsible",[srt,nmt]=Bg(x2),[irt,A2]=srt(x2),ZZ=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:a,disabled:s,onOpenChange:i,...o}=e,[u=!1,c]=As({prop:r,defaultProp:a,onChange:i});return f.jsx(irt,{scope:n,disabled:s,contentId:Ss(),open:u,onOpenToggle:S.useCallback(()=>c(d=>!d),[c]),children:f.jsx(ft.div,{"data-state":O2(u),"data-disabled":s?"":void 0,...o,ref:t})})});ZZ.displayName=x2;var QZ="CollapsibleTrigger",ort=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,a=A2(QZ,n);return f.jsx(ft.button,{type:"button","aria-controls":a.contentId,"aria-expanded":a.open||!1,"data-state":O2(a.open),"data-disabled":a.disabled?"":void 0,disabled:a.disabled,...r,ref:t,onClick:Fe(e.onClick,a.onOpenToggle)})});ort.displayName=QZ;var w2="CollapsibleContent",eQ=S.forwardRef((e,t)=>{const{forceMount:n,...r}=e,a=A2(w2,e.__scopeCollapsible);return f.jsx(Av,{present:n||a.open,children:({present:s})=>f.jsx(lrt,{...r,ref:t,present:s})})});eQ.displayName=w2;var lrt=S.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:a,...s}=e,i=A2(w2,n),[o,u]=S.useState(r),c=S.useRef(null),d=wt(t,c),_=S.useRef(0),p=_.current,g=S.useRef(0),y=g.current,T=i.open||o,M=S.useRef(T),L=S.useRef();return S.useEffect(()=>{const v=requestAnimationFrame(()=>M.current=!1);return()=>cancelAnimationFrame(v)},[]),ur(()=>{const v=c.current;if(v){L.current=L.current||{transitionDuration:v.style.transitionDuration,animationName:v.style.animationName},v.style.transitionDuration="0s",v.style.animationName="none";const b=v.getBoundingClientRect();_.current=b.height,g.current=b.width,M.current||(v.style.transitionDuration=L.current.transitionDuration,v.style.animationName=L.current.animationName),u(r)}},[i.open,r]),f.jsx(ft.div,{"data-state":O2(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!T,...s,ref:d,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:T&&a})});function O2(e){return e?"open":"closed"}var urt=ZZ;const crt=urt,drt=eQ;function frt({voiceChatUser:e,user:t,isTalking:n,couldDecrypt:r,className:a}){const{colorString:i}=DR(t?t.hexId:16777215);let[o,u]=S.useState(!1);return f.jsxs(Pg,{open:o,onOpenChange:u,children:[f.jsx(Yg,{tabIndex:0,asChild:!0,onKeyDown:c=>c.keyCode==32&&u(!0),children:f.jsxs("div",{className:`flex p-2 cursor-pointer transition-colors duration-150 hover:bg-secondary items-center justify-between gap-2 select-none rounded-sm overflow-visible focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1`,children:[f.jsx("span",{style:{color:i,lineBreak:"anywhere"},className:Ie("cursor-pointer text-ellipsis text-sm",a),children:t?t.username:"Unknown User"}),f.jsxs("div",{className:"flex flex-row gap-1 text-slate-400",children:[e.isMuted?f.jsx(A9,{className:"w-5 h-5"}):f.jsx(w9,{className:Ie("w-5 h-5 transition-colors duration-75",n&&r&&"text-lime-600",n&&!r&&"text-destructive")}),e.isDeafened&&f.jsx(L9,{className:"w-5 h-5"})]})]})}),f.jsx(zm,{children:f.jsx(aJ,{user:t,colorString:i})})]})}function e5(e){const[t,n]=S.useState(!1),r=ve(Ad,o=>o.users);function a(){n(!t)}function s(){e.joinVoiceChat(e.voiceChatConnection)}function i(){e.isJoined?e.leaveVoiceChat(e.voiceChatConnection):s()}return f.jsxs("div",{className:"flex flex-col px-1",children:[f.jsxs("div",{className:"flex items-center",children:[f.jsxs("div",{className:"flex flex-grow items-center select-none gap-1.5 min-w-0",children:[f.jsx(cT,{className:"w-4 h-4 mr-0.5 flex-shrink-0 text-slate-400"}),f.jsx("span",{onClick:s,className:"text-sm cursor-pointer hover:underline font-medium overflow-hidden text-ellipsis whitespace-nowrap",children:e.roomName})]}),f.jsx(et,{onClick:i,className:"w-8 h-8 flex-shrink-0 ml-2",variant:"ghost",size:"icon",children:f.jsxs("span",{className:Ie("transition-colors duration-100",e.isJoined&&"text-destructive",!e.isJoined&&"text-slate-400"),children:[e.isJoined&&f.jsx(ele,{className:"w-[1.125rem] h-[1.125rem]"}),!e.isJoined&&f.jsx(Woe,{className:"w-[1.125rem] h-[1.125rem]"})]})}),f.jsx(et,{onClick:a,className:"w-8 h-8 flex-shrink-0 ml-1",variant:"ghost",size:"icon",children:f.jsx(S9,{className:Ie("w-5 h-5 text-slate-400 transition-transform duration-100",t&&"rotate-180")})})]}),f.jsx(crt,{open:!t,onOpenChange:n,children:f.jsx(drt,{asChild:!0,children:f.jsx("div",{className:"flex flex-col pt-1",children:e.voiceChatConnection.joinedUsers.map(o=>{var u,c,d;return f.jsx(frt,{user:r.find(_=>_.hexId==o.hexId),voiceChatUser:o,isTalking:(u=e.currentlyTalkingUsers)==null?void 0:u.some(_=>_.userHexId==o.hexId),couldDecrypt:(d=(c=e.currentlyTalkingUsers)==null?void 0:c.find(_=>_.userHexId==o.hexId))==null?void 0:d.couldDecrypt},o.hexId)})})})})]})}async function mrt(e){return new Promise((t,n)=>{const r=new FileReader;r.onload=()=>{typeof r.result=="string"?t(r.result):n(new Error("Reader result is not a string."))},r.onerror=()=>{n(new Error("An error occurred while reading the blob."))},r.readAsDataURL(e)})}async function _rt(e){const n=await(await fetch(e)).arrayBuffer();return new Blob([n],{type:"audio/wav"})}const tQ="https://colir.net/assets/join-7R3vpa-E.mp3",prt=()=>{const e=ve(Vi,r=>r.joinLeaveVolume),t=ve(Vi,r=>r.isJoinLeaveSoundDisabled),[n]=If(tQ,{volume:e/100,soundEnabled:!t});return n},Gc=vr({voiceInputDevice:"",setVoiceInputDevice:()=>{},voiceInputVolume:0,setVoiceInputVolume:()=>{},voiceOutputDevice:"",setVoiceOutputDevice:()=>{},voiceOutputVolume:0,setVoiceOutputVolume:()=>{}}),hrt=({children:e})=>{let{getFromLocalStorage:t,setToLocalStorage:n}=Ul();const[r,a]=S.useState(t("voiceInputDevice")||""),[s,i]=S.useState(t("voiceInputVolume")||50),[o,u]=S.useState(t("voiceOutputDevice")||""),[c,d]=S.useState(t("voiceOutputVolume")||50);function _(){n("voiceInputDevice",r),n("voiceInputVolume",s),n("voiceOutputDevice",o),n("voiceOutputVolume",c)}return S.useEffect(()=>{_()},[r,s,o,c]),f.jsx(Gc.Provider,{value:{voiceInputDevice:r,setVoiceInputDevice:a,voiceInputVolume:s,setVoiceInputVolume:i,voiceOutputDevice:o,setVoiceOutputDevice:u,voiceOutputVolume:c,setVoiceOutputVolume:d},children:e})},nQ="https://colir.net/assets/leave-B4eDWa-Z.mp3",grt=()=>{const e=ve(Vi,r=>r.joinLeaveVolume),t=ve(Vi,r=>r.isJoinLeaveSoundDisabled),[n]=If(nQ,{volume:e/100,soundEnabled:!t});return n};function t5(){var be,We;const e=Ft(),t=Xa();let n=ve(dr,ye=>ye.currentUser),r=S.useRef(n);S.useEffect(()=>{r.current=n},[n]);let a=ve(zi,ye=>ye.selectedRoom),s=ve(Tl,ye=>ye.voiceChatConnections),i=ve(Tl,ye=>ye.joinedVoiceConnection),o=S.useRef(i);S.useEffect(()=>{o.current=i},[i]);let u=ve(Tl,ye=>ye.setJoinedVoiceConnection),c=ve(ws,ye=>ye.joinedRooms),d=s.find(ye=>ye.roomGuid==a.guid&&ye.connection.state!=Wt.Disconnected),_=ve(Eu,ye=>ye.isMuted),p=S.useRef(_);S.useEffect(()=>{p.current=_},[_]);let g=ve(Eu,ye=>ye.setIsMuted),y=ve(Eu,ye=>ye.isDeafened),T=S.useRef(y);S.useEffect(()=>{T.current=y},[y]);let M=ve(ju,ye=>ye.getEncryptionKey),[L,v]=S.useState([]);const b=ve(tg,ye=>ye.userVolumes),w=S.useRef(b);S.useEffect(()=>{w.current=b},[b]);const N=ve(Gc,ye=>ye.voiceInputDevice),k=S.useRef(N);S.useEffect(()=>{k.current=N},[N]);const I=ve(Gc,ye=>ye.voiceOutputDevice),Y=S.useRef(I);S.useEffect(()=>{Y.current=I},[I]);const H=ve(Gc,ye=>ye.voiceInputVolume),U=S.useRef(H);S.useEffect(()=>{U.current=H},[H]);const j=ve(Gc,ye=>ye.voiceOutputVolume),W=S.useRef(j);S.useEffect(()=>{W.current=j},[j]);const z=prt(),Q=grt(),te=ve(ju,ye=>ye.changeTrigger),fe=S.useRef(M(((be=o.current)==null?void 0:be.roomGuid)??"")??"");S.useEffect(()=>{var ye;fe.current=M(((ye=o.current)==null?void 0:ye.roomGuid)??"")??""},[te,i]);let he=S.useRef(null),K=S.useRef(null),[q,$]=S.useState([]);S.useEffect(()=>{q.forEach(ye=>{var Pe;if(ye.userHexId==((Pe=r.current)==null?void 0:Pe.hexId)){ye.track.volume=0;return}ye.track.volume=b[ye.userHexId]!=null?b[ye.userHexId]/100:1*j/100,ye.track.setSinkId(Y.current)})},[b,I,j]);async function X(){await B();let ye;try{ye=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,deviceId:k.current}})}catch(Ge){t(e("AN_ERROR_OCCURRED"),e("FAILED_TO_GET_RECORD_PERMISSION")),g(!0),console.error("Error getting user media:",Ge);return}K.current=ye;const Pe=new MediaRecorder(ye,{audioBitsPerSecond:128e3});he.current=Pe;let Ve=[];Pe.addEventListener("dataavailable",Ge=>{Ve.push(Ge.data)}),Pe.addEventListener("stop",async()=>{var ct;if(Ve.length===0)return;let Ge=new Blob(Ve);if(!o.current)return;let Ze=fe.current,Lt=await mrt(Ge);await ce(Ge)||(ct=o.current)==null||ct.connection.invoke("SendVoiceSignal",Im(Lt,Ze)),!(p.current||!o.current)&&(Ve=[],he.current===Pe&&(Pe.start(),setTimeout(()=>{he.current===Pe&&Pe.stop()},300)))}),Pe.start(),setTimeout(()=>{he.current===Pe&&Pe.stop()},300)}async function ce(ye,Pe=-50){const Ve=await ye.arrayBuffer(),Ge=new AudioContext,Lt=(await Ge.decodeAudioData(Ve)).getChannelData(0);let ct=0;for(let ie=0;ieye.stop()),K.current=null),he.current=null}function ue(){B()}const oe=ye=>{ye.connection.off("ReceiveVoiceSignal"),ye.connection.on("ReceiveVoiceSignal",async({issuerId:Pe,data:Ve})=>{var ie,ge;if(T.current||!o.current||(ie=o.current.joinedUsers.find(Le=>Le.hexId==Pe))!=null&&ie.isMuted)return;let Ge=fe.current,Ze=bl(Ve,Ge);if(Ze==null){$(Le=>[...Le,{userHexId:Pe,track:new Audio,couldDecrypt:!1}]),setTimeout(()=>{$(Le=>Le.filter(ke=>ke.userHexId!=Pe))},300);return}let Lt=await _rt(Ze),ct=URL.createObjectURL(Lt);const yt=new Audio(ct);$(Le=>[...Le,{userHexId:Pe,track:yt,couldDecrypt:!0}]);let ne=W.current/100;yt.volume=w.current[Pe]!=null?w.current[Pe]/100*ne:ne,Y.current&&yt.setSinkId(Y.current),Pe==((ge=r.current)==null?void 0:ge.hexId)&&(yt.volume=0),await yt.play(),yt.onended=()=>{$(Le=>Le.filter(ke=>ke.track!=yt))},URL.revokeObjectURL(ct)})},Se=async ye=>{if(!ye||ye.roomGuid==(i==null?void 0:i.roomGuid))return;if(i&&await Te(i),ye.connection.state!=Wt.Connected){t(e("AN_ERROR_OCCURRED_DURING_JOINING"),e("CONNECTION_ISSUES_WITH_SERVER"));return}const Pe=await ye.connection.invoke("Join",_,y);if(Pe.error){t(e("AN_ERROR_OCCURRED_DURING_JOINING"),e("FAILED_TO_JOIN_VOICE_CHAT")),console.error("Error joining voice chat:",Pe.error.errorCodeAsString);return}setTimeout(()=>z(),25),oe(ye),u(ye),_||await X()};S.useEffect(()=>{v(q.map(ye=>({userHexId:ye.userHexId,couldDecrypt:ye.couldDecrypt})))},[q]);const Te=async ye=>{if(ye){if(await B(),ye.connection.off("ReceiveVoiceSignal"),ye.connection.state!=Wt.Connected){t(e("AN_ERROR_OCCURRED_DURING_LEAVING"),e("CONNECTION_ISSUES_WITH_SERVER")),Q(),u(void 0);return}try{const Pe=await ye.connection.invoke("Leave");if(Pe.error)throw new Error(Pe.error.errorCodeAsString)}catch(Pe){console.error("Error leaving voice chat:",Pe),t(e("AN_ERROR_OCCURRED_DURING_LEAVING"),e("FAILED_TO_LEAVE_VOICE_CHAT"))}finally{Q(),u(void 0)}}};return S.useEffect(()=>{_&&ue(),!_&&o.current&&X()},[_]),S.useEffect(()=>(o.current&&!_&&(oe(o.current),X()),()=>{ue()}),[]),S.useEffect(()=>{o.current&&!_&&X()},[N]),f.jsxs("div",{className:"flex flex-col h-full gap-2 pt-1.5",children:[i&&f.jsx(e5,{isJoined:!0,voiceChatConnection:i,joinVoiceChat:Se,leaveVoiceChat:Te,currentlyTalkingUsers:L,roomName:(We=c.find(ye=>ye.guid==i.roomGuid))==null?void 0:We.name}),d&&(i?i.roomGuid!=(d==null?void 0:d.roomGuid):!0)&&f.jsx(e5,{isJoined:i!=null&&i.roomGuid==d.roomGuid,voiceChatConnection:d,joinVoiceChat:Se,leaveVoiceChat:Te,roomName:a.name}),!i&&!d&&f.jsx("div",{className:"flex justify-center items-center w-full h-full",children:f.jsx(lT,{className:"relative w-4 h-4 z-10 animate-spin m-auto"})})]})}const Ert=(e,t,n,r,a,s)=>{const i=HI(),o=S.useRef(t),u=S.useRef(r),c=S.useRef(n),d=ve(Vi,L=>L.joinLeaveVolume),_=ve(Vi,L=>L.isJoinLeaveSoundDisabled),p=S.useRef(d),g=S.useRef(_);S.useEffect(()=>{p.current=d,g.current=_},[d,_]);const y=()=>{if(g.current)return;let L=new Audio(tQ);L.volume=p.current/100,L.play()},T=()=>{let L=new Audio(nQ);L.volume=.5,L.play()};S.useEffect(()=>{o.current=t,u.current=r,c.current=n},[t,r,n]);const M=(L,v)=>{!t||!e||o.current.find(b=>b.guid===L)!==void 0&&v.state==Wt.Disconnected&&v.start().then(()=>{v.invoke("GetVoiceChatUsers").then(b=>{if(b.resultType==Sl.Error)throw new Error(b.error.errorCodeAsString);let w=b.content;s(N=>{let k=N.find(I=>I.connection===v);return k?(k.joinedUsers=w,[...N]):N})}),v.on("UserJoined",b=>{b.hexId!==e.hexId&&u.current&&L===u.current.roomGuid&&y(),s(w=>{let N=w.find(k=>k.connection===v);return N?(N.joinedUsers.push(b),[...w]):w})}),v.on("UserLeft",b=>{b!==e.hexId&&u.current&&L===u.current.roomGuid&&T(),s(w=>{let N=w.find(k=>k.connection===v);return N?(N.joinedUsers=N.joinedUsers.filter(k=>k.hexId!==b),[...w]):w})}),v.on("UserMuted",b=>{s(w=>{let N=w.find(I=>I.connection===v);if(!N)return w;let k=N.joinedUsers.find(I=>I.hexId===b);return k&&(k.isMuted=!0),[...w]})}),v.on("UserUnmuted",b=>{s(w=>{let N=w.find(I=>I.connection===v);if(!N)return w;let k=N.joinedUsers.find(I=>I.hexId===b);return k&&(k.isMuted=!1),[...w]})}),v.on("UserDeafened",b=>{s(w=>{let N=w.find(I=>I.connection===v);if(!N)return w;let k=N.joinedUsers.find(I=>I.hexId===b);return k&&(k.isDeafened=!0),[...w]})}),v.on("UserUndeafened",b=>{s(w=>{let N=w.find(I=>I.connection===v);if(!N)return w;let k=N.joinedUsers.find(I=>I.hexId===b);return k&&(k.isDeafened=!1),[...w]})}),v.onclose(()=>{u.current.roomGuid===L&&a(null),s(b=>{let w=b.find(N=>N.connection===v);return w?(w.joinedUsers=[],[...b]):b})}),v.onreconnected(()=>{v.invoke("GetVoiceChatUsers").then(b=>{if(b.resultType==Sl.Error)throw new Error(b.error.errorCodeAsString);let w=b.content;s(N=>{let k=N.find(I=>I.connection===v);return k?(k.joinedUsers=w,[...N]):N})})})})};return S.useEffect(()=>{t&&i().then(L=>{t.forEach(v=>{let b=new xT().withUrl(`${Fm}/VoiceChat?roomGuid=${v.guid}`,{accessTokenFactory:()=>L}).withAutomaticReconnect(Array.from({length:20},()=>1e3)).build();s(w=>w.find(N=>N.roomGuid===v.guid)?w:[...w,{roomGuid:v.guid,connection:b,joinedUsers:[]}])})})},[t.length,e]),{startVoiceConnection:M}};var UN="data-focus-lock",rQ="data-focus-lock-disabled",yrt="data-no-focus-lock",Trt="data-autofocus-inside",vrt="data-no-autofocus",ED={width:"1px",height:"0px",padding:0,overflow:"hidden",position:"fixed",top:"1px",left:"1px"},aQ=$R({},function(e){var t=e.target,n=e.currentTarget;return{target:t,currentTarget:n}}),sQ=$R(),brt=$R(),Srt=z7({async:!0,ssr:typeof document<"u"}),Mrt=S.createContext(void 0),Lrt=[],D2=S.forwardRef(function(t,n){var r,a=S.useState(),s=a[0],i=a[1],o=S.useRef(),u=S.useRef(!1),c=S.useRef(null),d=S.useState({}),_=d[1],p=t.children,g=t.disabled,y=g===void 0?!1:g,T=t.noFocusGuards,M=T===void 0?!1:T,L=t.persistentFocus,v=L===void 0?!1:L,b=t.crossFrame,w=b===void 0?!0:b,N=t.autoFocus,k=N===void 0?!0:N;t.allowTextSelection;var I=t.group,Y=t.className,H=t.whiteList,U=t.hasPositiveIndices,j=t.shards,W=j===void 0?Lrt:j,z=t.as,Q=z===void 0?"div":z,te=t.lockProps,fe=te===void 0?{}:te,he=t.sideCar,K=t.returnFocus,q=K===void 0?!1:K,$=t.focusOptions,X=t.onActivation,ce=t.onDeactivation,B=S.useState({}),ue=B[0],oe=S.useCallback(function(ct){var yt=ct.captureFocusRestore;if(!c.current){var ne,ie=(ne=document)==null?void 0:ne.activeElement;c.current=ie,ie!==document.body&&(c.current=yt(ie))}o.current&&X&&X(o.current),u.current=!0,_()},[X]),Se=S.useCallback(function(){u.current=!1,ce&&ce(o.current),_()},[ce]),Te=S.useCallback(function(ct){var yt=c.current;if(yt){var ne=(typeof yt=="function"?yt():yt)||document.body,ie=typeof q=="function"?q(ne):q;if(ie){var ge=typeof ie=="object"?ie:void 0;c.current=null,ct?Promise.resolve().then(function(){return ne.focus(ge)}):ne.focus(ge)}}},[q]),be=S.useCallback(function(ct){u.current&&aQ.useMedium(ct)},[]),We=sQ.useMedium,ye=S.useCallback(function(ct){o.current!==ct&&(o.current=ct,i(ct))},[]),Pe=bm((r={},r[rQ]=y&&"disabled",r[UN]=I,r),fe),Ve=M!==!0,Ge=Ve&&M!=="tail",Ze=$7([n,ye]),Lt=S.useMemo(function(){return{observed:o,shards:W,enabled:!y,active:u.current}},[y,u.current,W,s]);return S.createElement(S.Fragment,null,Ve&&[S.createElement("div",{key:"guard-first","data-focus-guard":!0,tabIndex:y?-1:0,style:ED}),U?S.createElement("div",{key:"guard-nearest","data-focus-guard":!0,tabIndex:y?-1:1,style:ED}):null],!y&&S.createElement(he,{id:ue,sideCar:Srt,observed:s,disabled:y,persistentFocus:v,crossFrame:w,autoFocus:k,whiteList:H,shards:W,onActivation:oe,onDeactivation:Se,returnFocus:Te,focusOptions:$,noFocusGuards:M}),S.createElement(Q,bm({ref:Ze},Pe,{className:Y,onBlur:We,onFocus:be}),S.createElement(Mrt.Provider,{value:Lt},p)),Ge&&S.createElement("div",{"data-focus-guard":!0,tabIndex:y?-1:0,style:ED}))});D2.propTypes={};function xrt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,IN(e,t)}function Art(e,t){function n(r){return r.displayName||r.name||"Component"}return function(a){var s=[],i;function o(){i=e(s.map(function(c){return c.props})),t(i)}var u=function(c){xrt(d,c);function d(){return c.apply(this,arguments)||this}d.peek=function(){return i};var _=d.prototype;return _.componentDidMount=function(){s.push(this),o()},_.componentDidUpdate=function(){o()},_.componentWillUnmount=function(){var g=s.indexOf(this);s.splice(g,1),o()},_.render=function(){return Et.createElement(a,this.props)},d}(S.PureComponent);return KI(u,"displayName","SideEffect("+n(a)+")"),u}}var Yo=function(e){for(var t=Array(e.length),n=0;n=0}).sort(Prt)},Frt=["button:enabled","select:enabled","textarea:enabled","input:enabled","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[tabindex]","[contenteditable]","[autofocus]"],C2=Frt.join(","),Urt="".concat(C2,", [data-focus-guard]"),_Q=function(e,t){return Yo((e.shadowRoot||e).children).reduce(function(n,r){return n.concat(r.matches(t?Urt:C2)?[r]:[],_Q(r))},[])},Hrt=function(e,t){var n;return e instanceof HTMLIFrameElement&&(!((n=e.contentDocument)===null||n===void 0)&&n.body)?Mm([e.contentDocument.body],t):[e]},Mm=function(e,t){return e.reduce(function(n,r){var a,s=_Q(r,t),i=(a=[]).concat.apply(a,s.map(function(o){return Hrt(o,t)}));return n.concat(i,r.parentNode?Yo(r.parentNode.querySelectorAll(C2)).filter(function(o){return o===r}):[])},[])},jrt=function(e){var t=e.querySelectorAll("[".concat(Trt,"]"));return Yo(t).map(function(n){return Mm([n])}).reduce(function(n,r){return n.concat(r)},[])},R2=function(e,t){return Yo(e).filter(function(n){return uQ(t,n)}).filter(function(n){return Crt(n)})},n5=function(e,t){return t===void 0&&(t=new Map),Yo(e).filter(function(n){return cQ(t,n)})},I2=function(e,t,n){return N2(R2(Mm(e,n),t),!0,n)},ig=function(e,t){return N2(R2(Mm(e),t),!1)},Brt=function(e,t){return R2(jrt(e),t)},rd=function(e,t){return e.shadowRoot?rd(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:Yo(e.children).some(function(n){var r;if(n instanceof HTMLIFrameElement){var a=(r=n.contentDocument)===null||r===void 0?void 0:r.body;return a?rd(a,t):!1}return rd(n,t)})},$rt=function(e){for(var t=new Set,n=e.length,r=0;r0&&t.add(a),(s&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(i,o){return!t.has(o)})},pQ=function(e){return e.parentNode?pQ(e.parentNode):e},P2=function(e){var t=yd(e);return t.filter(Boolean).reduce(function(n,r){var a=r.getAttribute(UN);return n.push.apply(n,a?$rt(Yo(pQ(r).querySelectorAll("[".concat(UN,'="').concat(a,'"]:not([').concat(rQ,'="disabled"])')))):[r]),n},[])},Wrt=function(e){try{return e()}catch{return}},og=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?og(t.shadowRoot):t instanceof HTMLIFrameElement&&Wrt(function(){return t.contentWindow.document})?og(t.contentWindow.document):t}},Grt=function(e,t){return e===t},zrt=function(e,t){return!!Yo(e.querySelectorAll("iframe")).some(function(n){return Grt(n,t)})},hQ=function(e,t){return t===void 0&&(t=og(iQ(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:P2(e).some(function(n){return rd(n,t)||zrt(n,t)})},Vrt=function(e){e===void 0&&(e=document);var t=og(e);return t?Yo(e.querySelectorAll("[".concat(yrt,"]"))).some(function(n){return rd(n,t)}):!1},qrt=function(e,t){return t.filter(mQ).filter(function(n){return n.name===e.name}).filter(function(n){return n.checked})[0]||e},Y2=function(e,t){return mQ(e)&&e.name?qrt(e,t):e},Krt=function(e){var t=new Set;return e.forEach(function(n){return t.add(Y2(n,e))}),e.filter(function(n){return t.has(n)})},r5=function(e){return e[0]&&e.length>1?Y2(e[0],e):e[0]},a5=function(e,t){return e.indexOf(Y2(t,e))},jN="NEW_FOCUS",Jrt=function(e,t,n,r,a){var s=e.length,i=e[0],o=e[s-1],u=k2(r);if(!(r&&e.indexOf(r)>=0)){var c=r!==void 0?n.indexOf(r):-1,d=a?n.indexOf(a):c,_=a?e.indexOf(a):-1;if(c===-1)return _!==-1?_:jN;if(_===-1)return jN;var p=c-d,g=n.indexOf(i),y=n.indexOf(o),T=Krt(n),M=r!==void 0?T.indexOf(r):-1,L=M-(a?T.indexOf(a):c);if(!p&&_>=0||t.length===0)return _;var v=a5(e,t[0]),b=a5(e,t[t.length-1]);if(c<=g&&u&&Math.abs(p)>1)return b;if(c>=y&&u&&Math.abs(p)>1)return v;if(p&&Math.abs(L)>1)return _;if(c<=g)return b;if(c>y)return v;if(p)return Math.abs(p)>1?_:(s+_+p)%s}},Xrt=function(e){return function(t){var n,r=(n=dQ(t))===null||n===void 0?void 0:n.autofocus;return t.autofocus||r!==void 0&&r!=="false"||e.indexOf(t)>=0}},s5=function(e,t,n){var r=e.map(function(s){var i=s.node;return i}),a=n5(r.filter(Xrt(n)));return a&&a.length?r5(a):r5(n5(t))},BN=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&BN(e.parentNode.host||e.parentNode,t),t},yD=function(e,t){for(var n=BN(e),r=BN(t),a=0;a=0)return s}return!1},gQ=function(e,t,n){var r=yd(e),a=yd(t),s=r[0],i=!1;return a.filter(Boolean).forEach(function(o){i=yD(i||o,o)||i,n.filter(Boolean).forEach(function(u){var c=yD(s,u);c&&(!i||rd(c,i)?i=c:i=yD(c,i))})}),i},i5=function(e,t){return e.reduce(function(n,r){return n.concat(Brt(r,t))},[])},Zrt=function(e,t){var n=new Map;return t.forEach(function(r){return n.set(r.node,r)}),e.map(function(r){return n.get(r)}).filter(Irt)},Qrt=function(e,t){var n=og(yd(e).length>0?document:iQ(e).ownerDocument),r=P2(e).filter(HN),a=gQ(n||e,e,r),s=new Map,i=ig(r,s),o=i.filter(function(y){var T=y.node;return HN(T)});if(o[0]){var u=ig([a],s).map(function(y){var T=y.node;return T}),c=Zrt(u,o),d=c.map(function(y){var T=y.node;return T}),_=c.filter(function(y){var T=y.tabIndex;return T>=0}).map(function(y){var T=y.node;return T}),p=Jrt(d,_,u,n,t);if(p===jN){var g=s5(i,_,i5(r,s))||s5(i,d,i5(r,s));if(g)return{node:g};console.warn("focus-lock: cannot find any node to move focus into");return}return p===void 0?p:c[p]}},eat=function(e){var t=P2(e).filter(HN),n=gQ(e,e,t),r=N2(Mm([n],!0),!0,!0),a=Mm(t,!1);return r.map(function(s){var i=s.node,o=s.index;return{node:i,index:o,lockItem:a.indexOf(i)>=0,guard:k2(i)}})},F2=function(e,t){e&&("focus"in e&&e.focus(t),"contentWindow"in e&&e.contentWindow&&e.contentWindow.focus())},TD=0,vD=!1,EQ=function(e,t,n){n===void 0&&(n={});var r=Qrt(e,t);if(!vD&&r){if(TD>2){console.error("FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting"),vD=!0,setTimeout(function(){vD=!1},1);return}TD++,F2(r.node,n.focusOptions),TD--}};function vp(e){if(!e)return null;if(typeof WeakRef>"u")return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return(t==null?void 0:t.deref())||null}}var tat=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:vp(n),parent:vp(n.parentElement),left:vp(n.previousElementSibling),right:vp(n.nextElementSibling)}),n=n.parentElement;return{element:vp(e),stack:t,ownerDocument:e.ownerDocument}},nat=function(e){var t,n,r,a,s;if(e)for(var i=e.stack,o=e.ownerDocument,u=new Map,c=0,d=i;c-1&&(M.filter(function(v){var b=v.guard,w=v.node;return b&&w.dataset.focusAutoGuard}).forEach(function(v){var b=v.node;return b.removeAttribute("tabIndex")}),l5(L,M.length,1,M),l5(L,-1,-1,M))}}}return t},MQ=function(t){Ny()&&t&&(t.stopPropagation(),t.preventDefault())},j2=function(){return U2(Ny)},Tat=function(t){var n=t.target,r=t.currentTarget;r.contains(n)||_at(r,n)},vat=function(){return null},LQ=function(){H2=!0},xQ=function(){H2=!1,lg="just",U2(function(){lg="meanwhile"})},bat=function(){document.addEventListener("focusin",MQ),document.addEventListener("focusout",j2),window.addEventListener("focus",LQ),window.addEventListener("blur",xQ)},Sat=function(){document.removeEventListener("focusin",MQ),document.removeEventListener("focusout",j2),window.removeEventListener("focus",LQ),window.removeEventListener("blur",xQ)};function Mat(e){return e.filter(function(t){var n=t.disabled;return!n})}var AQ={moveFocusInside:EQ,focusInside:hQ,focusNextElement:iat,focusPrevElement:oat,focusFirstElement:lat,focusLastElement:uat,captureFocusRestore:yQ};function Lat(e){var t=e.slice(-1)[0];t&&!em&&bat();var n=em,r=n&&t&&t.id===n.id;em=t,n&&!r&&(n.onDeactivation(),e.filter(function(a){var s=a.id;return s===n.id}).length||n.returnFocus(!t)),t?(ms=null,(!r||n.observed!==t.observed)&&t.onActivation(AQ),Ny(),U2(Ny)):(Sat(),ms=null)}aQ.assignSyncMedium(Tat);sQ.assignMedium(j2);brt.assignMedium(function(e){return e(AQ)});const xat=Art(Mat,Lat)(vat);var B2=S.forwardRef(function(t,n){return S.createElement(D2,bm({sideCar:xat,ref:n},t))}),wQ=D2.propTypes||{};wQ.sideCar;YX(wQ,["sideCar"]);B2.propTypes={};function bD(){const e=Ft();let t=ve(ws,k=>k.joinedRooms),n=ve(ws,k=>k.setJoinedRooms),r=ve(dr,k=>k.currentUser),a=ve(xy,k=>k.chatConnections),s=ve(xy,k=>k.setChatConnections),i=ve(Tl,k=>k.voiceChatConnections),o=ve(Tl,k=>k.joinedVoiceConnection),u=ve(Tl,k=>k.setJoinedVoiceConnection),c=ve(Tl,k=>k.setVoiceChatConnections),d=ve(yl,k=>k.setMessages),_=ve(yl,k=>k.setUnreadReplies),p=ve(zi,k=>k.selectedRoom),g=ve(zi,k=>k.setSelectedRoom),y=ve(Ad,k=>k.setUsers),[T,M]=S.useState(!1),[L,v]=S.useState(!1),{isDesktop:b}=Qm();const{startChatConnection:w}=trt(r,t,n,s,d,_,y,p,g),{startVoiceConnection:N}=Ert(r,t,p,o,u,c);return S.useEffect(()=>{let k=[];a.map(I=>{var Y;((Y=a.find(H=>H.roomGuid==(p==null?void 0:p.guid)))==null?void 0:Y.connection.state)!=Wt.Connected&&(k.includes(I.roomGuid)||(k.push(I.roomGuid),w(I.roomGuid,I.connection)))})},[a.length]),S.useEffect(()=>{let k=[];i.map(I=>{var Y;((Y=i.find(H=>H.roomGuid==(p==null?void 0:p.guid)))==null?void 0:Y.connection.state)!=Wt.Connected&&(k.includes(I.roomGuid)||(k.push(I.roomGuid),N(I.roomGuid,I.connection)))})},[i.length]),S.useEffect(()=>{M(!1)},[p]),f.jsxs(f.Fragment,{children:[!b&&f.jsx(v2,{open:T,onOpenChange:M,children:f.jsxs(Tv,{className:"px-1",side:"left",children:[f.jsxs(xZ,{children:[f.jsx(vv,{children:e("MANAGE_ROOMS")}),f.jsx(bv,{className:"text-left px-2.5",children:e("HOLD_ROOM_TO_OPEN_CONTEXT_MENU")})]}),f.jsx($B,{})]})}),f.jsxs("div",{className:`flex flex-row overflow-y-hidden items-start gap-2 h-full px-[8.5vw] pb-[2vh] animate-appearance opacity-25 ${snt.chat}`,children:[b&&f.jsxs("div",{className:"flex flex-row overflow-hidden flex-shrink-0 w-full h-full max-w-[280px] overflow-y-hidden p-2.5",children:[f.jsx($B,{}),f.jsx(Fn,{orientation:"vertical"})]}),f.jsxs(Xnt,{direction:"horizontal",children:[f.jsx(QB,{id:"chatSectionPanel",order:1,defaultSize:75,minSize:40,children:f.jsx(nnt,{setAsideVisibility:M,setVoiceChatSectionVisibility:v,room:p})}),b&&f.jsxs(f.Fragment,{children:[f.jsx(Znt,{id:"handle",className:"mx-2.5",withHandle:!0}),f.jsx(QB,{id:"voiceChatSectionPanel",order:2,defaultSize:25,minSize:20,children:f.jsx(t5,{})})]})]})]}),!b&&f.jsx(lnt,{orientation:"right",open:L,onOpenClose:v,children:f.jsx(unt,{children:f.jsx(B2,{disabled:!L,onDeactivation:()=>v(!1),children:f.jsxs("div",{className:"flex flex-col",onKeyDown:k=>k.key==="Escape"&&v(!1),children:[f.jsx(t5,{}),f.jsx(wZ,{className:"flex-row mx-auto"})]})})})})]})}function Aat(e){const t=Ft();let[n,r]=S.useState(""),[a,s]=S.useState(!1);S.useEffect(()=>{fR(e.hexId)==n.toUpperCase()?s(!0):s(!1)},[n,e.hexId]);function i(){r(""),s(!1),e.onCancel()}return f.jsx(Ls,{open:e.isShown,onOpenChange:i,children:f.jsxs(za,{children:[f.jsx(Pi,{className:"hidden"}),f.jsx(Rg,{className:"hidden"}),f.jsxs(Ga,{children:[f.jsxs(Zr,{className:"pb-2",children:[f.jsx(Qr,{children:t("ARE_YOU_SURE")}),f.jsx(ri,{children:t("YOU_ARE_ABOUT_TO_DELETE_YOUR_ACCOUNT")})]}),f.jsxs(Ur,{className:"flex flex-col gap-2",children:[f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-medium",children:t("ENTER_COLIR_ID_TO_CONFIRM")}),f.jsxs("div",{className:"relative flex items-center",children:[f.jsx(y9,{strokeWidth:2.5,className:"absolute z-10 pointer-events-none stroke-slate-400 left-2 top-1/2 h-4 w-4 -translate-y-1/2 transform"}),f.jsx(Hi,{value:n,onChange:o=>r(o.target.value),type:"text",autoComplete:"off",placeholder:"#FF0000",className:"pl-7"})]})]}),f.jsxs("div",{className:"pt-2 flex flex-row gap-2",children:[f.jsx(et,{onClick:()=>e.onCancel(),className:"w-[100%]",variant:"outline",children:t("CANCEL")}),f.jsx(et,{disabled:!a,onClick:()=>e.onConfirm(),className:"w-[100%]",variant:"destructive",children:t("CONFIRM")})]})]})]})]})})}function wat(e){const t=Ft(),n=Nd(),r=Xa();let{isDesktop:a}=Qm(),s=ve(dr,N=>N.currentUser),i=ve(dr,N=>N.updateCurrentUser),[o,u]=S.useState(!1),c=ve(qa,N=>N.enableLoading),d=ve(qa,N=>N.disableLoading),_=ve(Jh,N=>N.setIsOpen),p=ve(No,N=>N.logOut);const g=Xr.object({username:Xr.string().min(2,t("USERNAME_MUST_BE_AT_LEAST_N_CHARACTERS",2)).max(50,t("USERNAME_CANT_BE_LONGER_THAN_N_CHARACTERS",50))}),y=Um({resolver:Hm(g),defaultValues:{username:s==null?void 0:s.username}});S.useEffect(()=>{s&&y.reset({username:s.username})},[s,y]);function T(){navigator.clipboard.writeText(fR(s.hexId)),n(t("COPIED"),t("HEX_COPIED_TO_CLIPBOARD"))}function M(N){(s==null?void 0:s.username)!=N.username&&N.username&&wh.ChangeUsername({newName:N.username}).then(()=>{i(),n(t("UPDATED"),t("PROFILE_UPDATED_SUCCESSFULLY"))}).catch(()=>r())}function L(){y.reset()}function v(){u(!0),e.dialogOpenClosed(!0)}function b(){_(!1),c(),u(!1),e.dialogOpenClosed(!1),wh.DeleteAccount().then(()=>{d(),p(),n(t("DELETED"),t("ACCOUNT_WAS_DELETED"))})}function w(){u(!1),e.dialogOpenClosed(!1)}return f.jsxs("div",{className:"flex flex-col gap-3.5",children:[f.jsx("span",{className:"text-3xl font-semibold",children:t("ACCOUNT")}),f.jsx(Fn,{}),f.jsx(jm,{...y,children:f.jsxs("form",{onSubmit:y.handleSubmit(M),className:Ie("flex flex-col gap-3.5",a&&"max-w-[50%]"),children:[(s==null?void 0:s.hexId)&&f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-medium",children:t("COLIR_ID_AKA_HEX_ID")}),f.jsx(t7,{onSelected:T,className:"w-fit text-primary font-semibold",color:s==null?void 0:s.hexId}),f.jsx("span",{className:"text-slate-500 text-sm",children:t("IT_CANT_BE_CHANGED")})]}),s&&f.jsx(bo,{name:"username",control:y.control,render:({field:N})=>f.jsxs(Ii,{className:"flex flex-col gap-1.5",children:[f.jsx(xo,{className:"text-sm font-medium",children:t("USERNAME")}),f.jsx(Ao,{children:f.jsx(Hi,{autoComplete:"off",className:"-translate-x-[1px]",placeholder:t("USERNAME"),...N})}),f.jsx(Nl,{className:"text-slate-500 text-sm",children:t("NAME_DISPLAYED_TO_EVERYONE")}),f.jsx(Cl,{})]})}),f.jsxs("div",{className:"flex flex-row gap-2.5",children:[f.jsxs(et,{disabled:!y.formState.isDirty,type:"submit",children:[f.jsx(k9,{className:"mr-2 h-4 w-4"})," ",t("SAVE")]}),f.jsx(et,{disabled:!y.formState.isDirty,type:"button",onClick:L,variant:"outline",children:t("RESET")})]}),f.jsxs(et,{onClick:v,className:"w-fit",variant:"destructive",children:[f.jsx(dm,{className:"mr-2 h-4 w-4"})," ",t("DELETE_ACCOUNT")]})]})}),f.jsx(Aat,{hexId:(s==null?void 0:s.hexId)??0,isShown:o,onConfirm:b,onCancel:w})]})}function Oat(){const e=Ft(),[t,n]=S.useState([]),[r,a]=S.useState([]),{voiceInputDevice:s,setVoiceInputDevice:i,voiceInputVolume:o,setVoiceInputVolume:u,voiceOutputDevice:c,setVoiceOutputDevice:d,voiceOutputVolume:_,setVoiceOutputVolume:p}=ve(Gc,y=>y);async function g(){try{const y=await navigator.mediaDevices.getUserMedia({audio:!0}),T=await navigator.mediaDevices.enumerateDevices();n(T.filter(M=>M.kind==="audioinput").map(M=>({id:M.deviceId,label:M.label}))),a(T.filter(M=>M.kind==="audiooutput").map(M=>({id:M.deviceId,label:M.label}))),y.getTracks().forEach(M=>M.stop())}catch(y){console.error("Error accessing media devices:",y)}}return S.useEffect(()=>{g();const y=()=>{g()};return navigator.mediaDevices.addEventListener("devicechange",y),()=>{navigator.mediaDevices.removeEventListener("devicechange",y)}},[]),f.jsxs("div",{className:"flex flex-col gap-3.5",children:[f.jsx("span",{className:"text-3xl font-semibold",children:e("VOICE_SETTINGS")}),f.jsx(Fn,{}),f.jsxs("div",{className:"flex flex-row gap-4 max-w-[48rem]",children:[f.jsxs("div",{className:"w-full flex flex-col gap-4",children:[f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-medium",children:e("VOICE_INPUT_DEVICE")}),f.jsxs(dN,{onValueChange:i,defaultValue:s,disabled:r.length===0,children:[f.jsx(uy,{children:f.jsx(mN,{placeholder:e("DEFAULT")})}),f.jsx(cy,{children:f.jsxs(fN,{children:[f.jsx(dy,{children:e("INPUT_DEVICE")}),t.filter(y=>y.id.length>0).map(y=>f.jsx(fl,{value:y.id,children:y.label},y.id))]})})]}),f.jsx("span",{className:"text-slate-500 text-sm",children:e("SELECT_MICROPHONE_DEVICE")})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:e("INPUT_VOLUME")}),f.jsx(Do,{disabled:!0,step:.1,className:"cursor-pointer",value:[o],onValueChange:y=>u(y[0])})]})]}),f.jsxs("div",{className:"w-full flex flex-col gap-4",children:[f.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-medium",children:e("VOICE_OUTPUT_DEVICE")}),f.jsxs(dN,{onValueChange:d,defaultValue:c,disabled:r.length===0,children:[f.jsx(uy,{children:f.jsx(mN,{placeholder:"Default"})}),f.jsx(cy,{children:f.jsxs(fN,{children:[f.jsx(dy,{children:e("OUTPUT_DEVICE")}),r.filter(y=>y.id.length>0).map(y=>f.jsx(fl,{value:y.id,children:y.label},y.id))]})})]}),f.jsx("span",{className:"text-slate-500 text-sm",children:e("SELECT_OUTPUT_DEVICE")})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:e("OUTPUT_VOLUME")}),f.jsx(Do,{step:.1,className:"cursor-pointer",value:[_],onValueChange:y=>p(y[0])})]})]})]})]})}var $2="Checkbox",[Dat,rmt]=Bg($2),[kat,Nat]=Dat($2),OQ=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:s,required:i,disabled:o,value:u="on",onCheckedChange:c,form:d,..._}=e,[p,g]=S.useState(null),y=wt(t,w=>g(w)),T=S.useRef(!1),M=p?d||!!p.closest("form"):!0,[L=!1,v]=As({prop:a,defaultProp:s,onChange:c}),b=S.useRef(L);return S.useEffect(()=>{const w=p==null?void 0:p.form;if(w){const N=()=>v(b.current);return w.addEventListener("reset",N),()=>w.removeEventListener("reset",N)}},[p,v]),f.jsxs(kat,{scope:n,state:L,disabled:o,children:[f.jsx(ft.button,{type:"button",role:"checkbox","aria-checked":Du(L)?"mixed":L,"aria-required":i,"data-state":NQ(L),"data-disabled":o?"":void 0,disabled:o,value:u,..._,ref:y,onKeyDown:Fe(e.onKeyDown,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:Fe(e.onClick,w=>{v(N=>Du(N)?!0:!N),M&&(T.current=w.isPropagationStopped(),T.current||w.stopPropagation())})}),M&&f.jsx(Cat,{control:p,bubbles:!T.current,name:r,value:u,checked:L,required:i,disabled:o,form:d,style:{transform:"translateX(-100%)"},defaultChecked:Du(s)?!1:s})]})});OQ.displayName=$2;var DQ="CheckboxIndicator",kQ=S.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,s=Nat(DQ,n);return f.jsx(Av,{present:r||Du(s.state)||s.state===!0,children:f.jsx(ft.span,{"data-state":NQ(s.state),"data-disabled":s.disabled?"":void 0,...a,ref:t,style:{pointerEvents:"none",...e.style}})})});kQ.displayName=DQ;var Cat=e=>{const{control:t,checked:n,bubbles:r=!0,defaultChecked:a,...s}=e,i=S.useRef(null),o=IT(n),u=kT(t);S.useEffect(()=>{const d=i.current,_=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(_,"checked").set;if(o!==n&&g){const y=new Event("click",{bubbles:r});d.indeterminate=Du(n),g.call(d,Du(n)?!1:n),d.dispatchEvent(y)}},[o,n,r]);const c=S.useRef(Du(n)?!1:n);return f.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:a??c.current,...s,tabIndex:-1,ref:i,style:{...e.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function Du(e){return e==="indeterminate"}function NQ(e){return Du(e)?"indeterminate":e?"checked":"unchecked"}var CQ=OQ,Rat=kQ;const Cy=S.forwardRef(({className:e,...t},n)=>f.jsx(CQ,{ref:n,className:Ie("peer h-4 w-4 shrink-0 rounded-sm border-2 border-primary/80 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:f.jsx(Rat,{className:Ie("flex items-center justify-center text-current"),children:f.jsx(Cm,{strokeWidth:3,className:"h-3 w-3"})})}));Cy.displayName=CQ.displayName;function Iat(){const e=Ft(),{pingVolume:t,isPingSoundDisabled:n,setPingVolume:r,setIsPingSoundDisabled:a,joinLeaveVolume:s,isJoinLeaveSoundDisabled:i,setJoinLeaveVolume:o,setIsJoinLeaveSoundDisabled:u}=ve(Vi,_=>_);function c(){a(!n)}function d(){u(!i)}return f.jsxs("div",{className:"flex flex-col gap-3.5 max-w-[48rem]",children:[f.jsx("span",{className:"text-3xl font-semibold",children:e("NOTIFICATIONS_AND_SOUNDS")}),f.jsx(Fn,{}),f.jsxs("div",{className:"flex flex-row gap-3.5",children:[f.jsxs("div",{className:"w-full flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:e("PING_VOLUME")}),f.jsx(Do,{disabled:n,onValueChange:_=>r(_[0]),value:[t],className:"cursor-pointer"}),f.jsxs("div",{className:"flex flex-row items-center gap-1.5 pt-2",children:[f.jsx(Cy,{onCheckedChange:c,checked:n,id:"disablePingSound"}),f.jsx("label",{htmlFor:"disablePingSound",className:"select-none cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:e("DISABLE_PING_SOUND")})]})]}),f.jsxs("div",{className:"w-full flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-medium",children:e("JOIN_LEAVE_VOLUME")}),f.jsx(Do,{disabled:i,onValueChange:_=>o(_[0]),value:[s],className:"cursor-pointer"}),f.jsxs("div",{className:"flex flex-row items-center gap-1.5 pt-2",children:[f.jsx(Cy,{onCheckedChange:d,checked:i,id:"disableJoinLeaveSound"}),f.jsx("label",{htmlFor:"disableJoinLeaveSound",className:"select-none cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:e("DISABLE_JOIN_LEAVE_SOUND")})]})]})]})]})}const Pat=Xr.object({statsDisabled:Xr.boolean()});function Yat(){const e=Ft(),t=Nd(),n=ve(Yr,_=>_.setIsFaqOpen),r=ve(Yr,_=>_.setSelectedFaqTab);let a=ve(dr,_=>_.currentUser),s=ve(dr,_=>_.updateCurrentUser),i=a==null?void 0:a.userSettings;const o=Um({resolver:Hm(Pat),defaultValues:{statsDisabled:!(i!=null&&i.statisticsEnabled)}});S.useEffect(()=>{a&&o.reset({statsDisabled:!a.userSettings.statisticsEnabled})},[a,o]);function u(){o.reset()}function c(_){(a==null?void 0:a.userSettings.statisticsEnabled)!==!_.statsDisabled&&(a.userSettings.statisticsEnabled=!_.statsDisabled,wh.ChangeSettings(a.userSettings).then(()=>{s(),t(e("UPDATED"),e("PROFILE_UPDATED_SUCCESSFULLY"))}))}function d(_){_.preventDefault(),r(gn.HowStatsWork),n(!0)}return f.jsxs("div",{className:"flex flex-col gap-3.5",children:[f.jsx("span",{className:"text-3xl font-semibold",children:e("STATISTICS")}),f.jsx(Fn,{}),f.jsx(jm,{...o,children:f.jsxs("form",{onSubmit:o.handleSubmit(c),className:"flex flex-col gap-3.5 max-w-[48rem]",children:[f.jsx(bo,{name:"statsDisabled",control:o.control,render:({field:_})=>f.jsxs(Ii,{className:"flex flex-row items-center gap-1.5 pt-2",children:[f.jsx(Ao,{children:f.jsx(Cy,{id:"disableStats",checked:_.value,onCheckedChange:_.onChange})}),f.jsx(xo,{htmlFor:"disableStats",className:"select-none cursor-pointer text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 !mt-[1px]",children:e("DISABLE_STATS")})]})}),f.jsx(rT,{onClick:d,className:"text-sm underline",to:"/",children:e("HOW_STATS_WORK")}),f.jsxs("div",{className:"flex flex-row gap-2.5",children:[f.jsxs(et,{disabled:!o.formState.isDirty,type:"submit",children:[f.jsx(k9,{className:"mr-2 h-4 w-4"})," ",e("SAVE")]}),f.jsx(et,{disabled:!o.formState.isDirty,onClick:u,type:"button",variant:"outline",children:e("RESET")})]})]})})]})}var W2="Radio",[Fat,RQ]=Bg(W2),[Uat,Hat]=Fat(W2),IQ=S.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:a=!1,required:s,disabled:i,value:o="on",onCheck:u,form:c,...d}=e,[_,p]=S.useState(null),g=wt(t,M=>p(M)),y=S.useRef(!1),T=_?c||!!_.closest("form"):!0;return f.jsxs(Uat,{scope:n,checked:a,disabled:i,children:[f.jsx(ft.button,{type:"button",role:"radio","aria-checked":a,"data-state":FQ(a),"data-disabled":i?"":void 0,disabled:i,value:o,...d,ref:g,onClick:Fe(e.onClick,M=>{a||u==null||u(),T&&(y.current=M.isPropagationStopped(),y.current||M.stopPropagation())})}),T&&f.jsx(jat,{control:_,bubbles:!y.current,name:r,value:o,checked:a,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});IQ.displayName=W2;var PQ="RadioIndicator",YQ=S.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...a}=e,s=Hat(PQ,n);return f.jsx(Av,{present:r||s.checked,children:f.jsx(ft.span,{"data-state":FQ(s.checked),"data-disabled":s.disabled?"":void 0,...a,ref:t})})});YQ.displayName=PQ;var jat=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,s=S.useRef(null),i=IT(n),o=kT(t);return S.useEffect(()=>{const u=s.current,c=window.HTMLInputElement.prototype,_=Object.getOwnPropertyDescriptor(c,"checked").set;if(i!==n&&_){const p=new Event("click",{bubbles:r});_.call(u,n),u.dispatchEvent(p)}},[i,n,r]),f.jsx("input",{type:"radio","aria-hidden":!0,defaultChecked:n,...a,tabIndex:-1,ref:s,style:{...e.style,...o,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})};function FQ(e){return e?"checked":"unchecked"}var Bat=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],G2="RadioGroup",[$at,amt]=Bg(G2,[Bm,RQ]),UQ=Bm(),HQ=RQ(),[Wat,Gat]=$at(G2),jQ=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:a,value:s,required:i=!1,disabled:o=!1,orientation:u,dir:c,loop:d=!0,onValueChange:_,...p}=e,g=UQ(n),y=wd(c),[T,M]=As({prop:s,defaultProp:a,onChange:_});return f.jsx(Wat,{scope:n,name:r,required:i,disabled:o,value:T,onValueChange:M,children:f.jsx(kR,{asChild:!0,...g,orientation:u,dir:y,loop:d,children:f.jsx(ft.div,{role:"radiogroup","aria-required":i,"aria-orientation":u,"data-disabled":o?"":void 0,dir:y,...p,ref:t})})})});jQ.displayName=G2;var BQ="RadioGroupItem",$Q=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...a}=e,s=Gat(BQ,n),i=s.disabled||r,o=UQ(n),u=HQ(n),c=S.useRef(null),d=wt(t,c),_=s.value===a.value,p=S.useRef(!1);return S.useEffect(()=>{const g=T=>{Bat.includes(T.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",y)}},[]),f.jsx(NR,{asChild:!0,...o,focusable:!i,active:_,children:f.jsx(IQ,{disabled:i,required:s.required,checked:_,...u,...a,name:s.name,ref:d,onCheck:()=>s.onValueChange(a.value),onKeyDown:Fe(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:Fe(a.onFocus,()=>{var g;p.current&&((g=c.current)==null||g.click())})})})});$Q.displayName=BQ;var zat="RadioGroupIndicator",WQ=S.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,a=HQ(n);return f.jsx(YQ,{...a,...r,ref:t})});WQ.displayName=zat;var GQ=jQ,zQ=$Q,Vat=WQ;const VQ=S.forwardRef(({className:e,...t},n)=>f.jsx(GQ,{className:Ie("grid gap-2",e),...t,ref:n}));VQ.displayName=GQ.displayName;const qQ=S.forwardRef(({className:e,...t},n)=>f.jsx(zQ,{ref:n,className:Ie("flex justify-center items-center aspect-square h-4 w-4 rounded-full border-2 border-primary/80 text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary",e),...t,children:f.jsx(Vat,{className:"flex items-center justify-center",children:f.jsx(aR,{className:"h-[8px] w-[8px] fill-current text-current"})})}));qQ.displayName=zQ.displayName;function qat(){const e=Ft();let t=ve(Dl,r=>r.currentLanguage),n=ve(Dl,r=>r.setCurrentLanguage);return f.jsxs("div",{className:"flex flex-col gap-3.5",children:[f.jsx("span",{className:"text-3xl font-semibold",children:e("LANGUAGE")}),f.jsx(Fn,{}),f.jsx("div",{className:"flex flex-col gap-3.5",children:f.jsx(VQ,{value:t,onValueChange:n,children:TR.map(r=>f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(qQ,{value:r.languageCode,id:r.languageCode}),f.jsx(ST,{className:"text-sm cursor-pointer select-none",htmlFor:r.languageCode,children:r.languageName})]},r.languageCode))})})]})}const Kat=()=>{const{currentLanguage:e,setCurrentLanguage:t}=ve(Dl,Y=>Y),n=ve(tg,Y=>Y.userVolumes),{getAllEncryptionKeys:r,setEncryptionKey:a}=ve(ju,Y=>Y),{pingVolume:s,isPingSoundDisabled:i,setPingVolume:o,setIsPingSoundDisabled:u,joinLeaveVolume:c,isJoinLeaveSoundDisabled:d,setJoinLeaveVolume:_,setIsJoinLeaveSoundDisabled:p}=ve(Vi,Y=>Y),{voiceInputDevice:g,setVoiceInputDevice:y,voiceInputVolume:T,setVoiceInputVolume:M,voiceOutputDevice:L,setVoiceOutputDevice:v,voiceOutputVolume:b,setVoiceOutputVolume:w}=ve(Gc,Y=>Y),N=()=>ti.lib.WordArray.random(32).toString(ti.enc.Hex);return{exportSettings:()=>{const Y={encryptionKeys:Array.from(r().entries())??new Map,currentLanguage:e,userVolumes:n,isJoinLeaveSoundDisabled:d,isPingSoundDisabled:i,joinLeaveVolume:c,pingVolume:s,voiceInputDevice:g,voiceInputVolume:T,voiceOutputDevice:L,voiceOutputVolume:b},H=JSON.stringify(Y),U=ti.SHA256(H).toString(),j=N(),z=`${Im(H,j)}${U}${j}`,Q=new Blob([z],{type:"text/plain"});YJ.saveAs(Q,`settings-${st().format("YYYY-MM-DD h-mm-ss")}.esf`)},importSettings:async Y=>{const H=await Y.text(),U=H.slice(-64),j=H.slice(-128,-64),W=H.slice(0,-128),z=bl(W,U);if(!z)throw new Error("Failed to decrypt settings. The key may be incorrect.");if(ti.SHA256(z).toString()!==j)throw new Error("Checksum mismatch. The file may be corrupted or tampered with.");const te=JSON.parse(z);te.encryptionKeys.forEach(([fe,he])=>{a(fe,he)}),t(te.currentLanguage),p(te.isJoinLeaveSoundDisabled),u(te.isPingSoundDisabled),_(te.joinLeaveVolume),o(te.pingVolume),y(te.voiceInputDevice),M(te.voiceInputVolume),v(te.voiceOutputDevice),w(te.voiceOutputVolume)}}};function Jat(){const e=Ft(),t=Nd(),n=Xa();let r=S.useRef(),{exportSettings:a,importSettings:s}=Kat();const i=async o=>{let u=o.target.files;if(u.length==1)try{await s(u[0]),t(e("SETTINGS_UPDATED_SUCCESSFULLY"),e("SETTINGS_UPDATED_SUCCESSFULLY_DESCRIPTION"))}catch{n(e("FAILED_TO_IMPORT_SETTINGS"),e("FAILED_TO_IMPORT_SETTINGS_DESCRIPTION"))}};return f.jsxs("div",{className:"flex flex-col gap-3.5",children:[f.jsx("span",{className:"text-3xl font-semibold",children:e("IMPORT_EXPORT_SETTINGS")}),f.jsx(Fn,{}),f.jsxs("div",{className:"flex flex-col gap-1.5 max-w-[28rem]",children:[f.jsxs("div",{className:"flex flex-row gap-1.5",children:[f.jsxs(et,{onClick:a,variant:"default",children:[f.jsx(Toe,{className:"mr-2 h-4 w-4"})," ",e("EXPORT_SETTINGS")]}),f.jsx("input",{onChange:i,ref:r,className:"hidden",id:"settingsImport",name:"settingsImport",type:"file"}),f.jsxs(et,{onClick:()=>r.current.click(),variant:"outline",children:[f.jsx(x9,{className:"mr-2 h-4 w-4"})," ",e("IMPORT_SETTINGS")]})]}),f.jsx("span",{style:{lineBreak:"normal"},className:"text-slate-500 text-sm",children:e("IMPORT_EXPORT_SETTINGS_DESCRIPTION")})]})]})}var tr=(e=>(e.Account="account",e.VoiceSettings="voice-settings",e.Notifications="notifications",e.Statistics="statistics",e.Language="language",e.ImportExport="import-export",e))(tr||{});function ga({children:e,isSelected:t,onClick:n,className:r}){return f.jsx("button",{onClick:n,className:Ie(`flex items-center text-nowrap text-popover-foreground whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-[-1.5px] disabled:pointer-events-none disabled:opacity-50 select-none cursor-pointer hover:bg-accent hover:text-accent-foreground text-ellipsis h-9 px-2 py-2 ${t?"bg-accent":null}`,r),children:e})}function $N({children:e}){return f.jsx("div",{className:"flex pl-8 py-2 select-none items-center text-nowrap text-popover-foreground text-sm whitespace-nowrap rounded-md font-semibold ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 text-ellipsis h-9",children:e})}function u5({className:e,selectedTab:t,setSelectedTab:n}){const r=Ft();return f.jsx(Xu,{className:"pr-2.5",children:f.jsxs("div",{className:e,children:[f.jsx($N,{children:r("SETTINGS")}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.Account,onClick:()=>n(tr.Account),children:[f.jsx(lR,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("ACCOUNT")]}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.VoiceSettings,onClick:()=>n(tr.VoiceSettings),children:[f.jsx(cT,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("VOICE_SETTINGS")]}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.Notifications,onClick:()=>n(tr.Notifications),children:[f.jsx(Yoe,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("NOTIFICATIONS_AND_SOUNDS")]}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.Statistics,onClick:()=>n(tr.Statistics),children:[f.jsx(T9,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("STATISTICS")]}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.Language,onClick:()=>n(tr.Language),children:[f.jsx(Soe,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("LANGUAGE")]}),f.jsx(Fn,{orientation:"horizontal"}),f.jsxs(ga,{className:"w-full",isSelected:t==tr.ImportExport,onClick:()=>n(tr.ImportExport),children:[f.jsx(x9,{className:"text-popover-foreground mr-1.5 h-4 w-4",strokeWidth:2.5})," ",r("IMPORT_EXPORT_SETTINGS")]})]})})}const Xat="_popupWindow_1q68v_1",Zat={popupWindow:Xat};function KQ(e){const t=Ft();let[n,r]=S.useState(!e.isOpen),[a,s]=S.useState(e.isOpen),{isDesktop:i}=Qm();return S.useEffect(()=>{e.isOpen?(r(!1),setTimeout(()=>{s(!0),e.onPopupShown&&(e==null||e.onPopupShown())},50)):(s(!1),setTimeout(()=>r(!0),100))},[e.isOpen]),f.jsx("div",{className:Ie("z-30 transition-all ease-in-out scale-[0.98] w-full h-full fixed bg-background overflow-y-hidden",Zat.popupWindow,!a&&"opacity-0 pointer-events-none",a&&"opacity-100 scale-100",n&&"hidden"),onKeyDown:o=>o.key==="Escape"&&e.onEscapePressed&&e.onEscapePressed(),children:f.jsxs(B2,{className:"h-full",disabled:!e.isOpen,onDeactivation:()=>e.setIsOpen(!1),children:[e.children,f.jsxs(Tm,{children:[f.jsx(vm,{asChild:!0,children:f.jsx(et,{className:"absolute right-2.5 top-0 rounded-full",variant:"outline",size:"icon",tabIndex:0,onClick:()=>e.setIsOpen(!1),children:f.jsx(dT,{className:"h-4 w-4"})})}),i&&f.jsx(gd,{side:"left",children:t("ESC_CLOSE")})]})]})})}function Qat(){let{isDesktop:e}=Qm();const t=ve(Jh,y=>y.isOpen),n=ve(Jh,y=>y.setIsOpen);let r=ve(dr,y=>y.currentUser),[a,s]=S.useState(!1),[i,o]=S.useState(!1),[u,c]=S.useState(!1),[d,_]=S.useState(tr.Account);S.useEffect(()=>{if(!r)return n(!1)},[r]),S.useEffect(()=>{s(!1)},[d]),S.useEffect(()=>{setTimeout(i?()=>c(!0):()=>c(!1),50)},[i]);function p(){var T;if(u)return;let y=(T=document.activeElement)==null?void 0:T.tagName;y==="TEXTAREA"||y==="INPUT"||y==="VIDEO"||n(!1)}const g=()=>_(tr.Account);return f.jsxs(KQ,{onEscapePressed:p,isOpen:t,setIsOpen:n,onPopupShown:g,children:[!e&&f.jsx(et,{onClick:()=>s(!0),variant:"ghost",size:"icon",className:"min-w-10 min-h-10",children:f.jsx(oR,{className:"h-5 w-5 text-slate-400"})}),f.jsxs("div",{className:"flex flex-row gap-1 h-full",children:[e&&f.jsxs(f.Fragment,{children:[f.jsx(u5,{className:"flex flex-col gap-2.5",selectedTab:d,setSelectedTab:_}),f.jsx(Fn,{className:"h-full",orientation:"vertical"})]}),f.jsx(Xu,{className:"w-full",children:f.jsxs("div",{className:"w-full pl-4 pr-12 pt-5",children:[d==tr.Account&&f.jsx(wat,{dialogOpenClosed:o}),d==tr.VoiceSettings&&f.jsx(Oat,{}),d==tr.Notifications&&f.jsx(Iat,{}),d==tr.Statistics&&f.jsx(Yat,{}),d==tr.Language&&f.jsx(qat,{}),d==tr.ImportExport&&f.jsx(Jat,{})]})})]}),!e&&f.jsx(v2,{open:a,onOpenChange:s,children:f.jsxs(Tv,{side:"left",children:[f.jsx(vv,{className:"hidden"}),f.jsx(bv,{className:"hidden"}),f.jsx(u5,{className:"flex flex-col gap-2.5",selectedTab:d,setSelectedTab:_})]})})]})}const c5=(e,t,n)=>{const r=e[t];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((a,s)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(s.bind(null,new Error("Unknown variable dynamic import: "+t+(t.split("/").length!==n?". Note that variables only represent file names one level deep.":""))))})},est=async(e,t)=>{try{return(await c5(Object.assign({"../../../assets/faq/DesignAndStyle/DesignAndStyle_de.md":()=>at(()=>import("./DesignAndStyle_de-B8y3AHVw.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_en.md":()=>at(()=>import("./DesignAndStyle_en-BvN7ZqWn.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_es.md":()=>at(()=>import("./DesignAndStyle_es-CtsoUijf.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_fr.md":()=>at(()=>import("./DesignAndStyle_fr-CEy7vLVj.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_pl.md":()=>at(()=>import("./DesignAndStyle_pl-CEJZbcCP.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_ru.md":()=>at(()=>import("./DesignAndStyle_ru-BEiRLI4x.js"),[]),"../../../assets/faq/DesignAndStyle/DesignAndStyle_uk.md":()=>at(()=>import("./DesignAndStyle_uk-BbvUBMnw.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_de.md":()=>at(()=>import("./HowKeysWork_de-BCUFlKNm.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_en.md":()=>at(()=>import("./HowKeysWork_en-BuSLAE4T.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_es.md":()=>at(()=>import("./HowKeysWork_es-CbcRUowr.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_fr.md":()=>at(()=>import("./HowKeysWork_fr-vucpIt9s.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_pl.md":()=>at(()=>import("./HowKeysWork_pl-UV0Wm788.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_ru.md":()=>at(()=>import("./HowKeysWork_ru-DKPxKJQ8.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_uk.md":()=>at(()=>import("./HowKeysWork_uk-HGC2DkBL.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_de.md":()=>at(()=>import("./HowStatsWork_de-DbM9s59p.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_en.md":()=>at(()=>import("./HowStatsWork_en-VOu-WSnk.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_es.md":()=>at(()=>import("./HowStatsWork_es-C2hOhBTY.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_fr.md":()=>at(()=>import("./HowStatsWork_fr-DjNR6eo-.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_pl.md":()=>at(()=>import("./HowStatsWork_pl-D6C5GCgY.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_ru.md":()=>at(()=>import("./HowStatsWork_ru-DemWKYF8.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_uk.md":()=>at(()=>import("./HowStatsWork_uk-B0pEHf3I.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_de.md":()=>at(()=>import("./LibsReferences_de-B1n6NZPC.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_en.md":()=>at(()=>import("./LibsReferences_en-CyCIFyNN.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_es.md":()=>at(()=>import("./LibsReferences_es-HmsvlY8V.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_fr.md":()=>at(()=>import("./LibsReferences_fr-DRkk5rkz.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_pl.md":()=>at(()=>import("./LibsReferences_pl-BYuB-729.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_ru.md":()=>at(()=>import("./LibsReferences_ru-KPror1f4.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_uk.md":()=>at(()=>import("./LibsReferences_uk-Cnykw27L.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_de.md":()=>at(()=>import("./WhatIsColirId_de-B7XsPL04.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_en.md":()=>at(()=>import("./WhatIsColirId_en-CAdip4w-.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_es.md":()=>at(()=>import("./WhatIsColirId_es-CKfUZGBB.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_fr.md":()=>at(()=>import("./WhatIsColirId_fr-BMgy5JT-.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_pl.md":()=>at(()=>import("./WhatIsColirId_pl-DgB6qNK6.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_ru.md":()=>at(()=>import("./WhatIsColirId_ru-CH0Tsgdu.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_uk.md":()=>at(()=>import("./WhatIsColirId_uk-53dqKyML.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_de.md":()=>at(()=>import("./WhatIsGuid_de-BSt1bXci.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_en.md":()=>at(()=>import("./WhatIsGuid_en-gLqhJENh.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_es.md":()=>at(()=>import("./WhatIsGuid_es-CIDjlwCs.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_fr.md":()=>at(()=>import("./WhatIsGuid_fr-zak5sP5n.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_pl.md":()=>at(()=>import("./WhatIsGuid_pl-D5C89Trj.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_ru.md":()=>at(()=>import("./WhatIsGuid_ru-CuaFu4KK.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_uk.md":()=>at(()=>import("./WhatIsGuid_uk-Dwd61nAN.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_de.md":()=>at(()=>import("./WhatIsRoom_de-LTVKIqfu.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_en.md":()=>at(()=>import("./WhatIsRoom_en-Cb5ZZXP-.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_es.md":()=>at(()=>import("./WhatIsRoom_es-CLtU6Xas.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_fr.md":()=>at(()=>import("./WhatIsRoom_fr-3Gfb_VtA.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_pl.md":()=>at(()=>import("./WhatIsRoom_pl-CcJ__7Rn.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_ru.md":()=>at(()=>import("./WhatIsRoom_ru-A6Ib6OiN.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_uk.md":()=>at(()=>import("./WhatIsRoom_uk-CRrG5UNE.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_de.md":()=>at(()=>import("./WhatIsTheMainGoal_de-S6ttJjzA.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_en.md":()=>at(()=>import("./WhatIsTheMainGoal_en-Wg3NYuB5.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_es.md":()=>at(()=>import("./WhatIsTheMainGoal_es-ucdxuFiS.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_fr.md":()=>at(()=>import("./WhatIsTheMainGoal_fr-CdK0z5nE.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_pl.md":()=>at(()=>import("./WhatIsTheMainGoal_pl-CtBj9Sjj.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_ru.md":()=>at(()=>import("./WhatIsTheMainGoal_ru-CHrJtDHP.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_uk.md":()=>at(()=>import("./WhatIsTheMainGoal_uk-Bxpy3t8X.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_de.md":()=>at(()=>import("./WhyDoYouNeedAuth_de-Nvgrbgdr.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_en.md":()=>at(()=>import("./WhyDoYouNeedAuth_en-DvciQCTZ.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_es.md":()=>at(()=>import("./WhyDoYouNeedAuth_es-BRc730D6.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_fr.md":()=>at(()=>import("./WhyDoYouNeedAuth_fr-BZZRZAEH.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_pl.md":()=>at(()=>import("./WhyDoYouNeedAuth_pl-DcUoGP5T.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_ru.md":()=>at(()=>import("./WhyDoYouNeedAuth_ru-CFKkVAb0.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_uk.md":()=>at(()=>import("./WhyDoYouNeedAuth_uk-5egabRk3.js"),[])}),`../../../assets/faq/${e}/${e}_${t}.md`,7)).default}catch{if(t!=="en")try{return(await c5(Object.assign({"../../../assets/faq/DesignAndStyle/DesignAndStyle_en.md":()=>at(()=>import("./DesignAndStyle_en-BvN7ZqWn.js"),[]),"../../../assets/faq/HowKeysWork/HowKeysWork_en.md":()=>at(()=>import("./HowKeysWork_en-BuSLAE4T.js"),[]),"../../../assets/faq/HowStatsWork/HowStatsWork_en.md":()=>at(()=>import("./HowStatsWork_en-VOu-WSnk.js"),[]),"../../../assets/faq/LibsReferences/LibsReferences_en.md":()=>at(()=>import("./LibsReferences_en-CyCIFyNN.js"),[]),"../../../assets/faq/WhatIsColirId/WhatIsColirId_en.md":()=>at(()=>import("./WhatIsColirId_en-CAdip4w-.js"),[]),"../../../assets/faq/WhatIsGuid/WhatIsGuid_en.md":()=>at(()=>import("./WhatIsGuid_en-gLqhJENh.js"),[]),"../../../assets/faq/WhatIsRoom/WhatIsRoom_en.md":()=>at(()=>import("./WhatIsRoom_en-Cb5ZZXP-.js"),[]),"../../../assets/faq/WhatIsTheMainGoal/WhatIsTheMainGoal_en.md":()=>at(()=>import("./WhatIsTheMainGoal_en-Wg3NYuB5.js"),[]),"../../../assets/faq/WhyDoYouNeedAuth/WhyDoYouNeedAuth_en.md":()=>at(()=>import("./WhyDoYouNeedAuth_en-DvciQCTZ.js"),[])}),`../../../assets/faq/${e}/${e}_en.md`,7)).default}catch{return console.error(`No markdown found for tab ${e}`),"# No Content Available"}return console.error(`No markdown found for tab ${e} in language ${t}`),"# No Content Available"}};function d5(e){const t=[],n=String(e||"");let r=n.indexOf(","),a=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const i=n.slice(a,r).trim();(i||!s)&&t.push(i),a=r+1,r=n.indexOf(",",a)}return t}function JQ(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const tst=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nst=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rst={};function f5(e,t){return(rst.jsx?nst:tst).test(e)}const ast=/[ \t\n\f\r]/g;function sst(e){return typeof e=="object"?e.type==="text"?m5(e.value):!1:m5(e)}function m5(e){return e.replace(ast,"")===""}class Vg{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}Vg.prototype.property={};Vg.prototype.normal={};Vg.prototype.space=null;function XQ(e,t){const n={},r={};let a=-1;for(;++a4&&n.slice(0,4)==="data"&&cst.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(p5,mst);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!p5.test(s)){let i=s.replace(dst,fst);i.charAt(0)!=="-"&&(i="-"+i),t="data"+i}}a=z2}return new a(r,t)}function fst(e){return"-"+e.toLowerCase()}function mst(e){return e.charAt(1).toUpperCase()}const _st={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qg=XQ([eee,QQ,ree,aee,lst],"html"),tc=XQ([eee,QQ,ree,aee,ust],"svg");function h5(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function see(e){return e.join(" ").trim()}var iee={},g5=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,pst=/\n/g,hst=/^\s*/,gst=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Est=/^:\s*/,yst=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Tst=/^[;\s]*/,vst=/^\s+|\s+$/g,bst=` `,E5="/",y5="*",Yc="",Sst="comment",Mst="declaration",Lst=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(y){var T=y.match(pst);T&&(n+=T.length);var M=y.lastIndexOf(bst);r=~M?y.length-M:r+y.length}function s(){var y={line:n,column:r};return function(T){return T.position=new i(y),c(),T}}function i(y){this.start=y,this.end={line:n,column:r},this.source=t.source}i.prototype.content=e;function o(y){var T=new Error(t.source+":"+n+":"+r+": "+y);if(T.reason=y,T.filename=t.source,T.line=n,T.column=r,T.source=e,!t.silent)throw T}function u(y){var T=y.exec(e);if(T){var M=T[0];return a(M),e=e.slice(M.length),T}}function c(){u(hst)}function d(y){var T;for(y=y||[];T=_();)T!==!1&&y.push(T);return y}function _(){var y=s();if(!(E5!=e.charAt(0)||y5!=e.charAt(1))){for(var T=2;Yc!=e.charAt(T)&&(y5!=e.charAt(T)||E5!=e.charAt(T+1));)++T;if(T+=2,Yc===e.charAt(T-1))return o("End of comment missing");var M=e.slice(2,T-2);return r+=2,a(M),e=e.slice(T),r+=2,y({type:Sst,comment:M})}}function p(){var y=s(),T=u(gst);if(T){if(_(),!u(Est))return o("property missing ':'");var M=u(yst),L=y({type:Mst,property:T5(T[0].replace(g5,Yc)),value:M?T5(M[0].replace(g5,Yc)):Yc});return u(Tst),L}}function g(){var y=[];d(y);for(var T;T=p();)T!==!1&&(y.push(T),d(y));return y}return c(),g()};function T5(e){return e?e.replace(vst,Yc):Yc}var xst=bt&&bt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iee,"__esModule",{value:!0});var Ast=xst(Lst);function wst(e,t){var n=null;if(!e||typeof e!="string")return n;var r=(0,Ast.default)(e),a=typeof t=="function";return r.forEach(function(s){if(s.type==="declaration"){var i=s.property,o=s.value;a?t(i,o,s):o&&(n=n||{},n[i]=o)}}),n}var v5=iee.default=wst;const Ost=v5.default||v5,Ov=oee("end"),Fo=oee("start");function oee(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Dst(e){const t=Fo(e),n=Ov(e);if(t&&n)return{start:t,end:n}}function th(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?b5(e.position):"start"in e||"end"in e?b5(e):"line"in e||"column"in e?GN(e):""}function GN(e){return S5(e&&e.line)+":"+S5(e&&e.column)}function b5(e){return GN(e&&e.start)+"-"+GN(e&&e.end)}function S5(e){return e&&typeof e=="number"?e:1}class sa extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",s={},i=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?a=t:!s.cause&&t&&(i=!0,a=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const u=r.indexOf(":");u===-1?s.ruleId=r:(s.source=r.slice(0,u),s.ruleId=r.slice(u+1))}if(!s.place&&s.ancestors&&s.ancestors){const u=s.ancestors[s.ancestors.length-1];u&&(s.place=u.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file,this.message=a,this.line=o?o.line:void 0,this.name=th(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=i&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual,this.expected,this.note,this.url}}sa.prototype.file="";sa.prototype.name="";sa.prototype.reason="";sa.prototype.message="";sa.prototype.stack="";sa.prototype.column=void 0;sa.prototype.line=void 0;sa.prototype.ancestors=void 0;sa.prototype.cause=void 0;sa.prototype.fatal=void 0;sa.prototype.place=void 0;sa.prototype.ruleId=void 0;sa.prototype.source=void 0;const V2={}.hasOwnProperty,kst=new Map,Nst=/[A-Z]/g,Cst=/-([a-z])/g,Rst=new Set(["table","tbody","thead","tfoot","tr"]),Ist=new Set(["td","th"]),lee="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Pst(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Wst(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=$st(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?tc:qg,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=uee(a,e,void 0);return s&&typeof s!="string"?s:a.create(e,a.Fragment,{children:s||void 0},void 0)}function uee(e,t,n){if(t.type==="element")return Yst(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fst(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Hst(e,t,n);if(t.type==="mdxjsEsm")return Ust(e,t);if(t.type==="root")return jst(e,t,n);if(t.type==="text")return Bst(e,t)}function Yst(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=tc,e.schema=a),e.ancestors.push(t);const s=dee(e,t.tagName,!1),i=Gst(e,t);let o=K2(e,t);return Rst.has(t.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!sst(u):!0})),cee(e,i,s,t),q2(i,o),e.ancestors.pop(),e.schema=r,e.create(t,s,i,n)}function Fst(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}cg(e,t.position)}function Ust(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cg(e,t.position)}function Hst(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=tc,e.schema=a),e.ancestors.push(t);const s=t.name===null?e.Fragment:dee(e,t.name,!0),i=zst(e,t),o=K2(e,t);return cee(e,i,s,t),q2(i,o),e.ancestors.pop(),e.schema=r,e.create(t,s,i,n)}function jst(e,t,n){const r={};return q2(r,K2(e,t)),e.create(t,e.Fragment,r,n)}function Bst(e,t){return t.value}function cee(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function q2(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $st(e,t,n){return r;function r(a,s,i,o){const c=Array.isArray(i.children)?n:t;return o?c(s,i,o):c(s,i)}}function Wst(e,t){return n;function n(r,a,s,i){const o=Array.isArray(s.children),u=Fo(r);return t(a,s,i,o,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function Gst(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&V2.call(t.properties,a)){const s=Vst(e,a,t.properties[a]);if(s){const[i,o]=s;e.tableCellAlignToStyle&&i==="align"&&typeof o=="string"&&Ist.has(t.tagName)?r=o:n[i]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function zst(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const i=s.expression;i.type;const o=i.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else cg(e,t.position);else{const a=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else cg(e,t.position);else s=r.value===null?!0:r.value;n[a]=s}return n}function K2(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:kst;for(;++ra?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)i=Array.from(r),i.unshift(t,n),e.splice(...i);else for(n&&e.splice(t,n);s0?(Yl(e,e.length,0,t),e):t}const x5={}.hasOwnProperty;function nit(e){const t={};let n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function rm(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const po=nc(/[A-Za-z]/),ys=nc(/[\dA-Za-z]/),sit=nc(/[#-'*+\--9=?A-Z^-~]/);function zN(e){return e!==null&&(e<32||e===127)}const VN=nc(/\d/),iit=nc(/[\dA-Fa-f]/),oit=nc(/[!-/:-@[-`{-~]/);function kt(e){return e!==null&&e<-2}function Va(e){return e!==null&&(e<0||e===32)}function un(e){return e===-2||e===-1||e===32}const lit=nc(new RegExp("\\p{P}|\\p{S}","u")),uit=nc(/\s/);function nc(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function t_(e){const t=[];let n=-1,r=0,a=0;for(;++n55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(i=String.fromCharCode(s,o),a=1):i="�"}else i=String.fromCharCode(s);i&&(t.push(e.slice(r,n),encodeURIComponent(i)),r=n+a+1,i=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Sn(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let s=0;return i;function i(u){return un(u)?(e.enter(n),o(u)):t(u)}function o(u){return un(u)&&s++i))return;const I=t.events.length;let Y=I,H,U;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){if(H){U=t.events[Y][1].end;break}H=!0}for(L(r),k=I;kb;){const N=n[w];t.containerState=N[1],N[0].exit.call(t,e)}n.length=b}function v(){a.write([null]),s=void 0,a=void 0,t.containerState._closeFlow=void 0}}function _it(e,t,n){return Sn(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function w5(e){if(e===null||Va(e)||uit(e))return 1;if(lit(e))return 2}function X2(e,t,n){const r=[];let a=-1;for(;++a1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const _=Object.assign({},e[r][1].end),p=Object.assign({},e[n][1].start);O5(_,-u),O5(p,u),i={type:u>1?"strongSequence":"emphasisSequence",start:_,end:Object.assign({},e[r][1].end)},o={type:u>1?"strongSequence":"emphasisSequence",start:Object.assign({},e[n][1].start),end:p},s={type:u>1?"strongText":"emphasisText",start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},a={type:u>1?"strong":"emphasis",start:Object.assign({},i.start),end:Object.assign({},o.end)},e[r][1].end=Object.assign({},i.start),e[n][1].start=Object.assign({},o.end),c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Xs(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Xs(c,[["enter",a,t],["enter",i,t],["exit",i,t],["enter",s,t]]),c=Xs(c,X2(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Xs(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=Xs(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,Yl(e,r-1,n-r+3,c),n=r+c.length-d-2;break}}for(n=-1;++n0&&un(k)?Sn(e,v,"linePrefix",s+1)(k):v(k)}function v(k){return k===null||kt(k)?e.check(D5,T,w)(k):(e.enter("codeFlowValue"),b(k))}function b(k){return k===null||kt(k)?(e.exit("codeFlowValue"),v(k)):(e.consume(k),b)}function w(k){return e.exit("codeFenced"),t(k)}function N(k,I,Y){let H=0;return U;function U(te){return k.enter("lineEnding"),k.consume(te),k.exit("lineEnding"),j}function j(te){return k.enter("codeFencedFence"),un(te)?Sn(k,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):W(te)}function W(te){return te===o?(k.enter("codeFencedFenceSequence"),z(te)):Y(te)}function z(te){return te===o?(H++,k.consume(te),z):H>=i?(k.exit("codeFencedFenceSequence"),un(te)?Sn(k,Q,"whitespace")(te):Q(te)):Y(te)}function Q(te){return te===null||kt(te)?(k.exit("codeFencedFence"),I(te)):Y(te)}}}function xit(e,t,n){const r=this;return a;function a(i){return i===null?n(i):(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s)}function s(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}const LD={name:"codeIndented",tokenize:wit},Ait={tokenize:Oit,partial:!0};function wit(e,t,n){const r=this;return a;function a(c){return e.enter("codeIndented"),Sn(e,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?i(c):n(c)}function i(c){return c===null?u(c):kt(c)?e.attempt(Ait,i,u)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||kt(c)?(e.exit("codeFlowValue"),i(c)):(e.consume(c),o)}function u(c){return e.exit("codeIndented"),t(c)}}function Oit(e,t,n){const r=this;return a;function a(i){return r.parser.lazy[r.now().line]?n(i):kt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),a):Sn(e,s,"linePrefix",5)(i)}function s(i){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(i):kt(i)?a(i):n(i)}}const Dit={name:"codeText",tokenize:Cit,resolve:kit,previous:Nit};function kit(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return tthis.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&bp(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),bp(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),bp(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Eee(e,t,n,r,a,s,i,o,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return _;function _(L){return L===60?(e.enter(r),e.enter(a),e.enter(s),e.consume(L),e.exit(s),p):L===null||L===32||L===41||zN(L)?n(L):(e.enter(r),e.enter(i),e.enter(o),e.enter("chunkString",{contentType:"string"}),T(L))}function p(L){return L===62?(e.enter(s),e.consume(L),e.exit(s),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),g(L))}function g(L){return L===62?(e.exit("chunkString"),e.exit(o),p(L)):L===null||L===60||kt(L)?n(L):(e.consume(L),L===92?y:g)}function y(L){return L===60||L===62||L===92?(e.consume(L),g):g(L)}function T(L){return!d&&(L===null||L===41||Va(L))?(e.exit("chunkString"),e.exit(o),e.exit(i),e.exit(r),t(L)):d999||g===null||g===91||g===93&&!u||g===94&&!o&&"_hiddenFootnoteSupport"in i.parser.constructs?n(g):g===93?(e.exit(s),e.enter(a),e.consume(g),e.exit(a),e.exit(r),t):kt(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),_(g))}function _(g){return g===null||g===91||g===93||kt(g)||o++>999?(e.exit("chunkString"),d(g)):(e.consume(g),u||(u=!un(g)),g===92?p:_)}function p(g){return g===91||g===92||g===93?(e.consume(g),o++,_):_(g)}}function Tee(e,t,n,r,a,s){let i;return o;function o(p){return p===34||p===39||p===40?(e.enter(r),e.enter(a),e.consume(p),e.exit(a),i=p===40?41:p,u):n(p)}function u(p){return p===i?(e.enter(a),e.consume(p),e.exit(a),e.exit(r),t):(e.enter(s),c(p))}function c(p){return p===i?(e.exit(s),u(i)):p===null?n(p):kt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Sn(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===i||p===null||kt(p)?(e.exit("chunkString"),c(p)):(e.consume(p),p===92?_:d)}function _(p){return p===i||p===92?(e.consume(p),d):d(p)}}function nh(e,t){let n;return r;function r(a){return kt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):un(a)?Sn(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const jit={name:"definition",tokenize:$it},Bit={tokenize:Wit,partial:!0};function $it(e,t,n){const r=this;let a;return s;function s(g){return e.enter("definition"),i(g)}function i(g){return yee.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function o(g){return a=rm(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),u):n(g)}function u(g){return Va(g)?nh(e,c)(g):c(g)}function c(g){return Eee(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function d(g){return e.attempt(Bit,_,_)(g)}function _(g){return un(g)?Sn(e,p,"whitespace")(g):p(g)}function p(g){return g===null||kt(g)?(e.exit("definition"),r.parser.defined.push(a),t(g)):n(g)}}function Wit(e,t,n){return r;function r(o){return Va(o)?nh(e,a)(o):n(o)}function a(o){return Tee(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return un(o)?Sn(e,i,"whitespace")(o):i(o)}function i(o){return o===null||kt(o)?t(o):n(o)}}const Git={name:"hardBreakEscape",tokenize:zit};function zit(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),a}function a(s){return kt(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const Vit={name:"headingAtx",tokenize:Kit,resolve:qit};function qit(e,t){let n=e.length-2,r=3,a,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Yl(e,r,n-r+1,[["enter",a,t],["enter",s,t],["exit",s,t],["exit",a,t]])),e}function Kit(e,t,n){let r=0;return a;function a(d){return e.enter("atxHeading"),s(d)}function s(d){return e.enter("atxHeadingSequence"),i(d)}function i(d){return d===35&&r++<6?(e.consume(d),i):d===null||Va(d)?(e.exit("atxHeadingSequence"),o(d)):n(d)}function o(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||kt(d)?(e.exit("atxHeading"),t(d)):un(d)?Sn(e,o,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),o(d))}function c(d){return d===null||d===35||Va(d)?(e.exit("atxHeadingText"),o(d)):(e.consume(d),c)}}const Jit=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],N5=["pre","script","style","textarea"],Xit={name:"htmlFlow",tokenize:tot,resolveTo:eot,concrete:!0},Zit={tokenize:rot,partial:!0},Qit={tokenize:not,partial:!0};function eot(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function tot(e,t,n){const r=this;let a,s,i,o,u;return c;function c(B){return d(B)}function d(B){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(B),_}function _(B){return B===33?(e.consume(B),p):B===47?(e.consume(B),s=!0,T):B===63?(e.consume(B),a=3,r.interrupt?t:$):po(B)?(e.consume(B),i=String.fromCharCode(B),M):n(B)}function p(B){return B===45?(e.consume(B),a=2,g):B===91?(e.consume(B),a=5,o=0,y):po(B)?(e.consume(B),a=4,r.interrupt?t:$):n(B)}function g(B){return B===45?(e.consume(B),r.interrupt?t:$):n(B)}function y(B){const ue="CDATA[";return B===ue.charCodeAt(o++)?(e.consume(B),o===ue.length?r.interrupt?t:W:y):n(B)}function T(B){return po(B)?(e.consume(B),i=String.fromCharCode(B),M):n(B)}function M(B){if(B===null||B===47||B===62||Va(B)){const ue=B===47,oe=i.toLowerCase();return!ue&&!s&&N5.includes(oe)?(a=1,r.interrupt?t(B):W(B)):Jit.includes(i.toLowerCase())?(a=6,ue?(e.consume(B),L):r.interrupt?t(B):W(B)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(B):s?v(B):b(B))}return B===45||ys(B)?(e.consume(B),i+=String.fromCharCode(B),M):n(B)}function L(B){return B===62?(e.consume(B),r.interrupt?t:W):n(B)}function v(B){return un(B)?(e.consume(B),v):U(B)}function b(B){return B===47?(e.consume(B),U):B===58||B===95||po(B)?(e.consume(B),w):un(B)?(e.consume(B),b):U(B)}function w(B){return B===45||B===46||B===58||B===95||ys(B)?(e.consume(B),w):N(B)}function N(B){return B===61?(e.consume(B),k):un(B)?(e.consume(B),N):b(B)}function k(B){return B===null||B===60||B===61||B===62||B===96?n(B):B===34||B===39?(e.consume(B),u=B,I):un(B)?(e.consume(B),k):Y(B)}function I(B){return B===u?(e.consume(B),u=null,H):B===null||kt(B)?n(B):(e.consume(B),I)}function Y(B){return B===null||B===34||B===39||B===47||B===60||B===61||B===62||B===96||Va(B)?N(B):(e.consume(B),Y)}function H(B){return B===47||B===62||un(B)?b(B):n(B)}function U(B){return B===62?(e.consume(B),j):n(B)}function j(B){return B===null||kt(B)?W(B):un(B)?(e.consume(B),j):n(B)}function W(B){return B===45&&a===2?(e.consume(B),fe):B===60&&a===1?(e.consume(B),he):B===62&&a===4?(e.consume(B),X):B===63&&a===3?(e.consume(B),$):B===93&&a===5?(e.consume(B),q):kt(B)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(Zit,ce,z)(B)):B===null||kt(B)?(e.exit("htmlFlowData"),z(B)):(e.consume(B),W)}function z(B){return e.check(Qit,Q,ce)(B)}function Q(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),te}function te(B){return B===null||kt(B)?z(B):(e.enter("htmlFlowData"),W(B))}function fe(B){return B===45?(e.consume(B),$):W(B)}function he(B){return B===47?(e.consume(B),i="",K):W(B)}function K(B){if(B===62){const ue=i.toLowerCase();return N5.includes(ue)?(e.consume(B),X):W(B)}return po(B)&&i.length<8?(e.consume(B),i+=String.fromCharCode(B),K):W(B)}function q(B){return B===93?(e.consume(B),$):W(B)}function $(B){return B===62?(e.consume(B),X):B===45&&a===2?(e.consume(B),$):W(B)}function X(B){return B===null||kt(B)?(e.exit("htmlFlowData"),ce(B)):(e.consume(B),X)}function ce(B){return e.exit("htmlFlow"),t(B)}}function not(e,t,n){const r=this;return a;function a(i){return kt(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),s):n(i)}function s(i){return r.parser.lazy[r.now().line]?n(i):t(i)}}function rot(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(Dv,t,n)}}const aot={name:"htmlText",tokenize:sot};function sot(e,t,n){const r=this;let a,s,i;return o;function o($){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume($),u}function u($){return $===33?(e.consume($),c):$===47?(e.consume($),N):$===63?(e.consume($),b):po($)?(e.consume($),Y):n($)}function c($){return $===45?(e.consume($),d):$===91?(e.consume($),s=0,y):po($)?(e.consume($),v):n($)}function d($){return $===45?(e.consume($),g):n($)}function _($){return $===null?n($):$===45?(e.consume($),p):kt($)?(i=_,he($)):(e.consume($),_)}function p($){return $===45?(e.consume($),g):_($)}function g($){return $===62?fe($):$===45?p($):_($)}function y($){const X="CDATA[";return $===X.charCodeAt(s++)?(e.consume($),s===X.length?T:y):n($)}function T($){return $===null?n($):$===93?(e.consume($),M):kt($)?(i=T,he($)):(e.consume($),T)}function M($){return $===93?(e.consume($),L):T($)}function L($){return $===62?fe($):$===93?(e.consume($),L):T($)}function v($){return $===null||$===62?fe($):kt($)?(i=v,he($)):(e.consume($),v)}function b($){return $===null?n($):$===63?(e.consume($),w):kt($)?(i=b,he($)):(e.consume($),b)}function w($){return $===62?fe($):b($)}function N($){return po($)?(e.consume($),k):n($)}function k($){return $===45||ys($)?(e.consume($),k):I($)}function I($){return kt($)?(i=I,he($)):un($)?(e.consume($),I):fe($)}function Y($){return $===45||ys($)?(e.consume($),Y):$===47||$===62||Va($)?H($):n($)}function H($){return $===47?(e.consume($),fe):$===58||$===95||po($)?(e.consume($),U):kt($)?(i=H,he($)):un($)?(e.consume($),H):fe($)}function U($){return $===45||$===46||$===58||$===95||ys($)?(e.consume($),U):j($)}function j($){return $===61?(e.consume($),W):kt($)?(i=j,he($)):un($)?(e.consume($),j):H($)}function W($){return $===null||$===60||$===61||$===62||$===96?n($):$===34||$===39?(e.consume($),a=$,z):kt($)?(i=W,he($)):un($)?(e.consume($),W):(e.consume($),Q)}function z($){return $===a?(e.consume($),a=void 0,te):$===null?n($):kt($)?(i=z,he($)):(e.consume($),z)}function Q($){return $===null||$===34||$===39||$===60||$===61||$===96?n($):$===47||$===62||Va($)?H($):(e.consume($),Q)}function te($){return $===47||$===62||Va($)?H($):n($)}function fe($){return $===62?(e.consume($),e.exit("htmlTextData"),e.exit("htmlText"),t):n($)}function he($){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),K}function K($){return un($)?Sn(e,q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):q($)}function q($){return e.enter("htmlTextData"),i($)}}const Z2={name:"labelEnd",tokenize:dot,resolveTo:cot,resolveAll:uot},iot={tokenize:fot},oot={tokenize:mot},lot={tokenize:_ot};function uot(e){let t=-1;for(;++t=3&&(c===null||kt(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===a?(e.consume(c),r++,u):(e.exit("thematicBreakSequence"),un(c)?Sn(e,o,"whitespace")(c):o(c))}}const Ra={name:"list",tokenize:Sot,continuation:{tokenize:Mot},exit:xot},vot={tokenize:Aot,partial:!0},bot={tokenize:Lot,partial:!0};function Sot(e,t,n){const r=this,a=r.events[r.events.length-1];let s=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,i=0;return o;function o(g){const y=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:VN(g)){if(r.containerState.type||(r.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),g===42||g===45?e.check(cE,n,c)(g):c(g);if(!r.interrupt||g===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(g)}return n(g)}function u(g){return VN(g)&&++i<10?(e.consume(g),u):(!r.interrupt||i<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(e.exit("listItemValue"),c(g)):n(g)}function c(g){return e.enter("listItemMarker"),e.consume(g),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,e.check(Dv,r.interrupt?n:d,e.attempt(vot,p,_))}function d(g){return r.containerState.initialBlankLine=!0,s++,p(g)}function _(g){return un(g)?(e.enter("listItemPrefixWhitespace"),e.consume(g),e.exit("listItemPrefixWhitespace"),p):n(g)}function p(g){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(g)}}function Mot(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Dv,a,s);function a(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Sn(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!un(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,i(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bot,t,i)(o))}function i(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Sn(e,e.attempt(Ra,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Lot(e,t,n){const r=this;return Sn(e,a,"listItemIndent",r.containerState.size+1);function a(s){const i=r.events[r.events.length-1];return i&&i[1].type==="listItemIndent"&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(s):n(s)}}function xot(e){e.exit(this.containerState.type)}function Aot(e,t,n){const r=this;return Sn(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(s){const i=r.events[r.events.length-1];return!un(s)&&i&&i[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const C5={name:"setextUnderline",tokenize:Oot,resolveTo:wot};function wot(e,t){let n=e.length,r,a,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const i={type:"setextHeading",start:Object.assign({},e[a][1].start),end:Object.assign({},e[e.length-1][1].end)};return e[a][1].type="setextHeadingText",s?(e.splice(a,0,["enter",i,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end=Object.assign({},e[s][1].end)):e[r][1]=i,e.push(["exit",i,t]),e}function Oot(e,t,n){const r=this;let a;return s;function s(c){let d=r.events.length,_;for(;d--;)if(r.events[d][1].type!=="lineEnding"&&r.events[d][1].type!=="linePrefix"&&r.events[d][1].type!=="content"){_=r.events[d][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||_)?(e.enter("setextHeadingLine"),a=c,i(c)):n(c)}function i(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===a?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),un(c)?Sn(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||kt(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Dot={tokenize:kot};function kot(e){const t=this,n=e.attempt(Dv,r,e.attempt(this.parser.constructs.flowInitial,a,Sn(e,e.attempt(this.parser.constructs.flow,a,e.attempt(Pit,a)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Not={resolveAll:bee()},Cot=vee("string"),Rot=vee("text");function vee(e){return{tokenize:t,resolveAll:bee(e==="text"?Iot:void 0)};function t(n){const r=this,a=this.parser.constructs[e],s=n.attempt(a,i,o);return i;function i(d){return c(d)?s(d):o(d)}function o(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),s(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const _=a[d];let p=-1;if(_)for(;++p<_.length;){const g=_[p];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function bee(e){return t;function t(n,r){let a=-1,s;for(;++a<=n.length;)s===void 0?n[a]&&n[a][1].type==="data"&&(s=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==s+2&&(n[s][1].end=n[a-1][1].end,n.splice(s+2,a-s-2),a=s+2),s=void 0);return e?e(n,r):n}}function Iot(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let s=a.length,i=-1,o=0,u;for(;s--;){const c=a[s];if(typeof c=="string"){for(i=c.length;c.charCodeAt(i-1)===32;)o++,i--;if(i)break;i=-1}else if(c===-2)u=!0,o++;else if(c!==-1){s++;break}}if(o){const c={type:n===e.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{line:r.end.line,column:r.end.column-o,offset:r.end.offset-o,_index:r.start._index+s,_bufferIndex:s?i:r.start._bufferIndex+i},end:Object.assign({},r.end)};r.end=Object.assign({},c.start),r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}function Pot(e,t,n){let r=Object.assign(n?Object.assign({},n):{line:1,column:1,offset:0},{_index:0,_bufferIndex:-1});const a={},s=[];let i=[],o=[];const u={consume:v,enter:b,exit:w,attempt:I(N),check:I(k),interrupt:I(k,{interrupt:!0})},c={previous:null,code:null,containerState:{},events:[],parser:e,sliceStream:g,sliceSerialize:p,now:y,defineSkip:T,write:_};let d=t.tokenize.call(c,u);return t.resolveAll&&s.push(t),c;function _(j){return i=Xs(i,j),M(),i[i.length-1]!==null?[]:(Y(t,0),c.events=X2(s,c.events,c),c.events)}function p(j,W){return Fot(g(j),W)}function g(j){return Yot(i,j)}function y(){const{line:j,column:W,offset:z,_index:Q,_bufferIndex:te}=r;return{line:j,column:W,offset:z,_index:Q,_bufferIndex:te}}function T(j){a[j.line]=j.column,U()}function M(){let j;for(;r._index-1){const o=i[0];typeof o=="string"?i[0]=o.slice(r):i.shift()}s>0&&i.push(e[a].slice(0,s))}return i}function Fot(e,t){let n=-1;const r=[];let a;for(;++n - +