add lisp packages
This commit is contained in:
474
lisp/emacs-application-framework/app/mermaid/node_modules/escaper/dist/escaper.js
generated
vendored
Normal file
474
lisp/emacs-application-framework/app/mermaid/node_modules/escaper/dist/escaper.js
generated
vendored
Normal file
@@ -0,0 +1,474 @@
|
||||
/*!
|
||||
* Escaper v2.5.3
|
||||
* https://github.com/kobezzza/Escaper
|
||||
*
|
||||
* Released under the MIT license
|
||||
* https://github.com/kobezzza/Escaper/blob/master/LICENSE
|
||||
*
|
||||
* Date: Tue, 23 Jan 2018 15:58:45 GMT
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define('Escaper', ['exports'], factory) :
|
||||
(factory((global.Escaper = {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
|
||||
return typeof obj;
|
||||
} : function (obj) {
|
||||
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
||||
};
|
||||
|
||||
var Escaper = void 0;
|
||||
var escaper = Escaper = {
|
||||
VERSION: [2, 5, 3],
|
||||
content: [],
|
||||
cache: {},
|
||||
snakeskinRgxp: null,
|
||||
symbols: null,
|
||||
replace: replace,
|
||||
paste: paste
|
||||
};
|
||||
|
||||
var stringLiterals = {
|
||||
'"': true,
|
||||
'\'': true,
|
||||
'`': true
|
||||
};
|
||||
|
||||
var literals = {
|
||||
'/': true
|
||||
};
|
||||
|
||||
for (var key in stringLiterals) {
|
||||
if (!stringLiterals.hasOwnProperty(key)) {
|
||||
break;
|
||||
}
|
||||
|
||||
literals[key] = true;
|
||||
}
|
||||
|
||||
var singleComments = {
|
||||
'//': true,
|
||||
'//*': true,
|
||||
'//!': true,
|
||||
'//#': true,
|
||||
'//@': true,
|
||||
'//$': true
|
||||
};
|
||||
|
||||
var multComments = {
|
||||
'/*': true,
|
||||
'/**': true,
|
||||
'/*!': true,
|
||||
'/*#': true,
|
||||
'/*@': true,
|
||||
'/*$': true
|
||||
};
|
||||
|
||||
var keyArr = [];
|
||||
var finalMap = {};
|
||||
|
||||
for (var _key in literals) {
|
||||
if (!literals.hasOwnProperty(_key)) {
|
||||
break;
|
||||
}
|
||||
|
||||
keyArr.push(_key);
|
||||
finalMap[_key] = true;
|
||||
}
|
||||
|
||||
for (var _key2 in singleComments) {
|
||||
if (!singleComments.hasOwnProperty(_key2)) {
|
||||
break;
|
||||
}
|
||||
|
||||
keyArr.push(_key2);
|
||||
finalMap[_key2] = true;
|
||||
}
|
||||
|
||||
for (var _key3 in multComments) {
|
||||
if (!multComments.hasOwnProperty(_key3)) {
|
||||
break;
|
||||
}
|
||||
|
||||
keyArr.push(_key3);
|
||||
finalMap[_key3] = true;
|
||||
}
|
||||
|
||||
var rgxpFlags = [];
|
||||
var rgxpFlagsMap = {
|
||||
'g': true,
|
||||
'm': true,
|
||||
'i': true,
|
||||
'y': true,
|
||||
'u': true
|
||||
};
|
||||
|
||||
for (var _key4 in rgxpFlagsMap) {
|
||||
if (!rgxpFlagsMap.hasOwnProperty(_key4)) {
|
||||
break;
|
||||
}
|
||||
|
||||
rgxpFlags.push(_key4);
|
||||
}
|
||||
|
||||
var escapeEndMap = {
|
||||
'-': true,
|
||||
'+': true,
|
||||
'*': true,
|
||||
'%': true,
|
||||
'~': true,
|
||||
'>': true,
|
||||
'<': true,
|
||||
'^': true,
|
||||
',': true,
|
||||
';': true,
|
||||
'=': true,
|
||||
'|': true,
|
||||
'&': true,
|
||||
'!': true,
|
||||
'?': true,
|
||||
':': true,
|
||||
'(': true,
|
||||
'{': true,
|
||||
'[': true
|
||||
};
|
||||
|
||||
var escapeEndWordMap = {
|
||||
'return': true,
|
||||
'yield': true,
|
||||
'await': true,
|
||||
'typeof': true,
|
||||
'void': true,
|
||||
'instanceof': true,
|
||||
'delete': true,
|
||||
'in': true,
|
||||
'new': true,
|
||||
'of': true
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {!Object} obj
|
||||
* @param {!Object} p
|
||||
* @param {(boolean|number)} val
|
||||
*/
|
||||
function mix(obj, p, val) {
|
||||
for (var _key5 in obj) {
|
||||
if (!obj.hasOwnProperty(_key5)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (_key5 in p === false) {
|
||||
p[_key5] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var symbols = void 0;
|
||||
var snakeskinRgxp = void 0;
|
||||
|
||||
var uSRgxp = /[^\s/]/;
|
||||
var wRgxp = /[a-z]/;
|
||||
var sRgxp = /\s/;
|
||||
var nRgxp = /[\r\n]/;
|
||||
var posRgxp = /\${pos}/g;
|
||||
|
||||
var objMap = {
|
||||
'object': true,
|
||||
'function': true
|
||||
};
|
||||
|
||||
/**
|
||||
* Replaces all found blocks ' ... ', " ... ", ` ... `, / ... /, // ..., /* ... *\/ to
|
||||
* __ESCAPER_QUOT__number_ in a string and returns a new string
|
||||
*
|
||||
* @param {string} str - source string
|
||||
* @param {(Object<string, boolean>|boolean)=} [opt_withCommentsOrParams=false] - parameters:
|
||||
*
|
||||
* (if a parameter value is set to -1, then all found matches will be removed from the final string,
|
||||
* or if the value will be set to true/false they will be included/excluded)
|
||||
*
|
||||
* *) @label - template for replacement, e.g. __ESCAPER_QUOT__${pos}_
|
||||
* *) @all - replaces all found matches
|
||||
* *) @comments - replaces all kinds of comments
|
||||
* *) @strings - replaces all kinds of string literals
|
||||
* *) @literals - replaces all kinds of string literals and regular expressions
|
||||
* *) `
|
||||
* *) '
|
||||
* *) "
|
||||
* *) /
|
||||
* *) //
|
||||
* *) //*
|
||||
* *) //!
|
||||
* *) //#
|
||||
* *) //@
|
||||
* *) //$
|
||||
* *) /*
|
||||
* *) /**
|
||||
* *) /*!
|
||||
* *) /*#
|
||||
* *) /*@
|
||||
* *) /*$
|
||||
*
|
||||
* OR if the value is boolean, then will be replaced all found comments (true) / literals (false)
|
||||
*
|
||||
* @param {Array=} [opt_content=Escaper.content] - array for matches
|
||||
* @param {?boolean=} [opt_snakeskin] - private parameter for using with Snakeskin
|
||||
* @return {string}
|
||||
*/
|
||||
function replace(str, opt_withCommentsOrParams, opt_content, opt_snakeskin) {
|
||||
symbols = symbols || Escaper.symbols || 'a-z';
|
||||
snakeskinRgxp = snakeskinRgxp || Escaper.snakeskinRgxp || new RegExp('[!$' + symbols + '_]', 'i');
|
||||
|
||||
var _Escaper = Escaper,
|
||||
cache = _Escaper.cache,
|
||||
content = _Escaper.content;
|
||||
|
||||
|
||||
var isObj = Boolean(opt_withCommentsOrParams && objMap[typeof opt_withCommentsOrParams === 'undefined' ? 'undefined' : _typeof(opt_withCommentsOrParams)]);
|
||||
|
||||
var p = isObj ? Object(opt_withCommentsOrParams) : {};
|
||||
|
||||
function mark(pos) {
|
||||
if (p['@label']) {
|
||||
return p['@label'].replace(posRgxp, pos);
|
||||
}
|
||||
|
||||
return '__ESCAPER_QUOT__' + pos + '_';
|
||||
}
|
||||
|
||||
var withComments = false;
|
||||
if (typeof opt_withCommentsOrParams === 'boolean') {
|
||||
withComments = Boolean(opt_withCommentsOrParams);
|
||||
}
|
||||
|
||||
if ('@comments' in p) {
|
||||
mix(multComments, p, p['@comments']);
|
||||
mix(singleComments, p, p['@comments']);
|
||||
delete p['@comments'];
|
||||
}
|
||||
|
||||
if ('@strings' in p) {
|
||||
mix(stringLiterals, p, p['@strings']);
|
||||
delete p['@strings'];
|
||||
}
|
||||
|
||||
if ('@literals' in p) {
|
||||
mix(literals, p, p['@literals']);
|
||||
delete p['@literals'];
|
||||
}
|
||||
|
||||
if ('@all' in p) {
|
||||
mix(finalMap, p, p['@all']);
|
||||
delete p['@all'];
|
||||
}
|
||||
|
||||
var cacheKey = '';
|
||||
for (var i = -1; ++i < keyArr.length;) {
|
||||
var el = keyArr[i];
|
||||
|
||||
if (multComments[el] || singleComments[el]) {
|
||||
p[el] = withComments || p[el];
|
||||
} else {
|
||||
p[el] = p[el] || !isObj;
|
||||
}
|
||||
|
||||
cacheKey += p[el] + ',';
|
||||
}
|
||||
|
||||
var initStr = str,
|
||||
stack = opt_content || content;
|
||||
|
||||
if (stack === content && cache[cacheKey] && cache[cacheKey][initStr]) {
|
||||
return cache[cacheKey][initStr];
|
||||
}
|
||||
|
||||
var begin = false,
|
||||
end = true;
|
||||
|
||||
var escape = false,
|
||||
comment = false;
|
||||
|
||||
var selectionStart = 0,
|
||||
block = false;
|
||||
|
||||
var templateVar = 0,
|
||||
filterStart = false;
|
||||
|
||||
var cut = void 0,
|
||||
label = void 0;
|
||||
|
||||
var part = '',
|
||||
rPart = '';
|
||||
|
||||
for (var _i = -1; ++_i < str.length;) {
|
||||
var _el = str.charAt(_i);
|
||||
|
||||
var next = str.charAt(_i + 1),
|
||||
word = str.substr(_i, 2),
|
||||
extWord = str.substr(_i, 3);
|
||||
|
||||
if (!comment) {
|
||||
if (!begin) {
|
||||
if (_el === '/') {
|
||||
if (singleComments[word] || multComments[word]) {
|
||||
if (singleComments[extWord] || multComments[extWord]) {
|
||||
comment = extWord;
|
||||
} else {
|
||||
comment = word;
|
||||
}
|
||||
}
|
||||
|
||||
if (comment) {
|
||||
selectionStart = _i;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (escapeEndMap[_el] || escapeEndWordMap[rPart]) {
|
||||
end = true;
|
||||
rPart = '';
|
||||
} else if (uSRgxp.test(_el)) {
|
||||
end = false;
|
||||
}
|
||||
|
||||
if (wRgxp.test(_el)) {
|
||||
part += _el;
|
||||
} else {
|
||||
rPart = part;
|
||||
part = '';
|
||||
}
|
||||
|
||||
var skip = false;
|
||||
if (opt_snakeskin) {
|
||||
if (_el === '|' && snakeskinRgxp.test(next)) {
|
||||
filterStart = true;
|
||||
end = false;
|
||||
skip = true;
|
||||
} else if (filterStart && sRgxp.test(_el)) {
|
||||
filterStart = false;
|
||||
end = true;
|
||||
skip = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!skip) {
|
||||
if (escapeEndMap[_el]) {
|
||||
end = true;
|
||||
} else if (uSRgxp.test(_el)) {
|
||||
end = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// [] inside RegExp
|
||||
if (begin === '/' && !escape) {
|
||||
if (_el === '[') {
|
||||
block = true;
|
||||
} else if (_el === ']') {
|
||||
block = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!begin && templateVar) {
|
||||
if (_el === '}') {
|
||||
templateVar--;
|
||||
} else if (_el === '{') {
|
||||
templateVar++;
|
||||
}
|
||||
|
||||
if (!templateVar) {
|
||||
_el = '`';
|
||||
}
|
||||
}
|
||||
|
||||
if (begin === '`' && !escape && word === '${') {
|
||||
_el = '`';
|
||||
_i++;
|
||||
templateVar++;
|
||||
}
|
||||
|
||||
if (finalMap[_el] && (_el !== '/' || end) && !begin) {
|
||||
begin = _el;
|
||||
selectionStart = _i;
|
||||
} else if (begin && (_el === '\\' || escape)) {
|
||||
escape = !escape;
|
||||
} else if (finalMap[_el] && begin === _el && !escape && (begin !== '/' || !block)) {
|
||||
if (_el === '/') {
|
||||
for (var j = -1; ++j < rgxpFlags.length;) {
|
||||
if (rgxpFlagsMap[str.charAt(_i + 1)]) {
|
||||
_i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
begin = false;
|
||||
end = false;
|
||||
|
||||
if (p[_el]) {
|
||||
cut = str.substring(selectionStart, _i + 1);
|
||||
|
||||
if (p[_el] === -1) {
|
||||
label = '';
|
||||
} else {
|
||||
label = mark(stack.length);
|
||||
stack.push(cut);
|
||||
}
|
||||
|
||||
str = str.substring(0, selectionStart) + label + str.substring(_i + 1);
|
||||
_i += label.length - cut.length;
|
||||
}
|
||||
}
|
||||
} else if (nRgxp.test(next) && singleComments[comment] || multComments[_el + str.charAt(_i - 1)] && _i - selectionStart > 2 && multComments[comment]) {
|
||||
if (p[comment]) {
|
||||
cut = str.substring(selectionStart, _i + 1);
|
||||
|
||||
if (p[comment] === -1) {
|
||||
label = '';
|
||||
} else {
|
||||
label = mark(stack.length);
|
||||
stack.push(cut);
|
||||
}
|
||||
|
||||
str = str.substring(0, selectionStart) + label + str.substring(_i + 1);
|
||||
_i += label.length - cut.length;
|
||||
}
|
||||
|
||||
comment = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (stack === content) {
|
||||
cache[cacheKey] = cache[cacheKey] || {};
|
||||
cache[cacheKey][initStr] = str;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
var pasteRgxp = /__ESCAPER_QUOT__(\d+)_/g;
|
||||
|
||||
/**
|
||||
* Replaces all found blocks __ESCAPER_QUOT__number_ to real content in a string
|
||||
* and returns a new string
|
||||
*
|
||||
* @param {string} str - source string
|
||||
* @param {Array=} [opt_content=Escaper.content] - array of matches
|
||||
* @param {RegExp=} [opt_rgxp] - RegExp for searching, e.g. /__ESCAPER_QUOT__(\d+)_/g
|
||||
* @return {string}
|
||||
*/
|
||||
function paste(str, opt_content, opt_rgxp) {
|
||||
return str.replace(opt_rgxp || pasteRgxp, function (str, pos) {
|
||||
return (opt_content || Escaper.content)[pos];
|
||||
});
|
||||
}
|
||||
|
||||
exports['default'] = escaper;
|
||||
exports.replace = replace;
|
||||
exports.paste = paste;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
10
lisp/emacs-application-framework/app/mermaid/node_modules/escaper/dist/escaper.min.js
generated
vendored
Normal file
10
lisp/emacs-application-framework/app/mermaid/node_modules/escaper/dist/escaper.min.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/*! Escaper v2.5.3 | https://github.com/kobezzza/Escaper/blob/master/LICENSE */
|
||||
(function(){'use strict';
|
||||
function J(y){function D(b,d,l){for(var f in b){if(!b.hasOwnProperty(f))break;!1===f in d&&(d[f]=l)}}function O(b,d,l,y){function u(a){return c["@label"]?c["@label"].replace(T,a):"__ESCAPER_QUOT__"+a+"_"}K=K||E.symbols||"a-z";L=L||E.snakeskinRgxp||new RegExp("[!$"+K+"_]","i");var z=E,A=z.cache,z=z.content,B=!(!d||!U["undefined"===typeof d?"undefined":V(d)]),c=B?Object(d):{},m=!1;"boolean"===typeof d&&(m=!!d);"@comments"in c&&(D(f,c,c["@comments"]),D(q,c,c["@comments"]),delete c["@comments"]);"@strings"in
|
||||
c&&(D(M,c,c["@strings"]),delete c["@strings"]);"@literals"in c&&(D(H,c,c["@literals"]),delete c["@literals"]);"@all"in c&&(D(C,c,c["@all"]),delete c["@all"]);d="";for(var k=-1;++k<F.length;){var g=F[k];c[g]=f[g]||q[g]?m||c[g]:c[g]||!B;d+=c[g]+","}B=b;l=l||z;if(l===z&&A[d]&&A[d][B])return A[d][B];for(var h=!1,p=!0,k=m=!1,g=0,t=!1,G=0,v=!1,n=void 0,a=void 0,w="",x="",e=-1;++e<b.length;){var a=b.charAt(e),n=b.charAt(e+1),I=b.substr(e,2),r=b.substr(e,3);if(!k){if(!h){if("/"===a){if(q[I]||f[I])k=q[r]||
|
||||
f[r]?r:I;if(k){g=e;continue}}P[a]||W[x]?(p=!0,x=""):Q.test(a)&&(p=!1);X.test(a)?w+=a:(x=w,w="");r=!1;y&&("|"===a&&L.test(n)?(v=!0,p=!1,r=!0):v&&Y.test(a)&&(v=!1,r=p=!0));r||(P[a]?p=!0:Q.test(a)&&(p=!1))}"/"!==h||m||("["===a?t=!0:"]"===a&&(t=!1));!h&&G&&("}"===a?G--:"{"===a&&G++,G||(a="`"));"`"!==h||m||"${"!==I||(a="`",e++,G++);if(C[a]&&("/"!==a||p)&&!h)h=a,g=e;else if(h&&("\\"===a||m))m=!m;else if(C[a]&&h===a&&!m&&("/"!==h||!t)){if("/"===a)for(h=-1;++h<R.length;)N[b.charAt(e+1)]&&e++;p=h=!1;c[a]&&
|
||||
(n=b.substring(g,e+1),-1===c[a]?a="":(a=u(l.length),l.push(n)),b=b.substring(0,g)+a+b.substring(e+1),e+=a.length-n.length)}}else if(Z.test(n)&&q[k]||f[a+b.charAt(e-1)]&&2<e-g&&f[k])c[k]&&(n=b.substring(g,e+1),-1===c[k]?a="":(a=u(l.length),l.push(n)),b=b.substring(0,g)+a+b.substring(e+1),e+=a.length-n.length),k=!1}l===z&&(A[d]=A[d]||{},A[d][B]=b);return b}function S(b,d,f){return b.replace(f||aa,function(b,f){return(d||E.content)[f]})}var V="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?
|
||||
function(b){return typeof b}:function(b){return b&&"function"===typeof Symbol&&b.constructor===Symbol&&b!==Symbol.prototype?"symbol":typeof b},E=void 0,ba=E={VERSION:[2,5,3],content:[],cache:{},snakeskinRgxp:null,symbols:null,replace:O,paste:S},M={'"':!0,"'":!0,"`":!0},H={"/":!0},t;for(t in M){if(!M.hasOwnProperty(t))break;H[t]=!0}var q={"//":!0,"//*":!0,"//!":!0,"//#":!0,"//@":!0,"//$":!0},f={"/*":!0,"/**":!0,"/*!":!0,"/*#":!0,"/*@":!0,"/*$":!0},F=[],C={},u;for(u in H){if(!H.hasOwnProperty(u))break;
|
||||
F.push(u);C[u]=!0}for(var v in q){if(!q.hasOwnProperty(v))break;F.push(v);C[v]=!0}for(var w in f){if(!f.hasOwnProperty(w))break;F.push(w);C[w]=!0}var R=[],N={g:!0,m:!0,i:!0,y:!0,u:!0},x;for(x in N){if(!N.hasOwnProperty(x))break;R.push(x)}var P={"-":!0,"+":!0,"*":!0,"%":!0,"~":!0,">":!0,"<":!0,"^":!0,",":!0,";":!0,"=":!0,"|":!0,"&":!0,"!":!0,"?":!0,":":!0,"(":!0,"{":!0,"[":!0},W={"return":!0,yield:!0,await:!0,"typeof":!0,"void":!0,"instanceof":!0,"delete":!0,"in":!0,"new":!0,of:!0},K=void 0,L=void 0,
|
||||
Q=/[^\s/]/,X=/[a-z]/,Y=/\s/,Z=/[\r\n]/,T=/\${pos}/g,U={object:!0,"function":!0},aa=/__ESCAPER_QUOT__(\d+)_/g;y["default"]=ba;y.replace=O;y.paste=S;Object.defineProperty(y,"__esModule",{value:!0})}"object"===typeof exports&&"undefined"!==typeof module?J(exports):"function"===typeof define&&define.amd?define("Escaper",["exports"],J):J(this.Escaper={});
|
||||
}).call(this);
|
||||
Reference in New Issue
Block a user