@fileverse-dev/ddoc 4.1.3 → 4.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-DYKmN9dA.mjs → index--yETGA3o.mjs} +594 -563
- package/dist/{index-VOygfODE.mjs → index-1AXvtX1K.mjs} +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{markdown-source-pane-DRN-NViE.mjs → markdown-source-pane-H0HfWH4A.mjs} +2 -2
- package/dist/package/sync-local/SyncManager.d.ts +3 -0
- package/dist/{split-view-toolbar-CYslDoHR.mjs → split-view-toolbar-26ml5HLY.mjs} +2 -2
- package/package.json +1 -1
|
@@ -3847,7 +3847,7 @@ class _1 {
|
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
3849
|
const A4 = /* @__PURE__ */ Object.create(null);
|
|
3850
|
-
class
|
|
3850
|
+
class So {
|
|
3851
3851
|
/**
|
|
3852
3852
|
Get the step map that represents the changes made by this step,
|
|
3853
3853
|
and which can be used to transform between positions in the old
|
|
@@ -3930,7 +3930,7 @@ function O8(e, t, n) {
|
|
|
3930
3930
|
}
|
|
3931
3931
|
return Pe.fromArray(r);
|
|
3932
3932
|
}
|
|
3933
|
-
class $u extends
|
|
3933
|
+
class $u extends So {
|
|
3934
3934
|
/**
|
|
3935
3935
|
Create a mark step.
|
|
3936
3936
|
*/
|
|
@@ -3968,8 +3968,8 @@ class $u extends To {
|
|
|
3968
3968
|
return new $u(n.from, n.to, t.markFromJSON(n.mark));
|
|
3969
3969
|
}
|
|
3970
3970
|
}
|
|
3971
|
-
|
|
3972
|
-
class Rs extends
|
|
3971
|
+
So.jsonID("addMark", $u);
|
|
3972
|
+
class Rs extends So {
|
|
3973
3973
|
/**
|
|
3974
3974
|
Create a mark-removing step.
|
|
3975
3975
|
*/
|
|
@@ -4007,8 +4007,8 @@ class Rs extends To {
|
|
|
4007
4007
|
return new Rs(n.from, n.to, t.markFromJSON(n.mark));
|
|
4008
4008
|
}
|
|
4009
4009
|
}
|
|
4010
|
-
|
|
4011
|
-
class Hu extends
|
|
4010
|
+
So.jsonID("removeMark", Rs);
|
|
4011
|
+
class Hu extends So {
|
|
4012
4012
|
/**
|
|
4013
4013
|
Create a node mark step.
|
|
4014
4014
|
*/
|
|
@@ -4051,8 +4051,8 @@ class Hu extends To {
|
|
|
4051
4051
|
return new Hu(n.pos, t.markFromJSON(n.mark));
|
|
4052
4052
|
}
|
|
4053
4053
|
}
|
|
4054
|
-
|
|
4055
|
-
class Hd extends
|
|
4054
|
+
So.jsonID("addNodeMark", Hu);
|
|
4055
|
+
class Hd extends So {
|
|
4056
4056
|
/**
|
|
4057
4057
|
Create a mark-removing step.
|
|
4058
4058
|
*/
|
|
@@ -4086,8 +4086,8 @@ class Hd extends To {
|
|
|
4086
4086
|
return new Hd(n.pos, t.markFromJSON(n.mark));
|
|
4087
4087
|
}
|
|
4088
4088
|
}
|
|
4089
|
-
|
|
4090
|
-
class Br extends
|
|
4089
|
+
So.jsonID("removeNodeMark", Hd);
|
|
4090
|
+
class Br extends So {
|
|
4091
4091
|
/**
|
|
4092
4092
|
The given `slice` should fit the 'gap' between `from` and
|
|
4093
4093
|
`to`—the depths must line up, and the surrounding nodes must be
|
|
@@ -4138,8 +4138,8 @@ class Br extends To {
|
|
|
4138
4138
|
return new Br(n.from, n.to, nt.fromJSON(t, n.slice), !!n.structure);
|
|
4139
4139
|
}
|
|
4140
4140
|
}
|
|
4141
|
-
|
|
4142
|
-
class qr extends
|
|
4141
|
+
So.jsonID("replace", Br);
|
|
4142
|
+
class qr extends So {
|
|
4143
4143
|
/**
|
|
4144
4144
|
Create a replace-around step with the given range and gap.
|
|
4145
4145
|
`insert` should be the point in the slice into which the content
|
|
@@ -4196,7 +4196,7 @@ class qr extends To {
|
|
|
4196
4196
|
return new qr(n.from, n.to, n.gapFrom, n.gapTo, nt.fromJSON(t, n.slice), n.insert, !!n.structure);
|
|
4197
4197
|
}
|
|
4198
4198
|
}
|
|
4199
|
-
|
|
4199
|
+
So.jsonID("replaceAround", qr);
|
|
4200
4200
|
function T5(e, t, n) {
|
|
4201
4201
|
let r = e.resolve(t), o = n - t, i = r.depth;
|
|
4202
4202
|
for (; o > 0 && i > 0 && r.indexAfter(i) == r.node(i).childCount; )
|
|
@@ -4783,7 +4783,7 @@ function tP(e, t) {
|
|
|
4783
4783
|
}
|
|
4784
4784
|
return n;
|
|
4785
4785
|
}
|
|
4786
|
-
class bh extends
|
|
4786
|
+
class bh extends So {
|
|
4787
4787
|
/**
|
|
4788
4788
|
Construct an attribute step.
|
|
4789
4789
|
*/
|
|
@@ -4820,8 +4820,8 @@ class bh extends To {
|
|
|
4820
4820
|
return new bh(n.pos, n.attr, n.value);
|
|
4821
4821
|
}
|
|
4822
4822
|
}
|
|
4823
|
-
|
|
4824
|
-
class S1 extends
|
|
4823
|
+
So.jsonID("attr", bh);
|
|
4824
|
+
class S1 extends So {
|
|
4825
4825
|
/**
|
|
4826
4826
|
Construct an attribute step.
|
|
4827
4827
|
*/
|
|
@@ -4854,7 +4854,7 @@ class S1 extends To {
|
|
|
4854
4854
|
return new S1(n.attr, n.value);
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
|
-
|
|
4857
|
+
So.jsonID("docAttr", S1);
|
|
4858
4858
|
let Mh = class extends Error {
|
|
4859
4859
|
};
|
|
4860
4860
|
Mh = function e(t) {
|
|
@@ -6454,7 +6454,7 @@ function Die(e, t, n) {
|
|
|
6454
6454
|
}
|
|
6455
6455
|
const za = typeof navigator < "u" ? navigator : null, X_ = typeof document < "u" ? document : null, Sc = za && za.userAgent || "", B5 = /Edge\/(\d+)/.exec(Sc), mP = /MSIE \d/.exec(Sc), N5 = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Sc), pi = !!(mP || N5 || B5), Zu = mP ? document.documentMode : N5 ? +N5[1] : B5 ? +B5[1] : 0, fs = !pi && /gecko\/(\d+)/i.test(Sc);
|
|
6456
6456
|
fs && +(/Firefox\/(\d+)/.exec(Sc) || [0, 0])[1];
|
|
6457
|
-
const M5 = !pi && /Chrome\/(\d+)/.exec(Sc), Fo = !!M5, bP = M5 ? +M5[1] : 0,
|
|
6457
|
+
const M5 = !pi && /Chrome\/(\d+)/.exec(Sc), Fo = !!M5, bP = M5 ? +M5[1] : 0, Wo = !pi && !!za && /Apple Computer/.test(za.vendor), Rh = Wo && (/Mobile\/\w+/.test(Sc) || !!za && za.maxTouchPoints > 2), ss = Rh || (za ? /Mac/.test(za.platform) : !1), kie = za ? /Win/.test(za.platform) : !1, El = /Android \d/.test(Sc), Pg = !!X_ && "webkitFontSmoothing" in X_.documentElement.style, Eie = Pg ? +(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent) || [0, 0])[1] : 0;
|
|
6458
6458
|
function Cie(e) {
|
|
6459
6459
|
let t = e.defaultView && e.defaultView.visualViewport;
|
|
6460
6460
|
return t ? {
|
|
@@ -6640,7 +6640,7 @@ function Oie(e, t) {
|
|
|
6640
6640
|
if (!V8(t, u) || (s = FP(e.dom, t, u), !s))
|
|
6641
6641
|
return null;
|
|
6642
6642
|
}
|
|
6643
|
-
if (
|
|
6643
|
+
if (Wo)
|
|
6644
6644
|
for (let u = s; r && u; u = Ih(u))
|
|
6645
6645
|
u.draggable && (r = void 0);
|
|
6646
6646
|
if (s = Bie(s, t), r) {
|
|
@@ -7048,7 +7048,7 @@ class zg {
|
|
|
7048
7048
|
f = m;
|
|
7049
7049
|
}
|
|
7050
7050
|
let a = this.domFromPos(t, t ? -1 : 1), l = n == t ? a : this.domFromPos(n, n ? -1 : 1), u = r.root.getSelection(), c = r.domSelectionRange(), d = !1;
|
|
7051
|
-
if ((fs ||
|
|
7051
|
+
if ((fs || Wo) && t == n) {
|
|
7052
7052
|
let { node: h, offset: f } = a;
|
|
7053
7053
|
if (h.nodeType == 3) {
|
|
7054
7054
|
if (d = !!(f && h.nodeValue[f - 1] == `
|
|
@@ -7071,7 +7071,7 @@ class zg {
|
|
|
7071
7071
|
let h = c.focusNode.childNodes[c.focusOffset];
|
|
7072
7072
|
h && h.contentEditable == "false" && (o = !0);
|
|
7073
7073
|
}
|
|
7074
|
-
if (!(o || d &&
|
|
7074
|
+
if (!(o || d && Wo) && Wd(a.node, a.offset, c.anchorNode, c.anchorOffset) && Wd(l.node, l.offset, c.focusNode, c.focusOffset))
|
|
7075
7075
|
return;
|
|
7076
7076
|
let p = !1;
|
|
7077
7077
|
if ((u.extend || t == n) && !(d && fs)) {
|
|
@@ -7676,7 +7676,7 @@ class Wie {
|
|
|
7676
7676
|
for (; t instanceof qd; )
|
|
7677
7677
|
n = t, t = n.children[n.children.length - 1];
|
|
7678
7678
|
(!t || // Empty textblock
|
|
7679
|
-
!(t instanceof Jx) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((
|
|
7679
|
+
!(t instanceof Jx) || /\n$/.test(t.node.text) || this.view.requiresGeckoHackNode && /\s$/.test(t.node.text)) && ((Wo || Fo) && t && t.dom.contentEditable == "false" && this.addHackNode("IMG", n), this.addHackNode("BR", this.top));
|
|
7680
7680
|
}
|
|
7681
7681
|
addHackNode(t, n) {
|
|
7682
7682
|
if (n == this.top && this.index < n.children.length && n.children[this.index].matchesHack(t))
|
|
@@ -7868,10 +7868,10 @@ function jl(e, t = !1) {
|
|
|
7868
7868
|
e.domObserver.setCurSelection(), e.domObserver.connectSelection();
|
|
7869
7869
|
}
|
|
7870
7870
|
}
|
|
7871
|
-
const oS =
|
|
7871
|
+
const oS = Wo || Fo && bP < 63;
|
|
7872
7872
|
function iS(e, t) {
|
|
7873
7873
|
let { node: n, offset: r } = e.docView.domFromPos(t, 0), o = r < n.childNodes.length ? n.childNodes[r] : null, i = r ? n.childNodes[r - 1] : null;
|
|
7874
|
-
if (
|
|
7874
|
+
if (Wo && o && o.contentEditable == "false")
|
|
7875
7875
|
return M4(o);
|
|
7876
7876
|
if ((!o || o.contentEditable == "false") && (!i || i.contentEditable == "false")) {
|
|
7877
7877
|
if (o)
|
|
@@ -7881,7 +7881,7 @@ function iS(e, t) {
|
|
|
7881
7881
|
}
|
|
7882
7882
|
}
|
|
7883
7883
|
function M4(e) {
|
|
7884
|
-
return e.contentEditable = "true",
|
|
7884
|
+
return e.contentEditable = "true", Wo && e.draggable && (e.draggable = !1, e.wasDraggable = !0), e;
|
|
7885
7885
|
}
|
|
7886
7886
|
function sS(e) {
|
|
7887
7887
|
e.contentEditable = "false", e.wasDraggable && (e.draggable = !0, e.wasDraggable = null);
|
|
@@ -8148,7 +8148,7 @@ function hS(e, t, n) {
|
|
|
8148
8148
|
e.domObserver.stop(), t.contentEditable = n, e.domObserver.start();
|
|
8149
8149
|
}
|
|
8150
8150
|
function rse(e) {
|
|
8151
|
-
if (!
|
|
8151
|
+
if (!Wo || e.state.selection.$head.parentOffset > 0)
|
|
8152
8152
|
return !1;
|
|
8153
8153
|
let { focusNode: t, focusOffset: n } = e.domSelectionRange();
|
|
8154
8154
|
if (t && t.nodeType == 1 && n == 0 && t.firstChild && t.firstChild.contentEditable == "false") {
|
|
@@ -8375,20 +8375,20 @@ function dse(e, t) {
|
|
|
8375
8375
|
}
|
|
8376
8376
|
return new nt(o, i, s);
|
|
8377
8377
|
}
|
|
8378
|
-
const
|
|
8378
|
+
const qo = {}, Vo = {}, pse = { touchstart: !0, touchmove: !0 };
|
|
8379
8379
|
class hse {
|
|
8380
8380
|
constructor() {
|
|
8381
8381
|
this.shiftKey = !1, this.mouseDown = null, this.lastKeyCode = null, this.lastKeyCodeTime = 0, this.lastClick = { time: 0, x: 0, y: 0, type: "", button: 0 }, this.lastSelectionOrigin = null, this.lastSelectionTime = 0, this.lastIOSEnter = 0, this.lastIOSEnterFallbackTimeout = -1, this.lastFocus = 0, this.lastTouch = 0, this.lastChromeDelete = 0, this.composing = !1, this.compositionNode = null, this.composingTimeout = -1, this.compositionNodes = [], this.compositionEndedAt = -2e8, this.compositionID = 1, this.compositionPendingChanges = 0, this.domChangeCount = 0, this.eventHandlers = /* @__PURE__ */ Object.create(null), this.hideSelectionGuard = null;
|
|
8382
8382
|
}
|
|
8383
8383
|
}
|
|
8384
8384
|
function fse(e) {
|
|
8385
|
-
for (let t in
|
|
8386
|
-
let n =
|
|
8385
|
+
for (let t in qo) {
|
|
8386
|
+
let n = qo[t];
|
|
8387
8387
|
e.dom.addEventListener(t, e.input.eventHandlers[t] = (r) => {
|
|
8388
|
-
mse(e, r) && !Y8(e, r) && (e.editable || !(r.type in
|
|
8388
|
+
mse(e, r) && !Y8(e, r) && (e.editable || !(r.type in Vo)) && n(e, r);
|
|
8389
8389
|
}, pse[t] ? { passive: !0 } : void 0);
|
|
8390
8390
|
}
|
|
8391
|
-
|
|
8391
|
+
Wo && e.dom.addEventListener("input", () => null), P5(e);
|
|
8392
8392
|
}
|
|
8393
8393
|
function Wu(e, t) {
|
|
8394
8394
|
e.input.lastSelectionOrigin = t, e.input.lastSelectionTime = Date.now();
|
|
@@ -8422,9 +8422,9 @@ function mse(e, t) {
|
|
|
8422
8422
|
return !0;
|
|
8423
8423
|
}
|
|
8424
8424
|
function bse(e, t) {
|
|
8425
|
-
!Y8(e, t) &&
|
|
8425
|
+
!Y8(e, t) && qo[t.type] && (e.editable || !(t.type in Vo)) && qo[t.type](e, t);
|
|
8426
8426
|
}
|
|
8427
|
-
|
|
8427
|
+
Vo.keydown = (e, t) => {
|
|
8428
8428
|
let n = t;
|
|
8429
8429
|
if (e.input.shiftKey = n.keyCode == 16 || n.shiftKey, !PP(e, n) && (e.input.lastKeyCode = n.keyCode, e.input.lastKeyCodeTime = Date.now(), !(El && Fo && n.keyCode == 13)))
|
|
8430
8430
|
if (n.keyCode != 229 && e.domObserver.forceFlush(), Rh && n.keyCode == 13 && !n.ctrlKey && !n.altKey && !n.metaKey) {
|
|
@@ -8434,10 +8434,10 @@ Ko.keydown = (e, t) => {
|
|
|
8434
8434
|
}, 200);
|
|
8435
8435
|
} else e.someProp("handleKeyDown", (r) => r(e, n)) || ise(e, n) ? n.preventDefault() : Wu(e, "key");
|
|
8436
8436
|
};
|
|
8437
|
-
|
|
8437
|
+
Vo.keyup = (e, t) => {
|
|
8438
8438
|
t.keyCode == 16 && (e.input.shiftKey = !1);
|
|
8439
8439
|
};
|
|
8440
|
-
|
|
8440
|
+
Vo.keypress = (e, t) => {
|
|
8441
8441
|
let n = t;
|
|
8442
8442
|
if (PP(e, n) || !n.charCode || n.ctrlKey && !n.altKey || ss && n.metaKey)
|
|
8443
8443
|
return;
|
|
@@ -8525,7 +8525,7 @@ function J8(e) {
|
|
|
8525
8525
|
return Wb(e);
|
|
8526
8526
|
}
|
|
8527
8527
|
const UP = ss ? "metaKey" : "ctrlKey";
|
|
8528
|
-
|
|
8528
|
+
qo.mousedown = (e, t) => {
|
|
8529
8529
|
let n = t;
|
|
8530
8530
|
e.input.shiftKey = n.shiftKey;
|
|
8531
8531
|
let r = J8(e), o = Date.now(), i = "singleClick";
|
|
@@ -8563,7 +8563,7 @@ class Ese {
|
|
|
8563
8563
|
return;
|
|
8564
8564
|
let n = this.pos;
|
|
8565
8565
|
this.view.state.doc != this.startDoc && (n = this.view.posAtCoords(Qx(t))), this.updateAllowDefault(t), this.allowDefault || !n ? Wu(this.view, "pointer") : Fse(this.view, n.pos, n.inside, t, this.selectNode) ? t.preventDefault() : t.button == 0 && (this.flushed || // Safari ignores clicks on draggable elements
|
|
8566
|
-
|
|
8566
|
+
Wo && this.mightDrag && !this.mightDrag.node.isAtom || // Chrome will sometimes treat a node selection as a
|
|
8567
8567
|
// cursor, but still report that the node is selected
|
|
8568
8568
|
// when asked through getSelection. You'll then get a
|
|
8569
8569
|
// situation where clicking at the point where that
|
|
@@ -8579,18 +8579,18 @@ class Ese {
|
|
|
8579
8579
|
!this.allowDefault && (Math.abs(this.event.x - t.clientX) > 4 || Math.abs(this.event.y - t.clientY) > 4) && (this.allowDefault = !0);
|
|
8580
8580
|
}
|
|
8581
8581
|
}
|
|
8582
|
-
|
|
8582
|
+
qo.touchstart = (e) => {
|
|
8583
8583
|
e.input.lastTouch = Date.now(), J8(e), Wu(e, "pointer");
|
|
8584
8584
|
};
|
|
8585
|
-
|
|
8585
|
+
qo.touchmove = (e) => {
|
|
8586
8586
|
e.input.lastTouch = Date.now(), Wu(e, "pointer");
|
|
8587
8587
|
};
|
|
8588
|
-
|
|
8588
|
+
qo.contextmenu = (e) => J8(e);
|
|
8589
8589
|
function PP(e, t) {
|
|
8590
|
-
return e.composing ? !0 :
|
|
8590
|
+
return e.composing ? !0 : Wo && Math.abs(t.timeStamp - e.input.compositionEndedAt) < 500 ? (e.input.compositionEndedAt = -2e8, !0) : !1;
|
|
8591
8591
|
}
|
|
8592
8592
|
const Cse = El ? 5e3 : -1;
|
|
8593
|
-
|
|
8593
|
+
Vo.compositionstart = Vo.compositionupdate = (e) => {
|
|
8594
8594
|
if (!e.composing) {
|
|
8595
8595
|
e.domObserver.flush();
|
|
8596
8596
|
let { state: t } = e, n = t.selection.$to;
|
|
@@ -8614,7 +8614,7 @@ Ko.compositionstart = Ko.compositionupdate = (e) => {
|
|
|
8614
8614
|
}
|
|
8615
8615
|
zP(e, Cse);
|
|
8616
8616
|
};
|
|
8617
|
-
|
|
8617
|
+
Vo.compositionend = (e, t) => {
|
|
8618
8618
|
e.composing && (e.input.composing = !1, e.input.compositionEndedAt = t.timeStamp, e.input.compositionPendingChanges = e.domObserver.pendingRecords().length ? e.input.compositionID : 0, e.input.compositionNode = null, e.input.compositionPendingChanges && Promise.resolve().then(() => e.domObserver.flush()), e.input.compositionID++, zP(e, 20));
|
|
8619
8619
|
};
|
|
8620
8620
|
function zP(e, t) {
|
|
@@ -8667,7 +8667,7 @@ function Sse(e, t) {
|
|
|
8667
8667
|
}, 50);
|
|
8668
8668
|
}
|
|
8669
8669
|
const T1 = pi && Zu < 15 || Rh && Eie < 604;
|
|
8670
|
-
|
|
8670
|
+
qo.copy = Vo.cut = (e, t) => {
|
|
8671
8671
|
let n = t, r = e.state.selection, o = n.type == "cut";
|
|
8672
8672
|
if (r.empty)
|
|
8673
8673
|
return;
|
|
@@ -8703,7 +8703,7 @@ function HP(e) {
|
|
|
8703
8703
|
let n = e.getData("text/uri-list");
|
|
8704
8704
|
return n ? n.replace(/\r?\n/g, " ") : "";
|
|
8705
8705
|
}
|
|
8706
|
-
|
|
8706
|
+
Vo.paste = (e, t) => {
|
|
8707
8707
|
let n = t;
|
|
8708
8708
|
if (e.composing && !El)
|
|
8709
8709
|
return;
|
|
@@ -8720,7 +8720,7 @@ function qP(e, t) {
|
|
|
8720
8720
|
let n = e.someProp("dragCopies", (r) => !r(t));
|
|
8721
8721
|
return n ?? !t[Bse];
|
|
8722
8722
|
}
|
|
8723
|
-
|
|
8723
|
+
qo.dragstart = (e, t) => {
|
|
8724
8724
|
let n = t, r = e.input.mouseDown;
|
|
8725
8725
|
if (r && r.done(), !n.dataTransfer)
|
|
8726
8726
|
return;
|
|
@@ -8736,14 +8736,14 @@ Vo.dragstart = (e, t) => {
|
|
|
8736
8736
|
let a = (s || e.state.selection).content(), { dom: l, text: u, slice: c } = X8(e, a);
|
|
8737
8737
|
(!n.dataTransfer.files.length || !Fo || bP > 120) && n.dataTransfer.clearData(), n.dataTransfer.setData(T1 ? "Text" : "text/html", l.innerHTML), n.dataTransfer.effectAllowed = "copyMove", T1 || n.dataTransfer.setData("text/plain", u), e.dragging = new WP(c, qP(e, n), s);
|
|
8738
8738
|
};
|
|
8739
|
-
|
|
8739
|
+
qo.dragend = (e) => {
|
|
8740
8740
|
let t = e.dragging;
|
|
8741
8741
|
window.setTimeout(() => {
|
|
8742
8742
|
e.dragging == t && (e.dragging = null);
|
|
8743
8743
|
}, 50);
|
|
8744
8744
|
};
|
|
8745
|
-
|
|
8746
|
-
|
|
8745
|
+
Vo.dragover = Vo.dragenter = (e, t) => t.preventDefault();
|
|
8746
|
+
Vo.drop = (e, t) => {
|
|
8747
8747
|
let n = t, r = e.dragging;
|
|
8748
8748
|
if (e.dragging = null, !n.dataTransfer)
|
|
8749
8749
|
return;
|
|
@@ -8781,16 +8781,16 @@ Ko.drop = (e, t) => {
|
|
|
8781
8781
|
}
|
|
8782
8782
|
e.focus(), e.dispatch(u.setMeta("uiEvent", "drop"));
|
|
8783
8783
|
};
|
|
8784
|
-
|
|
8784
|
+
qo.focus = (e) => {
|
|
8785
8785
|
e.input.lastFocus = Date.now(), e.focused || (e.domObserver.stop(), e.dom.classList.add("ProseMirror-focused"), e.domObserver.start(), e.focused = !0, setTimeout(() => {
|
|
8786
8786
|
e.docView && e.hasFocus() && !e.domObserver.currentSelection.eq(e.domSelectionRange()) && jl(e);
|
|
8787
8787
|
}, 20));
|
|
8788
8788
|
};
|
|
8789
|
-
|
|
8789
|
+
qo.blur = (e, t) => {
|
|
8790
8790
|
let n = t;
|
|
8791
8791
|
e.focused && (e.domObserver.stop(), e.dom.classList.remove("ProseMirror-focused"), e.domObserver.start(), n.relatedTarget && e.dom.contains(n.relatedTarget) && e.domObserver.currentSelection.clear(), e.focused = !1);
|
|
8792
8792
|
};
|
|
8793
|
-
|
|
8793
|
+
qo.beforeinput = (e, t) => {
|
|
8794
8794
|
if (Fo && El && t.inputType == "deleteContentBackward") {
|
|
8795
8795
|
e.domObserver.flushSoon();
|
|
8796
8796
|
let { domChangeCount: r } = e.input;
|
|
@@ -8802,8 +8802,8 @@ Vo.beforeinput = (e, t) => {
|
|
|
8802
8802
|
}, 50);
|
|
8803
8803
|
}
|
|
8804
8804
|
};
|
|
8805
|
-
for (let e in
|
|
8806
|
-
|
|
8805
|
+
for (let e in Vo)
|
|
8806
|
+
qo[e] = Vo[e];
|
|
8807
8807
|
function B1(e, t) {
|
|
8808
8808
|
if (e == t)
|
|
8809
8809
|
return !0;
|
|
@@ -9542,10 +9542,10 @@ function Wse(e) {
|
|
|
9542
9542
|
if (t)
|
|
9543
9543
|
return t.parseRule();
|
|
9544
9544
|
if (e.nodeName == "BR" && e.parentNode) {
|
|
9545
|
-
if (
|
|
9545
|
+
if (Wo && /^(ul|ol)$/i.test(e.parentNode.nodeName)) {
|
|
9546
9546
|
let n = document.createElement("div");
|
|
9547
9547
|
return n.appendChild(document.createElement("li")), { skip: n };
|
|
9548
|
-
} else if (e.parentNode.lastChild == e ||
|
|
9548
|
+
} else if (e.parentNode.lastChild == e || Wo && /^(tr|table)$/i.test(e.parentNode.nodeName))
|
|
9549
9549
|
return { ignore: !0 };
|
|
9550
9550
|
} else if (e.nodeName == "IMG" && e.getAttribute("mark-placeholder"))
|
|
9551
9551
|
return { ignore: !0 };
|
|
@@ -10024,7 +10024,7 @@ class YP {
|
|
|
10024
10024
|
*/
|
|
10025
10025
|
domSelectionRange() {
|
|
10026
10026
|
let t = this.domSelection();
|
|
10027
|
-
return t ?
|
|
10027
|
+
return t ? Wo && this.root.nodeType === 11 && wie(this.dom.ownerDocument) == this.dom && zse(this, t) || t : { focusNode: null, focusOffset: 0, anchorNode: null, anchorOffset: 0 };
|
|
10028
10028
|
}
|
|
10029
10029
|
/**
|
|
10030
10030
|
@internal
|
|
@@ -14639,7 +14639,7 @@ var bue = class extends Jle {
|
|
|
14639
14639
|
function eu(e, t) {
|
|
14640
14640
|
return (n) => n.editor.contentComponent ? new bue(e, n, t) : {};
|
|
14641
14641
|
}
|
|
14642
|
-
const Nz = ["top", "right", "bottom", "left"], PS = ["start", "end"], zS = /* @__PURE__ */ Nz.reduce((e, t) => e.concat(t, t + "-" + PS[0], t + "-" + PS[1]), []), Ha = Math.min,
|
|
14642
|
+
const Nz = ["top", "right", "bottom", "left"], PS = ["start", "end"], zS = /* @__PURE__ */ Nz.reduce((e, t) => e.concat(t, t + "-" + PS[0], t + "-" + PS[1]), []), Ha = Math.min, Lo = Math.max, Xb = Math.round, Ma = (e) => ({
|
|
14643
14643
|
x: e,
|
|
14644
14644
|
y: e
|
|
14645
14645
|
}), yue = {
|
|
@@ -14652,7 +14652,7 @@ const Nz = ["top", "right", "bottom", "left"], PS = ["start", "end"], zS = /* @_
|
|
|
14652
14652
|
end: "start"
|
|
14653
14653
|
};
|
|
14654
14654
|
function Y5(e, t, n) {
|
|
14655
|
-
return
|
|
14655
|
+
return Lo(e, Ha(t, n));
|
|
14656
14656
|
}
|
|
14657
14657
|
function tu(e, t) {
|
|
14658
14658
|
return typeof e == "function" ? e(t) : e;
|
|
@@ -15144,7 +15144,7 @@ const Bue = function(e) {
|
|
|
15144
15144
|
};
|
|
15145
15145
|
};
|
|
15146
15146
|
function Iz(e) {
|
|
15147
|
-
const t = Ha(...e.map((i) => i.left)), n = Ha(...e.map((i) => i.top)), r =
|
|
15147
|
+
const t = Ha(...e.map((i) => i.left)), n = Ha(...e.map((i) => i.top)), r = Lo(...e.map((i) => i.right)), o = Lo(...e.map((i) => i.bottom));
|
|
15148
15148
|
return {
|
|
15149
15149
|
x: t,
|
|
15150
15150
|
y: n,
|
|
@@ -15194,7 +15194,7 @@ const Mue = function(e) {
|
|
|
15194
15194
|
y: O
|
|
15195
15195
|
};
|
|
15196
15196
|
}
|
|
15197
|
-
const m = xs(n) === "left", b =
|
|
15197
|
+
const m = xs(n) === "left", b = Lo(...d.map((N) => N.right)), y = Ha(...d.map((N) => N.left)), F = d.filter((N) => m ? N.left === y : N.right === b), v = F[0].top, w = F[F.length - 1].bottom, D = y, k = b, E = k - D, A = w - v;
|
|
15198
15198
|
return {
|
|
15199
15199
|
top: v,
|
|
15200
15200
|
bottom: w,
|
|
@@ -15352,8 +15352,8 @@ const Rue = function(e) {
|
|
|
15352
15352
|
const y = g - c.top - c.bottom, F = f - c.left - c.right, v = Ha(g - c[m], y), w = Ha(f - c[b], F), D = !t.middlewareData.shift;
|
|
15353
15353
|
let k = v, E = w;
|
|
15354
15354
|
if ((n = t.middlewareData.shift) != null && n.enabled.x && (E = F), (r = t.middlewareData.shift) != null && r.enabled.y && (k = y), D && !p) {
|
|
15355
|
-
const N =
|
|
15356
|
-
h ? E = f - 2 * (N !== 0 || M !== 0 ? N + M :
|
|
15355
|
+
const N = Lo(c.left, 0), M = Lo(c.right, 0), _ = Lo(c.top, 0), O = Lo(c.bottom, 0);
|
|
15356
|
+
h ? E = f - 2 * (N !== 0 || M !== 0 ? N + M : Lo(c.left, c.right)) : k = g - 2 * (_ !== 0 || O !== 0 ? _ + O : Lo(c.top, c.bottom));
|
|
15357
15357
|
}
|
|
15358
15358
|
await l({
|
|
15359
15359
|
...t,
|
|
@@ -15582,10 +15582,10 @@ function Jue(e) {
|
|
|
15582
15582
|
return Array.from(e.getClientRects());
|
|
15583
15583
|
}
|
|
15584
15584
|
function Que(e) {
|
|
15585
|
-
const t = nu(e), n = p3(e), r = e.ownerDocument.body, o =
|
|
15585
|
+
const t = nu(e), n = p3(e), r = e.ownerDocument.body, o = Lo(t.scrollWidth, t.clientWidth, r.scrollWidth, r.clientWidth), i = Lo(t.scrollHeight, t.clientHeight, r.scrollHeight, r.clientHeight);
|
|
15586
15586
|
let s = -n.scrollLeft + h3(e);
|
|
15587
15587
|
const a = -n.scrollTop;
|
|
15588
|
-
return Zs(r).direction === "rtl" && (s +=
|
|
15588
|
+
return Zs(r).direction === "rtl" && (s += Lo(t.clientWidth, r.clientWidth) - o), {
|
|
15589
15589
|
width: o,
|
|
15590
15590
|
height: i,
|
|
15591
15591
|
x: s,
|
|
@@ -15668,7 +15668,7 @@ function oce(e) {
|
|
|
15668
15668
|
} = e;
|
|
15669
15669
|
const s = [...n === "clippingAncestors" ? d3(t) ? [] : rce(t, this._c) : [].concat(n), r], a = s[0], l = s.reduce((u, c) => {
|
|
15670
15670
|
const d = XS(t, c, o);
|
|
15671
|
-
return u.top =
|
|
15671
|
+
return u.top = Lo(d.top, u.top), u.right = Ha(d.right, u.right), u.bottom = Ha(d.bottom, u.bottom), u.left = Lo(d.left, u.left), u;
|
|
15672
15672
|
}, XS(t, a, o));
|
|
15673
15673
|
return {
|
|
15674
15674
|
width: l.right - l.left,
|
|
@@ -15975,7 +15975,7 @@ function hce(e) {
|
|
|
15975
15975
|
for (let n = 0; n < e.colspan; n++) t.push(0);
|
|
15976
15976
|
return t;
|
|
15977
15977
|
}
|
|
15978
|
-
function
|
|
15978
|
+
function Eo(e) {
|
|
15979
15979
|
let t = e.cached.tableNodeTypes;
|
|
15980
15980
|
if (!t) {
|
|
15981
15981
|
t = e.cached.tableNodeTypes = {};
|
|
@@ -16054,7 +16054,7 @@ function n$(e, t, n = 1) {
|
|
|
16054
16054
|
return r;
|
|
16055
16055
|
}
|
|
16056
16056
|
function bce(e, t, n) {
|
|
16057
|
-
const r =
|
|
16057
|
+
const r = Eo(t.type.schema).header_cell;
|
|
16058
16058
|
for (let o = 0; o < e.height; o++)
|
|
16059
16059
|
if (t.nodeAt(e.map[n + o * e.width]).type != r)
|
|
16060
16060
|
return !1;
|
|
@@ -16359,7 +16359,7 @@ function kce(e, t, n, r) {
|
|
|
16359
16359
|
c.firstChild && (h = c.firstChild.type.spec.tableRole);
|
|
16360
16360
|
const f = [];
|
|
16361
16361
|
for (let m = 0; m < p; m++) {
|
|
16362
|
-
const b =
|
|
16362
|
+
const b = Eo(e.schema)[h].createAndFill();
|
|
16363
16363
|
b && f.push(b);
|
|
16364
16364
|
}
|
|
16365
16365
|
const g = (l == 0 || s == l - 1) && a == l ? u + 1 : d - 1;
|
|
@@ -16389,7 +16389,7 @@ function s$(e, { map: t, tableStart: n, table: r }, o) {
|
|
|
16389
16389
|
n$(u.attrs, o - t.colCount(l))
|
|
16390
16390
|
), s += u.attrs.rowspan - 1;
|
|
16391
16391
|
} else {
|
|
16392
|
-
const l = i == null ?
|
|
16392
|
+
const l = i == null ? Eo(r.type.schema).cell : r.nodeAt(t.map[a + i]).type, u = t.positionAt(s, o, r);
|
|
16393
16393
|
e.insert(e.mapping.map(n + u), l.createAndFill());
|
|
16394
16394
|
}
|
|
16395
16395
|
}
|
|
@@ -16445,7 +16445,7 @@ function _ce(e, t) {
|
|
|
16445
16445
|
}
|
|
16446
16446
|
function Sce(e, t, n) {
|
|
16447
16447
|
var r;
|
|
16448
|
-
const o =
|
|
16448
|
+
const o = Eo(t.type.schema).header_cell;
|
|
16449
16449
|
for (let i = 0; i < e.width; i++)
|
|
16450
16450
|
if (((r = t.nodeAt(e.map[i + n * e.width])) == null ? void 0 : r.type) != o)
|
|
16451
16451
|
return !1;
|
|
@@ -16466,10 +16466,10 @@ function a$(e, { map: t, tableStart: n, table: r }, o) {
|
|
|
16466
16466
|
rowspan: p.rowspan + 1
|
|
16467
16467
|
}), u += p.colspan - 1;
|
|
16468
16468
|
} else {
|
|
16469
|
-
const d = l == null ?
|
|
16469
|
+
const d = l == null ? Eo(r.type.schema).cell : (i = r.nodeAt(t.map[c + l * t.width])) == null ? void 0 : i.type, p = d == null ? void 0 : d.createAndFill();
|
|
16470
16470
|
p && a.push(p);
|
|
16471
16471
|
}
|
|
16472
|
-
return e.insert(s,
|
|
16472
|
+
return e.insert(s, Eo(r.type.schema).row.create(null, a)), e;
|
|
16473
16473
|
}
|
|
16474
16474
|
function Tce(e, t) {
|
|
16475
16475
|
if (!ia(e)) return !1;
|
|
@@ -16586,7 +16586,7 @@ function JS(e, t) {
|
|
|
16586
16586
|
return !0;
|
|
16587
16587
|
}
|
|
16588
16588
|
function QS(e, t) {
|
|
16589
|
-
const n =
|
|
16589
|
+
const n = Eo(e.schema);
|
|
16590
16590
|
return Oce(({ node: r }) => n[r.type.spec.tableRole])(e, t);
|
|
16591
16591
|
}
|
|
16592
16592
|
function Oce(e) {
|
|
@@ -16663,7 +16663,7 @@ function Rce(e) {
|
|
|
16663
16663
|
return function(t, n) {
|
|
16664
16664
|
if (!ia(t)) return !1;
|
|
16665
16665
|
if (n) {
|
|
16666
|
-
const r =
|
|
16666
|
+
const r = Eo(t.schema), o = Za(t), i = t.tr, s = o.map.cellsInRect(
|
|
16667
16667
|
e == "column" ? {
|
|
16668
16668
|
left: o.left,
|
|
16669
16669
|
top: 0,
|
|
@@ -16712,7 +16712,7 @@ function I1(e, t) {
|
|
|
16712
16712
|
return t = t || { useDeprecatedLogic: !1 }, t.useDeprecatedLogic ? Rce(e) : function(n, r) {
|
|
16713
16713
|
if (!ia(n)) return !1;
|
|
16714
16714
|
if (r) {
|
|
16715
|
-
const o =
|
|
16715
|
+
const o = Eo(n.schema), i = Za(n), s = n.tr, a = eT("row", i, o), l = eT(
|
|
16716
16716
|
"column",
|
|
16717
16717
|
i,
|
|
16718
16718
|
o
|
|
@@ -16793,7 +16793,7 @@ function qm(e, t) {
|
|
|
16793
16793
|
const n = e.selection;
|
|
16794
16794
|
if (!(n instanceof Un)) return !1;
|
|
16795
16795
|
if (t) {
|
|
16796
|
-
const r = e.tr, o =
|
|
16796
|
+
const r = e.tr, o = Eo(e.schema).cell.createAndFill().content;
|
|
16797
16797
|
n.forEachCell((i, s) => {
|
|
16798
16798
|
i.content.eq(o) || r.replace(
|
|
16799
16799
|
r.mapping.map(s + 1),
|
|
@@ -16815,14 +16815,14 @@ function zce(e) {
|
|
|
16815
16815
|
let u = t.child(l).content;
|
|
16816
16816
|
const c = l ? 0 : Math.max(0, n - 1), d = l < t.childCount - 1 ? 0 : Math.max(0, r - 1);
|
|
16817
16817
|
(c || d) && (u = tD(
|
|
16818
|
-
|
|
16818
|
+
Eo(s).row,
|
|
16819
16819
|
new nt(u, c, d)
|
|
16820
16820
|
).content), a.push(u);
|
|
16821
16821
|
}
|
|
16822
16822
|
else if (i == "cell" || i == "header_cell")
|
|
16823
16823
|
a.push(
|
|
16824
16824
|
n || r ? tD(
|
|
16825
|
-
|
|
16825
|
+
Eo(s).row,
|
|
16826
16826
|
new nt(t, n, r)
|
|
16827
16827
|
).content : t
|
|
16828
16828
|
);
|
|
@@ -16844,7 +16844,7 @@ function $ce(e, t) {
|
|
|
16844
16844
|
for (let o = 0; o < n.length; o++) r = Math.max(r, n[o]);
|
|
16845
16845
|
for (let o = 0; o < n.length; o++)
|
|
16846
16846
|
if (o >= t.length && t.push(Pe.empty), n[o] < r) {
|
|
16847
|
-
const i =
|
|
16847
|
+
const i = Eo(e).cell.createAndFill(), s = [];
|
|
16848
16848
|
for (let a = n[o]; a < r; a++)
|
|
16849
16849
|
s.push(i);
|
|
16850
16850
|
t[o] = t[o].append(Pe.from(s));
|
|
@@ -16898,7 +16898,7 @@ function Hce({ width: e, height: t, rows: n }, r, o) {
|
|
|
16898
16898
|
return { width: e, height: t, rows: n };
|
|
16899
16899
|
}
|
|
16900
16900
|
function Wce(e, t, n, r, o, i, s) {
|
|
16901
|
-
const a = e.doc.type.schema, l =
|
|
16901
|
+
const a = e.doc.type.schema, l = Eo(a);
|
|
16902
16902
|
let u, c;
|
|
16903
16903
|
if (o > t.width)
|
|
16904
16904
|
for (let d = 0, p = 0; d < t.height; d++) {
|
|
@@ -17077,7 +17077,7 @@ function Kce(e, t, n) {
|
|
|
17077
17077
|
height: 1,
|
|
17078
17078
|
rows: [
|
|
17079
17079
|
Pe.from(
|
|
17080
|
-
tD(
|
|
17080
|
+
tD(Eo(e.state.schema).cell, n)
|
|
17081
17081
|
)
|
|
17082
17082
|
]
|
|
17083
17083
|
});
|
|
@@ -17219,7 +17219,7 @@ function Yce({
|
|
|
17219
17219
|
state: {
|
|
17220
17220
|
init(s, a) {
|
|
17221
17221
|
var l, u;
|
|
17222
|
-
const c = (u = (l = i.spec) == null ? void 0 : l.props) == null ? void 0 : u.nodeViews, d =
|
|
17222
|
+
const c = (u = (l = i.spec) == null ? void 0 : l.props) == null ? void 0 : u.nodeViews, d = Eo(a.schema).table.name;
|
|
17223
17223
|
return r && c && (c[d] = (p, h) => new r(p, n, h)), new Zce(-1, !1);
|
|
17224
17224
|
},
|
|
17225
17225
|
apply(s, a) {
|
|
@@ -22325,7 +22325,7 @@ class bu {
|
|
|
22325
22325
|
return this.size >= 2;
|
|
22326
22326
|
}
|
|
22327
22327
|
}
|
|
22328
|
-
var N9 = 0, ey = 1, wh = 2, Nl = 3, W1 = 4, hs = 5, Hh = 6,
|
|
22328
|
+
var N9 = 0, ey = 1, wh = 2, Nl = 3, W1 = 4, hs = 5, Hh = 6, Uo = 7, ka = [new bu(N9, 0, !1), new bu(ey, 0, !0), new bu(wh, 1, !1), new bu(Nl, 1, !0), new bu(W1, 2, !1), new bu(hs, 2, !0), new bu(Hh, 3, !1), new bu(Uo, 3, !0)], Ype = [W1, hs, W1, hs, Hh, Uo, Hh, Uo], Zpe = [hs, hs, hs, hs, Uo, Uo, Uo, Uo], Jpe = [wh, Nl, W1, hs, Hh, Uo, Hh, Uo], Qpe = [Nl, Nl, hs, hs, Uo, Uo, Uo, Uo], ehe = [ey, ey, Nl, Nl, hs, hs, Uo, Uo], the = [N9, ey, wh, Nl, wh, Nl, wh, Nl], Lt = {
|
|
22329
22329
|
DISPLAY: ka[N9],
|
|
22330
22330
|
TEXT: ka[wh],
|
|
22331
22331
|
SCRIPT: ka[W1],
|
|
@@ -25606,7 +25606,7 @@ function z(e, t, n, r, o, i) {
|
|
|
25606
25606
|
replace: r
|
|
25607
25607
|
}, i && r && (Hn[e][r] = Hn[e][o]);
|
|
25608
25608
|
}
|
|
25609
|
-
var q = "math", He = "text", ne = "main", xe = "ams", Jn = "accent-token", bt = "bin",
|
|
25609
|
+
var q = "math", He = "text", ne = "main", xe = "ams", Jn = "accent-token", bt = "bin", Xo = "close", Af = "inner", It = "mathord", Ar = "op-token", Ki = "open", y3 = "punct", we = "rel", ru = "spacing", Ce = "textord";
|
|
25610
25610
|
z(q, ne, we, "≡", "\\equiv", !0);
|
|
25611
25611
|
z(q, ne, we, "≺", "\\prec", !0);
|
|
25612
25612
|
z(q, ne, we, "≻", "\\succ", !0);
|
|
@@ -25663,9 +25663,9 @@ z(He, ne, Ce, "†", "\\textdagger");
|
|
|
25663
25663
|
z(q, ne, Ce, "‡", "\\ddag");
|
|
25664
25664
|
z(He, ne, Ce, "‡", "\\ddag");
|
|
25665
25665
|
z(He, ne, Ce, "‡", "\\textdaggerdbl");
|
|
25666
|
-
z(q, ne,
|
|
25666
|
+
z(q, ne, Xo, "⎱", "\\rmoustache", !0);
|
|
25667
25667
|
z(q, ne, Ki, "⎰", "\\lmoustache", !0);
|
|
25668
|
-
z(q, ne,
|
|
25668
|
+
z(q, ne, Xo, "⟯", "\\rgroup", !0);
|
|
25669
25669
|
z(q, ne, Ki, "⟮", "\\lgroup", !0);
|
|
25670
25670
|
z(q, ne, bt, "∓", "\\mp", !0);
|
|
25671
25671
|
z(q, ne, bt, "⊖", "\\ominus", !0);
|
|
@@ -25797,9 +25797,9 @@ z(q, xe, Ce, "ℷ", "\\gimel", !0);
|
|
|
25797
25797
|
z(q, xe, Ce, "ϝ", "\\digamma", !0);
|
|
25798
25798
|
z(q, xe, Ce, "ϰ", "\\varkappa");
|
|
25799
25799
|
z(q, xe, Ki, "┌", "\\@ulcorner", !0);
|
|
25800
|
-
z(q, xe,
|
|
25800
|
+
z(q, xe, Xo, "┐", "\\@urcorner", !0);
|
|
25801
25801
|
z(q, xe, Ki, "└", "\\@llcorner", !0);
|
|
25802
|
-
z(q, xe,
|
|
25802
|
+
z(q, xe, Xo, "┘", "\\@lrcorner", !0);
|
|
25803
25803
|
z(q, xe, we, "≦", "\\leqq", !0);
|
|
25804
25804
|
z(q, xe, we, "⩽", "\\leqslant", !0);
|
|
25805
25805
|
z(q, xe, we, "⪕", "\\eqslantless", !0);
|
|
@@ -26020,11 +26020,11 @@ z(q, ne, Ce, "√", "\\surd");
|
|
|
26020
26020
|
z(q, ne, Ki, "⟨", "\\langle", !0);
|
|
26021
26021
|
z(q, ne, Ki, "∣", "\\lvert");
|
|
26022
26022
|
z(q, ne, Ki, "∥", "\\lVert");
|
|
26023
|
-
z(q, ne,
|
|
26024
|
-
z(q, ne,
|
|
26025
|
-
z(q, ne,
|
|
26026
|
-
z(q, ne,
|
|
26027
|
-
z(q, ne,
|
|
26023
|
+
z(q, ne, Xo, "?", "?");
|
|
26024
|
+
z(q, ne, Xo, "!", "!");
|
|
26025
|
+
z(q, ne, Xo, "⟩", "\\rangle", !0);
|
|
26026
|
+
z(q, ne, Xo, "∣", "\\rvert");
|
|
26027
|
+
z(q, ne, Xo, "∥", "\\rVert");
|
|
26028
26028
|
z(q, ne, we, "=", "=");
|
|
26029
26029
|
z(q, ne, we, ":", ":");
|
|
26030
26030
|
z(q, ne, we, "≈", "\\approx", !0);
|
|
@@ -26080,23 +26080,23 @@ z(q, ne, bt, "▹", "\\triangleright");
|
|
|
26080
26080
|
z(q, ne, Ki, "{", "\\{");
|
|
26081
26081
|
z(He, ne, Ce, "{", "\\{");
|
|
26082
26082
|
z(He, ne, Ce, "{", "\\textbraceleft");
|
|
26083
|
-
z(q, ne,
|
|
26083
|
+
z(q, ne, Xo, "}", "\\}");
|
|
26084
26084
|
z(He, ne, Ce, "}", "\\}");
|
|
26085
26085
|
z(He, ne, Ce, "}", "\\textbraceright");
|
|
26086
26086
|
z(q, ne, Ki, "{", "\\lbrace");
|
|
26087
|
-
z(q, ne,
|
|
26087
|
+
z(q, ne, Xo, "}", "\\rbrace");
|
|
26088
26088
|
z(q, ne, Ki, "[", "\\lbrack", !0);
|
|
26089
26089
|
z(He, ne, Ce, "[", "\\lbrack", !0);
|
|
26090
|
-
z(q, ne,
|
|
26090
|
+
z(q, ne, Xo, "]", "\\rbrack", !0);
|
|
26091
26091
|
z(He, ne, Ce, "]", "\\rbrack", !0);
|
|
26092
26092
|
z(q, ne, Ki, "(", "\\lparen", !0);
|
|
26093
|
-
z(q, ne,
|
|
26093
|
+
z(q, ne, Xo, ")", "\\rparen", !0);
|
|
26094
26094
|
z(He, ne, Ce, "<", "\\textless", !0);
|
|
26095
26095
|
z(He, ne, Ce, ">", "\\textgreater", !0);
|
|
26096
26096
|
z(q, ne, Ki, "⌊", "\\lfloor", !0);
|
|
26097
|
-
z(q, ne,
|
|
26097
|
+
z(q, ne, Xo, "⌋", "\\rfloor", !0);
|
|
26098
26098
|
z(q, ne, Ki, "⌈", "\\lceil", !0);
|
|
26099
|
-
z(q, ne,
|
|
26099
|
+
z(q, ne, Xo, "⌉", "\\rceil", !0);
|
|
26100
26100
|
z(q, ne, Ce, "\\", "\\backslash");
|
|
26101
26101
|
z(q, ne, Ce, "∣", "|");
|
|
26102
26102
|
z(q, ne, Ce, "∣", "\\vert");
|
|
@@ -26237,9 +26237,9 @@ z(He, xe, Ce, "Z", "ℤ");
|
|
|
26237
26237
|
z(q, ne, It, "h", "ℎ");
|
|
26238
26238
|
z(He, ne, It, "h", "ℎ");
|
|
26239
26239
|
var Wt = "";
|
|
26240
|
-
for (var
|
|
26241
|
-
var ar = ty.charAt(
|
|
26242
|
-
Wt = String.fromCharCode(55349, 56320 +
|
|
26240
|
+
for (var No = 0; No < ty.length; No++) {
|
|
26241
|
+
var ar = ty.charAt(No);
|
|
26242
|
+
Wt = String.fromCharCode(55349, 56320 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56372 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56424 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56580 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56684 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56736 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56788 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56840 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56944 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), No < 26 && (Wt = String.fromCharCode(55349, 56632 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt), Wt = String.fromCharCode(55349, 56476 + No), z(q, ne, It, ar, Wt), z(He, ne, Ce, ar, Wt));
|
|
26243
26243
|
}
|
|
26244
26244
|
Wt = "𝕜";
|
|
26245
26245
|
z(q, ne, It, "k", Wt);
|
|
@@ -26426,11 +26426,11 @@ var Jm = [
|
|
|
26426
26426
|
s.height > n && (n = s.height), s.depth > r && (r = s.depth), s.maxFontSize > o && (o = s.maxFontSize);
|
|
26427
26427
|
}
|
|
26428
26428
|
t.height = n, t.depth = r, t.maxFontSize = o;
|
|
26429
|
-
},
|
|
26429
|
+
}, Jo = function(t, n, r, o) {
|
|
26430
26430
|
var i = new Gg(t, n, r, o);
|
|
26431
26431
|
return I9(i), i;
|
|
26432
26432
|
}, P$ = (e, t, n, r) => new Gg(e, t, n, r), She = function(t, n, r) {
|
|
26433
|
-
var o =
|
|
26433
|
+
var o = Jo([t], [], n);
|
|
26434
26434
|
return o.height = Math.max(r || n.fontMetrics().defaultRuleThickness, n.minRuleThickness), o.style.borderBottomWidth = tt(o.height), o.maxFontSize = 1, o;
|
|
26435
26435
|
}, The = function(t, n, r, o) {
|
|
26436
26436
|
var i = new O9(t, n, r, o);
|
|
@@ -26439,7 +26439,7 @@ var Jm = [
|
|
|
26439
26439
|
var n = new Kg(t);
|
|
26440
26440
|
return I9(n), n;
|
|
26441
26441
|
}, jhe = function(t, n) {
|
|
26442
|
-
return t instanceof Kg ?
|
|
26442
|
+
return t instanceof Kg ? Jo([], [t], n) : t;
|
|
26443
26443
|
}, Bhe = function(t) {
|
|
26444
26444
|
if (t.positionType === "individualShift") {
|
|
26445
26445
|
for (var n = t.children, r = [n[0]], o = -n[0].shift - n[0].elem.depth, i = o, s = 1; s < n.length; s++) {
|
|
@@ -26490,32 +26490,32 @@ var Jm = [
|
|
|
26490
26490
|
}
|
|
26491
26491
|
}
|
|
26492
26492
|
i += 2;
|
|
26493
|
-
var u =
|
|
26493
|
+
var u = Jo(["pstrut"], []);
|
|
26494
26494
|
u.style.height = tt(i);
|
|
26495
26495
|
for (var c = [], d = o, p = o, h = o, f = 0; f < r.length; f++) {
|
|
26496
26496
|
var g = r[f];
|
|
26497
26497
|
if (g.type === "kern")
|
|
26498
26498
|
h += g.size;
|
|
26499
26499
|
else {
|
|
26500
|
-
var m = g.elem, b = g.wrapperClasses || [], y = g.wrapperStyle || {}, F =
|
|
26500
|
+
var m = g.elem, b = g.wrapperClasses || [], y = g.wrapperStyle || {}, F = Jo(b, [u, m], void 0, y);
|
|
26501
26501
|
F.style.top = tt(-i - h - m.depth), g.marginLeft && (F.style.marginLeft = g.marginLeft), g.marginRight && (F.style.marginRight = g.marginRight), c.push(F), h += m.height + m.depth;
|
|
26502
26502
|
}
|
|
26503
26503
|
d = Math.min(d, h), p = Math.max(p, h);
|
|
26504
26504
|
}
|
|
26505
|
-
var v =
|
|
26505
|
+
var v = Jo(["vlist"], c);
|
|
26506
26506
|
v.style.height = tt(p);
|
|
26507
26507
|
var w;
|
|
26508
26508
|
if (d < 0) {
|
|
26509
|
-
var D =
|
|
26509
|
+
var D = Jo([], []), k = Jo(["vlist"], [D]);
|
|
26510
26510
|
k.style.height = tt(-d);
|
|
26511
|
-
var E =
|
|
26512
|
-
w = [
|
|
26511
|
+
var E = Jo(["vlist-s"], [new vs("")]);
|
|
26512
|
+
w = [Jo(["vlist-r"], [v, E]), Jo(["vlist-r"], [k])];
|
|
26513
26513
|
} else
|
|
26514
|
-
w = [
|
|
26515
|
-
var A =
|
|
26514
|
+
w = [Jo(["vlist-r"], [v])];
|
|
26515
|
+
var A = Jo(["vlist-t"], w);
|
|
26516
26516
|
return w.length === 2 && A.classes.push("vlist-t2"), A.height = p, A.depth = -d, A;
|
|
26517
26517
|
}, Mhe = (e, t) => {
|
|
26518
|
-
var n =
|
|
26518
|
+
var n = Jo(["mspace"], [], t), r = nr(e, t);
|
|
26519
26519
|
return n.style.marginRight = tt(r), n;
|
|
26520
26520
|
}, Qm = function(t, n, r) {
|
|
26521
26521
|
var o = "";
|
|
@@ -26614,7 +26614,7 @@ var Jm = [
|
|
|
26614
26614
|
fontMap: $$,
|
|
26615
26615
|
makeSymbol: Bs,
|
|
26616
26616
|
mathsym: khe,
|
|
26617
|
-
makeSpan:
|
|
26617
|
+
makeSpan: Jo,
|
|
26618
26618
|
makeSvgSpan: P$,
|
|
26619
26619
|
makeLineSpan: She,
|
|
26620
26620
|
makeAnchor: The,
|
|
@@ -34544,8 +34544,8 @@ const u0e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
|
34544
34544
|
for (let i = 0; i < e.length; )
|
|
34545
34545
|
t = o2[e.charAt(i++)] << 18 | o2[e.charAt(i++)] << 12 | (n = o2[e.charAt(i++)]) << 6 | (r = o2[e.charAt(i++)]), n === 64 ? o.push(hb(t >> 16 & 255)) : r === 64 ? o.push(hb(t >> 16 & 255, t >> 8 & 255)) : o.push(hb(t >> 16 & 255, t >> 8 & 255, t & 255));
|
|
34546
34546
|
return o.join("");
|
|
34547
|
-
}, g0e = typeof atob == "function" ? (e) => atob(PH(e)) : E3 ? (e) => Buffer.from(e, "base64").toString("binary") : f0e, m0e = E3 ? (e) => JT(Buffer.from(e, "base64")) : (e) => JT(g0e(e).split("").map((t) => t.charCodeAt(0))),
|
|
34548
|
-
const t =
|
|
34547
|
+
}, g0e = typeof atob == "function" ? (e) => atob(PH(e)) : E3 ? (e) => Buffer.from(e, "base64").toString("binary") : f0e, m0e = E3 ? (e) => JT(Buffer.from(e, "base64")) : (e) => JT(g0e(e).split("").map((t) => t.charCodeAt(0))), Po = (e) => m0e(b0e(e)), b0e = (e) => PH(e.replace(/[-_]/g, (t) => t == "-" ? "+" : "/")), zo = () => /* @__PURE__ */ new Map(), FD = (e) => {
|
|
34548
|
+
const t = zo();
|
|
34549
34549
|
return e.forEach((n, r) => {
|
|
34550
34550
|
t.set(r, n);
|
|
34551
34551
|
}), t;
|
|
@@ -34573,7 +34573,7 @@ const u0e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
|
|
|
34573
34573
|
}, wD = Array.isArray;
|
|
34574
34574
|
class zH {
|
|
34575
34575
|
constructor() {
|
|
34576
|
-
this._observers =
|
|
34576
|
+
this._observers = zo();
|
|
34577
34577
|
}
|
|
34578
34578
|
/**
|
|
34579
34579
|
* @template {keyof EVENTS & string} NAME
|
|
@@ -34627,15 +34627,15 @@ class zH {
|
|
|
34627
34627
|
* @param {Parameters<EVENTS[NAME]>} args The arguments that are applied to the event listener.
|
|
34628
34628
|
*/
|
|
34629
34629
|
emit(t, n) {
|
|
34630
|
-
return zl((this._observers.get(t) ||
|
|
34630
|
+
return zl((this._observers.get(t) || zo()).values()).forEach((r) => r(...n));
|
|
34631
34631
|
}
|
|
34632
34632
|
destroy() {
|
|
34633
|
-
this._observers =
|
|
34633
|
+
this._observers = zo();
|
|
34634
34634
|
}
|
|
34635
34635
|
}
|
|
34636
34636
|
class $H {
|
|
34637
34637
|
constructor() {
|
|
34638
|
-
this._observers =
|
|
34638
|
+
this._observers = zo();
|
|
34639
34639
|
}
|
|
34640
34640
|
/**
|
|
34641
34641
|
* @param {N} name
|
|
@@ -34672,13 +34672,13 @@ class $H {
|
|
|
34672
34672
|
* @param {Array<any>} args The arguments that are applied to the event listener.
|
|
34673
34673
|
*/
|
|
34674
34674
|
emit(t, n) {
|
|
34675
|
-
return zl((this._observers.get(t) ||
|
|
34675
|
+
return zl((this._observers.get(t) || zo()).values()).forEach((r) => r(...n));
|
|
34676
34676
|
}
|
|
34677
34677
|
destroy() {
|
|
34678
|
-
this._observers =
|
|
34678
|
+
this._observers = zo();
|
|
34679
34679
|
}
|
|
34680
34680
|
}
|
|
34681
|
-
const qa = Math.floor, fb = Math.abs, Ol = (e, t) => e < t ? e : t, Js = (e, t) => e > t ? e : t, HH = (e) => e !== 0 ? e < 0 : 1 / e < 0, ej = 1, tj = 2, pF = 4, hF = 8, K1 = 32, Il = 64,
|
|
34681
|
+
const qa = Math.floor, fb = Math.abs, Ol = (e, t) => e < t ? e : t, Js = (e, t) => e > t ? e : t, HH = (e) => e !== 0 ? e < 0 : 1 / e < 0, ej = 1, tj = 2, pF = 4, hF = 8, K1 = 32, Il = 64, $o = 128, w0e = 1 << 29, C3 = 31, DD = 63, Ad = 127, D0e = 2147483647, WH = Number.MAX_SAFE_INTEGER, k0e = Number.isInteger || ((e) => typeof e == "number" && isFinite(e) && qa(e) === e), E0e = String.fromCharCode, C0e = (e) => e.toLowerCase(), A0e = /^\s*/g, _0e = (e) => e.replace(A0e, ""), S0e = /([A-Z])/g, nj = (e, t) => _0e(e.replace(S0e, (n) => `${t}${C0e(n)}`)), T0e = (e) => {
|
|
34682
34682
|
const t = unescape(encodeURIComponent(e)), n = t.length, r = new Uint8Array(n);
|
|
34683
34683
|
for (let o = 0; o < n; o++)
|
|
34684
34684
|
r[o] = /** @type {number} */
|
|
@@ -34719,12 +34719,12 @@ const mp = () => new Yg(), N0e = (e) => {
|
|
|
34719
34719
|
e.cpos === n && (e.bufs.push(e.cbuf), e.cbuf = new Uint8Array(n * 2), e.cpos = 0), e.cbuf[e.cpos++] = t;
|
|
34720
34720
|
}, X1 = Ur, nn = (e, t) => {
|
|
34721
34721
|
for (; t > Ad; )
|
|
34722
|
-
Ur(e,
|
|
34722
|
+
Ur(e, $o | Ad & t), t = qa(t / 128);
|
|
34723
34723
|
Ur(e, Ad & t);
|
|
34724
34724
|
}, A3 = (e, t) => {
|
|
34725
34725
|
const n = HH(t);
|
|
34726
|
-
for (n && (t = -t), Ur(e, (t > DD ?
|
|
34727
|
-
Ur(e, (t > Ad ?
|
|
34726
|
+
for (n && (t = -t), Ur(e, (t > DD ? $o : 0) | (n ? Il : 0) | DD & t), t = qa(t / 64); t > 0; )
|
|
34727
|
+
Ur(e, (t > Ad ? $o : 0) | Ad & t), t = qa(t / 128);
|
|
34728
34728
|
}, kD = new Uint8Array(3e4), I0e = kD.length / 3, R0e = (e, t) => {
|
|
34729
34729
|
if (t.length < I0e) {
|
|
34730
34730
|
const n = G1.encodeInto(t, kD).written || 0;
|
|
@@ -34870,7 +34870,7 @@ class H0e {
|
|
|
34870
34870
|
}
|
|
34871
34871
|
const $l = (e) => new Error(e), qs = () => {
|
|
34872
34872
|
throw $l("Method unimplemented");
|
|
34873
|
-
},
|
|
34873
|
+
}, Co = () => {
|
|
34874
34874
|
throw $l("Unexpected case");
|
|
34875
34875
|
}, qH = $l("Unexpected end of array"), VH = $l("Integer out of Range");
|
|
34876
34876
|
let S3 = class {
|
|
@@ -34889,7 +34889,7 @@ const jc = (e) => new S3(e), KH = (e) => e.pos !== e.arr.length, W0e = (e, t) =>
|
|
|
34889
34889
|
const r = e.arr.length;
|
|
34890
34890
|
for (; e.pos < r; ) {
|
|
34891
34891
|
const o = e.arr[e.pos++];
|
|
34892
|
-
if (t = t + (o & Ad) * n, n *= 128, o <
|
|
34892
|
+
if (t = t + (o & Ad) * n, n *= 128, o < $o)
|
|
34893
34893
|
return t;
|
|
34894
34894
|
if (t > WH)
|
|
34895
34895
|
throw VH;
|
|
@@ -34898,11 +34898,11 @@ const jc = (e) => new S3(e), KH = (e) => e.pos !== e.arr.length, W0e = (e, t) =>
|
|
|
34898
34898
|
}, T3 = (e) => {
|
|
34899
34899
|
let t = e.arr[e.pos++], n = t & DD, r = 64;
|
|
34900
34900
|
const o = (t & Il) > 0 ? -1 : 1;
|
|
34901
|
-
if (!(t &
|
|
34901
|
+
if (!(t & $o))
|
|
34902
34902
|
return o * n;
|
|
34903
34903
|
const i = e.arr.length;
|
|
34904
34904
|
for (; e.pos < i; ) {
|
|
34905
|
-
if (t = e.arr[e.pos++], n = n + (t & Ad) * r, r *= 128, t <
|
|
34905
|
+
if (t = e.arr[e.pos++], n = n + (t & Ad) * r, r *= 128, t < $o)
|
|
34906
34906
|
return o * n;
|
|
34907
34907
|
if (n > WH)
|
|
34908
34908
|
throw VH;
|
|
@@ -35152,7 +35152,7 @@ let ma;
|
|
|
35152
35152
|
const h1e = () => {
|
|
35153
35153
|
if (ma === void 0)
|
|
35154
35154
|
if (Kh) {
|
|
35155
|
-
ma =
|
|
35155
|
+
ma = zo();
|
|
35156
35156
|
const e = process.argv;
|
|
35157
35157
|
let t = null;
|
|
35158
35158
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -35160,12 +35160,12 @@ const h1e = () => {
|
|
|
35160
35160
|
r[0] === "-" ? (t !== null && ma.set(t, ""), t = r) : t !== null && (ma.set(t, r), t = null);
|
|
35161
35161
|
}
|
|
35162
35162
|
t !== null && ma.set(t, "");
|
|
35163
|
-
} else typeof location == "object" ? (ma =
|
|
35163
|
+
} else typeof location == "object" ? (ma = zo(), (location.search || "?").slice(1).split("&").forEach((e) => {
|
|
35164
35164
|
if (e.length !== 0) {
|
|
35165
35165
|
const [t, n] = e.split("=");
|
|
35166
35166
|
ma.set(`--${nj(t, "-")}`, n), ma.set(`-${nj(t, "-")}`, n);
|
|
35167
35167
|
}
|
|
35168
|
-
})) : ma =
|
|
35168
|
+
})) : ma = zo();
|
|
35169
35169
|
return ma;
|
|
35170
35170
|
}, ED = (e) => h1e().has(e), sy = (e) => lj(Kh ? process.env[e.toUpperCase().replaceAll("-", "_")] : i1e.getItem(e)), eW = (e) => ED("--" + e) || sy(e) !== null;
|
|
35171
35171
|
eW("production");
|
|
@@ -35240,7 +35240,7 @@ const k1e = (e) => y0e(e, (t, n) => `${n}:${t};`).join(""), E1e = (e) => class {
|
|
|
35240
35240
|
e.length === 1 && ((s = e[0]) == null ? void 0 : s.constructor) === Function && (e = /** @type {Array<string|Symbol|Object|number>} */
|
|
35241
35241
|
/** @type {[function]} */
|
|
35242
35242
|
e[0]());
|
|
35243
|
-
const t = [], n = [], r =
|
|
35243
|
+
const t = [], n = [], r = zo();
|
|
35244
35244
|
let o = [], i = 0;
|
|
35245
35245
|
for (; i < e.length; i++) {
|
|
35246
35246
|
const a = e[i], l = N1e[a];
|
|
@@ -35968,7 +35968,7 @@ class fW {
|
|
|
35968
35968
|
* @param {number} len
|
|
35969
35969
|
*/
|
|
35970
35970
|
writeDsLen(t) {
|
|
35971
|
-
t === 0 &&
|
|
35971
|
+
t === 0 && Co(), nn(this.restEncoder, t - 1), this.dsCurrVal += t;
|
|
35972
35972
|
}
|
|
35973
35973
|
}
|
|
35974
35974
|
class Xd extends fW {
|
|
@@ -36088,7 +36088,7 @@ const U1e = (e, t, n, r) => {
|
|
|
36088
36088
|
);
|
|
36089
36089
|
});
|
|
36090
36090
|
}, P1e = (e, t) => {
|
|
36091
|
-
const n =
|
|
36091
|
+
const n = zo(), r = Xt(e.restDecoder);
|
|
36092
36092
|
for (let o = 0; o < r; o++) {
|
|
36093
36093
|
const i = Xt(e.restDecoder), s = new Array(i), a = e.readClient();
|
|
36094
36094
|
let l = Xt(e.restDecoder);
|
|
@@ -36107,11 +36107,11 @@ const U1e = (e, t, n, r) => {
|
|
|
36107
36107
|
break;
|
|
36108
36108
|
}
|
|
36109
36109
|
default: {
|
|
36110
|
-
const d = (c & (Il |
|
|
36110
|
+
const d = (c & (Il | $o)) === 0, p = new zn(
|
|
36111
36111
|
Jt(a, l),
|
|
36112
36112
|
null,
|
|
36113
36113
|
// left
|
|
36114
|
-
(c &
|
|
36114
|
+
(c & $o) === $o ? e.readLeftID() : null,
|
|
36115
36115
|
// origin
|
|
36116
36116
|
null,
|
|
36117
36117
|
// right
|
|
@@ -36299,7 +36299,7 @@ const ch = (e, t) => e === t || e !== null && t !== null && e.client === t.clien
|
|
|
36299
36299
|
for (const [t, n] of e.doc.share.entries())
|
|
36300
36300
|
if (n === e)
|
|
36301
36301
|
return t;
|
|
36302
|
-
throw
|
|
36302
|
+
throw Co();
|
|
36303
36303
|
}, eg = (e, t) => {
|
|
36304
36304
|
for (; t !== null; ) {
|
|
36305
36305
|
if (t.parent === e)
|
|
@@ -36361,7 +36361,7 @@ const J1e = (e, t, n = 0) => new Z1e(e, t, n), i2 = (e, t, n) => {
|
|
|
36361
36361
|
else if (n !== null)
|
|
36362
36362
|
X1(e, 2), mj(e, n);
|
|
36363
36363
|
else
|
|
36364
|
-
throw
|
|
36364
|
+
throw Co();
|
|
36365
36365
|
return A3(e, i), e;
|
|
36366
36366
|
}, dh = (e) => {
|
|
36367
36367
|
const t = mp();
|
|
@@ -36414,7 +36414,7 @@ const J1e = (e, t, n = 0) => new Z1e(e, t, n), i2 = (e, t, n) => {
|
|
|
36414
36414
|
else
|
|
36415
36415
|
return null;
|
|
36416
36416
|
} else
|
|
36417
|
-
throw
|
|
36417
|
+
throw Co();
|
|
36418
36418
|
a >= 0 ? u = l._length : u = 0;
|
|
36419
36419
|
}
|
|
36420
36420
|
return J1e(l, u, e.assoc);
|
|
@@ -36459,7 +36459,7 @@ const Jg = (e) => {
|
|
|
36459
36459
|
else {
|
|
36460
36460
|
const r = n[n.length - 1];
|
|
36461
36461
|
if (r.id.clock + r.length !== t.id.clock)
|
|
36462
|
-
throw
|
|
36462
|
+
throw Co();
|
|
36463
36463
|
}
|
|
36464
36464
|
n.push(t);
|
|
36465
36465
|
}, Qs = (e, t) => {
|
|
@@ -36476,7 +36476,7 @@ const Jg = (e) => {
|
|
|
36476
36476
|
r = s - 1;
|
|
36477
36477
|
s = qa((n + r) / 2);
|
|
36478
36478
|
}
|
|
36479
|
-
throw
|
|
36479
|
+
throw Co();
|
|
36480
36480
|
}, rge = (e, t) => {
|
|
36481
36481
|
const n = e.clients.get(t.client);
|
|
36482
36482
|
return n[Qs(n, t.clock)];
|
|
@@ -36866,11 +36866,11 @@ function* uge(e) {
|
|
|
36866
36866
|
const l = Xt(e.restDecoder);
|
|
36867
36867
|
yield new ds(Jt(o, i), l), i += l;
|
|
36868
36868
|
} else if (C3 & a) {
|
|
36869
|
-
const l = (a & (Il |
|
|
36869
|
+
const l = (a & (Il | $o)) === 0, u = new zn(
|
|
36870
36870
|
Jt(o, i),
|
|
36871
36871
|
null,
|
|
36872
36872
|
// left
|
|
36873
|
-
(a &
|
|
36873
|
+
(a & $o) === $o ? e.readLeftID() : null,
|
|
36874
36874
|
// origin
|
|
36875
36875
|
null,
|
|
36876
36876
|
// right
|
|
@@ -37190,7 +37190,7 @@ const fge = (e, t) => {
|
|
|
37190
37190
|
t._item.parent;
|
|
37191
37191
|
}
|
|
37192
37192
|
return n;
|
|
37193
|
-
},
|
|
37193
|
+
}, Do = () => {
|
|
37194
37194
|
iW("Invalid access: Add Yjs type to a document before reading data.");
|
|
37195
37195
|
}, EW = 80;
|
|
37196
37196
|
let gE = 0;
|
|
@@ -37362,7 +37362,7 @@ class Vr {
|
|
|
37362
37362
|
}
|
|
37363
37363
|
}
|
|
37364
37364
|
const AW = (e, t, n) => {
|
|
37365
|
-
e.doc ??
|
|
37365
|
+
e.doc ?? Do(), t < 0 && (t = e._length + t), n < 0 && (n = e._length + n);
|
|
37366
37366
|
let r = n - t;
|
|
37367
37367
|
const o = [];
|
|
37368
37368
|
let i = e._start;
|
|
@@ -37381,7 +37381,7 @@ const AW = (e, t, n) => {
|
|
|
37381
37381
|
}
|
|
37382
37382
|
return o;
|
|
37383
37383
|
}, _W = (e) => {
|
|
37384
|
-
e.doc ??
|
|
37384
|
+
e.doc ?? Do();
|
|
37385
37385
|
const t = [];
|
|
37386
37386
|
let n = e._start;
|
|
37387
37387
|
for (; n !== null; ) {
|
|
@@ -37407,7 +37407,7 @@ const AW = (e, t, n) => {
|
|
|
37407
37407
|
return n;
|
|
37408
37408
|
}, ng = (e, t) => {
|
|
37409
37409
|
let n = 0, r = e._start;
|
|
37410
|
-
for (e.doc ??
|
|
37410
|
+
for (e.doc ?? Do(); r !== null; ) {
|
|
37411
37411
|
if (r.countable && !r.deleted) {
|
|
37412
37412
|
const o = r.content.getContent();
|
|
37413
37413
|
for (let i = 0; i < o.length; i++)
|
|
@@ -37445,7 +37445,7 @@ const AW = (e, t, n) => {
|
|
|
37445
37445
|
}
|
|
37446
37446
|
};
|
|
37447
37447
|
}, jW = (e, t) => {
|
|
37448
|
-
e.doc ??
|
|
37448
|
+
e.doc ?? Do();
|
|
37449
37449
|
const n = B3(e, t);
|
|
37450
37450
|
let r = e._start;
|
|
37451
37451
|
for (n !== null && (r = n.p, t -= n.index); r !== null; r = r.right)
|
|
@@ -37574,16 +37574,16 @@ const AW = (e, t, n) => {
|
|
|
37574
37574
|
}
|
|
37575
37575
|
new zn(Jt(s, mr(i.store, s)), o, o && o.lastId, null, null, t, n, a).integrate(e, 0);
|
|
37576
37576
|
}, bE = (e, t) => {
|
|
37577
|
-
e.doc ??
|
|
37577
|
+
e.doc ?? Do();
|
|
37578
37578
|
const n = e._map.get(t);
|
|
37579
37579
|
return n !== void 0 && !n.deleted ? n.content.getContent()[n.length - 1] : void 0;
|
|
37580
37580
|
}, OW = (e) => {
|
|
37581
37581
|
const t = {};
|
|
37582
|
-
return e.doc ??
|
|
37582
|
+
return e.doc ?? Do(), e._map.forEach((n, r) => {
|
|
37583
37583
|
n.deleted || (t[r] = n.content.getContent()[n.length - 1]);
|
|
37584
37584
|
}), t;
|
|
37585
37585
|
}, IW = (e, t) => {
|
|
37586
|
-
e.doc ??
|
|
37586
|
+
e.doc ?? Do();
|
|
37587
37587
|
const n = e._map.get(t);
|
|
37588
37588
|
return n !== void 0 && !n.deleted;
|
|
37589
37589
|
}, vge = (e, t) => {
|
|
@@ -37594,7 +37594,7 @@ const AW = (e, t, n) => {
|
|
|
37594
37594
|
i = i.left;
|
|
37595
37595
|
i !== null && rd(i, t) && (n[o] = i.content.getContent()[i.length - 1]);
|
|
37596
37596
|
}), n;
|
|
37597
|
-
}, s2 = (e) => (e.doc ??
|
|
37597
|
+
}, s2 = (e) => (e.doc ?? Do(), I1e(
|
|
37598
37598
|
e._map.entries(),
|
|
37599
37599
|
/** @param {any} entry */
|
|
37600
37600
|
(t) => !t[1].deleted
|
|
@@ -37655,7 +37655,7 @@ class _d extends Vr {
|
|
|
37655
37655
|
)), t;
|
|
37656
37656
|
}
|
|
37657
37657
|
get length() {
|
|
37658
|
-
return this.doc ??
|
|
37658
|
+
return this.doc ?? Do(), this._length;
|
|
37659
37659
|
}
|
|
37660
37660
|
/**
|
|
37661
37661
|
* Creates YArrayEvent and calls observers.
|
|
@@ -37873,7 +37873,7 @@ class yc extends Vr {
|
|
|
37873
37873
|
* @return {Object<string,any>}
|
|
37874
37874
|
*/
|
|
37875
37875
|
toJSON() {
|
|
37876
|
-
this.doc ??
|
|
37876
|
+
this.doc ?? Do();
|
|
37877
37877
|
const t = {};
|
|
37878
37878
|
return this._map.forEach((n, r) => {
|
|
37879
37879
|
if (!n.deleted) {
|
|
@@ -37935,7 +37935,7 @@ class yc extends Vr {
|
|
|
37935
37935
|
* @param {function(MapType,string,YMap<MapType>):void} f A function to execute on every element of this YArray.
|
|
37936
37936
|
*/
|
|
37937
37937
|
forEach(t) {
|
|
37938
|
-
this.doc ??
|
|
37938
|
+
this.doc ?? Do(), this._map.forEach((n, r) => {
|
|
37939
37939
|
n.deleted || t(n.content.getContent()[n.length - 1], r, this);
|
|
37940
37940
|
});
|
|
37941
37941
|
}
|
|
@@ -38029,7 +38029,7 @@ class SD {
|
|
|
38029
38029
|
* Only call this if you know that this.right is defined
|
|
38030
38030
|
*/
|
|
38031
38031
|
forward() {
|
|
38032
|
-
switch (this.right === null &&
|
|
38032
|
+
switch (this.right === null && Co(), this.right.content.constructor) {
|
|
38033
38033
|
case Er:
|
|
38034
38034
|
this.right.deleted || Bf(
|
|
38035
38035
|
this.currentAttributes,
|
|
@@ -38167,7 +38167,7 @@ const Cj = (e, t, n) => {
|
|
|
38167
38167
|
RW(e, t, n, a);
|
|
38168
38168
|
}, PW = (e, t, n, r, o) => {
|
|
38169
38169
|
let i = t;
|
|
38170
|
-
const s =
|
|
38170
|
+
const s = zo();
|
|
38171
38171
|
for (; i && (!i.countable || i.deleted); ) {
|
|
38172
38172
|
if (!i.deleted && i.content.constructor === Er) {
|
|
38173
38173
|
const u = (
|
|
@@ -38224,7 +38224,7 @@ const Cj = (e, t, n) => {
|
|
|
38224
38224
|
let r = (
|
|
38225
38225
|
/** @type {Item} */
|
|
38226
38226
|
e._start
|
|
38227
|
-
), o = e._start, i =
|
|
38227
|
+
), o = e._start, i = zo();
|
|
38228
38228
|
const s = FD(i);
|
|
38229
38229
|
for (; o; ) {
|
|
38230
38230
|
if (o.deleted === !1)
|
|
@@ -38435,7 +38435,7 @@ class Va extends Vr {
|
|
|
38435
38435
|
* @type {number}
|
|
38436
38436
|
*/
|
|
38437
38437
|
get length() {
|
|
38438
|
-
return this.doc ??
|
|
38438
|
+
return this.doc ?? Do(), this._length;
|
|
38439
38439
|
}
|
|
38440
38440
|
/**
|
|
38441
38441
|
* @param {Doc} y
|
|
@@ -38481,7 +38481,7 @@ class Va extends Vr {
|
|
|
38481
38481
|
* @public
|
|
38482
38482
|
*/
|
|
38483
38483
|
toString() {
|
|
38484
|
-
this.doc ??
|
|
38484
|
+
this.doc ?? Do();
|
|
38485
38485
|
let t = "", n = this._start;
|
|
38486
38486
|
for (; n !== null; )
|
|
38487
38487
|
!n.deleted && n.countable && n.content.constructor === ea && (t += /** @type {ContentString} */
|
|
@@ -38531,7 +38531,7 @@ class Va extends Vr {
|
|
|
38531
38531
|
* @public
|
|
38532
38532
|
*/
|
|
38533
38533
|
toDelta(t, n, r) {
|
|
38534
|
-
this.doc ??
|
|
38534
|
+
this.doc ?? Do();
|
|
38535
38535
|
const o = [], i = /* @__PURE__ */ new Map(), s = (
|
|
38536
38536
|
/** @type {Doc} */
|
|
38537
38537
|
this.doc
|
|
@@ -38738,7 +38738,7 @@ class vF {
|
|
|
38738
38738
|
*/
|
|
38739
38739
|
constructor(t, n = () => !0) {
|
|
38740
38740
|
this._filter = n, this._root = t, this._currentNode = /** @type {Item} */
|
|
38741
|
-
t._start, this._firstCall = !0, t.doc ??
|
|
38741
|
+
t._start, this._firstCall = !0, t.doc ?? Do();
|
|
38742
38742
|
}
|
|
38743
38743
|
[Symbol.iterator]() {
|
|
38744
38744
|
return this;
|
|
@@ -38820,7 +38820,7 @@ class Yd extends Vr {
|
|
|
38820
38820
|
return t.insert(0, this.toArray().map((n) => n instanceof Vr ? n.clone() : n)), t;
|
|
38821
38821
|
}
|
|
38822
38822
|
get length() {
|
|
38823
|
-
return this.doc ??
|
|
38823
|
+
return this.doc ?? Do(), this._prelimContent === null ? this._length : this._prelimContent.length;
|
|
38824
38824
|
}
|
|
38825
38825
|
/**
|
|
38826
38826
|
* Create a subtree of childNodes.
|
|
@@ -39305,7 +39305,7 @@ class dy extends yc {
|
|
|
39305
39305
|
}
|
|
39306
39306
|
}
|
|
39307
39307
|
const Nge = (e) => new dy(e.readKey());
|
|
39308
|
-
class
|
|
39308
|
+
class ko extends Va {
|
|
39309
39309
|
/**
|
|
39310
39310
|
* @type {YXmlElement|YXmlText|null}
|
|
39311
39311
|
*/
|
|
@@ -39329,7 +39329,7 @@ class Eo extends Va {
|
|
|
39329
39329
|
) : null;
|
|
39330
39330
|
}
|
|
39331
39331
|
_copy() {
|
|
39332
|
-
return new
|
|
39332
|
+
return new ko();
|
|
39333
39333
|
}
|
|
39334
39334
|
/**
|
|
39335
39335
|
* Makes a copy of this data type that can be included somewhere else.
|
|
@@ -39339,7 +39339,7 @@ class Eo extends Va {
|
|
|
39339
39339
|
* @return {YXmlText}
|
|
39340
39340
|
*/
|
|
39341
39341
|
clone() {
|
|
39342
|
-
const t = new
|
|
39342
|
+
const t = new ko();
|
|
39343
39343
|
return t.applyDelta(this.toDelta()), t;
|
|
39344
39344
|
}
|
|
39345
39345
|
/**
|
|
@@ -39400,7 +39400,7 @@ class Eo extends Va {
|
|
|
39400
39400
|
t.writeTypeRef(Jge);
|
|
39401
39401
|
}
|
|
39402
39402
|
}
|
|
39403
|
-
const Mge = (e) => new
|
|
39403
|
+
const Mge = (e) => new ko();
|
|
39404
39404
|
class yE {
|
|
39405
39405
|
/**
|
|
39406
39406
|
* @param {ID} id
|
|
@@ -40513,7 +40513,7 @@ let zn = class jD extends yE {
|
|
|
40513
40513
|
*/
|
|
40514
40514
|
gc(t, n) {
|
|
40515
40515
|
if (!this.deleted)
|
|
40516
|
-
throw
|
|
40516
|
+
throw Co();
|
|
40517
40517
|
this.content.gc(t), n ? oge(t, this, new cs(this.id, this.length)) : this.content = new rg(this.length);
|
|
40518
40518
|
}
|
|
40519
40519
|
/**
|
|
@@ -40526,7 +40526,7 @@ let zn = class jD extends yE {
|
|
|
40526
40526
|
* @param {number} offset
|
|
40527
40527
|
*/
|
|
40528
40528
|
write(t, n) {
|
|
40529
|
-
const r = n > 0 ? Jt(this.id.client, this.id.clock + n - 1) : this.origin, o = this.rightOrigin, i = this.parentSub, s = this.content.getRef() & C3 | (r === null ? 0 :
|
|
40529
|
+
const r = n > 0 ? Jt(this.id.client, this.id.clock + n - 1) : this.origin, o = this.rightOrigin, i = this.parentSub, s = this.content.getRef() & C3 | (r === null ? 0 : $o) | // origin is defined
|
|
40530
40530
|
(o === null ? 0 : Il) | // right origin is defined
|
|
40531
40531
|
(i === null ? 0 : K1);
|
|
40532
40532
|
if (t.writeInfo(s), r !== null && t.writeLeftID(r), o !== null && t.writeRightID(o), r === null && o === null) {
|
|
@@ -40541,7 +40541,7 @@ let zn = class jD extends yE {
|
|
|
40541
40541
|
t.writeParentInfo(!0), t.writeString(u);
|
|
40542
40542
|
} else
|
|
40543
40543
|
t.writeParentInfo(!1), t.writeLeftID(l.id);
|
|
40544
|
-
} else a.constructor === String ? (t.writeParentInfo(!0), t.writeString(a)) : a.constructor === Dh ? (t.writeParentInfo(!1), t.writeLeftID(a)) :
|
|
40544
|
+
} else a.constructor === String ? (t.writeParentInfo(!0), t.writeString(a)) : a.constructor === Dh ? (t.writeParentInfo(!1), t.writeLeftID(a)) : Co();
|
|
40545
40545
|
i !== null && t.writeString(i);
|
|
40546
40546
|
}
|
|
40547
40547
|
this.content.write(t, n);
|
|
@@ -40549,7 +40549,7 @@ let zn = class jD extends yE {
|
|
|
40549
40549
|
};
|
|
40550
40550
|
const HW = (e, t) => eme[t & C3](e), eme = [
|
|
40551
40551
|
() => {
|
|
40552
|
-
|
|
40552
|
+
Co();
|
|
40553
40553
|
},
|
|
40554
40554
|
// GC is not ItemContent
|
|
40555
40555
|
Rge,
|
|
@@ -40571,7 +40571,7 @@ const HW = (e, t) => eme[t & C3](e), eme = [
|
|
|
40571
40571
|
Lge,
|
|
40572
40572
|
// 9
|
|
40573
40573
|
() => {
|
|
40574
|
-
|
|
40574
|
+
Co();
|
|
40575
40575
|
}
|
|
40576
40576
|
// 10 - Skip is not ItemContent
|
|
40577
40577
|
], tme = 10;
|
|
@@ -40593,7 +40593,7 @@ class ds extends yE {
|
|
|
40593
40593
|
* @param {number} offset
|
|
40594
40594
|
*/
|
|
40595
40595
|
integrate(t, n) {
|
|
40596
|
-
|
|
40596
|
+
Co();
|
|
40597
40597
|
}
|
|
40598
40598
|
/**
|
|
40599
40599
|
* @param {UpdateEncoderV1 | UpdateEncoderV2} encoder
|
|
@@ -41178,7 +41178,7 @@ class Fme {
|
|
|
41178
41178
|
if (n % 64 !== 0) {
|
|
41179
41179
|
for (this._W.fill(0, s, 16); n < t.length; )
|
|
41180
41180
|
this._W[s] |= t[n] << (3 - n % 4) * 8, n++;
|
|
41181
|
-
this._W[s] |=
|
|
41181
|
+
this._W[s] |= $o << (3 - n % 4) * 8;
|
|
41182
41182
|
}
|
|
41183
41183
|
this._updateHash();
|
|
41184
41184
|
}
|
|
@@ -41188,7 +41188,7 @@ class Fme {
|
|
|
41188
41188
|
for (; n < t.length; o++)
|
|
41189
41189
|
for (let s = 3; s >= 0 && n < t.length; s--)
|
|
41190
41190
|
this._W[o] |= t[n++] << s * 8;
|
|
41191
|
-
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |=
|
|
41191
|
+
r || (this._W[o - (n % 4 === 0 ? 0 : 1)] |= $o << (3 - n % 4) * 8), this._W[14] = t.byteLength / w0e, this._W[15] = t.byteLength * 8, this._updateHash();
|
|
41192
41192
|
const i = new Uint8Array(32);
|
|
41193
41193
|
for (let s = 0; s < this._H.length; s++)
|
|
41194
41194
|
for (let a = 0; a < 4; a++)
|
|
@@ -41435,7 +41435,7 @@ class Tme {
|
|
|
41435
41435
|
_renderSnapshot(t, n, r) {
|
|
41436
41436
|
let o = this.doc, i = this.type;
|
|
41437
41437
|
if (t || (t = yF(this.doc)), t instanceof Uint8Array || n instanceof Uint8Array)
|
|
41438
|
-
if ((!(t instanceof Uint8Array) || !(n instanceof Uint8Array)) &&
|
|
41438
|
+
if ((!(t instanceof Uint8Array) || !(n instanceof Uint8Array)) && Co(), o = new ws({ gc: !1 }), ay(o, n), n = yF(o), ay(o, t), t = yF(o), i._item === null) {
|
|
41439
41439
|
const s = Array.from(this.doc.share.keys()).find(
|
|
41440
41440
|
(a) => this.doc.share.get(a) === this.type
|
|
41441
41441
|
);
|
|
@@ -41650,7 +41650,7 @@ const GW = (e, t, n, r, o, i) => {
|
|
|
41650
41650
|
}
|
|
41651
41651
|
return s;
|
|
41652
41652
|
}, Bme = (e, t) => {
|
|
41653
|
-
const n = new
|
|
41653
|
+
const n = new ko(), r = e.map((o) => ({
|
|
41654
41654
|
// @ts-ignore
|
|
41655
41655
|
insert: o.text,
|
|
41656
41656
|
attributes: YW(o.marks, t)
|
|
@@ -41713,7 +41713,7 @@ const GW = (e, t, n, r, o, i) => {
|
|
|
41713
41713
|
(r, o) => og(r, n[o])
|
|
41714
41714
|
);
|
|
41715
41715
|
}
|
|
41716
|
-
return e instanceof
|
|
41716
|
+
return e instanceof ko && t instanceof Array && XW(e, t);
|
|
41717
41717
|
}, my = (e, t) => e === t || e instanceof Array && t instanceof Array && e.length === t.length && e.every(
|
|
41718
41718
|
(n, r) => t[r] === n
|
|
41719
41719
|
), Bj = (e, t, n) => {
|
|
@@ -41808,7 +41808,7 @@ const GW = (e, t, n, r, o, i) => {
|
|
|
41808
41808
|
e.transact(() => {
|
|
41809
41809
|
for (; a - u - c > 0 && i - u - c > 0; ) {
|
|
41810
41810
|
const p = s[u], h = o[u], f = s[a - c - 1], g = o[i - c - 1];
|
|
41811
|
-
if (p instanceof
|
|
41811
|
+
if (p instanceof ko && h instanceof Array)
|
|
41812
41812
|
XW(p, h) || Ome(p, h, r), u += 1;
|
|
41813
41813
|
else {
|
|
41814
41814
|
let m = p instanceof Wr && RD(p, h), b = f instanceof Wr && RD(f, g);
|
|
@@ -41848,7 +41848,7 @@ const GW = (e, t, n, r, o, i) => {
|
|
|
41848
41848
|
}
|
|
41849
41849
|
}
|
|
41850
41850
|
const d = a - u - c;
|
|
41851
|
-
if (a === 1 && i === 0 && s[0] instanceof
|
|
41851
|
+
if (a === 1 && i === 0 && s[0] instanceof ko ? (r.mapping.delete(s[0]), s[0].delete(0, s[0].length)) : d > 0 && (t.slice(u, u + d).forEach((p) => r.mapping.delete(p)), t.delete(u, d)), u + c < i) {
|
|
41852
41852
|
const p = [];
|
|
41853
41853
|
for (let h = u; h < i - c; h++)
|
|
41854
41854
|
p.push(OD(o[h], r));
|
|
@@ -41869,7 +41869,7 @@ const Lme = () => {
|
|
|
41869
41869
|
}), n.dispatch(r));
|
|
41870
41870
|
});
|
|
41871
41871
|
}, Ume = (e, t, n) => {
|
|
41872
|
-
i1 || (i1 = /* @__PURE__ */ new Map(), iE(0, Lme)), sa(i1, e,
|
|
41872
|
+
i1 || (i1 = /* @__PURE__ */ new Map(), iE(0, Lme)), sa(i1, e, zo).set(t, n);
|
|
41873
41873
|
}, Jd = (e, t, n) => {
|
|
41874
41874
|
if (e === 0)
|
|
41875
41875
|
return bF(t, 0, -1);
|
|
@@ -41878,7 +41878,7 @@ const Lme = () => {
|
|
|
41878
41878
|
t._first.content.type
|
|
41879
41879
|
);
|
|
41880
41880
|
for (; r !== null && t !== r; ) {
|
|
41881
|
-
if (r instanceof
|
|
41881
|
+
if (r instanceof ko) {
|
|
41882
41882
|
if (r._length >= e)
|
|
41883
41883
|
return bF(r, e, -1);
|
|
41884
41884
|
if (e -= r._length, r._item !== null && r._item.next !== null)
|
|
@@ -41924,8 +41924,8 @@ const Lme = () => {
|
|
|
41924
41924
|
}
|
|
41925
41925
|
}
|
|
41926
41926
|
if (r === null)
|
|
41927
|
-
throw
|
|
41928
|
-
if (e === 0 && r.constructor !==
|
|
41927
|
+
throw Co();
|
|
41928
|
+
if (e === 0 && r.constructor !== ko && r !== t)
|
|
41929
41929
|
return Pme(r._item.parent, r._item);
|
|
41930
41930
|
}
|
|
41931
41931
|
return bF(t, t._length, -1);
|
|
@@ -41937,7 +41937,7 @@ const Lme = () => {
|
|
|
41937
41937
|
if (o === null || o.type !== t && !eg(t, o.type._item))
|
|
41938
41938
|
return null;
|
|
41939
41939
|
let i = o.type, s = 0;
|
|
41940
|
-
if (i.constructor ===
|
|
41940
|
+
if (i.constructor === ko)
|
|
41941
41941
|
s = o.index;
|
|
41942
41942
|
else if (i._item === null || !i._item.deleted) {
|
|
41943
41943
|
let a = i._first, l = 0;
|
|
@@ -41947,7 +41947,7 @@ const Lme = () => {
|
|
|
41947
41947
|
/** @type {Y.ContentType} */
|
|
41948
41948
|
a.content.type
|
|
41949
41949
|
);
|
|
41950
|
-
l++, u instanceof
|
|
41950
|
+
l++, u instanceof ko ? s += u._length : s += /** @type {any} */
|
|
41951
41951
|
r.get(u).nodeSize;
|
|
41952
41952
|
}
|
|
41953
41953
|
a = /** @type {Y.Item} */
|
|
@@ -41970,7 +41970,7 @@ const Lme = () => {
|
|
|
41970
41970
|
);
|
|
41971
41971
|
if (u === i)
|
|
41972
41972
|
break;
|
|
41973
|
-
l.deleted || (u instanceof
|
|
41973
|
+
l.deleted || (u instanceof ko ? s += u._length : s += /** @type {any} */
|
|
41974
41974
|
r.get(u).nodeSize), l = l.right;
|
|
41975
41975
|
}
|
|
41976
41976
|
}
|
|
@@ -41982,7 +41982,7 @@ const Lme = () => {
|
|
|
41982
41982
|
function zme(e) {
|
|
41983
41983
|
const t = e.toArray(), n = (r) => {
|
|
41984
41984
|
let o;
|
|
41985
|
-
if (r instanceof
|
|
41985
|
+
if (r instanceof ko)
|
|
41986
41986
|
o = r.toDelta().map(
|
|
41987
41987
|
/** @param {any} d */
|
|
41988
41988
|
(s) => {
|
|
@@ -42007,7 +42007,7 @@ function zme(e) {
|
|
|
42007
42007
|
const s = r.toArray();
|
|
42008
42008
|
s.length && (o.content = s.map(n).flat());
|
|
42009
42009
|
} else
|
|
42010
|
-
|
|
42010
|
+
Co();
|
|
42011
42011
|
return o;
|
|
42012
42012
|
};
|
|
42013
42013
|
return {
|
|
@@ -42593,11 +42593,11 @@ function LD(e, t) {
|
|
|
42593
42593
|
if (e)
|
|
42594
42594
|
try {
|
|
42595
42595
|
if (Array.isArray(e)) {
|
|
42596
|
-
const n = e.map((r) =>
|
|
42596
|
+
const n = e.map((r) => Po(r));
|
|
42597
42597
|
Vs(t, pd(n), "self");
|
|
42598
42598
|
return;
|
|
42599
42599
|
}
|
|
42600
|
-
Vs(t,
|
|
42600
|
+
Vs(t, Po(e), "self");
|
|
42601
42601
|
} catch (n) {
|
|
42602
42602
|
console.log(n);
|
|
42603
42603
|
}
|
|
@@ -42841,7 +42841,7 @@ function oq(e) {
|
|
|
42841
42841
|
}).filter((n) => n !== null);
|
|
42842
42842
|
}
|
|
42843
42843
|
function _2e(e) {
|
|
42844
|
-
return e.toArray().map((t) => t instanceof Wr || t instanceof
|
|
42844
|
+
return e.toArray().map((t) => t instanceof Wr || t instanceof ko ? t.clone() : null).filter((t) => t !== null);
|
|
42845
42845
|
}
|
|
42846
42846
|
var by = { exports: {} };
|
|
42847
42847
|
/*!
|
|
@@ -48669,14 +48669,14 @@ const {
|
|
|
48669
48669
|
getOwnPropertyDescriptor: Kxe
|
|
48670
48670
|
} = Object;
|
|
48671
48671
|
let {
|
|
48672
|
-
freeze:
|
|
48672
|
+
freeze: Ko,
|
|
48673
48673
|
seal: Ds,
|
|
48674
48674
|
create: th
|
|
48675
48675
|
} = Object, {
|
|
48676
48676
|
apply: KD,
|
|
48677
48677
|
construct: GD
|
|
48678
48678
|
} = typeof Reflect < "u" && Reflect;
|
|
48679
|
-
|
|
48679
|
+
Ko || (Ko = function(t) {
|
|
48680
48680
|
return t;
|
|
48681
48681
|
});
|
|
48682
48682
|
Ds || (Ds = function(t) {
|
|
@@ -48692,7 +48692,7 @@ GD || (GD = function(t) {
|
|
|
48692
48692
|
r[o - 1] = arguments[o];
|
|
48693
48693
|
return new t(...r);
|
|
48694
48694
|
});
|
|
48695
|
-
const i0 = Cr(Array.prototype.forEach), Gxe = Cr(Array.prototype.lastIndexOf), fB = Cr(Array.prototype.pop), s0 = Cr(Array.prototype.push), Xxe = Cr(Array.prototype.splice),
|
|
48695
|
+
const i0 = Cr(Array.prototype.forEach), Gxe = Cr(Array.prototype.lastIndexOf), fB = Cr(Array.prototype.pop), s0 = Cr(Array.prototype.push), Xxe = Cr(Array.prototype.splice), Oo = Array.isArray, U0 = Cr(String.prototype.toLowerCase), NF = Cr(String.prototype.toString), gB = Cr(String.prototype.match), Ip = Cr(String.prototype.replace), mB = Cr(String.prototype.indexOf), Yxe = Cr(String.prototype.trim), Zxe = Cr(Number.prototype.toString), Jxe = Cr(Boolean.prototype.toString), bB = typeof BigInt > "u" ? null : Cr(BigInt.prototype.toString), yB = typeof Symbol > "u" ? null : Cr(Symbol.prototype.toString), cr = Cr(Object.prototype.hasOwnProperty), a0 = Cr(Object.prototype.toString), Qr = Cr(RegExp.prototype.test), p2 = Qxe(TypeError);
|
|
48696
48696
|
function Cr(e) {
|
|
48697
48697
|
return function(t) {
|
|
48698
48698
|
t instanceof RegExp && (t.lastIndex = 0);
|
|
@@ -48710,7 +48710,7 @@ function Qxe(e) {
|
|
|
48710
48710
|
}
|
|
48711
48711
|
function on(e, t) {
|
|
48712
48712
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : U0;
|
|
48713
|
-
if (hB && hB(e, null), !
|
|
48713
|
+
if (hB && hB(e, null), !Oo(t))
|
|
48714
48714
|
return e;
|
|
48715
48715
|
let r = t.length;
|
|
48716
48716
|
for (; r--; ) {
|
|
@@ -48728,10 +48728,10 @@ function e3e(e) {
|
|
|
48728
48728
|
cr(e, t) || (e[t] = null);
|
|
48729
48729
|
return e;
|
|
48730
48730
|
}
|
|
48731
|
-
function
|
|
48731
|
+
function Yo(e) {
|
|
48732
48732
|
const t = th(null);
|
|
48733
48733
|
for (const [n, r] of qq(e))
|
|
48734
|
-
cr(e, n) && (
|
|
48734
|
+
cr(e, n) && (Oo(r) ? t[n] = e3e(r) : r && typeof r == "object" && r.constructor === Object ? t[n] = Yo(r) : t[n] = r);
|
|
48735
48735
|
return t;
|
|
48736
48736
|
}
|
|
48737
48737
|
function t3e(e) {
|
|
@@ -48786,7 +48786,7 @@ function n3e(e) {
|
|
|
48786
48786
|
return !1;
|
|
48787
48787
|
}
|
|
48788
48788
|
}
|
|
48789
|
-
const xB =
|
|
48789
|
+
const xB = Ko(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), MF = Ko(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), OF = Ko(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), r3e = Ko(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), IF = Ko(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), o3e = Ko(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), vB = Ko(["#text"]), FB = Ko(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns"]), RF = Ko(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), wB = Ko(["accent", "accentunder", "align", "bevelled", "close", "columnalign", "columnlines", "columnspacing", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lquote", "lspace", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), h2 = Ko(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), i3e = Ds(/\{\{[\w\W]*|[\w\W]*\}\}/gm), s3e = Ds(/<%[\w\W]*|[\w\W]*%>/gm), a3e = Ds(/\$\{[\w\W]*/gm), l3e = Ds(/^data-[\-\w.\u00B7-\uFFFF]+$/), u3e = Ds(/^aria-[\-\w]+$/), Vq = Ds(
|
|
48790
48790
|
/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
|
|
48791
48791
|
// eslint-disable-line no-useless-escape
|
|
48792
48792
|
), c3e = Ds(/^(?:\w+script|data):/i), d3e = Ds(
|
|
@@ -48952,10 +48952,10 @@ function Gq() {
|
|
|
48952
48952
|
let Fe = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
48953
48953
|
if (ut && ut === Fe)
|
|
48954
48954
|
return;
|
|
48955
|
-
(!Fe || typeof Fe != "object") && (Fe = {}), Fe =
|
|
48956
|
-
Ue.indexOf(Fe.PARSER_MEDIA_TYPE) === -1 ? _t : Fe.PARSER_MEDIA_TYPE, Qe = At === "application/xhtml+xml" ? NF : U0, L = cr(Fe, "ALLOWED_TAGS") &&
|
|
48957
|
-
const Te = cr(Fe, "CUSTOM_ELEMENT_HANDLING") && Fe.CUSTOM_ELEMENT_HANDLING && typeof Fe.CUSTOM_ELEMENT_HANDLING == "object" ?
|
|
48958
|
-
if (Q = th(null), cr(Te, "tagNameCheck") && mt(Te.tagNameCheck) && (Q.tagNameCheck = Te.tagNameCheck), cr(Te, "attributeNameCheck") && mt(Te.attributeNameCheck) && (Q.attributeNameCheck = Te.attributeNameCheck), cr(Te, "allowCustomizedBuiltInElements") && typeof Te.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = Te.allowCustomizedBuiltInElements), ce && (T = !1), se && (ee = !0), I && (L = on({}, vB), G = th(null), I.html === !0 && (on(L, xB), on(G, FB)), I.svg === !0 && (on(L, MF), on(G, RF), on(G, h2)), I.svgFilters === !0 && (on(L, OF), on(G, RF), on(G, h2)), I.mathMl === !0 && (on(L, IF), on(G, wB), on(G, h2))), X.tagCheck = null, X.attributeCheck = null, cr(Fe, "ADD_TAGS") && (typeof Fe.ADD_TAGS == "function" ? X.tagCheck = Fe.ADD_TAGS :
|
|
48955
|
+
(!Fe || typeof Fe != "object") && (Fe = {}), Fe = Yo(Fe), At = // eslint-disable-next-line unicorn/prefer-includes
|
|
48956
|
+
Ue.indexOf(Fe.PARSER_MEDIA_TYPE) === -1 ? _t : Fe.PARSER_MEDIA_TYPE, Qe = At === "application/xhtml+xml" ? NF : U0, L = cr(Fe, "ALLOWED_TAGS") && Oo(Fe.ALLOWED_TAGS) ? on({}, Fe.ALLOWED_TAGS, Qe) : P, G = cr(Fe, "ALLOWED_ATTR") && Oo(Fe.ALLOWED_ATTR) ? on({}, Fe.ALLOWED_ATTR, Qe) : re, qe = cr(Fe, "ALLOWED_NAMESPACES") && Oo(Fe.ALLOWED_NAMESPACES) ? on({}, Fe.ALLOWED_NAMESPACES, NF) : gt, ve = cr(Fe, "ADD_URI_SAFE_ATTR") && Oo(Fe.ADD_URI_SAFE_ATTR) ? on(Yo(Ee), Fe.ADD_URI_SAFE_ATTR, Qe) : Ee, ae = cr(Fe, "ADD_DATA_URI_TAGS") && Oo(Fe.ADD_DATA_URI_TAGS) ? on(Yo(ge), Fe.ADD_DATA_URI_TAGS, Qe) : ge, W = cr(Fe, "FORBID_CONTENTS") && Oo(Fe.FORBID_CONTENTS) ? on({}, Fe.FORBID_CONTENTS, Qe) : te, J = cr(Fe, "FORBID_TAGS") && Oo(Fe.FORBID_TAGS) ? on({}, Fe.FORBID_TAGS, Qe) : Yo({}), le = cr(Fe, "FORBID_ATTR") && Oo(Fe.FORBID_ATTR) ? on({}, Fe.FORBID_ATTR, Qe) : Yo({}), I = cr(Fe, "USE_PROFILES") ? Fe.USE_PROFILES && typeof Fe.USE_PROFILES == "object" ? Yo(Fe.USE_PROFILES) : Fe.USE_PROFILES : !1, Z = Fe.ALLOW_ARIA_ATTR !== !1, T = Fe.ALLOW_DATA_ATTR !== !1, V = Fe.ALLOW_UNKNOWN_PROTOCOLS || !1, Y = Fe.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = Fe.SAFE_FOR_TEMPLATES || !1, B = Fe.SAFE_FOR_XML !== !1, oe = Fe.WHOLE_DOCUMENT || !1, ee = Fe.RETURN_DOM || !1, se = Fe.RETURN_DOM_FRAGMENT || !1, be = Fe.RETURN_TRUSTED_TYPE || !1, K = Fe.FORCE_BODY || !1, ke = Fe.SANITIZE_DOM !== !1, me = Fe.SANITIZE_NAMED_PROPS || !1, de = Fe.KEEP_CONTENT !== !1, ye = Fe.IN_PLACE || !1, H = n3e(Fe.ALLOWED_URI_REGEXP) ? Fe.ALLOWED_URI_REGEXP : Vq, Oe = typeof Fe.NAMESPACE == "string" ? Fe.NAMESPACE : Be, at = cr(Fe, "MATHML_TEXT_INTEGRATION_POINTS") && Fe.MATHML_TEXT_INTEGRATION_POINTS && typeof Fe.MATHML_TEXT_INTEGRATION_POINTS == "object" ? Yo(Fe.MATHML_TEXT_INTEGRATION_POINTS) : on({}, ["mi", "mo", "mn", "ms", "mtext"]), Mt = cr(Fe, "HTML_INTEGRATION_POINTS") && Fe.HTML_INTEGRATION_POINTS && typeof Fe.HTML_INTEGRATION_POINTS == "object" ? Yo(Fe.HTML_INTEGRATION_POINTS) : on({}, ["annotation-xml"]);
|
|
48957
|
+
const Te = cr(Fe, "CUSTOM_ELEMENT_HANDLING") && Fe.CUSTOM_ELEMENT_HANDLING && typeof Fe.CUSTOM_ELEMENT_HANDLING == "object" ? Yo(Fe.CUSTOM_ELEMENT_HANDLING) : th(null);
|
|
48958
|
+
if (Q = th(null), cr(Te, "tagNameCheck") && mt(Te.tagNameCheck) && (Q.tagNameCheck = Te.tagNameCheck), cr(Te, "attributeNameCheck") && mt(Te.attributeNameCheck) && (Q.attributeNameCheck = Te.attributeNameCheck), cr(Te, "allowCustomizedBuiltInElements") && typeof Te.allowCustomizedBuiltInElements == "boolean" && (Q.allowCustomizedBuiltInElements = Te.allowCustomizedBuiltInElements), ce && (T = !1), se && (ee = !0), I && (L = on({}, vB), G = th(null), I.html === !0 && (on(L, xB), on(G, FB)), I.svg === !0 && (on(L, MF), on(G, RF), on(G, h2)), I.svgFilters === !0 && (on(L, OF), on(G, RF), on(G, h2)), I.mathMl === !0 && (on(L, IF), on(G, wB), on(G, h2))), X.tagCheck = null, X.attributeCheck = null, cr(Fe, "ADD_TAGS") && (typeof Fe.ADD_TAGS == "function" ? X.tagCheck = Fe.ADD_TAGS : Oo(Fe.ADD_TAGS) && (L === P && (L = Yo(L)), on(L, Fe.ADD_TAGS, Qe))), cr(Fe, "ADD_ATTR") && (typeof Fe.ADD_ATTR == "function" ? X.attributeCheck = Fe.ADD_ATTR : Oo(Fe.ADD_ATTR) && (G === re && (G = Yo(G)), on(G, Fe.ADD_ATTR, Qe))), cr(Fe, "ADD_URI_SAFE_ATTR") && Oo(Fe.ADD_URI_SAFE_ATTR) && on(ve, Fe.ADD_URI_SAFE_ATTR, Qe), cr(Fe, "FORBID_CONTENTS") && Oo(Fe.FORBID_CONTENTS) && (W === te && (W = Yo(W)), on(W, Fe.FORBID_CONTENTS, Qe)), cr(Fe, "ADD_FORBID_CONTENTS") && Oo(Fe.ADD_FORBID_CONTENTS) && (W === te && (W = Yo(W)), on(W, Fe.ADD_FORBID_CONTENTS, Qe)), de && (L["#text"] = !0), oe && on(L, ["html", "head", "body"]), L.table && (on(L, ["tbody"]), delete J.tbody), Fe.TRUSTED_TYPES_POLICY) {
|
|
48959
48959
|
if (typeof Fe.TRUSTED_TYPES_POLICY.createHTML != "function")
|
|
48960
48960
|
throw p2('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
|
|
48961
48961
|
if (typeof Fe.TRUSTED_TYPES_POLICY.createScriptURL != "function")
|
|
@@ -48963,7 +48963,7 @@ function Gq() {
|
|
|
48963
48963
|
v = Fe.TRUSTED_TYPES_POLICY, w = v.createHTML("");
|
|
48964
48964
|
} else
|
|
48965
48965
|
v === void 0 && (v = f3e(h, o)), v !== null && typeof w == "string" && (w = v.createHTML(""));
|
|
48966
|
-
|
|
48966
|
+
Ko && Ko(Fe), ut = Fe;
|
|
48967
48967
|
}, $t = on({}, [...MF, ...OF, ...r3e]), pt = on({}, [...IF, ...o3e]), vt = function(Fe) {
|
|
48968
48968
|
let Te = F(Fe);
|
|
48969
48969
|
(!Te || !Te.tagName) && (Te = {
|
|
@@ -49530,8 +49530,8 @@ function nV(e, t) {
|
|
|
49530
49530
|
return e.getElementsByTagName(n).length;
|
|
49531
49531
|
});
|
|
49532
49532
|
}
|
|
49533
|
-
var
|
|
49534
|
-
|
|
49533
|
+
var To = {};
|
|
49534
|
+
To.paragraph = {
|
|
49535
49535
|
filter: "p",
|
|
49536
49536
|
replacement: function(e) {
|
|
49537
49537
|
return `
|
|
@@ -49541,14 +49541,14 @@ jo.paragraph = {
|
|
|
49541
49541
|
`;
|
|
49542
49542
|
}
|
|
49543
49543
|
};
|
|
49544
|
-
|
|
49544
|
+
To.lineBreak = {
|
|
49545
49545
|
filter: "br",
|
|
49546
49546
|
replacement: function(e, t, n) {
|
|
49547
49547
|
return n.br + `
|
|
49548
49548
|
`;
|
|
49549
49549
|
}
|
|
49550
49550
|
};
|
|
49551
|
-
|
|
49551
|
+
To.heading = {
|
|
49552
49552
|
filter: ["h1", "h2", "h3", "h4", "h5", "h6"],
|
|
49553
49553
|
replacement: function(e, t, n) {
|
|
49554
49554
|
var r = Number(t.nodeName.charAt(1));
|
|
@@ -49568,7 +49568,7 @@ jo.heading = {
|
|
|
49568
49568
|
`;
|
|
49569
49569
|
}
|
|
49570
49570
|
};
|
|
49571
|
-
|
|
49571
|
+
To.blockquote = {
|
|
49572
49572
|
filter: "blockquote",
|
|
49573
49573
|
replacement: function(e) {
|
|
49574
49574
|
return e = Jq(e).replace(/^/gm, "> "), `
|
|
@@ -49578,7 +49578,7 @@ jo.blockquote = {
|
|
|
49578
49578
|
`;
|
|
49579
49579
|
}
|
|
49580
49580
|
};
|
|
49581
|
-
|
|
49581
|
+
To.list = {
|
|
49582
49582
|
filter: ["ul", "ol"],
|
|
49583
49583
|
replacement: function(e, t) {
|
|
49584
49584
|
var n = t.parentNode;
|
|
@@ -49590,7 +49590,7 @@ jo.list = {
|
|
|
49590
49590
|
`;
|
|
49591
49591
|
}
|
|
49592
49592
|
};
|
|
49593
|
-
|
|
49593
|
+
To.listItem = {
|
|
49594
49594
|
filter: "li",
|
|
49595
49595
|
replacement: function(e, t, n) {
|
|
49596
49596
|
var r = n.bulletListMarker + " ", o = t.parentNode;
|
|
@@ -49605,7 +49605,7 @@ jo.listItem = {
|
|
|
49605
49605
|
` : "");
|
|
49606
49606
|
}
|
|
49607
49607
|
};
|
|
49608
|
-
|
|
49608
|
+
To.indentedCodeBlock = {
|
|
49609
49609
|
filter: function(e, t) {
|
|
49610
49610
|
return t.codeBlockStyle === "indented" && e.nodeName === "PRE" && e.firstChild && e.firstChild.nodeName === "CODE";
|
|
49611
49611
|
},
|
|
@@ -49618,7 +49618,7 @@ jo.indentedCodeBlock = {
|
|
|
49618
49618
|
`;
|
|
49619
49619
|
}
|
|
49620
49620
|
};
|
|
49621
|
-
|
|
49621
|
+
To.fencedCodeBlock = {
|
|
49622
49622
|
filter: function(e, t) {
|
|
49623
49623
|
return t.codeBlockStyle === "fenced" && e.nodeName === "PRE" && e.firstChild && e.firstChild.nodeName === "CODE";
|
|
49624
49624
|
},
|
|
@@ -49635,7 +49635,7 @@ jo.fencedCodeBlock = {
|
|
|
49635
49635
|
`;
|
|
49636
49636
|
}
|
|
49637
49637
|
};
|
|
49638
|
-
|
|
49638
|
+
To.horizontalRule = {
|
|
49639
49639
|
filter: "hr",
|
|
49640
49640
|
replacement: function(e, t, n) {
|
|
49641
49641
|
return `
|
|
@@ -49645,7 +49645,7 @@ jo.horizontalRule = {
|
|
|
49645
49645
|
`;
|
|
49646
49646
|
}
|
|
49647
49647
|
};
|
|
49648
|
-
|
|
49648
|
+
To.inlineLink = {
|
|
49649
49649
|
filter: function(e, t) {
|
|
49650
49650
|
return t.linkStyle === "inlined" && e.nodeName === "A" && e.getAttribute("href");
|
|
49651
49651
|
},
|
|
@@ -49656,7 +49656,7 @@ jo.inlineLink = {
|
|
|
49656
49656
|
return r && (r = ' "' + r.replace(/"/g, '\\"') + '"'), "[" + e + "](" + n + r + ")";
|
|
49657
49657
|
}
|
|
49658
49658
|
};
|
|
49659
|
-
|
|
49659
|
+
To.referenceLink = {
|
|
49660
49660
|
filter: function(e, t) {
|
|
49661
49661
|
return t.linkStyle === "referenced" && e.nodeName === "A" && e.getAttribute("href");
|
|
49662
49662
|
},
|
|
@@ -49688,19 +49688,19 @@ jo.referenceLink = {
|
|
|
49688
49688
|
`, this.references = []), t;
|
|
49689
49689
|
}
|
|
49690
49690
|
};
|
|
49691
|
-
|
|
49691
|
+
To.emphasis = {
|
|
49692
49692
|
filter: ["em", "i"],
|
|
49693
49693
|
replacement: function(e, t, n) {
|
|
49694
49694
|
return e.trim() ? n.emDelimiter + e + n.emDelimiter : "";
|
|
49695
49695
|
}
|
|
49696
49696
|
};
|
|
49697
|
-
|
|
49697
|
+
To.strong = {
|
|
49698
49698
|
filter: ["strong", "b"],
|
|
49699
49699
|
replacement: function(e, t, n) {
|
|
49700
49700
|
return e.trim() ? n.strongDelimiter + e + n.strongDelimiter : "";
|
|
49701
49701
|
}
|
|
49702
49702
|
};
|
|
49703
|
-
|
|
49703
|
+
To.code = {
|
|
49704
49704
|
filter: function(e) {
|
|
49705
49705
|
var t = e.previousSibling || e.nextSibling, n = e.parentNode.nodeName === "PRE" && !t;
|
|
49706
49706
|
return e.nodeName === "CODE" && !n;
|
|
@@ -49712,7 +49712,7 @@ jo.code = {
|
|
|
49712
49712
|
return n + t + e + t + n;
|
|
49713
49713
|
}
|
|
49714
49714
|
};
|
|
49715
|
-
|
|
49715
|
+
To.image = {
|
|
49716
49716
|
filter: "img",
|
|
49717
49717
|
replacement: function(e, t) {
|
|
49718
49718
|
var n = wy(t.getAttribute("alt")), r = t.getAttribute("src") || "", o = wy(t.getAttribute("title")), i = o ? ' "' + o + '"' : "";
|
|
@@ -49911,7 +49911,7 @@ var z3e = Array.prototype.reduce, $3e = [
|
|
|
49911
49911
|
function Dy(e) {
|
|
49912
49912
|
if (!(this instanceof Dy)) return new Dy(e);
|
|
49913
49913
|
var t = {
|
|
49914
|
-
rules:
|
|
49914
|
+
rules: To,
|
|
49915
49915
|
headingStyle: "setext",
|
|
49916
49916
|
hr: "* * *",
|
|
49917
49917
|
bulletListMarker: "*",
|
|
@@ -55873,7 +55873,7 @@ function F4e(e, t = "prosemirror") {
|
|
|
55873
55873
|
function HE(e) {
|
|
55874
55874
|
const t = e.toArray(), n = (r) => {
|
|
55875
55875
|
let o;
|
|
55876
|
-
if (r instanceof
|
|
55876
|
+
if (r instanceof ko)
|
|
55877
55877
|
o = r.toDelta().map(
|
|
55878
55878
|
/** @param {any} d */
|
|
55879
55879
|
(s) => {
|
|
@@ -55898,7 +55898,7 @@ function HE(e) {
|
|
|
55898
55898
|
const s = r.toArray();
|
|
55899
55899
|
s.length && (o.content = s.map(n).flat());
|
|
55900
55900
|
} else
|
|
55901
|
-
|
|
55901
|
+
Co();
|
|
55902
55902
|
return o;
|
|
55903
55903
|
};
|
|
55904
55904
|
return {
|
|
@@ -55906,7 +55906,7 @@ function HE(e) {
|
|
|
55906
55906
|
content: t.map(n)
|
|
55907
55907
|
};
|
|
55908
55908
|
}
|
|
55909
|
-
var
|
|
55909
|
+
var Ao = Uint8Array, Pi = Uint16Array, WE = Int32Array, qE = new Ao([
|
|
55910
55910
|
0,
|
|
55911
55911
|
0,
|
|
55912
55912
|
0,
|
|
@@ -55941,7 +55941,7 @@ var _o = Uint8Array, Pi = Uint16Array, WE = Int32Array, qE = new _o([
|
|
|
55941
55941
|
0,
|
|
55942
55942
|
/* impossible */
|
|
55943
55943
|
0
|
|
55944
|
-
]), VE = new
|
|
55944
|
+
]), VE = new Ao([
|
|
55945
55945
|
0,
|
|
55946
55946
|
0,
|
|
55947
55947
|
0,
|
|
@@ -55975,7 +55975,7 @@ var _o = Uint8Array, Pi = Uint16Array, WE = Int32Array, qE = new _o([
|
|
|
55975
55975
|
/* unused */
|
|
55976
55976
|
0,
|
|
55977
55977
|
0
|
|
55978
|
-
]), LB = new
|
|
55978
|
+
]), LB = new Ao([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), NV = function(e, t) {
|
|
55979
55979
|
for (var n = new Pi(31), r = 0; r < 31; ++r)
|
|
55980
55980
|
n[r] = t += 1 << e[r - 1];
|
|
55981
55981
|
for (var o = new WE(n[30]), r = 1; r < 30; ++r)
|
|
@@ -56007,7 +56007,7 @@ var s1 = function(e, t, n) {
|
|
|
56007
56007
|
for (a = new Pi(r), o = 0; o < r; ++o)
|
|
56008
56008
|
e[o] && (a[o] = rk[s[e[o] - 1]++] >> 15 - e[o]);
|
|
56009
56009
|
return a;
|
|
56010
|
-
}, ep = new
|
|
56010
|
+
}, ep = new Ao(288);
|
|
56011
56011
|
for (var Gn = 0; Gn < 144; ++Gn)
|
|
56012
56012
|
ep[Gn] = 8;
|
|
56013
56013
|
for (var Gn = 144; Gn < 256; ++Gn)
|
|
@@ -56016,13 +56016,13 @@ for (var Gn = 256; Gn < 280; ++Gn)
|
|
|
56016
56016
|
ep[Gn] = 7;
|
|
56017
56017
|
for (var Gn = 280; Gn < 288; ++Gn)
|
|
56018
56018
|
ep[Gn] = 8;
|
|
56019
|
-
var Ty = new
|
|
56019
|
+
var Ty = new Ao(32);
|
|
56020
56020
|
for (var Gn = 0; Gn < 32; ++Gn)
|
|
56021
56021
|
Ty[Gn] = 5;
|
|
56022
56022
|
var k4e = /* @__PURE__ */ s1(ep, 9, 0), E4e = /* @__PURE__ */ s1(Ty, 5, 0), OV = function(e) {
|
|
56023
56023
|
return (e + 7) / 8 | 0;
|
|
56024
56024
|
}, IV = function(e, t, n) {
|
|
56025
|
-
return (n == null || n > e.length) && (n = e.length), new
|
|
56025
|
+
return (n == null || n > e.length) && (n = e.length), new Ao(e.subarray(t, n));
|
|
56026
56026
|
}, C4e = [
|
|
56027
56027
|
"unexpected EOF",
|
|
56028
56028
|
"invalid block type",
|
|
@@ -56059,7 +56059,7 @@ var k4e = /* @__PURE__ */ s1(ep, 9, 0), E4e = /* @__PURE__ */ s1(Ty, 5, 0), OV =
|
|
|
56059
56059
|
if (!o)
|
|
56060
56060
|
return { t: LV, l: 0 };
|
|
56061
56061
|
if (o == 1) {
|
|
56062
|
-
var s = new
|
|
56062
|
+
var s = new Ao(n[0].s + 1);
|
|
56063
56063
|
return s[n[0].s] = 1, { t: s, l: 1 };
|
|
56064
56064
|
}
|
|
56065
56065
|
n.sort(function(w, D) {
|
|
@@ -56092,7 +56092,7 @@ var k4e = /* @__PURE__ */ s1(ep, 9, 0), E4e = /* @__PURE__ */ s1(Ty, 5, 0), OV =
|
|
|
56092
56092
|
}
|
|
56093
56093
|
f = t;
|
|
56094
56094
|
}
|
|
56095
|
-
return { t: new
|
|
56095
|
+
return { t: new Ao(h), l: f };
|
|
56096
56096
|
}, ok = function(e, t, n) {
|
|
56097
56097
|
return e.s == -1 ? Math.max(ok(e.l, t, n + 1), ok(e.r, t, n + 1)) : t[e.s] = n;
|
|
56098
56098
|
}, PB = function(e) {
|
|
@@ -56165,8 +56165,8 @@ var k4e = /* @__PURE__ */ s1(ep, 9, 0), E4e = /* @__PURE__ */ s1(Ty, 5, 0), OV =
|
|
|
56165
56165
|
d0(t, c, S[Q]), c += R[Q];
|
|
56166
56166
|
}
|
|
56167
56167
|
return d0(t, c, S[256]), c + R[256];
|
|
56168
|
-
}, A4e = /* @__PURE__ */ new WE([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), LV = /* @__PURE__ */ new
|
|
56169
|
-
var s = i.z || e.length, a = new
|
|
56168
|
+
}, A4e = /* @__PURE__ */ new WE([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), LV = /* @__PURE__ */ new Ao(0), _4e = function(e, t, n, r, o, i) {
|
|
56169
|
+
var s = i.z || e.length, a = new Ao(r + s + 5 * (1 + Math.ceil(s / 7e3)) + o), l = a.subarray(r, a.length - o), u = i.l, c = (i.r || 0) & 7;
|
|
56170
56170
|
if (t) {
|
|
56171
56171
|
c && (l[0] = i.r >> 3);
|
|
56172
56172
|
for (var d = A4e[t - 1], p = d >> 13, h = d & 8191, f = (1 << n) - 1, g = i.p || new Pi(32768), m = i.h || new Pi(f + 1), b = Math.ceil(n / 3), y = 2 * b, F = function(B) {
|
|
@@ -56239,7 +56239,7 @@ var k4e = /* @__PURE__ */ s1(ep, 9, 0), E4e = /* @__PURE__ */ s1(Ty, 5, 0), OV =
|
|
|
56239
56239
|
};
|
|
56240
56240
|
}, j4e = function(e, t, n, r, o) {
|
|
56241
56241
|
if (!o && (o = { l: 1 }, t.dictionary)) {
|
|
56242
|
-
var i = t.dictionary.subarray(-32768), s = new
|
|
56242
|
+
var i = t.dictionary.subarray(-32768), s = new Ao(i.length + e.length);
|
|
56243
56243
|
s.set(i), s.set(e, i.length), e = s, o.w = i.length;
|
|
56244
56244
|
}
|
|
56245
56245
|
return _4e(e, t.level == null ? 6 : t.level, t.mem == null ? o.l ? Math.ceil(Math.max(8, Math.min(13, Math.log(e.length))) * 1.5) : 20 : 12 + t.mem, n, r, o);
|
|
@@ -56260,7 +56260,7 @@ function B4e(e, t) {
|
|
|
56260
56260
|
var PV = function(e, t, n, r) {
|
|
56261
56261
|
for (var o in e) {
|
|
56262
56262
|
var i = e[o], s = t + o, a = r;
|
|
56263
|
-
Array.isArray(i) && (a = UV(r, i[1]), i = i[0]), i instanceof
|
|
56263
|
+
Array.isArray(i) && (a = UV(r, i[1]), i = i[0]), i instanceof Ao ? n[s] = [i, a] : (n[s += "/"] = [new Ao(0), a], PV(i, s, n, r));
|
|
56264
56264
|
}
|
|
56265
56265
|
}, $B = typeof TextEncoder < "u" && /* @__PURE__ */ new TextEncoder(), N4e = typeof TextDecoder < "u" && /* @__PURE__ */ new TextDecoder(), M4e = 0;
|
|
56266
56266
|
try {
|
|
@@ -56271,11 +56271,11 @@ function HB(e, t) {
|
|
|
56271
56271
|
var n;
|
|
56272
56272
|
if ($B)
|
|
56273
56273
|
return $B.encode(e);
|
|
56274
|
-
for (var r = e.length, o = new
|
|
56274
|
+
for (var r = e.length, o = new Ao(e.length + (e.length >> 1)), i = 0, s = function(u) {
|
|
56275
56275
|
o[i++] = u;
|
|
56276
56276
|
}, n = 0; n < r; ++n) {
|
|
56277
56277
|
if (i + 5 > o.length) {
|
|
56278
|
-
var a = new
|
|
56278
|
+
var a = new Ao(i + 8 + (r - n << 1));
|
|
56279
56279
|
a.set(o), o = a;
|
|
56280
56280
|
}
|
|
56281
56281
|
var l = e.charCodeAt(n);
|
|
@@ -56324,7 +56324,7 @@ function I4e(e, t) {
|
|
|
56324
56324
|
compression: c
|
|
56325
56325
|
})), o += 30 + p + m + y, i += 76 + 2 * (p + m) + (g || 0) + y;
|
|
56326
56326
|
}
|
|
56327
|
-
for (var v = new
|
|
56327
|
+
for (var v = new Ao(i + 22), w = o, D = i - o, k = 0; k < r.length; ++k) {
|
|
56328
56328
|
var d = r[k];
|
|
56329
56329
|
WB(v, d.o, d, d.f, d.u, d.c.length);
|
|
56330
56330
|
var E = 30 + d.f.length + ik(d.extra);
|
|
@@ -71522,7 +71522,7 @@ function KCe(e) {
|
|
|
71522
71522
|
}
|
|
71523
71523
|
return t;
|
|
71524
71524
|
}
|
|
71525
|
-
var _7 = KCe,
|
|
71525
|
+
var _7 = KCe, Qo = Symbol("MODE_BREAK"), ya = Symbol("MODE_FLAT"), ph = Symbol("cursor"), jk = Symbol("DOC_FILL_PRINTED_LENGTH");
|
|
71526
71526
|
function nX() {
|
|
71527
71527
|
return { value: "", length: 0, queue: [] };
|
|
71528
71528
|
}
|
|
@@ -71618,17 +71618,17 @@ function E2(e, t, n, r, o, i) {
|
|
|
71618
71618
|
break;
|
|
71619
71619
|
case bi: {
|
|
71620
71620
|
if (i && c.break) return !1;
|
|
71621
|
-
let p = c.break ?
|
|
71621
|
+
let p = c.break ? Qo : u, h = c.expandedStates && p === Qo ? zr(!1, c.expandedStates, -1) : c.contents;
|
|
71622
71622
|
a.push({ mode: p, doc: h });
|
|
71623
71623
|
break;
|
|
71624
71624
|
}
|
|
71625
71625
|
case Hi: {
|
|
71626
|
-
let p = (c.groupId ? o[c.groupId] || ya : u) ===
|
|
71626
|
+
let p = (c.groupId ? o[c.groupId] || ya : u) === Qo ? c.breakContents : c.flatContents;
|
|
71627
71627
|
p && a.push({ mode: u, doc: p });
|
|
71628
71628
|
break;
|
|
71629
71629
|
}
|
|
71630
71630
|
case uo:
|
|
71631
|
-
if (u ===
|
|
71631
|
+
if (u === Qo || c.hard) return !0;
|
|
71632
71632
|
c.soft || (l.push(" "), n--);
|
|
71633
71633
|
break;
|
|
71634
71634
|
case cu:
|
|
@@ -71642,7 +71642,7 @@ function E2(e, t, n, r, o, i) {
|
|
|
71642
71642
|
return !1;
|
|
71643
71643
|
}
|
|
71644
71644
|
function tv(e, t) {
|
|
71645
|
-
let n = {}, r = t.printWidth, o = k7(t.endOfLine), i = 0, s = [{ ind: nX(), mode:
|
|
71645
|
+
let n = {}, r = t.printWidth, o = k7(t.endOfLine), i = 0, s = [{ ind: nX(), mode: Qo, doc: e }], a = [], l = !1, u = [], c = 0;
|
|
71646
71646
|
for (vCe(e); s.length > 0; ) {
|
|
71647
71647
|
let { ind: p, mode: h, doc: f } = s.pop();
|
|
71648
71648
|
switch (wp(f)) {
|
|
@@ -71673,20 +71673,20 @@ function tv(e, t) {
|
|
|
71673
71673
|
switch (h) {
|
|
71674
71674
|
case ya:
|
|
71675
71675
|
if (!l) {
|
|
71676
|
-
s.push({ ind: p, mode: f.break ?
|
|
71676
|
+
s.push({ ind: p, mode: f.break ? Qo : ya, doc: f.contents });
|
|
71677
71677
|
break;
|
|
71678
71678
|
}
|
|
71679
|
-
case
|
|
71679
|
+
case Qo: {
|
|
71680
71680
|
l = !1;
|
|
71681
71681
|
let g = { ind: p, mode: ya, doc: f.contents }, m = r - i, b = u.length > 0;
|
|
71682
71682
|
if (!f.break && E2(g, s, m, b, n)) s.push(g);
|
|
71683
71683
|
else if (f.expandedStates) {
|
|
71684
71684
|
let y = zr(!1, f.expandedStates, -1);
|
|
71685
71685
|
if (f.break) {
|
|
71686
|
-
s.push({ ind: p, mode:
|
|
71686
|
+
s.push({ ind: p, mode: Qo, doc: y });
|
|
71687
71687
|
break;
|
|
71688
71688
|
} else for (let F = 1; F < f.expandedStates.length + 1; F++) if (F >= f.expandedStates.length) {
|
|
71689
|
-
s.push({ ind: p, mode:
|
|
71689
|
+
s.push({ ind: p, mode: Qo, doc: y });
|
|
71690
71690
|
break;
|
|
71691
71691
|
} else {
|
|
71692
71692
|
let v = f.expandedStates[F], w = { ind: p, mode: ya, doc: v };
|
|
@@ -71695,7 +71695,7 @@ function tv(e, t) {
|
|
|
71695
71695
|
break;
|
|
71696
71696
|
}
|
|
71697
71697
|
}
|
|
71698
|
-
} else s.push({ ind: p, mode:
|
|
71698
|
+
} else s.push({ ind: p, mode: Qo, doc: f.contents });
|
|
71699
71699
|
break;
|
|
71700
71700
|
}
|
|
71701
71701
|
}
|
|
@@ -71704,12 +71704,12 @@ function tv(e, t) {
|
|
|
71704
71704
|
case ol: {
|
|
71705
71705
|
let g = r - i, m = f[jk] ?? 0, { parts: b } = f, y = b.length - m;
|
|
71706
71706
|
if (y === 0) break;
|
|
71707
|
-
let F = b[m + 0], v = b[m + 1], w = { ind: p, mode: ya, doc: F }, D = { ind: p, mode:
|
|
71707
|
+
let F = b[m + 0], v = b[m + 1], w = { ind: p, mode: ya, doc: F }, D = { ind: p, mode: Qo, doc: F }, k = E2(w, [], g, u.length > 0, n, !0);
|
|
71708
71708
|
if (y === 1) {
|
|
71709
71709
|
k ? s.push(w) : s.push(D);
|
|
71710
71710
|
break;
|
|
71711
71711
|
}
|
|
71712
|
-
let E = { ind: p, mode: ya, doc: v }, A = { ind: p, mode:
|
|
71712
|
+
let E = { ind: p, mode: ya, doc: v }, A = { ind: p, mode: Qo, doc: v };
|
|
71713
71713
|
if (y === 2) {
|
|
71714
71714
|
k ? s.push(E, w) : s.push(A, D);
|
|
71715
71715
|
break;
|
|
@@ -71721,7 +71721,7 @@ function tv(e, t) {
|
|
|
71721
71721
|
case Hi:
|
|
71722
71722
|
case uu: {
|
|
71723
71723
|
let g = f.groupId ? n[f.groupId] : h;
|
|
71724
|
-
if (g ===
|
|
71724
|
+
if (g === Qo) {
|
|
71725
71725
|
let m = f.type === Hi ? f.breakContents : f.negate ? f.contents : dx(f.contents);
|
|
71726
71726
|
m && s.push({ ind: p, mode: h, doc: m });
|
|
71727
71727
|
}
|
|
@@ -71745,7 +71745,7 @@ function tv(e, t) {
|
|
|
71745
71745
|
f.soft || (a.push(" "), i += 1);
|
|
71746
71746
|
break;
|
|
71747
71747
|
}
|
|
71748
|
-
case
|
|
71748
|
+
case Qo:
|
|
71749
71749
|
if (u.length > 0) {
|
|
71750
71750
|
s.push({ ind: p, mode: h, doc: f }, ...u.reverse()), u.length = 0;
|
|
71751
71751
|
break;
|
|
@@ -75271,7 +75271,7 @@ var _Y = class $k {
|
|
|
75271
75271
|
constructor(e, t) {
|
|
75272
75272
|
this.msg = e, this.cursor = t;
|
|
75273
75273
|
}
|
|
75274
|
-
},
|
|
75274
|
+
}, Mo = class SY extends wY {
|
|
75275
75275
|
static create(t, n, r) {
|
|
75276
75276
|
return new SY(t, n, r);
|
|
75277
75277
|
}
|
|
@@ -75299,7 +75299,7 @@ var _Y = class $k {
|
|
|
75299
75299
|
}
|
|
75300
75300
|
build() {
|
|
75301
75301
|
for (; this._peek.type !== 34; ) this._peek.type === 0 || this._peek.type === 4 ? this._consumeStartTag(this._advance()) : this._peek.type === 3 ? (this._closeVoidElement(), this._consumeEndTag(this._advance())) : this._peek.type === 12 ? (this._closeVoidElement(), this._consumeCdata(this._advance())) : this._peek.type === 10 ? (this._closeVoidElement(), this._consumeComment(this._advance())) : this._peek.type === 5 || this._peek.type === 7 || this._peek.type === 6 ? (this._closeVoidElement(), this._consumeText(this._advance())) : this._peek.type === 20 ? this._consumeExpansion(this._advance()) : this._peek.type === 25 ? (this._closeVoidElement(), this._consumeBlockOpen(this._advance())) : this._peek.type === 27 ? (this._closeVoidElement(), this._consumeBlockClose(this._advance())) : this._peek.type === 29 ? (this._closeVoidElement(), this._consumeIncompleteBlock(this._advance())) : this._peek.type === 30 ? (this._closeVoidElement(), this._consumeLet(this._advance())) : this._peek.type === 18 ? this._consumeDocType(this._advance()) : this._peek.type === 33 ? (this._closeVoidElement(), this._consumeIncompleteLet(this._advance())) : this._advance();
|
|
75302
|
-
for (let t of this._containerStack) t instanceof Up && this.errors.push(
|
|
75302
|
+
for (let t of this._containerStack) t instanceof Up && this.errors.push(Mo.create(t.name, t.sourceSpan, `Unclosed block "${t.name}"`));
|
|
75303
75303
|
}
|
|
75304
75304
|
_advance() {
|
|
75305
75305
|
let t = this._peek;
|
|
@@ -75328,7 +75328,7 @@ var _Y = class $k {
|
|
|
75328
75328
|
o.push(s);
|
|
75329
75329
|
}
|
|
75330
75330
|
if (this._peek.type !== 24) {
|
|
75331
|
-
this.errors.push(
|
|
75331
|
+
this.errors.push(Mo.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '}'."));
|
|
75332
75332
|
return;
|
|
75333
75333
|
}
|
|
75334
75334
|
let i = new cn(t.sourceSpan.start, this._peek.sourceSpan.end, t.sourceSpan.fullStart);
|
|
@@ -75336,7 +75336,7 @@ var _Y = class $k {
|
|
|
75336
75336
|
}
|
|
75337
75337
|
_parseExpansionCase() {
|
|
75338
75338
|
let t = this._advance();
|
|
75339
|
-
if (this._peek.type !== 22) return this.errors.push(
|
|
75339
|
+
if (this._peek.type !== 22) return this.errors.push(Mo.create(null, this._peek.sourceSpan, "Invalid ICU message. Missing '{'.")), null;
|
|
75340
75340
|
let n = this._advance(), r = this._collectExpansionExpTokens(n);
|
|
75341
75341
|
if (!r) return null;
|
|
75342
75342
|
let o = this._advance();
|
|
@@ -75351,10 +75351,10 @@ var _Y = class $k {
|
|
|
75351
75351
|
for (; ; ) {
|
|
75352
75352
|
if ((this._peek.type === 20 || this._peek.type === 22) && r.push(this._peek.type), this._peek.type === 23) if (wO(r, 22)) {
|
|
75353
75353
|
if (r.pop(), r.length === 0) return n;
|
|
75354
|
-
} else return this.errors.push(
|
|
75354
|
+
} else return this.errors.push(Mo.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
75355
75355
|
if (this._peek.type === 24) if (wO(r, 20)) r.pop();
|
|
75356
|
-
else return this.errors.push(
|
|
75357
|
-
if (this._peek.type === 34) return this.errors.push(
|
|
75356
|
+
else return this.errors.push(Mo.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
75357
|
+
if (this._peek.type === 34) return this.errors.push(Mo.create(null, t.sourceSpan, "Invalid ICU message. Missing '}'.")), null;
|
|
75358
75358
|
n.push(this._advance());
|
|
75359
75359
|
}
|
|
75360
75360
|
}
|
|
@@ -75391,20 +75391,20 @@ var _Y = class $k {
|
|
|
75391
75391
|
if (this._peek.type === 2) {
|
|
75392
75392
|
this._advance(), s = !0;
|
|
75393
75393
|
let h = this.getTagDefinition(i);
|
|
75394
|
-
this.canSelfClose || h.canSelfClose || _b(i) !== null || h.isVoid || this.errors.push(
|
|
75394
|
+
this.canSelfClose || h.canSelfClose || _b(i) !== null || h.isVoid || this.errors.push(Mo.create(i, t.sourceSpan, `Only void, custom and foreign elements can be self closed "${t.parts[1]}"`));
|
|
75395
75395
|
} else this._peek.type === 1 && (this._advance(), s = !1);
|
|
75396
75396
|
let a = this._peek.sourceSpan.fullStart, l = new cn(t.sourceSpan.start, a, t.sourceSpan.fullStart), u = new cn(t.sourceSpan.start, a, t.sourceSpan.fullStart), c = new cn(t.sourceSpan.start.moveBy(1), t.sourceSpan.end), d = new Fu(i, o, [], l, u, void 0, c), p = this._getContainer();
|
|
75397
|
-
this._pushContainer(d, p instanceof Fu && this.getTagDefinition(p.name).isClosedByChild(d.name)), s ? this._popContainer(i, Fu, l) : t.type === 4 && (this._popContainer(i, Fu, null), this.errors.push(
|
|
75397
|
+
this._pushContainer(d, p instanceof Fu && this.getTagDefinition(p.name).isClosedByChild(d.name)), s ? this._popContainer(i, Fu, l) : t.type === 4 && (this._popContainer(i, Fu, null), this.errors.push(Mo.create(i, l, `Opening tag "${i}" not terminated.`)));
|
|
75398
75398
|
}
|
|
75399
75399
|
_pushContainer(t, n) {
|
|
75400
75400
|
n && this._containerStack.pop(), this._addToParent(t), this._containerStack.push(t);
|
|
75401
75401
|
}
|
|
75402
75402
|
_consumeEndTag(t) {
|
|
75403
75403
|
let n = this.allowHtmComponentClosingTags && t.parts.length === 0 ? null : this._getElementFullName(t.parts[0], t.parts[1], this._getClosestParentElement());
|
|
75404
|
-
if (n && this.getTagDefinition(n).isVoid) this.errors.push(
|
|
75404
|
+
if (n && this.getTagDefinition(n).isVoid) this.errors.push(Mo.create(n, t.sourceSpan, `Void elements do not have end tags "${t.parts[1]}"`));
|
|
75405
75405
|
else if (!this._popContainer(n, Fu, t.sourceSpan)) {
|
|
75406
75406
|
let r = `Unexpected closing tag "${n}". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags`;
|
|
75407
|
-
this.errors.push(
|
|
75407
|
+
this.errors.push(Mo.create(n, t.sourceSpan, r));
|
|
75408
75408
|
}
|
|
75409
75409
|
}
|
|
75410
75410
|
_popContainer(t, n, r) {
|
|
@@ -75439,7 +75439,7 @@ var _Y = class $k {
|
|
|
75439
75439
|
this._pushContainer(s, !1);
|
|
75440
75440
|
}
|
|
75441
75441
|
_consumeBlockClose(t) {
|
|
75442
|
-
this._popContainer(null, Up, t.sourceSpan) || this.errors.push(
|
|
75442
|
+
this._popContainer(null, Up, t.sourceSpan) || this.errors.push(Mo.create(null, t.sourceSpan, 'Unexpected closing block. The block may have been closed earlier. If you meant to write the } character, you should use the "}" HTML entity instead.'));
|
|
75443
75443
|
}
|
|
75444
75444
|
_consumeIncompleteBlock(t) {
|
|
75445
75445
|
let n = [];
|
|
@@ -75448,16 +75448,16 @@ var _Y = class $k {
|
|
|
75448
75448
|
n.push(new gO(a.parts[0], a.sourceSpan));
|
|
75449
75449
|
}
|
|
75450
75450
|
let r = this._peek.sourceSpan.fullStart, o = new cn(t.sourceSpan.start, r, t.sourceSpan.fullStart), i = new cn(t.sourceSpan.start, r, t.sourceSpan.fullStart), s = new Up(t.parts[0], n, [], o, t.sourceSpan, i);
|
|
75451
|
-
this._pushContainer(s, !1), this._popContainer(null, Up, null), this.errors.push(
|
|
75451
|
+
this._pushContainer(s, !1), this._popContainer(null, Up, null), this.errors.push(Mo.create(t.parts[0], o, `Incomplete block "${t.parts[0]}". If you meant to write the @ character, you should use the "@" HTML entity instead.`));
|
|
75452
75452
|
}
|
|
75453
75453
|
_consumeLet(t) {
|
|
75454
75454
|
let n = t.parts[0], r, o;
|
|
75455
75455
|
if (this._peek.type !== 31) {
|
|
75456
|
-
this.errors.push(
|
|
75456
|
+
this.errors.push(Mo.create(t.parts[0], t.sourceSpan, `Invalid @let declaration "${n}". Declaration must have a value.`));
|
|
75457
75457
|
return;
|
|
75458
75458
|
} else r = this._advance();
|
|
75459
75459
|
if (this._peek.type !== 32) {
|
|
75460
|
-
this.errors.push(
|
|
75460
|
+
this.errors.push(Mo.create(t.parts[0], t.sourceSpan, `Unterminated @let declaration "${n}". Declaration must be terminated with a semicolon.`));
|
|
75461
75461
|
return;
|
|
75462
75462
|
} else o = this._advance();
|
|
75463
75463
|
let i = o.sourceSpan.fullStart, s = new cn(t.sourceSpan.start, i, t.sourceSpan.fullStart), a = t.sourceSpan.toString().lastIndexOf(n), l = t.sourceSpan.start.moveBy(a), u = new cn(l, t.sourceSpan.end), c = new mO(n, r.parts[0], s, u, r.sourceSpan);
|
|
@@ -75469,7 +75469,7 @@ var _Y = class $k {
|
|
|
75469
75469
|
let o = t.sourceSpan.toString().lastIndexOf(n), i = t.sourceSpan.start.moveBy(o), s = new cn(i, t.sourceSpan.end), a = new cn(t.sourceSpan.start, t.sourceSpan.start.moveBy(0)), l = new mO(n, "", t.sourceSpan, s, a);
|
|
75470
75470
|
this._addToParent(l);
|
|
75471
75471
|
}
|
|
75472
|
-
this.errors.push(
|
|
75472
|
+
this.errors.push(Mo.create(t.parts[0], t.sourceSpan, `Incomplete @let declaration${r}. @let declarations must be written as \`@let <name> = <value>;\``));
|
|
75473
75473
|
}
|
|
75474
75474
|
_getContainer() {
|
|
75475
75475
|
return this._containerStack.length > 0 ? this._containerStack[this._containerStack.length - 1] : null;
|
|
@@ -75865,7 +75865,7 @@ var yi = {}, oC = "1.13.7", AO = typeof self == "object" && self.self === self &
|
|
|
75865
75865
|
"hasOwnProperty",
|
|
75866
75866
|
"toLocaleString"
|
|
75867
75867
|
], MNe = Math.pow(2, 53) - 1;
|
|
75868
|
-
function
|
|
75868
|
+
function Go(e, t) {
|
|
75869
75869
|
return t = t == null ? e.length - 1 : +t, function() {
|
|
75870
75870
|
for (var n = Math.max(arguments.length - t, 0), r = Array(n), o = 0; o < n; o++)
|
|
75871
75871
|
r[o] = arguments[o + t];
|
|
@@ -75899,27 +75899,27 @@ function aC(e) {
|
|
|
75899
75899
|
function IY(e) {
|
|
75900
75900
|
return !!(e && e.nodeType === 1);
|
|
75901
75901
|
}
|
|
75902
|
-
function
|
|
75902
|
+
function jo(e) {
|
|
75903
75903
|
var t = "[object " + e + "]";
|
|
75904
75904
|
return function(n) {
|
|
75905
75905
|
return vg.call(n) === t;
|
|
75906
75906
|
};
|
|
75907
75907
|
}
|
|
75908
|
-
const gv =
|
|
75909
|
-
var PY =
|
|
75908
|
+
const gv = jo("String"), lC = jo("Number"), RY = jo("Date"), LY = jo("RegExp"), UY = jo("Error"), uC = jo("Symbol"), cC = jo("ArrayBuffer");
|
|
75909
|
+
var PY = jo("Function"), ONe = AO.document && AO.document.childNodes;
|
|
75910
75910
|
typeof /./ != "function" && typeof Int8Array != "object" && typeof ONe != "function" && (PY = function(e) {
|
|
75911
75911
|
return typeof e == "function" || !1;
|
|
75912
75912
|
});
|
|
75913
|
-
const
|
|
75914
|
-
var $Y = TNe && (!/\[native code\]/.test(String(DataView)) || zY(new DataView(new ArrayBuffer(8)))), dC = typeof Map < "u" && zY(/* @__PURE__ */ new Map()), INe =
|
|
75913
|
+
const _o = PY, zY = jo("Object");
|
|
75914
|
+
var $Y = TNe && (!/\[native code\]/.test(String(DataView)) || zY(new DataView(new ArrayBuffer(8)))), dC = typeof Map < "u" && zY(/* @__PURE__ */ new Map()), INe = jo("DataView");
|
|
75915
75915
|
function RNe(e) {
|
|
75916
|
-
return e != null &&
|
|
75916
|
+
return e != null && _o(e.getInt8) && cC(e.buffer);
|
|
75917
75917
|
}
|
|
75918
|
-
const Fg = $Y ? RNe : INe, Rc = jNe ||
|
|
75918
|
+
const Fg = $Y ? RNe : INe, Rc = jNe || jo("Array");
|
|
75919
75919
|
function Lc(e, t) {
|
|
75920
75920
|
return e != null && SNe.call(e, t);
|
|
75921
75921
|
}
|
|
75922
|
-
var Vk =
|
|
75922
|
+
var Vk = jo("Arguments");
|
|
75923
75923
|
(function() {
|
|
75924
75924
|
Vk(arguments) || (Vk = function(e) {
|
|
75925
75925
|
return Lc(e, "callee");
|
|
@@ -75967,7 +75967,7 @@ function zNe(e) {
|
|
|
75967
75967
|
}
|
|
75968
75968
|
function VY(e, t) {
|
|
75969
75969
|
t = zNe(t);
|
|
75970
|
-
var n = BO.length, r = e.constructor, o =
|
|
75970
|
+
var n = BO.length, r = e.constructor, o = _o(r) && r.prototype || iC, i = "constructor";
|
|
75971
75971
|
for (Lc(e, i) && !t.contains(i) && t.push(i); n--; )
|
|
75972
75972
|
i = BO[n], i in e && e[i] !== o[i] && !t.contains(i) && t.push(i);
|
|
75973
75973
|
}
|
|
@@ -76053,7 +76053,7 @@ function GY(e, t, n, r) {
|
|
|
76053
76053
|
if (!i) {
|
|
76054
76054
|
if (typeof e != "object" || typeof t != "object") return !1;
|
|
76055
76055
|
var a = e.constructor, l = t.constructor;
|
|
76056
|
-
if (a !== l && !(
|
|
76056
|
+
if (a !== l && !(_o(a) && a instanceof a && _o(l) && l instanceof l) && "constructor" in e && "constructor" in t)
|
|
76057
76057
|
return !1;
|
|
76058
76058
|
}
|
|
76059
76059
|
n = n || [], r = r || [];
|
|
@@ -76087,12 +76087,12 @@ function mC(e) {
|
|
|
76087
76087
|
var r = Hf(n);
|
|
76088
76088
|
if (xi(r)) return !1;
|
|
76089
76089
|
for (var o = 0; o < t; o++)
|
|
76090
|
-
if (!
|
|
76091
|
-
return e !== JY || !
|
|
76090
|
+
if (!_o(n[e[o]])) return !1;
|
|
76091
|
+
return e !== JY || !_o(n[bC]);
|
|
76092
76092
|
};
|
|
76093
76093
|
}
|
|
76094
76094
|
var bC = "forEach", YY = "has", yC = ["clear", "delete"], ZY = ["get", YY, "set"], $Ne = yC.concat(bC, ZY), JY = yC.concat(ZY), HNe = ["add"].concat(yC, bC, YY);
|
|
76095
|
-
const QY = dC ? mC($Ne) :
|
|
76095
|
+
const QY = dC ? mC($Ne) : jo("Map"), eZ = dC ? mC(JY) : jo("WeakMap"), tZ = dC ? mC(HNe) : jo("Set"), nZ = jo("WeakSet");
|
|
76096
76096
|
function Dp(e) {
|
|
76097
76097
|
for (var t = Ir(e), n = t.length, r = Array(n), o = 0; o < n; o++)
|
|
76098
76098
|
r[o] = e[t[o]];
|
|
@@ -76111,7 +76111,7 @@ function xC(e) {
|
|
|
76111
76111
|
function wg(e) {
|
|
76112
76112
|
var t = [];
|
|
76113
76113
|
for (var n in e)
|
|
76114
|
-
|
|
76114
|
+
_o(e[n]) && t.push(n);
|
|
76115
76115
|
return t.sort();
|
|
76116
76116
|
}
|
|
76117
76117
|
function vC(e, t) {
|
|
@@ -76210,7 +76210,7 @@ function Fm(e, t, n) {
|
|
|
76210
76210
|
};
|
|
76211
76211
|
}
|
|
76212
76212
|
function uZ(e, t, n) {
|
|
76213
|
-
return e == null ? bv :
|
|
76213
|
+
return e == null ? bv : _o(e) ? Fm(e, t, n) : Ic(e) && !Rc(e) ? sp(e) : yv(e);
|
|
76214
76214
|
}
|
|
76215
76215
|
function xv(e, t) {
|
|
76216
76216
|
return uZ(e, t, 1 / 0);
|
|
@@ -76323,10 +76323,10 @@ function xZ(e, t, n) {
|
|
|
76323
76323
|
t = vm(t);
|
|
76324
76324
|
var r = t.length;
|
|
76325
76325
|
if (!r)
|
|
76326
|
-
return
|
|
76326
|
+
return _o(n) ? n.call(e) : n;
|
|
76327
76327
|
for (var o = 0; o < r; o++) {
|
|
76328
76328
|
var i = e == null ? void 0 : e[t[o]];
|
|
76329
|
-
i === void 0 && (i = n, o = r), e =
|
|
76329
|
+
i === void 0 && (i = n, o = r), e = _o(i) ? i.call(e) : i;
|
|
76330
76330
|
}
|
|
76331
76331
|
return e;
|
|
76332
76332
|
}
|
|
@@ -76344,7 +76344,7 @@ function wZ(e, t, n, r, o) {
|
|
|
76344
76344
|
var i = oZ(e.prototype), s = e.apply(i, o);
|
|
76345
76345
|
return Ic(s) ? s : i;
|
|
76346
76346
|
}
|
|
76347
|
-
var kp =
|
|
76347
|
+
var kp = Go(function(e, t) {
|
|
76348
76348
|
var n = kp.placeholder, r = function() {
|
|
76349
76349
|
for (var o = 0, i = t.length, s = Array(i), a = 0; a < i; a++)
|
|
76350
76350
|
s[a] = t[a] === n ? arguments[o++] : t[a];
|
|
@@ -76354,9 +76354,9 @@ var kp = Xo(function(e, t) {
|
|
|
76354
76354
|
return r;
|
|
76355
76355
|
});
|
|
76356
76356
|
kp.placeholder = Bn;
|
|
76357
|
-
const AC =
|
|
76358
|
-
if (!
|
|
76359
|
-
var r =
|
|
76357
|
+
const AC = Go(function(e, t, n) {
|
|
76358
|
+
if (!_o(e)) throw new TypeError("Bind must be called on a function");
|
|
76359
|
+
var r = Go(function(o) {
|
|
76360
76360
|
return wZ(e, r, t, this, n.concat(o));
|
|
76361
76361
|
});
|
|
76362
76362
|
return r;
|
|
@@ -76377,7 +76377,7 @@ function Ep(e, t, n, r) {
|
|
|
76377
76377
|
}
|
|
76378
76378
|
return r;
|
|
76379
76379
|
}
|
|
76380
|
-
const DZ =
|
|
76380
|
+
const DZ = Go(function(e, t) {
|
|
76381
76381
|
t = Ep(t, !1, !1);
|
|
76382
76382
|
var n = t.length;
|
|
76383
76383
|
if (n < 1) throw new Error("bindAll must be passed function names");
|
|
@@ -76394,7 +76394,7 @@ function kZ(e, t) {
|
|
|
76394
76394
|
};
|
|
76395
76395
|
return n.cache = {}, n;
|
|
76396
76396
|
}
|
|
76397
|
-
const _C =
|
|
76397
|
+
const _C = Go(function(e, t, n) {
|
|
76398
76398
|
return setTimeout(function() {
|
|
76399
76399
|
return e.apply(null, n);
|
|
76400
76400
|
}, t);
|
|
@@ -76418,7 +76418,7 @@ function AZ(e, t, n) {
|
|
|
76418
76418
|
var r, o, i, s, a, l = function() {
|
|
76419
76419
|
var c = uf() - o;
|
|
76420
76420
|
t > c ? r = setTimeout(l, t - c) : (r = null, n || (s = e.apply(a, i)), r || (i = a = null));
|
|
76421
|
-
}, u =
|
|
76421
|
+
}, u = Go(function(c) {
|
|
76422
76422
|
return a = this, i = c, o = uf(), r || (r = setTimeout(l, t), n && (s = e.apply(a, i))), s;
|
|
76423
76423
|
});
|
|
76424
76424
|
return u.cancel = function() {
|
|
@@ -76561,9 +76561,9 @@ function Dx(e, t, n) {
|
|
|
76561
76561
|
function bs(e, t, n, r) {
|
|
76562
76562
|
return Xi(e) || (e = Dp(e)), (typeof n != "number" || r) && (n = 0), NC(e, t, n) >= 0;
|
|
76563
76563
|
}
|
|
76564
|
-
const LZ =
|
|
76564
|
+
const LZ = Go(function(e, t, n) {
|
|
76565
76565
|
var r, o;
|
|
76566
|
-
return
|
|
76566
|
+
return _o(t) ? o = t : (t = vm(t), r = t.slice(0, -1), t = t[t.length - 1]), Kl(e, function(i) {
|
|
76567
76567
|
var s = o;
|
|
76568
76568
|
if (!s) {
|
|
76569
76569
|
if (r && r.length && (i = kC(i, r)), i == null) return;
|
|
@@ -76661,18 +76661,18 @@ function KZ(e) {
|
|
|
76661
76661
|
function JNe(e, t, n) {
|
|
76662
76662
|
return t in n;
|
|
76663
76663
|
}
|
|
76664
|
-
const RC =
|
|
76664
|
+
const RC = Go(function(e, t) {
|
|
76665
76665
|
var n = {}, r = t[0];
|
|
76666
76666
|
if (e == null) return n;
|
|
76667
|
-
|
|
76667
|
+
_o(r) ? (t.length > 1 && (r = Fm(r, t[1])), t = Hf(e)) : (r = JNe, t = Ep(t, !1, !1), e = Object(e));
|
|
76668
76668
|
for (var o = 0, i = t.length; o < i; o++) {
|
|
76669
76669
|
var s = t[o], a = e[s];
|
|
76670
76670
|
r(a, s, e) && (n[s] = a);
|
|
76671
76671
|
}
|
|
76672
76672
|
return n;
|
|
76673
|
-
}), GZ =
|
|
76673
|
+
}), GZ = Go(function(e, t) {
|
|
76674
76674
|
var n = t[0], r;
|
|
76675
|
-
return
|
|
76675
|
+
return _o(n) ? (n = vv(n), t.length > 1 && (r = t[1])) : (t = Kl(Ep(t, !1, !1), String), n = function(o, i) {
|
|
76676
76676
|
return !bs(t, i);
|
|
76677
76677
|
}), RC(e, n, r);
|
|
76678
76678
|
});
|
|
@@ -76694,11 +76694,11 @@ function YZ(e) {
|
|
|
76694
76694
|
function ZZ(e, t) {
|
|
76695
76695
|
return Ep(e, t, !1);
|
|
76696
76696
|
}
|
|
76697
|
-
const UC =
|
|
76697
|
+
const UC = Go(function(e, t) {
|
|
76698
76698
|
return t = Ep(t, !0, !0), kc(e, function(n) {
|
|
76699
76699
|
return !bs(t, n);
|
|
76700
76700
|
});
|
|
76701
|
-
}), JZ =
|
|
76701
|
+
}), JZ = Go(function(e, t) {
|
|
76702
76702
|
return UC(e, t);
|
|
76703
76703
|
});
|
|
76704
76704
|
function kg(e, t, n, r) {
|
|
@@ -76709,7 +76709,7 @@ function kg(e, t, n, r) {
|
|
|
76709
76709
|
}
|
|
76710
76710
|
return o;
|
|
76711
76711
|
}
|
|
76712
|
-
const QZ =
|
|
76712
|
+
const QZ = Go(function(e) {
|
|
76713
76713
|
return kg(Ep(e, !0, !0));
|
|
76714
76714
|
});
|
|
76715
76715
|
function eJ(e) {
|
|
@@ -76729,7 +76729,7 @@ function Eg(e) {
|
|
|
76729
76729
|
n[r] = wv(e, r);
|
|
76730
76730
|
return n;
|
|
76731
76731
|
}
|
|
76732
|
-
const tJ =
|
|
76732
|
+
const tJ = Go(Eg);
|
|
76733
76733
|
function nJ(e, t) {
|
|
76734
76734
|
for (var n = {}, r = 0, o = xi(e); r < o; r++)
|
|
76735
76735
|
t ? n[e[r]] = t[r] : n[e[r][0]] = e[r][1];
|
|
@@ -76844,7 +76844,7 @@ const QNe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
76844
76844
|
isEqual: XY,
|
|
76845
76845
|
isError: UY,
|
|
76846
76846
|
isFinite: HY,
|
|
76847
|
-
isFunction:
|
|
76847
|
+
isFunction: _o,
|
|
76848
76848
|
isMap: QY,
|
|
76849
76849
|
isMatch: gC,
|
|
76850
76850
|
isNaN: pC,
|
|
@@ -76891,7 +76891,7 @@ const QNe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
76891
76891
|
reduceRight: Fx,
|
|
76892
76892
|
reject: RZ,
|
|
76893
76893
|
rest: Id,
|
|
76894
|
-
restArguments:
|
|
76894
|
+
restArguments: Go,
|
|
76895
76895
|
result: xZ,
|
|
76896
76896
|
sample: IC,
|
|
76897
76897
|
select: kc,
|
|
@@ -76995,7 +76995,7 @@ const eMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
76995
76995
|
isEqual: XY,
|
|
76996
76996
|
isError: UY,
|
|
76997
76997
|
isFinite: HY,
|
|
76998
|
-
isFunction:
|
|
76998
|
+
isFunction: _o,
|
|
76999
76999
|
isMap: QY,
|
|
77000
77000
|
isMatch: gC,
|
|
77001
77001
|
isNaN: pC,
|
|
@@ -77042,7 +77042,7 @@ const eMe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty(
|
|
|
77042
77042
|
reduceRight: Fx,
|
|
77043
77043
|
reject: RZ,
|
|
77044
77044
|
rest: Id,
|
|
77045
|
-
restArguments:
|
|
77045
|
+
restArguments: Go,
|
|
77046
77046
|
result: xZ,
|
|
77047
77047
|
sample: IC,
|
|
77048
77048
|
select: kc,
|
|
@@ -83249,22 +83249,22 @@ function Di(e, t) {
|
|
|
83249
83249
|
}
|
|
83250
83250
|
n.constructor != e && (typeof e != "function" && console.error("unknown Class:" + e), n.constructor = e);
|
|
83251
83251
|
}
|
|
83252
|
-
var ki = {}, ys = ki.ELEMENT_NODE = 1, cf = ki.ATTRIBUTE_NODE = 2, kx = ki.TEXT_NODE = 3, mJ = ki.CDATA_SECTION_NODE = 4, bJ = ki.ENTITY_REFERENCE_NODE = 5, gOe = ki.ENTITY_NODE = 6, yJ = ki.PROCESSING_INSTRUCTION_NODE = 7, xJ = ki.COMMENT_NODE = 8, vJ = ki.DOCUMENT_NODE = 9, FJ = ki.DOCUMENT_TYPE_NODE = 10, Gl = ki.DOCUMENT_FRAGMENT_NODE = 11, mOe = ki.NOTATION_NODE = 12,
|
|
83253
|
-
|
|
83254
|
-
|
|
83255
|
-
var ai =
|
|
83256
|
-
|
|
83257
|
-
|
|
83258
|
-
|
|
83259
|
-
|
|
83260
|
-
var wJ =
|
|
83261
|
-
|
|
83262
|
-
var mI =
|
|
83263
|
-
|
|
83264
|
-
|
|
83265
|
-
|
|
83266
|
-
|
|
83267
|
-
|
|
83252
|
+
var ki = {}, ys = ki.ELEMENT_NODE = 1, cf = ki.ATTRIBUTE_NODE = 2, kx = ki.TEXT_NODE = 3, mJ = ki.CDATA_SECTION_NODE = 4, bJ = ki.ENTITY_REFERENCE_NODE = 5, gOe = ki.ENTITY_NODE = 6, yJ = ki.PROCESSING_INSTRUCTION_NODE = 7, xJ = ki.COMMENT_NODE = 8, vJ = ki.DOCUMENT_NODE = 9, FJ = ki.DOCUMENT_TYPE_NODE = 10, Gl = ki.DOCUMENT_FRAGMENT_NODE = 11, mOe = ki.NOTATION_NODE = 12, Bo = {}, Xr = {};
|
|
83253
|
+
Bo.INDEX_SIZE_ERR = (Xr[1] = "Index size error", 1);
|
|
83254
|
+
Bo.DOMSTRING_SIZE_ERR = (Xr[2] = "DOMString size error", 2);
|
|
83255
|
+
var ai = Bo.HIERARCHY_REQUEST_ERR = (Xr[3] = "Hierarchy request error", 3);
|
|
83256
|
+
Bo.WRONG_DOCUMENT_ERR = (Xr[4] = "Wrong document", 4);
|
|
83257
|
+
Bo.INVALID_CHARACTER_ERR = (Xr[5] = "Invalid character", 5);
|
|
83258
|
+
Bo.NO_DATA_ALLOWED_ERR = (Xr[6] = "No data allowed", 6);
|
|
83259
|
+
Bo.NO_MODIFICATION_ALLOWED_ERR = (Xr[7] = "No modification allowed", 7);
|
|
83260
|
+
var wJ = Bo.NOT_FOUND_ERR = (Xr[8] = "Not found", 8);
|
|
83261
|
+
Bo.NOT_SUPPORTED_ERR = (Xr[9] = "Not supported", 9);
|
|
83262
|
+
var mI = Bo.INUSE_ATTRIBUTE_ERR = (Xr[10] = "Attribute in use", 10);
|
|
83263
|
+
Bo.INVALID_STATE_ERR = (Xr[11] = "Invalid state", 11);
|
|
83264
|
+
Bo.SYNTAX_ERR = (Xr[12] = "Syntax error", 12);
|
|
83265
|
+
Bo.INVALID_MODIFICATION_ERR = (Xr[13] = "Invalid modification", 13);
|
|
83266
|
+
Bo.NAMESPACE_ERR = (Xr[14] = "Invalid namespace", 14);
|
|
83267
|
+
Bo.INVALID_ACCESS_ERR = (Xr[15] = "Invalid access", 15);
|
|
83268
83268
|
function fr(e, t) {
|
|
83269
83269
|
if (t instanceof Error)
|
|
83270
83270
|
var n = t;
|
|
@@ -83273,7 +83273,7 @@ function fr(e, t) {
|
|
|
83273
83273
|
return n.code = e, t && (this.message = this.message + ": " + t), n;
|
|
83274
83274
|
}
|
|
83275
83275
|
fr.prototype = Error.prototype;
|
|
83276
|
-
Dm(
|
|
83276
|
+
Dm(Bo, fr);
|
|
83277
83277
|
function Rl() {
|
|
83278
83278
|
}
|
|
83279
83279
|
Rl.prototype = {
|
|
@@ -91150,7 +91150,7 @@ var yA = {
|
|
|
91150
91150
|
failure: function(e, t) {
|
|
91151
91151
|
if (e.length < 1)
|
|
91152
91152
|
throw new Error("Failure must have errors");
|
|
91153
|
-
return new
|
|
91153
|
+
return new wo({
|
|
91154
91154
|
status: "failure",
|
|
91155
91155
|
remaining: t,
|
|
91156
91156
|
errors: e
|
|
@@ -91159,14 +91159,14 @@ var yA = {
|
|
|
91159
91159
|
error: function(e, t) {
|
|
91160
91160
|
if (e.length < 1)
|
|
91161
91161
|
throw new Error("Failure must have errors");
|
|
91162
|
-
return new
|
|
91162
|
+
return new wo({
|
|
91163
91163
|
status: "error",
|
|
91164
91164
|
remaining: t,
|
|
91165
91165
|
errors: e
|
|
91166
91166
|
});
|
|
91167
91167
|
},
|
|
91168
91168
|
success: function(e, t, n) {
|
|
91169
|
-
return new
|
|
91169
|
+
return new wo({
|
|
91170
91170
|
status: "success",
|
|
91171
91171
|
value: e,
|
|
91172
91172
|
source: n,
|
|
@@ -91175,17 +91175,17 @@ var yA = {
|
|
|
91175
91175
|
});
|
|
91176
91176
|
},
|
|
91177
91177
|
cut: function(e) {
|
|
91178
|
-
return new
|
|
91178
|
+
return new wo({
|
|
91179
91179
|
status: "cut",
|
|
91180
91180
|
remaining: e,
|
|
91181
91181
|
errors: []
|
|
91182
91182
|
});
|
|
91183
91183
|
}
|
|
91184
|
-
},
|
|
91184
|
+
}, wo = function(e) {
|
|
91185
91185
|
this._value = e.value, this._status = e.status, this._hasValue = e.value !== void 0, this._remaining = e.remaining, this._source = e.source, this._errors = e.errors;
|
|
91186
91186
|
};
|
|
91187
|
-
|
|
91188
|
-
return this._hasValue ? new
|
|
91187
|
+
wo.prototype.map = function(e) {
|
|
91188
|
+
return this._hasValue ? new wo({
|
|
91189
91189
|
value: e(this._value, this._source),
|
|
91190
91190
|
status: this._status,
|
|
91191
91191
|
remaining: this._remaining,
|
|
@@ -91193,8 +91193,8 @@ Do.prototype.map = function(e) {
|
|
|
91193
91193
|
errors: this._errors
|
|
91194
91194
|
}) : this;
|
|
91195
91195
|
};
|
|
91196
|
-
|
|
91197
|
-
return new
|
|
91196
|
+
wo.prototype.changeRemaining = function(e) {
|
|
91197
|
+
return new wo({
|
|
91198
91198
|
value: this._value,
|
|
91199
91199
|
status: this._status,
|
|
91200
91200
|
remaining: e,
|
|
@@ -91202,28 +91202,28 @@ Do.prototype.changeRemaining = function(e) {
|
|
|
91202
91202
|
errors: this._errors
|
|
91203
91203
|
});
|
|
91204
91204
|
};
|
|
91205
|
-
|
|
91205
|
+
wo.prototype.isSuccess = function() {
|
|
91206
91206
|
return this._status === "success" || this._status === "cut";
|
|
91207
91207
|
};
|
|
91208
|
-
|
|
91208
|
+
wo.prototype.isFailure = function() {
|
|
91209
91209
|
return this._status === "failure";
|
|
91210
91210
|
};
|
|
91211
|
-
|
|
91211
|
+
wo.prototype.isError = function() {
|
|
91212
91212
|
return this._status === "error";
|
|
91213
91213
|
};
|
|
91214
|
-
|
|
91214
|
+
wo.prototype.isCut = function() {
|
|
91215
91215
|
return this._status === "cut";
|
|
91216
91216
|
};
|
|
91217
|
-
|
|
91217
|
+
wo.prototype.value = function() {
|
|
91218
91218
|
return this._value;
|
|
91219
91219
|
};
|
|
91220
|
-
|
|
91220
|
+
wo.prototype.remaining = function() {
|
|
91221
91221
|
return this._remaining;
|
|
91222
91222
|
};
|
|
91223
|
-
|
|
91223
|
+
wo.prototype.source = function() {
|
|
91224
91224
|
return this._source;
|
|
91225
91225
|
};
|
|
91226
|
-
|
|
91226
|
+
wo.prototype.errors = function() {
|
|
91227
91227
|
return this._errors;
|
|
91228
91228
|
};
|
|
91229
91229
|
var xA = {};
|
|
@@ -106430,7 +106430,7 @@ function Kze(e) {
|
|
|
106430
106430
|
const t = e[e.length - 1];
|
|
106431
106431
|
return typeof t == "object" && t.constructor === Object ? (e.splice(e.length - 1, 1), t) : {};
|
|
106432
106432
|
}
|
|
106433
|
-
function
|
|
106433
|
+
function Io(...e) {
|
|
106434
106434
|
return "(" + (Kze(e).capture ? "" : "?:") + e.map((r) => gee(r)).join("|") + ")";
|
|
106435
106435
|
}
|
|
106436
106436
|
const BA = (e) => Rn(
|
|
@@ -106651,7 +106651,7 @@ const BA = (e) => Rn(
|
|
|
106651
106651
|
"withVaList",
|
|
106652
106652
|
"withoutActuallyEscaping",
|
|
106653
106653
|
"zip"
|
|
106654
|
-
], mee =
|
|
106654
|
+
], mee = Io(
|
|
106655
106655
|
/[/=\-+!*%<>&|^~?]/,
|
|
106656
106656
|
/[\u00A1-\u00A7]/,
|
|
106657
106657
|
/[\u00A9\u00AB]/,
|
|
@@ -106670,7 +106670,7 @@ const BA = (e) => Rn(
|
|
|
106670
106670
|
/[\u3001-\u3003]/,
|
|
106671
106671
|
/[\u3008-\u3020]/,
|
|
106672
106672
|
/[\u3030]/
|
|
106673
|
-
), bee =
|
|
106673
|
+
), bee = Io(
|
|
106674
106674
|
mee,
|
|
106675
106675
|
/[\u0300-\u036F]/,
|
|
106676
106676
|
/[\u1DC0-\u1DFF]/,
|
|
@@ -106679,7 +106679,7 @@ const BA = (e) => Rn(
|
|
|
106679
106679
|
/[\uFE20-\uFE2F]/
|
|
106680
106680
|
// TODO: The following characters are also allowed, but the regex isn't supported yet.
|
|
106681
106681
|
// /[\u{E0100}-\u{E01EF}]/u
|
|
106682
|
-
), Hw = Rn(mee, bee, "*"), yee =
|
|
106682
|
+
), Hw = Rn(mee, bee, "*"), yee = Io(
|
|
106683
106683
|
/[a-zA-Z_]/,
|
|
106684
106684
|
/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,
|
|
106685
106685
|
/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,
|
|
@@ -106697,14 +106697,14 @@ const BA = (e) => Rn(
|
|
|
106697
106697
|
// /[\u{50000}-\u{5FFFD}\u{60000-\u{6FFFD}\u{70000}-\u{7FFFD}\u{80000}-\u{8FFFD}]/u,
|
|
106698
106698
|
// /[\u{90000}-\u{9FFFD}\u{A0000-\u{AFFFD}\u{B0000}-\u{BFFFD}\u{C0000}-\u{CFFFD}]/u,
|
|
106699
106699
|
// /[\u{D0000}-\u{DFFFD}\u{E0000-\u{EFFFD}]/u
|
|
106700
|
-
), Bx =
|
|
106700
|
+
), Bx = Io(
|
|
106701
106701
|
yee,
|
|
106702
106702
|
/\d/,
|
|
106703
106703
|
/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/
|
|
106704
106704
|
), xa = Rn(yee, Bx, "*"), G2 = Rn(/[A-Z]/, Bx, "*"), Jze = [
|
|
106705
106705
|
"attached",
|
|
106706
106706
|
"autoclosure",
|
|
106707
|
-
Rn(/convention\(/,
|
|
106707
|
+
Rn(/convention\(/, Io("swift", "block", "c"), /\)/),
|
|
106708
106708
|
"discardableResult",
|
|
106709
106709
|
"dynamicCallable",
|
|
106710
106710
|
"dynamicMemberLookup",
|
|
@@ -106763,20 +106763,20 @@ function e$e(e) {
|
|
|
106763
106763
|
], o = {
|
|
106764
106764
|
match: [
|
|
106765
106765
|
/\./,
|
|
106766
|
-
|
|
106766
|
+
Io(...Gze, ...HR)
|
|
106767
106767
|
],
|
|
106768
106768
|
className: { 2: "keyword" }
|
|
106769
106769
|
}, i = {
|
|
106770
106770
|
// Consume .keyword to prevent highlighting properties and methods as keywords.
|
|
106771
|
-
match: Rn(/\./,
|
|
106771
|
+
match: Rn(/\./, Io(...$w)),
|
|
106772
106772
|
relevance: 0
|
|
106773
106773
|
}, s = $w.filter((ie) => typeof ie == "string").concat(["_|0"]), a = $w.filter((ie) => typeof ie != "string").concat(Xze).map(BA), l = { variants: [
|
|
106774
106774
|
{
|
|
106775
106775
|
className: "keyword",
|
|
106776
|
-
match:
|
|
106776
|
+
match: Io(...a, ...HR)
|
|
106777
106777
|
}
|
|
106778
106778
|
] }, u = {
|
|
106779
|
-
$pattern:
|
|
106779
|
+
$pattern: Io(
|
|
106780
106780
|
/\b\w+/,
|
|
106781
106781
|
// regular keywords
|
|
106782
106782
|
/#\w+/
|
|
@@ -106790,11 +106790,11 @@ function e$e(e) {
|
|
|
106790
106790
|
l
|
|
106791
106791
|
], d = {
|
|
106792
106792
|
// Consume .built_in to prevent highlighting properties and methods.
|
|
106793
|
-
match: Rn(/\./,
|
|
106793
|
+
match: Rn(/\./, Io(...qR)),
|
|
106794
106794
|
relevance: 0
|
|
106795
106795
|
}, p = {
|
|
106796
106796
|
className: "built_in",
|
|
106797
|
-
match: Rn(/\b/,
|
|
106797
|
+
match: Rn(/\b/, Io(...qR), /(?=\()/)
|
|
106798
106798
|
}, h = [
|
|
106799
106799
|
d,
|
|
106800
106800
|
p
|
|
@@ -106932,7 +106932,7 @@ function e$e(e) {
|
|
|
106932
106932
|
] }
|
|
106933
106933
|
}, $ = {
|
|
106934
106934
|
scope: "keyword",
|
|
106935
|
-
match: Rn(/@/,
|
|
106935
|
+
match: Rn(/@/, Io(...Jze), A0(Io(/\(/, /\s+/)))
|
|
106936
106936
|
}, H = {
|
|
106937
106937
|
scope: "meta",
|
|
106938
106938
|
match: Rn(/@/, xa)
|
|
@@ -107016,7 +107016,7 @@ function e$e(e) {
|
|
|
107016
107016
|
P
|
|
107017
107017
|
]
|
|
107018
107018
|
}, le = {
|
|
107019
|
-
begin:
|
|
107019
|
+
begin: Io(
|
|
107020
107020
|
A0(Rn(xa, /\s*:/)),
|
|
107021
107021
|
A0(Rn(xa, /\s+/, xa, /\s*:/))
|
|
107022
107022
|
),
|
|
@@ -107053,7 +107053,7 @@ function e$e(e) {
|
|
|
107053
107053
|
match: [
|
|
107054
107054
|
/(func|macro)/,
|
|
107055
107055
|
/\s+/,
|
|
107056
|
-
|
|
107056
|
+
Io(C.match, xa, Hw)
|
|
107057
107057
|
],
|
|
107058
107058
|
className: {
|
|
107059
107059
|
1: "keyword",
|
|
@@ -170601,7 +170601,7 @@ const qw = t8.getInstance(), Q$e = (e) => ({
|
|
|
170601
170601
|
return r.content = (o = e.content) == null ? void 0 : o.map((i) => eHe(i) ? (console.error("corrupted data:", i), n == null || n("Invalid content: " + typeof i), t ? null : Q$e(i)) : i).filter((i) => i !== null), r;
|
|
170602
170602
|
};
|
|
170603
170603
|
var ao = typeof globalThis < "u" && globalThis || typeof self < "u" && self || // eslint-disable-next-line no-undef
|
|
170604
|
-
typeof global < "u" && global || {},
|
|
170604
|
+
typeof global < "u" && global || {}, Ro = {
|
|
170605
170605
|
searchParams: "URLSearchParams" in ao,
|
|
170606
170606
|
iterable: "Symbol" in ao && "iterator" in Symbol,
|
|
170607
170607
|
blob: "FileReader" in ao && "Blob" in ao && function() {
|
|
@@ -170617,7 +170617,7 @@ typeof global < "u" && global || {}, Uo = {
|
|
|
170617
170617
|
function tHe(e) {
|
|
170618
170618
|
return e && DataView.prototype.isPrototypeOf(e);
|
|
170619
170619
|
}
|
|
170620
|
-
if (
|
|
170620
|
+
if (Ro.arrayBuffer)
|
|
170621
170621
|
var nHe = [
|
|
170622
170622
|
"[object Int8Array]",
|
|
170623
170623
|
"[object Uint8Array]",
|
|
@@ -170646,7 +170646,7 @@ function OA(e) {
|
|
|
170646
170646
|
return { done: n === void 0, value: n };
|
|
170647
170647
|
}
|
|
170648
170648
|
};
|
|
170649
|
-
return
|
|
170649
|
+
return Ro.iterable && (t[Symbol.iterator] = function() {
|
|
170650
170650
|
return t;
|
|
170651
170651
|
}), t;
|
|
170652
170652
|
}
|
|
@@ -170700,7 +170700,7 @@ Rr.prototype.entries = function() {
|
|
|
170700
170700
|
e.push([n, t]);
|
|
170701
170701
|
}), OA(e);
|
|
170702
170702
|
};
|
|
170703
|
-
|
|
170703
|
+
Ro.iterable && (Rr.prototype[Symbol.iterator] = Rr.prototype.entries);
|
|
170704
170704
|
function Vw(e) {
|
|
170705
170705
|
if (!e._noBody) {
|
|
170706
170706
|
if (e.bodyUsed)
|
|
@@ -170738,8 +170738,8 @@ function GR(e) {
|
|
|
170738
170738
|
}
|
|
170739
170739
|
function Iee() {
|
|
170740
170740
|
return this.bodyUsed = !1, this._initBody = function(e) {
|
|
170741
|
-
this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e :
|
|
170742
|
-
},
|
|
170741
|
+
this.bodyUsed = this.bodyUsed, this._bodyInit = e, e ? typeof e == "string" ? this._bodyText = e : Ro.blob && Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : Ro.formData && FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : Ro.searchParams && URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : Ro.arrayBuffer && Ro.blob && tHe(e) ? (this._bodyArrayBuffer = GR(e.buffer), this._bodyInit = new Blob([this._bodyArrayBuffer])) : Ro.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(e) || rHe(e)) ? this._bodyArrayBuffer = GR(e) : this._bodyText = e = Object.prototype.toString.call(e) : (this._noBody = !0, this._bodyText = ""), this.headers.get("content-type") || (typeof e == "string" ? this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob && this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : Ro.searchParams && URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type", "application/x-www-form-urlencoded;charset=UTF-8"));
|
|
170742
|
+
}, Ro.blob && (this.blob = function() {
|
|
170743
170743
|
var e = Vw(this);
|
|
170744
170744
|
if (e)
|
|
170745
170745
|
return e;
|
|
@@ -170760,7 +170760,7 @@ function Iee() {
|
|
|
170760
170760
|
)
|
|
170761
170761
|
) : Promise.resolve(this._bodyArrayBuffer));
|
|
170762
170762
|
} else {
|
|
170763
|
-
if (
|
|
170763
|
+
if (Ro.blob)
|
|
170764
170764
|
return this.blob().then(oHe);
|
|
170765
170765
|
throw new Error("could not read as ArrayBuffer");
|
|
170766
170766
|
}
|
|
@@ -170775,7 +170775,7 @@ function Iee() {
|
|
|
170775
170775
|
if (this._bodyFormData)
|
|
170776
170776
|
throw new Error("could not read FormData body as text");
|
|
170777
170777
|
return Promise.resolve(this._bodyText);
|
|
170778
|
-
},
|
|
170778
|
+
}, Ro.formData && (this.formData = function() {
|
|
170779
170779
|
return this.text().then(uHe);
|
|
170780
170780
|
}), this.json = function() {
|
|
170781
170781
|
return this.text().then(JSON.parse);
|
|
@@ -170919,7 +170919,7 @@ function Ree(e, t) {
|
|
|
170919
170919
|
return u;
|
|
170920
170920
|
}
|
|
170921
170921
|
}
|
|
170922
|
-
if (i.open(o.method, a(o.url), !0), o.credentials === "include" ? i.withCredentials = !0 : o.credentials === "omit" && (i.withCredentials = !1), "responseType" in i && (
|
|
170922
|
+
if (i.open(o.method, a(o.url), !0), o.credentials === "include" ? i.withCredentials = !0 : o.credentials === "omit" && (i.withCredentials = !1), "responseType" in i && (Ro.blob ? i.responseType = "blob" : Ro.arrayBuffer && (i.responseType = "arraybuffer")), t && typeof t.headers == "object" && !(t.headers instanceof Rr || ao.Headers && t.headers instanceof ao.Headers)) {
|
|
170923
170923
|
var l = [];
|
|
170924
170924
|
Object.getOwnPropertyNames(t.headers).forEach(function(u) {
|
|
170925
170925
|
l.push(Gf(u)), i.setRequestHeader(u, MA(t.headers[u]));
|
|
@@ -172572,7 +172572,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
172572
172572
|
}, [Mt, l, L]);
|
|
172573
172573
|
const $t = Se(!1), pt = Se(null), vt = Ae(
|
|
172574
172574
|
(Te) => {
|
|
172575
|
-
const Re = Te.map((rt) =>
|
|
172575
|
+
const Re = Te.map((rt) => Po(rt));
|
|
172576
172576
|
Vs(e, pd(Re), "self");
|
|
172577
172577
|
},
|
|
172578
172578
|
[e]
|
|
@@ -172605,7 +172605,7 @@ User prompt: ${u} /no_think` : `${u} /no_think`;
|
|
|
172605
172605
|
return;
|
|
172606
172606
|
}
|
|
172607
172607
|
_(!0), queueMicrotask(() => {
|
|
172608
|
-
if (s !== "" && s !== void 0 && (St(s) ? Array.isArray(s) ? vt(s) : Vs(e,
|
|
172608
|
+
if (s !== "" && s !== void 0 && (St(s) ? Array.isArray(s) ? vt(s) : Vs(e, Po(s), "self") : Ue.commands.setContent(
|
|
172609
172609
|
Mee({
|
|
172610
172610
|
data: s,
|
|
172611
172611
|
ignoreCorruptedData: U,
|
|
@@ -180388,7 +180388,7 @@ function YA(e, t) {
|
|
|
180388
180388
|
function Vte(e, t) {
|
|
180389
180389
|
return YA(e, t).reverse();
|
|
180390
180390
|
}
|
|
180391
|
-
function
|
|
180391
|
+
function ei(e, t, n) {
|
|
180392
180392
|
let r;
|
|
180393
180393
|
if (typeof t == "string")
|
|
180394
180394
|
try {
|
|
@@ -180474,7 +180474,7 @@ function UL(e) {
|
|
|
180474
180474
|
};
|
|
180475
180475
|
}
|
|
180476
180476
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
180477
|
-
const ci = BigInt(0),
|
|
180477
|
+
const ci = BigInt(0), Ho = BigInt(1), vd = /* @__PURE__ */ BigInt(2), Gte = /* @__PURE__ */ BigInt(3), Xte = /* @__PURE__ */ BigInt(4), Yte = /* @__PURE__ */ BigInt(5), OGe = /* @__PURE__ */ BigInt(7), Zte = /* @__PURE__ */ BigInt(8), IGe = /* @__PURE__ */ BigInt(9), Jte = /* @__PURE__ */ BigInt(16);
|
|
180478
180478
|
function js(e, t) {
|
|
180479
180479
|
const n = e % t;
|
|
180480
180480
|
return n >= ci ? n : t + n;
|
|
@@ -180490,12 +180490,12 @@ function PL(e, t) {
|
|
|
180490
180490
|
throw new Error("invert: expected non-zero number");
|
|
180491
180491
|
if (t <= ci)
|
|
180492
180492
|
throw new Error("invert: expected positive modulus, got " + t);
|
|
180493
|
-
let n = js(e, t), r = t, o = ci, i =
|
|
180493
|
+
let n = js(e, t), r = t, o = ci, i = Ho;
|
|
180494
180494
|
for (; n !== ci; ) {
|
|
180495
180495
|
const a = r / n, l = r % n, u = o - i * a;
|
|
180496
180496
|
r = n, n = l, o = i, i = u;
|
|
180497
180497
|
}
|
|
180498
|
-
if (r !==
|
|
180498
|
+
if (r !== Ho)
|
|
180499
180499
|
throw new Error("invert: does not exist");
|
|
180500
180500
|
return js(o, t);
|
|
180501
180501
|
}
|
|
@@ -180504,7 +180504,7 @@ function JA(e, t, n) {
|
|
|
180504
180504
|
throw new Error("Cannot find square root");
|
|
180505
180505
|
}
|
|
180506
180506
|
function Qte(e, t) {
|
|
180507
|
-
const n = (e.ORDER +
|
|
180507
|
+
const n = (e.ORDER + Ho) / Xte, r = e.pow(t, n);
|
|
180508
180508
|
return JA(e, r, t), r;
|
|
180509
180509
|
}
|
|
180510
180510
|
function RGe(e, t) {
|
|
@@ -180524,7 +180524,7 @@ function LGe(e) {
|
|
|
180524
180524
|
function ene(e) {
|
|
180525
180525
|
if (e < Gte)
|
|
180526
180526
|
throw new Error("sqrt is not defined for small field");
|
|
180527
|
-
let t = e -
|
|
180527
|
+
let t = e - Ho, n = 0;
|
|
180528
180528
|
for (; t % vd === ci; )
|
|
180529
180529
|
t /= vd, n++;
|
|
180530
180530
|
let r = vd;
|
|
@@ -180535,7 +180535,7 @@ function ene(e) {
|
|
|
180535
180535
|
if (n === 1)
|
|
180536
180536
|
return Qte;
|
|
180537
180537
|
let i = o.pow(r, t);
|
|
180538
|
-
const s = (t +
|
|
180538
|
+
const s = (t + Ho) / vd;
|
|
180539
180539
|
return function(l, u) {
|
|
180540
180540
|
if (l.is0(u))
|
|
180541
180541
|
return u;
|
|
@@ -180549,7 +180549,7 @@ function ene(e) {
|
|
|
180549
180549
|
for (; !l.eql(g, l.ONE); )
|
|
180550
180550
|
if (f++, g = l.sqr(g), f === c)
|
|
180551
180551
|
throw new Error("Cannot find square root");
|
|
180552
|
-
const m =
|
|
180552
|
+
const m = Ho << BigInt(c - f - 1), b = l.pow(d, m);
|
|
180553
180553
|
c = f, d = l.sqr(b), p = l.mul(p, d), h = l.mul(h, b);
|
|
180554
180554
|
}
|
|
180555
180555
|
return h;
|
|
@@ -180591,11 +180591,11 @@ function $Ge(e, t, n) {
|
|
|
180591
180591
|
throw new Error("invalid exponent, negatives unsupported");
|
|
180592
180592
|
if (n === ci)
|
|
180593
180593
|
return e.ONE;
|
|
180594
|
-
if (n ===
|
|
180594
|
+
if (n === Ho)
|
|
180595
180595
|
return t;
|
|
180596
180596
|
let r = e.ONE, o = t;
|
|
180597
180597
|
for (; n > ci; )
|
|
180598
|
-
n &
|
|
180598
|
+
n & Ho && (r = e.mul(r, o)), o = e.sqr(o), n >>= Ho;
|
|
180599
180599
|
return r;
|
|
180600
180600
|
}
|
|
180601
180601
|
function tne(e, t, n = !1) {
|
|
@@ -180603,7 +180603,7 @@ function tne(e, t, n = !1) {
|
|
|
180603
180603
|
return t.reduceRight((s, a, l) => e.is0(a) ? s : (r[l] = e.mul(s, r[l]), e.mul(s, a)), i), r;
|
|
180604
180604
|
}
|
|
180605
180605
|
function zL(e, t) {
|
|
180606
|
-
const n = (e.ORDER -
|
|
180606
|
+
const n = (e.ORDER - Ho) / vd, r = e.pow(t, n), o = e.eql(r, e.ONE), i = e.eql(r, e.ZERO), s = e.eql(r, e.neg(e.ONE));
|
|
180607
180607
|
if (!o && !i && !s)
|
|
180608
180608
|
throw new Error("invalid Legendre symbol result");
|
|
180609
180609
|
return o ? 1 : i ? 0 : -1;
|
|
@@ -180635,7 +180635,7 @@ function jm(e, t, n = !1, r = {}) {
|
|
|
180635
180635
|
BYTES: u,
|
|
180636
180636
|
MASK: Tm(l),
|
|
180637
180637
|
ZERO: ci,
|
|
180638
|
-
ONE:
|
|
180638
|
+
ONE: Ho,
|
|
180639
180639
|
allowedLengths: a,
|
|
180640
180640
|
create: (p) => js(p, e),
|
|
180641
180641
|
isValid: (p) => {
|
|
@@ -180646,7 +180646,7 @@ function jm(e, t, n = !1, r = {}) {
|
|
|
180646
180646
|
is0: (p) => p === ci,
|
|
180647
180647
|
// is valid and invertible
|
|
180648
180648
|
isValidNot0: (p) => !d.is0(p) && d.isValid(p),
|
|
180649
|
-
isOdd: (p) => (p &
|
|
180649
|
+
isOdd: (p) => (p & Ho) === Ho,
|
|
180650
180650
|
neg: (p) => js(-p, e),
|
|
180651
180651
|
eql: (p, h) => p === h,
|
|
180652
180652
|
sqr: (p) => js(p * p, e),
|
|
@@ -180699,7 +180699,7 @@ function HGe(e, t, n = !1) {
|
|
|
180699
180699
|
const r = e.length, o = rne(t), i = one(t);
|
|
180700
180700
|
if (r < 16 || r < i || r > 1024)
|
|
180701
180701
|
throw new Error("expected " + i + "-1024 bytes of input, got " + r);
|
|
180702
|
-
const s = n ? qte(e) : g4(e), a = js(s, t -
|
|
180702
|
+
const s = n ? qte(e) : g4(e), a = js(s, t - Ho) + Ho;
|
|
180703
180703
|
return n ? Vte(a, o) : YA(a, o);
|
|
180704
180704
|
}
|
|
180705
180705
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -180998,7 +180998,7 @@ const kl = {
|
|
|
180998
180998
|
}
|
|
180999
180999
|
},
|
|
181000
181000
|
toSig(e) {
|
|
181001
|
-
const { Err: t, _int: n, _tlv: r } = kl, o =
|
|
181001
|
+
const { Err: t, _int: n, _tlv: r } = kl, o = ei("signature", e), { v: i, l: s } = r.decode(48, o);
|
|
181002
181002
|
if (s.length)
|
|
181003
181003
|
throw new t("invalid signature: left bytes after parsing");
|
|
181004
181004
|
const { v: a, l } = r.decode(2, i), { v: u, l: c } = r.decode(2, l);
|
|
@@ -181017,7 +181017,7 @@ function mh(e, t) {
|
|
|
181017
181017
|
if (typeof t == "bigint")
|
|
181018
181018
|
r = t;
|
|
181019
181019
|
else {
|
|
181020
|
-
let o =
|
|
181020
|
+
let o = ei("private key", t);
|
|
181021
181021
|
try {
|
|
181022
181022
|
r = e.fromBytes(o);
|
|
181023
181023
|
} catch {
|
|
@@ -181164,7 +181164,7 @@ function QGe(e, t = {}) {
|
|
|
181164
181164
|
return C.assertValidity(), C;
|
|
181165
181165
|
}
|
|
181166
181166
|
static fromHex(O) {
|
|
181167
|
-
return A.fromBytes(
|
|
181167
|
+
return A.fromBytes(ei("pointHex", O));
|
|
181168
181168
|
}
|
|
181169
181169
|
get x() {
|
|
181170
181170
|
return this.toAffine().x;
|
|
@@ -181389,7 +181389,7 @@ function eXe(e, t = {}) {
|
|
|
181389
181389
|
const { secretKey: f, publicKey: g, publicKeyUncompressed: m } = o;
|
|
181390
181390
|
if (n.allowedLengths || f === g)
|
|
181391
181391
|
return;
|
|
181392
|
-
const b =
|
|
181392
|
+
const b = ei("key", h).length;
|
|
181393
181393
|
return b === g || b === m;
|
|
181394
181394
|
}
|
|
181395
181395
|
function d(h, f, g = !0) {
|
|
@@ -181472,7 +181472,7 @@ function tXe(e, t, n = {}) {
|
|
|
181472
181472
|
const L = $ === 2 || $ === 3 ? R + a : R;
|
|
181473
181473
|
if (!i.isValid(L))
|
|
181474
181474
|
throw new Error("recovery id 2 or 3 invalid");
|
|
181475
|
-
const P = i.toBytes(L), G = e.fromBytes(zu(lne(($ & 1) === 0), P)), re = s.inv(L), Q = w(
|
|
181475
|
+
const P = i.toBytes(L), G = e.fromBytes(zu(lne(($ & 1) === 0), P)), re = s.inv(L), Q = w(ei("msgHash", j)), J = s.create(-Q * re), le = s.create(U * re), X = e.BASE.multiplyUnsafe(J).add(G.multiplyUnsafe(le));
|
|
181476
181476
|
if (X.is0())
|
|
181477
181477
|
throw new Error("point at infinify");
|
|
181478
181478
|
return X.assertValidity(), X;
|
|
@@ -181499,10 +181499,10 @@ function tXe(e, t, n = {}) {
|
|
|
181499
181499
|
assertValidity() {
|
|
181500
181500
|
}
|
|
181501
181501
|
static fromCompact(j) {
|
|
181502
|
-
return F.fromBytes(
|
|
181502
|
+
return F.fromBytes(ei("sig", j), "compact");
|
|
181503
181503
|
}
|
|
181504
181504
|
static fromDER(j) {
|
|
181505
|
-
return F.fromBytes(
|
|
181505
|
+
return F.fromBytes(ei("sig", j), "der");
|
|
181506
181506
|
}
|
|
181507
181507
|
normalizeS() {
|
|
181508
181508
|
return this.hasHighS() ? new F(this.r, s.neg(this.s), this.recovery) : this;
|
|
@@ -181542,7 +181542,7 @@ function tXe(e, t, n = {}) {
|
|
|
181542
181542
|
const H = w(C), L = mh(s, j), P = [k(L), k(H)];
|
|
181543
181543
|
if ($ != null && $ !== !1) {
|
|
181544
181544
|
const J = $ === !0 ? r(h.secretKey) : $;
|
|
181545
|
-
P.push(
|
|
181545
|
+
P.push(ei("extraEntropy", J));
|
|
181546
181546
|
}
|
|
181547
181547
|
const G = zu(...P), re = H;
|
|
181548
181548
|
function Q(J) {
|
|
@@ -181561,7 +181561,7 @@ function tXe(e, t, n = {}) {
|
|
|
181561
181561
|
return { seed: G, k2sig: Q };
|
|
181562
181562
|
}
|
|
181563
181563
|
function N(C, j, S = {}) {
|
|
181564
|
-
C =
|
|
181564
|
+
C = ei("message", C);
|
|
181565
181565
|
const { seed: R, k2sig: U } = A(C, j, S);
|
|
181566
181566
|
return MGe(t.outputLen, s.BYTES, o)(R, U);
|
|
181567
181567
|
}
|
|
@@ -181574,14 +181574,14 @@ function tXe(e, t, n = {}) {
|
|
|
181574
181574
|
j = new F(C.r, C.s);
|
|
181575
181575
|
else if (S) {
|
|
181576
181576
|
try {
|
|
181577
|
-
j = F.fromBytes(
|
|
181577
|
+
j = F.fromBytes(ei("sig", C), "der");
|
|
181578
181578
|
} catch (U) {
|
|
181579
181579
|
if (!(U instanceof kl.Err))
|
|
181580
181580
|
throw U;
|
|
181581
181581
|
}
|
|
181582
181582
|
if (!j)
|
|
181583
181583
|
try {
|
|
181584
|
-
j = F.fromBytes(
|
|
181584
|
+
j = F.fromBytes(ei("sig", C), "compact");
|
|
181585
181585
|
} catch {
|
|
181586
181586
|
return !1;
|
|
181587
181587
|
}
|
|
@@ -181590,9 +181590,9 @@ function tXe(e, t, n = {}) {
|
|
|
181590
181590
|
}
|
|
181591
181591
|
function _(C, j, S, R = {}) {
|
|
181592
181592
|
const { lowS: U, prehash: $, format: H } = h5(R, f);
|
|
181593
|
-
if (S =
|
|
181593
|
+
if (S = ei("publicKey", S), j = E(ei("message", j), $), "strict" in R)
|
|
181594
181594
|
throw new Error("options.strict was renamed to lowS");
|
|
181595
|
-
const L = H === void 0 ? M(C) : F.fromBytes(
|
|
181595
|
+
const L = H === void 0 ? M(C) : F.fromBytes(ei("sig", C), H);
|
|
181596
181596
|
if (L === !1)
|
|
181597
181597
|
return !1;
|
|
181598
181598
|
try {
|
|
@@ -181698,7 +181698,7 @@ function lXe(e) {
|
|
|
181698
181698
|
throw new Error("Cannot find square root");
|
|
181699
181699
|
return D;
|
|
181700
181700
|
}
|
|
181701
|
-
const w8 = jm(QA.p, { sqrt: lXe }), uXe = sXe({ ...QA, Fp: w8, lowS: !0, endo: aXe }, jGe),
|
|
181701
|
+
const w8 = jm(QA.p, { sqrt: lXe }), uXe = sXe({ ...QA, Fp: w8, lowS: !0, endo: aXe }, jGe), ti = {
|
|
181702
181702
|
generateKeyPair: () => zre(),
|
|
181703
181703
|
encryptData: (e, t) => {
|
|
181704
181704
|
const n = uXe.getPublicKey(e);
|
|
@@ -181781,8 +181781,8 @@ class cXe {
|
|
|
181781
181781
|
sessionDid: (s = this.collaborationKeyPair) == null ? void 0 : s.did(),
|
|
181782
181782
|
documentId: this.roomId
|
|
181783
181783
|
};
|
|
181784
|
-
this.roomInfo && (o.roomInfo =
|
|
181785
|
-
|
|
181784
|
+
this.roomInfo && (o.roomInfo = ti.encryptData(
|
|
181785
|
+
Po(this.roomKey),
|
|
181786
181786
|
new TextEncoder().encode(JSON.stringify(this.roomInfo))
|
|
181787
181787
|
)), this.ownerKeyPair && (o.ownerToken = await this.getOwnerToken()), this.ownerAddress && (o.ownerAddress = this.ownerAddress), this.contractAddress && (o.contractAddress = this.contractAddress);
|
|
181788
181788
|
const i = await this._emitWithAck("/auth", o);
|
|
@@ -181801,8 +181801,8 @@ class cXe {
|
|
|
181801
181801
|
const n = this.roomKey, r = t.data.position;
|
|
181802
181802
|
if (n)
|
|
181803
181803
|
try {
|
|
181804
|
-
const o =
|
|
181805
|
-
|
|
181804
|
+
const o = ti.decryptData(
|
|
181805
|
+
Po(n),
|
|
181806
181806
|
r
|
|
181807
181807
|
);
|
|
181808
181808
|
ume(
|
|
@@ -181825,7 +181825,7 @@ class cXe {
|
|
|
181825
181825
|
});
|
|
181826
181826
|
this._socketUrl = t.wsUrl || "ws://localhost:5000";
|
|
181827
181827
|
const { secretKey: n } = vGe(
|
|
181828
|
-
|
|
181828
|
+
Po(t.roomKey)
|
|
181829
181829
|
);
|
|
181830
181830
|
this.roomKey = t.roomKey, this.roomId = t.roomId, this.collaborationKeyPair = Ig.fromSecretKey(
|
|
181831
181831
|
tr(n)
|
|
@@ -182023,8 +182023,8 @@ class cXe {
|
|
|
182023
182023
|
this.awareness.clientID
|
|
182024
182024
|
]), l = this.roomKey;
|
|
182025
182025
|
if (l) {
|
|
182026
|
-
const u =
|
|
182027
|
-
|
|
182026
|
+
const u = ti.encryptData(
|
|
182027
|
+
Po(l),
|
|
182028
182028
|
a
|
|
182029
182029
|
);
|
|
182030
182030
|
this.broadcastAwareness(u);
|
|
@@ -182049,8 +182049,8 @@ const KL = (e, t) => {
|
|
|
182049
182049
|
r = [];
|
|
182050
182050
|
const l = KW(e, a);
|
|
182051
182051
|
if (t.isConnected) {
|
|
182052
|
-
const u =
|
|
182053
|
-
|
|
182052
|
+
const u = ti.encryptData(
|
|
182053
|
+
Po(n),
|
|
182054
182054
|
l
|
|
182055
182055
|
);
|
|
182056
182056
|
t.broadcastAwareness(u);
|
|
@@ -182091,7 +182091,13 @@ function pXe(e, t, n) {
|
|
|
182091
182091
|
context: { terminationReason: t.reason }
|
|
182092
182092
|
} : r === "RESET" ? { status: "idle", context: { ...Mu } } : null;
|
|
182093
182093
|
case "syncing":
|
|
182094
|
-
return r === "SYNC_COMPLETE" ? { status: "ready", context: { hasUnmergedPeerUpdates: !1 } } : r === "
|
|
182094
|
+
return r === "SYNC_COMPLETE" ? { status: "ready", context: { hasUnmergedPeerUpdates: !1 } } : r === "SOCKET_DROPPED" ? {
|
|
182095
|
+
status: "reconnecting",
|
|
182096
|
+
context: { reconnectAttempt: n.reconnectAttempt + 1 }
|
|
182097
|
+
} : r === "RECONNECTED" ? {
|
|
182098
|
+
status: "syncing",
|
|
182099
|
+
context: { hasUnmergedPeerUpdates: !1 }
|
|
182100
|
+
} : r === "SET_UNMERGED_UPDATES" ? {
|
|
182095
182101
|
status: "syncing",
|
|
182096
182102
|
context: { hasUnmergedPeerUpdates: t.hasUpdates }
|
|
182097
182103
|
} : r === "ERROR" ? {
|
|
@@ -182122,6 +182128,9 @@ function pXe(e, t, n) {
|
|
|
182122
182128
|
recoverable: !1
|
|
182123
182129
|
}
|
|
182124
182130
|
}
|
|
182131
|
+
} : r === "ERROR" ? {
|
|
182132
|
+
status: "error",
|
|
182133
|
+
context: { error: t.error, hasUnmergedPeerUpdates: !1 }
|
|
182125
182134
|
} : r === "SOCKET_DROPPED" ? {
|
|
182126
182135
|
status: "reconnecting",
|
|
182127
182136
|
context: {
|
|
@@ -182189,6 +182198,7 @@ class hXe {
|
|
|
182189
182198
|
Ve(this, "uncommittedUpdatesIdList", []);
|
|
182190
182199
|
Ve(this, "contentTobeAppliedQueue", []);
|
|
182191
182200
|
Ve(this, "isProcessing", !1);
|
|
182201
|
+
Ve(this, "syncId", 0);
|
|
182192
182202
|
Ve(this, "flushTimer", null);
|
|
182193
182203
|
Ve(this, "FLUSH_INTERVAL_MS", 50);
|
|
182194
182204
|
Ve(this, "MAX_QUEUE_SIZE", 5);
|
|
@@ -182221,6 +182231,18 @@ class hXe {
|
|
|
182221
182231
|
return f5(this._status, this._context);
|
|
182222
182232
|
}
|
|
182223
182233
|
// ─── State machine core ───
|
|
182234
|
+
// reconnectAttempt is a user-facing retry count and may reset between cycles.
|
|
182235
|
+
// syncId is monotonic, so async sync work cannot become current again
|
|
182236
|
+
// after a later reconnect happens to reuse the same retry attempt number.
|
|
182237
|
+
beginSyncAttempt() {
|
|
182238
|
+
return this.syncId += 1, this.syncId;
|
|
182239
|
+
}
|
|
182240
|
+
// Async sync work can finish after a socket drop starts a newer reconnect sync.
|
|
182241
|
+
// Keep the captured generation current before applying updates or moving to
|
|
182242
|
+
// ready, so stale initial/reconnect syncs cannot finalize late.
|
|
182243
|
+
isCurrentSyncAttempt(t) {
|
|
182244
|
+
return this._status === "syncing" && this.syncId === t;
|
|
182245
|
+
}
|
|
182224
182246
|
send(t) {
|
|
182225
182247
|
var i, s;
|
|
182226
182248
|
const n = pXe(this._status, t, this._context);
|
|
@@ -182245,9 +182267,9 @@ class hXe {
|
|
|
182245
182267
|
}
|
|
182246
182268
|
// ─── Public API ───
|
|
182247
182269
|
async connect(t) {
|
|
182248
|
-
var
|
|
182270
|
+
var o, i;
|
|
182249
182271
|
if (this._status !== "idle") return;
|
|
182250
|
-
this.roomKey = t.roomKey, this.roomKeyBytes =
|
|
182272
|
+
this.roomKey = t.roomKey, this.roomKeyBytes = Po(t.roomKey), this.isOwner = t.isOwner;
|
|
182251
182273
|
const n = tr(xo(this.ydoc));
|
|
182252
182274
|
this.socketClient = new cXe({
|
|
182253
182275
|
wsUrl: t.wsUrl,
|
|
@@ -182256,19 +182278,24 @@ class hXe {
|
|
|
182256
182278
|
ownerEdSecret: t.ownerEdSecret,
|
|
182257
182279
|
contractAddress: t.contractAddress,
|
|
182258
182280
|
ownerAddress: t.ownerAddress,
|
|
182259
|
-
onHandshakeData: (
|
|
182281
|
+
onHandshakeData: (o = this.callbacksRef) == null ? void 0 : o.onHandshakeData,
|
|
182260
182282
|
roomInfo: t.roomInfo
|
|
182261
182283
|
}), this.send({ type: "CONNECT" });
|
|
182284
|
+
let r = null;
|
|
182262
182285
|
try {
|
|
182263
|
-
if (await this.connectSocket(), this.send({ type: "AUTH_SUCCESS" }), await this.syncLatestCommit(n), await new Promise((
|
|
182286
|
+
if (await this.connectSocket(), this.send({ type: "AUTH_SUCCESS" }), r = this.beginSyncAttempt(), await this.syncLatestCommit(n, r), !this.isCurrentSyncAttempt(r) || (await new Promise((s) => setTimeout(s, 0)), !this.isCurrentSyncAttempt(r)))
|
|
182287
|
+
return;
|
|
182288
|
+
if (!((i = this.socketClient) != null && i.isConnected))
|
|
182264
182289
|
throw new Error("Socket disconnected during sync");
|
|
182265
|
-
this.applyQueuedRemoteContents(), this.send({ type: "SYNC_COMPLETE" }), this.updateQueue.length > 0 && this.processUpdateQueue().catch((
|
|
182266
|
-
console.error("SyncManager: processUpdateQueue failed",
|
|
182290
|
+
this.applyQueuedRemoteContents(), this.send({ type: "SYNC_COMPLETE" }), this.updateQueue.length > 0 && this.processUpdateQueue().catch((s) => {
|
|
182291
|
+
console.error("SyncManager: processUpdateQueue failed", s);
|
|
182267
182292
|
});
|
|
182268
|
-
} catch (
|
|
182269
|
-
|
|
182270
|
-
|
|
182271
|
-
|
|
182293
|
+
} catch (s) {
|
|
182294
|
+
if (r !== null && !this.isCurrentSyncAttempt(r))
|
|
182295
|
+
return;
|
|
182296
|
+
console.error("SyncManager: connect failed", s);
|
|
182297
|
+
const a = s instanceof Error ? s : new Error(String(s));
|
|
182298
|
+
this.handleConnectionError(a);
|
|
182272
182299
|
}
|
|
182273
182300
|
}
|
|
182274
182301
|
async disconnect() {
|
|
@@ -182322,14 +182349,11 @@ class hXe {
|
|
|
182322
182349
|
return;
|
|
182323
182350
|
const t = this.updateQueue;
|
|
182324
182351
|
this.updateQueue = [];
|
|
182325
|
-
const n = pd(t), r =
|
|
182352
|
+
const n = pd(t), r = ti.encryptData(this.roomKeyBytes, n);
|
|
182326
182353
|
(o = this.socketClient) == null || o.sendUpdate({ update: r }).then((i) => {
|
|
182327
182354
|
var a;
|
|
182328
182355
|
if (!(i != null && i.status)) {
|
|
182329
|
-
console.error(
|
|
182330
|
-
"SyncManager: server rejected update",
|
|
182331
|
-
i == null ? void 0 : i.error
|
|
182332
|
-
);
|
|
182356
|
+
console.error("SyncManager: server rejected update", i == null ? void 0 : i.error);
|
|
182333
182357
|
return;
|
|
182334
182358
|
}
|
|
182335
182359
|
const s = (a = i == null ? void 0 : i.data) == null ? void 0 : a.id;
|
|
@@ -182354,22 +182378,27 @@ class hXe {
|
|
|
182354
182378
|
n === "SocketConnectionTimeoutError" || r.includes("timed out") ? o = Yp("TIMEOUT", t.message) : n === "SocketConnectionFailedError" || r.includes("Failed to reconnect") ? o = Yp("CONNECTION_FAILED", t.message) : r.includes("statusCode: 401") || r.includes("AUTH_") ? o = Yp("AUTH_FAILED", t.message) : r.includes("sync") || r.includes("decrypt") ? o = Yp("SYNC_FAILED", t.message) : o = Yp("UNKNOWN", t.message), (i = this.socketClient) == null || i.disconnect(), this.resetInternalState(), this.send({ type: "ERROR", error: o });
|
|
182355
182379
|
}
|
|
182356
182380
|
async handleReconnection() {
|
|
182357
|
-
var
|
|
182381
|
+
var r;
|
|
182382
|
+
if (!this.send({ type: "RECONNECTED" })) return;
|
|
182383
|
+
const n = this.beginSyncAttempt();
|
|
182358
182384
|
try {
|
|
182359
|
-
|
|
182360
|
-
|
|
182361
|
-
|
|
182385
|
+
const o = tr(xo(this.ydoc));
|
|
182386
|
+
if (await this.syncLatestCommit(o, n), !this.isCurrentSyncAttempt(n))
|
|
182387
|
+
return;
|
|
182388
|
+
if (!((r = this.socketClient) != null && r.isConnected))
|
|
182362
182389
|
throw new Error("Socket disconnected during re-sync");
|
|
182363
|
-
this.applyQueuedRemoteContents(), this.send({ type: "SYNC_COMPLETE" }), this.updateQueue.length > 0 && this.processUpdateQueue().catch((
|
|
182390
|
+
this.applyQueuedRemoteContents(), this.send({ type: "SYNC_COMPLETE" }), this.updateQueue.length > 0 && this.processUpdateQueue().catch((i) => {
|
|
182364
182391
|
console.error(
|
|
182365
182392
|
"SyncManager: post-reconnect processUpdateQueue failed",
|
|
182366
|
-
|
|
182393
|
+
i
|
|
182367
182394
|
);
|
|
182368
182395
|
});
|
|
182369
|
-
} catch (
|
|
182370
|
-
|
|
182371
|
-
|
|
182372
|
-
|
|
182396
|
+
} catch (o) {
|
|
182397
|
+
if (!this.isCurrentSyncAttempt(n))
|
|
182398
|
+
return;
|
|
182399
|
+
console.error("SyncManager: reconnection handling failed", o);
|
|
182400
|
+
const i = o instanceof Error ? o : new Error(String(o));
|
|
182401
|
+
this.handleConnectionError(i);
|
|
182373
182402
|
}
|
|
182374
182403
|
}
|
|
182375
182404
|
connectSocket() {
|
|
@@ -182392,7 +182421,7 @@ class hXe {
|
|
|
182392
182421
|
this.disconnect();
|
|
182393
182422
|
},
|
|
182394
182423
|
onSocketDropped: () => {
|
|
182395
|
-
this._status === "ready" && this.send({ type: "SOCKET_DROPPED" });
|
|
182424
|
+
(this._status === "ready" || this._status === "syncing") && this.send({ type: "SOCKET_DROPPED" });
|
|
182396
182425
|
},
|
|
182397
182426
|
onHandShakeError: (i, s) => {
|
|
182398
182427
|
var a;
|
|
@@ -182423,7 +182452,7 @@ class hXe {
|
|
|
182423
182452
|
onReconnectFailed: () => {
|
|
182424
182453
|
if (this._status === "reconnecting")
|
|
182425
182454
|
this.send({ type: "RETRY_EXHAUSTED" });
|
|
182426
|
-
else if (this._status === "ready") {
|
|
182455
|
+
else if (this._status === "ready" || this._status === "syncing") {
|
|
182427
182456
|
const i = Yp(
|
|
182428
182457
|
"CONNECTION_FAILED",
|
|
182429
182458
|
"Connection lost and reconnection failed"
|
|
@@ -182449,69 +182478,75 @@ class hXe {
|
|
|
182449
182478
|
});
|
|
182450
182479
|
});
|
|
182451
182480
|
}
|
|
182452
|
-
async syncLatestCommit(t) {
|
|
182481
|
+
async syncLatestCommit(t, n) {
|
|
182482
|
+
const r = () => this.isCurrentSyncAttempt(n);
|
|
182453
182483
|
await this.withRetry(async () => {
|
|
182454
|
-
var
|
|
182455
|
-
const
|
|
182456
|
-
|
|
182457
|
-
|
|
182484
|
+
var p, h, f, g, m, b;
|
|
182485
|
+
const o = await ((p = this.socketClient) == null ? void 0 : p.fetchLatestCommit());
|
|
182486
|
+
if (!r()) return;
|
|
182487
|
+
const i = (f = (h = o == null ? void 0 : o.data) == null ? void 0 : h.history) == null ? void 0 : f[0];
|
|
182488
|
+
let s;
|
|
182489
|
+
if (i != null && i.data)
|
|
182458
182490
|
try {
|
|
182459
|
-
|
|
182491
|
+
s = ti.decryptData(
|
|
182460
182492
|
this.roomKeyBytes,
|
|
182461
|
-
|
|
182493
|
+
i.data
|
|
182462
182494
|
);
|
|
182463
|
-
} catch (
|
|
182495
|
+
} catch (y) {
|
|
182464
182496
|
console.warn(
|
|
182465
182497
|
"SyncManager: failed to decrypt commit data, skipping",
|
|
182466
|
-
|
|
182498
|
+
y
|
|
182467
182499
|
);
|
|
182468
182500
|
}
|
|
182469
|
-
const
|
|
182470
|
-
if (
|
|
182471
|
-
const
|
|
182472
|
-
if (
|
|
182501
|
+
const a = [];
|
|
182502
|
+
if (i != null && i.cid && ((g = this.servicesRef) != null && g.fetchFromStorage)) {
|
|
182503
|
+
const y = await this.servicesRef.fetchFromStorage(i.cid);
|
|
182504
|
+
if (!r()) return;
|
|
182505
|
+
if (y != null && y.data)
|
|
182473
182506
|
try {
|
|
182474
|
-
const
|
|
182507
|
+
const F = ti.decryptData(
|
|
182475
182508
|
this.roomKeyBytes,
|
|
182476
|
-
|
|
182509
|
+
y.data
|
|
182477
182510
|
);
|
|
182478
|
-
|
|
182479
|
-
} catch (
|
|
182511
|
+
a.push(F);
|
|
182512
|
+
} catch (F) {
|
|
182480
182513
|
console.warn(
|
|
182481
182514
|
"SyncManager: failed to decrypt commit content, skipping",
|
|
182482
|
-
|
|
182515
|
+
F
|
|
182483
182516
|
);
|
|
182484
182517
|
}
|
|
182485
182518
|
}
|
|
182486
|
-
const
|
|
182487
|
-
if (
|
|
182519
|
+
const l = await ((m = this.socketClient) == null ? void 0 : m.getUncommittedChanges());
|
|
182520
|
+
if (!r()) return;
|
|
182521
|
+
const u = (b = l == null ? void 0 : l.data) == null ? void 0 : b.history, c = [];
|
|
182522
|
+
if (t && a.push(Po(t)), s && a.push(s), u && u.length > 0) {
|
|
182488
182523
|
this.isOwner && this.send({ type: "SET_UNMERGED_UPDATES", hasUpdates: !0 });
|
|
182489
|
-
for (const
|
|
182524
|
+
for (const y of u)
|
|
182490
182525
|
try {
|
|
182491
|
-
const
|
|
182526
|
+
const F = ti.decryptData(
|
|
182492
182527
|
this.roomKeyBytes,
|
|
182493
|
-
|
|
182528
|
+
y.data
|
|
182494
182529
|
);
|
|
182495
|
-
|
|
182496
|
-
} catch (
|
|
182530
|
+
c.push(y.id), a.push(F);
|
|
182531
|
+
} catch (F) {
|
|
182497
182532
|
console.warn(
|
|
182498
182533
|
"SyncManager: failed to decrypt uncommitted update, skipping",
|
|
182499
|
-
|
|
182534
|
+
F
|
|
182500
182535
|
);
|
|
182501
182536
|
}
|
|
182502
182537
|
}
|
|
182503
|
-
if (
|
|
182504
|
-
|
|
182505
|
-
|
|
182538
|
+
if (!r()) return;
|
|
182539
|
+
if (a.length) {
|
|
182540
|
+
const y = pd(a);
|
|
182541
|
+
Vs(this.ydoc, y, "self");
|
|
182506
182542
|
}
|
|
182507
|
-
this.uncommittedUpdatesIdList =
|
|
182508
|
-
const
|
|
182509
|
-
|
|
182510
|
-
|
|
182511
|
-
|
|
182512
|
-
|
|
182513
|
-
|
|
182514
|
-
) : await this.broadcastLocalContents(u);
|
|
182543
|
+
this.uncommittedUpdatesIdList = c;
|
|
182544
|
+
const d = tr(xo(this.ydoc));
|
|
182545
|
+
r() && (this.isOwner ? await this.commitLocalContents(
|
|
182546
|
+
c,
|
|
182547
|
+
d,
|
|
182548
|
+
n
|
|
182549
|
+
) : await this.broadcastLocalContents(d, n));
|
|
182515
182550
|
}, "syncLatestCommit");
|
|
182516
182551
|
}
|
|
182517
182552
|
initializeAwareness() {
|
|
@@ -182530,24 +182565,27 @@ class hXe {
|
|
|
182530
182565
|
cleanupAwareness() {
|
|
182531
182566
|
this._awareness && this._awarenessUpdateHandler && this._awareness.off("update", this._awarenessUpdateHandler), this._awareness && this._awareness.destroy(), this._awareness = null, this._awarenessUpdateHandler = null;
|
|
182532
182567
|
}
|
|
182533
|
-
async commitLocalContents(t, n) {
|
|
182534
|
-
var
|
|
182568
|
+
async commitLocalContents(t, n, r) {
|
|
182569
|
+
var i, s;
|
|
182570
|
+
const o = () => this.isCurrentSyncAttempt(r);
|
|
182535
182571
|
if (t.length >= Zp)
|
|
182536
|
-
if (typeof ((
|
|
182572
|
+
if (typeof ((i = this.servicesRef) == null ? void 0 : i.commitToStorage) != "function")
|
|
182537
182573
|
console.debug(
|
|
182538
182574
|
"SyncManager: no commit function provided, skipping commit"
|
|
182539
182575
|
);
|
|
182540
182576
|
else {
|
|
182541
|
-
const a =
|
|
182577
|
+
const a = ti.encryptData(
|
|
182542
182578
|
this.roomKeyBytes,
|
|
182543
182579
|
xo(this.ydoc)
|
|
182544
182580
|
), l = KL({ data: a }, "commit"), u = await this.servicesRef.commitToStorage(l);
|
|
182581
|
+
if (!o()) return;
|
|
182545
182582
|
if (!u)
|
|
182546
182583
|
throw new Error("Failed to upload commit to IPFS: no hash returned");
|
|
182547
|
-
const c = await ((
|
|
182584
|
+
const c = await ((s = this.socketClient) == null ? void 0 : s.commitUpdates({
|
|
182548
182585
|
updates: t,
|
|
182549
182586
|
cid: u
|
|
182550
182587
|
}));
|
|
182588
|
+
if (!o()) return;
|
|
182551
182589
|
if (!(c != null && c.status)) {
|
|
182552
182590
|
const d = (c == null ? void 0 : c.error) || "Server rejected commit";
|
|
182553
182591
|
throw new Error(
|
|
@@ -182556,38 +182594,29 @@ class hXe {
|
|
|
182556
182594
|
}
|
|
182557
182595
|
this.uncommittedUpdatesIdList = [];
|
|
182558
182596
|
}
|
|
182559
|
-
|
|
182560
|
-
const a = Ro.encryptData(
|
|
182561
|
-
this.roomKeyBytes,
|
|
182562
|
-
wo(n)
|
|
182563
|
-
), l = await ((i = this.socketClient) == null ? void 0 : i.sendUpdate({
|
|
182564
|
-
update: a
|
|
182565
|
-
}));
|
|
182566
|
-
if (!(l != null && l.status)) {
|
|
182567
|
-
const c = (l == null ? void 0 : l.error) || "Server rejected update";
|
|
182568
|
-
throw new Error(
|
|
182569
|
-
`Failed to broadcast local contents: ${c}${l != null && l.statusCode ? ` (${l.statusCode})` : ""}`
|
|
182570
|
-
);
|
|
182571
|
-
}
|
|
182572
|
-
const u = (s = l == null ? void 0 : l.data) == null ? void 0 : s.id;
|
|
182573
|
-
u && this.uncommittedUpdatesIdList.push(u);
|
|
182574
|
-
}
|
|
182597
|
+
await this.broadcastLocalContents(n, r, !0);
|
|
182575
182598
|
}
|
|
182576
|
-
async broadcastLocalContents(t) {
|
|
182577
|
-
var
|
|
182599
|
+
async broadcastLocalContents(t, n, r = !1) {
|
|
182600
|
+
var l, u;
|
|
182601
|
+
const o = () => this.isCurrentSyncAttempt(n);
|
|
182578
182602
|
if (!t) return;
|
|
182579
|
-
const
|
|
182603
|
+
const i = ti.encryptData(
|
|
182580
182604
|
this.roomKeyBytes,
|
|
182581
|
-
|
|
182582
|
-
)
|
|
182583
|
-
|
|
182605
|
+
Po(t)
|
|
182606
|
+
);
|
|
182607
|
+
if (!o()) return;
|
|
182608
|
+
const s = await ((l = this.socketClient) == null ? void 0 : l.sendUpdate({
|
|
182609
|
+
update: i
|
|
182584
182610
|
}));
|
|
182585
|
-
if (!(
|
|
182586
|
-
|
|
182611
|
+
if (!o()) return;
|
|
182612
|
+
if (!(s != null && s.status)) {
|
|
182613
|
+
const c = (s == null ? void 0 : s.error) || "Server rejected update";
|
|
182587
182614
|
throw new Error(
|
|
182588
|
-
`Failed to broadcast local contents: ${
|
|
182615
|
+
`Failed to broadcast local contents: ${c}${s != null && s.statusCode ? ` (${s.statusCode})` : ""}`
|
|
182589
182616
|
);
|
|
182590
182617
|
}
|
|
182618
|
+
const a = (u = s == null ? void 0 : s.data) == null ? void 0 : u.id;
|
|
182619
|
+
r && a && this.uncommittedUpdatesIdList.push(a);
|
|
182591
182620
|
}
|
|
182592
182621
|
async processUpdateQueue() {
|
|
182593
182622
|
if (!this.isProcessing) {
|
|
@@ -182606,7 +182635,7 @@ class hXe {
|
|
|
182606
182635
|
async processNextUpdate() {
|
|
182607
182636
|
var i, s;
|
|
182608
182637
|
if (this.updateQueue.length === 0 || !this.roomKey) return;
|
|
182609
|
-
const t = this.updateQueue.length, n = pd(this.updateQueue), r =
|
|
182638
|
+
const t = this.updateQueue.length, n = pd(this.updateQueue), r = ti.encryptData(
|
|
182610
182639
|
this.roomKeyBytes,
|
|
182611
182640
|
n
|
|
182612
182641
|
);
|
|
@@ -182647,7 +182676,7 @@ class hXe {
|
|
|
182647
182676
|
for (let i = 0; i <= ob; i++)
|
|
182648
182677
|
try {
|
|
182649
182678
|
const s = {
|
|
182650
|
-
data:
|
|
182679
|
+
data: ti.encryptData(
|
|
182651
182680
|
this.roomKeyBytes,
|
|
182652
182681
|
xo(this.ydoc)
|
|
182653
182682
|
)
|
|
@@ -182690,7 +182719,7 @@ class hXe {
|
|
|
182690
182719
|
if (!this.ydoc) return;
|
|
182691
182720
|
let r;
|
|
182692
182721
|
try {
|
|
182693
|
-
r =
|
|
182722
|
+
r = ti.decryptData(this.roomKeyBytes, t);
|
|
182694
182723
|
} catch (o) {
|
|
182695
182724
|
console.warn("SyncManager: failed to decrypt update, skipping", o);
|
|
182696
182725
|
return;
|
|
@@ -182719,7 +182748,7 @@ class hXe {
|
|
|
182719
182748
|
const t = [], n = [];
|
|
182720
182749
|
for (const o of this.contentTobeAppliedQueue)
|
|
182721
182750
|
try {
|
|
182722
|
-
const i =
|
|
182751
|
+
const i = ti.decryptData(
|
|
182723
182752
|
this.roomKeyBytes,
|
|
182724
182753
|
o.data
|
|
182725
182754
|
);
|
|
@@ -182777,56 +182806,58 @@ class hXe {
|
|
|
182777
182806
|
}
|
|
182778
182807
|
}
|
|
182779
182808
|
const fXe = { status: "idle" }, gXe = (e) => {
|
|
182780
|
-
const [t, n] = Ne(fXe), r = Se(null);
|
|
182809
|
+
const [t, n] = Ne(fXe), r = Se(null), o = Se(!1);
|
|
182781
182810
|
r.current || (r.current = new hXe(e, n));
|
|
182782
|
-
const
|
|
182783
|
-
|
|
182784
|
-
const
|
|
182811
|
+
const i = r.current;
|
|
182812
|
+
i.updateRefs(e.services, e.callbacks, e.onLocalUpdate);
|
|
182813
|
+
const s = i.isConnected, a = i.awareness;
|
|
182785
182814
|
_e(() => {
|
|
182786
|
-
if (!
|
|
182787
|
-
const
|
|
182788
|
-
var
|
|
182789
|
-
|
|
182790
|
-
(
|
|
182791
|
-
) ||
|
|
182815
|
+
if (!s || !e.ydoc) return;
|
|
182816
|
+
const f = (g, m) => {
|
|
182817
|
+
var b;
|
|
182818
|
+
m === "self" || m === "remote" || !i.isConnected || (b = e.ignoredOrigins) != null && b.some(
|
|
182819
|
+
(y) => y.current !== null && y.current === m
|
|
182820
|
+
) || i.enqueueLocalUpdate(g);
|
|
182792
182821
|
};
|
|
182793
|
-
return e.ydoc.on("update",
|
|
182794
|
-
e.ydoc.off("update",
|
|
182822
|
+
return e.ydoc.on("update", f), () => {
|
|
182823
|
+
e.ydoc.off("update", f);
|
|
182795
182824
|
};
|
|
182796
|
-
}, [e.ydoc,
|
|
182797
|
-
if (!
|
|
182798
|
-
const
|
|
182799
|
-
Sd(
|
|
182825
|
+
}, [e.ydoc, s]), _e(() => {
|
|
182826
|
+
if (!a) return;
|
|
182827
|
+
const f = () => {
|
|
182828
|
+
Sd(a, [e.ydoc.clientID], "window unload");
|
|
182800
182829
|
};
|
|
182801
|
-
return typeof window < "u" && typeof window.addEventListener == "function" && window.addEventListener("beforeunload",
|
|
182802
|
-
Sd(
|
|
182830
|
+
return typeof window < "u" && typeof window.addEventListener == "function" && window.addEventListener("beforeunload", f), () => {
|
|
182831
|
+
Sd(a, [e.ydoc.clientID], "hook unmount"), typeof window < "u" && typeof window.removeEventListener == "function" && window.removeEventListener("beforeunload", f);
|
|
182803
182832
|
};
|
|
182804
|
-
}, [
|
|
182805
|
-
var
|
|
182806
|
-
(
|
|
182833
|
+
}, [a !== void 0]), _e(() => () => {
|
|
182834
|
+
var f;
|
|
182835
|
+
(f = r.current) == null || f.forceCleanup();
|
|
182807
182836
|
}, []);
|
|
182808
|
-
const
|
|
182809
|
-
(
|
|
182810
|
-
|
|
182811
|
-
console.error("useSyncManager: connect failed",
|
|
182837
|
+
const l = Ae(
|
|
182838
|
+
(f) => {
|
|
182839
|
+
i.connect(f).catch((g) => {
|
|
182840
|
+
console.error("useSyncManager: connect failed", g);
|
|
182812
182841
|
});
|
|
182813
182842
|
},
|
|
182814
182843
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
182815
182844
|
[e.ydoc]
|
|
182816
|
-
),
|
|
182817
|
-
|
|
182818
|
-
}, [
|
|
182819
|
-
|
|
182820
|
-
}, [
|
|
182845
|
+
), u = Ae(() => {
|
|
182846
|
+
i.disconnect();
|
|
182847
|
+
}, [i]), c = Ae(() => {
|
|
182848
|
+
i.terminateSession();
|
|
182849
|
+
}, [i]), d = t.status === "syncing", p = t.status === "ready" && !!a;
|
|
182850
|
+
t.status === "idle" || t.status === "connecting" ? o.current = !1 : t.status === "ready" && (o.current = !0);
|
|
182851
|
+
const h = t.status === "ready" || t.status === "reconnecting" && o.current;
|
|
182821
182852
|
return {
|
|
182822
182853
|
state: t,
|
|
182823
|
-
connect:
|
|
182824
|
-
disconnect:
|
|
182825
|
-
terminateSession:
|
|
182826
|
-
isReady:
|
|
182827
|
-
isSyncing:
|
|
182828
|
-
awareness:
|
|
182829
|
-
hasCollabContentInitialised:
|
|
182854
|
+
connect: l,
|
|
182855
|
+
disconnect: u,
|
|
182856
|
+
terminateSession: c,
|
|
182857
|
+
isReady: p,
|
|
182858
|
+
isSyncing: d,
|
|
182859
|
+
awareness: a,
|
|
182860
|
+
hasCollabContentInitialised: h
|
|
182830
182861
|
};
|
|
182831
182862
|
}, mXe = ({
|
|
182832
182863
|
onChange: e,
|
|
@@ -183532,12 +183563,12 @@ function EXe(e, t) {
|
|
|
183532
183563
|
return l;
|
|
183533
183564
|
}
|
|
183534
183565
|
var CXe = EXe;
|
|
183535
|
-
const AXe = /* @__PURE__ */ Ac(CXe),
|
|
183566
|
+
const AXe = /* @__PURE__ */ Ac(CXe), Zo = new Gr({
|
|
183536
183567
|
html: !0,
|
|
183537
183568
|
linkify: !0,
|
|
183538
183569
|
typographer: !0
|
|
183539
183570
|
}).use(Xq).enable(["table", "list"]);
|
|
183540
|
-
|
|
183571
|
+
Zo.renderer.rules.list_item_open = (e, t) => {
|
|
183541
183572
|
const n = e[t + 2];
|
|
183542
183573
|
if (n && n.content) {
|
|
183543
183574
|
const r = n.content.match(/^\[([ xX])\]\s*(.*)$/);
|
|
@@ -183636,13 +183667,13 @@ function jXe(e, t = {}) {
|
|
|
183636
183667
|
const N = XL(w, E);
|
|
183637
183668
|
D.push({
|
|
183638
183669
|
type: "content",
|
|
183639
|
-
content:
|
|
183670
|
+
content: Zo.render(N[0])
|
|
183640
183671
|
});
|
|
183641
183672
|
for (let M = 1; M < N.length; M++)
|
|
183642
183673
|
a.push(D), D = [
|
|
183643
183674
|
{
|
|
183644
183675
|
type: "content",
|
|
183645
|
-
content:
|
|
183676
|
+
content: Zo.render(N[M])
|
|
183646
183677
|
}
|
|
183647
183678
|
];
|
|
183648
183679
|
return D;
|
|
@@ -183662,7 +183693,7 @@ function jXe(e, t = {}) {
|
|
|
183662
183693
|
XL(w, E).forEach((M, _) => {
|
|
183663
183694
|
(_ > 0 || p(M, D)) && D.length > 0 && (a.push(D), D = []), D.push({
|
|
183664
183695
|
type: "content",
|
|
183665
|
-
content:
|
|
183696
|
+
content: Zo.render(M)
|
|
183666
183697
|
});
|
|
183667
183698
|
});
|
|
183668
183699
|
return D;
|
|
@@ -183672,7 +183703,7 @@ function jXe(e, t = {}) {
|
|
|
183672
183703
|
const D = w.filter((M) => M.trim().length > 0);
|
|
183673
183704
|
if (D.length < 2) return [""];
|
|
183674
183705
|
const k = D[0].split("|").map((M) => M.trim()).filter(Boolean), E = D[1], A = D.slice(2);
|
|
183675
|
-
return D.length <= s ? [`<div class="table-wrapper">${
|
|
183706
|
+
return D.length <= s ? [`<div class="table-wrapper">${Zo.render(w.join(`
|
|
183676
183707
|
`))}</div>`] : _Xe(k, A, s).map((M) => {
|
|
183677
183708
|
const _ = [
|
|
183678
183709
|
`|${k.join("|")}|`,
|
|
@@ -183680,7 +183711,7 @@ function jXe(e, t = {}) {
|
|
|
183680
183711
|
...M.rows
|
|
183681
183712
|
].join(`
|
|
183682
183713
|
`);
|
|
183683
|
-
return `<div class="table-wrapper">${
|
|
183714
|
+
return `<div class="table-wrapper">${Zo.render(_)}</div>`;
|
|
183684
183715
|
});
|
|
183685
183716
|
}, m = e.split(`
|
|
183686
183717
|
`);
|
|
@@ -183695,16 +183726,16 @@ function jXe(e, t = {}) {
|
|
|
183695
183726
|
A.length > 10 ? YL(k).forEach((_, O) => {
|
|
183696
183727
|
(O > 0 || p(_, l)) && f(), l.push({
|
|
183697
183728
|
type: "content",
|
|
183698
|
-
content:
|
|
183729
|
+
content: Zo.render(_)
|
|
183699
183730
|
});
|
|
183700
183731
|
}) : A.length < 10 && N > 50 ? YL(k, 6).forEach((_, O) => {
|
|
183701
183732
|
(O > 0 || p(_, l)) && f(), l.push({
|
|
183702
183733
|
type: "content",
|
|
183703
|
-
content:
|
|
183734
|
+
content: Zo.render(_)
|
|
183704
183735
|
});
|
|
183705
183736
|
}) : (p(k, l) && f(), l.push({
|
|
183706
183737
|
type: "content",
|
|
183707
|
-
content:
|
|
183738
|
+
content: Zo.render(k)
|
|
183708
183739
|
})), w = E;
|
|
183709
183740
|
continue;
|
|
183710
183741
|
}
|
|
@@ -183730,7 +183761,7 @@ function jXe(e, t = {}) {
|
|
|
183730
183761
|
u = [];
|
|
183731
183762
|
}
|
|
183732
183763
|
f();
|
|
183733
|
-
const k = D.substring(2), E =
|
|
183764
|
+
const k = D.substring(2), E = Zo.renderInline(k);
|
|
183734
183765
|
a.push([{ type: "h1", content: E }]);
|
|
183735
183766
|
continue;
|
|
183736
183767
|
}
|
|
@@ -183745,7 +183776,7 @@ function jXe(e, t = {}) {
|
|
|
183745
183776
|
}
|
|
183746
183777
|
f();
|
|
183747
183778
|
const k = D.substring(3);
|
|
183748
|
-
l = [{ type: "h2", content:
|
|
183779
|
+
l = [{ type: "h2", content: Zo.renderInline(k) }];
|
|
183749
183780
|
continue;
|
|
183750
183781
|
}
|
|
183751
183782
|
if (D.startsWith("|") || D.match(/^\s*[-|]+\s*$/)) {
|
|
@@ -183767,7 +183798,7 @@ function jXe(e, t = {}) {
|
|
|
183767
183798
|
SXe(c, 23).forEach((E, A) => {
|
|
183768
183799
|
(A > 0 || p(E, l)) && f(), l.push({
|
|
183769
183800
|
type: "content",
|
|
183770
|
-
content:
|
|
183801
|
+
content: Zo.render(E)
|
|
183771
183802
|
});
|
|
183772
183803
|
});
|
|
183773
183804
|
else {
|
|
@@ -183775,7 +183806,7 @@ function jXe(e, t = {}) {
|
|
|
183775
183806
|
`);
|
|
183776
183807
|
p(k, l) && f(), l.push({
|
|
183777
183808
|
type: "content",
|
|
183778
|
-
content:
|
|
183809
|
+
content: Zo.render(k)
|
|
183779
183810
|
});
|
|
183780
183811
|
}
|
|
183781
183812
|
c = [];
|
|
@@ -183834,7 +183865,7 @@ function jXe(e, t = {}) {
|
|
|
183834
183865
|
case "table":
|
|
183835
183866
|
return D.content;
|
|
183836
183867
|
default:
|
|
183837
|
-
return
|
|
183868
|
+
return Zo.render(D.content);
|
|
183838
183869
|
}
|
|
183839
183870
|
}).filter(Boolean).join(`
|
|
183840
183871
|
`)).filter(Boolean).join(`
|
|
@@ -193514,7 +193545,7 @@ const HZe = ({
|
|
|
193514
193545
|
}
|
|
193515
193546
|
)
|
|
193516
193547
|
] });
|
|
193517
|
-
}, WZe = bU(() => import("./markdown-source-pane-
|
|
193548
|
+
}, WZe = bU(() => import("./markdown-source-pane-H0HfWH4A.mjs")), qZe = bU(() => import("./split-view-toolbar-26ml5HLY.mjs")), VZe = ({
|
|
193518
193549
|
markdown: e,
|
|
193519
193550
|
onMarkdownChange: t,
|
|
193520
193551
|
ipfsImageUploadFn: n,
|
|
@@ -193999,7 +194030,7 @@ const HZe = ({
|
|
|
193999
194030
|
const zt = PD(Ge);
|
|
194000
194031
|
return Vs(
|
|
194001
194032
|
ha,
|
|
194002
|
-
|
|
194033
|
+
Po(zt),
|
|
194003
194034
|
"self"
|
|
194004
194035
|
), zt;
|
|
194005
194036
|
},
|
|
@@ -195184,10 +195215,10 @@ const HZe = ({
|
|
|
195184
195215
|
autofocus: !1
|
|
195185
195216
|
}), ydoc: p };
|
|
195186
195217
|
}, n = (p) => Array.isArray(p) || typeof p == "string" && !Nee(p), r = (p, h) => {
|
|
195187
|
-
Vs(h,
|
|
195218
|
+
Vs(h, Po(PD(p)));
|
|
195188
195219
|
}, o = (p) => PD(p), i = (p, h, f) => {
|
|
195189
195220
|
if (!h) throw new Error("cannot set content without Editor");
|
|
195190
|
-
n(p) ? Array.isArray(p) ? r(p, f) : Vs(f,
|
|
195221
|
+
n(p) ? Array.isArray(p) ? r(p, f) : Vs(f, Po(p)) : h.commands.setContent(
|
|
195191
195222
|
Mee({ data: p })
|
|
195192
195223
|
);
|
|
195193
195224
|
}, s = () => {
|