bootstrap.js 94.3 KB
Newer Older
1
/*!
Mark Otto's avatar
Mark Otto committed
2
 * Bootstrap v4.0.0-alpha.5 (https://getbootstrap.com)
Chris Rebert's avatar
grunt    
Chris Rebert committed
3
 * Copyright 2011-2016 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
Mark Otto's avatar
Mark Otto committed
4
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
Jacob Thornton's avatar
Jacob Thornton committed
5
6
7
8
9
10
11
12
 */

if (typeof jQuery === 'undefined') {
  throw new Error('Bootstrap\'s JavaScript requires jQuery')
}

+function ($) {
  var version = $.fn.jquery.split(' ')[0].split('.')
XhmikosR's avatar
XhmikosR committed
13
14
  if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] >= 4)) {
    throw new Error('Bootstrap\'s JavaScript requires at least jQuery v1.9.1 but less than v4.0.0')
Jacob Thornton's avatar
Jacob Thornton committed
15
  }
Jacob Thornton's avatar
Jacob Thornton committed
16
17
18
}(jQuery);


Mark Otto's avatar
grunt    
Mark Otto committed
19
20
21
22
23
24
25
26
27
28
29
+function () {

var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };

var _createClass = function () { 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); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();

function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }

function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
Jacob Thornton's avatar
Jacob Thornton committed
30
31
32

/**
 * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
33
 * Bootstrap (v4.0.0-alpha.5): util.js
Jacob Thornton's avatar
Jacob Thornton committed
34
35
36
37
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

Mark Otto's avatar
grunt    
Mark Otto committed
38
var Util = function ($) {
Jacob Thornton's avatar
Jacob Thornton committed
39
40
41
42
43
44
45
46
47

  /**
   * ------------------------------------------------------------------------
   * Private TransitionEnd Helpers
   * ------------------------------------------------------------------------
   */

  var transition = false;

Chris Rebert's avatar
grunt    
Chris Rebert committed
48
49
  var MAX_UID = 1000000;

Jacob Thornton's avatar
Jacob Thornton committed
50
51
52
53
54
55
56
57
58
  var TransitionEndEvent = {
    WebkitTransition: 'webkitTransitionEnd',
    MozTransition: 'transitionend',
    OTransition: 'oTransitionEnd otransitionend',
    transition: 'transitionend'
  };

  // shoutout AngusCroll (https://goo.gl/pxwQGp)
  function toType(obj) {
Mark Otto's avatar
grunt    
Mark Otto committed
59
    return {}.toString.call(obj).match(/\s([a-zA-Z]+)/)[1].toLowerCase();
Jacob Thornton's avatar
Jacob Thornton committed
60
61
62
63
64
65
66
67
68
69
70
71
  }

  function isElement(obj) {
    return (obj[0] || obj).nodeType;
  }

  function getSpecialTransitionEndEvent() {
    return {
      bindType: transition.end,
      delegateType: transition.end,
      handle: function handle(event) {
        if ($(event.target).is(this)) {
72
          return event.handleObj.handler.apply(this, arguments); // eslint-disable-line prefer-rest-params
Jacob Thornton's avatar
Jacob Thornton committed
73
        }
Chris Rebert's avatar
grunt    
Chris Rebert committed
74
        return undefined;
Jacob Thornton's avatar
Jacob Thornton committed
75
76
77
78
79
80
81
82
83
84
85
      }
    };
  }

  function transitionEndTest() {
    if (window.QUnit) {
      return false;
    }

    var el = document.createElement('bootstrap');

Mark Otto's avatar
grunt    
Mark Otto committed
86
87
88
    for (var name in TransitionEndEvent) {
      if (el.style[name] !== undefined) {
        return { end: TransitionEndEvent[name] };
Jacob Thornton's avatar
Jacob Thornton committed
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
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
      }
    }

    return false;
  }

  function transitionEndEmulator(duration) {
    var _this = this;

    var called = false;

    $(this).one(Util.TRANSITION_END, function () {
      called = true;
    });

    setTimeout(function () {
      if (!called) {
        Util.triggerTransitionEnd(_this);
      }
    }, duration);

    return this;
  }

  function setTransitionEndSupport() {
    transition = transitionEndTest();

    $.fn.emulateTransitionEnd = transitionEndEmulator;

    if (Util.supportsTransitionEnd()) {
      $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();
    }
  }

  /**
   * --------------------------------------------------------------------------
   * Public Util Api
   * --------------------------------------------------------------------------
   */

  var Util = {

    TRANSITION_END: 'bsTransitionEnd',

    getUID: function getUID(prefix) {
Jacob Thornton's avatar
Jacob Thornton committed
134
      do {
Chris Rebert's avatar
Chris Rebert committed
135
        /* eslint-disable no-bitwise */
Mark Otto's avatar
grunt    
Mark Otto committed
136
        prefix += ~~(Math.random() * MAX_UID); // "~~" acts like a faster Math.floor() here
Chris Rebert's avatar
Chris Rebert committed
137
        /* eslint-enable no-bitwise */
Jacob Thornton's avatar
Jacob Thornton committed
138
      } while (document.getElementById(prefix));
Jacob Thornton's avatar
Jacob Thornton committed
139
140
141
142
143
144
145
146
147
148
149
150
151
      return prefix;
    },
    getSelectorFromElement: function getSelectorFromElement(element) {
      var selector = element.getAttribute('data-target');

      if (!selector) {
        selector = element.getAttribute('href') || '';
        selector = /^#[a-z]/i.test(selector) ? selector : null;
      }

      return selector;
    },
    reflow: function reflow(element) {
Mark Otto's avatar
grunt    
Mark Otto committed
152
      return element.offsetHeight;
Jacob Thornton's avatar
Jacob Thornton committed
153
154
155
156
157
    },
    triggerTransitionEnd: function triggerTransitionEnd(element) {
      $(element).trigger(transition.end);
    },
    supportsTransitionEnd: function supportsTransitionEnd() {
Jacob Thornton's avatar
Jacob Thornton committed
158
      return Boolean(transition);
Jacob Thornton's avatar
Jacob Thornton committed
159
160
161
    },
    typeCheckConfig: function typeCheckConfig(componentName, config, configTypes) {
      for (var property in configTypes) {
Jacob Thornton's avatar
Jacob Thornton committed
162
163
164
        if (configTypes.hasOwnProperty(property)) {
          var expectedTypes = configTypes[property];
          var value = config[property];
Mark Otto's avatar
grunt    
Mark Otto committed
165
          var valueType = void 0;
Jacob Thornton's avatar
Jacob Thornton committed
166

Jacob Thornton's avatar
Jacob Thornton committed
167
168
169
170
171
          if (value && isElement(value)) {
            valueType = 'element';
          } else {
            valueType = toType(value);
          }
Jacob Thornton's avatar
Jacob Thornton committed
172

Jacob Thornton's avatar
Jacob Thornton committed
173
174
175
          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
176
177
178
179
180
181
182
183
        }
      }
    }
  };

  setTransitionEndSupport();

  return Util;
