From 782c6fd57134b9a3fa45fd841f4c481eab973478 Mon Sep 17 00:00:00 2001 From: AndzejsP Date: Fri, 2 Jun 2023 12:25:05 +0300 Subject: [PATCH] test 3 --- web/.env | 2 +- web/dist/assets/{index-de4e3263.js => index-be8e90e6.js} | 2 +- web/dist/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename web/dist/assets/{index-de4e3263.js => index-be8e90e6.js} (99%) diff --git a/web/.env b/web/.env index e9a180b5..d3272380 100644 --- a/web/.env +++ b/web/.env @@ -1,4 +1,4 @@ -VITE_GPT4ALL_API = http://0.0.0.0:9600 # http://localhost:9600 +VITE_GPT4ALL_API = https://0.0.0.0:9600 # http://localhost:9600 VITE_GPT4ALL_API_CHANGE_ORIGIN = 0 # FALSE VITE_GPT4ALL_API_SECURE = 1 # FALSE VITE_GPT4ALL_API_BASEURL = / diff --git a/web/dist/assets/index-de4e3263.js b/web/dist/assets/index-be8e90e6.js similarity index 99% rename from web/dist/assets/index-de4e3263.js rename to web/dist/assets/index-be8e90e6.js index c62381f5..8991f317 100644 --- a/web/dist/assets/index-de4e3263.js +++ b/web/dist/assets/index-be8e90e6.js @@ -8,7 +8,7 @@ http://jedwatson.github.io/classnames */(function(){var a=function(){function l(){}l.prototype=Object.create(null);function c(E,h){for(var b=h.length,T=0;T1?arguments[1]:void 0,h=E!==void 0,b=0,T=_(m),O,C,x,A;if(h&&(E=i(E,S>2?arguments[2]:void 0,2)),T!=null&&!(g==Array&&l(T)))for(A=T.call(m),C=new g;!(x=A.next()).done;b++)d(C,b,h?a(A,E,[x.value,b],!0):x.value);else for(O=c(m.length),C=new g(O);O>b;b++)d(C,b,h?E(m[b],b):m[b]);return C.length=b,C}},"./node_modules/core-js/internals/array-includes.js":function(n,r,o){var i=o("./node_modules/core-js/internals/to-indexed-object.js"),s=o("./node_modules/core-js/internals/to-length.js"),a=o("./node_modules/core-js/internals/to-absolute-index.js");n.exports=function(l){return function(c,d,_){var u=i(c),p=s(u.length),m=a(_,p),g;if(l&&d!=d){for(;p>m;)if(g=u[m++],g!=g)return!0}else for(;p>m;m++)if((l||m in u)&&u[m]===d)return l||m||0;return!l&&-1}}},"./node_modules/core-js/internals/bind-context.js":function(n,r,o){var i=o("./node_modules/core-js/internals/a-function.js");n.exports=function(s,a,l){if(i(s),a===void 0)return s;switch(l){case 0:return function(){return s.call(a)};case 1:return function(c){return s.call(a,c)};case 2:return function(c,d){return s.call(a,c,d)};case 3:return function(c,d,_){return s.call(a,c,d,_)}}return function(){return s.apply(a,arguments)}}},"./node_modules/core-js/internals/call-with-safe-iteration-closing.js":function(n,r,o){var i=o("./node_modules/core-js/internals/an-object.js");n.exports=function(s,a,l,c){try{return c?a(i(l)[0],l[1]):a(l)}catch(_){var d=s.return;throw d!==void 0&&i(d.call(s)),_}}},"./node_modules/core-js/internals/check-correctness-of-iteration.js":function(n,r,o){var i=o("./node_modules/core-js/internals/well-known-symbol.js"),s=i("iterator"),a=!1;try{var l=0,c={next:function(){return{done:!!l++}},return:function(){a=!0}};c[s]=function(){return this},Array.from(c,function(){throw 2})}catch{}n.exports=function(d,_){if(!_&&!a)return!1;var u=!1;try{var p={};p[s]=function(){return{next:function(){return{done:u=!0}}}},d(p)}catch{}return u}},"./node_modules/core-js/internals/classof-raw.js":function(n,r){var o={}.toString;n.exports=function(i){return o.call(i).slice(8,-1)}},"./node_modules/core-js/internals/classof.js":function(n,r,o){var i=o("./node_modules/core-js/internals/classof-raw.js"),s=o("./node_modules/core-js/internals/well-known-symbol.js"),a=s("toStringTag"),l=i(function(){return arguments}())=="Arguments",c=function(d,_){try{return d[_]}catch{}};n.exports=function(d){var _,u,p;return d===void 0?"Undefined":d===null?"Null":typeof(u=c(_=Object(d),a))=="string"?u:l?i(_):(p=i(_))=="Object"&&typeof _.callee=="function"?"Arguments":p}},"./node_modules/core-js/internals/copy-constructor-properties.js":function(n,r,o){var i=o("./node_modules/core-js/internals/has.js"),s=o("./node_modules/core-js/internals/own-keys.js"),a=o("./node_modules/core-js/internals/object-get-own-property-descriptor.js"),l=o("./node_modules/core-js/internals/object-define-property.js");n.exports=function(c,d){for(var _=s(d),u=l.f,p=a.f,m=0;m<_.length;m++){var g=_[m];i(c,g)||u(c,g,p(d,g))}}},"./node_modules/core-js/internals/correct-prototype-getter.js":function(n,r,o){var i=o("./node_modules/core-js/internals/fails.js");n.exports=!i(function(){function s(){}return s.prototype.constructor=null,Object.getPrototypeOf(new s)!==s.prototype})},"./node_modules/core-js/internals/create-iterator-constructor.js":function(n,r,o){var i=o("./node_modules/core-js/internals/iterators-core.js").IteratorPrototype,s=o("./node_modules/core-js/internals/object-create.js"),a=o("./node_modules/core-js/internals/create-property-descriptor.js"),l=o("./node_modules/core-js/internals/set-to-string-tag.js"),c=o("./node_modules/core-js/internals/iterators.js"),d=function(){return this};n.exports=function(_,u,p){var m=u+" Iterator";return _.prototype=s(i,{next:a(1,p)}),l(_,m,!1,!0),c[m]=d,_}},"./node_modules/core-js/internals/create-property-descriptor.js":function(n,r){n.exports=function(o,i){return{enumerable:!(o&1),configurable:!(o&2),writable:!(o&4),value:i}}},"./node_modules/core-js/internals/create-property.js":function(n,r,o){var i=o("./node_modules/core-js/internals/to-primitive.js"),s=o("./node_modules/core-js/internals/object-define-property.js"),a=o("./node_modules/core-js/internals/create-property-descriptor.js");n.exports=function(l,c,d){var _=i(c);_ in l?s.f(l,_,a(0,d)):l[_]=d}},"./node_modules/core-js/internals/define-iterator.js":function(n,r,o){var i=o("./node_modules/core-js/internals/export.js"),s=o("./node_modules/core-js/internals/create-iterator-constructor.js"),a=o("./node_modules/core-js/internals/object-get-prototype-of.js"),l=o("./node_modules/core-js/internals/object-set-prototype-of.js"),c=o("./node_modules/core-js/internals/set-to-string-tag.js"),d=o("./node_modules/core-js/internals/hide.js"),_=o("./node_modules/core-js/internals/redefine.js"),u=o("./node_modules/core-js/internals/well-known-symbol.js"),p=o("./node_modules/core-js/internals/is-pure.js"),m=o("./node_modules/core-js/internals/iterators.js"),g=o("./node_modules/core-js/internals/iterators-core.js"),S=g.IteratorPrototype,E=g.BUGGY_SAFARI_ITERATORS,h=u("iterator"),b="keys",T="values",O="entries",C=function(){return this};n.exports=function(x,A,G,P,L,H,oe){s(G,A,P);var k=function(ye){if(ye===L&&re)return re;if(!E&&ye in I)return I[ye];switch(ye){case b:return function(){return new G(this,ye)};case T:return function(){return new G(this,ye)};case O:return function(){return new G(this,ye)}}return function(){return new G(this)}},ne=A+" Iterator",K=!1,I=x.prototype,Y=I[h]||I["@@iterator"]||L&&I[L],re=!E&&Y||k(L),pe=A=="Array"&&I.entries||Y,ue,fe,Re;if(pe&&(ue=a(pe.call(new x)),S!==Object.prototype&&ue.next&&(!p&&a(ue)!==S&&(l?l(ue,S):typeof ue[h]!="function"&&d(ue,h,C)),c(ue,ne,!0,!0),p&&(m[ne]=C))),L==T&&Y&&Y.name!==T&&(K=!0,re=function(){return Y.call(this)}),(!p||oe)&&I[h]!==re&&d(I,h,re),m[A]=re,L)if(fe={values:k(T),keys:H?re:k(b),entries:k(O)},oe)for(Re in fe)(E||K||!(Re in I))&&_(I,Re,fe[Re]);else i({target:A,proto:!0,forced:E||K},fe);return fe}},"./node_modules/core-js/internals/descriptors.js":function(n,r,o){var i=o("./node_modules/core-js/internals/fails.js");n.exports=!i(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/document-create-element.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/is-object.js"),a=i.document,l=s(a)&&s(a.createElement);n.exports=function(c){return l?a.createElement(c):{}}},"./node_modules/core-js/internals/enum-bug-keys.js":function(n,r){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"./node_modules/core-js/internals/export.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/object-get-own-property-descriptor.js").f,a=o("./node_modules/core-js/internals/hide.js"),l=o("./node_modules/core-js/internals/redefine.js"),c=o("./node_modules/core-js/internals/set-global.js"),d=o("./node_modules/core-js/internals/copy-constructor-properties.js"),_=o("./node_modules/core-js/internals/is-forced.js");n.exports=function(u,p){var m=u.target,g=u.global,S=u.stat,E,h,b,T,O,C;if(g?h=i:S?h=i[m]||c(m,{}):h=(i[m]||{}).prototype,h)for(b in p){if(O=p[b],u.noTargetGet?(C=s(h,b),T=C&&C.value):T=h[b],E=_(g?b:m+(S?".":"#")+b,u.forced),!E&&T!==void 0){if(typeof O==typeof T)continue;d(O,T)}(u.sham||T&&T.sham)&&a(O,"sham",!0),l(h,b,O,u)}}},"./node_modules/core-js/internals/fails.js":function(n,r){n.exports=function(o){try{return!!o()}catch{return!0}}},"./node_modules/core-js/internals/function-to-string.js":function(n,r,o){var i=o("./node_modules/core-js/internals/shared.js");n.exports=i("native-function-to-string",Function.toString)},"./node_modules/core-js/internals/get-iterator-method.js":function(n,r,o){var i=o("./node_modules/core-js/internals/classof.js"),s=o("./node_modules/core-js/internals/iterators.js"),a=o("./node_modules/core-js/internals/well-known-symbol.js"),l=a("iterator");n.exports=function(c){if(c!=null)return c[l]||c["@@iterator"]||s[i(c)]}},"./node_modules/core-js/internals/global.js":function(n,r,o){(function(i){var s="object",a=function(l){return l&&l.Math==Math&&l};n.exports=a(typeof globalThis==s&&globalThis)||a(typeof window==s&&window)||a(typeof self==s&&self)||a(typeof i==s&&i)||Function("return this")()}).call(this,o("./node_modules/webpack/buildin/global.js"))},"./node_modules/core-js/internals/has.js":function(n,r){var o={}.hasOwnProperty;n.exports=function(i,s){return o.call(i,s)}},"./node_modules/core-js/internals/hidden-keys.js":function(n,r){n.exports={}},"./node_modules/core-js/internals/hide.js":function(n,r,o){var i=o("./node_modules/core-js/internals/descriptors.js"),s=o("./node_modules/core-js/internals/object-define-property.js"),a=o("./node_modules/core-js/internals/create-property-descriptor.js");n.exports=i?function(l,c,d){return s.f(l,c,a(1,d))}:function(l,c,d){return l[c]=d,l}},"./node_modules/core-js/internals/html.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=i.document;n.exports=s&&s.documentElement},"./node_modules/core-js/internals/ie8-dom-define.js":function(n,r,o){var i=o("./node_modules/core-js/internals/descriptors.js"),s=o("./node_modules/core-js/internals/fails.js"),a=o("./node_modules/core-js/internals/document-create-element.js");n.exports=!i&&!s(function(){return Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a!=7})},"./node_modules/core-js/internals/indexed-object.js":function(n,r,o){var i=o("./node_modules/core-js/internals/fails.js"),s=o("./node_modules/core-js/internals/classof-raw.js"),a="".split;n.exports=i(function(){return!Object("z").propertyIsEnumerable(0)})?function(l){return s(l)=="String"?a.call(l,""):Object(l)}:Object},"./node_modules/core-js/internals/internal-state.js":function(n,r,o){var i=o("./node_modules/core-js/internals/native-weak-map.js"),s=o("./node_modules/core-js/internals/global.js"),a=o("./node_modules/core-js/internals/is-object.js"),l=o("./node_modules/core-js/internals/hide.js"),c=o("./node_modules/core-js/internals/has.js"),d=o("./node_modules/core-js/internals/shared-key.js"),_=o("./node_modules/core-js/internals/hidden-keys.js"),u=s.WeakMap,p,m,g,S=function(x){return g(x)?m(x):p(x,{})},E=function(x){return function(A){var G;if(!a(A)||(G=m(A)).type!==x)throw TypeError("Incompatible receiver, "+x+" required");return G}};if(i){var h=new u,b=h.get,T=h.has,O=h.set;p=function(x,A){return O.call(h,x,A),A},m=function(x){return b.call(h,x)||{}},g=function(x){return T.call(h,x)}}else{var C=d("state");_[C]=!0,p=function(x,A){return l(x,C,A),A},m=function(x){return c(x,C)?x[C]:{}},g=function(x){return c(x,C)}}n.exports={set:p,get:m,has:g,enforce:S,getterFor:E}},"./node_modules/core-js/internals/is-array-iterator-method.js":function(n,r,o){var i=o("./node_modules/core-js/internals/well-known-symbol.js"),s=o("./node_modules/core-js/internals/iterators.js"),a=i("iterator"),l=Array.prototype;n.exports=function(c){return c!==void 0&&(s.Array===c||l[a]===c)}},"./node_modules/core-js/internals/is-forced.js":function(n,r,o){var i=o("./node_modules/core-js/internals/fails.js"),s=/#|\.prototype\./,a=function(u,p){var m=c[l(u)];return m==_?!0:m==d?!1:typeof p=="function"?i(p):!!p},l=a.normalize=function(u){return String(u).replace(s,".").toLowerCase()},c=a.data={},d=a.NATIVE="N",_=a.POLYFILL="P";n.exports=a},"./node_modules/core-js/internals/is-object.js":function(n,r){n.exports=function(o){return typeof o=="object"?o!==null:typeof o=="function"}},"./node_modules/core-js/internals/is-pure.js":function(n,r){n.exports=!1},"./node_modules/core-js/internals/iterators-core.js":function(n,r,o){var i=o("./node_modules/core-js/internals/object-get-prototype-of.js"),s=o("./node_modules/core-js/internals/hide.js"),a=o("./node_modules/core-js/internals/has.js"),l=o("./node_modules/core-js/internals/well-known-symbol.js"),c=o("./node_modules/core-js/internals/is-pure.js"),d=l("iterator"),_=!1,u=function(){return this},p,m,g;[].keys&&(g=[].keys(),"next"in g?(m=i(i(g)),m!==Object.prototype&&(p=m)):_=!0),p==null&&(p={}),!c&&!a(p,d)&&s(p,d,u),n.exports={IteratorPrototype:p,BUGGY_SAFARI_ITERATORS:_}},"./node_modules/core-js/internals/iterators.js":function(n,r){n.exports={}},"./node_modules/core-js/internals/native-symbol.js":function(n,r,o){var i=o("./node_modules/core-js/internals/fails.js");n.exports=!!Object.getOwnPropertySymbols&&!i(function(){return!String(Symbol())})},"./node_modules/core-js/internals/native-weak-map.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/function-to-string.js"),a=i.WeakMap;n.exports=typeof a=="function"&&/native code/.test(s.call(a))},"./node_modules/core-js/internals/object-create.js":function(n,r,o){var i=o("./node_modules/core-js/internals/an-object.js"),s=o("./node_modules/core-js/internals/object-define-properties.js"),a=o("./node_modules/core-js/internals/enum-bug-keys.js"),l=o("./node_modules/core-js/internals/hidden-keys.js"),c=o("./node_modules/core-js/internals/html.js"),d=o("./node_modules/core-js/internals/document-create-element.js"),_=o("./node_modules/core-js/internals/shared-key.js"),u=_("IE_PROTO"),p="prototype",m=function(){},g=function(){var S=d("iframe"),E=a.length,h="<",b="script",T=">",O="java"+b+":",C;for(S.style.display="none",c.appendChild(S),S.src=String(O),C=S.contentWindow.document,C.open(),C.write(h+b+T+"document.F=Object"+h+"/"+b+T),C.close(),g=C.F;E--;)delete g[p][a[E]];return g()};n.exports=Object.create||function(E,h){var b;return E!==null?(m[p]=i(E),b=new m,m[p]=null,b[u]=E):b=g(),h===void 0?b:s(b,h)},l[u]=!0},"./node_modules/core-js/internals/object-define-properties.js":function(n,r,o){var i=o("./node_modules/core-js/internals/descriptors.js"),s=o("./node_modules/core-js/internals/object-define-property.js"),a=o("./node_modules/core-js/internals/an-object.js"),l=o("./node_modules/core-js/internals/object-keys.js");n.exports=i?Object.defineProperties:function(d,_){a(d);for(var u=l(_),p=u.length,m=0,g;p>m;)s.f(d,g=u[m++],_[g]);return d}},"./node_modules/core-js/internals/object-define-property.js":function(n,r,o){var i=o("./node_modules/core-js/internals/descriptors.js"),s=o("./node_modules/core-js/internals/ie8-dom-define.js"),a=o("./node_modules/core-js/internals/an-object.js"),l=o("./node_modules/core-js/internals/to-primitive.js"),c=Object.defineProperty;r.f=i?c:function(_,u,p){if(a(_),u=l(u,!0),a(p),s)try{return c(_,u,p)}catch{}if("get"in p||"set"in p)throw TypeError("Accessors not supported");return"value"in p&&(_[u]=p.value),_}},"./node_modules/core-js/internals/object-get-own-property-descriptor.js":function(n,r,o){var i=o("./node_modules/core-js/internals/descriptors.js"),s=o("./node_modules/core-js/internals/object-property-is-enumerable.js"),a=o("./node_modules/core-js/internals/create-property-descriptor.js"),l=o("./node_modules/core-js/internals/to-indexed-object.js"),c=o("./node_modules/core-js/internals/to-primitive.js"),d=o("./node_modules/core-js/internals/has.js"),_=o("./node_modules/core-js/internals/ie8-dom-define.js"),u=Object.getOwnPropertyDescriptor;r.f=i?u:function(m,g){if(m=l(m),g=c(g,!0),_)try{return u(m,g)}catch{}if(d(m,g))return a(!s.f.call(m,g),m[g])}},"./node_modules/core-js/internals/object-get-own-property-names.js":function(n,r,o){var i=o("./node_modules/core-js/internals/object-keys-internal.js"),s=o("./node_modules/core-js/internals/enum-bug-keys.js"),a=s.concat("length","prototype");r.f=Object.getOwnPropertyNames||function(c){return i(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,o){var i=o("./node_modules/core-js/internals/has.js"),s=o("./node_modules/core-js/internals/to-object.js"),a=o("./node_modules/core-js/internals/shared-key.js"),l=o("./node_modules/core-js/internals/correct-prototype-getter.js"),c=a("IE_PROTO"),d=Object.prototype;n.exports=l?Object.getPrototypeOf:function(_){return _=s(_),i(_,c)?_[c]:typeof _.constructor=="function"&&_ instanceof _.constructor?_.constructor.prototype:_ instanceof Object?d:null}},"./node_modules/core-js/internals/object-keys-internal.js":function(n,r,o){var i=o("./node_modules/core-js/internals/has.js"),s=o("./node_modules/core-js/internals/to-indexed-object.js"),a=o("./node_modules/core-js/internals/array-includes.js"),l=o("./node_modules/core-js/internals/hidden-keys.js"),c=a(!1);n.exports=function(d,_){var u=s(d),p=0,m=[],g;for(g in u)!i(l,g)&&i(u,g)&&m.push(g);for(;_.length>p;)i(u,g=_[p++])&&(~c(m,g)||m.push(g));return m}},"./node_modules/core-js/internals/object-keys.js":function(n,r,o){var i=o("./node_modules/core-js/internals/object-keys-internal.js"),s=o("./node_modules/core-js/internals/enum-bug-keys.js");n.exports=Object.keys||function(l){return i(l,s)}},"./node_modules/core-js/internals/object-property-is-enumerable.js":function(n,r,o){var i={}.propertyIsEnumerable,s=Object.getOwnPropertyDescriptor,a=s&&!i.call({1:2},1);r.f=a?function(c){var d=s(this,c);return!!d&&d.enumerable}:i},"./node_modules/core-js/internals/object-set-prototype-of.js":function(n,r,o){var i=o("./node_modules/core-js/internals/validate-set-prototype-of-arguments.js");n.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var s=!1,a={},l;try{l=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,l.call(a,[]),s=a instanceof Array}catch{}return function(d,_){return i(d,_),s?l.call(d,_):d.__proto__=_,d}}():void 0)},"./node_modules/core-js/internals/own-keys.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/object-get-own-property-names.js"),a=o("./node_modules/core-js/internals/object-get-own-property-symbols.js"),l=o("./node_modules/core-js/internals/an-object.js"),c=i.Reflect;n.exports=c&&c.ownKeys||function(_){var u=s.f(l(_)),p=a.f;return p?u.concat(p(_)):u}},"./node_modules/core-js/internals/path.js":function(n,r,o){n.exports=o("./node_modules/core-js/internals/global.js")},"./node_modules/core-js/internals/redefine.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/shared.js"),a=o("./node_modules/core-js/internals/hide.js"),l=o("./node_modules/core-js/internals/has.js"),c=o("./node_modules/core-js/internals/set-global.js"),d=o("./node_modules/core-js/internals/function-to-string.js"),_=o("./node_modules/core-js/internals/internal-state.js"),u=_.get,p=_.enforce,m=String(d).split("toString");s("inspectSource",function(g){return d.call(g)}),(n.exports=function(g,S,E,h){var b=h?!!h.unsafe:!1,T=h?!!h.enumerable:!1,O=h?!!h.noTargetGet:!1;if(typeof E=="function"&&(typeof S=="string"&&!l(E,"name")&&a(E,"name",S),p(E).source=m.join(typeof S=="string"?S:"")),g===i){T?g[S]=E:c(S,E);return}else b?!O&&g[S]&&(T=!0):delete g[S];T?g[S]=E:a(g,S,E)})(Function.prototype,"toString",function(){return typeof this=="function"&&u(this).source||d.call(this)})},"./node_modules/core-js/internals/require-object-coercible.js":function(n,r){n.exports=function(o){if(o==null)throw TypeError("Can't call method on "+o);return o}},"./node_modules/core-js/internals/set-global.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/hide.js");n.exports=function(a,l){try{s(i,a,l)}catch{i[a]=l}return l}},"./node_modules/core-js/internals/set-to-string-tag.js":function(n,r,o){var i=o("./node_modules/core-js/internals/object-define-property.js").f,s=o("./node_modules/core-js/internals/has.js"),a=o("./node_modules/core-js/internals/well-known-symbol.js"),l=a("toStringTag");n.exports=function(c,d,_){c&&!s(c=_?c:c.prototype,l)&&i(c,l,{configurable:!0,value:d})}},"./node_modules/core-js/internals/shared-key.js":function(n,r,o){var i=o("./node_modules/core-js/internals/shared.js"),s=o("./node_modules/core-js/internals/uid.js"),a=i("keys");n.exports=function(l){return a[l]||(a[l]=s(l))}},"./node_modules/core-js/internals/shared.js":function(n,r,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/set-global.js"),a=o("./node_modules/core-js/internals/is-pure.js"),l="__core-js_shared__",c=i[l]||s(l,{});(n.exports=function(d,_){return c[d]||(c[d]=_!==void 0?_:{})})("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,o){var i=o("./node_modules/core-js/internals/to-integer.js"),s=o("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a,l,c){var d=String(s(a)),_=i(l),u=d.length,p,m;return _<0||_>=u?c?"":void 0:(p=d.charCodeAt(_),p<55296||p>56319||_+1===u||(m=d.charCodeAt(_+1))<56320||m>57343?c?d.charAt(_):p:c?d.slice(_,_+2):(p-55296<<10)+(m-56320)+65536)}},"./node_modules/core-js/internals/to-absolute-index.js":function(n,r,o){var i=o("./node_modules/core-js/internals/to-integer.js"),s=Math.max,a=Math.min;n.exports=function(l,c){var d=i(l);return d<0?s(d+c,0):a(d,c)}},"./node_modules/core-js/internals/to-indexed-object.js":function(n,r,o){var i=o("./node_modules/core-js/internals/indexed-object.js"),s=o("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(a){return i(s(a))}},"./node_modules/core-js/internals/to-integer.js":function(n,r){var o=Math.ceil,i=Math.floor;n.exports=function(s){return isNaN(s=+s)?0:(s>0?i:o)(s)}},"./node_modules/core-js/internals/to-length.js":function(n,r,o){var i=o("./node_modules/core-js/internals/to-integer.js"),s=Math.min;n.exports=function(a){return a>0?s(i(a),9007199254740991):0}},"./node_modules/core-js/internals/to-object.js":function(n,r,o){var i=o("./node_modules/core-js/internals/require-object-coercible.js");n.exports=function(s){return Object(i(s))}},"./node_modules/core-js/internals/to-primitive.js":function(n,r,o){var i=o("./node_modules/core-js/internals/is-object.js");n.exports=function(s,a){if(!i(s))return s;var l,c;if(a&&typeof(l=s.toString)=="function"&&!i(c=l.call(s))||typeof(l=s.valueOf)=="function"&&!i(c=l.call(s))||!a&&typeof(l=s.toString)=="function"&&!i(c=l.call(s)))return c;throw TypeError("Can't convert object to primitive value")}},"./node_modules/core-js/internals/uid.js":function(n,r){var o=0,i=Math.random();n.exports=function(s){return"Symbol(".concat(s===void 0?"":s,")_",(++o+i).toString(36))}},"./node_modules/core-js/internals/validate-set-prototype-of-arguments.js":function(n,r,o){var i=o("./node_modules/core-js/internals/is-object.js"),s=o("./node_modules/core-js/internals/an-object.js");n.exports=function(a,l){if(s(a),!i(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,o){var i=o("./node_modules/core-js/internals/global.js"),s=o("./node_modules/core-js/internals/shared.js"),a=o("./node_modules/core-js/internals/uid.js"),l=o("./node_modules/core-js/internals/native-symbol.js"),c=i.Symbol,d=s("wks");n.exports=function(_){return d[_]||(d[_]=l&&c[_]||(l?c:a)("Symbol."+_))}},"./node_modules/core-js/modules/es.array.from.js":function(n,r,o){var i=o("./node_modules/core-js/internals/export.js"),s=o("./node_modules/core-js/internals/array-from.js"),a=o("./node_modules/core-js/internals/check-correctness-of-iteration.js"),l=!a(function(c){Array.from(c)});i({target:"Array",stat:!0,forced:l},{from:s})},"./node_modules/core-js/modules/es.string.iterator.js":function(n,r,o){var i=o("./node_modules/core-js/internals/string-at.js"),s=o("./node_modules/core-js/internals/internal-state.js"),a=o("./node_modules/core-js/internals/define-iterator.js"),l="String Iterator",c=s.set,d=s.getterFor(l);a(String,"String",function(_){c(this,{type:l,string:String(_),index:0})},function(){var u=d(this),p=u.string,m=u.index,g;return m>=p.length?{value:void 0,done:!0}:(g=i(p,m,!0),u.index+=g.length,{value:g,done:!1})})},"./node_modules/webpack/buildin/global.js":function(n,r){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch{typeof window=="object"&&(o=window)}n.exports=o},"./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,o){Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(g){for(var S=1;S2&&arguments[2]!==void 0?arguments[2]:[];u(this,g),this.name=S,this.contents=E,this.tags=h,this.attrs=i({},d.default,{class:"feather feather-"+S})}return s(g,[{key:"toSvg",value:function(){var E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},h=i({},this.attrs,E,{class:(0,l.default)(this.attrs.class,E.class)});return""+this.contents+""}},{key:"toString",value:function(){return this.contents}}]),g}();function m(g){return Object.keys(g).map(function(S){return S+'="'+g[S]+'"'}).join(" ")}r.default=p},"./src/icons.js":function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o("./src/icon.js"),s=_(i),a=o("./dist/icons.json"),l=_(a),c=o("./src/tags.json"),d=_(c);function _(u){return u&&u.__esModule?u:{default:u}}r.default=Object.keys(l.default).map(function(u){return new s.default(u,l.default[u],d.default[u])}).reduce(function(u,p){return u[p.name]=p,u},{})},"./src/index.js":function(n,r,o){var i=o("./src/icons.js"),s=_(i),a=o("./src/to-svg.js"),l=_(a),c=o("./src/replace.js"),d=_(c);function _(u){return u&&u.__esModule?u:{default:u}}n.exports={icons:s.default,toSvg:l.default,replace:d.default}},"./src/replace.js":function(n,r,o){Object.defineProperty(r,"__esModule",{value:!0});var i=Object.assign||function(m){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(S){return u(S,m)})}function u(m){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},S=p(m),E=S["data-feather"];delete S["data-feather"];var h=c.default[E].toSvg(i({},g,S,{class:(0,a.default)(g.class,S.class)})),b=new DOMParser().parseFromString(h,"image/svg+xml"),T=b.querySelector("svg");m.parentNode.replaceChild(T,m)}function p(m){return Array.from(m.attributes).reduce(function(g,S){return g[S.name]=S.value,g},{})}r.default=_},"./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,o){Object.defineProperty(r,"__esModule",{value:!0});var i=o("./src/icons.js"),s=a(i);function a(c){return c&&c.__esModule?c:{default:c}}function l(c){var d=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(!s.default[c])throw new Error("No icon matching '"+c+"'. See the complete list of icons at https://feathericons.com");return s.default[c].toSvg(d)}r.default=l},0:function(n,r,o){o("./node_modules/core-js/es/array/from.js"),n.exports=o("./src/index.js")}})})})(rO);const Ce=dS(Sd),oO={class:"container flex flex-col sm:flex-row item-center gap-2 py-1"},iO={class:"items-center justify-between hidden w-full md:flex md:w-auto md:order-1"},sO={class:"flex flex-col font-medium p-4 md:p-0 mt-4 md:flex-row md:space-x-8 md:mt-0"},aO=f("a",{href:"#",class:"hover:text-primary duration-150"},"Discussions",-1),lO=f("a",{href:"#",class:"hover:text-primary duration-150"},"Settings",-1),cO=f("a",{href:"#",class:"hover:text-primary duration-150"},"Extensions",-1),dO=f("a",{href:"#",class:"hover:text-primary duration-150"},"Training",-1),uO=f("a",{href:"#",class:"hover:text-primary duration-150"},"Help",-1),uS={__name:"Navigation",setup(t){return(e,n)=>(V(),j("div",oO,[f("div",iO,[f("ul",sO,[f("li",null,[Oe(ut(xn),{to:{name:"discussions"},class:"p-2","active-class":"p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg "},{default:Ze(()=>[aO]),_:1})]),f("li",null,[Oe(ut(xn),{to:{name:"settings"},class:"p-2","active-class":"p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg "},{default:Ze(()=>[lO]),_:1})]),f("li",null,[Oe(ut(xn),{to:{name:"extensions"},class:"p-2","active-class":"p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg "},{default:Ze(()=>[cO]),_:1})]),f("li",null,[Oe(ut(xn),{to:{name:"training"},class:"p-2","active-class":"p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg "},{default:Ze(()=>[dO]),_:1})]),f("li",null,[Oe(ut(xn),{to:{name:"help"},class:"p-2","active-class":"p-2 bg-bg-light-tone dark:bg-bg-dark-tone rounded-t-lg "},{default:Ze(()=>[uO]),_:1})])])])]))}},_O={class:"top-0 shadow-lg"},pO={class:"container flex flex-col lg:flex-row item-center gap-2 py-2"},mO=f("div",{class:"flex items-center gap-3 flex-1"},[f("img",{class:"w-12 hover:scale-95 duration-150",title:"GPT4ALL-UI",src:cr,alt:"Logo"}),f("p",{class:"text-2xl"},"GPT4ALL-UI")],-1),gO={class:"flex gap-3 flex-1 items-center justify-end"},fO=f("a",{href:"https://github.com/ParisNeo/gpt4all-ui",target:"_blank"},[f("div",{class:"text-2xl hover:text-primary duration-150",title:"Visit repository page"},[f("i",{"data-feather":"github"})])],-1),EO=f("i",{"data-feather":"sun"},null,-1),hO=[EO],SO=f("i",{"data-feather":"moon"},null,-1),bO=[SO],TO=f("body",null,null,-1),yO={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(),me(()=>{Ce.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:uS}},vO=Object.assign(yO,{setup(t){return(e,n)=>(V(),j(Ue,null,[f("header",_O,[f("nav",pO,[Oe(ut(xn),{to:{name:"discussions"}},{default:Ze(()=>[mO]),_:1}),f("div",gO,[fO,f("div",{class:"sun text-2xl w-6 hover:text-primary duration-150",title:"Swith to Light theme",onClick:n[0]||(n[0]=r=>e.themeSwitch())},hO),f("div",{class:"moon text-2xl w-6 hover:text-primary duration-150",title:"Swith to Dark theme",onClick:n[1]||(n[1]=r=>e.themeSwitch())},bO)])]),Oe(uS)]),TO],64))}}),je=(t,e)=>{const n=t.__vccOpts||t;for(const[r,o]of e)n[r]=o;return n},CO={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"},RO={class:"flex overflow-hidden flex-grow"},OO={__name:"App",setup(t){return(e,n)=>(V(),j("div",CO,[Oe(vO),f("div",RO,[Oe(ut(cS),null,{default:Ze(({Component:r})=>[(V(),st(wv,null,[(V(),st(qv(r)))],1024))]),_:1})])]))}},NO={setup(){return{}}};function AO(t,e,n,r,o,i){return V(),j("div",null," Extensions ")}const IO=je(NO,[["render",AO]]),xO={setup(){return{}}};function wO(t,e,n,r,o,i){return V(),j("div",null," Help ")}const DO=je(xO,[["render",wO]]);function au(t,e=!0,n=1){const r=e?1e3:1024;if(Math.abs(t)=r&&ie=>{const n=MO.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),tn=t=>(t=t.toLowerCase(),e=>wi(e)===t),Di=t=>e=>typeof e===t,{isArray:Sr}=Array,Jr=Di("undefined");function LO(t){return t!==null&&!Jr(t)&&t.constructor!==null&&!Jr(t.constructor)&&Zt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const pS=tn("ArrayBuffer");function kO(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&pS(t.buffer),e}const PO=Di("string"),Zt=Di("function"),mS=Di("number"),cu=t=>t!==null&&typeof t=="object",UO=t=>t===!0||t===!1,Uo=t=>{if(wi(t)!=="object")return!1;const e=lu(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},FO=tn("Date"),BO=tn("File"),GO=tn("Blob"),qO=tn("FileList"),YO=t=>cu(t)&&Zt(t.pipe),HO=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Zt(t.append)&&((e=wi(t))==="formdata"||e==="object"&&Zt(t.toString)&&t.toString()==="[object FormData]"))},VO=tn("URLSearchParams"),zO=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function so(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let r,o;if(typeof t!="object"&&(t=[t]),Sr(t))for(r=0,o=t.length;r0;)if(o=n[r],e===o.toLowerCase())return o;return null}const fS=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),ES=t=>!Jr(t)&&t!==fS;function bd(){const{caseless:t}=ES(this)&&this||{},e={},n=(r,o)=>{const i=t&&gS(e,o)||o;Uo(e[i])&&Uo(r)?e[i]=bd(e[i],r):Uo(r)?e[i]=bd({},r):Sr(r)?e[i]=r.slice():e[i]=r};for(let r=0,o=arguments.length;r(so(e,(o,i)=>{n&&Zt(o)?t[i]=_S(o,n):t[i]=o},{allOwnKeys:r}),t),WO=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),KO=(t,e,n,r)=>{t.prototype=Object.create(e.prototype,r),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},QO=(t,e,n,r)=>{let o,i,s;const a={};if(e=e||{},t==null)return e;do{for(o=Object.getOwnPropertyNames(t),i=o.length;i-- >0;)s=o[i],(!r||r(s,t,e))&&!a[s]&&(e[s]=t[s],a[s]=!0);t=n!==!1&&lu(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},jO=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const r=t.indexOf(e,n);return r!==-1&&r===n},XO=t=>{if(!t)return null;if(Sr(t))return t;let e=t.length;if(!mS(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},ZO=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&lu(Uint8Array)),JO=(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let o;for(;(o=r.next())&&!o.done;){const i=o.value;e.call(t,i[0],i[1])}},eN=(t,e)=>{let n;const r=[];for(;(n=t.exec(e))!==null;)r.push(n);return r},tN=tn("HTMLFormElement"),nN=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),V_=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),rN=tn("RegExp"),hS=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),r={};so(n,(o,i)=>{e(o,i,t)!==!1&&(r[i]=o)}),Object.defineProperties(t,r)},oN=t=>{hS(t,(e,n)=>{if(Zt(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=t[n];if(Zt(r)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},iN=(t,e)=>{const n={},r=o=>{o.forEach(i=>{n[i]=!0})};return Sr(t)?r(t):r(String(t).split(e)),n},sN=()=>{},aN=(t,e)=>(t=+t,Number.isFinite(t)?t:e),as="abcdefghijklmnopqrstuvwxyz",z_="0123456789",SS={DIGIT:z_,ALPHA:as,ALPHA_DIGIT:as+as.toUpperCase()+z_},lN=(t=16,e=SS.ALPHA_DIGIT)=>{let n="";const{length:r}=e;for(;t--;)n+=e[Math.random()*r|0];return n};function cN(t){return!!(t&&Zt(t.append)&&t[Symbol.toStringTag]==="FormData"&&t[Symbol.iterator])}const dN=t=>{const e=new Array(10),n=(r,o)=>{if(cu(r)){if(e.indexOf(r)>=0)return;if(!("toJSON"in r)){e[o]=r;const i=Sr(r)?[]:{};return so(r,(s,a)=>{const l=n(s,o+1);!Jr(l)&&(i[a]=l)}),e[o]=void 0,i}}return r};return n(t,0)},q={isArray:Sr,isArrayBuffer:pS,isBuffer:LO,isFormData:HO,isArrayBufferView:kO,isString:PO,isNumber:mS,isBoolean:UO,isObject:cu,isPlainObject:Uo,isUndefined:Jr,isDate:FO,isFile:BO,isBlob:GO,isRegExp:rN,isFunction:Zt,isStream:YO,isURLSearchParams:VO,isTypedArray:ZO,isFileList:qO,forEach:so,merge:bd,extend:$O,trim:zO,stripBOM:WO,inherits:KO,toFlatObject:QO,kindOf:wi,kindOfTest:tn,endsWith:jO,toArray:XO,forEachEntry:JO,matchAll:eN,isHTMLForm:tN,hasOwnProperty:V_,hasOwnProp:V_,reduceDescriptors:hS,freezeMethods:oN,toObjectSet:iN,toCamelCase:nN,noop:sN,toFiniteNumber:aN,findKey:gS,global:fS,isContextDefined:ES,ALPHABET:SS,generateString:lN,isSpecCompliantForm:cN,toJSONObject:dN};function xe(t,e,n,r,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}q.inherits(xe,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:q.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const bS=xe.prototype,TS={};["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(t=>{TS[t]={value:t}});Object.defineProperties(xe,TS);Object.defineProperty(bS,"isAxiosError",{value:!0});xe.from=(t,e,n,r,o,i)=>{const s=Object.create(bS);return q.toFlatObject(t,s,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),xe.call(s,t.message,e,n,r,o),s.cause=t,s.name=t.name,i&&Object.assign(s,i),s};const uN=null;function Td(t){return q.isPlainObject(t)||q.isArray(t)}function yS(t){return q.endsWith(t,"[]")?t.slice(0,-2):t}function $_(t,e,n){return t?t.concat(e).map(function(o,i){return o=yS(o),!n&&i?"["+o+"]":o}).join(n?".":""):e}function _N(t){return q.isArray(t)&&!t.some(Td)}const pN=q.toFlatObject(q,{},null,function(e){return/^is[A-Z]/.test(e)});function Mi(t,e,n){if(!q.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,S){return!q.isUndefined(S[g])});const r=n.metaTokens,o=n.visitor||d,i=n.dots,s=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&q.isSpecCompliantForm(e);if(!q.isFunction(o))throw new TypeError("visitor must be a function");function c(m){if(m===null)return"";if(q.isDate(m))return m.toISOString();if(!l&&q.isBlob(m))throw new xe("Blob is not supported. Use a Buffer instead.");return q.isArrayBuffer(m)||q.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,g,S){let E=m;if(m&&!S&&typeof m=="object"){if(q.endsWith(g,"{}"))g=r?g:g.slice(0,-2),m=JSON.stringify(m);else if(q.isArray(m)&&_N(m)||(q.isFileList(m)||q.endsWith(g,"[]"))&&(E=q.toArray(m)))return g=yS(g),E.forEach(function(b,T){!(q.isUndefined(b)||b===null)&&e.append(s===!0?$_([g],T,i):s===null?g:g+"[]",c(b))}),!1}return Td(m)?!0:(e.append($_(S,g,i),c(m)),!1)}const _=[],u=Object.assign(pN,{defaultVisitor:d,convertValue:c,isVisitable:Td});function p(m,g){if(!q.isUndefined(m)){if(_.indexOf(m)!==-1)throw Error("Circular reference detected in "+g.join("."));_.push(m),q.forEach(m,function(E,h){(!(q.isUndefined(E)||E===null)&&o.call(e,E,q.isString(h)?h.trim():h,g,u))===!0&&p(E,g?g.concat(h):[h])}),_.pop()}}if(!q.isObject(t))throw new TypeError("data must be an object");return p(t),e}function W_(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(r){return e[r]})}function du(t,e){this._pairs=[],t&&Mi(t,this,e)}const vS=du.prototype;vS.append=function(e,n){this._pairs.push([e,n])};vS.toString=function(e){const n=e?function(r){return e.call(this,r,W_)}:W_;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function mN(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function CS(t,e,n){if(!e)return t;const r=n&&n.encode||mN,o=n&&n.serialize;let i;if(o?i=o(e,n):i=q.isURLSearchParams(e)?e.toString():new du(e,n).toString(r),i){const s=t.indexOf("#");s!==-1&&(t=t.slice(0,s)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class gN{constructor(){this.handlers=[]}use(e,n,r){return this.handlers.push({fulfilled:e,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){q.forEach(this.handlers,function(r){r!==null&&e(r)})}}const K_=gN,RS={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fN=typeof URLSearchParams<"u"?URLSearchParams:du,EN=typeof FormData<"u"?FormData:null,hN=typeof Blob<"u"?Blob:null,SN=(()=>{let t;return typeof navigator<"u"&&((t=navigator.product)==="ReactNative"||t==="NativeScript"||t==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),bN=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),Lt={isBrowser:!0,classes:{URLSearchParams:fN,FormData:EN,Blob:hN},isStandardBrowserEnv:SN,isStandardBrowserWebWorkerEnv:bN,protocols:["http","https","file","blob","url","data"]};function TN(t,e){return Mi(t,new Lt.classes.URLSearchParams,Object.assign({visitor:function(n,r,o,i){return Lt.isNode&&q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}function yN(t){return q.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function vN(t){const e={},n=Object.keys(t);let r;const o=n.length;let i;for(r=0;r=n.length;return s=!s&&q.isArray(o)?o.length:s,l?(q.hasOwnProp(o,s)?o[s]=[o[s],r]:o[s]=r,!a):((!o[s]||!q.isObject(o[s]))&&(o[s]=[]),e(n,r,o[s],i)&&q.isArray(o[s])&&(o[s]=vN(o[s])),!a)}if(q.isFormData(t)&&q.isFunction(t.entries)){const n={};return q.forEachEntry(t,(r,o)=>{e(yN(r),o,n,0)}),n}return null}const CN={"Content-Type":void 0};function RN(t,e,n){if(q.isString(t))try{return(e||JSON.parse)(t),q.trim(t)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(t)}const Li={transitional:RS,adapter:["xhr","http"],transformRequest:[function(e,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,i=q.isObject(e);if(i&&q.isHTMLForm(e)&&(e=new FormData(e)),q.isFormData(e))return o&&o?JSON.stringify(OS(e)):e;if(q.isArrayBuffer(e)||q.isBuffer(e)||q.isStream(e)||q.isFile(e)||q.isBlob(e))return e;if(q.isArrayBufferView(e))return e.buffer;if(q.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return TN(e,this.formSerializer).toString();if((a=q.isFileList(e))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Mi(a?{"files[]":e}:e,l&&new l,this.formSerializer)}}return i||o?(n.setContentType("application/json",!1),RN(e)):e}],transformResponse:[function(e){const n=this.transitional||Li.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(e&&q.isString(e)&&(r&&!this.responseType||o)){const s=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?xe.from(a,xe.ERR_BAD_RESPONSE,this,null,this.response):a}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lt.classes.FormData,Blob:Lt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};q.forEach(["delete","get","head"],function(e){Li.headers[e]={}});q.forEach(["post","put","patch"],function(e){Li.headers[e]=q.merge(CN)});const uu=Li,ON=q.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"]),NN=t=>{const e={};let n,r,o;return t&&t.split(` `).forEach(function(s){o=s.indexOf(":"),n=s.substring(0,o).trim().toLowerCase(),r=s.substring(o+1).trim(),!(!n||e[n]&&ON[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Q_=Symbol("internals");function Ar(t){return t&&String(t).trim().toLowerCase()}function Fo(t){return t===!1||t==null?t:q.isArray(t)?t.map(Fo):String(t)}function AN(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(t);)e[r[1]]=r[2];return e}const IN=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function ls(t,e,n,r,o){if(q.isFunction(r))return r.call(this,e,n);if(o&&(e=n),!!q.isString(e)){if(q.isString(r))return e.indexOf(r)!==-1;if(q.isRegExp(r))return r.test(e)}}function xN(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,r)=>n.toUpperCase()+r)}function wN(t,e){const n=q.toCamelCase(" "+e);["get","set","has"].forEach(r=>{Object.defineProperty(t,r+n,{value:function(o,i,s){return this[r].call(this,e,o,i,s)},configurable:!0})})}class ki{constructor(e){e&&this.set(e)}set(e,n,r){const o=this;function i(a,l,c){const d=Ar(l);if(!d)throw new Error("header name must be a non-empty string");const _=q.findKey(o,d);(!_||o[_]===void 0||c===!0||c===void 0&&o[_]!==!1)&&(o[_||l]=Fo(a))}const s=(a,l)=>q.forEach(a,(c,d)=>i(c,d,l));return q.isPlainObject(e)||e instanceof this.constructor?s(e,n):q.isString(e)&&(e=e.trim())&&!IN(e)?s(NN(e),n):e!=null&&i(n,e,r),this}get(e,n){if(e=Ar(e),e){const r=q.findKey(this,e);if(r){const o=this[r];if(!n)return o;if(n===!0)return AN(o);if(q.isFunction(n))return n.call(this,o,r);if(q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Ar(e),e){const r=q.findKey(this,e);return!!(r&&this[r]!==void 0&&(!n||ls(this,this[r],r,n)))}return!1}delete(e,n){const r=this;let o=!1;function i(s){if(s=Ar(s),s){const a=q.findKey(r,s);a&&(!n||ls(r,r[a],a,n))&&(delete r[a],o=!0)}}return q.isArray(e)?e.forEach(i):i(e),o}clear(e){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const i=n[r];(!e||ls(this,this[i],i,e,!0))&&(delete this[i],o=!0)}return o}normalize(e){const n=this,r={};return q.forEach(this,(o,i)=>{const s=q.findKey(r,i);if(s){n[s]=Fo(o),delete n[i];return}const a=e?xN(i):String(i).trim();a!==i&&delete n[i],n[a]=Fo(o),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=e&&q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Q_]=this[Q_]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Ar(s);r[a]||(wN(o,s),r[a]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}}ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.freezeMethods(ki.prototype);q.freezeMethods(ki);const Qt=ki;function cs(t,e){const n=this||uu,r=e||n,o=Qt.from(r.headers);let i=r.data;return q.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function NS(t){return!!(t&&t.__CANCEL__)}function ao(t,e,n){xe.call(this,t??"canceled",xe.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(ao,xe,{__CANCEL__:!0});function DN(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MN=Lt.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),q.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),q.isString(i)&&l.push("path="+i),q.isString(s)&&l.push("domain="+s),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 LN(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function kN(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function AS(t,e){return t&&!LN(e)?kN(t,e):e}const PN=Lt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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=o(window.location.href),function(s){const a=q.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function UN(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function FN(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=r[i];s||(s=c),n[o]=l,r[o]=c;let _=i,u=0;for(;_!==o;)u+=n[_++],_=_%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),c-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,l=r(a),c=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-i)/l:void 0,event:o};d[e?"download":"upload"]=!0,t(d)}}const BN=typeof XMLHttpRequest<"u",GN=BN&&function(t){return new Promise(function(n,r){let o=t.data;const i=Qt.from(t.headers).normalize(),s=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}q.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const d=AS(t.baseURL,t.url);c.open(t.method.toUpperCase(),CS(d,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function _(){if(!c)return;const p=Qt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:t,request:c};DN(function(E){n(E),l()},function(E){r(E),l()},g),c=null}if("onloadend"in c?c.onloadend=_:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(_)},c.onabort=function(){c&&(r(new xe("Request aborted",xe.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new xe("Network Error",xe.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||RS;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),r(new xe(m,g.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,t,c)),c=null},Lt.isStandardBrowserEnv){const p=(t.withCredentials||PN(d))&&t.xsrfCookieName&&MN.read(t.xsrfCookieName);p&&i.set(t.xsrfHeaderName,p)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&q.forEach(i.toJSON(),function(m,g){c.setRequestHeader(g,m)}),q.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&s!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",j_(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",j_(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=p=>{c&&(r(!p||p.type?new ao(null,t,c):p),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const u=UN(d);if(u&&Lt.protocols.indexOf(u)===-1){r(new xe("Unsupported protocol "+u+":",xe.ERR_BAD_REQUEST,t));return}c.send(o||null)})},Bo={http:uN,xhr:GN};q.forEach(Bo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const qN={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;ot instanceof Qt?t.toJSON():t;function dr(t,e){e=e||{};const n={};function r(c,d,_){return q.isPlainObject(c)&&q.isPlainObject(d)?q.merge.call({caseless:_},c,d):q.isPlainObject(d)?q.merge({},d):q.isArray(d)?d.slice():d}function o(c,d,_){if(q.isUndefined(d)){if(!q.isUndefined(c))return r(void 0,c,_)}else return r(c,d,_)}function i(c,d){if(!q.isUndefined(d))return r(void 0,d)}function s(c,d){if(q.isUndefined(d)){if(!q.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c,d,_){if(_ in e)return r(c,d);if(_ in t)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,d)=>o(Z_(c),Z_(d),!0)};return q.forEach(Object.keys(t).concat(Object.keys(e)),function(d){const _=l[d]||o,u=_(t[d],e[d],d);q.isUndefined(u)&&_!==a||(n[d]=u)}),n}const IS="1.3.6",_u={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{_u[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const J_={};_u.transitional=function(e,n,r){function o(i,s){return"[Axios v"+IS+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new xe(o(s," has been removed"+(n?" in "+n:"")),xe.ERR_DEPRECATED);return n&&!J_[s]&&(J_[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function YN(t,e,n){if(typeof t!="object")throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const a=t[i],l=a===void 0||s(a,i,t);if(l!==!0)throw new xe("option "+i+" must be "+l,xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xe("Unknown option "+i,xe.ERR_BAD_OPTION)}}const yd={assertOptions:YN,validators:_u},sn=yd.validators;class Zo{constructor(e){this.defaults=e,this.interceptors={request:new K_,response:new K_}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=dr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&yd.assertOptions(r,{silentJSONParsing:sn.transitional(sn.boolean),forcedJSONParsing:sn.transitional(sn.boolean),clarifyTimeoutError:sn.transitional(sn.boolean)},!1),o!=null&&(q.isFunction(o)?n.paramsSerializer={serialize:o}:yd.assertOptions(o,{encode:sn.function,serialize:sn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&q.merge(i.common,i[n.method]),s&&q.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Qt.concat(s,i);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 d,_=0,u;if(!l){const m=[X_.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,c),u=m.length,d=Promise.resolve(n);_{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new ao(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new pu(function(o){e=o}),cancel:e}}}const HN=pu;function VN(t){return function(n){return t.apply(null,n)}}function zN(t){return q.isObject(t)&&t.isAxiosError===!0}const vd={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(vd).forEach(([t,e])=>{vd[e]=t});const $N=vd;function xS(t){const e=new Go(t),n=_S(Go.prototype.request,e);return q.extend(n,Go.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return xS(dr(t,o))},n}const $e=xS(uu);$e.Axios=Go;$e.CanceledError=ao;$e.CancelToken=HN;$e.isCancel=NS;$e.VERSION=IS;$e.toFormData=Mi;$e.AxiosError=xe;$e.Cancel=$e.CanceledError;$e.all=function(e){return Promise.all(e)};$e.spread=VN;$e.isAxiosError=zN;$e.mergeConfig=dr;$e.AxiosHeaders=Qt;$e.formToJSON=t=>OS(q.isHTMLForm(t)?new FormData(t):t);$e.HttpStatusCode=$N;$e.default=$e;const Be=$e,WN={data(){return{show:!1,message:""}},methods:{hide(){this.show=!1,this.$emit("ok")},showMessage(t){this.message=t,this.show=!0}}},KN={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},QN={class:"bg-bg-light dark:bg-bg-dark p-8 rounded-lg shadow-lg"},jN={class:"text-lg font-medium"},XN={class:"mt-4 flex justify-center"};function ZN(t,e,n,r,o,i){return o.show?(V(),j("div",KN,[f("div",QN,[f("h3",jN,Ee(o.message),1),f("div",XN,[f("button",{onClick:e[0]||(e[0]=(...s)=>i.hide&&i.hide(...s)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):de("",!0)}const JN=je(WN,[["render",ZN]]),eA={data(){return{show:!1,message:"",resolve:null}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t){return new Promise(e=>{this.message=t,this.show=!0,this.resolve=e})}}},tA={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},nA={class:"relative w-full max-w-md max-h-full"},rA={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},oA=f("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),iA=f("span",{class:"sr-only"},"Close modal",-1),sA=[oA,iA],aA={class:"p-4 text-center"},lA=f("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),cA={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none"};function dA(t,e,n,r,o,i){return o.show?(V(),j("div",tA,[f("div",nA,[f("div",rA,[f("button",{type:"button",onClick:e[0]||(e[0]=s=>i.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},sA),f("div",aA,[lA,f("h3",cA,Ee(o.message),1),f("button",{onClick:e[1]||(e[1]=s=>i.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Yes, I'm sure "),f("button",{onClick:e[2]||(e[2]=s=>i.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):de("",!0)}const uA=je(eA,[["render",dA]]);const _A={name:"Toast",props:{},data(){return{show:!1,success:!0,message:"",toastArr:[]}},methods:{close(t){this.toastArr=this.toastArr.filter(e=>e.id!=t)},showToast(t,e=3,n=!0){const r=parseInt((new Date().getTime()*Math.random()).toString()).toString(),o={id:r,success:n,message:t,show:!0};this.toastArr.push(o),me(()=>{Ce.replace()}),setTimeout(()=>{this.toastArr=this.toastArr.filter(i=>i.id!=r)},e*1e3)}},watch:{}},br=t=>(yi("data-v-aac71c39"),t=t(),vi(),t),pA={class:"absolute bottom-16 right-2 z-20 flex flex-col gap-3 min-w-[300px]"},mA={class:"flex items-center w-full max-w-xs p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800",role:"alert"},gA={class:"flex flex-row items-center"},fA={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},EA=br(()=>f("i",{"data-feather":"check"},null,-1)),hA=br(()=>f("span",{class:"sr-only"},"Check icon",-1)),SA=[EA,hA],bA={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},TA=br(()=>f("i",{"data-feather":"x"},null,-1)),yA=br(()=>f("span",{class:"sr-only"},"Cross icon",-1)),vA=[TA,yA],CA={class:"ml-3 text-sm font-normal whitespace-pre-wrap"},RA=["onClick"],OA=br(()=>f("span",{class:"sr-only"},"Close",-1)),NA=br(()=>f("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),AA=[OA,NA];function IA(t,e,n,r,o,i){return V(),j("div",pA,[Oe(hn,{name:"toastItem",tag:"div"},{default:Ze(()=>[(V(!0),j(Ue,null,Mt(o.toastArr,s=>(V(),j("div",{key:s.id},[f("div",mA,[f("div",gA,[Ah(t.$slots,"default",{},()=>[s.success?(V(),j("div",fA,SA)):de("",!0),s.success?de("",!0):(V(),j("div",bA,vA)),f("div",CA,Ee(s.message),1)],!0)]),f("button",{type:"button",onClick:a=>i.close(s.id),class:"ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},AA,8,RA)])]))),128))]),_:3})])}const mu=je(_A,[["render",IA],["__scopeId","data-v-aac71c39"]]),ep="/assets/default_model-9e24e852.png",xA={props:{title:String,icon:String,path:String,owner:String,owner_link:String,license:String,description:String,isInstalled:Boolean,onInstall:Function,onUninstall:Function,onSelected:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,installing:!1,uninstalling:!1,failedToLoad:!1,fileSize:"",linkNotValid:!1}},async mounted(){this.fileSize=await this.getFileSize(this.model.path),me(()=>{Ce.replace()})},methods:{computedFileSize(t){return au(t)},async getFileSize(t){if(console.log(this.model_type),this.model_type!="api")try{const e=await Be.head(t);return e?e.headers["content-length"]?this.computedFileSize(e.headers["content-length"]):this.model.filesize?this.computedFileSize(this.model.filesize):"Could not be determined":this.model.filesize?this.computedFileSize(this.model.filesize):"Could not be determined"}catch(e){return console.log(e.message,"getFileSize"),this.linkNotValid=!0,"Could not be determined"}},getImgUrl(){return this.icon==="/images/default_model.png"?ep:this.icon},defaultImg(t){t.target.src=ep},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):(this.installing=!0,this.onInstall(this))},toggleSelected(){this.onSelected(this)},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)}},watch:{linkNotValid(){me(()=>{Ce.replace()})}}},wA={key:0,class:"flex-1"},DA={class:"flex gap-3 items-center"},MA=["src"],LA={class:"font-bold font-large text-lg"},kA={key:1,class:"flex-1"},PA={class:"flex gap-3 items-center"},UA=["src"],FA={class:"font-bold font-large text-lg"},BA={class:"flex flex-shrink-0 items-center"},GA=f("i",{"data-feather":"download",class:"w-5 m-1"},null,-1),qA=f("b",null,"Manual download: ",-1),YA=["href"],HA={class:"flex flex-shrink-0 items-center"},VA=f("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),zA=f("b",null,"File size: ",-1),$A={class:"flex flex-shrink-0 items-center"},WA=f("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),KA=f("b",null,"License: ",-1),QA={class:"flex flex-shrink-0 items-center"},jA=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),XA=f("b",null,"Owner: ",-1),ZA=["href"],JA=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),eI={class:"mx-1 opacity-80"},tI={class:"flex-shrink-0"},nI=["disabled"],rI={key:0,class:"flex items-center space-x-2"},oI={class:"h-2 w-20 bg-gray-300 rounded"},iI={key:1,class:"flex items-center space-x-2"},sI={class:"h-2 w-20 bg-gray-300 rounded"},aI=f("span",null,"Uninstalling...",-1);function lI(t,e,n,r,o,i){return V(),j("div",{class:Le(["flex items-center p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[5]||(e[5]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[n.model.isCustomModel?(V(),j("div",wA,[f("div",DA,[f("img",{src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-lg object-fill"},null,40,MA),f("h3",LA,Ee(n.title),1)])])):de("",!0),n.model.isCustomModel?de("",!0):(V(),j("div",kA,[f("div",PA,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[1]||(e[1]=s=>i.defaultImg(s)),class:Le(["w-10 h-10 rounded-lg object-fill",o.linkNotValid?"grayscale":""])},null,42,UA),f("h3",FA,Ee(n.title),1)]),f("div",BA,[GA,qA,f("a",{href:n.path,onClick:e[2]||(e[2]=Se(()=>{},["stop"])),class:"flex items-center hover:text-secondary duration-75 active:scale-90",title:"Download this manually (faster) and put it in the models/ folder then refresh"},Ee(n.title),9,YA)]),f("div",HA,[f("div",{class:Le(["flex flex-shrink-0 items-center",o.linkNotValid?"text-red-600":""])},[VA,zA,qe(" "+Ee(o.fileSize),1)],2)]),f("div",$A,[WA,KA,qe(" "+Ee(n.license),1)]),f("div",QA,[jA,XA,f("a",{href:n.owner_link,target:"_blank",rel:"noopener noreferrer",onClick:e[3]||(e[3]=Se(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"Owner's profile"},Ee(n.owner),9,ZA)]),JA,f("p",eI,Ee(n.description),1)])),f("div",tI,[n.model_type!=="api"?(V(),j("button",{key:0,class:Le(["px-4 py-2 rounded-md text-white font-bold transition-colors duration-300",[n.isInstalled?"bg-red-500 hover:bg-red-600":o.linkNotValid?"bg-gray-500 hover:bg-gray-600":"bg-green-500 hover:bg-green-600"]]),disabled:o.installing||o.uninstalling,onClick:e[4]||(e[4]=Se((...s)=>i.toggleInstall&&i.toggleInstall(...s),["stop"]))},[o.installing?(V(),j("div",rI,[f("div",oI,[f("div",{style:Gn({width:o.progress+"%"}),class:"h-full bg-red-500 rounded"},null,4)]),f("span",null,"Installing..."+Ee(Math.floor(o.progress))+"%",1)])):o.uninstalling?(V(),j("div",iI,[f("div",sI,[f("div",{style:Gn({width:o.progress+"%"}),class:"h-full bg-green-500"},null,4)]),aI])):(V(),j(Ue,{key:2},[qe(Ee(n.isInstalled?n.model.isCustomModel?"Delete":"Uninstall":o.linkNotValid?"Link is not valid":"Install"),1)],64))],10,nI)):de("",!0)])],2)}const cI=je(xA,[["render",lI]]),dI={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityLanguage:"English",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},uI={class:"p-4"},_I={class:"flex items-center mb-4"},pI=["src"],mI={class:"text-lg font-semibold"},gI=f("strong",null,"Author:",-1),fI=f("strong",null,"Description:",-1),EI=f("strong",null,"Language:",-1),hI=f("strong",null,"Category:",-1),SI={key:0},bI=f("strong",null,"Disclaimer:",-1),TI=f("strong",null,"Conditioning Text:",-1),yI=f("strong",null,"AI Prefix:",-1),vI=f("strong",null,"User Prefix:",-1),CI=f("strong",null,"Antiprompts:",-1);function RI(t,e,n,r,o,i){return V(),j("div",uI,[f("div",_I,[f("img",{src:o.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,pI),f("h2",mI,Ee(o.personalityName),1)]),f("p",null,[gI,qe(" "+Ee(o.personalityAuthor),1)]),f("p",null,[fI,qe(" "+Ee(o.personalityDescription),1)]),f("p",null,[EI,qe(" "+Ee(o.personalityLanguage),1)]),f("p",null,[hI,qe(" "+Ee(o.personalityCategory),1)]),o.disclaimer?(V(),j("p",SI,[bI,qe(" "+Ee(o.disclaimer),1)])):de("",!0),f("p",null,[TI,qe(" "+Ee(o.conditioningText),1)]),f("p",null,[yI,qe(" "+Ee(o.aiPrefix),1)]),f("p",null,[vI,qe(" "+Ee(o.userPrefix),1)]),f("div",null,[CI,f("ul",null,[(V(!0),j(Ue,null,Mt(o.antipromptsList,s=>(V(),j("li",{key:s.id},Ee(s.text),1))),128))])]),f("button",{onClick:e[0]||(e[0]=s=>o.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),o.editMode?(V(),j("button",{key:1,onClick:e[1]||(e[1]=(...s)=>i.commitChanges&&i.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):de("",!0)])}const OI=je(dI,[["render",RI]]),NI="/assets/default_user-17642e5a.svg",AI="/",II={props:{personality:{},onSelected:Function,selected:Boolean},data(){return{}},mounted(){me(()=>{Ce.replace()})},methods:{getImgUrl(){return AI+this.personality.avatar},defaultImg(t){t.target.src=cr},toggleSelected(){this.onSelected(this)}}},xI={class:"flex flex-row items-center flex-shrink-0 gap-3"},wI=["src"],DI={class:"font-bold font-large text-lg line-clamp-3"},MI={class:""},LI={class:""},kI={class:"flex items-center"},PI=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),UI=f("b",null,"Author: ",-1),FI=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),BI=["title"];function GI(t,e,n,r,o,i){return V(),j("div",{class:Le(["items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[1]||(e[1]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[f("div",xI,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,wI),f("h3",DI,Ee(n.personality.name),1)]),f("div",MI,[f("div",LI,[f("div",kI,[PI,UI,qe(" "+Ee(n.personality.author),1)])]),FI,f("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.personality.description},Ee(n.personality.description),9,BI)])],2)}const qI=je(II,[["render",GI]]),YI="/",HI={props:{binding:{},onSelected:Function,selected:Boolean},data(){return{isTemplate:!1,hasAdvancedSettings:!1}},mounted(){me(()=>{Ce.replace()})},methods:{getImgUrl(){return YI+this.binding.icon},defaultImg(t){t.target.src=cr},toggleSelected(){this.onSelected(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}}},VI={class:"flex flex-row items-center gap-3"},zI=["src"],$I={class:"font-bold font-large text-lg truncate"},WI=f("div",{class:"grow"},null,-1),KI={key:0,class:"flex-none"},QI=f("i",{"data-feather":"sliders",class:"w-5 m-1"},null,-1),jI=f("span",{class:"sr-only"},"Icon description",-1),XI=[QI,jI],ZI={class:""},JI={class:""},ex={class:"flex items-center"},tx=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),nx=f("b",null,"Author: ",-1),rx={class:"flex items-center"},ox=f("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),ix=f("b",null,"Folder: ",-1),sx={class:"flex items-center"},ax=f("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),lx=f("b",null,"Version: ",-1),cx=["href"],dx=f("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),ux=f("b",null,"Link: ",-1),_x=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),px=["title"];function mx(t,e,n,r,o,i){return V(),j("div",{class:Le(["items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[2]||(e[2]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[f("div",{class:Le(o.isTemplate?"opacity-50":"")},[f("div",VI,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,zI),f("h3",$I,Ee(n.binding.name),1),WI,o.hasAdvancedSettings?(V(),j("div",KI,[f("button",{type:"button",title:"Not implemented",class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=Se(()=>{},["stop"]))},XI)])):de("",!0)]),f("div",ZI,[f("div",JI,[f("div",ex,[tx,nx,qe(" "+Ee(n.binding.author),1)]),f("div",rx,[ox,ix,qe(" "+Ee(n.binding.folder),1)]),f("div",sx,[ax,lx,qe(" "+Ee(n.binding.version),1)]),f("a",{href:n.binding.link,target:"_blank",class:"flex items-center"},[dx,ux,qe(" "+Ee(n.binding.link),1)],8,cx)]),_x,f("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description},Ee(n.binding.description),9,px)])],2)],2)}const gx=je(HI,[["render",mx]]),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 qo=Object.create(null);Object.keys(Gt).forEach(t=>{qo[Gt[t]]=t});const fx={type:"error",data:"parser error"},Ex=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",hx=typeof ArrayBuffer=="function",Sx=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wS=({type:t,data:e},n,r)=>Ex&&e instanceof Blob?n?r(e):tp(e,r):hx&&(e instanceof ArrayBuffer||Sx(e))?n?r(e):tp(new Blob([e]),r):r(Gt[t]+(e||"")),tp=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)},np="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,o=0,i,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),d=new Uint8Array(c);for(r=0;r>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c},Tx=typeof ArrayBuffer=="function",DS=(t,e)=>{if(typeof t!="string")return{type:"message",data:MS(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:yx(t.substring(1),e)}:qo[n]?t.length>1?{type:qo[n],data:t.substring(1)}:{type:qo[n]}:fx},yx=(t,e)=>{if(Tx){const n=bx(t);return MS(n,e)}else return{base64:!0,data:t}},MS=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},LS=String.fromCharCode(30),vx=(t,e)=>{const n=t.length,r=new Array(n);let o=0;t.forEach((i,s)=>{wS(i,!1,a=>{r[s]=a,++o===n&&e(r.join(LS))})})},Cx=(t,e)=>{const n=t.split(LS),r=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function PS(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Ox=ft.setTimeout,Nx=ft.clearTimeout;function Pi(t,e){e.useNativeTimers?(t.setTimeoutFn=Ox.bind(ft),t.clearTimeoutFn=Nx.bind(ft)):(t.setTimeoutFn=ft.setTimeout.bind(ft),t.clearTimeoutFn=ft.clearTimeout.bind(ft))}const Ax=1.33;function Ix(t){return typeof t=="string"?xx(t):Math.ceil((t.byteLength||t.size)*Ax)}function xx(t){let e=0,n=0;for(let r=0,o=t.length;r=57344?n+=3:(r++,n+=4);return n}class wx extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class US extends ze{constructor(e){super(),this.writable=!1,Pi(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new wx(e,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(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=DS(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}const FS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Cd=64,Dx={};let rp=0,To=0,op;function ip(t){let e="";do e=FS[t%Cd]+e,t=Math.floor(t/Cd);while(t>0);return e}function BS(){const t=ip(+new Date);return t!==op?(rp=0,op=t):t+"."+ip(rp++)}for(;To{this.readyState="paused",e()};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(e){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)};Cx(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,vx(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=BS()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const o=GS(e),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new Ut(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Ut extends ze{constructor(e,n){super(),Pi(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=PS(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new YS(e);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=Ut.requestsCount++,Ut.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=kx,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ut.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ut.requestsCount=0;Ut.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",sp);else if(typeof addEventListener=="function"){const t="onpagehide"in ft?"pagehide":"unload";addEventListener(t,sp,!1)}}function sp(){for(let t in Ut.requests)Ut.requests.hasOwnProperty(t)&&Ut.requests[t].abort()}const HS=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),yo=ft.WebSocket||ft.MozWebSocket,ap=!0,Fx="arraybuffer",lp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bx extends US{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=lp?{}:PS(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=ap&&!lp?n?new yo(e,n):new yo(e):new yo(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||Fx,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{const s={};try{ap&&this.ws.send(i)}catch{}o&&HS(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=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&&(e[this.opts.timestampParam]=BS()),this.supportsBinary||(e.b64=1);const o=GS(e),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}check(){return!!yo}}const Gx={websocket:Bx,polling:Ux},qx=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=qx.exec(t||""),i={},s=14;for(;s--;)i[Yx[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Hx(i,i.path),i.queryKey=Vx(i,i.query),i}function Hx(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Vx(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}let VS=class Qn extends ze{constructor(e,n={}){super(),this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Rd(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Rd(n.host).host),Pi(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=Mx(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(e){const n=Object.assign({},this.opts.query);n.EIO=kS,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Gx[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.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(e){let n=this.createTransport(e),r=!1;Qn.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",_=>{if(!r)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Qn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const u=new Error("probe error");u.transport=n.name,this.emitReserved("upgradeError",u)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const s=_=>{const u=new Error("probe error: "+_);u.transport=n.name,i(),this.emitReserved("upgradeError",u)};function a(){s("transport closed")}function l(){s("socket closed")}function c(_){n&&_.name!==n.name&&i()}const d=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e{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 e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.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(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:e,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},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():e()}):this.upgrading?r():e()),this}onError(e){Qn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,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",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const o=e.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,zS=Object.prototype.toString,Kx=typeof Blob=="function"||typeof Blob<"u"&&zS.call(Blob)==="[object BlobConstructor]",Qx=typeof File=="function"||typeof File<"u"&&zS.call(File)==="[object FileConstructor]";function gu(t){return $x&&(t instanceof ArrayBuffer||Wx(t))||Kx&&t instanceof Blob||Qx&&t instanceof File}function Yo(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num{delete this.acks[e];for(let s=0;s{this.io.clearTimeoutFn(i),n.apply(this,[null,...s])}}emitWithAck(e,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((s,a)=>r?s?i(s):o(a):o(s)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ne.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(e);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(e);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Ne.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Tr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};Tr.prototype.reset=function(){this.attempts=0};Tr.prototype.setMin=function(t){this.ms=t};Tr.prototype.setMax=function(t){this.max=t};Tr.prototype.setJitter=function(t){this.jitter=t};class Ad extends ze{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Pi(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 Tr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||tw;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new VS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Rt(n,"open",function(){r.onopen(),e&&e()}),i=Rt(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),e?e(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&o();const a=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rt(e,"ping",this.onping.bind(this)),Rt(e,"data",this.ondata.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){HS(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new $S(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=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(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ir={};function Ho(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=zx(t,e.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=Ir[o]&&i in Ir[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new Ad(r,e):(Ir[o]||(Ir[o]=new Ad(r,e)),l=Ir[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ho,{Manager:Ad,Socket:$S,io:Ho,connect:Ho});const Ve=new Ho("http://0.0.0.0:9600");Ve.onopen=()=>{console.log("WebSocket connection established.")};Ve.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason)};Ve.onerror=t=>{console.error("WebSocket error:",t),Ve.disconnect()};Ve.on("connect",()=>{console.log("WebSocket connected (websocket)")});Ve.on("disconnect",()=>{console.log("WebSocket disonnected (websocket)")});const WS=Xh();WS.config.globalProperties.$socket=Ve;WS.mount();Be.defaults.baseURL="/";const rw={components:{MessageBox:JN,YesNoDialog:uA,ModelEntry:cI,PersonalityViewer:OI,Toast:mu,PersonalityEntry:qI,BindingEntry:gx},data(){return{models:[],personalities:[],personalitiesFiltered:[],bindings:[],collapsedArr:[],all_collapsed:!0,bec_collapsed:!0,mzc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,bzl_collapsed:!1,bindingsArr:[],modelsArr:[],persLangArr:[],persCatgArr:[],persArr:[],langArr:[],configFile:{},showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,diskUsage:{},isMounted:!1}},created(){},methods:{collapseAll(t){this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t},fetchModels(){Be.get("/get_available_models").then(t=>{this.models=t.data,this.fetchCustomModels()}).catch(t=>{console.log(t.message,"fetchModels")})},fetchCustomModels(){Be.get("/list_models").then(t=>{for(let e=0;eo.title==n)==-1){let o={};o.title=n,o.path=n,o.isCustomModel=!0,o.isInstalled=!0,this.models.push(o)}}}).catch(t=>{console.log(t.message,"fetchCustomModels")})},onPersonalitySelected(t){this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),t.personality&&(this.configFile.personality!=t.personality.name&&(this.settingsChanged=!0,this.update_setting("personality",t.personality.folder,()=>{this.$refs.toast.showToast(`Selected personality: +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const r=new this(e);return n.forEach(o=>r.set(o)),r}static accessor(e){const r=(this[Q_]=this[Q_]={accessors:{}}).accessors,o=this.prototype;function i(s){const a=Ar(s);r[a]||(wN(o,s),r[a]=!0)}return q.isArray(e)?e.forEach(i):i(e),this}}ki.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);q.freezeMethods(ki.prototype);q.freezeMethods(ki);const Qt=ki;function cs(t,e){const n=this||uu,r=e||n,o=Qt.from(r.headers);let i=r.data;return q.forEach(t,function(a){i=a.call(n,i,o.normalize(),e?e.status:void 0)}),o.normalize(),i}function NS(t){return!!(t&&t.__CANCEL__)}function ao(t,e,n){xe.call(this,t??"canceled",xe.ERR_CANCELED,e,n),this.name="CanceledError"}q.inherits(ao,xe,{__CANCEL__:!0});function DN(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new xe("Request failed with status code "+n.status,[xe.ERR_BAD_REQUEST,xe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MN=Lt.isStandardBrowserEnv?function(){return{write:function(n,r,o,i,s,a){const l=[];l.push(n+"="+encodeURIComponent(r)),q.isNumber(o)&&l.push("expires="+new Date(o).toGMTString()),q.isString(i)&&l.push("path="+i),q.isString(s)&&l.push("domain="+s),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 LN(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function kN(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}function AS(t,e){return t&&!LN(e)?kN(t,e):e}const PN=Lt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function o(i){let s=i;return e&&(n.setAttribute("href",s),s=n.href),n.setAttribute("href",s),{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=o(window.location.href),function(s){const a=q.isString(s)?o(s):s;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function UN(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function FN(t,e){t=t||10;const n=new Array(t),r=new Array(t);let o=0,i=0,s;return e=e!==void 0?e:1e3,function(l){const c=Date.now(),d=r[i];s||(s=c),n[o]=l,r[o]=c;let _=i,u=0;for(;_!==o;)u+=n[_++],_=_%t;if(o=(o+1)%t,o===i&&(i=(i+1)%t),c-s{const i=o.loaded,s=o.lengthComputable?o.total:void 0,a=i-n,l=r(a),c=i<=s;n=i;const d={loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&c?(s-i)/l:void 0,event:o};d[e?"download":"upload"]=!0,t(d)}}const BN=typeof XMLHttpRequest<"u",GN=BN&&function(t){return new Promise(function(n,r){let o=t.data;const i=Qt.from(t.headers).normalize(),s=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}q.isFormData(o)&&(Lt.isStandardBrowserEnv||Lt.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let c=new XMLHttpRequest;if(t.auth){const p=t.auth.username||"",m=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+m))}const d=AS(t.baseURL,t.url);c.open(t.method.toUpperCase(),CS(d,t.params,t.paramsSerializer),!0),c.timeout=t.timeout;function _(){if(!c)return;const p=Qt.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),g={data:!s||s==="text"||s==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:t,request:c};DN(function(E){n(E),l()},function(E){r(E),l()},g),c=null}if("onloadend"in c?c.onloadend=_:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(_)},c.onabort=function(){c&&(r(new xe("Request aborted",xe.ECONNABORTED,t,c)),c=null)},c.onerror=function(){r(new xe("Network Error",xe.ERR_NETWORK,t,c)),c=null},c.ontimeout=function(){let m=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const g=t.transitional||RS;t.timeoutErrorMessage&&(m=t.timeoutErrorMessage),r(new xe(m,g.clarifyTimeoutError?xe.ETIMEDOUT:xe.ECONNABORTED,t,c)),c=null},Lt.isStandardBrowserEnv){const p=(t.withCredentials||PN(d))&&t.xsrfCookieName&&MN.read(t.xsrfCookieName);p&&i.set(t.xsrfHeaderName,p)}o===void 0&&i.setContentType(null),"setRequestHeader"in c&&q.forEach(i.toJSON(),function(m,g){c.setRequestHeader(g,m)}),q.isUndefined(t.withCredentials)||(c.withCredentials=!!t.withCredentials),s&&s!=="json"&&(c.responseType=t.responseType),typeof t.onDownloadProgress=="function"&&c.addEventListener("progress",j_(t.onDownloadProgress,!0)),typeof t.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",j_(t.onUploadProgress)),(t.cancelToken||t.signal)&&(a=p=>{c&&(r(!p||p.type?new ao(null,t,c):p),c.abort(),c=null)},t.cancelToken&&t.cancelToken.subscribe(a),t.signal&&(t.signal.aborted?a():t.signal.addEventListener("abort",a)));const u=UN(d);if(u&&Lt.protocols.indexOf(u)===-1){r(new xe("Unsupported protocol "+u+":",xe.ERR_BAD_REQUEST,t));return}c.send(o||null)})},Bo={http:uN,xhr:GN};q.forEach(Bo,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const qN={getAdapter:t=>{t=q.isArray(t)?t:[t];const{length:e}=t;let n,r;for(let o=0;ot instanceof Qt?t.toJSON():t;function dr(t,e){e=e||{};const n={};function r(c,d,_){return q.isPlainObject(c)&&q.isPlainObject(d)?q.merge.call({caseless:_},c,d):q.isPlainObject(d)?q.merge({},d):q.isArray(d)?d.slice():d}function o(c,d,_){if(q.isUndefined(d)){if(!q.isUndefined(c))return r(void 0,c,_)}else return r(c,d,_)}function i(c,d){if(!q.isUndefined(d))return r(void 0,d)}function s(c,d){if(q.isUndefined(d)){if(!q.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c,d,_){if(_ in e)return r(c,d);if(_ in t)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(c,d)=>o(Z_(c),Z_(d),!0)};return q.forEach(Object.keys(t).concat(Object.keys(e)),function(d){const _=l[d]||o,u=_(t[d],e[d],d);q.isUndefined(u)&&_!==a||(n[d]=u)}),n}const IS="1.3.6",_u={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{_u[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const J_={};_u.transitional=function(e,n,r){function o(i,s){return"[Axios v"+IS+"] Transitional option '"+i+"'"+s+(r?". "+r:"")}return(i,s,a)=>{if(e===!1)throw new xe(o(s," has been removed"+(n?" in "+n:"")),xe.ERR_DEPRECATED);return n&&!J_[s]&&(J_[s]=!0,console.warn(o(s," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,s,a):!0}};function YN(t,e,n){if(typeof t!="object")throw new xe("options must be an object",xe.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let o=r.length;for(;o-- >0;){const i=r[o],s=e[i];if(s){const a=t[i],l=a===void 0||s(a,i,t);if(l!==!0)throw new xe("option "+i+" must be "+l,xe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new xe("Unknown option "+i,xe.ERR_BAD_OPTION)}}const yd={assertOptions:YN,validators:_u},sn=yd.validators;class Zo{constructor(e){this.defaults=e,this.interceptors={request:new K_,response:new K_}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=dr(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:i}=n;r!==void 0&&yd.assertOptions(r,{silentJSONParsing:sn.transitional(sn.boolean),forcedJSONParsing:sn.transitional(sn.boolean),clarifyTimeoutError:sn.transitional(sn.boolean)},!1),o!=null&&(q.isFunction(o)?n.paramsSerializer={serialize:o}:yd.assertOptions(o,{encode:sn.function,serialize:sn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s;s=i&&q.merge(i.common,i[n.method]),s&&q.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),n.headers=Qt.concat(s,i);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 d,_=0,u;if(!l){const m=[X_.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,c),u=m.length,d=Promise.resolve(n);_{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](o);r._listeners=null}),this.promise.then=o=>{let i;const s=new Promise(a=>{r.subscribe(a),i=a}).then(o);return s.cancel=function(){r.unsubscribe(i)},s},e(function(i,s,a){r.reason||(r.reason=new ao(i,s,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}static source(){let e;return{token:new pu(function(o){e=o}),cancel:e}}}const HN=pu;function VN(t){return function(n){return t.apply(null,n)}}function zN(t){return q.isObject(t)&&t.isAxiosError===!0}const vd={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(vd).forEach(([t,e])=>{vd[e]=t});const $N=vd;function xS(t){const e=new Go(t),n=_S(Go.prototype.request,e);return q.extend(n,Go.prototype,e,{allOwnKeys:!0}),q.extend(n,e,null,{allOwnKeys:!0}),n.create=function(o){return xS(dr(t,o))},n}const $e=xS(uu);$e.Axios=Go;$e.CanceledError=ao;$e.CancelToken=HN;$e.isCancel=NS;$e.VERSION=IS;$e.toFormData=Mi;$e.AxiosError=xe;$e.Cancel=$e.CanceledError;$e.all=function(e){return Promise.all(e)};$e.spread=VN;$e.isAxiosError=zN;$e.mergeConfig=dr;$e.AxiosHeaders=Qt;$e.formToJSON=t=>OS(q.isHTMLForm(t)?new FormData(t):t);$e.HttpStatusCode=$N;$e.default=$e;const Be=$e,WN={data(){return{show:!1,message:""}},methods:{hide(){this.show=!1,this.$emit("ok")},showMessage(t){this.message=t,this.show=!0}}},KN={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},QN={class:"bg-bg-light dark:bg-bg-dark p-8 rounded-lg shadow-lg"},jN={class:"text-lg font-medium"},XN={class:"mt-4 flex justify-center"};function ZN(t,e,n,r,o,i){return o.show?(V(),j("div",KN,[f("div",QN,[f("h3",jN,Ee(o.message),1),f("div",XN,[f("button",{onClick:e[0]||(e[0]=(...s)=>i.hide&&i.hide(...s)),class:"bg-primary hover:bg-primary-light active:scale-95 duration-150 text-white px-4 py-2 rounded-lg shadow-lg hover:bg-secondary-dark"}," OK ")])])])):de("",!0)}const JN=je(WN,[["render",ZN]]),eA={data(){return{show:!1,message:"",resolve:null}},methods:{hide(t){this.show=!1,this.resolve&&(this.resolve(t),this.resolve=null)},askQuestion(t){return new Promise(e=>{this.message=t,this.show=!0,this.resolve=e})}}},tA={key:0,class:"fixed top-0 left-0 right-0 bottom-0 flex items-center justify-center bg-black bg-opacity-50"},nA={class:"relative w-full max-w-md max-h-full"},rA={class:"relative bg-white rounded-lg shadow dark:bg-gray-700"},oA=f("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1),iA=f("span",{class:"sr-only"},"Close modal",-1),sA=[oA,iA],aA={class:"p-4 text-center"},lA=f("svg",{"aria-hidden":"true",class:"mx-auto mb-4 text-gray-400 w-14 h-14 dark:text-gray-200",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),cA={class:"mb-5 text-lg font-normal text-gray-500 dark:text-gray-400 select-none"};function dA(t,e,n,r,o,i){return o.show?(V(),j("div",tA,[f("div",nA,[f("div",rA,[f("button",{type:"button",onClick:e[0]||(e[0]=s=>i.hide(!1)),class:"absolute top-3 right-2.5 text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 ml-auto inline-flex items-center dark:hover:bg-gray-800 dark:hover:text-white"},sA),f("div",aA,[lA,f("h3",cA,Ee(o.message),1),f("button",{onClick:e[1]||(e[1]=s=>i.hide(!0)),type:"button",class:"text-white bg-red-600 hover:bg-red-800 focus:ring-4 focus:outline-none focus:ring-red-300 dark:focus:ring-red-800 font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center mr-2"}," Yes, I'm sure "),f("button",{onClick:e[2]||(e[2]=s=>i.hide(!1)),type:"button",class:"text-gray-500 bg-white hover:bg-gray-100 focus:ring-4 focus:outline-none focus:ring-gray-200 rounded-lg border border-gray-200 text-sm font-medium px-5 py-2.5 hover:text-gray-900 focus:z-10 dark:bg-gray-700 dark:text-gray-300 dark:border-gray-500 dark:hover:text-white dark:hover:bg-gray-600 dark:focus:ring-gray-600"},"No, cancel")])])])])):de("",!0)}const uA=je(eA,[["render",dA]]);const _A={name:"Toast",props:{},data(){return{show:!1,success:!0,message:"",toastArr:[]}},methods:{close(t){this.toastArr=this.toastArr.filter(e=>e.id!=t)},showToast(t,e=3,n=!0){const r=parseInt((new Date().getTime()*Math.random()).toString()).toString(),o={id:r,success:n,message:t,show:!0};this.toastArr.push(o),me(()=>{Ce.replace()}),setTimeout(()=>{this.toastArr=this.toastArr.filter(i=>i.id!=r)},e*1e3)}},watch:{}},br=t=>(yi("data-v-aac71c39"),t=t(),vi(),t),pA={class:"absolute bottom-16 right-2 z-20 flex flex-col gap-3 min-w-[300px]"},mA={class:"flex items-center w-full max-w-xs p-4 mb-4 text-gray-500 bg-white rounded-lg shadow dark:text-gray-400 dark:bg-gray-800",role:"alert"},gA={class:"flex flex-row items-center"},fA={key:0,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-green-500 bg-green-100 rounded-lg dark:bg-green-800 dark:text-green-200"},EA=br(()=>f("i",{"data-feather":"check"},null,-1)),hA=br(()=>f("span",{class:"sr-only"},"Check icon",-1)),SA=[EA,hA],bA={key:1,class:"inline-flex items-center justify-center flex-shrink-0 w-8 h-8 text-red-500 bg-red-100 rounded-lg dark:bg-red-800 dark:text-red-200"},TA=br(()=>f("i",{"data-feather":"x"},null,-1)),yA=br(()=>f("span",{class:"sr-only"},"Cross icon",-1)),vA=[TA,yA],CA={class:"ml-3 text-sm font-normal whitespace-pre-wrap"},RA=["onClick"],OA=br(()=>f("span",{class:"sr-only"},"Close",-1)),NA=br(()=>f("svg",{"aria-hidden":"true",class:"w-5 h-5",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg"},[f("path",{"fill-rule":"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z","clip-rule":"evenodd"})],-1)),AA=[OA,NA];function IA(t,e,n,r,o,i){return V(),j("div",pA,[Oe(hn,{name:"toastItem",tag:"div"},{default:Ze(()=>[(V(!0),j(Ue,null,Mt(o.toastArr,s=>(V(),j("div",{key:s.id},[f("div",mA,[f("div",gA,[Ah(t.$slots,"default",{},()=>[s.success?(V(),j("div",fA,SA)):de("",!0),s.success?de("",!0):(V(),j("div",bA,vA)),f("div",CA,Ee(s.message),1)],!0)]),f("button",{type:"button",onClick:a=>i.close(s.id),class:"ml-auto -mx-1.5 -my-1.5 bg-white text-gray-400 hover:text-gray-900 rounded-lg focus:ring-2 focus:ring-gray-300 p-1.5 hover:bg-gray-100 inline-flex h-8 w-8 dark:text-gray-500 dark:hover:text-white dark:bg-gray-800 dark:hover:bg-gray-700"},AA,8,RA)])]))),128))]),_:3})])}const mu=je(_A,[["render",IA],["__scopeId","data-v-aac71c39"]]),ep="/assets/default_model-9e24e852.png",xA={props:{title:String,icon:String,path:String,owner:String,owner_link:String,license:String,description:String,isInstalled:Boolean,onInstall:Function,onUninstall:Function,onSelected:Function,selected:Boolean,model:Object,model_type:String},data(){return{progress:0,installing:!1,uninstalling:!1,failedToLoad:!1,fileSize:"",linkNotValid:!1}},async mounted(){this.fileSize=await this.getFileSize(this.model.path),me(()=>{Ce.replace()})},methods:{computedFileSize(t){return au(t)},async getFileSize(t){if(console.log(this.model_type),this.model_type!="api")try{const e=await Be.head(t);return e?e.headers["content-length"]?this.computedFileSize(e.headers["content-length"]):this.model.filesize?this.computedFileSize(this.model.filesize):"Could not be determined":this.model.filesize?this.computedFileSize(this.model.filesize):"Could not be determined"}catch(e){return console.log(e.message,"getFileSize"),this.linkNotValid=!0,"Could not be determined"}},getImgUrl(){return this.icon==="/images/default_model.png"?ep:this.icon},defaultImg(t){t.target.src=ep},toggleInstall(){this.isInstalled?(this.uninstalling=!0,this.onUninstall(this)):(this.installing=!0,this.onInstall(this))},toggleSelected(){this.onSelected(this)},handleSelection(){this.isInstalled&&!this.selected&&this.onSelected(this)}},watch:{linkNotValid(){me(()=>{Ce.replace()})}}},wA={key:0,class:"flex-1"},DA={class:"flex gap-3 items-center"},MA=["src"],LA={class:"font-bold font-large text-lg"},kA={key:1,class:"flex-1"},PA={class:"flex gap-3 items-center"},UA=["src"],FA={class:"font-bold font-large text-lg"},BA={class:"flex flex-shrink-0 items-center"},GA=f("i",{"data-feather":"download",class:"w-5 m-1"},null,-1),qA=f("b",null,"Manual download: ",-1),YA=["href"],HA={class:"flex flex-shrink-0 items-center"},VA=f("i",{"data-feather":"file",class:"w-5 m-1"},null,-1),zA=f("b",null,"File size: ",-1),$A={class:"flex flex-shrink-0 items-center"},WA=f("i",{"data-feather":"key",class:"w-5 m-1"},null,-1),KA=f("b",null,"License: ",-1),QA={class:"flex flex-shrink-0 items-center"},jA=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),XA=f("b",null,"Owner: ",-1),ZA=["href"],JA=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),eI={class:"mx-1 opacity-80"},tI={class:"flex-shrink-0"},nI=["disabled"],rI={key:0,class:"flex items-center space-x-2"},oI={class:"h-2 w-20 bg-gray-300 rounded"},iI={key:1,class:"flex items-center space-x-2"},sI={class:"h-2 w-20 bg-gray-300 rounded"},aI=f("span",null,"Uninstalling...",-1);function lI(t,e,n,r,o,i){return V(),j("div",{class:Le(["flex items-center p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[5]||(e[5]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[n.model.isCustomModel?(V(),j("div",wA,[f("div",DA,[f("img",{src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-lg object-fill"},null,40,MA),f("h3",LA,Ee(n.title),1)])])):de("",!0),n.model.isCustomModel?de("",!0):(V(),j("div",kA,[f("div",PA,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[1]||(e[1]=s=>i.defaultImg(s)),class:Le(["w-10 h-10 rounded-lg object-fill",o.linkNotValid?"grayscale":""])},null,42,UA),f("h3",FA,Ee(n.title),1)]),f("div",BA,[GA,qA,f("a",{href:n.path,onClick:e[2]||(e[2]=Se(()=>{},["stop"])),class:"flex items-center hover:text-secondary duration-75 active:scale-90",title:"Download this manually (faster) and put it in the models/ folder then refresh"},Ee(n.title),9,YA)]),f("div",HA,[f("div",{class:Le(["flex flex-shrink-0 items-center",o.linkNotValid?"text-red-600":""])},[VA,zA,qe(" "+Ee(o.fileSize),1)],2)]),f("div",$A,[WA,KA,qe(" "+Ee(n.license),1)]),f("div",QA,[jA,XA,f("a",{href:n.owner_link,target:"_blank",rel:"noopener noreferrer",onClick:e[3]||(e[3]=Se(()=>{},["stop"])),class:"flex hover:text-secondary duration-75 active:scale-90",title:"Owner's profile"},Ee(n.owner),9,ZA)]),JA,f("p",eI,Ee(n.description),1)])),f("div",tI,[n.model_type!=="api"?(V(),j("button",{key:0,class:Le(["px-4 py-2 rounded-md text-white font-bold transition-colors duration-300",[n.isInstalled?"bg-red-500 hover:bg-red-600":o.linkNotValid?"bg-gray-500 hover:bg-gray-600":"bg-green-500 hover:bg-green-600"]]),disabled:o.installing||o.uninstalling,onClick:e[4]||(e[4]=Se((...s)=>i.toggleInstall&&i.toggleInstall(...s),["stop"]))},[o.installing?(V(),j("div",rI,[f("div",oI,[f("div",{style:Gn({width:o.progress+"%"}),class:"h-full bg-red-500 rounded"},null,4)]),f("span",null,"Installing..."+Ee(Math.floor(o.progress))+"%",1)])):o.uninstalling?(V(),j("div",iI,[f("div",sI,[f("div",{style:Gn({width:o.progress+"%"}),class:"h-full bg-green-500"},null,4)]),aI])):(V(),j(Ue,{key:2},[qe(Ee(n.isInstalled?n.model.isCustomModel?"Delete":"Uninstall":o.linkNotValid?"Link is not valid":"Install"),1)],64))],10,nI)):de("",!0)])],2)}const cI=je(xA,[["render",lI]]),dI={data(){return{editMode:!1,avatar:"path/to/avatar.jpg",personalityName:"Personality Name",personalityAuthor:"Author Name",personalityDescription:"Personality Description",personalityLanguage:"English",personalityCategory:"Category",disclaimer:"Disclaimer text",conditioningText:"Conditioning Text",aiPrefix:"AI Prefix",userPrefix:"User Prefix",antipromptsList:[{id:1,text:"Antiprompt 1"},{id:2,text:"Antiprompt 2"},{id:3,text:"Antiprompt 3"}]}},methods:{commitChanges(){console.log("Personality changes committed"),this.editMode=!1}}},uI={class:"p-4"},_I={class:"flex items-center mb-4"},pI=["src"],mI={class:"text-lg font-semibold"},gI=f("strong",null,"Author:",-1),fI=f("strong",null,"Description:",-1),EI=f("strong",null,"Language:",-1),hI=f("strong",null,"Category:",-1),SI={key:0},bI=f("strong",null,"Disclaimer:",-1),TI=f("strong",null,"Conditioning Text:",-1),yI=f("strong",null,"AI Prefix:",-1),vI=f("strong",null,"User Prefix:",-1),CI=f("strong",null,"Antiprompts:",-1);function RI(t,e,n,r,o,i){return V(),j("div",uI,[f("div",_I,[f("img",{src:o.avatar,class:"w-12 h-12 rounded-full mr-2",alt:"Avatar"},null,8,pI),f("h2",mI,Ee(o.personalityName),1)]),f("p",null,[gI,qe(" "+Ee(o.personalityAuthor),1)]),f("p",null,[fI,qe(" "+Ee(o.personalityDescription),1)]),f("p",null,[EI,qe(" "+Ee(o.personalityLanguage),1)]),f("p",null,[hI,qe(" "+Ee(o.personalityCategory),1)]),o.disclaimer?(V(),j("p",SI,[bI,qe(" "+Ee(o.disclaimer),1)])):de("",!0),f("p",null,[TI,qe(" "+Ee(o.conditioningText),1)]),f("p",null,[yI,qe(" "+Ee(o.aiPrefix),1)]),f("p",null,[vI,qe(" "+Ee(o.userPrefix),1)]),f("div",null,[CI,f("ul",null,[(V(!0),j(Ue,null,Mt(o.antipromptsList,s=>(V(),j("li",{key:s.id},Ee(s.text),1))),128))])]),f("button",{onClick:e[0]||(e[0]=s=>o.editMode=!0),class:"mt-4 bg-blue-500 text-white px-4 py-2 rounded"}," Edit "),o.editMode?(V(),j("button",{key:1,onClick:e[1]||(e[1]=(...s)=>i.commitChanges&&i.commitChanges(...s)),class:"mt-4 bg-green-500 text-white px-4 py-2 rounded"}," Commit ")):de("",!0)])}const OI=je(dI,[["render",RI]]),NI="/assets/default_user-17642e5a.svg",AI="/",II={props:{personality:{},onSelected:Function,selected:Boolean},data(){return{}},mounted(){me(()=>{Ce.replace()})},methods:{getImgUrl(){return AI+this.personality.avatar},defaultImg(t){t.target.src=cr},toggleSelected(){this.onSelected(this)}}},xI={class:"flex flex-row items-center flex-shrink-0 gap-3"},wI=["src"],DI={class:"font-bold font-large text-lg line-clamp-3"},MI={class:""},LI={class:""},kI={class:"flex items-center"},PI=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),UI=f("b",null,"Author: ",-1),FI=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),BI=["title"];function GI(t,e,n,r,o,i){return V(),j("div",{class:Le(["items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[1]||(e[1]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[f("div",xI,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-full object-fill text-red-700"},null,40,wI),f("h3",DI,Ee(n.personality.name),1)]),f("div",MI,[f("div",LI,[f("div",kI,[PI,UI,qe(" "+Ee(n.personality.author),1)])]),FI,f("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.personality.description},Ee(n.personality.description),9,BI)])],2)}const qI=je(II,[["render",GI]]),YI="/",HI={props:{binding:{},onSelected:Function,selected:Boolean},data(){return{isTemplate:!1,hasAdvancedSettings:!1}},mounted(){me(()=>{Ce.replace()})},methods:{getImgUrl(){return YI+this.binding.icon},defaultImg(t){t.target.src=cr},toggleSelected(){this.onSelected(this)},getStatus(){(this.binding.folder==="backend_template"||this.binding.folder==="binding_template")&&(this.isTemplate=!0)}}},VI={class:"flex flex-row items-center gap-3"},zI=["src"],$I={class:"font-bold font-large text-lg truncate"},WI=f("div",{class:"grow"},null,-1),KI={key:0,class:"flex-none"},QI=f("i",{"data-feather":"sliders",class:"w-5 m-1"},null,-1),jI=f("span",{class:"sr-only"},"Icon description",-1),XI=[QI,jI],ZI={class:""},JI={class:""},ex={class:"flex items-center"},tx=f("i",{"data-feather":"user",class:"w-5 m-1"},null,-1),nx=f("b",null,"Author: ",-1),rx={class:"flex items-center"},ox=f("i",{"data-feather":"folder",class:"w-5 m-1"},null,-1),ix=f("b",null,"Folder: ",-1),sx={class:"flex items-center"},ax=f("i",{"data-feather":"git-merge",class:"w-5 m-1"},null,-1),lx=f("b",null,"Version: ",-1),cx=["href"],dx=f("i",{"data-feather":"github",class:"w-5 m-1"},null,-1),ux=f("b",null,"Link: ",-1),_x=f("div",{class:"flex items-center"},[f("i",{"data-feather":"info",class:"w-5 m-1"}),f("b",null,"Description: "),f("br")],-1),px=["title"];function mx(t,e,n,r,o,i){return V(),j("div",{class:Le(["items-start p-4 hover:bg-primary-light rounded-lg mb-2 shadow-lg border-2 cursor-pointer active:scale-95 duration-75 select-none",n.selected?" border-primary-light":"border-transparent"]),onClick:e[2]||(e[2]=Se((...s)=>i.toggleSelected&&i.toggleSelected(...s),["stop"]))},[f("div",{class:Le(o.isTemplate?"opacity-50":"")},[f("div",VI,[f("img",{ref:"imgElement",src:i.getImgUrl(),onError:e[0]||(e[0]=s=>i.defaultImg(s)),class:"w-10 h-10 rounded-full object-fill text-blue-700"},null,40,zI),f("h3",$I,Ee(n.binding.name),1),WI,o.hasAdvancedSettings?(V(),j("div",KI,[f("button",{type:"button",title:"Not implemented",class:"hover:text-secondary duration-75 active:scale-90 font-medium rounded-lg text-sm p-2 text-center inline-flex items-center",onClick:e[1]||(e[1]=Se(()=>{},["stop"]))},XI)])):de("",!0)]),f("div",ZI,[f("div",JI,[f("div",ex,[tx,nx,qe(" "+Ee(n.binding.author),1)]),f("div",rx,[ox,ix,qe(" "+Ee(n.binding.folder),1)]),f("div",sx,[ax,lx,qe(" "+Ee(n.binding.version),1)]),f("a",{href:n.binding.link,target:"_blank",class:"flex items-center"},[dx,ux,qe(" "+Ee(n.binding.link),1)],8,cx)]),_x,f("p",{class:"mx-1 opacity-80 line-clamp-3",title:n.binding.description},Ee(n.binding.description),9,px)])],2)],2)}const gx=je(HI,[["render",mx]]),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 qo=Object.create(null);Object.keys(Gt).forEach(t=>{qo[Gt[t]]=t});const fx={type:"error",data:"parser error"},Ex=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",hx=typeof ArrayBuffer=="function",Sx=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,wS=({type:t,data:e},n,r)=>Ex&&e instanceof Blob?n?r(e):tp(e,r):hx&&(e instanceof ArrayBuffer||Sx(e))?n?r(e):tp(new Blob([e]),r):r(Gt[t]+(e||"")),tp=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)},np="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t{let e=t.length*.75,n=t.length,r,o=0,i,s,a,l;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);const c=new ArrayBuffer(e),d=new Uint8Array(c);for(r=0;r>4,d[o++]=(s&15)<<4|a>>2,d[o++]=(a&3)<<6|l&63;return c},Tx=typeof ArrayBuffer=="function",DS=(t,e)=>{if(typeof t!="string")return{type:"message",data:MS(t,e)};const n=t.charAt(0);return n==="b"?{type:"message",data:yx(t.substring(1),e)}:qo[n]?t.length>1?{type:qo[n],data:t.substring(1)}:{type:qo[n]}:fx},yx=(t,e)=>{if(Tx){const n=bx(t);return MS(n,e)}else return{base64:!0,data:t}},MS=(t,e)=>{switch(e){case"blob":return t instanceof ArrayBuffer?new Blob([t]):t;case"arraybuffer":default:return t}},LS=String.fromCharCode(30),vx=(t,e)=>{const n=t.length,r=new Array(n);let o=0;t.forEach((i,s)=>{wS(i,!1,a=>{r[s]=a,++o===n&&e(r.join(LS))})})},Cx=(t,e)=>{const n=t.split(LS),r=[];for(let o=0;otypeof self<"u"?self:typeof window<"u"?window:Function("return this")())();function PS(t,...e){return e.reduce((n,r)=>(t.hasOwnProperty(r)&&(n[r]=t[r]),n),{})}const Ox=ft.setTimeout,Nx=ft.clearTimeout;function Pi(t,e){e.useNativeTimers?(t.setTimeoutFn=Ox.bind(ft),t.clearTimeoutFn=Nx.bind(ft)):(t.setTimeoutFn=ft.setTimeout.bind(ft),t.clearTimeoutFn=ft.clearTimeout.bind(ft))}const Ax=1.33;function Ix(t){return typeof t=="string"?xx(t):Math.ceil((t.byteLength||t.size)*Ax)}function xx(t){let e=0,n=0;for(let r=0,o=t.length;r=57344?n+=3:(r++,n+=4);return n}class wx extends Error{constructor(e,n,r){super(e),this.description=n,this.context=r,this.type="TransportError"}}class US extends ze{constructor(e){super(),this.writable=!1,Pi(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,n,r){return super.emitReserved("error",new wx(e,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(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const n=DS(e,this.socket.binaryType);this.onPacket(n)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}}const FS="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),Cd=64,Dx={};let rp=0,To=0,op;function ip(t){let e="";do e=FS[t%Cd]+e,t=Math.floor(t/Cd);while(t>0);return e}function BS(){const t=ip(+new Date);return t!==op?(rp=0,op=t):t+"."+ip(rp++)}for(;To{this.readyState="paused",e()};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(e){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)};Cx(e,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this.polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,vx(e,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let e=this.query||{};const n=this.opts.secure?"https":"http";let r="";this.opts.timestampRequests!==!1&&(e[this.opts.timestampParam]=BS()),!this.supportsBinary&&!e.sid&&(e.b64=1),this.opts.port&&(n==="https"&&Number(this.opts.port)!==443||n==="http"&&Number(this.opts.port)!==80)&&(r=":"+this.opts.port);const o=GS(e),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}request(e={}){return Object.assign(e,{xd:this.xd,xs:this.xs},this.opts),new Ut(this.uri(),e)}doWrite(e,n){const r=this.request({method:"POST",data:e});r.on("success",n),r.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=e}}class Ut extends ze{constructor(e,n){super(),Pi(this,n),this.opts=n,this.method=n.method||"GET",this.uri=e,this.async=n.async!==!1,this.data=n.data!==void 0?n.data:null,this.create()}create(){const e=PS(this.opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");e.xdomain=!!this.opts.xd,e.xscheme=!!this.opts.xs;const n=this.xhr=new YS(e);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=Ut.requestsCount++,Ut.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(!(typeof this.xhr>"u"||this.xhr===null)){if(this.xhr.onreadystatechange=kx,e)try{this.xhr.abort()}catch{}typeof document<"u"&&delete Ut.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}Ut.requestsCount=0;Ut.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",sp);else if(typeof addEventListener=="function"){const t="onpagehide"in ft?"pagehide":"unload";addEventListener(t,sp,!1)}}function sp(){for(let t in Ut.requests)Ut.requests.hasOwnProperty(t)&&Ut.requests[t].abort()}const HS=(()=>typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,n)=>n(e,0))(),yo=ft.WebSocket||ft.MozWebSocket,ap=!0,Fx="arraybuffer",lp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bx extends US{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),n=this.opts.protocols,r=lp?{}:PS(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=ap&&!lp?n?new yo(e,n):new yo(e):new yo(e,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType||Fx,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let n=0;n{const s={};try{ap&&this.ws.send(i)}catch{}o&&HS(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){let e=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&&(e[this.opts.timestampParam]=BS()),this.supportsBinary||(e.b64=1);const o=GS(e),i=this.opts.hostname.indexOf(":")!==-1;return n+"://"+(i?"["+this.opts.hostname+"]":this.opts.hostname)+r+this.opts.path+(o.length?"?"+o:"")}check(){return!!yo}}const Gx={websocket:Bx,polling:Ux},qx=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Yx=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Rd(t){const e=t,n=t.indexOf("["),r=t.indexOf("]");n!=-1&&r!=-1&&(t=t.substring(0,n)+t.substring(n,r).replace(/:/g,";")+t.substring(r,t.length));let o=qx.exec(t||""),i={},s=14;for(;s--;)i[Yx[s]]=o[s]||"";return n!=-1&&r!=-1&&(i.source=e,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Hx(i,i.path),i.queryKey=Vx(i,i.query),i}function Hx(t,e){const n=/\/{2,9}/g,r=e.replace(n,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&r.splice(0,1),e.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Vx(t,e){const n={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,i){o&&(n[o]=i)}),n}let VS=class Qn extends ze{constructor(e,n={}){super(),this.writeBuffer=[],e&&typeof e=="object"&&(n=e,e=null),e?(e=Rd(e),n.hostname=e.host,n.secure=e.protocol==="https"||e.protocol==="wss",n.port=e.port,e.query&&(n.query=e.query)):n.host&&(n.hostname=Rd(n.host).host),Pi(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=Mx(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(e){const n=Object.assign({},this.opts.query);n.EIO=kS,n.transport=e,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts.transportOptions[e],this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port});return new Gx[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Qn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1)e="websocket";else if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}else e=this.transports[0];this.readyState="opening";try{e=this.createTransport(e)}catch{this.transports.shift(),this.open();return}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.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(e){let n=this.createTransport(e),r=!1;Qn.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",_=>{if(!r)if(_.type==="pong"&&_.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Qn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const u=new Error("probe error");u.transport=n.name,this.emitReserved("upgradeError",u)}}))};function i(){r||(r=!0,d(),n.close(),n=null)}const s=_=>{const u=new Error("probe error: "+_);u.transport=n.name,i(),this.emitReserved("upgradeError",u)};function a(){s("transport closed")}function l(){s("socket closed")}function c(_){n&&_.name!==n.name&&i()}const d=()=>{n.removeListener("open",o),n.removeListener("error",s),n.removeListener("close",a),this.off("close",l),this.off("upgrading",c)};n.once("open",o),n.once("error",s),n.once("close",a),this.once("close",l),this.once("upgrading",c),n.open()}onOpen(){if(this.readyState="open",Qn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade){let e=0;const n=this.upgrades.length;for(;e{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 e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.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(e,n,r){return this.sendPacket("message",e,n,r),this}send(e,n,r){return this.sendPacket("message",e,n,r),this}sendPacket(e,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:e,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),e()},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():e()}):this.upgrading?r():e()),this}onError(e){Qn.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,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",e,n),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const n=[];let r=0;const o=e.length;for(;rtypeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,zS=Object.prototype.toString,Kx=typeof Blob=="function"||typeof Blob<"u"&&zS.call(Blob)==="[object BlobConstructor]",Qx=typeof File=="function"||typeof File<"u"&&zS.call(File)==="[object FileConstructor]";function gu(t){return $x&&(t instanceof ArrayBuffer||Wx(t))||Kx&&t instanceof Blob||Qx&&t instanceof File}function Yo(t,e){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let n=0,r=t.length;n=0&&t.num{delete this.acks[e];for(let s=0;s{this.io.clearTimeoutFn(i),n.apply(this,[null,...s])}}emitWithAck(e,...n){const r=this.flags.timeout!==void 0||this._opts.ackTimeout!==void 0;return new Promise((o,i)=>{n.push((s,a)=>r?s?i(s):o(a):o(s)),this.emit(e,...n)})}_addToQueue(e){let n;typeof e[e.length-1]=="function"&&(n=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((o,...i)=>r!==this._queue[0]?void 0:(o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!e||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,n)}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Ne.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.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 Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(e);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(e);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();const r=new Error(e.data.message);r.data=e.data.data,this.emitReserved("connect_error",r);break}}onevent(e){const n=e.data||[];e.id!=null&&n.push(this.ack(e.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:Ne.ACK,id:e,data:o}))}}onack(e){const n=this.acks[e.id];typeof n=="function"&&(n.apply(this,e.data),delete this.acks[e.id])}onconnect(e,n){this.id=e,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const n=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}Tr.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),n=Math.floor(e*this.jitter*t);t=Math.floor(e*10)&1?t+n:t-n}return Math.min(t,this.max)|0};Tr.prototype.reset=function(){this.attempts=0};Tr.prototype.setMin=function(t){this.ms=t};Tr.prototype.setMax=function(t){this.max=t};Tr.prototype.setJitter=function(t){this.jitter=t};class Ad extends ze{constructor(e,n){var r;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(n=e,e=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Pi(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 Tr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=e;const o=n.parser||tw;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var n;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(n=this.backoff)===null||n===void 0||n.setMin(e),this)}randomizationFactor(e){var n;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(n=this.backoff)===null||n===void 0||n.setJitter(e),this)}reconnectionDelayMax(e){var n;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(n=this.backoff)===null||n===void 0||n.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new VS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Rt(n,"open",function(){r.onopen(),e&&e()}),i=Rt(n,"error",s=>{r.cleanup(),r._readyState="closed",this.emitReserved("error",s),e?e(s):r.maybeReconnectOnOpen()});if(this._timeout!==!1){const s=this._timeout;s===0&&o();const a=this.setTimeoutFn(()=>{o(),n.close(),n.emit("error",new Error("timeout"))},s);this.opts.autoUnref&&a.unref(),this.subs.push(function(){clearTimeout(a)})}return this.subs.push(o),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(Rt(e,"ping",this.onping.bind(this)),Rt(e,"data",this.ondata.bind(this)),Rt(e,"error",this.onerror.bind(this)),Rt(e,"close",this.onclose.bind(this)),Rt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(n){this.onclose("parse error",n)}}ondecoded(e){HS(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,n){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new $S(this,e,n),this.nsps[e]=r),r}_destroy(e){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(e){const n=this.encoder.encode(e);for(let r=0;re()),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(e,n){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=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(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(o=>{o?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",o)):e.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(function(){clearTimeout(r)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ir={};function Ho(t,e){typeof t=="object"&&(e=t,t=void 0),e=e||{};const n=zx(t,e.path||"/socket.io"),r=n.source,o=n.id,i=n.path,s=Ir[o]&&i in Ir[o].nsps,a=e.forceNew||e["force new connection"]||e.multiplex===!1||s;let l;return a?l=new Ad(r,e):(Ir[o]||(Ir[o]=new Ad(r,e)),l=Ir[o]),n.query&&!e.query&&(e.query=n.queryKey),l.socket(n.path,e)}Object.assign(Ho,{Manager:Ad,Socket:$S,io:Ho,connect:Ho});const Ve=new Ho("https://0.0.0.0:9600");Ve.onopen=()=>{console.log("WebSocket connection established.")};Ve.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason)};Ve.onerror=t=>{console.error("WebSocket error:",t),Ve.disconnect()};Ve.on("connect",()=>{console.log("WebSocket connected (websocket)")});Ve.on("disconnect",()=>{console.log("WebSocket disonnected (websocket)")});const WS=Xh();WS.config.globalProperties.$socket=Ve;WS.mount();Be.defaults.baseURL="/";const rw={components:{MessageBox:JN,YesNoDialog:uA,ModelEntry:cI,PersonalityViewer:OI,Toast:mu,PersonalityEntry:qI,BindingEntry:gx},data(){return{models:[],personalities:[],personalitiesFiltered:[],bindings:[],collapsedArr:[],all_collapsed:!0,bec_collapsed:!0,mzc_collapsed:!0,pzc_collapsed:!0,bzc_collapsed:!0,pc_collapsed:!0,mc_collapsed:!0,mzl_collapsed:!1,pzl_collapsed:!1,bzl_collapsed:!1,bindingsArr:[],modelsArr:[],persLangArr:[],persCatgArr:[],persArr:[],langArr:[],configFile:{},showConfirmation:!1,showToast:!1,isLoading:!1,settingsChanged:!1,isModelSelected:!1,diskUsage:{},isMounted:!1}},created(){},methods:{collapseAll(t){this.bec_collapsed=t,this.mzc_collapsed=t,this.pzc_collapsed=t,this.bzc_collapsed=t,this.pc_collapsed=t,this.mc_collapsed=t},fetchModels(){Be.get("/get_available_models").then(t=>{this.models=t.data,this.fetchCustomModels()}).catch(t=>{console.log(t.message,"fetchModels")})},fetchCustomModels(){Be.get("/list_models").then(t=>{for(let e=0;eo.title==n)==-1){let o={};o.title=n,o.path=n,o.isCustomModel=!0,o.isInstalled=!0,this.models.push(o)}}}).catch(t=>{console.log(t.message,"fetchCustomModels")})},onPersonalitySelected(t){this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),t.personality&&(this.configFile.personality!=t.personality.name&&(this.settingsChanged=!0,this.update_setting("personality",t.personality.folder,()=>{this.$refs.toast.showToast(`Selected personality: `+t.personality.name,4,!0),this.configFile.personality=t.personality.name,this.configFile.personality_category=t.personality.category,this.configFile.personality_language=t.personality.language})),me(()=>{Ce.replace()}))},onSelected(t){this.isLoading&&this.$refs.toast.showToast("Loading... please wait",4,!1),t&&(t.isInstalled?this.configFile.model!=t.title&&(this.update_model(t.title),this.configFile.model=t.title,this.$refs.toast.showToast(`Selected model: `+t.title,4,!0),this.settingsChanged=!0,this.isModelSelected=!0):this.$refs.toast.showToast(`Model: `+t.title+` diff --git a/web/dist/index.html b/web/dist/index.html index b21bbb63..4b6659bb 100644 --- a/web/dist/index.html +++ b/web/dist/index.html @@ -6,7 +6,7 @@ GPT4All - WEBUI - +