diff --git a/README.md b/README.md index 2e4afbf3..8fb5c694 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ ![GitHub stars](https://img.shields.io/github/stars/nomic-ai/GPT4All-ui) ![GitHub forks](https://img.shields.io/github/forks/nomic-ai/GPT4All-ui) [![Discord](https://img.shields.io/discord/1092918764925882418?color=7289da&label=Discord&logo=discord&logoColor=ffffff)](https://discord.gg/4rR282WJb6) +[![Twitter Follow](https://img.shields.io/twitter/follow/SpaceNerduino?style=social)](https://twitter.com/SpaceNerduino) This is a Flask web application that provides a chat UI for interacting with [llamacpp](https://github.com/ggerganov/llama.cpp), gpt-j, gpt-q as well as Hugging face based language models uch as [GPT4all](https://github.com/nomic-ai/gpt4all), vicuna etc... @@ -195,7 +196,7 @@ On Linux/MacOS more details can be found [here](docs/Linux_Osx_Usage.md) * `--top-p`: the cumulative probability threshold for top-p sampling (default: 0.90) * `--repeat-penalty`: the penalty to apply for repeated n-grams (default: 1.3) * `--repeat-last-n`: the number of tokens to use for detecting repeated n-grams (default: 64) -* `--ctx-size`: the maximum context size to use for generating responses (default: 2048) +* `--ctx-size`: the maximum context size to use for generating responses (default: 512) Note: All options are optional and have default values. diff --git a/app.py b/app.py index 926e0b20..482c59da 100644 --- a/app.py +++ b/app.py @@ -203,7 +203,83 @@ class Gpt4AllWebUI(GPT4AllAPI): tpe = threading.Thread(target=self.parse_to_prompt_stream, args=(message, message_id)) tpe.start() + # Settings (data: {"setting_name":,"setting_value":}) + @socketio.on('update_setting') + def update_setting(data): + setting_name = int(data['setting_name']) + if setting_name== "temperature": + self.config["temperature"]=float(data['setting_value']) + elif setting_name== "top_k": + self.config["top_k"]=int(data['setting_value']) + elif setting_name== "top_p": + self.config["top_p"]=float(data['setting_value']) + + elif setting_name== "n_predict": + self.config["n_predict"]=int(data['setting_value']) + elif setting_name== "n_threads": + self.config["n_threads"]=int(data['setting_value']) + elif setting_name== "ctx_size": + self.config["ctx_size"]=int(data['setting_value']) + elif setting_name== "repeat_penalty": + self.config["repeat_penalty"]=float(data['setting_value']) + elif setting_name== "repeat_last_n": + self.config["repeat_last_n"]=int(data['setting_value']) + + + elif setting_name== "language": + self.config["language"]=data['setting_value'] + + elif setting_name== "personality_language": + self.config["personality_language"]=data['setting_value'] + elif setting_name== "personality_category": + self.config["personality_category"]=data['setting_value'] + elif setting_name== "personality": + self.config["personality"]=data['setting_value'] + + + + elif setting_name== "model": + self.config["model"]=data['setting_value'] + print("New model selected") + # Build chatbot + self.chatbot_bindings = self.create_chatbot() + + elif setting_name== "backend": + print("New backend selected") + if self.config['backend']!= data['setting_value']: + print("New backend selected") + self.config["backend"]=data['setting_value'] + + backend_ =self.load_backend(self.BACKENDS_LIST[self.config["backend"]]) + models = backend_.list_models(self.config) + if len(models)>0: + self.backend = backend_ + self.config['model'] = models[0] + # Build chatbot + self.chatbot_bindings = self.create_chatbot() + self.socketio.emit('update_setting', {'setting_name': data['setting_name'], "status":True}); + return + else: + self.socketio.emit('update_setting', {'setting_name': data['setting_name'], "status":False}); + return + + + + else: + self.socketio.emit('update_setting', {'setting_name': data['setting_name'], "status":False}); + return + + # Tell that the setting was changed + self.socketio.emit('update_setting', {'setting_name': data['setting_name'], "status":True}); + + + # Settings (data: {"setting_name":,"setting_value":}) + @socketio.on('save_settings') + def save_settings(data): + save_config(self.config, self.config_file_path) + # Tell that the setting was changed + self.socketio.emit('save_settings', {"status":True}); def list_backends(self): @@ -501,7 +577,7 @@ class Gpt4AllWebUI(GPT4AllAPI): self.config['voice'] = str(data["voice"]) self.config['language'] = str(data["language"]) - self.config['temp'] = float(data["temp"]) + self.config['temperature'] = float(data["temperature"]) self.config['top_k'] = int(data["topK"]) self.config['top_p'] = float(data["topP"]) self.config['repeat_penalty'] = float(data["repeatPenalty"]) @@ -518,7 +594,7 @@ class Gpt4AllWebUI(GPT4AllAPI): print(f"\tPersonality:{self.config['personality']}") print(f"\tLanguage:{self.config['language']}") print(f"\tVoice:{self.config['voice']}") - print(f"\tTemperature:{self.config['temp']}") + print(f"\tTemperature:{self.config['temperature']}") print(f"\tNPredict:{self.config['n_predict']}") print(f"\tSeed:{self.config['seed']}") print(f"\top_k:{self.config['top_k']}") @@ -621,14 +697,25 @@ if __name__ == "__main__": # The default configuration must be kept unchanged as it is committed to the repository, # so we have to make a copy that is not comitted + default_config = load_config(f"configs/default.yaml") + if args.config=="default": args.config = "local_default" if not Path(f"configs/local_default.yaml").exists(): print("No local configuration file found. Building from scratch") shutil.copy(f"configs/default.yaml", f"configs/local_default.yaml") + config_file_path = f"configs/{args.config}.yaml" config = load_config(config_file_path) + if "version" not in config or int(config["version"])
- - + +
diff --git a/web/dist/assets/index-ffda5761.js b/web/dist/assets/index-ffda5761.js index b7f221f2..8f07d239 100644 --- a/web/dist/assets/index-ffda5761.js +++ b/web/dist/assets/index-ffda5761.js @@ -8,4 +8,4 @@ http://jedwatson.github.io/classnames */(function(){var a=function(){function l(){}l.prototype=Object.create(null);function c(b,v){for(var x=v.length,_=0;_1?arguments[1]:void 0,v=b!==void 0,x=0,_=d(y),C,L,B,I;if(v&&(b=s(b,w>2?arguments[2]:void 0,2)),_!=null&&!(g==Array&&l(_)))for(I=_.call(y),L=new g;!(B=I.next()).done;x++)u(L,x,v?a(I,b,[B.value,x],!0):B.value);else for(C=c(y.length),L=new g(C);C>x;x++)u(L,x,v?b(y[x],x):y[x]);return L.length=x,L}},"./node_modules/core-js/internals/array-includes.js":function(n,r,i){var s=i("./node_modules/core-js/internals/to-indexed-object.js"),o=i("./node_modules/core-js/internals/to-length.js"),a=i("./node_modules/core-js/internals/to-absolute-index.js");n.exports=function(l){return function(c,u,d){var f=s(c),p=o(f.length),y=a(d,p),g;if(l&&u!=u){for(;p>y;)if(g=f[y++],g!=g)return!0}else for(;p>y;y++)if((l||y in f)&&f[y]===u)return l||y||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(n,r,i){var s=i("./node_modules/core-js/internals/a-function.js");n.exports=function(o,a,l){if(s(o),a===void 0)return o;switch(l){case 0:return function(){return o.call(a)};case 1:return function(c){return o.call(a,c)};case 2:return function(c,u){return o.call(a,c,u)};case 3:return function(c,u,d){return o.call(a,c,u,d)}}return function(){return o.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(n,r,i){var s=i("./node_modules/core-js/internals/an-object.js");n.exports=function(o,a,l,c){try{return c?a(s(l)[0],l[1]):a(l)}catch(d){var u=o.return;throw u!==void 0&&s(u.call(o)),d}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(n,r,i){var s=i("./node_modules/core-js/internals/well-known-symbol.js"),o=s("iterator"),a=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){a=!0}};c[o]=function(){return this},Array.from(c,function(){throw 2})}catch{}n.exports=function(u,d){if(!d&&!a)return!1;var f=!1;try{var p={};p[o]=function(){return{next:function(){return{done:f=!0}}}},u(p)}catch{}return f}},"./node_modules/core-js/internals/classof-raw.js":function(n,r){var i={}.toString;n.exports=function(s){return i.call(s).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(n,r,i){var s=i("./node_modules/core-js/internals/classof-raw.js"),o=i("./node_modules/core-js/internals/well-known-symbol.js"),a=o("toStringTag"),l=s(function(){return arguments}())=="Arguments",c=function(u,d){try{return u[d]}catch{}};n.exports=function(u){var d,f,p;return u===void 0?"Undefined":u===null?"Null":typeof(f=c(d=Object(u),a))=="string"?f:l?s(d):(p=s(d))=="Object"&&typeof d.callee=="function"?"Arguments":p}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(n,r,i){var s=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/own-keys.js"),a=i("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=i("./node_modules/core-js/internals/object-define-property.js");n.exports=function(c,u){for(var d=o(u),f=l.f,p=a.f,y=0;y",C="java"+x+":",L;for(w.style.display="none",c.appendChild(w),w.src=String(C),L=w.contentWindow.document,L.open(),L.write(v+x+_+"document.F=Object"+v+"/"+x+_),L.close(),g=L.F;b--;)delete g[p][a[b]];return g()};n.exports=Object.create||function(b,v){var x;return b!==null?(y[p]=s(b),x=new y,y[p]=null,x[f]=b):x=g(),v===void 0?x:o(x,v)},l[f]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(n,r,i){var s=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/object-define-property.js"),a=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/object-keys.js");n.exports=s?Object.defineProperties:function(u,d){a(u);for(var f=l(d),p=f.length,y=0,g;p>y;)o.f(u,g=f[y++],d[g]);return u}},"./node_modules/core-js/internals/object-define-property.js":function(n,r,i){var s=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/ie8-dom-define.js"),a=i("./node_modules/core-js/internals/an-object.js"),l=i("./node_modules/core-js/internals/to-primitive.js"),c=Object.defineProperty;r.f=s?c:function(d,f,p){if(a(d),f=l(f,!0),a(p),o)try{return c(d,f,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(d[f]=p.value),d}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(n,r,i){var s=i("./node_modules/core-js/internals/descriptors.js"),o=i("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=i("./node_modules/core-js/internals/create-property-descriptor.js"),l=i("./node_modules/core-js/internals/to-indexed-object.js"),c=i("./node_modules/core-js/internals/to-primitive.js"),u=i("./node_modules/core-js/internals/has.js"),d=i("./node_modules/core-js/internals/ie8-dom-define.js"),f=Object.getOwnPropertyDescriptor;r.f=s?f:function(y,g){if(y=l(y),g=c(g,!0),d)try{return f(y,g)}catch{}if(u(y,g))return a(!o.f.call(y,g),y[g])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(n,r,i){var s=i("./node_modules/core-js/internals/object-keys-internal.js"),o=i("./node_modules/core-js/internals/enum-bug-keys.js"),a=o.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(c){return s(c,a)}},"./node_modules/core-js/internals/object-get-own-property-symbols.js":function(n,r){r.f=Object.getOwnPropertySymbols},"./node_modules/core-js/internals/object-get-prototype-of.js":function(n,r,i){var s=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/to-object.js"),a=i("./node_modules/core-js/internals/shared-key.js"),l=i("./node_modules/core-js/internals/correct-prototype-getter.js"),c=a("IE_PROTO"),u=Object.prototype;n.exports=l?Object.getPrototypeOf:function(d){return d=o(d),s(d,c)?d[c]:typeof d.constructor=="function"&&d instanceof d.constructor?d.constructor.prototype:d instanceof Object?u:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(n,r,i){var s=i("./node_modules/core-js/internals/has.js"),o=i("./node_modules/core-js/internals/to-indexed-object.js"),a=i("./node_modules/core-js/internals/array-includes.js"),l=i("./node_modules/core-js/internals/hidden-keys.js"),c=a(!1);n.exports=function(u,d){var f=o(u),p=0,y=[],g;for(g in f)!s(l,g)&&s(f,g)&&y.push(g);for(;d.length>p;)s(f,g=d[p++])&&(~c(y,g)||y.push(g));return y}},"./node_modules/core-js/internals/object-keys.js":function(n,r,i){var s=i("./node_modules/core-js/internals/object-keys-internal.js"),o=i("./node_modules/core-js/internals/enum-bug-keys.js");n.exports=Object.keys||function(l){return s(l,o)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(n,r,i){var s={}.propertyIsEnumerable,o=Object.getOwnPropertyDescriptor,a=o&&!s.call({1:2},1);r.f=a?function(c){var u=o(this,c);return!!u&&u.enumerable}:s},"./node_modules/core-js/internals/object-set-prototype-of.js":function(n,r,i){var s=i("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var o=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),o=a instanceof Array}catch{}return function(u,d){return s(u,d),o?l.call(u,d):u.__proto__=d,u}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(n,r,i){var s=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/object-get-own-property-names.js"),a=i("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=i("./node_modules/core-js/internals/an-object.js"),c=s.Reflect;n.exports=c&&c.ownKeys||function(d){var f=o.f(l(d)),p=a.f;return p?f.concat(p(d)):f}},"./node_modules/core-js/internals/path.js":function(n,r,i){n.exports=i("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(n,r,i){var s=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/shared.js"),a=i("./node_modules/core-js/internals/hide.js"),l=i("./node_modules/core-js/internals/has.js"),c=i("./node_modules/core-js/internals/set-global.js"),u=i("./node_modules/core-js/internals/function-to-string.js"),d=i("./node_modules/core-js/internals/internal-state.js"),f=d.get,p=d.enforce,y=String(u).split("toString");o("inspectSource",function(g){return u.call(g)}),(n.exports=function(g,w,b,v){var x=v?!!v.unsafe:!1,_=v?!!v.enumerable:!1,C=v?!!v.noTargetGet:!1;if(typeof b=="function"&&(typeof w=="string"&&!l(b,"name")&&a(b,"name",w),p(b).source=y.join(typeof w=="string"?w:"")),g===s){_?g[w]=b:c(w,b);return}else x?!C&&g[w]&&(_=!0):delete g[w];_?g[w]=b:a(g,w,b)})(Function.prototype,"toString",function(){return typeof this=="function"&&f(this).source||u.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(n,r){n.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},"./node_modules/core-js/internals/set-global.js":function(n,r,i){var s=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/hide.js");n.exports=function(a,l){try{o(s,a,l)}catch{s[a]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(n,r,i){var s=i("./node_modules/core-js/internals/object-define-property.js").f,o=i("./node_modules/core-js/internals/has.js"),a=i("./node_modules/core-js/internals/well-known-symbol.js"),l=a("toStringTag");n.exports=function(c,u,d){c&&!o(c=d?c:c.prototype,l)&&s(c,l,{configurable:!0,value:u})}},"./node_modules/core-js/internals/shared-key.js":function(n,r,i){var s=i("./node_modules/core-js/internals/shared.js"),o=i("./node_modules/core-js/internals/uid.js"),a=s("keys");n.exports=function(l){return a[l]||(a[l]=o(l))}},"./node_modules/core-js/internals/shared.js":function(n,r,i){var s=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/set-global.js"),a=i("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",c=s[l]||o(l,{});(n.exports=function(u,d){return c[u]||(c[u]=d!==void 0?d:{})})("versions",[]).push({version:"3.1.3",mode:a?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"./node_modules/core-js/internals/string-at.js":function(n,r,i){var s=i("./node_modules/core-js/internals/to-integer.js"),o=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a,l,c){var u=String(o(a)),d=s(l),f=u.length,p,y;return d<0||d>=f?c?"":void 0:(p=u.charCodeAt(d),p<55296||p>56319||d+1===f||(y=u.charCodeAt(d+1))<56320||y>57343?c?u.charAt(d):p:c?u.slice(d,d+2):(p-55296<<10)+(y-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(n,r,i){var s=i("./node_modules/core-js/internals/to-integer.js"),o=Math.max,a=Math.min;n.exports=function(l,c){var u=s(l);return u<0?o(u+c,0):a(u,c)}},"./node_modules/core-js/internals/to-indexed-object.js":function(n,r,i){var s=i("./node_modules/core-js/internals/indexed-object.js"),o=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a){return s(o(a))}},"./node_modules/core-js/internals/to-integer.js":function(n,r){var i=Math.ceil,s=Math.floor;n.exports=function(o){return isNaN(o=+o)?0:(o>0?s:i)(o)}},"./node_modules/core-js/internals/to-length.js":function(n,r,i){var s=i("./node_modules/core-js/internals/to-integer.js"),o=Math.min;n.exports=function(a){return a>0?o(s(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(n,r,i){var s=i("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(o){return Object(s(o))}},"./node_modules/core-js/internals/to-primitive.js":function(n,r,i){var s=i("./node_modules/core-js/internals/is-object.js");n.exports=function(o,a){if(!s(o))return o;var l,c;if(a&&typeof(l=o.toString)=="function"&&!s(c=l.call(o))||typeof(l=o.valueOf)=="function"&&!s(c=l.call(o))||!a&&typeof(l=o.toString)=="function"&&!s(c=l.call(o)))return c;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(n,r){var i=0,s=Math.random();n.exports=function(o){return"Symbol(".concat(o===void 0?"":o,")_",(++i+s).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(n,r,i){var s=i("./node_modules/core-js/internals/is-object.js"),o=i("./node_modules/core-js/internals/an-object.js");n.exports=function(a,l){if(o(a),!s(l)&&l!==null)throw TypeError("Can't set "+String(l)+" as a prototype")}},"./node_modules/core-js/internals/well-known-symbol.js":function(n,r,i){var s=i("./node_modules/core-js/internals/global.js"),o=i("./node_modules/core-js/internals/shared.js"),a=i("./node_modules/core-js/internals/uid.js"),l=i("./node_modules/core-js/internals/native-symbol.js"),c=s.Symbol,u=o("wks");n.exports=function(d){return u[d]||(u[d]=l&&c[d]||(l?c:a)("Symbol."+d))}},"./node_modules/core-js/modules/es.array.from.js":function(n,r,i){var s=i("./node_modules/core-js/internals/export.js"),o=i("./node_modules/core-js/internals/array-from.js"),a=i("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!a(function(c){Array.from(c)});s({target:"Array",stat:!0,forced:l},{from:o})},"./node_modules/core-js/modules/es.string.iterator.js":function(n,r,i){var s=i("./node_modules/core-js/internals/string-at.js"),o=i("./node_modules/core-js/internals/internal-state.js"),a=i("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",c=o.set,u=o.getterFor(l);a(String,"String",function(d){c(this,{type:l,string:String(d),index:0})},function(){var f=u(this),p=f.string,y=f.index,g;return y>=p.length?{value:void 0,done:!0}:(g=s(p,y,!0),f.index+=g.length,{value:g,done:!1})})},"./node_modules/webpack/buildin/global.js":function(n,r){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(i=window)}n.exports=i},"./src/default-attrs.json":function(n){n.exports={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"}},"./src/icon.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(g){for(var w=1;w2&&arguments[2]!==void 0?arguments[2]:[];f(this,g),this.name=w,this.contents=b,this.tags=v,this.attrs=s({},u.default,{class:"feather feather-"+w})}return o(g,[{key:"toSvg",value:function(){var b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},v=s({},this.attrs,b,{class:(0,l.default)(this.attrs.class,b.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),g}();function y(g){return Object.keys(g).map(function(w){return w+'="'+g[w]+'"'}).join(" ")}r.default=p},"./src/icons.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i("./src/icon.js"),o=d(s),a=i("./dist/icons.json"),l=d(a),c=i("./src/tags.json"),u=d(c);function d(f){return f&&f.__esModule?f:{default:f}}r.default=Object.keys(l.default).map(function(f){return new o.default(f,l.default[f],u.default[f])}).reduce(function(f,p){return f[p.name]=p,f},{})},"./src/index.js":function(n,r,i){var s=i("./src/icons.js"),o=d(s),a=i("./src/to-svg.js"),l=d(a),c=i("./src/replace.js"),u=d(c);function d(f){return f&&f.__esModule?f:{default:f}}n.exports={icons:o.default,toSvg:l.default,replace:u.default}},"./src/replace.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=Object.assign||function(y){for(var g=1;g0&&arguments[0]!==void 0?arguments[0]:{};if(typeof document>"u")throw new Error("`feather.replace()` only works in a browser environment.");var g=document.querySelectorAll("[data-feather]");Array.from(g).forEach(function(w){return f(w,y)})}function f(y){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},w=p(y),b=w["data-feather"];delete w["data-feather"];var v=c.default[b].toSvg(s({},g,w,{class:(0,a.default)(g.class,w.class)})),x=new DOMParser().parseFromString(v,"image/svg+xml"),_=x.querySelector("svg");y.parentNode.replaceChild(_,y)}function p(y){return Array.from(y.attributes).reduce(function(g,w){return g[w.name]=w.value,g},{})}r.default=d},"./src/tags.json":function(n){n.exports={activity:["pulse","health","action","motion"],airplay:["stream","cast","mirroring"],"alert-circle":["warning","alert","danger"],"alert-octagon":["warning","alert","danger"],"alert-triangle":["warning","alert","danger"],"align-center":["text alignment","center"],"align-justify":["text alignment","justified"],"align-left":["text alignment","left"],"align-right":["text alignment","right"],anchor:[],archive:["index","box"],"at-sign":["mention","at","email","message"],award:["achievement","badge"],aperture:["camera","photo"],"bar-chart":["statistics","diagram","graph"],"bar-chart-2":["statistics","diagram","graph"],battery:["power","electricity"],"battery-charging":["power","electricity"],bell:["alarm","notification","sound"],"bell-off":["alarm","notification","silent"],bluetooth:["wireless"],"book-open":["read","library"],book:["read","dictionary","booklet","magazine","library"],bookmark:["read","clip","marker","tag"],box:["cube"],briefcase:["work","bag","baggage","folder"],calendar:["date"],camera:["photo"],cast:["chromecast","airplay"],"chevron-down":["expand"],"chevron-up":["collapse"],circle:["off","zero","record"],clipboard:["copy"],clock:["time","watch","alarm"],"cloud-drizzle":["weather","shower"],"cloud-lightning":["weather","bolt"],"cloud-rain":["weather"],"cloud-snow":["weather","blizzard"],cloud:["weather"],codepen:["logo"],codesandbox:["logo"],code:["source","programming"],coffee:["drink","cup","mug","tea","cafe","hot","beverage"],columns:["layout"],command:["keyboard","cmd","terminal","prompt"],compass:["navigation","safari","travel","direction"],copy:["clone","duplicate"],"corner-down-left":["arrow","return"],"corner-down-right":["arrow"],"corner-left-down":["arrow"],"corner-left-up":["arrow"],"corner-right-down":["arrow"],"corner-right-up":["arrow"],"corner-up-left":["arrow"],"corner-up-right":["arrow"],cpu:["processor","technology"],"credit-card":["purchase","payment","cc"],crop:["photo","image"],crosshair:["aim","target"],database:["storage","memory"],delete:["remove"],disc:["album","cd","dvd","music"],"dollar-sign":["currency","money","payment"],droplet:["water"],edit:["pencil","change"],"edit-2":["pencil","change"],"edit-3":["pencil","change"],eye:["view","watch"],"eye-off":["view","watch","hide","hidden"],"external-link":["outbound"],facebook:["logo","social"],"fast-forward":["music"],figma:["logo","design","tool"],"file-minus":["delete","remove","erase"],"file-plus":["add","create","new"],"file-text":["data","txt","pdf"],film:["movie","video"],filter:["funnel","hopper"],flag:["report"],"folder-minus":["directory"],"folder-plus":["directory"],folder:["directory"],framer:["logo","design","tool"],frown:["emoji","face","bad","sad","emotion"],gift:["present","box","birthday","party"],"git-branch":["code","version control"],"git-commit":["code","version control"],"git-merge":["code","version control"],"git-pull-request":["code","version control"],github:["logo","version control"],gitlab:["logo","version control"],globe:["world","browser","language","translate"],"hard-drive":["computer","server","memory","data"],hash:["hashtag","number","pound"],headphones:["music","audio","sound"],heart:["like","love","emotion"],"help-circle":["question mark"],hexagon:["shape","node.js","logo"],home:["house","living"],image:["picture"],inbox:["email"],instagram:["logo","camera"],key:["password","login","authentication","secure"],layers:["stack"],layout:["window","webpage"],"life-bouy":["help","life ring","support"],link:["chain","url"],"link-2":["chain","url"],linkedin:["logo","social media"],list:["options"],lock:["security","password","secure"],"log-in":["sign in","arrow","enter"],"log-out":["sign out","arrow","exit"],mail:["email","message"],"map-pin":["location","navigation","travel","marker"],map:["location","navigation","travel"],maximize:["fullscreen"],"maximize-2":["fullscreen","arrows","expand"],meh:["emoji","face","neutral","emotion"],menu:["bars","navigation","hamburger"],"message-circle":["comment","chat"],"message-square":["comment","chat"],"mic-off":["record","sound","mute"],mic:["record","sound","listen"],minimize:["exit fullscreen","close"],"minimize-2":["exit fullscreen","arrows","close"],minus:["subtract"],monitor:["tv","screen","display"],moon:["dark","night"],"more-horizontal":["ellipsis"],"more-vertical":["ellipsis"],"mouse-pointer":["arrow","cursor"],move:["arrows"],music:["note"],navigation:["location","travel"],"navigation-2":["location","travel"],octagon:["stop"],package:["box","container"],paperclip:["attachment"],pause:["music","stop"],"pause-circle":["music","audio","stop"],"pen-tool":["vector","drawing"],percent:["discount"],"phone-call":["ring"],"phone-forwarded":["call"],"phone-incoming":["call"],"phone-missed":["call"],"phone-off":["call","mute"],"phone-outgoing":["call"],phone:["call"],play:["music","start"],"pie-chart":["statistics","diagram"],"play-circle":["music","start"],plus:["add","new"],"plus-circle":["add","new"],"plus-square":["add","new"],pocket:["logo","save"],power:["on","off"],printer:["fax","office","device"],radio:["signal"],"refresh-cw":["synchronise","arrows"],"refresh-ccw":["arrows"],repeat:["loop","arrows"],rewind:["music"],"rotate-ccw":["arrow"],"rotate-cw":["arrow"],rss:["feed","subscribe"],save:["floppy disk"],scissors:["cut"],search:["find","magnifier","magnifying glass"],send:["message","mail","email","paper airplane","paper aeroplane"],settings:["cog","edit","gear","preferences"],"share-2":["network","connections"],shield:["security","secure"],"shield-off":["security","insecure"],"shopping-bag":["ecommerce","cart","purchase","store"],"shopping-cart":["ecommerce","cart","purchase","store"],shuffle:["music"],"skip-back":["music"],"skip-forward":["music"],slack:["logo"],slash:["ban","no"],sliders:["settings","controls"],smartphone:["cellphone","device"],smile:["emoji","face","happy","good","emotion"],speaker:["audio","music"],star:["bookmark","favorite","like"],"stop-circle":["media","music"],sun:["brightness","weather","light"],sunrise:["weather","time","morning","day"],sunset:["weather","time","evening","night"],tablet:["device"],tag:["label"],target:["logo","bullseye"],terminal:["code","command line","prompt"],thermometer:["temperature","celsius","fahrenheit","weather"],"thumbs-down":["dislike","bad","emotion"],"thumbs-up":["like","good","emotion"],"toggle-left":["on","off","switch"],"toggle-right":["on","off","switch"],tool:["settings","spanner"],trash:["garbage","delete","remove","bin"],"trash-2":["garbage","delete","remove","bin"],triangle:["delta"],truck:["delivery","van","shipping","transport","lorry"],tv:["television","stream"],twitch:["logo"],twitter:["logo","social"],type:["text"],umbrella:["rain","weather"],unlock:["security"],"user-check":["followed","subscribed"],"user-minus":["delete","remove","unfollow","unsubscribe"],"user-plus":["new","add","create","follow","subscribe"],"user-x":["delete","remove","unfollow","unsubscribe","unavailable"],user:["person","account"],users:["group"],"video-off":["camera","movie","film"],video:["camera","movie","film"],voicemail:["phone"],volume:["music","sound","mute"],"volume-1":["music","sound"],"volume-2":["music","sound"],"volume-x":["music","sound","mute"],watch:["clock","time"],"wifi-off":["disabled"],wifi:["connection","signal","wireless"],wind:["weather","air"],"x-circle":["cancel","close","delete","remove","times","clear"],"x-octagon":["delete","stop","alert","warning","times","clear"],"x-square":["cancel","close","delete","remove","times","clear"],x:["cancel","close","delete","remove","times","clear"],youtube:["logo","video","play"],"zap-off":["flash","camera","lightning"],zap:["flash","camera","lightning"],"zoom-in":["magnifying glass"],"zoom-out":["magnifying glass"]}},"./src/to-svg.js":function(n,r,i){Object.defineProperty(r,"__esModule",{value:!0});var s=i("./src/icons.js"),o=a(s);function a(c){return c&&c.__esModule?c:{default:c}}function l(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(console.warn("feather.toSvg() is deprecated. Please use feather.icons[name].toSvg() instead."),!c)throw new Error("The required `key` (icon name) parameter is missing.");if(!o.default[c])throw new Error("No icon matching '"+c+"'. See the complete list of icons at https://feathericons.com");return o.default[c].toSvg(u)}r.default=l},0:function(n,r,i){i("./node_modules/core-js/es/array/from.js"),n.exports=i("./src/index.js")}})})})($h);const kn=zh(as),Vh={class:"container flex flex-col sm:flex-row item-center gap-2 py-1"},Uh={class:"items-center justify-between hidden w-full md:flex md:w-auto md:order-1"},Kh={class:"flex flex-col font-medium p-4 md:p-0 mt-4 md:flex-row md:space-x-8 md:mt-0"},Wh=E("a",{href:"#",class:"hover:text-primary duration-150"},"Discussions",-1),qh=E("a",{href:"#",class:"hover:text-primary duration-150"},"Settings",-1),Yh=E("a",{href:"#",class:"hover:text-primary duration-150"},"Extensions",-1),Gh=E("a",{href:"#",class:"hover:text-primary duration-150"},"Training",-1),Jh=E("a",{href:"#",class:"hover:text-primary duration-150"},"Help",-1),Ul={__name:"Navigation",setup(e){return(t,n)=>(X(),ie("div",Vh,[E("div",Uh,[E("ul",Kh,[E("li",null,[xe($e(Qt),{to:{name:"discussions"},"active-class":" bg-bg-light-tone dark:bg-bg-dark-tone p-2 px-4 rounded-t-lg "},{default:Ht(()=>[Wh]),_:1})]),E("li",null,[xe($e(Qt),{to:{name:"settings"},"active-class":" bg-bg-light-tone dark:bg-bg-dark-tone p-2 px-4 rounded-t-lg "},{default:Ht(()=>[qh]),_:1})]),E("li",null,[xe($e(Qt),{to:{name:"extensions"},"active-class":" bg-bg-light-tone dark:bg-bg-dark-tone p-2 px-4 rounded-t-lg "},{default:Ht(()=>[Yh]),_:1})]),E("li",null,[xe($e(Qt),{to:{name:"training"},"active-class":" bg-bg-light-tone dark:bg-bg-dark-tone p-2 px-4 rounded-t-lg "},{default:Ht(()=>[Gh]),_:1})]),E("li",null,[xe($e(Qt),{to:{name:"help"},"active-class":" bg-bg-light-tone dark:bg-bg-dark-tone p-2 px-4 rounded-t-lg "},{default:Ht(()=>[Jh]),_:1})])])])]))}},Xh={class:"top-0 shadow-lg"},Qh={class:"container flex flex-col lg:flex-row item-center gap-2 py-2"},Zh=E("div",{class:"flex items-center gap-3 flex-1"},[E("img",{class:"w-12 hover:scale-95 duration-150",title:"GPT4ALL-UI",src:Vl,alt:"Logo"}),E("p",{class:"text-2xl"},"GPT4ALL-UI")],-1),ep={class:"flex gap-3 flex-1 items-center justify-end"},tp=E("a",{href:"https://github.com/nomic-ai/gpt4all-ui",target:"_blank"},[E("div",{class:"text-2xl hover:text-primary duration-150",title:"Visit repository page"},[E("i",{"data-feather":"github"})])],-1),np=E("i",{"data-feather":"sun"},null,-1),rp=[np],ip=E("i",{"data-feather":"moon"},null,-1),sp=[ip],op=E("body",null,null,-1),ap={name:"TopBar",data(){return{sunIcon:document.querySelector(".sun"),moonIcon:document.querySelector(".moon"),userTheme:localStorage.getItem("theme"),systemTheme:window.matchMedia("prefers-color-scheme: dark").matches}},mounted(){this.sunIcon=document.querySelector(".sun"),this.moonIcon=document.querySelector(".moon"),this.userTheme=localStorage.getItem("theme"),this.systemTheme=window.matchMedia("prefers-color-scheme: dark").matches,this.themeCheck(),it(()=>{kn.replace()})},created(){this.sunIcon=document.querySelector(".sun"),this.moonIcon=document.querySelector(".moon"),this.userTheme=localStorage.getItem("theme"),this.systemTheme=window.matchMedia("prefers-color-scheme: dark").matches},methods:{themeCheck(){if(this.userTheme=="dark"||!this.userTheme&&this.systemTheme){document.documentElement.classList.add("dark"),this.moonIcon.classList.add("display-none");return}this.sunIcon.classList.add("display-none")},themeSwitch(){if(document.documentElement.classList.contains("dark")){document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"),this.iconToggle();return}document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark"),this.iconToggle()},iconToggle(){this.sunIcon.classList.toggle("display-none"),this.moonIcon.classList.toggle("display-none")}},components:{Navigation:Ul}},lp=Object.assign(ap,{setup(e){return(t,n)=>(X(),ie(Oe,null,[E("header",Xh,[E("nav",Qh,[xe($e(Qt),{to:{name:"discussions"}},{default:Ht(()=>[Zh]),_:1}),E("div",ep,[tp,E("div",{class:"sun text-2xl w-6 hover:text-primary duration-150",title:"Swith to Light theme",onClick:n[0]||(n[0]=r=>t.themeSwitch())},rp),E("div",{class:"moon text-2xl w-6 hover:text-primary duration-150",title:"Swith to Dark theme",onClick:n[1]||(n[1]=r=>t.themeSwitch())},sp)])]),xe(Ul)]),op],64))}}),Ct=(e,t)=>{const n=e.__vccOpts||e;for(const[r,i]of t)n[r]=i;return n},cp={class:"flex flex-col h-screen max-h-screen font-sans bg-bg-light text-slate-950 dark:bg-bg-dark dark:text-slate-50"},up={class:"flex overflow-hidden flex-grow"},dp={__name:"App",setup(e){return(t,n)=>(X(),ie("div",cp,[xe(lp),E("div",up,[xe($e($l),null,{default:Ht(({Component:r})=>[(X(),sn(wd,null,[(X(),sn(Rd(r)))],1024))]),_:1})])]))}},fp={setup(){return{}}};function hp(e,t,n,r,i,s){return X(),ie("div",null," Extensions ")}const pp=Ct(fp,[["render",hp]]),yp={setup(){return{}}};function gp(e,t,n,r,i,s){return X(),ie("div",null," Help ")}const mp=Ct(yp,[["render",gp]]);function Kl(e,t){return function(){return e.apply(t,arguments)}}const{toString:vp}=Object.prototype,{getPrototypeOf:Vs}=Object,_i=(e=>t=>{const n=vp.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Rt=e=>(e=e.toLowerCase(),t=>_i(t)===e),Ei=e=>t=>typeof t===e,{isArray:In}=Array,ar=Ei("undefined");function xp(e){return e!==null&&!ar(e)&&e.constructor!==null&&!ar(e.constructor)&&kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Wl=Rt("ArrayBuffer");function bp(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Wl(e.buffer),t}const wp=Ei("string"),kt=Ei("function"),ql=Ei("number"),Us=e=>e!==null&&typeof e=="object",_p=e=>e===!0||e===!1,Ir=e=>{if(_i(e)!=="object")return!1;const t=Vs(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ep=Rt("Date"),jp=Rt("File"),Ap=Rt("Blob"),Op=Rt("FileList"),kp=e=>Us(e)&&kt(e.pipe),Tp=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||kt(e.append)&&((t=_i(e))==="formdata"||t==="object"&&kt(e.toString)&&e.toString()==="[object FormData]"))},Sp=Rt("URLSearchParams"),Cp=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function fr(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,i;if(typeof e!="object"&&(e=[e]),In(e))for(r=0,i=e.length;r0;)if(i=n[r],t===i.toLowerCase())return i;return null}const Gl=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Jl=e=>!ar(e)&&e!==Gl;function ls(){const{caseless:e}=Jl(this)&&this||{},t={},n=(r,i)=>{const s=e&&Yl(t,i)||i;Ir(t[s])&&Ir(r)?t[s]=ls(t[s],r):Ir(r)?t[s]=ls({},r):In(r)?t[s]=r.slice():t[s]=r};for(let r=0,i=arguments.length;r(fr(t,(i,s)=>{n&&kt(i)?e[s]=Kl(i,n):e[s]=i},{allOwnKeys:r}),e),Pp=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Mp=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Lp=(e,t,n,r)=>{let i,s,o;const a={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)o=i[s],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&Vs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Ip=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},Np=e=>{if(!e)return null;if(In(e))return e;let t=e.length;if(!ql(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Bp=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Vs(Uint8Array)),Dp=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let i;for(;(i=r.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},Fp=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Hp=Rt("HTMLFormElement"),zp=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,i){return r.toUpperCase()+i}),ta=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),$p=Rt("RegExp"),Xl=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};fr(n,(i,s)=>{t(i,s,e)!==!1&&(r[s]=i)}),Object.defineProperties(e,r)},Vp=e=>{Xl(e,(t,n)=>{if(kt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(kt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Up=(e,t)=>{const n={},r=i=>{i.forEach(s=>{n[s]=!0})};return In(e)?r(e):r(String(e).split(t)),n},Kp=()=>{},Wp=(e,t)=>(e=+e,Number.isFinite(e)?e:t),Hi="abcdefghijklmnopqrstuvwxyz",na="0123456789",Ql={DIGIT:na,ALPHA:Hi,ALPHA_DIGIT:Hi+Hi.toUpperCase()+na},qp=(e=16,t=Ql.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function Yp(e){return!!(e&&kt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Gp=e=>{const t=new Array(10),n=(r,i)=>{if(Us(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[i]=r;const s=In(r)?[]:{};return fr(r,(o,a)=>{const l=n(o,i+1);!ar(l)&&(s[a]=l)}),t[i]=void 0,s}}return r};return n(e,0)},k={isArray:In,isArrayBuffer:Wl,isBuffer:xp,isFormData:Tp,isArrayBufferView:bp,isString:wp,isNumber:ql,isBoolean:_p,isObject:Us,isPlainObject:Ir,isUndefined:ar,isDate:Ep,isFile:jp,isBlob:Ap,isRegExp:$p,isFunction:kt,isStream:kp,isURLSearchParams:Sp,isTypedArray:Bp,isFileList:Op,forEach:fr,merge:ls,extend:Rp,trim:Cp,stripBOM:Pp,inherits:Mp,toFlatObject:Lp,kindOf:_i,kindOfTest:Rt,endsWith:Ip,toArray:Np,forEachEntry:Dp,matchAll:Fp,isHTMLForm:Hp,hasOwnProperty:ta,hasOwnProp:ta,reduceDescriptors:Xl,freezeMethods:Vp,toObjectSet:Up,toCamelCase:zp,noop:Kp,toFiniteNumber:Wp,findKey:Yl,global:Gl,isContextDefined:Jl,ALPHABET:Ql,generateString:qp,isSpecCompliantForm:Yp,toJSONObject:Gp};function oe(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}k.inherits(oe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:k.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Zl=oe.prototype,ec={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ec[e]={value:e}});Object.defineProperties(oe,ec);Object.defineProperty(Zl,"isAxiosError",{value:!0});oe.from=(e,t,n,r,i,s)=>{const o=Object.create(Zl);return k.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),oe.call(o,e.message,t,n,r,i),o.cause=e,o.name=e.name,s&&Object.assign(o,s),o};const Jp=null;function cs(e){return k.isPlainObject(e)||k.isArray(e)}function tc(e){return k.endsWith(e,"[]")?e.slice(0,-2):e}function ra(e,t,n){return e?e.concat(t).map(function(i,s){return i=tc(i),!n&&s?"["+i+"]":i}).join(n?".":""):t}function Xp(e){return k.isArray(e)&&!e.some(cs)}const Qp=k.toFlatObject(k,{},null,function(t){return/^is[A-Z]/.test(t)});function ji(e,t,n){if(!k.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=k.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,w){return!k.isUndefined(w[g])});const r=n.metaTokens,i=n.visitor||u,s=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&k.isSpecCompliantForm(t);if(!k.isFunction(i))throw new TypeError("visitor must be a function");function c(y){if(y===null)return"";if(k.isDate(y))return y.toISOString();if(!l&&k.isBlob(y))throw new oe("Blob is not supported. Use a Buffer instead.");return k.isArrayBuffer(y)||k.isTypedArray(y)?l&&typeof Blob=="function"?new Blob([y]):Buffer.from(y):y}function u(y,g,w){let b=y;if(y&&!w&&typeof y=="object"){if(k.endsWith(g,"{}"))g=r?g:g.slice(0,-2),y=JSON.stringify(y);else if(k.isArray(y)&&Xp(y)||(k.isFileList(y)||k.endsWith(g,"[]"))&&(b=k.toArray(y)))return g=tc(g),b.forEach(function(x,_){!(k.isUndefined(x)||x===null)&&t.append(o===!0?ra([g],_,s):o===null?g:g+"[]",c(x))}),!1}return cs(y)?!0:(t.append(ra(w,g,s),c(y)),!1)}const d=[],f=Object.assign(Qp,{defaultVisitor:u,convertValue:c,isVisitable:cs});function p(y,g){if(!k.isUndefined(y)){if(d.indexOf(y)!==-1)throw Error("Circular reference detected in "+g.join("."));d.push(y),k.forEach(y,function(b,v){(!(k.isUndefined(b)||b===null)&&i.call(t,b,k.isString(v)?v.trim():v,g,f))===!0&&p(b,g?g.concat(v):[v])}),d.pop()}}if(!k.isObject(e))throw new TypeError("data must be an object");return p(e),t}function ia(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ks(e,t){this._pairs=[],e&&ji(e,this,t)}const nc=Ks.prototype;nc.append=function(t,n){this._pairs.push([t,n])};nc.toString=function(t){const n=t?function(r){return t.call(this,r,ia)}:ia;return this._pairs.map(function(i){return n(i[0])+"="+n(i[1])},"").join("&")};function Zp(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function rc(e,t,n){if(!t)return e;const r=n&&n.encode||Zp,i=n&&n.serialize;let s;if(i?s=i(t,n):s=k.isURLSearchParams(t)?t.toString():new Ks(t,n).toString(r),s){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class e1{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){k.forEach(this.handlers,function(r){r!==null&&t(r)})}}const sa=e1,ic={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},t1=typeof URLSearchParams<"u"?URLSearchParams:Ks,n1=typeof FormData<"u"?FormData:null,r1=typeof Blob<"u"?Blob:null,i1=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),s1=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),ft={isBrowser:!0,classes:{URLSearchParams:t1,FormData:n1,Blob:r1},isStandardBrowserEnv:i1,isStandardBrowserWebWorkerEnv:s1,protocols:["http","https","file","blob","url","data"]};function o1(e,t){return ji(e,new ft.classes.URLSearchParams,Object.assign({visitor:function(n,r,i,s){return ft.isNode&&k.isBuffer(n)?(this.append(r,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function a1(e){return k.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function l1(e){const t={},n=Object.keys(e);let r;const i=n.length;let s;for(r=0;r=n.length;return o=!o&&k.isArray(i)?i.length:o,l?(k.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!a):((!i[o]||!k.isObject(i[o]))&&(i[o]=[]),t(n,r,i[o],s)&&k.isArray(i[o])&&(i[o]=l1(i[o])),!a)}if(k.isFormData(e)&&k.isFunction(e.entries)){const n={};return k.forEachEntry(e,(r,i)=>{t(a1(r),i,n,0)}),n}return null}const c1={"Content-Type":void 0};function u1(e,t,n){if(k.isString(e))try{return(t||JSON.parse)(e),k.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ai={transitional:ic,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",i=r.indexOf("application/json")>-1,s=k.isObject(t);if(s&&k.isHTMLForm(t)&&(t=new FormData(t)),k.isFormData(t))return i&&i?JSON.stringify(sc(t)):t;if(k.isArrayBuffer(t)||k.isBuffer(t)||k.isStream(t)||k.isFile(t)||k.isBlob(t))return t;if(k.isArrayBufferView(t))return t.buffer;if(k.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(s){if(r.indexOf("application/x-www-form-urlencoded")>-1)return o1(t,this.formSerializer).toString();if((a=k.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return ji(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||i?(n.setContentType("application/json",!1),u1(t)):t}],transformResponse:[function(t){const n=this.transitional||Ai.transitional,r=n&&n.forcedJSONParsing,i=this.responseType==="json";if(t&&k.isString(t)&&(r&&!this.responseType||i)){const o=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?oe.from(a,oe.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ft.classes.FormData,Blob:ft.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};k.forEach(["delete","get","head"],function(t){Ai.headers[t]={}});k.forEach(["post","put","patch"],function(t){Ai.headers[t]=k.merge(c1)});const Ws=Ai,d1=k.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),f1=e=>{const t={};let n,r,i;return e&&e.split(` `).forEach(function(o){i=o.indexOf(":"),n=o.substring(0,i).trim().toLowerCase(),r=o.substring(i+1).trim(),!(!n||t[n]&&d1[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},oa=Symbol("internals");function Fn(e){return e&&String(e).trim().toLowerCase()}function Nr(e){return e===!1||e==null?e:k.isArray(e)?e.map(Nr):String(e)}function h1(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const p1=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function zi(e,t,n,r,i){if(k.isFunction(r))return r.call(this,t,n);if(i&&(t=n),!!k.isString(t)){if(k.isString(r))return t.indexOf(r)!==-1;if(k.isRegExp(r))return r.test(t)}}function y1(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function g1(e,t){const n=k.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(i,s,o){return this[r].call(this,t,i,s,o)},configurable:!0})})}class Oi{constructor(t){t&&this.set(t)}set(t,n,r){const i=this;function s(a,l,c){const u=Fn(l);if(!u)throw new Error("header name must be a non-empty string");const d=k.findKey(i,u);(!d||i[d]===void 0||c===!0||c===void 0&&i[d]!==!1)&&(i[d||l]=Nr(a))}const o=(a,l)=>k.forEach(a,(c,u)=>s(c,u,l));return k.isPlainObject(t)||t instanceof this.constructor?o(t,n):k.isString(t)&&(t=t.trim())&&!p1(t)?o(f1(t),n):t!=null&&s(n,t,r),this}get(t,n){if(t=Fn(t),t){const r=k.findKey(this,t);if(r){const i=this[r];if(!n)return i;if(n===!0)return h1(i);if(k.isFunction(n))return n.call(this,i,r);if(k.isRegExp(n))return n.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Fn(t),t){const r=k.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||zi(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let i=!1;function s(o){if(o=Fn(o),o){const a=k.findKey(r,o);a&&(!n||zi(r,r[a],a,n))&&(delete r[a],i=!0)}}return k.isArray(t)?t.forEach(s):s(t),i}clear(t){const n=Object.keys(this);let r=n.length,i=!1;for(;r--;){const s=n[r];(!t||zi(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const n=this,r={};return k.forEach(this,(i,s)=>{const o=k.findKey(r,s);if(o){n[o]=Nr(i),delete n[s];return}const a=t?y1(s):String(s).trim();a!==s&&delete n[s],n[a]=Nr(i),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return k.forEach(this,(r,i)=>{r!=null&&r!==!1&&(n[i]=t&&k.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[oa]=this[oa]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Fn(o);r[a]||(g1(i,o),r[a]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}}Oi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.freezeMethods(Oi.prototype);k.freezeMethods(Oi);const jt=Oi;function $i(e,t){const n=this||Ws,r=t||n,i=jt.from(r.headers);let s=r.data;return k.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function oc(e){return!!(e&&e.__CANCEL__)}function hr(e,t,n){oe.call(this,e??"canceled",oe.ERR_CANCELED,t,n),this.name="CanceledError"}k.inherits(hr,oe,{__CANCEL__:!0});function m1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new oe("Request failed with status code "+n.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const v1=ft.isStandardBrowserEnv?function(){return{write:function(n,r,i,s,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),k.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),k.isString(s)&&l.push("path="+s),k.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function x1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function b1(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function ac(e,t){return e&&!x1(t)?b1(e,t):t}const w1=ft.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=k.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function _1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function E1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,l=r(a),c=s<=o;n=s;const u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}const j1=typeof XMLHttpRequest<"u",A1=j1&&function(e){return new Promise(function(n,r){let i=e.data;const s=jt.from(e.headers).normalize(),o=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}k.isFormData(i)&&(ft.isStandardBrowserEnv||ft.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(p+":"+y))}const u=ac(e.baseURL,e.url);c.open(e.method.toUpperCase(),rc(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const p=jt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};m1(function(b){n(b),l()},function(b){r(b),l()},g),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new oe("Request aborted",oe.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ic;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new oe(y,g.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,c)),c=null},ft.isStandardBrowserEnv){const p=(e.withCredentials||w1(u))&&e.xsrfCookieName&&v1.read(e.xsrfCookieName);p&&s.set(e.xsrfHeaderName,p)}i===void 0&&s.setContentType(null),"setRequestHeader"in c&&k.forEach(s.toJSON(),function(y,g){c.setRequestHeader(g,y)}),k.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",aa(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",aa(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{c&&(r(!p||p.type?new hr(null,e,c):p),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=_1(u);if(f&&ft.protocols.indexOf(f)===-1){r(new oe("Unsupported protocol "+f+":",oe.ERR_BAD_REQUEST,e));return}c.send(i||null)})},Br={http:Jp,xhr:A1};k.forEach(Br,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const O1={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof jt?e.toJSON():e;function Tn(e,t){t=t||{};const n={};function r(c,u,d){return k.isPlainObject(c)&&k.isPlainObject(u)?k.merge.call({caseless:d},c,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function i(c,u,d){if(k.isUndefined(u)){if(!k.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function s(c,u){if(!k.isUndefined(u))return r(void 0,u)}function o(c,u){if(k.isUndefined(u)){if(!k.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u)=>i(ca(c),ca(u),!0)};return k.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=l[u]||i,f=d(e[u],t[u],u);k.isUndefined(f)&&d!==a||(n[u]=f)}),n}const lc="1.3.6",qs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ua={};qs.transitional=function(t,n,r){function i(s,o){return"[Axios v"+lc+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new oe(i(o," has been removed"+(n?" in "+n:"")),oe.ERR_DEPRECATED);return n&&!ua[o]&&(ua[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};function k1(e,t,n){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new oe("option "+s+" must be "+l,oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}}const us={assertOptions:k1,validators:qs},Lt=us.validators;class Xr{constructor(t){this.defaults=t,this.interceptors={request:new sa,response:new sa}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Tn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&us.assertOptions(r,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:us.assertOptions(i,{encode:Lt.function,serialize:Lt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=s&&k.merge(s.common,s[n.method]),o&&k.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=jt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const y=[la.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),f=y.length,u=Promise.resolve(n);d{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ys(function(i){t=i}),cancel:t}}}const T1=Ys;function S1(e){return function(n){return e.apply(null,n)}}function C1(e){return k.isObject(e)&&e.isAxiosError===!0}const ds={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ds).forEach(([e,t])=>{ds[t]=e});const R1=ds;function cc(e){const t=new Dr(e),n=Kl(Dr.prototype.request,t);return k.extend(n,Dr.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return cc(Tn(e,i))},n}const ke=cc(Ws);ke.Axios=Dr;ke.CanceledError=hr;ke.CancelToken=T1;ke.isCancel=oc;ke.VERSION=lc;ke.toFormData=ji;ke.AxiosError=oe;ke.Cancel=ke.CanceledError;ke.all=function(t){return Promise.all(t)};ke.spread=S1;ke.isAxiosError=C1;ke.mergeConfig=Tn;ke.AxiosHeaders=jt;ke.formToJSON=e=>sc(k.isHTMLForm(e)?new FormData(e):e);ke.HttpStatusCode=R1;ke.default=ke;const Zt=ke,P1={setup(){return{}},data(){return{backendsArr:[],modelsArr:[],persLangArr:[],persCatgArr:[],persArr:[],langArr:[],configFile:{}}},methods:{async api_get_req(e){try{const t=await Zt.get("/"+e);if(t)return t.data}catch(t){return console.log(t),[]}}},async mounted(){this.backendsArr=await this.api_get_req("list_backends"),this.modelsArr=await this.api_get_req("list_models"),this.persLangArr=await this.api_get_req("list_personalities_languages"),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities"),this.langArr=await this.api_get_req("list_languages"),this.configFile=await this.api_get_req("get_config")}},M1={class:"overflow-y-scroll flex flex-col no-scrollbar shadow-lg min-w-[29rem] max-w-[29rem] bg-bg-light-tone dark:bg-bg-dark-tone"},L1={class:"p-2"},I1={class:"m-2"},N1=E("label",{for:"backend",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Backend: ",-1),B1={id:"backend",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},D1={class:"m-2"},F1=E("label",{for:"model",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Model: ",-1),H1={id:"model",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},z1={class:"m-2"},$1=E("label",{for:"persLang",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Personalities Languages: ",-1),V1={id:"persLang",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},U1={class:"m-2"},K1=E("label",{for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Personalities Category: ",-1),W1={id:"persCat",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},q1={class:"m-2"},Y1=E("label",{for:"persona",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Persona: ",-1),G1={id:"persona",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},J1={class:"m-2"},X1=E("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1),Q1={class:"m-2"},Z1={class:"flex flex-col align-bottom"},e2={class:"relative"},t2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"temp",class:"text-sm font-medium"}," Temperature: ")],-1),n2={class:"absolute right-0"},r2={class:"m-2"},i2={class:"flex flex-col align-bottom"},s2={class:"relative"},o2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1),a2={class:"absolute right-0"},l2={class:"m-2"},c2={class:"flex flex-col align-bottom"},u2={class:"relative"},d2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1),f2={class:"absolute right-0"},h2={class:"m-2"},p2={class:"flex flex-col align-bottom"},y2={class:"relative"},g2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1),m2={class:"absolute right-0"},v2={class:"m-2"},x2={class:"flex flex-col align-bottom"},b2={class:"relative"},w2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1),_2={class:"absolute right-0"},E2={class:"m-2"},j2={class:"flex flex-col align-bottom"},A2={class:"relative"},O2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1),k2={class:"absolute right-0"};function T2(e,t,n,r,i,s){return X(),ie("div",M1,[E("div",L1,[E("div",I1,[N1,E("select",B1,[(X(!0),ie(Oe,null,Jt(i.backendsArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",D1,[F1,E("select",H1,[(X(!0),ie(Oe,null,Jt(i.modelsArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",z1,[$1,E("select",V1,[(X(!0),ie(Oe,null,Jt(i.persLangArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",U1,[K1,E("select",W1,[(X(!0),ie(Oe,null,Jt(i.persCatgArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",q1,[Y1,E("select",G1,[(X(!0),ie(Oe,null,Jt(i.persArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",J1,[X1,Ne(E("input",{type:"text",id:"seed","onUpdate:modelValue":t[0]||(t[0]=o=>i.configFile.seed=o),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.seed]])]),E("div",Q1,[E("div",Z1,[E("div",e2,[t2,E("p",n2,[Ne(E("input",{type:"text",id:"temp-val","onUpdate:modelValue":t[1]||(t[1]=o=>i.configFile.temp=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.temp]])])]),Ne(E("input",{id:"temp",type:"range","onUpdate:modelValue":t[2]||(t[2]=o=>i.configFile.temp=o),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.temp]])])]),E("div",r2,[E("div",i2,[E("div",s2,[o2,E("p",a2,[Ne(E("input",{type:"text",id:"predict-val","onUpdate:modelValue":t[3]||(t[3]=o=>i.configFile.n_predict=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.n_predict]])])]),Ne(E("input",{id:"predict",type:"range","onUpdate:modelValue":t[4]||(t[4]=o=>i.configFile.n_predict=o),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.n_predict]])])]),E("div",l2,[E("div",c2,[E("div",u2,[d2,E("p",f2,[Ne(E("input",{type:"text",id:"top_k-val","onUpdate:modelValue":t[5]||(t[5]=o=>i.configFile.top_k=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_k]])])]),Ne(E("input",{id:"top_k",type:"range","onUpdate:modelValue":t[6]||(t[6]=o=>i.configFile.top_k=o),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_k]])])]),E("div",h2,[E("div",p2,[E("div",y2,[g2,E("p",m2,[Ne(E("input",{type:"text",id:"top_p-val","onUpdate:modelValue":t[7]||(t[7]=o=>i.configFile.top_p=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_p]])])]),Ne(E("input",{id:"top_p",type:"range","onUpdate:modelValue":t[8]||(t[8]=o=>i.configFile.top_p=o),min:"0",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_p]])])]),E("div",v2,[E("div",x2,[E("div",b2,[w2,E("p",_2,[Ne(E("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":t[9]||(t[9]=o=>i.configFile.repeat_penalty=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_penalty]])])]),Ne(E("input",{id:"repeat_penalty",type:"range","onUpdate:modelValue":t[10]||(t[10]=o=>i.configFile.repeat_penalty=o),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_penalty]])])]),E("div",E2,[E("div",j2,[E("div",A2,[O2,E("p",k2,[Ne(E("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":t[11]||(t[11]=o=>i.configFile.repeat_last_n=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_last_n]])])]),Ne(E("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":t[12]||(t[12]=o=>i.configFile.repeat_last_n=o),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_last_n]])])])])])}const S2=Ct(P1,[["render",T2]]),C2={setup(){return{}}};function R2(e,t,n,r,i,s){return X(),ie("div",null," Training ")}const P2=Ct(C2,[["render",R2]]),M2={name:"Discussion",emits:["delete","select","editTitle"],props:{id:Number,title:String,selected:Boolean,loading:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,editTitle:!1,newTitle:String}},methods:{deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},chnageTitle(e){this.newTitle=e}},mounted(){this.newTitle=this.title,it(()=>{kn.replace()})},watch:{showConfirmation(){it(()=>{kn.replace()})},editTitleMode(e){this.showConfirmation=e,this.editTitle=e}}},L2=["id"],I2={key:1,class:"items-center inline-block min-h-full w-2 rounded-xl self-stretch"},N2=["title"],B2=["value"],D2={class:"flex items-center flex-1 max-h-6"},F2={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},H2=E("i",{"data-feather":"check"},null,-1),z2=[H2],$2=E("i",{"data-feather":"x"},null,-1),V2=[$2],U2={key:1,class:"flex gap-3 flex-1 items-center justify-end duration-75"},K2=E("i",{"data-feather":"x"},null,-1),W2=[K2],q2=E("i",{"data-feather":"check"},null,-1),Y2=[q2],G2={key:2,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},J2=E("i",{"data-feather":"edit-2"},null,-1),X2=[J2],Q2=E("i",{"data-feather":"trash"},null,-1),Z2=[Q2];function e0(e,t,n,r,i,s){return X(),ie("div",{class:_t([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md":"","container flex flex-col sm:flex-row item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:t[8]||(t[8]=xt(o=>s.selectEvent(),["stop"]))},[n.selected?(X(),ie("div",{key:0,class:_t(["items-center inline-block min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):qe("",!0),n.selected?qe("",!0):(X(),ie("div",I2)),i.editTitle?qe("",!0):(X(),ie("p",{key:2,title:n.title,class:"truncate w-full"},wt(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,N2)),i.editTitle?(X(),ie("input",{key:3,type:"text",id:"title-box",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onInput:t[0]||(t[0]=o=>s.chnageTitle(o.target.value)),onClick:t[1]||(t[1]=xt(()=>{},["stop"]))},null,40,B2)):qe("",!0),E("div",D2,[i.showConfirmation&&!i.editTitleMode?(X(),ie("div",F2,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[2]||(t[2]=xt(o=>s.deleteEvent(),["stop"]))},z2),E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[3]||(t[3]=xt(o=>i.showConfirmation=!1,["stop"]))},V2)])):qe("",!0),i.showConfirmation&&i.editTitleMode?(X(),ie("div",U2,[E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:t[4]||(t[4]=xt(o=>i.editTitleMode=!1,["stop"]))},W2),E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:t[5]||(t[5]=xt(o=>s.editTitleEvent(),["stop"]))},Y2)])):qe("",!0),i.showConfirmation?qe("",!0):(X(),ie("div",G2,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:t[6]||(t[6]=xt(o=>i.editTitleMode=!0,["stop"]))},X2),E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:t[7]||(t[7]=xt(o=>i.showConfirmation=!0,["stop"]))},Z2)]))])],10,L2)}const uc=Ct(M2,[["render",e0]]),t0={name:"Message",props:{message:Object},data(){return{senderImg:""}},mounted(){it(()=>{kn.replace()})}},n0={class:"group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex-row p-4 pb-2"},r0={class:"w-30 flex"},i0={class:"w-10 h-10 rounded-lg object-fill drop-shadow-md group-even:bg-primary bg-secondary"},s0=["src"],o0={class:"drop-shadow-sm py-0 px-2 text-lg text-opacity-95 font-bold"},a0={class:"-mt-4 ml-10 mr-0 pt-1 px-2 max-w-screen-2xl"},l0={class:"invisible group-hover:visible flex flex-row mt-3 -mb-2"},c0=Fs('
',5),u0={class:"flex flex-row items-center"},d0=E("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote"},[E("i",{"data-feather":"thumbs-down"})],-1);function f0(e,t,n,r,i,s){return X(),ie("div",n0,[E("div",r0,[E("div",i0,[i.senderImg?(X(),ie("img",{key:0,src:i.senderImg,class:"w-10 h-10 rounded-full object-fill"},null,8,s0)):qe("",!0)]),E("p",o0,wt(n.message.sender),1)]),E("div",a0,wt(n.message.content),1),E("div",l0,[c0,E("div",u0,[d0,n.message.rank!=0?(X(),ie("div",{key:0,class:_t(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},wt(n.message.rank),3)):qe("",!0)])])])}const dc=Ct(t0,[["render",f0]]),h0={name:"ChatBox",emits:["messageSentEvent"],setup(){return{}},methods:{sendMessageEvent(e){this.$emit("messageSentEvent",e)},submitOnEnter(e){e.which===13&&(e.preventDefault(),console.log("enter detected"),e.repeat||(this.sendMessageEvent(e.target.value),e.target.value=""))}},mounted(){it(()=>{kn.replace()})},activated(){}},p0={class:"flex-none sticky bottom-0 p-6 items-center justify-center self-center right-0 left-0"},y0=E("label",{for:"chat",class:"sr-only"},"Send message",-1),g0={class:"flex items-center gap-2 px-3 py-3 rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel shadow-lg"},m0=E("button",{type:"submit",on:"","on-click":"",class:"inline-flex justify-center p-2 rounded-full cursor-pointer hover:text-primary duration-75 active:scale-90"},[E("i",{"data-feather":"send",class:"w-6 h-6 m-1"}),E("span",{class:"sr-only"},"Send message")],-1);function v0(e,t,n,r,i,s){return X(),ie("div",p0,[E("form",null,[y0,E("div",g0,[E("textarea",{id:"chat",rows:"1",class:"block min-h-11 no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:t[0]||(t[0]=Lf(xt(o=>s.submitOnEnter(o),["exact"]),["enter"]))},null,32),m0])])])}const fc=Ct(h0,[["render",v0]]),x0={name:"WelcomeComponent",setup(){return{}}},b0={class:"flex flex-col text-center"},w0=Fs('
Logo

GPT4ALL-UI


Welcome, please create a new discussion or select existing one to start

',1),_0=[w0];function E0(e,t,n,r,i,s){return X(),ie("div",b0,_0)}const hc=Ct(x0,[["render",E0]]),gt=Object.create(null);gt.open="0";gt.close="1";gt.ping="2";gt.pong="3";gt.message="4";gt.upgrade="5";gt.noop="6";const Fr=Object.create(null);Object.keys(gt).forEach(e=>{Fr[gt[e]]=e});const j0={type:"error",data:"parser error"},A0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",O0=typeof ArrayBuffer=="function",k0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pc=({type:e,data:t},n,r)=>A0&&t instanceof Blob?n?r(t):da(t,r):O0&&(t instanceof ArrayBuffer||k0(t))?n?r(t):da(new Blob([t]),r):r(gt[e]+(t||"")),da=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Un=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},S0=typeof ArrayBuffer=="function",yc=(e,t)=>{if(typeof e!="string")return{type:"message",data:gc(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C0(e.substring(1),t)}:Fr[n]?e.length>1?{type:Fr[n],data:e.substring(1)}:{type:Fr[n]}:j0},C0=(e,t)=>{if(S0){const n=T0(e);return gc(n,t)}else return{base64:!0,data:e}},gc=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mc=String.fromCharCode(30),R0=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{pc(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mc))})})},P0=(e,t)=>{const n=e.split(mc),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function xc(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const L0=Ye.setTimeout,I0=Ye.clearTimeout;function ki(e,t){t.useNativeTimers?(e.setTimeoutFn=L0.bind(Ye),e.clearTimeoutFn=I0.bind(Ye)):(e.setTimeoutFn=Ye.setTimeout.bind(Ye),e.clearTimeoutFn=Ye.clearTimeout.bind(Ye))}const N0=1.33;function B0(e){return typeof e=="string"?D0(e):Math.ceil((e.byteLength||e.size)*N0)}function D0(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class F0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bc extends Ae{constructor(t){super(),this.writable=!1,ki(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new F0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=yc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const wc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),fs=64,H0={};let ha=0,Er=0,pa;function ya(e){let t="";do t=wc[e%fs]+t,e=Math.floor(e/fs);while(e>0);return t}function _c(){const e=ya(+new Date);return e!==pa?(ha=0,pa=e):e+"."+ya(ha++)}for(;Er{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};P0(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,R0(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=_c()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Ec(t),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new ht(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ht extends Ae{constructor(t,n){super(),ki(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=xc(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Ac(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ht.requestsCount++,ht.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=V0,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ht.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ht.requestsCount=0;ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ga);else if(typeof addEventListener=="function"){const e="onpagehide"in Ye?"pagehide":"unload";addEventListener(e,ga,!1)}}function ga(){for(let e in ht.requests)ht.requests.hasOwnProperty(e)&&ht.requests[e].abort()}const Oc=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),jr=Ye.WebSocket||Ye.MozWebSocket,ma=!0,W0="arraybuffer",va=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class q0 extends bc{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=va?{}:xc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ma&&!va?n?new jr(t,n):new jr(t):new jr(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||W0,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const o={};try{ma&&this.ws.send(s)}catch{}i&&Oc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=_c()),this.supportsBinary||(t.b64=1);const i=Ec(t),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!jr}}const Y0={websocket:q0,polling:K0},G0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,J0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function hs(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=G0.exec(e||""),s={},o=14;for(;o--;)s[J0[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=X0(s,s.path),s.queryKey=Q0(s,s.query),s}function X0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}let kc=class yn extends Ae{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=hs(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=hs(n.host).host),ki(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=z0(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vc,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y0[t](r)}open(){let t;if(this.opts.rememberUpgrade&&yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(d){n&&d.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){yn.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Tc=Object.prototype.toString,ny=typeof Blob=="function"||typeof Blob<"u"&&Tc.call(Blob)==="[object BlobConstructor]",ry=typeof File=="function"||typeof File<"u"&&Tc.call(File)==="[object FileConstructor]";function Gs(e){return ey&&(e instanceof ArrayBuffer||ty(e))||ny&&e instanceof Blob||ry&&e instanceof File}function Hr(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case re.ACK:case re.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ly{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cy=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Js,Encoder:ay,get PacketType(){return re},protocol:oy},Symbol.toStringTag,{value:"Module"}));function nt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const uy=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Sc extends Ae{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[nt(t,"open",this.onopen.bind(this)),nt(t,"packet",this.onpacket.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(uy.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:re.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),r.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(s),n.apply(this,[null,...o])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,s)=>{n.push((o,a)=>r?o?s(o):i(a):i(o)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case re.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case re.EVENT:case re.BINARY_EVENT:this.onevent(t);break;case re.ACK:case re.BINARY_ACK:this.onack(t);break;case re.DISCONNECT:this.ondisconnect();break;case re.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:re.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Nn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Nn.prototype.reset=function(){this.attempts=0};Nn.prototype.setMin=function(e){this.ms=e};Nn.prototype.setMax=function(e){this.max=e};Nn.prototype.setJitter=function(e){this.jitter=e};class gs extends Ae{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ki(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Nn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cy;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new kc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=nt(n,"open",function(){r.onopen(),t&&t()}),s=nt(n,"error",o=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",o),t?t(o):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(nt(t,"ping",this.onping.bind(this)),nt(t,"data",this.ondata.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this)),nt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Oc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Sc(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Hn={};function zr(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Z0(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Hn[i]&&s in Hn[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new gs(r,t):(Hn[i]||(Hn[i]=new gs(r,t)),l=Hn[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(zr,{Manager:gs,Socket:Sc,io:zr,connect:zr});const _n=new zr("http://localhost:9600");_n.onopen=()=>{console.log("WebSocket connection established.")};_n.onclose=e=>{console.log("WebSocket connection closed:",e.code,e.reason)};_n.onerror=e=>{console.error("WebSocket error:",e)};var dy=function(){function e(t,n){n===void 0&&(n=[]),this._eventType=t,this._eventFunctions=n}return e.prototype.init=function(){var t=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(t._eventType,n)})},e}(),Qr=globalThis&&globalThis.__assign||function(){return Qr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return!1;var t=Ue(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jy(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},s=t.elements[n];!Xe(s)||!mt(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Ay(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],s=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!Xe(i)||!mt(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const Oy={name:"applyStyles",enabled:!0,phase:"write",fn:jy,effect:Ay,requires:["computeStyles"]};function pt(e){return e.split("-")[0]}var ln=Math.max,ni=Math.min,Cn=Math.round;function ms(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Hc(){return!/^((?!chrome|android).)*safari/i.test(ms())}function Rn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,s=1;t&&Xe(e)&&(i=e.offsetWidth>0&&Cn(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Cn(r.height)/e.offsetHeight||1);var o=cn(e)?Ue(e):window,a=o.visualViewport,l=!Hc()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/s,d=r.width/i,f=r.height/s;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Zs(e){var t=Rn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Qs(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tt(e){return Ue(e).getComputedStyle(e)}function ky(e){return["table","td","th"].indexOf(mt(e))>=0}function Kt(e){return((cn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ti(e){return mt(e)==="html"?e:e.assignedSlot||e.parentNode||(Qs(e)?e.host:null)||Kt(e)}function _a(e){return!Xe(e)||Tt(e).position==="fixed"?null:e.offsetParent}function Ty(e){var t=/firefox/i.test(ms()),n=/Trident/i.test(ms());if(n&&Xe(e)){var r=Tt(e);if(r.position==="fixed")return null}var i=Ti(e);for(Qs(i)&&(i=i.host);Xe(i)&&["html","body"].indexOf(mt(i))<0;){var s=Tt(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function yr(e){for(var t=Ue(e),n=_a(e);n&&ky(n)&&Tt(n).position==="static";)n=_a(n);return n&&(mt(n)==="html"||mt(n)==="body"&&Tt(n).position==="static")?t:n||Ty(e)||t}function eo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xn(e,t,n){return ln(e,ni(t,n))}function Sy(e,t,n){var r=Xn(e,t,n);return r>n?n:r}function $c(){return{top:0,right:0,bottom:0,left:0}}function Vc(e){return Object.assign({},$c(),e)}function Uc(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Cy=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Vc(typeof t!="number"?t:Uc(t,pr))};function Ry(e){var t,n=e.state,r=e.name,i=e.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=pt(n.placement),l=eo(a),c=[Fe,Ze].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var d=Cy(i.padding,n),f=Zs(s),p=l==="y"?De:Fe,y=l==="y"?Qe:Ze,g=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],w=o[l]-n.rects.reference[l],b=yr(s),v=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,x=g/2-w/2,_=d[p],C=v-f[u]-d[y],L=v/2-f[u]/2+x,B=Xn(_,L,C),I=l;n.modifiersData[r]=(t={},t[I]=B,t.centerOffset=B-L,t)}}function Py(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||zc(t.elements.popper,i)&&(t.elements.arrow=i))}const My={name:"arrow",enabled:!0,phase:"main",fn:Ry,effect:Py,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pn(e){return e.split("-")[1]}var Ly={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Iy(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Cn(n*i)/i||0,y:Cn(r*i)/i||0}}function Ea(e){var t,n=e.popper,r=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,y=o.y,g=y===void 0?0:y,w=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=w.x,g=w.y;var b=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),x=Fe,_=De,C=window;if(c){var L=yr(n),B="clientHeight",I="clientWidth";if(L===Ue(n)&&(L=Kt(n),Tt(L).position!=="static"&&a==="absolute"&&(B="scrollHeight",I="scrollWidth")),L=L,i===De||(i===Fe||i===Ze)&&s===lr){_=Qe;var K=d&&L===C&&C.visualViewport?C.visualViewport.height:L[B];g-=K-r.height,g*=l?1:-1}if(i===Fe||(i===De||i===Qe)&&s===lr){x=Ze;var U=d&&L===C&&C.visualViewport?C.visualViewport.width:L[I];p-=U-r.width,p*=l?1:-1}}var G=Object.assign({position:a},c&&Ly),ce=u===!0?Iy({x:p,y:g},Ue(n)):{x:p,y:g};if(p=ce.x,g=ce.y,l){var ue;return Object.assign({},G,(ue={},ue[_]=v?"0":"",ue[x]=b?"0":"",ue.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",ue))}return Object.assign({},G,(t={},t[_]=v?g+"px":"",t[x]=b?p+"px":"",t.transform="",t))}function Ny(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:pt(t.placement),variation:Pn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ea(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ea(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const By={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ny,data:{}};var Ar={passive:!0};function Dy(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=Ue(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,Ar)}),a&&l.addEventListener("resize",n.update,Ar),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Ar)}),a&&l.removeEventListener("resize",n.update,Ar)}}const Fy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Dy,data:{}};var Hy={left:"right",right:"left",bottom:"top",top:"bottom"};function Vr(e){return e.replace(/left|right|bottom|top/g,function(t){return Hy[t]})}var zy={start:"end",end:"start"};function ja(e){return e.replace(/start|end/g,function(t){return zy[t]})}function to(e){var t=Ue(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function no(e){return Rn(Kt(e)).left+to(e).scrollLeft}function $y(e,t){var n=Ue(e),r=Kt(e),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var c=Hc();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+no(e),y:l}}function Vy(e){var t,n=Kt(e),r=to(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=ln(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ln(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+no(e),l=-r.scrollTop;return Tt(i||n).direction==="rtl"&&(a+=ln(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function ro(e){var t=Tt(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Kc(e){return["html","body","#document"].indexOf(mt(e))>=0?e.ownerDocument.body:Xe(e)&&ro(e)?e:Kc(Ti(e))}function Qn(e,t){var n;t===void 0&&(t=[]);var r=Kc(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=Ue(r),o=i?[s].concat(s.visualViewport||[],ro(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(Qn(Ti(o)))}function vs(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Uy(e,t){var n=Rn(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Aa(e,t,n){return t===Dc?vs($y(e,n)):cn(t)?Uy(t,n):vs(Vy(Kt(e)))}function Ky(e){var t=Qn(Ti(e)),n=["absolute","fixed"].indexOf(Tt(e).position)>=0,r=n&&Xe(e)?yr(e):e;return cn(r)?t.filter(function(i){return cn(i)&&zc(i,r)&&mt(i)!=="body"}):[]}function Wy(e,t,n,r){var i=t==="clippingParents"?Ky(e):[].concat(t),s=[].concat(i,[n]),o=s[0],a=s.reduce(function(l,c){var u=Aa(e,c,r);return l.top=ln(u.top,l.top),l.right=ni(u.right,l.right),l.bottom=ni(u.bottom,l.bottom),l.left=ln(u.left,l.left),l},Aa(e,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Wc(e){var t=e.reference,n=e.element,r=e.placement,i=r?pt(r):null,s=r?Pn(r):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case De:l={x:o,y:t.y-n.height};break;case Qe:l={x:o,y:t.y+t.height};break;case Ze:l={x:t.x+t.width,y:a};break;case Fe:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?eo(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Sn:l[c]=l[c]-(t[u]/2-n[u]/2);break;case lr:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function cr(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,s=n.strategy,o=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?fy:a,c=n.rootBoundary,u=c===void 0?Dc:c,d=n.elementContext,f=d===void 0?zn:d,p=n.altBoundary,y=p===void 0?!1:p,g=n.padding,w=g===void 0?0:g,b=Vc(typeof w!="number"?w:Uc(w,pr)),v=f===zn?hy:zn,x=e.rects.popper,_=e.elements[y?v:f],C=Wy(cn(_)?_:_.contextElement||Kt(e.elements.popper),l,u,o),L=Rn(e.elements.reference),B=Wc({reference:L,element:x,strategy:"absolute",placement:i}),I=vs(Object.assign({},x,B)),K=f===zn?I:L,U={top:C.top-K.top+b.top,bottom:K.bottom-C.bottom+b.bottom,left:C.left-K.left+b.left,right:K.right-C.right+b.right},G=e.modifiersData.offset;if(f===zn&&G){var ce=G[i];Object.keys(U).forEach(function(ue){var be=[Ze,Qe].indexOf(ue)>=0?1:-1,Se=[De,Qe].indexOf(ue)>=0?"y":"x";U[ue]+=ce[Se]*be})}return U}function qy(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Fc:l,u=Pn(r),d=u?a?wa:wa.filter(function(y){return Pn(y)===u}):pr,f=d.filter(function(y){return c.indexOf(y)>=0});f.length===0&&(f=d);var p=f.reduce(function(y,g){return y[g]=cr(e,{placement:g,boundary:i,rootBoundary:s,padding:o})[pt(g)],y},{});return Object.keys(p).sort(function(y,g){return p[y]-p[g]})}function Yy(e){if(pt(e)===Xs)return[];var t=Vr(e);return[ja(e),t,ja(t)]}function Gy(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,y=p===void 0?!0:p,g=n.allowedAutoPlacements,w=t.options.placement,b=pt(w),v=b===w,x=l||(v||!y?[Vr(w)]:Yy(w)),_=[w].concat(x).reduce(function(Ee,A){return Ee.concat(pt(A)===Xs?qy(t,{placement:A,boundary:u,rootBoundary:d,padding:c,flipVariations:y,allowedAutoPlacements:g}):A)},[]),C=t.rects.reference,L=t.rects.popper,B=new Map,I=!0,K=_[0],U=0;U<_.length;U++){var G=_[U],ce=pt(G),ue=Pn(G)===Sn,be=[De,Qe].indexOf(ce)>=0,Se=be?"width":"height",te=cr(t,{placement:G,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),W=be?ue?Ze:Fe:ue?Qe:De;C[Se]>L[Se]&&(W=Vr(W));var Z=Vr(W),he=[];if(s&&he.push(te[ce]<=0),a&&he.push(te[W]<=0,te[Z]<=0),he.every(function(Ee){return Ee})){K=G,I=!1;break}B.set(G,he)}if(I)for(var Le=y?3:1,ve=function(A){var D=_.find(function(N){var z=B.get(N);if(z)return z.slice(0,A).every(function(ne){return ne})});if(D)return K=D,"break"},pe=Le;pe>0;pe--){var Ce=ve(pe);if(Ce==="break")break}t.placement!==K&&(t.modifiersData[r]._skip=!0,t.placement=K,t.reset=!0)}}const Jy={name:"flip",enabled:!0,phase:"main",fn:Gy,requiresIfExists:["offset"],data:{_skip:!1}};function Oa(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ka(e){return[De,Ze,Qe,Fe].some(function(t){return e[t]>=0})}function Xy(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=cr(t,{elementContext:"reference"}),a=cr(t,{altBoundary:!0}),l=Oa(o,r),c=Oa(a,i,s),u=ka(l),d=ka(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Qy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xy};function Zy(e,t,n){var r=pt(e),i=[Fe,De].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Fe,Ze].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function eg(e){var t=e.state,n=e.options,r=e.name,i=n.offset,s=i===void 0?[0,0]:i,o=Fc.reduce(function(u,d){return u[d]=Zy(d,t.rects,s),u},{}),a=o[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const tg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eg};function ng(e){var t=e.state,n=e.name;t.modifiersData[n]=Wc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const rg={name:"popperOffsets",enabled:!0,phase:"read",fn:ng,data:{}};function ig(e){return e==="x"?"y":"x"}function sg(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,y=n.tetherOffset,g=y===void 0?0:y,w=cr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=pt(t.placement),v=Pn(t.placement),x=!v,_=eo(b),C=ig(_),L=t.modifiersData.popperOffsets,B=t.rects.reference,I=t.rects.popper,K=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,U=typeof K=="number"?{mainAxis:K,altAxis:K}:Object.assign({mainAxis:0,altAxis:0},K),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ce={x:0,y:0};if(L){if(s){var ue,be=_==="y"?De:Fe,Se=_==="y"?Qe:Ze,te=_==="y"?"height":"width",W=L[_],Z=W+w[be],he=W-w[Se],Le=p?-I[te]/2:0,ve=v===Sn?B[te]:I[te],pe=v===Sn?-I[te]:-B[te],Ce=t.elements.arrow,Ee=p&&Ce?Zs(Ce):{width:0,height:0},A=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$c(),D=A[be],N=A[Se],z=Xn(0,B[te],Ee[te]),ne=x?B[te]/2-Le-z-D-U.mainAxis:ve-z-D-U.mainAxis,ye=x?-B[te]/2+Le+z+N+U.mainAxis:pe+z+N+U.mainAxis,J=t.elements.arrow&&yr(t.elements.arrow),h=J?_==="y"?J.clientTop||0:J.clientLeft||0:0,m=(ue=G==null?void 0:G[_])!=null?ue:0,j=W+ne-m-h,O=W+ye-m,T=Xn(p?ni(Z,j):Z,W,p?ln(he,O):he);L[_]=T,ce[_]=T-W}if(a){var P,F=_==="x"?De:Fe,R=_==="x"?Qe:Ze,M=L[C],S=C==="y"?"height":"width",V=M+w[F],H=M-w[R],$=[De,Fe].indexOf(b)!==-1,q=(P=G==null?void 0:G[C])!=null?P:0,ee=$?V:M-B[S]-I[S]-q+U.altAxis,de=$?M+B[S]+I[S]-q-U.altAxis:H,le=p&&$?Sy(ee,M,de):Xn(p?ee:V,M,p?de:H);L[C]=le,ce[C]=le-M}t.modifiersData[r]=ce}}const og={name:"preventOverflow",enabled:!0,phase:"main",fn:sg,requiresIfExists:["offset"]};function ag(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lg(e){return e===Ue(e)||!Xe(e)?to(e):ag(e)}function cg(e){var t=e.getBoundingClientRect(),n=Cn(t.width)/e.offsetWidth||1,r=Cn(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ug(e,t,n){n===void 0&&(n=!1);var r=Xe(t),i=Xe(t)&&cg(t),s=Kt(t),o=Rn(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((mt(t)!=="body"||ro(s))&&(a=lg(t)),Xe(t)?(l=Rn(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=no(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function dg(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||i(s)}),r}function fg(e){var t=dg(e);return Ey.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function hg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function pg(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ta={placement:"bottom",modifiers:[],strategy:"absolute"};function Sa(){for(var e=arguments.length,t=new Array(e),n=0;n(cd("data-v-f0b6ce60"),e=e(),ud(),e),xg={class:"overflow-y-scroll flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},bg={class:"z-10 sticky top-0 flex-row p-2 flex items-center gap-3 flex-0 bg-bg-light-tone dark:bg-bg-dark-tone mt-0 px-4 shadow-md"},wg=gr(()=>E("i",{"data-feather":"plus"},null,-1)),_g=[wg],Eg=Fs('',3),jg={class:"relative"},Ag=gr(()=>E("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[E("div",{class:"scale-75"},[E("i",{"data-feather":"search"})])],-1)),Og={class:"absolute inset-y-0 right-0 flex items-center pr-3"},kg=gr(()=>E("i",{"data-feather":"x"},null,-1)),Tg=[kg],Sg={class:"relative overflow-y-scroll no-scrollbar"},Cg={key:0,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},Rg=gr(()=>E("p",{class:"px-3"},"No discussions are found",-1)),Pg=[Rg],Mg=gr(()=>E("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex height-64"},null,-1)),Lg={setup(){},data(){return{list:[],tempList:[],currentDiscussion:Number,discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,showCreateDiscussionModal:!1}},methods:{async list_discussions(){try{const e=await Zt.get("/list_discussions");if(e)return this.list=e.data,this.tempList=this.list,e.data}catch(e){return console.log(e),[]}},async load_discussion(e){try{if(e){this.loading=!0;const t=await Zt.post("/load_discussion",{id:e});this.loading=!1,t&&(this.discussionArr=t.data.filter(n=>n.sender!="conditionner"))}}catch(t){console.log(t),this.loading=!1}},async new_discussion(e){try{const t=await Zt.get("/new_discussion",{params:{title:e}});if(t)return t.data}catch(t){return console.log(t),{}}},async delete_discussion(e){try{if(e){this.loading=!0;const t=await Zt.post("/delete_discussion",{id:e});this.loading=!1}}catch(t){console.log(t),this.loading=!1}},async edit_title(e,t){try{if(e){this.loading=!0;const n=await Zt.post("/edit_title",{id:e,title:t});if(this.loading=!1,n.status==200){const r=this.list.findIndex(s=>s.id==e),i=this.list[r];i.title=t,this.tempList=this.list}}}catch(n){console.log(n),this.loading=!1}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.list=this.tempList.filter(e=>e.title.includes(this.filterTitle)),this.filterInProgress=!1},100))},async selectDiscussion(e){this.currentDiscussion=e,await this.load_discussion(e.id),this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)},scrollToElement(e){e&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},createMsg(e){let t={content:e.message,id:e.message,rank:0,sender:e.user};this.discussionArr.push(t),it(()=>{const r=document.getElementById("msg-"+e.message);this.scrollToElement(r)});let n={content:"..typing",id:e.response_id,rank:0,sender:e.bot};this.discussionArr.push(n),it(()=>{const r=document.getElementById("msg-"+e.response_id);this.scrollToElement(r)}),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.content)},sendMsg(e){_n.emit("generate_msg",{prompt:e})},steamMessageContent(e){const t=this.discussionArr[this.discussionArr.length-1];t.content=e.data},async changeTitleUsingUserMSG(e,t){const n=this.list.findIndex(i=>i.id==e),r=this.list[n];t&&(r.title=t,this.tempList=this.list),await this.edit_title(e,t)},async createNewDiscussion(){const e=await this.new_discussion();await this.list_discussions();const t=this.list.findIndex(r=>r.id==e.id),n=this.list[t];this.selectDiscussion(n),it(()=>{const r=document.getElementById("dis-"+e.id);this.scrollToElement(r)})},async deleteDiscussion(e){const t=this.list.findIndex(r=>r.id==e),n=this.list[t];n.loading=!0,this.delete_discussion(e),this.currentDiscussion.id==e&&(this.currentDiscussion={}),await this.list_discussions()},async editTitle(e){await this.edit_title(e.id,e.title)}},async created(){await this.list_discussions(),it(()=>{kn.replace()}),_n.on("infos",this.createMsg),_n.on("message",this.steamMessageContent)},components:{Discussion:uc,Message:dc,ChatBox:fc,WelcomeComponent:hc},watch:{filterTitle(e,t){e==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)}}},Ig=Object.assign(Lg,{__name:"DiscussionsView",setup(e){return mi(()=>{mg()}),Zt.defaults.baseURL="/",(t,n)=>(X(),ie(Oe,null,[E("div",xg,[E("div",bg,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[0]||(n[0]=r=>t.createNewDiscussion())},_g),Eg,E("form",null,[E("div",jg,[Ag,E("div",Og,[E("div",{class:_t(["hover:text-secondary duration-75 active:scale-90",t.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[1]||(n[1]=r=>t.filterTitle="")},Tg,2)]),Ne(E("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[2]||(n[2]=r=>t.filterTitle=r),onInput:n[3]||(n[3]=r=>t.filterDiscussions())},null,544),[[Be,t.filterTitle]])])])]),E("div",Sg,[E("div",{class:_t(["mx-4 flex-grow",t.filterInProgress?"opacity-20 pointer-events-none":""])},[(X(!0),ie(Oe,null,Jt(t.list,(r,i)=>(X(),sn(uc,{key:i,id:r.id,title:r.title,ref_for:!0,ref:"discussionList",selected:t.currentDiscussion.id==r.id,loading:t.currentDiscussion.id==r.id&&t.loading,onSelect:s=>t.selectDiscussion(r),onDelete:s=>t.deleteDiscussion(r.id),onEditTitle:t.editTitle},null,8,["id","title","selected","loading","onSelect","onDelete","onEditTitle"]))),128)),t.list.length<1?(X(),ie("div",Cg,Pg)):qe("",!0),Mg],2)])]),E("div",{class:_t(["overflow-y-scroll flex flex-col no-scrollbar flex-grow",t.loading?"opacity-20 pointer-events-none":""])},[E("div",null,[(X(!0),ie(Oe,null,Jt(t.discussionArr,(r,i)=>(X(),sn(dc,{key:i,message:r,onClick:n[4]||(n[4]=s=>t.scrollToElement(s.target)),id:"msg-"+r.id},null,8,["message","id"]))),128)),t.discussionArr.length<1?(X(),sn(hc,{key:0})):qe("",!0),t.discussionArr.length>0?(X(),sn(fc,{key:1,onMessageSentEvent:t.sendMsg},null,8,["onMessageSentEvent"])):qe("",!0)])],2)],64))}}),Ng=Ct(Ig,[["__scopeId","data-v-f0b6ce60"]]),Bg=Dh({history:nh("/"),routes:[{path:"/extensions/",name:"extensions",component:pp},{path:"/help/",name:"help",component:mp},{path:"/settings/",name:"settings",component:S2},{path:"/training/",name:"training",component:P2},{path:"/",name:"discussions",component:Ng}]});const ou=Bf(dp);ou.use(Bg);ou.mount("#app"); +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(i=>r.set(i)),r}static accessor(t){const r=(this[oa]=this[oa]={accessors:{}}).accessors,i=this.prototype;function s(o){const a=Fn(o);r[a]||(g1(i,o),r[a]=!0)}return k.isArray(t)?t.forEach(s):s(t),this}}Oi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);k.freezeMethods(Oi.prototype);k.freezeMethods(Oi);const jt=Oi;function $i(e,t){const n=this||Ws,r=t||n,i=jt.from(r.headers);let s=r.data;return k.forEach(e,function(a){s=a.call(n,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function oc(e){return!!(e&&e.__CANCEL__)}function hr(e,t,n){oe.call(this,e??"canceled",oe.ERR_CANCELED,t,n),this.name="CanceledError"}k.inherits(hr,oe,{__CANCEL__:!0});function m1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new oe("Request failed with status code "+n.status,[oe.ERR_BAD_REQUEST,oe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const v1=ft.isStandardBrowserEnv?function(){return{write:function(n,r,i,s,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),k.isNumber(i)&&l.push("expires="+new Date(i).toGMTString()),k.isString(s)&&l.push("path="+s),k.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function x1(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function b1(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function ac(e,t){return e&&!x1(t)?b1(e,t):t}const w1=ft.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function i(s){let o=s;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=i(window.location.href),function(o){const a=k.isString(o)?i(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function _1(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function E1(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i=0,s=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[s];o||(o=c),n[i]=l,r[i]=c;let d=s,f=0;for(;d!==i;)f+=n[d++],d=d%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),c-o{const s=i.loaded,o=i.lengthComputable?i.total:void 0,a=s-n,l=r(a),c=s<=o;n=s;const u={loaded:s,total:o,progress:o?s/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-s)/l:void 0,event:i};u[t?"download":"upload"]=!0,e(u)}}const j1=typeof XMLHttpRequest<"u",A1=j1&&function(e){return new Promise(function(n,r){let i=e.data;const s=jt.from(e.headers).normalize(),o=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}k.isFormData(i)&&(ft.isStandardBrowserEnv||ft.isStandardBrowserWebWorkerEnv)&&s.setContentType(!1);let c=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",y=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";s.set("Authorization","Basic "+btoa(p+":"+y))}const u=ac(e.baseURL,e.url);c.open(e.method.toUpperCase(),rc(u,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function d(){if(!c)return;const p=jt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};m1(function(b){n(b),l()},function(b){r(b),l()},g),c=null}if("onloadend"in c?c.onloadend=d:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(d)},c.onabort=function(){c&&(r(new oe("Request aborted",oe.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new oe("Network Error",oe.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let y=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const g=e.transitional||ic;e.timeoutErrorMessage&&(y=e.timeoutErrorMessage),r(new oe(y,g.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,c)),c=null},ft.isStandardBrowserEnv){const p=(e.withCredentials||w1(u))&&e.xsrfCookieName&&v1.read(e.xsrfCookieName);p&&s.set(e.xsrfHeaderName,p)}i===void 0&&s.setContentType(null),"setRequestHeader"in c&&k.forEach(s.toJSON(),function(y,g){c.setRequestHeader(g,y)}),k.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",aa(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",aa(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{c&&(r(!p||p.type?new hr(null,e,c):p),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const f=_1(u);if(f&&ft.protocols.indexOf(f)===-1){r(new oe("Unsupported protocol "+f+":",oe.ERR_BAD_REQUEST,e));return}c.send(i||null)})},Br={http:Jp,xhr:A1};k.forEach(Br,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const O1={getAdapter:e=>{e=k.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let i=0;ie instanceof jt?e.toJSON():e;function Tn(e,t){t=t||{};const n={};function r(c,u,d){return k.isPlainObject(c)&&k.isPlainObject(u)?k.merge.call({caseless:d},c,u):k.isPlainObject(u)?k.merge({},u):k.isArray(u)?u.slice():u}function i(c,u,d){if(k.isUndefined(u)){if(!k.isUndefined(c))return r(void 0,c,d)}else return r(c,u,d)}function s(c,u){if(!k.isUndefined(u))return r(void 0,u)}function o(c,u){if(k.isUndefined(u)){if(!k.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,d){if(d in t)return r(c,u);if(d in e)return r(void 0,c)}const l={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u)=>i(ca(c),ca(u),!0)};return k.forEach(Object.keys(e).concat(Object.keys(t)),function(u){const d=l[u]||i,f=d(e[u],t[u],u);k.isUndefined(f)&&d!==a||(n[u]=f)}),n}const lc="1.3.6",qs={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qs[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ua={};qs.transitional=function(t,n,r){function i(s,o){return"[Axios v"+lc+"] Transitional option '"+s+"'"+o+(r?". "+r:"")}return(s,o,a)=>{if(t===!1)throw new oe(i(o," has been removed"+(n?" in "+n:"")),oe.ERR_DEPRECATED);return n&&!ua[o]&&(ua[o]=!0,console.warn(i(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(s,o,a):!0}};function k1(e,t,n){if(typeof e!="object")throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let i=r.length;for(;i-- >0;){const s=r[i],o=t[s];if(o){const a=e[s],l=a===void 0||o(a,s,e);if(l!==!0)throw new oe("option "+s+" must be "+l,oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new oe("Unknown option "+s,oe.ERR_BAD_OPTION)}}const us={assertOptions:k1,validators:qs},Lt=us.validators;class Xr{constructor(t){this.defaults=t,this.interceptors={request:new sa,response:new sa}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Tn(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&us.assertOptions(r,{silentJSONParsing:Lt.transitional(Lt.boolean),forcedJSONParsing:Lt.transitional(Lt.boolean),clarifyTimeoutError:Lt.transitional(Lt.boolean)},!1),i!=null&&(k.isFunction(i)?n.paramsSerializer={serialize:i}:us.assertOptions(i,{encode:Lt.function,serialize:Lt.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=s&&k.merge(s.common,s[n.method]),o&&k.forEach(["delete","get","head","post","put","patch","common"],y=>{delete s[y]}),n.headers=jt.concat(o,s);const a=[];let l=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(n)===!1||(l=l&&g.synchronous,a.unshift(g.fulfilled,g.rejected))});const c=[];this.interceptors.response.forEach(function(g){c.push(g.fulfilled,g.rejected)});let u,d=0,f;if(!l){const y=[la.bind(this),void 0];for(y.unshift.apply(y,a),y.push.apply(y,c),f=y.length,u=Promise.resolve(n);d{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const o=new Promise(a=>{r.subscribe(a),s=a}).then(i);return o.cancel=function(){r.unsubscribe(s)},o},t(function(s,o,a){r.reason||(r.reason=new hr(s,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ys(function(i){t=i}),cancel:t}}}const T1=Ys;function S1(e){return function(n){return e.apply(null,n)}}function C1(e){return k.isObject(e)&&e.isAxiosError===!0}const ds={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(ds).forEach(([e,t])=>{ds[t]=e});const R1=ds;function cc(e){const t=new Dr(e),n=Kl(Dr.prototype.request,t);return k.extend(n,Dr.prototype,t,{allOwnKeys:!0}),k.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return cc(Tn(e,i))},n}const ke=cc(Ws);ke.Axios=Dr;ke.CanceledError=hr;ke.CancelToken=T1;ke.isCancel=oc;ke.VERSION=lc;ke.toFormData=ji;ke.AxiosError=oe;ke.Cancel=ke.CanceledError;ke.all=function(t){return Promise.all(t)};ke.spread=S1;ke.isAxiosError=C1;ke.mergeConfig=Tn;ke.AxiosHeaders=jt;ke.formToJSON=e=>sc(k.isHTMLForm(e)?new FormData(e):e);ke.HttpStatusCode=R1;ke.default=ke;const Zt=ke,P1={setup(){return{}},data(){return{backendsArr:[],modelsArr:[],persLangArr:[],persCatgArr:[],persArr:[],langArr:[],configFile:{}}},methods:{async api_get_req(e){try{const t=await Zt.get("/"+e);if(t)return t.data}catch(t){return console.log(t),[]}}},async mounted(){this.backendsArr=await this.api_get_req("list_backends"),this.modelsArr=await this.api_get_req("list_models"),this.persLangArr=await this.api_get_req("list_personalities_languages"),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities"),this.langArr=await this.api_get_req("list_languages"),this.configFile=await this.api_get_req("get_config")}},M1={class:"overflow-y-scroll flex flex-col no-scrollbar shadow-lg min-w-[29rem] max-w-[29rem] bg-bg-light-tone dark:bg-bg-dark-tone"},L1={class:"p-2"},I1={class:"m-2"},N1=E("label",{for:"backend",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Backend: ",-1),B1={id:"backend",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},D1={class:"m-2"},F1=E("label",{for:"model",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Model: ",-1),H1={id:"model",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},z1={class:"m-2"},$1=E("label",{for:"persLang",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Personalities Languages: ",-1),V1={id:"persLang",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},U1={class:"m-2"},K1=E("label",{for:"persCat",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Personalities Category: ",-1),W1={id:"persCat",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},q1={class:"m-2"},Y1=E("label",{for:"persona",class:"block mb-2 text-sm font-medium text-gray-900 dark:text-white"}," Persona: ",-1),G1={id:"persona",class:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"},J1={class:"m-2"},X1=E("label",{for:"seed",class:"block mb-2 text-sm font-medium"}," Seed: ",-1),Q1={class:"m-2"},Z1={class:"flex flex-col align-bottom"},e2={class:"relative"},t2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"temperature",class:"text-sm font-medium"}," Temperature: ")],-1),n2={class:"absolute right-0"},r2={class:"m-2"},i2={class:"flex flex-col align-bottom"},s2={class:"relative"},o2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"predict",class:"text-sm font-medium"}," N Predict: ")],-1),a2={class:"absolute right-0"},l2={class:"m-2"},c2={class:"flex flex-col align-bottom"},u2={class:"relative"},d2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"top_k",class:"text-sm font-medium"}," Top-K: ")],-1),f2={class:"absolute right-0"},h2={class:"m-2"},p2={class:"flex flex-col align-bottom"},y2={class:"relative"},g2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"top_p",class:"text-sm font-medium"}," Top-P: ")],-1),m2={class:"absolute right-0"},v2={class:"m-2"},x2={class:"flex flex-col align-bottom"},b2={class:"relative"},w2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"repeat_penalty",class:"text-sm font-medium"}," Repeat penalty: ")],-1),_2={class:"absolute right-0"},E2={class:"m-2"},j2={class:"flex flex-col align-bottom"},A2={class:"relative"},O2=E("p",{class:"absolute left-0 mt-6"},[E("label",{for:"repeat_last_n",class:"text-sm font-medium"}," Repeat last N: ")],-1),k2={class:"absolute right-0"};function T2(e,t,n,r,i,s){return X(),ie("div",M1,[E("div",L1,[E("div",I1,[N1,E("select",B1,[(X(!0),ie(Oe,null,Jt(i.backendsArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",D1,[F1,E("select",H1,[(X(!0),ie(Oe,null,Jt(i.modelsArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",z1,[$1,E("select",V1,[(X(!0),ie(Oe,null,Jt(i.persLangArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",U1,[K1,E("select",W1,[(X(!0),ie(Oe,null,Jt(i.persCatgArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",q1,[Y1,E("select",G1,[(X(!0),ie(Oe,null,Jt(i.persArr,o=>(X(),ie("option",null,wt(o),1))),256))])]),E("div",J1,[X1,Ne(E("input",{type:"text",id:"seed","onUpdate:modelValue":t[0]||(t[0]=o=>i.configFile.seed=o),class:"bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.seed]])]),E("div",Q1,[E("div",Z1,[E("div",e2,[t2,E("p",n2,[Ne(E("input",{type:"text",id:"temp-val","onUpdate:modelValue":t[1]||(t[1]=o=>i.configFile.temp=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.temp]])])]),Ne(E("input",{id:"temperature",type:"range","onUpdate:modelValue":t[2]||(t[2]=o=>i.configFile.temp=o),min:"0",max:"5",step:"0.1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.temp]])])]),E("div",r2,[E("div",i2,[E("div",s2,[o2,E("p",a2,[Ne(E("input",{type:"text",id:"predict-val","onUpdate:modelValue":t[3]||(t[3]=o=>i.configFile.n_predict=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.n_predict]])])]),Ne(E("input",{id:"predict",type:"range","onUpdate:modelValue":t[4]||(t[4]=o=>i.configFile.n_predict=o),min:"0",max:"2048",step:"32",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.n_predict]])])]),E("div",l2,[E("div",c2,[E("div",u2,[d2,E("p",f2,[Ne(E("input",{type:"text",id:"top_k-val","onUpdate:modelValue":t[5]||(t[5]=o=>i.configFile.top_k=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_k]])])]),Ne(E("input",{id:"top_k",type:"range","onUpdate:modelValue":t[6]||(t[6]=o=>i.configFile.top_k=o),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_k]])])]),E("div",h2,[E("div",p2,[E("div",y2,[g2,E("p",m2,[Ne(E("input",{type:"text",id:"top_p-val","onUpdate:modelValue":t[7]||(t[7]=o=>i.configFile.top_p=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_p]])])]),Ne(E("input",{id:"top_p",type:"range","onUpdate:modelValue":t[8]||(t[8]=o=>i.configFile.top_p=o),min:"0",max:"1",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.top_p]])])]),E("div",v2,[E("div",x2,[E("div",b2,[w2,E("p",_2,[Ne(E("input",{type:"text",id:"repeat_penalty-val","onUpdate:modelValue":t[9]||(t[9]=o=>i.configFile.repeat_penalty=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_penalty]])])]),Ne(E("input",{id:"repeat_penalty",type:"range","onUpdate:modelValue":t[10]||(t[10]=o=>i.configFile.repeat_penalty=o),min:"0",max:"2",step:"0.01",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_penalty]])])]),E("div",E2,[E("div",j2,[E("div",A2,[O2,E("p",k2,[Ne(E("input",{type:"text",id:"repeat_last_n-val","onUpdate:modelValue":t[11]||(t[11]=o=>i.configFile.repeat_last_n=o),class:"mt-2 w-16 text-right p-2 border border-gray-300 rounded-lg bg-gray-50 sm:text-xs focus:ring-blue-500 focus:border-blue-500 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_last_n]])])]),Ne(E("input",{id:"repeat_last_n",type:"range","onUpdate:modelValue":t[12]||(t[12]=o=>i.configFile.repeat_last_n=o),min:"0",max:"100",step:"1",class:"flex-none h-2 mt-14 mb-2 w-full bg-gray-200 rounded-lg appearance-none cursor-pointer dark:bg-gray-700 focus:ring-blue-500 focus:border-blue-500 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500"},null,512),[[Be,i.configFile.repeat_last_n]])])])])])}const S2=Ct(P1,[["render",T2]]),C2={setup(){return{}}};function R2(e,t,n,r,i,s){return X(),ie("div",null," Training ")}const P2=Ct(C2,[["render",R2]]),M2={name:"Discussion",emits:["delete","select","editTitle"],props:{id:Number,title:String,selected:Boolean,loading:Boolean},setup(){},data(){return{showConfirmation:!1,editTitleMode:!1,editTitle:!1,newTitle:String}},methods:{deleteEvent(){this.showConfirmation=!1,this.$emit("delete")},selectEvent(){this.$emit("select")},editTitleEvent(){this.editTitle=!1,this.editTitleMode=!1,this.showConfirmation=!1,this.$emit("editTitle",{title:this.newTitle,id:this.id})},chnageTitle(e){this.newTitle=e}},mounted(){this.newTitle=this.title,it(()=>{kn.replace()})},watch:{showConfirmation(){it(()=>{kn.replace()})},editTitleMode(e){this.showConfirmation=e,this.editTitle=e}}},L2=["id"],I2={key:1,class:"items-center inline-block min-h-full w-2 rounded-xl self-stretch"},N2=["title"],B2=["value"],D2={class:"flex items-center flex-1 max-h-6"},F2={key:0,class:"flex gap-3 flex-1 items-center justify-end duration-75"},H2=E("i",{"data-feather":"check"},null,-1),z2=[H2],$2=E("i",{"data-feather":"x"},null,-1),V2=[$2],U2={key:1,class:"flex gap-3 flex-1 items-center justify-end duration-75"},K2=E("i",{"data-feather":"x"},null,-1),W2=[K2],q2=E("i",{"data-feather":"check"},null,-1),Y2=[q2],G2={key:2,class:"flex gap-3 flex-1 items-center justify-end invisible group-hover:visible duration-75"},J2=E("i",{"data-feather":"edit-2"},null,-1),X2=[J2],Q2=E("i",{"data-feather":"trash"},null,-1),Z2=[Q2];function e0(e,t,n,r,i,s){return X(),ie("div",{class:_t([n.selected?"bg-bg-light-discussion dark:bg-bg-dark-discussion shadow-md":"","container flex flex-col sm:flex-row item-center shadow-sm gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"]),id:"dis-"+n.id,onClick:t[8]||(t[8]=xt(o=>s.selectEvent(),["stop"]))},[n.selected?(X(),ie("div",{key:0,class:_t(["items-center inline-block min-h-full w-2 rounded-xl self-stretch",n.loading?"animate-bounce bg-accent ":" bg-secondary "])},null,2)):qe("",!0),n.selected?qe("",!0):(X(),ie("div",I2)),i.editTitle?qe("",!0):(X(),ie("p",{key:2,title:n.title,class:"truncate w-full"},wt(n.title?n.title==="untitled"?"New discussion":n.title:"New discussion"),9,N2)),i.editTitle?(X(),ie("input",{key:3,type:"text",id:"title-box",class:"bg-bg-light dark:bg-bg-dark rounded-md border-0 w-full -m-1 p-1",value:n.title,required:"",onInput:t[0]||(t[0]=o=>s.chnageTitle(o.target.value)),onClick:t[1]||(t[1]=xt(()=>{},["stop"]))},null,40,B2)):qe("",!0),E("div",D2,[i.showConfirmation&&!i.editTitleMode?(X(),ie("div",F2,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm removal",type:"button",onClick:t[2]||(t[2]=xt(o=>s.deleteEvent(),["stop"]))},z2),E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Cancel removal",type:"button",onClick:t[3]||(t[3]=xt(o=>i.showConfirmation=!1,["stop"]))},V2)])):qe("",!0),i.showConfirmation&&i.editTitleMode?(X(),ie("div",U2,[E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Discard title changes",type:"button",onClick:t[4]||(t[4]=xt(o=>i.editTitleMode=!1,["stop"]))},W2),E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Confirm title changes",type:"button",onClick:t[5]||(t[5]=xt(o=>s.editTitleEvent(),["stop"]))},Y2)])):qe("",!0),i.showConfirmation?qe("",!0):(X(),ie("div",G2,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Edit title",type:"button",onClick:t[6]||(t[6]=xt(o=>i.editTitleMode=!0,["stop"]))},X2),E("button",{class:"text-2xl hover:text-red-600 duration-75 active:scale-90",title:"Remove discussion",type:"button",onClick:t[7]||(t[7]=xt(o=>i.showConfirmation=!0,["stop"]))},Z2)]))])],10,L2)}const uc=Ct(M2,[["render",e0]]),t0={name:"Message",props:{message:Object},data(){return{senderImg:""}},mounted(){it(()=>{kn.replace()})}},n0={class:"group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex-row p-4 pb-2"},r0={class:"w-30 flex"},i0={class:"w-10 h-10 rounded-lg object-fill drop-shadow-md group-even:bg-primary bg-secondary"},s0=["src"],o0={class:"drop-shadow-sm py-0 px-2 text-lg text-opacity-95 font-bold"},a0={class:"-mt-4 ml-10 mr-0 pt-1 px-2 max-w-screen-2xl"},l0={class:"invisible group-hover:visible flex flex-row mt-3 -mb-2"},c0=Fs('
',5),u0={class:"flex flex-row items-center"},d0=E("div",{class:"text-lg hover:text-red-600 duration-75 active:scale-90 p-2",title:"Downvote"},[E("i",{"data-feather":"thumbs-down"})],-1);function f0(e,t,n,r,i,s){return X(),ie("div",n0,[E("div",r0,[E("div",i0,[i.senderImg?(X(),ie("img",{key:0,src:i.senderImg,class:"w-10 h-10 rounded-full object-fill"},null,8,s0)):qe("",!0)]),E("p",o0,wt(n.message.sender),1)]),E("div",a0,wt(n.message.content),1),E("div",l0,[c0,E("div",u0,[d0,n.message.rank!=0?(X(),ie("div",{key:0,class:_t(["rounded-full px-2 text-sm flex items-center justify-center font-bold",n.message.rank>0?"bg-secondary":"bg-red-600"]),title:"Rank"},wt(n.message.rank),3)):qe("",!0)])])])}const dc=Ct(t0,[["render",f0]]),h0={name:"ChatBox",emits:["messageSentEvent"],setup(){return{}},methods:{sendMessageEvent(e){this.$emit("messageSentEvent",e)},submitOnEnter(e){e.which===13&&(e.preventDefault(),console.log("enter detected"),e.repeat||(this.sendMessageEvent(e.target.value),e.target.value=""))}},mounted(){it(()=>{kn.replace()})},activated(){}},p0={class:"flex-none sticky bottom-0 p-6 items-center justify-center self-center right-0 left-0"},y0=E("label",{for:"chat",class:"sr-only"},"Send message",-1),g0={class:"flex items-center gap-2 px-3 py-3 rounded-lg bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel shadow-lg"},m0=E("button",{type:"submit",on:"","on-click":"",class:"inline-flex justify-center p-2 rounded-full cursor-pointer hover:text-primary duration-75 active:scale-90"},[E("i",{"data-feather":"send",class:"w-6 h-6 m-1"}),E("span",{class:"sr-only"},"Send message")],-1);function v0(e,t,n,r,i,s){return X(),ie("div",p0,[E("form",null,[y0,E("div",g0,[E("textarea",{id:"chat",rows:"1",class:"block min-h-11 no-scrollbar p-2.5 w-full text-sm text-gray-900 bg-bg-light rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500 dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",placeholder:"Send message...",onKeydown:t[0]||(t[0]=Lf(xt(o=>s.submitOnEnter(o),["exact"]),["enter"]))},null,32),m0])])])}const fc=Ct(h0,[["render",v0]]),x0={name:"WelcomeComponent",setup(){return{}}},b0={class:"flex flex-col text-center"},w0=Fs('
Logo

GPT4ALL-UI


Welcome, please create a new discussion or select existing one to start

',1),_0=[w0];function E0(e,t,n,r,i,s){return X(),ie("div",b0,_0)}const hc=Ct(x0,[["render",E0]]),gt=Object.create(null);gt.open="0";gt.close="1";gt.ping="2";gt.pong="3";gt.message="4";gt.upgrade="5";gt.noop="6";const Fr=Object.create(null);Object.keys(gt).forEach(e=>{Fr[gt[e]]=e});const j0={type:"error",data:"parser error"},A0=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",O0=typeof ArrayBuffer=="function",k0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,pc=({type:e,data:t},n,r)=>A0&&t instanceof Blob?n?r(t):da(t,r):O0&&(t instanceof ArrayBuffer||k0(t))?n?r(t):da(new Blob([t]),r):r(gt[e]+(t||"")),da=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)},fa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Un=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,n=e.length,r,i=0,s,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),u=new Uint8Array(c);for(r=0;r>4,u[i++]=(o&15)<<4|a>>2,u[i++]=(a&3)<<6|l&63;return c},S0=typeof ArrayBuffer=="function",yc=(e,t)=>{if(typeof e!="string")return{type:"message",data:gc(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:C0(e.substring(1),t)}:Fr[n]?e.length>1?{type:Fr[n],data:e.substring(1)}:{type:Fr[n]}:j0},C0=(e,t)=>{if(S0){const n=T0(e);return gc(n,t)}else return{base64:!0,data:e}},gc=(e,t)=>{switch(t){case"blob":return e instanceof ArrayBuffer?new Blob([e]):e;case"arraybuffer":default:return e}},mc=String.fromCharCode(30),R0=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,o)=>{pc(s,!1,a=>{r[o]=a,++i===n&&t(r.join(mc))})})},P0=(e,t)=>{const n=e.split(mc),r=[];for(let i=0;itypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function xc(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const L0=Ye.setTimeout,I0=Ye.clearTimeout;function ki(e,t){t.useNativeTimers?(e.setTimeoutFn=L0.bind(Ye),e.clearTimeoutFn=I0.bind(Ye)):(e.setTimeoutFn=Ye.setTimeout.bind(Ye),e.clearTimeoutFn=Ye.clearTimeout.bind(Ye))}const N0=1.33;function B0(e){return typeof e=="string"?D0(e):Math.ceil((e.byteLength||e.size)*N0)}function D0(e){let t=0,n=0;for(let r=0,i=e.length;r=57344?n+=3:(r++,n+=4);return n}class F0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class bc extends Ae{constructor(t){super(),this.writable=!1,ki(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,n,r){return super.emitReserved("error",new F0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=yc(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}}const wc="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),fs=64,H0={};let ha=0,Er=0,pa;function ya(e){let t="";do t=wc[e%fs]+t,e=Math.floor(e/fs);while(e>0);return t}function _c(){const e=ya(+new Date);return e!==pa?(ha=0,pa=e):e+"."+ya(ha++)}for(;Er{this.readyState="paused",t()};if(this.polling||!this.writable){let r=0;this.polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};P0(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,R0(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(t[this.opts.timestampParam]=_c()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const i=Ec(t),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}request(t={}){return Object.assign(t,{xd:this.xd,xs:this.xs},this.opts),new ht(this.uri(),t)}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class ht extends Ae{constructor(t,n){super(),ki(this,n),this.opts=n,this.method=n.method||"GET",this.uri=t,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const t=xc(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");t.xdomain=!!this.opts.xd,t.xscheme=!!this.opts.xs;const n=this.xhr=new Ac(t);try{n.open(this.method,this.uri,this.async);try{if(this.opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let r in this.opts.extraHeaders)this.opts.extraHeaders.hasOwnProperty(r)&&n.setRequestHeader(r,this.opts.extraHeaders[r])}}catch{}if(this.method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}"withCredentials"in n&&(n.withCredentials=this.opts.withCredentials),this.opts.requestTimeout&&(n.timeout=this.opts.requestTimeout),n.onreadystatechange=()=>{n.readyState===4&&(n.status===200||n.status===1223?this.onLoad():this.setTimeoutFn(()=>{this.onError(typeof n.status=="number"?n.status:0)},0))},n.send(this.data)}catch(r){this.setTimeoutFn(()=>{this.onError(r)},0);return}typeof document<"u"&&(this.index=ht.requestsCount++,ht.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=V0,t)try{this.xhr.abort()}catch{}typeof document<"u"&&delete ht.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}ht.requestsCount=0;ht.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",ga);else if(typeof addEventListener=="function"){const e="onpagehide"in Ye?"pagehide":"unload";addEventListener(e,ga,!1)}}function ga(){for(let e in ht.requests)ht.requests.hasOwnProperty(e)&&ht.requests[e].abort()}const Oc=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0))(),jr=Ye.WebSocket||Ye.MozWebSocket,ma=!0,W0="arraybuffer",va=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class q0 extends bc{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),n=this.opts.protocols,r=va?{}:xc(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ma&&!va?n?new jr(t,n):new jr(t):new jr(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType||W0,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n{const o={};try{ma&&this.ws.send(s)}catch{}i&&Oc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let t=this.query||{};const n=this.opts.secure?"wss":"ws";let r="";this.opts.port&&(n==="wss"&&Number(this.opts.port)!==443||n==="ws"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port),this.opts.timestampRequests&&(t[this.opts.timestampParam]=_c()),this.supportsBinary||(t.b64=1);const i=Ec(t),s=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(s?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(i.length?"?"+i:"")}check(){return!!jr}}const Y0={websocket:q0,polling:K0},G0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,J0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function hs(e){const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=G0.exec(e||""),s={},o=14;for(;o--;)s[J0[o]]=i[o]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=X0(s,s.path),s.queryKey=Q0(s,s.query),s}function X0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Q0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}let kc=class yn extends Ae{constructor(t,n={}){super(),this.writeBuffer=[],t&&typeof t=="object"&&(n=t,t=null),t?(t=hs(t),n.hostname=t.host,n.secure=t.protocol==="https"||t.protocol==="wss",n.port=t.port,t.query&&(n.query=t.query)):n.host&&(n.hostname=hs(n.host).host),ki(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=n.transports||["polling","websocket"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!0},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=z0(this.opts.query)),this.id=null,this.upgrades=null,this.pingInterval=null,this.pingTimeout=null,this.pingTimeoutTimer=null,typeof addEventListener=="function"&&(this.opts.closeOnBeforeunload&&(this.beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=vc,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[t],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Y0[t](r)}open(){let t;if(this.opts.rememberUpgrade&&yn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)t="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else t=this.transports[0];this.readyState="opening";try{t=this.createTransport(t)}catch{this.transports.shift(),this.open();return}t.open(),this.setTransport(t)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",n=>this.onClose("transport close",n))}probe(t){let n=this.createTransport(t),r=!1;yn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function s(){r||(r=!0,u(),n.close(),n=null)}const o=d=>{const f=new Error("probe error: "+d);f.transport=n.name,s(),this.emitReserved("upgradeError",f)};function a(){o("transport closed")}function l(){o("socket closed")}function c(d){n&&d.name!==n.name&&s()}const u=()=>{n.removeListener("open",i),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",i),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",yn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let t=0;const n=this.upgrades.length;for(;t{this.onClose("ping timeout")},this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r0&&n>this.maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}write(t,n,r){return this.sendPacket("message",t,n,r),this}send(t,n,r){return this.sendPacket("message",t,n,r),this}sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}onError(t){yn.priorWebsocketSuccess=!1,this.emitReserved("error",t),this.onClose("transport error",t)}onClose(t,n){(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")&&(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),typeof removeEventListener=="function"&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const n=[];let r=0;const i=t.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Tc=Object.prototype.toString,ny=typeof Blob=="function"||typeof Blob<"u"&&Tc.call(Blob)==="[object BlobConstructor]",ry=typeof File=="function"||typeof File<"u"&&Tc.call(File)==="[object FileConstructor]";function Gs(e){return ey&&(e instanceof ArrayBuffer||ty(e))||ny&&e instanceof Blob||ry&&e instanceof File}function Hr(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n=0&&e.num0;case re.ACK:case re.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ly{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=sy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cy=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Js,Encoder:ay,get PacketType(){return re},protocol:oy},Symbol.toStringTag,{value:"Module"}));function nt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const uy=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Sc extends Ae{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[nt(t,"open",this.onopen.bind(this)),nt(t,"packet",this.onpacket.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){if(uy.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:re.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const o=this.ids++,a=n.pop();this._registerAckCallback(o,a),r.id=o}const i=this.io.engine&&this.io.engine.transport&&this.io.engine.transport.writable;return this.flags.volatile&&(!i||!this.connected)||(this.connected?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let o=0;o{this.io.clearTimeoutFn(s),n.apply(this,[null,...o])}}emitWithAck(t,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((i,s)=>{n.push((o,a)=>r?o?s(o):i(a):i(o)),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...s)=>r!==this._queue[0]?void 0:(i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:re.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case re.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case re.EVENT:case re.BINARY_EVENT:this.onevent(t);break;case re.ACK:case re.BINARY_ACK:this.onack(t);break;case re.DISCONNECT:this.ondisconnect();break;case re.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:re.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(n.apply(this,t.data),delete this.acks[t.id])}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:re.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}Nn.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Nn.prototype.reset=function(){this.attempts=0};Nn.prototype.setMin=function(e){this.ms=e};Nn.prototype.setMax=function(e){this.max=e};Nn.prototype.setJitter=function(e){this.jitter=e};class gs extends Ae{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,ki(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Nn({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||cy;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new kc(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=nt(n,"open",function(){r.onopen(),t&&t()}),s=nt(n,"error",o=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",o),t?t(o):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const o=this._timeout;o===0&&i();const a=this.setTimeoutFn(()=>{i(),n.close(),n.emit("error",new Error("timeout"))},o);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(nt(t,"ping",this.onping.bind(this)),nt(t,"data",this.ondata.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this)),nt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Oc(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Sc(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;rt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Hn={};function zr(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Z0(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,o=Hn[i]&&s in Hn[i].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new gs(r,t):(Hn[i]||(Hn[i]=new gs(r,t)),l=Hn[i]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(zr,{Manager:gs,Socket:Sc,io:zr,connect:zr});const _n=new zr("http://localhost:9600");_n.onopen=()=>{console.log("WebSocket connection established.")};_n.onclose=e=>{console.log("WebSocket connection closed:",e.code,e.reason)};_n.onerror=e=>{console.error("WebSocket error:",e)};var dy=function(){function e(t,n){n===void 0&&(n=[]),this._eventType=t,this._eventFunctions=n}return e.prototype.init=function(){var t=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(t._eventType,n)})},e}(),Qr=globalThis&&globalThis.__assign||function(){return Qr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n"u")return!1;var t=Ue(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function jy(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},s=t.elements[n];!Xe(s)||!mt(s)||(Object.assign(s.style,r),Object.keys(i).forEach(function(o){var a=i[o];a===!1?s.removeAttribute(o):s.setAttribute(o,a===!0?"":a)}))})}function Ay(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],s=t.attributes[r]||{},o=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),a=o.reduce(function(l,c){return l[c]="",l},{});!Xe(i)||!mt(i)||(Object.assign(i.style,a),Object.keys(s).forEach(function(l){i.removeAttribute(l)}))})}}const Oy={name:"applyStyles",enabled:!0,phase:"write",fn:jy,effect:Ay,requires:["computeStyles"]};function pt(e){return e.split("-")[0]}var ln=Math.max,ni=Math.min,Cn=Math.round;function ms(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Hc(){return!/^((?!chrome|android).)*safari/i.test(ms())}function Rn(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,s=1;t&&Xe(e)&&(i=e.offsetWidth>0&&Cn(r.width)/e.offsetWidth||1,s=e.offsetHeight>0&&Cn(r.height)/e.offsetHeight||1);var o=cn(e)?Ue(e):window,a=o.visualViewport,l=!Hc()&&n,c=(r.left+(l&&a?a.offsetLeft:0))/i,u=(r.top+(l&&a?a.offsetTop:0))/s,d=r.width/i,f=r.height/s;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Zs(e){var t=Rn(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function zc(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Qs(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Tt(e){return Ue(e).getComputedStyle(e)}function ky(e){return["table","td","th"].indexOf(mt(e))>=0}function Kt(e){return((cn(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ti(e){return mt(e)==="html"?e:e.assignedSlot||e.parentNode||(Qs(e)?e.host:null)||Kt(e)}function _a(e){return!Xe(e)||Tt(e).position==="fixed"?null:e.offsetParent}function Ty(e){var t=/firefox/i.test(ms()),n=/Trident/i.test(ms());if(n&&Xe(e)){var r=Tt(e);if(r.position==="fixed")return null}var i=Ti(e);for(Qs(i)&&(i=i.host);Xe(i)&&["html","body"].indexOf(mt(i))<0;){var s=Tt(i);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||t&&s.willChange==="filter"||t&&s.filter&&s.filter!=="none")return i;i=i.parentNode}return null}function yr(e){for(var t=Ue(e),n=_a(e);n&&ky(n)&&Tt(n).position==="static";)n=_a(n);return n&&(mt(n)==="html"||mt(n)==="body"&&Tt(n).position==="static")?t:n||Ty(e)||t}function eo(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Xn(e,t,n){return ln(e,ni(t,n))}function Sy(e,t,n){var r=Xn(e,t,n);return r>n?n:r}function $c(){return{top:0,right:0,bottom:0,left:0}}function Vc(e){return Object.assign({},$c(),e)}function Uc(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Cy=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,Vc(typeof t!="number"?t:Uc(t,pr))};function Ry(e){var t,n=e.state,r=e.name,i=e.options,s=n.elements.arrow,o=n.modifiersData.popperOffsets,a=pt(n.placement),l=eo(a),c=[Fe,Ze].indexOf(a)>=0,u=c?"height":"width";if(!(!s||!o)){var d=Cy(i.padding,n),f=Zs(s),p=l==="y"?De:Fe,y=l==="y"?Qe:Ze,g=n.rects.reference[u]+n.rects.reference[l]-o[l]-n.rects.popper[u],w=o[l]-n.rects.reference[l],b=yr(s),v=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,x=g/2-w/2,_=d[p],C=v-f[u]-d[y],L=v/2-f[u]/2+x,B=Xn(_,L,C),I=l;n.modifiersData[r]=(t={},t[I]=B,t.centerOffset=B-L,t)}}function Py(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||zc(t.elements.popper,i)&&(t.elements.arrow=i))}const My={name:"arrow",enabled:!0,phase:"main",fn:Ry,effect:Py,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Pn(e){return e.split("-")[1]}var Ly={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Iy(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:Cn(n*i)/i||0,y:Cn(r*i)/i||0}}function Ea(e){var t,n=e.popper,r=e.popperRect,i=e.placement,s=e.variation,o=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,y=o.y,g=y===void 0?0:y,w=typeof u=="function"?u({x:p,y:g}):{x:p,y:g};p=w.x,g=w.y;var b=o.hasOwnProperty("x"),v=o.hasOwnProperty("y"),x=Fe,_=De,C=window;if(c){var L=yr(n),B="clientHeight",I="clientWidth";if(L===Ue(n)&&(L=Kt(n),Tt(L).position!=="static"&&a==="absolute"&&(B="scrollHeight",I="scrollWidth")),L=L,i===De||(i===Fe||i===Ze)&&s===lr){_=Qe;var K=d&&L===C&&C.visualViewport?C.visualViewport.height:L[B];g-=K-r.height,g*=l?1:-1}if(i===Fe||(i===De||i===Qe)&&s===lr){x=Ze;var U=d&&L===C&&C.visualViewport?C.visualViewport.width:L[I];p-=U-r.width,p*=l?1:-1}}var G=Object.assign({position:a},c&&Ly),ce=u===!0?Iy({x:p,y:g},Ue(n)):{x:p,y:g};if(p=ce.x,g=ce.y,l){var ue;return Object.assign({},G,(ue={},ue[_]=v?"0":"",ue[x]=b?"0":"",ue.transform=(C.devicePixelRatio||1)<=1?"translate("+p+"px, "+g+"px)":"translate3d("+p+"px, "+g+"px, 0)",ue))}return Object.assign({},G,(t={},t[_]=v?g+"px":"",t[x]=b?p+"px":"",t.transform="",t))}function Ny(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,s=n.adaptive,o=s===void 0?!0:s,a=n.roundOffsets,l=a===void 0?!0:a,c={placement:pt(t.placement),variation:Pn(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ea(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ea(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const By={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Ny,data:{}};var Ar={passive:!0};function Dy(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,s=i===void 0?!0:i,o=r.resize,a=o===void 0?!0:o,l=Ue(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&c.forEach(function(u){u.addEventListener("scroll",n.update,Ar)}),a&&l.addEventListener("resize",n.update,Ar),function(){s&&c.forEach(function(u){u.removeEventListener("scroll",n.update,Ar)}),a&&l.removeEventListener("resize",n.update,Ar)}}const Fy={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Dy,data:{}};var Hy={left:"right",right:"left",bottom:"top",top:"bottom"};function Vr(e){return e.replace(/left|right|bottom|top/g,function(t){return Hy[t]})}var zy={start:"end",end:"start"};function ja(e){return e.replace(/start|end/g,function(t){return zy[t]})}function to(e){var t=Ue(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function no(e){return Rn(Kt(e)).left+to(e).scrollLeft}function $y(e,t){var n=Ue(e),r=Kt(e),i=n.visualViewport,s=r.clientWidth,o=r.clientHeight,a=0,l=0;if(i){s=i.width,o=i.height;var c=Hc();(c||!c&&t==="fixed")&&(a=i.offsetLeft,l=i.offsetTop)}return{width:s,height:o,x:a+no(e),y:l}}function Vy(e){var t,n=Kt(e),r=to(e),i=(t=e.ownerDocument)==null?void 0:t.body,s=ln(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=ln(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-r.scrollLeft+no(e),l=-r.scrollTop;return Tt(i||n).direction==="rtl"&&(a+=ln(n.clientWidth,i?i.clientWidth:0)-s),{width:s,height:o,x:a,y:l}}function ro(e){var t=Tt(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function Kc(e){return["html","body","#document"].indexOf(mt(e))>=0?e.ownerDocument.body:Xe(e)&&ro(e)?e:Kc(Ti(e))}function Qn(e,t){var n;t===void 0&&(t=[]);var r=Kc(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),s=Ue(r),o=i?[s].concat(s.visualViewport||[],ro(r)?r:[]):r,a=t.concat(o);return i?a:a.concat(Qn(Ti(o)))}function vs(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Uy(e,t){var n=Rn(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Aa(e,t,n){return t===Dc?vs($y(e,n)):cn(t)?Uy(t,n):vs(Vy(Kt(e)))}function Ky(e){var t=Qn(Ti(e)),n=["absolute","fixed"].indexOf(Tt(e).position)>=0,r=n&&Xe(e)?yr(e):e;return cn(r)?t.filter(function(i){return cn(i)&&zc(i,r)&&mt(i)!=="body"}):[]}function Wy(e,t,n,r){var i=t==="clippingParents"?Ky(e):[].concat(t),s=[].concat(i,[n]),o=s[0],a=s.reduce(function(l,c){var u=Aa(e,c,r);return l.top=ln(u.top,l.top),l.right=ni(u.right,l.right),l.bottom=ni(u.bottom,l.bottom),l.left=ln(u.left,l.left),l},Aa(e,o,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Wc(e){var t=e.reference,n=e.element,r=e.placement,i=r?pt(r):null,s=r?Pn(r):null,o=t.x+t.width/2-n.width/2,a=t.y+t.height/2-n.height/2,l;switch(i){case De:l={x:o,y:t.y-n.height};break;case Qe:l={x:o,y:t.y+t.height};break;case Ze:l={x:t.x+t.width,y:a};break;case Fe:l={x:t.x-n.width,y:a};break;default:l={x:t.x,y:t.y}}var c=i?eo(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(s){case Sn:l[c]=l[c]-(t[u]/2-n[u]/2);break;case lr:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function cr(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,s=n.strategy,o=s===void 0?e.strategy:s,a=n.boundary,l=a===void 0?fy:a,c=n.rootBoundary,u=c===void 0?Dc:c,d=n.elementContext,f=d===void 0?zn:d,p=n.altBoundary,y=p===void 0?!1:p,g=n.padding,w=g===void 0?0:g,b=Vc(typeof w!="number"?w:Uc(w,pr)),v=f===zn?hy:zn,x=e.rects.popper,_=e.elements[y?v:f],C=Wy(cn(_)?_:_.contextElement||Kt(e.elements.popper),l,u,o),L=Rn(e.elements.reference),B=Wc({reference:L,element:x,strategy:"absolute",placement:i}),I=vs(Object.assign({},x,B)),K=f===zn?I:L,U={top:C.top-K.top+b.top,bottom:K.bottom-C.bottom+b.bottom,left:C.left-K.left+b.left,right:K.right-C.right+b.right},G=e.modifiersData.offset;if(f===zn&&G){var ce=G[i];Object.keys(U).forEach(function(ue){var be=[Ze,Qe].indexOf(ue)>=0?1:-1,Se=[De,Qe].indexOf(ue)>=0?"y":"x";U[ue]+=ce[Se]*be})}return U}function qy(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,s=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?Fc:l,u=Pn(r),d=u?a?wa:wa.filter(function(y){return Pn(y)===u}):pr,f=d.filter(function(y){return c.indexOf(y)>=0});f.length===0&&(f=d);var p=f.reduce(function(y,g){return y[g]=cr(e,{placement:g,boundary:i,rootBoundary:s,padding:o})[pt(g)],y},{});return Object.keys(p).sort(function(y,g){return p[y]-p[g]})}function Yy(e){if(pt(e)===Xs)return[];var t=Vr(e);return[ja(e),t,ja(t)]}function Gy(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!0:o,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,y=p===void 0?!0:p,g=n.allowedAutoPlacements,w=t.options.placement,b=pt(w),v=b===w,x=l||(v||!y?[Vr(w)]:Yy(w)),_=[w].concat(x).reduce(function(Ee,A){return Ee.concat(pt(A)===Xs?qy(t,{placement:A,boundary:u,rootBoundary:d,padding:c,flipVariations:y,allowedAutoPlacements:g}):A)},[]),C=t.rects.reference,L=t.rects.popper,B=new Map,I=!0,K=_[0],U=0;U<_.length;U++){var G=_[U],ce=pt(G),ue=Pn(G)===Sn,be=[De,Qe].indexOf(ce)>=0,Se=be?"width":"height",te=cr(t,{placement:G,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),W=be?ue?Ze:Fe:ue?Qe:De;C[Se]>L[Se]&&(W=Vr(W));var Z=Vr(W),he=[];if(s&&he.push(te[ce]<=0),a&&he.push(te[W]<=0,te[Z]<=0),he.every(function(Ee){return Ee})){K=G,I=!1;break}B.set(G,he)}if(I)for(var Le=y?3:1,ve=function(A){var D=_.find(function(N){var z=B.get(N);if(z)return z.slice(0,A).every(function(ne){return ne})});if(D)return K=D,"break"},pe=Le;pe>0;pe--){var Ce=ve(pe);if(Ce==="break")break}t.placement!==K&&(t.modifiersData[r]._skip=!0,t.placement=K,t.reset=!0)}}const Jy={name:"flip",enabled:!0,phase:"main",fn:Gy,requiresIfExists:["offset"],data:{_skip:!1}};function Oa(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function ka(e){return[De,Ze,Qe,Fe].some(function(t){return e[t]>=0})}function Xy(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,s=t.modifiersData.preventOverflow,o=cr(t,{elementContext:"reference"}),a=cr(t,{altBoundary:!0}),l=Oa(o,r),c=Oa(a,i,s),u=ka(l),d=ka(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const Qy={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:Xy};function Zy(e,t,n){var r=pt(e),i=[Fe,De].indexOf(r)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,o=s[0],a=s[1];return o=o||0,a=(a||0)*i,[Fe,Ze].indexOf(r)>=0?{x:a,y:o}:{x:o,y:a}}function eg(e){var t=e.state,n=e.options,r=e.name,i=n.offset,s=i===void 0?[0,0]:i,o=Fc.reduce(function(u,d){return u[d]=Zy(d,t.rects,s),u},{}),a=o[t.placement],l=a.x,c=a.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=o}const tg={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:eg};function ng(e){var t=e.state,n=e.name;t.modifiersData[n]=Wc({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const rg={name:"popperOffsets",enabled:!0,phase:"read",fn:ng,data:{}};function ig(e){return e==="x"?"y":"x"}function sg(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,s=i===void 0?!0:i,o=n.altAxis,a=o===void 0?!1:o,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,y=n.tetherOffset,g=y===void 0?0:y,w=cr(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=pt(t.placement),v=Pn(t.placement),x=!v,_=eo(b),C=ig(_),L=t.modifiersData.popperOffsets,B=t.rects.reference,I=t.rects.popper,K=typeof g=="function"?g(Object.assign({},t.rects,{placement:t.placement})):g,U=typeof K=="number"?{mainAxis:K,altAxis:K}:Object.assign({mainAxis:0,altAxis:0},K),G=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,ce={x:0,y:0};if(L){if(s){var ue,be=_==="y"?De:Fe,Se=_==="y"?Qe:Ze,te=_==="y"?"height":"width",W=L[_],Z=W+w[be],he=W-w[Se],Le=p?-I[te]/2:0,ve=v===Sn?B[te]:I[te],pe=v===Sn?-I[te]:-B[te],Ce=t.elements.arrow,Ee=p&&Ce?Zs(Ce):{width:0,height:0},A=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:$c(),D=A[be],N=A[Se],z=Xn(0,B[te],Ee[te]),ne=x?B[te]/2-Le-z-D-U.mainAxis:ve-z-D-U.mainAxis,ye=x?-B[te]/2+Le+z+N+U.mainAxis:pe+z+N+U.mainAxis,J=t.elements.arrow&&yr(t.elements.arrow),h=J?_==="y"?J.clientTop||0:J.clientLeft||0:0,m=(ue=G==null?void 0:G[_])!=null?ue:0,j=W+ne-m-h,O=W+ye-m,T=Xn(p?ni(Z,j):Z,W,p?ln(he,O):he);L[_]=T,ce[_]=T-W}if(a){var P,F=_==="x"?De:Fe,R=_==="x"?Qe:Ze,M=L[C],S=C==="y"?"height":"width",V=M+w[F],H=M-w[R],$=[De,Fe].indexOf(b)!==-1,q=(P=G==null?void 0:G[C])!=null?P:0,ee=$?V:M-B[S]-I[S]-q+U.altAxis,de=$?M+B[S]+I[S]-q-U.altAxis:H,le=p&&$?Sy(ee,M,de):Xn(p?ee:V,M,p?de:H);L[C]=le,ce[C]=le-M}t.modifiersData[r]=ce}}const og={name:"preventOverflow",enabled:!0,phase:"main",fn:sg,requiresIfExists:["offset"]};function ag(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function lg(e){return e===Ue(e)||!Xe(e)?to(e):ag(e)}function cg(e){var t=e.getBoundingClientRect(),n=Cn(t.width)/e.offsetWidth||1,r=Cn(t.height)/e.offsetHeight||1;return n!==1||r!==1}function ug(e,t,n){n===void 0&&(n=!1);var r=Xe(t),i=Xe(t)&&cg(t),s=Kt(t),o=Rn(e,i,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((mt(t)!=="body"||ro(s))&&(a=lg(t)),Xe(t)?(l=Rn(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):s&&(l.x=no(s))),{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function dg(e){var t=new Map,n=new Set,r=[];e.forEach(function(s){t.set(s.name,s)});function i(s){n.add(s.name);var o=[].concat(s.requires||[],s.requiresIfExists||[]);o.forEach(function(a){if(!n.has(a)){var l=t.get(a);l&&i(l)}}),r.push(s)}return e.forEach(function(s){n.has(s.name)||i(s)}),r}function fg(e){var t=dg(e);return Ey.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function hg(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function pg(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var Ta={placement:"bottom",modifiers:[],strategy:"absolute"};function Sa(){for(var e=arguments.length,t=new Array(e),n=0;n(cd("data-v-f0b6ce60"),e=e(),ud(),e),xg={class:"overflow-y-scroll flex flex-col no-scrollbar shadow-lg min-w-[24rem] max-w-[24rem] bg-bg-light-tone dark:bg-bg-dark-tone"},bg={class:"z-10 sticky top-0 flex-row p-2 flex items-center gap-3 flex-0 bg-bg-light-tone dark:bg-bg-dark-tone mt-0 px-4 shadow-md"},wg=gr(()=>E("i",{"data-feather":"plus"},null,-1)),_g=[wg],Eg=Fs('',3),jg={class:"relative"},Ag=gr(()=>E("div",{class:"absolute inset-y-0 left-0 flex items-center pl-3 pointer-events-none"},[E("div",{class:"scale-75"},[E("i",{"data-feather":"search"})])],-1)),Og={class:"absolute inset-y-0 right-0 flex items-center pr-3"},kg=gr(()=>E("i",{"data-feather":"x"},null,-1)),Tg=[kg],Sg={class:"relative overflow-y-scroll no-scrollbar"},Cg={key:0,class:"gap-2 py-2 my-2 hover:shadow-md hover:bg-primary-light dark:hover:bg-primary rounded-md p-2 duration-75 group cursor-pointer"},Rg=gr(()=>E("p",{class:"px-3"},"No discussions are found",-1)),Pg=[Rg],Mg=gr(()=>E("div",{class:"sticky bottom-0 bg-gradient-to-t pointer-events-none from-bg-light-tone dark:from-bg-dark-tone flex height-64"},null,-1)),Lg={setup(){},data(){return{list:[],tempList:[],currentDiscussion:Number,discussionArr:[],loading:!1,filterTitle:"",filterInProgress:!1,showCreateDiscussionModal:!1}},methods:{async list_discussions(){try{const e=await Zt.get("/list_discussions");if(e)return this.list=e.data,this.tempList=this.list,e.data}catch(e){return console.log(e),[]}},async load_discussion(e){try{if(e){this.loading=!0;const t=await Zt.post("/load_discussion",{id:e});this.loading=!1,t&&(this.discussionArr=t.data.filter(n=>n.sender!="conditionner"))}}catch(t){console.log(t),this.loading=!1}},async new_discussion(e){try{const t=await Zt.get("/new_discussion",{params:{title:e}});if(t)return t.data}catch(t){return console.log(t),{}}},async delete_discussion(e){try{if(e){this.loading=!0;const t=await Zt.post("/delete_discussion",{id:e});this.loading=!1}}catch(t){console.log(t),this.loading=!1}},async edit_title(e,t){try{if(e){this.loading=!0;const n=await Zt.post("/edit_title",{id:e,title:t});if(this.loading=!1,n.status==200){const r=this.list.findIndex(s=>s.id==e),i=this.list[r];i.title=t,this.tempList=this.list}}}catch(n){console.log(n),this.loading=!1}},filterDiscussions(){this.filterInProgress||(this.filterInProgress=!0,setTimeout(()=>{this.list=this.tempList.filter(e=>e.title.includes(this.filterTitle)),this.filterInProgress=!1},100))},async selectDiscussion(e){this.currentDiscussion=e,await this.load_discussion(e.id),this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)},scrollToElement(e){e&&e.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})},createMsg(e){let t={content:e.message,id:e.message,rank:0,sender:e.user};this.discussionArr.push(t),it(()=>{const r=document.getElementById("msg-"+e.message);this.scrollToElement(r)});let n={content:"..typing",id:e.response_id,rank:0,sender:e.bot};this.discussionArr.push(n),it(()=>{const r=document.getElementById("msg-"+e.response_id);this.scrollToElement(r)}),(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,t.content)},sendMsg(e){_n.emit("generate_msg",{prompt:e})},steamMessageContent(e){const t=this.discussionArr[this.discussionArr.length-1];t.content=e.data},async changeTitleUsingUserMSG(e,t){const n=this.list.findIndex(i=>i.id==e),r=this.list[n];t&&(r.title=t,this.tempList=this.list),await this.edit_title(e,t)},async createNewDiscussion(){const e=await this.new_discussion();await this.list_discussions();const t=this.list.findIndex(r=>r.id==e.id),n=this.list[t];this.selectDiscussion(n),it(()=>{const r=document.getElementById("dis-"+e.id);this.scrollToElement(r)})},async deleteDiscussion(e){const t=this.list.findIndex(r=>r.id==e),n=this.list[t];n.loading=!0,this.delete_discussion(e),this.currentDiscussion.id==e&&(this.currentDiscussion={}),await this.list_discussions()},async editTitle(e){await this.edit_title(e.id,e.title)}},async created(){await this.list_discussions(),it(()=>{kn.replace()}),_n.on("infos",this.createMsg),_n.on("message",this.steamMessageContent)},components:{Discussion:uc,Message:dc,ChatBox:fc,WelcomeComponent:hc},watch:{filterTitle(e,t){e==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)}}},Ig=Object.assign(Lg,{__name:"DiscussionsView",setup(e){return mi(()=>{mg()}),Zt.defaults.baseURL="/",(t,n)=>(X(),ie(Oe,null,[E("div",xg,[E("div",bg,[E("button",{class:"text-2xl hover:text-secondary duration-75 active:scale-90",title:"Create new discussion",type:"button",onClick:n[0]||(n[0]=r=>t.createNewDiscussion())},_g),Eg,E("form",null,[E("div",jg,[Ag,E("div",Og,[E("div",{class:_t(["hover:text-secondary duration-75 active:scale-90",t.filterTitle?"visible":"invisible"]),title:"Clear",onClick:n[1]||(n[1]=r=>t.filterTitle="")},Tg,2)]),Ne(E("input",{type:"search",id:"default-search",class:"block w-full p-2 pl-10 pr-10 text-sm border border-gray-300 rounded-lg bg-bg-light focus:ring-secondary focus:border-secondary dark:bg-bg-dark dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-secondary dark:focus:border-secondary",placeholder:"Search...",title:"Filter discussions by title","onUpdate:modelValue":n[2]||(n[2]=r=>t.filterTitle=r),onInput:n[3]||(n[3]=r=>t.filterDiscussions())},null,544),[[Be,t.filterTitle]])])])]),E("div",Sg,[E("div",{class:_t(["mx-4 flex-grow",t.filterInProgress?"opacity-20 pointer-events-none":""])},[(X(!0),ie(Oe,null,Jt(t.list,(r,i)=>(X(),sn(uc,{key:i,id:r.id,title:r.title,ref_for:!0,ref:"discussionList",selected:t.currentDiscussion.id==r.id,loading:t.currentDiscussion.id==r.id&&t.loading,onSelect:s=>t.selectDiscussion(r),onDelete:s=>t.deleteDiscussion(r.id),onEditTitle:t.editTitle},null,8,["id","title","selected","loading","onSelect","onDelete","onEditTitle"]))),128)),t.list.length<1?(X(),ie("div",Cg,Pg)):qe("",!0),Mg],2)])]),E("div",{class:_t(["overflow-y-scroll flex flex-col no-scrollbar flex-grow",t.loading?"opacity-20 pointer-events-none":""])},[E("div",null,[(X(!0),ie(Oe,null,Jt(t.discussionArr,(r,i)=>(X(),sn(dc,{key:i,message:r,onClick:n[4]||(n[4]=s=>t.scrollToElement(s.target)),id:"msg-"+r.id},null,8,["message","id"]))),128)),t.discussionArr.length<1?(X(),sn(hc,{key:0})):qe("",!0),t.discussionArr.length>0?(X(),sn(fc,{key:1,onMessageSentEvent:t.sendMsg},null,8,["onMessageSentEvent"])):qe("",!0)])],2)],64))}}),Ng=Ct(Ig,[["__scopeId","data-v-f0b6ce60"]]),Bg=Dh({history:nh("/"),routes:[{path:"/extensions/",name:"extensions",component:pp},{path:"/help/",name:"help",component:mp},{path:"/settings/",name:"settings",component:S2},{path:"/training/",name:"training",component:P2},{path:"/",name:"discussions",component:Ng}]});const ou=Bf(dp);ou.use(Bg);ou.mount("#app"); diff --git a/web/src/views/SettingsView.vue b/web/src/views/SettingsView.vue index 5d67b4f3..ea98af35 100644 --- a/web/src/views/SettingsView.vue +++ b/web/src/views/SettingsView.vue @@ -68,7 +68,7 @@

-

@@ -80,7 +80,7 @@
-