reactjs-tiptap-editor 0.3.31 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/{ActionMenuButton-BCgqJsST.cjs → ActionMenuButton-CYdM1xx5.cjs} +1 -1
- package/lib/{ActionMenuButton-D97K0UWT.js → ActionMenuButton-DKRF6oa0.js} +1 -1
- package/lib/Attachment.cjs +2 -2
- package/lib/Attachment.d.cts +25 -29
- package/lib/Attachment.d.ts +25 -29
- package/lib/Attachment.js +7 -6
- package/lib/BaseKit.cjs +3 -0
- package/lib/BaseKit.d.cts +481 -0
- package/lib/BaseKit.d.ts +481 -0
- package/lib/BaseKit.js +132 -0
- package/lib/Blockquote.cjs +5 -1
- package/lib/Blockquote.d.cts +25 -29
- package/lib/Blockquote.d.ts +25 -29
- package/lib/Blockquote.js +33 -17
- package/lib/Bold.cjs +1 -1
- package/lib/Bold.d.cts +25 -29
- package/lib/Bold.d.ts +25 -29
- package/lib/Bold.js +23 -16
- package/lib/BulletList.cjs +1 -1
- package/lib/BulletList.d.cts +26 -30
- package/lib/BulletList.d.ts +26 -30
- package/lib/BulletList.js +11 -57
- package/lib/Clear.cjs +1 -1
- package/lib/Clear.d.cts +25 -29
- package/lib/Clear.d.ts +25 -29
- package/lib/Clear.js +4 -2
- package/lib/Code.cjs +1 -1
- package/lib/Code.d.cts +25 -29
- package/lib/Code.d.ts +25 -29
- package/lib/Code.js +29 -25
- package/lib/CodeBlock.cjs +2 -2
- package/lib/CodeBlock.d.cts +25 -29
- package/lib/CodeBlock.d.ts +25 -29
- package/lib/CodeBlock.js +3 -3
- package/lib/CodeView.cjs +1 -1
- package/lib/CodeView.d.cts +25 -29
- package/lib/CodeView.d.ts +25 -29
- package/lib/CodeView.js +3 -2
- package/lib/Color.cjs +1 -1
- package/lib/Color.d.cts +26 -30
- package/lib/Color.d.ts +26 -30
- package/lib/Color.js +42 -74
- package/lib/Document.cjs +1 -1
- package/lib/Document.d.cts +25 -29
- package/lib/Document.d.ts +25 -29
- package/lib/Document.js +4 -8
- package/lib/{Drawer-BHkje8ys.js → Drawer-CaAfmqNo.js} +37 -35
- package/lib/{Drawer-5Q_-WRhc.cjs → Drawer-CdvCMSzN.cjs} +1 -1
- package/lib/Drawer.cjs +1 -1
- package/lib/Drawer.d.cts +25 -29
- package/lib/Drawer.d.ts +25 -29
- package/lib/Drawer.js +4 -4
- package/lib/Emoji.cjs +1 -1
- package/lib/Emoji.d.cts +28 -30
- package/lib/Emoji.d.ts +28 -30
- package/lib/Emoji.js +19795 -184
- package/lib/{Excalidraw-GUVW-IqC.cjs → Excalidraw-BbMQhNvs.cjs} +1 -1
- package/lib/{Excalidraw-CG498239.js → Excalidraw-CVWz2Vyn.js} +20 -20
- package/lib/Excalidraw.cjs +1 -1
- package/lib/Excalidraw.d.cts +25 -29
- package/lib/Excalidraw.d.ts +25 -29
- package/lib/Excalidraw.js +3 -3
- package/lib/ExportPdf.cjs +1 -1
- package/lib/ExportPdf.d.cts +25 -29
- package/lib/ExportPdf.d.ts +25 -29
- package/lib/ExportPdf.js +4 -2
- package/lib/ExportWord.cjs +1 -1
- package/lib/ExportWord.d.cts +25 -29
- package/lib/ExportWord.d.ts +25 -29
- package/lib/ExportWord.js +22 -51
- package/lib/FontFamily.cjs +1 -1
- package/lib/FontFamily.d.cts +26 -30
- package/lib/FontFamily.d.ts +26 -30
- package/lib/FontFamily.js +44 -73
- package/lib/FontSize.cjs +1 -1
- package/lib/FontSize.d.cts +25 -29
- package/lib/FontSize.d.ts +25 -29
- package/lib/FontSize.js +7 -5
- package/lib/FormatPainter.cjs +1 -1
- package/lib/FormatPainter.d.cts +25 -29
- package/lib/FormatPainter.d.ts +25 -29
- package/lib/FormatPainter.js +4 -2
- package/lib/Heading.cjs +1 -1
- package/lib/Heading.d.cts +25 -29
- package/lib/Heading.d.ts +25 -29
- package/lib/Heading.js +71 -60
- package/lib/Highlight.cjs +1 -1
- package/lib/Highlight.d.cts +25 -29
- package/lib/Highlight.d.ts +25 -29
- package/lib/Highlight.js +5 -4
- package/lib/History.cjs +1 -1
- package/lib/History.d.cts +27 -31
- package/lib/History.d.ts +27 -31
- package/lib/History.js +39 -403
- package/lib/HorizontalRule.cjs +1 -1
- package/lib/HorizontalRule.d.cts +25 -29
- package/lib/HorizontalRule.d.ts +25 -29
- package/lib/HorizontalRule.js +16 -65
- package/lib/Iframe.cjs +1 -1
- package/lib/Iframe.d.cts +25 -29
- package/lib/Iframe.d.ts +25 -29
- package/lib/Iframe.js +4 -4
- package/lib/Image.cjs +1 -1
- package/lib/Image.d.cts +25 -29
- package/lib/Image.d.ts +25 -29
- package/lib/Image.js +3 -3
- package/lib/ImageGif.cjs +1 -1
- package/lib/ImageGif.d.cts +25 -29
- package/lib/ImageGif.d.ts +25 -29
- package/lib/ImageGif.js +5 -5
- package/lib/ImportWord.cjs +72 -72
- package/lib/ImportWord.d.cts +25 -29
- package/lib/ImportWord.d.ts +25 -29
- package/lib/ImportWord.js +5652 -5615
- package/lib/Indent.cjs +1 -1
- package/lib/Indent.d.cts +25 -29
- package/lib/Indent.d.ts +25 -29
- package/lib/Indent.js +4 -2
- package/lib/Italic.cjs +1 -1
- package/lib/Italic.d.cts +25 -29
- package/lib/Italic.d.ts +25 -29
- package/lib/Italic.js +20 -14
- package/lib/Katex.cjs +1 -1
- package/lib/Katex.d.cts +25 -29
- package/lib/Katex.d.ts +25 -29
- package/lib/Katex.js +12 -12
- package/lib/LineHeight.cjs +1 -1
- package/lib/LineHeight.d.cts +25 -29
- package/lib/LineHeight.d.ts +25 -29
- package/lib/LineHeight.js +5 -3
- package/lib/Link.cjs +1 -1
- package/lib/Link.d.cts +25 -29
- package/lib/Link.d.ts +25 -29
- package/lib/Link.js +4 -4
- package/lib/ListItem.cjs +1 -1
- package/lib/ListItem.d.cts +30 -30
- package/lib/ListItem.d.ts +30 -30
- package/lib/ListItem.js +4 -30
- package/lib/Mention.cjs +1 -1
- package/lib/Mention.d.cts +25 -29
- package/lib/Mention.d.ts +25 -29
- package/lib/Mention.js +161 -132
- package/lib/Mermaid.cjs +2 -2
- package/lib/Mermaid.d.cts +25 -29
- package/lib/Mermaid.d.ts +25 -29
- package/lib/Mermaid.js +50 -48
- package/lib/MoreMark.cjs +1 -1
- package/lib/MoreMark.d.cts +25 -29
- package/lib/MoreMark.d.ts +25 -29
- package/lib/MoreMark.js +5 -3
- package/lib/MultiColumn.cjs +1 -1
- package/lib/MultiColumn.d.cts +25 -29
- package/lib/MultiColumn.d.ts +25 -29
- package/lib/MultiColumn.js +2 -2
- package/lib/OrderedList.cjs +1 -1
- package/lib/OrderedList.d.cts +26 -30
- package/lib/OrderedList.d.ts +26 -30
- package/lib/OrderedList.js +11 -75
- package/lib/RichTextEditor-CxvwGvQG.cjs +142 -0
- package/lib/RichTextEditor-DGcKEUGr.js +22166 -0
- package/lib/SearchAndReplace.cjs +1 -1
- package/lib/SearchAndReplace.d.cts +38 -112
- package/lib/SearchAndReplace.d.ts +38 -112
- package/lib/SearchAndReplace.js +204 -192
- package/lib/Selection.cjs +1 -1
- package/lib/Selection.d.cts +25 -29
- package/lib/Selection.d.ts +25 -29
- package/lib/Selection.js +1 -1
- package/lib/SlashCommand.cjs +1 -1
- package/lib/SlashCommand.d.cts +25 -29
- package/lib/SlashCommand.d.ts +25 -29
- package/lib/SlashCommand.js +178 -223
- package/lib/Strike.cjs +1 -1
- package/lib/Strike.d.cts +25 -29
- package/lib/Strike.d.ts +25 -29
- package/lib/Strike.js +20 -14
- package/lib/SubAndSuperScript.cjs +1 -1
- package/lib/SubAndSuperScript.d.cts +25 -29
- package/lib/SubAndSuperScript.d.ts +25 -29
- package/lib/SubAndSuperScript.js +5 -3
- package/lib/Table.cjs +8 -10
- package/lib/Table.d.cts +28 -32
- package/lib/Table.d.ts +28 -32
- package/lib/Table.js +382 -2022
- package/lib/TableOfContent.cjs +1 -1
- package/lib/TableOfContent.d.cts +25 -29
- package/lib/TableOfContent.d.ts +25 -29
- package/lib/TableOfContent.js +5 -5
- package/lib/TaskList.cjs +1 -1
- package/lib/TaskList.d.cts +27 -31
- package/lib/TaskList.d.ts +27 -31
- package/lib/TaskList.js +12 -154
- package/lib/TextAlign.cjs +1 -1
- package/lib/TextAlign.d.cts +25 -29
- package/lib/TextAlign.d.ts +25 -29
- package/lib/TextAlign.js +11 -9
- package/lib/TextBubble.cjs +1 -1
- package/lib/TextBubble.d.cts +25 -29
- package/lib/TextBubble.d.ts +25 -29
- package/lib/TextBubble.js +5 -3
- package/lib/TextDirection.cjs +1 -1
- package/lib/TextDirection.d.cts +25 -29
- package/lib/TextDirection.d.ts +25 -29
- package/lib/TextDirection.js +2 -3
- package/lib/TextUnderline.cjs +1 -1
- package/lib/TextUnderline.d.cts +25 -29
- package/lib/TextUnderline.d.ts +25 -29
- package/lib/TextUnderline.js +40 -12
- package/lib/TrailingNode.cjs +1 -1
- package/lib/TrailingNode.d.cts +25 -29
- package/lib/TrailingNode.d.ts +25 -29
- package/lib/TrailingNode.js +1 -1
- package/lib/Twitter-BFULyqdR.js +1628 -0
- package/lib/Twitter-Cutpkh3h.cjs +1 -0
- package/lib/Twitter.cjs +1 -1
- package/lib/Twitter.d.cts +25 -29
- package/lib/Twitter.d.ts +25 -29
- package/lib/Twitter.js +3 -3
- package/lib/Video.cjs +1 -1
- package/lib/Video.d.cts +25 -29
- package/lib/Video.d.ts +25 -29
- package/lib/Video.js +3 -3
- package/lib/bubble-extra.cjs +2 -2
- package/lib/bubble-extra.d.cts +25 -29
- package/lib/bubble-extra.d.ts +25 -29
- package/lib/bubble-extra.js +200 -192
- package/lib/dom-dataset-_6-diIRQ.cjs +33 -0
- package/lib/dom-dataset-lYeH6gfI.js +2361 -0
- package/lib/index-5iBZLua9.cjs +12 -0
- package/lib/index-6D1J-A-o.cjs +1 -0
- package/lib/index-B96Cclrj.cjs +3 -0
- package/lib/index-BBz7Nmv9.js +55 -0
- package/lib/index-BeCTd5v2.cjs +1 -0
- package/lib/index-ByurDDMv.js +237 -0
- package/lib/index-CUogRI7j.cjs +1 -0
- package/lib/index-Ch6dBBad.js +709 -0
- package/lib/index-DF2Lp4HZ.cjs +100 -0
- package/lib/{index-LUL9mqY4.js → index-D_L6n8O8.js} +4 -4
- package/lib/index-Dbvi-Bvh.cjs +1 -0
- package/lib/index-DpCrt7xs.cjs +1 -0
- package/lib/index-DsAX1Vq8.cjs +1 -0
- package/lib/index-Dy4DlW9o.js +12 -0
- package/lib/index-J3jHHZ4d.js +200 -0
- package/lib/{index-CsK90iVd.js → index-LmrOdnen.js} +302 -389
- package/lib/index-VvXaaKe3.js +898 -0
- package/lib/index-kbO3iWqL.js +13432 -0
- package/lib/index.cjs +1 -2
- package/lib/index.d.cts +26 -229
- package/lib/index.d.ts +26 -229
- package/lib/index.js +2 -588
- package/lib/jsx-runtime-CT7Pcg-t.js +13 -0
- package/lib/jsx-runtime-C_NLcKys.cjs +1 -0
- package/lib/locale-bundle.cjs +1 -1
- package/lib/locale-bundle.d.cts +25 -29
- package/lib/locale-bundle.d.ts +25 -29
- package/lib/locale-bundle.js +1 -1
- package/lib/style.css +1 -1
- package/lib/{textarea-DdH64g04.cjs → textarea-DFo_aXnj.cjs} +1 -1
- package/lib/{textarea-CktfkXNe.js → textarea-aPtytkDx.js} +1 -1
- package/package.json +76 -70
- package/lib/RichTextEditor-DWlLqTl9.cjs +0 -140
- package/lib/RichTextEditor-KP2Rgcqe.js +0 -12751
- package/lib/Twitter-99ivY5qv.js +0 -1744
- package/lib/Twitter-BvfvUtNT.cjs +0 -17
- package/lib/dom-dataset-Byuf1YmW.cjs +0 -33
- package/lib/dom-dataset-Di3tIRrR.js +0 -1031
- package/lib/index-BI-IcZcN.cjs +0 -1
- package/lib/index-ByRfqzMr.cjs +0 -89
- package/lib/index-C1fzuXpN.js +0 -46
- package/lib/index-CbQQFj2T.js +0 -133
- package/lib/index-DI9T3iLd.js +0 -12354
- package/lib/index-D_A0TBRA.cjs +0 -1
- package/lib/index-DclQSrIx.cjs +0 -1
- package/lib/index-Z4b9rzn-.cjs +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { useSyncExternalStore as
|
|
5
|
-
const
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var W = (t, e, o) => e in t ? R(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
+
var S = (t, e, o) => W(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
+
import { useSyncExternalStore as I, useMemo as N, useEffect as U } from "react";
|
|
5
|
+
const P = "en", j = 200, mt = j - 80, gt = 20, ct = 1e5, ht = 16, ft = 10, bt = 10, kt = 2, vt = [
|
|
6
6
|
"#000000",
|
|
7
7
|
"#262626",
|
|
8
8
|
"#595959",
|
|
@@ -73,7 +73,7 @@ const w = "en", B = 200, lt = B - 80, rt = 20, dt = 1e5, at = 16, nt = 10, st =
|
|
|
73
73
|
"#061178",
|
|
74
74
|
"#22075E",
|
|
75
75
|
"#780650"
|
|
76
|
-
],
|
|
76
|
+
], Tt = [
|
|
77
77
|
"Inter",
|
|
78
78
|
"Comic Sans MS, Comic Sans",
|
|
79
79
|
"serif",
|
|
@@ -89,7 +89,7 @@ const w = "en", B = 200, lt = B - 80, rt = 20, dt = 1e5, at = 16, nt = 10, st =
|
|
|
89
89
|
"Lucida Console",
|
|
90
90
|
"Monaco",
|
|
91
91
|
"monospace"
|
|
92
|
-
],
|
|
92
|
+
], xt = [
|
|
93
93
|
"10px",
|
|
94
94
|
"11px",
|
|
95
95
|
"12px",
|
|
@@ -104,9 +104,9 @@ const w = "en", B = 200, lt = B - 80, rt = 20, dt = 1e5, at = 16, nt = 10, st =
|
|
|
104
104
|
"36px",
|
|
105
105
|
"48px",
|
|
106
106
|
"72px"
|
|
107
|
-
],
|
|
108
|
-
var
|
|
109
|
-
const
|
|
107
|
+
], yt = "default";
|
|
108
|
+
var M = /* @__PURE__ */ ((t) => (t[t["size-small"] = 200] = "size-small", t[t["size-medium"] = 500] = "size-medium", t["size-large"] = "100%", t))(M || {}), K = /* @__PURE__ */ ((t) => (t[t["size-small"] = 480] = "size-small", t[t["size-medium"] = 640] = "size-medium", t["size-large"] = "100%", t))(K || {});
|
|
109
|
+
const Ft = ["100%", "115%", "150%", "200%", "250%", "300%"], Ct = "1", _t = [
|
|
110
110
|
"bold",
|
|
111
111
|
"italic",
|
|
112
112
|
"underline",
|
|
@@ -118,347 +118,260 @@ const ht = ["100%", "115%", "150%", "200%", "250%", "300%"], ft = "1", bt = [
|
|
|
118
118
|
"highlight",
|
|
119
119
|
"textAlign"
|
|
120
120
|
];
|
|
121
|
-
function
|
|
122
|
-
updateComputed: t,
|
|
123
|
-
notifyEffect: o
|
|
124
|
-
}) {
|
|
125
|
-
let n, s;
|
|
121
|
+
function O({ update: t, notify: e, unwatched: o }) {
|
|
126
122
|
return {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
* @returns The newly created link object if the two are not already linked; otherwise `undefined`.
|
|
133
|
-
*/
|
|
134
|
-
link(e, i) {
|
|
135
|
-
const l = i.depsTail;
|
|
136
|
-
if (l !== void 0 && l.dep === e)
|
|
137
|
-
return;
|
|
138
|
-
const d = l !== void 0 ? l.nextDep : i.deps;
|
|
139
|
-
if (d !== void 0 && d.dep === e) {
|
|
140
|
-
i.depsTail = d;
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
const r = e.subsTail;
|
|
144
|
-
if (!(r !== void 0 && r.sub === i && f(r, i)))
|
|
145
|
-
return p(e, i, d, l);
|
|
146
|
-
},
|
|
147
|
-
/**
|
|
148
|
-
* Traverses and marks subscribers starting from the provided link.
|
|
149
|
-
*
|
|
150
|
-
* It sets flags (e.g., Dirty, PendingComputed, PendingEffect) on each subscriber
|
|
151
|
-
* to indicate which ones require re-computation or effect processing.
|
|
152
|
-
* This function should be called after a signal's value changes.
|
|
153
|
-
*
|
|
154
|
-
* @param link - The starting link from which propagation begins.
|
|
155
|
-
*/
|
|
156
|
-
propagate(e) {
|
|
157
|
-
let i = 32, l = e, d = 0;
|
|
158
|
-
t: do {
|
|
159
|
-
const r = e.sub, a = r.flags;
|
|
160
|
-
if (!(a & 244) && (r.flags = a | i | 8, !0) || a & 16 && !(a & 4) && (r.flags = a & -17 | i | 8, !0) || !(a & 224) && f(e, r) && (r.flags = a | 16 | i | 8, r.subs !== void 0)) {
|
|
161
|
-
const g = r.subs;
|
|
162
|
-
if (g !== void 0) {
|
|
163
|
-
g.nextSub !== void 0 ? (g.prevSub = l, e = l = g, i = 64, ++d) : (e = g, i = a & 2 ? 128 : 64);
|
|
164
|
-
continue;
|
|
165
|
-
}
|
|
166
|
-
a & 2 && (s !== void 0 ? s.depsTail.nextDep = r.deps : n = r, s = r);
|
|
167
|
-
} else a & (4 | i) ? !(a & i) && a & 224 && f(e, r) && (r.flags = a | i) : (r.flags = a | i | 8, (a & 10) === 2 && (s !== void 0 ? s.depsTail.nextDep = r.deps : n = r, s = r));
|
|
168
|
-
if ((e = l.nextSub) !== void 0) {
|
|
169
|
-
l = e, i = d ? 64 : 32;
|
|
170
|
-
continue;
|
|
171
|
-
}
|
|
172
|
-
for (; d; ) {
|
|
173
|
-
--d;
|
|
174
|
-
const x = l.dep.subs;
|
|
175
|
-
if (l = x.prevSub, x.prevSub = void 0, (e = l.nextSub) !== void 0) {
|
|
176
|
-
l = e, i = d ? 64 : 32;
|
|
177
|
-
continue t;
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
break;
|
|
181
|
-
} while (!0);
|
|
182
|
-
},
|
|
183
|
-
/**
|
|
184
|
-
* Prepares the given subscriber to track new dependencies.
|
|
185
|
-
*
|
|
186
|
-
* It resets the subscriber's internal pointers (e.g., depsTail) and
|
|
187
|
-
* sets its flags to indicate it is now tracking dependency links.
|
|
188
|
-
*
|
|
189
|
-
* @param sub - The subscriber to start tracking.
|
|
190
|
-
*/
|
|
191
|
-
startTracking(e) {
|
|
192
|
-
e.depsTail = void 0, e.flags = e.flags & -249 | 4;
|
|
193
|
-
},
|
|
194
|
-
/**
|
|
195
|
-
* Concludes tracking of dependencies for the specified subscriber.
|
|
196
|
-
*
|
|
197
|
-
* It clears or unlinks any tracked dependency information, then
|
|
198
|
-
* updates the subscriber's flags to indicate tracking is complete.
|
|
199
|
-
*
|
|
200
|
-
* @param sub - The subscriber whose tracking is ending.
|
|
201
|
-
*/
|
|
202
|
-
endTracking(e) {
|
|
203
|
-
const i = e.depsTail;
|
|
204
|
-
if (i !== void 0) {
|
|
205
|
-
const l = i.nextDep;
|
|
206
|
-
l !== void 0 && (b(l), i.nextDep = void 0);
|
|
207
|
-
} else e.deps !== void 0 && (b(e.deps), e.deps = void 0);
|
|
208
|
-
e.flags &= -5;
|
|
209
|
-
},
|
|
210
|
-
/**
|
|
211
|
-
* Updates the dirty flag for the given subscriber based on its dependencies.
|
|
212
|
-
*
|
|
213
|
-
* If the subscriber has any pending computeds, this function sets the Dirty flag
|
|
214
|
-
* and returns `true`. Otherwise, it clears the PendingComputed flag and returns `false`.
|
|
215
|
-
*
|
|
216
|
-
* @param sub - The subscriber to update.
|
|
217
|
-
* @param flags - The current flag set for this subscriber.
|
|
218
|
-
* @returns `true` if the subscriber is marked as Dirty; otherwise `false`.
|
|
219
|
-
*/
|
|
220
|
-
updateDirtyFlag(e, i) {
|
|
221
|
-
return h(e.deps) ? (e.flags = i | 32, !0) : (e.flags = i & -65, !1);
|
|
222
|
-
},
|
|
223
|
-
/**
|
|
224
|
-
* Updates the computed subscriber if necessary before its value is accessed.
|
|
225
|
-
*
|
|
226
|
-
* If the subscriber is marked Dirty or PendingComputed, this function runs
|
|
227
|
-
* the provided updateComputed logic and triggers a shallowPropagate for any
|
|
228
|
-
* downstream subscribers if an actual update occurs.
|
|
229
|
-
*
|
|
230
|
-
* @param computed - The computed subscriber to update.
|
|
231
|
-
* @param flags - The current flag set for this subscriber.
|
|
232
|
-
*/
|
|
233
|
-
processComputedUpdate(e, i) {
|
|
234
|
-
if ((i & 32 || (h(e.deps) || (e.flags = i & -65, !1))) && t(e)) {
|
|
235
|
-
const l = e.subs;
|
|
236
|
-
l !== void 0 && m(l);
|
|
237
|
-
}
|
|
238
|
-
},
|
|
239
|
-
/**
|
|
240
|
-
* Ensures all pending internal effects for the given subscriber are processed.
|
|
241
|
-
*
|
|
242
|
-
* This should be called after an effect decides not to re-run itself but may still
|
|
243
|
-
* have dependencies flagged with PendingEffect. If the subscriber is flagged with
|
|
244
|
-
* PendingEffect, this function clears that flag and invokes `notifyEffect` on any
|
|
245
|
-
* related dependencies marked as Effect and Propagated, processing pending effects.
|
|
246
|
-
*
|
|
247
|
-
* @param sub - The subscriber which may have pending effects.
|
|
248
|
-
* @param flags - The current flags on the subscriber to check.
|
|
249
|
-
*/
|
|
250
|
-
processPendingInnerEffects(e, i) {
|
|
251
|
-
if (i & 128) {
|
|
252
|
-
e.flags = i & -129;
|
|
253
|
-
let l = e.deps;
|
|
254
|
-
do {
|
|
255
|
-
const d = l.dep;
|
|
256
|
-
"flags" in d && d.flags & 2 && d.flags & 224 && o(d), l = l.nextDep;
|
|
257
|
-
} while (l !== void 0);
|
|
258
|
-
}
|
|
259
|
-
},
|
|
260
|
-
/**
|
|
261
|
-
* Processes queued effect notifications after a batch operation finishes.
|
|
262
|
-
*
|
|
263
|
-
* Iterates through all queued effects, calling notifyEffect on each.
|
|
264
|
-
* If an effect remains partially handled, its flags are updated, and future
|
|
265
|
-
* notifications may be triggered until fully handled.
|
|
266
|
-
*/
|
|
267
|
-
processEffectNotifications() {
|
|
268
|
-
for (; n !== void 0; ) {
|
|
269
|
-
const e = n, i = e.depsTail, l = i.nextDep;
|
|
270
|
-
l !== void 0 ? (i.nextDep = void 0, n = l.sub) : (n = void 0, s = void 0), o(e) || (e.flags &= -9);
|
|
271
|
-
}
|
|
272
|
-
}
|
|
123
|
+
link: a,
|
|
124
|
+
unlink: u,
|
|
125
|
+
propagate: k,
|
|
126
|
+
checkDirty: f,
|
|
127
|
+
shallowPropagate: b
|
|
273
128
|
};
|
|
274
|
-
function
|
|
275
|
-
const
|
|
276
|
-
|
|
277
|
-
|
|
129
|
+
function a(i, r, d) {
|
|
130
|
+
const n = r.depsTail;
|
|
131
|
+
if (n !== void 0 && n.dep === i)
|
|
132
|
+
return;
|
|
133
|
+
const l = n !== void 0 ? n.nextDep : r.deps;
|
|
134
|
+
if (l !== void 0 && l.dep === i) {
|
|
135
|
+
l.version = d, r.depsTail = l;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const s = i.subsTail;
|
|
139
|
+
if (s !== void 0 && s.version === d && s.sub === r)
|
|
140
|
+
return;
|
|
141
|
+
const p = r.depsTail = i.subsTail = {
|
|
142
|
+
version: d,
|
|
143
|
+
dep: i,
|
|
144
|
+
sub: r,
|
|
145
|
+
prevDep: n,
|
|
278
146
|
nextDep: l,
|
|
279
|
-
prevSub:
|
|
147
|
+
prevSub: s,
|
|
280
148
|
nextSub: void 0
|
|
281
149
|
};
|
|
282
|
-
|
|
283
|
-
e.subs = r;
|
|
284
|
-
else {
|
|
285
|
-
const a = e.subsTail;
|
|
286
|
-
r.prevSub = a, a.nextSub = r;
|
|
287
|
-
}
|
|
288
|
-
return i.depsTail = r, e.subsTail = r, r;
|
|
150
|
+
l !== void 0 && (l.prevDep = p), n !== void 0 ? n.nextDep = p : r.deps = p, s !== void 0 ? s.nextSub = p : i.subs = p;
|
|
289
151
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
152
|
+
function u(i, r = i.sub) {
|
|
153
|
+
const d = i.dep, n = i.prevDep, l = i.nextDep, s = i.nextSub, p = i.prevSub;
|
|
154
|
+
return l !== void 0 ? l.prevDep = n : r.depsTail = n, n !== void 0 ? n.nextDep = l : r.deps = l, s !== void 0 ? s.prevSub = p : d.subsTail = p, p !== void 0 ? p.nextSub = s : (d.subs = s) === void 0 && o(d), l;
|
|
155
|
+
}
|
|
156
|
+
function k(i) {
|
|
157
|
+
let r = i.nextSub, d;
|
|
292
158
|
t: do {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
if (
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
a.nextSub !== void 0 && m(a), l = !0;
|
|
301
|
-
}
|
|
302
|
-
} else if ((r & 65) === 65) {
|
|
303
|
-
const a = d.subs;
|
|
304
|
-
a.nextSub !== void 0 && (a.prevSub = e), e = d.deps, ++i;
|
|
159
|
+
const n = i.sub;
|
|
160
|
+
let l = n.flags;
|
|
161
|
+
if (l & 60 ? l & 12 ? l & 4 ? !(l & 48) && y(i, n) ? (n.flags = l | 40, l &= 1) : l = 0 : n.flags = l & -9 | 32 : l = 0 : n.flags = l | 32, l & 2 && e(n), l & 1) {
|
|
162
|
+
const s = n.subs;
|
|
163
|
+
if (s !== void 0) {
|
|
164
|
+
const p = (i = s).nextSub;
|
|
165
|
+
p !== void 0 && (d = { value: r, prev: d }, r = p);
|
|
305
166
|
continue;
|
|
306
167
|
}
|
|
307
168
|
}
|
|
308
|
-
if (
|
|
309
|
-
|
|
169
|
+
if ((i = r) !== void 0) {
|
|
170
|
+
r = i.nextSub;
|
|
310
171
|
continue;
|
|
311
172
|
}
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
173
|
+
for (; d !== void 0; )
|
|
174
|
+
if (i = d.value, d = d.prev, i !== void 0) {
|
|
175
|
+
r = i.nextSub;
|
|
176
|
+
continue t;
|
|
177
|
+
}
|
|
178
|
+
break;
|
|
179
|
+
} while (!0);
|
|
180
|
+
}
|
|
181
|
+
function f(i, r) {
|
|
182
|
+
let d, n = 0, l = !1;
|
|
183
|
+
t: do {
|
|
184
|
+
const s = i.dep, p = s.flags;
|
|
185
|
+
if (r.flags & 16)
|
|
186
|
+
l = !0;
|
|
187
|
+
else if ((p & 17) === 17) {
|
|
188
|
+
if (t(s)) {
|
|
189
|
+
const m = s.subs;
|
|
190
|
+
m.nextSub !== void 0 && b(m), l = !0;
|
|
191
|
+
}
|
|
192
|
+
} else if ((p & 33) === 33) {
|
|
193
|
+
(i.nextSub !== void 0 || i.prevSub !== void 0) && (d = { value: i, prev: d }), i = s.deps, r = s, ++n;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
196
|
+
if (!l) {
|
|
197
|
+
const m = i.nextDep;
|
|
198
|
+
if (m !== void 0) {
|
|
199
|
+
i = m;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
for (; n--; ) {
|
|
204
|
+
const m = r.subs, z = m.nextSub !== void 0;
|
|
205
|
+
if (z ? (i = d.value, d = d.prev) : i = m, l) {
|
|
206
|
+
if (t(r)) {
|
|
207
|
+
z && b(m), r = i.sub;
|
|
208
|
+
continue;
|
|
334
209
|
}
|
|
335
210
|
l = !1;
|
|
336
|
-
}
|
|
211
|
+
} else
|
|
212
|
+
r.flags &= -33;
|
|
213
|
+
r = i.sub;
|
|
214
|
+
const A = i.nextDep;
|
|
215
|
+
if (A !== void 0) {
|
|
216
|
+
i = A;
|
|
217
|
+
continue t;
|
|
218
|
+
}
|
|
337
219
|
}
|
|
338
220
|
return l;
|
|
339
221
|
} while (!0);
|
|
340
222
|
}
|
|
341
|
-
function
|
|
223
|
+
function b(i) {
|
|
342
224
|
do {
|
|
343
|
-
const
|
|
344
|
-
(
|
|
345
|
-
} while (
|
|
225
|
+
const r = i.sub, d = r.flags;
|
|
226
|
+
(d & 48) === 32 && (r.flags = d | 16, (d & 6) === 2 && e(r));
|
|
227
|
+
} while ((i = i.nextSub) !== void 0);
|
|
346
228
|
}
|
|
347
|
-
function
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
return !0;
|
|
354
|
-
if (d === l)
|
|
355
|
-
break;
|
|
356
|
-
d = d.nextDep;
|
|
357
|
-
} while (d !== void 0);
|
|
229
|
+
function y(i, r) {
|
|
230
|
+
let d = r.depsTail;
|
|
231
|
+
for (; d !== void 0; ) {
|
|
232
|
+
if (d === i)
|
|
233
|
+
return !0;
|
|
234
|
+
d = d.prevDep;
|
|
358
235
|
}
|
|
359
236
|
return !1;
|
|
360
237
|
}
|
|
361
|
-
function b(e) {
|
|
362
|
-
do {
|
|
363
|
-
const i = e.dep, l = e.nextDep, d = e.nextSub, r = e.prevSub;
|
|
364
|
-
if (d !== void 0 ? d.prevSub = r : i.subsTail = r, r !== void 0 ? r.nextSub = d : i.subs = d, i.subs === void 0 && "deps" in i) {
|
|
365
|
-
const a = i.flags;
|
|
366
|
-
a & 32 || (i.flags = a | 32);
|
|
367
|
-
const g = i.deps;
|
|
368
|
-
if (g !== void 0) {
|
|
369
|
-
e = g, i.depsTail.nextDep = l, i.deps = void 0, i.depsTail = void 0;
|
|
370
|
-
continue;
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
e = l;
|
|
374
|
-
} while (e !== void 0);
|
|
375
|
-
}
|
|
376
238
|
}
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
return n !== s ? (t.currentValue = s, !0) : !1;
|
|
393
|
-
} finally {
|
|
394
|
-
u = o, T(t);
|
|
239
|
+
let C = 0, v = 0, T = 0, h;
|
|
240
|
+
const g = [], { link: L, unlink: D, propagate: V, checkDirty: q, shallowPropagate: H } = O({
|
|
241
|
+
update(t) {
|
|
242
|
+
return t.depsTail !== void 0 ? Y(t) : E(t);
|
|
243
|
+
},
|
|
244
|
+
notify(t) {
|
|
245
|
+
var a;
|
|
246
|
+
let e = T, o = e;
|
|
247
|
+
do
|
|
248
|
+
if (t.flags &= -3, g[e++] = t, t = (a = t.subs) == null ? void 0 : a.sub, t === void 0 || !(t.flags & 2))
|
|
249
|
+
break;
|
|
250
|
+
while (!0);
|
|
251
|
+
for (T = e; o < --e; ) {
|
|
252
|
+
const u = g[o];
|
|
253
|
+
g[o++] = g[e], g[e] = u;
|
|
395
254
|
}
|
|
396
255
|
},
|
|
397
|
-
|
|
398
|
-
|
|
256
|
+
unwatched(t) {
|
|
257
|
+
t.flags & 1 ? t.depsTail !== void 0 && (t.depsTail = void 0, t.flags = 17, x(t)) : w.call(t);
|
|
399
258
|
}
|
|
400
|
-
})
|
|
401
|
-
function
|
|
402
|
-
|
|
259
|
+
});
|
|
260
|
+
function _(t) {
|
|
261
|
+
const e = h;
|
|
262
|
+
return h = t, e;
|
|
263
|
+
}
|
|
264
|
+
function G(t) {
|
|
265
|
+
return Q.bind({
|
|
403
266
|
currentValue: t,
|
|
267
|
+
pendingValue: t,
|
|
404
268
|
subs: void 0,
|
|
405
|
-
subsTail: void 0
|
|
269
|
+
subsTail: void 0,
|
|
270
|
+
flags: 1
|
|
406
271
|
});
|
|
407
272
|
}
|
|
408
|
-
function
|
|
409
|
-
const
|
|
273
|
+
function X(t) {
|
|
274
|
+
const e = {
|
|
410
275
|
fn: t,
|
|
411
276
|
subs: void 0,
|
|
412
277
|
subsTail: void 0,
|
|
413
278
|
deps: void 0,
|
|
414
279
|
depsTail: void 0,
|
|
415
|
-
flags:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
280
|
+
flags: 6
|
|
281
|
+
}, o = _(e);
|
|
282
|
+
o !== void 0 && L(e, o, 0);
|
|
283
|
+
try {
|
|
284
|
+
e.fn();
|
|
285
|
+
} finally {
|
|
286
|
+
h = o, e.flags &= -5;
|
|
287
|
+
}
|
|
288
|
+
return Z.bind(e);
|
|
419
289
|
}
|
|
420
|
-
function
|
|
421
|
-
|
|
422
|
-
|
|
290
|
+
function Y(t) {
|
|
291
|
+
++C, t.depsTail = void 0, t.flags = 5;
|
|
292
|
+
const e = _(t);
|
|
423
293
|
try {
|
|
424
|
-
t.
|
|
294
|
+
const o = t.value;
|
|
295
|
+
return o !== (t.value = t.getter(o));
|
|
425
296
|
} finally {
|
|
426
|
-
|
|
297
|
+
h = e, t.flags &= -5, x(t);
|
|
427
298
|
}
|
|
428
299
|
}
|
|
429
|
-
function
|
|
430
|
-
|
|
431
|
-
|
|
300
|
+
function E(t) {
|
|
301
|
+
return t.flags = 1, t.currentValue !== (t.currentValue = t.pendingValue);
|
|
302
|
+
}
|
|
303
|
+
function $(t) {
|
|
304
|
+
const e = t.flags;
|
|
305
|
+
if (e & 16 || e & 32 && q(t.deps, t)) {
|
|
306
|
+
++C, t.depsTail = void 0, t.flags = 6;
|
|
307
|
+
const o = _(t);
|
|
308
|
+
try {
|
|
309
|
+
t.fn();
|
|
310
|
+
} finally {
|
|
311
|
+
h = o, t.flags &= -5, x(t);
|
|
312
|
+
}
|
|
313
|
+
} else
|
|
314
|
+
t.flags = 2;
|
|
432
315
|
}
|
|
433
|
-
function
|
|
434
|
-
|
|
316
|
+
function J() {
|
|
317
|
+
for (; v < T; ) {
|
|
318
|
+
const t = g[v];
|
|
319
|
+
g[v++] = void 0, $(t);
|
|
320
|
+
}
|
|
321
|
+
v = 0, T = 0;
|
|
435
322
|
}
|
|
436
|
-
function
|
|
323
|
+
function Q(...t) {
|
|
324
|
+
var e;
|
|
437
325
|
if (t.length) {
|
|
438
|
-
if (this.
|
|
326
|
+
if (this.pendingValue !== (this.pendingValue = t[0])) {
|
|
327
|
+
this.flags = 17;
|
|
439
328
|
const o = this.subs;
|
|
440
|
-
o !== void 0 && (
|
|
329
|
+
o !== void 0 && (V(o), J());
|
|
441
330
|
}
|
|
442
|
-
} else
|
|
443
|
-
|
|
331
|
+
} else {
|
|
332
|
+
if (this.flags & 16 && E(this)) {
|
|
333
|
+
const a = this.subs;
|
|
334
|
+
a !== void 0 && H(a);
|
|
335
|
+
}
|
|
336
|
+
let o = h;
|
|
337
|
+
for (; o !== void 0; ) {
|
|
338
|
+
if (o.flags & 3) {
|
|
339
|
+
L(this, o, C);
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
o = (e = o.subs) == null ? void 0 : e.sub;
|
|
343
|
+
}
|
|
344
|
+
return this.currentValue;
|
|
345
|
+
}
|
|
444
346
|
}
|
|
445
|
-
function
|
|
446
|
-
|
|
347
|
+
function Z() {
|
|
348
|
+
w.call(this);
|
|
447
349
|
}
|
|
448
|
-
function
|
|
449
|
-
|
|
350
|
+
function w() {
|
|
351
|
+
this.depsTail = void 0, this.flags = 0, x(this);
|
|
352
|
+
const t = this.subs;
|
|
353
|
+
t !== void 0 && D(t);
|
|
450
354
|
}
|
|
451
|
-
function
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
355
|
+
function x(t) {
|
|
356
|
+
const e = t.depsTail;
|
|
357
|
+
let o = e !== void 0 ? e.nextDep : t.deps;
|
|
358
|
+
for (; o !== void 0; )
|
|
359
|
+
o = D(o, t);
|
|
360
|
+
}
|
|
361
|
+
function tt(t) {
|
|
362
|
+
return G(t);
|
|
363
|
+
}
|
|
364
|
+
function et(t) {
|
|
365
|
+
return [I((e) => {
|
|
366
|
+
let o = X(() => {
|
|
367
|
+
t(), e();
|
|
455
368
|
});
|
|
456
|
-
return () =>
|
|
457
|
-
}, () => t(), () => t()), (
|
|
458
|
-
t(typeof
|
|
369
|
+
return () => o();
|
|
370
|
+
}, () => t(), () => t()), (e) => {
|
|
371
|
+
t(typeof e == "function" ? e(t()) : e);
|
|
459
372
|
}];
|
|
460
373
|
}
|
|
461
|
-
function
|
|
374
|
+
function ot(t) {
|
|
462
375
|
return t = t || /* @__PURE__ */ new Map(), {
|
|
463
376
|
/**
|
|
464
377
|
* A Map of event names to registered handler functions.
|
|
@@ -471,9 +384,9 @@ function X(t) {
|
|
|
471
384
|
* @memberOf mitt
|
|
472
385
|
*/
|
|
473
386
|
//@ts-expect-error
|
|
474
|
-
on(
|
|
475
|
-
const
|
|
476
|
-
|
|
387
|
+
on(e, o) {
|
|
388
|
+
const a = t.get(e);
|
|
389
|
+
a ? a.push(o) : t.set(e, [o]);
|
|
477
390
|
},
|
|
478
391
|
/**
|
|
479
392
|
* Remove an event handler for the given type.
|
|
@@ -483,9 +396,9 @@ function X(t) {
|
|
|
483
396
|
* @memberOf mitt
|
|
484
397
|
*/
|
|
485
398
|
//@ts-expect-error
|
|
486
|
-
off(
|
|
487
|
-
const
|
|
488
|
-
|
|
399
|
+
off(e, o) {
|
|
400
|
+
const a = t.get(e);
|
|
401
|
+
a && (o ? a.splice(a.indexOf(o) >>> 0, 1) : t.set(e, []));
|
|
489
402
|
},
|
|
490
403
|
/**
|
|
491
404
|
* Invoke all handlers for the given type.
|
|
@@ -497,17 +410,17 @@ function X(t) {
|
|
|
497
410
|
* @param {Any} [evt] Any value (object is recommended and powerful), passed to each handler
|
|
498
411
|
* @memberOf mitt
|
|
499
412
|
*/
|
|
500
|
-
emit(
|
|
501
|
-
let
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
}),
|
|
505
|
-
|
|
413
|
+
emit(e, o) {
|
|
414
|
+
let a = t.get(e);
|
|
415
|
+
a && [...a].map((u) => {
|
|
416
|
+
u(o);
|
|
417
|
+
}), a = t.get("*"), a && [...a].map((u) => {
|
|
418
|
+
u(e, o);
|
|
506
419
|
});
|
|
507
420
|
}
|
|
508
421
|
};
|
|
509
422
|
}
|
|
510
|
-
const
|
|
423
|
+
const it = {
|
|
511
424
|
"editor.remove": "Remove",
|
|
512
425
|
"editor.copy": "Copy",
|
|
513
426
|
"editor.words": "WORDS",
|
|
@@ -683,7 +596,7 @@ const Y = {
|
|
|
683
596
|
"editor.upload.fileTypeNotSupported": "{fileName} file type not supported",
|
|
684
597
|
"editor.upload.fileSizeTooBig": "{fileName} file size too big, maximum size is {size}MB",
|
|
685
598
|
"editor.upload.error": "Error uploading file"
|
|
686
|
-
},
|
|
599
|
+
}, lt = {
|
|
687
600
|
"editor.remove": "Eltávolítás",
|
|
688
601
|
"editor.copy": "Másolás",
|
|
689
602
|
"editor.words": "SZAVAK",
|
|
@@ -859,7 +772,7 @@ const Y = {
|
|
|
859
772
|
"editor.upload.fileTypeNotSupported": "{fileName} fájltípus nem támogatott",
|
|
860
773
|
"editor.upload.fileSizeTooBig": "{fileName} fájlméret túl nagy, maximális méret {size}MB",
|
|
861
774
|
"editor.upload.error": "Hiba a fájl feltöltésekor"
|
|
862
|
-
},
|
|
775
|
+
}, rt = {
|
|
863
776
|
"editor.remove": "Remover",
|
|
864
777
|
"editor.copy": "Copiar",
|
|
865
778
|
"editor.words": "PALAVRAS",
|
|
@@ -1035,7 +948,7 @@ const Y = {
|
|
|
1035
948
|
"editor.upload.fileTypeNotSupported": "{fileName} tipo de arquivo não suportado",
|
|
1036
949
|
"editor.upload.fileSizeTooBig": "{fileName} tamanho do arquivo muito grande, o tamanho máximo é {size}MB",
|
|
1037
950
|
"editor.upload.error": "Erro ao enviar arquivo"
|
|
1038
|
-
},
|
|
951
|
+
}, dt = {
|
|
1039
952
|
"editor.remove": "Xóa",
|
|
1040
953
|
"editor.copy": "Sao chép",
|
|
1041
954
|
"editor.words": "TỪ",
|
|
@@ -1211,7 +1124,7 @@ const Y = {
|
|
|
1211
1124
|
"editor.upload.fileTypeNotSupported": "{fileName} loại tệp không được hỗ trợ",
|
|
1212
1125
|
"editor.upload.fileSizeTooBig": "{fileName} kích thước tệp quá lớn, kích thước tối đa là {size}MB",
|
|
1213
1126
|
"editor.upload.error": "Lỗi khi tải lên tệp"
|
|
1214
|
-
},
|
|
1127
|
+
}, at = {
|
|
1215
1128
|
"editor.remove": "移除",
|
|
1216
1129
|
"editor.copy": "复制",
|
|
1217
1130
|
"editor.words": "字数",
|
|
@@ -1387,7 +1300,7 @@ const Y = {
|
|
|
1387
1300
|
"editor.upload.fileTypeNotSupported": "{fileName} 文件类型不受支持",
|
|
1388
1301
|
"editor.upload.fileSizeTooBig": "{fileName} 文件大小超出限制,最大大小为 {size}MB",
|
|
1389
1302
|
"editor.upload.error": "上传文件时出错"
|
|
1390
|
-
},
|
|
1303
|
+
}, nt = {
|
|
1391
1304
|
"editor.remove": "Poista",
|
|
1392
1305
|
"editor.copy": "Kopioi",
|
|
1393
1306
|
"editor.words": "SANAT",
|
|
@@ -1564,121 +1477,121 @@ const Y = {
|
|
|
1564
1477
|
"editor.upload.fileSizeTooBig": "{fileName}-tiedosto liian suuri, suurin sallittu koko on {size}MB",
|
|
1565
1478
|
"editor.upload.error": "Virhe tiedoston latauksessa"
|
|
1566
1479
|
}, c = {
|
|
1567
|
-
lang:
|
|
1480
|
+
lang: P,
|
|
1568
1481
|
message: {
|
|
1569
|
-
en:
|
|
1570
|
-
hu_HU:
|
|
1571
|
-
vi:
|
|
1572
|
-
zh_CN:
|
|
1573
|
-
pt_BR:
|
|
1574
|
-
fi:
|
|
1482
|
+
en: it,
|
|
1483
|
+
hu_HU: lt,
|
|
1484
|
+
vi: dt,
|
|
1485
|
+
zh_CN: at,
|
|
1486
|
+
pt_BR: rt,
|
|
1487
|
+
fi: nt
|
|
1575
1488
|
}
|
|
1576
1489
|
};
|
|
1577
|
-
class
|
|
1490
|
+
class st {
|
|
1578
1491
|
constructor() {
|
|
1579
|
-
|
|
1580
|
-
this.emitter =
|
|
1492
|
+
S(this, "emitter");
|
|
1493
|
+
this.emitter = ot();
|
|
1581
1494
|
}
|
|
1582
1495
|
// Getter and setter for current language
|
|
1583
1496
|
get lang() {
|
|
1584
1497
|
return c.lang;
|
|
1585
1498
|
}
|
|
1586
|
-
set lang(
|
|
1587
|
-
if (!this.isLangSupported(
|
|
1499
|
+
set lang(e) {
|
|
1500
|
+
if (!this.isLangSupported(e)) {
|
|
1588
1501
|
console.warn(
|
|
1589
|
-
`Can't find the current language "${
|
|
1502
|
+
`Can't find the current language "${e}", Using language "${c.lang}" by default`
|
|
1590
1503
|
);
|
|
1591
1504
|
return;
|
|
1592
1505
|
}
|
|
1593
|
-
c.lang =
|
|
1506
|
+
c.lang = e, this.emitter.emit("lang", e);
|
|
1594
1507
|
}
|
|
1595
1508
|
// Getter and setter for messages
|
|
1596
1509
|
get message() {
|
|
1597
1510
|
return c.message;
|
|
1598
1511
|
}
|
|
1599
|
-
set message(
|
|
1600
|
-
c.message =
|
|
1512
|
+
set message(e) {
|
|
1513
|
+
c.message = e;
|
|
1601
1514
|
}
|
|
1602
1515
|
// Load messages for a specific language
|
|
1603
|
-
loadLangMessage(
|
|
1604
|
-
return this.message[
|
|
1516
|
+
loadLangMessage(e) {
|
|
1517
|
+
return this.message[e];
|
|
1605
1518
|
}
|
|
1606
1519
|
// Check if a language is supported
|
|
1607
|
-
isLangSupported(
|
|
1608
|
-
return Object.keys(this.message).includes(
|
|
1520
|
+
isLangSupported(e) {
|
|
1521
|
+
return Object.keys(this.message).includes(e);
|
|
1609
1522
|
}
|
|
1610
1523
|
// Set the current language
|
|
1611
|
-
setLang(
|
|
1612
|
-
this.lang =
|
|
1524
|
+
setLang(e) {
|
|
1525
|
+
this.lang = e;
|
|
1613
1526
|
}
|
|
1614
1527
|
// Register a language change watcher
|
|
1615
|
-
registerWatchLang(
|
|
1616
|
-
return this.emitter.on("lang",
|
|
1528
|
+
registerWatchLang(e) {
|
|
1529
|
+
return this.emitter.on("lang", e), {
|
|
1617
1530
|
unsubscribe: () => {
|
|
1618
|
-
this.emitter.off("lang",
|
|
1531
|
+
this.emitter.off("lang", e);
|
|
1619
1532
|
}
|
|
1620
1533
|
};
|
|
1621
1534
|
}
|
|
1622
1535
|
// Set messages for a specific language
|
|
1623
|
-
setMessage(
|
|
1624
|
-
this.message[
|
|
1536
|
+
setMessage(e, o) {
|
|
1537
|
+
this.message[e] = o;
|
|
1625
1538
|
}
|
|
1626
1539
|
// Build a translation function for a given language
|
|
1627
|
-
buildLocalesHandler(
|
|
1628
|
-
|
|
1629
|
-
const
|
|
1630
|
-
return function(
|
|
1631
|
-
let
|
|
1632
|
-
return
|
|
1633
|
-
|
|
1634
|
-
}),
|
|
1540
|
+
buildLocalesHandler(e) {
|
|
1541
|
+
e || (e = this.lang);
|
|
1542
|
+
const o = this.loadLangMessage(e);
|
|
1543
|
+
return function(u, k) {
|
|
1544
|
+
let f = o[u] || u;
|
|
1545
|
+
return k && Object.entries(k).forEach(([b, y]) => {
|
|
1546
|
+
f = f.replace(new RegExp(`\\{${b}\\}`, "g"), String(y));
|
|
1547
|
+
}), f;
|
|
1635
1548
|
};
|
|
1636
1549
|
}
|
|
1637
1550
|
}
|
|
1638
|
-
const
|
|
1639
|
-
function
|
|
1640
|
-
const [t,
|
|
1641
|
-
return
|
|
1642
|
-
const
|
|
1643
|
-
|
|
1551
|
+
const F = new st(), B = tt(c.lang);
|
|
1552
|
+
function zt() {
|
|
1553
|
+
const [t, e] = et(B), o = N(() => F.buildLocalesHandler(t), [t]);
|
|
1554
|
+
return U(() => {
|
|
1555
|
+
const a = F.registerWatchLang((u) => {
|
|
1556
|
+
e(u);
|
|
1644
1557
|
});
|
|
1645
1558
|
return () => {
|
|
1646
|
-
|
|
1559
|
+
a.unsubscribe();
|
|
1647
1560
|
};
|
|
1648
1561
|
}, []), {
|
|
1649
1562
|
lang: t,
|
|
1650
|
-
t:
|
|
1563
|
+
t: o
|
|
1651
1564
|
};
|
|
1652
1565
|
}
|
|
1653
|
-
const
|
|
1654
|
-
t: (t,
|
|
1566
|
+
const At = {
|
|
1567
|
+
t: (t, e) => F.buildLocalesHandler(B())(t, e)
|
|
1655
1568
|
};
|
|
1656
1569
|
export {
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1570
|
+
_t as B,
|
|
1571
|
+
vt as C,
|
|
1572
|
+
Tt as D,
|
|
1573
|
+
mt as E,
|
|
1574
|
+
ct as I,
|
|
1575
|
+
bt as T,
|
|
1576
|
+
K as V,
|
|
1577
|
+
it as a,
|
|
1578
|
+
lt as b,
|
|
1579
|
+
dt as c,
|
|
1580
|
+
at as d,
|
|
1581
|
+
rt as e,
|
|
1582
|
+
nt as f,
|
|
1583
|
+
xt as g,
|
|
1584
|
+
yt as h,
|
|
1585
|
+
gt as i,
|
|
1586
|
+
ht as j,
|
|
1587
|
+
Ct as k,
|
|
1588
|
+
F as l,
|
|
1589
|
+
Ft as m,
|
|
1590
|
+
At as n,
|
|
1591
|
+
ot as o,
|
|
1592
|
+
ft as p,
|
|
1593
|
+
kt as q,
|
|
1594
|
+
M as r,
|
|
1595
|
+
tt as s,
|
|
1596
|
+
zt as u
|
|
1684
1597
|
};
|