bootstrap 4.2.1 → 4.5.2

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 (101) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +15 -1
  3. data/CHANGELOG.md +2 -14
  4. data/README.md +1 -1
  5. data/assets/javascripts/bootstrap-sprockets.js +7 -7
  6. data/assets/javascripts/bootstrap.js +1054 -893
  7. data/assets/javascripts/bootstrap.min.js +4 -4
  8. data/assets/javascripts/bootstrap/alert.js +35 -57
  9. data/assets/javascripts/bootstrap/button.js +95 -69
  10. data/assets/javascripts/bootstrap/carousel.js +109 -165
  11. data/assets/javascripts/bootstrap/collapse.js +58 -114
  12. data/assets/javascripts/bootstrap/dropdown.js +138 -191
  13. data/assets/javascripts/bootstrap/modal.js +170 -176
  14. data/assets/javascripts/bootstrap/popover.js +31 -87
  15. data/assets/javascripts/bootstrap/scrollspy.js +54 -114
  16. data/assets/javascripts/bootstrap/tab.js +62 -81
  17. data/assets/javascripts/bootstrap/toast.js +80 -117
  18. data/assets/javascripts/bootstrap/tooltip.js +269 -157
  19. data/assets/javascripts/bootstrap/util.js +34 -9
  20. data/assets/stylesheets/_bootstrap-grid.scss +4 -4
  21. data/assets/stylesheets/_bootstrap-reboot.scss +4 -4
  22. data/assets/stylesheets/_bootstrap.scss +4 -4
  23. data/assets/stylesheets/bootstrap/_badge.scss +3 -2
  24. data/assets/stylesheets/bootstrap/_breadcrumb.scss +4 -1
  25. data/assets/stylesheets/bootstrap/_button-group.scss +1 -1
  26. data/assets/stylesheets/bootstrap/_buttons.scss +13 -11
  27. data/assets/stylesheets/bootstrap/_card.scss +49 -73
  28. data/assets/stylesheets/bootstrap/_carousel.scss +7 -8
  29. data/assets/stylesheets/bootstrap/_close.scss +3 -7
  30. data/assets/stylesheets/bootstrap/_code.scss +6 -6
  31. data/assets/stylesheets/bootstrap/_custom-forms.scss +40 -24
  32. data/assets/stylesheets/bootstrap/_dropdown.scss +24 -23
  33. data/assets/stylesheets/bootstrap/_forms.scss +38 -25
  34. data/assets/stylesheets/bootstrap/_functions.scss +62 -7
  35. data/assets/stylesheets/bootstrap/_grid.scss +32 -11
  36. data/assets/stylesheets/bootstrap/_images.scss +3 -3
  37. data/assets/stylesheets/bootstrap/_input-group.scss +4 -5
  38. data/assets/stylesheets/bootstrap/_jumbotron.scss +1 -0
  39. data/assets/stylesheets/bootstrap/_list-group.scss +62 -29
  40. data/assets/stylesheets/bootstrap/_mixins.scss +9 -3
  41. data/assets/stylesheets/bootstrap/_modal.scss +65 -11
  42. data/assets/stylesheets/bootstrap/_nav.scss +6 -3
  43. data/assets/stylesheets/bootstrap/_navbar.scss +48 -23
  44. data/assets/stylesheets/bootstrap/_pagination.scss +3 -7
  45. data/assets/stylesheets/bootstrap/_popover.scss +54 -67
  46. data/assets/stylesheets/bootstrap/_print.scss +3 -3
  47. data/assets/stylesheets/bootstrap/_progress.scss +19 -6
  48. data/assets/stylesheets/bootstrap/_reboot.scss +51 -33
  49. data/assets/stylesheets/bootstrap/_root.scss +1 -0
  50. data/assets/stylesheets/bootstrap/_spinners.scss +3 -0
  51. data/assets/stylesheets/bootstrap/_tables.scss +6 -8
  52. data/assets/stylesheets/bootstrap/_toasts.scss +7 -4
  53. data/assets/stylesheets/bootstrap/_tooltip.scss +1 -1
  54. data/assets/stylesheets/bootstrap/_transitions.scss +0 -2
  55. data/assets/stylesheets/bootstrap/_type.scss +17 -17
  56. data/assets/stylesheets/bootstrap/_utilities.scss +2 -0
  57. data/assets/stylesheets/bootstrap/_variables.scss +168 -119
  58. data/assets/stylesheets/bootstrap/mixins/_background-variant.scss +5 -3
  59. data/assets/stylesheets/bootstrap/mixins/_badge.scss +7 -1
  60. data/assets/stylesheets/bootstrap/mixins/_border-radius.scss +51 -10
  61. data/assets/stylesheets/bootstrap/mixins/_box-shadow.scss +16 -1
  62. data/assets/stylesheets/bootstrap/mixins/_buttons.scss +14 -15
  63. data/assets/stylesheets/bootstrap/mixins/_caret.scss +12 -12
  64. data/assets/stylesheets/bootstrap/mixins/_deprecate.scss +10 -0
  65. data/assets/stylesheets/bootstrap/mixins/_float.scss +6 -3
  66. data/assets/stylesheets/bootstrap/mixins/_forms.scss +40 -60
  67. data/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +29 -15
  68. data/assets/stylesheets/bootstrap/mixins/_grid.scss +25 -7
  69. data/assets/stylesheets/bootstrap/mixins/_hover.scss +4 -4
  70. data/assets/stylesheets/bootstrap/mixins/_image.scss +3 -3
  71. data/assets/stylesheets/bootstrap/mixins/_list-group.scss +1 -1
  72. data/assets/stylesheets/bootstrap/mixins/_lists.scss +1 -1
  73. data/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +2 -1
  74. data/assets/stylesheets/bootstrap/mixins/_pagination.scss +1 -1
  75. data/assets/stylesheets/bootstrap/mixins/_reset-text.scss +2 -2
  76. data/assets/stylesheets/bootstrap/mixins/_screen-reader.scss +3 -2
  77. data/assets/stylesheets/bootstrap/mixins/_size.scss +1 -0
  78. data/assets/stylesheets/bootstrap/mixins/_table-row.scss +1 -1
  79. data/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +7 -4
  80. data/assets/stylesheets/bootstrap/mixins/_text-hide.scss +1 -3
  81. data/assets/stylesheets/bootstrap/mixins/_transition.scss +17 -7
  82. data/assets/stylesheets/bootstrap/mixins/_visibility.scss +1 -0
  83. data/assets/stylesheets/bootstrap/utilities/_background.scss +2 -2
  84. data/assets/stylesheets/bootstrap/utilities/_borders.scss +13 -1
  85. data/assets/stylesheets/bootstrap/utilities/_display.scss +6 -18
  86. data/assets/stylesheets/bootstrap/utilities/_float.scss +5 -3
  87. data/assets/stylesheets/bootstrap/utilities/_interactions.scss +5 -0
  88. data/assets/stylesheets/bootstrap/utilities/_stretched-link.scss +19 -0
  89. data/assets/stylesheets/bootstrap/utilities/_text.scss +8 -3
  90. data/assets/stylesheets/bootstrap/utilities/_visibility.scss +4 -2
  91. data/assets/stylesheets/bootstrap/vendor/_rfs.scss +204 -0
  92. data/bootstrap.gemspec +1 -1
  93. data/lib/bootstrap/version.rb +2 -2
  94. data/tasks/updater/js.rb +1 -1
  95. data/tasks/updater/network.rb +2 -2
  96. data/test/dummy_rails/app/assets/config/manifest.js +3 -0
  97. data/test/dummy_rails/app/assets/stylesheets/.browserslistrc +1 -0
  98. data/test/gemfiles/rails_6_0.gemfile +7 -0
  99. data/test/support/dummy_rails_integration.rb +3 -1
  100. data/test/test_helper.rb +18 -13
  101. metadata +14 -5
