@luzmo/lucero 0.0.3 → 0.0.4

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 (179) hide show
  1. package/lib/accordion/index.cjs +43 -0
  2. package/lib/accordion/index.js +182 -0
  3. package/lib/action-bar/index.cjs +39 -0
  4. package/lib/action-bar/index.js +108 -0
  5. package/lib/action-button/index.cjs +24 -0
  6. package/lib/action-button/index.js +162 -0
  7. package/lib/action-group/index.cjs +18 -0
  8. package/lib/action-group/index.js +29 -0
  9. package/lib/action-group-BoIH8s8R.js +259 -0
  10. package/lib/action-group-D4MxBrq8.cjs +20 -0
  11. package/lib/action-menu/index.cjs +56 -0
  12. package/lib/action-menu/index.js +127 -0
  13. package/lib/async-directive-CV2MII86.cjs +22 -0
  14. package/lib/async-directive-FGzMycjH.js +82 -0
  15. package/lib/avatar/index.cjs +24 -0
  16. package/lib/avatar/index.js +82 -0
  17. package/lib/base-BCmA9Wxv.cjs +30 -0
  18. package/lib/base-BjTwmyRF.cjs +22 -0
  19. package/lib/base-D76d76ww.js +26 -0
  20. package/lib/base-nYalvNMy.js +390 -0
  21. package/lib/button/index.cjs +20 -0
  22. package/lib/button/index.js +128 -0
  23. package/lib/button-base-B0iB_JTv.cjs +25 -0
  24. package/lib/button-base-DgtT6sU5.js +143 -0
  25. package/lib/button-group/index.cjs +18 -0
  26. package/lib/button-group/index.js +60 -0
  27. package/lib/checkbox/index.cjs +25 -0
  28. package/lib/checkbox/index.js +97 -0
  29. package/lib/checkbox-mixin-DegQlk5C.js +71 -0
  30. package/lib/checkbox-mixin-H0Hm-VLk.cjs +27 -0
  31. package/lib/clear-button-Ap5H3UyH.js +54 -0
  32. package/lib/clear-button-D0djuaLb.cjs +18 -0
  33. package/lib/close-button-BrfeZvjk.cjs +18 -0
  34. package/lib/close-button-CGISEF33.js +52 -0
  35. package/lib/color-Bg3tYsAQ.js +178 -0
  36. package/lib/color-DphK4hwx.cjs +18 -0
  37. package/lib/color-area/index.cjs +80 -0
  38. package/lib/color-area/index.js +373 -0
  39. package/lib/color-field/index.cjs +23 -0
  40. package/lib/color-field/index.js +81 -0
  41. package/lib/color-handle/index.cjs +24 -0
  42. package/lib/color-handle/index.js +74 -0
  43. package/lib/color-loupe/index.cjs +18 -0
  44. package/lib/color-loupe/index.js +29 -0
  45. package/lib/color-loupe-BICpNqFs.cjs +56 -0
  46. package/lib/color-loupe-DBEApMDT.js +82 -0
  47. package/lib/color-menu/index.cjs +86 -0
  48. package/lib/color-menu/index.js +204 -0
  49. package/lib/color-picker/index.cjs +48 -0
  50. package/lib/color-picker/index.js +142 -0
  51. package/lib/color-slider/index.cjs +57 -0
  52. package/lib/color-slider/index.js +318 -0
  53. package/lib/condition-attribute-with-id-DrQYZzFS.cjs +18 -0
  54. package/lib/condition-attribute-with-id-Dv4lSRbe.js +31 -0
  55. package/lib/dependency-manger-C5HCkMMB.cjs +18 -0
  56. package/lib/dependency-manger-CEXvGQUV.js +54 -0
  57. package/lib/directive-C7oCP5Bh.cjs +22 -0
  58. package/lib/directive-helpers-BLDZnGQv.js +28 -0
  59. package/lib/directive-helpers-C2vOfhFx.cjs +22 -0
  60. package/lib/directive-oAbCiebi.js +44 -0
  61. package/lib/divider/index.cjs +18 -0
  62. package/lib/divider/index.js +62 -0
  63. package/lib/divider.module-CXMNveQc.cjs +18 -0
  64. package/lib/divider.module-DwOuLGU3.js +21 -0
  65. package/lib/element-resolution-BvRLGqIU.cjs +18 -0
  66. package/lib/element-resolution-FCUT-wql.js +91 -0
  67. package/lib/field-group/index.cjs +18 -0
  68. package/lib/field-group/index.js +29 -0
  69. package/lib/field-group-CBWafIUV.js +67 -0
  70. package/lib/field-group-TUFvhJkk.cjs +23 -0
  71. package/lib/field-label/index.cjs +18 -0
  72. package/lib/field-label/index.js +29 -0
  73. package/lib/field-label-BK_tk8vP.js +107 -0
  74. package/lib/field-label-BrJaeORz.cjs +25 -0
  75. package/lib/focus-group-DHeTq18L.js +218 -0
  76. package/lib/focus-group-DnxZUBhQ.cjs +18 -0
  77. package/lib/focus-visible-B0P9aY_G.cjs +18 -0
  78. package/lib/focus-visible-DBlJGoEW.js +74 -0
  79. package/lib/focusable-DbUg-3Vp.js +153 -0
  80. package/lib/focusable-Dv_6CFaY.cjs +18 -0
  81. package/lib/focusable-selectors-B4YgbghQ.js +31 -0
  82. package/lib/focusable-selectors-BgFlyFcY.cjs +18 -0
  83. package/lib/icon/index.cjs +18 -0
  84. package/lib/icon/index.js +89 -0
  85. package/lib/if-defined-CYpcjGCb.js +27 -0
  86. package/lib/if-defined-Cv6xanXh.cjs +22 -0
  87. package/lib/index-C1chwzNp.js +727 -0
  88. package/lib/index-DCKCHDTt.cjs +18 -0
  89. package/lib/index-ovT-qVzf.js +928 -0
  90. package/lib/index-yNcLzjhM.cjs +77 -0
  91. package/lib/index.cjs +18 -0
  92. package/lib/index.js +133 -0
  93. package/lib/infield-button/index.cjs +22 -0
  94. package/lib/infield-button/index.js +65 -0
  95. package/lib/label/index.cjs +18 -0
  96. package/lib/label/index.js +52 -0
  97. package/lib/legend-position/index.cjs +27 -0
  98. package/lib/legend-position/index.js +85 -0
  99. package/lib/like-anchor-K8W0QYwC.cjs +32 -0
  100. package/lib/like-anchor-cDeGGeHh.js +70 -0
  101. package/lib/lit-html-B3ugcwD9.js +248 -0
  102. package/lib/lit-html-p4Oxv2-5.cjs +24 -0
  103. package/lib/manage-help-text-2mSEy-AD.js +92 -0
  104. package/lib/manage-help-text-iOk-zmy8.cjs +30 -0
  105. package/lib/menu/index.cjs +18 -0
  106. package/lib/menu/index.js +32 -0
  107. package/lib/multi-language-field/index.cjs +39 -0
  108. package/lib/multi-language-field/index.js +149 -0
  109. package/lib/mutation-controller-DH7YOCyj.js +52 -0
  110. package/lib/mutation-controller-DkOMCW-c.cjs +22 -0
  111. package/lib/number-field/index.cjs +57 -0
  112. package/lib/number-field/index.js +736 -0
  113. package/lib/observe-slot-text-BmsCNJig.cjs +18 -0
  114. package/lib/observe-slot-text-BoFRF-VI.js +87 -0
  115. package/lib/overlay/index.cjs +73 -0
  116. package/lib/overlay/index.js +325 -0
  117. package/lib/overlay-C7QKFqRc.js +2702 -0
  118. package/lib/overlay-DScraBAi.cjs +47 -0
  119. package/lib/pending-state-D5KTK4_1.js +61 -0
  120. package/lib/pending-state-Dbc2HIM2.cjs +26 -0
  121. package/lib/picker/index.cjs +18 -0
  122. package/lib/picker/index.js +32 -0
  123. package/lib/picker--2OCYWnV.js +657 -0
  124. package/lib/picker-B9W7Haf4.cjs +127 -0
  125. package/lib/platform-CQzYNWKq.cjs +18 -0
  126. package/lib/platform-DQYMG7JI.js +54 -0
  127. package/lib/popover/index.cjs +18 -0
  128. package/lib/popover/index.js +29 -0
  129. package/lib/popover-CVbjhSnx.cjs +30 -0
  130. package/lib/popover-ZRVxogyp.js +68 -0
  131. package/lib/progress-circle/index.cjs +18 -0
  132. package/lib/progress-circle/index.js +29 -0
  133. package/lib/progress-circle-CiJoS8J7.cjs +33 -0
  134. package/lib/progress-circle-DpXiqW6a.js +98 -0
  135. package/lib/query-BL-TJj7K.cjs +22 -0
  136. package/lib/query-D_KR_GUc.js +51 -0
  137. package/lib/query-assigned-elements-DjfhL1cl.js +36 -0
  138. package/lib/query-assigned-elements-DsKsfk7G.cjs +22 -0
  139. package/lib/query-assigned-nodes-BcKWmGzy.cjs +22 -0
  140. package/lib/query-assigned-nodes-C76XVPWY.js +36 -0
  141. package/lib/radio/index.cjs +22 -0
  142. package/lib/radio/index.js +192 -0
  143. package/lib/random-id-ByCz1xaq.js +26 -0
  144. package/lib/random-id-CqvckpWe.cjs +18 -0
  145. package/lib/roving-tabindex-By_fCy_e.cjs +18 -0
  146. package/lib/roving-tabindex-DOg4z6ZU.js +66 -0
  147. package/lib/search/index.cjs +45 -0
  148. package/lib/search/index.js +132 -0
  149. package/lib/sized-mixin-BSYHt8nT.cjs +18 -0
  150. package/lib/sized-mixin-Dl0KoEcV.js +63 -0
  151. package/lib/slider/index.cjs +18 -0
  152. package/lib/slider/index.js +1159 -0
  153. package/lib/slottable-request-event-BfUUt1Mh.cjs +18 -0
  154. package/lib/slottable-request-event-DggLA4Rx.js +31 -0
  155. package/lib/state-BAO-13Bs.js +29 -0
  156. package/lib/state-DReJ3hB6.cjs +22 -0
  157. package/lib/streaming-listener-Bw4jE33f.cjs +18 -0
  158. package/lib/streaming-listener-DLo0wkMc.js +125 -0
  159. package/lib/style-map-BjBGQ_u3.cjs +22 -0
  160. package/lib/style-map-BqvQDFJt.js +53 -0
  161. package/lib/swatch/index.cjs +49 -0
  162. package/lib/swatch/index.js +343 -0
  163. package/lib/switch/index.cjs +22 -0
  164. package/lib/switch/index.js +74 -0
  165. package/lib/tags/index.cjs +32 -0
  166. package/lib/tags/index.js +174 -0
  167. package/lib/text-field/index.cjs +21 -0
  168. package/lib/text-field/index.js +62 -0
  169. package/lib/text-field-C6Aa7XOb.cjs +85 -0
  170. package/lib/text-field-DPk332j9.js +315 -0
  171. package/lib/toast/index.cjs +51 -0
  172. package/lib/toast/index.js +154 -0
  173. package/lib/tooltip/index.cjs +45 -0
  174. package/lib/tooltip/index.js +221 -0
  175. package/lib/unit-input/index.cjs +43 -0
  176. package/lib/unit-input/index.js +184 -0
  177. package/lib/when-CDK1Tt5Y.js +28 -0
  178. package/lib/when-CDZyJPvd.cjs +22 -0
  179. package/package.json +2 -2
