@getflip/swirl-components-react 0.1.0 → 0.2.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.
- package/dist/_commonjsHelpers-44457d8d.ba94af77.js +37 -0
- package/dist/a11y-dialog.esm-d7a94c8c.bd6ae411.js +99 -0
- package/dist/bodyScrollLock.esm-ce6356d8.2c600fb9.js +93 -0
- package/dist/{flip-action-list-item.entry.1b728e6a.js → flip-action-list-item.entry.66f33805.js} +3 -2
- package/dist/{flip-action-list-section.entry.da3e6186.js → flip-action-list-section.entry.2927ba41.js} +1 -1
- package/dist/{flip-action-list.entry.400a309a.js → flip-action-list.entry.66352b19.js} +2 -2
- package/dist/flip-avatar-group.entry.be7886a3.js +20 -0
- package/dist/{flip-avatar.entry.2eb3242e.js → flip-avatar.entry.f95286a1.js} +3 -2
- package/dist/flip-badge.entry.3f2d34e9.js +20 -0
- package/dist/{flip-banner.entry.b3012465.js → flip-banner.entry.32f2ef57.js} +3 -2
- package/dist/flip-button-group.entry.ed86679b.js +15 -0
- package/dist/flip-button.entry.555b8fd4.js +33 -0
- package/dist/{flip-checkbox.entry.2f740fb8.js → flip-checkbox.entry.9768035f.js} +10 -9
- package/dist/{flip-chip.entry.e9729ac7.js → flip-chip.entry.5ebbf411.js} +3 -2
- package/dist/flip-date-input.entry.7bf9efc5.js +5473 -0
- package/dist/flip-date-picker_3.entry.54e0b84d.js +1270 -0
- package/dist/{flip-description-list-item.entry.c789511e.js → flip-description-list-item.entry.f4e6faf7.js} +1 -1
- package/dist/{flip-description-list.entry.3b158436.js → flip-description-list.entry.2b1d4579.js} +1 -1
- package/dist/flip-dialog.entry.2bbc3bff.js +45 -0
- package/dist/flip-empty-state.entry.376592fa.js +15 -0
- package/dist/flip-file-uploader.entry.c0ddf5a7.js +32 -0
- package/dist/flip-file-viewer-audio_6.entry.d60d1099.js +16174 -0
- package/dist/flip-file-viewer.entry.0c2922e5.js +95 -0
- package/dist/flip-form-control.entry.71c275f5.js +58 -0
- package/dist/flip-form-group.entry.ad2385d5.js +18 -0
- package/dist/flip-heading.entry.1245bdda.js +18 -0
- package/dist/{flip-icon-add-photo.entry.a1003bdf.js → flip-icon-add-photo.entry.c3178433.js} +1 -1
- package/dist/{flip-icon-add.entry.7103fbe7.js → flip-icon-add.entry.708a8c7c.js} +1 -1
- package/dist/{flip-icon-admin-panel-settings.entry.36a12e47.js → flip-icon-admin-panel-settings.entry.88af777a.js} +1 -1
- package/dist/{flip-icon-arrow-back.entry.e35ba078.js → flip-icon-arrow-back.entry.abd86e13.js} +1 -1
- package/dist/{flip-icon-arrow-forward.entry.5138c404.js → flip-icon-arrow-forward.entry.ef6e8b77.js} +1 -1
- package/dist/flip-icon-arrow-left.entry.70be0607.js +15 -0
- package/dist/{flip-icon-arrow-right-small.entry.d1eeb150.js → flip-icon-arrow-right-small.entry.d342c71f.js} +1 -1
- package/dist/flip-icon-arrow-right.entry.bd9eae8e.js +15 -0
- package/dist/{flip-icon-attachment.entry.594b602b.js → flip-icon-attachment.entry.898243d2.js} +1 -1
- package/dist/flip-icon-cancel.entry.fac41df2.js +15 -0
- package/dist/{flip-icon-chat-bubble.entry.f56fcdc4.js → flip-icon-chat-bubble.entry.016c1f0d.js} +1 -1
- package/dist/{flip-icon-check-circle.entry.e4f8169d.js → flip-icon-check-circle.entry.330f4038.js} +1 -1
- package/dist/{flip-icon-check-small.entry.308d57d1.js → flip-icon-check-small.entry.590b928f.js} +1 -1
- package/dist/{flip-icon-check-strong.entry.b61365d2.js → flip-icon-check-strong.entry.8fb90e69.js} +1 -1
- package/dist/{flip-icon-check.entry.f2c6b547.js → flip-icon-check.entry.bf4892a9.js} +1 -1
- package/dist/{flip-icon-chevron-left.entry.dbe9b291.js → flip-icon-chevron-left.entry.8a5cd7ef.js} +1 -1
- package/dist/{flip-icon-chevron-right.entry.9565c0f1.js → flip-icon-chevron-right.entry.ba87bdc8.js} +1 -1
- package/dist/{flip-icon-close-small.entry.8bfcf1b1.js → flip-icon-close-small.entry.d3ca39fb.js} +1 -1
- package/dist/{flip-icon-close.entry.41992748.js → flip-icon-close.entry.ebcf0fe6.js} +1 -1
- package/dist/flip-icon-cloud-upload.entry.bf4e840b.js +15 -0
- package/dist/{flip-icon-comment.entry.2aac2c10.js → flip-icon-comment.entry.dd07b7a4.js} +1 -1
- package/dist/{flip-icon-copy.entry.8e59bf1d.js → flip-icon-copy.entry.796dcb43.js} +1 -1
- package/dist/{flip-icon-date-range.entry.c1dd2730.js → flip-icon-date-range.entry.53c670dc.js} +1 -1
- package/dist/{flip-icon-delete.entry.bc0b61ff.js → flip-icon-delete.entry.df480685.js} +1 -1
- package/dist/{flip-icon-description.entry.e01b2d40.js → flip-icon-description.entry.da40cecc.js} +1 -1
- package/dist/{flip-icon-download.entry.a512f353.js → flip-icon-download.entry.3926477e.js} +1 -1
- package/dist/{flip-icon-edit.entry.7e3cd472.js → flip-icon-edit.entry.0f50ba4c.js} +1 -1
- package/dist/{flip-icon-emoji-mood.entry.df7b536f.js → flip-icon-emoji-mood.entry.4fa27f13.js} +1 -1
- package/dist/{flip-icon-emoji-satisfied.entry.e3e5352b.js → flip-icon-emoji-satisfied.entry.9246c39b.js} +1 -1
- package/dist/{flip-icon-error.entry.96c3c29b.js → flip-icon-error_3.entry.4e8dcd9e.js} +30 -6
- package/dist/flip-icon-expand-less_3.entry.f191352f.js +35 -0
- package/dist/{flip-icon-expand-more.entry.4c1fa160.js → flip-icon-expand-more.entry.5dbcc3e3.js} +1 -1
- package/dist/{flip-icon-file.entry.3a18cce8.js → flip-icon-file.entry.64c3e030.js} +1 -1
- package/dist/{flip-icon-folder-shared.entry.38b22cd2.js → flip-icon-folder-shared.entry.87cd72cd.js} +1 -1
- package/dist/flip-icon-fullscreen-exit.entry.b274fc5c.js +15 -0
- package/dist/flip-icon-fullscreen.entry.a0a70cc8.js +15 -0
- package/dist/{flip-icon-group-assign.entry.a640254f.js → flip-icon-group-assign.entry.17e70921.js} +1 -1
- package/dist/{flip-icon-groups-custom.entry.d77901cd.js → flip-icon-groups-custom.entry.ed78b313.js} +1 -1
- package/dist/{flip-icon-groups.entry.80196d79.js → flip-icon-groups.entry.ff8a5e63.js} +1 -1
- package/dist/{flip-icon-image.entry.601bf2ae.js → flip-icon-image.entry.b010afb8.js} +1 -1
- package/dist/{flip-icon-info.entry.b480a255.js → flip-icon-info.entry.61351d50.js} +1 -1
- package/dist/{flip-icon-inventory.entry.bb8a5615.js → flip-icon-inventory.entry.f0ffd90a.js} +1 -1
- package/dist/{flip-icon-like.entry.af8b36e2.js → flip-icon-like.entry.6b0034de.js} +1 -1
- package/dist/{flip-icon-link.entry.be72688c.js → flip-icon-link.entry.9229312e.js} +1 -1
- package/dist/{flip-icon-lock.entry.440459fe.js → flip-icon-lock.entry.03e5fa85.js} +1 -1
- package/dist/{flip-icon-logout.entry.dde0bfc8.js → flip-icon-logout.entry.8b073a7d.js} +1 -1
- package/dist/{flip-icon-mail.entry.b57a0093.js → flip-icon-mail.entry.91482af2.js} +1 -1
- package/dist/{flip-icon-manage-accounts.entry.11cc3149.js → flip-icon-manage-accounts.entry.5de8be6f.js} +1 -1
- package/dist/{flip-icon-mention.entry.32771810.js → flip-icon-mention.entry.ef803509.js} +1 -1
- package/dist/{flip-icon-message.entry.636088c3.js → flip-icon-message.entry.20ae73fb.js} +1 -1
- package/dist/{flip-icon-more-horizontal.entry.38f14508.js → flip-icon-more-horizontal.entry.9a2357f0.js} +1 -1
- package/dist/{flip-icon-more-vertikal.entry.8a4c613a.js → flip-icon-more-vertikal.entry.0447fdab.js} +1 -1
- package/dist/{flip-icon-notifications-active.entry.5658308d.js → flip-icon-notifications-active.entry.3aa487b9.js} +1 -1
- package/dist/{flip-icon-notifications-off.entry.8d3b11ff.js → flip-icon-notifications-off.entry.285c2bb6.js} +1 -1
- package/dist/{flip-icon-notifications.entry.91f77dd2.js → flip-icon-notifications.entry.e60fed91.js} +1 -1
- package/dist/flip-icon-open-in-new.entry.9de4d7c0.js +15 -0
- package/dist/{flip-icon-people-alt.entry.b0b2e20c.js → flip-icon-people-alt.entry.dd840fb1.js} +1 -1
- package/dist/{flip-icon-person-off.entry.e79df0e6.js → flip-icon-person-off.entry.df6c63b6.js} +1 -1
- package/dist/{flip-icon-person.entry.1bc59e68.js → flip-icon-person.entry.37939889.js} +1 -1
- package/dist/{flip-icon-phone.entry.03e81177.js → flip-icon-phone.entry.08245320.js} +1 -1
- package/dist/{flip-icon-poll.entry.4e059f77.js → flip-icon-poll.entry.e0ff1d9f.js} +1 -1
- package/dist/flip-icon-print.entry.f5fbd804.js +15 -0
- package/dist/{flip-icon-recieved.entry.e3410f9e.js → flip-icon-recieved.entry.5b4e2a50.js} +1 -1
- package/dist/flip-icon-remove.entry.98d516c6.js +15 -0
- package/dist/{flip-icon-search-strong.entry.ec0849a6.js → flip-icon-search-strong.entry.afcf6af9.js} +1 -1
- package/dist/{flip-icon-cancel_2.entry.eb8d1a8c.js → flip-icon-search.entry.0f103075.js} +3 -13
- package/dist/{flip-icon-send.entry.3f80869c.js → flip-icon-send.entry.fd3001a2.js} +1 -1
- package/dist/{flip-icon-settings.entry.c86a7bca.js → flip-icon-settings.entry.2b1e4bb0.js} +1 -1
- package/dist/{flip-icon-time-filled.entry.ad86a08f.js → flip-icon-time-filled.entry.7fa814d7.js} +1 -1
- package/dist/{flip-icon-time-outlined.entry.75a29f76.js → flip-icon-time-outlined.entry.e3f601ce.js} +1 -1
- package/dist/{flip-icon-user-assign.entry.1f331180.js → flip-icon-user-assign.entry.4951e82f.js} +1 -1
- package/dist/{flip-icon-video-camera.entry.40ea3d7d.js → flip-icon-video-camera.entry.74f8a7b6.js} +1 -1
- package/dist/{flip-icon-warning.entry.1c1540b8.js → flip-icon-warning.entry.76ebfb1e.js} +1 -1
- package/dist/{flip-link.entry.fe817ab1.js → flip-link.entry.f67e488c.js} +1 -1
- package/dist/flip-list.entry.5cc5b288.js +18 -0
- package/dist/flip-modal.entry.4921d0b4.js +61 -0
- package/dist/flip-option-list-item.entry.fd1d85dd.js +30 -0
- package/dist/flip-option-list-section.entry.5509895e.js +15 -0
- package/dist/flip-option-list.entry.efe97de9.js +95 -0
- package/dist/flip-pagination.entry.b109c35d.js +27 -0
- package/dist/flip-progress-indicator.entry.b7cf2985.js +18 -0
- package/dist/flip-radio-group.entry.dfc6ef8e.js +35 -0
- package/dist/{flip-radio.entry.817d976d.js → flip-radio.entry.f153fc92.js} +6 -5
- package/dist/flip-resource-list-file-item.entry.26beeeee.js +20 -0
- package/dist/flip-resource-list-item.entry.7cac7a7c.js +41 -0
- package/dist/flip-resource-list.entry.75d10224.js +49 -0
- package/dist/{flip-search.entry.6717d77a.js → flip-search.entry.eccdd9b5.js} +3 -2
- package/dist/{flip-stack.entry.50d88d6f.js → flip-stack.entry.2448bd6b.js} +3 -2
- package/dist/{flip-switch.entry.ef96875e.js → flip-switch.entry.71d04383.js} +3 -2
- package/dist/flip-tab.entry.184626dd.js +18 -0
- package/dist/flip-tabs.entry.9434fd96.js +92 -0
- package/dist/{flip-tag.entry.31a7d0f7.js → flip-tag.entry.5df8a6b4.js} +3 -2
- package/dist/flip-text-input.entry.55decf50.js +55 -0
- package/dist/flip-text.entry.2b6e3f56.js +18 -0
- package/dist/{flip-theme-provider.entry.9c054d33.js → flip-theme-provider.entry.1570cb6b.js} +1 -1
- package/dist/{flip-thumbnail.entry.449e93ef.js → flip-thumbnail.entry.54ea67cf.js} +3 -2
- package/dist/{flip-toast-provider.entry.59025e1a.js → flip-toast-provider.entry.0ee21f8b.js} +1 -1
- package/dist/{flip-toast.entry.78522d59.js → flip-toast.entry.29ea2ead.js} +3 -2
- package/dist/flip-tooltip.entry.e6a904e4.js +94 -0
- package/dist/flip-video-thumbnail.entry.f3cf1c28.js +83 -0
- package/dist/{flip-visually-hidden.entry.ae0ff292.js → flip-visually-hidden.entry.47d25a46.js} +1 -1
- package/dist/floating-ui.dom.esm-1a4e8b8a.87557233.js +752 -0
- package/dist/index-6d2e18c6.289636d4.js +37 -0
- package/dist/index.b6e7bb76.js +1359 -0
- package/dist/index.d.ts +1 -0
- package/dist/stencil-generated/index.d.ts +136 -0
- package/dist/stencil-generated/react-component-lib/createComponent.d.ts +10 -0
- package/dist/stencil-generated/react-component-lib/createOverlayComponent.d.ts +21 -0
- package/dist/stencil-generated/react-component-lib/index.d.ts +2 -0
- package/dist/stencil-generated/react-component-lib/interfaces.d.ts +29 -0
- package/dist/stencil-generated/react-component-lib/utils/attachProps.d.ts +12 -0
- package/dist/stencil-generated/react-component-lib/utils/case.d.ts +2 -0
- package/dist/stencil-generated/react-component-lib/utils/index.d.ts +10 -0
- package/dist/swirl-components-react.js +133 -96
- package/dist/swirl-components-react.umd.cjs +137 -17
- package/dist/utils-b46bcd4f.79126bb2.js +30 -0
- package/dist/vite-env.d.ts +1 -0
- package/package.json +5 -3
- package/dist/flip-avatar-group.entry.71bf1f2a.js +0 -19
- package/dist/flip-badge.entry.ebda6058.js +0 -19
- package/dist/flip-button_2.entry.a323451d.js +0 -42
- package/dist/flip-dialog.entry.f2be9a9c.js +0 -139
- package/dist/flip-icon-expand-less.entry.3e970433.js +0 -15
- package/dist/flip-icon-today.entry.ab272990.js +0 -15
- package/dist/flip-icon-visibility-off.entry.ed4db3b5.js +0 -15
- package/dist/flip-icon-visibility.entry.1a7dfd44.js +0 -15
- package/dist/flip-inline-error.entry.38c26d13.js +0 -17
- package/dist/flip-popover.entry.18c5ead6.js +0 -878
- package/dist/flip-radio-group.entry.187f29ee.js +0 -35
- package/dist/flip-spinner.entry.f8f179be.js +0 -17
- package/dist/flip-tooltip.entry.8b5f35c7.js +0 -102
- package/dist/index-3c78bcaf.2675909b.js +0 -48
- package/dist/main.7e7363a7.js +0 -1322
- package/dist/utils-03e3261c.f5223801.js +0 -16
|
@@ -0,0 +1,752 @@
|
|
|
1
|
+
function k(t) {
|
|
2
|
+
return t.split("-")[0];
|
|
3
|
+
}
|
|
4
|
+
function I(t) {
|
|
5
|
+
return t.split("-")[1];
|
|
6
|
+
}
|
|
7
|
+
function _(t) {
|
|
8
|
+
return ["top", "bottom"].includes(k(t)) ? "x" : "y";
|
|
9
|
+
}
|
|
10
|
+
function ot(t) {
|
|
11
|
+
return t === "y" ? "height" : "width";
|
|
12
|
+
}
|
|
13
|
+
function J(t, e, n) {
|
|
14
|
+
let {
|
|
15
|
+
reference: o,
|
|
16
|
+
floating: i
|
|
17
|
+
} = t;
|
|
18
|
+
const c = o.x + o.width / 2 - i.width / 2, r = o.y + o.height / 2 - i.height / 2, s = _(e), l = ot(s), f = o[l] / 2 - i[l] / 2, h = k(e), a = s === "x";
|
|
19
|
+
let u;
|
|
20
|
+
switch (h) {
|
|
21
|
+
case "top":
|
|
22
|
+
u = {
|
|
23
|
+
x: c,
|
|
24
|
+
y: o.y - i.height
|
|
25
|
+
};
|
|
26
|
+
break;
|
|
27
|
+
case "bottom":
|
|
28
|
+
u = {
|
|
29
|
+
x: c,
|
|
30
|
+
y: o.y + o.height
|
|
31
|
+
};
|
|
32
|
+
break;
|
|
33
|
+
case "right":
|
|
34
|
+
u = {
|
|
35
|
+
x: o.x + o.width,
|
|
36
|
+
y: r
|
|
37
|
+
};
|
|
38
|
+
break;
|
|
39
|
+
case "left":
|
|
40
|
+
u = {
|
|
41
|
+
x: o.x - i.width,
|
|
42
|
+
y: r
|
|
43
|
+
};
|
|
44
|
+
break;
|
|
45
|
+
default:
|
|
46
|
+
u = {
|
|
47
|
+
x: o.x,
|
|
48
|
+
y: o.y
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
switch (I(e)) {
|
|
52
|
+
case "start":
|
|
53
|
+
u[s] -= f * (n && a ? -1 : 1);
|
|
54
|
+
break;
|
|
55
|
+
case "end":
|
|
56
|
+
u[s] += f * (n && a ? -1 : 1);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
return u;
|
|
60
|
+
}
|
|
61
|
+
const ht = async (t, e, n) => {
|
|
62
|
+
const {
|
|
63
|
+
placement: o = "bottom",
|
|
64
|
+
strategy: i = "absolute",
|
|
65
|
+
middleware: c = [],
|
|
66
|
+
platform: r
|
|
67
|
+
} = n, s = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
68
|
+
let l = await r.getElementRects({
|
|
69
|
+
reference: t,
|
|
70
|
+
floating: e,
|
|
71
|
+
strategy: i
|
|
72
|
+
}), {
|
|
73
|
+
x: f,
|
|
74
|
+
y: h
|
|
75
|
+
} = J(l, o, s), a = o, u = {}, m = 0;
|
|
76
|
+
for (let g = 0; g < c.length; g++) {
|
|
77
|
+
const {
|
|
78
|
+
name: d,
|
|
79
|
+
fn: p
|
|
80
|
+
} = c[g], {
|
|
81
|
+
x: w,
|
|
82
|
+
y: x,
|
|
83
|
+
data: A,
|
|
84
|
+
reset: y
|
|
85
|
+
} = await p({
|
|
86
|
+
x: f,
|
|
87
|
+
y: h,
|
|
88
|
+
initialPlacement: o,
|
|
89
|
+
placement: a,
|
|
90
|
+
strategy: i,
|
|
91
|
+
middlewareData: u,
|
|
92
|
+
rects: l,
|
|
93
|
+
platform: r,
|
|
94
|
+
elements: {
|
|
95
|
+
reference: t,
|
|
96
|
+
floating: e
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
if (f = w != null ? w : f, h = x != null ? x : h, u = {
|
|
100
|
+
...u,
|
|
101
|
+
[d]: {
|
|
102
|
+
...u[d],
|
|
103
|
+
...A
|
|
104
|
+
}
|
|
105
|
+
}, y && m <= 50) {
|
|
106
|
+
m++, typeof y == "object" && (y.placement && (a = y.placement), y.rects && (l = y.rects === !0 ? await r.getElementRects({
|
|
107
|
+
reference: t,
|
|
108
|
+
floating: e,
|
|
109
|
+
strategy: i
|
|
110
|
+
}) : y.rects), {
|
|
111
|
+
x: f,
|
|
112
|
+
y: h
|
|
113
|
+
} = J(l, a, s)), g = -1;
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
x: f,
|
|
119
|
+
y: h,
|
|
120
|
+
placement: a,
|
|
121
|
+
strategy: i,
|
|
122
|
+
middlewareData: u
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
function mt(t) {
|
|
126
|
+
return {
|
|
127
|
+
top: 0,
|
|
128
|
+
right: 0,
|
|
129
|
+
bottom: 0,
|
|
130
|
+
left: 0,
|
|
131
|
+
...t
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
function gt(t) {
|
|
135
|
+
return typeof t != "number" ? mt(t) : {
|
|
136
|
+
top: t,
|
|
137
|
+
right: t,
|
|
138
|
+
bottom: t,
|
|
139
|
+
left: t
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
function B(t) {
|
|
143
|
+
return {
|
|
144
|
+
...t,
|
|
145
|
+
top: t.y,
|
|
146
|
+
left: t.x,
|
|
147
|
+
right: t.x + t.width,
|
|
148
|
+
bottom: t.y + t.height
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
async function it(t, e) {
|
|
152
|
+
var n;
|
|
153
|
+
e === void 0 && (e = {});
|
|
154
|
+
const {
|
|
155
|
+
x: o,
|
|
156
|
+
y: i,
|
|
157
|
+
platform: c,
|
|
158
|
+
rects: r,
|
|
159
|
+
elements: s,
|
|
160
|
+
strategy: l
|
|
161
|
+
} = t, {
|
|
162
|
+
boundary: f = "clippingAncestors",
|
|
163
|
+
rootBoundary: h = "viewport",
|
|
164
|
+
elementContext: a = "floating",
|
|
165
|
+
altBoundary: u = !1,
|
|
166
|
+
padding: m = 0
|
|
167
|
+
} = e, g = gt(m), p = s[u ? a === "floating" ? "reference" : "floating" : a], w = B(await c.getClippingRect({
|
|
168
|
+
element: (n = await (c.isElement == null ? void 0 : c.isElement(p))) == null || n ? p : p.contextElement || await (c.getDocumentElement == null ? void 0 : c.getDocumentElement(s.floating)),
|
|
169
|
+
boundary: f,
|
|
170
|
+
rootBoundary: h,
|
|
171
|
+
strategy: l
|
|
172
|
+
})), x = B(c.convertOffsetParentRelativeRectToViewportRelativeRect ? await c.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
173
|
+
rect: a === "floating" ? {
|
|
174
|
+
...r.floating,
|
|
175
|
+
x: o,
|
|
176
|
+
y: i
|
|
177
|
+
} : r.reference,
|
|
178
|
+
offsetParent: await (c.getOffsetParent == null ? void 0 : c.getOffsetParent(s.floating)),
|
|
179
|
+
strategy: l
|
|
180
|
+
}) : r[a]);
|
|
181
|
+
return {
|
|
182
|
+
top: w.top - x.top + g.top,
|
|
183
|
+
bottom: x.bottom - w.bottom + g.bottom,
|
|
184
|
+
left: w.left - x.left + g.left,
|
|
185
|
+
right: x.right - w.right + g.right
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
const pt = Math.min, wt = Math.max;
|
|
189
|
+
function K(t, e, n) {
|
|
190
|
+
return wt(t, pt(e, n));
|
|
191
|
+
}
|
|
192
|
+
const xt = {
|
|
193
|
+
left: "right",
|
|
194
|
+
right: "left",
|
|
195
|
+
bottom: "top",
|
|
196
|
+
top: "bottom"
|
|
197
|
+
};
|
|
198
|
+
function M(t) {
|
|
199
|
+
return t.replace(/left|right|bottom|top/g, (e) => xt[e]);
|
|
200
|
+
}
|
|
201
|
+
function yt(t, e, n) {
|
|
202
|
+
n === void 0 && (n = !1);
|
|
203
|
+
const o = I(t), i = _(t), c = ot(i);
|
|
204
|
+
let r = i === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
205
|
+
return e.reference[c] > e.floating[c] && (r = M(r)), {
|
|
206
|
+
main: r,
|
|
207
|
+
cross: M(r)
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
const vt = {
|
|
211
|
+
start: "end",
|
|
212
|
+
end: "start"
|
|
213
|
+
};
|
|
214
|
+
function Q(t) {
|
|
215
|
+
return t.replace(/start|end/g, (e) => vt[e]);
|
|
216
|
+
}
|
|
217
|
+
function bt(t) {
|
|
218
|
+
const e = M(t);
|
|
219
|
+
return [Q(t), e, Q(e)];
|
|
220
|
+
}
|
|
221
|
+
const Mt = function(t) {
|
|
222
|
+
return t === void 0 && (t = {}), {
|
|
223
|
+
name: "flip",
|
|
224
|
+
options: t,
|
|
225
|
+
async fn(e) {
|
|
226
|
+
var n;
|
|
227
|
+
const {
|
|
228
|
+
placement: o,
|
|
229
|
+
middlewareData: i,
|
|
230
|
+
rects: c,
|
|
231
|
+
initialPlacement: r,
|
|
232
|
+
platform: s,
|
|
233
|
+
elements: l
|
|
234
|
+
} = e, {
|
|
235
|
+
mainAxis: f = !0,
|
|
236
|
+
crossAxis: h = !0,
|
|
237
|
+
fallbackPlacements: a,
|
|
238
|
+
fallbackStrategy: u = "bestFit",
|
|
239
|
+
flipAlignment: m = !0,
|
|
240
|
+
...g
|
|
241
|
+
} = t, d = k(o), w = a || (d === r || !m ? [M(r)] : bt(r)), x = [r, ...w], A = await it(e, g), y = [];
|
|
242
|
+
let D = ((n = i.flip) == null ? void 0 : n.overflows) || [];
|
|
243
|
+
if (f && y.push(A[d]), h) {
|
|
244
|
+
const {
|
|
245
|
+
main: P,
|
|
246
|
+
cross: N
|
|
247
|
+
} = yt(o, c, await (s.isRTL == null ? void 0 : s.isRTL(l.floating)));
|
|
248
|
+
y.push(A[P], A[N]);
|
|
249
|
+
}
|
|
250
|
+
if (D = [...D, {
|
|
251
|
+
placement: o,
|
|
252
|
+
overflows: y
|
|
253
|
+
}], !y.every((P) => P <= 0)) {
|
|
254
|
+
var Y, U;
|
|
255
|
+
const P = ((Y = (U = i.flip) == null ? void 0 : U.index) != null ? Y : 0) + 1, N = x[P];
|
|
256
|
+
if (N)
|
|
257
|
+
return {
|
|
258
|
+
data: {
|
|
259
|
+
index: P,
|
|
260
|
+
overflows: D
|
|
261
|
+
},
|
|
262
|
+
reset: {
|
|
263
|
+
placement: N
|
|
264
|
+
}
|
|
265
|
+
};
|
|
266
|
+
let W = "bottom";
|
|
267
|
+
switch (u) {
|
|
268
|
+
case "bestFit": {
|
|
269
|
+
var q;
|
|
270
|
+
const G = (q = D.map((H) => [H, H.overflows.filter((S) => S > 0).reduce((S, dt) => S + dt, 0)]).sort((H, S) => H[1] - S[1])[0]) == null ? void 0 : q[0].placement;
|
|
271
|
+
G && (W = G);
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
case "initialPlacement":
|
|
275
|
+
W = r;
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
if (o !== W)
|
|
279
|
+
return {
|
|
280
|
+
reset: {
|
|
281
|
+
placement: W
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
return {};
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
async function At(t, e) {
|
|
290
|
+
const {
|
|
291
|
+
placement: n,
|
|
292
|
+
platform: o,
|
|
293
|
+
elements: i
|
|
294
|
+
} = t, c = await (o.isRTL == null ? void 0 : o.isRTL(i.floating)), r = k(n), s = I(n), l = _(n) === "x", f = ["left", "top"].includes(r) ? -1 : 1, h = c && l ? -1 : 1, a = typeof e == "function" ? e(t) : e;
|
|
295
|
+
let {
|
|
296
|
+
mainAxis: u,
|
|
297
|
+
crossAxis: m,
|
|
298
|
+
alignmentAxis: g
|
|
299
|
+
} = typeof a == "number" ? {
|
|
300
|
+
mainAxis: a,
|
|
301
|
+
crossAxis: 0,
|
|
302
|
+
alignmentAxis: null
|
|
303
|
+
} : {
|
|
304
|
+
mainAxis: 0,
|
|
305
|
+
crossAxis: 0,
|
|
306
|
+
alignmentAxis: null,
|
|
307
|
+
...a
|
|
308
|
+
};
|
|
309
|
+
return s && typeof g == "number" && (m = s === "end" ? g * -1 : g), l ? {
|
|
310
|
+
x: m * h,
|
|
311
|
+
y: u * f
|
|
312
|
+
} : {
|
|
313
|
+
x: u * f,
|
|
314
|
+
y: m * h
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
const Ft = function(t) {
|
|
318
|
+
return t === void 0 && (t = 0), {
|
|
319
|
+
name: "offset",
|
|
320
|
+
options: t,
|
|
321
|
+
async fn(e) {
|
|
322
|
+
const {
|
|
323
|
+
x: n,
|
|
324
|
+
y: o
|
|
325
|
+
} = e, i = await At(e, t);
|
|
326
|
+
return {
|
|
327
|
+
x: n + i.x,
|
|
328
|
+
y: o + i.y,
|
|
329
|
+
data: i
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
function Rt(t) {
|
|
335
|
+
return t === "x" ? "y" : "x";
|
|
336
|
+
}
|
|
337
|
+
const $t = function(t) {
|
|
338
|
+
return t === void 0 && (t = {}), {
|
|
339
|
+
name: "shift",
|
|
340
|
+
options: t,
|
|
341
|
+
async fn(e) {
|
|
342
|
+
const {
|
|
343
|
+
x: n,
|
|
344
|
+
y: o,
|
|
345
|
+
placement: i
|
|
346
|
+
} = e, {
|
|
347
|
+
mainAxis: c = !0,
|
|
348
|
+
crossAxis: r = !1,
|
|
349
|
+
limiter: s = {
|
|
350
|
+
fn: (p) => {
|
|
351
|
+
let {
|
|
352
|
+
x: w,
|
|
353
|
+
y: x
|
|
354
|
+
} = p;
|
|
355
|
+
return {
|
|
356
|
+
x: w,
|
|
357
|
+
y: x
|
|
358
|
+
};
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
...l
|
|
362
|
+
} = t, f = {
|
|
363
|
+
x: n,
|
|
364
|
+
y: o
|
|
365
|
+
}, h = await it(e, l), a = _(k(i)), u = Rt(a);
|
|
366
|
+
let m = f[a], g = f[u];
|
|
367
|
+
if (c) {
|
|
368
|
+
const p = a === "y" ? "top" : "left", w = a === "y" ? "bottom" : "right", x = m + h[p], A = m - h[w];
|
|
369
|
+
m = K(x, m, A);
|
|
370
|
+
}
|
|
371
|
+
if (r) {
|
|
372
|
+
const p = u === "y" ? "top" : "left", w = u === "y" ? "bottom" : "right", x = g + h[p], A = g - h[w];
|
|
373
|
+
g = K(x, g, A);
|
|
374
|
+
}
|
|
375
|
+
const d = s.fn({
|
|
376
|
+
...e,
|
|
377
|
+
[a]: m,
|
|
378
|
+
[u]: g
|
|
379
|
+
});
|
|
380
|
+
return {
|
|
381
|
+
...d,
|
|
382
|
+
data: {
|
|
383
|
+
x: d.x - n,
|
|
384
|
+
y: d.y - o
|
|
385
|
+
}
|
|
386
|
+
};
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
};
|
|
390
|
+
function st(t) {
|
|
391
|
+
return t && t.document && t.location && t.alert && t.setInterval;
|
|
392
|
+
}
|
|
393
|
+
function E(t) {
|
|
394
|
+
if (t == null)
|
|
395
|
+
return window;
|
|
396
|
+
if (!st(t)) {
|
|
397
|
+
const e = t.ownerDocument;
|
|
398
|
+
return e && e.defaultView || window;
|
|
399
|
+
}
|
|
400
|
+
return t;
|
|
401
|
+
}
|
|
402
|
+
function v(t) {
|
|
403
|
+
return E(t).getComputedStyle(t);
|
|
404
|
+
}
|
|
405
|
+
function R(t) {
|
|
406
|
+
return st(t) ? "" : t ? (t.nodeName || "").toLowerCase() : "";
|
|
407
|
+
}
|
|
408
|
+
function rt() {
|
|
409
|
+
const t = navigator.userAgentData;
|
|
410
|
+
return t != null && t.brands ? t.brands.map((e) => e.brand + "/" + e.version).join(" ") : navigator.userAgent;
|
|
411
|
+
}
|
|
412
|
+
function b(t) {
|
|
413
|
+
return t instanceof E(t).HTMLElement;
|
|
414
|
+
}
|
|
415
|
+
function L(t) {
|
|
416
|
+
return t instanceof E(t).Element;
|
|
417
|
+
}
|
|
418
|
+
function Ct(t) {
|
|
419
|
+
return t instanceof E(t).Node;
|
|
420
|
+
}
|
|
421
|
+
function T(t) {
|
|
422
|
+
if (typeof ShadowRoot > "u")
|
|
423
|
+
return !1;
|
|
424
|
+
const e = E(t).ShadowRoot;
|
|
425
|
+
return t instanceof e || t instanceof ShadowRoot;
|
|
426
|
+
}
|
|
427
|
+
function z(t) {
|
|
428
|
+
const {
|
|
429
|
+
overflow: e,
|
|
430
|
+
overflowX: n,
|
|
431
|
+
overflowY: o
|
|
432
|
+
} = v(t);
|
|
433
|
+
return /auto|scroll|overlay|hidden/.test(e + o + n);
|
|
434
|
+
}
|
|
435
|
+
function Et(t) {
|
|
436
|
+
return ["table", "td", "th"].includes(R(t));
|
|
437
|
+
}
|
|
438
|
+
function ct(t) {
|
|
439
|
+
const e = /firefox/i.test(rt()), n = v(t);
|
|
440
|
+
return n.transform !== "none" || n.perspective !== "none" || n.contain === "paint" || ["transform", "perspective"].includes(n.willChange) || e && n.willChange === "filter" || e && (n.filter ? n.filter !== "none" : !1);
|
|
441
|
+
}
|
|
442
|
+
function lt() {
|
|
443
|
+
return !/^((?!chrome|android).)*safari/i.test(rt());
|
|
444
|
+
}
|
|
445
|
+
const Z = Math.min, V = Math.max, F = Math.round;
|
|
446
|
+
function C(t, e, n) {
|
|
447
|
+
var o, i, c, r;
|
|
448
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
449
|
+
const s = t.getBoundingClientRect();
|
|
450
|
+
let l = 1, f = 1;
|
|
451
|
+
e && b(t) && (l = t.offsetWidth > 0 && F(s.width) / t.offsetWidth || 1, f = t.offsetHeight > 0 && F(s.height) / t.offsetHeight || 1);
|
|
452
|
+
const h = L(t) ? E(t) : window, a = !lt() && n, u = (s.left + (a && (o = (i = h.visualViewport) == null ? void 0 : i.offsetLeft) != null ? o : 0)) / l, m = (s.top + (a && (c = (r = h.visualViewport) == null ? void 0 : r.offsetTop) != null ? c : 0)) / f, g = s.width / l, d = s.height / f;
|
|
453
|
+
return {
|
|
454
|
+
width: g,
|
|
455
|
+
height: d,
|
|
456
|
+
top: m,
|
|
457
|
+
right: u + g,
|
|
458
|
+
bottom: m + d,
|
|
459
|
+
left: u,
|
|
460
|
+
x: u,
|
|
461
|
+
y: m
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
function O(t) {
|
|
465
|
+
return ((Ct(t) ? t.ownerDocument : t.document) || window.document).documentElement;
|
|
466
|
+
}
|
|
467
|
+
function X(t) {
|
|
468
|
+
return L(t) ? {
|
|
469
|
+
scrollLeft: t.scrollLeft,
|
|
470
|
+
scrollTop: t.scrollTop
|
|
471
|
+
} : {
|
|
472
|
+
scrollLeft: t.pageXOffset,
|
|
473
|
+
scrollTop: t.pageYOffset
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
function ft(t) {
|
|
477
|
+
return C(O(t)).left + X(t).scrollLeft;
|
|
478
|
+
}
|
|
479
|
+
function Lt(t) {
|
|
480
|
+
const e = C(t);
|
|
481
|
+
return F(e.width) !== t.offsetWidth || F(e.height) !== t.offsetHeight;
|
|
482
|
+
}
|
|
483
|
+
function Ot(t, e, n) {
|
|
484
|
+
const o = b(e), i = O(e), c = C(
|
|
485
|
+
t,
|
|
486
|
+
o && Lt(e),
|
|
487
|
+
n === "fixed"
|
|
488
|
+
);
|
|
489
|
+
let r = {
|
|
490
|
+
scrollLeft: 0,
|
|
491
|
+
scrollTop: 0
|
|
492
|
+
};
|
|
493
|
+
const s = {
|
|
494
|
+
x: 0,
|
|
495
|
+
y: 0
|
|
496
|
+
};
|
|
497
|
+
if (o || !o && n !== "fixed")
|
|
498
|
+
if ((R(e) !== "body" || z(i)) && (r = X(e)), b(e)) {
|
|
499
|
+
const l = C(e, !0);
|
|
500
|
+
s.x = l.x + e.clientLeft, s.y = l.y + e.clientTop;
|
|
501
|
+
} else
|
|
502
|
+
i && (s.x = ft(i));
|
|
503
|
+
return {
|
|
504
|
+
x: c.left + r.scrollLeft - s.x,
|
|
505
|
+
y: c.top + r.scrollTop - s.y,
|
|
506
|
+
width: c.width,
|
|
507
|
+
height: c.height
|
|
508
|
+
};
|
|
509
|
+
}
|
|
510
|
+
function at(t) {
|
|
511
|
+
return R(t) === "html" ? t : t.assignedSlot || t.parentNode || (T(t) ? t.host : null) || O(t);
|
|
512
|
+
}
|
|
513
|
+
function tt(t) {
|
|
514
|
+
return !b(t) || v(t).position === "fixed" ? null : Pt(t);
|
|
515
|
+
}
|
|
516
|
+
function Pt(t) {
|
|
517
|
+
let {
|
|
518
|
+
offsetParent: e
|
|
519
|
+
} = t, n = t, o = !1;
|
|
520
|
+
for (; n && n !== e; ) {
|
|
521
|
+
const {
|
|
522
|
+
assignedSlot: i
|
|
523
|
+
} = n;
|
|
524
|
+
if (i) {
|
|
525
|
+
let c = i.offsetParent;
|
|
526
|
+
if (v(i).display === "contents") {
|
|
527
|
+
const r = i.hasAttribute("style"), s = i.style.display;
|
|
528
|
+
i.style.display = v(n).display, c = i.offsetParent, i.style.display = s, r || i.removeAttribute("style");
|
|
529
|
+
}
|
|
530
|
+
n = i, e !== c && (e = c, o = !0);
|
|
531
|
+
} else if (T(n) && n.host && o)
|
|
532
|
+
break;
|
|
533
|
+
n = T(n) && n.host || n.parentNode;
|
|
534
|
+
}
|
|
535
|
+
return e;
|
|
536
|
+
}
|
|
537
|
+
function Tt(t) {
|
|
538
|
+
let e = at(t);
|
|
539
|
+
for (T(e) && (e = e.host); b(e) && !["html", "body"].includes(R(e)); ) {
|
|
540
|
+
if (ct(e))
|
|
541
|
+
return e;
|
|
542
|
+
{
|
|
543
|
+
const n = e.parentNode;
|
|
544
|
+
e = T(n) ? n.host : n;
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
function j(t) {
|
|
550
|
+
const e = E(t);
|
|
551
|
+
let n = tt(t);
|
|
552
|
+
for (; n && Et(n) && v(n).position === "static"; )
|
|
553
|
+
n = tt(n);
|
|
554
|
+
return n && (R(n) === "html" || R(n) === "body" && v(n).position === "static" && !ct(n)) ? e : n || Tt(t) || e;
|
|
555
|
+
}
|
|
556
|
+
function et(t) {
|
|
557
|
+
if (b(t))
|
|
558
|
+
return {
|
|
559
|
+
width: t.offsetWidth,
|
|
560
|
+
height: t.offsetHeight
|
|
561
|
+
};
|
|
562
|
+
const e = C(t);
|
|
563
|
+
return {
|
|
564
|
+
width: e.width,
|
|
565
|
+
height: e.height
|
|
566
|
+
};
|
|
567
|
+
}
|
|
568
|
+
function St(t) {
|
|
569
|
+
let {
|
|
570
|
+
rect: e,
|
|
571
|
+
offsetParent: n,
|
|
572
|
+
strategy: o
|
|
573
|
+
} = t;
|
|
574
|
+
const i = b(n), c = O(n);
|
|
575
|
+
if (n === c)
|
|
576
|
+
return e;
|
|
577
|
+
let r = {
|
|
578
|
+
scrollLeft: 0,
|
|
579
|
+
scrollTop: 0
|
|
580
|
+
};
|
|
581
|
+
const s = {
|
|
582
|
+
x: 0,
|
|
583
|
+
y: 0
|
|
584
|
+
};
|
|
585
|
+
if ((i || !i && o !== "fixed") && ((R(n) !== "body" || z(c)) && (r = X(n)), b(n))) {
|
|
586
|
+
const l = C(n, !0);
|
|
587
|
+
s.x = l.x + n.clientLeft, s.y = l.y + n.clientTop;
|
|
588
|
+
}
|
|
589
|
+
return {
|
|
590
|
+
...e,
|
|
591
|
+
x: e.x - r.scrollLeft + s.x,
|
|
592
|
+
y: e.y - r.scrollTop + s.y
|
|
593
|
+
};
|
|
594
|
+
}
|
|
595
|
+
function Vt(t, e) {
|
|
596
|
+
const n = E(t), o = O(t), i = n.visualViewport;
|
|
597
|
+
let c = o.clientWidth, r = o.clientHeight, s = 0, l = 0;
|
|
598
|
+
if (i) {
|
|
599
|
+
c = i.width, r = i.height;
|
|
600
|
+
const f = lt();
|
|
601
|
+
(f || !f && e === "fixed") && (s = i.offsetLeft, l = i.offsetTop);
|
|
602
|
+
}
|
|
603
|
+
return {
|
|
604
|
+
width: c,
|
|
605
|
+
height: r,
|
|
606
|
+
x: s,
|
|
607
|
+
y: l
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
function kt(t) {
|
|
611
|
+
var e;
|
|
612
|
+
const n = O(t), o = X(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, c = V(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), r = V(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0);
|
|
613
|
+
let s = -o.scrollLeft + ft(t);
|
|
614
|
+
const l = -o.scrollTop;
|
|
615
|
+
return v(i || n).direction === "rtl" && (s += V(n.clientWidth, i ? i.clientWidth : 0) - c), {
|
|
616
|
+
width: c,
|
|
617
|
+
height: r,
|
|
618
|
+
x: s,
|
|
619
|
+
y: l
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
function ut(t) {
|
|
623
|
+
const e = at(t);
|
|
624
|
+
return ["html", "body", "#document"].includes(R(e)) ? t.ownerDocument.body : b(e) && z(e) ? e : ut(e);
|
|
625
|
+
}
|
|
626
|
+
function $(t, e) {
|
|
627
|
+
var n;
|
|
628
|
+
e === void 0 && (e = []);
|
|
629
|
+
const o = ut(t), i = o === ((n = t.ownerDocument) == null ? void 0 : n.body), c = E(o), r = i ? [c].concat(c.visualViewport || [], z(o) ? o : []) : o, s = e.concat(r);
|
|
630
|
+
return i ? s : s.concat($(r));
|
|
631
|
+
}
|
|
632
|
+
function Dt(t, e) {
|
|
633
|
+
const n = e.getRootNode == null ? void 0 : e.getRootNode();
|
|
634
|
+
if (t.contains(e))
|
|
635
|
+
return !0;
|
|
636
|
+
if (n && T(n)) {
|
|
637
|
+
let o = e;
|
|
638
|
+
do {
|
|
639
|
+
if (o && t === o)
|
|
640
|
+
return !0;
|
|
641
|
+
o = o.parentNode || o.host;
|
|
642
|
+
} while (o);
|
|
643
|
+
}
|
|
644
|
+
return !1;
|
|
645
|
+
}
|
|
646
|
+
function Nt(t, e) {
|
|
647
|
+
const n = C(t, !1, e === "fixed"), o = n.top + t.clientTop, i = n.left + t.clientLeft;
|
|
648
|
+
return {
|
|
649
|
+
top: o,
|
|
650
|
+
left: i,
|
|
651
|
+
x: i,
|
|
652
|
+
y: o,
|
|
653
|
+
right: i + t.clientWidth,
|
|
654
|
+
bottom: o + t.clientHeight,
|
|
655
|
+
width: t.clientWidth,
|
|
656
|
+
height: t.clientHeight
|
|
657
|
+
};
|
|
658
|
+
}
|
|
659
|
+
function nt(t, e, n) {
|
|
660
|
+
return e === "viewport" ? B(Vt(t, n)) : L(e) ? Nt(e, n) : B(kt(O(t)));
|
|
661
|
+
}
|
|
662
|
+
function Wt(t) {
|
|
663
|
+
const e = $(t), o = ["absolute", "fixed"].includes(v(t).position) && b(t) ? j(t) : t;
|
|
664
|
+
return L(o) ? e.filter((i) => L(i) && Dt(i, o) && R(i) !== "body") : [];
|
|
665
|
+
}
|
|
666
|
+
function Ht(t) {
|
|
667
|
+
let {
|
|
668
|
+
element: e,
|
|
669
|
+
boundary: n,
|
|
670
|
+
rootBoundary: o,
|
|
671
|
+
strategy: i
|
|
672
|
+
} = t;
|
|
673
|
+
const r = [...n === "clippingAncestors" ? Wt(e) : [].concat(n), o], s = r[0], l = r.reduce((f, h) => {
|
|
674
|
+
const a = nt(e, h, i);
|
|
675
|
+
return f.top = V(a.top, f.top), f.right = Z(a.right, f.right), f.bottom = Z(a.bottom, f.bottom), f.left = V(a.left, f.left), f;
|
|
676
|
+
}, nt(e, s, i));
|
|
677
|
+
return {
|
|
678
|
+
width: l.right - l.left,
|
|
679
|
+
height: l.bottom - l.top,
|
|
680
|
+
x: l.left,
|
|
681
|
+
y: l.top
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
const Bt = {
|
|
685
|
+
getClippingRect: Ht,
|
|
686
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: St,
|
|
687
|
+
isElement: L,
|
|
688
|
+
getDimensions: et,
|
|
689
|
+
getOffsetParent: j,
|
|
690
|
+
getDocumentElement: O,
|
|
691
|
+
getElementRects: (t) => {
|
|
692
|
+
let {
|
|
693
|
+
reference: e,
|
|
694
|
+
floating: n,
|
|
695
|
+
strategy: o
|
|
696
|
+
} = t;
|
|
697
|
+
return {
|
|
698
|
+
reference: Ot(e, j(n), o),
|
|
699
|
+
floating: {
|
|
700
|
+
...et(n),
|
|
701
|
+
x: 0,
|
|
702
|
+
y: 0
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
},
|
|
706
|
+
getClientRects: (t) => Array.from(t.getClientRects()),
|
|
707
|
+
isRTL: (t) => v(t).direction === "rtl"
|
|
708
|
+
};
|
|
709
|
+
function _t(t, e, n, o) {
|
|
710
|
+
o === void 0 && (o = {});
|
|
711
|
+
const {
|
|
712
|
+
ancestorScroll: i = !0,
|
|
713
|
+
ancestorResize: c = !0,
|
|
714
|
+
elementResize: r = !0,
|
|
715
|
+
animationFrame: s = !1
|
|
716
|
+
} = o, l = i && !s, f = c && !s, h = l || f ? [...L(t) ? $(t) : [], ...$(e)] : [];
|
|
717
|
+
h.forEach((d) => {
|
|
718
|
+
l && d.addEventListener("scroll", n, {
|
|
719
|
+
passive: !0
|
|
720
|
+
}), f && d.addEventListener("resize", n);
|
|
721
|
+
});
|
|
722
|
+
let a = null;
|
|
723
|
+
if (r) {
|
|
724
|
+
let d = !0;
|
|
725
|
+
a = new ResizeObserver(() => {
|
|
726
|
+
d || n(), d = !1;
|
|
727
|
+
}), L(t) && !s && a.observe(t), a.observe(e);
|
|
728
|
+
}
|
|
729
|
+
let u, m = s ? C(t) : null;
|
|
730
|
+
s && g();
|
|
731
|
+
function g() {
|
|
732
|
+
const d = C(t);
|
|
733
|
+
m && (d.x !== m.x || d.y !== m.y || d.width !== m.width || d.height !== m.height) && n(), m = d, u = requestAnimationFrame(g);
|
|
734
|
+
}
|
|
735
|
+
return n(), () => {
|
|
736
|
+
var d;
|
|
737
|
+
h.forEach((p) => {
|
|
738
|
+
l && p.removeEventListener("scroll", n), f && p.removeEventListener("resize", n);
|
|
739
|
+
}), (d = a) == null || d.disconnect(), a = null, s && cancelAnimationFrame(u);
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
const zt = (t, e, n) => ht(t, e, {
|
|
743
|
+
platform: Bt,
|
|
744
|
+
...n
|
|
745
|
+
});
|
|
746
|
+
export {
|
|
747
|
+
_t as a,
|
|
748
|
+
zt as c,
|
|
749
|
+
Mt as f,
|
|
750
|
+
Ft as o,
|
|
751
|
+
$t as s
|
|
752
|
+
};
|