@linto-ai/transcript-ui-webcomponent 0.9.21 → 0.9.22-unstable.202609181425

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -114,10 +114,10 @@ function normalizeStyle(value) {
114
114
  }
115
115
  const listDelimiterRE = /;(?![^(]*\))/g;
116
116
  const propertyDelimiterRE = /:([^]+)/;
117
- const styleCommentRE = /\/\*[^]*?\*\//g;
117
+ const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
118
118
  function parseStringStyle(cssText) {
119
119
  const ret = {};
120
- cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
120
+ cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
121
121
  if (item) {
122
122
  const tmp = item.split(propertyDelimiterRE);
123
123
  tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
@@ -161,22 +161,22 @@ const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
161
161
  function includeBooleanAttr(value) {
162
162
  return !!value || value === "";
163
163
  }
164
- function looseCompareArrays(a2, b2) {
164
+ function looseCompareArrays(a2, b2, seen) {
165
165
  if (a2.length !== b2.length) return false;
166
166
  let equal = true;
167
167
  for (let i2 = 0; equal && i2 < a2.length; i2++) {
168
- equal = looseEqual(a2[i2], b2[i2]);
168
+ equal = looseEqual(a2[i2], b2[i2], seen);
169
169
  }
170
170
  return equal;
171
171
  }
172
- function looseCompareCollections(a2, b2) {
172
+ function looseCompareCollections(a2, b2, seen) {
173
173
  if (a2.size !== b2.size) return false;
174
174
  const candidates = Array.from(b2);
175
175
  const matched = new Uint8Array(candidates.length);
176
176
  for (const item of a2) {
177
177
  let index = -1;
178
178
  for (let i2 = 0; i2 < candidates.length; i2++) {
179
- if (!matched[i2] && looseEqual(item, candidates[i2])) {
179
+ if (!matched[i2] && looseEqual(item, candidates[i2], seen)) {
180
180
  index = i2;
181
181
  break;
182
182
  }
@@ -186,7 +186,47 @@ function looseCompareCollections(a2, b2) {
186
186
  }
187
187
  return true;
188
188
  }
189
- function looseEqual(a2, b2) {
189
+ function looseCompareObjects(a2, b2, seen) {
190
+ let aValidType = isMap(a2);
191
+ let bValidType = isMap(b2);
192
+ if (aValidType || bValidType) {
193
+ return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
194
+ }
195
+ aValidType = isSet(a2);
196
+ bValidType = isSet(b2);
197
+ if (aValidType || bValidType) {
198
+ return aValidType && bValidType ? looseCompareCollections(a2, b2, seen) : false;
199
+ }
200
+ const aKeysCount = Object.keys(a2).length;
201
+ const bKeysCount = Object.keys(b2).length;
202
+ if (aKeysCount !== bKeysCount) {
203
+ return false;
204
+ }
205
+ for (const key in a2) {
206
+ const aHasKey = a2.hasOwnProperty(key);
207
+ const bHasKey = b2.hasOwnProperty(key);
208
+ if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key], seen)) {
209
+ return false;
210
+ }
211
+ }
212
+ return String(a2) === String(b2);
213
+ }
214
+ function looseCompareNested(a2, b2, seen, compare) {
215
+ if (!seen) {
216
+ seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
217
+ }
218
+ const [seenA, seenB] = seen;
219
+ if (seenA.has(a2) || seenB.has(b2)) {
220
+ return seenA.get(a2) === b2 && seenB.get(b2) === a2;
221
+ }
222
+ seenA.set(a2, b2);
223
+ seenB.set(b2, a2);
224
+ const equal = compare(a2, b2, seen);
225
+ seenA.delete(a2);
226
+ seenB.delete(b2);
227
+ return equal;
228
+ }
229
+ function looseEqual(a2, b2, seen) {
190
230
  if (a2 === b2) return true;
191
231
  let aValidType = isDate(a2);
192
232
  let bValidType = isDate(b2);
@@ -201,7 +241,7 @@ function looseEqual(a2, b2) {
201
241
  aValidType = isArray(a2);
202
242
  bValidType = isArray(b2);
203
243
  if (aValidType || bValidType) {
204
- return aValidType && bValidType ? looseCompareArrays(a2, b2) : false;
244
+ return aValidType && bValidType ? looseCompareNested(a2, b2, seen, looseCompareArrays) : false;
205
245
  }
206
246
  aValidType = isObject$1(a2);
207
247
  bValidType = isObject$1(b2);
@@ -209,28 +249,7 @@ function looseEqual(a2, b2) {
209
249
  if (!aValidType || !bValidType) {
210
250
  return false;
211
251
  }
212
- aValidType = isMap(a2);
213
- bValidType = isMap(b2);
214
- if (aValidType || bValidType) {
215
- return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
216
- }
217
- aValidType = isSet(a2);
218
- bValidType = isSet(b2);
219
- if (aValidType || bValidType) {
220
- return aValidType && bValidType ? looseCompareCollections(a2, b2) : false;
221
- }
222
- const aKeysCount = Object.keys(a2).length;
223
- const bKeysCount = Object.keys(b2).length;
224
- if (aKeysCount !== bKeysCount) {
225
- return false;
226
- }
227
- for (const key in a2) {
228
- const aHasKey = a2.hasOwnProperty(key);
229
- const bHasKey = b2.hasOwnProperty(key);
230
- if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a2[key], b2[key])) {
231
- return false;
232
- }
233
- }
252
+ return looseCompareNested(a2, b2, seen, looseCompareObjects);
234
253
  }
235
254
  return String(a2) === String(b2);
236
255
  }
@@ -305,14 +324,14 @@ class EffectScope {
305
324
  pause() {
306
325
  if (this._active) {
307
326
  this._isPaused = true;
308
- let i2, l2;
327
+ let i2, l4;
309
328
  if (this.scopes) {
310
329
  const scopes = this.scopes.slice();
311
- for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
330
+ for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
312
331
  scopes[i2].pause();
313
332
  }
314
333
  }
315
- for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
334
+ for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
316
335
  this.effects[i2].pause();
317
336
  }
318
337
  }
@@ -324,15 +343,15 @@ class EffectScope {
324
343
  if (this._active) {
325
344
  if (this._isPaused) {
326
345
  this._isPaused = false;
327
- let i2, l2;
346
+ let i2, l4;
328
347
  if (this.scopes) {
329
348
  const scopes = this.scopes.slice();
330
- for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
349
+ for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
331
350
  scopes[i2].resume();
332
351
  }
333
352
  }
334
353
  const effects = this.effects.slice();
335
- for (i2 = 0, l2 = effects.length; i2 < l2; i2++) {
354
+ for (i2 = 0, l4 = effects.length; i2 < l4; i2++) {
336
355
  effects[i2].resume();
337
356
  }
338
357
  }
@@ -383,18 +402,18 @@ class EffectScope {
383
402
  stop(fromParent) {
384
403
  if (this._active) {
385
404
  this._active = false;
386
- let i2, l2;
387
- for (i2 = 0, l2 = this.effects.length; i2 < l2; i2++) {
405
+ let i2, l4;
406
+ for (i2 = 0, l4 = this.effects.length; i2 < l4; i2++) {
388
407
  this.effects[i2].stop();
389
408
  }
390
409
  this.effects.length = 0;
391
- for (i2 = 0, l2 = this.cleanups.length; i2 < l2; i2++) {
410
+ for (i2 = 0, l4 = this.cleanups.length; i2 < l4; i2++) {
392
411
  this.cleanups[i2]();
393
412
  }
394
413
  this.cleanups.length = 0;
395
414
  if (this.scopes) {
396
415
  const scopes = this.scopes.slice();
397
- for (i2 = 0, l2 = scopes.length; i2 < l2; i2++) {
416
+ for (i2 = 0, l4 = scopes.length; i2 < l4; i2++) {
398
417
  scopes[i2].stop(true);
399
418
  }
400
419
  this.scopes.length = 0;
@@ -654,8 +673,8 @@ function removeSub(link, soft = false) {
654
673
  dep.subs = prevSub;
655
674
  if (!prevSub && dep.computed) {
656
675
  dep.computed.flags &= -5;
657
- for (let l2 = dep.computed.deps; l2; l2 = l2.nextDep) {
658
- removeSub(l2, true);
676
+ for (let l4 = dep.computed.deps; l4; l4 = l4.nextDep) {
677
+ removeSub(l4, true);
659
678
  }
660
679
  }
661
680
  }
@@ -778,8 +797,8 @@ function addSub(link) {
778
797
  const computed2 = link.dep.computed;
779
798
  if (computed2 && !link.dep.subs) {
780
799
  computed2.flags |= 4 | 16;
781
- for (let l2 = computed2.deps; l2; l2 = l2.nextDep) {
782
- addSub(l2);
800
+ for (let l4 = computed2.deps; l4; l4 = l4.nextDep) {
801
+ addSub(l4);
783
802
  }
784
803
  }
785
804
  const currentTail = link.dep.subs;
@@ -887,7 +906,9 @@ function reactiveReadArray(array) {
887
906
  const raw = /* @__PURE__ */ toRaw(array);
888
907
  if (raw === array) return raw;
889
908
  track(raw, "iterate", ARRAY_ITERATE_KEY);
890
- return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
909
+ if (/* @__PURE__ */ isShallow(array)) return raw;
910
+ if (!/* @__PURE__ */ isReadonly(array)) return raw.map(toReactive);
911
+ return /* @__PURE__ */ isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
891
912
  }
892
913
  function shallowReadArray(arr) {
893
914
  track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
@@ -3484,7 +3505,7 @@ function renderList(source, renderItem, cache, index) {
3484
3505
  source = shallowReadArray(source);
3485
3506
  }
3486
3507
  ret = new Array(source.length);
3487
- for (let i2 = 0, l2 = source.length; i2 < l2; i2++) {
3508
+ for (let i2 = 0, l4 = source.length; i2 < l4; i2++) {
3488
3509
  ret[i2] = renderItem(
3489
3510
  needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i2])) : toReactive(source[i2]) : source[i2],
3490
3511
  i2,
@@ -3508,7 +3529,7 @@ function renderList(source, renderItem, cache, index) {
3508
3529
  } else {
3509
3530
  const keys = Object.keys(source);
3510
3531
  ret = new Array(keys.length);
3511
- for (let i2 = 0, l2 = keys.length; i2 < l2; i2++) {
3532
+ for (let i2 = 0, l4 = keys.length; i2 < l4; i2++) {
3512
3533
  const key = keys[i2];
3513
3534
  ret[i2] = renderItem(source[key], key, i2, cached && cached[i2]);
3514
3535
  }
@@ -4973,6 +4994,12 @@ function baseCreateRenderer(options, createHydrationFns) {
4973
4994
  optimized = false;
4974
4995
  n2.dynamicChildren = null;
4975
4996
  }
4997
+ if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
4998
+ if (n2.dynamicChildren === EMPTY_ARR) {
4999
+ n2.dynamicChildren = [];
5000
+ }
5001
+ n2.dynamicChildren.hasOnce = true;
5002
+ }
4976
5003
  const { type, ref: ref3, shapeFlag } = n2;
4977
5004
  switch (type) {
4978
5005
  case Text:
@@ -5525,6 +5552,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5525
5552
  const instance = n2.component = n1.component;
5526
5553
  if (shouldUpdateComponent(n1, n2, optimized)) {
5527
5554
  if (instance.asyncDep && !instance.asyncResolved) {
5555
+ n2.el = n1.el;
5528
5556
  updateComponentPreRender(instance, n2, optimized);
5529
5557
  return;
5530
5558
  } else {
@@ -5586,7 +5614,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5586
5614
  instance.isMounted = true;
5587
5615
  initialVNode = container = anchor = null;
5588
5616
  } else {
5589
- let { next: next2, bu, u: u4, parent, vnode } = instance;
5617
+ let { next: next2, bu, u: u2, parent, vnode } = instance;
5590
5618
  {
5591
5619
  const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
5592
5620
  if (nonHydratedAsyncRoot) {
@@ -5636,8 +5664,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5636
5664
  if (originNext === null) {
5637
5665
  updateHOCHostEl(instance, nextTree.el);
5638
5666
  }
5639
- if (u4) {
5640
- queuePostRenderEffect(u4, parentSuspense);
5667
+ if (u2) {
5668
+ queuePostRenderEffect(u2, parentSuspense);
5641
5669
  }
5642
5670
  if (vnodeHook = next2.props && next2.props.onVnodeUpdated) {
5643
5671
  queuePostRenderEffect(
@@ -5792,9 +5820,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5792
5820
  };
5793
5821
  const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
5794
5822
  let i2 = 0;
5795
- const l2 = c2.length;
5823
+ const l22 = c2.length;
5796
5824
  let e1 = c1.length - 1;
5797
- let e22 = l2 - 1;
5825
+ let e22 = l22 - 1;
5798
5826
  while (i2 <= e1 && i2 <= e22) {
5799
5827
  const n1 = c1[i2];
5800
5828
  const n2 = c2[i2] = optimized ? cloneIfMounted(c2[i2]) : normalizeVNode(c2[i2]);
@@ -5839,7 +5867,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5839
5867
  if (i2 > e1) {
5840
5868
  if (i2 <= e22) {
5841
5869
  const nextPos = e22 + 1;
5842
- const anchor = nextPos < l2 ? c2[nextPos].el : parentAnchor;
5870
+ const anchor = nextPos < l22 ? c2[nextPos].el : parentAnchor;
5843
5871
  while (i2 <= e22) {
5844
5872
  patch(
5845
5873
  null,
@@ -5870,7 +5898,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5870
5898
  keyToNewIndexMap.set(nextChild.key, i2);
5871
5899
  }
5872
5900
  }
5873
- let j2;
5901
+ let j;
5874
5902
  let patched = 0;
5875
5903
  const toBePatched = e22 - s2 + 1;
5876
5904
  let moved = false;
@@ -5887,9 +5915,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5887
5915
  if (prevChild.key != null) {
5888
5916
  newIndex = keyToNewIndexMap.get(prevChild.key);
5889
5917
  } else {
5890
- for (j2 = s2; j2 <= e22; j2++) {
5891
- if (newIndexToOldIndexMap[j2 - s2] === 0 && isSameVNodeType(prevChild, c2[j2])) {
5892
- newIndex = j2;
5918
+ for (j = s2; j <= e22; j++) {
5919
+ if (newIndexToOldIndexMap[j - s2] === 0 && isSameVNodeType(prevChild, c2[j])) {
5920
+ newIndex = j;
5893
5921
  break;
5894
5922
  }
5895
5923
  }
@@ -5918,12 +5946,12 @@ function baseCreateRenderer(options, createHydrationFns) {
5918
5946
  }
5919
5947
  }
5920
5948
  const increasingNewIndexSequence = moved ? getSequence(newIndexToOldIndexMap) : EMPTY_ARR;
5921
- j2 = increasingNewIndexSequence.length - 1;
5949
+ j = increasingNewIndexSequence.length - 1;
5922
5950
  for (i2 = toBePatched - 1; i2 >= 0; i2--) {
5923
5951
  const nextIndex = s2 + i2;
5924
5952
  const nextChild = c2[nextIndex];
5925
5953
  const anchorVNode = c2[nextIndex + 1];
5926
- const anchor = nextIndex + 1 < l2 ? (
5954
+ const anchor = nextIndex + 1 < l22 ? (
5927
5955
  // #13559, #14173 fallback to el placeholder for unresolved async component
5928
5956
  anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
5929
5957
  ) : parentAnchor;
@@ -5940,10 +5968,10 @@ function baseCreateRenderer(options, createHydrationFns) {
5940
5968
  optimized
5941
5969
  );
5942
5970
  } else if (moved) {
5943
- if (j2 < 0 || i2 !== increasingNewIndexSequence[j2]) {
5971
+ if (j < 0 || i2 !== increasingNewIndexSequence[j]) {
5944
5972
  move(nextChild, container, anchor, 2);
5945
5973
  } else {
5946
- j2--;
5974
+ j--;
5947
5975
  }
5948
5976
  }
5949
5977
  }
@@ -6034,7 +6062,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6034
6062
  cacheIndex,
6035
6063
  memo
6036
6064
  } = vnode;
6037
- if (patchFlag === -2) {
6065
+ if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
6038
6066
  optimized = false;
6039
6067
  }
6040
6068
  if (ref3 != null) {
@@ -6042,7 +6070,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6042
6070
  setRef(ref3, null, parentSuspense, vnode, true);
6043
6071
  resetTracking();
6044
6072
  }
6045
- if (cacheIndex != null) {
6073
+ if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
6046
6074
  parentComponent.renderCache[cacheIndex] = void 0;
6047
6075
  }
6048
6076
  if (shapeFlag & 256) {
@@ -6115,6 +6143,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6115
6143
  }
6116
6144
  if (type === Static) {
6117
6145
  removeStaticNode(vnode);
6146
+ if (transition && !transition.persisted && transition.afterLeave) {
6147
+ transition.afterLeave();
6148
+ }
6118
6149
  return;
6119
6150
  }
6120
6151
  const performRemove = () => {
@@ -6155,6 +6186,9 @@ function baseCreateRenderer(options, createHydrationFns) {
6155
6186
  if (job) {
6156
6187
  job.flags |= 8;
6157
6188
  unmount(subTree, instance, parentSuspense, doRemove);
6189
+ } else if (instance.vnode.el && subTree) {
6190
+ subTree.transition = instance.vnode.transition;
6191
+ unmount(subTree, instance, parentSuspense, doRemove);
6158
6192
  }
6159
6193
  if (um) {
6160
6194
  queuePostRenderEffect(um, parentSuspense);
@@ -6270,39 +6304,39 @@ function traverseStaticChildren(n1, n2, shallow = false) {
6270
6304
  function getSequence(arr) {
6271
6305
  const p2 = arr.slice();
6272
6306
  const result = [0];
6273
- let i2, j2, u4, v2, c2;
6307
+ let i2, j, u2, v2, c2;
6274
6308
  const len = arr.length;
6275
6309
  for (i2 = 0; i2 < len; i2++) {
6276
6310
  const arrI = arr[i2];
6277
6311
  if (arrI !== 0) {
6278
- j2 = result[result.length - 1];
6279
- if (arr[j2] < arrI) {
6280
- p2[i2] = j2;
6312
+ j = result[result.length - 1];
6313
+ if (arr[j] < arrI) {
6314
+ p2[i2] = j;
6281
6315
  result.push(i2);
6282
6316
  continue;
6283
6317
  }
6284
- u4 = 0;
6318
+ u2 = 0;
6285
6319
  v2 = result.length - 1;
6286
- while (u4 < v2) {
6287
- c2 = u4 + v2 >> 1;
6320
+ while (u2 < v2) {
6321
+ c2 = u2 + v2 >> 1;
6288
6322
  if (arr[result[c2]] < arrI) {
6289
- u4 = c2 + 1;
6323
+ u2 = c2 + 1;
6290
6324
  } else {
6291
6325
  v2 = c2;
6292
6326
  }
6293
6327
  }
6294
- if (arrI < arr[result[u4]]) {
6295
- if (u4 > 0) {
6296
- p2[i2] = result[u4 - 1];
6328
+ if (arrI < arr[result[u2]]) {
6329
+ if (u2 > 0) {
6330
+ p2[i2] = result[u2 - 1];
6297
6331
  }
6298
- result[u4] = i2;
6332
+ result[u2] = i2;
6299
6333
  }
6300
6334
  }
6301
6335
  }
6302
- u4 = result.length;
6303
- v2 = result[u4 - 1];
6304
- while (u4-- > 0) {
6305
- result[u4] = v2;
6336
+ u2 = result.length;
6337
+ v2 = result[u2 - 1];
6338
+ while (u2-- > 0) {
6339
+ result[u2] = v2;
6306
6340
  v2 = p2[v2];
6307
6341
  }
6308
6342
  return result;
@@ -6568,7 +6602,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
6568
6602
  el: vnode.el,
6569
6603
  anchor: vnode.anchor,
6570
6604
  ctx: vnode.ctx,
6571
- ce: vnode.ce
6605
+ ce: vnode.ce,
6606
+ cacheIndex: vnode.cacheIndex
6572
6607
  };
6573
6608
  if (transition && cloneTransition) {
6574
6609
  setTransitionHooks(
@@ -6982,8 +7017,8 @@ const computed = (getterOrOptions, debugOptions) => {
6982
7017
  function h$2(type, propsOrChildren, children) {
6983
7018
  try {
6984
7019
  setBlockTracking(-1);
6985
- const l2 = arguments.length;
6986
- if (l2 === 2) {
7020
+ const l4 = arguments.length;
7021
+ if (l4 === 2) {
6987
7022
  if (isObject$1(propsOrChildren) && !isArray(propsOrChildren)) {
6988
7023
  if (isVNode(propsOrChildren)) {
6989
7024
  return createVNode(type, null, [propsOrChildren]);
@@ -6993,9 +7028,9 @@ function h$2(type, propsOrChildren, children) {
6993
7028
  return createVNode(type, null, propsOrChildren);
6994
7029
  }
6995
7030
  } else {
6996
- if (l2 > 3) {
7031
+ if (l4 > 3) {
6997
7032
  children = Array.prototype.slice.call(arguments, 2);
6998
- } else if (l2 === 3 && isVNode(children)) {
7033
+ } else if (l4 === 3 && isVNode(children)) {
6999
7034
  children = [children];
7000
7035
  }
7001
7036
  return createVNode(type, propsOrChildren, children);
@@ -7029,7 +7064,7 @@ function isMemoSame(cached, memo) {
7029
7064
  }
7030
7065
  return true;
7031
7066
  }
7032
- const version = "3.5.42";
7067
+ const version = "3.5.43";
7033
7068
  let policy = void 0;
7034
7069
  const tt$1 = typeof window !== "undefined" && window.trustedTypes;
7035
7070
  if (tt$1) {
@@ -7376,7 +7411,7 @@ function getTimeout(delays, durations) {
7376
7411
  while (delays.length < durations.length) {
7377
7412
  delays = delays.concat(delays);
7378
7413
  }
7379
- return Math.max(...durations.map((d2, i2) => toMs(d2) + toMs(delays[i2])));
7414
+ return Math.max(...durations.map((d3, i2) => toMs(d3) + toMs(delays[i2])));
7380
7415
  }
7381
7416
  function toMs(s2) {
7382
7417
  if (s2 === "auto") return 0;
@@ -8414,7 +8449,7 @@ function setSelected(el, value) {
8414
8449
  if (isMultiple && !isArrayValue && !isSet(value)) {
8415
8450
  return;
8416
8451
  }
8417
- for (let i2 = 0, l2 = el.options.length; i2 < l2; i2++) {
8452
+ for (let i2 = 0, l4 = el.options.length; i2 < l4; i2++) {
8418
8453
  const option = el.options[i2];
8419
8454
  const optionValue = getValue(option);
8420
8455
  if (isMultiple) {
@@ -8527,7 +8562,7 @@ const withKeys = (fn, modifiers) => {
8527
8562
  }
8528
8563
  const eventKey = hyphenate(event.key);
8529
8564
  if (modifiers.some(
8530
- (k2) => k2 === eventKey || keyNames[k2] === eventKey
8565
+ (k) => k === eventKey || keyNames[k] === eventKey
8531
8566
  )) {
8532
8567
  return fn(event);
8533
8568
  }
@@ -9054,17 +9089,17 @@ function toDate(value) {
9054
9089
  const d22 = new Date(ms);
9055
9090
  return Number.isNaN(d22.getTime()) ? null : d22;
9056
9091
  }
9057
- const d2 = new Date(value);
9058
- return Number.isNaN(d2.getTime()) ? null : d2;
9092
+ const d3 = new Date(value);
9093
+ return Number.isNaN(d3.getTime()) ? null : d3;
9059
9094
  }
9060
9095
  function formatLongDate(value, locale) {
9061
- const d2 = toDate(value);
9062
- if (!d2) return "";
9096
+ const d3 = toDate(value);
9097
+ if (!d3) return "";
9063
9098
  return new Intl.DateTimeFormat(locale, {
9064
9099
  day: "numeric",
9065
9100
  month: "long",
9066
9101
  year: "numeric"
9067
- }).format(d2);
9102
+ }).format(d3);
9068
9103
  }
9069
9104
  function formatDurationMinutes(seconds, locale) {
9070
9105
  const minutes = Math.max(0, Math.round(seconds / 60));
@@ -9102,18 +9137,18 @@ function validateEditorDocument(doc2) {
9102
9137
  if (doc2 == null || typeof doc2 !== "object") {
9103
9138
  throw new DocumentValidationError("document", "must be a non-null object");
9104
9139
  }
9105
- const d2 = doc2;
9106
- if (typeof d2.title !== "string") {
9140
+ const d3 = doc2;
9141
+ if (typeof d3.title !== "string") {
9107
9142
  throw new DocumentValidationError("document.title", "must be a string");
9108
9143
  }
9109
- if (!(d2.speakers instanceof Map)) {
9144
+ if (!(d3.speakers instanceof Map)) {
9110
9145
  throw new DocumentValidationError("document.speakers", "must be a Map");
9111
9146
  }
9112
- if (!Array.isArray(d2.channels)) {
9147
+ if (!Array.isArray(d3.channels)) {
9113
9148
  throw new DocumentValidationError("document.channels", "must be an array");
9114
9149
  }
9115
- for (let ci = 0; ci < d2.channels.length; ci++) {
9116
- const ch = d2.channels[ci];
9150
+ for (let ci = 0; ci < d3.channels.length; ci++) {
9151
+ const ch = d3.channels[ci];
9117
9152
  const cp = `channels[${ci}]`;
9118
9153
  if (ch == null || typeof ch !== "object") {
9119
9154
  throw new DocumentValidationError(cp, "must be a non-null object");
@@ -9177,7 +9212,7 @@ function renderWaveform(channels, ctx) {
9177
9212
  const start = Math.floor(i2 * scale);
9178
9213
  const end = Math.max(start + 1, Math.floor((i2 + step * 2) * scale));
9179
9214
  let sum = 0;
9180
- for (let j2 = start; j2 < end; j2++) sum += Math.abs(channel[j2] ?? 0);
9215
+ for (let j = start; j < end; j++) sum += Math.abs(channel[j] ?? 0);
9181
9216
  const value = sum / (end - start);
9182
9217
  let x2 = i2;
9183
9218
  let y3 = value * (height / 2);
@@ -10518,7 +10553,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
10518
10553
  highlighted.value = null;
10519
10554
  return;
10520
10555
  }
10521
- const { highlightCode } = await import("./highlight-B6rbGA8f.js");
10556
+ const { highlightCode } = await import("./highlight-D3MWj8e2.js");
10522
10557
  if (run === seq) highlighted.value = highlightCode(code, lang ?? "");
10523
10558
  },
10524
10559
  { immediate: true }
@@ -12708,11 +12743,11 @@ function focusFirst$1(candidates) {
12708
12743
  function isPointInPolygon(point, polygon) {
12709
12744
  const { x: x2, y: y3 } = point;
12710
12745
  let inside = false;
12711
- for (let i2 = 0, j2 = polygon.length - 1; i2 < polygon.length; j2 = i2++) {
12746
+ for (let i2 = 0, j = polygon.length - 1; i2 < polygon.length; j = i2++) {
12712
12747
  const xi = polygon[i2].x;
12713
12748
  const yi = polygon[i2].y;
12714
- const xj = polygon[j2].x;
12715
- const yj = polygon[j2].y;
12749
+ const xj = polygon[j].x;
12750
+ const yj = polygon[j].y;
12716
12751
  const intersect = yi > y3 !== yj > y3 && x2 < (xj - xi) * (y3 - yi) / (yj - yi) + xi;
12717
12752
  if (intersect) inside = !inside;
12718
12753
  }
@@ -14098,7 +14133,7 @@ const flip$1 = function(options) {
14098
14133
  const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
14099
14134
  if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
14100
14135
  // overflows the main axis.
14101
- overflowsData.every((d2) => getSideAxis(d2.placement) === initialSideAxis ? d2.overflows[0] > 0 : true)) {
14136
+ overflowsData.every((d3) => getSideAxis(d3.placement) === initialSideAxis ? d3.overflows[0] > 0 : true)) {
14102
14137
  return {
14103
14138
  data: {
14104
14139
  index: nextIndex,
@@ -14110,20 +14145,20 @@ const flip$1 = function(options) {
14110
14145
  };
14111
14146
  }
14112
14147
  }
14113
- let resetPlacement = (_overflowsData$filter = overflowsData.filter((d2) => d2.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
14148
+ let resetPlacement = (_overflowsData$filter = overflowsData.filter((d3) => d3.overflows[0] <= 0).sort((a2, b2) => a2.overflows[1] - b2.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
14114
14149
  if (!resetPlacement) {
14115
14150
  switch (fallbackStrategy) {
14116
14151
  case "bestFit": {
14117
14152
  var _overflowsData$filter2;
14118
- const placement2 = (_overflowsData$filter2 = overflowsData.filter((d2) => {
14153
+ const placement2 = (_overflowsData$filter2 = overflowsData.filter((d3) => {
14119
14154
  if (hasFallbackAxisSideDirection) {
14120
- const currentSideAxis = getSideAxis(d2.placement);
14155
+ const currentSideAxis = getSideAxis(d3.placement);
14121
14156
  return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
14122
14157
  // reading directions favoring greater width.
14123
14158
  currentSideAxis === "y";
14124
14159
  }
14125
14160
  return true;
14126
- }).map((d2) => [d2.placement, d2.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
14161
+ }).map((d3) => [d3.placement, d3.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a2, b2) => a2[1] - b2[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
14127
14162
  if (placement2) {
14128
14163
  resetPlacement = placement2;
14129
14164
  }
@@ -18315,120 +18350,146 @@ function A() {
18315
18350
  return { async: false, breaks: false, extensions: null, gfm: true, hooks: null, pedantic: false, renderer: null, silent: false, tokenizer: null, walkTokens: null };
18316
18351
  }
18317
18352
  var T = A();
18318
- function j(u4) {
18319
- T = u4;
18353
+ function U(l4) {
18354
+ T = l4;
18320
18355
  }
18321
18356
  var E$1 = { exec: () => null };
18322
- function I(u4) {
18357
+ function I(l4) {
18323
18358
  let e3 = [];
18324
18359
  return (t2) => {
18325
- let n2 = Math.max(0, Math.min(3, t2 - 1)), s2 = e3[n2];
18326
- return s2 || (s2 = u4(n2), e3[n2] = s2), s2;
18360
+ let n2 = Math.max(0, Math.min(3, t2 - 1)), i2 = e3[n2];
18361
+ return i2 || (i2 = l4(n2), e3[n2] = i2), i2;
18327
18362
  };
18328
18363
  }
18329
- function k(u4, e3 = "") {
18330
- let t2 = typeof u4 == "string" ? u4 : u4.source, n2 = { replace: (s2, r2) => {
18364
+ function d$2(l4, e3 = "") {
18365
+ let t2 = typeof l4 == "string" ? l4 : l4.source, n2 = { replace: (i2, r2) => {
18331
18366
  let o2 = typeof r2 == "string" ? r2 : r2.source;
18332
- return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(s2, o2), n2;
18367
+ return o2 = o2.replace(m$1.caret, "$1"), t2 = t2.replace(i2, o2), n2;
18333
18368
  }, getRegex: () => new RegExp(t2, e3) };
18334
18369
  return n2;
18335
18370
  }
18336
- var Te = ((u4 = "") => {
18371
+ var we = ((l4 = "") => {
18337
18372
  try {
18338
- return !!new RegExp("(?<=1)(?<!1)" + u4);
18373
+ return !!new RegExp("(?<=1)(?<!1)" + l4);
18339
18374
  } catch {
18340
18375
  return false;
18341
18376
  }
18342
- })(), m$1 = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/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: (u4) => new RegExp(`^( {0,3}${u4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((u4) => new RegExp(`^ {0,${u4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((u4) => new RegExp(`^ {0,${u4}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)), fencesBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}#`)), htmlBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}<(?:[a-z].*>|!--)`, "i")), blockquoteBeginRegex: I((u4) => new RegExp(`^ {0,${u4}}>`)) }, Oe = /^(?:[ \t]*(?:\n|$))+/, we = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, ye = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, q = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, Pe = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, U = / {0,3}(?:[*+-]|\d{1,9}[.)])/, oe = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, ae = k(oe).replace(/bull/g, U).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(), Se = k(oe).replace(/bull/g, U).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(), K = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/, _e = /^[^\n]+/, W = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, $e = k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", W).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), Le = k(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g, U).getRegex(), Q = "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", X = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, ze = k("^ {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", X).replace("tag", Q).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), le = (u4) => k(K).replace("hr", q).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", u4).replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Q).getRegex(), Ee = le(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/), Me = le(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/), Ae = k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", Me).getRegex(), J = { blockquote: Ae, code: we, def: $e, fences: ye, heading: Pe, hr: q, html: ze, lheading: ae, list: Le, newline: Oe, paragraph: Ee, table: E$1, text: _e }, se = k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", q).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", Q).getRegex(), Ie = { ...J, lheading: Se, table: se, paragraph: k(K).replace("hr", q).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", se).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", Q).getRegex() }, Ce = { ...J, html: k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", X).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: k(K).replace("hr", q).replace("heading", ` *#{1,6} *[^
18343
- ]`).replace("lheading", ae).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Be = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, De = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, ue = /^( {2,}|\\)\n(?!\s*$)/, qe = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _ = /[\p{P}\p{S}]/u, C$1 = /[\s\p{P}\p{S}]/u, v$1 = /[^\s\p{P}\p{S}]/u, ve = k(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, C$1).getRegex(), He = /[\p{Pi}\p{Ps}"']/u, pe = /(?!~)[\p{P}\p{S}]/u, Ze = /(?!~)[\s\p{P}\p{S}]/u, Ge = /(?:[^\s\p{P}\p{S}]|~)/u, Qe = k(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", Te ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), ce = /^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/, Ne = k(ce, "u").replace(/punct/g, _).getRegex(), je = k(ce, "u").replace(/punct/g, pe).getRegex(), Fe = /^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/, Ue = k(Fe, "u").replace(/openQuote/g, He).replace(/punct/g, _).getRegex(), he = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ke = k(he, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), We = k(he, "gu").replace(/notPunctSpace/g, Ge).replace(/punctSpace/g, Ze).replace(/punct/g, pe).getRegex(), Xe = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)", Je = k(Xe, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ve = k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), Ye = "^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)", et = k(Ye, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), tt = k(/^~~?(?:((?!~)punct)|[^\s~])/, "u").replace(/punct/g, _).getRegex(), nt = "^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)", rt = k(nt, "gu").replace(/notPunctSpace/g, v$1).replace(/punctSpace/g, C$1).replace(/punct/g, _).getRegex(), st = k(/\\(punct)/, "gu").replace(/punct/g, _).getRegex(), it = k(/^<(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(), ot = k(X).replace("(?:-->|$)", "-->").getRegex(), at = k("^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", ot).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), lt = /\[(?:\\[\s\S]|[^\[\]\\])*\]/, G = k(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets", lt).getRegex(), ut = k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label", G).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), ke = k(/^!?\[(label)\]\[(ref)\]/).replace("label", G).replace("ref", W).getRegex(), de = k(/^!?\[(ref)\](?:\[\])?/).replace("ref", W).getRegex(), pt = k("reflink|nolink(?!\\()", "g").replace("reflink", ke).replace("nolink", de).getRegex(), ie = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, V = { _backpedal: E$1, anyPunctuation: st, autolink: it, blockSkip: Qe, br: ue, code: De, del: E$1, delLDelim: E$1, delRDelim: E$1, emStrongLDelim: Ne, emStrongRDelimAst: Ke, emStrongRDelimUnd: Ve, escape: Be, link: ut, nolink: de, punctuation: ve, reflink: ke, reflinkSearch: pt, tag: at, text: qe, url: E$1 }, ct = { ...V, emStrongLDelim: Ue, emStrongRDelimAst: Je, emStrongRDelimUnd: et, link: k(/^!?\[(label)\]\((.*?)\)/).replace("label", G).getRegex(), reflink: k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", G).getRegex() }, F = { ...V, emStrongRDelimAst: We, emStrongLDelim: je, delLDelim: tt, delRDelim: rt, url: k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ie).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: k(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ie).getRegex() }, ht = { ...F, br: k(ue).replace("{2,}", "*").getRegex(), text: k(F.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, H = { normal: J, gfm: Ie, pedantic: Ce }, B = { normal: V, gfm: F, breaks: ht, pedantic: ct };
18344
- var kt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ge = (u4) => kt[u4];
18345
- function R(u4, e3) {
18377
+ })(), 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: (l4) => new RegExp(`^( {0,3}${l4})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)), hrRegex: I((l4) => new RegExp(`^ {0,${l4}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)), fencesBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:\`\`\`|~~~)`)), headingBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}#`)), htmlBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}(?:</?(?:${H})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`, "i")), blockquoteBeginRegex: I((l4) => new RegExp(`^ {0,${l4}}>`)) }, 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 = (l4) => 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", l4).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} *[^
18378
+ ]`).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 };
18379
+ var mt = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, fe = (l4) => mt[l4];
18380
+ function R(l4, e3) {
18346
18381
  if (e3) {
18347
- if (m$1.escapeTest.test(u4)) return u4.replace(m$1.escapeReplace, ge);
18348
- } else if (m$1.escapeTestNoEncode.test(u4)) return u4.replace(m$1.escapeReplaceNoEncode, ge);
18349
- return u4;
18382
+ if (m$1.escapeTest.test(l4)) return l4.replace(m$1.escapeReplace, fe);
18383
+ } else if (m$1.escapeTestNoEncode.test(l4)) return l4.replace(m$1.escapeReplaceNoEncode, fe);
18384
+ return l4;
18350
18385
  }
18351
- function Y(u4) {
18386
+ function ee(l4) {
18352
18387
  try {
18353
- u4 = encodeURI(u4).replace(m$1.percentDecode, "%");
18388
+ l4 = encodeURI(l4).replace(m$1.percentDecode, "%");
18354
18389
  } catch {
18355
18390
  return null;
18356
18391
  }
18357
- return u4;
18392
+ return l4;
18358
18393
  }
18359
- function ee(u4, e3) {
18360
- let t2 = u4.replace(m$1.findPipe, (r2, o2, i2) => {
18361
- let l2 = false, a2 = o2;
18362
- for (; --a2 >= 0 && i2[a2] === "\\"; ) l2 = !l2;
18363
- return l2 ? "|" : " |";
18364
- }), n2 = t2.split(m$1.splitPipe), s2 = 0;
18394
+ function te(l4, e3) {
18395
+ let t2 = l4.replace(m$1.findPipe, (r2, o2, s2) => {
18396
+ let u2 = false, a2 = o2;
18397
+ for (; --a2 >= 0 && s2[a2] === "\\"; ) u2 = !u2;
18398
+ return u2 ? "|" : " |";
18399
+ }), n2 = t2.split(m$1.splitPipe), i2 = 0;
18365
18400
  if (n2[0].trim() || n2.shift(), n2.length > 0 && !n2.at(-1)?.trim() && n2.pop(), e3) if (n2.length > e3) n2.splice(e3);
18366
18401
  else for (; n2.length < e3; ) n2.push("");
18367
- for (; s2 < n2.length; s2++) n2[s2] = n2[s2].trim().replace(m$1.slashPipe, "|");
18402
+ for (; i2 < n2.length; i2++) n2[i2] = n2[i2].trim().replace(m$1.slashPipe, "|");
18368
18403
  return n2;
18369
18404
  }
18370
- function $(u4, e3, t2) {
18371
- let n2 = u4.length;
18405
+ function $(l4, e3, t2) {
18406
+ let n2 = l4.length;
18372
18407
  if (n2 === 0) return "";
18373
- let s2 = 0;
18374
- for (; s2 < n2; ) {
18375
- let r2 = u4.charAt(n2 - s2 - 1);
18376
- if (r2 === e3 && true) s2++;
18408
+ let i2 = 0;
18409
+ for (; i2 < n2; ) {
18410
+ let r2 = l4.charAt(n2 - i2 - 1);
18411
+ if (r2 === e3 && true) i2++;
18377
18412
  else break;
18378
18413
  }
18379
- return u4.slice(0, n2 - s2);
18414
+ return l4.slice(0, n2 - i2);
18380
18415
  }
18381
- function te(u4) {
18382
- let e3 = u4.split(`
18416
+ function ne(l4) {
18417
+ let e3 = l4.split(`
18383
18418
  `), t2 = e3.length - 1;
18384
18419
  for (; t2 >= 0 && m$1.blankLine.test(e3[t2]); ) t2--;
18385
- return e3.length - t2 <= 2 ? u4 : e3.slice(0, t2 + 1).join(`
18420
+ return e3.length - t2 <= 2 ? l4 : e3.slice(0, t2 + 1).join(`
18386
18421
  `);
18387
18422
  }
18388
- function fe(u4, e3) {
18389
- if (u4.indexOf(e3[1]) === -1) return -1;
18423
+ function D(l4) {
18424
+ return l4.toLowerCase().toUpperCase().toLowerCase();
18425
+ }
18426
+ function me(l4, e3) {
18427
+ if (l4.indexOf(e3[1]) === -1) return -1;
18390
18428
  let t2 = 0;
18391
- for (let n2 = 0; n2 < u4.length; n2++) if (u4[n2] === "\\") n2++;
18392
- else if (u4[n2] === e3[0]) t2++;
18393
- else if (u4[n2] === e3[1] && (t2--, t2 < 0)) return n2;
18429
+ for (let n2 = 0; n2 < l4.length; n2++) if (l4[n2] === "\\") n2++;
18430
+ else if (l4[n2] === e3[0]) t2++;
18431
+ else if (l4[n2] === e3[1] && (t2--, t2 < 0)) return n2;
18394
18432
  return t2 > 0 ? -2 : -1;
18395
18433
  }
18396
- function me(u4, e3 = 0) {
18434
+ function xe(l4, e3 = 0) {
18397
18435
  let t2 = e3, n2 = "";
18398
- for (let s2 of u4) if (s2 === " ") {
18436
+ for (let i2 of l4) if (i2 === " ") {
18399
18437
  let r2 = 4 - t2 % 4;
18400
18438
  n2 += " ".repeat(r2), t2 += r2;
18401
- } else n2 += s2, t2++;
18439
+ } else n2 += i2, t2++;
18402
18440
  return n2;
18403
18441
  }
18404
- function xe(u4, e3, t2, n2, s2) {
18405
- let r2 = e3.href, o2 = e3.title || null, i2 = u4[1].replace(s2.other.outputLinkReplace, "$1"), l2 = u4[0].charAt(0) === "!";
18442
+ function be(l4, e3, t2, n2, i2) {
18443
+ let r2 = e3.href, o2 = e3.title || null, s2 = l4[1].replace(i2.other.outputLinkReplace, "$1"), u2 = l4[0].charAt(0) === "!";
18406
18444
  n2.state.inLink = true;
18407
18445
  let a2 = n2.state.linkEmitted, p2 = n2.state.inRawBlock;
18408
18446
  n2.state.linkEmitted = false;
18409
- let c2 = n2.inlineTokens(i2), h2 = n2.state.linkEmitted;
18410
- if (n2.state.linkEmitted = a2, n2.state.inLink = false, !l2) {
18447
+ let c2 = n2.inlineTokens(s2), h2 = n2.state.linkEmitted;
18448
+ if (n2.state.linkEmitted = a2, n2.state.inLink = false, !u2) {
18411
18449
  if (h2) {
18412
18450
  n2.state.inRawBlock = p2;
18413
18451
  return;
18414
18452
  }
18415
18453
  n2.state.linkEmitted = true;
18416
18454
  }
18417
- return { type: l2 ? "image" : "link", raw: t2, href: r2, title: o2, text: i2, tokens: c2 };
18455
+ return { type: u2 ? "image" : "link", raw: t2, href: r2, title: o2, text: s2, tokens: c2 };
18418
18456
  }
18419
- function dt(u4, e3, t2) {
18420
- let n2 = u4.match(t2.other.indentCodeCompensation);
18457
+ function xt(l4, e3, t2) {
18458
+ let n2 = l4.match(t2.other.indentCodeCompensation);
18421
18459
  if (n2 === null) return e3;
18422
- let s2 = n2[1];
18460
+ let i2 = n2[1];
18423
18461
  return e3.split(`
18424
18462
  `).map((r2) => {
18425
18463
  let o2 = r2.match(t2.other.beginningSpace);
18426
18464
  if (o2 === null) return r2;
18427
- let [i2] = o2;
18428
- return r2.slice(Math.min(i2.length, s2.length));
18465
+ let [s2] = o2;
18466
+ return r2.slice(Math.min(s2.length, i2.length));
18429
18467
  }).join(`
18430
18468
  `);
18431
18469
  }
18470
+ function Re(l4, e3, t2, n2) {
18471
+ if (!e3.includes("<")) return false;
18472
+ for (let i2 = 0; i2 < e3.length; i2++) {
18473
+ if (e3[i2] === "\\") {
18474
+ i2++;
18475
+ continue;
18476
+ }
18477
+ if (e3[i2] === "`") {
18478
+ let s2 = n2.inline.code.exec(e3.slice(i2));
18479
+ if (s2) {
18480
+ i2 += s2[0].length - 1;
18481
+ continue;
18482
+ }
18483
+ }
18484
+ if (e3[i2] !== "<") continue;
18485
+ let r2 = l4.slice(t2 + i2), o2 = n2.inline.tag.exec(r2) || n2.inline.autolink.exec(r2);
18486
+ if (o2) {
18487
+ if (o2[0].length > e3.length - i2) return true;
18488
+ i2 += o2[0].length - 1;
18489
+ }
18490
+ }
18491
+ return false;
18492
+ }
18432
18493
  var y$1 = class y {
18433
18494
  options;
18434
18495
  rules;
@@ -18443,15 +18504,15 @@ var y$1 = class y {
18443
18504
  code(e3) {
18444
18505
  let t2 = this.rules.block.code.exec(e3);
18445
18506
  if (t2) {
18446
- let n2 = this.options.pedantic ? t2[0] : te(t2[0]), s2 = n2.replace(this.rules.other.codeRemoveIndent, "");
18447
- return { type: "code", raw: n2, codeBlockStyle: "indented", text: s2 };
18507
+ let n2 = this.options.pedantic ? t2[0] : ne(t2[0]), i2 = n2.replace(this.rules.other.codeRemoveIndent, "");
18508
+ return { type: "code", raw: n2, codeBlockStyle: "indented", text: i2 };
18448
18509
  }
18449
18510
  }
18450
18511
  fences(e3) {
18451
18512
  let t2 = this.rules.block.fences.exec(e3);
18452
18513
  if (t2) {
18453
- let n2 = t2[0], s2 = dt(n2, t2[3] || "", this.rules);
18454
- return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: s2 };
18514
+ let n2 = t2[0], i2 = xt(n2, t2[3] || "", this.rules);
18515
+ return { type: "code", raw: n2, lang: t2[2] ? t2[2].trim().replace(this.rules.inline.anyPunctuation, "$1") : t2[2], text: i2 };
18455
18516
  }
18456
18517
  }
18457
18518
  heading(e3) {
@@ -18459,8 +18520,8 @@ var y$1 = class y {
18459
18520
  if (t2) {
18460
18521
  let n2 = t2[2].trim();
18461
18522
  if (this.rules.other.endingHash.test(n2)) {
18462
- let s2 = $(n2, "#");
18463
- (this.options.pedantic || !s2 || this.rules.other.endingSpaceTabChar.test(s2)) && (n2 = s2.trim());
18523
+ let i2 = $(n2, "#");
18524
+ (this.options.pedantic || !i2 || this.rules.other.endingSpaceTabChar.test(i2)) && (n2 = i2.trim());
18464
18525
  }
18465
18526
  return { type: "heading", raw: $(t2[0], `
18466
18527
  `), depth: t2[1].length, text: n2, tokens: this.lexer.inline(n2) };
@@ -18476,77 +18537,77 @@ var y$1 = class y {
18476
18537
  if (t2) {
18477
18538
  let n2 = $(t2[0], `
18478
18539
  `).split(`
18479
- `), s2 = "", r2 = "", o2 = [];
18540
+ `), i2 = "", r2 = "", o2 = [];
18480
18541
  for (; n2.length > 0; ) {
18481
- let i2 = false, l2 = [], a2;
18482
- for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) l2.push(n2[a2]), i2 = true;
18483
- else if (!i2) l2.push(n2[a2]);
18542
+ let s2 = false, u2 = [], a2;
18543
+ for (a2 = 0; a2 < n2.length; a2++) if (this.rules.other.blockquoteStart.test(n2[a2])) u2.push(n2[a2]), s2 = true;
18544
+ else if (!s2) u2.push(n2[a2]);
18484
18545
  else break;
18485
18546
  n2 = n2.slice(a2);
18486
- let p2 = l2.join(`
18547
+ let p2 = u2.join(`
18487
18548
  `), c2 = p2.replace(this.rules.other.blockquoteSetextReplace, `
18488
18549
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
18489
- s2 = s2 ? `${s2}
18550
+ i2 = i2 ? `${i2}
18490
18551
  ${p2}` : p2, r2 = r2 ? `${r2}
18491
18552
  ${c2}` : c2;
18492
18553
  let h2 = this.lexer.state.top;
18493
18554
  if (this.lexer.state.top = true, this.lexer.blockTokens(c2, o2, true), this.lexer.state.top = h2, n2.length === 0) break;
18494
- let d2 = o2.at(-1);
18495
- if (d2?.type === "code") break;
18496
- if (d2?.type === "blockquote") {
18497
- let O = d2, g2 = n2.join(`
18555
+ let k = o2.at(-1);
18556
+ if (k?.type === "code") break;
18557
+ if (k?.type === "blockquote") {
18558
+ let O = k, g2 = n2.join(`
18498
18559
  `), w2 = O.raw + `
18499
18560
  ` + g2.replace(this.rules.other.blockquoteSetextReplace2, ""), z = this.blockquote(w2);
18500
- o2[o2.length - 1] = z, s2 = `${s2}
18561
+ o2[o2.length - 1] = z, i2 = `${i2}
18501
18562
  ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18502
18563
  break;
18503
- } else if (d2?.type === "list") {
18504
- let O = d2, g2 = O.raw + `
18564
+ } else if (k?.type === "list") {
18565
+ let O = k, g2 = O.raw + `
18505
18566
  ` + n2.join(`
18506
18567
  `), w2 = this.list(g2);
18507
- o2[o2.length - 1] = w2, s2 = s2.substring(0, s2.length - d2.raw.length) + w2.raw, r2 = r2.substring(0, r2.length - O.raw.length) + w2.raw, n2 = g2.substring(o2.at(-1).raw.length).split(`
18568
+ 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(`
18508
18569
  `);
18509
18570
  continue;
18510
18571
  }
18511
18572
  }
18512
- return { type: "blockquote", raw: s2, tokens: o2, text: r2 };
18573
+ return { type: "blockquote", raw: i2, tokens: o2, text: r2 };
18513
18574
  }
18514
18575
  }
18515
18576
  list(e3) {
18516
18577
  let t2 = this.rules.block.list.exec(e3);
18517
18578
  if (t2) {
18518
- let n2 = t2[1].trim(), s2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: s2, start: s2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
18519
- n2 = s2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = s2 ? n2 : "[*+-]");
18520
- let o2 = this.rules.other.listItemRegex(n2), i2 = false;
18579
+ let n2 = t2[1].trim(), i2 = n2.length > 1, r2 = { type: "list", raw: "", ordered: i2, start: i2 ? +n2.slice(0, -1) : "", loose: false, items: [] };
18580
+ n2 = i2 ? `\\d{1,9}\\${n2.slice(-1)}` : `\\${n2}`, this.options.pedantic && (n2 = i2 ? n2 : "[*+-]");
18581
+ let o2 = this.rules.other.listItemRegex(n2), s2 = false;
18521
18582
  for (; e3; ) {
18522
18583
  let a2 = false, p2 = "", c2 = "";
18523
18584
  if (!(t2 = o2.exec(e3)) || this.rules.block.hr.test(e3)) break;
18524
18585
  p2 = t2[0], e3 = e3.substring(p2.length);
18525
- let h2 = me(t2[2].split(`
18526
- `, 1)[0], t2[1].length), d2 = e3.split(`
18586
+ let h2 = xe(t2[2].split(`
18587
+ `, 1)[0], t2[1].length), k = e3.split(`
18527
18588
  `, 1)[0], O = !h2.trim(), g2 = 0;
18528
- 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(d2) && (p2 += d2 + `
18529
- `, e3 = e3.substring(d2.length + 1), a2 = true), !a2) {
18530
- let w2 = this.rules.other.nextBulletRegex(g2), z = this.rules.other.hrRegex(g2), ne = this.rules.other.fencesBeginRegex(g2), re = this.rules.other.headingBeginRegex(g2), be = this.rules.other.htmlBeginRegex(g2), Re = this.rules.other.blockquoteBeginRegex(g2);
18589
+ 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 + `
18590
+ `, e3 = e3.substring(k.length + 1), a2 = true), !a2) {
18591
+ 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);
18531
18592
  for (; e3; ) {
18532
- let N = e3.split(`
18533
- `, 1)[0], D;
18534
- if (d2 = N, this.options.pedantic ? (d2 = d2.replace(this.rules.other.listReplaceNesting, " "), D = d2) : D = d2.replace(this.rules.other.tabCharGlobal, " "), ne.test(d2) || re.test(d2) || be.test(d2) || Re.test(d2) || w2.test(d2) || z.test(d2)) break;
18535
- if (D.search(this.rules.other.nonSpaceChar) >= g2 || !d2.trim()) c2 += `
18536
- ` + D.slice(g2);
18593
+ let j = e3.split(`
18594
+ `, 1)[0], q;
18595
+ 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;
18596
+ if (q.search(this.rules.other.nonSpaceChar) >= g2 || !k.trim()) c2 += `
18597
+ ` + q.slice(g2);
18537
18598
  else {
18538
- if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || ne.test(h2) || re.test(h2) || z.test(h2)) break;
18599
+ if (O || h2.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || re.test(h2) || se.test(h2) || z.test(h2)) break;
18539
18600
  c2 += `
18540
- ` + d2;
18601
+ ` + k;
18541
18602
  }
18542
- O = !d2.trim(), p2 += N + `
18543
- `, e3 = e3.substring(N.length + 1), h2 = D.slice(g2);
18603
+ O = !k.trim(), p2 += j + `
18604
+ `, e3 = e3.substring(j.length + 1), h2 = q.slice(g2);
18544
18605
  }
18545
18606
  }
18546
- r2.loose || (i2 ? r2.loose = true : this.rules.other.doubleBlankLine.test(p2) && (i2 = 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;
18607
+ 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;
18547
18608
  }
18548
- let l2 = r2.items.at(-1);
18549
- if (l2) l2.raw = l2.raw.trimEnd(), l2.text = l2.text.trimEnd();
18609
+ let u2 = r2.items.at(-1);
18610
+ if (u2) u2.raw = u2.raw.trimEnd(), u2.text = u2.text.trimEnd();
18550
18611
  else return;
18551
18612
  r2.raw = r2.raw.trimEnd();
18552
18613
  for (let a2 of r2.items) if (this.lexer.state.top = false, a2.tokens = this.lexer.blockTokens(a2.text, []), !r2.loose) {
@@ -18578,28 +18639,28 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18578
18639
  html(e3) {
18579
18640
  let t2 = this.rules.block.html.exec(e3);
18580
18641
  if (t2) {
18581
- let n2 = te(t2[0]);
18642
+ let n2 = ne(t2[0]);
18582
18643
  return { type: "html", block: true, raw: n2, pre: t2[1] === "pre" || t2[1] === "script" || t2[1] === "style", text: n2 };
18583
18644
  }
18584
18645
  }
18585
18646
  def(e3) {
18586
18647
  let t2 = this.rules.block.def.exec(e3);
18587
18648
  if (t2) {
18588
- let n2 = t2[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal, " "), s2 = 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];
18649
+ 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];
18589
18650
  return { type: "def", tag: n2, raw: $(t2[0], `
18590
- `), href: s2, title: r2 };
18651
+ `), href: i2, title: r2 };
18591
18652
  }
18592
18653
  }
18593
18654
  table(e3) {
18594
18655
  let t2 = this.rules.block.table.exec(e3);
18595
18656
  if (!t2 || !this.rules.other.tableDelimiter.test(t2[2])) return;
18596
- let n2 = ee(t2[1]), s2 = t2[2].replace(this.rules.other.tableAlignChars, "").split("|"), r2 = t2[3]?.trim() ? t2[3].replace(this.rules.other.tableRowBlankLine, "").split(`
18657
+ 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(`
18597
18658
  `) : [], o2 = { type: "table", raw: $(t2[0], `
18598
18659
  `), header: [], align: [], rows: [] };
18599
- if (n2.length === s2.length) {
18600
- for (let i2 of s2) this.rules.other.tableAlignRight.test(i2) ? o2.align.push("right") : this.rules.other.tableAlignCenter.test(i2) ? o2.align.push("center") : this.rules.other.tableAlignLeft.test(i2) ? o2.align.push("left") : o2.align.push(null);
18601
- for (let i2 = 0; i2 < n2.length; i2++) o2.header.push({ text: n2[i2], tokens: this.lexer.inline(n2[i2]), header: true, align: o2.align[i2] });
18602
- for (let i2 of r2) o2.rows.push(ee(i2, o2.header.length).map((l2, a2) => ({ text: l2, tokens: this.lexer.inline(l2), header: false, align: o2.align[a2] })));
18660
+ if (n2.length === i2.length) {
18661
+ 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);
18662
+ 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] });
18663
+ 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] })));
18603
18664
  return o2;
18604
18665
  }
18605
18666
  }
@@ -18634,59 +18695,63 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18634
18695
  link(e3) {
18635
18696
  let t2 = this.rules.inline.link.exec(e3);
18636
18697
  if (t2) {
18637
- let n2 = t2[2].trim();
18638
- if (!this.options.pedantic && this.rules.other.startAngleBracket.test(n2)) {
18639
- if (!this.rules.other.endAngleBracket.test(n2)) return;
18640
- let o2 = $(n2.slice(0, -1), "\\");
18641
- if ((n2.length - o2.length) % 2 === 0) return;
18698
+ let n2 = t2[0].charAt(0) === "!" ? 2 : 1;
18699
+ if (!this.options.pedantic && Re(e3, t2[1], n2, this.rules)) return;
18700
+ let i2 = t2[2].trim();
18701
+ if (!this.options.pedantic && this.rules.other.startAngleBracket.test(i2)) {
18702
+ if (!this.rules.other.endAngleBracket.test(i2)) return;
18703
+ let s2 = $(i2.slice(0, -1), "\\");
18704
+ if ((i2.length - s2.length) % 2 === 0) return;
18642
18705
  } else {
18643
- let o2 = fe(t2[2], "()");
18644
- if (o2 === -2) return;
18645
- if (o2 > -1) {
18646
- let l2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + o2;
18647
- t2[2] = t2[2].substring(0, o2), t2[0] = t2[0].substring(0, l2).trim(), t2[3] = "";
18706
+ let s2 = me(t2[2], "()");
18707
+ if (s2 === -2) return;
18708
+ if (s2 > -1) {
18709
+ let a2 = (t2[0].indexOf("!") === 0 ? 5 : 4) + t2[1].length + s2;
18710
+ t2[2] = t2[2].substring(0, s2), t2[0] = t2[0].substring(0, a2).trim(), t2[3] = "";
18648
18711
  }
18649
18712
  }
18650
- let s2 = t2[2], r2 = "";
18713
+ let r2 = t2[2], o2 = "";
18651
18714
  if (this.options.pedantic) {
18652
- let o2 = this.rules.other.pedanticHrefTitle.exec(s2);
18653
- o2 && (s2 = o2[1], r2 = o2[3]);
18654
- } else r2 = t2[3] ? t2[3].slice(1, -1) : "";
18655
- return s2 = s2.trim(), this.rules.other.startAngleBracket.test(s2) && (this.options.pedantic && !this.rules.other.endAngleBracket.test(n2) ? s2 = s2.slice(1) : s2 = s2.slice(1, -1)), xe(t2, { href: s2 && s2.replace(this.rules.inline.anyPunctuation, "$1"), title: r2 && r2.replace(this.rules.inline.anyPunctuation, "$1") }, t2[0], this.lexer, this.rules);
18715
+ let s2 = this.rules.other.pedanticHrefTitle.exec(r2);
18716
+ s2 && (r2 = s2[1], o2 = s2[3]);
18717
+ } else o2 = t2[3] ? t2[3].slice(1, -1) : "";
18718
+ 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);
18656
18719
  }
18657
18720
  }
18658
18721
  reflink(e3, t2) {
18659
18722
  let n2;
18660
18723
  if ((n2 = this.rules.inline.reflink.exec(e3)) || (n2 = this.rules.inline.nolink.exec(e3))) {
18661
- let s2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), r2 = t2[s2.toLowerCase()];
18662
- if (!r2) {
18663
- let o2 = n2[0].charAt(0);
18664
- return { type: "text", raw: o2, text: o2 };
18724
+ let i2 = n2[0].charAt(0) === "!" ? 2 : 1;
18725
+ if (!this.options.pedantic && Re(e3, n2[1], i2, this.rules)) return;
18726
+ let r2 = (n2[2] || n2[1]).replace(this.rules.other.multipleSpaceGlobal, " "), o2 = t2[D(r2)];
18727
+ if (!o2) {
18728
+ let s2 = n2[0].charAt(0);
18729
+ return { type: "text", raw: s2, text: s2 };
18665
18730
  }
18666
- return xe(n2, r2, n2[0], this.lexer, this.rules);
18731
+ return be(n2, o2, n2[0], this.lexer, this.rules);
18667
18732
  }
18668
18733
  }
18669
18734
  emStrong(e3, t2, n2 = "") {
18670
- let s2 = this.rules.inline.emStrongLDelim.exec(e3);
18671
- if (!s2 || !s2[1] && !s2[2] && !s2[3] && !s2[4] || s2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
18672
- if (!(s2[1] || s2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18673
- let o2 = [...s2[0]].length - 1, i2, l2, a2 = o2, p2 = 0, c2 = s2[0][0], h2 = n2 === c2, d2 = c2 === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
18674
- for (d2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (s2 = d2.exec(t2)) !== null; ) {
18675
- if (i2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !i2) continue;
18676
- if (l2 = [...i2].length, s2[3] || s2[4]) {
18677
- a2 += l2;
18735
+ let i2 = this.rules.inline.emStrongLDelim.exec(e3);
18736
+ if (!i2 || !i2[1] && !i2[2] && !i2[3] && !i2[4] || i2[4] && n2.match(this.rules.other.unicodeAlphaNumeric)) return;
18737
+ if (!(i2[1] || i2[3] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18738
+ 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;
18739
+ for (k.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (i2 = k.exec(t2)) !== null; ) {
18740
+ if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2) continue;
18741
+ if (u2 = [...s2].length, i2[3] || i2[4]) {
18742
+ a2 += u2;
18678
18743
  continue;
18679
- } else if (s2[5] || s2[6]) {
18680
- if (o2 % 3 && !((o2 + l2) % 3)) {
18681
- p2 += l2;
18744
+ } else if (i2[5] || i2[6]) {
18745
+ if (o2 % 3 && !((o2 + u2) % 3)) {
18746
+ p2 += u2;
18682
18747
  continue;
18683
18748
  }
18684
18749
  if (h2) break;
18685
18750
  }
18686
- if (a2 -= l2, a2 > 0) continue;
18687
- l2 = Math.min(l2, l2 + a2 + p2);
18688
- let O = [...s2[0]][0].length, g2 = e3.slice(0, o2 + s2.index + O + l2);
18689
- if (Math.min(o2, l2) % 2) {
18751
+ if (a2 -= u2, a2 > 0) continue;
18752
+ u2 = Math.min(u2, u2 + a2 + p2);
18753
+ let O = [...i2[0]][0].length, g2 = e3.slice(0, o2 + i2.index + O + u2);
18754
+ if (Math.min(o2, u2) % 2) {
18690
18755
  let z = g2.slice(1, -1);
18691
18756
  return { type: "em", raw: g2, text: z, tokens: this.lexer.inlineTokens(z) };
18692
18757
  }
@@ -18698,8 +18763,8 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18698
18763
  codespan(e3) {
18699
18764
  let t2 = this.rules.inline.code.exec(e3);
18700
18765
  if (t2) {
18701
- let n2 = t2[2].replace(this.rules.other.newLineCharGlobal, " "), s2 = this.rules.other.nonSpaceChar.test(n2), r2 = this.rules.other.startingSpaceChar.test(n2) && this.rules.other.endingSpaceChar.test(n2);
18702
- return s2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t2[0], text: n2 };
18766
+ 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);
18767
+ return i2 && r2 && (n2 = n2.substring(1, n2.length - 1)), { type: "codespan", raw: t2[0], text: n2 };
18703
18768
  }
18704
18769
  }
18705
18770
  br(e3) {
@@ -18707,43 +18772,43 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18707
18772
  if (t2) return { type: "br", raw: t2[0] };
18708
18773
  }
18709
18774
  del(e3, t2, n2 = "") {
18710
- let s2 = this.rules.inline.delLDelim.exec(e3);
18711
- if (!s2) return;
18712
- if (!(s2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18713
- let o2 = [...s2[0]].length - 1, i2, l2, a2 = o2, p2 = this.rules.inline.delRDelim;
18714
- for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (s2 = p2.exec(t2)) !== null; ) {
18715
- if (i2 = s2[1] || s2[2] || s2[3] || s2[4] || s2[5] || s2[6], !i2 || (l2 = [...i2].length, l2 !== o2)) continue;
18716
- if (s2[3] || s2[4]) {
18717
- a2 += l2;
18775
+ let i2 = this.rules.inline.delLDelim.exec(e3);
18776
+ if (!i2) return;
18777
+ if (!(i2[1] || "") || !n2 || this.rules.inline.punctuation.exec(n2)) {
18778
+ let o2 = [...i2[0]].length - 1, s2, u2, a2 = o2, p2 = this.rules.inline.delRDelim;
18779
+ for (p2.lastIndex = 0, t2 = t2.slice(-1 * e3.length + o2); (i2 = p2.exec(t2)) !== null; ) {
18780
+ if (s2 = i2[1] || i2[2] || i2[3] || i2[4] || i2[5] || i2[6], !s2 || (u2 = [...s2].length, u2 !== o2)) continue;
18781
+ if (i2[3] || i2[4]) {
18782
+ a2 += u2;
18718
18783
  continue;
18719
18784
  }
18720
- if (a2 -= l2, a2 > 0) continue;
18721
- l2 = Math.min(l2, l2 + a2);
18722
- let c2 = [...s2[0]][0].length, h2 = e3.slice(0, o2 + s2.index + c2 + l2), d2 = h2.slice(o2, -o2);
18723
- return { type: "del", raw: h2, text: d2, tokens: this.lexer.inlineTokens(d2) };
18785
+ if (a2 -= u2, a2 > 0) continue;
18786
+ u2 = Math.min(u2, u2 + a2);
18787
+ let c2 = [...i2[0]][0].length, h2 = e3.slice(0, o2 + i2.index + c2 + u2), k = h2.slice(o2, -o2);
18788
+ return { type: "del", raw: h2, text: k, tokens: this.lexer.inlineTokens(k) };
18724
18789
  }
18725
18790
  }
18726
18791
  }
18727
18792
  autolink(e3) {
18728
18793
  let t2 = this.rules.inline.autolink.exec(e3);
18729
18794
  if (t2) {
18730
- let n2, s2;
18731
- return t2[2] === "@" ? (n2 = t2[1], s2 = "mailto:" + n2) : (n2 = t2[1], s2 = n2), { type: "link", raw: t2[0], text: n2, href: s2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
18795
+ let n2, i2;
18796
+ 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 }] };
18732
18797
  }
18733
18798
  }
18734
18799
  url(e3) {
18735
18800
  let t2;
18736
18801
  if (t2 = this.rules.inline.url.exec(e3)) {
18737
- let n2, s2;
18738
- if (t2[2] === "@") n2 = t2[0], s2 = "mailto:" + n2;
18802
+ let n2, i2;
18803
+ if (t2[2] === "@") n2 = t2[0], i2 = "mailto:" + n2;
18739
18804
  else {
18740
18805
  let r2;
18741
18806
  do
18742
18807
  r2 = t2[0], t2[0] = this.rules.inline._backpedal.exec(t2[0])?.[0] ?? "";
18743
18808
  while (r2 !== t2[0]);
18744
- n2 = t2[0], t2[1] === "www." ? s2 = "http://" + t2[0] : s2 = t2[0];
18809
+ n2 = t2[0], t2[1] === "www." ? i2 = "http://" + t2[0] : i2 = t2[0];
18745
18810
  }
18746
- return { type: "link", raw: t2[0], text: n2, href: s2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
18811
+ return { type: "link", raw: t2[0], text: n2, href: i2, autolink: true, tokens: [{ type: "text", raw: n2, text: n2 }] };
18747
18812
  }
18748
18813
  }
18749
18814
  inlineText(e3) {
@@ -18754,7 +18819,7 @@ ${g2}`, r2 = r2.substring(0, r2.length - O.text.length) + z.text;
18754
18819
  }
18755
18820
  }
18756
18821
  };
18757
- var x = class u {
18822
+ var x = class l {
18758
18823
  tokens;
18759
18824
  options;
18760
18825
  state;
@@ -18762,17 +18827,17 @@ var x = class u {
18762
18827
  tokenizer;
18763
18828
  constructor(e3) {
18764
18829
  this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = e3 || 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 };
18765
- let t2 = { other: m$1, block: H.normal, inline: B.normal };
18766
- this.options.pedantic ? (t2.block = H.pedantic, t2.inline = B.pedantic) : this.options.gfm && (t2.block = H.gfm, this.options.breaks ? t2.inline = B.breaks : t2.inline = B.gfm), this.tokenizer.rules = t2;
18830
+ let t2 = { other: m$1, block: G.normal, inline: B.normal };
18831
+ 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;
18767
18832
  }
18768
18833
  static get rules() {
18769
- return { block: H, inline: B };
18834
+ return { block: G, inline: B };
18770
18835
  }
18771
18836
  static lex(e3, t2) {
18772
- return new u(t2).lex(e3);
18837
+ return new l(t2).lex(e3);
18773
18838
  }
18774
18839
  static lexInline(e3, t2) {
18775
- return new u(t2).inlineTokens(e3);
18840
+ return new l(t2).inlineTokens(e3);
18776
18841
  }
18777
18842
  lex(e3) {
18778
18843
  e3 = e3.replace(m$1.carriageReturn, `
@@ -18785,29 +18850,29 @@ var x = class u {
18785
18850
  }
18786
18851
  blockTokens(e3, t2 = [], n2 = false) {
18787
18852
  this.tokenizer.lexer = this, this.options.pedantic && (e3 = e3.replace(m$1.tabCharGlobal, " ").replace(m$1.spaceLine, ""));
18788
- let s2 = 1 / 0;
18853
+ let i2 = 1 / 0;
18789
18854
  for (; e3; ) {
18790
- if (e3.length < s2) s2 = e3.length;
18855
+ if (e3.length < i2) i2 = e3.length;
18791
18856
  else {
18792
18857
  this.infiniteLoopError(e3.charCodeAt(0));
18793
18858
  break;
18794
18859
  }
18795
18860
  let r2;
18796
- if (this.options.extensions?.block?.some((i2) => (r2 = i2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
18861
+ if (this.options.extensions?.block?.some((s2) => (r2 = s2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(r2.raw.length), t2.push(r2), true) : false)) continue;
18797
18862
  if (r2 = this.tokenizer.space(e3)) {
18798
18863
  e3 = e3.substring(r2.raw.length);
18799
- let i2 = t2.at(-1);
18800
- r2.raw.length === 1 && i2 !== void 0 ? i2.raw += `
18864
+ let s2 = t2.at(-1);
18865
+ r2.raw.length === 1 && s2 !== void 0 ? s2.raw += `
18801
18866
  ` : t2.push(r2);
18802
18867
  continue;
18803
18868
  }
18804
18869
  if (r2 = this.tokenizer.code(e3)) {
18805
18870
  e3 = e3.substring(r2.raw.length);
18806
- let i2 = t2.at(-1);
18807
- i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18871
+ let s2 = t2.at(-1);
18872
+ s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
18808
18873
  `) ? "" : `
18809
- `) + r2.raw, i2.text += `
18810
- ` + r2.text, this.inlineQueue.at(-1).src = i2.text) : t2.push(r2);
18874
+ `) + r2.raw, s2.text += `
18875
+ ` + r2.text, this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
18811
18876
  continue;
18812
18877
  }
18813
18878
  if (r2 = this.tokenizer.fences(e3)) {
@@ -18836,11 +18901,11 @@ var x = class u {
18836
18901
  }
18837
18902
  if (r2 = this.tokenizer.def(e3)) {
18838
18903
  e3 = e3.substring(r2.raw.length);
18839
- let i2 = t2.at(-1);
18840
- i2?.type === "paragraph" || i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18904
+ let s2 = t2.at(-1);
18905
+ s2?.type === "paragraph" || s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
18841
18906
  `) ? "" : `
18842
- `) + r2.raw, i2.text += `
18843
- ` + r2.raw, this.inlineQueue.at(-1).src = i2.text) : this.tokens.links[r2.tag] || (this.tokens.links[r2.tag] = { href: r2.href, title: r2.title }, t2.push(r2));
18907
+ `) + r2.raw, s2.text += `
18908
+ ` + 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));
18844
18909
  continue;
18845
18910
  }
18846
18911
  if (r2 = this.tokenizer.table(e3)) {
@@ -18853,26 +18918,26 @@ var x = class u {
18853
18918
  }
18854
18919
  let o2 = e3;
18855
18920
  if (this.options.extensions?.startBlock) {
18856
- let i2 = 1 / 0, l2 = e3.slice(1), a2;
18921
+ let s2 = 1 / 0, u2 = e3.slice(1), a2;
18857
18922
  this.options.extensions.startBlock.forEach((p2) => {
18858
- a2 = p2.call({ lexer: this }, l2), typeof a2 == "number" && a2 >= 0 && (i2 = Math.min(i2, a2));
18859
- }), i2 < 1 / 0 && i2 >= 0 && (o2 = e3.substring(0, i2 + 1));
18923
+ a2 = p2.call({ lexer: this }, u2), typeof a2 == "number" && a2 >= 0 && (s2 = Math.min(s2, a2));
18924
+ }), s2 < 1 / 0 && s2 >= 0 && (o2 = e3.substring(0, s2 + 1));
18860
18925
  }
18861
18926
  if (this.state.top && (r2 = this.tokenizer.paragraph(o2))) {
18862
- let i2 = t2.at(-1);
18863
- n2 && i2?.type === "paragraph" ? (i2.raw += (i2.raw.endsWith(`
18927
+ let s2 = t2.at(-1);
18928
+ n2 && s2?.type === "paragraph" ? (s2.raw += (s2.raw.endsWith(`
18864
18929
  `) ? "" : `
18865
- `) + r2.raw, i2.text += `
18866
- ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i2.text) : t2.push(r2), n2 = o2.length !== e3.length, e3 = e3.substring(r2.raw.length);
18930
+ `) + r2.raw, s2.text += `
18931
+ ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2), n2 = o2.length !== e3.length, e3 = e3.substring(r2.raw.length);
18867
18932
  continue;
18868
18933
  }
18869
18934
  if (r2 = this.tokenizer.text(e3)) {
18870
18935
  e3 = e3.substring(r2.raw.length);
18871
- let i2 = t2.at(-1);
18872
- i2?.type === "text" ? (i2.raw += (i2.raw.endsWith(`
18936
+ let s2 = t2.at(-1);
18937
+ s2?.type === "text" ? (s2.raw += (s2.raw.endsWith(`
18873
18938
  `) ? "" : `
18874
- `) + r2.raw, i2.text += `
18875
- ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = i2.text) : t2.push(r2);
18939
+ `) + r2.raw, s2.text += `
18940
+ ` + r2.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = s2.text) : t2.push(r2);
18876
18941
  continue;
18877
18942
  }
18878
18943
  if (e3) {
@@ -18890,8 +18955,8 @@ var x = class u {
18890
18955
  let t2 = this.tokenizer.rules.inline.link;
18891
18956
  for (let n2 of e3.matchAll(this.tokenizer.rules.inline.blockSkip)) if (t2.test(n2[0]) && e3.charAt(n2.index - 1) !== "!") return true;
18892
18957
  for (let n2 of e3.matchAll(this.tokenizer.rules.inline.reflinkSearch)) {
18893
- let s2 = n2[0], r2 = s2.lastIndexOf("[");
18894
- if (!(s2.charAt(0) === "!" || !Object.hasOwn(this.tokens.links, s2.slice(r2 + 1, -1))) && !(r2 > 1 && this.linkInText(s2.slice(1, r2 - 1)))) return true;
18958
+ let i2 = n2[0], r2 = i2.lastIndexOf("[");
18959
+ 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;
18895
18960
  }
18896
18961
  return false;
18897
18962
  }
@@ -18899,84 +18964,84 @@ var x = class u {
18899
18964
  this.tokenizer.lexer = this;
18900
18965
  let n2 = e3;
18901
18966
  if (this.tokens.links && e3.includes("[")) {
18902
- let i2 = this.tokenizer.rules.inline.reflinkSearch, l2 = (a2) => {
18967
+ let s2 = this.tokenizer.rules.inline.reflinkSearch, u2 = (a2) => {
18903
18968
  let p2 = a2.lastIndexOf("[");
18904
- if (!Object.hasOwn(this.tokens.links, a2.slice(p2 + 1, -1))) return a2;
18969
+ if (!Object.hasOwn(this.tokens.links, D(a2.slice(p2 + 1, -1)))) return a2;
18905
18970
  if (p2 > 1 && a2.charAt(0) !== "!") {
18906
18971
  let c2 = a2.slice(1, p2 - 1);
18907
- if (this.linkInText(c2)) return "[" + c2.replace(i2, l2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
18972
+ if (this.linkInText(c2)) return "[" + c2.replace(s2, u2) + "][" + "a".repeat(a2.length - p2 - 2) + "]";
18908
18973
  }
18909
18974
  return "[" + "a".repeat(a2.length - 2) + "]";
18910
18975
  };
18911
- n2 = n2.replace(i2, l2);
18976
+ n2 = n2.replace(s2, u2);
18912
18977
  }
18913
- n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (i2) => "+".repeat(i2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (i2, l2, a2) => {
18978
+ n2 = n2.replace(this.tokenizer.rules.inline.anyPunctuation, (s2) => "+".repeat(s2.length)), n2 = n2.replace(this.tokenizer.rules.inline.blockSkip, (s2, u2, a2) => {
18914
18979
  let p2 = a2 ? a2.length : 0;
18915
- return i2.slice(0, p2) + "[" + "a".repeat(i2.length - p2 - 2) + "]";
18980
+ return s2.slice(0, p2) + "[" + "a".repeat(s2.length - p2 - 2) + "]";
18916
18981
  }), n2 = this.options.hooks?.emStrongMask?.call({ lexer: this }, n2) ?? n2;
18917
- let s2 = false, r2 = "", o2 = 1 / 0;
18982
+ let i2 = false, r2 = "", o2 = 1 / 0;
18918
18983
  for (; e3; ) {
18919
18984
  if (e3.length < o2) o2 = e3.length;
18920
18985
  else {
18921
18986
  this.infiniteLoopError(e3.charCodeAt(0));
18922
18987
  break;
18923
18988
  }
18924
- s2 || (r2 = ""), s2 = false;
18925
- let i2;
18926
- if (this.options.extensions?.inline?.some((a2) => (i2 = a2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(i2.raw.length), t2.push(i2), true) : false)) continue;
18927
- if (i2 = this.tokenizer.escape(e3)) {
18928
- e3 = e3.substring(i2.raw.length), t2.push(i2);
18989
+ i2 || (r2 = ""), i2 = false;
18990
+ let s2;
18991
+ if (this.options.extensions?.inline?.some((a2) => (s2 = a2.call({ lexer: this }, e3, t2)) ? (e3 = e3.substring(s2.raw.length), t2.push(s2), true) : false)) continue;
18992
+ if (s2 = this.tokenizer.escape(e3)) {
18993
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18929
18994
  continue;
18930
18995
  }
18931
- if (i2 = this.tokenizer.tag(e3)) {
18932
- e3 = e3.substring(i2.raw.length), t2.push(i2);
18996
+ if (s2 = this.tokenizer.tag(e3)) {
18997
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18933
18998
  continue;
18934
18999
  }
18935
- if (i2 = this.tokenizer.link(e3)) {
18936
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19000
+ if (s2 = this.tokenizer.link(e3)) {
19001
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18937
19002
  continue;
18938
19003
  }
18939
- if (i2 = this.tokenizer.reflink(e3, this.tokens.links)) {
18940
- e3 = e3.substring(i2.raw.length);
19004
+ if (s2 = this.tokenizer.reflink(e3, this.tokens.links)) {
19005
+ e3 = e3.substring(s2.raw.length);
18941
19006
  let a2 = t2.at(-1);
18942
- i2.type === "text" && a2?.type === "text" ? (a2.raw += i2.raw, a2.text += i2.text) : t2.push(i2);
19007
+ s2.type === "text" && a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
18943
19008
  continue;
18944
19009
  }
18945
- if (i2 = this.tokenizer.emStrong(e3, n2, r2)) {
18946
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19010
+ if (s2 = this.tokenizer.emStrong(e3, n2, r2)) {
19011
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18947
19012
  continue;
18948
19013
  }
18949
- if (i2 = this.tokenizer.codespan(e3)) {
18950
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19014
+ if (s2 = this.tokenizer.codespan(e3)) {
19015
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18951
19016
  continue;
18952
19017
  }
18953
- if (i2 = this.tokenizer.br(e3)) {
18954
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19018
+ if (s2 = this.tokenizer.br(e3)) {
19019
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18955
19020
  continue;
18956
19021
  }
18957
- if (i2 = this.tokenizer.del(e3, n2, r2)) {
18958
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19022
+ if (s2 = this.tokenizer.del(e3, n2, r2)) {
19023
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18959
19024
  continue;
18960
19025
  }
18961
- if (i2 = this.tokenizer.autolink(e3)) {
18962
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19026
+ if (s2 = this.tokenizer.autolink(e3)) {
19027
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18963
19028
  continue;
18964
19029
  }
18965
- if (!this.state.inLink && (i2 = this.tokenizer.url(e3))) {
18966
- e3 = e3.substring(i2.raw.length), t2.push(i2);
19030
+ if (!this.state.inLink && (s2 = this.tokenizer.url(e3))) {
19031
+ e3 = e3.substring(s2.raw.length), t2.push(s2);
18967
19032
  continue;
18968
19033
  }
18969
- let l2 = e3;
19034
+ let u2 = e3;
18970
19035
  if (this.options.extensions?.startInline) {
18971
19036
  let a2 = 1 / 0, p2 = e3.slice(1), c2;
18972
19037
  this.options.extensions.startInline.forEach((h2) => {
18973
19038
  c2 = h2.call({ lexer: this }, p2), typeof c2 == "number" && c2 >= 0 && (a2 = Math.min(a2, c2));
18974
- }), a2 < 1 / 0 && a2 >= 0 && (l2 = e3.substring(0, a2 + 1));
19039
+ }), a2 < 1 / 0 && a2 >= 0 && (u2 = e3.substring(0, a2 + 1));
18975
19040
  }
18976
- if (i2 = this.tokenizer.inlineText(l2)) {
18977
- e3 = e3.substring(i2.raw.length), i2.raw.slice(-1) !== "_" && (r2 = i2.raw.slice(-1)), s2 = true;
19041
+ if (s2 = this.tokenizer.inlineText(u2)) {
19042
+ e3 = e3.substring(s2.raw.length), s2.raw.slice(-1) !== "_" && (r2 = s2.raw.slice(-1)), i2 = true;
18978
19043
  let a2 = t2.at(-1);
18979
- a2?.type === "text" ? (a2.raw += i2.raw, a2.text += i2.text) : t2.push(i2);
19044
+ a2?.type === "text" ? (a2.raw += s2.raw, a2.text += s2.text) : t2.push(s2);
18980
19045
  continue;
18981
19046
  }
18982
19047
  if (e3) {
@@ -19002,9 +19067,9 @@ var P$1 = class P {
19002
19067
  return "";
19003
19068
  }
19004
19069
  code({ text: e3, lang: t2, escaped: n2 }) {
19005
- let s2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e3 ? e3.replace(m$1.endingNewline, "") + `
19070
+ let i2 = (t2 || "").match(m$1.notSpaceStart)?.[0], r2 = e3 ? e3.replace(m$1.endingNewline, "") + `
19006
19071
  ` : "";
19007
- return s2 ? '<pre><code class="language-' + R(s2) + '">' + (n2 ? r2 : R(r2, true)) + `</code></pre>
19072
+ return i2 ? '<pre><code class="language-' + R(i2) + '">' + (n2 ? r2 : R(r2, true)) + `</code></pre>
19008
19073
  ` : "<pre><code>" + (n2 ? r2 : R(r2, true)) + `</code></pre>
19009
19074
  `;
19010
19075
  }
@@ -19028,14 +19093,14 @@ ${this.parser.parse(e3)}</blockquote>
19028
19093
  `;
19029
19094
  }
19030
19095
  list(e3) {
19031
- let t2 = e3.ordered, n2 = e3.start, s2 = "";
19032
- for (let i2 = 0; i2 < e3.items.length; i2++) {
19033
- let l2 = e3.items[i2];
19034
- s2 += this.listitem(l2);
19096
+ let t2 = e3.ordered, n2 = e3.start, i2 = "";
19097
+ for (let s2 = 0; s2 < e3.items.length; s2++) {
19098
+ let u2 = e3.items[s2];
19099
+ i2 += this.listitem(u2);
19035
19100
  }
19036
19101
  let r2 = t2 ? "ol" : "ul", o2 = t2 && n2 !== 1 ? ' start="' + n2 + '"' : "";
19037
19102
  return "<" + r2 + o2 + `>
19038
- ` + s2 + "</" + r2 + `>
19103
+ ` + i2 + "</" + r2 + `>
19039
19104
  `;
19040
19105
  }
19041
19106
  listitem(e3) {
@@ -19053,17 +19118,17 @@ ${this.parser.parse(e3)}</blockquote>
19053
19118
  let t2 = "", n2 = "";
19054
19119
  for (let r2 = 0; r2 < e3.header.length; r2++) n2 += this.tablecell(e3.header[r2]);
19055
19120
  t2 += this.tablerow({ text: n2 });
19056
- let s2 = "";
19121
+ let i2 = "";
19057
19122
  for (let r2 = 0; r2 < e3.rows.length; r2++) {
19058
19123
  let o2 = e3.rows[r2];
19059
19124
  n2 = "";
19060
- for (let i2 = 0; i2 < o2.length; i2++) n2 += this.tablecell(o2[i2]);
19061
- s2 += this.tablerow({ text: n2 });
19125
+ for (let s2 = 0; s2 < o2.length; s2++) n2 += this.tablecell(o2[s2]);
19126
+ i2 += this.tablerow({ text: n2 });
19062
19127
  }
19063
- return s2 && (s2 = `<tbody>${s2}</tbody>`), `<table>
19128
+ return i2 && (i2 = `<tbody>${i2}</tbody>`), `<table>
19064
19129
  <thead>
19065
19130
  ` + t2 + `</thead>
19066
- ` + s2 + `</table>
19131
+ ` + i2 + `</table>
19067
19132
  `;
19068
19133
  }
19069
19134
  tablerow({ text: e3 }) {
@@ -19091,16 +19156,16 @@ ${e3}</tr>
19091
19156
  del({ tokens: e3 }) {
19092
19157
  return `<del>${this.parser.parseInline(e3)}</del>`;
19093
19158
  }
19094
- link({ href: e3, title: t2, text: n2, tokens: s2, autolink: r2 }) {
19095
- let o2 = r2 ? R(n2, true) : this.parser.parseInline(s2), i2 = Y(e3);
19096
- if (i2 === null) return o2;
19097
- e3 = R(i2, r2);
19098
- let l2 = '<a href="' + e3 + '"';
19099
- return t2 && (l2 += ' title="' + R(t2) + '"'), l2 += ">" + o2 + "</a>", l2;
19159
+ link({ href: e3, title: t2, text: n2, tokens: i2, autolink: r2 }) {
19160
+ let o2 = r2 ? R(n2, true) : this.parser.parseInline(i2), s2 = ee(e3);
19161
+ if (s2 === null) return o2;
19162
+ e3 = R(s2, r2);
19163
+ let u2 = '<a href="' + e3 + '"';
19164
+ return t2 && (u2 += ' title="' + R(t2) + '"'), u2 += ">" + o2 + "</a>", u2;
19100
19165
  }
19101
- image({ href: e3, title: t2, text: n2, tokens: s2 }) {
19102
- s2 && (n2 = this.parser.parseInline(s2, this.parser.textRenderer));
19103
- let r2 = Y(e3);
19166
+ image({ href: e3, title: t2, text: n2, tokens: i2 }) {
19167
+ i2 && (n2 = this.parser.parseInline(i2, this.parser.textRenderer));
19168
+ let r2 = ee(e3);
19104
19169
  if (r2 === null) return R(n2);
19105
19170
  e3 = r2;
19106
19171
  let o2 = `<img src="${R(e3)}" alt="${R(n2)}"`;
@@ -19142,7 +19207,7 @@ var L = class {
19142
19207
  return e3;
19143
19208
  }
19144
19209
  };
19145
- var b$1 = class u2 {
19210
+ var b$1 = class l2 {
19146
19211
  options;
19147
19212
  renderer;
19148
19213
  textRenderer;
@@ -19150,24 +19215,24 @@ var b$1 = class u2 {
19150
19215
  this.options = e3 || 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();
19151
19216
  }
19152
19217
  static parse(e3, t2) {
19153
- return new u2(t2).parse(e3);
19218
+ return new l2(t2).parse(e3);
19154
19219
  }
19155
19220
  static parseInline(e3, t2) {
19156
- return new u2(t2).parseInline(e3);
19221
+ return new l2(t2).parseInline(e3);
19157
19222
  }
19158
19223
  parse(e3) {
19159
19224
  this.renderer.parser = this;
19160
19225
  let t2 = "";
19161
19226
  for (let n2 = 0; n2 < e3.length; n2++) {
19162
- let s2 = e3[n2];
19163
- if (this.options.extensions?.renderers?.[s2.type]) {
19164
- let o2 = s2, i2 = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
19165
- if (i2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
19166
- t2 += i2 || "";
19227
+ let i2 = e3[n2];
19228
+ if (this.options.extensions?.renderers?.[i2.type]) {
19229
+ let o2 = i2, s2 = this.options.extensions.renderers[o2.type].call({ parser: this }, o2);
19230
+ if (s2 !== false || !["space", "hr", "heading", "code", "table", "blockquote", "list", "checkbox", "html", "def", "paragraph", "text"].includes(o2.type)) {
19231
+ t2 += s2 || "";
19167
19232
  continue;
19168
19233
  }
19169
19234
  }
19170
- let r2 = s2;
19235
+ let r2 = i2;
19171
19236
  switch (r2.type) {
19172
19237
  case "space": {
19173
19238
  t2 += this.renderer.space(r2);
@@ -19229,12 +19294,12 @@ var b$1 = class u2 {
19229
19294
  parseInline(e3, t2 = this.renderer) {
19230
19295
  this.renderer.parser = this;
19231
19296
  let n2 = "";
19232
- for (let s2 = 0; s2 < e3.length; s2++) {
19233
- let r2 = e3[s2];
19297
+ for (let i2 = 0; i2 < e3.length; i2++) {
19298
+ let r2 = e3[i2];
19234
19299
  if (this.options.extensions?.renderers?.[r2.type]) {
19235
- let i2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
19236
- if (i2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
19237
- n2 += i2 || "";
19300
+ let s2 = this.options.extensions.renderers[r2.type].call({ parser: this }, r2);
19301
+ if (s2 !== false || !["escape", "html", "link", "image", "checkbox", "strong", "em", "codespan", "br", "del", "text"].includes(r2.type)) {
19302
+ n2 += s2 || "";
19238
19303
  continue;
19239
19304
  }
19240
19305
  }
@@ -19285,9 +19350,9 @@ var b$1 = class u2 {
19285
19350
  break;
19286
19351
  }
19287
19352
  default: {
19288
- let i2 = 'Token with "' + o2.type + '" type was not found.';
19289
- if (this.options.silent) return console.error(i2), "";
19290
- throw new Error(i2);
19353
+ let s2 = 'Token with "' + o2.type + '" type was not found.';
19354
+ if (this.options.silent) return console.error(s2), "";
19355
+ throw new Error(s2);
19291
19356
  }
19292
19357
  }
19293
19358
  }
@@ -19321,7 +19386,7 @@ var S$1 = class S {
19321
19386
  return e3 ? b$1.parse : b$1.parseInline;
19322
19387
  }
19323
19388
  };
19324
- var Z = class {
19389
+ var Q = class {
19325
19390
  defaults = A();
19326
19391
  options = this.setOptions;
19327
19392
  parse = this.parseMarkdown(true);
@@ -19337,23 +19402,23 @@ var Z = class {
19337
19402
  }
19338
19403
  walkTokens(e3, t2) {
19339
19404
  let n2 = [];
19340
- for (let s2 of e3) switch (n2 = n2.concat(t2.call(this, s2)), s2.type) {
19405
+ for (let i2 of e3) switch (n2 = n2.concat(t2.call(this, i2)), i2.type) {
19341
19406
  case "table": {
19342
- let r2 = s2;
19407
+ let r2 = i2;
19343
19408
  for (let o2 of r2.header) n2 = n2.concat(this.walkTokens(o2.tokens, t2));
19344
- for (let o2 of r2.rows) for (let i2 of o2) n2 = n2.concat(this.walkTokens(i2.tokens, t2));
19409
+ for (let o2 of r2.rows) for (let s2 of o2) n2 = n2.concat(this.walkTokens(s2.tokens, t2));
19345
19410
  break;
19346
19411
  }
19347
19412
  case "list": {
19348
- let r2 = s2;
19413
+ let r2 = i2;
19349
19414
  n2 = n2.concat(this.walkTokens(r2.items, t2));
19350
19415
  break;
19351
19416
  }
19352
19417
  default: {
19353
- let r2 = s2;
19418
+ let r2 = i2;
19354
19419
  this.defaults.extensions?.childTokens?.[r2.type] ? this.defaults.extensions.childTokens[r2.type].forEach((o2) => {
19355
- let i2 = r2[o2].flat(1 / 0);
19356
- n2 = n2.concat(this.walkTokens(i2, t2));
19420
+ let s2 = r2[o2].flat(1 / 0);
19421
+ n2 = n2.concat(this.walkTokens(s2, t2));
19357
19422
  }) : r2.tokens && (n2 = n2.concat(this.walkTokens(r2.tokens, t2)));
19358
19423
  }
19359
19424
  }
@@ -19362,14 +19427,14 @@ var Z = class {
19362
19427
  use(...e3) {
19363
19428
  let t2 = this.defaults.extensions || { renderers: {}, childTokens: {} };
19364
19429
  return e3.forEach((n2) => {
19365
- let s2 = { ...n2 };
19366
- if (s2.async = this.defaults.async || s2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
19430
+ let i2 = { ...n2 };
19431
+ if (i2.async = this.defaults.async || i2.async || false, n2.extensions && (n2.extensions.forEach((r2) => {
19367
19432
  if (!r2.name) throw new Error("extension name required");
19368
19433
  if ("renderer" in r2) {
19369
19434
  let o2 = t2.renderers[r2.name];
19370
- o2 ? t2.renderers[r2.name] = function(...i2) {
19371
- let l2 = r2.renderer.apply(this, i2);
19372
- return l2 === false && (l2 = o2.apply(this, i2)), l2;
19435
+ o2 ? t2.renderers[r2.name] = function(...s2) {
19436
+ let u2 = r2.renderer.apply(this, s2);
19437
+ return u2 === false && (u2 = o2.apply(this, s2)), u2;
19373
19438
  } : t2.renderers[r2.name] = r2.renderer;
19374
19439
  }
19375
19440
  if ("tokenizer" in r2) {
@@ -19378,64 +19443,64 @@ var Z = class {
19378
19443
  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]));
19379
19444
  }
19380
19445
  "childTokens" in r2 && r2.childTokens && (t2.childTokens[r2.name] = r2.childTokens);
19381
- }), s2.extensions = t2), n2.renderer) {
19446
+ }), i2.extensions = t2), n2.renderer) {
19382
19447
  let r2 = this.defaults.renderer || new P$1(this.defaults);
19383
19448
  for (let o2 in n2.renderer) {
19384
19449
  if (!(o2 in r2)) throw new Error(`renderer '${o2}' does not exist`);
19385
19450
  if (["options", "parser"].includes(o2)) continue;
19386
- let i2 = o2, l2 = n2.renderer[i2], a2 = r2[i2];
19387
- r2[i2] = (...p2) => {
19388
- let c2 = l2.apply(r2, p2);
19451
+ let s2 = o2, u2 = n2.renderer[s2], a2 = r2[s2];
19452
+ r2[s2] = (...p2) => {
19453
+ let c2 = u2.apply(r2, p2);
19389
19454
  return c2 === false && (c2 = a2.apply(r2, p2)), c2 || "";
19390
19455
  };
19391
19456
  }
19392
- s2.renderer = r2;
19457
+ i2.renderer = r2;
19393
19458
  }
19394
19459
  if (n2.tokenizer) {
19395
19460
  let r2 = this.defaults.tokenizer || new y$1(this.defaults);
19396
19461
  for (let o2 in n2.tokenizer) {
19397
19462
  if (!(o2 in r2)) throw new Error(`tokenizer '${o2}' does not exist`);
19398
19463
  if (["options", "rules", "lexer"].includes(o2)) continue;
19399
- let i2 = o2, l2 = n2.tokenizer[i2], a2 = r2[i2];
19400
- r2[i2] = (...p2) => {
19401
- let c2 = l2.apply(r2, p2);
19464
+ let s2 = o2, u2 = n2.tokenizer[s2], a2 = r2[s2];
19465
+ r2[s2] = (...p2) => {
19466
+ let c2 = u2.apply(r2, p2);
19402
19467
  return c2 === false && (c2 = a2.apply(r2, p2)), c2;
19403
19468
  };
19404
19469
  }
19405
- s2.tokenizer = r2;
19470
+ i2.tokenizer = r2;
19406
19471
  }
19407
19472
  if (n2.hooks) {
19408
19473
  let r2 = this.defaults.hooks || new S$1();
19409
19474
  for (let o2 in n2.hooks) {
19410
19475
  if (!(o2 in r2)) throw new Error(`hook '${o2}' does not exist`);
19411
19476
  if (["options", "block"].includes(o2)) continue;
19412
- let i2 = o2, l2 = n2.hooks[i2], a2 = r2[i2];
19413
- S$1.passThroughHooks.has(o2) ? r2[i2] = (p2) => {
19477
+ let s2 = o2, u2 = n2.hooks[s2], a2 = r2[s2];
19478
+ S$1.passThroughHooks.has(o2) ? r2[s2] = (p2) => {
19414
19479
  if (this.defaults.async && S$1.passThroughHooksRespectAsync.has(o2)) return (async () => {
19415
- let h2 = await l2.call(r2, p2);
19480
+ let h2 = await u2.call(r2, p2);
19416
19481
  return a2.call(r2, h2);
19417
19482
  })();
19418
- let c2 = l2.call(r2, p2);
19483
+ let c2 = u2.call(r2, p2);
19419
19484
  return a2.call(r2, c2);
19420
- } : r2[i2] = (...p2) => {
19485
+ } : r2[s2] = (...p2) => {
19421
19486
  if (this.defaults.async) return (async () => {
19422
- let h2 = await l2.apply(r2, p2);
19487
+ let h2 = await u2.apply(r2, p2);
19423
19488
  return h2 === false && (h2 = await a2.apply(r2, p2)), h2;
19424
19489
  })();
19425
- let c2 = l2.apply(r2, p2);
19490
+ let c2 = u2.apply(r2, p2);
19426
19491
  return c2 === false && (c2 = a2.apply(r2, p2)), c2;
19427
19492
  };
19428
19493
  }
19429
- s2.hooks = r2;
19494
+ i2.hooks = r2;
19430
19495
  }
19431
19496
  if (n2.walkTokens) {
19432
19497
  let r2 = this.defaults.walkTokens, o2 = n2.walkTokens;
19433
- s2.walkTokens = function(i2) {
19434
- let l2 = [];
19435
- return l2.push(o2.call(this, i2)), r2 && (l2 = l2.concat(r2.call(this, i2))), l2;
19498
+ i2.walkTokens = function(s2) {
19499
+ let u2 = [];
19500
+ return u2.push(o2.call(this, s2)), r2 && (u2 = u2.concat(r2.call(this, s2))), u2;
19436
19501
  };
19437
19502
  }
19438
- this.defaults = { ...this.defaults, ...s2 };
19503
+ this.defaults = { ...this.defaults, ...i2 };
19439
19504
  }), this;
19440
19505
  }
19441
19506
  setOptions(e3) {
@@ -19448,25 +19513,25 @@ var Z = class {
19448
19513
  return b$1.parse(e3, t2 ?? this.defaults);
19449
19514
  }
19450
19515
  parseMarkdown(e3) {
19451
- return (n2, s2) => {
19452
- let r2 = { ...s2 }, o2 = { ...this.defaults, ...r2 }, i2 = this.onError(!!o2.silent, !!o2.async);
19453
- if (this.defaults.async === true && r2.async === false) return i2(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."));
19454
- if (typeof n2 > "u" || n2 === null) return i2(new Error("marked(): input parameter is undefined or null"));
19455
- if (typeof n2 != "string") return i2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
19516
+ return (n2, i2) => {
19517
+ let r2 = { ...i2 }, o2 = { ...this.defaults, ...r2 }, s2 = this.onError(!!o2.silent, !!o2.async);
19518
+ 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."));
19519
+ if (typeof n2 > "u" || n2 === null) return s2(new Error("marked(): input parameter is undefined or null"));
19520
+ if (typeof n2 != "string") return s2(new Error("marked(): input parameter is of type " + Object.prototype.toString.call(n2) + ", string expected"));
19456
19521
  if (o2.hooks && (o2.hooks.options = o2, o2.hooks.block = e3), o2.async) return (async () => {
19457
- let l2 = o2.hooks ? await o2.hooks.preprocess(n2) : n2, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(l2, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
19522
+ let u2 = o2.hooks ? await o2.hooks.preprocess(n2) : n2, p2 = await (o2.hooks ? await o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(u2, o2), c2 = o2.hooks ? await o2.hooks.processAllTokens(p2) : p2;
19458
19523
  o2.walkTokens && await Promise.all(this.walkTokens(c2, o2.walkTokens));
19459
- let d2 = await (o2.hooks ? await o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(c2, o2);
19460
- return o2.hooks ? await o2.hooks.postprocess(d2) : d2;
19461
- })().catch(i2);
19524
+ let k = await (o2.hooks ? await o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(c2, o2);
19525
+ return o2.hooks ? await o2.hooks.postprocess(k) : k;
19526
+ })().catch(s2);
19462
19527
  try {
19463
19528
  o2.hooks && (n2 = o2.hooks.preprocess(n2));
19464
19529
  let a2 = (o2.hooks ? o2.hooks.provideLexer(e3) : e3 ? x.lex : x.lexInline)(n2, o2);
19465
19530
  o2.hooks && (a2 = o2.hooks.processAllTokens(a2)), o2.walkTokens && this.walkTokens(a2, o2.walkTokens);
19466
19531
  let c2 = (o2.hooks ? o2.hooks.provideParser(e3) : e3 ? b$1.parse : b$1.parseInline)(a2, o2);
19467
19532
  return o2.hooks && (c2 = o2.hooks.postprocess(c2)), c2;
19468
- } catch (l2) {
19469
- return i2(l2);
19533
+ } catch (u2) {
19534
+ return s2(u2);
19470
19535
  }
19471
19536
  };
19472
19537
  }
@@ -19474,29 +19539,29 @@ var Z = class {
19474
19539
  return (n2) => {
19475
19540
  if (n2.message += `
19476
19541
  Please report this to https://github.com/markedjs/marked.`, e3) {
19477
- let s2 = "<p>An error occurred:</p><pre>" + R(n2.message + "", true) + "</pre>";
19478
- return t2 ? Promise.resolve(s2) : s2;
19542
+ let i2 = "<p>An error occurred:</p><pre>" + R(n2.message + "", true) + "</pre>";
19543
+ return t2 ? Promise.resolve(i2) : i2;
19479
19544
  }
19480
19545
  if (t2) return Promise.reject(n2);
19481
19546
  throw n2;
19482
19547
  };
19483
19548
  }
19484
19549
  };
19485
- var M = new Z();
19486
- function f$1(u4, e3) {
19487
- return M.parse(u4, e3);
19550
+ var M = new Q();
19551
+ function f$1(l4, e3) {
19552
+ return M.parse(l4, e3);
19488
19553
  }
19489
- f$1.options = f$1.setOptions = function(u4) {
19490
- return M.setOptions(u4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19554
+ f$1.options = f$1.setOptions = function(l4) {
19555
+ return M.setOptions(l4), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
19491
19556
  };
19492
19557
  f$1.getDefaults = A;
19493
19558
  f$1.defaults = T;
19494
- function gt(...u4) {
19495
- return M.use(...u4), f$1.defaults = M.defaults, j(f$1.defaults), f$1;
19559
+ function bt(...l4) {
19560
+ return M.use(...l4), f$1.defaults = M.defaults, U(f$1.defaults), f$1;
19496
19561
  }
19497
- f$1.use = gt;
19498
- f$1.walkTokens = function(u4, e3) {
19499
- return M.walkTokens(u4, e3);
19562
+ f$1.use = bt;
19563
+ f$1.walkTokens = function(l4, e3) {
19564
+ return M.walkTokens(l4, e3);
19500
19565
  };
19501
19566
  f$1.parseInline = M.parseInline;
19502
19567
  f$1.Parser = b$1;
@@ -19522,18 +19587,18 @@ function _arrayLikeToArray(r2, a2) {
19522
19587
  function _arrayWithHoles(r2) {
19523
19588
  if (Array.isArray(r2)) return r2;
19524
19589
  }
19525
- function _iterableToArrayLimit(r2, l2) {
19590
+ function _iterableToArrayLimit(r2, l4) {
19526
19591
  var t2 = null == r2 ? null : "undefined" != typeof Symbol && r2[Symbol.iterator] || r2["@@iterator"];
19527
19592
  if (null != t2) {
19528
- var e3, n2, i2, u4, a2 = [], f2 = true, o2 = false;
19593
+ var e3, n2, i2, u2, a2 = [], f2 = true, o2 = false;
19529
19594
  try {
19530
- if (i2 = (t2 = t2.call(r2)).next, 0 === l2) ;
19531
- else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !== l2); f2 = true) ;
19595
+ if (i2 = (t2 = t2.call(r2)).next, 0 === l4) ;
19596
+ else for (; !(f2 = (e3 = i2.call(t2)).done) && (a2.push(e3.value), a2.length !== l4); f2 = true) ;
19532
19597
  } catch (r3) {
19533
19598
  o2 = true, n2 = r3;
19534
19599
  } finally {
19535
19600
  try {
19536
- if (!f2 && null != t2.return && (u4 = t2.return(), Object(u4) !== u4)) return;
19601
+ if (!f2 && null != t2.return && (u2 = t2.return(), Object(u2) !== u2)) return;
19537
19602
  } finally {
19538
19603
  if (o2) throw n2;
19539
19604
  }
@@ -19630,14 +19695,14 @@ function addToSet(set, array) {
19630
19695
  if (!arrayIsArray(array)) {
19631
19696
  return set;
19632
19697
  }
19633
- let l2 = array.length;
19634
- while (l2--) {
19635
- let element = array[l2];
19698
+ let l4 = array.length;
19699
+ while (l4--) {
19700
+ let element = array[l4];
19636
19701
  if (typeof element === "string") {
19637
19702
  const lcElement = transformCaseFunc(element);
19638
19703
  if (lcElement !== element) {
19639
19704
  if (!isFrozen(array)) {
19640
- array[l2] = lcElement;
19705
+ array[l4] = lcElement;
19641
19706
  }
19642
19707
  element = lcElement;
19643
19708
  }
@@ -20789,10 +20854,10 @@ function createDOMPurify() {
20789
20854
  allowedAttributes: ALLOWED_ATTR,
20790
20855
  forceKeepAttr: void 0
20791
20856
  };
20792
- let l2 = attributes.length;
20857
+ let l4 = attributes.length;
20793
20858
  const lcTag = transformCaseFunc(currentNode.nodeName);
20794
- while (l2--) {
20795
- const attr = attributes[l2];
20859
+ while (l4--) {
20860
+ const attr = attributes[l4];
20796
20861
  const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
20797
20862
  const lcName = transformCaseFunc(name);
20798
20863
  const initValue = attrValue;
@@ -22201,34 +22266,36 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
22201
22266
  ]),
22202
22267
  _: 1
22203
22268
  }, 8, ["aria-label"])) : createCommentVNode("", true),
22204
- createVNode(unref(Button), {
22205
- variant: "secondary",
22206
- "aria-label": unref(t2)("header.undo"),
22207
- disabled: !props.canUndo,
22208
- onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("undo"))
22209
- }, {
22210
- icon: withCtx(() => [
22211
- createVNode(unref(EditorIcon), {
22212
- name: "undo",
22213
- size: 16
22214
- })
22215
- ]),
22216
- _: 1
22217
- }, 8, ["aria-label", "disabled"]),
22218
- createVNode(unref(Button), {
22219
- variant: "secondary",
22220
- "aria-label": unref(t2)("header.redo"),
22221
- disabled: !props.canRedo,
22222
- onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("redo"))
22223
- }, {
22224
- icon: withCtx(() => [
22225
- createVNode(unref(EditorIcon), {
22226
- name: "redo",
22227
- size: 16
22228
- })
22229
- ]),
22230
- _: 1
22231
- }, 8, ["aria-label", "disabled"]),
22269
+ props.canUndo || props.canRedo ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
22270
+ createVNode(unref(Button), {
22271
+ variant: "secondary",
22272
+ "aria-label": unref(t2)("header.undo"),
22273
+ disabled: !props.canUndo,
22274
+ onClick: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("undo"))
22275
+ }, {
22276
+ icon: withCtx(() => [
22277
+ createVNode(unref(EditorIcon), {
22278
+ name: "undo",
22279
+ size: 16
22280
+ })
22281
+ ]),
22282
+ _: 1
22283
+ }, 8, ["aria-label", "disabled"]),
22284
+ createVNode(unref(Button), {
22285
+ variant: "secondary",
22286
+ "aria-label": unref(t2)("header.redo"),
22287
+ disabled: !props.canRedo,
22288
+ onClick: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("redo"))
22289
+ }, {
22290
+ icon: withCtx(() => [
22291
+ createVNode(unref(EditorIcon), {
22292
+ name: "redo",
22293
+ size: 16
22294
+ })
22295
+ ]),
22296
+ _: 1
22297
+ }, 8, ["aria-label", "disabled"])
22298
+ ], 64)) : createCommentVNode("", true),
22232
22299
  createVNode(unref(Button), {
22233
22300
  variant: "primary",
22234
22301
  "aria-label": unref(t2)("header.ask"),
@@ -22251,8 +22318,8 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
22251
22318
  };
22252
22319
  }
22253
22320
  });
22254
- const _style_0$p = '\n.editor-header[data-v-6464a453] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-md);\n padding: var(--spacing-sm) var(--spacing-lg);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.header-main[data-v-6464a453] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.document-title[data-v-6464a453] {\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n}\n.document-meta[data-v-6464a453] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.document-meta__part[data-v-6464a453] {\n text-box: cap alphabetic;\n}\n.document-meta__part + .document-meta__part[data-v-6464a453]::before {\n content: "·";\n margin-right: var(--spacing-xs);\n}\n.header-right[data-v-6464a453] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n flex-shrink: 0;\n}\n@media (max-width: 767px) {\n.editor-header[data-v-6464a453] {\n padding: var(--spacing-xs) var(--spacing-md);\n}\n.document-title[data-v-6464a453] {\n font-size: var(--font-size-base);\n}\n}\n';
22255
- const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-6464a453"]]);
22321
+ const _style_0$p = '\n.editor-header[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--spacing-md);\n padding: var(--spacing-sm) var(--spacing-lg);\n min-height: var(--header-height);\n border-bottom: 1px solid var(--color-border);\n background-color: var(--color-surface);\n flex-shrink: 0;\n}\n.header-main[data-v-491cf8ab] {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n flex: 1;\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-lg);\n font-weight: 600;\n color: var(--color-text-primary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n margin: 0;\n}\n.document-meta[data-v-491cf8ab] {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--spacing-xs);\n font-size: var(--font-size-xs);\n color: var(--color-text-muted);\n}\n.document-meta__part[data-v-491cf8ab] {\n text-box: cap alphabetic;\n}\n.document-meta__part + .document-meta__part[data-v-491cf8ab]::before {\n content: "·";\n margin-right: var(--spacing-xs);\n}\n.header-right[data-v-491cf8ab] {\n display: flex;\n align-items: center;\n gap: var(--spacing-sm);\n flex-shrink: 0;\n}\n@media (max-width: 767px) {\n.editor-header[data-v-491cf8ab] {\n padding: var(--spacing-xs) var(--spacing-md);\n}\n.document-title[data-v-491cf8ab] {\n font-size: var(--font-size-base);\n}\n}\n';
22322
+ const Header = /* @__PURE__ */ _export_sfc(_sfc_main$u, [["styles", [_style_0$p]], ["__scopeId", "data-v-491cf8ab"]]);
22256
22323
  const TRANSCRIPTION_TAB = "__transcription__";
22257
22324
  const VERBATIM_TAB = "__verbatim__";
22258
22325
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
@@ -22364,7 +22431,7 @@ function createStickToBottomEngine(initialOptions = {}) {
22364
22431
  };
22365
22432
  function notify() {
22366
22433
  const snapshot = getPublicState();
22367
- for (const l2 of listeners) l2(snapshot);
22434
+ for (const l4 of listeners) l4(snapshot);
22368
22435
  }
22369
22436
  function getPublicState() {
22370
22437
  return {
@@ -25315,7 +25382,7 @@ function createLivePlugin(options = {}) {
25315
25382
  }
25316
25383
  function isTranslationTrackFor(active, language) {
25317
25384
  if (active.isSource) return false;
25318
- return active.languages.some((l2) => isSameLanguage(l2, language));
25385
+ return active.languages.some((l4) => isSameLanguage(l4, language));
25319
25386
  }
25320
25387
  function onPartial(event, channelId) {
25321
25388
  if (core.activeChannelId.value !== channelId) return;
@@ -25660,25 +25727,25 @@ function t$1(t2, e3, i2, n2) {
25660
25727
  return new (i2 || (i2 = Promise))((function(s2, r2) {
25661
25728
  function o2(t3) {
25662
25729
  try {
25663
- l2(n2.next(t3));
25730
+ l4(n2.next(t3));
25664
25731
  } catch (t4) {
25665
25732
  r2(t4);
25666
25733
  }
25667
25734
  }
25668
25735
  function a2(t3) {
25669
25736
  try {
25670
- l2(n2.throw(t3));
25737
+ l4(n2.throw(t3));
25671
25738
  } catch (t4) {
25672
25739
  r2(t4);
25673
25740
  }
25674
25741
  }
25675
- function l2(t3) {
25742
+ function l4(t3) {
25676
25743
  var e4;
25677
25744
  t3.done ? s2(t3.value) : (e4 = t3.value, e4 instanceof i2 ? e4 : new i2((function(t4) {
25678
25745
  t4(e4);
25679
25746
  }))).then(o2, a2);
25680
25747
  }
25681
- l2((n2 = n2.apply(t2, e3 || [])).next());
25748
+ l4((n2 = n2.apply(t2, e3 || [])).next());
25682
25749
  }));
25683
25750
  }
25684
25751
  "function" == typeof SuppressedError && SuppressedError;
@@ -25822,7 +25889,7 @@ function c(t2, e3) {
25822
25889
  i2 && (i2(), i2 = void 0), s2.forEach(((t3) => t3()));
25823
25890
  };
25824
25891
  }
25825
- class u3 extends e$1 {
25892
+ let d$1 = class d extends e$1 {
25826
25893
  get isPlayingSignal() {
25827
25894
  return this._isPlaying;
25828
25895
  }
@@ -25953,8 +26020,8 @@ class u3 extends e$1 {
25953
26020
  setSinkId(t2) {
25954
26021
  return this.media.setSinkId(t2);
25955
26022
  }
25956
- }
25957
- function d$1({ maxTop: t2, maxBottom: e3, halfHeight: i2, vScale: n2, barMinHeight: s2 = 0, barAlign: r2 }) {
26023
+ };
26024
+ function u({ maxTop: t2, maxBottom: e3, halfHeight: i2, vScale: n2, barMinHeight: s2 = 0, barAlign: r2 }) {
25958
26025
  let o2 = Math.round(t2 * i2 * n2);
25959
26026
  let a2 = o2 + Math.round(e3 * i2 * n2) || 1;
25960
26027
  return a2 < s2 && (a2 = s2, r2 || (o2 = a2 / 2)), { topHeight: o2, totalHeight: a2 };
@@ -26046,17 +26113,17 @@ class C extends e$1 {
26046
26113
  if (e4.button !== n2) return;
26047
26114
  if (o2.has(e4.pointerId)) return;
26048
26115
  if (o2.set(e4.pointerId, e4), o2.size > 1) return;
26049
- const l2 = e4.pointerId;
26050
- let c3 = e4.clientX, u4 = e4.clientY, d2 = false;
26116
+ const l4 = e4.pointerId;
26117
+ let c3 = e4.clientX, d3 = e4.clientY, u2 = false;
26051
26118
  const p2 = Date.now(), m2 = t3.getBoundingClientRect(), { left: g2, top: f2 } = m2, v2 = (t4) => {
26052
- if (t4.pointerId !== l2) return;
26119
+ if (t4.pointerId !== l4) return;
26053
26120
  if (t4.defaultPrevented || o2.size > 1) return;
26054
26121
  if (a2 && Date.now() - p2 < s2) return;
26055
- const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - u4;
26056
- (d2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), d2 || (r2.set({ type: "start", x: c3 - g2, y: u4 - f2 }), d2 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, u4 = n3);
26122
+ const e5 = t4.clientX, n3 = t4.clientY, h3 = e5 - c3, m3 = n3 - d3;
26123
+ (u2 || Math.abs(h3) > i2 || Math.abs(m3) > i2) && (t4.preventDefault(), t4.stopPropagation(), u2 || (r2.set({ type: "start", x: c3 - g2, y: d3 - f2 }), u2 = true), r2.set({ type: "move", x: e5 - g2, y: n3 - f2, deltaX: h3, deltaY: m3 }), c3 = e5, d3 = n3);
26057
26124
  }, b2 = (t4) => {
26058
26125
  if (o2.delete(t4.pointerId)) {
26059
- if (t4.pointerId === l2 && d2) {
26126
+ if (t4.pointerId === l4 && u2) {
26060
26127
  const e5 = t4.clientX, i3 = t4.clientY;
26061
26128
  r2.set({ type: "end", x: e5 - g2, y: i3 - f2 });
26062
26129
  }
@@ -26065,9 +26132,9 @@ class C extends e$1 {
26065
26132
  }, y3 = (t4) => {
26066
26133
  t4.relatedTarget && t4.relatedTarget !== document.documentElement || b2(t4);
26067
26134
  }, C2 = (t4) => {
26068
- d2 && (t4.stopPropagation(), t4.preventDefault());
26135
+ u2 && (t4.stopPropagation(), t4.preventDefault());
26069
26136
  }, S3 = (t4) => {
26070
- t4.defaultPrevented || o2.size > 1 || d2 && t4.preventDefault();
26137
+ t4.defaultPrevented || o2.size > 1 || u2 && t4.preventDefault();
26071
26138
  };
26072
26139
  document.addEventListener("pointermove", v2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", y3), document.addEventListener("pointercancel", y3), document.addEventListener("touchmove", S3, { passive: false }), document.addEventListener("click", C2, { capture: true }), h2 = () => {
26073
26140
  document.removeEventListener("pointermove", v2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", y3), document.removeEventListener("pointercancel", y3), document.removeEventListener("touchmove", S3), setTimeout((() => {
@@ -26240,41 +26307,41 @@ class C extends e$1 {
26240
26307
  var t2;
26241
26308
  }
26242
26309
  renderBarWaveform(t2, e3, i2, n2) {
26243
- const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l2, barIndexScale: h2, barSpacing: c2, barMinHeight: u4 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
26244
- const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l3 = o3 + a3 || 1;
26245
- return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l3 / i3 : 0, barSpacing: l3 };
26246
- })({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l3 }) {
26247
- const h3 = t3[0] || [], c3 = t3[1] || h3, u5 = h3.length, m3 = [];
26310
+ const { width: s2, height: r2 } = i2.canvas, { halfHeight: o2, barWidth: a2, barRadius: l4, barIndexScale: h2, barSpacing: c2, barMinHeight: d3 } = (function({ width: t3, height: e4, length: i3, options: n3, pixelRatio: s3 }) {
26311
+ const r3 = e4 / 2, o3 = n3.barWidth ? n3.barWidth * s3 : 1, a3 = n3.barGap ? n3.barGap * s3 : n3.barWidth ? o3 / 2 : 0, l5 = o3 + a3 || 1;
26312
+ return { halfHeight: r3, barWidth: o3, barGap: a3, barRadius: n3.barRadius || 0, barMinHeight: n3.barMinHeight ? n3.barMinHeight * s3 : 0, barIndexScale: i3 > 0 ? t3 / l5 / i3 : 0, barSpacing: l5 };
26313
+ })({ width: s2, height: r2, length: (t2[0] || []).length, options: e3, pixelRatio: this.getPixelRatio() }), m2 = (function({ channelData: t3, barIndexScale: e4, barSpacing: i3, barWidth: n3, halfHeight: s3, vScale: r3, canvasHeight: o3, barAlign: a3, barMinHeight: l5 }) {
26314
+ const h3 = t3[0] || [], c3 = t3[1] || h3, d4 = h3.length, m3 = [];
26248
26315
  let g2 = 0, f2 = 0, v2 = 0;
26249
- for (let t4 = 0; t4 <= u5; t4++) {
26250
- const u6 = Math.round(t4 * e4);
26251
- if (u6 > g2) {
26252
- const { topHeight: t5, totalHeight: e5 } = d$1({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l3, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
26253
- m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = u6, f2 = 0, v2 = 0;
26316
+ for (let t4 = 0; t4 <= d4; t4++) {
26317
+ const d5 = Math.round(t4 * e4);
26318
+ if (d5 > g2) {
26319
+ const { topHeight: t5, totalHeight: e5 } = u({ maxTop: f2, maxBottom: v2, halfHeight: s3, vScale: r3, barMinHeight: l5, barAlign: a3 }), h4 = p({ barAlign: a3, halfHeight: s3, topHeight: t5, totalHeight: e5, canvasHeight: o3 });
26320
+ m3.push({ x: g2 * i3, y: h4, width: n3, height: e5 }), g2 = d5, f2 = 0, v2 = 0;
26254
26321
  }
26255
26322
  const b2 = Math.abs(h3[t4] || 0), y3 = Math.abs(c3[t4] || 0);
26256
26323
  b2 > f2 && (f2 = b2), y3 > v2 && (v2 = y3);
26257
26324
  }
26258
26325
  return m3;
26259
- })({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: u4 });
26326
+ })({ channelData: t2, barIndexScale: h2, barSpacing: c2, barWidth: a2, halfHeight: o2, vScale: n2, canvasHeight: r2, barAlign: e3.barAlign, barMinHeight: d3 });
26260
26327
  i2.beginPath();
26261
- for (const t3 of m2) l2 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l2) : i2.rect(t3.x, t3.y, t3.width, t3.height);
26328
+ for (const t3 of m2) l4 && "roundRect" in i2 ? i2.roundRect(t3.x, t3.y, t3.width, t3.height, l4) : i2.rect(t3.x, t3.y, t3.width, t3.height);
26262
26329
  i2.fill(), i2.closePath();
26263
26330
  }
26264
26331
  renderLineWaveform(t2, e3, i2, n2) {
26265
26332
  const { width: s2, height: r2 } = i2.canvas, o2 = (function({ channelData: t3, width: e4, height: i3, vScale: n3 }) {
26266
26333
  const s3 = i3 / 2, r3 = t3[0] || [];
26267
26334
  return [r3, t3[1] || r3].map(((t4, i4) => {
26268
- const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l2 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
26269
- let c2 = 0, u4 = 0;
26335
+ const r4 = t4.length, o3 = r4 ? e4 / r4 : 0, a2 = s3, l4 = 0 === i4 ? -1 : 1, h2 = [{ x: 0, y: a2 }];
26336
+ let c2 = 0, d3 = 0;
26270
26337
  for (let e5 = 0; e5 <= r4; e5++) {
26271
26338
  const i5 = Math.round(e5 * o3);
26272
26339
  if (i5 > c2) {
26273
- const t5 = a2 + (Math.round(u4 * s3 * n3) || 1) * l2;
26274
- h2.push({ x: c2, y: t5 }), c2 = i5, u4 = 0;
26340
+ const t5 = a2 + (Math.round(d3 * s3 * n3) || 1) * l4;
26341
+ h2.push({ x: c2, y: t5 }), c2 = i5, d3 = 0;
26275
26342
  }
26276
26343
  const r5 = Math.abs(t4[e5] || 0);
26277
- r5 > u4 && (u4 = r5);
26344
+ r5 > d3 && (d3 = r5);
26278
26345
  }
26279
26346
  return h2.push({ x: c2, y: a2 }), h2;
26280
26347
  }));
@@ -26307,43 +26374,43 @@ class C extends e$1 {
26307
26374
  g(e3) ? this.renderBarWaveform(t2, e3, i2, n2) : this.renderLineWaveform(t2, e3, i2, n2);
26308
26375
  }
26309
26376
  renderSingleCanvas(t2, e3, i2, n2, s2, r2, o2) {
26310
- const a2 = this.getPixelRatio(), l2 = document.createElement("canvas");
26311
- l2.width = Math.round(i2 * a2), l2.height = Math.round(n2 * a2), l2.style.width = `${i2}px`, l2.style.height = `${n2}px`, l2.style.left = `${Math.round(s2)}px`, r2.appendChild(l2);
26312
- const h2 = l2.getContext("2d");
26313
- if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2), l2.width > 0 && l2.height > 0) {
26314
- const t3 = l2.cloneNode(), i3 = t3.getContext("2d");
26315
- i3.drawImage(l2, 0, 0), i3.globalCompositeOperation = "source-in", i3.fillStyle = this.convertColorValues(e3.progressColor, i3), i3.fillRect(0, 0, l2.width, l2.height), o2.appendChild(t3);
26377
+ const a2 = this.getPixelRatio(), l4 = document.createElement("canvas");
26378
+ l4.width = Math.round(i2 * a2), l4.height = Math.round(n2 * a2), l4.style.width = `${i2}px`, l4.style.height = `${n2}px`, l4.style.left = `${Math.round(s2)}px`, r2.appendChild(l4);
26379
+ const h2 = l4.getContext("2d");
26380
+ if (e3.renderFunction ? (h2.fillStyle = this.convertColorValues(e3.waveColor, h2), e3.renderFunction(t2, h2)) : this.renderWaveform(t2, e3, h2), l4.width > 0 && l4.height > 0) {
26381
+ const t3 = l4.cloneNode(), i3 = t3.getContext("2d");
26382
+ i3.drawImage(l4, 0, 0), i3.globalCompositeOperation = "source-in", i3.fillStyle = this.convertColorValues(e3.progressColor, i3), i3.fillRect(0, 0, l4.width, l4.height), o2.appendChild(t3);
26316
26383
  }
26317
26384
  }
26318
26385
  renderMultiCanvas(t2, e3, i2, n2, s2, r2) {
26319
- const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l2 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
26386
+ const o2 = this.getPixelRatio(), { clientWidth: a2 } = this.scrollContainer, l4 = i2 / o2, h2 = (function({ clientWidth: t3, totalWidth: e4, options: i3 }) {
26320
26387
  return f(Math.min(8e3, t3, e4), i3);
26321
- })({ clientWidth: a2, totalWidth: l2, options: e3 });
26388
+ })({ clientWidth: a2, totalWidth: l4, options: e3 });
26322
26389
  let c2 = {};
26323
26390
  if (0 === h2) return;
26324
- const u4 = (i3) => {
26325
- if (i3 < 0 || i3 >= d2) return;
26391
+ const d3 = (i3) => {
26392
+ if (i3 < 0 || i3 >= u2) return;
26326
26393
  if (c2[i3]) return;
26327
26394
  c2[i3] = true;
26328
26395
  const o3 = i3 * h2;
26329
- let a3 = Math.min(l2 - o3, h2);
26396
+ let a3 = Math.min(l4 - o3, h2);
26330
26397
  if (a3 = f(a3, e3), a3 <= 0) return;
26331
- const u5 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
26398
+ const d4 = (function({ channelData: t3, offset: e4, clampedWidth: i4, totalWidth: n3 }) {
26332
26399
  return t3.map(((t4) => {
26333
26400
  const s3 = Math.floor(e4 / n3 * t4.length), r3 = Math.floor((e4 + i4) / n3 * t4.length);
26334
26401
  return t4.slice(s3, r3);
26335
26402
  }));
26336
- })({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l2 });
26337
- this.renderSingleCanvas(u5, e3, a3, n2, o3, s2, r2);
26338
- }, d2 = Math.ceil(l2 / h2);
26403
+ })({ channelData: t2, offset: o3, clampedWidth: a3, totalWidth: l4 });
26404
+ this.renderSingleCanvas(d4, e3, a3, n2, o3, s2, r2);
26405
+ }, u2 = Math.ceil(l4 / h2);
26339
26406
  if (!this.isScrollable) {
26340
- for (let t3 = 0; t3 < d2; t3++) u4(t3);
26407
+ for (let t3 = 0; t3 < u2; t3++) d3(t3);
26341
26408
  return;
26342
26409
  }
26343
- if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l2, numCanvases: d2 }).forEach(((t3) => u4(t3))), d2 > 1) {
26410
+ if (v({ scrollLeft: this.scrollContainer.scrollLeft, totalWidth: l4, numCanvases: u2 }).forEach(((t3) => d3(t3))), u2 > 1) {
26344
26411
  const t3 = this.on("scroll", (() => {
26345
26412
  const { scrollLeft: t4 } = this.scrollContainer;
26346
- Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l2, numCanvases: d2 }).forEach(((t5) => u4(t5)));
26413
+ Object.keys(c2).length > 10 && (s2.innerHTML = "", r2.innerHTML = "", c2 = {}), v({ scrollLeft: t4, totalWidth: l4, numCanvases: u2 }).forEach(((t5) => d3(t5)));
26347
26414
  }));
26348
26415
  this.unsubscribeOnScroll.push(t3);
26349
26416
  }
@@ -26360,8 +26427,8 @@ class C extends e$1 {
26360
26427
  })(e3, ["overlay"]);
26361
26428
  const o2 = document.createElement("div"), a2 = this.getHeight(r2.height, r2.splitChannels);
26362
26429
  o2.style.height = `${a2}px`, s2 && n2 > 0 && (o2.style.marginTop = `-${a2}px`), this.canvasWrapper.style.minHeight = `${a2}px`, this.canvasWrapper.appendChild(o2);
26363
- const l2 = o2.cloneNode();
26364
- this.progressWrapper.appendChild(l2), this.renderMultiCanvas(t2, r2, i2, a2, o2, l2);
26430
+ const l4 = o2.cloneNode();
26431
+ this.progressWrapper.appendChild(l4), this.renderMultiCanvas(t2, r2, i2, a2, o2, l4);
26365
26432
  }
26366
26433
  render(e3) {
26367
26434
  return t$1(this, void 0, void 0, (function* () {
@@ -26399,12 +26466,12 @@ class C extends e$1 {
26399
26466
  }
26400
26467
  scrollIntoView(t2, e3 = false) {
26401
26468
  var i2;
26402
- const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l2 = n2 + r2, h2 = r2 / 2;
26469
+ const { scrollLeft: n2, scrollWidth: s2, clientWidth: r2 } = this.scrollContainer, o2 = t2 * s2, a2 = n2, l4 = n2 + r2, h2 = r2 / 2;
26403
26470
  if (this.isDragging) {
26404
26471
  const t3 = 30;
26405
- o2 + t3 > l2 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
26472
+ o2 + t3 > l4 ? this.scrollContainer.scrollLeft += t3 : o2 - t3 < a2 && (this.scrollContainer.scrollLeft -= t3);
26406
26473
  } else {
26407
- (o2 < a2 || o2 > l2) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
26474
+ (o2 < a2 || o2 > l4) && (this.scrollContainer.scrollLeft = o2 - (this.options.autoCenter ? h2 : 0));
26408
26475
  const t3 = o2 - n2 - h2;
26409
26476
  if (e3 && this.options.autoCenter && t3 > 0) {
26410
26477
  const e4 = null === (i2 = this.audioData) || void 0 === i2 ? void 0 : i2.duration;
@@ -26606,7 +26673,7 @@ class E extends e$1 {
26606
26673
  }
26607
26674
  }
26608
26675
  const P2 = { waveColor: "#999", progressColor: "#555", cursorWidth: 1, minPxPerSec: 0, fillParent: true, interact: true, dragToSeek: false, autoScroll: true, autoCenter: true, sampleRate: 8e3 };
26609
- class w extends u3 {
26676
+ class w extends d$1 {
26610
26677
  static create(t2) {
26611
26678
  return new w(t2);
26612
26679
  }
@@ -26618,19 +26685,19 @@ class w extends u3 {
26618
26685
  }
26619
26686
  constructor(t2) {
26620
26687
  const e3 = t2.media || ("WebAudio" === t2.backend ? new E() : void 0);
26621
- super({ media: e3, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.reactiveCleanups = [], this.options = Object.assign({}, P2, t2);
26688
+ super({ media: e3, mediaControls: t2.mediaControls, autoplay: t2.autoplay, playbackRate: t2.audioRate }), this.plugins = [], this.decodedData = null, this.stopAtPosition = null, this.subscriptions = [], this.mediaSubscriptions = [], this.abortController = null, this._isDestroyed = false, this._loadVersion = 0, this.options = Object.assign({}, P2, t2);
26622
26689
  const { state: i2, actions: n2 } = (function(t3) {
26623
26690
  var e4, i3, n3, s3, r3, o2;
26624
- const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), u4 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), d2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y3 = l$1(0), C2 = h$1((() => !u4.value), [u4]), S3 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S3.value && c2.value > 0), [S3, c2]), P3 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
26625
- return { state: { currentTime: a2, duration: c2, isPlaying: u4, isPaused: C2, isSeeking: d2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y3, canPlay: S3, isReady: E2, progress: P3, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
26691
+ const a2 = null !== (e4 = null == t3 ? void 0 : t3.currentTime) && void 0 !== e4 ? e4 : l$1(0), c2 = null !== (i3 = null == t3 ? void 0 : t3.duration) && void 0 !== i3 ? i3 : l$1(0), d3 = null !== (n3 = null == t3 ? void 0 : t3.isPlaying) && void 0 !== n3 ? n3 : l$1(false), u2 = null !== (s3 = null == t3 ? void 0 : t3.isSeeking) && void 0 !== s3 ? s3 : l$1(false), p2 = null !== (r3 = null == t3 ? void 0 : t3.volume) && void 0 !== r3 ? r3 : l$1(1), m2 = null !== (o2 = null == t3 ? void 0 : t3.playbackRate) && void 0 !== o2 ? o2 : l$1(1), g2 = l$1(null), f2 = l$1(null), v2 = l$1(""), b2 = l$1(0), y3 = l$1(0), C2 = h$1((() => !d3.value), [d3]), S3 = h$1((() => null !== g2.value), [g2]), E2 = h$1((() => S3.value && c2.value > 0), [S3, c2]), P3 = h$1((() => a2.value), [a2]), w2 = h$1((() => c2.value > 0 ? a2.value / c2.value : 0), [a2, c2]);
26692
+ return { state: { currentTime: a2, duration: c2, isPlaying: d3, isPaused: C2, isSeeking: u2, volume: p2, playbackRate: m2, audioBuffer: g2, peaks: f2, url: v2, zoom: b2, scrollPosition: y3, canPlay: S3, isReady: E2, progress: P3, progressPercent: w2 }, actions: { setCurrentTime: (t4) => {
26626
26693
  const e5 = Math.max(0, Math.min(c2.value || 1 / 0, t4));
26627
26694
  a2.set(e5);
26628
26695
  }, setDuration: (t4) => {
26629
26696
  c2.set(Math.max(0, t4));
26630
26697
  }, setPlaying: (t4) => {
26631
- u4.set(t4);
26698
+ d3.set(t4);
26632
26699
  }, setSeeking: (t4) => {
26633
- d2.set(t4);
26700
+ u2.set(t4);
26634
26701
  }, setVolume: (t4) => {
26635
26702
  const e5 = Math.max(0, Math.min(1, t4));
26636
26703
  p2.set(e5);
@@ -26651,7 +26718,7 @@ class w extends u3 {
26651
26718
  })({ isPlaying: this.isPlayingSignal, currentTime: this.currentTimeSignal, duration: this.durationSignal, volume: this.volumeSignal, playbackRate: this.playbackRateSignal, isSeeking: this.seekingSignal });
26652
26719
  this.wavesurferState = i2, this.wavesurferActions = n2, this.timer = new S2();
26653
26720
  const s2 = e3 ? void 0 : this.getMediaElement();
26654
- this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.initReactiveState(), this.initPlugins();
26721
+ this.renderer = new C(this.options, s2), this.initPlayerEvents(), this.initRendererEvents(), this.initTimerEvents(), this.initPlugins();
26655
26722
  const r2 = this.options.url || this.getSrc() || "";
26656
26723
  Promise.resolve().then((() => {
26657
26724
  this.emit("init");
@@ -26674,36 +26741,6 @@ class w extends u3 {
26674
26741
  }
26675
26742
  })));
26676
26743
  }
26677
- initReactiveState() {
26678
- this.reactiveCleanups.push((function(t2, e3) {
26679
- const i2 = [];
26680
- i2.push(c((() => {
26681
- const i3 = t2.isPlaying.value;
26682
- e3.emit(i3 ? "play" : "pause");
26683
- }), [t2.isPlaying])), i2.push(c((() => {
26684
- const i3 = t2.currentTime.value;
26685
- e3.emit("timeupdate", i3), t2.isPlaying.value && e3.emit("audioprocess", i3);
26686
- }), [t2.currentTime, t2.isPlaying])), i2.push(c((() => {
26687
- t2.isSeeking.value && e3.emit("seeking", t2.currentTime.value);
26688
- }), [t2.isSeeking, t2.currentTime]));
26689
- let n2 = false;
26690
- i2.push(c((() => {
26691
- t2.isReady.value && !n2 && (n2 = true, e3.emit("ready", t2.duration.value));
26692
- }), [t2.isReady, t2.duration])), i2.push(c((() => {
26693
- null === t2.audioBuffer.value && (n2 = false);
26694
- }), [t2.audioBuffer]));
26695
- let s2 = false;
26696
- return i2.push(c((() => {
26697
- const i3 = t2.isPlaying.value, n3 = t2.currentTime.value, r2 = t2.duration.value, o2 = r2 > 0 && n3 >= r2;
26698
- s2 && !i3 && o2 && e3.emit("finish"), s2 = i3 && o2;
26699
- }), [t2.isPlaying, t2.currentTime, t2.duration])), i2.push(c((() => {
26700
- const i3 = t2.zoom.value;
26701
- i3 > 0 && e3.emit("zoom", i3);
26702
- }), [t2.zoom])), () => {
26703
- i2.forEach(((t3) => t3()));
26704
- };
26705
- })(this.wavesurferState, { emit: this.emit.bind(this) }));
26706
- }
26707
26744
  initPlayerEvents() {
26708
26745
  this.isPlaying() && (this.emit("play"), this.timer.start()), this.mediaSubscriptions.push(this.onMediaEvent("timeupdate", (() => {
26709
26746
  const t2 = this.updateProgress();
@@ -26815,16 +26852,16 @@ class w extends u3 {
26815
26852
  }
26816
26853
  if (this._isDestroyed || o2 !== this._loadVersion) return;
26817
26854
  this.setSrc(e3, n2);
26818
- const l2 = yield new Promise(((t3) => {
26855
+ const l4 = yield new Promise(((t3) => {
26819
26856
  const e4 = r2 || this.getDuration();
26820
26857
  e4 ? t3(e4) : this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata", (() => t3(this.getDuration())), { once: true }));
26821
26858
  }));
26822
26859
  if (!this._isDestroyed && o2 === this._loadVersion) {
26823
26860
  if (!e3 && !n2) {
26824
26861
  const t3 = this.getMediaElement();
26825
- t3 instanceof E && (t3.duration = l2);
26862
+ t3 instanceof E && (t3.duration = l4);
26826
26863
  }
26827
- if (s2) this.decodedData = i$1.createBuffer(s2, l2 || 0);
26864
+ if (s2) this.decodedData = i$1.createBuffer(s2, l4 || 0);
26828
26865
  else if (n2) {
26829
26866
  const t3 = yield n2.arrayBuffer();
26830
26867
  if (this._isDestroyed || o2 !== this._loadVersion) return;
@@ -26923,7 +26960,7 @@ class w extends u3 {
26923
26960
  }
26924
26961
  destroy() {
26925
26962
  var t2;
26926
- this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.reactiveCleanups.forEach(((t3) => t3())), this.reactiveCleanups = [], this.timer.destroy(), this.renderer.destroy(), super.destroy();
26963
+ this._isDestroyed = true, this.emit("destroy"), null === (t2 = this.abortController) || void 0 === t2 || t2.abort(), this.plugins.forEach(((t3) => t3.destroy())), this.subscriptions.forEach(((t3) => t3())), this.unsubscribePlayerEvents(), this.timer.destroy(), this.renderer.destroy(), super.destroy();
26927
26964
  }
26928
26965
  }
26929
26966
  w.BasePlugin = class extends e$1 {
@@ -27017,42 +27054,42 @@ function o(t2, e3) {
27017
27054
  t2.removeEventListener(e3, n2);
27018
27055
  }, i2;
27019
27056
  }
27020
- function l(t2) {
27057
+ function l3(t2) {
27021
27058
  const e3 = t2._cleanup;
27022
27059
  "function" == typeof e3 && e3();
27023
27060
  }
27024
27061
  function h(t2, e3 = {}) {
27025
27062
  const { threshold: i2 = 3, mouseButton: n2 = 0, touchDelay: r2 = 100 } = e3, o2 = s(null), h2 = /* @__PURE__ */ new Map(), a2 = matchMedia("(pointer: coarse)").matches;
27026
- let d2 = () => {
27063
+ let d3 = () => {
27027
27064
  };
27028
27065
  const c2 = (e4) => {
27029
27066
  if (e4.button !== n2) return;
27030
27067
  if (h2.has(e4.pointerId)) return;
27031
27068
  if (h2.set(e4.pointerId, e4), h2.size > 1) return;
27032
27069
  const s2 = e4.pointerId;
27033
- let l2 = e4.clientX, c3 = e4.clientY, u4 = false;
27070
+ let l4 = e4.clientX, c3 = e4.clientY, u2 = false;
27034
27071
  const p2 = Date.now(), v2 = t2.getBoundingClientRect(), { left: g2, top: m2 } = v2, f2 = (t3) => {
27035
27072
  if (t3.pointerId !== s2) return;
27036
27073
  if (t3.defaultPrevented || h2.size > 1) return;
27037
27074
  if (a2 && Date.now() - p2 < r2) return;
27038
- const e5 = t3.clientX, n3 = t3.clientY, d3 = e5 - l2, v3 = n3 - c3;
27039
- (u4 || Math.abs(d3) > i2 || Math.abs(v3) > i2) && (t3.preventDefault(), t3.stopPropagation(), u4 || (o2.set({ type: "start", x: l2 - g2, y: c3 - m2 }), u4 = true), o2.set({ type: "move", x: e5 - g2, y: n3 - m2, deltaX: d3, deltaY: v3 }), l2 = e5, c3 = n3);
27075
+ const e5 = t3.clientX, n3 = t3.clientY, d4 = e5 - l4, v3 = n3 - c3;
27076
+ (u2 || Math.abs(d4) > i2 || Math.abs(v3) > i2) && (t3.preventDefault(), t3.stopPropagation(), u2 || (o2.set({ type: "start", x: l4 - g2, y: c3 - m2 }), u2 = true), o2.set({ type: "move", x: e5 - g2, y: n3 - m2, deltaX: d4, deltaY: v3 }), l4 = e5, c3 = n3);
27040
27077
  }, b2 = (t3) => {
27041
27078
  if (h2.delete(t3.pointerId)) {
27042
- if (t3.pointerId === s2 && u4) {
27079
+ if (t3.pointerId === s2 && u2) {
27043
27080
  const e5 = t3.clientX, i3 = t3.clientY;
27044
27081
  o2.set({ type: "end", x: e5 - g2, y: i3 - m2 });
27045
27082
  }
27046
- 0 === h2.size && d2();
27083
+ 0 === h2.size && d3();
27047
27084
  }
27048
27085
  }, E2 = (t3) => {
27049
27086
  t3.relatedTarget && t3.relatedTarget !== document.documentElement || b2(t3);
27050
27087
  }, C2 = (t3) => {
27051
- u4 && (t3.stopPropagation(), t3.preventDefault());
27088
+ u2 && (t3.stopPropagation(), t3.preventDefault());
27052
27089
  }, L2 = (t3) => {
27053
- t3.defaultPrevented || h2.size > 1 || u4 && t3.preventDefault();
27090
+ t3.defaultPrevented || h2.size > 1 || u2 && t3.preventDefault();
27054
27091
  };
27055
- document.addEventListener("pointermove", f2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", E2), document.addEventListener("pointercancel", E2), document.addEventListener("touchmove", L2, { passive: false }), document.addEventListener("click", C2, { capture: true }), d2 = () => {
27092
+ document.addEventListener("pointermove", f2), document.addEventListener("pointerup", b2), document.addEventListener("pointerout", E2), document.addEventListener("pointercancel", E2), document.addEventListener("touchmove", L2, { passive: false }), document.addEventListener("click", C2, { capture: true }), d3 = () => {
27056
27093
  document.removeEventListener("pointermove", f2), document.removeEventListener("pointerup", b2), document.removeEventListener("pointerout", E2), document.removeEventListener("pointercancel", E2), document.removeEventListener("touchmove", L2), setTimeout((() => {
27057
27094
  document.removeEventListener("click", C2, { capture: true });
27058
27095
  }), 10);
@@ -27060,13 +27097,13 @@ function h(t2, e3 = {}) {
27060
27097
  };
27061
27098
  t2.addEventListener("pointerdown", c2);
27062
27099
  return { signal: o2, cleanup: () => {
27063
- d2(), t2.removeEventListener("pointerdown", c2), h2.clear(), l(o2);
27100
+ d3(), t2.removeEventListener("pointerdown", c2), h2.clear(), l3(o2);
27064
27101
  } };
27065
27102
  }
27066
27103
  class a extends t {
27067
27104
  constructor(t2, e3, i2 = 0) {
27068
- var n2, s2, r2, o2, l2, h2, a2, d2, c2, u4;
27069
- super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (l2 = t2.resizeEnd) || void 0 === l2 || l2, this.color = null !== (h2 = t2.color) && void 0 !== h2 ? h2 : "rgba(0, 0, 0, 0.1)", this.minLength = null !== (a2 = t2.minLength) && void 0 !== a2 ? a2 : this.minLength, this.maxLength = null !== (d2 = t2.maxLength) && void 0 !== d2 ? d2 : this.maxLength, this.channelIdx = null !== (c2 = t2.channelIdx) && void 0 !== c2 ? c2 : -1, this.contentEditable = null !== (u4 = t2.contentEditable) && void 0 !== u4 ? u4 : this.contentEditable, this.element = this.initElement(), this.setContent(t2.content), this.setPart(), this.renderPosition(), this.initMouseEvents();
27105
+ var n2, s2, r2, o2, l4, h2, a2, d3, c2, u2;
27106
+ super(), this.totalDuration = e3, this.numberOfChannels = i2, this.element = null, this.minLength = 0, this.maxLength = 1 / 0, this.contentEditable = false, this.subscriptions = [], this.updatingSide = void 0, this.isRemoved = false, this.subscriptions = [], this.id = t2.id || `region-${Math.random().toString(32).slice(2)}`, this.start = this.clampPosition(t2.start), this.end = this.clampPosition(null !== (n2 = t2.end) && void 0 !== n2 ? n2 : t2.start), this.drag = null === (s2 = t2.drag) || void 0 === s2 || s2, this.resize = null === (r2 = t2.resize) || void 0 === r2 || r2, this.resizeStart = null === (o2 = t2.resizeStart) || void 0 === o2 || o2, this.resizeEnd = null === (l4 = t2.resizeEnd) || void 0 === l4 || l4, this.color = null !== (h2 = t2.color) && void 0 !== h2 ? h2 : "rgba(0, 0, 0, 0.1)", this.minLength = null !== (a2 = t2.minLength) && void 0 !== a2 ? a2 : this.minLength, this.maxLength = null !== (d3 = t2.maxLength) && void 0 !== d3 ? d3 : this.maxLength, this.channelIdx = null !== (c2 = t2.channelIdx) && void 0 !== c2 ? c2 : -1, this.contentEditable = null !== (u2 = t2.contentEditable) && void 0 !== u2 ? u2 : this.contentEditable, this.element = this.initElement(), this.setContent(t2.content), this.setPart(), this.renderPosition(), this.initMouseEvents();
27070
27107
  }
27071
27108
  clampPosition(t2) {
27072
27109
  return Math.max(0, Math.min(this.totalDuration, t2));
@@ -27077,15 +27114,15 @@ class a extends t {
27077
27114
  null === (t2 = this.element) || void 0 === t2 || t2.setAttribute("part", `${e3 ? "marker" : "region"} ${this.id}`);
27078
27115
  }
27079
27116
  addResizeHandles(t2) {
27080
- const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }), l2 = h(s2, { threshold: 1 }), a2 = r((() => {
27117
+ const e3 = { position: "absolute", zIndex: "2", width: "6px", height: "100%", top: "0", cursor: "ew-resize", wordBreak: "keep-all" }, i2 = n("div", { part: "region-handle region-handle-left", style: Object.assign(Object.assign({}, e3), { left: "0", borderLeft: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "2px 0 0 2px" }) }, t2), s2 = n("div", { part: "region-handle region-handle-right", style: Object.assign(Object.assign({}, e3), { right: "0", borderRight: "2px solid rgba(0, 0, 0, 0.5)", borderRadius: "0 2px 2px 0" }) }, t2), o2 = h(i2, { threshold: 1 }), l4 = h(s2, { threshold: 1 }), a2 = r((() => {
27081
27118
  const t3 = o2.signal.value;
27082
27119
  t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "start") : "end" === t3.type && this.onEndResizing("start"));
27083
- }), [o2.signal]), d2 = r((() => {
27084
- const t3 = l2.signal.value;
27120
+ }), [o2.signal]), d3 = r((() => {
27121
+ const t3 = l4.signal.value;
27085
27122
  t3 && ("move" === t3.type && void 0 !== t3.deltaX ? this.onResize(t3.deltaX, "end") : "end" === t3.type && this.onEndResizing("end"));
27086
- }), [l2.signal]);
27123
+ }), [l4.signal]);
27087
27124
  this.subscriptions.push((() => {
27088
- a2(), d2(), o2.cleanup(), l2.cleanup();
27125
+ a2(), d3(), o2.cleanup(), l4.cleanup();
27089
27126
  }));
27090
27127
  }
27091
27128
  removeResizeHandles(t2) {
@@ -27112,9 +27149,9 @@ class a extends t {
27112
27149
  initMouseEvents() {
27113
27150
  const { element: t2 } = this;
27114
27151
  if (!t2) return;
27115
- const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d2 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))), u4 = i2.subscribe(((t3) => t3 && this.emit("over", t3))), p2 = n2.subscribe(((t3) => t3 && this.emit("leave", t3))), v2 = s2.subscribe(((t3) => t3 && this.emit("dblclick", t3))), g2 = a2.subscribe(((t3) => t3 && this.toggleCursor(true))), m2 = d2.subscribe(((t3) => t3 && this.toggleCursor(false)));
27152
+ const e3 = o(t2, "click"), i2 = o(t2, "mouseenter"), n2 = o(t2, "mouseleave"), s2 = o(t2, "dblclick"), a2 = o(t2, "pointerdown"), d3 = o(t2, "pointerup"), c2 = e3.subscribe(((t3) => t3 && this.emit("click", t3))), u2 = i2.subscribe(((t3) => t3 && this.emit("over", t3))), p2 = n2.subscribe(((t3) => t3 && this.emit("leave", t3))), v2 = s2.subscribe(((t3) => t3 && this.emit("dblclick", t3))), g2 = a2.subscribe(((t3) => t3 && this.toggleCursor(true))), m2 = d3.subscribe(((t3) => t3 && this.toggleCursor(false)));
27116
27153
  this.subscriptions.push((() => {
27117
- c2(), u4(), p2(), v2(), g2(), m2(), l(e3), l(i2), l(n2), l(s2), l(a2), l(d2);
27154
+ c2(), u2(), p2(), v2(), g2(), m2(), l3(e3), l3(i2), l3(n2), l3(s2), l3(a2), l3(d3);
27118
27155
  }));
27119
27156
  const f2 = h(t2), b2 = r((() => {
27120
27157
  const t3 = f2.signal.value;
@@ -27128,13 +27165,13 @@ class a extends t {
27128
27165
  var n2;
27129
27166
  if (!(null === (n2 = this.element) || void 0 === n2 ? void 0 : n2.parentElement)) return;
27130
27167
  const { width: s2 } = this.element.parentElement.getBoundingClientRect(), r2 = t2 / s2 * this.totalDuration;
27131
- let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l2 = e3 && "end" !== e3 ? this.end : this.end + r2;
27168
+ let o2 = e3 && "start" !== e3 ? this.start : this.start + r2, l4 = e3 && "end" !== e3 ? this.end : this.end + r2;
27132
27169
  const h2 = void 0 !== i2;
27133
- h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l2 = i2), o2 = Math.max(0, o2), l2 = Math.min(this.totalDuration, l2);
27134
- const a2 = l2 - o2;
27170
+ h2 && this.updatingSide && this.updatingSide !== e3 && ("start" === this.updatingSide ? o2 = i2 : l4 = i2), o2 = Math.max(0, o2), l4 = Math.min(this.totalDuration, l4);
27171
+ const a2 = l4 - o2;
27135
27172
  this.updatingSide = e3;
27136
- const d2 = a2 >= this.minLength && a2 <= this.maxLength;
27137
- o2 <= l2 && (d2 || h2) && (this.start = o2, this.end = l2, this.renderPosition(), this.emit("update", e3));
27173
+ const d3 = a2 >= this.minLength && a2 <= this.maxLength;
27174
+ o2 <= l4 && (d3 || h2) && (this.start = o2, this.end = l4, this.renderPosition(), this.emit("update", e3));
27138
27175
  }
27139
27176
  onMove(t2) {
27140
27177
  this.drag && this._onUpdate(t2);
@@ -27190,12 +27227,12 @@ class a extends t {
27190
27227
  this.isRemoved = true, this.emit("remove"), this.subscriptions.forEach(((t2) => t2())), this.subscriptions = [], this.content && this.contentEditable && (this.contentClickListener && (this.content.removeEventListener("click", this.contentClickListener), this.contentClickListener = void 0), this.contentBlurListener && (this.content.removeEventListener("blur", this.contentBlurListener), this.contentBlurListener = void 0)), this.element && (this.element.remove(), this.element = null), this.unAll();
27191
27228
  }
27192
27229
  }
27193
- class d extends e2 {
27230
+ class d2 extends e2 {
27194
27231
  constructor(t2) {
27195
27232
  super(t2), this.regions = [], this.regionsContainer = this.initRegionsContainer();
27196
27233
  }
27197
27234
  static create(t2) {
27198
- return new d(t2);
27235
+ return new d2(t2);
27199
27236
  }
27200
27237
  onInit() {
27201
27238
  if (!this.wavesurfer) throw Error("WaveSurfer is not initialized");
@@ -27246,13 +27283,13 @@ class d extends e2 {
27246
27283
  if (!n2) return;
27247
27284
  const { clientWidth: s2, scrollWidth: r2 } = n2;
27248
27285
  if (r2 <= s2) return;
27249
- const o2 = n2.getBoundingClientRect(), l2 = t2.element.getBoundingClientRect(), h2 = l2.left - o2.left, a2 = l2.right - o2.left;
27286
+ const o2 = n2.getBoundingClientRect(), l4 = t2.element.getBoundingClientRect(), h2 = l4.left - o2.left, a2 = l4.right - o2.left;
27250
27287
  h2 < 0 ? n2.scrollLeft += h2 : a2 > s2 && (n2.scrollLeft += a2 - s2);
27251
27288
  }
27252
27289
  virtualAppend(t2, e3, i2) {
27253
27290
  const n2 = () => {
27254
27291
  if (!this.wavesurfer) return;
27255
- const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(), l2 = Math.round(t2.start / o2 * r2), h2 = l2 + (Math.round((t2.end - t2.start) / o2 * r2) || 1) > s2 && l2 < s2 + n3;
27292
+ const n3 = this.wavesurfer.getWidth(), s2 = this.wavesurfer.getScroll(), r2 = e3.clientWidth, o2 = this.wavesurfer.getDuration(), l4 = Math.round(t2.start / o2 * r2), h2 = l4 + (Math.round((t2.end - t2.start) / o2 * r2) || 1) > s2 && l4 < s2 + n3;
27256
27293
  h2 && !i2.parentElement ? e3.appendChild(i2) : !h2 && i2.parentElement && i2.remove();
27257
27294
  };
27258
27295
  setTimeout((() => {
@@ -27303,20 +27340,20 @@ class d extends e2 {
27303
27340
  const n2 = null === (i2 = this.wavesurfer) || void 0 === i2 ? void 0 : i2.getWrapper();
27304
27341
  if (!(n2 && n2 instanceof HTMLElement)) return () => {
27305
27342
  };
27306
- let s2 = null, o2 = 0, l2 = 0;
27307
- const d2 = h(n2, { threshold: e3 }), c2 = r((() => {
27343
+ let s2 = null, o2 = 0, l4 = 0;
27344
+ const d3 = h(n2, { threshold: e3 }), c2 = r((() => {
27308
27345
  var e4, i3;
27309
- const n3 = d2.signal.value;
27346
+ const n3 = d3.signal.value;
27310
27347
  if (n3) if ("start" === n3.type) {
27311
27348
  if (o2 = n3.x, !this.wavesurfer) return;
27312
- const r2 = this.wavesurfer.getDuration(), h2 = null === (i3 = null === (e4 = this.wavesurfer) || void 0 === e4 ? void 0 : e4.getDecodedData()) || void 0 === i3 ? void 0 : i3.numberOfChannels, { width: d3 } = this.wavesurfer.getWrapper().getBoundingClientRect();
27313
- l2 = o2 / d3 * r2;
27314
- const c3 = n3.x / d3 * r2, u4 = (n3.x + 5) / d3 * r2;
27315
- s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end: u4 }), r2, h2), this.emit("region-initialized", s2), s2.element && this.regionsContainer.appendChild(s2.element);
27316
- } else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start", l2) : "end" === n3.type && s2 && (this.saveRegion(s2), s2.updatingSide = void 0, s2 = null);
27317
- }), [d2.signal]);
27349
+ const r2 = this.wavesurfer.getDuration(), h2 = null === (i3 = null === (e4 = this.wavesurfer) || void 0 === e4 ? void 0 : e4.getDecodedData()) || void 0 === i3 ? void 0 : i3.numberOfChannels, { width: d4 } = this.wavesurfer.getWrapper().getBoundingClientRect();
27350
+ l4 = o2 / d4 * r2;
27351
+ const c3 = n3.x / d4 * r2, u2 = (n3.x + 5) / d4 * r2;
27352
+ s2 = new a(Object.assign(Object.assign({}, t2), { start: c3, end: u2 }), r2, h2), this.emit("region-initialized", s2), s2.element && this.regionsContainer.appendChild(s2.element);
27353
+ } else "move" === n3.type && void 0 !== n3.deltaX ? s2 && s2._onUpdate(n3.deltaX, n3.x > o2 ? "end" : "start", l4) : "end" === n3.type && s2 && (this.saveRegion(s2), s2.updatingSide = void 0, s2 = null);
27354
+ }), [d3.signal]);
27318
27355
  return () => {
27319
- c2(), d2.cleanup();
27356
+ c2(), d3.cleanup();
27320
27357
  };
27321
27358
  }
27322
27359
  clearRegions() {
@@ -27453,7 +27490,7 @@ function useAudioPlayer(options) {
27453
27490
  eventUnsubs.push(core.on("channel:reset", onChannelReset));
27454
27491
  }
27455
27492
  function detachEventListeners() {
27456
- for (const u4 of eventUnsubs) u4();
27493
+ for (const u2 of eventUnsubs) u2();
27457
27494
  eventUnsubs.length = 0;
27458
27495
  }
27459
27496
  function onPlayerReady() {
@@ -27488,7 +27525,7 @@ function useAudioPlayer(options) {
27488
27525
  isLoading.value = true;
27489
27526
  isReady.value = false;
27490
27527
  loadError.value = null;
27491
- const regionsPlugin = d.create();
27528
+ const regionsPlugin = d2.create();
27492
27529
  regions.value = regionsPlugin;
27493
27530
  const precomputed = audio.waveform.value;
27494
27531
  const peaks = precomputed?.length ? [normalizePeaks(precomputed)] : void 0;
@@ -28024,23 +28061,23 @@ function splitPartialSubtitles({ previousText, previousIndexes: oldCutPositions
28024
28061
  );
28025
28062
  wordIndex += diff.countRemoved;
28026
28063
  } else if ("removed" in diff && diff.removed) {
28027
- const d2 = diff;
28028
- wordIndex += d2.count;
28064
+ const d3 = diff;
28065
+ wordIndex += d3.count;
28029
28066
  newCutPositions = incrementIndexes(
28030
28067
  newCutPositions,
28031
28068
  copyCutPositions[0],
28032
- -d2.count
28069
+ -d3.count
28033
28070
  );
28034
28071
  } else if ("added" in diff && diff.added) {
28035
- const d2 = diff;
28072
+ const d3 = diff;
28036
28073
  newCutPositions = incrementIndexes(
28037
28074
  newCutPositions,
28038
28075
  copyCutPositions[0],
28039
- d2.count
28076
+ d3.count
28040
28077
  );
28041
28078
  } else {
28042
- const d2 = diff;
28043
- wordIndex += d2.count;
28079
+ const d3 = diff;
28080
+ wordIndex += d3.count;
28044
28081
  }
28045
28082
  }
28046
28083
  const lineText = (from, to) => newTextSplitBySpace.slice(from, to).join(" ");
@@ -30318,4 +30355,4 @@ export {
30318
30355
  purify as p,
30319
30356
  register as r
30320
30357
  };
30321
- //# sourceMappingURL=index-CopL8cVA.js.map
30358
+ //# sourceMappingURL=index-CR1TdCV6.js.map