@clevertask/scribe 0.0.6 → 0.0.8

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.
@@ -0,0 +1,2269 @@
1
+ import { P as Pn, b as Bn, C as Hn, z as In, G as Wn, a as $n } from "./index-Gm-3o3nq.js";
2
+ import B, { forwardRef as kn, useState as Un, useContext as on, useEffect as Fn, createContext as an } from "react";
3
+ import qn, { flushSync as zn } from "react-dom";
4
+ var k = "top", G = "bottom", Y = "right", U = "left", Tt = "auto", Ue = [k, G, Y, U], De = "start", Ie = "end", Kn = "clippingParents", sn = "viewport", je = "popper", Gn = "reference", jt = /* @__PURE__ */ Ue.reduce(function(e, t) {
5
+ return e.concat([t + "-" + De, t + "-" + Ie]);
6
+ }, []), un = /* @__PURE__ */ [].concat(Ue, [Tt]).reduce(function(e, t) {
7
+ return e.concat([t, t + "-" + De, t + "-" + Ie]);
8
+ }, []), Yn = "beforeRead", Xn = "read", Jn = "afterRead", Qn = "beforeMain", Zn = "main", er = "afterMain", tr = "beforeWrite", nr = "write", rr = "afterWrite", ir = [Yn, Xn, Jn, Qn, Zn, er, tr, nr, rr];
9
+ function ne(e) {
10
+ return e ? (e.nodeName || "").toLowerCase() : null;
11
+ }
12
+ function q(e) {
13
+ if (e == null)
14
+ return window;
15
+ if (e.toString() !== "[object Window]") {
16
+ var t = e.ownerDocument;
17
+ return t && t.defaultView || window;
18
+ }
19
+ return e;
20
+ }
21
+ function ye(e) {
22
+ var t = q(e).Element;
23
+ return e instanceof t || e instanceof Element;
24
+ }
25
+ function K(e) {
26
+ var t = q(e).HTMLElement;
27
+ return e instanceof t || e instanceof HTMLElement;
28
+ }
29
+ function Dt(e) {
30
+ if (typeof ShadowRoot > "u")
31
+ return !1;
32
+ var t = q(e).ShadowRoot;
33
+ return e instanceof t || e instanceof ShadowRoot;
34
+ }
35
+ function or(e) {
36
+ var t = e.state;
37
+ Object.keys(t.elements).forEach(function(n) {
38
+ var r = t.styles[n] || {}, o = t.attributes[n] || {}, s = t.elements[n];
39
+ !K(s) || !ne(s) || (Object.assign(s.style, r), Object.keys(o).forEach(function(l) {
40
+ var u = o[l];
41
+ u === !1 ? s.removeAttribute(l) : s.setAttribute(l, u === !0 ? "" : u);
42
+ }));
43
+ });
44
+ }
45
+ function ar(e) {
46
+ var t = e.state, n = {
47
+ popper: {
48
+ position: t.options.strategy,
49
+ left: "0",
50
+ top: "0",
51
+ margin: "0"
52
+ },
53
+ arrow: {
54
+ position: "absolute"
55
+ },
56
+ reference: {}
57
+ };
58
+ return Object.assign(t.elements.popper.style, n.popper), t.styles = n, t.elements.arrow && Object.assign(t.elements.arrow.style, n.arrow), function() {
59
+ Object.keys(t.elements).forEach(function(r) {
60
+ var o = t.elements[r], s = t.attributes[r] || {}, l = Object.keys(t.styles.hasOwnProperty(r) ? t.styles[r] : n[r]), u = l.reduce(function(a, d) {
61
+ return a[d] = "", a;
62
+ }, {});
63
+ !K(o) || !ne(o) || (Object.assign(o.style, u), Object.keys(s).forEach(function(a) {
64
+ o.removeAttribute(a);
65
+ }));
66
+ });
67
+ };
68
+ }
69
+ const cn = {
70
+ name: "applyStyles",
71
+ enabled: !0,
72
+ phase: "write",
73
+ fn: or,
74
+ effect: ar,
75
+ requires: ["computeStyles"]
76
+ };
77
+ function te(e) {
78
+ return e.split("-")[0];
79
+ }
80
+ var ge = Math.max, at = Math.min, Ae = Math.round;
81
+ function bt() {
82
+ var e = navigator.userAgentData;
83
+ return e != null && e.brands && Array.isArray(e.brands) ? e.brands.map(function(t) {
84
+ return t.brand + "/" + t.version;
85
+ }).join(" ") : navigator.userAgent;
86
+ }
87
+ function fn() {
88
+ return !/^((?!chrome|android).)*safari/i.test(bt());
89
+ }
90
+ function Ce(e, t, n) {
91
+ t === void 0 && (t = !1), n === void 0 && (n = !1);
92
+ var r = e.getBoundingClientRect(), o = 1, s = 1;
93
+ t && K(e) && (o = e.offsetWidth > 0 && Ae(r.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && Ae(r.height) / e.offsetHeight || 1);
94
+ var l = ye(e) ? q(e) : window, u = l.visualViewport, a = !fn() && n, d = (r.left + (a && u ? u.offsetLeft : 0)) / o, f = (r.top + (a && u ? u.offsetTop : 0)) / s, v = r.width / o, g = r.height / s;
95
+ return {
96
+ width: v,
97
+ height: g,
98
+ top: f,
99
+ right: d + v,
100
+ bottom: f + g,
101
+ left: d,
102
+ x: d,
103
+ y: f
104
+ };
105
+ }
106
+ function At(e) {
107
+ var t = Ce(e), n = e.offsetWidth, r = e.offsetHeight;
108
+ return Math.abs(t.width - n) <= 1 && (n = t.width), Math.abs(t.height - r) <= 1 && (r = t.height), {
109
+ x: e.offsetLeft,
110
+ y: e.offsetTop,
111
+ width: n,
112
+ height: r
113
+ };
114
+ }
115
+ function ln(e, t) {
116
+ var n = t.getRootNode && t.getRootNode();
117
+ if (e.contains(t))
118
+ return !0;
119
+ if (n && Dt(n)) {
120
+ var r = t;
121
+ do {
122
+ if (r && e.isSameNode(r))
123
+ return !0;
124
+ r = r.parentNode || r.host;
125
+ } while (r);
126
+ }
127
+ return !1;
128
+ }
129
+ function ue(e) {
130
+ return q(e).getComputedStyle(e);
131
+ }
132
+ function sr(e) {
133
+ return ["table", "td", "th"].indexOf(ne(e)) >= 0;
134
+ }
135
+ function le(e) {
136
+ return ((ye(e) ? e.ownerDocument : (
137
+ // $FlowFixMe[prop-missing]
138
+ e.document
139
+ )) || window.document).documentElement;
140
+ }
141
+ function ut(e) {
142
+ return ne(e) === "html" ? e : (
143
+ // this is a quicker (but less type safe) way to save quite some bytes from the bundle
144
+ // $FlowFixMe[incompatible-return]
145
+ // $FlowFixMe[prop-missing]
146
+ e.assignedSlot || // step into the shadow DOM of the parent of a slotted node
147
+ e.parentNode || // DOM Element detected
148
+ (Dt(e) ? e.host : null) || // ShadowRoot detected
149
+ // $FlowFixMe[incompatible-call]: HTMLElement is a Node
150
+ le(e)
151
+ );
152
+ }
153
+ function Pt(e) {
154
+ return !K(e) || // https://github.com/popperjs/popper-core/issues/837
155
+ ue(e).position === "fixed" ? null : e.offsetParent;
156
+ }
157
+ function ur(e) {
158
+ var t = /firefox/i.test(bt()), n = /Trident/i.test(bt());
159
+ if (n && K(e)) {
160
+ var r = ue(e);
161
+ if (r.position === "fixed")
162
+ return null;
163
+ }
164
+ var o = ut(e);
165
+ for (Dt(o) && (o = o.host); K(o) && ["html", "body"].indexOf(ne(o)) < 0; ) {
166
+ var s = ue(o);
167
+ if (s.transform !== "none" || s.perspective !== "none" || s.contain === "paint" || ["transform", "perspective"].indexOf(s.willChange) !== -1 || t && s.willChange === "filter" || t && s.filter && s.filter !== "none")
168
+ return o;
169
+ o = o.parentNode;
170
+ }
171
+ return null;
172
+ }
173
+ function Fe(e) {
174
+ for (var t = q(e), n = Pt(e); n && sr(n) && ue(n).position === "static"; )
175
+ n = Pt(n);
176
+ return n && (ne(n) === "html" || ne(n) === "body" && ue(n).position === "static") ? t : n || ur(e) || t;
177
+ }
178
+ function Ct(e) {
179
+ return ["top", "bottom"].indexOf(e) >= 0 ? "x" : "y";
180
+ }
181
+ function Pe(e, t, n) {
182
+ return ge(e, at(t, n));
183
+ }
184
+ function cr(e, t, n) {
185
+ var r = Pe(e, t, n);
186
+ return r > n ? n : r;
187
+ }
188
+ function pn() {
189
+ return {
190
+ top: 0,
191
+ right: 0,
192
+ bottom: 0,
193
+ left: 0
194
+ };
195
+ }
196
+ function dn(e) {
197
+ return Object.assign({}, pn(), e);
198
+ }
199
+ function vn(e, t) {
200
+ return t.reduce(function(n, r) {
201
+ return n[r] = e, n;
202
+ }, {});
203
+ }
204
+ var fr = function(t, n) {
205
+ return t = typeof t == "function" ? t(Object.assign({}, n.rects, {
206
+ placement: n.placement
207
+ })) : t, dn(typeof t != "number" ? t : vn(t, Ue));
208
+ };
209
+ function lr(e) {
210
+ var t, n = e.state, r = e.name, o = e.options, s = n.elements.arrow, l = n.modifiersData.popperOffsets, u = te(n.placement), a = Ct(u), d = [U, Y].indexOf(u) >= 0, f = d ? "height" : "width";
211
+ if (!(!s || !l)) {
212
+ var v = fr(o.padding, n), g = At(s), h = a === "y" ? k : U, b = a === "y" ? G : Y, m = n.rects.reference[f] + n.rects.reference[a] - l[a] - n.rects.popper[f], w = l[a] - n.rects.reference[a], T = Fe(s), D = T ? a === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, O = m / 2 - w / 2, i = v[h], E = D - g[f] - v[b], p = D / 2 - g[f] / 2 + O, x = Pe(i, p, E), _ = a;
213
+ n.modifiersData[r] = (t = {}, t[_] = x, t.centerOffset = x - p, t);
214
+ }
215
+ }
216
+ function pr(e) {
217
+ var t = e.state, n = e.options, r = n.element, o = r === void 0 ? "[data-popper-arrow]" : r;
218
+ o != null && (typeof o == "string" && (o = t.elements.popper.querySelector(o), !o) || ln(t.elements.popper, o) && (t.elements.arrow = o));
219
+ }
220
+ const dr = {
221
+ name: "arrow",
222
+ enabled: !0,
223
+ phase: "main",
224
+ fn: lr,
225
+ effect: pr,
226
+ requires: ["popperOffsets"],
227
+ requiresIfExists: ["preventOverflow"]
228
+ };
229
+ function _e(e) {
230
+ return e.split("-")[1];
231
+ }
232
+ var vr = {
233
+ top: "auto",
234
+ right: "auto",
235
+ bottom: "auto",
236
+ left: "auto"
237
+ };
238
+ function hr(e, t) {
239
+ var n = e.x, r = e.y, o = t.devicePixelRatio || 1;
240
+ return {
241
+ x: Ae(n * o) / o || 0,
242
+ y: Ae(r * o) / o || 0
243
+ };
244
+ }
245
+ function Bt(e) {
246
+ var t, n = e.popper, r = e.popperRect, o = e.placement, s = e.variation, l = e.offsets, u = e.position, a = e.gpuAcceleration, d = e.adaptive, f = e.roundOffsets, v = e.isFixed, g = l.x, h = g === void 0 ? 0 : g, b = l.y, m = b === void 0 ? 0 : b, w = typeof f == "function" ? f({
247
+ x: h,
248
+ y: m
249
+ }) : {
250
+ x: h,
251
+ y: m
252
+ };
253
+ h = w.x, m = w.y;
254
+ var T = l.hasOwnProperty("x"), D = l.hasOwnProperty("y"), O = U, i = k, E = window;
255
+ if (d) {
256
+ var p = Fe(n), x = "clientHeight", _ = "clientWidth";
257
+ if (p === q(n) && (p = le(n), ue(p).position !== "static" && u === "absolute" && (x = "scrollHeight", _ = "scrollWidth")), p = p, o === k || (o === U || o === Y) && s === Ie) {
258
+ i = G;
259
+ var A = v && p === E && E.visualViewport ? E.visualViewport.height : (
260
+ // $FlowFixMe[prop-missing]
261
+ p[x]
262
+ );
263
+ m -= A - r.height, m *= a ? 1 : -1;
264
+ }
265
+ if (o === U || (o === k || o === G) && s === Ie) {
266
+ O = Y;
267
+ var R = v && p === E && E.visualViewport ? E.visualViewport.width : (
268
+ // $FlowFixMe[prop-missing]
269
+ p[_]
270
+ );
271
+ h -= R - r.width, h *= a ? 1 : -1;
272
+ }
273
+ }
274
+ var N = Object.assign({
275
+ position: u
276
+ }, d && vr), M = f === !0 ? hr({
277
+ x: h,
278
+ y: m
279
+ }, q(n)) : {
280
+ x: h,
281
+ y: m
282
+ };
283
+ if (h = M.x, m = M.y, a) {
284
+ var V;
285
+ return Object.assign({}, N, (V = {}, V[i] = D ? "0" : "", V[O] = T ? "0" : "", V.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + m + "px)" : "translate3d(" + h + "px, " + m + "px, 0)", V));
286
+ }
287
+ return Object.assign({}, N, (t = {}, t[i] = D ? m + "px" : "", t[O] = T ? h + "px" : "", t.transform = "", t));
288
+ }
289
+ function mr(e) {
290
+ var t = e.state, n = e.options, r = n.gpuAcceleration, o = r === void 0 ? !0 : r, s = n.adaptive, l = s === void 0 ? !0 : s, u = n.roundOffsets, a = u === void 0 ? !0 : u, d = {
291
+ placement: te(t.placement),
292
+ variation: _e(t.placement),
293
+ popper: t.elements.popper,
294
+ popperRect: t.rects.popper,
295
+ gpuAcceleration: o,
296
+ isFixed: t.options.strategy === "fixed"
297
+ };
298
+ t.modifiersData.popperOffsets != null && (t.styles.popper = Object.assign({}, t.styles.popper, Bt(Object.assign({}, d, {
299
+ offsets: t.modifiersData.popperOffsets,
300
+ position: t.options.strategy,
301
+ adaptive: l,
302
+ roundOffsets: a
303
+ })))), t.modifiersData.arrow != null && (t.styles.arrow = Object.assign({}, t.styles.arrow, Bt(Object.assign({}, d, {
304
+ offsets: t.modifiersData.arrow,
305
+ position: "absolute",
306
+ adaptive: !1,
307
+ roundOffsets: a
308
+ })))), t.attributes.popper = Object.assign({}, t.attributes.popper, {
309
+ "data-popper-placement": t.placement
310
+ });
311
+ }
312
+ const gr = {
313
+ name: "computeStyles",
314
+ enabled: !0,
315
+ phase: "beforeWrite",
316
+ fn: mr,
317
+ data: {}
318
+ };
319
+ var rt = {
320
+ passive: !0
321
+ };
322
+ function yr(e) {
323
+ var t = e.state, n = e.instance, r = e.options, o = r.scroll, s = o === void 0 ? !0 : o, l = r.resize, u = l === void 0 ? !0 : l, a = q(t.elements.popper), d = [].concat(t.scrollParents.reference, t.scrollParents.popper);
324
+ return s && d.forEach(function(f) {
325
+ f.addEventListener("scroll", n.update, rt);
326
+ }), u && a.addEventListener("resize", n.update, rt), function() {
327
+ s && d.forEach(function(f) {
328
+ f.removeEventListener("scroll", n.update, rt);
329
+ }), u && a.removeEventListener("resize", n.update, rt);
330
+ };
331
+ }
332
+ const br = {
333
+ name: "eventListeners",
334
+ enabled: !0,
335
+ phase: "write",
336
+ fn: function() {
337
+ },
338
+ effect: yr,
339
+ data: {}
340
+ };
341
+ var wr = {
342
+ left: "right",
343
+ right: "left",
344
+ bottom: "top",
345
+ top: "bottom"
346
+ };
347
+ function ot(e) {
348
+ return e.replace(/left|right|bottom|top/g, function(t) {
349
+ return wr[t];
350
+ });
351
+ }
352
+ var Or = {
353
+ start: "end",
354
+ end: "start"
355
+ };
356
+ function Ht(e) {
357
+ return e.replace(/start|end/g, function(t) {
358
+ return Or[t];
359
+ });
360
+ }
361
+ function _t(e) {
362
+ var t = q(e), n = t.pageXOffset, r = t.pageYOffset;
363
+ return {
364
+ scrollLeft: n,
365
+ scrollTop: r
366
+ };
367
+ }
368
+ function Lt(e) {
369
+ return Ce(le(e)).left + _t(e).scrollLeft;
370
+ }
371
+ function Er(e, t) {
372
+ var n = q(e), r = le(e), o = n.visualViewport, s = r.clientWidth, l = r.clientHeight, u = 0, a = 0;
373
+ if (o) {
374
+ s = o.width, l = o.height;
375
+ var d = fn();
376
+ (d || !d && t === "fixed") && (u = o.offsetLeft, a = o.offsetTop);
377
+ }
378
+ return {
379
+ width: s,
380
+ height: l,
381
+ x: u + Lt(e),
382
+ y: a
383
+ };
384
+ }
385
+ function Sr(e) {
386
+ var t, n = le(e), r = _t(e), o = (t = e.ownerDocument) == null ? void 0 : t.body, s = ge(n.scrollWidth, n.clientWidth, o ? o.scrollWidth : 0, o ? o.clientWidth : 0), l = ge(n.scrollHeight, n.clientHeight, o ? o.scrollHeight : 0, o ? o.clientHeight : 0), u = -r.scrollLeft + Lt(e), a = -r.scrollTop;
387
+ return ue(o || n).direction === "rtl" && (u += ge(n.clientWidth, o ? o.clientWidth : 0) - s), {
388
+ width: s,
389
+ height: l,
390
+ x: u,
391
+ y: a
392
+ };
393
+ }
394
+ function Rt(e) {
395
+ var t = ue(e), n = t.overflow, r = t.overflowX, o = t.overflowY;
396
+ return /auto|scroll|overlay|hidden/.test(n + o + r);
397
+ }
398
+ function hn(e) {
399
+ return ["html", "body", "#document"].indexOf(ne(e)) >= 0 ? e.ownerDocument.body : K(e) && Rt(e) ? e : hn(ut(e));
400
+ }
401
+ function Be(e, t) {
402
+ var n;
403
+ t === void 0 && (t = []);
404
+ var r = hn(e), o = r === ((n = e.ownerDocument) == null ? void 0 : n.body), s = q(r), l = o ? [s].concat(s.visualViewport || [], Rt(r) ? r : []) : r, u = t.concat(l);
405
+ return o ? u : (
406
+ // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
407
+ u.concat(Be(ut(l)))
408
+ );
409
+ }
410
+ function wt(e) {
411
+ return Object.assign({}, e, {
412
+ left: e.x,
413
+ top: e.y,
414
+ right: e.x + e.width,
415
+ bottom: e.y + e.height
416
+ });
417
+ }
418
+ function xr(e, t) {
419
+ var n = Ce(e, !1, t === "fixed");
420
+ return n.top = n.top + e.clientTop, n.left = n.left + e.clientLeft, n.bottom = n.top + e.clientHeight, n.right = n.left + e.clientWidth, n.width = e.clientWidth, n.height = e.clientHeight, n.x = n.left, n.y = n.top, n;
421
+ }
422
+ function It(e, t, n) {
423
+ return t === sn ? wt(Er(e, n)) : ye(t) ? xr(t, n) : wt(Sr(le(e)));
424
+ }
425
+ function Tr(e) {
426
+ var t = Be(ut(e)), n = ["absolute", "fixed"].indexOf(ue(e).position) >= 0, r = n && K(e) ? Fe(e) : e;
427
+ return ye(r) ? t.filter(function(o) {
428
+ return ye(o) && ln(o, r) && ne(o) !== "body";
429
+ }) : [];
430
+ }
431
+ function Dr(e, t, n, r) {
432
+ var o = t === "clippingParents" ? Tr(e) : [].concat(t), s = [].concat(o, [n]), l = s[0], u = s.reduce(function(a, d) {
433
+ var f = It(e, d, r);
434
+ return a.top = ge(f.top, a.top), a.right = at(f.right, a.right), a.bottom = at(f.bottom, a.bottom), a.left = ge(f.left, a.left), a;
435
+ }, It(e, l, r));
436
+ return u.width = u.right - u.left, u.height = u.bottom - u.top, u.x = u.left, u.y = u.top, u;
437
+ }
438
+ function mn(e) {
439
+ var t = e.reference, n = e.element, r = e.placement, o = r ? te(r) : null, s = r ? _e(r) : null, l = t.x + t.width / 2 - n.width / 2, u = t.y + t.height / 2 - n.height / 2, a;
440
+ switch (o) {
441
+ case k:
442
+ a = {
443
+ x: l,
444
+ y: t.y - n.height
445
+ };
446
+ break;
447
+ case G:
448
+ a = {
449
+ x: l,
450
+ y: t.y + t.height
451
+ };
452
+ break;
453
+ case Y:
454
+ a = {
455
+ x: t.x + t.width,
456
+ y: u
457
+ };
458
+ break;
459
+ case U:
460
+ a = {
461
+ x: t.x - n.width,
462
+ y: u
463
+ };
464
+ break;
465
+ default:
466
+ a = {
467
+ x: t.x,
468
+ y: t.y
469
+ };
470
+ }
471
+ var d = o ? Ct(o) : null;
472
+ if (d != null) {
473
+ var f = d === "y" ? "height" : "width";
474
+ switch (s) {
475
+ case De:
476
+ a[d] = a[d] - (t[f] / 2 - n[f] / 2);
477
+ break;
478
+ case Ie:
479
+ a[d] = a[d] + (t[f] / 2 - n[f] / 2);
480
+ break;
481
+ }
482
+ }
483
+ return a;
484
+ }
485
+ function We(e, t) {
486
+ t === void 0 && (t = {});
487
+ var n = t, r = n.placement, o = r === void 0 ? e.placement : r, s = n.strategy, l = s === void 0 ? e.strategy : s, u = n.boundary, a = u === void 0 ? Kn : u, d = n.rootBoundary, f = d === void 0 ? sn : d, v = n.elementContext, g = v === void 0 ? je : v, h = n.altBoundary, b = h === void 0 ? !1 : h, m = n.padding, w = m === void 0 ? 0 : m, T = dn(typeof w != "number" ? w : vn(w, Ue)), D = g === je ? Gn : je, O = e.rects.popper, i = e.elements[b ? D : g], E = Dr(ye(i) ? i : i.contextElement || le(e.elements.popper), a, f, l), p = Ce(e.elements.reference), x = mn({
488
+ reference: p,
489
+ element: O,
490
+ placement: o
491
+ }), _ = wt(Object.assign({}, O, x)), A = g === je ? _ : p, R = {
492
+ top: E.top - A.top + T.top,
493
+ bottom: A.bottom - E.bottom + T.bottom,
494
+ left: E.left - A.left + T.left,
495
+ right: A.right - E.right + T.right
496
+ }, N = e.modifiersData.offset;
497
+ if (g === je && N) {
498
+ var M = N[o];
499
+ Object.keys(R).forEach(function(V) {
500
+ var H = [Y, G].indexOf(V) >= 0 ? 1 : -1, W = [k, G].indexOf(V) >= 0 ? "y" : "x";
501
+ R[V] += M[W] * H;
502
+ });
503
+ }
504
+ return R;
505
+ }
506
+ function Ar(e, t) {
507
+ t === void 0 && (t = {});
508
+ var n = t, r = n.placement, o = n.boundary, s = n.rootBoundary, l = n.padding, u = n.flipVariations, a = n.allowedAutoPlacements, d = a === void 0 ? un : a, f = _e(r), v = f ? u ? jt : jt.filter(function(b) {
509
+ return _e(b) === f;
510
+ }) : Ue, g = v.filter(function(b) {
511
+ return d.indexOf(b) >= 0;
512
+ });
513
+ g.length === 0 && (g = v);
514
+ var h = g.reduce(function(b, m) {
515
+ return b[m] = We(e, {
516
+ placement: m,
517
+ boundary: o,
518
+ rootBoundary: s,
519
+ padding: l
520
+ })[te(m)], b;
521
+ }, {});
522
+ return Object.keys(h).sort(function(b, m) {
523
+ return h[b] - h[m];
524
+ });
525
+ }
526
+ function Cr(e) {
527
+ if (te(e) === Tt)
528
+ return [];
529
+ var t = ot(e);
530
+ return [Ht(e), t, Ht(t)];
531
+ }
532
+ function _r(e) {
533
+ var t = e.state, n = e.options, r = e.name;
534
+ if (!t.modifiersData[r]._skip) {
535
+ for (var o = n.mainAxis, s = o === void 0 ? !0 : o, l = n.altAxis, u = l === void 0 ? !0 : l, a = n.fallbackPlacements, d = n.padding, f = n.boundary, v = n.rootBoundary, g = n.altBoundary, h = n.flipVariations, b = h === void 0 ? !0 : h, m = n.allowedAutoPlacements, w = t.options.placement, T = te(w), D = T === w, O = a || (D || !b ? [ot(w)] : Cr(w)), i = [w].concat(O).reduce(function(re, X) {
536
+ return re.concat(te(X) === Tt ? Ar(t, {
537
+ placement: X,
538
+ boundary: f,
539
+ rootBoundary: v,
540
+ padding: d,
541
+ flipVariations: b,
542
+ allowedAutoPlacements: m
543
+ }) : X);
544
+ }, []), E = t.rects.reference, p = t.rects.popper, x = /* @__PURE__ */ new Map(), _ = !0, A = i[0], R = 0; R < i.length; R++) {
545
+ var N = i[R], M = te(N), V = _e(N) === De, H = [k, G].indexOf(M) >= 0, W = H ? "width" : "height", j = We(t, {
546
+ placement: N,
547
+ boundary: f,
548
+ rootBoundary: v,
549
+ altBoundary: g,
550
+ padding: d
551
+ }), P = H ? V ? Y : U : V ? G : k;
552
+ E[W] > p[W] && (P = ot(P));
553
+ var I = ot(P), J = [];
554
+ if (s && J.push(j[M] <= 0), u && J.push(j[P] <= 0, j[I] <= 0), J.every(function(re) {
555
+ return re;
556
+ })) {
557
+ A = N, _ = !1;
558
+ break;
559
+ }
560
+ x.set(N, J);
561
+ }
562
+ if (_)
563
+ for (var Q = b ? 3 : 1, pe = function(X) {
564
+ var ie = i.find(function(be) {
565
+ var oe = x.get(be);
566
+ if (oe)
567
+ return oe.slice(0, X).every(function(we) {
568
+ return we;
569
+ });
570
+ });
571
+ if (ie)
572
+ return A = ie, "break";
573
+ }, Z = Q; Z > 0; Z--) {
574
+ var de = pe(Z);
575
+ if (de === "break") break;
576
+ }
577
+ t.placement !== A && (t.modifiersData[r]._skip = !0, t.placement = A, t.reset = !0);
578
+ }
579
+ }
580
+ const Lr = {
581
+ name: "flip",
582
+ enabled: !0,
583
+ phase: "main",
584
+ fn: _r,
585
+ requiresIfExists: ["offset"],
586
+ data: {
587
+ _skip: !1
588
+ }
589
+ };
590
+ function Wt(e, t, n) {
591
+ return n === void 0 && (n = {
592
+ x: 0,
593
+ y: 0
594
+ }), {
595
+ top: e.top - t.height - n.y,
596
+ right: e.right - t.width + n.x,
597
+ bottom: e.bottom - t.height + n.y,
598
+ left: e.left - t.width - n.x
599
+ };
600
+ }
601
+ function $t(e) {
602
+ return [k, Y, G, U].some(function(t) {
603
+ return e[t] >= 0;
604
+ });
605
+ }
606
+ function Rr(e) {
607
+ var t = e.state, n = e.name, r = t.rects.reference, o = t.rects.popper, s = t.modifiersData.preventOverflow, l = We(t, {
608
+ elementContext: "reference"
609
+ }), u = We(t, {
610
+ altBoundary: !0
611
+ }), a = Wt(l, r), d = Wt(u, o, s), f = $t(a), v = $t(d);
612
+ t.modifiersData[n] = {
613
+ referenceClippingOffsets: a,
614
+ popperEscapeOffsets: d,
615
+ isReferenceHidden: f,
616
+ hasPopperEscaped: v
617
+ }, t.attributes.popper = Object.assign({}, t.attributes.popper, {
618
+ "data-popper-reference-hidden": f,
619
+ "data-popper-escaped": v
620
+ });
621
+ }
622
+ const Mr = {
623
+ name: "hide",
624
+ enabled: !0,
625
+ phase: "main",
626
+ requiresIfExists: ["preventOverflow"],
627
+ fn: Rr
628
+ };
629
+ function Vr(e, t, n) {
630
+ var r = te(e), o = [U, k].indexOf(r) >= 0 ? -1 : 1, s = typeof n == "function" ? n(Object.assign({}, t, {
631
+ placement: e
632
+ })) : n, l = s[0], u = s[1];
633
+ return l = l || 0, u = (u || 0) * o, [U, Y].indexOf(r) >= 0 ? {
634
+ x: u,
635
+ y: l
636
+ } : {
637
+ x: l,
638
+ y: u
639
+ };
640
+ }
641
+ function Nr(e) {
642
+ var t = e.state, n = e.options, r = e.name, o = n.offset, s = o === void 0 ? [0, 0] : o, l = un.reduce(function(f, v) {
643
+ return f[v] = Vr(v, t.rects, s), f;
644
+ }, {}), u = l[t.placement], a = u.x, d = u.y;
645
+ t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += a, t.modifiersData.popperOffsets.y += d), t.modifiersData[r] = l;
646
+ }
647
+ const jr = {
648
+ name: "offset",
649
+ enabled: !0,
650
+ phase: "main",
651
+ requires: ["popperOffsets"],
652
+ fn: Nr
653
+ };
654
+ function Pr(e) {
655
+ var t = e.state, n = e.name;
656
+ t.modifiersData[n] = mn({
657
+ reference: t.rects.reference,
658
+ element: t.rects.popper,
659
+ placement: t.placement
660
+ });
661
+ }
662
+ const Br = {
663
+ name: "popperOffsets",
664
+ enabled: !0,
665
+ phase: "read",
666
+ fn: Pr,
667
+ data: {}
668
+ };
669
+ function Hr(e) {
670
+ return e === "x" ? "y" : "x";
671
+ }
672
+ function Ir(e) {
673
+ var t = e.state, n = e.options, r = e.name, o = n.mainAxis, s = o === void 0 ? !0 : o, l = n.altAxis, u = l === void 0 ? !1 : l, a = n.boundary, d = n.rootBoundary, f = n.altBoundary, v = n.padding, g = n.tether, h = g === void 0 ? !0 : g, b = n.tetherOffset, m = b === void 0 ? 0 : b, w = We(t, {
674
+ boundary: a,
675
+ rootBoundary: d,
676
+ padding: v,
677
+ altBoundary: f
678
+ }), T = te(t.placement), D = _e(t.placement), O = !D, i = Ct(T), E = Hr(i), p = t.modifiersData.popperOffsets, x = t.rects.reference, _ = t.rects.popper, A = typeof m == "function" ? m(Object.assign({}, t.rects, {
679
+ placement: t.placement
680
+ })) : m, R = typeof A == "number" ? {
681
+ mainAxis: A,
682
+ altAxis: A
683
+ } : Object.assign({
684
+ mainAxis: 0,
685
+ altAxis: 0
686
+ }, A), N = t.modifiersData.offset ? t.modifiersData.offset[t.placement] : null, M = {
687
+ x: 0,
688
+ y: 0
689
+ };
690
+ if (p) {
691
+ if (s) {
692
+ var V, H = i === "y" ? k : U, W = i === "y" ? G : Y, j = i === "y" ? "height" : "width", P = p[i], I = P + w[H], J = P - w[W], Q = h ? -_[j] / 2 : 0, pe = D === De ? x[j] : _[j], Z = D === De ? -_[j] : -x[j], de = t.elements.arrow, re = h && de ? At(de) : {
693
+ width: 0,
694
+ height: 0
695
+ }, X = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : pn(), ie = X[H], be = X[W], oe = Pe(0, x[j], re[j]), we = O ? x[j] / 2 - Q - oe - ie - R.mainAxis : pe - oe - ie - R.mainAxis, ce = O ? -x[j] / 2 + Q + oe + be + R.mainAxis : Z + oe + be + R.mainAxis, Oe = t.elements.arrow && Fe(t.elements.arrow), ze = Oe ? i === "y" ? Oe.clientTop || 0 : Oe.clientLeft || 0 : 0, Le = (V = N == null ? void 0 : N[i]) != null ? V : 0, Ke = P + we - Le - ze, Ge = P + ce - Le, Re = Pe(h ? at(I, Ke) : I, P, h ? ge(J, Ge) : J);
696
+ p[i] = Re, M[i] = Re - P;
697
+ }
698
+ if (u) {
699
+ var Me, Ye = i === "x" ? k : U, Xe = i === "x" ? G : Y, ae = p[E], fe = E === "y" ? "height" : "width", Ve = ae + w[Ye], ve = ae - w[Xe], Ne = [k, U].indexOf(T) !== -1, Je = (Me = N == null ? void 0 : N[E]) != null ? Me : 0, Qe = Ne ? Ve : ae - x[fe] - _[fe] - Je + R.altAxis, Ze = Ne ? ae + x[fe] + _[fe] - Je - R.altAxis : ve, et = h && Ne ? cr(Qe, ae, Ze) : Pe(h ? Qe : Ve, ae, h ? Ze : ve);
700
+ p[E] = et, M[E] = et - ae;
701
+ }
702
+ t.modifiersData[r] = M;
703
+ }
704
+ }
705
+ const Wr = {
706
+ name: "preventOverflow",
707
+ enabled: !0,
708
+ phase: "main",
709
+ fn: Ir,
710
+ requiresIfExists: ["offset"]
711
+ };
712
+ function $r(e) {
713
+ return {
714
+ scrollLeft: e.scrollLeft,
715
+ scrollTop: e.scrollTop
716
+ };
717
+ }
718
+ function kr(e) {
719
+ return e === q(e) || !K(e) ? _t(e) : $r(e);
720
+ }
721
+ function Ur(e) {
722
+ var t = e.getBoundingClientRect(), n = Ae(t.width) / e.offsetWidth || 1, r = Ae(t.height) / e.offsetHeight || 1;
723
+ return n !== 1 || r !== 1;
724
+ }
725
+ function Fr(e, t, n) {
726
+ n === void 0 && (n = !1);
727
+ var r = K(t), o = K(t) && Ur(t), s = le(t), l = Ce(e, o, n), u = {
728
+ scrollLeft: 0,
729
+ scrollTop: 0
730
+ }, a = {
731
+ x: 0,
732
+ y: 0
733
+ };
734
+ return (r || !r && !n) && ((ne(t) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
735
+ Rt(s)) && (u = kr(t)), K(t) ? (a = Ce(t, !0), a.x += t.clientLeft, a.y += t.clientTop) : s && (a.x = Lt(s))), {
736
+ x: l.left + u.scrollLeft - a.x,
737
+ y: l.top + u.scrollTop - a.y,
738
+ width: l.width,
739
+ height: l.height
740
+ };
741
+ }
742
+ function qr(e) {
743
+ var t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
744
+ e.forEach(function(s) {
745
+ t.set(s.name, s);
746
+ });
747
+ function o(s) {
748
+ n.add(s.name);
749
+ var l = [].concat(s.requires || [], s.requiresIfExists || []);
750
+ l.forEach(function(u) {
751
+ if (!n.has(u)) {
752
+ var a = t.get(u);
753
+ a && o(a);
754
+ }
755
+ }), r.push(s);
756
+ }
757
+ return e.forEach(function(s) {
758
+ n.has(s.name) || o(s);
759
+ }), r;
760
+ }
761
+ function zr(e) {
762
+ var t = qr(e);
763
+ return ir.reduce(function(n, r) {
764
+ return n.concat(t.filter(function(o) {
765
+ return o.phase === r;
766
+ }));
767
+ }, []);
768
+ }
769
+ function Kr(e) {
770
+ var t;
771
+ return function() {
772
+ return t || (t = new Promise(function(n) {
773
+ Promise.resolve().then(function() {
774
+ t = void 0, n(e());
775
+ });
776
+ })), t;
777
+ };
778
+ }
779
+ function Gr(e) {
780
+ var t = e.reduce(function(n, r) {
781
+ var o = n[r.name];
782
+ return n[r.name] = o ? Object.assign({}, o, r, {
783
+ options: Object.assign({}, o.options, r.options),
784
+ data: Object.assign({}, o.data, r.data)
785
+ }) : r, n;
786
+ }, {});
787
+ return Object.keys(t).map(function(n) {
788
+ return t[n];
789
+ });
790
+ }
791
+ var kt = {
792
+ placement: "bottom",
793
+ modifiers: [],
794
+ strategy: "absolute"
795
+ };
796
+ function Ut() {
797
+ for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
798
+ t[n] = arguments[n];
799
+ return !t.some(function(r) {
800
+ return !(r && typeof r.getBoundingClientRect == "function");
801
+ });
802
+ }
803
+ function Yr(e) {
804
+ e === void 0 && (e = {});
805
+ var t = e, n = t.defaultModifiers, r = n === void 0 ? [] : n, o = t.defaultOptions, s = o === void 0 ? kt : o;
806
+ return function(u, a, d) {
807
+ d === void 0 && (d = s);
808
+ var f = {
809
+ placement: "bottom",
810
+ orderedModifiers: [],
811
+ options: Object.assign({}, kt, s),
812
+ modifiersData: {},
813
+ elements: {
814
+ reference: u,
815
+ popper: a
816
+ },
817
+ attributes: {},
818
+ styles: {}
819
+ }, v = [], g = !1, h = {
820
+ state: f,
821
+ setOptions: function(T) {
822
+ var D = typeof T == "function" ? T(f.options) : T;
823
+ m(), f.options = Object.assign({}, s, f.options, D), f.scrollParents = {
824
+ reference: ye(u) ? Be(u) : u.contextElement ? Be(u.contextElement) : [],
825
+ popper: Be(a)
826
+ };
827
+ var O = zr(Gr([].concat(r, f.options.modifiers)));
828
+ return f.orderedModifiers = O.filter(function(i) {
829
+ return i.enabled;
830
+ }), b(), h.update();
831
+ },
832
+ // Sync update – it will always be executed, even if not necessary. This
833
+ // is useful for low frequency updates where sync behavior simplifies the
834
+ // logic.
835
+ // For high frequency updates (e.g. `resize` and `scroll` events), always
836
+ // prefer the async Popper#update method
837
+ forceUpdate: function() {
838
+ if (!g) {
839
+ var T = f.elements, D = T.reference, O = T.popper;
840
+ if (Ut(D, O)) {
841
+ f.rects = {
842
+ reference: Fr(D, Fe(O), f.options.strategy === "fixed"),
843
+ popper: At(O)
844
+ }, f.reset = !1, f.placement = f.options.placement, f.orderedModifiers.forEach(function(R) {
845
+ return f.modifiersData[R.name] = Object.assign({}, R.data);
846
+ });
847
+ for (var i = 0; i < f.orderedModifiers.length; i++) {
848
+ if (f.reset === !0) {
849
+ f.reset = !1, i = -1;
850
+ continue;
851
+ }
852
+ var E = f.orderedModifiers[i], p = E.fn, x = E.options, _ = x === void 0 ? {} : x, A = E.name;
853
+ typeof p == "function" && (f = p({
854
+ state: f,
855
+ options: _,
856
+ name: A,
857
+ instance: h
858
+ }) || f);
859
+ }
860
+ }
861
+ }
862
+ },
863
+ // Async and optimistically optimized update – it will not be executed if
864
+ // not necessary (debounced to run at most once-per-tick)
865
+ update: Kr(function() {
866
+ return new Promise(function(w) {
867
+ h.forceUpdate(), w(f);
868
+ });
869
+ }),
870
+ destroy: function() {
871
+ m(), g = !0;
872
+ }
873
+ };
874
+ if (!Ut(u, a))
875
+ return h;
876
+ h.setOptions(d).then(function(w) {
877
+ !g && d.onFirstUpdate && d.onFirstUpdate(w);
878
+ });
879
+ function b() {
880
+ f.orderedModifiers.forEach(function(w) {
881
+ var T = w.name, D = w.options, O = D === void 0 ? {} : D, i = w.effect;
882
+ if (typeof i == "function") {
883
+ var E = i({
884
+ state: f,
885
+ name: T,
886
+ instance: h,
887
+ options: O
888
+ }), p = function() {
889
+ };
890
+ v.push(E || p);
891
+ }
892
+ });
893
+ }
894
+ function m() {
895
+ v.forEach(function(w) {
896
+ return w();
897
+ }), v = [];
898
+ }
899
+ return h;
900
+ };
901
+ }
902
+ var Xr = [br, Br, gr, cn, jr, Lr, Wr, dr, Mr], Jr = /* @__PURE__ */ Yr({
903
+ defaultModifiers: Xr
904
+ }), Qr = "tippy-box", gn = "tippy-content", Zr = "tippy-backdrop", yn = "tippy-arrow", bn = "tippy-svg-arrow", me = {
905
+ passive: !0,
906
+ capture: !0
907
+ }, wn = function() {
908
+ return document.body;
909
+ };
910
+ function ei(e, t) {
911
+ return {}.hasOwnProperty.call(e, t);
912
+ }
913
+ function lt(e, t, n) {
914
+ if (Array.isArray(e)) {
915
+ var r = e[t];
916
+ return r ?? (Array.isArray(n) ? n[t] : n);
917
+ }
918
+ return e;
919
+ }
920
+ function Mt(e, t) {
921
+ var n = {}.toString.call(e);
922
+ return n.indexOf("[object") === 0 && n.indexOf(t + "]") > -1;
923
+ }
924
+ function On(e, t) {
925
+ return typeof e == "function" ? e.apply(void 0, t) : e;
926
+ }
927
+ function Ft(e, t) {
928
+ if (t === 0)
929
+ return e;
930
+ var n;
931
+ return function(r) {
932
+ clearTimeout(n), n = setTimeout(function() {
933
+ e(r);
934
+ }, t);
935
+ };
936
+ }
937
+ function ti(e, t) {
938
+ var n = Object.assign({}, e);
939
+ return t.forEach(function(r) {
940
+ delete n[r];
941
+ }), n;
942
+ }
943
+ function ni(e) {
944
+ return e.split(/\s+/).filter(Boolean);
945
+ }
946
+ function Te(e) {
947
+ return [].concat(e);
948
+ }
949
+ function qt(e, t) {
950
+ e.indexOf(t) === -1 && e.push(t);
951
+ }
952
+ function ri(e) {
953
+ return e.filter(function(t, n) {
954
+ return e.indexOf(t) === n;
955
+ });
956
+ }
957
+ function ii(e) {
958
+ return e.split("-")[0];
959
+ }
960
+ function st(e) {
961
+ return [].slice.call(e);
962
+ }
963
+ function zt(e) {
964
+ return Object.keys(e).reduce(function(t, n) {
965
+ return e[n] !== void 0 && (t[n] = e[n]), t;
966
+ }, {});
967
+ }
968
+ function He() {
969
+ return document.createElement("div");
970
+ }
971
+ function $e(e) {
972
+ return ["Element", "Fragment"].some(function(t) {
973
+ return Mt(e, t);
974
+ });
975
+ }
976
+ function oi(e) {
977
+ return Mt(e, "NodeList");
978
+ }
979
+ function ai(e) {
980
+ return Mt(e, "MouseEvent");
981
+ }
982
+ function si(e) {
983
+ return !!(e && e._tippy && e._tippy.reference === e);
984
+ }
985
+ function ui(e) {
986
+ return $e(e) ? [e] : oi(e) ? st(e) : Array.isArray(e) ? e : st(document.querySelectorAll(e));
987
+ }
988
+ function pt(e, t) {
989
+ e.forEach(function(n) {
990
+ n && (n.style.transitionDuration = t + "ms");
991
+ });
992
+ }
993
+ function Kt(e, t) {
994
+ e.forEach(function(n) {
995
+ n && n.setAttribute("data-state", t);
996
+ });
997
+ }
998
+ function ci(e) {
999
+ var t, n = Te(e), r = n[0];
1000
+ return r != null && (t = r.ownerDocument) != null && t.body ? r.ownerDocument : document;
1001
+ }
1002
+ function fi(e, t) {
1003
+ var n = t.clientX, r = t.clientY;
1004
+ return e.every(function(o) {
1005
+ var s = o.popperRect, l = o.popperState, u = o.props, a = u.interactiveBorder, d = ii(l.placement), f = l.modifiersData.offset;
1006
+ if (!f)
1007
+ return !0;
1008
+ var v = d === "bottom" ? f.top.y : 0, g = d === "top" ? f.bottom.y : 0, h = d === "right" ? f.left.x : 0, b = d === "left" ? f.right.x : 0, m = s.top - r + v > a, w = r - s.bottom - g > a, T = s.left - n + h > a, D = n - s.right - b > a;
1009
+ return m || w || T || D;
1010
+ });
1011
+ }
1012
+ function dt(e, t, n) {
1013
+ var r = t + "EventListener";
1014
+ ["transitionend", "webkitTransitionEnd"].forEach(function(o) {
1015
+ e[r](o, n);
1016
+ });
1017
+ }
1018
+ function Gt(e, t) {
1019
+ for (var n = t; n; ) {
1020
+ var r;
1021
+ if (e.contains(n))
1022
+ return !0;
1023
+ n = n.getRootNode == null || (r = n.getRootNode()) == null ? void 0 : r.host;
1024
+ }
1025
+ return !1;
1026
+ }
1027
+ var ee = {
1028
+ isTouch: !1
1029
+ }, Yt = 0;
1030
+ function li() {
1031
+ ee.isTouch || (ee.isTouch = !0, window.performance && document.addEventListener("mousemove", En));
1032
+ }
1033
+ function En() {
1034
+ var e = performance.now();
1035
+ e - Yt < 20 && (ee.isTouch = !1, document.removeEventListener("mousemove", En)), Yt = e;
1036
+ }
1037
+ function pi() {
1038
+ var e = document.activeElement;
1039
+ if (si(e)) {
1040
+ var t = e._tippy;
1041
+ e.blur && !t.state.isVisible && e.blur();
1042
+ }
1043
+ }
1044
+ function di() {
1045
+ document.addEventListener("touchstart", li, me), window.addEventListener("blur", pi);
1046
+ }
1047
+ var vi = typeof window < "u" && typeof document < "u", hi = vi ? (
1048
+ // @ts-ignore
1049
+ !!window.msCrypto
1050
+ ) : !1;
1051
+ function xe(e) {
1052
+ var t = e === "destroy" ? "n already-" : " ";
1053
+ return [e + "() was called on a" + t + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
1054
+ }
1055
+ function Xt(e) {
1056
+ var t = /[ \t]{2,}/g, n = /^[ \t]*/gm;
1057
+ return e.replace(t, " ").replace(n, "").trim();
1058
+ }
1059
+ function mi(e) {
1060
+ return Xt(`
1061
+ %ctippy.js
1062
+
1063
+ %c` + Xt(e) + `
1064
+
1065
+ %c👷‍ This is a development-only message. It will be removed in production.
1066
+ `);
1067
+ }
1068
+ function Sn(e) {
1069
+ return [
1070
+ mi(e),
1071
+ // title
1072
+ "color: #00C584; font-size: 1.3em; font-weight: bold;",
1073
+ // message
1074
+ "line-height: 1.5",
1075
+ // footer
1076
+ "color: #a6a095;"
1077
+ ];
1078
+ }
1079
+ var ke;
1080
+ process.env.NODE_ENV !== "production" && gi();
1081
+ function gi() {
1082
+ ke = /* @__PURE__ */ new Set();
1083
+ }
1084
+ function se(e, t) {
1085
+ if (e && !ke.has(t)) {
1086
+ var n;
1087
+ ke.add(t), (n = console).warn.apply(n, Sn(t));
1088
+ }
1089
+ }
1090
+ function Ot(e, t) {
1091
+ if (e && !ke.has(t)) {
1092
+ var n;
1093
+ ke.add(t), (n = console).error.apply(n, Sn(t));
1094
+ }
1095
+ }
1096
+ function yi(e) {
1097
+ var t = !e, n = Object.prototype.toString.call(e) === "[object Object]" && !e.addEventListener;
1098
+ Ot(t, ["tippy() was passed", "`" + String(e) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), Ot(n, ["tippy() was passed a plain object which is not supported as an argument", "for virtual positioning. Use props.getReferenceClientRect instead."].join(" "));
1099
+ }
1100
+ var xn = {
1101
+ animateFill: !1,
1102
+ followCursor: !1,
1103
+ inlinePositioning: !1,
1104
+ sticky: !1
1105
+ }, bi = {
1106
+ allowHTML: !1,
1107
+ animation: "fade",
1108
+ arrow: !0,
1109
+ content: "",
1110
+ inertia: !1,
1111
+ maxWidth: 350,
1112
+ role: "tooltip",
1113
+ theme: "",
1114
+ zIndex: 9999
1115
+ }, F = Object.assign({
1116
+ appendTo: wn,
1117
+ aria: {
1118
+ content: "auto",
1119
+ expanded: "auto"
1120
+ },
1121
+ delay: 0,
1122
+ duration: [300, 250],
1123
+ getReferenceClientRect: null,
1124
+ hideOnClick: !0,
1125
+ ignoreAttributes: !1,
1126
+ interactive: !1,
1127
+ interactiveBorder: 2,
1128
+ interactiveDebounce: 0,
1129
+ moveTransition: "",
1130
+ offset: [0, 10],
1131
+ onAfterUpdate: function() {
1132
+ },
1133
+ onBeforeUpdate: function() {
1134
+ },
1135
+ onCreate: function() {
1136
+ },
1137
+ onDestroy: function() {
1138
+ },
1139
+ onHidden: function() {
1140
+ },
1141
+ onHide: function() {
1142
+ },
1143
+ onMount: function() {
1144
+ },
1145
+ onShow: function() {
1146
+ },
1147
+ onShown: function() {
1148
+ },
1149
+ onTrigger: function() {
1150
+ },
1151
+ onUntrigger: function() {
1152
+ },
1153
+ onClickOutside: function() {
1154
+ },
1155
+ placement: "top",
1156
+ plugins: [],
1157
+ popperOptions: {},
1158
+ render: null,
1159
+ showOnCreate: !1,
1160
+ touch: !0,
1161
+ trigger: "mouseenter focus",
1162
+ triggerTarget: null
1163
+ }, xn, bi), wi = Object.keys(F), Oi = function(t) {
1164
+ process.env.NODE_ENV !== "production" && Dn(t, []);
1165
+ var n = Object.keys(t);
1166
+ n.forEach(function(r) {
1167
+ F[r] = t[r];
1168
+ });
1169
+ };
1170
+ function Tn(e) {
1171
+ var t = e.plugins || [], n = t.reduce(function(r, o) {
1172
+ var s = o.name, l = o.defaultValue;
1173
+ if (s) {
1174
+ var u;
1175
+ r[s] = e[s] !== void 0 ? e[s] : (u = F[s]) != null ? u : l;
1176
+ }
1177
+ return r;
1178
+ }, {});
1179
+ return Object.assign({}, e, n);
1180
+ }
1181
+ function Ei(e, t) {
1182
+ var n = t ? Object.keys(Tn(Object.assign({}, F, {
1183
+ plugins: t
1184
+ }))) : wi, r = n.reduce(function(o, s) {
1185
+ var l = (e.getAttribute("data-tippy-" + s) || "").trim();
1186
+ if (!l)
1187
+ return o;
1188
+ if (s === "content")
1189
+ o[s] = l;
1190
+ else
1191
+ try {
1192
+ o[s] = JSON.parse(l);
1193
+ } catch {
1194
+ o[s] = l;
1195
+ }
1196
+ return o;
1197
+ }, {});
1198
+ return r;
1199
+ }
1200
+ function Jt(e, t) {
1201
+ var n = Object.assign({}, t, {
1202
+ content: On(t.content, [e])
1203
+ }, t.ignoreAttributes ? {} : Ei(e, t.plugins));
1204
+ return n.aria = Object.assign({}, F.aria, n.aria), n.aria = {
1205
+ expanded: n.aria.expanded === "auto" ? t.interactive : n.aria.expanded,
1206
+ content: n.aria.content === "auto" ? t.interactive ? null : "describedby" : n.aria.content
1207
+ }, n;
1208
+ }
1209
+ function Dn(e, t) {
1210
+ e === void 0 && (e = {}), t === void 0 && (t = []);
1211
+ var n = Object.keys(e);
1212
+ n.forEach(function(r) {
1213
+ var o = ti(F, Object.keys(xn)), s = !ei(o, r);
1214
+ s && (s = t.filter(function(l) {
1215
+ return l.name === r;
1216
+ }).length === 0), se(s, ["`" + r + "`", "is not a valid prop. You may have spelled it incorrectly, or if it's", "a plugin, forgot to pass it in an array as props.plugins.", `
1217
+
1218
+ `, `All props: https://atomiks.github.io/tippyjs/v6/all-props/
1219
+ `, "Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "));
1220
+ });
1221
+ }
1222
+ var Si = function() {
1223
+ return "innerHTML";
1224
+ };
1225
+ function Et(e, t) {
1226
+ e[Si()] = t;
1227
+ }
1228
+ function Qt(e) {
1229
+ var t = He();
1230
+ return e === !0 ? t.className = yn : (t.className = bn, $e(e) ? t.appendChild(e) : Et(t, e)), t;
1231
+ }
1232
+ function Zt(e, t) {
1233
+ $e(t.content) ? (Et(e, ""), e.appendChild(t.content)) : typeof t.content != "function" && (t.allowHTML ? Et(e, t.content) : e.textContent = t.content);
1234
+ }
1235
+ function St(e) {
1236
+ var t = e.firstElementChild, n = st(t.children);
1237
+ return {
1238
+ box: t,
1239
+ content: n.find(function(r) {
1240
+ return r.classList.contains(gn);
1241
+ }),
1242
+ arrow: n.find(function(r) {
1243
+ return r.classList.contains(yn) || r.classList.contains(bn);
1244
+ }),
1245
+ backdrop: n.find(function(r) {
1246
+ return r.classList.contains(Zr);
1247
+ })
1248
+ };
1249
+ }
1250
+ function An(e) {
1251
+ var t = He(), n = He();
1252
+ n.className = Qr, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
1253
+ var r = He();
1254
+ r.className = gn, r.setAttribute("data-state", "hidden"), Zt(r, e.props), t.appendChild(n), n.appendChild(r), o(e.props, e.props);
1255
+ function o(s, l) {
1256
+ var u = St(t), a = u.box, d = u.content, f = u.arrow;
1257
+ l.theme ? a.setAttribute("data-theme", l.theme) : a.removeAttribute("data-theme"), typeof l.animation == "string" ? a.setAttribute("data-animation", l.animation) : a.removeAttribute("data-animation"), l.inertia ? a.setAttribute("data-inertia", "") : a.removeAttribute("data-inertia"), a.style.maxWidth = typeof l.maxWidth == "number" ? l.maxWidth + "px" : l.maxWidth, l.role ? a.setAttribute("role", l.role) : a.removeAttribute("role"), (s.content !== l.content || s.allowHTML !== l.allowHTML) && Zt(d, e.props), l.arrow ? f ? s.arrow !== l.arrow && (a.removeChild(f), a.appendChild(Qt(l.arrow))) : a.appendChild(Qt(l.arrow)) : f && a.removeChild(f);
1258
+ }
1259
+ return {
1260
+ popper: t,
1261
+ onUpdate: o
1262
+ };
1263
+ }
1264
+ An.$$tippy = !0;
1265
+ var xi = 1, it = [], vt = [];
1266
+ function Ti(e, t) {
1267
+ var n = Jt(e, Object.assign({}, F, Tn(zt(t)))), r, o, s, l = !1, u = !1, a = !1, d = !1, f, v, g, h = [], b = Ft(Ke, n.interactiveDebounce), m, w = xi++, T = null, D = ri(n.plugins), O = {
1268
+ // Is the instance currently enabled?
1269
+ isEnabled: !0,
1270
+ // Is the tippy currently showing and not transitioning out?
1271
+ isVisible: !1,
1272
+ // Has the instance been destroyed?
1273
+ isDestroyed: !1,
1274
+ // Is the tippy currently mounted to the DOM?
1275
+ isMounted: !1,
1276
+ // Has the tippy finished transitioning in?
1277
+ isShown: !1
1278
+ }, i = {
1279
+ // properties
1280
+ id: w,
1281
+ reference: e,
1282
+ popper: He(),
1283
+ popperInstance: T,
1284
+ props: n,
1285
+ state: O,
1286
+ plugins: D,
1287
+ // methods
1288
+ clearDelayTimeouts: Qe,
1289
+ setProps: Ze,
1290
+ setContent: et,
1291
+ show: Ln,
1292
+ hide: Rn,
1293
+ hideWithInteractivity: Mn,
1294
+ enable: Ne,
1295
+ disable: Je,
1296
+ unmount: Vn,
1297
+ destroy: Nn
1298
+ };
1299
+ if (!n.render)
1300
+ return process.env.NODE_ENV !== "production" && Ot(!0, "render() function has not been supplied."), i;
1301
+ var E = n.render(i), p = E.popper, x = E.onUpdate;
1302
+ p.setAttribute("data-tippy-root", ""), p.id = "tippy-" + i.id, i.popper = p, e._tippy = i, p._tippy = i;
1303
+ var _ = D.map(function(c) {
1304
+ return c.fn(i);
1305
+ }), A = e.hasAttribute("aria-expanded");
1306
+ return Oe(), Q(), P(), I("onCreate", [i]), n.showOnCreate && Ve(), p.addEventListener("mouseenter", function() {
1307
+ i.props.interactive && i.state.isVisible && i.clearDelayTimeouts();
1308
+ }), p.addEventListener("mouseleave", function() {
1309
+ i.props.interactive && i.props.trigger.indexOf("mouseenter") >= 0 && H().addEventListener("mousemove", b);
1310
+ }), i;
1311
+ function R() {
1312
+ var c = i.props.touch;
1313
+ return Array.isArray(c) ? c : [c, 0];
1314
+ }
1315
+ function N() {
1316
+ return R()[0] === "hold";
1317
+ }
1318
+ function M() {
1319
+ var c;
1320
+ return !!((c = i.props.render) != null && c.$$tippy);
1321
+ }
1322
+ function V() {
1323
+ return m || e;
1324
+ }
1325
+ function H() {
1326
+ var c = V().parentNode;
1327
+ return c ? ci(c) : document;
1328
+ }
1329
+ function W() {
1330
+ return St(p);
1331
+ }
1332
+ function j(c) {
1333
+ return i.state.isMounted && !i.state.isVisible || ee.isTouch || f && f.type === "focus" ? 0 : lt(i.props.delay, c ? 0 : 1, F.delay);
1334
+ }
1335
+ function P(c) {
1336
+ c === void 0 && (c = !1), p.style.pointerEvents = i.props.interactive && !c ? "" : "none", p.style.zIndex = "" + i.props.zIndex;
1337
+ }
1338
+ function I(c, y, S) {
1339
+ if (S === void 0 && (S = !0), _.forEach(function(C) {
1340
+ C[c] && C[c].apply(C, y);
1341
+ }), S) {
1342
+ var L;
1343
+ (L = i.props)[c].apply(L, y);
1344
+ }
1345
+ }
1346
+ function J() {
1347
+ var c = i.props.aria;
1348
+ if (c.content) {
1349
+ var y = "aria-" + c.content, S = p.id, L = Te(i.props.triggerTarget || e);
1350
+ L.forEach(function(C) {
1351
+ var $ = C.getAttribute(y);
1352
+ if (i.state.isVisible)
1353
+ C.setAttribute(y, $ ? $ + " " + S : S);
1354
+ else {
1355
+ var z = $ && $.replace(S, "").trim();
1356
+ z ? C.setAttribute(y, z) : C.removeAttribute(y);
1357
+ }
1358
+ });
1359
+ }
1360
+ }
1361
+ function Q() {
1362
+ if (!(A || !i.props.aria.expanded)) {
1363
+ var c = Te(i.props.triggerTarget || e);
1364
+ c.forEach(function(y) {
1365
+ i.props.interactive ? y.setAttribute("aria-expanded", i.state.isVisible && y === V() ? "true" : "false") : y.removeAttribute("aria-expanded");
1366
+ });
1367
+ }
1368
+ }
1369
+ function pe() {
1370
+ H().removeEventListener("mousemove", b), it = it.filter(function(c) {
1371
+ return c !== b;
1372
+ });
1373
+ }
1374
+ function Z(c) {
1375
+ if (!(ee.isTouch && (a || c.type === "mousedown"))) {
1376
+ var y = c.composedPath && c.composedPath()[0] || c.target;
1377
+ if (!(i.props.interactive && Gt(p, y))) {
1378
+ if (Te(i.props.triggerTarget || e).some(function(S) {
1379
+ return Gt(S, y);
1380
+ })) {
1381
+ if (ee.isTouch || i.state.isVisible && i.props.trigger.indexOf("click") >= 0)
1382
+ return;
1383
+ } else
1384
+ I("onClickOutside", [i, c]);
1385
+ i.props.hideOnClick === !0 && (i.clearDelayTimeouts(), i.hide(), u = !0, setTimeout(function() {
1386
+ u = !1;
1387
+ }), i.state.isMounted || ie());
1388
+ }
1389
+ }
1390
+ }
1391
+ function de() {
1392
+ a = !0;
1393
+ }
1394
+ function re() {
1395
+ a = !1;
1396
+ }
1397
+ function X() {
1398
+ var c = H();
1399
+ c.addEventListener("mousedown", Z, !0), c.addEventListener("touchend", Z, me), c.addEventListener("touchstart", re, me), c.addEventListener("touchmove", de, me);
1400
+ }
1401
+ function ie() {
1402
+ var c = H();
1403
+ c.removeEventListener("mousedown", Z, !0), c.removeEventListener("touchend", Z, me), c.removeEventListener("touchstart", re, me), c.removeEventListener("touchmove", de, me);
1404
+ }
1405
+ function be(c, y) {
1406
+ we(c, function() {
1407
+ !i.state.isVisible && p.parentNode && p.parentNode.contains(p) && y();
1408
+ });
1409
+ }
1410
+ function oe(c, y) {
1411
+ we(c, y);
1412
+ }
1413
+ function we(c, y) {
1414
+ var S = W().box;
1415
+ function L(C) {
1416
+ C.target === S && (dt(S, "remove", L), y());
1417
+ }
1418
+ if (c === 0)
1419
+ return y();
1420
+ dt(S, "remove", v), dt(S, "add", L), v = L;
1421
+ }
1422
+ function ce(c, y, S) {
1423
+ S === void 0 && (S = !1);
1424
+ var L = Te(i.props.triggerTarget || e);
1425
+ L.forEach(function(C) {
1426
+ C.addEventListener(c, y, S), h.push({
1427
+ node: C,
1428
+ eventType: c,
1429
+ handler: y,
1430
+ options: S
1431
+ });
1432
+ });
1433
+ }
1434
+ function Oe() {
1435
+ N() && (ce("touchstart", Le, {
1436
+ passive: !0
1437
+ }), ce("touchend", Ge, {
1438
+ passive: !0
1439
+ })), ni(i.props.trigger).forEach(function(c) {
1440
+ if (c !== "manual")
1441
+ switch (ce(c, Le), c) {
1442
+ case "mouseenter":
1443
+ ce("mouseleave", Ge);
1444
+ break;
1445
+ case "focus":
1446
+ ce(hi ? "focusout" : "blur", Re);
1447
+ break;
1448
+ case "focusin":
1449
+ ce("focusout", Re);
1450
+ break;
1451
+ }
1452
+ });
1453
+ }
1454
+ function ze() {
1455
+ h.forEach(function(c) {
1456
+ var y = c.node, S = c.eventType, L = c.handler, C = c.options;
1457
+ y.removeEventListener(S, L, C);
1458
+ }), h = [];
1459
+ }
1460
+ function Le(c) {
1461
+ var y, S = !1;
1462
+ if (!(!i.state.isEnabled || Me(c) || u)) {
1463
+ var L = ((y = f) == null ? void 0 : y.type) === "focus";
1464
+ f = c, m = c.currentTarget, Q(), !i.state.isVisible && ai(c) && it.forEach(function(C) {
1465
+ return C(c);
1466
+ }), c.type === "click" && (i.props.trigger.indexOf("mouseenter") < 0 || l) && i.props.hideOnClick !== !1 && i.state.isVisible ? S = !0 : Ve(c), c.type === "click" && (l = !S), S && !L && ve(c);
1467
+ }
1468
+ }
1469
+ function Ke(c) {
1470
+ var y = c.target, S = V().contains(y) || p.contains(y);
1471
+ if (!(c.type === "mousemove" && S)) {
1472
+ var L = fe().concat(p).map(function(C) {
1473
+ var $, z = C._tippy, Ee = ($ = z.popperInstance) == null ? void 0 : $.state;
1474
+ return Ee ? {
1475
+ popperRect: C.getBoundingClientRect(),
1476
+ popperState: Ee,
1477
+ props: n
1478
+ } : null;
1479
+ }).filter(Boolean);
1480
+ fi(L, c) && (pe(), ve(c));
1481
+ }
1482
+ }
1483
+ function Ge(c) {
1484
+ var y = Me(c) || i.props.trigger.indexOf("click") >= 0 && l;
1485
+ if (!y) {
1486
+ if (i.props.interactive) {
1487
+ i.hideWithInteractivity(c);
1488
+ return;
1489
+ }
1490
+ ve(c);
1491
+ }
1492
+ }
1493
+ function Re(c) {
1494
+ i.props.trigger.indexOf("focusin") < 0 && c.target !== V() || i.props.interactive && c.relatedTarget && p.contains(c.relatedTarget) || ve(c);
1495
+ }
1496
+ function Me(c) {
1497
+ return ee.isTouch ? N() !== c.type.indexOf("touch") >= 0 : !1;
1498
+ }
1499
+ function Ye() {
1500
+ Xe();
1501
+ var c = i.props, y = c.popperOptions, S = c.placement, L = c.offset, C = c.getReferenceClientRect, $ = c.moveTransition, z = M() ? St(p).arrow : null, Ee = C ? {
1502
+ getBoundingClientRect: C,
1503
+ contextElement: C.contextElement || V()
1504
+ } : e, Nt = {
1505
+ name: "$$tippy",
1506
+ enabled: !0,
1507
+ phase: "beforeWrite",
1508
+ requires: ["computeStyles"],
1509
+ fn: function(tt) {
1510
+ var Se = tt.state;
1511
+ if (M()) {
1512
+ var jn = W(), ft = jn.box;
1513
+ ["placement", "reference-hidden", "escaped"].forEach(function(nt) {
1514
+ nt === "placement" ? ft.setAttribute("data-placement", Se.placement) : Se.attributes.popper["data-popper-" + nt] ? ft.setAttribute("data-" + nt, "") : ft.removeAttribute("data-" + nt);
1515
+ }), Se.attributes.popper = {};
1516
+ }
1517
+ }
1518
+ }, he = [{
1519
+ name: "offset",
1520
+ options: {
1521
+ offset: L
1522
+ }
1523
+ }, {
1524
+ name: "preventOverflow",
1525
+ options: {
1526
+ padding: {
1527
+ top: 2,
1528
+ bottom: 2,
1529
+ left: 5,
1530
+ right: 5
1531
+ }
1532
+ }
1533
+ }, {
1534
+ name: "flip",
1535
+ options: {
1536
+ padding: 5
1537
+ }
1538
+ }, {
1539
+ name: "computeStyles",
1540
+ options: {
1541
+ adaptive: !$
1542
+ }
1543
+ }, Nt];
1544
+ M() && z && he.push({
1545
+ name: "arrow",
1546
+ options: {
1547
+ element: z,
1548
+ padding: 3
1549
+ }
1550
+ }), he.push.apply(he, (y == null ? void 0 : y.modifiers) || []), i.popperInstance = Jr(Ee, p, Object.assign({}, y, {
1551
+ placement: S,
1552
+ onFirstUpdate: g,
1553
+ modifiers: he
1554
+ }));
1555
+ }
1556
+ function Xe() {
1557
+ i.popperInstance && (i.popperInstance.destroy(), i.popperInstance = null);
1558
+ }
1559
+ function ae() {
1560
+ var c = i.props.appendTo, y, S = V();
1561
+ i.props.interactive && c === wn || c === "parent" ? y = S.parentNode : y = On(c, [S]), y.contains(p) || y.appendChild(p), i.state.isMounted = !0, Ye(), process.env.NODE_ENV !== "production" && se(i.props.interactive && c === F.appendTo && S.nextElementSibling !== p, ["Interactive tippy element may not be accessible via keyboard", "navigation because it is not directly after the reference element", "in the DOM source order.", `
1562
+
1563
+ `, "Using a wrapper <div> or <span> tag around the reference element", "solves this by creating a new parentNode context.", `
1564
+
1565
+ `, "Specifying `appendTo: document.body` silences this warning, but it", "assumes you are using a focus management solution to handle", "keyboard navigation.", `
1566
+
1567
+ `, "See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "));
1568
+ }
1569
+ function fe() {
1570
+ return st(p.querySelectorAll("[data-tippy-root]"));
1571
+ }
1572
+ function Ve(c) {
1573
+ i.clearDelayTimeouts(), c && I("onTrigger", [i, c]), X();
1574
+ var y = j(!0), S = R(), L = S[0], C = S[1];
1575
+ ee.isTouch && L === "hold" && C && (y = C), y ? r = setTimeout(function() {
1576
+ i.show();
1577
+ }, y) : i.show();
1578
+ }
1579
+ function ve(c) {
1580
+ if (i.clearDelayTimeouts(), I("onUntrigger", [i, c]), !i.state.isVisible) {
1581
+ ie();
1582
+ return;
1583
+ }
1584
+ if (!(i.props.trigger.indexOf("mouseenter") >= 0 && i.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(c.type) >= 0 && l)) {
1585
+ var y = j(!1);
1586
+ y ? o = setTimeout(function() {
1587
+ i.state.isVisible && i.hide();
1588
+ }, y) : s = requestAnimationFrame(function() {
1589
+ i.hide();
1590
+ });
1591
+ }
1592
+ }
1593
+ function Ne() {
1594
+ i.state.isEnabled = !0;
1595
+ }
1596
+ function Je() {
1597
+ i.hide(), i.state.isEnabled = !1;
1598
+ }
1599
+ function Qe() {
1600
+ clearTimeout(r), clearTimeout(o), cancelAnimationFrame(s);
1601
+ }
1602
+ function Ze(c) {
1603
+ if (process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("setProps")), !i.state.isDestroyed) {
1604
+ I("onBeforeUpdate", [i, c]), ze();
1605
+ var y = i.props, S = Jt(e, Object.assign({}, y, zt(c), {
1606
+ ignoreAttributes: !0
1607
+ }));
1608
+ i.props = S, Oe(), y.interactiveDebounce !== S.interactiveDebounce && (pe(), b = Ft(Ke, S.interactiveDebounce)), y.triggerTarget && !S.triggerTarget ? Te(y.triggerTarget).forEach(function(L) {
1609
+ L.removeAttribute("aria-expanded");
1610
+ }) : S.triggerTarget && e.removeAttribute("aria-expanded"), Q(), P(), x && x(y, S), i.popperInstance && (Ye(), fe().forEach(function(L) {
1611
+ requestAnimationFrame(L._tippy.popperInstance.forceUpdate);
1612
+ })), I("onAfterUpdate", [i, c]);
1613
+ }
1614
+ }
1615
+ function et(c) {
1616
+ i.setProps({
1617
+ content: c
1618
+ });
1619
+ }
1620
+ function Ln() {
1621
+ process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("show"));
1622
+ var c = i.state.isVisible, y = i.state.isDestroyed, S = !i.state.isEnabled, L = ee.isTouch && !i.props.touch, C = lt(i.props.duration, 0, F.duration);
1623
+ if (!(c || y || S || L) && !V().hasAttribute("disabled") && (I("onShow", [i], !1), i.props.onShow(i) !== !1)) {
1624
+ if (i.state.isVisible = !0, M() && (p.style.visibility = "visible"), P(), X(), i.state.isMounted || (p.style.transition = "none"), M()) {
1625
+ var $ = W(), z = $.box, Ee = $.content;
1626
+ pt([z, Ee], 0);
1627
+ }
1628
+ g = function() {
1629
+ var he;
1630
+ if (!(!i.state.isVisible || d)) {
1631
+ if (d = !0, p.offsetHeight, p.style.transition = i.props.moveTransition, M() && i.props.animation) {
1632
+ var ct = W(), tt = ct.box, Se = ct.content;
1633
+ pt([tt, Se], C), Kt([tt, Se], "visible");
1634
+ }
1635
+ J(), Q(), qt(vt, i), (he = i.popperInstance) == null || he.forceUpdate(), I("onMount", [i]), i.props.animation && M() && oe(C, function() {
1636
+ i.state.isShown = !0, I("onShown", [i]);
1637
+ });
1638
+ }
1639
+ }, ae();
1640
+ }
1641
+ }
1642
+ function Rn() {
1643
+ process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("hide"));
1644
+ var c = !i.state.isVisible, y = i.state.isDestroyed, S = !i.state.isEnabled, L = lt(i.props.duration, 1, F.duration);
1645
+ if (!(c || y || S) && (I("onHide", [i], !1), i.props.onHide(i) !== !1)) {
1646
+ if (i.state.isVisible = !1, i.state.isShown = !1, d = !1, l = !1, M() && (p.style.visibility = "hidden"), pe(), ie(), P(!0), M()) {
1647
+ var C = W(), $ = C.box, z = C.content;
1648
+ i.props.animation && (pt([$, z], L), Kt([$, z], "hidden"));
1649
+ }
1650
+ J(), Q(), i.props.animation ? M() && be(L, i.unmount) : i.unmount();
1651
+ }
1652
+ }
1653
+ function Mn(c) {
1654
+ process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("hideWithInteractivity")), H().addEventListener("mousemove", b), qt(it, b), b(c);
1655
+ }
1656
+ function Vn() {
1657
+ process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("unmount")), i.state.isVisible && i.hide(), i.state.isMounted && (Xe(), fe().forEach(function(c) {
1658
+ c._tippy.unmount();
1659
+ }), p.parentNode && p.parentNode.removeChild(p), vt = vt.filter(function(c) {
1660
+ return c !== i;
1661
+ }), i.state.isMounted = !1, I("onHidden", [i]));
1662
+ }
1663
+ function Nn() {
1664
+ process.env.NODE_ENV !== "production" && se(i.state.isDestroyed, xe("destroy")), !i.state.isDestroyed && (i.clearDelayTimeouts(), i.unmount(), ze(), delete e._tippy, i.state.isDestroyed = !0, I("onDestroy", [i]));
1665
+ }
1666
+ }
1667
+ function qe(e, t) {
1668
+ t === void 0 && (t = {});
1669
+ var n = F.plugins.concat(t.plugins || []);
1670
+ process.env.NODE_ENV !== "production" && (yi(e), Dn(t, n)), di();
1671
+ var r = Object.assign({}, t, {
1672
+ plugins: n
1673
+ }), o = ui(e);
1674
+ if (process.env.NODE_ENV !== "production") {
1675
+ var s = $e(r.content), l = o.length > 1;
1676
+ se(s && l, ["tippy() was passed an Element as the `content` prop, but more than", "one tippy instance was created by this invocation. This means the", "content element will only be appended to the last tippy instance.", `
1677
+
1678
+ `, "Instead, pass the .innerHTML of the element, or use a function that", "returns a cloned version of the element instead.", `
1679
+
1680
+ `, `1) content: element.innerHTML
1681
+ `, "2) content: () => element.cloneNode(true)"].join(" "));
1682
+ }
1683
+ var u = o.reduce(function(a, d) {
1684
+ var f = d && Ti(d, r);
1685
+ return f && a.push(f), a;
1686
+ }, []);
1687
+ return $e(e) ? u[0] : u;
1688
+ }
1689
+ qe.defaultProps = F;
1690
+ qe.setDefaultProps = Oi;
1691
+ qe.currentInput = ee;
1692
+ Object.assign({}, cn, {
1693
+ effect: function(t) {
1694
+ var n = t.state, r = {
1695
+ popper: {
1696
+ position: n.options.strategy,
1697
+ left: "0",
1698
+ top: "0",
1699
+ margin: "0"
1700
+ },
1701
+ arrow: {
1702
+ position: "absolute"
1703
+ },
1704
+ reference: {}
1705
+ };
1706
+ Object.assign(n.elements.popper.style, r.popper), n.styles = r, n.elements.arrow && Object.assign(n.elements.arrow.style, r.arrow);
1707
+ }
1708
+ });
1709
+ qe.setDefaultProps({
1710
+ render: An
1711
+ });
1712
+ class Di {
1713
+ constructor({ editor: t, element: n, view: r, tippyOptions: o = {}, updateDelay: s = 250, shouldShow: l }) {
1714
+ this.preventHide = !1, this.shouldShow = ({ view: u, state: a, from: d, to: f }) => {
1715
+ const { doc: v, selection: g } = a, { empty: h } = g, b = !v.textBetween(d, f).length && Hn(a.selection), m = this.element.contains(document.activeElement);
1716
+ return !(!(u.hasFocus() || m) || h || b || !this.editor.isEditable);
1717
+ }, this.mousedownHandler = () => {
1718
+ this.preventHide = !0;
1719
+ }, this.dragstartHandler = () => {
1720
+ this.hide();
1721
+ }, this.focusHandler = () => {
1722
+ setTimeout(() => this.update(this.editor.view));
1723
+ }, this.blurHandler = ({ event: u }) => {
1724
+ var a;
1725
+ if (this.preventHide) {
1726
+ this.preventHide = !1;
1727
+ return;
1728
+ }
1729
+ u != null && u.relatedTarget && (!((a = this.element.parentNode) === null || a === void 0) && a.contains(u.relatedTarget)) || (u == null ? void 0 : u.relatedTarget) !== this.editor.view.dom && this.hide();
1730
+ }, this.tippyBlurHandler = (u) => {
1731
+ this.blurHandler({ event: u });
1732
+ }, this.handleDebouncedUpdate = (u, a) => {
1733
+ const d = !(a != null && a.selection.eq(u.state.selection)), f = !(a != null && a.doc.eq(u.state.doc));
1734
+ !d && !f || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
1735
+ this.updateHandler(u, d, f, a);
1736
+ }, this.updateDelay));
1737
+ }, this.updateHandler = (u, a, d, f) => {
1738
+ var v, g, h;
1739
+ const { state: b, composing: m } = u, { selection: w } = b;
1740
+ if (m || !a && !d)
1741
+ return;
1742
+ this.createTooltip();
1743
+ const { ranges: D } = w, O = Math.min(...D.map((p) => p.$from.pos)), i = Math.max(...D.map((p) => p.$to.pos));
1744
+ if (!((v = this.shouldShow) === null || v === void 0 ? void 0 : v.call(this, {
1745
+ editor: this.editor,
1746
+ element: this.element,
1747
+ view: u,
1748
+ state: b,
1749
+ oldState: f,
1750
+ from: O,
1751
+ to: i
1752
+ }))) {
1753
+ this.hide();
1754
+ return;
1755
+ }
1756
+ (g = this.tippy) === null || g === void 0 || g.setProps({
1757
+ getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
1758
+ if (In(b.selection)) {
1759
+ let p = u.nodeDOM(O);
1760
+ if (p) {
1761
+ const x = p.dataset.nodeViewWrapper ? p : p.querySelector("[data-node-view-wrapper]");
1762
+ if (x && (p = x.firstChild), p)
1763
+ return p.getBoundingClientRect();
1764
+ }
1765
+ }
1766
+ return Wn(u, O, i);
1767
+ })
1768
+ }), this.show();
1769
+ }, this.editor = t, this.element = n, this.view = r, this.updateDelay = s, l && (this.shouldShow = l), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.addEventListener("dragstart", this.dragstartHandler), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = o, this.element.remove(), this.element.style.visibility = "visible";
1770
+ }
1771
+ createTooltip() {
1772
+ const { element: t } = this.editor.options, n = !!t.parentElement;
1773
+ this.tippy || !n || (this.tippy = qe(t, {
1774
+ duration: 0,
1775
+ getReferenceClientRect: null,
1776
+ content: this.element,
1777
+ interactive: !0,
1778
+ trigger: "manual",
1779
+ placement: "top",
1780
+ hideOnClick: "toggle",
1781
+ ...this.tippyOptions
1782
+ }), this.tippy.popper.firstChild && this.tippy.popper.firstChild.addEventListener("blur", this.tippyBlurHandler));
1783
+ }
1784
+ update(t, n) {
1785
+ const { state: r } = t, o = r.selection.from !== r.selection.to;
1786
+ if (this.updateDelay > 0 && o) {
1787
+ this.handleDebouncedUpdate(t, n);
1788
+ return;
1789
+ }
1790
+ const s = !(n != null && n.selection.eq(t.state.selection)), l = !(n != null && n.doc.eq(t.state.doc));
1791
+ this.updateHandler(t, s, l, n);
1792
+ }
1793
+ show() {
1794
+ var t;
1795
+ (t = this.tippy) === null || t === void 0 || t.show();
1796
+ }
1797
+ hide() {
1798
+ var t;
1799
+ (t = this.tippy) === null || t === void 0 || t.hide();
1800
+ }
1801
+ destroy() {
1802
+ var t, n;
1803
+ !((t = this.tippy) === null || t === void 0) && t.popper.firstChild && this.tippy.popper.firstChild.removeEventListener("blur", this.tippyBlurHandler), (n = this.tippy) === null || n === void 0 || n.destroy(), this.element.removeEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.view.dom.removeEventListener("dragstart", this.dragstartHandler), this.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
1804
+ }
1805
+ }
1806
+ const Cn = (e) => new Pn({
1807
+ key: typeof e.pluginKey == "string" ? new Bn(e.pluginKey) : e.pluginKey,
1808
+ view: (t) => new Di({ view: t, ...e })
1809
+ });
1810
+ $n.create({
1811
+ name: "bubbleMenu",
1812
+ addOptions() {
1813
+ return {
1814
+ element: null,
1815
+ tippyOptions: {},
1816
+ pluginKey: "bubbleMenu",
1817
+ updateDelay: void 0,
1818
+ shouldShow: null
1819
+ };
1820
+ },
1821
+ addProseMirrorPlugins() {
1822
+ return this.options.element ? [
1823
+ Cn({
1824
+ pluginKey: this.options.pluginKey,
1825
+ editor: this.editor,
1826
+ element: this.options.element,
1827
+ tippyOptions: this.options.tippyOptions,
1828
+ updateDelay: this.options.updateDelay,
1829
+ shouldShow: this.options.shouldShow
1830
+ })
1831
+ ] : [];
1832
+ }
1833
+ });
1834
+ var xt = { exports: {} }, ht = {};
1835
+ /**
1836
+ * @license React
1837
+ * use-sync-external-store-shim.production.min.js
1838
+ *
1839
+ * Copyright (c) Facebook, Inc. and its affiliates.
1840
+ *
1841
+ * This source code is licensed under the MIT license found in the
1842
+ * LICENSE file in the root directory of this source tree.
1843
+ */
1844
+ var en;
1845
+ function Ai() {
1846
+ if (en) return ht;
1847
+ en = 1;
1848
+ var e = B;
1849
+ function t(v, g) {
1850
+ return v === g && (v !== 0 || 1 / v === 1 / g) || v !== v && g !== g;
1851
+ }
1852
+ var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, s = e.useLayoutEffect, l = e.useDebugValue;
1853
+ function u(v, g) {
1854
+ var h = g(), b = r({ inst: { value: h, getSnapshot: g } }), m = b[0].inst, w = b[1];
1855
+ return s(function() {
1856
+ m.value = h, m.getSnapshot = g, a(m) && w({ inst: m });
1857
+ }, [v, h, g]), o(function() {
1858
+ return a(m) && w({ inst: m }), v(function() {
1859
+ a(m) && w({ inst: m });
1860
+ });
1861
+ }, [v]), l(h), h;
1862
+ }
1863
+ function a(v) {
1864
+ var g = v.getSnapshot;
1865
+ v = v.value;
1866
+ try {
1867
+ var h = g();
1868
+ return !n(v, h);
1869
+ } catch {
1870
+ return !0;
1871
+ }
1872
+ }
1873
+ function d(v, g) {
1874
+ return g();
1875
+ }
1876
+ var f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? d : u;
1877
+ return ht.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : f, ht;
1878
+ }
1879
+ var mt = {};
1880
+ /**
1881
+ * @license React
1882
+ * use-sync-external-store-shim.development.js
1883
+ *
1884
+ * Copyright (c) Facebook, Inc. and its affiliates.
1885
+ *
1886
+ * This source code is licensed under the MIT license found in the
1887
+ * LICENSE file in the root directory of this source tree.
1888
+ */
1889
+ var tn;
1890
+ function Ci() {
1891
+ return tn || (tn = 1, process.env.NODE_ENV !== "production" && function() {
1892
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
1893
+ var e = B, t = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1894
+ function n(O) {
1895
+ {
1896
+ for (var i = arguments.length, E = new Array(i > 1 ? i - 1 : 0), p = 1; p < i; p++)
1897
+ E[p - 1] = arguments[p];
1898
+ r("error", O, E);
1899
+ }
1900
+ }
1901
+ function r(O, i, E) {
1902
+ {
1903
+ var p = t.ReactDebugCurrentFrame, x = p.getStackAddendum();
1904
+ x !== "" && (i += "%s", E = E.concat([x]));
1905
+ var _ = E.map(function(A) {
1906
+ return String(A);
1907
+ });
1908
+ _.unshift("Warning: " + i), Function.prototype.apply.call(console[O], console, _);
1909
+ }
1910
+ }
1911
+ function o(O, i) {
1912
+ return O === i && (O !== 0 || 1 / O === 1 / i) || O !== O && i !== i;
1913
+ }
1914
+ var s = typeof Object.is == "function" ? Object.is : o, l = e.useState, u = e.useEffect, a = e.useLayoutEffect, d = e.useDebugValue, f = !1, v = !1;
1915
+ function g(O, i, E) {
1916
+ f || e.startTransition !== void 0 && (f = !0, n("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
1917
+ var p = i();
1918
+ if (!v) {
1919
+ var x = i();
1920
+ s(p, x) || (n("The result of getSnapshot should be cached to avoid an infinite loop"), v = !0);
1921
+ }
1922
+ var _ = l({
1923
+ inst: {
1924
+ value: p,
1925
+ getSnapshot: i
1926
+ }
1927
+ }), A = _[0].inst, R = _[1];
1928
+ return a(function() {
1929
+ A.value = p, A.getSnapshot = i, h(A) && R({
1930
+ inst: A
1931
+ });
1932
+ }, [O, p, i]), u(function() {
1933
+ h(A) && R({
1934
+ inst: A
1935
+ });
1936
+ var N = function() {
1937
+ h(A) && R({
1938
+ inst: A
1939
+ });
1940
+ };
1941
+ return O(N);
1942
+ }, [O]), d(p), p;
1943
+ }
1944
+ function h(O) {
1945
+ var i = O.getSnapshot, E = O.value;
1946
+ try {
1947
+ var p = i();
1948
+ return !s(E, p);
1949
+ } catch {
1950
+ return !0;
1951
+ }
1952
+ }
1953
+ function b(O, i, E) {
1954
+ return i();
1955
+ }
1956
+ var m = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", w = !m, T = w ? b : g, D = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : T;
1957
+ mt.useSyncExternalStore = D, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1958
+ }()), mt;
1959
+ }
1960
+ process.env.NODE_ENV === "production" ? xt.exports = Ai() : xt.exports = Ci();
1961
+ var Vt = xt.exports;
1962
+ const _i = (...e) => (t) => {
1963
+ e.forEach((n) => {
1964
+ typeof n == "function" ? n(t) : n && (n.current = t);
1965
+ });
1966
+ }, Li = ({ contentComponent: e }) => {
1967
+ const t = Vt.useSyncExternalStore(e.subscribe, e.getSnapshot, e.getServerSnapshot);
1968
+ return B.createElement(B.Fragment, null, Object.values(t));
1969
+ };
1970
+ function Ri() {
1971
+ const e = /* @__PURE__ */ new Set();
1972
+ let t = {};
1973
+ return {
1974
+ /**
1975
+ * Subscribe to the editor instance's changes.
1976
+ */
1977
+ subscribe(n) {
1978
+ return e.add(n), () => {
1979
+ e.delete(n);
1980
+ };
1981
+ },
1982
+ getSnapshot() {
1983
+ return t;
1984
+ },
1985
+ getServerSnapshot() {
1986
+ return t;
1987
+ },
1988
+ /**
1989
+ * Adds a new NodeView Renderer to the editor.
1990
+ */
1991
+ setRenderer(n, r) {
1992
+ t = {
1993
+ ...t,
1994
+ [n]: qn.createPortal(r.reactElement, r.element, n)
1995
+ }, e.forEach((o) => o());
1996
+ },
1997
+ /**
1998
+ * Removes a NodeView Renderer from the editor.
1999
+ */
2000
+ removeRenderer(n) {
2001
+ const r = { ...t };
2002
+ delete r[n], t = r, e.forEach((o) => o());
2003
+ }
2004
+ };
2005
+ }
2006
+ class Mi extends B.Component {
2007
+ constructor(t) {
2008
+ var n;
2009
+ super(t), this.editorContentRef = B.createRef(), this.initialized = !1, this.state = {
2010
+ hasContentComponentInitialized: !!(!((n = t.editor) === null || n === void 0) && n.contentComponent)
2011
+ };
2012
+ }
2013
+ componentDidMount() {
2014
+ this.init();
2015
+ }
2016
+ componentDidUpdate() {
2017
+ this.init();
2018
+ }
2019
+ init() {
2020
+ const t = this.props.editor;
2021
+ if (t && !t.isDestroyed && t.options.element) {
2022
+ if (t.contentComponent)
2023
+ return;
2024
+ const n = this.editorContentRef.current;
2025
+ n.append(...t.options.element.childNodes), t.setOptions({
2026
+ element: n
2027
+ }), t.contentComponent = Ri(), this.state.hasContentComponentInitialized || (this.unsubscribeToContentComponent = t.contentComponent.subscribe(() => {
2028
+ this.setState((r) => r.hasContentComponentInitialized ? r : {
2029
+ hasContentComponentInitialized: !0
2030
+ }), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent();
2031
+ })), t.createNodeViews(), this.initialized = !0;
2032
+ }
2033
+ }
2034
+ componentWillUnmount() {
2035
+ const t = this.props.editor;
2036
+ if (!t || (this.initialized = !1, t.isDestroyed || t.view.setProps({
2037
+ nodeViews: {}
2038
+ }), this.unsubscribeToContentComponent && this.unsubscribeToContentComponent(), t.contentComponent = null, !t.options.element.firstChild))
2039
+ return;
2040
+ const n = document.createElement("div");
2041
+ n.append(...t.options.element.childNodes), t.setOptions({
2042
+ element: n
2043
+ });
2044
+ }
2045
+ render() {
2046
+ const { editor: t, innerRef: n, ...r } = this.props;
2047
+ return B.createElement(
2048
+ B.Fragment,
2049
+ null,
2050
+ B.createElement("div", { ref: _i(n, this.editorContentRef), ...r }),
2051
+ (t == null ? void 0 : t.contentComponent) && B.createElement(Li, { contentComponent: t.contentComponent })
2052
+ );
2053
+ }
2054
+ }
2055
+ const Vi = kn((e, t) => {
2056
+ const n = B.useMemo(() => Math.floor(Math.random() * 4294967295).toString(), [e.editor]);
2057
+ return B.createElement(Mi, {
2058
+ key: n,
2059
+ innerRef: t,
2060
+ ...e
2061
+ });
2062
+ }), Fi = B.memo(Vi);
2063
+ var gt = {};
2064
+ /**
2065
+ * @license React
2066
+ * use-sync-external-store-shim/with-selector.production.min.js
2067
+ *
2068
+ * Copyright (c) Facebook, Inc. and its affiliates.
2069
+ *
2070
+ * This source code is licensed under the MIT license found in the
2071
+ * LICENSE file in the root directory of this source tree.
2072
+ */
2073
+ var nn;
2074
+ function Ni() {
2075
+ if (nn) return gt;
2076
+ nn = 1;
2077
+ var e = B, t = Vt;
2078
+ function n(d, f) {
2079
+ return d === f && (d !== 0 || 1 / d === 1 / f) || d !== d && f !== f;
2080
+ }
2081
+ var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, l = e.useEffect, u = e.useMemo, a = e.useDebugValue;
2082
+ return gt.useSyncExternalStoreWithSelector = function(d, f, v, g, h) {
2083
+ var b = s(null);
2084
+ if (b.current === null) {
2085
+ var m = { hasValue: !1, value: null };
2086
+ b.current = m;
2087
+ } else m = b.current;
2088
+ b = u(function() {
2089
+ function T(p) {
2090
+ if (!D) {
2091
+ if (D = !0, O = p, p = g(p), h !== void 0 && m.hasValue) {
2092
+ var x = m.value;
2093
+ if (h(x, p)) return i = x;
2094
+ }
2095
+ return i = p;
2096
+ }
2097
+ if (x = i, r(O, p)) return x;
2098
+ var _ = g(p);
2099
+ return h !== void 0 && h(x, _) ? x : (O = p, i = _);
2100
+ }
2101
+ var D = !1, O, i, E = v === void 0 ? null : v;
2102
+ return [function() {
2103
+ return T(f());
2104
+ }, E === null ? void 0 : function() {
2105
+ return T(E());
2106
+ }];
2107
+ }, [f, v, g, h]);
2108
+ var w = o(d, b[0], b[1]);
2109
+ return l(function() {
2110
+ m.hasValue = !0, m.value = w;
2111
+ }, [w]), a(w), w;
2112
+ }, gt;
2113
+ }
2114
+ var yt = {};
2115
+ /**
2116
+ * @license React
2117
+ * use-sync-external-store-shim/with-selector.development.js
2118
+ *
2119
+ * Copyright (c) Facebook, Inc. and its affiliates.
2120
+ *
2121
+ * This source code is licensed under the MIT license found in the
2122
+ * LICENSE file in the root directory of this source tree.
2123
+ */
2124
+ var rn;
2125
+ function ji() {
2126
+ return rn || (rn = 1, process.env.NODE_ENV !== "production" && function() {
2127
+ typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2128
+ var e = B, t = Vt;
2129
+ function n(f, v) {
2130
+ return f === v && (f !== 0 || 1 / f === 1 / v) || f !== f && v !== v;
2131
+ }
2132
+ var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, s = e.useRef, l = e.useEffect, u = e.useMemo, a = e.useDebugValue;
2133
+ function d(f, v, g, h, b) {
2134
+ var m = s(null), w;
2135
+ m.current === null ? (w = {
2136
+ hasValue: !1,
2137
+ value: null
2138
+ }, m.current = w) : w = m.current;
2139
+ var T = u(function() {
2140
+ var E = !1, p, x, _ = function(M) {
2141
+ if (!E) {
2142
+ E = !0, p = M;
2143
+ var V = h(M);
2144
+ if (b !== void 0 && w.hasValue) {
2145
+ var H = w.value;
2146
+ if (b(H, V))
2147
+ return x = H, H;
2148
+ }
2149
+ return x = V, V;
2150
+ }
2151
+ var W = p, j = x;
2152
+ if (r(W, M))
2153
+ return j;
2154
+ var P = h(M);
2155
+ return b !== void 0 && b(j, P) ? j : (p = M, x = P, P);
2156
+ }, A = g === void 0 ? null : g, R = function() {
2157
+ return _(v());
2158
+ }, N = A === null ? void 0 : function() {
2159
+ return _(A());
2160
+ };
2161
+ return [R, N];
2162
+ }, [v, g, h, b]), D = T[0], O = T[1], i = o(f, D, O);
2163
+ return l(function() {
2164
+ w.hasValue = !0, w.value = i;
2165
+ }, [i]), a(i), i;
2166
+ }
2167
+ yt.useSyncExternalStoreWithSelector = d, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
2168
+ }()), yt;
2169
+ }
2170
+ process.env.NODE_ENV === "production" ? Ni() : ji();
2171
+ process.env.NODE_ENV;
2172
+ const _n = an({
2173
+ editor: null
2174
+ });
2175
+ _n.Consumer;
2176
+ const Pi = () => on(_n), qi = (e) => {
2177
+ const [t, n] = Un(null), { editor: r } = Pi();
2178
+ return Fn(() => {
2179
+ var o;
2180
+ if (!t || !((o = e.editor) === null || o === void 0) && o.isDestroyed || r != null && r.isDestroyed)
2181
+ return;
2182
+ const { pluginKey: s = "bubbleMenu", editor: l, tippyOptions: u = {}, updateDelay: a, shouldShow: d = null } = e, f = l || r;
2183
+ if (!f) {
2184
+ console.warn("BubbleMenu component is not rendered inside of an editor component or does not have editor prop.");
2185
+ return;
2186
+ }
2187
+ const v = Cn({
2188
+ updateDelay: a,
2189
+ editor: f,
2190
+ element: t,
2191
+ pluginKey: s,
2192
+ shouldShow: d,
2193
+ tippyOptions: u
2194
+ });
2195
+ return f.registerPlugin(v), () => {
2196
+ f.unregisterPlugin(s);
2197
+ };
2198
+ }, [e.editor, r, t]), B.createElement("div", { ref: n, className: e.className, style: { visibility: "hidden" } }, e.children);
2199
+ }, Bi = an({
2200
+ onDragStart: void 0
2201
+ }), Hi = () => on(Bi);
2202
+ B.forwardRef((e, t) => {
2203
+ const { onDragStart: n } = Hi(), r = e.as || "div";
2204
+ return (
2205
+ // @ts-ignore
2206
+ B.createElement(r, { ...e, ref: t, "data-node-view-wrapper": "", onDragStart: n, style: {
2207
+ whiteSpace: "normal",
2208
+ ...e.style
2209
+ } })
2210
+ );
2211
+ });
2212
+ function Ii(e) {
2213
+ return !!(typeof e == "function" && e.prototype && e.prototype.isReactComponent);
2214
+ }
2215
+ function Wi(e) {
2216
+ var t;
2217
+ return typeof e == "object" && ((t = e.$$typeof) === null || t === void 0 ? void 0 : t.toString()) === "Symbol(react.forward_ref)";
2218
+ }
2219
+ class zi {
2220
+ /**
2221
+ * Immediately creates element and renders the provided React component.
2222
+ */
2223
+ constructor(t, { editor: n, props: r = {}, as: o = "div", className: s = "" }) {
2224
+ this.ref = null, this.id = Math.floor(Math.random() * 4294967295).toString(), this.component = t, this.editor = n, this.props = r, this.element = document.createElement(o), this.element.classList.add("react-renderer"), s && this.element.classList.add(...s.split(" ")), this.editor.isInitialized ? zn(() => {
2225
+ this.render();
2226
+ }) : this.render();
2227
+ }
2228
+ /**
2229
+ * Render the React component.
2230
+ */
2231
+ render() {
2232
+ var t;
2233
+ const n = this.component, r = this.props, o = this.editor;
2234
+ (Ii(n) || Wi(n)) && (r.ref = (s) => {
2235
+ this.ref = s;
2236
+ }), this.reactElement = B.createElement(n, { ...r }), (t = o == null ? void 0 : o.contentComponent) === null || t === void 0 || t.setRenderer(this.id, this);
2237
+ }
2238
+ /**
2239
+ * Re-renders the React component with new props.
2240
+ */
2241
+ updateProps(t = {}) {
2242
+ this.props = {
2243
+ ...this.props,
2244
+ ...t
2245
+ }, this.render();
2246
+ }
2247
+ /**
2248
+ * Destroy the React component.
2249
+ */
2250
+ destroy() {
2251
+ var t;
2252
+ const n = this.editor;
2253
+ (t = n == null ? void 0 : n.contentComponent) === null || t === void 0 || t.removeRenderer(this.id);
2254
+ }
2255
+ /**
2256
+ * Update the attributes of the element that holds the React component.
2257
+ */
2258
+ updateAttributes(t) {
2259
+ Object.keys(t).forEach((n) => {
2260
+ this.element.setAttribute(n, t[n]);
2261
+ });
2262
+ }
2263
+ }
2264
+ export {
2265
+ qi as B,
2266
+ Fi as E,
2267
+ zi as R,
2268
+ qe as t
2269
+ };