@@ -1,67 +1,22 @@
1
1
  /*!
2
- * Bootstrap toast.js v4.2.1 (https://getbootstrap.com/)
3
- * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap toast.js v4.5.2 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('./util.js')) :
8
8
  typeof define === 'function' && define.amd ? define(['jquery', './util.js'], factory) :
9
- (global.Toast = factory(global.jQuery,global.Util));
10
- }(this, (function ($,Util) { 'use strict';
11
-
12
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
- Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
14
-
15
- function _defineProperties(target, props) {
16
- for (var i = 0; i < props.length; i++) {
17
- var descriptor = props[i];
18
- descriptor.enumerable = descriptor.enumerable || false;
19
- descriptor.configurable = true;
20
- if ("value" in descriptor) descriptor.writable = true;
21
- Object.defineProperty(target, descriptor.key, descriptor);
22
- }
23
- }
24
-
25
- function _createClass(Constructor, protoProps, staticProps) {
26
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
27
- if (staticProps) _defineProperties(Constructor, staticProps);
28
- return Constructor;
29
- }
30
-
31
- function _defineProperty(obj, key, value) {
32
- if (key in obj) {
33
- Object.defineProperty(obj, key, {
34
- value: value,
35
- enumerable: true,
36
- configurable: true,
37
- writable: true
38
- });
39
- } else {
40
- obj[key] = value;
41
- }
42
-
43
- return obj;
44
- }
45
-
46
- function _objectSpread(target) {
47
- for (var i = 1; i < arguments.length; i++) {
48
- var source = arguments[i] != null ? arguments[i] : {};
49
- var ownKeys = Object.keys(source);
50
-
51
- if (typeof Object.getOwnPropertySymbols === 'function') {
52
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
53
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
54
- }));
55
- }
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Toast = factory(global.jQuery, global.Util));
10
+ }(this, (function ($, Util) { 'use strict';
56
11
 
57
- ownKeys.forEach(function (key) {
58
- _defineProperty(target, key, source[key]);
59
- });
60
- }
12
+ $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
13
+ Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
61
14
 
62
- return target;
63
- }
15
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
64
16
 
17
+ 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); } }
18
+
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
65
20
  /**
66
21
  * ------------------------------------------------------------------------
67
22
  * Constants
@@ -69,23 +24,19 @@
69
24
  */
70
25
 
71
26
  var NAME = 'toast';
72
- var VERSION = '4.2.1';
27
+ var VERSION = '4.5.2';
73
28
  var DATA_KEY = 'bs.toast';
74
29
  var EVENT_KEY = "." + DATA_KEY;
75
30
  var JQUERY_NO_CONFLICT = $.fn[NAME];
76
- var Event = {
77
- CLICK_DISMISS: "click.dismiss" + EVENT_KEY,
78
- HIDE: "hide" + EVENT_KEY,
79
- HIDDEN: "hidden" + EVENT_KEY,
80
- SHOW: "show" + EVENT_KEY,
81
- SHOWN: "shown" + EVENT_KEY
82
- };
83
- var ClassName = {
84
- FADE: 'fade',
85
- HIDE: 'hide',
86
- SHOW: 'show',
87
- SHOWING: 'showing'
88
- };
31
+ var EVENT_CLICK_DISMISS = "click.dismiss" + EVENT_KEY;
32
+ var EVENT_HIDE = "hide" + EVENT_KEY;
33
+ var EVENT_HIDDEN = "hidden" + EVENT_KEY;
34
+ var EVENT_SHOW = "show" + EVENT_KEY;
35
+ var EVENT_SHOWN = "shown" + EVENT_KEY;
36
+ var CLASS_NAME_FADE = 'fade';
37
+ var CLASS_NAME_HIDE = 'hide';
38
+ var CLASS_NAME_SHOW = 'show';
39
+ var CLASS_NAME_SHOWING = 'showing';
89
40
  var DefaultType = {
90
41
  animation: 'boolean',
91
42
  autohide: 'boolean',
@@ -96,19 +47,14 @@
96
47
  autohide: true,
97
48
  delay: 500
98
49
  };
