updateLoop(element2) {
      Logger.debug("Updating loop for element:", element2);
      const loopInfo = this.loops.get(element2) || this.loopsIn.find((loop) => loop.originalElement === element2)[0];
      if (!loopInfo) {
        console.error("\u0418\u043D\u0444\u043E\u0440\u043C\u0430\u0446\u0438\u044F \u043E \u0446\u0438\u043A\u043B\u0435 \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u0430 \u0434\u043B\u044F \u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430");
        return;
      }
      const { template, itemName, indexName, arrayPath, parentNode } = loopInfo;
      const array = this.model.store.get(arrayPath);
      if (!Array.isArray(array)) {
        console.error("\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043D\u0435 \u044F\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043C\u0430\u0441\u0441\u0438\u0432\u043E\u043C:", array);
        return;
      }
      const generated = parentNode.querySelectorAll(`[data-generated-for="${arrayPath}"]`);
      generated.forEach((el) => el.remove());
      array.forEach((item, index) => {
        const newNode = template.cloneNode(true);
        newNode.style.display = "";
        newNode.removeAttribute("data-for");
        newNode.setAttribute("data-generated-for", arrayPath);
        newNode.setAttribute("data-item-index", "" + index);
        Logger.debug(`Creating new loop element for ${arrayPath} at index ${index}`);
        this.domManager.processTemplateNode(newNode, {
          [itemName]: item,
          [indexName || "index"]: index
        });
        Logger.debug(`Insert new node`, newNode);
        parentNode.insertBefore(newNode, element2);
      });
      element2.style.display = "none";
    }
Updates the entire loop for a given element.
@param element