my_assets 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +43 -0
  4. data/lib/my_assets/version.rb +3 -0
  5. data/lib/my_assets.rb +7 -0
  6. data/vendor/assets/fonts/FontAwesome.otf +0 -0
  7. data/vendor/assets/fonts/fontawesome-webfont.eot +0 -0
  8. data/vendor/assets/fonts/fontawesome-webfont.svg +2671 -0
  9. data/vendor/assets/fonts/fontawesome-webfont.ttf +0 -0
  10. data/vendor/assets/fonts/fontawesome-webfont.woff +0 -0
  11. data/vendor/assets/fonts/fontawesome-webfont.woff2 +0 -0
  12. data/vendor/assets/javascripts/bootstrap/alert.js +203 -0
  13. data/vendor/assets/javascripts/bootstrap/button.js +191 -0
  14. data/vendor/assets/javascripts/bootstrap/carousel.js +566 -0
  15. data/vendor/assets/javascripts/bootstrap/collapse.js +430 -0
  16. data/vendor/assets/javascripts/bootstrap/dropdown.js +551 -0
  17. data/vendor/assets/javascripts/bootstrap/modal.js +633 -0
  18. data/vendor/assets/javascripts/bootstrap/popover.js +265 -0
  19. data/vendor/assets/javascripts/bootstrap/scrollspy.js +378 -0
  20. data/vendor/assets/javascripts/bootstrap/tab.js +277 -0
  21. data/vendor/assets/javascripts/bootstrap/tooltip.js +733 -0
  22. data/vendor/assets/javascripts/bootstrap/util.js +143 -0
  23. data/vendor/assets/javascripts/bootstrap.js +6 -0
  24. data/vendor/assets/javascripts/data-confirm-modal.js +351 -0
  25. data/vendor/assets/javascripts/datatables.js +360 -0
  26. data/vendor/assets/javascripts/jquery.js +4 -0
  27. data/vendor/assets/javascripts/notify.js +625 -0
  28. data/vendor/assets/javascripts/popper.js +5 -0
  29. data/vendor/assets/javascripts/select2.js +1 -0
  30. data/vendor/assets/stylesheets/bootstrap/_alert.scss +51 -0
  31. data/vendor/assets/stylesheets/bootstrap/_badge.scss +47 -0
  32. data/vendor/assets/stylesheets/bootstrap/_breadcrumb.scss +41 -0
  33. data/vendor/assets/stylesheets/bootstrap/_button-group.scss +172 -0
  34. data/vendor/assets/stylesheets/bootstrap/_buttons.scss +143 -0
  35. data/vendor/assets/stylesheets/bootstrap/_card.scss +301 -0
  36. data/vendor/assets/stylesheets/bootstrap/_carousel.scss +236 -0
  37. data/vendor/assets/stylesheets/bootstrap/_close.scss +35 -0
  38. data/vendor/assets/stylesheets/bootstrap/_code.scss +48 -0
  39. data/vendor/assets/stylesheets/bootstrap/_custom-forms.scss +433 -0
  40. data/vendor/assets/stylesheets/bootstrap/_dropdown.scss +166 -0
  41. data/vendor/assets/stylesheets/bootstrap/_forms.scss +333 -0
  42. data/vendor/assets/stylesheets/bootstrap/_functions.scss +86 -0
  43. data/vendor/assets/stylesheets/bootstrap/_grid.scss +52 -0
  44. data/vendor/assets/stylesheets/bootstrap/_images.scss +42 -0
  45. data/vendor/assets/stylesheets/bootstrap/_input-group.scss +173 -0
  46. data/vendor/assets/stylesheets/bootstrap/_jumbotron.scss +16 -0
  47. data/vendor/assets/stylesheets/bootstrap/_list-group.scss +115 -0
  48. data/vendor/assets/stylesheets/bootstrap/_media.scss +8 -0
  49. data/vendor/assets/stylesheets/bootstrap/_mixins.scss +41 -0
  50. data/vendor/assets/stylesheets/bootstrap/_modal.scss +180 -0
  51. data/vendor/assets/stylesheets/bootstrap/_nav.scss +118 -0
  52. data/vendor/assets/stylesheets/bootstrap/_navbar.scss +299 -0
  53. data/vendor/assets/stylesheets/bootstrap/_pagination.scss +78 -0
  54. data/vendor/assets/stylesheets/bootstrap/_popover.scss +183 -0
  55. data/vendor/assets/stylesheets/bootstrap/_print.scss +141 -0
  56. data/vendor/assets/stylesheets/bootstrap/_progress.scss +34 -0
  57. data/vendor/assets/stylesheets/bootstrap/_reboot.scss +483 -0
  58. data/vendor/assets/stylesheets/bootstrap/_root.scss +19 -0
  59. data/vendor/assets/stylesheets/bootstrap/_tables.scss +187 -0
  60. data/vendor/assets/stylesheets/bootstrap/_tooltip.scss +115 -0
  61. data/vendor/assets/stylesheets/bootstrap/_transitions.scss +22 -0
  62. data/vendor/assets/stylesheets/bootstrap/_type.scss +125 -0
  63. data/vendor/assets/stylesheets/bootstrap/_utilities.scss +15 -0
  64. data/vendor/assets/stylesheets/bootstrap/_variables.scss +952 -0
  65. data/vendor/assets/stylesheets/bootstrap/mixins/_alert.scss +13 -0
  66. data/vendor/assets/stylesheets/bootstrap/mixins/_background-variant.scss +21 -0
  67. data/vendor/assets/stylesheets/bootstrap/mixins/_badge.scss +12 -0
  68. data/vendor/assets/stylesheets/bootstrap/mixins/_border-radius.scss +35 -0
  69. data/vendor/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +5 -0
  70. data/vendor/assets/stylesheets/bootstrap/mixins/_breakpoints.scss +123 -0
  71. data/vendor/assets/stylesheets/bootstrap/mixins/_buttons.scss +109 -0
  72. data/vendor/assets/stylesheets/bootstrap/mixins/_caret.scss +66 -0
  73. data/vendor/assets/stylesheets/bootstrap/mixins/_clearfix.scss +7 -0
  74. data/vendor/assets/stylesheets/bootstrap/mixins/_float.scss +11 -0
  75. data/vendor/assets/stylesheets/bootstrap/mixins/_forms.scss +147 -0
  76. data/vendor/assets/stylesheets/bootstrap/mixins/_gradients.scss +45 -0
  77. data/vendor/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +67 -0
  78. data/vendor/assets/stylesheets/bootstrap/mixins/_grid.scss +52 -0
  79. data/vendor/assets/stylesheets/bootstrap/mixins/_hover.scss +37 -0
  80. data/vendor/assets/stylesheets/bootstrap/mixins/_image.scss +36 -0
  81. data/vendor/assets/stylesheets/bootstrap/mixins/_list-group.scss +21 -0
  82. data/vendor/assets/stylesheets/bootstrap/mixins/_lists.scss +7 -0
  83. data/vendor/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
  84. data/vendor/assets/stylesheets/bootstrap/mixins/_pagination.scss +22 -0
  85. data/vendor/assets/stylesheets/bootstrap/mixins/_reset-text.scss +17 -0
  86. data/vendor/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
  87. data/vendor/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +33 -0
  88. data/vendor/assets/stylesheets/bootstrap/mixins/_size.scss +6 -0
  89. data/vendor/assets/stylesheets/bootstrap/mixins/_table-row.scss +30 -0
  90. data/vendor/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +14 -0
  91. data/vendor/assets/stylesheets/bootstrap/mixins/_text-hide.scss +13 -0
  92. data/vendor/assets/stylesheets/bootstrap/mixins/_text-truncate.scss +8 -0
  93. data/vendor/assets/stylesheets/bootstrap/mixins/_transition.scss +13 -0
  94. data/vendor/assets/stylesheets/bootstrap/mixins/_visibility.scss +7 -0
  95. data/vendor/assets/stylesheets/bootstrap/utilities/_align.scss +8 -0
  96. data/vendor/assets/stylesheets/bootstrap/utilities/_background.scss +19 -0
  97. data/vendor/assets/stylesheets/bootstrap/utilities/_borders.scss +59 -0
  98. data/vendor/assets/stylesheets/bootstrap/utilities/_clearfix.scss +3 -0
  99. data/vendor/assets/stylesheets/bootstrap/utilities/_display.scss +38 -0
  100. data/vendor/assets/stylesheets/bootstrap/utilities/_embed.scss +52 -0
  101. data/vendor/assets/stylesheets/bootstrap/utilities/_flex.scss +51 -0
  102. data/vendor/assets/stylesheets/bootstrap/utilities/_float.scss +9 -0
  103. data/vendor/assets/stylesheets/bootstrap/utilities/_position.scss +37 -0
  104. data/vendor/assets/stylesheets/bootstrap/utilities/_screenreaders.scss +11 -0
  105. data/vendor/assets/stylesheets/bootstrap/utilities/_shadows.scss +6 -0
  106. data/vendor/assets/stylesheets/bootstrap/utilities/_sizing.scss +12 -0
  107. data/vendor/assets/stylesheets/bootstrap/utilities/_spacing.scss +51 -0
  108. data/vendor/assets/stylesheets/bootstrap/utilities/_text.scss +58 -0
  109. data/vendor/assets/stylesheets/bootstrap/utilities/_visibility.scss +11 -0
  110. data/vendor/assets/stylesheets/bootstrap.scss +42 -0
  111. data/vendor/assets/stylesheets/datatables.css +1004 -0
  112. data/vendor/assets/stylesheets/font-awesome.css.erb +2342 -0
  113. data/vendor/assets/stylesheets/select2.css +484 -0
  114. metadata +186 -0
