1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
|
var LocalEchoController;(()=>{var t={121:(t,e)=>{for(var r="(?:"+["\\|\\|","\\&\\&",";;","\\|\\&","\\<\\(",">>",">\\&","[&;()|<>]"].join("|")+")",i="",s=0;s<4;s++)i+=(Math.pow(16,8)*Math.random()).toString(16);e.Q=function(t,e,s){var n=function(t,e,s){var n=new RegExp(["("+r+")","((\\\\['\"|&;()<> \\t]|[^\\s'\"|&;()<> \\t])+|\"((\\\\\"|[^\"])*?)\"|'((\\\\'|[^'])*?)')*"].join("|"),"g"),o=t.match(n).filter(Boolean),a=!1;return o?(e||(e={}),s||(s={}),o.map((function(t,n){if(!a){if(RegExp("^"+r+"$").test(t))return{op:t};for(var h=s.escape||"\\",u=!1,l=!1,c="",p=!1,f=0,v=t.length;f<v;f++){var m=t.charAt(f);if(p=p||!u&&("*"===m||"?"===m),l)c+=m,l=!1;else if(u)m===u?u=!1:"'"==u?c+=m:m===h?(f+=1,c+='"'===(m=t.charAt(f))||m===h||"$"===m?m:h+m):c+="$"===m?d():m;else if('"'===m||"'"===m)u=m;else{if(RegExp("^"+r+"$").test(m))return{op:t};if(RegExp("^#$").test(m))return a=!0,c.length?[c,{comment:t.slice(f+1)+o.slice(n+1).join(" ")}]:[{comment:t.slice(f+1)+o.slice(n+1).join(" ")}];m===h?l=!0:c+="$"===m?d():m}}return p?{op:"glob",pattern:c}:c}function d(){var r,s,n,o,a;if(f+=1,"{"===t.charAt(f)){if(f+=1,"}"===t.charAt(f))throw new Error("Bad substitution: "+t.substr(f-2,3));if((r=t.indexOf("}",f))<0)throw new Error("Bad substitution: "+t.substr(f));s=t.substr(f,r-f),f=r}else/[*@#?$!_\-]/.test(t.charAt(f))?(s=t.charAt(f),f+=1):(r=t.substr(f).match(/[^\w\d_]/))?(s=t.substr(f,r.index),f+=r.index-1):(s=t.substr(f),f=t.length);return n="",o=s,void 0===(a="function"==typeof e?e(o):e[o])&&""!=o?a="":void 0===a&&(a="$"),"object"==typeof a?n+i+JSON.stringify(a)+i:n+a}})).reduce((function(t,e){return void 0===e?t:t.concat(e)}),[])):[]}(t,e,s);return"function"!=typeof e?n:n.reduce((function(t,e){if("object"==typeof e)return t.concat(e);var r=e.split(RegExp("("+i+".*?"+i+")","g"));return 1===r.length?t.concat(r[0]):t.concat(r.filter(Boolean).map((function(t){return RegExp("^"+i).test(t)?JSON.parse(t.split(i)[1]):t})))}),[])}}},e={};function r(i){var s=e[i];if(void 0!==s)return s.exports;var n=e[i]={exports:{}};return t[i](n,n.exports,r),n.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var i={};(()=>{"use strict";function t(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}r.d(i,{default:()=>d});var e=function(){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),this.size=t,this.entries=[],this.cursor=0}var r,i;return r=e,(i=[{key:"push",value:function(t){""!==t.trim()&&(t!==this.entries[this.entries.length-1]?(this.entries.push(t),this.entries.length>this.size&&this.entries.shift(0),this.cursor=this.entries.length):this.cursor=this.entries.length)}},{key:"rewind",value:function(){this.cursor=this.entries.length}},{key:"getPrevious",value:function(){var t=Math.max(0,this.cursor-1);return this.cursor=t,this.entries[t]}},{key:"getNext",value:function(){var t=Math.min(this.entries.length,this.cursor+1);return this.cursor=t,this.entries[t]}}])&&t(r.prototype,i),e}(),s=r(121);function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function o(t){for(var e,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=[],s=/\w+/g;e=s.exec(t);)r?i.push(e.index):i.push(e.index+e[0].length);return i}function a(t,e){var r=o(t,!0).reverse().find((function(t){return t<e}));return null==r?0:r}function h(t,e,r){for(var i=0,s=0,n=0;n<e;++n)("\n"==t.charAt(n)||(s+=1)>=r)&&(s=0,i+=1);return{row:i,col:s}}function u(t,e){return h(t,t.length,e).row+1}function l(t){return null!=t.match(/[^\\][ \t]$/m)}function c(t){return""===t.trim()||l(t)?"":(0,s.Q)(t).pop()||""}function p(t,e){if(t.length>=e[0].length)return t;var r=t;t+=e[0].slice(t.length,t.length+1);for(var i=0;i<e.length;i++){if(!e[i].startsWith(r))return null;if(!e[i].startsWith(t))return r}return p(t,e)}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class a
|