PageSourceSearch

https://www.lenoblmus.ru/sites/default/files/js/js_R0OBs-j26KZuW8y7wSP1b0U9eSIqbLJVB4ZcRntFXO0.js

js lenoblmus.ru collected 2026-10-02 06:10:25 UTC 99,791 bytes, 2,618 lines download raw bytes

1let $ = jQuery;
2$( document ).ready(function($) {
3
4    console.log('ready');
5
6    $('.block-opis .btn-more-syst').on('click', function () {
7        $('.block-opis .btn-more-syst-clo').addClass('open');
8        $('.block-opis .btn-more-syst-clo').removeClass('close');
9
10        $('.block-opis .text-syst-block').addClass('close');
11        $('.block-opis .text-syst-block').removeClass('open');
12    });
13
14    $('.block-opis .btn-more-syst-clo').on('click', function () {
15
16        $('.block-opis .btn-more-syst-clo').addClass('close');
17        $('.block-opis .btn-more-syst-clo').removeClass('open');
18
19        $('.block-opis .text-syst-block').addClass('open');
20        $('.block-opis .text-syst-block').removeClass('close');
21    });
22
23
24
25    $('#museum-info .file-link a').text('Скачать прайс-лист на услуги');
26
27
28  //для выделения красным radio buttons на блоках главной станицы
29  $( document ).ajaxComplete(function() {
30    $('input[name="field_profil_target_id"]:checked, input[name="field_kategoriya_ekskursii_target_id"]:checked').parent().css({'color': '#ca1013', 'fontWeight': 'bolder'});
31  });
32  $('input[name="field_profil_target_id"]:checked, input[name="field_kategoriya_ekskursii_target_id"]:checked').parent().css({'color': '#ca1013', 'fontWeight': 'bolder'});
33
34
35
36    //ЦВЕТ ФИРМЕННЫЙ МУЗЕЕВ
37    var color = $('.color').attr('data-color');
38    if (color){
39      console.log(color);
40      $('<style>span.title-material::first-letter{color: ' + color + '}</style>').appendTo('head');
41      $('<style>span.title-material:after{border-color: ' + color + '}</style>').appendTo('head');
42      $('#posetitelyam .path path').css('fill', color);
43      $('#posetitelyam .circle  circle').css('fill', color);
44      $('#posetitelyam .way').css('border-color', color);
45      $('#posetitelyam .way .field-transport-title').css('color', color);
46      $('#posetitelyam .hotels').css('border-color', color);
47      $('#posetitelyam .hotels .double-field-first').css('color', color);
48      $('#posetitelyam .services').css('border-color', color);
49      $('article.muzei #museum-info .nav-tabs li:not(:last-child)').css('border-color', color);
50    }
51
52    $('#edit-visually-impaired-block').html('<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 62.5 34" enable-background="new 0 0 62.5 34" xml:space="preserve">\n' +
53        '              <g>\n' +
54        '\t       <g>\n' +
55        '\t\t<path fill="#181716" d="M30.8,0c1,0,2,0,2.9,0c0.2,0,0.4,0.1,0.6,0.1c2.7,0.2,5.4,0.7,7.9,1.8c4.8,2,9.2,4.5,13.1,7.9\n' +
56        '\t\t\tc2.5,2.2,5,4.4,7,7.1c0.2,0.2,0.3,0.4,0.1,0.7c-0.8,1.1-1.6,2.3-2.5,3.4C56,25.3,51.2,28.6,45.8,31c-4.8,2.1-9.8,3.1-15.1,3\n' +
57        '\t\t\tc-1.5,0-3.1-0.3-4.6-0.5c-3.4-0.5-6.7-1.4-9.7-3c-5.6-2.9-10.3-6.8-14.2-11.7C1.4,17.9,0.7,16.9,0,16c0,0,0-0.1,0-0.1\n' +
58        '\t\t\tc0.1-0.1,0.3-0.2,0.4-0.3c4-4.6,8.5-8.4,13.9-11.2c4.2-2.2,8.6-3.5,13.2-4C28.6,0.3,29.7,0.1,30.8,0z M18,15\n' +
59        '\t\t\tc0.6,0.1,1.2,0.2,1.7,0.3c0.3,0.1,0.4,0.2,0.3,0.5c-0.5,6.5,4.3,12.3,10.7,12.9c7.8,0.7,14.2-6,13-13.7c-1.2-8.4-10.8-12.9-18-8.5\n' +
60        '\t\t\tc-0.4,0.2-0.8,0.5-1.2,0.8c-0.5-0.6-0.9-1.1-1.4-1.8c1.2-0.7,2.3-1.3,3.6-2.1C17.9,4.9,11.2,9.6,5.5,16.2c1.4,1.6,2.6,3.2,4,4.7\n' +
61        '\t\t\tc2.3,2.5,5,4.6,7.9,6.3c3.2,1.9,6.7,3,10.4,3.5c1.1,0.2,2.2,0.2,3.3,0.3C21.9,30.3,16.8,21.8,18,15z M34.9,30.7\n' +
62        '\t\t\tc4.3-0.4,8.2-1.9,11.9-4c4.2-2.4,7.7-5.4,10.4-9.6C51.9,10.9,45.7,6.2,37.9,3.8c6,3.3,9.1,8.3,8,15.2C45,25.3,41,29.1,34.9,30.7z"></path>\n' +
63        '\t\t<path fill="#181716" d="M23.4,16c3.2,0.6,6.4,1.3,9.6,1.9c0,0,0-0.1,0.1-0.1c-2.1-2.6-4.2-5.2-6.3-7.8c2.6-2.1,7-2.5,10.3,0\n' +
64        '\t\t\tc3.3,2.6,4.3,7.1,2.3,10.7c-2,3.7-6.2,5.4-10.2,4.1C25.4,23.7,22.9,19.8,23.4,16z"></path>\n' +
65        '\t      </g>\n' +
66        '            </g>\n' +
67        '          </svg>');
68
69    //Блок для слабовидящих
70     $('#block-visuallyimpairedblock').appendTo('#eye-wrapper');
71
72
73    //Фикс checkbox на странице товара
74    $( document ).ajaxComplete(function() {
75        if($('.form-item-purchased-entity-0-attributes-attribute-size input:checked').length == 0){
76            $('.form-item-purchased-entity-0-attributes-attribute-size:first-child input').prop('checked', 'true');
77        }
78    });
79
80    //iframe билеты музея
81    $('.page-node-type-muzei a.unifd__close').click(()=>{
82       $('.page-node-type-muzei .curtain').css('display', 'none');
83       $('.page-node-type-muzei .unifd__in').css('display', 'none');
84    });
85    $('.page-node-type-muzei a.unifd__open').click(()=>{
86        $('.page-node-type-muzei .curtain').css('display', 'block');
87        $('.page-node-type-muzei .unifd__in').css('display', 'block');
88    });
89
90    //Номер телефона в форме заказа
91    $('.iti__selected-flag').trigger("click");
92    $('#iti-item-ru').trigger("click");
93    $('#edit-payment-information-billing-information-field-no-0-value').blur();
94
95    if ($('#block-pushkinskayakartavmuzeyakhlenoblasti').length ) {
96      var h = $('#block-views-block-o-nas-na-glavnoy-block-1').height()
97      $('#block-pushkinskayakartavmuzeyakhlenoblasti').height(h)
98    }
99});
100
101
102
103
104
105;
106/**
107 * @file
108 * Drupal Bootstrap object.
109 */
110
111/**
112 * All Drupal Bootstrap JavaScript APIs are contained in this namespace.
113 *
114 * @param {underscore} _
115 * @param {jQuery} $
116 * @param {Drupal} Drupal
117 * @param {drupalSettings} drupalSettings
118 */
119(function (_, $, Drupal, drupalSettings) {
120  'use strict';
121
122  /**
123   * @typedef Drupal.bootstrap
124   */
125  var Bootstrap = {
126    processedOnce: {},
127    settings: drupalSettings.bootstrap || {}
128  };
129
130  /**
131   * Wraps Drupal.checkPlain() to ensure value passed isn't empty.
132   *
133   * Encodes special characters in a plain-text string for display as HTML.
134   *
135   * @param {string} str
136   *   The string to be encoded.
137   *
138   * @return {string}
139   *   The encoded string.
140   *
141   * @ingroup sanitization
142   */
143  Bootstrap.checkPlain = function (str) {
144    return str && Drupal.checkPlain(str) || '';
145  };
146
147  /**
148   * Creates a jQuery plugin.
149   *
150   * @param {String} id
151   *   A jQuery plugin identifier located in $.fn.
152   * @param {Function} plugin
153   *   A constructor function used to initialize the for the jQuery plugin.
154   * @param {Boolean} [noConflict]
155   *   Flag indicating whether or not to create a ".noConflict()" helper method
156   *   for the plugin.
157   */
158  Bootstrap.createPlugin = function (id, plugin, noConflict) {
159    // Immediately return if plugin doesn't exist.
160    if ($.fn[id] !== void 0) {
161      return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.', {'@id': id});
162    }
163
164    // Immediately return if plugin isn't a function.
165    if (typeof plugin !== 'function') {
166      return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin', {'@id': id, '@plugin':  plugin});
167    }
168
169    // Add a ".noConflict()" helper method.
170    this.pluginNoConflict(id, plugin, noConflict);
171
172    $.fn[id] = plugin;
173  };
174
175  /**
176   * Diff object properties.
177   *
178   * @param {...Object} objects
179   *   Two or more objects. The first object will be used to return properties
180   *   values.
181   *
182   * @return {Object}
183   *   Returns the properties of the first passed object that are not present
184   *   in all other passed objects.
185   */
186  Bootstrap.diffObjects = function (objects) {
187    var args = Array.prototype.slice.call(arguments);
188    return _.pick(args[0], _.difference.apply(_, _.map(args, function (obj) {
189      return Object.keys(obj);
190    })));
191  };
192
193  /**
194   * Map of supported events by regular expression.
195   *
196   * @type {Object<Event|MouseEvent|KeyboardEvent|TouchEvent,RegExp>}
197   */
198  Bootstrap.eventMap = {
199    Event: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
200    MouseEvent: /^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/,
201    KeyboardEvent: /^(?:key(?:down|press|up))$/,
202    TouchEvent: /^(?:touch(?:start|end|move|cancel))$/
203  };
204
205  /**
206   * Extends a jQuery Plugin.
207   *
208   * @param {String} id
209   *   A jQuery plugin identifier located in $.fn.
210   * @param {Function} callback
211   *   A constructor function used to initialize the for the jQuery plugin.
212   *
213   * @return {Function|Boolean}
214   *   The jQuery plugin constructor or FALSE if the plugin does not exist.
215   */
216  Bootstrap.extendPlugin = function (id, callback) {
217    // Immediately return if plugin doesn't exist.
218    if (typeof $.fn[id] !== 'function') {
219      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
220    }
221
222    // Immediately return if callback isn't a function.
223    if (typeof callback !== 'function') {
224      return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback', {'@id': id, '@callback':  callback});
225    }
226
227    // Determine existing plugin constructor.
228    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
229    var plugin = callback.apply(constructor, [this.settings]);
230    if (!$.isPlainObject(plugin)) {
231      return this.fatal('Returned value from callback is not a plain object that can be used to extend the jQuery plugin "@id": @obj', {'@obj':  plugin});
232    }
233
234    this.wrapPluginConstructor(constructor, plugin, true);
235
236    return $.fn[id];
237  };
238
239  Bootstrap.superWrapper = function (parent, fn) {
240    return function () {
241      var previousSuper = this.super;
242      this.super = parent;
243      var ret = fn.apply(this, arguments);
244      if (previousSuper) {
245        this.super = previousSuper;
246      }
247      else {
248        delete this.super;
249      }
250      return ret;
251    };
252  };
253
254  /**
255   * Provide a helper method for displaying when something is went wrong.
256   *
257   * @param {String} message
258   *   The message to display.
259   * @param {Object} [args]
260   *   An arguments to use in message.
261   *
262   * @return {Boolean}
263   *   Always returns FALSE.
264   */
265  Bootstrap.fatal = function (message, args) {
266    if (this.settings.dev && console.warn) {
267      for (var name in args) {
268        if (args.hasOwnProperty(name) && typeof args[name] === 'object') {
269          args[name] = JSON.stringify(args[name]);
270        }
271      }
272      Drupal.throwError(new Error(Drupal.formatString(message, args)));
273    }
274    return false;
275  };
276
277  /**
278   * Intersects object properties.
279   *
280   * @param {...Object} objects
281   *   Two or more objects. The first object will be used to return properties
282   *   values.
283   *
284   * @return {Object}
285   *   Returns the properties of first passed object that intersects with all
286   *   other passed objects.
287   */
288  Bootstrap.intersectObjects = function (objects) {
289    var args = Array.prototype.slice.call(arguments);
290    return _.pick(args[0], _.intersection.apply(_, _.map(args, function (obj) {
291      return Object.keys(obj);
292    })));
293  };
294
295  /**
296   * Normalizes an object's values.
297   *
298   * @param {Object} obj
299   *   The object to normalize.
300   *
301   * @return {Object}
302   *   The normalized object.
303   */
304  Bootstrap.normalizeObject = function (obj) {
305    if (!$.isPlainObject(obj)) {
306      return obj;
307    }
308
309    for (var k in obj) {
310      if (typeof obj[k] === 'string') {
311        if (obj[k] === 'true') {
312          obj[k] = true;
313        }
314        else if (obj[k] === 'false') {
315          obj[k] = false;
316        }
317        else if (obj[k].match(/^[\d-.]$/)) {
318          obj[k] = parseFloat(obj[k]);
319        }
320      }
321      else if ($.isPlainObject(obj[k])) {
322        obj[k] = Bootstrap.normalizeObject(obj[k]);
323      }
324    }
325
326    return obj;
327  };
328
329  /**
330   * An object based once plugin (similar to jquery.once, but without the DOM).
331   *
332   * @param {String} id
333   *   A unique identifier.
334   * @param {Function} callback
335   *   The callback to invoke if the identifier has not yet been seen.
336   *
337   * @return {Bootstrap}
338   */
339  Bootstrap.once = function (id, callback) {
340    // Immediately return if identifier has already been processed.
341    if (this.processedOnce[id]) {
342      return this;
343    }
344    callback.call(this, this.settings);
345    this.processedOnce[id] = true;
346    return this;
347  };
348
349  /**
350   * Provide jQuery UI like ability to get/set options for Bootstrap plugins.
351   *
352   * @param {string|object} key
353   *   A string value of the option to set, can be dot like to a nested key.
354   *   An object of key/value pairs.
355   * @param {*} [value]
356   *   (optional) A value to set for key.
357   *
358   * @returns {*}
359   *   - Returns nothing if key is an object or both key and value parameters
360   *   were provided to set an option.
361   *   - Returns the a value for a specific setting if key was provided.
362   *   - Returns an object of key/value pairs of all the options if no key or
363   *   value parameter was provided.
364   *
365   * @see https://github.com/jquery/jquery-ui/blob/master/ui/widget.js
366   */
367  Bootstrap.option = function (key, value) {
368    var options = $.isPlainObject(key) ? $.extend({}, key) : {};
369
370    // Get all options (clone so it doesn't reference the internal object).
371    if (arguments.length === 0) {
372      return $.extend({}, this.options);
373    }
374
375    // Get/set single option.
376    if (typeof key === "string") {
377      // Handle nested keys in dot notation.
378      // e.g., "foo.bar" => { foo: { bar: true } }
379      var parts = key.split('.');
380      key = parts.shift();
381      var obj = options;
382      if (parts.length) {
383        for (var i = 0; i < parts.length - 1; i++) {
384          obj[parts[i]] = obj[parts[i]] || {};
385          obj = obj[parts[i]];
386        }
387        key = parts.pop();
388      }
389
390      // Get.
391      if (arguments.length === 1) {
392        return obj[key] === void 0 ? null : obj[key];
393      }
394
395      // Set.
396      obj[key] = value;
397    }
398
399    // Set multiple options.
400    $.extend(true, this.options, options);
401  };
402
403  /**
404   * Adds a ".noConflict()" helper method if needed.
405   *
406   * @param {String} id
407   *   A jQuery plugin identifier located in $.fn.
408   * @param {Function} plugin
409   * @param {Function} plugin
410   *   A constructor function used to initialize the for the jQuery plugin.
411   * @param {Boolean} [noConflict]
412   *   Flag indicating whether or not to create a ".noConflict()" helper method
413   *   for the plugin.
414   */
415  Bootstrap.pluginNoConflict = function (id, plugin, noConflict) {
416    if (plugin.noConflict === void 0 && (noConflict === void 0 || noConflict)) {
417      var old = $.fn[id];
418      plugin.noConflict = function () {
419        $.fn[id] = old;
420        return this;
421      };
422    }
423  };
424
425  /**
426   * Creates a handler that relays to another event name.
427   *
428   * @param {HTMLElement|jQuery} target
429   *   A target element.
430   * @param {String} name
431   *   The name of the event to trigger.
432   * @param {Boolean} [stopPropagation=true]
433   *   Flag indicating whether to stop the propagation of the event, defaults
434   *   to true.
435   *
436   * @return {Function}
437   *   An even handler callback function.
438   */
439  Bootstrap.relayEvent = function (target, name, stopPropagation) {
440    return function (e) {
441      if (stopPropagation === void 0 || stopPropagation) {
442        e.stopPropagation();
443      }
444      var $target = $(target);
445      var parts = name.split('.').filter(Boolean);
446      var type = parts.shift();
447      e.target = $target[0];
448      e.currentTarget = $target[0];
449      e.namespace = parts.join('.');
450      e.type = type;
451      $target.trigger(e);
452    };
453  };
454
455  /**
456   * Replaces a Bootstrap jQuery plugin definition.
457   *
458   * @param {String} id
459   *   A jQuery plugin identifier located in $.fn.
460   * @param {Function} callback
461   *   A callback function that is immediately invoked and must return a
462   *   function that will be used as the plugin constructor.
463   * @param {Boolean} [noConflict]
464   *   Flag indicating whether or not to create a ".noConflict()" helper method
465   *   for the plugin.
466   */
467  Bootstrap.replacePlugin = function (id, callback, noConflict) {
468    // Immediately return if plugin doesn't exist.
469    if (typeof $.fn[id] !== 'function') {
470      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
471    }
472
473    // Immediately return if callback isn't a function.
474    if (typeof callback !== 'function') {
475      return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback', {'@callback': callback});
476    }
477
478    // Determine existing plugin constructor.
479    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
480    var plugin = callback.apply(constructor, [this.settings]);
481
482    // Immediately return if plugin isn't a function.
483    if (typeof plugin !== 'function') {
484      return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin});
485    }
486
487    this.wrapPluginConstructor(constructor, plugin);
488
489    // Add a ".noConflict()" helper method.
490    this.pluginNoConflict(id, plugin, noConflict);
491
492    $.fn[id] = plugin;
493  };
494
495  /**
496   * Simulates a native event on an element in the browser.
497   *
498   * Note: This is a fairly complete modern implementation. If things aren't
499   * working quite the way you intend (in older browsers), you may wish to use
500   * the jQuery.simulate plugin. If it's available, this method will defer to
501   * that plugin.
502   *
503   * @see https://github.com/jquery/jquery-simulate
504   *
505   * @param {HTMLElement|jQuery} element
506   *   A DOM element to dispatch event on. Note: this may be a jQuery object,
507   *   however be aware that this will trigger the same event for each element
508   *   inside the jQuery collection; use with caution.
509   * @param {String|String[]} type
510   *   The type(s) of event to simulate.
511   * @param {Object} [options]
512   *   An object of options to pass to the event constructor. Typically, if
513   *   an event is being proxied, you should just pass the original event
514   *   object here. This allows, if the browser supports it, to be a truly
515   *   simulated event.
516   *
517   * @return {Boolean}
518   *   The return value is false if event is cancelable and at least one of the
519   *   event handlers which handled this event called Event.preventDefault().
520   *   Otherwise it returns true.
521   */
522  Bootstrap.simulate = function (element, type, options) {
523    // Handle jQuery object wrappers so it triggers on each element.
524    var ret = true;
525    if (element instanceof $) {
526      element.each(function () {
527        if (!Bootstrap.simulate(this, type, options)) {
528          ret = false;
529        }
530      });
531      return ret;
532    }
533
534    if (!(element instanceof HTMLElement)) {
535      this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.', {
536        '@type': typeof element,
537      });
538    }
539
540    // Defer to the jQuery.simulate plugin, if it's available.
541    if (typeof $.simulate === 'function') {
542      new $.simulate(element, type, options);
543      return true;
544    }
545
546    var event;
547    var ctor;
548    var types = [].concat(type);
549    for (var i = 0, l = types.length; i < l; i++) {
550      type = types[i];
551      for (var name in this.eventMap) {
552        if (this.eventMap[name].test(type)) {
553          ctor = name;
554          break;
555        }
556      }
557      if (!ctor) {
558        throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: ' + type);
559      }
560      var opts = {bubbles: true, cancelable: true};
561      if (ctor === 'KeyboardEvent' || ctor === 'MouseEvent') {
562        $.extend(opts, {ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1});
563      }
564      if (ctor === 'MouseEvent') {
565        $.extend(opts, {button: 0, pointerX: 0, pointerY: 0, view: window});
566      }
567      if (options) {
568        $.extend(opts, options);
569      }
570      if (typeof window[ctor] === 'function') {
571        event = new window[ctor](type, opts);
572        if (!element.dispatchEvent(event)) {
573          ret = false;
574        }
575      }
576      else if (document.createEvent) {
577        event = document.createEvent(ctor);
578        event.initEvent(type, opts.bubbles, opts.cancelable);
579        if (!element.dispatchEvent(event)) {
580          ret = false;
581        }
582      }
583      else if (typeof element.fireEvent === 'function') {
584        event = $.extend(document.createEventObject(), opts);
585        if (!element.fireEvent('on' + type, event)) {
586          ret = false;
587        }
588      }
589      else if (typeof element[type]) {
590        element[type]();
591      }
592    }
593    return ret;
594  };
595
596  /**
597   * Strips HTML and returns just text.
598   *
599   * @param {String|Element|jQuery} html
600   *   A string of HTML content, an Element DOM object or a jQuery object.
601   *
602   * @return {String}
603   *   The text without HTML tags.
604   *
605   * @todo Replace with http://locutus.io/php/strings/strip_tags/
606   */
607  Bootstrap.stripHtml = function (html) {
608    if (html instanceof $) {
609      html = html.html();
610    }
611    else if (html instanceof Element) {
612      html = html.innerHTML;
613    }
614    var tmp = document.createElement('DIV');
615    tmp.innerHTML = html;
616    return (tmp.textContent || tmp.innerText || '').replace(/^[\s\n\t]*|[\s\n\t]*$/, '');
617  };
618
619  /**
620   * Provide a helper method for displaying when something is unsupported.
621   *
622   * @param {String} type
623   *   The type of unsupported object, e.g. method or option.
624   * @param {String} name
625   *   The name of the unsupported object.
626   * @param {*} [value]
627   *   The value of the unsupported object.
628   */
629  Bootstrap.unsupported = function (type, name, value) {
630    Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value', {
631      '@type': type,
632      '@name': name,
633      '@value': typeof value === 'object' ? JSON.stringify(value) : value
634    });
635  };
636
637  /**
638   * Provide a helper method to display a warning.
639   *
640   * @param {String} message
641   *   The message to display.
642   * @param {Object} [args]
643   *   Arguments to use as replacements in Drupal.formatString.
644   */
645  Bootstrap.warn = function (message, args) {
646    if (this.settings.dev && console.warn) {
647      console.warn(Drupal.formatString(message, args));
648    }
649  };
650
651  /**
652   * Wraps a plugin with common functionality.
653   *
654   * @param {Function} constructor
655   *   A plugin constructor being wrapped.
656   * @param {Object|Function} plugin
657   *   The plugin being wrapped.
658   * @param {Boolean} [extend = false]
659   *   Whether to add super extensibility.
660   */
661  Bootstrap.wrapPluginConstructor = function (constructor, plugin, extend) {
662    var proto = constructor.prototype;
663
664    // Add a jQuery UI like option getter/setter method.
665    var option = this.option;
666    if (proto.option === void(0)) {
667      proto.option = function () {
668        return option.apply(this, arguments);
669      };
670    }
671
672    if (extend) {
673      // Handle prototype properties separately.
674      if (plugin.prototype !== void 0) {
675        for (var key in plugin.prototype) {
676          if (!plugin.prototype.hasOwnProperty(key)) continue;
677          var value = plugin.prototype[key];
678          if (typeof value === 'function') {
679            proto[key] = this.superWrapper(proto[key] || function () {}, value);
680          }
681          else {
682            proto[key] = $.isPlainObject(value) ? $.extend(true, {}, proto[key], value) : value;
683          }
684        }
685      }
686      delete plugin.prototype;
687
688      // Handle static properties.
689      for (key in plugin) {
690        if (!plugin.hasOwnProperty(key)) continue;
691        value = plugin[key];
692        if (typeof value === 'function') {
693          constructor[key] = this.superWrapper(constructor[key] || function () {}, value);
694        }
695        else {
696          constructor[key] = $.isPlainObject(value) ? $.extend(true, {}, constructor[key], value) : value;
697        }
698      }
699    }
700  };
701
702  // Add Bootstrap to the global Drupal object.
703  Drupal.bootstrap = Drupal.bootstrap || Bootstrap;
704
705})(window._, window.jQuery, window.Drupal, window.drupalSettings);
706;
707(function ($, _) {
708
709  /**
710   * @class Attributes
711   *
712   * Modifies attributes.
713   *
714   * @param {Object|Attributes} attributes
715   *   An object to initialize attributes with.
716   */
717  var Attributes = function (attributes) {
718    this.data = {};
719    this.data['class'] = [];
720    this.merge(attributes);
721  };
722
723  /**
724   * Renders the attributes object as a string to inject into an HTML element.
725   *
726   * @return {String}
727   *   A rendered string suitable for inclusion in HTML markup.
728   */
729  Attributes.prototype.toString = function () {
730    var output = '';
731    var name, value;
732    var checkPlain = function (str) {
733      return str && str.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;') || '';
734    };
735    var data = this.getData();
736    for (name in data) {
737      if (!data.hasOwnProperty(name)) continue;
738      value = data[name];
739      if (_.isFunction(value)) value = value();
740      if (_.isObject(value)) value = _.values(value);
741      if (_.isArray(value)) value = value.join(' ');
742      output += ' ' + checkPlain(name) + '="' + checkPlain(value) + '"';
743    }
744    return output;
745  };
746
747  /**
748   * Renders the Attributes object as a plain object.
749   *
750   * @return {Object}
751   *   A plain object suitable for inclusion in DOM elements.
752   */
753  Attributes.prototype.toPlainObject = function () {
754    var object = {};
755    var name, value;
756    var data = this.getData();
757    for (name in data) {
758      if (!data.hasOwnProperty(name)) continue;
759      value = data[name];
760      if (_.isFunction(value)) value = value();
761      if (_.isObject(value)) value = _.values(value);
762      if (_.isArray(value)) value = value.join(' ');
763      object[name] = value;
764    }
765    return object;
766  };
767
768  /**
769   * Add class(es) to the array.
770   *
771   * @param {string|Array} value
772   *   An individual class or an array of classes to add.
773   *
774   * @return {Attributes}
775   *
776   * @chainable
777   */
778  Attributes.prototype.addClass = function (value) {
779    var args = Array.prototype.slice.call(arguments);
780    this.data['class'] = this.sanitizeClasses(this.data['class'].concat(args));
781    return this;
782  };
783
784  /**
785   * Returns whether the requested attribute exists.
786   *
787   * @param {string} name
788   *   An attribute name to check.
789   *
790   * @return {boolean}
791   *   TRUE or FALSE
792   */
793  Attributes.prototype.exists = function (name) {
794    return this.data[name] !== void(0) && this.data[name] !== null;
795  };
796
797  /**
798   * Retrieve a specific attribute from the array.
799   *
800   * @param {string} name
801   *   The specific attribute to retrieve.
802   * @param {*} defaultValue
803   *   (optional) The default value to set if the attribute does not exist.
804   *
805   * @return {*}
806   *   A specific attribute value, passed by reference.
807   */
808  Attributes.prototype.get = function (name, defaultValue) {
809    if (!this.exists(name)) this.data[name] = defaultValue;
810    return this.data[name];
811  };
812
813  /**
814   * Retrieves a cloned copy of the internal attributes data object.
815   *
816   * @return {Object}
817   */
818  Attributes.prototype.getData = function () {
819    return _.extend({}, this.data);
820  };
821
822  /**
823   * Retrieves classes from the array.
824   *
825   * @return {Array}
826   *   The classes array.
827   */
828  Attributes.prototype.getClasses = function () {
829    return this.get('class', []);
830  };
831
832  /**
833   * Indicates whether a class is present in the array.
834   *
835   * @param {string|Array} className
836   *   The class(es) to search for.
837   *
838   * @return {boolean}
839   *   TRUE or FALSE
840   */
841  Attributes.prototype.hasClass = function (className) {
842    className = this.sanitizeClasses(Array.prototype.slice.call(arguments));
843    var classes = this.getClasses();
844    for (var i = 0, l = className.length; i < l; i++) {
845      // If one of the classes fails, immediately return false.
846      if (_.indexOf(classes, className[i]) === -1) {
847        return false;
848      }
849    }
850    return true;
851  };
852
853  /**
854   * Merges multiple values into the array.
855   *
856   * @param {Attributes|Node|jQuery|Object} object
857   *   An Attributes object with existing data, a Node DOM element, a jQuery
858   *   instance or a plain object where the key is the attribute name and the
859   *   value is the attribute value.
860   * @param {boolean} [recursive]
861   *   Flag determining whether or not to recursively merge key/value pairs.
862   *
863   * @return {Attributes}
864   *
865   * @chainable
866   */
867  Attributes.prototype.merge = function (object, recursive) {
868    // Immediately return if there is nothing to merge.
869    if (!object) {
870      return this;
871    }
872
873    // Get attributes from a jQuery element.
874    if (object instanceof $) {
875      object = object[0];
876    }
877
878    // Get attributes from a DOM element.
879    if (object instanceof Node) {
880      object = Array.prototype.slice.call(object.attributes).reduce(function (attributes, attribute) {
881        attributes[attribute.name] = attribute.value;
882        return attributes;
883      }, {});
884    }
885    // Get attributes from an Attributes instance.
886    else if (object instanceof Attributes) {
887      object = object.getData();
888    }
889    // Otherwise, clone the object.
890    else {
891      object = _.extend({}, object);
892    }
893
894    // By this point, there should be a valid plain object.
895    if (!$.isPlainObject(object)) {
896      setTimeout(function () {
897        throw new Error('Passed object is not supported: ' + object);
898      });
899      return this;
900    }
901
902    // Handle classes separately.
903    if (object && object['class'] !== void 0) {
904      this.addClass(object['class']);
905      delete object['class'];
906    }
907
908    if (recursive === void 0 || recursive) {
909      this.data = $.extend(true, {}, this.data, object);
910    }
911    else {
912      this.data = $.extend({}, this.data, object);
913    }
914
915    return this;
916  };
917
918  /**
919   * Removes an attribute from the array.
920   *
921   * @param {string} name
922   *   The name of the attribute to remove.
923   *
924   * @return {Attributes}
925   *
926   * @chainable
927   */
928  Attributes.prototype.remove = function (name) {
929    if (this.exists(name)) delete this.data[name];
930    return this;
931  };
932
933  /**
934   * Removes a class from the attributes array.
935   *
936   * @param {...string|Array} className
937   *   An individual class or an array of classes to remove.
938   *
939   * @return {Attributes}
940   *
941   * @chainable
942   */
943  Attributes.prototype.removeClass = function (className) {
944    var remove = this.sanitizeClasses(Array.prototype.slice.apply(arguments));
945    this.data['class'] = _.without(this.getClasses(), remove);
946    return this;
947  };
948
949  /**
950   * Replaces a class in the attributes array.
951   *
952   * @param {string} oldValue
953   *   The old class to remove.
954   * @param {string} newValue
955   *   The new class. It will not be added if the old class does not exist.
956   *
957   * @return {Attributes}
958   *
959   * @chainable
960   */
961  Attributes.prototype.replaceClass = function (oldValue, newValue) {
962    var classes = this.getClasses();
963    var i = _.indexOf(this.sanitizeClasses(oldValue), classes);
964    if (i >= 0) {
965      classes[i] = newValue;
966      this.set('class', classes);
967    }
968    return this;
969  };
970
971  /**
972   * Ensures classes are flattened into a single is an array and sanitized.
973   *
974   * @param {...String|Array} classes
975   *   The class or classes to sanitize.
976   *
977   * @return {Array}
978   *   A sanitized array of classes.
979   */
980  Attributes.prototype.sanitizeClasses = function (classes) {
981    return _.chain(Array.prototype.slice.call(arguments))
982      // Flatten in case there's a mix of strings and arrays.
983      .flatten()
984
985      // Split classes that may have been added with a space as a separator.
986      .map(function (string) {
987        return string.split(' ');
988      })
989
990      // Flatten again since it was just split into arrays.
991      .flatten()
992
993      // Filter out empty items.
994      .filter()
995
996      // Clean the class to ensure it's a valid class name.
997      .map(function (value) {
998        return Attributes.cleanClass(value);
999      })
1000
1001      // Ensure classes are unique.
1002      .uniq()
1003
1004      // Retrieve the final value.
1005      .value();
1006  };
1007
1008  /**
1009   * Sets an attribute on the array.
1010   *
1011   * @param {string} name
1012   *   The name of the attribute to set.
1013   * @param {*} value
1014   *   The value of the attribute to set.
1015   *
1016   * @return {Attributes}
1017   *
1018   * @chainable
1019   */
1020  Attributes.prototype.set = function (name, value) {
1021    var obj = $.isPlainObject(name) ? name : {};
1022    if (typeof name === 'string') {
1023      obj[name] = value;
1024    }
1025    return this.merge(obj);
1026  };
1027
1028  /**
1029   * Prepares a string for use as a CSS identifier (element, class, or ID name).
1030   *
1031   * Note: this is essentially a direct copy from
1032   * \Drupal\Component\Utility\Html::cleanCssIdentifier
1033   *
1034   * @param {string} identifier
1035   *   The identifier to clean.
1036   * @param {Object} [filter]
1037   *   An object of string replacements to use on the identifier.
1038   *
1039   * @return {string}
1040   *   The cleaned identifier.
1041   */
1042  Attributes.cleanClass = function (identifier, filter) {
1043    filter = filter || {
1044      ' ': '-',
1045      '_': '-',
1046      '/': '-',
1047      '[': '-',
1048      ']': ''
1049    };
1050
1051    identifier = identifier.toLowerCase();
1052
1053    if (filter['__'] === void 0) {
1054      identifier = identifier.replace('__', '#DOUBLE_UNDERSCORE#');
1055    }
1056
1057    identifier = identifier.replace(Object.keys(filter), Object.keys(filter).map(function(key) { return filter[key]; }));
1058
1059    if (filter['__'] === void 0) {
1060      identifier = identifier.replace('#DOUBLE_UNDERSCORE#', '__');
1061    }
1062
1063    identifier = identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g, '');
1064    identifier = identifier.replace(['/^[0-9]/', '/^(-[0-9])|^(--)/'], ['_', '__']);
1065
1066    return identifier;
1067  };
1068
1069  /**
1070   * Creates an Attributes instance.
1071   *
1072   * @param {object|Attributes} [attributes]
1073   *   An object to initialize attributes with.
1074   *
1075   * @return {Attributes}
1076   *   An Attributes instance.
1077   *
1078   * @constructor
1079   */
1080  Attributes.create = function (attributes) {
1081    return new Attributes(attributes);
1082  };
1083
1084  window.Attributes = Attributes;
1085
1086})(window.jQuery, window._);
1087;
1088/**
1089 * @file
1090 * Theme hooks for the Drupal Bootstrap base theme.
1091 */
1092(function ($, Drupal, Bootstrap, Attributes) {
1093
1094  /**
1095   * Fallback for theming an icon if the Icon API module is not installed.
1096   */
1097  if (!Drupal.icon) Drupal.icon = { bundles: {} };
1098  if (!Drupal.theme.icon || Drupal.theme.prototype.icon) {
1099    $.extend(Drupal.theme, /** @lends Drupal.theme */ {
1100      /**
1101       * Renders an icon.
1102       *
1103       * @param {string} bundle
1104       *   The bundle which the icon belongs to.
1105       * @param {string} icon
1106       *   The name of the icon to render.
1107       * @param {object|Attributes} [attributes]
1108       *   An object of attributes to also apply to the icon.
1109       *
1110       * @returns {string}
1111       */
1112      icon: function (bundle, icon, attributes) {
1113        if (!Drupal.icon.bundles[bundle]) return '';
1114        attributes = Attributes.create(attributes).addClass('icon').set('aria-hidden', 'true');
1115        icon = Drupal.icon.bundles[bundle](icon, attributes);
1116        return '<span' + attributes + '></span>';
1117      }
1118    });
1119  }
1120
1121  /**
1122   * Callback for modifying an icon in the "bootstrap" icon bundle.
1123   *
1124   * @param {string} icon
1125   *   The icon being rendered.
1126   * @param {Attributes} attributes
1127   *   Attributes object for the icon.
1128   */
1129  Drupal.icon.bundles.bootstrap = function (icon, attributes) {
1130    attributes.addClass(['glyphicon', 'glyphicon-' + icon]);
1131  };
1132
1133  /**
1134   * Add necessary theming hooks.
1135   */
1136  $.extend(Drupal.theme, /** @lends Drupal.theme */ {
1137
1138    /**
1139     * Renders a Bootstrap AJAX glyphicon throbber.
1140     *
1141     * @returns {string}
1142     */
1143    ajaxThrobber: function () {
1144      return Drupal.theme('bootstrapIcon', 'refresh', {'class': ['ajax-throbber', 'glyphicon-spin'] });
1145    },
1146
1147    /**
1148     * Renders a button element.
1149     *
1150     * @param {object|Attributes} attributes
1151     *   An object of attributes to apply to the button. If it contains one of:
1152     *   - value: The label of the button.
1153     *   - context: The context type of Bootstrap button, can be one of:
1154     *     - default
1155     *     - primary
1156     *     - success
1157     *     - info
1158     *     - warning
1159     *     - danger
1160     *     - link
1161     *
1162     * @returns {string}
1163     */
1164    button: function (attributes) {
1165      attributes = Attributes.create(attributes).addClass('btn');
1166      var context = attributes.get('context', 'default');
1167      var label = attributes.get('value', '');
1168      attributes.remove('context').remove('value');
1169      if (!attributes.hasClass(['btn-default', 'btn-primary', 'btn-success', 'btn-info', 'btn-warning', 'btn-danger', 'btn-link'])) {
1170        attributes.addClass('btn-' + Bootstrap.checkPlain(context));
1171      }
1172
1173      // Attempt to, intelligently, provide a default button "type".
1174      if (!attributes.exists('type')) {
1175        attributes.set('type', attributes.hasClass('form-submit') ? 'submit' : 'button');
1176      }
1177
1178      return '<button' + attributes + '>' + label + '</button>';
1179    },
1180
1181    /**
1182     * Alias for "button" theme hook.
1183     *
1184     * @param {object|Attributes} attributes
1185     *   An object of attributes to apply to the button.
1186     *
1187     * @see Drupal.theme.button()
1188     *
1189     * @returns {string}
1190     */
1191    btn: function (attributes) {
1192      return Drupal.theme('button', attributes);
1193    },
1194
1195    /**
1196     * Renders a button block element.
1197     *
1198     * @param {object|Attributes} attributes
1199     *   An object of attributes to apply to the button.
1200     *
1201     * @see Drupal.theme.button()
1202     *
1203     * @returns {string}
1204     */
1205    'btn-block': function (attributes) {
1206      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-block'));
1207    },
1208
1209    /**
1210     * Renders a large button element.
1211     *
1212     * @param {object|Attributes} attributes
1213     *   An object of attributes to apply to the button.
1214     *
1215     * @see Drupal.theme.button()
1216     *
1217     * @returns {string}
1218     */
1219    'btn-lg': function (attributes) {
1220      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-lg'));
1221    },
1222
1223    /**
1224     * Renders a small button element.
1225     *
1226     * @param {object|Attributes} attributes
1227     *   An object of attributes to apply to the button.
1228     *
1229     * @see Drupal.theme.button()
1230     *
1231     * @returns {string}
1232     */
1233    'btn-sm': function (attributes) {
1234      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-sm'));
1235    },
1236
1237    /**
1238     * Renders an extra small button element.
1239     *
1240     * @param {object|Attributes} attributes
1241     *   An object of attributes to apply to the button.
1242     *
1243     * @see Drupal.theme.button()
1244     *
1245     * @returns {string}
1246     */
1247    'btn-xs': function (attributes) {
1248      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-xs'));
1249    },
1250
1251    /**
1252     * Renders a glyphicon.
1253     *
1254     * @param {string} name
1255     *   The name of the glyphicon.
1256     * @param {object|Attributes} [attributes]
1257     *   An object of attributes to apply to the icon.
1258     *
1259     * @returns {string}
1260     */
1261    bootstrapIcon: function (name, attributes) {
1262      return Drupal.theme('icon', 'bootstrap', name, attributes);
1263    }
1264
1265  });
1266
1267})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes);
1268;
1269/*! js-cookie v3.0.0-rc.0 | MIT */
1270!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e=e||self,function(){var r=e.Cookies,n=e.Cookies=t();n.noConflict=function(){return e.Cookies=r,n}}())}(this,function(){"use strict";function e(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}var t={read:function(e){return e.replace(/%3B/g,";")},write:function(e){return e.replace(/;/g,"%3B")}};return function r(n,i){function o(r,o,u){if("undefined"!=typeof document){"number"==typeof(u=e({},i,u)).expires&&(u.expires=new Date(Date.now()+864e5*u.expires)),u.expires&&(u.expires=u.expires.toUTCString()),r=t.write(r).replace(/=/g,"%3D"),o=n.write(String(o),r);var c="";for(var f in u)u[f]&&(c+="; "+f,!0!==u[f]&&(c+="="+u[f].split(";")[0]));return document.cookie=r+"="+o+c}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],i={},o=0;o<r.length;o++){var u=r[o].split("="),c=u.slice(1).join("="),f=t.read(u[0]).replace(/%3D/g,"=");if(i[f]=n.read(c,f),e===f)break}return e?i[e]:i}},remove:function(t,r){o(t,"",e({},r,{expires:-1}))},withAttributes:function(t){return r(this.converter,e({},this.attributes,t))},withConverter:function(t){return r(e({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(i)},converter:{value:Object.freeze(n)}})}(t,{path:"/"})});
1271;
1272/**
1273* DO NOT EDIT THIS FILE.
1274* See the following change record for more information,
1275* https://www.drupal.org/node/2815083
1276* @preserve
1277**/
1278
1279(function ($, Drupal, cookies) {
1280  var isFunction = function isFunction(obj) {
1281    return Object.prototype.toString.call(obj) === '[object Function]';
1282  };
1283
1284  var parseCookieValue = function parseCookieValue(value, parseJson) {
1285    if (value.indexOf('"') === 0) {
1286      value = value.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
1287    }
1288
1289    try {
1290      value = decodeURIComponent(value.replace(/\+/g, ' '));
1291      return parseJson ? JSON.parse(value) : value;
1292    } catch (e) {}
1293  };
1294
1295  var reader = function reader(cookieValue, cookieName, converter, readUnsanitized, parseJson) {
1296    var value = readUnsanitized ? cookieValue : parseCookieValue(cookieValue, parseJson);
1297
1298    if (converter !== undefined && isFunction(converter)) {
1299      return converter(value, cookieName);
1300    }
1301
1302    return value;
1303  };
1304
1305  $.cookie = function (key) {
1306    var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
1307    var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
1308
1309    key = key && !$.cookie.raw ? encodeURIComponent(key) : key;
1310    if (value !== undefined && !isFunction(value)) {
1311      var attributes = Object.assign({}, $.cookie.defaults, options);
1312
1313      if (typeof attributes.expires === 'string' && attributes.expires !== '') {
1314        attributes.expires = new Date(attributes.expires);
1315      }
1316
1317      var cookieSetter = cookies.withConverter({
1318        write: function write(cookieValue) {
1319          return encodeURIComponent(cookieValue);
1320        }
1321      });
1322
1323      value = $.cookie.json && !$.cookie.raw ? JSON.stringify(value) : String(value);
1324
1325      return cookieSetter.set(key, value, attributes);
1326    }
1327
1328    var userProvidedConverter = value;
1329    var cookiesShim = cookies.withConverter({
1330      read: function read(cookieValue, cookieName) {
1331        return reader(cookieValue, cookieName, userProvidedConverter, $.cookie.raw, $.cookie.json);
1332      }
1333    });
1334
1335    if (key !== undefined) {
1336      return cookiesShim.get(key);
1337    }
1338
1339    var results = cookiesShim.get();
1340    Object.keys(results).forEach(function (resultKey) {
1341      if (results[resultKey] === undefined) {
1342        delete results[resultKey];
1343      }
1344    });
1345
1346    return results;
1347  };
1348
1349  $.cookie.defaults = Object.assign({ path: '' }, cookies.defaults);
1350
1351  $.cookie.json = false;
1352
1353  $.cookie.raw = false;
1354
1355  $.removeCookie = function (key, options) {
1356    cookies.remove(key, Object.assign({}, $.cookie.defaults, options));
1357    return !cookies.get(key);
1358  };
1359})(jQuery, Drupal, window.Cookies);;
1360/*!
1361 * jQuery Form Plugin
1362 * version: 4.2.2
1363 * Requires jQuery v1.7.2 or later
1364 * Project repository: https://github.com/jquery-form/form
1365
1366 * Copyright 2017 Kevin Morris
1367 * Copyright 2006 M. Alsup
1368
1369 * Dual licensed under the LGPL-2.1+ or MIT licenses
1370 * https://github.com/jquery-form/form#license
1371
1372 * This library is free software; you can redistribute it and/or
1373 * modify it under the terms of the GNU Lesser General Public
1374 * License as published by the Free Software Foundation; either
1375 * version 2.1 of the License, or (at your option) any later version.
1376 * This library is distributed in the hope that it will be useful,
1377 * but WITHOUT ANY WARRANTY; without even the implied warranty of
1378 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1379 * Lesser General Public License for more details.
1380 */
1381!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()}}
1381function 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&&(
1381o=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=[];
1381if(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="")}
1381)},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});
1382
1383;
1384/**
1385* DO NOT EDIT THIS FILE.
1386* See the following change record for more information,
1387* https://www.drupal.org/node/2815083
1388* @preserve
1389**/
1390
1391(function ($, Drupal) {
1392  Drupal.theme.progressBar = function (id) {
1393    return '<div id="' + 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>';
1394  };
1395
1396  Drupal.ProgressBar = function (id, updateCallback, method, errorCallback) {
1397    this.id = id;
1398    this.method = method || 'GET';
1399    this.updateCallback = updateCallback;
1400    this.errorCallback = errorCallback;
1401
1402    this.element = $(Drupal.theme('progressBar', id));
1403  };
1404
1405  $.extend(Drupal.ProgressBar.prototype, {
1406    setProgress: function setProgress(percentage, message, label) {
1407      if (percentage >= 0 && percentage <= 100) {
1408        $(this.element).find('div.progress__bar').css('width', percentage + '%');
1409        $(this.element).find('div.progress__percentage').html(percentage + '%');
1410      }
1411      $('div.progress__description', this.element).html(message);
1412      $('div.progress__label', this.element).html(label);
1413      if (this.updateCallback) {
1414        this.updateCallback(percentage, message, this);
1415      }
1416    },
1417    startMonitoring: function startMonitoring(uri, delay) {
1418      this.delay = delay;
1419      this.uri = uri;
1420      this.sendPing();
1421    },
1422    stopMonitoring: function stopMonitoring() {
1423      clearTimeout(this.timer);
1424
1425      this.uri = null;
1426    },
1427    sendPing: function sendPing() {
1428      if (this.timer) {
1429        clearTimeout(this.timer);
1430      }
1431      if (this.uri) {
1432        var pb = this;
1433
1434        var uri = this.uri;
1435        if (uri.indexOf('?') === -1) {
1436          uri += '?';
1437        } else {
1438          uri += '&';
1439        }
1440        uri += '_format=json';
1441        $.ajax({
1442          type: this.method,
1443          url: uri,
1444          data: '',
1445          dataType: 'json',
1446          success: function success(progress) {
1447            if (progress.status === 0) {
1448              pb.displayError(progress.data);
1449              return;
1450            }
1451
1452            pb.setProgress(progress.percentage, progress.message, progress.label);
1453
1454            pb.timer = setTimeout(function () {
1455              pb.sendPing();
1456            }, pb.delay);
1457          },
1458          error: function error(xmlhttp) {
1459            var e = new Drupal.AjaxError(xmlhttp, pb.uri);
1460            pb.displayError('<pre>' + e.message + '</pre>');
1461          }
1462        });
1463      }
1464    },
1465    displayError: function displayError(string) {
1466      var error = $('<div class="messages messages--error"></div>').html(string);
1467      $(this.element).before(error).hide();
1468
1469      if (this.errorCallback) {
1470        this.errorCallback(this);
1471      }
1472    }
1473  });
1474})(jQuery, Drupal);;
1475/**
1476 * @file
1477 * Extends methods from core/misc/progress.js.
1478 */
1479
1480(function ($, Drupal) {
1481
1482  'use strict';
1483
1484  /**
1485   * Theme function for the progress bar.
1486   *
1487   * @param {string} id
1488   *
1489   * @return {string}
1490   *   The HTML for the progress bar.
1491   */
1492  Drupal.theme.progressBar = function (id) {
1493    return '<div class="progress-wrapper" aria-live="polite">' +
1494             '<div class="message"></div>'+
1495             '<div id ="' + id + '" class="progress progress-striped active">' +
1496               '<div class="progress-bar" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0">' +
1497                 '<span class="percentage"></span>' +
1498               '</div>' +
1499             '</div>' +
1500             '<div class="progress-label"></div>' +
1501           '</div>';
1502  };
1503
1504  $.extend(Drupal.ProgressBar.prototype, /** @lends Drupal.ProgressBar */{
1505
1506    /**
1507     * Set the percentage and status message for the progressbar.
1508     *
1509     * @param {number} percentage
1510     * @param {string} message
1511     * @param {string} label
1512     */
1513    setProgress: function (percentage, message, label) {
1514      if (percentage >= 0 && percentage <= 100) {
1515        $(this.element).find('.progress-bar').css('width', percentage + '%').attr('aria-valuenow', percentage);
1516        $(this.element).find('.percentage').html(percentage + '%');
1517      }
1518      if (message) {
1519        // Remove the unnecessary whitespace at the end of the message.
1520        message = message.replace(/<br\/>&nbsp;|\s*$/, '');
1521
1522        $('.message', this.element).html(message);
1523      }
1524      if (label) {
1525        $('.progress-label', this.element).html(label);
1526      }
1527      if (this.updateCallback) {
1528        this.updateCallback(percentage, message, this);
1529      }
1530    },
1531
1532    /**
1533     * Display errors on the page.
1534     *
1535     * @param {string} string
1536     */
1537    displayError: function (string) {
1538      var error = $('<div class="alert alert-block alert-error"><button class="close" data-dismiss="alert">&times;</button><h4>' + Drupal.t('Error message') + '</h4></div>').append(string);
1539      $(this.element).before(error).hide();
1540
1541      if (this.errorCallback) {
1542        this.errorCallback(this);
1543      }
1544    }
1545  });
1546
1547})(jQuery, Drupal);
1548;
1549/**
1550* DO NOT EDIT THIS FILE.
1551* See the following change record for more information,
1552* https://www.drupal.org/node/2815083
1553* @preserve
1554**/
1555
1556(function (Drupal) {
1557  Drupal.behaviors.responsiveImageAJAX = {
1558    attach: function attach() {
1559      if (window.picturefill) {
1560        window.picturefill();
1561      }
1562    }
1563  };
1564})(Drupal);;
1565/**
1566* DO NOT EDIT THIS FILE.
1567* See the following change record for more information,
1568* https://www.drupal.org/node/2815083
1569* @preserve
1570**/
1571function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
1572
1573(function ($, window, Drupal, drupalSettings) {
1574  Drupal.behaviors.AJAX = {
1575    attach: function attach(context, settings) {
1576      function loadAjaxBehavior(base) {
1577        var elementSettings = settings.ajax[base];
1578        if (typeof elementSettings.selector === 'undefined') {
1579          elementSettings.selector = '#' + base;
1580        }
1581        $(elementSettings.selector).once('drupal-ajax').each(function () {
1582          elementSettings.element = this;
1583          elementSettings.base = base;
1584          Drupal.ajax(elementSettings);
1585        });
1586      }
1587
1588      Object.keys(settings.ajax || {}).forEach(function (base) {
1589        return loadAjaxBehavior(base);
1590      });
1591
1592      Drupal.ajax.bindAjaxLinks(document.body);
1593
1594      $('.use-ajax-submit').once('ajax').each(function () {
1595        var elementSettings = {};
1596
1597        elementSettings.url = $(this.form).attr('action');
1598
1599        elementSettings.setClick = true;
1600
1601        elementSettings.event = 'click';
1602
1603        elementSettings.progress = { type: 'throbber' };
1604        elementSettings.base = $(this).attr('id');
1605        elementSettings.element = this;
1606
1607        Drupal.ajax(elementSettings);
1608      });
1609    },
1610    detach: function detach(context, settings, trigger) {
1611      if (trigger === 'unload') {
1612        Drupal.ajax.expired().forEach(function (instance) {
1613          Drupal.ajax.instances[instance.instanceIndex] = null;
1614        });
1615      }
1616    }
1617  };
1618
1619  Drupal.AjaxError = function (xmlhttp, uri, customMessage) {
1620    var statusCode = void 0;
1621    var statusText = void 0;
1622    var responseText = void 0;
1623    if (xmlhttp.status) {
1624      statusCode = '\n' + Drupal.t('An AJAX HTTP error occurred.') + '\n' + Drupal.t('HTTP Result Code: !status', {
1625        '!status': xmlhttp.status
1626      });
1627    } else {
1628      statusCode = '\n' + Drupal.t('An AJAX HTTP request terminated abnormally.');
1629    }
1630    statusCode += '\n' + Drupal.t('Debugging information follows.');
1631    var pathText = '\n' + Drupal.t('Path: !uri', { '!uri': uri });
1632    statusText = '';
1633
1634    try {
1635      statusText = '\n' + Drupal.t('StatusText: !statusText', {
1636        '!statusText': $.trim(xmlhttp.statusText)
1637      });
1638    } catch (e) {}
1639
1640    responseText = '';
1641
1642    try {
1643      responseText = '\n' + Drupal.t('ResponseText: !responseText', {
1644        '!responseText': $.trim(xmlhttp.responseText)
1645      });
1646    } catch (e) {}
1647
1648    responseText = responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi, '');
1649    responseText = responseText.replace(/[\n]+\s+/g, '\n');
1650
1651    var readyStateText = xmlhttp.status === 0 ? '\n' + Drupal.t('ReadyState: !readyState', {
1652      '!readyState': xmlhttp.readyState
1653    }) : '';
1654
1655    customMessage = customMessage ? '\n' + Drupal.t('CustomMessage: !customMessage', {
1656      '!customMessage': customMessage
1657    }) : '';
1658
1659    this.message = statusCode + pathText + statusText + customMessage + responseText + readyStateText;
1660
1661    this.name = 'AjaxError';
1662  };
1663
1664  Drupal.AjaxError.prototype = new Error();
1665  Drupal.AjaxError.prototype.constructor = Drupal.AjaxError;
1666
1667  Drupal.ajax = function (settings) {
1668    if (arguments.length !== 1) {
1669      throw new Error('Drupal.ajax() function must be called with one configuration object only');
1670    }
1671
1672    var base = settings.base || false;
1673    var element = settings.element || false;
1674    delete settings.base;
1675    delete settings.element;
1676
1677    if (!settings.progress && !element) {
1678      settings.progress = false;
1679    }
1680
1681    var ajax = new Drupal.Ajax(base, element, settings);
1682    ajax.instanceIndex = Drupal.ajax.instances.length;
1683    Drupal.ajax.instances.push(ajax);
1684
1685    return ajax;
1686  };
1687
1688  Drupal.ajax.instances = [];
1689
1690  Drupal.ajax.expired = function () {
1691    return Drupal.ajax.instances.filter(function (instance) {
1692      return instance && instance.element !== false && !document.body.contains(instance.element);
1693    });
1694  };
1695
1696  Drupal.ajax.bindAjaxLinks = function (element) {
1697    $(element).find('.use-ajax').once('ajax').each(function (i, ajaxLink) {
1698      var $linkElement = $(ajaxLink);
1699
1700      var elementSettings = {
1701        progress: { type: 'throbber' },
1702        dialogType: $linkElement.data('dialog-type'),
1703        dialog: $linkElement.data('dialog-options'),
1704        dialogRenderer: $linkElement.data('dialog-renderer'),
1705        base: $linkElement.attr('id'),
1706        element: ajaxLink
1707      };
1708      var href = $linkElement.attr('href');
1709
1710      if (href) {
1711        elementSettings.url = href;
1712        elementSettings.event = 'click';
1713      }
1714      Drupal.ajax(elementSettings);
1715    });
1716  };
1717
1718  Drupal.Ajax = function (base, element, elementSettings) {
1719    var defaults = {
1720      event: element ? 'mousedown' : null,
1721      keypress: true,
1722      selector: base ? '#' + base : null,
1723      effect: 'none',
1724      speed: 'none',
1725      method: 'replaceWith',
1726      progress: {
1727        type: 'throbber',
1728        message: Drupal.t('Please wait...')
1729      },
1730      submit: {
1731        js: true
1732      }
1733    };
1734
1735    $.extend(this, defaults, elementSettings);
1736
1737    this.commands = new Drupal.AjaxCommands();
1738
1739    this.instanceIndex = false;
1740
1741    if (this.wrapper) {
1742      this.wrapper = '#' + this.wrapper;
1743    }
1744
1745    this.element = element;
1746
1747    this.element_settings = elementSettings;
1748
1749    this.elementSettings = elementSettings;
1750
1751    if (this.element && this.element.form) {
1752      this.$form = $(this.element.form);
1753    }
1754
1755    if (!this.url) {
1756      var $element = $(this.element);
1757      if ($element.is('a')) {
1758        this.url = $element.attr('href');
1759      } else if (this.element && element.form) {
1760        this.url = this.$form.attr('action');
1761      }
1762    }
1763
1764    var originalUrl = this.url;
1765
1766    this.url = this.url.replace(/\/nojs(\/|$|\?|#)/, '/ajax$1');
1767
1768    if (drupalSettings.ajaxTrustedUrl[originalUrl]) {
1769      drupalSettings.ajaxTrustedUrl[this.url] = true;
1770    }
1771
1772    var ajax = this;
1773
1774    ajax.options = {
1775      url: ajax.url,
1776      data: ajax.submit,
1777      beforeSerialize: function beforeSerialize(elementSettings, options) {
1778        return ajax.beforeSerialize(elementSettings, options);
1779      },
1780      beforeSubmit: function beforeSubmit(formValues, elementSettings, options) {
1781        ajax.ajaxing = true;
1782        return ajax.beforeSubmit(formValues, elementSettings, options);
1783      },
1784      beforeSend: function beforeSend(xmlhttprequest, options) {
1785        ajax.ajaxing = true;
1786        return ajax.beforeSend(xmlhttprequest, options);
1787      },
1788      success: function success(response, status, xmlhttprequest) {
1789        if (typeof response === 'string') {
1790          response = $.parseJSON(response);
1791        }
1792
1793        if (response !== null && !drupalSettings.ajaxTrustedUrl[ajax.url]) {
1794          if (xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token') !== '1') {
1795            var customMessage = Drupal.t('The response failed verification so will not be processed.');
1796            return ajax.error(xmlhttprequest, ajax.url, customMessage);
1797          }
1798        }
1799
1800        return ajax.success(response, status);
1801      },
1802      complete: function complete(xmlhttprequest, status) {
1803        ajax.ajaxing = false;
1804        if (status === 'error' || status === 'parsererror') {
1805          return ajax.error(xmlhttprequest, ajax.url);
1806        }
1807      },
1808
1809      dataType: 'json',
1810      type: 'POST'
1811    };
1812
1813    if (elementSettings.dialog) {
1814      ajax.options.data.dialogOptions = elementSettings.dialog;
1815    }
1816
1817    if (ajax.options.url.indexOf('?') === -1) {
1818      ajax.options.url += '?';
1819    } else {
1820      ajax.options.url += '&';
1821    }
1822
1823    var wrapper = 'drupal_' + (elementSettings.dialogType || 'ajax');
1824    if (elementSettings.dialogRenderer) {
1825      wrapper += '.' + elementSettings.dialogRenderer;
1826    }
1827    ajax.options.url += Drupal.ajax.WRAPPER_FORMAT + '=' + wrapper;
1828
1829    $(ajax.element).on(elementSettings.event, function (event) {
1830      if (!drupalSettings.ajaxTrustedUrl[ajax.url] && !Drupal.url.isLocal(ajax.url)) {
1831        throw new Error(Drupal.t('The callback URL is not local and n
1831ot trusted: !url', {
1832          '!url': ajax.url
1833        }));
1834      }
1835      return ajax.eventResponse(this, event);
1836    });
1837
1838    if (elementSettings.keypress) {
1839      $(ajax.element).on('keypress', function (event) {
1840        return ajax.keypressResponse(this, event);
1841      });
1842    }
1843
1844    if (elementSettings.prevent) {
1845      $(ajax.element).on(elementSettings.prevent, false);
1846    }
1847  };
1848
1849  Drupal.ajax.WRAPPER_FORMAT = '_wrapper_format';
1850
1851  Drupal.Ajax.AJAX_REQUEST_PARAMETER = '_drupal_ajax';
1852
1853  Drupal.Ajax.prototype.execute = function () {
1854    if (this.ajaxing) {
1855      return;
1856    }
1857
1858    try {
1859      this.beforeSerialize(this.element, this.options);
1860
1861      return $.ajax(this.options);
1862    } catch (e) {
1863      this.ajaxing = false;
1864      window.alert('An error occurred while attempting to process ' + this.options.url + ': ' + e.message);
1865
1866      return $.Deferred().reject();
1867    }
1868  };
1869
1870  Drupal.Ajax.prototype.keypressResponse = function (element, event) {
1871    var ajax = this;
1872
1873    if (event.which === 13 || event.which === 32 && element.type !== 'text' && element.type !== 'textarea' && element.type !== 'tel' && element.type !== 'number') {
1874      event.preventDefault();
1875      event.stopPropagation();
1876      $(element).trigger(ajax.elementSettings.event);
1877    }
1878  };
1879
1880  Drupal.Ajax.prototype.eventResponse = function (element, event) {
1881    event.preventDefault();
1882    event.stopPropagation();
1883
1884    var ajax = this;
1885
1886    if (ajax.ajaxing) {
1887      return;
1888    }
1889
1890    try {
1891      if (ajax.$form) {
1892        if (ajax.setClick) {
1893          element.form.clk = element;
1894        }
1895
1896        ajax.$form.ajaxSubmit(ajax.options);
1897      } else {
1898        ajax.beforeSerialize(ajax.element, ajax.options);
1899        $.ajax(ajax.options);
1900      }
1901    } catch (e) {
1902      ajax.ajaxing = false;
1903      window.alert('An error occurred while attempting to process ' + ajax.options.url + ': ' + e.message);
1904    }
1905  };
1906
1907  Drupal.Ajax.prototype.beforeSerialize = function (element, options) {
1908    if (this.$form && document.body.contains(this.$form.get(0))) {
1909      var settings = this.settings || drupalSettings;
1910      Drupal.detachBehaviors(this.$form.get(0), settings, 'serialize');
1911    }
1912
1913    options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER] = 1;
1914
1915    var pageState = drupalSettings.ajaxPageState;
1916    options.data['ajax_page_state[theme]'] = pageState.theme;
1917    options.data['ajax_page_state[theme_token]'] = pageState.theme_token;
1918    options.data['ajax_page_state[libraries]'] = pageState.libraries;
1919  };
1920
1921  Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {};
1922
1923  Drupal.Ajax.prototype.beforeSend = function (xmlhttprequest, options) {
1924    if (this.$form) {
1925      options.extraData = options.extraData || {};
1926
1927      options.extraData.ajax_iframe_upload = '1';
1928
1929      var v = $.fieldValue(this.element);
1930      if (v !== null) {
1931        options.extraData[this.element.name] = v;
1932      }
1933    }
1934
1935    $(this.element).prop('disabled', true);
1936
1937    if (!this.progress || !this.progress.type) {
1938      return;
1939    }
1940
1941    var progressIndicatorMethod = 'setProgressIndicator' + this.progress.type.slice(0, 1).toUpperCase() + this.progress.type.slice(1).toLowerCase();
1942    if (progressIndicatorMethod in this && typeof this[progressIndicatorMethod] === 'function') {
1943      this[progressIndicatorMethod].call(this);
1944    }
1945  };
1946
1947  Drupal.theme.ajaxProgressThrobber = function (message) {
1948    var messageMarkup = typeof message === 'string' ? Drupal.theme('ajaxProgressMessage', message) : '';
1949    var throbber = '<div class="throbber">&nbsp;</div>';
1950
1951    return '<div class="ajax-progress ajax-progress-throbber">' + throbber + messageMarkup + '</div>';
1952  };
1953
1954  Drupal.theme.ajaxProgressIndicatorFullscreen = function () {
1955    return '<div class="ajax-progress ajax-progress-fullscreen">&nbsp;</div>';
1956  };
1957
1958  Drupal.theme.ajaxProgressMessage = function (message) {
1959    return '<div class="message">' + message + '</div>';
1960  };
1961
1962  Drupal.theme.ajaxProgressBar = function ($element) {
1963    return $('<div class="ajax-progress ajax-progress-bar"></div>').append($element);
1964  };
1965
1966  Drupal.Ajax.prototype.setProgressIndicatorBar = function () {
1967    var progressBar = new Drupal.ProgressBar('ajax-progress-' + this.element.i
1967d, $.noop, this.progress.method, $.noop);
1968    if (this.progress.message) {
1969      progressBar.setProgress(-1, this.progress.message);
1970    }
1971    if (this.progress.url) {
1972      progressBar.startMonitoring(this.progress.url, this.progress.interval || 1500);
1973    }
1974    this.progress.element = $(Drupal.theme('ajaxProgressBar', progressBar.element));
1975    this.progress.object = progressBar;
1976    $(this.element).after(this.progress.element);
1977  };
1978
1979  Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
1980    this.progress.element = $(Drupal.theme('ajaxProgressThrobber', this.progress.message));
1981    $(this.element).after(this.progress.element);
1982  };
1983
1984  Drupal.Ajax.prototype.setProgressIndicatorFullscreen = function () {
1985    this.progress.element = $(Drupal.theme('ajaxProgressIndicatorFullscreen'));
1986    $('body').append(this.progress.element);
1987  };
1988
1989  Drupal.Ajax.prototype.success = function (response, status) {
1990    var _this = this;
1991
1992    if (this.progress.element) {
1993      $(this.progress.element).remove();
1994    }
1995    if (this.progress.object) {
1996      this.progress.object.stopMonitoring();
1997    }
1998    $(this.element).prop('disabled', false);
1999
2000    var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
2001
2002    var focusChanged = false;
2003    Object.keys(response || {}).forEach(function (i) {
2004      if (response[i].command && _this.commands[response[i].command]) {
2005        _this.commands[response[i].command](_this, response[i], status);
2006        if (response[i].command === 'invoke' && response[i].method === 'focus') {
2007          focusChanged = true;
2008        }
2009      }
2010    });
2011
2012    if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
2013      var target = false;
2014
2015      for (var n = elementParents.length - 1; !target && n >= 0; n--) {
2016        target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
2017      }
2018
2019      if (target) {
2020        $(target).trigger('focus');
2021      }
2022    }
2023
2024    if (this.$form && document.body.contains(this.$form.get(0))) {
2025      var settings = this.settings || drupalSettings;
2026      Drupal.attachBehaviors(this.$form.get(0), settings);
2027    }
2028
2029    this.settings = null;
2030  };
2031
2032  Drupal.Ajax.prototype.getEffect = function (response) {
2033    var type = response.effect || this.effect;
2034    var speed = response.speed || this.speed;
2035
2036    var effect = {};
2037    if (type === 'none') {
2038      effect.showEffect = 'show';
2039      effect.hideEffect = 'hide';
2040      effect.showSpeed = '';
2041    } else if (type === 'fade') {
2042      effect.showEffect = 'fadeIn';
2043      effect.hideEffect = 'fadeOut';
2044      effect.showSpeed = speed;
2045    } else {
2046      effect.showEffect = type + 'Toggle';
2047      effect.hideEffect = type + 'Toggle';
2048      effect.showSpeed = speed;
2049    }
2050
2051    return effect;
2052  };
2053
2054  Drupal.Ajax.prototype.error = function (xmlhttprequest, uri, customMessage) {
2055    if (this.progress.element) {
2056      $(this.progress.element).remove();
2057    }
2058    if (this.progress.object) {
2059      this.progress.object.stopMonitoring();
2060    }
2061
2062    $(this.wrapper).show();
2063
2064    $(this.element).prop('disabled', false);
2065
2066    if (this.$form && document.body.contains(this.$form.get(0))) {
2067      var settings = this.settings || drupalSettings;
2068      Drupal.attachBehaviors(this.$form.get(0), settings);
2069    }
2070    throw new Drupal.AjaxError(xmlhttprequest, uri, customMessage);
2071  };
2072
2073  Drupal.theme.ajaxWrapperNewContent = function ($newContent, ajax, response) {
2074    return (response.effect || ajax.effect) !== 'none' && $newContent.filter(function (i) {
2075      return !($newContent[i].nodeName === '#comment' || $newContent[i].nodeName === '#text' && /^(\s|\n|\r)*$/.test($newContent[i].textContent));
2076    }).length > 1 ? Drupal.theme('ajaxWrapperMultipleRootElements', $newContent) : $newContent;
2077  };
2078
2079  Drupal.theme.ajaxWrapperMultipleRootElements = function ($elements) {
2080    return $('<div></div>').append($elements);
2081  };
2082
2083  Drupal.AjaxCommands = function () {};
2084  Drupal.AjaxCommands.prototype = {
2085    insert: function insert(ajax, response) {
2086      var $wrapper = response.selector ? $(response.selector) : $(ajax.wrapper);
2087      var method = response.method || ajax.method;
2088      var effect = ajax.getEffect(response);
2089
2090      var settings = response.settings || ajax.settings || drupalSettings;
2091
2092      var $newContent = $($.parseHTML(response.data, document, true));
2093
2094      $newContent = Drupal.theme('ajaxWrapperNewContent', $newContent, ajax, response);
2095
2096      switch (method) {
2097        case 'html':
2098        case 'replaceWith':
2099        case 'replaceAll':
2100        case 'empty':
2101        case 'remove':
2102          Drupal.detachBehaviors($wrapper.get(0), settings);
2103          break;
2104        default:
2105          break;
2106      }
2107
2108      $wrapper[method]($newContent);
2109
2110      if (effect.showEffect !== 'show') {
2111        $newContent.hide();
2112      }
2113
2114      var $ajaxNewContent = $newContent.find('.ajax-new-content');
2115      if ($ajaxNewContent.length) {
2116        $ajaxNewContent.hide();
2117        $newContent.show();
2118        $ajaxNewContent[effect.showEffect](effect.showSpeed);
2119      } else if (effect.showEffect !== 'show') {
2120        $newContent[effect.showEffect](effect.showSpeed);
2121      }
2122
2123      if ($newContent.parents('html').length) {
2124        $newContent.each(function (index, element) {
2125          if (element.nodeType === Node.ELEMENT_NODE) {
2126            Drupal.attachBehaviors(element, settings);
2127          }
2128        });
2129      }
2130    },
2131    remove: function remove(ajax, response, status) {
2132      var settings = response.settings || ajax.settings || drupalSettings;
2133      $(response.selector).each(function () {
2134        Drupal.detachBehaviors(this, settings);
2135      }).remove();
2136    },
2137    changed: function changed(ajax, response, status) {
2138      var $element = $(response.selector);
2139      if (!$element.hasClass('ajax-changed')) {
2140        $element.addClass('ajax-changed');
2141        if (response.asterisk) {
2142          $element.find(response.asterisk).append(' <abbr class="ajax-changed" title="' + Drupal.t('Changed') + '">*</abbr> ');
2143        }
2144      }
2145    },
2146    alert: function alert(ajax, response, status) {
2147      window.alert(response.text, response.title);
2148    },
2149    announce: function announce(ajax, response) {
2150      if (response.priority) {
2151        Drupal.announce(response.text, response.priority);
2152      } else {
2153        Drupal.announce(response.text);
2154      }
2155    },
2156    redirect: function redirect(ajax, response, status) {
2157      window.location = response.url;
2158    },
2159    css: function css(ajax, response, status) {
2160      $(response.selector).css(response.argument);
2161    },
2162    settings: function settings(ajax, response, status) {
2163      var ajaxSettings = drupalSettings.ajax;
2164
2165      if (ajaxSettings) {
2166        Drupal.ajax.expired().forEach(function (instance) {
2167
2168          if (instance.selector) {
2169            var selector = instance.selector.replace('#', '');
2170            if (selector in ajaxSettings) {
2171              delete ajaxSettings[selector];
2172            }
2173          }
2174        });
2175      }
2176
2177      if (response.merge) {
2178        $.extend(true, drupalSettings, response.settings);
2179      } else {
2180        ajax.settings = response.settings;
2181      }
2182    },
2183    data: function data(ajax, response, status) {
2184      $(response.selector).data(response.name, response.value);
2185    },
2186    invoke: function invoke(ajax, response, status) {
2187      var $element = $(response.selector);
2188      $element[response.method].apply($element, _toConsumableArray(response.args));
2189    },
2190    restripe: function restripe(ajax, response, status) {
2191      $(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');
2192    },
2193    update_build_id: function update_build_id(ajax, response, status) {
2194      $('input[name="form_build_id"][value="' + response.old + '"]').val(response.new);
2195    },
2196    add_css: function add_css(ajax, response, status) {
2197      $('head').prepend(response.data);
2198    },
2199    message: function message(ajax, response) {
2200      var messages = new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));
2201      if (response.clearPrevious) {
2202        messages.clear();
2203      }
2204      messages.add(response.message, response.messageOptions);
2205    }
2206  };
2207})(jQuery, window, Drupal, drupalSettings);;
2208/**
2209 * @file
2210 * Extends methods from core/misc/ajax.js.
2211 */
2212
2213(function ($, window, Drupal, drupalSettings) {
2214
2215  /**
2216   * Attempts to find the closest glyphicon progress indicator.
2217   *
2218   * @param {jQuery|Element} element
2219   *   A DOM element.
2220   *
2221   * @returns {jQuery}
2222   *   A jQuery object.
2223   */
2224  Drupal.Ajax.prototype.findGlyphicon = function (element) {
2225    return $(element).closest('.form-item').find('.ajax-progress.glyphicon')
2226  };
2227
2228  /**
2229   * Starts the spinning of the glyphicon progress indicator.
2230   *
2231   * @param {jQuery|Element} element
2232   *   A DOM element.
2233   * @param {string} [message]
2234   *   An optional message to display (tooltip) for the progress.
2235   *
2236   * @returns {jQuery}
2237   *   A jQuery object.
2238   */
2239  Drupal.Ajax.prototype.glyphiconStart = function (element, message) {
2240    var $glyphicon = this.findGlyphicon(element);
2241    if ($glyphicon[0]) {
2242      $glyphicon.addClass('glyphicon-spin');
2243
2244      // Add any message as a tooltip to the glyphicon.
2245      if ($.fn.tooltip && drupalSettings.bootstrap.tooltip_enabled) {
2246        $glyphicon
2247          .removeAttr('data-toggle')
2248          .removeAttr('data-original-title')
2249          .removeAttr('title')
2250          .tooltip('destroy')
2251        ;
2252
2253        if (message) {
2254          $glyphicon.attr('data-toggle', 'tooltip').attr('title', message).tooltip();
2255        }
2256      }
2257
2258      // Append a message for screen readers.
2259      if (message) {
2260        $glyphicon.parent().append('<div class="sr-only message">' + message + '</div>');
2261      }
2262    }
2263    return $glyphicon;
2264  };
2265
2266  /**
2267   * Stop the spinning of a glyphicon progress indicator.
2268   *
2269   * @param {jQuery|Element} element
2270   *   A DOM element.
2271   */
2272  Drupal.Ajax.prototype.glyphiconStop = function (element) {
2273    var $glyphicon = this.findGlyphicon(element);
2274    if ($glyphicon[0]) {
2275      $glyphicon.removeClass('glyphicon-spin');
2276      if ($.fn.tooltip && drupalSettings.bootstrap.tooltip_enabled) {
2277        $glyphicon
2278          .removeAttr('data-toggle')
2279          .removeAttr('data-original-title')
2280          .removeAttr('title')
2281          .tooltip('destroy')
2282        ;
2283      }
2284    }
2285  };
2286
2287  /**
2288   * Sets the throbber progress indicator.
2289   */
2290  Drupal.Ajax.prototype.setProgressIndicatorThrobber = function () {
2291    var $element = $(this.element);
2292
2293    // Find an existing glyphicon progress indicator.
2294    var $glyphicon = this.glyphiconStart($element, this.progress.message);
2295    if ($glyphicon[0]) {
2296      this.progress.element = $glyphicon.parent();
2297      this.progress.glyphicon = true;
2298      return;
2299    }
2300
2301    // Otherwise, add a glyphicon throbber after the element.
2302    if (!this.progress.element) {
2303      this.progress.element = $(Drupal.theme('ajaxThrobber'));
2304    }
2305    if (this.progress.message) {
2306      this.progress.element.after('<div class="message">' + this.progress.message + '</div>');
2307    }
2308
2309    // If element is an input DOM element type (not :input), append after.
2310    if ($element.is('input')) {
2311      $element.after(this.progress.element);
2312    }
2313    // Otherwise append the throbber inside the element.
2314    else {
2315      $element.append(this.progress.element);
2316    }
2317  };
2318
2319
2320  /**
2321   * Handler for the form redirection completion.
2322   *
2323   * @param {Array.<Drupal.AjaxCommands~commandDefinition>} response
2324   * @param {number} status
2325   */
2326  Drupal.Ajax.prototype.success = function (response, status) {
2327    if (this.progress.element) {
2328
2329      // Stop a glyphicon throbber.
2330      if (this.progress.glyphicon) {
2331        this.glyphiconStop(this.progress.element);
2332      }
2333      // Remove the progress element.
2334      else {
2335        this.progress.element.remove();
2336      }
2337
2338      // Remove any message set.
2339      this.progress.element.parent().find('.message').remove();
2340    }
2341
2342    // --------------------------------------------------------
2343    // Everything below is from core/misc/ajax.js.
2344    // --------------------------------------------------------
2345
2346    if (this.progress.object) {
2347      this.progress.object.stopMonitoring();
2348    }
2349    $(this.element).prop('disabled', false);
2350
2351    // Save element's ancestors tree so if the element is removed from the dom
2352    // we can try to refocus one of its parents. Using addBack reverse the
2353    // result array, meaning that index 0 is the highest parent in the hierarchy
2354    // in this situation it is usually a <form> element.
2355    var elementParents = $(this.element).parents('[data-drupal-selector]').addBack().toArray();
2356
2357    // Track if any command is altering the focus so we can avoid changing the
2358    // focus set by the Ajax command.
2359    var focusChanged = false;
2360    for (var i in response) {
2361      if (response.hasOwnProperty(i) && response[i].command && this.commands[response[i].command]) {
2362        this.commands[response[i].command](this, response[i], status);
2363        if (response[i].command === 'invoke' && response[i].method === 'focus') {
2364          focusChanged = true;
2365        }
2366      }
2367    }
2368
2369    // If the focus hasn't be changed by the ajax commands, try to refocus the
2370    // triggering element or one of its parents if that element does not exist
2371    // anymore.
2372    if (!focusChanged && this.element && !$(this.element).data('disable-refocus')) {
2373      var target = false;
2374
2375      for (var n = elementParents.length - 1; !target && n > 0; n--) {
2376        target = document.querySelector('[data-drupal-selector="' + elementParents[n].getAttribute('data-drupal-selector') + '"]');
2377      }
2378
2379      if (target) {
2380        $(target).trigger('focus');
2381      }
2382    }
2383
2384    // Reattach behaviors, if they were detached in beforeSerialize(). The
2385    // attachBehaviors() called on the new content from processing the response
2386    // commands is not sufficient, because behaviors from the entire form need
2387    // to be reattached.
2388    if (this.$form) {
2389      var settings = this.settings || drupalSettings;
2390      Drupal.attachBehaviors(this.$form.get(0), settings);
2391    }
2392
2393    // Remove any response-specific settings so they don't get used on the next
2394    // call by mistake.
2395    this.settings = null;
2396  };
2397
2398})(jQuery, this, Drupal, drupalSettings);
2399;
2400/**
2401* DO NOT EDIT THIS FILE.
2402* See the following change record for more information,
2403* https://www.drupal.org/node/2815083
2404* @preserve
2405**/
2406
2407(function ($, Drupal, drupalSettings) {
2408  Drupal.Views = {};
2409
2410  Drupal.Views.parseQueryString = function (query) {
2411    var args = {};
2412    var pos = query.indexOf('?');
2413    if (pos !== -1) {
2414      query = query.substring(pos + 1);
2415    }
2416    var pair = void 0;
2417    var pairs = query.split('&');
2418    for (var i = 0; i < pairs.length; i++) {
2419      pair = pairs[i].split('=');
2420
2421      if (pair[0] !== 'q' && pair[1]) {
2422        args[decodeURIComponent(pair[0].replace(/\+/g, ' '))] = decodeURIComponent(pair[1].replace(/\+/g, ' '));
2423      }
2424    }
2425    return args;
2426  };
2427
2428  Drupal.Views.parseViewArgs = function (href, viewPath) {
2429    var returnObj = {};
2430    var path = Drupal.Views.getPath(href);
2431
2432    var viewHref = Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length);
2433
2434    if (viewHref && path.substring(0, viewHref.length + 1) === viewHref + '/') {
2435      returnObj.view_args = decodeURIComponent(path.substring(viewHref.length + 1, path.length));
2436      returnObj.view_path = path;
2437    }
2438    return returnObj;
2439  };
2440
2441  Drupal.Views.pathPortion = function (href) {
2442    var protocol = window.location.protocol;
2443    if (href.substring(0, protocol.length) === protocol) {
2444      href = href.substring(href.indexOf('/', protocol.length + 2));
2445    }
2446    return href;
2447  };
2448
2449  Drupal.Views.getPath = function (href) {
2450    href = Drupal.Views.pathPortion(href);
2451    href = href.substring(drupalSettings.path.baseUrl.length, href.length);
2452
2453    if (href.substring(0, 3) === '?q=') {
2454      href = href.substring(3, href.length);
2455    }
2456    var chars = ['#', '?', '&'];
2457    for (var i = 0; i < chars.length; i++) {
2458      if (href.indexOf(chars[i]) > -1) {
2459        href = href.substr(0, href.indexOf(chars[i]));
2460      }
2461    }
2462    return href;
2463  };
2464})(jQuery, Drupal, drupalSettings);;
2465/**
2466* DO NOT EDIT THIS FILE.
2467* See the following change record for more information,
2468* https://www.drupal.org/node/2815083
2469* @preserve
2470**/
2471
2472(function ($, Drupal, drupalSettings) {
2473  Drupal.behaviors.ViewsAjaxView = {};
2474  Drupal.behaviors.ViewsAjaxView.attach = function (context, settings) {
2475    if (settings && settings.views && settings.views.ajaxViews) {
2476      var ajaxViews = settings.views.ajaxViews;
2477
2478      Object.keys(ajaxViews || {}).forEach(function (i) {
2479        Drupal.views.instances[i] = new Drupal.views.ajaxView(ajaxViews[i]);
2480      });
2481    }
2482  };
2483  Drupal.behaviors.ViewsAjaxView.detach = function (context, settings, trigger) {
2484    if (trigger === 'unload') {
2485      if (settings && settings.views && settings.views.ajaxViews) {
2486        var ajaxViews = settings.views.ajaxViews;
2487
2488        Object.keys(ajaxViews || {}
2488).forEach(function (i) {
2489          var selector = '.js-view-dom-id-' + ajaxViews[i].view_dom_id;
2490          if ($(selector, context).length) {
2491            delete Drupal.views.instances[i];
2492            delete settings.views.ajaxViews[i];
2493          }
2494        });
2495      }
2496    }
2497  };
2498
2499  Drupal.views = {};
2500
2501  Drupal.views.instances = {};
2502
2503  Drupal.views.ajaxView = function (settings) {
2504    var selector = '.js-view-dom-id-' + settings.view_dom_id;
2505    this.$view = $(selector);
2506
2507    var ajaxPath = drupalSettings.views.ajax_path;
2508
2509    if (ajaxPath.constructor.toString().indexOf('Array') !== -1) {
2510      ajaxPath = ajaxPath[0];
2511    }
2512
2513    var queryString = window.location.search || '';
2514    if (queryString !== '') {
2515      queryString = queryString.slice(1).replace(/q=[^&]+&?|&?render=[^&]+/, '');
2516      if (queryString !== '') {
2517        queryString = (/\?/.test(ajaxPath) ? '&' : '?') + queryString;
2518      }
2519    }
2520
2521    this.element_settings = {
2522      url: ajaxPath + queryString,
2523      submit: settings,
2524      setClick: true,
2525      event: 'click',
2526      selector: selector,
2527      progress: { type: 'fullscreen' }
2528    };
2529
2530    this.settings = settings;
2531
2532    this.$exposed_form = $('form#views-exposed-form-' + settings.view_name.replace(/_/g, '-') + '-' + settings.view_display_id.replace(/_/g, '-'));
2533    this.$exposed_form.once('exposed-form').each($.proxy(this.attachExposedFormAjax, this));
2534
2535    this.$view.filter($.proxy(this.filterNestedViews, this)).once('ajax-pager').each($.proxy(this.attachPagerAjax, this));
2536
2537    var selfSettings = $.extend({}, this.element_settings, {
2538      event: 'RefreshView',
2539      base: this.selector,
2540      element: this.$view.get(0)
2541    });
2542    this.refreshViewAjax = Drupal.ajax(selfSettings);
2543  };
2544
2545  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
2546    var that = this;
2547    this.exposedFormAjax = [];
2548
2549    $('input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {
2550      var selfSettings = $.extend({}, that.element_settings, {
2551        base: $(this).attr('id'),
2552        element: this
2553      });
2554      that.exposedFormAjax[index] = Drupal.ajax(selfSettings);
2555    });
2556  };
2557
2558  Drupal.views.ajaxView.prototype.filterNestedViews = function () {
2559    return !this.$view.parents('.view').length;
2560  };
2561
2562  Drupal.views.ajaxView.prototype.attachPagerAjax = function () {
2563    this.$view.find('ul.js-pager__items > li > a, th.views-field a, .attachment .views-summary a').each($.proxy(this.attachPagerLinkAjax, this));
2564  };
2565
2566  Drupal.views.ajaxView.prototype.attachPagerLinkAjax = function (id, link) {
2567    var $link = $(link);
2568    var viewData = {};
2569    var href = $link.attr('href');
2570
2571    $.extend(viewData, this.settings, Drupal.Views.parseQueryString(href), Drupal.Views.parseViewArgs(href, this.settings.view_base_path));
2572
2573    var selfSettings = $.extend({}, this.element_settings, {
2574      submit: viewData,
2575      base: false,
2576      element: link
2577    });
2578    this.pagerAjax = Drupal.ajax(selfSettings);
2579  };
2580
2581  Drupal.AjaxCommands.prototype.viewsScrollTop = function (ajax, response) {
2582    var offset = $(response.selector).offset();
2583
2584    var scrollTarget = response.selector;
2585    while ($(scrollTarget).scrollTop() === 0 && $(scrollTarget).parent()) {
2586      scrollTarget = $(scrollTarget).parent();
2587    }
2588
2589    if (offset.top - 10 < $(scrollTarget).scrollTop()) {
2590      $(scrollTarget).animate({ scrollTop: offset.top - 10 }, 500);
2591    }
2592  };
2593})(jQuery, Drupal, drupalSettings);;
2594/**
2595 * @file
2596 * Extends core ajax_view.js.
2597 */
2598
2599(function ($, Drupal) {
2600  'use strict';
2601
2602  /**
2603   * @method
2604   */
2605  Drupal.views.ajaxView.prototype.attachExposedFormAjax = function () {
2606    var that = this;
2607    this.exposedFormAjax = [];
2608    $('button[type=submit], input[type=submit], input[type=image]', this.$exposed_form).not('[data-drupal-selector=edit-reset]').each(function (index) {
2609      var self_settings = $.extend({}, that.element_settings, {
2610        base: $(this).attr('id'),
2611        element: this
2612      });
2613      that.exposedFormAjax[index] = Drupal.ajax(self_settings);
2614    });
2615  };
2616
2617})(jQuery, Drupal);
2618;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.