99
- var Selector = {
100
- DATA_DISMISS: '[data-dismiss="toast"]'
101
- /**
102
- * ------------------------------------------------------------------------
103
- * Class Definition
104
- * ------------------------------------------------------------------------
105
- */
106
-
107
- };
50
+ var SELECTOR_DATA_DISMISS = '[data-dismiss="toast"]';
51
+ /**
52
+ * ------------------------------------------------------------------------
53
+ * Class Definition
54
+ * ------------------------------------------------------------------------
55
+ */
108
56
 
109
- var Toast =
110
- /*#__PURE__*/
111
- function () {
57
+ var Toast = /*#__PURE__*/function () {
112
58
  function Toast(element, config) {
113
59
  this._element = element;
114
60
  this._config = this._getConfig(config);
@@ -124,27 +70,38 @@
124
70
  _proto.show = function show() {
125
71
  var _this = this;
126
72
 
127
- $(this._element).trigger(Event.SHOW);
73
+ var showEvent = $.Event(EVENT_SHOW);
74
+ $(this._element).trigger(showEvent);
75
+
76
+ if (showEvent.isDefaultPrevented()) {
77
+ return;
78
+ }
79
+
80
+ this._clearTimeout();
128
81
 
129
82
  if (this._config.animation) {
130
- this._element.classList.add(ClassName.FADE);
83
+ this._element.classList.add(CLASS_NAME_FADE);
131
84
  }
132
85
 
133
86
  var complete = function complete() {
134
- _this._element.classList.remove(ClassName.SHOWING);
87
+ _this._element.classList.remove(CLASS_NAME_SHOWING);
135
88
 
136
- _this._element.classList.add(ClassName.SHOW);
89
+ _this._element.classList.add(CLASS_NAME_SHOW);
137
90
 
138
- $(_this._element).trigger(Event.SHOWN);
91
+ $(_this._element).trigger(EVENT_SHOWN);
139
92
 
140
93
  if (_this._config.autohide) {
141
- _this.hide();
94
+ _this._timeout = setTimeout(function () {
95
+ _this.hide();
96
+ }, _this._config.delay);
142
97
  }
143
98
  };
144
99
 
145
- this._element.classList.remove(ClassName.HIDE);
100
+ this._element.classList.remove(CLASS_NAME_HIDE);
101
+
102
+ Util.reflow(this._element);
146
103
 
147
- this._element.classList.add(ClassName.SHOWING);
104
+ this._element.classList.add(CLASS_NAME_SHOWING);
148
105
 
149
106
  if (this._config.animation) {
150
107
  var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -154,63 +111,59 @@
154
111
  }
155
112
  };
156
113
 
157
- _proto.hide = function hide(withoutTimeout) {
158
- var _this2 = this;
159
-
160
- if (!this._element.classList.contains(ClassName.SHOW)) {
114
+ _proto.hide = function hide() {
115
+ if (!this._element.classList.contains(CLASS_NAME_SHOW)) {
161
116
  return;
162
117
  }
163
118
 
164
- $(this._element).trigger(Event.HIDE);
119
+ var hideEvent = $.Event(EVENT_HIDE);
120
+ $(this._element).trigger(hideEvent);
165
121
 
166
- if (withoutTimeout) {
167
- this._close();
168
- } else {
169
- this._timeout = setTimeout(function () {
170
- _this2._close();
171
- }, this._config.delay);
122
+ if (hideEvent.isDefaultPrevented()) {
123
+ return;
172
124
  }
125
+
126
+ this._close();
173
127
  };
174
128
 
175
129
  _proto.dispose = function dispose() {
176
- clearTimeout(this._timeout);
177
- this._timeout = null;
130
+ this._clearTimeout();
178
131
 
179
- if (this._element.classList.contains(ClassName.SHOW)) {
180
- this._element.classList.remove(ClassName.SHOW);
132
+ if (this._element.classList.contains(CLASS_NAME_SHOW)) {
133
+ this._element.classList.remove(CLASS_NAME_SHOW);
181
134
  }
182
135
 
183
- $(this._element).off(Event.CLICK_DISMISS);
136
+ $(this._element).off(EVENT_CLICK_DISMISS);
184
137
  $.removeData(this._element, DATA_KEY);
185
138
  this._element = null;
186
139
  this._config = null;
187
- }; // Private
188
-
140
+ } // Private
141
+ ;
189
142
 
190
143
  _proto._getConfig = function _getConfig(config) {
191
- config = _objectSpread({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
144
+ config = _extends({}, Default, $(this._element).data(), typeof config === 'object' && config ? config : {});
192
145
  Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
193
146
  return config;
194
147
  };
195
148
 
196
149
  _proto._setListeners = function _setListeners() {
197
- var _this3 = this;
150
+ var _this2 = this;
198
151
 
199
- $(this._element).on(Event.CLICK_DISMISS, Selector.DATA_DISMISS, function () {
200
- return _this3.hide(true);
152
+ $(this._element).on(EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, function () {
153
+ return _this2.hide();
201
154
  });
202
155
  };
203
156
 
204
157
  _proto._close = function _close() {
205
- var _this4 = this;
158
+ var _this3 = this;
206
159
 
207
160
  var complete = function complete() {
208
- _this4._element.classList.add(ClassName.HIDE);
161
+ _this3._element.classList.add(CLASS_NAME_HIDE);
209
162
 
210
- $(_this4._element).trigger(Event.HIDDEN);
163
+ $(_this3._element).trigger(EVENT_HIDDEN);
211
164
  };
212
165
 
213
- this._element.classList.remove(ClassName.SHOW);
166
+ this._element.classList.remove(CLASS_NAME_SHOW);
214
167
 
215
168
  if (this._config.animation) {
216
169
  var transitionDuration = Util.getTransitionDurationFromElement(this._element);
@@ -218,8 +171,13 @@
218
171
  } else {
219
172
  complete();
220
173
  }
221
- }; // Static
174
+ };
222
175
 
176
+ _proto._clearTimeout = function _clearTimeout() {
177
+ clearTimeout(this._timeout);
178
+ this._timeout = null;
179
+ } // Static
180
+ ;
223
181
 
224
182
  Toast._jQueryInterface = function _jQueryInterface(config) {
225
183
  return this.each(function () {
@@ -253,6 +211,11 @@
253
211
  get: function get() {
254
212
  return DefaultType;
255
213
  }
214
+ }, {
215
+ key: "Default",
216
+ get: function get() {
217
+ return Default;
218
+ }
256
219
  }]);
257
220
 
258
221
  return Toast;
@@ -1,68 +1,144 @@
1
1
  /*!
2
- * Bootstrap tooltip.js v4.2.1 (https://getbootstrap.com/)
3
- * Copyright 2011-2018 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
2
+ * Bootstrap tooltip.js v4.5.2 (https://getbootstrap.com/)
3
+ * Copyright 2011-2020 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
5
5
  */
6
6
  (function (global, factory) {
7
7
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('jquery'), require('popper.js'), require('./util.js')) :
8
8
  typeof define === 'function' && define.amd ? define(['jquery', 'popper.js', './util.js'], factory) :
9
- (global.Tooltip = factory(global.jQuery,global.Popper,global.Util));
10
- }(this, (function ($,Popper,Util) { 'use strict';
11
-
12
- $ = $ && $.hasOwnProperty('default') ? $['default'] : $;
13
- Popper = Popper && Popper.hasOwnProperty('default') ? Popper['default'] : Popper;
14
- Util = Util && Util.hasOwnProperty('default') ? Util['default'] : Util;
15
-
16
- function _defineProperties(target, props) {
17
- for (var i = 0; i < props.length; i++) {
18
- var descriptor = props[i];
19
- descriptor.enumerable = descriptor.enumerable || false;
20
- descriptor.configurable = true;
21
- if ("value" in descriptor) descriptor.writable = true;
22
- Object.defineProperty(target, descriptor.key, descriptor);
9
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.Tooltip = factory(global.jQuery, global.Popper, global.Util));
10
+ }(this, (function ($, Popper, Util) { 'use strict';
11
+
12
+ $ = $ && Object.prototype.hasOwnProperty.call($, 'default') ? $['default'] : $;
13
+ Popper = Popper && Object.prototype.hasOwnProperty.call(Popper, 'default') ? Popper['default'] : Popper;
14
+ Util = Util && Object.prototype.hasOwnProperty.call(Util, 'default') ? Util['default'] : Util;
15
+
16
+ /**
17
+ * --------------------------------------------------------------------------
18
+ * Bootstrap (v4.5.2): tools/sanitizer.js
19
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
20
+ * --------------------------------------------------------------------------
21
+ */
22
+ var uriAttrs = ['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href'];
23
+ var ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
24
+ var DefaultWhitelist = {
25
+ // Global attributes allowed on any supplied element below.
26
+ '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
27
+ a: ['target', 'href', 'title', 'rel'],
28
+ area: [],
29
+ b: [],
30
+ br: [],
31
+ col: [],
32
+ code: [],
33
+ div: [],
34
+ em: [],
35
+ hr: [],
36
+ h1: [],
37
+ h2: [],
38
+ h3: [],
39
+ h4: [],
40
+ h5: [],
41
+ h6: [],
42
+ i: [],
43
+ img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
44
+ li: [],
45
+ ol: [],
46
+ p: [],
47
+ pre: [],
48
+ s: [],
49
+ small: [],
50
+ span: [],
51
+ sub: [],
52
+ sup: [],
53
+ strong: [],
54
+ u: [],
55
+ ul: []
56
+ };
57
+ /**
58
+ * A pattern that recognizes a commonly useful subset of URLs that are safe.
59
+ *
60
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
61
+ */
62
+
63
+ var SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/gi;
64
+ /**
65
+ * A pattern that matches safe data URLs. Only matches image, video and audio types.
66
+ *
67
+ * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts
68
+ */
69
+
70
+ var DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
71
+
72
+ function allowedAttribute(attr, allowedAttributeList) {
73
+ var attrName = attr.nodeName.toLowerCase();
74
+
75
+ if (allowedAttributeList.indexOf(attrName) !== -1) {
76
+ if (uriAttrs.indexOf(attrName) !== -1) {
77
+ return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN));
78
+ }
79
+
80
+ return true;
23
81
  }
24
- }
25
82
 
26
- function _createClass(Constructor, protoProps, staticProps) {
27
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
28
- if (staticProps) _defineProperties(Constructor, staticProps);
29
- return Constructor;
30
- }
83
+ var regExp = allowedAttributeList.filter(function (attrRegex) {
84
+ return attrRegex instanceof RegExp;
85
+ }); // Check if a regular expression validates the attribute.
31
86
 
32
- function _defineProperty(obj, key, value) {
33
- if (key in obj) {
34
- Object.defineProperty(obj, key, {
35
- value: value,
36
- enumerable: true,
37
- configurable: true,
38
- writable: true
39
- });
40
- } else {
41
- obj[key] = value;
87
+ for (var i = 0, len = regExp.length; i < len; i++) {
88
+ if (attrName.match(regExp[i])) {
89
+ return true;
90
+ }
42
91
  }
43
92
 
44
- return obj;
93
+ return false;
45
94
  }
46
95
 
47
- function _objectSpread(target) {
48
- for (var i = 1; i < arguments.length; i++) {
49
- var source = arguments[i] != null ? arguments[i] : {};
50
- var ownKeys = Object.keys(source);
96
+ function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) {
97
+ if (unsafeHtml.length === 0) {
98
+ return unsafeHtml;
99
+ }
100
+
101
+ if (sanitizeFn && typeof sanitizeFn === 'function') {
102
+ return sanitizeFn(unsafeHtml);
103
+ }
104
+
105
+ var domParser = new window.DOMParser();
106
+ var createdDocument = domParser.parseFromString(unsafeHtml, 'text/html');
107
+ var whitelistKeys = Object.keys(whiteList);
108
+ var elements = [].slice.call(createdDocument.body.querySelectorAll('*'));
51
109
 
52
- if (typeof Object.getOwnPropertySymbols === 'function') {
53
- ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {
54
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
55
- }));
110
+ var _loop = function _loop(i, len) {
111
+ var el = elements[i];
112
+ var elName = el.nodeName.toLowerCase();
113
+
114
+ if (whitelistKeys.indexOf(el.nodeName.toLowerCase()) === -1) {
115
+ el.parentNode.removeChild(el);
116
+ return "continue";
56
117
  }
57
118
 
58
- ownKeys.forEach(function (key) {
59
- _defineProperty(target, key, source[key]);
119
+ var attributeList = [].slice.call(el.attributes);
120
+ var whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []);
121
+ attributeList.forEach(function (attr) {
122
+ if (!allowedAttribute(attr, whitelistedAttributes)) {
123
+ el.removeAttribute(attr.nodeName);
124
+ }
60
125
  });
126
+ };
127
+
128
+ for (var i = 0, len = elements.length; i < len; i++) {
129
+ var _ret = _loop(i);
130
+
131
+ if (_ret === "continue") continue;
61
132
  }
62
133
 
63
- return target;
134
+ return createdDocument.body.innerHTML;
64
135
  }
65
136
 
137
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
138
+
139
+ 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); } }
140
+
141
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
66
142
  /**
67
143
  * ------------------------------------------------------------------------
68
144
  * Constants
@@ -70,12 +146,13 @@
70
146
  */
71
147
 
72
148
  var NAME = 'tooltip';
73
- var VERSION = '4.2.1';
149
+ var VERSION = '4.5.2';
74
150
  var DATA_KEY = 'bs.tooltip';
75
151
  var EVENT_KEY = "." + DATA_KEY;
76
152
  var JQUERY_NO_CONFLICT = $.fn[NAME];
77
153
  var CLASS_PREFIX = 'bs-tooltip';
78
154
  var BSCLS_PREFIX_REGEX = new RegExp("(^|\\s)" + CLASS_PREFIX + "\\S+", 'g');
155
+ var DISALLOWED_ATTRIBUTES = ['sanitize', 'whiteList', 'sanitizeFn'];
79
156
  var DefaultType = {
80
157
  animation: 'boolean',
81
158
  template: 'string',
@@ -85,10 +162,14 @@
85
162
  html: 'boolean',
86
163
  selector: '(string|boolean)',
87
164
  placement: '(string|function)',
88
- offset: '(number|string)',
165
+ offset: '(number|string|function)',
89
166
  container: '(string|element|boolean)',
90
167
  fallbackPlacement: '(string|array)',
91
- boundary: '(string|element)'
168
+ boundary: '(string|element)',
169
+ sanitize: 'boolean',
170
+ sanitizeFn: '(null|function)',
171
+ whiteList: 'object',
172
+ popperConfig: '(null|object)'
92
173
  };
93
174
  var AttachmentMap = {
94
175
  AUTO: 'auto',
@@ -109,12 +190,14 @@
109
190
  offset: 0,
110
191
  container: false,
111
192
  fallbackPlacement: 'flip',
112
- boundary: 'scrollParent'
113
- };
114
- var HoverState = {
115
- SHOW: 'show',
116
- OUT: 'out'
193
+ boundary: 'scrollParent',
194
+ sanitize: true,
195
+ sanitizeFn: null,
196
+ whiteList: DefaultWhitelist,
197
+ popperConfig: null
117
198
  };
199
+ var HOVER_STATE_SHOW = 'show';
200
+ var HOVER_STATE_OUT = 'out';
118
201
  var Event = {
119
202
  HIDE: "hide" + EVENT_KEY,
120
203
  HIDDEN: "hidden" + EVENT_KEY,
@@ -127,36 +210,22 @@
127
210
  MOUSEENTER: "mouseenter" + EVENT_KEY,
128
211
  MOUSELEAVE: "mouseleave" + EVENT_KEY
129
212
  };
130
- var ClassName = {
131
- FADE: 'fade',
132
- SHOW: 'show'
133
- };
134
- var Selector = {
135
- TOOLTIP: '.tooltip',
136
- TOOLTIP_INNER: '.tooltip-inner',
137
- ARROW: '.arrow'
138
- };
139
- var Trigger = {
140
- HOVER: 'hover',
141
- FOCUS: 'focus',
142
- CLICK: 'click',
143
- MANUAL: 'manual'
144
- /**
145
- * ------------------------------------------------------------------------
146
- * Class Definition
147
- * ------------------------------------------------------------------------
148
- */
149
-
150
- };
213
+ var CLASS_NAME_FADE = 'fade';
214
+ var CLASS_NAME_SHOW = 'show';
215
+ var SELECTOR_TOOLTIP_INNER = '.tooltip-inner';
216
+ var SELECTOR_ARROW = '.arrow';
217
+ var TRIGGER_HOVER = 'hover';
218
+ var TRIGGER_FOCUS = 'focus';
219
+ var TRIGGER_CLICK = 'click';
220
+ var TRIGGER_MANUAL = 'manual';
221
+ /**
222
+ * ------------------------------------------------------------------------
223
+ * Class Definition
224
+ * ------------------------------------------------------------------------
225
+ */
151
226
 
152
- var Tooltip =
153
- /*#__PURE__*/
154
- function () {
227
+ var Tooltip = /*#__PURE__*/function () {
155
228
  function Tooltip(element, config) {
156
- /**
157
- * Check for Popper dependency
158
- * Popper - https://popper.js.org
159
- */
160
229
  if (typeof Popper === 'undefined') {
161
230
  throw new TypeError('Bootstrap\'s tooltips require Popper.js (https://popper.js.org/)');
162
231
  } // private
@@ -213,7 +282,7 @@
213
282
  context._leave(null, context);
214
283
  }
215
284
  } else {
216
- if ($(this.getTipElement()).hasClass(ClassName.SHOW)) {
285
+ if ($(this.getTipElement()).hasClass(CLASS_NAME_SHOW)) {
217
286
  this._leave(null, this);
218
287
 
219
288
  return;
@@ -227,7 +296,7 @@
227
296
  clearTimeout(this._timeout);
228
297
  $.removeData(this.element, this.constructor.DATA_KEY);
229
298
  $(this.element).off(this.constructor.EVENT_KEY);
230
- $(this.element).closest('.modal').off('hide.bs.modal');
299
+ $(this.element).closest('.modal').off('hide.bs.modal', this._hideModalHandler);
231
300
 
232
301
  if (this.tip) {
233
302
  $(this.tip).remove();
@@ -238,7 +307,7 @@
238
307
  this._hoverState = null;
239
308
  this._activeTrigger = null;
240
309
 
241
- if (this._popper !== null) {
310
+ if (this._popper) {
242
311
  this._popper.destroy();
243
312
  }
244
313
 
@@ -273,7 +342,7 @@
273
342
  this.setContent();
274
343
 
275
344
  if (this.config.animation) {
276
- $(tip).addClass(ClassName.FADE);
345
+ $(tip).addClass(CLASS_NAME_FADE);
277
346
  }
278
347
 
279
348
  var placement = typeof this.config.placement === 'function' ? this.config.placement.call(this, tip, this.element) : this.config.placement;
@@ -291,32 +360,8 @@
291
360
  }
292
361
 
293
362
  $(this.element).trigger(this.constructor.Event.INSERTED);
294
- this._popper = new Popper(this.element, tip, {
295
- placement: attachment,
296
- modifiers: {
297
- offset: {
298
- offset: this.config.offset
299
- },
300
- flip: {
301
- behavior: this.config.fallbackPlacement
302
- },
303
- arrow: {
304
- element: Selector.ARROW
305
- },
306
- preventOverflow: {
307
- boundariesElement: this.config.boundary
308
- }
309
- },
310
- onCreate: function onCreate(data) {
311
- if (data.originalPlacement !== data.placement) {
312
- _this._handlePopperPlacementChange(data);
313
- }
314
- },
315
- onUpdate: function onUpdate(data) {
316
- return _this._handlePopperPlacementChange(data);
317
- }
318
- });
319
- $(tip).addClass(ClassName.SHOW); // If this is a touch-enabled device we add extra
363
+ this._popper = new Popper(this.element, tip, this._getPopperConfig(attachment));
364
+ $(tip).addClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we add extra
320
365
  // empty mouseover listeners to the body's immediate children;
321
366
  // only needed because of broken event delegation on iOS
322
367
  // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
@@ -334,12 +379,12 @@
334
379
  _this._hoverState = null;
335
380
  $(_this.element).trigger(_this.constructor.Event.SHOWN);
336
381
 
337
- if (prevHoverState === HoverState.OUT) {
382
+ if (prevHoverState === HOVER_STATE_OUT) {
338
383
  _this._leave(null, _this);
339
384
  }
340
385
  };
341
386
 
342
- if ($(this.tip).hasClass(ClassName.FADE)) {
387
+ if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
343
388
  var transitionDuration = Util.getTransitionDurationFromElement(this.tip);
344
389
  $(this.tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
345
390
  } else {
@@ -355,7 +400,7 @@
355
400
  var hideEvent = $.Event(this.constructor.Event.HIDE);
356
401
 
357
402
  var complete = function complete() {
358
- if (_this2._hoverState !== HoverState.SHOW && tip.parentNode) {
403
+ if (_this2._hoverState !== HOVER_STATE_SHOW && tip.parentNode) {
359
404
  tip.parentNode.removeChild(tip);
360
405
  }
361
406
 
@@ -380,18 +425,18 @@
380
425
  return;
381
426
  }
382
427
 
383
- $(tip).removeClass(ClassName.SHOW); // If this is a touch-enabled device we remove the extra
428
+ $(tip).removeClass(CLASS_NAME_SHOW); // If this is a touch-enabled device we remove the extra
384
429
  // empty mouseover listeners we added for iOS support
385
430
 
386
431
  if ('ontouchstart' in document.documentElement) {
387
432
  $(document.body).children().off('mouseover', null, $.noop);
388
433
  }
389
434
 
390
- this._activeTrigger[Trigger.CLICK] = false;
391
- this._activeTrigger[Trigger.FOCUS] = false;
392
- this._activeTrigger[Trigger.HOVER] = false;
435
+ this._activeTrigger[TRIGGER_CLICK] = false;
436
+ this._activeTrigger[TRIGGER_FOCUS] = false;
437
+ this._activeTrigger[TRIGGER_HOVER] = false;
393
438
 
394
- if ($(this.tip).hasClass(ClassName.FADE)) {
439
+ if ($(this.tip).hasClass(CLASS_NAME_FADE)) {
395
440
  var transitionDuration = Util.getTransitionDurationFromElement(tip);
396
441
  $(tip).one(Util.TRANSITION_END, complete).emulateTransitionEnd(transitionDuration);
397
442
  } else {
@@ -405,8 +450,8 @@
405
450
  if (this._popper !== null) {
406
451
  this._popper.scheduleUpdate();
407
452
  }
408
- }; // Protected
409
-
453
+ } // Protected
454
+ ;
410
455
 
411
456
  _proto.isWithContent = function isWithContent() {
412
457
  return Boolean(this.getTitle());
@@ -423,24 +468,32 @@
423
468
 
424
469
  _proto.setContent = function setContent() {
425
470
  var tip = this.getTipElement();
426
- this.setElementContent($(tip.querySelectorAll(Selector.TOOLTIP_INNER)), this.getTitle());
427
- $(tip).removeClass(ClassName.FADE + " " + ClassName.SHOW);
471
+ this.setElementContent($(tip.querySelectorAll(SELECTOR_TOOLTIP_INNER)), this.getTitle());
472
+ $(tip).removeClass(CLASS_NAME_FADE + " " + CLASS_NAME_SHOW);
428
473
  };
429
474
 
430
475
  _proto.setElementContent = function setElementContent($element, content) {
431
- var html = this.config.html;
432
-
433
476
  if (typeof content === 'object' && (content.nodeType || content.jquery)) {
434
477
  // Content is a DOM node or a jQuery
435
- if (html) {
478
+ if (this.config.html) {
436
479
  if (!$(content).parent().is($element)) {
437
480
  $element.empty().append(content);
438
481
  }
439
482
  } else {
440
483
  $element.text($(content).text());
441
484
  }
485
+
486
+ return;
487
+ }
488
+
489
+ if (this.config.html) {
490
+ if (this.config.sanitize) {
491
+ content = sanitizeHtml(content, this.config.whiteList, this.config.sanitizeFn);
492
+ }
493
+
494
+ $element.html(content);
442
495
  } else {
443
- $element[html ? 'html' : 'text'](content);
496
+ $element.text(content);
444
497
  }
445
498
  };
446
499
 
@@ -452,8 +505,54 @@
452
505
  }
453
506
 
454
507
  return title;
455
- }; // Private
508
+ } // Private
509
+ ;
510
+
511
+ _proto._getPopperConfig = function _getPopperConfig(attachment) {
512
+ var _this3 = this;
513
+
514
+ var defaultBsConfig = {
515
+ placement: attachment,
516
+ modifiers: {
517
+ offset: this._getOffset(),
518
+ flip: {
519
+ behavior: this.config.fallbackPlacement
520
+ },
521
+ arrow: {
522
+ element: SELECTOR_ARROW
523
+ },
524
+ preventOverflow: {
525
+ boundariesElement: this.config.boundary
526
+ }
527
+ },
528
+ onCreate: function onCreate(data) {
529
+ if (data.originalPlacement !== data.placement) {
530
+ _this3._handlePopperPlacementChange(data);
531
+ }
532
+ },
533
+ onUpdate: function onUpdate(data) {
534
+ return _this3._handlePopperPlacementChange(data);
535
+ }
536
+ };
537
+ return _extends({}, defaultBsConfig, this.config.popperConfig);
538
+ };
539
+
540
+ _proto._getOffset = function _getOffset() {
541
+ var _this4 = this;
542
+
543
+ var offset = {};
544
+
545
+ if (typeof this.config.offset === 'function') {
546
+ offset.fn = function (data) {
547
+ data.offsets = _extends({}, data.offsets, _this4.config.offset(data.offsets, _this4.element) || {});
548
+ return data;
549
+ };
550
+ } else {
551
+ offset.offset = this.config.offset;
552
+ }
456
553
 
554
+ return offset;
555
+ };
457
556
 
458
557
  _proto._getContainer = function _getContainer() {
459
558
  if (this.config.container === false) {
@@ -472,32 +571,35 @@
472
571
  };
473
572
 
474
573
  _proto._setListeners = function _setListeners() {
475
- var _this3 = this;
574
+ var _this5 = this;
476
575
 
477
576
  var triggers = this.config.trigger.split(' ');
478
577
  triggers.forEach(function (trigger) {
479
578
  if (trigger === 'click') {
480
- $(_this3.element).on(_this3.constructor.Event.CLICK, _this3.config.selector, function (event) {
481
- return _this3.toggle(event);
579
+ $(_this5.element).on(_this5.constructor.Event.CLICK, _this5.config.selector, function (event) {
580
+ return _this5.toggle(event);
482
581
  });
483
- } else if (trigger !== Trigger.MANUAL) {
484
- var eventIn = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSEENTER : _this3.constructor.Event.FOCUSIN;
485
- var eventOut = trigger === Trigger.HOVER ? _this3.constructor.Event.MOUSELEAVE : _this3.constructor.Event.FOCUSOUT;
486
- $(_this3.element).on(eventIn, _this3.config.selector, function (event) {
487
- return _this3._enter(event);
488
- }).on(eventOut, _this3.config.selector, function (event) {
489
- return _this3._leave(event);
582
+ } else if (trigger !== TRIGGER_MANUAL) {
583
+ var eventIn = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSEENTER : _this5.constructor.Event.FOCUSIN;
584
+ var eventOut = trigger === TRIGGER_HOVER ? _this5.constructor.Event.MOUSELEAVE : _this5.constructor.Event.FOCUSOUT;
585
+ $(_this5.element).on(eventIn, _this5.config.selector, function (event) {
586
+ return _this5._enter(event);
587
+ }).on(eventOut, _this5.config.selector, function (event) {
588
+ return _this5._leave(event);
490
589
  });
491
590
  }
492
591
  });
493
- $(this.element).closest('.modal').on('hide.bs.modal', function () {
494
- if (_this3.element) {
495
- _this3.hide();
592
+
593
+ this._hideModalHandler = function () {
594
+ if (_this5.element) {
595
+ _this5.hide();
496
596
  }
497
- });
597
+ };
598
+
599
+ $(this.element).closest('.modal').on('hide.bs.modal', this._hideModalHandler);
498
600
 
499
601
  if (this.config.selector) {
500
- this.config = _objectSpread({}, this.config, {
602
+ this.config = _extends({}, this.config, {
501
603
  trigger: 'manual',
502
604
  selector: ''
503
605
  });
@@ -525,16 +627,16 @@
525
627
  }
526
628
 
527
629
  if (event) {
528
- context._activeTrigger[event.type === 'focusin' ? Trigger.FOCUS : Trigger.HOVER] = true;
630
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true;
529
631
  }
530
632
 
531
- if ($(context.getTipElement()).hasClass(ClassName.SHOW) || context._hoverState === HoverState.SHOW) {
532
- context._hoverState = HoverState.SHOW;
633
+ if ($(context.getTipElement()).hasClass(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {
634
+ context._hoverState = HOVER_STATE_SHOW;
533
635
  return;
534
636
  }
535
637
 
536
638
  clearTimeout(context._timeout);
537
- context._hoverState = HoverState.SHOW;
639
+ context._hoverState = HOVER_STATE_SHOW;
538
640
 
539
641
  if (!context.config.delay || !context.config.delay.show) {
540
642
  context.show();
@@ -542,7 +644,7 @@
542
644
  }
543
645
 
544
646
  context._timeout = setTimeout(function () {
545
- if (context._hoverState === HoverState.SHOW) {
647
+ if (context._hoverState === HOVER_STATE_SHOW) {
546
648
  context.show();
547
649
  }
548
650
  }, context.config.delay.show);
@@ -558,7 +660,7 @@
558
660
  }
559
661
 
560
662
  if (event) {
561
- context._activeTrigger[event.type === 'focusout' ? Trigger.FOCUS : Trigger.HOVER] = false;
663
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = false;
562
664
  }
563
665
 
564
666
  if (context._isWithActiveTrigger()) {
@@ -566,7 +668,7 @@
566
668
  }
567
669
 
568
670
  clearTimeout(context._timeout);
569
- context._hoverState = HoverState.OUT;
671
+ context._hoverState = HOVER_STATE_OUT;
570
672
 
571
673
  if (!context.config.delay || !context.config.delay.hide) {
572
674
  context.hide();
@@ -574,7 +676,7 @@
574
676
  }
575
677
 
576
678
  context._timeout = setTimeout(function () {
577
- if (context._hoverState === HoverState.OUT) {
679
+ if (context._hoverState === HOVER_STATE_OUT) {
578
680
  context.hide();
579
681
  }
580
682
  }, context.config.delay.hide);
@@ -591,7 +693,13 @@
591
693
  };
592
694
 
593
695
  _proto._getConfig = function _getConfig(config) {
594
- config = _objectSpread({}, this.constructor.Default, $(this.element).data(), typeof config === 'object' && config ? config : {});
696
+ var dataAttributes = $(this.element).data();
697
+ Object.keys(dataAttributes).forEach(function (dataAttr) {
698
+ if (DISALLOWED_ATTRIBUTES.indexOf(dataAttr) !== -1) {
699
+ delete dataAttributes[dataAttr];
700
+ }
701
+ });
702
+ config = _extends({}, this.constructor.Default, dataAttributes, typeof config === 'object' && config ? config : {});
595
703
 
596
704
  if (typeof config.delay === 'number') {
597
705
  config.delay = {
@@ -609,6 +717,11 @@
609
717
  }
610
718
 
611
719
  Util.typeCheckConfig(NAME, config, this.constructor.DefaultType);
720
+
721
+ if (config.sanitize) {
722
+ config.template = sanitizeHtml(config.template, config.whiteList, config.sanitizeFn);
723
+ }
724
+
612
725
  return config;
613
726
  };
614
727
 
@@ -636,8 +749,7 @@
636
749
  };
637
750
 
638
751
  _proto._handlePopperPlacementChange = function _handlePopperPlacementChange(popperData) {
639
- var popperInstance = popperData.instance;
640
- this.tip = popperInstance.popper;
752
+ this.tip = popperData.instance.popper;
641
753
 
642
754
  this._cleanTipClass();
643
755
 
@@ -652,13 +764,13 @@
652
764
  return;
653
765
  }
654
766
 
655
- $(tip).removeClass(ClassName.FADE);
767
+ $(tip).removeClass(CLASS_NAME_FADE);
656
768
  this.config.animation = false;
657
769
  this.hide();
658
770
  this.show();
659
771
  this.config.animation = initConfigAnimation;
660
- }; // Static
661
-
772
+ } // Static
773
+ ;
662
774
 
663
775
  Tooltip._jQueryInterface = function _jQueryInterface(config) {
664
776
  return this.each(function () {