@lukso/web-components 1.49.2 → 1.50.0

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 (61) hide show
  1. package/dist/components/index.cjs +7 -2
  2. package/dist/components/index.d.ts +1 -0
  3. package/dist/components/index.d.ts.map +1 -1
  4. package/dist/components/index.js +3 -2
  5. package/dist/components/lukso-button/index.cjs +1 -1
  6. package/dist/components/lukso-button/index.js +1 -1
  7. package/dist/components/lukso-card/index.cjs +2 -2
  8. package/dist/components/lukso-card/index.js +2 -2
  9. package/dist/components/lukso-checkbox/index.cjs +1 -1
  10. package/dist/components/lukso-checkbox/index.js +1 -1
  11. package/dist/components/lukso-footer/index.cjs +1 -1
  12. package/dist/components/lukso-footer/index.js +1 -1
  13. package/dist/components/lukso-icon/index.cjs +2 -2
  14. package/dist/components/lukso-icon/index.js +2 -2
  15. package/dist/components/lukso-input/index.cjs +1 -1
  16. package/dist/components/lukso-input/index.js +1 -1
  17. package/dist/components/lukso-modal/index.cjs +1 -1
  18. package/dist/components/lukso-modal/index.js +1 -1
  19. package/dist/components/lukso-navbar/index.cjs +2 -2
  20. package/dist/components/lukso-navbar/index.js +2 -2
  21. package/dist/components/lukso-profile/index.cjs +2 -2
  22. package/dist/components/lukso-profile/index.js +2 -2
  23. package/dist/components/lukso-progress/index.cjs +2 -2
  24. package/dist/components/lukso-progress/index.js +2 -2
  25. package/dist/components/lukso-sanitize/index.cjs +1 -1
  26. package/dist/components/lukso-sanitize/index.js +1 -1
  27. package/dist/components/lukso-search/index.cjs +2 -2
  28. package/dist/components/lukso-search/index.js +2 -2
  29. package/dist/components/lukso-select/index.cjs +4 -4
  30. package/dist/components/lukso-select/index.js +4 -4
  31. package/dist/components/lukso-share/index.cjs +1 -1
  32. package/dist/components/lukso-share/index.js +1 -1
  33. package/dist/components/lukso-switch/index.cjs +2 -2
  34. package/dist/components/lukso-switch/index.js +2 -2
  35. package/dist/components/lukso-tag/index.cjs +2 -2
  36. package/dist/components/lukso-tag/index.js +2 -2
  37. package/dist/components/lukso-terms/index.cjs +2 -2
  38. package/dist/components/lukso-terms/index.js +2 -2
  39. package/dist/components/lukso-test/index.cjs +1 -1
  40. package/dist/components/lukso-test/index.js +1 -1
  41. package/dist/components/lukso-tooltip/index.cjs +3613 -0
  42. package/dist/components/lukso-tooltip/index.d.ts +35 -0
  43. package/dist/components/lukso-tooltip/index.d.ts.map +1 -0
  44. package/dist/components/lukso-tooltip/index.js +3611 -0
  45. package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts +27 -0
  46. package/dist/components/lukso-tooltip/lukso-tooltip.stories.d.ts.map +1 -0
  47. package/dist/components/lukso-username/index.cjs +1 -1
  48. package/dist/components/lukso-username/index.js +1 -1
  49. package/dist/components/lukso-wizard/index.cjs +1 -1
  50. package/dist/components/lukso-wizard/index.js +1 -1
  51. package/dist/index-a134c0a6.js +39 -0
  52. package/dist/index-ae293272.cjs +46 -0
  53. package/dist/index.cjs +7 -2
  54. package/dist/index.js +3 -2
  55. package/dist/shared/tailwind-element/index.cjs +1 -1
  56. package/dist/shared/tailwind-element/index.js +1 -1
  57. package/dist/{style-map-ea2513e4.cjs → style-map-761568c8.cjs} +1 -1
  58. package/dist/{style-map-b2a337a1.js → style-map-f7c09fa5.js} +1 -1
  59. package/package.json +8 -2
  60. package/dist/index-c04e4744.cjs +0 -46
  61. package/dist/index-cfea1b58.js +0 -39
