text: /**
   * @file
   * JavaScript behaviors for CodeMirror integration.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // @see http://codemirror.net/doc/manual.html#config
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.codeMirror = Drupal.webform.codeMirror || {};
    Drupal.webform.codeMirror.options = Drupal.webform.codeMirror.options || {};
  
    /**
     * Initialize CodeMirror editor.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformCodeMirror = {
      attach: function (context) {
        if (!window.CodeMirror) {
          return;
        }
  
        // Webform CodeMirror editor.
        $(context).find('textarea.js-webform-codemirror').once('webform-codemirror').each(function () {
          var $input = $(this);
  
          // Open all closed details, so that editor height is correctly calculated.
          var $details = $input.parents('details:not([open])');
          $details.attr('open', 'open');
  
          // #59 HTML5 required attribute breaks hack for webform submission.
          // https://github.com/marijnh/CodeMirror-old/issues/59
          $input.removeAttr('required');
  
          var options = $.extend({
            mode: $input.attr('data-webform-codemirror-mode'),
            lineNumbers: true,
            lineWrapping: ($input.attr('wrap') !== 'off'),
            viewportMargin: Infinity,
            readOnly: !!($input.prop('readonly') || $input.prop('disabled')),
            extraKeys: {
              // Setting for using spaces instead of tabs - https://github.com/codemirror/CodeMirror/issues/988
              Tab: function (cm) {
                var spaces = Array(cm.getOption('indentUnit') + 1).join(' ');
                cm.replaceSelection(spaces, 'end', '+element');
              },
              // On 'Escape' move to the next tabbable input.
              // @see http://bgrins.github.io/codemirror-accessible/
              Esc: function (cm) {
                // Must show and then textarea so that we can determine
                // its tabindex.
                var textarea = $(cm.getTextArea());
                $(textarea).show().addClass('visually-hidden');
                var $tabbable = $(':tabbable');
                var tabindex = $tabbable.index(textarea);
                $(textarea).hide().removeClass('visually-hidden');
  
                // Tabindex + 2 accounts for the CodeMirror's iframe.
                $tabbable.eq(tabindex + 2).trigger('focus');
              }
  
            }
          }, Drupal.webform.codeMirror.options);
  
          var editor = CodeMirror.fromTextArea(this, options);
  
          // Now, close details.
          $details.removeAttr('open');
  
          // Apply the textarea's min/max-height to the CodeMirror editor.
          if ($input.css('min-height')) {
            var minHeight = $input.css('min-height');
            $(editor.getWrapperElement())
              .css('min-height', minHeight)
              .find('.CodeMirror-scroll')
              .css('min-height', minHeight);
          }
          if ($input.css('max-height')) {
            var maxHeight = $input.css('max-height');
            $(editor.getWrapperElement())
              .css('max-height', maxHeight)
              .find('.CodeMirror-scroll')
              .css('max-height', maxHeight);
          }
  
          // Issue #2764443: CodeMirror is not setting submitted value when
          // rendered within a webform UI dialog or within an Ajaxified element.
          var changeTimer = null;
          editor.on('change', function () {
            if (changeTimer) {
              window.clearTimeout(changeTimer);
              changeTimer = null;
            }
            changeTimer = setTimeout(function () {editor.save();}, 500);
          });
  
          // Update CodeMirror when the textarea's value has changed.
          // @see webform.states.js
          $input.on('change', function () {
            editor.getDoc().setValue($input.val());
          });
  
          // Set CodeMirror to be readonly when the textarea is disabled.
          // @see webform.states.js
          $input.on('webform:disabled', function () {
            editor.setOption('readOnly', $input.is(':disabled'));
          });
  
          // Delay refreshing CodeMirror for 500 millisecond while the dialog is
          // still being rendered.
          // @see http://stackoverflow.com/questions/8349571/codemirror-editor-is-not-loading-content-until-clicked
          setTimeout(function () {
            // Show tab panel and open details.
            var $tabPanel = $input.parents('.ui-tabs-panel:hidden');
            var $details = $input.parents('details:not([open])');
  
            if (!$tabPanel.length && $details.length) {
              return;
            }
  
            $tabPanel.show();
            $details.attr('open', 'open');
  
            editor.refresh();
  
            // Hide tab panel and close details.
            $tabPanel.hide();
            $details.removeAttr('open');
          }, 500);
        });
  
        // Webform CodeMirror syntax coloring.
        if (window.CodeMirror.runMode) {
          $(context).find('.js-webform-codemirror-runmode').once('webform-codemirror-runmode').each(function () {
            // Mode Runner - http://codemirror.net/demo/runmode.html
            CodeMirror.runMode($(this).addClass('cm-s-default').text(), $(this).attr('data-webform-codemirror-mode'), this);
          });
        }
  
      }
    };
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  
  (function ($, Drupal, drupalSettings) {
    var showWeight = JSON.parse(localStorage.getItem('Drupal.tableDrag.showWeight'));
    Drupal.behaviors.tableDrag = {
      attach: function attach(context, settings) {
        function initTableDrag(table, base) {
          if (table.length) {
            Drupal.tableDrag[base] = new Drupal.tableDrag(table[0], settings.tableDrag[base]);
          }
        }
  
        Object.keys(settings.tableDrag || {}).forEach(function (base) {
          initTableDrag($(context).find("#".concat(base)).once('tabledrag'), base);
        });
      }
    };
  
    Drupal.tableDrag = function (table, tableSettings) {
      var _this = this;
  
      var self = this;
      var $table = $(table);
      this.$table = $(table);
      this.table = table;
      this.tableSettings = tableSettings;
      this.dragObject = null;
      this.rowObject = null;
      this.oldRowElement = null;
      this.oldY = null;
      this.changed = false;
      this.maxDepth = 0;
      this.rtl = $(this.table).css('direction') === 'rtl' ? -1 : 1;
      this.striping = $(this.table).data('striping') === 1;
      this.scrollSettings = {
        amount: 4,
        interval: 50,
        trigger: 70
      };
      this.scrollInterval = null;
      this.scrollY = 0;
      this.windowHeight = 0;
      this.$toggleWeightButton = null;
      this.indentEnabled = false;
      Object.keys(tableSettings || {}).forEach(function (group) {
        Object.keys(tableSettings[group] || {}).forEach(function (n) {
          if (tableSettings[group][n].relationship === 'parent') {
            _this.indentEnabled = true;
          }
  
          if (tableSettings[group][n].limit > 0) {
            _this.maxDepth = tableSettings[group][n].limit;
          }
        });
      });
  
      if (this.indentEnabled) {
        this.indentCount = 1;
        var indent = Drupal.theme('tableDragIndentation');
        var testRow = $('<tr></tr>').addClass('draggable').appendTo(table);
        var testCell = $('<td></td>').appendTo(testRow).prepend(indent).prepend(indent);
        var $indentation = testCell.find('.js-indentation');
        this.indentAmount = $indentation.get(1).offsetLeft - $indentation.get(0).offsetLeft;
        testRow.remove();
      }
  
      $table.find('> tr.draggable, > tbody > tr.draggable').each(function () {
        self.makeDraggable(this);
      });
      var $toggleWeightWrapper = $(Drupal.theme('tableDragToggle'));
      this.$toggleWeightButton = $toggleWeightWrapper.find('[data-drupal-selector="tabledrag-toggle-weight"]');
      this.$toggleWeightButton.on('click', $.proxy(function (e) {
        e.preventDefault();
        this.toggleColumns();
      }, this));
      $table.before($toggleWeightWrapper);
      self.initColumns();
      $(document).on('touchmove', function (event) {
        return self.dragRow(event.originalEvent.touches[0], self);
      });
      $(document).on('touchend', function (event) {
        return self.dropRow(event.originalEvent.touches[0], self);
      });
      $(document).on('mousemove pointermove', function (event) {
        return self.dragRow(event, self);
      });
      $(document).on('mouseup pointerup', function (event) {
        return self.dropRow(event, self);
      });
      $(window).on('storage', $.proxy(function (e) {
        if (e.originalEvent.key === 'Drupal.tableDrag.showWeight') {
          showWeight = JSON.parse(e.originalEvent.newValue);
          this.displayColumns(showWeight);
        }
      }, this));
    };
  
    Drupal.tableDrag.prototype.initColumns = function () {
      var _this2 = this;
  
      var $table = this.$table;
      var hidden;
      var cell;
      var columnIndex;
      Object.keys(this.tableSettings || {}).forEach(function (group) {
        Object.keys(_this2.tableSettings[group]).some(function (tableSetting) {
          var field = $table.find(".".concat(_this2.tableSettings[group][tableSetting].target)).eq(0);
  
          if (field.length && _this2.tableSettings[group][tableSetting].hidden) {
            hidden = _this2.tableSettings[group][tableSetting].hidden;
            cell = field.closest('td');
            return true;
          }
  
          return false;
        });
  
        if (hidden && cell[0]) {
          columnIndex = cell.parent().find('> td').index(cell.get(0)) + 1;
          $table.find('> thead > tr, > tbody > tr, > tr').each(_this2.addColspanClass(columnIndex));
        }
      });
      this.displayColumns(showWeight);
    };
  
    Drupal.tableDrag.prototype.addColspanClass = function (columnIndex) {
      return function () {
        var $row = $(this);
        var index = columnIndex;
        var cells = $row.children();
        var cell;
        cells.each(function (n) {
          if (n < index && this.colSpan && this.colSpan > 1) {
            index -= this.colSpan - 1;
          }
        });
  
        if (index > 0) {
          cell = cells.filter(":nth-child(".concat(index, ")"));
  
          if (cell[0].colSpan && cell[0].colSpan > 1) {
            cell.addClass('tabledrag-has-colspan');
          } else {
            cell.addClass('tabledrag-hide');
          }
        }
      };
    };
  
    Drupal.tableDrag.prototype.displayColumns = function (displayWeight) {
      if (displayWeight) {
        this.showColumns();
      } else {
          this.hideColumns();
        }
  
      this.$toggleWeightButton.html(Drupal.theme('toggleButtonContent', displayWeight));
      $('table').findOnce('tabledrag').trigger('columnschange', !!displayWeight);
    };
  
    Drupal.tableDrag.prototype.toggleColumns = function () {
      showWeight = !showWeight;
      this.displayColumns(showWeight);
  
      if (showWeight) {
        localStorage.setItem('Drupal.tableDrag.showWeight', showWeight);
      } else {
        localStorage.removeItem('Drupal.tableDrag.showWeight');
      }
    };
  
    Drupal.tableDrag.prototype.hideColumns = function () {
      var $tables = $('table').findOnce('tabledrag');
      $tables.find('.tabledrag-hide').css('display', 'none');
      $tables.find('.tabledrag-handle').css('display', '');
      $tables.find('.tabledrag-has-colspan').each(function () {
        this.colSpan -= 1;
      });
    };
  
    Drupal.tableDrag.prototype.showColumns = function () {
      var $tables = $('table').findOnce('tabledrag');
      $tables.find('.tabledrag-hide').css('display', '');
      $tables.find('.tabledrag-handle').css('display', 'none');
      $tables.find('.tabledrag-has-colspan').each(function () {
        this.colSpan += 1;
      });
    };
  
    Drupal.tableDrag.prototype.rowSettings = function (group, row) {
      var field = $(row).find(".".concat(group));
      var tableSettingsGroup = this.tableSettings[group];
      return Object.keys(tableSettingsGroup).map(function (delta) {
        var targetClass = tableSettingsGroup[delta].target;
        var rowSettings;
  
        if (field.is(".".concat(targetClass))) {
          rowSettings = {};
          Object.keys(tableSettingsGroup[delta]).forEach(function (n) {
            rowSettings[n] = tableSettingsGroup[delta][n];
          });
        }
  
        return rowSettings;
      }).filter(function (rowSetting) {
        return rowSetting;
      })[0];
    };
  
    Drupal.tableDrag.prototype.makeDraggable = function (item) {
      var self = this;
      var $item = $(item);
      $item.find('td:first-of-type').find('a').addClass('menu-item__link');
      var $handle = $(Drupal.theme('tableDragHandle'));
      var $indentationLast = $item.find('td:first-of-type').find('.js-indentation').eq(-1);
  
      if ($indentationLast.length) {
        $indentationLast.after($handle);
        self.indentCount = Math.max($item.find('.js-indentation').length, self.indentCount);
      } else {
        $item.find('td').eq(0).prepend($handle);
      }
  
      $handle.on('mousedown touchstart pointerdown', function (event) {
        event.preventDefault();
  
        if (event.originalEvent.type === 'touchstart') {
          event = event.originalEvent.touches[0];
        }
  
        self.dragStart(event, self, item);
      });
      $handle.on('click', function (e) {
        e.preventDefault();
      });
      $handle.on('focus', function () {
        self.safeBlur = true;
      });
      $handle.on('blur', function (event) {
        if (self.rowObject && self.safeBlur) {
          self.dropRow(event, self);
        }
      });
      $handle.on('keydown', function (event) {
        if (event.keyCode !== 9 && !self.rowObject) {
          self.rowObject = new self.row(item, 'keyboard', self.indentEnabled, self.maxDepth, true);
        }
  
        var keyChange = false;
        var groupHeight;
  
        switch (event.keyCode) {
          case 37:
          case 63234:
            keyChange = true;
            self.rowObject.indent(-1 * self.rtl);
            break;
  
          case 38:
          case 63232:
            {
              var $previousRow = $(self.rowObject.element).prev('tr').eq(0);
              var previousRow = $previousRow.get(0);
  
              while (previousRow && $previousRow.is(':hidden')) {
                $previousRow = $(previousRow).prev('tr').eq(0);
                previousRow = $previousRow.get(0);
              }
  
              if (previousRow) {
                self.safeBlur = false;
                self.rowObject.direction = 'up';
                keyChange = true;
  
                if ($(item).is('.tabledrag-root')) {
                  groupHeight = 0;
  
                  while (previousRow && $previousRow.find('.js-indentation').length) {
                    $previousRow = $(previousRow).prev('tr').eq(0);
                    previousRow = $previousRow.get(0);
                    groupHeight += $previousRow.is(':hidden') ? 0 : previousRow.offsetHeight;
                  }
  
                  if (previousRow) {
                    self.rowObject.swap('before', previousRow);
                    window.scrollBy(0, -groupHeight);
                  }
                } else if (self.table.tBodies[0].rows[0] !== previousRow || $previousRow.is('.draggable')) {
                  self.rowObject.swap('before', previousRow);
                  self.rowObject.interval = null;
                  self.rowObject.indent(0);
                  window.scrollBy(0, -parseInt(item.offsetHeight, 10));
                }
  
                $handle.trigger('focus');
              }
  
              break;
            }
  
          case 39:
          case 63235:
            keyChange = true;
            self.rowObject.indent(self.rtl);
            break;
  
          case 40:
          case 63233:
            {
              var $nextRow = $(self.rowObject.group).eq(-1).next('tr').eq(0);
              var nextRow = $nextRow.get(0);
  
              while (nextRow && $nextRow.is(':hidden')) {
                $nextRow = $(nextRow).next('tr').eq(0);
                nextRow = $nextRow.get(0);
              }
  
              if (nextRow) {
                self.safeBlur = false;
                self.rowObject.direction = 'down';
                keyChange = true;
  
                if ($(item).is('.tabledrag-root')) {
                  groupHeight = 0;
                  var nextGroup = new self.row(nextRow, 'keyboard', self.indentEnabled, self.maxDepth, false);
  
                  if (nextGroup) {
                    $(nextGroup.group).each(function () {
                      groupHeight += $(this).is(':hidden') ? 0 : this.offsetHeight;
                    });
                    var nextGroupRow = $(nextGroup.group).eq(-1).get(0);
                    self.rowObject.swap('after', nextGroupRow);
                    window.scrollBy(0, parseInt(groupHeight, 10));
                  }
                } else {
                  self.rowObject.swap('after', nextRow);
                  self.rowObject.interval = null;
                  self.rowObject.indent(0);
                  window.scrollBy(0, parseInt(item.offsetHeight, 10));
                }
  
                $handle.trigger('focus');
              }
  
              break;
            }
        }
  
        if (self.rowObject && self.rowObject.changed === true) {
          $(item).addClass('drag');
  
          if (self.oldRowElement) {
            $(self.oldRowElement).removeClass('drag-previous');
          }
  
          self.oldRowElement = item;
  
          if (self.striping === true) {
            self.restripeTable();
          }
  
          self.onDrag();
        }
  
        if (keyChange) {
          return false;
        }
      });
      $handle.on('keypress', function (event) {
        switch (event.keyCode) {
          case 37:
          case 38:
          case 39:
          case 40:
            return false;
        }
      });
    };
  
    Drupal.tableDrag.prototype.dragStart = function (event, self, item) {
      self.dragObject = {};
      self.dragObject.initOffset = self.getPointerOffset(item, event);
      self.dragObject.initPointerCoords = self.pointerCoords(event);
  
      if (self.indentEnabled) {
        self.dragObject.indentPointerPos = self.dragObject.initPointerCoords;
      }
  
      if (self.rowObject) {
        $(self.rowObject.element).find('a.tabledrag-handle').trigger('blur');
      }
  
      self.rowObject = new self.row(item, 'pointer', self.indentEnabled, self.maxDepth, true);
      self.table.topY = $(self.table).offset().top;
      self.table.bottomY = self.table.topY + self.table.offsetHeight;
      $(item).addClass('drag');
      $('body').addClass('drag');
  
      if (self.oldRowElement) {
        $(self.oldRowElement).removeClass('drag-previous');
      }
  
      self.oldY = self.pointerCoords(event).y;
    };
  
    Drupal.tableDrag.prototype.dragRow = function (event, self) {
      if (self.dragObject) {
        self.currentPointerCoords = self.pointerCoords(event);
        var y = self.currentPointerCoords.y - self.dragObject.initOffset.y;
        var x = self.currentPointerCoords.x - self.dragObject.initOffset.x;
  
        if (y !== self.oldY) {
          self.rowObject.direction = y > self.oldY ? 'down' : 'up';
          self.oldY = y;
          var scrollAmount = self.checkScroll(self.currentPointerCoords.y);
          clearInterval(self.scrollInterval);
  
          if (scrollAmount > 0 && self.rowObject.direction === 'down' || scrollAmount < 0 && self.rowObject.direction === 'up') {
            self.setScroll(scrollAmount);
          }
  
          var currentRow = self.findDropTargetRow(x, y);
  
          if (currentRow) {
            if (self.rowObject.direction === 'down') {
              self.rowObject.swap('after', currentRow, self);
            } else {
              self.rowObject.swap('before', currentRow, self);
            }
  
            if (self.striping === true) {
              self.restripeTable();
            }
          }
        }
  
        if (self.indentEnabled) {
          var xDiff = self.currentPointerCoords.x - self.dragObject.indentPointerPos.x;
          var indentDiff = Math.round(xDiff / self.indentAmount);
          var indentChange = self.rowObject.indent(indentDiff);
          self.dragObject.indentPointerPos.x += self.indentAmount * indentChange * self.rtl;
          self.indentCount = Math.max(self.indentCount, self.rowObject.indents);
        }
  
        return false;
      }
    };
  
    Drupal.tableDrag.prototype.dropRow = function (event, self) {
      var droppedRow;
      var $droppedRow;
  
      if (self.rowObject !== null) {
        droppedRow = self.rowObject.element;
        $droppedRow = $(droppedRow);
  
        if (self.rowObject.changed === true) {
          self.updateFields(droppedRow);
          Object.keys(self.tableSettings || {}).forEach(function (group) {
            var rowSettings = self.rowSettings(group, droppedRow);
  
            if (rowSettings.relationship === 'group') {
              Object.keys(self.rowObject.children || {}).forEach(function (n) {
                self.updateField(self.rowObject.children[n], group);
              });
            }
          });
          self.rowObject.markChanged();
  
          if (self.changed === false) {
            $(Drupal.theme('tableDragChangedWarning')).insertBefore(self.table).hide().fadeIn('slow');
            self.changed = true;
          }
        }
  
        if (self.indentEnabled) {
          self.rowObject.removeIndentClasses();
        }
  
        if (self.oldRowElement) {
          $(self.oldRowElement).removeClass('drag-previous');
        }
  
        $droppedRow.removeClass('drag').addClass('drag-previous');
        self.oldRowElement = droppedRow;
        self.onDrop();
        self.rowObject = null;
      }
  
      if (self.dragObject !== null) {
        self.dragObject = null;
        $('body').removeClass('drag');
        clearInterval(self.scrollInterval);
      }
    };
  
    Drupal.tableDrag.prototype.pointerCoords = function (event) {
      if (event.pageX || event.pageY) {
        return {
          x: event.pageX,
          y: event.pageY
        };
      }
  
      return {
        x: event.clientX + document.body.scrollLeft - document.body.clientLeft,
        y: event.clientY + document.body.scrollTop - document.body.clientTop
      };
    };
  
    Drupal.tableDrag.prototype.getPointerOffset = function (target, event) {
      var docPos = $(target).offset();
      var pointerPos = this.pointerCoords(event);
      return {
        x: pointerPos.x - docPos.left,
        y: pointerPos.y - docPos.top
      };
    };
  
    Drupal.tableDrag.prototype.findDropTargetRow = function (x, y) {
      var _this3 = this;
  
      var rows = $(this.table.tBodies[0].rows).not(':hidden');
  
      var _loop = function _loop(n) {
        var row = rows[n];
        var $row = $(row);
        var rowY = $row.offset().top;
        var rowHeight = void 0;
  
        if (row.offsetHeight === 0) {
          rowHeight = parseInt(row.firstChild.offsetHeight, 10) / 2;
        } else {
            rowHeight = parseInt(row.offsetHeight, 10) / 2;
          }
  
        if (y > rowY - rowHeight && y < rowY + rowHeight) {
          if (_this3.indentEnabled) {
            if (Object.keys(_this3.rowObject.group).some(function (o) {
              return _this3.rowObject.group[o] === row;
            })) {
              return {
                v: null
              };
            }
          } else if (row === _this3.rowObject.element) {
              return {
                v: null
              };
            }
  
          if (!_this3.rowObject.isValidSwap(row)) {
            return {
              v: null
            };
          }
  
          while ($row.is(':hidden') && $row.prev('tr').is(':hidden')) {
            $row = $row.prev('tr:first-of-type');
            row = $row.get(0);
          }
  
          return {
            v: row
          };
        }
      };
  
      for (var n = 0; n < rows.length; n++) {
        var _ret = _loop(n);
  
        if (_typeof(_ret) === "object") return _ret.v;
      }
  
      return null;
    };
  
    Drupal.tableDrag.prototype.updateFields = function (changedRow) {
      var _this4 = this;
  
      Object.keys(this.tableSettings || {}).forEach(function (group) {
        _this4.updateField(changedRow, group);
      });
    };
  
    Drupal.tableDrag.prototype.updateField = function (changedRow, group) {
      var rowSettings = this.rowSettings(group, changedRow);
      var $changedRow = $(changedRow);
      var sourceRow;
      var $previousRow;
      var previousRow;
      var useSibling;
  
      if (rowSettings.relationship === 'self' || rowSettings.relationship === 'group') {
        sourceRow = changedRow;
      } else if (rowSettings.relationship === 'sibling') {
          $previousRow = $changedRow.prev('tr:first-of-type');
          previousRow = $previousRow.get(0);
          var $nextRow = $changedRow.next('tr:first-of-type');
          var nextRow = $nextRow.get(0);
          sourceRow = changedRow;
  
          if ($previousRow.is('.draggable') && $previousRow.find(".".concat(group)).length) {
            if (this.indentEnabled) {
              if ($previousRow.find('.js-indentations').length === $changedRow.find('.js-indentations').length) {
                sourceRow = previousRow;
              }
            } else {
              sourceRow = previousRow;
            }
          } else if ($nextRow.is('.draggable') && $nextRow.find(".".concat(group)).length) {
            if (this.indentEnabled) {
              if ($nextRow.find('.js-indentations').length === $changedRow.find('.js-indentations').length) {
                sourceRow = nextRow;
              }
            } else {
              sourceRow = nextRow;
            }
          }
        } else if (rowSettings.relationship === 'parent') {
            $previousRow = $changedRow.prev('tr');
            previousRow = $previousRow;
  
            while ($previousRow.length && $previousRow.find('.js-indentation').length >= this.rowObject.indents) {
              $previousRow = $previousRow.prev('tr');
              previousRow = $previousRow;
            }
  
            if ($previousRow.length) {
              sourceRow = $previousRow.get(0);
            } else {
                sourceRow = $(this.table).find('tr.draggable:first-of-type').get(0);
  
                if (sourceRow === this.rowObject.element) {
                  sourceRow = $(this.rowObject.group[this.rowObject.group.length - 1]).next('tr.draggable').get(0);
                }
  
                useSibling = true;
              }
          }
  
      this.copyDragClasses(sourceRow, changedRow, group);
      rowSettings = this.rowSettings(group, changedRow);
  
      if (useSibling) {
        rowSettings.relationship = 'sibling';
        rowSettings.source = rowSettings.target;
      }
  
      var targetClass = ".".concat(rowSettings.target);
      var targetElement = $changedRow.find(targetClass).get(0);
  
      if (targetElement) {
        var sourceClass = ".".concat(rowSettings.source);
        var sourceElement = $(sourceClass, sourceRow).get(0);
  
        switch (rowSettings.action) {
          case 'depth':
            targetElement.value = $(sourceElement).closest('tr').find('.js-indentation').length;
            break;
  
          case 'match':
            targetElement.value = sourceElement.value;
            break;
  
          case 'order':
            {
              var siblings = this.rowObject.findSiblings(rowSettings);
  
              if ($(targetElement).is('select')) {
                var values = [];
                $(targetElement).find('option').each(function () {
                  values.push(this.value);
                });
                var maxVal = values[values.length - 1];
                $(siblings).find(targetClass).each(function () {
                  if (values.length > 0) {
                    this.value = values.shift();
                  } else {
                    this.value = maxVal;
                  }
                });
              } else {
                var weight = parseInt($(siblings[0]).find(targetClass).val(), 10) || 0;
                $(siblings).find(targetClass).each(function () {
                  this.value = weight;
                  weight++;
                });
              }
  
              break;
            }
        }
      }
    };
  
    Drupal.tableDrag.prototype.copyDragClasses = function (sourceRow, targetRow, group) {
      var sourceElement = $(sourceRow).find(".".concat(group));
      var targetElement = $(targetRow).find(".".concat(group));
  
      if (sourceElement.length && targetElement.length) {
        targetElement[0].className = sourceElement[0].className;
      }
    };
  
    Drupal.tableDrag.prototype.checkScroll = function (cursorY) {
      var de = document.documentElement;
      var b = document.body;
      var windowHeight = window.innerHeight || (de.clientHeight && de.clientWidth !== 0 ? de.clientHeight : b.offsetHeight);
      this.windowHeight = windowHeight;
      var scrollY;
  
      if (document.all) {
        scrollY = !de.scrollTop ? b.scrollTop : de.scrollTop;
      } else {
        scrollY = window.pageYOffset ? window.pageYOffset : window.scrollY;
      }
  
      this.scrollY = scrollY;
      var trigger = this.scrollSettings.trigger;
      var delta = 0;
  
      if (cursorY - scrollY > windowHeight - trigger) {
        delta = trigger / (windowHeight + scrollY - cursorY);
        delta = delta > 0 && delta < trigger ? delta : trigger;
        return delta * this.scrollSettings.amount;
      }
  
      if (cursorY - scrollY < trigger) {
        delta = trigger / (cursorY - scrollY);
        delta = delta > 0 && delta < trigger ? delta : trigger;
        return -delta * this.scrollSettings.amount;
      }
    };
  
    Drupal.tableDrag.prototype.setScroll = function (scrollAmount) {
      var self = this;
      this.scrollInterval = setInterval(function () {
        self.checkScroll(self.currentPointerCoords.y);
        var aboveTable = self.scrollY > self.table.topY;
        var belowTable = self.scrollY + self.windowHeight < self.table.bottomY;
  
        if (scrollAmount > 0 && belowTable || scrollAmount < 0 && aboveTable) {
          window.scrollBy(0, scrollAmount);
        }
      }, this.scrollSettings.interval);
    };
  
    Drupal.tableDrag.prototype.restripeTable = function () {
      $(this.table).find('> tbody > tr.draggable, > tr.draggable').filter(':visible').filter(':odd').removeClass('odd').addClass('even').end().filter(':even').removeClass('even').addClass('odd');
    };
  
    Drupal.tableDrag.prototype.onDrag = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.onDrop = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.row = function (tableRow, method, indentEnabled, maxDepth, addClasses) {
      var $tableRow = $(tableRow);
      this.element = tableRow;
      this.method = method;
      this.group = [tableRow];
      this.groupDepth = $tableRow.find('.js-indentation').length;
      this.changed = false;
      this.table = $tableRow.closest('table')[0];
      this.indentEnabled = indentEnabled;
      this.maxDepth = maxDepth;
      this.direction = '';
  
      if (this.indentEnabled) {
        this.indents = $tableRow.find('.js-indentation').length;
        this.children = this.findChildren(addClasses);
        this.group = $.merge(this.group, this.children);
  
        for (var n = 0; n < this.group.length; n++) {
          this.groupDepth = Math.max($(this.group[n]).find('.js-indentation').length, this.groupDepth);
        }
      }
    };
  
    Drupal.tableDrag.prototype.row.prototype.findChildren = function (addClasses) {
      var parentIndentation = this.indents;
      var currentRow = $(this.element, this.table).next('tr.draggable');
      var rows = [];
      var child = 0;
  
      function rowIndentation(indentNum, el) {
        var self = $(el);
  
        if (child === 1 && indentNum === parentIndentation) {
          self.addClass('tree-child-first');
        }
  
        if (indentNum === parentIndentation) {
          self.addClass('tree-child');
        } else if (indentNum > parentIndentation) {
          self.addClass('tree-child-horizontal');
        }
      }
  
      while (currentRow.length) {
        if (currentRow.find('.js-indentation').length > parentIndentation) {
          child++;
          rows.push(currentRow[0]);
  
          if (addClasses) {
            currentRow.find('.js-indentation').each(rowIndentation);
          }
        } else {
          break;
        }
  
        currentRow = currentRow.next('tr.draggable');
      }
  
      if (addClasses && rows.length) {
        $(rows[rows.length - 1]).find(".js-indentation:nth-child(".concat(parentIndentation + 1, ")")).addClass('tree-child-last');
      }
  
      return rows;
    };
  
    Drupal.tableDrag.prototype.row.prototype.isValidSwap = function (row) {
      var $row = $(row);
  
      if (this.indentEnabled) {
        var prevRow;
        var nextRow;
  
        if (this.direction === 'down') {
          prevRow = row;
          nextRow = $row.next('tr').get(0);
        } else {
          prevRow = $row.prev('tr').get(0);
          nextRow = row;
        }
  
        this.interval = this.validIndentInterval(prevRow, nextRow);
  
        if (this.interval.min > this.interval.max) {
          return false;
        }
      }
  
      if (this.table.tBodies[0].rows[0] === row && $row.is(':not(.draggable)')) {
        return false;
      }
  
      return true;
    };
  
    Drupal.tableDrag.prototype.row.prototype.swap = function (position, row) {
      this.group.forEach(function (row) {
        Drupal.detachBehaviors(row, drupalSettings, 'move');
      });
      $(row)[position](this.group);
      this.group.forEach(function (row) {
        Drupal.attachBehaviors(row, drupalSettings);
      });
      this.changed = true;
      this.onSwap(row);
    };
  
    Drupal.tableDrag.prototype.row.prototype.validIndentInterval = function (prevRow, nextRow) {
      var $prevRow = $(prevRow);
      var maxIndent;
      var minIndent = nextRow ? $(nextRow).find('.js-indentation').length : 0;
  
      if (!prevRow || $prevRow.is(':not(.draggable)') || $(this.element).is('.tabledrag-root')) {
        maxIndent = 0;
      } else {
        maxIndent = $prevRow.find('.js-indentation').length + ($prevRow.is('.tabledrag-leaf') ? 0 : 1);
  
        if (this.maxDepth) {
          maxIndent = Math.min(maxIndent, this.maxDepth - (this.groupDepth - this.indents));
        }
      }
  
      return {
        min: minIndent,
        max: maxIndent
      };
    };
  
    Drupal.tableDrag.prototype.row.prototype.indent = function (indentDiff) {
      var $group = $(this.group);
  
      if (!this.interval) {
        var prevRow = $(this.element).prev('tr').get(0);
        var nextRow = $group.eq(-1).next('tr').get(0);
        this.interval = this.validIndentInterval(prevRow, nextRow);
      }
  
      var indent = this.indents + indentDiff;
      indent = Math.max(indent, this.interval.min);
      indent = Math.min(indent, this.interval.max);
      indentDiff = indent - this.indents;
  
      for (var n = 1; n <= Math.abs(indentDiff); n++) {
        if (indentDiff < 0) {
          $group.find('.js-indentation:first-of-type').remove();
          this.indents--;
        } else {
          $group.find('td:first-of-type').prepend(Drupal.theme('tableDragIndentation'));
          this.indents++;
        }
      }
  
      if (indentDiff) {
        this.changed = true;
        this.groupDepth += indentDiff;
        this.onIndent();
      }
  
      return indentDiff;
    };
  
    Drupal.tableDrag.prototype.row.prototype.findSiblings = function (rowSettings) {
      var siblings = [];
      var directions = ['prev', 'next'];
      var rowIndentation = this.indents;
      var checkRowIndentation;
  
      for (var d = 0; d < directions.length; d++) {
        var checkRow = $(this.element)[directions[d]]();
  
        while (checkRow.length) {
          if (checkRow.find(".".concat(rowSettings.target))) {
            if (this.indentEnabled) {
              checkRowIndentation = checkRow.find('.js-indentation').length;
            }
  
            if (!this.indentEnabled || checkRowIndentation === rowIndentation) {
              siblings.push(checkRow[0]);
            } else if (checkRowIndentation < rowIndentation) {
              break;
            }
          } else {
            break;
          }
  
          checkRow = checkRow[directions[d]]();
        }
  
        if (directions[d] === 'prev') {
          siblings.reverse();
          siblings.push(this.element);
        }
      }
  
      return siblings;
    };
  
    Drupal.tableDrag.prototype.row.prototype.removeIndentClasses = function () {
      var _this5 = this;
  
      Object.keys(this.children || {}).forEach(function (n) {
        $(_this5.children[n]).find('.js-indentation').removeClass('tree-child').removeClass('tree-child-first').removeClass('tree-child-last').removeClass('tree-child-horizontal');
      });
    };
  
    Drupal.tableDrag.prototype.row.prototype.markChanged = function () {
      var marker = Drupal.theme('tableDragChangedMarker');
      var cell = $(this.element).find('td:first-of-type');
  
      if (cell.find('abbr.tabledrag-changed').length === 0) {
        cell.append(marker);
      }
    };
  
    Drupal.tableDrag.prototype.row.prototype.onIndent = function () {
      return null;
    };
  
    Drupal.tableDrag.prototype.row.prototype.onSwap = function (swappedRow) {
      return null;
    };
  
    $.extend(Drupal.theme, {
      tableDragChangedMarker: function tableDragChangedMarker() {
        return "<abbr class=\"warning tabledrag-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr>");
      },
      tableDragIndentation: function tableDragIndentation() {
        return '<div class="js-indentation indentation">&nbsp;</div>';
      },
      tableDragChangedWarning: function tableDragChangedWarning() {
        return "<div class=\"tabledrag-changed-warning messages messages--warning\" role=\"alert\">".concat(Drupal.theme('tableDragChangedMarker'), " ").concat(Drupal.t('You have unsaved changes.'), "</div>");
      },
      tableDragToggle: function tableDragToggle() {
        return "<div class=\"tabledrag-toggle-weight-wrapper\" data-drupal-selector=\"tabledrag-toggle-weight-wrapper\">\n            <button type=\"button\" class=\"link tabledrag-toggle-weight\" data-drupal-selector=\"tabledrag-toggle-weight\"></button>\n            </div>";
      },
      toggleButtonContent: function toggleButtonContent(show) {
        return show ? Drupal.t('Hide row weights') : Drupal.t('Show row weights');
      },
      tableDragHandle: function tableDragHandle() {
        return "<a href=\"#\" title=\"".concat(Drupal.t('Drag to re-order'), "\"\n        class=\"tabledrag-handle\"><div class=\"handle\">&nbsp;</div></a>");
      }
    });
  })(jQuery, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.theme.progressBar = function (id) {
      return "<div id=\"".concat(id, "\" class=\"progress\" aria-live=\"polite\">") + '<div class="progress__label">&nbsp;</div>' + '<div class="progress__track"><div class="progress__bar"></div></div>' + '<div class="progress__percentage"></div>' + '<div class="progress__description">&nbsp;</div>' + '</div>';
    };
  
    Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
      this.id = id;
      this.method = method || 'GET';
      this.updateCallback = updateCallback;
      this.errorCallback = errorCallback;
      this.element = $(Drupal.theme('progressBar', id));
    };
  
    $.extend(Drupal.ProgressBar.prototype, {
      setProgress: function setProgress(percentage, message, label) {
        if (percentage >= 0 && percentage <= 100) {
          $(this.element).find('div.progress__bar').css('width', "".concat(percentage, "%"));
          $(this.element).find('div.progress__percentage').html("".concat(percentage, "%"));
        }
  
        $('div.progress__description', this.element).html(message);
        $('div.progress__label', this.element).html(label);
  
        if (this.updateCallback) {
          this.updateCallback(percentage, message, this);
        }
      },
      startMonitoring: function startMonitoring(uri, delay) {
        this.delay = delay;
        this.uri = uri;
        this.sendPing();
      },
      stopMonitoring: function stopMonitoring() {
        clearTimeout(this.timer);
        this.uri = null;
      },
      sendPing: function sendPing() {
        if (this.timer) {
          clearTimeout(this.timer);
        }
  
        if (this.uri) {
          var pb = this;
          var uri = this.uri;
  
          if (uri.indexOf('?') === -1) {
            uri += '?';
          } else {
            uri += '&';
          }
  
          uri += '_format=json';
          $.ajax({
            type: this.method,
            url: uri,
            data: '',
            dataType: 'json',
            success: function success(progress) {
              if (progress.status === 0) {
                pb.displayError(progress.data);
                return;
              }
  
              pb.setProgress(progress.percentage, progress.message, progress.label);
              pb.timer = setTimeout(function () {
                pb.sendPing();
              }, pb.delay);
            },
            error: function error(xmlhttp) {
              var e = new Drupal.AjaxError(xmlhttp, pb.uri);
              pb.displayError("<pre>".concat(e.message, "</pre>"));
            }
          });
        }
      },
      displayError: function displayError(string) {
        var error = $('<div class="messages messages--error"></div>').html(string);
        $(this.element).before(error).hide();
  
        if (this.errorCallback) {
          this.errorCallback(this);
        }
      }
    });
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
  
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
  
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
  
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
  
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
  
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
  
  (function ($, window, Drupal, drupalSettings) {
    Drupal.behaviors.AJAX = {
      attach: function attach(context, settings) {
        function loadAjaxBehavior(base) {
          var elementSettings = settings.ajax[base];
  
          if (typeof elementSettings.selector === 'undefined') {
            elementSettings.selector = "#".concat(base);
          }
  
          $(elementSettings.selector).once('drupal-ajax').each(function () {
            elementSettings.element = this;
            elementSettings.base = base;
            Drupal.ajax(elementSettings);
          });
        }
  
        Object.keys(settings.ajax || {}).forEach(function (base) {
          return loadAjaxBehavior(base);
        });
        Drupal.ajax.bindAjaxLinks(document.body);
        $('.use-ajax-submit').once('ajax').each(function () {
          var elementSettings = {};
          elementSettings.url = $(this.form).attr('action');
          elementSettings.setClick = true;
          elementSettings.event = 'click';
          elementSettings.progress = {
            type: 'throbber'
          };
          elementSettings.base = $(this).attr('id');
          elementSettings.element = this;
          Drupal.ajax(elementSettings);
        });
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          Drupal.ajax.expired().forEach(function (instance) {
            Drupal.ajax.instances[instance.instanceIndex] = null;
          });
        }
      }
    };
  
    Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
      var statusCode;
      var statusText;
      var responseText;
  
      if (xmlhttp.status) {
        statusCode = "\n".concat(Drupal.t('An AJAX HTTP error occurred.'), "\n").concat(Drupal.t('HTTP Result Code: !status', {
          '!status': xmlhttp.status
        }));
      } else {
        statusCode = "\n".concat(Drupal.t('An AJAX HTTP request terminated abnormally.'));
      }
  
      statusCode += "\n".concat(Drupal.t('Debugging information follows.'));
      var pathText = "\n".concat(Drupal.t('Path: !uri', {
        '!uri': uri
      }));
      statusText = '';
  
      try {
        statusText = "\n".concat(Drupal.t('StatusText: !statusText', {
          '!statusText': $.trim(xmlhttp.statusText)
        }));
      } catch (e) {}
  
      responseText = '';
  
      try {
        responseText = "\n".concat(Drupal.t('ResponseText: !responseText', {
          '!responseText': $.trim(xmlhttp.responseText)
        }));
      } catch (e) {}
  
      responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
      responseText = responseText.replace(/[\n]+\s+/g, '\n');
      var readyStateText = xmlhttp.status === 0 ? "\n".concat(Drupal.t('ReadyState: !readyState', {
        '!readyState': xmlhttp.readyState
      })) : '';
      customMessage = customMessage ? "\n".concat(Drupal.t('CustomMessage: !customMessage', {
        '!customMessage': customMessage
      })) : '';
      this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
      this.name = 'AjaxError';
    };
  
    Drupal.AjaxError.prototype = new Error();
    Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
  
    Drupal.ajax = function (settings) {
      if (arguments.length !== 1) {
        throw new Error('Drupal.ajax() function must be called with one configuration object only');
      }
  
      var base = settings.base || false;
      var element = settings.element || false;
      delete settings.base;
      delete settings.element;
  
      if (!settings.progress && !element) {
        settings.progress = false;
      }
  
      var ajax = new Drupal.Ajax(base, element, settings);
      ajax.instanceIndex = Drupal.ajax.instances.length;
      Drupal.ajax.instances.push(ajax);
      return ajax;
    };
  
    Drupal.ajax.instances = [];
  
    Drupal.ajax.expired = function () {
      return Drupal.ajax.instances.filter(function (instance) {
        return instance && instance.element !== false && !document.body.contains(instance.element);
      });
    };
  
    Drupal.ajax.bindAjaxLinks = function (element) {
      $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
        var $linkElement = $(ajaxLink);
        var elementSettings = {
          progress: {
            type: 'throbber'
          },
          dialogType: $linkElement.data('dialog-type'),
          dialog: $linkElement.data('dialog-options'),
          dialogRenderer: $linkElement.data('dialog-renderer'),
          base: $linkElement.attr('id'),
          element: ajaxLink
        };
        var href = $linkElement.attr('href');
  
        if (href) {
          elementSettings.url = href;
          elementSettings.event = 'click';
        }
  
        Drupal.ajax(elementSettings);
      });
    };
  
    Drupal.Ajax = function (base, element, elementSettings) {
      var defaults = {
        event: element ? 'mousedown' : null,
        keypress: true,
        selector: base ? "#".concat(base) : null,
        effect: 'none',
        speed: 'none',
        method: 'replaceWith',
        progress: {
          type: 'throbber',
          message: Drupal.t('Please wait...')
        },
        submit: {
          js: true
        }
      };
      $.extend(this, defaults, elementSettings);
      this.commands = new Drupal.AjaxCommands();
      this.instanceIndex = false;
  
      if (this.wrapper) {
        this.wrapper = "#".concat(this.wrapper);
      }
  
      this.element = element;
      this.element_settings = elementSettings;
      this.elementSettings = elementSettings;
  
      if (this.element && this.element.form) {
        this.$form = $(this.element.form);
      }
  
      if (!this.url) {
        var $element = $(this.element);
  
        if ($element.is('a')) {
          this.url = $element.attr('href');
        } else if (this.element && element.form) {
          this.url = this.$form.attr('action');
        }
      }
  
      var originalUrl = this.url;
      this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1');
  
      if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
        drupalSettings.ajaxTrustedUrl[this.url] = true;
      }
  
      var ajax = this;
      ajax.options = {
        url: ajax.url,
        data: ajax.submit,
        beforeSerialize: function beforeSerialize(elementSettings, options) {
          return ajax.beforeSerialize(elementSettings, options);
        },
        beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
          ajax.ajaxing = true;
          return ajax.beforeSubmit(formValues, elementSettings, options);
        },
        beforeSend: function beforeSend(xmlhttprequest, options) {
          ajax.ajaxing = true;
          return ajax.beforeSend(xmlhttprequest, options);
        },
        success: function success(response, status, xmlhttprequest) {
          if (typeof response === 'string') {
            response = $.parseJSON(response);
          }
  
          if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
            if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
              var customMessage = Drupal.t('The response failed verification so will not be processed.');
              return ajax.error(xmlhttprequest, ajax.url, customMessage);
            }
          }
  
          return ajax.success(response, status);
        },
        complete: function complete(xmlhttprequest, status) {
          ajax.ajaxing = false;
  
          if (status === 'error' || status === 'parsererror') {
            return ajax.error(xmlhttprequest, ajax.url);
          }
        },
        dataType: 'json',
        jsonp: false,
        type: 'POST'
      };
  
      if (elementSettings.dialog) {
        ajax.options.data.dialogOptions = elementSettings.dialog;
      }
  
      if (ajax.options.url.indexOf('?') === -1) {
        ajax.options.url += '?';
      } else {
        ajax.options.url += '&';
      }
  
      var wrapper = "drupal_".concat(elementSettings.dialogType || 'ajax');
  
      if (elementSettings.dialogRenderer) {
        wrapper += ".".concat(elementSettings.dialogRenderer);
      }
  
      ajax.options.url += "".concat(Drupal.ajax.WRAPPER_FORMAT, "=").concat(wrapper);
      $(ajax.element).on(elementSettings.event, function (event) {
        if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
          throw new Error(Drupal.t('The callback URL is not local and not trusted: !url', {
            '!url': ajax.url
          }));
        }
  
        return ajax.eventResponse(this, event);
      });
  
      if (elementSettings.keypress) {
        $(ajax.element).on('keypress', function (event) {
          return ajax.keypressResponse(this, event);
        });
      }
  
      if (elementSettings.prevent) {
        $(ajax.element).on(elementSettings.prevent, false);
      }
    };
  
    Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
    Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
  
    Drupal.Ajax.prototype.execute = function () {
      if (this.ajaxing) {
        return;
      }
  
      try {
        this.beforeSerialize(this.element, this.options);
        return $.ajax(this.options);
      } catch (e) {
        this.ajaxing = false;
        window.alert("An error occurred while attempting to process ".concat(this.options.url, ": ").concat(e.message));
        return $.Deferred().reject();
      }
    };
  
    Drupal.Ajax.prototype.keypressResponse = function (element, event) {
      var ajax = this;
  
      if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
        event.preventDefault();
        event.stopPropagation();
        $(element).trigger(ajax.elementSettings.event);
      }
    };
  
    Drupal.Ajax.prototype.eventResponse = function (element, event) {
      event.preventDefault();
      event.stopPropagation();
      var ajax = this;
  
      if (ajax.ajaxing) {
        return;
      }
  
      try {
        if (ajax.$form) {
          if (ajax.setClick) {
            element.form.clk = element;
          }
  
          ajax.$form.ajaxSubmit(ajax.options);
        } else {
          ajax.beforeSerialize(ajax.element, ajax.options);
          $.ajax(ajax.options);
        }
      } catch (e) {
        ajax.ajaxing = false;
        window.alert("An error occurred while attempting to process ".concat(ajax.options.url, ": ").concat(e.message));
      }
    };
  
    Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
      }
  
      options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
      var pageState = drupalSettings.ajaxPageState;
      options.data['ajax_page_state[theme]'] = pageState.theme;
      options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
      options.data['ajax_page_state[libraries]'] = pageState.libraries;
    };
  
    Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
  
    Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
      if (this.$form) {
        options.extraData = options.extraData || {};
        options.extraData.ajax_iframe_upload = '1';
        var v = $.fieldValue(this.element);
  
        if (v !== null) {
          options.extraData[this.element.name] = v;
        }
      }
  
      $(this.element).prop('disabled', true);
  
      if (!this.progress || !this.progress.type) {
        return;
      }
  
      var progressIndicatorMethod = "setProgressIndicator".concat(this.progress.type.slice(0, 1).toUpperCase()).concat(this.progress.type.slice(1).toLowerCase());
  
      if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
        this[progressIndicatorMethod].call(this);
      }
    };
  
    Drupal.theme.ajaxProgressThrobber = function (message) {
      var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : '';
      var throbber = '<div class="throbber">&nbsp;</div>';
      return "<div class=\"ajax-progress ajax-progress-throbber\">".concat(throbber).concat(messageMarkup, "</div>");
    };
  
    Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
      return '<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';
    };
  
    Drupal.theme.ajaxProgressMessage = function (message) {
      return "<div class=\"message\">".concat(message, "</div>");
    };
  
    Drupal.theme.ajaxProgressBar = function ($element) {
      return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
      var progressBar = new Drupal.ProgressBar("ajax-progress-".concat(this.element.id), $.noop, this.progress.method, $.noop);
  
      if (this.progress.message) {
        progressBar.setProgress(-1, this.progress.message);
      }
  
      if (this.progress.url) {
        progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
      }
  
      this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element));
      this.progress.object = progressBar;
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
      this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message));
      $(this.element).after(this.progress.element);
    };
  
    Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
      this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen'));
      $('body').append(this.progress.element);
    };
  
    Drupal.Ajax.prototype.success = function (response, status) {
      var _this = this;
  
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
  
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
  
      $(this.element).prop('disabled', false);
      var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
      var focusChanged = false;
      Object.keys(response || {}).forEach(function (i) {
        if (response[i].command && _this.commands[response[i].command]) {
          _this.commands[response[i].command](_this, response[i], status);
  
          if (response[i].command === 'invoke' && response[i].method === 'focus') {
            focusChanged = true;
          }
        }
      });
  
      if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
        var target = false;
  
        for (var n = elementParents.length - 1; !target && n >= 0; n--) {
          target = document.querySelector("[data-drupal-selector=\"".concat(elementParents[n].getAttribute('data-drupal-selector'), "\"]"));
        }
  
        if (target) {
          $(target).trigger('focus');
        }
      }
  
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
  
      this.settings = null;
    };
  
    Drupal.Ajax.prototype.getEffect = function (response) {
      var type = response.effect || this.effect;
      var speed = response.speed || this.speed;
      var effect = {};
  
      if (type === 'none') {
        effect.showEffect = 'show';
        effect.hideEffect = 'hide';
        effect.showSpeed = '';
      } else if (type === 'fade') {
        effect.showEffect = 'fadeIn';
        effect.hideEffect = 'fadeOut';
        effect.showSpeed = speed;
      } else {
        effect.showEffect = "".concat(type, "Toggle");
        effect.hideEffect = "".concat(type, "Toggle");
        effect.showSpeed = speed;
      }
  
      return effect;
    };
  
    Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
      if (this.progress.element) {
        $(this.progress.element).remove();
      }
  
      if (this.progress.object) {
        this.progress.object.stopMonitoring();
      }
  
      $(this.wrapper).show();
      $(this.element).prop('disabled', false);
  
      if (this.$form && document.body.contains(this.$form.get(0))) {
        var settings = this.settings || drupalSettings;
        Drupal.attachBehaviors(this.$form.get(0), settings);
      }
  
      throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
    };
  
    Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) {
      return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) {
        return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent));
      }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent;
    };
  
    Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) {
      return $('<div></div>').append($elements);
    };
  
    Drupal.AjaxCommands = function () {};
  
    Drupal.AjaxCommands.prototype = {
      insert: function insert(ajax, response) {
        var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
        var method = response.method || ajax.method;
        var effect = ajax.getEffect(response);
        var settings = response.settings || ajax.settings || drupalSettings;
        var $newContent = $($.parseHTML(response.data, document, true));
        $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response);
  
        switch (method) {
          case 'html':
          case 'replaceWith':
          case 'replaceAll':
          case 'empty':
          case 'remove':
            Drupal.detachBehaviors($wrapper.get(0), settings);
            break;
  
          default:
            break;
        }
  
        $wrapper[method]($newContent);
  
        if (effect.showEffect !== 'show') {
          $newContent.hide();
        }
  
        var $ajaxNewContent = $newContent.find('.ajax-new-content');
  
        if ($ajaxNewContent.length) {
          $ajaxNewContent.hide();
          $newContent.show();
          $ajaxNewContent[effect.showEffect](effect.showSpeed);
        } else if (effect.showEffect !== 'show') {
          $newContent[effect.showEffect](effect.showSpeed);
        }
  
        if ($newContent.parents('html').length) {
          $newContent.each(function (index, element) {
            if (element.nodeType === Node.ELEMENT_NODE) {
              Drupal.attachBehaviors(element, settings);
            }
          });
        }
      },
      remove: function remove(ajax, response, status) {
        var settings = response.settings || ajax.settings || drupalSettings;
        $(response.selector).each(function () {
          Drupal.detachBehaviors(this, settings);
        }).remove();
      },
      changed: function changed(ajax, response, status) {
        var $element = $(response.selector);
  
        if (!$element.hasClass('ajax-changed')) {
          $element.addClass('ajax-changed');
  
          if (response.asterisk) {
            $element.find(response.asterisk).append(" <abbr class=\"ajax-changed\" title=\"".concat(Drupal.t('Changed'), "\">*</abbr> "));
          }
        }
      },
      alert: function alert(ajax, response, status) {
        window.alert(response.text);
      },
      announce: function announce(ajax, response) {
        if (response.priority) {
          Drupal.announce(response.text, response.priority);
        } else {
          Drupal.announce(response.text);
        }
      },
      redirect: function redirect(ajax, response, status) {
        window.location = response.url;
      },
      css: function css(ajax, response, status) {
        $(response.selector).css(response.argument);
      },
      settings: function settings(ajax, response, status) {
        var ajaxSettings = drupalSettings.ajax;
  
        if (ajaxSettings) {
          Drupal.ajax.expired().forEach(function (instance) {
            if (instance.selector) {
              var selector = instance.selector.replace('#', '');
  
              if (selector in ajaxSettings) {
                delete ajaxSettings[selector];
              }
            }
          });
        }
  
        if (response.merge) {
          $.extend(true, drupalSettings, response.settings);
        } else {
          ajax.settings = response.settings;
        }
      },
      data: function data(ajax, response, status) {
        $(response.selector).data(response.name, response.value);
      },
      invoke: function invoke(ajax, response, status) {
        var $element = $(response.selector);
        $element[response.method].apply($element, _toConsumableArray(response.args));
      },
      restripe: function restripe(ajax, response, status) {
        $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
      },
      update_build_id: function update_build_id(ajax, response, status) {
        $("input[name=\"form_build_id\"][value=\"".concat(response.old, "\"]")).val(response.new);
      },
      add_css: function add_css(ajax, response, status) {
        $('head').prepend(response.data);
      },
      message: function message(ajax, response) {
        var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));
  
        if (response.clearPrevious) {
          messages.clear();
        }
  
        messages.add(response.message, response.messageOptions);
      }
    };
  })(jQuery, window, Drupal, drupalSettings);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, drupalSettings) {
    Drupal.behaviors.activeLinks = {
      attach: function attach(context) {
        var path = drupalSettings.path;
        var queryString = JSON.stringify(path.currentQuery);
        var querySelector = path.currentQuery ? "[data-drupal-link-query='".concat(queryString, "']") : ':not([data-drupal-link-query])';
        var originalSelectors = ["[data-drupal-link-system-path=\"".concat(path.currentPath, "\"]")];
        var selectors;
  
        if (path.isFront) {
          originalSelectors.push('[data-drupal-link-system-path="<front>"]');
        }
  
        selectors = [].concat(originalSelectors.map(function (selector) {
          return "".concat(selector, ":not([hreflang])");
        }), originalSelectors.map(function (selector) {
          return "".concat(selector, "[hreflang=\"").concat(path.currentLanguage, "\"]");
        }));
        selectors = selectors.map(function (current) {
          return current + querySelector;
        });
        var activeLinks = context.querySelectorAll(selectors.join(','));
        var il = activeLinks.length;
  
        for (var i = 0; i < il; i++) {
          activeLinks[i].classList.add('is-active');
        }
      },
      detach: function detach(context, settings, trigger) {
        if (trigger === 'unload') {
          var activeLinks = context.querySelectorAll('[data-drupal-link-system-path].is-active');
          var il = activeLinks.length;
  
          for (var i = 0; i < il; i++) {
            activeLinks[i].classList.remove('is-active');
          }
        }
      }
    };
  })(Drupal, drupalSettings);;
  