/** Copyright (C) 2020-2026 Kedron Holdings LLC, All Rights Reserved. This file is part of Reactor.
 *  For info and license terms please see https://reactor.toggledbits.com/
 *  ------------------------------------------------------------------------------
*/
const a13_0x2e53a6 = a13_0x13b8;
(function (_0x47408d, _0x5647de) {
    const _0x1f920e = a13_0x13b8, _0x3d932d = _0x47408d();
    while (!![]) {
        try {
            const _0xdbed19 = -parseInt(_0x1f920e(0x1d6)) / 0x1 * (parseInt(_0x1f920e(0x1e6)) / 0x2) + -parseInt(_0x1f920e(0x1ee)) / 0x3 * (parseInt(_0x1f920e(0x1db)) / 0x4) + -parseInt(_0x1f920e(0x1ea)) / 0x5 * (parseInt(_0x1f920e(0x1d3)) / 0x6) + -parseInt(_0x1f920e(0x1d5)) / 0x7 + -parseInt(_0x1f920e(0x1eb)) / 0x8 * (-parseInt(_0x1f920e(0x1e4)) / 0x9) + -parseInt(_0x1f920e(0x1d8)) / 0xa * (parseInt(_0x1f920e(0x1e7)) / 0xb) + parseInt(_0x1f920e(0x1d7)) / 0xc;
            if (_0xdbed19 === _0x5647de)
                break;
            else
                _0x3d932d['push'](_0x3d932d['shift']());
        } catch (_0x3965f8) {
            _0x3d932d['push'](_0x3d932d['shift']());
        }
    }
}(a13_0x37d9, 0x936d2));
function a13_0x37d9() {
    const _0x4379a3 = [
        'name',
        'get',
        './util',
        'Needs\x20subclass\x20implementation',
        'debug',
        '\x22\x20already\x20exists.',
        '798OEnATy',
        '%1:\x20Expression._destroy',
        '7466431aohkZd',
        '91969Yphipp',
        '35085600kUCioX',
        '7047890WVHYWR',
        'log',
        'getValue',
        '124572VbDIQU',
        '_destroy',
        'exports',
        'mixin',
        'Expression\x20named\x20\x22',
        'test',
        'unsubscribe',
        'Expression\x20name\x20\x22',
        'getID',
        '72KkBiEJ',
        'constructor',
        '2dFHkEU',
        '11VobajI',
        'isValidName',
        'has',
        '43085UPDOag',
        '1125512wKhBri',
        'disconnect',
        'setValue',
        '42zHHVUU',
        'add'
    ];
    a13_0x37d9 = function () {
        return _0x4379a3;
    };
    return a13_0x37d9();
}
function a13_0x13b8(_0x3740f6, _0x2aca6d) {
    _0x3740f6 = _0x3740f6 - 0x1d3;
    const _0x37d9b5 = a13_0x37d9();
    let _0x13b803 = _0x37d9b5[_0x3740f6];
    return _0x13b803;
}
const version = 0x6235, Logger = require('./Logger.js'), Observable = require('./Observable.js'), Observer = require('./Observer.js'), util = require(a13_0x2e53a6(0x1f2));
var expressions = {};
const validName = /^\p{Alphabetic}[\p{Alphabetic}0-9_$]*$/iu;
class Expression {
    constructor(_0x101e2e) {
        this['id'] = _0x101e2e, this['log'] = Logger['getLogger'](this);
    }
    static [a13_0x2e53a6(0x1e8)](_0x3f2c5d) {
        const _0x3b7465 = a13_0x2e53a6;
        return validName[_0x3b7465(0x1e0)](_0x3f2c5d);
    }
    static [a13_0x2e53a6(0x1e9)](_0x2f4ad7) {
        return !!expressions[_0x2f4ad7];
    }
    static [a13_0x2e53a6(0x1ef)](_0x9b15f5) {
        const _0x1366c1 = a13_0x2e53a6;
        let _0x57b163 = _0x9b15f5['getID']();
        if (!Expression[_0x1366c1(0x1e8)](_0x57b163))
            throw new Error(_0x1366c1(0x1e2) + _0x57b163 + '\x22\x20is\x20invalid');
        if (expressions[_0x57b163])
            throw new Error(_0x1366c1(0x1df) + _0x57b163 + _0x1366c1(0x1f5));
        return expressions[_0x57b163] = _0x9b15f5, _0x9b15f5;
    }
    static [a13_0x2e53a6(0x1f1)](_0x5a9940) {
        return expressions[_0x5a9940];
    }
    ['toString']() {
        const _0x3b53bf = a13_0x2e53a6;
        return this[_0x3b53bf(0x1e5)][_0x3b53bf(0x1f0)] + '#' + String(this['id']);
    }
    [a13_0x2e53a6(0x1dc)]() {
        const _0x1798ae = a13_0x2e53a6;
        this[_0x1798ae(0x1d9)][_0x1798ae(0x1f4)](0x5, _0x1798ae(0x1d4), this), this['id'] && (this[_0x1798ae(0x1e1)](), this[_0x1798ae(0x1ec)](), delete expressions[this['id']], this['__deleted'] = this['id'], this['id'] = null);
    }
    [a13_0x2e53a6(0x1e3)]() {
        return this['id'];
    }
    [a13_0x2e53a6(0x1da)]() {
        const _0x1b5e58 = a13_0x2e53a6;
        throw new ReferenceError(_0x1b5e58(0x1f3));
    }
    [a13_0x2e53a6(0x1ed)]() {
        const _0x1f8515 = a13_0x2e53a6;
        throw new ReferenceError(_0x1f8515(0x1f3));
    }
}
util['mixin'](Expression, Observer), util[a13_0x2e53a6(0x1de)](Expression, Observable), module[a13_0x2e53a6(0x1dd)] = Expression;