securemark 0.258.1 → 0.258.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/index.js +234 -191
  3. package/markdown.d.ts +8 -10
  4. package/package.json +1 -1
  5. package/src/combinator/control/constraint/block.ts +3 -1
  6. package/src/combinator/control/constraint/line.ts +6 -1
  7. package/src/combinator/control/manipulation/convert.ts +7 -7
  8. package/src/combinator/control/manipulation/indent.ts +3 -0
  9. package/src/combinator/control/manipulation/scope.ts +4 -4
  10. package/src/combinator/data/parser/context/memo.ts +12 -7
  11. package/src/combinator/data/parser/context.test.ts +16 -16
  12. package/src/combinator/data/parser/context.ts +47 -34
  13. package/src/combinator/data/parser/some.ts +4 -2
  14. package/src/combinator/data/parser.ts +2 -2
  15. package/src/parser/api/bind.ts +1 -1
  16. package/src/parser/api/parse.test.ts +4 -4
  17. package/src/parser/api/parse.ts +1 -1
  18. package/src/parser/autolink.test.ts +3 -2
  19. package/src/parser/autolink.ts +17 -1
  20. package/src/parser/block/blockquote.ts +4 -4
  21. package/src/parser/block/dlist.ts +3 -3
  22. package/src/parser/block/extension/table.ts +4 -4
  23. package/src/parser/block/ilist.ts +2 -2
  24. package/src/parser/block/olist.ts +2 -2
  25. package/src/parser/block/paragraph.test.ts +3 -1
  26. package/src/parser/block/reply/cite.ts +2 -2
  27. package/src/parser/block/reply/quote.ts +3 -3
  28. package/src/parser/block/sidefence.ts +2 -2
  29. package/src/parser/block/table.ts +5 -5
  30. package/src/parser/block/ulist.ts +4 -4
  31. package/src/parser/block.ts +3 -3
  32. package/src/parser/context.ts +1 -1
  33. package/src/parser/inline/annotation.ts +7 -6
  34. package/src/parser/inline/autolink/email.test.ts +3 -3
  35. package/src/parser/inline/autolink/email.ts +2 -2
  36. package/src/parser/inline/autolink/url.test.ts +6 -6
  37. package/src/parser/inline/autolink/url.ts +2 -2
  38. package/src/parser/inline/autolink.ts +6 -6
  39. package/src/parser/inline/bracket.ts +13 -13
  40. package/src/parser/inline/code.ts +2 -2
  41. package/src/parser/inline/comment.ts +2 -2
  42. package/src/parser/inline/deletion.ts +5 -4
  43. package/src/parser/inline/emphasis.ts +5 -4
  44. package/src/parser/inline/emstrong.ts +5 -4
  45. package/src/parser/inline/extension/index.ts +9 -8
  46. package/src/parser/inline/extension/indexer.ts +2 -2
  47. package/src/parser/inline/extension/label.ts +3 -3
  48. package/src/parser/inline/extension/placeholder.ts +5 -4
  49. package/src/parser/inline/html.test.ts +1 -1
  50. package/src/parser/inline/html.ts +4 -4
  51. package/src/parser/inline/htmlentity.ts +2 -2
  52. package/src/parser/inline/insertion.ts +5 -4
  53. package/src/parser/inline/link.ts +17 -11
  54. package/src/parser/inline/mark.ts +5 -4
  55. package/src/parser/inline/math.ts +3 -3
  56. package/src/parser/inline/media.ts +8 -7
  57. package/src/parser/inline/reference.ts +8 -7
  58. package/src/parser/inline/ruby.ts +4 -4
  59. package/src/parser/inline/shortmedia.ts +2 -2
  60. package/src/parser/inline/strong.ts +5 -4
  61. package/src/parser/inline/template.ts +6 -6
  62. package/src/parser/inline.test.ts +5 -3
  63. package/src/parser/source/escapable.ts +2 -2
  64. package/src/parser/source/str.ts +5 -5
  65. package/src/parser/source/text.test.ts +16 -1
  66. package/src/parser/source/text.ts +4 -4
  67. package/src/parser/source/unescapable.ts +2 -2
  68. package/src/parser/visibility.ts +5 -5
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! securemark v0.258.1 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED License */
1
+ /*! securemark v0.258.4 https://github.com/falsandtru/securemark | (c) 2017, falsandtru | UNLICENSED License */
2
2
  (function webpackUniversalModuleDefinition(root, factory) {
3
3
  if(typeof exports === 'object' && typeof module === 'object')
4
4
  module.exports = factory(require("DOMPurify"), require("Prism"));
@@ -2124,11 +2124,14 @@ const global_1 = __webpack_require__(4128);
2124
2124
 
2125
2125
  const parser_1 = __webpack_require__(6728);
2126
2126
 
2127
+ const memo_1 = __webpack_require__(1090);
2128
+
2127
2129
  const line_1 = __webpack_require__(9315);
2128
2130
 
2129
2131
  function block(parser, separation = true) {
2130
- return (source, context) => {
2132
+ return (source, context = {}) => {
2131
2133
  if (source === '') return;
2134
+ context.memo ??= new memo_1.Memo();
2132
2135
  const result = parser(source, context);
2133
2136
  if (!result) return;
2134
2137
  const rest = (0, parser_1.exec)(result);
@@ -2202,11 +2205,17 @@ const global_1 = __webpack_require__(4128);
2202
2205
 
2203
2206
  const parser_1 = __webpack_require__(6728);
2204
2207
 
2208
+ const memo_1 = __webpack_require__(1090);
2209
+
2205
2210
  function line(parser) {
2206
- return (source, context) => {
2211
+ return (source, context = {}) => {
2207
2212
  if (source === '') return;
2213
+ context.memo ??= new memo_1.Memo();
2208
2214
  const line = firstline(source);
2215
+ const memo = context.memo;
2216
+ memo.offset += source.length - line.length;
2209
2217
  const result = parser(line, context);
2218
+ memo.offset -= source.length - line.length;
2210
2219
  if (!result) return;
2211
2220
  return isEmpty((0, parser_1.exec)(result)) ? [(0, parser_1.eval)(result), source.slice(line.length)] : global_1.undefined;
2212
2221
  };
@@ -2250,17 +2259,17 @@ Object.defineProperty(exports, "__esModule", ({
2250
2259
  }));
2251
2260
  exports.convert = void 0;
2252
2261
 
2253
- const global_1 = __webpack_require__(4128);
2262
+ const parser_1 = __webpack_require__(6728);
2254
2263
 
2255
2264
  function convert(conv, parser) {
2256
2265
  return (source, context = {}) => {
2257
2266
  if (source === '') return;
2258
- source = conv(source);
2259
- if (source === '') return [[], ''];
2267
+ const src = conv(source);
2268
+ if (src === '') return [[], ''];
2260
2269
  const memo = context.memo;
2261
- context.memo = global_1.undefined;
2262
- const result = parser(source, context);
2263
- context.memo = memo;
2270
+ memo && (memo.offset += source.length - src.length);
2271
+ const result = parser(src, context);
2272
+ memo && (memo.offset -= source.length - src.length);
2264
2273
  return result;
2265
2274
  };
2266
2275
  }
@@ -2412,7 +2421,10 @@ const memoize_1 = __webpack_require__(1808);
2412
2421
  function indent(opener, parser, separation = false) {
2413
2422
  if (typeof opener === 'function') return indent(/^([ \t])\1*/, opener, parser);
2414
2423
  return (0, bind_1.bind)((0, block_1.block)((0, match_1.match)(opener, (0, memoize_1.memoize)(([indent]) => (0, some_1.some)((0, line_1.line)((0, surround_1.open)(indent, source => [[source], '']))), ([indent]) => indent.length * 2 + +(indent[0] === ' '), [])), separation), (lines, rest, context) => {
2424
+ const memo = context.memo;
2425
+ memo && (memo.offset += rest.length);
2415
2426
  const result = parser(trimBlockEnd(lines.join('')), context);
2427
+ memo && (memo.offset -= rest.length);
2416
2428
  return result && (0, parser_1.exec)(result) === '' ? [(0, parser_1.eval)(result), rest] : global_1.undefined;
2417
2429
  });
2418
2430
  }
@@ -2543,9 +2555,9 @@ function focus(scope, parser) {
2543
2555
  const src = match(source);
2544
2556
  if (src === '') return;
2545
2557
  const memo = context.memo;
2546
- memo && (memo.offset = source.length - src.length);
2558
+ memo && (memo.offset += source.length - src.length);
2547
2559
  const result = parser(src, context);
2548
- memo && (memo.offset = source.length + src.length);
2560
+ memo && (memo.offset -= source.length - src.length);
2549
2561
  if (!result) return;
2550
2562
  return (0, parser_1.exec)(result).length < src.length ? [(0, parser_1.eval)(result), (0, parser_1.exec)(result) + source.slice(src.length)] : global_1.undefined;
2551
2563
  };
@@ -2562,9 +2574,9 @@ function rewrite(scope, parser) {
2562
2574
  context.memo = memo;
2563
2575
  if (!res1 || (0, parser_1.exec)(res1).length >= source.length) return;
2564
2576
  const src = source.slice(0, source.length - (0, parser_1.exec)(res1).length);
2565
- memo && (memo.offset = source.length - src.length);
2577
+ memo && (memo.offset += source.length - src.length);
2566
2578
  const res2 = parser(src, context);
2567
- memo && (memo.offset = source.length + src.length);
2579
+ memo && (memo.offset -= source.length - src.length);
2568
2580
  if (!res2) return;
2569
2581
  return (0, parser_1.exec)(res2).length < src.length ? [(0, parser_1.eval)(res2), (0, parser_1.exec)(res2) + (0, parser_1.exec)(res1)] : global_1.undefined;
2570
2582
  };
@@ -2783,7 +2795,7 @@ exports.check = check;
2783
2795
  Object.defineProperty(exports, "__esModule", ({
2784
2796
  value: true
2785
2797
  }));
2786
- exports.state = exports.guard = exports.precedence = exports.creator = exports.syntax = exports.context = exports.reset = void 0;
2798
+ exports.state = exports.constraint = exports.guard = exports.precedence = exports.creation = exports.syntax = exports.context = exports.reset = void 0;
2787
2799
 
2788
2800
  const global_1 = __webpack_require__(4128);
2789
2801
 
@@ -2844,43 +2856,36 @@ function apply(parser, source, context, changes, values) {
2844
2856
  }
2845
2857
 
2846
2858
  function syntax(syntax, precedence, cost, parser) {
2847
- if (typeof cost === 'function') {
2848
- parser = cost;
2849
- cost = 1;
2850
- }
2851
-
2852
2859
  return (source, context) => {
2853
2860
  if (source === '') return;
2854
- context.backtrackable ??= ~0;
2855
- const state = context.state ??= 0;
2861
+ const memo = context.memo ??= new memo_1.Memo();
2862
+ context.memorable ??= ~0;
2856
2863
  const p = context.precedence;
2857
2864
  context.precedence = precedence;
2858
2865
  const {
2859
2866
  resources = {
2860
- budget: 1,
2867
+ clock: 1,
2861
2868
  recursion: 1
2862
2869
  }
2863
2870
  } = context;
2864
- if (resources.budget <= 0) throw new Error('Too many creations');
2871
+ if (resources.clock <= 0) throw new Error('Too many creations');
2865
2872
  if (resources.recursion <= 0) throw new Error('Too much recursion');
2866
2873
  --resources.recursion;
2867
- const pos = source.length;
2868
- const cache = syntax && context.memo?.get(pos, syntax, state);
2869
- const result = cache ? [cache[0], source.slice(cache[1])] : parser(source, context);
2874
+ const position = source.length;
2875
+ const state = context.state ?? 0;
2876
+ const cache = syntax && memo.get(position, syntax, state);
2877
+ const result = cache ? cache.length === 0 ? global_1.undefined : [cache[0], source.slice(cache[1])] : parser(source, context);
2870
2878
  ++resources.recursion;
2871
2879
 
2872
- if (result) {
2873
- if (!cache) {
2874
- resources.budget -= cost;
2875
- }
2880
+ if (result && !cache) {
2881
+ resources.clock -= cost;
2882
+ }
2876
2883
 
2877
- if (syntax) {
2878
- if (state & context.backtrackable) {
2879
- context.memo ??= new memo_1.Memo();
2880
- cache ?? context.memo.set(pos, syntax, state, (0, parser_1.eval)(result), source.length - (0, parser_1.exec)(result).length);
2881
- } else if (context.memo?.length >= pos) {
2882
- context.memo.clear(pos);
2883
- }
2884
+ if (syntax) {
2885
+ if (state & context.memorable) {
2886
+ cache ?? memo.set(position, syntax, state, (0, parser_1.eval)(result), source.length - (0, parser_1.exec)(result, '').length);
2887
+ } else if (result && memo.length >= position) {
2888
+ memo.clear(position);
2884
2889
  }
2885
2890
  }
2886
2891
 
@@ -2891,30 +2896,30 @@ function syntax(syntax, precedence, cost, parser) {
2891
2896
 
2892
2897
  exports.syntax = syntax;
2893
2898
 
2894
- function creator(cost, parser) {
2895
- if (typeof cost === 'function') return creator(1, cost);
2899
+ function creation(cost, parser) {
2900
+ if (typeof cost === 'function') return creation(1, cost);
2896
2901
  return (source, context) => {
2897
2902
  const {
2898
2903
  resources = {
2899
- budget: 1,
2904
+ clock: 1,
2900
2905
  recursion: 1
2901
2906
  }
2902
2907
  } = context;
2903
- if (resources.budget <= 0) throw new Error('Too many creations');
2908
+ if (resources.clock <= 0) throw new Error('Too many creations');
2904
2909
  if (resources.recursion <= 0) throw new Error('Too much recursion');
2905
2910
  --resources.recursion;
2906
2911
  const result = parser(source, context);
2907
2912
  ++resources.recursion;
2908
2913
 
2909
2914
  if (result) {
2910
- resources.budget -= cost;
2915
+ resources.clock -= cost;
2911
2916
  }
2912
2917
 
2913
2918
  return result;
2914
2919
  };
2915
2920
  }
2916
2921
 
2917
- exports.creator = creator;
2922
+ exports.creation = creation;
2918
2923
 
2919
2924
  function precedence(precedence, parser) {
2920
2925
  return (source, context) => {
@@ -2934,6 +2939,20 @@ function guard(f, parser) {
2934
2939
 
2935
2940
  exports.guard = guard;
2936
2941
 
2942
+ function constraint(state, positive, parser) {
2943
+ if (typeof positive === 'function') {
2944
+ parser = positive;
2945
+ positive = true;
2946
+ }
2947
+
2948
+ return (source, context) => {
2949
+ const s = positive ? state & context.state : state & ~context.state;
2950
+ return s === state ? parser(source, context) : global_1.undefined;
2951
+ };
2952
+ }
2953
+
2954
+ exports.constraint = constraint;
2955
+
2937
2956
  function state(state, positive, parser) {
2938
2957
  if (typeof positive === 'function') {
2939
2958
  parser = positive;
@@ -3075,12 +3094,13 @@ class Memo {
3075
3094
 
3076
3095
  get(position, syntax, state) {
3077
3096
  //console.log('get', position + this.offset, syntax, state, this.memory[position + this.offset - 1]?.[`${syntax}:${state}`]);;
3078
- return this.memory[position + this.offset - 1]?.[`${syntax}:${state}`];
3097
+ const cache = this.memory[position + this.offset - 1]?.[`${syntax}:${state}`];
3098
+ return cache?.length === 2 ? [cache[0].slice(), cache[1]] : cache;
3079
3099
  }
3080
3100
 
3081
3101
  set(position, syntax, state, nodes, offset) {
3082
3102
  const record = this.memory[position + this.offset - 1] ??= {};
3083
- record[`${syntax}:${state}`] = [nodes.slice(), offset]; //console.log('set', position + this.offset, syntax, state);
3103
+ record[`${syntax}:${state}`] = nodes ? [nodes.slice(), offset] : []; //console.log('set', position + this.offset, syntax, state, record[`${syntax}:${state}`]);
3084
3104
  }
3085
3105
 
3086
3106
  clear(position) {
@@ -3088,7 +3108,7 @@ class Memo {
3088
3108
 
3089
3109
  for (let i = position + this.offset, len = memory.length; i < len; ++i) {
3090
3110
  memory.pop();
3091
- } //console.log(position);
3111
+ } //console.log('clear', position);
3092
3112
 
3093
3113
  }
3094
3114
 
@@ -3223,7 +3243,7 @@ function some(parser, end, delimiters = [], limit = -1) {
3223
3243
  if (context.delimiters?.match(rest, context.precedence)) break;
3224
3244
  const result = parser(rest, context);
3225
3245
  if (!result) break;
3226
- nodes = nodes ? (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
3246
+ nodes = nodes ? nodes.length < (0, parser_1.eval)(result).length ? (0, array_1.unshift)(nodes, (0, parser_1.eval)(result)) : (0, array_1.push)(nodes, (0, parser_1.eval)(result)) : (0, parser_1.eval)(result);
3227
3247
  rest = (0, parser_1.exec)(result);
3228
3248
  if (limit >= 0 && source.length - rest.length > limit) break;
3229
3249
  }
@@ -3464,7 +3484,7 @@ const array_1 = __webpack_require__(8112);
3464
3484
  function bind(target, settings) {
3465
3485
  let context = { ...settings,
3466
3486
  host: settings.host ?? new url_1.ReadonlyURL(global_1.location.pathname, global_1.location.origin),
3467
- backtrackable: context_1.backtrackable
3487
+ memorable: context_1.backtrackable
3468
3488
  };
3469
3489
  if (context.host?.origin === 'null') throw new Error(`Invalid host: ${context.host.href}`);
3470
3490
  const blocks = [];
@@ -3824,7 +3844,7 @@ function parse(source, opts = {}, context) {
3824
3844
  ...(context?.resources && {
3825
3845
  resources: context.resources
3826
3846
  }),
3827
- backtrackable: context_1.backtrackable
3847
+ memorable: context_1.backtrackable
3828
3848
  };
3829
3849
  if (context.host?.origin === 'null') throw new Error(`Invalid host: ${context.host.href}`);
3830
3850
  const node = (0, dom_1.frag)();
@@ -3866,7 +3886,26 @@ const autolink_1 = __webpack_require__(6051);
3866
3886
 
3867
3887
  const source_1 = __webpack_require__(6743);
3868
3888
 
3869
- exports.autolink = (0, combinator_1.lazy)(() => (0, combinator_1.union)([autolink_1.autolink, source_1.linebreak, source_1.unescsource]));
3889
+ const delimiter = /[@#>0-9A-Za-z\n]|\S[#>]/;
3890
+
3891
+ const autolink = (source, context) => {
3892
+ if (source === '') return;
3893
+ const i = source.search(delimiter);
3894
+
3895
+ switch (i) {
3896
+ case -1:
3897
+ return [[source], ''];
3898
+
3899
+ case 0:
3900
+ return parser(source, context);
3901
+
3902
+ default:
3903
+ return [[source.slice(0, i)], source.slice(i)];
3904
+ }
3905
+ };
3906
+
3907
+ exports.autolink = autolink;
3908
+ const parser = (0, combinator_1.lazy)(() => (0, combinator_1.union)([autolink_1.autolink, source_1.linebreak, source_1.unescsource]));
3870
3909
 
3871
3910
  /***/ }),
3872
3911
 
@@ -3919,9 +3958,9 @@ const dom_1 = __webpack_require__(3252);
3919
3958
 
3920
3959
  const random_1 = __webpack_require__(7325);
3921
3960
 
3922
- exports.block = (0, combinator_1.creator)(error((0, combinator_1.reset)({
3961
+ exports.block = (0, combinator_1.creation)(error((0, combinator_1.reset)({
3923
3962
  resources: {
3924
- budget: 50 * 1000,
3963
+ clock: 50 * 1000,
3925
3964
  recursion: 20
3926
3965
  }
3927
3966
  }, (0, combinator_1.union)([source_1.emptyline, horizontalrule_1.horizontalrule, heading_1.heading, ulist_1.ulist, olist_1.olist, ilist_1.ilist, dlist_1.dlist, table_1.table, codeblock_1.codeblock, mathblock_1.mathblock, extension_1.extension, sidefence_1.sidefence, blockquote_1.blockquote, reply_1.reply, paragraph_1.paragraph]))));
@@ -3970,8 +4009,8 @@ const indent = (0, combinator_1.block)((0, combinator_1.open)(opener, (0, combin
3970
4009
 
3971
4010
  const unindent = source => source.replace(/(^|\n)>(?:[^\S\n]|(?=>*(?:$|\s)))|\n$/g, '$1');
3972
4011
 
3973
- const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
3974
- const markdown = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, markdown)), (0, combinator_1.creator)(99, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (source, context) => {
4012
+ const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
4013
+ const markdown = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.rewrite)(indent, (0, combinator_1.convert)(unindent, markdown)), (0, combinator_1.creation)(99, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (source, context) => {
3975
4014
  const references = (0, dom_1.html)('ol', {
3976
4015
  class: 'references'
3977
4016
  });
@@ -4096,8 +4135,8 @@ exports.dlist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, locale_
4096
4135
  | 2
4097
4136
  /* State.media */
4098
4137
  , (0, combinator_1.some)(term)), (0, combinator_1.some)(desc)]))), es => [(0, dom_1.html)('dl', fillTrailingDescription(es))]))));
4099
- const term = (0, combinator_1.creator)((0, combinator_1.line)((0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.open)(/^~[^\S\n]+(?=\S)/, (0, visibility_1.visualize)((0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))), true), ns => [(0, dom_1.html)('dt', (0, dom_1.defrag)(ns))]))));
4100
- const desc = (0, combinator_1.creator)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)(/^:[^\S\n]+(?=\S)|/, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.anyline, /^[~:][^\S\n]+\S/), (0, visibility_1.visualize)((0, combinator_1.trimEnd)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('dd', (0, dom_1.defrag)(ns))]), false));
4138
+ const term = (0, combinator_1.creation)((0, combinator_1.line)((0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.open)(/^~[^\S\n]+(?=\S)/, (0, visibility_1.visualize)((0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))), true), ns => [(0, dom_1.html)('dt', (0, dom_1.defrag)(ns))]))));
4139
+ const desc = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)(/^:[^\S\n]+(?=\S)|/, (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.anyline, /^[~:][^\S\n]+\S/), (0, visibility_1.visualize)((0, combinator_1.trimEnd)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('dd', (0, dom_1.defrag)(ns))]), false));
4101
4140
 
4102
4141
  function fillTrailingDescription(es) {
4103
4142
  return es.length > 0 && es[es.length - 1].tagName === 'DT' ? (0, array_1.push)(es, [(0, dom_1.html)('dd')]) : es;
@@ -4671,9 +4710,9 @@ const row = (0, combinator_1.lazy)(() => (0, combinator_1.dup)((0, combinator_1.
4671
4710
  const alignment = /^[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)/;
4672
4711
  const align = (0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.union)([(0, source_1.str)(alignment)]), ([s]) => s.split('/').map(s => s.split(''))));
4673
4712
  const delimiter = /^[-=<>]+(?:\/[-=^v]*)?(?=[^\S\n]*\n)|^[#:](?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/;
4674
- const head = (0, combinator_1.creator)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^#(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('th', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
4675
- const data = (0, combinator_1.creator)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^:(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('td', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
4676
- const dataline = (0, combinator_1.creator)((0, combinator_1.line)((0, combinator_1.rewrite)(source_1.contentline, (0, combinator_1.union)([(0, combinator_1.validate)(/^!+\s/, (0, combinator_1.convert)(source => `:${source}`, data)), (0, combinator_1.convert)(source => `: ${source}`, data)]))));
4713
+ const head = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^#(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('th', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
4714
+ const data = (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.open)((0, source_1.str)(/^:(?:(?!:\D|0)\d*:(?!0)\d*)?!*(?=\s)/), (0, combinator_1.rewrite)((0, combinator_1.inits)([source_1.anyline, (0, combinator_1.some)(source_1.contentline, delimiter)]), (0, combinator_1.trim)((0, visibility_1.visualize)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]))))), true), ns => [(0, dom_1.html)('td', attributes(ns.shift()), (0, dom_1.defrag)(ns))]), false));
4715
+ const dataline = (0, combinator_1.creation)((0, combinator_1.line)((0, combinator_1.rewrite)(source_1.contentline, (0, combinator_1.union)([(0, combinator_1.validate)(/^!+\s/, (0, combinator_1.convert)(source => `:${source}`, data)), (0, combinator_1.convert)(source => `: ${source}`, data)]))));
4677
4716
 
4678
4717
  function attributes(source) {
4679
4718
  let [, rowspan = global_1.undefined, colspan = global_1.undefined, highlight = global_1.undefined] = source.match(/^.(?:(\d+)?:(\d+)?)?(!+)?$/) ?? [];
@@ -4974,7 +5013,7 @@ const dom_1 = __webpack_require__(3252);
4974
5013
  exports.ilist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)(/^[-+*](?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.state)(2
4975
5014
  /* State.media */
4976
5015
  , exports.ilist_))));
4977
- exports.ilist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?:$|\s)/, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^[-+*](?:$|\s)/, (0, combinator_1.some)(inline_1.inline), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, olist_1.olist_, exports.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)((0, ulist_1.fillFirstLine)(ns)))])])))), es => [(0, dom_1.html)('ul', {
5016
+ exports.ilist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^[-+*](?:$|\s)/, (0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^[-+*](?:$|\s)/, (0, combinator_1.some)(inline_1.inline), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, olist_1.olist_, exports.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)((0, ulist_1.fillFirstLine)(ns)))])])))), es => [(0, dom_1.html)('ul', {
4978
5017
  class: 'invalid',
4979
5018
  'data-invalid-syntax': 'list',
4980
5019
  'data-invalid-type': 'syntax',
@@ -5065,7 +5104,7 @@ exports.olist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combina
5065
5104
  , exports.olist_))));
