@linto-ai/transcript-ui-webcomponent 0.9.22 → 0.9.23-unstable.202609181617
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-BOTcN5V7.js → highlight-BL5JP0oD.js} +2 -2
- package/dist/{highlight-BOTcN5V7.js.map → highlight-BL5JP0oD.js.map} +1 -1
- package/dist/{index-DhBFBHeE.js → index-FoYxoCOv.js} +750 -590
- package/dist/index-FoYxoCOv.js.map +1 -0
- package/dist/linto-editor.iife.js +626 -466
- package/dist/linto-editor.iife.js.map +1 -1
- package/dist/linto-editor.js +1 -1
- package/package.json +10 -10
- package/dist/index-DhBFBHeE.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);
|
|
@@ -10682,9 +10717,9 @@ pre[class*="language-"] {
|
|
|
10682
10717
|
class: "form-field__required",
|
|
10683
10718
|
"aria-hidden": "true"
|
|
10684
10719
|
};
|
|
10685
|
-
const _hoisted_4$
|
|
10686
|
-
const _hoisted_5$
|
|
10687
|
-
const _hoisted_6$
|
|
10720
|
+
const _hoisted_4$e = { class: "form-field__input-wrapper" };
|
|
10721
|
+
const _hoisted_5$c = ["id", "disabled", "required", "aria-required", "aria-invalid", "aria-describedby"];
|
|
10722
|
+
const _hoisted_6$b = ["value"];
|
|
10688
10723
|
const _hoisted_7$5 = ["type", "id", "disabled", "readonly", "placeholder", "autocomplete", "required", "aria-required", "aria-invalid", "aria-describedby"];
|
|
10689
10724
|
const _hoisted_8$3 = {
|
|
10690
10725
|
key: 3,
|
|
@@ -10696,7 +10731,7 @@ pre[class*="language-"] {
|
|
|
10696
10731
|
"aria-hidden": "true"
|
|
10697
10732
|
};
|
|
10698
10733
|
const _hoisted_10$3 = ["id"];
|
|
10699
|
-
const _hoisted_11$
|
|
10734
|
+
const _hoisted_11$1 = { class: "form-field__error" };
|
|
10700
10735
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
10701
10736
|
__name: "FormInput",
|
|
10702
10737
|
props: {
|
|
@@ -10817,7 +10852,7 @@ pre[class*="language-"] {
|
|
|
10817
10852
|
], 8, _hoisted_2$t),
|
|
10818
10853
|
renderSlot(_ctx.$slots, "content-after-label", {}, void 0, true)
|
|
10819
10854
|
])) : createCommentVNode("", true),
|
|
10820
|
-
createBaseVNode("div", _hoisted_4$
|
|
10855
|
+
createBaseVNode("div", _hoisted_4$e, [
|
|
10821
10856
|
renderSlot(_ctx.$slots, "default", {}, void 0, true),
|
|
10822
10857
|
_ctx.$slots["custom-input"] ? renderSlot(_ctx.$slots, "custom-input", {
|
|
10823
10858
|
id: id.value,
|
|
@@ -10843,9 +10878,9 @@ pre[class*="language-"] {
|
|
|
10843
10878
|
return openBlock(), createElementBlock("option", {
|
|
10844
10879
|
key: opt.value,
|
|
10845
10880
|
value: opt.value
|
|
10846
|
-
}, toDisplayString(opt.label), 9, _hoisted_6$
|
|
10881
|
+
}, toDisplayString(opt.label), 9, _hoisted_6$b);
|
|
10847
10882
|
}), 128))
|
|
10848
|
-
], 16, _hoisted_5$
|
|
10883
|
+
], 16, _hoisted_5$c)), [
|
|
10849
10884
|
[vModelSelect, draft.value]
|
|
10850
10885
|
]) : withDirectives((openBlock(), createElementBlock("input", mergeProps({
|
|
10851
10886
|
key: 2,
|
|
@@ -10898,7 +10933,7 @@ pre[class*="language-"] {
|
|
|
10898
10933
|
id: `${id.value}-error`,
|
|
10899
10934
|
class: "form-field__info"
|
|
10900
10935
|
}, [
|
|
10901
|
-
createBaseVNode("span", _hoisted_11$
|
|
10936
|
+
createBaseVNode("span", _hoisted_11$1, toDisplayString(errorMessage.value), 1)
|
|
10902
10937
|
], 8, _hoisted_10$3)) : createCommentVNode("", true)
|
|
10903
10938
|
], 2);
|
|
10904
10939
|
};
|
|
@@ -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;
|
|
@@ -21514,8 +21579,8 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21514
21579
|
};
|
|
21515
21580
|
}
|
|
21516
21581
|
});
|
|
21517
|
-
const _style_0$y = "\n.markdown-editor[data-v-
|
|
21518
|
-
const MarkdownEditor = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["styles", [_style_0$y]], ["__scopeId", "data-v-
|
|
21582
|
+
const _style_0$y = "\n.markdown-editor[data-v-d9e8bd29] {\n display: flex;\n flex-direction: column;\n font-family: var(--font-family);\n font-size: var(--font-size-base);\n line-height: var(--line-height);\n color: var(--color-text-primary);\n}\n.markdown-editor__toolbar[data-v-d9e8bd29] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n padding: var(--spacing-xs) var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n position: sticky;\n top: var(--document-toolbar-height, 49px);\n z-index: 1;\n}\n.markdown-editor__separator[data-v-d9e8bd29] {\n width: 1px;\n height: 20px;\n background-color: var(--color-border);\n margin: 0 var(--spacing-xs);\n}\n.markdown-editor__content[data-v-d9e8bd29] {\n padding: 4rem clamp(1.5rem, 6rem, 8%);\n outline: none;\n min-height: 200px;\n}\n.markdown-editor__content[data-v-d9e8bd29] > *:first-child {\n margin-top: 0;\n}\n.markdown-editor__content[data-v-d9e8bd29] h1,\n.markdown-editor__content[data-v-d9e8bd29] h2,\n.markdown-editor__content[data-v-d9e8bd29] h3,\n.markdown-editor__content[data-v-d9e8bd29] h4 {\n margin: var(--spacing-lg) 0 var(--spacing-sm);\n font-weight: 700;\n color: var(--color-text-primary);\n}\n.markdown-editor__content[data-v-d9e8bd29] h1 {\n font-size: var(--font-size-xl);\n}\n.markdown-editor__content[data-v-d9e8bd29] h2 {\n font-size: var(--font-size-lg);\n}\n.markdown-editor__content[data-v-d9e8bd29] h3 {\n font-size: var(--font-size-base);\n}\n.markdown-editor__content[data-v-d9e8bd29] h4 {\n font-size: var(--font-size-sm);\n text-transform: uppercase;\n letter-spacing: 0.05em;\n color: var(--color-text-secondary);\n}\n.markdown-editor__content[data-v-d9e8bd29] p {\n margin: 0 0 var(--spacing-md);\n}\n.markdown-editor__content[data-v-d9e8bd29] ul,\n.markdown-editor__content[data-v-d9e8bd29] ol {\n margin: 0 0 var(--spacing-md);\n padding-left: var(--spacing-lg);\n}\n.markdown-editor__content[data-v-d9e8bd29] li {\n margin: var(--spacing-xs) 0;\n}\n.markdown-editor__content[data-v-d9e8bd29] blockquote {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-sm) var(--spacing-md);\n border-left: 3px solid var(--color-border);\n color: var(--color-text-secondary);\n font-style: italic;\n}\n.markdown-editor__content[data-v-d9e8bd29] code {\n font-family: var(--font-family-mono);\n font-size: 0.9em;\n padding: 1px 4px;\n background-color: var(--color-surface);\n border-radius: var(--radius-sm);\n}\n.markdown-editor__content[data-v-d9e8bd29] pre {\n margin: var(--spacing-md) 0;\n padding: var(--spacing-md);\n background-color: var(--color-surface);\n border-radius: var(--radius-md);\n overflow-x: auto;\n}\n.markdown-editor__content[data-v-d9e8bd29] pre code {\n padding: 0;\n background: none;\n}\n.markdown-editor__content[data-v-d9e8bd29] a {\n color: var(--color-primary);\n text-decoration: underline;\n}\n.markdown-editor__content[data-v-d9e8bd29] hr {\n border: 0;\n border-top: 1px solid var(--color-border);\n margin: var(--spacing-lg) 0;\n}\n.markdown-editor__content[data-v-d9e8bd29] strong {\n font-weight: 700;\n}\n.markdown-editor__content[data-v-d9e8bd29] table {\n border-collapse: collapse;\n margin: var(--spacing-md) 0;\n}\n.markdown-editor__content[data-v-d9e8bd29] th,\n.markdown-editor__content[data-v-d9e8bd29] td {\n border: 1px solid var(--color-border);\n padding: var(--spacing-xs) var(--spacing-sm);\n}\n.markdown-editor__content[data-v-d9e8bd29] th {\n background-color: var(--color-surface);\n font-weight: 600;\n}\n";
|
|
21583
|
+
const MarkdownEditor = /* @__PURE__ */ _export_sfc(_sfc_main$G, [["styles", [_style_0$y]], ["__scopeId", "data-v-d9e8bd29"]]);
|
|
21519
21584
|
const _hoisted_1$z = { class: "markdown-view" };
|
|
21520
21585
|
const _hoisted_2$r = ["innerHTML"];
|
|
21521
21586
|
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
@@ -21650,11 +21715,11 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21650
21715
|
class: "selectable-list-item__leading"
|
|
21651
21716
|
};
|
|
21652
21717
|
const _hoisted_3$j = { class: "selectable-list-item__label" };
|
|
21653
|
-
const _hoisted_4$
|
|
21718
|
+
const _hoisted_4$d = {
|
|
21654
21719
|
key: 1,
|
|
21655
21720
|
class: "selectable-list-item__trailing"
|
|
21656
21721
|
};
|
|
21657
|
-
const _hoisted_5$
|
|
21722
|
+
const _hoisted_5$b = {
|
|
21658
21723
|
key: 0,
|
|
21659
21724
|
class: "selectable-list-item__actions"
|
|
21660
21725
|
};
|
|
@@ -21691,11 +21756,11 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21691
21756
|
createTextVNode(toDisplayString(__props.label), 1)
|
|
21692
21757
|
], true)
|
|
21693
21758
|
]),
|
|
21694
|
-
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$
|
|
21759
|
+
_ctx.$slots.trailing ? (openBlock(), createElementBlock("span", _hoisted_4$d, [
|
|
21695
21760
|
renderSlot(_ctx.$slots, "trailing", {}, void 0, true)
|
|
21696
21761
|
])) : createCommentVNode("", true)
|
|
21697
21762
|
], 8, _hoisted_1$x),
|
|
21698
|
-
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
21763
|
+
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_5$b, [
|
|
21699
21764
|
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
21700
21765
|
])) : createCommentVNode("", true)
|
|
21701
21766
|
], 2);
|
|
@@ -21783,32 +21848,27 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21783
21848
|
const _style_0$t = "\n.user-avatar[data-v-977a8d17] {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n background-color: var(--color-primary);\n color: var(--color-white);\n font-size: var(--font-size-xs);\n font-weight: 600;\n user-select: none;\n cursor: default;\n}\n";
|
|
21784
21849
|
const UserAvatar = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["styles", [_style_0$t]], ["__scopeId", "data-v-977a8d17"]]);
|
|
21785
21850
|
const _hoisted_1$u = ["data-status"];
|
|
21786
|
-
const _hoisted_2$n = {
|
|
21787
|
-
|
|
21788
|
-
|
|
21789
|
-
|
|
21790
|
-
|
|
21791
|
-
const _hoisted_3$h = { class: "document-article__toolbar-left" };
|
|
21792
|
-
const _hoisted_4$a = { class: "document-article__toolbar-center" };
|
|
21793
|
-
const _hoisted_5$9 = { class: "document-article__toolbar-right" };
|
|
21794
|
-
const _hoisted_6$9 = { class: "document-article__body" };
|
|
21795
|
-
const _hoisted_7$4 = {
|
|
21851
|
+
const _hoisted_2$n = { class: "document-article__toolbar-left" };
|
|
21852
|
+
const _hoisted_3$h = { class: "document-article__toolbar-center" };
|
|
21853
|
+
const _hoisted_4$c = { class: "document-article__toolbar-right" };
|
|
21854
|
+
const _hoisted_5$a = { class: "document-article__body" };
|
|
21855
|
+
const _hoisted_6$a = {
|
|
21796
21856
|
key: 0,
|
|
21797
21857
|
class: "document-article__center document-article__center--processing",
|
|
21798
21858
|
role: "status",
|
|
21799
21859
|
"aria-live": "polite"
|
|
21800
21860
|
};
|
|
21801
|
-
const
|
|
21802
|
-
const
|
|
21861
|
+
const _hoisted_7$4 = ["value"];
|
|
21862
|
+
const _hoisted_8$2 = {
|
|
21803
21863
|
key: 0,
|
|
21804
21864
|
class: "document-article__progress-value"
|
|
21805
21865
|
};
|
|
21806
|
-
const
|
|
21866
|
+
const _hoisted_9$2 = {
|
|
21807
21867
|
key: 1,
|
|
21808
21868
|
class: "document-article__center document-article__center--error",
|
|
21809
21869
|
role: "alert"
|
|
21810
21870
|
};
|
|
21811
|
-
const
|
|
21871
|
+
const _hoisted_10$2 = { class: "document-article__error-text" };
|
|
21812
21872
|
const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
21813
21873
|
__name: "DocumentArticle",
|
|
21814
21874
|
props: {
|
|
@@ -21824,6 +21884,22 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21824
21884
|
const errorText = computed(
|
|
21825
21885
|
() => props.errorMessage || t2("llmService.errorTemporary")
|
|
21826
21886
|
);
|
|
21887
|
+
const articleEl = /* @__PURE__ */ ref(null);
|
|
21888
|
+
const toolbarEl = /* @__PURE__ */ ref(null);
|
|
21889
|
+
let toolbarObserver = null;
|
|
21890
|
+
function publishToolbarHeight() {
|
|
21891
|
+
const height = toolbarEl.value?.offsetHeight ?? 0;
|
|
21892
|
+
articleEl.value?.style.setProperty("--document-toolbar-height", `${height}px`);
|
|
21893
|
+
}
|
|
21894
|
+
onMounted(() => {
|
|
21895
|
+
publishToolbarHeight();
|
|
21896
|
+
if (typeof ResizeObserver === "undefined" || !toolbarEl.value) return;
|
|
21897
|
+
toolbarObserver = new ResizeObserver(publishToolbarHeight);
|
|
21898
|
+
toolbarObserver.observe(toolbarEl.value);
|
|
21899
|
+
});
|
|
21900
|
+
onBeforeUnmount(() => {
|
|
21901
|
+
toolbarObserver?.disconnect();
|
|
21902
|
+
});
|
|
21827
21903
|
const progressValue = computed(() => {
|
|
21828
21904
|
const v2 = props.progress;
|
|
21829
21905
|
if (v2 == null || !Number.isFinite(v2)) return null;
|
|
@@ -21831,22 +21907,30 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21831
21907
|
});
|
|
21832
21908
|
return (_ctx, _cache) => {
|
|
21833
21909
|
return openBlock(), createElementBlock("article", {
|
|
21910
|
+
ref_key: "articleEl",
|
|
21911
|
+
ref: articleEl,
|
|
21834
21912
|
class: "document-article",
|
|
21835
21913
|
"data-status": props.status
|
|
21836
21914
|
}, [
|
|
21837
|
-
_ctx.$slots["toolbar-left"] || _ctx.$slots["toolbar-center"] || _ctx.$slots["toolbar-right"] ? (openBlock(), createElementBlock("div",
|
|
21838
|
-
|
|
21915
|
+
_ctx.$slots["toolbar-left"] || _ctx.$slots["toolbar-center"] || _ctx.$slots["toolbar-right"] ? (openBlock(), createElementBlock("div", {
|
|
21916
|
+
key: 0,
|
|
21917
|
+
ref_key: "toolbarEl",
|
|
21918
|
+
ref: toolbarEl,
|
|
21919
|
+
class: "document-article__toolbar",
|
|
21920
|
+
role: "toolbar"
|
|
21921
|
+
}, [
|
|
21922
|
+
createBaseVNode("div", _hoisted_2$n, [
|
|
21839
21923
|
renderSlot(_ctx.$slots, "toolbar-left", {}, void 0, true)
|
|
21840
21924
|
]),
|
|
21841
|
-
createBaseVNode("div",
|
|
21925
|
+
createBaseVNode("div", _hoisted_3$h, [
|
|
21842
21926
|
renderSlot(_ctx.$slots, "toolbar-center", {}, void 0, true)
|
|
21843
21927
|
]),
|
|
21844
|
-
createBaseVNode("div",
|
|
21928
|
+
createBaseVNode("div", _hoisted_4$c, [
|
|
21845
21929
|
renderSlot(_ctx.$slots, "toolbar-right", {}, void 0, true)
|
|
21846
21930
|
])
|
|
21847
|
-
])) : createCommentVNode("", true),
|
|
21848
|
-
createBaseVNode("div",
|
|
21849
|
-
props.status === "processing" ? (openBlock(), createElementBlock("div",
|
|
21931
|
+
], 512)) : createCommentVNode("", true),
|
|
21932
|
+
createBaseVNode("div", _hoisted_5$a, [
|
|
21933
|
+
props.status === "processing" ? (openBlock(), createElementBlock("div", _hoisted_6$a, [
|
|
21850
21934
|
createVNode(EditorIcon, {
|
|
21851
21935
|
name: "spinner",
|
|
21852
21936
|
spin: "",
|
|
@@ -21856,10 +21940,10 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21856
21940
|
class: "document-article__progress",
|
|
21857
21941
|
max: 100,
|
|
21858
21942
|
value: progressValue.value ?? void 0
|
|
21859
|
-
}, null, 8,
|
|
21860
|
-
progressValue.value !== null ? (openBlock(), createElementBlock("span",
|
|
21861
|
-
])) : props.status === "error" ? (openBlock(), createElementBlock("div",
|
|
21862
|
-
createBaseVNode("p",
|
|
21943
|
+
}, null, 8, _hoisted_7$4),
|
|
21944
|
+
progressValue.value !== null ? (openBlock(), createElementBlock("span", _hoisted_8$2, toDisplayString(progressValue.value) + "% ", 1)) : createCommentVNode("", true)
|
|
21945
|
+
])) : props.status === "error" ? (openBlock(), createElementBlock("div", _hoisted_9$2, [
|
|
21946
|
+
createBaseVNode("p", _hoisted_10$2, toDisplayString(errorText.value), 1),
|
|
21863
21947
|
createVNode(Button, {
|
|
21864
21948
|
variant: "primary",
|
|
21865
21949
|
icon: "refresh-cw",
|
|
@@ -21876,8 +21960,8 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21876
21960
|
};
|
|
21877
21961
|
}
|
|
21878
21962
|
});
|
|
21879
|
-
const _style_0$s = "\n.document-article[data-v-
|
|
21880
|
-
const DocumentArticle = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["styles", [_style_0$s]], ["__scopeId", "data-v-
|
|
21963
|
+
const _style_0$s = "\n.document-article[data-v-54a8890c] {\n width: min(1088px, calc(100% - 16px));\n max-width: 1088px;\n margin: var(--spacing-lg) auto;\n background-color: var(--color-surface);\n border: 1px solid var(--color-border);\n border-radius: var(--radius-md);\n display: flex;\n flex-direction: column;\n}\n.document-article__toolbar[data-v-54a8890c] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm) var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n position: sticky;\n top: 0;\n background-color: var(--color-surface);\n border-radius: var(--radius-md) var(--radius-md) 0 0;\n z-index: 1;\n}\n.document-article__toolbar-left[data-v-54a8890c],\n.document-article__toolbar-right[data-v-54a8890c] {\n display: flex;\n align-items: center;\n gap: var(--spacing-xs);\n flex-shrink: 0;\n}\n.document-article__toolbar-center[data-v-54a8890c] {\n flex: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 0;\n}\n.document-article__body[data-v-54a8890c] {\n flex: 1;\n min-height: 0;\n}\n.document-article__center[data-v-54a8890c] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-sm);\n padding: var(--spacing-xl) var(--spacing-md);\n text-align: center;\n}\n.document-article__center--processing[data-v-54a8890c] {\n color: var(--color-primary);\n}\n.document-article__center--error[data-v-54a8890c] {\n color: var(--color-danger, #d33);\n}\n.document-article__progress[data-v-54a8890c] {\n width: min(280px, 100%);\n height: 6px;\n}\n.document-article__progress-value[data-v-54a8890c] {\n font-size: var(--font-size-xs);\n font-variant-numeric: tabular-nums;\n color: var(--color-text-muted);\n}\n\n/* Phone: the status line takes its own row under the buttons, so nothing\n ever needs to scroll sideways. */\n@media (max-width: 767px) {\n.document-article[data-v-54a8890c] {\n width: calc(100% - 16px);\n margin: var(--spacing-sm) auto;\n}\n.document-article__toolbar-center[data-v-54a8890c] {\n order: 3;\n flex-basis: 100%;\n justify-content: flex-start;\n}\n}\n.document-article__error-text[data-v-54a8890c] {\n margin: 0;\n max-width: 480px;\n font-size: var(--font-size-sm);\n line-height: var(--line-height);\n color: var(--color-text-secondary);\n}\n";
|
|
21964
|
+
const DocumentArticle = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["styles", [_style_0$s]], ["__scopeId", "data-v-54a8890c"]]);
|
|
21881
21965
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
21882
21966
|
__name: "DownloadMenu",
|
|
21883
21967
|
props: {
|
|
@@ -21959,17 +22043,31 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21959
22043
|
const _hoisted_1$t = ["aria-label"];
|
|
21960
22044
|
const _hoisted_2$m = ["aria-selected", "aria-disabled", "disabled", "onClick"];
|
|
21961
22045
|
const _hoisted_3$g = { class: "tab__label" };
|
|
22046
|
+
const _hoisted_4$b = ["aria-selected", "aria-label"];
|
|
22047
|
+
const _hoisted_5$9 = { class: "tab__label" };
|
|
22048
|
+
const _hoisted_6$9 = { class: "tab__menu-item" };
|
|
21962
22049
|
const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
21963
22050
|
__name: "Tabs",
|
|
21964
22051
|
props: {
|
|
21965
22052
|
tabs: { type: Array },
|
|
21966
22053
|
modelValue: { type: null },
|
|
21967
|
-
ariaLabel: { type: String }
|
|
22054
|
+
ariaLabel: { type: String },
|
|
22055
|
+
collapseFrom: { type: Number }
|
|
21968
22056
|
},
|
|
21969
22057
|
emits: ["update:modelValue"],
|
|
21970
22058
|
setup(__props, { emit: __emit }) {
|
|
21971
22059
|
const props = __props;
|
|
21972
22060
|
const emit2 = __emit;
|
|
22061
|
+
const { t: t2 } = useI18n();
|
|
22062
|
+
const inlineTabs = computed(
|
|
22063
|
+
() => props.collapseFrom === void 0 ? props.tabs : props.tabs.slice(0, props.collapseFrom)
|
|
22064
|
+
);
|
|
22065
|
+
const collapsedTabs = computed(
|
|
22066
|
+
() => props.collapseFrom === void 0 ? [] : props.tabs.slice(props.collapseFrom)
|
|
22067
|
+
);
|
|
22068
|
+
const activeCollapsedTab = computed(
|
|
22069
|
+
() => collapsedTabs.value.find((tab) => tab.value === props.modelValue) ?? null
|
|
22070
|
+
);
|
|
21973
22071
|
function onSelect(tab) {
|
|
21974
22072
|
if (tab.disabled) return;
|
|
21975
22073
|
if (tab.value === props.modelValue) return;
|
|
@@ -21981,7 +22079,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
21981
22079
|
role: "tablist",
|
|
21982
22080
|
"aria-label": __props.ariaLabel
|
|
21983
22081
|
}, [
|
|
21984
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
22082
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(inlineTabs.value, (tab) => {
|
|
21985
22083
|
return openBlock(), createElementBlock("button", {
|
|
21986
22084
|
key: tab.value,
|
|
21987
22085
|
type: "button",
|
|
@@ -22009,13 +22107,64 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22009
22107
|
_: 2
|
|
22010
22108
|
}, 1024)) : createCommentVNode("", true)
|
|
22011
22109
|
], 10, _hoisted_2$m);
|
|
22012
|
-
}), 128))
|
|
22110
|
+
}), 128)),
|
|
22111
|
+
collapsedTabs.value.length > 0 ? (openBlock(), createBlock(_sfc_main$E, {
|
|
22112
|
+
key: 0,
|
|
22113
|
+
items: collapsedTabs.value,
|
|
22114
|
+
"item-key": (tab) => tab.value,
|
|
22115
|
+
"is-current": (tab) => tab.value === __props.modelValue,
|
|
22116
|
+
align: "end",
|
|
22117
|
+
onSelect
|
|
22118
|
+
}, {
|
|
22119
|
+
trigger: withCtx(() => [
|
|
22120
|
+
createBaseVNode("button", {
|
|
22121
|
+
type: "button",
|
|
22122
|
+
role: "tab",
|
|
22123
|
+
class: normalizeClass(["tab tab--more", { "tab--active": activeCollapsedTab.value !== null }]),
|
|
22124
|
+
"aria-selected": activeCollapsedTab.value !== null,
|
|
22125
|
+
"aria-label": unref(t2)("tabs.moreLabel")
|
|
22126
|
+
}, [
|
|
22127
|
+
createBaseVNode("span", _hoisted_5$9, toDisplayString(activeCollapsedTab.value ? activeCollapsedTab.value.label : unref(t2)("tabs.moreLabel")), 1),
|
|
22128
|
+
activeCollapsedTab.value?.badge ? (openBlock(), createBlock(Badge, {
|
|
22129
|
+
key: 0,
|
|
22130
|
+
class: "tab__badge"
|
|
22131
|
+
}, {
|
|
22132
|
+
default: withCtx(() => [
|
|
22133
|
+
createTextVNode(toDisplayString(activeCollapsedTab.value.badge), 1)
|
|
22134
|
+
]),
|
|
22135
|
+
_: 1
|
|
22136
|
+
})) : createCommentVNode("", true),
|
|
22137
|
+
createVNode(EditorIcon, {
|
|
22138
|
+
name: "chevron-down",
|
|
22139
|
+
size: 14,
|
|
22140
|
+
class: "tab__chevron"
|
|
22141
|
+
})
|
|
22142
|
+
], 10, _hoisted_4$b)
|
|
22143
|
+
]),
|
|
22144
|
+
item: withCtx(({ item }) => [
|
|
22145
|
+
createBaseVNode("span", _hoisted_6$9, [
|
|
22146
|
+
unref(resolveIcon)(item.icon) ? (openBlock(), createBlock(EditorIcon, {
|
|
22147
|
+
key: 0,
|
|
22148
|
+
name: item.icon,
|
|
22149
|
+
size: 16
|
|
22150
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
22151
|
+
createBaseVNode("span", null, toDisplayString(item.label), 1),
|
|
22152
|
+
item.badge ? (openBlock(), createBlock(Badge, { key: 1 }, {
|
|
22153
|
+
default: withCtx(() => [
|
|
22154
|
+
createTextVNode(toDisplayString(item.badge), 1)
|
|
22155
|
+
]),
|
|
22156
|
+
_: 2
|
|
22157
|
+
}, 1024)) : createCommentVNode("", true)
|
|
22158
|
+
])
|
|
22159
|
+
]),
|
|
22160
|
+
_: 1
|
|
22161
|
+
}, 8, ["items", "item-key", "is-current"])) : createCommentVNode("", true)
|
|
22013
22162
|
], 8, _hoisted_1$t);
|
|
22014
22163
|
};
|
|
22015
22164
|
}
|
|
22016
22165
|
});
|
|
22017
|
-
const _style_0$r =
|
|
22018
|
-
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["styles", [_style_0$r]], ["__scopeId", "data-v-
|
|
22166
|
+
const _style_0$r = '\n.tabs[data-v-30747b8d] {\n display: flex;\n align-items: stretch;\n gap: var(--spacing-xs);\n padding: 0 var(--spacing-lg);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n overflow-x: auto;\n scrollbar-width: thin;\n}\n.transcript-ui-root .tab[data-v-30747b8d] {\n all: unset;\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n height: 44px;\n padding: 0 var(--spacing-sm);\n font-family: var(--font-family);\n font-size: var(--font-size-sm);\n font-weight: 500;\n color: var(--color-text-secondary);\n cursor: pointer;\n white-space: nowrap;\n border-bottom: 2px solid transparent;\n transition:\n color var(--transition-duration),\n border-color var(--transition-duration);\n}\n.transcript-ui-root .tab[data-v-30747b8d]:hover:not([disabled]) {\n color: var(--color-text-primary);\n}\n.transcript-ui-root .tab[data-v-30747b8d]:focus-visible {\n outline: 2px solid var(--color-primary);\n outline-offset: -2px;\n border-radius: var(--radius-sm);\n}\n.transcript-ui-root .tab--active[data-v-30747b8d] {\n color: var(--color-text-primary);\n border-bottom-color: var(--color-primary);\n}\n.transcript-ui-root .tab[disabled][data-v-30747b8d] {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.tab__icon[data-v-30747b8d] {\n flex-shrink: 0;\n color: currentColor;\n}\n.tab__label[data-v-30747b8d] {\n text-box: cap alphabetic;\n}\n.tab__badge[data-v-30747b8d] {\n margin-left: var(--spacing-xs);\n}\n.tab__chevron[data-v-30747b8d] {\n flex-shrink: 0;\n color: currentColor;\n}\n.tab__menu-item[data-v-30747b8d] {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n}\n\n/* Phone: the inline tabs share the width, labels shrink with an ellipsis,\n icons go, nothing scrolls sideways (the rest lives in the "More" menu). */\n@media (max-width: 767px) {\n.tabs[data-v-30747b8d] {\n padding: 0 var(--spacing-sm);\n overflow-x: hidden;\n}\n.transcript-ui-root .tab[data-v-30747b8d] {\n flex: 1;\n min-width: 0;\n justify-content: center;\n padding: 0 var(--spacing-xs);\n font-size: var(--font-size-xs);\n}\n.tab__icon[data-v-30747b8d] {\n display: none;\n}\n.tab__label[data-v-30747b8d] {\n overflow: hidden;\n text-overflow: ellipsis;\n}\n}\n';
|
|
22167
|
+
const Tabs = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["styles", [_style_0$r]], ["__scopeId", "data-v-30747b8d"]]);
|
|
22019
22168
|
const TEXT_NODE$1 = 3;
|
|
22020
22169
|
function placeCaretAt(element, offset2) {
|
|
22021
22170
|
element.focus({ preventScroll: true });
|
|
@@ -22136,7 +22285,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22136
22285
|
const _hoisted_1$r = { class: "editor-header" };
|
|
22137
22286
|
const _hoisted_2$l = { class: "header-main" };
|
|
22138
22287
|
const _hoisted_3$f = { class: "document-title" };
|
|
22139
|
-
const _hoisted_4$
|
|
22288
|
+
const _hoisted_4$a = {
|
|
22140
22289
|
key: 0,
|
|
22141
22290
|
class: "document-meta"
|
|
22142
22291
|
};
|
|
@@ -22179,7 +22328,7 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22179
22328
|
return openBlock(), createElementBlock("header", _hoisted_1$r, [
|
|
22180
22329
|
createBaseVNode("div", _hoisted_2$l, [
|
|
22181
22330
|
createBaseVNode("h1", _hoisted_3$f, toDisplayString(formattedTitle.value), 1),
|
|
22182
|
-
metaParts.value.length ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
22331
|
+
metaParts.value.length ? (openBlock(), createElementBlock("div", _hoisted_4$a, [
|
|
22183
22332
|
(openBlock(true), createElementBlock(Fragment, null, renderList(metaParts.value, (part, i2) => {
|
|
22184
22333
|
return openBlock(), createElementBlock("span", {
|
|
22185
22334
|
key: i2,
|
|
@@ -22259,6 +22408,23 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22259
22408
|
const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-491cf8ab"]]);
|
|
22260
22409
|
const TRANSCRIPTION_TAB = "__transcription__";
|
|
22261
22410
|
const VERBATIM_TAB = "__verbatim__";
|
|
22411
|
+
const MOBILE_BREAKPOINT = "(max-width: 767px)";
|
|
22412
|
+
function useIsMobile() {
|
|
22413
|
+
const isMobile = /* @__PURE__ */ ref(false);
|
|
22414
|
+
let mql = null;
|
|
22415
|
+
function onChange(e2) {
|
|
22416
|
+
isMobile.value = e2.matches;
|
|
22417
|
+
}
|
|
22418
|
+
onMounted(() => {
|
|
22419
|
+
mql = window.matchMedia(MOBILE_BREAKPOINT);
|
|
22420
|
+
isMobile.value = mql.matches;
|
|
22421
|
+
mql.addEventListener("change", onChange);
|
|
22422
|
+
});
|
|
22423
|
+
onBeforeUnmount(() => {
|
|
22424
|
+
mql?.removeEventListener("change", onChange);
|
|
22425
|
+
});
|
|
22426
|
+
return { isMobile };
|
|
22427
|
+
}
|
|
22262
22428
|
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
22263
22429
|
__name: "TabBar",
|
|
22264
22430
|
props: {
|
|
@@ -22271,6 +22437,11 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22271
22437
|
const emit2 = __emit;
|
|
22272
22438
|
const core = useCore();
|
|
22273
22439
|
const { t: t2 } = useI18n();
|
|
22440
|
+
const { isMobile } = useIsMobile();
|
|
22441
|
+
const collapseFrom = computed(() => {
|
|
22442
|
+
if (!isMobile.value) return void 0;
|
|
22443
|
+
return props.showVerbatim ? 2 : 1;
|
|
22444
|
+
});
|
|
22274
22445
|
const tabs = computed(() => {
|
|
22275
22446
|
const services = core.llmServices?.list.value ?? [];
|
|
22276
22447
|
return [
|
|
@@ -22302,8 +22473,9 @@ Please report this to https://github.com/markedjs/marked.`, e2) {
|
|
|
22302
22473
|
key: 0,
|
|
22303
22474
|
tabs: tabs.value,
|
|
22304
22475
|
"model-value": __props.modelValue,
|
|
22476
|
+
"collapse-from": collapseFrom.value,
|
|
22305
22477
|
"onUpdate:modelValue": onSelect
|
|
22306
|
-
}, null, 8, ["tabs", "model-value"])) : createCommentVNode("", true);
|
|
22478
|
+
}, null, 8, ["tabs", "model-value", "collapse-from"])) : createCommentVNode("", true);
|
|
22307
22479
|
};
|
|
22308
22480
|
}
|
|
22309
22481
|
});
|
|
@@ -23196,7 +23368,7 @@ ${text2}` : text2;
|
|
|
23196
23368
|
class: "turn-edit-actions"
|
|
23197
23369
|
};
|
|
23198
23370
|
const _hoisted_3$e = ["role", "tabindex", "aria-label", "aria-disabled"];
|
|
23199
|
-
const _hoisted_4$
|
|
23371
|
+
const _hoisted_4$9 = ["data-word-active"];
|
|
23200
23372
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
23201
23373
|
__name: "TranscriptionTurn",
|
|
23202
23374
|
props: {
|
|
@@ -23433,7 +23605,7 @@ ${text2}` : text2;
|
|
|
23433
23605
|
createBaseVNode("span", {
|
|
23434
23606
|
class: normalizeClass({ "word--active": word.id === activeWordId.value }),
|
|
23435
23607
|
"data-word-active": word.id === activeWordId.value || void 0
|
|
23436
|
-
}, toDisplayString(word.text), 11, _hoisted_4$
|
|
23608
|
+
}, toDisplayString(word.text), 11, _hoisted_4$9),
|
|
23437
23609
|
createTextVNode(toDisplayString(i2 < __props.turn.words.length - 1 ? " " : ""), 1)
|
|
23438
23610
|
], 64);
|
|
23439
23611
|
}), 128)) : __props.turn.text ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
@@ -23617,7 +23789,7 @@ ${text2}` : text2;
|
|
|
23617
23789
|
class: "scroll-container"
|
|
23618
23790
|
};
|
|
23619
23791
|
const _hoisted_3$d = { class: "turns-container" };
|
|
23620
|
-
const _hoisted_4$
|
|
23792
|
+
const _hoisted_4$8 = {
|
|
23621
23793
|
key: 0,
|
|
23622
23794
|
class: "history-loading",
|
|
23623
23795
|
role: "status"
|
|
@@ -23730,7 +23902,7 @@ ${text2}` : text2;
|
|
|
23730
23902
|
return openBlock(), createElementBlock("article", _hoisted_1$j, [
|
|
23731
23903
|
createBaseVNode("div", _hoisted_2$g, [
|
|
23732
23904
|
createBaseVNode("div", _hoisted_3$d, [
|
|
23733
|
-
isLoadingHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
23905
|
+
isLoadingHistory.value ? (openBlock(), createElementBlock("div", _hoisted_4$8, [..._cache[2] || (_cache[2] = [
|
|
23734
23906
|
createBaseVNode("progress", null, null, -1)
|
|
23735
23907
|
])])) : createCommentVNode("", true),
|
|
23736
23908
|
!hasMoreHistory.value && __props.turns.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_5$7, toDisplayString(unref(t2)("transcription.historyStart")), 1)) : createCommentVNode("", true),
|
|
@@ -23792,7 +23964,7 @@ ${text2}` : text2;
|
|
|
23792
23964
|
const _hoisted_1$i = { class: "verbatim-panel" };
|
|
23793
23965
|
const _hoisted_2$f = { class: "verbatim-panel__content" };
|
|
23794
23966
|
const _hoisted_3$c = { class: "verbatim-panel__header" };
|
|
23795
|
-
const _hoisted_4$
|
|
23967
|
+
const _hoisted_4$7 = { class: "verbatim-panel__doc-title" };
|
|
23796
23968
|
const _hoisted_5$6 = { class: "verbatim-panel__turns" };
|
|
23797
23969
|
const _hoisted_6$6 = { class: "verbatim-panel__turn-header" };
|
|
23798
23970
|
const _hoisted_7$3 = { class: "verbatim-panel__speaker-name" };
|
|
@@ -23862,7 +24034,7 @@ ${text2}` : text2;
|
|
|
23862
24034
|
default: withCtx(() => [
|
|
23863
24035
|
createBaseVNode("article", _hoisted_2$f, [
|
|
23864
24036
|
createBaseVNode("header", _hoisted_3$c, [
|
|
23865
|
-
createBaseVNode("h1", _hoisted_4$
|
|
24037
|
+
createBaseVNode("h1", _hoisted_4$7, toDisplayString(title.value), 1)
|
|
23866
24038
|
]),
|
|
23867
24039
|
createBaseVNode("ul", _hoisted_5$6, [
|
|
23868
24040
|
(openBlock(true), createElementBlock(Fragment, null, renderList(turns.value, (turn) => {
|
|
@@ -23899,8 +24071,8 @@ ${text2}` : text2;
|
|
|
23899
24071
|
};
|
|
23900
24072
|
}
|
|
23901
24073
|
});
|
|
23902
|
-
const _style_0$i = "\n.verbatim-panel[data-v-
|
|
23903
|
-
const VerbatimPanel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["styles", [_style_0$i]], ["__scopeId", "data-v-
|
|
24074
|
+
const _style_0$i = "\n.verbatim-panel[data-v-7a077f5a] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.verbatim-panel__content[data-v-7a077f5a] {\n padding: 4rem clamp(1.5rem, 6rem, 8%);\n}\n.verbatim-panel__header[data-v-7a077f5a] {\n margin-bottom: var(--spacing-lg);\n padding-bottom: var(--spacing-md);\n border-bottom: 1px solid var(--color-border);\n}\n.verbatim-panel__doc-title[data-v-7a077f5a] {\n font-size: var(--font-size-xl);\n font-weight: 700;\n margin: 0;\n color: var(--color-text-primary);\n}\n.verbatim-panel__turns[data-v-7a077f5a] {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: var(--spacing-lg);\n}\n.verbatim-panel__turn[data-v-7a077f5a] {\n display: block;\n}\n.verbatim-panel__turn-header[data-v-7a077f5a] {\n margin: 0 0 var(--spacing-xs);\n font-size: var(--font-size-base);\n line-height: 1.4;\n}\n.verbatim-panel__speaker-name[data-v-7a077f5a] {\n font-weight: 700;\n color: var(--color-text-primary);\n}\n.verbatim-panel__meta[data-v-7a077f5a] {\n color: var(--color-text-muted);\n font-weight: 400;\n}\n.verbatim-panel__sep[data-v-7a077f5a] {\n margin: 0 0.35em;\n}\n.verbatim-panel__text[data-v-7a077f5a] {\n margin: 0;\n font-size: var(--font-size-base);\n line-height: 1.6;\n color: var(--color-text-primary);\n}\n\n";
|
|
24075
|
+
const VerbatimPanel = /* @__PURE__ */ _export_sfc(_sfc_main$l, [["styles", [_style_0$i]], ["__scopeId", "data-v-7a077f5a"]]);
|
|
23904
24076
|
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
23905
24077
|
__name: "ChannelSelector",
|
|
23906
24078
|
props: {
|
|
@@ -24077,7 +24249,7 @@ ${text2}` : text2;
|
|
|
24077
24249
|
class: "sidebar-section sidebar-section--selector"
|
|
24078
24250
|
};
|
|
24079
24251
|
const _hoisted_3$a = { class: "sidebar-title" };
|
|
24080
|
-
const _hoisted_4$
|
|
24252
|
+
const _hoisted_4$6 = {
|
|
24081
24253
|
key: 1,
|
|
24082
24254
|
class: "sidebar-section sidebar-section--selector"
|
|
24083
24255
|
};
|
|
@@ -24218,7 +24390,7 @@ ${text2}` : text2;
|
|
|
24218
24390
|
"onUpdate:selectedChannelId": _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:selectedChannelId", $event))
|
|
24219
24391
|
}, null, 8, ["channels", "selected-channel-id"])
|
|
24220
24392
|
])) : createCommentVNode("", true),
|
|
24221
|
-
__props.translations.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_4$
|
|
24393
|
+
__props.translations.length > 1 ? (openBlock(), createElementBlock("section", _hoisted_4$6, [
|
|
24222
24394
|
createBaseVNode("h2", _hoisted_5$5, toDisplayString(unref(t2)("sidebar.translation")), 1),
|
|
24223
24395
|
createVNode(_sfc_main$j, {
|
|
24224
24396
|
translations: __props.translations,
|
|
@@ -24488,23 +24660,6 @@ ${text2}` : text2;
|
|
|
24488
24660
|
});
|
|
24489
24661
|
const _style_0$f = "\n.selection-bar[data-v-9bad1410] {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: var(--spacing-xs) var(--spacing-lg);\n /* No backdrop-filter: it forces a WebRender backdrop render target sized to\n the content behind, a heavy GPU-memory cost on long transcripts. The\n semi-opaque glass background stays legible without the blur. */\n background: var(--glass-background);\n border-bottom: 1px solid var(--color-border);\n animation: bar-slide-down-9bad1410 var(--transition-duration) ease;\n}\n.selection-count[data-v-9bad1410] {\n font-size: var(--font-size-sm);\n font-weight: 600;\n color: var(--color-primary);\n}\n.selection-actions[data-v-9bad1410] {\n display: flex;\n gap: var(--spacing-xs);\n}\n@keyframes bar-slide-down-9bad1410 {\nfrom {\n opacity: 0;\n translate: 0 -4px;\n}\nto {\n opacity: 1;\n translate: 0 0;\n}\n}\n@media (prefers-reduced-motion: reduce) {\n.selection-bar[data-v-9bad1410] {\n animation: none;\n}\n}\n@media (max-width: 767px) {\n.selection-bar[data-v-9bad1410] {\n padding: var(--spacing-xs) var(--spacing-md);\n flex-wrap: wrap;\n gap: var(--spacing-xs);\n}\n}\n";
|
|
24490
24662
|
const SelectionActionBar = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["styles", [_style_0$f]], ["__scopeId", "data-v-9bad1410"]]);
|
|
24491
|
-
const MOBILE_BREAKPOINT = "(max-width: 767px)";
|
|
24492
|
-
function useIsMobile() {
|
|
24493
|
-
const isMobile = /* @__PURE__ */ ref(false);
|
|
24494
|
-
let mql = null;
|
|
24495
|
-
function onChange(e2) {
|
|
24496
|
-
isMobile.value = e2.matches;
|
|
24497
|
-
}
|
|
24498
|
-
onMounted(() => {
|
|
24499
|
-
mql = window.matchMedia(MOBILE_BREAKPOINT);
|
|
24500
|
-
isMobile.value = mql.matches;
|
|
24501
|
-
mql.addEventListener("change", onChange);
|
|
24502
|
-
});
|
|
24503
|
-
onBeforeUnmount(() => {
|
|
24504
|
-
mql?.removeEventListener("change", onChange);
|
|
24505
|
-
});
|
|
24506
|
-
return { isMobile };
|
|
24507
|
-
}
|
|
24508
24663
|
const _hoisted_1$e = { class: "editor-layout" };
|
|
24509
24664
|
const _hoisted_2$b = {
|
|
24510
24665
|
key: 6,
|
|
@@ -24552,6 +24707,9 @@ ${text2}` : text2;
|
|
|
24552
24707
|
);
|
|
24553
24708
|
const speakerList = computed(() => Array.from(speakers.values()));
|
|
24554
24709
|
const showTranscription = computed(() => activeTab.value === TRANSCRIPTION_TAB);
|
|
24710
|
+
watch(isMobile, (mobile) => {
|
|
24711
|
+
if (mobile && isSplit.value) isSplit.value = false;
|
|
24712
|
+
});
|
|
24555
24713
|
watch(activeTab, (id) => {
|
|
24556
24714
|
if (!core.llmServices) return;
|
|
24557
24715
|
if (id === TRANSCRIPTION_TAB || id === VERBATIM_TAB) {
|
|
@@ -24700,8 +24858,8 @@ ${text2}` : text2;
|
|
|
24700
24858
|
};
|
|
24701
24859
|
}
|
|
24702
24860
|
});
|
|
24703
|
-
const _style_0$e = "\n.editor-layout[data-v-
|
|
24704
|
-
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["styles", [_style_0$e]], ["__scopeId", "data-v-
|
|
24861
|
+
const _style_0$e = "\n.editor-layout[data-v-972b2fff] {\n display: flex;\n flex-direction: column;\n height: 100%;\n overflow: hidden;\n background-color: var(--color-background);\n}\n.editor-body[data-v-972b2fff] {\n display: grid;\n grid-template-columns: 1fr var(--sidebar-width);\n flex: 1;\n min-height: 0;\n}\n\n/* Split mode: two panels already share the body between them, no room (or\n need) for the speaker sidebar too — see Layout's panels/isSplit state. */\n.editor-body--no-sidebar[data-v-972b2fff] {\n grid-template-columns: 1fr;\n}\n.editor-body__panels[data-v-972b2fff] {\n display: flex;\n min-width: 0;\n min-height: 0;\n}\n.editor-body__panels[data-v-972b2fff] > * {\n flex: 1;\n min-width: 0;\n}\n.editor-body__panels--split[data-v-972b2fff] > * + * {\n border-left: 1px solid var(--color-border);\n}\n.mobile-selectors[data-v-972b2fff] {\n display: flex;\n gap: var(--spacing-sm);\n padding: var(--spacing-sm) var(--spacing-md);\n border-top: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n box-shadow: var(--shadow-md);\n align-items: end;\n}\n.mobile-selectors[data-v-972b2fff] > * {\n flex: 1;\n min-width: 0;\n}\n@media (max-width: 767px) {\n.editor-body[data-v-972b2fff] {\n grid-template-columns: 1fr;\n}\n}\n";
|
|
24862
|
+
const Layout = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["styles", [_style_0$e]], ["__scopeId", "data-v-972b2fff"]]);
|
|
24705
24863
|
const _hoisted_1$d = {
|
|
24706
24864
|
class: "editor-loading",
|
|
24707
24865
|
role: "status",
|
|
@@ -25524,7 +25682,7 @@ section.turn:has([data-state="open"]) {
|
|
|
25524
25682
|
const _hoisted_1$a = { class: "player-controls" };
|
|
25525
25683
|
const _hoisted_2$8 = { class: "controls-left" };
|
|
25526
25684
|
const _hoisted_3$7 = { class: "controls-time" };
|
|
25527
|
-
const _hoisted_4$
|
|
25685
|
+
const _hoisted_4$5 = { class: "time-display" };
|
|
25528
25686
|
const _hoisted_5$4 = { class: "time-display" };
|
|
25529
25687
|
const _hoisted_6$4 = { class: "controls-right" };
|
|
25530
25688
|
const _hoisted_7$1 = ["value", "aria-label", "disabled"];
|
|
@@ -25598,7 +25756,7 @@ section.turn:has([data-state="open"]) {
|
|
|
25598
25756
|
}, 8, ["aria-label", "disabled"])
|
|
25599
25757
|
]),
|
|
25600
25758
|
createBaseVNode("div", _hoisted_3$7, [
|
|
25601
|
-
createBaseVNode("time", _hoisted_4$
|
|
25759
|
+
createBaseVNode("time", _hoisted_4$5, toDisplayString(__props.currentTime), 1),
|
|
25602
25760
|
_cache[7] || (_cache[7] = createBaseVNode("span", { class: "time-separator" }, "/", -1)),
|
|
25603
25761
|
createBaseVNode("time", _hoisted_5$4, toDisplayString(__props.duration), 1)
|
|
25604
25762
|
]),
|
|
@@ -29335,12 +29493,13 @@ section.turn:has([data-state="open"]) {
|
|
|
29335
29493
|
};
|
|
29336
29494
|
}
|
|
29337
29495
|
const _hoisted_1$5 = { class: "llm-service-panel" };
|
|
29338
|
-
const _hoisted_2$5 = {
|
|
29496
|
+
const _hoisted_2$5 = { class: "llm-service-panel__download-label" };
|
|
29497
|
+
const _hoisted_3$5 = {
|
|
29339
29498
|
key: 0,
|
|
29340
29499
|
class: "llm-service-panel__empty",
|
|
29341
29500
|
role: "status"
|
|
29342
29501
|
};
|
|
29343
|
-
const
|
|
29502
|
+
const _hoisted_4$4 = { class: "llm-service-panel__empty-text" };
|
|
29344
29503
|
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
29345
29504
|
__name: "LLMServicePanel",
|
|
29346
29505
|
props: {
|
|
@@ -29462,11 +29621,12 @@ section.turn:has([data-state="open"]) {
|
|
|
29462
29621
|
onClick: onExport
|
|
29463
29622
|
}, {
|
|
29464
29623
|
default: withCtx(() => [
|
|
29465
|
-
|
|
29624
|
+
createBaseVNode("span", _hoisted_2$5, toDisplayString(unref(t2)("llmService.download")), 1)
|
|
29466
29625
|
]),
|
|
29467
29626
|
_: 1
|
|
29468
29627
|
}, 8, ["disabled", "aria-label", "title"]),
|
|
29469
29628
|
createVNode(unref(Button), {
|
|
29629
|
+
class: "llm-service-panel__split",
|
|
29470
29630
|
variant: __props.split ? "primary" : "secondary",
|
|
29471
29631
|
icon: "panel-right",
|
|
29472
29632
|
"aria-pressed": !!__props.split,
|
|
@@ -29476,8 +29636,8 @@ section.turn:has([data-state="open"]) {
|
|
|
29476
29636
|
}, null, 8, ["variant", "aria-pressed", "aria-label", "title"])
|
|
29477
29637
|
]),
|
|
29478
29638
|
default: withCtx(() => [
|
|
29479
|
-
isEmpty.value ? (openBlock(), createElementBlock("div",
|
|
29480
|
-
createBaseVNode("p",
|
|
29639
|
+
isEmpty.value ? (openBlock(), createElementBlock("div", _hoisted_3$5, [
|
|
29640
|
+
createBaseVNode("p", _hoisted_4$4, toDisplayString(unref(t2)("llmService.empty")), 1),
|
|
29481
29641
|
createVNode(unref(Button), {
|
|
29482
29642
|
variant: "primary",
|
|
29483
29643
|
icon: "sparkles",
|
|
@@ -29502,8 +29662,8 @@ section.turn:has([data-state="open"]) {
|
|
|
29502
29662
|
};
|
|
29503
29663
|
}
|
|
29504
29664
|
});
|
|
29505
|
-
const _style_0$5 = "\n.llm-service-panel[data-v-
|
|
29506
|
-
const LLMServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["styles", [_style_0$5]], ["__scopeId", "data-v-
|
|
29665
|
+
const _style_0$5 = "\n.llm-service-panel[data-v-920b527a] {\n display: flex;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n overflow-y: auto;\n overflow-x: hidden;\n}\n.llm-service-panel__status[data-v-920b527a] {\n display: inline-flex;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n font-weight: 500;\n}\n.llm-service-panel__status--ok[data-v-920b527a] {\n color: var(--color-success, #2e7d32);\n}\n.llm-service-panel__status--warn[data-v-920b527a] {\n color: var(--color-warning, #ed6c02);\n}\n.llm-service-panel__empty[data-v-920b527a] {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: var(--spacing-md);\n padding: var(--spacing-xl) var(--spacing-md);\n text-align: center;\n}\n.llm-service-panel__empty-text[data-v-920b527a] {\n margin: 0;\n max-width: 400px;\n font-size: var(--font-size-sm);\n color: var(--color-text-secondary);\n}\n\n/* Phone: no side-by-side (Layout forces split off below 767px), and the\n download button keeps its icon only. */\n@media (max-width: 767px) {\n.llm-service-panel[data-v-920b527a] {\n padding: var(--spacing-sm) 0;\n}\n.llm-service-panel__split[data-v-920b527a],\n .llm-service-panel__download-label[data-v-920b527a] {\n display: none;\n}\n}\n";
|
|
29666
|
+
const LLMServicePanel = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["styles", [_style_0$5]], ["__scopeId", "data-v-920b527a"]]);
|
|
29507
29667
|
function createService(init) {
|
|
29508
29668
|
return {
|
|
29509
29669
|
id: init.id,
|
|
@@ -31006,11 +31166,11 @@ section.turn:has([data-state="open"]) {
|
|
|
31006
31166
|
}
|
|
31007
31167
|
var patterns = grammar[token];
|
|
31008
31168
|
patterns = Array.isArray(patterns) ? patterns : [patterns];
|
|
31009
|
-
for (var
|
|
31010
|
-
if (rematch && rematch.cause == token + "," +
|
|
31169
|
+
for (var j = 0; j < patterns.length; ++j) {
|
|
31170
|
+
if (rematch && rematch.cause == token + "," + j) {
|
|
31011
31171
|
return;
|
|
31012
31172
|
}
|
|
31013
|
-
var patternObj = patterns[
|
|
31173
|
+
var patternObj = patterns[j];
|
|
31014
31174
|
var inside = patternObj.inside;
|
|
31015
31175
|
var lookbehind = !!patternObj.lookbehind;
|
|
31016
31176
|
var greedy = !!patternObj.greedy;
|
|
@@ -31051,9 +31211,9 @@ section.turn:has([data-state="open"]) {
|
|
|
31051
31211
|
if (currentNode.value instanceof Token) {
|
|
31052
31212
|
continue;
|
|
31053
31213
|
}
|
|
31054
|
-
for (var
|
|
31214
|
+
for (var k = currentNode; k !== tokenList.tail && (p2 < to || typeof k.value === "string"); k = k.next) {
|
|
31055
31215
|
removeCount++;
|
|
31056
|
-
p2 +=
|
|
31216
|
+
p2 += k.value.length;
|
|
31057
31217
|
}
|
|
31058
31218
|
removeCount--;
|
|
31059
31219
|
str = text2.slice(pos, p2);
|
|
@@ -31085,7 +31245,7 @@ section.turn:has([data-state="open"]) {
|
|
|
31085
31245
|
}
|
|
31086
31246
|
if (removeCount > 1) {
|
|
31087
31247
|
var nestedRematch = {
|
|
31088
|
-
cause: token + "," +
|
|
31248
|
+
cause: token + "," + j,
|
|
31089
31249
|
reach
|
|
31090
31250
|
};
|
|
31091
31251
|
matchGrammar(text2, tokenList, grammar, currentNode.prev, pos, nestedRematch);
|