@iress-oss/ids-storybook-config 0.2.4 → 0.2.6

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 (2) hide show
  1. package/dist/main.js +299 -237
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -121,8 +121,8 @@ function et() {
121
121
  function tt(e) {
122
122
  return e !== null && typeof e == "object" && "type" in e;
123
123
  }
124
- const be = [], nt = !0, X = !1, rt = "skip";
125
- function de(e, n, t, i) {
124
+ const de = [], nt = !0, X = !1, rt = "skip";
125
+ function be(e, n, t, i) {
126
126
  let l;
127
127
  typeof n == "function" && typeof t != "function" ? (i = t, t = n) : l = n;
128
128
  const a = U(l), r = i ? -1 : 1;
@@ -140,13 +140,13 @@ function de(e, n, t, i) {
140
140
  typeof c.name == "string" ? c.name : void 0
141
141
  )
142
142
  );
143
- Object.defineProperty(m, "name", {
143
+ Object.defineProperty(p, "name", {
144
144
  value: "node (" + (o.type + (g ? "<" + g + ">" : "")) + ")"
145
145
  });
146
146
  }
147
- return m;
148
- function m() {
149
- let g = be, p, b, d;
147
+ return p;
148
+ function p() {
149
+ let g = de, m, d, b;
150
150
  if ((!n || a(o, s, f[f.length - 1] || void 0)) && (g = it(t(o, f)), g[0] === X))
151
151
  return g;
152
152
  if ("children" in o && o.children) {
@@ -155,11 +155,11 @@ function de(e, n, t, i) {
155
155
  o
156
156
  );
157
157
  if (k.children && g[0] !== rt)
158
- for (b = (i ? k.children.length : -1) + r, d = f.concat(k); b > -1 && b < k.children.length; ) {
159
- const x = k.children[b];
160
- if (p = u(x, b, d)(), p[0] === X)
161
- return p;
162
- b = typeof p[1] == "number" ? p[1] : b + r;
158
+ for (d = (i ? k.children.length : -1) + r, b = f.concat(k); d > -1 && d < k.children.length; ) {
159
+ const x = k.children[d];
160
+ if (m = u(x, d, b)(), m[0] === X)
161
+ return m;
162
+ d = typeof m[1] == "number" ? m[1] : d + r;
163
163
  }
164
164
  }
165
165
  return g;
@@ -167,50 +167,50 @@ function de(e, n, t, i) {
167
167
  }
168
168
  }
169
169
  function it(e) {
170
- return Array.isArray(e) ? e : typeof e == "number" ? [nt, e] : e == null ? be : [e];
170
+ return Array.isArray(e) ? e : typeof e == "number" ? [nt, e] : e == null ? de : [e];
171
171
  }
172
172
  function ot(e, n, t) {
173
173
  const l = U((t || {}).ignore || []), a = lt(n);
174
174
  let r = -1;
175
175
  for (; ++r < a.length; )
176
- de(e, "text", u);
176
+ be(e, "text", u);
177
177
  function u(s, f) {
178
- let c = -1, m;
178
+ let c = -1, p;
179
179
  for (; ++c < f.length; ) {
180
- const g = f[c], p = m ? m.children : void 0;
180
+ const g = f[c], m = p ? p.children : void 0;
181
181
  if (l(
182
182
  g,
183
- p ? p.indexOf(g) : void 0,
184
- m
183
+ m ? m.indexOf(g) : void 0,
184
+ p
185
185
  ))
186
186
  return;
187
- m = g;
187
+ p = g;
188
188
  }
189
- if (m)
189
+ if (p)
190
190
  return o(s, f);
191
191
  }
192
192
  function o(s, f) {
193
- const c = f[f.length - 1], m = a[r][0], g = a[r][1];
194
- let p = 0;
195
- const d = c.children.indexOf(s);
193
+ const c = f[f.length - 1], p = a[r][0], g = a[r][1];
194
+ let m = 0;
195
+ const b = c.children.indexOf(s);
196
196
  let k = !1, x = [];
197
- m.lastIndex = 0;
198
- let w = m.exec(s.value);
197
+ p.lastIndex = 0;
198
+ let w = p.exec(s.value);
199
199
  for (; w; ) {
200
- const S = w.index, C = {
200
+ const v = w.index, C = {
201
201
  index: w.index,
202
202
  input: w.input,
203
203
  stack: [...f, s]
204
204
  };
205
205
  let y = g(...w, C);
206
- if (typeof y == "string" && (y = y.length > 0 ? { type: "text", value: y } : void 0), y === !1 ? m.lastIndex = S + 1 : (p !== S && x.push({
206
+ if (typeof y == "string" && (y = y.length > 0 ? { type: "text", value: y } : void 0), y === !1 ? p.lastIndex = v + 1 : (m !== v && x.push({
207
207
  type: "text",
208
- value: s.value.slice(p, S)
209
- }), Array.isArray(y) ? x.push(...y) : y && x.push(y), p = S + w[0].length, k = !0), !m.global)
208
+ value: s.value.slice(m, v)
209
+ }), Array.isArray(y) ? x.push(...y) : y && x.push(y), m = v + w[0].length, k = !0), !p.global)
210
210
  break;
211
- w = m.exec(s.value);
211
+ w = p.exec(s.value);
212
212
  }
213
- return k ? (p < s.value.length && x.push({ type: "text", value: s.value.slice(p) }), c.children.splice(d, 1, ...x)) : x = [s], d + x.length;
213
+ return k ? (m < s.value.length && x.push({ type: "text", value: s.value.slice(m) }), c.children.splice(b, 1, ...x)) : x = [s], b + x.length;
214
214
  }
215
215
  }
216
216
  function lt(e) {
@@ -245,9 +245,9 @@ function st() {
245
245
  },
246
246
  exit: {
247
247
  literalAutolink: gt,
248
- literalAutolinkEmail: mt,
248
+ literalAutolinkEmail: pt,
249
249
  literalAutolinkHttp: ht,
250
- literalAutolinkWww: pt
250
+ literalAutolinkWww: mt
251
251
  }
252
252
  };
253
253
  }
@@ -287,12 +287,12 @@ function K(e) {
287
287
  function ht(e) {
288
288
  this.config.exit.autolinkProtocol.call(this, e);
289
289
  }
290
- function pt(e) {
290
+ function mt(e) {
291
291
  this.config.exit.data.call(this, e);
292
292
  const n = this.stack[this.stack.length - 1];
293
293
  n.type, n.url = "http://" + this.sliceSerialize(e);
294
294
  }
295
- function mt(e) {
295
+ function pt(e) {
296
296
  this.config.exit.autolinkEmail.call(this, e);
297
297
  }
298
298
  function gt(e) {
@@ -302,13 +302,13 @@ function kt(e) {
302
302
  ot(
303
303
  e,
304
304
  [
305
- [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, bt],
306
- [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), dt]
305
+ [/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi, dt],
306
+ [new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)", "gu"), bt]
307
307
  ],
308
308
  { ignore: ["link", "linkReference"] }
309
309
  );
310
310
  }
311
- function bt(e, n, t, i, l) {
311
+ function dt(e, n, t, i, l) {
312
312
  let a = "";
313
313
  if (!xe(l) || (/^w/i.test(n) && (t = n + t, n = "", a = "http://"), !xt(t)))
314
314
  return !1;
@@ -322,7 +322,7 @@ function bt(e, n, t, i, l) {
322
322
  };
323
323
  return r[1] ? [u, { type: "text", value: r[1] }] : u;
324
324
  }
325
- function dt(e, n, t, i) {
325
+ function bt(e, n, t, i) {
326
326
  return (
327
327
  // Not an expected previous character.
328
328
  !xe(i, !0) || // Label ends in not allowed character.
@@ -358,7 +358,7 @@ function xe(e, n) {
358
358
  function M(e) {
359
359
  return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
360
360
  }
361
- we.peek = Et;
361
+ we.peek = Ft;
362
362
  function yt() {
363
363
  this.buffer();
364
364
  }
@@ -368,13 +368,13 @@ function Ct(e) {
368
368
  function At() {
369
369
  this.buffer();
370
370
  }
371
- function St(e) {
371
+ function vt(e) {
372
372
  this.enter(
373
373
  { type: "footnoteDefinition", identifier: "", label: "", children: [] },
374
374
  e
375
375
  );
376
376
  }
377
- function vt(e) {
377
+ function St(e) {
378
378
  const n = this.resume(), t = this.stack[this.stack.length - 1];
379
379
  t.type, t.identifier = M(
380
380
  this.sliceSerialize(e)
@@ -383,7 +383,7 @@ function vt(e) {
383
383
  function Dt(e) {
384
384
  this.exit(e);
385
385
  }
386
- function Ft(e) {
386
+ function Et(e) {
387
387
  const n = this.resume(), t = this.stack[this.stack.length - 1];
388
388
  t.type, t.identifier = M(
389
389
  this.sliceSerialize(e)
@@ -392,7 +392,7 @@ function Ft(e) {
392
392
  function Tt(e) {
393
393
  this.exit(e);
394
394
  }
395
- function Et() {
395
+ function Ft() {
396
396
  return "[";
397
397
  }
398
398
  function we(e, n, t, i) {
@@ -409,12 +409,12 @@ function Lt() {
409
409
  gfmFootnoteCallString: yt,
410
410
  gfmFootnoteCall: Ct,
411
411
  gfmFootnoteDefinitionLabelString: At,
412
- gfmFootnoteDefinition: St
412
+ gfmFootnoteDefinition: vt
413
413
  },
414
414
  exit: {
415
- gfmFootnoteCallString: vt,
415
+ gfmFootnoteCallString: St,
416
416
  gfmFootnoteCall: Dt,
417
- gfmFootnoteDefinitionLabelString: Ft,
417
+ gfmFootnoteDefinitionLabelString: Et,
418
418
  gfmFootnoteDefinition: Tt
419
419
  }
420
420
  };
@@ -500,62 +500,62 @@ function Ht(e, n) {
500
500
  const t = n || {}, i = (t.align || []).concat(), l = t.stringLength || Bt, a = [], r = [], u = [], o = [];
501
501
  let s = 0, f = -1;
502
502
  for (; ++f < e.length; ) {
503
- const b = [], d = [];
503
+ const d = [], b = [];
504
504
  let k = -1;
505
505
  for (e[f].length > s && (s = e[f].length); ++k < e[f].length; ) {
506
506
  const x = $t(e[f][k]);
507
507
  if (t.alignDelimiters !== !1) {
508
508
  const w = l(x);
509
- d[k] = w, (o[k] === void 0 || w > o[k]) && (o[k] = w);
509
+ b[k] = w, (o[k] === void 0 || w > o[k]) && (o[k] = w);
510
510
  }
511
- b.push(x);
511
+ d.push(x);
512
512
  }
513
- r[f] = b, u[f] = d;
513
+ r[f] = d, u[f] = b;
514
514
  }
515
515
  let c = -1;
516
516
  if (typeof i == "object" && "length" in i)
517
517
  for (; ++c < s; )
518
518
  a[c] = se(i[c]);
519
519
  else {
520
- const b = se(i);
520
+ const d = se(i);
521
521
  for (; ++c < s; )
522
- a[c] = b;
522
+ a[c] = d;
523
523
  }
524
524
  c = -1;
525
- const m = [], g = [];
525
+ const p = [], g = [];
526
526
  for (; ++c < s; ) {
527
- const b = a[c];
528
- let d = "", k = "";
529
- b === 99 ? (d = ":", k = ":") : b === 108 ? d = ":" : b === 114 && (k = ":");
527
+ const d = a[c];
528
+ let b = "", k = "";
529
+ d === 99 ? (b = ":", k = ":") : d === 108 ? b = ":" : d === 114 && (k = ":");
530
530
  let x = t.alignDelimiters === !1 ? 1 : Math.max(
531
531
  1,
532
- o[c] - d.length - k.length
532
+ o[c] - b.length - k.length
533
533
  );
534
- const w = d + "-".repeat(x) + k;
535
- t.alignDelimiters !== !1 && (x = d.length + x + k.length, x > o[c] && (o[c] = x), g[c] = x), m[c] = w;
534
+ const w = b + "-".repeat(x) + k;
535
+ t.alignDelimiters !== !1 && (x = b.length + x + k.length, x > o[c] && (o[c] = x), g[c] = x), p[c] = w;
536
536
  }
537
- r.splice(1, 0, m), u.splice(1, 0, g), f = -1;
538
- const p = [];
537
+ r.splice(1, 0, p), u.splice(1, 0, g), f = -1;
538
+ const m = [];
539
539
  for (; ++f < r.length; ) {
540
- const b = r[f], d = u[f];
540
+ const d = r[f], b = u[f];
541
541
  c = -1;
542
542
  const k = [];
543
543
  for (; ++c < s; ) {
544
- const x = b[c] || "";
545
- let w = "", S = "";
544
+ const x = d[c] || "";
545
+ let w = "", v = "";
546
546
  if (t.alignDelimiters !== !1) {
547
- const C = o[c] - (d[c] || 0), y = a[c];
548
- y === 114 ? w = " ".repeat(C) : y === 99 ? C % 2 ? (w = " ".repeat(C / 2 + 0.5), S = " ".repeat(C / 2 - 0.5)) : (w = " ".repeat(C / 2), S = w) : S = " ".repeat(C);
547
+ const C = o[c] - (b[c] || 0), y = a[c];
548
+ y === 114 ? w = " ".repeat(C) : y === 99 ? C % 2 ? (w = " ".repeat(C / 2 + 0.5), v = " ".repeat(C / 2 - 0.5)) : (w = " ".repeat(C / 2), v = w) : v = " ".repeat(C);
549
549
  }
550
550
  t.delimiterStart !== !1 && !c && k.push("|"), t.padding !== !1 && // Don’t add the opening space if we’re not aligning and the cell is
551
551
  // empty: there will be a closing space.
552
- !(t.alignDelimiters === !1 && x === "") && (t.delimiterStart !== !1 || c) && k.push(" "), t.alignDelimiters !== !1 && k.push(w), k.push(x), t.alignDelimiters !== !1 && k.push(S), t.padding !== !1 && k.push(" "), (t.delimiterEnd !== !1 || c !== s - 1) && k.push("|");
552
+ !(t.alignDelimiters === !1 && x === "") && (t.delimiterStart !== !1 || c) && k.push(" "), t.alignDelimiters !== !1 && k.push(w), k.push(x), t.alignDelimiters !== !1 && k.push(v), t.padding !== !1 && k.push(" "), (t.delimiterEnd !== !1 || c !== s - 1) && k.push("|");
553
553
  }
554
- p.push(
554
+ m.push(
555
555
  t.delimiterEnd === !1 ? k.join("").replace(/ +$/, "") : k.join("")
556
556
  );
557
557
  }
558
- return p.join(`
558
+ return m.join(`
559
559
  `);
560
560
  }
561
561
  function $t(e) {
@@ -624,8 +624,8 @@ function Gt(e) {
624
624
  function Qt(e, n, t, i) {
625
625
  const l = Gt(t), a = e.value || "", r = l === "`" ? "GraveAccent" : "Tilde";
626
626
  if (Vt(e, t)) {
627
- const c = t.enter("codeIndented"), m = t.indentLines(a, Zt);
628
- return c(), m;
627
+ const c = t.enter("codeIndented"), p = t.indentLines(a, Zt);
628
+ return c(), p;
629
629
  }
630
630
  const u = t.createTracker(i), o = l.repeat(Math.max(Ut(a, l) + 1, 3)), s = t.enter("codeFenced");
631
631
  let f = u.move(o);
@@ -763,11 +763,11 @@ function Ae(e, n, t, i) {
763
763
  l
764
764
  );
765
765
  f.inside && (o = R(s) + o.slice(1));
766
- const c = o.charCodeAt(o.length - 1), m = q(i.after.charCodeAt(0), c, l);
767
- m.inside && (o = o.slice(0, -1) + R(c));
766
+ const c = o.charCodeAt(o.length - 1), p = q(i.after.charCodeAt(0), c, l);
767
+ p.inside && (o = o.slice(0, -1) + R(c));
768
768
  const g = r.move(l);
769
769
  return a(), t.attentionEncodeSurroundingInfo = {
770
- after: m.outside,
770
+ after: p.outside,
771
771
  before: f.outside
772
772
  }, u + o + g;
773
773
  }
@@ -776,18 +776,18 @@ function Xt(e, n, t) {
776
776
  }
777
777
  function Yt(e, n, t, i) {
778
778
  let l, a, r;
779
- typeof n == "function" && typeof t != "function" ? (a = void 0, r = n, l = t) : (a = n, r = t, l = i), de(e, a, u, l);
779
+ typeof n == "function" && typeof t != "function" ? (a = void 0, r = n, l = t) : (a = n, r = t, l = i), be(e, a, u, l);
780
780
  function u(o, s) {
781
781
  const f = s[s.length - 1], c = f ? f.children.indexOf(o) : void 0;
782
782
  return r(o, c, f);
783
783
  }
784
784
  }
785
785
  const en = {};
786
- function Se(e, n) {
786
+ function ve(e, n) {
787
787
  const t = en, i = typeof t.includeImageAlt == "boolean" ? t.includeImageAlt : !0, l = typeof t.includeHtml == "boolean" ? t.includeHtml : !0;
788
- return ve(e, i, l);
788
+ return Se(e, i, l);
789
789
  }
790
- function ve(e, n, t) {
790
+ function Se(e, n, t) {
791
791
  if (tn(e)) {
792
792
  if ("value" in e)
793
793
  return e.type === "html" && !t ? "" : e.value;
@@ -802,7 +802,7 @@ function he(e, n, t) {
802
802
  const i = [];
803
803
  let l = -1;
804
804
  for (; ++l < e.length; )
805
- i[l] = ve(e[l], n, t);
805
+ i[l] = Se(e[l], n, t);
806
806
  return i.join("");
807
807
  }
808
808
  function tn(e) {
@@ -813,24 +813,24 @@ function nn(e, n) {
813
813
  return Yt(e, function(i) {
814
814
  if ("value" in i && /\r?\n|\r/.test(i.value) || i.type === "break")
815
815
  return t = !0, X;
816
- }), !!((!e.depth || e.depth < 3) && Se(e) && (n.options.setext || t));
816
+ }), !!((!e.depth || e.depth < 3) && ve(e) && (n.options.setext || t));
817
817
  }
818
818
  function rn(e, n, t, i) {
819
819
  const l = Math.max(Math.min(6, e.depth || 1), 1), a = t.createTracker(i);
820
820
  if (nn(e, t)) {
821
- const f = t.enter("headingSetext"), c = t.enter("phrasing"), m = t.containerPhrasing(e, {
821
+ const f = t.enter("headingSetext"), c = t.enter("phrasing"), p = t.containerPhrasing(e, {
822
822
  ...a.current(),
823
823
  before: `
824
824
  `,
825
825
  after: `
826
826
  `
827
827
  });
828
- return c(), f(), m + `
828
+ return c(), f(), p + `
829
829
  ` + (l === 1 ? "=" : "-").repeat(
830
830
  // The whole size…
831
- m.length - // Minus the position of the character after the last EOL (or
831
+ p.length - // Minus the position of the character after the last EOL (or
832
832
  // 0 if there is none)…
833
- (Math.max(m.lastIndexOf("\r"), m.lastIndexOf(`
833
+ (Math.max(p.lastIndexOf("\r"), p.lastIndexOf(`
834
834
  `)) + 1)
835
835
  );
836
836
  }
@@ -851,8 +851,8 @@ function De(e) {
851
851
  function on() {
852
852
  return "<";
853
853
  }
854
- Fe.peek = ln;
855
- function Fe(e, n, t, i) {
854
+ Ee.peek = ln;
855
+ function Ee(e, n, t, i) {
856
856
  const l = te(t), a = l === '"' ? "Quote" : "Apostrophe", r = t.enter("image");
857
857
  let u = t.enter("label");
858
858
  const o = t.createTracker(i);
@@ -904,8 +904,8 @@ function Te(e, n, t, i) {
904
904
  function an() {
905
905
  return "!";
906
906
  }
907
- Ee.peek = un;
908
- function Ee(e, n, t) {
907
+ Fe.peek = un;
908
+ function Fe(e, n, t) {
909
909
  let i = e.value || "", l = "`", a = -1;
910
910
  for (; new RegExp("(^|[^`])" + l + "([^`]|$)").test(i); )
911
911
  l += "`";
@@ -924,7 +924,7 @@ function un() {
924
924
  return "`";
925
925
  }
926
926
  function Le(e, n) {
927
- const t = Se(e);
927
+ const t = ve(e);
928
928
  return !!(!n.options.resourceLink && // If there’s a url…
929
929
  e.url && // And there’s a no title…
930
930
  !e.title && // And the content of `node` is a single text node…
@@ -1041,7 +1041,7 @@ function Pe(e) {
1041
1041
  );
1042
1042
  return n;
1043
1043
  }
1044
- function pn(e, n, t, i) {
1044
+ function mn(e, n, t, i) {
1045
1045
  const l = t.enter("list"), a = t.bulletCurrent;
1046
1046
  let r = e.ordered ? hn(t) : ne(t);
1047
1047
  const u = e.ordered ? r === "." ? ")" : "." : fn(t);
@@ -1057,8 +1057,8 @@ function pn(e, n, t, i) {
1057
1057
  ) {
1058
1058
  let c = -1;
1059
1059
  for (; ++c < e.children.length; ) {
1060
- const m = e.children[c];
1061
- if (m && m.type === "listItem" && m.children && m.children[0] && m.children[0].type === "thematicBreak") {
1060
+ const p = e.children[c];
1061
+ if (p && p.type === "listItem" && p.children && p.children[0] && p.children[0].type === "thematicBreak") {
1062
1062
  o = !0;
1063
1063
  break;
1064
1064
  }
@@ -1069,7 +1069,7 @@ function pn(e, n, t, i) {
1069
1069
  const s = t.containerFlow(e, i);
1070
1070
  return t.bulletLastUsed = r, t.bulletCurrent = a, l(), s;
1071
1071
  }
1072
- function mn(e) {
1072
+ function pn(e) {
1073
1073
  const n = e.options.listItemIndent || "one";
1074
1074
  if (n !== "tab" && n !== "one" && n !== "mixed")
1075
1075
  throw new Error(
@@ -1078,7 +1078,7 @@ function mn(e) {
1078
1078
  return n;
1079
1079
  }
1080
1080
  function gn(e, n, t, i) {
1081
- const l = mn(t);
1081
+ const l = pn(t);
1082
1082
  let a = t.bulletCurrent || ne(t);
1083
1083
  n && n.type === "list" && n.ordered && (a = (typeof n.start == "number" && n.start > -1 ? n.start : 1) + (t.options.incrementListMarker === !1 ? 0 : n.children.indexOf(e)) + a);
1084
1084
  let r = a.length + 1;
@@ -1090,15 +1090,15 @@ function gn(e, n, t, i) {
1090
1090
  f
1091
1091
  );
1092
1092
  return o(), s;
1093
- function f(c, m, g) {
1094
- return m ? (g ? "" : " ".repeat(r)) + c : (g ? a : a + " ".repeat(r - a.length)) + c;
1093
+ function f(c, p, g) {
1094
+ return p ? (g ? "" : " ".repeat(r)) + c : (g ? a : a + " ".repeat(r - a.length)) + c;
1095
1095
  }
1096
1096
  }
1097
1097
  function kn(e, n, t, i) {
1098
1098
  const l = t.enter("paragraph"), a = t.enter("phrasing"), r = t.containerPhrasing(e, i);
1099
1099
  return a(), l(), r;
1100
1100
  }
1101
- const bn = (
1101
+ const dn = (
1102
1102
  /** @type {(node?: unknown) => node is Exclude<PhrasingContent, Html>} */
1103
1103
  /* @__PURE__ */ U([
1104
1104
  "break",
@@ -1124,9 +1124,9 @@ const bn = (
1124
1124
  "textDirective"
1125
1125
  ])
1126
1126
  );
1127
- function dn(e, n, t, i) {
1127
+ function bn(e, n, t, i) {
1128
1128
  return (e.children.some(function(r) {
1129
- return bn(r);
1129
+ return dn(r);
1130
1130
  }) ? t.containerPhrasing : t.containerFlow).call(t, e, i);
1131
1131
  }
1132
1132
  function xn(e) {
@@ -1153,11 +1153,11 @@ function _e(e, n, t, i) {
1153
1153
  l
1154
1154
  );
1155
1155
  f.inside && (o = R(s) + o.slice(1));
1156
- const c = o.charCodeAt(o.length - 1), m = q(i.after.charCodeAt(0), c, l);
1157
- m.inside && (o = o.slice(0, -1) + R(c));
1156
+ const c = o.charCodeAt(o.length - 1), p = q(i.after.charCodeAt(0), c, l);
1157
+ p.inside && (o = o.slice(0, -1) + R(c));
1158
1158
  const g = r.move(l + l);
1159
1159
  return a(), t.attentionEncodeSurroundingInfo = {
1160
- after: m.outside,
1160
+ after: p.outside,
1161
1161
  before: f.outside
1162
1162
  }, u + o + g;
1163
1163
  }
@@ -1188,26 +1188,26 @@ const Re = {
1188
1188
  hardBreak: fe,
1189
1189
  heading: rn,
1190
1190
  html: De,
1191
- image: Fe,
1191
+ image: Ee,
1192
1192
  imageReference: Te,
1193
- inlineCode: Ee,
1193
+ inlineCode: Fe,
1194
1194
  link: ze,
1195
1195
  linkReference: Ie,
1196
- list: pn,
1196
+ list: mn,
1197
1197
  listItem: gn,
1198
1198
  paragraph: kn,
1199
- root: dn,
1199
+ root: bn,
1200
1200
  strong: _e,
1201
1201
  text: yn,
1202
1202
  thematicBreak: An
1203
1203
  };
1204
- function Sn() {
1204
+ function vn() {
1205
1205
  return {
1206
1206
  enter: {
1207
- table: vn,
1208
- tableData: pe,
1209
- tableHeader: pe,
1210
- tableRow: Fn
1207
+ table: Sn,
1208
+ tableData: me,
1209
+ tableHeader: me,
1210
+ tableRow: En
1211
1211
  },
1212
1212
  exit: {
1213
1213
  codeText: Tn,
@@ -1218,7 +1218,7 @@ function Sn() {
1218
1218
  }
1219
1219
  };
1220
1220
  }
1221
- function vn(e) {
1221
+ function Sn(e) {
1222
1222
  const n = e._align;
1223
1223
  this.enter(
1224
1224
  {
@@ -1234,22 +1234,22 @@ function vn(e) {
1234
1234
  function Dn(e) {
1235
1235
  this.exit(e), this.data.inTable = void 0;
1236
1236
  }
1237
- function Fn(e) {
1237
+ function En(e) {
1238
1238
  this.enter({ type: "tableRow", children: [] }, e);
1239
1239
  }
1240
1240
  function J(e) {
1241
1241
  this.exit(e);
1242
1242
  }
1243
- function pe(e) {
1243
+ function me(e) {
1244
1244
  this.enter({ type: "tableCell", children: [] }, e);
1245
1245
  }
1246
1246
  function Tn(e) {
1247
1247
  let n = this.resume();
1248
- this.data.inTable && (n = n.replace(/\\([\\|])/g, En));
1248
+ this.data.inTable && (n = n.replace(/\\([\\|])/g, Fn));
1249
1249
  const t = this.stack[this.stack.length - 1];
1250
1250
  t.type, t.value = n, this.exit(e);
1251
1251
  }
1252
- function En(e, n) {
1252
+ function Fn(e, n) {
1253
1253
  return n === "|" ? n : e;
1254
1254
  }
1255
1255
  function Ln(e) {
@@ -1275,31 +1275,31 @@ function Ln(e) {
1275
1275
  { atBreak: !0, character: "-", after: "[:|-]" }
1276
1276
  ],
1277
1277
  handlers: {
1278
- inlineCode: m,
1278
+ inlineCode: p,
1279
1279
  table: r,
1280
1280
  tableCell: o,
1281
1281
  tableRow: u
1282
1282
  }
1283
1283
  };
1284
- function r(g, p, b, d) {
1285
- return s(f(g, b, d), g.align);
1284
+ function r(g, m, d, b) {
1285
+ return s(f(g, d, b), g.align);
1286
1286
  }
1287
- function u(g, p, b, d) {
1288
- const k = c(g, b, d), x = s([k]);
1287
+ function u(g, m, d, b) {
1288
+ const k = c(g, d, b), x = s([k]);
1289
1289
  return x.slice(0, x.indexOf(`
1290
1290
  `));
1291
1291
  }
1292
- function o(g, p, b, d) {
1293
- const k = b.enter("tableCell"), x = b.enter("phrasing"), w = b.containerPhrasing(g, {
1294
- ...d,
1292
+ function o(g, m, d, b) {
1293
+ const k = d.enter("tableCell"), x = d.enter("phrasing"), w = d.containerPhrasing(g, {
1294
+ ...b,
1295
1295
  before: a,
1296
1296
  after: a
1297
1297
  });
1298
1298
  return x(), k(), w;
1299
1299
  }
1300
- function s(g, p) {
1300
+ function s(g, m) {
1301
1301
  return Ht(g, {
1302
- align: p,
1302
+ align: m,
1303
1303
  // @ts-expect-error: `markdown-table` types should support `null`.
1304
1304
  alignDelimiters: i,
1305
1305
  // @ts-expect-error: `markdown-table` types should support `null`.
@@ -1308,32 +1308,32 @@ function Ln(e) {
1308
1308
  stringLength: l
1309
1309
  });
1310
1310
  }
1311
- function f(g, p, b) {
1312
- const d = g.children;
1311
+ function f(g, m, d) {
1312
+ const b = g.children;
1313
1313
  let k = -1;
1314
- const x = [], w = p.enter("table");
1315
- for (; ++k < d.length; )
1316
- x[k] = c(d[k], p, b);
1314
+ const x = [], w = m.enter("table");
1315
+ for (; ++k < b.length; )
1316
+ x[k] = c(b[k], m, d);
1317
1317
  return w(), x;
1318
1318
  }
1319
- function c(g, p, b) {
1320
- const d = g.children;
1319
+ function c(g, m, d) {
1320
+ const b = g.children;
1321
1321
  let k = -1;
1322
- const x = [], w = p.enter("tableRow");
1323
- for (; ++k < d.length; )
1324
- x[k] = o(d[k], g, p, b);
1322
+ const x = [], w = m.enter("tableRow");
1323
+ for (; ++k < b.length; )
1324
+ x[k] = o(b[k], g, m, d);
1325
1325
  return w(), x;
1326
1326
  }
1327
- function m(g, p, b) {
1328
- let d = Re.inlineCode(g, p, b);
1329
- return b.stack.includes("tableCell") && (d = d.replace(/\|/g, "\\$&")), d;
1327
+ function p(g, m, d) {
1328
+ let b = Re.inlineCode(g, m, d);
1329
+ return d.stack.includes("tableCell") && (b = b.replace(/\|/g, "\\$&")), b;
1330
1330
  }
1331
1331
  }
1332
1332
  function zn() {
1333
1333
  return {
1334
1334
  exit: {
1335
- taskListCheckValueChecked: me,
1336
- taskListCheckValueUnchecked: me,
1335
+ taskListCheckValueChecked: pe,
1336
+ taskListCheckValueUnchecked: pe,
1337
1337
  paragraph: Pn
1338
1338
  }
1339
1339
  };
@@ -1344,7 +1344,7 @@ function In() {
1344
1344
  handlers: { listItem: _n }
1345
1345
  };
1346
1346
  }
1347
- function me(e) {
1347
+ function pe(e) {
1348
1348
  const n = this.stack[this.stack.length - 2];
1349
1349
  n.type, n.checked = e.type === "taskListCheckValueChecked";
1350
1350
  }
@@ -1386,7 +1386,7 @@ function Rn() {
1386
1386
  st(),
1387
1387
  Lt(),
1388
1388
  _t(),
1389
- Sn(),
1389
+ vn(),
1390
1390
  zn()
1391
1391
  ];
1392
1392
  }
@@ -1469,23 +1469,23 @@ const Hn = {
1469
1469
  name: "emailAutolink",
1470
1470
  tokenize: Wn,
1471
1471
  previous: We
1472
- }, v = {};
1472
+ }, S = {};
1473
1473
  function qn() {
1474
1474
  return {
1475
- text: v
1475
+ text: S
1476
1476
  };
1477
1477
  }
1478
- let E = 48;
1479
- for (; E < 123; )
1480
- v[E] = T, E++, E === 58 ? E = 65 : E === 91 && (E = 97);
1481
- v[43] = T;
1482
- v[45] = T;
1483
- v[46] = T;
1484
- v[95] = T;
1485
- v[72] = [T, He];
1486
- v[104] = [T, He];
1487
- v[87] = [T, Be];
1488
- v[119] = [T, Be];
1478
+ let F = 48;
1479
+ for (; F < 123; )
1480
+ S[F] = T, F++, F === 58 ? F = 65 : F === 91 && (F = 97);
1481
+ S[43] = T;
1482
+ S[45] = T;
1483
+ S[46] = T;
1484
+ S[95] = T;
1485
+ S[72] = [T, He];
1486
+ S[104] = [T, He];
1487
+ S[87] = [T, Be];
1488
+ S[119] = [T, Be];
1489
1489
  function Wn(e, n, t) {
1490
1490
  const i = this;
1491
1491
  let l, a;
@@ -1527,8 +1527,8 @@ function Un(e, n, t) {
1527
1527
  if (_(c) && l.length < 5)
1528
1528
  return l += String.fromCodePoint(c), e.consume(c), u;
1529
1529
  if (c === 58) {
1530
- const m = l.toLowerCase();
1531
- if (m === "http" || m === "https")
1530
+ const p = l.toLowerCase();
1531
+ if (p === "http" || p === "https")
1532
1532
  return e.consume(c), o;
1533
1533
  }
1534
1534
  return t(c);
@@ -1640,7 +1640,7 @@ function Jn(e, n, t) {
1640
1640
  }
1641
1641
  return n;
1642
1642
  }
1643
- function F(e, n, t, i) {
1643
+ function E(e, n, t, i) {
1644
1644
  const l = i ? i - 1 : Number.POSITIVE_INFINITY;
1645
1645
  let a = 0;
1646
1646
  return r;
@@ -1658,7 +1658,7 @@ const Xn = {
1658
1658
  function Yn(e, n, t) {
1659
1659
  return i;
1660
1660
  function i(a) {
1661
- return D(a) ? F(e, l, "linePrefix")(a) : l(a);
1661
+ return D(a) ? E(e, l, "linePrefix")(a) : l(a);
1662
1662
  }
1663
1663
  function l(a) {
1664
1664
  return a === null || I(a) ? n(a) : t(a);
@@ -1790,8 +1790,8 @@ function ir(e, n, t) {
1790
1790
  return t(c);
1791
1791
  if (c === 93) {
1792
1792
  e.exit("chunkString");
1793
- const m = e.exit("gfmFootnoteCallString");
1794
- return l.includes(M(i.sliceSerialize(m))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(c), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), n) : t(c);
1793
+ const p = e.exit("gfmFootnoteCallString");
1794
+ return l.includes(M(i.sliceSerialize(p))) ? (e.enter("gfmFootnoteCallLabelMarker"), e.consume(c), e.exit("gfmFootnoteCallLabelMarker"), e.exit("gfmFootnoteCall"), n) : t(c);
1795
1795
  }
1796
1796
  return A(c) || (r = !0), a++, e.consume(c), c === 92 ? f : s;
1797
1797
  }
@@ -1803,36 +1803,36 @@ function or(e, n, t) {
1803
1803
  const i = this, l = i.parser.gfmFootnotes || (i.parser.gfmFootnotes = []);
1804
1804
  let a, r = 0, u;
1805
1805
  return o;
1806
- function o(p) {
1807
- return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(p), e.exit("gfmFootnoteDefinitionLabelMarker"), s;
1806
+ function o(m) {
1807
+ return e.enter("gfmFootnoteDefinition")._container = !0, e.enter("gfmFootnoteDefinitionLabel"), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), s;
1808
1808
  }
1809
- function s(p) {
1810
- return p === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(p), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", f) : t(p);
1809
+ function s(m) {
1810
+ return m === 94 ? (e.enter("gfmFootnoteDefinitionMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionMarker"), e.enter("gfmFootnoteDefinitionLabelString"), e.enter("chunkString").contentType = "string", f) : t(m);
1811
1811
  }
1812
- function f(p) {
1812
+ function f(m) {
1813
1813
  if (
1814
1814
  // Too long.
1815
1815
  r > 999 || // Closing brace with nothing.
1816
- p === 93 && !u || // Space or tab is not supported by GFM for some reason.
1816
+ m === 93 && !u || // Space or tab is not supported by GFM for some reason.
1817
1817
  // `\n` and `[` not being supported makes sense.
1818
- p === null || p === 91 || A(p)
1818
+ m === null || m === 91 || A(m)
1819
1819
  )
1820
- return t(p);
1821
- if (p === 93) {
1820
+ return t(m);
1821
+ if (m === 93) {
1822
1822
  e.exit("chunkString");
1823
- const b = e.exit("gfmFootnoteDefinitionLabelString");
1824
- return a = M(i.sliceSerialize(b)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(p), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), m;
1823
+ const d = e.exit("gfmFootnoteDefinitionLabelString");
1824
+ return a = M(i.sliceSerialize(d)), e.enter("gfmFootnoteDefinitionLabelMarker"), e.consume(m), e.exit("gfmFootnoteDefinitionLabelMarker"), e.exit("gfmFootnoteDefinitionLabel"), p;
1825
1825
  }
1826
- return A(p) || (u = !0), r++, e.consume(p), p === 92 ? c : f;
1826
+ return A(m) || (u = !0), r++, e.consume(m), m === 92 ? c : f;
1827
1827
  }
1828
- function c(p) {
1829
- return p === 91 || p === 92 || p === 93 ? (e.consume(p), r++, f) : f(p);
1828
+ function c(m) {
1829
+ return m === 91 || m === 92 || m === 93 ? (e.consume(m), r++, f) : f(m);
1830
1830
  }
1831
- function m(p) {
1832
- return p === 58 ? (e.enter("definitionMarker"), e.consume(p), e.exit("definitionMarker"), l.includes(a) || l.push(a), F(e, g, "gfmFootnoteDefinitionWhitespace")) : t(p);
1831
+ function p(m) {
1832
+ return m === 58 ? (e.enter("definitionMarker"), e.consume(m), e.exit("definitionMarker"), l.includes(a) || l.push(a), E(e, g, "gfmFootnoteDefinitionWhitespace")) : t(m);
1833
1833
  }
1834
- function g(p) {
1835
- return n(p);
1834
+ function g(m) {
1835
+ return n(m);
1836
1836
  }
1837
1837
  }
1838
1838
  function lr(e, n, t) {
@@ -1843,7 +1843,7 @@ function ar(e) {
1843
1843
  }
1844
1844
  function ur(e, n, t) {
1845
1845
  const i = this;
1846
- return F(e, l, "gfmFootnoteDefinitionIndent", 5);
1846
+ return E(e, l, "gfmFootnoteDefinitionIndent", 5);
1847
1847
  function l(a) {
1848
1848
  const r = i.events[i.events.length - 1];
1849
1849
  return r && r[1].type === "gfmFootnoteDefinitionIndent" && r[2].sliceSerialize(r[1], !0).length === 4 ? n(a) : t(a);
@@ -1884,8 +1884,8 @@ function sr(e) {
1884
1884
  type: "strikethroughText",
1885
1885
  start: Object.assign({}, r[s][1].end),
1886
1886
  end: Object.assign({}, r[o][1].start)
1887
- }, m = [["enter", f, u], ["enter", r[s][1], u], ["exit", r[s][1], u], ["enter", c, u]], g = u.parser.constructs.insideSpan.null;
1888
- g && H(m, m.length, 0, Jn(g, r.slice(s + 1, o), u)), H(m, m.length, 0, [["exit", c, u], ["enter", r[o][1], u], ["exit", r[o][1], u], ["exit", f, u]]), H(r, s - 1, o - s + 3, m), o = s + m.length - 2;
1887
+ }, p = [["enter", f, u], ["enter", r[s][1], u], ["exit", r[s][1], u], ["enter", c, u]], g = u.parser.constructs.insideSpan.null;
1888
+ g && H(p, p.length, 0, Jn(g, r.slice(s + 1, o), u)), H(p, p.length, 0, [["exit", c, u], ["enter", r[o][1], u], ["exit", r[o][1], u], ["exit", f, u]]), H(r, s - 1, o - s + 3, p), o = s + p.length - 2;
1889
1889
  break;
1890
1890
  }
1891
1891
  }
@@ -1896,17 +1896,17 @@ function sr(e) {
1896
1896
  function a(r, u, o) {
1897
1897
  const s = this.previous, f = this.events;
1898
1898
  let c = 0;
1899
- return m;
1900
- function m(p) {
1901
- return s === 126 && f[f.length - 1][1].type !== "characterEscape" ? o(p) : (r.enter("strikethroughSequenceTemporary"), g(p));
1899
+ return p;
1900
+ function p(m) {
1901
+ return s === 126 && f[f.length - 1][1].type !== "characterEscape" ? o(m) : (r.enter("strikethroughSequenceTemporary"), g(m));
1902
1902
  }
1903
- function g(p) {
1904
- const b = $(s);
1905
- if (p === 126)
1906
- return c > 1 ? o(p) : (r.consume(p), c++, g);
1907
- if (c < 2 && !t) return o(p);
1908
- const d = r.exit("strikethroughSequenceTemporary"), k = $(p);
1909
- return d._open = !k || k === 2 && !!b, d._close = !b || b === 2 && !!k, u(p);
1903
+ function g(m) {
1904
+ const d = $(s);
1905
+ if (m === 126)
1906
+ return c > 1 ? o(m) : (r.consume(m), c++, g);
1907
+ if (c < 2 && !t) return o(m);
1908
+ const b = r.exit("strikethroughSequenceTemporary"), k = $(m);
1909
+ return b._open = !k || k === 2 && !!d, b._close = !d || d === 2 && !!k, u(m);
1910
1910
  }
1911
1911
  }
1912
1912
  }
@@ -1998,18 +1998,18 @@ function hr(e, n) {
1998
1998
  }
1999
1999
  return i;
2000
2000
  }
2001
- function pr() {
2001
+ function mr() {
2002
2002
  return {
2003
2003
  flow: {
2004
2004
  null: {
2005
2005
  name: "table",
2006
- tokenize: mr,
2006
+ tokenize: pr,
2007
2007
  resolveAll: gr
2008
2008
  }
2009
2009
  }
2010
2010
  };
2011
2011
  }
2012
- function mr(e, n, t) {
2012
+ function pr(e, n, t) {
2013
2013
  const i = this;
2014
2014
  let l = 0, a = 0, r;
2015
2015
  return u;
@@ -2031,25 +2031,25 @@ function mr(e, n, t) {
2031
2031
  return h === 124 || (r = !0, a += 1), f(h);
2032
2032
  }
2033
2033
  function f(h) {
2034
- return h === null ? t(h) : I(h) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), g) : t(h) : D(h) ? F(e, f, "whitespace")(h) : (a += 1, r && (r = !1, l += 1), h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), r = !0, f) : (e.enter("data"), c(h)));
2034
+ return h === null ? t(h) : I(h) ? a > 1 ? (a = 0, i.interrupt = !0, e.exit("tableRow"), e.enter("lineEnding"), e.consume(h), e.exit("lineEnding"), g) : t(h) : D(h) ? E(e, f, "whitespace")(h) : (a += 1, r && (r = !1, l += 1), h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), r = !0, f) : (e.enter("data"), c(h)));
2035
2035
  }
2036
2036
  function c(h) {
2037
- return h === null || h === 124 || A(h) ? (e.exit("data"), f(h)) : (e.consume(h), h === 92 ? m : c);
2037
+ return h === null || h === 124 || A(h) ? (e.exit("data"), f(h)) : (e.consume(h), h === 92 ? p : c);
2038
2038
  }
2039
- function m(h) {
2039
+ function p(h) {
2040
2040
  return h === 92 || h === 124 ? (e.consume(h), c) : c(h);
2041
2041
  }
2042
2042
  function g(h) {
2043
- return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(h) : (e.enter("tableDelimiterRow"), r = !1, D(h) ? F(e, p, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(h) : p(h));
2044
- }
2045
- function p(h) {
2046
- return h === 45 || h === 58 ? d(h) : h === 124 ? (r = !0, e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), b) : C(h);
2043
+ return i.interrupt = !1, i.parser.lazy[i.now().line] ? t(h) : (e.enter("tableDelimiterRow"), r = !1, D(h) ? E(e, m, "linePrefix", i.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4)(h) : m(h));
2047
2044
  }
2048
- function b(h) {
2049
- return D(h) ? F(e, d, "whitespace")(h) : d(h);
2045
+ function m(h) {
2046
+ return h === 45 || h === 58 ? b(h) : h === 124 ? (r = !0, e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), d) : C(h);
2050
2047
  }
2051
2048
  function d(h) {
2052
- return h === 58 ? (a += 1, r = !0, e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), k) : h === 45 ? (a += 1, k(h)) : h === null || I(h) ? S(h) : C(h);
2049
+ return D(h) ? E(e, b, "whitespace")(h) : b(h);
2050
+ }
2051
+ function b(h) {
2052
+ return h === 58 ? (a += 1, r = !0, e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), k) : h === 45 ? (a += 1, k(h)) : h === null || I(h) ? v(h) : C(h);
2053
2053
  }
2054
2054
  function k(h) {
2055
2055
  return h === 45 ? (e.enter("tableDelimiterFiller"), x(h)) : C(h);
@@ -2058,10 +2058,10 @@ function mr(e, n, t) {
2058
2058
  return h === 45 ? (e.consume(h), x) : h === 58 ? (r = !0, e.exit("tableDelimiterFiller"), e.enter("tableDelimiterMarker"), e.consume(h), e.exit("tableDelimiterMarker"), w) : (e.exit("tableDelimiterFiller"), w(h));
2059
2059
  }
2060
2060
  function w(h) {
2061
- return D(h) ? F(e, S, "whitespace")(h) : S(h);
2061
+ return D(h) ? E(e, v, "whitespace")(h) : v(h);
2062
2062
  }
2063
- function S(h) {
2064
- return h === 124 ? p(h) : h === null || I(h) ? !r || l !== a ? C(h) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), n(h)) : C(h);
2063
+ function v(h) {
2064
+ return h === 124 ? m(h) : h === null || I(h) ? !r || l !== a ? C(h) : (e.exit("tableDelimiterRow"), e.exit("tableHead"), n(h)) : C(h);
2065
2065
  }
2066
2066
  function C(h) {
2067
2067
  return t(h);
@@ -2070,7 +2070,7 @@ function mr(e, n, t) {
2070
2070
  return e.enter("tableRow"), O(h);
2071
2071
  }
2072
2072
  function O(h) {
2073
- return h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), O) : h === null || I(h) ? (e.exit("tableRow"), n(h)) : D(h) ? F(e, O, "whitespace")(h) : (e.enter("data"), j(h));
2073
+ return h === 124 ? (e.enter("tableCellDivider"), e.consume(h), e.exit("tableCellDivider"), O) : h === null || I(h) ? (e.exit("tableRow"), n(h)) : D(h) ? E(e, O, "whitespace")(h) : (e.enter("data"), j(h));
2074
2074
  }
2075
2075
  function j(h) {
2076
2076
  return h === null || h === 124 || A(h) ? (e.exit("data"), O(h)) : (e.consume(h), h === 92 ? Ne : j);
@@ -2081,22 +2081,22 @@ function mr(e, n, t) {
2081
2081
  }
2082
2082
  function gr(e, n) {
2083
2083
  let t = -1, i = !0, l = 0, a = [0, 0, 0, 0], r = [0, 0, 0, 0], u = !1, o = 0, s, f, c;
2084
- const m = new cr();
2084
+ const p = new cr();
2085
2085
  for (; ++t < e.length; ) {
2086
- const g = e[t], p = g[1];
2087
- g[0] === "enter" ? p.type === "tableHead" ? (u = !1, o !== 0 && (ke(m, n, o, s, f), f = void 0, o = 0), s = {
2086
+ const g = e[t], m = g[1];
2087
+ g[0] === "enter" ? m.type === "tableHead" ? (u = !1, o !== 0 && (ke(p, n, o, s, f), f = void 0, o = 0), s = {
2088
2088
  type: "table",
2089
- start: Object.assign({}, p.start),
2089
+ start: Object.assign({}, m.start),
2090
2090
  // Note: correct end is set later.
2091
- end: Object.assign({}, p.end)
2092
- }, m.add(t, 0, [["enter", s, n]])) : p.type === "tableRow" || p.type === "tableDelimiterRow" ? (i = !0, c = void 0, a = [0, 0, 0, 0], r = [0, t + 1, 0, 0], u && (u = !1, f = {
2091
+ end: Object.assign({}, m.end)
2092
+ }, p.add(t, 0, [["enter", s, n]])) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (i = !0, c = void 0, a = [0, 0, 0, 0], r = [0, t + 1, 0, 0], u && (u = !1, f = {
2093
2093
  type: "tableBody",
2094
- start: Object.assign({}, p.start),
2094
+ start: Object.assign({}, m.start),
2095
2095
  // Note: correct end is set later.
2096
- end: Object.assign({}, p.end)
2097
- }, m.add(t, 0, [["enter", f, n]])), l = p.type === "tableDelimiterRow" ? 2 : f ? 3 : 1) : l && (p.type === "data" || p.type === "tableDelimiterMarker" || p.type === "tableDelimiterFiller") ? (i = !1, r[2] === 0 && (a[1] !== 0 && (r[0] = r[1], c = B(m, n, a, l, void 0, c), a = [0, 0, 0, 0]), r[2] = t)) : p.type === "tableCellDivider" && (i ? i = !1 : (a[1] !== 0 && (r[0] = r[1], c = B(m, n, a, l, void 0, c)), a = r, r = [a[1], t, 0, 0])) : p.type === "tableHead" ? (u = !0, o = t) : p.type === "tableRow" || p.type === "tableDelimiterRow" ? (o = t, a[1] !== 0 ? (r[0] = r[1], c = B(m, n, a, l, t, c)) : r[1] !== 0 && (c = B(m, n, r, l, t, c)), l = 0) : l && (p.type === "data" || p.type === "tableDelimiterMarker" || p.type === "tableDelimiterFiller") && (r[3] = t);
2096
+ end: Object.assign({}, m.end)
2097
+ }, p.add(t, 0, [["enter", f, n]])), l = m.type === "tableDelimiterRow" ? 2 : f ? 3 : 1) : l && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") ? (i = !1, r[2] === 0 && (a[1] !== 0 && (r[0] = r[1], c = B(p, n, a, l, void 0, c), a = [0, 0, 0, 0]), r[2] = t)) : m.type === "tableCellDivider" && (i ? i = !1 : (a[1] !== 0 && (r[0] = r[1], c = B(p, n, a, l, void 0, c)), a = r, r = [a[1], t, 0, 0])) : m.type === "tableHead" ? (u = !0, o = t) : m.type === "tableRow" || m.type === "tableDelimiterRow" ? (o = t, a[1] !== 0 ? (r[0] = r[1], c = B(p, n, a, l, t, c)) : r[1] !== 0 && (c = B(p, n, r, l, t, c)), l = 0) : l && (m.type === "data" || m.type === "tableDelimiterMarker" || m.type === "tableDelimiterFiller") && (r[3] = t);
2098
2098
  }
2099
- for (o !== 0 && ke(m, n, o, s, f), m.consume(n.events), t = -1; ++t < n.events.length; ) {
2099
+ for (o !== 0 && ke(p, n, o, s, f), p.consume(n.events), t = -1; ++t < n.events.length; ) {
2100
2100
  const g = n.events[t];
2101
2101
  g[0] === "enter" && g[1].type === "table" && (g[1]._align = hr(n.events, t));
2102
2102
  }
@@ -2118,10 +2118,10 @@ function B(e, n, t, i, l, a) {
2118
2118
  end: Object.assign({}, f)
2119
2119
  };
2120
2120
  if (e.add(t[2], 0, [["enter", c, n]]), i !== 2) {
2121
- const m = n.events[t[2]], g = n.events[t[3]];
2122
- if (m[1].end = Object.assign({}, g[1].end), m[1].type = "chunkText", m[1].contentType = "text", t[3] > t[2] + 1) {
2123
- const p = t[2] + 1, b = t[3] - t[2] - 1;
2124
- e.add(p, b, []);
2121
+ const p = n.events[t[2]], g = n.events[t[3]];
2122
+ if (p[1].end = Object.assign({}, g[1].end), p[1].type = "chunkText", p[1].contentType = "text", t[3] > t[2] + 1) {
2123
+ const m = t[2] + 1, d = t[3] - t[2] - 1;
2124
+ e.add(m, d, []);
2125
2125
  }
2126
2126
  }
2127
2127
  e.add(t[3] + 1, 0, [["exit", c, n]]);
@@ -2138,16 +2138,16 @@ function z(e, n) {
2138
2138
  }
2139
2139
  const kr = {
2140
2140
  name: "tasklistCheck",
2141
- tokenize: dr
2141
+ tokenize: br
2142
2142
  };
2143
- function br() {
2143
+ function dr() {
2144
2144
  return {
2145
2145
  text: {
2146
2146
  91: kr
2147
2147
  }
2148
2148
  };
2149
2149
  }
2150
- function dr(e, n, t) {
2150
+ function br(e, n, t) {
2151
2151
  const i = this;
2152
2152
  return l;
2153
2153
  function l(o) {
@@ -2171,7 +2171,7 @@ function dr(e, n, t) {
2171
2171
  }
2172
2172
  }
2173
2173
  function xr(e, n, t) {
2174
- return F(e, i, "whitespace");
2174
+ return E(e, i, "whitespace");
2175
2175
  function i(l) {
2176
2176
  return l === null ? t(l) : n(l);
2177
2177
  }
@@ -2181,8 +2181,8 @@ function wr(e) {
2181
2181
  qn(),
2182
2182
  tr(),
2183
2183
  sr(e),
2184
- pr(),
2185
- br()
2184
+ mr(),
2185
+ dr()
2186
2186
  ]);
2187
2187
  }
2188
2188
  const yr = {};
@@ -2193,7 +2193,7 @@ function Cr(e) {
2193
2193
  ), t = e || yr, i = n.data(), l = i.micromarkExtensions || (i.micromarkExtensions = []), a = i.fromMarkdownExtensions || (i.fromMarkdownExtensions = []), r = i.toMarkdownExtensions || (i.toMarkdownExtensions = []);
2194
2194
  l.push(wr(t)), a.push(Rn()), r.push(Mn(t));
2195
2195
  }
2196
- const Ar = /* @__PURE__ */ Qe(import.meta.url), Sr = /* @__PURE__ */ Ue(Ar), vr = process.env.NODE_ENV === "development", Lr = ({
2196
+ const Ar = /* @__PURE__ */ Qe(import.meta.url), vr = /* @__PURE__ */ Ue(Ar), Sr = process.env.NODE_ENV === "development", Lr = ({
2197
2197
  absolutePath: e,
2198
2198
  proxyChildren: n,
2199
2199
  removeVitePluginNames: t = ["tree-shakeable"],
@@ -2229,7 +2229,7 @@ const Ar = /* @__PURE__ */ Qe(import.meta.url), Sr = /* @__PURE__ */ Ue(Ar), vr
2229
2229
  disableTelemetry: !0
2230
2230
  },
2231
2231
  framework: "@storybook/react-vite",
2232
- staticDirs: [G(Sr, "../public")],
2232
+ staticDirs: [G(vr, "../public")],
2233
2233
  stories: i ?? [
2234
2234
  "../docs/**/*.@(stories.ts|stories.tsx|mdx)",
2235
2235
  "../src/**/*.@(stories.ts|stories.tsx|mdx)"
@@ -2254,15 +2254,15 @@ const Ar = /* @__PURE__ */ Qe(import.meta.url), Sr = /* @__PURE__ */ Ue(Ar), vr
2254
2254
  ...o.resolve.alias,
2255
2255
  ...Object.fromEntries(
2256
2256
  Object.entries(f.compilerOptions.paths).map(
2257
- ([c, m]) => {
2258
- const g = c.replace("/*", ""), p = m[0].replace("/*", "");
2259
- return [g, G(e, p)];
2257
+ ([c, p]) => {
2258
+ const g = c.replace("/*", ""), m = p[0].replace("/*", "");
2259
+ return [g, G(e, m)];
2260
2260
  }
2261
2261
  )
2262
2262
  )
2263
2263
  });
2264
2264
  }
2265
- return n && vr && Object.entries(n).forEach(([s, f]) => {
2265
+ return n && Sr && Object.entries(n).forEach(([s, f]) => {
2266
2266
  o.server = o.server ?? {}, o.server.proxy = {
2267
2267
  ...o.server.proxy,
2268
2268
  [s]: {
@@ -2294,12 +2294,74 @@ const Ar = /* @__PURE__ */ Qe(import.meta.url), Sr = /* @__PURE__ */ Ue(Ar), vr
2294
2294
  window.addEventListener('hashchange', broadcastHash);
2295
2295
  window.addEventListener('load', broadcastHash);
2296
2296
  <\/script>`,
2297
+ `<script>
2298
+ window.addEventListener('message', function passTheme(event) {
2299
+ if (!event.data) {
2300
+ return;
2301
+ }
2302
+
2303
+ const { type, ...data } = event.data;
2304
+
2305
+ if (type !== 'PASS_THEME') {
2306
+ return;
2307
+ }
2308
+
2309
+ const frames = document.querySelectorAll('iframe');
2310
+ frames.forEach((f) => {
2311
+ try {
2312
+ f.contentWindow?.postMessage({ type: 'LOAD_THEME', data }, '*');
2313
+ } catch (err) {
2314
+ console.debug('[Storybook Host] Skipped frame broadcast:', err);
2315
+ }
2316
+ });
2317
+ });
2318
+ <\/script>`,
2297
2319
  o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1
2298
2320
  ].filter(Boolean).join(`
2299
2321
  `);
2300
2322
  }, r.previewHead = (u) => {
2301
2323
  const o = ae("", process.cwd(), "BASE_PATH");
2302
- return [u, o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1].filter(Boolean).join(`
2324
+ return [
2325
+ u,
2326
+ `<script>
2327
+ window.addEventListener('message', function loadTheme(event) {
2328
+ if (!event.data || event.data.type !== 'LOAD_THEME') {
2329
+ return;
2330
+ }
2331
+
2332
+ const { name, href, css } = event.data;
2333
+
2334
+ if (href) {
2335
+ const link = document.createElement('link');
2336
+ link.rel = 'stylesheet';
2337
+ link.href = href;
2338
+ document.head.appendChild(link);
2339
+ }
2340
+
2341
+ if (css) {
2342
+ const existing = document.head.querySelector('#storybook-config-theme);
2343
+
2344
+ if (!existing) {
2345
+ const style = document.createElement('style');
2346
+ style.id = 'storybook-config-theme';
2347
+ document.head.appendChild(style);
2348
+ }
2349
+
2350
+ style.innerHTML = css;
2351
+ }
2352
+
2353
+ const currentTheme = document.documentElement.getAttribute('data-theme');
2354
+
2355
+ if (currentTheme) {
2356
+ document.documentElement.classList.remove(currentTheme);
2357
+ }
2358
+
2359
+ document.documentElement.setAttribute('data-theme', name);
2360
+ document.documentElement.classList.add(name);
2361
+ });
2362
+ <\/script>`,
2363
+ o.BASE_PATH ? `<base href="${o.BASE_PATH}">` : !1
2364
+ ].filter(Boolean).join(`
2303
2365
  `);
2304
2366
  }, r;
2305
2367
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iress-oss/ids-storybook-config",
3
- "version": "0.2.4",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  },
51
51
  "devDependencies": {
52
52
  "@chromatic-com/storybook": "^4.1.3",
53
- "@iress-oss/ids-storybook-okta": "^0.1.1",
53
+ "@iress-oss/ids-storybook-okta": "^0.1.2",
54
54
  "@iress-oss/ids-storybook-sandbox": "^0.2.1",
55
55
  "@iress-oss/ids-storybook-toggle-stories": "^0.1.0",
56
56
  "@iress-oss/ids-storybook-version-badge": "^0.1.0",