5066
5105
  exports.olist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.union)([(0, combinator_1.match)(openers['.'], (0, memoize_1.memoize)(ms => list(type(ms[1]), '.'), ms => type(ms[1]).charCodeAt(0) || 0, [])), (0, combinator_1.match)(openers['('], (0, memoize_1.memoize)(ms => list(type(ms[1]), '('), ms => type(ms[1]).charCodeAt(0) || 0, []))])));
5067
5106
 
5068
- const list = (type, form) => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(heads[form], (0, combinator_1.subsequence)([ulist_1.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, exports.olist_, ilist_1.ilist_]))]), exports.invalid), ns => [(0, dom_1.html)('li', {
5107
+ const list = (type, form) => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(heads[form], (0, combinator_1.subsequence)([ulist_1.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([ulist_1.ulist_, exports.olist_, ilist_1.ilist_]))]), exports.invalid), ns => [(0, dom_1.html)('li', {
5069
5108
  'data-marker': ns[0] || global_1.undefined
5070
5109
  }, (0, dom_1.defrag)((0, ulist_1.fillFirstLine)((0, array_1.shift)(ns)[1])))]), true)]))), es => [format((0, dom_1.html)('ol', es), type, form)]);
5071
5110
 
@@ -5250,7 +5289,7 @@ const source_1 = __webpack_require__(6743);
5250
5289
 