Mark Otto's avatar
grunt    
Mark Otto committed
184
}(jQuery);
Jacob Thornton's avatar
Jacob Thornton committed
185
186
187

/**
 * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
188
 * Bootstrap (v4.0.0-alpha.5): alert.js
Jacob Thornton's avatar
Jacob Thornton committed
189
190
191
192
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

Mark Otto's avatar
grunt    
Mark Otto committed
193
var Alert = function ($) {
Jacob Thornton's avatar
Jacob Thornton committed
194
195
196
197
198
199
200
201

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME = 'alert';
Mark Otto's avatar
Mark Otto committed
202
  var VERSION = '4.0.0-alpha.5';
Jacob Thornton's avatar
Jacob Thornton committed
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
  var DATA_KEY = 'bs.alert';
  var EVENT_KEY = '.' + DATA_KEY;
  var DATA_API_KEY = '.data-api';
  var JQUERY_NO_CONFLICT = $.fn[NAME];
  var TRANSITION_DURATION = 150;

  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',
Mark Otto's avatar
grunt    
Mark Otto committed
222
    ACTIVE: 'active'
Jacob Thornton's avatar
Jacob Thornton committed
223
224
225
226
227
228
229
230
  };

  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

Mark Otto's avatar
grunt    
Mark Otto committed
231
  var Alert = function () {
Jacob Thornton's avatar
Jacob Thornton committed
232
233
234
235
236
237
238
239
    function Alert(element) {
      _classCallCheck(this, Alert);

      this._element = element;
    }

    // getters

Mark Otto's avatar
grunt    
Mark Otto committed
240
    // public
Jacob Thornton's avatar
Jacob Thornton committed
241

Mark Otto's avatar
grunt    
Mark Otto committed
242
243
    Alert.prototype.close = function close(element) {
      element = element || this._element;
Jacob Thornton's avatar
Jacob Thornton committed
244

Mark Otto's avatar
grunt    
Mark Otto committed
245
246
247
248
249
250
      var rootElement = this._getRootElement(element);
      var customEvent = this._triggerCloseEvent(rootElement);

      if (customEvent.isDefaultPrevented()) {
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
251

Mark Otto's avatar
grunt    
Mark Otto committed
252
253
      this._removeElement(rootElement);
    };
Jacob Thornton's avatar
Jacob Thornton committed
254

Mark Otto's avatar
grunt    
Mark Otto committed
255
256
257
258
259
260
    Alert.prototype.dispose = function dispose() {
      $.removeData(this._element, DATA_KEY);
      this._element = null;
    };

    // private
Jacob Thornton's avatar
Jacob Thornton committed
261

Mark Otto's avatar
grunt    
Mark Otto committed
262
263
264
265
266
267
    Alert.prototype._getRootElement = function _getRootElement(element) {
      var selector = Util.getSelectorFromElement(element);
      var parent = false;

      if (selector) {
        parent = $(selector)[0];
Jacob Thornton's avatar
Jacob Thornton committed
268
      }
Mark Otto's avatar
grunt    
Mark Otto committed
269
270
271

      if (!parent) {
        parent = $(element).closest('.' + ClassName.ALERT)[0];
Jacob Thornton's avatar
Jacob Thornton committed
272
273
      }

Mark Otto's avatar
grunt    
Mark Otto committed
274
275
      return parent;
    };
Jacob Thornton's avatar
Jacob Thornton committed
276

Mark Otto's avatar
grunt    
Mark Otto committed
277
278
    Alert.prototype._triggerCloseEvent = function _triggerCloseEvent(element) {
      var closeEvent = $.Event(Event.CLOSE);
Jacob Thornton's avatar
Jacob Thornton committed
279

Mark Otto's avatar
grunt    
Mark Otto committed
280
281
282
      $(element).trigger(closeEvent);
      return closeEvent;
    };
Jacob Thornton's avatar
Jacob Thornton committed
283

Mark Otto's avatar
grunt    
Mark Otto committed
284
    Alert.prototype._removeElement = function _removeElement(element) {
Mark Otto's avatar
grunt    
Mark Otto committed
285
      $(element).removeClass(ClassName.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
286

Mark Otto's avatar
grunt    
Mark Otto committed
287
288
289
      if (!Util.supportsTransitionEnd() || !$(element).hasClass(ClassName.FADE)) {
        this._destroyElement(element);
        return;
Jacob Thornton's avatar
Jacob Thornton committed
290
      }
Jacob Thornton's avatar
Jacob Thornton committed
291

Mark Otto's avatar
grunt    
Mark Otto committed
292
293
      $(element).one(Util.TRANSITION_END, $.proxy(this._destroyElement, this, element)).emulateTransitionEnd(TRANSITION_DURATION);
    };
Jacob Thornton's avatar
Jacob Thornton committed
294

Mark Otto's avatar
grunt    
Mark Otto committed
295
296
297
    Alert.prototype._destroyElement = function _destroyElement(element) {
      $(element).detach().trigger(Event.CLOSED).remove();
    };
Jacob Thornton's avatar
Jacob Thornton committed
298

Mark Otto's avatar
grunt    
Mark Otto committed
299
    // static
Jacob Thornton's avatar
Jacob Thornton committed
300

Mark Otto's avatar
grunt    
Mark Otto committed
301
302
303
304
    Alert._jQueryInterface = function _jQueryInterface(config) {
      return this.each(function () {
        var $element = $(this);
        var data = $element.data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
305

Mark Otto's avatar
grunt    
Mark Otto committed
306
307
308
309
        if (!data) {
          data = new Alert(this);
          $element.data(DATA_KEY, data);
        }
Jacob Thornton's avatar
Jacob Thornton committed
310

Mark Otto's avatar
grunt    
Mark Otto committed
311
312
313
314
315
        if (config === 'close') {
          data[config](this);
        }
      });
    };
Jacob Thornton's avatar
Jacob Thornton committed
316

Mark Otto's avatar
grunt    
Mark Otto committed
317
318
319
320
321
    Alert._handleDismiss = function _handleDismiss(alertInstance) {
      return function (event) {
        if (event) {
          event.preventDefault();
        }
Jacob Thornton's avatar
Jacob Thornton committed
322

Mark Otto's avatar
grunt    
Mark Otto committed
323
324
325
326
327
        alertInstance.close(this);
      };
    };

    _createClass(Alert, null, [{
Jacob Thornton's avatar
Jacob Thornton committed
328
329
330
331
332
333
334
      key: 'VERSION',
      get: function get() {
        return VERSION;
      }
    }]);

    return Alert;
Mark Otto's avatar
grunt    
Mark Otto committed
335
336
337
338
339
340
341
  }();

  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */
