bootstrap.js 121 KB
Newer Older
1
/*!
Mark Otto's avatar
Mark Otto committed
2
  * Bootstrap v4.1.3 (https://getbootstrap.com/)
Mark Otto's avatar
dist    
Mark Otto committed
3
  * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
Mark Otto's avatar
dist    
Mark Otto committed
4
5
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  */
Mark Otto's avatar
dist    
Mark Otto committed
6
(function (global, factory) {
Mark Otto's avatar
dist    
Mark Otto committed
7
8
9
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('jquery'), require('popper.js')) :
  typeof define === 'function' && define.amd ? define(['exports', 'jquery', 'popper.js'], factory) :
  (factory((global.bootstrap = {}),global.jQuery,global.Popper));
Mark Otto's avatar
dist    
Mark Otto committed
10
}(this, (function (exports,$,Popper) { 'use strict';
Mark Otto's avatar
grunt    
Mark Otto committed
11

Mark Otto's avatar
dist    
Mark Otto committed
12
13
  $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
  Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
Jacob Thornton's avatar
Jacob Thornton committed
14

Mark Otto's avatar
dist    
Mark Otto committed
15
16
17
18
19
20
21
22
  function _defineProperties(target, props) {
    for (var i = 0; i < props.length; i++) {
      var descriptor = props[i];
      descriptor.enumerable = descriptor.enumerable || false;
      descriptor.configurable = true;
      if ("value" in descriptor) descriptor.writable = true;
      Object.defineProperty(target, descriptor.key, descriptor);
    }
Mark Otto's avatar
Mark Otto committed
23
24
  }

Mark Otto's avatar
dist    
Mark Otto committed
25
26
27
28
29
  function _createClass(Constructor, protoProps, staticProps) {
    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
    if (staticProps) _defineProperties(Constructor, staticProps);
    return Constructor;
  }
Mark Otto's avatar
dist    
Mark Otto committed
30

Mark Otto's avatar
dist    
Mark Otto committed
31
32
33
34
35
36
37
38
39
40
  function _defineProperty(obj, key, value) {
    if (key in obj) {
      Object.defineProperty(obj, key, {
        value: value,
        enumerable: true,
        configurable: true,
        writable: true
      });
    } else {
      obj[key] = value;
Mark Otto's avatar
dist    
Mark Otto committed
41
42
    }

Mark Otto's avatar
dist    
Mark Otto committed
43
    return obj;
Jacob Thornton's avatar
Jacob Thornton committed
44
45
  }

Mark Otto's avatar
dist    
Mark Otto committed
46
47
48
49
  function _objectSpread(target) {
    for (var i = 1; i < arguments.length; i++) {
      var source = arguments[i] != null ? arguments[i] : {};
      var ownKeys = Object.keys(source);
Mark Otto's avatar
dist    
Mark Otto committed
50

Mark Otto's avatar
dist    
Mark Otto committed
51
52
53
54
      if (typeof Object.getOwnPropertySymbols === 'function') {
        ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
          return Object.getOwnPropertyDescriptor(source, sym).enumerable;
        }));
Jacob Thornton's avatar
Jacob Thornton committed
55
56
      }

Mark Otto's avatar
dist    
Mark Otto committed
57
58
59
      ownKeys.forEach(function (key) {
        _defineProperty(target, key, source[key]);
      });
Jacob Thornton's avatar
Jacob Thornton committed
60
61
    }

Mark Otto's avatar
dist    
Mark Otto committed
62
    return target;
Jacob Thornton's avatar
Jacob Thornton committed
63
64
  }

Mark Otto's avatar
dist    
Mark Otto committed
65
66
67
68
  function _inheritsLoose(subClass, superClass) {
    subClass.prototype = Object.create(superClass.prototype);
    subClass.prototype.constructor = subClass;
    subClass.__proto__ = superClass;
Jacob Thornton's avatar
Jacob Thornton committed
69
70
71
72
  }

  /**
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
73
   * Bootstrap (v4.1.3): util.js
Mark Otto's avatar
dist    
Mark Otto committed
74
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Jacob Thornton's avatar
Jacob Thornton committed
75
76
77
   * --------------------------------------------------------------------------
   */