5251
5290
  const dom_1 = __webpack_require__(3252);
5252
5291
 
5253
- exports.cite = (0, combinator_1.creator)((0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.validate)('>>', (0, combinator_1.reverse)((0, combinator_1.tails)([(0, source_1.str)(/^>*(?=>>[^>\s]+[^\S\n]*(?:$|\n))/), (0, combinator_1.union)([anchor_1.anchor, // Subject page representation.
5292
+ exports.cite = (0, combinator_1.creation)((0, combinator_1.line)((0, combinator_1.fmap)((0, combinator_1.validate)('>>', (0, combinator_1.reverse)((0, combinator_1.tails)([(0, source_1.str)(/^>*(?=>>[^>\s]+[^\S\n]*(?:$|\n))/), (0, combinator_1.union)([anchor_1.anchor, // Subject page representation.
5254
5293
  // リンクの実装は後で検討
5255
5294
  (0, combinator_1.focus)(/^>>\.[^\S\n]*(?:$|\n)/, () => [[(0, dom_1.html)('a', {
5256
5295
  class: 'anchor'
@@ -5288,7 +5327,7 @@ const autolink_1 = __webpack_require__(6578);
5288
5327
  const dom_1 = __webpack_require__(3252);
5289
5328
 
5290
5329
  exports.syntax = /^>+(?=[^\S\n])|^>(?=[^\s>])|^>+(?=[^\s>])(?![0-9a-z]+(?:-[0-9a-z]+)*(?![0-9A-Za-z@#:]))/;
5291
- exports.quote = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)('>', (0, combinator_1.union)([(0, combinator_1.rewrite)((0, combinator_1.some)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|')[0]), source_1.anyline)), qblock), (0, combinator_1.rewrite)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|').slice(1).join('|')), source_1.anyline), (0, combinator_1.line)((0, combinator_1.union)([(0, source_1.str)(/^.+/)])))])), ns => [(0, dom_1.html)('span', ns.length > 1 ? {
5330
+ exports.quote = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)('>', (0, combinator_1.union)([(0, combinator_1.rewrite)((0, combinator_1.some)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|')[0]), source_1.anyline)), qblock), (0, combinator_1.rewrite)((0, combinator_1.validate)(new RegExp(exports.syntax.source.split('|').slice(1).join('|')), source_1.anyline), (0, combinator_1.line)((0, combinator_1.union)([(0, source_1.str)(/^.+/)])))])), ns => [(0, dom_1.html)('span', ns.length > 1 ? {
5292
5331
  class: 'quote'
5293
5332
  } : {
5294
5333
  class: 'quote invalid',
@@ -5321,7 +5360,7 @@ const qblock = (source, context) => {
5321
5360
  }
5322
5361
 
5323
5362
  if (child.classList.contains('cite') || child.classList.contains('quote')) {
5324
- context.resources && (context.resources.budget -= child.childNodes.length);
5363
+ context.resources && (context.resources.clock -= child.childNodes.length);
5325
5364
  nodes.splice(i, 1, ...child.childNodes);
5326
5365
  --i;
5327
5366
  continue;
@@ -5365,7 +5404,7 @@ const opener = /^(?=\|\|+(?:$|\s))/;
5365
5404
 
5366
5405
  const unindent = source => source.replace(/(^|\n)\|(?:[^\S\n]|(?=\|*(?:$|\s)))|\n$/g, '$1');
5367
5406
 
5368
- const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.focus)(/^(?:\|\|+(?:[^\S\n][^\n]*)?(?:$|\n))+/, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
5407
+ const source = (0, combinator_1.lazy)(() => (0, combinator_1.fmap)((0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.focus)(/^(?:\|\|+(?:[^\S\n][^\n]*)?(?:$|\n))+/, (0, combinator_1.convert)(unindent, source)), (0, combinator_1.rewrite)((0, combinator_1.some)(source_1.contentline, opener), (0, combinator_1.convert)(unindent, (0, combinator_1.fmap)((0, combinator_1.some)(autolink_1.autolink), ns => [(0, dom_1.html)('pre', (0, dom_1.defrag)(ns))])))]))), ns => [(0, dom_1.html)('blockquote', ns)]));
5369
5408
 
5370
5409
  /***/ }),
5371
5410
 
@@ -5396,17 +5435,17 @@ const array_1 = __webpack_require__(8112);
5396
5435
 
5397
5436
  exports.table = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^\|[^\n]*(?:\n\|[^\n]*){2}/, (0, combinator_1.sequence)([row((0, combinator_1.some)(head), true), row((0, combinator_1.some)(align), false), (0, combinator_1.some)(row((0, combinator_1.some)(data), true))])), rows => [(0, dom_1.html)('table', [(0, dom_1.html)('thead', [rows.shift()]), (0, dom_1.html)('tbody', format(rows))])])));
5398
5437
 
5399
- const row = (parser, optional) => (0, combinator_1.creator)((0, combinator_1.fallback)((0, combinator_1.fmap)((0, combinator_1.line)((0, combinator_1.surround)(/^(?=\|)/, (0, combinator_1.some)((0, combinator_1.union)([parser])), /^[|\\]?\s*$/, optional)), es => [(0, dom_1.html)('tr', es)]), (0, combinator_1.rewrite)(source_1.contentline, source => [[(0, dom_1.html)('tr', {
5438
+ const row = (parser, optional) => (0, combinator_1.creation)((0, combinator_1.fallback)((0, combinator_1.fmap)((0, combinator_1.line)((0, combinator_1.surround)(/^(?=\|)/, (0, combinator_1.some)((0, combinator_1.union)([parser])), /^[|\\]?\s*$/, optional)), es => [(0, dom_1.html)('tr', es)]), (0, combinator_1.rewrite)(source_1.contentline, source => [[(0, dom_1.html)('tr', {
5400
5439
  class: 'invalid',
5401
5440
  'data-invalid-syntax': 'table-row',
5402
5441
  'data-invalid-type': 'syntax',
5403
5442
  'data-invalid-message': 'Missing the start symbol of the table row'
5404
5443
  }, [(0, dom_1.html)('td', source.replace('\n', ''))])], ''])));
5405
5444
 
5406
- const align = (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, combinator_1.union)([(0, combinator_1.focus)(/^:-+:/, () => [['center'], '']), (0, combinator_1.focus)(/^:-+/, () => [['start'], '']), (0, combinator_1.focus)(/^-+:/, () => [['end'], '']), (0, combinator_1.focus)(/^-+/, () => [[''], ''])])), ns => [(0, dom_1.html)('td', (0, dom_1.defrag)(ns))]));
5445
+ const align = (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|', (0, combinator_1.union)([(0, combinator_1.focus)(/^:-+:/, () => [['center'], '']), (0, combinator_1.focus)(/^:-+/, () => [['start'], '']), (0, combinator_1.focus)(/^-+:/, () => [['end'], '']), (0, combinator_1.focus)(/^-+/, () => [[''], ''])])), ns => [(0, dom_1.html)('td', (0, dom_1.defrag)(ns))]));
5407
5446
  const cell = (0, combinator_1.surround)(/^\|\s*(?=\S)/, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), /^\|/, [[/^[|\\]?\s*$/, 9]]), /^[^|]*/, true);
5408
- const head = (0, combinator_1.creator)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('th', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
5409
- const data = (0, combinator_1.creator)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('td', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
5447
+ const head = (0, combinator_1.creation)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('th', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
5448
+ const data = (0, combinator_1.creation)((0, combinator_1.fmap)(cell, ns => [(0, dom_1.html)('td', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))]));
5410
5449
 
5411
5450
  function format(rows) {
5412
5451
  const aligns = rows[0].classList.contains('invalid') ? [] : (0, duff_1.duffReduce)(rows.shift().children, (acc, el) => (0, array_1.push)(acc, [el.textContent]), []);
@@ -5455,10 +5494,10 @@ const array_1 = __webpack_require__(8112);
5455
5494
  exports.ulist = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.validate)(/^-(?=[^\S\n]|\n[^\S\n]*\S)/, (0, combinator_1.state)(2
5456
5495
  /* State.media */
5457
5496
  , exports.ulist_))));
5458
- exports.ulist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=$|\s)/, (0, combinator_1.some)((0, combinator_1.creator)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^-(?:$|\s)/, (0, combinator_1.subsequence)([exports.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([exports.ulist_, olist_1.olist_, ilist_1.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)(fillFirstLine(ns)))]), true)])))), es => [format((0, dom_1.html)('ul', es))])));
5459
- exports.checkbox = (0, combinator_1.focus)(/^\[[xX ]\](?=$|\s)/, source => [[(0, dom_1.html)('span', {
5497
+ exports.ulist_ = (0, combinator_1.lazy)(() => (0, combinator_1.block)((0, combinator_1.fmap)((0, combinator_1.validate)(/^-(?=$|\s)/, (0, combinator_1.some)((0, combinator_1.creation)((0, combinator_1.union)([(0, inline_1.indexee)((0, combinator_1.fmap)((0, combinator_1.fallback)((0, combinator_1.inits)([(0, combinator_1.line)((0, combinator_1.open)(/^-(?:$|\s)/, (0, combinator_1.subsequence)([exports.checkbox, (0, visibility_1.trimBlank)((0, combinator_1.some)((0, combinator_1.union)([inline_1.indexer, inline_1.inline])))]), true)), (0, combinator_1.indent)((0, combinator_1.union)([exports.ulist_, olist_1.olist_, ilist_1.ilist_]))]), olist_1.invalid), ns => [(0, dom_1.html)('li', (0, dom_1.defrag)(fillFirstLine(ns)))]), true)])))), es => [format((0, dom_1.html)('ul', es))])));
5498
+ exports.checkbox = (0, combinator_1.creation)((0, combinator_1.focus)(/^\[[xX ]\](?=$|\s)/, source => [[(0, dom_1.html)('span', {
5460
5499
  class: 'checkbox'
5461
- }, source[1].trimStart() ? '☑' : '☐')], '']);
5500
+ }, source[1].trimStart() ? '☑' : '☐')], '']));
5462
5501
 
5463
5502
  function fillFirstLine(ns) {
5464
5503
  return ns.length === 1 && typeof ns[0] === 'object' && ['UL', 'OL'].includes(ns[0].tagName) ? (0, array_1.unshift)([(0, dom_1.html)('br')], ns) : ns;
@@ -5670,19 +5709,19 @@ const visibility_1 = __webpack_require__(7618);
5670
5709
 
5671
5710
  const dom_1 = __webpack_require__(3252);
5672
5711
 
5673
- exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('((', (0, combinator_1.syntax)(32
5674
- /* Rule.annotation */
5675
- , 6, (0, combinator_1.surround)('((', (0, combinator_1.guard)(context => ~context.state & 64
5712
+ exports.annotation = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('((', (0, combinator_1.constraint)(64
5676
5713
  /* State.annotation */
5677
- , (0, combinator_1.state)(64
5714
+ , false, (0, combinator_1.syntax)(32
5715
+ /* Syntax.annotation */
5716
+ , 6, 1, (0, combinator_1.state)(64
5678
5717
  /* State.annotation */
5679
5718
  | 2
5680
5719
  /* State.media */
5681
5720
  , (0, visibility_1.startLoose)((0, combinator_1.context)({
5682
5721
  delimiters: global_1.undefined
5683
- }, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])), ')'))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
5722
+ }, (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ')', [[/^\\?\n/, 9], [')', 2], ['))', 6]])), ')')))), '))', false, ([, ns], rest) => [[(0, dom_1.html)('sup', {
5684
5723
  class: 'annotation'
5685
- }, [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ')' ? global_1.undefined : (0, link_1.optimize)('((', ns, rest, next)))));
5724
+ }, [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ')' ? global_1.undefined : (0, link_1.optimize)('((', ns, rest, next)));
5686
5725
 
5687
5726
  /***/ }),
5688
5727
 
@@ -5717,12 +5756,12 @@ const source_1 = __webpack_require__(6743);
5717
5756
 
5718
5757
  const util_1 = __webpack_require__(9437);
5719
5758
 
5720
- exports.autolink = (0, combinator_1.fmap)((0, combinator_1.validate)(/^(?:[@#>0-9A-Za-z]|\S#)/, (0, combinator_1.guard)(context => ~context.state & 1
5759
+ exports.autolink = (0, combinator_1.fmap)((0, combinator_1.validate)(/^(?:[@#>0-9A-Za-z]|\S[#>])/, (0, combinator_1.constraint)(1
5721
5760
  /* State.autolink */
5722
- , (0, combinator_1.syntax)(2
5723
- /* Rule.autolink */
5724
- , 1, (0, combinator_1.some)((0, combinator_1.union)([url_1.url, email_1.email, // Escape unmatched email-like strings.
5725
- (0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*(?:@(?:[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?)+/), channel_1.channel, account_1.account, // Escape unmatched account-like strings.
5761
+ , false, (0, combinator_1.syntax)(2
5762
+ /* Syntax.autolink */
5763
+ , 1, 1, (0, combinator_1.some)((0, combinator_1.union)([url_1.url, email_1.email, // Escape unmatched email-like strings.
5764
+ (0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*(?:@(?:[0-9A-Za-z]+(?:[.-][0-9A-Za-z]+)*)?)*/), channel_1.channel, account_1.account, // Escape unmatched account-like strings.
5726
5765
  (0, source_1.str)(/^@+[0-9A-Za-z]*(?:-[0-9A-Za-z]+)*/), // Escape invalid leading characters.
5727
5766
  (0, source_1.str)(new RegExp(/^(?:[^\p{C}\p{S}\p{P}\s]|emoji|['_])(?=#)/u.source.replace('emoji', hashtag_1.emoji), 'u')), hashtag_1.hashtag, hashnum_1.hashnum, // Escape unmatched hashtag-like strings.
5728
5767
  (0, source_1.str)(new RegExp(/^#+(?:[^\p{C}\p{S}\p{P}\s]|emoji|['_])*/u.source.replace('emoji', hashtag_1.emoji), 'u')), anchor_1.anchor]))))), ns => ns.length === 1 ? ns : [(0, util_1.stringify)(ns)]);
@@ -5837,7 +5876,7 @@ const source_1 = __webpack_require__(6743);
5837
5876
  const dom_1 = __webpack_require__(3252); // https://html.spec.whatwg.org/multipage/input.html
5838
5877
 
5839
5878
 
5840
- exports.email = (0, combinator_1.creator)((0, combinator_1.rewrite)((0, combinator_1.verify)((0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*@[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?)*(?![0-9A-Za-z])/), ([source]) => source.indexOf('@') <= 64 && source.length <= 255), source => [[(0, dom_1.html)('a', {
5879
+ exports.email = (0, combinator_1.creation)((0, combinator_1.rewrite)((0, combinator_1.verify)((0, source_1.str)(/^[0-9A-Za-z]+(?:[.+_-][0-9A-Za-z]+)*@[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-(?=\w)){0,61}[0-9A-Za-z])?)*(?![0-9A-Za-z])/), ([source]) => source.indexOf('@') <= 64 && source.length <= 255), source => [[(0, dom_1.html)('a', {
5841
5880
  class: 'email',
5842
5881
  href: `mailto:${source}`
5843
5882
  }, source)], '']));
@@ -5919,7 +5958,7 @@ const source_1 = __webpack_require__(6743);
5919
5958
 
5920
5959
  const closer = /^[-+*=~^,.;:!?]*(?=[\\"`|\[\](){}<>]|$)/;
5921
5960
  exports.url = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['http://', 'https://'], (0, combinator_1.rewrite)((0, combinator_1.open)(/^https?:\/\/(?=[\x21-\x7E])/, (0, combinator_1.focus)(/^[\x21-\x7E]+/, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.unescsource, closer)])))), (0, combinator_1.convert)(url => `{ ${url} }`, (0, combinator_1.union)([link_1.textlink])))));
5922
- const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.precedence)(2, (0, combinator_1.union)([(0, combinator_1.surround)('(', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')'), ')', true), (0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']'), ']', true), (0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}'), '}', true), (0, combinator_1.surround)('"', (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.unescsource, '"')), '"', true)]))));
5961
+ const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.precedence)(2, (0, combinator_1.union)([(0, combinator_1.surround)('(', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ')'), ')', true), (0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), ']'), ']', true), (0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.unescsource]), '}'), '}', true), (0, combinator_1.surround)('"', (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.unescsource, '"')), '"', true)]))));
5923
5962
 
5924
5963
  /***/ }),
5925
5964
 
@@ -5947,26 +5986,26 @@ const dom_1 = __webpack_require__(3252);
5947
5986
  const array_1 = __webpack_require__(8112);
5948
5987
 
5949
5988
  const index = /^[0-9A-Za-z]+(?:(?:[.-]|, )[0-9A-Za-z]+)*/;
5950
- exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.syntax)(0
5951
- /* Rule.none */
5952
- , 2, (0, combinator_1.surround)((0, source_1.str)('('), (0, source_1.str)(index), (0, source_1.str)(')'))), (0, combinator_1.syntax)(128
5953
- /* Rule.bracket */
5954
- , 2, (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]]), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
5989
+ exports.bracket = (0, combinator_1.lazy)(() => (0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(0
5990
+ /* Syntax.none */
5991
+ , 2, 1, (0, source_1.str)(index)), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(128
5992
+ /* Syntax.bracket */
5993
+ , 2, 1, (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]])), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
5955
5994
  class: 'paren'
5956
- }, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest])), (0, combinator_1.syntax)(0
5957
- /* Rule.none */
5958
- , 2, (0, combinator_1.surround)((0, source_1.str)('('), (0, source_1.str)(new RegExp(index.source.replace(', ', '[,、]').replace(/[09AZaz.]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 0xFEE0)))), (0, source_1.str)(')'))), (0, combinator_1.syntax)(128
5959
- /* Rule.bracket */
5960
- , 2, (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]]), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
5995
+ }, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest]), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(0
5996
+ /* Syntax.none */
5997
+ , 2, 1, (0, source_1.str)(new RegExp(index.source.replace(', ', '[,、]').replace(/[09AZaz.]|\-(?!\w)/g, c => c.trimStart() && String.fromCharCode(c.charCodeAt(0) + 0xFEE0))))), (0, source_1.str)(')')), (0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.syntax)(128
5998
+ /* Syntax.bracket */
5999
+ , 2, 1, (0, combinator_1.some)(inline_1.inline, ')', [[')', 2]])), (0, source_1.str)(')'), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
5961
6000
  class: 'paren'
5962
- }, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])), (0, combinator_1.syntax)(128
5963
- /* Rule.bracket */
5964
- , 2, (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)(inline_1.inline, ']', [[']', 2]]), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest])), (0, combinator_1.syntax)(128
5965
- /* Rule.bracket */
5966
- , 2, (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)(inline_1.inline, '}', [['}', 2]]), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])), // Control media blinking in editing rather than control confusion of pairs of quote marks.
5967
- (0, combinator_1.syntax)(1
5968
- /* Rule.quote */
5969
- , 8, (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.some)(inline_1.inline, '"', [['"', 8]]), (0, source_1.str)('"'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]))]));
6001
+ }, (0, dom_1.defrag)((0, array_1.push)((0, array_1.unshift)(as, bs), cs)))], rest], ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.syntax)(128
6002
+ /* Syntax.bracket */
6003
+ , 2, 1, (0, combinator_1.some)(inline_1.inline, ']', [[']', 2]])), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)([''], (0, array_1.unshift)(as, bs)), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.syntax)(128
6004
+ /* Syntax.bracket */
6005
+ , 2, 1, (0, combinator_1.some)(inline_1.inline, '}', [['}', 2]])), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), // Control media blinking in editing rather than control confusion of pairs of quote marks.
6006
+ (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.syntax)(1
6007
+ /* Syntax.quote */
6008
+ , 8, 1, (0, combinator_1.some)(inline_1.inline, '"', [['"', 8]])), (0, source_1.str)('"'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest])]));
5970
6009
 
