@logosphere-ui/core 0.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (110) hide show
  1. package/README.md +759 -0
  2. package/dist/atoms/Badge/badge.d.ts +21 -0
  3. package/dist/atoms/Badge/index.d.ts +2 -0
  4. package/dist/atoms/Button/button.d.ts +11 -0
  5. package/dist/atoms/Button/index.d.ts +1 -0
  6. package/dist/atoms/Checkbox/checkbox.d.ts +20 -0
  7. package/dist/atoms/Checkbox/index.d.ts +1 -0
  8. package/dist/atoms/FormField/formfield.d.ts +30 -0
  9. package/dist/atoms/FormField/index.d.ts +2 -0
  10. package/dist/atoms/Switch/index.d.ts +1 -0
  11. package/dist/atoms/Switch/switch.d.ts +10 -0
  12. package/dist/badge-BbhaO73N.cjs +13 -0
  13. package/dist/badge-DE7Tgd8Z.js +71 -0
  14. package/dist/badge.cjs +1 -0
  15. package/dist/badge.js +4 -0
  16. package/dist/breadcrumb-B-4yqoJZ.js +41 -0
  17. package/dist/breadcrumb-Cop-B1J7.cjs +12 -0
  18. package/dist/breadcrumb.cjs +1 -0
  19. package/dist/breadcrumb.js +4 -0
  20. package/dist/button-C1EwOosO.js +58 -0
  21. package/dist/button-CDRccsk9.cjs +10 -0
  22. package/dist/button.cjs +1 -0
  23. package/dist/button.js +4 -0
  24. package/dist/card-CUhlTJyJ.js +97 -0
  25. package/dist/card-n8ka8Zk-.cjs +43 -0
  26. package/dist/card.cjs +1 -0
  27. package/dist/card.js +4 -0
  28. package/dist/chatbot-Ces7Xveb.js +496 -0
  29. package/dist/chatbot-oRwt64d8.cjs +160 -0
  30. package/dist/chatbot.cjs +1 -0
  31. package/dist/chatbot.js +4 -0
  32. package/dist/checkbox-7Rb3WKGx.js +119 -0
  33. package/dist/checkbox-CdDTRdKV.cjs +37 -0
  34. package/dist/checkbox.cjs +1 -0
  35. package/dist/checkbox.js +4 -0
  36. package/dist/combobox-BJbI-Tgi.js +268 -0
  37. package/dist/combobox-pmE7bgEL.cjs +99 -0
  38. package/dist/combobox.cjs +1 -0
  39. package/dist/combobox.js +4 -0
  40. package/dist/datepicker-DFJx45C-.js +750 -0
  41. package/dist/datepicker-b9JGTTMx.cjs +115 -0
  42. package/dist/datepicker.cjs +1 -0
  43. package/dist/datepicker.js +4 -0
  44. package/dist/directive-Z_rhNYWK.js +240 -0
  45. package/dist/directive-ekjitgzi.cjs +3 -0
  46. package/dist/download-manager-A4fOxGWJ.js +381 -0
  47. package/dist/download-manager-BSIMTGaK.cjs +97 -0
  48. package/dist/download-manager.cjs +1 -0
  49. package/dist/download-manager.js +4 -0
  50. package/dist/formfield-D_7NFFoe.cjs +27 -0
  51. package/dist/formfield-d8fp9FTV.js +118 -0
  52. package/dist/formfield.cjs +1 -0
  53. package/dist/formfield.js +4 -0
  54. package/dist/index.cjs +1 -0
  55. package/dist/index.d.ts +16 -0
  56. package/dist/index.js +34 -0
  57. package/dist/index.umd.js +819 -0
  58. package/dist/input-ByllRq9M.js +192 -0
  59. package/dist/input-DsIOQPGV.cjs +46 -0
  60. package/dist/input.cjs +1 -0
  61. package/dist/input.js +4 -0
  62. package/dist/live-BX-yBGvT.cjs +1 -0
  63. package/dist/live-WTVSYE2F.js +24 -0
  64. package/dist/modal-Bfc6WQSL.js +110 -0
  65. package/dist/modal-DQ8VFL-P.cjs +39 -0
  66. package/dist/modal.cjs +1 -0
  67. package/dist/modal.js +4 -0
  68. package/dist/molecules/Breadcrumb/breadcrumb.d.ts +10 -0
  69. package/dist/molecules/Breadcrumb/index.d.ts +1 -0
  70. package/dist/molecules/Card/card.d.ts +16 -0
  71. package/dist/molecules/Card/index.d.ts +1 -0
  72. package/dist/molecules/Input/index.d.ts +2 -0
  73. package/dist/molecules/Input/input.d.ts +50 -0
  74. package/dist/molecules/Popover/index.d.ts +1 -0
  75. package/dist/molecules/Popover/popover.d.ts +33 -0
  76. package/dist/molecules/Textarea/index.d.ts +1 -0
  77. package/dist/molecules/Textarea/text-area.d.ts +49 -0
  78. package/dist/organisms/Chatbot/chatbot.d.ts +79 -0
  79. package/dist/organisms/Chatbot/index.d.ts +1 -0
  80. package/dist/organisms/Combobox/combobox.d.ts +49 -0
  81. package/dist/organisms/Combobox/index.d.ts +1 -0
  82. package/dist/organisms/DatePicker/datepicker.d.ts +79 -0
  83. package/dist/organisms/DatePicker/index.d.ts +1 -0
  84. package/dist/organisms/DownloadManager/download-manager.d.ts +52 -0
  85. package/dist/organisms/DownloadManager/index.d.ts +1 -0
  86. package/dist/organisms/Modal/index.d.ts +1 -0
  87. package/dist/organisms/Modal/modal.d.ts +21 -0
  88. package/dist/organisms/Tab/index.d.ts +1 -0
  89. package/dist/organisms/Tab/tab.d.ts +33 -0
  90. package/dist/popover-C_Ob86CJ.cjs +30 -0
  91. package/dist/popover-D-FXdEdS.js +1040 -0
  92. package/dist/popover.cjs +1 -0
  93. package/dist/popover.js +4 -0
  94. package/dist/shared/icons/icon-map.d.ts +1 -0
  95. package/dist/shared/icons/ui-icon.d.ts +15 -0
  96. package/dist/styles/main.css +247 -0
  97. package/dist/switch-Cpl53nRW.js +64 -0
  98. package/dist/switch-Rnnn10bn.cjs +17 -0
  99. package/dist/switch.cjs +1 -0
  100. package/dist/switch.js +4 -0
  101. package/dist/tab-BKdN4xAz.js +176 -0
  102. package/dist/tab-DcjAlXzU.cjs +40 -0
  103. package/dist/tab.cjs +1 -0
  104. package/dist/tab.js +4 -0
  105. package/dist/text-area-CtZY3yLA.js +204 -0
  106. package/dist/text-area-DFDF5oos.cjs +44 -0
  107. package/dist/textarea.cjs +1 -0
  108. package/dist/textarea.js +4 -0
  109. package/dist/vite.svg +1 -0
  110. package/package.json +185 -0