Mark Otto's avatar
dist    
Mark Otto committed
78
79
80
81
82
83
84
85
86
87
88
89
90
  var Util = function ($$$1) {
    /**
     * ------------------------------------------------------------------------
     * Private TransitionEnd Helpers
     * ------------------------------------------------------------------------
     */
    var TRANSITION_END = 'transitionend';
    var MAX_UID = 1000000;
    var MILLISECONDS_MULTIPLIER = 1000; // Shoutout AngusCroll (https://goo.gl/pxwQGp)

    function toType(obj) {
      return {}.toString.call(obj).match(/\s([a-z]+)/i)[1].toLowerCase();
    }
Jacob Thornton's avatar
Jacob Thornton committed
91

Mark Otto's avatar
dist    
Mark Otto committed
92
93
94
95
96
97
98
99
    function getSpecialTransitionEndEvent() {
      return {
        bindType: TRANSITION_END,
        delegateType: TRANSITION_END,
        handle: function handle(event) {
          if ($$$1(event.target).is(this)) {
            return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
          }
Mark Otto's avatar
dist    
Mark Otto committed
100

Mark Otto's avatar
dist    
Mark Otto committed
101
102
103
104
          return undefined; // eslint-disable-line no-undefined
        }
      };
    }
Mark Otto's avatar
dist    
Mark Otto committed
105

Mark Otto's avatar
dist    
Mark Otto committed
106
107
    function transitionEndEmulator(duration) {
      var _this = this;
Jacob Thornton's avatar
Jacob Thornton committed
108

Mark Otto's avatar
dist    
Mark Otto committed
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
      var called = false;
      $$$1(this).one(Util.TRANSITION_END, function () {
        called = true;
      });
      setTimeout(function () {
        if (!called) {
          Util.triggerTransitionEnd(_this);
        }
      }, duration);
      return this;
    }

    function setTransitionEndSupport() {
      $$$1.fn.emulateTransitionEnd = transitionEndEmulator;
      $$$1.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
    }
    /**
     * --------------------------------------------------------------------------
     * Public Util Api
     * --------------------------------------------------------------------------
     */


    var Util = {
      TRANSITION_END: 'bsTransitionEnd',
      getUID: function getUID(prefix) {
        do {
          // eslint-disable-next-line no-bitwise
          prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
        } while (document.getElementById(prefix));

        return prefix;
      },
      getSelectorFromElement: function getSelectorFromElement(element) {
        var selector = element.getAttribute('data-target');
Mark Otto's avatar
dist    
Mark Otto committed
144
        var method = 'querySelector';
Mark Otto's avatar
dist    
Mark Otto committed
145
146

        if (!selector || selector === '#') {
Mark Otto's avatar
dist    
Mark Otto committed
147
148
149
150
151
152
153
154
          selector = (element.getAttribute('href') || '').trim();
        }

        var validSelector = selector;

        if (selector.charAt(0) === '#' && selector.indexOf(',') === -1) {
          selector = selector.substr(1);
          method = 'getElementById';
Mark Otto's avatar
dist    
Mark Otto committed
155
156
157
        }

        try {
Mark Otto's avatar
dist    
Mark Otto committed
158
          return document[method](selector) ? validSelector : null;
Mark Otto's avatar
dist    
Mark Otto committed
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
        } catch (err) {
          return null;
        }
      },
      getTransitionDurationFromElement: function getTransitionDurationFromElement(element) {
        if (!element) {
          return 0;
        } // Get transition-duration of the element


        var transitionDuration = $$$1(element).css('transition-duration');
        var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found

        if (!floatTransitionDuration) {
          return 0;
        } // If multiple durations are defined, take the first


        transitionDuration = transitionDuration.split(',')[0];
        return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
      },
      reflow: function reflow(element) {
        return element.offsetHeight;
      },
      triggerTransitionEnd: function triggerTransitionEnd(element) {
        $$$1(element).trigger(TRANSITION_END);
      },
      // TODO: Remove in v5
      supportsTransitionEnd: function supportsTransitionEnd() {
        return Boolean(TRANSITION_END);
      },
      isElement: function isElement(obj) {
        return (obj[0] || obj).nodeType;
      },
      typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
        for (var property in configTypes) {
          if (Object.prototype.hasOwnProperty.call(configTypes, property)) {
            var expectedTypes = configTypes[property];
            var value = config[property];
            var valueType = value && Util.isElement(value) ? 'element' : toType(value);

            if (!new RegExp(expectedTypes).test(valueType)) {
              throw new Error(componentName.toUpperCase() + ": " + ("Option \"" + property + "\" provided type \"" + valueType + "\" ") + ("but expected type \"" + expectedTypes + "\"."));
            }
Jacob Thornton's avatar
Jacob Thornton committed
203
          }
Jacob Thornton's avatar
Jacob Thornton committed
204
205
        }
      }
Mark Otto's avatar
dist    
Mark Otto committed
206
207
208
209
210
    };
    setTransitionEndSupport();
    return Util;
  }($);

Jacob Thornton's avatar
Jacob Thornton committed
211
  /**
Mark Otto's avatar
dist    
Mark Otto committed
212
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
213
   * Bootstrap (v4.1.3): alert.js
Mark Otto's avatar
dist    
Mark Otto committed
214
215
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
216
   */
Mark Otto's avatar
dist    
Mark Otto committed
217
218

  var Alert = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
219
220
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
221
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
222
223
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
224
    var NAME = 'alert';
Mark Otto's avatar
Mark Otto committed
225
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
    var DATA_KEY = 'bs.alert';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var Selector = {
      DISMISS: '[data-dismiss="alert"]'
    };
    var Event = {
      CLOSE: "close" + EVENT_KEY,
      CLOSED: "closed" + EVENT_KEY,
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
    };
    var ClassName = {
      ALERT: 'alert',
      FADE: 'fade',
      SHOW: 'show'
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
247

Mark Otto's avatar
dist    
Mark Otto committed
248
    };
Jacob Thornton's avatar
Jacob Thornton committed
249