5971
6010
  /***/ }),
5972
6011
 
@@ -5985,7 +6024,7 @@ const combinator_1 = __webpack_require__(2087);
5985
6024
 
5986
6025
  const dom_1 = __webpack_require__(3252);
5987
6026
 
5988
- exports.code = (0, combinator_1.creator)((0, combinator_1.validate)('`', (0, combinator_1.match)(/^(`+)(?!`)([^\n]*?[^`\n])\1(?!`)/, ([whole,, body]) => rest => [[(0, dom_1.html)('code', {
6027
+ exports.code = (0, combinator_1.creation)((0, combinator_1.validate)('`', (0, combinator_1.match)(/^(`+)(?!`)([^\n]*?[^`\n])\1(?!`)/, ([whole,, body]) => rest => [[(0, dom_1.html)('code', {
5989
6028
  'data-src': whole
5990
6029
  }, format(body))], rest.slice(whole.length)])));
5991
6030
 
@@ -6019,8 +6058,8 @@ const memoize_1 = __webpack_require__(1808);
6019
6058
  const array_1 = __webpack_require__(8112);
6020
6059
 
6021
6060
  exports.comment = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[%', (0, combinator_1.syntax)(0
6022
- /* Rule.none */
6023
- , 4, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, combinator_1.open)((0, source_1.str)(`[${fence}`), (0, combinator_1.some)(source_1.text, new RegExp(String.raw`^\s+${fence}\]|^\S`)), true), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 4]]), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, /^\S/), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
6061
+ /* Syntax.none */
6062
+ , 4, 1, (0, combinator_1.match)(/^\[(%+)\s/, (0, memoize_1.memoize)(([, fence]) => (0, combinator_1.surround)((0, combinator_1.open)((0, source_1.str)(`[${fence}`), (0, combinator_1.some)(source_1.text, new RegExp(String.raw`^\s+${fence}\]|^\S`)), true), (0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), new RegExp(String.raw`^\s+${fence}\]`), [[new RegExp(String.raw`^\s+${fence}\]`), 4]]), (0, combinator_1.close)((0, combinator_1.some)(source_1.text, /^\S/), (0, source_1.str)(`${fence}]`)), true, ([as, bs = [], cs], rest) => [[(0, dom_1.html)('span', {
6024
6063
  class: 'comment'
6025
6064
  }, [(0, dom_1.html)('input', {
6026
6065
  type: 'checkbox'
@@ -6051,9 +6090,9 @@ const dom_1 = __webpack_require__(3252);
6051
6090
 
6052
6091
  const array_1 = __webpack_require__(8112);
6053
6092
 
6054
- exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6055
- /* Rule.none */
6056
- , 1, (0, combinator_1.surround)((0, source_1.str)('~~'), (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '~~')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '~'), true)])), (0, source_1.str)('~~'), false, ([, bs], rest) => [[(0, dom_1.html)('del', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6093
+ exports.deletion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('~~'), (0, combinator_1.syntax)(0
6094
+ /* Syntax.none */
6095
+ , 1, 1, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '~~')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '~'), true)]))), (0, source_1.str)('~~'), false, ([, bs], rest) => [[(0, dom_1.html)('del', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
6057
6096
 
6058
6097
  /***/ }),
6059
6098
 
@@ -6084,9 +6123,9 @@ const dom_1 = __webpack_require__(3252);
6084
6123
 
6085
6124
  const array_1 = __webpack_require__(8112);
6086
6125
 
6087
- exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6088
- /* Rule.none */
6089
- , 1, (0, combinator_1.surround)((0, source_1.str)('*'), (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, strong_1.strong, exports.emphasis]))])), '*'), (0, source_1.str)('*'), false, ([, bs], rest) => [[(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6126
+ exports.emphasis = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('*'), (0, combinator_1.syntax)(0
6127
+ /* Syntax.none */
6128
+ , 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, strong_1.strong, exports.emphasis]))])), '*')), (0, source_1.str)('*'), false, ([, bs], rest) => [[(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
6090
6129
 
6091
6130
  /***/ }),
6092
6131
 
@@ -6119,9 +6158,9 @@ const array_1 = __webpack_require__(8112);
6119
6158
 
6120
6159
  const substrong = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([exports.emstrong, strong_1.strong]))])));