@@ -0,0 +1,1040 @@
1
+ import { LitElement as mt, html as Ce, unsafeCSS as gt, css as yt } from "lit";
2
+ import { property as oe, query as $e, customElement as bt } from "lit/decorators.js";
3
+ var $ = "top", M = "bottom", L = "right", j = "left", je = "auto", le = [$, M, L, j], Z = "start", fe = "end", wt = "clippingParents", tt = "viewport", ae = "popper", xt = "reference", Xe = /* @__PURE__ */ le.reduce(function(e, t) {
4
+ return e.concat([t + "-" + Z, t + "-" + fe]);
5
+ }, []), rt = /* @__PURE__ */ [].concat(le, [je]).reduce(function(e, t) {
6
+ return e.concat([t, t + "-" + Z, t + "-" + fe]);
7
+ }, []), Ot = "beforeRead", Et = "read", Pt = "afterRead", At = "beforeMain", Ct = "main", Dt = "afterMain", kt = "beforeWrite", $t = "write", jt = "afterWrite", Bt = [Ot, Et, Pt, At, Ct, Dt, kt, $t, jt];
8
+ function N(e) {
9
+ return e ? (e.nodeName || "").toLowerCase() : null;
10
+ }
11
+ function R(e) {
12
+ if (e == null)
13
+ return window;
14
+ if (e.toString() !== "[object Window]") {
15
+ var t = e.ownerDocument;
16
+ return t && t.defaultView || window;
17
+ }
18
+ return e;
19
+ }
20
+ function K(e) {
21
+ var t = R(e).Element;
22
+ return e instanceof t || e instanceof Element;
23
+ }
24
+ function S(e) {
25
+ var t = R(e).HTMLElement;
26
+ return e instanceof t || e instanceof HTMLElement;
27
+ }
28
+ function Be(e) {
29
+ if (typeof ShadowRoot > "u")
30
+ return !1;
31
+ var t = R(e).ShadowRoot;
32
+ return e instanceof t || e instanceof ShadowRoot;
33
+ }
34
+ function Rt(e) {
35
+ var t = e.state;
36
+ Object.keys(t.elements).forEach(function(r) {
37
+ var n = t.styles[r] || {}, o = t.attributes[r] || {}, i = t.elements[r];
38
+ !S(i) || !N(i) || (Object.assign(i.style, n), Object.keys(o).forEach(function(f) {
39
+ var s = o[f];
40
+ s === !1 ? i.removeAttribute(f) : i.setAttribute(f, s === !0 ? "" : s);
41
+ }));
42
+ });
43
+ }
44
+ function St(e) {
45
+ var t = e.state, r = {
46
+ popper: {
47
+ position: t.options.strategy,
48
+ left: "0",
49
+ top: "0",
50
+ margin: "0"
51
+ },
52
+ arrow: {
53
+ position: "absolute"
54
+ },
55
+ reference: {}
56
+ };
57
+ return Object.assign(t.elements.popper.style, r.popper), t.styles = r, t.elements.arrow && Object.assign(t.elements.arrow.style, r.arrow), function() {
58
+ Object.keys(t.elements).forEach(function(n) {
59
+ var o = t.elements[n], i = t.attributes[n] || {}, f = Object.keys(t.styles.hasOwnProperty(n) ? t.styles[n] : r[n]), s = f.reduce(function(a, c) {
60
+ return a[c] = "", a;
61
+ }, {});
62
+ !S(o) || !N(o) || (Object.assign(o.style, s), Object.keys(i).forEach(function(a) {
63
+ o.removeAttribute(a);
64
+ }));
65
+ });
66
+ };
67
+ }
68
+ const Mt = {
69
+ name: "applyStyles",
70
+ enabled: !0,
71
+ phase: "write",
72
+ fn: Rt,
73
+ effect: St,
74
+ requires: ["computeStyles"]
75
+ };
76
+ function H(e) {
77
+ return e.split("-")[0];
78
+ }
79
+ var J = Math.max, we = Math.min, ee = Math.round;
80
+ function De() {
81
+ var e = navigator.userAgentData;
82
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
83
+ return t.brand + "/" + t.version;
84
+ }).join(" ") : navigator.userAgent;
85
+ }
86
+ function ot() {
87
+ return !/^((?!chrome|android).)*safari/i.test(De());
88
+ }
89
+ function te(e, t, r) {
90
+ t === void 0 && (t = !1), r === void 0 && (r = !1);
91
+ var n = e.getBoundingClientRect(), o = 1, i = 1;
92
+ t && S(e) && (o = e.offsetWidth > 0 && ee(n.width) / e.offsetWidth || 1, i = e.offsetHeight > 0 && ee(n.height) / e.offsetHeight || 1);
93
+ var f = K(e) ? R(e) : window, s = f.visualViewport, a = !ot() && r, c = (n.left + (a && s ? s.offsetLeft : 0)) / o, p = (n.top + (a && s ? s.offsetTop : 0)) / i, h = n.width / o, y = n.height / i;
94
+ return {
95
+ width: h,
96
+ height: y,
97
+ top: p,
98
+ right: c + h,
99
+ bottom: p + y,
100
+ left: c,
101
+ x: c,
102
+ y: p
103
+ };
104
+ }
105
+ function Re(e) {
106
+ var t = te(e), r = e.offsetWidth, n = e.offsetHeight;
107
+ return Math.abs(t.width - r) <= 1 && (r = t.width), Math.abs(t.height - n) <= 1 && (n = t.height), {
108
+ x: e.offsetLeft,
109
+ y: e.offsetTop,
110
+ width: r,
111
+ height: n
112
+ };
113
+ }
114
+ function nt(e, t) {
115
+ var r = t.getRootNode && t.getRootNode();
116
+ if (e.contains(t))
117
+ return !0;
118
+ if (r && Be(r)) {
119
+ var n = t;
120
+ do {
121
+ if (n && e.isSameNode(n))
122
+ return !0;
123
+ n = n.parentNode || n.host;
124
+ } while (n);
125
+ }
126
+ return !1;
127
+ }
128
+ function V(e) {
129
+ return R(e).getComputedStyle(e);
130
+ }
131
+ function Lt(e) {
132
+ return ["table", "td", "th"].indexOf(N(e)) >= 0;
133
+ }
134
+ function q(e) {
135
+ return ((K(e) ? e.ownerDocument : (
136
+ // $FlowFixMe[prop-missing]
137
+ e.document
138
+ )) || window.document).documentElement;
139
+ }
140
+ function xe(e) {
141
+ return N(e) === "html" ? e : (
142
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
143
+ // $FlowFixMe[incompatible-return]
144
+ // $FlowFixMe[prop-missing]
145
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
146
+ e.parentNode || // DOM Element detected
147
+ (Be(e) ? e.host : null) || // ShadowRoot detected
148
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
149
+ q(e)
150
+ );
151
+ }
152
+ function Ye(e) {
153
+ return !S(e) || // https://github.com/popperjs/popper-core/issues/837
154
+ V(e).position === "fixed" ? null : e.offsetParent;
155
+ }
156
+ function Tt(e) {
157
+ var t = /firefox/i.test(De()), r = /Trident/i.test(De());
158
+ if (r && S(e)) {
159
+ var n = V(e);
160
+ if (n.position === "fixed")
161
+ return null;
162
+ }
163
+ var o = xe(e);
164
+ for (Be(o) && (o = o.host); S(o) && ["html", "body"].indexOf(N(o)) < 0; ) {
165
+ var i = V(o);
166
+ if (i.transform !== "none" || i.perspective !== "none" || i.contain === "paint" || ["transform", "perspective"].indexOf(i.willChange) !== -1 || t && i.willChange === "filter" || t && i.filter && i.filter !== "none")
167
+ return o;
168
+ o = o.parentNode;
169
+ }
170
+ return null;
171
+ }
172
+ function ue(e) {
173
+ for (var t = R(e), r = Ye(e); r && Lt(r) && V(r).position === "static"; )
174
+ r = Ye(r);
175
+ return r && (N(r) === "html" || N(r) === "body" && V(r).position === "static") ? t : r || Tt(e) || t;
176
+ }
177
+ function Se(e) {
178
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
179
+ }
180
+ function se(e, t, r) {
181
+ return J(e, we(t, r));
182
+ }
183
+ function Wt(e, t, r) {
184
+ var n = se(e, t, r);
185
+ return n > r ? r : n;
186
+ }
187
+ function it() {
188
+ return {
189
+ top: 0,
190
+ right: 0,
191
+ bottom: 0,
192
+ left: 0
193
+ };
194
+ }
195
+ function at(e) {
196
+ return Object.assign({}, it(), e);
197
+ }
198
+ function st(e, t) {
199
+ return t.reduce(function(r, n) {
200
+ return r[n] = e, r;
201
+ }, {});
202
+ }
203
+ var _t = function(t, r) {
204
+ return t = typeof t == "function" ? t(Object.assign({}, r.rects, {
205
+ placement: r.placement
206
+ })) : t, at(typeof t != "number" ? t : st(t, le));
207
+ };
208
+ function Ht(e) {
209
+ var t, r = e.state, n = e.name, o = e.options, i = r.elements.arrow, f = r.modifiersData.popperOffsets, s = H(r.placement), a = Se(s), c = [j, L].indexOf(s) >= 0, p = c ? "height" : "width";
210
+ if (!(!i || !f)) {
211
+ var h = _t(o.padding, r), y = Re(i), l = a === "y" ? $ : j, w = a === "y" ? M : L, v = r.rects.reference[p] + r.rects.reference[a] - f[a] - r.rects.popper[p], d = f[a] - r.rects.reference[a], b = ue(i), O = b ? a === "y" ? b.clientHeight || 0 : b.clientWidth || 0 : 0, E = v / 2 - d / 2, u = h[l], m = O - y[p] - h[w], g = O / 2 - y[p] / 2 + E, x = se(u, g, m), C = a;
212
+ r.modifiersData[n] = (t = {}, t[C] = x, t.centerOffset = x - g, t);
213
+ }
214
+ }
215
+ function Nt(e) {
216
+ var t = e.state, r = e.options, n = r.element, o = n === void 0 ? "[data-popper-arrow]" : n;
217
+ o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || nt(t.elements.popper, o) && (t.elements.arrow = o));
218
+ }
219
+ const zt = {
220
+ name: "arrow",
221
+ enabled: !0,
222
+ phase: "main",
223
+ fn: Ht,
224
+ effect: Nt,
225
+ requires: ["popperOffsets"],
226
+ requiresIfExists: ["preventOverflow"]
227
+ };
228
+ function re(e) {
229
+ return e.split("-")[1];
230
+ }
231
+ var Vt = {
232
+ top: "auto",
233
+ right: "auto",
234
+ bottom: "auto",
235
+ left: "auto"
236
+ };
237
+ function It(e, t) {
238
+ var r = e.x, n = e.y, o = t.devicePixelRatio || 1;
239
+ return {
240
+ x: ee(r * o) / o || 0,
241
+ y: ee(n * o) / o || 0
242
+ };
243
+ }
244
+ function Ue(e) {
245
+ var t, r = e.popper, n = e.popperRect, o = e.placement, i = e.variation, f = e.offsets, s = e.position, a = e.gpuAcceleration, c = e.adaptive, p = e.roundOffsets, h = e.isFixed, y = f.x, l = y === void 0 ? 0 : y, w = f.y, v = w === void 0 ? 0 : w, d = typeof p == "function" ? p({
246
+ x: l,
247
+ y: v
248
+ }) : {
249
+ x: l,
250
+ y: v
251
+ };
252
+ l = d.x, v = d.y;
253
+ var b = f.hasOwnProperty("x"), O = f.hasOwnProperty("y"), E = j, u = $, m = window;
254
+ if (c) {
255
+ var g = ue(r), x = "clientHeight", C = "clientWidth";
256
+ if (g === R(r) && (g = q(r), V(g).position !== "static" && s === "absolute" && (x = "scrollHeight", C = "scrollWidth")), g = g, o === $ || (o === j || o === L) && i === fe) {
257
+ u = M;
258
+ var A = h && g === m && m.visualViewport ? m.visualViewport.height : (
259
+ // $FlowFixMe[prop-missing]
260
+ g[x]
261
+ );
262
+ v -= A - n.height, v *= a ? 1 : -1;
263
+ }
264
+ if (o === j || (o === $ || o === M) && i === fe) {
265
+ E = L;
266
+ var P = h && g === m && m.visualViewport ? m.visualViewport.width : (
267
+ // $FlowFixMe[prop-missing]
268
+ g[C]
269
+ );
270
+ l -= P - n.width, l *= a ? 1 : -1;
271
+ }
272
+ }
273
+ var D = Object.assign({
274
+ position: s
275
+ }, c && Vt), W = p === !0 ? It({
276
+ x: l,
277
+ y: v
278
+ }, R(r)) : {
279
+ x: l,
280
+ y: v
281
+ };
282
+ if (l = W.x, v = W.y, a) {
283
+ var k;
284
+ return Object.assign({}, D, (k = {}, k[u] = O ? "0" : "", k[E] = b ? "0" : "", k.transform = (m.devicePixelRatio || 1) <= 1 ? "translate(" + l + "px, " + v + "px)" : "translate3d(" + l + "px, " + v + "px, 0)", k));
285
+ }
286
+ return Object.assign({}, D, (t = {}, t[u] = O ? v + "px" : "", t[E] = b ? l + "px" : "", t.transform = "", t));
287
+ }
288
+ function qt(e) {
289
+ var t = e.state, r = e.options, n = r.gpuAcceleration, o = n === void 0 ? !0 : n, i = r.adaptive, f = i === void 0 ? !0 : i, s = r.roundOffsets, a = s === void 0 ? !0 : s, c = {
290
+ placement: H(t.placement),
291
+ variation: re(t.placement),
292
+ popper: t.elements.popper,
293
+ popperRect: t.rects.popper,
294
+ gpuAcceleration: o,
295
+ isFixed: t.options.strategy === "fixed"
296
+ };
297
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Ue(Object.assign({}, c, {
298
+ offsets: t.modifiersData.popperOffsets,
299
+ position: t.options.strategy,
300
+ adaptive: f,
301
+ roundOffsets: a
302
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Ue(Object.assign({}, c, {
303
+ offsets: t.modifiersData.arrow,
304
+ position: "absolute",
305
+ adaptive: !1,
306
+ roundOffsets: a
307
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
308
+ "data-popper-placement": t.placement
309
+ });
310
+ }
311
+ const Ft = {
312
+ name: "computeStyles",
313
+ enabled: !0,
314
+ phase: "beforeWrite",
315
+ fn: qt,
316
+ data: {}
317
+ };
318
+ var ye = {
319
+ passive: !0
320
+ };
321
+ function Xt(e) {
322
+ var t = e.state, r = e.instance, n = e.options, o = n.scroll, i = o === void 0 ? !0 : o, f = n.resize, s = f === void 0 ? !0 : f, a = R(t.elements.popper), c = [].concat(t.scrollParents.reference, t.scrollParents.popper);
323
+ return i && c.forEach(function(p) {
324
+ p.addEventListener("scroll", r.update, ye);
325
+ }), s && a.addEventListener("resize", r.update, ye), function() {
326
+ i && c.forEach(function(p) {
327
+ p.removeEventListener("scroll", r.update, ye);
328
+ }), s && a.removeEventListener("resize", r.update, ye);
329
+ };
330
+ }
331
+ const Yt = {
332
+ name: "eventListeners",
333
+ enabled: !0,
334
+ phase: "write",
335
+ fn: function() {
336
+ },
337
+ effect: Xt,
338
+ data: {}
339
+ };
340
+ var Ut = {
341
+ left: "right",
342
+ right: "left",
343
+ bottom: "top",
344
+ top: "bottom"
345
+ };
346
+ function be(e) {
347
+ return e.replace(/left|right|bottom|top/g, function(t) {
348
+ return Ut[t];
349
+ });
350
+ }
351
+ var Gt = {
352
+ start: "end",
353
+ end: "start"
354
+ };
355
+ function Ge(e) {
356
+ return e.replace(/start|end/g, function(t) {
357
+ return Gt[t];
358
+ });
359
+ }
360
+ function Me(e) {
361
+ var t = R(e), r = t.pageXOffset, n = t.pageYOffset;
362
+ return {
363
+ scrollLeft: r,
364
+ scrollTop: n
365
+ };
366
+ }
367
+ function Le(e) {
368
+ return te(q(e)).left + Me(e).scrollLeft;
369
+ }
370
+ function Jt(e, t) {
371
+ var r = R(e), n = q(e), o = r.visualViewport, i = n.clientWidth, f = n.clientHeight, s = 0, a = 0;
372
+ if (o) {
373
+ i = o.width, f = o.height;
374
+ var c = ot();
375
+ (c || !c && t === "fixed") && (s = o.offsetLeft, a = o.offsetTop);
376
+ }
377
+ return {
378
+ width: i,
379
+ height: f,
380
+ x: s + Le(e),
381
+ y: a
382
+ };
383
+ }
384
+ function Kt(e) {
385
+ var t, r = q(e), n = Me(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, i = J(r.scrollWidth, r.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), f = J(r.scrollHeight, r.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), s = -n.scrollLeft + Le(e), a = -n.scrollTop;
386
+ return V(o || r).direction === "rtl" && (s += J(r.clientWidth, o ? o.clientWidth : 0) - i), {
387
+ width: i,
388
+ height: f,
389
+ x: s,
390
+ y: a
391
+ };
392
+ }
393
+ function Te(e) {
394
+ var t = V(e), r = t.overflow, n = t.overflowX, o = t.overflowY;
395
+ return /auto|scroll|overlay|hidden/.test(r + o + n);
396
+ }
397
+ function pt(e) {
398
+ return ["html", "body", "#document"].indexOf(N(e)) >= 0 ? e.ownerDocument.body : S(e) && Te(e) ? e : pt(xe(e));
399
+ }
400
+ function pe(e, t) {
401
+ var r;
402
+ t === void 0 && (t = []);
403
+ var n = pt(e), o = n === ((r = e.ownerDocument) == null ? void 0 : r.body), i = R(n), f = o ? [i].concat(i.visualViewport || [], Te(n) ? n : []) : n, s = t.concat(f);
404
+ return o ? s : (
405
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
406
+ s.concat(pe(xe(f)))
407
+ );
408
+ }
409
+ function ke(e) {
410
+ return Object.assign({}, e, {
411
+ left: e.x,
412
+ top: e.y,
413
+ right: e.x + e.width,
414
+ bottom: e.y + e.height
415
+ });
416
+ }
417
+ function Qt(e, t) {
418
+ var r = te(e, !1, t === "fixed");
419
+ return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
420
+ }
421
+ function Je(e, t, r) {
422
+ return t === tt ? ke(Jt(e, r)) : K(t) ? Qt(t, r) : ke(Kt(q(e)));
423
+ }
424
+ function Zt(e) {
425
+ var t = pe(xe(e)), r = ["absolute", "fixed"].indexOf(V(e).position) >= 0, n = r && S(e) ? ue(e) : e;
426
+ return K(n) ? t.filter(function(o) {
427
+ return K(o) && nt(o, n) && N(o) !== "body";
428
+ }) : [];
429
+ }
430
+ function er(e, t, r, n) {
431
+ var o = t === "clippingParents" ? Zt(e) : [].concat(t), i = [].concat(o, [r]), f = i[0], s = i.reduce(function(a, c) {
432
+ var p = Je(e, c, n);
433
+ return a.top = J(p.top, a.top), a.right = we(p.right, a.right), a.bottom = we(p.bottom, a.bottom), a.left = J(p.left, a.left), a;
434
+ }, Je(e, f, n));
435
+ return s.width = s.right - s.left, s.height = s.bottom - s.top, s.x = s.left, s.y = s.top, s;
436
+ }
437
+ function ft(e) {
438
+ var t = e.reference, r = e.element, n = e.placement, o = n ? H(n) : null, i = n ? re(n) : null, f = t.x + t.width / 2 - r.width / 2, s = t.y + t.height / 2 - r.height / 2, a;
439
+ switch (o) {
440
+ case $:
441
+ a = {
442
+ x: f,
443
+ y: t.y - r.height
444
+ };
445
+ break;
446
+ case M:
447
+ a = {
448
+ x: f,
449
+ y: t.y + t.height
450
+ };
451
+ break;
452
+ case L:
453
+ a = {
454
+ x: t.x + t.width,
455
+ y: s
456
+ };
457
+ break;
458
+ case j:
459
+ a = {
460
+ x: t.x - r.width,
461
+ y: s
462
+ };
463
+ break;
464
+ default:
465
+ a = {
466
+ x: t.x,
467
+ y: t.y
468
+ };
469
+ }
470
+ var c = o ? Se(o) : null;
471
+ if (c != null) {
472
+ var p = c === "y" ? "height" : "width";
473
+ switch (i) {
474
+ case Z:
475
+ a[c] = a[c] - (t[p] / 2 - r[p] / 2);
476
+ break;
477
+ case fe:
478
+ a[c] = a[c] + (t[p] / 2 - r[p] / 2);
479
+ break;
480
+ }
481
+ }
482
+ return a;
483
+ }
484
+ function ce(e, t) {
485
+ t === void 0 && (t = {});
486
+ var r = t, n = r.placement, o = n === void 0 ? e.placement : n, i = r.strategy, f = i === void 0 ? e.strategy : i, s = r.boundary, a = s === void 0 ? wt : s, c = r.rootBoundary, p = c === void 0 ? tt : c, h = r.elementContext, y = h === void 0 ? ae : h, l = r.altBoundary, w = l === void 0 ? !1 : l, v = r.padding, d = v === void 0 ? 0 : v, b = at(typeof d != "number" ? d : st(d, le)), O = y === ae ? xt : ae, E = e.rects.popper, u = e.elements[w ? O : y], m = er(K(u) ? u : u.contextElement || q(e.elements.popper), a, p, f), g = te(e.elements.reference), x = ft({
487
+ reference: g,
488
+ element: E,
489
+ placement: o
490
+ }), C = ke(Object.assign({}, E, x)), A = y === ae ? C : g, P = {
491
+ top: m.top - A.top + b.top,
492
+ bottom: A.bottom - m.bottom + b.bottom,
493
+ left: m.left - A.left + b.left,
494
+ right: A.right - m.right + b.right
495
+ }, D = e.modifiersData.offset;
496
+ if (y === ae && D) {
497
+ var W = D[o];
498
+ Object.keys(P).forEach(function(k) {
499
+ var F = [L, M].indexOf(k) >= 0 ? 1 : -1, X = [$, M].indexOf(k) >= 0 ? "y" : "x";
500
+ P[k] += W[X] * F;
501
+ });
502
+ }
503
+ return P;
504
+ }
505
+ function tr(e, t) {
506
+ t === void 0 && (t = {});
507
+ var r = t, n = r.placement, o = r.boundary, i = r.rootBoundary, f = r.padding, s = r.flipVariations, a = r.allowedAutoPlacements, c = a === void 0 ? rt : a, p = re(n), h = p ? s ? Xe : Xe.filter(function(w) {
508
+ return re(w) === p;
509
+ }) : le, y = h.filter(function(w) {
510
+ return c.indexOf(w) >= 0;
511
+ });
512
+ y.length === 0 && (y = h);
513
+ var l = y.reduce(function(w, v) {
514
+ return w[v] = ce(e, {
515
+ placement: v,
516
+ boundary: o,
517
+ rootBoundary: i,
518
+ padding: f
519
+ })[H(v)], w;
520
+ }, {});
521
+ return Object.keys(l).sort(function(w, v) {
522
+ return l[w] - l[v];
523
+ });
524
+ }
525
+ function rr(e) {
526
+ if (H(e) === je)
527
+ return [];
528
+ var t = be(e);
529
+ return [Ge(e), t, Ge(t)];
530
+ }
531
+ function or(e) {
532
+ var t = e.state, r = e.options, n = e.name;
533
+ if (!t.modifiersData[n]._skip) {
534
+ for (var o = r.mainAxis, i = o === void 0 ? !0 : o, f = r.altAxis, s = f === void 0 ? !0 : f, a = r.fallbackPlacements, c = r.padding, p = r.boundary, h = r.rootBoundary, y = r.altBoundary, l = r.flipVariations, w = l === void 0 ? !0 : l, v = r.allowedAutoPlacements, d = t.options.placement, b = H(d), O = b === d, E = a || (O || !w ? [be(d)] : rr(d)), u = [d].concat(E).reduce(function(Q, I) {
535
+ return Q.concat(H(I) === je ? tr(t, {
536
+ placement: I,
537
+ boundary: p,
538
+ rootBoundary: h,
539
+ padding: c,
540
+ flipVariations: w,
541
+ allowedAutoPlacements: v
542
+ }) : I);
543
+ }, []), m = t.rects.reference, g = t.rects.popper, x = /* @__PURE__ */ new Map(), C = !0, A = u[0], P = 0; P < u.length; P++) {
544
+ var D = u[P], W = H(D), k = re(D) === Z, F = [$, M].indexOf(W) >= 0, X = F ? "width" : "height", B = ce(t, {
545
+ placement: D,
546
+ boundary: p,
547
+ rootBoundary: h,
548
+ altBoundary: y,
549
+ padding: c
550
+ }), _ = F ? k ? L : j : k ? M : $;
551
+ m[X] > g[X] && (_ = be(_));
552
+ var de = be(_), Y = [];
553
+ if (i && Y.push(B[W] <= 0), s && Y.push(B[_] <= 0, B[de] <= 0), Y.every(function(Q) {
554
+ return Q;
555
+ })) {
556
+ A = D, C = !1;
557
+ break;
558
+ }
559
+ x.set(D, Y);
560
+ }
561
+ if (C)
562
+ for (var ve = w ? 3 : 1, Oe = function(I) {
563
+ var ie = u.find(function(me) {
564
+ var U = x.get(me);
565
+ if (U)
566
+ return U.slice(0, I).every(function(Ee) {
567
+ return Ee;
568
+ });
569
+ });
570
+ if (ie)
571
+ return A = ie, "break";
572
+ }, ne = ve; ne > 0; ne--) {
573
+ var he = Oe(ne);
574
+ if (he === "break") break;
575
+ }
576
+ t.placement !== A && (t.modifiersData[n]._skip = !0, t.placement = A, t.reset = !0);
577
+ }
578
+ }
579
+ const nr = {
580
+ name: "flip",
581
+ enabled: !0,
582
+ phase: "main",
583
+ fn: or,
584
+ requiresIfExists: ["offset"],
585
+ data: {
586
+ _skip: !1
587
+ }
588
+ };
589
+ function Ke(e, t, r) {
590
+ return r === void 0 && (r = {
591
+ x: 0,
592
+ y: 0
593
+ }), {
594
+ top: e.top - t.height - r.y,
595
+ right: e.right - t.width + r.x,
596
+ bottom: e.bottom - t.height + r.y,
597
+ left: e.left - t.width - r.x
598
+ };
599
+ }
600
+ function Qe(e) {
601
+ return [$, L, M, j].some(function(t) {
602
+ return e[t] >= 0;
603
+ });
604
+ }
605
+ function ir(e) {
606
+ var t = e.state, r = e.name, n = t.rects.reference, o = t.rects.popper, i = t.modifiersData.preventOverflow, f = ce(t, {
607
+ elementContext: "reference"
608
+ }), s = ce(t, {
609
+ altBoundary: !0
610
+ }), a = Ke(f, n), c = Ke(s, o, i), p = Qe(a), h = Qe(c);
611
+ t.modifiersData[r] = {
612
+ referenceClippingOffsets: a,
613
+ popperEscapeOffsets: c,
614
+ isReferenceHidden: p,
615
+ hasPopperEscaped: h
616
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
617
+ "data-popper-reference-hidden": p,
618
+ "data-popper-escaped": h
619
+ });
620
+ }
621
+ const ar = {
622
+ name: "hide",
623
+ enabled: !0,
624
+ phase: "main",
625
+ requiresIfExists: ["preventOverflow"],
626
+ fn: ir
627
+ };
628
+ function sr(e, t, r) {
629
+ var n = H(e), o = [j, $].indexOf(n) >= 0 ? -1 : 1, i = typeof r == "function" ? r(Object.assign({}, t, {
630
+ placement: e
631
+ })) : r, f = i[0], s = i[1];
632
+ return f = f || 0, s = (s || 0) * o, [j, L].indexOf(n) >= 0 ? {
633
+ x: s,
634
+ y: f
635
+ } : {
636
+ x: f,
637
+ y: s
638
+ };
639
+ }
640
+ function pr(e) {
641
+ var t = e.state, r = e.options, n = e.name, o = r.offset, i = o === void 0 ? [0, 0] : o, f = rt.reduce(function(p, h) {
642
+ return p[h] = sr(h, t.rects, i), p;
643
+ }, {}), s = f[t.placement], a = s.x, c = s.y;
644
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += c), t.modifiersData[n] = f;
645
+ }
646
+ const fr = {
647
+ name: "offset",
648
+ enabled: !0,
649
+ phase: "main",
650
+ requires: ["popperOffsets"],
651
+ fn: pr
652
+ };
653
+ function cr(e) {
654
+ var t = e.state, r = e.name;
655
+ t.modifiersData[r] = ft({
656
+ reference: t.rects.reference,
657
+ element: t.rects.popper,
658
+ placement: t.placement
659
+ });
660
+ }
661
+ const lr = {
662
+ name: "popperOffsets",
663
+ enabled: !0,
664
+ phase: "read",
665
+ fn: cr,
666
+ data: {}
667
+ };
668
+ function ur(e) {
669
+ return e === "x" ? "y" : "x";
670
+ }
671
+ function dr(e) {
672
+ var t = e.state, r = e.options, n = e.name, o = r.mainAxis, i = o === void 0 ? !0 : o, f = r.altAxis, s = f === void 0 ? !1 : f, a = r.boundary, c = r.rootBoundary, p = r.altBoundary, h = r.padding, y = r.tether, l = y === void 0 ? !0 : y, w = r.tetherOffset, v = w === void 0 ? 0 : w, d = ce(t, {
673
+ boundary: a,
674
+ rootBoundary: c,
675
+ padding: h,
676
+ altBoundary: p
677
+ }), b = H(t.placement), O = re(t.placement), E = !O, u = Se(b), m = ur(u), g = t.modifiersData.popperOffsets, x = t.rects.reference, C = t.rects.popper, A = typeof v == "function" ? v(Object.assign({}, t.rects, {
678
+ placement: t.placement
679
+ })) : v, P = typeof A == "number" ? {
680
+ mainAxis: A,
681
+ altAxis: A
682
+ } : Object.assign({
683
+ mainAxis: 0,
684
+ altAxis: 0
685
+ }, A), D = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, W = {
686
+ x: 0,
687
+ y: 0
688
+ };
689
+ if (g) {
690
+ if (i) {
691
+ var k, F = u === "y" ? $ : j, X = u === "y" ? M : L, B = u === "y" ? "height" : "width", _ = g[u], de = _ + d[F], Y = _ - d[X], ve = l ? -C[B] / 2 : 0, Oe = O === Z ? x[B] : C[B], ne = O === Z ? -C[B] : -x[B], he = t.elements.arrow, Q = l && he ? Re(he) : {
692
+ width: 0,
693
+ height: 0
694
+ }, I = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : it(), ie = I[F], me = I[X], U = se(0, x[B], Q[B]), Ee = E ? x[B] / 2 - ve - U - ie - P.mainAxis : Oe - U - ie - P.mainAxis, ct = E ? -x[B] / 2 + ve + U + me + P.mainAxis : ne + U + me + P.mainAxis, Pe = t.elements.arrow && ue(t.elements.arrow), lt = Pe ? u === "y" ? Pe.clientTop || 0 : Pe.clientLeft || 0 : 0, We = (k = D?.[u]) != null ? k : 0, ut = _ + Ee - We - lt, dt = _ + ct - We, _e = se(l ? we(de, ut) : de, _, l ? J(Y, dt) : Y);
695
+ g[u] = _e, W[u] = _e - _;
696
+ }
697
+ if (s) {
698
+ var He, vt = u === "x" ? $ : j, ht = u === "x" ? M : L, G = g[m], ge = m === "y" ? "height" : "width", Ne = G + d[vt], ze = G - d[ht], Ae = [$, j].indexOf(b) !== -1, Ve = (He = D?.[m]) != null ? He : 0, Ie = Ae ? Ne : G - x[ge] - C[ge] - Ve + P.altAxis, qe = Ae ? G + x[ge] + C[ge] - Ve - P.altAxis : ze, Fe = l && Ae ? Wt(Ie, G, qe) : se(l ? Ie : Ne, G, l ? qe : ze);
699
+ g[m] = Fe, W[m] = Fe - G;
700
+ }
701
+ t.modifiersData[n] = W;
702
+ }
703
+ }
704
+ const vr = {
705
+ name: "preventOverflow",
706
+ enabled: !0,
707
+ phase: "main",
708
+ fn: dr,
709
+ requiresIfExists: ["offset"]
710
+ };
711
+ function hr(e) {
712
+ return {
713
+ scrollLeft: e.scrollLeft,
714
+ scrollTop: e.scrollTop
715
+ };
716
+ }
717
+ function mr(e) {
718
+ return e === R(e) || !S(e) ? Me(e) : hr(e);
719
+ }
720
+ function gr(e) {
721
+ var t = e.getBoundingClientRect(), r = ee(t.width) / e.offsetWidth || 1, n = ee(t.height) / e.offsetHeight || 1;
722
+ return r !== 1 || n !== 1;
723
+ }
724
+ function yr(e, t, r) {
725
+ r === void 0 && (r = !1);
726
+ var n = S(t), o = S(t) && gr(t), i = q(t), f = te(e, o, r), s = {
727
+ scrollLeft: 0,
728
+ scrollTop: 0
729
+ }, a = {
730
+ x: 0,
731
+ y: 0
732
+ };
733
+ return (n || !n && !r) && ((N(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
734
+ Te(i)) && (s = mr(t)), S(t) ? (a = te(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : i && (a.x = Le(i))), {
735
+ x: f.left + s.scrollLeft - a.x,
736
+ y: f.top + s.scrollTop - a.y,
737
+ width: f.width,
738
+ height: f.height
739
+ };
740
+ }
741
+ function br(e) {
742
+ var t = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Set(), n = [];
743
+ e.forEach(function(i) {
744
+ t.set(i.name, i);
745
+ });
746
+ function o(i) {
747
+ r.add(i.name);
748
+ var f = [].concat(i.requires || [], i.requiresIfExists || []);
749
+ f.forEach(function(s) {
750
+ if (!r.has(s)) {
751
+ var a = t.get(s);
752
+ a && o(a);
753
+ }
754
+ }), n.push(i);
755
+ }
756
+ return e.forEach(function(i) {
757
+ r.has(i.name) || o(i);
758
+ }), n;
759
+ }
760
+ function wr(e) {
761
+ var t = br(e);
762
+ return Bt.reduce(function(r, n) {
763
+ return r.concat(t.filter(function(o) {
764
+ return o.phase === n;
765
+ }));
766
+ }, []);
767
+ }
768
+ function xr(e) {
769
+ var t;
770
+ return function() {
771
+ return t || (t = new Promise(function(r) {
772
+ Promise.resolve().then(function() {
773
+ t = void 0, r(e());
774
+ });
775
+ })), t;
776
+ };
777
+ }
778
+ function Or(e) {
779
+ var t = e.reduce(function(r, n) {
780
+ var o = r[n.name];
781
+ return r[n.name] = o ? Object.assign({}, o, n, {
782
+ options: Object.assign({}, o.options, n.options),
783
+ data: Object.assign({}, o.data, n.data)
784
+ }) : n, r;
785
+ }, {});
786
+ return Object.keys(t).map(function(r) {
787
+ return t[r];
788
+ });
789
+ }
790
+ var Ze = {
791
+ placement: "bottom",
792
+ modifiers: [],
793
+ strategy: "absolute"
794
+ };
795
+ function et() {
796
+ for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
797
+ t[r] = arguments[r];
798
+ return !t.some(function(n) {
799
+ return !(n && typeof n.getBoundingClientRect == "function");
800
+ });
801
+ }
802
+ function Er(e) {
803
+ e === void 0 && (e = {});
804
+ var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, o = t.defaultOptions, i = o === void 0 ? Ze : o;
805
+ return function(s, a, c) {
806
+ c === void 0 && (c = i);
807
+ var p = {
808
+ placement: "bottom",
809
+ orderedModifiers: [],
810
+ options: Object.assign({}, Ze, i),
811
+ modifiersData: {},
812
+ elements: {
813
+ reference: s,
814
+ popper: a
815
+ },
816
+ attributes: {},
817
+ styles: {}
818
+ }, h = [], y = !1, l = {
819
+ state: p,
820
+ setOptions: function(b) {
821
+ var O = typeof b == "function" ? b(p.options) : b;
822
+ v(), p.options = Object.assign({}, i, p.options, O), p.scrollParents = {
823
+ reference: K(s) ? pe(s) : s.contextElement ? pe(s.contextElement) : [],
824
+ popper: pe(a)
825
+ };
826
+ var E = wr(Or([].concat(n, p.options.modifiers)));
827
+ return p.orderedModifiers = E.filter(function(u) {
828
+ return u.enabled;
829
+ }), w(), l.update();
830
+ },
831
+ // Sync update – it will always be executed, even if not necessary. This
832
+ // is useful for low frequency updates where sync behavior simplifies the
833
+ // logic.
834
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
835
+ // prefer the async Popper#update method
836
+ forceUpdate: function() {
837
+ if (!y) {
838
+ var b = p.elements, O = b.reference, E = b.popper;
839
+ if (et(O, E)) {
840
+ p.rects = {
841
+ reference: yr(O, ue(E), p.options.strategy === "fixed"),
842
+ popper: Re(E)
843
+ }, p.reset = !1, p.placement = p.options.placement, p.orderedModifiers.forEach(function(P) {
844
+ return p.modifiersData[P.name] = Object.assign({}, P.data);
845
+ });
846
+ for (var u = 0; u < p.orderedModifiers.length; u++) {
847
+ if (p.reset === !0) {
848
+ p.reset = !1, u = -1;
849
+ continue;
850
+ }
851
+ var m = p.orderedModifiers[u], g = m.fn, x = m.options, C = x === void 0 ? {} : x, A = m.name;
852
+ typeof g == "function" && (p = g({
853
+ state: p,
854
+ options: C,
855
+ name: A,
856
+ instance: l
857
+ }) || p);
858
+ }
859
+ }
860
+ }
861
+ },
862
+ // Async and optimistically optimized update – it will not be executed if
863
+ // not necessary (debounced to run at most once-per-tick)
864
+ update: xr(function() {
865
+ return new Promise(function(d) {
866
+ l.forceUpdate(), d(p);
867
+ });
868
+ }),
869
+ destroy: function() {
870
+ v(), y = !0;
871
+ }
872
+ };
873
+ if (!et(s, a))
874
+ return l;
875
+ l.setOptions(c).then(function(d) {
876
+ !y && c.onFirstUpdate && c.onFirstUpdate(d);
877
+ });
878
+ function w() {
879
+ p.orderedModifiers.forEach(function(d) {
880
+ var b = d.name, O = d.options, E = O === void 0 ? {} : O, u = d.effect;
881
+ if (typeof u == "function") {
882
+ var m = u({
883
+ state: p,
884
+ name: b,
885
+ instance: l,
886
+ options: E
887
+ }), g = function() {
888
+ };
889
+ h.push(m || g);
890
+ }
891
+ });
892
+ }
893
+ function v() {
894
+ h.forEach(function(d) {
895
+ return d();
896
+ }), h = [];
897
+ }
898
+ return l;
899
+ };
900
+ }
901
+ var Pr = [Yt, lr, Ft, Mt, fr, nr, vr, zt, ar], Ar = /* @__PURE__ */ Er({
902
+ defaultModifiers: Pr
903
+ });
904
+ const Cr = '.popover__wrapper{position:relative;display:inline-block;font-family:var(--font-family-base)}.popover__trigger{display:inline-flex}.popover__panel{position:relative;overflow:visible;z-index:var(--z-index-popover);min-width:240px;border-radius:var(--radius-md);border:1px solid var(--color-border);background-color:var(--color-body-bg);box-shadow:var(--shadow-md)}.popover__content{position:relative;z-index:1;background-color:var(--color-body-bg);border-radius:var(--radius-md);overflow:hidden}.popover__content:before{content:"";position:absolute;top:0;left:0;right:0;height:8px;background-color:var(--color-body-bg);border-radius:var(--radius-md) var(--radius-md) 0 0;z-index:1;pointer-events:none}.popover__content>*{position:relative;z-index:2}.popover__title{padding:10px var(--spacing-3);font-size:var(--font-size-sm);font-weight:var(--font-weight-semibold);color:var(--color-body-text)}.popover__body{padding:var(--spacing-3);font-size:var(--font-size-sm);color:var(--color-secondary)}.popover__body--with-border{border-top:1px solid var(--color-border)}.popper-arrow{position:absolute;width:12px;height:12px;pointer-events:none;z-index:0}.popper-arrow:before{content:"";position:absolute;inset:0;background:var(--color-border);transform:rotate(45deg)}.popper-arrow:after{content:"";position:absolute;inset:1px;background:var(--color-body-bg);transform:rotate(45deg)}[data-popper]{position:relative;overflow:visible}[data-popper-placement^=bottom]>.popper-arrow{top:-6px;left:50%;transform:translate(-50%,-50%)}[data-popper-placement^=top]>.popper-arrow{bottom:-6px;left:50%;transform:translate(-50%,50%)}[data-popper-placement^=left]>.popper-arrow{right:-6px;top:50%;transform:translate(50%,-50%)}[data-popper-placement^=right]>.popper-arrow{left:-6px;top:50%;transform:translate(-50%,-50%)}';
905
+ var Dr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, z = (e, t, r, n) => {
906
+ for (var o = n > 1 ? void 0 : n ? kr(t, r) : t, i = e.length - 1, f; i >= 0; i--)
907
+ (f = e[i]) && (o = (n ? f(t, r, o) : f(o)) || o);
908
+ return n && o && Dr(t, r, o), o;
909
+ };
910
+ let T = class extends mt {
911
+ constructor() {
912
+ super(...arguments), this.title = "", this.trigger = "click", this.placement = "bottom", this.offset = 8, this.open = !1, this.closeOnOutsideClick = !0, this.handleDocumentClick = (e) => {
913
+ !this.open || !this.closeOnOutsideClick || e.composedPath().includes(this) || this.setOpen(!1);
914
+ }, this.toggle = (e) => {
915
+ (this.trigger === "click" || this.trigger === "both") && (e?.stopPropagation(), this.setOpen(!this.open));
916
+ }, this.handleMouseEnter = () => {
917
+ (this.trigger === "hover" || this.trigger === "both") && this.setOpen(!0);
918
+ }, this.handleMouseLeave = () => {
919
+ (this.trigger === "hover" || this.trigger === "both") && this.setOpen(!1);
920
+ };
921
+ }
922
+ connectedCallback() {
923
+ super.connectedCallback(), document.addEventListener("click", this.handleDocumentClick, { capture: !0 });
924
+ }
925
+ disconnectedCallback() {
926
+ super.disconnectedCallback(), document.removeEventListener("click", this.handleDocumentClick, { capture: !0 }), this.destroyPopper();
927
+ }
928
+ updated(e) {
929
+ super.updated(e);
930
+ const t = e.has("placement"), r = e.has("open") && this.open;
931
+ if (e.has("open") && !this.open) {
932
+ this.destroyPopper();
933
+ return;
934
+ }
935
+ (r || t) && this.open && this.updatePopper();
936
+ }
937
+ setOpen(e) {
938
+ this.open !== e && (this.open = e, this.dispatchEvent(new CustomEvent(e ? "popover-open" : "popover-close", {
939
+ bubbles: !0,
940
+ composed: !0
941
+ })));
942
+ }
943
+ updatePopper() {
944
+ if (!this.isConnected || !this.open) return;
945
+ const e = this.triggerElement, t = this.popperElement;
946
+ if (!(!e || !t)) {
947
+ if (this.popperInstance) {
948
+ this.popperInstance.setOptions({
949
+ placement: this.placement,
950
+ modifiers: this.getPopperModifiers(),
951
+ strategy: "fixed"
952
+ }), this.popperInstance.update();
953
+ return;
954
+ }
955
+ this.popperInstance = Ar(e, t, {
956
+ placement: this.placement,
957
+ strategy: "fixed",
958
+ modifiers: this.getPopperModifiers()
959
+ });
960
+ }
961
+ }
962
+ getPopperModifiers() {
963
+ return [
964
+ { name: "offset", options: { offset: [0, this.offset] } },
965
+ { name: "arrow", options: { element: this.popperArrowElement, padding: 8 } },
966
+ { name: "preventOverflow", options: { padding: 8 } },
967
+ { name: "flip", options: { padding: 8 } }
968
+ ];
969
+ }
970
+ destroyPopper() {
971
+ this.popperInstance && (this.popperInstance.destroy(), this.popperInstance = void 0);
972
+ }
973
+ render() {
974
+ const e = !!this.title;
975
+ return Ce`
976
+ <div
977
+ class="popover__wrapper"
978
+ @mouseenter=${this.handleMouseEnter}
979
+ @mouseleave=${this.handleMouseLeave}
980
+ >
981
+ <div class="popover__trigger" part="trigger" @click=${this.toggle}>
982
+ <slot name="trigger"></slot>
983
+ </div>
984
+
985
+ ${this.open ? Ce`
986
+ <div
987
+ data-popper
988
+ class="popover__panel"
989
+ role="dialog"
990
+ aria-hidden=${this.open ? "false" : "true"}
991
+ >
992
+ <div data-popper-arrow class="popper-arrow"></div>
993
+ <div class="popover__content">
994
+ ${this.title ? Ce`
995
+ <div class="popover__title">${this.title}</div>
996
+ ` : null}
997
+ <div class="popover__body ${e ? "popover__body--with-border" : ""}">
998
+ <slot></slot>
999
+ </div>
1000
+ </div>
1001
+ </div>
1002
+ ` : null}
1003
+ </div>
1004
+ `;
1005
+ }
1006
+ };
1007
+ T.styles = [yt`${gt(Cr)}`];
1008
+ z([
1009
+ oe({ type: String })
1010
+ ], T.prototype, "title", 2);
1011
+ z([
1012
+ oe({ type: String })
1013
+ ], T.prototype, "trigger", 2);
1014
+ z([
1015
+ oe({ type: String })
1016
+ ], T.prototype, "placement", 2);
1017
+ z([
1018
+ oe({ type: Number })
1019
+ ], T.prototype, "offset", 2);
1020
+ z([
1021
+ oe({ type: Boolean, reflect: !0 })
1022
+ ], T.prototype, "open", 2);
1023
+ z([
1024
+ oe({ type: Boolean })
1025
+ ], T.prototype, "closeOnOutsideClick", 2);
1026
+ z([
1027
+ $e('[part="trigger"]')
1028
+ ], T.prototype, "triggerElement", 2);
1029
+ z([
1030
+ $e("[data-popper]")
1031
+ ], T.prototype, "popperElement", 2);
1032
+ z([
1033
+ $e("[data-popper-arrow]")
1034
+ ], T.prototype, "popperArrowElement", 2);
1035
+ T = z([
1036
+ bt("logosphere-popover")
1037
+ ], T);
1038
+ export {
1039
+ T as P
1040
+ };