loadui(url) {
    if (!fetch) {
      _a.log(0, "Ui:loadui", "Current environment does not include `fetch`, skipping.")();
      return;
    }
    if (!url) {
      _a.log(0, "Ui:loadui", "url parameter must be provided, skipping.")();
      return;
    }
    fetch(url).then((response) => {
      if (response.ok === false) {
        throw new Error(`Could not load '${url}'. Status ${response.status}, Error: ${response.statusText}`);
      }
      _a.log("trace", "Ui:loadui:then1", `Loaded '${url}'. Status ${response.status}, ${response.statusText}`)();
      const contentType = response.headers.get("content-type");
      if (!contentType || !contentType.includes("application/json")) {
        throw new TypeError(`Fetch '${url}' did not return JSON, ignoring`);
      }
      return response.json();
    }).then((data) => {
      if (data !== void 0) {
        _a.log("trace", "Ui:loadui:then2", "Parsed JSON successfully obtained")();
        this._uiManager({ _ui: data });
        return true;
      }
      return false;
    }).catch((err) => {
      _a.log("warn", "Ui:loadui:catch", "Error. ", err)();
    });
  }
Load a dynamic UI from a JSON web reponse
@param {string} url URL that will return the ui JSON