Mark Otto's avatar
dist    
Mark Otto committed
250
251
252
253
254
255
    var Alert =
    /*#__PURE__*/
    function () {
      function Alert(element) {
        this._element = element;
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
256
257


Mark Otto's avatar
dist    
Mark Otto committed
258
      var _proto = Alert.prototype;
Jacob Thornton's avatar
Jacob Thornton committed
259

Mark Otto's avatar
dist    
Mark Otto committed
260
261
      // Public
      _proto.close = function close(element) {
Mark Otto's avatar
dist    
Mark Otto committed
262
        var rootElement = this._element;
Jacob Thornton's avatar
Jacob Thornton committed
263

Mark Otto's avatar
dist    
Mark Otto committed
264
265
266
        if (element) {
          rootElement = this._getRootElement(element);
        }
Mark Otto's avatar
dist    
Mark Otto committed
267

Mark Otto's avatar
dist    
Mark Otto committed
268
        var customEvent = this._triggerCloseEvent(rootElement);
Mark Otto's avatar
grunt    
Mark Otto committed
269

Mark Otto's avatar
dist    
Mark Otto committed
270
271
272
        if (customEvent.isDefaultPrevented()) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
273

Mark Otto's avatar
dist    
Mark Otto committed
274
275
        this._removeElement(rootElement);
      };
Jacob Thornton's avatar
Jacob Thornton committed
276

Mark Otto's avatar
dist    
Mark Otto committed
277
278
279
280
      _proto.dispose = function dispose() {
        $$$1.removeData(this._element, DATA_KEY);
        this._element = null;
      }; // Private
Mark Otto's avatar
grunt    
Mark Otto committed
281

Jacob Thornton's avatar
Jacob Thornton committed
282

Mark Otto's avatar
dist    
Mark Otto committed
283
284
285
      _proto._getRootElement = function _getRootElement(element) {
        var selector = Util.getSelectorFromElement(element);
        var parent = false;
Mark Otto's avatar
grunt    
Mark Otto committed
286

Mark Otto's avatar
dist    
Mark Otto committed
287
        if (selector) {
Mark Otto's avatar
dist    
Mark Otto committed
288
          parent = document.querySelector(selector);
Mark Otto's avatar
dist    
Mark Otto committed
289
        }
Mark Otto's avatar
grunt    
Mark Otto committed
290

Mark Otto's avatar
dist    
Mark Otto committed
291
292
293
        if (!parent) {
          parent = $$$1(element).closest("." + ClassName.ALERT)[0];
        }
Jacob Thornton's avatar
Jacob Thornton committed
294

Mark Otto's avatar
dist    
Mark Otto committed
295
296
        return parent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
297

Mark Otto's avatar
dist    
Mark Otto committed
298
299
300
301
302
      _proto._triggerCloseEvent = function _triggerCloseEvent(element) {
        var closeEvent = $$$1.Event(Event.CLOSE);
        $$$1(element).trigger(closeEvent);
        return closeEvent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
303

Mark Otto's avatar
dist    
Mark Otto committed
304
305
      _proto._removeElement = function _removeElement(element) {
        var _this = this;
Mark Otto's avatar
grunt    
Mark Otto committed
306

Mark Otto's avatar
dist    
Mark Otto committed
307
        $$$1(element).removeClass(ClassName.SHOW);
Jacob Thornton's avatar
Jacob Thornton committed
308

Mark Otto's avatar
dist    
Mark Otto committed
309
310
        if (!$$$1(element).hasClass(ClassName.FADE)) {
          this._destroyElement(element);
Mark Otto's avatar
dist    
Mark Otto committed
311

Mark Otto's avatar
dist    
Mark Otto committed
312
313
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
314

Mark Otto's avatar
dist    
Mark Otto committed
315
316
317
318
319
        var transitionDuration = Util.getTransitionDurationFromElement(element);
        $$$1(element).one(Util.TRANSITION_END, function (event) {
          return _this._destroyElement(element, event);
        }).emulateTransitionEnd(transitionDuration);
      };
Jacob Thornton's avatar
Jacob Thornton committed
320

Mark Otto's avatar
dist    
Mark Otto committed
321
322
323
      _proto._destroyElement = function _destroyElement(element) {
        $$$1(element).detach().trigger(Event.CLOSED).remove();
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
324
325


Mark Otto's avatar
dist    
Mark Otto committed
326
327
328
329
      Alert._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var $element = $$$1(this);
          var data = $element.data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
330

Mark Otto's avatar
dist    
Mark Otto committed
331
332
333
334
          if (!data) {
            data = new Alert(this);
            $element.data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
335

Mark Otto's avatar
dist    
Mark Otto committed
336
337
338
339
340
          if (config === 'close') {
            data[config](this);
          }
        });
      };
Jacob Thornton's avatar
Jacob Thornton committed
341

Mark Otto's avatar
dist    
Mark Otto committed
342
343
344
345
346
      Alert._handleDismiss = function _handleDismiss(alertInstance) {
        return function (event) {
          if (event) {
            event.preventDefault();
          }
Jacob Thornton's avatar
Jacob Thornton committed
347

Mark Otto's avatar
dist    
Mark Otto committed
348
349
          alertInstance.close(this);
        };
Mark Otto's avatar
grunt    
Mark Otto committed
350
351
      };

Mark Otto's avatar
dist    
Mark Otto committed
352
353
354
355
356
357
      _createClass(Alert, null, [{
        key: "VERSION",
        get: function get() {
          return VERSION;
        }
      }]);
Jacob Thornton's avatar
Jacob Thornton committed
358

Mark Otto's avatar
dist    
Mark Otto committed
359
360
361
362
363
364
365
      return Alert;
    }();
    /**
     * ------------------------------------------------------------------------
     * Data Api implementation
     * ------------------------------------------------------------------------
     */
Jacob Thornton's avatar
Jacob Thornton committed
366
367


Mark Otto's avatar
dist    
Mark Otto committed
368
369
370
371
372
373
    $$$1(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));
    /**
     * ------------------------------------------------------------------------
     * jQuery
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
374

Mark Otto's avatar
dist    
Mark Otto committed
375
376
    $$$1.fn[NAME] = Alert._jQueryInterface;
    $$$1.fn[NAME].Constructor = Alert;
Jacob Thornton's avatar
Jacob Thornton committed
377

Mark Otto's avatar
dist    
Mark Otto committed
378
379
380
381
    $$$1.fn[NAME].noConflict = function () {
      $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
      return Alert._jQueryInterface;
    };
Jacob Thornton's avatar
Jacob Thornton committed
382

Mark Otto's avatar
dist    
Mark Otto committed
383
384
    return Alert;
  }($);
Jacob Thornton's avatar
Jacob Thornton committed
385
386

  /**
Mark Otto's avatar
dist    
Mark Otto committed
387
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
388
   * Bootstrap (v4.1.3): button.js
Mark Otto's avatar
dist    
Mark Otto committed
389
390
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
391
   */
Mark Otto's avatar
dist    
Mark Otto committed
392
393

  var Button = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
394
395
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
396
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
397
398
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
399
    var NAME = 'button';
Mark Otto's avatar
Mark Otto committed
400
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
    var DATA_KEY = 'bs.button';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var ClassName = {
      ACTIVE: 'active',
      BUTTON: 'btn',
      FOCUS: 'focus'
    };
    var Selector = {
      DATA_TOGGLE_CARROT: '[data-toggle^="button"]',
      DATA_TOGGLE: '[data-toggle="buttons"]',
      INPUT: 'input',
      ACTIVE: '.active',
      BUTTON: '.btn'
    };
    var Event = {
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY,
      FOCUS_BLUR_DATA_API: "focus" + EVENT_KEY + DATA_API_KEY + " " + ("blur" + EVENT_KEY + DATA_API_KEY)
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
425

Mark Otto's avatar
dist    
Mark Otto committed
426
    };
Jacob Thornton's avatar
Jacob Thornton committed
427

Mark Otto's avatar
dist    
Mark Otto committed
428
429
430
431
432
433
    var Button =
    /*#__PURE__*/
    function () {
      function Button(element) {
        this._element = element;
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
434
435


Mark Otto's avatar
dist    
Mark Otto committed
436
      var _proto = Button.prototype;
Jacob Thornton's avatar
Jacob Thornton committed
437

Mark Otto's avatar
dist    
Mark Otto committed
438
439
440
441
442
      // Public
      _proto.toggle = function toggle() {
        var triggerChangeEvent = true;
        var addAriaPressed = true;
        var rootElement = $$$1(this._element).closest(Selector.DATA_TOGGLE)[0];
Jacob Thornton's avatar
Jacob Thornton committed
443

Mark Otto's avatar
dist    
Mark Otto committed
444
        if (rootElement) {
Mark Otto's avatar
dist    
Mark Otto committed
445
          var input = this._element.querySelector(Selector.INPUT);
Jacob Thornton's avatar
Jacob Thornton committed
446

Mark Otto's avatar
dist    
Mark Otto committed
447
448
          if (input) {
            if (input.type === 'radio') {
Mark Otto's avatar
dist    
Mark Otto committed
449
              if (input.checked && this._element.classList.contains(ClassName.ACTIVE)) {
Mark Otto's avatar
dist    
Mark Otto committed
450
451
                triggerChangeEvent = false;
              } else {
Mark Otto's avatar
dist    
Mark Otto committed
452
                var activeElement = rootElement.querySelector(Selector.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
453

Mark Otto's avatar
dist    
Mark Otto committed
454
455
456
                if (activeElement) {
                  $$$1(activeElement).removeClass(ClassName.ACTIVE);
                }
Jacob Thornton's avatar
Jacob Thornton committed
457
458
459
              }
            }

Mark Otto's avatar
dist    
Mark Otto committed
460
461
462
463
464
            if (triggerChangeEvent) {
              if (input.hasAttribute('disabled') || rootElement.hasAttribute('disabled') || input.classList.contains('disabled') || rootElement.classList.contains('disabled')) {
                return;
              }

Mark Otto's avatar
dist    
Mark Otto committed
465
              input.checked = !this._element.classList.contains(ClassName.ACTIVE);
Mark Otto's avatar
dist    
Mark Otto committed
466
              $$$1(input).trigger('change');
Johann-S's avatar
build    
Johann-S committed
467
            }
Mark Otto's avatar
dist    
Mark Otto committed
468

Mark Otto's avatar
dist    
Mark Otto committed
469
470
            input.focus();
            addAriaPressed = false;
Jacob Thornton's avatar
Jacob Thornton committed
471
          }
Mark Otto's avatar
dist    
Mark Otto committed
472
        }
Jacob Thornton's avatar
Jacob Thornton committed
473

Mark Otto's avatar
dist    
Mark Otto committed
474
        if (addAriaPressed) {
Mark Otto's avatar
dist    
Mark Otto committed
475
          this._element.setAttribute('aria-pressed', !this._element.classList.contains(ClassName.ACTIVE));
Jacob Thornton's avatar
Jacob Thornton committed
476
        }
Mark Otto's avatar
grunt    
Mark Otto committed
477

Mark Otto's avatar
dist    
Mark Otto committed
478
479
480
481
        if (triggerChangeEvent) {
          $$$1(this._element).toggleClass(ClassName.ACTIVE);
        }
      };
Mark Otto's avatar
grunt    
Mark Otto committed
482

Mark Otto's avatar
dist    
Mark Otto committed
483
484
485
486
      _proto.dispose = function dispose() {
        $$$1.removeData(this._element, DATA_KEY);
        this._element = null;
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
487
488


Mark Otto's avatar
dist    
Mark Otto committed
489
490
491
      Button._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var data = $$$1(this).data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
492

Mark Otto's avatar
dist    
Mark Otto committed
493
494
495
496
          if (!data) {
            data = new Button(this);
            $$$1(this).data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
497

Mark Otto's avatar
dist    
Mark Otto committed
498
499
500
501
502
          if (config === 'toggle') {
            data[config]();
          }
        });
      };
Mark Otto's avatar
grunt    
Mark Otto committed
503

Mark Otto's avatar
dist    
Mark Otto committed
504
505
506
507
      _createClass(Button, null, [{
        key: "VERSION",
        get: function get() {
          return VERSION;
Mark Otto's avatar
grunt    
Mark Otto committed
508
        }
Mark Otto's avatar
dist    
Mark Otto committed
509
      }]);
Jacob Thornton's avatar
Jacob Thornton committed
510

Mark Otto's avatar
dist    
Mark Otto committed
511
512
513
514
515
516
517
      return Button;
    }();
    /**
     * ------------------------------------------------------------------------
     * Data Api implementation
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
518

Jacob Thornton's avatar
Jacob Thornton committed
519

Mark Otto's avatar
dist    
Mark Otto committed
520
521
522
    $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
      event.preventDefault();
      var button = event.target;
Jacob Thornton's avatar
Jacob Thornton committed
523

Mark Otto's avatar
dist    
Mark Otto committed
524
525
526
      if (!$$$1(button).hasClass(ClassName.BUTTON)) {
        button = $$$1(button).closest(Selector.BUTTON);
      }
Jacob Thornton's avatar
Jacob Thornton committed
527

Mark Otto's avatar
dist    
Mark Otto committed
528
529
530
531
532
533
534
535
536
537
      Button._jQueryInterface.call($$$1(button), 'toggle');
    }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
      var button = $$$1(event.target).closest(Selector.BUTTON)[0];
      $$$1(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
    });
    /**
     * ------------------------------------------------------------------------
     * jQuery
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
538

Mark Otto's avatar
dist    
Mark Otto committed
539
540
    $$$1.fn[NAME] = Button._jQueryInterface;
    $$$1.fn[NAME].Constructor = Button;
Jacob Thornton's avatar
Jacob Thornton committed
541

Mark Otto's avatar
dist    
Mark Otto committed
542
543
544
545
    $$$1.fn[NAME].noConflict = function () {
      $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
      return Button._jQueryInterface;
    };
Jacob Thornton's avatar
Jacob Thornton committed
546

Mark Otto's avatar
dist    
Mark Otto committed
547
548
    return Button;
  }($);
Jacob Thornton's avatar
Jacob Thornton committed
549
550

  /**
Mark Otto's avatar
dist    
Mark Otto committed
551
   * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
552
   * Bootstrap (v4.1.3): carousel.js
Mark Otto's avatar
dist    
Mark Otto committed
553
554
   * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
   * --------------------------------------------------------------------------
Jacob Thornton's avatar
Jacob Thornton committed
555
   */
Mark Otto's avatar
dist    
Mark Otto committed
556
557

  var Carousel = function ($$$1) {
Mark Otto's avatar
dist    
Mark Otto committed
558
559
    /**
     * ------------------------------------------------------------------------
Mark Otto's avatar
dist    
Mark Otto committed
560
     * Constants
Mark Otto's avatar
dist    
Mark Otto committed
561
562
     * ------------------------------------------------------------------------
     */
Mark Otto's avatar
dist    
Mark Otto committed
563
    var NAME = 'carousel';
Mark Otto's avatar
Mark Otto committed
564
    var VERSION = '4.1.3';
Mark Otto's avatar
dist    
Mark Otto committed
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
    var DATA_KEY = 'bs.carousel';
    var EVENT_KEY = "." + DATA_KEY;
    var DATA_API_KEY = '.data-api';
    var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
    var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key

    var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key

    var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch

    var Default = {
      interval: 5000,
      keyboard: true,
      slide: false,
      pause: 'hover',
      wrap: true
    };
    var DefaultType = {
      interval: '(number|boolean)',
      keyboard: 'boolean',
      slide: '(boolean|string)',
      pause: '(string|boolean)',
      wrap: 'boolean'
    };
    var Direction = {
      NEXT: 'next',
      PREV: 'prev',
      LEFT: 'left',
      RIGHT: 'right'
    };
    var Event = {
      SLIDE: "slide" + EVENT_KEY,
      SLID: "slid" + EVENT_KEY,
      KEYDOWN: "keydown" + EVENT_KEY,
      MOUSEENTER: "mouseenter" + EVENT_KEY,
      MOUSELEAVE: "mouseleave" + EVENT_KEY,
      TOUCHEND: "touchend" + EVENT_KEY,
      LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
      CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
    };
    var ClassName = {
      CAROUSEL: 'carousel',
      ACTIVE: 'active',
      SLIDE: 'slide',
      RIGHT: 'carousel-item-right',
      LEFT: 'carousel-item-left',
      NEXT: 'carousel-item-next',
      PREV: 'carousel-item-prev',
      ITEM: 'carousel-item'
    };
    var Selector = {
      ACTIVE: '.active',
      ACTIVE_ITEM: '.active.carousel-item',
      ITEM: '.carousel-item',
      NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
      INDICATORS: '.carousel-indicators',
      DATA_SLIDE: '[data-slide], [data-slide-to]',
      DATA_RIDE: '[data-ride="carousel"]'
      /**
       * ------------------------------------------------------------------------
       * Class Definition
       * ------------------------------------------------------------------------
       */
Jacob Thornton's avatar
Jacob Thornton committed
628

Mark Otto's avatar
grunt    
Mark Otto committed
629
630
    };

Mark Otto's avatar
dist    
Mark Otto committed
631
632
633
634
635
636
637
638
639
640
641
642
    var Carousel =
    /*#__PURE__*/
    function () {
      function Carousel(element, config) {
        this._items = null;
        this._interval = null;
        this._activeElement = null;
        this._isPaused = false;
        this._isSliding = false;
        this.touchTimeout = null;
        this._config = this._getConfig(config);
        this._element = $$$1(element)[0];
Mark Otto's avatar
dist    
Mark Otto committed
643
        this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
Mark Otto's avatar
grunt    
Mark Otto committed
644

Mark Otto's avatar
dist    
Mark Otto committed
645
646
        this._addEventListeners();
      } // Getters
Jacob Thornton's avatar
Jacob Thornton committed
647

Mark Otto's avatar
grunt    
Mark Otto committed
648

Mark Otto's avatar
dist    
Mark Otto committed
649
      var _proto = Carousel.prototype;
Mark Otto's avatar
grunt    
Mark Otto committed
650

Mark Otto's avatar
dist    
Mark Otto committed
651
652
653
654
655
656
      // Public
      _proto.next = function next() {
        if (!this._isSliding) {
          this._slide(Direction.NEXT);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
657

Mark Otto's avatar
dist    
Mark Otto committed
658
659
660
661
662
663
664
      _proto.nextWhenVisible = function nextWhenVisible() {
        // Don't call next when the page isn't visible
        // or the carousel or its parent isn't visible
        if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
          this.next();
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
665

Mark Otto's avatar
dist    
Mark Otto committed
666
667
668
669
670
      _proto.prev = function prev() {
        if (!this._isSliding) {
          this._slide(Direction.PREV);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
671

Mark Otto's avatar
dist    
Mark Otto committed
672
673
674
675
      _proto.pause = function pause(event) {
        if (!event) {
          this._isPaused = true;
        }
Mark Otto's avatar
grunt    
Mark Otto committed
676

Mark Otto's avatar
dist    
Mark Otto committed
677
        if (this._element.querySelector(Selector.NEXT_PREV)) {
Mark Otto's avatar
dist    
Mark Otto committed
678
679
680
          Util.triggerTransitionEnd(this._element);
          this.cycle(true);
        }
Mark Otto's avatar
grunt    
Mark Otto committed
681

Mark Otto's avatar
dist    
Mark Otto committed
682
683
684
        clearInterval(this._interval);
        this._interval = null;
      };
Mark Otto's avatar
grunt    
Mark Otto committed
685

Mark Otto's avatar
dist    
Mark Otto committed
686
687
688
689
      _proto.cycle = function cycle(event) {
        if (!event) {
          this._isPaused = false;
        }
Jacob Thornton's avatar
Jacob Thornton committed
690

Mark Otto's avatar
dist    
Mark Otto committed
691
692
693
694
        if (this._interval) {
          clearInterval(this._interval);
          this._interval = null;
        }
Jacob Thornton's avatar
Jacob Thornton committed
695

Mark Otto's avatar
dist    
Mark Otto committed
696
697
698
699
        if (this._config.interval && !this._isPaused) {
          this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
700

Mark Otto's avatar
dist    
Mark Otto committed
701
702
      _proto.to = function to(index) {
        var _this = this;
Jacob Thornton's avatar
Jacob Thornton committed
703

Mark Otto's avatar
dist    
Mark Otto committed
704
        this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
Jacob Thornton's avatar
Jacob Thornton committed
705

Mark Otto's avatar
dist    
Mark Otto committed
706
        var activeIndex = this._getItemIndex(this._activeElement);
Jacob Thornton's avatar
Jacob Thornton committed
707

Mark Otto's avatar
dist    
Mark Otto committed
708
709
710
        if (index > this._items.length - 1 || index < 0) {
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
711

Mark Otto's avatar
dist    
Mark Otto committed
712
713
714
715
716
717
        if (this._isSliding) {
          $$$1(this._element).one(Event.SLID, function () {
            return _this.to(index);
          });
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
718

Mark Otto's avatar
dist    
Mark Otto committed
719
720
721
722
723
        if (activeIndex === index) {
          this.pause();
          this.cycle();
          return;
        }
Mark Otto's avatar
dist    
Mark Otto committed
724

Mark Otto's avatar
dist    
Mark Otto committed
725
        var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
Mark Otto's avatar
dist    
Mark Otto committed
726

Mark Otto's avatar
dist    
Mark Otto committed
727
728
        this._slide(direction, this._items[index]);
      };
Mark Otto's avatar
dist    
Mark Otto committed
729

Mark Otto's avatar
dist    
Mark Otto committed
730
731
732
733
734
735
736
737
738
739
740
741
      _proto.dispose = function dispose() {
        $$$1(this._element).off(EVENT_KEY);
        $$$1.removeData(this._element, DATA_KEY);
        this._items = null;
        this._config = null;
        this._element = null;
        this._interval = null;
        this._isPaused = null;
        this._isSliding = null;
        this._activeElement = null;
        this._indicatorsElement = null;
      }; // Private
Mark Otto's avatar
grunt    
Mark Otto committed
742

Jacob Thornton's avatar
Jacob Thornton committed
743

Mark Otto's avatar
dist    
Mark Otto committed
744
745
746
747
748
      _proto._getConfig = function _getConfig(config) {
        config = _objectSpread({}, Default, config);
        Util.typeCheckConfig(NAME, config, DefaultType);
        return config;
      };
Mark Otto's avatar
dist    
Mark Otto committed
749

Mark Otto's avatar
dist    
Mark Otto committed
750
751
      _proto._addEventListeners = function _addEventListeners() {
        var _this2 = this;
Mark Otto's avatar
dist    
Mark Otto committed
752

Mark Otto's avatar
dist    
Mark Otto committed
753
754
755
        if (this._config.keyboard) {
          $$$1(this._element).on(Event.KEYDOWN, function (event) {
            return _this2._keydown(event);
Mark Otto's avatar
build    
Mark Otto committed
756
757
          });
        }
Mark Otto's avatar
grunt    
Mark Otto committed
758

Mark Otto's avatar
dist    
Mark Otto committed
759
760
761
762
763
764
        if (this._config.pause === 'hover') {
          $$$1(this._element).on(Event.MOUSEENTER, function (event) {
            return _this2.pause(event);
          }).on(Event.MOUSELEAVE, function (event) {
            return _this2.cycle(event);
          });
Mark Otto's avatar
dist    
Mark Otto committed
765

Mark Otto's avatar
dist    
Mark Otto committed
766
767
768
769
770
771
772
773
774
775
776
777
778
779
          if ('ontouchstart' in document.documentElement) {
            // If it's a touch-enabled device, mouseenter/leave are fired as
            // part of the mouse compatibility events on first tap - the carousel
            // would stop cycling until user tapped out of it;
            // here, we listen for touchend, explicitly pause the carousel
            // (as if it's the second time we tap on it, mouseenter compat event
            // is NOT fired) and after a timeout (to allow for mouse compatibility
            // events to fire) we explicitly restart cycling
            $$$1(this._element).on(Event.TOUCHEND, function () {
              _this2.pause();

              if (_this2.touchTimeout) {
                clearTimeout(_this2.touchTimeout);
              }
Mark Otto's avatar
dist    
Mark Otto committed
780

Mark Otto's avatar
dist    
Mark Otto committed
781
782
783
784
785
786
787
              _this2.touchTimeout = setTimeout(function (event) {
                return _this2.cycle(event);
              }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
            });
          }
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
788

Mark Otto's avatar
dist    
Mark Otto committed
789
790
791
792
      _proto._keydown = function _keydown(event) {
        if (/input|textarea/i.test(event.target.tagName)) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
793

Mark Otto's avatar
dist    
Mark Otto committed
794
795
796
797
798
        switch (event.which) {
          case ARROW_LEFT_KEYCODE:
            event.preventDefault();
            this.prev();
            break;
Mark Otto's avatar
dist    
Mark Otto committed
799

Mark Otto's avatar
dist    
Mark Otto committed
800
801
802
803
          case ARROW_RIGHT_KEYCODE:
            event.preventDefault();
            this.next();
            break;
Mark Otto's avatar
dist    
Mark Otto committed
804

Mark Otto's avatar
dist    
Mark Otto committed
805
806
807
          default:
        }
      };
Jacob Thornton's avatar
Jacob Thornton committed
808

Mark Otto's avatar
dist    
Mark Otto committed
809
      _proto._getItemIndex = function _getItemIndex(element) {
Mark Otto's avatar
dist    
Mark Otto committed
810
        this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
Mark Otto's avatar
dist    
Mark Otto committed
811
812
        return this._items.indexOf(element);
      };
Jacob Thornton's avatar
Jacob Thornton committed
813

Mark Otto's avatar
dist    
Mark Otto committed
814
815
816
      _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
        var isNextDirection = direction === Direction.NEXT;
        var isPrevDirection = direction === Direction.PREV;
Jacob Thornton's avatar
Jacob Thornton committed
817

Mark Otto's avatar
dist    
Mark Otto committed
818
        var activeIndex = this._getItemIndex(activeElement);
Mark Otto's avatar
dist    
Mark Otto committed
819

Mark Otto's avatar
dist    
Mark Otto committed
820
821
        var lastItemIndex = this._items.length - 1;
        var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
Mark Otto's avatar
dist    
Mark Otto committed
822

Mark Otto's avatar
dist    
Mark Otto committed
823
824
825
        if (isGoingToWrap && !this._config.wrap) {
          return activeElement;
        }
Jacob Thornton's avatar
Jacob Thornton committed
826

Mark Otto's avatar
dist    
Mark Otto committed
827
828
829
830
        var delta = direction === Direction.PREV ? -1 : 1;
        var itemIndex = (activeIndex + delta) % this._items.length;
        return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
      };
Jacob Thornton's avatar
Jacob Thornton committed
831

Mark Otto's avatar
dist    
Mark Otto committed
832
833
      _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
        var targetIndex = this._getItemIndex(relatedTarget);
Jacob Thornton's avatar
Jacob Thornton committed
834

Mark Otto's avatar
dist    
Mark Otto committed
835
        var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
Jacob Thornton's avatar
Jacob Thornton committed
836

Mark Otto's avatar
dist    
Mark Otto committed
837
838
839
840
841
842
843
844
845
        var slideEvent = $$$1.Event(Event.SLIDE, {
          relatedTarget: relatedTarget,
          direction: eventDirectionName,
          from: fromIndex,
          to: targetIndex
        });
        $$$1(this._element).trigger(slideEvent);
        return slideEvent;
      };
Jacob Thornton's avatar
Jacob Thornton committed
846

Mark Otto's avatar
dist    
Mark Otto committed
847
848
      _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
        if (this._indicatorsElement) {
Mark Otto's avatar
dist    
Mark Otto committed
849
850
          var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
          $$$1(indicators).removeClass(ClassName.ACTIVE);
Mark Otto's avatar
dist    
Mark Otto committed
851

Mark Otto's avatar
dist    
Mark Otto committed
852
          var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
Mark Otto's avatar
dist    
Mark Otto committed
853

Mark Otto's avatar
dist    
Mark Otto committed
854
855
856
857
858
          if (nextIndicator) {
            $$$1(nextIndicator).addClass(ClassName.ACTIVE);
          }
        }
      };
Mark Otto's avatar
dist    
Mark Otto committed
859

Mark Otto's avatar
dist    
Mark Otto committed
860
861
      _proto._slide = function _slide(direction, element) {
        var _this3 = this;
Jacob Thornton's avatar
Jacob Thornton committed
862

Mark Otto's avatar
dist    
Mark Otto committed
863
        var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
Mark Otto's avatar
grunt    
Mark Otto committed
864

Mark Otto's avatar
dist    
Mark Otto committed
865
        var activeElementIndex = this._getItemIndex(activeElement);
Mark Otto's avatar
grunt    
Mark Otto committed
866

Mark Otto's avatar
dist    
Mark Otto committed
867
        var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
Jacob Thornton's avatar
Jacob Thornton committed
868

Mark Otto's avatar
dist    
Mark Otto committed
869
        var nextElementIndex = this._getItemIndex(nextElement);
Mark Otto's avatar
dist    
Mark Otto committed
870

Mark Otto's avatar
dist    
Mark Otto committed
871
872
873
874
        var isCycling = Boolean(this._interval);
        var directionalClassName;
        var orderClassName;
        var eventDirectionName;
Jacob Thornton's avatar
Jacob Thornton committed
875

Mark Otto's avatar
dist    
Mark Otto committed
876
877
878
879
880
881
882
883
884
        if (direction === Direction.NEXT) {
          directionalClassName = ClassName.LEFT;
          orderClassName = ClassName.NEXT;
          eventDirectionName = Direction.LEFT;
        } else {
          directionalClassName = ClassName.RIGHT;
          orderClassName = ClassName.PREV;
          eventDirectionName = Direction.RIGHT;
        }
Jacob Thornton's avatar
Jacob Thornton committed
885

Mark Otto's avatar
dist    
Mark Otto committed
886
887
888
889
        if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
          this._isSliding = false;
          return;
        }
Mark Otto's avatar
grunt    
Mark Otto committed
890

Mark Otto's avatar
dist    
Mark Otto committed
891
        var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
Jacob Thornton's avatar
Jacob Thornton committed
892

Mark Otto's avatar
dist    
Mark Otto committed
893
894
895
        if (slideEvent.isDefaultPrevented()) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
896

Mark Otto's avatar
dist    
Mark Otto committed
897
898
899
900
        if (!activeElement || !nextElement) {
          // Some weirdness is happening, so we bail
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
901

Mark Otto's avatar
dist    
Mark Otto committed
902
        this._isSliding = true;
Jacob Thornton's avatar
Jacob Thornton committed
903

Mark Otto's avatar
dist    
Mark Otto committed
904
905
906
        if (isCycling) {
          this.pause();
        }
Jacob Thornton's avatar
Jacob Thornton committed
907

Mark Otto's avatar
dist    
Mark Otto committed
908
        this._setActiveIndicatorElement(nextElement);
Jacob Thornton's avatar
Jacob Thornton committed
909

Mark Otto's avatar
dist    
Mark Otto committed
910
911
912
913
914
915
        var slidEvent = $$$1.Event(Event.SLID, {
          relatedTarget: nextElement,
          direction: eventDirectionName,
          from: activeElementIndex,
          to: nextElementIndex
        });
Mark Otto's avatar
dist    
Mark Otto committed
916

Mark Otto's avatar
dist    
Mark Otto committed
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
        if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
          $$$1(nextElement).addClass(orderClassName);
          Util.reflow(nextElement);
          $$$1(activeElement).addClass(directionalClassName);
          $$$1(nextElement).addClass(directionalClassName);
          var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
          $$$1(activeElement).one(Util.TRANSITION_END, function () {
            $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
            $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
            _this3._isSliding = false;
            setTimeout(function () {
              return $$$1(_this3._element).trigger(slidEvent);
            }, 0);
          }).emulateTransitionEnd(transitionDuration);
        } else {
          $$$1(activeElement).removeClass(ClassName.ACTIVE);
          $$$1(nextElement).addClass(ClassName.ACTIVE);
          this._isSliding = false;
          $$$1(this._element).trigger(slidEvent);
        }
Jacob Thornton's avatar
Jacob Thornton committed
937

Mark Otto's avatar
dist    
Mark Otto committed
938
939
        if (isCycling) {
          this.cycle();
Mark Otto's avatar
grunt    
Mark Otto committed
940
        }
Mark Otto's avatar
dist    
Mark Otto committed
941
      }; // Static
Jacob Thornton's avatar
Jacob Thornton committed
942
943


Mark Otto's avatar
dist    
Mark Otto committed
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
      Carousel._jQueryInterface = function _jQueryInterface(config) {
        return this.each(function () {
          var data = $$$1(this).data(DATA_KEY);

          var _config = _objectSpread({}, Default, $$$1(this).data());

          if (typeof config === 'object') {
            _config = _objectSpread({}, _config, config);
          }

          var action = typeof config === 'string' ? config : _config.slide;

          if (!data) {
            data = new Carousel(this, _config);
            $$$1(this).data(DATA_KEY, data);
          }
Jacob Thornton's avatar
Jacob Thornton committed
960

Mark Otto's avatar
dist    
Mark Otto committed
961
962
963
964
965
966
967
968
969
970
971
          if (typeof config === 'number') {
            data.to(config);
          } else if (typeof action === 'string') {
            if (typeof data[action] === 'undefined') {
              throw new TypeError("No method named \"" + action + "\"");
            }

            data[action]();
          } else if (_config.interval) {
            data.pause();
            data.cycle();
Mark Otto's avatar
grunt    
Mark Otto committed
972
          }
Mark Otto's avatar
dist    
Mark Otto committed
973
974
        });
      };
Mark Otto's avatar
dist    
Mark Otto committed
975

Mark Otto's avatar
dist    
Mark Otto committed
976
977
978
979
980
      Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
        var selector = Util.getSelectorFromElement(this);

        if (!selector) {
          return;
Jacob Thornton's avatar
Jacob Thornton committed
981
982
        }

Mark Otto's avatar
dist    
Mark Otto committed
983
        var target = $$$1(selector)[0];
Jacob Thornton's avatar
Jacob Thornton committed
984

Mark Otto's avatar
dist    
Mark Otto committed
985
986
987
        if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
          return;
        }
Jacob Thornton's avatar
Jacob Thornton committed
988

Mark Otto's avatar
dist    
Mark Otto committed
989
        var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
Jacob Thornton's avatar
Jacob Thornton committed
990

Mark Otto's avatar
dist    
Mark Otto committed
991
        var slideIndex = this.getAttribute('data-slide-to');
Jacob Thornton's avatar
Jacob Thornton committed
992

Mark Otto's avatar
dist    
Mark Otto committed
993
994
995
        if (slideIndex) {
          config.interval = false;
        }
Jacob Thornton's avatar
Jacob Thornton committed
996

Mark Otto's avatar
dist    
Mark Otto committed
997
        Carousel._jQueryInterface.call($$$1(target), config);
Jacob Thornton's avatar
Jacob Thornton committed
998

Mark Otto's avatar
dist    
Mark Otto committed
999
1000
        if (slideIndex) {
          $$$1(target).data(DATA_KEY).to(slideIndex);
For faster browsing, not all history is shown. View entire blame