@templatical/editor 0.0.1 → 0.0.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 (130) hide show
  1. package/dist/AiChatSidebar-XBj5Rw2l.js +214 -0
  2. package/dist/AiFeatureMenu-my1mZ9DL.js +63 -0
  3. package/dist/CloudEditor-BVjgKwq3.js +940 -0
  4. package/dist/CollaboratorBar-BZq_Gv38.js +91 -0
  5. package/dist/CommentsSidebar-D9oxqO6l.js +439 -0
  6. package/dist/DesignReferenceSidebar-CyHq4SWt.js +272 -0
  7. package/dist/LoadingTrack-vK8W2PJf.js +10 -0
  8. package/dist/ModuleBrowserModal-Cus2Hdwl.js +205 -0
  9. package/dist/ModulePreviewCanvas-DaByXKY_.js +106 -0
  10. package/dist/ParagraphEditor-BSyk5B6S.js +670 -0
  11. package/dist/RichTextEditorContent-BRpjJ6SV.js +133 -0
  12. package/dist/SaveModuleDialog-BIZBQrd8.js +122 -0
  13. package/dist/SnapshotHistory-Ds1-QNbx.js +126 -0
  14. package/dist/TemplateScoringPanel-C8XSk_Ys.js +249 -0
  15. package/dist/TestEmailModal-CCVfaFgV.js +94 -0
  16. package/dist/TitleEditor-V4qaEULF.js +167 -0
  17. package/dist/TplModal-LT3FXlgs.js +44 -0
  18. package/dist/_plugin-vue_export-helper-B1-bu7yR.js +47 -0
  19. package/dist/blockTypeIcons-BujoY5Dl.js +126 -0
  20. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js +3 -0
  21. package/dist/cdn/chunks/ParagraphEditor-BkJQO-ZW.js.map +1 -0
  22. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js +2 -0
  23. package/dist/cdn/chunks/RichTextEditorContent-UGQorJm_.js.map +1 -0
  24. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js +3 -0
  25. package/dist/cdn/chunks/TitleEditor-CC3Adjai.js.map +1 -0
  26. package/dist/cdn/chunks/dist-0UheN8rK.js +1 -0
  27. package/dist/cdn/chunks/dist-55mmbGQ9.js +1 -0
  28. package/dist/cdn/chunks/dist-B31mxKyP.js +1 -0
  29. package/dist/cdn/chunks/dist-B5JI9nIg.js +1 -0
  30. package/dist/cdn/chunks/dist-B93vLKhU.js +1 -0
  31. package/dist/cdn/chunks/dist-BDt3FJvj.js +1 -0
  32. package/dist/cdn/chunks/dist-BJRuFHmi.js +1 -0
  33. package/dist/cdn/chunks/dist-BKSzrf0L.js +1 -0
  34. package/dist/cdn/chunks/dist-BL8c5gYQ.js +1 -0
  35. package/dist/cdn/chunks/dist-CYThWMP5.js +1 -0
  36. package/dist/cdn/chunks/dist-DxZbPJYt.js +1 -0
  37. package/dist/cdn/chunks/draggable-ClUwYCFL.js +17 -0
  38. package/dist/cdn/chunks/draggable-ClUwYCFL.js.map +1 -0
  39. package/dist/cdn/chunks/emojiData-6fVLNqeH.js +2 -0
  40. package/dist/cdn/chunks/emojiData-6fVLNqeH.js.map +1 -0
  41. package/dist/cdn/chunks/extensions-BfjbWqOx.js +2 -0
  42. package/dist/cdn/chunks/extensions-BfjbWqOx.js.map +1 -0
  43. package/dist/cdn/chunks/icons-vmLJTaJk.js +2 -0
  44. package/dist/cdn/chunks/icons-vmLJTaJk.js.map +1 -0
  45. package/dist/cdn/chunks/rolldown-runtime-BakkzWXw.js +1 -0
  46. package/dist/cdn/chunks/styleConstants-UTJ94gco.js +2 -0
  47. package/dist/cdn/chunks/styleConstants-UTJ94gco.js.map +1 -0
  48. package/dist/cdn/chunks/tiptap-Cya4P9CN.js +145 -0
  49. package/dist/cdn/chunks/tiptap-Cya4P9CN.js.map +1 -0
  50. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js +2 -0
  51. package/dist/cdn/chunks/useEditorCore-DRhPKq_z.js.map +1 -0
  52. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js +2 -0
  53. package/dist/cdn/chunks/useMergeTag-CBSlcqnk.js.map +1 -0
  54. package/dist/cdn/editor.css +1 -0
  55. package/dist/cdn/editor.js +2 -0
  56. package/dist/cdn/editor.js.map +1 -0
  57. package/dist/check-B7kDuZmP.js +7 -0
  58. package/dist/chevron-down-DJLW2Q9Z.js +7 -0
  59. package/dist/circle-alert-E2vYPs5r.js +25 -0
  60. package/dist/clock-lWIIQA3C.js +12 -0
  61. package/dist/de-B4Ob4vCo.js +682 -0
  62. package/dist/dist-4LiM9FDd.js +35 -0
  63. package/dist/dist-Bu7veieH.js +776 -0
  64. package/dist/dist-C1BIRHCQ.js +61 -0
  65. package/dist/dist-CG-vEqSU.js +314 -0
  66. package/dist/dist-C_ymrGFi.js +10625 -0
  67. package/dist/dist-ChAGLpWo.js +35 -0
  68. package/dist/dist-DNjZKe2Z.js +513 -0
  69. package/dist/dist-D_HQYSY-.js +189 -0
  70. package/dist/dist-DkypH7qG.js +5 -0
  71. package/dist/dist-DmOE-Ubp.js +74 -0
  72. package/dist/dist-DrvKRSU6.js +47 -0
  73. package/dist/dist-Dxnd0GRf.js +5 -0
  74. package/dist/dist-DysAFIPy.js +2054 -0
  75. package/dist/emojiData-BfWQS72m.js +17 -0
  76. package/dist/en-YXsspZJG.js +682 -0
  77. package/dist/extensions-BA4NshZQ.js +420 -0
  78. package/dist/formatRelativeTime-DX3FgqN9.js +8 -0
  79. package/dist/i18n-ikyi28RU.js +23 -0
  80. package/dist/image-up-X4xIq4ea.js +23 -0
  81. package/dist/keys-8B5MFafK.js +4 -0
  82. package/dist/liquid.browser-BemTg3sZ.js +3272 -0
  83. package/dist/loader-circle-BTQQxC3l.js +7 -0
  84. package/dist/message-circle-Blgm6V_h.js +7 -0
  85. package/dist/refresh-cw-Bb4PEeW1.js +44 -0
  86. package/dist/scan-line-7lZPfOdm.js +25 -0
  87. package/dist/send-C0ltAQrv.js +10 -0
  88. package/dist/shield-check-f-qv4RKs.js +10 -0
  89. package/dist/sparkles-KhBCGlqB.js +23 -0
  90. package/dist/styleConstants-CgtFM9hQ.js +43 -0
  91. package/dist/styles-hQgJKM4i.js +3406 -0
  92. package/dist/templatical-editor.css +2 -1
  93. package/dist/templatical-editor.js +242 -9
  94. package/dist/templatical-editor.umd.cjs +112 -524
  95. package/dist/timeouts-CmBrLeZA.js +4 -0
  96. package/dist/trash-2-OwjZ-guZ.js +25 -0
  97. package/dist/triangle-alert-DOSRIUYZ.js +17 -0
  98. package/dist/useEditorCore-DVp5qmtC.js +5552 -0
  99. package/dist/useI18n-DzH4KXDk.js +17 -0
  100. package/dist/useMergeTag-D9zQVE-e.js +33 -0
  101. package/dist/x-CGlq2XQe.js +10 -0
  102. package/package.json +30 -20
  103. package/dist/AiChatSidebar-0vx9TP5B.js +0 -305
  104. package/dist/AiFeatureMenu-CI-v74ND.js +0 -69
  105. package/dist/CloudEditor-Wdfv_9xn.js +0 -1132
  106. package/dist/CollaboratorBar-B3uV4Wtw.js +0 -89
  107. package/dist/CommentsSidebar-PVUlloyB.js +0 -655
  108. package/dist/DesignReferenceSidebar-DAlAWrxU.js +0 -351
  109. package/dist/ModuleBrowserModal-1JEcChd8.js +0 -323
  110. package/dist/ModulePreviewCanvas-Cdp484Ae.js +0 -169
  111. package/dist/SaveModuleDialog-eNyr3XKn.js +0 -168
  112. package/dist/SnapshotHistory-D-ZiIj1v.js +0 -169
  113. package/dist/TemplateScoringPanel-DSZPo15C.js +0 -385
  114. package/dist/TestEmailModal-Cwre5elw.js +0 -128
  115. package/dist/TextEditor-BuUOIByX.js +0 -780
  116. package/dist/de-BWIAblxs.js +0 -685
  117. package/dist/en-cYyUzNV1.js +0 -685
  118. package/dist/index-0tWUczNu.js +0 -47
  119. package/dist/index-4okvXjqk.js +0 -41
  120. package/dist/index-BSc6h5zo.js +0 -967
  121. package/dist/index-CrvwWlhN.js +0 -41
  122. package/dist/index-D-iD-7lO.js +0 -10961
  123. package/dist/index-D-ygXbc8.js +0 -2452
  124. package/dist/index-DbrWKz-e.js +0 -1415
  125. package/dist/index-DeUeHy6g.js +0 -422
  126. package/dist/index-Ude6e9RU.js +0 -41
  127. package/dist/index-ZQzHBwkr.js +0 -12767
  128. package/dist/liquid.browser-CeNxS2GL.js +0 -3493
  129. package/dist/loader-circle-tM9j2mRh.js +0 -13
  130. package/dist/shield-check-Ngi9jAQc.js +0 -20
