@linto-ai/transcript-ui-webcomponent 0.9.21 → 0.9.22-unstable.202609181425
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/{highlight-B6rbGA8f.js → highlight-D3MWj8e2.js} +2 -2
- package/dist/{highlight-B6rbGA8f.js.map → highlight-D3MWj8e2.js.map} +1 -1
- package/dist/{index-CopL8cVA.js → index-CR1TdCV6.js} +657 -620
- package/dist/index-CR1TdCV6.js.map +1 -0
- package/dist/linto-editor.iife.js +513 -476
- package/dist/linto-editor.iife.js.map +1 -1
- package/dist/linto-editor.js +1 -1
- package/package.json +10 -10
- package/dist/index-CopL8cVA.js.map +0 -1
|
@@ -116,10 +116,10 @@ var LintoEditor = (function(exports) {
|
|
|
116
116
|
}
|
|
117
117
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
118
118
|
const propertyDelimiterRE = /:([^]+)/;
|
|
119
|
-
const styleCommentRE =
|
|
119
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
120
120
|
function parseStringStyle(cssText) {
|
|
121
121
|
const ret = {};
|
|
122
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
122
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
123
123
|
if (item) {
|
|
124
124
|
const tmp = item.split(propertyDelimiterRE);
|
|
125
125
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -163,22 +163,22 @@ var LintoEditor = (function(exports) {
|
|
|
163
163
|
function includeBooleanAttr(value) {
|
|
164
164
|
return !!value || value === "";
|
|
165
165
|
}
|
|
166
|
-
function looseCompareArrays(a2, b2) {
|
|
166
|
+
function looseCompareArrays(a2, b2, seen) {
|
|
167
167
|
if (a2.length !== b2.length) return false;
|
|
168
168
|
let equal = true;
|
|
169
169
|
for (let i2 = 0; equal && i2 < a2.length; i2++) {
|
|
170
|
-
equal = looseEqual(a2[i2], b2[i2]);
|
|
170
|
+
equal = looseEqual(a2[i2], b2[i2], seen);
|
|
171
171
|
}
|
|
172
172
|
return equal;
|
|
173
173
|
}
|
|
174
|
-
function looseCompareCollections(a2, b2) {
|
|
174
|
+
function looseCompareCollections(a2, b2, seen) {
|
|
175
175
|
if (a2.size !== b2.size) return false;
|
|
176
176
|
const candidates = Array.from(b2);
|
|
177
177
|
const matched = new Uint8Array(candidates.length);
|
|
178
178
|
for (const item of a2) {
|
|
179
179
|
let index = -1;
|
|
180
180
|
for (let i2 = 0; i2 < candidates.length; i2++) {
|
|
181
|
-
if (!matched[i2] && looseEqual(item, candidates[i2])) {
|
|
181
|
+
if (!matched[i2] && looseEqual(item, candidates[i2], seen)) {
|
|
182
182
|
index = i2;
|
|
183
183
|
break;
|
|
184
184
|
}
|
|
@@ -188,7 +188,47 @@ var LintoEditor = (function(exports) {
|
|
|
188
188
|
}
|
|
189
189
|
return true;
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function looseCompareObjects(a2, b2, seen) {
|
|
192
|
+
let aValidType = isMap(a2);
|
|
193
|
+
let bValidType = isMap(b2);
|
|
194
|
+
if (aValidType || bValidType) {
|
|
195
|
+
return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
|
|
196
|
+
}
|
|
197
|
+
aValidType = isSet(a2);
|
|
198
|
+
bValidType = isSet(b2);
|
|
199
|
+
if (aValidType || bValidType) {
|
|
200
|
+
return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
|
|
201
|
+
}
|
|
202
|
+
const aKeysCount = Object.keys(a2).length;
|
|
203
|
+
const bKeysCount = Object.keys(b2).length;
|
|
204
|
+
if (aKeysCount !== bKeysCount) {
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
for (const key in a2) {
|
|
208
|
+
const aHasKey = a2.hasOwnProperty(key);
|
|
209
|
+
const bHasKey = b2.hasOwnProperty(key);
|
|
210
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key], seen)) {
|
|
211
|
+
return false;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return String(a2) === String(b2);
|
|
215
|
+
}
|
|
216
|
+
function looseCompareNested(a2, b2, seen, compare) {
|
|
217
|
+
if (!seen) {
|
|
218
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
219
|
+
}
|
|
220
|
+
const [seenA, seenB] = seen;
|
|
221
|
+
if (seenA.has(a2) || seenB.has(b2)) {
|
|
222
|
+
return seenA.get(a2) === b2 && seenB.get(b2) === a2;
|
|
223
|
+
}
|
|
224
|
+
seenA.set(a2, b2);
|
|
225
|
+
seenB.set(b2, a2);
|
|
226
|
+
const equal = compare(a2, b2, seen);
|
|
227
|
+
seenA.delete(a2);
|
|
228
|
+
seenB.delete(b2);
|
|
229
|
+
return equal;
|
|
230
|
+
}
|
|
231
|
+
function looseEqual(a2, b2, seen) {
|
|
192
232
|
if (a2 === b2) return true;
|
|
193
233
|
let aValidType = isDate(a2);
|
|
194
234
|
let bValidType = isDate(b2);
|
|
@@ -203,7 +243,7 @@ var LintoEditor = (function(exports) {
|
|
|
203
243
|
aValidType = isArray(a2);
|
|
204
244
|
bValidType = isArray(b2);
|
|
205
245
|
if (aValidType || bValidType) {
|
|
206
|
-
return aValidType && bValidType ?
|
|
246
|
+
return aValidType && bValidType ? looseCompareNested(a2, b2, seen, looseCompareArrays) : false;
|
|
207
247
|
}
|
|
208
248
|
aValidType = isObject$1(a2);
|
|
209
249
|
bValidType = isObject$1(b2);
|
|
@@ -211,28 +251,7 @@ var LintoEditor = (function(exports) {
|
|
|
211
251
|
if (!aValidType || !bValidType) {
|
|
212
252
|
return false;
|
|
213
253
|
}
|
|
214
|
-
|
|
215
|
-
bValidType = isMap(b2);
|
|
216
|
-
if (aValidType || bValidType) {
|
|
217
|
-
return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
|
|
218
|
-
}
|
|
219
|
-
aValidType = isSet(a2);
|
|
220
|
-
bValidType = isSet(b2);
|
|
221
|
-
if (aValidType || bValidType) {
|
|
222
|
-
return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
|
|
223
|
-
}
|
|
224
|
-
const aKeysCount = Object.keys(a2).length;
|
|
225
|
-
const bKeysCount = Object.keys(b2).length;
|
|
226
|
-
if (aKeysCount !== bKeysCount) {
|
|
227
|
-
return false;
|
|
228
|
-
}
|
|
229
|
-
for (const key in a2) {
|
|
230
|
-
const aHasKey = a2.hasOwnProperty(key);
|
|
231
|
-
const bHasKey = b2.hasOwnProperty(key);
|
|
232
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key])) {
|
|
233
|
-
return false;
|
|
234
|
-
}
|
|
235
|
-
}
|
|
254
|
+
return looseCompareNested(a2, b2, seen, looseCompareObjects);
|
|
236
255
|
}
|
|
237
256
|
return String(a2) === String(b2);
|
|
238
257
|
}
|
|
@@ -889,7 +908,9 @@ var LintoEditor = (function(exports) {
|
|
|
889
908
|
const raw = /* @__PURE__ */ toRaw(array);
|
|
890
909
|
if (raw === array) return raw;
|
|
891
910
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
892
|
-
|
|
911
|
+
if (/* @__PURE__ */ isShallow(array)) return raw;
|
|
912
|
+
if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
|
|
913
|
+
return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
893
914
|
}
|
|
894
915
|
function shallowReadArray(arr) {
|
|
895
916
|
track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -4975,6 +4996,12 @@ var LintoEditor = (function(exports) {
|
|
|
4975
4996
|
optimized = false;
|
|
4976
4997
|
n2.dynamicChildren = null;
|
|
4977
4998
|
}
|
|
4999
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
5000
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
5001
|
+
n2.dynamicChildren = [];
|
|
5002
|
+
}
|
|
5003
|
+
n2.dynamicChildren.hasOnce = true;
|
|
5004
|
+
}
|
|
4978
5005
|
const { type, ref: ref3, shapeFlag } = n2;
|
|
4979
5006
|
switch (type) {
|
|
4980
5007
|
case Text:
|
|
@@ -5527,6 +5554,7 @@ var LintoEditor = (function(exports) {
|
|
|
5527
5554
|
const instance = n2.component = n1.component;
|
|
5528
5555
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
5529
5556
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
5557
|
+
n2.el = n1.el;
|
|
5530
5558
|
updateComponentPreRender(instance, n2, optimized);
|
|
5531
5559
|
return;
|
|
5532
5560
|
} else {
|
|
@@ -5872,7 +5900,7 @@ var LintoEditor = (function(exports) {
|
|
|
5872
5900
|
keyToNewIndexMap.set(nextChild.key, i2);
|
|
5873
5901
|
}
|
|
5874
5902
|
}
|
|
5875
|
-
let
|
|
5903
|
+
let j;
|
|
5876
5904
|
let patched = 0;
|
|
5877
5905
|
const toBePatched = e2 - s2 + 1;
|
|
5878
5906
|
let moved = false;
|
|
@@ -5889,9 +5917,9 @@ var LintoEditor = (function(exports) {
|
|
|
5889
5917
|
if (prevChild.key != null) {
|
|
5890
5918
|
newIndex = keyToNewIndexMap.get(prevChild.key);
|
|
5891
5919
|
} else {
|
|
5892
|
-
for (
|
|
5893
|
-
if (newIndexToOldIndexMap[
|
|
5894
|
-
newIndex =
|
|
5920
|
+
for (j = s2; j <= e2; j++) {
|
|
5921
|
+
if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
|
|
5922
|
+
newIndex = j;
|
|
5895
5923
|
break;
|
|
5896
5924
|
}
|
|
5897
5925
|
}
|
|
@@ -5920,7 +5948,7 @@ var LintoEditor = (function(exports) {
|
|
|
5920
5948
|
}
|
|
5921
5949
|
}
|
|
5922
5950
|
const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
|
|
5923
|
-
|
|
5951
|
+
j = increasingNewIndexSequence.length - 1;
|
|
5924
5952
|
for (i2 = toBePatched - 1; i2 >= 0; i2--) {
|
|
5925
5953
|
const nextIndex = s2 + i2;
|
|
5926
5954
|
const nextChild = c2[nextIndex];
|
|
@@ -5942,10 +5970,10 @@ var LintoEditor = (function(exports) {
|
|
|
5942
5970
|
optimized
|
|
5943
5971
|
);
|
|
5944
5972
|
} else if (moved) {
|
|
5945
|
-
if (
|
|
5973
|
+
if (j < 0 || i2 !== increasingNewIndexSequence[j]) {
|
|
5946
5974
|
move(nextChild, container, anchor, 2);
|
|
5947
5975
|
} else {
|
|
5948
|
-
|
|
5976
|
+
j--;
|
|
5949
5977
|
}
|
|
5950
5978
|
}
|
|
5951
5979
|
}
|
|
@@ -6036,7 +6064,7 @@ var LintoEditor = (function(exports) {
|
|
|
6036
6064
|
cacheIndex,
|
|
6037
6065
|
memo
|
|
6038
6066
|
} = vnode;
|
|
6039
|
-
if (patchFlag === -2) {
|
|
6067
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
6040
6068
|
optimized = false;
|
|
6041
6069
|
}
|
|
6042
6070
|
if (ref3 != null) {
|
|
@@ -6044,7 +6072,7 @@ var LintoEditor = (function(exports) {
|
|
|
6044
6072
|
setRef(ref3, null, parentSuspense, vnode, true);
|
|
6045
6073
|
resetTracking();
|
|
6046
6074
|
}
|
|
6047
|
-
if (cacheIndex != null) {
|
|
6075
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
6048
6076
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
6049
6077
|
}
|
|
6050
6078
|
if (shapeFlag & 256) {
|
|
@@ -6117,6 +6145,9 @@ var LintoEditor = (function(exports) {
|
|
|
6117
6145
|
}
|
|
6118
6146
|
if (type === Static) {
|
|
6119
6147
|
removeStaticNode(vnode);
|
|
6148
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
6149
|
+
transition.afterLeave();
|
|
6150
|
+
}
|
|
6120
6151
|
return;
|
|
6121
6152
|
}
|
|
6122
6153
|
const performRemove = () => {
|
|
@@ -6157,6 +6188,9 @@ var LintoEditor = (function(exports) {
|
|
|
6157
6188
|
if (job) {
|
|
6158
6189
|
job.flags |= 8;
|
|
6159
6190
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6191
|
+
} else if (instance.vnode.el && subTree) {
|
|
6192
|
+
subTree.transition = instance.vnode.transition;
|
|
6193
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6160
6194
|
}
|
|
6161
6195
|
if (um) {
|
|
6162
6196
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -6272,14 +6306,14 @@ var LintoEditor = (function(exports) {
|
|
|
6272
6306
|
function getSequence(arr) {
|
|
6273
6307
|
const p2 = arr.slice();
|
|
6274
6308
|
const result = [0];
|
|
6275
|
-
let i2,
|
|
6309
|
+
let i2, j, u2, v2, c2;
|
|
6276
6310
|
const len = arr.length;
|
|
6277
6311
|
for (i2 = 0; i2 < len; i2++) {
|
|
6278
6312
|
const arrI = arr[i2];
|
|
6279
6313
|
if (arrI !== 0) {
|
|
6280
|
-
|
|
6281
|
-
if (arr[
|
|
6282
|
-
p2[i2] =
|
|
6314
|
+
j = result[result.length - 1];
|
|
6315
|
+
if (arr[j] < arrI) {
|
|
6316
|
+
p2[i2] = j;
|
|
6283
6317
|
result.push(i2);
|
|
6284
6318
|
continue;
|
|
6285
6319
|
}
|
|
@@ -6570,7 +6604,8 @@ var LintoEditor = (function(exports) {
|
|
|
6570
6604
|
el: vnode.el,
|
|
6571
6605
|
anchor: vnode.anchor,
|
|
6572
6606
|
ctx: vnode.ctx,
|
|
6573
|
-
ce: vnode.ce
|
|
6607
|
+
ce: vnode.ce,
|
|
6608
|
+
cacheIndex: vnode.cacheIndex
|
|
6574
6609
|
};
|
|
6575
6610
|
if (transition && cloneTransition) {
|
|
6576
6611
|
setTransitionHooks(
|
|
@@ -7031,7 +7066,7 @@ var LintoEditor = (function(exports) {
|
|
|
7031
7066
|
}
|
|
7032
7067
|
return true;
|
|
7033
7068
|
}
|
|
7034
|
-
const version = "3.5.
|
|
7069
|
+
const version = "3.5.43";
|
|
7035
7070
|
let policy = void 0;
|
|
7036
7071
|
const tt$1 = typeof window !== "undefined" && window.trustedTypes;
|
|
7037
7072
|
if (tt$1) {
|
|
@@ -8529,7 +8564,7 @@ var LintoEditor = (function(exports) {
|
|
|
8529
8564
|
}
|
|
8530
8565
|
const eventKey = hyphenate(event.key);
|
|
8531
8566
|
if (modifiers.some(
|
|
8532
|
-
(
|
|
8567
|
+
(k) => k === eventKey || keyNames[k] === eventKey
|
|
8533
8568
|
)) {
|
|
8534
8569
|
return fn(event);
|
|
8535
8570
|
}
|
|
@@ -9179,7 +9214,7 @@ var LintoEditor = (function(exports) {
|
|
|
9179
9214
|
const start = Math.floor(i2 * scale);
|
|
9180
9215
|
const end = Math.max(start + 1, Math.floor((i2 + step * 2) * scale));
|
|
9181
9216
|
let sum = 0;
|
|
9182
|
-
for (let
|
|
9217
|
+
for (let j = start; j < end; j++) sum += Math.abs(channel[j] ?? 0);
|
|
9183
9218
|
const value = sum / (end - start);
|
|
9184
9219
|
let x2 = i2;
|
|
9185
9220
|
let y2 = value * (height / 2);
|
|
@@ -12710,11 +12745,11 @@ pre[class*="language-"] {
|
|
|
12710
12745
|
function isPointInPolygon(point, polygon) {
|
|
12711
12746
|
const { x: x2, y: y2 } = point;
|
|
12712
12747
|
let inside = false;
|
|
12713
|
-
for (let i2 = 0,
|
|
12748
|
+
for (let i2 = 0, j = polygon.length - 1; i2 < polygon.length; j = i2++) {
|
|
12714
12749
|
const xi = polygon[i2].x;
|
|
12715
12750
|
const yi = polygon[i2].y;
|
|
12716
|
-
const xj = polygon[
|
|
12717
|
-
const yj = polygon[
|
|
12751
|
+
const xj = polygon[j].x;
|
|
12752
|
+
const yj = polygon[j].y;
|
|
12718
12753
|
const intersect = yi > y2 !== yj > y2 && x2 < (xj - xi) * (y2 - yi) / (yj - yi) + xi;
|
|
12719
12754
|
if (intersect) inside = !inside;
|
|
12720
12755
|
}
|
|
@@ -18317,120 +18352,146 @@ pre[class*="language-"] {
|
|
|
18317
18352
|
return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
|
|
18318
18353
|
}
|
|
18319
18354
|
var T = A();
|
|
18320
|
-
function
|
|
18321
|
-
T =
|
|
18355
|
+
function U(l2) {
|
|
18356
|
+
T = l2;
|
|
18322
18357
|
}
|
|
18323
18358
|
var E$1 = { exec: () => null };
|
|
18324
|
-
function I(
|
|
18359
|
+
function I(l2) {
|
|
18325
18360
|
let e2 = [];
|
|
18326
18361
|
return (t2) => {
|
|
18327
|
-
let n2 = Math.max(0, Math.min(3, t2 - 1)),
|
|
18328
|
-
return
|
|
18362
|
+
let n2 = Math.max(0, Math.min(3, t2 - 1)), i2 = e2[n2];
|
|
18363
|
+
return i2 || (i2 = l2(n2), e2[n2] = i2), i2;
|
|
18329
18364
|
};
|
|
18330
18365
|
}
|
|
18331
|
-
function
|
|
18332
|
-
let t2 = typeof
|
|
18366
|
+
function d$2(l2, e2 = "") {
|
|
18367
|
+
let t2 = typeof l2 == "string" ? l2 : l2.source, n2 = { replace: (i2, r2) => {
|
|
18333
18368
|
let o2 = typeof r2 == "string" ? r2 : r2.source;
|
|
18334
|
-
return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(
|
|
18369
|
+
return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(i2, o2), n2;
|
|
18335
18370
|
}, getRegex: () => new RegExp(t2, e2) };
|
|
18336
18371
|
return n2;
|
|
18337
18372
|
}
|
|
18338
|
-
var
|
|
18373
|
+
var we = ((l2 = "") => {
|
|
18339
18374
|
try {
|
|
18340
|
-
return !!new RegExp("(?<=1)(?<!1)" +
|
|
18375
|
+
return !!new RegExp("(?<=1)(?<!1)" + l2);
|
|
18341
18376
|
} catch {
|
|
18342
18377
|
return false;
|
|
18343
18378
|
}
|
|
18344
|
-
})(), m$1 = { codeRemoveIndent: /^(?: {
|
|
18345
|
-
]`).replace("lheading",
|
|
18346
|
-
var
|
|
18347
|
-
function R(
|
|
18379
|
+
})(), m$1 = { codeRemoveIndent: /^(?: {0,3}\t| {1,4})/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, endingSpaceTabChar: /[ \t]$/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (l2) => new RegExp(`^( {0,3}${l2})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l2) => new RegExp(`^ {0,${l2}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l2) => new RegExp(`^ {0,${l2}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l2) => new RegExp(`^ {0,${l2}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l2) => new RegExp(`^ {0,${l2}}#`)), htmlBeginRegex: I((l2) => new RegExp(`^ {0,${l2}}(?:</?(?:${H})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l2) => new RegExp(`^ {0,${l2}}>`)) }, ye = /^(?:[ \t]*(?:\n|$))+/, Pe = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, Se = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, v$1 = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, _e = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, K = / {0,3}(?:[*+-]|\d{1,9}[.)])/, le = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ue = d$2(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), $e = d$2(le).replace(/bull/g, K).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}(?:\s|$)/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), W = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, Le = /^[^\n]+/, X = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ze = d$2(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", X).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Ee = d$2(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, K).getRegex(), H = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", J = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Me = d$2("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", J).replace("tag", H).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), pe = (l2) => d$2(W).replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", l2).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Ae = pe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Ie = pe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ce = d$2(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Ie).getRegex(), V = { blockquote: Ce, code: Pe, def: ze, fences: Se, heading: _e, hr: v$1, html: Me, lheading: ue, list: Ee, newline: ye, paragraph: Ae, table: E$1, text: Le }, ie = d$2("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex(), Be = { ...V, lheading: $e, table: ie, paragraph: d$2(W).replace("hr", v$1).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", ie).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list", " {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", H).getRegex() }, De = { ...V, html: d$2(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", J).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: E$1, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: d$2(W).replace("hr", v$1).replace("heading", ` *#{1,6} *[^
|
|
18380
|
+
]`).replace("lheading", ue).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, qe = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, ve = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ce = /^( {2,}|\\)\n(?!\s*$)[ \t]*/, He = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _ = /[\p{P}\p{S}]/u, C$1 = /[\s\p{P}\p{S}]/u, Z = /[^\s\p{P}\p{S}]/u, Ze = d$2(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C$1).getRegex(), Ge = /[\p{Pi}\p{Ps}"']/u, he = /(?!~)[\p{P}\p{S}]/u, Qe = /(?!~)[\s\p{P}\p{S}]/u, Ne = /(?:[^\s\p{P}\p{S}]|~)/u, je = d$2(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", we ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), de = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ue = d$2(de, "u").replace(/punct/g, _).getRegex(), Fe = d$2(de, "u").replace(/punct/g, he).getRegex(), Ke = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, We = d$2(Ke, "u").replace(/openQuote/g, Ge).replace(/punct/g, _).getRegex(), ke = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Xe = d$2(ke, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Je = d$2(ke, "gu").replace(/notPunctSpace/g, Ne).replace(/punctSpace/g, Qe).replace(/punct/g, he).getRegex(), Ve = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Ye = d$2(Ve, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), et = d$2("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), tt = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", nt = d$2(tt, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), rt = d$2(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex(), st = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", it = d$2(st, "gu").replace(/notPunctSpace/g, Z).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), ot = d$2(/\\(punct)/, "gu").replace(/punct/g, _).getRegex(), at = d$2(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), lt = d$2(J).replace("(?:-->|$)", "-->").getRegex(), ut = d$2("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", lt).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), ge = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, N = d$2(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", ge).getRegex(), pt = d$2(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", N).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ct = d$2(/^!?\[(label)\]\[(ref)\]/).replace("label", N).replace("ref", X).getRegex(), ht = d$2(/^!?\[(ref)\](?:\[\])?/).replace("ref", X).getRegex(), oe = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/, dt = d$2(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets", ge).getRegex(), kt = d$2("reflink|nolink(?!\\()", "g").replace("reflink", d$2(/^!?\[(label)\]\[(ref)\]/).replace("label", dt).replace("ref", oe).getRegex()).replace("nolink", d$2(/^!?\[(ref)\](?:\[\])?/).replace("ref", oe).getRegex()).getRegex(), ae = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, Y = { _backpedal: E$1, anyPunctuation: ot, autolink: at, blockSkip: je, br: ce, code: ve, del: E$1, delLDelim: E$1, delRDelim: E$1, emStrongLDelim: Ue, emStrongRDelimAst: Xe, emStrongRDelimUnd: et, escape: qe, link: pt, nolink: ht, punctuation: Ze, reflink: ct, reflinkSearch: kt, tag: ut, text: He, url: E$1 }, gt = { ...Y, emStrongLDelim: We, emStrongRDelimAst: Ye, emStrongRDelimUnd: nt, link: d$2(/^!?\[(label)\]\((.*?)\)/).replace("label", N).getRegex(), reflink: d$2(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", N).getRegex() }, F = { ...Y, emStrongRDelimAst: Je, emStrongLDelim: Fe, delLDelim: rt, delRDelim: it, url: d$2(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ae).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: d$2(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ae).getRegex() }, ft = { ...F, br: d$2(ce).replace("{2,}", "*").getRegex(), text: d$2(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, G = { normal: V, gfm: Be, pedantic: De }, B = { normal: Y, gfm: F, breaks: ft, pedantic: gt };
|
|
18381
|
+
var mt = { "&": "&", "<": "<", ">": ">", '"': """, "'": "'" }, fe = (l2) => mt[l2];
|
|
18382
|
+
function R(l2, e2) {
|
|
18348
18383
|
if (e2) {
|
|
18349
|
-
if (m$1.escapeTest.test(
|
|
18350
|
-
} else if (m$1.escapeTestNoEncode.test(
|
|
18351
|
-
return
|
|
18384
|
+
if (m$1.escapeTest.test(l2)) return l2.replace(m$1.escapeReplace, fe);
|
|
18385
|
+
} else if (m$1.escapeTestNoEncode.test(l2)) return l2.replace(m$1.escapeReplaceNoEncode, fe);
|
|
18386
|
+
return l2;
|
|
18352
18387
|
}
|
|
18353
|
-
function
|
|
18388
|
+
function ee(l2) {
|
|
18354
18389
|
try {
|
|
18355
|
-
|
|
18390
|
+
l2 = encodeURI(l2).replace(m$1.percentDecode, "%");
|
|
18356
18391
|
} catch {
|
|
18357
18392
|
return null;
|
|
18358
18393
|
}
|
|
18359
|
-
return
|
|
18394
|
+
return l2;
|
|
18360
18395
|
}
|
|
18361
|
-
function
|
|
18362
|
-
let t2 =
|
|
18363
|
-
let
|
|
18364
|
-
for (; --a2 >= 0 &&
|
|
18365
|
-
return
|
|
18366
|
-
}), n2 = t2.split(m$1.splitPipe),
|
|
18396
|
+
function te(l2, e2) {
|
|
18397
|
+
let t2 = l2.replace(m$1.findPipe, (r2, o2, s2) => {
|
|
18398
|
+
let u2 = false, a2 = o2;
|
|
18399
|
+
for (; --a2 >= 0 && s2[a2] === "\\"; ) u2 = !u2;
|
|
18400
|
+
return u2 ? "|" : " |";
|
|
18401
|
+
}), n2 = t2.split(m$1.splitPipe), i2 = 0;
|
|
18367
18402
|
if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e2) if (n2.length > e2) n2.splice(e2);
|
|
18368
18403
|
else for (; n2.length < e2; ) n2.push("");
|
|
18369
|
-
for (;
|
|
18404
|
+
for (; i2 < n2.length; i2++) n2[i2] = n2[i2].trim().replace(m$1.slashPipe, "|");
|
|
18370
18405
|
return n2;
|
|
18371
18406
|
}
|
|
18372
|
-
function $(
|
|
18373
|
-
let n2 =
|
|
18407
|
+
function $(l2, e2, t2) {
|
|
18408
|
+
let n2 = l2.length;
|
|
18374
18409
|
if (n2 === 0) return "";
|
|
18375
|
-
let
|
|
18376
|
-
for (;
|
|
18377
|
-
let r2 =
|
|
18378
|
-
if (r2 === e2 && true)
|
|
18410
|
+
let i2 = 0;
|
|
18411
|
+
for (; i2 < n2; ) {
|
|
18412
|
+
let r2 = l2.charAt(n2 - i2 - 1);
|
|
18413
|
+
if (r2 === e2 && true) i2++;
|
|
18379
18414
|
else break;
|
|
18380
18415
|
}
|
|
18381
|
-
return
|
|
18416
|
+
return l2.slice(0, n2 - i2);
|
|
18382
18417
|
}
|
|
18383
|
-
function
|
|
18384
|
-
let e2 =
|
|
18418
|
+
function ne(l2) {
|
|
18419
|
+
let e2 = l2.split(`
|
|
18385
18420
|
`), t2 = e2.length - 1;
|
|
18386
18421
|
for (; t2 >= 0 && m$1.blankLine.test(e2[t2]); ) t2--;
|
|
18387
|
-
return e2.length - t2 <= 2 ?
|
|
18422
|
+
return e2.length - t2 <= 2 ? l2 : e2.slice(0, t2 + 1).join(`
|
|
18388
18423
|
`);
|
|
18389
18424
|
}
|
|
18390
|
-
function
|
|
18391
|
-
|
|
18425
|
+
function D(l2) {
|
|
18426
|
+
return l2.toLowerCase().toUpperCase().toLowerCase();
|
|
18427
|
+
}
|
|
18428
|
+
function me(l2, e2) {
|
|
18429
|
+
if (l2.indexOf(e2[1]) === -1) return -1;
|
|
18392
18430
|
let t2 = 0;
|
|
18393
|
-
for (let n2 = 0; n2 <
|
|
18394
|
-
else if (
|
|
18395
|
-
else if (
|
|
18431
|
+
for (let n2 = 0; n2 < l2.length; n2++) if (l2[n2] === "\\") n2++;
|
|
18432
|
+
else if (l2[n2] === e2[0]) t2++;
|
|
18433
|
+
else if (l2[n2] === e2[1] && (t2--, t2 < 0)) return n2;
|
|
18396
18434
|
return t2 > 0 ? -2 : -1;
|
|
18397
18435
|
}
|
|
18398
|
-
function
|
|
18436
|
+
function xe(l2, e2 = 0) {
|
|
18399
18437
|
let t2 = e2, n2 = "";
|
|
18400
|
-
for (let
|
|
18438
|
+
for (let i2 of l2) if (i2 === " ") {
|
|
18401
18439
|
let r2 = 4 - t2 % 4;
|
|
18402
18440
|
n2 += " ".repeat(r2), t2 += r2;
|
|
18403
|
-
} else n2 +=
|
|
18441
|
+
} else n2 += i2, t2++;
|
|
18404
18442
|
return n2;
|
|
18405
18443
|
}
|
|
18406
|
-
function
|
|
18407
|
-
let r2 = e2.href, o2 = e2.title || null,
|
|
18444
|
+
function be(l2, e2, t2, n2, i2) {
|
|
18445
|
+
let r2 = e2.href, o2 = e2.title || null, s2 = l2[1].replace(i2.other.outputLinkReplace, "$1"), u2 = l2[0].charAt(0) === "!";
|
|
18408
18446
|
n2.state.inLink = true;
|
|
18409
18447
|
let a2 = n2.state.linkEmitted, p2 = n2.state.inRawBlock;
|
|
18410
18448
|
n2.state.linkEmitted = false;
|
|
18411
|
-
let c2 = n2.inlineTokens(
|
|
18412
|
-
if (n2.state.linkEmitted = a2, n2.state.inLink = false, !
|
|
18449
|
+
let c2 = n2.inlineTokens(s2), h2 = n2.state.linkEmitted;
|
|
18450
|
+
if (n2.state.linkEmitted = a2, n2.state.inLink = false, !u2) {
|
|
18413
18451
|
if (h2) {
|
|
18414
18452
|
n2.state.inRawBlock = p2;
|
|
18415
18453
|
return;
|
|
18416
18454
|
}
|
|
18417
18455
|
n2.state.linkEmitted = true;
|
|
18418
18456
|
}
|
|
18419
|
-
return { type:
|
|
18457
|
+
return { type: u2 ? "image" : "link", raw: t2, href: r2, title: o2, text: s2, tokens: c2 };
|
|
18420
18458
|
}
|
|
18421
|
-
function
|
|
18422
|
-
let n2 =
|
|
18459
|
+
function xt(l2, e2, t2) {
|
|
18460
|
+
let n2 = l2.match(t2.other.indentCodeCompensation);
|
|
18423
18461
|
if (n2 === null) return e2;
|
|
18424
|
-
let
|
|
18462
|
+
let i2 = n2[1];
|
|
18425
18463
|
return e2.split(`
|
|
18426
18464
|
`).map((r2) => {
|
|
18427
18465
|
let o2 = r2.match(t2.other.beginningSpace);
|
|
18428
18466
|
if (o2 === null) return r2;
|
|
18429
|
-
let [
|
|
18430
|
-
return r2.slice(Math.min(
|
|
18467
|
+
let [s2] = o2;
|
|
18468
|
+
return r2.slice(Math.min(s2.length, i2.length));
|
|
18431
18469
|
}).join(`
|
|
18432
18470
|
`);
|
|
18433
18471
|
}
|
|
18472
|
+
function Re(l2, e2, t2, n2) {
|
|
18473
|
+
if (!e2.includes("<")) return false;
|
|
18474
|
+
for (let i2 = 0; i2 < e2.length; i2++) {
|
|
18475
|
+
if (e2[i2] === "\\") {
|
|
18476
|
+
i2++;
|
|
18477
|
+
continue;
|
|
18478
|
+
}
|
|
18479
|
+
if (e2[i2] === "`") {
|
|
18480
|
+
let s2 = n2.inline.code.exec(e2.slice(i2));
|
|
18481
|
+
if (s2) {
|
|
18482
|
+
i2 += s2[0].length - 1;
|
|
18483
|
+
continue;
|
|
18484
|
+
}
|
|
18485
|
+
}
|
|
18486
|
+
if (e2[i2] !== "<") continue;
|
|
18487
|
+
let r2 = l2.slice(t2 + i2), o2 = n2.inline.tag.exec(r2) || n2.inline.autolink.exec(r2);
|
|
18488
|
+
if (o2) {
|
|
18489
|
+
if (o2[0].length > e2.length - i2) return true;
|
|
18490
|
+
i2 += o2[0].length - 1;
|
|
18491
|
+
}
|
|
18492
|
+
}
|
|
18493
|
+
return false;
|
|
18494
|
+
}
|
|
18434
18495
|
var y$1 = class y {
|
|
18435
18496
|
options;
|
|
18436
18497
|
rules;
|
|
@@ -18445,15 +18506,15 @@ pre[class*="language-"] {
|
|
|
18445
18506
|
code(e2) {
|
|
18446
18507
|
let t2 = this.rules.block.code.exec(e2);
|
|
18447
18508
|
if (t2) {
|
|
18448
|
-
let n2 = this.options.pedantic ? t2[0] :
|
|
18449
|
-
return { type: "code", raw: n2, codeBlockStyle: "indented", text:
|
|
18509
|
+
let n2 = this.options.pedantic ? t2[0] : ne(t2[0]), i2 = n2.replace(this.rules.other.codeRemoveIndent, "");
|
|
18510
|
+
return { type: "code", raw: n2, codeBlockStyle: "indented", text: i2 };
|
|
18450
18511
|
}
|
|
18451
18512
|
}
|
|
18452
18513
|
fences(e2) {
|
|
18453
18514
|
let t2 = this.rules.block.fences.exec(e2);
|
|
18454
18515
|
if (t2) {
|
|
18455
|
-
let n2 = t2[0],
|
|
18456
|
-
return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text:
|
|
18516
|
+
let n2 = t2[0], i2 = xt(n2, t2[3] || "", this.rules);
|
|
18517
|
+
return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i2 };
|
|
18457
18518
|
}
|
|
18458
18519
|
}
|
|
18459
18520
|
heading(e2) {
|
|
@@ -18461,8 +18522,8 @@ pre[class*="language-"] {
|
|
|
18461
18522
|
if (t2) {
|
|
18462
18523
|
let n2 = t2[2].trim();
|
|
18463
18524
|
if (this.rules.other.endingHash.test(n2)) {
|
|
18464
|
-
let
|
|
18465
|
-
(this.options.pedantic || !
|
|
18525
|
+
let i2 = $(n2, "#");
|
|
18526
|
+
(this.options.pedantic || !i2 || this.rules.other.endingSpaceTabChar.test(i2)) && (n2 = i2.trim());
|
|
18466
18527
|
}
|
|
18467
18528
|
return { type: "heading", raw: $(t2[0], `
|
|
18468
18529
|
`), depth: t2[1].length, text: n2, tokens: this.lexer.inline(n2) };
|
|
@@ -18478,77 +18539,77 @@ pre[class*="language-"] {
|
|
|
18478
18539
|
if (t2) {
|
|
18479
18540
|
let n2 = $(t2[0], `
|
|
18480
18541
|
`).split(`
|
|
18481
|
-
`),
|
|
18542
|
+
`), i2 = "", r2 = "", o2 = [];
|
|
18482
18543
|
for (; n2.length > 0; ) {
|
|
18483
|
-
let
|
|
18484
|
-
for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2]))
|
|
18485
|
-
else if (!
|
|
18544
|
+
let s2 = false, u2 = [], a2;
|
|
18545
|
+
for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), s2 = true;
|
|
18546
|
+
else if (!s2) u2.push(n2[a2]);
|
|
18486
18547
|
else break;
|
|
18487
18548
|
n2 = n2.slice(a2);
|
|
18488
|
-
let p2 =
|
|
18549
|
+
let p2 = u2.join(`
|
|
18489
18550
|
`), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
|
|
18490
18551
|
$1`).replace(this.rules.other.blockquoteSetextReplace2, "");
|
|
18491
|
-
|
|
18552
|
+
i2 = i2 ? `${i2}
|
|
18492
18553
|
${p2}` : p2, r2 = r2 ? `${r2}
|
|
18493
18554
|
${c2}` : c2;
|
|
18494
18555
|
let h2 = this.lexer.state.top;
|
|
18495
18556
|
if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h2, n2.length === 0) break;
|
|
18496
|
-
let
|
|
18497
|
-
if (
|
|
18498
|
-
if (
|
|
18499
|
-
let O =
|
|
18557
|
+
let k = o2.at(-1);
|
|
18558
|
+
if (k?.type === "code") break;
|
|
18559
|
+
if (k?.type === "blockquote") {
|
|
18560
|
+
let O = k, g2 = n2.join(`
|
|
18500
18561
|
`), w2 = O.raw + `
|
|
18501
18562
|
` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
|
|
18502
|
-
o2[o2.length - 1] = z,
|
|
18563
|
+
o2[o2.length - 1] = z, i2 = `${i2}
|
|
18503
18564
|
${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
18504
18565
|
break;
|
|
18505
|
-
} else if (
|
|
18506
|
-
let O =
|
|
18566
|
+
} else if (k?.type === "list") {
|
|
18567
|
+
let O = k, g2 = O.raw + `
|
|
18507
18568
|
` + n2.join(`
|
|
18508
18569
|
`), w2 = this.list(g2);
|
|
18509
|
-
o2[o2.length - 1] = w2,
|
|
18570
|
+
o2[o2.length - 1] = w2, i2 = i2.substring(0, i2.length - k.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n2 = g2.substring(o2.at(-1).raw.length).split(`
|
|
18510
18571
|
`);
|
|
18511
18572
|
continue;
|
|
18512
18573
|
}
|
|
18513
18574
|
}
|
|
18514
|
-
return { type: "blockquote", raw:
|
|
18575
|
+
return { type: "blockquote", raw: i2, tokens: o2, text: r2 };
|
|
18515
18576
|
}
|
|
18516
18577
|
}
|
|
18517
18578
|
list(e2) {
|
|
18518
18579
|
let t2 = this.rules.block.list.exec(e2);
|
|
18519
18580
|
if (t2) {
|
|
18520
|
-
let n2 = t2[1].trim(),
|
|
18521
|
-
n2 =
|
|
18522
|
-
let o2 = this.rules.other.listItemRegex(n2),
|
|
18581
|
+
let n2 = t2[1].trim(), i2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: i2, start: i2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
|
|
18582
|
+
n2 = i2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = i2 ? n2 : "[*+-]");
|
|
18583
|
+
let o2 = this.rules.other.listItemRegex(n2), s2 = false;
|
|
18523
18584
|
for (; e2; ) {
|
|
18524
18585
|
let a2 = false, p2 = "", c2 = "";
|
|
18525
18586
|
if (!(t2 = o2.exec(e2)) || this.rules.block.hr.test(e2)) break;
|
|
18526
18587
|
p2 = t2[0], e2 = e2.substring(p2.length);
|
|
18527
|
-
let h2 =
|
|
18528
|
-
`, 1)[0], t2[1].length),
|
|
18588
|
+
let h2 = xe(t2[2].split(`
|
|
18589
|
+
`, 1)[0], t2[1].length), k = e2.split(`
|
|
18529
18590
|
`, 1)[0], O = !h2.trim(), g2 = 0;
|
|
18530
|
-
if (this.options.pedantic ? (g2 = 2, c2 = h2.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h2.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(
|
|
18531
|
-
`, e2 = e2.substring(
|
|
18532
|
-
let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2),
|
|
18591
|
+
if (this.options.pedantic ? (g2 = 2, c2 = h2.trimStart()) : O ? g2 = t2[1].length + 1 : (g2 = h2.search(this.rules.other.nonSpaceChar), g2 = g2 > 4 ? 1 : g2, c2 = h2.slice(g2), g2 += t2[1].length), O && this.rules.other.blankLine.test(k) && (p2 += k + `
|
|
18592
|
+
`, e2 = e2.substring(k.length + 1), a2 = true), !a2) {
|
|
18593
|
+
let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), re = this.rules.other.fencesBeginRegex(g2), se = this.rules.other.headingBeginRegex(g2), Te = this.rules.other.htmlBeginRegex(g2), Oe = this.rules.other.blockquoteBeginRegex(g2);
|
|
18533
18594
|
for (; e2; ) {
|
|
18534
|
-
let
|
|
18535
|
-
`, 1)[0],
|
|
18536
|
-
if (
|
|
18537
|
-
if (
|
|
18538
|
-
` +
|
|
18595
|
+
let j = e2.split(`
|
|
18596
|
+
`, 1)[0], q;
|
|
18597
|
+
if (k = j, this.options.pedantic ? (k = k.replace(this.rules.other.listReplaceNesting, " "), q = k) : q = k.replace(this.rules.other.tabCharGlobal, " "), re.test(k) || se.test(k) || Te.test(k) || Oe.test(k) || w2.test(k) || z.test(k)) break;
|
|
18598
|
+
if (q.search(this.rules.other.nonSpaceChar) >= g2 || !k.trim()) c2 += `
|
|
18599
|
+
` + q.slice(g2);
|
|
18539
18600
|
else {
|
|
18540
|
-
if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 ||
|
|
18601
|
+
if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h2) || se.test(h2) || z.test(h2)) break;
|
|
18541
18602
|
c2 += `
|
|
18542
|
-
` +
|
|
18603
|
+
` + k;
|
|
18543
18604
|
}
|
|
18544
|
-
O = !
|
|
18545
|
-
`, e2 = e2.substring(
|
|
18605
|
+
O = !k.trim(), p2 += j + `
|
|
18606
|
+
`, e2 = e2.substring(j.length + 1), h2 = q.slice(g2);
|
|
18546
18607
|
}
|
|
18547
18608
|
}
|
|
18548
|
-
r2.loose || (
|
|
18609
|
+
r2.loose || (s2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (s2 = true)), r2.items.push({ type: "list_item", raw: p2, task: !!this.options.gfm && this.rules.other.listIsTask.test(c2), loose: false, text: c2, tokens: [] }), r2.raw += p2;
|
|
18549
18610
|
}
|
|
18550
|
-
let
|
|
18551
|
-
if (
|
|
18611
|
+
let u2 = r2.items.at(-1);
|
|
18612
|
+
if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
|
|
18552
18613
|
else return;
|
|
18553
18614
|
r2.raw = r2.raw.trimEnd();
|
|
18554
18615
|
for (let a2 of r2.items) if (this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []), !r2.loose) {
|
|
@@ -18580,28 +18641,28 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18580
18641
|
html(e2) {
|
|
18581
18642
|
let t2 = this.rules.block.html.exec(e2);
|
|
18582
18643
|
if (t2) {
|
|
18583
|
-
let n2 =
|
|
18644
|
+
let n2 = ne(t2[0]);
|
|
18584
18645
|
return { type: "html", block: true, raw: n2, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n2 };
|
|
18585
18646
|
}
|
|
18586
18647
|
}
|
|
18587
18648
|
def(e2) {
|
|
18588
18649
|
let t2 = this.rules.block.def.exec(e2);
|
|
18589
18650
|
if (t2) {
|
|
18590
|
-
let n2 = t2[1]
|
|
18651
|
+
let n2 = D(t2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), i2 = t2[2] ? t2[2].replace(this.rules.other.hrefBrackets, "$1").replace(this.rules.inline.anyPunctuation, "$1") : "", r2 = t2[3] ? t2[3].substring(1, t2[3].length - 1).replace(this.rules.inline.anyPunctuation, "$1") : t2[3];
|
|
18591
18652
|
return { type: "def", tag: n2, raw: $(t2[0], `
|
|
18592
|
-
`), href:
|
|
18653
|
+
`), href: i2, title: r2 };
|
|
18593
18654
|
}
|
|
18594
18655
|
}
|
|
18595
18656
|
table(e2) {
|
|
18596
18657
|
let t2 = this.rules.block.table.exec(e2);
|
|
18597
18658
|
if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
|
|
18598
|
-
let n2 =
|
|
18659
|
+
let n2 = te(t2[1]), i2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
|
|
18599
18660
|
`) : [], o2 = { type: "table", raw: $(t2[0], `
|
|
18600
18661
|
`), header: [], align: [], rows: [] };
|
|
18601
|
-
if (n2.length ===
|
|
18602
|
-
for (let
|
|
18603
|
-
for (let
|
|
18604
|
-
for (let
|
|
18662
|
+
if (n2.length === i2.length) {
|
|
18663
|
+
for (let s2 of i2) this.rules.other.tableAlignRight.test(s2) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(s2) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(s2) ? o2.align.push("left") : o2.align.push(null);
|
|
18664
|
+
for (let s2 = 0; s2 < n2.length; s2++) o2.header.push({ text: n2[s2], tokens: this.lexer.inline(n2[s2]), header: true, align: o2.align[s2] });
|
|
18665
|
+
for (let s2 of r2) o2.rows.push(te(s2, o2.header.length).map((u2, a2) => ({ text: u2, tokens: this.lexer.inline(u2), header: false, align: o2.align[a2] })));
|
|
18605
18666
|
return o2;
|
|
18606
18667
|
}
|
|
18607
18668
|
}
|
|
@@ -18636,59 +18697,63 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18636
18697
|
link(e2) {
|
|
18637
18698
|
let t2 = this.rules.inline.link.exec(e2);
|
|
18638
18699
|
if (t2) {
|
|
18639
|
-
let n2 = t2[
|
|
18640
|
-
if (!this.options.pedantic && this.rules
|
|
18641
|
-
|
|
18642
|
-
|
|
18643
|
-
if (
|
|
18700
|
+
let n2 = t2[0].charAt(0) === "!" ? 2 : 1;
|
|
18701
|
+
if (!this.options.pedantic && Re(e2, t2[1], n2, this.rules)) return;
|
|
18702
|
+
let i2 = t2[2].trim();
|
|
18703
|
+
if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i2)) {
|
|
18704
|
+
if (!this.rules.other.endAngleBracket.test(i2)) return;
|
|
18705
|
+
let s2 = $(i2.slice(0, -1), "\\");
|
|
18706
|
+
if ((i2.length - s2.length) % 2 === 0) return;
|
|
18644
18707
|
} else {
|
|
18645
|
-
let
|
|
18646
|
-
if (
|
|
18647
|
-
if (
|
|
18648
|
-
let
|
|
18649
|
-
t2[2] = t2[2].substring(0,
|
|
18708
|
+
let s2 = me(t2[2], "()");
|
|
18709
|
+
if (s2 === -2) return;
|
|
18710
|
+
if (s2 > -1) {
|
|
18711
|
+
let a2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s2;
|
|
18712
|
+
t2[2] = t2[2].substring(0, s2), t2[0] = t2[0].substring(0, a2).trim(), t2[3] = "";
|
|
18650
18713
|
}
|
|
18651
18714
|
}
|
|
18652
|
-
let
|
|
18715
|
+
let r2 = t2[2], o2 = "";
|
|
18653
18716
|
if (this.options.pedantic) {
|
|
18654
|
-
let
|
|
18655
|
-
|
|
18656
|
-
} else
|
|
18657
|
-
return
|
|
18717
|
+
let s2 = this.rules.other.pedanticHrefTitle.exec(r2);
|
|
18718
|
+
s2 && (r2 = s2[1], o2 = s2[3]);
|
|
18719
|
+
} else o2 = t2[3] ? t2[3].slice(1, -1) : "";
|
|
18720
|
+
return r2 = r2.trim(), this.rules.other.startAngleBracket.test(r2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(i2) ? r2 = r2.slice(1) : r2 = r2.slice(1, -1)), be(t2, { href: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1"), title: o2 && o2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
|
|
18658
18721
|
}
|
|
18659
18722
|
}
|
|
18660
18723
|
reflink(e2, t2) {
|
|
18661
18724
|
let n2;
|
|
18662
18725
|
if ((n2 = this.rules.inline.reflink.exec(e2)) || (n2 = this.rules.inline.nolink.exec(e2))) {
|
|
18663
|
-
let
|
|
18664
|
-
if (!
|
|
18665
|
-
|
|
18666
|
-
|
|
18726
|
+
let i2 = n2[0].charAt(0) === "!" ? 2 : 1;
|
|
18727
|
+
if (!this.options.pedantic && Re(e2, n2[1], i2, this.rules)) return;
|
|
18728
|
+
let r2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D(r2)];
|
|
18729
|
+
if (!o2) {
|
|
18730
|
+
let s2 = n2[0].charAt(0);
|
|
18731
|
+
return { type: "text", raw: s2, text: s2 };
|
|
18667
18732
|
}
|
|
18668
|
-
return
|
|
18733
|
+
return be(n2, o2, n2[0], this.lexer, this.rules);
|
|
18669
18734
|
}
|
|
18670
18735
|
}
|
|
18671
18736
|
emStrong(e2, t2, n2 = "") {
|
|
18672
|
-
let
|
|
18673
|
-
if (!
|
|
18674
|
-
if (!(
|
|
18675
|
-
let o2 = [...
|
|
18676
|
-
for (
|
|
18677
|
-
if (
|
|
18678
|
-
if (
|
|
18679
|
-
a2 +=
|
|
18737
|
+
let i2 = this.rules.inline.emStrongLDelim.exec(e2);
|
|
18738
|
+
if (!i2 || !i2[1] && !i2[2] && !i2[3] && !i2[4] || i2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
|
|
18739
|
+
if (!(i2[1] || i2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
|
|
18740
|
+
let o2 = [...i2[0]].length - 1, s2, u2, a2 = o2, p2 = 0, c2 = i2[0][0], h2 = n2 === c2, k = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
|
|
18741
|
+
for (k.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i2 = k.exec(t2)) !== null; ) {
|
|
18742
|
+
if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2) continue;
|
|
18743
|
+
if (u2 = [...s2].length, i2[3] || i2[4]) {
|
|
18744
|
+
a2 += u2;
|
|
18680
18745
|
continue;
|
|
18681
|
-
} else if (
|
|
18682
|
-
if (o2 % 3 && !((o2 +
|
|
18683
|
-
p2 +=
|
|
18746
|
+
} else if (i2[5] || i2[6]) {
|
|
18747
|
+
if (o2 % 3 && !((o2 + u2) % 3)) {
|
|
18748
|
+
p2 += u2;
|
|
18684
18749
|
continue;
|
|
18685
18750
|
}
|
|
18686
18751
|
if (h2) break;
|
|
18687
18752
|
}
|
|
18688
|
-
if (a2 -=
|
|
18689
|
-
|
|
18690
|
-
let O = [...
|
|
18691
|
-
if (Math.min(o2,
|
|
18753
|
+
if (a2 -= u2, a2 > 0) continue;
|
|
18754
|
+
u2 = Math.min(u2, u2 + a2 + p2);
|
|
18755
|
+
let O = [...i2[0]][0].length, g2 = e2.slice(0, o2 + i2.index + O + u2);
|
|
18756
|
+
if (Math.min(o2, u2) % 2) {
|
|
18692
18757
|
let z = g2.slice(1, -1);
|
|
18693
18758
|
return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
|
|
18694
18759
|
}
|
|
@@ -18700,8 +18765,8 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18700
18765
|
codespan(e2) {
|
|
18701
18766
|
let t2 = this.rules.inline.code.exec(e2);
|
|
18702
18767
|
if (t2) {
|
|
18703
|
-
let n2 = t2[2].replace(this.rules.other.newLineCharGlobal, " "),
|
|
18704
|
-
return
|
|
18768
|
+
let n2 = t2[2].replace(this.rules.other.newLineCharGlobal, " "), i2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
|
|
18769
|
+
return i2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t2[0], text: n2 };
|
|
18705
18770
|
}
|
|
18706
18771
|
}
|
|
18707
18772
|
br(e2) {
|
|
@@ -18709,43 +18774,43 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18709
18774
|
if (t2) return { type: "br", raw: t2[0] };
|
|
18710
18775
|
}
|
|
18711
18776
|
del(e2, t2, n2 = "") {
|
|
18712
|
-
let
|
|
18713
|
-
if (!
|
|
18714
|
-
if (!(
|
|
18715
|
-
let o2 = [...
|
|
18716
|
-
for (p2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (
|
|
18717
|
-
if (
|
|
18718
|
-
if (
|
|
18719
|
-
a2 +=
|
|
18777
|
+
let i2 = this.rules.inline.delLDelim.exec(e2);
|
|
18778
|
+
if (!i2) return;
|
|
18779
|
+
if (!(i2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
|
|
18780
|
+
let o2 = [...i2[0]].length - 1, s2, u2, a2 = o2, p2 = this.rules.inline.delRDelim;
|
|
18781
|
+
for (p2.lastIndex = 0, t2 = t2.slice(-1 * e2.length + o2); (i2 = p2.exec(t2)) !== null; ) {
|
|
18782
|
+
if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2 || (u2 = [...s2].length, u2 !== o2)) continue;
|
|
18783
|
+
if (i2[3] || i2[4]) {
|
|
18784
|
+
a2 += u2;
|
|
18720
18785
|
continue;
|
|
18721
18786
|
}
|
|
18722
|
-
if (a2 -=
|
|
18723
|
-
|
|
18724
|
-
let c2 = [...
|
|
18725
|
-
return { type: "del", raw: h2, text:
|
|
18787
|
+
if (a2 -= u2, a2 > 0) continue;
|
|
18788
|
+
u2 = Math.min(u2, u2 + a2);
|
|
18789
|
+
let c2 = [...i2[0]][0].length, h2 = e2.slice(0, o2 + i2.index + c2 + u2), k = h2.slice(o2, -o2);
|
|
18790
|
+
return { type: "del", raw: h2, text: k, tokens: this.lexer.inlineTokens(k) };
|
|
18726
18791
|
}
|
|
18727
18792
|
}
|
|
18728
18793
|
}
|
|
18729
18794
|
autolink(e2) {
|
|
18730
18795
|
let t2 = this.rules.inline.autolink.exec(e2);
|
|
18731
18796
|
if (t2) {
|
|
18732
|
-
let n2,
|
|
18733
|
-
return t2[2] === "@" ? (n2 = t2[1],
|
|
18797
|
+
let n2, i2;
|
|
18798
|
+
return t2[2] === "@" ? (n2 = t2[1], i2 = "mailto:" + n2) : (n2 = t2[1], i2 = n2), { type: "link", raw: t2[0], text: n2, href: i2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
|
|
18734
18799
|
}
|
|
18735
18800
|
}
|
|
18736
18801
|
url(e2) {
|
|
18737
18802
|
let t2;
|
|
18738
18803
|
if (t2 = this.rules.inline.url.exec(e2)) {
|
|
18739
|
-
let n2,
|
|
18740
|
-
if (t2[2] === "@") n2 = t2[0],
|
|
18804
|
+
let n2, i2;
|
|
18805
|
+
if (t2[2] === "@") n2 = t2[0], i2 = "mailto:" + n2;
|
|
18741
18806
|
else {
|
|
18742
18807
|
let r2;
|
|
18743
18808
|
do
|
|
18744
18809
|
r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
|
|
18745
18810
|
while (r2 !== t2[0]);
|
|
18746
|
-
n2 = t2[0], t2[1] === "www." ?
|
|
18811
|
+
n2 = t2[0], t2[1] === "www." ? i2 = "http://" + t2[0] : i2 = t2[0];
|
|
18747
18812
|
}
|
|
18748
|
-
return { type: "link", raw: t2[0], text: n2, href:
|
|
18813
|
+
return { type: "link", raw: t2[0], text: n2, href: i2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
|
|
18749
18814
|
}
|
|
18750
18815
|
}
|
|
18751
18816
|
inlineText(e2) {
|
|
@@ -18756,7 +18821,7 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18756
18821
|
}
|
|
18757
18822
|
}
|
|
18758
18823
|
};
|
|
18759
|
-
var x = class
|
|
18824
|
+
var x = class l2 {
|
|
18760
18825
|
tokens;
|
|
18761
18826
|
options;
|
|
18762
18827
|
state;
|
|
@@ -18764,17 +18829,17 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18764
18829
|
tokenizer;
|
|
18765
18830
|
constructor(e2) {
|
|
18766
18831
|
this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e2 || T, this.options.tokenizer = this.options.tokenizer || new y$1(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: false, inRawBlock: false, linkEmitted: false, top: true };
|
|
18767
|
-
let t2 = { other: m$1, block:
|
|
18768
|
-
this.options.pedantic ? (t2.block =
|
|
18832
|
+
let t2 = { other: m$1, block: G.normal, inline: B.normal };
|
|
18833
|
+
this.options.pedantic ? (t2.block = G.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = G.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
|
|
18769
18834
|
}
|
|
18770
18835
|
static get rules() {
|
|
18771
|
-
return { block:
|
|
18836
|
+
return { block: G, inline: B };
|
|
18772
18837
|
}
|
|
18773
18838
|
static lex(e2, t2) {
|
|
18774
|
-
return new
|
|
18839
|
+
return new l2(t2).lex(e2);
|
|
18775
18840
|
}
|
|
18776
18841
|
static lexInline(e2, t2) {
|
|
18777
|
-
return new
|
|
18842
|
+
return new l2(t2).inlineTokens(e2);
|
|
18778
18843
|
}
|
|
18779
18844
|
lex(e2) {
|
|
18780
18845
|
e2 = e2.replace(m$1.carriageReturn, `
|
|
@@ -18787,29 +18852,29 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18787
18852
|
}
|
|
18788
18853
|
blockTokens(e2, t2 = [], n2 = false) {
|
|
18789
18854
|
this.tokenizer.lexer = this, this.options.pedantic && (e2 = e2.replace(m$1.tabCharGlobal, " ").replace(m$1.spaceLine, ""));
|
|
18790
|
-
let
|
|
18855
|
+
let i2 = 1 / 0;
|
|
18791
18856
|
for (; e2; ) {
|
|
18792
|
-
if (e2.length <
|
|
18857
|
+
if (e2.length < i2) i2 = e2.length;
|
|
18793
18858
|
else {
|
|
18794
18859
|
this.infiniteLoopError(e2.charCodeAt(0));
|
|
18795
18860
|
break;
|
|
18796
18861
|
}
|
|
18797
18862
|
let r2;
|
|
18798
|
-
if (this.options.extensions?.block?.some((
|
|
18863
|
+
if (this.options.extensions?.block?.some((s2) => (r2 = s2.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
|
|
18799
18864
|
if (r2 = this.tokenizer.space(e2)) {
|
|
18800
18865
|
e2 = e2.substring(r2.raw.length);
|
|
18801
|
-
let
|
|
18802
|
-
r2.raw.length === 1 &&
|
|
18866
|
+
let s2 = t2.at(-1);
|
|
18867
|
+
r2.raw.length === 1 && s2 !== void 0 ? s2.raw += `
|
|
18803
18868
|
` : t2.push(r2);
|
|
18804
18869
|
continue;
|
|
18805
18870
|
}
|
|
18806
18871
|
if (r2 = this.tokenizer.code(e2)) {
|
|
18807
18872
|
e2 = e2.substring(r2.raw.length);
|
|
18808
|
-
let
|
|
18809
|
-
|
|
18873
|
+
let s2 = t2.at(-1);
|
|
18874
|
+
s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18810
18875
|
`) ? "" : `
|
|
18811
|
-
`) + r2.raw,
|
|
18812
|
-
` + r2.text, this.inlineQueue.at(-1).src =
|
|
18876
|
+
`) + r2.raw, s2.text += `
|
|
18877
|
+
` + r2.text, this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
|
|
18813
18878
|
continue;
|
|
18814
18879
|
}
|
|
18815
18880
|
if (r2 = this.tokenizer.fences(e2)) {
|
|
@@ -18838,11 +18903,11 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18838
18903
|
}
|
|
18839
18904
|
if (r2 = this.tokenizer.def(e2)) {
|
|
18840
18905
|
e2 = e2.substring(r2.raw.length);
|
|
18841
|
-
let
|
|
18842
|
-
|
|
18906
|
+
let s2 = t2.at(-1);
|
|
18907
|
+
s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18843
18908
|
`) ? "" : `
|
|
18844
|
-
`) + r2.raw,
|
|
18845
|
-
` + r2.raw, this.inlineQueue.at(-1).src =
|
|
18909
|
+
`) + r2.raw, s2.text += `
|
|
18910
|
+
` + r2.raw, this.inlineQueue.at(-1).src = s2.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
|
|
18846
18911
|
continue;
|
|
18847
18912
|
}
|
|
18848
18913
|
if (r2 = this.tokenizer.table(e2)) {
|
|
@@ -18855,26 +18920,26 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18855
18920
|
}
|
|
18856
18921
|
let o2 = e2;
|
|
18857
18922
|
if (this.options.extensions?.startBlock) {
|
|
18858
|
-
let
|
|
18923
|
+
let s2 = 1 / 0, u2 = e2.slice(1), a2;
|
|
18859
18924
|
this.options.extensions.startBlock.forEach((p2) => {
|
|
18860
|
-
a2 = p2.call({ lexer: this },
|
|
18861
|
-
}),
|
|
18925
|
+
a2 = p2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (s2 = Math.min(s2, a2));
|
|
18926
|
+
}), s2 < 1 / 0 && s2 >= 0 && (o2 = e2.substring(0, s2 + 1));
|
|
18862
18927
|
}
|
|
18863
18928
|
if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
|
|
18864
|
-
let
|
|
18865
|
-
n2 &&
|
|
18929
|
+
let s2 = t2.at(-1);
|
|
18930
|
+
n2 && s2?.type === "paragraph" ? (s2.raw += (s2.raw.endsWith(`
|
|
18866
18931
|
`) ? "" : `
|
|
18867
|
-
`) + r2.raw,
|
|
18868
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
18932
|
+
`) + r2.raw, s2.text += `
|
|
18933
|
+
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2), n2 = o2.length !== e2.length, e2 = e2.substring(r2.raw.length);
|
|
18869
18934
|
continue;
|
|
18870
18935
|
}
|
|
18871
18936
|
if (r2 = this.tokenizer.text(e2)) {
|
|
18872
18937
|
e2 = e2.substring(r2.raw.length);
|
|
18873
|
-
let
|
|
18874
|
-
|
|
18938
|
+
let s2 = t2.at(-1);
|
|
18939
|
+
s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
|
|
18875
18940
|
`) ? "" : `
|
|
18876
|
-
`) + r2.raw,
|
|
18877
|
-
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src =
|
|
18941
|
+
`) + r2.raw, s2.text += `
|
|
18942
|
+
` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
|
|
18878
18943
|
continue;
|
|
18879
18944
|
}
|
|
18880
18945
|
if (e2) {
|
|
@@ -18892,8 +18957,8 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18892
18957
|
let t2 = this.tokenizer.rules.inline.link;
|
|
18893
18958
|
for (let n2 of e2.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n2[0]) && e2.charAt(n2.index - 1) !== "!") return true;
|
|
18894
18959
|
for (let n2 of e2.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
|
|
18895
|
-
let
|
|
18896
|
-
if (!(
|
|
18960
|
+
let i2 = n2[0], r2 = i2.lastIndexOf("[");
|
|
18961
|
+
if (!(i2.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, D(i2.slice(r2 + 1, -1)))) && !(r2 > 1 && this.linkInText(i2.slice(1, r2 - 1)))) return true;
|
|
18897
18962
|
}
|
|
18898
18963
|
return false;
|
|
18899
18964
|
}
|
|
@@ -18901,84 +18966,84 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
18901
18966
|
this.tokenizer.lexer = this;
|
|
18902
18967
|
let n2 = e2;
|
|
18903
18968
|
if (this.tokens.links && e2.includes("[")) {
|
|
18904
|
-
let
|
|
18969
|
+
let s2 = this.tokenizer.rules.inline.reflinkSearch, u2 = (a2) => {
|
|
18905
18970
|
let p2 = a2.lastIndexOf("[");
|
|
18906
|
-
if (!Object.hasOwn(this.tokens.links, a2.slice(p2 + 1, -1))) return a2;
|
|
18971
|
+
if (!Object.hasOwn(this.tokens.links, D(a2.slice(p2 + 1, -1)))) return a2;
|
|
18907
18972
|
if (p2 > 1 && a2.charAt(0) !== "!") {
|
|
18908
18973
|
let c2 = a2.slice(1, p2 - 1);
|
|
18909
|
-
if (this.linkInText(c2)) return "[" + c2.replace(
|
|
18974
|
+
if (this.linkInText(c2)) return "[" + c2.replace(s2, u2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
|
|
18910
18975
|
}
|
|
18911
18976
|
return "[" + "a".repeat(a2.length - 2) + "]";
|
|
18912
18977
|
};
|
|
18913
|
-
n2 = n2.replace(
|
|
18978
|
+
n2 = n2.replace(s2, u2);
|
|
18914
18979
|
}
|
|
18915
|
-
n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (
|
|
18980
|
+
n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (s2) => "+".repeat(s2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (s2, u2, a2) => {
|
|
18916
18981
|
let p2 = a2 ? a2.length : 0;
|
|
18917
|
-
return
|
|
18982
|
+
return s2.slice(0, p2) + "[" + "a".repeat(s2.length - p2 - 2) + "]";
|
|
18918
18983
|
}), n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
|
|
18919
|
-
let
|
|
18984
|
+
let i2 = false, r2 = "", o2 = 1 / 0;
|
|
18920
18985
|
for (; e2; ) {
|
|
18921
18986
|
if (e2.length < o2) o2 = e2.length;
|
|
18922
18987
|
else {
|
|
18923
18988
|
this.infiniteLoopError(e2.charCodeAt(0));
|
|
18924
18989
|
break;
|
|
18925
18990
|
}
|
|
18926
|
-
|
|
18927
|
-
let
|
|
18928
|
-
if (this.options.extensions?.inline?.some((a2) => (
|
|
18929
|
-
if (
|
|
18930
|
-
e2 = e2.substring(
|
|
18991
|
+
i2 || (r2 = ""), i2 = false;
|
|
18992
|
+
let s2;
|
|
18993
|
+
if (this.options.extensions?.inline?.some((a2) => (s2 = a2.call({ lexer: this }, e2, t2)) ? (e2 = e2.substring(s2.raw.length), t2.push(s2), true) : false)) continue;
|
|
18994
|
+
if (s2 = this.tokenizer.escape(e2)) {
|
|
18995
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18931
18996
|
continue;
|
|
18932
18997
|
}
|
|
18933
|
-
if (
|
|
18934
|
-
e2 = e2.substring(
|
|
18998
|
+
if (s2 = this.tokenizer.tag(e2)) {
|
|
18999
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18935
19000
|
continue;
|
|
18936
19001
|
}
|
|
18937
|
-
if (
|
|
18938
|
-
e2 = e2.substring(
|
|
19002
|
+
if (s2 = this.tokenizer.link(e2)) {
|
|
19003
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18939
19004
|
continue;
|
|
18940
19005
|
}
|
|
18941
|
-
if (
|
|
18942
|
-
e2 = e2.substring(
|
|
19006
|
+
if (s2 = this.tokenizer.reflink(e2, this.tokens.links)) {
|
|
19007
|
+
e2 = e2.substring(s2.raw.length);
|
|
18943
19008
|
let a2 = t2.at(-1);
|
|
18944
|
-
|
|
19009
|
+
s2.type === "text" && a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
|
|
18945
19010
|
continue;
|
|
18946
19011
|
}
|
|
18947
|
-
if (
|
|
18948
|
-
e2 = e2.substring(
|
|
19012
|
+
if (s2 = this.tokenizer.emStrong(e2, n2, r2)) {
|
|
19013
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18949
19014
|
continue;
|
|
18950
19015
|
}
|
|
18951
|
-
if (
|
|
18952
|
-
e2 = e2.substring(
|
|
19016
|
+
if (s2 = this.tokenizer.codespan(e2)) {
|
|
19017
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18953
19018
|
continue;
|
|
18954
19019
|
}
|
|
18955
|
-
if (
|
|
18956
|
-
e2 = e2.substring(
|
|
19020
|
+
if (s2 = this.tokenizer.br(e2)) {
|
|
19021
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18957
19022
|
continue;
|
|
18958
19023
|
}
|
|
18959
|
-
if (
|
|
18960
|
-
e2 = e2.substring(
|
|
19024
|
+
if (s2 = this.tokenizer.del(e2, n2, r2)) {
|
|
19025
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18961
19026
|
continue;
|
|
18962
19027
|
}
|
|
18963
|
-
if (
|
|
18964
|
-
e2 = e2.substring(
|
|
19028
|
+
if (s2 = this.tokenizer.autolink(e2)) {
|
|
19029
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18965
19030
|
continue;
|
|
18966
19031
|
}
|
|
18967
|
-
if (!this.state.inLink && (
|
|
18968
|
-
e2 = e2.substring(
|
|
19032
|
+
if (!this.state.inLink && (s2 = this.tokenizer.url(e2))) {
|
|
19033
|
+
e2 = e2.substring(s2.raw.length), t2.push(s2);
|
|
18969
19034
|
continue;
|
|
18970
19035
|
}
|
|
18971
|
-
let
|
|
19036
|
+
let u2 = e2;
|
|
18972
19037
|
if (this.options.extensions?.startInline) {
|
|
18973
19038
|
let a2 = 1 / 0, p2 = e2.slice(1), c2;
|
|
18974
19039
|
this.options.extensions.startInline.forEach((h2) => {
|
|
18975
19040
|
c2 = h2.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a2 = Math.min(a2, c2));
|
|
18976
|
-
}), a2 < 1 / 0 && a2 >= 0 && (
|
|
19041
|
+
}), a2 < 1 / 0 && a2 >= 0 && (u2 = e2.substring(0, a2 + 1));
|
|
18977
19042
|
}
|
|
18978
|
-
if (
|
|
18979
|
-
e2 = e2.substring(
|
|
19043
|
+
if (s2 = this.tokenizer.inlineText(u2)) {
|
|
19044
|
+
e2 = e2.substring(s2.raw.length), s2.raw.slice(-1) !== "_" && (r2 = s2.raw.slice(-1)), i2 = true;
|
|
18980
19045
|
let a2 = t2.at(-1);
|
|
18981
|
-
a2?.type === "text" ? (a2.raw +=
|
|
19046
|
+
a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
|
|
18982
19047
|
continue;
|
|
18983
19048
|
}
|
|
18984
19049
|
if (e2) {
|
|
@@ -19004,9 +19069,9 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
|
|
|
19004
19069
|
return "";
|
|
19005
19070
|
}
|
|
19006
19071
|
code({ text: e2, lang: t2, escaped: n2 }) {
|
|
19007
|
-
let
|
|
19072
|
+
let i2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e2 ? e2.replace(m$1.endingNewline, "") + `
|
|
19008
19073
|
` : "";
|
|
19009
|
-
return
|
|
19074
|
+
return i2 ? '<pre><code class="language-' + R(i2) + '">' + (n2 ? r2 : R(r2, true)) + `</code></pre>
|
|
19010
19075
|
` : "<pre><code>" + (n2 ? r2 : R(r2, true)) + `</code></pre>
|
|
19011
19076
|
`;
|
|
19012
19077
|
}
|
|
@@ -19030,14 +19095,14 @@ ${this.parser.parse(e2)}</blockquote>
|
|
|
19030
19095
|
`;
|
|
19031
19096
|
}
|
|
19032
19097
|
list(e2) {
|
|
19033
|
-
let t2 = e2.ordered, n2 = e2.start,
|
|
19034
|
-
for (let
|
|
19035
|
-
let
|
|
19036
|
-
|
|
19098
|
+
let t2 = e2.ordered, n2 = e2.start, i2 = "";
|
|
19099
|
+
for (let s2 = 0; s2 < e2.items.length; s2++) {
|
|
19100
|
+
let u2 = e2.items[s2];
|
|
19101
|
+
i2 += this.listitem(u2);
|
|
19037
19102
|
}
|
|
19038
19103
|
let r2 = t2 ? "ol" : "ul", o2 = t2 && n2 !== 1 ? ' start="' + n2 + '"' : "";
|
|
19039
19104
|
return "<" + r2 + o2 + `>
|
|
19040
|
-
` +
|
|
19105
|
+
` + i2 + "</" + r2 + `>
|
|
19041
19106
|
`;
|
|
19042
19107
|
}
|
|
19043
19108
|
listitem(e2) {
|
|
@@ -19055,17 +19120,17 @@ ${this.parser.parse(e2)}</blockquote>
|
|
|
19055
19120
|
let t2 = "", n2 = "";
|
|
19056
19121
|
for (let r2 = 0; r2 < e2.header.length; r2++) n2 += this.tablecell(e2.header[r2]);
|
|
19057
19122
|
t2 += this.tablerow({ text: n2 });
|
|
19058
|
-
let
|
|
19123
|
+
let i2 = "";
|
|
19059
19124
|
for (let r2 = 0; r2 < e2.rows.length; r2++) {
|
|
19060
19125
|
let o2 = e2.rows[r2];
|
|
19061
19126
|
n2 = "";
|
|
19062
|
-
for (let
|
|
19063
|
-
|
|
19127
|
+
for (let s2 = 0; s2 < o2.length; s2++) n2 += this.tablecell(o2[s2]);
|
|
19128
|
+
i2 += this.tablerow({ text: n2 });
|
|
19064
19129
|
}
|
|
19065
|
-
return
|
|
19130
|
+
return i2 && (i2 = `<tbody>${i2}</tbody>`), `<table>
|
|
19066
19131
|
<thead>
|
|
19067
19132
|
` + t2 + `</thead>
|
|
19068
|
-
` +
|
|
19133
|
+
` + i2 + `</table>
|
|
19069
19134
|
`;
|
|
19070
19135
|
}
|
|
19071
19136
|
tablerow({ text: e2 }) {
|
|
@@ -19093,16 +19158,16 @@ ${e2}</tr>
|
|
|
19093
19158
|
del({ tokens: e2 }) {
|
|
19094
19159
|
return `<del>${this.parser.parseInline(e2)}</del>`;
|
|
19095
19160
|
}
|
|
19096
|
-
link({ href: e2, title: t2, text: n2, tokens:
|
|
19097
|
-
let o2 = r2 ? R(n2, true) : this.parser.parseInline(
|
|
19098
|
-
if (
|
|
19099
|
-
e2 = R(
|
|
19100
|
-
let
|
|
19101
|
-
return t2 && (
|
|
19161
|
+
link({ href: e2, title: t2, text: n2, tokens: i2, autolink: r2 }) {
|
|
19162
|
+
let o2 = r2 ? R(n2, true) : this.parser.parseInline(i2), s2 = ee(e2);
|
|
19163
|
+
if (s2 === null) return o2;
|
|
19164
|
+
e2 = R(s2, r2);
|
|
19165
|
+
let u2 = '<a href="' + e2 + '"';
|
|
19166
|
+
return t2 && (u2 += ' title="' + R(t2) + '"'), u2 += ">" + o2 + "</a>", u2;
|
|
19102
19167
|
}
|
|
19103
|
-
image({ href: e2, title: t2, text: n2, tokens:
|
|
19104
|
-
|
|
19105
|
-
let r2 =
|
|
19168
|
+
image({ href: e2, title: t2, text: n2, tokens: i2 }) {
|
|
19169
|
+
i2 && (n2 = this.parser.parseInline(i2, this.parser.textRenderer));
|
|
19170
|
+
let r2 = ee(e2);
|
|
19106
19171
|
if (r2 === null) return R(n2);
|
|
19107
19172
|
e2 = r2;
|
|
19108
19173
|
let o2 = `<img src="${R(e2)}" alt="${R(n2)}"`;
|
|
@@ -19144,7 +19209,7 @@ ${e2}</tr>
|
|
|
19144
19209
|
return e2;
|
|
19145
19210
|
}
|
|
19146
19211
|
};
|
|
19147
|
-
var b$1 = class
|
|
19212
|
+
var b$1 = class l2 {
|
|
19148
19213
|
options;
|
|
19149
19214
|
renderer;
|
|
19150
19215
|
textRenderer;
|
|
@@ -19152,24 +19217,24 @@ ${e2}</tr>
|
|
|
19152
19217
|
this.options = e2 || T, this.options.renderer = this.options.renderer || new P$1(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new L();
|
|
19153
19218
|
}
|
|
19154
19219
|
static parse(e2, t2) {
|
|
19155
|
-
return new
|
|
19220
|
+
return new l2(t2).parse(e2);
|
|
19156
19221
|
}
|
|
19157
19222
|
static parseInline(e2, t2) {
|
|
19158
|
-
return new
|
|
19223
|
+
return new l2(t2).parseInline(e2);
|
|
19159
19224
|
}
|
|
19160
19225
|
parse(e2) {
|
|
19161
19226
|
this.renderer.parser = this;
|
|
19162
19227
|
let t2 = "";
|
|
19163
19228
|
for (let n2 = 0; n2 < e2.length; n2++) {
|
|
19164
|
-
let
|
|
19165
|
-
if (this.options.extensions?.renderers?.[
|
|
19166
|
-
let o2 =
|
|
19167
|
-
if (
|
|
19168
|
-
t2 +=
|
|
19229
|
+
let i2 = e2[n2];
|
|
19230
|
+
if (this.options.extensions?.renderers?.[i2.type]) {
|
|
19231
|
+
let o2 = i2, s2 = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
|
|
19232
|
+
if (s2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
|
|
19233
|
+
t2 += s2 || "";
|
|
19169
19234
|
continue;
|
|
19170
19235
|
}
|
|
19171
19236
|
}
|
|
19172
|
-
let r2 =
|
|
19237
|
+
let r2 = i2;
|
|
19173
19238
|
switch (r2.type) {
|
|
19174
19239
|
case "space": {
|
|
19175
19240
|
t2 += this.renderer.space(r2);
|
|
@@ -19231,12 +19296,12 @@ ${e2}</tr>
|
|
|
19231
19296
|
parseInline(e2, t2 = this.renderer) {
|
|
19232
19297
|
this.renderer.parser = this;
|
|
19233
19298
|
let n2 = "";
|
|
19234
|
-
for (let
|
|
19235
|
-
let r2 = e2[
|
|
19299
|
+
for (let i2 = 0; i2 < e2.length; i2++) {
|
|
19300
|
+
let r2 = e2[i2];
|
|
19236
19301
|
if (this.options.extensions?.renderers?.[r2.type]) {
|
|
19237
|
-
let
|
|
19238
|
-
if (
|
|
19239
|
-
n2 +=
|
|
19302
|
+
let s2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
|
|
19303
|
+
if (s2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
|
|
19304
|
+
n2 += s2 || "";
|
|
19240
19305
|
continue;
|
|
19241
19306
|
}
|
|
19242
19307
|
}
|
|
@@ -19287,9 +19352,9 @@ ${e2}</tr>
|
|
|
19287
19352
|
break;
|
|
19288
19353
|
}
|
|
19289
19354
|
default: {
|
|
19290
|
-
let
|
|
19291
|
-
if (this.options.silent) return console.error(
|
|
19292
|
-
throw new Error(
|
|
19355
|
+
let s2 = 'Token with "' + o2.type + '" type was not found.';
|
|
19356
|
+
if (this.options.silent) return console.error(s2), "";
|
|
19357
|
+
throw new Error(s2);
|
|
19293
19358
|
}
|
|
19294
19359
|
}
|
|
19295
19360
|
}
|
|
@@ -19323,7 +19388,7 @@ ${e2}</tr>
|
|
|
19323
19388
|
return e2 ? b$1.parse : b$1.parseInline;
|
|
19324
19389
|
}
|
|
19325
19390
|
};
|
|
19326
|
-
var
|
|
19391
|
+
var Q = class {
|
|
19327
19392
|
defaults = A();
|
|
19328
19393
|
options = this.setOptions;
|
|
19329
19394
|
parse = this.parseMarkdown(true);
|
|
@@ -19339,23 +19404,23 @@ ${e2}</tr>
|
|
|
19339
19404
|
}
|
|
19340
19405
|
walkTokens(e2, t2) {
|
|
19341
19406
|
let n2 = [];
|
|
19342
|
-
for (let
|
|
19407
|
+
for (let i2 of e2) switch (n2 = n2.concat(t2.call(this, i2)), i2.type) {
|
|
19343
19408
|
case "table": {
|
|
19344
|
-
let r2 =
|
|
19409
|
+
let r2 = i2;
|
|
19345
19410
|
for (let o2 of r2.header) n2 = n2.concat(this.walkTokens(o2.tokens, t2));
|
|
19346
|
-
for (let o2 of r2.rows) for (let
|
|
19411
|
+
for (let o2 of r2.rows) for (let s2 of o2) n2 = n2.concat(this.walkTokens(s2.tokens, t2));
|
|
19347
19412
|
break;
|
|
19348
19413
|
}
|
|
19349
19414
|
case "list": {
|
|
19350
|
-
let r2 =
|
|
19415
|
+
let r2 = i2;
|
|
19351
19416
|
n2 = n2.concat(this.walkTokens(r2.items, t2));
|
|
19352
19417
|
break;
|
|
19353
19418
|
}
|
|
19354
19419
|
default: {
|
|
19355
|
-
let r2 =
|
|
19420
|
+
let r2 = i2;
|
|
19356
19421
|
this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
|
|
19357
|
-
let
|
|
19358
|
-
n2 = n2.concat(this.walkTokens(
|
|
19422
|
+
let s2 = r2[o2].flat(1 / 0);
|
|
19423
|
+
n2 = n2.concat(this.walkTokens(s2, t2));
|
|
19359
19424
|
}) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t2)));
|
|
19360
19425
|
}
|
|
19361
19426
|
}
|
|
@@ -19364,14 +19429,14 @@ ${e2}</tr>
|
|
|
19364
19429
|
use(...e2) {
|
|
19365
19430
|
let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
|
|
19366
19431
|
return e2.forEach((n2) => {
|
|
19367
|
-
let
|
|
19368
|
-
if (
|
|
19432
|
+
let i2 = { ...n2 };
|
|
19433
|
+
if (i2.async = this.defaults.async || i2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
|
|
19369
19434
|
if (!r2.name) throw new Error("extension name required");
|
|
19370
19435
|
if ("renderer" in r2) {
|
|
19371
19436
|
let o2 = t2.renderers[r2.name];
|
|
19372
|
-
o2 ? t2.renderers[r2.name] = function(...
|
|
19373
|
-
let
|
|
19374
|
-
return
|
|
19437
|
+
o2 ? t2.renderers[r2.name] = function(...s2) {
|
|
19438
|
+
let u2 = r2.renderer.apply(this, s2);
|
|
19439
|
+
return u2 === false && (u2 = o2.apply(this, s2)), u2;
|
|
19375
19440
|
} : t2.renderers[r2.name] = r2.renderer;
|
|
19376
19441
|
}
|
|
19377
19442
|
if ("tokenizer" in r2) {
|
|
@@ -19380,64 +19445,64 @@ ${e2}</tr>
|
|
|
19380
19445
|
o2 ? o2.unshift(r2.tokenizer) : t2[r2.level] = [r2.tokenizer], r2.start && (r2.level === "block" ? t2.startBlock ? t2.startBlock.push(r2.start) : t2.startBlock = [r2.start] : r2.level === "inline" && (t2.startInline ? t2.startInline.push(r2.start) : t2.startInline = [r2.start]));
|
|
19381
19446
|
}
|
|
19382
19447
|
"childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
|
|
19383
|
-
}),
|
|
19448
|
+
}), i2.extensions = t2), n2.renderer) {
|
|
19384
19449
|
let r2 = this.defaults.renderer || new P$1(this.defaults);
|
|
19385
19450
|
for (let o2 in n2.renderer) {
|
|
19386
19451
|
if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
|
|
19387
19452
|
if (["options", "parser"].includes(o2)) continue;
|
|
19388
|
-
let
|
|
19389
|
-
r2[
|
|
19390
|
-
let c2 =
|
|
19453
|
+
let s2 = o2, u2 = n2.renderer[s2], a2 = r2[s2];
|
|
19454
|
+
r2[s2] = (...p2) => {
|
|
19455
|
+
let c2 = u2.apply(r2, p2);
|
|
19391
19456
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2 || "";
|
|
19392
19457
|
};
|
|
19393
19458
|
}
|
|
19394
|
-
|
|
19459
|
+
i2.renderer = r2;
|
|
19395
19460
|
}
|
|
19396
19461
|
if (n2.tokenizer) {
|
|
19397
19462
|
let r2 = this.defaults.tokenizer || new y$1(this.defaults);
|
|
19398
19463
|
for (let o2 in n2.tokenizer) {
|
|
19399
19464
|
if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
|
|
19400
19465
|
if (["options", "rules", "lexer"].includes(o2)) continue;
|
|
19401
|
-
let
|
|
19402
|
-
r2[
|
|
19403
|
-
let c2 =
|
|
19466
|
+
let s2 = o2, u2 = n2.tokenizer[s2], a2 = r2[s2];
|
|
19467
|
+
r2[s2] = (...p2) => {
|
|
19468
|
+
let c2 = u2.apply(r2, p2);
|
|
19404
19469
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2;
|
|
19405
19470
|
};
|
|
19406
19471
|
}
|
|
19407
|
-
|
|
19472
|
+
i2.tokenizer = r2;
|
|
19408
19473
|
}
|
|
19409
19474
|
if (n2.hooks) {
|
|
19410
19475
|
let r2 = this.defaults.hooks || new S$1();
|
|
19411
19476
|
for (let o2 in n2.hooks) {
|
|
19412
19477
|
if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
|
|
19413
19478
|
if (["options", "block"].includes(o2)) continue;
|
|
19414
|
-
let
|
|
19415
|
-
S$1.passThroughHooks.has(o2) ? r2[
|
|
19479
|
+
let s2 = o2, u2 = n2.hooks[s2], a2 = r2[s2];
|
|
19480
|
+
S$1.passThroughHooks.has(o2) ? r2[s2] = (p2) => {
|
|
19416
19481
|
if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(o2)) return (async () => {
|
|
19417
|
-
let h2 = await
|
|
19482
|
+
let h2 = await u2.call(r2, p2);
|
|
19418
19483
|
return a2.call(r2, h2);
|
|
19419
19484
|
})();
|
|
19420
|
-
let c2 =
|
|
19485
|
+
let c2 = u2.call(r2, p2);
|
|
19421
19486
|
return a2.call(r2, c2);
|
|
19422
|
-
} : r2[
|
|
19487
|
+
} : r2[s2] = (...p2) => {
|
|
19423
19488
|
if (this.defaults.async) return (async () => {
|
|
19424
|
-
let h2 = await
|
|
19489
|
+
let h2 = await u2.apply(r2, p2);
|
|
19425
19490
|
return h2 === false && (h2 = await a2.apply(r2, p2)), h2;
|
|
19426
19491
|
})();
|
|
19427
|
-
let c2 =
|
|
19492
|
+
let c2 = u2.apply(r2, p2);
|
|
19428
19493
|
return c2 === false && (c2 = a2.apply(r2, p2)), c2;
|
|
19429
19494
|
};
|
|
19430
19495
|
}
|
|
19431
|
-
|
|
19496
|
+
i2.hooks = r2;
|
|
19432
19497
|
}
|
|
19433
19498
|
if (n2.walkTokens) {
|
|
19434
19499
|
let r2 = this.defaults.walkTokens, o2 = n2.walkTokens;
|
|
19435
|
-
|
|
19436
|
-
let
|
|
19437
|
-
return
|
|
19500
|
+
i2.walkTokens = function(s2) {
|
|
19501
|
+
let u2 = [];
|
|
19502
|
+
return u2.push(o2.call(this, s2)), r2 && (u2 = u2.concat(r2.call(this, s2))), u2;
|
|
19438
19503
|
};
|
|
19439
19504
|
}
|
|
19440
|
-
this.defaults = { ...this.defaults, ...
|
|
19505
|
+
this.defaults = { ...this.defaults, ...i2 };
|
|
19441
19506
|
}), this;
|
|
19442
19507
|
}
|
|
19443
19508
|
setOptions(e2) {
|
|
@@ -19450,25 +19515,25 @@ ${e2}</tr>
|
|
|
19450
19515
|
return b$1.parse(e2, t2 ?? this.defaults);
|
|
19451
19516
|
}
|
|
19452
19517
|
parseMarkdown(e2) {
|
|
19453
|
-
return (n2,
|
|
19454
|
-
let r2 = { ...
|
|
19455
|
-
if (this.defaults.async === true && r2.async === false) return
|
|
19456
|
-
if (typeof n2 > "u" || n2 === null) return
|
|
19457
|
-
if (typeof n2 != "string") return
|
|
19518
|
+
return (n2, i2) => {
|
|
19519
|
+
let r2 = { ...i2 }, o2 = { ...this.defaults, ...r2 }, s2 = this.onError(!!o2.silent, !!o2.async);
|
|
19520
|
+
if (this.defaults.async === true && r2.async === false) return s2(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));
|
|
19521
|
+
if (typeof n2 > "u" || n2 === null) return s2(new Error("marked(): input parameter is undefined or null"));
|
|
19522
|
+
if (typeof n2 != "string") return s2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
|
|
19458
19523
|
if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e2), o2.async) return (async () => {
|
|
19459
|
-
let
|
|
19524
|
+
let u2 = o2.hooks ? await o2.hooks.preprocess(n2) : n2, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e2) : e2 ? x.lex : x.lexInline)(u2, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
|
|
19460
19525
|
o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
|
|
19461
|
-
let
|
|
19462
|
-
return o2.hooks ? await o2.hooks.postprocess(
|
|
19463
|
-
})().catch(
|
|
19526
|
+
let k = await (o2.hooks ? await o2.hooks.provideParser(e2) : e2 ? b$1.parse : b$1.parseInline)(c2, o2);
|
|
19527
|
+
return o2.hooks ? await o2.hooks.postprocess(k) : k;
|
|
19528
|
+
})().catch(s2);
|
|
19464
19529
|
try {
|
|
19465
19530
|
o2.hooks && (n2 = o2.hooks.preprocess(n2));
|
|
19466
19531
|
let a2 = (o2.hooks ? o2.hooks.provideLexer(e2) : e2 ? x.lex : x.lexInline)(n2, o2);
|
|
19467
19532
|
o2.hooks && (a2 = o2.hooks.processAllTokens(a2)), o2.walkTokens && this.walkTokens(a2, o2.walkTokens);
|
|
19468
19533
|
let c2 = (o2.hooks ? o2.hooks.provideParser(e2) : e2 ? b$1.parse : b$1.parseInline)(a2, o2);
|
|
19469
19534
|
return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
|
|
19470
|
-
} catch (
|
|
19471
|
-
return
|
|
19535
|
+
} catch (u2) {
|
|
19536
|
+
return s2(u2);
|
|
19472
19537
|
}
|
|
19473
19538
|
};
|
|
19474
19539
|
}
|
|
@@ -19476,29 +19541,29 @@ ${e2}</tr>
|
|
|
19476
19541
|
return (n2) => {
|
|
19477
19542
|
if (n2.message += `
|
|
19478
19543
|
Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
19479
|
-
let
|
|
19480
|
-
return t2 ? Promise.resolve(
|
|
19544
|
+
let i2 = "<p>An error occurred:</p><pre>" + R(n2.message + "", true) + "</pre>";
|
|
19545
|
+
return t2 ? Promise.resolve(i2) : i2;
|
|
19481
19546
|
}
|
|
19482
19547
|
if (t2) return Promise.reject(n2);
|
|
19483
19548
|
throw n2;
|
|
19484
19549
|
};
|
|
19485
19550
|
}
|
|
19486
19551
|
};
|
|
19487
|
-
var M = new
|
|
19488
|
-
function f$1(
|
|
19489
|
-
return M.parse(
|
|
19552
|
+
var M = new Q();
|
|
19553
|
+
function f$1(l2, e2) {
|
|
19554
|
+
return M.parse(l2, e2);
|
|
19490
19555
|
}
|
|
19491
|
-
f$1.options = f$1.setOptions = function(
|
|
19492
|
-
return M.setOptions(
|
|
19556
|
+
f$1.options = f$1.setOptions = function(l2) {
|
|
19557
|
+
return M.setOptions(l2), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
|
|
19493
19558
|
};
|
|
19494
19559
|
f$1.getDefaults = A;
|
|
19495
19560
|
f$1.defaults = T;
|
|
19496
|
-
function
|
|
19497
|
-
return M.use(...
|
|
19561
|
+
function bt(...l2) {
|
|
19562
|
+
return M.use(...l2), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
|
|
19498
19563
|
}
|
|
19499
|
-
f$1.use =
|
|
19500
|
-
f$1.walkTokens = function(
|
|
19501
|
-
return M.walkTokens(
|
|
19564
|
+
f$1.use = bt;
|
|
19565
|
+
f$1.walkTokens = function(l2, e2) {
|
|
19566
|
+
return M.walkTokens(l2, e2);
|
|
19502
19567
|
};
|
|
19503
19568
|
f$1.parseInline = M.parseInline;
|
|
19504
19569
|
f$1.Parser = b$1;
|
|
@@ -22203,34 +22268,36 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22203
22268
|
]),
|
|
22204
22269
|
_: 1
|
|
22205
22270
|
}, 8, ["aria-label"])) : createCommentVNode("", true),
|
|
22206
|
-
|
|
22207
|
-
|
|
22208
|
-
|
|
22209
|
-
|
|
22210
|
-
|
|
22211
|
-
|
|
22212
|
-
|
|
22213
|
-
|
|
22214
|
-
|
|
22215
|
-
|
|
22216
|
-
|
|
22217
|
-
|
|
22218
|
-
|
|
22219
|
-
|
|
22220
|
-
|
|
22221
|
-
|
|
22222
|
-
|
|
22223
|
-
|
|
22224
|
-
|
|
22225
|
-
|
|
22226
|
-
|
|
22227
|
-
|
|
22228
|
-
|
|
22229
|
-
|
|
22230
|
-
|
|
22231
|
-
|
|
22232
|
-
|
|
22233
|
-
|
|
22271
|
+
props.canUndo || props.canRedo ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
22272
|
+
createVNode(unref(Button), {
|
|
22273
|
+
variant: "secondary",
|
|
22274
|
+
"aria-label": unref(t2)("header.undo"),
|
|
22275
|
+
disabled: !props.canUndo,
|
|
22276
|
+
onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("undo"))
|
|
22277
|
+
}, {
|
|
22278
|
+
icon: withCtx(() => [
|
|
22279
|
+
createVNode(unref(EditorIcon), {
|
|
22280
|
+
name: "undo",
|
|
22281
|
+
size: 16
|
|
22282
|
+
})
|
|
22283
|
+
]),
|
|
22284
|
+
_: 1
|
|
22285
|
+
}, 8, ["aria-label", "disabled"]),
|
|
22286
|
+
createVNode(unref(Button), {
|
|
22287
|
+
variant: "secondary",
|
|
22288
|
+
"aria-label": unref(t2)("header.redo"),
|
|
22289
|
+
disabled: !props.canRedo,
|
|
22290
|
+
onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("redo"))
|
|
22291
|
+
}, {
|
|
22292
|
+
icon: withCtx(() => [
|
|
22293
|
+
createVNode(unref(EditorIcon), {
|
|
22294
|
+
name: "redo",
|
|
22295
|
+
size: 16
|
|
22296
|
+
})
|
|
22297
|
+
]),
|
|
22298
|
+
_: 1
|
|
22299
|
+
}, 8, ["aria-label", "disabled"])
|
|
22300
|
+
], 64)) : createCommentVNode("", true),
|
|
22234
22301
|
createVNode(unref(Button), {
|
|
22235
22302
|
variant: "primary",
|
|
22236
22303
|
"aria-label": unref(t2)("header.ask"),
|
|
@@ -22253,8 +22320,8 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22253
22320
|
};
|
|
22254
22321
|
}
|
|
22255
22322
|
});
|
|
22256
|
-
const _style_0$p = '\n.editor-header[data-v-
|
|
22257
|
-
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-
|
|
22323
|
+
const _style_0$p = '\n.editor-header[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-md);\n padding: var(--spacing-sm) var(--spacing-lg);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.header-main[data-v-491cf8ab] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n}\n.document-meta[data-v-491cf8ab] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.document-meta__part[data-v-491cf8ab] {\n text-box: cap alphabetic;\n}\n.document-meta__part + .document-meta__part[data-v-491cf8ab]::before {\n content: "·";\n margin-right: var(--spacing-xs);\n}\n.header-right[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n flex-shrink: 0;\n}\n@media (max-width: 767px) {\n.editor-header[data-v-491cf8ab] {\n padding: var(--spacing-xs) var(--spacing-md);\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-base);\n}\n}\n';
|
|
22324
|
+
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-491cf8ab"]]);
|
|
22258
22325
|
const TRANSCRIPTION_TAB = "__transcription__";
|
|
22259
22326
|
const VERBATIM_TAB = "__verbatim__";
|
|
22260
22327
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
@@ -25824,7 +25891,7 @@ section.turn:has([data-state="open"]) {
|
|
|
25824
25891
|
i2 && (i2(), i2 = void 0), s2.forEach(((t3) => t3()));
|
|
25825
25892
|
};
|
|
25826
25893
|
}
|
|
25827
|
-
class
|
|
25894
|
+
let d$1 = class d extends e$1 {
|
|
25828
25895
|
get isPlayingSignal() {
|
|
25829
25896
|
return this._isPlaying;
|
|
25830
25897
|
}
|
|
@@ -25955,8 +26022,8 @@ section.turn:has([data-state="open"]) {
|
|
|
25955
26022
|
setSinkId(t2) {
|
|
25956
26023
|
return this.media.setSinkId(t2);
|
|
25957
26024
|
}
|
|
25958
|
-
}
|
|
25959
|
-
function
|
|
26025
|
+
};
|
|
26026
|
+
function u({ maxTop: t2, maxBottom: e2, halfHeight: i2, vScale: n2, barMinHeight: s2 = 0, barAlign: r2 }) {
|
|
25960
26027
|
let o2 = Math.round(t2 * i2 * n2);
|
|
25961
26028
|
let a2 = o2 + Math.round(e2 * i2 * n2) || 1;
|
|
25962
26029
|
return a2 < s2 && (a2 = s2, r2 || (o2 = a2 / 2)), { topHeight: o2, totalHeight: a2 };
|
|
@@ -26049,16 +26116,16 @@ section.turn:has([data-state="open"]) {
|
|
|
26049
26116
|
if (o2.has(e3.pointerId)) return;
|
|
26050
26117
|
if (o2.set(e3.pointerId, e3), o2.size > 1) return;
|
|
26051
26118
|
const l2 = e3.pointerId;
|
|
26052
|
-
let c3 = e3.clientX,
|
|
26119
|
+
let c3 = e3.clientX, d2 = e3.clientY, u2 = false;
|
|
26053
26120
|
const p2 = Date.now(), m2 = t3.getBoundingClientRect(), { left: g2, top: f2 } = m2, v2 = (t4) => {
|
|
26054
26121
|
if (t4.pointerId !== l2) return;
|
|
26055
26122
|
if (t4.defaultPrevented || o2.size > 1) return;
|
|
26056
26123
|
if (a2 && Date.now() - p2 < s2) return;
|
|
26057
|
-
const e4 = t4.clientX, n3 = t4.clientY, h3 = e4 - c3, m3 = n3 -
|
|
26058
|
-
(
|
|
26124
|
+
const e4 = t4.clientX, n3 = t4.clientY, h3 = e4 - c3, m3 = n3 - d2;
|
|
26125
|
+
(u2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), u2 || (r2.set({ type: "start", x: c3 - g2, y: d2 - f2 }), u2 = true), r2.set({ type: "move", x: e4 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e4, d2 = n3);
|
|
26059
26126
|
}, b2 = (t4) => {
|
|
26060
26127
|
if (o2.delete(t4.pointerId)) {
|
|
26061
|
-
if (t4.pointerId === l2 &&
|
|
26128
|
+
if (t4.pointerId === l2 && u2) {
|
|
26062
26129
|
const e4 = t4.clientX, i3 = t4.clientY;
|
|
26063
26130
|
r2.set({ type: "end", x: e4 - g2, y: i3 - f2 });
|
|
26064
26131
|
}
|
|
@@ -26067,9 +26134,9 @@ section.turn:has([data-state="open"]) {
|
|
|
26067
26134
|
}, y2 = (t4) => {
|
|
26068
26135
|
t4.relatedTarget && t4.relatedTarget !== document.documentElement || b2(t4);
|
|
26069
26136
|
}, C2 = (t4) => {
|
|
26070
|
-
|
|
26137
|
+
u2 && (t4.stopPropagation(), t4.preventDefault());
|
|
26071
26138
|
}, S2 = (t4) => {
|
|
26072
|
-
t4.defaultPrevented || o2.size > 1 ||
|
|
26139
|
+
t4.defaultPrevented || o2.size > 1 || u2 && t4.preventDefault();
|
|
26073
26140
|
};
|
|
26074
26141
|
document.addEventListener("pointermove", v2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", y2), document.addEventListener("pointercancel", y2), document.addEventListener("touchmove", S2, { passive: false }), document.addEventListener("click", C2, { capture: true }), h2 = () => {
|
|
26075
26142
|
document.removeEventListener("pointermove", v2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", y2), document.removeEventListener("pointercancel", y2), document.removeEventListener("touchmove", S2), setTimeout((() => {
|
|
@@ -26242,23 +26309,23 @@ section.turn:has([data-state="open"]) {
|
|
|
26242
26309
|
var t2;
|
|
26243
26310
|
}
|
|
26244
26311
|
renderBarWaveform(t2, e2, i2, n2) {
|
|
26245
|
-
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l2, barIndexScale: h2, barSpacing: c2, barMinHeight:
|
|
26312
|
+
const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l2, barIndexScale: h2, barSpacing: c2, barMinHeight: d2 } = (function({ width: t3, height: e3, length: i3, options: n3, pixelRatio: s3 }) {
|
|
26246
26313
|
const r3 = e3 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l3 = o3 + a3 || 1;
|
|
26247
26314
|
return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l3 / i3 : 0, barSpacing: l3 };
|
|
26248
26315
|
})({ width: s2, height: r2, length: (t2[0] || []).length, options: e2, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e3, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l3 }) {
|
|
26249
|
-
const h3 = t3[0] || [], c3 = t3[1] || h3,
|
|
26316
|
+
const h3 = t3[0] || [], c3 = t3[1] || h3, d3 = h3.length, m3 = [];
|
|
26250
26317
|
let g2 = 0, f2 = 0, v2 = 0;
|
|
26251
|
-
for (let t4 = 0; t4 <=
|
|
26252
|
-
const
|
|
26253
|
-
if (
|
|
26254
|
-
const { topHeight: t5, totalHeight: e4 } =
|
|
26255
|
-
m3.push({ x: g2 * i3, y: h4, width: n3, height: e4 }), g2 =
|
|
26318
|
+
for (let t4 = 0; t4 <= d3; t4++) {
|
|
26319
|
+
const d4 = Math.round(t4 * e3);
|
|
26320
|
+
if (d4 > g2) {
|
|
26321
|
+
const { topHeight: t5, totalHeight: e4 } = u({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l3, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e4, canvasHeight: o3 });
|
|
26322
|
+
m3.push({ x: g2 * i3, y: h4, width: n3, height: e4 }), g2 = d4, f2 = 0, v2 = 0;
|
|
26256
26323
|
}
|
|
26257
26324
|
const b2 = Math.abs(h3[t4] || 0), y2 = Math.abs(c3[t4] || 0);
|
|
26258
26325
|
b2 > f2 && (f2 = b2), y2 > v2 && (v2 = y2);
|
|
26259
26326
|
}
|
|
26260
26327
|
return m3;
|
|
26261
|
-
})({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e2.barAlign, barMinHeight:
|
|
26328
|
+
})({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e2.barAlign, barMinHeight: d2 });
|
|
26262
26329
|
i2.beginPath();
|
|
26263
26330
|
for (const t3 of m2) l2 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l2) : i2.rect(t3.x, t3.y, t3.width, t3.height);
|
|
26264
26331
|
i2.fill(), i2.closePath();
|
|
@@ -26268,15 +26335,15 @@ section.turn:has([data-state="open"]) {
|
|
|
26268
26335
|
const s3 = i3 / 2, r3 = t3[0] || [];
|
|
26269
26336
|
return [r3, t3[1] || r3].map(((t4, i4) => {
|
|
26270
26337
|
const r4 = t4.length, o3 = r4 ? e3 / r4 : 0, a2 = s3, l2 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
|
|
26271
|
-
let c2 = 0,
|
|
26338
|
+
let c2 = 0, d2 = 0;
|
|
26272
26339
|
for (let e4 = 0; e4 <= r4; e4++) {
|
|
26273
26340
|
const i5 = Math.round(e4 * o3);
|
|
26274
26341
|
if (i5 > c2) {
|
|
26275
|
-
const t5 = a2 + (Math.round(
|
|
26276
|
-
h2.push({ x: c2, y: t5 }), c2 = i5,
|
|
26342
|
+
const t5 = a2 + (Math.round(d2 * s3 * n3) || 1) * l2;
|
|
26343
|
+
h2.push({ x: c2, y: t5 }), c2 = i5, d2 = 0;
|
|
26277
26344
|
}
|
|
26278
26345
|
const r5 = Math.abs(t4[e4] || 0);
|
|
26279
|
-
r5 >
|
|
26346
|
+
r5 > d2 && (d2 = r5);
|
|
26280
26347
|
}
|
|
26281
26348
|
return h2.push({ x: c2, y: a2 }), h2;
|
|
26282
26349
|
}));
|
|
@@ -26323,29 +26390,29 @@ section.turn:has([data-state="open"]) {
|
|
|
26323
26390
|
})({ clientWidth: a2, totalWidth: l2, options: e2 });
|
|
26324
26391
|
let c2 = {};
|
|
26325
26392
|
if (0 === h2) return;
|
|
26326
|
-
const
|
|
26327
|
-
if (i3 < 0 || i3 >=
|
|
26393
|
+
const d2 = (i3) => {
|
|
26394
|
+
if (i3 < 0 || i3 >= u2) return;
|
|
26328
26395
|
if (c2[i3]) return;
|
|
26329
26396
|
c2[i3] = true;
|
|
26330
26397
|
const o3 = i3 * h2;
|
|
26331
26398
|
let a3 = Math.min(l2 - o3, h2);
|
|
26332
26399
|
if (a3 = f(a3, e2), a3 <= 0) return;
|
|
26333
|
-
const
|
|
26400
|
+
const d3 = (function({ channelData: t3, offset: e3, clampedWidth: i4, totalWidth: n3 }) {
|
|
26334
26401
|
return t3.map(((t4) => {
|
|
26335
26402
|
const s3 = Math.floor(e3 / n3 * t4.length), r3 = Math.floor((e3 + i4) / n3 * t4.length);
|
|
26336
26403
|
return t4.slice(s3, r3);
|
|
26337
26404
|
}));
|
|
26338
26405
|
})({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l2 });
|
|
26339
|
-
this.renderSingleCanvas(
|
|
26340
|
-
},
|
|
26406
|
+
this.renderSingleCanvas(d3, e2, a3, n2, o3, s2, r2);
|
|
26407
|
+
}, u2 = Math.ceil(l2 / h2);
|
|
26341
26408
|
if (!this.isScrollable) {
|
|
26342
|
-
for (let t3 = 0; t3 <
|
|
26409
|
+
for (let t3 = 0; t3 < u2; t3++) d2(t3);
|
|
26343
26410
|
return;
|
|
26344
26411
|
}
|
|
26345
|
-
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l2, numCanvases:
|
|
26412
|
+
if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l2, numCanvases: u2 }).forEach(((t3) => d2(t3))), u2 > 1) {
|
|
26346
26413
|
const t3 = this.on("scroll", (() => {
|
|
26347
26414
|
const { scrollLeft: t4 } = this.scrollContainer;
|
|
26348
|
-
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l2, numCanvases:
|
|
26415
|
+
Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l2, numCanvases: u2 }).forEach(((t5) => d2(t5)));
|
|
26349
26416
|
}));
|
|
26350
26417
|
this.unsubscribeOnScroll.push(t3);
|
|
26351
26418
|
}
|
|
@@ -26608,7 +26675,7 @@ section.turn:has([data-state="open"]) {
|
|
|
26608
26675
|
}
|
|
26609
26676
|
}
|
|
26610
26677
|
const P = { waveColor: "#999", progressColor: "#555", cursorWidth: 1, minPxPerSec: 0, fillParent: true, interact: true, dragToSeek: false, autoScroll: true, autoCenter: true, sampleRate: 8e3 };
|
|
26611
|
-
class w extends
|
|
26678
|
+
class w extends d$1 {
|
|
26612
26679
|
static create(t2) {
|
|
26613
26680
|
return new w(t2);
|
|
26614
26681
|
}
|
|
@@ -26620,19 +26687,19 @@ section.turn:has([data-state="open"]) {
|
|
|
26620
26687
|
}
|
|
26621
26688
|
constructor(t2) {
|
|
26622
26689
|
const e2 = t2.media || ("WebAudio" === t2.backend ? new E() : void 0);
|
|
26623
|
-
super({ media: e2, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.
|
|
26690
|
+
super({ media: e2, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.options = Object.assign({}, P, t2);
|
|
26624
26691
|
const { state: i2, actions: n2 } = (function(t3) {
|
|
26625
26692
|
var e3, i3, n3, s3, r3, o2;
|
|
26626
|
-
const a2 = null !== (e3 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e3 ? e3 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0),
|
|
26627
|
-
return { state: { currentTime: a2, duration: c2, isPlaying:
|
|
26693
|
+
const a2 = null !== (e3 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e3 ? e3 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), d2 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), u2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y2 = l$1(0), C2 = h$1((() => !d2.value), [d2]), S2 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S2.value && c2.value > 0), [S2, c2]), P2 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
|
|
26694
|
+
return { state: { currentTime: a2, duration: c2, isPlaying: d2, isPaused: C2, isSeeking: u2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y2, canPlay: S2, isReady: E2, progress: P2, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
|
|
26628
26695
|
const e4 = Math.max(0, Math.min(c2.value || 1 / 0, t4));
|
|
26629
26696
|
a2.set(e4);
|
|
26630
26697
|
}, setDuration: (t4) => {
|
|
26631
26698
|
c2.set(Math.max(0, t4));
|
|
26632
26699
|
}, setPlaying: (t4) => {
|
|
26633
|
-
u2.set(t4);
|
|
26634
|
-
}, setSeeking: (t4) => {
|
|
26635
26700
|
d2.set(t4);
|
|
26701
|
+
}, setSeeking: (t4) => {
|
|
26702
|
+
u2.set(t4);
|
|
26636
26703
|
}, setVolume: (t4) => {
|
|
26637
26704
|
const e4 = Math.max(0, Math.min(1, t4));
|
|
26638
26705
|
p2.set(e4);
|
|
@@ -26653,7 +26720,7 @@ section.turn:has([data-state="open"]) {
|
|
|
26653
26720
|
})({ isPlaying: this.isPlayingSignal, currentTime: this.currentTimeSignal, duration: this.durationSignal, volume: this.volumeSignal, playbackRate: this.playbackRateSignal, isSeeking: this.seekingSignal });
|
|
26654
26721
|
this.wavesurferState = i2, this.wavesurferActions = n2, this.timer = new S();
|
|
26655
26722
|
const s2 = e2 ? void 0 : this.getMediaElement();
|
|
26656
|
-
this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.
|
|
26723
|
+
this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.initPlugins();
|
|
26657
26724
|
const r2 = this.options.url || this.getSrc() || "";
|
|
26658
26725
|
Promise.resolve().then((() => {
|
|
26659
26726
|
this.emit("init");
|
|
@@ -26676,36 +26743,6 @@ section.turn:has([data-state="open"]) {
|
|
|
26676
26743
|
}
|
|
26677
26744
|
})));
|
|
26678
26745
|
}
|
|
26679
|
-
initReactiveState() {
|
|
26680
|
-
this.reactiveCleanups.push((function(t2, e2) {
|
|
26681
|
-
const i2 = [];
|
|
26682
|
-
i2.push(c((() => {
|
|
26683
|
-
const i3 = t2.isPlaying.value;
|
|
26684
|
-
e2.emit(i3 ? "play" : "pause");
|
|
26685
|
-
}), [t2.isPlaying])), i2.push(c((() => {
|
|
26686
|
-
const i3 = t2.currentTime.value;
|
|
26687
|
-
e2.emit("timeupdate", i3), t2.isPlaying.value && e2.emit("audioprocess", i3);
|
|
26688
|
-
}), [t2.currentTime, t2.isPlaying])), i2.push(c((() => {
|
|
26689
|
-
t2.isSeeking.value && e2.emit("seeking", t2.currentTime.value);
|
|
26690
|
-
}), [t2.isSeeking, t2.currentTime]));
|
|
26691
|
-
let n2 = false;
|
|
26692
|
-
i2.push(c((() => {
|
|
26693
|
-
t2.isReady.value && !n2 && (n2 = true, e2.emit("ready", t2.duration.value));
|
|
26694
|
-
}), [t2.isReady, t2.duration])), i2.push(c((() => {
|
|
26695
|
-
null === t2.audioBuffer.value && (n2 = false);
|
|
26696
|
-
}), [t2.audioBuffer]));
|
|
26697
|
-
let s2 = false;
|
|
26698
|
-
return i2.push(c((() => {
|
|
26699
|
-
const i3 = t2.isPlaying.value, n3 = t2.currentTime.value, r2 = t2.duration.value, o2 = r2 > 0 && n3 >= r2;
|
|
26700
|
-
s2 && !i3 && o2 && e2.emit("finish"), s2 = i3 && o2;
|
|
26701
|
-
}), [t2.isPlaying, t2.currentTime, t2.duration])), i2.push(c((() => {
|
|
26702
|
-
const i3 = t2.zoom.value;
|
|
26703
|
-
i3 > 0 && e2.emit("zoom", i3);
|
|
26704
|
-
}), [t2.zoom])), () => {
|
|
26705
|
-
i2.forEach(((t3) => t3()));
|
|
26706
|
-
};
|
|
26707
|
-
})(this.wavesurferState, { emit: this.emit.bind(this) }));
|
|
26708
|
-
}
|
|
26709
26746
|
initPlayerEvents() {
|
|
26710
26747
|
this.isPlaying() && (this.emit("play"), this.timer.start()), this.mediaSubscriptions.push(this.onMediaEvent("timeupdate", (() => {
|
|
26711
26748
|
const t2 = this.updateProgress();
|
|
@@ -26925,7 +26962,7 @@ section.turn:has([data-state="open"]) {
|
|
|
26925
26962
|
}
|
|
26926
26963
|
destroy() {
|
|
26927
26964
|
var t2;
|
|
26928
|
-
this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.
|
|
26965
|
+
this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.timer.destroy(), this.renderer.destroy(), super.destroy();
|
|
26929
26966
|
}
|
|
26930
26967
|
}
|
|
26931
26968
|
w.BasePlugin = class extends e$1 {
|
|
@@ -31034,11 +31071,11 @@ section.turn:has([data-state="open"]) {
|
|
|
31034
31071
|
}
|
|
31035
31072
|
var patterns = grammar[token];
|
|
31036
31073
|
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
31037
|
-
for (var
|
|
31038
|
-
if (rematch && rematch.cause == token + "," +
|
|
31074
|
+
for (var j = 0; j < patterns.length; ++j) {
|
|
31075
|
+
if (rematch && rematch.cause == token + "," + j) {
|
|
31039
31076
|
return;
|
|
31040
31077
|
}
|
|
31041
|
-
var patternObj = patterns[
|
|
31078
|
+
var patternObj = patterns[j];
|
|
31042
31079
|
var inside = patternObj.inside;
|
|
31043
31080
|
var lookbehind = !!patternObj.lookbehind;
|
|
31044
31081
|
var greedy = !!patternObj.greedy;
|
|
@@ -31079,9 +31116,9 @@ section.turn:has([data-state="open"]) {
|
|
|
31079
31116
|
if (currentNode.value instanceof Token) {
|
|
31080
31117
|
continue;
|
|
31081
31118
|
}
|
|
31082
|
-
for (var
|
|
31119
|
+
for (var k = currentNode; k !== tokenList.tail && (p2 < to || typeof k.value === "string"); k = k.next) {
|
|
31083
31120
|
removeCount++;
|
|
31084
|
-
p2 +=
|
|
31121
|
+
p2 += k.value.length;
|
|
31085
31122
|
}
|
|
31086
31123
|
removeCount--;
|
|
31087
31124
|
str = text2.slice(pos, p2);
|
|
@@ -31113,7 +31150,7 @@ section.turn:has([data-state="open"]) {
|
|
|
31113
31150
|
}
|
|
31114
31151
|
if (removeCount > 1) {
|
|
31115
31152
|
var nestedRematch = {
|
|
31116
|
-
cause: token + "," +
|
|
31153
|
+
cause: token + "," + j,
|
|
31117
31154
|
reach
|
|
31118
31155
|
};
|
|
31119
31156
|
matchGrammar(text2, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|