@@ -0,0 +1,2702 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2025 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ import { r as St } from "./random-id-ByCz1xaq.js";
19
+ import { E as ue, e as pe } from "./element-resolution-FCUT-wql.js";
20
+ import { unsafeCSS as fe, html as ht } from "lit";
21
+ import { L as me, n as z } from "./base-nYalvNMy.js";
22
+ import { r as ge } from "./state-BAO-13Bs.js";
23
+ import { e as te } from "./query-D_KR_GUc.js";
24
+ import { o as ve } from "./query-assigned-elements-DjfhL1cl.js";
25
+ import { o as Ct } from "./if-defined-CYpcjGCb.js";
26
+ import { o as Ut } from "./style-map-BqvQDFJt.js";
27
+ import { u as lt } from "./focusable-selectors-B4YgbghQ.js";
28
+ import { S as ye, r as we } from "./slottable-request-event-DggLA4Rx.js";
29
+ import { c as At } from "./condition-attribute-with-id-Dv4lSRbe.js";
30
+ import { a as be, i as xe } from "./platform-DQYMG7JI.js";
31
+ function Ee(e, t, i = []) {
32
+ for (const [n, o] of t.entries()) {
33
+ const s = e[n], r = s.parentElement || s.getRootNode();
34
+ i[n] && i[n](o), r && r !== s && s.replaceWith(o), delete e[n];
35
+ }
36
+ return t;
37
+ }
38
+ const Pe = (e, t, {
39
+ position: i,
40
+ prepareCallback: n
41
+ } = { position: "beforeend" }) => {
42
+ let { length: o } = e;
43
+ if (o === 0)
44
+ return () => e;
45
+ let s = 1, r = 0;
46
+ (i === "afterbegin" || i === "afterend") && (s = -1, r = o - 1);
47
+ const a = new Array(o), l = new Array(o), h = document.createComment(
48
+ "placeholder for reparented element"
49
+ );
50
+ do {
51
+ const c = e[r];
52
+ n && (l[r] = n(c)), a[r] = h.cloneNode();
53
+ const d = c.parentElement || c.getRootNode();
54
+ d && d !== c && d.replaceChild(a[r], c), t.insertAdjacentElement(i, c), r += s;
55
+ } while (--o > 0);
56
+ return function() {
57
+ return Ee(a, e, l);
58
+ };
59
+ }, Ce = 1e3, Oe = 1e3;
60
+ class Ae {
61
+ constructor(t = {}) {
62
+ this.warmUpDelay = Ce, this.coolDownDelay = Oe, this.isWarm = !1, this.timeout = 0, Object.assign(this, t);
63
+ }
64
+ openTimer(t) {
65
+ if (this.cancelCooldownTimer(), !this.component || t !== this.component)
66
+ return this.component && (this.close(this.component), this.cancelCooldownTimer()), this.component = t, this.isWarm ? Promise.resolve(!1) : (this.promise = new Promise((i) => {
67
+ this.resolve = i, this.timeout = window.setTimeout(() => {
68
+ this.resolve && (this.resolve(!1), this.isWarm = !0);
69
+ }, this.warmUpDelay);
70
+ }), this.promise);
71
+ if (this.promise)
72
+ return this.promise;
73
+ throw new Error("Inconsistent state");
74
+ }
75
+ close(t) {
76
+ this.component && this.component === t && (this.resetCooldownTimer(), this.timeout > 0 && (clearTimeout(this.timeout), this.timeout = 0), this.resolve && (this.resolve(!0), delete this.resolve), delete this.promise, delete this.component);
77
+ }
78
+ resetCooldownTimer() {
79
+ this.isWarm && (this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), this.cooldownTimeout = window.setTimeout(() => {
80
+ this.isWarm = !1, delete this.cooldownTimeout;
81
+ }, this.coolDownDelay));
82
+ }
83
+ cancelCooldownTimer() {
84
+ this.cooldownTimeout && window.clearTimeout(this.cooldownTimeout), delete this.cooldownTimeout;
85
+ }
86
+ }
87
+ const mt = new Ae(), J = () => {
88
+ }, kt = (e, t, i) => {
89
+ const n = new AbortController(), o = /* @__PURE__ */ new Map(), s = () => {
90
+ n.abort(), i();
91
+ };
92
+ let r, a;
93
+ const l = requestAnimationFrame(() => {
94
+ r = requestAnimationFrame(() => {
95
+ a = requestAnimationFrame(() => {
96
+ s();
97
+ });
98
+ });
99
+ }), h = (d) => {
100
+ d.target === e && (o.set(
101
+ d.propertyName,
102
+ o.get(d.propertyName) - 1
103
+ ), o.get(d.propertyName) || o.delete(d.propertyName), o.size === 0 && s());
104
+ }, c = (d) => {
105
+ d.target === e && (o.has(d.propertyName) || o.set(d.propertyName, 0), o.set(
106
+ d.propertyName,
107
+ o.get(d.propertyName) + 1
108
+ ), cancelAnimationFrame(l), cancelAnimationFrame(r), cancelAnimationFrame(a));
109
+ };
110
+ e.addEventListener("transitionrun", c, {
111
+ signal: n.signal
112
+ }), e.addEventListener("transitionend", h, {
113
+ signal: n.signal
114
+ }), e.addEventListener("transitioncancel", h, {
115
+ signal: n.signal
116
+ }), t();
117
+ };
118
+ function R() {
119
+ return new Promise((e) => requestAnimationFrame(() => e()));
120
+ }
121
+ class rt extends me {
122
+ constructor() {
123
+ super(...arguments), this.dispose = J, this.offset = 0, this.willPreventClose = !1;
124
+ }
125
+ applyFocus(t, i) {
126
+ }
127
+ /* c8 ignore next 6 */
128
+ get delayed() {
129
+ return !1;
130
+ }
131
+ set delayed(t) {
132
+ }
133
+ /* c8 ignore next 6 */
134
+ get disabled() {
135
+ return !1;
136
+ }
137
+ set disabled(t) {
138
+ }
139
+ get elementResolver() {
140
+ return this._elementResolver;
141
+ }
142
+ set elementResolver(t) {
143
+ this._elementResolver = t;
144
+ }
145
+ /* c8 ignore next 3 */
146
+ ensureOnDOM(t) {
147
+ }
148
+ /* c8 ignore next 5 */
149
+ makeTransition(t) {
150
+ return null;
151
+ }
152
+ manageDelay(t) {
153
+ }
154
+ /* c8 ignore next 3 */
155
+ manageDialogOpen() {
156
+ }
157
+ /* c8 ignore next 3 */
158
+ managePopoverOpen() {
159
+ }
160
+ /* c8 ignore next 3 */
161
+ managePosition() {
162
+ }
163
+ /* c8 ignore next 6 */
164
+ get open() {
165
+ return !1;
166
+ }
167
+ set open(t) {
168
+ }
169
+ get placementController() {
170
+ return this._placementController;
171
+ }
172
+ set placementController(t) {
173
+ this._placementController = t;
174
+ }
175
+ requestSlottable() {
176
+ }
177
+ returnFocus() {
178
+ }
179
+ /* c8 ignore next 6 */
180
+ get state() {
181
+ return "closed";
182
+ }
183
+ set state(t) {
184
+ }
185
+ /* c8 ignore next 3 */
186
+ manuallyKeepOpen() {
187
+ }
188
+ static update() {
189
+ const t = new CustomEvent("luzmo-update-overlays", {
190
+ bubbles: !0,
191
+ composed: !0,
192
+ cancelable: !0
193
+ });
194
+ document.dispatchEvent(t);
195
+ }
196
+ static async open(t, i, n, o) {
197
+ await Promise.resolve().then(() => Lt);
198
+ const s = arguments.length === 2, r = n || t, a = new this();
199
+ let l = !1;
200
+ const h = Pe([r], a, {
201
+ position: "beforeend",
202
+ prepareCallback: (f) => {
203
+ const u = f.slot;
204
+ return f.removeAttribute("slot"), () => {
205
+ f.slot = u;
206
+ };
207
+ }
208
+ });
209
+ if (a.dispose = () => {
210
+ a.addEventListener("luzmo-closed", () => {
211
+ l || (h(), l = !0), requestAnimationFrame(() => {
212
+ a.remove();
213
+ });
214
+ }), a.open = !1, a.dispose = J;
215
+ }, !s && r && o) {
216
+ const f = t, u = i, p = o;
217
+ return rt.applyOptions(a, {
218
+ ...p,
219
+ delayed: p.delayed || r.hasAttribute("delayed"),
220
+ trigger: p.virtualTrigger || f,
221
+ type: u === "modal" ? "modal" : u === "hover" ? "hint" : "auto"
222
+ }), f.after(a), await a.updateComplete, a.open = !0, a.dispose;
223
+ }
224
+ const d = i;
225
+ return a.append(r), rt.applyOptions(a, {
226
+ ...d,
227
+ delayed: d.delayed || r.hasAttribute("delayed")
228
+ }), a.updateComplete.then(() => {
229
+ a.open = !0;
230
+ }), a;
231
+ }
232
+ static applyOptions(t, i) {
233
+ t.delayed = !!i.delayed, t.receivesFocus = i.receivesFocus ?? "auto", t.triggerElement = i.trigger || null, t.type = i.type || "modal", t.offset = i.offset ?? 0, t.placement = i.placement, t.willPreventClose = !!i.notImmediatelyClosable;
234
+ }
235
+ }
236
+ const Ft = (e) => e.querySelector(
237
+ lt
238
+ ), zt = (e) => e.assignedElements().find((i) => i.matches(lt));
239
+ class Nt extends Event {
240
+ constructor() {
241
+ super("beforetoggle", {
242
+ bubbles: !1,
243
+ composed: !1
244
+ }), this.currentState = "open", this.newState = "closed";
245
+ }
246
+ }
247
+ class _t extends Event {
248
+ constructor() {
249
+ super("beforetoggle", {
250
+ bubbles: !1,
251
+ composed: !1
252
+ }), this.currentState = "closed", this.newState = "open";
253
+ }
254
+ }
255
+ class S extends Event {
256
+ constructor(t, i, {
257
+ publish: n,
258
+ interaction: o,
259
+ reason: s
260
+ }) {
261
+ super(t, {
262
+ bubbles: n,
263
+ composed: n
264
+ }), this.overlay = i, this.detail = {
265
+ interaction: o,
266
+ reason: s
267
+ };
268
+ }
269
+ }
270
+ class wt {
271
+ constructor(t, i) {
272
+ this.x = 0, this.y = 0, this.x = t, this.y = i;
273
+ }
274
+ updateBoundingClientRect(t, i) {
275
+ this.x = t, this.y = i, rt.update();
276
+ }
277
+ getBoundingClientRect() {
278
+ return {
279
+ width: 0,
280
+ height: 0,
281
+ top: this.y,
282
+ right: this.x,
283
+ y: this.y,
284
+ x: this.x,
285
+ bottom: this.y,
286
+ left: this.x,
287
+ /* c8 ignore next 3 */
288
+ toJSON() {
289
+ }
290
+ };
291
+ }
292
+ }
293
+ function Te(e) {
294
+ class t extends e {
295
+ async manageDialogOpen() {
296
+ const n = this.open;
297
+ if (await R(), await this.managePosition(), this.open !== n)
298
+ return;
299
+ const o = await this.dialogMakeTransition(n);
300
+ this.open === n && await this.dialogApplyFocus(n, o);
301
+ }
302
+ dialogMakeTransition(n) {
303
+ let o = null;
304
+ const s = (a, l) => () => {
305
+ if (a.open = n, !n) {
306
+ const c = () => {
307
+ a.removeEventListener("close", c);
308
+ };
309
+ a.addEventListener("close", c);
310
+ }
311
+ if (l > 0)
312
+ return;
313
+ const h = n ? _t : Nt;
314
+ this.dispatchEvent(new h()), n && (a.matches(lt) && (o = a), o = o || Ft(a), o || a.querySelectorAll("slot").forEach((d) => {
315
+ o || (o = zt(d));
316
+ }), !(!this.isConnected || this.dialogEl.open) && this.dialogEl.showModal());
317
+ }, r = (a, l) => () => {
318
+ if (this.open !== n)
319
+ return;
320
+ const h = n ? "luzmo-opened" : "luzmo-closed";
321
+ if (l > 0) {
322
+ a.dispatchEvent(
323
+ new S(h, this, {
324
+ interaction: this.type,
325
+ publish: !1
326
+ })
327
+ );
328
+ return;
329
+ }
330
+ if (!this.isConnected || n !== this.open)
331
+ return;
332
+ const c = async () => {
333
+ const d = this.triggerElement instanceof wt;
334
+ this.dispatchEvent(
335
+ new S(h, this, {
336
+ interaction: this.type,
337
+ publish: d
338
+ })
339
+ ), a.dispatchEvent(
340
+ new S(h, this, {
341
+ interaction: this.type,
342
+ publish: !1
343
+ })
344
+ ), this.triggerElement && !d && this.triggerElement.dispatchEvent(
345
+ new S(h, this, {
346
+ interaction: this.type,
347
+ publish: !0
348
+ })
349
+ ), this.state = n ? "opened" : "closed", this.returnFocus(), await R(), await R(), n === this.open && n === !1 && this.requestSlottable();
350
+ };
351
+ !n && this.dialogEl.open ? (this.dialogEl.addEventListener(
352
+ "close",
353
+ () => {
354
+ c();
355
+ },
356
+ { once: !0 }
357
+ ), this.dialogEl.close()) : c();
358
+ };
359
+ return this.elements.forEach((a, l) => {
360
+ kt(a, s(a, l), r(a, l));
361
+ }), o;
362
+ }
363
+ dialogApplyFocus(n, o) {
364
+ this.applyFocus(n, o);
365
+ }
366
+ }
367
+ return t;
368
+ }
369
+ function Re(e) {
370
+ class t extends e {
371
+ async managePopoverOpen() {
372
+ await this.managePosition();
373
+ }
374
+ async manageDelay(n) {
375
+ if (n === !1 || n !== this.open) {
376
+ mt.close(this);
377
+ return;
378
+ }
379
+ this.delayed && await mt.openTimer(this) && (this.open = !n);
380
+ }
381
+ ensureOnDOM(n) {
382
+ document.body.offsetHeight;
383
+ }
384
+ makeTransition(n) {
385
+ if (this.open !== n)
386
+ return null;
387
+ let o = null;
388
+ const s = (a, l) => () => {
389
+ if (n !== this.open)
390
+ return;
391
+ if (a.open = n, l === 0) {
392
+ const c = n ? _t : Nt;
393
+ this.dispatchEvent(new c());
394
+ }
395
+ if (n !== !0 || (a.matches(lt) && (o = a), o = o || Ft(a), o))
396
+ return;
397
+ a.querySelectorAll("slot").forEach((c) => {
398
+ o || (o = zt(c));
399
+ });
400
+ }, r = (a, l) => async () => {
401
+ if (this.open !== n)
402
+ return;
403
+ const h = n ? "luzmo-opened" : "luzmo-closed";
404
+ if (a.dispatchEvent(
405
+ new S(h, this, {
406
+ interaction: this.type
407
+ })
408
+ ), l > 0)
409
+ return;
410
+ const c = this.triggerElement instanceof wt;
411
+ this.dispatchEvent(
412
+ new S(h, this, {
413
+ interaction: this.type,
414
+ publish: c
415
+ })
416
+ ), this.triggerElement && !c && this.triggerElement.dispatchEvent(
417
+ new S(h, this, {
418
+ interaction: this.type,
419
+ publish: !0
420
+ })
421
+ ), this.state = n ? "opened" : "closed", this.returnFocus(), await R(), await R(), n === this.open && n === !1 && this.requestSlottable();
422
+ };
423
+ return this.elements.forEach((a, l) => {
424
+ kt(a, s(a, l), r(a, l));
425
+ }), o;
426
+ }
427
+ }
428
+ return t;
429
+ }
430
+ const De = CSS.supports("(overlay: auto)");
431
+ function jt(e) {
432
+ let t = !1;
433
+ try {
434
+ t = e.matches(":popover-open");
435
+ } catch {
436
+ }
437
+ let i = !1;
438
+ try {
439
+ i = e.matches(":open");
440
+ } catch {
441
+ }
442
+ return t || i;
443
+ }
444
+ function Le(e) {
445
+ class t extends e {
446
+ async manageDelay(n) {
447
+ if (n === !1 || n !== this.open) {
448
+ mt.close(this);
449
+ return;
450
+ }
451
+ this.delayed && await mt.openTimer(this) && (this.open = !n);
452
+ }
453
+ /**
454
+ * A popover should be hidden _after_ it is no longer on top-layer because
455
+ * the position metrics will have changed from when it was originally positioned.
456
+ */
457
+ shouldHidePopover(n) {
458
+ if (n && this.open !== n)
459
+ return;
460
+ const o = async ({
461
+ newState: s
462
+ } = {}) => {
463
+ s !== "open" && await this.placementController.resetOverlayPosition();
464
+ };
465
+ if (!jt(this.dialogEl)) {
466
+ o();
467
+ return;
468
+ }
469
+ this.dialogEl.addEventListener("toggle", o, {
470
+ once: !0
471
+ });
472
+ }
473
+ shouldShowPopover(n) {
474
+ let o = !1;
475
+ try {
476
+ o = this.dialogEl.matches(":popover-open");
477
+ } catch {
478
+ }
479
+ let s = !1;
480
+ try {
481
+ s = this.dialogEl.matches(":open");
482
+ } catch {
483
+ }
484
+ n && this.open === n && !o && !s && this.isConnected && (this.dialogEl.showPopover(), this.managePosition());
485
+ }
486
+ async ensureOnDOM(n) {
487
+ await R(), De || await this.shouldHidePopover(n), this.shouldShowPopover(n), await R();
488
+ }
489
+ makeTransition(n) {
490
+ if (this.open !== n)
491
+ return null;
492
+ let o = null;
493
+ const s = (a, l) => () => {
494
+ if (a.open = n, l === 0) {
495
+ const c = n ? _t : Nt;
496
+ this.dispatchEvent(new c());
497
+ }
498
+ if (!n || (a.matches(lt) && (o = a), o = o || Ft(a), o))
499
+ return;
500
+ a.querySelectorAll("slot").forEach((c) => {
501
+ o || (o = zt(c));
502
+ });
503
+ }, r = (a, l) => () => {
504
+ if (this.open !== n)
505
+ return;
506
+ const h = n ? "luzmo-opened" : "luzmo-closed";
507
+ if (l > 0) {
508
+ a.dispatchEvent(
509
+ new S(h, this, {
510
+ interaction: this.type,
511
+ publish: !1
512
+ })
513
+ );
514
+ return;
515
+ }
516
+ const c = async () => {
517
+ if (this.open !== n)
518
+ return;
519
+ await R();
520
+ const f = this.triggerElement instanceof wt;
521
+ this.dispatchEvent(
522
+ new S(h, this, {
523
+ interaction: this.type,
524
+ publish: f
525
+ })
526
+ ), a.dispatchEvent(
527
+ new S(h, this, {
528
+ interaction: this.type,
529
+ publish: !1
530
+ })
531
+ ), this.triggerElement && !f && this.triggerElement.dispatchEvent(
532
+ new S(h, this, {
533
+ interaction: this.type,
534
+ publish: !0
535
+ })
536
+ ), this.state = n ? "opened" : "closed", this.returnFocus(), await R(), await R(), n === this.open && n === !1 && this.requestSlottable();
537
+ };
538
+ if (this.open !== n)
539
+ return;
540
+ const d = jt(this.dialogEl);
541
+ n !== !0 && d && this.isConnected ? (this.dialogEl.addEventListener(
542
+ "beforetoggle",
543
+ () => {
544
+ c();
545
+ },
546
+ { once: !0 }
547
+ ), this.dialogEl.hidePopover()) : c();
548
+ };
549
+ return this.elements.forEach((a, l) => {
550
+ kt(a, s(a, l), r(a, l));
551
+ }), o;
552
+ }
553
+ }
554
+ return t;
555
+ }
556
+ const Se = "showPopover" in document.createElement("div");
557
+ class ke {
558
+ constructor() {
559
+ this.root = document.body, this.stack = [], this.handlePointerdown = (t) => {
560
+ this.pointerdownPath = t.composedPath(), this.lastOverlay = this.stack.at(-1);
561
+ }, this.handlePointerup = () => {
562
+ const t = this.pointerdownPath;
563
+ if (this.pointerdownPath = void 0, this.stack.length === 0 || !(t != null && t.length))
564
+ return;
565
+ const i = this.lastOverlay;
566
+ this.lastOverlay = void 0;
567
+ const n = this.stack.length - 1, o = this.stack.filter((s, r) => !t.find(
568
+ (l) => (
569
+ // The Overlay is in the stack
570
+ l === s || // The Overlay trigger is in the stack and the Overlay is a "hint"
571
+ l === (s == null ? void 0 : s.triggerElement) && (s == null ? void 0 : s.type) === "hint" || // The last Overlay in the stack is not the last Overlay at `pointerdown` time and has a
572
+ // `triggerInteraction` of "longpress", meaning it was opened by this poitner interaction
573
+ r === n && s !== i && s.triggerInteraction === "longpress"
574
+ )
575
+ ) && !s.shouldPreventClose() && s.type !== "manual" && // Don't close if this overlay is modal and not on top of the overlay stack.
576
+ !(s.type === "modal" && i !== s));
577
+ o.reverse(), o.forEach((s) => {
578
+ this.closeOverlay(s);
579
+ let r = s.parentOverlayToForceClose;
580
+ for (; r; )
581
+ this.closeOverlay(r), r = r.parentOverlayToForceClose;
582
+ });
583
+ }, this.handleBeforetoggle = (t) => {
584
+ const { target: i, newState: n } = t;
585
+ n !== "open" && this.closeOverlay(i);
586
+ }, this.handleKeydown = (t) => {
587
+ if (t.code !== "Escape" || this.stack.length === 0)
588
+ return;
589
+ const i = this.stack.at(-1);
590
+ if ((i == null ? void 0 : i.type) === "page") {
591
+ t.preventDefault();
592
+ return;
593
+ }
594
+ Se || (i == null ? void 0 : i.type) !== "manual" && i && this.closeOverlay(i);
595
+ }, this.bindEvents();
596
+ }
597
+ get document() {
598
+ return this.root.ownerDocument || document;
599
+ }
600
+ bindEvents() {
601
+ this.document.addEventListener("pointerdown", this.handlePointerdown), this.document.addEventListener("pointerup", this.handlePointerup), this.document.addEventListener("keydown", this.handleKeydown);
602
+ }
603
+ closeOverlay(t) {
604
+ const i = this.stack.indexOf(t);
605
+ i !== -1 && this.stack.splice(i, 1), t.open = !1;
606
+ }
607
+ /**
608
+ * Get an array of Overlays that all share the same trigger element.
609
+ *
610
+ * @param triggerElement {HTMLELement}
611
+ * @returns
612
+ */
613
+ overlaysByTriggerElement(t) {
614
+ return this.stack.filter(
615
+ (i) => i.triggerElement === t
616
+ );
617
+ }
618
+ /**
619
+ * When overlays are added manage the open state of exisiting overlays appropriately:
620
+ * - 'modal': should close other non-'modal' and non-'manual' overlays
621
+ * - 'page': should close other non-'modal' and non-'manual' overlays
622
+ * - 'auto': should close other 'auto' overlays and other 'hint' overlays, but not 'manual' overlays
623
+ * - 'manual': shouldn't close other overlays
624
+ * - 'hint': shouldn't close other overlays and give way to all other overlays on a trigger
625
+ */
626
+ add(t) {
627
+ if (this.stack.includes(t)) {
628
+ const i = this.stack.indexOf(t);
629
+ i !== -1 && (this.stack.splice(i, 1), this.stack.push(t));
630
+ return;
631
+ }
632
+ if (t.type === "auto" || t.type === "modal" || t.type === "page") {
633
+ const i = "luzmo-overlay-query-path", n = new Event(i, {
634
+ composed: !0,
635
+ bubbles: !0
636
+ });
637
+ t.addEventListener(
638
+ i,
639
+ (o) => {
640
+ const s = o.composedPath();
641
+ this.stack.forEach((r) => {
642
+ !s.find((l) => l === r) && r.type !== "manual" && r.type !== "modal" && this.closeOverlay(r);
643
+ });
644
+ },
645
+ { once: !0 }
646
+ ), t.dispatchEvent(n);
647
+ } else if (t.type === "hint") {
648
+ if (this.stack.some(
649
+ (n) => n.type !== "manual" && n.triggerElement && n.triggerElement === t.triggerElement
650
+ )) {
651
+ t.open = !1;
652
+ return;
653
+ }
654
+ this.stack.forEach((n) => {
655
+ n.type === "hint" && this.closeOverlay(n);
656
+ });
657
+ }
658
+ requestAnimationFrame(() => {
659
+ this.stack.push(t), t.addEventListener("beforetoggle", this.handleBeforetoggle, {
660
+ once: !0
661
+ });
662
+ });
663
+ }
664
+ remove(t) {
665
+ this.closeOverlay(t);
666
+ }
667
+ }
668
+ const Kt = new ke(), Fe = ':host{display:contents;pointer-events:none;--luzmo-overlay-animation-distance: .5rem}:host(:has(> luzmo-tooltip)){--luzmo-overlay-animation-distance: var( --luzmo-tooltip-animation-distance, 4px )}.dialog{margin:0;border:0;background:none;padding:0;position:fixed;overflow:visible;opacity:1!important;box-sizing:border-box;max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);max-width:calc(100vw - 16px);height:auto;inset:auto;top:0;left:0;display:flex;--luzmo-overlay-open: true}.dialog:not([is-visible]){display:none}.dialog:focus{outline:none}dialog:modal{--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}:host(:not([open])) .dialog{--luzmo-overlay-open: false}.dialog::backdrop{display:none}.dialog:before{position:absolute;top:-999em;right:-999em;bottom:-999em;left:-999em;content:"";pointer-events:auto!important}.dialog:not(.not-immediately-closable):before{display:none}.dialog>div{width:100%}::slotted(*){pointer-events:auto;visibility:visible!important}::slotted(luzmo-popover){position:static}.dialog:not([actual-placement])[placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog:not([actual-placement])[placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog:not([actual-placement])[placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=top]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:var(--luzmo-overlay-animation-distance)}.dialog[actual-placement*=right]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=bottom]{padding-block:var(--luzmo-overlay-animation-distance);margin-top:calc(-1 * var(--luzmo-overlay-animation-distance))}.dialog[actual-placement*=left]{padding-inline:var(--luzmo-overlay-animation-distance);margin-left:var(--luzmo-overlay-animation-distance)}slot[name=longpress-describedby-descriptor]{display:none}@supports selector(:open){.dialog{opacity:0}.dialog:open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports selector(:popover-open){.dialog{opacity:0}.dialog:popover-open{opacity:1;--luzmo-popover-filter: drop-shadow(0px 2px 6px rgba(0, 0, 0, .15))}}@supports (overlay: auto){.dialog{display:none;transition:all var(--luzmo-overlay-animation-duration, .13s),translate 0s,display var(--luzmo-overlay-animation-duration, .13s);transition-behavior:allow-discrete}.dialog:popover-open,.dialog:modal{display:flex}}@supports (not selector(:open)) and (not selector(:popover-open)){:host:not([open]) .dialog{pointer-events:none}.dialog[actual-placement]{z-index:calc(var(--luzmo-overlay-z-index-base, 1000) + var(--luzmo-overlay-open-count))}}', Y = Math.min, A = Math.max, gt = Math.round, dt = Math.floor, M = (e) => ({
669
+ x: e,
670
+ y: e
671
+ }), ze = {
672
+ left: "right",
673
+ right: "left",
674
+ bottom: "top",
675
+ top: "bottom"
676
+ }, Ne = {
677
+ start: "end",
678
+ end: "start"
679
+ };
680
+ function Tt(e, t, i) {
681
+ return A(e, Y(t, i));
682
+ }
683
+ function nt(e, t) {
684
+ return typeof e == "function" ? e(t) : e;
685
+ }
686
+ function G(e) {
687
+ return e.split("-")[0];
688
+ }
689
+ function ot(e) {
690
+ return e.split("-")[1];
691
+ }
692
+ function ee(e) {
693
+ return e === "x" ? "y" : "x";
694
+ }
695
+ function $t(e) {
696
+ return e === "y" ? "height" : "width";
697
+ }
698
+ function Q(e) {
699
+ return ["top", "bottom"].includes(G(e)) ? "y" : "x";
700
+ }
701
+ function Mt(e) {
702
+ return ee(Q(e));
703
+ }
704
+ function _e(e, t, i) {
705
+ i === void 0 && (i = !1);
706
+ const n = ot(e), o = Mt(e), s = $t(o);
707
+ let r = o === "x" ? n === (i ? "end" : "start") ? "right" : "left" : n === "start" ? "bottom" : "top";
708
+ return t.reference[s] > t.floating[s] && (r = vt(r)), [r, vt(r)];
709
+ }
710
+ function $e(e) {
711
+ const t = vt(e);
712
+ return [Rt(e), t, Rt(t)];
713
+ }
714
+ function Rt(e) {
715
+ return e.replace(/start|end/g, (t) => Ne[t]);
716
+ }
717
+ function Me(e, t, i) {
718
+ const n = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
719
+ switch (e) {
720
+ case "top":
721
+ case "bottom":
722
+ return i ? t ? o : n : t ? n : o;
723
+ case "left":
724
+ case "right":
725
+ return t ? s : r;
726
+ default:
727
+ return [];
728
+ }
729
+ }
730
+ function He(e, t, i, n) {
731
+ const o = ot(e);
732
+ let s = Me(G(e), i === "start", n);
733
+ return o && (s = s.map((r) => r + "-" + o), t && (s = s.concat(s.map(Rt)))), s;
734
+ }
735
+ function vt(e) {
736
+ return e.replace(/left|right|bottom|top/g, (t) => ze[t]);
737
+ }
738
+ function Be(e) {
739
+ return {
740
+ top: 0,
741
+ right: 0,
742
+ bottom: 0,
743
+ left: 0,
744
+ ...e
745
+ };
746
+ }
747
+ function ie(e) {
748
+ return typeof e != "number" ? Be(e) : {
749
+ top: e,
750
+ right: e,
751
+ bottom: e,
752
+ left: e
753
+ };
754
+ }
755
+ function yt(e) {
756
+ const {
757
+ x: t,
758
+ y: i,
759
+ width: n,
760
+ height: o
761
+ } = e;
762
+ return {
763
+ width: n,
764
+ height: o,
765
+ top: i,
766
+ left: t,
767
+ right: t + n,
768
+ bottom: i + o,
769
+ x: t,
770
+ y: i
771
+ };
772
+ }
773
+ function Yt(e, t, i) {
774
+ let {
775
+ reference: n,
776
+ floating: o
777
+ } = e;
778
+ const s = Q(t), r = Mt(t), a = $t(r), l = G(t), h = s === "y", c = n.x + n.width / 2 - o.width / 2, d = n.y + n.height / 2 - o.height / 2, f = n[a] / 2 - o[a] / 2;
779
+ let u;
780
+ switch (l) {
781
+ case "top":
782
+ u = {
783
+ x: c,
784
+ y: n.y - o.height
785
+ };
786
+ break;
787
+ case "bottom":
788
+ u = {
789
+ x: c,
790
+ y: n.y + n.height
791
+ };
792
+ break;
793
+ case "right":
794
+ u = {
795
+ x: n.x + n.width,
796
+ y: d
797
+ };
798
+ break;
799
+ case "left":
800
+ u = {
801
+ x: n.x - o.width,
802
+ y: d
803
+ };
804
+ break;
805
+ default:
806
+ u = {
807
+ x: n.x,
808
+ y: n.y
809
+ };
810
+ }
811
+ switch (ot(t)) {
812
+ case "start":
813
+ u[r] -= f * (i && h ? -1 : 1);
814
+ break;
815
+ case "end":
816
+ u[r] += f * (i && h ? -1 : 1);
817
+ break;
818
+ }
819
+ return u;
820
+ }
821
+ const We = async (e, t, i) => {
822
+ const {
823
+ placement: n = "bottom",
824
+ strategy: o = "absolute",
825
+ middleware: s = [],
826
+ platform: r
827
+ } = i, a = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(t));
828
+ let h = await r.getElementRects({
829
+ reference: e,
830
+ floating: t,
831
+ strategy: o
832
+ }), {
833
+ x: c,
834
+ y: d
835
+ } = Yt(h, n, l), f = n, u = {}, p = 0;
836
+ for (let m = 0; m < a.length; m++) {
837
+ const {
838
+ name: v,
839
+ fn: g
840
+ } = a[m], {
841
+ x: y,
842
+ y: w,
843
+ data: x,
844
+ reset: b
845
+ } = await g({
846
+ x: c,
847
+ y: d,
848
+ initialPlacement: n,
849
+ placement: f,
850
+ strategy: o,
851
+ middlewareData: u,
852
+ rects: h,
853
+ platform: r,
854
+ elements: {
855
+ reference: e,
856
+ floating: t
857
+ }
858
+ });
859
+ c = y ?? c, d = w ?? d, u = {
860
+ ...u,
861
+ [v]: {
862
+ ...u[v],
863
+ ...x
864
+ }
865
+ }, b && p <= 50 && (p++, typeof b == "object" && (b.placement && (f = b.placement), b.rects && (h = b.rects === !0 ? await r.getElementRects({
866
+ reference: e,
867
+ floating: t,
868
+ strategy: o
869
+ }) : b.rects), {
870
+ x: c,
871
+ y: d
872
+ } = Yt(h, f, l)), m = -1);
873
+ }
874
+ return {
875
+ x: c,
876
+ y: d,
877
+ placement: f,
878
+ strategy: o,
879
+ middlewareData: u
880
+ };
881
+ };
882
+ async function Ht(e, t) {
883
+ var i;
884
+ t === void 0 && (t = {});
885
+ const {
886
+ x: n,
887
+ y: o,
888
+ platform: s,
889
+ rects: r,
890
+ elements: a,
891
+ strategy: l
892
+ } = e, {
893
+ boundary: h = "clippingAncestors",
894
+ rootBoundary: c = "viewport",
895
+ elementContext: d = "floating",
896
+ altBoundary: f = !1,
897
+ padding: u = 0
898
+ } = nt(t, e), p = ie(u), v = a[f ? d === "floating" ? "reference" : "floating" : d], g = yt(await s.getClippingRect({
899
+ element: (i = await (s.isElement == null ? void 0 : s.isElement(v))) == null || i ? v : v.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(a.floating)),
900
+ boundary: h,
901
+ rootBoundary: c,
902
+ strategy: l
903
+ })), y = d === "floating" ? {
904
+ x: n,
905
+ y: o,
906
+ width: r.floating.width,
907
+ height: r.floating.height
908
+ } : r.reference, w = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(a.floating)), x = await (s.isElement == null ? void 0 : s.isElement(w)) ? await (s.getScale == null ? void 0 : s.getScale(w)) || {
909
+ x: 1,
910
+ y: 1
911
+ } : {
912
+ x: 1,
913
+ y: 1
914
+ }, b = yt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
915
+ elements: a,
916
+ rect: y,
917
+ offsetParent: w,
918
+ strategy: l
919
+ }) : y);
920
+ return {
921
+ top: (g.top - b.top + p.top) / x.y,
922
+ bottom: (b.bottom - g.bottom + p.bottom) / x.y,
923
+ left: (g.left - b.left + p.left) / x.x,
924
+ right: (b.right - g.right + p.right) / x.x
925
+ };
926
+ }
927
+ const qe = (e) => ({
928
+ name: "arrow",
929
+ options: e,
930
+ async fn(t) {
931
+ const {
932
+ x: i,
933
+ y: n,
934
+ placement: o,
935
+ rects: s,
936
+ platform: r,
937
+ elements: a,
938
+ middlewareData: l
939
+ } = t, {
940
+ element: h,
941
+ padding: c = 0
942
+ } = nt(e, t) || {};
943
+ if (h == null)
944
+ return {};
945
+ const d = ie(c), f = {
946
+ x: i,
947
+ y: n
948
+ }, u = Mt(o), p = $t(u), m = await r.getDimensions(h), v = u === "y", g = v ? "top" : "left", y = v ? "bottom" : "right", w = v ? "clientHeight" : "clientWidth", x = s.reference[p] + s.reference[u] - f[u] - s.floating[p], b = f[u] - s.reference[u], D = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(h));
949
+ let E = D ? D[w] : 0;
950
+ (!E || !await (r.isElement == null ? void 0 : r.isElement(D))) && (E = a.floating[w] || s.floating[p]);
951
+ const W = x / 2 - b / 2, N = E / 2 - m[p] / 2 - 1, L = Y(d[g], N), V = Y(d[y], N), _ = L, U = E - m[p] - V, C = E / 2 - m[p] / 2 + W, tt = Tt(_, C, U), q = !l.arrow && ot(o) != null && C !== tt && s.reference[p] / 2 - (C < _ ? L : V) - m[p] / 2 < 0, $ = q ? C < _ ? C - _ : C - U : 0;
952
+ return {
953
+ [u]: f[u] + $,
954
+ data: {
955
+ [u]: tt,
956
+ centerOffset: C - tt - $,
957
+ ...q && {
958
+ alignmentOffset: $
959
+ }
960
+ },
961
+ reset: q
962
+ };
963
+ }
964
+ }), Ie = function(e) {
965
+ return e === void 0 && (e = {}), {
966
+ name: "flip",
967
+ options: e,
968
+ async fn(t) {
969
+ var i, n;
970
+ const {
971
+ placement: o,
972
+ middlewareData: s,
973
+ rects: r,
974
+ initialPlacement: a,
975
+ platform: l,
976
+ elements: h
977
+ } = t, {
978
+ mainAxis: c = !0,
979
+ crossAxis: d = !0,
980
+ fallbackPlacements: f,
981
+ fallbackStrategy: u = "bestFit",
982
+ fallbackAxisSideDirection: p = "none",
983
+ flipAlignment: m = !0,
984
+ ...v
985
+ } = nt(e, t);
986
+ if ((i = s.arrow) != null && i.alignmentOffset)
987
+ return {};
988
+ const g = G(o), y = Q(a), w = G(a) === a, x = await (l.isRTL == null ? void 0 : l.isRTL(h.floating)), b = f || (w || !m ? [vt(a)] : $e(a)), D = p !== "none";
989
+ !f && D && b.push(...He(a, m, p, x));
990
+ const E = [a, ...b], W = await Ht(t, v), N = [];
991
+ let L = ((n = s.flip) == null ? void 0 : n.overflows) || [];
992
+ if (c && N.push(W[g]), d) {
993
+ const C = _e(o, r, x);
994
+ N.push(W[C[0]], W[C[1]]);
995
+ }
996
+ if (L = [...L, {
997
+ placement: o,
998
+ overflows: N
999
+ }], !N.every((C) => C <= 0)) {
1000
+ var V, _;
1001
+ const C = (((V = s.flip) == null ? void 0 : V.index) || 0) + 1, tt = E[C];
1002
+ if (tt)
1003
+ return {
1004
+ data: {
1005
+ index: C,
1006
+ overflows: L
1007
+ },
1008
+ reset: {
1009
+ placement: tt
1010
+ }
1011
+ };
1012
+ let q = (_ = L.filter(($) => $.overflows[0] <= 0).sort(($, j) => $.overflows[1] - j.overflows[1])[0]) == null ? void 0 : _.placement;
1013
+ if (!q)
1014
+ switch (u) {
1015
+ case "bestFit": {
1016
+ var U;
1017
+ const $ = (U = L.filter((j) => {
1018
+ if (D) {
1019
+ const K = Q(j.placement);
1020
+ return K === y || // Create a bias to the `y` side axis due to horizontal
1021
+ // reading directions favoring greater width.
1022
+ K === "y";
1023
+ }
1024
+ return !0;
1025
+ }).map((j) => [j.placement, j.overflows.filter((K) => K > 0).reduce((K, de) => K + de, 0)]).sort((j, K) => j[1] - K[1])[0]) == null ? void 0 : U[0];
1026
+ $ && (q = $);
1027
+ break;
1028
+ }
1029
+ case "initialPlacement":
1030
+ q = a;
1031
+ break;
1032
+ }
1033
+ if (o !== q)
1034
+ return {
1035
+ reset: {
1036
+ placement: q
1037
+ }
1038
+ };
1039
+ }
1040
+ return {};
1041
+ }
1042
+ };
1043
+ };
1044
+ async function Ve(e, t) {
1045
+ const {
1046
+ placement: i,
1047
+ platform: n,
1048
+ elements: o
1049
+ } = e, s = await (n.isRTL == null ? void 0 : n.isRTL(o.floating)), r = G(i), a = ot(i), l = Q(i) === "y", h = ["left", "top"].includes(r) ? -1 : 1, c = s && l ? -1 : 1, d = nt(t, e);
1050
+ let {
1051
+ mainAxis: f,
1052
+ crossAxis: u,
1053
+ alignmentAxis: p
1054
+ } = typeof d == "number" ? {
1055
+ mainAxis: d,
1056
+ crossAxis: 0,
1057
+ alignmentAxis: null
1058
+ } : {
1059
+ mainAxis: d.mainAxis || 0,
1060
+ crossAxis: d.crossAxis || 0,
1061
+ alignmentAxis: d.alignmentAxis
1062
+ };
1063
+ return a && typeof p == "number" && (u = a === "end" ? p * -1 : p), l ? {
1064
+ x: u * c,
1065
+ y: f * h
1066
+ } : {
1067
+ x: f * h,
1068
+ y: u * c
1069
+ };
1070
+ }
1071
+ const Ue = function(e) {
1072
+ return e === void 0 && (e = 0), {
1073
+ name: "offset",
1074
+ options: e,
1075
+ async fn(t) {
1076
+ var i, n;
1077
+ const {
1078
+ x: o,
1079
+ y: s,
1080
+ placement: r,
1081
+ middlewareData: a
1082
+ } = t, l = await Ve(t, e);
1083
+ return r === ((i = a.offset) == null ? void 0 : i.placement) && (n = a.arrow) != null && n.alignmentOffset ? {} : {
1084
+ x: o + l.x,
1085
+ y: s + l.y,
1086
+ data: {
1087
+ ...l,
1088
+ placement: r
1089
+ }
1090
+ };
1091
+ }
1092
+ };
1093
+ }, je = function(e) {
1094
+ return e === void 0 && (e = {}), {
1095
+ name: "shift",
1096
+ options: e,
1097
+ async fn(t) {
1098
+ const {
1099
+ x: i,
1100
+ y: n,
1101
+ placement: o
1102
+ } = t, {
1103
+ mainAxis: s = !0,
1104
+ crossAxis: r = !1,
1105
+ limiter: a = {
1106
+ fn: (v) => {
1107
+ let {
1108
+ x: g,
1109
+ y
1110
+ } = v;
1111
+ return {
1112
+ x: g,
1113
+ y
1114
+ };
1115
+ }
1116
+ },
1117
+ ...l
1118
+ } = nt(e, t), h = {
1119
+ x: i,
1120
+ y: n
1121
+ }, c = await Ht(t, l), d = Q(G(o)), f = ee(d);
1122
+ let u = h[f], p = h[d];
1123
+ if (s) {
1124
+ const v = f === "y" ? "top" : "left", g = f === "y" ? "bottom" : "right", y = u + c[v], w = u - c[g];
1125
+ u = Tt(y, u, w);
1126
+ }
1127
+ if (r) {
1128
+ const v = d === "y" ? "top" : "left", g = d === "y" ? "bottom" : "right", y = p + c[v], w = p - c[g];
1129
+ p = Tt(y, p, w);
1130
+ }
1131
+ const m = a.fn({
1132
+ ...t,
1133
+ [f]: u,
1134
+ [d]: p
1135
+ });
1136
+ return {
1137
+ ...m,
1138
+ data: {
1139
+ x: m.x - i,
1140
+ y: m.y - n,
1141
+ enabled: {
1142
+ [f]: s,
1143
+ [d]: r
1144
+ }
1145
+ }
1146
+ };
1147
+ }
1148
+ };
1149
+ }, Ke = function(e) {
1150
+ return e === void 0 && (e = {}), {
1151
+ name: "size",
1152
+ options: e,
1153
+ async fn(t) {
1154
+ var i, n;
1155
+ const {
1156
+ placement: o,
1157
+ rects: s,
1158
+ platform: r,
1159
+ elements: a
1160
+ } = t, {
1161
+ apply: l = () => {
1162
+ },
1163
+ ...h
1164
+ } = nt(e, t), c = await Ht(t, h), d = G(o), f = ot(o), u = Q(o) === "y", {
1165
+ width: p,
1166
+ height: m
1167
+ } = s.floating;
1168
+ let v, g;
1169
+ d === "top" || d === "bottom" ? (v = d, g = f === (await (r.isRTL == null ? void 0 : r.isRTL(a.floating)) ? "start" : "end") ? "left" : "right") : (g = d, v = f === "end" ? "top" : "bottom");
1170
+ const y = m - c.top - c.bottom, w = p - c.left - c.right, x = Y(m - c[v], y), b = Y(p - c[g], w), D = !t.middlewareData.shift;
1171
+ let E = x, W = b;
1172
+ if ((i = t.middlewareData.shift) != null && i.enabled.x && (W = w), (n = t.middlewareData.shift) != null && n.enabled.y && (E = y), D && !f) {
1173
+ const L = A(c.left, 0), V = A(c.right, 0), _ = A(c.top, 0), U = A(c.bottom, 0);
1174
+ u ? W = p - 2 * (L !== 0 || V !== 0 ? L + V : A(c.left, c.right)) : E = m - 2 * (_ !== 0 || U !== 0 ? _ + U : A(c.top, c.bottom));
1175
+ }
1176
+ await l({
1177
+ ...t,
1178
+ availableWidth: W,
1179
+ availableHeight: E
1180
+ });
1181
+ const N = await r.getDimensions(a.floating);
1182
+ return p !== N.width || m !== N.height ? {
1183
+ reset: {
1184
+ rects: !0
1185
+ }
1186
+ } : {};
1187
+ }
1188
+ };
1189
+ };
1190
+ function bt() {
1191
+ return typeof window < "u";
1192
+ }
1193
+ function st(e) {
1194
+ return ne(e) ? (e.nodeName || "").toLowerCase() : "#document";
1195
+ }
1196
+ function T(e) {
1197
+ var t;
1198
+ return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
1199
+ }
1200
+ function B(e) {
1201
+ var t;
1202
+ return (t = (ne(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
1203
+ }
1204
+ function ne(e) {
1205
+ return bt() ? e instanceof Node || e instanceof T(e).Node : !1;
1206
+ }
1207
+ function k(e) {
1208
+ return bt() ? e instanceof Element || e instanceof T(e).Element : !1;
1209
+ }
1210
+ function H(e) {
1211
+ return bt() ? e instanceof HTMLElement || e instanceof T(e).HTMLElement : !1;
1212
+ }
1213
+ function Gt(e) {
1214
+ return !bt() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof T(e).ShadowRoot;
1215
+ }
1216
+ function ct(e) {
1217
+ const {
1218
+ overflow: t,
1219
+ overflowX: i,
1220
+ overflowY: n,
1221
+ display: o
1222
+ } = F(e);
1223
+ return /auto|scroll|overlay|hidden|clip/.test(t + n + i) && !["inline", "contents"].includes(o);
1224
+ }
1225
+ function Ye(e) {
1226
+ return ["table", "td", "th"].includes(st(e));
1227
+ }
1228
+ function xt(e) {
1229
+ return [":popover-open", ":modal"].some((t) => {
1230
+ try {
1231
+ return e.matches(t);
1232
+ } catch {
1233
+ return !1;
1234
+ }
1235
+ });
1236
+ }
1237
+ function Bt(e) {
1238
+ const t = Wt(), i = k(e) ? F(e) : e;
1239
+ return ["transform", "translate", "scale", "rotate", "perspective"].some((n) => i[n] ? i[n] !== "none" : !1) || (i.containerType ? i.containerType !== "normal" : !1) || !t && (i.backdropFilter ? i.backdropFilter !== "none" : !1) || !t && (i.filter ? i.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((n) => (i.willChange || "").includes(n)) || ["paint", "layout", "strict", "content"].some((n) => (i.contain || "").includes(n));
1240
+ }
1241
+ function Ge(e) {
1242
+ let t = X(e);
1243
+ for (; H(t) && !it(t); ) {
1244
+ if (Bt(t))
1245
+ return t;
1246
+ if (xt(t))
1247
+ return null;
1248
+ t = X(t);
1249
+ }
1250
+ return null;
1251
+ }
1252
+ function Wt() {
1253
+ return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
1254
+ }
1255
+ function it(e) {
1256
+ return ["html", "body", "#document"].includes(st(e));
1257
+ }
1258
+ function F(e) {
1259
+ return T(e).getComputedStyle(e);
1260
+ }
1261
+ function Et(e) {
1262
+ return k(e) ? {
1263
+ scrollLeft: e.scrollLeft,
1264
+ scrollTop: e.scrollTop
1265
+ } : {
1266
+ scrollLeft: e.scrollX,
1267
+ scrollTop: e.scrollY
1268
+ };
1269
+ }
1270
+ function X(e) {
1271
+ if (st(e) === "html")
1272
+ return e;
1273
+ const t = (
1274
+ // Step into the shadow DOM of the parent of a slotted node.
1275
+ e.assignedSlot || // DOM Element detected.
1276
+ e.parentNode || // ShadowRoot detected.
1277
+ Gt(e) && e.host || // Fallback.
1278
+ B(e)
1279
+ );
1280
+ return Gt(t) ? t.host : t;
1281
+ }
1282
+ function oe(e) {
1283
+ const t = X(e);
1284
+ return it(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : H(t) && ct(t) ? t : oe(t);
1285
+ }
1286
+ function at(e, t, i) {
1287
+ var n;
1288
+ t === void 0 && (t = []), i === void 0 && (i = !0);
1289
+ const o = oe(e), s = o === ((n = e.ownerDocument) == null ? void 0 : n.body), r = T(o);
1290
+ if (s) {
1291
+ const a = Dt(r);
1292
+ return t.concat(r, r.visualViewport || [], ct(o) ? o : [], a && i ? at(a) : []);
1293
+ }
1294
+ return t.concat(o, at(o, [], i));
1295
+ }
1296
+ function Dt(e) {
1297
+ return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
1298
+ }
1299
+ function se(e) {
1300
+ const t = F(e);
1301
+ let i = parseFloat(t.width) || 0, n = parseFloat(t.height) || 0;
1302
+ const o = H(e), s = o ? e.offsetWidth : i, r = o ? e.offsetHeight : n, a = gt(i) !== s || gt(n) !== r;
1303
+ return a && (i = s, n = r), {
1304
+ width: i,
1305
+ height: n,
1306
+ $: a
1307
+ };
1308
+ }
1309
+ function qt(e) {
1310
+ return k(e) ? e : e.contextElement;
1311
+ }
1312
+ function et(e) {
1313
+ const t = qt(e);
1314
+ if (!H(t))
1315
+ return M(1);
1316
+ const i = t.getBoundingClientRect(), {
1317
+ width: n,
1318
+ height: o,
1319
+ $: s
1320
+ } = se(t);
1321
+ let r = (s ? gt(i.width) : i.width) / n, a = (s ? gt(i.height) : i.height) / o;
1322
+ return (!r || !Number.isFinite(r)) && (r = 1), (!a || !Number.isFinite(a)) && (a = 1), {
1323
+ x: r,
1324
+ y: a
1325
+ };
1326
+ }
1327
+ const Xe = /* @__PURE__ */ M(0);
1328
+ function re(e) {
1329
+ const t = T(e);
1330
+ return !Wt() || !t.visualViewport ? Xe : {
1331
+ x: t.visualViewport.offsetLeft,
1332
+ y: t.visualViewport.offsetTop
1333
+ };
1334
+ }
1335
+ function Je(e, t, i) {
1336
+ return t === void 0 && (t = !1), !i || t && i !== T(e) ? !1 : t;
1337
+ }
1338
+ function Z(e, t, i, n) {
1339
+ t === void 0 && (t = !1), i === void 0 && (i = !1);
1340
+ const o = e.getBoundingClientRect(), s = qt(e);
1341
+ let r = M(1);
1342
+ t && (n ? k(n) && (r = et(n)) : r = et(e));
1343
+ const a = Je(s, i, n) ? re(s) : M(0);
1344
+ let l = (o.left + a.x) / r.x, h = (o.top + a.y) / r.y, c = o.width / r.x, d = o.height / r.y;
1345
+ if (s) {
1346
+ const f = T(s), u = n && k(n) ? T(n) : n;
1347
+ let p = f, m = Dt(p);
1348
+ for (; m && n && u !== p; ) {
1349
+ const v = et(m), g = m.getBoundingClientRect(), y = F(m), w = g.left + (m.clientLeft + parseFloat(y.paddingLeft)) * v.x, x = g.top + (m.clientTop + parseFloat(y.paddingTop)) * v.y;
1350
+ l *= v.x, h *= v.y, c *= v.x, d *= v.y, l += w, h += x, p = T(m), m = Dt(p);
1351
+ }
1352
+ }
1353
+ return yt({
1354
+ width: c,
1355
+ height: d,
1356
+ x: l,
1357
+ y: h
1358
+ });
1359
+ }
1360
+ function It(e, t) {
1361
+ const i = Et(e).scrollLeft;
1362
+ return t ? t.left + i : Z(B(e)).left + i;
1363
+ }
1364
+ function ae(e, t, i) {
1365
+ i === void 0 && (i = !1);
1366
+ const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - (i ? 0 : (
1367
+ // RTL <body> scrollbar.
1368
+ It(e, n)
1369
+ )), s = n.top + t.scrollTop;
1370
+ return {
1371
+ x: o,
1372
+ y: s
1373
+ };
1374
+ }
1375
+ function Qe(e) {
1376
+ let {
1377
+ elements: t,
1378
+ rect: i,
1379
+ offsetParent: n,
1380
+ strategy: o
1381
+ } = e;
1382
+ const s = o === "fixed", r = B(n), a = t ? xt(t.floating) : !1;
1383
+ if (n === r || a && s)
1384
+ return i;
1385
+ let l = {
1386
+ scrollLeft: 0,
1387
+ scrollTop: 0
1388
+ }, h = M(1);
1389
+ const c = M(0), d = H(n);
1390
+ if ((d || !d && !s) && ((st(n) !== "body" || ct(r)) && (l = Et(n)), H(n))) {
1391
+ const u = Z(n);
1392
+ h = et(n), c.x = u.x + n.clientLeft, c.y = u.y + n.clientTop;
1393
+ }
1394
+ const f = r && !d && !s ? ae(r, l, !0) : M(0);
1395
+ return {
1396
+ width: i.width * h.x,
1397
+ height: i.height * h.y,
1398
+ x: i.x * h.x - l.scrollLeft * h.x + c.x + f.x,
1399
+ y: i.y * h.y - l.scrollTop * h.y + c.y + f.y
1400
+ };
1401
+ }
1402
+ function Ze(e) {
1403
+ return Array.from(e.getClientRects());
1404
+ }
1405
+ function ti(e) {
1406
+ const t = B(e), i = Et(e), n = e.ownerDocument.body, o = A(t.scrollWidth, t.clientWidth, n.scrollWidth, n.clientWidth), s = A(t.scrollHeight, t.clientHeight, n.scrollHeight, n.clientHeight);
1407
+ let r = -i.scrollLeft + It(e);
1408
+ const a = -i.scrollTop;
1409
+ return F(n).direction === "rtl" && (r += A(t.clientWidth, n.clientWidth) - o), {
1410
+ width: o,
1411
+ height: s,
1412
+ x: r,
1413
+ y: a
1414
+ };
1415
+ }
1416
+ function ei(e, t) {
1417
+ const i = T(e), n = B(e), o = i.visualViewport;
1418
+ let s = n.clientWidth, r = n.clientHeight, a = 0, l = 0;
1419
+ if (o) {
1420
+ s = o.width, r = o.height;
1421
+ const h = Wt();
1422
+ (!h || h && t === "fixed") && (a = o.offsetLeft, l = o.offsetTop);
1423
+ }
1424
+ return {
1425
+ width: s,
1426
+ height: r,
1427
+ x: a,
1428
+ y: l
1429
+ };
1430
+ }
1431
+ function ii(e, t) {
1432
+ const i = Z(e, !0, t === "fixed"), n = i.top + e.clientTop, o = i.left + e.clientLeft, s = H(e) ? et(e) : M(1), r = e.clientWidth * s.x, a = e.clientHeight * s.y, l = o * s.x, h = n * s.y;
1433
+ return {
1434
+ width: r,
1435
+ height: a,
1436
+ x: l,
1437
+ y: h
1438
+ };
1439
+ }
1440
+ function Xt(e, t, i) {
1441
+ let n;
1442
+ if (t === "viewport")
1443
+ n = ei(e, i);
1444
+ else if (t === "document")
1445
+ n = ti(B(e));
1446
+ else if (k(t))
1447
+ n = ii(t, i);
1448
+ else {
1449
+ const o = re(e);
1450
+ n = {
1451
+ x: t.x - o.x,
1452
+ y: t.y - o.y,
1453
+ width: t.width,
1454
+ height: t.height
1455
+ };
1456
+ }
1457
+ return yt(n);
1458
+ }
1459
+ function le(e, t) {
1460
+ const i = X(e);
1461
+ return i === t || !k(i) || it(i) ? !1 : F(i).position === "fixed" || le(i, t);
1462
+ }
1463
+ function ni(e, t) {
1464
+ const i = t.get(e);
1465
+ if (i)
1466
+ return i;
1467
+ let n = at(e, [], !1).filter((a) => k(a) && st(a) !== "body"), o = null;
1468
+ const s = F(e).position === "fixed";
1469
+ let r = s ? X(e) : e;
1470
+ for (; k(r) && !it(r); ) {
1471
+ const a = F(r), l = Bt(r);
1472
+ !l && a.position === "fixed" && (o = null), (s ? !l && !o : !l && a.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || ct(r) && !l && le(e, r)) ? n = n.filter((c) => c !== r) : o = a, r = X(r);
1473
+ }
1474
+ return t.set(e, n), n;
1475
+ }
1476
+ function oi(e) {
1477
+ let {
1478
+ element: t,
1479
+ boundary: i,
1480
+ rootBoundary: n,
1481
+ strategy: o
1482
+ } = e;
1483
+ const r = [...i === "clippingAncestors" ? xt(t) ? [] : ni(t, this._c) : [].concat(i), n], a = r[0], l = r.reduce((h, c) => {
1484
+ const d = Xt(t, c, o);
1485
+ return h.top = A(d.top, h.top), h.right = Y(d.right, h.right), h.bottom = Y(d.bottom, h.bottom), h.left = A(d.left, h.left), h;
1486
+ }, Xt(t, a, o));
1487
+ return {
1488
+ width: l.right - l.left,
1489
+ height: l.bottom - l.top,
1490
+ x: l.left,
1491
+ y: l.top
1492
+ };
1493
+ }
1494
+ function si(e) {
1495
+ const {
1496
+ width: t,
1497
+ height: i
1498
+ } = se(e);
1499
+ return {
1500
+ width: t,
1501
+ height: i
1502
+ };
1503
+ }
1504
+ function ri(e, t, i) {
1505
+ const n = H(t), o = B(t), s = i === "fixed", r = Z(e, !0, s, t);
1506
+ let a = {
1507
+ scrollLeft: 0,
1508
+ scrollTop: 0
1509
+ };
1510
+ const l = M(0);
1511
+ if (n || !n && !s)
1512
+ if ((st(t) !== "body" || ct(o)) && (a = Et(t)), n) {
1513
+ const f = Z(t, !0, s, t);
1514
+ l.x = f.x + t.clientLeft, l.y = f.y + t.clientTop;
1515
+ } else o && (l.x = It(o));
1516
+ const h = o && !n && !s ? ae(o, a) : M(0), c = r.left + a.scrollLeft - l.x - h.x, d = r.top + a.scrollTop - l.y - h.y;
1517
+ return {
1518
+ x: c,
1519
+ y: d,
1520
+ width: r.width,
1521
+ height: r.height
1522
+ };
1523
+ }
1524
+ function Ot(e) {
1525
+ return F(e).position === "static";
1526
+ }
1527
+ function Jt(e, t) {
1528
+ if (!H(e) || F(e).position === "fixed")
1529
+ return null;
1530
+ if (t)
1531
+ return t(e);
1532
+ let i = e.offsetParent;
1533
+ return B(e) === i && (i = i.ownerDocument.body), i;
1534
+ }
1535
+ function ce(e, t) {
1536
+ const i = T(e);
1537
+ if (xt(e))
1538
+ return i;
1539
+ if (!H(e)) {
1540
+ let o = X(e);
1541
+ for (; o && !it(o); ) {
1542
+ if (k(o) && !Ot(o))
1543
+ return o;
1544
+ o = X(o);
1545
+ }
1546
+ return i;
1547
+ }
1548
+ let n = Jt(e, t);
1549
+ for (; n && Ye(n) && Ot(n); )
1550
+ n = Jt(n, t);
1551
+ return n && it(n) && Ot(n) && !Bt(n) ? i : n || Ge(e) || i;
1552
+ }
1553
+ const ai = async function(e) {
1554
+ const t = this.getOffsetParent || ce, i = this.getDimensions, n = await i(e.floating);
1555
+ return {
1556
+ reference: ri(e.reference, await t(e.floating), e.strategy),
1557
+ floating: {
1558
+ x: 0,
1559
+ y: 0,
1560
+ width: n.width,
1561
+ height: n.height
1562
+ }
1563
+ };
1564
+ };
1565
+ function li(e) {
1566
+ return F(e).direction === "rtl";
1567
+ }
1568
+ const ci = {
1569
+ convertOffsetParentRelativeRectToViewportRelativeRect: Qe,
1570
+ getDocumentElement: B,
1571
+ getClippingRect: oi,
1572
+ getOffsetParent: ce,
1573
+ getElementRects: ai,
1574
+ getClientRects: Ze,
1575
+ getDimensions: si,
1576
+ getScale: et,
1577
+ isElement: k,
1578
+ isRTL: li
1579
+ };
1580
+ function he(e, t) {
1581
+ return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
1582
+ }
1583
+ function hi(e, t) {
1584
+ let i = null, n;
1585
+ const o = B(e);
1586
+ function s() {
1587
+ var a;
1588
+ clearTimeout(n), (a = i) == null || a.disconnect(), i = null;
1589
+ }
1590
+ function r(a, l) {
1591
+ a === void 0 && (a = !1), l === void 0 && (l = 1), s();
1592
+ const h = e.getBoundingClientRect(), {
1593
+ left: c,
1594
+ top: d,
1595
+ width: f,
1596
+ height: u
1597
+ } = h;
1598
+ if (a || t(), !f || !u)
1599
+ return;
1600
+ const p = dt(d), m = dt(o.clientWidth - (c + f)), v = dt(o.clientHeight - (d + u)), g = dt(c), w = {
1601
+ rootMargin: -p + "px " + -m + "px " + -v + "px " + -g + "px",
1602
+ threshold: A(0, Y(1, l)) || 1
1603
+ };
1604
+ let x = !0;
1605
+ function b(D) {
1606
+ const E = D[0].intersectionRatio;
1607
+ if (E !== l) {
1608
+ if (!x)
1609
+ return r();
1610
+ E ? r(!1, E) : n = setTimeout(() => {
1611
+ r(!1, 1e-7);
1612
+ }, 1e3);
1613
+ }
1614
+ E === 1 && !he(h, e.getBoundingClientRect()) && r(), x = !1;
1615
+ }
1616
+ try {
1617
+ i = new IntersectionObserver(b, {
1618
+ ...w,
1619
+ // Handle <iframe>s
1620
+ root: o.ownerDocument
1621
+ });
1622
+ } catch {
1623
+ i = new IntersectionObserver(b, w);
1624
+ }
1625
+ i.observe(e);
1626
+ }
1627
+ return r(!0), s;
1628
+ }
1629
+ function Qt(e, t, i, n) {
1630
+ n === void 0 && (n = {});
1631
+ const {
1632
+ ancestorScroll: o = !0,
1633
+ ancestorResize: s = !0,
1634
+ elementResize: r = typeof ResizeObserver == "function",
1635
+ layoutShift: a = typeof IntersectionObserver == "function",
1636
+ animationFrame: l = !1
1637
+ } = n, h = qt(e), c = o || s ? [...h ? at(h) : [], ...at(t)] : [];
1638
+ c.forEach((g) => {
1639
+ o && g.addEventListener("scroll", i, {
1640
+ passive: !0
1641
+ }), s && g.addEventListener("resize", i);
1642
+ });
1643
+ const d = h && a ? hi(h, i) : null;
1644
+ let f = -1, u = null;
1645
+ r && (u = new ResizeObserver((g) => {
1646
+ let [y] = g;
1647
+ y && y.target === h && u && (u.unobserve(t), cancelAnimationFrame(f), f = requestAnimationFrame(() => {
1648
+ var w;
1649
+ (w = u) == null || w.observe(t);
1650
+ })), i();
1651
+ }), h && !l && u.observe(h), u.observe(t));
1652
+ let p, m = l ? Z(e) : null;
1653
+ l && v();
1654
+ function v() {
1655
+ const g = Z(e);
1656
+ m && !he(m, g) && i(), m = g, p = requestAnimationFrame(v);
1657
+ }
1658
+ return i(), () => {
1659
+ var g;
1660
+ c.forEach((y) => {
1661
+ o && y.removeEventListener("scroll", i), s && y.removeEventListener("resize", i);
1662
+ }), d == null || d(), (g = u) == null || g.disconnect(), u = null, l && cancelAnimationFrame(p);
1663
+ };
1664
+ }
1665
+ const di = Ue, ui = je, Zt = Ie, pi = Ke, fi = qe, mi = (e, t, i) => {
1666
+ const n = /* @__PURE__ */ new Map(), o = {
1667
+ platform: ci,
1668
+ ...i
1669
+ }, s = {
1670
+ ...o.platform,
1671
+ _c: n
1672
+ };
1673
+ return We(e, t, {
1674
+ ...o,
1675
+ platform: s
1676
+ });
1677
+ };
1678
+ function ut(e) {
1679
+ if (e === void 0)
1680
+ return 0;
1681
+ const t = window.devicePixelRatio || 1;
1682
+ return Math.round(e * t) / t;
1683
+ }
1684
+ const pt = 8, gi = 100, vi = (e) => ({
1685
+ left: ["right", "bottom", "top"],
1686
+ "left-start": ["right-start", "bottom", "top"],
1687
+ "left-end": ["right-end", "bottom", "top"],
1688
+ right: ["left", "bottom", "top"],
1689
+ "right-start": ["left-start", "bottom", "top"],
1690
+ "right-end": ["left-end", "bottom", "top"],
1691
+ top: ["bottom", "left", "right"],
1692
+ "top-start": ["bottom-start", "left", "right"],
1693
+ "top-end": ["bottom-end", "left", "right"],
1694
+ bottom: ["top", "left", "right"],
1695
+ "bottom-start": ["top-start", "left", "right"],
1696
+ "bottom-end": ["top-end", "left", "right"]
1697
+ })[e] ?? [e];
1698
+ class yi {
1699
+ /**
1700
+ * Creates an instance of the PlacementController.
1701
+ *
1702
+ * @param host - The host element that uses this controller.
1703
+ */
1704
+ constructor(t) {
1705
+ this.originalPlacements = /* @__PURE__ */ new WeakMap(), this.allowPlacementUpdate = !1, this.closeForAncestorUpdate = () => {
1706
+ !this.allowPlacementUpdate && this.options.type !== "modal" && this.cleanup && this.target.dispatchEvent(new Event("close", { bubbles: !0 })), this.allowPlacementUpdate = !1;
1707
+ }, this.updatePlacement = () => {
1708
+ this.computePlacement();
1709
+ }, this.resetOverlayPosition = () => {
1710
+ !this.target || !this.options || (this.clearOverlayPosition(), this.host.offsetHeight, this.computePlacement());
1711
+ }, this.host = t, this.host.addController(this);
1712
+ }
1713
+ /**
1714
+ * Places the overlay relative to the target element.
1715
+ *
1716
+ * This method sets up the necessary configurations and event listeners to manage the
1717
+ * positioning and constraints of the overlay element.
1718
+ *
1719
+ * @param [target=this.target] - The target element for the overlay.
1720
+ * @param [options=this.options] - The options for configuring the overlay placement.
1721
+ * @returns A promise that resolves when the overlay has been placed.
1722
+ */
1723
+ placeOverlay(t = this.target, i = this.options) {
1724
+ if (this.target = t, this.options = i, !t || !i)
1725
+ return;
1726
+ const n = Qt(
1727
+ i.trigger,
1728
+ t,
1729
+ this.closeForAncestorUpdate,
1730
+ {
1731
+ ancestorResize: !1,
1732
+ elementResize: !1,
1733
+ layoutShift: !1
1734
+ }
1735
+ ), o = Qt(
1736
+ i.trigger,
1737
+ t,
1738
+ this.updatePlacement,
1739
+ {
1740
+ ancestorScroll: !1
1741
+ }
1742
+ );
1743
+ this.cleanup = () => {
1744
+ var s;
1745
+ (s = this.host.elements) == null || s.forEach((r) => {
1746
+ r.addEventListener(
1747
+ "luzmo-closed",
1748
+ () => {
1749
+ const a = this.originalPlacements.get(r);
1750
+ a && r.setAttribute("placement", a), this.originalPlacements.delete(r);
1751
+ },
1752
+ { once: !0 }
1753
+ );
1754
+ }), n(), o();
1755
+ };
1756
+ }
1757
+ /**
1758
+ * Computes the placement of the overlay relative to the target element.
1759
+ *
1760
+ * This method calculates the necessary positioning and constraints for the overlay element
1761
+ * using various middleware functions. It updates the overlay's style and attributes based
1762
+ * on the computed position.
1763
+ *
1764
+ * @returns A promise that resolves when the placement has been computed.
1765
+ */
1766
+ async computePlacement() {
1767
+ var f, u;
1768
+ const { options: t, target: i } = this;
1769
+ await (document.fonts ? document.fonts.ready : Promise.resolve());
1770
+ const n = t.trigger instanceof HTMLElement ? Zt() : Zt({
1771
+ padding: pt,
1772
+ fallbackPlacements: vi(t.placement)
1773
+ }), [o = 0, s = 0] = Array.isArray(t == null ? void 0 : t.offset) ? t.offset : [t.offset, 0], r = (f = this.host.elements.find(
1774
+ (p) => p.tipElement
1775
+ )) == null ? void 0 : f.tipElement, a = [
1776
+ di({
1777
+ mainAxis: o,
1778
+ crossAxis: s
1779
+ }),
1780
+ ui({ padding: pt }),
1781
+ n,
1782
+ pi({
1783
+ padding: pt,
1784
+ apply: ({ availableWidth: p, availableHeight: m, rects: { floating: v } }) => {
1785
+ const g = Math.max(
1786
+ gi,
1787
+ Math.floor(m)
1788
+ ), y = v.height;
1789
+ this.initialHeight = this.isConstrained && this.initialHeight || y, this.isConstrained = y < this.initialHeight || g <= y;
1790
+ const w = this.isConstrained ? `${g}px` : "";
1791
+ Object.assign(i.style, {
1792
+ maxWidth: `${Math.floor(p)}px`,
1793
+ maxHeight: w
1794
+ });
1795
+ }
1796
+ }),
1797
+ ...r ? [
1798
+ fi({
1799
+ element: r,
1800
+ padding: t.tipPadding || pt
1801
+ })
1802
+ ] : []
1803
+ ], { x: l, y: h, placement: c, middlewareData: d } = await mi(
1804
+ t.trigger,
1805
+ i,
1806
+ {
1807
+ placement: t.placement,
1808
+ middleware: a,
1809
+ strategy: "fixed"
1810
+ }
1811
+ );
1812
+ if (Object.assign(i.style, {
1813
+ top: "0px",
1814
+ left: "0px",
1815
+ translate: `${ut(l)}px ${ut(h)}px`
1816
+ }), i.setAttribute("actual-placement", c), (u = this.host.elements) == null || u.forEach((p) => {
1817
+ this.originalPlacements.has(p) || this.originalPlacements.set(
1818
+ p,
1819
+ p.getAttribute("placement")
1820
+ ), p.setAttribute("placement", c);
1821
+ }), r && d.arrow) {
1822
+ const { x: p, y: m } = d.arrow;
1823
+ Object.assign(r.style, {
1824
+ top: c.startsWith("right") || c.startsWith("left") ? "0px" : "",
1825
+ left: c.startsWith("bottom") || c.startsWith("top") ? "0px" : "",
1826
+ translate: `${ut(p)}px ${ut(m)}px`
1827
+ });
1828
+ }
1829
+ }
1830
+ /**
1831
+ * Clears the overlay's position styles.
1832
+ *
1833
+ * This method removes the max-height and max-width styles from the target element,
1834
+ * and resets the initial height and constrained state of the overlay.
1835
+ */
1836
+ clearOverlayPosition() {
1837
+ this.target && (this.target.style.removeProperty("max-height"), this.target.style.removeProperty("max-width"), this.initialHeight = void 0, this.isConstrained = !1);
1838
+ }
1839
+ /**
1840
+ * Lifecycle method called when the host element is connected to the DOM.
1841
+ *
1842
+ * This method sets up an event listener to reset the overlay's position when the 'luzmo-update-overlays' event is dispatched.
1843
+ */
1844
+ hostConnected() {
1845
+ document.addEventListener(
1846
+ "luzmo-update-overlays",
1847
+ this.resetOverlayPosition
1848
+ );
1849
+ }
1850
+ /**
1851
+ * Lifecycle method called when the host element is updated.
1852
+ *
1853
+ * This method cleans up resources if the overlay is not open.
1854
+ */
1855
+ hostUpdated() {
1856
+ var t;
1857
+ this.host.open || ((t = this.cleanup) == null || t.call(this), this.cleanup = void 0);
1858
+ }
1859
+ /**
1860
+ * Lifecycle method called when the host element is disconnected from the DOM.
1861
+ *
1862
+ * This method removes the event listener and cleans up resources.
1863
+ */
1864
+ hostDisconnected() {
1865
+ var t;
1866
+ (t = this.cleanup) == null || t.call(this), this.cleanup = void 0, document.removeEventListener(
1867
+ "luzmo-update-overlays",
1868
+ this.resetOverlayPosition
1869
+ );
1870
+ }
1871
+ }
1872
+ var Pt = /* @__PURE__ */ ((e) => (e[e.click = 0] = "click", e[e.hover = 1] = "hover", e[e.longpress = 2] = "longpress", e))(Pt || {});
1873
+ class Vt {
1874
+ constructor(t, { overlay: i, isPersistent: n, handleOverlayReady: o }) {
1875
+ this.target = t, this.isLazilyOpen = !1, this.isPersistent = !1, this.isPersistent = !!n, this.handleOverlayReady = o, this.isPersistent && this.init(), this.overlay = i;
1876
+ }
1877
+ get activelyOpening() {
1878
+ return !1;
1879
+ }
1880
+ get open() {
1881
+ var t;
1882
+ return ((t = this.overlay) == null ? void 0 : t.open) ?? this.isLazilyOpen;
1883
+ }
1884
+ /**
1885
+ * Set `open` against the associated Overlay lazily.
1886
+ */
1887
+ set open(t) {
1888
+ if (t !== this.open) {
1889
+ if (this.isLazilyOpen = t, this.overlay) {
1890
+ this.overlay.open = t;
1891
+ return;
1892
+ }
1893
+ t && (customElements.whenDefined("luzmo-overlay").then(async () => {
1894
+ const { Overlay: i } = await Promise.resolve().then(() => Lt);
1895
+ this.overlay = new i(), this.overlay.open = !0;
1896
+ }), Promise.resolve().then(() => Lt));
1897
+ }
1898
+ }
1899
+ get overlay() {
1900
+ return this._overlay;
1901
+ }
1902
+ set overlay(t) {
1903
+ var i;
1904
+ t && this.overlay !== t && (this.overlay && this.overlay.removeController(this), this._overlay = t, this.overlay.addController(this), this.initOverlay(), this.prepareDescription(this.target), (i = this.handleOverlayReady) == null || i.call(this, this.overlay));
1905
+ }
1906
+ prepareDescription(t) {
1907
+ }
1908
+ releaseDescription() {
1909
+ }
1910
+ shouldCompleteOpen() {
1911
+ }
1912
+ /* c8 ignore next 3 */
1913
+ init() {
1914
+ }
1915
+ /* c8 ignore next 3 */
1916
+ initOverlay() {
1917
+ }
1918
+ abort() {
1919
+ var t;
1920
+ this.releaseDescription(), (t = this.abortController) == null || t.abort();
1921
+ }
1922
+ hostConnected() {
1923
+ this.init();
1924
+ }
1925
+ hostDisconnected() {
1926
+ this.isPersistent || this.abort();
1927
+ }
1928
+ }
1929
+ class wi extends Vt {
1930
+ constructor() {
1931
+ super(...arguments), this.type = Pt.click, this.preventNextToggle = !1;
1932
+ }
1933
+ handleClick() {
1934
+ this.preventNextToggle || (this.open = !this.open), this.preventNextToggle = !1;
1935
+ }
1936
+ handlePointerdown() {
1937
+ this.preventNextToggle = this.open;
1938
+ }
1939
+ init() {
1940
+ var i;
1941
+ (i = this.abortController) == null || i.abort(), this.abortController = new AbortController();
1942
+ const { signal: t } = this.abortController;
1943
+ this.target.addEventListener("click", () => this.handleClick(), {
1944
+ signal: t
1945
+ }), this.target.addEventListener(
1946
+ "pointerdown",
1947
+ () => this.handlePointerdown(),
1948
+ { signal: t }
1949
+ );
1950
+ }
1951
+ }
1952
+ const bi = 300;
1953
+ class xi extends Vt {
1954
+ constructor() {
1955
+ super(...arguments), this.type = Pt.hover, this.elementIds = [], this.focusedin = !1, this.pointerentered = !1;
1956
+ }
1957
+ handleTargetFocusin() {
1958
+ this.target.matches(":focus-visible") && (this.open = !0, this.focusedin = !0);
1959
+ }
1960
+ handleTargetFocusout() {
1961
+ this.focusedin = !1, !this.pointerentered && (this.open = !1);
1962
+ }
1963
+ handleTargetPointerenter() {
1964
+ var t;
1965
+ this.hoverTimeout && (clearTimeout(this.hoverTimeout), this.hoverTimeout = void 0), !((t = this.overlay) != null && t.disabled) && (this.open = !0, this.pointerentered = !0);
1966
+ }
1967
+ handleTargetPointerleave() {
1968
+ this.doPointerleave();
1969
+ }
1970
+ // set a timeout once the pointer enters and the overlay is shown
1971
+ // give the user time to enter the overlay
1972
+ handleHostPointerenter() {
1973
+ this.hoverTimeout && (clearTimeout(this.hoverTimeout), this.hoverTimeout = void 0);
1974
+ }
1975
+ handleHostPointerleave() {
1976
+ this.doPointerleave();
1977
+ }
1978
+ prepareDescription() {
1979
+ if (this.overlay.elements.length === 0)
1980
+ return;
1981
+ const t = this.target.getRootNode(), i = this.overlay.elements[0].getRootNode(), n = this.overlay.getRootNode();
1982
+ t === n ? this.prepareOverlayRelativeDescription() : t === i && this.prepareContentRelativeDescription();
1983
+ }
1984
+ prepareOverlayRelativeDescription() {
1985
+ const t = At(
1986
+ this.target,
1987
+ "aria-describedby",
1988
+ [this.overlay.id]
1989
+ );
1990
+ this.releaseDescription = () => {
1991
+ t(), this.releaseDescription = J;
1992
+ };
1993
+ }
1994
+ prepareContentRelativeDescription() {
1995
+ const t = [], i = this.overlay.elements.map((o) => (t.push(o.id), o.id || (o.id = `${this.overlay.tagName.toLowerCase()}-helper-${St()}`), o.id));
1996
+ this.elementIds = t;
1997
+ const n = At(
1998
+ this.target,
1999
+ "aria-describedby",
2000
+ i
2001
+ );
2002
+ this.releaseDescription = () => {
2003
+ n(), this.overlay.elements.map((o, s) => {
2004
+ o.id = this.elementIds[s];
2005
+ }), this.releaseDescription = J;
2006
+ };
2007
+ }
2008
+ doPointerleave() {
2009
+ this.pointerentered = !1;
2010
+ const t = this.target;
2011
+ this.focusedin && t.matches(":focus-visible") || (this.hoverTimeout = setTimeout(() => {
2012
+ this.open = !1;
2013
+ }, bi));
2014
+ }
2015
+ init() {
2016
+ var i;
2017
+ (i = this.abortController) == null || i.abort(), this.abortController = new AbortController();
2018
+ const { signal: t } = this.abortController;
2019
+ this.target.addEventListener("focusin", () => this.handleTargetFocusin(), {
2020
+ signal: t
2021
+ }), this.target.addEventListener(
2022
+ "focusout",
2023
+ () => this.handleTargetFocusout(),
2024
+ { signal: t }
2025
+ ), this.target.addEventListener(
2026
+ "pointerenter",
2027
+ () => this.handleTargetPointerenter(),
2028
+ { signal: t }
2029
+ ), this.target.addEventListener(
2030
+ "pointerleave",
2031
+ () => this.handleTargetPointerleave(),
2032
+ { signal: t }
2033
+ ), this.overlay && this.initOverlay();
2034
+ }
2035
+ initOverlay() {
2036
+ if (!this.abortController)
2037
+ return;
2038
+ const { signal: t } = this.abortController;
2039
+ this.overlay.addEventListener(
2040
+ "pointerenter",
2041
+ () => this.handleHostPointerenter(),
2042
+ { signal: t }
2043
+ ), this.overlay.addEventListener(
2044
+ "pointerleave",
2045
+ () => this.handleHostPointerleave(),
2046
+ { signal: t }
2047
+ );
2048
+ }
2049
+ }
2050
+ const Ei = 300, Pi = {
2051
+ touch: "Double tap and long press for additional options",
2052
+ keyboard: "Press Space or Alt+Down Arrow for additional options",
2053
+ mouse: "Click and hold for additional options"
2054
+ };
2055
+ class Ci extends Vt {
2056
+ constructor() {
2057
+ super(...arguments), this.type = Pt.longpress, this.longpressState = null, this.releaseDescription = J, this.handlePointerup = () => {
2058
+ var t;
2059
+ clearTimeout(this.timeout), this.target && (this.longpressState = ((t = this.overlay) == null ? void 0 : t.state) === "opening" ? "pressed" : null, document.removeEventListener("pointerup", this.handlePointerup), document.removeEventListener("pointercancel", this.handlePointerup));
2060
+ };
2061
+ }
2062
+ get activelyOpening() {
2063
+ return this.longpressState === "opening" || this.longpressState === "pressed";
2064
+ }
2065
+ handleLongpress() {
2066
+ this.open = !0, this.longpressState = this.longpressState === "potential" ? "opening" : "pressed";
2067
+ }
2068
+ handlePointerdown(t) {
2069
+ !this.target || t.button !== 0 || (this.longpressState = "potential", document.addEventListener("pointerup", this.handlePointerup), document.addEventListener("pointercancel", this.handlePointerup), "holdAffordance" in this.target) || (this.timeout = setTimeout(() => {
2070
+ this.target && this.target.dispatchEvent(
2071
+ new CustomEvent("longpress", {
2072
+ bubbles: !0,
2073
+ composed: !0,
2074
+ detail: {
2075
+ source: "pointer"
2076
+ }
2077
+ })
2078
+ );
2079
+ }, Ei));
2080
+ }
2081
+ handleKeydown(t) {
2082
+ const { code: i, altKey: n } = t;
2083
+ n && i === "ArrowDown" && (t.stopPropagation(), t.stopImmediatePropagation());
2084
+ }
2085
+ handleKeyup(t) {
2086
+ const { code: i, altKey: n } = t;
2087
+ if (i === "Space" || n && i === "ArrowDown") {
2088
+ if (!this.target)
2089
+ return;
2090
+ t.stopPropagation(), this.target.dispatchEvent(
2091
+ new CustomEvent("longpress", {
2092
+ bubbles: !0,
2093
+ composed: !0,
2094
+ detail: {
2095
+ source: "keyboard"
2096
+ }
2097
+ })
2098
+ ), setTimeout(() => {
2099
+ this.longpressState = null;
2100
+ });
2101
+ }
2102
+ }
2103
+ prepareDescription(t) {
2104
+ if (
2105
+ // do not reapply until target is recycled
2106
+ this.releaseDescription !== J || // require "longpress content" to apply relationship
2107
+ this.overlay.elements.length === 0
2108
+ )
2109
+ return;
2110
+ const i = document.createElement("div");
2111
+ i.id = `longpress-describedby-descriptor-${St()}`;
2112
+ const n = be() || xe() ? "touch" : "keyboard";
2113
+ i.textContent = Pi[n], i.slot = "longpress-describedby-descriptor";
2114
+ const o = t.getRootNode(), s = this.overlay.getRootNode();
2115
+ o === s ? this.overlay.append(i) : (i.hidden = !("host" in o), t.after(i));
2116
+ const r = At(
2117
+ t,
2118
+ "aria-describedby",
2119
+ [i.id]
2120
+ );
2121
+ this.releaseDescription = () => {
2122
+ r(), i.remove(), this.releaseDescription = J;
2123
+ };
2124
+ }
2125
+ shouldCompleteOpen() {
2126
+ this.longpressState = this.longpressState === "pressed" ? null : this.longpressState;
2127
+ }
2128
+ init() {
2129
+ var i;
2130
+ (i = this.abortController) == null || i.abort(), this.abortController = new AbortController();
2131
+ const { signal: t } = this.abortController;
2132
+ this.target.addEventListener("longpress", () => this.handleLongpress(), {
2133
+ signal: t
2134
+ }), this.target.addEventListener(
2135
+ "pointerdown",
2136
+ (n) => this.handlePointerdown(n),
2137
+ { signal: t }
2138
+ ), this.prepareDescription(this.target), !this.target.holdAffordance && (this.target.addEventListener(
2139
+ "keydown",
2140
+ (n) => this.handleKeydown(n),
2141
+ { signal: t }
2142
+ ), this.target.addEventListener(
2143
+ "keyup",
2144
+ (n) => this.handleKeyup(n),
2145
+ { signal: t }
2146
+ ));
2147
+ }
2148
+ }
2149
+ const Oi = {
2150
+ click: wi,
2151
+ longpress: Ci,
2152
+ hover: xi
2153
+ };
2154
+ var Ai = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, O = (e, t, i, n) => {
2155
+ for (var o = n > 1 ? void 0 : n ? Ti(t, i) : t, s = e.length - 1, r; s >= 0; s--)
2156
+ (r = e[s]) && (o = (n ? r(t, i, o) : r(o)) || o);
2157
+ return n && o && Ai(t, i, o), o;
2158
+ };
2159
+ const Ri = "showPopover" in document.createElement("div");
2160
+ let ft = Te(rt);
2161
+ ft = Ri ? Le(ft) : Re(ft);
2162
+ var I;
2163
+ const P = (I = class extends ft {
2164
+ constructor() {
2165
+ super(...arguments), this._delayed = !1, this._disabled = !1, this.offset = 0, this._open = !1, this.lastRequestSlottableState = !1, this.receivesFocus = "auto", this._state = "closed", this.triggerElement = null, this.type = "auto", this.wasOpen = !1, this.closeOnFocusOut = (t) => {
2166
+ if (!t.relatedTarget)
2167
+ return;
2168
+ const i = new Event("overlay-relation-query", {
2169
+ bubbles: !0,
2170
+ composed: !0
2171
+ });
2172
+ t.relatedTarget.addEventListener(i.type, (n) => {
2173
+ n.composedPath().includes(this) || (this.open = !1);
2174
+ }), t.relatedTarget.dispatchEvent(i);
2175
+ };
2176
+ }
2177
+ get delayed() {
2178
+ var t;
2179
+ return ((t = this.elements.at(-1)) == null ? void 0 : t.hasAttribute("delayed")) || this._delayed;
2180
+ }
2181
+ set delayed(t) {
2182
+ this._delayed = t;
2183
+ }
2184
+ get disabled() {
2185
+ return this._disabled;
2186
+ }
2187
+ set disabled(t) {
2188
+ var i;
2189
+ this._disabled = t, t ? ((i = this.strategy) == null || i.abort(), this.wasOpen = this.open, this.open = !1) : (this.bindEvents(), this.open = this.open || this.wasOpen, this.wasOpen = !1);
2190
+ }
2191
+ /**
2192
+ * Determines if the overlay has a non-virtual trigger element.
2193
+ *
2194
+ * @returns `true` if the trigger element is not a virtual trigger, otherwise `false`.
2195
+ */
2196
+ get hasNonVirtualTrigger() {
2197
+ return !!this.triggerElement && !(this.triggerElement instanceof wt);
2198
+ }
2199
+ /**
2200
+ * Provides an instance of the `PlacementController` for managing the positioning
2201
+ * of the overlay relative to its trigger element.
2202
+ *
2203
+ * If the `PlacementController` instance does not already exist, it is created and
2204
+ * assigned to the `_placementController` property.
2205
+ *
2206
+ * @protected
2207
+ * @returns The `PlacementController` instance.
2208
+ */
2209
+ get placementController() {
2210
+ return this._placementController || (this._placementController = new yi(this)), this._placementController;
2211
+ }
2212
+ get open() {
2213
+ return this._open;
2214
+ }
2215
+ set open(t) {
2216
+ var i;
2217
+ t && this.disabled || t !== this.open && ((i = this.strategy) != null && i.activelyOpening && !t || (this._open = t, this.open && (I.openCount += 1), this.requestUpdate("open", !this.open), this.open && this.requestSlottable()));
2218
+ }
2219
+ get state() {
2220
+ return this._state;
2221
+ }
2222
+ set state(t) {
2223
+ var n;
2224
+ if (t === this.state)
2225
+ return;
2226
+ const i = this.state;
2227
+ this._state = t, (this.state === "opened" || this.state === "closed") && ((n = this.strategy) == null || n.shouldCompleteOpen()), this.requestUpdate("state", i);
2228
+ }
2229
+ /**
2230
+ * Provides an instance of the `ElementResolutionController` for managing the element
2231
+ * that the overlay should be associated with. If the instance does not already exist,
2232
+ * it is created and assigned to the `_elementResolver` property.
2233
+ *
2234
+ * @protected
2235
+ * @returns The `ElementResolutionController` instance.
2236
+ */
2237
+ get elementResolver() {
2238
+ return this._elementResolver || (this._elementResolver = new ue(this)), this._elementResolver;
2239
+ }
2240
+ /**
2241
+ * Determines if the overlay uses a dialog.
2242
+ * Returns `true` if the overlay type is "modal" or "page".
2243
+ *
2244
+ * @private
2245
+ * @returns `true` if the overlay uses a dialog, otherwise `false`.
2246
+ */
2247
+ get usesDialog() {
2248
+ return this.type === "modal" || this.type === "page";
2249
+ }
2250
+ /**
2251
+ * Determines the value for the popover attribute based on the overlay type.
2252
+ *
2253
+ * @private
2254
+ * @returns The popover value or undefined if not applicable.
2255
+ */
2256
+ get popoverValue() {
2257
+ if ("popover" in this)
2258
+ switch (this.type) {
2259
+ case "modal":
2260
+ case "page":
2261
+ return;
2262
+ case "hint":
2263
+ return "manual";
2264
+ default:
2265
+ return this.type;
2266
+ }
2267
+ }
2268
+ /**
2269
+ * Determines if the overlay requires positioning based on its type and state.
2270
+ *
2271
+ * @protected
2272
+ * @returns True if the overlay requires positioning, otherwise false.
2273
+ */
2274
+ get requiresPositioning() {
2275
+ return !(this.type === "page" || !this.open || !this.triggerElement || !this.placement && this.type !== "hint");
2276
+ }
2277
+ /**
2278
+ * Manages the positioning of the overlay relative to its trigger element.
2279
+ *
2280
+ * This method calculates the necessary parameters for positioning the overlay,
2281
+ * such as offset, placement, and tip padding, and then delegates the actual
2282
+ * positioning to the `PlacementController`.
2283
+ *
2284
+ * @protected
2285
+ * @override
2286
+ */
2287
+ managePosition() {
2288
+ if (!this.requiresPositioning || !this.open)
2289
+ return;
2290
+ const t = this.offset || 0, i = this.triggerElement, n = this.placement || "right", o = this.tipPadding;
2291
+ this.placementController.placeOverlay(this.dialogEl, {
2292
+ offset: t,
2293
+ placement: n,
2294
+ tipPadding: o,
2295
+ trigger: i,
2296
+ type: this.type
2297
+ });
2298
+ }
2299
+ /**
2300
+ * Manages the process of opening the popover.
2301
+ *
2302
+ * This method handles the necessary steps to open the popover, including managing delays,
2303
+ * ensuring the popover is in the DOM, making transitions, and applying focus.
2304
+ *
2305
+ * @protected
2306
+ * @override
2307
+ * @returns A promise that resolves when the popover has been fully opened.
2308
+ */
2309
+ async managePopoverOpen() {
2310
+ super.managePopoverOpen();
2311
+ const t = this.open;
2312
+ if (this.open !== t || (await this.manageDelay(t), this.open !== t) || (await this.ensureOnDOM(t), this.open !== t))
2313
+ return;
2314
+ const i = await this.makeTransition(t);
2315
+ this.open === t && await this.applyFocus(t, i);
2316
+ }
2317
+ /**
2318
+ * Applies focus to the appropriate element after the popover has been opened.
2319
+ *
2320
+ * This method handles the focus management for the overlay, ensuring that the correct
2321
+ * element receives focus based on the overlay's type and state.
2322
+ *
2323
+ * @protected
2324
+ * @override
2325
+ * @param targetOpenState - The target open state of the overlay.
2326
+ * @param focusEl - The element to focus after opening the popover.
2327
+ * @returns A promise that resolves when the focus has been applied.
2328
+ */
2329
+ async applyFocus(t, i) {
2330
+ if (!(this.receivesFocus === "false" || this.type === "hint")) {
2331
+ if (await R(), await R(), t === this.open && !this.open) {
2332
+ this.hasNonVirtualTrigger && this.contains(this.getRootNode().activeElement) && this.triggerElement.focus();
2333
+ return;
2334
+ }
2335
+ i == null || i.focus();
2336
+ }
2337
+ }
2338
+ /**
2339
+ * Returns focus to the trigger element if the overlay is closed.
2340
+ *
2341
+ * This method ensures that focus is returned to the trigger element when the overlay is closed,
2342
+ * unless the overlay is of type "hint" or the focus is already outside the overlay.
2343
+ *
2344
+ * @protected
2345
+ * @override
2346
+ */
2347
+ returnFocus() {
2348
+ var i;
2349
+ if (this.open || this.type === "hint")
2350
+ return;
2351
+ const t = () => {
2352
+ var s, r;
2353
+ const n = [];
2354
+ let o = document.activeElement;
2355
+ for (; (s = o == null ? void 0 : o.shadowRoot) != null && s.activeElement; )
2356
+ o = o.shadowRoot.activeElement;
2357
+ for (; o; ) {
2358
+ const a = o.assignedSlot || o.parentElement || ((r = o.getRootNode()) == null ? void 0 : r.host);
2359
+ a && n.push(a), o = a;
2360
+ }
2361
+ return n;
2362
+ };
2363
+ this.receivesFocus !== "false" && ((i = this.triggerElement) != null && i.focus) && (this.contains(this.getRootNode().activeElement) || t().includes(this) || document.activeElement === document.body) && this.triggerElement.focus();
2364
+ }
2365
+ /**
2366
+ * Manages the process of opening or closing the overlay.
2367
+ *
2368
+ * This method handles the necessary steps to open or close the overlay, including updating the state,
2369
+ * managing the overlay stack, and handling focus events.
2370
+ *
2371
+ * @protected
2372
+ * @param oldOpen - The previous open state of the overlay.
2373
+ * @returns A promise that resolves when the overlay has been fully managed.
2374
+ */
2375
+ async manageOpen(t) {
2376
+ if (!(!this.isConnected && this.open) && (this.hasUpdated || await this.updateComplete, this.open ? (Kt.add(this), this.willPreventClose && (document.addEventListener(
2377
+ "pointerup",
2378
+ () => {
2379
+ this.dialogEl.classList.toggle("not-immediately-closable", !1), this.willPreventClose = !1;
2380
+ },
2381
+ { once: !0 }
2382
+ ), this.dialogEl.classList.toggle("not-immediately-closable", !0))) : (t && this.dispose(), Kt.remove(this)), this.open && this.state !== "opened" ? this.state = "opening" : !this.open && this.state !== "closed" && (this.state = "closing"), this.usesDialog ? this.manageDialogOpen() : this.managePopoverOpen(), this.type === "auto")) {
2383
+ const i = this.getRootNode();
2384
+ this.open ? i.addEventListener("focusout", this.closeOnFocusOut, {
2385
+ capture: !0
2386
+ }) : i.removeEventListener("focusout", this.closeOnFocusOut, {
2387
+ capture: !0
2388
+ });
2389
+ }
2390
+ }
2391
+ /**
2392
+ * Binds event handling strategies to the overlay based on the specified trigger interaction.
2393
+ *
2394
+ * This method sets up the appropriate event handling strategy for the overlay, ensuring that
2395
+ * it responds correctly to user interactions such as clicks, hovers, or long presses.
2396
+ *
2397
+ * @protected
2398
+ */
2399
+ bindEvents() {
2400
+ var t;
2401
+ (t = this.strategy) == null || t.abort(), this.strategy = void 0, this.hasNonVirtualTrigger && this.triggerInteraction && (this.strategy = new Oi[this.triggerInteraction](
2402
+ this.triggerElement,
2403
+ {
2404
+ overlay: this
2405
+ }
2406
+ ));
2407
+ }
2408
+ /**
2409
+ * Handles the `beforetoggle` event to manage the overlay's state.
2410
+ *
2411
+ * This method checks the new state of the event and calls `handleBrowserClose`
2412
+ * if the new state is not 'open'.
2413
+ *
2414
+ * @protected
2415
+ * @param event - The `beforetoggle` event with the new state.
2416
+ */
2417
+ handleBeforetoggle(t) {
2418
+ t.newState !== "open" && this.handleBrowserClose(t);
2419
+ }
2420
+ /**
2421
+ * Handles the browser's close event to manage the overlay's state.
2422
+ *
2423
+ * This method stops the propagation of the event and closes the overlay if it is not
2424
+ * actively opening. If the overlay is actively opening, it calls `manuallyKeepOpen`.
2425
+ *
2426
+ * @protected
2427
+ * @param event - The browser's close event.
2428
+ */
2429
+ handleBrowserClose(t) {
2430
+ var i;
2431
+ if (t.stopPropagation(), !((i = this.strategy) != null && i.activelyOpening)) {
2432
+ this.open = !1;
2433
+ return;
2434
+ }
2435
+ this.manuallyKeepOpen();
2436
+ }
2437
+ /**
2438
+ * Manually keeps the overlay open.
2439
+ *
2440
+ * This method sets the overlay to open, allows placement updates, and manages the open state.
2441
+ *
2442
+ * @public
2443
+ * @override
2444
+ */
2445
+ manuallyKeepOpen() {
2446
+ this.open = !0, this.placementController.allowPlacementUpdate = !0, this.manageOpen(!1);
2447
+ }
2448
+ /**
2449
+ * Handles the `slotchange` event to manage the overlay's state.
2450
+ *
2451
+ * This method checks if there are any elements in the slot. If there are no elements,
2452
+ * it releases the description from the strategy. If there are elements and the trigger
2453
+ * is non-virtual, it prepares the description for the trigger element.
2454
+ *
2455
+ * @protected
2456
+ */
2457
+ handleSlotchange() {
2458
+ var t, i;
2459
+ this.elements.length === 0 ? (t = this.strategy) == null || t.releaseDescription() : this.hasNonVirtualTrigger && ((i = this.strategy) == null || i.prepareDescription(this.triggerElement));
2460
+ }
2461
+ /**
2462
+ * Determines whether the overlay should prevent closing.
2463
+ *
2464
+ * This method checks the `willPreventClose` flag and resets it to `false`.
2465
+ * It returns the value of the `willPreventClose` flag.
2466
+ *
2467
+ * @public
2468
+ * @returns `true` if the overlay should prevent closing, otherwise `false`.
2469
+ */
2470
+ shouldPreventClose() {
2471
+ const t = this.willPreventClose;
2472
+ return this.willPreventClose = !1, t;
2473
+ }
2474
+ /**
2475
+ * Requests slottable content for the overlay.
2476
+ *
2477
+ * This method dispatches a `SlottableRequestEvent` to request or remove slottable content
2478
+ * based on the current open state of the overlay. It ensures that the same state is not
2479
+ * dispatched twice in a row.
2480
+ *
2481
+ * @protected
2482
+ * @override
2483
+ */
2484
+ requestSlottable() {
2485
+ this.lastRequestSlottableState !== this.open && (this.open || document.body.offsetHeight, this.dispatchEvent(
2486
+ new ye(
2487
+ "overlay-content",
2488
+ this.open ? {} : we
2489
+ )
2490
+ ), this.lastRequestSlottableState = this.open);
2491
+ }
2492
+ /**
2493
+ * Lifecycle method called before the component updates.
2494
+ *
2495
+ * This method handles various tasks before the component updates, such as setting an ID,
2496
+ * managing the open state, resolving the trigger element, and binding events.
2497
+ *
2498
+ * @override
2499
+ * @param changes - The properties that have changed.
2500
+ */
2501
+ willUpdate(t) {
2502
+ var n;
2503
+ if (this.hasAttribute("id") || this.setAttribute("id", `${this.tagName.toLowerCase()}-${St()}`), t.has("open") && (this.hasUpdated || this.open) && this.manageOpen(t.get("open")), t.has("trigger")) {
2504
+ const [o, s] = ((n = this.trigger) == null ? void 0 : n.split("@")) || [];
2505
+ this.elementResolver.selector = o ? `#${o}` : "", this.triggerInteraction = s;
2506
+ }
2507
+ let i = !1;
2508
+ t.has(pe) && (i = this.triggerElement, this.triggerElement = this.elementResolver.element), t.has("triggerElement") && (i = t.get("triggerElement")), i !== !1 && this.bindEvents();
2509
+ }
2510
+ /**
2511
+ * Lifecycle method called after the component updates.
2512
+ *
2513
+ * This method handles various tasks after the component updates, such as updating the placement
2514
+ * attribute, resetting the overlay position, and clearing the overlay position based on the state.
2515
+ *
2516
+ * @override
2517
+ * @param changes - The properties that have changed.
2518
+ */
2519
+ updated(t) {
2520
+ super.updated(t), t.has("placement") && (this.placement ? this.dialogEl.setAttribute("actual-placement", this.placement) : this.dialogEl.removeAttribute("actual-placement"), this.open && t.get("placement") !== void 0 && this.placementController.resetOverlayPosition()), t.has("state") && this.state === "closed" && t.get("state") !== void 0 && this.placementController.clearOverlayPosition();
2521
+ }
2522
+ /**
2523
+ * Renders the content of the overlay.
2524
+ *
2525
+ * This method returns a template result containing a slot element. The slot element
2526
+ * listens for the `slotchange` event to manage the overlay's state.
2527
+ *
2528
+ * @protected
2529
+ * @returns The template result containing the slot element.
2530
+ */
2531
+ renderContent() {
2532
+ return ht` <slot @slotchange=${this.handleSlotchange}></slot> `;
2533
+ }
2534
+ /**
2535
+ * Generates a style map for the dialog element.
2536
+ *
2537
+ * This method returns an object containing CSS custom properties for the dialog element.
2538
+ * The `--luzmo-overlay-open-count` custom property is set to the current open count of overlays.
2539
+ *
2540
+ * @private
2541
+ * @returns The style map for the dialog element.
2542
+ */
2543
+ get dialogStyleMap() {
2544
+ return {
2545
+ "--luzmo-overlay-open-count": I.openCount.toString()
2546
+ };
2547
+ }
2548
+ /**
2549
+ * Renders the dialog element for the overlay.
2550
+ *
2551
+ * This method returns a template result containing a dialog element. The dialog element
2552
+ * includes various attributes and event listeners to manage the overlay's state and behavior.
2553
+ *
2554
+ * @protected
2555
+ * @returns The template result containing the dialog element.
2556
+ */
2557
+ renderDialog() {
2558
+ return ht`
2559
+ <dialog
2560
+ class="dialog"
2561
+ part="dialog"
2562
+ placement=${Ct(
2563
+ this.requiresPositioning ? this.placement || "right" : void 0
2564
+ )}
2565
+ style=${Ut(this.dialogStyleMap)}
2566
+ @close=${this.handleBrowserClose}
2567
+ @cancel=${this.handleBrowserClose}
2568
+ @beforetoggle=${this.handleBeforetoggle}
2569
+ ?is-visible=${this.state !== "closed"}
2570
+ >
2571
+ ${this.renderContent()}
2572
+ </dialog>
2573
+ `;
2574
+ }
2575
+ /**
2576
+ * Renders the popover element for the overlay.
2577
+ *
2578
+ * This method returns a template result containing a div element styled as a popover.
2579
+ * The popover element includes various attributes and event listeners to manage the overlay's state and behavior.
2580
+ *
2581
+ * @protected
2582
+ * @returns The template result containing the popover element.
2583
+ */
2584
+ renderPopover() {
2585
+ return ht`
2586
+ <div
2587
+ class="dialog"
2588
+ part="dialog"
2589
+ placement=${Ct(
2590
+ this.requiresPositioning ? this.placement || "right" : void 0
2591
+ )}
2592
+ popover=${Ct(this.popoverValue)}
2593
+ style=${Ut(this.dialogStyleMap)}
2594
+ @beforetoggle=${this.handleBeforetoggle}
2595
+ @close=${this.handleBrowserClose}
2596
+ ?is-visible=${this.state !== "closed"}
2597
+ >
2598
+ ${this.renderContent()}
2599
+ </div>
2600
+ `;
2601
+ }
2602
+ /**
2603
+ * Renders the overlay component.
2604
+ *
2605
+ * This method returns a template result containing either a dialog or popover element
2606
+ * based on the overlay type. It also includes a slot for longpress descriptors.
2607
+ *
2608
+ * @override
2609
+ * @returns The template result containing the overlay content.
2610
+ */
2611
+ render() {
2612
+ const t = this.type === "modal" || this.type === "page";
2613
+ return ht`
2614
+ ${t ? this.renderDialog() : this.renderPopover()}
2615
+ <slot name="longpress-describedby-descriptor"></slot>
2616
+ `;
2617
+ }
2618
+ /**
2619
+ * Lifecycle method called when the component is added to the DOM.
2620
+ *
2621
+ * This method sets up event listeners and binds events if the component has already updated.
2622
+ *
2623
+ * @override
2624
+ */
2625
+ connectedCallback() {
2626
+ super.connectedCallback(), this.addEventListener("close", () => {
2627
+ this.open = !1;
2628
+ }), this.hasUpdated && this.bindEvents();
2629
+ }
2630
+ /**
2631
+ * Lifecycle method called when the component is removed from the DOM.
2632
+ *
2633
+ * This method releases the description from the strategy and updates the 'open' property.
2634
+ *
2635
+ * @override
2636
+ */
2637
+ disconnectedCallback() {
2638
+ var t;
2639
+ (t = this.strategy) == null || t.releaseDescription(), this.open = !1, super.disconnectedCallback();
2640
+ }
2641
+ }, I.styles = [fe(Fe)], I.openCount = 1, I);
2642
+ O([
2643
+ z({ type: Boolean })
2644
+ ], P.prototype, "delayed", 1);
2645
+ O([
2646
+ te(".dialog")
2647
+ ], P.prototype, "dialogEl", 2);
2648
+ O([
2649
+ z({ type: Boolean })
2650
+ ], P.prototype, "disabled", 1);
2651
+ O([
2652
+ ve({
2653
+ flatten: !0,
2654
+ selector: ':not([slot="longpress-describedby-descriptor"], slot)'
2655
+ })
2656
+ ], P.prototype, "elements", 2);
2657
+ O([
2658
+ z({ type: Number })
2659
+ ], P.prototype, "offset", 2);
2660
+ O([
2661
+ z({ type: Boolean, reflect: !0 })
2662
+ ], P.prototype, "open", 1);
2663
+ O([
2664
+ z()
2665
+ ], P.prototype, "placement", 2);
2666
+ O([
2667
+ z({ attribute: "receives-focus" })
2668
+ ], P.prototype, "receivesFocus", 2);
2669
+ O([
2670
+ te("slot")
2671
+ ], P.prototype, "slotEl", 2);
2672
+ O([
2673
+ ge()
2674
+ ], P.prototype, "state", 1);
2675
+ O([
2676
+ z({ type: Number, attribute: "tip-padding" })
2677
+ ], P.prototype, "tipPadding", 2);
2678
+ O([
2679
+ z()
2680
+ ], P.prototype, "trigger", 2);
2681
+ O([
2682
+ z({ attribute: !1 })
2683
+ ], P.prototype, "triggerElement", 2);
2684
+ O([
2685
+ z({ attribute: !1 })
2686
+ ], P.prototype, "triggerInteraction", 2);
2687
+ O([
2688
+ z()
2689
+ ], P.prototype, "type", 2);
2690
+ let Di = P;
2691
+ const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2692
+ __proto__: null,
2693
+ Overlay: Di
2694
+ }, Symbol.toStringTag, { value: "Module" }));
2695
+ export {
2696
+ rt as A,
2697
+ Pt as I,
2698
+ Di as O,
2699
+ wt as V,
2700
+ Lt as o,
2701
+ Oi as s
2702
+ };