6121
6160
  const subemphasis = (0, combinator_1.lazy)(() => (0, combinator_1.some)((0, combinator_1.union)([strong_1.strong, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([exports.emstrong, strong_1.strong, emphasis_1.emphasis]))])));
6122
- exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6123
- /* Rule.none */
6124
- , 1, (0, combinator_1.surround)((0, source_1.str)('***'), (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), inline_1.inline)]))), (0, source_1.str)(/^\*{1,3}/), false, ([, bs, cs], rest, context) => {
6161
+ exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('***'), (0, combinator_1.syntax)(0
6162
+ /* Syntax.none */
6163
+ , 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('*')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), inline_1.inline)])))), (0, source_1.str)(/^\*{1,3}/), false, ([, bs, cs], rest, context) => {
6125
6164
  switch (cs[0]) {
6126
6165
  case '***':
6127
6166
  return [[(0, dom_1.html)('em', [(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))])], rest];
@@ -6132,7 +6171,7 @@ exports.emstrong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6132
6171
  case '*':
6133
6172
  return (0, combinator_1.bind)(substrong, (ds, rest) => rest.slice(0, 2) === '**' ? [[(0, dom_1.html)('strong', (0, array_1.unshift)([(0, dom_1.html)('em', (0, dom_1.defrag)(bs))], (0, dom_1.defrag)(ds)))], rest.slice(2)] : [(0, array_1.unshift)(['**', (0, dom_1.html)('em', (0, dom_1.defrag)(bs))], ds), rest])(rest, context) ?? [['**', (0, dom_1.html)('em', (0, dom_1.defrag)(bs))], rest];
6134
6173
  }
6135
- }, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6174
+ }, ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
6136
6175
 
6137
6176
  /***/ }),
6138
6177
 
@@ -6222,11 +6261,11 @@ const visibility_1 = __webpack_require__(7618);
6222
6261
 
6223
6262
  const dom_1 = __webpack_require__(3252);
6224
6263
 
6225
- exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.syntax)(1024
6226
- /* Rule.index */
6227
- , 2, (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.guard)(context => ~context.state & 16
6264
+ exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0, combinator_1.fmap)((0, indexee_1.indexee)((0, combinator_1.surround)('[#', (0, combinator_1.constraint)(16
6228
6265
  /* State.index */
6229
- , (0, combinator_1.state)(64
6266
+ , false, (0, combinator_1.syntax)(1024
6267
+ /* Syntax.index */
6268
+ , 2, 1, (0, combinator_1.state)(64
6230
6269
  /* State.annotation */
6231
6270
  | 32
6232
6271
  /* State.reference */
@@ -6240,16 +6279,16 @@ exports.index = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[#', (0
6240
6279
  /* State.media */
6241
6280
  | 1
6242
6281
  /* State.autolink */
6243
- , (0, visibility_1.startTight)((0, combinator_1.open)((0, source_1.stropt)(/^\|?/), (0, visibility_1.trimBlankEnd)((0, combinator_1.some)((0, combinator_1.union)([signature, inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), true)))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, dom_1.defrag)(ns))], rest])), ([el]) => [(0, dom_1.define)(el, {
6282
+ , (0, visibility_1.startTight)((0, combinator_1.open)((0, source_1.stropt)(/^\|?/), (0, visibility_1.trimBlankEnd)((0, combinator_1.some)((0, combinator_1.union)([signature, inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), true))))), ']', false, ([, ns], rest) => [[(0, dom_1.html)('a', (0, dom_1.defrag)(ns))], rest])), ([el]) => [(0, dom_1.define)(el, {
6244
6283
  id: el.id ? null : global_1.undefined,
6245
6284
  class: 'index',
6246
6285
  href: el.id ? `#${el.id}` : global_1.undefined
6247
- }, el.childNodes)]))));
6248
- const signature = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.open)('|#', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
6286
+ }, el.childNodes)])));
6287
+ const signature = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.open)('|#', (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'))), ns => [(0, dom_1.html)('span', {
6249
6288
  class: 'indexer',
6250
6289
  'data-index': (0, indexee_1.identity)(ns.join('')).slice(6)
6251
6290
  })])));
6252
- const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.txt, '"')), (0, source_1.str)('"'), true)])));
6291
+ const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.txt, '"')), (0, source_1.str)('"'), true)])));
6253
6292
 
6254
6293
  /***/ }),
6255
6294
 
@@ -6350,7 +6389,7 @@ const index_1 = __webpack_require__(4479);
6350
6389
 
6351
6390
  const dom_1 = __webpack_require__(3252);
6352
6391
 
