jinbi-utils 1.0.24 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import axios from 'axios';
2
+ import { spawn } from 'child_process';
2
3
  import { defineStore } from 'pinia';
3
4
 
4
5
  var fromTypeMap = {
@@ -267,7 +268,7 @@ var getFileData = function (optionName) {
267
268
  var _a = optionName.split(','), _b = _a[0], name = _b === void 0 ? '' : _b, _c = _a[1], url = _c === void 0 ? '' : _c;
268
269
  return {
269
270
  name: decodeURIComponent(name),
270
- url: decodeURIComponent(url),
271
+ url: decodeURIComponent(url)
271
272
  };
272
273
  };
273
274
  // 验证是否为数字
@@ -304,32 +305,30 @@ var uuid = function (len, radix) {
304
305
  return uuid.join('');
305
306
  };
306
307
  var getToken = function (cacheType, key) {
307
- if (key === void 0) { key = 'token'; }
308
308
  var token = '';
309
309
  var cacheTypeToLower = cacheType.toLowerCase();
310
310
  if (cacheTypeToLower === 'localstorage') {
311
- token = localStorage.getItem(key) || '';
311
+ token = localStorage.getItem('token' ) || '';
312
312
  }
313
313
  else if (cacheTypeToLower === 'sessionstorage') {
314
- token = sessionStorage.getItem(key) || '';
314
+ token = sessionStorage.getItem('token' ) || '';
315
315
  }
316
316
  else {
317
- token = localStorage.getItem(key) || sessionStorage.getItem('token') || '';
317
+ token = localStorage.getItem('token' ) || sessionStorage.getItem('token') || '';
318
318
  }
319
319
  return token;
320
320
  };
321
321
  var removeToken = function (cacheType, key) {
322
- if (key === void 0) { key = 'token'; }
323
322
  var cacheTypeToLower = cacheType.toLowerCase();
324
323
  if (cacheTypeToLower === 'localstorage') {
325
- localStorage.removeItem(key);
324
+ localStorage.removeItem('token' );
326
325
  }
327
326
  else if (cacheTypeToLower === 'sessionstorage') {
328
- sessionStorage.removeItem(key);
327
+ sessionStorage.removeItem('token' );
329
328
  }
330
329
  else {
331
- localStorage.removeItem(key);
332
- sessionStorage.removeItem(key);
330
+ localStorage.removeItem('token' );
331
+ sessionStorage.getItem('token' );
333
332
  }
334
333
  };
335
334
 
@@ -584,7 +583,7 @@ var DEFAULT_MONEY_OPTIONS = {
584
583
  factor: 100,
585
584
  precision: 2,
586
585
  formatAsCurrency: false,
587
- currencySymbol: '¥',
586
+ currencySymbol: '¥' // 人民币符号
588
587
  };
589
588
  /**
590
589
  * 千分位格式化
@@ -1097,33 +1096,6 @@ function genExportByBlob(_a) {
1097
1096
  });
1098
1097
  });
1099
1098
  };
1100
- }
1101
- /**
1102
- * 将 base64 字符串转换为 File 或 Blob
1103
- * @param {string} base64 - 带有 data URI 的 base64 字符串
1104
- * @param {string} [filename] - 如果提供了,则返回 File;否则返回 Blob
1105
- * @returns {File|Blob}
1106
- */
1107
- function base64ToFileOrBlob(base64, filename) {
1108
- return __awaiter(this, void 0, void 0, function () {
1109
- var _a, meta, content, mime, bstr, len, u8arr, i;
1110
- return __generator(this, function (_b) {
1111
- _a = base64.split(','), meta = _a[0], content = _a[1];
1112
- mime = meta.match(/:(.*?);/)[1];
1113
- bstr = atob(content);
1114
- len = bstr.length;
1115
- u8arr = new Uint8Array(len);
1116
- for (i = 0; i < len; i++) {
1117
- u8arr[i] = bstr.charCodeAt(i);
1118
- }
1119
- if (filename) {
1120
- return [2 /*return*/, new File([u8arr], filename, { type: mime })];
1121
- }
1122
- else {
1123
- return [2 /*return*/, new Blob([u8arr], { type: mime })];
1124
- }
1125
- });
1126
- });
1127
1099
  }
1128
1100
 
1129
1101
  /**
@@ -1454,7 +1426,7 @@ var httpEnum = {
1454
1426
  // 1xx,临时响应
1455
1427
  TEMP_RESPOND: {
1456
1428
  Continue: 100,
1457
- SwitchingProtocal: 101,
1429
+ SwitchingProtocal: 101 // 针对请求头的Upgrade返回的信息。表明服务器正在切换到指定的协议
1458
1430
  },
1459
1431
  // 2xx,成功
1460
1432
  SUCCESS: {
@@ -1464,7 +1436,7 @@ var httpEnum = {
1464
1436
  NoAuthoritativeInformation: 203,
1465
1437
  NoContent: 204,
1466
1438
  ResetContent: 205,
1467
- ParticalContent: 206,
1439
+ ParticalContent: 206 // 客户端使用Range请求头时,返回该状态码
1468
1440
  },
1469
1441
  // 3xx,重定向
1470
1442
  REDIRECT: {
@@ -1474,7 +1446,7 @@ var httpEnum = {
1474
1446
  SeeOther: 303,
1475
1447
  NotModified: 304,
1476
1448
  TemporaryRedirect: 307,
1477
- PermanentRedirect: 308,
1449
+ PermanentRedirect: 308 // 永久重定向。基本和301相同。但是严格禁止修改请求方式和请求体。
1478
1450
  },
1479
1451
  // 4xx,请求错误
1480
1452
  REQUEST_ERROR: {
@@ -1495,8 +1467,8 @@ var httpEnum = {
1495
1467
  BadGateway: 502,
1496
1468
  ServiceUnavailable: 503,
1497
1469
  GateTimeout: 504,
1498
- HttpVersionNotSupported: 505,
1499
- },
1470
+ HttpVersionNotSupported: 505 // 发出的请求http版本服务器不支持。如果请求通过http2发送,服务器不支持http2.0,就会返回该状态码。
1471
+ }
1500
1472
  },
1501
1473
  // http状态码
1502
1474
  CODES: {
@@ -1507,7 +1479,7 @@ var httpEnum = {
1507
1479
  UnAuthorizedHavePhone: '11002',
1508
1480
  },
1509
1481
  // http状态码白名单,在具体业务中处理
1510
- ERR_CODE_WHITE_LIST: [],
1482
+ ERR_CODE_WHITE_LIST: []
1511
1483
  };
1512
1484
 
1513
1485
  var request = axios.create({
@@ -1526,11 +1498,11 @@ var request = axios.create({
1526
1498
  * @param tokenKey
1527
1499
  * */
1528
1500
  var http = function (_a) {
1529
- var cacheType = _a.cacheType, currentMode = _a.currentMode, errorCb = _a.errorCb, getTokenCb = _a.getTokenCb, tokenKey = _a.tokenKey;
1501
+ var cacheType = _a.cacheType, currentMode = _a.currentMode, errorCb = _a.errorCb, getTokenCb = _a.getTokenCb; _a.tokenKey;
1530
1502
  request.interceptors.request.use(function (config) { return __awaiter(void 0, void 0, void 0, function () {
1531
1503
  var token, deviceType;
1532
1504
  return __generator(this, function (_a) {
1533
- token = getToken(cacheType, tokenKey);
1505
+ token = getToken(cacheType);
1534
1506
  deviceType = getDeviceType();
1535
1507
  config.headers.Authorization = token;
1536
1508
  config.headers.token = token;
@@ -1558,7 +1530,7 @@ var http = function (_a) {
1558
1530
  // token失效
1559
1531
  if (statusCode === httpEnum.CODES.UnAuthorized) {
1560
1532
  if (currentMode !== "local" && currentMode !== "dev" && currentMode !== 'development') {
1561
- removeToken(cacheType, tokenKey);
1533
+ removeToken(cacheType);
1562
1534
  if (getTokenCb && typeof getTokenCb === "function") {
1563
1535
  getTokenCb();
1564
1536
  }
@@ -1646,7 +1618,7 @@ var NestedQueryBuilder = /** @class */ (function () {
1646
1618
  this.parent = parent;
1647
1619
  this.nestedFilters = {
1648
1620
  logic: logic,
1649
- filters: [],
1621
+ filters: []
1650
1622
  };
1651
1623
  }
1652
1624
  NestedQueryBuilder.prototype.where = function (fieldOrConditions, opOrValue, value) {
@@ -1751,7 +1723,7 @@ var QueryBuilder = /** @class */ (function (_super) {
1751
1723
  // 创建一个新的 OR 组
1752
1724
  var orGroup = {
1753
1725
  logic: 'or',
1754
- filters: [],
1726
+ filters: []
1755
1727
  };
1756
1728
  // 对象形式: orWhere({ user_id: 10086, status: 1 })
1757
1729
  if (typeof fieldOrConditions === 'object') {
@@ -1777,7 +1749,7 @@ var QueryBuilder = /** @class */ (function (_super) {
1777
1749
  // 否则将当前所有条件包装成一个 AND 组,然后与新的 OR 组一起放在顶层
1778
1750
  var andGroup = {
1779
1751
  logic: 'and',
1780
- filters: __spreadArrays(this.params.filters.filters),
1752
+ filters: __spreadArrays(this.params.filters.filters)
1781
1753
  };
1782
1754
  this.params.filters.filters = [andGroup, orGroup];
1783
1755
  this.params.filters.logic = 'and';
@@ -1954,85 +1926,103 @@ var UpdateBuilder = /** @class */ (function (_super) {
1954
1926
  return UpdateBuilder;
1955
1927
  }(BaseBuilder));
1956
1928
 
1957
- function normalizeHeaders(headers) {
1958
- return __assign({}, (headers || {}));
1959
- }
1960
- function lowerCaseHeaderMap(resHeaders) {
1961
- var out = {};
1962
- resHeaders.forEach(function (value, key) {
1963
- out[key.toLowerCase()] = value;
1964
- });
1965
- return out;
1966
- }
1967
- function safeJsonParse(text) {
1968
- try {
1969
- return JSON.parse(text);
1929
+ function buildArgs(opts) {
1930
+ var args = ['-sS', '-i'];
1931
+ var method = (opts.method || 'GET').toUpperCase();
1932
+ if (method !== 'GET')
1933
+ args.push('-X', method);
1934
+ var headers = __assign({}, (opts.headers || {}));
1935
+ var hasContentType = Object.keys(headers).some(function (k) { return k.toLowerCase() === 'content-type'; });
1936
+ var hasBody = opts.data !== undefined && opts.data !== null;
1937
+ if (hasBody && !hasContentType)
1938
+ headers['Content-Type'] = 'application/json';
1939
+ for (var _i = 0, _a = Object.keys(headers); _i < _a.length; _i++) {
1940
+ var k = _a[_i];
1941
+ args.push('-H', k + ": " + headers[k]);
1942
+ }
1943
+ if (hasBody) {
1944
+ var payload = void 0;
1945
+ if (Buffer.isBuffer(opts.data))
1946
+ payload = opts.data.toString();
1947
+ else if (typeof opts.data === 'string')
1948
+ payload = opts.data;
1949
+ else
1950
+ payload = JSON.stringify(opts.data);
1951
+ args.push('--data', payload);
1952
+ }
1953
+ var follow = opts.followRedirects !== false;
1954
+ if (follow)
1955
+ args.push('-L');
1956
+ var timeoutMs = typeof opts.timeoutMs === 'number' && opts.timeoutMs > 0 ? opts.timeoutMs : 15000;
1957
+ args.push('--max-time', String(Math.ceil(timeoutMs / 1000)));
1958
+ args.push(opts.url);
1959
+ return args;
1960
+ }
1961
+ function parseHeaders(headerText) {
1962
+ var headers = {};
1963
+ var lines = headerText.split(/\r?\n/);
1964
+ for (var _i = 0, lines_1 = lines; _i < lines_1.length; _i++) {
1965
+ var line = lines_1[_i];
1966
+ var idx = line.indexOf(':');
1967
+ if (idx > 0) {
1968
+ var k = line.substring(0, idx).trim();
1969
+ var v = line.substring(idx + 1).trim();
1970
+ if (k)
1971
+ headers[k.toLowerCase()] = v;
1972
+ }
1970
1973
  }
1971
- catch (_a) {
1972
- return undefined;
1974
+ return headers;
1975
+ }
1976
+ function parseResponse(raw) {
1977
+ var sepIndex = raw.indexOf('\r\n\r\n') >= 0 ? raw.indexOf('\r\n\r\n') : raw.indexOf('\n\n');
1978
+ var headerText = sepIndex >= 0 ? raw.substring(0, sepIndex) : '';
1979
+ var body = sepIndex >= 0 ? raw.substring(sepIndex + (raw.substr(sepIndex, 4) === '\r\n\r\n' ? 4 : 2)) : raw;
1980
+ var headers = parseHeaders(headerText);
1981
+ var status = 200;
1982
+ var statusLine = headerText.split(/\r?\n/)[0] || '';
1983
+ var m = statusLine.match(/HTTP\/[0-9.]+\s+(\d{3})/);
1984
+ if (m)
1985
+ status = parseInt(m[1], 10);
1986
+ var json;
1987
+ var ct = headers['content-type'] || '';
1988
+ if (ct.includes('application/json')) {
1989
+ try {
1990
+ json = JSON.parse(body);
1991
+ }
1992
+ catch (_a) { }
1973
1993
  }
1994
+ return { status: status, headers: headers, body: body, json: json };
1974
1995
  }
1975
1996
  var CurlClient = /** @class */ (function () {
1976
1997
  function CurlClient() {
1977
1998
  }
1978
1999
  CurlClient.prototype.request = function (opts) {
1979
2000
  return __awaiter(this, void 0, void 0, function () {
1980
- var method, timeoutMs, headers, hasBody, body, hasContentType, controller, timeoutId, res, text, resHeaders, ct, json;
2001
+ var args, cmd;
1981
2002
  return __generator(this, function (_a) {
1982
2003
  switch (_a.label) {
1983
2004
  case 0:
1984
- method = (opts.method || 'GET').toUpperCase();
1985
- timeoutMs = typeof opts.timeoutMs === 'number' && opts.timeoutMs > 0 ? opts.timeoutMs : 15000;
1986
- headers = normalizeHeaders(opts.headers);
1987
- hasBody = opts.data !== undefined && opts.data !== null;
1988
- body = undefined;
1989
- if (hasBody) {
1990
- if (typeof opts.data === 'string') {
1991
- body = opts.data;
1992
- }
1993
- else if (typeof FormData !== 'undefined' && opts.data instanceof FormData ||
1994
- typeof Blob !== 'undefined' && opts.data instanceof Blob ||
1995
- typeof ArrayBuffer !== 'undefined' && opts.data instanceof ArrayBuffer) {
1996
- body = opts.data;
1997
- }
1998
- else {
1999
- hasContentType = Object.keys(headers).some(function (k) { return k.toLowerCase() === 'content-type'; });
2000
- if (!hasContentType)
2001
- headers['Content-Type'] = 'application/json';
2002
- body = JSON.stringify(opts.data);
2003
- }
2004
- }
2005
- controller = typeof AbortController !== 'undefined' ? new AbortController() : null;
2006
- timeoutId = controller ? setTimeout(function () { return controller.abort(); }, timeoutMs) : null;
2007
- _a.label = 1;
2008
- case 1:
2009
- _a.trys.push([1, , 4, 5]);
2010
- return [4 /*yield*/, fetch(opts.url, {
2011
- method: method,
2012
- headers: headers,
2013
- body: body,
2014
- redirect: opts.followRedirects === false ? 'manual' : 'follow',
2015
- signal: controller ? controller.signal : undefined,
2005
+ args = buildArgs(opts);
2006
+ cmd = process.platform === 'win32' ? 'curl.exe' : 'curl';
2007
+ return [4 /*yield*/, new Promise(function (resolve, reject) {
2008
+ var p = spawn(cmd, args, { stdio: ['ignore', 'pipe', 'pipe'] });
2009
+ var out = '';
2010
+ var err = '';
2011
+ p.stdout.on('data', function (d) { out += d.toString(); });
2012
+ p.stderr.on('data', function (d) { err += d.toString(); });
2013
+ p.on('error', function (e) { return reject(e); });
2014
+ p.on('close', function (code) {
2015
+ if (code !== 0 && !out)
2016
+ return reject(new Error(err || "curl exit " + code));
2017
+ try {
2018
+ resolve(parseResponse(out));
2019
+ }
2020
+ catch (e) {
2021
+ reject(e);
2022
+ }
2023
+ });
2016
2024
  })];
2017
- case 2:
2018
- res = _a.sent();
2019
- return [4 /*yield*/, res.text()];
2020
- case 3:
2021
- text = _a.sent();
2022
- resHeaders = lowerCaseHeaderMap(res.headers);
2023
- ct = resHeaders['content-type'] || '';
2024
- json = ct.includes('application/json') ? safeJsonParse(text) : undefined;
2025
- return [2 /*return*/, {
2026
- status: res.status,
2027
- headers: resHeaders,
2028
- body: text,
2029
- json: json,
2030
- }];
2031
- case 4:
2032
- if (timeoutId)
2033
- clearTimeout(timeoutId);
2034
- return [7 /*endfinally*/];
2035
- case 5: return [2 /*return*/];
2025
+ case 1: return [2 /*return*/, _a.sent()];
2036
2026
  }
2037
2027
  });
2038
2028
  });
@@ -2091,33 +2081,33 @@ function sendLog(logData) {
2091
2081
  function readHonoRequestBody(c) {
2092
2082
  return __awaiter(this, void 0, void 0, function () {
2093
2083
  var ct, raw, cloned, t;
2094
- return __generator(this, function (_a) {
2095
- switch (_a.label) {
2084
+ return __generator(this, function (_b) {
2085
+ switch (_b.label) {
2096
2086
  case 0:
2097
2087
  ct = c.req.header("content-type") || "";
2098
- _a.label = 1;
2088
+ _b.label = 1;
2099
2089
  case 1:
2100
- _a.trys.push([1, 4, , 5]);
2090
+ _b.trys.push([1, 4, , 5]);
2101
2091
  raw = c.req.raw;
2102
2092
  if (!(raw && typeof raw.clone === "function")) return [3 /*break*/, 3];
2103
2093
  cloned = raw.clone();
2104
2094
  return [4 /*yield*/, cloned.text()];
2105
2095
  case 2:
2106
- t = _a.sent();
2096
+ t = _b.sent();
2107
2097
  if (!t)
2108
2098
  return [2 /*return*/, undefined];
2109
2099
  if (ct.includes("application/json")) {
2110
2100
  try {
2111
2101
  return [2 /*return*/, JSON.parse(t)];
2112
2102
  }
2113
- catch (_b) {
2103
+ catch (_c) {
2114
2104
  return [2 /*return*/, t];
2115
2105
  }
2116
2106
  }
2117
2107
  return [2 /*return*/, t];
2118
2108
  case 3: return [3 /*break*/, 5];
2119
2109
  case 4:
2120
- _a.sent();
2110
+ _b.sent();
2121
2111
  return [3 /*break*/, 5];
2122
2112
  case 5: return [2 /*return*/, undefined];
2123
2113
  }
@@ -2135,8 +2125,7 @@ function readHonoRequestHeaders(c) {
2135
2125
  });
2136
2126
  }
2137
2127
  }
2138
- catch (e) {
2139
- }
2128
+ catch (_a) { }
2140
2129
  return out;
2141
2130
  }
2142
2131
  function readHonoResponseHeaders(c) {
@@ -2146,8 +2135,7 @@ function readHonoResponseHeaders(c) {
2146
2135
  out[k] = v;
2147
2136
  });
2148
2137
  }
2149
- catch (e) {
2150
- }
2138
+ catch (_a) { }
2151
2139
  return out;
2152
2140
  }
2153
2141
  function handleHono(c, next, systemName) {
@@ -2204,8 +2192,7 @@ function readKoaRequestHeaders(ctx) {
2204
2192
  out[k] = String(v);
2205
2193
  }
2206
2194
  }
2207
- catch (e) {
2208
- }
2195
+ catch (_d) { }
2209
2196
  return out;
2210
2197
  }
2211
2198
  function readKoaResponseHeaders(ctx) {
@@ -2218,8 +2205,7 @@ function readKoaResponseHeaders(ctx) {
2218
2205
  out[k] = String(v);
2219
2206
  }
2220
2207
  }
2221
- catch (e) {
2222
- }
2208
+ catch (_d) { }
2223
2209
  return out;
2224
2210
  }
2225
2211
  function handleKoa(ctx, next, systemName) {
@@ -2276,8 +2262,7 @@ function readFastifyRequestHeaders(request) {
2276
2262
  out[k] = String(v);
2277
2263
  }
2278
2264
  }
2279
- catch (e) {
2280
- }
2265
+ catch (_c) { }
2281
2266
  return out;
2282
2267
  }
2283
2268
  function readFastifyResponseHeaders(reply) {
@@ -2292,8 +2277,7 @@ function readFastifyResponseHeaders(reply) {
2292
2277
  }
2293
2278
  }
2294
2279
  }
2295
- catch (e) {
2296
- }
2280
+ catch (_d) { }
2297
2281
  return out;
2298
2282
  }
2299
2283
  function handleFastify(request, reply, systemName) {
@@ -3082,4 +3066,4 @@ var createWebSocketStore = function (storeId) {
3082
3066
  });
3083
3067
  };
3084
3068
 
3085
- export { ApiBuilder, InsertBuilder, QueryBuilder, UpdateBuilder, WebsocketManager, addClass, addDays, base64ToBlob, base64ToFile, base64ToFileOrBlob, blobToDataURL, buildUUID, calcFileSize, ceil, clearLoginData, compatibleDate, compressImg, computeMoney, convertBase64UrlToBlob, convertCurrency, copyTextToClipboard, createWebSocketStore, darken, dataURLtoBlob, deepEqual, delay, deviceDetection, emitter, fileSizeFormat, filterRepeat, findNodePath, floor, formatBank, formatBytes, formatCentsToYuan, formatEmptyValue, formatFloat, formatMoney, formatPhone, formatPhoneHide, formatTime, formateTimestamp, fromNow, genExportByBlob, generateEnglishLetters, getCookie, getDeviceType, getEnvironment, getFileData, getFromType, getIsComWx, getIsDevelopment, getKeyList, getQueryMap, getQueryString, getQueryVariable, getSvgInfo, getTicket, getToken, getWecomToken, handleFlatStr, hasClass, hexToRgb, hideTextAtIndex, http, httpEnum, humpTurnDashed, intersection, isAllEmpty, isEmail, isEmpty, isExternal, isImage, isIncludeAllChildren, isMobile, isMobileSimple, isPhone, isQQ, isTelephone, isUrl, lighten, newDate, openLink, randomString, recordLogMiddleware, recordLogMiddlewareFastify, recordLogMiddlewareHono, recordLogMiddlewareKoa, recordLogMiddlewareMidway, removeClass, removeTicket, removeToken, rgbToHex, sendLog, setTicket, subBefore, sum, toThousands, toggleClass, trimVal, uuid, validateTwoDecimal, websocketService };
3069
+ export { ApiBuilder, InsertBuilder, QueryBuilder, UpdateBuilder, WebsocketManager, addClass, addDays, base64ToBlob, base64ToFile, blobToDataURL, buildUUID, calcFileSize, ceil, clearLoginData, compatibleDate, compressImg, computeMoney, convertBase64UrlToBlob, convertCurrency, copyTextToClipboard, createWebSocketStore, darken, dataURLtoBlob, deepEqual, delay, deviceDetection, emitter, fileSizeFormat, filterRepeat, findNodePath, floor, formatBank, formatBytes, formatCentsToYuan, formatEmptyValue, formatFloat, formatMoney, formatPhone, formatPhoneHide, formatTime, formateTimestamp, fromNow, genExportByBlob, generateEnglishLetters, getCookie, getDeviceType, getEnvironment, getFileData, getFromType, getIsComWx, getIsDevelopment, getKeyList, getQueryMap, getQueryString, getQueryVariable, getSvgInfo, getTicket, getToken, getWecomToken, handleFlatStr, hasClass, hexToRgb, hideTextAtIndex, http, httpEnum, humpTurnDashed, intersection, isAllEmpty, isEmail, isEmpty, isExternal, isImage, isIncludeAllChildren, isMobile, isMobileSimple, isPhone, isQQ, isTelephone, isUrl, lighten, newDate, openLink, randomString, recordLogMiddleware, recordLogMiddlewareFastify, recordLogMiddlewareHono, recordLogMiddlewareKoa, recordLogMiddlewareMidway, removeClass, removeTicket, removeToken, rgbToHex, sendLog, setTicket, subBefore, sum, toThousands, toggleClass, trimVal, uuid, validateTwoDecimal, websocketService };