Jacob Thornton's avatar
Jacob Thornton committed
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358

  $(document).on(Event.CLICK_DATA_API, Selector.DISMISS, Alert._handleDismiss(new Alert()));

  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */

  $.fn[NAME] = Alert._jQueryInterface;
  $.fn[NAME].Constructor = Alert;
  $.fn[NAME].noConflict = function () {
    $.fn[NAME] = JQUERY_NO_CONFLICT;
    return Alert._jQueryInterface;
  };

  return Alert;
Mark Otto's avatar
grunt    
Mark Otto committed
359
}(jQuery);
Jacob Thornton's avatar
Jacob Thornton committed
360
361
362

/**
 * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
363
 * Bootstrap (v4.0.0-alpha.5): button.js
Jacob Thornton's avatar
Jacob Thornton committed
364
365
366
367
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

Mark Otto's avatar
grunt    
Mark Otto committed
368
var Button = function ($) {
Jacob Thornton's avatar
Jacob Thornton committed
369
370
371
372
373
374
375
376

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME = 'button';
Mark Otto's avatar
Mark Otto committed
377
  var VERSION = '4.0.0-alpha.5';
Jacob Thornton's avatar
Jacob Thornton committed
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
  var DATA_KEY = 'bs.button';
  var EVENT_KEY = '.' + DATA_KEY;
  var DATA_API_KEY = '.data-api';
  var JQUERY_NO_CONFLICT = $.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
   * ------------------------------------------------------------------------
   */

