irie 0.0.9__py3-none-any.whl → 0.0.10__py3-none-any.whl

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 (122) hide show
  1. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-base.js +1069 -0
  2. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-base.js.flow +3 -0
  3. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-lite.js +1378 -0
  4. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper-lite.js.flow +3 -0
  5. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper.js +1927 -0
  6. irie/apps/static/assets/vendor/@popperjs/core/dist/cjs/popper.js.flow +3 -0
  7. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/createPopper.js +258 -0
  8. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/contains.js +23 -0
  9. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getBoundingClientRect.js +28 -0
  10. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getClippingRect.js +70 -0
  11. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getCompositeRect.js +57 -0
  12. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getComputedStyle.js +4 -0
  13. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getDocumentElement.js +6 -0
  14. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getDocumentRect.js +29 -0
  15. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getHTMLElementScroll.js +6 -0
  16. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getLayoutRect.js +25 -0
  17. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getNodeName.js +3 -0
  18. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getNodeScroll.js +11 -0
  19. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getOffsetParent.js +64 -0
  20. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getParentNode.js +19 -0
  21. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getScrollParent.js +16 -0
  22. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getViewportRect.js +40 -0
  23. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindow.js +12 -0
  24. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScroll.js +10 -0
  25. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/getWindowScrollBarX.js +13 -0
  26. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/instanceOf.js +23 -0
  27. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/isScrollParent.js +10 -0
  28. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/isTableElement.js +4 -0
  29. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/dom-utils/listScrollParents.js +26 -0
  30. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/enums.js +31 -0
  31. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/index.js +8 -0
  32. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/applyStyles.js +84 -0
  33. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/arrow.js +101 -0
  34. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/computeStyles.js +155 -0
  35. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/eventListeners.js +49 -0
  36. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/flip.js +147 -0
  37. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/hide.js +61 -0
  38. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/index.js +9 -0
  39. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/offset.js +53 -0
  40. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/popperOffsets.js +25 -0
  41. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/modifiers/preventOverflow.js +123 -0
  42. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper-base.js +3 -0
  43. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper-lite.js +11 -0
  44. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/popper.js +20 -0
  45. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/types.js +0 -0
  46. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/computeAutoPlacement.js +47 -0
  47. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/computeOffsets.js +70 -0
  48. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/debounce.js +15 -0
  49. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/detectOverflow.js +64 -0
  50. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/expandToHashMap.js +6 -0
  51. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/format.js +9 -0
  52. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getAltAxis.js +3 -0
  53. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getAltLen.js +3 -0
  54. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getBasePlacement.js +4 -0
  55. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getFreshSideObject.js +8 -0
  56. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getMainAxisFromPlacement.js +3 -0
  57. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getOppositePlacement.js +11 -0
  58. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getOppositeVariationPlacement.js +9 -0
  59. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/getVariation.js +3 -0
  60. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/math.js +3 -0
  61. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/mergeByName.js +14 -0
  62. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/mergePaddingObject.js +4 -0
  63. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/orderModifiers.js +44 -0
  64. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/rectToClientRect.js +8 -0
  65. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/uniqueBy.js +11 -0
  66. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/validateModifiers.js +76 -0
  67. irie/apps/static/assets/vendor/@popperjs/core/dist/esm/utils/within.js +4 -0
  68. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-base.min.js +6 -0
  69. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-base.min.js.flow +3 -0
  70. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-lite.min.js +6 -0
  71. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper-lite.min.js.flow +3 -0
  72. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper.min.js +6 -0
  73. irie/apps/static/assets/vendor/@popperjs/core/dist/umd/popper.min.js.flow +3 -0
  74. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-grid.min.css +6 -0
  75. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-grid.rtl.min.css +6 -0
  76. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-reboot.min.css +7 -0
  77. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-reboot.rtl.min.css +7 -0
  78. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-utilities.min.css +6 -0
  79. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap-utilities.rtl.min.css +6 -0
  80. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap.min.css +6 -0
  81. irie/apps/static/assets/vendor/bootstrap/dist/css/bootstrap.rtl.min.css +6 -0
  82. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.bundle.min.js +6 -0
  83. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.esm.min.js +6 -0
  84. irie/apps/static/assets/vendor/bootstrap/dist/js/bootstrap.min.js +6 -0
  85. irie/apps/static/assets/vendor/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.css +34 -0
  86. irie/apps/static/assets/vendor/chartist-plugin-tooltips/dist/chartist-plugin-tooltip.min.js +7 -0
  87. irie/apps/static/assets/vendor/notyf/notyf.es.js +441 -0
  88. irie/apps/static/assets/vendor/notyf/notyf.min.css +1 -0
  89. irie/apps/static/assets/vendor/notyf/notyf.min.js +1 -0
  90. irie/apps/static/assets/vendor/notyf/notyf.umd.js +449 -0
  91. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.css +1 -0
  92. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.js +1 -0
  93. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.min.mjs +1 -0
  94. irie/apps/static/assets/vendor/nouislider/distribute/nouislider.mjs +2238 -0
  95. irie/apps/static/assets/vendor/onscreen/dist/index.js +21 -0
  96. irie/apps/static/assets/vendor/onscreen/dist/on-screen.es6.js +404 -0
  97. irie/apps/static/assets/vendor/onscreen/dist/on-screen.umd.min.js +1 -0
  98. irie/apps/static/assets/vendor/simplebar/dist/simplebar-core.esm.js +889 -0
  99. irie/apps/static/assets/vendor/simplebar/dist/simplebar.esm.js +994 -0
  100. irie/apps/static/assets/vendor/simplebar/dist/simplebar.min.css +1 -0
  101. irie/apps/static/assets/vendor/simplebar/dist/simplebar.min.js +10 -0
  102. irie/apps/static/assets/vendor/simplebar/dist/simplebar.umd.js +127 -0
  103. irie/apps/static/assets/vendor/smooth-scroll/dist/smooth-scroll.min.js +2 -0
  104. irie/apps/static/assets/vendor/smooth-scroll/dist/smooth-scroll.polyfills.min.js +2 -0
  105. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.all.min.js +2 -0
  106. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.min.css +1 -0
  107. irie/apps/static/assets/vendor/sweetalert2/dist/sweetalert2.min.js +1 -0
  108. irie/apps/static/assets/vendor/waypoints/lib/jquery.waypoints.min.js +7 -0
  109. irie/apps/static/assets/vendor/waypoints/lib/noframework.waypoints.min.js +7 -0
  110. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/infinite.min.js +7 -0
  111. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/inview.min.js +7 -0
  112. irie/apps/static/assets/vendor/waypoints/lib/shortcuts/sticky.min.js +7 -0
  113. irie/apps/static/assets/vendor/waypoints/lib/waypoints.debug.js +46 -0
  114. irie/apps/static/assets/vendor/waypoints/lib/zepto.waypoints.min.js +7 -0
  115. irie/apps/static/assets/vendor/waypoints/licenses.txt +23 -0
  116. irie/apps/static/assets/vendor/waypoints/testem.json +24 -0
  117. irie/init/hayward.zip +0 -0
  118. {irie-0.0.9.dist-info → irie-0.0.10.dist-info}/METADATA +1 -1
  119. {irie-0.0.9.dist-info → irie-0.0.10.dist-info}/RECORD +122 -5
  120. {irie-0.0.9.dist-info → irie-0.0.10.dist-info}/WHEEL +0 -0
  121. {irie-0.0.9.dist-info → irie-0.0.10.dist-info}/entry_points.txt +0 -0
  122. {irie-0.0.9.dist-info → irie-0.0.10.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1069 @@
1
+ /**
2
+ * @popperjs/core v2.9.3 - MIT License
3
+ */
4
+
5
+ 'use strict';
6
+
7
+ Object.defineProperty(exports, '__esModule', { value: true });
8
+
9
+ function getWindow(node) {
10
+ if (node == null) {
11
+ return window;
12
+ }
13
+
14
+ if (node.toString() !== '[object Window]') {
15
+ var ownerDocument = node.ownerDocument;
16
+ return ownerDocument ? ownerDocument.defaultView || window : window;
17
+ }
18
+
19
+ return node;
20
+ }
21
+
22
+ function isElement(node) {
23
+ var OwnElement = getWindow(node).Element;
24
+ return node instanceof OwnElement || node instanceof Element;
25
+ }
26
+
27
+ function isHTMLElement(node) {
28
+ var OwnElement = getWindow(node).HTMLElement;
29
+ return node instanceof OwnElement || node instanceof HTMLElement;
30
+ }
31
+
32
+ function isShadowRoot(node) {
33
+ // IE 11 has no ShadowRoot
34
+ if (typeof ShadowRoot === 'undefined') {
35
+ return false;
36
+ }
37
+
38
+ var OwnElement = getWindow(node).ShadowRoot;
39
+ return node instanceof OwnElement || node instanceof ShadowRoot;
40
+ }
41
+
42
+ var round = Math.round;
43
+ function getBoundingClientRect(element, includeScale) {
44
+ if (includeScale === void 0) {
45
+ includeScale = false;
46
+ }
47
+
48
+ var rect = element.getBoundingClientRect();
49
+ var scaleX = 1;
50
+ var scaleY = 1;
51
+
52
+ if (isHTMLElement(element) && includeScale) {
53
+ // Fallback to 1 in case both values are `0`
54
+ scaleX = rect.width / element.offsetWidth || 1;
55
+ scaleY = rect.height / element.offsetHeight || 1;
56
+ }
57
+
58
+ return {
59
+ width: round(rect.width / scaleX),
60
+ height: round(rect.height / scaleY),
61
+ top: round(rect.top / scaleY),
62
+ right: round(rect.right / scaleX),
63
+ bottom: round(rect.bottom / scaleY),
64
+ left: round(rect.left / scaleX),
65
+ x: round(rect.left / scaleX),
66
+ y: round(rect.top / scaleY)
67
+ };
68
+ }
69
+
70
+ function getWindowScroll(node) {
71
+ var win = getWindow(node);
72
+ var scrollLeft = win.pageXOffset;
73
+ var scrollTop = win.pageYOffset;
74
+ return {
75
+ scrollLeft: scrollLeft,
76
+ scrollTop: scrollTop
77
+ };
78
+ }
79
+
80
+ function getHTMLElementScroll(element) {
81
+ return {
82
+ scrollLeft: element.scrollLeft,
83
+ scrollTop: element.scrollTop
84
+ };
85
+ }
86
+
87
+ function getNodeScroll(node) {
88
+ if (node === getWindow(node) || !isHTMLElement(node)) {
89
+ return getWindowScroll(node);
90
+ } else {
91
+ return getHTMLElementScroll(node);
92
+ }
93
+ }
94
+
95
+ function getNodeName(element) {
96
+ return element ? (element.nodeName || '').toLowerCase() : null;
97
+ }
98
+
99
+ function getDocumentElement(element) {
100
+ // $FlowFixMe[incompatible-return]: assume body is always available
101
+ return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
102
+ element.document) || window.document).documentElement;
103
+ }
104
+
105
+ function getWindowScrollBarX(element) {
106
+ // If <html> has a CSS width greater than the viewport, then this will be
107
+ // incorrect for RTL.
108
+ // Popper 1 is broken in this case and never had a bug report so let's assume
109
+ // it's not an issue. I don't think anyone ever specifies width on <html>
110
+ // anyway.
111
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
112
+ // this (e.g. Edge 2019, IE11, Safari)
113
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
114
+ }
115
+
116
+ function getComputedStyle(element) {
117
+ return getWindow(element).getComputedStyle(element);
118
+ }
119
+
120
+ function isScrollParent(element) {
121
+ // Firefox wants us to check `-x` and `-y` variations as well
122
+ var _getComputedStyle = getComputedStyle(element),
123
+ overflow = _getComputedStyle.overflow,
124
+ overflowX = _getComputedStyle.overflowX,
125
+ overflowY = _getComputedStyle.overflowY;
126
+
127
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
128
+ }
129
+
130
+ function isElementScaled(element) {
131
+ var rect = element.getBoundingClientRect();
132
+ var scaleX = rect.width / element.offsetWidth || 1;
133
+ var scaleY = rect.height / element.offsetHeight || 1;
134
+ return scaleX !== 1 || scaleY !== 1;
135
+ } // Returns the composite rect of an element relative to its offsetParent.
136
+ // Composite means it takes into account transforms as well as layout.
137
+
138
+
139
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
140
+ if (isFixed === void 0) {
141
+ isFixed = false;
142
+ }
143
+
144
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
145
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
146
+ var documentElement = getDocumentElement(offsetParent);
147
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
148
+ var scroll = {
149
+ scrollLeft: 0,
150
+ scrollTop: 0
151
+ };
152
+ var offsets = {
153
+ x: 0,
154
+ y: 0
155
+ };
156
+
157
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
158
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
159
+ isScrollParent(documentElement)) {
160
+ scroll = getNodeScroll(offsetParent);
161
+ }
162
+
163
+ if (isHTMLElement(offsetParent)) {
164
+ offsets = getBoundingClientRect(offsetParent, true);
165
+ offsets.x += offsetParent.clientLeft;
166
+ offsets.y += offsetParent.clientTop;
167
+ } else if (documentElement) {
168
+ offsets.x = getWindowScrollBarX(documentElement);
169
+ }
170
+ }
171
+
172
+ return {
173
+ x: rect.left + scroll.scrollLeft - offsets.x,
174
+ y: rect.top + scroll.scrollTop - offsets.y,
175
+ width: rect.width,
176
+ height: rect.height
177
+ };
178
+ }
179
+
180
+ // means it doesn't take into account transforms.
181
+
182
+ function getLayoutRect(element) {
183
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
184
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
185
+
186
+ var width = element.offsetWidth;
187
+ var height = element.offsetHeight;
188
+
189
+ if (Math.abs(clientRect.width - width) <= 1) {
190
+ width = clientRect.width;
191
+ }
192
+
193
+ if (Math.abs(clientRect.height - height) <= 1) {
194
+ height = clientRect.height;
195
+ }
196
+
197
+ return {
198
+ x: element.offsetLeft,
199
+ y: element.offsetTop,
200
+ width: width,
201
+ height: height
202
+ };
203
+ }
204
+
205
+ function getParentNode(element) {
206
+ if (getNodeName(element) === 'html') {
207
+ return element;
208
+ }
209
+
210
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
211
+ // $FlowFixMe[incompatible-return]
212
+ // $FlowFixMe[prop-missing]
213
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
214
+ element.parentNode || ( // DOM Element detected
215
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
216
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
217
+ getDocumentElement(element) // fallback
218
+
219
+ );
220
+ }
221
+
222
+ function getScrollParent(node) {
223
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
224
+ // $FlowFixMe[incompatible-return]: assume body is always available
225
+ return node.ownerDocument.body;
226
+ }
227
+
228
+ if (isHTMLElement(node) && isScrollParent(node)) {
229
+ return node;
230
+ }
231
+
232
+ return getScrollParent(getParentNode(node));
233
+ }
234
+
235
+ /*
236
+ given a DOM element, return the list of all scroll parents, up the list of ancesors
237
+ until we get to the top window object. This list is what we attach scroll listeners
238
+ to, because if any of these parent elements scroll, we'll need to re-calculate the
239
+ reference element's position.
240
+ */
241
+
242
+ function listScrollParents(element, list) {
243
+ var _element$ownerDocumen;
244
+
245
+ if (list === void 0) {
246
+ list = [];
247
+ }
248
+
249
+ var scrollParent = getScrollParent(element);
250
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
251
+ var win = getWindow(scrollParent);
252
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
253
+ var updatedList = list.concat(target);
254
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
255
+ updatedList.concat(listScrollParents(getParentNode(target)));
256
+ }
257
+
258
+ function isTableElement(element) {
259
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
260
+ }
261
+
262
+ function getTrueOffsetParent(element) {
263
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
264
+ getComputedStyle(element).position === 'fixed') {
265
+ return null;
266
+ }
267
+
268
+ return element.offsetParent;
269
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
270
+ // return the containing block
271
+
272
+
273
+ function getContainingBlock(element) {
274
+ var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;
275
+ var isIE = navigator.userAgent.indexOf('Trident') !== -1;
276
+
277
+ if (isIE && isHTMLElement(element)) {
278
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
279
+ var elementCss = getComputedStyle(element);
280
+
281
+ if (elementCss.position === 'fixed') {
282
+ return null;
283
+ }
284
+ }
285
+
286
+ var currentNode = getParentNode(element);
287
+
288
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
289
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
290
+ // create a containing block.
291
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
292
+
293
+ if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
294
+ return currentNode;
295
+ } else {
296
+ currentNode = currentNode.parentNode;
297
+ }
298
+ }
299
+
300
+ return null;
301
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
302
+ // such as table ancestors and cross browser bugs.
303
+
304
+
305
+ function getOffsetParent(element) {
306
+ var window = getWindow(element);
307
+ var offsetParent = getTrueOffsetParent(element);
308
+
309
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
310
+ offsetParent = getTrueOffsetParent(offsetParent);
311
+ }
312
+
313
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
314
+ return window;
315
+ }
316
+
317
+ return offsetParent || getContainingBlock(element) || window;
318
+ }
319
+
320
+ var top = 'top';
321
+ var bottom = 'bottom';
322
+ var right = 'right';
323
+ var left = 'left';
324
+ var auto = 'auto';
325
+ var basePlacements = [top, bottom, right, left];
326
+ var start = 'start';
327
+ var end = 'end';
328
+ var clippingParents = 'clippingParents';
329
+ var viewport = 'viewport';
330
+ var popper = 'popper';
331
+ var reference = 'reference';
332
+
333
+ var beforeRead = 'beforeRead';
334
+ var read = 'read';
335
+ var afterRead = 'afterRead'; // pure-logic modifiers
336
+
337
+ var beforeMain = 'beforeMain';
338
+ var main = 'main';
339
+ var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
340
+
341
+ var beforeWrite = 'beforeWrite';
342
+ var write = 'write';
343
+ var afterWrite = 'afterWrite';
344
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
345
+
346
+ function order(modifiers) {
347
+ var map = new Map();
348
+ var visited = new Set();
349
+ var result = [];
350
+ modifiers.forEach(function (modifier) {
351
+ map.set(modifier.name, modifier);
352
+ }); // On visiting object, check for its dependencies and visit them recursively
353
+
354
+ function sort(modifier) {
355
+ visited.add(modifier.name);
356
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
357
+ requires.forEach(function (dep) {
358
+ if (!visited.has(dep)) {
359
+ var depModifier = map.get(dep);
360
+
361
+ if (depModifier) {
362
+ sort(depModifier);
363
+ }
364
+ }
365
+ });
366
+ result.push(modifier);
367
+ }
368
+
369
+ modifiers.forEach(function (modifier) {
370
+ if (!visited.has(modifier.name)) {
371
+ // check for visited object
372
+ sort(modifier);
373
+ }
374
+ });
375
+ return result;
376
+ }
377
+
378
+ function orderModifiers(modifiers) {
379
+ // order based on dependencies
380
+ var orderedModifiers = order(modifiers); // order based on phase
381
+
382
+ return modifierPhases.reduce(function (acc, phase) {
383
+ return acc.concat(orderedModifiers.filter(function (modifier) {
384
+ return modifier.phase === phase;
385
+ }));
386
+ }, []);
387
+ }
388
+
389
+ function debounce(fn) {
390
+ var pending;
391
+ return function () {
392
+ if (!pending) {
393
+ pending = new Promise(function (resolve) {
394
+ Promise.resolve().then(function () {
395
+ pending = undefined;
396
+ resolve(fn());
397
+ });
398
+ });
399
+ }
400
+
401
+ return pending;
402
+ };
403
+ }
404
+
405
+ function format(str) {
406
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
407
+ args[_key - 1] = arguments[_key];
408
+ }
409
+
410
+ return [].concat(args).reduce(function (p, c) {
411
+ return p.replace(/%s/, c);
412
+ }, str);
413
+ }
414
+
415
+ var INVALID_MODIFIER_ERROR = 'Popper: modifier "%s" provided an invalid %s property, expected %s but got %s';
416
+ var MISSING_DEPENDENCY_ERROR = 'Popper: modifier "%s" requires "%s", but "%s" modifier is not available';
417
+ var VALID_PROPERTIES = ['name', 'enabled', 'phase', 'fn', 'effect', 'requires', 'options'];
418
+ function validateModifiers(modifiers) {
419
+ modifiers.forEach(function (modifier) {
420
+ Object.keys(modifier).forEach(function (key) {
421
+ switch (key) {
422
+ case 'name':
423
+ if (typeof modifier.name !== 'string') {
424
+ console.error(format(INVALID_MODIFIER_ERROR, String(modifier.name), '"name"', '"string"', "\"" + String(modifier.name) + "\""));
425
+ }
426
+
427
+ break;
428
+
429
+ case 'enabled':
430
+ if (typeof modifier.enabled !== 'boolean') {
431
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"enabled"', '"boolean"', "\"" + String(modifier.enabled) + "\""));
432
+ }
433
+
434
+ case 'phase':
435
+ if (modifierPhases.indexOf(modifier.phase) < 0) {
436
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"phase"', "either " + modifierPhases.join(', '), "\"" + String(modifier.phase) + "\""));
437
+ }
438
+
439
+ break;
440
+
441
+ case 'fn':
442
+ if (typeof modifier.fn !== 'function') {
443
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"fn"', '"function"', "\"" + String(modifier.fn) + "\""));
444
+ }
445
+
446
+ break;
447
+
448
+ case 'effect':
449
+ if (typeof modifier.effect !== 'function') {
450
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"effect"', '"function"', "\"" + String(modifier.fn) + "\""));
451
+ }
452
+
453
+ break;
454
+
455
+ case 'requires':
456
+ if (!Array.isArray(modifier.requires)) {
457
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requires"', '"array"', "\"" + String(modifier.requires) + "\""));
458
+ }
459
+
460
+ break;
461
+
462
+ case 'requiresIfExists':
463
+ if (!Array.isArray(modifier.requiresIfExists)) {
464
+ console.error(format(INVALID_MODIFIER_ERROR, modifier.name, '"requiresIfExists"', '"array"', "\"" + String(modifier.requiresIfExists) + "\""));
465
+ }
466
+
467
+ break;
468
+
469
+ case 'options':
470
+ case 'data':
471
+ break;
472
+
473
+ default:
474
+ console.error("PopperJS: an invalid property has been provided to the \"" + modifier.name + "\" modifier, valid properties are " + VALID_PROPERTIES.map(function (s) {
475
+ return "\"" + s + "\"";
476
+ }).join(', ') + "; but \"" + key + "\" was provided.");
477
+ }
478
+
479
+ modifier.requires && modifier.requires.forEach(function (requirement) {
480
+ if (modifiers.find(function (mod) {
481
+ return mod.name === requirement;
482
+ }) == null) {
483
+ console.error(format(MISSING_DEPENDENCY_ERROR, String(modifier.name), requirement, requirement));
484
+ }
485
+ });
486
+ });
487
+ });
488
+ }
489
+
490
+ function uniqueBy(arr, fn) {
491
+ var identifiers = new Set();
492
+ return arr.filter(function (item) {
493
+ var identifier = fn(item);
494
+
495
+ if (!identifiers.has(identifier)) {
496
+ identifiers.add(identifier);
497
+ return true;
498
+ }
499
+ });
500
+ }
501
+
502
+ function getBasePlacement(placement) {
503
+ return placement.split('-')[0];
504
+ }
505
+
506
+ function mergeByName(modifiers) {
507
+ var merged = modifiers.reduce(function (merged, current) {
508
+ var existing = merged[current.name];
509
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
510
+ options: Object.assign({}, existing.options, current.options),
511
+ data: Object.assign({}, existing.data, current.data)
512
+ }) : current;
513
+ return merged;
514
+ }, {}); // IE11 does not support Object.values
515
+
516
+ return Object.keys(merged).map(function (key) {
517
+ return merged[key];
518
+ });
519
+ }
520
+
521
+ function getViewportRect(element) {
522
+ var win = getWindow(element);
523
+ var html = getDocumentElement(element);
524
+ var visualViewport = win.visualViewport;
525
+ var width = html.clientWidth;
526
+ var height = html.clientHeight;
527
+ var x = 0;
528
+ var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper
529
+ // can be obscured underneath it.
530
+ // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
531
+ // if it isn't open, so if this isn't available, the popper will be detected
532
+ // to overflow the bottom of the screen too early.
533
+
534
+ if (visualViewport) {
535
+ width = visualViewport.width;
536
+ height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)
537
+ // In Chrome, it returns a value very close to 0 (+/-) but contains rounding
538
+ // errors due to floating point numbers, so we need to check precision.
539
+ // Safari returns a number <= 0, usually < -1 when pinch-zoomed
540
+ // Feature detection fails in mobile emulation mode in Chrome.
541
+ // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
542
+ // 0.001
543
+ // Fallback here: "Not Safari" userAgent
544
+
545
+ if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
546
+ x = visualViewport.offsetLeft;
547
+ y = visualViewport.offsetTop;
548
+ }
549
+ }
550
+
551
+ return {
552
+ width: width,
553
+ height: height,
554
+ x: x + getWindowScrollBarX(element),
555
+ y: y
556
+ };
557
+ }
558
+
559
+ var max = Math.max;
560
+ var min = Math.min;
561
+
562
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
563
+
564
+ function getDocumentRect(element) {
565
+ var _element$ownerDocumen;
566
+
567
+ var html = getDocumentElement(element);
568
+ var winScroll = getWindowScroll(element);
569
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
570
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
571
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
572
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
573
+ var y = -winScroll.scrollTop;
574
+
575
+ if (getComputedStyle(body || html).direction === 'rtl') {
576
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
577
+ }
578
+
579
+ return {
580
+ width: width,
581
+ height: height,
582
+ x: x,
583
+ y: y
584
+ };
585
+ }
586
+
587
+ function contains(parent, child) {
588
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
589
+
590
+ if (parent.contains(child)) {
591
+ return true;
592
+ } // then fallback to custom implementation with Shadow DOM support
593
+ else if (rootNode && isShadowRoot(rootNode)) {
594
+ var next = child;
595
+
596
+ do {
597
+ if (next && parent.isSameNode(next)) {
598
+ return true;
599
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
600
+
601
+
602
+ next = next.parentNode || next.host;
603
+ } while (next);
604
+ } // Give up, the result is false
605
+
606
+
607
+ return false;
608
+ }
609
+
610
+ function rectToClientRect(rect) {
611
+ return Object.assign({}, rect, {
612
+ left: rect.x,
613
+ top: rect.y,
614
+ right: rect.x + rect.width,
615
+ bottom: rect.y + rect.height
616
+ });
617
+ }
618
+
619
+ function getInnerBoundingClientRect(element) {
620
+ var rect = getBoundingClientRect(element);
621
+ rect.top = rect.top + element.clientTop;
622
+ rect.left = rect.left + element.clientLeft;
623
+ rect.bottom = rect.top + element.clientHeight;
624
+ rect.right = rect.left + element.clientWidth;
625
+ rect.width = element.clientWidth;
626
+ rect.height = element.clientHeight;
627
+ rect.x = rect.left;
628
+ rect.y = rect.top;
629
+ return rect;
630
+ }
631
+
632
+ function getClientRectFromMixedType(element, clippingParent) {
633
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
634
+ } // A "clipping parent" is an overflowable container with the characteristic of
635
+ // clipping (or hiding) overflowing elements with a position different from
636
+ // `initial`
637
+
638
+
639
+ function getClippingParents(element) {
640
+ var clippingParents = listScrollParents(getParentNode(element));
641
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
642
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
643
+
644
+ if (!isElement(clipperElement)) {
645
+ return [];
646
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
647
+
648
+
649
+ return clippingParents.filter(function (clippingParent) {
650
+ return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
651
+ });
652
+ } // Gets the maximum area that the element is visible in due to any number of
653
+ // clipping parents
654
+
655
+
656
+ function getClippingRect(element, boundary, rootBoundary) {
657
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
658
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
659
+ var firstClippingParent = clippingParents[0];
660
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
661
+ var rect = getClientRectFromMixedType(element, clippingParent);
662
+ accRect.top = max(rect.top, accRect.top);
663
+ accRect.right = min(rect.right, accRect.right);
664
+ accRect.bottom = min(rect.bottom, accRect.bottom);
665
+ accRect.left = max(rect.left, accRect.left);
666
+ return accRect;
667
+ }, getClientRectFromMixedType(element, firstClippingParent));
668
+ clippingRect.width = clippingRect.right - clippingRect.left;
669
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
670
+ clippingRect.x = clippingRect.left;
671
+ clippingRect.y = clippingRect.top;
672
+ return clippingRect;
673
+ }
674
+
675
+ function getVariation(placement) {
676
+ return placement.split('-')[1];
677
+ }
678
+
679
+ function getMainAxisFromPlacement(placement) {
680
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
681
+ }
682
+
683
+ function computeOffsets(_ref) {
684
+ var reference = _ref.reference,
685
+ element = _ref.element,
686
+ placement = _ref.placement;
687
+ var basePlacement = placement ? getBasePlacement(placement) : null;
688
+ var variation = placement ? getVariation(placement) : null;
689
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
690
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
691
+ var offsets;
692
+
693
+ switch (basePlacement) {
694
+ case top:
695
+ offsets = {
696
+ x: commonX,
697
+ y: reference.y - element.height
698
+ };
699
+ break;
700
+
701
+ case bottom:
702
+ offsets = {
703
+ x: commonX,
704
+ y: reference.y + reference.height
705
+ };
706
+ break;
707
+
708
+ case right:
709
+ offsets = {
710
+ x: reference.x + reference.width,
711
+ y: commonY
712
+ };
713
+ break;
714
+
715
+ case left:
716
+ offsets = {
717
+ x: reference.x - element.width,
718
+ y: commonY
719
+ };
720
+ break;
721
+
722
+ default:
723
+ offsets = {
724
+ x: reference.x,
725
+ y: reference.y
726
+ };
727
+ }
728
+
729
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
730
+
731
+ if (mainAxis != null) {
732
+ var len = mainAxis === 'y' ? 'height' : 'width';
733
+
734
+ switch (variation) {
735
+ case start:
736
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
737
+ break;
738
+
739
+ case end:
740
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
741
+ break;
742
+ }
743
+ }
744
+
745
+ return offsets;
746
+ }
747
+
748
+ function getFreshSideObject() {
749
+ return {
750
+ top: 0,
751
+ right: 0,
752
+ bottom: 0,
753
+ left: 0
754
+ };
755
+ }
756
+
757
+ function mergePaddingObject(paddingObject) {
758
+ return Object.assign({}, getFreshSideObject(), paddingObject);
759
+ }
760
+
761
+ function expandToHashMap(value, keys) {
762
+ return keys.reduce(function (hashMap, key) {
763
+ hashMap[key] = value;
764
+ return hashMap;
765
+ }, {});
766
+ }
767
+
768
+ function detectOverflow(state, options) {
769
+ if (options === void 0) {
770
+ options = {};
771
+ }
772
+
773
+ var _options = options,
774
+ _options$placement = _options.placement,
775
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
776
+ _options$boundary = _options.boundary,
777
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
778
+ _options$rootBoundary = _options.rootBoundary,
779
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
780
+ _options$elementConte = _options.elementContext,
781
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
782
+ _options$altBoundary = _options.altBoundary,
783
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
784
+ _options$padding = _options.padding,
785
+ padding = _options$padding === void 0 ? 0 : _options$padding;
786
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
787
+ var altContext = elementContext === popper ? reference : popper;
788
+ var referenceElement = state.elements.reference;
789
+ var popperRect = state.rects.popper;
790
+ var element = state.elements[altBoundary ? altContext : elementContext];
791
+ var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
792
+ var referenceClientRect = getBoundingClientRect(referenceElement);
793
+ var popperOffsets = computeOffsets({
794
+ reference: referenceClientRect,
795
+ element: popperRect,
796
+ strategy: 'absolute',
797
+ placement: placement
798
+ });
799
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
800
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
801
+ // 0 or negative = within the clipping rect
802
+
803
+ var overflowOffsets = {
804
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
805
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
806
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
807
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
808
+ };
809
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
810
+
811
+ if (elementContext === popper && offsetData) {
812
+ var offset = offsetData[placement];
813
+ Object.keys(overflowOffsets).forEach(function (key) {
814
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
815
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
816
+ overflowOffsets[key] += offset[axis] * multiply;
817
+ });
818
+ }
819
+
820
+ return overflowOffsets;
821
+ }
822
+
823
+ var INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';
824
+ var INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';
825
+ var DEFAULT_OPTIONS = {
826
+ placement: 'bottom',
827
+ modifiers: [],
828
+ strategy: 'absolute'
829
+ };
830
+
831
+ function areValidElements() {
832
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
833
+ args[_key] = arguments[_key];
834
+ }
835
+
836
+ return !args.some(function (element) {
837
+ return !(element && typeof element.getBoundingClientRect === 'function');
838
+ });
839
+ }
840
+
841
+ function popperGenerator(generatorOptions) {
842
+ if (generatorOptions === void 0) {
843
+ generatorOptions = {};
844
+ }
845
+
846
+ var _generatorOptions = generatorOptions,
847
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
848
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
849
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
850
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
851
+ return function createPopper(reference, popper, options) {
852
+ if (options === void 0) {
853
+ options = defaultOptions;
854
+ }
855
+
856
+ var state = {
857
+ placement: 'bottom',
858
+ orderedModifiers: [],
859
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
860
+ modifiersData: {},
861
+ elements: {
862
+ reference: reference,
863
+ popper: popper
864
+ },
865
+ attributes: {},
866
+ styles: {}
867
+ };
868
+ var effectCleanupFns = [];
869
+ var isDestroyed = false;
870
+ var instance = {
871
+ state: state,
872
+ setOptions: function setOptions(options) {
873
+ cleanupModifierEffects();
874
+ state.options = Object.assign({}, defaultOptions, state.options, options);
875
+ state.scrollParents = {
876
+ reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
877
+ popper: listScrollParents(popper)
878
+ }; // Orders the modifiers based on their dependencies and `phase`
879
+ // properties
880
+
881
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
882
+
883
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
884
+ return m.enabled;
885
+ }); // Validate the provided modifiers so that the consumer will get warned
886
+ // if one of the modifiers is invalid for any reason
887
+
888
+ if (process.env.NODE_ENV !== "production") {
889
+ var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {
890
+ var name = _ref.name;
891
+ return name;
892
+ });
893
+ validateModifiers(modifiers);
894
+
895
+ if (getBasePlacement(state.options.placement) === auto) {
896
+ var flipModifier = state.orderedModifiers.find(function (_ref2) {
897
+ var name = _ref2.name;
898
+ return name === 'flip';
899
+ });
900
+
901
+ if (!flipModifier) {
902
+ console.error(['Popper: "auto" placements require the "flip" modifier be', 'present and enabled to work.'].join(' '));
903
+ }
904
+ }
905
+
906
+ var _getComputedStyle = getComputedStyle(popper),
907
+ marginTop = _getComputedStyle.marginTop,
908
+ marginRight = _getComputedStyle.marginRight,
909
+ marginBottom = _getComputedStyle.marginBottom,
910
+ marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can
911
+ // cause bugs with positioning, so we'll warn the consumer
912
+
913
+
914
+ if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {
915
+ return parseFloat(margin);
916
+ })) {
917
+ console.warn(['Popper: CSS "margin" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));
918
+ }
919
+ }
920
+
921
+ runModifierEffects();
922
+ return instance.update();
923
+ },
924
+ // Sync update – it will always be executed, even if not necessary. This
925
+ // is useful for low frequency updates where sync behavior simplifies the
926
+ // logic.
927
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
928
+ // prefer the async Popper#update method
929
+ forceUpdate: function forceUpdate() {
930
+ if (isDestroyed) {
931
+ return;
932
+ }
933
+
934
+ var _state$elements = state.elements,
935
+ reference = _state$elements.reference,
936
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
937
+ // anymore
938
+
939
+ if (!areValidElements(reference, popper)) {
940
+ if (process.env.NODE_ENV !== "production") {
941
+ console.error(INVALID_ELEMENT_ERROR);
942
+ }
943
+
944
+ return;
945
+ } // Store the reference and popper rects to be read by modifiers
946
+
947
+
948
+ state.rects = {
949
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
950
+ popper: getLayoutRect(popper)
951
+ }; // Modifiers have the ability to reset the current update cycle. The
952
+ // most common use case for this is the `flip` modifier changing the
953
+ // placement, which then needs to re-run all the modifiers, because the
954
+ // logic was previously ran for the previous placement and is therefore
955
+ // stale/incorrect
956
+
957
+ state.reset = false;
958
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
959
+ // is filled with the initial data specified by the modifier. This means
960
+ // it doesn't persist and is fresh on each update.
961
+ // To ensure persistent data, use `${name}#persistent`
962
+
963
+ state.orderedModifiers.forEach(function (modifier) {
964
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
965
+ });
966
+ var __debug_loops__ = 0;
967
+
968
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
969
+ if (process.env.NODE_ENV !== "production") {
970
+ __debug_loops__ += 1;
971
+
972
+ if (__debug_loops__ > 100) {
973
+ console.error(INFINITE_LOOP_ERROR);
974
+ break;
975
+ }
976
+ }
977
+
978
+ if (state.reset === true) {
979
+ state.reset = false;
980
+ index = -1;
981
+ continue;
982
+ }
983
+
984
+ var _state$orderedModifie = state.orderedModifiers[index],
985
+ fn = _state$orderedModifie.fn,
986
+ _state$orderedModifie2 = _state$orderedModifie.options,
987
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
988
+ name = _state$orderedModifie.name;
989
+
990
+ if (typeof fn === 'function') {
991
+ state = fn({
992
+ state: state,
993
+ options: _options,
994
+ name: name,
995
+ instance: instance
996
+ }) || state;
997
+ }
998
+ }
999
+ },
1000
+ // Async and optimistically optimized update – it will not be executed if
1001
+ // not necessary (debounced to run at most once-per-tick)
1002
+ update: debounce(function () {
1003
+ return new Promise(function (resolve) {
1004
+ instance.forceUpdate();
1005
+ resolve(state);
1006
+ });
1007
+ }),
1008
+ destroy: function destroy() {
1009
+ cleanupModifierEffects();
1010
+ isDestroyed = true;
1011
+ }
1012
+ };
1013
+
1014
+ if (!areValidElements(reference, popper)) {
1015
+ if (process.env.NODE_ENV !== "production") {
1016
+ console.error(INVALID_ELEMENT_ERROR);
1017
+ }
1018
+
1019
+ return instance;
1020
+ }
1021
+
1022
+ instance.setOptions(options).then(function (state) {
1023
+ if (!isDestroyed && options.onFirstUpdate) {
1024
+ options.onFirstUpdate(state);
1025
+ }
1026
+ }); // Modifiers have the ability to execute arbitrary code before the first
1027
+ // update cycle runs. They will be executed in the same order as the update
1028
+ // cycle. This is useful when a modifier adds some persistent data that
1029
+ // other modifiers need to use, but the modifier is run after the dependent
1030
+ // one.
1031
+
1032
+ function runModifierEffects() {
1033
+ state.orderedModifiers.forEach(function (_ref3) {
1034
+ var name = _ref3.name,
1035
+ _ref3$options = _ref3.options,
1036
+ options = _ref3$options === void 0 ? {} : _ref3$options,
1037
+ effect = _ref3.effect;
1038
+
1039
+ if (typeof effect === 'function') {
1040
+ var cleanupFn = effect({
1041
+ state: state,
1042
+ name: name,
1043
+ instance: instance,
1044
+ options: options
1045
+ });
1046
+
1047
+ var noopFn = function noopFn() {};
1048
+
1049
+ effectCleanupFns.push(cleanupFn || noopFn);
1050
+ }
1051
+ });
1052
+ }
1053
+
1054
+ function cleanupModifierEffects() {
1055
+ effectCleanupFns.forEach(function (fn) {
1056
+ return fn();
1057
+ });
1058
+ effectCleanupFns = [];
1059
+ }
1060
+
1061
+ return instance;
1062
+ };
1063
+ }
1064
+ var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules
1065
+
1066
+ exports.createPopper = createPopper;
1067
+ exports.detectOverflow = detectOverflow;
1068
+ exports.popperGenerator = popperGenerator;
1069
+ //# sourceMappingURL=popper-base.js.map