6353
- exports.indexer = (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.surround)(/^\s+(?=\[#\S)/, (0, combinator_1.state)(16
6392
+ exports.indexer = (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.surround)(/^\s+(?=\[#\S)/, (0, combinator_1.state)(16
6354
6393
  /* State.index */
6355
6394
  , false, (0, combinator_1.union)([(0, combinator_1.focus)('[#]', () => [[(0, dom_1.html)('a', {
6356
6395
  href: '#'
@@ -6383,9 +6422,9 @@ const dom_1 = __webpack_require__(3252);
6383
6422
 
6384
6423
  const body = (0, source_1.str)(/^\$[A-Za-z]*(?:(?:-[A-Za-z][0-9A-Za-z]*)+|-(?:(?:0|[1-9][0-9]*)\.)*(?:0|[1-9][0-9]*)(?![0-9A-Za-z]))/);
6385
6424
  exports.segment = (0, combinator_1.clear)((0, combinator_1.validate)(['[$', '$'], (0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body])));
6386
- exports.label = (0, combinator_1.validate)(['[$', '$'], (0, combinator_1.creator)((0, combinator_1.fmap)((0, combinator_1.guard)(context => ~context.state & 8
6425
+ exports.label = (0, combinator_1.validate)(['[$', '$'], (0, combinator_1.creation)((0, combinator_1.fmap)((0, combinator_1.constraint)(8
6387
6426
  /* State.label */
6388
- , (0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body])), ([text]) => [(0, dom_1.html)('a', {
6427
+ , false, (0, combinator_1.union)([(0, combinator_1.surround)('[', body, ']'), body])), ([text]) => [(0, dom_1.html)('a', {
6389
6428
  class: 'label',
6390
6429
  'data-label': text.slice(text[1] === '-' ? 0 : 1).toLowerCase()
6391
6430
  }, text)])));
@@ -6441,14 +6480,14 @@ const array_1 = __webpack_require__(8112); // Don't use the symbols already used
6441
6480
  // All syntax surrounded by square brackets shouldn't contain line breaks.
6442
6481
 
6443
6482
 
6444
- exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[:', '[^'], (0, combinator_1.syntax)(0
6445
- /* Rule.none */
6446
- , 2, (0, combinator_1.surround)((0, source_1.str)(/^\[[:^]/), (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]])), (0, source_1.str)(']'), false, ([as, bs], rest) => [[(0, dom_1.html)('span', {
6483
+ exports.placeholder = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[:', '[^'], (0, combinator_1.surround)((0, source_1.str)(/^\[[:^]/), (0, combinator_1.syntax)(0
6484
+ /* Syntax.none */
6485
+ , 2, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([inline_1.inline]), ']', [[/^\\?\n/, 9], [']', 2]]))), (0, source_1.str)(']'), false, ([as, bs], rest) => [[(0, dom_1.html)('span', {
6447
6486
  class: 'invalid',
6448
6487
  'data-invalid-syntax': 'extension',
6449
6488
  'data-invalid-type': 'syntax',
6450
6489
  'data-invalid-message': `Reserved start symbol "${as[0][1]}" cannot be used in "[]"`
6451
- }, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]))));
6490
+ }, (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6452
6491
 
6453
6492
  /***/ }),
6454
6493
 
@@ -6490,8 +6529,8 @@ const attrspecs = {
6490
6529
  global_1.Object.setPrototypeOf(attrspecs, null);
6491
6530
  global_1.Object.values(attrspecs).forEach(o => global_1.Object.setPrototypeOf(o, null));
6492
6531
  exports.html = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('<', (0, combinator_1.validate)(/^<[a-z]+(?=[^\S\n]|>)/, (0, combinator_1.syntax)(0
6493
- /* Rule.none */
6494
- , 5, (0, combinator_1.union)([(0, combinator_1.focus)('<wbr>', () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.focus)( // https://html.spec.whatwg.org/multipage/syntax.html#void-elements
6532
+ /* Syntax.none */
6533
+ , 5, 1, (0, combinator_1.union)([(0, combinator_1.focus)(/^<wbr[^\S\n]*>/, () => [[(0, dom_1.html)('wbr')], '']), (0, combinator_1.focus)( // https://html.spec.whatwg.org/multipage/syntax.html#void-elements
6495
6534
  /^<(?:area|base|br|col|embed|hr|img|input|link|meta|source|track|wbr)(?=[^\S\n]|>)/, source => [[source], '']), (0, combinator_1.match)(new RegExp(String.raw`^<(${TAGS.join('|')})(?=[^\S\n]|>)`), (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)((0, combinator_1.open)(/^\n?/, (0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', `</${tag}>`), [[(0, visibility_1.blankWith)('\n', `</${tag}>`), 5]]), true))]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => TAGS.indexOf(tag), [])), (0, combinator_1.match)(/^<([a-z]+)(?=[^\S\n]|>)/, (0, memoize_1.memoize)(([, tag]) => (0, combinator_1.surround)((0, combinator_1.surround)((0, source_1.str)(`<${tag}`), (0, combinator_1.some)(exports.attribute), (0, source_1.str)(/^[^\S\n]*>/), true), (0, combinator_1.subsequence)([(0, combinator_1.focus)(/^[^\S\n]*\n/, (0, combinator_1.some)(inline_1.inline)), (0, combinator_1.some)(inline_1.inline, `</${tag}>`, [[`</${tag}>`, 5]])]), (0, source_1.str)(`</${tag}>`), true, ([as, bs = [], cs], rest) => [[elem(tag, as, bs, cs)], rest], ([as, bs = []], rest) => [[elem(tag, as, bs, [])], rest]), ([, tag]) => tag, new cache_1.Cache(10000)))])))));
6496
6535
  exports.attribute = (0, combinator_1.union)([(0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[^\S\n]|>)/)]); // https://developer.mozilla.org/en-US/docs/Web/HTML/Element
6497
6536
  // [...document.querySelectorAll('tbody > tr > td:first-child')].map(el => el.textContent.slice(1, -1))
@@ -6567,7 +6606,7 @@ const dom_1 = __webpack_require__(3252);
6567
6606
 
6568
6607
  const memoize_1 = __webpack_require__(1808);
6569
6608
 
6570
- exports.unsafehtmlentity = (0, combinator_1.creator)((0, combinator_1.validate)('&', (0, combinator_1.focus)(/^&[0-9A-Za-z]+;/, entity => [[parse(entity) ?? `\x1B${entity}`], ''])));
6609
+ exports.unsafehtmlentity = (0, combinator_1.creation)((0, combinator_1.validate)('&', (0, combinator_1.focus)(/^&[0-9A-Za-z]+;/, entity => [[parse(entity) ?? `\x1B${entity}`], ''])));
6571
6610
  exports.htmlentity = (0, combinator_1.fmap)((0, combinator_1.union)([exports.unsafehtmlentity]), ([test]) => [test[0] === '\x1B' ? (0, dom_1.html)('span', {
6572
6611
  class: 'invalid',
6573
6612
  'data-invalid-syntax': 'htmlentity',
@@ -6606,9 +6645,9 @@ const dom_1 = __webpack_require__(3252);
6606
6645
 
6607
6646
  const array_1 = __webpack_require__(8112);
6608
6647
 
6609
- exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6610
- /* Rule.none */
6611
- , 1, (0, combinator_1.surround)((0, source_1.str)('++'), (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '++')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '+'), true)])), (0, source_1.str)('++'), false, ([, bs], rest) => [[(0, dom_1.html)('ins', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6648
+ exports.insertion = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('++'), (0, combinator_1.syntax)(0
6649
+ /* Syntax.none */
6650
+ , 1, 1, (0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('\n', '++')), (0, combinator_1.open)('\n', (0, combinator_1.some)(inline_1.inline, '+'), true)]))), (0, source_1.str)('++'), false, ([, bs], rest) => [[(0, dom_1.html)('ins', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
6612
6651
 
6613
6652
  /***/ }),
6614
6653
 
@@ -6649,11 +6688,11 @@ const optspec = {
6649
6688
  rel: ['nofollow']
6650
6689
  };
6651
6690
  Object.setPrototypeOf(optspec, null);
6652
- exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.syntax)(256
6653
- /* Rule.link */
6654
- , 2, 10, (0, combinator_1.bind)((0, combinator_1.guard)(context => ~context.state & 4
6691
+ exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.bind)((0, combinator_1.constraint)(4
6655
6692
  /* State.link */
6656
- , (0, combinator_1.fmap)((0, combinator_1.subsequence)([(0, combinator_1.state)(4
6693
+ , false, (0, combinator_1.syntax)(256
6694
+ /* Syntax.link */
6695
+ , 2, 10, (0, combinator_1.fmap)((0, combinator_1.subsequence)([(0, combinator_1.state)(4
6657
6696
  /* State.link */
6658
6697
  , (0, combinator_1.dup)((0, combinator_1.union)([(0, combinator_1.surround)('[', inline_1.media, ']'), (0, combinator_1.surround)('[', inline_1.shortmedia, ']'), (0, combinator_1.surround)('[', (0, combinator_1.state)(64
6659
6698
  /* State.annotation */
@@ -6667,25 +6706,29 @@ exports.link = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'
6667
6706
  /* State.media */
6668
6707
  | 1
6669
6708
  /* State.autolink */
6670
- , (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2]])), ']', true, global_1.undefined, ([, ns = [], rest], next) => next[0] === ']' ? global_1.undefined : optimize('[', ns, rest, next))]))), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))], nodes => nodes[0][0] !== ''), ([as, bs = []]) => bs[0] === '\r' && bs.shift() ? [as, bs] : as[0] === '\r' && as.shift() ? [[], as] : [as, []])), ([content, params], rest, context) => {
6709
+ , (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2]])), ']', true, global_1.undefined, ([, ns = [], rest], next) => next[0] === ']' ? global_1.undefined : optimize('[', ns, rest, next))]))), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))], nodes => nodes[0][0] !== ''), ([as, bs = []]) => bs[0] === '\r' && bs.shift() ? [as, bs] : as[0] === '\r' && as.shift() ? [[], as] : [as, []]))), ([content, params], rest, context) => {
6671
6710
  if (content[0] === '') return [content, rest];
6672
6711
  if (params.length === 0) return;
6673
6712
  if (content.length !== 0 && (0, visibility_1.trimNode)(content).length === 0) return;
6674
- if ((0, parser_1.eval)((0, combinator_1.some)(autolink_1.autolink)((0, util_1.stringify)(content), context))?.some(node => typeof node === 'object')) return;
6713
+
6714
+ for (let source = (0, util_1.stringify)(content); source;) {
6715
+ const result = (0, autolink_1.autolink)(source, context);
6716
+ if (typeof (0, parser_1.eval)(result)[0] === 'object') return;
6717
+ source = (0, parser_1.exec)(result);
6718
+ }
6719
+
6675
6720
  const INSECURE_URI = params.shift();
6676
6721
  const el = elem(INSECURE_URI, (0, dom_1.defrag)(content), new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href), context.host?.origin || global_1.location.origin);
6677
6722
  if (el.classList.contains('invalid')) return [[el], rest];
6678
6723
  return [[(0, dom_1.define)(el, (0, html_1.attributes)('link', [], optspec, params))], rest];
6679
- }))));
6680
- exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.syntax)(256
6681
- /* Rule.link */
6682
- , 2, 10, (0, combinator_1.bind)((0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([source_1.unescsource]), ']'), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])), ([params, content = []], rest, context) => {
6724
+ })));
6725
+ exports.textlink = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['[', '{'], (0, combinator_1.bind)((0, combinator_1.creation)(10, (0, combinator_1.precedence)(2, (0, combinator_1.reverse)((0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([source_1.unescsource]), ']'), ']')), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([exports.uri, (0, combinator_1.some)(exports.option)]), /^[^\S\n]*}/))])))), ([params, content = []], rest, context) => {
6683
6726
  params.shift();
6684
6727
  (0, visibility_1.trimNode)(content);
6685
6728
  const INSECURE_URI = params.shift();
6686
6729
  const el = elem(INSECURE_URI, (0, dom_1.defrag)(content), new url_1.ReadonlyURL(resolve(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href), context.host?.origin || global_1.location.origin);
6687
6730
  return [[(0, dom_1.define)(el, (0, html_1.attributes)('link', [], optspec, params))], rest];
6688
- }))));
6731
+ })));
6689
6732
  exports.uri = (0, combinator_1.fmap)((0, combinator_1.union)([(0, combinator_1.open)(/^[^\S\n]+/, (0, source_1.str)(/^\S+/)), (0, source_1.str)(/^[^\s{}]+/)]), ([uri]) => ['\r', uri]);