@@ -0,0 +1,3611 @@
1
+ import { T as TailwindStyledElement, x } from '../../index-a134c0a6.js';
2
+ import { n, e } from '../../query-assigned-elements-5d94572f.js';
3
+ import { t } from '../../state-0a779257.js';
4
+ import { c as customClassMap } from '../../index-5e194caf.js';
5
+ import '../../directive-2bb7789e.js';
6
+
7
+ var top = 'top';
8
+ var bottom = 'bottom';
9
+ var right = 'right';
10
+ var left = 'left';
11
+ var auto = 'auto';
12
+ var basePlacements = [top, bottom, right, left];
13
+ var start = 'start';
14
+ var end = 'end';
15
+ var clippingParents = 'clippingParents';
16
+ var viewport = 'viewport';
17
+ var popper = 'popper';
18
+ var reference = 'reference';
19
+ var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
20
+ return acc.concat([placement + "-" + start, placement + "-" + end]);
21
+ }, []);
22
+ var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
23
+ return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
24
+ }, []); // modifiers that need to read the DOM
25
+
26
+ var beforeRead = 'beforeRead';
27
+ var read = 'read';
28
+ var afterRead = 'afterRead'; // pure-logic modifiers
29
+
30
+ var beforeMain = 'beforeMain';
31
+ var main = 'main';
32
+ var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
33
+
34
+ var beforeWrite = 'beforeWrite';
35
+ var write = 'write';
36
+ var afterWrite = 'afterWrite';
37
+ var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
38
+
39
+ function getNodeName(element) {
40
+ return element ? (element.nodeName || '').toLowerCase() : null;
41
+ }
42
+
43
+ function getWindow(node) {
44
+ if (node == null) {
45
+ return window;
46
+ }
47
+
48
+ if (node.toString() !== '[object Window]') {
49
+ var ownerDocument = node.ownerDocument;
50
+ return ownerDocument ? ownerDocument.defaultView || window : window;
51
+ }
52
+
53
+ return node;
54
+ }
55
+
56
+ function isElement$1(node) {
57
+ var OwnElement = getWindow(node).Element;
58
+ return node instanceof OwnElement || node instanceof Element;
59
+ }
60
+
61
+ function isHTMLElement(node) {
62
+ var OwnElement = getWindow(node).HTMLElement;
63
+ return node instanceof OwnElement || node instanceof HTMLElement;
64
+ }
65
+
66
+ function isShadowRoot(node) {
67
+ // IE 11 has no ShadowRoot
68
+ if (typeof ShadowRoot === 'undefined') {
69
+ return false;
70
+ }
71
+
72
+ var OwnElement = getWindow(node).ShadowRoot;
73
+ return node instanceof OwnElement || node instanceof ShadowRoot;
74
+ }
75
+
76
+ // and applies them to the HTMLElements such as popper and arrow
77
+
78
+ function applyStyles(_ref) {
79
+ var state = _ref.state;
80
+ Object.keys(state.elements).forEach(function (name) {
81
+ var style = state.styles[name] || {};
82
+ var attributes = state.attributes[name] || {};
83
+ var element = state.elements[name]; // arrow is optional + virtual elements
84
+
85
+ if (!isHTMLElement(element) || !getNodeName(element)) {
86
+ return;
87
+ } // Flow doesn't support to extend this property, but it's the most
88
+ // effective way to apply styles to an HTMLElement
89
+ // $FlowFixMe[cannot-write]
90
+
91
+
92
+ Object.assign(element.style, style);
93
+ Object.keys(attributes).forEach(function (name) {
94
+ var value = attributes[name];
95
+
96
+ if (value === false) {
97
+ element.removeAttribute(name);
98
+ } else {
99
+ element.setAttribute(name, value === true ? '' : value);
100
+ }
101
+ });
102
+ });
103
+ }
104
+
105
+ function effect$2(_ref2) {
106
+ var state = _ref2.state;
107
+ var initialStyles = {
108
+ popper: {
109
+ position: state.options.strategy,
110
+ left: '0',
111
+ top: '0',
112
+ margin: '0'
113
+ },
114
+ arrow: {
115
+ position: 'absolute'
116
+ },
117
+ reference: {}
118
+ };
119
+ Object.assign(state.elements.popper.style, initialStyles.popper);
120
+ state.styles = initialStyles;
121
+
122
+ if (state.elements.arrow) {
123
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
124
+ }
125
+
126
+ return function () {
127
+ Object.keys(state.elements).forEach(function (name) {
128
+ var element = state.elements[name];
129
+ var attributes = state.attributes[name] || {};
130
+ var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
131
+
132
+ var style = styleProperties.reduce(function (style, property) {
133
+ style[property] = '';
134
+ return style;
135
+ }, {}); // arrow is optional + virtual elements
136
+
137
+ if (!isHTMLElement(element) || !getNodeName(element)) {
138
+ return;
139
+ }
140
+
141
+ Object.assign(element.style, style);
142
+ Object.keys(attributes).forEach(function (attribute) {
143
+ element.removeAttribute(attribute);
144
+ });
145
+ });
146
+ };
147
+ } // eslint-disable-next-line import/no-unused-modules
148
+
149
+
150
+ const applyStyles$1 = {
151
+ name: 'applyStyles',
152
+ enabled: true,
153
+ phase: 'write',
154
+ fn: applyStyles,
155
+ effect: effect$2,
156
+ requires: ['computeStyles']
157
+ };
158
+
159
+ function getBasePlacement$1(placement) {
160
+ return placement.split('-')[0];
161
+ }
162
+
163
+ var max = Math.max;
164
+ var min = Math.min;
165
+ var round = Math.round;
166
+
167
+ function getUAString() {
168
+ var uaData = navigator.userAgentData;
169
+
170
+ if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
171
+ return uaData.brands.map(function (item) {
172
+ return item.brand + "/" + item.version;
173
+ }).join(' ');
174
+ }
175
+
176
+ return navigator.userAgent;
177
+ }
178
+
179
+ function isLayoutViewport() {
180
+ return !/^((?!chrome|android).)*safari/i.test(getUAString());
181
+ }
182
+
183
+ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
184
+ if (includeScale === void 0) {
185
+ includeScale = false;
186
+ }
187
+
188
+ if (isFixedStrategy === void 0) {
189
+ isFixedStrategy = false;
190
+ }
191
+
192
+ var clientRect = element.getBoundingClientRect();
193
+ var scaleX = 1;
194
+ var scaleY = 1;
195
+
196
+ if (includeScale && isHTMLElement(element)) {
197
+ scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
198
+ scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
199
+ }
200
+
201
+ var _ref = isElement$1(element) ? getWindow(element) : window,
202
+ visualViewport = _ref.visualViewport;
203
+
204
+ var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
205
+ var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
206
+ var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
207
+ var width = clientRect.width / scaleX;
208
+ var height = clientRect.height / scaleY;
209
+ return {
210
+ width: width,
211
+ height: height,
212
+ top: y,
213
+ right: x + width,
214
+ bottom: y + height,
215
+ left: x,
216
+ x: x,
217
+ y: y
218
+ };
219
+ }
220
+
221
+ // means it doesn't take into account transforms.
222
+
223
+ function getLayoutRect(element) {
224
+ var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
225
+ // Fixes https://github.com/popperjs/popper-core/issues/1223
226
+
227
+ var width = element.offsetWidth;
228
+ var height = element.offsetHeight;
229
+
230
+ if (Math.abs(clientRect.width - width) <= 1) {
231
+ width = clientRect.width;
232
+ }
233
+
234
+ if (Math.abs(clientRect.height - height) <= 1) {
235
+ height = clientRect.height;
236
+ }
237
+
238
+ return {
239
+ x: element.offsetLeft,
240
+ y: element.offsetTop,
241
+ width: width,
242
+ height: height
243
+ };
244
+ }
245
+
246
+ function contains(parent, child) {
247
+ var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
248
+
249
+ if (parent.contains(child)) {
250
+ return true;
251
+ } // then fallback to custom implementation with Shadow DOM support
252
+ else if (rootNode && isShadowRoot(rootNode)) {
253
+ var next = child;
254
+
255
+ do {
256
+ if (next && parent.isSameNode(next)) {
257
+ return true;
258
+ } // $FlowFixMe[prop-missing]: need a better way to handle this...
259
+
260
+
261
+ next = next.parentNode || next.host;
262
+ } while (next);
263
+ } // Give up, the result is false
264
+
265
+
266
+ return false;
267
+ }
268
+
269
+ function getComputedStyle(element) {
270
+ return getWindow(element).getComputedStyle(element);
271
+ }
272
+
273
+ function isTableElement(element) {
274
+ return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
275
+ }
276
+
277
+ function getDocumentElement(element) {
278
+ // $FlowFixMe[incompatible-return]: assume body is always available
279
+ return ((isElement$1(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
280
+ element.document) || window.document).documentElement;
281
+ }
282
+
283
+ function getParentNode(element) {
284
+ if (getNodeName(element) === 'html') {
285
+ return element;
286
+ }
287
+
288
+ return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
289
+ // $FlowFixMe[incompatible-return]
290
+ // $FlowFixMe[prop-missing]
291
+ element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
292
+ element.parentNode || ( // DOM Element detected
293
+ isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
294
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
295
+ getDocumentElement(element) // fallback
296
+
297
+ );
298
+ }
299
+
300
+ function getTrueOffsetParent(element) {
301
+ if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
302
+ getComputedStyle(element).position === 'fixed') {
303
+ return null;
304
+ }
305
+
306
+ return element.offsetParent;
307
+ } // `.offsetParent` reports `null` for fixed elements, while absolute elements
308
+ // return the containing block
309
+
310
+
311
+ function getContainingBlock(element) {
312
+ var isFirefox = /firefox/i.test(getUAString());
313
+ var isIE = /Trident/i.test(getUAString());
314
+
315
+ if (isIE && isHTMLElement(element)) {
316
+ // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
317
+ var elementCss = getComputedStyle(element);
318
+
319
+ if (elementCss.position === 'fixed') {
320
+ return null;
321
+ }
322
+ }
323
+
324
+ var currentNode = getParentNode(element);
325
+
326
+ if (isShadowRoot(currentNode)) {
327
+ currentNode = currentNode.host;
328
+ }
329
+
330
+ while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
331
+ var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
332
+ // create a containing block.
333
+ // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
334
+
335
+ 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') {
336
+ return currentNode;
337
+ } else {
338
+ currentNode = currentNode.parentNode;
339
+ }
340
+ }
341
+
342
+ return null;
343
+ } // Gets the closest ancestor positioned element. Handles some edge cases,
344
+ // such as table ancestors and cross browser bugs.
345
+
346
+
347
+ function getOffsetParent(element) {
348
+ var window = getWindow(element);
349
+ var offsetParent = getTrueOffsetParent(element);
350
+
351
+ while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
352
+ offsetParent = getTrueOffsetParent(offsetParent);
353
+ }
354
+
355
+ if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
356
+ return window;
357
+ }
358
+
359
+ return offsetParent || getContainingBlock(element) || window;
360
+ }
361
+
362
+ function getMainAxisFromPlacement(placement) {
363
+ return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
364
+ }
365
+
366
+ function within(min$1, value, max$1) {
367
+ return max(min$1, min(value, max$1));
368
+ }
369
+ function withinMaxClamp(min, value, max) {
370
+ var v = within(min, value, max);
371
+ return v > max ? max : v;
372
+ }
373
+
374
+ function getFreshSideObject() {
375
+ return {
376
+ top: 0,
377
+ right: 0,
378
+ bottom: 0,
379
+ left: 0
380
+ };
381
+ }
382
+
383
+ function mergePaddingObject(paddingObject) {
384
+ return Object.assign({}, getFreshSideObject(), paddingObject);
385
+ }
386
+
387
+ function expandToHashMap(value, keys) {
388
+ return keys.reduce(function (hashMap, key) {
389
+ hashMap[key] = value;
390
+ return hashMap;
391
+ }, {});
392
+ }
393
+
394
+ var toPaddingObject = function toPaddingObject(padding, state) {
395
+ padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
396
+ placement: state.placement
397
+ })) : padding;
398
+ return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
399
+ };
400
+
401
+ function arrow(_ref) {
402
+ var _state$modifiersData$;
403
+
404
+ var state = _ref.state,
405
+ name = _ref.name,
406
+ options = _ref.options;
407
+ var arrowElement = state.elements.arrow;
408
+ var popperOffsets = state.modifiersData.popperOffsets;
409
+ var basePlacement = getBasePlacement$1(state.placement);
410
+ var axis = getMainAxisFromPlacement(basePlacement);
411
+ var isVertical = [left, right].indexOf(basePlacement) >= 0;
412
+ var len = isVertical ? 'height' : 'width';
413
+
414
+ if (!arrowElement || !popperOffsets) {
415
+ return;
416
+ }
417
+
418
+ var paddingObject = toPaddingObject(options.padding, state);
419
+ var arrowRect = getLayoutRect(arrowElement);
420
+ var minProp = axis === 'y' ? top : left;
421
+ var maxProp = axis === 'y' ? bottom : right;
422
+ var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
423
+ var startDiff = popperOffsets[axis] - state.rects.reference[axis];
424
+ var arrowOffsetParent = getOffsetParent(arrowElement);
425
+ var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
426
+ var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
427
+ // outside of the popper bounds
428
+
429
+ var min = paddingObject[minProp];
430
+ var max = clientSize - arrowRect[len] - paddingObject[maxProp];
431
+ var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
432
+ var offset = within(min, center, max); // Prevents breaking syntax highlighting...
433
+
434
+ var axisProp = axis;
435
+ state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
436
+ }
437
+
438
+ function effect$1(_ref2) {
439
+ var state = _ref2.state,
440
+ options = _ref2.options;
441
+ var _options$element = options.element,
442
+ arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
443
+
444
+ if (arrowElement == null) {
445
+ return;
446
+ } // CSS selector
447
+
448
+
449
+ if (typeof arrowElement === 'string') {
450
+ arrowElement = state.elements.popper.querySelector(arrowElement);
451
+
452
+ if (!arrowElement) {
453
+ return;
454
+ }
455
+ }
456
+
457
+ if (!contains(state.elements.popper, arrowElement)) {
458
+ return;
459
+ }
460
+
461
+ state.elements.arrow = arrowElement;
462
+ } // eslint-disable-next-line import/no-unused-modules
463
+
464
+
465
+ const arrow$1 = {
466
+ name: 'arrow',
467
+ enabled: true,
468
+ phase: 'main',
469
+ fn: arrow,
470
+ effect: effect$1,
471
+ requires: ['popperOffsets'],
472
+ requiresIfExists: ['preventOverflow']
473
+ };
474
+
475
+ function getVariation(placement) {
476
+ return placement.split('-')[1];
477
+ }
478
+
479
+ var unsetSides = {
480
+ top: 'auto',
481
+ right: 'auto',
482
+ bottom: 'auto',
483
+ left: 'auto'
484
+ }; // Round the offsets to the nearest suitable subpixel based on the DPR.
485
+ // Zooming can change the DPR, but it seems to report a value that will
486
+ // cleanly divide the values into the appropriate subpixels.
487
+
488
+ function roundOffsetsByDPR(_ref, win) {
489
+ var x = _ref.x,
490
+ y = _ref.y;
491
+ var dpr = win.devicePixelRatio || 1;
492
+ return {
493
+ x: round(x * dpr) / dpr || 0,
494
+ y: round(y * dpr) / dpr || 0
495
+ };
496
+ }
497
+
498
+ function mapToStyles(_ref2) {
499
+ var _Object$assign2;
500
+
501
+ var popper = _ref2.popper,
502
+ popperRect = _ref2.popperRect,
503
+ placement = _ref2.placement,
504
+ variation = _ref2.variation,
505
+ offsets = _ref2.offsets,
506
+ position = _ref2.position,
507
+ gpuAcceleration = _ref2.gpuAcceleration,
508
+ adaptive = _ref2.adaptive,
509
+ roundOffsets = _ref2.roundOffsets,
510
+ isFixed = _ref2.isFixed;
511
+ var _offsets$x = offsets.x,
512
+ x = _offsets$x === void 0 ? 0 : _offsets$x,
513
+ _offsets$y = offsets.y,
514
+ y = _offsets$y === void 0 ? 0 : _offsets$y;
515
+
516
+ var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
517
+ x: x,
518
+ y: y
519
+ }) : {
520
+ x: x,
521
+ y: y
522
+ };
523
+
524
+ x = _ref3.x;
525
+ y = _ref3.y;
526
+ var hasX = offsets.hasOwnProperty('x');
527
+ var hasY = offsets.hasOwnProperty('y');
528
+ var sideX = left;
529
+ var sideY = top;
530
+ var win = window;
531
+
532
+ if (adaptive) {
533
+ var offsetParent = getOffsetParent(popper);
534
+ var heightProp = 'clientHeight';
535
+ var widthProp = 'clientWidth';
536
+
537
+ if (offsetParent === getWindow(popper)) {
538
+ offsetParent = getDocumentElement(popper);
539
+
540
+ if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
541
+ heightProp = 'scrollHeight';
542
+ widthProp = 'scrollWidth';
543
+ }
544
+ } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
545
+
546
+
547
+ offsetParent = offsetParent;
548
+
549
+ if (placement === top || (placement === left || placement === right) && variation === end) {
550
+ sideY = bottom;
551
+ var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
552
+ offsetParent[heightProp];
553
+ y -= offsetY - popperRect.height;
554
+ y *= gpuAcceleration ? 1 : -1;
555
+ }
556
+
557
+ if (placement === left || (placement === top || placement === bottom) && variation === end) {
558
+ sideX = right;
559
+ var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
560
+ offsetParent[widthProp];
561
+ x -= offsetX - popperRect.width;
562
+ x *= gpuAcceleration ? 1 : -1;
563
+ }
564
+ }
565
+
566
+ var commonStyles = Object.assign({
567
+ position: position
568
+ }, adaptive && unsetSides);
569
+
570
+ var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
571
+ x: x,
572
+ y: y
573
+ }, getWindow(popper)) : {
574
+ x: x,
575
+ y: y
576
+ };
577
+
578
+ x = _ref4.x;
579
+ y = _ref4.y;
580
+
581
+ if (gpuAcceleration) {
582
+ var _Object$assign;
583
+
584
+ return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
585
+ }
586
+
587
+ return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
588
+ }
589
+
590
+ function computeStyles(_ref5) {
591
+ var state = _ref5.state,
592
+ options = _ref5.options;
593
+ var _options$gpuAccelerat = options.gpuAcceleration,
594
+ gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
595
+ _options$adaptive = options.adaptive,
596
+ adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
597
+ _options$roundOffsets = options.roundOffsets,
598
+ roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
599
+ var commonStyles = {
600
+ placement: getBasePlacement$1(state.placement),
601
+ variation: getVariation(state.placement),
602
+ popper: state.elements.popper,
603
+ popperRect: state.rects.popper,
604
+ gpuAcceleration: gpuAcceleration,
605
+ isFixed: state.options.strategy === 'fixed'
606
+ };
607
+
608
+ if (state.modifiersData.popperOffsets != null) {
609
+ state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
610
+ offsets: state.modifiersData.popperOffsets,
611
+ position: state.options.strategy,
612
+ adaptive: adaptive,
613
+ roundOffsets: roundOffsets
614
+ })));
615
+ }
616
+
617
+ if (state.modifiersData.arrow != null) {
618
+ state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
619
+ offsets: state.modifiersData.arrow,
620
+ position: 'absolute',
621
+ adaptive: false,
622
+ roundOffsets: roundOffsets
623
+ })));
624
+ }
625
+
626
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
627
+ 'data-popper-placement': state.placement
628
+ });
629
+ } // eslint-disable-next-line import/no-unused-modules
630
+
631
+
632
+ const computeStyles$1 = {
633
+ name: 'computeStyles',
634
+ enabled: true,
635
+ phase: 'beforeWrite',
636
+ fn: computeStyles,
637
+ data: {}
638
+ };
639
+
640
+ var passive = {
641
+ passive: true
642
+ };
643
+
644
+ function effect(_ref) {
645
+ var state = _ref.state,
646
+ instance = _ref.instance,
647
+ options = _ref.options;
648
+ var _options$scroll = options.scroll,
649
+ scroll = _options$scroll === void 0 ? true : _options$scroll,
650
+ _options$resize = options.resize,
651
+ resize = _options$resize === void 0 ? true : _options$resize;
652
+ var window = getWindow(state.elements.popper);
653
+ var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
654
+
655
+ if (scroll) {
656
+ scrollParents.forEach(function (scrollParent) {
657
+ scrollParent.addEventListener('scroll', instance.update, passive);
658
+ });
659
+ }
660
+
661
+ if (resize) {
662
+ window.addEventListener('resize', instance.update, passive);
663
+ }
664
+
665
+ return function () {
666
+ if (scroll) {
667
+ scrollParents.forEach(function (scrollParent) {
668
+ scrollParent.removeEventListener('scroll', instance.update, passive);
669
+ });
670
+ }
671
+
672
+ if (resize) {
673
+ window.removeEventListener('resize', instance.update, passive);
674
+ }
675
+ };
676
+ } // eslint-disable-next-line import/no-unused-modules
677
+
678
+
679
+ const eventListeners = {
680
+ name: 'eventListeners',
681
+ enabled: true,
682
+ phase: 'write',
683
+ fn: function fn() {},
684
+ effect: effect,
685
+ data: {}
686
+ };
687
+
688
+ var hash$1 = {
689
+ left: 'right',
690
+ right: 'left',
691
+ bottom: 'top',
692
+ top: 'bottom'
693
+ };
694
+ function getOppositePlacement(placement) {
695
+ return placement.replace(/left|right|bottom|top/g, function (matched) {
696
+ return hash$1[matched];
697
+ });
698
+ }
699
+
700
+ var hash = {
701
+ start: 'end',
702
+ end: 'start'
703
+ };
704
+ function getOppositeVariationPlacement(placement) {
705
+ return placement.replace(/start|end/g, function (matched) {
706
+ return hash[matched];
707
+ });
708
+ }
709
+
710
+ function getWindowScroll(node) {
711
+ var win = getWindow(node);
712
+ var scrollLeft = win.pageXOffset;
713
+ var scrollTop = win.pageYOffset;
714
+ return {
715
+ scrollLeft: scrollLeft,
716
+ scrollTop: scrollTop
717
+ };
718
+ }
719
+
720
+ function getWindowScrollBarX(element) {
721
+ // If <html> has a CSS width greater than the viewport, then this will be
722
+ // incorrect for RTL.
723
+ // Popper 1 is broken in this case and never had a bug report so let's assume
724
+ // it's not an issue. I don't think anyone ever specifies width on <html>
725
+ // anyway.
726
+ // Browsers where the left scrollbar doesn't cause an issue report `0` for
727
+ // this (e.g. Edge 2019, IE11, Safari)
728
+ return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
729
+ }
730
+
731
+ function getViewportRect(element, strategy) {
732
+ var win = getWindow(element);
733
+ var html = getDocumentElement(element);
734
+ var visualViewport = win.visualViewport;
735
+ var width = html.clientWidth;
736
+ var height = html.clientHeight;
737
+ var x = 0;
738
+ var y = 0;
739
+
740
+ if (visualViewport) {
741
+ width = visualViewport.width;
742
+ height = visualViewport.height;
743
+ var layoutViewport = isLayoutViewport();
744
+
745
+ if (layoutViewport || !layoutViewport && strategy === 'fixed') {
746
+ x = visualViewport.offsetLeft;
747
+ y = visualViewport.offsetTop;
748
+ }
749
+ }
750
+
751
+ return {
752
+ width: width,
753
+ height: height,
754
+ x: x + getWindowScrollBarX(element),
755
+ y: y
756
+ };
757
+ }
758
+
759
+ // of the `<html>` and `<body>` rect bounds if horizontally scrollable
760
+
761
+ function getDocumentRect(element) {
762
+ var _element$ownerDocumen;
763
+
764
+ var html = getDocumentElement(element);
765
+ var winScroll = getWindowScroll(element);
766
+ var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
767
+ var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
768
+ var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
769
+ var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
770
+ var y = -winScroll.scrollTop;
771
+
772
+ if (getComputedStyle(body || html).direction === 'rtl') {
773
+ x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
774
+ }
775
+
776
+ return {
777
+ width: width,
778
+ height: height,
779
+ x: x,
780
+ y: y
781
+ };
782
+ }
783
+
784
+ function isScrollParent(element) {
785
+ // Firefox wants us to check `-x` and `-y` variations as well
786
+ var _getComputedStyle = getComputedStyle(element),
787
+ overflow = _getComputedStyle.overflow,
788
+ overflowX = _getComputedStyle.overflowX,
789
+ overflowY = _getComputedStyle.overflowY;
790
+
791
+ return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
792
+ }
793
+
794
+ function getScrollParent(node) {
795
+ if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
796
+ // $FlowFixMe[incompatible-return]: assume body is always available
797
+ return node.ownerDocument.body;
798
+ }
799
+
800
+ if (isHTMLElement(node) && isScrollParent(node)) {
801
+ return node;
802
+ }
803
+
804
+ return getScrollParent(getParentNode(node));
805
+ }
806
+
807
+ /*
808
+ given a DOM element, return the list of all scroll parents, up the list of ancesors
809
+ until we get to the top window object. This list is what we attach scroll listeners
810
+ to, because if any of these parent elements scroll, we'll need to re-calculate the
811
+ reference element's position.
812
+ */
813
+
814
+ function listScrollParents(element, list) {
815
+ var _element$ownerDocumen;
816
+
817
+ if (list === void 0) {
818
+ list = [];
819
+ }
820
+
821
+ var scrollParent = getScrollParent(element);
822
+ var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
823
+ var win = getWindow(scrollParent);
824
+ var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
825
+ var updatedList = list.concat(target);
826
+ return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
827
+ updatedList.concat(listScrollParents(getParentNode(target)));
828
+ }
829
+
830
+ function rectToClientRect(rect) {
831
+ return Object.assign({}, rect, {
832
+ left: rect.x,
833
+ top: rect.y,
834
+ right: rect.x + rect.width,
835
+ bottom: rect.y + rect.height
836
+ });
837
+ }
838
+
839
+ function getInnerBoundingClientRect(element, strategy) {
840
+ var rect = getBoundingClientRect(element, false, strategy === 'fixed');
841
+ rect.top = rect.top + element.clientTop;
842
+ rect.left = rect.left + element.clientLeft;
843
+ rect.bottom = rect.top + element.clientHeight;
844
+ rect.right = rect.left + element.clientWidth;
845
+ rect.width = element.clientWidth;
846
+ rect.height = element.clientHeight;
847
+ rect.x = rect.left;
848
+ rect.y = rect.top;
849
+ return rect;
850
+ }
851
+
852
+ function getClientRectFromMixedType(element, clippingParent, strategy) {
853
+ return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement$1(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
854
+ } // A "clipping parent" is an overflowable container with the characteristic of
855
+ // clipping (or hiding) overflowing elements with a position different from
856
+ // `initial`
857
+
858
+
859
+ function getClippingParents(element) {
860
+ var clippingParents = listScrollParents(getParentNode(element));
861
+ var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
862
+ var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
863
+
864
+ if (!isElement$1(clipperElement)) {
865
+ return [];
866
+ } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
867
+
868
+
869
+ return clippingParents.filter(function (clippingParent) {
870
+ return isElement$1(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
871
+ });
872
+ } // Gets the maximum area that the element is visible in due to any number of
873
+ // clipping parents
874
+
875
+
876
+ function getClippingRect(element, boundary, rootBoundary, strategy) {
877
+ var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
878
+ var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
879
+ var firstClippingParent = clippingParents[0];
880
+ var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
881
+ var rect = getClientRectFromMixedType(element, clippingParent, strategy);
882
+ accRect.top = max(rect.top, accRect.top);
883
+ accRect.right = min(rect.right, accRect.right);
884
+ accRect.bottom = min(rect.bottom, accRect.bottom);
885
+ accRect.left = max(rect.left, accRect.left);
886
+ return accRect;
887
+ }, getClientRectFromMixedType(element, firstClippingParent, strategy));
888
+ clippingRect.width = clippingRect.right - clippingRect.left;
889
+ clippingRect.height = clippingRect.bottom - clippingRect.top;
890
+ clippingRect.x = clippingRect.left;
891
+ clippingRect.y = clippingRect.top;
892
+ return clippingRect;
893
+ }
894
+
895
+ function computeOffsets(_ref) {
896
+ var reference = _ref.reference,
897
+ element = _ref.element,
898
+ placement = _ref.placement;
899
+ var basePlacement = placement ? getBasePlacement$1(placement) : null;
900
+ var variation = placement ? getVariation(placement) : null;
901
+ var commonX = reference.x + reference.width / 2 - element.width / 2;
902
+ var commonY = reference.y + reference.height / 2 - element.height / 2;
903
+ var offsets;
904
+
905
+ switch (basePlacement) {
906
+ case top:
907
+ offsets = {
908
+ x: commonX,
909
+ y: reference.y - element.height
910
+ };
911
+ break;
912
+
913
+ case bottom:
914
+ offsets = {
915
+ x: commonX,
916
+ y: reference.y + reference.height
917
+ };
918
+ break;
919
+
920
+ case right:
921
+ offsets = {
922
+ x: reference.x + reference.width,
923
+ y: commonY
924
+ };
925
+ break;
926
+
927
+ case left:
928
+ offsets = {
929
+ x: reference.x - element.width,
930
+ y: commonY
931
+ };
932
+ break;
933
+
934
+ default:
935
+ offsets = {
936
+ x: reference.x,
937
+ y: reference.y
938
+ };
939
+ }
940
+
941
+ var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
942
+
943
+ if (mainAxis != null) {
944
+ var len = mainAxis === 'y' ? 'height' : 'width';
945
+
946
+ switch (variation) {
947
+ case start:
948
+ offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
949
+ break;
950
+
951
+ case end:
952
+ offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
953
+ break;
954
+ }
955
+ }
956
+
957
+ return offsets;
958
+ }
959
+
960
+ function detectOverflow(state, options) {
961
+ if (options === void 0) {
962
+ options = {};
963
+ }
964
+
965
+ var _options = options,
966
+ _options$placement = _options.placement,
967
+ placement = _options$placement === void 0 ? state.placement : _options$placement,
968
+ _options$strategy = _options.strategy,
969
+ strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
970
+ _options$boundary = _options.boundary,
971
+ boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
972
+ _options$rootBoundary = _options.rootBoundary,
973
+ rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
974
+ _options$elementConte = _options.elementContext,
975
+ elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
976
+ _options$altBoundary = _options.altBoundary,
977
+ altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
978
+ _options$padding = _options.padding,
979
+ padding = _options$padding === void 0 ? 0 : _options$padding;
980
+ var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
981
+ var altContext = elementContext === popper ? reference : popper;
982
+ var popperRect = state.rects.popper;
983
+ var element = state.elements[altBoundary ? altContext : elementContext];
984
+ var clippingClientRect = getClippingRect(isElement$1(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
985
+ var referenceClientRect = getBoundingClientRect(state.elements.reference);
986
+ var popperOffsets = computeOffsets({
987
+ reference: referenceClientRect,
988
+ element: popperRect,
989
+ strategy: 'absolute',
990
+ placement: placement
991
+ });
992
+ var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
993
+ var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
994
+ // 0 or negative = within the clipping rect
995
+
996
+ var overflowOffsets = {
997
+ top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
998
+ bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
999
+ left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
1000
+ right: elementClientRect.right - clippingClientRect.right + paddingObject.right
1001
+ };
1002
+ var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
1003
+
1004
+ if (elementContext === popper && offsetData) {
1005
+ var offset = offsetData[placement];
1006
+ Object.keys(overflowOffsets).forEach(function (key) {
1007
+ var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
1008
+ var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
1009
+ overflowOffsets[key] += offset[axis] * multiply;
1010
+ });
1011
+ }
1012
+
1013
+ return overflowOffsets;
1014
+ }
1015
+
1016
+ function computeAutoPlacement(state, options) {
1017
+ if (options === void 0) {
1018
+ options = {};
1019
+ }
1020
+
1021
+ var _options = options,
1022
+ placement = _options.placement,
1023
+ boundary = _options.boundary,
1024
+ rootBoundary = _options.rootBoundary,
1025
+ padding = _options.padding,
1026
+ flipVariations = _options.flipVariations,
1027
+ _options$allowedAutoP = _options.allowedAutoPlacements,
1028
+ allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
1029
+ var variation = getVariation(placement);
1030
+ var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
1031
+ return getVariation(placement) === variation;
1032
+ }) : basePlacements;
1033
+ var allowedPlacements = placements$1.filter(function (placement) {
1034
+ return allowedAutoPlacements.indexOf(placement) >= 0;
1035
+ });
1036
+
1037
+ if (allowedPlacements.length === 0) {
1038
+ allowedPlacements = placements$1;
1039
+ } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
1040
+
1041
+
1042
+ var overflows = allowedPlacements.reduce(function (acc, placement) {
1043
+ acc[placement] = detectOverflow(state, {
1044
+ placement: placement,
1045
+ boundary: boundary,
1046
+ rootBoundary: rootBoundary,
1047
+ padding: padding
1048
+ })[getBasePlacement$1(placement)];
1049
+ return acc;
1050
+ }, {});
1051
+ return Object.keys(overflows).sort(function (a, b) {
1052
+ return overflows[a] - overflows[b];
1053
+ });
1054
+ }
1055
+
1056
+ function getExpandedFallbackPlacements(placement) {
1057
+ if (getBasePlacement$1(placement) === auto) {
1058
+ return [];
1059
+ }
1060
+
1061
+ var oppositePlacement = getOppositePlacement(placement);
1062
+ return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
1063
+ }
1064
+
1065
+ function flip(_ref) {
1066
+ var state = _ref.state,
1067
+ options = _ref.options,
1068
+ name = _ref.name;
1069
+
1070
+ if (state.modifiersData[name]._skip) {
1071
+ return;
1072
+ }
1073
+
1074
+ var _options$mainAxis = options.mainAxis,
1075
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1076
+ _options$altAxis = options.altAxis,
1077
+ checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
1078
+ specifiedFallbackPlacements = options.fallbackPlacements,
1079
+ padding = options.padding,
1080
+ boundary = options.boundary,
1081
+ rootBoundary = options.rootBoundary,
1082
+ altBoundary = options.altBoundary,
1083
+ _options$flipVariatio = options.flipVariations,
1084
+ flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
1085
+ allowedAutoPlacements = options.allowedAutoPlacements;
1086
+ var preferredPlacement = state.options.placement;
1087
+ var basePlacement = getBasePlacement$1(preferredPlacement);
1088
+ var isBasePlacement = basePlacement === preferredPlacement;
1089
+ var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
1090
+ var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
1091
+ return acc.concat(getBasePlacement$1(placement) === auto ? computeAutoPlacement(state, {
1092
+ placement: placement,
1093
+ boundary: boundary,
1094
+ rootBoundary: rootBoundary,
1095
+ padding: padding,
1096
+ flipVariations: flipVariations,
1097
+ allowedAutoPlacements: allowedAutoPlacements
1098
+ }) : placement);
1099
+ }, []);
1100
+ var referenceRect = state.rects.reference;
1101
+ var popperRect = state.rects.popper;
1102
+ var checksMap = new Map();
1103
+ var makeFallbackChecks = true;
1104
+ var firstFittingPlacement = placements[0];
1105
+
1106
+ for (var i = 0; i < placements.length; i++) {
1107
+ var placement = placements[i];
1108
+
1109
+ var _basePlacement = getBasePlacement$1(placement);
1110
+
1111
+ var isStartVariation = getVariation(placement) === start;
1112
+ var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
1113
+ var len = isVertical ? 'width' : 'height';
1114
+ var overflow = detectOverflow(state, {
1115
+ placement: placement,
1116
+ boundary: boundary,
1117
+ rootBoundary: rootBoundary,
1118
+ altBoundary: altBoundary,
1119
+ padding: padding
1120
+ });
1121
+ var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
1122
+
1123
+ if (referenceRect[len] > popperRect[len]) {
1124
+ mainVariationSide = getOppositePlacement(mainVariationSide);
1125
+ }
1126
+
1127
+ var altVariationSide = getOppositePlacement(mainVariationSide);
1128
+ var checks = [];
1129
+
1130
+ if (checkMainAxis) {
1131
+ checks.push(overflow[_basePlacement] <= 0);
1132
+ }
1133
+
1134
+ if (checkAltAxis) {
1135
+ checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
1136
+ }
1137
+
1138
+ if (checks.every(function (check) {
1139
+ return check;
1140
+ })) {
1141
+ firstFittingPlacement = placement;
1142
+ makeFallbackChecks = false;
1143
+ break;
1144
+ }
1145
+
1146
+ checksMap.set(placement, checks);
1147
+ }
1148
+
1149
+ if (makeFallbackChecks) {
1150
+ // `2` may be desired in some cases – research later
1151
+ var numberOfChecks = flipVariations ? 3 : 1;
1152
+
1153
+ var _loop = function _loop(_i) {
1154
+ var fittingPlacement = placements.find(function (placement) {
1155
+ var checks = checksMap.get(placement);
1156
+
1157
+ if (checks) {
1158
+ return checks.slice(0, _i).every(function (check) {
1159
+ return check;
1160
+ });
1161
+ }
1162
+ });
1163
+
1164
+ if (fittingPlacement) {
1165
+ firstFittingPlacement = fittingPlacement;
1166
+ return "break";
1167
+ }
1168
+ };
1169
+
1170
+ for (var _i = numberOfChecks; _i > 0; _i--) {
1171
+ var _ret = _loop(_i);
1172
+
1173
+ if (_ret === "break") break;
1174
+ }
1175
+ }
1176
+
1177
+ if (state.placement !== firstFittingPlacement) {
1178
+ state.modifiersData[name]._skip = true;
1179
+ state.placement = firstFittingPlacement;
1180
+ state.reset = true;
1181
+ }
1182
+ } // eslint-disable-next-line import/no-unused-modules
1183
+
1184
+
1185
+ const flip$1 = {
1186
+ name: 'flip',
1187
+ enabled: true,
1188
+ phase: 'main',
1189
+ fn: flip,
1190
+ requiresIfExists: ['offset'],
1191
+ data: {
1192
+ _skip: false
1193
+ }
1194
+ };
1195
+
1196
+ function getSideOffsets(overflow, rect, preventedOffsets) {
1197
+ if (preventedOffsets === void 0) {
1198
+ preventedOffsets = {
1199
+ x: 0,
1200
+ y: 0
1201
+ };
1202
+ }
1203
+
1204
+ return {
1205
+ top: overflow.top - rect.height - preventedOffsets.y,
1206
+ right: overflow.right - rect.width + preventedOffsets.x,
1207
+ bottom: overflow.bottom - rect.height + preventedOffsets.y,
1208
+ left: overflow.left - rect.width - preventedOffsets.x
1209
+ };
1210
+ }
1211
+
1212
+ function isAnySideFullyClipped(overflow) {
1213
+ return [top, right, bottom, left].some(function (side) {
1214
+ return overflow[side] >= 0;
1215
+ });
1216
+ }
1217
+
1218
+ function hide(_ref) {
1219
+ var state = _ref.state,
1220
+ name = _ref.name;
1221
+ var referenceRect = state.rects.reference;
1222
+ var popperRect = state.rects.popper;
1223
+ var preventedOffsets = state.modifiersData.preventOverflow;
1224
+ var referenceOverflow = detectOverflow(state, {
1225
+ elementContext: 'reference'
1226
+ });
1227
+ var popperAltOverflow = detectOverflow(state, {
1228
+ altBoundary: true
1229
+ });
1230
+ var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
1231
+ var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
1232
+ var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
1233
+ var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
1234
+ state.modifiersData[name] = {
1235
+ referenceClippingOffsets: referenceClippingOffsets,
1236
+ popperEscapeOffsets: popperEscapeOffsets,
1237
+ isReferenceHidden: isReferenceHidden,
1238
+ hasPopperEscaped: hasPopperEscaped
1239
+ };
1240
+ state.attributes.popper = Object.assign({}, state.attributes.popper, {
1241
+ 'data-popper-reference-hidden': isReferenceHidden,
1242
+ 'data-popper-escaped': hasPopperEscaped
1243
+ });
1244
+ } // eslint-disable-next-line import/no-unused-modules
1245
+
1246
+
1247
+ const hide$1 = {
1248
+ name: 'hide',
1249
+ enabled: true,
1250
+ phase: 'main',
1251
+ requiresIfExists: ['preventOverflow'],
1252
+ fn: hide
1253
+ };
1254
+
1255
+ function distanceAndSkiddingToXY(placement, rects, offset) {
1256
+ var basePlacement = getBasePlacement$1(placement);
1257
+ var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
1258
+
1259
+ var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
1260
+ placement: placement
1261
+ })) : offset,
1262
+ skidding = _ref[0],
1263
+ distance = _ref[1];
1264
+
1265
+ skidding = skidding || 0;
1266
+ distance = (distance || 0) * invertDistance;
1267
+ return [left, right].indexOf(basePlacement) >= 0 ? {
1268
+ x: distance,
1269
+ y: skidding
1270
+ } : {
1271
+ x: skidding,
1272
+ y: distance
1273
+ };
1274
+ }
1275
+
1276
+ function offset(_ref2) {
1277
+ var state = _ref2.state,
1278
+ options = _ref2.options,
1279
+ name = _ref2.name;
1280
+ var _options$offset = options.offset,
1281
+ offset = _options$offset === void 0 ? [0, 0] : _options$offset;
1282
+ var data = placements.reduce(function (acc, placement) {
1283
+ acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
1284
+ return acc;
1285
+ }, {});
1286
+ var _data$state$placement = data[state.placement],
1287
+ x = _data$state$placement.x,
1288
+ y = _data$state$placement.y;
1289
+
1290
+ if (state.modifiersData.popperOffsets != null) {
1291
+ state.modifiersData.popperOffsets.x += x;
1292
+ state.modifiersData.popperOffsets.y += y;
1293
+ }
1294
+
1295
+ state.modifiersData[name] = data;
1296
+ } // eslint-disable-next-line import/no-unused-modules
1297
+
1298
+
1299
+ const offset$1 = {
1300
+ name: 'offset',
1301
+ enabled: true,
1302
+ phase: 'main',
1303
+ requires: ['popperOffsets'],
1304
+ fn: offset
1305
+ };
1306
+
1307
+ function popperOffsets(_ref) {
1308
+ var state = _ref.state,
1309
+ name = _ref.name;
1310
+ // Offsets are the actual position the popper needs to have to be
1311
+ // properly positioned near its reference element
1312
+ // This is the most basic placement, and will be adjusted by
1313
+ // the modifiers in the next step
1314
+ state.modifiersData[name] = computeOffsets({
1315
+ reference: state.rects.reference,
1316
+ element: state.rects.popper,
1317
+ strategy: 'absolute',
1318
+ placement: state.placement
1319
+ });
1320
+ } // eslint-disable-next-line import/no-unused-modules
1321
+
1322
+
1323
+ const popperOffsets$1 = {
1324
+ name: 'popperOffsets',
1325
+ enabled: true,
1326
+ phase: 'read',
1327
+ fn: popperOffsets,
1328
+ data: {}
1329
+ };
1330
+
1331
+ function getAltAxis(axis) {
1332
+ return axis === 'x' ? 'y' : 'x';
1333
+ }
1334
+
1335
+ function preventOverflow(_ref) {
1336
+ var state = _ref.state,
1337
+ options = _ref.options,
1338
+ name = _ref.name;
1339
+ var _options$mainAxis = options.mainAxis,
1340
+ checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
1341
+ _options$altAxis = options.altAxis,
1342
+ checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
1343
+ boundary = options.boundary,
1344
+ rootBoundary = options.rootBoundary,
1345
+ altBoundary = options.altBoundary,
1346
+ padding = options.padding,
1347
+ _options$tether = options.tether,
1348
+ tether = _options$tether === void 0 ? true : _options$tether,
1349
+ _options$tetherOffset = options.tetherOffset,
1350
+ tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
1351
+ var overflow = detectOverflow(state, {
1352
+ boundary: boundary,
1353
+ rootBoundary: rootBoundary,
1354
+ padding: padding,
1355
+ altBoundary: altBoundary
1356
+ });
1357
+ var basePlacement = getBasePlacement$1(state.placement);
1358
+ var variation = getVariation(state.placement);
1359
+ var isBasePlacement = !variation;
1360
+ var mainAxis = getMainAxisFromPlacement(basePlacement);
1361
+ var altAxis = getAltAxis(mainAxis);
1362
+ var popperOffsets = state.modifiersData.popperOffsets;
1363
+ var referenceRect = state.rects.reference;
1364
+ var popperRect = state.rects.popper;
1365
+ var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
1366
+ placement: state.placement
1367
+ })) : tetherOffset;
1368
+ var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
1369
+ mainAxis: tetherOffsetValue,
1370
+ altAxis: tetherOffsetValue
1371
+ } : Object.assign({
1372
+ mainAxis: 0,
1373
+ altAxis: 0
1374
+ }, tetherOffsetValue);
1375
+ var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
1376
+ var data = {
1377
+ x: 0,
1378
+ y: 0
1379
+ };
1380
+
1381
+ if (!popperOffsets) {
1382
+ return;
1383
+ }
1384
+
1385
+ if (checkMainAxis) {
1386
+ var _offsetModifierState$;
1387
+
1388
+ var mainSide = mainAxis === 'y' ? top : left;
1389
+ var altSide = mainAxis === 'y' ? bottom : right;
1390
+ var len = mainAxis === 'y' ? 'height' : 'width';
1391
+ var offset = popperOffsets[mainAxis];
1392
+ var min$1 = offset + overflow[mainSide];
1393
+ var max$1 = offset - overflow[altSide];
1394
+ var additive = tether ? -popperRect[len] / 2 : 0;
1395
+ var minLen = variation === start ? referenceRect[len] : popperRect[len];
1396
+ var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
1397
+ // outside the reference bounds
1398
+
1399
+ var arrowElement = state.elements.arrow;
1400
+ var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
1401
+ width: 0,
1402
+ height: 0
1403
+ };
1404
+ var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
1405
+ var arrowPaddingMin = arrowPaddingObject[mainSide];
1406
+ var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
1407
+ // to include its full size in the calculation. If the reference is small
1408
+ // and near the edge of a boundary, the popper can overflow even if the
1409
+ // reference is not overflowing as well (e.g. virtual elements with no
1410
+ // width or height)
1411
+
1412
+ var arrowLen = within(0, referenceRect[len], arrowRect[len]);
1413
+ var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
1414
+ var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
1415
+ var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
1416
+ var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
1417
+ var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
1418
+ var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
1419
+ var tetherMax = offset + maxOffset - offsetModifierValue;
1420
+ var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
1421
+ popperOffsets[mainAxis] = preventedOffset;
1422
+ data[mainAxis] = preventedOffset - offset;
1423
+ }
1424
+
1425
+ if (checkAltAxis) {
1426
+ var _offsetModifierState$2;
1427
+
1428
+ var _mainSide = mainAxis === 'x' ? top : left;
1429
+
1430
+ var _altSide = mainAxis === 'x' ? bottom : right;
1431
+
1432
+ var _offset = popperOffsets[altAxis];
1433
+
1434
+ var _len = altAxis === 'y' ? 'height' : 'width';
1435
+
1436
+ var _min = _offset + overflow[_mainSide];
1437
+
1438
+ var _max = _offset - overflow[_altSide];
1439
+
1440
+ var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
1441
+
1442
+ var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
1443
+
1444
+ var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
1445
+
1446
+ var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
1447
+
1448
+ var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
1449
+
1450
+ popperOffsets[altAxis] = _preventedOffset;
1451
+ data[altAxis] = _preventedOffset - _offset;
1452
+ }
1453
+
1454
+ state.modifiersData[name] = data;
1455
+ } // eslint-disable-next-line import/no-unused-modules
1456
+
1457
+
1458
+ const preventOverflow$1 = {
1459
+ name: 'preventOverflow',
1460
+ enabled: true,
1461
+ phase: 'main',
1462
+ fn: preventOverflow,
1463
+ requiresIfExists: ['offset']
1464
+ };
1465
+
1466
+ function getHTMLElementScroll(element) {
1467
+ return {
1468
+ scrollLeft: element.scrollLeft,
1469
+ scrollTop: element.scrollTop
1470
+ };
1471
+ }
1472
+
1473
+ function getNodeScroll(node) {
1474
+ if (node === getWindow(node) || !isHTMLElement(node)) {
1475
+ return getWindowScroll(node);
1476
+ } else {
1477
+ return getHTMLElementScroll(node);
1478
+ }
1479
+ }
1480
+
1481
+ function isElementScaled(element) {
1482
+ var rect = element.getBoundingClientRect();
1483
+ var scaleX = round(rect.width) / element.offsetWidth || 1;
1484
+ var scaleY = round(rect.height) / element.offsetHeight || 1;
1485
+ return scaleX !== 1 || scaleY !== 1;
1486
+ } // Returns the composite rect of an element relative to its offsetParent.
1487
+ // Composite means it takes into account transforms as well as layout.
1488
+
1489
+
1490
+ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
1491
+ if (isFixed === void 0) {
1492
+ isFixed = false;
1493
+ }
1494
+
1495
+ var isOffsetParentAnElement = isHTMLElement(offsetParent);
1496
+ var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
1497
+ var documentElement = getDocumentElement(offsetParent);
1498
+ var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
1499
+ var scroll = {
1500
+ scrollLeft: 0,
1501
+ scrollTop: 0
1502
+ };
1503
+ var offsets = {
1504
+ x: 0,
1505
+ y: 0
1506
+ };
1507
+
1508
+ if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
1509
+ if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
1510
+ isScrollParent(documentElement)) {
1511
+ scroll = getNodeScroll(offsetParent);
1512
+ }
1513
+
1514
+ if (isHTMLElement(offsetParent)) {
1515
+ offsets = getBoundingClientRect(offsetParent, true);
1516
+ offsets.x += offsetParent.clientLeft;
1517
+ offsets.y += offsetParent.clientTop;
1518
+ } else if (documentElement) {
1519
+ offsets.x = getWindowScrollBarX(documentElement);
1520
+ }
1521
+ }
1522
+
1523
+ return {
1524
+ x: rect.left + scroll.scrollLeft - offsets.x,
1525
+ y: rect.top + scroll.scrollTop - offsets.y,
1526
+ width: rect.width,
1527
+ height: rect.height
1528
+ };
1529
+ }
1530
+
1531
+ function order(modifiers) {
1532
+ var map = new Map();
1533
+ var visited = new Set();
1534
+ var result = [];
1535
+ modifiers.forEach(function (modifier) {
1536
+ map.set(modifier.name, modifier);
1537
+ }); // On visiting object, check for its dependencies and visit them recursively
1538
+
1539
+ function sort(modifier) {
1540
+ visited.add(modifier.name);
1541
+ var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
1542
+ requires.forEach(function (dep) {
1543
+ if (!visited.has(dep)) {
1544
+ var depModifier = map.get(dep);
1545
+
1546
+ if (depModifier) {
1547
+ sort(depModifier);
1548
+ }
1549
+ }
1550
+ });
1551
+ result.push(modifier);
1552
+ }
1553
+
1554
+ modifiers.forEach(function (modifier) {
1555
+ if (!visited.has(modifier.name)) {
1556
+ // check for visited object
1557
+ sort(modifier);
1558
+ }
1559
+ });
1560
+ return result;
1561
+ }
1562
+
1563
+ function orderModifiers(modifiers) {
1564
+ // order based on dependencies
1565
+ var orderedModifiers = order(modifiers); // order based on phase
1566
+
1567
+ return modifierPhases.reduce(function (acc, phase) {
1568
+ return acc.concat(orderedModifiers.filter(function (modifier) {
1569
+ return modifier.phase === phase;
1570
+ }));
1571
+ }, []);
1572
+ }
1573
+
1574
+ function debounce$1(fn) {
1575
+ var pending;
1576
+ return function () {
1577
+ if (!pending) {
1578
+ pending = new Promise(function (resolve) {
1579
+ Promise.resolve().then(function () {
1580
+ pending = undefined;
1581
+ resolve(fn());
1582
+ });
1583
+ });
1584
+ }
1585
+
1586
+ return pending;
1587
+ };
1588
+ }
1589
+
1590
+ function mergeByName(modifiers) {
1591
+ var merged = modifiers.reduce(function (merged, current) {
1592
+ var existing = merged[current.name];
1593
+ merged[current.name] = existing ? Object.assign({}, existing, current, {
1594
+ options: Object.assign({}, existing.options, current.options),
1595
+ data: Object.assign({}, existing.data, current.data)
1596
+ }) : current;
1597
+ return merged;
1598
+ }, {}); // IE11 does not support Object.values
1599
+
1600
+ return Object.keys(merged).map(function (key) {
1601
+ return merged[key];
1602
+ });
1603
+ }
1604
+
1605
+ var DEFAULT_OPTIONS = {
1606
+ placement: 'bottom',
1607
+ modifiers: [],
1608
+ strategy: 'absolute'
1609
+ };
1610
+
1611
+ function areValidElements() {
1612
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1613
+ args[_key] = arguments[_key];
1614
+ }
1615
+
1616
+ return !args.some(function (element) {
1617
+ return !(element && typeof element.getBoundingClientRect === 'function');
1618
+ });
1619
+ }
1620
+
1621
+ function popperGenerator(generatorOptions) {
1622
+ if (generatorOptions === void 0) {
1623
+ generatorOptions = {};
1624
+ }
1625
+
1626
+ var _generatorOptions = generatorOptions,
1627
+ _generatorOptions$def = _generatorOptions.defaultModifiers,
1628
+ defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
1629
+ _generatorOptions$def2 = _generatorOptions.defaultOptions,
1630
+ defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
1631
+ return function createPopper(reference, popper, options) {
1632
+ if (options === void 0) {
1633
+ options = defaultOptions;
1634
+ }
1635
+
1636
+ var state = {
1637
+ placement: 'bottom',
1638
+ orderedModifiers: [],
1639
+ options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
1640
+ modifiersData: {},
1641
+ elements: {
1642
+ reference: reference,
1643
+ popper: popper
1644
+ },
1645
+ attributes: {},
1646
+ styles: {}
1647
+ };
1648
+ var effectCleanupFns = [];
1649
+ var isDestroyed = false;
1650
+ var instance = {
1651
+ state: state,
1652
+ setOptions: function setOptions(setOptionsAction) {
1653
+ var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
1654
+ cleanupModifierEffects();
1655
+ state.options = Object.assign({}, defaultOptions, state.options, options);
1656
+ state.scrollParents = {
1657
+ reference: isElement$1(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
1658
+ popper: listScrollParents(popper)
1659
+ }; // Orders the modifiers based on their dependencies and `phase`
1660
+ // properties
1661
+
1662
+ var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
1663
+
1664
+ state.orderedModifiers = orderedModifiers.filter(function (m) {
1665
+ return m.enabled;
1666
+ });
1667
+ runModifierEffects();
1668
+ return instance.update();
1669
+ },
1670
+ // Sync update – it will always be executed, even if not necessary. This
1671
+ // is useful for low frequency updates where sync behavior simplifies the
1672
+ // logic.
1673
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
1674
+ // prefer the async Popper#update method
1675
+ forceUpdate: function forceUpdate() {
1676
+ if (isDestroyed) {
1677
+ return;
1678
+ }
1679
+
1680
+ var _state$elements = state.elements,
1681
+ reference = _state$elements.reference,
1682
+ popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
1683
+ // anymore
1684
+
1685
+ if (!areValidElements(reference, popper)) {
1686
+ return;
1687
+ } // Store the reference and popper rects to be read by modifiers
1688
+
1689
+
1690
+ state.rects = {
1691
+ reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
1692
+ popper: getLayoutRect(popper)
1693
+ }; // Modifiers have the ability to reset the current update cycle. The
1694
+ // most common use case for this is the `flip` modifier changing the
1695
+ // placement, which then needs to re-run all the modifiers, because the
1696
+ // logic was previously ran for the previous placement and is therefore
1697
+ // stale/incorrect
1698
+
1699
+ state.reset = false;
1700
+ state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
1701
+ // is filled with the initial data specified by the modifier. This means
1702
+ // it doesn't persist and is fresh on each update.
1703
+ // To ensure persistent data, use `${name}#persistent`
1704
+
1705
+ state.orderedModifiers.forEach(function (modifier) {
1706
+ return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
1707
+ });
1708
+
1709
+ for (var index = 0; index < state.orderedModifiers.length; index++) {
1710
+ if (state.reset === true) {
1711
+ state.reset = false;
1712
+ index = -1;
1713
+ continue;
1714
+ }
1715
+
1716
+ var _state$orderedModifie = state.orderedModifiers[index],
1717
+ fn = _state$orderedModifie.fn,
1718
+ _state$orderedModifie2 = _state$orderedModifie.options,
1719
+ _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
1720
+ name = _state$orderedModifie.name;
1721
+
1722
+ if (typeof fn === 'function') {
1723
+ state = fn({
1724
+ state: state,
1725
+ options: _options,
1726
+ name: name,
1727
+ instance: instance
1728
+ }) || state;
1729
+ }
1730
+ }
1731
+ },
1732
+ // Async and optimistically optimized update – it will not be executed if
1733
+ // not necessary (debounced to run at most once-per-tick)
1734
+ update: debounce$1(function () {
1735
+ return new Promise(function (resolve) {
1736
+ instance.forceUpdate();
1737
+ resolve(state);
1738
+ });
1739
+ }),
1740
+ destroy: function destroy() {
1741
+ cleanupModifierEffects();
1742
+ isDestroyed = true;
1743
+ }
1744
+ };
1745
+
1746
+ if (!areValidElements(reference, popper)) {
1747
+ return instance;
1748
+ }
1749
+
1750
+ instance.setOptions(options).then(function (state) {
1751
+ if (!isDestroyed && options.onFirstUpdate) {
1752
+ options.onFirstUpdate(state);
1753
+ }
1754
+ }); // Modifiers have the ability to execute arbitrary code before the first
1755
+ // update cycle runs. They will be executed in the same order as the update
1756
+ // cycle. This is useful when a modifier adds some persistent data that
1757
+ // other modifiers need to use, but the modifier is run after the dependent
1758
+ // one.
1759
+
1760
+ function runModifierEffects() {
1761
+ state.orderedModifiers.forEach(function (_ref) {
1762
+ var name = _ref.name,
1763
+ _ref$options = _ref.options,
1764
+ options = _ref$options === void 0 ? {} : _ref$options,
1765
+ effect = _ref.effect;
1766
+
1767
+ if (typeof effect === 'function') {
1768
+ var cleanupFn = effect({
1769
+ state: state,
1770
+ name: name,
1771
+ instance: instance,
1772
+ options: options
1773
+ });
1774
+
1775
+ var noopFn = function noopFn() {};
1776
+
1777
+ effectCleanupFns.push(cleanupFn || noopFn);
1778
+ }
1779
+ });
1780
+ }
1781
+
1782
+ function cleanupModifierEffects() {
1783
+ effectCleanupFns.forEach(function (fn) {
1784
+ return fn();
1785
+ });
1786
+ effectCleanupFns = [];
1787
+ }
1788
+
1789
+ return instance;
1790
+ };
1791
+ }
1792
+
1793
+ var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
1794
+ var createPopper = /*#__PURE__*/popperGenerator({
1795
+ defaultModifiers: defaultModifiers
1796
+ }); // eslint-disable-next-line import/no-unused-modules
1797
+
1798
+ /**!
1799
+ * tippy.js v6.3.7
1800
+ * (c) 2017-2021 atomiks
1801
+ * MIT License
1802
+ */
1803
+ var BOX_CLASS = "tippy-box";
1804
+ var CONTENT_CLASS = "tippy-content";
1805
+ var BACKDROP_CLASS = "tippy-backdrop";
1806
+ var ARROW_CLASS = "tippy-arrow";
1807
+ var SVG_ARROW_CLASS = "tippy-svg-arrow";
1808
+ var TOUCH_OPTIONS = {
1809
+ passive: true,
1810
+ capture: true
1811
+ };
1812
+ var TIPPY_DEFAULT_APPEND_TO = function TIPPY_DEFAULT_APPEND_TO() {
1813
+ return document.body;
1814
+ };
1815
+
1816
+ function hasOwnProperty(obj, key) {
1817
+ return {}.hasOwnProperty.call(obj, key);
1818
+ }
1819
+ function getValueAtIndexOrReturn(value, index, defaultValue) {
1820
+ if (Array.isArray(value)) {
1821
+ var v = value[index];
1822
+ return v == null ? Array.isArray(defaultValue) ? defaultValue[index] : defaultValue : v;
1823
+ }
1824
+
1825
+ return value;
1826
+ }
1827
+ function isType(value, type) {
1828
+ var str = {}.toString.call(value);
1829
+ return str.indexOf('[object') === 0 && str.indexOf(type + "]") > -1;
1830
+ }
1831
+ function invokeWithArgsOrReturn(value, args) {
1832
+ return typeof value === 'function' ? value.apply(void 0, args) : value;
1833
+ }
1834
+ function debounce(fn, ms) {
1835
+ // Avoid wrapping in `setTimeout` if ms is 0 anyway
1836
+ if (ms === 0) {
1837
+ return fn;
1838
+ }
1839
+
1840
+ var timeout;
1841
+ return function (arg) {
1842
+ clearTimeout(timeout);
1843
+ timeout = setTimeout(function () {
1844
+ fn(arg);
1845
+ }, ms);
1846
+ };
1847
+ }
1848
+ function removeProperties(obj, keys) {
1849
+ var clone = Object.assign({}, obj);
1850
+ keys.forEach(function (key) {
1851
+ delete clone[key];
1852
+ });
1853
+ return clone;
1854
+ }
1855
+ function splitBySpaces(value) {
1856
+ return value.split(/\s+/).filter(Boolean);
1857
+ }
1858
+ function normalizeToArray(value) {
1859
+ return [].concat(value);
1860
+ }
1861
+ function pushIfUnique(arr, value) {
1862
+ if (arr.indexOf(value) === -1) {
1863
+ arr.push(value);
1864
+ }
1865
+ }
1866
+ function unique(arr) {
1867
+ return arr.filter(function (item, index) {
1868
+ return arr.indexOf(item) === index;
1869
+ });
1870
+ }
1871
+ function getBasePlacement(placement) {
1872
+ return placement.split('-')[0];
1873
+ }
1874
+ function arrayFrom(value) {
1875
+ return [].slice.call(value);
1876
+ }
1877
+ function removeUndefinedProps(obj) {
1878
+ return Object.keys(obj).reduce(function (acc, key) {
1879
+ if (obj[key] !== undefined) {
1880
+ acc[key] = obj[key];
1881
+ }
1882
+
1883
+ return acc;
1884
+ }, {});
1885
+ }
1886
+
1887
+ function div() {
1888
+ return document.createElement('div');
1889
+ }
1890
+ function isElement(value) {
1891
+ return ['Element', 'Fragment'].some(function (type) {
1892
+ return isType(value, type);
1893
+ });
1894
+ }
1895
+ function isNodeList(value) {
1896
+ return isType(value, 'NodeList');
1897
+ }
1898
+ function isMouseEvent(value) {
1899
+ return isType(value, 'MouseEvent');
1900
+ }
1901
+ function isReferenceElement(value) {
1902
+ return !!(value && value._tippy && value._tippy.reference === value);
1903
+ }
1904
+ function getArrayOfElements(value) {
1905
+ if (isElement(value)) {
1906
+ return [value];
1907
+ }
1908
+
1909
+ if (isNodeList(value)) {
1910
+ return arrayFrom(value);
1911
+ }
1912
+
1913
+ if (Array.isArray(value)) {
1914
+ return value;
1915
+ }
1916
+
1917
+ return arrayFrom(document.querySelectorAll(value));
1918
+ }
1919
+ function setTransitionDuration(els, value) {
1920
+ els.forEach(function (el) {
1921
+ if (el) {
1922
+ el.style.transitionDuration = value + "ms";
1923
+ }
1924
+ });
1925
+ }
1926
+ function setVisibilityState(els, state) {
1927
+ els.forEach(function (el) {
1928
+ if (el) {
1929
+ el.setAttribute('data-state', state);
1930
+ }
1931
+ });
1932
+ }
1933
+ function getOwnerDocument(elementOrElements) {
1934
+ var _element$ownerDocumen;
1935
+
1936
+ var _normalizeToArray = normalizeToArray(elementOrElements),
1937
+ element = _normalizeToArray[0]; // Elements created via a <template> have an ownerDocument with no reference to the body
1938
+
1939
+
1940
+ return element != null && (_element$ownerDocumen = element.ownerDocument) != null && _element$ownerDocumen.body ? element.ownerDocument : document;
1941
+ }
1942
+ function isCursorOutsideInteractiveBorder(popperTreeData, event) {
1943
+ var clientX = event.clientX,
1944
+ clientY = event.clientY;
1945
+ return popperTreeData.every(function (_ref) {
1946
+ var popperRect = _ref.popperRect,
1947
+ popperState = _ref.popperState,
1948
+ props = _ref.props;
1949
+ var interactiveBorder = props.interactiveBorder;
1950
+ var basePlacement = getBasePlacement(popperState.placement);
1951
+ var offsetData = popperState.modifiersData.offset;
1952
+
1953
+ if (!offsetData) {
1954
+ return true;
1955
+ }
1956
+
1957
+ var topDistance = basePlacement === 'bottom' ? offsetData.top.y : 0;
1958
+ var bottomDistance = basePlacement === 'top' ? offsetData.bottom.y : 0;
1959
+ var leftDistance = basePlacement === 'right' ? offsetData.left.x : 0;
1960
+ var rightDistance = basePlacement === 'left' ? offsetData.right.x : 0;
1961
+ var exceedsTop = popperRect.top - clientY + topDistance > interactiveBorder;
1962
+ var exceedsBottom = clientY - popperRect.bottom - bottomDistance > interactiveBorder;
1963
+ var exceedsLeft = popperRect.left - clientX + leftDistance > interactiveBorder;
1964
+ var exceedsRight = clientX - popperRect.right - rightDistance > interactiveBorder;
1965
+ return exceedsTop || exceedsBottom || exceedsLeft || exceedsRight;
1966
+ });
1967
+ }
1968
+ function updateTransitionEndListener(box, action, listener) {
1969
+ var method = action + "EventListener"; // some browsers apparently support `transition` (unprefixed) but only fire
1970
+ // `webkitTransitionEnd`...
1971
+
1972
+ ['transitionend', 'webkitTransitionEnd'].forEach(function (event) {
1973
+ box[method](event, listener);
1974
+ });
1975
+ }
1976
+ /**
1977
+ * Compared to xxx.contains, this function works for dom structures with shadow
1978
+ * dom
1979
+ */
1980
+
1981
+ function actualContains(parent, child) {
1982
+ var target = child;
1983
+
1984
+ while (target) {
1985
+ var _target$getRootNode;
1986
+
1987
+ if (parent.contains(target)) {
1988
+ return true;
1989
+ }
1990
+
1991
+ target = target.getRootNode == null ? void 0 : (_target$getRootNode = target.getRootNode()) == null ? void 0 : _target$getRootNode.host;
1992
+ }
1993
+
1994
+ return false;
1995
+ }
1996
+
1997
+ var currentInput = {
1998
+ isTouch: false
1999
+ };
2000
+ var lastMouseMoveTime = 0;
2001
+ /**
2002
+ * When a `touchstart` event is fired, it's assumed the user is using touch
2003
+ * input. We'll bind a `mousemove` event listener to listen for mouse input in
2004
+ * the future. This way, the `isTouch` property is fully dynamic and will handle
2005
+ * hybrid devices that use a mix of touch + mouse input.
2006
+ */
2007
+
2008
+ function onDocumentTouchStart() {
2009
+ if (currentInput.isTouch) {
2010
+ return;
2011
+ }
2012
+
2013
+ currentInput.isTouch = true;
2014
+
2015
+ if (window.performance) {
2016
+ document.addEventListener('mousemove', onDocumentMouseMove);
2017
+ }
2018
+ }
2019
+ /**
2020
+ * When two `mousemove` event are fired consecutively within 20ms, it's assumed
2021
+ * the user is using mouse input again. `mousemove` can fire on touch devices as
2022
+ * well, but very rarely that quickly.
2023
+ */
2024
+
2025
+ function onDocumentMouseMove() {
2026
+ var now = performance.now();
2027
+
2028
+ if (now - lastMouseMoveTime < 20) {
2029
+ currentInput.isTouch = false;
2030
+ document.removeEventListener('mousemove', onDocumentMouseMove);
2031
+ }
2032
+
2033
+ lastMouseMoveTime = now;
2034
+ }
2035
+ /**
2036
+ * When an element is in focus and has a tippy, leaving the tab/window and
2037
+ * returning causes it to show again. For mouse users this is unexpected, but
2038
+ * for keyboard use it makes sense.
2039
+ * TODO: find a better technique to solve this problem
2040
+ */
2041
+
2042
+ function onWindowBlur() {
2043
+ var activeElement = document.activeElement;
2044
+
2045
+ if (isReferenceElement(activeElement)) {
2046
+ var instance = activeElement._tippy;
2047
+
2048
+ if (activeElement.blur && !instance.state.isVisible) {
2049
+ activeElement.blur();
2050
+ }
2051
+ }
2052
+ }
2053
+ function bindGlobalEventListeners() {
2054
+ document.addEventListener('touchstart', onDocumentTouchStart, TOUCH_OPTIONS);
2055
+ window.addEventListener('blur', onWindowBlur);
2056
+ }
2057
+
2058
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
2059
+ var isIE11 = isBrowser ? // @ts-ignore
2060
+ !!window.msCrypto : false;
2061
+
2062
+ function createMemoryLeakWarning(method) {
2063
+ var txt = method === 'destroy' ? 'n already-' : ' ';
2064
+ return [method + "() was called on a" + txt + "destroyed instance. This is a no-op but", 'indicates a potential memory leak.'].join(' ');
2065
+ }
2066
+ function clean(value) {
2067
+ var spacesAndTabs = /[ \t]{2,}/g;
2068
+ var lineStartWithSpaces = /^[ \t]*/gm;
2069
+ return value.replace(spacesAndTabs, ' ').replace(lineStartWithSpaces, '').trim();
2070
+ }
2071
+
2072
+ function getDevMessage(message) {
2073
+ return clean("\n %ctippy.js\n\n %c" + clean(message) + "\n\n %c\uD83D\uDC77\u200D This is a development-only message. It will be removed in production.\n ");
2074
+ }
2075
+
2076
+ function getFormattedMessage(message) {
2077
+ return [getDevMessage(message), // title
2078
+ 'color: #00C584; font-size: 1.3em; font-weight: bold;', // message
2079
+ 'line-height: 1.5', // footer
2080
+ 'color: #a6a095;'];
2081
+ } // Assume warnings and errors never have the same message
2082
+
2083
+ var visitedMessages;
2084
+
2085
+ if (process.env.NODE_ENV !== "production") {
2086
+ resetVisitedMessages();
2087
+ }
2088
+
2089
+ function resetVisitedMessages() {
2090
+ visitedMessages = new Set();
2091
+ }
2092
+ function warnWhen(condition, message) {
2093
+ if (condition && !visitedMessages.has(message)) {
2094
+ var _console;
2095
+
2096
+ visitedMessages.add(message);
2097
+
2098
+ (_console = console).warn.apply(_console, getFormattedMessage(message));
2099
+ }
2100
+ }
2101
+ function errorWhen(condition, message) {
2102
+ if (condition && !visitedMessages.has(message)) {
2103
+ var _console2;
2104
+
2105
+ visitedMessages.add(message);
2106
+
2107
+ (_console2 = console).error.apply(_console2, getFormattedMessage(message));
2108
+ }
2109
+ }
2110
+ function validateTargets(targets) {
2111
+ var didPassFalsyValue = !targets;
2112
+ var didPassPlainObject = Object.prototype.toString.call(targets) === '[object Object]' && !targets.addEventListener;
2113
+ errorWhen(didPassFalsyValue, ['tippy() was passed', '`' + String(targets) + '`', 'as its targets (first) argument. Valid types are: String, Element,', 'Element[], or NodeList.'].join(' '));
2114
+ errorWhen(didPassPlainObject, ['tippy() was passed a plain object which is not supported as an argument', 'for virtual positioning. Use props.getReferenceClientRect instead.'].join(' '));
2115
+ }
2116
+
2117
+ var pluginProps = {
2118
+ animateFill: false,
2119
+ followCursor: false,
2120
+ inlinePositioning: false,
2121
+ sticky: false
2122
+ };
2123
+ var renderProps = {
2124
+ allowHTML: false,
2125
+ animation: 'fade',
2126
+ arrow: true,
2127
+ content: '',
2128
+ inertia: false,
2129
+ maxWidth: 350,
2130
+ role: 'tooltip',
2131
+ theme: '',
2132
+ zIndex: 9999
2133
+ };
2134
+ var defaultProps = Object.assign({
2135
+ appendTo: TIPPY_DEFAULT_APPEND_TO,
2136
+ aria: {
2137
+ content: 'auto',
2138
+ expanded: 'auto'
2139
+ },
2140
+ delay: 0,
2141
+ duration: [300, 250],
2142
+ getReferenceClientRect: null,
2143
+ hideOnClick: true,
2144
+ ignoreAttributes: false,
2145
+ interactive: false,
2146
+ interactiveBorder: 2,
2147
+ interactiveDebounce: 0,
2148
+ moveTransition: '',
2149
+ offset: [0, 10],
2150
+ onAfterUpdate: function onAfterUpdate() {},
2151
+ onBeforeUpdate: function onBeforeUpdate() {},
2152
+ onCreate: function onCreate() {},
2153
+ onDestroy: function onDestroy() {},
2154
+ onHidden: function onHidden() {},
2155
+ onHide: function onHide() {},
2156
+ onMount: function onMount() {},
2157
+ onShow: function onShow() {},
2158
+ onShown: function onShown() {},
2159
+ onTrigger: function onTrigger() {},
2160
+ onUntrigger: function onUntrigger() {},
2161
+ onClickOutside: function onClickOutside() {},
2162
+ placement: 'top',
2163
+ plugins: [],
2164
+ popperOptions: {},
2165
+ render: null,
2166
+ showOnCreate: false,
2167
+ touch: true,
2168
+ trigger: 'mouseenter focus',
2169
+ triggerTarget: null
2170
+ }, pluginProps, renderProps);
2171
+ var defaultKeys = Object.keys(defaultProps);
2172
+ var setDefaultProps = function setDefaultProps(partialProps) {
2173
+ /* istanbul ignore else */
2174
+ if (process.env.NODE_ENV !== "production") {
2175
+ validateProps(partialProps, []);
2176
+ }
2177
+
2178
+ var keys = Object.keys(partialProps);
2179
+ keys.forEach(function (key) {
2180
+ defaultProps[key] = partialProps[key];
2181
+ });
2182
+ };
2183
+ function getExtendedPassedProps(passedProps) {
2184
+ var plugins = passedProps.plugins || [];
2185
+ var pluginProps = plugins.reduce(function (acc, plugin) {
2186
+ var name = plugin.name,
2187
+ defaultValue = plugin.defaultValue;
2188
+
2189
+ if (name) {
2190
+ var _name;
2191
+
2192
+ acc[name] = passedProps[name] !== undefined ? passedProps[name] : (_name = defaultProps[name]) != null ? _name : defaultValue;
2193
+ }
2194
+
2195
+ return acc;
2196
+ }, {});
2197
+ return Object.assign({}, passedProps, pluginProps);
2198
+ }
2199
+ function getDataAttributeProps(reference, plugins) {
2200
+ var propKeys = plugins ? Object.keys(getExtendedPassedProps(Object.assign({}, defaultProps, {
2201
+ plugins: plugins
2202
+ }))) : defaultKeys;
2203
+ var props = propKeys.reduce(function (acc, key) {
2204
+ var valueAsString = (reference.getAttribute("data-tippy-" + key) || '').trim();
2205
+
2206
+ if (!valueAsString) {
2207
+ return acc;
2208
+ }
2209
+
2210
+ if (key === 'content') {
2211
+ acc[key] = valueAsString;
2212
+ } else {
2213
+ try {
2214
+ acc[key] = JSON.parse(valueAsString);
2215
+ } catch (e) {
2216
+ acc[key] = valueAsString;
2217
+ }
2218
+ }
2219
+
2220
+ return acc;
2221
+ }, {});
2222
+ return props;
2223
+ }
2224
+ function evaluateProps(reference, props) {
2225
+ var out = Object.assign({}, props, {
2226
+ content: invokeWithArgsOrReturn(props.content, [reference])
2227
+ }, props.ignoreAttributes ? {} : getDataAttributeProps(reference, props.plugins));
2228
+ out.aria = Object.assign({}, defaultProps.aria, out.aria);
2229
+ out.aria = {
2230
+ expanded: out.aria.expanded === 'auto' ? props.interactive : out.aria.expanded,
2231
+ content: out.aria.content === 'auto' ? props.interactive ? null : 'describedby' : out.aria.content
2232
+ };
2233
+ return out;
2234
+ }
2235
+ function validateProps(partialProps, plugins) {
2236
+ if (partialProps === void 0) {
2237
+ partialProps = {};
2238
+ }
2239
+
2240
+ if (plugins === void 0) {
2241
+ plugins = [];
2242
+ }
2243
+
2244
+ var keys = Object.keys(partialProps);
2245
+ keys.forEach(function (prop) {
2246
+ var nonPluginProps = removeProperties(defaultProps, Object.keys(pluginProps));
2247
+ var didPassUnknownProp = !hasOwnProperty(nonPluginProps, prop); // Check if the prop exists in `plugins`
2248
+
2249
+ if (didPassUnknownProp) {
2250
+ didPassUnknownProp = plugins.filter(function (plugin) {
2251
+ return plugin.name === prop;
2252
+ }).length === 0;
2253
+ }
2254
+
2255
+ warnWhen(didPassUnknownProp, ["`" + prop + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", 'a plugin, forgot to pass it in an array as props.plugins.', '\n\n', 'All props: https://atomiks.github.io/tippyjs/v6/all-props/\n', 'Plugins: https://atomiks.github.io/tippyjs/v6/plugins/'].join(' '));
2256
+ });
2257
+ }
2258
+
2259
+ var innerHTML = function innerHTML() {
2260
+ return 'innerHTML';
2261
+ };
2262
+
2263
+ function dangerouslySetInnerHTML(element, html) {
2264
+ element[innerHTML()] = html;
2265
+ }
2266
+
2267
+ function createArrowElement(value) {
2268
+ var arrow = div();
2269
+
2270
+ if (value === true) {
2271
+ arrow.className = ARROW_CLASS;
2272
+ } else {
2273
+ arrow.className = SVG_ARROW_CLASS;
2274
+
2275
+ if (isElement(value)) {
2276
+ arrow.appendChild(value);
2277
+ } else {
2278
+ dangerouslySetInnerHTML(arrow, value);
2279
+ }
2280
+ }
2281
+
2282
+ return arrow;
2283
+ }
2284
+
2285
+ function setContent(content, props) {
2286
+ if (isElement(props.content)) {
2287
+ dangerouslySetInnerHTML(content, '');
2288
+ content.appendChild(props.content);
2289
+ } else if (typeof props.content !== 'function') {
2290
+ if (props.allowHTML) {
2291
+ dangerouslySetInnerHTML(content, props.content);
2292
+ } else {
2293
+ content.textContent = props.content;
2294
+ }
2295
+ }
2296
+ }
2297
+ function getChildren(popper) {
2298
+ var box = popper.firstElementChild;
2299
+ var boxChildren = arrayFrom(box.children);
2300
+ return {
2301
+ box: box,
2302
+ content: boxChildren.find(function (node) {
2303
+ return node.classList.contains(CONTENT_CLASS);
2304
+ }),
2305
+ arrow: boxChildren.find(function (node) {
2306
+ return node.classList.contains(ARROW_CLASS) || node.classList.contains(SVG_ARROW_CLASS);
2307
+ }),
2308
+ backdrop: boxChildren.find(function (node) {
2309
+ return node.classList.contains(BACKDROP_CLASS);
2310
+ })
2311
+ };
2312
+ }
2313
+ function render(instance) {
2314
+ var popper = div();
2315
+ var box = div();
2316
+ box.className = BOX_CLASS;
2317
+ box.setAttribute('data-state', 'hidden');
2318
+ box.setAttribute('tabindex', '-1');
2319
+ var content = div();
2320
+ content.className = CONTENT_CLASS;
2321
+ content.setAttribute('data-state', 'hidden');
2322
+ setContent(content, instance.props);
2323
+ popper.appendChild(box);
2324
+ box.appendChild(content);
2325
+ onUpdate(instance.props, instance.props);
2326
+
2327
+ function onUpdate(prevProps, nextProps) {
2328
+ var _getChildren = getChildren(popper),
2329
+ box = _getChildren.box,
2330
+ content = _getChildren.content,
2331
+ arrow = _getChildren.arrow;
2332
+
2333
+ if (nextProps.theme) {
2334
+ box.setAttribute('data-theme', nextProps.theme);
2335
+ } else {
2336
+ box.removeAttribute('data-theme');
2337
+ }
2338
+
2339
+ if (typeof nextProps.animation === 'string') {
2340
+ box.setAttribute('data-animation', nextProps.animation);
2341
+ } else {
2342
+ box.removeAttribute('data-animation');
2343
+ }
2344
+
2345
+ if (nextProps.inertia) {
2346
+ box.setAttribute('data-inertia', '');
2347
+ } else {
2348
+ box.removeAttribute('data-inertia');
2349
+ }
2350
+
2351
+ box.style.maxWidth = typeof nextProps.maxWidth === 'number' ? nextProps.maxWidth + "px" : nextProps.maxWidth;
2352
+
2353
+ if (nextProps.role) {
2354
+ box.setAttribute('role', nextProps.role);
2355
+ } else {
2356
+ box.removeAttribute('role');
2357
+ }
2358
+
2359
+ if (prevProps.content !== nextProps.content || prevProps.allowHTML !== nextProps.allowHTML) {
2360
+ setContent(content, instance.props);
2361
+ }
2362
+
2363
+ if (nextProps.arrow) {
2364
+ if (!arrow) {
2365
+ box.appendChild(createArrowElement(nextProps.arrow));
2366
+ } else if (prevProps.arrow !== nextProps.arrow) {
2367
+ box.removeChild(arrow);
2368
+ box.appendChild(createArrowElement(nextProps.arrow));
2369
+ }
2370
+ } else if (arrow) {
2371
+ box.removeChild(arrow);
2372
+ }
2373
+ }
2374
+
2375
+ return {
2376
+ popper: popper,
2377
+ onUpdate: onUpdate
2378
+ };
2379
+ } // Runtime check to identify if the render function is the default one; this
2380
+ // way we can apply default CSS transitions logic and it can be tree-shaken away
2381
+
2382
+ render.$$tippy = true;
2383
+
2384
+ var idCounter = 1;
2385
+ var mouseMoveListeners = []; // Used by `hideAll()`
2386
+
2387
+ var mountedInstances = [];
2388
+ function createTippy(reference, passedProps) {
2389
+ var props = evaluateProps(reference, Object.assign({}, defaultProps, getExtendedPassedProps(removeUndefinedProps(passedProps)))); // ===========================================================================
2390
+ // 🔒 Private members
2391
+ // ===========================================================================
2392
+
2393
+ var showTimeout;
2394
+ var hideTimeout;
2395
+ var scheduleHideAnimationFrame;
2396
+ var isVisibleFromClick = false;
2397
+ var didHideDueToDocumentMouseDown = false;
2398
+ var didTouchMove = false;
2399
+ var ignoreOnFirstUpdate = false;
2400
+ var lastTriggerEvent;
2401
+ var currentTransitionEndListener;
2402
+ var onFirstUpdate;
2403
+ var listeners = [];
2404
+ var debouncedOnMouseMove = debounce(onMouseMove, props.interactiveDebounce);
2405
+ var currentTarget; // ===========================================================================
2406
+ // 🔑 Public members
2407
+ // ===========================================================================
2408
+
2409
+ var id = idCounter++;
2410
+ var popperInstance = null;
2411
+ var plugins = unique(props.plugins);
2412
+ var state = {
2413
+ // Is the instance currently enabled?
2414
+ isEnabled: true,
2415
+ // Is the tippy currently showing and not transitioning out?
2416
+ isVisible: false,
2417
+ // Has the instance been destroyed?
2418
+ isDestroyed: false,
2419
+ // Is the tippy currently mounted to the DOM?
2420
+ isMounted: false,
2421
+ // Has the tippy finished transitioning in?
2422
+ isShown: false
2423
+ };
2424
+ var instance = {
2425
+ // properties
2426
+ id: id,
2427
+ reference: reference,
2428
+ popper: div(),
2429
+ popperInstance: popperInstance,
2430
+ props: props,
2431
+ state: state,
2432
+ plugins: plugins,
2433
+ // methods
2434
+ clearDelayTimeouts: clearDelayTimeouts,
2435
+ setProps: setProps,
2436
+ setContent: setContent,
2437
+ show: show,
2438
+ hide: hide,
2439
+ hideWithInteractivity: hideWithInteractivity,
2440
+ enable: enable,
2441
+ disable: disable,
2442
+ unmount: unmount,
2443
+ destroy: destroy
2444
+ }; // TODO: Investigate why this early return causes a TDZ error in the tests —
2445
+ // it doesn't seem to happen in the browser
2446
+
2447
+ /* istanbul ignore if */
2448
+
2449
+ if (!props.render) {
2450
+ if (process.env.NODE_ENV !== "production") {
2451
+ errorWhen(true, 'render() function has not been supplied.');
2452
+ }
2453
+
2454
+ return instance;
2455
+ } // ===========================================================================
2456
+ // Initial mutations
2457
+ // ===========================================================================
2458
+
2459
+
2460
+ var _props$render = props.render(instance),
2461
+ popper = _props$render.popper,
2462
+ onUpdate = _props$render.onUpdate;
2463
+
2464
+ popper.setAttribute('data-tippy-root', '');
2465
+ popper.id = "tippy-" + instance.id;
2466
+ instance.popper = popper;
2467
+ reference._tippy = instance;
2468
+ popper._tippy = instance;
2469
+ var pluginsHooks = plugins.map(function (plugin) {
2470
+ return plugin.fn(instance);
2471
+ });
2472
+ var hasAriaExpanded = reference.hasAttribute('aria-expanded');
2473
+ addListeners();
2474
+ handleAriaExpandedAttribute();
2475
+ handleStyles();
2476
+ invokeHook('onCreate', [instance]);
2477
+
2478
+ if (props.showOnCreate) {
2479
+ scheduleShow();
2480
+ } // Prevent a tippy with a delay from hiding if the cursor left then returned
2481
+ // before it started hiding
2482
+
2483
+
2484
+ popper.addEventListener('mouseenter', function () {
2485
+ if (instance.props.interactive && instance.state.isVisible) {
2486
+ instance.clearDelayTimeouts();
2487
+ }
2488
+ });
2489
+ popper.addEventListener('mouseleave', function () {
2490
+ if (instance.props.interactive && instance.props.trigger.indexOf('mouseenter') >= 0) {
2491
+ getDocument().addEventListener('mousemove', debouncedOnMouseMove);
2492
+ }
2493
+ });
2494
+ return instance; // ===========================================================================
2495
+ // 🔒 Private methods
2496
+ // ===========================================================================
2497
+
2498
+ function getNormalizedTouchSettings() {
2499
+ var touch = instance.props.touch;
2500
+ return Array.isArray(touch) ? touch : [touch, 0];
2501
+ }
2502
+
2503
+ function getIsCustomTouchBehavior() {
2504
+ return getNormalizedTouchSettings()[0] === 'hold';
2505
+ }
2506
+
2507
+ function getIsDefaultRenderFn() {
2508
+ var _instance$props$rende;
2509
+
2510
+ // @ts-ignore
2511
+ return !!((_instance$props$rende = instance.props.render) != null && _instance$props$rende.$$tippy);
2512
+ }
2513
+
2514
+ function getCurrentTarget() {
2515
+ return currentTarget || reference;
2516
+ }
2517
+
2518
+ function getDocument() {
2519
+ var parent = getCurrentTarget().parentNode;
2520
+ return parent ? getOwnerDocument(parent) : document;
2521
+ }
2522
+
2523
+ function getDefaultTemplateChildren() {
2524
+ return getChildren(popper);
2525
+ }
2526
+
2527
+ function getDelay(isShow) {
2528
+ // For touch or keyboard input, force `0` delay for UX reasons
2529
+ // Also if the instance is mounted but not visible (transitioning out),
2530
+ // ignore delay
2531
+ if (instance.state.isMounted && !instance.state.isVisible || currentInput.isTouch || lastTriggerEvent && lastTriggerEvent.type === 'focus') {
2532
+ return 0;
2533
+ }
2534
+
2535
+ return getValueAtIndexOrReturn(instance.props.delay, isShow ? 0 : 1, defaultProps.delay);
2536
+ }
2537
+
2538
+ function handleStyles(fromHide) {
2539
+ if (fromHide === void 0) {
2540
+ fromHide = false;
2541
+ }
2542
+
2543
+ popper.style.pointerEvents = instance.props.interactive && !fromHide ? '' : 'none';
2544
+ popper.style.zIndex = "" + instance.props.zIndex;
2545
+ }
2546
+
2547
+ function invokeHook(hook, args, shouldInvokePropsHook) {
2548
+ if (shouldInvokePropsHook === void 0) {
2549
+ shouldInvokePropsHook = true;
2550
+ }
2551
+
2552
+ pluginsHooks.forEach(function (pluginHooks) {
2553
+ if (pluginHooks[hook]) {
2554
+ pluginHooks[hook].apply(pluginHooks, args);
2555
+ }
2556
+ });
2557
+
2558
+ if (shouldInvokePropsHook) {
2559
+ var _instance$props;
2560
+
2561
+ (_instance$props = instance.props)[hook].apply(_instance$props, args);
2562
+ }
2563
+ }
2564
+
2565
+ function handleAriaContentAttribute() {
2566
+ var aria = instance.props.aria;
2567
+
2568
+ if (!aria.content) {
2569
+ return;
2570
+ }
2571
+
2572
+ var attr = "aria-" + aria.content;
2573
+ var id = popper.id;
2574
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
2575
+ nodes.forEach(function (node) {
2576
+ var currentValue = node.getAttribute(attr);
2577
+
2578
+ if (instance.state.isVisible) {
2579
+ node.setAttribute(attr, currentValue ? currentValue + " " + id : id);
2580
+ } else {
2581
+ var nextValue = currentValue && currentValue.replace(id, '').trim();
2582
+
2583
+ if (nextValue) {
2584
+ node.setAttribute(attr, nextValue);
2585
+ } else {
2586
+ node.removeAttribute(attr);
2587
+ }
2588
+ }
2589
+ });
2590
+ }
2591
+
2592
+ function handleAriaExpandedAttribute() {
2593
+ if (hasAriaExpanded || !instance.props.aria.expanded) {
2594
+ return;
2595
+ }
2596
+
2597
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
2598
+ nodes.forEach(function (node) {
2599
+ if (instance.props.interactive) {
2600
+ node.setAttribute('aria-expanded', instance.state.isVisible && node === getCurrentTarget() ? 'true' : 'false');
2601
+ } else {
2602
+ node.removeAttribute('aria-expanded');
2603
+ }
2604
+ });
2605
+ }
2606
+
2607
+ function cleanupInteractiveMouseListeners() {
2608
+ getDocument().removeEventListener('mousemove', debouncedOnMouseMove);
2609
+ mouseMoveListeners = mouseMoveListeners.filter(function (listener) {
2610
+ return listener !== debouncedOnMouseMove;
2611
+ });
2612
+ }
2613
+
2614
+ function onDocumentPress(event) {
2615
+ // Moved finger to scroll instead of an intentional tap outside
2616
+ if (currentInput.isTouch) {
2617
+ if (didTouchMove || event.type === 'mousedown') {
2618
+ return;
2619
+ }
2620
+ }
2621
+
2622
+ var actualTarget = event.composedPath && event.composedPath()[0] || event.target; // Clicked on interactive popper
2623
+
2624
+ if (instance.props.interactive && actualContains(popper, actualTarget)) {
2625
+ return;
2626
+ } // Clicked on the event listeners target
2627
+
2628
+
2629
+ if (normalizeToArray(instance.props.triggerTarget || reference).some(function (el) {
2630
+ return actualContains(el, actualTarget);
2631
+ })) {
2632
+ if (currentInput.isTouch) {
2633
+ return;
2634
+ }
2635
+
2636
+ if (instance.state.isVisible && instance.props.trigger.indexOf('click') >= 0) {
2637
+ return;
2638
+ }
2639
+ } else {
2640
+ invokeHook('onClickOutside', [instance, event]);
2641
+ }
2642
+
2643
+ if (instance.props.hideOnClick === true) {
2644
+ instance.clearDelayTimeouts();
2645
+ instance.hide(); // `mousedown` event is fired right before `focus` if pressing the
2646
+ // currentTarget. This lets a tippy with `focus` trigger know that it
2647
+ // should not show
2648
+
2649
+ didHideDueToDocumentMouseDown = true;
2650
+ setTimeout(function () {
2651
+ didHideDueToDocumentMouseDown = false;
2652
+ }); // The listener gets added in `scheduleShow()`, but this may be hiding it
2653
+ // before it shows, and hide()'s early bail-out behavior can prevent it
2654
+ // from being cleaned up
2655
+
2656
+ if (!instance.state.isMounted) {
2657
+ removeDocumentPress();
2658
+ }
2659
+ }
2660
+ }
2661
+
2662
+ function onTouchMove() {
2663
+ didTouchMove = true;
2664
+ }
2665
+
2666
+ function onTouchStart() {
2667
+ didTouchMove = false;
2668
+ }
2669
+
2670
+ function addDocumentPress() {
2671
+ var doc = getDocument();
2672
+ doc.addEventListener('mousedown', onDocumentPress, true);
2673
+ doc.addEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);
2674
+ doc.addEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);
2675
+ doc.addEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);
2676
+ }
2677
+
2678
+ function removeDocumentPress() {
2679
+ var doc = getDocument();
2680
+ doc.removeEventListener('mousedown', onDocumentPress, true);
2681
+ doc.removeEventListener('touchend', onDocumentPress, TOUCH_OPTIONS);
2682
+ doc.removeEventListener('touchstart', onTouchStart, TOUCH_OPTIONS);
2683
+ doc.removeEventListener('touchmove', onTouchMove, TOUCH_OPTIONS);
2684
+ }
2685
+
2686
+ function onTransitionedOut(duration, callback) {
2687
+ onTransitionEnd(duration, function () {
2688
+ if (!instance.state.isVisible && popper.parentNode && popper.parentNode.contains(popper)) {
2689
+ callback();
2690
+ }
2691
+ });
2692
+ }
2693
+
2694
+ function onTransitionedIn(duration, callback) {
2695
+ onTransitionEnd(duration, callback);
2696
+ }
2697
+
2698
+ function onTransitionEnd(duration, callback) {
2699
+ var box = getDefaultTemplateChildren().box;
2700
+
2701
+ function listener(event) {
2702
+ if (event.target === box) {
2703
+ updateTransitionEndListener(box, 'remove', listener);
2704
+ callback();
2705
+ }
2706
+ } // Make callback synchronous if duration is 0
2707
+ // `transitionend` won't fire otherwise
2708
+
2709
+
2710
+ if (duration === 0) {
2711
+ return callback();
2712
+ }
2713
+
2714
+ updateTransitionEndListener(box, 'remove', currentTransitionEndListener);
2715
+ updateTransitionEndListener(box, 'add', listener);
2716
+ currentTransitionEndListener = listener;
2717
+ }
2718
+
2719
+ function on(eventType, handler, options) {
2720
+ if (options === void 0) {
2721
+ options = false;
2722
+ }
2723
+
2724
+ var nodes = normalizeToArray(instance.props.triggerTarget || reference);
2725
+ nodes.forEach(function (node) {
2726
+ node.addEventListener(eventType, handler, options);
2727
+ listeners.push({
2728
+ node: node,
2729
+ eventType: eventType,
2730
+ handler: handler,
2731
+ options: options
2732
+ });
2733
+ });
2734
+ }
2735
+
2736
+ function addListeners() {
2737
+ if (getIsCustomTouchBehavior()) {
2738
+ on('touchstart', onTrigger, {
2739
+ passive: true
2740
+ });
2741
+ on('touchend', onMouseLeave, {
2742
+ passive: true
2743
+ });
2744
+ }
2745
+
2746
+ splitBySpaces(instance.props.trigger).forEach(function (eventType) {
2747
+ if (eventType === 'manual') {
2748
+ return;
2749
+ }
2750
+
2751
+ on(eventType, onTrigger);
2752
+
2753
+ switch (eventType) {
2754
+ case 'mouseenter':
2755
+ on('mouseleave', onMouseLeave);
2756
+ break;
2757
+
2758
+ case 'focus':
2759
+ on(isIE11 ? 'focusout' : 'blur', onBlurOrFocusOut);
2760
+ break;
2761
+
2762
+ case 'focusin':
2763
+ on('focusout', onBlurOrFocusOut);
2764
+ break;
2765
+ }
2766
+ });
2767
+ }
2768
+
2769
+ function removeListeners() {
2770
+ listeners.forEach(function (_ref) {
2771
+ var node = _ref.node,
2772
+ eventType = _ref.eventType,
2773
+ handler = _ref.handler,
2774
+ options = _ref.options;
2775
+ node.removeEventListener(eventType, handler, options);
2776
+ });
2777
+ listeners = [];
2778
+ }
2779
+
2780
+ function onTrigger(event) {
2781
+ var _lastTriggerEvent;
2782
+
2783
+ var shouldScheduleClickHide = false;
2784
+
2785
+ if (!instance.state.isEnabled || isEventListenerStopped(event) || didHideDueToDocumentMouseDown) {
2786
+ return;
2787
+ }
2788
+
2789
+ var wasFocused = ((_lastTriggerEvent = lastTriggerEvent) == null ? void 0 : _lastTriggerEvent.type) === 'focus';
2790
+ lastTriggerEvent = event;
2791
+ currentTarget = event.currentTarget;
2792
+ handleAriaExpandedAttribute();
2793
+
2794
+ if (!instance.state.isVisible && isMouseEvent(event)) {
2795
+ // If scrolling, `mouseenter` events can be fired if the cursor lands
2796
+ // over a new target, but `mousemove` events don't get fired. This
2797
+ // causes interactive tooltips to get stuck open until the cursor is
2798
+ // moved
2799
+ mouseMoveListeners.forEach(function (listener) {
2800
+ return listener(event);
2801
+ });
2802
+ } // Toggle show/hide when clicking click-triggered tooltips
2803
+
2804
+
2805
+ if (event.type === 'click' && (instance.props.trigger.indexOf('mouseenter') < 0 || isVisibleFromClick) && instance.props.hideOnClick !== false && instance.state.isVisible) {
2806
+ shouldScheduleClickHide = true;
2807
+ } else {
2808
+ scheduleShow(event);
2809
+ }
2810
+
2811
+ if (event.type === 'click') {
2812
+ isVisibleFromClick = !shouldScheduleClickHide;
2813
+ }
2814
+
2815
+ if (shouldScheduleClickHide && !wasFocused) {
2816
+ scheduleHide(event);
2817
+ }
2818
+ }
2819
+
2820
+ function onMouseMove(event) {
2821
+ var target = event.target;
2822
+ var isCursorOverReferenceOrPopper = getCurrentTarget().contains(target) || popper.contains(target);
2823
+
2824
+ if (event.type === 'mousemove' && isCursorOverReferenceOrPopper) {
2825
+ return;
2826
+ }
2827
+
2828
+ var popperTreeData = getNestedPopperTree().concat(popper).map(function (popper) {
2829
+ var _instance$popperInsta;
2830
+
2831
+ var instance = popper._tippy;
2832
+ var state = (_instance$popperInsta = instance.popperInstance) == null ? void 0 : _instance$popperInsta.state;
2833
+
2834
+ if (state) {
2835
+ return {
2836
+ popperRect: popper.getBoundingClientRect(),
2837
+ popperState: state,
2838
+ props: props
2839
+ };
2840
+ }
2841
+
2842
+ return null;
2843
+ }).filter(Boolean);
2844
+
2845
+ if (isCursorOutsideInteractiveBorder(popperTreeData, event)) {
2846
+ cleanupInteractiveMouseListeners();
2847
+ scheduleHide(event);
2848
+ }
2849
+ }
2850
+
2851
+ function onMouseLeave(event) {
2852
+ var shouldBail = isEventListenerStopped(event) || instance.props.trigger.indexOf('click') >= 0 && isVisibleFromClick;
2853
+
2854
+ if (shouldBail) {
2855
+ return;
2856
+ }
2857
+
2858
+ if (instance.props.interactive) {
2859
+ instance.hideWithInteractivity(event);
2860
+ return;
2861
+ }
2862
+
2863
+ scheduleHide(event);
2864
+ }
2865
+
2866
+ function onBlurOrFocusOut(event) {
2867
+ if (instance.props.trigger.indexOf('focusin') < 0 && event.target !== getCurrentTarget()) {
2868
+ return;
2869
+ } // If focus was moved to within the popper
2870
+
2871
+
2872
+ if (instance.props.interactive && event.relatedTarget && popper.contains(event.relatedTarget)) {
2873
+ return;
2874
+ }
2875
+
2876
+ scheduleHide(event);
2877
+ }
2878
+
2879
+ function isEventListenerStopped(event) {
2880
+ return currentInput.isTouch ? getIsCustomTouchBehavior() !== event.type.indexOf('touch') >= 0 : false;
2881
+ }
2882
+
2883
+ function createPopperInstance() {
2884
+ destroyPopperInstance();
2885
+ var _instance$props2 = instance.props,
2886
+ popperOptions = _instance$props2.popperOptions,
2887
+ placement = _instance$props2.placement,
2888
+ offset = _instance$props2.offset,
2889
+ getReferenceClientRect = _instance$props2.getReferenceClientRect,
2890
+ moveTransition = _instance$props2.moveTransition;
2891
+ var arrow = getIsDefaultRenderFn() ? getChildren(popper).arrow : null;
2892
+ var computedReference = getReferenceClientRect ? {
2893
+ getBoundingClientRect: getReferenceClientRect,
2894
+ contextElement: getReferenceClientRect.contextElement || getCurrentTarget()
2895
+ } : reference;
2896
+ var tippyModifier = {
2897
+ name: '$$tippy',
2898
+ enabled: true,
2899
+ phase: 'beforeWrite',
2900
+ requires: ['computeStyles'],
2901
+ fn: function fn(_ref2) {
2902
+ var state = _ref2.state;
2903
+
2904
+ if (getIsDefaultRenderFn()) {
2905
+ var _getDefaultTemplateCh = getDefaultTemplateChildren(),
2906
+ box = _getDefaultTemplateCh.box;
2907
+
2908
+ ['placement', 'reference-hidden', 'escaped'].forEach(function (attr) {
2909
+ if (attr === 'placement') {
2910
+ box.setAttribute('data-placement', state.placement);
2911
+ } else {
2912
+ if (state.attributes.popper["data-popper-" + attr]) {
2913
+ box.setAttribute("data-" + attr, '');
2914
+ } else {
2915
+ box.removeAttribute("data-" + attr);
2916
+ }
2917
+ }
2918
+ });
2919
+ state.attributes.popper = {};
2920
+ }
2921
+ }
2922
+ };
2923
+ var modifiers = [{
2924
+ name: 'offset',
2925
+ options: {
2926
+ offset: offset
2927
+ }
2928
+ }, {
2929
+ name: 'preventOverflow',
2930
+ options: {
2931
+ padding: {
2932
+ top: 2,
2933
+ bottom: 2,
2934
+ left: 5,
2935
+ right: 5
2936
+ }
2937
+ }
2938
+ }, {
2939
+ name: 'flip',
2940
+ options: {
2941
+ padding: 5
2942
+ }
2943
+ }, {
2944
+ name: 'computeStyles',
2945
+ options: {
2946
+ adaptive: !moveTransition
2947
+ }
2948
+ }, tippyModifier];
2949
+
2950
+ if (getIsDefaultRenderFn() && arrow) {
2951
+ modifiers.push({
2952
+ name: 'arrow',
2953
+ options: {
2954
+ element: arrow,
2955
+ padding: 3
2956
+ }
2957
+ });
2958
+ }
2959
+
2960
+ modifiers.push.apply(modifiers, (popperOptions == null ? void 0 : popperOptions.modifiers) || []);
2961
+ instance.popperInstance = createPopper(computedReference, popper, Object.assign({}, popperOptions, {
2962
+ placement: placement,
2963
+ onFirstUpdate: onFirstUpdate,
2964
+ modifiers: modifiers
2965
+ }));
2966
+ }
2967
+
2968
+ function destroyPopperInstance() {
2969
+ if (instance.popperInstance) {
2970
+ instance.popperInstance.destroy();
2971
+ instance.popperInstance = null;
2972
+ }
2973
+ }
2974
+
2975
+ function mount() {
2976
+ var appendTo = instance.props.appendTo;
2977
+ var parentNode; // By default, we'll append the popper to the triggerTargets's parentNode so
2978
+ // it's directly after the reference element so the elements inside the
2979
+ // tippy can be tabbed to
2980
+ // If there are clipping issues, the user can specify a different appendTo
2981
+ // and ensure focus management is handled correctly manually
2982
+
2983
+ var node = getCurrentTarget();
2984
+
2985
+ if (instance.props.interactive && appendTo === TIPPY_DEFAULT_APPEND_TO || appendTo === 'parent') {
2986
+ parentNode = node.parentNode;
2987
+ } else {
2988
+ parentNode = invokeWithArgsOrReturn(appendTo, [node]);
2989
+ } // The popper element needs to exist on the DOM before its position can be
2990
+ // updated as Popper needs to read its dimensions
2991
+
2992
+
2993
+ if (!parentNode.contains(popper)) {
2994
+ parentNode.appendChild(popper);
2995
+ }
2996
+
2997
+ instance.state.isMounted = true;
2998
+ createPopperInstance();
2999
+ /* istanbul ignore else */
3000
+
3001
+ if (process.env.NODE_ENV !== "production") {
3002
+ // Accessibility check
3003
+ warnWhen(instance.props.interactive && appendTo === defaultProps.appendTo && node.nextElementSibling !== popper, ['Interactive tippy element may not be accessible via keyboard', 'navigation because it is not directly after the reference element', 'in the DOM source order.', '\n\n', 'Using a wrapper <div> or <span> tag around the reference element', 'solves this by creating a new parentNode context.', '\n\n', 'Specifying `appendTo: document.body` silences this warning, but it', 'assumes you are using a focus management solution to handle', 'keyboard navigation.', '\n\n', 'See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity'].join(' '));
3004
+ }
3005
+ }
3006
+
3007
+ function getNestedPopperTree() {
3008
+ return arrayFrom(popper.querySelectorAll('[data-tippy-root]'));
3009
+ }
3010
+
3011
+ function scheduleShow(event) {
3012
+ instance.clearDelayTimeouts();
3013
+
3014
+ if (event) {
3015
+ invokeHook('onTrigger', [instance, event]);
3016
+ }
3017
+
3018
+ addDocumentPress();
3019
+ var delay = getDelay(true);
3020
+
3021
+ var _getNormalizedTouchSe = getNormalizedTouchSettings(),
3022
+ touchValue = _getNormalizedTouchSe[0],
3023
+ touchDelay = _getNormalizedTouchSe[1];
3024
+
3025
+ if (currentInput.isTouch && touchValue === 'hold' && touchDelay) {
3026
+ delay = touchDelay;
3027
+ }
3028
+
3029
+ if (delay) {
3030
+ showTimeout = setTimeout(function () {
3031
+ instance.show();
3032
+ }, delay);
3033
+ } else {
3034
+ instance.show();
3035
+ }
3036
+ }
3037
+
3038
+ function scheduleHide(event) {
3039
+ instance.clearDelayTimeouts();
3040
+ invokeHook('onUntrigger', [instance, event]);
3041
+
3042
+ if (!instance.state.isVisible) {
3043
+ removeDocumentPress();
3044
+ return;
3045
+ } // For interactive tippies, scheduleHide is added to a document.body handler
3046
+ // from onMouseLeave so must intercept scheduled hides from mousemove/leave
3047
+ // events when trigger contains mouseenter and click, and the tip is
3048
+ // currently shown as a result of a click.
3049
+
3050
+
3051
+ if (instance.props.trigger.indexOf('mouseenter') >= 0 && instance.props.trigger.indexOf('click') >= 0 && ['mouseleave', 'mousemove'].indexOf(event.type) >= 0 && isVisibleFromClick) {
3052
+ return;
3053
+ }
3054
+
3055
+ var delay = getDelay(false);
3056
+
3057
+ if (delay) {
3058
+ hideTimeout = setTimeout(function () {
3059
+ if (instance.state.isVisible) {
3060
+ instance.hide();
3061
+ }
3062
+ }, delay);
3063
+ } else {
3064
+ // Fixes a `transitionend` problem when it fires 1 frame too
3065
+ // late sometimes, we don't want hide() to be called.
3066
+ scheduleHideAnimationFrame = requestAnimationFrame(function () {
3067
+ instance.hide();
3068
+ });
3069
+ }
3070
+ } // ===========================================================================
3071
+ // 🔑 Public methods
3072
+ // ===========================================================================
3073
+
3074
+
3075
+ function enable() {
3076
+ instance.state.isEnabled = true;
3077
+ }
3078
+
3079
+ function disable() {
3080
+ // Disabling the instance should also hide it
3081
+ // https://github.com/atomiks/tippy.js-react/issues/106
3082
+ instance.hide();
3083
+ instance.state.isEnabled = false;
3084
+ }
3085
+
3086
+ function clearDelayTimeouts() {
3087
+ clearTimeout(showTimeout);
3088
+ clearTimeout(hideTimeout);
3089
+ cancelAnimationFrame(scheduleHideAnimationFrame);
3090
+ }
3091
+
3092
+ function setProps(partialProps) {
3093
+ /* istanbul ignore else */
3094
+ if (process.env.NODE_ENV !== "production") {
3095
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('setProps'));
3096
+ }
3097
+
3098
+ if (instance.state.isDestroyed) {
3099
+ return;
3100
+ }
3101
+
3102
+ invokeHook('onBeforeUpdate', [instance, partialProps]);
3103
+ removeListeners();
3104
+ var prevProps = instance.props;
3105
+ var nextProps = evaluateProps(reference, Object.assign({}, prevProps, removeUndefinedProps(partialProps), {
3106
+ ignoreAttributes: true
3107
+ }));
3108
+ instance.props = nextProps;
3109
+ addListeners();
3110
+
3111
+ if (prevProps.interactiveDebounce !== nextProps.interactiveDebounce) {
3112
+ cleanupInteractiveMouseListeners();
3113
+ debouncedOnMouseMove = debounce(onMouseMove, nextProps.interactiveDebounce);
3114
+ } // Ensure stale aria-expanded attributes are removed
3115
+
3116
+
3117
+ if (prevProps.triggerTarget && !nextProps.triggerTarget) {
3118
+ normalizeToArray(prevProps.triggerTarget).forEach(function (node) {
3119
+ node.removeAttribute('aria-expanded');
3120
+ });
3121
+ } else if (nextProps.triggerTarget) {
3122
+ reference.removeAttribute('aria-expanded');
3123
+ }
3124
+
3125
+ handleAriaExpandedAttribute();
3126
+ handleStyles();
3127
+
3128
+ if (onUpdate) {
3129
+ onUpdate(prevProps, nextProps);
3130
+ }
3131
+
3132
+ if (instance.popperInstance) {
3133
+ createPopperInstance(); // Fixes an issue with nested tippies if they are all getting re-rendered,
3134
+ // and the nested ones get re-rendered first.
3135
+ // https://github.com/atomiks/tippyjs-react/issues/177
3136
+ // TODO: find a cleaner / more efficient solution(!)
3137
+
3138
+ getNestedPopperTree().forEach(function (nestedPopper) {
3139
+ // React (and other UI libs likely) requires a rAF wrapper as it flushes
3140
+ // its work in one
3141
+ requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);
3142
+ });
3143
+ }
3144
+
3145
+ invokeHook('onAfterUpdate', [instance, partialProps]);
3146
+ }
3147
+
3148
+ function setContent(content) {
3149
+ instance.setProps({
3150
+ content: content
3151
+ });
3152
+ }
3153
+
3154
+ function show() {
3155
+ /* istanbul ignore else */
3156
+ if (process.env.NODE_ENV !== "production") {
3157
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('show'));
3158
+ } // Early bail-out
3159
+
3160
+
3161
+ var isAlreadyVisible = instance.state.isVisible;
3162
+ var isDestroyed = instance.state.isDestroyed;
3163
+ var isDisabled = !instance.state.isEnabled;
3164
+ var isTouchAndTouchDisabled = currentInput.isTouch && !instance.props.touch;
3165
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 0, defaultProps.duration);
3166
+
3167
+ if (isAlreadyVisible || isDestroyed || isDisabled || isTouchAndTouchDisabled) {
3168
+ return;
3169
+ } // Normalize `disabled` behavior across browsers.
3170
+ // Firefox allows events on disabled elements, but Chrome doesn't.
3171
+ // Using a wrapper element (i.e. <span>) is recommended.
3172
+
3173
+
3174
+ if (getCurrentTarget().hasAttribute('disabled')) {
3175
+ return;
3176
+ }
3177
+
3178
+ invokeHook('onShow', [instance], false);
3179
+
3180
+ if (instance.props.onShow(instance) === false) {
3181
+ return;
3182
+ }
3183
+
3184
+ instance.state.isVisible = true;
3185
+
3186
+ if (getIsDefaultRenderFn()) {
3187
+ popper.style.visibility = 'visible';
3188
+ }
3189
+
3190
+ handleStyles();
3191
+ addDocumentPress();
3192
+
3193
+ if (!instance.state.isMounted) {
3194
+ popper.style.transition = 'none';
3195
+ } // If flipping to the opposite side after hiding at least once, the
3196
+ // animation will use the wrong placement without resetting the duration
3197
+
3198
+
3199
+ if (getIsDefaultRenderFn()) {
3200
+ var _getDefaultTemplateCh2 = getDefaultTemplateChildren(),
3201
+ box = _getDefaultTemplateCh2.box,
3202
+ content = _getDefaultTemplateCh2.content;
3203
+
3204
+ setTransitionDuration([box, content], 0);
3205
+ }
3206
+
3207
+ onFirstUpdate = function onFirstUpdate() {
3208
+ var _instance$popperInsta2;
3209
+
3210
+ if (!instance.state.isVisible || ignoreOnFirstUpdate) {
3211
+ return;
3212
+ }
3213
+
3214
+ ignoreOnFirstUpdate = true; // reflow
3215
+
3216
+ void popper.offsetHeight;
3217
+ popper.style.transition = instance.props.moveTransition;
3218
+
3219
+ if (getIsDefaultRenderFn() && instance.props.animation) {
3220
+ var _getDefaultTemplateCh3 = getDefaultTemplateChildren(),
3221
+ _box = _getDefaultTemplateCh3.box,
3222
+ _content = _getDefaultTemplateCh3.content;
3223
+
3224
+ setTransitionDuration([_box, _content], duration);
3225
+ setVisibilityState([_box, _content], 'visible');
3226
+ }
3227
+
3228
+ handleAriaContentAttribute();
3229
+ handleAriaExpandedAttribute();
3230
+ pushIfUnique(mountedInstances, instance); // certain modifiers (e.g. `maxSize`) require a second update after the
3231
+ // popper has been positioned for the first time
3232
+
3233
+ (_instance$popperInsta2 = instance.popperInstance) == null ? void 0 : _instance$popperInsta2.forceUpdate();
3234
+ invokeHook('onMount', [instance]);
3235
+
3236
+ if (instance.props.animation && getIsDefaultRenderFn()) {
3237
+ onTransitionedIn(duration, function () {
3238
+ instance.state.isShown = true;
3239
+ invokeHook('onShown', [instance]);
3240
+ });
3241
+ }
3242
+ };
3243
+
3244
+ mount();
3245
+ }
3246
+
3247
+ function hide() {
3248
+ /* istanbul ignore else */
3249
+ if (process.env.NODE_ENV !== "production") {
3250
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hide'));
3251
+ } // Early bail-out
3252
+
3253
+
3254
+ var isAlreadyHidden = !instance.state.isVisible;
3255
+ var isDestroyed = instance.state.isDestroyed;
3256
+ var isDisabled = !instance.state.isEnabled;
3257
+ var duration = getValueAtIndexOrReturn(instance.props.duration, 1, defaultProps.duration);
3258
+
3259
+ if (isAlreadyHidden || isDestroyed || isDisabled) {
3260
+ return;
3261
+ }
3262
+
3263
+ invokeHook('onHide', [instance], false);
3264
+
3265
+ if (instance.props.onHide(instance) === false) {
3266
+ return;
3267
+ }
3268
+
3269
+ instance.state.isVisible = false;
3270
+ instance.state.isShown = false;
3271
+ ignoreOnFirstUpdate = false;
3272
+ isVisibleFromClick = false;
3273
+
3274
+ if (getIsDefaultRenderFn()) {
3275
+ popper.style.visibility = 'hidden';
3276
+ }
3277
+
3278
+ cleanupInteractiveMouseListeners();
3279
+ removeDocumentPress();
3280
+ handleStyles(true);
3281
+
3282
+ if (getIsDefaultRenderFn()) {
3283
+ var _getDefaultTemplateCh4 = getDefaultTemplateChildren(),
3284
+ box = _getDefaultTemplateCh4.box,
3285
+ content = _getDefaultTemplateCh4.content;
3286
+
3287
+ if (instance.props.animation) {
3288
+ setTransitionDuration([box, content], duration);
3289
+ setVisibilityState([box, content], 'hidden');
3290
+ }
3291
+ }
3292
+
3293
+ handleAriaContentAttribute();
3294
+ handleAriaExpandedAttribute();
3295
+
3296
+ if (instance.props.animation) {
3297
+ if (getIsDefaultRenderFn()) {
3298
+ onTransitionedOut(duration, instance.unmount);
3299
+ }
3300
+ } else {
3301
+ instance.unmount();
3302
+ }
3303
+ }
3304
+
3305
+ function hideWithInteractivity(event) {
3306
+ /* istanbul ignore else */
3307
+ if (process.env.NODE_ENV !== "production") {
3308
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('hideWithInteractivity'));
3309
+ }
3310
+
3311
+ getDocument().addEventListener('mousemove', debouncedOnMouseMove);
3312
+ pushIfUnique(mouseMoveListeners, debouncedOnMouseMove);
3313
+ debouncedOnMouseMove(event);
3314
+ }
3315
+
3316
+ function unmount() {
3317
+ /* istanbul ignore else */
3318
+ if (process.env.NODE_ENV !== "production") {
3319
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('unmount'));
3320
+ }
3321
+
3322
+ if (instance.state.isVisible) {
3323
+ instance.hide();
3324
+ }
3325
+
3326
+ if (!instance.state.isMounted) {
3327
+ return;
3328
+ }
3329
+
3330
+ destroyPopperInstance(); // If a popper is not interactive, it will be appended outside the popper
3331
+ // tree by default. This seems mainly for interactive tippies, but we should
3332
+ // find a workaround if possible
3333
+
3334
+ getNestedPopperTree().forEach(function (nestedPopper) {
3335
+ nestedPopper._tippy.unmount();
3336
+ });
3337
+
3338
+ if (popper.parentNode) {
3339
+ popper.parentNode.removeChild(popper);
3340
+ }
3341
+
3342
+ mountedInstances = mountedInstances.filter(function (i) {
3343
+ return i !== instance;
3344
+ });
3345
+ instance.state.isMounted = false;
3346
+ invokeHook('onHidden', [instance]);
3347
+ }
3348
+
3349
+ function destroy() {
3350
+ /* istanbul ignore else */
3351
+ if (process.env.NODE_ENV !== "production") {
3352
+ warnWhen(instance.state.isDestroyed, createMemoryLeakWarning('destroy'));
3353
+ }
3354
+
3355
+ if (instance.state.isDestroyed) {
3356
+ return;
3357
+ }
3358
+
3359
+ instance.clearDelayTimeouts();
3360
+ instance.unmount();
3361
+ removeListeners();
3362
+ delete reference._tippy;
3363
+ instance.state.isDestroyed = true;
3364
+ invokeHook('onDestroy', [instance]);
3365
+ }
3366
+ }
3367
+
3368
+ function tippy(targets, optionalProps) {
3369
+ if (optionalProps === void 0) {
3370
+ optionalProps = {};
3371
+ }
3372
+
3373
+ var plugins = defaultProps.plugins.concat(optionalProps.plugins || []);
3374
+ /* istanbul ignore else */
3375
+
3376
+ if (process.env.NODE_ENV !== "production") {
3377
+ validateTargets(targets);
3378
+ validateProps(optionalProps, plugins);
3379
+ }
3380
+
3381
+ bindGlobalEventListeners();
3382
+ var passedProps = Object.assign({}, optionalProps, {
3383
+ plugins: plugins
3384
+ });
3385
+ var elements = getArrayOfElements(targets);
3386
+ /* istanbul ignore else */
3387
+
3388
+ if (process.env.NODE_ENV !== "production") {
3389
+ var isSingleContentElement = isElement(passedProps.content);
3390
+ var isMoreThanOneReferenceElement = elements.length > 1;
3391
+ warnWhen(isSingleContentElement && isMoreThanOneReferenceElement, ['tippy() was passed an Element as the `content` prop, but more than', 'one tippy instance was created by this invocation. This means the', 'content element will only be appended to the last tippy instance.', '\n\n', 'Instead, pass the .innerHTML of the element, or use a function that', 'returns a cloned version of the element instead.', '\n\n', '1) content: element.innerHTML\n', '2) content: () => element.cloneNode(true)'].join(' '));
3392
+ }
3393
+
3394
+ var instances = elements.reduce(function (acc, reference) {
3395
+ var instance = reference && createTippy(reference, passedProps);
3396
+
3397
+ if (instance) {
3398
+ acc.push(instance);
3399
+ }
3400
+
3401
+ return acc;
3402
+ }, []);
3403
+ return isElement(targets) ? instances[0] : instances;
3404
+ }
3405
+
3406
+ tippy.defaultProps = defaultProps;
3407
+ tippy.setDefaultProps = setDefaultProps;
3408
+ tippy.currentInput = currentInput;
3409
+
3410
+ // every time the popper is destroyed (i.e. a new target), removing the styles
3411
+ // and causing transitions to break for singletons when the console is open, but
3412
+ // most notably for non-transform styles being used, `gpuAcceleration: false`.
3413
+
3414
+ Object.assign({}, applyStyles$1, {
3415
+ effect: function effect(_ref) {
3416
+ var state = _ref.state;
3417
+ var initialStyles = {
3418
+ popper: {
3419
+ position: state.options.strategy,
3420
+ left: '0',
3421
+ top: '0',
3422
+ margin: '0'
3423
+ },
3424
+ arrow: {
3425
+ position: 'absolute'
3426
+ },
3427
+ reference: {}
3428
+ };
3429
+ Object.assign(state.elements.popper.style, initialStyles.popper);
3430
+ state.styles = initialStyles;
3431
+
3432
+ if (state.elements.arrow) {
3433
+ Object.assign(state.elements.arrow.style, initialStyles.arrow);
3434
+ } // intentionally return no cleanup function
3435
+ // return () => { ... }
3436
+
3437
+ }
3438
+ });
3439
+
3440
+ tippy.setDefaultProps({
3441
+ render: render
3442
+ });
3443
+
3444
+ const style = ":host {\n display: flex;\n}\n\n.tippy-box[data-animation=fade][data-state=hidden] {\n opacity: 0;\n}\n\n.tippy-arrow::before {\n content: \"\";\n position: absolute;\n border-color: transparent;\n border-style: solid;\n}\n\n.tippy-box[data-placement^=top] > .tippy-arrow::before {\n border-top-color: initial;\n transform-origin: center top;\n}\n\n.tippy-box[data-placement^=bottom] > .tippy-arrow::before {\n border-bottom-color: initial;\n transform-origin: center bottom;\n}\n\n.tippy-box[data-placement^=left] > .tippy-arrow::before {\n border-left-color: initial;\n transform-origin: center left;\n}\n\n.tippy-box[data-placement^=right] > .tippy-arrow::before {\n border-right-color: initial;\n transform-origin: center right;\n}\n\n.tippy-box[data-inertia][data-state=visible] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n}\n\n.tippy-arrow {\n width: 16px;\n height: 16px;\n}\n\n.size-medium {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.size-medium[data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.size-medium[data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n.size-medium[data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.size-medium[data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n.size-medium[data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.size-medium[data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n.size-medium[data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.size-medium[data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n\n.size-large {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.size-large[data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n.size-large[data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n.size-large[data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n.size-large[data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n.size-large[data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n.size-large[data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n.size-large[data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n.size-large[data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n\n.variant-dark {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.variant-dark[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n.variant-dark[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n.variant-dark[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n.variant-dark[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n.variant-dark > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n}\n.variant-dark > .tippy-svg-arrow {\n fill: #365063;\n}\n\n.variant-light {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity));\n}\n.variant-light[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n.variant-light[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n.variant-light[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n.variant-light[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n.variant-light > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n}\n.variant-light > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n\n.variant-success {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.variant-success[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n.variant-success[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n.variant-success[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n.variant-success[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n.variant-success > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n}\n.variant-success > .tippy-svg-arrow {\n fill: #47cd68;\n}\n\n.variant-danger {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.variant-danger[data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n.variant-danger[data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n.variant-danger[data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n.variant-danger[data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n.variant-danger > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n}\n.variant-danger > .tippy-svg-arrow {\n fill: #e96363;\n}\n\n.tippy-box[data-theme~=dark-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n\n.tippy-box[data-theme~=dark-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=dark-medium] > .tippy-svg-arrow {\n fill: #365063;\n}\n\n.tippy-box[data-theme~=dark-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n\n.tippy-box[data-theme~=dark-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(54 80 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=dark-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(54 80 99 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=dark-large] > .tippy-svg-arrow {\n fill: #365063;\n}\n\n.tippy-box[data-theme~=light-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n\n.tippy-box[data-theme~=light-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=light-medium] > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n\n.tippy-box[data-theme~=light-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n\n.tippy-box[data-theme~=light-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(36 53 66 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(245 248 250 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=light-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(245 248 250 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=light-large] > .tippy-svg-arrow {\n fill: #f5f8fa;\n}\n\n.tippy-box[data-theme~=success-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n\n.tippy-box[data-theme~=success-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=success-medium] > .tippy-svg-arrow {\n fill: #47cd68;\n}\n\n.tippy-box[data-theme~=success-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n\n.tippy-box[data-theme~=success-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(71 205 104 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=success-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(71 205 104 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=success-large] > .tippy-svg-arrow {\n fill: #47cd68;\n}\n\n.tippy-box[data-theme~=danger-medium] {\n border-radius: 4px;\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 10px;\n font-weight: 600;\n font-style: normal;\n line-height: 12px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=top] > .tippy-arrow::before {\n bottom: -6px;\n left: 2px;\n border-width: 6px 6px 0;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] > .tippy-arrow::before {\n top: -6px;\n left: 2px;\n border-width: 0 6px 6px;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=left] > .tippy-arrow::before {\n border-width: 6px 0 6px 6px;\n right: -6px;\n top: 2px;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=right] > .tippy-arrow::before {\n left: -6px;\n top: 2px;\n border-width: 6px 6px 6px 0;\n}\n\n.tippy-box[data-theme~=danger-medium] {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=danger-medium] > .tippy-svg-arrow {\n fill: #e96363;\n}\n\n.tippy-box[data-theme~=danger-large] {\n border-radius: 8px;\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n font-family: Inter, sans-serif;\n font-size: 12px;\n font-weight: 400;\n font-style: normal;\n line-height: 20px;\n --tw-shadow: 0px 18px 7px rgba(63, 93, 116, 0.02), 0px 10px 6px rgba(63, 93, 116, 0.08), 0px 4px 4px rgba(63, 93, 116, 0.13), 0px 1px 2px rgba(63, 93, 116, 0.15), 0px 0px 0px rgba(63, 93, 116, 0.16);\n --tw-shadow-colored: 0px 18px 7px var(--tw-shadow-color), 0px 10px 6px var(--tw-shadow-color), 0px 4px 4px var(--tw-shadow-color), 0px 1px 2px var(--tw-shadow-color), 0px 0px 0px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=top] > .tippy-arrow {\n bottom: 0;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=top] > .tippy-arrow::before {\n bottom: -8px;\n left: 0;\n border-width: 8px 8px 0;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] > .tippy-arrow {\n top: 0;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] > .tippy-arrow::before {\n top: -8px;\n left: 0;\n border-width: 0 8px 8px;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=left] > .tippy-arrow {\n right: 0;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=left] > .tippy-arrow::before {\n border-width: 8px 0 8px 8px;\n right: -8px;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=right] > .tippy-arrow {\n left: 0;\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=right] > .tippy-arrow::before {\n left: -8px;\n border-width: 8px 8px 8px 0;\n}\n\n.tippy-box[data-theme~=danger-large] {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=top] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-top-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=bottom] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-bottom-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=left] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-left-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-large][data-placement^=right] .tippy-arrow::before {\n --tw-border-opacity: 1;\n border-right-color: rgb(233 99 99 / var(--tw-border-opacity));\n}\n\n.tippy-box[data-theme~=danger-large] > .tippy-backdrop {\n --tw-bg-opacity: 1;\n background-color: rgb(233 99 99 / var(--tw-bg-opacity));\n}\n\n.tippy-box[data-theme~=danger-large] > .tippy-svg-arrow {\n fill: #e96363;\n}";
3445
+
3446
+ var __defProp = Object.defineProperty;
3447
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3448
+ var __decorateClass = (decorators, target, key, kind) => {
3449
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
3450
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
3451
+ if (decorator = decorators[i])
3452
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
3453
+ if (kind && result)
3454
+ __defProp(target, key, result);
3455
+ return result;
3456
+ };
3457
+ let LuksoTooltip = class extends TailwindStyledElement(style) {
3458
+ constructor() {
3459
+ super(...arguments);
3460
+ this.variant = "dark";
3461
+ this.size = "medium";
3462
+ this.placement = "top";
3463
+ this.trigger = "mouseenter";
3464
+ this.text = "";
3465
+ this.maxWidth = 300;
3466
+ this.show = false;
3467
+ this.hideOnClick = "true";
3468
+ this.isClipboardCopy = false;
3469
+ this.copyText = "";
3470
+ this.copyValue = "";
3471
+ this.offset = 10;
3472
+ this.showCopy = false;
3473
+ this.defaultTooltipStyles = "bg-neutral-20 p-4 hidden";
3474
+ this.tooltipInstance = void 0;
3475
+ }
3476
+ hideOnClickCheck() {
3477
+ if (this.hideOnClick === "toggle") {
3478
+ return this.hideOnClick;
3479
+ }
3480
+ if (this.hideOnClick === "true") {
3481
+ return true;
3482
+ }
3483
+ if (this.hideOnClick === "false") {
3484
+ return false;
3485
+ }
3486
+ }
3487
+ initTooltip() {
3488
+ const trigger = this.shadowRoot.getElementById("trigger");
3489
+ const tooltip = this.shadowRoot.getElementById("tooltip");
3490
+ if (this.tooltipInstance) {
3491
+ this.tooltipInstance.destroy();
3492
+ this.tooltipInstance = void 0;
3493
+ }
3494
+ if (!this.text) {
3495
+ return;
3496
+ }
3497
+ this.tooltipInstance = tippy(trigger, {
3498
+ content: tooltip.innerHTML,
3499
+ allowHTML: true,
3500
+ arrow: true,
3501
+ animation: "fade",
3502
+ interactive: true,
3503
+ trigger: this.trigger,
3504
+ placement: this.placement,
3505
+ maxWidth: this.maxWidth,
3506
+ theme: `${this.variant}-${this.size}`,
3507
+ offset: [0, this.offset],
3508
+ hideOnClick: this.hideOnClickCheck()
3509
+ });
3510
+ }
3511
+ handleClick() {
3512
+ if (!this.isClipboardCopy || !this.copyText || !this.copyValue) {
3513
+ return;
3514
+ }
3515
+ this.showCopy = true;
3516
+ navigator.clipboard.writeText(this.copyValue);
3517
+ setTimeout(() => {
3518
+ this.showCopy = false;
3519
+ }, 1e3);
3520
+ }
3521
+ async willUpdate(changedProperties) {
3522
+ await this.updateComplete;
3523
+ if (changedProperties.has("show") && this.trigger === "manual") {
3524
+ if (this.show) {
3525
+ !!!this.tooltipInstance && this.initTooltip();
3526
+ this.tooltipInstance.show();
3527
+ } else {
3528
+ this.tooltipInstance?.hide();
3529
+ }
3530
+ return;
3531
+ }
3532
+ this.initTooltip();
3533
+ }
3534
+ render() {
3535
+ return x`
3536
+ <div
3537
+ id="tooltip"
3538
+ role="tooltip"
3539
+ class=${customClassMap({
3540
+ [this.defaultTooltipStyles]: true
3541
+ })}
3542
+ >
3543
+ ${this.text}
3544
+ </div>
3545
+ ${this.isClipboardCopy ? x`<lukso-tooltip
3546
+ variant=${this.variant}
3547
+ size=${this.size}
3548
+ placement=${this.placement}
3549
+ max-width=${this.maxWidth}
3550
+ offset=${this.offset}
3551
+ trigger="manual"
3552
+ ?show=${this.showCopy ? true : void 0}
3553
+ text=${this.copyText}
3554
+ >
3555
+ <div id="trigger" class="cursor-pointer" @click=${this.handleClick}>
3556
+ <slot></slot>
3557
+ </div>
3558
+ </lukso-tooltip>` : x`<div
3559
+ id="trigger"
3560
+ class="cursor-pointer"
3561
+ @click=${this.handleClick}
3562
+ >
3563
+ <slot></slot>
3564
+ </div>`}
3565
+ `;
3566
+ }
3567
+ };
3568
+ __decorateClass([
3569
+ n({ type: String })
3570
+ ], LuksoTooltip.prototype, "variant", 2);
3571
+ __decorateClass([
3572
+ n({ type: String })
3573
+ ], LuksoTooltip.prototype, "size", 2);
3574
+ __decorateClass([
3575
+ n({ type: String })
3576
+ ], LuksoTooltip.prototype, "placement", 2);
3577
+ __decorateClass([
3578
+ n({ type: String })
3579
+ ], LuksoTooltip.prototype, "trigger", 2);
3580
+ __decorateClass([
3581
+ n({ type: String })
3582
+ ], LuksoTooltip.prototype, "text", 2);
3583
+ __decorateClass([
3584
+ n({ type: Number, attribute: "max-width" })
3585
+ ], LuksoTooltip.prototype, "maxWidth", 2);
3586
+ __decorateClass([
3587
+ n({ type: Boolean })
3588
+ ], LuksoTooltip.prototype, "show", 2);
3589
+ __decorateClass([
3590
+ n({ type: String, attribute: "hide-on-click" })
3591
+ ], LuksoTooltip.prototype, "hideOnClick", 2);
3592
+ __decorateClass([
3593
+ n({ type: Boolean, attribute: "is-clipboard-copy" })
3594
+ ], LuksoTooltip.prototype, "isClipboardCopy", 2);
3595
+ __decorateClass([
3596
+ n({ type: String, attribute: "copy-text" })
3597
+ ], LuksoTooltip.prototype, "copyText", 2);
3598
+ __decorateClass([
3599
+ n({ type: String, attribute: "copy-value" })
3600
+ ], LuksoTooltip.prototype, "copyValue", 2);
3601
+ __decorateClass([
3602
+ n({ type: Number })
3603
+ ], LuksoTooltip.prototype, "offset", 2);
3604
+ __decorateClass([
3605
+ t()
3606
+ ], LuksoTooltip.prototype, "showCopy", 2);
3607
+ LuksoTooltip = __decorateClass([
3608
+ e("lukso-tooltip")
3609
+ ], LuksoTooltip);
3610
+
3611
+ export { LuksoTooltip };