@@ -0,0 +1,566 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
3
+ typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
4
+ (global.Carousel = factory(global.jQuery,global.Util));
5
+ }(this, (function ($,Util) { 'use strict';
6
+
7
+ $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
8
+ Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
9
+
10
+ function _defineProperties(target, props) {
11
+ for (var i = 0; i < props.length; i++) {
12
+ var descriptor = props[i];
13
+ descriptor.enumerable = descriptor.enumerable || false;
14
+ descriptor.configurable = true;
15
+ if ("value" in descriptor) descriptor.writable = true;
16
+ Object.defineProperty(target, descriptor.key, descriptor);
17
+ }
18
+ }
19
+
20
+ function _createClass(Constructor, protoProps, staticProps) {
21
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
22
+ if (staticProps) _defineProperties(Constructor, staticProps);
23
+ return Constructor;
24
+ }
25
+
26
+ function _defineProperty(obj, key, value) {
27
+ if (key in obj) {
28
+ Object.defineProperty(obj, key, {
29
+ value: value,
30
+ enumerable: true,
31
+ configurable: true,
32
+ writable: true
33
+ });
34
+ } else {
35
+ obj[key] = value;
36
+ }
37
+
38
+ return obj;
39
+ }
40
+
41
+ function _objectSpread(target) {
42
+ for (var i = 1; i < arguments.length; i++) {
43
+ var source = arguments[i] != null ? arguments[i] : {};
44
+ var ownKeys = Object.keys(source);
45
+
46
+ if (typeof Object.getOwnPropertySymbols === 'function') {
47
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
48
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
49
+ }));
50
+ }
51
+
52
+ ownKeys.forEach(function (key) {
53
+ _defineProperty(target, key, source[key]);
54
+ });
55
+ }
56
+
57
+ return target;
58
+ }
59
+
60
+ /**
61
+ * --------------------------------------------------------------------------
62
+ * Bootstrap (v4.1.3): carousel.js
63
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
64
+ * --------------------------------------------------------------------------
65
+ */
66
+
67
+ var Carousel = function ($$$1) {
68
+ /**
69
+ * ------------------------------------------------------------------------
70
+ * Constants
71
+ * ------------------------------------------------------------------------
72
+ */
73
+ var NAME = 'carousel';
74
+ var VERSION = '4.1.3';
75
+ var DATA_KEY = 'bs.carousel';
76
+ var EVENT_KEY = "." + DATA_KEY;
77
+ var DATA_API_KEY = '.data-api';
78
+ var JQUERY_NO_CONFLICT = $$$1.fn[NAME];
79
+ var ARROW_LEFT_KEYCODE = 37; // KeyboardEvent.which value for left arrow key
80
+
81
+ var ARROW_RIGHT_KEYCODE = 39; // KeyboardEvent.which value for right arrow key
82
+
83
+ var TOUCHEVENT_COMPAT_WAIT = 500; // Time for mouse compat events to fire after touch
84
+
85
+ var Default = {
86
+ interval: 5000,
87
+ keyboard: true,
88
+ slide: false,
89
+ pause: 'hover',
90
+ wrap: true
91
+ };
92
+ var DefaultType = {
93
+ interval: '(number|boolean)',
94
+ keyboard: 'boolean',
95
+ slide: '(boolean|string)',
96
+ pause: '(string|boolean)',
97
+ wrap: 'boolean'
98
+ };
99
+ var Direction = {
100
+ NEXT: 'next',
101
+ PREV: 'prev',
102
+ LEFT: 'left',
103
+ RIGHT: 'right'
104
+ };
105
+ var Event = {
106
+ SLIDE: "slide" + EVENT_KEY,
107
+ SLID: "slid" + EVENT_KEY,
108
+ KEYDOWN: "keydown" + EVENT_KEY,
109
+ MOUSEENTER: "mouseenter" + EVENT_KEY,
110
+ MOUSELEAVE: "mouseleave" + EVENT_KEY,
111
+ TOUCHEND: "touchend" + EVENT_KEY,
112
+ LOAD_DATA_API: "load" + EVENT_KEY + DATA_API_KEY,
113
+ CLICK_DATA_API: "click" + EVENT_KEY + DATA_API_KEY
114
+ };
115
+ var ClassName = {
116
+ CAROUSEL: 'carousel',
117
+ ACTIVE: 'active',
118
+ SLIDE: 'slide',
119
+ RIGHT: 'carousel-item-right',
120
+ LEFT: 'carousel-item-left',
121
+ NEXT: 'carousel-item-next',
122
+ PREV: 'carousel-item-prev',
123
+ ITEM: 'carousel-item'
124
+ };
125
+ var Selector = {
126
+ ACTIVE: '.active',
127
+ ACTIVE_ITEM: '.active.carousel-item',
128
+ ITEM: '.carousel-item',
129
+ NEXT_PREV: '.carousel-item-next, .carousel-item-prev',
130
+ INDICATORS: '.carousel-indicators',
131
+ DATA_SLIDE: '[data-slide], [data-slide-to]',
132
+ DATA_RIDE: '[data-ride="carousel"]'
133
+ /**
134
+ * ------------------------------------------------------------------------
135
+ * Class Definition
136
+ * ------------------------------------------------------------------------
137
+ */
138
+
139
+ };
140
+
141
+ var Carousel =
142
+ /*#__PURE__*/
143
+ function () {
144
+ function Carousel(element, config) {
145
+ this._items = null;
146
+ this._interval = null;
147
+ this._activeElement = null;
148
+ this._isPaused = false;
149
+ this._isSliding = false;
150
+ this.touchTimeout = null;
151
+ this._config = this._getConfig(config);
152
+ this._element = $$$1(element)[0];
153
+ this._indicatorsElement = this._element.querySelector(Selector.INDICATORS);
154
+
155
+ this._addEventListeners();
156
+ } // Getters
157
+
158
+
159
+ var _proto = Carousel.prototype;
160
+
161
+ // Public
162
+ _proto.next = function next() {
163
+ if (!this._isSliding) {
164
+ this._slide(Direction.NEXT);
165
+ }
166
+ };
167
+
168
+ _proto.nextWhenVisible = function nextWhenVisible() {
169
+ // Don't call next when the page isn't visible
170
+ // or the carousel or its parent isn't visible
171
+ if (!document.hidden && $$$1(this._element).is(':visible') && $$$1(this._element).css('visibility') !== 'hidden') {
172
+ this.next();
173
+ }
174
+ };
175
+
176
+ _proto.prev = function prev() {
177
+ if (!this._isSliding) {
178
+ this._slide(Direction.PREV);
179
+ }
180
+ };
181
+
182
+ _proto.pause = function pause(event) {
183
+ if (!event) {
184
+ this._isPaused = true;
185
+ }
186
+
187
+ if (this._element.querySelector(Selector.NEXT_PREV)) {
188
+ Util.triggerTransitionEnd(this._element);
189
+ this.cycle(true);
190
+ }
191
+
192
+ clearInterval(this._interval);
193
+ this._interval = null;
194
+ };
195
+
196
+ _proto.cycle = function cycle(event) {
197
+ if (!event) {
198
+ this._isPaused = false;
199
+ }
200
+
201
+ if (this._interval) {
202
+ clearInterval(this._interval);
203
+ this._interval = null;
204
+ }
205
+
206
+ if (this._config.interval && !this._isPaused) {
207
+ this._interval = setInterval((document.visibilityState ? this.nextWhenVisible : this.next).bind(this), this._config.interval);
208
+ }
209
+ };
210
+
211
+ _proto.to = function to(index) {
212
+ var _this = this;
213
+
214
+ this._activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
215
+
216
+ var activeIndex = this._getItemIndex(this._activeElement);
217
+
218
+ if (index > this._items.length - 1 || index < 0) {
219
+ return;
220
+ }
221
+
222
+ if (this._isSliding) {
223
+ $$$1(this._element).one(Event.SLID, function () {
224
+ return _this.to(index);
225
+ });
226
+ return;
227
+ }
228
+
229
+ if (activeIndex === index) {
230
+ this.pause();
231
+ this.cycle();
232
+ return;
233
+ }
234
+
235
+ var direction = index > activeIndex ? Direction.NEXT : Direction.PREV;
236
+
237
+ this._slide(direction, this._items[index]);
238
+ };
239
+
240
+ _proto.dispose = function dispose() {
241
+ $$$1(this._element).off(EVENT_KEY);
242
+ $$$1.removeData(this._element, DATA_KEY);
243
+ this._items = null;
244
+ this._config = null;
245
+ this._element = null;
246
+ this._interval = null;
247
+ this._isPaused = null;
248
+ this._isSliding = null;
249
+ this._activeElement = null;
250
+ this._indicatorsElement = null;
251
+ }; // Private
252
+
253
+
254
+ _proto._getConfig = function _getConfig(config) {
255
+ config = _objectSpread({}, Default, config);
256
+ Util.typeCheckConfig(NAME, config, DefaultType);
257
+ return config;
258
+ };
259
+
260
+ _proto._addEventListeners = function _addEventListeners() {
261
+ var _this2 = this;
262
+
263
+ if (this._config.keyboard) {
264
+ $$$1(this._element).on(Event.KEYDOWN, function (event) {
265
+ return _this2._keydown(event);
266
+ });
267
+ }
268
+
269
+ if (this._config.pause === 'hover') {
270
+ $$$1(this._element).on(Event.MOUSEENTER, function (event) {
271
+ return _this2.pause(event);
272
+ }).on(Event.MOUSELEAVE, function (event) {
273
+ return _this2.cycle(event);
274
+ });
275
+
276
+ if ('ontouchstart' in document.documentElement) {
277
+ // If it's a touch-enabled device, mouseenter/leave are fired as
278
+ // part of the mouse compatibility events on first tap - the carousel
279
+ // would stop cycling until user tapped out of it;
280
+ // here, we listen for touchend, explicitly pause the carousel
281
+ // (as if it's the second time we tap on it, mouseenter compat event
282
+ // is NOT fired) and after a timeout (to allow for mouse compatibility
283
+ // events to fire) we explicitly restart cycling
284
+ $$$1(this._element).on(Event.TOUCHEND, function () {
285
+ _this2.pause();
286
+
287
+ if (_this2.touchTimeout) {
288
+ clearTimeout(_this2.touchTimeout);
289
+ }
290
+
291
+ _this2.touchTimeout = setTimeout(function (event) {
292
+ return _this2.cycle(event);
293
+ }, TOUCHEVENT_COMPAT_WAIT + _this2._config.interval);
294
+ });
295
+ }
296
+ }
297
+ };
298
+
299
+ _proto._keydown = function _keydown(event) {
300
+ if (/input|textarea/i.test(event.target.tagName)) {
301
+ return;
302
+ }
303
+
304
+ switch (event.which) {
305
+ case ARROW_LEFT_KEYCODE:
306
+ event.preventDefault();
307
+ this.prev();
308
+ break;
309
+
310
+ case ARROW_RIGHT_KEYCODE:
311
+ event.preventDefault();
312
+ this.next();
313
+ break;
314
+
315
+ default:
316
+ }
317
+ };
318
+
319
+ _proto._getItemIndex = function _getItemIndex(element) {
320
+ this._items = element && element.parentNode ? [].slice.call(element.parentNode.querySelectorAll(Selector.ITEM)) : [];
321
+ return this._items.indexOf(element);
322
+ };
323
+
324
+ _proto._getItemByDirection = function _getItemByDirection(direction, activeElement) {
325
+ var isNextDirection = direction === Direction.NEXT;
326
+ var isPrevDirection = direction === Direction.PREV;
327
+
328
+ var activeIndex = this._getItemIndex(activeElement);
329
+
330
+ var lastItemIndex = this._items.length - 1;
331
+ var isGoingToWrap = isPrevDirection && activeIndex === 0 || isNextDirection && activeIndex === lastItemIndex;
332
+
333
+ if (isGoingToWrap && !this._config.wrap) {
334
+ return activeElement;
335
+ }
336
+
337
+ var delta = direction === Direction.PREV ? -1 : 1;
338
+ var itemIndex = (activeIndex + delta) % this._items.length;
339
+ return itemIndex === -1 ? this._items[this._items.length - 1] : this._items[itemIndex];
340
+ };
341
+
342
+ _proto._triggerSlideEvent = function _triggerSlideEvent(relatedTarget, eventDirectionName) {
343
+ var targetIndex = this._getItemIndex(relatedTarget);
344
+
345
+ var fromIndex = this._getItemIndex(this._element.querySelector(Selector.ACTIVE_ITEM));
346
+
347
+ var slideEvent = $$$1.Event(Event.SLIDE, {
348
+ relatedTarget: relatedTarget,
349
+ direction: eventDirectionName,
350
+ from: fromIndex,
351
+ to: targetIndex
352
+ });
353
+ $$$1(this._element).trigger(slideEvent);
354
+ return slideEvent;
355
+ };
356
+
357
+ _proto._setActiveIndicatorElement = function _setActiveIndicatorElement(element) {
358
+ if (this._indicatorsElement) {
359
+ var indicators = [].slice.call(this._indicatorsElement.querySelectorAll(Selector.ACTIVE));
360
+ $$$1(indicators).removeClass(ClassName.ACTIVE);
361
+
362
+ var nextIndicator = this._indicatorsElement.children[this._getItemIndex(element)];
363
+
364
+ if (nextIndicator) {
365
+ $$$1(nextIndicator).addClass(ClassName.ACTIVE);
366
+ }
367
+ }
368
+ };
369
+
370
+ _proto._slide = function _slide(direction, element) {
371
+ var _this3 = this;
372
+
373
+ var activeElement = this._element.querySelector(Selector.ACTIVE_ITEM);
374
+
375
+ var activeElementIndex = this._getItemIndex(activeElement);
376
+
377
+ var nextElement = element || activeElement && this._getItemByDirection(direction, activeElement);
378
+
379
+ var nextElementIndex = this._getItemIndex(nextElement);
380
+
381
+ var isCycling = Boolean(this._interval);
382
+ var directionalClassName;
383
+ var orderClassName;
384
+ var eventDirectionName;
385
+
386
+ if (direction === Direction.NEXT) {
387
+ directionalClassName = ClassName.LEFT;
388
+ orderClassName = ClassName.NEXT;
389
+ eventDirectionName = Direction.LEFT;
390
+ } else {
391
+ directionalClassName = ClassName.RIGHT;
392
+ orderClassName = ClassName.PREV;
393
+ eventDirectionName = Direction.RIGHT;
394
+ }
395
+
396
+ if (nextElement && $$$1(nextElement).hasClass(ClassName.ACTIVE)) {
397
+ this._isSliding = false;
398
+ return;
399
+ }
400
+
401
+ var slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName);
402
+
403
+ if (slideEvent.isDefaultPrevented()) {
404
+ return;
405
+ }
406
+
407
+ if (!activeElement || !nextElement) {
408
+ // Some weirdness is happening, so we bail
409
+ return;
410
+ }
411
+
412
+ this._isSliding = true;
413
+
414
+ if (isCycling) {
415
+ this.pause();
416
+ }
417
+
418
+ this._setActiveIndicatorElement(nextElement);
419
+
420
+ var slidEvent = $$$1.Event(Event.SLID, {
421
+ relatedTarget: nextElement,
422
+ direction: eventDirectionName,
423
+ from: activeElementIndex,
424
+ to: nextElementIndex
425
+ });
426
+
427
+ if ($$$1(this._element).hasClass(ClassName.SLIDE)) {
428
+ $$$1(nextElement).addClass(orderClassName);
429
+ Util.reflow(nextElement);
430
+ $$$1(activeElement).addClass(directionalClassName);
431
+ $$$1(nextElement).addClass(directionalClassName);
432
+ var transitionDuration = Util.getTransitionDurationFromElement(activeElement);
433
+ $$$1(activeElement).one(Util.TRANSITION_END, function () {
434
+ $$$1(nextElement).removeClass(directionalClassName + " " + orderClassName).addClass(ClassName.ACTIVE);
435
+ $$$1(activeElement).removeClass(ClassName.ACTIVE + " " + orderClassName + " " + directionalClassName);
436
+ _this3._isSliding = false;
437
+ setTimeout(function () {
438
+ return $$$1(_this3._element).trigger(slidEvent);
439
+ }, 0);
440
+ }).emulateTransitionEnd(transitionDuration);
441
+ } else {
442
+ $$$1(activeElement).removeClass(ClassName.ACTIVE);
443
+ $$$1(nextElement).addClass(ClassName.ACTIVE);
444
+ this._isSliding = false;
445
+ $$$1(this._element).trigger(slidEvent);
446
+ }
447
+
448
+ if (isCycling) {
449
+ this.cycle();
450
+ }
451
+ }; // Static
452
+
453
+
454
+ Carousel._jQueryInterface = function _jQueryInterface(config) {
455
+ return this.each(function () {
456
+ var data = $$$1(this).data(DATA_KEY);
457
+
458
+ var _config = _objectSpread({}, Default, $$$1(this).data());
459
+
460
+ if (typeof config === 'object') {
461
+ _config = _objectSpread({}, _config, config);
462
+ }
463
+
464
+ var action = typeof config === 'string' ? config : _config.slide;
465
+
466
+ if (!data) {
467
+ data = new Carousel(this, _config);
468
+ $$$1(this).data(DATA_KEY, data);
469
+ }
470
+
471
+ if (typeof config === 'number') {
472
+ data.to(config);
473
+ } else if (typeof action === 'string') {
474
+ if (typeof data[action] === 'undefined') {
475
+ throw new TypeError("No method named \"" + action + "\"");
476
+ }
477
+
478
+ data[action]();
479
+ } else if (_config.interval) {
480
+ data.pause();
481
+ data.cycle();
482
+ }
483
+ });
484
+ };
485
+
486
+ Carousel._dataApiClickHandler = function _dataApiClickHandler(event) {
487
+ var selector = Util.getSelectorFromElement(this);
488
+
489
+ if (!selector) {
490
+ return;
491
+ }
492
+
493
+ var target = $$$1(selector)[0];
494
+
495
+ if (!target || !$$$1(target).hasClass(ClassName.CAROUSEL)) {
496
+ return;
497
+ }
498
+
499
+ var config = _objectSpread({}, $$$1(target).data(), $$$1(this).data());
500
+
501
+ var slideIndex = this.getAttribute('data-slide-to');
502
+
503
+ if (slideIndex) {
504
+ config.interval = false;
505
+ }
506
+
507
+ Carousel._jQueryInterface.call($$$1(target), config);
508
+
509
+ if (slideIndex) {
510
+ $$$1(target).data(DATA_KEY).to(slideIndex);
511
+ }
512
+
513
+ event.preventDefault();
514
+ };
515
+
516
+ _createClass(Carousel, null, [{
517
+ key: "VERSION",
518
+ get: function get() {
519
+ return VERSION;
520
+ }
521
+ }, {
522
+ key: "Default",
523
+ get: function get() {
524
+ return Default;
525
+ }
526
+ }]);
527
+
528
+ return Carousel;
529
+ }();
530
+ /**
531
+ * ------------------------------------------------------------------------
532
+ * Data Api implementation
533
+ * ------------------------------------------------------------------------
534
+ */
535
+
536
+
537
+ $$$1(document).on(Event.CLICK_DATA_API, Selector.DATA_SLIDE, Carousel._dataApiClickHandler);
538
+ $$$1(window).on(Event.LOAD_DATA_API, function () {
539
+ var carousels = [].slice.call(document.querySelectorAll(Selector.DATA_RIDE));
540
+
541
+ for (var i = 0, len = carousels.length; i < len; i++) {
542
+ var $carousel = $$$1(carousels[i]);
543
+
544
+ Carousel._jQueryInterface.call($carousel, $carousel.data());
545
+ }
546
+ });
547
+ /**
548
+ * ------------------------------------------------------------------------
549
+ * jQuery
550
+ * ------------------------------------------------------------------------
551
+ */
552
+
553
+ $$$1.fn[NAME] = Carousel._jQueryInterface;
554
+ $$$1.fn[NAME].Constructor = Carousel;
555
+
556
+ $$$1.fn[NAME].noConflict = function () {
557
+ $$$1.fn[NAME] = JQUERY_NO_CONFLICT;
558
+ return Carousel._jQueryInterface;
559
+ };
560
+
561
+ return Carousel;
562
+ }($);
563
+
564
+ return Carousel;
565
+
566
+ })));