Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
$$setValue: d('c', function (nu) {
var old = getPrototypeOf(this), objects;
if (!nu) nu = Base;
if (old === nu) return;
if (old._childType_ === 'object') objects = this.values;
this.__proto__ = nu;
this.prototype.__proto__ = nu.prototype;
remove.call(old._children_, this);
remove.call(old.prototype._children_, this.prototype);
if (!nu.hasOwnProperty('_children_')) {
defineProperty(nu, '_children_', d('', []));
}
if (!nu.prototype.hasOwnProperty('_children_')) {
defineProperty(nu.prototype, '_children_', d('', []));
}
nu._children_.push(this);
nu.prototype._children_.push(this);
if (old === Base) Base[this._id_] = this;
if (nu === Base) delete Base[this._id_];
// Fix relations proto
this._forEachRelation_(setRelationProto.bind(nu));
this.prototype._forEachRelation_(setRelationProto.bind(nu.prototype));
$$setValue: d('c', function (nu) {
var old = getPrototypeOf(this), objects;
if (!nu) nu = Base;
if (old === nu) return;
if (old._childType_ === 'object') objects = this.values;
this.__proto__ = nu;
this.prototype.__proto__ = nu.prototype;
remove.call(old._children_, this);
remove.call(old.prototype._children_, this.prototype);
if (!nu.hasOwnProperty('_children_')) {
defineProperty(nu, '_children_', d('', []));
}
if (!nu.prototype.hasOwnProperty('_children_')) {
defineProperty(nu.prototype, '_children_', d('', []));
}
nu._children_.push(this);
nu.prototype._children_.push(this);
if (old === Base) Base[this._id_] = this;
if (nu === Base) delete Base[this._id_];
// Fix relations proto
this._forEachRelation_(setRelationProto.bind(nu));
status.on("change", function (value) {
if (value) {
remove.call(result, path);
promise.emit("change", { data: result, removed: [path], added: [] });
} else {
result.push(path);
promise.emit("change", { data: result, removed: [], added: [path] });
}
});
}
close: function () { remove.call(pipes, e2); }
};
_unBind: d(function () {
if (!this.__map__) return;
remove.call(this.__map__.object
._getDescriptorIterators_(this.__map__._sKey_), this);
this.__map__ = null;
unBind.call(this);
}),
'@@toStringTag': d('c', 'Map Iterator'),
switchToReg = function (watcher) {
var emitter = watcher.emitter, closePrevious = emitter._close;
try {
watchReg(watcher.path, watcher.emitter);
} catch (err) {
if (err.code === "EMFILE") {
descHandler.limit = descHandler.taken;
releaseDescs();
return;
}
if (err.code === "ENOENT" || err.code === "DIFFTYPE") {
emitter.off("change", emitter._watchSwitchListener);
delete emitter._watchSwitchListener;
remove.call(watchers.alt, watcher);
watcher.emitter.end(err);
return;
}
throw err;
}
emitter.off("change", emitter._watchSwitchListener);
delete emitter._watchSwitchListener;
remove.call(watchers.alt, watcher);
closePrevious();
descHandler.open();
watcher.alt = false;
watchers.reg.push(watcher);
watchers.reg.sort(compare);
};
setItemProto = function (item) {
var old = getPrototypeOf(item), nu = this._itemPrototype_;
remove.call(old._children_, item);
item.__proto__ = nu;
if (!nu.hasOwnProperty('_children_')) {
defineProperty(nu, '_children_', d('', []));
}
nu._children_.push(item);
item._forEachRelation_(setRelationProto.bind(nu));
};
remove = function (obj) {
var rel;
rel = obj[name];
if (!rel.hasOwnProperty('_getter_')) return;
delete rel._getter_;
arrRemove.call(objects, obj);
obj.off('extend', onadd);
obj.off('reduce', onremove);
if (obj._type_ === 'prototype') {
obj.ns.off('extend', onnsadd);
obj.ns.off('reduce', onnsremove);
}
baseRel.triggers.forEach(function (triggerName) {
var trigger = obj['_' + triggerName];
trigger.off('change', rel._update_);
trigger.off('add', rel._update_);
trigger.off('delete', rel._update_);
});
if (obj.hasOwnProperty('_children_')) obj._children_.forEach(remove);
};
off = function (onChange, obj) {
var listeners = obj._dynamicListeners_;
if (listeners) remove.call(listeners, this);
else obj.off('change', onChange);
};
_onDelete: d(function (obj) {
remove.call(this, obj);
this._sort();
}),
__sort: d(function () {