2023-10-27 23:36:53 +00:00
( function ( ) { const e = document . createElement ( "link" ) . relList ; if ( e && e . supports && e . supports ( "modulepreload" ) ) return ; for ( const s of document . querySelectorAll ( 'link[rel="modulepreload"]' ) ) r ( s ) ; new MutationObserver ( s => { for ( const o of s ) if ( o . type === "childList" ) for ( const i of o . addedNodes ) i . tagName === "LINK" && i . rel === "modulepreload" && r ( i ) } ) . observe ( document , { childList : ! 0 , subtree : ! 0 } ) ; function n ( s ) { const o = { } ; return s . integrity && ( o . integrity = s . integrity ) , s . referrerPolicy && ( o . referrerPolicy = s . referrerPolicy ) , s . crossOrigin === "use-credentials" ? o . credentials = "include" : s . crossOrigin === "anonymous" ? o . credentials = "omit" : o . credentials = "same-origin" , o } function r ( s ) { if ( s . ep ) return ; s . ep = ! 0 ; const o = n ( s ) ; fetch ( s . href , o ) } } ) ( ) ; function S _ ( t , e ) { const n = Object . create ( null ) , r = t . split ( "," ) ; for ( let s = 0 ; s < r . length ; s ++ ) n [ r [ s ] ] = ! 0 ; return e ? s => ! ! n [ s . toLowerCase ( ) ] : s => ! ! n [ s ] } const Je = { } , Lr = [ ] , Bt = ( ) => { } , pC = ( ) => ! 1 , mC = /^on[^a-z]/ , Ci = t => mC . test ( t ) , y _ = t => t . startsWith ( "onUpdate:" ) , ot = Object . assign , v _ = ( t , e ) => { const n = t . indexOf ( e ) ; n > - 1 && t . splice ( n , 1 ) } , gC = Object . prototype . hasOwnProperty , ze = ( t , e ) => gC . call ( t , e ) , we = Array . isArray , Pr = t => ss ( t ) === "[object Map]" , rs = t => ss ( t ) === "[object Set]" , Xp = t => ss ( t ) === "[object Date]" , fC = t => ss ( t ) === "[object RegExp]" , Me = t => typeof t == "function" , st = t => typeof t == "string" , Fs = t => typeof t == "symbol" , je = t => t !== null && typeof t == "object" , fS = t => je ( t ) && Me ( t . then ) && Me ( t . catch ) , hS = Object . prototype . toString , ss = t => hS . call ( t ) , hC = t => ss ( t ) . slice ( 8 , - 1 ) , ES = t => ss ( t ) === "[object Object]" , T _ = t => st ( t ) && t !== "NaN" && t [ 0 ] !== "-" && "" + parseInt ( t , 10 ) === t , Yo = S _ ( ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" ) , Ri = t => { const e = Object . create ( null ) ; return n => e [ n ] || ( e [ n ] = t ( n ) ) } , EC = /-(\w)/g , tn = Ri ( t => t . replace ( EC , ( e , n ) => n ? n . toUpperCase ( ) : "" ) ) , bC = /\B([A-Z])/g , fr = Ri ( t => t . replace ( bC , "-$1" ) . toLowerCase ( ) ) , xi = Ri ( t => t . charAt ( 0 ) . toUpperCase ( ) + t . slice ( 1 ) ) , Ta = Ri ( t => t ? ` on ${ xi ( t ) } ` : "" ) , Us = ( t , e ) => ! Object . is ( t , e ) , Fr = ( t , e ) => { for ( let n = 0 ; n < t . length ; n ++ ) t [ n ] ( e ) } , ei = ( t , e , n ) => { Object . defineProperty ( t , e , { configurable : ! 0 , enumerable : ! 1 , value : n } ) } , ti = t => { const e = parseFloat ( t ) ; return isNaN ( e ) ? t : e } , SC = t => { const e = st ( t ) ? Number ( t ) : NaN ; return isNaN ( e ) ? t : e } ; let Jp ; const Lu = ( ) => Jp || ( Jp = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : { } ) ; function ht ( t ) { if ( we ( t ) ) { const e = { } ; for ( let n = 0 ; n < t . length ; n ++ ) { const r = t [ n ] , s = st ( r ) ? CC ( r ) : ht ( r ) ; if ( s ) for ( const o in s ) e [ o ] = s [ o ] } return e } else { if ( st ( t ) ) return t ; if ( je ( t ) ) return t } } const yC = /;(?![^(]*\))/g , vC = /:([^]+)/ , TC = /\/\*[^]*?\*\//g ; function CC ( t ) { const e = { } ; return t . replace ( TC , "" ) . split ( yC ) . forEach ( n => { if ( n ) { const r = n . split ( vC ) ; r . length > 1 && ( e [ r [ 0 ] . trim ( ) ] = r [ 1 ] . trim ( ) ) } } ) , e } function Ae ( t ) { let e = "" ; if ( st ( t ) ) e = t ; else if ( we ( t ) ) for ( let n = 0 ; n < t . length ; n ++ ) { const r = Ae ( t [ n ] ) ; r && ( e += r + " " ) } else if ( je ( t ) ) for ( const n in t ) t [ n ] && ( e += n + " " ) ; return e . trim ( ) } const RC = "itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly" , xC = S _ ( RC ) ; function bS ( t ) { return ! ! t || t === "" } function OC ( t , e ) { if ( t . length !== e . length ) return ! 1 ; let n = ! 0 ; for ( let r = 0 ; n && r < t . length ; r ++ ) n = _r ( t [ r ] , e [ r ] ) ; return n } function _r ( t , e ) { if ( t === e ) return ! 0 ; let n = Xp ( t ) , r = Xp ( e ) ; if ( n || r ) return n && r ? t . getTime ( ) === e . getTime ( ) : ! 1 ; if ( n = Fs ( t ) , r = Fs ( e ) , n || r ) return t === e ; if ( n = we ( t ) , r = we ( e ) , n || r ) return n && r ? OC ( t , e ) : ! 1 ; if ( n = je ( t ) , r = je ( e ) , n || r ) { if ( ! n || ! r ) return ! 1 ; const s = Object . keys ( t ) . length , o = Object . keys ( e ) . length ; if ( s !== o ) return ! 1 ; for ( const i in t ) { const a = t . hasOwnProperty ( i ) , l = e . hasOwnProperty ( i ) ; if ( a && ! l || ! a && l || ! _r ( t [ i ] , e [ i ] ) ) return ! 1 } } return String ( t ) === String ( e ) } function C _ ( t , e ) { return t . findIndex ( n => _r ( n , e ) ) } const j = t => st ( t ) ? t : t == null ? "" : we ( t ) || je ( t ) && ( t . toString === hS || ! Me ( t . toString ) ) ? JSON . stringify ( t , SS , 2 ) : String ( t ) , SS = ( t , e ) => e && e . _ _v _isRef ? SS ( t , e . value ) : Pr ( e ) ? { [ ` Map( ${ e . size } ) ` ] : [ ... e . entries ( ) ] . reduce ( ( n , [ r , s ] ) => ( n [ ` ${ r } => ` ] = s , n ) , { } ) } : rs ( e ) ? { [ ` Set( ${ e . size } ) ` ] : [ ... e . values ( ) ] } : je ( e ) && ! we ( e ) && ! ES ( e ) ? String ( e ) : e ; let Lt ; class yS { constructor ( e = ! 1 ) { this . detached = e , this . _active = ! 0 , this . effects = [ ] , this . cleanups = [ ] , this . parent = Lt , ! e && Lt && ( this . index = ( Lt . scopes || ( Lt . scopes = [ ] ) ) . pus
2023-10-23 23:40:39 +00:00
* vuex v4 . 1.0
* ( c ) 2022 Evan You
* @ license MIT
* /var JR="store";function as(t,e){Object.keys(t).forEach(function(n){return e(t[n],n)})}function e1(t){return t!==null&&typeof t=="object"}function t1(t){return t&&typeof t.then=="function"}function n1(t,e){return function(){return t(e)}}function Ry(t,e,n){return e.indexOf(t)<0&&(n&&n.prepend?e.unshift(t):e.push(t)),function(){var r=e.indexOf(t);r>-1&&e.splice(r,1)}}function xy(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var n=t.state;Pi(t,n,[],t._modules.root,!0),H_(t,n,e)}function H_(t,e,n){var r=t._state,s=t._scope;t.getters={},t._makeLocalGettersCache=Object.create(null);var o=t._wrappedGetters,i={},a={},l=AC(!0);l.run(function(){as(o,function(u,c){i[c]=n1(u,t),a[c]=Ot(function(){return i[c]()}),Object.defineProperty(t.getters,c,{get:function(){return a[c].value},enumerable:!0})})}),t._state=eo({data:e}),t._scope=l,t.strict&&a1(t),r&&n&&t._withCommit(function(){r.data=null}),s&&s.stop()}function Pi(t,e,n,r,s){var o=!n.length,i=t._modules.getNamespace(n);if(r.namespaced&&(t._modulesNamespaceMap[i],t._modulesNamespaceMap[i]=r),!o&&!s){var a=$_(e,n.slice(0,-1)),l=n[n.length-1];t._withCommit(function(){a[l]=r.state})}var u=r.context=r1(t,i,n);r.forEachMutation(function(c,_){var p=i+_;s1(t,p,c,u)}),r.forEachAction(function(c,_){var p=c.root?_:i+_,g=c.handler||c;o1(t,p,g,u)}),r.forEachGetter(function(c,_){var p=i+_;i1(t,p,c,u)}),r.forEachChild(function(c,_){Pi(t,e,n.concat(_),c,s)})}function r1(t,e,n){var r=e==="",s={dispatch:r?t.dispatch:function(o,i,a){var l=ai(o,i,a),u=l.payload,c=l.options,_=l.type;return(!c||!c.root)&&(_=e+_),t.dispatch(_,u)},commit:r?t.commit:function(o,i,a){var l=ai(o,i,a),u=l.payload,c=l.options,_=l.type;(!c||!c.root)&&(_=e+_),t.commit(_,u,c)}};return Object.defineProperties(s,{getters:{get:r?function(){return t.getters}:function(){return Oy(t,e)}},state:{get:function(){return $_(t.state,n)}}}),s}function Oy(t,e){if(!t._makeLocalGettersCache[e]){var n={},r=e.length;Object.keys(t.getters).forEach(function(s){if(s.slice(0,r)===e){var o=s.slice(r);Object.defineProperty(n,o,{get:function(){return t.getters[s]},enumerable:!0})}}),t._makeLocalGettersCache[e]=n}return t._makeLocalGettersCache[e]}function s1(t,e,n,r){var s=t._mutations[e]||(t._mutations[e]=[]);s.push(function(i){n.call(t,r.state,i)})}function o1(t,e,n,r){var s=t._actions[e]||(t._actions[e]=[]);s.push(function(i){var a=n.call(t,{dispatch:r.dispatch,commit:r.commit,getters:r.getters,state:r.state,rootGetters:t.getters,rootState:t.state},i);return t1(a)||(a=Promise.resolve(a)),t._devtoolHook?a.catch(function(l){throw t._devtoolHook.emit("vuex:error",l),l}):a})}function i1(t,e,n,r){t._wrappedGetters[e]||(t._wrappedGetters[e]=function(o){return n(r.state,r.getters,o.state,o.getters)})}function a1(t){Vn(function(){return t._state.data},function(){},{deep:!0,flush:"sync"})}function $_(t,e){return e.reduce(function(n,r){return n[r]},t)}function ai(t,e,n){return e1(t)&&t.type&&(n=e,e=t,t=t.type),{type:t,payload:e,options:n}}var l1="vuex bindings",Um="vuex:mutations",Da="vuex:actions",Or="vuex",c1=0;function d1(t,e){XR({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https:/ / next . vuex . vuejs . org / ",logo:" https : //vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:[l1]},function(n){n.addTimelineLayer({id:Um,label:"Vuex Mutations",color:Bm}),n.addTimelineLayer({id:Da,label:"Vuex Actions",color:Bm}),n.addInspector({id:Or,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),n.on.getInspectorTree(function(r){if(r.app===t&&r.inspectorId===Or)if(r.filter){var s=[];Iy(s,e._modules.root,r.filter,""),r.rootNodes=s}else r.rootNodes=[wy(e._modules.root,"")]}),n.on.getInspectorState(function(r){if(r.app===t&&r.inspectorId===Or){var s=r.nodeId;Oy(e,s),r.state=p1(g1(e._modules,s),s==="root"?e.getters:e._makeLocalGettersCache,s)}}),n.on.editInspectorState(function(r){if(r.app===t&&r.inspectorId===Or){var s=r.nodeId,o=r.path;s!=="root"&&(o=s.split("/").filter(Boolean).concat(o)),e._withCommit(function(){r.set(e._st
` ).forEach(function(i){s=i.indexOf(":"),n=i.substring(0,s).trim().toLowerCase(),r=i.substring(s+1).trim(),!(!n||e[n]&&ux[n])&&(n==="set-cookie"?e[n]?e[n].push(r):e[n]=[r]:e[n]=e[n]?e[n]+", "+r:r)}),e},Hm=Symbol("internals");function bs(t){return t&&String(t).trim().toLowerCase()}function Wo(t){return t===!1||t==null?t:de.isArray(t)?t.map(Wo):String(t)}function px(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 mx=t=>/^[-_a-zA-Z0-9^ ` | ~ , ! # $ % & ' * + . ] + $ / . test ( t . trim ( ) ) ; function Ma ( t , e , n , r , s ) { if ( de . isFunction ( r ) ) return r . call ( this , e , n ) ; if ( s && ( e = n ) , ! ! de . isString ( e ) ) { if ( de . isString ( r ) ) return e . indexOf ( r ) !== - 1 ; if ( de . isRegExp ( r ) ) return r . test ( e ) } } function gx ( t ) { return t . trim ( ) . toLowerCase ( ) . replace ( /([a-z\d])(\w*)/g , ( e , n , r ) => n . toUpperCase ( ) + r ) } function fx ( t , e ) { const n = de . toCamelCase ( " " + e ) ; [ "get" , "set" , "has" ] . forEach ( r => { Object . defineProperty ( t , r + n , { value : function ( s , o , i ) { return this [ r ] . call ( this , e , s , o , i ) } , configurable : ! 0 } ) } ) } class qi { constructor ( e ) { e && this . set ( e ) } set ( e , n , r ) { const s = this ; function o ( a , l , u ) { const c = bs ( l ) ; if ( ! c ) throw new Error ( "header name must be a non-empty string" ) ; const _ = de . findKey ( s , c ) ; ( ! _ || s [ _ ] === void 0 || u === ! 0 || u === void 0 && s [ _ ] !== ! 1 ) && ( s [ _ || l ] = Wo ( a ) ) } const i = ( a , l ) => de . forEach ( a , ( u , c ) => o ( u , c , l ) ) ; return de . isPlainObject ( e ) || e instanceof this . constructor ? i ( e , n ) : de . isString ( e ) && ( e = e . trim ( ) ) && ! mx ( e ) ? i ( _x ( e ) , n ) : e != null && o ( n , e , r ) , this } get ( e , n ) { if ( e = bs ( e ) , e ) { const r = de . findKey ( this , e ) ; if ( r ) { const s = this [ r ] ; if ( ! n ) return s ; if ( n === ! 0 ) return px ( s ) ; if ( de . isFunction ( n ) ) return n . call ( this , s , r ) ; if ( de . isRegExp ( n ) ) return n . exec ( s ) ; throw new TypeError ( "parser must be boolean|regexp|function" ) } } } has ( e , n ) { if ( e = bs ( e ) , e ) { const r = de . findKey ( this , e ) ; return ! ! ( r && this [ r ] !== void 0 && ( ! n || Ma ( this , this [ r ] , r , n ) ) ) } return ! 1 } delete ( e , n ) { const r = this ; let s = ! 1 ; function o ( i ) { if ( i = bs ( i ) , i ) { const a = de . findKey ( r , i ) ; a && ( ! n || Ma ( r , r [ a ] , a , n ) ) && ( delete r [ a ] , s = ! 0 ) } } return de . isArray ( e ) ? e . forEach ( o ) : o ( e ) , s } clear ( e ) { const n = Object . keys ( this ) ; let r = n . length , s = ! 1 ; for ( ; r -- ; ) { const o = n [ r ] ; ( ! e || Ma ( this , this [ o ] , o , e , ! 0 ) ) && ( delete this [ o ] , s = ! 0 ) } return s } normalize ( e ) { const n = this , r = { } ; return de . forEach ( this , ( s , o ) => { const i = de . findKey ( r , o ) ; if ( i ) { n [ i ] = Wo ( s ) , delete n [ o ] ; return } const a = e ? gx ( o ) : String ( o ) . trim ( ) ; a !== o && delete n [ o ] , n [ a ] = Wo ( s ) , r [ a ] = ! 0 } ) , this } concat ( ... e ) { return this . constructor . concat ( this , ... e ) } toJSON ( e ) { const n = Object . create ( null ) ; return de . forEach ( this , ( r , s ) => { r != null && r !== ! 1 && ( n [ s ] = e && de . 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(s=>r.set(s)),r}static accessor(e){const r=(this[Hm]=this[Hm]={accessors:{}}).accessors,s=this.prototype;function o(i){const a=bs(i);r[a]||(fx(s,i),r[a]=!0)}return de.isArray(e)?e.forEach(o):o(e),this}}qi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);de.reduceDescriptors(qi.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(r){this[n]=r}}});de.freezeMethods(qi);const fn=qi;function La(t,e){const n=this||Z_,r=e||n,s=fn.from(r.headers);let o=r.data;return de.forEach(t,function(a){o=a.call(n,o,s.normalize(),e?e.status:void 0)}),s.normalize(),o}function Qy(t){return!!(t&&t.__CANCEL__)}function ro(t,e,n){Ve.call(this,t??"canceled",Ve.ERR_CANCELED,e,n),this.name="CanceledError"}de.inherits(ro,Ve,{__CANCEL__:!0});function hx(t,e,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?t(n):e(new Ve("Request failed with status code "+n.status,[Ve.ERR_BAD_REQUEST,Ve.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const Ex=Qt.isStandardBrowserEnv?function(){return{write:function(n,r,s,o,i,a){const l=[];l.push(n+"="+encodeURIComponent(r)),de.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),de.isString(o)&&l.push("path="+o),de.isString(i)&&l.push("domain="+i),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 bx(t){return/^([a-z][a-z \d + \- .]*:)? \/ \/ /i.test(t)}function Sx(t,e){return e?t.replace(/ \/ + $ /,"")+"/"+e.replace(/^ \/ +/,""):t}function jy(t,e){return t&&!bx(e)?Sx(t,e):e}const yx=Qt.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(o){let i=o;return e&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{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=s(window.location.href),function(i){const a=de.isString(i)?s(i):i;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function vx(t){const e=/^([-+ \w ]{1,25})(:? \/ \/ |:)/.exec(t);return e&&e[1]||""}function Tx(t,e){t=t||10;const n=new Array(t),r=new Array(t);let s=0,o=0,i;return e=e!==void 0?e:1e3,function(l){const u=Date.now(),c=r[o];i||(i=u),n[s]=l,r[s]=u;let _=o,p=0;for(;_!==s;)p+=n[_++],_=_%t;if(s=(s+1)%t,s===o&&(o=(o+1)%t),u-i<e)return;const g=c&&u-c;return g?Math.round(p*1e3/g):void 0}}function $ m(t,e){let n=0;const r=Tx(50,250);return s=>{const o=s.loaded,i=s.lengthComputable?s.total:void 0,a=o-n,l=r(a),u=o<=i;n=o;const c={loaded:o,total:i,progress:i?o/i:void 0,bytes:a,rate:l||void 0,estimated:l&&i&&u?(i-o)/l:void 0,event:s};c[e?"download":"upload"]=!0,t(c)}}const Cx=typeof XMLHttpRequest<"u",Rx=Cx&&function(t){return new Promise(function(n,r){let s=t.data;const o=fn.from(t.headers).normalize(),i=t.responseType;let a;function l(){t.cancelToken&&t.cancelToken.unsubscribe(a),t.signal&&t.signal.removeEventListener("abort",a)}let u;de.isFormData(s)&&(Qt.isStandardBrowserEnv||Qt.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.getContentType(/^ \s *multipart \/ form-data/)?de.isString(u=o.getContentType())&&o.setContentType(u.replace(/^ \s *(multipart \/ form-data);+/," $ 1")):o.setContentType("multipart/form-data"));let c=new XMLHttpRequest;if(t.auth){const f=t.auth.username||"",h=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";o.set("Authorization","Basic "+btoa(f+":"+h))}const _=jy(t.baseURL,t.url);c.open(t.method.toUpperCase(), $ y(_,t.params,t.paramsSerializer),!0),c
` +o.map(Wm).join( `
2023-10-24 21:07:04 +00:00
` ):" "+Wm(o[0]):"as no adapter specified";throw new Ve("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return r},adapters:Xu};function Pa(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ro(null,t)}function Km(t){return Pa(t),t.headers=fn.from(t.headers),t.data=La.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Zy.getAdapter(t.adapter||Z_.adapter)(t).then(function(r){return Pa(t),r.data=La.call(t,t.transformResponse,r),r.headers=fn.from(r.headers),r},function(r){return Qy(r)||(Pa(t),r&&r.response&&(r.response.data=La.call(t,t.transformResponse,r.response),r.response.headers=fn.from(r.response.headers))),Promise.reject(r)})}const Qm=t=>t instanceof fn?t.toJSON():t;function Kr(t,e){e=e||{};const n={};function r(u,c,_){return de.isPlainObject(u)&&de.isPlainObject(c)?de.merge.call({caseless:_},u,c):de.isPlainObject(c)?de.merge({},c):de.isArray(c)?c.slice():c}function s(u,c,_){if(de.isUndefined(c)){if(!de.isUndefined(u))return r(void 0,u,_)}else return r(u,c,_)}function o(u,c){if(!de.isUndefined(c))return r(void 0,c)}function i(u,c){if(de.isUndefined(c)){if(!de.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function a(u,c,_){if(_ in e)return r(u,c);if(_ in t)return r(void 0,u)}const l={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:a,headers:(u,c)=>s(Qm(u),Qm(c),!0)};return de.forEach(Object.keys(Object.assign({},t,e)),function(c){const _=l[c]||s,p=_(t[c],e[c],c);de.isUndefined(p)&&_!==a||(n[c]=p)}),n}const Xy="1.5.1",X_={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{X_[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}});const jm={};X_.transitional=function(e,n,r){function s(o,i){return"[Axios v"+Xy+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,a)=>{if(e===!1)throw new Ve(s(i," has been removed"+(n?" in "+n:"")),Ve.ERR_DEPRECATED);return n&&!jm[i]&&(jm[i]=!0,console.warn(s(i," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(o,i,a):!0}};function Ox(t,e,n){if(typeof t!="object")throw new Ve("options must be an object",Ve.ERR_BAD_OPTION_VALUE);const r=Object.keys(t);let s=r.length;for(;s-- >0;){const o=r[s],i=e[o];if(i){const a=t[o],l=a===void 0||i(a,o,t);if(l!==!0)throw new Ve("option "+o+" must be "+l,Ve.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ve("Unknown option "+o,Ve.ERR_BAD_OPTION)}}const Ju={assertOptions:Ox,validators:X_},Nn=Ju.validators;class li{constructor(e){this.defaults=e,this.interceptors={request:new zm,response:new zm}}request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Kr(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:o}=n;r!==void 0&&Ju.assertOptions(r,{silentJSONParsing:Nn.transitional(Nn.boolean),forcedJSONParsing:Nn.transitional(Nn.boolean),clarifyTimeoutError:Nn.transitional(Nn.boolean)},!1),s!=null&&(de.isFunction(s)?n.paramsSerializer={serialize:s}:Ju.assertOptions(s,{encode:Nn.function,serialize:Nn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i=o&&de.merge(o.common,o[n.method]);o&&de.forEach(["delete","get","head","post","put","patch","common"],f=>{delete o[f]}),n.headers=fn.concat(i,o);const a=[];let l=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(l=l&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const u=[];this.interceptors.response.forEach(function(h){u.push(h.fulfilled,h.rejected)});let c,_=0,p;if(!l){const f=[Km.bind(this),void 0];for(f.unshift.apply(f,a),f.push.apply(f,u),p=f.length,c=Promise.resolve(n);_<p;)c=c.then(f[_++],f[_++]);return c}p=a.length;let g=n;for(_=0;_<p;
2023-10-23 23:40:39 +00:00
* vue - router v4 . 2.5
* ( c ) 2023 Eduardo San Martin Morote
* @ license MIT
* /const Ir=typeof window<"u";function Dx(t){return t.__esModule||t[Symbol.toStringTag]==="Module"}const Ke=Object.assign;function Fa(t,e){const n={};for(const r in e){const s=e[r];n[r]=Gt(s)?s.map(t):t(s)}return n}const Is=()=>{},Gt=Array.isArray,kx=/ \ / $ / , Mx = t => t . replace ( kx , "" ) ; function Ua ( t , e , n = "/" ) { let r , s = { } , o = "" , i = "" ; const a = e . indexOf ( "#" ) ; let l = e . indexOf ( "?" ) ; return a < l && a >= 0 && ( l = - 1 ) , l > - 1 && ( r = e . slice ( 0 , l ) , o = e . slice ( l + 1 , a > - 1 ? a : e . length ) , s = t ( o ) ) , a > - 1 && ( r = r || e . slice ( 0 , a ) , i = e . slice ( a , e . length ) ) , r = Ux ( r ? ? e , n ) , { fullPath : r + ( o && "?" ) + o + i , path : r , query : s , hash : i } } function Lx ( t , e ) { const n = e . query ? t ( e . query ) : "" ; return e . path + ( n && "?" ) + n + ( e . hash || "" ) } function Zm ( t , e ) { return ! e || ! t . toLowerCase ( ) . startsWith ( e . toLowerCase ( ) ) ? t : t . slice ( e . length ) || "/" } function Px ( t , e , n ) { const r = e . matched . length - 1 , s = n . matched . length - 1 ; return r > - 1 && r === s && Qr ( e . matched [ r ] , n . matched [ s ] ) && ev ( e . params , n . params ) && t ( e . query ) === t ( n . query ) && e . hash === n . hash } function Qr ( t , e ) { return ( t . aliasOf || t ) === ( e . aliasOf || e ) } function ev ( t , e ) { if ( Object . keys ( t ) . length !== Object . keys ( e ) . length ) return ! 1 ; for ( const n in t ) if ( ! Fx ( t [ n ] , e [ n ] ) ) return ! 1 ; return ! 0 } function Fx ( t , e ) { return Gt ( t ) ? Xm ( t , e ) : Gt ( e ) ? Xm ( e , t ) : t === e } function Xm ( t , e ) { return Gt ( e ) ? t . length === e . length && t . every ( ( n , r ) => n === e [ r ] ) : t . length === 1 && t [ 0 ] === e } function Ux ( t , e ) { if ( t . startsWith ( "/" ) ) return t ; if ( ! t ) return e ; const n = e . split ( "/" ) , r = t . split ( "/" ) , s = r [ r . length - 1 ] ; ( s === ".." || s === "." ) && r . push ( "" ) ; let o = n . length - 1 , i , a ; for ( i = 0 ; i < r . length ; i ++ ) if ( a = r [ i ] , a !== "." ) if ( a === ".." ) o > 1 && o -- ; else break ; return n . slice ( 0 , o ) . join ( "/" ) + "/" + r . slice ( i - ( i === r . length ? 1 : 0 ) ) . join ( "/" ) } var Ws ; ( function ( t ) { t . pop = "pop" , t . push = "push" } ) ( Ws || ( Ws = { } ) ) ; var Ds ; ( function ( t ) { t . back = "back" , t . forward = "forward" , t . unknown = "" } ) ( Ds || ( Ds = { } ) ) ; function Bx ( t ) { if ( ! t ) if ( Ir ) { const e = document . querySelector ( "base" ) ; t = e && e . getAttribute ( "href" ) || "/" , t = t . replace ( /^\w+:\/\/[^\/]+/ , "" ) } else t = "/" ; return t [ 0 ] !== "/" && t [ 0 ] !== "#" && ( t = "/" + t ) , Mx ( t ) } const Gx = /^[^#]+#/ ; function qx ( t , e ) { return t . replace ( Gx , "#" ) + e } function Yx ( t , e ) { const n = document . documentElement . getBoundingClientRect ( ) , r = t . getBoundingClientRect ( ) ; return { behavior : e . behavior , left : r . left - n . left - ( e . left || 0 ) , top : r . top - n . top - ( e . top || 0 ) } } const Yi = ( ) => ( { left : window . pageXOffset , top : window . pageYOffset } ) ; function Vx ( t ) { let e ; if ( "el" in t ) { const n = t . el , r = typeof n == "string" && n . startsWith ( "#" ) , s = typeof n == "string" ? r ? document . getElementById ( n . slice ( 1 ) ) : document . querySelector ( n ) : n ; if ( ! s ) return ; e = Yx ( s , t ) } else e = t ; "scrollBehavior" in document . documentElement . style ? window . scrollTo ( e ) : window . scrollTo ( e . left != null ? e . left : window . pageXOffset , e . top != null ? e . top : window . pageYOffset ) } function Jm ( t , e ) { return ( history . state ? history . state . position - e : - 1 ) + t } const t _ = new Map ; function zx ( t , e ) { t _ . set ( t , e ) } function Hx ( t ) { const e = t _ . get ( t ) ; return t _ . delete ( t ) , e } let $x = ( ) => location . protocol + "//" + location . host ; function tv ( t , e ) { const { pathname : n , search : r , hash : s } = e , o = t . indexOf ( "#" ) ; if ( o > - 1 ) { let a = s . includes ( t . slice ( o ) ) ? t . slice ( o ) . length : 1 , l = s . slice ( a ) ; return l [ 0 ] !== "/" && ( l = "/" + l ) , Zm ( l , "" ) } return Zm ( n , t ) + r + s } function Wx ( t , e , n , r ) { let s = [ ] , o = [ ] , i = null ; const a = ( { state : p } ) => { const g = tv ( t , location ) , f = n . value , h = e . value ; let E = 0 ; if ( p ) { if ( n . value = g , e . value = p , i && i === f ) { i = null ; return } E = h ? p . position - h . position : 0 } else r ( g ) ; s . forEach ( b => { b ( n . value , f , { delta : E , type : Ws . pop , direction : E ? E > 0 ? Ds . forward : Ds . back : Ds . unknown } ) } ) } ; function l ( ) { i = n . value } function u ( p ) { s . push ( p ) ; const g = ( ) => { const f = s . indexOf ( p ) ; f > - 1 && s . splice ( f , 1 ) } ; return o . push ( g ) , g } function c ( ) { const { history : p } = window ; p . state && p . replaceState ( Ke ( { } , p . state , { scroll : Yi ( ) } ) , "" ) } function _ ( ) { for ( const p of o ) p ( ) ; o = [ ] , window . removeEventListener ( "popstate" , a ) , window . removeEventListener ( "beforeunload" , c ) } return window . addEventListener ( "popstate" , a ) , window . addEventListener ( "beforeunload" , c , { passive : ! 0 } ) , { pauseListeners : l , listen : u , destroy : _ } } function eg ( t , e , n , r = ! 1 , s = ! 1 ) { return { back : t , current : e , forward : n , replaced : r , position : window . history . length , scroll : s ? Yi ( ) : null } } function Kx ( t ) { const { history : e , location : n } = window , r = { value : tv ( t , n ) } , s = { value : e . state } ; s . value || o ( r . value , { back : null , current : r . value , forward : null , position : e . length - 1 , replace
Copyright ( c ) 2016 Jed Watson .
Licensed under the MIT License ( MIT ) , see
http : //jedwatson.github.io/classnames
2023-10-24 21:07:04 +00:00
* /(function(){var a=function(){function l(){}l.prototype=Object.create(null);function u(b,m){for(var S=m.length,C=0;C<S;++C)h(b,m[C])}var c={}.hasOwnProperty;function _(b,m){b[m]=!0}function p(b,m){for(var S in m)c.call(m,S)&&(b[S]=!!m[S])}var g=/ \ s + / ; f u n c t i o n f ( b , m ) { f o r ( v a r S = m . s p l i t ( g ) , C = S . l e n g t h , A = 0 ; A < C ; + + A ) b [ S [ A ] ] = ! 0 } f u n c t i o n h ( b , m ) { i f ( m ) { v a r S = t y p e o f m ; S = = = " s t r i n g " ? f ( b , m ) : A r r a y . i s A r r a y ( m ) ? u ( b , m ) : S = = = " o b j e c t " ? p ( b , m ) : S = = = " n u m b e r " & & _ ( b , m ) } } f u n c t i o n E ( ) { f o r ( v a r b = a r g u m e n t s . l e n g t h , m = A r r a y ( b ) , S = 0 ; S < b ; S + + ) m [ S ] = a r g u m e n t s [ S ] ; v a r C = n e w l ; u ( C , m ) ; v a r A = [ ] ; f o r ( v a r x i n C ) C [ x ] & & A . p u s h ( x ) ; r e t u r n A . j o i n ( " " ) } r e t u r n E } ( ) ; t y p e o f n < " u " & & n . e x p o r t s ? n . e x p o r t s = a : ( o = [ ] , i = ( f u n c t i o n ( ) { r e t u r n a } ) . a p p l y ( r , o ) , i ! = = v o i d 0 & & ( n . e x p o r t s = i ) ) } ) ( ) } , " . / n o d e _ m o d u l e s / c o r e - j s / e s / a r r a y / f r o m . j s " : f u n c t i o n ( n , r , s ) { s ( " . / n o d e _ m o d u l e s / c o r e - j s / m o d u l e s / e s . s t r i n g . i t e r a t o r . j s " ) , s ( " . / n o d e _ m o d u l e s / c o r e - j s / m o d u l e s / e s . a r r a y . f r o m . j s " ) ; v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / p a t h . j s " ) ; n . e x p o r t s = o . A r r a y . f r o m } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a - f u n c t i o n . j s " : f u n c t i o n ( n , r ) { n . e x p o r t s = f u n c t i o n ( s ) { i f ( t y p e o f s ! = " f u n c t i o n " ) t h r o w T y p e E r r o r ( S t r i n g ( s ) + " i s n o t a f u n c t i o n " ) ; r e t u r n s } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a n - o b j e c t . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / i s - o b j e c t . j s " ) ; n . e x p o r t s = f u n c t i o n ( i ) { i f ( ! o ( i ) ) t h r o w T y p e E r r o r ( S t r i n g ( i ) + " i s n o t a n o b j e c t " ) ; r e t u r n i } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a r r a y - f r o m . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / b i n d - c o n t e x t . j s " ) , i = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - o b j e c t . j s " ) , a = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c a l l - w i t h - s a f e - i t e r a t i o n - c l o s i n g . j s " ) , l = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / i s - a r r a y - i t e r a t o r - m e t h o d . j s " ) , u = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - l e n g t h . j s " ) , c = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c r e a t e - p r o p e r t y . j s " ) , _ = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / g e t - i t e r a t o r - m e t h o d . j s " ) ; n . e x p o r t s = f u n c t i o n ( g ) { v a r f = i ( g ) , h = t y p e o f t h i s = = " f u n c t i o n " ? t h i s : A r r a y , E = a r g u m e n t s . l e n g t h , b = E > 1 ? a r g u m e n t s [ 1 ] : v o i d 0 , m = b ! = = v o i d 0 , S = 0 , C = _ ( f ) , A , x , k , y ; i f ( m & & ( b = o ( b , E > 2 ? a r g u m e n t s [ 2 ] : v o i d 0 , 2 ) ) , C ! = n u l l & & ! ( h = = A r r a y & & l ( C ) ) ) f o r ( y = C . c a l l ( f ) , x = n e w h ; ! ( k = y . n e x t ( ) ) . d o n e ; S + + ) c ( x , S , m ? a ( y , b , [ k . v a l u e , S ] , ! 0 ) : k . v a l u e ) ; e l s e f o r ( A = u ( f . l e n g t h ) , x = n e w h ( A ) ; A > S ; S + + ) c ( x , S , m ? b ( f [ S ] , S ) : f [ S ] ) ; r e t u r n x . l e n g t h = S , x } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a r r a y - i n c l u d e s . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - i n d e x e d - o b j e c t . j s " ) , i = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - l e n g t h . j s " ) , a = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / t o - a b s o l u t e - i n d e x . j s " ) ; n . e x p o r t s = f u n c t i o n ( l ) { r e t u r n f u n c t i o n ( u , c , _ ) { v a r p = o ( u ) , g = i ( p . l e n g t h ) , f = a ( _ , g ) , h ; i f ( l & & c ! = c ) { f o r ( ; g > f ; ) i f ( h = p [ f + + ] , h ! = h ) r e t u r n ! 0 } e l s e f o r ( ; g > f ; f + + ) i f ( ( l | | f i n p ) & & p [ f ] = = = c ) r e t u r n l | | f | | 0 ; r e t u r n ! l & & - 1 } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / b i n d - c o n t e x t . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a - f u n c t i o n . j s " ) ; n . e x p o r t s = f u n c t i o n ( i , a , l ) { i f ( o ( i ) , a = = = v o i d 0 ) r e t u r n i ; s w i t c h ( l ) { c a s e 0 : r e t u r n f u n c t i o n ( ) { r e t u r n i . c a l l ( a ) } ; c a s e 1 : r e t u r n f u n c t i o n ( u ) { r e t u r n i . c a l l ( a , u ) } ; c a s e 2 : r e t u r n f u n c t i o n ( u , c ) { r e t u r n i . c a l l ( a , u , c ) } ; c a s e 3 : r e t u r n f u n c t i o n ( u , c , _ ) { r e t u r n i . c a l l ( a , u , c , _ ) } } r e t u r n f u n c t i o n ( ) { r e t u r n i . a p p l y ( a , a r g u m e n t s ) } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c a l l - w i t h - s a f e - i t e r a t i o n - c l o s i n g . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / a n - o b j e c t . j s " ) ; n . e x p o r t s = f u n c t i o n ( i , a , l , u ) { t r y { r e t u r n u ? a ( o ( l ) [ 0 ] , l [ 1 ] ) : a ( l ) } c a t c h ( _ ) { v a r c = i . r e t u r n ; t h r o w c ! = = v o i d 0 & & o ( c . c a l l ( i ) ) , _ } } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c h e c k - c o r r e c t n e s s - o f - i t e r a t i o n . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / w e l l - k n o w n - s y m b o l . j s " ) , i = o ( " i t e r a t o r " ) , a = ! 1 ; t r y { v a r l = 0 , u = { n e x t : f u n c t i o n ( ) { r e t u r n { d o n e : ! ! l + + } } , r e t u r n : f u n c t i o n ( ) { a = ! 0 } } ; u [ i ] = f u n c t i o n ( ) { r e t u r n t h i s } , A r r a y . f r o m ( u , f u n c t i o n ( ) { t h r o w 2 } ) } c a t c h { } n . e x p o r t s = f u n c t i o n ( c , _ ) { i f ( ! _ & & ! a ) r e t u r n ! 1 ; v a r p = ! 1 ; t r y { v a r g = { } ; g [ i ] = f u n c t i o n ( ) { r e t u r n { n e x t : f u n c t i o n ( ) { r e t u r n { d o n e : p = ! 0 } } } } , c ( g ) } c a t c h { } r e t u r n p } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f - r a w . j s " : f u n c t i o n ( n , r ) { v a r s = { } . t o S t r i n g ; n . e x p o r t s = f u n c t i o n ( o ) { r e t u r n s . c a l l ( o ) . s l i c e ( 8 , - 1 ) } } , " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f . j s " : f u n c t i o n ( n , r , s ) { v a r o = s ( " . / n o d e _ m o d u l e s / c o r e - j s / i n t e r n a l s / c l a s s o f
2023-10-27 23:36:53 +00:00
h - 87.51 l - 313.51 , 338.7 l - 253.31 - 338.7 H283 . 94 z M412 . 63 , 231.77 h136 . 81 l604 . 13 , 807.76 h - 136.81 L412 . 63 , 231.77 z ` })],-1),tA=[eA],nA=d("i",{"data-feather":"sun"},null,-1),rA=[nA],sA=d("i",{"data-feather":"moon"},null,-1),oA=[sA],iA=d("body",null,null,-1),aA={name:"TopBar",computed:{isConnected(){return this. $ store.state.isConnected}},data(){return{codeBlockStylesheet:"",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(),ve(()=>{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"),ve(()=>{Ga(()=>Promise.resolve({}),["assets/stackoverflow-dark-57af98f5.css"])});return}ve(()=>{Ga(()=>Promise.resolve({}),["assets/stackoverflow-light-077a2b3c.css"])}),this.sunIcon.classList.add("display-none")},themeSwitch(){if(document.documentElement.classList.contains("dark")){document.documentElement.classList.remove("dark"),localStorage.setItem("theme","light"),this.userTheme=="light",this.iconToggle();return}Ga(()=>Promise.resolve({}),["assets/tokyo-night-dark-f9656fc4.css"]),document.documentElement.classList.add("dark"),localStorage.setItem("theme","dark"),this.userTheme=="dark",this.iconToggle()},iconToggle(){this.sunIcon.classList.toggle("display-none"),this.moonIcon.classList.toggle("display-none")}},components:{Navigation:mv}},lA=Object.assign(aA,{setup(t){return(e,n)=>(v(),T(Ne,null,[d("header",GO,[d("nav",qO,[he(lt(_n),{to:{name:"discussions"}},{default:ke(()=>[YO]),_:1}),d("div",VO,[e.isConnected?(v(),T("div",zO, $ O)):U("",!0),e.isConnected?U("",!0):(v(),T("div",WO,QO)),jO,d("a",ZO,[d("div",XO,[(v(),T("svg",JO,tA))])]),d("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())},rA),d("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())},oA)])]),he(mv)]),iA],64))}}),cA={class:"flex flex-col h-screen font-sans bg-bg-light text-slate-950 dark:bg-bg-dark dark:text-slate-50 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},dA={class:"flex overflow-hidden flex-grow"},uA={__name:"App",setup(t){return(e,n)=>(v(),T("div",cA,[he(lA),d("div",dA,[he(lt(uv),null,{default:ke(({Component:r})=>[(v(),nt(T0,null,[(v(),nt(k0(r)))],1024))]),_:1})])]))}},nn=Object.create(null);nn.open="0";nn.close="1";nn.ping="2";nn.pong="3";nn.message="4";nn.upgrade="5";nn.noop="6";const Qo=Object.create(null);Object.keys(nn).forEach(t=>{Qo[nn[t]]=t});const s_={type:"error",data:"parser error"},gv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",fv=typeof ArrayBuffer=="function",hv=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,np=({type:t,data:e},n,r)=>gv&&e instanceof Blob?n?r(e):mg(e,r):fv&&(e instanceof ArrayBuffer||hv(e))?n?r(e):mg(new Blob([e]),r):r(nn[t]+(e||"")),mg=(t,e)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];e("b"+(r||""))},n.readAsDataURL(t)};function gg(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.
2023-10-23 23:40:39 +00:00
` ,J7="∄",eY="∄",tY="𝔑 ",nY="𝔫 ",rY="≧̸",sY="≱",oY="≱",iY="≧̸",aY="⩾̸",lY="⩾̸",cY="⋙̸",dY="≵",uY="≫⃒",_Y="≯",pY="≯",mY="≫̸",gY="↮",fY="⇎",hY="⫲",EY="∋",bY="⋼",SY="⋺",yY="∋",vY="Њ",TY="њ",CY="↚",RY="⇍",xY="‥",OY="≦̸",AY="≰",NY="↚",wY="⇍",IY="↮",DY="⇎",kY="≰",MY="≦̸",LY="⩽̸",PY="⩽̸",FY="≮",UY="⋘̸",BY="≴",GY="≪⃒",qY="≮",YY="⋪",VY="⋬",zY="≪̸",HY="∤", $ Y=" ",WY=" ",KY="𝕟 ",QY="ℕ ",jY="⫬",ZY="¬",XY="≢",JY="≭",eV="∦",tV="∉",nV="≠",rV="≂̸",sV="∄",oV="≯",iV="≱",aV="≧̸",lV="≫̸",cV="≹",dV="⩾̸",uV="≵",_V="≎̸",pV="≏̸",mV="∉",gV="⋵̸",fV="⋹̸",hV="∉",EV="⋷",bV="⋶",SV="⧏̸",yV="⋪",vV="⋬",TV="≮",CV="≰",RV="≸",xV="≪̸",OV="⩽̸",AV="≴",NV="⪢̸",wV="⪡̸",IV="∌",DV="∌",kV="⋾",MV="⋽",LV="⊀",PV="⪯̸",FV="⋠",UV="∌",BV="⧐̸",GV="⋫",qV="⋭",YV="⊏̸",VV="⋢",zV="⊐̸",HV="⋣", $ V="⊂⃒",WV="⊈",KV="⊁",QV="⪰̸",jV="⋡",ZV="≿̸",XV="⊃⃒",JV="⊉",ez="≁",tz="≄",nz="≇",rz="≉",sz="∤",oz="∦",iz="∦",az="⫽⃥",lz="∂̸",cz="⨔",dz="⊀",uz="⋠",_z="⊀",pz="⪯̸",mz="⪯̸",gz="⤳̸",fz="↛",hz="⇏",Ez="↝̸",bz="↛",Sz="⇏",yz="⋫",vz="⋭",Tz="⊁",Cz="⋡",Rz="⪰̸",xz="𝒩 ",Oz="𝓃 ",Az="∤",Nz="∦",wz="≁",Iz="≄",Dz="≄",kz="∤",Mz="∦",Lz="⋢",Pz="⋣",Fz="⊄",Uz="⫅̸",Bz="⊈",Gz="⊂⃒",qz="⊈",Yz="⫅̸",Vz="⊁",zz="⪰̸",Hz="⊅", $ z="⫆̸",Wz="⊉",Kz="⊃⃒",Qz="⊉",jz="⫆̸",Zz="≹",Xz="Ñ",Jz="ñ",eH="≸",tH="⋪",nH="⋬",rH="⋫",sH="⋭",oH="Ν ",iH="ν ",aH="#",lH="№",cH=" ",dH="≍⃒",uH="⊬",_H="⊭",pH="⊮",mH="⊯",gH="≥⃒",fH=">⃒",hH="⤄",EH="⧞",bH="⤂",SH="≤⃒",yH="<⃒",vH="⊴⃒",TH="⤃",CH="⊵⃒",RH="∼⃒",xH="⤣",OH="↖",AH="⇖",NH="↖",wH="⤧",IH="Ó",DH="ó",kH="⊛",MH="Ô",LH="ô",PH="⊚",FH="О ",UH="о ",BH="⊝",GH="Ő",qH="ő",YH="⨸",VH="⊙",zH="⦼",HH="Œ", $ H="œ",WH="⦿",KH="𝔒 ",QH="𝔬 ",jH="˛ ",ZH="Ò",XH="ò",JH="⧁",e $ ="⦵",t $ ="Ω",n $ ="∮",r $ ="↺",s $ ="⦾",o $ ="⦻",i $ ="‾",a $ ="⧀",l $ ="Ō",c $ ="ō",d $ ="Ω",u $ ="ω",_ $ ="Ο ",p $ ="ο ",m $ ="⦶",g $ ="⊖",f $ ="𝕆 ",h $ ="𝕠 ",E $ ="⦷",b $ ="“",S $ ="‘ ",y $ ="⦹",v $ ="⊕",T $ ="↻",C $ ="⩔",R $ ="∨ ",x $ ="⩝",O $ ="ℴ ",A $ ="ℴ ",N $ ="ª",w $ ="º",I $ ="⊶",D $ ="⩖",k $ ="⩗",M $ ="⩛",L $ ="Ⓢ",P $ ="𝒪 ",F $ ="ℴ ",U $ ="Ø",B $ ="ø",G $ ="⊘",q $ ="Õ",Y $ ="õ",V $ ="⨶",z $ ="⨷",H $ ="⊗", $ $ ="Ö",W $ ="ö",K $ ="⌽",Q $ ="‾",j $ ="⏞",Z $ ="⎴",X $ ="⏜",J $ ="¶",eW="∥",tW="∥",nW="⫳",rW="⫽",sW="∂",oW="∂",iW="П",aW="п",lW="%",cW=".",dW="‰",uW="⊥",_W="‱",pW="𝔓 ",mW="𝔭 ",gW="Φ",fW="φ",hW="ϕ",EW="ℳ ",bW="☎",SW="Π",yW="π",vW="⋔",TW="ϖ",CW="ℏ",RW="ℎ ",xW="ℏ",OW="⨣",AW="⊞",NW="⨢",wW="+",IW="∔",DW="⨥",kW="⩲",MW="±",LW="±",PW="⨦",FW="⨧",UW="±",BW="ℌ ",GW="⨕",qW="𝕡 ",YW="ℙ ",VW="£",zW="⪷",HW="⪻", $ W="≺",WW="≼",KW="⪷",QW="≺",jW="≼",ZW="≺",XW="⪯",JW="≼",eK="≾",tK="⪯",nK="⪹",rK="⪵",sK="⋨",oK="⪯",iK="⪳",aK="≾",lK="′ ",cK="″",dK="ℙ ",uK="⪹",_K="⪵",pK="⋨",mK="∏",gK="∏",fK="⌮",hK="⌒",EK="⌓",bK="∝",SK="∝",yK="∷",vK="∝",TK="≾",CK="⊰",RK="𝒫 ",xK="𝓅 ",OK="Ψ",AK="ψ",NK=" ",wK="𝔔 ",IK="𝔮 ",DK="⨌",kK="𝕢 ",MK="ℚ ",LK="⁗",PK="𝒬 ",FK="𝓆 ",UK="ℍ ",BK="⨖",GK="?",qK="≟",YK='"',VK='"',zK="⇛",HK="∽̱", $ K="Ŕ",WK="ŕ",KK="√",QK="⦳",jK="⟩",ZK="⟫",XK="⦒",JK="⦥",eQ="⟩",tQ="»",nQ="⥵",rQ="⇥",sQ="⤠",oQ="⤳",iQ="→",aQ="↠",lQ="⇒",cQ="⤞",dQ="↪",uQ="↬",_Q="⥅",pQ="⥴",mQ="⤖",gQ="↣",fQ="↝",hQ="⤚",EQ="⤜",bQ="∶ ",SQ="ℚ ",yQ="⤍",vQ="⤏",TQ="⤐",CQ="❳ ",RQ="}",xQ="]",OQ="⦌",AQ="⦎",NQ="⦐",wQ="Ř",IQ="ř",DQ="Ŗ",kQ="ŗ",MQ="⌉",LQ="}",PQ="Р ",FQ="р ",UQ="⤷",BQ="⥩",GQ="”",qQ="”",YQ="↳",VQ="ℜ ",zQ="ℛ ",HQ="ℜ ", $ Q="ℝ ",WQ="ℜ ",KQ="▭",QQ="®",jQ="®",ZQ="∋",XQ="⇋",JQ="⥯",ej="⥽",tj="⌋",nj="𝔯 ",rj="ℜ ",sj="⥤",oj="⇁",ij="⇀",aj="⥬",lj="Ρ ",cj="ρ ",dj="ϱ ",uj="⟩",_j="⇥",pj="→",mj="→
` ," "],Xie=["{","}","|"," \\ ","^"," ` "].concat(Zie),Jie=[" '"].concat(Xie),xg=["%","/","?",";","#"].concat(Jie),Og=["/","?","#"],eae=255,Ag=/^[+a-z0-9A-Z_-]{0,63}$/,tae=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,Ng={javascript:!0,"javascript:":!0},wg={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function nae(t,e){if(t&&t instanceof di)return t;var n=new di;return n.parse(t,e),n}di.prototype.parse=function(t,e){var n,r,s,o,i,a=t;if(a=a.trim(),!e&&t.split("#").length===1){var l=jie.exec(a);if(l)return this.pathname=l[1],l[2]&&(this.search=l[2]),this}var u=Kie.exec(a);if(u&&(u=u[0],s=u.toLowerCase(),this.protocol=u,a=a.substr(u.length)),(e||u||a.match(/^\/\/[^@\/]+@[^@\/]+/))&&(i=a.substr(0,2)==="//",i&&!(u&&Ng[u])&&(a=a.substr(2),this.slashes=!0)),!Ng[u]&&(i||u&&!wg[u])){var c=-1;for(n=0;n<Og.length;n++)o=a.indexOf(Og[n]),o!==-1&&(c===-1||o<c)&&(c=o);var _,p;for(c===-1?p=a.lastIndexOf("@"):p=a.lastIndexOf("@",c),p!==-1&&(_=a.slice(0,p),a=a.slice(p+1),this.auth=_),c=-1,n=0;n<xg.length;n++)o=a.indexOf(xg[n]),o!==-1&&(c===-1||o<c)&&(c=o);c===-1&&(c=a.length),a[c-1]===":"&&c--;var g=a.slice(0,c);a=a.slice(c),this.parseHost(g),this.hostname=this.hostname||"";var f=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!f){var h=this.hostname.split(/\./);for(n=0,r=h.length;n<r;n++){var E=h[n];if(E&&!E.match(Ag)){for(var b="",m=0,S=E.length;m<S;m++)E.charCodeAt(m)>127?b+="x":b+=E[m];if(!b.match(Ag)){var C=h.slice(0,n),A=h.slice(n+1),x=E.match(tae);x&&(C.push(x[1]),A.unshift(x[2])),A.length&&(a=A.join(".")+a),this.hostname=C.join(".");break}}}}this.hostname.length>eae&&(this.hostname=""),f&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}var k=a.indexOf("#");k!==-1&&(this.hash=a.substr(k),a=a.slice(0,k));var y=a.indexOf("?");return y!==-1&&(this.search=a.substr(y),a=a.slice(0,y)),a&&(this.pathname=a),wg[s]&&this.hostname&&!this.pathname&&(this.pathname=""),this};di.prototype.parseHost=function(t){var e=Qie.exec(t);e&&(e=e[0],e!==":"&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)};var rae=nae;us.encode=zie;us.decode=$ie;us.format=Wie;us.parse=rae;var er={},Va,Ig;function wv(){return Ig||(Ig=1,Va=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/),Va}var za,Dg;function Iv(){return Dg||(Dg=1,za=/[\0-\x1F\x7F-\x9F]/),za}var Ha,kg;function sae(){return kg||(kg=1,Ha=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/),Ha}var $a,Mg;function Dv(){return Mg||(Mg=1,$a=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/),$a}var Lg;function oae(){return Lg||(Lg=1,er.Any=wv(),er.Cc=Iv(),er.Cf=sae(),er.P=lp,er.Z=Dv()),er}(function(t){function e(B){return Object.prototype.toString.call(B)}function n(B){return e(B)==="[object String]"}var r=Object.prototype.hasOwnProperty;function s(B,se){return r.call(B,se)}function o(B){var se=Array.prototype.slice.call(arguments,1);return se.forEach(function(H){if(H){if(typeof H!="object")throw new TypeError(H+"must be object");Object.keys(H).forEach(function(I){B[I]=H[I]})}}),B}function i(B,se,H){return[].concat(B.slice(0,se),H,B.slice(se+1))}function a(B){return!(B>=55296&&B<=57343||B>=64976&&B<=65007||(B&65535)===65535||(B&65535)===65534||B>=0&&B<=8||B===11||B>=14&&B<=31||B>=127&&B<=159||B>1114111)}function l(B){if(B>65535){B-=65536;var se=55296+(B>>10),H=56320+(B&1023);return String.fromCharCode(se,H)}return String.fromCharCode(B)}var u=/\\([!"#$%&' ( ) * + , \ - . \ / : ; <= > ? @ [ \ \ \ ] ^ _ ` {|}~])/g,c=/&([a-z#][a-z0-9]{1,31});/gi,_=new RegExp(u.source+"|"+c.source,"gi"),p=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8})) $ /i,g=Nv;function f(B,se){var H;return s(g,se)?g[se]:se.charCodeAt(0)===35&&p.test(se)&&(H=se[1].toLowerCase()==="x"?parseInt(se.slice(2),16):parseInt(se.slice(1),10),a(H))?l(H):B}function h(B){return B.indexOf(" \\ ")<0?B:B.replace(u," $ 1")}function E(B){return B.indexOf(" \\ ")
` };on.fence=function(t,e,n,r,s){var o=t[e],i=o.info?uae(o.info).trim():"",a="",l="",u,c,_,p,g;return i&&(_=i.split(/( \s +)/g),a=_[0],l=_.slice(2).join("")),n.highlight?u=n.highlight(o.content,a,l)||pr(o.content):u=pr(o.content),u.indexOf("<pre")===0?u+ `
` :i?(c=o.attrIndex("class"),p=o.attrs?o.attrs.slice():[],c<0?p.push(["class",n.langPrefix+a]):(p[c]=p[c].slice(),p[c][1]+=" "+n.langPrefix+a),g={attrs:p},"<pre><code"+s.renderAttrs(g)+">"+u+ ` < / c o d e > < / p r e >
` ):"<pre><code"+s.renderAttrs(o)+">"+u+ ` < / c o d e > < / p r e >
` };on.image=function(t,e,n,r,s){var o=t[e];return o.attrs[o.attrIndex("alt")][1]=s.renderInlineAsText(o.children,n,r),s.renderToken(t,e,n)};on.hardbreak=function(t,e,n){return n.xhtmlOut? ` < br / >
` : ` < br >
` };on.softbreak=function(t,e,n){return n.breaks?n.xhtmlOut? ` < br / >
` : ` < br >
` : `
` };on.text=function(t,e){return pr(t[e].content)};on.html_block=function(t,e){return t[e].content};on.html_inline=function(t,e){return t[e].content};function _s(){this.rules=dae({},on)}_s.prototype.renderAttrs=function(e){var n,r,s;if(!e.attrs)return"";for(s="",n=0,r=e.attrs.length;n<r;n++)s+=" "+pr(e.attrs[n][0])+'="'+pr(e.attrs[n][1])+'"';return s};_s.prototype.renderToken=function(e,n,r){var s,o="",i=!1,a=e[n];return a.hidden?"":(a.block&&a.nesting!==-1&&n&&e[n-1].hidden&&(o+= `
` ),o+=(a.nesting===-1?"</":"<")+a.tag,o+=this.renderAttrs(a),a.nesting===0&&r.xhtmlOut&&(o+=" /"),a.block&&(i=!0,a.nesting===1&&n+1<e.length&&(s=e[n+1],(s.type==="inline"||s.hidden||s.nesting===-1&&s.tag===a.tag)&&(i=!1))),o+=i? ` >
` :">",o)};_s.prototype.renderInline=function(t,e,n){for(var r,s="",o=this.rules,i=0,a=t.length;i<a;i++)r=t[i].type,typeof o[r]<"u"?s+=o[r](t,i,e,n,this):s+=this.renderToken(t,i,e);return s};_s.prototype.renderInlineAsText=function(t,e,n){for(var r="",s=0,o=t.length;s<o;s++)t[s].type==="text"?r+=t[s].content:t[s].type==="image"?r+=this.renderInlineAsText(t[s].children,e,n):t[s].type==="softbreak"&&(r+= `
` );return r};_s.prototype.render=function(t,e,n){var r,s,o,i="",a=this.rules;for(r=0,s=t.length;r<s;r++)o=t[r].type,o==="inline"?i+=this.renderInline(t[r].children,e,n):typeof a[o]<"u"?i+=a[o](t,r,e,n,this):i+=this.renderToken(t,r,e,n);return i};var _ae=_s;function Yt(){this.__rules__=[],this.__cache__=null}Yt.prototype.__find__=function(t){for(var e=0;e<this.__rules__.length;e++)if(this.__rules__[e].name===t)return e;return-1};Yt.prototype.__compile__=function(){var t=this,e=[""];t.__rules__.forEach(function(n){n.enabled&&n.alt.forEach(function(r){e.indexOf(r)<0&&e.push(r)})}),t.__cache__={},e.forEach(function(n){t.__cache__[n]=[],t.__rules__.forEach(function(r){r.enabled&&(n&&r.alt.indexOf(n)<0||t.__cache__[n].push(r.fn))})})};Yt.prototype.at=function(t,e,n){var r=this.__find__(t),s=n||{};if(r===-1)throw new Error("Parser rule not found: "+t);this.__rules__[r].fn=e,this.__rules__[r].alt=s.alt||[],this.__cache__=null};Yt.prototype.before=function(t,e,n,r){var s=this.__find__(t),o=r||{};if(s===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(s,0,{name:e,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Yt.prototype.after=function(t,e,n,r){var s=this.__find__(t),o=r||{};if(s===-1)throw new Error("Parser rule not found: "+t);this.__rules__.splice(s+1,0,{name:e,enabled:!0,fn:n,alt:o.alt||[]}),this.__cache__=null};Yt.prototype.push=function(t,e,n){var r=n||{};this.__rules__.push({name:t,enabled:!0,fn:e,alt:r.alt||[]}),this.__cache__=null};Yt.prototype.enable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var s=this.__find__(r);if(s<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!0,n.push(r)},this),this.__cache__=null,n};Yt.prototype.enableOnly=function(t,e){Array.isArray(t)||(t=[t]),this.__rules__.forEach(function(n){n.enabled=!1}),this.enable(t,e)};Yt.prototype.disable=function(t,e){Array.isArray(t)||(t=[t]);var n=[];return t.forEach(function(r){var s=this.__find__(r);if(s<0){if(e)return;throw new Error("Rules manager: invalid rule name "+r)}this.__rules__[s].enabled=!1,n.push(r)},this),this.__cache__=null,n};Yt.prototype.getRules=function(t){return this.__cache__===null&&this.__compile__(),this.__cache__[t]||[]};var cp=Yt,pae=/ \r \n ?| \n /g,mae=/ \0 /g,gae=function(e){var n;n=e.src.replace(pae, `
` ),n=n.replace(mae,"<22> "),e.src=n},fae=function(e){var n;e.inlineMode?(n=new e.Token("inline","",0),n.content=e.src,n.map=[0,1],n.children=[],e.tokens.push(n)):e.md.block.parse(e.src,e.md,e.env,e.tokens)},hae=function(e){var n=e.tokens,r,s,o;for(s=0,o=n.length;s<o;s++)r=n[s],r.type==="inline"&&e.md.inline.parse(r.content,e.md,e.env,r.children)},Eae= $ e.arrayReplaceAt;function bae(t){return/^<a[> \s ]/i.test(t)}function Sae(t){return/^< \/ a \s *>/i.test(t)}var yae=function(e){var n,r,s,o,i,a,l,u,c,_,p,g,f,h,E,b,m=e.tokens,S;if(e.md.options.linkify){for(r=0,s=m.length;r<s;r++)if(!(m[r].type!=="inline"||!e.md.linkify.pretest(m[r].content)))for(o=m[r].children,f=0,n=o.length-1;n>=0;n--){if(a=o[n],a.type==="link_close"){for(n--;o[n].level!==a.level&&o[n].type!=="link_open";)n--;continue}if(a.type==="html_inline"&&(bae(a.content)&&f>0&&f--,Sae(a.content)&&f++),!(f>0)&&a.type==="text"&&e.md.linkify.test(a.content)){for(c=a.content,S=e.md.linkify.match(c),l=[],g=a.level,p=0,S.length>0&&S[0].index===0&&n>0&&o[n-1].type==="text_special"&&(S=S.slice(1)),u=0;u<S.length;u++)h=S[u].url,E=e.md.normalizeLink(h),e.md.validateLink(E)&&(b=S[u].text,S[u].schema?S[u].schema==="mailto:"&&!/^mailto:/i.test(b)?b=e.md.normalizeLinkText("mailto:"+b).replace(/^mailto:/,""):b=e.md.normalizeLinkText(b):b=e.md.normalizeLinkText("http://"+b).replace(/^http: \/ \/ /,""),_=S[u].index,_>p&&(i=new e.Token("text","",0),i.content=c.slice(p,_),i.level=g,l.push(i)),i=new e.Token("link_open","a",1),i.attrs=[["href",E]],i.level=g++,i.markup="linkify",i.info="auto",l.push(i),i=new e.Token("text","",0),i.content=b,i.level=g,l.push(i),i=new e.Token("link_close","a",-1),i.level=--g,i.markup="linkify",i.info="auto",l.push(i),p=S[u].lastIndex);p<c.length&&(i=new e.Token("text","",0),i.content=c.slice(p),i.level=g,l.push(i)),m[r].children=o=Eae(o,n,l)}}}},kv=/ \+ -| \. \. | \? \? \? \? |!!!!|,,|--/,vae=/ \( (c|tm|r) \) /i,Tae=/ \( (c|tm|r) \) /ig,Cae={c:"©",r:"®",tm:"™"};function Rae(t,e){return Cae[e.toLowerCase()]}function xae(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&(n.content=n.content.replace(Tae,Rae)),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}function Oae(t){var e,n,r=0;for(e=t.length-1;e>=0;e--)n=t[e],n.type==="text"&&!r&&kv.test(n.content)&&(n.content=n.content.replace(/ \+ -/g,"±").replace(/ \. {2,}/g,"…").replace(/([?!])…/g," $ 1..").replace(/([?!]){4,}/g," $ 1 $ 1 $ 1").replace(/,{2,}/g,",").replace(/(^|[^-])---(?=[^-]| $ )/mg," $ 1—").replace(/(^| \s )--(?= \s | $ )/mg," $ 1– ").replace(/(^|[^- \s ])--(?=[^- \s ]| $ )/mg," $ 1– ")),n.type==="link_open"&&n.info==="auto"&&r--,n.type==="link_close"&&n.info==="auto"&&r++}var Aae=function(e){var n;if(e.md.options.typographer)for(n=e.tokens.length-1;n>=0;n--)e.tokens[n].type==="inline"&&(vae.test(e.tokens[n].content)&&xae(e.tokens[n].children),kv.test(e.tokens[n].content)&&Oae(e.tokens[n].children))},Fg= $ e.isWhiteSpace,Ug= $ e.isPunctChar,Bg= $ e.isMdAsciiPunct,Nae=/['"]/,Gg=/['"]/g,qg="’ ";function Do(t,e,n){return t.slice(0,e)+n+t.slice(e+1)}function wae(t,e){var n,r,s,o,i,a,l,u,c,_,p,g,f,h,E,b,m,S,C,A,x;for(C=[],n=0;n<t.length;n++){for(r=t[n],l=t[n].level,m=C.length-1;m>=0&&!(C[m].level<=l);m--);if(C.length=m+1,r.type==="text"){s=r.content,i=0,a=s.length;e:for(;i<a&&(Gg.lastIndex=i,o=Gg.exec(s),!!o);){if(E=b=!0,i=o.index+1,S=o[0]==="'",c=32,o.index-1>=0)c=s.charCodeAt(o.index-1);else for(m=n-1;m>=0&&!(t[m].type==="softbreak"||t[m].type==="hardbreak");m--)if(t[m].content){c=t[m].content.charCodeAt(t[m].content.length-1);break}if(_=32,i<a)_=s.charCodeAt(i);else for(m=n+1;m<t.length&&!(t[m].type==="softbreak"||t[m].type==="hardbreak");m++)if(t[m].content){_=t[m].content.charCodeAt(0);break}if(p=Bg(c)||Ug(String.fromCharCode(c)),g=Bg(_)||Ug(String.fromCharCode(_)),f=Fg(c),h=Fg(_),h?E=!1:g&&(f||p||(E=!1)),f?b=!1:p&&(h||g||(b=!1)),_===34&&o[0]==='"'&&c>=48&&c<=57&&(b=E=!1),E&&b&&(E=p,b=g),!E&&!b){S&&(r.content=Do(r.content,o.index,qg));continue}if(b){for(m=C.length-1;m>=0&&(u=C[m],!(C[m].level<l));m--)if(u.single===S&&C[m].level===l){u=C[m],S?(A=e.md.options.quotes[2],x=e.md.options.quotes[
` ,i.map=[n,e.line],!0},Bae=function(e,n,r,s){var o,i,a,l,u,c,_,p=!1,g=e.bMarks[n]+e.tShift[n],f=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||g+3>f||(o=e.src.charCodeAt(g),o!==126&&o!==96)||(u=g,g=e.skipChars(g,o),i=g-u,i<3)||(_=e.src.slice(u,g),a=e.src.slice(g,f),o===96&&a.indexOf(String.fromCharCode(o))>=0))return!1;if(s)return!0;for(l=n;l++,!(l>=r||(g=u=e.bMarks[l]+e.tShift[l],f=e.eMarks[l],g<f&&e.sCount[l]<e.blkIndent));)if(e.src.charCodeAt(g)===o&&!(e.sCount[l]-e.blkIndent>=4)&&(g=e.skipChars(g,o),!(g-u<i)&&(g=e.skipSpaces(g),!(g<f)))){p=!0;break}return i=e.sCount[n],e.line=l+(p?1:0),c=e.push("fence","code",0),c.info=a,c.content=e.getLines(n+1,l,i,!0),c.markup=_,c.map=[n,e.line],!0},Gae= $ e.isSpace,qae=function(e,n,r,s){var o,i,a,l,u,c,_,p,g,f,h,E,b,m,S,C,A,x,k,y,R=e.lineMax,w=e.bMarks[n]+e.tShift[n],L=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||e.src.charCodeAt(w)!==62)return!1;if(s)return!0;for(f=[],h=[],m=[],S=[],x=e.md.block.ruler.getRules("blockquote"),b=e.parentType,e.parentType="blockquote",p=n;p<r&&(y=e.sCount[p]<e.blkIndent,w=e.bMarks[p]+e.tShift[p],L=e.eMarks[p],!(w>=L));p++){if(e.src.charCodeAt(w++)===62&&!y){for(l=e.sCount[p]+1,e.src.charCodeAt(w)===32?(w++,l++,o=!1,C=!0):e.src.charCodeAt(w)===9?(C=!0,(e.bsCount[p]+l)%4===3?(w++,l++,o=!1):o=!0):C=!1,g=l,f.push(e.bMarks[p]),e.bMarks[p]=w;w<L&&(i=e.src.charCodeAt(w),Gae(i));){i===9?g+=4-(g+e.bsCount[p]+(o?1:0))%4:g++;w++}c=w>=L,h.push(e.bsCount[p]),e.bsCount[p]=e.sCount[p]+1+(C?1:0),m.push(e.sCount[p]),e.sCount[p]=g-l,S.push(e.tShift[p]),e.tShift[p]=w-e.bMarks[p];continue}if(c)break;for(A=!1,a=0,u=x.length;a<u;a++)if(x[a](e,p,r,!0)){A=!0;break}if(A){e.lineMax=p,e.blkIndent!==0&&(f.push(e.bMarks[p]),h.push(e.bsCount[p]),S.push(e.tShift[p]),m.push(e.sCount[p]),e.sCount[p]-=e.blkIndent);break}f.push(e.bMarks[p]),h.push(e.bsCount[p]),S.push(e.tShift[p]),m.push(e.sCount[p]),e.sCount[p]=-1}for(E=e.blkIndent,e.blkIndent=0,k=e.push("blockquote_open","blockquote",1),k.markup=">",k.map=_=[n,0],e.md.block.tokenize(e,n,p),k=e.push("blockquote_close","blockquote",-1),k.markup=">",e.lineMax=R,e.parentType=b,_[1]=e.line,a=0;a<S.length;a++)e.bMarks[a+n]=f[a],e.tShift[a+n]=S[a],e.sCount[a+n]=m[a],e.bsCount[a+n]=h[a];return e.blkIndent=E,!0},Yae= $ e.isSpace,Vae=function(e,n,r,s){var o,i,a,l,u=e.bMarks[n]+e.tShift[n],c=e.eMarks[n];if(e.sCount[n]-e.blkIndent>=4||(o=e.src.charCodeAt(u++),o!==42&&o!==45&&o!==95))return!1;for(i=1;u<c;){if(a=e.src.charCodeAt(u++),a!==o&&!Yae(a))return!1;a===o&&i++}return i<3?!1:(s||(e.line=n+1,l=e.push("hr","hr",0),l.map=[n,e.line],l.markup=Array(i+1).join(String.fromCharCode(o))),!0)},Lv= $ e.isSpace;function Vg(t,e){var n,r,s,o;return r=t.bMarks[e]+t.tShift[e],s=t.eMarks[e],n=t.src.charCodeAt(r++),n!==42&&n!==45&&n!==43||r<s&&(o=t.src.charCodeAt(r),!Lv(o))?-1:r}function zg(t,e){var n,r=t.bMarks[e]+t.tShift[e],s=r,o=t.eMarks[e];if(s+1>=o||(n=t.src.charCodeAt(s++),n<48||n>57))return-1;for(;;){if(s>=o)return-1;if(n=t.src.charCodeAt(s++),n>=48&&n<=57){if(s-r>=10)return-1;continue}if(n===41||n===46)break;return-1}return s<o&&(n=t.src.charCodeAt(s),!Lv(n))?-1:s}function zae(t,e){var n,r,s=t.level+2;for(n=e+2,r=t.tokens.length-2;n<r;n++)t.tokens[n].level===s&&t.tokens[n].type==="paragraph_open"&&(t.tokens[n+2].hidden=!0,t.tokens[n].hidden=!0,n+=2)}var Hae=function(e,n,r,s){var o,i,a,l,u,c,_,p,g,f,h,E,b,m,S,C,A,x,k,y,R,w,L,M,Z,B,se,H=n,I=!1,Q=!0;if(e.sCount[H]-e.blkIndent>=4||e.listIndent>=0&&e.sCount[H]-e.listIndent>=4&&e.sCount[H]<e.blkIndent)return!1;if(s&&e.parentType==="paragraph"&&e.sCount[H]>=e.blkIndent&&(I=!0),(w=zg(e,H))>=0){if(_=!0,M=e.bMarks[H]+e.tShift[H],b=Number(e.src.slice(M,w-1)),I&&b!==1)return!1}else if((w=Vg(e,H))>=0)_=!1;else return!1;if(I&&e.skipSpaces(w)>=e.eMarks[H])return!1;if(s)return!0;for(E=e.src.charCodeAt(w-1),h=e.tokens.length,_?(se=e.push("ordered_list_open","ol",1),b!==1&&(se.attrs=[["start",b]])):se=e.push("bullet_list_open","ul",1),se.map=f=[H,0],se.markup=String.fromCharCode(E),L=!1,B=e.md.block.ruler.getRules("list"),A=e.parentType,e.parentType="list";H<r;){for(R=w,m=e.eMarks[H],c=S=e.sCount[H]+w-(e.bMarks[H]+e.tShift[H]);
` })),r.tokens.splice(s+3+c.length+1,0,Object.assign(new r.Token("html_block","",0),{content:e.wrapper[1]+ `
` })))});function cf(t,e,n,r){var s=t,o=r;if(n&&Object.prototype.hasOwnProperty.call(e,s))throw new Error("User defined ` id ` attribute ` "+t+" ` is not unique. Please fix it in your Markdown to continue.");for(;Object.prototype.hasOwnProperty.call(e,s);)s=t+"-"+o,o+=1;return e[s]=!0,s}function kr(t,e){e=Object.assign({},kr.defaults,e),t.core.ruler.push("anchor",function(n){for(var r,s={},o=n.tokens,i=Array.isArray(e.level)?(r=e.level,function(_){return r.includes(_)}):function(_){return function(p){return p>=_}}(e.level),a=0;a<o.length;a++){var l=o[a];if(l.type==="heading_open"&&i(Number(l.tag.substr(1)))){var u=e.getTokensText(o[a+1].children),c=l.attrGet("id");c=c==null?cf(e.slugify(u),s,!1,e.uniqueSlugStartIndex):cf(c,s,!0,e.uniqueSlugStartIndex),l.attrSet("id",c),e.tabIndex!==!1&&l.attrSet("tabindex",""+e.tabIndex),typeof e.permalink=="function"?e.permalink(c,e,n,a):(e.permalink||e.renderPermalink&&e.renderPermalink!==__)&&e.renderPermalink(c,e,n,a),a=o.indexOf(l),e.callback&&e.callback(l,{slug:c,title:u})}}})}Object.assign(lf.defaults,{style:"visually-hidden",space:!0,placement:"after",wrapper:null}),kr.permalink={__proto__:null,legacy:__,renderHref:jv,renderAttrs:Zv,makePermalink:io,linkInsideHeader:Ji,ariaHidden:tr,headerLink:Xv,linkAfterHeader:lf},kr.defaults={level:1,slugify:function(t){return encodeURIComponent(String(t).trim().toLowerCase().replace(/ \s +/g,"-"))},uniqueSlugStartIndex:1,tabIndex:"-1",getTokensText:function(t){return t.filter(function(e){return["text","code_inline"].includes(e.type)}).map(function(e){return e.content}).join("")},permalink:!1,renderPermalink:__,permalinkClass:tr.defaults.class,permalinkSpace:tr.defaults.space,permalinkSymbol:"¶",permalinkBefore:tr.defaults.placement==="before",permalinkHref:tr.defaults.renderHref,permalinkAttrs:tr.defaults.renderAttrs},kr.default=kr;Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:function(t){if(typeof t>"u"||t===null)throw new TypeError("Cannot convert first argument to object");for(var e=Object(t),n=1;n<arguments.length;n++){var r=arguments[n];if(!(typeof r>"u"||r===null))for(var s=Object.keys(Object(r)),o=0,i=s.length;o<i;o++){var a=s[o],l=Object.getOwnPropertyDescriptor(r,a);typeof l<"u"&&l.enumerable&&(e[a]=r[a])}}return e}});var Nr={},vs={},Ts={},gt={},df;function Jv(){if(df)return gt;df=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.accents=gt.fonts=gt.groupings=gt.operators=gt.identifiers=gt.numbers=void 0;var t={};gt.numbers=t;var e="[0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൦-൵๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↋①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿零一二三四五六七八九十百千万億兆京垓𥝱秭穣溝澗正載割分厘毛糸忽微繊沙塵埃꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹0-9 ]",n=new RegExp(e);Object.defineProperties(t,{digitRange:{value:e},digitRE:{value:n},isdigit:{value:function(_){return _.match(n)}}});var r=["sin","cos","tan","csc","sec","cot","sinh","cosh","tanh","log","ln","det","dim","lim","mod","gcd","lcm","min","max"],s={Gamma:"Γ",Delta:"Δ",Theta:"Θ",Lambda:"Λ",Xi:"Ξ",Pi:"Π",Sigma:"Σ",Phi:"Φ",Psi:"Ψ",Omega:"Ω",alpha:"α ",beta:"β",gamma:"γ ",delta:"δ",epsilon:"ɛ",zeta:"ζ",eta:"η",theta:"θ",iota:"ι ",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν ",xi:"ξ",pi:"π",rho:"ρ ",sigma:"σ ",tau:"τ",upsilon:"υ ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",oo:"∞","O/":"∅",CC:"ℂ ",NN:"ℕ ",QQ:"ℚ ",RR:"ℝ ",ZZ:"ℤ "};gt.identifiers=s,r.forEach(function(c){s[c]=c}),Object.defineProperty(s,"contains",{value:function(_){return typeof s[_]<"u"}}),Object.defineProperty(s,"funs",{value:r}),Object.defineProperty(s,"isfun",{value:function(_){return r.indexOf(_)>=0}});var o={"*":"·","**":"∗ ","***":"⋆","//":"/","|":"|",":":":","'":"′ ","''":"″","'''":"‴","''''":"⁗",xx:"× ","-:":"÷","|><":"⋉","><|
` );function Ee(D){return function(K){for(var G=[],q=0,V=0,ne=0;ne<K.length;ne+=1){var oe=K.slice(ne),ge=K[ne];oe.startsWith(D)&&!K.slice(0,ne).match(/ \\ ( \\ {2})* $ /)?q===0&&(G.push(K.slice(V,ne)),V=ne+D.length):ge.match(e.groupings.open.regexp)?q+=1:ge.match(e.groupings.close.regexp)&&(q-=1)}return G.push(K.slice(V)),G}}var z=function D(K,G,q,V){if(!K)return G;if(K.match(/^ \s /)){if(K.match(/^ \s +( \/ [^ \/ ]|^[^ \^ ]|_[^_|])/))return D(K.trim(),G);var ne=K.match(/^ +/),oe=ne?ne[0].length:0;if(oe>1){var ge='<mspace width="'.concat(oe-1,'ex" />');return D(K.trim(),G+ge)}return D(K.trim(),G)}var J=Y(K,V),le=r(J,2),Se=le[0],Oe=le[1];if((Oe&&Oe.trimLeft().startsWith("/")||Oe.trimLeft().startsWith("./"))&&!Oe.trimLeft().match(/^ \. ? \/ \/ /)){var Le=F(Se,Oe),Ge=r(Le,2);Se=Ge[0],Oe=Ge[1]}return D(Oe,G+Se)};function te(D){if(D.trim().length===0)return"";var K=z(D,"",!1,!0);return K===Z(K)?K:S(K)}function Y(D,K,G){if(!D)return["",""];var q,V,ne=D[0],oe=D.slice(1),ge=ne+(oe.match(/^[A-Za-z]+/)||"");if(D.startsWith("sqrt")){var J=Y(D.slice(4).trim(),K);q=C(J[0]?M(J[0]):S("")),V=J[1]}else if(D.startsWith("root")){var le=Y(D.slice(4).trimLeft(),K),Se=le[0]?M(le[0]):S(""),Oe=Y(le[1].trimLeft(),K),Le=Oe[0]?M(Oe[0]):S("");q=A(Le+Se),V=Oe[1]}else if(ne===" \\ "&&D.length>1)if(D[1].match(/[( \[ ]/)){var Ge=B(oe);q=c(D.slice(2,Ge)),V=D.slice(Ge+1)}else q=c(D[1]),V=D.slice(2);else if(e.accents.contains(ge)){var rt=e.accents.get(ge),Ze=D.slice(ge.length).trimLeft(),et=Ze.match(/^ \s * \( ?([ij]) \) ?/),Xe=Y(Ze);switch(rt.type){case"over":et?(q=E(l(et[1]==="i"?"ı ":"ȷ")+c(rt.accent,{accent:!0})),V=Ze.slice(et[0].length)):(q=E(M(Xe[0])+c(rt.accent,{accent:!0})),V=Xe[1]);break;case"under":q=h(M(Xe[0])+c(rt.accent)),V=Xe[1];break;case"enclose":q=m(M(Xe[0]),rt.attrs),V=Xe[1];break;default:throw new Error("Invalid config for accent "+ge)}}else if(t.default.isfontCommand(D)){var Fe=t.default.splitfont(D);q=a(Fe.tagname)(Fe.text,Fe.font&&{mathvariant:Fe.font}),V=Fe.rest}else if(e.groupings.complex.contains(ge)){var Cn=e.groupings.complex.get(ge),ln=D.slice(ge.length).trimLeft(),yr=Y(ln);q=x(M(yr[0]),Cn),V=yr[1]}else if(t.default.isgroupStart(D)||t.default.isvertGroupStart(D)){var ra=t.default.isgroupStart(D)?t.default.splitNextGroup(D):t.default.splitNextVert(D),vr=r(ra,5),Rn=vr[1],Vt=vr[2],xn=vr[3],sa=vr[4];V=e.groupings.open.get(sa);var Tr=function(){var Cr=fe(Vt);return Cr.length>1?Cr:Te(Vt)}();if(t.default.ismatrixInterior(Vt.trim(),X.colSep,X.rowSep)){Vt.trim().endsWith(X.colSep)&&(Vt=Vt.trimRight().slice(0,-1));var oa=Rn==="{"&&xn==="",ia=W(Vt,oa&&{columnalign:"center left"});q=x(ia,{open:Rn,close:xn})}else if(Tr.length>1)if(Tr.length===2&&Rn==="("&&xn===")"){var aa=_(Tr.map(te).join(""),{linethickness:0});q=x(aa,{open:Rn,close:xn})}else{var jn=Tr.map(be);I(jn).length===1&&I(jn)[0].match(/^ \s * $ /)&&(jn=jn.slice(0,-1));var la=jn.map(function(Cr){return y(Cr.map(Q(R,te)).join(""))}).join("");q=x(k(la),{open:Rn,close:xn})}else{var ca=be(Vt),da=ca.map(te).join(""),_o={open:Rn,close:xn};X.colSep!==","&&(_o.separators=X.colSep),q=x(da,_o)}}else if(!K&&t.default.isgroupable(D,X)){var po= $ (D);q=te(po[0]),V=po[1]}else if(e.numbers.isdigit(ne)){var mo=D.match(ee)[0];q=u(mo),V=oe.slice(mo.length-1)}else if(D.match(/^# ` [ ^ ` ]+ ` / ) ) { var go = D . match ( /^#`([^`]+)`/ ) [ 1 ] ; q = u ( go ) , V = D . slice ( go . length + 3 ) } else if ( D . match ( new RegExp ( "^" + e . operators . regexp . source ) ) && ! e . identifiers . contains ( ge ) ) { var ua = t . default . splitNextOperator ( D ) , fo = r ( ua , 2 ) , gs = fo [ 0 ] , _a = fo [ 1 ] , pa = D . startsWith ( "'" ) , ma = H ( [ "∂" , "∇" ] , gs ) , ga = H ( [ "|" ] , gs ) , fa = D . startsWith ( "| " ) , zt = { } ; pa && ( zt . lspace = 0 , zt . rspace = 0 ) , ma && ( zt . rspace = 0 ) , ga && ( zt . stretchy = ! 0 ) , fa && ( zt . lspace = "veryverythickmathspace" , zt . rspace = "veryverythickmathspace" ) , q = c ( gs , ! se ( zt ) && zt ) , V = _a } else if ( e . identifiers . contains ( ge ) ) { var fs = e . identifiers [ ge ] , ha = fs . match ( /[\u0391-\u03A9\u2100-\u214F\u2200-\u22FF]/ ) ; q = ha ? l ( fs , { mathvariant : "normal" } ) : l ( fs ) , V = oe . slice ( ge . length - 1 ) } else ne === "O" && oe [ 0 ] === "/" ? ( q = l ( e . identifiers [ "O/" ] , { mathvariant : "normal" } ) , V = oe . slice ( 1 ) ) : ( q = l ( ne ) , V = oe ) ; if ( V && V . trimLeft ( ) . match ( /\.?[\^_]/ ) ) { if ( ( ! G || ! G . match ( /m(sup|over)/ ) ) && V . trim ( ) . startsWith ( "_" ) && (
` :"")+r.getLines(s+1,c,l,!0)+(g&&g.trim()?g:""),_.info=u,_.map=[s,r.line],_.markup=t,!0}}function gf(t){if(rl===null)try{rl=q5e().default}catch{return t&&t.display==="block"?function(r,s){return'<div class="math block">'+r[s].content+"</div>"}:function(r,s){return'<span class="math inline">'+r[s].content+"</span>"}}var e=rl(Object.assign({},t));return t&&t.display==="block"?function(n,r){return e(n[r].content)+ `
` }:function(n,r){return e(n[r].content)}}var z5e=function(e,n){n=typeof n=="object"?n:{};var r=n.inlineOpen||" $ $ ",s=n.inlineClose||" $ $ ",o=n.blockOpen||" $ $ $ ",i=n.blockClose||" $ $ $ ",a=n.inlineRenderer?function(_,p){return n.inlineRenderer(_[p].content,_[p])}:gf(n.renderingOptions),l=n.blockRenderer?function(_,p){return n.blockRenderer(_[p].content,_[p])+ `
` }:gf(Object.assign({display:"block"},n.renderingOptions)),u=Y5e(r,s),c=V5e(o,i);e.inline.ruler.before("escape","math_inline",u),e.block.ruler.after("blockquote","math_block",c,{alt:["paragraph","reference","blockquote","list"]}),e.renderer.rules.math_inline=a,e.renderer.rules.math_block=l};const H5e=yn(z5e);function vn(){this.__highest_alphabet__=0,this.__match_alphabets__={},this.__initial_state__=0,this.__accept_states__={},this.__transitions__={},this.__actions__={}}vn.prototype.set_highest_alphabet=function(t){this.__highest_alphabet__=t};vn.prototype.set_match_alphabets=function(t){this.__match_alphabets__=t};vn.prototype.set_initial_state=function(t){this.__initial_state__=t};vn.prototype.set_accept_states=function(t){for(var e=0;e<t.length;e++)this.__accept_states__[t[e]]=!0};vn.prototype.set_transitions=function(t){this.__transitions__=t};vn.prototype.set_actions=function(t){this.__actions__=t};vn.prototype.update_transition=function(t,e){this.__transitions__[t]=Object.assign(this.__transitions__[t]||Object(),e)};vn.prototype.execute=function(t,e){var n,r,s;for(n=this.__initial_state__,r=t;n&&r<e;r++){for(s=this.__highest_alphabet__;s>0&&!(n&s&&this.__match_alphabets__[s].call(this,r,n,s));s>>=4);if(this.__actions__(r,n,s),s===0)break;n=this.__transitions__[n][s]||0}return!!this.__accept_states__[n]};var $ 5e=vn,W5e= $ 5e,K5e=function(e,n){var r={multiline:!1,rowspan:!1,headerless:!1,multibody:!0,autolabel:!0};n=e.utils.assign({},r,n||{});function s(c,_){var p=c.bMarks[_]+c.sCount[_],g=c.bMarks[_]+c.blkIndent,f=c.skipSpacesBack(c.eMarks[_],g),h=[],E,b,m=!1,S=!1,C=0;for(E=p;E<f;E++)switch(c.src.charCodeAt(E)){case 92:m=!0;break;case 96:b=c.skipChars(E,96)-1,b>E?(S||(C===0?C=b-E:C===b-E&&(C=0)),E=b):(S||!m&&!C)&&(S=!S),m=!1;break;case 124:!S&&!m&&h.push(E),m=!1;break;default:m=!1;break}return h.length===0||(h[0]>g&&h.unshift(g-1),h[h.length-1]<f-1&&h.push(f)),h}function o(c,_,p){var g={text:null,label:null},f=c.bMarks[p]+c.sCount[p],h=c.eMarks[p],E=/^ \[ (.+?) \] ( \[ ([^ \[ \] ]+) \] )? \s * $ /,b=c.src.slice(f,h).match(E);return b?_?!0:(g.text=b[1],!n.autolabel&&!b[2]||(g.label=b[2]||b[1],g.label=g.label.toLowerCase().replace(/ \W +/g,"")),g):!1}function i(c,_,p){var g={bounds:null,multiline:null},f=s(c,p),h,E,b;return f.length<2?!1:_?!0:(g.bounds=f,n.multiline&&(h=c.bMarks[p]+c.sCount[p],E=c.eMarks[p]-1,g.multiline=c.src.charCodeAt(E)===92,g.multiline&&(b=c.eMarks[p],c.eMarks[p]=c.skipSpacesBack(E,h),g.bounds=s(c,p),c.eMarks[p]=b)),g)}function a(c,_,p){var g={aligns:[],wraps:[]},f=s(c,p),h=/^:?(-+|=+):? \+ ? $ /,E,b,m;if(c.sCount[p]-c.blkIndent>=4||f.length===0)return!1;for(E=0;E<f.length-1;E++){if(b=c.src.slice(f[E]+1,f[E+1]).trim(),!h.test(b))return!1;switch(g.wraps.push(b.charCodeAt(b.length-1)===43),m=(b.charCodeAt(0)===58)<<4|b.charCodeAt(b.length-1-g.wraps[E])===58,m){case 0:g.aligns.push("");break;case 1:g.aligns.push("right");break;case 16:g.aligns.push("left");break;case 17:g.aligns.push("center");break}}return _?!0:g}function l(c,_,p){return c.isEmpty(p)}function u(c,_,p,g){var f=new W5e,h=16,E=-1,b,m,S,C,A,x,k=[],y,R,w,L,M,Z,B,se,H,I;if(_+2>p||(m=new c.Token("table_open","table",1),m.meta={sep:null,cap:null,tr:[]},f.set_highest_alphabet(65536),f.set_initial_state(65792),f.set_accept_states([65552,65553,0]),f.set_match_alphabets({65536:o.bind(this,c,!0),4096:a.bind(this,c,!0),256:i.bind(this,c,!0),16:i.bind(this,c,!0),1:l.bind(this,c,!0)}),f.set_transitions({65792:{65536:256,256:4352},256:{256:4352},4352:{4096:65552,256:4352},65552:{65536:0,16:65553},65553:{65536:0,16:65553,1:65552}}),n.headerless&&(f.set_initial_state(69888),f.update_transition(69888,{65536:4352,4096:65552,256:4352}),S=new c.Token("tr_placeholder","tr",0),S.meta=Object()),n.multibody||f.update_transition(65552,{65536:0,16:65552}),f.set_actions(function(X,pe,ee){switch(ee){case 65536:if(m.meta.cap)break;m.meta.cap=o(c,!1,X),m.meta.cap.map=[X,X+1],m.meta.cap.first=X===_;break;case 4096:m.meta.sep=a(c,!1,X),m.meta.sep.map=[X,X+1],S.meta.grp|=1,h=16;break;case 256:case 16:S=new c.Token("tr_open","tr",1),S.map=[X,X+1],S.meta=i(c,!1,X),S.meta.type=ee,S.meta.grp=
` ),c.md,c.env,[]),I.level=S.level+1,c.md.block.tokenize(I,S.map[0],I.lineMax),H=0;H<I.tokens.length;H++)c.tokens.push(I.tokens[H])}else b=c.push("inline","",0),b.content=L.trim(),b.map=S.map,b.level=S.level+1,b.children=[];b=c.push(w+"_close",w,-1)}c.push("tr_close","tr",-1),S.meta.grp&1&&(w=S.meta.type===256?"thead":"tbody",b=c.push(w+"_close",w,-1),R[1]=S.map[1])}return y[1]=Math.max(R[1],m.meta.sep.map[1],m.meta.cap?m.meta.cap.map[1]:-1),b=c.push("table_close","table",-1),c.line=y[1],!0}e.block.ruler.at("table",u,{alt:["paragraph","reference"]})};const Q5e=yn(K5e);var j5e=function(e,n){n=n||{};function r(s){for(var o=1,i=1,a=s.tokens.length;i<a-1;++i){var l=s.tokens[i];if(l.type==="inline"&&!(!l.children||l.children.length!==1&&l.children.length!==3)&&!(l.children.length===1&&l.children[0].type!=="image")&&!(l.children.length===3&&(l.children[0].type!=="link_open"||l.children[1].type!=="image"||l.children[2].type!=="link_close"))&&!(i!==0&&s.tokens[i-1].type!=="paragraph_open")&&!(i!==a-1&&s.tokens[i+1].type!=="paragraph_close")){var u=s.tokens[i-1];u.type="figure_open",u.tag="figure",s.tokens[i+1].type="figure_close",s.tokens[i+1].tag="figure",n.dataType==!0&&s.tokens[i-1].attrPush(["data-type","image"]);var c;if(n.link==!0&&l.children.length===1&&(c=l.children[0],l.children.unshift(new s.Token("link_open","a",1)),l.children[0].attrPush(["href",c.attrGet("src")]),l.children.push(new s.Token("link_close","a",-1))),c=l.children.length===1?l.children[0]:l.children[1],n.figcaption==!0&&c.children&&c.children.length&&(l.children.push(new s.Token("figcaption_open","figcaption",1)),l.children.splice(l.children.length,0,...c.children),l.children.push(new s.Token("figcaption_close","figcaption",-1)),c.children.length=0),n.copyAttrs&&c.attrs){const _=n.copyAttrs===!0?"":n.copyAttrs;u.attrs=c.attrs.filter(([p,g])=>p.match(_))}n.tabindex==!0&&(s.tokens[i-1].attrPush(["tabindex",o]),o++),n.lazyLoading==!0&&c.attrPush(["loading","lazy"])}}}e.core.ruler.before("linkify","implicit_figures",r)};const Z5e=yn(j5e);var Kn={};Kn.getAttrs=function(t,e,n){const r=/[^ \t \n \f />"'=]/,s=" ",o="=",i=".",a="#",l=[];let u="",c="",_=!0,p=!1;for(let g=e+n.leftDelimiter.length;g<t.length;g++){if(t.slice(g,g+n.rightDelimiter.length)===n.rightDelimiter){u!==""&&l.push([u,c]);break}const f=t.charAt(g);if(f===o&&_){_=!1;continue}if(f===i&&u===""){t.charAt(g+1)===i?(u="css-module",g+=1):u="class",_=!1;continue}if(f===a&&u===""){u="id",_=!1;continue}if(f==='"'&&c===""&&!p){p=!0;continue}if(f==='"'&&p){p=!1;continue}if(f===s&&!p){if(u==="")continue;l.push([u,c]),u="",c="",_=!0;continue}if(!(_&&f.search(r)===-1)){if(_){u+=f;continue}c+=f}}if(n.allowedAttributes&&n.allowedAttributes.length){const g=n.allowedAttributes;return l.filter(function(f){const h=f[0];function E(b){return h===b||b instanceof RegExp&&b.test(h)}return g.some(E)})}return l};Kn.addAttrs=function(t,e){for(let n=0,r=t.length;n<r;++n){const s=t[n][0];s==="class"?e.attrJoin("class",t[n][1]):s==="css-module"?e.attrJoin("css-module",t[n][1]):e.attrPush(t[n])}return e};Kn.hasDelimiters=function(t,e){if(!t)throw new Error('Parameter ` where ` not passed. Should be "start", "end" or "only".');return function(n){const r=e.leftDelimiter.length+1+e.rightDelimiter.length;if(!n||typeof n!="string"||n.length<r)return!1;function s(c){const _=c.charAt(e.leftDelimiter.length)===".",p=c.charAt(e.leftDelimiter.length)==="#";return _||p?c.length>=r+1:c.length>=r}let o,i,a,l;const u=r-e.rightDelimiter.length;switch(t){case"start":a=n.slice(0,e.leftDelimiter.length),o=a===e.leftDelimiter?0:-1,i=o===-1?-1:n.indexOf(e.rightDelimiter,u),l=n.charAt(i+e.rightDelimiter.length),l&&e.rightDelimiter.indexOf(l)!==-1&&(i=-1);break;case"end":o=n.lastIndexOf(e.leftDelimiter),i=o===-1?-1:n.indexOf(e.rightDelimiter,o+u),i=i===n.length-e.rightDelimiter.length?i:-1;break;case"only":a=n.slice(0,e.leftDelimiter.length),o=a===e.leftDelimiter?0:-1,a=n.slice(n.length-e.rightDelimiter.length),i=a===e.rightDelimiter?n.length-e.rightDelimiter.length:-1;break;default:throw new Error( ` Unexpected case $ { t } , expected 'start' , 'end' or ' only
{ . a } softbreak then curly in start ` ,tests:[{shift:0,type:"inline",children:[{position:-2,type:"softbreak"},{position:-1,type:"text",content:Ue.hasDelimiters("only",t)}]}],transform:(n,r,s)=>{const o=n[r].children[s],i=Ue.getAttrs(o.content,0,t);let a=r+1;for(;n[a+1]&&n[a+1].nesting===-1;)a++;const l=Ue.getMatchingOpeningToken(n,a);Ue.addAttrs(i,l),n[r].children=n[r].children.slice(0,-2)}},{name:"horizontal rule",tests:[{shift:0,type:"paragraph_open"},{shift:1,type:"inline",children:n=>n.length===1,content:n=>n.match(e)!==null},{shift:2,type:"paragraph_close"}],transform:(n,r)=>{const s=n[r];s.type="hr",s.tag="hr",s.nesting=0;const o=n[r+1].content,i=o.lastIndexOf(t.leftDelimiter),a=Ue.getAttrs(o,i,t);Ue.addAttrs(a,s),s.markup=o,n.splice(r+1,2)}},{name:"end of block",tests:[{shift:0,type:"inline",children:[{position:-1,content:Ue.hasDelimiters("end",t),type:n=>n!=="code_inline"&&n!=="math_inline"}]}],transform:(n,r,s)=>{const o=n[r].children[s],i=o.content,a=Ue.getAttrs(i,i.lastIndexOf(t.leftDelimiter),t);let l=r+1;for(;n[l+1]&&n[l+1].nesting===-1;)l++;const u=Ue.getMatchingOpeningToken(n,l);Ue.addAttrs(a,u);const c=i.slice(0,i.lastIndexOf(t.leftDelimiter));o.content=ff(c)!==" "?c:c.slice(0,-1)}}]};function ff(t){return t.slice(-1)[0]}const r3e=n3e,s3e={leftDelimiter:"{",rightDelimiter:"}",allowedAttributes:[]};var o3e=function(e,n){let r=Object.assign({},s3e);r=Object.assign(r,n);const s=r3e(r);function o(i){const a=i.tokens;for(let l=0;l<a.length;l++)for(let u=0;u<s.length;u++){const c=s[u];let _=null;c.tests.every(g=>{const f=m_(a,l,g);return f.j!==null&&(_=f.j),f.match})&&(c.transform(a,l,_),(c.name==="inline attributes"||c.name==="inline nesting 0")&&u--)}}e.core.ruler.before("linkify","curly_attributes",o)};function m_(t,e,n){const r={match:!1,j:null},s=n.shift!==void 0?e+n.shift:n.position;if(n.shift!==void 0&&s<0)return r;const o=l3e(t,s);if(o===void 0)return r;for(const i of Object.keys(n))if(!(i==="shift"||i==="position")){if(o[i]===void 0)return r;if(i==="children"&&i3e(n.children)){if(o.children.length===0)return r;let a;const l=n.children,u=o.children;if(l.every(c=>c.position!==void 0)){if(a=l.every(c=>m_(u,c.position,c).match),a){const c=c3e(l).position;r.j=c>=0?c:u.length+c}}else for(let c=0;c<u.length;c++)if(a=l.every(_=>m_(u,c,_).match),a){r.j=c;break}if(a===!1)return r;continue}switch(typeof n[i]){case"boolean":case"number":case"string":if(o[i]!==n[i])return r;break;case"function":if(!n[i](o[i]))return r;break;case"object":if(a3e(n[i])){if(n[i].every(l=>l(o[i]))===!1)return r;break}default:throw new Error( ` Unknown type of pattern test ( key : $ { i } ) . Test should be of type boolean , number , string , function or array of functions . ` )}}return r.match=!0,r}function i3e(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="object")}function a3e(t){return Array.isArray(t)&&t.length&&t.every(e=>typeof e=="function")}function l3e(t,e){return e>=0?t[e]:t[t.length+e]}function c3e(t){return t.slice(-1)[0]||{}}const d3e=yn(o3e);function eT(t){return t instanceof Map?t.clear=t.delete=t.set=function(){throw new Error("map is read-only")}:t instanceof Set&&(t.add=t.clear=t.delete=function(){throw new Error("set is read-only")}),Object.freeze(t),Object.getOwnPropertyNames(t).forEach(e=>{const n=t[e],r=typeof n;(r==="object"||r==="function")&&!Object.isFrozen(n)&&eT(n)}),t}class hf{constructor(e){e.data===void 0&&(e.data={}),this.data=e.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function tT(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Gn(t,...e){const n=Object.create(null);for(const r in t)n[r]=t[r];return e.forEach(function(r){for(const s in r)n[s]=r[s]}),n}const u3e="</span>",Ef=t=>!!t.scope,_3e=(t,{prefix:e})=>{if(t.startsWith("language:"))return t.replace("language:","language-");if(t.includes(".")){const n=t.split(".");return[ ` $ { e } $ { n . shift ( ) } ` ,...n.map((r,s)=> ` $ { r } $ { "_" . repeat ( s + 1 ) } ` )].join(" ")}return ` $ { e } $ { t } ` };class p3e{constructor(e,n){this.buffer="",this.classPrefix=n.classPrefix,e.walk(this)}addText
https : //github.com/highlightjs/highlight.js/issues/2277`),pe=I,X=Q),re===void 0&&(re=!0);const ee={code:X,language:pe};se("before:highlight",ee);const be=ee.result?ee.result:_(ee.language,ee.code,re);return be.code=ee.code,se("after:highlight",be),be}function _(I,Q,re,X){const pe=Object.create(null);function ee(J,le){return J.keywords[le]}function be(){if(!D.keywords){G.addText(q);return}let J=0;D.keywordPatternRe.lastIndex=0;let le=D.keywordPatternRe.exec(q),Se="";for(;le;){Se+=q.substring(J,le.index);const Oe=W.case_insensitive?le[0].toLowerCase():le[0],Le=ee(D,Oe);if(Le){const[Ge,rt]=Le;if(G.addText(Se),Se="",pe[Oe]=(pe[Oe]||0)+1,pe[Oe]<=n4e&&(V+=rt),Ge.startsWith("_"))Se+=le[0];else{const Ze=W.classNameAliases[Ge]||Ge;Ee(le[0],Ze)}}else Se+=le[0];J=D.keywordPatternRe.lastIndex,le=D.keywordPatternRe.exec(q)}Se+=q.substring(J),G.addText(Se)}function Te(){if(q==="")return;let J=null;if(typeof D.subLanguage=="string"){if(!e[D.subLanguage]){G.addText(q);return}J=_(D.subLanguage,q,!0,K[D.subLanguage]),K[D.subLanguage]=J._top}else J=g(q,D.subLanguage.length?D.subLanguage:null);D.relevance>0&&(V+=J.relevance),G.__addSublanguage(J._emitter,J.language)}function fe(){D.subLanguage!=null?Te():be(),q=""}function Ee(J,le){J!==""&&(G.startScope(le),G.addText(J),G.endScope())}function z(J,le){let Se=1;const Oe=le.length-1;for(;Se<=Oe;){if(!J._emit[Se]){Se++;continue}const Le=W.classNameAliases[J[Se]]||J[Se],Ge=le[Se];Le?Ee(Ge,Le):(q=Ge,be(),q=""),Se++}}function te(J,le){return J.scope&&typeof J.scope=="string"&&G.openNode(W.classNameAliases[J.scope]||J.scope),J.beginScope&&(J.beginScope._wrap?(Ee(q,W.classNameAliases[J.beginScope._wrap]||J.beginScope._wrap),q=""):J.beginScope._multi&&(z(J.beginScope,le),q="")),D=Object.create(J,{parent:{value:D}}),D}function Y(J,le,Se){let Oe=E3e(J.endRe,Se);if(Oe){if(J["on:end"]){const Le=new hf(J);J["on:end"](le,Le),Le.isMatchIgnored&&(Oe=!1)}if(Oe){for(;J.endsParent&&J.parent;)J=J.parent;return J}}if(J.endsWithParent)return Y(J.parent,le,Se)}function ue(J){return D.matcher.regexIndex===0?(q+=J[0],1):(ge=!0,0)}function ye(J){const le=J[0],Se=J.rule,Oe=new hf(Se),Le=[Se.__beforeBegin,Se["on:begin"]];for(const Ge of Le)if(Ge&&(Ge(J,Oe),Oe.isMatchIgnored))return ue(le);return Se.skip?q+=le:(Se.excludeBegin&&(q+=le),fe(),!Se.returnBegin&&!Se.excludeBegin&&(q=le)),te(Se,J),Se.returnBegin?0:le.length}function O(J){const le=J[0],Se=Q.substring(J.index),Oe=Y(D,J,Se);if(!Oe)return Tf;const Le=D;D.endScope&&D.endScope._wrap?(fe(),Ee(le,D.endScope._wrap)):D.endScope&&D.endScope._multi?(fe(),z(D.endScope,J)):Le.skip?q+=le:(Le.returnEnd||Le.excludeEnd||(q+=le),fe(),Le.excludeEnd&&(q=le));do D.scope&&G.closeNode(),!D.skip&&!D.subLanguage&&(V+=D.relevance),D=D.parent;while(D!==Oe.parent);return Oe.starts&&te(Oe.starts,J),Le.returnEnd?0:le.length}function N(){const J=[];for(let le=D;le!==W;le=le.parent)le.scope&&J.unshift(le.scope);J.forEach(le=>G.openNode(le))}let F={};function $(J,le){const Se=le&&le[0];if(q+=J,Se==null)return fe(),0;if(F.type==="begin"&&le.type==="end"&&F.index===le.index&&Se===""){if(q+=Q.slice(le.index,le.index+1),!s){const Oe=new Error(`0 width match regex (${I})`);throw Oe.languageName=I,Oe.badRule=F.rule,Oe}return 1}if(F=le,le.type==="begin")return ye(le);if(le.type==="illegal"&&!re){const Oe=new Error('Illegal lexeme "'+Se+'" for mode "'+(D.scope||"<unnamed>")+'"');throw Oe.mode=D,Oe}else if(le.type==="end"){const Oe=O(le);if(Oe!==Tf)return Oe}if(le.type==="illegal"&&Se==="")return 1;if(oe>1e5&&oe>le.index*3)throw new Error("potential infinite loop, way more iterations than matches");return q+=Se,Se.length}const W=R(I);if(!W)throw dr(o.replace("{}",I)),new Error('Unknown language: "'+I+'"');const ie=X3e(W);let me="",D=X||ie;const K={},G=new a.__emitter(a);N();let q="",V=0,ne=0,oe=0,ge=!1;try{if(W.__emitTokens)W.__emitTokens(Q,G);else{for(D.matcher.considerAll();;){oe++,ge?ge=!1:D.matcher.considerAll(),D.matcher.lastIndex=ne;const J=D.matcher.exec(Q);if(!J)break;const le=Q.substring(ne,J.index),Se=$(le,J);ne=J.index+Se}$(Q.substring(ne))}return G.finalize(),me=G.toHTML(),{language:I,valu
` },f]}}return Vc=s,Vc}var zc,cE;function V9e(){if(cE)return zc;cE=1;function t(e){const n="[a-zA-Z_][ \\ w.]*",r="< \\ ?(lasso(script)?|=)",s=" \\ ]| \\ ?>",o={ $ pattern:n+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},i=e.COMMENT("<!--","-->",{relevance:0}),a={className:"meta",begin:" \\ [noprocess \\ ]",starts:{end:" \\ [/noprocess \\ ]",returnEnd:!0,contains:[i]}},l={className:"meta",begin:" \\ [/noprocess|"+r},u={className:"symbol",begin:"'"+n+"'"},c=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(-?infinity|NaN) \\ b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:" ` ",end:" ` "},{variants:[{begin:"[# $ ]"+n},{begin:"#",end:" \\ d+",illegal:" \\ W"}]},{className:"type",begin:":: \\ s*",end:n,illegal:" \\ W"},{className:"params",variants:[{begin:"-(?!infinity)"+n,relevance:0},{begin:"( \\ . \\ . \\ .)"}]},{begin:/(->| \. ) \s */,relevance:0,contains:[u]},{className:"class",beginKeywords:"define",returnEnd:!0,end:" \\ (|=>",contains:[e.inherit(e.TITLE_MODE,{begin:n+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:o,contains:[{className:"meta",begin:s,relevance:0,starts:{end:" \\ [|"+r,returnEnd:!0,relevance:0,contains:[i]}},a,l,{className:"meta",begin:" \\ [no_square_brackets",starts:{end:" \\ [/no_square_brackets \\ ]",keywords:o,contains:[{className:"meta",begin:s,relevance:0,starts:{end:" \\ [noprocess \\ ]|"+r,returnEnd:!0,contains:[i]}},a,l].concat(c)}},{className:"meta",begin:" \\ [",relevance:0},{className:"meta",begin:"^#!",end:"lasso9 $ ",relevance:10}].concat(c)}}return zc=t,zc}var Hc,dE;function z9e(){if(dE)return Hc;dE=1;function t(e){const r=e.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(L=>L+"(?![a-zA-Z@:_])")),s=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-
] ` ,f={scope:"string",variants:[c,u,_,p]},h={scope:"number",variants:[{begin:" \\ b0[bB][01]+(?:_[01]+)* \\ b"},{begin:" \\ b0[oO][0-7]+(?:_[0-7]+)* \\ b"},{begin:" \\ b0[xX][ \\ da-fA-F]+(?:_[ \\ da-fA-F]+)* \\ b"},{begin:"(?: \\ b \\ d+(?:_ \\ d+)*( \\ .(?: \\ d+(?:_ \\ d+)*))?| \\ B \\ . \\ d+)(?:[eE][+-]? \\ d+)?"}],relevance:0},E=["false","null","true"],b=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],m=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],C={keyword:b,literal:(B=>{const se=[];return B.forEach(H=>{se.push(H),H.toLowerCase()===H?se.push(H.toUpperCase()):se.push(H.toLowerCase())}),se})(E),built_in:m},A=B=>B.map(se=>se.replace(/ \| \d + $ /,"")),x={variants:[{match:[/new/,n.concat(g,"+"),n.concat("(?!",A(m).join(" \\ b|")," \\ b)"),o],scope:{1:"keyword",4:"title.class"}}]},k=n.concat(s," \\ b(?! \\ ()"),y={variants:[{match:[n.concat(/::/,n.lookahead(/(?!class \b )/)),k],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[o,n.concat(/::/,n.lookahead(/(?!class \b )/)),k],scope:{1:"title.class",3:"variable.constant"}},{match:[o,n.concat("::",n.lookahead(/(?!class \b )/))],scope:{1:"title.class"}},{match:[o,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},R={scope:"attr",match:n.concat(s,n.lookahead(":"),n.lookahead(/(?!::)/))},w={relevance:0,begin:/ \( /,end:/ \) /,keywords:C,contains:[R,i,y,e.C_BLOCK_COMMENT_MODE,f,h,x]},L={relevance:0,match:[/ \b /,n.concat("(?!fn \\ b|function \\ b|",A(b).join(" \\ b|"),"|",A(m).join(" \\ b|")," \\ b)"),s,n.concat(g,"*"),n.lookahead(/(?= \( )/)],scope:{3:"title.function.invoke"},contains:[w]};w.contains.push(L);const M=[R,y,e.C_BLOCK_COMMENT_MODE,f,h,x],Z={begin:n.concat(/# \[ \s */,o),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:E,keyword:["new","array"]},contains:[{begin:/ \[ /,end:/]/,keywords:{literal:E,keyword:["new","array"]},contains:["self",...M]},
] * ; ` ,relevance:0},{begin:"[vp][0-9]+"}]}}return ru=t,ru}var su,Tb;function r8e(){if(Tb)return su;Tb=1;function t(e){const n="[a-z][a-zA-Z0-9_]*",r={className:"string",begin:" \\ $ .{1}"},s={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"type",begin:" \\ b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:n+":",relevance:0},e.C_NUMBER_MODE,s,r,{begin:" \\ |[ ]*"+n+"([ ]+"+n+")*[ ]* \\ |",returnBegin:!0,end:/ \| /,illegal:/ \S /,contains:[{begin:"( \\ |[ ]*)?"+n}]},{begin:"# \\ (",end:" \\ )",contains:[e.APOS_STRING_MODE,r,e.C_NUMBER_MODE,s]}]}}return su=t,su}var ou,Cb;function s8e(){if(Cb)return ou;Cb=1;function t(e){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{ $ pattern:"[a-z_] \\ w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/ \/ \/ |>>/,contains:[{className:"literal",begin:/ \[ ( \| \| )? \] | \( \) /,relevance:0},e.COMMENT(" \\ ( \\ *"," \\ * \\ )",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[ \\ w']*"},{className:"type",begin:" ` [ A - Z ] [ \ \ w ']*"},{className:"type",begin:"\\b[A-Z][\\w' ] * ",relevance:0},{begin:" [ a - z _ ] \ \ w * '[\\w' ] * "},e.inherit(e.APOS_STRING_MODE,{className:" string ",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:" number ",begin:" \ \ b ( 0 [ xX ] [ a - fA - F0 - 9_ ] + [ Lln ] ? | 0 [ oO ] [ 0 - 7_ ] + [ Lln ] ? | 0 [ bB ] [ 01_ ] + [ Lln ] ? | [ 0 - 9 ] [ 0 - 9_ ] * ( [ Lln ] | ( \ \ . [ 0 - 9_ ] * ) ? ( [ eE ] [ - + ] ? [ 0 - 9_ ] + ) ? ) ? ) ",relevance:0},{begin:/[-=]>/}]}}return ou=t,ou}var iu,Rb;function o8e(){if(Rb)return iu;Rb=1;function t(e){const n={className:" variable ",begin:/\b_+[a-zA-Z]\w*/},r={className:" title ",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},s={className:" string ",variants:[{begin:'" ',end:' "',contains:[{begin:'" "',relevance:0}]},{begin:" '",end:"' ",contains:[{begin:" '' ",relevance:0}]}]},o=[" break "," breakWith "," breakOut "," breakTo "," case "," catch "," continue "," continueWith "," default "," do "," else "," exit "," exitWith "," for "," forEach "," from "," if "," local "," private "," switch "," step "," then "," throw "," to "," try "," waitUntil "," while "," with "],i=[" blufor "," civilian "," configNull "," controlNull "," displayNull "," diaryRecordNull "," east "," endl "," false "," grpNull "," independent "," lineBreak "," locationNull "," nil "," objNull "," opfor "," pi "," resistance "," scriptNull "," sideAmbientLife "," sideEmpty "," sideEnemy "," sideFriendly "," sideLogic "," sideUnknown "," taskNull "," teamMemberNull "," true "," west "],a=[" abs "," accTime "," acos "," action "," actionIDs "," actionKeys "," actionKeysEx "," actionKeysImages "," actionKeysNames "," actionKeysNamesArray "," actionName "," actionParams "," activateAddons "," activatedAddons "," activateKey "," activeTitleEffectParams "," add3DENConnection "," add3DENEventHandler "," add3DENLayer "," addAction "," addBackpack "," addBackpackCargo "," addBackpackCargoGlobal "," addBackpackGlobal "," addBinocularItem "," addCamShake "," addCuratorAddons "," addCuratorCameraArea "," addCuratorEditableObjects "," addCuratorEditingArea "," addCuratorPoints "," addEditorObject "," addEventHandler "," addForce "," addForceGeneratorRTD "," addGoggles "," addGroupIcon "," addHandgunItem "," addHeadgear "," addItem "," addItemCargo "," addItemCargoGlobal "," addItemPool "," addItemToBackpack "," addItemToUniform "," addItemToVest "," addLiveStats "," addMagazine "," addMagazineAmmoCargo "," addMagazineCargo "," addMagazineCargoGlobal "," addMagazineGlobal "," addMagazinePool "," addMagazines "," addMagazineTurret "," addMenu "," addMenuItem "," addMissionEventHandler "," addMPEventHandler "," addMusicEventHandler "," addonFiles "," addOwnedMine "," addPlayerScores "," addPrimaryWeaponItem "," addPublicVariableEventHandler "," addRating "," addResources "," addScore "," addScoreSide "," addSecondaryWeaponItem "," addSwitchableUnit "," addTeamMember "," addToRemainsCollector "," addTorque "," addUniform "," addUserActionEventHandler "," a
] * ? "'`},{begin:`" [ ^ \ r
"]*" ` }]},{className:"built_in",variants:[{begin:" \\ b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?= \\ ()"}]},e.COMMENT("^[ ]* \\ *.* $ ",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}return cu=t,cu}var du,Nb;function c8e(){if(Nb)return du;Nb=1;function t(e){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{ $ pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/ \\ * \\ *!"," \\ */"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:" \\ d+",illegal:" \\ W"}]}]}}return du=t,du}var uu,wb;function d8e(){if(wb)return uu;wb=1;const t=a=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:a.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4})) \b /},FUNCTION_DISPATCH:{className:"built_in",begin:/[ \w -]+(?= \( )/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/ \[ /,end:/ \] /,illegal:" $ ",contains:[a.APOS_STRING_MODE,a.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:a.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),e=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],n=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"],r=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","
( multipart ) ? ` ,end: ` \ \ ]
2023-10-24 21:07:04 +00:00
` },{className:"string",begin:" \\ d{4}- \\ d{2}- \\ d{2}( \\ s+) \\ d{2}: \\ d{2}: \\ d{2}. \\ d+Z"},{className:"string",begin:"( \\ +|-) \\ d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?) \\ s+(test)?"},{begin:"^progress(:?)( \\ s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return _u=t,_u}var pu,Db;function _8e(){if(Db)return pu;Db=1;function t(y){return y?typeof y=="string"?y:y.source:null}function e(y){return n("(?=",y,")")}function n(...y){return y.map(w=>t(w)).join("")}function r(y){const R=y[y.length-1];return typeof R=="object"&&R.constructor===Object?(y.splice(y.length-1,1),R):{}}function s(...y){return"("+(r(y).capture?"":"?:")+y.map(L=>t(L)).join("|")+")"}const o=y=>n(/ \b /,y,/ \w $ /.test(y)?/ \b /:/ \B /),i=["Protocol","Type"].map(o),a=["init","self"].map(o),l=["Any","Self"],u=["actor","any","associatedtype","async","await",/as \? /,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate \( set \) /,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init \? /,/init!/,"inout",/internal \( set \) /,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open \( set \) /,"open","operator","optional","override","postfix","precedencegroup","prefix",/private \( set \) /,"private","protocol",/public \( set \) /,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try \? /,/try!/,"try","typealias",/unowned \( safe \) /,/unowned \( unsafe \) /,"unowned","var","weak","where","while","willSet"],c=["false","nil","true"],_=["assignment","associativity","higherThan","left","lowerThan","none","right"],p=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],g=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],f=s(/[/= \- +!*%<>&|^~?]/,/[ \u 00A1- \u 00A7]/,/[ \u 00A9 \u 00AB]/,/[ \u 00AC \u 00AE]/,/[ \u 00B0 \u 00B1]/,/[ \u 00B6 \u 00BB \u 00BF \u 00D7 \u 00F7]/,/[ \u 2016- \u 2017]/,/[ \u 2020- \u 2027]/,/[ \u 2030- \u 203E]/,/[ \u 2041- \u 2053]/,/[ \u 2055- \u 205E]/,/[ \u 2190- \u 23FF]/,/[ \u 2500- \u 2775]/,/[ \u 2794- \u 2BFF]/,/[ \u 2E00- \u 2E7F]/,/[ \u 3001- \u 3003]/,/[ \u 3008- \u 3020]/,/[ \u 3030]/),h=s(f,/[ \u 0300- \u 036F]/,/[ \u 1DC0- \u 1DFF]/,/[ \u 20D0- \u 20FF]/,/[ \u FE00- \u FE0F]/,/[ \u FE20- \u FE2F]/),E=n(f,h,"*"),b=s(/[a-zA-Z_]/,/[ \u 00A8 \u 00AA \u 00AD \u 00AF \u 00B2- \u 00B5 \u 00B7- \u 00BA]/,/[ \u 00BC- \u 00BE \u 00C0- \u 00D6 \u 00D8- \u 00F6 \u 00F8- \u 00FF]/,/[ \u 0100- \u 02FF \u 0370- \u 167F \u 1681- \u 180D \u 180F- \u 1DBF]/,/[ \u 1E00- \u 1FFF]/,/[ \u 200B- \u 200D \u 202A- \u 202E \u 203F- \u 2040 \u 2054 \u 2060- \u 206F]/,/[ \u 2070- \u 20CF \u 2100- \u 218F \u 2460- \u 24FF \u 2776- \u 2793]/,/[ \u 2C00- \u 2DFF \u 2E80- \u 2FFF]/,/[ \u 3004- \u 3007 \u 3021- \u 302F \u 3031- \u 303F \u 3040- \u D7FF]/,/[ \u F900- \u FD3D \u FD40- \u FDCF \u FDF0- \u FE1F \u FE30- \u FE44]/,/[ \u FE47- \u FEFE \u FF00- \u FFFD]/),m=s(b,/ \d /,/[ \u 0300- \u 036F \u 1DC0- \u 1DFF \u 20D0- \u 20FF \u FE20- \u FE2F]/),S=n(b,m,"*"),C=n(/[A-Z]/,m,"*"),A=["attached","autoclosure",n(/convention \( /,s("swift","block","c"),/ \) /),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",n(/objc \( /,S,/ \) /),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain",
` ),r=n.length.toString().length,s=n.map((u,c)=>(c+1).toString().padStart(r," ")),o=document.createElement("div");o.classList.add("line-numbers"),o.innerHTML=s.join("<br>");const i=document.createElement("div");i.classList.add("code-container");const a=document.createElement("pre"),l=document.createElement("code");return l.classList.add("code-content"),l.innerHTML=mr.highlight(t,e).value,a.appendChild(l),i.appendChild(o),i.appendChild(a),i.outerHTML}},methods:{copyCode(){this.isCopied=!0,console.log("Copying code");const t=document.createElement("textarea");t.value=this.code,document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),ve(()=>{Ce.replace()})},executeCode(){const t=JSON.stringify({code:this.code,discussion_id:this.discussion_id,message_id:this.message_id,language:this.language});console.log(t),fetch("http://localhost:9600/execute_code",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e),this.executionOutput=e.output}).catch(e=>{console.error("Fetch error:",e)})},openFolder(){const t=JSON.stringify({discussion_id:this.discussion_id});console.log(t),fetch("http://localhost:9600/open_code_folder",{method:"POST",headers:{"Content-Type":"application/json"},body:t}).then(e=>e.json()).then(e=>{console.log(e)}).catch(e=>{console.error("Fetch error:",e)})}}},P8e={class:"bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},F8e={class:"flex flex-row bg-bg-light-tone-panel dark:bg-bg-dark-tone-panel p-2 rounded-lg shadow-sm"},U8e=d("i",{"data-feather":"copy"},null,-1),B8e=[U8e],G8e=d("i",{"data-feather":"play-circle"},null,-1),q8e=[G8e],Y8e=d("i",{"data-feather":"folder"},null,-1),V8e=[Y8e],z8e={class:"hljs p-1 rounded-md break-all grid grid-cols-1"},H8e={class:"code-container"}, $ 8e=["innerHTML"],W8e={key:0,class:"hljs mt-4 p-1 rounded-md break-all grid grid-cols-1"},K8e={class:"overflow-x-auto break-all scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},Q8e=["innerHTML"];function j8e(t,e,n,r,s,o){return v(),T("div",P8e,[d("div",F8e,[d("span",null,j(n.language),1),d("button",{onClick:e[0]||(e[0]=(...i)=>o.copyCode&&o.copyCode(...i)),title:"copy",class:Ae([s.isCopied?"bg-green-500":"bg-bg-dark-tone-panel dark:bg-bg-dark-tone","px-2 py-1 ml-2 text-left p-2 text-sm font-medium rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"])},B8e,2),["python","shell","bash","cmd","powershell"].includes(n.language)?(v(),T("button",{key:0,ref:"btn_code_exec",onClick:e[1]||(e[1]=(...i)=>o.executeCode&&o.executeCode(...i)),title:"execute",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},q8e,512)):U("",!0),["python"].includes(n.language)?(v(),T("button",{key:1,onClick:e[2]||(e[2]=(...i)=>o.openFolder&&o.openFolder(...i)),title:"open code project folder",class:"px-2 py-1 ml-2 text-left p-2 text-sm font-medium bg-bg-dark-tone-panel dark:bg-bg-dark-tone rounded-lg hover:bg-primary dark:hover:bg-primary text-white text-xs transition-colors duration-200"},V8e)):U("",!0)]),d("pre",z8e,[Re(" "),d("div",H8e,[Re( `
` ),d("code",{class:"code-content overflow-x-auto break-all scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary",innerHTML:o.highlightedCode},null,8, $ 8e),Re( `
` )]),Re( `
` )]),s.executionOutput?(v(),T("pre",W8e,[Re(" "),d("div",K8e,[Re( `
` ),d("div",{ref:"execution_output",innerHTML:s.executionOutput},null,8,Q8e),Re( `
` )]),Re( `
` )])):U("",!0)])}const Z8e=qe(L8e,[["render",j8e]]);function X8e(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}const J8e={name:"MarkdownRenderer",props:{markdownText:{type:String,required:!0},discussion_id:{type:[String,Number],default:"0",required:!1},message_id:{value:"0",type:[String,Number],required:!1}},components:{CodeBlock:Z8e},setup(t){const e=new kce({html:!0,highlight:(s,o)=>{const i=o&&mr.getLanguage(o)?o:"plaintext";return mr.highlight(i,s).value},renderInline:!0,breaks:!0}).use(F5e).use(kr).use(Z5e,{figcaption:!0}).use(d3e).use(H5e,{inlineOpen:" $ ",inlineClose:" $ ",blockOpen:" $ $ ",blockClose:" $ $ "}).use(Q5e,{enableRowspan:!0,enableColspan:!0,enableGridTables:!0,enableGridTablesExtra:!0,enableTableIndentation:!0,tableCellPadding:" ",tableCellJoiner:"|",multilineCellStartMarker:"|>",multilineCellEndMarker:"<|",multilineCellPadding:" ",multilineCellJoiner: `
2023-10-27 23:36:53 +00:00
` }),n=US([]),r=()=>{if(t.markdownText){let s=e.parse(t.markdownText,{}),o=[];n.value=[];for(let i=0;i<s.length;i++)s[i].type!=="fence"?o.push(s[i]):(o.length>0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[]),n.value.push({type:"code",language:X8e(s[i].info),code:s[i].content}));o.length>0&&(n.value.push({type:"html",html:e.renderer.render(o,e.options,{})}),o=[])}else n.value=[];ve(()=>{Ce.replace()})};return Vn(()=>t.markdownText,r),to(r),{markdownItems:n}}},e6e={class:"break-all"},t6e={ref:"mdRender",class:"markdown-content"},n6e=["innerHTML"];function r6e(t,e,n,r,s,o){const i=Pe("code-block");return v(),T("div",e6e,[d("div",t6e,[(v(!0),T(Ne,null,Be(r.markdownItems,(a,l)=>(v(),T("div",{key:l},[a.type==="code"?(v(),nt(i,{key:0,language:a.language,code:a.code,discussion_id:n.discussion_id,message_id:n.message_id},null,8,["language","code","discussion_id","message_id"])):(v(),T("div",{key:1,innerHTML:a.html},null,8,n6e))]))),128))],512)])}const _T=qe(J8e,[["render",r6e]]);const s6e={props:{value:String,inputType:{type:String,default:"text",validator:t=>["text","email","password","file","path","integer","float"].includes(t)},fileAccept:String},data(){return{inputValue:this.value,placeholderText:this.getPlaceholderText()}},watch:{value(t){console.log("Changing value to ",t),this.inputValue=t}},mounted(){ve(()=>{Ce.replace()}),console.log("Changing value to ",this.value),this.inputValue=this.value},methods:{handleSliderInput(t){this.inputValue=t.target.value,this. $ emit("input",t.target.value)},getPlaceholderText(){switch(this.inputType){case"text":return"Enter text here";case"email":return"Enter your email";case"password":return"Enter your password";case"file":case"path":return"Choose a file";case"integer":return"Enter an integer";case"float":return"Enter a float";default:return"Enter value here"}},handleInput(t){if(this.inputType==="integer"){const e=t.target.value.replace(/[^0-9]/g,"");this.inputValue=e}console.log("handling input : ",t.target.value),this. $ emit("input",t.target.value)},async pasteFromClipboard(){try{const t=await navigator.clipboard.readText();this.handleClipboardData(t)}catch(t){console.error("Failed to read from clipboard:",t)}},handlePaste(t){const e=t.clipboardData.getData("text");this.handleClipboardData(e)},handleClipboardData(t){switch(this.inputType){case"email":this.inputValue=this.isValidEmail(t)?t:"";break;case"password":this.inputValue=t;break;case"file":case"path":this.inputValue="";break;case"integer":this.inputValue=this.parseInteger(t);break;case"float":this.inputValue=this.parseFloat(t);break;default:this.inputValue=t;break}},isValidEmail(t){return/^[^ \s @]+@[^ \s @]+ \. [^ \s @]+ $ /.test(t)},parseInteger(t){const e=parseInt(t);return isNaN(e)?"":e},parseFloat(t){const e=parseFloat(t);return isNaN(e)?"":e},openFileInput(){this. $ refs.fileInput.click()},handleFileInputChange(t){const e=t.target.files[0];e&&(this.inputValue=e.name)}}},o6e={class:"flex items-center space-x-2"},i6e=["value","type","placeholder"],a6e=["value","min","max"],l6e=d("i",{"data-feather":"clipboard"},null,-1),c6e=[l6e],d6e=d("i",{"data-feather":"upload"},null,-1),u6e=[d6e],_6e=["accept"];function p6e(t,e,n,r,s,o){return v(),T("div",o6e,[t.useSlider?(v(),T("input",{key:1,type:"range",value:parseInt(s.inputValue),min:t.minSliderValue,max:t.maxSliderValue,onInput:e[2]||(e[2]=(...i)=>o.handleSliderInput&&o.handleSliderInput(...i)),class:"flex-1 px-4 py-2 text-lg border dark:bg-gray-600 border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,a6e)):(v(),T("input",{key:0,value:s.inputValue,type:n.inputType,placeholder:s.placeholderText,onInput:e[0]||(e[0]=(...i)=>o.handleInput&&o.handleInput(...i)),onPaste:e[1]||(e[1]=(...i)=>o.handlePaste&&o.handlePaste(...i)),class:"flex-1 px-4 py-2 text-lg dark:bg-gray-600 border border-gray-300 rounded-md focus:outline-none focus:ring focus:border-blue-500"},null,40,i6e)),d("button",{onClick:e[3]||(e[3]=(...i)=>o.pasteFromClipboard&&o.pasteFromClipboard(...i)),class:"p-2 bg-blue-500 dark:bg-gray-600 text-white rounded-md hover:bg-blue-60
2023-10-23 23:40:39 +00:00
< div class = "bg-white p-6 rounded-md shadow-md w-80" >
< h2 class = "text-lg font-semibold mb-3" > $ { t } < / h 2 >
< textarea id = "replacementInput" class = "w-full h-32 border rounded p-2 mb-3" > $ { e } < / t e x t a r e a >
< div class = "flex justify-end" >
< button id = "cancelButton" class = "mr-2 px-4 py-2 border rounded" > Cancel < / b u t t o n >
< button id = "okButton" class = "px-4 py-2 bg-blue-500 text-white rounded" > OK < / b u t t o n >
< / d i v >
< / d i v >
` :o.innerHTML= `
< div class = "bg-white p-6 rounded-md shadow-md w-80" >
< h2 class = "text-lg font-semibold mb-3" > $ { t } < / h 2 >
< select id = "options_selector" class = "form-control w-full h-25 border rounded p-2 mb-3" >
$ { n . map ( l => ` <option value=" ${ l } "> ${ l } </option> ` ) }
< / s e l e c t >
< div class = "flex justify-end" >
< button id = "cancelButton" class = "mr-2 px-4 py-2 border rounded" > Cancel < / b u t t o n >
< button id = "okButton" class = "px-4 py-2 bg-blue-500 text-white rounded" > OK < / b u t t o n >
< / d i v >
< / d i v >
2023-10-27 23:36:53 +00:00
` ,document.body.appendChild(o);const i=o.querySelector("#cancelButton"),a=o.querySelector("#okButton");i.addEventListener("click",()=>{document.body.removeChild(o),r(null)}),a.addEventListener("click",()=>{if(n.length===0){const u=o.querySelector("#replacementInput").value.trim();document.body.removeChild(o),r(u)}else{const u=o.querySelector("#options_selector").value.trim();document.body.removeChild(o),r(u)}})})}function E6e(t,e){console.log(t);let n={},r=/@<([^>]+)>@/g,s=[],o;for(;(o=r.exec(t))!==null;)s.push("@<"+o[1]+">@");console.log("matches"),console.log(s),s=[...new Set(s)];async function i(l){console.log(l);let u=l.toLowerCase().substring(2,l.length-2);if(u!=="generation_placeholder")if(u.includes(":")){Object.entries({all_language_options:"english:french:german:chinese:japanese:spanish:italian:russian:portuguese:swedish:danish:dutch:norwegian:slovak:czech:hungarian:polish:ukrainian:bulgarian:latvian:lithuanian:estonian:maltese:irish:galician:basque:welsh:breton:georgian:turkmen:kazakh:uzbek:tajik:afghan:sri-lankan:filipino:vietnamese:lao:cambodian:thai:burmese:kenyan:botswanan:zimbabwean:malawian:mozambican:angolan:namibian:south-african:madagascan:seychellois:mauritian:haitian:peruvian:ecuadorian:bolivian:paraguayan:chilean:argentinean:uruguayan:brazilian:colombian:venezuelan:puerto-rican:cuban:dominican:honduran:nicaraguan:salvadorean:guatemalan:el-salvadoran:belizean:panamanian:costa-rican:antiguan:barbudan:dominica's:grenada's:st-lucia's:st-vincent's:gibraltarian:faroe-islander:greenlandic:icelandic:jamaican:trinidadian:tobagonian:barbadian:anguillan:british-virgin-islander:us-virgin-islander:turkish:israeli:palestinian:lebanese:egyptian:libyan:tunisian:algerian:moroccan:bahraini:kuwaiti:saudi-arabian:yemeni:omani:irani:iraqi:afghanistan's:pakistani:indian:nepalese:sri-lankan:maldivan:burmese:thai:lao:vietnamese:kampuchean:malaysian:bruneian:indonesian:australian:new-zealanders:fijians:tongans:samoans:vanuatuans:wallisians:kiribatians:tuvaluans:solomon-islanders:marshallese:micronesians:hawaiians",all_programming_language_options:"python:c:c++:java:javascript:php:ruby:go:swift:kotlin:rust:haskell:erlang:lisp:scheme:prolog:cobol:fortran:pascal:delphi:d:eiffel:h:basic:visual_basic:smalltalk:objective-c:html5:node.js:vue.js:svelte:react:angular:ember:clipper:stex:arduino:brainfuck:r:assembly:mason:lepton:seacat:bbc_microbit:raspberry_pi_gpio:raspberry_pi_spi:raspberry_pi_i2c:raspberry_pi_uart:raspberry_pi_adc:raspberry_pi_ddio"}).forEach(([E,b])=>{console.log( ` Key : $ { E } , Value : $ { b } ` );function m(A){return A.replace(/[.*+?^ ${ } ()|[ \] \\ ]/g," \\ $ &")}const S=m(E),C=new RegExp(S,"g");u=u.replace(C,b)});let _=u.split(":"),p=_[0],g=_[1]||"",f=[];_.length>2&&(f=_.slice(1));let h=await eS(p,g,f);h!==null&&(n[l]=h)}else{let c=await eS(u);c!==null&&(n[l]=c)}}let a=Promise.resolve();s.forEach(l=>{a=a.then(()=>i(l)).then(u=>{console.log(u)})}),a.then(()=>{Object.entries(n).forEach(([l,u])=>{console.log( ` Key : $ { l } , Value : $ { u } ` );function c(g){return g.replace(/[.*+?^ ${ } ()|[ \] \\ ]/g," \\ $ &")}const _=c(l),p=new RegExp(_,"g");t=t.replace(p,u)}),e(t)})}const b6e={name:"PlayGroundView",data(){return{selecting_model:!1,tab_id:"source",generating:!1,isSpeaking:!1,voices:[],isLesteningToVoice:!1,presets:[],selectedPreset:"",cursorPosition:0,text:"",pre_text:"",post_text:"",temperature:.1,top_k:50,top_p:.9,repeat_penalty:1.3,repeat_last_n:50,n_crop:-1,n_predicts:2e3,seed:-1,silenceTimeout:5e3}},components:{Toast:ds,MarkdownRenderer:_T,ClipBoardTextInput:vp,Card:ao},mounted(){xe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this. $ refs.toast.showToast( ` Error : $ { t } ` ,4,!1)}),Ie.on("text_chunk",t=>{this.appendToOutput(t.chunk)}),Ie.on("text_generated",t=>{this.generating=!1}),Ie.on("generation_error",t=>{console.log("generation_error:",t),this. $ refs.toast.showToast( ` Error : $ { t } ` ,4,!1),this.generating=!1}),Ie.on("connect",()=>{console.log("Connected to LoLLMs server"),this. $ store.state.isConnected=!0,this.generating=!1}),Ie.on("buzzy",t=>{console.error("Server is
` ];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{const s=n(t),o=this.text.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t<this.text.length-2?setTimeout(()=>{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.text.length," ",s))},this.speechSynthesis.speak(this.msg)};r()},getCursorPosition(){return this.cursorPosition},appendToOutput(t){this.pre_text+=t,this.text=this.pre_text+this.post_text},generate_in_placeholder(){console.log("Finding cursor position");let t=this.text.indexOf("@<generation_placeholder>@");if(t<0){this. $ refs.toast.showToast("No generation placeholder found",4,!1);return}this.text=this.text.substring(0,t)+this.text.substring(t+26,this.text.length),this.pre_text=this.text.substring(0,t),this.post_text=this.text.substring(t,this.text.length);var e=this.text.substring(0,t);console.log(e),Ie.emit("generate_text",{prompt:e,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},generate(){console.log("Finding cursor position"),this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length);var t=this.text.substring(0,this.getCursorPosition());console.log(t),Ie.emit("generate_text",{prompt:t,personality:-1,n_predicts:this.n_predicts,n_crop:this.n_crop,parameters:{temperature:this.temperature,top_k:this.top_k,top_p:this.top_p,repeat_penalty:this.repeat_penalty,repeat_last_n:this.repeat_last_n,seed:parseInt(this.seed)}}),this.generating=!0},stopGeneration(){Ie.emit("cancel_text_generation",{})},exportText(){const t=this.text,e=document.createElement("a"),n=new Blob([t],{type:"text/plain"});e.href=URL.createObjectURL(n),e.download="exported_text.txt",document.body.appendChild(e),e.click(),document.body.removeChild(e)},importText(){const t=document.getElementById("import-input");t&&(t.addEventListener("change",e=>{if(e.target.files&&e.target.files[0]){const n=new FileReader;n.onload=()=>{this.text=n.result},n.readAsText(e.target.files[0])}else alert("Please select a file.")}),t.click())},setPreset(){console.log("Setting preset"),console.log(this.selectedPreset),this.tab_id="render",this.text=E6e(this.selectedPreset.content,t=>{console.log("Done"),console.log(t),this.text=t})},addPreset(){let t=prompt("Enter the title of the preset:");this.presets[t]={name:t,content:this.text},xe.post("./add_preset",this.presets[t]).then(e=>{console.log(e.data)}).catch(e=>{this. $ refs.toast.showToast( ` Error : $ { e } ` ,4,!1)})},removePreset(){this.selectedPreset&&delete this.presets[this.selectedPreset.name]},reloadPresets(){xe.get("./get_presets").then(t=>{console.log(t.data),this.presets=t.data,this.selectedPreset=this.presets[0]}).catch(t=>{this. $ refs.toast.showToast( ` Error : $ { t } ` ,4,!1)})},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this. $ store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.pre_text=this.text.substring(0,this.getCursorPosition()),this.post_text=this.text.substring(this.getCursorPosition(),this.text.length),this.recognition.onresult=t=>{this.generated="";for(let e=t.resultIndex;e<t.results.length;e++)this.generated+=t.results[e][0].transcript;this.text=this.pre_text+this.generated+this.post_text,this.cursorPosition=this.pre_text.length+this.generated.length,clearTimeout(this.silenceTimer),this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recog
` ,36),[[De,s.text]]),d("span",null,"Cursor position "+j(s.cursorPosition),1)])):U("",!0),s.tab_id==="render"?(v(),T("div",Y6e,[he(i,{ref:"mdRender","markdown-text":s.text,class:"mt-4 p-2 rounded shadow-lg dark:bg-bg-dark"},null,8,["markdown-text"])])):U("",!0)],2)]),he(a,{title:"settings",class:"slider-container ml-0 mr-0 max-width",isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[he(a,{title:"Model",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(d("select",{"onUpdate:modelValue":e[11]||(e[11]=u=>o.selectedModel=u),onChange:e[12]||(e[12]=(...u)=>o.setModel&&o.setModel(...u)),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(Ne,null,Be(o.models,u=>(v(),T("option",{key:u,value:u},j(u),9,V6e))),128))],544),[[Kt,o.selectedModel]]),s.selecting_model?(v(),T("div",z6e, $ 6e)):U("",!0)]),_:1}),he(a,{title:"Presets",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[ce(d("select",{"onUpdate:modelValue":e[13]||(e[13]=u=>s.selectedPreset=u),class:"bg-white dark:bg-black mb-2 border-2 rounded-md shadow-sm w-full"},[(v(!0),T(Ne,null,Be(s.presets,u=>(v(),T("option",{key:u,value:u},j(u.name),9,W6e))),128))],512),[[Kt,s.selectedPreset]]),K6e,d("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[14]||(e[14]=(...u)=>o.setPreset&&o.setPreset(...u)),title:"Use preset"},j6e),d("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[15]||(e[15]=(...u)=>o.addPreset&&o.addPreset(...u)),title:"Add this text as a preset"},X6e),d("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[16]||(e[16]=(...u)=>o.removePreset&&o.removePreset(...u)),title:"Remove preset"},eqe),d("button",{class:"w-6 ml-2 hover:text-secondary duration-75 active:scale-90 cursor-pointer",onClick:e[17]||(e[17]=(...u)=>o.reloadPresets&&o.reloadPresets(...u)),title:"Reload presets list"},nqe)]),_:1}),he(a,{title:"Generation params",class:"slider-container ml-0 mr-0",is_subcard:!0,isHorizontal:!1,disableHoverAnimation:!0,disableFocus:!0},{default:ke(()=>[d("div",rqe,[sqe,ce(d("input",{type:"range","onUpdate:modelValue":e[18]||(e[18]=u=>s.temperature=u),min:"0",max:"5",step:"0.1",class:"w-full"},null,512),[[De,s.temperature]]),d("span",oqe,"Current value: "+j(s.temperature),1)]),d("div",iqe,[aqe,ce(d("input",{type:"range","onUpdate:modelValue":e[19]||(e[19]=u=>s.top_k=u),min:"1",max:"100",step:"1",class:"w-full"},null,512),[[De,s.top_k]]),d("span",lqe,"Current value: "+j(s.top_k),1)]),d("div",cqe,[dqe,ce(d("input",{type:"range","onUpdate:modelValue":e[20]||(e[20]=u=>s.top_p=u),min:"0",max:"1",step:"0.1",class:"w-full"},null,512),[[De,s.top_p]]),d("span",uqe,"Current value: "+j(s.top_p),1)]),d("div",_qe,[pqe,ce(d("input",{type:"range","onUpdate:modelValue":e[21]||(e[21]=u=>s.repeat_penalty=u),min:"0",max:"5",step:"0.1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_penalty]]),d("span",mqe,"Current value: "+j(s.repeat_penalty),1)]),d("div",gqe,[fqe,ce(d("input",{type:"range","onUpdate:modelValue":e[22]||(e[22]=u=>s.repeat_last_n=u),min:"0",max:"100",step:"1",class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.repeat_last_n]]),d("span",hqe,"Current value: "+j(s.repeat_last_n),1)]),d("div",Eqe,[bqe,ce(d("input",{type:"number","onUpdate:modelValue":e[23]||(e[23]=u=>s.n_crop=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_crop]]),d("span",Sqe,"Current value: "+j(s.n_crop),1)]),d("div",yqe,[vqe,ce(d("input",{type:"number","onUpdate:modelValue":e[24]||(e[24]=u=>s.n_predicts=u),class:"bg-white dark:bg-black m-0 border-2 rounded-md shadow-sm w-full"},null,512),[[De,s.n_predicts]]),d("span",Tqe,"Current value: "+j(s.n_predicts),1)]),d("div",Cqe,[Rqe,ce(d("input",{type:"number","onUpdate:modelValue":
2023-10-23 23:40:39 +00:00
Papa Parse
v5 . 4.1
https : //github.com/mholt/PapaParse
License : MIT
* / ( f u n c t i o n ( t , e ) { ( f u n c t i o n ( n , r ) { t . e x p o r t s = r ( ) } ) ( _ v , f u n c t i o n n ( ) { v a r r = t y p e o f s e l f < " u " ? s e l f : t y p e o f w i n d o w < " u " ? w i n d o w : r ! = = v o i d 0 ? r : { } , s = ! r . d o c u m e n t & & ! ! r . p o s t M e s s a g e , o = r . I S _ P A P A _ W O R K E R | | ! 1 , i = { } , a = 0 , l = { p a r s e : f u n c t i o n ( y , R ) { v a r w = ( R = R | | { } ) . d y n a m i c T y p i n g | | ! 1 ; i f ( k ( w ) & & ( R . d y n a m i c T y p i n g F u n c t i o n = w , w = { } ) , R . d y n a m i c T y p i n g = w , R . t r a n s f o r m = ! ! k ( R . t r a n s f o r m ) & & R . t r a n s f o r m , R . w o r k e r & & l . W O R K E R S _ S U P P O R T E D ) { v a r L = f u n c t i o n ( ) { i f ( ! l . W O R K E R S _ S U P P O R T E D ) r e t u r n ! 1 ; v a r Z = ( s e = r . U R L | | r . w e b k i t U R L | | n u l l , H = n . t o S t r i n g ( ) , l . B L O B _ U R L | | ( l . B L O B _ U R L = s e . c r e a t e O b j e c t U R L ( n e w B l o b ( [ " v a r g l o b a l = ( f u n c t i o n ( ) { i f ( t y p e o f s e l f ! = = ' u n d e f i n e d ' ) { r e t u r n s e l f ; } i f ( t y p e o f w i n d o w ! = = ' u n d e f i n e d ' ) { r e t u r n w i n d o w ; } i f ( t y p e o f g l o b a l ! = = ' u n d e f i n e d ' ) { r e t u r n g l o b a l ; } r e t u r n { } ; } ) ( ) ; g l o b a l . I S _ P A P A _ W O R K E R = t r u e ; " , " ( " , H , " ) ( ) ; " ] , { t y p e : " t e x t / j a v a s c r i p t " } ) ) ) ) , B = n e w r . W o r k e r ( Z ) , s e , H ; r e t u r n B . o n m e s s a g e = m , B . i d = a + + , i [ B . i d ] = B } ( ) ; r e t u r n L . u s e r S t e p = R . s t e p , L . u s e r C h u n k = R . c h u n k , L . u s e r C o m p l e t e = R . c o m p l e t e , L . u s e r E r r o r = R . e r r o r , R . s t e p = k ( R . s t e p ) , R . c h u n k = k ( R . c h u n k ) , R . c o m p l e t e = k ( R . c o m p l e t e ) , R . e r r o r = k ( R . e r r o r ) , d e l e t e R . w o r k e r , v o i d L . p o s t M e s s a g e ( { i n p u t : y , c o n f i g : R , w o r k e r I d : L . i d } ) } v a r M = n u l l ; r e t u r n l . N O D E _ S T R E A M _ I N P U T , t y p e o f y = = " s t r i n g " ? ( y = f u n c t i o n ( Z ) { r e t u r n Z . c h a r C o d e A t ( 0 ) = = = 6 5 2 7 9 ? Z . s l i c e ( 1 ) : Z } ( y ) , M = R . d o w n l o a d ? n e w _ ( R ) : n e w g ( R ) ) : y . r e a d a b l e = = = ! 0 & & k ( y . r e a d ) & & k ( y . o n ) ? M = n e w f ( R ) : ( r . F i l e & & y i n s t a n c e o f F i l e | | y i n s t a n c e o f O b j e c t ) & & ( M = n e w p ( R ) ) , M . s t r e a m ( y ) } , u n p a r s e : f u n c t i o n ( y , R ) { v a r w = ! 1 , L = ! 0 , M = " , " , Z = ` \ r
` ,B='"',se=B+B,H=!1,I=null,Q=!1;(function(){if(typeof R=="object"){if(typeof R.delimiter!="string"||l.BAD_DELIMITERS.filter(function(ee){return R.delimiter.indexOf(ee)!==-1}).length||(M=R.delimiter),(typeof R.quotes=="boolean"||typeof R.quotes=="function"||Array.isArray(R.quotes))&&(w=R.quotes),typeof R.skipEmptyLines!="boolean"&&typeof R.skipEmptyLines!="string"||(H=R.skipEmptyLines),typeof R.newline=="string"&&(Z=R.newline),typeof R.quoteChar=="string"&&(B=R.quoteChar),typeof R.header=="boolean"&&(L=R.header),Array.isArray(R.columns)){if(R.columns.length===0)throw new Error("Option columns is empty");I=R.columns}R.escapeChar!==void 0&&(se=R.escapeChar+B),(typeof R.escapeFormulae=="boolean"||R.escapeFormulae instanceof RegExp)&&(Q=R.escapeFormulae instanceof RegExp?R.escapeFormulae:/^[=+ \- @ \t \r ].* $ /)}})();var re=new RegExp(E(B),"g");if(typeof y=="string"&&(y=JSON.parse(y)),Array.isArray(y)){if(!y.length||Array.isArray(y[0]))return X(null,y,H);if(typeof y[0]=="object")return X(I||Object.keys(y[0]),y,H)}else if(typeof y=="object")return typeof y.data=="string"&&(y.data=JSON.parse(y.data)),Array.isArray(y.data)&&(y.fields||(y.fields=y.meta&&y.meta.fields||I),y.fields||(y.fields=Array.isArray(y.data[0])?y.fields:typeof y.data[0]=="object"?Object.keys(y.data[0]):[]),Array.isArray(y.data[0])||typeof y.data[0]=="object"||(y.data=[y.data])),X(y.fields||[],y.data||[],H);throw new Error("Unable to serialize unrecognized input");function X(ee,be,Te){var fe="";typeof ee=="string"&&(ee=JSON.parse(ee)),typeof be=="string"&&(be=JSON.parse(be));var Ee=Array.isArray(ee)&&0<ee.length,z=!Array.isArray(be[0]);if(Ee&&L){for(var te=0;te<ee.length;te++)0<te&&(fe+=M),fe+=pe(ee[te],te);0<be.length&&(fe+=Z)}for(var Y=0;Y<be.length;Y++){var ue=Ee?ee.length:be[Y].length,ye=!1,O=Ee?Object.keys(be[Y]).length===0:be[Y].length===0;if(Te&&!Ee&&(ye=Te==="greedy"?be[Y].join("").trim()==="":be[Y].length===1&&be[Y][0].length===0),Te==="greedy"&&Ee){for(var N=[],F=0;F<ue;F++){var $ =z?ee[F]:F;N.push(be[Y][ $ ])}ye=N.join("").trim()===""}if(!ye){for(var W=0;W<ue;W++){0<W&&!O&&(fe+=M);var ie=Ee&&z?ee[W]:W;fe+=pe(be[Y][ie],W)}Y<be.length-1&&(!Te||0<ue&&!O)&&(fe+=Z)}}return fe}function pe(ee,be){if(ee==null)return"";if(ee.constructor===Date)return JSON.stringify(ee).slice(1,25);var Te=!1;Q&&typeof ee=="string"&&Q.test(ee)&&(ee="'"+ee,Te=!0);var fe=ee.toString().replace(re,se);return(Te=Te||w===!0||typeof w=="function"&&w(ee,be)||Array.isArray(w)&&w[be]||function(Ee,z){for(var te=0;te<z.length;te++)if(-1<Ee.indexOf(z[te]))return!0;return!1}(fe,l.BAD_DELIMITERS)||-1<fe.indexOf(M)||fe.charAt(0)===" "||fe.charAt(fe.length-1)===" ")?B+fe+B:fe}}};if(l.RECORD_SEP=String.fromCharCode(30),l.UNIT_SEP=String.fromCharCode(31),l.BYTE_ORDER_MARK=" \u FEFF",l.BAD_DELIMITERS=[" \r ", `
` ,'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!s&&!!r.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=b,l.ParserHandle=h,l.NetworkStreamer=_,l.FileStreamer=p,l.StringStreamer=g,l.ReadableStreamStreamer=f,r.jQuery){var u=r.jQuery;u.fn.parse=function(y){var R=y.config||{},w=[];return this.each(function(Z){if(!(u(this).prop("tagName").toUpperCase()==="INPUT"&&u(this).attr("type").toLowerCase()==="file"&&r.FileReader)||!this.files||this.files.length===0)return!0;for(var B=0;B<this.files.length;B++)w.push({file:this.files[B],inputElem:this,instanceConfig:u.extend({},R)})}),L(),this;function L(){if(w.length!==0){var Z,B,se,H,I=w[0];if(k(y.before)){var Q=y.before(I.file,I.inputElem);if(typeof Q=="object"){if(Q.action==="abort")return Z="AbortError",B=I.file,se=I.inputElem,H=Q.reason,void(k(y.error)&&y.error({name:Z},B,se,H));if(Q.action==="skip")return void M();typeof Q.config=="object"&&(I.instanceConfig=u.extend(I.instanceConfig,Q.config))}else if(Q==="skip")return void M()}var re=I.instanceConfig.complete;I.instanceConfig.complete=function(X){k(re)&&re(X,I.file,I.inputElem),M()},l.parse(I.file,I.instanceConfig)}else k(y.complete)&&y.complete()}function M(){w.splice(0,1),L()}}}function c(y){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},(function(R){var w=A(R);w.chunkSize=parseInt(w.chunkSize),R.step||R.chunk||(w.chunkSize=null),this._handle=new h(w),(this._handle.streamer=this)._config=w}).call(this,y),this.parseChunk=function(R,w){if(this.isFirstChunk&&k(this._config.beforeFirstChunk)){var L=this._config.beforeFirstChunk(R);L!==void 0&&(R=L)}this.isFirstChunk=!1,this._halted=!1;var M=this._partialLine+R;this._partialLine="";var Z=this._handle.parse(M,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var B=Z.meta.cursor;this._finished||(this._partialLine=M.substring(B-this._baseIndex),this._baseIndex=B),Z&&Z.data&&(this._rowCount+=Z.data.length);var se=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)r.postMessage({results:Z,workerId:l.WORKER_ID,finished:se});else if(k(this._config.chunk)&&!w){if(this._config.chunk(Z,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);Z=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(Z.data),this._completeResults.errors=this._completeResults.errors.concat(Z.errors),this._completeResults.meta=Z.meta),this._completed||!se||!k(this._config.complete)||Z&&Z.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),se||Z&&Z.meta.paused||this._nextChunk(),Z}this._halted=!0},this._sendError=function(R){k(this._config.error)?this._config.error(R):o&&this._config.error&&r.postMessage({workerId:l.WORKER_ID,error:R,finished:!1})}}function _(y){var R;(y=y||{}).chunkSize||(y.chunkSize=l.RemoteChunkSize),c.call(this,y),this._nextChunk=s?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(w){this._input=w,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(R=new XMLHttpRequest,this._config.withCredentials&&(R.withCredentials=this._config.withCredentials),s||(R.onload=x(this._chunkLoaded,this),R.onerror=x(this._chunkError,this)),R.open(this._config.downloadRequestBody?"POST":"GET",this._input,!s),this._config.downloadRequestHeaders){var w=this._config.downloadRequestHeaders;for(var L in w)R.setRequestHeader(L,w[L])}if(this._config.chunkSize){var M=this._start+this._config.chunkSize-1;R.setRequestHeader("Range","bytes="+this._start+"-"+M)}try{R.send(this._config.downloadRequestBody)}catch(Z){this._chunkError(Z.message)}s&&R.status===0&&this._chunkError()}},this._chunkLoaded=function(){R.readyState===4&&(R.status<200||400<=R.status
` ),K=1<D.length&&D[0].length<me[0].length;if(me.length===1||K)return `
` ;for(var G=0,q=0;q<me.length;q++)me[q][0]=== `
` &&G++;return G>=me.length/2? ` \ r
` :" \r "}(Y,O)),L=!1,y.delimiter)k(y.delimiter)&&(y.delimiter=y.delimiter(Y),ee.meta.delimiter=y.delimiter);else{var N=function( $ ,W,ie,me,D){var K,G,q,V;D=D||[","," ","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var ne=0;ne<D.length;ne++){var oe=D[ne],ge=0,J=0,le=0;q=void 0;for(var Se=new b({comments:me,delimiter:oe,newline:W,preview:10}).parse( $ ),Oe=0;Oe<Se.data.length;Oe++)if(ie&&Te(Se.data[Oe]))le++;else{var Le=Se.data[Oe].length;J+=Le,q!==void 0?0<Le&&(ge+=Math.abs(Le-q),q=Le):q=Le}0<Se.data.length&&(J/=Se.data.length-le),(G===void 0||ge<=G)&&(V===void 0||V<J)&&1.99<J&&(G=ge,K=oe,V=J)}return{successful:!!(y.delimiter=K),bestDelimiter:K}}(Y,y.newline,y.skipEmptyLines,y.comments,y.delimitersToGuess);N.successful?y.delimiter=N.bestDelimiter:(L=!0,y.delimiter=l.DefaultDelimiter),ee.meta.delimiter=y.delimiter}var F=A(y);return y.preview&&y.header&&F.preview++,R=Y,w=new b(F),ee=w.parse(R,ue,ye),fe(),re?{meta:{paused:!0}}:ee||{meta:{paused:!1}}},this.paused=function(){return re},this.pause=function(){re=!0,w.abort(),R=k(y.chunk)?"":R.substring(w.getCharIndex())},this.resume=function(){H.streamer._halted?(re=!1,H.streamer.parseChunk(R,!0)):setTimeout(H.resume,3)},this.aborted=function(){return X},this.abort=function(){X=!0,w.abort(),ee.meta.aborted=!0,k(y.complete)&&y.complete(ee),R=""}}function E(y){return y.replace(/[.*+?^ ${ } ()|[ \] \\ ]/g," \\ $ &")}function b(y){var R,w=(y=y||{}).delimiter,L=y.newline,M=y.comments,Z=y.step,B=y.preview,se=y.fastMode,H=R=y.quoteChar===void 0||y.quoteChar===null?'"':y.quoteChar;if(y.escapeChar!==void 0&&(H=y.escapeChar),(typeof w!="string"||-1<l.BAD_DELIMITERS.indexOf(w))&&(w=","),M===w)throw new Error("Comment character same as delimiter");M===!0?M="#":(typeof M!="string"||-1<l.BAD_DELIMITERS.indexOf(M))&&(M=!1),L!== `
` &&L!==" \r "&&L!== ` \ r
` &&(L= `
2023-10-27 23:36:53 +00:00
` );var I=0,Q=!1;this.parse=function(re,X,pe){if(typeof re!="string")throw new Error("Input must be a string");var ee=re.length,be=w.length,Te=L.length,fe=M.length,Ee=k(Z),z=[],te=[],Y=[],ue=I=0;if(!re)return Ge();if(y.header&&!X){var ye=re.split(L)[0].split(w),O=[],N={},F=!1;for(var $ in ye){var W=ye[ $ ];k(y.transformHeader)&&(W=y.transformHeader(W, $ ));var ie=W,me=N[W]||0;for(0<me&&(F=!0,ie=W+"_"+me),N[W]=me+1;O.includes(ie);)ie=ie+"_"+me;O.push(ie)}if(F){var D=re.split(L);D[0]=O.join(w),re=D.join(L)}}if(se||se!==!1&&re.indexOf(R)===-1){for(var K=re.split(L),G=0;G<K.length;G++){if(Y=K[G],I+=Y.length,G!==K.length-1)I+=L.length;else if(pe)return Ge();if(!M||Y.substring(0,fe)!==M){if(Ee){if(z=[],le(Y.split(w)),rt(),Q)return Ge()}else le(Y.split(w));if(B&&B<=G)return z=z.slice(0,B),Ge(!0)}}return Ge()}for(var q=re.indexOf(w,I),V=re.indexOf(L,I),ne=new RegExp(E(H)+E(R),"g"),oe=re.indexOf(R,I);;)if(re[I]!==R)if(M&&Y.length===0&&re.substring(I,I+fe)===M){if(V===-1)return Ge();I=V+Te,V=re.indexOf(L,I),q=re.indexOf(w,I)}else if(q!==-1&&(q<V||V===-1))Y.push(re.substring(I,q)),I=q+be,q=re.indexOf(w,I);else{if(V===-1)break;if(Y.push(re.substring(I,V)),Le(V+Te),Ee&&(rt(),Q))return Ge();if(B&&z.length>=B)return Ge(!0)}else for(oe=I,I++;;){if((oe=re.indexOf(R,oe+1))===-1)return pe||te.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:z.length,index:I}),Oe();if(oe===ee-1)return Oe(re.substring(I,oe).replace(ne,R));if(R!==H||re[oe+1]!==H){if(R===H||oe===0||re[oe-1]!==H){q!==-1&&q<oe+1&&(q=re.indexOf(w,oe+1)),V!==-1&&V<oe+1&&(V=re.indexOf(L,oe+1));var ge=Se(V===-1?q:Math.min(q,V));if(re.substr(oe+1+ge,be)===w){Y.push(re.substring(I,oe).replace(ne,R)),re[I=oe+1+ge+be]!==R&&(oe=re.indexOf(R,I)),q=re.indexOf(w,I),V=re.indexOf(L,I);break}var J=Se(V);if(re.substring(oe+1+J,oe+1+J+Te)===L){if(Y.push(re.substring(I,oe).replace(ne,R)),Le(oe+1+J+Te),q=re.indexOf(w,I),oe=re.indexOf(R,I),Ee&&(rt(),Q))return Ge();if(B&&z.length>=B)return Ge(!0);break}te.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:z.length,index:I}),oe++}}else oe++}return Oe();function le(Ze){z.push(Ze),ue=I}function Se(Ze){var et=0;if(Ze!==-1){var Xe=re.substring(oe+1,Ze);Xe&&Xe.trim()===""&&(et=Xe.length)}return et}function Oe(Ze){return pe||(Ze===void 0&&(Ze=re.substring(I)),Y.push(Ze),I=ee,le(Y),Ee&&rt()),Ge()}function Le(Ze){I=Ze,le(Y),Y=[],V=re.indexOf(L,I)}function Ge(Ze){return{data:z,errors:te,meta:{delimiter:w,linebreak:L,aborted:Q,truncated:!!Ze,cursor:ue+(X||0)}}}function rt(){Z(Ge()),z=[],te=[]}},this.abort=function(){Q=!0},this.getCharIndex=function(){return I}}function m(y){var R=y.data,w=i[R.workerId],L=!1;if(R.error)w.userError(R.error,R.file);else if(R.results&&R.results.data){var M={abort:function(){L=!0,S(R.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(k(w.userStep)){for(var Z=0;Z<R.results.data.length&&(w.userStep({data:R.results.data[Z],errors:R.results.errors,meta:R.results.meta},M),!L);Z++);delete R.results}else k(w.userChunk)&&(w.userChunk(R.results,M,R.file),delete R.results)}R.finished&&!L&&S(R.workerId,R.results)}function S(y,R){var w=i[y];k(w.userComplete)&&w.userComplete(R),w.terminate(),delete i[y]}function C(){throw new Error("Not implemented.")}function A(y){if(typeof y!="object"||y===null)return y;var R=Array.isArray(y)?[]:{};for(var w in y)R[w]=A(y[w]);return R}function x(y,R){return function(){y.apply(R,arguments)}}function k(y){return typeof y=="function"}return o&&(r.onmessage=function(y){var R=y.data;if(l.WORKER_ID===void 0&&R&&(l.WORKER_ID=R.workerId),typeof R.input=="string")r.postMessage({workerId:l.WORKER_ID,results:l.parse(R.input,R.config),finished:!0});else if(r.File&&R.input instanceof File||R.input instanceof Object){var w=l.parse(R.input,R.config);w&&r.postMessage({workerId:l.WORKER_ID,results:w,finished:!0})}}),(_.prototype=Object.create(c.prototype)).constructor=_,(p.prototype=Object.create(c.prototype)).constructor=p,(g.prototype=Object.create(g.prototype)).constructor=g,(f.prototype=Object.create(c.prototype)).constructor=f,
2023-10-23 23:40:39 +00:00
` +e.model.name+ `
2023-10-27 23:36:53 +00:00
installed ! ` ,4,!0),this. $ store.dispatch("refreshDiskUsage")}}else Ie.off("install_progress",r),console.log("Install failed"),e.installing=!1,this.showProgress=!1,console.error("Installation failed:",s.error),this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +e.model.name+ `
2023-10-27 23:36:53 +00:00
failed to install ! ` ,4,!1),this. $ store.dispatch("refreshDiskUsage");console.log("Here")};Ie.on("install_progress",r),Ie.emit("install_model",{path:n,type:e.model.type}),console.log("Started installation, please wait")},uploadAvatar(t){const e=t.target.files[0],n=new FormData;n.append("avatar",e),console.log("Uploading avatar"),xe.post("/upload_avatar",n).then(r=>{console.log("Avatar uploaded successfully"),this. $ refs.toast.showToast("Avatar uploaded successfully!",4,!0);const s=r.data.fileName;console.log("response",r),this.user_avatar=s,this.update_setting("user_avatar",s,()=>{}).then(()=>{})}).catch(r=>{console.error("Error uploading avatar:",r)})},async update_software(){console.log("Posting");const t=await this.api_get_req("update_software");console.log("Posting done"),t.status?this. $ refs.toast.showToast("Success!",4,!0):this. $ refs.toast.showToast("Failure!",4,!1)},on_loading_text(t){console.log("Loading text",t),this.loading_text=t},async load_everything(){for(this.isLoading=!0,ve(()=>{Ce.replace()});this.isReady===!1;)await new Promise(t=>setTimeout(t,100));console.log("Ready"),this.configFile.model_name&&(this.isModelSelected=!0),this.persCatgArr=await this.api_get_req("list_personalities_categories"),this.persArr=await this.api_get_req("list_personalities?category="+this.configFile.personality_category),console.log("category");try{this.extCatgArr=await this.api_get_req("list_extensions_categories"),console.log(this.extCatgArr)}catch{console.log("Couldn't list catergories"),this.extCatgArr=[]}try{this.extArr=await this.api_get_req("list_extensions?category="+this.extension_category)}catch{console.log("Couldn't list extensions"),this.extCatgArr=[]}console.log("models_zoo:"),console.log(this.models_zoo),this.personality_category=this.configFile.personality_category,this.personalitiesFiltered=this.personalities.filter(t=>t.category===this.configFile.personality_category),console.log("Extensions zoo"),console.log(this. $ store.state.extensionsZoo),this.modelsFiltered=this.models_zoo,this.extension_category=this.configFile.extension_category,this.extensionsFiltererd=this. $ store.state.extensionsZoo.filter(t=>t.category===this.configFile.extension_category),console.log("Extensions filtered"),console.log(this.extensionsFiltererd),this.isLoading=!1,this.isMounted=!0,this.extension_category=this.configFile.extension_category},async open_mzl(){this.mzl_collapsed=!this.mzl_collapsed,console.log("Fetching models")},async getVramUsage(){await this.api_get_req("vram_usage")},async progressListener(t){if(console.log("received something"),t.status==="progress"){if(this. $ refs.modelZoo){const e=this. $ refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(console.log("model entry",n),n.installing=!0,n.progress=t.progress,console.log( ` Progress = $ { t . progress } ` ),t.progress>=100&&(n.installing=!1,n.isInstalled=!0))}}else if(t.status==="succeeded"){if(console.log("Received succeeded"),console.log("Installed successfully"),this. $ refs.modelZoo){const e=this. $ refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(n.installing=!1,n.isInstalled=!0)}this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +model_object.name+ `
installed ! ` ,4,!0),this. $ store.dispatch("refreshDiskUsage")}else if(t.status==="failed"&&(console.log("Install failed"),this. $ refs.modelZoo)){const e=this. $ refs.modelZoo.findIndex(r=>r.model.name==t.model_name&&this.configFile.binding_name==t.binding_folder),n=this.models_zoo[e];n&&(n.installing=!1,n.isInstalled=!1),console.error("Installation failed:",t.error),this. $ refs.toast.showToast( ` Model :
` +model_object.name+ `
2023-10-27 23:36:53 +00:00
failed to install ! ` ,4,!1),this. $ store.dispatch("refreshDiskUsage")}},showAddModelDialog(){this. $ refs.addmodeldialog.showDialog("").then(()=>{console.log(this. $ refs.addmodeldialog.model_path);const t=this. $ refs.addmodeldialog.model_path;Ie.emit("install_model",{path:t,type:this.models_zoo[0].type},e=>{console.log("Model installation successful:",e)}),console.log(this. $ refs.addmodeldialog.model_path)})},closeAddModelDialog(){this.addModelDialogVisibility=!1},collapseAll(t){this.minconf_collapsed=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,this.sc_collapsed=t,this.mzdc_collapsed=t},fetchPersonalities(){this.api_get_req("list_personalities_categories").then(t=>{this.persCatgArr=t,this.persCatgArr.sort()}),this.api_get_req("list_personalities").then(t=>{this.persArr=t,this.persArr.sort(),console.log( ` Listed personalities :
2023-10-23 23:40:39 +00:00
$ { t } ` )})},fetchExtensions(){this.api_get_req("list_extensions_categories").then(t=>{this.extCatgArr=t,this.extCatgArr.sort()}),this.api_get_req("list_extensions").then(t=>{this.extArr=t,this.extArr.sort(),console.log( ` Listed extensions :
$ { t } ` )})},fetchHardwareInfos(){this. $ store.dispatch("refreshDiskUsage"),this. $ store.dispatch("refreshRamUsage")},async onPersonalitySelected(t){if(console.log("on pers",t),this.isLoading&&this. $ refs.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("selecting ",t),t){if(t.selected){this. $ refs.toast.showToast("Personality already selected",4,!0),this.isLoading=!1;return}if(t.isMounted&&this.configFile.personalities.includes(t.full_path)){const e=await this.select_personality(t);console.log("pers is mounted",e),e&&e.status&&e.active_personality_id>-1?this. $ refs.toast.showToast( ` Selected personality :
` +t.name,4,!0):this. $ refs.toast.showToast( ` Error on select personality :
` +t.name,4,!1),this.isLoading=!1}else console.log("mounting pers"),this.mountPersonality(t);ve(()=>{Ce.replace()})}},async onExtensionSelected(t){if(console.log("on ext",t),this.isLoading&&this. $ refs.toast.showToast("Loading... please wait",4,!1),this.isLoading=!0,console.log("extension",t),t){if(t.selected){this. $ refs.toast.showToast("Extension already selected",4,!0),this.isLoading=!1;return}if(t.isMounted&&this.configFile.extensions.includes(t.full_path)){const e=await this.select_extension(t);console.log("ext is mounted",e),e&&e.status&&e.active_personality_id>-1?this. $ refs.toast.showToast( ` Selected personality :
` +t.name,4,!0):this. $ refs.toast.showToast( ` Error on select personality :
` +t.name,4,!1),this.isLoading=!1}else console.log("mounting ext"),this.mountPersonality(t);ve(()=>{Ce.replace()})}},onSelected(t,e=!1){if(this.isLoading){this. $ refs.toast.showToast("Loading... please wait",4,!1);return}t&&(t.isInstalled?(this.configFile.model_name!=t.model.name||e)&&this.update_model(t.model.name).then(n=>{console.log("update_model",n),this.configFile.model_name=t.model.name,n.status?this.refreshModelsZoo().then(()=>{this.updateModelsZoo(),this. $ refs.toast.showToast( ` Selected model :
` +t.name,4,!0),ve(()=>{Ce.replace()})}):(this. $ refs.toast.showToast( ` Couldn ' t select model :
` +t.name,4,!1),ve(()=>{Ce.replace()})),this.settingsChanged=!0,this.isModelSelected=!0}):this. $ refs.toast.showToast( ` Model :
` +t.model.name+ `
is not installed ` ,4,!1),ve(()=>{Ce.replace()}))},onCopy(t){let e;t.model.isCustomModel?e= ` Model name : $ { t . name }
File size : $ { t . fileSize }
Manually downloaded model ` :e= ` Model name : $ { t . name }
File size : $ { t . fileSize }
Download : $ { "https://huggingface.co/" + t . quantizer + "/" + t . name }
License : $ { t . license }
Owner : $ { t . quantizer }
Website : $ { "https://huggingface.co/" + t . quantizer }
2023-10-27 23:36:53 +00:00
Description : $ { t . description } ` ,this. $ refs.toast.showToast("Copied model info to clipboard!",4,!0),navigator.clipboard.writeText(e.trim())},onCopyLink(t){this. $ refs.toast.showToast("Copied link to clipboard!",4,!0),navigator.clipboard.writeText("https://huggingface.co/"+t.model.quantizer+"/"+t.model.name)},onCopyPersonalityName(t){this. $ refs.toast.showToast("Copied name to clipboard!",4,!0),navigator.clipboard.writeText(t.name)},onCancelInstall(){const t=this.addModel;console.log("cancel install",t),this.modelDownlaodInProgress=!1,this.addModel={},Ie.emit("cancel_install",{model_name:t.model_name,binding_folder:t.binding_folder,model_url:t.model_url,patreon:model.patreon?model.patreon:"None"}),this. $ refs.toast.showToast("Model installation aborted",4,!1)},onInstall(t){this.variant_choices=t.model.variants,this.currenModelToInstall=t,console.log("variant_choices"),console.log(this.variant_choices),console.log(t),this.variantSelectionDialogVisible=!0},onCreateReference(){xe.post("/add_reference_to_local_model",{path:this.reference_path}).then(t=>{t.status?(this. $ refs.toast.showToast("Reference created",4,!0),this.refreshModelsZoo().then(()=>{this.updateModelsZoo()})):this. $ refs.toast.showToast("Couldn't create reference",4,!1)})},onInstallAddModel(){if(!this.addModel.url){this. $ refs.toast.showToast("Link is empty",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),Ie.off("install_progress",e),console.log("Installed successfully"),this.addModel={},this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +this.addModel.model_name+ `
2023-10-27 23:36:53 +00:00
installed ! ` ,4,!0),this. $ store.dispatch("refreshDiskUsage"))):(Ie.off("install_progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +this.addModel.model_name+ `
2023-10-27 23:36:53 +00:00
failed to install ! ` ,4,!1),this. $ store.dispatch("refreshDiskUsage"))};Ie.on("install_progress",e),Ie.emit("install_model",{path:t,type:this.models_zoo[0].type}),console.log("Started installation, please wait")},uploadLocalModel(){if(this.uploadData.length==0){this. $ refs.toast.showToast("No files to upload",4,!1);return}let t=this.addModel.url;this.addModel.progress=0,console.log("installing..."),console.log("value ",this.addModel.url),this.modelDownlaodInProgress=!0;const e=n=>{console.log("received something"),n.status&&n.progress<=100?(console.log("Progress",n),this.addModel=n,this.addModel.url=t,this.addModel.progress==100&&(this.modelDownlaodInProgress=!1,console.log("Received succeeded"),Ie.off("progress",e),console.log("Installed successfully"),this.addModel={},this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +this.addModel.model_name+ `
2023-10-27 23:36:53 +00:00
installed ! ` ,4,!0),this. $ store.dispatch("refreshDiskUsage"))):(Ie.off("progress",e),console.log("Install failed"),this.modelDownlaodInProgress=!1,console.error("Installation failed:",n.error),this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +this.addModel.model_name+ `
2023-10-27 23:36:53 +00:00
failed to install ! ` ,4,!1),this. $ store.dispatch("refreshDiskUsage"))};Ie.on("progress",e),console.log("Started installation, please wait")},setFileList(t){this.uploadData=t.target.files,console.log("set file list",this.uploadData)},onUninstall(t){this. $ refs.yesNoDialog.askQuestion( ` Are you sure you want to delete this model ?
[ ` +t.name+"]","Yes","Cancel").then(e=>{if(e){console.log("uninstalling model...");const n=r=>{console.log("uninstalling res",r),r.status?(console.log("uninstalling success",r),t.uninstalling=!1,Ie.off("install_progress",n),this.showProgress=!1,this.refreshModelsZoo().then(()=>{this.updateModelsZoo()}),this.modelsFiltered=this.models_zoo,this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +t.model.name+ `
2023-10-27 23:36:53 +00:00
was uninstalled ! ` ,4,!0),this. $ store.dispatch("refreshDiskUsage")):(console.log("uninstalling failed",r),t.uninstalling=!1,this.showProgress=!1,Ie.off("uninstall_progress",n),console.error("Uninstallation failed:",r.error),this. $ refs.toast.showToast( ` Model :
2023-10-23 23:40:39 +00:00
` +t.model.name+ `
2023-10-27 23:36:53 +00:00
failed to uninstall ! ` ,4,!1),this. $ store.dispatch("refreshDiskUsage"))};Ie.on("uninstall_progress",n),self.selected_variant!=null?Ie.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name+"/resolve/main/"+this.selected_variant.name,type:t.model.type}):Ie.emit("uninstall_model",{path:"https://huggingface.co/"+t.model.quantizer+"/"+t.model.name,type:t.model.type})}})},onSelectedBinding(t){if(console.log("Binding selected"),!t.binding.installed){this. $ refs.toast.showToast( ` Binding is not installed :
2023-10-24 21:07:04 +00:00
` +t.binding.name,4,!1);return}this.mzc_collapsed=!0,this.configFile.binding_name!=t.binding.folder&&this.update_binding(t.binding.folder)},onInstallBinding(t){this.configFile.binding_name!=t.binding.folder&&(t.disclaimer?(this. $ refs.yesNoDialog.askQuestion(t.disclaimer,"Proceed","Cancel"),res&&this.update_binding(t.binding.folder)):this.update_binding(t.binding.folder))},onUnInstallBinding(t){this.isLoading=!0,xe.post("/unInstall_binding",{name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("unInstall_binding",e),e.data.status?this. $ refs.toast.showToast("Reinstalled binding successfully!",4,!0):this. $ refs.toast.showToast("Could not reinstall binding",4,!1),e.data;this.isLoading=!1,t.isInstalled=False}).catch(e=>(this.isLoading=!1,this. $ refs.toast.showToast( ` Could not reinstall binding
` +e.message,4,!1),{status:!1}))},onReinstallBinding(t){this.isLoading=!0,xe.post("/reinstall_binding",{name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_binding",e),e.data.status?this. $ refs.toast.showToast("Reinstalled binding successfully!",4,!0):this. $ refs.toast.showToast("Could not reinstall binding",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this. $ refs.toast.showToast( ` Could not reinstall binding
` +e.message,4,!1),{status:!1}))},upgrade2GPU(){this.isLoading=!0;try{xe.get("/upgrade_to_gpu").then(t=>{this.isLoading=!1,t&&(t.status?(this. $ refs.toast.showToast("Upgraded to GPU",4,!0),this.configFile.enable_gpu=!0):this. $ refs.toast.showToast("Could not upgrade to GPU. Endpoint error: "+t.error,4,!1))})}catch(t){this.isLoading=!1,this. $ refs.toast.showToast("Could not open binding settings. Endpoint error: "+t.message,4,!1)}},onSettingsBinding(t){try{this.isLoading=!0,xe.get("/get_active_binding_settings").then(e=>{this.isLoading=!1,e&&(console.log("binding sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Binding settings - "+t.binding.name,"Save changes","Cancel").then(n=>{try{xe.post("/set_active_binding_settings",n).then(r=>{r&&r.data?(console.log("binding set with new settings",r.data),this. $ refs.toast.showToast("Binding settings updated successfully!",4,!0)):(this. $ refs.toast.showToast( ` Did not get binding settings responses .
2023-10-23 23:40:39 +00:00
` +r,4,!1),this.isLoading=!1)})}catch(r){this. $ refs.toast.showToast( ` Did not get binding settings responses .
2023-10-24 21:07:04 +00:00
Endpoint error : ` +r.message,4,!1),this.isLoading=!1}}):(this. $ refs.toast.showToast("Binding has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this. $ refs.toast.showToast("Could not open binding settings. Endpoint error: "+e.message,4,!1)}},onReloadBinding(t){this.isLoading=!0,xe.post("/reload_binding",{name:t.binding.folder}).then(e=>{if(e)return this.isLoading=!1,console.log("reload_binding",e),e.data.status?this. $ refs.toast.showToast("Binding reloaded successfully!",4,!0):this. $ refs.toast.showToast("Could not reinstall binding",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this. $ refs.toast.showToast( ` Could not reinstall binding
` +e.message,4,!1),{status:!1}))},onSettingsPersonality(t){try{this.isLoading=!0,xe.get("/get_active_personality_settings").then(e=>{this.isLoading=!1,e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Personality settings - "+t.personality.name,"Save changes","Cancel").then(n=>{try{xe.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this. $ refs.toast.showToast("Personality settings updated successfully!",4,!0)):(this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-23 23:40:39 +00:00
` +r,4,!1),this.isLoading=!1)})}catch(r){this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-24 21:07:04 +00:00
Endpoint error : ` +r.message,4,!1),this.isLoading=!1}}):(this. $ refs.toast.showToast("Personality has no settings",4,!1),this.isLoading=!1))})}catch(e){this.isLoading=!1,this. $ refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},onMessageBoxOk(){console.log("OK button clicked")},update_personality_category(t,e){this.personality_category=t,e()},update_extension_category(t,e){this.extension_category=t,e()},refresh(){console.log("Refreshing"),this. $ store.dispatch("refreshConfig").then(()=>{console.log(this.personality_category),this.api_get_req("list_personalities_categories").then(t=>{console.log("cats",t),this.persCatgArr=t,this.personalitiesFiltered=this.personalities.filter(e=>e.category===this.personality_category),this.personalitiesFiltered.sort()}),this.api_get_req("list_extensions_categories").then(t=>{console.log("cats",t),this.extCatgArr=t,this.extensionsFiltererd=this. $ store.state.extensionsZoo.filter(e=>e.category===this.extension_category),this.extensionsFiltererd.sort()})})},toggleAccordion(){this.showAccordion=!this.showAccordion},async update_setting(t,e,n){console.log("Updating setting",t,":",e),this.isLoading=!0;const r={setting_name:t,setting_value:e};let s=await xe.post("/update_setting",r);if(s)return this.isLoading=!1,console.log("update_setting",s),s.status?this. $ refs.toast.showToast( ` Setting updated successfully .
2023-10-23 23:40:39 +00:00
Don ' t forget to save to keep the setting permanently . ` ,4,!0):this. $ refs.toast.showToast( ` Setting update failed .
2023-10-24 21:07:04 +00:00
Please view the console for more details . ` ,4,!1),n!==void 0&&n(s),s.data;this.isLoading=!1},async refreshModelsZoo(){await this. $ store.dispatch("refreshModelsZoo"),console.log("ModelsZoo refreshed"),await this. $ store.dispatch("refreshModels"),console.log("Models refreshed")},async updateModelsZoo(){let t=this. $ store.state.modelsZoo;if(t.length==0)return;console.log("loading models_zoo",t);let e=t.findIndex(n=>n.name==this.configFile.model_name);e>0?this.imgModel=t[e].icon:this.imgModel=zn,console.log( ` REFRESHING models using sorting $ { this . sort _type } ` ),t.length>1?(this.sort_type==0?(t.sort((n,r)=>{const s=new Date(n.last_commit_time);return new Date(r.last_commit_time)-s}),console.log("Sorted")):this.sort_type==1?t.sort((n,r)=>r.rank-n.rank):this.sort_type==2?t.sort((n,r)=>n.name.localeCompare(r.name)):this.sort_type==3&&t.sort((n,r)=>n.name.localeCompare(r.name)),console.log("Sorted")):console.log("No sorting needed"),console.log("models_zoo"),t.forEach(n=>{n.name==this. $ store.state.config.model_name?n.selected=!0:n.selected=!1}),this.models_zoo=t,console.log("models_zoo"),console.log(this.models_zoo);for(let n=0;n<this. $ store.state.modelsArr.length;n++){const r=this. $ store.state.modelsArr[n];let s=this.models_zoo.findIndex(o=>o.name==r);if(s==-1)for(let o=0;o<this.models_zoo.length;o++){let i=this.models_zoo[o].variants;if(i!=null&&(s=i.findIndex(a=>a.name==r),s!=-1)){s=o,console.log( ` Found $ { r } at index $ { s } ` );break}}if(s==-1){let o={};o.name=r,o.icon="",o.isCustomModel=!0,o.isInstalled=!0,this.models_zoo.push(o)}else this.models_zoo[s].isInstalled=!0}this.models_zoo.sort((n,r)=>n.isInstalled&&!r.isInstalled?-1:!n.isInstalled&&r.isInstalled?1:0)},update_binding(t){this.isLoading=!0,console.log("updating binding_name"),this.update_setting("binding_name",t,async e=>{console.log("updated binding_name"),await this. $ store.dispatch("refreshConfig"),await this.refreshModelsZoo(),await this.updateModelsZoo();const n=this.bindingsArr.findIndex(s=>s.folder==t),r=this.bindingsArr[n];r&&(r.installed=!0),this.settingsChanged=!0,this.isLoading=!1,console.log("updating model"),this.update_model(null).then(()=>{}),ve(()=>{Ce.replace()})})},async update_model(t){t||(this.isModelSelected=!1),this.isLoading=!0;let e=await this.update_setting("model_name",t);return this.isLoading=!1,ve(()=>{Ce.replace()}),e},applyConfiguration(){this.isLoading=!0,xe.post("/apply_settings",{config:this.configFile}).then(t=>{this.isLoading=!1,t.data.status?(this. $ refs.toast.showToast("Configuration changed successfully.",4,!0),this.settingsChanged=!1):this. $ refs.toast.showToast("Configuration change failed.",4,!1),ve(()=>{Ce.replace()})})},save_configuration(){this.showConfirmation=!1,xe.post("/save_settings",{}).then(t=>{if(t)return t.status||this. $ refs.messageBox.showMessage("Error: Couldn't save settings!"),t.data}).catch(t=>(console.log(t.message,"save_configuration"),this. $ refs.messageBox.showMessage("Couldn't save settings!"),{status:!1}))},reset_configuration(){this. $ refs.yesNoDialog.askQuestion( ` Are you sure ?
This will delete all your configurations and get back to default configuration . ` ).then(t=>{t&&xe.post("/reset_settings",{}).then(e=>{if(e)return e.status?this. $ refs.messageBox.showMessage("Settings have been reset correctly"):this. $ refs.messageBox.showMessage("Couldn't reset settings!"),e.data}).catch(e=>(console.log(e.message,"reset_configuration"),this. $ refs.messageBox.showMessage("Couldn't reset settings!"),{status:!1}))})},async api_get_req(t){try{const e=await xe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - settings");return}},closeToast(){this.showToast=!1},async getPersonalitiesArr(){this.isLoading=!0,this.personalities=[];const t=await this.api_get_req("get_all_personalities"),e=this. $ store.state.config,n=Object.keys(t);for(let r=0;r<n.length;r++){const s=n[r],i=catdictionary[s].map(a=>{const l=e.personalities.includes(s+"/"+a.folder);let u={};return u=a,u.category=s,u.language=langkey,u.full_path=s+"/"+a.folder,u.isMounted=l,u});this.personalities.length==0?this.personalities=i:this.personalities=this.personalities.concat(i)}this.personalities.sort((r,s)=>r.name.localeCompare(s.name)),this.personalitiesFiltered=this.personalities.filter(r=>r.category===this.configFile.personality_category),this.personalitiesFiltered.sort(),console.log("per filtered",this.personalitiesFiltered),this.isLoading=!1},async filterPersonalities(){if(!this.searchPersonality){this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category),this.personalitiesFiltered.sort(),this.searchPersonalityInProgress=!1;return}const t=this.searchPersonality.toLowerCase(),e=this.personalities.filter(n=>{if(n.name&&n.name.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)||n.full_path&&n.full_path.toLowerCase().includes(t))return n});e.length>0?this.personalitiesFiltered=e.sort():(this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category),this.personalitiesFiltered.sort()),this.searchPersonalityInProgress=!1},async filterExtensions(){if(!this.searchExtension){this.personalitiesFiltered=this.extensions.filter(n=>n.category===this.extension_category),this.personalitiesFiltered.sort(),this.searchExtensionInProgress=!1;return}const t=this.searchExtension.toLowerCase(),e=this.personalities.filter(n=>{if(n.name&&n.name.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)||n.full_path&&n.full_path.toLowerCase().includes(t))return n});e.length>0?this.personalitiesFiltered=e.sort():(this.personalitiesFiltered=this.personalities.filter(n=>n.category===this.configFile.personality_category),this.personalitiesFiltered.sort()),this.searchExtensionInProgress=!1},async filterModels(){if(!this.searchModel){console.log("Searching model"),this.modelsFiltered=this.models_zoo,this.searchModelInProgress=!1;return}const t=this.searchModel.toLowerCase();this.is_loading_zoo=!0,console.log("filtering models");const e=this.models_zoo.filter(n=>{if(n.name&&n.name.toLowerCase().includes(t)||n.description&&n.description.toLowerCase().includes(t)||n.category&&n.category.toLowerCase().includes(t))return n});this.is_loading_zoo=!1,e.length>0?this.modelsFiltered=e:this.modelsFiltered=this.models_zoo,this.searchModelInProgress=!1},computedFileSize(t){return Xt(t)},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={language:t.language,category:t.category,folder:t.folder},n=await xe.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={language:t.language,category:t.category,folder:t.folder};try{const n=await xe.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const n={id:this.configFile.personalities.findIndex(r=>r=
2023-10-23 23:40:39 +00:00
` +t.personality.name,4,!0),this. $ store.dispatch("refreshMountedPersonalities")):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount personality
Error : ` +e.error+ `
Response :
` +e,4,!1)),this.isLoading=!1},async unmountPersonality(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality unmounted",4,!0);const n=this.personalities.findIndex(a=>a.full_path==t.full_path),r=this.personalitiesFiltered.findIndex(a=>a.full_path==t.full_path),s=this. $ refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,r>-1&&(this.personalitiesFiltered[r].isMounted=!1),s>-1&&(this. $ refs.personalitiesZoo[s].isMounted=!1),this. $ store.dispatch("refreshMountedPersonalities");const o=this.mountedPersArr[this.mountedPersArr.length-1];console.log(o,this.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
` +o.name,4,!0)}else this. $ refs.toast.showToast( ` Could not unmount personality
Error : ` +e.error,4,!1);this.isLoading=!1},async remountPersonality(t){await this.unmountPersonality(t),await this.mountPersonality(t)},async mountExtension(t){if(this.isLoading=!0,console.log("mount ext",t),!t)return;if(this.configFile.personalities.includes(t.extension.full_path)){this.isLoading=!1,this. $ refs.toast.showToast("Extension already mounted",4,!1);return}const e=await this.mount_extension(t.extension);console.log("mount_extension res",e),e&&e.status&&e.extensions.includes(t.extension.full_path)?(this.configFile.extensions=e.extensions,this. $ refs.toast.showToast("Extension mounted",4,!0),t.isMounted=!0,(await this.select_extensions(t.extensions)).status&&this. $ refs.toast.showToast( ` Selected extension :
` +t.extension.name,4,!0),this. $ store.dispatch("refreshMountedExtensions")):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount extension
Error : ` +e.error+ `
Response :
` +e,4,!1)),this.isLoading=!1},async unmountExtension(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Extension unmounted",4,!0);const n=this.personalities.findIndex(i=>i.full_path==t.full_path),r=this.personalitiesFiltered.findIndex(i=>i.full_path==t.full_path),s=this. $ refs.personalitiesZoo.findIndex(i=>i.full_path==t.full_path);console.log("ppp",this.personalities[n]),this.personalities[n].isMounted=!1,r>-1&&(this.personalitiesFiltered[r].isMounted=!1),s>-1&&(this. $ refs.personalitiesZoo[s].isMounted=!1),this. $ store.dispatch("refreshMountedPersonalities");const o=this.mountedPersArr[this.mountedPersArr.length-1];console.log(o,this.mountedPersArr.length)}else this. $ refs.toast.showToast( ` Could not unmount extension
2023-10-24 21:07:04 +00:00
Error : ` +e.error,4,!1);this.isLoading=!1},async remountExtension(t){await this.unmountExtension(t),await this.mountExtension(t)},onPersonalityReinstall(t){console.log("on reinstall ",t),this.isLoading=!0,xe.post("/reinstall_personality",{name:t.personality.path}).then(e=>{if(e)return this.isLoading=!1,console.log("reinstall_personality",e),e.data.status?this. $ refs.toast.showToast("Personality reinstalled successfully!",4,!0):this. $ refs.toast.showToast("Could not reinstall personality",4,!1),e.data;this.isLoading=!1}).catch(e=>(this.isLoading=!1,this. $ refs.toast.showToast( ` Could not reinstall personality
2023-10-23 23:40:39 +00:00
` +e.message,4,!1),{status:!1}))},personalityImgPlacehodler(t){t.target.src=ms},searchPersonality_func(){clearTimeout(this.searchPersonalityTimer),this.searchPersonality&&(this.searchPersonalityInProgress=!0,setTimeout(this.filterPersonalities,this.searchPersonalityTimerInterval))},searchModel_func(){clearTimeout(this.searchModelTimer),this.searchModel&&(this.searchModelInProgress=!0,setTimeout(this.filterModels,this.searchModelTimer))}},async mounted(){console.log("Getting voices"),this.getVoices(),this.updateModelsZoo(),console.log("Constructing"),this.load_everything()},activated(){},computed:{isReady:{get(){return this. $ store.state.ready}},audio_out_voice:{get(){return this. $ store.state.config.audio_out_voice},set(t){this. $ store.state.config.audio_out_voice=t}},audioLanguages(){return[{code:"en-US",name:"English (US)"},{code:"en-GB",name:"English (UK)"},{code:"es-ES",name:"Spanish (Spain)"},{code:"es-MX",name:"Spanish (Mexico)"},{code:"fr-FR",name:"French (France)"},{code:"fr-CA",name:"French (Canada)"},{code:"de-DE",name:"German (Germany)"},{code:"it-IT",name:"Italian (Italy)"},{code:"pt-BR",name:"Portuguese (Brazil)"},{code:"pt-PT",name:"Portuguese (Portugal)"},{code:"ru-RU",name:"Russian (Russia)"},{code:"zh-CN",name:"Chinese (China)"},{code:"ja-JP",name:"Japanese (Japan)"},{code:"ar-SA",name:"Arabic (Saudi Arabia)"},{code:"tr-TR",name:"Turkish (Turkey)"},{code:"ms-MY",name:"Malay (Malaysia)"},{code:"ko-KR",name:"Korean (South Korea)"},{code:"nl-NL",name:"Dutch (Netherlands)"},{code:"sv-SE",name:"Swedish (Sweden)"},{code:"da-DK",name:"Danish (Denmark)"},{code:"fi-FI",name:"Finnish (Finland)"},{code:"no-NO",name:"Norwegian (Norway)"},{code:"pl-PL",name:"Polish (Poland)"},{code:"el-GR",name:"Greek (Greece)"},{code:"hu-HU",name:"Hungarian (Hungary)"},{code:"cs-CZ",name:"Czech (Czech Republic)"},{code:"th-TH",name:"Thai (Thailand)"},{code:"hi-IN",name:"Hindi (India)"},{code:"he-IL",name:"Hebrew (Israel)"},{code:"id-ID",name:"Indonesian (Indonesia)"},{code:"vi-VN",name:"Vietnamese (Vietnam)"},{code:"uk-UA",name:"Ukrainian (Ukraine)"},{code:"ro-RO",name:"Romanian (Romania)"},{code:"bg-BG",name:"Bulgarian (Bulgaria)"},{code:"hr-HR",name:"Croatian (Croatia)"},{code:"sr-RS",name:"Serbian (Serbia)"},{code:"sk-SK",name:"Slovak (Slovakia)"},{code:"sl-SI",name:"Slovenian (Slovenia)"},{code:"et-EE",name:"Estonian (Estonia)"},{code:"lv-LV",name:"Latvian (Latvia)"},{code:"lt-LT",name:"Lithuanian (Lithuania)"},{code:"ka-GE",name:"Georgian (Georgia)"},{code:"hy-AM",name:"Armenian (Armenia)"},{code:"az-AZ",name:"Azerbaijani (Azerbaijan)"},{code:"kk-KZ",name:"Kazakh (Kazakhstan)"},{code:"uz-UZ",name:"Uzbek (Uzbekistan)"},{code:"kkj-CM",name:"Kako (Cameroon)"},{code:"my-MM",name:"Burmese (Myanmar)"},{code:"ne-NP",name:"Nepali (Nepal)"},{code:"si-LK",name:"Sinhala (Sri Lanka)"}]},configFile:{get(){return this. $ store.state.config},set(t){this. $ store.commit("setConfig",t)}},userName:{get(){return this. $ store.state.config.user_name},set(t){this. $ store.state.config.user_name=t}},user_avatar:{get(){return"/user_infos/"+this. $ store.state.config.user_avatar},set(t){this. $ store.state.config.user_avatar=t}},enable_gpu:{get(){return this. $ store.state.config.enable_gpu},set(t){this. $ store.state.config.enable_gpu=t}},auto_update:{get(){return this. $ store.state.config.auto_update},set(t){this. $ store.state.config.auto_update=t}},auto_speak:{get(){return this. $ store.state.config.auto_speak},set(t){this. $ store.state.config.auto_speak=t}},audio_pitch:{get(){return this. $ store.state.config.audio_pitch},set(t){this. $ store.state.config.audio_pitch=t}},audio_in_language:{get(){return this. $ store.state.config.audio_in_language},set(t){this. $ store.state.config.audio_in_language=t}},use_user_name_in_discussions:{get(){return this. $ store.state.config.use_user_name_in_discussions},set(t){this. $ store.state.config.use_user_name_in_discussions=t}},db_path:{get(){return this. $ store.state.config.db_path},set(t){this. $ store.state.config.db_path=t}},personalities:{get(){return this. $ store.state.personalities},set(t){this. $ store.commit("setPersonalities",t)}},mountedPe
You need to apply changes before you leave , or else . ` ,"Apply configuration","Cancel")&&this.applyConfiguration(),!1;if(!this.isModelSelected)return await this. $ refs.yesNoDialog.askQuestion( ` Did You forgot to select model ?
2023-10-27 23:36:53 +00:00
You need to select model before you leave , or else . ` ,"Ok","Cancel"),!1}},ae=t=>(hr("data-v-9abe6333"),t=t(),Er(),t),bWe={class:"container overflow-y-scroll flex flex-col shadow-lg p-10 pt-0 overflow-y-scroll w-full dark:bg-bg-dark scrollbar-thin scrollbar-track-bg-light-tone scrollbar-thumb-bg-light-tone-panel hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark-tone dark:scrollbar-thumb-bg-dark-tone-panel dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},SWe={class:"sticky top-0 z-10 flex flex-row mb-2 p-3 gap-3 w-full rounded-b-lg bg-bg-light-tone dark:bg-bg-dark-tone shadow-lg"},yWe={key:0,class:"flex gap-3 flex-1 items-center duration-75"},vWe=ae(()=>d("i",{"data-feather":"x"},null,-1)),TWe=[vWe],CWe=ae(()=>d("i",{"data-feather":"check"},null,-1)),RWe=[CWe],xWe={key:1,class:"flex gap-3 flex-1 items-center"},OWe=ae(()=>d("i",{"data-feather":"save"},null,-1)),AWe=[OWe],NWe=ae(()=>d("i",{"data-feather":"refresh-ccw"},null,-1)),wWe=[NWe],IWe=ae(()=>d("i",{"data-feather":"list"},null,-1)),DWe=[IWe],kWe={class:"flex gap-3 flex-1 items-center justify-end"},MWe=ae(()=>d("i",{"data-feather":"trash-2"},null,-1)),LWe=[MWe],PWe=ae(()=>d("i",{"data-feather":"refresh-ccw"},null,-1)),FWe=[PWe],UWe=ae(()=>d("i",{"data-feather":"arrow-up-circle"},null,-1)),BWe={key:0},GWe=ae(()=>d("i",{"data-feather":"alert-circle"},null,-1)),qWe=[GWe],YWe={class:"flex gap-3 items-center"},VWe={key:0,class:"flex gap-3 items-center"},zWe=ae(()=>d("p",{class:"text-red-600 font-bold"},"Apply changes:",-1)),HWe=ae(()=>d("i",{"data-feather":"check"},null,-1)), $ We=[HWe],WWe={key:1,role:"status"},KWe=ae(()=>d("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),QWe=ae(()=>d("span",{class:"sr-only"},"Loading...",-1)),jWe={class:"flex flex-col mb-2 rounded-lg bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-bg-light-tone-panel hover:dark:bg-bg-dark-tone-panel duration-150 shadow-lg"},ZWe={class:"flex flex-row p-3"},XWe=ae(()=>d("i",{"data-feather":"chevron-right"},null,-1)),JWe=[XWe],eKe=ae(()=>d("i",{"data-feather":"chevron-down"},null,-1)),tKe=[eKe],nKe=ae(()=>d("h3",{class:"text-lg font-semibold cursor-pointer select-none mr-2"}," System status",-1)),rKe=ae(()=>d("div",{class:"mr-2"},"|",-1)),sKe={class:"text-base font-semibold cursor-pointer select-none items-center"},oKe={class:"flex gap-2 items-center"},iKe={key:0},aKe={class:"flex gap-2 items-center"},lKe=["src"],cKe={class:"font-bold font-large text-lg"},dKe={key:1},uKe={class:"flex gap-2 items-center"},_Ke=["src"],pKe={class:"font-bold font-large text-lg"},mKe=ae(()=>d("i",{"data-feather":"cpu",title:"CPU Ram",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),gKe={class:"font-bold font-large text-lg"},fKe=ae(()=>d("i",{"data-feather":"hard-drive",title:"Hard drive",class:"w-5 h-5 mx-1 flex-shrink-0"},null,-1)),hKe={class:"font-bold font-large text-lg"},EKe={class:"mb-2"},bKe=ae(()=>d("label",{class:"flex items-center gap-1 ml-2 mb-2 text-sm font-medium text-gray-900 dark:text-whi
` ];let a=-1;return i.forEach(l=>{const u=o.lastIndexOf(l);u>a&&(a=u)}),a==-1&&(a=o.length),console.log(a),a+s+1},r=()=>{if(this.message.content.includes(".")){const s=n(t),o=this.message.content.substring(t,s);this.msg.text=o,t=s+1,this.msg.onend=i=>{t<this.message.content.length-2?setTimeout(()=>{r()},1):(this.isSpeaking=!1,console.log("voice off :",this.message.content.length," ",s))},this.speechSynthesis.speak(this.msg)}else setTimeout(()=>{r()},1)};r()},toggleModel(){this.expanded=!this.expanded},copyContentToClipboard(){this. $ emit("copy",this)},deleteMsg(){this. $ emit("delete",this.message.id),this.deleteMsgMode=!1},rankUp(){this. $ emit("rankUp",this.message.id)},rankDown(){this. $ emit("rankDown",this.message.id)},updateMessage(){this. $ emit("updateMessage",this.message.id,this.message.content),this.editMsgMode=!1},resendMessage(){this. $ emit("resendMessage",this.message.id,this.message.content)},continueMessage(){this. $ emit("continueMessage",this.message.id,this.message.content)},getImgUrl(){return this.avatar?(console.log("Avatar:",tS+this.avatar),tS+this.avatar):(console.log("No avatar found"),Ks)},defaultImg(t){t.target.src=Ks},parseDate(t){let e=new Date(Date.parse(t)),r=Math.floor((new Date-e)/1e3);return r<=1?"just now":r<20?r+" seconds ago":r<40?"half a minute ago":r<60?"less than a minute ago":r<=90?"one minute ago":r<=3540?Math.round(r/60)+" minutes ago":r<=5400?"1 hour ago":r<=86400?Math.round(r/3600)+" hours ago":r<=129600?"1 day ago":r<604800?Math.round(r/86400)+" days ago":r<=777600?"1 week ago":t},prettyDate(t){let e=new Date((t||"").replace(/-/g,"/").replace(/[TZ]/g," ")),n=(new Date().getTime()-e.getTime())/1e3,r=Math.floor(n/86400);if(!(isNaN(r)||r<0||r>=31))return r==0&&(n<60&&"just now"||n<120&&"1 minute ago"||n<3600&&Math.floor(n/60)+" minutes ago"||n<7200&&"1 hour ago"||n<86400&&Math.floor(n/3600)+" hours ago")||r==1&&"Yesterday"||r<7&&r+" days ago"||r<31&&Math.ceil(r/7)+" weeks ago"},checkForFullSentence(){if(this.message.content.trim().split(" ").length>3){this.speak();return}}},watch:{"message.content":function(t){this. $ store.state.config.auto_speak&&(this.isSpeaking||this.checkForFullSentence())},"message.ui":function(t){console.log("ui changed"),console.log(this.message_ui)},showConfirmation(){ve(()=>{Ce.replace()})},editMsgMode(t){ve(()=>{Ce.replace()})},deleteMsgMode(){ve(()=>{Ce.replace()})}},computed:{message_ui:{get(){return this.message.ui}},isTalking:{get(){return this.isSpeaking}},created_at(){return this.prettyDate(this.message.created_at)},created_at_parsed(){return new Date(Date.parse(this.message.created_at)).toLocaleString()},finished_generating_at_parsed(){return new Date(Date.parse(this.message.finished_generating_at)).toLocaleString()},time_spent(){const t=new Date(Date.parse(this.message.created_at)),e=new Date(Date.parse(this.message.finished_generating_at));if(e.getTime()===t.getTime()||!e.getTime())return;let r=e.getTime()-t.getTime();const s=Math.floor(r/(1e3*60*60));r-=s*(1e3*60*60);const o=Math.floor(r/(1e3*60));r-=o*(1e3*60);const i=Math.floor(r/1e3);r-=i*1e3;function a(u){return u<10&&(u="0"+u),u}return a(s)+"h:"+a(o)+"m:"+a(i)+"s"}}},ztt={class:"relative group rounded-lg m-2 shadow-lg hover:border-primary dark:hover:border-primary hover:border-solid hover:border-2 border-2 border-transparent even:bg-bg-light-discussion-odd dark:even:bg-bg-dark-discussion-odd flex flex-col flex-grow flex-wrap overflow-visible p-4 pb-2"},Htt={class:"flex flex-row gap-2"}, $ tt={class:"flex-shrink-0"},Wtt={class:"group/avatar"},Ktt=["src","data-popover-target"],Qtt={class:"flex flex-col w-full flex-grow-0"},jtt={class:"flex flex-row flex-grow items-start"},Ztt={class:"flex flex-col mb-2"},Xtt={class:"drop-shadow-sm text-lg text-opacity-95 font-bold grow"},Jtt=["title"],ent=d("div",{class:"flex-grow"},null,-1),tnt={class:"flex-row justify-end mx-2"},nnt={class:"invisible group-hover:visible flex flex-row"},rnt={key:0,class:"flex items-center duration-75"},snt=d("i",{"data-feather":"x"},null,-1),ont=[snt],int=d("i",{"data-feather":"check"},null,-1),ant=[int],lnt=d("i",{"data-feather":"edit"
` ,36)),[[De,n.message.content]]):U("",!0)]),n.message.metadata!==null?(v(),T("div",Mnt,[(v(!0),T(Ne,null,Be(n.message.metadata,(_,p)=>(v(),T("div",{key:"json-"+n.message.id+"-"+p,class:"json font-bold"},[he(u,{jsonFormText:_.title,jsonData:_.content},null,8,["jsonFormText","jsonData"])]))),128))])):U("",!0),n.message.ui!==null&&n.message.ui!==void 0&&n.message.ui!==""?(v(),nt(c,{key:2,class:"w-full h-full",code:o.message_ui},null,8,["code"])):U("",!0)]),d("div",Lnt,[d("div",Pnt,[n.message.binding?(v(),T("p",Fnt,[Re("Binding: "),d("span",Unt,j(n.message.binding),1)])):U("",!0),n.message.model?(v(),T("p",Bnt,[Re("Model: "),d("span",Gnt,j(n.message.model),1)])):U("",!0),n.message.seed?(v(),T("p",qnt,[Re("Seed: "),d("span",Ynt,j(n.message.seed),1)])):U("",!0),o.time_spent?(v(),T("p",Vnt,[Re("Time spent: "),d("span",{class:"font-thin",title:"Finished generating: "+o.finished_generating_at_parsed},j(o.time_spent),9,znt)])):U("",!0)])])])])])}const ET=qe(Vtt,[["render",Hnt]]), $ nt="/";xe.defaults.baseURL="/";const Wnt={name:"MountedPersonalities",props:{onShowPersList:Function,onReady:Function},components:{UniversalForm:Tp},data(){return{bUrl: $ nt,isMounted:!1,show:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activated(){this.isMounted&&await this.constructor()},computed:{configFile:{get(){return this. $ store.state.config},set(t){this. $ store.commit("setConfig",t)}},mountedPers:{get(){return this. $ store.state.mountedPers},set(t){this. $ store.commit("setMountedPers",t)}},personalities:{get(){return this. $ store.state.personalities},set(t){this. $ store.commit("setPersonalities",t)}},mountedPersArr:{get(){return this. $ store.state.mountedPersArr},set(t){this. $ store.commit("setMountedPers",t)}}},methods:{onSettingsPersonality(t){try{xe.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Personality settings - "+t.name,"Save changes","Cancel").then(n=>{try{xe.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this. $ refs.toast.showToast("Personality settings updated successfully!",4,!0)):this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-23 23:40:39 +00:00
` +r,4,!1)})}catch(r){this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-27 23:36:53 +00:00
Endpoint error : ` +r.message,4,!1)}}):this. $ refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this. $ refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},toggleShowPersList(){this.onShowPersList()},async constructor(){for(ve(()=>{Ce.replace()});this. $ store.state.ready===!1;)await new Promise(t=>setTimeout(t,100));this.onReady()},async api_get_req(t){try{const e=await xe.get("/"+t);if(e)return e.data}catch(e){console.log(e.message,"api_get_req - mountedPersonalities");return}},personalityImgPlacehodler(t){t.target.src=ms}}},Knt={class:"w-fit select-none"},Qnt={key:0,class:"flex -space-x-4"},jnt=["src","title"],Znt={key:1,class:"flex -space-x-4"},Xnt=["src","title"],Jnt={key:2,title:"Loading personalities"},ert=d("div",{role:"status"},[d("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),d("span",{class:"sr-only"},"Loading...")],-1),trt=[ert];function nrt(t,e,n,r,s,o){const i=Pe("UniversalForm");return v(),T(Ne,null,[d("div",Knt,[o.mountedPersArr.length>1?(v(),T("div",Qnt,[d("img",{src:s.bUrl+o.mountedPers.avatar,onError:e[0]||(e[0]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 hover:-translate-y-2 duration-150 border-secondary cursor-pointer",title:"Active personality: "+o.mountedPers.name,onClick:e[1]||(e[1]=a=>o.onSettingsPersonality(o.mountedPers))},null,40,jnt),d("div",{class:"flex items-center justify-center w-8 h-8 cursor-pointer text-xs font-medium bg-bg-light dark:bg-bg-dark border-2 hover:border-secondary rounded-full hover:bg-bg-light-tone dark:hover:bg-bg-dark-tone dark:border-gray-800 hover:z-20 hover:-translate-y-2 duration-150 active:scale-90",onClick:e[2]||(e[2]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"])),title:"Click to show more"},"+"+j(o.mountedPersArr.length-1),1)])):U("",!0),o.mountedPersArr.length==1?(v(),T("div",Znt,[d("img",{src:s.bUrl+this. $ store.state.mountedPers.avatar,onError:e[3]||(e[3]=(...a)=>o.personalityImgPlacehodler&&o.personalityImgPlacehodler(...a)),class:"w-8 h-8 rounded-full object-fill text-red-700 border-2 active:scale-90 hover:z-20 cursor-pointer border-secondary",title:"Active personality: "+this. $ store.state.mountedPers.name,onClick:e[4]||(e[4]=_e((...a)=>o.toggleShowPersList&&o.toggleShowPersList(...a),["stop"]))},null,40,Xnt)])):U("",!0),o.mountedPersArr.length==0?(v(),T("div",Jnt,trt)):U("",!0)]),he(i,{ref:"universalForm",class:"z-20"},null,512)],64)}const rrt=qe(Wnt,[["render",nrt]]);const srt="/";xe.defaults.baseURL="/";const ort={props:{onTalk:Function,onMounted:Function,onUnmounted:Function,onRemounted:Function,discussionPersonalities:Array,onShowPersList:Function},components:{PersonalityEntry:gT,Toast:ds,UniversalForm:Tp},name:"MountedPersonalitiesList",data(){return{bUrl:srt,isMounted:!1,isLoading:!1}},async mounted(){await this.constructor(),this.isMounted=!0},async activa
2023-10-23 23:40:39 +00:00
` +e.message,4,!1),{status:!1}))},onPersonalityMounted(t){this.mountPersonality(t)},onPersonalityUnMounted(t){this.unmountPersonality(t)},onPersonalityRemount(t){this.reMountPersonality(t)},async handleOnTalk(t){if(Ce.replace(),console.log("ppa",t),t){if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this. $ refs.toast.showToast( ` Selected personality :
` +t.name,4,!0))}else this.onPersonalityMounted(t);this.onTalk(t)}},async onPersonalitySelected(t){if(Ce.replace(),console.log("Selected personality : ",JSON.stringify(t.personality)),t){if(t.selected){this. $ refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted){const e=await this.select_personality(t);e&&e.status&&(await this.constructor(),this. $ refs.toast.showToast( ` Selected personality :
2023-10-24 21:07:04 +00:00
` +t.name,4,!0))}else this.onPersonalityMounted(t)}},onSettingsPersonality(t){try{xe.get("/get_active_personality_settings").then(e=>{e&&(console.log("pers sett",e),e.data&&Object.keys(e.data).length>0?this. $ refs.universalForm.showForm(e.data,"Personality settings - "+t.personality.name,"Save changes","Cancel").then(n=>{try{xe.post("/set_active_personality_settings",n).then(r=>{r&&r.data?(console.log("personality set with new settings",r.data),this. $ refs.toast.showToast("Personality settings updated successfully!",4,!0)):this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-23 23:40:39 +00:00
` +r,4,!1)})}catch(r){this. $ refs.toast.showToast( ` Did not get Personality settings responses .
2023-10-24 21:07:04 +00:00
Endpoint error : ` +r.message,4,!1)}}):this. $ refs.toast.showToast("Personality has no settings",4,!1))})}catch(e){this. $ refs.toast.showToast("Could not open personality settings. Endpoint error: "+e.message,4,!1)}},async mount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={category:t.category,folder:t.folder,language:t.language},n=await xe.post("/mount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"mount_personality - settings");return}},async remount_personality(t){if(!t)return{status:!1,error:"no personality - mount_personality"};try{const e={category:t.category,folder:t.folder,language:t.language},n=await xe.post("/remount_personality",e);if(n)return n.data}catch(e){console.log(e.message,"remount_personality - settings");return}},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={category:t.category,folder:t.folder,language:t.language};try{const n=await xe.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};let e=-1;if(console.log("Personality full path : ",t.full_path),console.log("Personality language : ",t.personality.language),t.personality.language!=null&&t.personality.language!=null?(console.log("Mounting a localized version of personality"),console.log("Mounted personalities :",JSON.stringify(this.configFile.personalities)),console.log("Personality to select: ",t.full_path+":"+t.personality.language),e=this.configFile.personalities.findIndex(n=>n===t.full_path+":"+t.personality.language)):(console.log("Mounted personalities :",JSON.stringify(this.configFile.personalities)),e=this.configFile.personalities.findIndex(n=>n===t.full_path)),e>-1){console.log("Selecting personality with id:",JSON.stringify(e));const n={id:e};try{const r=await xe.post("/select_personality",n);if(r)return this. $ store.dispatch("refreshConfig").then(()=>{console.log("recovered config",this.configFile.active_personality_id),this. $ store.dispatch("refreshPersonalitiesZoo").then(()=>{this. $ store.dispatch("refreshMountedPersonalities")})}),r.data}catch(r){console.log(r,"select_personality - settings");return}}else return console.log("Personality id is wrong"),this. $ refs.toast.showToast("Personality id is wrong!",4,!1),{status:!1,error:"Personality id is wrong"}},async mountPersonality(t){if(console.log("mount pers",t),!t)return;if(this.configFile.personalities.includes(t.personality.full_path)){this. $ refs.toast.showToast("Personality already mounted",4,!1);return}const e=await this.mount_personality(t.personality);console.log("mount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality mounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
2023-10-23 23:40:39 +00:00
` +t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount personality
Error : ` +e.error,4,!1))},async reMountPersonality(t){if(console.log("remount pers",t),!t)return;if(!this.configFile.personalities.includes(t.personality.full_path)){this. $ refs.toast.showToast("Personality not mounted",4,!1);return}const e=await this.remount_personality(t.personality);console.log("remount_personality res",e),e.status?(this.configFile.personalities=e.personalities,this. $ refs.toast.showToast("Personality remounted",4,!0),t.isMounted=!0,this.onMounted(this),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
` +t.personality.name,4,!0),this.getMountedPersonalities()):(t.isMounted=!1,this. $ refs.toast.showToast( ` Could not mount personality
Error : ` +e.error,4,!1))},async unmountPersonality(t){if(!t)return;console.log( ` Unmounting $ { JSON . stringify ( t . personality ) } ` );const e=await this.unmount_personality(t.personality);if(e.status){console.log("unmount response",e),this.configFile.active_personality_id=e.active_personality_id,this.configFile.personalities=e.personalities;const n=this.configFile.personalities[this.configFile.active_personality_id],r=this.personalities.findIndex(a=>a.full_path==n),s=this. $ refs.personalitiesZoo.findIndex(a=>a.full_path==t.full_path),o=this.personalities[r];o.isMounted=!1,o.selected=!0,this. $ refs.personalitiesZoo[s].isMounted=!1,this.getMountedPersonalities(),(await this.select_personality(o)).status&&Ce.replace(),this. $ refs.toast.showToast("Personality unmounted",4,!0),this.onUnMounted(this)}else this. $ refs.toast.showToast( ` Could not unmount personality
2023-10-27 23:36:53 +00:00
Error : ` +e.error,4,!1)},getMountedPersonalities(){this.isLoading=!0;let t=[];console.log(this.configFile.personalities.length);for(let e=0;e<this.configFile.personalities.length;e++){const n=this.configFile.personalities[e],r=this.personalities.findIndex(o=>o.full_path==n),s=this.personalities[r];if(s)console.log("adding from config"),t.push(s);else{console.log("adding default");const o=this.personalities.findIndex(a=>a.full_path=="english/generic/lollms"),i=this.personalities[o];t.push(i)}}if(this.mountedPersArr=[],this.mountedPersArr=t,console.log("discussionPersonalities",this.discussionPersonalities),this.discussionPersonalities!=null&&this.discussionPersonalities.length>0)for(let e=0;e<this.discussionPersonalities.length;e++){const n=this.discussionPersonalities[e];console.log("discussionPersonalities - per",n);const r=this.mountedPersArr.findIndex(s=>s.full_path==n);if(console.log("discussionPersonalities -includes",r),console.log("discussionPersonalities -mounted list",this.mountedPersArr),r==-1){const s=this.personalities.findIndex(i=>i.full_path==n),o=this.personalities[s];console.log("adding discucc121",o,n),o&&(this.mountedPersArr.push(o),console.log("adding discucc",o))}}this.isLoading=!1,console.log("getMountedPersonalities",this.mountedPersArr),console.log("fig",this.configFile)}}},Rp=t=>(hr("data-v-d16a58b9"),t=t(),Er(),t),irt={class:"text-left overflow-visible text-base font-semibold cursor-pointer select-none items-center flex flex-col flex-grow w-full overflow-x-auto scrollbar-thin scrollbar-track-bg-light scrollbar-thumb-bg-light-tone hover:scrollbar-thumb-primary dark:scrollbar-track-bg-dark dark:scrollbar-thumb-bg-dark-tone dark:hover:scrollbar-thumb-primary active:scrollbar-thumb-secondary"},art={key:0,role:"status",class:"flex justify-center overflow-y-hidden"},lrt=Rp(()=>d("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})],-1)),crt=Rp(()=>d("span",{class:"sr-only"},"Loading...",-1)),drt=[lrt,crt],urt=Rp(()=>d("i",{"data-feather":"chevron-down"},null,-1)),_rt=[urt],prt={class:"block my-2 text-sm font-medium text-gray-900 dark:text-white"},mrt={class:"overflow-y-auto no-scrollbar pb-0 grid lg:grid-cols-3 md:grid-cols-2 gap-4 max-h-96"};function grt(t,e,n,r,s,o){const i=Pe("personality-entry"),a=Pe("Toast"),l=Pe("UniversalForm");return v(),T("div",irt,[s.isLoading?(v(),T("div",art,drt)):U("",!0),d("div",null,[o.mountedPersArr.length>0?(v(),T("div",{key:0,class:Ae(s.isLoading?"pointer-events-none opacity-30 cursor-default":"")},[d("button",{class:"mt-0 w-full text-2xl hover:text-secondary duration-75 flex justify-center hover:bg-bg-light-tone hover:dark:bg-bg-dark-tone rounded-lg",title:"Close personality list",type:"button",onClick:e[0]||(e[0]=_e((...u)=>o.toggleShowPersList&&o.toggleShowPersList(...u),["stop"]))},_rt),d("label",prt," Mounted Personalities: ("+j(o.mountedPersArr.length)+") ",1),d("div",mrt,[he(gn,{name:"bounce"},{default:ke(()=>[(v(!0),T(Ne,null,Be(this. $ store.state.mountedPersArr,(u,c
` +r.error,4,!1),this.loading=!1,Ie.off("file_received")}),Ie.emit("send_file",n)},e.readAsDataURL(this.selectedFile)},async constructor(){nextTick(()=>{Ce.replace()})},toggleMenu(){this.showMenu=!this.showMenu},execute_cmd(t){this.showMenu=!this.showMenu,t.hasOwnProperty("is_file")?(console.log("Need to send a file."),this.selectFile(t.hasOwnProperty("file_types")?t.file_types:"*",()=>{this.selectedFile!=null&&this.uploadFile()})):this.sendCommand(t.value)},handleClickOutside(t){const e=this. $ el.querySelector(".commands-menu-items-wrapper");e&&!e.contains(t.target)&&(this.showMenu=!1)}},mounted(){this.commands=this.commandsList,document.addEventListener("click",this.handleClickOutside)},beforeUnmount(){document.removeEventListener("click",this.handleClickOutside)}},Ert=t=>(hr("data-v-52cfa09c"),t=t(),Er(),t),brt={key:0,title:"Loading..",class:"flex flex-row flex-grow justify-end"},Srt=Ert(()=>d("div",{role:"status"},[d("svg",{"aria-hidden":"true",class:"w-6 h-6 animate-spin fill-secondary",viewBox:"0 0 100 101",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[d("path",{d:"M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z",fill:"currentColor"}),d("path",{d:"M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z",fill:"currentFill"})]),d("span",{class:"sr-only"},"Loading...")],-1)),yrt=[Srt];function vrt(t,e,n,r,s,o){const i=Pe("InteractiveMenu");return s.loading?(v(),T("div",brt,yrt)):(v(),nt(i,{key:1,commands:n.commandsList,execute_cmd:o.execute_cmd},null,8,["commands","execute_cmd"]))}const Trt=qe(hrt,[["render",vrt],["__scopeId","data-v-52cfa09c"]]);console.log("modelImgPlaceholder:",zn);const Crt="/",Rrt={name:"ChatBox",emits:["messageSentEvent","stopGenerating","loaded","createEmptyMessage"],props:{onTalk:Function,discussionList:Array,loading:!1,onShowToastMessage:Function},components:{Toast:ds,MountedPersonalities:rrt,MountedPersonalitiesList:frt,PersonalitiesCommands:Trt,InteractiveMenu:lo},setup(){},data(){return{modelImgPlaceholder:zn,bUrl:Crt,message:"",selecting_model:!1,selectedModel:"",isLesteningToVoice:!1,filesList:[],isFileSentList:[],totalSize:0,showfilesList:!0,showPersonalities:!1,personalities_ready:!1,models_menu_icon:""}},computed:{config(){return this. $ store.state.config},mountedPers(){return this. $ store.state.mountedPers},allDiscussionPersonalities(){if(this.discussionList.length>0){let t=[];for(let e=0;e<this.discussionList.length;e++)!t.includes(this.discussionList[e].personality)&&!this.discussionList[e].personality==""&&t.push(this.discussionList[e].personality);return console.log("conputer pers",t),console.log("dis conputer pers",this.discussionList),t}}},methods:{showModelConfig(){},async unmountPersonality(t){if(this.isLoading=!0,!t)return;const e=await this.unmount_personality(t.personality||t);if(e.status){this. $ store.state.config.personalities=e.personalities,this. $ refs.toast.showToast("Personality unmounted",4,!0),this. $ store.dispatch("refreshMountedPersonalities");const n=this. $ store.state.mountedPersArr[this. $ store.state.mountedPersArr.length-1];console.log(n,this. $ store.state.mountedPersArr.length),(await this.select_personality(t.personality)).status&&this. $ refs.toast.showToast( ` Selected personality :
2023-10-23 23:40:39 +00:00
` +n.name,4,!0)}else this. $ refs.toast.showToast( ` Could not unmount personality
2023-10-24 21:07:04 +00:00
Error : ` +e.error,4,!1);this.isLoading=!1},async unmount_personality(t){if(!t)return{status:!1,error:"no personality - unmount_personality"};const e={language:t.language,category:t.category,folder:t.folder};try{const n=await xe.post("/unmount_personality",e);if(n)return n.data}catch(n){console.log(n.message,"unmount_personality - settings");return}},async onPersonalitySelected(t){if(console.log("on pers",t),console.log("selecting ",t),t){if(t.selected){this. $ refs.toast.showToast("Personality already selected",4,!0);return}if(t.isMounted&&this. $ store.state.config.personalities.includes(t.full_path)){const e=await this.select_personality(t);console.log("pers is mounted",e),e&&e.status&&e.active_personality_id>-1?this. $ refs.toast.showToast( ` Selected personality :
2023-10-23 23:40:39 +00:00
` +t.name,4,!0):this. $ refs.toast.showToast( ` Error on select personality :
2023-10-27 23:36:53 +00:00
` +t.name,4,!1)}else console.log("mounting pers"),this.mountPersonality(t);ve(()=>{Ce.replace()})}},async select_personality(t){if(!t)return{status:!1,error:"no personality - select_personality"};const n={id:this. $ store.state.config.personalities.findIndex(r=>r===t.full_path)};try{const r=await xe.post("/select_personality",n);if(r)return this. $ store.dispatch("refreshConfig").then(()=>{this. $ store.dispatch("refreshPersonalitiesZoo").then(()=>{this. $ store.dispatch("refreshMountedPersonalities")})}),r.data}catch(r){console.log(r.message,"select_personality - settings");return}},emitloaded(){this. $ emit("loaded")},showModels(t){t.preventDefault();const e=this. $ refs.modelsSelectionList;console.log(e);const n=new MouseEvent("click");e.dispatchEvent(n)},setModel(t){console.log("Setting model to "+t.name),this.selecting_model=!0,this.selectedModel=t,xe.post("/update_setting",{setting_name:"model_name",setting_value:t.name}).then(async e=>{console.log(e),await this. $ store.dispatch("refreshModels"),await this. $ store.dispatch("refreshConfig"),this. $ refs.toast.showToast( ` Model changed to $ { t . name } ` ,4,!0),this.selecting_model=!1}).catch(e=>{this. $ refs.toast.showToast( ` Error $ { e } ` ,4,!0),this.selecting_model=!1})},clear_files(){xe.get("/clear_personality_files_list").then(t=>{t.data.status?console.log("Files removed"):console.log("Files couldn't be removed")}),this.filesList=[],this.isFileSentList=[]},send_file(t,e){const n=new FileReader,r=24*1024;let s=0,o=0;n.onloadend=()=>{if(n.error){console.error("Error reading file:",n.error);return}const a=n.result,l=s+a.byteLength>=t.size;Ie.emit("send_file_chunk",{filename:t.name,chunk:a,offset:s,isLastChunk:l,chunkIndex:o}),s+=a.byteLength,o++,l?(console.log("File sent successfully"),this.isFileSentList[this.filesList.length-1]=!0,console.log(this.isFileSentList),this.onShowToastMessage("File uploaded successfully",4,!0),e()):i()};function i(){const a=t.slice(s,s+r);n.readAsArrayBuffer(a)}console.log("Uploading file"),i()},makeAnEmptyMessage(){this. $ emit("createEmptyMessage")},startSpeechRecognition(){"SpeechRecognition"in window||"webkitSpeechRecognition"in window?(this.recognition=new(window.SpeechRecognition||window.webkitSpeechRecognition),this.recognition.lang=this. $ store.state.config.audio_in_language,this.recognition.interimResults=!0,this.recognition.onstart=()=>{this.isLesteningToVoice=!0,this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onresult=t=>{let e="";for(let n=t.resultIndex;n<t.results.length;n++)e+=t.results[n][0].transcript;this.message=e,clearTimeout(this.silenceTimer),this.silenceTimer=setTimeout(()=>{this.recognition.stop()},this.silenceTimeout)},this.recognition.onerror=t=>{console.error("Speech recognition error:",t.error),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer)},this.recognition.onend=()=>{console.log("Speech recognition ended."),this.isLesteningToVoice=!1,clearTimeout(this.silenceTimer),this.submit()},this.recognition.start()):console.error("Speech recognition is not supported in this browser.")},onPersonalitiesReadyFun(){this.personalities_ready=!0},onShowPersListFun(t){this.showPersonalities=!this.showPersonalities},handleOnTalk(t){this.showPersonalities=!1,this.onTalk(t)},onMountFun(t){console.log("Mounting personality"),this. $ refs.mountedPers.constructor()},onUnmountFun(t){console.log("Unmounting personality"),this. $ refs.mountedPers.constructor()},onRemount(t){console.log("Remounting chat"),this. $ refs.mountedPers.constructor()},computedFileSize(t){return ve(()=>{Ce.replace()}),Xt(t)},removeItem(t){this.filesList=this.filesList.filter(e=>e!=t)},sendMessageEvent(t){this.filesList=[],this. $ emit("messageSentEvent",t)},submitOnEnter(t){t.which===13&&(t.preventDefault(),t.repeat||(this.sendMessageEvent(this.message),this.message=""))},submit(){this.message&&(this.sendMessageEvent(this.message),this.message="")},stopGenerating(){this. $ emit("stopGenerating")},addFiles(t){console.log("Adding files");const e=[...t.target.files];let n=0;const r=()=>{if(n>=e.length){console.log( ` Files _list : $ { this . filesList
2023-10-23 23:40:39 +00:00
\ r
\ r
2023-10-27 23:36:53 +00:00
` ,544),[[De,s.message]]),d("input",{type:"file",ref:"fileDialog",style:{display:"none"},onChange:e[9]||(e[9]=(...c)=>o.addFiles&&o.addFiles(...c)),multiple:""},null,544),d("button",{type:"button",onClick:e[10]||(e[10]=_e(c=>t. $ refs.fileDialog.click(),["stop"])),title:"Add files",class:"absolute inset-y-0 right-0 flex items-center mr-2 w-6 hover:text-secondary duration-75 active:scale-90"},Tst)]),d("div",Cst,[d("button",{type:"button",onClick:e[11]||(e[11]=(...c)=>o.startSpeechRecognition&&o.startSpeechRecognition(...c)),class:Ae([{"text-red-500":s.isLesteningToVoice},"w-6 hover:text-secondary duration-75 active:scale-90 cursor-pointer"])},xst,2),n.loading?U("",!0):(v(),T("button",{key:0,type:"button",onClick:e[12]||(e[12]=(...c)=>o.makeAnEmptyMessage&&o.makeAnEmptyMessage(...c)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},Nst)),n.loading?U("",!0):(v(),T("button",{key:1,type:"button",onClick:e[13]||(e[13]=(...c)=>o.submit&&o.submit(...c)),class:"w-6 hover:text-secondary duration-75 active:scale-90"},Dst)),n.loading?(v(),T("div",kst,Lst)):U("",!0)])])])])])]),he(u,{ref:"toast"},null,512)],64)}const bT=qe(Rrt,[["render",Pst],["__scopeId","data-v-358087cd"]]),Fst={name:"WelcomeComponent",setup(){return{}}},Ust={class:"flex flex-col text-center"},Bst=G_('<div class="flex flex-col text-center items-center"><div class="flex items-center gap-3 text-5xl drop-shadow-md align-middle pt-24"><img class="w-24 animate-bounce" title="LoLLMS WebUI" src="'+Ks+'" alt="Logo"><div class="flex flex-col items-start"><p class="text-2xl">Lord of Large Language Models</p><p class="text-gray-400 text-base">One tool to rule them all</p></div></div><hr class="mt-1 w-96 h-1 mx-auto my-2 md:my-2 dark:bg-bg-dark-tone-panel bg-bg-light-tone-panel border-0 rounded"><p class="text-2xl">Welcome</p><p class="text-lg">Please create a new discussion or select existing one to start</p></div>',1),Gst=[Bst];function qst(t,e,n,r,s,o){return v(),T("div",Ust,Gst)}const ST=qe(Fst,[["render",qst]]);const Yst={setup(){return{}},name:"DragDrop",emits:["panelLeave","panelDrop"],data(){return{fileList:[],show:!1,dropRelease:!1}},mounted(){ve(()=>{Ce.replace()})},methods:{async panelDrop(t){const e="getAsFileSystemHandle"in DataTransferItem.prototype,n="webkitGetAsEntry"in DataTransferItem.prototype;if(!e&&!n)return;const r=[...t.dataTransfer.items].filter(o=>o.kind==="file").map(o=>e?o.getAsFileSystemHandle():o.webkitGetAsEntry());let s=[];for await(const o of r)(o.kind==="directory"||o.isDirectory)&&s.push(o.name);this.dropRelease=!0,t.dataTransfer.files.length>0&&[...t.dataTransfer.files].forEach(o=>{s.includes(o.name)||this.fileList.push(o)}),ve(()=>{Ce.replace()}),this. $ emit("panelDrop",this.fileList),this.fileList=[],this.show=!1},panelLeave(){this. $ emit("panelLeave"),console.log("exit/leave"),this.dropRelease=!1,this.show=!1,ve(()=>{Ce.replace()})}}},Vst={class:"text-4xl text-center"};function zst(t,e,n,r,s,o){return v(),nt(gn,{name:"list",tag:"div"},{default:ke(()=>[s.show?(v(),T("div",{key:"dropmenu",class:"select-none text-slate-50 absolute top-0 left-0 right-0 bottom-0 flex flex-col items-center justify-center bg-black bg-opacity-50 duration-200 backdrop-blur-sm",onDragleave:e[0]||(e[0]=_e(i=>o.panelLeave(i),["prevent"])),onDrop:e[1]||(e[1]=_e(i=>o.panelDrop(i),["stop","prevent"]))},[d("div",{class:Ae(["flex flex-col items-center justify-center p-8 rounded-lg shadow-lg border-dashed border-4 border-secondary w-4/5 h-4/5",s.dropRelease?"":"pointer-events-none"])},[d("div",Vst,[si(t. $ slots,"default",{},()=>[Re(" Drop your files here ")])])],2)],32)):U("",!0)]),_:3})}const g_=qe(Yst,[["render",zst]]);var Hst=function(){function t(e,n){n===void 0&&(n=[]),this._eventType=e,this._eventFunctions=n}return t.prototype.init=function(){var e=this;this._eventFunctions.forEach(function(n){typeof window<"u"&&window.addEventListener(e._eventType,n)})},t}(),mi=globalThis&&globalThis.__assign||function(){return mi=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var s in e)Object.prototype.has
2023-10-23 23:40:39 +00:00
Personality : $ { t . message . personality } ` );let r="";t.created_at_parsed&&(r= `
Created : $ { t . created _at _parsed } ` );let s="";t.message.content&&(s=t.message.content);let o="";t.message.model&&(o= ` Model : $ { t . message . model } ` );let i="";t.message.seed&&(i= ` Seed : $ { t . message . seed } ` );let a="";t.time_spent&&(a= `
Time spent : $ { t . time _spent } ` );let l="";l= ` $ { e } $ { o } $ { i } $ { a } ` .trim();const u= ` $ { t . message . sender } $ { n } $ { r }
$ { s }
$ { l } ` ;navigator.clipboard.writeText(u),ve(()=>{Ce.replace()})},closeToast(){this.showToast=!1},saveJSONtoFile(t,e){e=e||"data.json";const n=document.createElement("a");n.href=URL.createObjectURL(new Blob([JSON.stringify(t,null,2)],{type:"text/plain"})),n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n)},parseJsonObj(t){try{return JSON.parse(t)}catch(e){return this. $ refs.toast.showToast( ` Could not parse JSON .
` +e.message,4,!1),null}},async parseJsonFile(t){return new Promise((e,n)=>{const r=new FileReader;r.onload=s=>e(this.parseJsonObj(s.target.result)),r.onerror=s=>n(s),r.readAsText(t)})},async exportDiscussions(){const t=this.list.filter(e=>e.checkBoxValue==!0).map(e=>e.id);if(t.length>0){console.log("export",t);let e=new Date;const n=e.getFullYear(),r=(e.getMonth()+1).toString().padStart(2,"0"),s=e.getDate().toString().padStart(2,"0"),o=e.getHours().toString().padStart(2,"0"),i=e.getMinutes().toString().padStart(2,"0"),a=e.getSeconds().toString().padStart(2,"0"),u="discussions_export_"+(n+"."+r+"."+s+"."+o+i+a)+".json";this.loading=!0;const c=await this.export_multiple_discussions(t);c?(this.saveJSONtoFile(c,u),this. $ refs.toast.showToast("Successfully exported",4,!0),this.isCheckbox=!1):this. $ refs.toast.showToast("Failed to export discussions",4,!1),this.loading=!1}},async importDiscussions(t){const e=await this.parseJsonFile(t.target.files[0]);await this.import_multiple_discussions(e)?(this. $ refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this. $ refs.toast.showToast("Failed to import discussions",4,!1)},async getPersonalityAvatars(){for(;this. $ store.state.personalities===null;)await new Promise(e=>setTimeout(e,100));let t=this. $ store.state.personalities;this.personalityAvatars=t.map(e=>({name:e.name,avatar:e.avatar}))},getAvatar(t){if(t.toLowerCase().trim()==this. $ store.state.config.user_name.toLowerCase().trim())return"user_infos/"+this. $ store.state.config.user_avatar;const e=this.personalityAvatars.findIndex(r=>r.name===t),n=this.personalityAvatars[e];if(n)return console.log("Avatar",n.avatar),n.avatar},setFileListChat(t){try{this. $ refs.chatBox.fileList=this. $ refs.chatBox.fileList.concat(t)}catch(e){this. $ refs.toast.showToast( ` Failed to set filelist in chatbox
2023-10-27 23:36:53 +00:00
` +e.message,4,!1)}this.isDragOverChat=!1},setDropZoneChat(){this.isDragOverChat=!0,this. $ refs.dragdropChat.show=!0},async setFileListDiscussion(t){if(t.length>1){this. $ refs.toast.showToast("Failed to import discussions. Too many files",4,!1);return}const e=await this.parseJsonFile(t[0]);await this.import_multiple_discussions(e)?(this. $ refs.toast.showToast("Successfully imported ("+e.length+")",4,!0),await this.list_discussions()):this. $ refs.toast.showToast("Failed to import discussions",4,!1),this.isDragOverDiscussion=!1},setDropZoneDiscussion(){this.isDragOverDiscussion=!0,this. $ refs.dragdropDiscussion.show=!0}},async created(){for(this. $ nextTick(()=>{Ce.replace()}),Ie.onclose=t=>{console.log("WebSocket connection closed:",t.code,t.reason),this.socketIODisconnected()},Ie.onerror=t=>{console.log("WebSocket connection error:",t.code,t.reason),this.socketIODisconnected(),Ie.disconnect()},Ie.on("connected",this.socketIOConnected),Ie.on("disconnected",this.socketIODisconnected),console.log("Added events"),console.log("Waiting to be ready");this. $ store.state.ready===!1;)await new Promise(t=>setTimeout(t,100)),console.log(this. $ store.state.ready);console.log("Ready"),this.setPageTitle(),await this.list_discussions(),this.loadLastUsedDiscussion(),Ie.on("notification",this.notify),Ie.on("new_message",this.new_message),Ie.on("update_message",this.streamMessageContent),Ie.on("close_message",this.finalMsgEvent),Ie.onopen=()=>{console.log("WebSocket connection established."),this.currentDiscussion!=null&&(this.setPageTitle(item),localStorage.setItem("selected_discussion",this.currentDiscussion.id),this.load_discussion(item.id,()=>{this.discussionArr.length>1&&(this.currentDiscussion.title===""||this.currentDiscussion.title===null)&&this.changeTitleUsingUserMSG(this.currentDiscussion.id,this.discussionArr[1].content)}))},this.isCreated=!0},async mounted(){this. $ nextTick(()=>{Ce.replace()})},async activated(){for(;this.isReady===!1;)await new Promise(t=>setTimeout(t,100));await this.getPersonalityAvatars(),console.log("Avatars found:",this.personalityAvatars),this.isCreated&&ve(()=>{const t=document.getElementById("messages-list");this.scrollBottom(t)})},components:{Discussion:hT,Message:ET,ChatBox:bT,WelcomeComponent:ST,Toast:ds,DragDrop:g_,ChoiceDialog:Cp},watch:{filterTitle(t){t==""&&(this.filterInProgress=!0,this.list=this.tempList,this.filterInProgress=!1)},isCheckbox(t){ve(()=>{Ce.replace()}),t||(this.isSelectAll=!1)},socketConnected(t){console.log("Websocket connected (watch)",t)},showConfirmation(){ve(()=>{Ce.replace()})},isSearch(){ve(()=>{Ce.replace()})}},computed:{UseDiscussionHistory(){return this. $ store.state.config.use_discussions_history},isReady:{get(){return this. $ store.state.ready}},databases(){return this. $ store.state.databases},client_id(){return Ie.id},isReady(){return console.log("verify ready",this.isCreated),this.isCreated},showPanel(){return this. $ store.state.ready&&!this.panelCollapsed},socketConnected(){return console.log(" --- > Websocket connected"),this. $ store.commit("setIsConnected",!0),!0},socketDisconnected(){return this. $ store.commit("setIsConnected",!1),console.log(" --- > Websocket disconnected"),!0},selectedDiscussions(){return ve(()=>{Ce.replace()}),this.list.filter(t=>t.checkBoxValue==!0)}}},Oat=Object.assign(xat,{__name:"DiscussionsView",setup(t){return to(()=>{GT()}),xe.defaults.baseURL="/",(e,n)=>(v(),T(Ne,null,[he(Hr,{name:"fade-and-fly"},{default:ke(()=>[e.isReady?U("",!0):(v(),T("div",tit,[d("div",nit,[d("div",rit,[d("div",sit,[oit,d("div",iit,[d("p",ait,"Lord of Large Language Models v "+j(lt(qT).state.version),1),lit,cit])]),dit,uit,_it])])]))]),_:1}),e.isReady?(v(),T("button",{key:0,onClick:n[0]||(n[0]=(...r)=>e.togglePanel&&e.togglePanel(...r)),class:"absolute top-0 left-0 z-50 p-2 m-2 bg-white rounded-full shadow-md bg-bg-light-tone dark:bg-bg-dark-tone hover:bg-primary-light dark:hover:bg-primary"},[ce(d("div",null,mit,512),[[We,e.panelCollapsed]]),ce(d("div",null,fit,512),[[We,!e.panelCollapsed]])])):U("",!0),he(Hr,{name:"slide-right"},{default:ke(()=>[e.showPanel?(v(),T("div",hit,[