@azrico/webobject 1.2.30 → 1.2.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,101 +1,70 @@
1
1
  "use strict";
2
2
 
3
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports["default"] = exports.ObjectManager = void 0;
9
-
10
7
  var _event = require("@azrico/event");
11
-
12
8
  var _SimpleObject = _interopRequireDefault(require("./SimpleObject"));
13
-
14
9
  var _string = require("@azrico/string");
15
-
16
10
  var _global = require("@azrico/global");
17
-
18
11
  var _object = require("@azrico/object");
19
-
20
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
-
22
- 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, $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 generator._invoke = function (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); } }; }(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; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if (context.delegate = null, "throw" === context.method) { if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel; context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method"); } return 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, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), 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 (object) { var 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; }
23
-
13
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
14
+ 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; }
24
15
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
25
-
26
16
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
27
-
28
17
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
29
-
30
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
31
-
18
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
32
19
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
33
-
34
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
-
20
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
36
23
  /**
37
24
  * This class manages the events of an Simple Object
38
25
  */
39
26
  var ObjectManager = /*#__PURE__*/function () {
40
27
  function ObjectManager() {
41
28
  _classCallCheck(this, ObjectManager);
42
-
43
29
  _defineProperty(this, "__eventList", void 0);
44
-
45
30
  _defineProperty(this, "__eventPrefix", void 0);
46
-
47
31
  _defineProperty(this, "__sendEvents", true);
48
-
49
32
  _defineProperty(this, "__currentObject", void 0);
50
-
51
33
  _defineProperty(this, "__options", void 0);
52
-
53
34
  _defineProperty(this, "get", this.getValue);
54
35
  }
55
-
56
36
  _createClass(ObjectManager, [{
57
37
  key: "notifyChanged",
58
38
  value: function () {
59
39
  var _notifyChanged = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(type, key, value, subvalue) {
60
40
  var obj, typestr;
61
41
  return _regeneratorRuntime().wrap(function _callee$(_context) {
62
- while (1) {
63
- switch (_context.prev = _context.next) {
64
- case 0:
65
- obj = this.getObject();
66
-
67
- if (obj) {
68
- _context.next = 3;
69
- break;
70
- }
71
-
72
- return _context.abrupt("return", false);
73
-
74
- case 3:
75
- if (value === undefined && type != "meta") value = obj.getValue(key);
76
- typestr = (type ? "$".concat(type, "$") : "") + String(key);
77
- _context.next = 7;
78
- return this.event_run("on_change", typestr, value);
79
-
80
- case 7:
81
- return _context.abrupt("return", _context.sent);
82
-
83
- case 8:
84
- case "end":
85
- return _context.stop();
86
- }
42
+ while (1) switch (_context.prev = _context.next) {
43
+ case 0:
44
+ obj = this.getObject();
45
+ if (obj) {
46
+ _context.next = 3;
47
+ break;
48
+ }
49
+ return _context.abrupt("return", false);
50
+ case 3:
51
+ if (value === undefined && type != "meta") value = obj.getValue(key);
52
+ typestr = (type ? "$".concat(type, "$") : "") + String(key);
53
+ _context.next = 7;
54
+ return this.event_run("on_change", typestr, value);
55
+ case 7:
56
+ return _context.abrupt("return", _context.sent);
57
+ case 8:
58
+ case "end":
59
+ return _context.stop();
87
60
  }
88
61
  }, _callee, this);
89
62
  }));
90
-
91
63
  function notifyChanged(_x, _x2, _x3, _x4) {
92
64
  return _notifyChanged.apply(this, arguments);
93
65
  }
94
-
95
66
  return notifyChanged;
96
- }()
97
- /* -------------------------------------------------------------------------- */
98
-
67
+ }() /* -------------------------------------------------------------------------- */
99
68
  }, {
100
69
  key: "obj",
101
70
  get: function get() {
@@ -105,12 +74,10 @@ var ObjectManager = /*#__PURE__*/function () {
105
74
  * Get the object this manager is managing
106
75
  * @returns the object
107
76
  */
108
-
109
77
  }, {
110
78
  key: "getObject",
111
79
  value: function getObject() {
112
80
  var _this$__currentObject;
113
-
114
81
  return (_this$__currentObject = this.__currentObject) !== null && _this$__currentObject !== void 0 ? _this$__currentObject : undefined;
115
82
  }
116
83
  /**
@@ -118,28 +85,21 @@ var ObjectManager = /*#__PURE__*/function () {
118
85
  * @param toObj
119
86
  * @returns
120
87
  */
121
-
122
88
  }, {
123
89
  key: "setObject",
124
90
  value: function setObject(toObj) {
125
91
  var _this = this;
126
-
127
92
  this.__currentObject = toObj;
128
-
129
93
  if (this.__currentObject) {
130
94
  this.__currentObject.get_managerClass = function () {
131
95
  return _this;
132
96
  };
133
97
  }
134
-
135
98
  return true;
136
99
  }
137
100
  /* -------------------------------------------------------------------------- */
138
-
139
101
  /* Child functions */
140
-
141
102
  /* -------------------------------------------------------------------------- */
142
-
143
103
  }, {
144
104
  key: "isChanged",
145
105
  get: function get() {
@@ -154,14 +114,12 @@ var ObjectManager = /*#__PURE__*/function () {
154
114
  key: "d",
155
115
  get: function get() {
156
116
  var _this$obj;
157
-
158
117
  return (_this$obj = this.obj) === null || _this$obj === void 0 ? void 0 : _this$obj.d;
159
118
  }
160
119
  }, {
161
120
  key: "canModify",
162
121
  get: function get() {
163
122
  var _this$obj2;
164
-
165
123
  return !((_this$obj2 = this.obj) !== null && _this$obj2 !== void 0 && _this$obj2.canModify);
166
124
  }
167
125
  }, {
@@ -173,49 +131,42 @@ var ObjectManager = /*#__PURE__*/function () {
173
131
  key: "isSaved",
174
132
  get: function get() {
175
133
  var _this$obj3;
176
-
177
134
  return ((_this$obj3 = this.obj) === null || _this$obj3 === void 0 ? void 0 : _this$obj3.isSaved) || false;
178
135
  }
179
136
  }, {
180
137
  key: "__cache_name",
181
138
  get: function get() {
182
139
  var _this$obj4;
183
-
184
140
  return ((_this$obj4 = this.obj) === null || _this$obj4 === void 0 ? void 0 : _this$obj4.__cache_name) || "";
185
141
  }
186
142
  }, {
187
143
  key: "getSaveResult",
188
144
  value: function getSaveResult() {
189
145
  var _this$getObject;
190
-
191
146
  return ((_this$getObject = this.getObject()) === null || _this$getObject === void 0 ? void 0 : _this$getObject.getSaveResult()) || undefined;
192
147
  }
193
148
  }, {
194
149
  key: "getSaveResultType",
195
150
  value: function getSaveResultType() {
196
151
  var _this$getObject2;
197
-
198
152
  return ((_this$getObject2 = this.getObject()) === null || _this$getObject2 === void 0 ? void 0 : _this$getObject2.getSaveResultType()) || null;
199
153
  }
200
154
  }, {
201
155
  key: "setSaveResult",
202
156
  value: function setSaveResult(toObj, type) {
203
157
  var _this$getObject3;
204
-
205
158
  return (_this$getObject3 = this.getObject()) === null || _this$getObject3 === void 0 ? void 0 : _this$getObject3.setSaveResult(toObj, type);
206
159
  }
207
160
  }, {
208
161
  key: "apply_changes",
209
162
  value: function apply_changes() {
210
163
  var _this$obj5;
211
-
212
164
  return (_this$obj5 = this.obj) === null || _this$obj5 === void 0 ? void 0 : _this$obj5.apply_changes();
213
165
  }
214
166
  }, {
215
167
  key: "getValue",
216
168
  value: function getValue(key) {
217
169
  var _this$obj6;
218
-
219
170
  var original = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
220
171
  return (_this$obj6 = this.obj) === null || _this$obj6 === void 0 ? void 0 : _this$obj6.getValue(key, original);
221
172
  }
@@ -231,39 +182,29 @@ var ObjectManager = /*#__PURE__*/function () {
231
182
  function () {
232
183
  var _setValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(key, value) {
233
184
  var _this$obj7;
234
-
235
185
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
236
- while (1) {
237
- switch (_context2.prev = _context2.next) {
238
- case 0:
239
- _context2.next = 2;
240
- return (_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.setValue(key, value);
241
-
242
- case 2:
243
- _context2.t0 = _context2.sent;
244
-
245
- if (_context2.t0) {
246
- _context2.next = 5;
247
- break;
248
- }
249
-
250
- _context2.t0 = false;
251
-
252
- case 5:
253
- return _context2.abrupt("return", _context2.t0);
254
-
255
- case 6:
256
- case "end":
257
- return _context2.stop();
258
- }
186
+ while (1) switch (_context2.prev = _context2.next) {
187
+ case 0:
188
+ _context2.next = 2;
189
+ return (_this$obj7 = this.obj) === null || _this$obj7 === void 0 ? void 0 : _this$obj7.setValue(key, value);
190
+ case 2:
191
+ _context2.t0 = _context2.sent;
192
+ if (_context2.t0) {
193
+ _context2.next = 5;
194
+ break;
195
+ }
196
+ _context2.t0 = false;
197
+ case 5:
198
+ return _context2.abrupt("return", _context2.t0);
199
+ case 6:
200
+ case "end":
201
+ return _context2.stop();
259
202
  }
260
203
  }, _callee2, this);
261
204
  }));
262
-
263
205
  function setValue(_x5, _x6) {
264
206
  return _setValue.apply(this, arguments);
265
207
  }
266
-
267
208
  return setValue;
268
209
  }()
269
210
  /**
@@ -273,163 +214,121 @@ var ObjectManager = /*#__PURE__*/function () {
273
214
  * @param subvalue
274
215
  * @return true if changed , false otherwise
275
216
  */
276
-
277
217
  }, {
278
218
  key: "setSubValue",
279
219
  value: function () {
280
220
  var _setSubValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(key, objKey, subvalue) {
281
221
  var _this$obj8;
282
-
283
222
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
284
- while (1) {
285
- switch (_context3.prev = _context3.next) {
286
- case 0:
287
- _context3.next = 2;
288
- return (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.setSubValue(key, objKey, subvalue);
289
-
290
- case 2:
291
- _context3.t0 = _context3.sent;
292
-
293
- if (_context3.t0) {
294
- _context3.next = 5;
295
- break;
296
- }
297
-
298
- _context3.t0 = false;
299
-
300
- case 5:
301
- return _context3.abrupt("return", _context3.t0);
302
-
303
- case 6:
304
- case "end":
305
- return _context3.stop();
306
- }
223
+ while (1) switch (_context3.prev = _context3.next) {
224
+ case 0:
225
+ _context3.next = 2;
226
+ return (_this$obj8 = this.obj) === null || _this$obj8 === void 0 ? void 0 : _this$obj8.setSubValue(key, objKey, subvalue);
227
+ case 2:
228
+ _context3.t0 = _context3.sent;
229
+ if (_context3.t0) {
230
+ _context3.next = 5;
231
+ break;
232
+ }
233
+ _context3.t0 = false;
234
+ case 5:
235
+ return _context3.abrupt("return", _context3.t0);
236
+ case 6:
237
+ case "end":
238
+ return _context3.stop();
307
239
  }
308
240
  }, _callee3, this);
309
241
  }));
310
-
311
242
  function setSubValue(_x7, _x8, _x9) {
312
243
  return _setSubValue.apply(this, arguments);
313
244
  }
314
-
315
245
  return setSubValue;
316
246
  }() //Push value on array
317
-
318
247
  }, {
319
248
  key: "pushValue",
320
249
  value: function () {
321
250
  var _pushValue = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(key, value) {
322
251
  var _this$obj9;
323
-
324
252
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
325
- while (1) {
326
- switch (_context4.prev = _context4.next) {
327
- case 0:
328
- _context4.next = 2;
329
- return (_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.pushValue(key, value);
330
-
331
- case 2:
332
- _context4.t0 = _context4.sent;
333
-
334
- if (_context4.t0) {
335
- _context4.next = 5;
336
- break;
337
- }
338
-
339
- _context4.t0 = false;
340
-
341
- case 5:
342
- return _context4.abrupt("return", _context4.t0);
343
-
344
- case 6:
345
- case "end":
346
- return _context4.stop();
347
- }
253
+ while (1) switch (_context4.prev = _context4.next) {
254
+ case 0:
255
+ _context4.next = 2;
256
+ return (_this$obj9 = this.obj) === null || _this$obj9 === void 0 ? void 0 : _this$obj9.pushValue(key, value);
257
+ case 2:
258
+ _context4.t0 = _context4.sent;
259
+ if (_context4.t0) {
260
+ _context4.next = 5;
261
+ break;
262
+ }
263
+ _context4.t0 = false;
264
+ case 5:
265
+ return _context4.abrupt("return", _context4.t0);
266
+ case 6:
267
+ case "end":
268
+ return _context4.stop();
348
269
  }
349
270
  }, _callee4, this);
350
271
  }));
351
-
352
272
  function pushValue(_x10, _x11) {
353
273
  return _pushValue.apply(this, arguments);
354
274
  }
355
-
356
275
  return pushValue;
357
- }()
358
- /* -------------------------------------------------------------------------- */
359
-
276
+ }() /* -------------------------------------------------------------------------- */
360
277
  }, {
361
278
  key: "getIndexOrID",
362
279
  value: function getIndexOrID() {
363
280
  var _this$obj10;
364
-
365
281
  return ((_this$obj10 = this.obj) === null || _this$obj10 === void 0 ? void 0 : _this$obj10.getIndexOrID()) || -1;
366
282
  }
367
283
  }, {
368
284
  key: "getIndex",
369
285
  value: function getIndex() {
370
286
  var _this$obj11;
371
-
372
287
  return ((_this$obj11 = this.obj) === null || _this$obj11 === void 0 ? void 0 : _this$obj11.getIndex()) || -1;
373
288
  }
374
289
  }, {
375
290
  key: "getID",
376
291
  value: function getID() {
377
292
  var _this$obj12;
378
-
379
293
  return ((_this$obj12 = this.obj) === null || _this$obj12 === void 0 ? void 0 : _this$obj12.getID()) || "";
380
294
  }
381
295
  /* -------------------------------------------------------------------------- */
382
-
383
296
  /* Getters */
384
-
385
297
  /* -------------------------------------------------------------------------- */
386
-
387
298
  /* -------------------------------------------------------------------------- */
388
-
389
299
  /* Events */
390
-
391
300
  /* -------------------------------------------------------------------------- */
392
-
393
301
  }, {
394
302
  key: "event_run",
395
303
  value: function () {
396
304
  var _event_run = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(eventName) {
397
305
  var _len,
398
- params,
399
- _key,
400
- _args5 = arguments;
401
-
306
+ params,
307
+ _key,
308
+ _args5 = arguments;
402
309
  return _regeneratorRuntime().wrap(function _callee5$(_context5) {
403
- while (1) {
404
- switch (_context5.prev = _context5.next) {
405
- case 0:
406
- if (this.__sendEvents) {
407
- _context5.next = 2;
408
- break;
409
- }
410
-
411
- return _context5.abrupt("return");
412
-
413
- case 2:
414
- for (_len = _args5.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
415
- params[_key - 1] = _args5[_key];
416
- }
417
-
418
- _context5.next = 5;
419
- return _event.EventManager.run.apply(_event.EventManager, [this, eventName].concat(params));
420
-
421
- case 5:
422
- case "end":
423
- return _context5.stop();
424
- }
310
+ while (1) switch (_context5.prev = _context5.next) {
311
+ case 0:
312
+ if (this.__sendEvents) {
313
+ _context5.next = 2;
314
+ break;
315
+ }
316
+ return _context5.abrupt("return");
317
+ case 2:
318
+ for (_len = _args5.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
319
+ params[_key - 1] = _args5[_key];
320
+ }
321
+ _context5.next = 5;
322
+ return _event.EventManager.run.apply(_event.EventManager, [this, eventName].concat(params));
323
+ case 5:
324
+ case "end":
325
+ return _context5.stop();
425
326
  }
426
327
  }, _callee5, this);
427
328
  }));
428
-
429
329
  function event_run(_x12) {
430
330
  return _event_run.apply(this, arguments);
431
331
  }
432
-
433
332
  return event_run;
434
333
  }()
435
334
  }, {
@@ -449,29 +348,24 @@ var ObjectManager = /*#__PURE__*/function () {
449
348
  value: function () {
450
349
  var _event_add = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(name, uname, runEvent) {
451
350
  var onlyOn,
452
- runOnce,
453
- _args6 = arguments;
351
+ runOnce,
352
+ _args6 = arguments;
454
353
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
455
- while (1) {
456
- switch (_context6.prev = _context6.next) {
457
- case 0:
458
- onlyOn = _args6.length > 3 && _args6[3] !== undefined ? _args6[3] : null;
459
- runOnce = _args6.length > 4 && _args6[4] !== undefined ? _args6[4] : false;
460
- _context6.next = 4;
461
- return _event.EventManager.add(this, name, uname, runEvent, onlyOn, runOnce);
462
-
463
- case 4:
464
- case "end":
465
- return _context6.stop();
466
- }
354
+ while (1) switch (_context6.prev = _context6.next) {
355
+ case 0:
356
+ onlyOn = _args6.length > 3 && _args6[3] !== undefined ? _args6[3] : null;
357
+ runOnce = _args6.length > 4 && _args6[4] !== undefined ? _args6[4] : false;
358
+ _context6.next = 4;
359
+ return _event.EventManager.add(this, name, uname, runEvent, onlyOn, runOnce);
360
+ case 4:
361
+ case "end":
362
+ return _context6.stop();
467
363
  }
468
364
  }, _callee6, this);
469
365
  }));
470
-
471
366
  function event_add(_x13, _x14, _x15) {
472
367
  return _event_add.apply(this, arguments);
473
368
  }
474
-
475
369
  return event_add;
476
370
  }()
477
371
  }, {
@@ -488,11 +382,8 @@ var ObjectManager = /*#__PURE__*/function () {
488
382
  key: "toggleOption",
489
383
  value:
490
384
  /* -------------------------------------------------------------------------- */
491
-
492
385
  /* Options */
493
-
494
386
  /* -------------------------------------------------------------------------- */
495
-
496
387
  /**
497
388
  * Set an option to some value, if its already equal to the value it will be deleted instead
498
389
  * @param key
@@ -503,39 +394,30 @@ var ObjectManager = /*#__PURE__*/function () {
503
394
  var _toggleOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(key, value) {
504
395
  var oldval;
505
396
  return _regeneratorRuntime().wrap(function _callee7$(_context7) {
506
- while (1) {
507
- switch (_context7.prev = _context7.next) {
508
- case 0:
509
- oldval = this.getOption(key);
510
-
511
- if (!(0, _object.object_equals_loose)(oldval, value)) {
512
- _context7.next = 6;
513
- break;
514
- }
515
-
516
- _context7.next = 4;
517
- return this.setOption(key, null);
518
-
519
- case 4:
520
- _context7.next = 8;
397
+ while (1) switch (_context7.prev = _context7.next) {
398
+ case 0:
399
+ oldval = this.getOption(key);
400
+ if (!(0, _object.object_equals_loose)(oldval, value)) {
401
+ _context7.next = 6;
521
402
  break;
522
-
523
- case 6:
524
- _context7.next = 8;
525
- return this.setOption(key, value);
526
-
527
- case 8:
528
- case "end":
529
- return _context7.stop();
530
- }
403
+ }
404
+ _context7.next = 4;
405
+ return this.setOption(key, null);
406
+ case 4:
407
+ _context7.next = 8;
408
+ break;
409
+ case 6:
410
+ _context7.next = 8;
411
+ return this.setOption(key, value);
412
+ case 8:
413
+ case "end":
414
+ return _context7.stop();
531
415
  }
532
416
  }, _callee7, this);
533
417
  }));
534
-
535
418
  function toggleOption(_x16, _x17) {
536
419
  return _toggleOption.apply(this, arguments);
537
420
  }
538
-
539
421
  return toggleOption;
540
422
  }()
541
423
  }, {
@@ -543,35 +425,27 @@ var ObjectManager = /*#__PURE__*/function () {
543
425
  value: function () {
544
426
  var _setOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(key, value) {
545
427
  return _regeneratorRuntime().wrap(function _callee8$(_context8) {
546
- while (1) {
547
- switch (_context8.prev = _context8.next) {
548
- case 0:
549
- if (this.__options == null) this.__options = {};
550
-
551
- if (value == null) {
552
- delete this.__options[key];
553
- } else {
554
- this.__options[key] = value;
555
- }
556
-
557
- _context8.next = 4;
558
- return this.event_run("on_option_change", key, value);
559
-
560
- case 4:
561
- return _context8.abrupt("return", _context8.sent);
562
-
563
- case 5:
564
- case "end":
565
- return _context8.stop();
566
- }
428
+ while (1) switch (_context8.prev = _context8.next) {
429
+ case 0:
430
+ if (this.__options == null) this.__options = {};
431
+ if (value == null) {
432
+ delete this.__options[key];
433
+ } else {
434
+ this.__options[key] = value;
435
+ }
436
+ _context8.next = 4;
437
+ return this.event_run("on_option_change", key, value);
438
+ case 4:
439
+ return _context8.abrupt("return", _context8.sent);
440
+ case 5:
441
+ case "end":
442
+ return _context8.stop();
567
443
  }
568
444
  }, _callee8, this);
569
445
  }));
570
-
571
446
  function setOption(_x18, _x19) {
572
447
  return _setOption.apply(this, arguments);
573
448
  }
574
-
575
449
  return setOption;
576
450
  }()
577
451
  /**
@@ -582,43 +456,34 @@ var ObjectManager = /*#__PURE__*/function () {
582
456
  * @param nextvalue
583
457
  * @param action
584
458
  */
585
-
586
459
  }, {
587
460
  key: "holdOption",
588
461
  value: function () {
589
462
  var _holdOption = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(key, value, nextvalue, action) {
590
463
  return _regeneratorRuntime().wrap(function _callee9$(_context9) {
591
- while (1) {
592
- switch (_context9.prev = _context9.next) {
593
- case 0:
594
- _context9.prev = 0;
595
- this.setOption(key, value);
596
-
597
- if (!(typeof action === "function")) {
598
- _context9.next = 5;
599
- break;
600
- }
601
-
464
+ while (1) switch (_context9.prev = _context9.next) {
465
+ case 0:
466
+ _context9.prev = 0;
467
+ this.setOption(key, value);
468
+ if (!(typeof action === "function")) {
602
469
  _context9.next = 5;
603
- return action();
604
-
605
- case 5:
606
- _context9.prev = 5;
607
- this.setOption(key, nextvalue);
608
- return _context9.finish(5);
609
-
610
- case 8:
611
- case "end":
612
- return _context9.stop();
613
- }
470
+ break;
471
+ }
472
+ _context9.next = 5;
473
+ return action();
474
+ case 5:
475
+ _context9.prev = 5;
476
+ this.setOption(key, nextvalue);
477
+ return _context9.finish(5);
478
+ case 8:
479
+ case "end":
480
+ return _context9.stop();
614
481
  }
615
482
  }, _callee9, this, [[0,, 5, 8]]);
616
483
  }));
617
-
618
484
  function holdOption(_x20, _x21, _x22, _x23) {
619
485
  return _holdOption.apply(this, arguments);
620
486
  }
621
-
622
487
  return holdOption;
623
488
  }()
624
489
  }, {
@@ -628,11 +493,8 @@ var ObjectManager = /*#__PURE__*/function () {
628
493
  return this.__options[key];
629
494
  }
630
495
  /* -------------------------------------------------------------------------- */
631
-
632
496
  /* Errors */
633
-
634
497
  /* -------------------------------------------------------------------------- */
635
-
636
498
  }, {
637
499
  key: "addError",
638
500
  value: function addError(title, message) {
@@ -658,14 +520,11 @@ var ObjectManager = /*#__PURE__*/function () {
658
520
  key: "addError",
659
521
  value: function addError(o, title, message) {
660
522
  var sendToRegister = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : "auto";
661
-
662
523
  if (o && o.obj) {
663
524
  return _SimpleObject["default"].addError(o.obj, title, message, sendToRegister);
664
525
  }
665
-
666
526
  var errStr = (0, _string.combine_if_not_blank)(title, " : ", message);
667
527
  console.error("[REGISTER-ERROR]", errStr);
668
-
669
528
  _global.gfunc.run_action("add_error", {
670
529
  title: title,
671
530
  message: message,
@@ -684,10 +543,8 @@ var ObjectManager = /*#__PURE__*/function () {
684
543
  return _SimpleObject["default"].clearErrors(o.obj);
685
544
  }
686
545
  }]);
687
-
688
546
  return ObjectManager;
689
547
  }();
690
-
691
548
  exports.ObjectManager = ObjectManager;
692
549
  var _default = ObjectManager;
693
550
  exports["default"] = _default;