6690
6733
  exports.option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+nofollow(?=[^\S\n]|})/), () => [` rel="nofollow"`]), (0, source_1.str)(/^[^\S\n]+[a-z]+(?:-[a-z]+)*(?:="(?:\\[^\n]|[^\\\n"])*")?(?=[^\S\n]|})/), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[^\s{}]+/), opt => [` \\${opt.slice(1)}`])]);
6691
6734
 
@@ -6804,9 +6847,9 @@ const dom_1 = __webpack_require__(3252);
6804
6847
 
6805
6848
  const array_1 = __webpack_require__(8112);
6806
6849
 
6807
- exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
6808
- /* Rule.none */
6809
- , 1, (0, combinator_1.surround)((0, source_1.str)('=='), (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('==')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '='), exports.mark)]))), (0, source_1.str)('=='), false, ([, bs], rest) => [[(0, dom_1.html)('mark', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
6850
+ exports.mark = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('=='), (0, combinator_1.syntax)(0
6851
+ /* Syntax.none */
6852
+ , 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('==')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '='), exports.mark)])))), (0, source_1.str)('=='), false, ([, bs], rest) => [[(0, dom_1.html)('mark', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
6810
6853
 
6811
6854
  /***/ }),
6812
6855
 
@@ -6828,7 +6871,7 @@ const source_1 = __webpack_require__(6743);
6828
6871
  const dom_1 = __webpack_require__(3252);
6829
6872
 
6830
6873
  const forbiddenCommand = /\\(?:begin|tiny|huge|large)(?![a-z])/i;
6831
- exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0, combinator_1.creator)((0, combinator_1.rewrite)((0, combinator_1.union)([(0, combinator_1.surround)('$', (0, combinator_1.precedence)(6, bracket), '$'), (0, combinator_1.surround)(/^\$(?![\s{}])/, (0, combinator_1.precedence)(3, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.focus)(/^(?:[ ([](?!\$)|\\[\\{}$]?|[!#%&')\x2A-\x5A\]^_\x61-\x7A|~])+/, (0, combinator_1.some)(source_1.unescsource))]))), /^\$(?![0-9A-Za-z])/)]), (source, {
6874
+ exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0, combinator_1.creation)((0, combinator_1.rewrite)((0, combinator_1.union)([(0, combinator_1.surround)('$', (0, combinator_1.precedence)(6, bracket), '$'), (0, combinator_1.surround)(/^\$(?![\s{}])/, (0, combinator_1.precedence)(3, (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.focus)(/^(?:[ ([](?!\$)|\\[\\{}$]?|[!#%&')\x2A-\x5A\]^_\x61-\x7A|~])+/, (0, combinator_1.some)(source_1.unescsource))]))), /^\$(?![0-9A-Za-z])/)]), (source, {
6832
6875
  caches: {
6833
6876
  math: cache
6834
6877
  } = {}
@@ -6843,7 +6886,7 @@ exports.math = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('$', (0,
6843
6886
  'data-invalid-type': 'content',
6844
6887
  'data-invalid-message': `"${source.match(forbiddenCommand)[0]}" command is forbidden`
6845
6888
  }, source)], '']))));
6846
- const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.escsource, /^(?:[{}$]|\\?\n)/)])), '}', true)));
6889
+ const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.surround)('{', (0, combinator_1.some)((0, combinator_1.union)([bracket, (0, combinator_1.some)(source_1.escsource, /^(?:[{}$]|\\?\n)/)])), '}', true)));
6847
6890
 
6848
6891
  /***/ }),
6849
6892
 
@@ -6883,11 +6926,11 @@ const optspec = {
6883
6926
  rel: global_1.undefined
6884
6927
  };
6885
6928
  Object.setPrototypeOf(optspec, null);
6886
- exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.syntax)(64
6887
- /* Rule.media */
6888
- , 2, 10, (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.open)('!', (0, combinator_1.guard)(context => ~context.state & 2
6929
+ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '!{'], (0, combinator_1.bind)((0, combinator_1.verify)((0, combinator_1.fmap)((0, combinator_1.open)('!', (0, combinator_1.constraint)(2
6889
6930
  /* State.media */
6890
- , (0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']', [[/^\\?\n/, 9]]), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), /^[^\S\n]*}/))]))), ([as, bs]) => bs ? [[as.join('').trim() || as.join('')], (0, array_1.shift)(bs)[1]] : [[''], (0, array_1.shift)(as)[1]]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
6931
+ , false, (0, combinator_1.syntax)(64
6932
+ /* Syntax.media */
6933
+ , 2, 10, (0, combinator_1.tails)([(0, combinator_1.dup)((0, combinator_1.surround)('[', (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']', [[/^\\?\n/, 9]]), ']', true)), (0, combinator_1.dup)((0, combinator_1.surround)(/^{(?![{}])/, (0, combinator_1.inits)([link_1.uri, (0, combinator_1.some)(option)]), /^[^\S\n]*}/))])))), ([as, bs]) => bs ? [[as.join('').trim() || as.join('')], (0, array_1.shift)(bs)[1]] : [[''], (0, array_1.shift)(as)[1]]), ([[text]]) => text === '' || text.trim() !== ''), ([[text], params], rest, context) => {
6891
6934
  const INSECURE_URI = params.shift();
6892
6935
  const url = new url_1.ReadonlyURL((0, link_1.resolve)(INSECURE_URI, context.host ?? global_1.location, context.url ?? context.host ?? global_1.location), context.host?.href || global_1.location.href);
6893
6936
  let cache;
@@ -6911,8 +6954,8 @@ exports.media = (0, combinator_1.lazy)(() => (0, combinator_1.validate)(['![', '
6911
6954
  return (0, combinator_1.fmap)(link_1.textlink, ([link]) => [(0, dom_1.define)(link, {
6912
6955
  target: '_blank'
6913
6956
  }, [el])])(`{ ${INSECURE_URI}${params.join('')} }${rest}`, context);
6914
- }))));
6915
- const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true)])));
6957
+ })));
6958
+ const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, bracket, source_1.txt]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)((0, combinator_1.union)([htmlentity_1.unsafehtmlentity, source_1.txt]), '"')), (0, source_1.str)('"'), true)])));
6916
6959
  const option = (0, combinator_1.union)([(0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*x[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` width="${opt.slice(1).split('x')[0]}"`, ` height="${opt.slice(1).split('x')[1]}"`]), (0, combinator_1.fmap)((0, source_1.str)(/^[^\S\n]+[1-9][0-9]*:[1-9][0-9]*(?=[^\S\n]|})/), ([opt]) => [` aspect-ratio="${opt.slice(1).split(':').join('/')}"`]), link_1.option]);
6917
6960
 
