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).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 ($, 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, response.title);
      },
      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);;
  /**
   * @file
   * JavaScript behavior to remove destination from contextual links.
   */
  
  (function ($) {
  
    'use strict';
  
    // Bind click event to all .contextual links which are
    // dynamically inserted via Ajax.
    // @see webform_contextual_links_view_alter()
    // @see Drupal.behaviors.contextual
    $(document).on('click', '.contextual', function () {
      $(this).find('a.webform-contextual').once('webform-contextual').each(function () {
        this.href = this.href.split('?')[0];
  
        // Add ?_webform_test={webform} to the current page's URL.
        if (/webform\/([^/]+)\/test$/.test(this.href)) {
          this.href = window.location.pathname + '?_webform_test=' + RegExp.$1;
        }
      });
    });
  
  })(jQuery);
  ;
  /**
   * @file
   * JavaScript behaviors for details element.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // Determine if local storage exists and is enabled.
    // This approach is copied from Modernizr.
    // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
    var hasLocalStorage = (function () {
      try {
        localStorage.setItem('webform', 'webform');
        localStorage.removeItem('webform');
        return true;
      }
      catch (e) {
        return false;
      }
    }());
  
    /**
     * Attach handler to save details open/close state.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformDetailsSave = {
      attach: function (context) {
        if (!hasLocalStorage) {
          return;
        }
  
        // Summary click event handler.
        $('details > summary', context).once('webform-details-summary-save').click(function () {
          var $details = $(this).parent();
  
          // @see https://css-tricks.com/snippets/jquery/make-an-jquery-hasattr/
          if ($details[0].hasAttribute('data-webform-details-nosave')) {
            return;
          }
  
          var name = Drupal.webformDetailsSaveGetName($details);
          if (!name) {
            return;
          }
  
          var open = ($details.attr('open') !== 'open') ? '1' : '0';
          localStorage.setItem(name, open);
        });
  
        // Initialize details open state via local storage.
        $('details', context).once('webform-details-save').each(function () {
          var $details = $(this);
  
          var name = Drupal.webformDetailsSaveGetName($details);
          if (!name) {
            return;
          }
  
          var open = localStorage.getItem(name);
          if (open === null) {
            return;
          }
  
          if (open === '1') {
            $details.attr('open', 'open');
          }
          else {
            $details.removeAttr('open');
          }
        });
      }
  
    };
  
    /**
     * Get the name used to store the state of details element.
     *
     * @param {jQuery} $details
     *   A details element.
     *
     * @return {string}
     *   The name used to store the state of details element.
     */
    Drupal.webformDetailsSaveGetName = function ($details) {
      if (!hasLocalStorage) {
        return '';
      }
  
      // Ignore details that are vertical tabs pane.
      if ($details.hasClass('vertical-tabs__pane')) {
        return '';
      }
  
      // Any details element not included a webform must have define its own id.
      var webformId = $details.attr('data-webform-element-id');
      if (webformId) {
        return 'Drupal.webform.' + webformId.replace('--', '.');
      }
  
      var detailsId = $details.attr('id');
      if (!detailsId) {
        return '';
      }
  
      var $form = $details.parents('form');
      if (!$form.length || !$form.attr('id')) {
        return '';
      }
  
      var formId = $form.attr('id');
      if (!formId) {
        return '';
      }
  
      // ISSUE: When Drupal renders a webform in a modal dialog it appends a unique
      // identifier to webform ids and details ids. (i.e. my-form--FeSFISegTUI)
      // WORKAROUND: Remove the unique id that delimited using double dashes.
      formId = formId.replace(/--.+?$/, '').replace(/-/g, '_');
      detailsId = detailsId.replace(/--.+?$/, '').replace(/-/g, '_');
      return 'Drupal.webform.' + formId + '.' + detailsId;
    };
  
  })(jQuery, Drupal);
  ;
  /**
   * @file
   * JavaScript behaviors for message element integration.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    // Determine if local storage exists and is enabled.
    // This approach is copied from Modernizr.
    // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
    var hasLocalStorage = (function () {
      try {
        localStorage.setItem('webform', 'webform');
        localStorage.removeItem('webform');
        return true;
      }
      catch (e) {
        return false;
      }
    }());
  
    // Determine if session storage exists and is enabled.
    // This approach is copied from Modernizr.
    // @see https://github.com/Modernizr/Modernizr/blob/c56fb8b09515f629806ca44742932902ac145302/modernizr.js#L696-731
    var hasSessionStorage = (function () {
      try {
        sessionStorage.setItem('webform', 'webform');
        sessionStorage.removeItem('webform');
        return true;
      }
      catch (e) {
        return false;
      }
    }());
  
    /**
     * Behavior for handler message close.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformMessageClose = {
      attach: function (context) {
        $(context).find('.js-webform-message--close').once('webform-message--close').each(function () {
          var $element = $(this);
  
          var id = $element.attr('data-message-id');
          var storage = $element.attr('data-message-storage');
          var effect = $element.attr('data-message-close-effect') || 'hide';
          switch (effect) {
            case 'slide': effect = 'slideUp'; break;
  
            case 'fade': effect = 'fadeOut'; break;
          }
  
          // Check storage status.
          if (isClosed($element, storage, id)) {
            return;
          }
  
          // Only show element if it's style is not set to 'display: none'.
          if ($element.attr('style') !== 'display: none;') {
            $element.show();
          }
  
          $element.find('.js-webform-message__link').on('click', function (event) {
            $element[effect]();
            setClosed($element, storage, id);
            $element.trigger('close');
            event.preventDefault();
          });
        });
      }
    };
  
    function isClosed($element, storage, id) {
      if (!id || !storage) {
        return false;
      }
  
      switch (storage) {
        case 'local':
          if (hasLocalStorage) {
            return localStorage.getItem('Drupal.webform.message.' + id) || false;
          }
          return false;
  
        case 'session':
          if (hasSessionStorage) {
            return sessionStorage.getItem('Drupal.webform.message.' + id) || false;
          }
          return false;
  
        default:
          return false;
      }
    }
  
    function setClosed($element, storage, id) {
      if (!id || !storage) {
        return;
      }
  
      switch (storage) {
        case 'local':
          if (hasLocalStorage) {
            localStorage.setItem('Drupal.webform.message.' + id, true);
          }
          break;
  
        case 'session':
          if (hasSessionStorage) {
            sessionStorage.setItem('Drupal.webform.message.' + id, true);
          }
          break;
  
        case 'user':
        case 'state':
        case 'custom':
          $.get($element.find('.js-webform-message__link').attr('href'));
          return true;
      }
    }
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  Drupal.debounce = function (func, wait, immediate) {
    var timeout;
    var result;
    return function () {
      for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
        args[_key] = arguments[_key];
      }
  
      var context = this;
  
      var later = function later() {
        timeout = null;
  
        if (!immediate) {
          result = func.apply(context, args);
        }
      };
  
      var callNow = immediate && !timeout;
      clearTimeout(timeout);
      timeout = setTimeout(later, wait);
  
      if (callNow) {
        result = func.apply(context, args);
      }
  
      return result;
    };
  };;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function (Drupal, debounce) {
    var liveElement;
    var announcements = [];
    Drupal.behaviors.drupalAnnounce = {
      attach: function attach(context) {
        if (!liveElement) {
          liveElement = document.createElement('div');
          liveElement.id = 'drupal-live-announce';
          liveElement.className = 'visually-hidden';
          liveElement.setAttribute('aria-live', 'polite');
          liveElement.setAttribute('aria-busy', 'false');
          document.body.appendChild(liveElement);
        }
      }
    };
  
    function announce() {
      var text = [];
      var priority = 'polite';
      var announcement;
      var il = announcements.length;
  
      for (var i = 0; i < il; i++) {
        announcement = announcements.pop();
        text.unshift(announcement.text);
  
        if (announcement.priority === 'assertive') {
          priority = 'assertive';
        }
      }
  
      if (text.length) {
        liveElement.innerHTML = '';
        liveElement.setAttribute('aria-busy', 'true');
        liveElement.setAttribute('aria-live', priority);
        liveElement.innerHTML = text.join('\n');
        liveElement.setAttribute('aria-busy', 'false');
      }
    }
  
    Drupal.announce = function (text, priority) {
      announcements.push({
        text: text,
        priority: priority
      });
      return debounce(announce, 200)();
    };
  })(Drupal, Drupal.debounce);;
  /**
   * @file
   * JavaScript behaviors for details element.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    Drupal.webform = Drupal.webform || {};
    Drupal.webform.detailsToggle = Drupal.webform.detailsToggle || {};
    Drupal.webform.detailsToggle.options = Drupal.webform.detailsToggle.options || {};
  
    /**
     * Attach handler to toggle details open/close state.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformDetailsToggle = {
      attach: function (context) {
        $('.js-webform-details-toggle', context).once('webform-details-toggle').each(function () {
          var $form = $(this);
          var $tabs = $form.find('.webform-tabs');
  
          // Get only the main details elements and ignore all nested details.
          var selector = ($tabs.length) ? '.webform-tab' : '.js-webform-details-toggle, .webform-elements';
          var $details = $form.find('details').filter(function () {
            var $parents = $(this).parentsUntil(selector);
            return ($parents.find('details').length === 0);
          });
  
          // Toggle is only useful when there are two or more details elements.
          if ($details.length < 2) {
            return;
          }
  
          var options = $.extend({
            button: '<button type="button" class="webform-details-toggle-state"></button>'
          }, Drupal.webform.detailsToggle.options);
  
          // Create toggle buttons.
          var $toggle = $(options.button)
            .attr('title', Drupal.t('Toggle details widget state.'))
            .on('click', function (e) {
              // Get details that are not vertical tabs pane.
              var $details = $form.find('details:not(.vertical-tabs__pane)');
              var open;
              if (Drupal.webform.detailsToggle.isFormDetailsOpen($form)) {
                $details.removeAttr('open');
                open = 0;
              }
              else {
                $details.attr('open', 'open');
                open = 1;
              }
              Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
  
              // Set the saved states for all the details elements.
              // @see webform.element.details.save.js
              if (Drupal.webformDetailsSaveGetName) {
                $details.each(function () {
                  // Note: Drupal.webformDetailsSaveGetName checks if localStorage
                  // exists and is enabled.
                  // @see webform.element.details.save.js
                  var name = Drupal.webformDetailsSaveGetName($(this));
                  if (name) {
                    localStorage.setItem(name, open);
                  }
                });
              }
            })
            .wrap('<div class="webform-details-toggle-state-wrapper"></div>')
            .parent();
  
          if ($tabs.length) {
            // Add toggle state before the tabs.
            $tabs.find('.item-list:first-child').eq(0).before($toggle);
          }
          else {
            // Add toggle state link to first details element.
            $details.eq(0).before($toggle);
          }
  
          Drupal.webform.detailsToggle.setDetailsToggleLabel($form);
        });
      }
    };
  
    /**
     * Determine if a webform's details are all opened.
     *
     * @param {jQuery} $form
     *   A webform.
     *
     * @return {boolean}
     *   TRUE if a webform's details are all opened.
     */
    Drupal.webform.detailsToggle.isFormDetailsOpen = function ($form) {
      return ($form.find('details[open]').length === $form.find('details').length);
    };
  
    /**
     * Set a webform's details toggle state widget label.
     *
     * @param {jQuery} $form
     *   A webform.
     */
    Drupal.webform.detailsToggle.setDetailsToggleLabel = function ($form) {
      var isOpen = Drupal.webform.detailsToggle.isFormDetailsOpen($form);
  
      var label = (isOpen) ? Drupal.t('Collapse all') : Drupal.t('Expand all');
      $form.find('.webform-details-toggle-state').html(label);
  
      var text = (isOpen) ? Drupal.t('All details have been expanded.') : Drupal.t('All details have been collapsed.');
      Drupal.announce(text);
    };
  
  })(jQuery, Drupal);
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, debounce) {
    $.fn.drupalGetSummary = function () {
      var callback = this.data('summaryCallback');
      return this[0] && callback ? $.trim(callback(this[0])) : '';
    };
  
    $.fn.drupalSetSummary = function (callback) {
      var self = this;
  
      if (typeof callback !== 'function') {
        var val = callback;
  
        callback = function callback() {
          return val;
        };
      }
  
      return this.data('summaryCallback', callback).off('formUpdated.summary').on('formUpdated.summary', function () {
        self.trigger('summaryUpdated');
      }).trigger('summaryUpdated');
    };
  
    Drupal.behaviors.formSingleSubmit = {
      attach: function attach() {
        function onFormSubmit(e) {
          var $form = $(e.currentTarget);
          var formValues = $form.serialize();
          var previousValues = $form.attr('data-drupal-form-submit-last');
  
          if (previousValues === formValues) {
            e.preventDefault();
          } else {
            $form.attr('data-drupal-form-submit-last', formValues);
          }
        }
  
        $('body').once('form-single-submit').on('submit.singleSubmit', 'form:not([method~="GET"])', onFormSubmit);
      }
    };
  
    function triggerFormUpdated(element) {
      $(element).trigger('formUpdated');
    }
  
    function fieldsList(form) {
      var $fieldList = $(form).find('[name]').map(function (index, element) {
        return element.getAttribute('id');
      });
      return $.makeArray($fieldList);
    }
  
    Drupal.behaviors.formUpdated = {
      attach: function attach(context) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
        var $forms = (contextIsForm ? $context : $context.find('form')).once('form-updated');
        var formFields;
  
        if ($forms.length) {
          $.makeArray($forms).forEach(function (form) {
            var events = 'change.formUpdated input.formUpdated ';
            var eventHandler = debounce(function (event) {
              triggerFormUpdated(event.target);
            }, 300);
            formFields = fieldsList(form).join(',');
            form.setAttribute('data-drupal-form-fields', formFields);
            $(form).on(events, eventHandler);
          });
        }
  
        if (contextIsForm) {
          formFields = fieldsList(context).join(',');
          var currentFields = $(context).attr('data-drupal-form-fields');
  
          if (formFields !== currentFields) {
            triggerFormUpdated(context);
          }
        }
      },
      detach: function detach(context, settings, trigger) {
        var $context = $(context);
        var contextIsForm = $context.is('form');
  
        if (trigger === 'unload') {
          var $forms = (contextIsForm ? $context : $context.find('form')).removeOnce('form-updated');
  
          if ($forms.length) {
            $.makeArray($forms).forEach(function (form) {
              form.removeAttribute('data-drupal-form-fields');
              $(form).off('.formUpdated');
            });
          }
        }
      }
    };
    Drupal.behaviors.fillUserInfoFromBrowser = {
      attach: function attach(context, settings) {
        var userInfo = ['name', 'mail', 'homepage'];
        var $forms = $('[data-user-info-from-browser]').once('user-info-from-browser');
  
        if ($forms.length) {
          userInfo.forEach(function (info) {
            var $element = $forms.find("[name=".concat(info, "]"));
            var browserData = localStorage.getItem("Drupal.visitor.".concat(info));
            var emptyOrDefault = $element.val() === '' || $element.attr('data-drupal-default-value') === $element.val();
  
            if ($element.length && emptyOrDefault && browserData) {
              $element.val(browserData);
            }
          });
        }
  
        $forms.on('submit', function () {
          userInfo.forEach(function (info) {
            var $element = $forms.find("[name=".concat(info, "]"));
  
            if ($element.length) {
              localStorage.setItem("Drupal.visitor.".concat(info), $element.val());
            }
          });
        });
      }
    };
  
    var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e) {
      var url;
  
      if (e.type === 'click') {
        url = e.currentTarget.location ? e.currentTarget.location : e.currentTarget;
      } else {
        url = window.location;
      }
  
      var hash = url.hash.substr(1);
  
      if (hash) {
        var $target = $("#".concat(hash));
        $('body').trigger('formFragmentLinkClickOrHashChange', [$target]);
        setTimeout(function () {
          return $target.trigger('focus');
        }, 300);
      }
    };
  
    var debouncedHandleFragmentLinkClickOrHashChange = debounce(handleFragmentLinkClickOrHashChange, 300, true);
    $(window).on('hashchange.form-fragment', debouncedHandleFragmentLinkClickOrHashChange);
    $(document).on('click.form-fragment', 'a[href*="#"]', debouncedHandleFragmentLinkClickOrHashChange);
  })(jQuery, Drupal, Drupal.debounce);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal) {
    Drupal.behaviors.detailsAria = {
      attach: function attach() {
        $('body').once('detailsAria').on('click.detailsAria', 'summary', function (event) {
          var $summary = $(event.currentTarget);
          var open = $(event.currentTarget.parentNode).attr('open') === 'open' ? 'false' : 'true';
          $summary.attr({
            'aria-expanded': open,
            'aria-pressed': open
          });
        });
      }
    };
  })(jQuery, Drupal);;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Modernizr, Drupal) {
    function CollapsibleDetails(node) {
      this.$node = $(node);
      this.$node.data('details', this);
      var anchor = window.location.hash && window.location.hash !== '#' ? ", ".concat(window.location.hash) : '';
  
      if (this.$node.find(".error".concat(anchor)).length) {
        this.$node.attr('open', true);
      }
  
      this.setupSummary();
      this.setupLegend();
    }
  
    $.extend(CollapsibleDetails, {
      instances: []
    });
    $.extend(CollapsibleDetails.prototype, {
      setupSummary: function setupSummary() {
        this.$summary = $('<span class="summary"></span>');
        this.$node.on('summaryUpdated', $.proxy(this.onSummaryUpdated, this)).trigger('summaryUpdated');
      },
      setupLegend: function setupLegend() {
        var $legend = this.$node.find('> summary');
        $('<span class="details-summary-prefix visually-hidden"></span>').append(this.$node.attr('open') ? Drupal.t('Hide') : Drupal.t('Show')).prependTo($legend).after(document.createTextNode(' '));
        $('<a class="details-title"></a>').attr('href', "#".concat(this.$node.attr('id'))).prepend($legend.contents()).appendTo($legend);
        $legend.append(this.$summary).on('click', $.proxy(this.onLegendClick, this));
      },
      onLegendClick: function onLegendClick(e) {
        this.toggle();
        e.preventDefault();
      },
      onSummaryUpdated: function onSummaryUpdated() {
        var text = $.trim(this.$node.drupalGetSummary());
        this.$summary.html(text ? " (".concat(text, ")") : '');
      },
      toggle: function toggle() {
        var _this = this;
  
        var isOpen = !!this.$node.attr('open');
        var $summaryPrefix = this.$node.find('> summary span.details-summary-prefix');
  
        if (isOpen) {
          $summaryPrefix.html(Drupal.t('Show'));
        } else {
          $summaryPrefix.html(Drupal.t('Hide'));
        }
  
        setTimeout(function () {
          _this.$node.attr('open', !isOpen);
        }, 0);
      }
    });
    Drupal.behaviors.collapse = {
      attach: function attach(context) {
        if (Modernizr.details) {
          return;
        }
  
        var $collapsibleDetails = $(context).find('details').once('collapse').addClass('collapse-processed');
  
        if ($collapsibleDetails.length) {
          for (var i = 0; i < $collapsibleDetails.length; i++) {
            CollapsibleDetails.instances.push(new CollapsibleDetails($collapsibleDetails[i]));
          }
        }
      }
    };
  
    var handleFragmentLinkClickOrHashChange = function handleFragmentLinkClickOrHashChange(e, $target) {
      $target.parents('details').not('[open]').find('> summary').trigger('click');
    };
  
    $('body').on('formFragmentLinkClickOrHashChange.details', handleFragmentLinkClickOrHashChange);
    Drupal.CollapsibleDetails = CollapsibleDetails;
  })(jQuery, Modernizr, Drupal);;
  /**
   * @file
   * JavaScript behaviors for multiple element.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Move show weight to after the table.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformMultipleTableDrag = {
      attach: function (context, settings) {
        for (var base in settings.tableDrag) {
          if (settings.tableDrag.hasOwnProperty(base)) {
            $(context).find('.js-form-type-webform-multiple #' + base).once('webform-multiple-table-drag').each(function () {
              var $tableDrag = $(this);
              var $toggleWeight = $tableDrag.prev().prev('.tabledrag-toggle-weight-wrapper');
              if ($toggleWeight.length) {
                $toggleWeight.addClass('webform-multiple-tabledrag-toggle-weight');
                $tableDrag.after($toggleWeight);
              }
            });
          }
        }
      }
    };
  
    /**
     * Submit multiple add number input value when enter is pressed.
     *
     * @type {Drupal~behavior}
     */
    Drupal.behaviors.webformMultipleAdd = {
      attach: function (context, settings) {
        $(context).find('.js-webform-multiple-add').once('webform-multiple-add').each(function () {
          var $submit = $(this).find('input[type="submit"], button');
          var $number = $(this).find('input[type="number"]');
          $number.keyup(function (event) {
            if (event.which === 13) {
              // Note: Mousedown is the default trigger for Ajax events.
              // @see Drupal.Ajax.
              $submit.mousedown();
            }
          });
        });
      }
    };
  
  })(jQuery, Drupal);
  ;
  /*!
   * jQuery Form Plugin
   * version: 4.2.2
   * Requires jQuery v1.7.2 or later
   * Project repository: https://github.com/jquery-form/form
  
   * Copyright 2017 Kevin Morris
   * Copyright 2006 M. Alsup
  
   * Dual licensed under the LGPL-2.1+ or MIT licenses
   * https://github.com/jquery-form/form#license
  
   * This library is free software; you can redistribute it and/or
   * modify it under the terms of the GNU Lesser General Public
   * License as published by the Free Software Foundation; either
   * version 2.1 of the License, or (at your option) any later version.
   * This library is distributed in the hope that it will be useful,
   * but WITHOUT ANY WARRANTY; without even the implied warranty of
   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   * Lesser General Public License for more details.
   */
  !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?module.exports=function(t,r){return void 0===r&&(r="undefined"!=typeof window?require("jquery"):require("jquery")(t)),e(r),r}:e(jQuery)}(function(e){"use strict";function t(t){var r=t.data;t.isDefaultPrevented()||(t.preventDefault(),e(t.target).closest("form").ajaxSubmit(r))}function r(t){var r=t.target,a=e(r);if(!a.is("[type=submit],[type=image]")){var n=a.closest("[type=submit]");if(0===n.length)return;r=n[0]}var i=r.form;if(i.clk=r,"image"===r.type)if(void 0!==t.offsetX)i.clk_x=t.offsetX,i.clk_y=t.offsetY;else if("function"==typeof e.fn.offset){var o=a.offset();i.clk_x=t.pageX-o.left,i.clk_y=t.pageY-o.top}else i.clk_x=t.pageX-r.offsetLeft,i.clk_y=t.pageY-r.offsetTop;setTimeout(function(){i.clk=i.clk_x=i.clk_y=null},100)}function a(){if(e.fn.ajaxSubmit.debug){var t="[jquery.form] "+Array.prototype.join.call(arguments,"");window.console&&window.console.log?window.console.log(t):window.opera&&window.opera.postError&&window.opera.postError(t)}}var n=/\r?\n/g,i={};i.fileapi=void 0!==e('<input type="file">').get(0).files,i.formdata=void 0!==window.FormData;var o=!!e.fn.prop;e.fn.attr2=function(){if(!o)return this.attr.apply(this,arguments);var e=this.prop.apply(this,arguments);return e&&e.jquery||"string"==typeof e?e:this.attr.apply(this,arguments)},e.fn.ajaxSubmit=function(t,r,n,s){function u(r){var a,n,i=e.param(r,t.traditional).split("&"),o=i.length,s=[];for(a=0;a<o;a++)i[a]=i[a].replace(/\+/g," "),n=i[a].split("="),s.push([decodeURIComponent(n[0]),decodeURIComponent(n[1])]);return s}function c(r){function n(e){var t=null;try{e.contentWindow&&(t=e.contentWindow.document)}catch(e){a("cannot get iframe.contentWindow document: "+e)}if(t)return t;try{t=e.contentDocument?e.contentDocument:e.document}catch(r){a("cannot get iframe.contentDocument: "+r),t=e.document}return t}function i(){function t(){try{var e=n(v).readyState;a("state = "+e),e&&"uninitialized"===e.toLowerCase()&&setTimeout(t,50)}catch(e){a("Server abort: ",e," (",e.name,")"),s(L),j&&clearTimeout(j),j=void 0}}var r=p.attr2("target"),i=p.attr2("action"),o=p.attr("enctype")||p.attr("encoding")||"multipart/form-data";w.setAttribute("target",m),l&&!/post/i.test(l)||w.setAttribute("method","POST"),i!==f.url&&w.setAttribute("action",f.url),f.skipEncodingOverride||l&&!/post/i.test(l)||p.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"}),f.timeout&&(j=setTimeout(function(){T=!0,s(A)},f.timeout));var u=[];try{if(f.extraData)for(var c in f.extraData)f.extraData.hasOwnProperty(c)&&(e.isPlainObject(f.extraData[c])&&f.extraData[c].hasOwnProperty("name")&&f.extraData[c].hasOwnProperty("value")?u.push(e('<input type="hidden" name="'+f.extraData[c].name+'">',k).val(f.extraData[c].value).appendTo(w)[0]):u.push(e('<input type="hidden" name="'+c+'">',k).val(f.extraData[c]).appendTo(w)[0]));f.iframeTarget||h.appendTo(D),v.attachEvent?v.attachEvent("onload",s):v.addEventListener("load",s,!1),setTimeout(t,15);try{w.submit()}catch(e){document.createElement("form").submit.apply(w)}}finally{w.setAttribute("action",i),w.setAttribute("enctype",o),r?w.setAttribute("target",r):p.removeAttr("target"),e(u).remove()}}function s(t){if(!x.aborted&&!X){if((O=n(v))||(a("cannot access response document"),t=L),t===A&&x)return x.abort("timeout"),void S.reject(x,"timeout");if(t===L&&x)return x.abort("server abort"),void S.reject(x,"error","server abort");if(O&&O.location.href!==f.iframeSrc||T){v.detachEvent?v.detachEvent("onload",s):v.removeEventListener("load",s,!1);var r,i="success";try{if(T)throw"timeout";var o="xml"===f.dataType||O.XMLDocument||e.isXMLDoc(O);if(a("isXml="+o),!o&&window.opera&&(null===O.body||!O.body.innerHTML)&&--C)return a("requeing onLoad callback, DOM not available"),void setTimeout(s,250);var u=O.body?O.body:O.documentElement;x.responseText=u?u.innerHTML:null,x.responseXML=O.XMLDocument?O.XMLDocument:O,o&&(f.dataType="xml"),x.getResponseHeader=function(e){return{"content-type":f.dataType}[e.toLowerCase()]},u&&(x.status=Number(u.getAttribute("status"))||x.status,x.statusText=u.getAttribute("statusText")||x.statusText);var c=(f.dataType||"").toLowerCase(),l=/(json|script|text)/.test(c);if(l||f.textarea){var p=O.getElementsByTagName("textarea")[0];if(p)x.responseText=p.value,x.status=Number(p.getAttribute("status"))||x.status,x.statusText=p.getAttribute("statusText")||x.statusText;else if(l){var m=O.getElementsByTagName("pre")[0],g=O.getElementsByTagName("body")[0];m?x.responseText=m.textContent?m.textContent:m.innerText:g&&(x.responseText=g.textContent?g.textContent:g.innerText)}}else"xml"===c&&!x.responseXML&&x.responseText&&(x.responseXML=q(x.responseText));try{M=N(x,c,f)}catch(e){i="parsererror",x.error=r=e||i}}catch(e){a("error caught: ",e),i="error",x.error=r=e||i}x.aborted&&(a("upload aborted"),i=null),x.status&&(i=x.status>=200&&x.status<300||304===x.status?"success":"error"),"success"===i?(f.success&&f.success.call(f.context,M,"success",x),S.resolve(x.responseText,"success",x),d&&e.event.trigger("ajaxSuccess",[x,f])):i&&(void 0===r&&(r=x.statusText),f.error&&f.error.call(f.context,x,i,r),S.reject(x,"error",r),d&&e.event.trigger("ajaxError",[x,f,r])),d&&e.event.trigger("ajaxComplete",[x,f]),d&&!--e.active&&e.event.trigger("ajaxStop"),f.complete&&f.complete.call(f.context,x,i),X=!0,f.timeout&&clearTimeout(j),setTimeout(function(){f.iframeTarget?h.attr("src",f.iframeSrc):h.remove(),x.responseXML=null},100)}}}var u,c,f,d,m,h,v,x,y,b,T,j,w=p[0],S=e.Deferred();if(S.abort=function(e){x.abort(e)},r)for(c=0;c<g.length;c++)u=e(g[c]),o?u.prop("disabled",!1):u.removeAttr("disabled");(f=e.extend(!0,{},e.ajaxSettings,t)).context=f.context||f,m="jqFormIO"+(new Date).getTime();var k=w.ownerDocument,D=p.closest("body");if(f.iframeTarget?(b=(h=e(f.iframeTarget,k)).attr2("name"))?m=b:h.attr2("name",m):(h=e('<iframe name="'+m+'" src="'+f.iframeSrc+'" />',k)).css({position:"absolute",top:"-1000px",left:"-1000px"}),v=h[0],x={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(t){var r="timeout"===t?"timeout":"aborted";a("aborting upload... "+r),this.aborted=1;try{v.contentWindow.document.execCommand&&v.contentWindow.document.execCommand("Stop")}catch(e){}h.attr("src",f.iframeSrc),x.error=r,f.error&&f.error.call(f.context,x,r,t),d&&e.event.trigger("ajaxError",[x,f,r]),f.complete&&f.complete.call(f.context,x,r)}},(d=f.global)&&0==e.active++&&e.event.trigger("ajaxStart"),d&&e.event.trigger("ajaxSend",[x,f]),f.beforeSend&&!1===f.beforeSend.call(f.context,x,f))return f.global&&e.active--,S.reject(),S;if(x.aborted)return S.reject(),S;(y=w.clk)&&(b=y.name)&&!y.disabled&&(f.extraData=f.extraData||{},f.extraData[b]=y.value,"image"===y.type&&(f.extraData[b+".x"]=w.clk_x,f.extraData[b+".y"]=w.clk_y));var A=1,L=2,F=e("meta[name=csrf-token]").attr("content"),E=e("meta[name=csrf-param]").attr("content");E&&F&&(f.extraData=f.extraData||{},f.extraData[E]=F),f.forceSync?i():setTimeout(i,10);var M,O,X,C=50,q=e.parseXML||function(e,t){return window.ActiveXObject?((t=new ActiveXObject("Microsoft.XMLDOM")).async="false",t.loadXML(e)):t=(new DOMParser).parseFromString(e,"text/xml"),t&&t.documentElement&&"parsererror"!==t.documentElement.nodeName?t:null},_=e.parseJSON||function(e){return window.eval("("+e+")")},N=function(t,r,a){var n=t.getResponseHeader("content-type")||"",i=("xml"===r||!r)&&n.indexOf("xml")>=0,o=i?t.responseXML:t.responseText;return i&&"parsererror"===o.documentElement.nodeName&&e.error&&e.error("parsererror"),a&&a.dataFilter&&(o=a.dataFilter(o,r)),"string"==typeof o&&(("json"===r||!r)&&n.indexOf("json")>=0?o=_(o):("script"===r||!r)&&n.indexOf("javascript")>=0&&e.globalEval(o)),o};return S}if(!this.length)return a("ajaxSubmit: skipping submit process - no element selected"),this;var l,f,d,p=this;"function"==typeof t?t={success:t}:"string"==typeof t||!1===t&&arguments.length>0?(t={url:t,data:r,dataType:n},"function"==typeof s&&(t.success=s)):void 0===t&&(t={}),l=t.method||t.type||this.attr2("method"),(d=(d="string"==typeof(f=t.url||this.attr2("action"))?e.trim(f):"")||window.location.href||"")&&(d=(d.match(/^([^#]+)/)||[])[1]),t=e.extend(!0,{url:d,success:e.ajaxSettings.success,type:l||e.ajaxSettings.type,iframeSrc:/^https/i.test(window.location.href||"")?"javascript:false":"about:blank"},t);var m={};if(this.trigger("form-pre-serialize",[this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-pre-serialize trigger"),this;if(t.beforeSerialize&&!1===t.beforeSerialize(this,t))return a("ajaxSubmit: submit aborted via beforeSerialize callback"),this;var h=t.traditional;void 0===h&&(h=e.ajaxSettings.traditional);var v,g=[],x=this.formToArray(t.semantic,g,t.filtering);if(t.data){var y=e.isFunction(t.data)?t.data(x):t.data;t.extraData=y,v=e.param(y,h)}if(t.beforeSubmit&&!1===t.beforeSubmit(x,this,t))return a("ajaxSubmit: submit aborted via beforeSubmit callback"),this;if(this.trigger("form-submit-validate",[x,this,t,m]),m.veto)return a("ajaxSubmit: submit vetoed via form-submit-validate trigger"),this;var b=e.param(x,h);v&&(b=b?b+"&"+v:v),"GET"===t.type.toUpperCase()?(t.url+=(t.url.indexOf("?")>=0?"&":"?")+b,t.data=null):t.data=b;var T=[];if(t.resetForm&&T.push(function(){p.resetForm()}),t.clearForm&&T.push(function(){p.clearForm(t.includeHidden)}),!t.dataType&&t.target){var j=t.success||function(){};T.push(function(r,a,n){var i=arguments,o=t.replaceTarget?"replaceWith":"html";e(t.target)[o](r).each(function(){j.apply(this,i)})})}else t.success&&(e.isArray(t.success)?e.merge(T,t.success):T.push(t.success));if(t.success=function(e,r,a){for(var n=t.context||this,i=0,o=T.length;i<o;i++)T[i].apply(n,[e,r,a||p,p])},t.error){var w=t.error;t.error=function(e,r,a){var n=t.context||this;w.apply(n,[e,r,a,p])}}if(t.complete){var S=t.complete;t.complete=function(e,r){var a=t.context||this;S.apply(a,[e,r,p])}}var k=e("input[type=file]:enabled",this).filter(function(){return""!==e(this).val()}).length>0,D="multipart/form-data",A=p.attr("enctype")===D||p.attr("encoding")===D,L=i.fileapi&&i.formdata;a("fileAPI :"+L);var F,E=(k||A)&&!L;!1!==t.iframe&&(t.iframe||E)?t.closeKeepAlive?e.get(t.closeKeepAlive,function(){F=c(x)}):F=c(x):F=(k||A)&&L?function(r){for(var a=new FormData,n=0;n<r.length;n++)a.append(r[n].name,r[n].value);if(t.extraData){var i=u(t.extraData);for(n=0;n<i.length;n++)i[n]&&a.append(i[n][0],i[n][1])}t.data=null;var o=e.extend(!0,{},e.ajaxSettings,t,{contentType:!1,processData:!1,cache:!1,type:l||"POST"});t.uploadProgress&&(o.xhr=function(){var r=e.ajaxSettings.xhr();return r.upload&&r.upload.addEventListener("progress",function(e){var r=0,a=e.loaded||e.position,n=e.total;e.lengthComputable&&(r=Math.ceil(a/n*100)),t.uploadProgress(e,a,n,r)},!1),r}),o.data=null;var s=o.beforeSend;return o.beforeSend=function(e,r){t.formData?r.data=t.formData:r.data=a,s&&s.call(this,e,r)},e.ajax(o)}(x):e.ajax(t),p.removeData("jqxhr").data("jqxhr",F);for(var M=0;M<g.length;M++)g[M]=null;return this.trigger("form-submit-notify",[this,t]),this},e.fn.ajaxForm=function(n,i,o,s){if(("string"==typeof n||!1===n&&arguments.length>0)&&(n={url:n,data:i,dataType:o},"function"==typeof s&&(n.success=s)),n=n||{},n.delegation=n.delegation&&e.isFunction(e.fn.on),!n.delegation&&0===this.length){var u={s:this.selector,c:this.context};return!e.isReady&&u.s?(a("DOM not ready, queuing ajaxForm"),e(function(){e(u.s,u.c).ajaxForm(n)}),this):(a("terminating; zero elements found by selector"+(e.isReady?"":" (DOM not ready)")),this)}return n.delegation?(e(document).off("submit.form-plugin",this.selector,t).off("click.form-plugin",this.selector,r).on("submit.form-plugin",this.selector,n,t).on("click.form-plugin",this.selector,n,r),this):this.ajaxFormUnbind().on("submit.form-plugin",n,t).on("click.form-plugin",n,r)},e.fn.ajaxFormUnbind=function(){return this.off("submit.form-plugin click.form-plugin")},e.fn.formToArray=function(t,r,a){var n=[];if(0===this.length)return n;var o,s=this[0],u=this.attr("id"),c=t||void 0===s.elements?s.getElementsByTagName("*"):s.elements;if(c&&(c=e.makeArray(c)),u&&(t||/(Edge|Trident)\//.test(navigator.userAgent))&&(o=e(':input[form="'+u+'"]').get()).length&&(c=(c||[]).concat(o)),!c||!c.length)return n;e.isFunction(a)&&(c=e.map(c,a));var l,f,d,p,m,h,v;for(l=0,h=c.length;l<h;l++)if(m=c[l],(d=m.name)&&!m.disabled)if(t&&s.clk&&"image"===m.type)s.clk===m&&(n.push({name:d,value:e(m).val(),type:m.type}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}));else if((p=e.fieldValue(m,!0))&&p.constructor===Array)for(r&&r.push(m),f=0,v=p.length;f<v;f++)n.push({name:d,value:p[f]});else if(i.fileapi&&"file"===m.type){r&&r.push(m);var g=m.files;if(g.length)for(f=0;f<g.length;f++)n.push({name:d,value:g[f],type:m.type});else n.push({name:d,value:"",type:m.type})}else null!==p&&void 0!==p&&(r&&r.push(m),n.push({name:d,value:p,type:m.type,required:m.required}));if(!t&&s.clk){var x=e(s.clk),y=x[0];(d=y.name)&&!y.disabled&&"image"===y.type&&(n.push({name:d,value:x.val()}),n.push({name:d+".x",value:s.clk_x},{name:d+".y",value:s.clk_y}))}return n},e.fn.formSerialize=function(t){return e.param(this.formToArray(t))},e.fn.fieldSerialize=function(t){var r=[];return this.each(function(){var a=this.name;if(a){var n=e.fieldValue(this,t);if(n&&n.constructor===Array)for(var i=0,o=n.length;i<o;i++)r.push({name:a,value:n[i]});else null!==n&&void 0!==n&&r.push({name:this.name,value:n})}}),e.param(r)},e.fn.fieldValue=function(t){for(var r=[],a=0,n=this.length;a<n;a++){var i=this[a],o=e.fieldValue(i,t);null===o||void 0===o||o.constructor===Array&&!o.length||(o.constructor===Array?e.merge(r,o):r.push(o))}return r},e.fieldValue=function(t,r){var a=t.name,i=t.type,o=t.tagName.toLowerCase();if(void 0===r&&(r=!0),r&&(!a||t.disabled||"reset"===i||"button"===i||("checkbox"===i||"radio"===i)&&!t.checked||("submit"===i||"image"===i)&&t.form&&t.form.clk!==t||"select"===o&&-1===t.selectedIndex))return null;if("select"===o){var s=t.selectedIndex;if(s<0)return null;for(var u=[],c=t.options,l="select-one"===i,f=l?s+1:c.length,d=l?s:0;d<f;d++){var p=c[d];if(p.selected&&!p.disabled){var m=p.value;if(m||(m=p.attributes&&p.attributes.value&&!p.attributes.value.specified?p.text:p.value),l)return m;u.push(m)}}return u}return e(t).val().replace(n,"\r\n")},e.fn.clearForm=function(t){return this.each(function(){e("input,select,textarea",this).clearFields(t)})},e.fn.clearFields=e.fn.clearInputs=function(t){var r=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var a=this.type,n=this.tagName.toLowerCase();r.test(a)||"textarea"===n?this.value="":"checkbox"===a||"radio"===a?this.checked=!1:"select"===n?this.selectedIndex=-1:"file"===a?/MSIE/.test(navigator.userAgent)?e(this).replaceWith(e(this).clone(!0)):e(this).val(""):t&&(!0===t&&/hidden/.test(a)||"string"==typeof t&&e(this).is(t))&&(this.value="")})},e.fn.resetForm=function(){return this.each(function(){var t=e(this),r=this.tagName.toLowerCase();switch(r){case"input":this.checked=this.defaultChecked;case"textarea":return this.value=this.defaultValue,!0;case"option":case"optgroup":var a=t.parents("select");return a.length&&a[0].multiple?"option"===r?this.selected=this.defaultSelected:t.find("option").resetForm():a.resetForm(),!0;case"select":return t.find("option").each(function(e){if(this.selected=this.defaultSelected,this.defaultSelected&&!t[0].multiple)return t[0].selectedIndex=e,!1}),!0;case"label":var n=e(t.attr("for")),i=t.find("input,select,textarea");return n[0]&&i.unshift(n[0]),i.resetForm(),!0;case"form":return("function"==typeof this.reset||"object"==typeof this.reset&&!this.reset.nodeType)&&this.reset(),!0;default:return t.find("form,input,label,select,textarea").resetForm(),!0}})},e.fn.enable=function(e){return void 0===e&&(e=!0),this.each(function(){this.disabled=!e})},e.fn.selected=function(t){return void 0===t&&(t=!0),this.each(function(){var r=this.type;if("checkbox"===r||"radio"===r)this.checked=t;else if("option"===this.tagName.toLowerCase()){var a=e(this).parent("select");t&&a[0]&&"select-one"===a[0].type&&a.find("option").selected(!1),this.selected=t}})},e.fn.ajaxSubmit.debug=!1});
  
  ;
  /**
  * DO NOT EDIT THIS FILE.
  * See the following change record for more information,
  * https://www.drupal.org/node/2815083
  * @preserve
  **/
  
  (function ($, Drupal, window) {
    function TableResponsive(table) {
      this.table = table;
      this.$table = $(table);
      this.showText = Drupal.t('Show all columns');
      this.hideText = Drupal.t('Hide lower priority columns');
      this.$headers = this.$table.find('th');
      this.$link = $('<button type="button" class="link tableresponsive-toggle"></button>').attr('title', Drupal.t('Show table cells that were hidden to make the table fit within a small screen.')).on('click', $.proxy(this, 'eventhandlerToggleColumns'));
      this.$table.before($('<div class="tableresponsive-toggle-columns"></div>').append(this.$link));
      $(window).on('resize.tableresponsive', $.proxy(this, 'eventhandlerEvaluateColumnVisibility')).trigger('resize.tableresponsive');
    }
  
    Drupal.behaviors.tableResponsive = {
      attach: function attach(context, settings) {
        var $tables = $(context).find('table.responsive-enabled').once('tableresponsive');
  
        if ($tables.length) {
          var il = $tables.length;
  
          for (var i = 0; i < il; i++) {
            TableResponsive.tables.push(new TableResponsive($tables[i]));
          }
        }
      }
    };
    $.extend(TableResponsive, {
      tables: []
    });
    $.extend(TableResponsive.prototype, {
      eventhandlerEvaluateColumnVisibility: function eventhandlerEvaluateColumnVisibility(e) {
        var pegged = parseInt(this.$link.data('pegged'), 10);
        var hiddenLength = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden').length;
  
        if (hiddenLength > 0) {
          this.$link.show().text(this.showText);
        }
  
        if (!pegged && hiddenLength === 0) {
          this.$link.hide().text(this.hideText);
        }
      },
      eventhandlerToggleColumns: function eventhandlerToggleColumns(e) {
        e.preventDefault();
        var self = this;
        var $hiddenHeaders = this.$headers.filter('.priority-medium:hidden, .priority-low:hidden');
        this.$revealedCells = this.$revealedCells || $();
  
        if ($hiddenHeaders.length > 0) {
          $hiddenHeaders.each(function (index, element) {
            var $header = $(this);
            var position = $header.prevAll('th').length;
            self.$table.find('tbody tr').each(function () {
              var $cells = $(this).find('td').eq(position);
              $cells.show();
              self.$revealedCells = $().add(self.$revealedCells).add($cells);
            });
            $header.show();
            self.$revealedCells = $().add(self.$revealedCells).add($header);
          });
          this.$link.text(this.hideText).data('pegged', 1);
        } else {
            this.$revealedCells.hide();
            this.$revealedCells.each(function (index, element) {
              var $cell = $(this);
              var properties = $cell.attr('style').split(';');
              var newProps = [];
              var match = /^display\s*:\s*none$/;
  
              for (var i = 0; i < properties.length; i++) {
                var prop = properties[i];
                prop.trim();
                var isDisplayNone = match.exec(prop);
  
                if (isDisplayNone) {
                  continue;
                }
  
                newProps.push(prop);
              }
  
              $cell.attr('style', newProps.join(';'));
            });
            this.$link.text(this.showText).data('pegged', 0);
            $(window).trigger('resize.tableresponsive');
          }
      }
    });
    Drupal.TableResponsive = TableResponsive;
  })(jQuery, Drupal, window);;
  /**
   * @file
   * JavaScript behaviors for checkboxes.
   */
  
  (function ($, Drupal) {
  
    'use strict';
  
    /**
     * Adds check all or none checkboxes support.
     *
     * @type {Drupal~behavior}
     *
     * @see https://www.drupal.org/project/webform/issues/3068998
     */
    Drupal.behaviors.webformCheckboxesAllorNone = {
      attach: function (context) {
        $('[data-options-all], [data-options-none]', context)
          .once('webform-checkboxes-all-or-none')
          .each(function () {
            var $element = $(this);
  
            var options_all_value = $element.data('options-all');
            var options_none_value = $element.data('options-none');
  
            // Get all checkboxes.
            var $checkboxes = $element.find('input[type="checkbox"]');
  
            // Get all options/checkboxes.
            var $options = $checkboxes
              .not('[value="' + options_all_value + '"]')
              .not('[value="' + options_none_value + '"]');
  
            // Get options all and none checkboxes.
            var $options_all = $element
              .find(':checkbox[value="' + options_all_value + '"]');
            var $options_none = $element
              .find(':checkbox[value="' + options_none_value + '"]');
  
            // All of the above.
            if ($options_all.length) {
              $options_all.on('click', toggleCheckAllEventHandler);
              if ($options_all.prop('checked')) {
                toggleCheckAllEventHandler();
              }
            }
  
            // None of the above.
            if ($options_none.length) {
              $options_none.on('click', toggleCheckNoneEventHandler);
              toggleCheckNoneEventHandler();
            }
  
            $options.on('click', toggleCheckboxesEventHandler);
            toggleCheckboxesEventHandler();
  
            /**
             * Toggle check all checkbox checked state.
             */
            function toggleCheckAllEventHandler() {
              if ($options_all.prop('checked')) {
                // Uncheck options none.
                if ($options_none.is(':checked')) {
                  $options_none
                    .prop('checked', false)
                    .trigger('change', ['webform.states']);
                }
                // Check check all unchecked options.
                $options.not(':checked')
                  .prop('checked', true)
                  .trigger('change', ['webform.states']);
              }
              else {
                // Check uncheck all checked options.
                $options.filter(':checked')
                  .prop('checked', false)
                  .trigger('change', ['webform.states']);
              }
            }
  
            /**
             * Toggle check none checkbox checked state.
             */
            function toggleCheckNoneEventHandler() {
              if ($options_none.prop('checked')) {
                $checkboxes
                  .not('[value="' + options_none_value + '"]')
                  .filter(':checked')
                  .prop('checked', false)
                  .trigger('change', ['webform.states']);
              }
            }
  
            /**
             * Toggle check all checkbox checked state.
             */
            function toggleCheckboxesEventHandler() {
              var isAllChecked = ($options.filter(':checked').length === $options.length);
              if ($options_all.length
                && $options_all.prop('checked') !== isAllChecked) {
                $options_all
                  .prop('checked', isAllChecked)
                  .trigger('change', ['webform.states']);
              }
              var isOneChecked = $options.is(':checked');
              if ($options_none.length
                && isOneChecked) {
                $options_none
                  .prop('checked', false)
                  .trigger('change', ['webform.states']);
              }
            }
          });
      }
    };
  
  })(jQuery, Drupal);
  ;
  /**
   * @popperjs/core v2.0.6 - MIT License
   */
  
  "use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).Popper={})}(this,(function(e){function t(e){return{width:(e=e.getBoundingClientRect()).width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function r(e){return"[object Window]"!==e.toString()?(e=e.ownerDocument)?e.defaultView:window:e}function n(e){return{scrollLeft:(e=r(e)).pageXOffset,scrollTop:e.pageYOffset}}function o(e){return e instanceof r(e).Element}function i(e){return e instanceof r(e).HTMLElement}function a(e){return e?(e.nodeName||"").toLowerCase():null}function s(e){return(o(e)?e.ownerDocument:e.document).documentElement}function f(e){return t(s(e)).left+n(e).scrollLeft}function p(e,o,p){void 0===p&&(p=!1),e=t(e);var c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return p||("body"!==a(o)&&(c=o!==r(o)&&i(o)?{scrollLeft:o.scrollLeft,scrollTop:o.scrollTop}:n(o)),i(o)?((u=t(o)).x+=o.clientLeft,u.y+=o.clientTop):(o=s(o))&&(u.x=f(o))),{x:e.left+c.scrollLeft-u.x,y:e.top+c.scrollTop-u.y,width:e.width,height:e.height}}function c(e){return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}}function u(e){return"html"===a(e)?e:e.parentNode||e.host||document.ownerDocument||document.documentElement}function d(e){return r(e).getComputedStyle(e)}function l(e,t){void 0===t&&(t=[]);var n=function e(t){if(0<=["html","body","#document"].indexOf(a(t)))return t.ownerDocument.body;if(i(t)){var r=d(t);if(/auto|scroll|overlay|hidden/.test(r.overflow+r.overflowY+r.overflowX))return t}return e(u(t))}(e);return n=(e="body"===a(n))?r(n):n,t=t.concat(n),e?t:t.concat(l(u(n)))}function m(e){var t;return!i(e)||!(t=e.offsetParent)||void 0!==window.InstallTrigger&&"fixed"===d(t).position?null:t}function h(e){var t=r(e);for(e=m(e);e&&0<=["table","td","th"].indexOf(a(e));)e=m(e);return e&&"body"===a(e)&&"static"===d(e).position?t:e||t}function v(e){var t=new Map,r=new Set,n=[];return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||function e(o){r.add(o.name),[].concat(o.requires||[],o.requiresIfExists||[]).forEach((function(n){r.has(n)||(n=t.get(n))&&e(n)})),n.push(o)}(e)})),n}function g(e){var t;return function(){return t||(t=new Promise((function(r){Promise.resolve().then((function(){t=void 0,r(e())}))}))),t}}function b(e){return e.split("-")[0]}function y(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function x(e){void 0===e&&(e={});var t=e.defaultModifiers,r=void 0===t?[]:t,n=void 0===(e=e.defaultOptions)?F:e;return function(e,t,i){function a(){f.forEach((function(e){return e()})),f=[]}void 0===i&&(i=n);var s={placement:"bottom",orderedModifiers:[],options:Object.assign({},F,{},n),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},f=[],u=!1,d={state:s,setOptions:function(i){return a(),s.options=Object.assign({},n,{},s.options,{},i),s.scrollParents={reference:o(e)?l(e):[],popper:l(t)},i=function(e){var t=v(e);return C.reduce((function(e,r){return e.concat(t.filter((function(e){return e.phase===r})))}),[])}(function(e){var t=e.reduce((function(e,t){var r=e[t.name];return e[t.name]=r?Object.assign({},r,{},t,{options:Object.assign({},r.options,{},t.options),data:Object.assign({},r.data,{},t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,s.options.modifiers))),s.orderedModifiers=i.filter((function(e){return e.enabled})),s.orderedModifiers.forEach((function(e){var t=e.name,r=e.options;r=void 0===r?{}:r,"function"==typeof(e=e.effect)&&(t=e({state:s,name:t,instance:d,options:r}),f.push(t||function(){}))})),d.update()},forceUpdate:function(){if(!u){var e=s.elements,t=e.reference;if(y(t,e=e.popper))for(s.rects={reference:p(t,h(e),"fixed"===s.options.strategy),popper:c(e)},s.reset=!1,s.placement=s.options.placement,s.orderedModifiers.forEach((function(e){return s.modifiersData[e.name]=Object.assign({},e.data)})),t=0;t<s.orderedModifiers.length;t++)if(!0===s.reset)s.reset=!1,t=-1;else{var r=s.orderedModifiers[t];e=r.fn;var n=r.options;n=void 0===n?{}:n,r=r.name,"function"==typeof e&&(s=e({state:s,options:n,name:r,instance:d})||s)}}},update:g((function(){return new Promise((function(e){d.forceUpdate(),e(s)}))})),destroy:function(){a(),u=!0}};return y(e,t)?(d.setOptions(i).then((function(e){!u&&i.onFirstUpdate&&i.onFirstUpdate(e)})),d):d}}function w(e){return 0<=["top","bottom"].indexOf(e)?"x":"y"}function O(e){var t=e.reference,r=e.element,n=(e=e.placement)?b(e):null;e=e?e.split("-")[1]:null;var o=t.x+t.width/2-r.width/2,i=t.y+t.height/2-r.height/2;switch(n){case"top":o={x:o,y:t.y-r.height};break;case"bottom":o={x:o,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:i};break;case"left":o={x:t.x-r.width,y:i};break;default:o={x:t.x,y:t.y}}if(null!=(n=n?w(n):null))switch(i="y"===n?"height":"width",e){case"start":o[n]=Math.floor(o[n])-Math.floor(t[i]/2-r[i]/2);break;case"end":o[n]=Math.floor(o[n])+Math.ceil(t[i]/2-r[i]/2)}return o}function M(e){var t,n=e.popper,o=e.popperRect,i=e.placement,a=e.offsets,f=e.position,p=e.gpuAcceleration,c=e.adaptive,u=window.devicePixelRatio||1;e=Math.round(a.x*u)/u||0,u=Math.round(a.y*u)/u||0;var d=a.hasOwnProperty("x");a=a.hasOwnProperty("y");var l,m="left",v="top",g=window;if(c){var b=h(n);b===r(n)&&(b=s(n)),"top"===i&&(v="bottom",u-=b.clientHeight-o.height,u*=p?1:-1),"left"===i&&(m="right",e-=b.clientWidth-o.width,e*=p?1:-1)}return n=Object.assign({position:f},c&&N),p?Object.assign({},n,((l={})[v]=a?"0":"",l[m]=d?"0":"",l.transform=2>(g.devicePixelRatio||1)?"translate("+e+"px, "+u+"px)":"translate3d("+e+"px, "+u+"px, 0)",l)):Object.assign({},n,((t={})[v]=a?u+"px":"",t[m]=d?e+"px":"",t.transform="",t))}function j(e){return e.replace(/left|right|bottom|top/g,(function(e){return _[e]}))}function D(e){return e.replace(/start|end/g,(function(e){return U[e]}))}function E(e,t){var r=!(!t.getRootNode||!t.getRootNode().host);if(e.contains(t))return!0;if(r)do{if(t&&e.isSameNode(t))return!0;t=t.parentNode||t.host}while(t);return!1}function k(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function L(e,o){if("viewport"===o)e=k({width:(e=r(e)).innerWidth,height:e.innerHeight,x:0,y:0});else if(i(o))e=t(o);else{var a=s(e);e=r(a),o=n(a),(a=p(s(a),e)).height=Math.max(a.height,e.innerHeight),a.width=Math.max(a.width,e.innerWidth),a.x=-o.scrollLeft,a.y=-o.scrollTop,e=k(a)}return e}function P(e,t,n){return t="clippingParents"===t?function(e){var t=l(e),r=0<=["absolute","fixed"].indexOf(d(e).position)&&i(e)?h(e):e;return o(r)?t.filter((function(e){return o(e)&&E(e,r)})):[]}(e):[].concat(t),(n=(n=[].concat(t,[n])).reduce((function(t,n){var o=L(e,n),p=r(n=i(n)?n:s(e)),c=i(n)?d(n):{};parseFloat(c.borderTopWidth);var u=parseFloat(c.borderRightWidth)||0,l=parseFloat(c.borderBottomWidth)||0,m=parseFloat(c.borderLeftWidth)||0;c="html"===a(n);var h=f(n),v=n.clientWidth+u,g=n.clientHeight+l;return c&&50<p.innerHeight-n.clientHeight&&(g=p.innerHeight-l),l=c?0:n.clientTop,u=n.clientLeft>m?u:c?p.innerWidth-v-h:n.offsetWidth-v,p=c?p.innerHeight-g:n.offsetHeight-g,n=c?h:n.clientLeft,t.top=Math.max(o.top+l,t.top),t.right=Math.min(o.right-u,t.right),t.bottom=Math.min(o.bottom-p,t.bottom),t.left=Math.max(o.left+n,t.left),t}),L(e,n[0]))).width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}function W(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},{},e)}function B(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}function H(e,r){void 0===r&&(r={});var n=r;r=void 0===(r=n.placement)?e.placement:r;var i=n.boundary,a=void 0===i?"clippingParents":i,f=void 0===(i=n.rootBoundary)?"viewport":i;i=void 0===(i=n.elementContext)?"popper":i;var p=n.altBoundary,c=void 0!==p&&p;n=W("number"!=typeof(n=void 0===(n=n.padding)?0:n)?n:B(n,q));var u=e.elements.reference;p=e.rects.popper,a=P(o(c=e.elements[c?"popper"===i?"reference":"popper":i])?c:s(e.elements.popper),a,f),c=O({reference:f=t(u),element:p,strategy:"absolute",placement:r}),p=k(Object.assign({},p,{},c)),f="popper"===i?p:f;var d={top:a.top-f.top+n.top,bottom:f.bottom-a.bottom+n.bottom,left:a.left-f.left+n.left,right:f.right-a.right+n.right};if(e=e.modifiersData.offset,"popper"===i&&e){var l=e[r];Object.keys(d).forEach((function(e){var t=0<=["right","bottom"].indexOf(e)?1:-1,r=0<=["top","bottom"].indexOf(e)?"y":"x";d[e]+=l[r]*t}))}return d}function R(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function T(e){return["top","right","bottom","left"].some((function(t){return 0<=e[t]}))}var q=["top","bottom","right","left"],A=q.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),S=[].concat(q,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),C="beforeRead read afterRead beforeMain main afterMain beforeWrite write afterWrite".split(" "),F={placement:"bottom",modifiers:[],strategy:"absolute"},I={passive:!0},N={top:"auto",right:"auto",bottom:"auto",left:"auto"},_={left:"right",right:"left",bottom:"top",top:"bottom"},U={start:"end",end:"start"},V=[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,o=(e=e.options).scroll,i=void 0===o||o,a=void 0===(e=e.resize)||e,s=r(t.elements.popper),f=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&f.forEach((function(e){e.addEventListener("scroll",n.update,I)})),a&&s.addEventListener("resize",n.update,I),function(){i&&f.forEach((function(e){e.removeEventListener("scroll",n.update,I)})),a&&s.removeEventListener("resize",n.update,I)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state;t.modifiersData[e.name]=O({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options;e=void 0===(e=r.gpuAcceleration)||e,r=void 0===(r=r.adaptive)||r,e={placement:b(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:e},t.styles.popper=Object.assign({},t.styles.popper,{},M(Object.assign({},e,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r}))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,{},M(Object.assign({},e,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var r=t.styles[e]||{},n=t.attributes[e]||{},o=t.elements[e];i(o)&&a(o)&&(Object.assign(o.style,r),Object.keys(n).forEach((function(e){var t=n[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,r={popper:{position:"absolute",left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach((function(e){var n=t.elements[e],o=t.attributes[e]||{};e=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:r[e]).reduce((function(e,t){return e[t]="",e}),{}),i(n)&&a(n)&&(Object.assign(n.style,e),Object.keys(o).forEach((function(e){n.removeAttribute(e)})))}))}},requires:["computeStyles"]},{name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.name,n=void 0===(e=e.options.offset)?[0,0]:e,o=(e=S.reduce((function(e,r){var o=t.rects,i=b(r),a=0<=["left","top"].indexOf(i)?-1:1,s="function"==typeof n?n(Object.assign({},o,{placement:r})):n;return o=(o=s[0])||0,s=((s=s[1])||0)*a,i=0<=["left","right"].indexOf(i)?{x:s,y:o}:{x:o,y:s},e[r]=i,e}),{}))[t.placement],i=o.y;t.modifiersData.popperOffsets.x+=o.x,t.modifiersData.popperOffsets.y+=i,t.modifiersData[r]=e}},{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;if(e=e.name,!t.modifiersData[e]._skip){var n=r.fallbackPlacements,o=r.padding,i=r.boundary,a=r.rootBoundary,s=void 0===(r=r.flipVariations)||r,f=b(r=t.options.placement);n=n||(f!==r&&s?function(e){if("auto"===b(e))return[];var t=j(e);return[D(e),t,D(t)]}(r):[j(r)]);var p=[r].concat(n).reduce((function(e,r){return e.concat("auto"===b(r)?function(e,t){void 0===t&&(t={});var r=t.boundary,n=t.rootBoundary,o=t.padding,i=t.flipVariations,a=t.placement.split("-")[1],s=(a?i?A:A.filter((function(e){return e.split("-")[1]===a})):q).reduce((function(t,i){return t[i]=H(e,{placement:i,boundary:r,rootBoundary:n,padding:o})[b(i)],t}),{});return Object.keys(s).sort((function(e,t){return s[e]-s[t]}))}(t,{placement:r,boundary:i,rootBoundary:a,padding:o,flipVariations:s}):r)}),[]);n=t.rects.reference,r=t.rects.popper;var c=new Map;f=!0;for(var u=p[0],d=0;d<p.length;d++){var l=p[d],m=b(l),h="start"===l.split("-")[1],v=0<=["top","bottom"].indexOf(m),g=v?"width":"height",y=H(t,{placement:l,boundary:i,rootBoundary:a,padding:o});if(h=v?h?"right":"left":h?"bottom":"top",n[g]>r[g]&&(h=j(h)),g=j(h),(m=[0>=y[m],0>=y[h],0>=y[g]]).every((function(e){return e}))){u=l,f=!1;break}c.set(l,m)}if(f)for(n=function(e){var t=p.find((function(t){if(t=c.get(t))return t.slice(0,e).every((function(e){return e}))}));if(t)return u=t,"break"},r=s?3:1;0<r&&"break"!==n(r);r--);t.placement!==u&&(t.modifiersData[e]._skip=!0,t.placement=u,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options;e=e.name;var n=r.mainAxis,o=void 0===n||n;n=void 0!==(n=r.altAxis)&&n;var i=r.tether;i=void 0===i||i;var a=r.tetherOffset,s=void 0===a?0:a;r=H(t,{boundary:r.boundary,rootBoundary:r.rootBoundary,padding:r.padding}),a=b(t.placement);var f=t.placement.split("-")[1],p=!f,u=w(a);a="x"===u?"y":"x";var d=t.modifiersData.popperOffsets,l=t.rects.reference,m=t.rects.popper,h="function"==typeof s?s(Object.assign({},t.rects,{placement:t.placement})):s;if(s={x:0,y:0},o){var v="y"===u?"top":"left",g="y"===u?"bottom":"right",y="y"===u?"height":"width";o=d[u];var x=d[u]+r[v],O=d[u]-r[g],M=i?-m[y]/2:0,j="start"===f?l[y]:m[y];f="start"===f?-m[y]:-l[y],m=t.elements.arrow,m=i&&m?c(m):{width:0,height:0};var D=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0};v=D[v],g=D[g],m=Math.max(0,Math.min(l[y],m[y])),D=t.modifiersData.offset?t.modifiersData.offset[t.placement][u]:0,j=d[u]+(p?l[y]/2-M-m-v-h:j-m-v-h)-D,p=d[u]+(p?-l[y]/2+M+m+g+h:f+m+g+h)-D,i=Math.max(i?Math.min(x,j):x,Math.min(o,i?Math.max(O,p):O)),d[u]=i,s[u]=i-o}n&&(n=d[a],i=Math.max(n+r["x"===u?"top":"left"],Math.min(n,n-r["x"===u?"bottom":"right"])),t.modifiersData.popperOffsets[a]=i,s[a]=i-n),t.modifiersData[e]=s},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state;e=e.name;var n=r.elements.arrow,o=r.modifiersData.popperOffsets,i=b(r.placement),a=w(i);if(i=0<=["left","right"].indexOf(i)?"height":"width",n){var s=r.modifiersData[e+"#persistent"].padding;n=c(n),o=Math.max(s["y"===a?"top":"left"],Math.min(r.rects.popper[i]/2-n[i]/2+((r.rects.reference[i]+r.rects.reference[a]-o[a]-r.rects.popper[i])/2-(o[a]-r.rects.reference[a])/2),r.rects.popper[i]-n[i]-s["y"===a?"bottom":"right"])),r.modifiersData[e]=((t={})[a]=o,t)}},effect:function(e){var t=e.state,r=e.options;e=e.name;var n=r.element;n=void 0===n?"[data-popper-arrow]":n,r=void 0===(r=r.padding)?0:r,("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&E(t.elements.popper,n)&&(t.elements.arrow=n,t.modifiersData[e+"#persistent"]={padding:W("number"!=typeof r?r:B(r,q))})},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state;e=e.name;var r=t.rects.reference,n=t.rects.popper,o=t.modifiersData.preventOverflow,i=H(t,{elementContext:"reference"}),a=H(t,{altBoundary:!0});r=R(i,r),n=R(a,n,o),o=T(r),a=T(n),t.modifiersData[e]={referenceClippingOffsets:r,popperEscapeOffsets:n,isReferenceHidden:o,hasPopperEscaped:a},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":o,"data-popper-escaped":a})}}],z=x({defaultModifiers:V});e.createPopper=z,e.defaultModifiers=V,e.popperGenerator=x,Object.defineProperty(e,"__esModule",{value:!0})}));
  
  ;
  