PageSourceSearch

https://lpnu.ua/sites/default/files/js/js_XRfyimmhOyo3YOQ557UJuae1p6mGn-f9x1JGO1WXQis.js

js lpnu.ua collected 2026-09-24 09:08:15 UTC 90,008 bytes, 1,589 lines download raw bytes

1/**
2 * @file
3 * Drupal Bootstrap object.
4 */
5
6/**
7 * All Drupal Bootstrap JavaScript APIs are contained in this namespace.
8 *
9 * @param {underscore} _
10 * @param {jQuery} $
11 * @param {Drupal} Drupal
12 * @param {drupalSettings} drupalSettings
13 */
14(function (_, $, Drupal, drupalSettings) {
15  'use strict';
16
17  /**
18   * @typedef Drupal.bootstrap
19   */
20  var Bootstrap = {
21    processedOnce: {},
22    settings: drupalSettings.bootstrap || {}
23  };
24
25  /**
26   * Wraps Drupal.checkPlain() to ensure value passed isn't empty.
27   *
28   * Encodes special characters in a plain-text string for display as HTML.
29   *
30   * @param {string} str
31   *   The string to be encoded.
32   *
33   * @return {string}
34   *   The encoded string.
35   *
36   * @ingroup sanitization
37   */
38  Bootstrap.checkPlain = function (str) {
39    return str && Drupal.checkPlain(str) || '';
40  };
41
42  /**
43   * Creates a jQuery plugin.
44   *
45   * @param {String} id
46   *   A jQuery plugin identifier located in $.fn.
47   * @param {Function} plugin
48   *   A constructor function used to initialize the for the jQuery plugin.
49   * @param {Boolean} [noConflict]
50   *   Flag indicating whether or not to create a ".noConflict()" helper method
51   *   for the plugin.
52   */
53  Bootstrap.createPlugin = function (id, plugin, noConflict) {
54    // Immediately return if plugin doesn't exist.
55    if ($.fn[id] !== void 0) {
56      return this.fatal('Specified jQuery plugin identifier already exists: @id. Use Drupal.bootstrap.replacePlugin() instead.', {'@id': id});
57    }
58
59    // Immediately return if plugin isn't a function.
60    if (typeof plugin !== 'function') {
61      return this.fatal('You must provide a constructor function to create a jQuery plugin "@id": @plugin', {'@id': id, '@plugin':  plugin});
62    }
63
64    // Add a ".noConflict()" helper method.
65    this.pluginNoConflict(id, plugin, noConflict);
66
67    $.fn[id] = plugin;
68  };
69
70  /**
71   * Diff object properties.
72   *
73   * @param {...Object} objects
74   *   Two or more objects. The first object will be used to return properties
75   *   values.
76   *
77   * @return {Object}
78   *   Returns the properties of the first passed object that are not present
79   *   in all other passed objects.
80   */
81  Bootstrap.diffObjects = function (objects) {
82    var args = Array.prototype.slice.call(arguments);
83    return _.pick(args[0], _.difference.apply(_, _.map(args, function (obj) {
84      return Object.keys(obj);
85    })));
86  };
87
88  /**
89   * Map of supported events by regular expression.
90   *
91   * @type {Object<Event|MouseEvent|KeyboardEvent|TouchEvent,RegExp>}
92   */
93  Bootstrap.eventMap = {
94    Event: /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
95    MouseEvent: /^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/,
96    KeyboardEvent: /^(?:key(?:down|press|up))$/,
97    TouchEvent: /^(?:touch(?:start|end|move|cancel))$/
98  };
99
100  /**
101   * Extends a jQuery Plugin.
102   *
103   * @param {String} id
104   *   A jQuery plugin identifier located in $.fn.
105   * @param {Function} callback
106   *   A constructor function used to initialize the for the jQuery plugin.
107   *
108   * @return {Function|Boolean}
109   *   The jQuery plugin constructor or FALSE if the plugin does not exist.
110   */
111  Bootstrap.extendPlugin = function (id, callback) {
112    // Immediately return if plugin doesn't exist.
113    if (typeof $.fn[id] !== 'function') {
114      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
115    }
116
117    // Immediately return if callback isn't a function.
118    if (typeof callback !== 'function') {
119      return this.fatal('You must provide a callback function to extend the jQuery plugin "@id": @callback', {'@id': id, '@callback':  callback});
120    }
121
122    // Determine existing plugin constructor.
123    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
124    var plugin = callback.apply(constructor, [this.settings]);
125    if (!$.isPlainObject(plugin)) {
126      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});
127    }
128
129    this.wrapPluginConstructor(constructor, plugin, true);
130
131    return $.fn[id];
132  };
133
134  Bootstrap.superWrapper = function (parent, fn) {
135    return function () {
136      var previousSuper = this.super;
137      this.super = parent;
138      var ret = fn.apply(this, arguments);
139      if (previousSuper) {
140        this.super = previousSuper;
141      }
142      else {
143        delete this.super;
144      }
145      return ret;
146    };
147  };
148
149  /**
150   * Provide a helper method for displaying when something is went wrong.
151   *
152   * @param {String} message
153   *   The message to display.
154   * @param {Object} [args]
155   *   An arguments to use in message.
156   *
157   * @return {Boolean}
158   *   Always returns FALSE.
159   */
160  Bootstrap.fatal = function (message, args) {
161    if (this.settings.dev && console.warn) {
162      for (var name in args) {
163        if (args.hasOwnProperty(name) && typeof args[name] === 'object') {
164          args[name] = JSON.stringify(args[name]);
165        }
166      }
167      Drupal.throwError(new Error(Drupal.formatString(message, args)));
168    }
169    return false;
170  };
171
172  /**
173   * Intersects object properties.
174   *
175   * @param {...Object} objects
176   *   Two or more objects. The first object will be used to return properties
177   *   values.
178   *
179   * @return {Object}
180   *   Returns the properties of first passed object that intersects with all
181   *   other passed objects.
182   */
183  Bootstrap.intersectObjects = function (objects) {
184    var args = Array.prototype.slice.call(arguments);
185    return _.pick(args[0], _.intersection.apply(_, _.map(args, function (obj) {
186      return Object.keys(obj);
187    })));
188  };
189
190  /**
191   * Normalizes an object's values.
192   *
193   * @param {Object} obj
194   *   The object to normalize.
195   *
196   * @return {Object}
197   *   The normalized object.
198   */
199  Bootstrap.normalizeObject = function (obj) {
200    if (!$.isPlainObject(obj)) {
201      return obj;
202    }
203
204    for (var k in obj) {
205      if (typeof obj[k] === 'string') {
206        if (obj[k] === 'true') {
207          obj[k] = true;
208        }
209        else if (obj[k] === 'false') {
210          obj[k] = false;
211        }
212        else if (obj[k].match(/^[\d-.]$/)) {
213          obj[k] = parseFloat(obj[k]);
214        }
215      }
216      else if ($.isPlainObject(obj[k])) {
217        obj[k] = Bootstrap.normalizeObject(obj[k]);
218      }
219    }
220
221    return obj;
222  };
223
224  /**
225   * An object based once plugin (similar to jquery.once, but without the DOM).
226   *
227   * @param {String} id
228   *   A unique identifier.
229   * @param {Function} callback
230   *   The callback to invoke if the identifier has not yet been seen.
231   *
232   * @return {Bootstrap}
233   */
234  Bootstrap.once = function (id, callback) {
235    // Immediately return if identifier has already been processed.
236    if (this.processedOnce[id]) {
237      return this;
238    }
239    callback.call(this, this.settings);
240    this.processedOnce[id] = true;
241    return this;
242  };
243
244  /**
245   * Provide jQuery UI like ability to get/set options for Bootstrap plugins.
246   *
247   * @param {string|object} key
248   *   A string value of the option to set, can be dot like to a nested key.
249   *   An object of key/value pairs.
250   * @param {*} [value]
251   *   (optional) A value to set for key.
252   *
253   * @returns {*}
254   *   - Returns nothing if key is an object or both key and value parameters
255   *   were provided to set an option.
256   *   - Returns the a value for a specific setting if key was provided.
257   *   - Returns an object of key/value pairs of all the options if no key or
258   *   value parameter was provided.
259   *
260   * @see https://github.com/jquery/jquery-ui/blob/master/ui/widget.js
261   */
262  Bootstrap.option = function (key, value) {
263    var options = $.isPlainObject(key) ? $.extend({}, key) : {};
264
265    // Get all options (clone so it doesn't reference the internal object).
266    if (arguments.length === 0) {
267      return $.extend({}, this.options);
268    }
269
270    // Get/set single option.
271    if (typeof key === "string") {
272      // Handle nested keys in dot notation.
273      // e.g., "foo.bar" => { foo: { bar: true } }
274      var parts = key.split('.');
275      key = parts.shift();
276      var obj = options;
277      if (parts.length) {
278        for (var i = 0; i < parts.length - 1; i++) {
279          obj[parts[i]] = obj[parts[i]] || {};
280          obj = obj[parts[i]];
281        }
282        key = parts.pop();
283      }
284
285      // Get.
286      if (arguments.length === 1) {
287        return obj[key] === void 0 ? null : obj[key];
288      }
289
290      // Set.
291      obj[key] = value;
292    }
293
294    // Set multiple options.
295    $.extend(true, this.options, options);
296  };
297
298  /**
299   * Adds a ".noConflict()" helper method if needed.
300   *
301   * @param {String} id
302   *   A jQuery plugin identifier located in $.fn.
303   * @param {Function} plugin
304   * @param {Function} plugin
305   *   A constructor function used to initialize the for the jQuery plugin.
306   * @param {Boolean} [noConflict]
307   *   Flag indicating whether or not to create a ".noConflict()" helper method
308   *   for the plugin.
309   */
310  Bootstrap.pluginNoConflict = function (id, plugin, noConflict) {
311    if (plugin.noConflict === void 0 && (noConflict === void 0 || noConflict)) {
312      var old = $.fn[id];
313      plugin.noConflict = function () {
314        $.fn[id] = old;
315        return this;
316      };
317    }
318  };
319
320  /**
321   * Creates a handler that relays to another event name.
322   *
323   * @param {HTMLElement|jQuery} target
324   *   A target element.
325   * @param {String} name
326   *   The name of the event to trigger.
327   * @param {Boolean} [stopPropagation=true]
328   *   Flag indicating whether to stop the propagation of the event, defaults
329   *   to true.
330   *
331   * @return {Function}
332   *   An even handler callback function.
333   */
334  Bootstrap.relayEvent = function (target, name, stopPropagation) {
335    return function (e) {
336      if (stopPropagation === void 0 || stopPropagation) {
337        e.stopPropagation();
338      }
339      var $target = $(target);
340      var parts = name.split('.').filter(Boolean);
341      var type = parts.shift();
342      e.target = $target[0];
343      e.currentTarget = $target[0];
344      e.namespace = parts.join('.');
345      e.type = type;
346      $target.trigger(e);
347    };
348  };
349
350  /**
351   * Replaces a Bootstrap jQuery plugin definition.
352   *
353   * @param {String} id
354   *   A jQuery plugin identifier located in $.fn.
355   * @param {Function} callback
356   *   A callback function that is immediately invoked and must return a
357   *   function that will be used as the plugin constructor.
358   * @param {Boolean} [noConflict]
359   *   Flag indicating whether or not to create a ".noConflict()" helper method
360   *   for the plugin.
361   */
362  Bootstrap.replacePlugin = function (id, callback, noConflict) {
363    // Immediately return if plugin doesn't exist.
364    if (typeof $.fn[id] !== 'function') {
365      return this.fatal('Specified jQuery plugin identifier does not exist: @id', {'@id':  id});
366    }
367
368    // Immediately return if callback isn't a function.
369    if (typeof callback !== 'function') {
370      return this.fatal('You must provide a valid callback function to replace a jQuery plugin: @callback', {'@callback': callback});
371    }
372
373    // Determine existing plugin constructor.
374    var constructor = $.fn[id] && $.fn[id].Constructor || $.fn[id];
375    var plugin = callback.apply(constructor, [this.settings]);
376
377    // Immediately return if plugin isn't a function.
378    if (typeof plugin !== 'function') {
379      return this.fatal('Returned value from callback is not a usable function to replace a jQuery plugin "@id": @plugin', {'@id': id, '@plugin': plugin});
380    }
381
382    this.wrapPluginConstructor(constructor, plugin);
383
384    // Add a ".noConflict()" helper method.
385    this.pluginNoConflict(id, plugin, noConflict);
386
387    $.fn[id] = plugin;
388  };
389
390  /**
391   * Simulates a native event on an element in the browser.
392   *
393   * Note: This is a fairly complete modern implementation. If things aren't
394   * working quite the way you intend (in older browsers), you may wish to use
395   * the jQuery.simulate plugin. If it's available, this method will defer to
396   * that plugin.
397   *
398   * @see https://github.com/jquery/jquery-simulate
399   *
400   * @param {HTMLElement|jQuery} element
401   *   A DOM element to dispatch event on. Note: this may be a jQuery object,
402   *   however be aware that this will trigger the same event for each element
403   *   inside the jQuery collection; use with caution.
404   * @param {String|String[]} type
405   *   The type(s) of event to simulate.
406   * @param {Object} [options]
407   *   An object of options to pass to the event constructor. Typically, if
408   *   an event is being proxied, you should just pass the original event
409   *   object here. This allows, if the browser supports it, to be a truly
410   *   simulated event.
411   *
412   * @return {Boolean}
413   *   The return value is false if event is cancelable and at least one of the
414   *   event handlers which handled this event called Event.preventDefault().
415   *   Otherwise it returns true.
416   */
417  Bootstrap.simulate = function (element, type, options) {
418    // Handle jQuery object wrappers so it triggers on each element.
419    var ret = true;
420    if (element instanceof $) {
421      element.each(function () {
422        if (!Bootstrap.simulate(this, type, options)) {
423          ret = false;
424        }
425      });
426      return ret;
427    }
428
429    if (!(element instanceof HTMLElement)) {
430      this.fatal('Passed element must be an instance of HTMLElement, got "@type" instead.', {
431        '@type': typeof element,
432      });
433    }
434
435    // Defer to the jQuery.simulate plugin, if it's available.
436    if (typeof $.simulate === 'function') {
437      new $.simulate(element, type, options);
438      return true;
439    }
440
441    var event;
442    var ctor;
443    var types = [].concat(type);
444    for (var i = 0, l = types.length; i < l; i++) {
445      type = types[i];
446      for (var name in this.eventMap) {
447        if (this.eventMap[name].test(type)) {
448          ctor = name;
449          break;
450        }
451      }
452      if (!ctor) {
453        throw new SyntaxError('Only rudimentary HTMLEvents, KeyboardEvents and MouseEvents are supported: ' + type);
454      }
455      var opts = {bubbles: true, cancelable: true};
456      if (ctor === 'KeyboardEvent' || ctor === 'MouseEvent') {
457        $.extend(opts, {ctrlKey: !1, altKey: !1, shiftKey: !1, metaKey: !1});
458      }
459      if (ctor === 'MouseEvent') {
460        $.extend(opts, {button: 0, pointerX: 0, pointerY: 0, view: window});
461      }
462      if (options) {
463        $.extend(opts, options);
464      }
465      if (typeof window[ctor] === 'function') {
466        event = new window[ctor](type, opts);
467        if (!element.dispatchEvent(event)) {
468          ret = false;
469        }
470      }
471      else if (document.createEvent) {
472        event = document.createEvent(ctor);
473        event.initEvent(type, opts.bubbles, opts.cancelable);
474        if (!element.dispatchEvent(event)) {
475          ret = false;
476        }
477      }
478      else if (typeof element.fireEvent === 'function') {
479        event = $.extend(document.createEventObject(), opts);
480        if (!element.fireEvent('on' + type, event)) {
481          ret = false;
482        }
483      }
484      else if (typeof element[type]) {
485        element[type]();
486      }
487    }
488    return ret;
489  };
490
491  /**
492   * Strips HTML and returns just text.
493   *
494   * @param {String|Element|jQuery} html
495   *   A string of HTML content, an Element DOM object or a jQuery object.
496   *
497   * @return {String}
498   *   The text without HTML tags.
499   *
500   * @todo Replace with http://locutus.io/php/strings/strip_tags/
501   */
502  Bootstrap.stripHtml = function (html) {
503    if (html instanceof $) {
504      html = html.html();
505    }
506    else if (html instanceof Element) {
507      html = html.innerHTML;
508    }
509    var tmp = document.createElement('DIV');
510    tmp.innerHTML = html;
511    return (tmp.textContent || tmp.innerText || '').replace(/^[\s\n\t]*|[\s\n\t]*$/, '');
512  };
513
514  /**
515   * Provide a helper method for displaying when something is unsupported.
516   *
517   * @param {String} type
518   *   The type of unsupported object, e.g. method or option.
519   * @param {String} name
520   *   The name of the unsupported object.
521   * @param {*} [value]
522   *   The value of the unsupported object.
523   */
524  Bootstrap.unsupported = function (type, name, value) {
525    Bootstrap.warn('Unsupported by Drupal Bootstrap: (@type) @name -> @value', {
526      '@type': type,
527      '@name': name,
528      '@value': typeof value === 'object' ? JSON.stringify(value) : value
529    });
530  };
531
532  /**
533   * Provide a helper method to display a warning.
534   *
535   * @param {String} message
536   *   The message to display.
537   * @param {Object} [args]
538   *   Arguments to use as replacements in Drupal.formatString.
539   */
540  Bootstrap.warn = function (message, args) {
541    if (this.settings.dev && console.warn) {
542      console.warn(Drupal.formatString(message, args));
543    }
544  };
545
546  /**
547   * Wraps a plugin with common functionality.
548   *
549   * @param {Function} constructor
550   *   A plugin constructor being wrapped.
551   * @param {Object|Function} plugin
552   *   The plugin being wrapped.
553   * @param {Boolean} [extend = false]
554   *   Whether to add super extensibility.
555   */
556  Bootstrap.wrapPluginConstructor = function (constructor, plugin, extend) {
557    var proto = constructor.prototype;
558
559    // Add a jQuery UI like option getter/setter method.
560    var option = this.option;
561    if (proto.option === void(0)) {
562      proto.option = function () {
563        return option.apply(this, arguments);
564      };
565    }
566
567    if (extend) {
568      // Handle prototype properties separately.
569      if (plugin.prototype !== void 0) {
570        for (var key in plugin.prototype) {
571          if (!plugin.prototype.hasOwnProperty(key)) continue;
572          var value = plugin.prototype[key];
573          if (typeof value === 'function') {
574            proto[key] = this.superWrapper(proto[key] || function () {}, value);
575          }
576          else {
577            proto[key] = $.isPlainObject(value) ? $.extend(true, {}, proto[key], value) : value;
578          }
579        }
580      }
581      delete plugin.prototype;
582
583      // Handle static properties.
584      for (key in plugin) {
585        if (!plugin.hasOwnProperty(key)) continue;
586        value = plugin[key];
587        if (typeof value === 'function') {
588          constructor[key] = this.superWrapper(constructor[key] || function () {}, value);
589        }
590        else {
591          constructor[key] = $.isPlainObject(value) ? $.extend(true, {}, constructor[key], value) : value;
592        }
593      }
594    }
595  };
596
597  // Add Bootstrap to the global Drupal object.
598  Drupal.bootstrap = Drupal.bootstrap || Bootstrap;
599
600})(window._, window.jQuery, window.Drupal, window.drupalSettings);
601;
602(function ($, _) {
603
604  /**
605   * @class Attributes
606   *
607   * Modifies attributes.
608   *
609   * @param {Object|Attributes} attributes
610   *   An object to initialize attributes with.
611   */
612  var Attributes = function (attributes) {
613    this.data = {};
614    this.data['class'] = [];
615    this.merge(attributes);
616  };
617
618  /**
619   * Renders the attributes object as a string to inject into an HTML element.
620   *
621   * @return {String}
622   *   A rendered string suitable for inclusion in HTML markup.
623   */
624  Attributes.prototype.toString = function () {
625    var output = '';
626    var name, value;
627    var checkPlain = function (str) {
628      return str && str.toString().replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;') || '';
629    };
630    var data = this.getData();
631    for (name in data) {
632      if (!data.hasOwnProperty(name)) continue;
633      value = data[name];
634      if (_.isFunction(value)) value = value();
635      if (_.isObject(value)) value = _.values(value);
636      if (_.isArray(value)) value = value.join(' ');
637      output += ' ' + checkPlain(name) + '="' + checkPlain(value) + '"';
638    }
639    return output;
640  };
641
642  /**
643   * Renders the Attributes object as a plain object.
644   *
645   * @return {Object}
646   *   A plain object suitable for inclusion in DOM elements.
647   */
648  Attributes.prototype.toPlainObject = function () {
649    var object = {};
650    var name, value;
651    var data = this.getData();
652    for (name in data) {
653      if (!data.hasOwnProperty(name)) continue;
654      value = data[name];
655      if (_.isFunction(value)) value = value();
656      if (_.isObject(value)) value = _.values(value);
657      if (_.isArray(value)) value = value.join(' ');
658      object[name] = value;
659    }
660    return object;
661  };
662
663  /**
664   * Add class(es) to the array.
665   *
666   * @param {string|Array} value
667   *   An individual class or an array of classes to add.
668   *
669   * @return {Attributes}
670   *
671   * @chainable
672   */
673  Attributes.prototype.addClass = function (value) {
674    var args = Array.prototype.slice.call(arguments);
675    this.data['class'] = this.sanitizeClasses(this.data['class'].concat(args));
676    return this;
677  };
678
679  /**
680   * Returns whether the requested attribute exists.
681   *
682   * @param {string} name
683   *   An attribute name to check.
684   *
685   * @return {boolean}
686   *   TRUE or FALSE
687   */
688  Attributes.prototype.exists = function (name) {
689    return this.data[name] !== void(0) && this.data[name] !== null;
690  };
691
692  /**
693   * Retrieve a specific attribute from the array.
694   *
695   * @param {string} name
696   *   The specific attribute to retrieve.
697   * @param {*} defaultValue
698   *   (optional) The default value to set if the attribute does not exist.
699   *
700   * @return {*}
701   *   A specific attribute value, passed by reference.
702   */
703  Attributes.prototype.get = function (name, defaultValue) {
704    if (!this.exists(name)) this.data[name] = defaultValue;
705    return this.data[name];
706  };
707
708  /**
709   * Retrieves a cloned copy of the internal attributes data object.
710   *
711   * @return {Object}
712   */
713  Attributes.prototype.getData = function () {
714    return _.extend({}, this.data);
715  };
716
717  /**
718   * Retrieves classes from the array.
719   *
720   * @return {Array}
721   *   The classes array.
722   */
723  Attributes.prototype.getClasses = function () {
724    return this.get('class', []);
725  };
726
727  /**
728   * Indicates whether a class is present in the array.
729   *
730   * @param {string|Array} className
731   *   The class(es) to search for.
732   *
733   * @return {boolean}
734   *   TRUE or FALSE
735   */
736  Attributes.prototype.hasClass = function (className) {
737    className = this.sanitizeClasses(Array.prototype.slice.call(arguments));
738    var classes = this.getClasses();
739    for (var i = 0, l = className.length; i < l; i++) {
740      // If one of the classes fails, immediately return false.
741      if (_.indexOf(classes, className[i]) === -1) {
742        return false;
743      }
744    }
745    return true;
746  };
747
748  /**
749   * Merges multiple values into the array.
750   *
751   * @param {Attributes|Node|jQuery|Object} object
752   *   An Attributes object with existing data, a Node DOM element, a jQuery
753   *   instance or a plain object where the key is the attribute name and the
754   *   value is the attribute value.
755   * @param {boolean} [recursive]
756   *   Flag determining whether or not to recursively merge key/value pairs.
757   *
758   * @return {Attributes}
759   *
760   * @chainable
761   */
762  Attributes.prototype.merge = function (object, recursive) {
763    // Immediately return if there is nothing to merge.
764    if (!object) {
765      return this;
766    }
767
768    // Get attributes from a jQuery element.
769    if (object instanceof $) {
770      object = object[0];
771    }
772
773    // Get attributes from a DOM element.
774    if (object instanceof Node) {
775      object = Array.prototype.slice.call(object.attributes).reduce(function (attributes, attribute) {
776        attributes[attribute.name] = attribute.value;
777        return attributes;
778      }, {});
779    }
780    // Get attributes from an Attributes instance.
781    else if (object instanceof Attributes) {
782      object = object.getData();
783    }
784    // Otherwise, clone the object.
785    else {
786      object = _.extend({}, object);
787    }
788
789    // By this point, there should be a valid plain object.
790    if (!$.isPlainObject(object)) {
791      setTimeout(function () {
792        throw new Error('Passed object is not supported: ' + object);
793      });
794      return this;
795    }
796
797    // Handle classes separately.
798    if (object && object['class'] !== void 0) {
799      this.addClass(object['class']);
800      delete object['class'];
801    }
802
803    if (recursive === void 0 || recursive) {
804      this.data = $.extend(true, {}, this.data, object);
805    }
806    else {
807      this.data = $.extend({}, this.data, object);
808    }
809
810    return this;
811  };
812
813  /**
814   * Removes an attribute from the array.
815   *
816   * @param {string} name
817   *   The name of the attribute to remove.
818   *
819   * @return {Attributes}
820   *
821   * @chainable
822   */
823  Attributes.prototype.remove = function (name) {
824    if (this.exists(name)) delete this.data[name];
825    return this;
826  };
827
828  /**
829   * Removes a class from the attributes array.
830   *
831   * @param {...string|Array} className
832   *   An individual class or an array of classes to remove.
833   *
834   * @return {Attributes}
835   *
836   * @chainable
837   */
838  Attributes.prototype.removeClass = function (className) {
839    var remove = this.sanitizeClasses(Array.prototype.slice.apply(arguments));
840    this.data['class'] = _.without(this.getClasses(), remove);
841    return this;
842  };
843
844  /**
845   * Replaces a class in the attributes array.
846   *
847   * @param {string} oldValue
848   *   The old class to remove.
849   * @param {string} newValue
850   *   The new class. It will not be added if the old class does not exist.
851   *
852   * @return {Attributes}
853   *
854   * @chainable
855   */
856  Attributes.prototype.replaceClass = function (oldValue, newValue) {
857    var classes = this.getClasses();
858    var i = _.indexOf(this.sanitizeClasses(oldValue), classes);
859    if (i >= 0) {
860      classes[i] = newValue;
861      this.set('class', classes);
862    }
863    return this;
864  };
865
866  /**
867   * Ensures classes are flattened into a single is an array and sanitized.
868   *
869   * @param {...String|Array} classes
870   *   The class or classes to sanitize.
871   *
872   * @return {Array}
873   *   A sanitized array of classes.
874   */
875  Attributes.prototype.sanitizeClasses = function (classes) {
876    return _.chain(Array.prototype.slice.call(arguments))
877      // Flatten in case there's a mix of strings and arrays.
878      .flatten()
879
880      // Split classes that may have been added with a space as a separator.
881      .map(function (string) {
882        return string.split(' ');
883      })
884
885      // Flatten again since it was just split into arrays.
886      .flatten()
887
888      // Filter out empty items.
889      .filter()
890
891      // Clean the class to ensure it's a valid class name.
892      .map(function (value) {
893        return Attributes.cleanClass(value);
894      })
895
896      // Ensure classes are unique.
897      .uniq()
898
899      // Retrieve the final value.
900      .value();
901  };
902
903  /**
904   * Sets an attribute on the array.
905   *
906   * @param {string} name
907   *   The name of the attribute to set.
908   * @param {*} value
909   *   The value of the attribute to set.
910   *
911   * @return {Attributes}
912   *
913   * @chainable
914   */
915  Attributes.prototype.set = function (name, value) {
916    var obj = $.isPlainObject(name) ? name : {};
917    if (typeof name === 'string') {
918      obj[name] = value;
919    }
920    return this.merge(obj);
921  };
922
923  /**
924   * Prepares a string for use as a CSS identifier (element, class, or ID name).
925   *
926   * Note: this is essentially a direct copy from
927   * \Drupal\Component\Utility\Html::cleanCssIdentifier
928   *
929   * @param {string} identifier
930   *   The identifier to clean.
931   * @param {Object} [filter]
932   *   An object of string replacements to use on the identifier.
933   *
934   * @return {string}
935   *   The cleaned identifier.
936   */
937  Attributes.cleanClass = function (identifier, filter) {
938    filter = filter || {
939      ' ': '-',
940      '_': '-',
941      '/': '-',
942      '[': '-',
943      ']': ''
944    };
945
946    identifier = identifier.toLowerCase();
947
948    if (filter['__'] === void 0) {
949      identifier = identifier.replace('__', '#DOUBLE_UNDERSCORE#');
950    }
951
952    identifier = identifier.replace(Object.keys(filter), Object.keys(filter).map(function(key) { return filter[key]; }));
953
954    if (filter['__'] === void 0) {
955      identifier = identifier.replace('#DOUBLE_UNDERSCORE#', '__');
956    }
957
958    identifier = identifier.replace(/[^\u002D\u0030-\u0039\u0041-\u005A\u005F\u0061-\u007A\u00A1-\uFFFF]/g, '');
959    identifier = identifier.replace(['/^[0-9]/', '/^(-[0-9])|^(--)/'], ['_', '__']);
960
961    return identifier;
962  };
963
964  /**
965   * Creates an Attributes instance.
966   *
967   * @param {object|Attributes} [attributes]
968   *   An object to initialize attributes with.
969   *
970   * @return {Attributes}
971   *   An Attributes instance.
972   *
973   * @constructor
974   */
975  Attributes.create = function (attributes) {
976    return new Attributes(attributes);
977  };
978
979  window.Attributes = Attributes;
980
981})(window.jQuery, window._);
982;
983/**
984 * @file
985 * Theme hooks for the Drupal Bootstrap base theme.
986 */
987(function ($, Drupal, Bootstrap, Attributes) {
988
989  /**
990   * Fallback for theming an icon if the Icon API module is not installed.
991   */
992  if (!Drupal.icon) Drupal.icon = { bundles: {} };
993  if (!Drupal.theme.icon || Drupal.theme.prototype.icon) {
994    $.extend(Drupal.theme, /** @lends Drupal.theme */ {
995      /**
996       * Renders an icon.
997       *
998       * @param {string} bundle
999       *   The bundle which the icon belongs to.
1000       * @param {string} icon
1001       *   The name of the icon to render.
1002       * @param {object|Attributes} [attributes]
1003       *   An object of attributes to also apply to the icon.
1004       *
1005       * @returns {string}
1006       */
1007      icon: function (bundle, icon, attributes) {
1008        if (!Drupal.icon.bundles[bundle]) return '';
1009        attributes = Attributes.create(attributes).addClass('icon').set('aria-hidden', 'true');
1010        icon = Drupal.icon.bundles[bundle](icon, attributes);
1011        return '<span' + attributes + '></span>';
1012      }
1013    });
1014  }
1015
1016  /**
1017   * Callback for modifying an icon in the "bootstrap" icon bundle.
1018   *
1019   * @param {string} icon
1020   *   The icon being rendered.
1021   * @param {Attributes} attributes
1022   *   Attributes object for the icon.
1023   */
1024  Drupal.icon.bundles.bootstrap = function (icon, attributes) {
1025    attributes.addClass(['glyphicon', 'glyphicon-' + icon]);
1026  };
1027
1028  /**
1029   * Add necessary theming hooks.
1030   */
1031  $.extend(Drupal.theme, /** @lends Drupal.theme */ {
1032
1033    /**
1034     * Renders a Bootstrap AJAX glyphicon throbber.
1035     *
1036     * @returns {string}
1037     */
1038    ajaxThrobber: function () {
1039      return Drupal.theme('bootstrapIcon', 'refresh', {'class': ['ajax-throbber', 'glyphicon-spin'] });
1040    },
1041
1042    /**
1043     * Renders a button element.
1044     *
1045     * @param {object|Attributes} attributes
1046     *   An object of attributes to apply to the button. If it contains one of:
1047     *   - value: The label of the button.
1048     *   - context: The context type of Bootstrap button, can be one of:
1049     *     - default
1050     *     - primary
1051     *     - success
1052     *     - info
1053     *     - warning
1054     *     - danger
1055     *     - link
1056     *
1057     * @returns {string}
1058     */
1059    button: function (attributes) {
1060      attributes = Attributes.create(attributes).addClass('btn');
1061      var context = attributes.get('context', 'default');
1062      var label = attributes.get('value', '');
1063      attributes.remove('context').remove('value');
1064      if (!attributes.hasClass(['btn-default', 'btn-primary', 'btn-success', 'btn-info', 'btn-warning', 'btn-danger', 'btn-link'])) {
1065        attributes.addClass('btn-' + Bootstrap.checkPlain(context));
1066      }
1067
1068      // Attempt to, intelligently, provide a default button "type".
1069      if (!attributes.exists('type')) {
1070        attributes.set('type', attributes.hasClass('form-submit') ? 'submit' : 'button');
1071      }
1072
1073      return '<button' + attributes + '>' + label + '</button>';
1074    },
1075
1076    /**
1077     * Alias for "button" theme hook.
1078     *
1079     * @param {object|Attributes} attributes
1080     *   An object of attributes to apply to the button.
1081     *
1082     * @see Drupal.theme.button()
1083     *
1084     * @returns {string}
1085     */
1086    btn: function (attributes) {
1087      return Drupal.theme('button', attributes);
1088    },
1089
1090    /**
1091     * Renders a button block element.
1092     *
1093     * @param {object|Attributes} attributes
1094     *   An object of attributes to apply to the button.
1095     *
1096     * @see Drupal.theme.button()
1097     *
1098     * @returns {string}
1099     */
1100    'btn-block': function (attributes) {
1101      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-block'));
1102    },
1103
1104    /**
1105     * Renders a large button element.
1106     *
1107     * @param {object|Attributes} attributes
1108     *   An object of attributes to apply to the button.
1109     *
1110     * @see Drupal.theme.button()
1111     *
1112     * @returns {string}
1113     */
1114    'btn-lg': function (attributes) {
1115      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-lg'));
1116    },
1117
1118    /**
1119     * Renders a small button element.
1120     *
1121     * @param {object|Attributes} attributes
1122     *   An object of attributes to apply to the button.
1123     *
1124     * @see Drupal.theme.button()
1125     *
1126     * @returns {string}
1127     */
1128    'btn-sm': function (attributes) {
1129      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-sm'));
1130    },
1131
1132    /**
1133     * Renders an extra small button element.
1134     *
1135     * @param {object|Attributes} attributes
1136     *   An object of attributes to apply to the button.
1137     *
1138     * @see Drupal.theme.button()
1139     *
1140     * @returns {string}
1141     */
1142    'btn-xs': function (attributes) {
1143      return Drupal.theme('button', Attributes.create(attributes).addClass('btn-xs'));
1144    },
1145
1146    /**
1147     * Renders a glyphicon.
1148     *
1149     * @param {string} name
1150     *   The name of the glyphicon.
1151     * @param {object|Attributes} [attributes]
1152     *   An object of attributes to apply to the icon.
1153     *
1154     * @returns {string}
1155     */
1156    bootstrapIcon: function (name, attributes) {
1157      return Drupal.theme('icon', 'bootstrap', name, attributes);
1158    }
1159
1160  });
1161
1162})(window.jQuery, window.Drupal, window.Drupal.bootstrap, window.Attributes);
1163;
1164/*
1165 *  Bootstrap Dropdown Hover - v4.2.0
1166 *  Open dropdown menus on mouse hover, the proper way.
1167 *  http://www.virtuosoft.eu/code/bootstrap-dropdown-hover/
1168 *
1169 *  Made by István Ujj-Mészáros
1170 *  Under Apache License v2.0 License
1171 */
1172
1173!function(o){"function"==typeof define&&define.amd?define(["jquery"],o):"object"==typeof module&&module.exports?module.exports=function(e,t){return void 0===t&&(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),o(t),t}:o(jQuery)}(function(i){var n,r,d="bootstrapDropdownHover",o={clickBehavior:"sticky",hideTimeout:200},s=!1;function a(e,t){this.element=i(e),this.settings=i.extend({},o,t,this.element.data()),this._defaults=o,this._name=d,this.init()}function u(e){var t,o=e.attr("data-target");return o||(o=(o=e.attr("href"))&&/#[A-Za-z]/.test(o)&&o.replace(/.*(?=#[^\s]*$)/,"")),(t=o&&i(o))&&t.length||(t=e.parent()),t}r=function(){var e=" -webkit- -moz- -o- -ms- ".split(" ");if("ontouchstart"in window||window.DocumentTouch&&document instanceof DocumentTouch)return!0;var t,o=["(",e.join("touch-enabled),("),"heartz",")"].join("");return t=o,window.matchMedia(t).matches}(),a.prototype={init:function(){var t,o;return this.setClickBehavior(this.settings.clickBehavior),this.setHideTimeout(this.settings.hideTimeout),o=u((t=this).element),i(".dropdown-toggle, .dropdown-menu",o).on("mouseenter.dropdownhover",function(){r||(clearTimeout(n),o.is(".open, .show")||(s=!1,t.element.dropdown("toggle")))}),i(".dropdown-toggle, .dropdown-menu",o).on("mouseleave.dropdownhover",function(){r||s||(n=setTimeout(function(){o.is(".open, .show")&&t.element.dropdown("toggle")},t.settings.hideTimeout))}),t.element.on("click.dropdownhover",function(e){if("link"===t.settings.clickBehavior||!r)switch(t.settings.clickBehavior){case"default":return;case"disable":return e.preventDefault(),void e.stopImmediatePropagation();case"link":return void e.stopImmediatePropagation();case"sticky":return void(s?s=!1:(s=!0,o.is(".open, .show")&&(e.stopImmediatePropagation(),e.preventDefault())))}}),this.element},setClickBehavior:function(e){return this.settings.clickBehavior=e,this.element},setHideTimeout:function(e){return this.settings.hideTimeout=e,this.element},destroy:function(){var e,t;return clearTimeout(n),t=u((e=this).element),i(".dropdown-toggle, .dropdown-menu",t).off(".dropdownhover"),i(".dropdown-toggle, .dropdown-menu",t).off(".dropdown"),e.element.off(".dropdownhover"),i("body").off(".dropdownhover"),this.element.data("plugin_"+d,null),this.element}},i.fn[d]=function(o){var t,n=arguments;return void 0===o||"object"==typeof o?(i.contains(document,i(this)[0])||i('[data-toggle="dropdown"]').each(function(e,t){i(t).bootstrapDropdownHover(o)}),this.each(function(){i(this).hasClass("dropdown-toggle")&&"dropdown"===i(this).data("toggle")?i.data(this,"plugin_"+d)||i.data(this,"plugin_"+d,new a(this,o)):i('[data-toggle="dropdown"]',this).each(function(e,t){i(t).bootstrapDropdownHover(o)})})):"string"==typeof o&&"_"!==o[0]&&"init"!==o?(this.each(function(){var e=i.data(this,"plugin_"+d);e instanceof a&&"function"==typeof e[o]&&(t=e[o].apply(e,Array.prototype.slice.call(n,1)))}),void 0!==t?t:this):void 0}});
1174
1175jQuery('#block-lpnu-main-menu').bootstrapDropdownHover();
1176
1177;
1178/**
1179 * @file
1180 * Attaches several event listener to a web page.
1181 */
1182
1183(function ($, Drupal, drupalSettings) {
1184
1185  /* eslint max-nested-callbacks: ["error", 4] */
1186
1187  'use strict';
1188
1189  Drupal.google_analytics = {};
1190
1191  $(document).ready(function () {
1192
1193    // Attach mousedown, keyup, touchstart events to document only and catch
1194    // clicks on all elements.
1195    $(document.body).on('mousedown keyup touchstart', function (event) {
1196
1197      // Catch the closest surrounding link of a clicked element.
1198      $(event.target).closest('a,area').each(function () {
1199
1200        // Is the clicked URL internal?
1201        if (Drupal.google_analytics.isInternal(this.href)) {
1202          // Skip 'click' tracking, if custom tracking events are bound.
1203          if ($(this).is('.colorbox') && (drupalSettings.google_analytics.trackColorbox)) {
1204            // Do nothing here. The custom event will handle all tracking.
1205            // console.info('Click on .colorbox item has been detected.');
1206          }
1207          // Is download tracking activated and the file extension configured
1208          // for download tracking?
1209          else if (drupalSettings.google_analytics.trackDownload && Drupal.google_analytics.isDownload(this.href)) {
1210            // Download link clicked.
1211            ga('send', {
1212              hitType: 'event',
1213              eventCategory: 'Downloads',
1214              eventAction: Drupal.google_analytics.getDownloadExtension(this.href).toUpperCase(),
1215              eventLabel: Drupal.google_analytics.getPageUrl(this.href),
1216              transport: 'beacon'
1217            });
1218          }
1219          else if (Drupal.google_analytics.isInternalSpecial(this.href)) {
1220            // Keep the internal URL for Google Analytics website overlay intact.
1221            ga('send', {
1222              hitType: 'pageview',
1223              page: Drupal.google_analytics.getPageUrl(this.href),
1224              transport: 'beacon'
1225            });
1226          }
1227        }
1228        else {
1229          if (drupalSettings.google_analytics.trackMailto && $(this).is("a[href^='mailto:'],area[href^='mailto:']")) {
1230            // Mailto link clicked.
1231            ga('send', {
1232              hitType: 'event',
1233              eventCategory: 'Mails',
1234              eventAction: 'Click',
1235              eventLabel: this.href.substring(7),
1236              transport: 'beacon'
1237            });
1238          }
1239          else if (drupalSettings.google_analytics.trackOutbound && this.href.match(/^\w+:\/\//i)) {
1240            if (drupalSettings.google_analytics.trackDomainMode !== 2 || (drupalSettings.google_analytics.trackDomainMode === 2 && !Drupal.google_analytics.isCrossDomain(this.hostname, drupalSettings.google_analytics.trackCrossDomains))) {
1241              // External link clicked / No top-level cross domain clicked.
1242              ga('send', {
1243                hitType: 'event',
1244                eventCategory: 'Outbound links',
1245                eventAction: 'Click',
1246                eventLabel: this.href,
1247                transport: 'beacon'
1248              });
1249            }
1250          }
1251        }
1252      });
1253    });
1254
1255    // Track hash changes as unique pageviews, if this option has been enabled.
1256    if (drupalSettings.google_analytics.trackUrlFragments) {
1257      window.onhashchange = function () {
1258        ga('send', {
1259          hitType: 'pageview',
1260          page: location.pathname + location.search + location.hash
1261        });
1262      };
1263    }
1264
1265    // Colorbox: This event triggers when the transition has completed and the
1266    // newly loaded content has been revealed.
1267    if (drupalSettings.google_analytics.trackColorbox) {
1268      $(document).on('cbox_complete', function () {
1269        var href = $.colorbox.element().attr('href');
1270        if (href) {
1271          ga('send', {
1272            hitType: 'pageview',
1273            page: Drupal.google_analytics.getPageUrl(href)
1274          });
1275        }
1276      });
1277    }
1278
1279  });
1280
1281  /**
1282   * Check whether the hostname is part of the cross domains or not.
1283   *
1284   * @param {string} hostname
1285   *   The hostname of the clicked URL.
1286   * @param {array} crossDomains
1287   *   All cross domain hostnames as JS array.
1288   *
1289   * @return {boolean} isCrossDomain
1290   */
1291  Drupal.google_analytics.isCrossDomain = function (hostname, crossDomains) {
1292    return $.inArray(hostname, crossDomains) > -1 ? true : false;
1293  };
1294
1295  /**
1296   * Check whether this is a download URL or not.
1297   *
1298   * @param {string} url
1299   *   The web url to check.
1300   *
1301   * @return {boolean} isDownload
1302   */
1303  Drupal.google_analytics.isDownload = function (url) {
1304    var isDownload = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i');
1305    return isDownload.test(url);
1306  };
1307
1308  /**
1309   * Check whether this is an absolute internal URL or not.
1310   *
1311   * @param {string} url
1312   *   The web url to check.
1313   *
1314   * @return {boolean} isInternal
1315   */
1316  Drupal.google_analytics.isInternal = function (url) {
1317    var isInternal = new RegExp('^(https?):\/\/' + window.location.host, 'i');
1318    return isInternal.test(url);
1319  };
1320
1321  /**
1322   * Check whether this is a special URL or not.
1323   *
1324   * URL types:
1325   *  - gotwo.module /go/* links.
1326   *
1327   * @param {string} url
1328   *   The web url to check.
1329   *
1330   * @return {boolean} isInternalSpecial
1331   */
1332  Drupal.google_analytics.isInternalSpecial = function (url) {
1333    var isInternalSpecial = new RegExp('(\/go\/.*)$', 'i');
1334    return isInternalSpecial.test(url);
1335  };
1336
1337  /**
1338   * Extract the relative internal URL from an absolute internal URL.
1339   *
1340   * Examples:
1341   * - https://mydomain.com/node/1 -> /node/1
1342   * - https://example.com/foo/bar -> https://example.com/foo/bar
1343   *
1344   * @param {string} url
1345   *   The web url to check.
1346   *
1347   * @return {string} getPageUrl
1348   *   Internal website URL.
1349   */
1350  Drupal.google_analytics.getPageUrl = function (url) {
1351    var extractInternalUrl = new RegExp('^(https?):\/\/' + window.location.host, 'i');
1352    return url.replace(extractInternalUrl, '');
1353  };
1354
1355  /**
1356   * Extract the download file extension from the URL.
1357   *
1358   * @param {string} url
1359   *   The web url to check.
1360   *
1361   * @return {string} getDownloadExtension
1362   *   The file extension of the passed url. e.g. 'zip', 'txt'
1363   */
1364  Drupal.google_analytics.getDownloadExtension = function (url) {
1365    var extractDownloadextension = new RegExp('\\.(' + drupalSettings.google_analytics.trackDownloadExtensions + ')([\?#].*)?$', 'i');
1366    var extension = extractDownloadextension.exec(url);
1367    return (extension === null) ? '' : extension[1];
1368  };
1369
1370})(jQuery, Drupal, drupalSettings);
1371;
1372/**
1373 * @file
1374 * Bootstrap Popovers.
1375 */
1376
1377var Drupal = Drupal || {};
1378
1379(function ($, Drupal, Bootstrap) {
1380  "use strict";
1381
1382  var $document = $(document);
1383
1384  /**
1385   * Extend the Bootstrap Popover plugin constructor class.
1386   */
1387  Bootstrap.extendPlugin('popover', function (settings) {
1388    return {
1389      DEFAULTS: {
1390        animation: !!settings.popover_animation,
1391        autoClose: !!settings.popover_auto_close,
1392        enabled: settings.popover_enabled,
1393        html: !!settings.popover_html,
1394        placement: settings.popover_placement,
1395        selector: settings.popover_selector,
1396        trigger: settings.popover_trigger,
1397        title: settings.popover_title,
1398        content: settings.popover_content,
1399        delay: parseInt(settings.popover_delay, 10),
1400        container: settings.popover_container
1401      }
1402    };
1403  });
1404
1405  /**
1406   * Bootstrap Popovers.
1407   *
1408   * @todo This should really be properly delegated if selector option is set.
1409   */
1410  Drupal.behaviors.bootstrapPopovers = {
1411    $activePopover: null,
1412    attach: function (context) {
1413      // Immediately return if popovers are not available.
1414      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
1415        return;
1416      }
1417
1418      var _this = this;
1419
1420      $document
1421        .on('show.bs.popover', '[data-toggle=popover]', function () {
1422          var $trigger = $(this);
1423          var popover = $trigger.data('bs.popover');
1424
1425          // Only keep track of clicked triggers that we're manually handling.
1426          if (popover.options.originalTrigger === 'click') {
1427            if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($trigger)) {
1428              _this.$activePopover.popover('hide');
1429            }
1430            _this.$activePopover = $trigger;
1431          }
1432        })
1433        // Unfortunately, :focusable is only made available when using jQuery
1434        // UI. While this would be the most semantic pseudo selector to use
1435        // here, jQuery UI may not always be loaded. Instead, just use :visible
1436        // here as this just needs some sort of selector here. This activates
1437        // delegate binding to elements in jQuery so it can work it's bubbling
1438        // focus magic since elements don't really propagate their focus events.
1439        // @see https://www.drupal.org/project/bootstrap/issues/3013236
1440        .on('focus.bs.popover', ':visible', function (e) {
1441          var $target = $(e.target);
1442          if (_this.$activePopover && _this.getOption('autoClose') && !_this.$activePopover.is($target) && !$target.closest('.popover.in')[0]) {
1443            _this.$activePopover.popover('hide');
1444            _this.$activePopover = null;
1445          }
1446        })
1447        .on('click.bs.popover', function (e) {
1448          var $target = $(e.target);
1449          if (_this.$activePopover && _this.getOption('autoClose') && !$target.is('[data-toggle=popover]') && !$target.closest('.popover.in')[0]) {
1450            _this.$activePopover.popover('hide');
1451            _this.$activePopover = null;
1452          }
1453        })
1454        .on('keyup.bs.popover', function (e) {
1455          if (_this.$activePopover && _this.getOption('autoClose') && e.which === 27) {
1456            _this.$activePopover.popover('hide');
1457            _this.$activePopover = null;
1458          }
1459        })
1460      ;
1461
1462      var elements = $(context).find('[data-toggle=popover]').toArray();
1463      for (var i = 0; i < elements.length; i++) {
1464        var $element = $(elements[i]);
1465        var options = $.extend({}, $.fn.popover.Constructor.DEFAULTS, $element.data());
1466
1467        // Store the original trigger.
1468        options.originalTrigger = options.trigger;
1469
1470        // If the trigger is "click", then we'll handle it manually here.
1471        if (options.trigger === 'click') {
1472          options.trigger = 'manual';
1473        }
1474
1475        // Retrieve content from a target element.
1476        var target = options.target || $element.is('a[href^="#"]') && $element.attr('href');
1477        var $target = $document.find(target).clone();
1478        if (!options.content && $target[0]) {
1479          $target.removeClass('visually-hidden hidden').removeAttr('aria-hidden');
1480          options.content = $target.wrap('<div/>').parent()[options.html ? 'html' : 'text']() || '';
1481        }
1482
1483        // Initialize the popover.
1484        $element.popover(options);
1485
1486        // Handle clicks manually.
1487        if (options.originalTrigger === 'click') {
1488          // To ensure the element is bound multiple times, remove any
1489          // previously set event handler before adding another one.
1490          $element
1491            .off('click.drupal.bootstrap.popover')
1492            .on('click.drupal.bootstrap.popover', function (e) {
1493              $(this).popover('toggle');
1494              e.preventDefault();
1495              e.stopPropagation();
1496            })
1497          ;
1498        }
1499      }
1500    },
1501    detach: function (context) {
1502      // Immediately return if popovers are not available.
1503      if (!$.fn.popover || !$.fn.popover.Constructor.DEFAULTS.enabled) {
1504        return;
1505      }
1506
1507      // Destroy all popovers.
1508      $(context).find('[data-toggle="popover"]')
1509        .off('click.drupal.bootstrap.popover')
1510        .popover('destroy')
1511      ;
1512    },
1513    getOption: function(name, defaultValue, element) {
1514      var $element = element ? $(element) : this.$activePopover;
1515      var options = $.extend(true, {}, $.fn.popover.Constructor.DEFAULTS, ($element && $element.data('bs.popover') || {}).options);
1516      if (options[name] !== void 0) {
1517        return options[name];
1518      }
1519      return defaultValue !== void 0 ? defaultValue : void 0;
1520    }
1521  };
1522
1523})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
1524;
1525/**
1526 * @file
1527 * Bootstrap Tooltips.
1528 */
1529
1530var Drupal = Drupal || {};
1531
1532(function ($, Drupal, Bootstrap) {
1533  "use strict";
1534
1535  /**
1536   * Extend the Bootstrap Tooltip plugin constructor class.
1537   */
1538  Bootstrap.extendPlugin('tooltip', function (settings) {
1539    return {
1540      DEFAULTS: {
1541        animation: !!settings.tooltip_animation,
1542        enabled: settings.tooltip_enabled,
1543        html: !!settings.tooltip_html,
1544        placement: settings.tooltip_placement,
1545        selector: settings.tooltip_selector,
1546        trigger: settings.tooltip_trigger,
1547        delay: parseInt(settings.tooltip_delay, 10),
1548        container: settings.tooltip_container
1549      }
1550    };
1551  });
1552
1553  /**
1554   * Bootstrap Tooltips.
1555   *
1556   * @todo This should really be properly delegated if selector option is set.
1557   */
1558  Drupal.behaviors.bootstrapTooltips = {
1559    attach: function (context) {
1560      // Immediately return if tooltips are not available.
1561      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
1562        return;
1563      }
1564
1565      var elements = $(context).find('[data-toggle="tooltip"]').toArray();
1566      for (var i = 0; i < elements.length; i++) {
1567        var $element = $(elements[i]);
1568        var options = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, $element.data());
1569        $element.tooltip(options);
1570      }
1571    },
1572    detach: function (context) {
1573      // Immediately return if tooltips are not available.
1574      if (!$.fn.tooltip || !$.fn.tooltip.Constructor.DEFAULTS.enabled) {
1575        return;
1576      }
1577
1578      // Destroy all tooltips.
1579      $(context).find('[data-toggle="tooltip"]').tooltip('destroy');
1580    }
1581  };
1582
1583})(window.jQuery, window.Drupal, window.Drupal.bootstrap);
1584;
1585/*!
1586 * Fotorama 4.6.4 | http://fotorama.io/license/
1587 */
1588fotoramaVersion="4.6.4",function(a,b,c,d,e){"use strict";function f(a){var b="bez_"+d.makeArray(arguments).join("_").replace(".","p");if("function"!=typeof d.easing[b]){var c=function(a,b){var c=[null,null],d=[null,null],e=[null,null],f=function(f,g){return e[g]=3*a[g],d[g]=3*(b[g]-a[g])-e[g],c[g]=1-e[g]-d[g],f*(e[g]+f*(d[g]+f*c[g]))},g=function(a){return e[0]+a*(2*d[0]+3*c[0]*a)},h=function(a){for(var b,c=a,d=0;++d<14&&(b=f(c,0)-a,!(Math.abs(b)<.001));)c-=b/g(c);return c};return function(a){return f(h(a),1)}};d.easing[b]=function(b,d,e,f,g){return f*c([a[0],a[1]],[a[2],a[3]])(d/g)+e}}return b}function g(){}function h(a,b,c){return Math.max(isNaN(b)?-1/0:b,Math.min(isNaN(c)?1/0:c,a))}function i(a){return a.match(/ma/)&&a.match(/-?\d+(?!d)/g)[a.match(/3d/)?12:4]}function j(a){return Ic?+i(a.css("transform")):+a.css("left").replace("px","")}function k(a){var b={};return Ic?b.transform="translate3d("+a+"px,0,0)":b.left=a,b}function l(a){return{"transition-duration":a+"ms"}}function m(a,b){return isNaN(a)?b:a}function n(a,b){return m(+String(a).replace(b||"px",""))}function o(a){return/%$/.test(a)?n(a,"%"):e}function p(a,b){return m(o(a)/100*b,n(a))}function q(a){return(!isNaN(n(a))||!isNaN(n(a,"%")))&&a}function r(a,b,c,d){return(a-(d||0))*(b+(c||0))}function s(a,b,c,d){return-Math.round(a/(b+(c||0))-(d||0))}function t(a){var b=a.data();if(!b.tEnd){var c=a[0],d={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",msTransition:"MSTransitionEnd",transition:"transitionend"};T(c,d[uc.prefixed("transition")],function(a){b.tProp&&a.propertyName.match(b.tProp)&&b.onEndFn()}),b.tEnd=!0}}function u(a,b,c,d){var e,f=a.data();f&&(f.onEndFn=function(){e||(e=!0,clearTimeout(f.tT),c())},f.tProp=b,clearTimeout(f.tT),f.tT=setTimeout(function(){f.onEndFn()},1.5*d),t(a))}function v(a,b){if(a.length){var c=a.data();Ic?(a.css(l(0)),c.onEndFn=g,clearTimeout(c.tT)):a.stop();var d=w(b,function(){return j(a)});return a.css(k(d)),d}}function w(){for(var a,b=0,c=arguments.length;c>b&&(a=b?arguments[b]():arguments[b],"number"!=typeof a);b++);return a}function x(a,b){return Math.round(a+(b-a)/1.5)}function y(){return y.p=y.p||("https:"===c.protocol?"https://":"http://"),y.p}function z(a){var c=b.createElement("a");return c.href=a,c}function A(a,b){if("string"!=typeof a)return a;a=z(a);var c,d;if(a.host.match(/youtube\.com/)&&a.search){if(c=a.search.split("v=")[1]){var e=c.indexOf("&");-1!==e&&(c=c.substring(0,e)),d="youtube"}}else a.host.match(/youtube\.com|youtu\.be/)?(c=a.pathname.replace(/^\/(embed\/|v\/)?/,"").replace(/\/.*/,""),d="youtube"):a.host.match(/vimeo\.com/)&&(d="vimeo",c=a.pathname.replace(/^\/(video\/)?/,"").replace(/\/.*/,""));
1588return c&&d||!b||(c=a.href,d="custom"),c?{id:c,type:d,s:a.search.replace(/^\?/,""),p:y()}:!1}function B(a,b,c){var e,f,g=a.video;return"youtube"===g.type?(f=y()+"img.youtube.com/vi/"+g.id+"/default.jpg",e=f.replace(/\/default.jpg$/,"/hqdefault.jpg"),a.thumbsReady=!0):"vimeo"===g.type?d.ajax({url:y()+"vimeo.com/api/v2/video/"+g.id+".json",dataType:"jsonp",success:function(d){a.thumbsReady=!0,C(b,{img:d[0].thumbnail_large,thumb:d[0].thumbnail_small},a.i,c)}}):a.thumbsReady=!0,{img:e,thumb:f}}function C(a,b,c,e){for(var f=0,g=a.length;g>f;f++){var h=a[f];if(h.i===c&&h.thumbsReady){var i={videoReady:!0};i[Xc]=i[Zc]=i[Yc]=!1,e.splice(f,1,d.extend({},h,i,b));break}}}function D(a){function b(a,b,e){var f=a.children("img").eq(0),g=a.attr("href"),h=a.attr("src"),i=f.attr("src"),j=b.video,k=e?A(g,j===!0):!1;k?g=!1:k=j,c(a,f,d.extend(b,{video:k,img:b.img||g||h||i,thumb:b.thumb||i||h||g}))}function c(a,b,c){var e=c.thumb&&c.img!==c.thumb,f=n(c.width||a.attr("width")),g=n(c.height||a.attr("height"));d.extend(c,{width:f,height:g,thumbratio:S(c.thumbratio||n(c.thumbwidth||b&&b.attr("width")||e||f)/n(c.thumbheight||b&&b.attr("height")||e||g))})}var e=[];return a.children().each(function(){var a=d(this),f=R(d.extend(a.data(),{id:a.attr("id")}));if(a.is("a, img"))b(a,f,!0);else{if(a.is(":empty"))return;c(a,null,d.extend(f,{html:this,_html:a.html()}))}e.push(f)}),e}function E(a){return 0===a.offsetWidth&&0===a.offsetHeight}function F(a){return!d.contains(b.documentElement,a)}function G(a,b,c,d){return G.i||(G.i=1,G.ii=[!0]),d=d||G.i,"undefined"==typeof G.ii[d]&&(G.ii[d]=!0),a()?b():G.ii[d]&&setTimeout(function(){G.ii[d]&&G(a,b,c,d)},c||100),G.i++}function H(a){c.replace(c.protocol+"//"+c.host+c.pathname.replace(/^\/?/,"/")+c.search+"#"+a)}function I(a,b,c,d){var e=a.data(),f=e.measures;if(f&&(!e.l||e.l.W!==f.width||e.l.H!==f.height||e.l.r!==f.ratio||e.l.w!==b.w||e.l.h!==b.h||e.l.m!==c||e.l.p!==d)){var g=f.width,i=f.height,j=b.w/b.h,k=f.ratio>=j,l="scaledown"===c,m="contain"===c,n="cover"===c,o=$(d);k&&(l||m)||!k&&n?(g=h(b.w,0,l?g:1/0),i=g/f.ratio):(k&&n||!k&&(l||m))&&(i=h(b.h,0,l?i:1/0),g=i*f.ratio),a.css({width:g,height:i,left:p(o.x,b.w-g),top:p(o.y,b.h-i)}),e.l={W:f.width,H:f.height,r:f.ratio,w:b.w,h:b.h,m:c,p:d}}return!0}function J(a,b){var c=a[0];c.styleSheet?c.styleSheet.cssText=b:a.html(b)}function K(a,b,c){return b===c?!1:b>=a?"left":a>=c?"right":"left right"}function L(a,b,c,d){if(!c)return!1;if(!isNaN(a))return a-(d?0:1);for(var e,f=0,g=b.length;g>f;f++){var h=b[f];if(h.id===a){e=f;break}}return e}function M(a,b,c){c=c||{},a.each(function(){var a,e=d(this),f=e.data();f.clickOn||(f.clickOn=!0,d.extend(cb(e,{onStart:function(b){a=b,(c.onStart||g).call(this,b)},onMove:c.onMove||g,onTouchEnd:c.onTouchEnd||g,onEnd:function(c){c.moved||b.call(this,a)}}),{noMove:!0}))})}function N(a,b){return'<div class="'+a+'">'+(b||"")+"</div>"}function O(a){for(var b=a.length;b;){var c=Math.floor(Math.random()*b--),d=a[b];a[b]=a[c],a[c]=d}return a}function P(a){return"[object Array]"==Object.prototype.toString.call(a)&&d.map(a,function(a){return d.extend({},a)})}function Q(a,b,c){a.scrollLeft(b||0).scrollTop(c||0)}function R(a){if(a){var b={};return d.each(a,function(a,c){b[a.toLowerCase()]=c}),b}}function S(a){if(a){var b=+a;return isNaN(b)?(b=a.split("/"),+b[0]/+b[1]||e):b}}function T(a,b,c,d){b&&(a.addEventListener?a.addEventListener(b,c,!!d):a.attachEvent("on"+b,c))}function U(a){return!!a.getAttribute("disabled")}function V(a){return{tabindex:-1*a+"",disabled:a}}function W(a,b){T(a,"keyup",function(c){U(a)||13==c.keyCode&&b.call(a,c)})}function X(a,b){T(a,"focus",a.onfocusin=function(c){b.call(a,c)},!0)}function Y(a,b){a.preventDefault?a.preventDefault():a.returnValue=!1,b&&a.stopPropagation&&a.stopPropagation()}function Z(a){return a?">":"<"}function $(a){return a=(a+"").split(/\s+/),{x:q(a[0])||bd,y:q(a[1])||bd}}function _(a,b){var c=a.data(),e=Math.round(b.pos),f=function(){c.sliding=!1,(b.onEnd||g)()};"undefined"!=typeof b.overPos&&b.overPos!==b.pos&&(e=b.overPos,f=function(){_(a,d.extend({},b,{overPos:b.pos,time:Math.max(Qc,b.time/2)}))});
1588var h=d.extend(k(e),b.width&&{width:b.width});c.sliding=!0,Ic?(a.css(d.extend(l(b.time),h)),b.time>10?u(a,"transform",f,b.time):f()):a.stop().animate(h,b.time,_c,f)}function ab(a,b,c,e,f,h){var i="undefined"!=typeof h;if(i||(f.push(arguments),Array.prototype.push.call(arguments,f.length),!(f.length>1))){a=a||d(a),b=b||d(b);var j=a[0],k=b[0],l="crossfade"===e.method,m=function(){if(!m.done){m.done=!0;var a=(i||f.shift())&&f.shift();a&&ab.apply(this,a),(e.onEnd||g)(!!a)}},n=e.time/(h||1);c.removeClass(Rb+" "+Qb),a.stop().addClass(Rb),b.stop().addClass(Qb),l&&k&&a.fadeTo(0,0),a.fadeTo(l?n:0,1,l&&m),b.fadeTo(n,0,m),j&&l||k||m()}}function bb(a){var b=(a.touches||[])[0]||a;a._x=b.pageX,a._y=b.clientY,a._now=d.now()}function cb(a,c){function e(a){return m=d(a.target),u.checked=p=q=s=!1,k||u.flow||a.touches&&a.touches.length>1||a.which>1||ed&&ed.type!==a.type&&gd||(p=c.select&&m.is(c.select,t))?p:(o="touchstart"===a.type,q=m.is("a, a *",t),n=u.control,r=u.noMove||u.noSwipe||n?16:u.snap?0:4,bb(a),l=ed=a,fd=a.type.replace(/down|start/,"move").replace(/Down/,"Move"),(c.onStart||g).call(t,a,{control:n,$target:m}),k=u.flow=!0,void((!o||u.go)&&Y(a)))}function f(a){if(a.touches&&a.touches.length>1||Nc&&!a.isPrimary||fd!==a.type||!k)return k&&h(),void(c.onTouchEnd||g)();bb(a);var b=Math.abs(a._x-l._x),d=Math.abs(a._y-l._y),e=b-d,f=(u.go||u.x||e>=0)&&!u.noSwipe,i=0>e;o&&!u.checked?(k=f)&&Y(a):(Y(a),(c.onMove||g).call(t,a,{touch:o})),!s&&Math.sqrt(Math.pow(b,2)+Math.pow(d,2))>r&&(s=!0),u.checked=u.checked||f||i}function h(a){(c.onTouchEnd||g)();var b=k;u.control=k=!1,b&&(u.flow=!1),!b||q&&!u.checked||(a&&Y(a),gd=!0,clearTimeout(hd),hd=setTimeout(function(){gd=!1},1e3),(c.onEnd||g).call(t,{moved:s,$target:m,control:n,touch:o,startEvent:l,aborted:!a||"MSPointerCancel"===a.type}))}function i(){u.flow||setTimeout(function(){u.flow=!0},10)}function j(){u.flow&&setTimeout(function(){u.flow=!1},Pc)}var k,l,m,n,o,p,q,r,s,t=a[0],u={};return Nc?(T(t,"MSPointerDown",e),T(b,"MSPointerMove",f),T(b,"MSPointerCancel",h),T(b,"MSPointerUp",h)):(T(t,"touchstart",e),T(t,"touchmove",f),T(t,"touchend",h),T(b,"touchstart",i),T(b,"touchend",j),T(b,"touchcancel",j),Ec.on("scroll",j),a.on("mousedown",e),Fc.on("mousemove",f).on("mouseup",h)),a.on("click","a",function(a){u.checked&&Y(a)}),u}function db(a,b){function c(c,d){A=!0,j=l=c._x,q=c._now,p=[[q,j]],m=n=D.noMove||d?0:v(a,(b.getPos||g)()),(b.onStart||g).call(B,c)}function e(a,b){s=D.min,t=D.max,u=D.snap,w=a.altKey,A=z=!1,y=b.control,y||C.sliding||c(a)}function f(d,e){D.noSwipe||(A||c(d),l=d._x,p.push([d._now,l]),n=m-(j-l),o=K(n,s,t),s>=n?n=x(n,s):n>=t&&(n=x(n,t)),D.noMove||(a.css(k(n)),z||(z=!0,e.touch||Nc||a.addClass(ec)),(b.onMove||g).call(B,d,{pos:n,edge:o})))}function i(e){if(!D.noSwipe||!e.moved){A||c(e.startEvent,!0),e.touch||Nc||a.removeClass(ec),r=d.now();for(var f,i,j,k,o,q,v,x,y,z=r-Pc,C=null,E=Qc,F=b.friction,G=p.length-1;G>=0;G--){if(f=p[G][0],i=Math.abs(f-z),null===C||j>i)C=f,k=p[G][1];else if(C===z||i>j)break;j=i}v=h(n,s,t);var H=k-l,I=H>=0,J=r-C,K=J>Pc,L=!K&&n!==m&&v===n;u&&(v=h(Math[L?I?"floor":"ceil":"round"](n/u)*u,s,t),s=t=v),L&&(u||v===n)&&(y=-(H/J),E*=h(Math.abs(y),b.timeLow,b.timeHigh),o=Math.round(n+y*E/F),u||(v=o),(!I&&o>t||I&&s>o)&&(q=I?s:t,x=o-q,u||(v=q),x=h(v+.03*x,q-50,q+50),E=Math.abs((n-x)/(y/F)))),E*=w?10:1,(b.onEnd||g).call(B,d.extend(e,{moved:e.moved||K&&u,pos:n,newPos:v,overPos:x,time:E}))}}var j,l,m,n,o,p,q,r,s,t,u,w,y,z,A,B=a[0],C=a.data(),D={};return D=d.extend(cb(b.$wrap,d.extend({},b,{onStart:e,onMove:f,onEnd:i})),D)}function eb(a,b){var c,e,f,h=a[0],i={prevent:{}};return T(h,Oc,function(a){var h=a.wheelDeltaY||-1*a.deltaY||0,j=a.wheelDeltaX||-1*a.deltaX||0,k=Math.abs(j)&&!Math.abs(h),l=Z(0>j),m=e===l,n=d.now(),o=Pc>n-f;e=l,f=n,k&&i.ok&&(!i.prevent[l]||c)&&(Y(a,!0),c&&m&&o||(b.shift&&(c=!0,clearTimeout(i.t),i.t=setTimeout(function(){c=!1},Rc)),(b.onEnd||g)(a,b.shift?l:j)))}),i}function fb(){d.each(d.Fotorama.instances,function(a,b){b.index=a})}function gb(a){d.Fotorama.instances.push(a),fb()}function hb(a){d.Fotorama.instances.splice(a.index,1),fb()}var ib="fotorama",jb="fullscreen",kb=ib+"__wrap",lb=kb+"--css2",mb=kb+"--css3",nb=kb+"--video",ob=kb+"--fade",pb=kb+"--slide",qb=kb+"--no-controls",rb=kb+"--no-sha
1588dows",sb=kb+"--pan-y",tb=kb+"--rtl",ub=kb+"--only-active",vb=kb+"--no-captions",wb=kb+"--toggle-arrows",xb=ib+"__stage",yb=xb+"__frame",zb=yb+"--video",Ab=xb+"__shaft",Bb=ib+"__grab",Cb=ib+"__pointer",Db=ib+"__arr",Eb=Db+"--disabled",Fb=Db+"--prev",Gb=Db+"--next",Hb=ib+"__nav",Ib=Hb+"-wrap",Jb=Hb+"__shaft",Kb=Hb+"--dots",Lb=Hb+"--thumbs",Mb=Hb+"__frame",Nb=Mb+"--dot",Ob=Mb+"--thumb",Pb=ib+"__fade",Qb=Pb+"-front",Rb=Pb+"-rear",Sb=ib+"__shadow",Tb=Sb+"s",Ub=Tb+"--left",Vb=Tb+"--right",Wb=ib+"__active",Xb=ib+"__select",Yb=ib+"--hidden",Zb=ib+"--fullscreen",$b=ib+"__fullscreen-icon",_b=ib+"__error",ac=ib+"__loading",bc=ib+"__loaded",cc=bc+"--full",dc=bc+"--img",ec=ib+"__grabbing",fc=ib+"__img",gc=fc+"--full",hc=ib+"__dot",ic=ib+"__thumb",jc=ic+"-border",kc=ib+"__html",lc=ib+"__video",mc=lc+"-play",nc=lc+"-close",oc=ib+"__caption",pc=ib+"__caption__wrap",qc=ib+"__spinner",rc='" tabindex="0" role="button',sc=d&&d.fn.jquery.split(".");if(!sc||sc[0]<1||1==sc[0]&&sc[1]<8)throw"Fotorama requires jQuery 1.8 or later and will not run without it.";var tc={},uc=function(a,b,c){function d(a){r.cssText=a}function e(a,b){return typeof a===b}function f(a,b){return!!~(""+a).indexOf(b)}function g(a,b){for(var d in a){var e=a[d];if(!f(e,"-")&&r[e]!==c)return"pfx"==b?e:!0}return!1}function h(a,b,d){for(var f in a){var g=b[a[f]];if(g!==c)return d===!1?a[f]:e(g,"function")?g.bind(d||b):g}return!1}function i(a,b,c){var d=a.charAt(0).toUpperCase()+a.slice(1),f=(a+" "+u.join(d+" ")+d).split(" ");return e(b,"string")||e(b,"undefined")?g(f,b):(f=(a+" "+v.join(d+" ")+d).split(" "),h(f,b,c))}var j,k,l,m="2.6.2",n={},o=b.documentElement,p="modernizr",q=b.createElement(p),r=q.style,s=({}.toString," -webkit- -moz- -o- -ms- ".split(" ")),t="Webkit Moz O ms",u=t.split(" "),v=t.toLowerCase().split(" "),w={},x=[],y=x.slice,z=function(a,c,d,e){var f,g,h,i,j=b.createElement("div"),k=b.body,l=k||b.createElement("body");if(parseInt(d,10))for(;d--;)h=b.createElement("div"),h.id=e?e[d]:p+(d+1),j.appendChild(h);return f=["&#173;",'<style id="s',p,'">',a,"</style>"].join(""),j.id=p,(k?j:l).innerHTML+=f,l.appendChild(j),k||(l.style.background="",l.style.overflow="hidden",i=o.style.overflow,o.style.overflow="hidden",o.appendChild(l)),g=c(j,a),k?j.parentNode.removeChild(j):(l.parentNode.removeChild(l),o.style.overflow=i),!!g},A={}.hasOwnProperty;l=e(A,"undefined")||e(A.call,"undefined")?function(a,b){return b in a&&e(a.constructor.prototype[b],"undefined")}:function(a,b){return A.call(a,b)},Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError;var c=y.call(arguments,1),d=function(){if(this instanceof d){var e=function(){};e.prototype=b.prototype;var f=new e,g=b.apply(f,c.concat(y.call(arguments)));return Object(g)===g?g:f}return b.apply(a,c.concat(y.call(arguments)))};return d}),w.csstransforms3d=function(){var a=!!i("perspective");return a};for(var B in w)l(w,B)&&(k=B.toLowerCase(),n[k]=w[B](),x.push((n[k]?"":"no-")+k));return n.addTest=function(a,b){if("object"==typeof a)for(var d in a)l(a,d)&&n.addTest(d,a[d]);else{if(a=a.toLowerCase(),n[a]!==c)return n;b="function"==typeof b?b():b,"undefined"!=typeof enableClasses&&enableClasses&&(o.className+=" "+(b?"":"no-")+a),n[a]=b}return n},d(""),q=j=null,n._version=m,n._prefixes=s,n._domPrefixes=v,n._cssomPrefixes=u,n.testProp=function(a){return g([a])},n.testAllProps=i,n.testStyles=z,n.prefixed=function(a,b,c){return b?i(a,b,c):i(a,"pfx")},n}(a,b),vc={ok:!1,is:function(){return!1},request:function(){},cancel:function(){},event:"",prefix:""},wc="webkit moz o ms khtml".split(" ");if("undefined"!=typeof b.cancelFullScreen)vc.ok=!0;else for(var xc=0,yc=wc.length;yc>xc;xc++)if(vc.prefix=wc[xc],"undefined"!=typeof b[vc.prefix+"CancelFullScreen"]){vc.ok=!0;break}vc.ok&&(vc.event=vc.prefix+"fullscreenchange",vc.is=function(){switch(this.prefix){case"":return b.fullScreen;case"webkit":return b.webkitIsFullScreen;default:return b[this.prefix+"FullScreen"]}},vc.request=function(a){return""===this.prefix?a.requestFullScreen():a[this.prefix+"RequestFullScreen"]()},vc.cancel=function(){return""===this.prefix?b.cancelFullScreen():b[this.prefix+"CancelFullScreen"]()});var zc,Ac={lines:12,length:5,width:2,radius:7,corners:1,rotate:15,color:"rgba(128, 128, 128, .75)",hwaccel:!0},Bc={top:"auto",left:"auto",className:""};!function(a,b){zc=b()}(this,function(){function a(a,c){var d,e=b.createElement(a||"div");for(d in c)e[d]=c[d];return e}function c(a){for(var b=1,c=arguments.length;c>b;b++)a.appendChild(arguments[b]);return a}function d(a,b,c,d){var e=["opacity",b,~~(100*a),c,d].join("-"),f=.01+c/d*100,g=Math.max(1-(1-a)/b*(100-f),a),h=m.substring(0,m.indexOf("Animation")).toLowerCase(),i=h&&"-"+h+"-"||"";return o[e]||(p.insertRule("@"+i+"keyframes "+e+"{0%{opacity:"+g+"}"+f+"%{opacity:"+a+"}"+(f+.01)+"%{opacity:1}"+(f+b)%100+"%{opacity:"+a+"}100%{opacity:"+g+"}}",p.cssRules.length),o[e]=1),e}function f(a,b){var c,d,f=a.style;for(b=b.charAt(0).toUpperCase()+b.slice(1),d=0;d<n.length;d++)if(c=n[d]+b,f[c]!==e)return c;return f[b]!==e?b:void 0}function g(a,b){for(var c in b)a.style[f(a,c)||c]=b[c];return a}function h(a){for(var b=1;b<arguments.length;b++){var c=arguments[b];
1588for(var d in c)a[d]===e&&(a[d]=c[d])}return a}function i(a){for(var b={x:a.offsetLeft,y:a.offsetTop};a=a.offsetParent;)b.x+=a.offsetLeft,b.y+=a.offsetTop;return b}function j(a,b){return"string"==typeof a?a:a[b%a.length]}function k(a){return"undefined"==typeof this?new k(a):void(this.opts=h(a||{},k.defaults,q))}function l(){function b(b,c){return a("<"+b+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',c)}p.addRule(".spin-vml","behavior:url(#default#VML)"),k.prototype.lines=function(a,d){function e(){return g(b("group",{coordsize:k+" "+k,coordorigin:-i+" "+-i}),{width:k,height:k})}function f(a,f,h){c(m,c(g(e(),{rotation:360/d.lines*a+"deg",left:~~f}),c(g(b("roundrect",{arcsize:d.corners}),{width:i,height:d.width,left:d.radius,top:-d.width>>1,filter:h}),b("fill",{color:j(d.color,a),opacity:d.opacity}),b("stroke",{opacity:0}))))}var h,i=d.length+d.width,k=2*i,l=2*-(d.width+d.length)+"px",m=g(e(),{position:"absolute",top:l,left:l});if(d.shadow)for(h=1;h<=d.lines;h++)f(h,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(h=1;h<=d.lines;h++)f(h);return c(a,m)},k.prototype.opacity=function(a,b,c,d){var e=a.firstChild;d=d.shadow&&d.lines||0,e&&b+d<e.childNodes.length&&(e=e.childNodes[b+d],e=e&&e.firstChild,e=e&&e.firstChild,e&&(e.opacity=c))}}var m,n=["webkit","Moz","ms","O"],o={},p=function(){var d=a("style",{type:"text/css"});return c(b.getElementsByTagName("head")[0],d),d.sheet||d.styleSheet}(),q={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",direction:1,speed:1,trail:100,opacity:.25,fps:20,zIndex:2e9,className:"spinner",top:"auto",left:"auto",position:"relative"};k.defaults={},h(k.prototype,{spin:function(b){this.stop();var c,d,e=this,f=e.opts,h=e.el=g(a(0,{className:f.className}),{position:f.position,width:0,zIndex:f.zIndex}),j=f.radius+f.length+f.width;if(b&&(b.insertBefore(h,b.firstChild||null),d=i(b),c=i(h),g(h,{left:("auto"==f.left?d.x-c.x+(b.offsetWidth>>1):parseInt(f.left,10)+j)+"px",top:("auto"==f.top?d.y-c.y+(b.offsetHeight>>1):parseInt(f.top,10)+j)+"px"})),h.setAttribute("role","progressbar"),e.lines(h,e.opts),!m){var k,l=0,n=(f.lines-1)*(1-f.direction)/2,o=f.fps,p=o/f.speed,q=(1-f.opacity)/(p*f.trail/100),r=p/f.lines;!function s(){l++;for(var a=0;a<f.lines;a++)k=Math.max(1-(l+(f.lines-a)*r)%p*q,f.opacity),e.opacity(h,a*f.direction+n,k,f);e.timeout=e.el&&setTimeout(s,~~(1e3/o))}()}return e},stop:function(){var a=this.el;return a&&(clearTimeout(this.timeout),a.parentNode&&a.parentNode.removeChild(a),this.el=e),this},lines:function(b,e){function f(b,c){return g(a(),{position:"absolute",width:e.length+e.width+"px",height:e.width+"px",background:b,boxShadow:c,transformOrigin:"left",transform:"rotate("+~~(360/e.lines*i+e.rotate)+"deg) translate("+e.radius+"px,0)",borderRadius:(e.corners*e.width>>1)+"px"})}for(var h,i=0,k=(e.lines-1)*(1-e.direction)/2;i<e.lines;i++)h=g(a(),{position:"absolute",top:1+~(e.width/2)+"px",transform:e.hwaccel?"translate3d(0,0,0)":"",opacity:e.opacity,animation:m&&d(e.opacity,e.trail,k+i*e.direction,e.lines)+" "+1/e.speed+"s linear infinite"}),e.shadow&&c(h,g(f("#000","0 0 4px #000"),{top:"2px"})),c(b,c(h,f(j(e.color,i),"0 0 1px rgba(0,0,0,.1)")));return b},opacity:function(a,b,c){b<a.childNodes.length&&(a.childNodes[b].style.opacity=c)}});var r=g(a("group"),{behavior:"url(#default#VML)"});return!f(r,"transform")&&r.adj?l():m=f(r,"animation"),k});var Cc,Dc,Ec=d(a),Fc=d(b),Gc="quirks"===c.hash.replace("#",""),Hc=uc.csstransforms3d,Ic=Hc&&!Gc,Jc=Hc||"CSS1Compat"===b.compatMode,Kc=vc.ok,Lc=navigator.userAgent.match(/Android|webOS|iPhone|iPad|iPod|BlackBerry|Windows Phone/i),Mc=!Ic||Lc,Nc=navigator.msPointerEnabled,Oc="onwheel"in b.createElement("div")?"wheel":b.onmousewheel!==e?"mousewheel":"DOMMouseScroll",Pc=250,Qc=300,Rc=1400,Sc=5e3,Tc=2,Uc=64,Vc=500,Wc=333,Xc="$stageFrame",Yc="$navDotFrame",Zc="$navThumbFrame",$c="auto",_c=f([.1,0,.25,1]),ad=99999,bd="50%",cd={width:null,minwidth:null,maxwidth:"100%",height:null,minheight:null,maxheight:null,ratio:null,margin:Tc,glimpse:0,fit:"contain",position:bd,thumbposition:bd,nav:"dots",navposition:"bottom",navwidth:null,thumbwidth:Uc,thumbheight:Uc,thumbmargin:Tc,thumbborderwidth:Tc,thumbfit:"cover",allowfullscreen:!1,transition:"slide",clicktransition:null,transitionduration:Qc,captions:!0,hash:!1,startindex:0,loop:!1,autoplay:!1,stopautoplayontouch:!0,keyboard:!1,arrows:!0,click:!0,swipe:!0,trackpad:!1,enableifsingleframe:!1,controlsonstart:!0,shuffle:!1,direction:"ltr",shadows:!0,spinner:null},dd={left:!0,right:!0,down:!1,up:!1,space:!1,home:!1,end:!1};G.stop=function(a){G.ii[a]=!1};var ed,fd,gd,hd;jQuery.Fotorama=function(a,e){function f(){d.each(yd,function(a,b){if(!b.i){b.i=me++;var c=A(b.video,!0);if(c){var d={};b.video=c,b.img||b.thumb?b.thumbsReady=!0:d=B(b,yd,ie),C(yd,{img:d.img,thumb:d.thumb},b.i,ie)}}})}
1588function g(a){return Zd[a]||ie.fullScreen}function i(a){var b="keydown."+ib,c=ib+je,d="keydown."+c,f="resize."+c+" orientationchange."+c;a?(Fc.on(d,function(a){var b,c;Cd&&27===a.keyCode?(b=!0,md(Cd,!0,!0)):(ie.fullScreen||e.keyboard&&!ie.index)&&(27===a.keyCode?(b=!0,ie.cancelFullScreen()):a.shiftKey&&32===a.keyCode&&g("space")||37===a.keyCode&&g("left")||38===a.keyCode&&g("up")?c="<":32===a.keyCode&&g("space")||39===a.keyCode&&g("right")||40===a.keyCode&&g("down")?c=">":36===a.keyCode&&g("home")?c="<<":35===a.keyCode&&g("end")&&(c=">>")),(b||c)&&Y(a),c&&ie.show({index:c,slow:a.altKey,user:!0})}),ie.index||Fc.off(b).on(b,"textarea, input, select",function(a){!Dc.hasClass(jb)&&a.stopPropagation()}),Ec.on(f,ie.resize)):(Fc.off(d),Ec.off(f))}function j(b){b!==j.f&&(b?(a.html("").addClass(ib+" "+ke).append(qe).before(oe).before(pe),gb(ie)):(qe.detach(),oe.detach(),pe.detach(),a.html(ne.urtext).removeClass(ke),hb(ie)),i(b),j.f=b)}function m(){yd=ie.data=yd||P(e.data)||D(a),zd=ie.size=yd.length,!xd.ok&&e.shuffle&&O(yd),f(),Je=y(Je),zd&&j(!0)}function o(){var a=2>zd&&!e.enableifsingleframe||Cd;Me.noMove=a||Sd,Me.noSwipe=a||!e.swipe,!Wd&&se.toggleClass(Bb,!e.click&&!Me.noMove&&!Me.noSwipe),Nc&&qe.toggleClass(sb,!Me.noSwipe)}function t(a){a===!0&&(a=""),e.autoplay=Math.max(+a||Sc,1.5*Vd)}function u(){function a(a,c){b[a?"add":"remove"].push(c)}ie.options=e=R(e),Sd="crossfade"===e.transition||"dissolve"===e.transition,Md=e.loop&&(zd>2||Sd&&(!Wd||"slide"!==Wd)),Vd=+e.transitionduration||Qc,Yd="rtl"===e.direction,Zd=d.extend({},e.keyboard&&dd,e.keyboard);var b={add:[],remove:[]};zd>1||e.enableifsingleframe?(Nd=e.nav,Pd="top"===e.navposition,b.remove.push(Xb),we.toggle(!!e.arrows)):(Nd=!1,we.hide()),Rb(),Bd=new zc(d.extend(Ac,e.spinner,Bc,{direction:Yd?-1:1})),Gc(),Hc(),e.autoplay&&t(e.autoplay),Td=n(e.thumbwidth)||Uc,Ud=n(e.thumbheight)||Uc,Ne.ok=Pe.ok=e.trackpad&&!Mc,o(),ed(e,[Le]),Od="thumbs"===Nd,Od?(lc(zd,"navThumb"),Ad=Be,he=Zc,J(oe,d.Fotorama.jst.style({w:Td,h:Ud,b:e.thumbborderwidth,m:e.thumbmargin,s:je,q:!Jc})),ye.addClass(Lb).removeClass(Kb)):"dots"===Nd?(lc(zd,"navDot"),Ad=Ae,he=Yc,ye.addClass(Kb).removeClass(Lb)):(Nd=!1,ye.removeClass(Lb+" "+Kb)),Nd&&(Pd?xe.insertBefore(re):xe.insertAfter(re),wc.nav=!1,wc(Ad,ze,"nav")),Qd=e.allowfullscreen,Qd?(De.prependTo(re),Rd=Kc&&"native"===Qd):(De.detach(),Rd=!1),a(Sd,ob),a(!Sd,pb),a(!e.captions,vb),a(Yd,tb),a("always"!==e.arrows,wb),Xd=e.shadows&&!Mc,a(!Xd,rb),qe.addClass(b.add.join(" ")).removeClass(b.remove.join(" ")),Ke=d.extend({},e)}function x(a){return 0>a?(zd+a%zd)%zd:a>=zd?a%zd:a}function y(a){return h(a,0,zd-1)}function z(a){return Md?x(a):y(a)}function E(a){return a>0||Md?a-1:!1}function U(a){return zd-1>a||Md?a+1:!1}function $(){Me.min=Md?-1/0:-r(zd-1,Le.w,e.margin,Fd),Me.max=Md?1/0:-r(0,Le.w,e.margin,Fd),Me.snap=Le.w+e.margin}function bb(){Oe.min=Math.min(0,Le.nw-ze.width()),Oe.max=0,ze.toggleClass(Bb,!(Oe.noMove=Oe.min===Oe.max))}function cb(a,b,c){if("number"==typeof a){a=new Array(a);var e=!0}return d.each(a,function(a,d){if(e&&(d=a),"number"==typeof d){var f=yd[x(d)];if(f){var g="$"+b+"Frame",h=f[g];c.call(this,a,d,f,h,g,h&&h.data())}}})}function fb(a,b,c,d){(!$d||"*"===$d&&d===Ld)&&(a=q(e.width)||q(a)||Vc,b=q(e.height)||q(b)||Wc,ie.resize({width:a,ratio:e.ratio||c||a/b},0,d!==Ld&&"*"))}function Pb(a,b,c,f,g,h){cb(a,b,function(a,i,j,k,l,m){function n(a){var b=x(i);fd(a,{index:b,src:w,frame:yd[b]})}function o(){t.remove(),d.Fotorama.cache[w]="error",j.html&&"stage"===b||!y||y===w?(!w||j.html||r?"stage"===b&&(k.trigger("f:load").removeClass(ac+" "+_b).addClass(bc),n("load"),fb()):(k.trigger("f:error").removeClass(ac).addClass(_b),n("error")),m.state="error",!(zd>1&&yd[i]===j)||j.html||j.deleted||j.video||r||(j.deleted=!0,ie.splice(i,1))):(j[v]=w=y,Pb([i],b,c,f,g,!0))}function p(){d.Fotorama.measures[w]=u.measures=d.Fotorama.measures[w]||{width:s.width,height:s.height,ratio:s.width/s.height},fb(u.measures.width,u.measures.height,u.measures.ratio,i),t.off("load error").addClass(fc+(r?" "+gc:"")).prependTo(k),I(t,(d.isFunction(c)?c():c)||Le,f||j.fit||e.fit,g||j.position||e.position),d.Fotorama.cache[w]=m.state="loaded",setTimeout(function(){k.trigger("f:load").removeClass(ac+" "+_b).addClass(bc+" "+(r?cc:dc)),"stage"===b?n("load"):(j.thumbratio===$c||!j.thumbratio&&e.thumbratio===$c)&&(j.thumbratio=u.measures.ratio,vd())},0)}function q(){var a=10;G(function(){return!fe||!a--&&!Mc},function(){p()})}if(k){var r=ie.fullScreen&&j.full&&j.full!==j.img&&!m.$full&&"stage"===b;if(!m.$img||h||r){var s=new Image,t=d(s),u=t.data();m[r?"$full":"$img"]=t;var v="stage"===b?r?"full":"img":"thumb",w=j[v],y=r?null:j["stage"===b?"thumb":"img"];if("navThumb"===b&&(k=m.$wrap),!w)return void o();d.Fotorama.cache[w]?!function z(){"error"===d.Fotorama.cache[w]?o():"loaded"===d.Fotorama.cache[w]?setTimeout(q,0):setTimeout(z,100)}():(d.Fotorama.cache[w]="*",t.on("load",q).on("error",o)),m.state="",s.src=w}}})}function Qb(a){Ie.append(Bd.spin().el).appendTo(a)}function Rb(){Ie.detach(),Bd&&Bd.stop()}function Sb(){var a=Dd[Xc];a&&!a.data().state&&(Qb(a),a.on("f:load f:error",function(){a.off("f:load f:error"),Rb()}))}function ec(a){W(a,sd),X(a,function(){setTimeout(function(){Q(ye)},0),Rc({time:Vd,guessIndex:d(this).data().eq,minMax:Oe})})}function lc(a,b){cb(a,b,function(a,c,e,f,g,h){if(!f){f=e[g]=qe[g].clone(),h=f.data(),h.data=e;var i=f[0];"stage"===b?(e.html&&d('<div class="'+kc+'"></div>').append(e._html?d(e.html).removeAttr("id").html(e._html):e.html).appendTo(f),e.caption&&d(N(oc,N(pc,e.caption))).appendTo(f),e.video&&f.addClass(zb).append(Fe.clone()),X(i,function(){setTimeout(function(){Q(re)},0),pd({index:h.eq,user:!0})}),te=te.add(f)):"navDot"===b?(ec(i),Ae=Ae.add(f)):"navThumb"===b&&(ec(i),h.$wrap=f.children(":first"),Be=Be.add(f),e.video&&h.$wrap.append(Fe.clone()))}})}function sc(a,b,c,d){return a&&a.length&&I(a,b,c,d)}function tc(a){cb(a,"stage",function(a,b,c,f,g,h){if(f){var i=x(b),j=c.fit||e.fit,k=c.position||e.position;h.eq=i,Re[Xc][i]=f.css(d.extend({left:Sd?0:r(b,Le.w,e.margin,Fd)},Sd&&l(0))),F(f[0])&&(f.appendTo(se),md(c.$video)),sc(h.$img,Le,j,k),sc(h.$full,Le,j,k)}})}function uc(a,b){if("thumbs"===Nd&&!isNaN(a)){var c=-a,f=-a+Le.nw;Be.each(function(){var a=d(this),g=a.data(),h=g.eq,i=function(){return{h:Ud,w:g.w}},j=i(),k=yd[h]||{},l=k.thumbfit||e.thumbfit,m=k.thumbposition||e.thumbposition;j.w=g.w,g.l+g.w<c||g.l>f||sc(g.$img,j,l,m)||b&&Pb([h],"navThumb",i,l,m)}
1588)}}function wc(a,b,c){if(!wc[c]){var f="nav"===c&&Od,g=0;b.append(a.filter(function(){for(var a,b=d(this),c=b.data(),e=0,f=yd.length;f>e;e++)if(c.data===yd[e]){a=!0,c.eq=e;break}return a||b.remove()&&!1}).sort(function(a,b){return d(a).data().eq-d(b).data().eq}).each(function(){if(f){var a=d(this),b=a.data(),c=Math.round(Ud*b.data.thumbratio)||Td;b.l=g,b.w=c,a.css({width:c}),g+=c+e.thumbmargin}})),wc[c]=!0}}function xc(a){return a-Se>Le.w/3}function yc(a){return!(Md||Je+a&&Je-zd+a||Cd)}function Gc(){var a=yc(0),b=yc(1);ue.toggleClass(Eb,a).attr(V(a)),ve.toggleClass(Eb,b).attr(V(b))}function Hc(){Ne.ok&&(Ne.prevent={"<":yc(0),">":yc(1)})}function Lc(a){var b,c,d=a.data();return Od?(b=d.l,c=d.w):(b=a.position().left,c=a.width()),{c:b+c/2,min:-b+10*e.thumbmargin,max:-b+Le.w-c-10*e.thumbmargin}}function Oc(a){var b=Dd[he].data();_(Ce,{time:1.2*a,pos:b.l,width:b.w-2*e.thumbborderwidth})}function Rc(a){var b=yd[a.guessIndex][he];if(b){var c=Oe.min!==Oe.max,d=a.minMax||c&&Lc(Dd[he]),e=c&&(a.keep&&Rc.l?Rc.l:h((a.coo||Le.nw/2)-Lc(b).c,d.min,d.max)),f=c&&h(e,Oe.min,Oe.max),g=1.1*a.time;_(ze,{time:g,pos:f||0,onEnd:function(){uc(f,!0)}}),ld(ye,K(f,Oe.min,Oe.max)),Rc.l=e}}function Tc(){_c(he),Qe[he].push(Dd[he].addClass(Wb))}function _c(a){for(var b=Qe[a];b.length;)b.shift().removeClass(Wb)}function bd(a){var b=Re[a];d.each(Ed,function(a,c){delete b[x(c)]}),d.each(b,function(a,c){delete b[a],c.detach()})}function cd(a){Fd=Gd=Je;var b=Dd[Xc];b&&(_c(Xc),Qe[Xc].push(b.addClass(Wb)),a||ie.show.onEnd(!0),v(se,0,!0),bd(Xc),tc(Ed),$(),bb())}function ed(a,b){a&&d.each(b,function(b,c){c&&d.extend(c,{width:a.width||c.width,height:a.height,minwidth:a.minwidth,maxwidth:a.maxwidth,minheight:a.minheight,maxheight:a.maxheight,ratio:S(a.ratio)})})}function fd(b,c){a.trigger(ib+":"+b,[ie,c])}function gd(){clearTimeout(hd.t),fe=1,e.stopautoplayontouch?ie.stopAutoplay():ce=!0}function hd(){fe&&(e.stopautoplayontouch||(id(),jd()),hd.t=setTimeout(function(){fe=0},Qc+Pc))}function id(){ce=!(!Cd&&!de)}function jd(){if(clearTimeout(jd.t),G.stop(jd.w),!e.autoplay||ce)return void(ie.autoplay&&(ie.autoplay=!1,fd("stopautoplay")));ie.autoplay||(ie.autoplay=!0,fd("startautoplay"));var a=Je,b=Dd[Xc].data();jd.w=G(function(){return b.state||a!==Je},function(){jd.t=setTimeout(function(){if(!ce&&a===Je){var b=Kd,c=yd[b][Xc].data();jd.w=G(function(){return c.state||b!==Kd},function(){ce||b!==Kd||ie.show(Md?Z(!Yd):Kd)})}},e.autoplay)})}function kd(){ie.fullScreen&&(ie.fullScreen=!1,Kc&&vc.cancel(le),Dc.removeClass(jb),Cc.removeClass(jb),a.removeClass(Zb).insertAfter(pe),Le=d.extend({},ee),md(Cd,!0,!0),rd("x",!1),ie.resize(),Pb(Ed,"stage"),Q(Ec,ae,_d),fd("fullscreenexit"))}function ld(a,b){Xd&&(a.removeClass(Ub+" "+Vb),b&&!Cd&&a.addClass(b.replace(/^|\s/g," "+Tb+"--")))}function md(a,b,c){b&&(qe.removeClass(nb),Cd=!1,o()),a&&a!==Cd&&(a.remove(),fd("unloadvideo")),c&&(id(),jd())}function nd(a){qe.toggleClass(qb,a)}function od(a){if(!Me.flow){var b=a?a.pageX:od.x,c=b&&!yc(xc(b))&&e.click;od.p!==c&&re.toggleClass(Cb,c)&&(od.p=c,od.x=b)}}function pd(a){clearTimeout(pd.t),e.clicktransition&&e.clicktransition!==e.transition?setTimeout(function(){var b=e.transition;ie.setOptions({transition:e.clicktransition}),Wd=b,pd.t=setTimeout(function(){ie.show(a)},10)},0):ie.show(a)}function qd(a,b){var c=a.target,f=d(c);f.hasClass(mc)?ie.playVideo():c===Ee?ie.toggleFullScreen():Cd?c===He&&md(Cd,!0,!0):b?nd():e.click&&pd({index:a.shiftKey||Z(xc(a._x)),slow:a.altKey,user:!0})}function rd(a,b){Me[a]=Oe[a]=b}function sd(a){var b=d(this).data().eq;pd({index:b,slow:a.altKey,user:!0,coo:a._x-ye.offset().left})}function td(a){pd({index:we.index(this)?">":"<",slow:a.altKey,user:!0})}function ud(a){X(a,function(){setTimeout(function(){Q(re)},0),nd(!1)})}function vd(){if(m(),u(),!vd.i){vd.i=!0;var a=e.startindex;(a||e.hash&&c.hash)&&(Ld=L(a||c.hash.replace(/^#/,""),yd,0===ie.index||a,a)),Je=Fd=Gd=Hd=Ld=z(Ld)||0}if(zd){if(wd())return;Cd&&md(Cd,!0),Ed=[],bd(Xc),vd.ok=!0,ie.show({index:Je,time:0}),ie.resize()}else ie.destroy()}function wd(){return!wd.f===Yd?(wd.f=Yd,Je=zd-1-Je,ie.reverse(),!0):void 0}function xd(){xd.ok||(xd.ok=!0,fd("ready"))}Cc=d("html"),Dc=d("body");var yd,zd,Ad,Bd,Cd,Dd,Ed,Fd,Gd,Hd,Id,Jd,Kd,Ld,Md,Nd,Od,Pd,Qd,Rd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,$d,_d,ae,be,ce,de,ee,fe,ge,he,ie=this,je=d.now(),ke=ib+je,le=a[0],me=1,ne=a.data(),oe=d("<style></style>"),pe=d(N(Yb)),qe=d(N(kb)),re=d(N(xb)).appendTo(qe),se=(re[0],d(N(Ab)).appendTo(re)),te=d(),ue=d(N(Db+" "+Fb+rc)),ve=d(N(Db+" "+Gb+rc)),we=ue.add(ve).appendTo(re),xe=d(N(Ib)),ye=d(N(Hb)).appendTo(xe),ze=d(N(Jb)).appendTo(ye),Ae=d(),Be=d(),Ce=(se.data(),ze.data(),d(N(jc)).appendTo(ze)),De=d(N($b+rc)),Ee=De[0],Fe=d(N(mc)),Ge=d(N(nc)).appendTo(re),He=Ge[0],Ie=d(N(qc)),Je=!1,Ke={},Le={},Me={},Ne={},Oe={},Pe={},Qe={},Re={},Se=0,Te=[];
1589qe[Xc]=d(N(yb)),qe[Zc]=d(N(Mb+" "+Ob+rc,N(ic))),qe[Yc]=d(N(Mb+" "+Nb+rc,N(hc))),Qe[Xc]=[],Qe[Zc]=[],Qe[Yc]=[],Re[Xc]={},qe.addClass(Ic?mb:lb).toggleClass(qb,!e.controlsonstart),ne.fotorama=this,ie.startAutoplay=function(a){return ie.autoplay?this:(ce=de=!1,t(a||e.autoplay),jd(),this)},ie.stopAutoplay=function(){return ie.autoplay&&(ce=de=!0,jd()),this},ie.show=function(a){var b;"object"!=typeof a?(b=a,a={}):b=a.index,b=">"===b?Gd+1:"<"===b?Gd-1:"<<"===b?0:">>"===b?zd-1:b,b=isNaN(b)?L(b,yd,!0):b,b="undefined"==typeof b?Je||0:b,ie.activeIndex=Je=z(b),Id=E(Je),Jd=U(Je),Kd=x(Je+(Yd?-1:1)),Ed=[Je,Id,Jd],Gd=Md?b:Je;var c=Math.abs(Hd-Gd),d=w(a.time,function(){return Math.min(Vd*(1+(c-1)/12),2*Vd)}),f=a.overPos;a.slow&&(d*=10);var g=Dd;ie.activeFrame=Dd=yd[Je];var i=g===Dd&&!a.user;md(Cd,Dd.i!==yd[x(Fd)].i),lc(Ed,"stage"),tc(Mc?[Gd]:[Gd,E(Gd),U(Gd)]),rd("go",!0),i||fd("show",{user:a.user,time:d}),ce=!0;var j=ie.show.onEnd=function(b){if(!j.ok){if(j.ok=!0,b||cd(!0),i||fd("showend",{user:a.user}),!b&&Wd&&Wd!==e.transition)return ie.setOptions({transition:Wd}),void(Wd=!1);Sb(),Pb(Ed,"stage"),rd("go",!1),Hc(),od(),id(),jd()}};if(Sd){var k=Dd[Xc],l=Je!==Hd?yd[Hd][Xc]:null;ab(k,l,te,{time:d,method:e.transition,onEnd:j},Te)}
1589else _(se,{pos:-r(Gd,Le.w,e.margin,Fd),overPos:f,time:d,onEnd:j});if(Gc(),Nd){Tc();var m=y(Je+h(Gd-Hd,-1,1));Rc({time:d,coo:m!==Je&&a.coo,guessIndex:"undefined"!=typeof a.coo?m:Je,keep:i}),Od&&Oc(d)}return be="undefined"!=typeof Hd&&Hd!==Je,Hd=Je,e.hash&&be&&!ie.eq&&H(Dd.id||Je+1),this},ie.requestFullScreen=function(){return Qd&&!ie.fullScreen&&(_d=Ec.scrollTop(),ae=Ec.scrollLeft(),Q(Ec),rd("x",!0),ee=d.extend({},Le),a.addClass(Zb).appendTo(Dc.addClass(jb)),Cc.addClass(jb),md(Cd,!0,!0),ie.fullScreen=!0,Rd&&vc.request(le),ie.resize(),Pb(Ed,"stage"),Sb(),fd("fullscreenenter")),this},ie.cancelFullScreen=function(){return Rd&&vc.is()?vc.cancel(b):kd(),this},ie.toggleFullScreen=function(){return ie[(ie.fullScreen?"cancel":"request")+"FullScreen"]()},T(b,vc.event,function(){!yd||vc.is()||Cd||kd()}),ie.resize=function(a){if(!yd)return this;var b=arguments[1]||0,c=arguments[2];ed(ie.fullScreen?{width:"100%",maxwidth:null,minwidth:null,height:"100%",maxheight:null,minheight:null}:R(a),[Le,c||ie.fullScreen||e]);var d=Le.width,f=Le.height,g=Le.ratio,i=Ec.height()-(Nd?ye.height():0);return q(d)&&(qe.addClass(ub).css({width:d,minWidth:Le.minwidth||0,maxWidth:Le.maxwidth||ad}),d=Le.W=Le.w=qe.width(),Le.nw=Nd&&p(e.navwidth,d)||d,e.glimpse&&(Le.w-=Math.round(2*(p(e.glimpse,d)||0))),se.css({width:Le.w,marginLeft:(Le.W-Le.w)/2}),f=p(f,i),f=f||g&&d/g,f&&(d=Math.round(d),f=Le.h=Math.round(h(f,p(Le.minheight,i),p(Le.maxheight,i))),re.stop().animate({width:d,height:f},b,function(){qe.removeClass(ub)}),cd(),Nd&&(ye.stop().animate({width:Le.nw},b),Rc({guessIndex:Je,time:b,keep:!0}),Od&&wc.nav&&Oc(b)),$d=c||!0,xd())),Se=re.offset().left,this},ie.setOptions=function(a){return d.extend(e,a),vd(),this},ie.shuffle=function(){return yd&&O(yd)&&vd(),this},ie.destroy=function(){return ie.cancelFullScreen(),ie.stopAutoplay(),yd=ie.data=null,j(),Ed=[],bd(Xc),vd.ok=!1,this},ie.playVideo=function(){var a=Dd,b=a.video,c=Je;return"object"==typeof b&&a.videoReady&&(Rd&&ie.fullScreen&&ie.cancelFullScreen(),G(function(){return!vc.is()||c!==Je},function(){c===Je&&(a.$video=a.$video||d(d.Fotorama.jst.video(b)),a.$video.appendTo(a[Xc]),qe.addClass(nb),Cd=a.$video,o(),we.blur(),De.blur(),fd("loadvideo"))})),this},ie.stopVideo=function(){return md(Cd,!0,!0),this},re.on("mousemove",od),Me=db(se,{onStart:gd,onMove:function(a,b){ld(re,b.edge)},onTouchEnd:hd,onEnd:function(a){ld(re);var b=(Nc&&!ge||a.touch)&&e.arrows&&"always"!==e.arrows;if(a.moved||b&&a.pos!==a.newPos&&!a.control){var c=s(a.newPos,Le.w,e.margin,Fd);ie.show({index:c,time:Sd?Vd:a.time,overPos:a.overPos,user:!0})}else a.aborted||a.control||qd(a.startEvent,b)},timeLow:1,timeHigh:1,friction:2,select:"."+Xb+", ."+Xb+" *",$wrap:re}),Oe=db(ze,{onStart:gd,onMove:function(a,b){ld(ye,b.edge)},onTouchEnd:hd,onEnd:function(a){function b(){Rc.l=a.newPos,id(),jd(),uc(a.newPos,!0)}if(a.moved)a.pos!==a.newPos?(ce=!0,_(ze,{time:a.time,pos:a.newPos,overPos:a.overPos,onEnd:b}),uc(a.newPos),Xd&&ld(ye,K(a.newPos,Oe.min,Oe.max))):b();else{var c=a.$target.closest("."+Mb,ze)[0];c&&sd.call(c,a.startEvent)}},timeLow:.5,timeHigh:2,friction:5,$wrap:ye}),Ne=eb(re,{shift:!0,onEnd:function(a,b){gd(),hd(),ie.show({index:b,slow:a.altKey})}}),Pe=eb(ye,{onEnd:function(a,b){gd(),hd();var c=v(ze)+.25*b;ze.css(k(h(c,Oe.min,Oe.max))),Xd&&ld(ye,K(c,Oe.min,Oe.max)),Pe.prevent={"<":c>=Oe.max,">":c<=Oe.min},clearTimeout(Pe.t),Pe.t=setTimeout(function(){Rc.l=c,uc(c,!0)},Pc),uc(c)}}),qe.hover(function(){setTimeout(function(){fe||nd(!(ge=!0))},0)},function(){ge&&nd(!(ge=!1))}),M(we,function(a){Y(a),td.call(this,a)},{onStart:function(){gd(),Me.control=!0},onTouchEnd:hd}),we.each(function(){W(this,function(a){td.call(this,a)}),ud(this)}),W(Ee,ie.toggleFullScreen),ud(Ee),d.each("load push pop shift unshift reverse sort splice".split(" "),function(a,b){ie[b]=function(){return yd=yd||[],"load"!==b?Array.prototype[b].apply(yd,arguments):arguments[0]&&"object"==typeof arguments[0]&&arguments[0].length&&(yd=P(arguments[0])),vd(),ie}}),vd()},d.fn.fotorama=function(b){return this.each(function(){var c=this,e=d(this),f=e.data(),g=f.fotorama;g?g.setOptions(b,!0):G(function(){return!E(c)},function(){f.urtext=e.html(),new d.Fotorama(e,d.extend({},cd,a.fotoramaDefaults,b,f))})})},d.Fotorama.instances=[],d.Fotorama.cache={},d.Fotorama.measures={},d=d||{},d.Fotorama=d.Fotorama||{},d.Fotorama.jst=d.Fotorama.jst||{},d.Fotorama.jst.style=function(a){{var b,c="";tc.escape}
1589return c+=".fotorama"+(null==(b=a.s)?"":b)+" .fotorama__nav--thumbs .fotorama__nav__frame{\npadding:"+(null==(b=a.m)?"":b)+"px;\nheight:"+(null==(b=a.h)?"":b)+"px}\n.fotorama"+(null==(b=a.s)?"":b)+" .fotorama__thumb-border{\nheight:"+(null==(b=a.h-a.b*(a.q?0:2))?"":b)+"px;\nborder-width:"+(null==(b=a.b)?"":b)+"px;\nmargin-top:"+(null==(b=a.m)?"":b)+"px}"},d.Fotorama.jst.video=function(a){function b(){c+=d.call(arguments,"")}var c="",d=(tc.escape,Array.prototype.join);return c+='<div class="fotorama__video"><iframe src="',b(("youtube"==a.type?a.p+"youtube.com/embed/"+a.id+"?autoplay=1":"vimeo"==a.type?a.p+"player.vimeo.com/video/"+a.id+"?autoplay=1&badge=0":a.id)+(a.s&&"custom"!=a.type?"&"+a.s:"")),c+='" frameborder="0" allowfullscreen></iframe></div>\n'},d(function(){d("."+ib+':not([data-auto="false"])').fotorama()})}(window,document,location,"undefined"!=typeof jQuery&&jQuery);;

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.