@@ -1,2452 +0,0 @@
1
- import { P as tn, c as nn, x as Bn, o as kn, y as rn, E as on, z as Vn, A as _n, B as In, C as Fn } from "./index-ZQzHBwkr.js";
2
- import { G as qi, I as Ki, M as zi, N as Yi, H as Xi, v as Gi, J as Ji, h as Qi, l as Zi, p as eo, K as to, L as no, O as ro, Q as io, R as oo, U as ao, V as so, W as uo, X as po, Y as lo, r as co, Z as fo, _ as vo, $ as ho, a0 as mo, a1 as go, a2 as yo, a3 as bo, u as wo, a4 as Oo, q as xo, a5 as Eo, i as To, a6 as Co, a7 as Do, a8 as Ao, a9 as So, s as Po, aa as No, ab as Mo, ac as Ro, ad as Lo, ae as jo, af as Ho, ag as Bo, ah as ko, ai as Vo, aj as _o, ak as Io, al as Fo, am as $o, an as Wo, ao as Uo, ap as qo, aq as Ko, ar as zo, as as Yo, at as Xo, au as Go, av as Jo, aw as Qo, ax as Zo, ay as ea, az as ta, aA as na, aB as ra, aC as ia, aD as oa, b as aa, a as sa, m as ua, aE as pa, aF as la, n as da, aG as ca, aH as fa, aI as va, aJ as ha, aK as ma, aL as ga, aM as ya, aN as ba, aO as wa, aP as Oa, t as xa, w as Ea } from "./index-ZQzHBwkr.js";
3
- import { defineComponent as Pe, ref as pt, onMounted as Et, onBeforeUnmount as lt, h as Ne, markRaw as an, getCurrentInstance as $n, watchEffect as Wn, nextTick as Un, unref as qn, reactive as Kn, render as Lt, shallowRef as zn, customRef as Yn, provide as jt } from "vue";
4
- var _ = "top", z = "bottom", Y = "right", I = "left", Tt = "auto", qe = [_, z, Y, I], Ce = "start", Fe = "end", Xn = "clippingParents", sn = "viewport", ke = "popper", Gn = "reference", Ht = /* @__PURE__ */ qe.reduce(function(t, e) {
5
- return t.concat([e + "-" + Ce, e + "-" + Fe]);
6
- }, []), un = /* @__PURE__ */ [].concat(qe, [Tt]).reduce(function(t, e) {
7
- return t.concat([e, e + "-" + Ce, e + "-" + Fe]);
8
- }, []), Jn = "beforeRead", Qn = "read", Zn = "afterRead", er = "beforeMain", tr = "main", nr = "afterMain", rr = "beforeWrite", ir = "write", or = "afterWrite", ar = [Jn, Qn, Zn, er, tr, nr, rr, ir, or];
9
- function te(t) {
10
- return t ? (t.nodeName || "").toLowerCase() : null;
11
- }
12
- function U(t) {
13
- if (t == null)
14
- return window;
15
- if (t.toString() !== "[object Window]") {
16
- var e = t.ownerDocument;
17
- return e && e.defaultView || window;
18
- }
19
- return t;
20
- }
21
- function ge(t) {
22
- var e = U(t).Element;
23
- return t instanceof e || t instanceof Element;
24
- }
25
- function K(t) {
26
- var e = U(t).HTMLElement;
27
- return t instanceof e || t instanceof HTMLElement;
28
- }
29
- function Ct(t) {
30
- if (typeof ShadowRoot > "u")
31
- return !1;
32
- var e = U(t).ShadowRoot;
33
- return t instanceof e || t instanceof ShadowRoot;
34
- }
35
- function sr(t) {
36
- var e = t.state;
37
- Object.keys(e.elements).forEach(function(n) {
38
- var r = e.styles[n] || {}, i = e.attributes[n] || {}, a = e.elements[n];
39
- !K(a) || !te(a) || (Object.assign(a.style, r), Object.keys(i).forEach(function(s) {
40
- var u = i[s];
41
- u === !1 ? a.removeAttribute(s) : a.setAttribute(s, u === !0 ? "" : u);
42
- }));
43
- });
44
- }
45
- function ur(t) {
46
- var e = t.state, n = {
47
- popper: {
48
- position: e.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(e.elements.popper.style, n.popper), e.styles = n, e.elements.arrow && Object.assign(e.elements.arrow.style, n.arrow), function() {
59
- Object.keys(e.elements).forEach(function(r) {
60
- var i = e.elements[r], a = e.attributes[r] || {}, s = Object.keys(e.styles.hasOwnProperty(r) ? e.styles[r] : n[r]), u = s.reduce(function(p, c) {
61
- return p[c] = "", p;
62
- }, {});
63
- !K(i) || !te(i) || (Object.assign(i.style, u), Object.keys(a).forEach(function(p) {
64
- i.removeAttribute(p);
65
- }));
66
- });
67
- };
68
- }
69
- const pn = {
70
- name: "applyStyles",
71
- enabled: !0,
72
- phase: "write",
73
- fn: sr,
74
- effect: ur,
75
- requires: ["computeStyles"]
76
- };
77
- function ee(t) {
78
- return t.split("-")[0];
79
- }
80
- var me = Math.max, st = Math.min, De = Math.round;
81
- function yt() {
82
- var t = navigator.userAgentData;
83
- return t != null && t.brands && Array.isArray(t.brands) ? t.brands.map(function(e) {
84
- return e.brand + "/" + e.version;
85
- }).join(" ") : navigator.userAgent;
86
- }
87
- function ln() {
88
- return !/^((?!chrome|android).)*safari/i.test(yt());
89
- }
90
- function Ae(t, e, n) {
91
- e === void 0 && (e = !1), n === void 0 && (n = !1);
92
- var r = t.getBoundingClientRect(), i = 1, a = 1;
93
- e && K(t) && (i = t.offsetWidth > 0 && De(r.width) / t.offsetWidth || 1, a = t.offsetHeight > 0 && De(r.height) / t.offsetHeight || 1);
94
- var s = ge(t) ? U(t) : window, u = s.visualViewport, p = !ln() && n, c = (r.left + (p && u ? u.offsetLeft : 0)) / i, d = (r.top + (p && u ? u.offsetTop : 0)) / a, g = r.width / i, y = r.height / a;
95
- return {
96
- width: g,
97
- height: y,
98
- top: d,
99
- right: c + g,
100
- bottom: d + y,
101
- left: c,
102
- x: c,
103
- y: d
104
- };
105
- }
106
- function Dt(t) {
107
- var e = Ae(t), n = t.offsetWidth, r = t.offsetHeight;
108
- return Math.abs(e.width - n) <= 1 && (n = e.width), Math.abs(e.height - r) <= 1 && (r = e.height), {
109
- x: t.offsetLeft,
110
- y: t.offsetTop,
111
- width: n,
112
- height: r
113
- };
114
- }
115
- function dn(t, e) {
116
- var n = e.getRootNode && e.getRootNode();
117
- if (t.contains(e))
118
- return !0;
119
- if (n && Ct(n)) {
120
- var r = e;
121
- do {
122
- if (r && t.isSameNode(r))
123
- return !0;
124
- r = r.parentNode || r.host;
125
- } while (r);
126
- }
127
- return !1;
128
- }
129
- function se(t) {
130
- return U(t).getComputedStyle(t);
131
- }
132
- function pr(t) {
133
- return ["table", "td", "th"].indexOf(te(t)) >= 0;
134
- }
135
- function le(t) {
136
- return ((ge(t) ? t.ownerDocument : (
137
- // $FlowFixMe[prop-missing]
138
- t.document
139
- )) || window.document).documentElement;
140
- }
141
- function dt(t) {
142
- return te(t) === "html" ? t : (
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
- t.assignedSlot || // step into the shadow DOM of the parent of a slotted node
147
- t.parentNode || // DOM Element detected
148
- (Ct(t) ? t.host : null) || // ShadowRoot detected
149
- // $FlowFixMe[incompatible-call]: HTMLElement is a Node
150
- le(t)
151
- );
152
- }
153
- function Bt(t) {
154
- return !K(t) || // https://github.com/popperjs/popper-core/issues/837
155
- se(t).position === "fixed" ? null : t.offsetParent;
156
- }
157
- function lr(t) {
158
- var e = /firefox/i.test(yt()), n = /Trident/i.test(yt());
159
- if (n && K(t)) {
160
- var r = se(t);
161
- if (r.position === "fixed")
162
- return null;
163
- }
164
- var i = dt(t);
165
- for (Ct(i) && (i = i.host); K(i) && ["html", "body"].indexOf(te(i)) < 0; ) {
166
- var a = se(i);
167
- if (a.transform !== "none" || a.perspective !== "none" || a.contain === "paint" || ["transform", "perspective"].indexOf(a.willChange) !== -1 || e && a.willChange === "filter" || e && a.filter && a.filter !== "none")
168
- return i;
169
- i = i.parentNode;
170
- }
171
- return null;
172
- }
173
- function Ke(t) {
174
- for (var e = U(t), n = Bt(t); n && pr(n) && se(n).position === "static"; )
175
- n = Bt(n);
176
- return n && (te(n) === "html" || te(n) === "body" && se(n).position === "static") ? e : n || lr(t) || e;
177
- }
178
- function At(t) {
179
- return ["top", "bottom"].indexOf(t) >= 0 ? "x" : "y";
180
- }
181
- function Ve(t, e, n) {
182
- return me(t, st(e, n));
183
- }
184
- function dr(t, e, n) {
185
- var r = Ve(t, e, n);
186
- return r > n ? n : r;
187
- }
188
- function cn() {
189
- return {
190
- top: 0,
191
- right: 0,
192
- bottom: 0,
193
- left: 0
194
- };
195
- }
196
- function fn(t) {
197
- return Object.assign({}, cn(), t);
198
- }
199
- function vn(t, e) {
200
- return e.reduce(function(n, r) {
201
- return n[r] = t, n;
202
- }, {});
203
- }
204
- var cr = function(e, n) {
205
- return e = typeof e == "function" ? e(Object.assign({}, n.rects, {
206
- placement: n.placement
207
- })) : e, fn(typeof e != "number" ? e : vn(e, qe));
208
- };
209
- function fr(t) {
210
- var e, n = t.state, r = t.name, i = t.options, a = n.elements.arrow, s = n.modifiersData.popperOffsets, u = ee(n.placement), p = At(u), c = [I, Y].indexOf(u) >= 0, d = c ? "height" : "width";
211
- if (!(!a || !s)) {
212
- var g = cr(i.padding, n), y = Dt(a), h = p === "y" ? _ : I, b = p === "y" ? z : Y, w = n.rects.reference[d] + n.rects.reference[p] - s[p] - n.rects.popper[d], O = s[p] - n.rects.reference[p], T = Ke(a), C = T ? p === "y" ? T.clientHeight || 0 : T.clientWidth || 0 : 0, S = w / 2 - O / 2, o = g[h], E = C - y[d] - g[b], f = C / 2 - y[d] / 2 + S, A = Ve(o, f, E), L = p;
213
- n.modifiersData[r] = (e = {}, e[L] = A, e.centerOffset = A - f, e);
214
- }
215
- }
216
- function vr(t) {
217
- var e = t.state, n = t.options, r = n.element, i = r === void 0 ? "[data-popper-arrow]" : r;
218
- i != null && (typeof i == "string" && (i = e.elements.popper.querySelector(i), !i) || dn(e.elements.popper, i) && (e.elements.arrow = i));
219
- }
220
- const hr = {
221
- name: "arrow",
222
- enabled: !0,
223
- phase: "main",
224
- fn: fr,
225
- effect: vr,
226
- requires: ["popperOffsets"],
227
- requiresIfExists: ["preventOverflow"]
228
- };
229
- function Se(t) {
230
- return t.split("-")[1];
231
- }
232
- var mr = {
233
- top: "auto",
234
- right: "auto",
235
- bottom: "auto",
236
- left: "auto"
237
- };
238
- function gr(t, e) {
239
- var n = t.x, r = t.y, i = e.devicePixelRatio || 1;
240
- return {
241
- x: De(n * i) / i || 0,
242
- y: De(r * i) / i || 0
243
- };
244
- }
245
- function kt(t) {
246
- var e, n = t.popper, r = t.popperRect, i = t.placement, a = t.variation, s = t.offsets, u = t.position, p = t.gpuAcceleration, c = t.adaptive, d = t.roundOffsets, g = t.isFixed, y = s.x, h = y === void 0 ? 0 : y, b = s.y, w = b === void 0 ? 0 : b, O = typeof d == "function" ? d({
247
- x: h,
248
- y: w
249
- }) : {
250
- x: h,
251
- y: w
252
- };
253
- h = O.x, w = O.y;
254
- var T = s.hasOwnProperty("x"), C = s.hasOwnProperty("y"), S = I, o = _, E = window;
255
- if (c) {
256
- var f = Ke(n), A = "clientHeight", L = "clientWidth";
257
- if (f === U(n) && (f = le(n), se(f).position !== "static" && u === "absolute" && (A = "scrollHeight", L = "scrollWidth")), f = f, i === _ || (i === I || i === Y) && a === Fe) {
258
- o = z;
259
- var R = g && f === E && E.visualViewport ? E.visualViewport.height : (
260
- // $FlowFixMe[prop-missing]
261
- f[A]
262
- );
263
- w -= R - r.height, w *= p ? 1 : -1;
264
- }
265
- if (i === I || (i === _ || i === z) && a === Fe) {
266
- S = Y;
267
- var N = g && f === E && E.visualViewport ? E.visualViewport.width : (
268
- // $FlowFixMe[prop-missing]
269
- f[L]
270
- );
271
- h -= N - r.width, h *= p ? 1 : -1;
272
- }
273
- }
274
- var j = Object.assign({
275
- position: u
276
- }, c && mr), M = d === !0 ? gr({
277
- x: h,
278
- y: w
279
- }, U(n)) : {
280
- x: h,
281
- y: w
282
- };
283
- if (h = M.x, w = M.y, p) {
284
- var P;
285
- return Object.assign({}, j, (P = {}, P[o] = C ? "0" : "", P[S] = T ? "0" : "", P.transform = (E.devicePixelRatio || 1) <= 1 ? "translate(" + h + "px, " + w + "px)" : "translate3d(" + h + "px, " + w + "px, 0)", P));
286
- }
287
- return Object.assign({}, j, (e = {}, e[o] = C ? w + "px" : "", e[S] = T ? h + "px" : "", e.transform = "", e));
288
- }
289
- function yr(t) {
290
- var e = t.state, n = t.options, r = n.gpuAcceleration, i = r === void 0 ? !0 : r, a = n.adaptive, s = a === void 0 ? !0 : a, u = n.roundOffsets, p = u === void 0 ? !0 : u, c = {
291
- placement: ee(e.placement),
292
- variation: Se(e.placement),
293
- popper: e.elements.popper,
294
- popperRect: e.rects.popper,
295
- gpuAcceleration: i,
296
- isFixed: e.options.strategy === "fixed"
297
- };
298
- e.modifiersData.popperOffsets != null && (e.styles.popper = Object.assign({}, e.styles.popper, kt(Object.assign({}, c, {
299
- offsets: e.modifiersData.popperOffsets,
300
- position: e.options.strategy,
301
- adaptive: s,
302
- roundOffsets: p
303
- })))), e.modifiersData.arrow != null && (e.styles.arrow = Object.assign({}, e.styles.arrow, kt(Object.assign({}, c, {
304
- offsets: e.modifiersData.arrow,
305
- position: "absolute",
306
- adaptive: !1,
307
- roundOffsets: p
308
- })))), e.attributes.popper = Object.assign({}, e.attributes.popper, {
309
- "data-popper-placement": e.placement
310
- });
311
- }
312
- const br = {
313
- name: "computeStyles",
314
- enabled: !0,
315
- phase: "beforeWrite",
316
- fn: yr,
317
- data: {}
318
- };
319
- var it = {
320
- passive: !0
321
- };
322
- function wr(t) {
323
- var e = t.state, n = t.instance, r = t.options, i = r.scroll, a = i === void 0 ? !0 : i, s = r.resize, u = s === void 0 ? !0 : s, p = U(e.elements.popper), c = [].concat(e.scrollParents.reference, e.scrollParents.popper);
324
- return a && c.forEach(function(d) {
325
- d.addEventListener("scroll", n.update, it);
326
- }), u && p.addEventListener("resize", n.update, it), function() {
327
- a && c.forEach(function(d) {
328
- d.removeEventListener("scroll", n.update, it);
329
- }), u && p.removeEventListener("resize", n.update, it);
330
- };
331
- }
332
- const Or = {
333
- name: "eventListeners",
334
- enabled: !0,
335
- phase: "write",
336
- fn: function() {
337
- },
338
- effect: wr,
339
- data: {}
340
- };
341
- var xr = {
342
- left: "right",
343
- right: "left",
344
- bottom: "top",
345
- top: "bottom"
346
- };
347
- function at(t) {
348
- return t.replace(/left|right|bottom|top/g, function(e) {
349
- return xr[e];
350
- });
351
- }
352
- var Er = {
353
- start: "end",
354
- end: "start"
355
- };
356
- function Vt(t) {
357
- return t.replace(/start|end/g, function(e) {
358
- return Er[e];
359
- });
360
- }
361
- function St(t) {
362
- var e = U(t), n = e.pageXOffset, r = e.pageYOffset;
363
- return {
364
- scrollLeft: n,
365
- scrollTop: r
366
- };
367
- }
368
- function Pt(t) {
369
- return Ae(le(t)).left + St(t).scrollLeft;
370
- }
371
- function Tr(t, e) {
372
- var n = U(t), r = le(t), i = n.visualViewport, a = r.clientWidth, s = r.clientHeight, u = 0, p = 0;
373
- if (i) {
374
- a = i.width, s = i.height;
375
- var c = ln();
376
- (c || !c && e === "fixed") && (u = i.offsetLeft, p = i.offsetTop);
377
- }
378
- return {
379
- width: a,
380
- height: s,
381
- x: u + Pt(t),
382
- y: p
383
- };
384
- }
385
- function Cr(t) {
386
- var e, n = le(t), r = St(t), i = (e = t.ownerDocument) == null ? void 0 : e.body, a = me(n.scrollWidth, n.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), s = me(n.scrollHeight, n.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), u = -r.scrollLeft + Pt(t), p = -r.scrollTop;
387
- return se(i || n).direction === "rtl" && (u += me(n.clientWidth, i ? i.clientWidth : 0) - a), {
388
- width: a,
389
- height: s,
390
- x: u,
391
- y: p
392
- };
393
- }
394
- function Nt(t) {
395
- var e = se(t), n = e.overflow, r = e.overflowX, i = e.overflowY;
396
- return /auto|scroll|overlay|hidden/.test(n + i + r);
397
- }
398
- function hn(t) {
399
- return ["html", "body", "#document"].indexOf(te(t)) >= 0 ? t.ownerDocument.body : K(t) && Nt(t) ? t : hn(dt(t));
400
- }
401
- function _e(t, e) {
402
- var n;
403
- e === void 0 && (e = []);
404
- var r = hn(t), i = r === ((n = t.ownerDocument) == null ? void 0 : n.body), a = U(r), s = i ? [a].concat(a.visualViewport || [], Nt(r) ? r : []) : r, u = e.concat(s);
405
- return i ? u : (
406
- // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
407
- u.concat(_e(dt(s)))
408
- );
409
- }
410
- function bt(t) {
411
- return Object.assign({}, t, {
412
- left: t.x,
413
- top: t.y,
414
- right: t.x + t.width,
415
- bottom: t.y + t.height
416
- });
417
- }
418
- function Dr(t, e) {
419
- var n = Ae(t, !1, e === "fixed");
420
- return n.top = n.top + t.clientTop, n.left = n.left + t.clientLeft, n.bottom = n.top + t.clientHeight, n.right = n.left + t.clientWidth, n.width = t.clientWidth, n.height = t.clientHeight, n.x = n.left, n.y = n.top, n;
421
- }
422
- function _t(t, e, n) {
423
- return e === sn ? bt(Tr(t, n)) : ge(e) ? Dr(e, n) : bt(Cr(le(t)));
424
- }
425
- function Ar(t) {
426
- var e = _e(dt(t)), n = ["absolute", "fixed"].indexOf(se(t).position) >= 0, r = n && K(t) ? Ke(t) : t;
427
- return ge(r) ? e.filter(function(i) {
428
- return ge(i) && dn(i, r) && te(i) !== "body";
429
- }) : [];
430
- }
431
- function Sr(t, e, n, r) {
432
- var i = e === "clippingParents" ? Ar(t) : [].concat(e), a = [].concat(i, [n]), s = a[0], u = a.reduce(function(p, c) {
433
- var d = _t(t, c, r);
434
- return p.top = me(d.top, p.top), p.right = st(d.right, p.right), p.bottom = st(d.bottom, p.bottom), p.left = me(d.left, p.left), p;
435
- }, _t(t, s, 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(t) {
439
- var e = t.reference, n = t.element, r = t.placement, i = r ? ee(r) : null, a = r ? Se(r) : null, s = e.x + e.width / 2 - n.width / 2, u = e.y + e.height / 2 - n.height / 2, p;
440
- switch (i) {
441
- case _:
442
- p = {
443
- x: s,
444
- y: e.y - n.height
445
- };
446
- break;
447
- case z:
448
- p = {
449
- x: s,
450
- y: e.y + e.height
451
- };
452
- break;
453
- case Y:
454
- p = {
455
- x: e.x + e.width,
456
- y: u
457
- };
458
- break;
459
- case I:
460
- p = {
461
- x: e.x - n.width,
462
- y: u
463
- };
464
- break;
465
- default:
466
- p = {
467
- x: e.x,
468
- y: e.y
469
- };
470
- }
471
- var c = i ? At(i) : null;
472
- if (c != null) {
473
- var d = c === "y" ? "height" : "width";
474
- switch (a) {
475
- case Ce:
476
- p[c] = p[c] - (e[d] / 2 - n[d] / 2);
477
- break;
478
- case Fe:
479
- p[c] = p[c] + (e[d] / 2 - n[d] / 2);
480
- break;
481
- }
482
- }
483
- return p;
484
- }
485
- function $e(t, e) {
486
- e === void 0 && (e = {});
487
- var n = e, r = n.placement, i = r === void 0 ? t.placement : r, a = n.strategy, s = a === void 0 ? t.strategy : a, u = n.boundary, p = u === void 0 ? Xn : u, c = n.rootBoundary, d = c === void 0 ? sn : c, g = n.elementContext, y = g === void 0 ? ke : g, h = n.altBoundary, b = h === void 0 ? !1 : h, w = n.padding, O = w === void 0 ? 0 : w, T = fn(typeof O != "number" ? O : vn(O, qe)), C = y === ke ? Gn : ke, S = t.rects.popper, o = t.elements[b ? C : y], E = Sr(ge(o) ? o : o.contextElement || le(t.elements.popper), p, d, s), f = Ae(t.elements.reference), A = mn({
488
- reference: f,
489
- element: S,
490
- placement: i
491
- }), L = bt(Object.assign({}, S, A)), R = y === ke ? L : f, N = {
492
- top: E.top - R.top + T.top,
493
- bottom: R.bottom - E.bottom + T.bottom,
494
- left: E.left - R.left + T.left,
495
- right: R.right - E.right + T.right
496
- }, j = t.modifiersData.offset;
497
- if (y === ke && j) {
498
- var M = j[i];
499
- Object.keys(N).forEach(function(P) {
500
- var F = [Y, z].indexOf(P) >= 0 ? 1 : -1, $ = [_, z].indexOf(P) >= 0 ? "y" : "x";
501
- N[P] += M[$] * F;
502
- });
503
- }
504
- return N;
505
- }
506
- function Pr(t, e) {
507
- e === void 0 && (e = {});
508
- var n = e, r = n.placement, i = n.boundary, a = n.rootBoundary, s = n.padding, u = n.flipVariations, p = n.allowedAutoPlacements, c = p === void 0 ? un : p, d = Se(r), g = d ? u ? Ht : Ht.filter(function(b) {
509
- return Se(b) === d;
510
- }) : qe, y = g.filter(function(b) {
511
- return c.indexOf(b) >= 0;
512
- });
513
- y.length === 0 && (y = g);
514
- var h = y.reduce(function(b, w) {
515
- return b[w] = $e(t, {
516
- placement: w,
517
- boundary: i,
518
- rootBoundary: a,
519
- padding: s
520
- })[ee(w)], b;
521
- }, {});
522
- return Object.keys(h).sort(function(b, w) {
523
- return h[b] - h[w];
524
- });
525
- }
526
- function Nr(t) {
527
- if (ee(t) === Tt)
528
- return [];
529
- var e = at(t);
530
- return [Vt(t), e, Vt(e)];
531
- }
532
- function Mr(t) {
533
- var e = t.state, n = t.options, r = t.name;
534
- if (!e.modifiersData[r]._skip) {
535
- for (var i = n.mainAxis, a = i === void 0 ? !0 : i, s = n.altAxis, u = s === void 0 ? !0 : s, p = n.fallbackPlacements, c = n.padding, d = n.boundary, g = n.rootBoundary, y = n.altBoundary, h = n.flipVariations, b = h === void 0 ? !0 : h, w = n.allowedAutoPlacements, O = e.options.placement, T = ee(O), C = T === O, S = p || (C || !b ? [at(O)] : Nr(O)), o = [O].concat(S).reduce(function(ne, X) {
536
- return ne.concat(ee(X) === Tt ? Pr(e, {
537
- placement: X,
538
- boundary: d,
539
- rootBoundary: g,
540
- padding: c,
541
- flipVariations: b,
542
- allowedAutoPlacements: w
543
- }) : X);
544
- }, []), E = e.rects.reference, f = e.rects.popper, A = /* @__PURE__ */ new Map(), L = !0, R = o[0], N = 0; N < o.length; N++) {
545
- var j = o[N], M = ee(j), P = Se(j) === Ce, F = [_, z].indexOf(M) >= 0, $ = F ? "width" : "height", B = $e(e, {
546
- placement: j,
547
- boundary: d,
548
- rootBoundary: g,
549
- altBoundary: y,
550
- padding: c
551
- }), k = F ? P ? Y : I : P ? z : _;
552
- E[$] > f[$] && (k = at(k));
553
- var H = at(k), G = [];
554
- if (a && G.push(B[M] <= 0), u && G.push(B[k] <= 0, B[H] <= 0), G.every(function(ne) {
555
- return ne;
556
- })) {
557
- R = j, L = !1;
558
- break;
559
- }
560
- A.set(j, G);
561
- }
562
- if (L)
563
- for (var J = b ? 3 : 1, de = function(X) {
564
- var re = o.find(function(ye) {
565
- var ie = A.get(ye);
566
- if (ie)
567
- return ie.slice(0, X).every(function(be) {
568
- return be;
569
- });
570
- });
571
- if (re)
572
- return R = re, "break";
573
- }, Q = J; Q > 0; Q--) {
574
- var ce = de(Q);
575
- if (ce === "break") break;
576
- }
577
- e.placement !== R && (e.modifiersData[r]._skip = !0, e.placement = R, e.reset = !0);
578
- }
579
- }
580
- const Rr = {
581
- name: "flip",
582
- enabled: !0,
583
- phase: "main",
584
- fn: Mr,
585
- requiresIfExists: ["offset"],
586
- data: {
587
- _skip: !1
588
- }
589
- };
590
- function It(t, e, n) {
591
- return n === void 0 && (n = {
592
- x: 0,
593
- y: 0
594
- }), {
595
- top: t.top - e.height - n.y,
596
- right: t.right - e.width + n.x,
597
- bottom: t.bottom - e.height + n.y,
598
- left: t.left - e.width - n.x
599
- };
600
- }
601
- function Ft(t) {
602
- return [_, Y, z, I].some(function(e) {
603
- return t[e] >= 0;
604
- });
605
- }
606
- function Lr(t) {
607
- var e = t.state, n = t.name, r = e.rects.reference, i = e.rects.popper, a = e.modifiersData.preventOverflow, s = $e(e, {
608
- elementContext: "reference"
609
- }), u = $e(e, {
610
- altBoundary: !0
611
- }), p = It(s, r), c = It(u, i, a), d = Ft(p), g = Ft(c);
612
- e.modifiersData[n] = {
613
- referenceClippingOffsets: p,
614
- popperEscapeOffsets: c,
615
- isReferenceHidden: d,
616
- hasPopperEscaped: g
617
- }, e.attributes.popper = Object.assign({}, e.attributes.popper, {
618
- "data-popper-reference-hidden": d,
619
- "data-popper-escaped": g
620
- });
621
- }
622
- const jr = {
623
- name: "hide",
624
- enabled: !0,
625
- phase: "main",
626
- requiresIfExists: ["preventOverflow"],
627
- fn: Lr
628
- };
629
- function Hr(t, e, n) {
630
- var r = ee(t), i = [I, _].indexOf(r) >= 0 ? -1 : 1, a = typeof n == "function" ? n(Object.assign({}, e, {
631
- placement: t
632
- })) : n, s = a[0], u = a[1];
633
- return s = s || 0, u = (u || 0) * i, [I, Y].indexOf(r) >= 0 ? {
634
- x: u,
635
- y: s
636
- } : {
637
- x: s,
638
- y: u
639
- };
640
- }
641
- function Br(t) {
642
- var e = t.state, n = t.options, r = t.name, i = n.offset, a = i === void 0 ? [0, 0] : i, s = un.reduce(function(d, g) {
643
- return d[g] = Hr(g, e.rects, a), d;
644
- }, {}), u = s[e.placement], p = u.x, c = u.y;
645
- e.modifiersData.popperOffsets != null && (e.modifiersData.popperOffsets.x += p, e.modifiersData.popperOffsets.y += c), e.modifiersData[r] = s;
646
- }
647
- const kr = {
648
- name: "offset",
649
- enabled: !0,
650
- phase: "main",
651
- requires: ["popperOffsets"],
652
- fn: Br
653
- };
654
- function Vr(t) {
655
- var e = t.state, n = t.name;
656
- e.modifiersData[n] = mn({
657
- reference: e.rects.reference,
658
- element: e.rects.popper,
659
- placement: e.placement
660
- });
661
- }
662
- const _r = {
663
- name: "popperOffsets",
664
- enabled: !0,
665
- phase: "read",
666
- fn: Vr,
667
- data: {}
668
- };
669
- function Ir(t) {
670
- return t === "x" ? "y" : "x";
671
- }
672
- function Fr(t) {
673
- var e = t.state, n = t.options, r = t.name, i = n.mainAxis, a = i === void 0 ? !0 : i, s = n.altAxis, u = s === void 0 ? !1 : s, p = n.boundary, c = n.rootBoundary, d = n.altBoundary, g = n.padding, y = n.tether, h = y === void 0 ? !0 : y, b = n.tetherOffset, w = b === void 0 ? 0 : b, O = $e(e, {
674
- boundary: p,
675
- rootBoundary: c,
676
- padding: g,
677
- altBoundary: d
678
- }), T = ee(e.placement), C = Se(e.placement), S = !C, o = At(T), E = Ir(o), f = e.modifiersData.popperOffsets, A = e.rects.reference, L = e.rects.popper, R = typeof w == "function" ? w(Object.assign({}, e.rects, {
679
- placement: e.placement
680
- })) : w, N = typeof R == "number" ? {
681
- mainAxis: R,
682
- altAxis: R
683
- } : Object.assign({
684
- mainAxis: 0,
685
- altAxis: 0
686
- }, R), j = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, M = {
687
- x: 0,
688
- y: 0
689
- };
690
- if (f) {
691
- if (a) {
692
- var P, F = o === "y" ? _ : I, $ = o === "y" ? z : Y, B = o === "y" ? "height" : "width", k = f[o], H = k + O[F], G = k - O[$], J = h ? -L[B] / 2 : 0, de = C === Ce ? A[B] : L[B], Q = C === Ce ? -L[B] : -A[B], ce = e.elements.arrow, ne = h && ce ? Dt(ce) : {
693
- width: 0,
694
- height: 0
695
- }, X = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : cn(), re = X[F], ye = X[$], ie = Ve(0, A[B], ne[B]), be = S ? A[B] / 2 - J - ie - re - N.mainAxis : de - ie - re - N.mainAxis, ue = S ? -A[B] / 2 + J + ie + ye + N.mainAxis : Q + ie + ye + N.mainAxis, we = e.elements.arrow && Ke(e.elements.arrow), ze = we ? o === "y" ? we.clientTop || 0 : we.clientLeft || 0 : 0, Re = (P = j == null ? void 0 : j[o]) != null ? P : 0, Ye = k + be - Re - ze, Xe = k + ue - Re, Le = Ve(h ? st(H, Ye) : H, k, h ? me(G, Xe) : G);
696
- f[o] = Le, M[o] = Le - k;
697
- }
698
- if (u) {
699
- var je, Ge = o === "x" ? _ : I, Je = o === "x" ? z : Y, oe = f[E], pe = E === "y" ? "height" : "width", He = oe + O[Ge], fe = oe - O[Je], Be = [_, I].indexOf(T) !== -1, Qe = (je = j == null ? void 0 : j[E]) != null ? je : 0, Ze = Be ? He : oe - A[pe] - L[pe] - Qe + N.altAxis, et = Be ? oe + A[pe] + L[pe] - Qe - N.altAxis : fe, tt = h && Be ? dr(Ze, oe, et) : Ve(h ? Ze : He, oe, h ? et : fe);
700
- f[E] = tt, M[E] = tt - oe;
701
- }
702
- e.modifiersData[r] = M;
703
- }
704
- }
705
- const $r = {
706
- name: "preventOverflow",
707
- enabled: !0,
708
- phase: "main",
709
- fn: Fr,
710
- requiresIfExists: ["offset"]
711
- };
712
- function Wr(t) {
713
- return {
714
- scrollLeft: t.scrollLeft,
715
- scrollTop: t.scrollTop
716
- };
717
- }
718
- function Ur(t) {
719
- return t === U(t) || !K(t) ? St(t) : Wr(t);
720
- }
721
- function qr(t) {
722
- var e = t.getBoundingClientRect(), n = De(e.width) / t.offsetWidth || 1, r = De(e.height) / t.offsetHeight || 1;
723
- return n !== 1 || r !== 1;
724
- }
725
- function Kr(t, e, n) {
726
- n === void 0 && (n = !1);
727
- var r = K(e), i = K(e) && qr(e), a = le(e), s = Ae(t, i, n), u = {
728
- scrollLeft: 0,
729
- scrollTop: 0
730
- }, p = {
731
- x: 0,
732
- y: 0
733
- };
734
- return (r || !r && !n) && ((te(e) !== "body" || // https://github.com/popperjs/popper-core/issues/1078
735
- Nt(a)) && (u = Ur(e)), K(e) ? (p = Ae(e, !0), p.x += e.clientLeft, p.y += e.clientTop) : a && (p.x = Pt(a))), {
736
- x: s.left + u.scrollLeft - p.x,
737
- y: s.top + u.scrollTop - p.y,
738
- width: s.width,
739
- height: s.height
740
- };
741
- }
742
- function zr(t) {
743
- var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [];
744
- t.forEach(function(a) {
745
- e.set(a.name, a);
746
- });
747
- function i(a) {
748
- n.add(a.name);
749
- var s = [].concat(a.requires || [], a.requiresIfExists || []);
750
- s.forEach(function(u) {
751
- if (!n.has(u)) {
752
- var p = e.get(u);
753
- p && i(p);
754
- }
755
- }), r.push(a);
756
- }
757
- return t.forEach(function(a) {
758
- n.has(a.name) || i(a);
759
- }), r;
760
- }
761
- function Yr(t) {
762
- var e = zr(t);
763
- return ar.reduce(function(n, r) {
764
- return n.concat(e.filter(function(i) {
765
- return i.phase === r;
766
- }));
767
- }, []);
768
- }
769
- function Xr(t) {
770
- var e;
771
- return function() {
772
- return e || (e = new Promise(function(n) {
773
- Promise.resolve().then(function() {
774
- e = void 0, n(t());
775
- });
776
- })), e;
777
- };
778
- }
779
- function Gr(t) {
780
- var e = t.reduce(function(n, r) {
781
- var i = n[r.name];
782
- return n[r.name] = i ? Object.assign({}, i, r, {
783
- options: Object.assign({}, i.options, r.options),
784
- data: Object.assign({}, i.data, r.data)
785
- }) : r, n;
786
- }, {});
787
- return Object.keys(e).map(function(n) {
788
- return e[n];
789
- });
790
- }
791
- var $t = {
792
- placement: "bottom",
793
- modifiers: [],
794
- strategy: "absolute"
795
- };
796
- function Wt() {
797
- for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++)
798
- e[n] = arguments[n];
799
- return !e.some(function(r) {
800
- return !(r && typeof r.getBoundingClientRect == "function");
801
- });
802
- }
803
- function Jr(t) {
804
- t === void 0 && (t = {});
805
- var e = t, n = e.defaultModifiers, r = n === void 0 ? [] : n, i = e.defaultOptions, a = i === void 0 ? $t : i;
806
- return function(u, p, c) {
807
- c === void 0 && (c = a);
808
- var d = {
809
- placement: "bottom",
810
- orderedModifiers: [],
811
- options: Object.assign({}, $t, a),
812
- modifiersData: {},
813
- elements: {
814
- reference: u,
815
- popper: p
816
- },
817
- attributes: {},
818
- styles: {}
819
- }, g = [], y = !1, h = {
820
- state: d,
821
- setOptions: function(T) {
822
- var C = typeof T == "function" ? T(d.options) : T;
823
- w(), d.options = Object.assign({}, a, d.options, C), d.scrollParents = {
824
- reference: ge(u) ? _e(u) : u.contextElement ? _e(u.contextElement) : [],
825
- popper: _e(p)
826
- };
827
- var S = Yr(Gr([].concat(r, d.options.modifiers)));
828
- return d.orderedModifiers = S.filter(function(o) {
829
- return o.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 (!y) {
839
- var T = d.elements, C = T.reference, S = T.popper;
840
- if (Wt(C, S)) {
841
- d.rects = {
842
- reference: Kr(C, Ke(S), d.options.strategy === "fixed"),
843
- popper: Dt(S)
844
- }, d.reset = !1, d.placement = d.options.placement, d.orderedModifiers.forEach(function(N) {
845
- return d.modifiersData[N.name] = Object.assign({}, N.data);
846
- });
847
- for (var o = 0; o < d.orderedModifiers.length; o++) {
848
- if (d.reset === !0) {
849
- d.reset = !1, o = -1;
850
- continue;
851
- }
852
- var E = d.orderedModifiers[o], f = E.fn, A = E.options, L = A === void 0 ? {} : A, R = E.name;
853
- typeof f == "function" && (d = f({
854
- state: d,
855
- options: L,
856
- name: R,
857
- instance: h
858
- }) || d);
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: Xr(function() {
866
- return new Promise(function(O) {
867
- h.forceUpdate(), O(d);
868
- });
869
- }),
870
- destroy: function() {
871
- w(), y = !0;
872
- }
873
- };
874
- if (!Wt(u, p))
875
- return h;
876
- h.setOptions(c).then(function(O) {
877
- !y && c.onFirstUpdate && c.onFirstUpdate(O);
878
- });
879
- function b() {
880
- d.orderedModifiers.forEach(function(O) {
881
- var T = O.name, C = O.options, S = C === void 0 ? {} : C, o = O.effect;
882
- if (typeof o == "function") {
883
- var E = o({
884
- state: d,
885
- name: T,
886
- instance: h,
887
- options: S
888
- }), f = function() {
889
- };
890
- g.push(E || f);
891
- }
892
- });
893
- }
894
- function w() {
895
- g.forEach(function(O) {
896
- return O();
897
- }), g = [];
898
- }
899
- return h;
900
- };
901
- }
902
- var Qr = [Or, _r, br, pn, kr, Rr, $r, hr, jr], Zr = /* @__PURE__ */ Jr({
903
- defaultModifiers: Qr
904
- }), ei = "tippy-box", gn = "tippy-content", ti = "tippy-backdrop", yn = "tippy-arrow", bn = "tippy-svg-arrow", he = {
905
- passive: !0,
906
- capture: !0
907
- }, wn = function() {
908
- return document.body;
909
- };
910
- function ni(t, e) {
911
- return {}.hasOwnProperty.call(t, e);
912
- }
913
- function vt(t, e, n) {
914
- if (Array.isArray(t)) {
915
- var r = t[e];
916
- return r ?? (Array.isArray(n) ? n[e] : n);
917
- }
918
- return t;
919
- }
920
- function Mt(t, e) {
921
- var n = {}.toString.call(t);
922
- return n.indexOf("[object") === 0 && n.indexOf(e + "]") > -1;
923
- }
924
- function On(t, e) {
925
- return typeof t == "function" ? t.apply(void 0, e) : t;
926
- }
927
- function Ut(t, e) {
928
- if (e === 0)
929
- return t;
930
- var n;
931
- return function(r) {
932
- clearTimeout(n), n = setTimeout(function() {
933
- t(r);
934
- }, e);
935
- };
936
- }
937
- function ri(t, e) {
938
- var n = Object.assign({}, t);
939
- return e.forEach(function(r) {
940
- delete n[r];
941
- }), n;
942
- }
943
- function ii(t) {
944
- return t.split(/\s+/).filter(Boolean);
945
- }
946
- function Te(t) {
947
- return [].concat(t);
948
- }
949
- function qt(t, e) {
950
- t.indexOf(e) === -1 && t.push(e);
951
- }
952
- function oi(t) {
953
- return t.filter(function(e, n) {
954
- return t.indexOf(e) === n;
955
- });
956
- }
957
- function ai(t) {
958
- return t.split("-")[0];
959
- }
960
- function ut(t) {
961
- return [].slice.call(t);
962
- }
963
- function Kt(t) {
964
- return Object.keys(t).reduce(function(e, n) {
965
- return t[n] !== void 0 && (e[n] = t[n]), e;
966
- }, {});
967
- }
968
- function Ie() {
969
- return document.createElement("div");
970
- }
971
- function We(t) {
972
- return ["Element", "Fragment"].some(function(e) {
973
- return Mt(t, e);
974
- });
975
- }
976
- function si(t) {
977
- return Mt(t, "NodeList");
978
- }
979
- function ui(t) {
980
- return Mt(t, "MouseEvent");
981
- }
982
- function pi(t) {
983
- return !!(t && t._tippy && t._tippy.reference === t);
984
- }
985
- function li(t) {
986
- return We(t) ? [t] : si(t) ? ut(t) : Array.isArray(t) ? t : ut(document.querySelectorAll(t));
987
- }
988
- function ht(t, e) {
989
- t.forEach(function(n) {
990
- n && (n.style.transitionDuration = e + "ms");
991
- });
992
- }
993
- function zt(t, e) {
994
- t.forEach(function(n) {
995
- n && n.setAttribute("data-state", e);
996
- });
997
- }
998
- function di(t) {
999
- var e, n = Te(t), r = n[0];
1000
- return r != null && (e = r.ownerDocument) != null && e.body ? r.ownerDocument : document;
1001
- }
1002
- function ci(t, e) {
1003
- var n = e.clientX, r = e.clientY;
1004
- return t.every(function(i) {
1005
- var a = i.popperRect, s = i.popperState, u = i.props, p = u.interactiveBorder, c = ai(s.placement), d = s.modifiersData.offset;
1006
- if (!d)
1007
- return !0;
1008
- var g = c === "bottom" ? d.top.y : 0, y = c === "top" ? d.bottom.y : 0, h = c === "right" ? d.left.x : 0, b = c === "left" ? d.right.x : 0, w = a.top - r + g > p, O = r - a.bottom - y > p, T = a.left - n + h > p, C = n - a.right - b > p;
1009
- return w || O || T || C;
1010
- });
1011
- }
1012
- function mt(t, e, n) {
1013
- var r = e + "EventListener";
1014
- ["transitionend", "webkitTransitionEnd"].forEach(function(i) {
1015
- t[r](i, n);
1016
- });
1017
- }
1018
- function Yt(t, e) {
1019
- for (var n = e; n; ) {
1020
- var r;
1021
- if (t.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 Z = {
1028
- isTouch: !1
1029
- }, Xt = 0;
1030
- function fi() {
1031
- Z.isTouch || (Z.isTouch = !0, window.performance && document.addEventListener("mousemove", xn));
1032
- }
1033
- function xn() {
1034
- var t = performance.now();
1035
- t - Xt < 20 && (Z.isTouch = !1, document.removeEventListener("mousemove", xn)), Xt = t;
1036
- }
1037
- function vi() {
1038
- var t = document.activeElement;
1039
- if (pi(t)) {
1040
- var e = t._tippy;
1041
- t.blur && !e.state.isVisible && t.blur();
1042
- }
1043
- }
1044
- function hi() {
1045
- document.addEventListener("touchstart", fi, he), window.addEventListener("blur", vi);
1046
- }
1047
- var mi = typeof window < "u" && typeof document < "u", gi = mi ? (
1048
- // @ts-ignore
1049
- !!window.msCrypto
1050
- ) : !1;
1051
- function Ee(t) {
1052
- var e = t === "destroy" ? "n already-" : " ";
1053
- return [t + "() was called on a" + e + "destroyed instance. This is a no-op but", "indicates a potential memory leak."].join(" ");
1054
- }
1055
- function Gt(t) {
1056
- var e = /[ \t]{2,}/g, n = /^[ \t]*/gm;
1057
- return t.replace(e, " ").replace(n, "").trim();
1058
- }
1059
- function yi(t) {
1060
- return Gt(`
1061
- %ctippy.js
1062
-
1063
- %c` + Gt(t) + `
1064
-
1065
- %c👷‍ This is a development-only message. It will be removed in production.
1066
- `);
1067
- }
1068
- function En(t) {
1069
- return [
1070
- yi(t),
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 Ue;
1080
- process.env.NODE_ENV !== "production" && bi();
1081
- function bi() {
1082
- Ue = /* @__PURE__ */ new Set();
1083
- }
1084
- function ae(t, e) {
1085
- if (t && !Ue.has(e)) {
1086
- var n;
1087
- Ue.add(e), (n = console).warn.apply(n, En(e));
1088
- }
1089
- }
1090
- function wt(t, e) {
1091
- if (t && !Ue.has(e)) {
1092
- var n;
1093
- Ue.add(e), (n = console).error.apply(n, En(e));
1094
- }
1095
- }
1096
- function wi(t) {
1097
- var e = !t, n = Object.prototype.toString.call(t) === "[object Object]" && !t.addEventListener;
1098
- wt(e, ["tippy() was passed", "`" + String(t) + "`", "as its targets (first) argument. Valid types are: String, Element,", "Element[], or NodeList."].join(" ")), wt(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 Tn = {
1101
- animateFill: !1,
1102
- followCursor: !1,
1103
- inlinePositioning: !1,
1104
- sticky: !1
1105
- }, Oi = {
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
- }, W = 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
- }, Tn, Oi), xi = Object.keys(W), Ei = function(e) {
1164
- process.env.NODE_ENV !== "production" && Dn(e, []);
1165
- var n = Object.keys(e);
1166
- n.forEach(function(r) {
1167
- W[r] = e[r];
1168
- });
1169
- };
1170
- function Cn(t) {
1171
- var e = t.plugins || [], n = e.reduce(function(r, i) {
1172
- var a = i.name, s = i.defaultValue;
1173
- if (a) {
1174
- var u;
1175
- r[a] = t[a] !== void 0 ? t[a] : (u = W[a]) != null ? u : s;
1176
- }
1177
- return r;
1178
- }, {});
1179
- return Object.assign({}, t, n);
1180
- }
1181
- function Ti(t, e) {
1182
- var n = e ? Object.keys(Cn(Object.assign({}, W, {
1183
- plugins: e
1184
- }))) : xi, r = n.reduce(function(i, a) {
1185
- var s = (t.getAttribute("data-tippy-" + a) || "").trim();
1186
- if (!s)
1187
- return i;
1188
- if (a === "content")
1189
- i[a] = s;
1190
- else
1191
- try {
1192
- i[a] = JSON.parse(s);
1193
- } catch {
1194
- i[a] = s;
1195
- }
1196
- return i;
1197
- }, {});
1198
- return r;
1199
- }
1200
- function Jt(t, e) {
1201
- var n = Object.assign({}, e, {
1202
- content: On(e.content, [t])
1203
- }, e.ignoreAttributes ? {} : Ti(t, e.plugins));
1204
- return n.aria = Object.assign({}, W.aria, n.aria), n.aria = {
1205
- expanded: n.aria.expanded === "auto" ? e.interactive : n.aria.expanded,
1206
- content: n.aria.content === "auto" ? e.interactive ? null : "describedby" : n.aria.content
1207
- }, n;
1208
- }
1209
- function Dn(t, e) {
1210
- t === void 0 && (t = {}), e === void 0 && (e = []);
1211
- var n = Object.keys(t);
1212
- n.forEach(function(r) {
1213
- var i = ri(W, Object.keys(Tn)), a = !ni(i, r);
1214
- a && (a = e.filter(function(s) {
1215
- return s.name === r;
1216
- }).length === 0), ae(a, ["`" + 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 Ci = function() {
1223
- return "innerHTML";
1224
- };
1225
- function Ot(t, e) {
1226
- t[Ci()] = e;
1227
- }
1228
- function Qt(t) {
1229
- var e = Ie();
1230
- return t === !0 ? e.className = yn : (e.className = bn, We(t) ? e.appendChild(t) : Ot(e, t)), e;
1231
- }
1232
- function Zt(t, e) {
1233
- We(e.content) ? (Ot(t, ""), t.appendChild(e.content)) : typeof e.content != "function" && (e.allowHTML ? Ot(t, e.content) : t.textContent = e.content);
1234
- }
1235
- function xt(t) {
1236
- var e = t.firstElementChild, n = ut(e.children);
1237
- return {
1238
- box: e,
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(ti);
1247
- })
1248
- };
1249
- }
1250
- function An(t) {
1251
- var e = Ie(), n = Ie();
1252
- n.className = ei, n.setAttribute("data-state", "hidden"), n.setAttribute("tabindex", "-1");
1253
- var r = Ie();
1254
- r.className = gn, r.setAttribute("data-state", "hidden"), Zt(r, t.props), e.appendChild(n), n.appendChild(r), i(t.props, t.props);
1255
- function i(a, s) {
1256
- var u = xt(e), p = u.box, c = u.content, d = u.arrow;
1257
- s.theme ? p.setAttribute("data-theme", s.theme) : p.removeAttribute("data-theme"), typeof s.animation == "string" ? p.setAttribute("data-animation", s.animation) : p.removeAttribute("data-animation"), s.inertia ? p.setAttribute("data-inertia", "") : p.removeAttribute("data-inertia"), p.style.maxWidth = typeof s.maxWidth == "number" ? s.maxWidth + "px" : s.maxWidth, s.role ? p.setAttribute("role", s.role) : p.removeAttribute("role"), (a.content !== s.content || a.allowHTML !== s.allowHTML) && Zt(c, t.props), s.arrow ? d ? a.arrow !== s.arrow && (p.removeChild(d), p.appendChild(Qt(s.arrow))) : p.appendChild(Qt(s.arrow)) : d && p.removeChild(d);
1258
- }
1259
- return {
1260
- popper: e,
1261
- onUpdate: i
1262
- };
1263
- }
1264
- An.$$tippy = !0;
1265
- var Di = 1, ot = [], gt = [];
1266
- function Ai(t, e) {
1267
- var n = Jt(t, Object.assign({}, W, Cn(Kt(e)))), r, i, a, s = !1, u = !1, p = !1, c = !1, d, g, y, h = [], b = Ut(Ye, n.interactiveDebounce), w, O = Di++, T = null, C = oi(n.plugins), S = {
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
- }, o = {
1279
- // properties
1280
- id: O,
1281
- reference: t,
1282
- popper: Ie(),
1283
- popperInstance: T,
1284
- props: n,
1285
- state: S,
1286
- plugins: C,
1287
- // methods
1288
- clearDelayTimeouts: Ze,
1289
- setProps: et,
1290
- setContent: tt,
1291
- show: Nn,
1292
- hide: Mn,
1293
- hideWithInteractivity: Rn,
1294
- enable: Be,
1295
- disable: Qe,
1296
- unmount: Ln,
1297
- destroy: jn
1298
- };
1299
- if (!n.render)
1300
- return process.env.NODE_ENV !== "production" && wt(!0, "render() function has not been supplied."), o;
1301
- var E = n.render(o), f = E.popper, A = E.onUpdate;
1302
- f.setAttribute("data-tippy-root", ""), f.id = "tippy-" + o.id, o.popper = f, t._tippy = o, f._tippy = o;
1303
- var L = C.map(function(l) {
1304
- return l.fn(o);
1305
- }), R = t.hasAttribute("aria-expanded");
1306
- return we(), J(), k(), H("onCreate", [o]), n.showOnCreate && He(), f.addEventListener("mouseenter", function() {
1307
- o.props.interactive && o.state.isVisible && o.clearDelayTimeouts();
1308
- }), f.addEventListener("mouseleave", function() {
1309
- o.props.interactive && o.props.trigger.indexOf("mouseenter") >= 0 && F().addEventListener("mousemove", b);
1310
- }), o;
1311
- function N() {
1312
- var l = o.props.touch;
1313
- return Array.isArray(l) ? l : [l, 0];
1314
- }
1315
- function j() {
1316
- return N()[0] === "hold";
1317
- }
1318
- function M() {
1319
- var l;
1320
- return !!((l = o.props.render) != null && l.$$tippy);
1321
- }
1322
- function P() {
1323
- return w || t;
1324
- }
1325
- function F() {
1326
- var l = P().parentNode;
1327
- return l ? di(l) : document;
1328
- }
1329
- function $() {
1330
- return xt(f);
1331
- }
1332
- function B(l) {
1333
- return o.state.isMounted && !o.state.isVisible || Z.isTouch || d && d.type === "focus" ? 0 : vt(o.props.delay, l ? 0 : 1, W.delay);
1334
- }
1335
- function k(l) {
1336
- l === void 0 && (l = !1), f.style.pointerEvents = o.props.interactive && !l ? "" : "none", f.style.zIndex = "" + o.props.zIndex;
1337
- }
1338
- function H(l, v, m) {
1339
- if (m === void 0 && (m = !0), L.forEach(function(x) {
1340
- x[l] && x[l].apply(x, v);
1341
- }), m) {
1342
- var D;
1343
- (D = o.props)[l].apply(D, v);
1344
- }
1345
- }
1346
- function G() {
1347
- var l = o.props.aria;
1348
- if (l.content) {
1349
- var v = "aria-" + l.content, m = f.id, D = Te(o.props.triggerTarget || t);
1350
- D.forEach(function(x) {
1351
- var V = x.getAttribute(v);
1352
- if (o.state.isVisible)
1353
- x.setAttribute(v, V ? V + " " + m : m);
1354
- else {
1355
- var q = V && V.replace(m, "").trim();
1356
- q ? x.setAttribute(v, q) : x.removeAttribute(v);
1357
- }
1358
- });
1359
- }
1360
- }
1361
- function J() {
1362
- if (!(R || !o.props.aria.expanded)) {
1363
- var l = Te(o.props.triggerTarget || t);
1364
- l.forEach(function(v) {
1365
- o.props.interactive ? v.setAttribute("aria-expanded", o.state.isVisible && v === P() ? "true" : "false") : v.removeAttribute("aria-expanded");
1366
- });
1367
- }
1368
- }
1369
- function de() {
1370
- F().removeEventListener("mousemove", b), ot = ot.filter(function(l) {
1371
- return l !== b;
1372
- });
1373
- }
1374
- function Q(l) {
1375
- if (!(Z.isTouch && (p || l.type === "mousedown"))) {
1376
- var v = l.composedPath && l.composedPath()[0] || l.target;
1377
- if (!(o.props.interactive && Yt(f, v))) {
1378
- if (Te(o.props.triggerTarget || t).some(function(m) {
1379
- return Yt(m, v);
1380
- })) {
1381
- if (Z.isTouch || o.state.isVisible && o.props.trigger.indexOf("click") >= 0)
1382
- return;
1383
- } else
1384
- H("onClickOutside", [o, l]);
1385
- o.props.hideOnClick === !0 && (o.clearDelayTimeouts(), o.hide(), u = !0, setTimeout(function() {
1386
- u = !1;
1387
- }), o.state.isMounted || re());
1388
- }
1389
- }
1390
- }
1391
- function ce() {
1392
- p = !0;
1393
- }
1394
- function ne() {
1395
- p = !1;
1396
- }
1397
- function X() {
1398
- var l = F();
1399
- l.addEventListener("mousedown", Q, !0), l.addEventListener("touchend", Q, he), l.addEventListener("touchstart", ne, he), l.addEventListener("touchmove", ce, he);
1400
- }
1401
- function re() {
1402
- var l = F();
1403
- l.removeEventListener("mousedown", Q, !0), l.removeEventListener("touchend", Q, he), l.removeEventListener("touchstart", ne, he), l.removeEventListener("touchmove", ce, he);
1404
- }
1405
- function ye(l, v) {
1406
- be(l, function() {
1407
- !o.state.isVisible && f.parentNode && f.parentNode.contains(f) && v();
1408
- });
1409
- }
1410
- function ie(l, v) {
1411
- be(l, v);
1412
- }
1413
- function be(l, v) {
1414
- var m = $().box;
1415
- function D(x) {
1416
- x.target === m && (mt(m, "remove", D), v());
1417
- }
1418
- if (l === 0)
1419
- return v();
1420
- mt(m, "remove", g), mt(m, "add", D), g = D;
1421
- }
1422
- function ue(l, v, m) {
1423
- m === void 0 && (m = !1);
1424
- var D = Te(o.props.triggerTarget || t);
1425
- D.forEach(function(x) {
1426
- x.addEventListener(l, v, m), h.push({
1427
- node: x,
1428
- eventType: l,
1429
- handler: v,
1430
- options: m
1431
- });
1432
- });
1433
- }
1434
- function we() {
1435
- j() && (ue("touchstart", Re, {
1436
- passive: !0
1437
- }), ue("touchend", Xe, {
1438
- passive: !0
1439
- })), ii(o.props.trigger).forEach(function(l) {
1440
- if (l !== "manual")
1441
- switch (ue(l, Re), l) {
1442
- case "mouseenter":
1443
- ue("mouseleave", Xe);
1444
- break;
1445
- case "focus":
1446
- ue(gi ? "focusout" : "blur", Le);
1447
- break;
1448
- case "focusin":
1449
- ue("focusout", Le);
1450
- break;
1451
- }
1452
- });
1453
- }
1454
- function ze() {
1455
- h.forEach(function(l) {
1456
- var v = l.node, m = l.eventType, D = l.handler, x = l.options;
1457
- v.removeEventListener(m, D, x);
1458
- }), h = [];
1459
- }
1460
- function Re(l) {
1461
- var v, m = !1;
1462
- if (!(!o.state.isEnabled || je(l) || u)) {
1463
- var D = ((v = d) == null ? void 0 : v.type) === "focus";
1464
- d = l, w = l.currentTarget, J(), !o.state.isVisible && ui(l) && ot.forEach(function(x) {
1465
- return x(l);
1466
- }), l.type === "click" && (o.props.trigger.indexOf("mouseenter") < 0 || s) && o.props.hideOnClick !== !1 && o.state.isVisible ? m = !0 : He(l), l.type === "click" && (s = !m), m && !D && fe(l);
1467
- }
1468
- }
1469
- function Ye(l) {
1470
- var v = l.target, m = P().contains(v) || f.contains(v);
1471
- if (!(l.type === "mousemove" && m)) {
1472
- var D = pe().concat(f).map(function(x) {
1473
- var V, q = x._tippy, Oe = (V = q.popperInstance) == null ? void 0 : V.state;
1474
- return Oe ? {
1475
- popperRect: x.getBoundingClientRect(),
1476
- popperState: Oe,
1477
- props: n
1478
- } : null;
1479
- }).filter(Boolean);
1480
- ci(D, l) && (de(), fe(l));
1481
- }
1482
- }
1483
- function Xe(l) {
1484
- var v = je(l) || o.props.trigger.indexOf("click") >= 0 && s;
1485
- if (!v) {
1486
- if (o.props.interactive) {
1487
- o.hideWithInteractivity(l);
1488
- return;
1489
- }
1490
- fe(l);
1491
- }
1492
- }
1493
- function Le(l) {
1494
- o.props.trigger.indexOf("focusin") < 0 && l.target !== P() || o.props.interactive && l.relatedTarget && f.contains(l.relatedTarget) || fe(l);
1495
- }
1496
- function je(l) {
1497
- return Z.isTouch ? j() !== l.type.indexOf("touch") >= 0 : !1;
1498
- }
1499
- function Ge() {
1500
- Je();
1501
- var l = o.props, v = l.popperOptions, m = l.placement, D = l.offset, x = l.getReferenceClientRect, V = l.moveTransition, q = M() ? xt(f).arrow : null, Oe = x ? {
1502
- getBoundingClientRect: x,
1503
- contextElement: x.contextElement || P()
1504
- } : t, Rt = {
1505
- name: "$$tippy",
1506
- enabled: !0,
1507
- phase: "beforeWrite",
1508
- requires: ["computeStyles"],
1509
- fn: function(nt) {
1510
- var xe = nt.state;
1511
- if (M()) {
1512
- var Hn = $(), ft = Hn.box;
1513
- ["placement", "reference-hidden", "escaped"].forEach(function(rt) {
1514
- rt === "placement" ? ft.setAttribute("data-placement", xe.placement) : xe.attributes.popper["data-popper-" + rt] ? ft.setAttribute("data-" + rt, "") : ft.removeAttribute("data-" + rt);
1515
- }), xe.attributes.popper = {};
1516
- }
1517
- }
1518
- }, ve = [{
1519
- name: "offset",
1520
- options: {
1521
- offset: D
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: !V
1542
- }
1543
- }, Rt];
1544
- M() && q && ve.push({
1545
- name: "arrow",
1546
- options: {
1547
- element: q,
1548
- padding: 3
1549
- }
1550
- }), ve.push.apply(ve, (v == null ? void 0 : v.modifiers) || []), o.popperInstance = Zr(Oe, f, Object.assign({}, v, {
1551
- placement: m,
1552
- onFirstUpdate: y,
1553
- modifiers: ve
1554
- }));
1555
- }
1556
- function Je() {
1557
- o.popperInstance && (o.popperInstance.destroy(), o.popperInstance = null);
1558
- }
1559
- function oe() {
1560
- var l = o.props.appendTo, v, m = P();
1561
- o.props.interactive && l === wn || l === "parent" ? v = m.parentNode : v = On(l, [m]), v.contains(f) || v.appendChild(f), o.state.isMounted = !0, Ge(), process.env.NODE_ENV !== "production" && ae(o.props.interactive && l === W.appendTo && m.nextElementSibling !== f, ["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 pe() {
1570
- return ut(f.querySelectorAll("[data-tippy-root]"));
1571
- }
1572
- function He(l) {
1573
- o.clearDelayTimeouts(), l && H("onTrigger", [o, l]), X();
1574
- var v = B(!0), m = N(), D = m[0], x = m[1];
1575
- Z.isTouch && D === "hold" && x && (v = x), v ? r = setTimeout(function() {
1576
- o.show();
1577
- }, v) : o.show();
1578
- }
1579
- function fe(l) {
1580
- if (o.clearDelayTimeouts(), H("onUntrigger", [o, l]), !o.state.isVisible) {
1581
- re();
1582
- return;
1583
- }
1584
- if (!(o.props.trigger.indexOf("mouseenter") >= 0 && o.props.trigger.indexOf("click") >= 0 && ["mouseleave", "mousemove"].indexOf(l.type) >= 0 && s)) {
1585
- var v = B(!1);
1586
- v ? i = setTimeout(function() {
1587
- o.state.isVisible && o.hide();
1588
- }, v) : a = requestAnimationFrame(function() {
1589
- o.hide();
1590
- });
1591
- }
1592
- }
1593
- function Be() {
1594
- o.state.isEnabled = !0;
1595
- }
1596
- function Qe() {
1597
- o.hide(), o.state.isEnabled = !1;
1598
- }
1599
- function Ze() {
1600
- clearTimeout(r), clearTimeout(i), cancelAnimationFrame(a);
1601
- }
1602
- function et(l) {
1603
- if (process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("setProps")), !o.state.isDestroyed) {
1604
- H("onBeforeUpdate", [o, l]), ze();
1605
- var v = o.props, m = Jt(t, Object.assign({}, v, Kt(l), {
1606
- ignoreAttributes: !0
1607
- }));
1608
- o.props = m, we(), v.interactiveDebounce !== m.interactiveDebounce && (de(), b = Ut(Ye, m.interactiveDebounce)), v.triggerTarget && !m.triggerTarget ? Te(v.triggerTarget).forEach(function(D) {
1609
- D.removeAttribute("aria-expanded");
1610
- }) : m.triggerTarget && t.removeAttribute("aria-expanded"), J(), k(), A && A(v, m), o.popperInstance && (Ge(), pe().forEach(function(D) {
1611
- requestAnimationFrame(D._tippy.popperInstance.forceUpdate);
1612
- })), H("onAfterUpdate", [o, l]);
1613
- }
1614
- }
1615
- function tt(l) {
1616
- o.setProps({
1617
- content: l
1618
- });
1619
- }
1620
- function Nn() {
1621
- process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("show"));
1622
- var l = o.state.isVisible, v = o.state.isDestroyed, m = !o.state.isEnabled, D = Z.isTouch && !o.props.touch, x = vt(o.props.duration, 0, W.duration);
1623
- if (!(l || v || m || D) && !P().hasAttribute("disabled") && (H("onShow", [o], !1), o.props.onShow(o) !== !1)) {
1624
- if (o.state.isVisible = !0, M() && (f.style.visibility = "visible"), k(), X(), o.state.isMounted || (f.style.transition = "none"), M()) {
1625
- var V = $(), q = V.box, Oe = V.content;
1626
- ht([q, Oe], 0);
1627
- }
1628
- y = function() {
1629
- var ve;
1630
- if (!(!o.state.isVisible || c)) {
1631
- if (c = !0, f.offsetHeight, f.style.transition = o.props.moveTransition, M() && o.props.animation) {
1632
- var ct = $(), nt = ct.box, xe = ct.content;
1633
- ht([nt, xe], x), zt([nt, xe], "visible");
1634
- }
1635
- G(), J(), qt(gt, o), (ve = o.popperInstance) == null || ve.forceUpdate(), H("onMount", [o]), o.props.animation && M() && ie(x, function() {
1636
- o.state.isShown = !0, H("onShown", [o]);
1637
- });
1638
- }
1639
- }, oe();
1640
- }
1641
- }
1642
- function Mn() {
1643
- process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("hide"));
1644
- var l = !o.state.isVisible, v = o.state.isDestroyed, m = !o.state.isEnabled, D = vt(o.props.duration, 1, W.duration);
1645
- if (!(l || v || m) && (H("onHide", [o], !1), o.props.onHide(o) !== !1)) {
1646
- if (o.state.isVisible = !1, o.state.isShown = !1, c = !1, s = !1, M() && (f.style.visibility = "hidden"), de(), re(), k(!0), M()) {
1647
- var x = $(), V = x.box, q = x.content;
1648
- o.props.animation && (ht([V, q], D), zt([V, q], "hidden"));
1649
- }
1650
- G(), J(), o.props.animation ? M() && ye(D, o.unmount) : o.unmount();
1651
- }
1652
- }
1653
- function Rn(l) {
1654
- process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("hideWithInteractivity")), F().addEventListener("mousemove", b), qt(ot, b), b(l);
1655
- }
1656
- function Ln() {
1657
- process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("unmount")), o.state.isVisible && o.hide(), o.state.isMounted && (Je(), pe().forEach(function(l) {
1658
- l._tippy.unmount();
1659
- }), f.parentNode && f.parentNode.removeChild(f), gt = gt.filter(function(l) {
1660
- return l !== o;
1661
- }), o.state.isMounted = !1, H("onHidden", [o]));
1662
- }
1663
- function jn() {
1664
- process.env.NODE_ENV !== "production" && ae(o.state.isDestroyed, Ee("destroy")), !o.state.isDestroyed && (o.clearDelayTimeouts(), o.unmount(), ze(), delete t._tippy, o.state.isDestroyed = !0, H("onDestroy", [o]));
1665
- }
1666
- }
1667
- function Me(t, e) {
1668
- e === void 0 && (e = {});
1669
- var n = W.plugins.concat(e.plugins || []);
1670
- process.env.NODE_ENV !== "production" && (wi(t), Dn(e, n)), hi();
1671
- var r = Object.assign({}, e, {
1672
- plugins: n
1673
- }), i = li(t);
1674
- if (process.env.NODE_ENV !== "production") {
1675
- var a = We(r.content), s = i.length > 1;
1676
- ae(a && s, ["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 = i.reduce(function(p, c) {
1684
- var d = c && Ai(c, r);
1685
- return d && p.push(d), p;
1686
- }, []);
1687
- return We(t) ? u[0] : u;
1688
- }
1689
- Me.defaultProps = W;
1690
- Me.setDefaultProps = Ei;
1691
- Me.currentInput = Z;
1692
- Object.assign({}, pn, {
1693
- effect: function(e) {
1694
- var n = e.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
- Me.setDefaultProps({
1710
- render: An
1711
- });
1712
- class Si {
1713
- constructor({ editor: e, element: n, view: r, tippyOptions: i = {}, updateDelay: a = 250, shouldShow: s }) {
1714
- this.preventHide = !1, this.shouldShow = ({ view: u, state: p, from: c, to: d }) => {
1715
- const { doc: g, selection: y } = p, { empty: h } = y, b = !g.textBetween(c, d).length && Bn(p.selection), w = this.element.contains(document.activeElement);
1716
- return !(!(u.hasFocus() || w) || 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 p;
1725
- if (this.preventHide) {
1726
- this.preventHide = !1;
1727
- return;
1728
- }
1729
- u != null && u.relatedTarget && (!((p = this.element.parentNode) === null || p === void 0) && p.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, p) => {
1733
- const c = !(p != null && p.selection.eq(u.state.selection)), d = !(p != null && p.doc.eq(u.state.doc));
1734
- !c && !d || (this.updateDebounceTimer && clearTimeout(this.updateDebounceTimer), this.updateDebounceTimer = window.setTimeout(() => {
1735
- this.updateHandler(u, c, d, p);
1736
- }, this.updateDelay));
1737
- }, this.updateHandler = (u, p, c, d) => {
1738
- var g, y, h;
1739
- const { state: b, composing: w } = u, { selection: O } = b;
1740
- if (w || !p && !c)
1741
- return;
1742
- this.createTooltip();
1743
- const { ranges: C } = O, S = Math.min(...C.map((f) => f.$from.pos)), o = Math.max(...C.map((f) => f.$to.pos));
1744
- if (!((g = this.shouldShow) === null || g === void 0 ? void 0 : g.call(this, {
1745
- editor: this.editor,
1746
- element: this.element,
1747
- view: u,
1748
- state: b,
1749
- oldState: d,
1750
- from: S,
1751
- to: o
1752
- }))) {
1753
- this.hide();
1754
- return;
1755
- }
1756
- (y = this.tippy) === null || y === void 0 || y.setProps({
1757
- getReferenceClientRect: ((h = this.tippyOptions) === null || h === void 0 ? void 0 : h.getReferenceClientRect) || (() => {
1758
- if (kn(b.selection)) {
1759
- let f = u.nodeDOM(S);
1760
- if (f) {
1761
- const A = f.dataset.nodeViewWrapper ? f : f.querySelector("[data-node-view-wrapper]");
1762
- if (A && (f = A.firstChild), f)
1763
- return f.getBoundingClientRect();
1764
- }
1765
- }
1766
- return rn(u, S, o);
1767
- })
1768
- }), this.show();
1769
- }, this.editor = e, this.element = n, this.view = r, this.updateDelay = a, s && (this.shouldShow = s), 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 = i, this.element.remove(), this.element.style.visibility = "visible";
1770
- }
1771
- createTooltip() {
1772
- const { element: e } = this.editor.options, n = !!e.parentElement;
1773
- this.element.tabIndex = 0, !(this.tippy || !n) && (this.tippy = Me(e, {
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(e, n) {
1785
- const { state: r } = e, i = r.selection.from !== r.selection.to;
1786
- if (this.updateDelay > 0 && i) {
1787
- this.handleDebouncedUpdate(e, n);
1788
- return;
1789
- }
1790
- const a = !(n != null && n.selection.eq(e.state.selection)), s = !(n != null && n.doc.eq(e.state.doc));
1791
- this.updateHandler(e, a, s, n);
1792
- }
1793
- show() {
1794
- var e;
1795
- (e = this.tippy) === null || e === void 0 || e.show();
1796
- }
1797
- hide() {
1798
- var e;
1799
- (e = this.tippy) === null || e === void 0 || e.hide();
1800
- }
1801
- destroy() {
1802
- var e, n;
1803
- !((e = this.tippy) === null || e === void 0) && e.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 Sn = (t) => new tn({
1807
- key: typeof t.pluginKey == "string" ? new nn(t.pluginKey) : t.pluginKey,
1808
- view: (e) => new Si({ view: e, ...t })
1809
- });
1810
- on.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
- Sn({
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
- class Pi {
1835
- getTextContent(e) {
1836
- return Vn(e, { textSerializers: _n(this.editor.schema) });
1837
- }
1838
- constructor({ editor: e, element: n, view: r, tippyOptions: i = {}, shouldShow: a }) {
1839
- this.preventHide = !1, this.shouldShow = ({ view: s, state: u }) => {
1840
- const { selection: p } = u, { $anchor: c, empty: d } = p, g = c.depth === 1, y = c.parent.isTextblock && !c.parent.type.spec.code && !c.parent.textContent && c.parent.childCount === 0 && !this.getTextContent(c.parent);
1841
- return !(!s.hasFocus() || !d || !g || !y || !this.editor.isEditable);
1842
- }, this.mousedownHandler = () => {
1843
- this.preventHide = !0;
1844
- }, this.focusHandler = () => {
1845
- setTimeout(() => this.update(this.editor.view));
1846
- }, this.blurHandler = ({ event: s }) => {
1847
- var u;
1848
- if (this.preventHide) {
1849
- this.preventHide = !1;
1850
- return;
1851
- }
1852
- s != null && s.relatedTarget && (!((u = this.element.parentNode) === null || u === void 0) && u.contains(s.relatedTarget)) || (s == null ? void 0 : s.relatedTarget) !== this.editor.view.dom && this.hide();
1853
- }, this.tippyBlurHandler = (s) => {
1854
- this.blurHandler({ event: s });
1855
- }, this.editor = e, this.element = n, this.view = r, a && (this.shouldShow = a), this.element.addEventListener("mousedown", this.mousedownHandler, { capture: !0 }), this.editor.on("focus", this.focusHandler), this.editor.on("blur", this.blurHandler), this.tippyOptions = i, this.element.remove(), this.element.style.visibility = "visible";
1856
- }
1857
- createTooltip() {
1858
- const { element: e } = this.editor.options, n = !!e.parentElement;
1859
- this.element.tabIndex = 0, !(this.tippy || !n) && (this.tippy = Me(e, {
1860
- duration: 0,
1861
- getReferenceClientRect: null,
1862
- content: this.element,
1863
- interactive: !0,
1864
- trigger: "manual",
1865
- placement: "right",
1866
- hideOnClick: "toggle",
1867
- ...this.tippyOptions
1868
- }), this.tippy.popper.firstChild && this.tippy.popper.firstChild.addEventListener("blur", this.tippyBlurHandler));
1869
- }
1870
- update(e, n) {
1871
- var r, i, a;
1872
- const { state: s } = e, { doc: u, selection: p } = s, { from: c, to: d } = p;
1873
- if (n && n.doc.eq(u) && n.selection.eq(p))
1874
- return;
1875
- if (this.createTooltip(), !((r = this.shouldShow) === null || r === void 0 ? void 0 : r.call(this, {
1876
- editor: this.editor,
1877
- view: e,
1878
- state: s,
1879
- oldState: n
1880
- }))) {
1881
- this.hide();
1882
- return;
1883
- }
1884
- (i = this.tippy) === null || i === void 0 || i.setProps({
1885
- getReferenceClientRect: ((a = this.tippyOptions) === null || a === void 0 ? void 0 : a.getReferenceClientRect) || (() => rn(e, c, d))
1886
- }), this.show();
1887
- }
1888
- show() {
1889
- var e;
1890
- (e = this.tippy) === null || e === void 0 || e.show();
1891
- }
1892
- hide() {
1893
- var e;
1894
- (e = this.tippy) === null || e === void 0 || e.hide();
1895
- }
1896
- destroy() {
1897
- var e, n;
1898
- !((e = this.tippy) === null || e === void 0) && e.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.editor.off("focus", this.focusHandler), this.editor.off("blur", this.blurHandler);
1899
- }
1900
- }
1901
- const Pn = (t) => new tn({
1902
- key: typeof t.pluginKey == "string" ? new nn(t.pluginKey) : t.pluginKey,
1903
- view: (e) => new Pi({ view: e, ...t })
1904
- });
1905
- on.create({
1906
- name: "floatingMenu",
1907
- addOptions() {
1908
- return {
1909
- element: null,
1910
- tippyOptions: {},
1911
- pluginKey: "floatingMenu",
1912
- shouldShow: null
1913
- };
1914
- },
1915
- addProseMirrorPlugins() {
1916
- return this.options.element ? [
1917
- Pn({
1918
- pluginKey: this.options.pluginKey,
1919
- editor: this.editor,
1920
- element: this.options.element,
1921
- tippyOptions: this.options.tippyOptions,
1922
- shouldShow: this.options.shouldShow
1923
- })
1924
- ] : [];
1925
- }
1926
- });
1927
- const Hi = Pe({
1928
- name: "BubbleMenu",
1929
- props: {
1930
- pluginKey: {
1931
- type: [String, Object],
1932
- default: "bubbleMenu"
1933
- },
1934
- editor: {
1935
- type: Object,
1936
- required: !0
1937
- },
1938
- updateDelay: {
1939
- type: Number,
1940
- default: void 0
1941
- },
1942
- tippyOptions: {
1943
- type: Object,
1944
- default: () => ({})
1945
- },
1946
- shouldShow: {
1947
- type: Function,
1948
- default: null
1949
- }
1950
- },
1951
- setup(t, { slots: e }) {
1952
- const n = pt(null);
1953
- return Et(() => {
1954
- const { updateDelay: r, editor: i, pluginKey: a, shouldShow: s, tippyOptions: u } = t;
1955
- i.registerPlugin(Sn({
1956
- updateDelay: r,
1957
- editor: i,
1958
- element: n.value,
1959
- pluginKey: a,
1960
- shouldShow: s,
1961
- tippyOptions: u
1962
- }));
1963
- }), lt(() => {
1964
- const { pluginKey: r, editor: i } = t;
1965
- i.unregisterPlugin(r);
1966
- }), () => {
1967
- var r;
1968
- return Ne("div", { ref: n }, (r = e.default) === null || r === void 0 ? void 0 : r.call(e));
1969
- };
1970
- }
1971
- });
1972
- function en(t) {
1973
- return Yn((e, n) => ({
1974
- get() {
1975
- return e(), t;
1976
- },
1977
- set(r) {
1978
- t = r, requestAnimationFrame(() => {
1979
- requestAnimationFrame(() => {
1980
- n();
1981
- });
1982
- });
1983
- }
1984
- }));
1985
- }
1986
- class Ni extends In {
1987
- constructor(e = {}) {
1988
- return super(e), this.contentComponent = null, this.appContext = null, this.reactiveState = en(this.view.state), this.reactiveExtensionStorage = en(this.extensionStorage), this.on("beforeTransaction", ({ nextState: n }) => {
1989
- this.reactiveState.value = n, this.reactiveExtensionStorage.value = this.extensionStorage;
1990
- }), an(this);
1991
- }
1992
- get state() {
1993
- return this.reactiveState ? this.reactiveState.value : this.view.state;
1994
- }
1995
- get storage() {
1996
- return this.reactiveExtensionStorage ? this.reactiveExtensionStorage.value : super.storage;
1997
- }
1998
- /**
1999
- * Register a ProseMirror plugin.
2000
- */
2001
- registerPlugin(e, n) {
2002
- const r = super.registerPlugin(e, n);
2003
- return this.reactiveState && (this.reactiveState.value = r), r;
2004
- }
2005
- /**
2006
- * Unregister a ProseMirror plugin.
2007
- */
2008
- unregisterPlugin(e) {
2009
- const n = super.unregisterPlugin(e);
2010
- return this.reactiveState && n && (this.reactiveState.value = n), n;
2011
- }
2012
- }
2013
- const Bi = Pe({
2014
- name: "EditorContent",
2015
- props: {
2016
- editor: {
2017
- default: null,
2018
- type: Object
2019
- }
2020
- },
2021
- setup(t) {
2022
- const e = pt(), n = $n();
2023
- return Wn(() => {
2024
- const r = t.editor;
2025
- r && r.options.element && e.value && Un(() => {
2026
- if (!e.value || !r.options.element.firstChild)
2027
- return;
2028
- const i = qn(e.value);
2029
- e.value.append(...r.options.element.childNodes), r.contentComponent = n.ctx._, n && (r.appContext = {
2030
- ...n.appContext,
2031
- // Vue internally uses prototype chain to forward/shadow injects across the entire component chain
2032
- // so don't use object spread operator or 'Object.assign' and just set `provides` as is on editor's appContext
2033
- // @ts-expect-error forward instance's 'provides' into appContext
2034
- provides: n.provides
2035
- }), r.setOptions({
2036
- element: i
2037
- }), r.createNodeViews();
2038
- });
2039
- }), lt(() => {
2040
- const r = t.editor;
2041
- r && (r.contentComponent = null, r.appContext = null);
2042
- }), { rootEl: e };
2043
- },
2044
- render() {
2045
- return Ne("div", {
2046
- ref: (t) => {
2047
- this.rootEl = t;
2048
- }
2049
- });
2050
- }
2051
- }), ki = Pe({
2052
- name: "FloatingMenu",
2053
- props: {
2054
- pluginKey: {
2055
- // TODO: TypeScript breaks :(
2056
- // type: [String, Object as PropType<Exclude<FloatingMenuPluginProps['pluginKey'], string>>],
2057
- type: null,
2058
- default: "floatingMenu"
2059
- },
2060
- editor: {
2061
- type: Object,
2062
- required: !0
2063
- },
2064
- tippyOptions: {
2065
- type: Object,
2066
- default: () => ({})
2067
- },
2068
- shouldShow: {
2069
- type: Function,
2070
- default: null
2071
- }
2072
- },
2073
- setup(t, { slots: e }) {
2074
- const n = pt(null);
2075
- return Et(() => {
2076
- const { pluginKey: r, editor: i, tippyOptions: a, shouldShow: s } = t;
2077
- i.registerPlugin(Pn({
2078
- pluginKey: r,
2079
- editor: i,
2080
- element: n.value,
2081
- tippyOptions: a,
2082
- shouldShow: s
2083
- }));
2084
- }), lt(() => {
2085
- const { pluginKey: r, editor: i } = t;
2086
- i.unregisterPlugin(r);
2087
- }), () => {
2088
- var r;
2089
- return Ne("div", { ref: n }, (r = e.default) === null || r === void 0 ? void 0 : r.call(e));
2090
- };
2091
- }
2092
- }), Vi = Pe({
2093
- name: "NodeViewContent",
2094
- props: {
2095
- as: {
2096
- type: String,
2097
- default: "div"
2098
- }
2099
- },
2100
- render() {
2101
- return Ne(this.as, {
2102
- style: {
2103
- whiteSpace: "pre-wrap"
2104
- },
2105
- "data-node-view-content": ""
2106
- });
2107
- }
2108
- }), _i = Pe({
2109
- name: "NodeViewWrapper",
2110
- props: {
2111
- as: {
2112
- type: String,
2113
- default: "div"
2114
- }
2115
- },
2116
- inject: ["onDragStart", "decorationClasses"],
2117
- render() {
2118
- var t, e;
2119
- return Ne(this.as, {
2120
- // @ts-ignore
2121
- class: this.decorationClasses,
2122
- style: {
2123
- whiteSpace: "normal"
2124
- },
2125
- "data-node-view-wrapper": "",
2126
- // @ts-ignore (https://github.com/vuejs/vue-next/issues/3031)
2127
- onDragstart: this.onDragStart
2128
- }, (e = (t = this.$slots).default) === null || e === void 0 ? void 0 : e.call(t));
2129
- }
2130
- }), Ii = (t = {}) => {
2131
- const e = zn();
2132
- return Et(() => {
2133
- e.value = new Ni(t);
2134
- }), lt(() => {
2135
- var n, r, i;
2136
- const a = (n = e.value) === null || n === void 0 ? void 0 : n.options.element, s = a == null ? void 0 : a.cloneNode(!0);
2137
- (r = a == null ? void 0 : a.parentNode) === null || r === void 0 || r.replaceChild(s, a), (i = e.value) === null || i === void 0 || i.destroy();
2138
- }), e;
2139
- };
2140
- class Mi {
2141
- constructor(e, { props: n = {}, editor: r }) {
2142
- this.editor = r, this.component = an(e), this.el = document.createElement("div"), this.props = Kn(n), this.renderedComponent = this.renderComponent();
2143
- }
2144
- get element() {
2145
- return this.renderedComponent.el;
2146
- }
2147
- get ref() {
2148
- var e, n, r, i;
2149
- return !((n = (e = this.renderedComponent.vNode) === null || e === void 0 ? void 0 : e.component) === null || n === void 0) && n.exposed ? this.renderedComponent.vNode.component.exposed : (i = (r = this.renderedComponent.vNode) === null || r === void 0 ? void 0 : r.component) === null || i === void 0 ? void 0 : i.proxy;
2150
- }
2151
- renderComponent() {
2152
- let e = Ne(this.component, this.props);
2153
- return this.editor.appContext && (e.appContext = this.editor.appContext), typeof document < "u" && this.el && Lt(e, this.el), { vNode: e, destroy: () => {
2154
- this.el && Lt(null, this.el), this.el = null, e = null;
2155
- }, el: this.el ? this.el.firstElementChild : null };
2156
- }
2157
- updateProps(e = {}) {
2158
- Object.entries(e).forEach(([n, r]) => {
2159
- this.props[n] = r;
2160
- }), this.renderComponent();
2161
- }
2162
- destroy() {
2163
- this.renderedComponent.destroy();
2164
- }
2165
- }
2166
- const Fi = {
2167
- editor: {
2168
- type: Object,
2169
- required: !0
2170
- },
2171
- node: {
2172
- type: Object,
2173
- required: !0
2174
- },
2175
- decorations: {
2176
- type: Object,
2177
- required: !0
2178
- },
2179
- selected: {
2180
- type: Boolean,
2181
- required: !0
2182
- },
2183
- extension: {
2184
- type: Object,
2185
- required: !0
2186
- },
2187
- getPos: {
2188
- type: Function,
2189
- required: !0
2190
- },
2191
- updateAttributes: {
2192
- type: Function,
2193
- required: !0
2194
- },
2195
- deleteNode: {
2196
- type: Function,
2197
- required: !0
2198
- },
2199
- view: {
2200
- type: Object,
2201
- required: !0
2202
- },
2203
- innerDecorations: {
2204
- type: Object,
2205
- required: !0
2206
- },
2207
- HTMLAttributes: {
2208
- type: Object,
2209
- required: !0
2210
- }
2211
- };
2212
- class Ri extends Fn {
2213
- mount() {
2214
- const e = {
2215
- editor: this.editor,
2216
- node: this.node,
2217
- decorations: this.decorations,
2218
- innerDecorations: this.innerDecorations,
2219
- view: this.view,
2220
- selected: !1,
2221
- extension: this.extension,
2222
- HTMLAttributes: this.HTMLAttributes,
2223
- getPos: () => this.getPos(),
2224
- updateAttributes: (i = {}) => this.updateAttributes(i),
2225
- deleteNode: () => this.deleteNode()
2226
- }, n = this.onDragStart.bind(this);
2227
- this.decorationClasses = pt(this.getDecorationClasses());
2228
- const r = Pe({
2229
- extends: { ...this.component },
2230
- props: Object.keys(e),
2231
- template: this.component.template,
2232
- setup: (i) => {
2233
- var a, s;
2234
- return jt("onDragStart", n), jt("decorationClasses", this.decorationClasses), (s = (a = this.component).setup) === null || s === void 0 ? void 0 : s.call(a, i, {
2235
- expose: () => {
2236
- }
2237
- });
2238
- },
2239
- // add support for scoped styles
2240
- // @ts-ignore
2241
- // eslint-disable-next-line
2242
- __scopeId: this.component.__scopeId,
2243
- // add support for CSS Modules
2244
- // @ts-ignore
2245
- // eslint-disable-next-line
2246
- __cssModules: this.component.__cssModules,
2247
- // add support for vue devtools
2248
- // @ts-ignore
2249
- // eslint-disable-next-line
2250
- __name: this.component.__name,
2251
- // @ts-ignore
2252
- // eslint-disable-next-line
2253
- __file: this.component.__file
2254
- });
2255
- this.handleSelectionUpdate = this.handleSelectionUpdate.bind(this), this.editor.on("selectionUpdate", this.handleSelectionUpdate), this.renderer = new Mi(r, {
2256
- editor: this.editor,
2257
- props: e
2258
- });
2259
- }
2260
- /**
2261
- * Return the DOM element.
2262
- * This is the element that will be used to display the node view.
2263
- */
2264
- get dom() {
2265
- if (!this.renderer.element || !this.renderer.element.hasAttribute("data-node-view-wrapper"))
2266
- throw Error("Please use the NodeViewWrapper component for your node view.");
2267
- return this.renderer.element;
2268
- }
2269
- /**
2270
- * Return the content DOM element.
2271
- * This is the element that will be used to display the rich-text content of the node.
2272
- */
2273
- get contentDOM() {
2274
- return this.node.isLeaf ? null : this.dom.querySelector("[data-node-view-content]");
2275
- }
2276
- /**
2277
- * On editor selection update, check if the node is selected.
2278
- * If it is, call `selectNode`, otherwise call `deselectNode`.
2279
- */
2280
- handleSelectionUpdate() {
2281
- const { from: e, to: n } = this.editor.state.selection, r = this.getPos();
2282
- if (typeof r == "number")
2283
- if (e <= r && n >= r + this.node.nodeSize) {
2284
- if (this.renderer.props.selected)
2285
- return;
2286
- this.selectNode();
2287
- } else {
2288
- if (!this.renderer.props.selected)
2289
- return;
2290
- this.deselectNode();
2291
- }
2292
- }
2293
- /**
2294
- * On update, update the React component.
2295
- * To prevent unnecessary updates, the `update` option can be used.
2296
- */
2297
- update(e, n, r) {
2298
- const i = (a) => {
2299
- this.decorationClasses.value = this.getDecorationClasses(), this.renderer.updateProps(a);
2300
- };
2301
- if (typeof this.options.update == "function") {
2302
- const a = this.node, s = this.decorations, u = this.innerDecorations;
2303
- return this.node = e, this.decorations = n, this.innerDecorations = r, this.options.update({
2304
- oldNode: a,
2305
- oldDecorations: s,
2306
- newNode: e,
2307
- newDecorations: n,
2308
- oldInnerDecorations: u,
2309
- innerDecorations: r,
2310
- updateProps: () => i({ node: e, decorations: n, innerDecorations: r })
2311
- });
2312
- }
2313
- return e.type !== this.node.type ? !1 : (e === this.node && this.decorations === n && this.innerDecorations === r || (this.node = e, this.decorations = n, this.innerDecorations = r, i({ node: e, decorations: n, innerDecorations: r })), !0);
2314
- }
2315
- /**
2316
- * Select the node.
2317
- * Add the `selected` prop and the `ProseMirror-selectednode` class.
2318
- */
2319
- selectNode() {
2320
- this.renderer.updateProps({
2321
- selected: !0
2322
- }), this.renderer.element && this.renderer.element.classList.add("ProseMirror-selectednode");
2323
- }
2324
- /**
2325
- * Deselect the node.
2326
- * Remove the `selected` prop and the `ProseMirror-selectednode` class.
2327
- */
2328
- deselectNode() {
2329
- this.renderer.updateProps({
2330
- selected: !1
2331
- }), this.renderer.element && this.renderer.element.classList.remove("ProseMirror-selectednode");
2332
- }
2333
- getDecorationClasses() {
2334
- return this.decorations.map((e) => e.type.attrs.class).flat().join(" ");
2335
- }
2336
- destroy() {
2337
- this.renderer.destroy(), this.editor.off("selectionUpdate", this.handleSelectionUpdate);
2338
- }
2339
- }
2340
- function $i(t, e) {
2341
- return (n) => {
2342
- if (!n.editor.contentComponent)
2343
- return {};
2344
- const r = typeof t == "function" && "__vccOpts" in t ? t.__vccOpts : t;
2345
- return new Ri(r, n, e);
2346
- };
2347
- }
2348
- export {
2349
- Hi as BubbleMenu,
2350
- qi as CommandManager,
2351
- Ni as Editor,
2352
- Bi as EditorContent,
2353
- on as Extension,
2354
- ki as FloatingMenu,
2355
- Ki as InputRule,
2356
- zi as Mark,
2357
- Yi as Node,
2358
- Xi as NodePos,
2359
- Fn as NodeView,
2360
- Vi as NodeViewContent,
2361
- _i as NodeViewWrapper,
2362
- Gi as PasteRule,
2363
- Ji as Tracker,
2364
- $i as VueNodeViewRenderer,
2365
- Mi as VueRenderer,
2366
- Qi as callOrReturn,
2367
- Zi as canInsertNode,
2368
- eo as combineTransactionSteps,
2369
- to as createChainableState,
2370
- no as createDocument,
2371
- ro as createNodeFromContent,
2372
- io as createStyleTag,
2373
- oo as defaultBlockAt,
2374
- ao as deleteProps,
2375
- so as elementFromString,
2376
- uo as escapeForRegEx,
2377
- po as extensions,
2378
- lo as findChildren,
2379
- co as findChildrenInRange,
2380
- fo as findDuplicates,
2381
- vo as findParentNode,
2382
- ho as findParentNodeClosestToPos,
2383
- mo as fromString,
2384
- go as generateHTML,
2385
- yo as generateJSON,
2386
- bo as generateText,
2387
- wo as getAttributes,
2388
- Oo as getAttributesFromExtensions,
2389
- xo as getChangedRanges,
2390
- Eo as getDebugJSON,
2391
- To as getExtensionField,
2392
- Co as getHTMLFromFragment,
2393
- Do as getMarkAttributes,
2394
- Ao as getMarkRange,
2395
- So as getMarkType,
2396
- Po as getMarksBetween,
2397
- No as getNodeAtPosition,
2398
- Mo as getNodeAttributes,
2399
- Ro as getNodeType,
2400
- Lo as getRenderedAttributes,
2401
- jo as getSchema,
2402
- Ho as getSchemaByResolvedExtensions,
2403
- Bo as getSchemaTypeByName,
2404
- ko as getSchemaTypeNameByName,
2405
- Vo as getSplittedAttributes,
2406
- Vn as getText,
2407
- _o as getTextBetween,
2408
- Io as getTextContentFromNodes,
2409
- _n as getTextSerializersFromSchema,
2410
- Fo as injectExtensionAttributesToParseRule,
2411
- $o as inputRulesPlugin,
2412
- Wo as isActive,
2413
- Uo as isAtEndOfNode,
2414
- qo as isAtStartOfNode,
2415
- Ko as isEmptyObject,
2416
- zo as isExtensionRulesEnabled,
2417
- Yo as isFunction,
2418
- Xo as isList,
2419
- Go as isMacOS,
2420
- Jo as isMarkActive,
2421
- Qo as isNodeActive,
2422
- Zo as isNodeEmpty,
2423
- kn as isNodeSelection,
2424
- ea as isNumber,
2425
- ta as isPlainObject,
2426
- na as isRegExp,
2427
- ra as isSafari,
2428
- ia as isString,
2429
- Bn as isTextSelection,
2430
- oa as isiOS,
2431
- aa as markInputRule,
2432
- sa as markPasteRule,
2433
- ua as mergeAttributes,
2434
- pa as mergeDeep,
2435
- la as minMax,
2436
- da as nodeInputRule,
2437
- ca as nodePasteRule,
2438
- Fi as nodeViewProps,
2439
- fa as objectIncludes,
2440
- va as pasteRulesPlugin,
2441
- rn as posToDOMRect,
2442
- ha as removeDuplicates,
2443
- ma as resolveFocusPosition,
2444
- ga as rewriteUnknownContent,
2445
- ya as selectionToInsertionEnd,
2446
- ba as splitExtensions,
2447
- wa as textInputRule,
2448
- Oa as textPasteRule,
2449
- xa as textblockTypeInputRule,
2450
- Ii as useEditor,
2451
- Ea as wrappingInputRule
2452
- };