6918
6961
  function sanitize(target, uri, alt) {
@@ -6984,11 +7027,11 @@ const util_1 = __webpack_require__(9437);
6984
7027
 
6985
7028
  const dom_1 = __webpack_require__(3252);
6986
7029
 
6987
- exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[[', (0, combinator_1.syntax)(4096
6988
- /* Rule.reference */
6989
- , 6, (0, combinator_1.surround)('[[', (0, combinator_1.guard)(context => ~context.state & 32
7030
+ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('[[', (0, combinator_1.constraint)(32
6990
7031
  /* State.reference */
6991
- , (0, combinator_1.state)(64
7032
+ , false, (0, combinator_1.syntax)(4096
7033
+ /* Syntax.reference */
7034
+ , 6, 1, (0, combinator_1.state)(64
6992
7035
  /* State.annotation */
6993
7036
  | 32
6994
7037
  /* State.reference */
@@ -6996,8 +7039,8 @@ exports.reference = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[['
6996
7039
  /* State.media */
6997
7040
  , (0, visibility_1.startLoose)((0, combinator_1.context)({
6998
7041
  delimiters: global_1.undefined
6999
- }, (0, combinator_1.subsequence)([abbr, (0, combinator_1.open)((0, source_1.stropt)(/^(?=\^)/), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])])), ']'))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ']' ? global_1.undefined : (0, link_1.optimize)('[[', ns, rest, next)))));
7000
- const abbr = (0, combinator_1.creator)((0, combinator_1.bind)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]*/), ([source], rest) => [[(0, dom_1.html)('abbr', source)], rest.replace(visibility_1.regBlankStart, '')]));
7042
+ }, (0, combinator_1.subsequence)([abbr, (0, combinator_1.open)((0, source_1.stropt)(/^(?=\^)/), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])), (0, combinator_1.some)(inline_1.inline, ']', [[/^\\?\n/, 9], [']', 2], [']]', 6]])])), ']')))), ']]', false, ([, ns], rest) => [[(0, dom_1.html)('sup', attributes(ns), [(0, dom_1.html)('span', (0, visibility_1.trimNode)((0, dom_1.defrag)(ns)))])], rest], ([, ns, rest], next) => next[0] === ']' ? global_1.undefined : (0, link_1.optimize)('[[', ns, rest, next)));
7043
+ const abbr = (0, combinator_1.creation)((0, combinator_1.bind)((0, combinator_1.surround)('^', (0, combinator_1.union)([(0, source_1.str)(/^(?![0-9]+\s?[|\]])[0-9A-Za-z]+(?:(?:-|(?=\W)(?!'\d)'?(?!\.\d)\.?(?!,\S),? ?)[0-9A-Za-z]+)*(?:-|'?\.?,? ?)?/)]), /^\|?(?=]])|^\|[^\S\n]*/), ([source], rest) => [[(0, dom_1.html)('abbr', source)], rest.replace(visibility_1.regBlankStart, '')]));
7001
7044
 
7002
7045
  function attributes(ns) {
7003
7046
  return typeof ns[0] === 'object' && ns[0].tagName === 'ABBR' ? {
@@ -7043,8 +7086,8 @@ const dom_1 = __webpack_require__(3252);
7043
7086
  const array_1 = __webpack_require__(8112);
7044
7087
 
7045
7088
  exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0, combinator_1.syntax)(0
7046
- /* Rule.none */
7047
- , 2, (0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.sequence)([(0, combinator_1.surround)('[', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=]\()/, text), ']'), (0, combinator_1.surround)('(', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=\))/, text), ')')]), ([texts]) => (0, visibility_1.isStartTightNodes)(texts)), ([texts, rubies]) => {
7089
+ /* Syntax.none */
7090
+ , 2, 1, (0, combinator_1.fmap)((0, combinator_1.verify)((0, combinator_1.sequence)([(0, combinator_1.surround)('[', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=]\()/, text), ']'), (0, combinator_1.surround)('(', (0, combinator_1.focus)(/^(?:\\[^\n]|[^\\[\](){}"\n])+(?=\))/, text), ')')]), ([texts]) => (0, visibility_1.isStartTightNodes)(texts)), ([texts, rubies]) => {
7048
7091
  texts[texts.length - 1] === '' && texts.pop();
7049
7092
 
7050
7093
  switch (true) {
@@ -7058,7 +7101,7 @@ exports.ruby = (0, combinator_1.lazy)(() => (0, combinator_1.validate)('[', (0,
7058
7101
  return [(0, dom_1.html)('ruby', attributes(texts, rubies), (0, dom_1.defrag)((0, array_1.unshift)([texts.join(' ')], [(0, dom_1.html)('rp', '('), (0, dom_1.html)('rt', rubies.join(' ').trim()), (0, dom_1.html)('rp', ')')])))];
7059
7102
  }
7060
7103
  }))));
7061
- const text = (0, combinator_1.creator)((source, context) => {
7104
+ const text = (0, combinator_1.creation)((source, context) => {
7062
7105
  const acc = [''];
7063
7106
 
7064
7107
  while (source !== '') {
@@ -7133,9 +7176,9 @@ const url_1 = __webpack_require__(4318);
7133
7176
 
7134
7177
  const media_1 = __webpack_require__(1303);
7135
7178
 
7136
- exports.shortmedia = (0, combinator_1.rewrite)((0, combinator_1.guard)(context => ~context.state & 2
7179
+ exports.shortmedia = (0, combinator_1.rewrite)((0, combinator_1.constraint)(2
7137
7180
  /* State.media */
7138
- , (0, combinator_1.open)('!', url_1.url)), (0, combinator_1.convert)(source => `!{ ${source.slice(1)} }`, (0, combinator_1.union)([media_1.media])));
7181
+ , false, (0, combinator_1.open)('!', url_1.url)), (0, combinator_1.convert)(source => `!{ ${source.slice(1)} }`, (0, combinator_1.union)([media_1.media])));
7139
7182
 
7140
7183
  /***/ }),
7141
7184
 
@@ -7164,9 +7207,9 @@ const dom_1 = __webpack_require__(3252);
7164
7207
 
7165
7208
  const array_1 = __webpack_require__(8112);
7166
7209
 
7167
- exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
7168
- /* Rule.none */
7169
- , 1, (0, combinator_1.surround)((0, source_1.str)('**'), (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, exports.strong]))])), '*'), (0, source_1.str)('**'), false, ([, bs], rest) => [[(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest])));
7210
+ exports.strong = (0, combinator_1.lazy)(() => (0, combinator_1.surround)((0, source_1.str)('**'), (0, combinator_1.syntax)(0
7211
+ /* Syntax.none */
7212
+ , 1, 1, (0, visibility_1.startTight)((0, combinator_1.some)((0, combinator_1.union)([(0, combinator_1.some)(inline_1.inline, (0, visibility_1.blankWith)('**')), (0, combinator_1.open)((0, combinator_1.some)(inline_1.inline, '*'), (0, combinator_1.union)([emstrong_1.emstrong, exports.strong]))])), '*')), (0, source_1.str)('**'), false, ([, bs], rest) => [[(0, dom_1.html)('strong', (0, dom_1.defrag)(bs))], rest], ([as, bs], rest) => [(0, array_1.unshift)(as, bs), rest]));
7170
7213
 
7171
7214
  /***/ }),
7172
7215
 
@@ -7193,12 +7236,12 @@ const dom_1 = __webpack_require__(3252);
7193
7236
 
7194
7237
  const array_1 = __webpack_require__(8112);
7195
7238
 
7196
- exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.syntax)(0
7197
- /* Rule.none */
7198
- , 2, (0, combinator_1.surround)('{{', (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), '}}', true, ([, ns = []], rest) => [[(0, dom_1.html)('span', {
7239
+ exports.template = (0, combinator_1.lazy)(() => (0, combinator_1.surround)('{{', (0, combinator_1.syntax)(0
7240
+ /* Syntax.none */
7241
+ , 2, 1, (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}')), '}}', true, ([, ns = []], rest) => [[(0, dom_1.html)('span', {
7199
7242
  class: 'template'
7200
- }, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest], ([, ns = [], rest], next) => next[0] === '}' ? global_1.undefined : (0, link_1.optimize)('{{', ns, rest, next))));
7201
- const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creator)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.escsource, /^"|^\\?\n/)), (0, source_1.str)('"'), true)])));
7243
+ }, `{{${ns.join('').replace(/\x1B/g, '')}}}`)], rest], ([, ns = [], rest], next) => next[0] === '}' ? global_1.undefined : (0, link_1.optimize)('{{', ns, rest, next)));
7244
+ const bracket = (0, combinator_1.lazy)(() => (0, combinator_1.creation)((0, combinator_1.union)([(0, combinator_1.surround)((0, source_1.str)('('), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ')'), (0, source_1.str)(')'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('['), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), ']'), (0, source_1.str)(']'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('{'), (0, combinator_1.some)((0, combinator_1.union)([bracket, source_1.escsource]), '}'), (0, source_1.str)('}'), true, global_1.undefined, ([as, bs = []], rest) => [(0, array_1.unshift)(as, bs), rest]), (0, combinator_1.surround)((0, source_1.str)('"'), (0, combinator_1.precedence)(8, (0, combinator_1.some)(source_1.escsource, /^"|^\\?\n/)), (0, source_1.str)('"'), true)])));
7202
7245
 
7203
7246
  /***/ }),
7204
7247
 
@@ -7855,7 +7898,7 @@ const combinator_1 = __webpack_require__(2087);
7855
7898
  const text_1 = __webpack_require__(7763);
7856
7899
 
7857
7900
  const delimiter = /[\s\x00-\x2F\x3A-\x40\x5B-\x60\x7B-\x7F]/;
7858
- exports.escsource = (0, combinator_1.creator)(source => {
7901
+ exports.escsource = (0, combinator_1.creation)(source => {
7859
7902
  if (source === '') return;
7860
7903
  const i = source.search(delimiter);
7861
7904
 
@@ -7921,10 +7964,10 @@ const global_1 = __webpack_require__(4128);
7921
7964
  const combinator_1 = __webpack_require__(2087);
7922
7965
 
7923
7966
  function str(pattern) {
7924
- return typeof pattern === 'string' ? (0, combinator_1.creator)(source => {
7967
+ return typeof pattern === 'string' ? (0, combinator_1.creation)(source => {
7925
7968
  if (source === '') return;
7926
7969
  return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : global_1.undefined;
7927
- }) : (0, combinator_1.creator)(source => {
7970
+ }) : (0, combinator_1.creation)(source => {
7928
7971
  if (source === '') return;
7929
7972
  const m = source.match(pattern);
7930
7973
  return m && m[0].length > 0 ? [[m[0]], source.slice(m[0].length)] : global_1.undefined;
@@ -7934,10 +7977,10 @@ function str(pattern) {
7934
7977
  exports.str = str;
7935
7978
 
7936
7979
  function stropt(pattern) {
7937
- return typeof pattern === 'string' ? (0, combinator_1.creator)(source => {
7980
+ return typeof pattern === 'string' ? (0, combinator_1.creation)(source => {
7938
7981
  if (source === '') return;
7939
7982
  return source.slice(0, pattern.length) === pattern ? [[pattern], source.slice(pattern.length)] : global_1.undefined;
7940
- }) : (0, combinator_1.creator)(source => {
7983
+ }) : (0, combinator_1.creation)(source => {
7941
7984
  if (source === '') return;
7942
7985
  const m = source.match(pattern);
7943
7986
  return m ? [[m[0]], source.slice(m[0].length)] : global_1.undefined;
@@ -7967,11 +8010,11 @@ const str_1 = __webpack_require__(2790);
7967
8010
 
7968
8011
  const dom_1 = __webpack_require__(3252);
7969
8012
 
7970
- exports.delimiter = /[\s\x00-\x7F]|\S#|[()、。!?][^\S\n]*(?=\\\n)/;
8013
+ exports.delimiter = /[\s\x00-\x7F]|\S[#>]|[()、。!?][^\S\n]*(?=\\\n)/;
7971
8014
  exports.nonWhitespace = /[\S\n]|$/;
7972
- exports.nonAlphanumeric = /[^0-9A-Za-z]|\S#|$/;
8015
+ exports.nonAlphanumeric = /[^0-9A-Za-z]|\S[#>]|$/;
7973
8016
  const repeat = (0, str_1.str)(/^(.)\1*/);
7974
- exports.text = (0, combinator_1.creator)((source, context) => {
8017
+ exports.text = (0, combinator_1.creation)((source, context) => {
7975
8018
  if (source === '') return;
7976
8019
  const i = source.search(exports.delimiter);
7977
8020
 
@@ -8066,7 +8109,7 @@ const combinator_1 = __webpack_require__(2087);
8066
8109
 
8067
8110
  const text_1 = __webpack_require__(7763);
8068
8111
 
8069
- exports.unescsource = (0, combinator_1.creator)(source => {
8112
+ exports.unescsource = (0, combinator_1.creation)(source => {
8070
8113
  if (source === '') return;
8071
8114
  const i = source.search(text_1.delimiter);
8072
8115
 
@@ -8148,7 +8191,7 @@ const memoize_1 = __webpack_require__(1808);
8148
8191
  const array_1 = __webpack_require__(8112);
8149
8192
 
8150
8193
  function visualize(parser) {
8151
- const blankline = new RegExp(/^(?:\\$|\\?[^\S\n]|&IHN;|<wbr>)+$/.source.replace('IHN', `(?:${normalize_1.invisibleHTMLEntityNames.join('|')})`), 'gm');
8194
+ const blankline = new RegExp(/^(?:\\$|\\?[^\S\n]|&IHN;|<wbr[^\S\n]*>)+$/.source.replace('IHN', `(?:${normalize_1.invisibleHTMLEntityNames.join('|')})`), 'gm');
8152
8195
  return (0, combinator_1.union)([(0, combinator_1.convert)(source => source.replace(blankline, line => line.replace(/[\\&<]/g, '\x1B$&')), (0, combinator_1.verify)(parser, (ns, rest, context) => !rest && hasVisible(ns, context))), (0, combinator_1.some)((0, combinator_1.union)([source_1.linebreak, source_1.unescsource]))]);
8153
8196
  }
8154
8197
 
@@ -8175,11 +8218,11 @@ function hasVisible(nodes, {
8175
8218
  return false;
8176
8219
  }
8177
8220
 
8178
- exports.regBlankStart = new RegExp(/^(?:\\?[^\S\n]|&IHN;|<wbr>)+/.source.replace('IHN', `(?:${normalize_1.invisibleHTMLEntityNames.join('|')})`));
8221
+ exports.regBlankStart = new RegExp(/^(?:\\?[^\S\n]|&IHN;|<wbr[^\S\n]*>)+/.source.replace('IHN', `(?:${normalize_1.invisibleHTMLEntityNames.join('|')})`));
8179
8222
 
8180
8223
  function blankWith(starting, delimiter) {
8181
8224
  if (delimiter === global_1.undefined) return blankWith('', starting);
8182
- return new RegExp(String.raw`^(?:(?=${starting})(?:\\?\s|&(?:${normalize_1.invisibleHTMLEntityNames.join('|')});|<wbr>)${starting && '+'})?${typeof delimiter === 'string' ? delimiter.replace(/[*+()\[\]]/g, '\\$&') : delimiter.source}`);
8225
+ return new RegExp(String.raw`^(?:(?=${starting})(?:\\?\s|&(?:${normalize_1.invisibleHTMLEntityNames.join('|')});|<wbr[^\S\n]*>)${starting && '+'})?${typeof delimiter === 'string' ? delimiter.replace(/[*+()\[\]]/g, '\\$&') : delimiter.source}`);
8183
8226
  }
8184
8227
 
8185
8228
  exports.blankWith = blankWith;
@@ -8222,7 +8265,7 @@ const isStartTight = (0, memoize_1.reduce)((source, context, except) => {
8222
8265
 
8223
8266
  case '<':
8224
8267
  switch (true) {
8225
- case source.length >= 5 && source[1] === 'w' && source.slice(0, 5) === '<wbr>':
8268
+ case source.length >= 5 && source.slice(0, 4) === '<wbr' && (source[5] === '>' || /^<wbr[^\S\n]*>/.test(source)):
8226
8269
  return false;
8227
8270
  }
8228
8271