@lskjs/utils
Advanced tools
Comparing version 2.85.0 to 2.85.1
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = addClassToHtml; | ||
function addClassToHtml(classname) { | ||
var html = document.getElementsByTagName('html')[0]; | ||
if (!html.className.includes(classname)) { | ||
@@ -13,0 +11,0 @@ html.className += " ".concat(classname); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _differenceWith = _interopRequireDefault(require("lodash/differenceWith")); | ||
var _isEqual = _interopRequireDefault(require("lodash/isEqual")); | ||
var _isObject = _interopRequireDefault(require("lodash/isObject")); | ||
/* eslint-disable no-restricted-syntax */ | ||
/* eslint-disable no-restricted-syntax */ | ||
var antimerge = function antimerge(a, b) { | ||
@@ -22,11 +18,8 @@ if (!(0, _isObject["default"])(a)) return null; | ||
var res = {}; | ||
for (var k in a) { | ||
if (Object.prototype.hasOwnProperty.call(a, k)) { | ||
if ((0, _isEqual["default"])(a[k], b[k])) continue; // eslint-disable-line no-continue | ||
res[k] = a[k]; | ||
} | ||
} | ||
var diff = (0, _differenceWith["default"])(Object.keys(b), Object.keys(a), _isEqual["default"]); | ||
@@ -38,5 +31,4 @@ diff.forEach(function (d) { | ||
}; | ||
var _default = antimerge; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=antimerge.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = antimergeDeep; | ||
var _differenceWith = _interopRequireDefault(require("lodash/differenceWith")); | ||
var _isEqual = _interopRequireDefault(require("lodash/isEqual")); | ||
var _isObject = _interopRequireDefault(require("lodash/isObject")); | ||
/* eslint-disable no-restricted-syntax */ | ||
/* eslint-disable no-restricted-syntax */ | ||
function antimergeDeep(a, b) { | ||
@@ -22,3 +18,2 @@ if (!(0, _isObject["default"])(a)) return null; | ||
var res = {}; | ||
for (var k in a) { | ||
@@ -35,3 +30,2 @@ if ({}.hasOwnProperty.call(a, k)) { | ||
} | ||
var diff = (0, _differenceWith["default"])(Object.keys(b), Object.keys(a), _isEqual["default"]); | ||
@@ -38,0 +32,0 @@ diff.forEach(function (d) { |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = exports.arrayToObject = void 0; | ||
var _fromPairs = _interopRequireDefault(require("lodash/fromPairs")); | ||
var arrayToObject = function arrayToObject() { | ||
@@ -19,3 +16,2 @@ var array = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; | ||
}; | ||
exports.arrayToObject = arrayToObject; | ||
@@ -22,0 +18,0 @@ var _default = arrayToObject; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,16 +8,10 @@ value: true | ||
exports["default"] = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var _default = function _default(target) { | ||
var props = {}; | ||
for (var _len = arguments.length, arrayAppOrProps = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
arrayAppOrProps[_key - 1] = arguments[_key]; | ||
} | ||
arrayAppOrProps.forEach(function (appOrProps) { | ||
@@ -30,3 +23,2 @@ if (appOrProps && appOrProps._module) { | ||
props.parent = appOrProps; | ||
if (props.parent && props.parent.app && props.parent._module === 'app') { | ||
@@ -42,4 +34,3 @@ props.app = props.parent.app; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=assignProps.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,14 +9,10 @@ value: true | ||
exports["default"] = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _importFn = _interopRequireDefault(require("./importFn")); | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
var _default = function _default(fn) { | ||
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() { | ||
return /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { | ||
var action, | ||
_args = arguments; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
_args = arguments; | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -27,7 +23,5 @@ switch (_context.prev = _context.next) { | ||
return (0, _importFn["default"])(fn); | ||
case 2: | ||
action = _context.sent; | ||
return _context.abrupt("return", action.apply(void 0, _args)); | ||
case 4: | ||
@@ -41,4 +35,3 @@ case "end": | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=asyncAction.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,8 +8,6 @@ value: true | ||
exports["default"] = exports.asyncMapValues = void 0; | ||
var _bluebird = _interopRequireDefault(require("bluebird")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
// import { Dictionary, NumericDictionary, DictionaryIterator } from '@types/lodash'; | ||
// import { Dictionary, NumericDictionary, DictionaryIterator } from '@types/lodash'; | ||
// export default <T>( | ||
@@ -20,6 +17,6 @@ // obj: Dictionary<T> | NumericDictionary<T> | null | undefined, | ||
// ): Promise<Dictionary<any>> => Bluebird.props(mapValues(obj, callback)); // @ts-ignore | ||
var asyncMapValues = function asyncMapValues(obj, callback) { | ||
return _bluebird["default"].props((0, _mapValues["default"])(obj, callback)); | ||
}; | ||
exports.asyncMapValues = asyncMapValues; | ||
@@ -26,0 +23,0 @@ var _default = asyncMapValues; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,35 +9,24 @@ value: true | ||
exports["default"] = asyncMapValuesDeep; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _bluebird = _interopRequireDefault(require("bluebird")); | ||
var _isArray = _interopRequireDefault(require("lodash/isArray")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _asyncMapValues = _interopRequireDefault(require("./asyncMapValues")); | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
var DEBUG = false; | ||
var isCollection = function isCollection(value) { | ||
return (0, _isPlainObject["default"])(value) || (0, _isArray["default"])(value); | ||
}; | ||
function asyncMapValuesDeep(_x, _x2) { | ||
return _asyncMapValuesDeep.apply(this, arguments); | ||
} | ||
function _asyncMapValuesDeep() { | ||
_asyncMapValuesDeep = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(value, map) { | ||
_asyncMapValuesDeep = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value, map) { | ||
var reduce, | ||
keys, | ||
mapValue, | ||
reduceValue, | ||
_args = arguments; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
keys, | ||
mapValue, | ||
reduceValue, | ||
_args = arguments; | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -52,3 +41,2 @@ switch (_context.prev = _context.next) { | ||
if (DEBUG) console.log("[".concat(keys.join('.'), "]:"), 'value', value, isCollection(value) ? '[isCollection]' : ''); | ||
if (!(0, _isPlainObject["default"])(value)) { | ||
@@ -58,3 +46,2 @@ _context.next = 9; | ||
} | ||
_context.next = 6; | ||
@@ -64,3 +51,2 @@ return (0, _asyncMapValues["default"])(value, function (v, k) { | ||
}); | ||
case 6: | ||
@@ -70,3 +56,2 @@ mapValue = _context.sent; | ||
break; | ||
case 9: | ||
@@ -77,3 +62,2 @@ if (!(0, _isArray["default"])(value)) { | ||
} | ||
_context.next = 12; | ||
@@ -83,3 +67,2 @@ return _bluebird["default"].map(value, function (v, k) { | ||
}); | ||
case 12: | ||
@@ -89,3 +72,2 @@ mapValue = _context.sent; | ||
break; | ||
case 15: | ||
@@ -96,10 +78,7 @@ _context.next = 17; | ||
}); | ||
case 17: | ||
mapValue = _context.sent; | ||
case 18: | ||
_context.next = 20; | ||
return reduce(mapValue); | ||
case 20: | ||
@@ -110,3 +89,2 @@ reduceValue = _context.sent; | ||
return _context.abrupt("return", reduceValue); | ||
case 23: | ||
@@ -113,0 +91,0 @@ case "end": |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _autobind = _interopRequireDefault(require("@lskjs/autobind")); | ||
var _default = _autobind["default"]; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=autobind.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,15 +8,9 @@ value: true | ||
exports["default"] = void 0; | ||
var _set = _interopRequireDefault(require("lodash/set")); | ||
var _get = _interopRequireDefault(require("lodash/get")); | ||
var _isNumber = _interopRequireDefault(require("lodash/isNumber")); | ||
var _isObject = _interopRequireDefault(require("lodash/isObject")); | ||
var _default = function _default(object, key, val) { | ||
var value = 1; | ||
var count = 1; | ||
if ((0, _isObject["default"])(val)) { | ||
@@ -33,3 +26,2 @@ var _val$value = val.value; | ||
} | ||
var value2 = (0, _get["default"])(object, "".concat(key, ".value"), 0) + value; | ||
@@ -45,4 +37,3 @@ var count2 = (0, _get["default"])(object, "".concat(key, ".count"), 0) + count; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=avg.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _round = _interopRequireDefault(require("lodash/round")); | ||
var groups = { | ||
@@ -20,7 +17,5 @@ 0: '', | ||
}; | ||
var _default = function _default(initNum) { | ||
var group = 0; | ||
var lead = initNum; | ||
while (lead > 1000) { | ||
@@ -30,3 +25,2 @@ lead = Math.floor(lead / 1000); | ||
} | ||
var num = initNum / Math.pow(1000, group); | ||
@@ -39,4 +33,3 @@ var precision = 1; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=beauty.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _camelCase = _interopRequireDefault(require("lodash/camelCase")); | ||
var _mapKeys = _interopRequireDefault(require("./mapKeys")); | ||
var camelCaseKeys = function camelCaseKeys(object, allowLeadUnderscore) { | ||
@@ -20,5 +16,4 @@ return (0, _mapKeys["default"])(object, function (value, key) { | ||
}; | ||
var _default = camelCaseKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=camelCaseKeys.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
@@ -13,4 +12,3 @@ var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=canonize.js.map |
@@ -7,7 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _validateEmail = require("./validateEmail"); | ||
var _default = _validateEmail.canonize; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=canonizeEmail.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,18 +8,10 @@ value: true | ||
exports["default"] = void 0; | ||
var _canonizeEmail = _interopRequireDefault(require("./canonizeEmail")); | ||
var _canonizePhone = _interopRequireDefault(require("./canonizePhone")); | ||
var _canonizeUsername = _interopRequireDefault(require("./canonizeUsername")); | ||
var _validateEmail = _interopRequireDefault(require("./validateEmail")); | ||
var _validatePhone = _interopRequireDefault(require("./validatePhone")); | ||
var _validateUsername = _interopRequireDefault(require("./validateUsername")); | ||
var _default = function _default(rawParams) { | ||
var params = {}; | ||
if (rawParams.login) { | ||
@@ -38,7 +29,5 @@ if ((0, _validateEmail["default"])((0, _canonizeEmail["default"])(rawParams.login))) { | ||
} | ||
if (rawParams.email) { | ||
params.email = (0, _canonizeEmail["default"])(rawParams.email); | ||
} | ||
if (rawParams.phone) { | ||
@@ -48,7 +37,5 @@ params.phone = (0, _canonizePhone["default"])(rawParams.phone); | ||
} | ||
return params; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=canonizeParams.js.map |
@@ -7,7 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _validatePhone = require("./validatePhone"); | ||
var _default = _validatePhone.canonize; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=canonizePhone.js.map |
@@ -7,7 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _validateUsername = require("./validateUsername"); | ||
var _default = _validateUsername.canonize; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=canonizeUsername.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,11 +8,6 @@ value: true | ||
exports["default"] = void 0; | ||
var _get = _interopRequireDefault(require("lodash/get")); | ||
var _set = _interopRequireDefault(require("lodash/set")); | ||
var _forEach = _interopRequireDefault(require("lodash/forEach")); | ||
var _groupBy = _interopRequireDefault(require("lodash/groupBy")); | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
@@ -24,3 +18,2 @@ var _default = function _default(collection, predicate) { | ||
var groups = (0, _groupBy["default"])(collection, predicate); | ||
while (Object.keys(groups).length) { | ||
@@ -30,3 +23,2 @@ (0, _forEach["default"])(groups, function (group, key) { | ||
var chunk = chunks[count]; | ||
if (!chunk) { | ||
@@ -36,6 +28,4 @@ chunk = []; | ||
} | ||
var res = group.pop(); | ||
if (res !== undefined) chunk.push(res); // TODO: подумать повнимательнее | ||
(0, _set["default"])(counts, key, count + 1); | ||
@@ -45,7 +35,5 @@ if (group.length === 0) delete groups[key]; | ||
} | ||
return chunks; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=chunkBy.js.map |
@@ -8,3 +8,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
function chunkString(str, length) { | ||
@@ -14,5 +13,4 @@ if (length <= 0) throw new Error('length should more than 0'); | ||
} | ||
var _default = chunkString; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=chunkString.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct")); | ||
var _default = function _default(ClassOrFunction) { | ||
@@ -17,3 +14,2 @@ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
} | ||
try { | ||
@@ -25,4 +21,3 @@ return (0, _construct2["default"])(ClassOrFunction, args); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=classNewOrFunctionCall.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,6 @@ value: true | ||
exports["default"] = exports.collectExpressReq = void 0; | ||
var _url = _interopRequireDefault(require("url")); | ||
var collectExpressReq = function collectExpressReq(req) { | ||
var formattedUrl = "".concat(req.protocol, "://").concat(req.get('host')).concat(req.originalUrl); | ||
var parsedUrl = _url["default"].parse(formattedUrl); | ||
return { | ||
@@ -38,7 +33,5 @@ href: parsedUrl.href, | ||
}; | ||
exports.collectExpressReq = collectExpressReq; | ||
var _default = collectExpressReq; // pick(req, ['hostname', 'originalUrl', 'path', 'query', 'ip', 'cookies', 'protocol', 'xhr']); | ||
exports["default"] = _default; | ||
//# sourceMappingURL=collectExpressReq.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _get = _interopRequireDefault(require("lodash/get")); | ||
var _default = function _default(obj, name) { | ||
return (0, _get["default"])(obj, "props.".concat(name), (0, _get["default"])(obj, "constructor.".concat(name))); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=collectProp.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _collectProp = _interopRequireDefault(require("./collectProp")); | ||
var _default = function _default(obj) { | ||
@@ -21,4 +18,3 @@ var names = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=collectProps.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _qs = _interopRequireDefault(require("qs")); | ||
/* global window */ | ||
@@ -17,8 +14,6 @@ var _default = function _default() { | ||
console.error('running collectWindowReq on server'); // eslint-disable-line no-console | ||
return null; | ||
} | ||
var _window = window, | ||
location = _window.location; | ||
location = _window.location; | ||
return { | ||
@@ -37,4 +32,3 @@ href: location.href, | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=collectWindowReq.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,13 +8,9 @@ value: true | ||
exports["default"] = composeUrl; | ||
var _getQueryFromParams = _interopRequireDefault(require("./getQueryFromParams")); | ||
function composeUrl() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | ||
_ref$qs = _ref.qs, | ||
qs = _ref$qs === void 0 ? {} : _ref$qs, | ||
url = _ref.url; | ||
_ref$qs = _ref.qs, | ||
qs = _ref$qs === void 0 ? {} : _ref$qs, | ||
url = _ref.url; | ||
var toOrHref = url || ''; | ||
if (qs && Object.keys(qs).length) { | ||
@@ -27,8 +22,6 @@ if (toOrHref.indexOf('?') === -1) { | ||
} | ||
toOrHref += (0, _getQueryFromParams["default"])(qs); | ||
} | ||
return toOrHref; | ||
} | ||
//# sourceMappingURL=composeUrl.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,13 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _pick = _interopRequireDefault(require("lodash/pick")); | ||
var _react = _interopRequireDefault(require("react")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var createContextToProps = function createContextToProps(Context) { | ||
@@ -26,3 +19,2 @@ return function () { | ||
} | ||
return function (Component) { | ||
@@ -37,5 +29,4 @@ return function (props) { | ||
}; | ||
var _default = createContextToProps; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=createContextToProps.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,23 +8,18 @@ value: true | ||
exports["default"] = void 0; | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = require("react"); | ||
var _excluded = ["componentClass", "children"]; | ||
// import filterProps from './filterProps'; | ||
// import filterProps from './filterProps'; | ||
function createDynamicTag() { | ||
var tag = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'div'; | ||
var dynamicTag = function dynamicTag(_ref) { | ||
var componentClass = _ref.componentClass, | ||
children = _ref.children, | ||
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded); | ||
return /*#__PURE__*/(0, _react.createElement)(componentClass, // filterProps(props, componentClass), | ||
children = _ref.children, | ||
props = (0, _objectWithoutProperties2["default"])(_ref, _excluded); | ||
return /*#__PURE__*/(0, _react.createElement)(componentClass, | ||
// filterProps(props, componentClass), | ||
props, children); | ||
}; | ||
dynamicTag.propTypes = { | ||
@@ -40,5 +34,4 @@ componentClass: _propTypes["default"].any, | ||
} | ||
var _default = createDynamicTag; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=createDynamicTag.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,17 +8,12 @@ value: true | ||
exports["default"] = void 0; | ||
var _csvString = _interopRequireDefault(require("csv-string")); | ||
var _default = function _default(csv) { | ||
var result = []; | ||
_csvString["default"].forEach(csv, '\t', function (row) { | ||
result.push(row); | ||
}); | ||
result.splice(result.length - 1, 1); | ||
return result; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=csv2grid.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var cutText = function cutText() { | ||
@@ -19,3 +18,2 @@ var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
var subTextTo = center + Math.floor(length / 2); | ||
if (subTextFrom < 0) { | ||
@@ -25,3 +23,2 @@ subTextFrom = 0; | ||
} | ||
if (subTextTo > textLength) { | ||
@@ -31,22 +28,16 @@ subTextFrom = textLength - length; | ||
} | ||
if (subTextFrom < 0) { | ||
subTextFrom = 0; | ||
} | ||
var subtext = text.substr(subTextFrom, subTextTo - subTextFrom); | ||
if (subTextFrom > 0) { | ||
subtext = "".concat(cutter).concat(subtext.substr(cutterLength)); | ||
} | ||
if (subTextTo < textLength) { | ||
subtext = "".concat(subtext.substr(0, subtext.length - cutterLength)).concat(cutter); | ||
} | ||
return subtext; | ||
}; | ||
var _default = cutText; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=cutText.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,11 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _minSecToSec = _interopRequireDefault(require("./minSecToSec")); | ||
var _newDateThrow = _interopRequireDefault(require("./newDateThrow")); | ||
/* eslint-disable no-param-reassign */ | ||
var _default = function _default(dateStr, targetOffset, fromOffset) { | ||
var date = (0, _newDateThrow["default"])(dateStr); | ||
if (!fromOffset) { | ||
@@ -23,19 +18,16 @@ fromOffset = date.toISOString().substr(23); | ||
} | ||
if (typeof targetOffset === 'string') { | ||
targetOffset = -(0, _minSecToSec["default"])(targetOffset); | ||
} | ||
if (typeof fromOffset === 'string') { | ||
fromOffset = -(0, _minSecToSec["default"])(fromOffset); | ||
} | ||
var deltaMin = targetOffset - fromOffset; | ||
var delta = deltaMin * 60 * 1000; | ||
var res = new Date(+date + delta); // console.log({ date, deltaMin, delta, targetOffset, fromOffset, res }); | ||
var res = new Date(+date + delta); | ||
// console.log({ date, deltaMin, delta, targetOffset, fromOffset, res }); | ||
return res; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=convertTimezone.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
/** | ||
@@ -21,11 +18,9 @@ * | ||
var _minSec$split$map = minSec.split(':').map(Number), | ||
_minSec$split$map2 = (0, _slicedToArray2["default"])(_minSec$split$map, 2), | ||
min = _minSec$split$map2[0], | ||
sec = _minSec$split$map2[1]; | ||
_minSec$split$map2 = (0, _slicedToArray2["default"])(_minSec$split$map, 2), | ||
min = _minSec$split$map2[0], | ||
sec = _minSec$split$map2[1]; | ||
var sign = min / Math.abs(min); | ||
return min * 60 + sec * sign; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=minSecToSec.js.map |
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(dateStr) { | ||
var date = new Date(dateStr); | ||
if (date.toString() === 'Invalid Date') { | ||
@@ -19,7 +17,5 @@ throw { | ||
} | ||
return date; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=newDateThrow.js.map |
@@ -9,20 +9,15 @@ "use strict"; | ||
exports["default"] = outerDecorator; | ||
/** Default debounce duration (in ms) */ | ||
var DEFAULT_DEBOUNCE_DURATION = 500; | ||
/** Debounces the specified function and returns a wrapper function */ | ||
exports.DEFAULT_DEBOUNCE_DURATION = DEFAULT_DEBOUNCE_DURATION; | ||
function debounce(method) { | ||
var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_DEBOUNCE_DURATION; | ||
var timeoutId; | ||
function debounceWrapper() { | ||
var _this = this; | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
debounceWrapper.clear(); | ||
@@ -34,3 +29,2 @@ timeoutId = setTimeout(function () { | ||
} | ||
debounceWrapper.clear = function () { | ||
@@ -42,8 +36,6 @@ if (timeoutId) { | ||
}; | ||
return debounceWrapper; | ||
} | ||
/** Decorates a class method so that it is debounced by the specified duration */ | ||
function outerDecorator(duration) { | ||
@@ -50,0 +42,0 @@ return function innerDecorator(target, key, descriptor) { |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(object, key, value) { | ||
@@ -13,12 +12,8 @@ var index; | ||
key = key.replace(/]/g, ''); | ||
while (true) { | ||
index = key.search(/\.|\[/g); | ||
if (index === -1) { | ||
break; | ||
} | ||
prefix = key.substr(0, index); | ||
if (object[prefix] == null) { | ||
@@ -31,11 +26,8 @@ if (key[index] === '.') { | ||
} | ||
key = key.substr(index + 1); | ||
object = object[prefix]; | ||
} | ||
return object[key] = value; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=deepAssign.js.map |
25
delay.js
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,10 +10,7 @@ value: true | ||
exports.priomiseDelay = priomiseDelay; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == (0, _typeof2["default"])(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
var DELAY_MAX_SETTIMEOUT = 2147483647; | ||
exports.DELAY_MAX_SETTIMEOUT = DELAY_MAX_SETTIMEOUT; | ||
function priomiseDelay(duration) { | ||
@@ -26,13 +22,12 @@ return new Promise(function (resolve) { | ||
}); | ||
} // NOTE: async while because this - https://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values | ||
} | ||
// NOTE: async while because this - https://stackoverflow.com/questions/3468607/why-does-settimeout-break-for-large-millisecond-delay-values | ||
function delay(_x) { | ||
return _delay.apply(this, arguments); | ||
} | ||
function _delay() { | ||
_delay = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(duration) { | ||
_delay = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(duration) { | ||
var step; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -45,5 +40,3 @@ switch (_context.prev = _context.next) { | ||
} | ||
return _context.abrupt("return", priomiseDelay(duration)); | ||
case 2: | ||
@@ -54,8 +47,5 @@ if (!(duration > 0)) { | ||
} | ||
step = duration >= DELAY_MAX_SETTIMEOUT ? DELAY_MAX_SETTIMEOUT : duration; // eslint-disable-next-line no-await-in-loop | ||
_context.next = 6; | ||
return priomiseDelay(step); | ||
case 6: | ||
@@ -66,6 +56,4 @@ // eslint-disable-next-line no-param-reassign | ||
break; | ||
case 9: | ||
return _context.abrupt("return", undefined); | ||
case 10: | ||
@@ -80,5 +68,4 @@ case "end": | ||
} | ||
var _default = delay; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=delay.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = detectHtmlClasses; | ||
var _isTouchDevice = _interopRequireDefault(require("./isTouchDevice")); | ||
function detectHtmlClasses() { | ||
@@ -14,0 +11,0 @@ var classes = []; |
@@ -6,5 +6,3 @@ "use strict"; | ||
}); | ||
var _env = require("@lskjs/env"); | ||
Object.keys(_env).forEach(function (key) { | ||
@@ -11,0 +9,0 @@ if (key === "default" || key === "__esModule") return; |
"use strict"; | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -15,5 +14,3 @@ value: true | ||
}); | ||
var _err = _interopRequireWildcard(require("@lskjs/err")); | ||
Object.keys(_err).forEach(function (key) { | ||
@@ -30,6 +27,4 @@ if (key === "default" || key === "__esModule") return; | ||
}); | ||
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } | ||
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
//# sourceMappingURL=Err.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = escape; | ||
function escape(str) { | ||
@@ -10,0 +9,0 @@ return str.replace(/[^a-zA-Z0-9_-]+/g, '').trim(); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,8 +8,6 @@ value: true | ||
exports.validProps = exports["default"] = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
var _validProps; | ||
/* eslint-disable */ | ||
/* eslint-disable */ | ||
// https://raw.githubusercontent.com/emotion-js/emotion/master/packages/is-prop-valid/src/props.js | ||
@@ -93,6 +90,6 @@ var validProps = (_validProps = { | ||
onLoad: true | ||
}, (0, _defineProperty2["default"])(_validProps, "onError", true), (0, _defineProperty2["default"])(_validProps, "onAnimationStart", true), (0, _defineProperty2["default"])(_validProps, "onAnimationEnd", true), (0, _defineProperty2["default"])(_validProps, "onAnimationIteration", true), (0, _defineProperty2["default"])(_validProps, "onTransitionEnd", true), (0, _defineProperty2["default"])(_validProps, "onToggle", true), (0, _defineProperty2["default"])(_validProps, "children", true), (0, _defineProperty2["default"])(_validProps, "dangerouslySetInnerHTML", true), (0, _defineProperty2["default"])(_validProps, "key", true), (0, _defineProperty2["default"])(_validProps, "ref", true), (0, _defineProperty2["default"])(_validProps, "autoFocus", true), (0, _defineProperty2["default"])(_validProps, "defaultValue", true), (0, _defineProperty2["default"])(_validProps, "defaultChecked", true), (0, _defineProperty2["default"])(_validProps, "innerHTML", true), (0, _defineProperty2["default"])(_validProps, "suppressContentEditableWarning", true), (0, _defineProperty2["default"])(_validProps, "suppressHydrationWarning", true), (0, _defineProperty2["default"])(_validProps, "valueLink", true), (0, _defineProperty2["default"])(_validProps, "accept", true), (0, _defineProperty2["default"])(_validProps, "acceptCharset", true), (0, _defineProperty2["default"])(_validProps, "accessKey", true), (0, _defineProperty2["default"])(_validProps, "action", true), (0, _defineProperty2["default"])(_validProps, "allow", true), (0, _defineProperty2["default"])(_validProps, "allowUserMedia", true), (0, _defineProperty2["default"])(_validProps, "allowPaymentRequest", true), (0, _defineProperty2["default"])(_validProps, "allowFullScreen", true), (0, _defineProperty2["default"])(_validProps, "allowTransparency", true), (0, _defineProperty2["default"])(_validProps, "alt", true), (0, _defineProperty2["default"])(_validProps, "async", true), (0, _defineProperty2["default"])(_validProps, "autoComplete", true), (0, _defineProperty2["default"])(_validProps, "autoPlay", true), (0, _defineProperty2["default"])(_validProps, "capture", true), (0, _defineProperty2["default"])(_validProps, "cellPadding", true), (0, _defineProperty2["default"])(_validProps, "cellSpacing", true), (0, _defineProperty2["default"])(_validProps, "challenge", true), (0, _defineProperty2["default"])(_validProps, "charSet", true), (0, _defineProperty2["default"])(_validProps, "checked", true), (0, _defineProperty2["default"])(_validProps, "cite", true), (0, _defineProperty2["default"])(_validProps, "classID", true), (0, _defineProperty2["default"])(_validProps, "className", true), (0, _defineProperty2["default"])(_validProps, "cols", true), (0, _defineProperty2["default"])(_validProps, "colSpan", true), (0, _defineProperty2["default"])(_validProps, "content", true), (0, _defineProperty2["default"])(_validProps, "contentEditable", true), (0, _defineProperty2["default"])(_validProps, "contextMenu", true), (0, _defineProperty2["default"])(_validProps, "controls", true), (0, _defineProperty2["default"])(_validProps, "controlsList", true), (0, _defineProperty2["default"])(_validProps, "coords", true), (0, _defineProperty2["default"])(_validProps, "crossOrigin", true), (0, _defineProperty2["default"])(_validProps, "data", true), (0, _defineProperty2["default"])(_validProps, "dateTime", true), (0, _defineProperty2["default"])(_validProps, "default", true), (0, _defineProperty2["default"])(_validProps, "defer", true), (0, _defineProperty2["default"])(_validProps, "dir", true), (0, _defineProperty2["default"])(_validProps, "disabled", true), (0, _defineProperty2["default"])(_validProps, "download", true), (0, _defineProperty2["default"])(_validProps, "draggable", true), (0, _defineProperty2["default"])(_validProps, "encType", true), (0, _defineProperty2["default"])(_validProps, "form", true), (0, _defineProperty2["default"])(_validProps, "formAction", true), (0, _defineProperty2["default"])(_validProps, "formEncType", true), (0, _defineProperty2["default"])(_validProps, "formMethod", true), (0, _defineProperty2["default"])(_validProps, "formNoValidate", true), (0, _defineProperty2["default"])(_validProps, "formTarget", true), (0, _defineProperty2["default"])(_validProps, "frameBorder", true), (0, _defineProperty2["default"])(_validProps, "headers", true), (0, _defineProperty2["default"])(_validProps, "height", true), (0, _defineProperty2["default"])(_validProps, "hidden", true), (0, _defineProperty2["default"])(_validProps, "high", true), (0, _defineProperty2["default"])(_validProps, "href", true), (0, _defineProperty2["default"])(_validProps, "hrefLang", true), (0, _defineProperty2["default"])(_validProps, "htmlFor", true), (0, _defineProperty2["default"])(_validProps, "httpEquiv", true), (0, _defineProperty2["default"])(_validProps, "id", true), (0, _defineProperty2["default"])(_validProps, "inputMode", true), (0, _defineProperty2["default"])(_validProps, "integrity", true), (0, _defineProperty2["default"])(_validProps, "is", true), (0, _defineProperty2["default"])(_validProps, "keyParams", true), (0, _defineProperty2["default"])(_validProps, "keyType", true), (0, _defineProperty2["default"])(_validProps, "kind", true), (0, _defineProperty2["default"])(_validProps, "label", true), (0, _defineProperty2["default"])(_validProps, "lang", true), (0, _defineProperty2["default"])(_validProps, "list", true), (0, _defineProperty2["default"])(_validProps, "loop", true), (0, _defineProperty2["default"])(_validProps, "low", true), (0, _defineProperty2["default"])(_validProps, "marginHeight", true), (0, _defineProperty2["default"])(_validProps, "marginWidth", true), (0, _defineProperty2["default"])(_validProps, "max", true), (0, _defineProperty2["default"])(_validProps, "maxLength", true), (0, _defineProperty2["default"])(_validProps, "media", true), (0, _defineProperty2["default"])(_validProps, "mediaGroup", true), (0, _defineProperty2["default"])(_validProps, "method", true), (0, _defineProperty2["default"])(_validProps, "min", true), (0, _defineProperty2["default"])(_validProps, "minLength", true), (0, _defineProperty2["default"])(_validProps, "multiple", true), (0, _defineProperty2["default"])(_validProps, "muted", true), (0, _defineProperty2["default"])(_validProps, "name", true), (0, _defineProperty2["default"])(_validProps, "nonce", true), (0, _defineProperty2["default"])(_validProps, "noValidate", true), (0, _defineProperty2["default"])(_validProps, "open", true), (0, _defineProperty2["default"])(_validProps, "optimum", true), (0, _defineProperty2["default"])(_validProps, "pattern", true), (0, _defineProperty2["default"])(_validProps, "placeholder", true), (0, _defineProperty2["default"])(_validProps, "playsInline", true), (0, _defineProperty2["default"])(_validProps, "poster", true), (0, _defineProperty2["default"])(_validProps, "preload", true), (0, _defineProperty2["default"])(_validProps, "profile", true), (0, _defineProperty2["default"])(_validProps, "radioGroup", true), (0, _defineProperty2["default"])(_validProps, "readOnly", true), (0, _defineProperty2["default"])(_validProps, "referrerPolicy", true), (0, _defineProperty2["default"])(_validProps, "rel", true), (0, _defineProperty2["default"])(_validProps, "required", true), (0, _defineProperty2["default"])(_validProps, "reversed", true), (0, _defineProperty2["default"])(_validProps, "role", true), (0, _defineProperty2["default"])(_validProps, "rows", true), (0, _defineProperty2["default"])(_validProps, "rowSpan", true), (0, _defineProperty2["default"])(_validProps, "sandbox", true), (0, _defineProperty2["default"])(_validProps, "scope", true), (0, _defineProperty2["default"])(_validProps, "scoped", true), (0, _defineProperty2["default"])(_validProps, "scrolling", true), (0, _defineProperty2["default"])(_validProps, "seamless", true), (0, _defineProperty2["default"])(_validProps, "selected", true), (0, _defineProperty2["default"])(_validProps, "shape", true), (0, _defineProperty2["default"])(_validProps, "size", true), (0, _defineProperty2["default"])(_validProps, "sizes", true), (0, _defineProperty2["default"])(_validProps, "slot", true), (0, _defineProperty2["default"])(_validProps, "span", true), (0, _defineProperty2["default"])(_validProps, "spellCheck", true), (0, _defineProperty2["default"])(_validProps, "src", true), (0, _defineProperty2["default"])(_validProps, "srcDoc", true), (0, _defineProperty2["default"])(_validProps, "srcLang", true), (0, _defineProperty2["default"])(_validProps, "srcSet", true), (0, _defineProperty2["default"])(_validProps, "start", true), (0, _defineProperty2["default"])(_validProps, "step", true), (0, _defineProperty2["default"])(_validProps, "style", true), (0, _defineProperty2["default"])(_validProps, "summary", true), (0, _defineProperty2["default"])(_validProps, "tabIndex", true), (0, _defineProperty2["default"])(_validProps, "target", true), (0, _defineProperty2["default"])(_validProps, "title", true), (0, _defineProperty2["default"])(_validProps, "type", true), (0, _defineProperty2["default"])(_validProps, "useMap", true), (0, _defineProperty2["default"])(_validProps, "value", true), (0, _defineProperty2["default"])(_validProps, "width", true), (0, _defineProperty2["default"])(_validProps, "wmode", true), (0, _defineProperty2["default"])(_validProps, "wrap", true), (0, _defineProperty2["default"])(_validProps, "about", true), (0, _defineProperty2["default"])(_validProps, "datatype", true), (0, _defineProperty2["default"])(_validProps, "inlist", true), (0, _defineProperty2["default"])(_validProps, "prefix", true), (0, _defineProperty2["default"])(_validProps, "property", true), (0, _defineProperty2["default"])(_validProps, "resource", true), (0, _defineProperty2["default"])(_validProps, "typeof", true), (0, _defineProperty2["default"])(_validProps, "vocab", true), (0, _defineProperty2["default"])(_validProps, "autoCapitalize", true), (0, _defineProperty2["default"])(_validProps, "autoCorrect", true), (0, _defineProperty2["default"])(_validProps, "autoSave", true), (0, _defineProperty2["default"])(_validProps, "color", true), (0, _defineProperty2["default"])(_validProps, "itemProp", true), (0, _defineProperty2["default"])(_validProps, "itemScope", true), (0, _defineProperty2["default"])(_validProps, "itemType", true), (0, _defineProperty2["default"])(_validProps, "itemID", true), (0, _defineProperty2["default"])(_validProps, "itemRef", true), (0, _defineProperty2["default"])(_validProps, "results", true), (0, _defineProperty2["default"])(_validProps, "security", true), (0, _defineProperty2["default"])(_validProps, "unselectable", true), (0, _defineProperty2["default"])(_validProps, "accentHeight", true), (0, _defineProperty2["default"])(_validProps, "accumulate", true), (0, _defineProperty2["default"])(_validProps, "additive", true), (0, _defineProperty2["default"])(_validProps, "alignmentBaseline", true), (0, _defineProperty2["default"])(_validProps, "allowReorder", true), (0, _defineProperty2["default"])(_validProps, "alphabetic", true), (0, _defineProperty2["default"])(_validProps, "amplitude", true), (0, _defineProperty2["default"])(_validProps, "arabicForm", true), (0, _defineProperty2["default"])(_validProps, "ascent", true), (0, _defineProperty2["default"])(_validProps, "attributeName", true), (0, _defineProperty2["default"])(_validProps, "attributeType", true), (0, _defineProperty2["default"])(_validProps, "autoReverse", true), (0, _defineProperty2["default"])(_validProps, "azimuth", true), (0, _defineProperty2["default"])(_validProps, "baseFrequency", true), (0, _defineProperty2["default"])(_validProps, "baselineShift", true), (0, _defineProperty2["default"])(_validProps, "baseProfile", true), (0, _defineProperty2["default"])(_validProps, "bbox", true), (0, _defineProperty2["default"])(_validProps, "begin", true), (0, _defineProperty2["default"])(_validProps, "bias", true), (0, _defineProperty2["default"])(_validProps, "by", true), (0, _defineProperty2["default"])(_validProps, "calcMode", true), (0, _defineProperty2["default"])(_validProps, "capHeight", true), (0, _defineProperty2["default"])(_validProps, "clip", true), (0, _defineProperty2["default"])(_validProps, "clipPathUnits", true), (0, _defineProperty2["default"])(_validProps, "clipPath", true), (0, _defineProperty2["default"])(_validProps, "clipRule", true), (0, _defineProperty2["default"])(_validProps, "colorInterpolation", true), (0, _defineProperty2["default"])(_validProps, "colorInterpolationFilters", true), (0, _defineProperty2["default"])(_validProps, "colorProfile", true), (0, _defineProperty2["default"])(_validProps, "colorRendering", true), (0, _defineProperty2["default"])(_validProps, "contentScriptType", true), (0, _defineProperty2["default"])(_validProps, "contentStyleType", true), (0, _defineProperty2["default"])(_validProps, "cursor", true), (0, _defineProperty2["default"])(_validProps, "cx", true), (0, _defineProperty2["default"])(_validProps, "cy", true), (0, _defineProperty2["default"])(_validProps, "d", true), (0, _defineProperty2["default"])(_validProps, "decelerate", true), (0, _defineProperty2["default"])(_validProps, "descent", true), (0, _defineProperty2["default"])(_validProps, "diffuseConstant", true), (0, _defineProperty2["default"])(_validProps, "direction", true), (0, _defineProperty2["default"])(_validProps, "display", true), (0, _defineProperty2["default"])(_validProps, "divisor", true), (0, _defineProperty2["default"])(_validProps, "dominantBaseline", true), (0, _defineProperty2["default"])(_validProps, "dur", true), (0, _defineProperty2["default"])(_validProps, "dx", true), (0, _defineProperty2["default"])(_validProps, "dy", true), (0, _defineProperty2["default"])(_validProps, "edgeMode", true), (0, _defineProperty2["default"])(_validProps, "elevation", true), (0, _defineProperty2["default"])(_validProps, "enableBackground", true), (0, _defineProperty2["default"])(_validProps, "end", true), (0, _defineProperty2["default"])(_validProps, "exponent", true), (0, _defineProperty2["default"])(_validProps, "externalResourcesRequired", true), (0, _defineProperty2["default"])(_validProps, "fill", true), (0, _defineProperty2["default"])(_validProps, "fillOpacity", true), (0, _defineProperty2["default"])(_validProps, "fillRule", true), (0, _defineProperty2["default"])(_validProps, "filter", true), (0, _defineProperty2["default"])(_validProps, "filterRes", true), (0, _defineProperty2["default"])(_validProps, "filterUnits", true), (0, _defineProperty2["default"])(_validProps, "floodColor", true), (0, _defineProperty2["default"])(_validProps, "floodOpacity", true), (0, _defineProperty2["default"])(_validProps, "focusable", true), (0, _defineProperty2["default"])(_validProps, "fontFamily", true), (0, _defineProperty2["default"])(_validProps, "fontSize", true), (0, _defineProperty2["default"])(_validProps, "fontSizeAdjust", true), (0, _defineProperty2["default"])(_validProps, "fontStretch", true), (0, _defineProperty2["default"])(_validProps, "fontStyle", true), (0, _defineProperty2["default"])(_validProps, "fontVariant", true), (0, _defineProperty2["default"])(_validProps, "fontWeight", true), (0, _defineProperty2["default"])(_validProps, "format", true), (0, _defineProperty2["default"])(_validProps, "from", true), (0, _defineProperty2["default"])(_validProps, "fr", true), (0, _defineProperty2["default"])(_validProps, "fx", true), (0, _defineProperty2["default"])(_validProps, "fy", true), (0, _defineProperty2["default"])(_validProps, "g1", true), (0, _defineProperty2["default"])(_validProps, "g2", true), (0, _defineProperty2["default"])(_validProps, "glyphName", true), (0, _defineProperty2["default"])(_validProps, "glyphOrientationHorizontal", true), (0, _defineProperty2["default"])(_validProps, "glyphOrientationVertical", true), (0, _defineProperty2["default"])(_validProps, "glyphRef", true), (0, _defineProperty2["default"])(_validProps, "gradientTransform", true), (0, _defineProperty2["default"])(_validProps, "gradientUnits", true), (0, _defineProperty2["default"])(_validProps, "hanging", true), (0, _defineProperty2["default"])(_validProps, "horizAdvX", true), (0, _defineProperty2["default"])(_validProps, "horizOriginX", true), (0, _defineProperty2["default"])(_validProps, "ideographic", true), (0, _defineProperty2["default"])(_validProps, "imageRendering", true), (0, _defineProperty2["default"])(_validProps, "in", true), (0, _defineProperty2["default"])(_validProps, "in2", true), (0, _defineProperty2["default"])(_validProps, "intercept", true), (0, _defineProperty2["default"])(_validProps, "k", true), (0, _defineProperty2["default"])(_validProps, "k1", true), (0, _defineProperty2["default"])(_validProps, "k2", true), (0, _defineProperty2["default"])(_validProps, "k3", true), (0, _defineProperty2["default"])(_validProps, "k4", true), (0, _defineProperty2["default"])(_validProps, "kernelMatrix", true), (0, _defineProperty2["default"])(_validProps, "kernelUnitLength", true), (0, _defineProperty2["default"])(_validProps, "kerning", true), (0, _defineProperty2["default"])(_validProps, "keyPoints", true), (0, _defineProperty2["default"])(_validProps, "keySplines", true), (0, _defineProperty2["default"])(_validProps, "keyTimes", true), (0, _defineProperty2["default"])(_validProps, "lengthAdjust", true), (0, _defineProperty2["default"])(_validProps, "letterSpacing", true), (0, _defineProperty2["default"])(_validProps, "lightingColor", true), (0, _defineProperty2["default"])(_validProps, "limitingConeAngle", true), (0, _defineProperty2["default"])(_validProps, "local", true), (0, _defineProperty2["default"])(_validProps, "markerEnd", true), (0, _defineProperty2["default"])(_validProps, "markerMid", true), (0, _defineProperty2["default"])(_validProps, "markerStart", true), (0, _defineProperty2["default"])(_validProps, "markerHeight", true), (0, _defineProperty2["default"])(_validProps, "markerUnits", true), (0, _defineProperty2["default"])(_validProps, "markerWidth", true), (0, _defineProperty2["default"])(_validProps, "mask", true), (0, _defineProperty2["default"])(_validProps, "maskContentUnits", true), (0, _defineProperty2["default"])(_validProps, "maskUnits", true), (0, _defineProperty2["default"])(_validProps, "mathematical", true), (0, _defineProperty2["default"])(_validProps, "mode", true), (0, _defineProperty2["default"])(_validProps, "numOctaves", true), (0, _defineProperty2["default"])(_validProps, "offset", true), (0, _defineProperty2["default"])(_validProps, "opacity", true), (0, _defineProperty2["default"])(_validProps, "operator", true), (0, _defineProperty2["default"])(_validProps, "order", true), (0, _defineProperty2["default"])(_validProps, "orient", true), (0, _defineProperty2["default"])(_validProps, "orientation", true), (0, _defineProperty2["default"])(_validProps, "origin", true), (0, _defineProperty2["default"])(_validProps, "overflow", true), (0, _defineProperty2["default"])(_validProps, "overlinePosition", true), (0, _defineProperty2["default"])(_validProps, "overlineThickness", true), (0, _defineProperty2["default"])(_validProps, "panose1", true), (0, _defineProperty2["default"])(_validProps, "paintOrder", true), (0, _defineProperty2["default"])(_validProps, "pathLength", true), (0, _defineProperty2["default"])(_validProps, "patternContentUnits", true), (0, _defineProperty2["default"])(_validProps, "patternTransform", true), (0, _defineProperty2["default"])(_validProps, "patternUnits", true), (0, _defineProperty2["default"])(_validProps, "pointerEvents", true), (0, _defineProperty2["default"])(_validProps, "points", true), (0, _defineProperty2["default"])(_validProps, "pointsAtX", true), (0, _defineProperty2["default"])(_validProps, "pointsAtY", true), (0, _defineProperty2["default"])(_validProps, "pointsAtZ", true), (0, _defineProperty2["default"])(_validProps, "preserveAlpha", true), (0, _defineProperty2["default"])(_validProps, "preserveAspectRatio", true), (0, _defineProperty2["default"])(_validProps, "primitiveUnits", true), (0, _defineProperty2["default"])(_validProps, "r", true), (0, _defineProperty2["default"])(_validProps, "radius", true), (0, _defineProperty2["default"])(_validProps, "refX", true), (0, _defineProperty2["default"])(_validProps, "refY", true), (0, _defineProperty2["default"])(_validProps, "renderingIntent", true), (0, _defineProperty2["default"])(_validProps, "repeatCount", true), (0, _defineProperty2["default"])(_validProps, "repeatDur", true), (0, _defineProperty2["default"])(_validProps, "requiredExtensions", true), (0, _defineProperty2["default"])(_validProps, "requiredFeatures", true), (0, _defineProperty2["default"])(_validProps, "restart", true), (0, _defineProperty2["default"])(_validProps, "result", true), (0, _defineProperty2["default"])(_validProps, "rotate", true), (0, _defineProperty2["default"])(_validProps, "rx", true), (0, _defineProperty2["default"])(_validProps, "ry", true), (0, _defineProperty2["default"])(_validProps, "scale", true), (0, _defineProperty2["default"])(_validProps, "seed", true), (0, _defineProperty2["default"])(_validProps, "shapeRendering", true), (0, _defineProperty2["default"])(_validProps, "slope", true), (0, _defineProperty2["default"])(_validProps, "spacing", true), (0, _defineProperty2["default"])(_validProps, "specularConstant", true), (0, _defineProperty2["default"])(_validProps, "specularExponent", true), (0, _defineProperty2["default"])(_validProps, "speed", true), (0, _defineProperty2["default"])(_validProps, "spreadMethod", true), (0, _defineProperty2["default"])(_validProps, "startOffset", true), (0, _defineProperty2["default"])(_validProps, "stdDeviation", true), (0, _defineProperty2["default"])(_validProps, "stemh", true), (0, _defineProperty2["default"])(_validProps, "stemv", true), (0, _defineProperty2["default"])(_validProps, "stitchTiles", true), (0, _defineProperty2["default"])(_validProps, "stopColor", true), (0, _defineProperty2["default"])(_validProps, "stopOpacity", true), (0, _defineProperty2["default"])(_validProps, "strikethroughPosition", true), (0, _defineProperty2["default"])(_validProps, "strikethroughThickness", true), (0, _defineProperty2["default"])(_validProps, "string", true), (0, _defineProperty2["default"])(_validProps, "stroke", true), (0, _defineProperty2["default"])(_validProps, "strokeDasharray", true), (0, _defineProperty2["default"])(_validProps, "strokeDashoffset", true), (0, _defineProperty2["default"])(_validProps, "strokeLinecap", true), (0, _defineProperty2["default"])(_validProps, "strokeLinejoin", true), (0, _defineProperty2["default"])(_validProps, "strokeMiterlimit", true), (0, _defineProperty2["default"])(_validProps, "strokeOpacity", true), (0, _defineProperty2["default"])(_validProps, "strokeWidth", true), (0, _defineProperty2["default"])(_validProps, "surfaceScale", true), (0, _defineProperty2["default"])(_validProps, "systemLanguage", true), (0, _defineProperty2["default"])(_validProps, "tableValues", true), (0, _defineProperty2["default"])(_validProps, "targetX", true), (0, _defineProperty2["default"])(_validProps, "targetY", true), (0, _defineProperty2["default"])(_validProps, "textAnchor", true), (0, _defineProperty2["default"])(_validProps, "textDecoration", true), (0, _defineProperty2["default"])(_validProps, "textRendering", true), (0, _defineProperty2["default"])(_validProps, "textLength", true), (0, _defineProperty2["default"])(_validProps, "to", true), (0, _defineProperty2["default"])(_validProps, "transform", true), (0, _defineProperty2["default"])(_validProps, "u1", true), (0, _defineProperty2["default"])(_validProps, "u2", true), (0, _defineProperty2["default"])(_validProps, "underlinePosition", true), (0, _defineProperty2["default"])(_validProps, "underlineThickness", true), (0, _defineProperty2["default"])(_validProps, "unicode", true), (0, _defineProperty2["default"])(_validProps, "unicodeBidi", true), (0, _defineProperty2["default"])(_validProps, "unicodeRange", true), (0, _defineProperty2["default"])(_validProps, "unitsPerEm", true), (0, _defineProperty2["default"])(_validProps, "vAlphabetic", true), (0, _defineProperty2["default"])(_validProps, "vHanging", true), (0, _defineProperty2["default"])(_validProps, "vIdeographic", true), (0, _defineProperty2["default"])(_validProps, "vMathematical", true), (0, _defineProperty2["default"])(_validProps, "values", true), (0, _defineProperty2["default"])(_validProps, "vectorEffect", true), (0, _defineProperty2["default"])(_validProps, "version", true), (0, _defineProperty2["default"])(_validProps, "vertAdvY", true), (0, _defineProperty2["default"])(_validProps, "vertOriginX", true), (0, _defineProperty2["default"])(_validProps, "vertOriginY", true), (0, _defineProperty2["default"])(_validProps, "viewBox", true), (0, _defineProperty2["default"])(_validProps, "viewTarget", true), (0, _defineProperty2["default"])(_validProps, "visibility", true), (0, _defineProperty2["default"])(_validProps, "widths", true), (0, _defineProperty2["default"])(_validProps, "wordSpacing", true), (0, _defineProperty2["default"])(_validProps, "writingMode", true), (0, _defineProperty2["default"])(_validProps, "x", true), (0, _defineProperty2["default"])(_validProps, "xHeight", true), (0, _defineProperty2["default"])(_validProps, "x1", true), (0, _defineProperty2["default"])(_validProps, "x2", true), (0, _defineProperty2["default"])(_validProps, "xChannelSelector", true), (0, _defineProperty2["default"])(_validProps, "xlinkActuate", true), (0, _defineProperty2["default"])(_validProps, "xlinkArcrole", true), (0, _defineProperty2["default"])(_validProps, "xlinkHref", true), (0, _defineProperty2["default"])(_validProps, "xlinkRole", true), (0, _defineProperty2["default"])(_validProps, "xlinkShow", true), (0, _defineProperty2["default"])(_validProps, "xlinkTitle", true), (0, _defineProperty2["default"])(_validProps, "xlinkType", true), (0, _defineProperty2["default"])(_validProps, "xmlBase", true), (0, _defineProperty2["default"])(_validProps, "xmlns", true), (0, _defineProperty2["default"])(_validProps, "xmlnsXlink", true), (0, _defineProperty2["default"])(_validProps, "xmlLang", true), (0, _defineProperty2["default"])(_validProps, "xmlSpace", true), (0, _defineProperty2["default"])(_validProps, "y", true), (0, _defineProperty2["default"])(_validProps, "y1", true), (0, _defineProperty2["default"])(_validProps, "y2", true), (0, _defineProperty2["default"])(_validProps, "yChannelSelector", true), (0, _defineProperty2["default"])(_validProps, "z", true), (0, _defineProperty2["default"])(_validProps, "zoomAndPan", true), (0, _defineProperty2["default"])(_validProps, "for", true), (0, _defineProperty2["default"])(_validProps, "class", true), (0, _defineProperty2["default"])(_validProps, "autofocus", true), _validProps); // export const validProps = ['value', 'type', 'onChange']; | ||
}, (0, _defineProperty2["default"])(_validProps, "onError", true), (0, _defineProperty2["default"])(_validProps, "onAnimationStart", true), (0, _defineProperty2["default"])(_validProps, "onAnimationEnd", true), (0, _defineProperty2["default"])(_validProps, "onAnimationIteration", true), (0, _defineProperty2["default"])(_validProps, "onTransitionEnd", true), (0, _defineProperty2["default"])(_validProps, "onToggle", true), (0, _defineProperty2["default"])(_validProps, "children", true), (0, _defineProperty2["default"])(_validProps, "dangerouslySetInnerHTML", true), (0, _defineProperty2["default"])(_validProps, "key", true), (0, _defineProperty2["default"])(_validProps, "ref", true), (0, _defineProperty2["default"])(_validProps, "autoFocus", true), (0, _defineProperty2["default"])(_validProps, "defaultValue", true), (0, _defineProperty2["default"])(_validProps, "defaultChecked", true), (0, _defineProperty2["default"])(_validProps, "innerHTML", true), (0, _defineProperty2["default"])(_validProps, "suppressContentEditableWarning", true), (0, _defineProperty2["default"])(_validProps, "suppressHydrationWarning", true), (0, _defineProperty2["default"])(_validProps, "valueLink", true), (0, _defineProperty2["default"])(_validProps, "accept", true), (0, _defineProperty2["default"])(_validProps, "acceptCharset", true), (0, _defineProperty2["default"])(_validProps, "accessKey", true), (0, _defineProperty2["default"])(_validProps, "action", true), (0, _defineProperty2["default"])(_validProps, "allow", true), (0, _defineProperty2["default"])(_validProps, "allowUserMedia", true), (0, _defineProperty2["default"])(_validProps, "allowPaymentRequest", true), (0, _defineProperty2["default"])(_validProps, "allowFullScreen", true), (0, _defineProperty2["default"])(_validProps, "allowTransparency", true), (0, _defineProperty2["default"])(_validProps, "alt", true), (0, _defineProperty2["default"])(_validProps, "async", true), (0, _defineProperty2["default"])(_validProps, "autoComplete", true), (0, _defineProperty2["default"])(_validProps, "autoPlay", true), (0, _defineProperty2["default"])(_validProps, "capture", true), (0, _defineProperty2["default"])(_validProps, "cellPadding", true), (0, _defineProperty2["default"])(_validProps, "cellSpacing", true), (0, _defineProperty2["default"])(_validProps, "challenge", true), (0, _defineProperty2["default"])(_validProps, "charSet", true), (0, _defineProperty2["default"])(_validProps, "checked", true), (0, _defineProperty2["default"])(_validProps, "cite", true), (0, _defineProperty2["default"])(_validProps, "classID", true), (0, _defineProperty2["default"])(_validProps, "className", true), (0, _defineProperty2["default"])(_validProps, "cols", true), (0, _defineProperty2["default"])(_validProps, "colSpan", true), (0, _defineProperty2["default"])(_validProps, "content", true), (0, _defineProperty2["default"])(_validProps, "contentEditable", true), (0, _defineProperty2["default"])(_validProps, "contextMenu", true), (0, _defineProperty2["default"])(_validProps, "controls", true), (0, _defineProperty2["default"])(_validProps, "controlsList", true), (0, _defineProperty2["default"])(_validProps, "coords", true), (0, _defineProperty2["default"])(_validProps, "crossOrigin", true), (0, _defineProperty2["default"])(_validProps, "data", true), (0, _defineProperty2["default"])(_validProps, "dateTime", true), (0, _defineProperty2["default"])(_validProps, "default", true), (0, _defineProperty2["default"])(_validProps, "defer", true), (0, _defineProperty2["default"])(_validProps, "dir", true), (0, _defineProperty2["default"])(_validProps, "disabled", true), (0, _defineProperty2["default"])(_validProps, "download", true), (0, _defineProperty2["default"])(_validProps, "draggable", true), (0, _defineProperty2["default"])(_validProps, "encType", true), (0, _defineProperty2["default"])(_validProps, "form", true), (0, _defineProperty2["default"])(_validProps, "formAction", true), (0, _defineProperty2["default"])(_validProps, "formEncType", true), (0, _defineProperty2["default"])(_validProps, "formMethod", true), (0, _defineProperty2["default"])(_validProps, "formNoValidate", true), (0, _defineProperty2["default"])(_validProps, "formTarget", true), (0, _defineProperty2["default"])(_validProps, "frameBorder", true), (0, _defineProperty2["default"])(_validProps, "headers", true), (0, _defineProperty2["default"])(_validProps, "height", true), (0, _defineProperty2["default"])(_validProps, "hidden", true), (0, _defineProperty2["default"])(_validProps, "high", true), (0, _defineProperty2["default"])(_validProps, "href", true), (0, _defineProperty2["default"])(_validProps, "hrefLang", true), (0, _defineProperty2["default"])(_validProps, "htmlFor", true), (0, _defineProperty2["default"])(_validProps, "httpEquiv", true), (0, _defineProperty2["default"])(_validProps, "id", true), (0, _defineProperty2["default"])(_validProps, "inputMode", true), (0, _defineProperty2["default"])(_validProps, "integrity", true), (0, _defineProperty2["default"])(_validProps, "is", true), (0, _defineProperty2["default"])(_validProps, "keyParams", true), (0, _defineProperty2["default"])(_validProps, "keyType", true), (0, _defineProperty2["default"])(_validProps, "kind", true), (0, _defineProperty2["default"])(_validProps, "label", true), (0, _defineProperty2["default"])(_validProps, "lang", true), (0, _defineProperty2["default"])(_validProps, "list", true), (0, _defineProperty2["default"])(_validProps, "loop", true), (0, _defineProperty2["default"])(_validProps, "low", true), (0, _defineProperty2["default"])(_validProps, "marginHeight", true), (0, _defineProperty2["default"])(_validProps, "marginWidth", true), (0, _defineProperty2["default"])(_validProps, "max", true), (0, _defineProperty2["default"])(_validProps, "maxLength", true), (0, _defineProperty2["default"])(_validProps, "media", true), (0, _defineProperty2["default"])(_validProps, "mediaGroup", true), (0, _defineProperty2["default"])(_validProps, "method", true), (0, _defineProperty2["default"])(_validProps, "min", true), (0, _defineProperty2["default"])(_validProps, "minLength", true), (0, _defineProperty2["default"])(_validProps, "multiple", true), (0, _defineProperty2["default"])(_validProps, "muted", true), (0, _defineProperty2["default"])(_validProps, "name", true), (0, _defineProperty2["default"])(_validProps, "nonce", true), (0, _defineProperty2["default"])(_validProps, "noValidate", true), (0, _defineProperty2["default"])(_validProps, "open", true), (0, _defineProperty2["default"])(_validProps, "optimum", true), (0, _defineProperty2["default"])(_validProps, "pattern", true), (0, _defineProperty2["default"])(_validProps, "placeholder", true), (0, _defineProperty2["default"])(_validProps, "playsInline", true), (0, _defineProperty2["default"])(_validProps, "poster", true), (0, _defineProperty2["default"])(_validProps, "preload", true), (0, _defineProperty2["default"])(_validProps, "profile", true), (0, _defineProperty2["default"])(_validProps, "radioGroup", true), (0, _defineProperty2["default"])(_validProps, "readOnly", true), (0, _defineProperty2["default"])(_validProps, "referrerPolicy", true), (0, _defineProperty2["default"])(_validProps, "rel", true), (0, _defineProperty2["default"])(_validProps, "required", true), (0, _defineProperty2["default"])(_validProps, "reversed", true), (0, _defineProperty2["default"])(_validProps, "role", true), (0, _defineProperty2["default"])(_validProps, "rows", true), (0, _defineProperty2["default"])(_validProps, "rowSpan", true), (0, _defineProperty2["default"])(_validProps, "sandbox", true), (0, _defineProperty2["default"])(_validProps, "scope", true), (0, _defineProperty2["default"])(_validProps, "scoped", true), (0, _defineProperty2["default"])(_validProps, "scrolling", true), (0, _defineProperty2["default"])(_validProps, "seamless", true), (0, _defineProperty2["default"])(_validProps, "selected", true), (0, _defineProperty2["default"])(_validProps, "shape", true), (0, _defineProperty2["default"])(_validProps, "size", true), (0, _defineProperty2["default"])(_validProps, "sizes", true), (0, _defineProperty2["default"])(_validProps, "slot", true), (0, _defineProperty2["default"])(_validProps, "span", true), (0, _defineProperty2["default"])(_validProps, "spellCheck", true), (0, _defineProperty2["default"])(_validProps, "src", true), (0, _defineProperty2["default"])(_validProps, "srcDoc", true), (0, _defineProperty2["default"])(_validProps, "srcLang", true), (0, _defineProperty2["default"])(_validProps, "srcSet", true), (0, _defineProperty2["default"])(_validProps, "start", true), (0, _defineProperty2["default"])(_validProps, "step", true), (0, _defineProperty2["default"])(_validProps, "style", true), (0, _defineProperty2["default"])(_validProps, "summary", true), (0, _defineProperty2["default"])(_validProps, "tabIndex", true), (0, _defineProperty2["default"])(_validProps, "target", true), (0, _defineProperty2["default"])(_validProps, "title", true), (0, _defineProperty2["default"])(_validProps, "type", true), (0, _defineProperty2["default"])(_validProps, "useMap", true), (0, _defineProperty2["default"])(_validProps, "value", true), (0, _defineProperty2["default"])(_validProps, "width", true), (0, _defineProperty2["default"])(_validProps, "wmode", true), (0, _defineProperty2["default"])(_validProps, "wrap", true), (0, _defineProperty2["default"])(_validProps, "about", true), (0, _defineProperty2["default"])(_validProps, "datatype", true), (0, _defineProperty2["default"])(_validProps, "inlist", true), (0, _defineProperty2["default"])(_validProps, "prefix", true), (0, _defineProperty2["default"])(_validProps, "property", true), (0, _defineProperty2["default"])(_validProps, "resource", true), (0, _defineProperty2["default"])(_validProps, "typeof", true), (0, _defineProperty2["default"])(_validProps, "vocab", true), (0, _defineProperty2["default"])(_validProps, "autoCapitalize", true), (0, _defineProperty2["default"])(_validProps, "autoCorrect", true), (0, _defineProperty2["default"])(_validProps, "autoSave", true), (0, _defineProperty2["default"])(_validProps, "color", true), (0, _defineProperty2["default"])(_validProps, "itemProp", true), (0, _defineProperty2["default"])(_validProps, "itemScope", true), (0, _defineProperty2["default"])(_validProps, "itemType", true), (0, _defineProperty2["default"])(_validProps, "itemID", true), (0, _defineProperty2["default"])(_validProps, "itemRef", true), (0, _defineProperty2["default"])(_validProps, "results", true), (0, _defineProperty2["default"])(_validProps, "security", true), (0, _defineProperty2["default"])(_validProps, "unselectable", true), (0, _defineProperty2["default"])(_validProps, "accentHeight", true), (0, _defineProperty2["default"])(_validProps, "accumulate", true), (0, _defineProperty2["default"])(_validProps, "additive", true), (0, _defineProperty2["default"])(_validProps, "alignmentBaseline", true), (0, _defineProperty2["default"])(_validProps, "allowReorder", true), (0, _defineProperty2["default"])(_validProps, "alphabetic", true), (0, _defineProperty2["default"])(_validProps, "amplitude", true), (0, _defineProperty2["default"])(_validProps, "arabicForm", true), (0, _defineProperty2["default"])(_validProps, "ascent", true), (0, _defineProperty2["default"])(_validProps, "attributeName", true), (0, _defineProperty2["default"])(_validProps, "attributeType", true), (0, _defineProperty2["default"])(_validProps, "autoReverse", true), (0, _defineProperty2["default"])(_validProps, "azimuth", true), (0, _defineProperty2["default"])(_validProps, "baseFrequency", true), (0, _defineProperty2["default"])(_validProps, "baselineShift", true), (0, _defineProperty2["default"])(_validProps, "baseProfile", true), (0, _defineProperty2["default"])(_validProps, "bbox", true), (0, _defineProperty2["default"])(_validProps, "begin", true), (0, _defineProperty2["default"])(_validProps, "bias", true), (0, _defineProperty2["default"])(_validProps, "by", true), (0, _defineProperty2["default"])(_validProps, "calcMode", true), (0, _defineProperty2["default"])(_validProps, "capHeight", true), (0, _defineProperty2["default"])(_validProps, "clip", true), (0, _defineProperty2["default"])(_validProps, "clipPathUnits", true), (0, _defineProperty2["default"])(_validProps, "clipPath", true), (0, _defineProperty2["default"])(_validProps, "clipRule", true), (0, _defineProperty2["default"])(_validProps, "colorInterpolation", true), (0, _defineProperty2["default"])(_validProps, "colorInterpolationFilters", true), (0, _defineProperty2["default"])(_validProps, "colorProfile", true), (0, _defineProperty2["default"])(_validProps, "colorRendering", true), (0, _defineProperty2["default"])(_validProps, "contentScriptType", true), (0, _defineProperty2["default"])(_validProps, "contentStyleType", true), (0, _defineProperty2["default"])(_validProps, "cursor", true), (0, _defineProperty2["default"])(_validProps, "cx", true), (0, _defineProperty2["default"])(_validProps, "cy", true), (0, _defineProperty2["default"])(_validProps, "d", true), (0, _defineProperty2["default"])(_validProps, "decelerate", true), (0, _defineProperty2["default"])(_validProps, "descent", true), (0, _defineProperty2["default"])(_validProps, "diffuseConstant", true), (0, _defineProperty2["default"])(_validProps, "direction", true), (0, _defineProperty2["default"])(_validProps, "display", true), (0, _defineProperty2["default"])(_validProps, "divisor", true), (0, _defineProperty2["default"])(_validProps, "dominantBaseline", true), (0, _defineProperty2["default"])(_validProps, "dur", true), (0, _defineProperty2["default"])(_validProps, "dx", true), (0, _defineProperty2["default"])(_validProps, "dy", true), (0, _defineProperty2["default"])(_validProps, "edgeMode", true), (0, _defineProperty2["default"])(_validProps, "elevation", true), (0, _defineProperty2["default"])(_validProps, "enableBackground", true), (0, _defineProperty2["default"])(_validProps, "end", true), (0, _defineProperty2["default"])(_validProps, "exponent", true), (0, _defineProperty2["default"])(_validProps, "externalResourcesRequired", true), (0, _defineProperty2["default"])(_validProps, "fill", true), (0, _defineProperty2["default"])(_validProps, "fillOpacity", true), (0, _defineProperty2["default"])(_validProps, "fillRule", true), (0, _defineProperty2["default"])(_validProps, "filter", true), (0, _defineProperty2["default"])(_validProps, "filterRes", true), (0, _defineProperty2["default"])(_validProps, "filterUnits", true), (0, _defineProperty2["default"])(_validProps, "floodColor", true), (0, _defineProperty2["default"])(_validProps, "floodOpacity", true), (0, _defineProperty2["default"])(_validProps, "focusable", true), (0, _defineProperty2["default"])(_validProps, "fontFamily", true), (0, _defineProperty2["default"])(_validProps, "fontSize", true), (0, _defineProperty2["default"])(_validProps, "fontSizeAdjust", true), (0, _defineProperty2["default"])(_validProps, "fontStretch", true), (0, _defineProperty2["default"])(_validProps, "fontStyle", true), (0, _defineProperty2["default"])(_validProps, "fontVariant", true), (0, _defineProperty2["default"])(_validProps, "fontWeight", true), (0, _defineProperty2["default"])(_validProps, "format", true), (0, _defineProperty2["default"])(_validProps, "from", true), (0, _defineProperty2["default"])(_validProps, "fr", true), (0, _defineProperty2["default"])(_validProps, "fx", true), (0, _defineProperty2["default"])(_validProps, "fy", true), (0, _defineProperty2["default"])(_validProps, "g1", true), (0, _defineProperty2["default"])(_validProps, "g2", true), (0, _defineProperty2["default"])(_validProps, "glyphName", true), (0, _defineProperty2["default"])(_validProps, "glyphOrientationHorizontal", true), (0, _defineProperty2["default"])(_validProps, "glyphOrientationVertical", true), (0, _defineProperty2["default"])(_validProps, "glyphRef", true), (0, _defineProperty2["default"])(_validProps, "gradientTransform", true), (0, _defineProperty2["default"])(_validProps, "gradientUnits", true), (0, _defineProperty2["default"])(_validProps, "hanging", true), (0, _defineProperty2["default"])(_validProps, "horizAdvX", true), (0, _defineProperty2["default"])(_validProps, "horizOriginX", true), (0, _defineProperty2["default"])(_validProps, "ideographic", true), (0, _defineProperty2["default"])(_validProps, "imageRendering", true), (0, _defineProperty2["default"])(_validProps, "in", true), (0, _defineProperty2["default"])(_validProps, "in2", true), (0, _defineProperty2["default"])(_validProps, "intercept", true), (0, _defineProperty2["default"])(_validProps, "k", true), (0, _defineProperty2["default"])(_validProps, "k1", true), (0, _defineProperty2["default"])(_validProps, "k2", true), (0, _defineProperty2["default"])(_validProps, "k3", true), (0, _defineProperty2["default"])(_validProps, "k4", true), (0, _defineProperty2["default"])(_validProps, "kernelMatrix", true), (0, _defineProperty2["default"])(_validProps, "kernelUnitLength", true), (0, _defineProperty2["default"])(_validProps, "kerning", true), (0, _defineProperty2["default"])(_validProps, "keyPoints", true), (0, _defineProperty2["default"])(_validProps, "keySplines", true), (0, _defineProperty2["default"])(_validProps, "keyTimes", true), (0, _defineProperty2["default"])(_validProps, "lengthAdjust", true), (0, _defineProperty2["default"])(_validProps, "letterSpacing", true), (0, _defineProperty2["default"])(_validProps, "lightingColor", true), (0, _defineProperty2["default"])(_validProps, "limitingConeAngle", true), (0, _defineProperty2["default"])(_validProps, "local", true), (0, _defineProperty2["default"])(_validProps, "markerEnd", true), (0, _defineProperty2["default"])(_validProps, "markerMid", true), (0, _defineProperty2["default"])(_validProps, "markerStart", true), (0, _defineProperty2["default"])(_validProps, "markerHeight", true), (0, _defineProperty2["default"])(_validProps, "markerUnits", true), (0, _defineProperty2["default"])(_validProps, "markerWidth", true), (0, _defineProperty2["default"])(_validProps, "mask", true), (0, _defineProperty2["default"])(_validProps, "maskContentUnits", true), (0, _defineProperty2["default"])(_validProps, "maskUnits", true), (0, _defineProperty2["default"])(_validProps, "mathematical", true), (0, _defineProperty2["default"])(_validProps, "mode", true), (0, _defineProperty2["default"])(_validProps, "numOctaves", true), (0, _defineProperty2["default"])(_validProps, "offset", true), (0, _defineProperty2["default"])(_validProps, "opacity", true), (0, _defineProperty2["default"])(_validProps, "operator", true), (0, _defineProperty2["default"])(_validProps, "order", true), (0, _defineProperty2["default"])(_validProps, "orient", true), (0, _defineProperty2["default"])(_validProps, "orientation", true), (0, _defineProperty2["default"])(_validProps, "origin", true), (0, _defineProperty2["default"])(_validProps, "overflow", true), (0, _defineProperty2["default"])(_validProps, "overlinePosition", true), (0, _defineProperty2["default"])(_validProps, "overlineThickness", true), (0, _defineProperty2["default"])(_validProps, "panose1", true), (0, _defineProperty2["default"])(_validProps, "paintOrder", true), (0, _defineProperty2["default"])(_validProps, "pathLength", true), (0, _defineProperty2["default"])(_validProps, "patternContentUnits", true), (0, _defineProperty2["default"])(_validProps, "patternTransform", true), (0, _defineProperty2["default"])(_validProps, "patternUnits", true), (0, _defineProperty2["default"])(_validProps, "pointerEvents", true), (0, _defineProperty2["default"])(_validProps, "points", true), (0, _defineProperty2["default"])(_validProps, "pointsAtX", true), (0, _defineProperty2["default"])(_validProps, "pointsAtY", true), (0, _defineProperty2["default"])(_validProps, "pointsAtZ", true), (0, _defineProperty2["default"])(_validProps, "preserveAlpha", true), (0, _defineProperty2["default"])(_validProps, "preserveAspectRatio", true), (0, _defineProperty2["default"])(_validProps, "primitiveUnits", true), (0, _defineProperty2["default"])(_validProps, "r", true), (0, _defineProperty2["default"])(_validProps, "radius", true), (0, _defineProperty2["default"])(_validProps, "refX", true), (0, _defineProperty2["default"])(_validProps, "refY", true), (0, _defineProperty2["default"])(_validProps, "renderingIntent", true), (0, _defineProperty2["default"])(_validProps, "repeatCount", true), (0, _defineProperty2["default"])(_validProps, "repeatDur", true), (0, _defineProperty2["default"])(_validProps, "requiredExtensions", true), (0, _defineProperty2["default"])(_validProps, "requiredFeatures", true), (0, _defineProperty2["default"])(_validProps, "restart", true), (0, _defineProperty2["default"])(_validProps, "result", true), (0, _defineProperty2["default"])(_validProps, "rotate", true), (0, _defineProperty2["default"])(_validProps, "rx", true), (0, _defineProperty2["default"])(_validProps, "ry", true), (0, _defineProperty2["default"])(_validProps, "scale", true), (0, _defineProperty2["default"])(_validProps, "seed", true), (0, _defineProperty2["default"])(_validProps, "shapeRendering", true), (0, _defineProperty2["default"])(_validProps, "slope", true), (0, _defineProperty2["default"])(_validProps, "spacing", true), (0, _defineProperty2["default"])(_validProps, "specularConstant", true), (0, _defineProperty2["default"])(_validProps, "specularExponent", true), (0, _defineProperty2["default"])(_validProps, "speed", true), (0, _defineProperty2["default"])(_validProps, "spreadMethod", true), (0, _defineProperty2["default"])(_validProps, "startOffset", true), (0, _defineProperty2["default"])(_validProps, "stdDeviation", true), (0, _defineProperty2["default"])(_validProps, "stemh", true), (0, _defineProperty2["default"])(_validProps, "stemv", true), (0, _defineProperty2["default"])(_validProps, "stitchTiles", true), (0, _defineProperty2["default"])(_validProps, "stopColor", true), (0, _defineProperty2["default"])(_validProps, "stopOpacity", true), (0, _defineProperty2["default"])(_validProps, "strikethroughPosition", true), (0, _defineProperty2["default"])(_validProps, "strikethroughThickness", true), (0, _defineProperty2["default"])(_validProps, "string", true), (0, _defineProperty2["default"])(_validProps, "stroke", true), (0, _defineProperty2["default"])(_validProps, "strokeDasharray", true), (0, _defineProperty2["default"])(_validProps, "strokeDashoffset", true), (0, _defineProperty2["default"])(_validProps, "strokeLinecap", true), (0, _defineProperty2["default"])(_validProps, "strokeLinejoin", true), (0, _defineProperty2["default"])(_validProps, "strokeMiterlimit", true), (0, _defineProperty2["default"])(_validProps, "strokeOpacity", true), (0, _defineProperty2["default"])(_validProps, "strokeWidth", true), (0, _defineProperty2["default"])(_validProps, "surfaceScale", true), (0, _defineProperty2["default"])(_validProps, "systemLanguage", true), (0, _defineProperty2["default"])(_validProps, "tableValues", true), (0, _defineProperty2["default"])(_validProps, "targetX", true), (0, _defineProperty2["default"])(_validProps, "targetY", true), (0, _defineProperty2["default"])(_validProps, "textAnchor", true), (0, _defineProperty2["default"])(_validProps, "textDecoration", true), (0, _defineProperty2["default"])(_validProps, "textRendering", true), (0, _defineProperty2["default"])(_validProps, "textLength", true), (0, _defineProperty2["default"])(_validProps, "to", true), (0, _defineProperty2["default"])(_validProps, "transform", true), (0, _defineProperty2["default"])(_validProps, "u1", true), (0, _defineProperty2["default"])(_validProps, "u2", true), (0, _defineProperty2["default"])(_validProps, "underlinePosition", true), (0, _defineProperty2["default"])(_validProps, "underlineThickness", true), (0, _defineProperty2["default"])(_validProps, "unicode", true), (0, _defineProperty2["default"])(_validProps, "unicodeBidi", true), (0, _defineProperty2["default"])(_validProps, "unicodeRange", true), (0, _defineProperty2["default"])(_validProps, "unitsPerEm", true), (0, _defineProperty2["default"])(_validProps, "vAlphabetic", true), (0, _defineProperty2["default"])(_validProps, "vHanging", true), (0, _defineProperty2["default"])(_validProps, "vIdeographic", true), (0, _defineProperty2["default"])(_validProps, "vMathematical", true), (0, _defineProperty2["default"])(_validProps, "values", true), (0, _defineProperty2["default"])(_validProps, "vectorEffect", true), (0, _defineProperty2["default"])(_validProps, "version", true), (0, _defineProperty2["default"])(_validProps, "vertAdvY", true), (0, _defineProperty2["default"])(_validProps, "vertOriginX", true), (0, _defineProperty2["default"])(_validProps, "vertOriginY", true), (0, _defineProperty2["default"])(_validProps, "viewBox", true), (0, _defineProperty2["default"])(_validProps, "viewTarget", true), (0, _defineProperty2["default"])(_validProps, "visibility", true), (0, _defineProperty2["default"])(_validProps, "widths", true), (0, _defineProperty2["default"])(_validProps, "wordSpacing", true), (0, _defineProperty2["default"])(_validProps, "writingMode", true), (0, _defineProperty2["default"])(_validProps, "x", true), (0, _defineProperty2["default"])(_validProps, "xHeight", true), (0, _defineProperty2["default"])(_validProps, "x1", true), (0, _defineProperty2["default"])(_validProps, "x2", true), (0, _defineProperty2["default"])(_validProps, "xChannelSelector", true), (0, _defineProperty2["default"])(_validProps, "xlinkActuate", true), (0, _defineProperty2["default"])(_validProps, "xlinkArcrole", true), (0, _defineProperty2["default"])(_validProps, "xlinkHref", true), (0, _defineProperty2["default"])(_validProps, "xlinkRole", true), (0, _defineProperty2["default"])(_validProps, "xlinkShow", true), (0, _defineProperty2["default"])(_validProps, "xlinkTitle", true), (0, _defineProperty2["default"])(_validProps, "xlinkType", true), (0, _defineProperty2["default"])(_validProps, "xmlBase", true), (0, _defineProperty2["default"])(_validProps, "xmlns", true), (0, _defineProperty2["default"])(_validProps, "xmlnsXlink", true), (0, _defineProperty2["default"])(_validProps, "xmlLang", true), (0, _defineProperty2["default"])(_validProps, "xmlSpace", true), (0, _defineProperty2["default"])(_validProps, "y", true), (0, _defineProperty2["default"])(_validProps, "y1", true), (0, _defineProperty2["default"])(_validProps, "y2", true), (0, _defineProperty2["default"])(_validProps, "yChannelSelector", true), (0, _defineProperty2["default"])(_validProps, "z", true), (0, _defineProperty2["default"])(_validProps, "zoomAndPan", true), (0, _defineProperty2["default"])(_validProps, "for", true), (0, _defineProperty2["default"])(_validProps, "class", true), (0, _defineProperty2["default"])(_validProps, "autofocus", true), _validProps); | ||
// export const validProps = ['value', 'type', 'onChange']; | ||
exports.validProps = validProps; | ||
var _default = function _default(props, Component) { | ||
@@ -103,3 +100,2 @@ // console.log('filterProps', props, Component, typeof Component !== 'string'); | ||
} | ||
var filterdProps = {}; | ||
@@ -109,9 +105,9 @@ Object.keys(props).forEach(function (prop) { | ||
filterdProps[prop] = props[prop]; | ||
}); // const filterdProps = pickBy(props, prop => validProps[prop]); | ||
}); | ||
// const filterdProps = pickBy(props, prop => validProps[prop]); | ||
// console.log('@@@@@@@', filterdProps); | ||
return filterdProps; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=filterProps.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,11 +8,6 @@ value: true | ||
exports["default"] = flattenKeys; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _flatten = _interopRequireDefault(require("lodash/flatten")); | ||
var _map = _interopRequireDefault(require("lodash/map")); | ||
var _isCollection = _interopRequireDefault(require("./isCollection")); | ||
function flattenKeys(object) { | ||
@@ -24,3 +18,2 @@ var keys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; | ||
}; | ||
if ((0, _isCollection["default"])(object)) { | ||
@@ -31,5 +24,4 @@ return (0, _flatten["default"])((0, _map["default"])(object, function (val, key) { | ||
} | ||
return join(keys); | ||
} | ||
//# sourceMappingURL=flattenKeys.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,15 +8,12 @@ value: true | ||
exports["default"] = void 0; | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var flattenObject = function flattenObject(ob) { | ||
var toReturn = {}; // Object.keys(ob).forEach((key) => { | ||
var toReturn = {}; | ||
// Object.keys(ob).forEach((key) => { | ||
for (var i in ob) { | ||
//eslint-disable-line | ||
if (!ob.hasOwnProperty(i)) continue; //eslint-disable-line | ||
if ((0, _typeof2["default"])(ob[i]) === 'object') { | ||
var flatObject = flattenObject(ob[i]); | ||
for (var x in flatObject) { | ||
@@ -33,8 +29,6 @@ //eslint-disable-line | ||
} | ||
return toReturn; | ||
}; | ||
var _default = flattenObject; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=flattenObject.js.map |
@@ -10,5 +10,3 @@ "use strict"; | ||
exports.toShort = toShort; | ||
var _env = require("@lskjs/env"); | ||
function numberWithSpaces() { | ||
@@ -20,3 +18,2 @@ var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; | ||
} | ||
function toFixedWithoutRounding(value, precision) { | ||
@@ -28,3 +25,2 @@ var factorError = Math.pow(10, 14); | ||
} | ||
function formatter(valueInit) { | ||
@@ -36,13 +32,8 @@ var sign = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ''; | ||
var value = String(Math.abs(valueInit)); | ||
if (value[value.length - 2] === '.') { | ||
value = "".concat(value, "0"); | ||
} | ||
var parts = value.split('.'); | ||
var _int = parts[0] || ''; | ||
var fract = parts[1] || ''; | ||
_int.split('').reverse().forEach(function (c, i, a) { | ||
@@ -52,29 +43,20 @@ if (i % 3 === 0 && a[i - 1] !== '.') { | ||
} | ||
arr.push(c); | ||
}); | ||
_int = arr.reverse().join('').trim(); | ||
var res = _int; | ||
if (fract.length > 0) { | ||
res += ".".concat(fract); | ||
} | ||
var prefix = valueInit < 0 ? '—' : ''; | ||
if (isPrefixSign) { | ||
return "".concat(prefix).concat(sign).concat(res); | ||
} | ||
return "".concat(prefix).concat(res).concat(sign); | ||
} | ||
function toShort(price) { | ||
try { | ||
var keys = [[Math.pow(10, 3 * 4), 'T'], [Math.pow(10, 3 * 3), 'B'], [Math.pow(10, 3 * 2), 'M'], [Math.pow(10, 3 * 1), 'k']]; | ||
for (var _i = 0, _keys = keys; _i < _keys.length; _i++) { | ||
var key = _keys[_i]; | ||
//eslint-disable-line | ||
@@ -85,13 +67,10 @@ if (price > key[0]) { | ||
} | ||
return numberWithSpaces(+toFixedWithoutRounding(price, 2)); | ||
} catch (err) { | ||
if (_env.isDev) console.error('formatter.toShort', err); //eslint-disable-line | ||
return 0; | ||
} | ||
} | ||
var _default = toShort; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=formatter.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var _default = function _default(objectOrString) { | ||
@@ -25,4 +20,3 @@ if (typeof objectOrString === 'string') return { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getError.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = getFileExtension; | ||
function getFileExtension() { | ||
@@ -10,0 +9,0 @@ var file = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = getFileWithoutExtension; | ||
function getFileWithoutExtension(path) { | ||
@@ -10,0 +9,0 @@ try { |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
@@ -14,4 +13,3 @@ var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getHttpUrl.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _setVal = _interopRequireDefault(require("./setVal")); | ||
var _default = function _default(rows, locale) { | ||
@@ -24,4 +21,3 @@ var json = {}; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getKeyValJson.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = getParamsFromQuery; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
function parse(json) { | ||
@@ -24,3 +19,2 @@ try { | ||
} | ||
function getParamsFromQuery() { | ||
@@ -27,0 +21,0 @@ var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(password) { | ||
@@ -15,3 +14,2 @@ var upperCaseRegExp = new RegExp(/[A-Z]+/); | ||
var entropy = 5; | ||
if (password.length >= 8 && password.match(upperCaseRegExp) && password.match(lowerCaseRegExp) && password.match(digitRegExp) && password.match(specialCharRegExp)) { | ||
@@ -24,7 +22,5 @@ entropy = 50; | ||
} | ||
return entropy; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getPasswordEntropy.js.map |
@@ -8,30 +8,23 @@ "use strict"; | ||
exports.getPathById = getPathById; | ||
var _chunkString = require("./chunkString"); | ||
function getPathById(name) { | ||
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, | ||
_ref$depth = _ref.depth, | ||
depth = _ref$depth === void 0 ? 5 : _ref$depth, | ||
_ref$length = _ref.length, | ||
length = _ref$length === void 0 ? 3 : _ref$length, | ||
_ref$delimiter = _ref.delimiter, | ||
delimiter = _ref$delimiter === void 0 ? '/' : _ref$delimiter; | ||
_ref$depth = _ref.depth, | ||
depth = _ref$depth === void 0 ? 5 : _ref$depth, | ||
_ref$length = _ref.length, | ||
length = _ref$length === void 0 ? 3 : _ref$length, | ||
_ref$delimiter = _ref.delimiter, | ||
delimiter = _ref$delimiter === void 0 ? '/' : _ref$delimiter; | ||
if (!name || !name.length) { | ||
throw new Error('Empty string'); | ||
} | ||
if (depth <= 0) { | ||
throw new Error('Depth is not valid'); | ||
} | ||
if (length <= 0) { | ||
throw new Error('Length is not valid'); | ||
} | ||
if (name.length < 3) { | ||
return name; | ||
} | ||
var res = (0, _chunkString.chunkString)(name, length); | ||
@@ -43,5 +36,4 @@ if (!res) return res; | ||
} | ||
var _default = getPathById; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getPathById.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = getQueryFromParams; | ||
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty")); | ||
var _isEqual = _interopRequireDefault(require("lodash/isEqual")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
function getQueryFromParams() { | ||
@@ -18,0 +13,0 @@ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
@@ -7,8 +7,6 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(req) { | ||
return req.get('host').toLowerCase().replace(/^www\./, ''); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getReqDomain.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _getReqDomain = _interopRequireDefault(require("./getReqDomain")); | ||
var _default = function _default(req) { | ||
return "".concat(req.protocol, "://").concat((0, _getReqDomain["default"])(req)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getReqOrigin.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _getReqOrigin = _interopRequireDefault(require("./getReqOrigin")); | ||
var _default = function _default(req) { | ||
return (0, _getReqOrigin["default"])(req) + req.originalUrl; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getReqUrl.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(val) { | ||
@@ -16,4 +15,3 @@ try { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=getVal.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports.getWildcardKeys = exports["default"] = void 0; | ||
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray")); | ||
var _flatten = _interopRequireDefault(require("lodash/flatten")); | ||
var _uniq = _interopRequireDefault(require("lodash/uniq")); | ||
/** | ||
@@ -28,8 +23,6 @@ * Convert wildcard keys to simple keys of the rules | ||
if (key === '*') return rules; | ||
if (rx.test(key)) { | ||
var _key$match = key.match(rx), | ||
_key$match2 = (0, _slicedToArray2["default"])(_key$match, 2), | ||
phrase = _key$match2[1]; | ||
_key$match2 = (0, _slicedToArray2["default"])(_key$match, 2), | ||
phrase = _key$match2[1]; | ||
var rArr = Array.isArray(rules) ? rules : Object.keys(rules); | ||
@@ -40,3 +33,2 @@ return rArr.filter(function (name) { | ||
} | ||
return key; | ||
@@ -46,3 +38,2 @@ }); | ||
}; | ||
exports.getWildcardKeys = getWildcardKeys; | ||
@@ -49,0 +40,0 @@ var _default = getWildcardKeys; |
@@ -7,6 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _env = require("@lskjs/env"); | ||
/* global window */ | ||
/* global window */ | ||
var globalOrWindow = typeof window !== 'undefined' ? window : global; | ||
@@ -13,0 +12,0 @@ globalOrWindow.__SERVER__ = _env.isServer; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(grid) { | ||
@@ -14,4 +13,3 @@ return grid.map(function (row) { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=grid2csv.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _deepAssign = _interopRequireDefault(require("./deepAssign")); | ||
var _default = function _default(grid) { | ||
@@ -29,11 +26,8 @@ var cols; | ||
objects = []; | ||
for (j = 0, len = rows.length; j < len; j++) { | ||
cols = rows[j]; | ||
object = {}; | ||
for (index = k = 0, len1 = cols.length; k < len1; index = ++k) { | ||
value = cols[index]; | ||
key = headers[index]; | ||
if (typeof key !== 'string') { | ||
@@ -43,13 +37,9 @@ console.log('WARNING! No "key" on row=', j + 2, ' col=', index + 1, ' (start with 1)'); | ||
} | ||
(0, _deepAssign["default"])(object, key, value); | ||
} | ||
objects.push(object); | ||
} | ||
return objects; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=grid2objects.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.hashCode = exports["default"] = void 0; | ||
/* eslint-disable no-bitwise */ | ||
@@ -17,3 +16,2 @@ var hashCode = function hashCode(s) { | ||
}; | ||
exports.hashCode = hashCode; | ||
@@ -20,0 +18,0 @@ var _default = hashCode; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,27 +8,18 @@ value: true | ||
exports["default"] = void 0; | ||
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray")); | ||
var _log = _interopRequireDefault(require("@lskjs/log")); | ||
var _debounce = _interopRequireDefault(require("lodash/debounce")); | ||
var _groupBy = _interopRequireDefault(require("lodash/groupBy")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
var _some = _interopRequireDefault(require("lodash/some")); | ||
/* eslint-disable no-undef */ | ||
/* eslint-disable no-console */ | ||
var _default = function _default() { | ||
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, | ||
_ref$enable = _ref.enable, | ||
enable = _ref$enable === void 0 ? 1 : _ref$enable, | ||
_ref$hide = _ref.hide, | ||
hide = _ref$hide === void 0 ? 0 : _ref$hide, | ||
_ref$collapse = _ref.collapse, | ||
collapse = _ref$collapse === void 0 ? 1 : _ref$collapse; | ||
_ref$enable = _ref.enable, | ||
enable = _ref$enable === void 0 ? 1 : _ref$enable, | ||
_ref$hide = _ref.hide, | ||
hide = _ref$hide === void 0 ? 0 : _ref$hide, | ||
_ref$collapse = _ref.collapse, | ||
collapse = _ref$collapse === void 0 ? 1 : _ref$collapse; | ||
if (!enable) return; | ||
@@ -43,3 +33,4 @@ var logger = new _log["default"]({ | ||
return s.startsWith('The pseudo class '); | ||
} // (s) => s.indexOf('<svg> attribute') !== -1, | ||
} | ||
// (s) => s.indexOf('<svg> attribute') !== -1, | ||
// console.log(s, s.indexOf('<svg> attribute'), s.indexOf('<svg>')); | ||
@@ -53,14 +44,10 @@ ]; | ||
}; | ||
console.___error = console.error; | ||
console.___warn = console.warn; | ||
var stack = []; | ||
var addToStack = function addToStack() { | ||
if (hide) return; | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
stack.push(args); | ||
@@ -70,12 +57,10 @@ (0, _debounce["default"])(function () { | ||
return s[0]; | ||
}); // eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
}); | ||
// eslint-disable-next-line @typescript-eslint/no-unused-vars | ||
var res = (0, _mapValues["default"])(groups, function (_ref2) { | ||
var _ref3 = (0, _toArray2["default"])(_ref2), | ||
_ = _ref3[0], | ||
g = _ref3.slice(1); | ||
_ = _ref3[0], | ||
g = _ref3.slice(1); | ||
return g; | ||
}); | ||
if (Object.keys(res).length) { | ||
@@ -87,37 +72,24 @@ logger.warn(res); | ||
}; | ||
console.error = function () { | ||
var _console; | ||
if (!collapse) return null; | ||
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { | ||
args[_key2] = arguments[_key2]; | ||
} | ||
if (isTrigger(args[0])) return addToStack.apply(void 0, ['error'].concat(args)); | ||
(_console = console).___error.apply(_console, args); | ||
return null; | ||
}; | ||
console.warn = function () { | ||
var _console2; | ||
if (!collapse) return null; | ||
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { | ||
args[_key3] = arguments[_key3]; | ||
} | ||
if (isTrigger(args[0])) return addToStack.apply(void 0, ['warn'].concat(args)); | ||
(_console2 = console).___warn.apply(_console2, args); | ||
return null; | ||
}; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=hide-react-console-logs.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = void 0; | ||
var _os = _interopRequireDefault(require("os")); | ||
var _default = function _default() { | ||
return process.env.NODE_HOSTNAME || process.env.HOSTNAME || _os["default"].hostname(); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=hostname.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,24 +9,16 @@ value: true | ||
exports["default"] = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
var _isClass = _interopRequireDefault(require("./isClass")); | ||
var _isFunction = _interopRequireDefault(require("./isFunction")); | ||
var _undefault = _interopRequireDefault(require("./undefault")); | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
// import typeChecks from './typeChecks'; | ||
// console.log('importFn2', fn, typeChecks(fn), Object.keys(fn), new String(fn), fn.name, fn.type, JSON.stringify(fn), fn.prototype, typeChecks(fn.prototype)); | ||
var importFn = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(fn) { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(fn) { | ||
var pack, _pack, fn2, args; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -37,6 +29,4 @@ switch (_context.prev = _context.next) { | ||
return (0, _isFunction["default"])(fn) && !(0, _isClass["default"])(fn) ? fn() : fn; | ||
case 2: | ||
pack = _context.sent; | ||
if (Array.isArray(pack)) { | ||
@@ -46,5 +36,3 @@ _context.next = 5; | ||
} | ||
return _context.abrupt("return", (0, _undefault["default"])(pack)); | ||
case 5: | ||
@@ -54,7 +42,5 @@ _pack = (0, _toArray2["default"])(pack), fn2 = _pack[0], args = _pack.slice(1); | ||
return importFn(fn2); | ||
case 8: | ||
_context.t0 = _context.sent; | ||
return _context.abrupt("return", [_context.t0].concat((0, _toConsumableArray2["default"])(args))); | ||
case 10: | ||
@@ -67,3 +53,2 @@ case "end": | ||
})); | ||
return function importFn(_x) { | ||
@@ -73,5 +58,4 @@ return _ref.apply(this, arguments); | ||
}(); | ||
var _default = importFn; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=importFn.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _get = _interopRequireDefault(require("lodash/get")); | ||
var _set = _interopRequireDefault(require("lodash/set")); | ||
var _default = function _default(object, key) { | ||
@@ -19,4 +15,3 @@ var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=inc.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,16 +8,10 @@ value: true | ||
exports.includesOne = exports.includes = exports["default"] = void 0; | ||
var _includes2 = _interopRequireDefault(require("lodash/includes")); | ||
var _isMatch = _interopRequireDefault(require("lodash/isMatch")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _some = _interopRequireDefault(require("lodash/some")); | ||
var _isRegExp = require("./isRegExp"); | ||
var _includes = function _includes(func, collection, values) { | ||
var _collection = collection, | ||
_values = values; | ||
_values = values; | ||
if (!Array.isArray(_collection)) _collection = [_collection]; | ||
@@ -32,3 +25,2 @@ if (!Array.isArray(_values)) _values = [_values]; | ||
} | ||
if ((0, _isPlainObject["default"])(value)) { | ||
@@ -38,21 +30,18 @@ return (0, _some["default"])(_collection, function (elem) { | ||
}); | ||
} // TODO: Array.isArray(value) {} | ||
} | ||
// TODO: Array.isArray(value) {} | ||
return (0, _includes2["default"])(_collection, value); | ||
}); | ||
}; // Includes all values by collection | ||
}; | ||
// Includes all values by collection | ||
var includes = function includes(collection, values) { | ||
return _includes('every', collection, values); | ||
}; // Includes some values by collection | ||
}; | ||
// Includes some values by collection | ||
exports.includes = includes; | ||
var includesOne = function includesOne(collection, values) { | ||
return _includes('some', collection, values); | ||
}; | ||
exports.includesOne = includesOne; | ||
@@ -59,0 +48,0 @@ var _default = includes; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = insertArray; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _range = _interopRequireDefault(require("lodash/range")); | ||
function insertArray(items, items2) { | ||
@@ -20,3 +16,2 @@ var pos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; | ||
if (pos > items.length) nullCount = pos - items.length; | ||
if (pos < 0) { | ||
@@ -26,3 +21,2 @@ realPos = 0; | ||
} | ||
var nullArr = (0, _range["default"])(nullCount).map(function () { | ||
@@ -29,0 +23,0 @@ return null; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
@@ -13,4 +12,3 @@ var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isAbsoluteExternalUrl.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isAbsoluteUrl; | ||
function isAbsoluteUrl() { | ||
@@ -10,0 +9,0 @@ var url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; |
@@ -7,8 +7,6 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(name) { | ||
return document.documentElement.className.includes(name); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isBrowser.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
// import isFunction from 'lodash/isFunction'; | ||
@@ -13,4 +12,3 @@ var _default = function _default(v) { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isClass.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +8,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _isArray = _interopRequireDefault(require("lodash/isArray")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _default = function _default(value) { | ||
return (0, _isPlainObject["default"])(value) || (0, _isArray["default"])(value); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isCollection.js.map |
@@ -7,8 +7,6 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
return typeof window !== 'undefined' && window.navigator.msSaveOrOpenBlob && window.Blob; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isCrappyIEBrowser.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,14 +8,9 @@ value: true | ||
exports["default"] = void 0; | ||
var _isArray = _interopRequireDefault(require("lodash/isArray")); | ||
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _default = function _default(item) { | ||
return (0, _isArray["default"])(item) || (0, _isPlainObject["default"])(item) ? (0, _isEmpty["default"])(item) : !item; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isEmpty.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +8,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _isFunction = _interopRequireDefault(require("lodash/isFunction")); | ||
var _isClass = _interopRequireDefault(require("./isClass")); | ||
var _default = function _default(v) { | ||
return (0, _isFunction["default"])(v) && !(0, _isClass["default"])(v); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isFunction.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isIE; | ||
/* global window */ | ||
@@ -13,5 +12,4 @@ function isIE() { | ||
// ie && console.log('ie', ie); | ||
return ie; | ||
} | ||
//# sourceMappingURL=isIE.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isLeftClickEvent; | ||
function isLeftClickEvent(event) { | ||
@@ -10,0 +9,0 @@ return event.button === 0; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isMiddleClickEvent; | ||
function isMiddleClickEvent(event) { | ||
@@ -10,0 +9,0 @@ return event.button === 1; |
@@ -7,7 +7,5 @@ "use strict"; | ||
exports["default"] = void 0; | ||
/* eslint-disable max-len */ | ||
var _default = function _default() { | ||
var useragent = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; | ||
if (!useragent && typeof window !== 'undefined') { | ||
@@ -17,8 +15,6 @@ // eslint-disable-next-line no-param-reassign | ||
} | ||
if (!useragent) return false; | ||
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(useragent) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(useragent.substr(0, 4)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isMobileBrowser.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isModifiedEvent; | ||
function isModifiedEvent(event) { | ||
@@ -10,0 +9,0 @@ return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,13 +8,8 @@ value: true | ||
exports.isNotNull = exports["default"] = void 0; | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _isEmpty = _interopRequireDefault(require("lodash/isEmpty")); | ||
var _isObjectLike = _interopRequireDefault(require("lodash/isObjectLike")); | ||
var isNotNull = function isNotNull(result) { | ||
return ['number', 'string', 'boolean'].includes((0, _typeof2["default"])(result)) && !!result || (0, _isObjectLike["default"])(result) && !(0, _isEmpty["default"])(result); | ||
}; | ||
exports.isNotNull = isNotNull; | ||
@@ -22,0 +16,0 @@ var _default = isNotNull; |
@@ -9,9 +9,7 @@ "use strict"; | ||
var toString = Object.prototype.toString; | ||
function isRegExp(value) { | ||
return toString.call(value) === '[object RegExp]'; | ||
} | ||
var _default = isRegExp; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isRegExp.js.map |
@@ -7,9 +7,7 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var isRoundDate = function isRoundDate(dateStr) { | ||
return new Date(dateStr).toISOString().substr(11) === '00:00:00.000Z'; | ||
}; | ||
var _default = isRoundDate; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=isRoundDate.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = isTouchDevice; | ||
function isTouchDevice() { | ||
@@ -15,5 +14,4 @@ if (typeof window !== 'undefined') { | ||
} | ||
return false; | ||
} | ||
//# sourceMappingURL=isTouchDevice.js.map |
/// <reference types="node" /> | ||
import { Buffer } from 'buffer'; | ||
export declare function ensureBuffer(potentialBuffer: Buffer | ArrayBufferView | ArrayBuffer): Buffer; | ||
@@ -3,0 +4,0 @@ export declare function deprecate<T extends Function>(fn: T, message: string): T; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,11 +10,6 @@ value: true | ||
exports.ensureBuffer = ensureBuffer; | ||
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _buffer = require("buffer"); | ||
function ensureBuffer(potentialBuffer) { | ||
@@ -25,24 +19,17 @@ if (_buffer.Buffer.isBuffer(potentialBuffer)) { | ||
} | ||
if (ArrayBuffer.isView(potentialBuffer)) { | ||
return _buffer.Buffer.from(potentialBuffer.buffer); | ||
} | ||
if (potentialBuffer instanceof ArrayBuffer) { | ||
return _buffer.Buffer.from(potentialBuffer); | ||
} | ||
throw new TypeError('Must use either Buffer or TypedArray'); | ||
} | ||
function randomBytes(size) { | ||
var result = _buffer.Buffer.alloc(size); | ||
for (var _i = 0; _i < size; ++_i) { | ||
result[_i] = Math.floor(Math.random() * 256); | ||
} | ||
return result; | ||
} | ||
function deprecate(fn, message) { | ||
@@ -53,5 +40,3 @@ if (typeof window === 'undefined' || typeof self === 'undefined') { | ||
} | ||
var warned = false; | ||
function deprecated() { | ||
@@ -62,39 +47,36 @@ if (!warned) { | ||
} | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
return fn.apply.apply(fn, [this].concat(args)); | ||
} | ||
return deprecated; | ||
} // constants | ||
} | ||
// constants | ||
var PROCESS_UNIQUE = randomBytes(5); | ||
var PROCESS_UNIQUE = randomBytes(5); // Regular expression that checks for hex value | ||
// Regular expression that checks for hex value | ||
var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$'); | ||
var checkForHexRegExp = new RegExp('^[0-9a-fA-F]{24}$'); // Precomputed hex table enables speedy hex string conversion | ||
// Precomputed hex table enables speedy hex string conversion | ||
var hexTable = []; | ||
for (var _i2 = 0; _i2 < 256; _i2++) { | ||
hexTable[_i2] = (_i2 <= 15 ? '0' : '') + _i2.toString(16); | ||
} // Lookup tables | ||
} | ||
// Lookup tables | ||
var decodeLookup = []; | ||
var i = 0; | ||
while (i < 10) { | ||
decodeLookup[0x30 + i] = i++; | ||
} | ||
while (i < 16) { | ||
decodeLookup[0x41 - 10 + i] = decodeLookup[0x61 - 10 + i] = i++; | ||
} | ||
/** @public */ | ||
var kId = Symbol('id'); | ||
var kId = Symbol('id'); | ||
/** | ||
@@ -104,3 +86,2 @@ * A class representation of the BSON ObjectId type. | ||
*/ | ||
var ObjectId = /*#__PURE__*/function () { | ||
@@ -123,3 +104,2 @@ /** @internal */ | ||
this.__id = void 0; | ||
// Duck-typing to support ObjectId from different npm packages | ||
@@ -130,3 +110,2 @@ if (id instanceof ObjectId) { | ||
} | ||
if ((0, _typeof2["default"])(id) === 'object' && id && 'id' in id) { | ||
@@ -138,9 +117,9 @@ if ('toHexString' in id && typeof id.toHexString === 'function') { | ||
} | ||
} // The most common use case (blank id, new objectId instance) | ||
} | ||
// The most common use case (blank id, new objectId instance) | ||
if (id == null || typeof id === 'number') { | ||
// Generate a new id | ||
this[kId] = ObjectId.generate(typeof id === 'number' ? id : undefined); // If we are caching the hex string | ||
this[kId] = ObjectId.generate(typeof id === 'number' ? id : undefined); | ||
// If we are caching the hex string | ||
if (ObjectId.cacheHexString) { | ||
@@ -150,11 +129,8 @@ this.__id = this.id.toString('hex'); | ||
} | ||
if (ArrayBuffer.isView(id) && id.byteLength === 12) { | ||
this[kId] = ensureBuffer(id); | ||
} | ||
if (typeof id === 'string') { | ||
if (id.length === 12) { | ||
var bytes = _buffer.Buffer.from(id); | ||
if (bytes.byteLength === 12) { | ||
@@ -169,3 +145,2 @@ this[kId] = bytes; | ||
} | ||
if (ObjectId.cacheHexString) { | ||
@@ -175,2 +150,3 @@ this.__id = this.id.toString('hex'); | ||
} | ||
/** | ||
@@ -180,4 +156,2 @@ * The ObjectId bytes | ||
*/ | ||
(0, _createClass2["default"])(ObjectId, [{ | ||
@@ -190,3 +164,2 @@ key: "id", | ||
this[kId] = value; | ||
if (ObjectId.cacheHexString) { | ||
@@ -196,2 +169,3 @@ this.__id = value.toString('hex'); | ||
} | ||
/** | ||
@@ -201,3 +175,2 @@ * The generation time of this ObjectId instance | ||
*/ | ||
}, { | ||
@@ -212,4 +185,4 @@ key: "generationTime", | ||
} | ||
/** Returns the ObjectId id as a 24 character hex string representation */ | ||
}, { | ||
@@ -221,11 +194,9 @@ key: "toHexString", | ||
} | ||
var hexString = this.id.toString('hex'); | ||
if (ObjectId.cacheHexString && !this.__id) { | ||
this.__id = hexString; | ||
} | ||
return hexString; | ||
} | ||
/** | ||
@@ -237,3 +208,2 @@ * Update the ObjectId index | ||
*/ | ||
}, { | ||
@@ -254,2 +224,3 @@ key: "toString", | ||
} | ||
/** | ||
@@ -259,3 +230,2 @@ * Converts to its JSON the 24 character hex string representation. | ||
*/ | ||
}, { | ||
@@ -266,2 +236,3 @@ key: "toJSON", | ||
} | ||
/** | ||
@@ -272,3 +243,2 @@ * Compares the equality of this ObjectId with `otherID`. | ||
*/ | ||
}, { | ||
@@ -280,27 +250,21 @@ key: "equals", | ||
} | ||
if (otherId instanceof ObjectId) { | ||
return this.toString() === otherId.toString(); | ||
} | ||
if (typeof otherId === 'string' && ObjectId.isValid(otherId) && otherId.length === 12 && this.id instanceof _buffer.Buffer) { | ||
return otherId === this.id.toString('binary'); | ||
} | ||
if (typeof otherId === 'string' && ObjectId.isValid(otherId) && otherId.length === 24) { | ||
return otherId.toLowerCase() === this.toHexString(); | ||
} | ||
if (typeof otherId === 'string' && ObjectId.isValid(otherId) && otherId.length === 12) { | ||
return _buffer.Buffer.from(otherId).equals(this.id); | ||
} | ||
if ((0, _typeof2["default"])(otherId) === 'object' && 'toHexString' in otherId && typeof otherId.toHexString === 'function') { | ||
return otherId.toHexString() === this.toHexString(); | ||
} | ||
return false; | ||
} | ||
/** Returns the generation date (accurate up to the second) that this ID was generated. */ | ||
}, { | ||
@@ -314,8 +278,7 @@ key: "getTimestamp", | ||
} | ||
/** @internal */ | ||
}, { | ||
key: "toExtendedJSON", | ||
value: | ||
/** @internal */ | ||
value: /** @internal */ | ||
function toExtendedJSON() { | ||
@@ -329,4 +292,4 @@ if (this.toHexString) return { | ||
} | ||
/** @internal */ | ||
}], [{ | ||
@@ -337,2 +300,3 @@ key: "getInc", | ||
} | ||
/** | ||
@@ -343,3 +307,2 @@ * Generate a 12 byte id buffer used in ObjectId's | ||
*/ | ||
}, { | ||
@@ -351,10 +314,9 @@ key: "generate", | ||
} | ||
var inc = ObjectId.getInc(); | ||
var buffer = _buffer.Buffer.alloc(12); | ||
var buffer = _buffer.Buffer.alloc(12); // 4-byte timestamp | ||
// 4-byte timestamp | ||
buffer.writeUInt32BE(time, 0); | ||
buffer.writeUInt32BE(time, 0); // 5-byte process unique | ||
// 5-byte process unique | ||
buffer[4] = PROCESS_UNIQUE[0]; | ||
@@ -364,4 +326,5 @@ buffer[5] = PROCESS_UNIQUE[1]; | ||
buffer[7] = PROCESS_UNIQUE[3]; | ||
buffer[8] = PROCESS_UNIQUE[4]; // 3-byte counter | ||
buffer[8] = PROCESS_UNIQUE[4]; | ||
// 3-byte counter | ||
buffer[11] = inc & 0xff; | ||
@@ -377,2 +340,3 @@ buffer[10] = inc >> 8 & 0xff; | ||
} | ||
/** | ||
@@ -383,13 +347,12 @@ * Creates an ObjectId from a second based number, with the rest of the ObjectId zeroed out. Used for comparisons or sorting the ObjectId. | ||
*/ | ||
}, { | ||
key: "createFromTime", | ||
value: function createFromTime(time) { | ||
var buffer = _buffer.Buffer.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); // Encode time into first 4 bytes | ||
buffer.writeUInt32BE(time, 0); // Return the new objectId | ||
var buffer = _buffer.Buffer.from([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]); | ||
// Encode time into first 4 bytes | ||
buffer.writeUInt32BE(time, 0); | ||
// Return the new objectId | ||
return new ObjectId(buffer); | ||
} | ||
/** | ||
@@ -400,3 +363,2 @@ * Creates an ObjectId from a hex string representation of an ObjectId. | ||
*/ | ||
}, { | ||
@@ -409,5 +371,5 @@ key: "createFromHexString", | ||
} | ||
return new ObjectId(_buffer.Buffer.from(hexString, 'hex')); | ||
} | ||
/** | ||
@@ -418,3 +380,2 @@ * Checks if a value is a valid bson ObjectId | ||
*/ | ||
}, { | ||
@@ -424,20 +385,16 @@ key: "isValid", | ||
if (id == null) return false; | ||
if (typeof id === 'number') { | ||
return true; | ||
} | ||
if (typeof id === 'string') { | ||
return id.length === 12 || id.length === 24 && checkForHexRegExp.test(id); | ||
} | ||
if (id instanceof ObjectId) { | ||
return true; | ||
} | ||
if (id instanceof _buffer.Buffer && id.length === 12) { | ||
return true; | ||
} // Duck-Typing detection of ObjectId like objects | ||
} | ||
// Duck-Typing detection of ObjectId like objects | ||
if ((0, _typeof2["default"])(id) === 'object' && 'toHexString' in id && typeof id.toHexString === 'function') { | ||
@@ -447,6 +404,4 @@ if (typeof id.id === 'string') { | ||
} | ||
return id.toHexString().length === 24 && checkForHexRegExp.test(id.id.toString('hex')); | ||
} | ||
return false; | ||
@@ -462,4 +417,2 @@ } | ||
}(); // Deprecated methods | ||
exports.ObjectId = ObjectId; | ||
@@ -495,3 +448,2 @@ ObjectId.index = ~~(Math.random() * 0xffffff); | ||
*/ | ||
Object.defineProperty(ObjectId.prototype, inspect, ObjectId.prototype.toString); | ||
@@ -498,0 +450,0 @@ Object.defineProperty(ObjectId.prototype, 'inspect', ObjectId.prototype.toString); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _kebabCase = _interopRequireDefault(require("lodash/kebabCase")); | ||
var _mapKeys = _interopRequireDefault(require("./mapKeys")); | ||
var kebabCaseKeys = function kebabCaseKeys(object, allowLeadUnderscore) { | ||
@@ -20,5 +16,4 @@ return (0, _mapKeys["default"])(object, function (value, key) { | ||
}; | ||
var _default = kebabCaseKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=kebabCaseKeys.js.map |
@@ -7,18 +7,14 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
if (typeof process === 'undefined') return; | ||
var timeout; | ||
if (process && process.env.KILLTIMEOUT) { | ||
timeout = +process.env.KILLTIMEOUT || 0; | ||
} | ||
if (timeout) { | ||
timeout *= 0.9 + Math.random() * 0.2; | ||
} | ||
if (timeout) { | ||
var code = 1; // eslint-disable-next-line no-console | ||
var code = 1; | ||
// eslint-disable-next-line no-console | ||
console.log("process will be exited with code ".concat(code, " in ").concat(timeout / 1000, " seconds")); | ||
@@ -32,4 +28,3 @@ setTimeout(function () { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=killTimeout.js.map |
@@ -7,13 +7,10 @@ "use strict"; | ||
exports["default"] = leftPad; | ||
/* eslint-disable */ | ||
var cache = ['', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']; | ||
function leftPad(str, len, ch) { | ||
// convert `str` to `string` | ||
str = "".concat(str); // `len` is the `pad`'s length now | ||
str = "".concat(str); | ||
// `len` is the `pad`'s length now | ||
// | ||
var reverse = 0; | ||
if (len < 0) { | ||
@@ -23,30 +20,30 @@ len *= -1; | ||
} | ||
len -= str.length; // doesn't need to pad | ||
if (len <= 0) return str; // `ch` defaults to `' '` | ||
if (!ch && ch !== 0) ch = ' '; // convert `ch` to `string` | ||
ch = "".concat(ch); // cache common use cases | ||
if (ch === ' ' && len < 10) return reverse ? str + cache[len] : cache[len] + str; // `pad` starts with an empty string | ||
var pad = ''; // loop | ||
len -= str.length; | ||
// doesn't need to pad | ||
if (len <= 0) return str; | ||
// `ch` defaults to `' '` | ||
if (!ch && ch !== 0) ch = ' '; | ||
// convert `ch` to `string` | ||
ch = "".concat(ch); | ||
// cache common use cases | ||
if (ch === ' ' && len < 10) return reverse ? str + cache[len] : cache[len] + str; | ||
// `pad` starts with an empty string | ||
var pad = ''; | ||
// loop | ||
while (true) { | ||
// add `ch` to `pad` if `len` is odd | ||
if (len & 1) pad += ch; // divide `len` by 2, ditch the remainder | ||
len >>= 1; // "double" the `ch` so this operation count grows logarithmically on `len` | ||
if (len & 1) pad += ch; | ||
// divide `len` by 2, ditch the remainder | ||
len >>= 1; | ||
// "double" the `ch` so this operation count grows logarithmically on `len` | ||
// each time `ch` is "doubled", the `len` would need to be "doubled" too | ||
// similar to finding a value in binary search tree, hence O(log(n)) | ||
if (len) ch += ch; // `len` is 0, exit the loop | ||
if (len) ch += ch; | ||
// `len` is 0, exit the loop | ||
else break; | ||
} // pad `str`! | ||
} | ||
// pad `str`! | ||
return reverse ? str + pad : pad + str; | ||
} | ||
//# sourceMappingURL=leftPad.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _lowerCase = _interopRequireDefault(require("lodash/lowerCase")); | ||
var _mapKeys = _interopRequireDefault(require("./mapKeys")); | ||
var lowerCaseKeys = function lowerCaseKeys(object, allowLeadUnderscore) { | ||
@@ -20,5 +16,4 @@ return (0, _mapKeys["default"])(object, function (value, key) { | ||
}; | ||
var _default = lowerCaseKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=lowerCaseKeys.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,25 +8,20 @@ value: true | ||
exports["default"] = mapDeep; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
var _isCollection = _interopRequireDefault(require("./isCollection")); | ||
function mapDeep(value, reduce) { | ||
var keys = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; | ||
var res; | ||
if ((0, _isCollection["default"])(value)) { | ||
res = (0, _mapValues["default"])(value, function (v, k) { | ||
var res2 = mapDeep(v, reduce, [].concat((0, _toConsumableArray2["default"])(keys), [k])); // console.log('mapValues/map', { keys, k, res2 }); | ||
var res2 = mapDeep(v, reduce, [].concat((0, _toConsumableArray2["default"])(keys), [k])); | ||
// console.log('mapValues/map', { keys, k, res2 }); | ||
return res2; | ||
}); // console.log('mapValues/reduce', { res, keys }); | ||
}); | ||
// console.log('mapValues/reduce', { res, keys }); | ||
} else { | ||
res = value; | ||
} | ||
return reduce(res, keys); | ||
} | ||
//# sourceMappingURL=mapDeep.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _forEach = _interopRequireDefault(require("lodash/forEach")); | ||
var mapKeys = function mapKeys(object, fn) { | ||
@@ -21,5 +18,4 @@ var res = {}; | ||
}; | ||
var _default = mapKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=mapKeys.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,17 +8,10 @@ value: true | ||
exports["default"] = mapValuesDeep; | ||
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray")); | ||
var _isArray = _interopRequireDefault(require("lodash/isArray")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
var DEBUG = false; | ||
var isCollection = function isCollection(value) { | ||
return (0, _isPlainObject["default"])(value) || (0, _isArray["default"])(value); | ||
}; | ||
function mapValuesDeep(value, map) { | ||
@@ -33,3 +25,2 @@ var reduce = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function (a) { | ||
var mapValue; | ||
if ((0, _isPlainObject["default"])(value)) { | ||
@@ -46,5 +37,4 @@ mapValue = (0, _mapValues["default"])(value, function (v, k) { | ||
} | ||
var reduceValue = reduce(mapValue); // eslint-disable-next-line no-console | ||
var reduceValue = reduce(mapValue); | ||
// eslint-disable-next-line no-console | ||
if (DEBUG) console.log("[".concat(keys.join('.'), "]:"), 'mapValue', mapValue, 'reduceValue', reduceValue); | ||
@@ -51,0 +41,0 @@ return reduceValue; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _forEach = _interopRequireDefault(require("lodash/forEach")); | ||
var mapValuesKeys = function mapValuesKeys(object, fn) { | ||
@@ -17,5 +14,4 @@ var res = {}; | ||
var _fn = fn(value, key), | ||
newKey = _fn.key, | ||
newValue = _fn.value; | ||
newKey = _fn.key, | ||
newValue = _fn.value; | ||
if (newKey != null) res[newKey] = newValue; | ||
@@ -25,5 +21,4 @@ }); | ||
}; | ||
var _default = mapValuesKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=mapValuesKeys.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -13,10 +12,6 @@ value: true | ||
exports.v0r = exports.v033 = void 0; | ||
var _hashCode = _interopRequireDefault(require("./hashCode")); | ||
var v033 = '\x1B'; // '\033'; | ||
exports.v033 = v033; | ||
var v0r = "".concat(v033, "[0m"); // '\033'; | ||
exports.v0r = v0r; | ||
@@ -39,3 +34,2 @@ var colors = { | ||
exports.colors = colors; | ||
function stylizeBg(str, color) { | ||
@@ -50,4 +44,4 @@ var colors3 = { | ||
white: "".concat(v033, "[47m") // console.log({str}) | ||
}; | ||
}; | ||
if (!str) return ''; | ||
@@ -62,14 +56,10 @@ var codes = colors3[color]; | ||
var codes = colors[color]; | ||
if (codes) { | ||
return "".concat(v033, "[").concat(codes[0], "m").concat(str).concat(v033, "[").concat(codes[1], "m"); | ||
} | ||
return str; | ||
} | ||
function stylizeWithoutColor(str, color) { | ||
return str; | ||
} | ||
var colorsKeys = ['black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white']; | ||
@@ -79,3 +69,2 @@ exports.colorsKeys = colorsKeys; | ||
exports.chars = chars; | ||
var getInfo = function getInfo(id) { | ||
@@ -88,4 +77,4 @@ var code = (0, _hashCode["default"])(id); | ||
var charCode = cd % base; | ||
cd = Math.floor(cd / base); // const bgColorCode = cd % base; | ||
cd = Math.floor(cd / base); | ||
// const bgColorCode = cd % base; | ||
var bgColorCode = -1; | ||
@@ -104,5 +93,3 @@ var res = { | ||
}; | ||
exports.getInfo = getInfo; | ||
var marker = function marker(id) { | ||
@@ -114,8 +101,10 @@ if (id == null) return function (a) { | ||
var color = res.color, | ||
bgColor = res.bgColor, | ||
_char = res["char"]; | ||
bgColor = res.bgColor, | ||
_char = res["char"]; | ||
return function (str) { | ||
return stylizeWithColor(stylizeBg(str || _char, bgColor), color); | ||
}; | ||
}; // console.log(marker()()); | ||
}; | ||
// console.log(marker()()); | ||
// for (let id = 0; id < 100; id++) { | ||
@@ -125,6 +114,4 @@ // const wrap = marker(id); | ||
// } | ||
var _default = marker; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=marker.js.map |
@@ -8,3 +8,2 @@ "use strict"; | ||
exports.maskUriPassword = maskUriPassword; | ||
function maskUriPassword() { | ||
@@ -14,5 +13,4 @@ var uri = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
} | ||
var _default = maskUriPassword; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=maskUriPassword.js.map |
@@ -7,8 +7,6 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default() { | ||
return typeof process !== 'undefined' ? Number(process.version.match(/^v(\d+\.\d+)/)[1]) : null; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=nodeVersion.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +8,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _grid2csv = _interopRequireDefault(require("./grid2csv")); | ||
var _objects2grid = _interopRequireDefault(require("./objects2grid")); | ||
var _default = function _default(params) { | ||
return (0, _grid2csv["default"])((0, _objects2grid["default"])(params)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=objects2csv.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(objects, cols) { | ||
@@ -22,4 +21,3 @@ if (!cols) cols = Object.keys(objects[0]); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=objects2grid.js.map |
@@ -7,7 +7,6 @@ "use strict"; | ||
exports.omit = exports["default"] = void 0; | ||
var omit = function omit(obj, keys) { | ||
var ret = {}; | ||
var key; // eslint-disable-next-line no-restricted-syntax | ||
var key; | ||
// eslint-disable-next-line no-restricted-syntax | ||
for (key in obj) { | ||
@@ -18,6 +17,4 @@ if (!keys.includes(key)) { | ||
} | ||
return ret; | ||
}; | ||
exports.omit = omit; | ||
@@ -24,0 +21,0 @@ var _default = omit; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _isEmpty = _interopRequireDefault(require("./isEmpty")); | ||
var _default = function _default() { | ||
@@ -23,4 +20,3 @@ var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=omitEmpty.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.omitNull = exports["default"] = void 0; | ||
var omitNull = function omitNull(props) { | ||
@@ -20,3 +19,2 @@ var filter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (a) { | ||
}; | ||
exports.omitNull = omitNull; | ||
@@ -23,0 +21,0 @@ var _default = omitNull; |
{ | ||
"name": "@lskjs/utils", | ||
"version": "2.85.0", | ||
"version": "2.85.1", | ||
"description": "LSK.js – utils – helpers and functions", | ||
@@ -29,4 +29,4 @@ "keywords": [], | ||
"devDependencies": { | ||
"@lskjs/env": "2.85.0", | ||
"@lskjs/err": "2.85.0", | ||
"@lskjs/env": "2.85.1", | ||
"@lskjs/err": "2.85.1", | ||
"@types/bluebird": "3.5.33", | ||
@@ -46,3 +46,3 @@ "@types/lodash": "4.14.167", | ||
}, | ||
"gitHead": "9869ce6996ffd371157dc0964fcd12446eed7f8c" | ||
"gitHead": "a9b082721ebba17e1987c65f938cff3f03893ad1" | ||
} |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -11,18 +10,11 @@ value: true | ||
exports.toNumber = exports.toJson = exports.toInt = exports.toDate = exports.toBoolean = exports.toArray = exports.parse = void 0; | ||
var _forEach = _interopRequireDefault(require("lodash/forEach")); | ||
var _isFinite = _interopRequireDefault(require("lodash/isFinite")); | ||
var _isObjectLike = _interopRequireDefault(require("lodash/isObjectLike")); | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
var _round = _interopRequireDefault(require("lodash/round")); | ||
var _tryParamParse = _interopRequireDefault(require("./tryParamParse")); | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
var notNan = function notNan(a) { | ||
@@ -32,5 +24,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
}; | ||
exports.notNan = notNan; | ||
var toBoolean = function toBoolean(a) { | ||
@@ -40,5 +30,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; | ||
}; | ||
exports.toBoolean = toBoolean; | ||
var toNumber = function toNumber(a) { | ||
@@ -48,5 +36,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; | ||
}; | ||
exports.toNumber = toNumber; | ||
var toInt = function toInt(a) { | ||
@@ -56,5 +42,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; | ||
}; | ||
exports.toInt = toInt; | ||
var toJson = function toJson(a) { | ||
@@ -64,5 +48,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
}; | ||
exports.toJson = toJson; | ||
var toDate = function toDate(a) { | ||
@@ -72,5 +54,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
}; | ||
exports.toDate = toDate; | ||
var toArray = function toArray(a) { | ||
@@ -86,5 +66,3 @@ var def = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
}; | ||
exports.toArray = toArray; | ||
var parse = function parse(a, type, def) { | ||
@@ -99,5 +77,3 @@ if (type === 'boolean' || type === 'bool') return toBoolean(a, def); | ||
}; | ||
exports.parse = parse; | ||
function params(obj, schema) { | ||
@@ -108,3 +84,2 @@ var res = (0, _mapValues["default"])(obj, function (value, key) { | ||
var def; | ||
if (typeof strOrObj === 'string') { | ||
@@ -118,3 +93,2 @@ type = strOrObj; | ||
} | ||
return parse(value, type, def); | ||
@@ -124,7 +98,5 @@ }); | ||
var def; | ||
if ((0, _isPlainObject["default"])(strOrObj)) { | ||
def = strOrObj["default"]; | ||
} | ||
if (def !== undefined && res[key] === undefined) res[key] = def; | ||
@@ -134,3 +106,2 @@ }); | ||
} | ||
params.toBoolean = toBoolean; | ||
@@ -137,0 +108,0 @@ params.toNumber = toNumber; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,17 +8,14 @@ value: true | ||
exports["default"] = void 0; | ||
var _grid2objects = _interopRequireDefault(require("./grid2objects")); | ||
var _default = function _default() { | ||
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
str = str.replace(/
/g, ''); // console.log('str', str.slice(0, 100)); | ||
var maybeJson = JSON.parse(str); // console.log('maybeJson', maybeJson.slice(0, 2)); | ||
var objects = (0, _grid2objects["default"])(maybeJson); // console.log('objects', objects.slice(0, 2)); | ||
str = str.replace(/
/g, ''); | ||
// console.log('str', str.slice(0, 100)); | ||
var maybeJson = JSON.parse(str); | ||
// console.log('maybeJson', maybeJson.slice(0, 2)); | ||
var objects = (0, _grid2objects["default"])(maybeJson); | ||
// console.log('objects', objects.slice(0, 2)); | ||
return objects; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=parseRawJson.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _csv2grid = _interopRequireDefault(require("./csv2grid")); | ||
var _grid2objects = _interopRequireDefault(require("./grid2objects")); | ||
var _txtToArray = _interopRequireDefault(require("./txtToArray")); | ||
var _default = function _default() { | ||
@@ -21,4 +16,3 @@ var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=parseTxt.js.map |
@@ -7,10 +7,10 @@ "use strict"; | ||
exports.pick = exports["default"] = void 0; | ||
/** | ||
* NOTE: copied from @lskjs utils | ||
*/ | ||
var pick = function pick(obj, keys) { | ||
var ret = {}; | ||
var key; // eslint-disable-next-line no-restricted-syntax | ||
var key; | ||
// eslint-disable-next-line no-restricted-syntax | ||
for (key in obj) { | ||
@@ -21,6 +21,4 @@ if (keys.includes(key)) { | ||
} | ||
return ret; | ||
}; | ||
exports.pick = pick; | ||
@@ -27,0 +25,0 @@ var _default = pick; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _pick = _interopRequireDefault(require("lodash/pick")); | ||
var _react = require("react"); | ||
var _default = function _default(el, list) { | ||
@@ -20,4 +16,3 @@ return function (props) { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=pickProps.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,10 +8,7 @@ value: true | ||
exports["default"] = ready; | ||
var _env = require("@lskjs/env"); | ||
var _global = _interopRequireDefault(require("./global")); | ||
/* eslint-disable no-undef */ | ||
/* eslint-disable no-console */ | ||
/* eslint-disable no-console */ | ||
// if (__DEV__) { | ||
@@ -22,7 +18,5 @@ // console.log(`Compiling ... [__STAGE__=${__STAGE__} __DEV__=${__DEV__}]`); | ||
_global["default"].startedAt = Date.now(); | ||
_global["default"].timing = function () { | ||
return Date.now() - _global["default"].startedAt; | ||
}; | ||
if (typeof process !== 'undefined') { | ||
@@ -35,5 +29,3 @@ process.on('uncaughtException', function (err) { | ||
} | ||
if (!_global["default"]._babelPolyfill) require('@babel/polyfill'); | ||
function ready(cb) { | ||
@@ -43,5 +35,4 @@ if (_env.isDev) { | ||
} | ||
if (typeof cb === 'function') cb(); | ||
} | ||
//# sourceMappingURL=polyfill.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _isPlainObject = _interopRequireDefault(require("lodash/isPlainObject")); | ||
var _map = _interopRequireDefault(require("lodash/map")); | ||
var _cutText = _interopRequireDefault(require("./cutText")); | ||
var _default = function _default() { | ||
@@ -30,4 +25,3 @@ var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=prettyStringify.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +8,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _bluebird = _interopRequireDefault(require("bluebird")); | ||
var _mapValues = _interopRequireDefault(require("lodash/mapValues")); | ||
var _default = function _default(obj, fn) { | ||
return _bluebird["default"].props((0, _mapValues["default"])(obj, fn)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=promiseMapValues.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _qs = _interopRequireDefault(require("qs")); | ||
var _default = _qs["default"]; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=qs.js.map |
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = removeClassFromHtml; | ||
function removeClassFromHtml(classname) { | ||
var html = document.getElementsByTagName('html')[0]; | ||
if (html.className.includes(classname)) { | ||
@@ -13,0 +11,0 @@ html.className = html.className.replace("".concat(classname, " "), '').replace(classname, ''); |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _omit = _interopRequireDefault(require("lodash/omit")); | ||
var _react = require("react"); | ||
var _default = function _default(el, list) { | ||
@@ -20,4 +16,3 @@ return function (props) { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=removeProps.js.map |
@@ -7,17 +7,12 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(res) { | ||
var _console; | ||
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { | ||
params[_key - 1] = arguments[_key]; | ||
} | ||
// eslint-disable-next-line no-console | ||
(_console = console).log.apply(_console, params.concat([res])); | ||
return res; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=ret.js.map |
62
retry.js
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,21 +8,12 @@ value: true | ||
exports["default"] = void 0; | ||
var _construct2 = _interopRequireDefault(require("@babel/runtime/helpers/construct")); | ||
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass")); | ||
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck")); | ||
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits")); | ||
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn")); | ||
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf")); | ||
var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper")); | ||
var _bluebird = _interopRequireDefault(require("bluebird")); | ||
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; } | ||
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } | ||
// Retry `func` until it succeeds. | ||
@@ -44,2 +34,3 @@ // | ||
// | ||
function retry(func, options) { | ||
@@ -50,17 +41,15 @@ options = options || {}; | ||
var giveup_time; | ||
if (typeof options.max_tries !== 'undefined') { | ||
max_tries = options.max_tries; | ||
} | ||
if (options.timeout) { | ||
giveup_time = new Date().getTime() + options.timeout; | ||
} | ||
if (!max_tries && !giveup_time) { | ||
max_tries = 5; | ||
} | ||
var tries = 0; | ||
var start = new Date().getTime(); | ||
var tries = 0; | ||
var start = new Date().getTime(); // If the user didn't supply a predicate function then add one that | ||
// If the user didn't supply a predicate function then add one that | ||
// always succeeds. | ||
@@ -70,9 +59,6 @@ // | ||
// that should retry. | ||
var predicate = options.predicate || function (err) { | ||
return true; | ||
}; | ||
var stopped = false; | ||
function try_once() { | ||
@@ -84,7 +70,5 @@ var tryStart = new Date().getTime(); | ||
stopped = true; | ||
if (err.err instanceof Error) { | ||
return _bluebird["default"].reject(err.err); | ||
} | ||
return _bluebird["default"].reject(err); | ||
@@ -95,11 +79,7 @@ }).caught(predicate, function (err) { | ||
} | ||
++tries; | ||
if (tries > 1) { | ||
interval = backoff(interval, options); | ||
} | ||
var now = new Date().getTime(); | ||
if (max_tries && tries === max_tries || giveup_time && now + interval >= giveup_time) { | ||
@@ -109,6 +89,4 @@ if (options.throw_original) { | ||
} | ||
if (!(err instanceof Error)) { | ||
var failure = err; | ||
if (failure) { | ||
@@ -119,7 +97,5 @@ if (typeof failure !== 'string') { | ||
} | ||
err = new Error("rejected with non-error: ".concat(failure)); | ||
err.failure = failure; | ||
} | ||
var timeout = new Error("operation timed out after ".concat(now - start, " ms, ").concat(tries, " tries with error: ").concat(err.message)); | ||
@@ -130,15 +106,13 @@ timeout.failure = err; | ||
} | ||
var delay = interval - (now - tryStart); | ||
if (delay <= 0) { | ||
return try_once(); | ||
} | ||
return _bluebird["default"].delay(delay).then(try_once); | ||
}); | ||
} | ||
return try_once(); | ||
} | ||
return try_once(); | ||
} // Subclass of Error that can be thrown to indicate that retry should stop. | ||
// Subclass of Error that can be thrown to indicate that retry should stop. | ||
// | ||
@@ -150,15 +124,9 @@ // If called with an instance of Error subclass, then the retry promise will be | ||
// | ||
var StopError = /*#__PURE__*/function (_Error) { | ||
(0, _inherits2["default"])(StopError, _Error); | ||
var _super = _createSuper(StopError); | ||
function StopError(err) { | ||
var _this; | ||
(0, _classCallCheck2["default"])(this, StopError); | ||
_this = _super.call(this, err); | ||
if (err instanceof Error) { | ||
@@ -169,7 +137,5 @@ _this.err = err; | ||
} | ||
return _this; | ||
} | ||
return StopError; | ||
return (0, _createClass2["default"])(StopError); | ||
}( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(Error)); // function StopError(err) { | ||
@@ -183,4 +149,2 @@ // if (err instanceof Error) { | ||
// StopError.prototype = Object.create(Error.prototype); | ||
retry.StopError = function () { | ||
@@ -190,7 +154,6 @@ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
} | ||
return (0, _construct2["default"])(StopError, args); | ||
}; // Return the updated interval after applying the various backoff options | ||
}; | ||
// Return the updated interval after applying the various backoff options | ||
function backoff(interval, options) { | ||
@@ -200,12 +163,9 @@ if (options.backoff) { | ||
} | ||
if (options.max_interval) { | ||
interval = Math.min(interval, options.max_interval); | ||
} | ||
return interval; | ||
} | ||
var _default = retry; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=retry.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = void 0; | ||
function secToTime(sec) { | ||
@@ -18,12 +17,9 @@ var s = sec; | ||
if (s < 10) s = "0".concat(s); | ||
if (h === '00') { | ||
return "".concat(m, ":").concat(s); | ||
} | ||
return "".concat(h, ":").concat(m, ":").concat(s); | ||
} | ||
var _default = secToTime; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=secToTime.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = serializeWindow; | ||
var _env = require("@lskjs/env"); | ||
var _map = _interopRequireDefault(require("lodash/map")); | ||
function serializeWindow() { | ||
@@ -16,0 +12,0 @@ var vars = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,25 +8,18 @@ value: true | ||
exports["default"] = void 0; | ||
var _get = _interopRequireDefault(require("lodash/get")); | ||
var _set = _interopRequireDefault(require("lodash/set")); | ||
var _getVal = _interopRequireDefault(require("./getVal")); | ||
var _default = function _default(json, key, val) { | ||
if (!key) return; | ||
if ((0, _get["default"])(json, key)) { | ||
console.log('Translate key duplicate', key, ''); | ||
} | ||
if (val) { | ||
(0, _set["default"])(json, key, (0, _getVal["default"])(val)); | ||
} // else { | ||
} | ||
// else { | ||
// _.set(json, key, key); | ||
// } | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=setVal.js.map |
12
sizes.js
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,9 +8,5 @@ value: true | ||
exports["default"] = void 0; | ||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty")); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; } | ||
var sizes = { | ||
@@ -30,12 +25,9 @@ extraSmall: 'extraSmall', | ||
}; | ||
var is = function is(size1, size2) { | ||
return sizes[size1] === sizes[size2]; | ||
}; | ||
var _default = _objectSpread(_objectSpread({}, sizes), {}, { | ||
is: is | ||
}); | ||
exports["default"] = _default; | ||
//# sourceMappingURL=sizes.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,7 +8,4 @@ value: true | ||
exports["default"] = void 0; | ||
var _snakeCase = _interopRequireDefault(require("lodash/snakeCase")); | ||
var _mapKeys = _interopRequireDefault(require("./mapKeys")); | ||
var snakeCaseKeys = function snakeCaseKeys(object, allowLeadUnderscore) { | ||
@@ -20,5 +16,4 @@ return (0, _mapKeys["default"])(object, function (value, key) { | ||
}; | ||
var _default = snakeCaseKeys; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=snakeCaseKeys.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,5 +8,3 @@ value: true | ||
exports["default"] = void 0; | ||
var _map = _interopRequireDefault(require("lodash/map")); | ||
var _default = function _default() { | ||
@@ -19,4 +16,3 @@ var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=toQs.js.map |
@@ -75,3 +75,2 @@ "use strict"; | ||
}; | ||
function transliterate() { | ||
@@ -78,0 +77,0 @@ var word = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = trim; | ||
function trim(initialStr) { | ||
@@ -15,11 +14,8 @@ var begin = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; | ||
var str = initialStr; | ||
if (end && str[str.length - 1] === symbol) { | ||
str = str.substr(0, str.length - 1); | ||
} | ||
if (begin && str[0] === symbol) { | ||
str = str.substr(1); | ||
} | ||
if (str !== initialStr) return trim(str, begin, end, symbol); | ||
@@ -26,0 +22,0 @@ return str; |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports["default"] = trimSpaces; | ||
function trimSpaces() { | ||
@@ -10,0 +9,0 @@ var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; |
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(str) { | ||
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : str; | ||
try { | ||
@@ -19,4 +17,3 @@ if (typeof str !== 'string') return str; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=tryJSONparse.js.map |
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(str) { | ||
var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; | ||
try { | ||
@@ -18,4 +16,3 @@ return JSON.stringify(str); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=tryJSONstringify.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,12 +8,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _tryJSONparse = _interopRequireDefault(require("./tryJSONparse")); | ||
var tryParamParse = function tryParamParse(str, defaultParam) { | ||
if (str == null || str === '') return defaultParam; | ||
if (typeof str !== 'string') { | ||
return str; | ||
} | ||
var value = (0, _tryJSONparse["default"])(str); | ||
@@ -24,5 +19,4 @@ if (value === undefined) return defaultParam; | ||
}; | ||
var _default = tryParamParse; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=tryParamParse.js.map |
@@ -7,6 +7,4 @@ "use strict"; | ||
exports["default"] = void 0; | ||
var _default = function _default(str) { | ||
var str2 = ''; | ||
while (true) { | ||
@@ -17,7 +15,5 @@ str2 = str.replace(/([\t\n]".*)(\n[^º])(.*"[\t\n])/gi, '$1\\n$3'); | ||
} | ||
return str; | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=txtToArray.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,11 +8,6 @@ value: true | ||
exports["default"] = void 0; | ||
var _isClass = _interopRequireDefault(require("./isClass")); | ||
var _isCollection = _interopRequireDefault(require("./isCollection")); | ||
var _isEmpty = _interopRequireDefault(require("./isEmpty")); | ||
var _isFunction = _interopRequireDefault(require("./isFunction")); | ||
var _default = function _default(v) { | ||
@@ -28,4 +22,3 @@ return { | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=typeChecks.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
var _typeof = require("@babel/runtime/helpers/typeof"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,11 +9,8 @@ value: true | ||
exports["default"] = void 0; | ||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator")); | ||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator")); | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) { if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; } return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) { keys.push(key); } return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
var _default = /*#__PURE__*/function () { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(moduleOrPromise) { | ||
var _ref = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(moduleOrPromise) { | ||
var mayBeModule; | ||
return _regenerator["default"].wrap(function _callee$(_context) { | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) { | ||
@@ -24,6 +21,4 @@ switch (_context.prev = _context.next) { | ||
return moduleOrPromise; | ||
case 2: | ||
mayBeModule = _context.sent; | ||
if (!mayBeModule.__esModule) { | ||
@@ -33,8 +28,5 @@ _context.next = 5; | ||
} | ||
return _context.abrupt("return", mayBeModule["default"]); | ||
case 5: | ||
return _context.abrupt("return", mayBeModule); | ||
case 6: | ||
@@ -47,3 +39,2 @@ case "end": | ||
})); | ||
return function (_x) { | ||
@@ -53,4 +44,3 @@ return _ref.apply(this, arguments); | ||
}(); | ||
exports["default"] = _default; | ||
//# sourceMappingURL=undefault.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,16 +8,11 @@ value: true | ||
exports.regexp = exports["default"] = exports.canonize = void 0; | ||
var _canonize = _interopRequireDefault(require("./canonize")); | ||
var canonize = _canonize["default"]; | ||
exports.canonize = canonize; | ||
var regexp = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; //eslint-disable-line | ||
exports.regexp = regexp; | ||
var _default = function _default(item) { | ||
return regexp.test(String(item)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=validateEmail.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.regexp = exports["default"] = exports.canonize = void 0; | ||
var canonize = function canonize() { | ||
@@ -13,12 +12,9 @@ var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports.canonize = canonize; | ||
var regexp = /^[0-9]{9,}$/; | ||
exports.regexp = regexp; | ||
var _default = function _default(item) { | ||
return regexp.test(String(item)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=validatePhone.js.map |
@@ -7,3 +7,2 @@ "use strict"; | ||
exports.regexp = exports["default"] = exports.canonize = void 0; | ||
var canonize = function canonize() { | ||
@@ -13,12 +12,9 @@ var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
}; | ||
exports.canonize = canonize; | ||
var regexp = /^[^0-9a-z_]{2,}$/; | ||
exports.regexp = regexp; | ||
var _default = function _default(item) { | ||
return regexp.test(String(item)); | ||
}; | ||
exports["default"] = _default; | ||
//# sourceMappingURL=validateUsername.js.map |
"use strict"; | ||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); | ||
Object.defineProperty(exports, "__esModule", { | ||
@@ -9,16 +8,10 @@ value: true | ||
exports["default"] = void 0; | ||
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties")); | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _excluded = ["debug"]; | ||
var _default = function _default(filename, data) { | ||
var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, | ||
debug = _ref.debug, | ||
options = (0, _objectWithoutProperties2["default"])(_ref, _excluded); | ||
debug = _ref.debug, | ||
options = (0, _objectWithoutProperties2["default"])(_ref, _excluded); | ||
return new Promise(function (resolve, reject) { | ||
@@ -32,3 +25,2 @@ _fs["default"].mkdir(_path["default"].dirname(filename), { | ||
if (debug) console.log(" => ".concat(filename)); // eslint-disable-line no-console | ||
return resolve(); | ||
@@ -39,5 +31,3 @@ }); | ||
}; // node -e "require('./packages/utils/build/writeFile').default('/tmp/test2/test.txt', 'txt').catch(err => console.log(err))" | ||
exports["default"] = _default; | ||
//# sourceMappingURL=writeFile.js.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 2 instances in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
437610
4193
3