Mark Otto's avatar
grunt    
Mark Otto committed
408
  var Button = function () {
Jacob Thornton's avatar
Jacob Thornton committed
409
410
411
412
413
414
415
416
    function Button(element) {
      _classCallCheck(this, Button);

      this._element = element;
    }

    // getters

Mark Otto's avatar
grunt    
Mark Otto committed
417
    // public
Jacob Thornton's avatar
Jacob Thornton committed
418

Mark Otto's avatar
grunt    
Mark Otto committed
419
420
421
    Button.prototype.toggle = function toggle() {
      var triggerChangeEvent = true;
      var rootElement = $(this._element).closest(Selector.DATA_TOGGLE)[0];
Jacob Thornton's avatar
Jacob Thornton committed
422

Mark Otto's avatar
grunt    
Mark Otto committed
423
424
      if (rootElement) {
        var input = $(this._element).find(Selector.INPUT)[0];
Jacob Thornton's avatar
Jacob Thornton committed
425

Mark Otto's avatar
grunt    
Mark Otto committed
426
427
428
429
430
431
        if (input) {
          if (input.type === 'radio') {
            if (input.checked && $(this._element).hasClass(ClassName.ACTIVE)) {
              triggerChangeEvent = false;
            } else {
              var activeElement = $(rootElement).find(Selector.ACTIVE)[0];
Jacob Thornton's avatar
Jacob Thornton committed
432

Mark Otto's avatar
grunt    
Mark Otto committed
433
434
              if (activeElement) {
                $(activeElement).removeClass(ClassName.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
435
436
              }
            }
Mark Otto's avatar
grunt    
Mark Otto committed
437
          }
Jacob Thornton's avatar
Jacob Thornton committed
438

Mark Otto's avatar
grunt    
Mark Otto committed
439
440
441
          if (triggerChangeEvent) {
            input.checked = !$(this._element).hasClass(ClassName.ACTIVE);
            $(this._element).trigger('change');
Jacob Thornton's avatar
Jacob Thornton committed
442
443
          }

Mark Otto's avatar
grunt    
Mark Otto committed
444
          input.focus();
Jacob Thornton's avatar
Jacob Thornton committed
445
        }
Mark Otto's avatar
grunt    
Mark Otto committed
446
447
      } else {
        this._element.setAttribute('aria-pressed', !$(this._element).hasClass(ClassName.ACTIVE));
Jacob Thornton's avatar
Jacob Thornton committed
448
      }
Mark Otto's avatar
grunt    
Mark Otto committed
449
450
451

      if (triggerChangeEvent) {
        $(this._element).toggleClass(ClassName.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
452
      }
Mark Otto's avatar
grunt    
Mark Otto committed
453
    };
Jacob Thornton's avatar
Jacob Thornton committed
454

Mark Otto's avatar
grunt    
Mark Otto committed
455
456
457
458
    Button.prototype.dispose = function dispose() {
      $.removeData(this._element, DATA_KEY);
      this._element = null;
    };
Jacob Thornton's avatar
Jacob Thornton committed
459

Mark Otto's avatar
grunt    
Mark Otto committed
460
    // static
Jacob Thornton's avatar
Jacob Thornton committed
461

Mark Otto's avatar
grunt    
Mark Otto committed
462
463
464
    Button._jQueryInterface = function _jQueryInterface(config) {
      return this.each(function () {
        var data = $(this).data(DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
465

Mark Otto's avatar
grunt    
Mark Otto committed
466
467
468
469
470
471
472
473
474
475
476
477
        if (!data) {
          data = new Button(this);
          $(this).data(DATA_KEY, data);
        }

        if (config === 'toggle') {
          data[config]();
        }
      });
    };

    _createClass(Button, null, [{
Jacob Thornton's avatar
Jacob Thornton committed
478
479
480
481
482
483
484
      key: 'VERSION',
      get: function get() {
        return VERSION;
      }
    }]);

    return Button;
Mark Otto's avatar
grunt    
Mark Otto committed
485
486
487
488
489
490
491
  }();

  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */
Jacob Thornton's avatar
Jacob Thornton committed
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521

  $(document).on(Event.CLICK_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
    event.preventDefault();

    var button = event.target;

    if (!$(button).hasClass(ClassName.BUTTON)) {
      button = $(button).closest(Selector.BUTTON);
    }

    Button._jQueryInterface.call($(button), 'toggle');
  }).on(Event.FOCUS_BLUR_DATA_API, Selector.DATA_TOGGLE_CARROT, function (event) {
    var button = $(event.target).closest(Selector.BUTTON)[0];
    $(button).toggleClass(ClassName.FOCUS, /^focus(in)?$/.test(event.type));
  });

  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */

  $.fn[NAME] = Button._jQueryInterface;
  $.fn[NAME].Constructor = Button;
  $.fn[NAME].noConflict = function () {
    $.fn[NAME] = JQUERY_NO_CONFLICT;
    return Button._jQueryInterface;
  };

  return Button;
Mark Otto's avatar
grunt    
Mark Otto committed
522
}(jQuery);
Jacob Thornton's avatar
Jacob Thornton committed
523
524
525

/**
 * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
526
 * Bootstrap (v4.0.0-alpha.5): carousel.js
Jacob Thornton's avatar
Jacob Thornton committed
527
528
529
530
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

Mark Otto's avatar
grunt    
Mark Otto committed
531
var Carousel = function ($) {
Jacob Thornton's avatar
Jacob Thornton committed
532
533
534
535
536
537
538
539

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME = 'carousel';
Mark Otto's avatar
Mark Otto committed
540
  var VERSION = '4.0.0-alpha.5';
Jacob Thornton's avatar
Jacob Thornton committed
541
542
543
544
545
  var DATA_KEY = 'bs.carousel';
  var EVENT_KEY = '.' + DATA_KEY;
  var DATA_API_KEY = '.data-api';
  var JQUERY_NO_CONFLICT = $.fn[NAME];
  var TRANSITION_DURATION = 600;
Chris Rebert's avatar
grunt    
Chris Rebert committed
546
547
  var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
  var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
Jacob Thornton's avatar
Jacob Thornton committed
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
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

  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',
    PREVIOUS: 'prev'
  };

  var Event = {
    SLIDE: 'slide' + EVENT_KEY,
    SLID: 'slid' + EVENT_KEY,
    KEYDOWN: 'keydown' + EVENT_KEY,
    MOUSEENTER: 'mouseenter' + EVENT_KEY,
    MOUSELEAVE: 'mouseleave' + 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: 'right',
    LEFT: 'left',
    ITEM: 'carousel-item'
  };

  var Selector = {
    ACTIVE: '.active',
    ACTIVE_ITEM: '.active.carousel-item',
    ITEM: '.carousel-item',
    NEXT_PREV: '.next, .prev',
    INDICATORS: '.carousel-indicators',
    DATA_SLIDE: '[data-slide], [data-slide-to]',
    DATA_RIDE: '[data-ride="carousel"]'
  };

  /**
   * ------------------------------------------------------------------------
   * Class Definition
   * ------------------------------------------------------------------------
   */

Mark Otto's avatar
grunt    
Mark Otto committed
605
  var Carousel = function () {
Jacob Thornton's avatar
Jacob Thornton committed
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
    function Carousel(element, config) {
      _classCallCheck(this, Carousel);

      this._items = null;
      this._interval = null;
      this._activeElement = null;

      this._isPaused = false;
      this._isSliding = false;

      this._config = this._getConfig(config);
      this._element = $(element)[0];
      this._indicatorsElement = $(this._element).find(Selector.INDICATORS)[0];

      this._addEventListeners();
    }

    // getters

Mark Otto's avatar
grunt    
Mark Otto committed
625
    // public
Jacob Thornton's avatar
Jacob Thornton committed
626

Mark Otto's avatar
grunt    
Mark Otto committed
627
628
629
630
631
    Carousel.prototype.next = function next() {
      if (!this._isSliding) {
        this._slide(Direction.NEXT);
      }
    };
Jacob Thornton's avatar
Jacob Thornton committed
632

Mark Otto's avatar
grunt    
Mark Otto committed
633
634
635
636
    Carousel.prototype.nextWhenVisible = function nextWhenVisible() {
      // Don't call next when the page isn't visible
      if (!document.hidden) {
        this.next();
Jacob Thornton's avatar
Jacob Thornton committed
637
      }
Mark Otto's avatar
grunt    
Mark Otto committed
638
639
640
641
642
    };

    Carousel.prototype.prev = function prev() {
      if (!this._isSliding) {
        this._slide(Direction.PREVIOUS);
XhmikosR's avatar
XhmikosR committed
643
      }
Mark Otto's avatar
grunt    
Mark Otto committed
644
645
646
647
648
    };

    Carousel.prototype.pause = function pause(event) {
      if (!event) {
        this._isPaused = true;
Jacob Thornton's avatar
Jacob Thornton committed
649
650
      }

Mark Otto's avatar
grunt    
Mark Otto committed
651
652
653
654
655
656
657
658
659
660
661
662
663
      if ($(this._element).find(Selector.NEXT_PREV)[0] && Util.supportsTransitionEnd()) {
        Util.triggerTransitionEnd(this._element);
        this.cycle(true);
      }

      clearInterval(this._interval);
      this._interval = null;
    };

    Carousel.prototype.cycle = function cycle(event) {
      if (!event) {
        this._isPaused = false;
      }
Jacob Thornton's avatar
Jacob Thornton committed
664

Mark Otto's avatar
grunt    
Mark Otto committed
665
      if (this._interval) {
Jacob Thornton's avatar
Jacob Thornton committed
666
667
668
669
        clearInterval(this._interval);
        this._interval = null;
      }

Mark Otto's avatar
grunt    
Mark Otto committed
670
671
672
673
      if (this._config.interval && !this._isPaused) {
        this._interval = setInterval($.proxy(document.visibilityState ? this.nextWhenVisible : this.next, this), this._config.interval);
      }
    };
Jacob Thornton's avatar
Jacob Thornton committed
674

Mark Otto's avatar
grunt    
Mark Otto committed
675
676
677
678
679
680
681
682
683
    Carousel.prototype.to = function to(index) {
      var _this2 = this;

      this._activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];

      var activeIndex = this._getItemIndex(this._activeElement);

      if (index > this._items.length - 1 || index < 0) {
        return;
Jacob Thornton's avatar
Jacob Thornton committed
684
685
      }

Mark Otto's avatar
grunt    
Mark Otto committed
686
687
688
689
690
691
      if (this._isSliding) {
        $(this._element).one(Event.SLID, function () {
          return _this2.to(index);
        });
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
692

Mark Otto's avatar
grunt    
Mark Otto committed
693
694
695
696
697
      if (activeIndex === index) {
        this.pause();
        this.cycle();
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
698

Mark Otto's avatar
grunt    
Mark Otto committed
699
      var direction = index > activeIndex ? Direction.NEXT : Direction.PREVIOUS;
Jacob Thornton's avatar
Jacob Thornton committed
700

Mark Otto's avatar
grunt    
Mark Otto committed
701
702
      this._slide(direction, this._items[index]);
    };
Jacob Thornton's avatar
Jacob Thornton committed
703

Mark Otto's avatar
grunt    
Mark Otto committed
704
705
706
    Carousel.prototype.dispose = function dispose() {
      $(this._element).off(EVENT_KEY);
      $.removeData(this._element, DATA_KEY);
Jacob Thornton's avatar
Jacob Thornton committed
707

Mark Otto's avatar
grunt    
Mark Otto committed
708
709
710
711
712
713
714
715
716
      this._items = null;
      this._config = null;
      this._element = null;
      this._interval = null;
      this._isPaused = null;
      this._isSliding = null;
      this._activeElement = null;
      this._indicatorsElement = null;
    };
Jacob Thornton's avatar
Jacob Thornton committed
717

Mark Otto's avatar
grunt    
Mark Otto committed
718
    // private
Jacob Thornton's avatar
Jacob Thornton committed
719

Mark Otto's avatar
grunt    
Mark Otto committed
720
721
722
723
724
    Carousel.prototype._getConfig = function _getConfig(config) {
      config = $.extend({}, Default, config);
      Util.typeCheckConfig(NAME, config, DefaultType);
      return config;
    };
Jacob Thornton's avatar
Jacob Thornton committed
725

Mark Otto's avatar
grunt    
Mark Otto committed
726
727
728
    Carousel.prototype._addEventListeners = function _addEventListeners() {
      if (this._config.keyboard) {
        $(this._element).on(Event.KEYDOWN, $.proxy(this._keydown, this));
Jacob Thornton's avatar
Jacob Thornton committed
729
730
      }

Mark Otto's avatar
grunt    
Mark Otto committed
731
732
      if (this._config.pause === 'hover' && !('ontouchstart' in document.documentElement)) {
        $(this._element).on(Event.MOUSEENTER, $.proxy(this.pause, this)).on(Event.MOUSELEAVE, $.proxy(this.cycle, this));
Jacob Thornton's avatar
Jacob Thornton committed
733
      }
Mark Otto's avatar
grunt    
Mark Otto committed
734
    };
Jacob Thornton's avatar
Jacob Thornton committed
735

Mark Otto's avatar
grunt    
Mark Otto committed
736
737
    Carousel.prototype._keydown = function _keydown(event) {
      event.preventDefault();
Jacob Thornton's avatar
Jacob Thornton committed
738

Mark Otto's avatar
grunt    
Mark Otto committed
739
740
      if (/input|textarea/i.test(event.target.tagName)) {
        return;
Jacob Thornton's avatar
Jacob Thornton committed
741
      }
Mark Otto's avatar
grunt    
Mark Otto committed
742
743
744
745
746
747
748
749
750
751

      switch (event.which) {
        case ARROW_LEFT_KEYCODE:
          this.prev();
          break;
        case ARROW_RIGHT_KEYCODE:
          this.next();
          break;
        default:
          return;
Jacob Thornton's avatar
Jacob Thornton committed
752
      }
Mark Otto's avatar
grunt    
Mark Otto committed
753
    };
Jacob Thornton's avatar
Jacob Thornton committed
754

Mark Otto's avatar
grunt    
Mark Otto committed
755
756
757
758
    Carousel.prototype._getItemIndex = function _getItemIndex(element) {
      this._items = $.makeArray($(element).parent().find(Selector.ITEM));
      return this._items.indexOf(element);
    };
Jacob Thornton's avatar
Jacob Thornton committed
759

Mark Otto's avatar
grunt    
Mark Otto committed
760
761
762
763
764
765
    Carousel.prototype._getItemByDirection = function _getItemByDirection(direction, activeElement) {
      var isNextDirection = direction === Direction.NEXT;
      var isPrevDirection = direction === Direction.PREVIOUS;
      var activeIndex = this._getItemIndex(activeElement);
      var lastItemIndex = this._items.length - 1;
      var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
Jacob Thornton's avatar
Jacob Thornton committed
766

Mark Otto's avatar
grunt    
Mark Otto committed
767
768
      if (isGoingToWrap && !this._config.wrap) {
        return activeElement;
Jacob Thornton's avatar
Jacob Thornton committed
769
770
      }

Mark Otto's avatar
grunt    
Mark Otto committed
771
772
      var delta = direction === Direction.PREVIOUS ? -1 : 1;
      var itemIndex = (activeIndex + delta) % this._items.length;
Jacob Thornton's avatar
Jacob Thornton committed
773

Mark Otto's avatar
grunt    
Mark Otto committed
774
775
      return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
    };
Jacob Thornton's avatar
Jacob Thornton committed
776

Mark Otto's avatar
grunt    
Mark Otto committed
777
778
779
780
781
    Carousel.prototype._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, directionalClassname) {
      var slideEvent = $.Event(Event.SLIDE, {
        relatedTarget: relatedTarget,
        direction: directionalClassname
      });
Jacob Thornton's avatar
Jacob Thornton committed
782

Mark Otto's avatar
grunt    
Mark Otto committed
783
      $(this._element).trigger(slideEvent);
Jacob Thornton's avatar
Jacob Thornton committed
784

Mark Otto's avatar
grunt    
Mark Otto committed
785
786
      return slideEvent;
    };
Jacob Thornton's avatar
Jacob Thornton committed
787

Mark Otto's avatar
grunt    
Mark Otto committed
788
789
790
    Carousel.prototype._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
      if (this._indicatorsElement) {
        $(this._indicatorsElement).find(Selector.ACTIVE).removeClass(ClassName.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
791

Mark Otto's avatar
grunt    
Mark Otto committed
792
        var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
Jacob Thornton's avatar
Jacob Thornton committed
793

Mark Otto's avatar
grunt    
Mark Otto committed
794
795
        if (nextIndicator) {
          $(nextIndicator).addClass(ClassName.ACTIVE);
Jacob Thornton's avatar
Jacob Thornton committed
796
        }
Mark Otto's avatar
grunt    
Mark Otto committed
797
798
      }
    };
Jacob Thornton's avatar
Jacob Thornton committed
799

Mark Otto's avatar
grunt    
Mark Otto committed
800
801
    Carousel.prototype._slide = function _slide(direction, element) {
      var _this3 = this;
Jacob Thornton's avatar
Jacob Thornton committed
802

Mark Otto's avatar
grunt    
Mark Otto committed
803
804
      var activeElement = $(this._element).find(Selector.ACTIVE_ITEM)[0];
      var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
Jacob Thornton's avatar
Jacob Thornton committed
805

Mark Otto's avatar
grunt    
Mark Otto committed
806
      var isCycling = Boolean(this._interval);
Jacob Thornton's avatar
Jacob Thornton committed
807

Mark Otto's avatar
grunt    
Mark Otto committed
808
809
810
811
812
813
      var directionalClassName = direction === Direction.NEXT ? ClassName.LEFT : ClassName.RIGHT;

      if (nextElement && $(nextElement).hasClass(ClassName.ACTIVE)) {
        this._isSliding = false;
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
814

Mark Otto's avatar
grunt    
Mark Otto committed
815
816
817
818
      var slideEvent = this._triggerSlideEvent(nextElement, directionalClassName);
      if (slideEvent.isDefaultPrevented()) {
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
819

Mark Otto's avatar
grunt    
Mark Otto committed
820
821
822
823
      if (!activeElement || !nextElement) {
        // some weirdness is happening, so we bail
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
824

Mark Otto's avatar
grunt    
Mark Otto committed
825
826
827
828
829
      this._isSliding = true;

      if (isCycling) {
        this.pause();
      }
Jacob Thornton's avatar
Jacob Thornton committed
830

Mark Otto's avatar
grunt    
Mark Otto committed
831
      this._setActiveIndicatorElement(nextElement);
Jacob Thornton's avatar
Jacob Thornton committed
832

Mark Otto's avatar
grunt    
Mark Otto committed
833
834
835
836
      var slidEvent = $.Event(Event.SLID, {
        relatedTarget: nextElement,
        direction: directionalClassName
      });
Jacob Thornton's avatar
Jacob Thornton committed
837

Mark Otto's avatar
grunt    
Mark Otto committed
838
      if (Util.supportsTransitionEnd() && $(this._element).hasClass(ClassName.SLIDE)) {
Jacob Thornton's avatar
Jacob Thornton committed
839

Mark Otto's avatar
grunt    
Mark Otto committed
840
        $(nextElement).addClass(direction);
Jacob Thornton's avatar
Jacob Thornton committed
841

Mark Otto's avatar
grunt    
Mark Otto committed
842
        Util.reflow(nextElement);
Jacob Thornton's avatar
Jacob Thornton committed
843

Mark Otto's avatar
grunt    
Mark Otto committed
844
845
        $(activeElement).addClass(directionalClassName);
        $(nextElement).addClass(directionalClassName);
Jacob Thornton's avatar
Jacob Thornton committed
846

Mark Otto's avatar
grunt    
Mark Otto committed
847
848
        $(activeElement).one(Util.TRANSITION_END, function () {
          $(nextElement).removeClass(directionalClassName).removeClass(direction);
Jacob Thornton's avatar
Jacob Thornton committed
849
850
851

          $(nextElement).addClass(ClassName.ACTIVE);

Mark Otto's avatar
grunt    
Mark Otto committed
852
          $(activeElement).removeClass(ClassName.ACTIVE).removeClass(direction).removeClass(directionalClassName);
Jacob Thornton's avatar
Jacob Thornton committed
853

Mark Otto's avatar
grunt    
Mark Otto committed
854
855
856
857
858
859
860
861
862
863
864
865
          _this3._isSliding = false;

          setTimeout(function () {
            return $(_this3._element).trigger(slidEvent);
          }, 0);
        }).emulateTransitionEnd(TRANSITION_DURATION);
      } else {
        $(activeElement).removeClass(ClassName.ACTIVE);
        $(nextElement).addClass(ClassName.ACTIVE);

        this._isSliding = false;
        $(this._element).trigger(slidEvent);
Jacob Thornton's avatar
Jacob Thornton committed
866
867
      }

Mark Otto's avatar
grunt    
Mark Otto committed
868
869
870
871
      if (isCycling) {
        this.cycle();
      }
    };
Jacob Thornton's avatar
Jacob Thornton committed
872

Mark Otto's avatar
grunt    
Mark Otto committed
873
    // static
Jacob Thornton's avatar
Jacob Thornton committed
874

Mark Otto's avatar
grunt    
Mark Otto committed
875
876
877
878
    Carousel._jQueryInterface = function _jQueryInterface(config) {
      return this.each(function () {
        var data = $(this).data(DATA_KEY);
        var _config = $.extend({}, Default, $(this).data());
Jacob Thornton's avatar
Jacob Thornton committed
879

Mark Otto's avatar
grunt    
Mark Otto committed
880
881
882
        if ((typeof config === 'undefined' ? 'undefined' : _typeof(config)) === 'object') {
          $.extend(_config, config);
        }
Jacob Thornton's avatar
Jacob Thornton committed
883

Mark Otto's avatar
grunt    
Mark Otto committed
884
        var action = typeof config === 'string' ? config : _config.slide;
Jacob Thornton's avatar
Jacob Thornton committed
885

Mark Otto's avatar
grunt    
Mark Otto committed
886
887
888
889
        if (!data) {
          data = new Carousel(this, _config);
          $(this).data(DATA_KEY, data);
        }
Jacob Thornton's avatar
Jacob Thornton committed
890

Mark Otto's avatar
grunt    
Mark Otto committed
891
892
893
894
895
896
897
898
899
900
        if (typeof config === 'number') {
          data.to(config);
        } else if (typeof action === 'string') {
          if (data[action] === undefined) {
            throw new Error('No method named "' + action + '"');
          }
          data[action]();
        } else if (_config.interval) {
          data.pause();
          data.cycle();
Jacob Thornton's avatar
Jacob Thornton committed
901
        }
Mark Otto's avatar
grunt    
Mark Otto committed
902
903
      });
    };
Jacob Thornton's avatar
Jacob Thornton committed
904

Mark Otto's avatar
grunt    
Mark Otto committed
905
906
    Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
      var selector = Util.getSelectorFromElement(this);
Jacob Thornton's avatar
Jacob Thornton committed
907

Mark Otto's avatar
grunt    
Mark Otto committed
908
909
910
      if (!selector) {
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
911

Mark Otto's avatar
grunt    
Mark Otto committed
912
      var target = $(selector)[0];
Jacob Thornton's avatar
Jacob Thornton committed
913

Mark Otto's avatar
grunt    
Mark Otto committed
914
915
916
      if (!target || !$(target).hasClass(ClassName.CAROUSEL)) {
        return;
      }
Jacob Thornton's avatar
Jacob Thornton committed
917

Mark Otto's avatar
grunt    
Mark Otto committed
918
919
      var config = $.extend({}, $(target).data(), $(this).data());
      var slideIndex = this.getAttribute('data-slide-to');
Jacob Thornton's avatar
Jacob Thornton committed
920

Mark Otto's avatar
grunt    
Mark Otto committed
921
922
923
      if (slideIndex) {
        config.interval = false;
      }
Jacob Thornton's avatar
Jacob Thornton committed
924

Mark Otto's avatar
grunt    
Mark Otto committed
925
926
927
928
      Carousel._jQueryInterface.call($(target), config);

      if (slideIndex) {
        $(target).data(DATA_KEY).to(slideIndex);
Jacob Thornton's avatar
Jacob Thornton committed
929
      }
Mark Otto's avatar
grunt    
Mark Otto committed
930
931
932
933
934

      event.preventDefault();
    };

    _createClass(Carousel, null, [{
Jacob Thornton's avatar
Jacob Thornton committed
935
936
937
938
939
940
941
942
943
944
945
946
      key: 'VERSION',
      get: function get() {
        return VERSION;
      }
    }, {
      key: 'Default',
      get: function get() {
        return Default;
      }
    }]);

    return Carousel;
Mark Otto's avatar
grunt    
Mark Otto committed
947
948
949
950
951
952
953
  }();

  /**
   * ------------------------------------------------------------------------
   * Data Api implementation
   * ------------------------------------------------------------------------
   */
Jacob Thornton's avatar
Jacob Thornton committed
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977

  $(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);

  $(window).on(Event.LOAD_DATA_API, function () {
    $(Selector.DATA_RIDE).each(function () {
      var $carousel = $(this);
      Carousel._jQueryInterface.call($carousel, $carousel.data());
    });
  });

  /**
   * ------------------------------------------------------------------------
   * jQuery
   * ------------------------------------------------------------------------
   */

  $.fn[NAME] = Carousel._jQueryInterface;
  $.fn[NAME].Constructor = Carousel;
  $.fn[NAME].noConflict = function () {
    $.fn[NAME] = JQUERY_NO_CONFLICT;
    return Carousel._jQueryInterface;
  };

  return Carousel;
Mark Otto's avatar
grunt    
Mark Otto committed
978
}(jQuery);
Jacob Thornton's avatar
Jacob Thornton committed
979
980
981

/**
 * --------------------------------------------------------------------------
Mark Otto's avatar
Mark Otto committed
982
 * Bootstrap (v4.0.0-alpha.5): collapse.js
Jacob Thornton's avatar
Jacob Thornton committed
983
984
985
986
 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
 * --------------------------------------------------------------------------
 */

Mark Otto's avatar
grunt    
Mark Otto committed
987
var Collapse = function ($) {
Jacob Thornton's avatar
Jacob Thornton committed
988
989
990
991
992
993
994
995

  /**
   * ------------------------------------------------------------------------
   * Constants
   * ------------------------------------------------------------------------
   */

  var NAME = 'collapse';
Mark Otto's avatar
Mark Otto committed
996
  var VERSION = '4.0.0-alpha.5';
Jacob Thornton's avatar
Jacob Thornton committed
997
998
999
1000
  var DATA_KEY = 'bs.collapse';
  var EVENT_KEY = '.' + DATA_KEY;
  var DATA_API_KEY = '.data-api';
  var JQUERY_NO_CONFLICT = $.fn[NAME];
For faster browsing, not all history is shown. View entire blame