attributeChangedCallback(attrib, oldVal, newVal) {
    if (oldVal === newVal) return;
    this[attrib] = newVal;
    switch (attrib) {
      case "undefined": {
        if (newVal === "" || ["on", "true", "report"].includes(newVal.toLowerCase())) this.undef = true;
        else this.undef = false;
        break;
      }
      case "report": {
        if (newVal === "" || ["on", "true", "report"].includes(newVal.toLowerCase())) this.report = true;
        else this.report = false;
        break;
      }
      case "type": {
        if (newVal === "" || !this.types.includes(newVal.toLowerCase())) this.type = "plain";
        else this.type = newVal;
        break;
      }
      case "filter": {
        this.filter = void 0;
        this.filterArgs = [];
        if (!newVal) break;
        this.filter = newVal;
        newVal = newVal.slice(0, 127);
        const f = newVal.replace(/\s/g, "").match(/([a-zA-Z_$][a-zA-Z_$0-9.-]+)(\((.*)\))?/);
        if (!f) {
          console.warn('\u26A0\uFE0F [uib-var] Filter function "'.concat(newVal, '" invalid. Cannot process.'));
          break;
        }
        this.filter = f[1];
        if (f[3]) {
          try {
            this.filterArgs = JSON.parse(f[3]);
          } catch (e) {
          }
          this.filterArgs = f[3].split(",").map((x) => {
            x = x.trim();
            if (isNaN(x)) {
              let y = x.replace(/^["'`]/, "").replace(/["'`]$/, "");
              try {
                y = new Function("return ".concat(y))();
              } catch (e) {
              }
              return y;
            }
            return Number(x);
          });
        }
        if (!this.variable && !this.topic) this.showVar(false);
        break;
      }
      default: {
        break;
      }
    }
    this._event("attribChanged", { attribute: attrib, newVal, oldVal });
  }
Handle watched attributes
NOTE: On initial startup, this is called for each watched attrib set in HTML - BEFORE connectedCallback is called.
Attribute values can only ever be strings
@param {string} attrib The name of the attribute that is changing
@param {string} newVal The new value of the attribute
@param {string} oldVal The old value of the attribute