react-blockkit 0.3.0 → 0.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useMemo as a, useRef as o, useState as s } from "react";
2
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { createContext as e, createElement as t, useCallback as n, useContext as r, useEffect as i, useId as a, useMemo as o, useRef as s, useState as c } from "react";
2
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
3
3
  //#region ../../node_modules/.pnpm/@stylexjs+stylex@0.19.0/node_modules/@stylexjs/stylex/lib/es/stylex.mjs
4
- var d = {}, f;
5
- function p() {
6
- if (f) return d;
7
- f = 1, Object.defineProperty(d, "__esModule", { value: !0 }), d.styleq = void 0;
4
+ var f = {}, p;
5
+ function m() {
6
+ if (p) return f;
7
+ p = 1, Object.defineProperty(f, "__esModule", { value: !0 }), f.styleq = void 0;
8
8
  var e = /* @__PURE__ */ new WeakMap(), t = "$$css";
9
9
  function n(n) {
10
10
  var r, i, a;
@@ -24,35 +24,35 @@ function p() {
24
24
  var g = l.get(m);
25
25
  g != null && (h = g[0], c = g[2], n.push.apply(n, g[1]), l = g[3]);
26
26
  } else {
27
- var ee = [];
28
- for (var _ in m) {
29
- var v = m[_];
30
- if (_ === t) {
31
- var y = m[_];
32
- y !== !0 && (c = c ? y + "; " + c : y);
27
+ var _ = [];
28
+ for (var v in m) {
29
+ var y = m[v];
30
+ if (v === t) {
31
+ var b = m[v];
32
+ b !== !0 && (c = c ? b + "; " + c : b);
33
33
  continue;
34
34
  }
35
- typeof v == "string" || v === null ? n.includes(_) || (n.push(_), l != null && ee.push(_), typeof v == "string" && (h += h ? " " + v : v)) : console.error(`styleq: ${_} typeof ${String(v)} is not "string" or "null".`);
35
+ typeof y == "string" || y === null ? n.includes(v) || (n.push(v), l != null && _.push(v), typeof y == "string" && (h += h ? " " + y : y)) : console.error(`styleq: ${v} typeof ${String(y)} is not "string" or "null".`);
36
36
  }
37
37
  if (l != null) {
38
- var b = /* @__PURE__ */ new WeakMap();
38
+ var x = /* @__PURE__ */ new WeakMap();
39
39
  l.set(m, [
40
40
  h,
41
- ee,
41
+ _,
42
42
  c,
43
- b
44
- ]), l = b;
43
+ x
44
+ ]), l = x;
45
45
  }
46
46
  }
47
47
  h && (o = o ? h + " " + o : h);
48
48
  } else if (i) s ??= {}, s = Object.assign({}, m, s);
49
49
  else {
50
- var x = null;
51
- for (var S in m) {
52
- var C = m[S];
53
- C !== void 0 && (n.includes(S) || (C != null && (s ??= {}, x ??= {}, x[S] = C), n.push(S), l = null));
50
+ var S = null;
51
+ for (var C in m) {
52
+ var ee = m[C];
53
+ ee !== void 0 && (n.includes(C) || (ee != null && (s ??= {}, S ??= {}, S[C] = ee), n.push(C), l = null));
54
54
  }
55
- x != null && (s = Object.assign(x, s));
55
+ S != null && (s = Object.assign(S, s));
56
56
  }
57
57
  }
58
58
  }
@@ -63,29 +63,29 @@ function p() {
63
63
  ];
64
64
  };
65
65
  }
66
- var r = d.styleq = n();
67
- return r.factory = n, d;
66
+ var r = f.styleq = n();
67
+ return r.factory = n, f;
68
68
  }
69
- var m = /*@__PURE__*/ p();
70
- function h(...e) {
71
- let [t, n, r] = m.styleq(e), i = {};
69
+ var h = /*@__PURE__*/ m();
70
+ function g(...e) {
71
+ let [t, n, r] = h.styleq(e), i = {};
72
72
  return t != null && t !== "" && (i.className = t), n != null && Object.keys(n).length > 0 && (i.style = n), r != null && r !== "" && (i["data-style-src"] = r), i;
73
73
  }
74
74
  Object.freeze({});
75
75
  //#endregion
76
76
  //#region src/assert-never.ts
77
- function g(e) {
77
+ function _(e) {
78
78
  throw TypeError(`Unreachable value: ${JSON.stringify(e)}`);
79
79
  }
80
80
  //#endregion
81
81
  //#region src/context.tsx
82
- var ee = {}, _ = e({
82
+ var v = {}, y = e({
83
83
  onAction: void 0,
84
- resolvers: ee,
84
+ resolvers: v,
85
85
  surface: "message"
86
86
  });
87
- function v({ children: e, onAction: t, resolvers: n = ee, surface: r = "message" }) {
88
- let i = a(() => ({
87
+ function b({ children: e, onAction: t, resolvers: n = v, surface: r = "message" }) {
88
+ let i = o(() => ({
89
89
  onAction: t,
90
90
  resolvers: n,
91
91
  surface: r
@@ -94,27 +94,329 @@ function v({ children: e, onAction: t, resolvers: n = ee, surface: r = "message"
94
94
  n,
95
95
  r
96
96
  ]);
97
- return /* @__PURE__ */ l(_.Provider, {
97
+ return /* @__PURE__ */ u(y.Provider, {
98
98
  value: i,
99
99
  children: e
100
100
  });
101
101
  }
102
- function y() {
103
- return r(_);
102
+ function x() {
103
+ return r(y);
104
104
  }
105
105
  //#endregion
106
+ //#region src/icons.tsx
107
+ function S({ children: e, fill: t = "none", name: n, size: r }) {
108
+ return /* @__PURE__ */ u("svg", {
109
+ className: "x1lliihq x2lah0s",
110
+ "aria-hidden": "true",
111
+ "data-icon": n,
112
+ fill: t,
113
+ focusable: "false",
114
+ height: r,
115
+ stroke: "currentColor",
116
+ strokeLinecap: "round",
117
+ strokeLinejoin: "round",
118
+ strokeWidth: 2,
119
+ viewBox: "0 0 24 24",
120
+ width: r,
121
+ xmlns: "http://www.w3.org/2000/svg",
122
+ children: e
123
+ });
124
+ }
125
+ function C({ size: e = 16 }) {
126
+ return /* @__PURE__ */ d(S, {
127
+ name: "calendar-days",
128
+ size: e,
129
+ children: [
130
+ /* @__PURE__ */ u("path", { d: "M8 2v4" }),
131
+ /* @__PURE__ */ u("path", { d: "M16 2v4" }),
132
+ /* @__PURE__ */ u("rect", {
133
+ width: "18",
134
+ height: "18",
135
+ x: "3",
136
+ y: "4",
137
+ rx: "2"
138
+ }),
139
+ /* @__PURE__ */ u("path", { d: "M3 10h18" }),
140
+ /* @__PURE__ */ u("path", { d: "M8 14h.01" }),
141
+ /* @__PURE__ */ u("path", { d: "M12 14h.01" }),
142
+ /* @__PURE__ */ u("path", { d: "M16 14h.01" }),
143
+ /* @__PURE__ */ u("path", { d: "M8 18h.01" }),
144
+ /* @__PURE__ */ u("path", { d: "M12 18h.01" }),
145
+ /* @__PURE__ */ u("path", { d: "M16 18h.01" })
146
+ ]
147
+ });
148
+ }
149
+ function ee({ size: e = 16 }) {
150
+ return /* @__PURE__ */ u(S, {
151
+ name: "chevron-down",
152
+ size: e,
153
+ children: /* @__PURE__ */ u("path", { d: "m6 9 6 6 6-6" })
154
+ });
155
+ }
156
+ function te({ size: e = 16 }) {
157
+ return /* @__PURE__ */ u(S, {
158
+ name: "chevron-left",
159
+ size: e,
160
+ children: /* @__PURE__ */ u("path", { d: "m15 18-6-6 6-6" })
161
+ });
162
+ }
163
+ function ne({ size: e = 16 }) {
164
+ return /* @__PURE__ */ u(S, {
165
+ name: "chevron-right",
166
+ size: e,
167
+ children: /* @__PURE__ */ u("path", { d: "m9 18 6-6-6-6" })
168
+ });
169
+ }
170
+ function re({ size: e = 16 }) {
171
+ return /* @__PURE__ */ u(S, {
172
+ name: "circle",
173
+ size: e,
174
+ children: /* @__PURE__ */ u("circle", {
175
+ cx: "12",
176
+ cy: "12",
177
+ r: "10"
178
+ })
179
+ });
180
+ }
181
+ function ie({ size: e = 16 }) {
182
+ return /* @__PURE__ */ d(S, {
183
+ name: "circle-alert",
184
+ size: e,
185
+ children: [
186
+ /* @__PURE__ */ u("circle", {
187
+ cx: "12",
188
+ cy: "12",
189
+ r: "10"
190
+ }),
191
+ /* @__PURE__ */ u("line", {
192
+ x1: "12",
193
+ x2: "12",
194
+ y1: "8",
195
+ y2: "12"
196
+ }),
197
+ /* @__PURE__ */ u("line", {
198
+ x1: "12",
199
+ x2: "12.01",
200
+ y1: "16",
201
+ y2: "16"
202
+ })
203
+ ]
204
+ });
205
+ }
206
+ function ae({ size: e = 16 }) {
207
+ return /* @__PURE__ */ d(S, {
208
+ name: "circle-check",
209
+ size: e,
210
+ children: [/* @__PURE__ */ u("circle", {
211
+ cx: "12",
212
+ cy: "12",
213
+ r: "10"
214
+ }), /* @__PURE__ */ u("path", { d: "m9 12 2 2 4-4" })]
215
+ });
216
+ }
217
+ function oe({ size: e = 16 }) {
218
+ return /* @__PURE__ */ d(S, {
219
+ name: "ellipsis",
220
+ size: e,
221
+ children: [
222
+ /* @__PURE__ */ u("circle", {
223
+ cx: "12",
224
+ cy: "12",
225
+ r: "1"
226
+ }),
227
+ /* @__PURE__ */ u("circle", {
228
+ cx: "19",
229
+ cy: "12",
230
+ r: "1"
231
+ }),
232
+ /* @__PURE__ */ u("circle", {
233
+ cx: "5",
234
+ cy: "12",
235
+ r: "1"
236
+ })
237
+ ]
238
+ });
239
+ }
240
+ function se({ size: e = 16 }) {
241
+ return /* @__PURE__ */ d(S, {
242
+ name: "ellipsis-vertical",
243
+ size: e,
244
+ children: [
245
+ /* @__PURE__ */ u("circle", {
246
+ cx: "12",
247
+ cy: "12",
248
+ r: "1"
249
+ }),
250
+ /* @__PURE__ */ u("circle", {
251
+ cx: "12",
252
+ cy: "5",
253
+ r: "1"
254
+ }),
255
+ /* @__PURE__ */ u("circle", {
256
+ cx: "12",
257
+ cy: "19",
258
+ r: "1"
259
+ })
260
+ ]
261
+ });
262
+ }
263
+ function ce({ size: e = 16 }) {
264
+ return /* @__PURE__ */ d(S, {
265
+ name: "expand",
266
+ size: e,
267
+ children: [
268
+ /* @__PURE__ */ u("path", { d: "m15 15 6 6" }),
269
+ /* @__PURE__ */ u("path", { d: "m15 9 6-6" }),
270
+ /* @__PURE__ */ u("path", { d: "M21 16v5h-5" }),
271
+ /* @__PURE__ */ u("path", { d: "M21 8V3h-5" }),
272
+ /* @__PURE__ */ u("path", { d: "M3 16v5h5" }),
273
+ /* @__PURE__ */ u("path", { d: "m3 21 6-6" }),
274
+ /* @__PURE__ */ u("path", { d: "M3 8V3h5" }),
275
+ /* @__PURE__ */ u("path", { d: "M9 9 3 3" })
276
+ ]
277
+ });
278
+ }
279
+ function le({ size: e = 16 }) {
280
+ return /* @__PURE__ */ d(S, {
281
+ name: "image",
282
+ size: e,
283
+ children: [
284
+ /* @__PURE__ */ u("rect", {
285
+ width: "18",
286
+ height: "18",
287
+ x: "3",
288
+ y: "3",
289
+ rx: "2",
290
+ ry: "2"
291
+ }),
292
+ /* @__PURE__ */ u("circle", {
293
+ cx: "9",
294
+ cy: "9",
295
+ r: "2"
296
+ }),
297
+ /* @__PURE__ */ u("path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21" })
298
+ ]
299
+ });
300
+ }
301
+ function ue({ size: e = 16 }) {
302
+ return /* @__PURE__ */ d(S, {
303
+ name: "info",
304
+ size: e,
305
+ children: [
306
+ /* @__PURE__ */ u("circle", {
307
+ cx: "12",
308
+ cy: "12",
309
+ r: "10"
310
+ }),
311
+ /* @__PURE__ */ u("path", { d: "M12 16v-4" }),
312
+ /* @__PURE__ */ u("path", { d: "M12 8h.01" })
313
+ ]
314
+ });
315
+ }
316
+ function de({ size: e = 16 }) {
317
+ return /* @__PURE__ */ u(S, {
318
+ name: "loader-circle",
319
+ size: e,
320
+ children: /* @__PURE__ */ u("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" })
321
+ });
322
+ }
323
+ function fe({ size: e = 16 }) {
324
+ return /* @__PURE__ */ u(S, {
325
+ name: "paperclip",
326
+ size: e,
327
+ children: /* @__PURE__ */ u("path", { d: "m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551" })
328
+ });
329
+ }
330
+ function pe({ size: e = 16 }) {
331
+ return /* @__PURE__ */ u(S, {
332
+ fill: "currentColor",
333
+ name: "play",
334
+ size: e,
335
+ children: /* @__PURE__ */ u("path", { d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" })
336
+ });
337
+ }
338
+ function me({ size: e = 16 }) {
339
+ return /* @__PURE__ */ d(S, {
340
+ name: "rocket",
341
+ size: e,
342
+ children: [
343
+ /* @__PURE__ */ u("path", { d: "M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5" }),
344
+ /* @__PURE__ */ u("path", { d: "M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09" }),
345
+ /* @__PURE__ */ u("path", { d: "M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z" }),
346
+ /* @__PURE__ */ u("path", { d: "M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05" })
347
+ ]
348
+ });
349
+ }
350
+ function he({ size: e = 16 }) {
351
+ return /* @__PURE__ */ d(S, {
352
+ name: "search",
353
+ size: e,
354
+ children: [/* @__PURE__ */ u("path", { d: "m21 21-4.34-4.34" }), /* @__PURE__ */ u("circle", {
355
+ cx: "11",
356
+ cy: "11",
357
+ r: "8"
358
+ })]
359
+ });
360
+ }
361
+ function ge({ size: e = 16 }) {
362
+ return /* @__PURE__ */ d(S, {
363
+ name: "thumbs-down",
364
+ size: e,
365
+ children: [/* @__PURE__ */ u("path", { d: "M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z" }), /* @__PURE__ */ u("path", { d: "M17 14V2" })]
366
+ });
367
+ }
368
+ function _e({ size: e = 16 }) {
369
+ return /* @__PURE__ */ d(S, {
370
+ name: "thumbs-up",
371
+ size: e,
372
+ children: [/* @__PURE__ */ u("path", { d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z" }), /* @__PURE__ */ u("path", { d: "M7 10v12" })]
373
+ });
374
+ }
375
+ function ve({ size: e = 16 }) {
376
+ return /* @__PURE__ */ d(S, {
377
+ name: "trash-2",
378
+ size: e,
379
+ children: [
380
+ /* @__PURE__ */ u("path", { d: "M10 11v6" }),
381
+ /* @__PURE__ */ u("path", { d: "M14 11v6" }),
382
+ /* @__PURE__ */ u("path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" }),
383
+ /* @__PURE__ */ u("path", { d: "M3 6h18" }),
384
+ /* @__PURE__ */ u("path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" })
385
+ ]
386
+ });
387
+ }
388
+ function ye({ size: e = 16 }) {
389
+ return /* @__PURE__ */ d(S, {
390
+ name: "triangle-alert",
391
+ size: e,
392
+ children: [
393
+ /* @__PURE__ */ u("path", { d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3" }),
394
+ /* @__PURE__ */ u("path", { d: "M12 9v4" }),
395
+ /* @__PURE__ */ u("path", { d: "M12 17h.01" })
396
+ ]
397
+ });
398
+ }
399
+ var be = {
400
+ calendar: C,
401
+ ellipsis: oe,
402
+ play: pe,
403
+ rocket: me,
404
+ search: he,
405
+ trash: ve
406
+ };
407
+ //#endregion
106
408
  //#region src/runtime.ts
107
- function b(e) {
409
+ function w(e) {
108
410
  return typeof e == "object" && !!e && !Array.isArray(e);
109
411
  }
110
- function x(e) {
111
- if (b(e)) return typeof e.type == "string" ? e.type : void 0;
412
+ function T(e) {
413
+ if (w(e)) return typeof e.type == "string" ? e.type : void 0;
112
414
  }
113
- function S(e) {
114
- if (b(e)) return typeof e.block_id == "string" ? e.block_id : void 0;
415
+ function xe(e) {
416
+ if (w(e)) return typeof e.block_id == "string" ? e.block_id : void 0;
115
417
  }
116
- function C(e, t) {
117
- if (!b(e)) return `Unsupported ${t}`;
418
+ function E(e, t) {
419
+ if (!w(e)) return `Unsupported ${t}`;
118
420
  for (let t of [
119
421
  "text",
120
422
  "label",
@@ -125,17 +427,17 @@ function C(e, t) {
125
427
  let n = e[t];
126
428
  if (typeof n == "string" && n.length > 0) return n;
127
429
  }
128
- let n = x(e);
430
+ let n = T(e);
129
431
  return n === void 0 ? `Unsupported ${t}` : `Unsupported ${t}: ${n}`;
130
432
  }
131
433
  //#endregion
132
434
  //#region src/safe-url.ts
133
- function w(e) {
435
+ function D(e) {
134
436
  return e !== void 0 && /^(?:https?:|mailto:)/i.test(e) ? e : void 0;
135
437
  }
136
438
  //#endregion
137
439
  //#region src/tokens.stylex.ts
138
- var te = {
440
+ var Se = {
139
441
  surface: "var(--xf210bc)",
140
442
  surfaceRaised: "var(--xop8b6t)",
141
443
  surfaceSunken: "var(--xajfn77)",
@@ -206,13 +508,13 @@ var te = {
206
508
  chartSeriesTint5: "var(--x1nud87m)",
207
509
  chartSeriesTint6: "var(--x1t1bkho)",
208
510
  __varGroupHash__: "xpd22m1"
209
- }, ne = {
511
+ }, Ce = {
210
512
  xpd22m1: "x1l73jb5 xpd22m1",
211
513
  $$css: !0
212
- }, re = {
514
+ }, we = {
213
515
  xpd22m1: "xky7mqn xpd22m1",
214
516
  $$css: !0
215
- }, T = {
517
+ }, O = {
216
518
  root: {
217
519
  kWkggS: "xfs8zev",
218
520
  kMwMTN: "xr3bju4",
@@ -489,6 +791,15 @@ var te = {
489
791
  kVIFPx: "x19kjcj4",
490
792
  $$css: !0
491
793
  },
794
+ imagePlaceholder: {
795
+ kGNEyG: "x6s0dn4",
796
+ kWkggS: "x1fatxfb",
797
+ kMwMTN: "xlx0kvv",
798
+ k1xSpc: "x78zum5",
799
+ kjj79g: "xl56j7k",
800
+ kAzted: "x1wxaq2x",
801
+ $$css: !0
802
+ },
492
803
  accessoryImage: {
493
804
  kaIpWk: "xsqv9me",
494
805
  kZKoxP: "x14nwjz3",
@@ -602,15 +913,20 @@ var te = {
602
913
  },
603
914
  pickerIcon: {
604
915
  kMwMTN: "xvuv4jf",
605
- kGuDYH: "xfifm61",
606
- kLqNvP: "xuhg197",
916
+ k1xSpc: "x78zum5",
917
+ k87sOh: "xwa60dl",
918
+ kLqNvP: "xrr41r3",
607
919
  kVAEAm: "x10l6tqk",
920
+ k3aq6I: "x1cb1t30",
608
921
  $$css: !0
609
922
  },
610
923
  pickerChevron: {
611
924
  kMwMTN: "xvuv4jf",
612
- kt4wiu: "x1vikou4",
925
+ k1xSpc: "x78zum5",
926
+ k87sOh: "xwa60dl",
927
+ kt4wiu: "x1jot08o",
613
928
  kVAEAm: "x10l6tqk",
929
+ k3aq6I: "x1cb1t30",
614
930
  $$css: !0
615
931
  },
616
932
  iconButton: {
@@ -619,6 +935,12 @@ var te = {
619
935
  kg3NbH: "x17hd1w2",
620
936
  $$css: !0
621
937
  },
938
+ iconSlot: {
939
+ kGNEyG: "x6s0dn4",
940
+ k1xSpc: "x78zum5",
941
+ kmuXW: "x2lah0s",
942
+ $$css: !0
943
+ },
622
944
  select: {
623
945
  kysU6D: "xjyslct",
624
946
  kWkggS: "x1itzlyb",
@@ -635,6 +957,27 @@ var te = {
635
957
  kg3NbH: "x1r82r8e",
636
958
  $$css: !0
637
959
  },
960
+ selectWrap: {
961
+ k1xSpc: "x3nfvp2",
962
+ ks0D6T: "x193iq5w",
963
+ kVAEAm: "x1n2onr6",
964
+ $$css: !0
965
+ },
966
+ selectWithChevron: {
967
+ kwRFfy: "xziim83",
968
+ kzqmXN: "xh8yej3",
969
+ $$css: !0
970
+ },
971
+ selectChevron: {
972
+ kMwMTN: "xr3bju4",
973
+ k1xSpc: "x78zum5",
974
+ k87sOh: "xwa60dl",
975
+ kt4wiu: "x1vikou4",
976
+ kfzvcC: "x47corl",
977
+ kVAEAm: "x10l6tqk",
978
+ k3aq6I: "x1cb1t30",
979
+ $$css: !0
980
+ },
638
981
  choiceGroup: {
639
982
  ksu8eU: "xng3xce",
640
983
  k1xSpc: "x78zum5",
@@ -802,6 +1145,10 @@ var te = {
802
1145
  k5xd4v: "x1bhewko",
803
1146
  $$css: !0
804
1147
  },
1148
+ alertIcon: {
1149
+ kZKoxP: "xcdktbt",
1150
+ $$css: !0
1151
+ },
805
1152
  alert: {
806
1153
  kGNEyG: "x1cy8zhl",
807
1154
  kWkggS: "x1fatxfb",
@@ -852,6 +1199,13 @@ var te = {
852
1199
  kg3NbH: "xzgshkr",
853
1200
  $$css: !0
854
1201
  },
1202
+ containerChevron: {
1203
+ kGNEyG: "x6s0dn4",
1204
+ kMwMTN: "xlx0kvv",
1205
+ k1xSpc: "x78zum5",
1206
+ kmuXW: "x2lah0s",
1207
+ $$css: !0
1208
+ },
855
1209
  containerHeaderDivider: {
856
1210
  kL6WhQ: "x17fznl5",
857
1211
  kfdmCh: "x1q0q8m5",
@@ -1092,6 +1446,11 @@ var te = {
1092
1446
  kzqmXN: "x35muul",
1093
1447
  $$css: !0
1094
1448
  },
1449
+ dataTableFilterIcon: {
1450
+ kMwMTN: "xr3bju4",
1451
+ kZCmMZ: "xty9v0q",
1452
+ $$css: !0
1453
+ },
1095
1454
  dataTableFilterInput: {
1096
1455
  kWkggS: "xjbqb8w",
1097
1456
  ksu8eU: "xng3xce",
@@ -1253,6 +1612,27 @@ var te = {
1253
1612
  kg3NbH: "x1r82r8e",
1254
1613
  $$css: !0
1255
1614
  },
1615
+ videoThumbnail: {
1616
+ k1xSpc: "x1lliihq",
1617
+ kVAEAm: "x1n2onr6",
1618
+ $$css: !0
1619
+ },
1620
+ videoPlayBadge: {
1621
+ kGNEyG: "x6s0dn4",
1622
+ kWkggS: "x1frzhxr",
1623
+ kaIpWk: "x10hpsqq",
1624
+ kMwMTN: "x1f7m26b",
1625
+ k1xSpc: "x78zum5",
1626
+ kZKoxP: "xsdox4t",
1627
+ k87sOh: "xwa60dl",
1628
+ kLqNvP: "xbudbmw",
1629
+ kjj79g: "xl56j7k",
1630
+ kfzvcC: "x47corl",
1631
+ kVAEAm: "x10l6tqk",
1632
+ k3aq6I: "x11lhmoz",
1633
+ kzqmXN: "x1useyqa",
1634
+ $$css: !0
1635
+ },
1256
1636
  visuallyHidden: {
1257
1637
  kMcinP: "xeh89do",
1258
1638
  kz4h6p: "x1hyvwdk",
@@ -1263,7 +1643,7 @@ var te = {
1263
1643
  kzqmXN: "x1i1rx1s",
1264
1644
  $$css: !0
1265
1645
  }
1266
- }, E = {
1646
+ }, k = {
1267
1647
  fill1: {
1268
1648
  kDwRjp: "xtzl89e",
1269
1649
  $$css: !0
@@ -1432,86 +1812,86 @@ var te = {
1432
1812
  kDwRjp: "x1mnwzol",
1433
1813
  $$css: !0
1434
1814
  }
1435
- }, ie = {
1436
- fill: E.fill1,
1437
- stroke: E.stroke1,
1438
- swatch: E.swatch1,
1439
- tint: E.tint1
1440
- }, ae = [
1441
- ie,
1815
+ }, Te = {
1816
+ fill: k.fill1,
1817
+ stroke: k.stroke1,
1818
+ swatch: k.swatch1,
1819
+ tint: k.tint1
1820
+ }, Ee = [
1821
+ Te,
1442
1822
  {
1443
- fill: E.fill2,
1444
- stroke: E.stroke2,
1445
- swatch: E.swatch2,
1446
- tint: E.tint2
1823
+ fill: k.fill2,
1824
+ stroke: k.stroke2,
1825
+ swatch: k.swatch2,
1826
+ tint: k.tint2
1447
1827
  },
1448
1828
  {
1449
- fill: E.fill3,
1450
- stroke: E.stroke3,
1451
- swatch: E.swatch3,
1452
- tint: E.tint3
1829
+ fill: k.fill3,
1830
+ stroke: k.stroke3,
1831
+ swatch: k.swatch3,
1832
+ tint: k.tint3
1453
1833
  },
1454
1834
  {
1455
- fill: E.fill4,
1456
- stroke: E.stroke4,
1457
- swatch: E.swatch4,
1458
- tint: E.tint4
1835
+ fill: k.fill4,
1836
+ stroke: k.stroke4,
1837
+ swatch: k.swatch4,
1838
+ tint: k.tint4
1459
1839
  },
1460
1840
  {
1461
- fill: E.fill5,
1462
- stroke: E.stroke5,
1463
- swatch: E.swatch5,
1464
- tint: E.tint5
1841
+ fill: k.fill5,
1842
+ stroke: k.stroke5,
1843
+ swatch: k.swatch5,
1844
+ tint: k.tint5
1465
1845
  },
1466
1846
  {
1467
- fill: E.fill6,
1468
- stroke: E.stroke6,
1469
- swatch: E.swatch6,
1470
- tint: E.tint6
1847
+ fill: k.fill6,
1848
+ stroke: k.stroke6,
1849
+ swatch: k.swatch6,
1850
+ tint: k.tint6
1471
1851
  },
1472
1852
  {
1473
- fill: E.fill7,
1474
- stroke: E.stroke7,
1475
- swatch: E.swatch7,
1476
- tint: E.fill7
1853
+ fill: k.fill7,
1854
+ stroke: k.stroke7,
1855
+ swatch: k.swatch7,
1856
+ tint: k.fill7
1477
1857
  },
1478
1858
  {
1479
- fill: E.fill8,
1480
- stroke: E.stroke8,
1481
- swatch: E.swatch8,
1482
- tint: E.fill8
1859
+ fill: k.fill8,
1860
+ stroke: k.stroke8,
1861
+ swatch: k.swatch8,
1862
+ tint: k.fill8
1483
1863
  },
1484
1864
  {
1485
- fill: E.fill9,
1486
- stroke: E.stroke9,
1487
- swatch: E.swatch9,
1488
- tint: E.fill9
1865
+ fill: k.fill9,
1866
+ stroke: k.stroke9,
1867
+ swatch: k.swatch9,
1868
+ tint: k.fill9
1489
1869
  },
1490
1870
  {
1491
- fill: E.fill10,
1492
- stroke: E.stroke10,
1493
- swatch: E.swatch10,
1494
- tint: E.fill10
1871
+ fill: k.fill10,
1872
+ stroke: k.stroke10,
1873
+ swatch: k.swatch10,
1874
+ tint: k.fill10
1495
1875
  },
1496
1876
  {
1497
- fill: E.fill11,
1498
- stroke: E.stroke11,
1499
- swatch: E.swatch11,
1500
- tint: E.fill11
1877
+ fill: k.fill11,
1878
+ stroke: k.stroke11,
1879
+ swatch: k.swatch11,
1880
+ tint: k.fill11
1501
1881
  },
1502
1882
  {
1503
- fill: E.fill12,
1504
- stroke: E.stroke12,
1505
- swatch: E.swatch12,
1506
- tint: E.fill12
1883
+ fill: k.fill12,
1884
+ stroke: k.stroke12,
1885
+ swatch: k.swatch12,
1886
+ tint: k.fill12
1507
1887
  }
1508
1888
  ];
1509
- function D(e, t) {
1889
+ function A(e, t) {
1510
1890
  return e === void 0 ? t : t === void 0 || t.length === 0 ? e : `${e} ${t}`;
1511
1891
  }
1512
1892
  //#endregion
1513
1893
  //#region src/text/date.ts
1514
- var oe = /\{([a-z_]+)\}/g, se = [
1894
+ var De = /\{([a-z_]+)\}/g, Oe = [
1515
1895
  "January",
1516
1896
  "February",
1517
1897
  "March",
@@ -1524,7 +1904,7 @@ var oe = /\{([a-z_]+)\}/g, se = [
1524
1904
  "October",
1525
1905
  "November",
1526
1906
  "December"
1527
- ], ce = [
1907
+ ], ke = [
1528
1908
  "Jan",
1529
1909
  "Feb",
1530
1910
  "Mar",
@@ -1537,7 +1917,7 @@ var oe = /\{([a-z_]+)\}/g, se = [
1537
1917
  "Oct",
1538
1918
  "Nov",
1539
1919
  "Dec"
1540
- ], le = [
1920
+ ], Ae = [
1541
1921
  "Sunday",
1542
1922
  "Monday",
1543
1923
  "Tuesday",
@@ -1546,10 +1926,10 @@ var oe = /\{([a-z_]+)\}/g, se = [
1546
1926
  "Friday",
1547
1927
  "Saturday"
1548
1928
  ];
1549
- function O(e) {
1929
+ function j(e) {
1550
1930
  return String(e).padStart(2, "0");
1551
1931
  }
1552
- function ue(e) {
1932
+ function je(e) {
1553
1933
  let t = e % 100;
1554
1934
  if (t >= 11 && t <= 13) return `${String(e)}th`;
1555
1935
  switch (e % 10) {
@@ -1559,36 +1939,36 @@ function ue(e) {
1559
1939
  default: return `${String(e)}th`;
1560
1940
  }
1561
1941
  }
1562
- function de(e, t) {
1563
- let n = t.getUTCDate(), r = se[t.getUTCMonth()] ?? "", i = ce[t.getUTCMonth()] ?? "", a = le[t.getUTCDay()] ?? "", o = t.getUTCFullYear();
1942
+ function Me(e, t) {
1943
+ let n = t.getUTCDate(), r = Oe[t.getUTCMonth()] ?? "", i = ke[t.getUTCMonth()] ?? "", a = Ae[t.getUTCDay()] ?? "", o = t.getUTCFullYear();
1564
1944
  switch (e) {
1565
- case "date_num": return `${String(o)}-${O(t.getUTCMonth() + 1)}-${O(n)}`;
1566
- case "date_slash": return `${O(n)}/${O(t.getUTCMonth() + 1)}/${String(o)}`;
1945
+ case "date_num": return `${String(o)}-${j(t.getUTCMonth() + 1)}-${j(n)}`;
1946
+ case "date_slash": return `${j(t.getUTCMonth() + 1)}/${j(n)}/${String(o)}`;
1567
1947
  case "date_long":
1568
1948
  case "date_long_pretty":
1569
- case "day_divider_pretty": return `${a}, ${r} ${ue(n)}, ${String(o)}`;
1949
+ case "day_divider_pretty": return `${a}, ${r} ${je(n)}, ${String(o)}`;
1570
1950
  case "date_long_full": return `${r} ${String(n)}, ${String(o)}`;
1571
1951
  case "date":
1572
- case "date_pretty": return `${r} ${String(n)}`;
1952
+ case "date_pretty": return `${r} ${je(n)}, ${String(o)}`;
1573
1953
  case "date_short":
1574
1954
  case "date_short_pretty": return `${i} ${String(n)}, ${String(o)}`;
1575
- case "time": return `${O(t.getUTCHours())}:${O(t.getUTCMinutes())}`;
1576
- case "time_secs": return `${O(t.getUTCHours())}:${O(t.getUTCMinutes())}:${O(t.getUTCSeconds())}`;
1955
+ case "time": return `${j(t.getUTCHours())}:${j(t.getUTCMinutes())}`;
1956
+ case "time_secs": return `${j(t.getUTCHours())}:${j(t.getUTCMinutes())}:${j(t.getUTCSeconds())}`;
1577
1957
  default: return;
1578
1958
  }
1579
1959
  }
1580
- function fe(e, t, n) {
1960
+ function Ne(e, t, n) {
1581
1961
  let r = /* @__PURE__ */ new Date(e * 1e3);
1582
1962
  if (!Number.isFinite(e) || Number.isNaN(r.getTime())) return n ?? String(e);
1583
- let i = !1, a = t.replace(oe, (e, t) => {
1584
- let n = de(t, r);
1963
+ let i = !1, a = t.replace(De, (e, t) => {
1964
+ let n = Me(t, r);
1585
1965
  return n === void 0 ? (i = !0, "") : n;
1586
1966
  });
1587
1967
  return t.length === 0 || i ? n ?? r.toISOString().slice(0, 10) : a;
1588
1968
  }
1589
1969
  //#endregion
1590
1970
  //#region src/text/emoji.ts
1591
- var pe = {
1971
+ var Pe = {
1592
1972
  "+1": "👍",
1593
1973
  "-1": "👎",
1594
1974
  100: "💯",
@@ -1625,12 +2005,12 @@ var pe = {
1625
2005
  wink: "😉",
1626
2006
  x: "❌",
1627
2007
  zap: "⚡"
1628
- }, me = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
1629
- function he(e) {
1630
- return pe[e];
2008
+ }, Fe = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
2009
+ function Ie(e) {
2010
+ return Pe[e];
1631
2011
  }
1632
- function ge(e) {
1633
- if (e === void 0 || !me.test(e)) return;
2012
+ function Le(e) {
2013
+ if (e === void 0 || !Fe.test(e)) return;
1634
2014
  let t = e.split("-").map((e) => Number.parseInt(e, 16));
1635
2015
  if (!t.some((e) => !Number.isFinite(e))) try {
1636
2016
  return String.fromCodePoint(...t);
@@ -1640,7 +2020,7 @@ function ge(e) {
1640
2020
  }
1641
2021
  //#endregion
1642
2022
  //#region src/text/RichText.tsx
1643
- var _e = {
2023
+ var Re = {
1644
2024
  attachment_mention: !0,
1645
2025
  broadcast: !0,
1646
2026
  canvas: !0,
@@ -1663,13 +2043,13 @@ var _e = {
1663
2043
  usergroup: !0,
1664
2044
  work_object_mention: !0,
1665
2045
  workflow_mention: !0
1666
- }, ve = {
2046
+ }, ze = {
1667
2047
  rich_text_list: !0,
1668
2048
  rich_text_preformatted: !0,
1669
2049
  rich_text_quote: !0,
1670
2050
  rich_text_section: !0
1671
2051
  };
1672
- function ye(e) {
2052
+ function Be(e) {
1673
2053
  switch (e.type) {
1674
2054
  case "broadcast":
1675
2055
  case "channel":
@@ -1694,11 +2074,11 @@ function ye(e) {
1694
2074
  case "work_object_mention":
1695
2075
  case "workflow_mention": return;
1696
2076
  }
1697
- return g(e);
2077
+ return _(e);
1698
2078
  }
1699
- function be(e) {
1700
- let t = x(e);
1701
- if (t === void 0 || !(t in _e) || !b(e)) return !1;
2079
+ function Ve(e) {
2080
+ let t = T(e);
2081
+ if (t === void 0 || !(t in Re) || !w(e)) return !1;
1702
2082
  switch (t) {
1703
2083
  case "text": return typeof e.text == "string";
1704
2084
  case "link": return typeof e.url == "string";
@@ -1713,92 +2093,92 @@ function be(e) {
1713
2093
  default: return !0;
1714
2094
  }
1715
2095
  }
1716
- function xe(e) {
1717
- let t = x(e);
1718
- return t === void 0 || !(t in ve) || !b(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => b(e) && e.type === "rich_text_section" && Array.isArray(e.elements));
2096
+ function He(e) {
2097
+ let t = T(e);
2098
+ return t === void 0 || !(t in ze) || !w(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => w(e) && e.type === "rich_text_section" && Array.isArray(e.elements));
1719
2099
  }
1720
- function k(e, t) {
2100
+ function M(e, t) {
1721
2101
  let n = e;
1722
- return t?.bold === !0 && (n = /* @__PURE__ */ l("strong", {
1723
- ...h(T.bold),
2102
+ return t?.bold === !0 && (n = /* @__PURE__ */ u("strong", {
2103
+ ...g(O.bold),
1724
2104
  children: n
1725
- })), t?.italic === !0 && (n = /* @__PURE__ */ l("em", {
1726
- ...h(T.italic),
2105
+ })), t?.italic === !0 && (n = /* @__PURE__ */ u("em", {
2106
+ ...g(O.italic),
1727
2107
  children: n
1728
- })), t?.strike === !0 && (n = /* @__PURE__ */ l("s", {
1729
- ...h(T.strike),
2108
+ })), t?.strike === !0 && (n = /* @__PURE__ */ u("s", {
2109
+ ...g(O.strike),
1730
2110
  children: n
1731
- })), t?.underline === !0 && (n = /* @__PURE__ */ l("span", {
1732
- ...h(T.underline),
2111
+ })), t?.underline === !0 && (n = /* @__PURE__ */ u("span", {
2112
+ ...g(O.underline),
1733
2113
  children: n
1734
- })), t?.code === !0 && (n = /* @__PURE__ */ l("code", {
1735
- ...h(T.inlineCode),
2114
+ })), t?.code === !0 && (n = /* @__PURE__ */ u("code", {
2115
+ ...g(O.inlineCode),
1736
2116
  children: n
1737
2117
  })), n;
1738
2118
  }
1739
- function Se(e) {
2119
+ function Ue(e) {
1740
2120
  return e.text ?? e.id ?? e.user_id ?? e.channel_id ?? e.team_id ?? e.file_id ?? e.canvas_id ?? e.record_id ?? e.message_ts ?? e.workflow_id ?? e.type;
1741
2121
  }
1742
- function Ce({ element: e }) {
1743
- let { resolvers: t } = y();
1744
- if (!be(e)) return /* @__PURE__ */ l("span", {
1745
- ...h(T.reference),
1746
- "data-unhandled-rich-text-element": x(e) ?? "unknown",
1747
- children: C(e, "rich text element")
2122
+ function We({ element: e }) {
2123
+ let { resolvers: t } = x();
2124
+ if (!Ve(e)) return /* @__PURE__ */ u("span", {
2125
+ ...g(O.reference),
2126
+ "data-unhandled-rich-text-element": T(e) ?? "unknown",
2127
+ children: E(e, "rich text element")
1748
2128
  });
1749
- let n = ye(e);
2129
+ let n = Be(e);
1750
2130
  switch (e.type) {
1751
- case "text": return k(e.text, n);
2131
+ case "text": return M(e.text, n);
1752
2132
  case "link": {
1753
- let t = w(e.url), r = e.text ?? e.url;
1754
- return t === void 0 ? k(r, n) : /* @__PURE__ */ l("a", {
1755
- ...h(T.link),
2133
+ let t = D(e.url), r = e.text ?? e.url;
2134
+ return t === void 0 ? M(r, n) : /* @__PURE__ */ u("a", {
2135
+ ...g(O.link),
1756
2136
  href: t,
1757
2137
  rel: "noreferrer",
1758
- children: k(r, n)
2138
+ children: M(r, n)
1759
2139
  });
1760
2140
  }
1761
- case "emoji": return /* @__PURE__ */ l("span", {
2141
+ case "emoji": return /* @__PURE__ */ u("span", {
1762
2142
  "aria-label": `:${e.name}:`,
1763
2143
  role: "img",
1764
- children: k(t.emoji?.(e.name, e.unicode) ?? ge(e.unicode) ?? he(e.name) ?? `:${e.name}:`, n)
2144
+ children: M(t.emoji?.(e.name, e.unicode) ?? Le(e.unicode) ?? Ie(e.name) ?? `:${e.name}:`, n)
1765
2145
  });
1766
- case "user": return /* @__PURE__ */ l("span", {
1767
- ...h(T.mention),
1768
- children: k(/* @__PURE__ */ u(c, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
2146
+ case "user": return /* @__PURE__ */ u("span", {
2147
+ ...g(O.mention),
2148
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
1769
2149
  });
1770
- case "usergroup": return /* @__PURE__ */ l("span", {
1771
- ...h(T.mention),
1772
- children: k(/* @__PURE__ */ u(c, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
2150
+ case "usergroup": return /* @__PURE__ */ u("span", {
2151
+ ...g(O.mention),
2152
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
1773
2153
  });
1774
- case "channel": return /* @__PURE__ */ l("span", {
1775
- ...h(T.mention),
1776
- children: k(/* @__PURE__ */ u(c, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
2154
+ case "channel": return /* @__PURE__ */ u("span", {
2155
+ ...g(O.mention),
2156
+ children: M(/* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
1777
2157
  });
1778
- case "team": return /* @__PURE__ */ l("span", {
1779
- ...h(T.mention),
1780
- children: k(/* @__PURE__ */ u(c, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
2158
+ case "team": return /* @__PURE__ */ u("span", {
2159
+ ...g(O.mention),
2160
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
1781
2161
  });
1782
- case "broadcast": return /* @__PURE__ */ l("span", {
1783
- ...h(T.mention),
1784
- children: k(`@${e.range}`, n)
2162
+ case "broadcast": return /* @__PURE__ */ u("span", {
2163
+ ...g(O.mention),
2164
+ children: M(`@${e.range}`, n)
1785
2165
  });
1786
2166
  case "date": {
1787
- let r = t.date?.(e.timestamp, e.format) ?? fe(e.timestamp, e.format, e.fallback), i = w(e.url);
1788
- return i === void 0 ? k(r, n) : /* @__PURE__ */ l("a", {
1789
- ...h(T.link),
2167
+ let r = t.date?.(e.timestamp, e.format) ?? Ne(e.timestamp, e.format, e.fallback), i = D(e.url);
2168
+ return i === void 0 ? M(r, n) : /* @__PURE__ */ u("a", {
2169
+ ...g(O.link),
1790
2170
  href: i,
1791
2171
  rel: "noreferrer",
1792
- children: k(r, n)
2172
+ children: M(r, n)
1793
2173
  });
1794
2174
  }
1795
- case "color": return /* @__PURE__ */ u("span", { children: [/* @__PURE__ */ l("span", {
1796
- ...h(T.colorSwatch),
2175
+ case "color": return /* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u("span", {
2176
+ ...g(O.colorSwatch),
1797
2177
  "aria-hidden": "true",
1798
2178
  style: { backgroundColor: e.value }
1799
- }), k(e.value, n)] });
1800
- case "citation": return /* @__PURE__ */ u("span", {
1801
- ...h(T.reference),
2179
+ }), M(e.value, n)] });
2180
+ case "citation": return /* @__PURE__ */ d("span", {
2181
+ ...g(O.reference),
1802
2182
  children: [
1803
2183
  "[",
1804
2184
  e.index ?? e.text ?? "source",
@@ -1815,99 +2195,120 @@ function Ce({ element: e }) {
1815
2195
  case "salesforce_data_field":
1816
2196
  case "tag":
1817
2197
  case "work_object_mention":
1818
- case "workflow_mention": return /* @__PURE__ */ l("span", {
1819
- ...h(T.reference),
1820
- children: Se(e)
2198
+ case "workflow_mention": return /* @__PURE__ */ u("span", {
2199
+ ...g(O.reference),
2200
+ children: Ue(e)
1821
2201
  });
1822
2202
  }
1823
- return g(e);
1824
- }
1825
- function we(e, n) {
1826
- let r = x(e);
1827
- if ((r === "text" || r === "link") && b(e)) {
1828
- let t = e.text;
1829
- if (typeof t == "string") return t;
1830
- let n = e.url;
1831
- if (typeof n == "string") return n;
2203
+ return _(e);
2204
+ }
2205
+ function Ge({ element: e }) {
2206
+ let { resolvers: t } = x();
2207
+ if (Ve(e)) {
2208
+ switch (e.type) {
2209
+ case "text": return e.text;
2210
+ case "link": return e.text ?? e.url;
2211
+ case "user": return /* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] });
2212
+ case "usergroup": return /* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] });
2213
+ case "channel": return /* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] });
2214
+ case "team": return /* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] });
2215
+ case "broadcast": return `@${e.range}`;
2216
+ case "emoji": return `:${e.name}:`;
2217
+ case "date": return t.date?.(e.timestamp, e.format) ?? Ne(e.timestamp, e.format, e.fallback);
2218
+ case "color": return e.value;
2219
+ case "citation": return `[${e.index ?? e.text ?? "source"}]`;
2220
+ case "attachment_mention":
2221
+ case "canvas":
2222
+ case "canvas_message_unfurl":
2223
+ case "canvas_user_mention":
2224
+ case "file":
2225
+ case "list_record":
2226
+ case "message_mention":
2227
+ case "salesforce_data_field":
2228
+ case "tag":
2229
+ case "work_object_mention":
2230
+ case "workflow_mention": return Ue(e);
2231
+ }
2232
+ return _(e);
1832
2233
  }
1833
- return /* @__PURE__ */ t("span", {
1834
- ...h(T.reference),
1835
- "data-unhandled-rich-text-element": r ?? "unknown",
1836
- key: `${r ?? "unknown"}-${String(n)}`
1837
- }, C(e, "rich text element"));
2234
+ return /* @__PURE__ */ u("span", {
2235
+ ...g(O.reference),
2236
+ "data-unhandled-rich-text-element": T(e) ?? "unknown",
2237
+ children: E(e, "rich text element")
2238
+ });
1838
2239
  }
1839
- function Te(e) {
2240
+ function Ke(e) {
1840
2241
  let t = e % 3;
1841
- return t === 1 ? T.listOrderedAlpha : t === 2 ? T.listOrderedRoman : T.listOrdered;
2242
+ return t === 1 ? O.listOrderedAlpha : t === 2 ? O.listOrderedRoman : O.listOrdered;
1842
2243
  }
1843
- function Ee(e) {
2244
+ function qe(e) {
1844
2245
  let t = e % 3;
1845
- return t === 1 ? T.listBulletAlternate : t === 2 ? T.listBulletSquare : T.listBullet;
2246
+ return t === 1 ? O.listBulletAlternate : t === 2 ? O.listBulletSquare : O.listBullet;
1846
2247
  }
1847
- function De({ element: e, path: n }) {
1848
- if (!xe(e)) return /* @__PURE__ */ l("div", {
1849
- ...h(T.unhandled),
1850
- "data-unhandled-rich-text-container": x(e) ?? "unknown",
1851
- children: C(e, "rich text container")
2248
+ function Je({ element: e, path: n }) {
2249
+ if (!He(e)) return /* @__PURE__ */ u("div", {
2250
+ ...g(O.unhandled),
2251
+ "data-unhandled-rich-text-container": T(e) ?? "unknown",
2252
+ children: E(e, "rich text container")
1852
2253
  });
1853
2254
  switch (e.type) {
1854
- case "rich_text_section": return /* @__PURE__ */ l("div", {
1855
- ...h(T.richSection),
2255
+ case "rich_text_section": return /* @__PURE__ */ u("div", {
2256
+ ...g(O.richSection),
1856
2257
  "data-rich-text-section": !0,
1857
- children: e.elements.map((e, t) => /* @__PURE__ */ l(Ce, { element: e }, `${x(e) ?? "unknown"}-${String(t)}`))
2258
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1858
2259
  });
1859
- case "rich_text_quote": return /* @__PURE__ */ l("blockquote", {
1860
- ...h(T.quote, e.border === 1 && T.richBorder),
2260
+ case "rich_text_quote": return /* @__PURE__ */ u("blockquote", {
2261
+ ...g(O.quote, e.border === 1 && O.richBorder),
1861
2262
  "data-border": e.border ?? 0,
1862
- children: e.elements.map((e, t) => /* @__PURE__ */ l(Ce, { element: e }, `${x(e) ?? "unknown"}-${String(t)}`))
2263
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1863
2264
  });
1864
- case "rich_text_preformatted": return /* @__PURE__ */ l("pre", {
1865
- ...h(T.pre, e.border === 1 && T.richBorder),
2265
+ case "rich_text_preformatted": return /* @__PURE__ */ u("pre", {
2266
+ ...g(O.pre, e.border === 1 && O.richBorder),
1866
2267
  "data-border": e.border ?? 0,
1867
2268
  "data-language": e.language,
1868
- children: e.elements.map((e, t) => we(e, t))
2269
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(Ge, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1869
2270
  });
1870
2271
  case "rich_text_list": {
1871
- let r = Number.isFinite(e.indent) ? Math.trunc(e.indent ?? 0) : 0, i = Math.min(8, Math.max(0, r)), a = Number.isFinite(e.offset) ? Math.trunc(e.offset ?? 0) : 0, o = Math.max(1, a + 1), s = { marginInlineStart: i * 28 }, c = e.style === "ordered" ? T.listItemOrdered : [T.listItemBullet, Ee(i)], u = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
1872
- ...h(c),
2272
+ let r = Number.isFinite(e.indent) ? Math.trunc(e.indent ?? 0) : 0, i = Math.min(8, Math.max(0, r)), a = Number.isFinite(e.offset) ? Math.trunc(e.offset ?? 0) : 0, o = Math.max(1, a + 1), s = { marginInlineStart: i * 28 }, c = e.style === "ordered" ? O.listItemOrdered : [O.listItemBullet, qe(i)], l = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
2273
+ ...g(c),
1873
2274
  key: `${n}.elements[${String(r)}]`
1874
- }, e.elements.map((e, t) => /* @__PURE__ */ l(Ce, { element: e }, `${x(e) ?? "unknown"}-${String(t)}`))));
1875
- return e.style === "ordered" ? /* @__PURE__ */ l("ol", {
1876
- ...h(T.list, Te(i), e.border === 1 && T.richBorder),
2275
+ }, e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))));
2276
+ return e.style === "ordered" ? /* @__PURE__ */ u("ol", {
2277
+ ...g(O.list, Ke(i), e.border === 1 && O.richBorder),
1877
2278
  "data-border": e.border ?? 0,
1878
2279
  "data-indent": i,
1879
2280
  start: o,
1880
2281
  style: s,
1881
- children: u
1882
- }) : /* @__PURE__ */ l("ul", {
1883
- ...h(T.list, e.border === 1 && T.richBorder),
2282
+ children: l
2283
+ }) : /* @__PURE__ */ u("ul", {
2284
+ ...g(O.list, e.border === 1 && O.richBorder),
1884
2285
  "data-border": e.border ?? 0,
1885
2286
  "data-indent": i,
1886
2287
  style: s,
1887
- children: u
2288
+ children: l
1888
2289
  });
1889
2290
  }
1890
2291
  }
1891
- return g(e);
2292
+ return _(e);
1892
2293
  }
1893
- function A({ block: e, className: t, path: n = "block" }) {
1894
- let r = h(T.richText), i = e, a = b(i) ? i.elements : void 0;
1895
- return /* @__PURE__ */ l("div", {
2294
+ function N({ block: e, className: t, path: n = "block" }) {
2295
+ let r = g(O.richText), i = e, a = w(i) ? i.elements : void 0;
2296
+ return /* @__PURE__ */ u("div", {
1896
2297
  ...r,
1897
- className: D(r.className, t),
1898
- children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ l(De, {
2298
+ className: A(r.className, t),
2299
+ children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ u(Je, {
1899
2300
  element: e,
1900
2301
  path: `${n}.elements[${String(t)}]`
1901
- }, `${x(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ l("div", {
1902
- ...h(T.unhandled),
2302
+ }, `${T(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ u("div", {
2303
+ ...g(O.unhandled),
1903
2304
  "data-unhandled-rich-text-block": !0,
1904
- children: C(i, "rich text block")
2305
+ children: E(i, "rich text block")
1905
2306
  })
1906
2307
  });
1907
2308
  }
1908
2309
  //#endregion
1909
2310
  //#region src/elements/Elements.tsx
1910
- var Oe = {
2311
+ var Ye = {
1911
2312
  button: !0,
1912
2313
  channels_select: !0,
1913
2314
  checkboxes: !0,
@@ -1934,68 +2335,68 @@ var Oe = {
1934
2335
  users_select: !0,
1935
2336
  workflow_button: !0
1936
2337
  };
1937
- function ke(e) {
1938
- let t = x(e);
1939
- return t !== void 0 && t in Oe;
2338
+ function Xe(e) {
2339
+ let t = T(e);
2340
+ return t !== void 0 && t in Ye;
1940
2341
  }
1941
- function Ae(e) {
1942
- if (!b(e)) return;
2342
+ function Ze(e) {
2343
+ if (!w(e)) return;
1943
2344
  if ("image_url" in e) return typeof e.image_url == "string" ? e.image_url : void 0;
1944
2345
  let t = e.slack_file;
1945
- if (b(t) && typeof t.url == "string") return t.url;
2346
+ if (w(t) && typeof t.url == "string") return t.url;
1946
2347
  }
1947
- function je(e) {
1948
- return b(e) && typeof e.text == "string";
2348
+ function Qe(e) {
2349
+ return w(e) && typeof e.text == "string";
1949
2350
  }
1950
- function Me(e) {
2351
+ function $e(e) {
1951
2352
  return e === void 0 || typeof e == "string";
1952
2353
  }
1953
- function Ne(e) {
1954
- return b(e) && je(e.text) && Me(e.value) && (e.description === void 0 || je(e.description));
2354
+ function et(e) {
2355
+ return w(e) && Qe(e.text) && $e(e.value) && (e.description === void 0 || Qe(e.description));
1955
2356
  }
1956
- function j(e) {
1957
- return Array.isArray(e) && e.every(Ne);
2357
+ function tt(e) {
2358
+ return Array.isArray(e) && e.every(et);
1958
2359
  }
1959
- function Pe(e) {
2360
+ function nt(e) {
1960
2361
  return Array.isArray(e) && e.every((e) => typeof e == "string");
1961
2362
  }
1962
- function Fe(e) {
1963
- return b(e) && je(e.text);
2363
+ function rt(e) {
2364
+ return w(e) && Qe(e.text);
1964
2365
  }
1965
- function Ie(e) {
1966
- return !b(e) || !j(e.options) ? !1 : x(e) === "checkboxes" ? e.initial_options === void 0 || j(e.initial_options) : e.initial_option === void 0 || Ne(e.initial_option);
2366
+ function it(e) {
2367
+ return !w(e) || !tt(e.options) ? !1 : T(e) === "checkboxes" ? e.initial_options === void 0 || tt(e.initial_options) : e.initial_option === void 0 || et(e.initial_option);
1967
2368
  }
1968
- function Le(e) {
1969
- return e.placeholder === void 0 || je(e.placeholder);
2369
+ function at(e) {
2370
+ return e.placeholder === void 0 || Qe(e.placeholder);
1970
2371
  }
1971
- function Re(e) {
2372
+ function ot(e) {
1972
2373
  let t = e.option_groups;
1973
- return (e.options === void 0 || j(e.options)) && (t === void 0 || Array.isArray(t) && t.every((e) => b(e) && j(e.options)));
1974
- }
1975
- function ze(e) {
1976
- if (!b(e) || !Le(e)) return !1;
1977
- switch (x(e) ?? "") {
1978
- case "static_select": return Re(e) && (e.initial_option === void 0 || Ne(e.initial_option));
1979
- case "multi_static_select": return Re(e) && (e.initial_options === void 0 || j(e.initial_options));
1980
- case "external_select": return e.initial_option === void 0 || Ne(e.initial_option);
1981
- case "multi_external_select": return e.initial_options === void 0 || j(e.initial_options);
1982
- case "users_select": return Me(e.initial_user);
1983
- case "multi_users_select": return e.initial_users === void 0 || Pe(e.initial_users);
1984
- case "channels_select": return Me(e.initial_channel);
1985
- case "multi_channels_select": return e.initial_channels === void 0 || Pe(e.initial_channels);
1986
- case "conversations_select": return Me(e.initial_conversation);
1987
- case "multi_conversations_select": return e.initial_conversations === void 0 || Pe(e.initial_conversations);
2374
+ return (e.options === void 0 || tt(e.options)) && (t === void 0 || Array.isArray(t) && t.every((e) => w(e) && tt(e.options)));
2375
+ }
2376
+ function st(e) {
2377
+ if (!w(e) || !at(e)) return !1;
2378
+ switch (T(e) ?? "") {
2379
+ case "static_select": return ot(e) && (e.initial_option === void 0 || et(e.initial_option));
2380
+ case "multi_static_select": return ot(e) && (e.initial_options === void 0 || tt(e.initial_options));
2381
+ case "external_select": return e.initial_option === void 0 || et(e.initial_option);
2382
+ case "multi_external_select": return e.initial_options === void 0 || tt(e.initial_options);
2383
+ case "users_select": return $e(e.initial_user);
2384
+ case "multi_users_select": return e.initial_users === void 0 || nt(e.initial_users);
2385
+ case "channels_select": return $e(e.initial_channel);
2386
+ case "multi_channels_select": return e.initial_channels === void 0 || nt(e.initial_channels);
2387
+ case "conversations_select": return $e(e.initial_conversation);
2388
+ case "multi_conversations_select": return e.initial_conversations === void 0 || nt(e.initial_conversations);
1988
2389
  default: return !1;
1989
2390
  }
1990
2391
  }
1991
- function Be(e) {
1992
- if (!b(e)) return !1;
1993
- switch (x(e) ?? "") {
2392
+ function ct(e) {
2393
+ if (!w(e)) return !1;
2394
+ switch (T(e) ?? "") {
1994
2395
  case "plain_text_input":
1995
2396
  case "email_text_input":
1996
2397
  case "url_text_input":
1997
- case "number_input": return Le(e);
1998
- case "datepicker": return Me(e.initial_date);
2398
+ case "number_input": return at(e);
2399
+ case "datepicker": return $e(e.initial_date);
1999
2400
  case "file_input": return e.filetypes === void 0 || Array.isArray(e.filetypes);
2000
2401
  case "datetimepicker":
2001
2402
  case "timepicker":
@@ -2003,71 +2404,76 @@ function Be(e) {
2003
2404
  default: return !1;
2004
2405
  }
2005
2406
  }
2006
- function M({ className: e, element: t }) {
2007
- let n = h(T.unhandled);
2008
- return /* @__PURE__ */ l("span", {
2407
+ function P({ className: e, element: t }) {
2408
+ let n = g(O.unhandled);
2409
+ return /* @__PURE__ */ u("span", {
2009
2410
  ...n,
2010
- className: D(n.className, e),
2011
- "data-unhandled-element": x(t) ?? "unknown",
2012
- children: C(t, "Block Kit element")
2411
+ className: A(n.className, e),
2412
+ "data-unhandled-element": T(t) ?? "unknown",
2413
+ children: E(t, "Block Kit element")
2013
2414
  });
2014
2415
  }
2015
- function N({ className: e, element: t, variant: n }) {
2016
- let r = h(T.image, n === "accessory" && T.accessoryImage, n === "cardHero" && T.cardHero, n === "cardIcon" && T.cardIcon, n === "context" && T.contextImage), i = t, a = b(i) && typeof i.alt_text == "string" ? i.alt_text : C(i, "image"), o = Ae(t);
2017
- return o === void 0 ? /* @__PURE__ */ l("div", {
2018
- ...r,
2019
- "aria-label": a,
2020
- className: D(r.className, e),
2021
- role: "img"
2022
- }) : /* @__PURE__ */ l("img", {
2416
+ function F({ className: e, element: t, variant: n }) {
2417
+ let r = g(O.image, n === "accessory" && O.accessoryImage, n === "cardHero" && O.cardHero, n === "cardIcon" && O.cardIcon, n === "context" && O.contextImage), i = t, a = w(i) && typeof i.alt_text == "string" ? i.alt_text : E(i, "image"), o = Ze(t);
2418
+ if (o === void 0) {
2419
+ let t = g(O.image, O.imagePlaceholder, n === "accessory" && O.accessoryImage, n === "cardHero" && O.cardHero, n === "cardIcon" && O.cardIcon, n === "context" && O.contextImage);
2420
+ return /* @__PURE__ */ u("div", {
2421
+ ...t,
2422
+ "aria-label": a,
2423
+ className: A(t.className, e),
2424
+ role: "img",
2425
+ children: /* @__PURE__ */ u(le, { size: n === "context" ? 14 : 28 })
2426
+ });
2427
+ }
2428
+ return /* @__PURE__ */ u("img", {
2023
2429
  ...r,
2024
2430
  alt: a,
2025
- className: D(r.className, e),
2431
+ className: A(r.className, e),
2026
2432
  src: o
2027
2433
  });
2028
2434
  }
2029
- function Ve({ blockId: e, className: t, element: n }) {
2030
- let { onAction: r } = y();
2031
- if (!Fe(n)) return /* @__PURE__ */ l(M, {
2435
+ function lt({ blockId: e, className: t, element: n }) {
2436
+ let { onAction: r } = x();
2437
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2032
2438
  className: t,
2033
2439
  element: n
2034
2440
  });
2035
- let i = h(T.button, n.style === "primary" && T.buttonPrimary, n.style === "danger" && T.buttonDanger), a = () => {
2441
+ let i = g(O.button, n.style === "primary" && O.buttonPrimary, n.style === "danger" && O.buttonDanger), a = () => {
2036
2442
  n.action_id !== void 0 && r?.({
2037
2443
  actionId: n.action_id,
2038
2444
  type: n.type,
2039
2445
  ...e === void 0 ? {} : { blockId: e },
2040
2446
  ...n.value === void 0 ? {} : { value: n.value }
2041
2447
  });
2042
- }, o = w(n.url);
2043
- return o === void 0 ? /* @__PURE__ */ l("button", {
2448
+ }, o = D(n.url);
2449
+ return o === void 0 ? /* @__PURE__ */ u("button", {
2044
2450
  ...i,
2045
2451
  "aria-label": n.accessibility_label,
2046
- className: D(i.className, t),
2452
+ className: A(i.className, t),
2047
2453
  onClick: a,
2048
2454
  type: "button",
2049
2455
  children: n.text.text
2050
- }) : /* @__PURE__ */ l("a", {
2456
+ }) : /* @__PURE__ */ u("a", {
2051
2457
  ...i,
2052
2458
  "aria-label": n.accessibility_label,
2053
- className: D(i.className, t),
2459
+ className: A(i.className, t),
2054
2460
  href: o,
2055
2461
  onClick: a,
2056
2462
  rel: "noreferrer",
2057
2463
  children: n.text.text
2058
2464
  });
2059
2465
  }
2060
- function He({ blockId: e, className: t, element: n }) {
2061
- let { onAction: r } = y();
2062
- if (!b(n)) return /* @__PURE__ */ l(M, {
2466
+ function ut({ blockId: e, className: t, element: n }) {
2467
+ let { onAction: r } = x();
2468
+ if (!w(n)) return /* @__PURE__ */ u(P, {
2063
2469
  className: t,
2064
2470
  element: n
2065
2471
  });
2066
- let i = h(T.button, T.overflowButton);
2067
- return /* @__PURE__ */ l("button", {
2472
+ let i = g(O.button, O.overflowButton);
2473
+ return /* @__PURE__ */ u("button", {
2068
2474
  ...i,
2069
2475
  "aria-label": "More options",
2070
- className: D(i.className, t),
2476
+ className: A(i.className, t),
2071
2477
  onClick: () => {
2072
2478
  n.action_id !== void 0 && r?.({
2073
2479
  actionId: n.action_id,
@@ -2076,34 +2482,34 @@ function He({ blockId: e, className: t, element: n }) {
2076
2482
  });
2077
2483
  },
2078
2484
  type: "button",
2079
- children: "⋯"
2485
+ children: /* @__PURE__ */ u(oe, { size: 16 })
2080
2486
  });
2081
2487
  }
2082
- function Ue(e, t) {
2488
+ function dt(e, t) {
2083
2489
  return e.value ?? `${e.text.text}-${String(t)}`;
2084
2490
  }
2085
- function We(e, t) {
2491
+ function ft(e, t) {
2086
2492
  return t?.some((t) => t.value === e.value && t.text.text === e.text.text) ?? !1;
2087
2493
  }
2088
- function Ge({ blockId: e, className: n, element: r }) {
2089
- let { onAction: i } = y();
2090
- if (!Ie(r)) return /* @__PURE__ */ l(M, {
2494
+ function pt({ blockId: e, className: n, element: r }) {
2495
+ let { onAction: i } = x(), o = a();
2496
+ if (!it(r)) return /* @__PURE__ */ u(P, {
2091
2497
  className: n,
2092
2498
  element: r
2093
2499
  });
2094
- let a = h(T.choiceGroup), o = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2095
- return /* @__PURE__ */ l("fieldset", {
2096
- ...a,
2097
- className: D(a.className, n),
2500
+ let s = g(O.choiceGroup), c = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2501
+ return /* @__PURE__ */ u("fieldset", {
2502
+ ...s,
2503
+ className: A(s.className, n),
2098
2504
  "data-element-type": r.type,
2099
2505
  children: r.options.map((n, a) => {
2100
- let s = Ue(n, a);
2506
+ let s = dt(n, a);
2101
2507
  return /* @__PURE__ */ t("label", {
2102
- ...h(T.choice),
2508
+ ...g(O.choice),
2103
2509
  key: s
2104
- }, /* @__PURE__ */ l("input", {
2105
- defaultChecked: We(n, o),
2106
- name: r.action_id,
2510
+ }, /* @__PURE__ */ u("input", {
2511
+ defaultChecked: ft(n, c),
2512
+ name: o,
2107
2513
  onChange: (t) => {
2108
2514
  if (r.action_id !== void 0) {
2109
2515
  let n = r.type === "checkboxes" ? Array.from(t.currentTarget.closest("fieldset")?.querySelectorAll("input[type=\"checkbox\"]:checked") ?? [], (e) => e.value) : void 0;
@@ -2117,50 +2523,50 @@ function Ge({ blockId: e, className: n, element: r }) {
2117
2523
  },
2118
2524
  type: r.type === "checkboxes" ? "checkbox" : "radio",
2119
2525
  value: s
2120
- }), /* @__PURE__ */ u("span", { children: [n.text.text, n.description === void 0 ? null : /* @__PURE__ */ u("span", {
2121
- ...h(T.smallText),
2526
+ }), /* @__PURE__ */ d("span", { children: [n.text.text, n.description === void 0 ? null : /* @__PURE__ */ d("span", {
2527
+ ...g(O.smallText),
2122
2528
  children: [" ", n.description.text]
2123
2529
  })] }));
2124
2530
  })
2125
2531
  });
2126
2532
  }
2127
- function Ke(e) {
2533
+ function mt(e) {
2128
2534
  return e.options === void 0 ? e.option_groups?.flatMap((e) => e.options) ?? [] : e.options;
2129
2535
  }
2130
- function qe(e) {
2536
+ function ht(e) {
2131
2537
  return e.map((e, t) => ({
2132
2538
  label: e.text.text,
2133
- value: Ue(e, t)
2539
+ value: dt(e, t)
2134
2540
  }));
2135
2541
  }
2136
- function Je(e) {
2542
+ function gt(e) {
2137
2543
  return e.map((e) => ({
2138
2544
  label: e,
2139
2545
  value: e
2140
2546
  }));
2141
2547
  }
2142
- function Ye(e) {
2548
+ function _t(e) {
2143
2549
  switch (e.type) {
2144
2550
  case "static_select":
2145
- case "multi_static_select": return qe(Ke(e));
2146
- case "external_select": return e.initial_option === void 0 ? [] : qe([e.initial_option]);
2147
- case "multi_external_select": return qe(e.initial_options ?? []);
2148
- case "users_select": return Je(e.initial_user === void 0 ? [] : [e.initial_user]);
2149
- case "multi_users_select": return Je(e.initial_users ?? []);
2150
- case "channels_select": return Je(e.initial_channel === void 0 ? [] : [e.initial_channel]);
2151
- case "multi_channels_select": return Je(e.initial_channels ?? []);
2152
- case "conversations_select": return Je(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
2153
- case "multi_conversations_select": return Je(e.initial_conversations ?? []);
2551
+ case "multi_static_select": return ht(mt(e));
2552
+ case "external_select": return e.initial_option === void 0 ? [] : ht([e.initial_option]);
2553
+ case "multi_external_select": return ht(e.initial_options ?? []);
2554
+ case "users_select": return gt(e.initial_user === void 0 ? [] : [e.initial_user]);
2555
+ case "multi_users_select": return gt(e.initial_users ?? []);
2556
+ case "channels_select": return gt(e.initial_channel === void 0 ? [] : [e.initial_channel]);
2557
+ case "multi_channels_select": return gt(e.initial_channels ?? []);
2558
+ case "conversations_select": return gt(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
2559
+ case "multi_conversations_select": return gt(e.initial_conversations ?? []);
2154
2560
  }
2155
- return g(e);
2561
+ return _(e);
2156
2562
  }
2157
- function Xe(e, t) {
2158
- return e.flatMap((e, n) => We(e, t) ? [Ue(e, n)] : []);
2563
+ function vt(e, t) {
2564
+ return e.flatMap((e, n) => ft(e, t) ? [dt(e, n)] : []);
2159
2565
  }
2160
- function Ze(e, t) {
2566
+ function yt(e, t) {
2161
2567
  switch (e.type) {
2162
- case "static_select": return Xe(Ke(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
2163
- case "multi_static_select": return Xe(Ke(e), e.initial_options);
2568
+ case "static_select": return vt(mt(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
2569
+ case "multi_static_select": return vt(mt(e), e.initial_options);
2164
2570
  case "external_select":
2165
2571
  case "multi_external_select":
2166
2572
  case "users_select":
@@ -2170,9 +2576,9 @@ function Ze(e, t) {
2170
2576
  case "conversations_select":
2171
2577
  case "multi_conversations_select": return t.map((e) => e.value);
2172
2578
  }
2173
- return g(e);
2579
+ return _(e);
2174
2580
  }
2175
- function Qe(e) {
2581
+ function bt(e) {
2176
2582
  if ("placeholder" in e && e.placeholder !== void 0) return e.placeholder.text;
2177
2583
  switch (e.type) {
2178
2584
  case "users_select":
@@ -2186,15 +2592,15 @@ function Qe(e) {
2186
2592
  case "multi_static_select":
2187
2593
  case "static_select": return "Select an option";
2188
2594
  }
2189
- return g(e);
2595
+ return _(e);
2190
2596
  }
2191
- function $e({ blockId: e, className: t, element: n }) {
2192
- let { onAction: r } = y();
2193
- if (!ze(n)) return /* @__PURE__ */ l(M, {
2597
+ function xt({ blockId: e, className: t, element: n }) {
2598
+ let { onAction: r } = x();
2599
+ if (!st(n)) return /* @__PURE__ */ u(P, {
2194
2600
  className: t,
2195
2601
  element: n
2196
2602
  });
2197
- let i = h(T.select), a = n.type.startsWith("multi_"), o = Ye(n), s = Ze(n, o), c = (t) => {
2603
+ let i = g(O.select), a = n.type.startsWith("multi_"), o = _t(n), s = yt(n, o), c = (t) => {
2198
2604
  if (n.action_id !== void 0) {
2199
2605
  let i = Array.from(t.currentTarget.selectedOptions, (e) => e.value);
2200
2606
  r?.({
@@ -2204,51 +2610,67 @@ function $e({ blockId: e, className: t, element: n }) {
2204
2610
  ...a ? { values: i } : { value: t.currentTarget.value }
2205
2611
  });
2206
2612
  }
2207
- };
2208
- return /* @__PURE__ */ u("select", {
2613
+ }, f = /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("option", {
2614
+ disabled: !0,
2615
+ value: "",
2616
+ children: bt(n)
2617
+ }), o.length === 0 ? /* @__PURE__ */ u("option", {
2618
+ value: "preview",
2619
+ children: "Preview option"
2620
+ }) : o.map((e) => /* @__PURE__ */ u("option", {
2621
+ value: e.value,
2622
+ children: e.label
2623
+ }, e.value))] });
2624
+ if (a) return /* @__PURE__ */ u("select", {
2209
2625
  ...i,
2210
- "aria-label": Qe(n),
2211
- className: D(i.className, t),
2212
- defaultValue: a ? s : s[0] ?? "",
2213
- multiple: a,
2626
+ "aria-label": bt(n),
2627
+ className: A(i.className, t),
2628
+ defaultValue: s,
2629
+ multiple: !0,
2214
2630
  onChange: c,
2215
- children: [/* @__PURE__ */ l("option", {
2216
- disabled: !0,
2217
- value: "",
2218
- children: Qe(n)
2219
- }), o.length === 0 ? /* @__PURE__ */ l("option", {
2220
- value: "preview",
2221
- children: "Preview option"
2222
- }) : o.map((e) => /* @__PURE__ */ l("option", {
2223
- value: e.value,
2224
- children: e.label
2225
- }, e.value))]
2631
+ children: f
2632
+ });
2633
+ let p = g(O.selectWrap);
2634
+ return /* @__PURE__ */ d("span", {
2635
+ ...p,
2636
+ className: A(p.className, t),
2637
+ children: [/* @__PURE__ */ u("select", {
2638
+ ...g(O.select, O.selectWithChevron),
2639
+ "aria-label": bt(n),
2640
+ defaultValue: s[0] ?? "",
2641
+ onChange: c,
2642
+ children: f
2643
+ }), /* @__PURE__ */ u("span", {
2644
+ ...g(O.selectChevron),
2645
+ "aria-hidden": "true",
2646
+ children: /* @__PURE__ */ u(ee, { size: 16 })
2647
+ })]
2226
2648
  });
2227
2649
  }
2228
- function et(e) {
2650
+ function St(e) {
2229
2651
  return String(e).padStart(2, "0");
2230
2652
  }
2231
- function tt(e) {
2232
- return `${String(e.getFullYear())}-${et(e.getMonth() + 1)}-${et(e.getDate())}`;
2653
+ function Ct(e) {
2654
+ return `${String(e.getFullYear())}-${St(e.getMonth() + 1)}-${St(e.getDate())}`;
2233
2655
  }
2234
- function nt(e) {
2656
+ function wt(e) {
2235
2657
  if (e === void 0) return "Select a date";
2236
- if (e === tt(/* @__PURE__ */ new Date())) return "Today";
2658
+ if (e === Ct(/* @__PURE__ */ new Date())) return "Today";
2237
2659
  let [t = "", n = "", r = ""] = e.split("-");
2238
2660
  return `${n}/${r}/${t}`;
2239
2661
  }
2240
- function rt(e) {
2662
+ function Tt(e) {
2241
2663
  if (e === void 0) return;
2242
2664
  let t = /* @__PURE__ */ new Date(e * 1e3);
2243
- if (!Number.isNaN(t.getTime())) return `${String(t.getFullYear())}-${et(t.getMonth() + 1)}-${et(t.getDate())}T${et(t.getHours())}:${et(t.getMinutes())}`;
2665
+ if (!Number.isNaN(t.getTime())) return `${String(t.getFullYear())}-${St(t.getMonth() + 1)}-${St(t.getDate())}T${St(t.getHours())}:${St(t.getMinutes())}`;
2244
2666
  }
2245
- function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2246
- let { onAction: i } = y();
2247
- if (!Be(n)) return /* @__PURE__ */ l(M, {
2667
+ function Et({ blockId: e, className: t, element: n, path: r = "element" }) {
2668
+ let { onAction: i } = x();
2669
+ if (!ct(n)) return /* @__PURE__ */ u(P, {
2248
2670
  className: t,
2249
2671
  element: n
2250
2672
  });
2251
- let a = h(T.input), o = (t) => {
2673
+ let a = g(O.input), o = (t) => {
2252
2674
  n.action_id !== void 0 && i?.({
2253
2675
  actionId: n.action_id,
2254
2676
  type: n.type,
@@ -2259,18 +2681,18 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2259
2681
  o(e.currentTarget.value);
2260
2682
  };
2261
2683
  switch (n.type) {
2262
- case "plain_text_input": return n.multiline === !0 ? /* @__PURE__ */ l("textarea", {
2684
+ case "plain_text_input": return n.multiline === !0 ? /* @__PURE__ */ u("textarea", {
2263
2685
  ...a,
2264
- className: D(a.className, t),
2686
+ className: A(a.className, t),
2265
2687
  defaultValue: n.initial_value,
2266
2688
  maxLength: n.max_length,
2267
2689
  minLength: n.min_length,
2268
2690
  onChange: s,
2269
2691
  placeholder: n.placeholder?.text,
2270
2692
  rows: 4
2271
- }) : /* @__PURE__ */ l("input", {
2693
+ }) : /* @__PURE__ */ u("input", {
2272
2694
  ...a,
2273
- className: D(a.className, t),
2695
+ className: A(a.className, t),
2274
2696
  defaultValue: n.initial_value,
2275
2697
  maxLength: n.max_length,
2276
2698
  minLength: n.min_length,
@@ -2278,25 +2700,25 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2278
2700
  placeholder: n.placeholder?.text,
2279
2701
  type: "text"
2280
2702
  });
2281
- case "email_text_input": return /* @__PURE__ */ l("input", {
2703
+ case "email_text_input": return /* @__PURE__ */ u("input", {
2282
2704
  ...a,
2283
- className: D(a.className, t),
2705
+ className: A(a.className, t),
2284
2706
  defaultValue: n.initial_value,
2285
2707
  onChange: s,
2286
2708
  placeholder: n.placeholder?.text,
2287
2709
  type: "email"
2288
2710
  });
2289
- case "url_text_input": return /* @__PURE__ */ l("input", {
2711
+ case "url_text_input": return /* @__PURE__ */ u("input", {
2290
2712
  ...a,
2291
- className: D(a.className, t),
2713
+ className: A(a.className, t),
2292
2714
  defaultValue: n.initial_value,
2293
2715
  onChange: s,
2294
2716
  placeholder: n.placeholder?.text,
2295
2717
  type: "url"
2296
2718
  });
2297
- case "number_input": return /* @__PURE__ */ l("input", {
2719
+ case "number_input": return /* @__PURE__ */ u("input", {
2298
2720
  ...a,
2299
- className: D(a.className, t),
2721
+ className: A(a.className, t),
2300
2722
  defaultValue: n.initial_value,
2301
2723
  max: n.max_value,
2302
2724
  min: n.min_value,
@@ -2306,93 +2728,93 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2306
2728
  type: "number"
2307
2729
  });
2308
2730
  case "datepicker": {
2309
- let e = h(T.button, T.picker);
2310
- return /* @__PURE__ */ u("button", {
2731
+ let e = g(O.button, O.picker);
2732
+ return /* @__PURE__ */ d("button", {
2311
2733
  ...e,
2312
2734
  "aria-label": "Date",
2313
- className: D(e.className, t),
2735
+ className: A(e.className, t),
2314
2736
  onClick: () => {
2315
2737
  o(n.initial_date ?? "");
2316
2738
  },
2317
2739
  type: "button",
2318
2740
  children: [
2319
- /* @__PURE__ */ l("span", {
2320
- ...h(T.pickerIcon),
2741
+ /* @__PURE__ */ u("span", {
2742
+ ...g(O.pickerIcon),
2321
2743
  "aria-hidden": "true",
2322
- children: "▦"
2744
+ children: /* @__PURE__ */ u(C, { size: 16 })
2323
2745
  }),
2324
- nt(n.initial_date),
2325
- /* @__PURE__ */ l("span", {
2326
- ...h(T.pickerChevron),
2746
+ wt(n.initial_date),
2747
+ /* @__PURE__ */ u("span", {
2748
+ ...g(O.pickerChevron),
2327
2749
  "aria-hidden": "true",
2328
- children: "⌄"
2750
+ children: /* @__PURE__ */ u(ee, { size: 16 })
2329
2751
  })
2330
2752
  ]
2331
2753
  });
2332
2754
  }
2333
- case "datetimepicker": return /* @__PURE__ */ l("input", {
2755
+ case "datetimepicker": return /* @__PURE__ */ u("input", {
2334
2756
  ...a,
2335
- className: D(a.className, t),
2336
- defaultValue: rt(n.initial_date_time),
2757
+ className: A(a.className, t),
2758
+ defaultValue: Tt(n.initial_date_time),
2337
2759
  onChange: s,
2338
2760
  type: "datetime-local"
2339
2761
  });
2340
- case "timepicker": return /* @__PURE__ */ l("input", {
2762
+ case "timepicker": return /* @__PURE__ */ u("input", {
2341
2763
  ...a,
2342
- className: D(a.className, t),
2764
+ className: A(a.className, t),
2343
2765
  defaultValue: n.initial_time,
2344
2766
  onChange: s,
2345
2767
  type: "time"
2346
2768
  });
2347
- case "file_input": return /* @__PURE__ */ l("input", {
2769
+ case "file_input": return /* @__PURE__ */ u("input", {
2348
2770
  ...a,
2349
2771
  accept: n.filetypes?.map((e) => `.${e}`).join(","),
2350
- className: D(a.className, t),
2772
+ className: A(a.className, t),
2351
2773
  multiple: (n.max_files ?? 10) > 1,
2352
2774
  onChange: (e) => {
2353
2775
  o(e.currentTarget.files?.[0]?.name ?? "");
2354
2776
  },
2355
2777
  type: "file"
2356
2778
  });
2357
- case "rich_text_input": return /* @__PURE__ */ l("div", {
2779
+ case "rich_text_input": return /* @__PURE__ */ u("div", {
2358
2780
  ...a,
2359
- className: D(a.className, t),
2781
+ className: A(a.className, t),
2360
2782
  contentEditable: !0,
2361
2783
  onInput: (e) => {
2362
2784
  o(e.currentTarget.textContent ?? "");
2363
2785
  },
2364
2786
  role: "textbox",
2365
2787
  suppressContentEditableWarning: !0,
2366
- children: n.initial_value === void 0 ? null : /* @__PURE__ */ l(A, {
2788
+ children: n.initial_value === void 0 ? null : /* @__PURE__ */ u(N, {
2367
2789
  block: n.initial_value,
2368
2790
  path: `${r}.initial_value`
2369
2791
  })
2370
2792
  });
2371
2793
  }
2372
- return g(n);
2794
+ return _(n);
2373
2795
  }
2374
- function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2375
- if (!ke(n)) return /* @__PURE__ */ l(M, {
2796
+ function Dt({ blockId: e, className: t, element: n, path: r = "element" }) {
2797
+ if (!Xe(n)) return /* @__PURE__ */ u(P, {
2376
2798
  className: t,
2377
2799
  element: n
2378
2800
  });
2379
- if (n.type === "image") return /* @__PURE__ */ l(N, {
2801
+ if (n.type === "image") return /* @__PURE__ */ u(F, {
2380
2802
  className: t,
2381
2803
  element: n
2382
2804
  });
2383
2805
  switch (n.type) {
2384
- case "button": return /* @__PURE__ */ l(Ve, {
2806
+ case "button": return /* @__PURE__ */ u(lt, {
2385
2807
  blockId: e,
2386
2808
  className: t,
2387
2809
  element: n
2388
2810
  });
2389
2811
  case "checkboxes":
2390
- case "radio_buttons": return /* @__PURE__ */ l(Ge, {
2812
+ case "radio_buttons": return /* @__PURE__ */ u(pt, {
2391
2813
  blockId: e,
2392
2814
  className: t,
2393
2815
  element: n
2394
2816
  });
2395
- case "overflow": return /* @__PURE__ */ l(He, {
2817
+ case "overflow": return /* @__PURE__ */ u(ut, {
2396
2818
  blockId: e,
2397
2819
  className: t,
2398
2820
  element: n
@@ -2406,7 +2828,7 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2406
2828
  case "multi_static_select":
2407
2829
  case "multi_users_select":
2408
2830
  case "static_select":
2409
- case "users_select": return /* @__PURE__ */ l($e, {
2831
+ case "users_select": return /* @__PURE__ */ u(xt, {
2410
2832
  blockId: e,
2411
2833
  className: t,
2412
2834
  element: n
@@ -2419,47 +2841,51 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2419
2841
  case "plain_text_input":
2420
2842
  case "rich_text_input":
2421
2843
  case "timepicker":
2422
- case "url_text_input": return /* @__PURE__ */ l(it, {
2844
+ case "url_text_input": return /* @__PURE__ */ u(Et, {
2423
2845
  blockId: e,
2424
2846
  className: t,
2425
2847
  element: n,
2426
2848
  path: r
2427
2849
  });
2428
2850
  case "workflow_button": {
2429
- if (!Fe(n)) return /* @__PURE__ */ l(M, {
2851
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2430
2852
  className: t,
2431
2853
  element: n
2432
2854
  });
2433
- let e = h(T.button);
2434
- return /* @__PURE__ */ l("button", {
2855
+ let e = g(O.button);
2856
+ return /* @__PURE__ */ u("button", {
2435
2857
  ...e,
2436
- className: D(e.className, t),
2858
+ className: A(e.className, t),
2437
2859
  type: "button",
2438
2860
  children: n.text.text
2439
2861
  });
2440
2862
  }
2441
2863
  }
2442
- return g(n);
2864
+ return _(n);
2443
2865
  }
2444
2866
  //#endregion
2445
2867
  //#region src/text/Mrkdwn.tsx
2446
- var ot = /* @__PURE__ */ new Set([
2868
+ var Ot = /* @__PURE__ */ new Set([
2447
2869
  "*",
2448
2870
  "_",
2449
2871
  "~",
2450
2872
  "`",
2451
2873
  "<",
2452
2874
  ":"
2453
- ]), st = /^[a-z0-9_+-]{1,64}$/, ct = /[A-Za-z0-9]/;
2454
- function lt(e) {
2875
+ ]), kt = /^[a-z0-9_+-]{1,64}$/, At = /[A-Za-z0-9]/;
2876
+ function jt(e) {
2455
2877
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
2456
2878
  }
2457
- function ut(e) {
2458
- let t = lt(e);
2459
- if (t.startsWith("@")) return {
2460
- id: t.slice(1),
2461
- kind: "user"
2462
- };
2879
+ function Mt(e) {
2880
+ let t = jt(e);
2881
+ if (t.startsWith("@")) {
2882
+ let [e = "", n] = t.slice(1).split("|", 2);
2883
+ return {
2884
+ id: e,
2885
+ kind: "user",
2886
+ ...n === void 0 ? {} : { fallback: n }
2887
+ };
2888
+ }
2463
2889
  if (t.startsWith("#")) {
2464
2890
  let [e = "", n] = t.slice(1).split("|", 2);
2465
2891
  return {
@@ -2486,10 +2912,13 @@ function ut(e) {
2486
2912
  ...a === void 0 ? {} : { href: a }
2487
2913
  };
2488
2914
  }
2489
- if (t === "!here" || t === "!channel" || t === "!everyone") return {
2490
- kind: "broadcast",
2491
- range: t.slice(1)
2492
- };
2915
+ if (t.startsWith("!")) {
2916
+ let [e = ""] = t.slice(1).split("|", 2);
2917
+ if (e === "here" || e === "channel" || e === "everyone") return {
2918
+ kind: "broadcast",
2919
+ range: e
2920
+ };
2921
+ }
2493
2922
  let n = t.indexOf("|");
2494
2923
  if (n >= 0) return {
2495
2924
  href: t.slice(0, n),
@@ -2502,14 +2931,14 @@ function ut(e) {
2502
2931
  label: t
2503
2932
  };
2504
2933
  }
2505
- function dt(e, t) {
2506
- for (let n = t; n < e.length; n += 1) if (ot.has(e[n] ?? "")) return n;
2934
+ function Nt(e, t) {
2935
+ for (let n = t; n < e.length; n += 1) if (Ot.has(e[n] ?? "")) return n;
2507
2936
  return e.length;
2508
2937
  }
2509
- function ft(e, t) {
2938
+ function Pt(e, t) {
2510
2939
  if (t > 16) return [{
2511
2940
  kind: "text",
2512
- value: lt(e)
2941
+ value: jt(e)
2513
2942
  }];
2514
2943
  let n = [], r = 0;
2515
2944
  for (; r < e.length;) {
@@ -2518,7 +2947,7 @@ function ft(e, t) {
2518
2947
  if (t >= 0) {
2519
2948
  n.push({
2520
2949
  kind: "code_block",
2521
- value: lt(e.slice(r + 3, t))
2950
+ value: jt(e.slice(r + 3, t))
2522
2951
  }), r = t + 3;
2523
2952
  continue;
2524
2953
  }
@@ -2529,7 +2958,7 @@ function ft(e, t) {
2529
2958
  if (t > r + 1) {
2530
2959
  n.push({
2531
2960
  kind: "code",
2532
- value: lt(e.slice(r + 1, t))
2961
+ value: jt(e.slice(r + 1, t))
2533
2962
  }), r = t + 1;
2534
2963
  continue;
2535
2964
  }
@@ -2539,7 +2968,7 @@ function ft(e, t) {
2539
2968
  if (a > r + 1) {
2540
2969
  let o = i === "*" ? "bold" : i === "_" ? "italic" : "strike";
2541
2970
  n.push({
2542
- children: ft(e.slice(r + 1, a), t + 1),
2971
+ children: Pt(e.slice(r + 1, a), t + 1),
2543
2972
  kind: o
2544
2973
  }), r = a + 1;
2545
2974
  continue;
@@ -2548,7 +2977,7 @@ function ft(e, t) {
2548
2977
  if (i === "<") {
2549
2978
  let t = e.indexOf(">", r + 1);
2550
2979
  if (t >= 0) {
2551
- let i = ut(e.slice(r + 1, t));
2980
+ let i = Mt(e.slice(r + 1, t));
2552
2981
  if (i !== void 0) {
2553
2982
  n.push(i), r = t + 1;
2554
2983
  continue;
@@ -2556,8 +2985,8 @@ function ft(e, t) {
2556
2985
  }
2557
2986
  }
2558
2987
  if (i === ":") {
2559
- let t = e.indexOf(":", r + 1), i = t < 0 ? "" : e.slice(r + 1, t), a = r === 0 || !ct.test(e[r - 1] ?? ""), o = t < 0 || t + 1 >= e.length || !ct.test(e[t + 1] ?? "");
2560
- if (t > r + 1 && a && o && st.test(i)) {
2988
+ let t = e.indexOf(":", r + 1), i = t < 0 ? "" : e.slice(r + 1, t), a = r === 0 || !At.test(e[r - 1] ?? ""), o = t < 0 || t + 1 >= e.length || !At.test(e[t + 1] ?? "");
2989
+ if (t > r + 1 && a && o && kt.test(i)) {
2561
2990
  n.push({
2562
2991
  kind: "emoji",
2563
2992
  name: i
@@ -2565,124 +2994,124 @@ function ft(e, t) {
2565
2994
  continue;
2566
2995
  }
2567
2996
  }
2568
- let a = dt(e, r + 1);
2997
+ let a = Nt(e, r + 1);
2569
2998
  n.push({
2570
2999
  kind: "text",
2571
- value: lt(e.slice(r, a))
3000
+ value: jt(e.slice(r, a))
2572
3001
  }), r = a;
2573
3002
  }
2574
3003
  return n;
2575
3004
  }
2576
- function pt(e) {
2577
- return ft(e, 0);
3005
+ function Ft(e) {
3006
+ return Pt(e, 0);
2578
3007
  }
2579
- function mt({ token: e }) {
2580
- let { resolvers: t } = y();
3008
+ function It({ token: e }) {
3009
+ let { resolvers: t } = x();
2581
3010
  switch (e.kind) {
2582
3011
  case "text": return e.value;
2583
- case "bold": return /* @__PURE__ */ l("strong", {
2584
- ...h(T.bold),
2585
- children: e.children.map((e, t) => /* @__PURE__ */ l(mt, { token: e }, `${e.kind}-${String(t)}`))
3012
+ case "bold": return /* @__PURE__ */ u("strong", {
3013
+ ...g(O.bold),
3014
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2586
3015
  });
2587
- case "italic": return /* @__PURE__ */ l("em", {
2588
- ...h(T.italic),
2589
- children: e.children.map((e, t) => /* @__PURE__ */ l(mt, { token: e }, `${e.kind}-${String(t)}`))
3016
+ case "italic": return /* @__PURE__ */ u("em", {
3017
+ ...g(O.italic),
3018
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2590
3019
  });
2591
- case "strike": return /* @__PURE__ */ l("s", {
2592
- ...h(T.strike),
2593
- children: e.children.map((e, t) => /* @__PURE__ */ l(mt, { token: e }, `${e.kind}-${String(t)}`))
3020
+ case "strike": return /* @__PURE__ */ u("s", {
3021
+ ...g(O.strike),
3022
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2594
3023
  });
2595
- case "code": return /* @__PURE__ */ l("code", {
2596
- ...h(T.inlineCode),
3024
+ case "code": return /* @__PURE__ */ u("code", {
3025
+ ...g(O.inlineCode),
2597
3026
  children: e.value
2598
3027
  });
2599
- case "code_block": return /* @__PURE__ */ l("pre", {
2600
- ...h(T.pre),
3028
+ case "code_block": return /* @__PURE__ */ u("pre", {
3029
+ ...g(O.pre),
2601
3030
  children: e.value
2602
3031
  });
2603
- case "emoji": return /* @__PURE__ */ l("span", {
3032
+ case "emoji": return /* @__PURE__ */ u("span", {
2604
3033
  "aria-label": `:${e.name}:`,
2605
3034
  role: "img",
2606
- children: t.emoji?.(e.name) ?? he(e.name) ?? `:${e.name}:`
3035
+ children: t.emoji?.(e.name) ?? Ie(e.name) ?? `:${e.name}:`
2607
3036
  });
2608
3037
  case "link": {
2609
- let t = w(e.href);
2610
- return t === void 0 ? e.label : /* @__PURE__ */ l("a", {
2611
- ...h(T.link),
3038
+ let t = D(e.href);
3039
+ return t === void 0 ? e.label : /* @__PURE__ */ u("a", {
3040
+ ...g(O.link),
2612
3041
  href: t,
2613
3042
  rel: "noreferrer",
2614
3043
  children: e.label
2615
3044
  });
2616
3045
  }
2617
- case "user": return /* @__PURE__ */ u("span", {
2618
- ...h(T.mention),
2619
- children: ["@", t.user?.(e.id) ?? e.id]
3046
+ case "user": return /* @__PURE__ */ d("span", {
3047
+ ...g(O.mention),
3048
+ children: ["@", t.user?.(e.id) ?? e.fallback ?? e.id]
2620
3049
  });
2621
- case "channel": return /* @__PURE__ */ u("span", {
2622
- ...h(T.mention),
3050
+ case "channel": return /* @__PURE__ */ d("span", {
3051
+ ...g(O.mention),
2623
3052
  children: ["#", t.channel?.(e.id) ?? e.fallback ?? e.id]
2624
3053
  });
2625
- case "usergroup": return /* @__PURE__ */ u("span", {
2626
- ...h(T.mention),
3054
+ case "usergroup": return /* @__PURE__ */ d("span", {
3055
+ ...g(O.mention),
2627
3056
  children: ["@", t.usergroup?.(e.id) ?? e.fallback ?? e.id]
2628
3057
  });
2629
- case "team": return /* @__PURE__ */ u("span", {
2630
- ...h(T.mention),
3058
+ case "team": return /* @__PURE__ */ d("span", {
3059
+ ...g(O.mention),
2631
3060
  children: ["@", t.team?.(e.id) ?? e.id]
2632
3061
  });
2633
- case "broadcast": return /* @__PURE__ */ u("span", {
2634
- ...h(T.mention),
3062
+ case "broadcast": return /* @__PURE__ */ d("span", {
3063
+ ...g(O.mention),
2635
3064
  children: ["@", e.range]
2636
3065
  });
2637
3066
  case "date": {
2638
- let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? fe(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = w(e.href);
2639
- return i === void 0 ? r : /* @__PURE__ */ l("a", {
2640
- ...h(T.link),
3067
+ let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? Ne(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = D(e.href);
3068
+ return i === void 0 ? r : /* @__PURE__ */ u("a", {
3069
+ ...g(O.link),
2641
3070
  href: i,
2642
3071
  rel: "noreferrer",
2643
3072
  children: r
2644
3073
  });
2645
3074
  }
2646
3075
  }
2647
- return g(e);
3076
+ return _(e);
2648
3077
  }
2649
- function P({ className: e, text: t }) {
2650
- let n = h(T.text);
2651
- return /* @__PURE__ */ l("div", {
3078
+ function I({ className: e, text: t }) {
3079
+ let n = g(O.text);
3080
+ return /* @__PURE__ */ u("div", {
2652
3081
  ...n,
2653
- className: D(n.className, e),
2654
- children: pt(t).map((e, t) => /* @__PURE__ */ l(mt, { token: e }, `${e.kind}-${String(t)}`))
3082
+ className: A(n.className, e),
3083
+ children: Ft(t).map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2655
3084
  });
2656
3085
  }
2657
3086
  //#endregion
2658
3087
  //#region src/text/Text.tsx
2659
- function F({ className: e, text: t }) {
2660
- let n = t, r = b(n) && typeof n.text == "string" ? n.text : C(n, "text");
2661
- if (x(n) === "mrkdwn") return /* @__PURE__ */ l(P, {
3088
+ function L({ className: e, text: t }) {
3089
+ let n = t, r = w(n) && typeof n.text == "string" ? n.text : E(n, "text");
3090
+ if (T(n) === "mrkdwn") return /* @__PURE__ */ u(I, {
2662
3091
  className: e,
2663
3092
  text: r
2664
3093
  });
2665
- let i = h(T.text);
2666
- return /* @__PURE__ */ l("div", {
3094
+ let i = g(O.text);
3095
+ return /* @__PURE__ */ u("div", {
2667
3096
  ...i,
2668
- className: D(i.className, e),
3097
+ className: A(i.className, e),
2669
3098
  children: r
2670
3099
  });
2671
3100
  }
2672
3101
  //#endregion
2673
3102
  //#region src/text/Markdown.tsx
2674
- function ht(e) {
3103
+ function Lt(e) {
2675
3104
  let t = e.trim();
2676
3105
  return t === "---" || t === "***" || t === "___";
2677
3106
  }
2678
- function gt(e) {
3107
+ function Rt(e) {
2679
3108
  let t = e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|");
2680
3109
  return t.length > 0 && t.every((e) => /^:?-{3,}:?$/.test(e.trim()));
2681
3110
  }
2682
- function _t(e) {
3111
+ function zt(e) {
2683
3112
  return e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((e) => e.trim());
2684
3113
  }
2685
- function vt(e) {
3114
+ function Bt(e) {
2686
3115
  let t = /^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/.exec(e);
2687
3116
  if (t !== null) return {
2688
3117
  checked: (t[1] ?? "").toLowerCase() === "x",
@@ -2703,7 +3132,7 @@ function vt(e) {
2703
3132
  text: r[1] ?? ""
2704
3133
  };
2705
3134
  }
2706
- function yt(e) {
3135
+ function Vt(e) {
2707
3136
  let t = e.split("\n"), n = [], r = 0;
2708
3137
  for (; r < t.length;) {
2709
3138
  let e = t[r] ?? "";
@@ -2721,9 +3150,9 @@ function yt(e) {
2721
3150
  });
2722
3151
  continue;
2723
3152
  }
2724
- if (e.includes("|") && r + 1 < t.length && gt(t[r + 1] ?? "")) {
2725
- let i = _t(e), a = [];
2726
- for (r += 2; r < t.length && (t[r] ?? "").includes("|");) a.push(_t(t[r] ?? "")), r += 1;
3153
+ if (e.includes("|") && r + 1 < t.length && Rt(t[r + 1] ?? "")) {
3154
+ let i = zt(e), a = [];
3155
+ for (r += 2; r < t.length && (t[r] ?? "").includes("|");) a.push(zt(t[r] ?? "")), r += 1;
2727
3156
  n.push({
2728
3157
  headers: i,
2729
3158
  kind: "table",
@@ -2731,7 +3160,7 @@ function yt(e) {
2731
3160
  });
2732
3161
  continue;
2733
3162
  }
2734
- if (ht(e)) {
3163
+ if (Lt(e)) {
2735
3164
  n.push({ kind: "divider" }), r += 1;
2736
3165
  continue;
2737
3166
  }
@@ -2744,11 +3173,11 @@ function yt(e) {
2744
3173
  }), r += 1;
2745
3174
  continue;
2746
3175
  }
2747
- let a = vt(e);
3176
+ let a = Bt(e);
2748
3177
  if (a !== void 0) {
2749
3178
  let e = [a];
2750
3179
  for (r += 1; r < t.length;) {
2751
- let n = vt(t[r] ?? "");
3180
+ let n = Bt(t[r] ?? "");
2752
3181
  if (n === void 0 || n.ordered !== a.ordered) break;
2753
3182
  e.push(n), r += 1;
2754
3183
  }
@@ -2771,7 +3200,7 @@ function yt(e) {
2771
3200
  let o = [e];
2772
3201
  for (r += 1; r < t.length && (t[r] ?? "").trim().length > 0;) {
2773
3202
  let e = t[r] ?? "";
2774
- if (e.trimStart().startsWith("```") || ht(e) || /^(#{1,6})\s+/.test(e) || vt(e) !== void 0 || e.trimStart().startsWith(">")) break;
3203
+ if (e.trimStart().startsWith("```") || Lt(e) || /^(#{1,6})\s+/.test(e) || Bt(e) !== void 0 || e.trimStart().startsWith(">")) break;
2775
3204
  o.push(e), r += 1;
2776
3205
  }
2777
3206
  n.push({
@@ -2781,240 +3210,248 @@ function yt(e) {
2781
3210
  }
2782
3211
  return n;
2783
3212
  }
2784
- function I(e) {
3213
+ function Ht(e) {
2785
3214
  return e.replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, "<$2|$1>").replaceAll("**", "*").replaceAll("__", "*").replaceAll("~~", "~");
2786
3215
  }
2787
- function bt(e) {
2788
- return e <= 1 ? T.heading1 : e === 2 ? T.heading2 : e === 3 ? T.heading3 : T.heading4;
3216
+ function Ut(e) {
3217
+ return e <= 1 ? O.heading1 : e === 2 ? O.heading2 : e === 3 ? O.heading3 : O.heading4;
2789
3218
  }
2790
- function xt({ token: e }) {
3219
+ function Wt({ token: e }) {
2791
3220
  switch (e.kind) {
2792
- case "paragraph": return /* @__PURE__ */ l(P, { text: I(e.text) });
2793
- case "quote": return /* @__PURE__ */ l("blockquote", {
2794
- ...h(T.quote),
2795
- children: /* @__PURE__ */ l(P, { text: I(e.text) })
3221
+ case "paragraph": return /* @__PURE__ */ u(I, { text: Ht(e.text) });
3222
+ case "quote": return /* @__PURE__ */ u("blockquote", {
3223
+ ...g(O.quote),
3224
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2796
3225
  });
2797
- case "heading": return /* @__PURE__ */ l("div", {
2798
- ...h(T.heading, bt(e.level)),
2799
- children: /* @__PURE__ */ l(P, { text: I(e.text) })
3226
+ case "heading": return /* @__PURE__ */ u("div", {
3227
+ ...g(O.heading, Ut(e.level)),
3228
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2800
3229
  });
2801
- case "divider": return /* @__PURE__ */ l("hr", { ...h(T.divider) });
2802
- case "code": return /* @__PURE__ */ l("pre", {
2803
- ...h(T.pre),
3230
+ case "divider": return /* @__PURE__ */ u("hr", { ...g(O.divider) });
3231
+ case "code": return /* @__PURE__ */ u("pre", {
3232
+ ...g(O.pre),
2804
3233
  "data-language": e.language,
2805
3234
  children: e.text
2806
3235
  });
2807
3236
  case "list": {
2808
- let n = e.ordered ? T.listItemOrdered : [T.listItemBullet, T.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
2809
- ...h(n),
3237
+ let n = e.ordered ? O.listItemOrdered : [O.listItemBullet, O.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
3238
+ ...g(n),
2810
3239
  key: `${e.text}-${String(r)}`
2811
- }, e.task ? /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("input", {
3240
+ }, e.task ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("input", {
2812
3241
  checked: e.checked,
2813
3242
  disabled: !0,
2814
3243
  readOnly: !0,
2815
3244
  type: "checkbox"
2816
- }), " "] }) : null, /* @__PURE__ */ l(P, { text: I(e.text) })));
2817
- return e.ordered ? /* @__PURE__ */ l("ol", {
2818
- ...h(T.list, T.listOrdered),
3245
+ }), " "] }) : null, /* @__PURE__ */ u(I, { text: Ht(e.text) })));
3246
+ return e.ordered ? /* @__PURE__ */ u("ol", {
3247
+ ...g(O.list, O.listOrdered),
2819
3248
  children: r
2820
- }) : /* @__PURE__ */ l("ul", {
2821
- ...h(T.list),
3249
+ }) : /* @__PURE__ */ u("ul", {
3250
+ ...g(O.list),
2822
3251
  children: r
2823
3252
  });
2824
3253
  }
2825
- case "table": return /* @__PURE__ */ l("div", {
2826
- ...h(T.tableScroller),
2827
- children: /* @__PURE__ */ u("table", {
2828
- ...h(T.table),
2829
- children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: e.headers.map((e, n) => /* @__PURE__ */ t("th", {
2830
- ...h(T.tableCell, T.tableHeader, n === 0 && T.tableCellFirstColumn),
3254
+ case "table": return /* @__PURE__ */ u("div", {
3255
+ ...g(O.tableScroller),
3256
+ children: /* @__PURE__ */ d("table", {
3257
+ ...g(O.table),
3258
+ children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.headers.map((e, n) => /* @__PURE__ */ t("th", {
3259
+ ...g(O.tableCell, O.tableHeader, n === 0 && O.tableCellFirstColumn),
2831
3260
  key: `${e}-${String(n)}`,
2832
3261
  scope: "col"
2833
- }, /* @__PURE__ */ l(P, { text: I(e) }))) }) }), /* @__PURE__ */ l("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ l("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
2834
- ...h(T.tableCell, n === 0 && T.tableCellFirstColumn),
3262
+ }, /* @__PURE__ */ u(I, { text: Ht(e) }))) }) }), /* @__PURE__ */ u("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ u("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
3263
+ ...g(O.tableCell, n === 0 && O.tableCellFirstColumn),
2835
3264
  key: `${e}-${String(n)}`
2836
- }, /* @__PURE__ */ l(P, { text: I(e) }))) }, `row-${String(n)}`)) })]
3265
+ }, /* @__PURE__ */ u(I, { text: Ht(e) }))) }, `row-${String(n)}`)) })]
2837
3266
  })
2838
3267
  });
2839
3268
  }
2840
- return g(e);
3269
+ return _(e);
2841
3270
  }
2842
- function St({ markdown: e }) {
2843
- return /* @__PURE__ */ l("div", {
2844
- ...h(T.markdown),
2845
- children: yt(e).map((e, t) => /* @__PURE__ */ l(xt, { token: e }, `${e.kind}-${String(t)}`))
3271
+ function Gt({ markdown: e }) {
3272
+ return /* @__PURE__ */ u("div", {
3273
+ ...g(O.markdown),
3274
+ children: Vt(e).map((e, t) => /* @__PURE__ */ u(Wt, { token: e }, `${e.kind}-${String(t)}`))
2846
3275
  });
2847
3276
  }
2848
3277
  //#endregion
2849
3278
  //#region src/blocks/BasicBlocks.tsx
2850
- function Ct(e) {
2851
- return b(e) && e.type === "image";
3279
+ function Kt(e) {
3280
+ return w(e) && e.type === "image";
2852
3281
  }
2853
- function L({ blockId: e, blockType: t, children: n, className: r }) {
2854
- let i = h(T.block);
2855
- return /* @__PURE__ */ l("div", {
3282
+ function R({ blockId: e, blockType: t, children: n, className: r }) {
3283
+ let i = g(O.block);
3284
+ return /* @__PURE__ */ u("div", {
2856
3285
  ...i,
2857
- className: D(i.className, r),
3286
+ className: A(i.className, r),
2858
3287
  "data-block-id": e,
2859
3288
  "data-block-type": t,
2860
3289
  children: n
2861
3290
  });
2862
3291
  }
2863
- function wt({ block: e, className: t, path: n = "block" }) {
3292
+ function qt({ block: e, className: t, path: n = "block" }) {
2864
3293
  let r = e.accessory, i = Array.isArray(e.fields) ? e.fields : void 0;
2865
- return /* @__PURE__ */ l(L, {
3294
+ return /* @__PURE__ */ u(R, {
2866
3295
  blockId: e.block_id,
2867
3296
  blockType: e.type,
2868
3297
  className: t,
2869
- children: /* @__PURE__ */ u("div", {
2870
- ...h(T.section),
2871
- children: [/* @__PURE__ */ u("div", {
2872
- ...h(T.sectionContent),
2873
- children: [e.text === void 0 ? null : /* @__PURE__ */ l(F, { text: e.text }), i === void 0 ? null : /* @__PURE__ */ l("div", {
2874
- ...h(T.fields),
2875
- children: i.map((e, t) => /* @__PURE__ */ l(F, { text: e }, `${x(e) ?? "unknown"}-${String(t)}`))
3298
+ children: /* @__PURE__ */ d("div", {
3299
+ ...g(O.section),
3300
+ children: [/* @__PURE__ */ d("div", {
3301
+ ...g(O.sectionContent),
3302
+ children: [e.text === void 0 ? null : /* @__PURE__ */ u(L, { text: e.text }), i === void 0 ? null : /* @__PURE__ */ u("div", {
3303
+ ...g(O.fields),
3304
+ children: i.map((e, t) => /* @__PURE__ */ u(L, { text: e }, `${T(e) ?? "unknown"}-${String(t)}`))
2876
3305
  })]
2877
- }), r === void 0 ? null : Ct(r) ? /* @__PURE__ */ l("div", {
2878
- ...h(T.accessory),
2879
- children: /* @__PURE__ */ l(N, {
3306
+ }), r === void 0 ? null : Kt(r) ? /* @__PURE__ */ u("div", {
3307
+ ...g(O.accessory),
3308
+ children: /* @__PURE__ */ u(F, {
2880
3309
  element: r,
2881
3310
  variant: "accessory"
2882
3311
  })
2883
- }) : /* @__PURE__ */ l(at, {
3312
+ }) : /* @__PURE__ */ u(Dt, {
2884
3313
  blockId: e.block_id,
2885
- className: h(T.accessory).className,
3314
+ className: g(O.accessory).className,
2886
3315
  element: e.accessory,
2887
3316
  path: `${n}.accessory`
2888
3317
  })]
2889
3318
  })
2890
3319
  });
2891
3320
  }
2892
- function Tt({ block: e, className: t }) {
2893
- let n = e.level === void 0 ? void 0 : Math.trunc(e.level), r = n === void 0 || Number.isNaN(n) ? void 0 : Math.min(4, Math.max(1, n)), i = e.text, a = b(i) && typeof i.text == "string" ? i.text : C(e, "header"), o = h(T.heading, r === 1 && T.heading1, (r === void 0 || r === 2) && T.heading2, r === 3 && T.heading3, r === 4 && T.heading4), s = l(r === 1 ? "h1" : r === 3 ? "h3" : r === 4 ? "h4" : "h2", {
3321
+ function Jt({ block: e, className: t }) {
3322
+ let n = e.level === void 0 ? void 0 : Math.trunc(e.level), r = n === void 0 || Number.isNaN(n) ? void 0 : Math.min(4, Math.max(1, n)), i = e.text, a = w(i) && typeof i.text == "string" ? i.text : E(e, "header"), o = g(O.heading, r === 1 && O.heading1, (r === void 0 || r === 2) && O.heading2, r === 3 && O.heading3, r === 4 && O.heading4), s = u(r === 1 ? "h1" : r === 3 ? "h3" : r === 4 ? "h4" : "h2", {
2894
3323
  ...o,
2895
3324
  children: a
2896
3325
  });
2897
- return /* @__PURE__ */ l(L, {
3326
+ return /* @__PURE__ */ u(R, {
2898
3327
  blockId: e.block_id,
2899
3328
  blockType: e.type,
2900
3329
  className: t,
2901
3330
  children: s
2902
3331
  });
2903
3332
  }
2904
- function Et({ block: e, className: t }) {
2905
- return /* @__PURE__ */ l(L, {
3333
+ function Yt({ block: e, className: t }) {
3334
+ return /* @__PURE__ */ u(R, {
2906
3335
  blockId: e.block_id,
2907
3336
  blockType: e.type,
2908
3337
  className: t,
2909
- children: /* @__PURE__ */ l("hr", { ...h(T.divider) })
3338
+ children: /* @__PURE__ */ u("hr", { ...g(O.divider) })
2910
3339
  });
2911
3340
  }
2912
- function Dt({ block: e, className: t }) {
2913
- return /* @__PURE__ */ u(L, {
3341
+ function Xt({ block: e, className: t }) {
3342
+ return /* @__PURE__ */ d(R, {
2914
3343
  blockId: e.block_id,
2915
3344
  blockType: e.type,
2916
3345
  className: t,
2917
- children: [/* @__PURE__ */ l(N, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ l(F, {
2918
- className: h(T.smallText).className,
3346
+ children: [/* @__PURE__ */ u(F, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3347
+ className: g(O.smallText).className,
2919
3348
  text: e.title
2920
3349
  })]
2921
3350
  });
2922
3351
  }
2923
- function Ot(e) {
2924
- return b(e) && (e.type === "mrkdwn" || e.type === "plain_text") && typeof e.text == "string";
3352
+ function Zt(e) {
3353
+ return w(e) && (e.type === "mrkdwn" || e.type === "plain_text") && typeof e.text == "string";
2925
3354
  }
2926
- function kt({ block: e, className: n }) {
3355
+ function Qt({ block: e, className: n }) {
2927
3356
  let r = e.elements;
2928
- return /* @__PURE__ */ l(L, {
3357
+ return /* @__PURE__ */ u(R, {
2929
3358
  blockId: e.block_id,
2930
3359
  blockType: e.type,
2931
3360
  className: n,
2932
- children: /* @__PURE__ */ l("div", {
2933
- ...h(T.context),
2934
- children: Array.isArray(r) ? r.map((e, n) => Ct(e) ? /* @__PURE__ */ l(N, {
3361
+ children: /* @__PURE__ */ u("div", {
3362
+ ...g(O.context),
3363
+ children: Array.isArray(r) ? r.map((e, n) => Kt(e) ? /* @__PURE__ */ u(F, {
2935
3364
  element: e,
2936
3365
  variant: "context"
2937
- }, `${e.type}-${String(n)}`) : Ot(e) ? /* @__PURE__ */ t("div", {
2938
- ...h(T.contextElement),
3366
+ }, `${e.type}-${String(n)}`) : Zt(e) ? /* @__PURE__ */ t("div", {
3367
+ ...g(O.contextElement),
2939
3368
  key: `${e.type}-${String(n)}`
2940
- }, /* @__PURE__ */ l(F, {
2941
- className: h(T.contextText).className,
3369
+ }, /* @__PURE__ */ u(L, {
3370
+ className: g(O.contextText).className,
2942
3371
  text: e
2943
3372
  })) : /* @__PURE__ */ t("span", {
2944
- ...h(T.unhandled),
2945
- "data-unhandled-element": x(e) ?? "unknown",
3373
+ ...g(O.unhandled),
3374
+ "data-unhandled-element": T(e) ?? "unknown",
2946
3375
  key: `unhandled-${String(n)}`
2947
- }, C(e, "context element"))) : /* @__PURE__ */ l("span", {
2948
- ...h(T.unhandled),
3376
+ }, E(e, "context element"))) : /* @__PURE__ */ u("span", {
3377
+ ...g(O.unhandled),
2949
3378
  "data-unhandled-element": "context",
2950
- children: C(e, "context block")
3379
+ children: E(e, "context block")
2951
3380
  })
2952
3381
  })
2953
3382
  });
2954
3383
  }
2955
- function At({ block: e, className: t, path: n = "block" }) {
2956
- return /* @__PURE__ */ l(L, {
3384
+ function $t({ block: e, className: t, path: n = "block" }) {
3385
+ return /* @__PURE__ */ u(R, {
2957
3386
  blockId: e.block_id,
2958
3387
  blockType: e.type,
2959
3388
  className: t,
2960
- children: /* @__PURE__ */ l(A, {
3389
+ children: /* @__PURE__ */ u(N, {
2961
3390
  block: e,
2962
3391
  path: n
2963
3392
  })
2964
3393
  });
2965
3394
  }
2966
- function jt({ block: e, className: t }) {
2967
- let n = typeof e.text == "string" ? e.text : C(e, "markdown block");
2968
- return /* @__PURE__ */ l(L, {
3395
+ function en({ block: e, className: t }) {
3396
+ let n = typeof e.text == "string" ? e.text : E(e, "markdown block");
3397
+ return /* @__PURE__ */ u(R, {
2969
3398
  blockId: e.block_id,
2970
3399
  blockType: e.type,
2971
3400
  className: t,
2972
- children: /* @__PURE__ */ l(St, { markdown: n })
3401
+ children: /* @__PURE__ */ u(Gt, { markdown: n })
2973
3402
  });
2974
3403
  }
2975
- function Mt({ block: e, className: t }) {
2976
- return /* @__PURE__ */ l(L, {
3404
+ function tn({ block: e, className: t }) {
3405
+ return /* @__PURE__ */ u(R, {
2977
3406
  blockId: e.block_id,
2978
3407
  blockType: e.type,
2979
3408
  className: t,
2980
- children: /* @__PURE__ */ u("div", {
2981
- ...h(T.file),
2982
- children: [/* @__PURE__ */ l("span", {
3409
+ children: /* @__PURE__ */ d("div", {
3410
+ ...g(O.file),
3411
+ children: [/* @__PURE__ */ u("span", {
3412
+ ...g(O.iconSlot),
2983
3413
  "aria-hidden": "true",
2984
- children: "📎"
2985
- }), /* @__PURE__ */ u("div", { children: [/* @__PURE__ */ l("strong", { children: "Remote file" }), /* @__PURE__ */ l("div", {
2986
- ...h(T.smallText),
3414
+ children: /* @__PURE__ */ u(fe, { size: 20 })
3415
+ }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("strong", { children: "Remote file" }), /* @__PURE__ */ u("div", {
3416
+ ...g(O.smallText),
2987
3417
  children: e.external_id
2988
3418
  })] })]
2989
3419
  })
2990
3420
  });
2991
3421
  }
2992
- function Nt({ block: e, className: t }) {
2993
- let n = w(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = b(r) && typeof r.text == "string" ? r.text : C(e, "video"), a = e.description, o = b(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : C(e, "video"), d = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ u(c, { children: [d === void 0 ? null : /* @__PURE__ */ l("img", {
2994
- ...h(T.image, T.cardHero),
2995
- alt: s,
2996
- src: d
2997
- }), /* @__PURE__ */ u("div", {
2998
- ...h(T.cardContent),
3422
+ function nn({ block: e, className: t }) {
3423
+ let n = D(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = w(r) && typeof r.text == "string" ? r.text : E(e, "video"), a = e.description, o = w(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : E(e, "video"), c = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ d(l, { children: [c === void 0 ? null : /* @__PURE__ */ d("span", {
3424
+ ...g(O.videoThumbnail),
3425
+ children: [/* @__PURE__ */ u("img", {
3426
+ ...g(O.image, O.cardHero),
3427
+ alt: s,
3428
+ src: c
3429
+ }), /* @__PURE__ */ u("span", {
3430
+ ...g(O.videoPlayBadge),
3431
+ "aria-hidden": "true",
3432
+ children: /* @__PURE__ */ u(pe, { size: 20 })
3433
+ })]
3434
+ }), /* @__PURE__ */ d("div", {
3435
+ ...g(O.cardContent),
2999
3436
  children: [
3000
- /* @__PURE__ */ l("strong", { children: i }),
3437
+ /* @__PURE__ */ u("strong", { children: i }),
3001
3438
  o,
3002
- typeof e.provider_name == "string" ? /* @__PURE__ */ l("span", {
3003
- ...h(T.smallText),
3439
+ typeof e.provider_name == "string" ? /* @__PURE__ */ u("span", {
3440
+ ...g(O.smallText),
3004
3441
  children: e.provider_name
3005
3442
  }) : null
3006
3443
  ]
3007
3444
  })] });
3008
- return /* @__PURE__ */ l(L, {
3445
+ return /* @__PURE__ */ u(R, {
3009
3446
  blockId: e.block_id,
3010
3447
  blockType: e.type,
3011
3448
  className: t,
3012
- children: n === void 0 ? /* @__PURE__ */ l("div", {
3013
- ...h(T.card),
3449
+ children: n === void 0 ? /* @__PURE__ */ u("div", {
3450
+ ...g(O.card),
3014
3451
  "aria-label": s,
3015
3452
  children: f
3016
- }) : /* @__PURE__ */ l("a", {
3017
- ...h(T.card),
3453
+ }) : /* @__PURE__ */ u("a", {
3454
+ ...g(O.card),
3018
3455
  "aria-label": s,
3019
3456
  href: n,
3020
3457
  rel: "noreferrer",
@@ -3024,58 +3461,58 @@ function Nt({ block: e, className: t }) {
3024
3461
  }
3025
3462
  //#endregion
3026
3463
  //#region src/blocks/AdvancedBlocks.tsx
3027
- function Pt({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
3028
- let c = h(T.tableCell, i && T.tableHeader, r && T.tableCellFirstColumn, s && T.tableCellWrapped), u;
3029
- if (!b(t)) u = C(t, "table cell");
3464
+ function rn({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
3465
+ let c = g(O.tableCell, i && O.tableHeader, r && O.tableCellFirstColumn, s && O.tableCellWrapped), l;
3466
+ if (!w(t)) l = E(t, "table cell");
3030
3467
  else switch (t.type) {
3031
3468
  case "rich_text":
3032
- u = /* @__PURE__ */ l(A, {
3469
+ l = /* @__PURE__ */ u(N, {
3033
3470
  block: t,
3034
3471
  path: a
3035
3472
  });
3036
3473
  break;
3037
3474
  case "raw_number":
3038
- u = t.text ?? String(t.value);
3475
+ l = t.text ?? String(t.value);
3039
3476
  break;
3040
3477
  case "raw_text":
3041
- u = t.text;
3478
+ l = t.text;
3042
3479
  break;
3043
- default: u = C(t, "table cell");
3480
+ default: l = E(t, "table cell");
3044
3481
  }
3045
- return i ? /* @__PURE__ */ l("th", {
3482
+ return i ? /* @__PURE__ */ u("th", {
3046
3483
  ...c,
3047
- className: D(c.className, n),
3484
+ className: A(c.className, n),
3048
3485
  scope: o,
3049
3486
  style: { textAlign: e },
3050
- children: u
3051
- }) : /* @__PURE__ */ l("td", {
3487
+ children: l
3488
+ }) : /* @__PURE__ */ u("td", {
3052
3489
  ...c,
3053
- className: D(c.className, n),
3490
+ className: A(c.className, n),
3054
3491
  style: { textAlign: e },
3055
- children: u
3492
+ children: l
3056
3493
  });
3057
3494
  }
3058
- function Ft(e) {
3495
+ function an(e) {
3059
3496
  return Array.isArray(e);
3060
3497
  }
3061
- function It({ block: e, className: t, path: n = "block" }) {
3062
- let r = Array.isArray(e.rows) ? e.rows.filter(Ft) : [], i = e.column_settings;
3063
- return /* @__PURE__ */ l(L, {
3498
+ function on({ block: e, className: t, path: n = "block" }) {
3499
+ let r = Array.isArray(e.rows) ? e.rows.filter(an) : [], i = e.column_settings;
3500
+ return /* @__PURE__ */ u(R, {
3064
3501
  blockId: e.block_id,
3065
3502
  blockType: e.type,
3066
3503
  className: t,
3067
- children: /* @__PURE__ */ l("div", {
3068
- ...h(T.tableScroller),
3069
- children: /* @__PURE__ */ u("table", {
3070
- ...h(T.table),
3071
- children: [/* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ l(Pt, {
3504
+ children: /* @__PURE__ */ u("div", {
3505
+ ...g(O.tableScroller),
3506
+ children: /* @__PURE__ */ d("table", {
3507
+ ...g(O.table),
3508
+ children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ u(rn, {
3072
3509
  align: i?.[t]?.align,
3073
3510
  cell: e,
3074
3511
  firstColumn: t === 0,
3075
3512
  header: !0,
3076
3513
  path: `${n}.rows[0][${String(t)}]`,
3077
3514
  wrapped: i?.[t]?.is_wrapped
3078
- }, `header-${String(t)}`)) }) }), /* @__PURE__ */ l("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ l("tr", { children: e.map((e, r) => /* @__PURE__ */ l(Pt, {
3515
+ }, `header-${String(t)}`)) }) }), /* @__PURE__ */ u("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, r) => /* @__PURE__ */ u(rn, {
3079
3516
  align: i?.[r]?.align,
3080
3517
  cell: e,
3081
3518
  firstColumn: r === 0,
@@ -3086,21 +3523,21 @@ function It({ block: e, className: t, path: n = "block" }) {
3086
3523
  })
3087
3524
  });
3088
3525
  }
3089
- function Lt({ cell: e, path: t }) {
3090
- if (!b(e)) return C(e, "table cell");
3526
+ function sn({ cell: e, path: t }) {
3527
+ if (!w(e)) return E(e, "table cell");
3091
3528
  switch (e.type) {
3092
- case "rich_text": return /* @__PURE__ */ l(A, {
3529
+ case "rich_text": return /* @__PURE__ */ u(N, {
3093
3530
  block: e,
3094
3531
  path: t
3095
3532
  });
3096
3533
  case "raw_number": return e.text ?? String(e.value);
3097
3534
  case "raw_text": return e.text;
3098
- default: return C(e, "table cell");
3535
+ default: return E(e, "table cell");
3099
3536
  }
3100
3537
  }
3101
- function Rt(e) {
3538
+ function cn(e) {
3102
3539
  let t = e;
3103
- if (!b(t)) return "";
3540
+ if (!w(t)) return "";
3104
3541
  if (e.type === "raw_text") {
3105
3542
  let e = t.text;
3106
3543
  return typeof e == "string" ? e : "";
@@ -3117,128 +3554,117 @@ function Rt(e) {
3117
3554
  }
3118
3555
  return "";
3119
3556
  }
3120
- function zt({ block: e, className: n, path: r = "block" }) {
3121
- let i = e.page_size ?? 5, a = Number.isFinite(i) && i > 0 ? Math.max(1, Math.trunc(i)) : 5, o = Array.isArray(e.rows) ? e.rows.filter(Ft) : [], c = e.row_header_column_index ?? 0, d = typeof e.caption == "string" ? e.caption : void 0, [f, p] = s(0), [m, g] = s(""), ee = o[0] ?? [], _ = m.trim().toLowerCase(), v = _ === "" ? o.slice(1) : o.slice(1).filter((e) => e.some((e) => Rt(e).toLowerCase().includes(_))), y = Math.max(1, Math.ceil(v.length / a)), b = Math.min(f, y - 1), x = v.slice(b * a, (b + 1) * a), S = x.length - 1;
3122
- return /* @__PURE__ */ l(L, {
3557
+ function ln({ block: e, className: n, path: r = "block" }) {
3558
+ let i = e.page_size ?? 5, a = Number.isFinite(i) && i > 0 ? Math.max(1, Math.trunc(i)) : 5, o = Array.isArray(e.rows) ? e.rows.filter(an) : [], s = e.row_header_column_index ?? 0, l = typeof e.caption == "string" ? e.caption : void 0, [f, p] = c(0), [m, h] = c(""), _ = o[0] ?? [], v = m.trim().toLowerCase(), y = v === "" ? o.slice(1) : o.slice(1).filter((e) => e.some((e) => cn(e).toLowerCase().includes(v))), b = Math.max(1, Math.ceil(y.length / a)), x = Math.min(f, b - 1), S = y.slice(x * a, (x + 1) * a), C = S.length - 1;
3559
+ return /* @__PURE__ */ u(R, {
3123
3560
  blockId: e.block_id,
3124
3561
  blockType: e.type,
3125
3562
  className: n,
3126
- children: /* @__PURE__ */ u("div", {
3127
- ...h(T.dataTable),
3128
- children: [/* @__PURE__ */ u("div", {
3129
- ...h(T.dataTableHeaderBar),
3563
+ children: /* @__PURE__ */ d("div", {
3564
+ ...g(O.dataTable),
3565
+ children: [/* @__PURE__ */ d("div", {
3566
+ ...g(O.dataTableHeaderBar),
3130
3567
  children: [
3131
- /* @__PURE__ */ l("span", {
3132
- ...h(T.dataTableTitle),
3133
- children: d
3134
- }),
3135
3568
  /* @__PURE__ */ u("span", {
3136
- ...h(T.dataTableFilter),
3137
- children: [/* @__PURE__ */ l("span", {
3569
+ ...g(O.dataTableTitle),
3570
+ children: l
3571
+ }),
3572
+ /* @__PURE__ */ d("span", {
3573
+ ...g(O.dataTableFilter),
3574
+ children: [/* @__PURE__ */ u("span", {
3575
+ ...g(O.dataTableFilterIcon),
3138
3576
  "aria-hidden": "true",
3139
- children: "⌕"
3140
- }), /* @__PURE__ */ l("input", {
3141
- ...h(T.dataTableFilterInput),
3142
- "aria-label": d === void 0 ? "Filter table" : `Filter ${d}`,
3577
+ children: /* @__PURE__ */ u(he, { size: 13 })
3578
+ }), /* @__PURE__ */ u("input", {
3579
+ ...g(O.dataTableFilterInput),
3580
+ "aria-label": l === void 0 ? "Filter table" : `Filter ${l}`,
3143
3581
  onChange: (e) => {
3144
- g(e.target.value), p(0);
3582
+ h(e.target.value), p(0);
3145
3583
  },
3146
3584
  placeholder: "Filter table...",
3147
3585
  type: "text",
3148
3586
  value: m
3149
3587
  })]
3150
3588
  }),
3151
- /* @__PURE__ */ l("button", {
3152
- ...h(T.dataTableIconButton),
3153
- "aria-label": d === void 0 ? "Expand table" : `View ${d}`,
3589
+ /* @__PURE__ */ u("button", {
3590
+ ...g(O.dataTableIconButton),
3591
+ "aria-label": l === void 0 ? "Expand table" : `View ${l}`,
3154
3592
  type: "button",
3155
- children: /* @__PURE__ */ l("span", {
3156
- "aria-hidden": "true",
3157
- children: "⤢"
3158
- })
3593
+ children: /* @__PURE__ */ u(ce, { size: 18 })
3159
3594
  }),
3160
- /* @__PURE__ */ l("button", {
3161
- ...h(T.dataTableIconButton),
3595
+ /* @__PURE__ */ u("button", {
3596
+ ...g(O.dataTableIconButton),
3162
3597
  "aria-label": "More actions",
3163
3598
  type: "button",
3164
- children: /* @__PURE__ */ l("span", {
3165
- "aria-hidden": "true",
3166
- children: "⋮"
3167
- })
3599
+ children: /* @__PURE__ */ u(se, { size: 16 })
3168
3600
  })
3169
3601
  ]
3170
- }), /* @__PURE__ */ u("div", {
3171
- ...h(T.dataTableBand, y <= 1 && T.dataTableBandUnpaginated),
3172
- children: [/* @__PURE__ */ u("table", {
3173
- ...h(T.dataTableTable),
3602
+ }), /* @__PURE__ */ d("div", {
3603
+ ...g(O.dataTableBand, b <= 1 && O.dataTableBandUnpaginated),
3604
+ children: [/* @__PURE__ */ d("table", {
3605
+ ...g(O.dataTableTable),
3174
3606
  children: [
3175
- d === void 0 ? null : /* @__PURE__ */ l("caption", {
3176
- ...h(T.visuallyHidden),
3177
- children: d
3607
+ l === void 0 ? null : /* @__PURE__ */ u("caption", {
3608
+ ...g(O.visuallyHidden),
3609
+ children: l
3178
3610
  }),
3179
- /* @__PURE__ */ l("thead", { children: /* @__PURE__ */ l("tr", { children: ee.map((e, n) => /* @__PURE__ */ t("th", {
3180
- ...h(T.dataTableTh),
3611
+ /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: _.map((e, n) => /* @__PURE__ */ t("th", {
3612
+ ...g(O.dataTableTh),
3181
3613
  key: `header-${String(n)}`,
3182
3614
  scope: "col"
3183
- }, /* @__PURE__ */ l(Lt, {
3615
+ }, /* @__PURE__ */ u(sn, {
3184
3616
  cell: e,
3185
3617
  path: `${r}.rows[0][${String(n)}]`
3186
3618
  }))) }) }),
3187
- /* @__PURE__ */ l("tbody", { children: x.map((e, n) => {
3188
- let i = b * a + n + 1, o = e.length - 1;
3189
- return /* @__PURE__ */ l("tr", { children: e.map((e, a) => {
3190
- let s = h(T.dataTableTd, n === 0 && a === 0 && T.dataTableRadiusTopStart, n === 0 && a === o && T.dataTableRadiusTopEnd, n === S && a === 0 && T.dataTableRadiusBottomStart, n === S && a === o && T.dataTableRadiusBottomEnd), u = /* @__PURE__ */ l(Lt, {
3619
+ /* @__PURE__ */ u("tbody", { children: S.map((e, n) => {
3620
+ let i = x * a + n + 1, o = e.length - 1;
3621
+ return /* @__PURE__ */ u("tr", { children: e.map((e, a) => {
3622
+ let c = g(O.dataTableTd, n === 0 && a === 0 && O.dataTableRadiusTopStart, n === 0 && a === o && O.dataTableRadiusTopEnd, n === C && a === 0 && O.dataTableRadiusBottomStart, n === C && a === o && O.dataTableRadiusBottomEnd), l = /* @__PURE__ */ u(sn, {
3191
3623
  cell: e,
3192
3624
  path: `${r}.rows[${String(i)}][${String(a)}]`
3193
3625
  });
3194
- return a === c ? /* @__PURE__ */ t("th", {
3195
- ...s,
3626
+ return a === s ? /* @__PURE__ */ t("th", {
3627
+ ...c,
3196
3628
  key: `cell-${String(a)}`,
3197
3629
  scope: "row"
3198
- }, u) : /* @__PURE__ */ t("td", {
3199
- ...s,
3630
+ }, l) : /* @__PURE__ */ t("td", {
3631
+ ...c,
3200
3632
  key: `cell-${String(a)}`
3201
- }, u);
3633
+ }, l);
3202
3634
  }) }, `row-${String(i)}`);
3203
3635
  }) })
3204
3636
  ]
3205
- }), y <= 1 ? null : /* @__PURE__ */ u("div", {
3206
- ...h(T.dataTablePagination),
3637
+ }), b <= 1 ? null : /* @__PURE__ */ d("div", {
3638
+ ...g(O.dataTablePagination),
3207
3639
  children: [
3208
- /* @__PURE__ */ l("button", {
3209
- ...h(T.dataTablePageChevron),
3640
+ /* @__PURE__ */ u("button", {
3641
+ ...g(O.dataTablePageChevron),
3210
3642
  "aria-label": "Previous",
3211
- disabled: b === 0,
3643
+ disabled: x === 0,
3212
3644
  onClick: () => {
3213
3645
  p((e) => Math.max(0, e - 1));
3214
3646
  },
3215
3647
  type: "button",
3216
- children: /* @__PURE__ */ l("span", {
3217
- "aria-hidden": "true",
3218
- children: "‹"
3219
- })
3648
+ children: /* @__PURE__ */ u(te, { size: 14 })
3220
3649
  }),
3221
- Array.from({ length: y }, (e, n) => /* @__PURE__ */ t("button", {
3222
- ...h(T.dataTablePageButton, n === b && T.dataTablePageButtonActive),
3223
- "aria-current": n === b ? "page" : void 0,
3650
+ Array.from({ length: b }, (e, n) => /* @__PURE__ */ t("button", {
3651
+ ...g(O.dataTablePageButton, n === x && O.dataTablePageButtonActive),
3652
+ "aria-current": n === x ? "page" : void 0,
3224
3653
  key: `page-${String(n)}`,
3225
3654
  onClick: () => {
3226
3655
  p(n);
3227
3656
  },
3228
3657
  type: "button"
3229
3658
  }, n + 1)),
3230
- /* @__PURE__ */ l("button", {
3231
- ...h(T.dataTablePageChevron),
3659
+ /* @__PURE__ */ u("button", {
3660
+ ...g(O.dataTablePageChevron),
3232
3661
  "aria-label": "Next",
3233
- disabled: b === y - 1,
3662
+ disabled: x === b - 1,
3234
3663
  onClick: () => {
3235
- p((e) => Math.min(y - 1, e + 1));
3664
+ p((e) => Math.min(b - 1, e + 1));
3236
3665
  },
3237
3666
  type: "button",
3238
- children: /* @__PURE__ */ l("span", {
3239
- "aria-hidden": "true",
3240
- children: "›"
3241
- })
3667
+ children: /* @__PURE__ */ u(ne, { size: 14 })
3242
3668
  })
3243
3669
  ]
3244
3670
  })]
@@ -3246,135 +3672,143 @@ function zt({ block: e, className: n, path: r = "block" }) {
3246
3672
  })
3247
3673
  });
3248
3674
  }
3249
- function Bt({ block: e, className: t }) {
3675
+ function un({ name: e }) {
3676
+ let t = typeof e == "string" ? be[e] : void 0;
3677
+ return /* @__PURE__ */ u("span", {
3678
+ ...g(O.iconSlot),
3679
+ "aria-hidden": "true",
3680
+ "data-slack-icon": typeof e == "string" ? e : "unknown",
3681
+ children: u(t === void 0 ? le : t, { size: 24 })
3682
+ });
3683
+ }
3684
+ function dn({ block: e, className: t }) {
3250
3685
  let n = Array.isArray(e.actions) ? e.actions : void 0;
3251
- return /* @__PURE__ */ l(L, {
3686
+ return /* @__PURE__ */ u(R, {
3252
3687
  blockId: e.block_id,
3253
3688
  blockType: e.type,
3254
3689
  className: t,
3255
- children: /* @__PURE__ */ u("div", {
3256
- ...h(T.card),
3690
+ children: /* @__PURE__ */ d("div", {
3691
+ ...g(O.card),
3257
3692
  children: [
3258
- e.hero_image === void 0 ? null : /* @__PURE__ */ l(N, {
3693
+ e.hero_image === void 0 ? null : /* @__PURE__ */ u(F, {
3259
3694
  element: e.hero_image,
3260
3695
  variant: "cardHero"
3261
3696
  }),
3262
- /* @__PURE__ */ u("div", {
3263
- ...h(T.cardContent),
3697
+ /* @__PURE__ */ d("div", {
3698
+ ...g(O.cardContent),
3264
3699
  children: [
3265
- e.icon === void 0 && e.slack_icon === void 0 && e.title === void 0 && e.subtitle === void 0 ? null : /* @__PURE__ */ u("div", {
3266
- ...h(T.cardHeading),
3267
- children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ l("span", {
3268
- "aria-hidden": "true",
3269
- children: "◆"
3270
- }) : /* @__PURE__ */ l(N, {
3700
+ e.icon === void 0 && e.slack_icon === void 0 && e.title === void 0 && e.subtitle === void 0 ? null : /* @__PURE__ */ d("div", {
3701
+ ...g(O.cardHeading),
3702
+ children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ u(un, { name: w(e.slack_icon) ? e.slack_icon.name : void 0 }) : /* @__PURE__ */ u(F, {
3271
3703
  element: e.icon,
3272
3704
  variant: "cardIcon"
3273
- }), /* @__PURE__ */ u("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ l(F, {
3274
- className: h(T.cardTitle).className,
3705
+ }), /* @__PURE__ */ d("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3706
+ className: g(O.cardTitle).className,
3275
3707
  text: e.title
3276
- }), e.subtitle === void 0 ? null : /* @__PURE__ */ l(F, {
3277
- className: h(T.smallText).className,
3708
+ }), e.subtitle === void 0 ? null : /* @__PURE__ */ u(L, {
3709
+ className: g(O.smallText).className,
3278
3710
  text: e.subtitle
3279
3711
  })] })]
3280
3712
  }),
3281
- e.body === void 0 ? null : /* @__PURE__ */ l(F, { text: e.body }),
3282
- e.subtext === void 0 ? null : /* @__PURE__ */ l(F, {
3283
- className: h(T.smallText).className,
3713
+ e.body === void 0 ? null : /* @__PURE__ */ u(L, { text: e.body }),
3714
+ e.subtext === void 0 ? null : /* @__PURE__ */ u(L, {
3715
+ className: g(O.smallText).className,
3284
3716
  text: e.subtext
3285
3717
  })
3286
3718
  ]
3287
3719
  }),
3288
- n === void 0 ? null : /* @__PURE__ */ l("div", {
3289
- ...h(T.cardActions),
3290
- children: n.map((t, n) => /* @__PURE__ */ l(Ve, {
3720
+ n === void 0 ? null : /* @__PURE__ */ u("div", {
3721
+ ...g(O.cardActions),
3722
+ children: n.map((t, n) => /* @__PURE__ */ u(lt, {
3291
3723
  blockId: e.block_id,
3292
3724
  element: t
3293
- }, `${b(t) && typeof t.action_id == "string" ? t.action_id : "button"}-${String(n)}`))
3725
+ }, `${w(t) && typeof t.action_id == "string" ? t.action_id : "button"}-${String(n)}`))
3294
3726
  })
3295
3727
  ]
3296
3728
  })
3297
3729
  });
3298
3730
  }
3299
- function Vt(e) {
3300
- return b(e) && e.type === "card";
3731
+ function fn(e) {
3732
+ return w(e) && e.type === "card";
3301
3733
  }
3302
- function Ht({ block: e, className: n, path: r = "block" }) {
3734
+ function pn({ block: e, className: n, path: r = "block" }) {
3303
3735
  let i = e.elements;
3304
- return /* @__PURE__ */ l(L, {
3736
+ return /* @__PURE__ */ u(R, {
3305
3737
  blockId: e.block_id,
3306
3738
  blockType: e.type,
3307
3739
  className: n,
3308
- children: /* @__PURE__ */ l("div", {
3309
- ...h(T.carousel),
3310
- children: Array.isArray(i) ? i.map((e, n) => Vt(e) ? /* @__PURE__ */ l(Bt, {
3740
+ children: /* @__PURE__ */ u("div", {
3741
+ ...g(O.carousel),
3742
+ children: Array.isArray(i) ? i.map((e, n) => fn(e) ? /* @__PURE__ */ u(dn, {
3311
3743
  block: e,
3312
- className: h(T.carouselCard).className,
3744
+ className: g(O.carouselCard).className,
3313
3745
  path: `${r}.elements[${String(n)}]`
3314
- }, `${S(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3315
- ...h(T.unhandled),
3746
+ }, `${xe(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3747
+ ...g(O.unhandled),
3316
3748
  "data-unhandled-block": !0,
3317
3749
  key: `unknown-${String(n)}`
3318
- }, C(e, "carousel card"))) : null
3750
+ }, E(e, "carousel card"))) : null
3319
3751
  })
3320
3752
  });
3321
3753
  }
3322
- function Ut({ block: e, className: t }) {
3754
+ function mn({ block: e, className: t }) {
3323
3755
  let n = e.level ?? "default";
3324
- return /* @__PURE__ */ l(L, {
3756
+ return /* @__PURE__ */ u(R, {
3325
3757
  blockId: e.block_id,
3326
3758
  blockType: e.type,
3327
3759
  className: t,
3328
- children: /* @__PURE__ */ u("div", {
3329
- ...h(T.alert, n === "info" && T.alertInfo, n === "warning" && T.alertWarning, n === "error" && T.alertError, n === "success" && T.alertSuccess),
3330
- children: [/* @__PURE__ */ l("span", {
3760
+ children: /* @__PURE__ */ d("div", {
3761
+ ...g(O.alert, n === "info" && O.alertInfo, n === "warning" && O.alertWarning, n === "error" && O.alertError, n === "success" && O.alertSuccess),
3762
+ children: [/* @__PURE__ */ u("span", {
3763
+ ...g(O.iconSlot, O.alertIcon),
3331
3764
  "aria-hidden": "true",
3332
- children: n === "warning" ? "⚠" : n === "error" ? "!" : n === "success" ? "✓" : "i"
3333
- }), /* @__PURE__ */ l(F, { text: e.text })]
3765
+ children: u(n === "warning" || n === "error" ? ye : n === "success" ? ae : ue, { size: 20 })
3766
+ }), /* @__PURE__ */ u(L, { text: e.text })]
3334
3767
  })
3335
3768
  });
3336
3769
  }
3337
- function Wt({ block: e, className: n, path: r = "block" }) {
3338
- let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : C(e, "task");
3339
- return /* @__PURE__ */ l(L, {
3770
+ function hn({ block: e, className: n, path: r = "block" }) {
3771
+ let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : E(e, "task");
3772
+ return /* @__PURE__ */ u(R, {
3340
3773
  blockId: e.block_id,
3341
3774
  blockType: e.type,
3342
3775
  className: n,
3343
- children: /* @__PURE__ */ u("div", {
3344
- ...h(T.task),
3776
+ children: /* @__PURE__ */ d("div", {
3777
+ ...g(O.task),
3345
3778
  children: [
3346
- /* @__PURE__ */ u("div", {
3347
- ...h(T.taskHeading),
3779
+ /* @__PURE__ */ d("div", {
3780
+ ...g(O.taskHeading),
3348
3781
  children: [
3349
- /* @__PURE__ */ l("span", {
3782
+ /* @__PURE__ */ u("span", {
3783
+ ...g(O.iconSlot),
3350
3784
  "aria-hidden": "true",
3351
- children: a === "complete" ? "✓" : a === "error" ? "!" : a === "in_progress" ? "◌" : "○"
3785
+ children: u(a === "complete" ? ae : a === "error" ? ie : a === "in_progress" ? de : re, { size: 16 })
3352
3786
  }),
3353
- /* @__PURE__ */ l("span", { children: o }),
3354
- /* @__PURE__ */ l("span", {
3355
- ...h(T.taskStatus),
3787
+ /* @__PURE__ */ u("span", { children: o }),
3788
+ /* @__PURE__ */ u("span", {
3789
+ ...g(O.taskStatus),
3356
3790
  children: a
3357
3791
  })
3358
3792
  ]
3359
3793
  }),
3360
- e.details === void 0 ? null : /* @__PURE__ */ l(A, {
3794
+ e.details === void 0 ? null : /* @__PURE__ */ u(N, {
3361
3795
  block: e.details,
3362
3796
  path: `${r}.details`
3363
3797
  }),
3364
- e.output === void 0 ? null : /* @__PURE__ */ l(A, {
3798
+ e.output === void 0 ? null : /* @__PURE__ */ u(N, {
3365
3799
  block: e.output,
3366
3800
  path: `${r}.output`
3367
3801
  }),
3368
- Array.isArray(i) ? /* @__PURE__ */ l("div", {
3369
- ...h(T.context),
3802
+ Array.isArray(i) ? /* @__PURE__ */ u("div", {
3803
+ ...g(O.context),
3370
3804
  children: i.map((e, n) => {
3371
- if (!b(e)) return /* @__PURE__ */ t("span", {
3372
- ...h(T.unhandled),
3805
+ if (!w(e)) return /* @__PURE__ */ t("span", {
3806
+ ...g(O.unhandled),
3373
3807
  key: `unknown-${String(n)}`
3374
- }, C(e, "task source"));
3375
- let r = w(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : C(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
3376
- return r === void 0 ? /* @__PURE__ */ l("span", { children: i }, a) : /* @__PURE__ */ t("a", {
3377
- ...h(T.link),
3808
+ }, E(e, "task source"));
3809
+ let r = D(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : E(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
3810
+ return r === void 0 ? /* @__PURE__ */ u("span", { children: i }, a) : /* @__PURE__ */ t("a", {
3811
+ ...g(O.link),
3378
3812
  href: r,
3379
3813
  key: a,
3380
3814
  rel: "noreferrer"
@@ -3385,31 +3819,31 @@ function Wt({ block: e, className: n, path: r = "block" }) {
3385
3819
  })
3386
3820
  });
3387
3821
  }
3388
- function Gt(e) {
3389
- return b(e) && e.type === "task_card";
3822
+ function gn(e) {
3823
+ return w(e) && e.type === "task_card";
3390
3824
  }
3391
- function Kt({ block: e, className: n, path: r = "block" }) {
3392
- let i = e.tasks, a = typeof e.title == "string" ? e.title : C(e, "plan");
3393
- return /* @__PURE__ */ l(L, {
3825
+ function _n({ block: e, className: n, path: r = "block" }) {
3826
+ let i = e.tasks, a = typeof e.title == "string" ? e.title : E(e, "plan");
3827
+ return /* @__PURE__ */ u(R, {
3394
3828
  blockId: e.block_id,
3395
3829
  blockType: e.type,
3396
3830
  className: n,
3397
- children: /* @__PURE__ */ u("div", {
3398
- ...h(T.plan),
3399
- children: [/* @__PURE__ */ l("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => Gt(e) ? /* @__PURE__ */ l(Wt, {
3831
+ children: /* @__PURE__ */ d("div", {
3832
+ ...g(O.plan),
3833
+ children: [/* @__PURE__ */ u("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => gn(e) ? /* @__PURE__ */ u(hn, {
3400
3834
  block: e,
3401
3835
  path: `${r}.tasks[${String(n)}]`
3402
3836
  }, `${typeof e.task_id == "string" ? e.task_id : "task"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3403
- ...h(T.unhandled),
3837
+ ...g(O.unhandled),
3404
3838
  "data-unhandled-block": !0,
3405
3839
  key: `unknown-${String(n)}`
3406
- }, C(e, "plan task"))) : null]
3840
+ }, E(e, "plan task"))) : null]
3407
3841
  })
3408
3842
  });
3409
3843
  }
3410
3844
  //#endregion
3411
3845
  //#region src/constants.ts
3412
- var qt = 3e3, Jt = 3e3, Yt = 2e3, Xt = 3e3, Zt = 2e3, Qt = 2e3, $t = 12e3, en = 3e3, tn = 2e3, nn = 1e4, rn = 2e4, an = [
3846
+ var vn = 3e3, yn = 3e3, bn = 2e3, xn = 3e3, Sn = 2e3, Cn = 2e3, wn = 12e3, Tn = 3e3, En = 2e3, Dn = 1e4, On = 2e4, kn = [
3413
3847
  "actions",
3414
3848
  "alert",
3415
3849
  "card",
@@ -3431,9 +3865,9 @@ var qt = 3e3, Jt = 3e3, Yt = 2e3, Xt = 3e3, Zt = 2e3, Qt = 2e3, $t = 12e3, en =
3431
3865
  "table",
3432
3866
  "task_card",
3433
3867
  "video"
3434
- ], on = 554;
3435
- function sn() {
3436
- let [e, t] = s(on + 26), r = o(void 0), a = n((e) => {
3868
+ ], An = 554;
3869
+ function jn() {
3870
+ let [e, t] = c(An + 26), r = s(void 0), a = n((e) => {
3437
3871
  if (r.current?.disconnect(), r.current = void 0, e === null) return;
3438
3872
  let n = () => {
3439
3873
  let n = e.getBoundingClientRect().width;
@@ -3448,22 +3882,22 @@ function sn() {
3448
3882
  width: e
3449
3883
  };
3450
3884
  }
3451
- function cn(e, t) {
3885
+ function Mn(e, t) {
3452
3886
  let n = e / Math.max(1, t), r = 10 ** Math.floor(Math.log10(n)), i = n / r;
3453
3887
  return i >= Math.sqrt(50) ? r * 10 : i >= Math.sqrt(10) ? r * 5 : i >= Math.SQRT2 ? r * 2 : r;
3454
3888
  }
3455
- function ln(e, t) {
3456
- let n = Math.min(0, e), r = t > n ? t : n + 1, i = cn(r - n, 4), a = Math.floor(n / i), o = Math.ceil(r / i), s = [];
3889
+ function Nn(e, t) {
3890
+ let n = Math.min(0, e), r = t > n ? t : n + 1, i = Mn(r - n, 4), a = Math.floor(n / i), o = Math.ceil(r / i), s = [];
3457
3891
  for (let e = a; e <= o; e += 1) s.push(e * i);
3458
3892
  return s;
3459
3893
  }
3460
- function un(e) {
3894
+ function Pn(e) {
3461
3895
  return Math.ceil(e - .5) + .5;
3462
3896
  }
3463
- function dn(e, t) {
3897
+ function Fn(e, t) {
3464
3898
  let n = 0, r = 0;
3465
3899
  for (let e of t) n = Math.min(n, e), r = Math.max(r, e);
3466
- let i = ln(n, r), a = i[0] ?? 0, o = (i[i.length - 1] ?? 1) - a || 1;
3900
+ let i = Nn(n, r), a = i[0] ?? 0, o = (i[i.length - 1] ?? 1) - a || 1;
3467
3901
  return {
3468
3902
  plotLeft: 74,
3469
3903
  plotRight: e,
@@ -3472,14 +3906,14 @@ function dn(e, t) {
3472
3906
  y: (e) => 334 - (e - a) / o * 325
3473
3907
  };
3474
3908
  }
3475
- function fn(e) {
3476
- return ae[e % ae.length] ?? ie;
3909
+ function In(e) {
3910
+ return Ee[e % Ee.length] ?? Te;
3477
3911
  }
3478
- function pn(e, t) {
3912
+ function Ln(e, t) {
3479
3913
  let n = new Map(e.data.map((e) => [e.label, e]));
3480
3914
  return t.map((e) => n.get(e));
3481
3915
  }
3482
- function mn(e, t, n, r) {
3916
+ function Rn(e, t, n, r) {
3483
3917
  let i = Math.min(4, t / 2, Math.abs(r - n)), a = e, o = e + t;
3484
3918
  return [
3485
3919
  `M${String(a + i)} ${String(n)}`,
@@ -3492,7 +3926,7 @@ function mn(e, t, n, r) {
3492
3926
  "Z"
3493
3927
  ].join("");
3494
3928
  }
3495
- function hn(e) {
3929
+ function zn(e) {
3496
3930
  if (e.length === 0) return "";
3497
3931
  let t = e[0];
3498
3932
  if (t === void 0) return "";
@@ -3519,18 +3953,18 @@ function hn(e) {
3519
3953
  }
3520
3954
  return r.join("");
3521
3955
  }
3522
- function gn({ geometry: e }) {
3956
+ function Bn({ geometry: e }) {
3523
3957
  let { plotLeft: n, plotRight: r, ticks: i, y: a } = e;
3524
- return /* @__PURE__ */ u(c, { children: [i.map((e) => {
3525
- let i = un(a(e));
3958
+ return /* @__PURE__ */ d(l, { children: [i.map((e) => {
3959
+ let i = Pn(a(e));
3526
3960
  return /* @__PURE__ */ t("path", {
3527
- ...h(T.chartGridline),
3961
+ ...g(O.chartGridline),
3528
3962
  d: `M${String(n)} ${String(i)}L${String(r)} ${String(i)}`,
3529
3963
  fill: "none",
3530
3964
  key: `grid-${String(e)}`
3531
3965
  });
3532
3966
  }), i.map((e) => /* @__PURE__ */ t("text", {
3533
- ...h(T.chartTickText),
3967
+ ...g(O.chartTickText),
3534
3968
  dy: "0.32em",
3535
3969
  key: `tick-${String(e)}`,
3536
3970
  textAnchor: "end",
@@ -3538,35 +3972,35 @@ function gn({ geometry: e }) {
3538
3972
  y: a(e)
3539
3973
  }, e))] });
3540
3974
  }
3541
- function _n({ categories: e, tickX: n }) {
3542
- return /* @__PURE__ */ l(c, { children: e.map((e, r) => /* @__PURE__ */ t("text", {
3543
- ...h(T.chartTickText),
3975
+ function Vn({ categories: e, tickX: n }) {
3976
+ return /* @__PURE__ */ u(l, { children: e.map((e, r) => /* @__PURE__ */ t("text", {
3977
+ ...g(O.chartTickText),
3544
3978
  key: `${e}-${String(r)}`,
3545
3979
  textAnchor: "middle",
3546
3980
  x: n(r),
3547
3981
  y: 351
3548
3982
  }, e)) });
3549
3983
  }
3550
- function vn(e, t) {
3984
+ function Hn(e, t) {
3551
3985
  let n = e * Math.min(.155, Math.max(.075, .175 - .02 * t));
3552
3986
  return {
3553
3987
  barWidth: (e - 2 * n) / (1.1 * t - .1),
3554
3988
  outer: n
3555
3989
  };
3556
3990
  }
3557
- function yn({ chart: e, svgWidth: n, title: r }) {
3991
+ function Un({ chart: e, svgWidth: n, title: r }) {
3558
3992
  let i = e.axis_config.categories, a = e.series.map((e) => ({
3559
- points: pn(e, i),
3993
+ points: Ln(e, i),
3560
3994
  series: e
3561
- })), o = dn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: d } = o, f, p;
3995
+ })), o = Fn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: l } = o, f, p;
3562
3996
  if (e.type === "bar") {
3563
- let n = (c - s) / Math.max(1, i.length), { barWidth: r, outer: o } = vn(n, Math.max(1, e.series.length));
3997
+ let n = (c - s) / Math.max(1, i.length), { barWidth: r, outer: o } = Hn(n, Math.max(1, e.series.length));
3564
3998
  p = (e) => s + n * (e + .5), f = a.map(({ points: e, series: i }, a) => e.map((e, c) => {
3565
3999
  if (e === void 0) return null;
3566
- let l = s + c * n + o + 1.1 * r * a;
4000
+ let u = s + c * n + o + 1.1 * r * a;
3567
4001
  return /* @__PURE__ */ t("path", {
3568
- ...h(fn(a).fill),
3569
- d: mn(l, r, d(e.value), 334),
4002
+ ...g(In(a).fill),
4003
+ d: Rn(u, r, l(e.value), 334),
3570
4004
  "data-category": e.label,
3571
4005
  "data-series": i.name,
3572
4006
  key: `${i.name}-${String(a)}-${e.label}-${String(c)}`
@@ -3577,48 +4011,48 @@ function yn({ chart: e, svgWidth: n, title: r }) {
3577
4011
  p = n, f = a.map(({ points: t, series: r }, i) => {
3578
4012
  let a = t.flatMap((e, t) => e === void 0 ? [] : [{
3579
4013
  x: n(t),
3580
- y: d(e.value)
3581
- }]), o = hn(a);
4014
+ y: l(e.value)
4015
+ }]), o = zn(a);
3582
4016
  if (o === "") return null;
3583
4017
  let s = a[a.length - 1], c = a[0];
3584
- return /* @__PURE__ */ u("g", { children: [e.type === "area" && c !== void 0 && s !== void 0 ? /* @__PURE__ */ l("path", {
3585
- ...h(fn(i).tint, T.chartAreaFill, i >= 6 && T.chartAreaFallbackFill),
4018
+ return /* @__PURE__ */ d("g", { children: [e.type === "area" && c !== void 0 && s !== void 0 ? /* @__PURE__ */ u("path", {
4019
+ ...g(In(i).tint, O.chartAreaFill, i >= 6 && O.chartAreaFallbackFill),
3586
4020
  d: `${o}L${String(s.x)} 334L${String(c.x)} 334Z`,
3587
4021
  "data-series-area": r.name
3588
- }) : null, /* @__PURE__ */ l("path", {
3589
- ...h(fn(i).stroke, T.chartLinePath),
4022
+ }) : null, /* @__PURE__ */ u("path", {
4023
+ ...g(In(i).stroke, O.chartLinePath),
3590
4024
  d: o,
3591
4025
  "data-series": r.name,
3592
4026
  fill: "none"
3593
4027
  })] }, `${r.name}-${String(i)}`);
3594
4028
  });
3595
4029
  }
3596
- return /* @__PURE__ */ u("svg", {
3597
- ...h(T.chartSvg),
4030
+ return /* @__PURE__ */ d("svg", {
4031
+ ...g(O.chartSvg),
3598
4032
  "aria-label": r,
3599
4033
  height: 360,
3600
4034
  role: "img",
3601
4035
  width: n,
3602
4036
  children: [
3603
- /* @__PURE__ */ l(gn, { geometry: o }),
4037
+ /* @__PURE__ */ u(Bn, { geometry: o }),
3604
4038
  f,
3605
- /* @__PURE__ */ l(_n, {
4039
+ /* @__PURE__ */ u(Vn, {
3606
4040
  categories: i,
3607
4041
  tickX: p
3608
4042
  })
3609
4043
  ]
3610
4044
  });
3611
4045
  }
3612
- function bn(e, t, n, r) {
4046
+ function Wn(e, t, n, r) {
3613
4047
  return {
3614
4048
  x: e + n * Math.sin(r),
3615
4049
  y: t - n * Math.cos(r)
3616
4050
  };
3617
4051
  }
3618
- function xn({ chart: e, svgWidth: n, title: r }) {
4052
+ function Gn({ chart: e, svgWidth: n, title: r }) {
3619
4053
  let i = e.segments.map((e) => Number.isFinite(e.value) ? Math.max(0, e.value) : 0), a = i.reduce((e, t) => e + t, 0);
3620
- if (a <= 0) return /* @__PURE__ */ l("div", {
3621
- ...h(T.unhandled),
4054
+ if (a <= 0) return /* @__PURE__ */ u("div", {
4055
+ ...g(O.unhandled),
3622
4056
  "aria-label": `${r}: no chart data`,
3623
4057
  "data-empty-chart": !0,
3624
4058
  role: "img",
@@ -3627,16 +4061,16 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3627
4061
  let o = n / 2, s = 0, c = e.segments.map((e, n) => {
3628
4062
  let r = (i[n] ?? 0) / a, c = s * 2 * Math.PI;
3629
4063
  s += r;
3630
- let l = s * 2 * Math.PI, u = bn(o, 180, 144, c), d = bn(o, 180, 144, l), f = +(l - c > Math.PI), p = r >= 1 ? `M${String(o)} 36A144 144 0 1 1 ${String(o)} 324A144 144 0 1 1 ${String(o)} 36Z` : `M${String(u.x)} ${String(u.y)}A144 144 0 ${String(f)} 1 ${String(d.x)} ${String(d.y)}L${String(o)} 180Z`;
4064
+ let l = s * 2 * Math.PI, u = Wn(o, 180, 144, c), d = Wn(o, 180, 144, l), f = +(l - c > Math.PI), p = r >= 1 ? `M${String(o)} 36A144 144 0 1 1 ${String(o)} 324A144 144 0 1 1 ${String(o)} 36Z` : `M${String(u.x)} ${String(u.y)}A144 144 0 ${String(f)} 1 ${String(d.x)} ${String(d.y)}L${String(o)} 180Z`;
3631
4065
  return r <= 0 ? null : /* @__PURE__ */ t("path", {
3632
- ...h(fn(n).fill, T.pieSlice),
4066
+ ...g(In(n).fill, O.pieSlice),
3633
4067
  d: p,
3634
4068
  "data-segment": e.label,
3635
4069
  key: `${e.label}-${String(n)}`
3636
4070
  });
3637
4071
  });
3638
- return /* @__PURE__ */ l("svg", {
3639
- ...h(T.chartSvg),
4072
+ return /* @__PURE__ */ u("svg", {
4073
+ ...g(O.chartSvg),
3640
4074
  "aria-label": r,
3641
4075
  height: 360,
3642
4076
  role: "img",
@@ -3644,84 +4078,84 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3644
4078
  children: c
3645
4079
  });
3646
4080
  }
3647
- var Sn = {
4081
+ var Kn = {
3648
4082
  area: !0,
3649
4083
  bar: !0,
3650
4084
  line: !0
3651
4085
  };
3652
- function Cn(e) {
3653
- return b(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
4086
+ function qn(e) {
4087
+ return w(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
3654
4088
  }
3655
- function wn(e) {
3656
- return b(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
4089
+ function Jn(e) {
4090
+ return w(e) && typeof e.label == "string" && typeof e.value == "number" && Number.isFinite(e.value);
3657
4091
  }
3658
- function Tn(e) {
3659
- return b(e) && typeof e.name == "string" && Array.isArray(e.data) && e.data.every(wn);
4092
+ function Yn(e) {
4093
+ return w(e) && typeof e.name == "string" && Array.isArray(e.data) && e.data.every(Jn);
3660
4094
  }
3661
- function En(e) {
3662
- return b(e) && e.type === "pie" && Array.isArray(e.segments) && e.segments.every(Cn);
4095
+ function Xn(e) {
4096
+ return w(e) && e.type === "pie" && Array.isArray(e.segments) && e.segments.every(qn);
3663
4097
  }
3664
- function Dn(e) {
3665
- if (!b(e)) return !1;
4098
+ function Zn(e) {
4099
+ if (!w(e)) return !1;
3666
4100
  let t = e.type;
3667
- if (typeof t != "string" || !(t in Sn)) return !1;
4101
+ if (typeof t != "string" || !(t in Kn)) return !1;
3668
4102
  let n = e.axis_config;
3669
- return Array.isArray(e.series) && e.series.every(Tn) && b(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
3670
- }
3671
- function On({ block: e, className: n }) {
3672
- let r = e.chart, i = typeof e.title == "string" ? e.title : C(e, "chart"), { ref: a, width: o } = sn(), s = Math.min(624, Math.max(400, o)) - 26, c = Dn(r) ? r : void 0, d = c === void 0 && En(r) ? r : void 0, f, p;
3673
- d === void 0 ? c === void 0 ? (f = /* @__PURE__ */ l("div", {
3674
- ...h(T.unhandled),
3675
- "data-unhandled-chart-type": x(r) ?? "unknown",
3676
- children: C(r, "chart")
3677
- }), p = []) : (f = /* @__PURE__ */ l(yn, {
4103
+ return Array.isArray(e.series) && e.series.every(Yn) && w(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
4104
+ }
4105
+ function Qn({ block: e, className: n }) {
4106
+ let r = e.chart, i = typeof e.title == "string" ? e.title : E(e, "chart"), { ref: a, width: o } = jn(), s = Math.min(624, Math.max(400, o)) - 26, c = Zn(r) ? r : void 0, l = c === void 0 && Xn(r) ? r : void 0, f, p;
4107
+ l === void 0 ? c === void 0 ? (f = /* @__PURE__ */ u("div", {
4108
+ ...g(O.unhandled),
4109
+ "data-unhandled-chart-type": T(r) ?? "unknown",
4110
+ children: E(r, "chart")
4111
+ }), p = []) : (f = /* @__PURE__ */ u(Un, {
3678
4112
  chart: c,
3679
4113
  svgWidth: s,
3680
4114
  title: i
3681
- }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ l(xn, {
3682
- chart: d,
4115
+ }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ u(Gn, {
4116
+ chart: l,
3683
4117
  svgWidth: s,
3684
4118
  title: i
3685
- }), p = d.segments.map((e) => e.label));
3686
- let m = c?.axis_config.x_label, g = c?.axis_config.y_label;
3687
- return /* @__PURE__ */ l(L, {
4119
+ }), p = l.segments.map((e) => e.label));
4120
+ let m = c?.axis_config.x_label, h = c?.axis_config.y_label;
4121
+ return /* @__PURE__ */ u(R, {
3688
4122
  blockId: e.block_id,
3689
4123
  blockType: e.type,
3690
4124
  className: n,
3691
- children: /* @__PURE__ */ l("div", {
3692
- ...h(T.chartScroller),
3693
- children: /* @__PURE__ */ l("div", {
3694
- ...h(T.chartCard),
4125
+ children: /* @__PURE__ */ u("div", {
4126
+ ...g(O.chartScroller),
4127
+ children: /* @__PURE__ */ u("div", {
4128
+ ...g(O.chartCard),
3695
4129
  ref: a,
3696
- children: /* @__PURE__ */ u("div", {
3697
- ...h(T.chartContent),
3698
- children: [/* @__PURE__ */ l("h3", {
3699
- ...h(T.chartTitle),
4130
+ children: /* @__PURE__ */ d("div", {
4131
+ ...g(O.chartContent),
4132
+ children: [/* @__PURE__ */ u("h3", {
4133
+ ...g(O.chartTitle),
3700
4134
  children: i
3701
- }), /* @__PURE__ */ u("div", {
3702
- ...h(T.chartPlotArea),
4135
+ }), /* @__PURE__ */ d("div", {
4136
+ ...g(O.chartPlotArea),
3703
4137
  children: [
3704
- /* @__PURE__ */ u("div", {
3705
- ...h(T.chartCanvas),
3706
- children: [f, g === void 0 ? null : /* @__PURE__ */ l("div", {
3707
- ...h(T.chartYAxisLabel),
3708
- children: /* @__PURE__ */ l("span", {
3709
- ...h(T.chartYAxisLabelText),
3710
- children: g
4138
+ /* @__PURE__ */ d("div", {
4139
+ ...g(O.chartCanvas),
4140
+ children: [f, h === void 0 ? null : /* @__PURE__ */ u("div", {
4141
+ ...g(O.chartYAxisLabel),
4142
+ children: /* @__PURE__ */ u("span", {
4143
+ ...g(O.chartYAxisLabelText),
4144
+ children: h
3711
4145
  })
3712
4146
  })]
3713
4147
  }),
3714
- c === void 0 ? null : /* @__PURE__ */ l("div", {
3715
- ...h(T.chartXAxisLabel),
4148
+ c === void 0 ? null : /* @__PURE__ */ u("div", {
4149
+ ...g(O.chartXAxisLabel),
3716
4150
  children: m
3717
4151
  }),
3718
- p.length === 0 ? null : /* @__PURE__ */ l("div", {
3719
- ...h(T.chartLegend, c !== void 0 && T.chartLegendCartesian),
4152
+ p.length === 0 ? null : /* @__PURE__ */ u("div", {
4153
+ ...g(O.chartLegend, c !== void 0 && O.chartLegendCartesian),
3720
4154
  children: p.map((e, n) => /* @__PURE__ */ t("span", {
3721
- ...h(T.chartLegendItem),
4155
+ ...g(O.chartLegendItem),
3722
4156
  key: `${e}-${String(n)}`
3723
- }, /* @__PURE__ */ l("span", {
3724
- ...h(T.chartLegendSwatch, fn(n).swatch),
4157
+ }, /* @__PURE__ */ u("span", {
4158
+ ...g(O.chartLegendSwatch, In(n).swatch),
3725
4159
  "aria-hidden": "true"
3726
4160
  }), e))
3727
4161
  })
@@ -3734,254 +4168,260 @@ function On({ block: e, className: n }) {
3734
4168
  }
3735
4169
  //#endregion
3736
4170
  //#region src/blocks/InteractiveBlocks.tsx
3737
- function kn(e) {
3738
- return b(e) && b(e.text) && typeof e.text.text == "string";
4171
+ function $n(e) {
4172
+ return w(e) && w(e.text) && typeof e.text.text == "string";
3739
4173
  }
3740
- function An(e) {
3741
- return b(e) && e.type === "feedback_buttons" && kn(e.positive_button) && kn(e.negative_button);
4174
+ function er(e) {
4175
+ return w(e) && e.type === "feedback_buttons" && $n(e.positive_button) && $n(e.negative_button);
3742
4176
  }
3743
- function jn(e) {
3744
- return b(e) && e.type === "icon_button" && kn(e);
4177
+ function tr(e) {
4178
+ return w(e) && e.type === "icon_button" && $n(e);
3745
4179
  }
3746
- function Mn({ block: e, className: t, path: n = "block" }) {
3747
- let r = h(T.block, T.actions), i = Array.isArray(e.elements) ? e.elements : [];
3748
- return /* @__PURE__ */ l("div", {
4180
+ function nr({ block: e, className: t, path: n = "block" }) {
4181
+ let r = g(O.block, O.actions), i = Array.isArray(e.elements) ? e.elements : [];
4182
+ return /* @__PURE__ */ u("div", {
3749
4183
  ...r,
3750
- className: D(r.className, t),
4184
+ className: A(r.className, t),
3751
4185
  "data-block-id": e.block_id,
3752
4186
  "data-block-type": e.type,
3753
- children: i.map((t, r) => /* @__PURE__ */ l(at, {
4187
+ children: i.map((t, r) => /* @__PURE__ */ u(Dt, {
3754
4188
  blockId: e.block_id,
3755
4189
  element: t,
3756
4190
  path: `${n}.elements[${String(r)}]`
3757
- }, `${x(t) ?? "unknown"}-${b(t) && typeof t.action_id == "string" ? t.action_id : "action"}-${String(r)}`))
4191
+ }, `${T(t) ?? "unknown"}-${w(t) && typeof t.action_id == "string" ? t.action_id : "action"}-${String(r)}`))
3758
4192
  });
3759
4193
  }
3760
- function Nn({ block: e, className: t, path: n = "block" }) {
3761
- let r = h(T.block, T.inputBlock), i = e.label;
3762
- return /* @__PURE__ */ u("div", {
4194
+ function rr({ block: e, className: t, path: n = "block" }) {
4195
+ let r = g(O.block, O.inputBlock), i = e.label;
4196
+ return /* @__PURE__ */ d("div", {
3763
4197
  ...r,
3764
- className: D(r.className, t),
4198
+ className: A(r.className, t),
3765
4199
  "data-block-id": e.block_id,
3766
4200
  "data-block-type": e.type,
3767
4201
  children: [
3768
- /* @__PURE__ */ u("div", {
3769
- ...h(T.inputLabel),
3770
- children: [b(i) && typeof i.text == "string" ? i.text : C(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ l("span", {
3771
- ...h(T.required),
4202
+ /* @__PURE__ */ d("div", {
4203
+ ...g(O.inputLabel),
4204
+ children: [w(i) && typeof i.text == "string" ? i.text : E(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ u("span", {
4205
+ ...g(O.required),
3772
4206
  "aria-hidden": "true",
3773
4207
  children: "*"
3774
4208
  })]
3775
4209
  }),
3776
- /* @__PURE__ */ l(at, {
4210
+ /* @__PURE__ */ u(Dt, {
3777
4211
  blockId: e.block_id,
3778
4212
  element: e.element,
3779
4213
  path: `${n}.element`
3780
4214
  }),
3781
- e.hint === void 0 ? null : /* @__PURE__ */ l("div", {
3782
- ...h(T.smallText),
3783
- children: b(e.hint) && typeof e.hint.text == "string" ? e.hint.text : C(e.hint, "input hint")
4215
+ e.hint === void 0 ? null : /* @__PURE__ */ u("div", {
4216
+ ...g(O.smallText),
4217
+ children: w(e.hint) && typeof e.hint.text == "string" ? e.hint.text : E(e.hint, "input hint")
3784
4218
  })
3785
4219
  ]
3786
4220
  });
3787
4221
  }
3788
- function Pn(e, t) {
4222
+ function ir(e, t) {
3789
4223
  return t === "positive" ? e.positive_button.text.text : e.negative_button.text.text;
3790
4224
  }
3791
- function Fn({ block: e, className: n }) {
3792
- let { onAction: r } = y(), i = h(T.block, T.actions), a = e.elements;
3793
- return /* @__PURE__ */ l("div", {
4225
+ function ar({ block: e, className: n }) {
4226
+ let { onAction: r } = x(), i = g(O.block, O.actions), a = e.elements;
4227
+ return /* @__PURE__ */ u("div", {
3794
4228
  ...i,
3795
- className: D(i.className, n),
4229
+ className: A(i.className, n),
3796
4230
  "data-block-id": e.block_id,
3797
4231
  "data-block-type": e.type,
3798
- children: Array.isArray(a) ? a.map((n, i) => jn(n) ? /* @__PURE__ */ t("button", {
3799
- ...h(T.button, T.iconButton),
3800
- "aria-label": n.accessibility_label ?? n.text.text,
3801
- key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
3802
- onClick: () => {
3803
- n.action_id !== void 0 && r?.({
3804
- actionId: n.action_id,
3805
- type: n.type,
3806
- ...e.block_id === void 0 ? {} : { blockId: e.block_id },
3807
- ...n.value === void 0 ? {} : { value: n.value }
3808
- });
3809
- },
3810
- title: n.text.text,
3811
- type: "button"
3812
- }, n.icon === "trash" ? "⌫" : n.icon) : An(n) ? /* @__PURE__ */ t("div", {
3813
- ...h(T.actions),
3814
- key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
3815
- }, /* @__PURE__ */ l("button", {
3816
- ...h(T.button, T.iconButton),
3817
- "aria-label": Pn(n, "positive"),
3818
- onClick: () => {
3819
- n.action_id !== void 0 && r?.({
3820
- actionId: n.action_id,
3821
- type: n.type,
3822
- value: n.positive_button.value,
3823
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3824
- });
3825
- },
3826
- type: "button",
3827
- children: "👍"
3828
- }), /* @__PURE__ */ l("button", {
3829
- ...h(T.button, T.iconButton),
3830
- "aria-label": Pn(n, "negative"),
3831
- onClick: () => {
3832
- n.action_id !== void 0 && r?.({
3833
- actionId: n.action_id,
3834
- type: n.type,
3835
- value: n.negative_button.value,
3836
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3837
- });
3838
- },
3839
- type: "button",
3840
- children: "👎"
3841
- })) : /* @__PURE__ */ t("div", {
3842
- ...h(T.unhandled),
3843
- "data-unhandled-element": x(n) ?? "unknown",
3844
- key: `unhandled-${String(i)}`
3845
- }, C(n, "context action"))) : /* @__PURE__ */ l("div", {
3846
- ...h(T.unhandled),
4232
+ children: Array.isArray(a) ? a.map((n, i) => {
4233
+ if (tr(n)) {
4234
+ let a = g(O.button, O.iconButton), o = be[n.icon];
4235
+ return /* @__PURE__ */ t("button", {
4236
+ ...a,
4237
+ "aria-label": n.accessibility_label ?? n.text.text,
4238
+ key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
4239
+ onClick: () => {
4240
+ n.action_id !== void 0 && r?.({
4241
+ actionId: n.action_id,
4242
+ type: n.type,
4243
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id },
4244
+ ...n.value === void 0 ? {} : { value: n.value }
4245
+ });
4246
+ },
4247
+ title: n.text.text,
4248
+ type: "button"
4249
+ }, o === void 0 ? n.icon : /* @__PURE__ */ u(o, { size: 16 }));
4250
+ }
4251
+ return er(n) ? /* @__PURE__ */ t("div", {
4252
+ ...g(O.actions),
4253
+ key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
4254
+ }, /* @__PURE__ */ u("button", {
4255
+ ...g(O.button, O.iconButton),
4256
+ "aria-label": ir(n, "positive"),
4257
+ onClick: () => {
4258
+ n.action_id !== void 0 && r?.({
4259
+ actionId: n.action_id,
4260
+ type: n.type,
4261
+ value: n.positive_button.value,
4262
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id }
4263
+ });
4264
+ },
4265
+ type: "button",
4266
+ children: /* @__PURE__ */ u(_e, { size: 16 })
4267
+ }), /* @__PURE__ */ u("button", {
4268
+ ...g(O.button, O.iconButton),
4269
+ "aria-label": ir(n, "negative"),
4270
+ onClick: () => {
4271
+ n.action_id !== void 0 && r?.({
4272
+ actionId: n.action_id,
4273
+ type: n.type,
4274
+ value: n.negative_button.value,
4275
+ ...e.block_id === void 0 ? {} : { blockId: e.block_id }
4276
+ });
4277
+ },
4278
+ type: "button",
4279
+ children: /* @__PURE__ */ u(ge, { size: 16 })
4280
+ })) : /* @__PURE__ */ t("div", {
4281
+ ...g(O.unhandled),
4282
+ "data-unhandled-element": T(n) ?? "unknown",
4283
+ key: `unhandled-${String(i)}`
4284
+ }, E(n, "context action"));
4285
+ }) : /* @__PURE__ */ u("div", {
4286
+ ...g(O.unhandled),
3847
4287
  "data-unhandled-element": "context_actions",
3848
- children: C(e, "context actions block")
4288
+ children: E(e, "context actions block")
3849
4289
  })
3850
4290
  });
3851
4291
  }
3852
4292
  //#endregion
3853
4293
  //#region src/Block.tsx
3854
- var In = new Set(an);
3855
- function Ln(e) {
3856
- let t = x(e);
3857
- return t !== void 0 && In.has(t);
3858
- }
3859
- function Rn({ block: e, className: t, path: n = "block" }) {
3860
- let r = x(e);
3861
- if (!Ln(e)) {
3862
- let n = h(T.block, T.unhandled);
3863
- return /* @__PURE__ */ l("div", {
4294
+ var or = new Set(kn);
4295
+ function sr(e) {
4296
+ let t = T(e);
4297
+ return t !== void 0 && or.has(t);
4298
+ }
4299
+ function cr({ block: e, className: t, path: n = "block" }) {
4300
+ let r = T(e);
4301
+ if (!sr(e)) {
4302
+ let n = g(O.block, O.unhandled);
4303
+ return /* @__PURE__ */ u("div", {
3864
4304
  ...n,
3865
- className: D(n.className, t),
4305
+ className: A(n.className, t),
3866
4306
  "data-block-type": r ?? "unknown",
3867
4307
  "data-unhandled-block": !0,
3868
4308
  role: "note",
3869
- children: C(e, "Slack block")
4309
+ children: E(e, "Slack block")
3870
4310
  });
3871
4311
  }
3872
4312
  switch (e.type) {
3873
- case "actions": return /* @__PURE__ */ l(Mn, {
4313
+ case "actions": return /* @__PURE__ */ u(nr, {
3874
4314
  block: e,
3875
4315
  className: t,
3876
4316
  path: n
3877
4317
  });
3878
- case "alert": return /* @__PURE__ */ l(Ut, {
4318
+ case "alert": return /* @__PURE__ */ u(mn, {
3879
4319
  block: e,
3880
4320
  className: t,
3881
4321
  path: n
3882
4322
  });
3883
- case "card": return /* @__PURE__ */ l(Bt, {
4323
+ case "card": return /* @__PURE__ */ u(dn, {
3884
4324
  block: e,
3885
4325
  className: t,
3886
4326
  path: n
3887
4327
  });
3888
- case "carousel": return /* @__PURE__ */ l(Ht, {
4328
+ case "carousel": return /* @__PURE__ */ u(pn, {
3889
4329
  block: e,
3890
4330
  className: t,
3891
4331
  path: n
3892
4332
  });
3893
- case "container": return /* @__PURE__ */ l(Wn, {
4333
+ case "container": return /* @__PURE__ */ u(mr, {
3894
4334
  block: e,
3895
4335
  className: t,
3896
4336
  path: n
3897
4337
  });
3898
- case "context": return /* @__PURE__ */ l(kt, {
4338
+ case "context": return /* @__PURE__ */ u(Qt, {
3899
4339
  block: e,
3900
4340
  className: t,
3901
4341
  path: n
3902
4342
  });
3903
- case "context_actions": return /* @__PURE__ */ l(Fn, {
4343
+ case "context_actions": return /* @__PURE__ */ u(ar, {
3904
4344
  block: e,
3905
4345
  className: t,
3906
4346
  path: n
3907
4347
  });
3908
- case "data_table": return /* @__PURE__ */ l(zt, {
4348
+ case "data_table": return /* @__PURE__ */ u(ln, {
3909
4349
  block: e,
3910
4350
  className: t,
3911
4351
  path: n
3912
4352
  });
3913
- case "data_visualization": return /* @__PURE__ */ l(On, {
4353
+ case "data_visualization": return /* @__PURE__ */ u(Qn, {
3914
4354
  block: e,
3915
4355
  className: t,
3916
4356
  path: n
3917
4357
  });
3918
- case "divider": return /* @__PURE__ */ l(Et, {
4358
+ case "divider": return /* @__PURE__ */ u(Yt, {
3919
4359
  block: e,
3920
4360
  className: t,
3921
4361
  path: n
3922
4362
  });
3923
- case "file": return /* @__PURE__ */ l(Mt, {
4363
+ case "file": return /* @__PURE__ */ u(tn, {
3924
4364
  block: e,
3925
4365
  className: t,
3926
4366
  path: n
3927
4367
  });
3928
- case "header": return /* @__PURE__ */ l(Tt, {
4368
+ case "header": return /* @__PURE__ */ u(Jt, {
3929
4369
  block: e,
3930
4370
  className: t,
3931
4371
  path: n
3932
4372
  });
3933
- case "image": return /* @__PURE__ */ l(Dt, {
4373
+ case "image": return /* @__PURE__ */ u(Xt, {
3934
4374
  block: e,
3935
4375
  className: t,
3936
4376
  path: n
3937
4377
  });
3938
- case "input": return /* @__PURE__ */ l(Nn, {
4378
+ case "input": return /* @__PURE__ */ u(rr, {
3939
4379
  block: e,
3940
4380
  className: t,
3941
4381
  path: n
3942
4382
  });
3943
- case "markdown": return /* @__PURE__ */ l(jt, {
4383
+ case "markdown": return /* @__PURE__ */ u(en, {
3944
4384
  block: e,
3945
4385
  className: t,
3946
4386
  path: n
3947
4387
  });
3948
- case "plan": return /* @__PURE__ */ l(Kt, {
4388
+ case "plan": return /* @__PURE__ */ u(_n, {
3949
4389
  block: e,
3950
4390
  className: t,
3951
4391
  path: n
3952
4392
  });
3953
- case "rich_text": return /* @__PURE__ */ l(At, {
4393
+ case "rich_text": return /* @__PURE__ */ u($t, {
3954
4394
  block: e,
3955
4395
  className: t,
3956
4396
  path: n
3957
4397
  });
3958
- case "section": return /* @__PURE__ */ l(wt, {
4398
+ case "section": return /* @__PURE__ */ u(qt, {
3959
4399
  block: e,
3960
4400
  className: t,
3961
4401
  path: n
3962
4402
  });
3963
- case "table": return /* @__PURE__ */ l(It, {
4403
+ case "table": return /* @__PURE__ */ u(on, {
3964
4404
  block: e,
3965
4405
  className: t,
3966
4406
  path: n
3967
4407
  });
3968
- case "task_card": return /* @__PURE__ */ l(Wt, {
4408
+ case "task_card": return /* @__PURE__ */ u(hn, {
3969
4409
  block: e,
3970
4410
  className: t,
3971
4411
  path: n
3972
4412
  });
3973
- case "video": return /* @__PURE__ */ l(Nt, {
4413
+ case "video": return /* @__PURE__ */ u(nn, {
3974
4414
  block: e,
3975
4415
  className: t,
3976
4416
  path: n
3977
4417
  });
3978
- default: return g(e);
4418
+ default: return _(e);
3979
4419
  }
3980
4420
  }
3981
- function zn(e) {
3982
- return /* @__PURE__ */ l(Rn, { ...e });
4421
+ function lr(e) {
4422
+ return /* @__PURE__ */ u(cr, { ...e });
3983
4423
  }
3984
- var Bn = {
4424
+ var ur = {
3985
4425
  actions: !0,
3986
4426
  context: !0,
3987
4427
  divider: !0,
@@ -3994,65 +4434,70 @@ var Bn = {
3994
4434
  table: !0,
3995
4435
  video: !0
3996
4436
  };
3997
- function Vn(e) {
3998
- let t = x(e);
3999
- return t !== void 0 && t in Bn;
4437
+ function dr(e) {
4438
+ let t = T(e);
4439
+ return t !== void 0 && t in ur;
4000
4440
  }
4001
- function Hn({ block: e, path: t }) {
4441
+ function fr({ block: e, path: t }) {
4002
4442
  let n = e.title, r = e.subtitle;
4003
- return /* @__PURE__ */ u(c, { children: [e.icon === void 0 ? null : /* @__PURE__ */ l(N, {
4443
+ return /* @__PURE__ */ d(l, { children: [e.icon === void 0 ? null : /* @__PURE__ */ u(F, {
4004
4444
  element: e.icon,
4005
4445
  variant: "cardIcon"
4006
- }), /* @__PURE__ */ u("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ l("strong", { children: b(n) && typeof n.text == "string" ? n.text : C(n, "container title") }) : /* @__PURE__ */ l(A, {
4446
+ }), /* @__PURE__ */ d("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ u("strong", { children: w(n) && typeof n.text == "string" ? n.text : E(n, "container title") }) : /* @__PURE__ */ u(N, {
4007
4447
  block: e.rich_text_title,
4008
4448
  path: `${t}.rich_text_title`
4009
- }), e.subtitle === void 0 ? null : /* @__PURE__ */ l("div", {
4010
- ...h(T.smallText),
4011
- children: b(r) && typeof r.text == "string" ? r.text : C(r, "container subtitle")
4449
+ }), e.subtitle === void 0 ? null : /* @__PURE__ */ u("div", {
4450
+ ...g(O.smallText),
4451
+ children: w(r) && typeof r.text == "string" ? r.text : E(r, "container subtitle")
4012
4452
  })] })] });
4013
4453
  }
4014
- function Un({ block: e, path: n }) {
4454
+ function pr({ block: e, path: n }) {
4015
4455
  let r = e.child_blocks;
4016
- return /* @__PURE__ */ l("div", {
4017
- ...h(T.containerBody),
4018
- children: Array.isArray(r) ? r.map((e, r) => Vn(e) ? /* @__PURE__ */ l(Rn, {
4456
+ return /* @__PURE__ */ u("div", {
4457
+ ...g(O.containerBody),
4458
+ children: Array.isArray(r) ? r.map((e, r) => dr(e) ? /* @__PURE__ */ u(cr, {
4019
4459
  block: e,
4020
4460
  path: `${n}.child_blocks[${String(r)}]`
4021
- }, `${x(e) ?? "unknown"}-${S(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
4022
- ...h(T.unhandled),
4023
- "data-block-type": x(e) ?? "unknown",
4461
+ }, `${T(e) ?? "unknown"}-${xe(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
4462
+ ...g(O.unhandled),
4463
+ "data-block-type": T(e) ?? "unknown",
4024
4464
  "data-unhandled-block": !0,
4025
4465
  key: `unknown-${String(r)}`
4026
- }, C(e, "Slack block"))) : null
4466
+ }, E(e, "Slack block"))) : null
4027
4467
  });
4028
4468
  }
4029
- function Wn({ block: e, className: t, path: n = "block" }) {
4030
- return /* @__PURE__ */ l(L, {
4469
+ function mr({ block: e, className: t, path: n = "block" }) {
4470
+ return /* @__PURE__ */ u(R, {
4031
4471
  blockId: e.block_id,
4032
4472
  blockType: e.type,
4033
4473
  className: t,
4034
- children: e.is_collapsible === !0 ? /* @__PURE__ */ u("details", {
4035
- ...h(T.container),
4474
+ children: e.is_collapsible === !0 ? /* @__PURE__ */ d("details", {
4475
+ ...g(O.container),
4036
4476
  open: e.default_collapsed !== !0,
4037
- children: [/* @__PURE__ */ l("summary", {
4038
- ...h(T.containerHeader, e.has_header_divider === !0 && T.containerHeaderDivider),
4039
- children: /* @__PURE__ */ l(Hn, {
4477
+ children: [/* @__PURE__ */ d("summary", {
4478
+ ...g(O.containerHeader, e.has_header_divider === !0 && O.containerHeaderDivider),
4479
+ children: [/* @__PURE__ */ u("span", {
4480
+ ...g(O.containerChevron),
4481
+ "aria-hidden": "true",
4482
+ "data-container-chevron": !0,
4483
+ children: /* @__PURE__ */ u(ne, { size: 16 })
4484
+ }), /* @__PURE__ */ u(fr, {
4040
4485
  block: e,
4041
4486
  path: n
4042
- })
4043
- }), /* @__PURE__ */ l(Un, {
4487
+ })]
4488
+ }), /* @__PURE__ */ u(pr, {
4044
4489
  block: e,
4045
4490
  path: n
4046
4491
  })]
4047
- }) : /* @__PURE__ */ u("div", {
4048
- ...h(T.container),
4049
- children: [/* @__PURE__ */ l("div", {
4050
- ...h(T.containerHeader, e.has_header_divider === !0 && T.containerHeaderDivider),
4051
- children: /* @__PURE__ */ l(Hn, {
4492
+ }) : /* @__PURE__ */ d("div", {
4493
+ ...g(O.container),
4494
+ children: [/* @__PURE__ */ u("div", {
4495
+ ...g(O.containerHeader, e.has_header_divider === !0 && O.containerHeaderDivider),
4496
+ children: /* @__PURE__ */ u(fr, {
4052
4497
  block: e,
4053
4498
  path: n
4054
4499
  })
4055
- }), /* @__PURE__ */ l(Un, {
4500
+ }), /* @__PURE__ */ u(pr, {
4056
4501
  block: e,
4057
4502
  path: n
4058
4503
  })]
@@ -4061,7 +4506,7 @@ function Wn({ block: e, className: t, path: n = "block" }) {
4061
4506
  }
4062
4507
  //#endregion
4063
4508
  //#region src/errors.ts
4064
- var Gn = class extends Error {
4509
+ var hr = class extends Error {
4065
4510
  code;
4066
4511
  path;
4067
4512
  name;
@@ -4071,12 +4516,12 @@ var Gn = class extends Error {
4071
4516
  };
4072
4517
  //#endregion
4073
4518
  //#region src/BlockKit.tsx
4074
- function Kn(e) {
4519
+ function gr(e) {
4075
4520
  let t = e;
4076
4521
  if (typeof e == "string") try {
4077
4522
  t = JSON.parse(e);
4078
4523
  } catch {
4079
- throw new Gn("data: expected valid JSON", {
4524
+ throw new hr("data: expected valid JSON", {
4080
4525
  code: "invalid_json",
4081
4526
  path: "data"
4082
4527
  });
@@ -4084,7 +4529,7 @@ function Kn(e) {
4084
4529
  return Array.isArray(t) ? {
4085
4530
  blockListPath: "data",
4086
4531
  blocks: t
4087
- } : b(t) && Array.isArray(t.blocks) ? {
4532
+ } : w(t) && Array.isArray(t.blocks) ? {
4088
4533
  blockListPath: "data.blocks",
4089
4534
  blocks: t.blocks
4090
4535
  } : {
@@ -4092,40 +4537,40 @@ function Kn(e) {
4092
4537
  blocks: [t]
4093
4538
  };
4094
4539
  }
4095
- function qn({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: o = "message", theme: s = "light" }) {
4096
- let c = a(() => Kn(n), [n]), u = h(s === "dark" ? re : ne, T.root, s === "dark" ? T.rootDark : T.rootLight);
4097
- return /* @__PURE__ */ l(v, {
4540
+ function _r({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: a = "message", theme: s = "light" }) {
4541
+ let c = o(() => gr(n), [n]), l = g(s === "dark" ? we : Ce, O.root, s === "dark" ? O.rootDark : O.rootLight);
4542
+ return /* @__PURE__ */ u(b, {
4098
4543
  onAction: r,
4099
4544
  resolvers: i,
4100
- surface: o,
4101
- children: /* @__PURE__ */ l("div", {
4102
- ...u,
4545
+ surface: a,
4546
+ children: /* @__PURE__ */ u("div", {
4547
+ ...l,
4103
4548
  "aria-label": e,
4104
- className: D(u.className, t),
4549
+ className: A(l.className, t),
4105
4550
  "data-block-kit-root": !0,
4106
- "data-surface": o,
4551
+ "data-surface": a,
4107
4552
  "data-theme": s,
4108
4553
  role: "article",
4109
- children: c.blocks.map((e, t) => /* @__PURE__ */ l(Rn, {
4554
+ children: c.blocks.map((e, t) => /* @__PURE__ */ u(cr, {
4110
4555
  block: e,
4111
4556
  path: `${c.blockListPath}[${String(t)}]`
4112
- }, `${x(e) ?? "unknown"}-${S(e) ?? "block"}-${String(t)}`))
4557
+ }, `${T(e) ?? "unknown"}-${xe(e) ?? "block"}-${String(t)}`))
4113
4558
  })
4114
4559
  });
4115
4560
  }
4116
4561
  //#endregion
4117
4562
  //#region src/validation.ts
4118
- function R(e, t, n) {
4119
- throw new Gn(n, {
4563
+ function vr(e, t, n) {
4564
+ throw new hr(n, {
4120
4565
  code: e,
4121
4566
  path: t
4122
4567
  });
4123
4568
  }
4124
4569
  function z(e, t, n, r) {
4125
- e || R(t, n, r);
4570
+ e || vr(t, n, r);
4126
4571
  }
4127
4572
  function B(e, t) {
4128
- z(b(e), "invalid_type", t, "expected an object");
4573
+ z(w(e), "invalid_type", t, "expected an object");
4129
4574
  }
4130
4575
  function V(e, t) {
4131
4576
  z(Array.isArray(e), "invalid_type", t, "expected an array");
@@ -4151,67 +4596,67 @@ function q(e, t, n) {
4151
4596
  function J(e, t) {
4152
4597
  H(e.type, `${t}.type`), U(e.block_id, `${t}.block_id`, { max: 255 });
4153
4598
  }
4154
- function Y(e, t, n = qt) {
4599
+ function Y(e, t, n = vn) {
4155
4600
  B(e, t), q(e.type, ["plain_text", "mrkdwn"], `${t}.type`), H(e.text, `${t}.text`, { max: n }), e.type === "plain_text" ? (G(e.emoji, `${t}.emoji`), z(e.verbatim === void 0, "invalid_value", `${t}.verbatim`, "verbatim is only legal on mrkdwn text")) : (G(e.verbatim, `${t}.verbatim`), z(e.emoji === void 0, "invalid_value", `${t}.emoji`, "emoji is only legal on plain_text"));
4156
4601
  }
4157
- function Jn(e, t = "text", n = qt) {
4602
+ function yr(e, t = "text", n = vn) {
4158
4603
  Y(e, t, n);
4159
4604
  }
4160
- function X(e, t, n = qt) {
4161
- Y(e, t, n), z(b(e) && e.type === "plain_text", "invalid_value", `${t}.type`, "expected \"plain_text\"");
4605
+ function X(e, t, n = vn) {
4606
+ Y(e, t, n), z(w(e) && e.type === "plain_text", "invalid_value", `${t}.type`, "expected \"plain_text\"");
4162
4607
  }
4163
- function Yn(e, t) {
4608
+ function br(e, t) {
4164
4609
  B(e, t);
4165
4610
  let n = e.id !== void 0, r = e.url !== void 0;
4166
- z(n !== r, "invalid_value", t, "must contain exactly one of id or url"), n && H(e.id, `${t}.id`), r && H(e.url, `${t}.url`, { max: Xt });
4611
+ z(n !== r, "invalid_value", t, "must contain exactly one of id or url"), n && H(e.id, `${t}.id`), r && H(e.url, `${t}.url`, { max: xn });
4167
4612
  }
4168
4613
  function Z(e, t) {
4169
- B(e, t), K(e, "image", t), H(e.alt_text, `${t}.alt_text`, { max: Zt });
4614
+ B(e, t), K(e, "image", t), H(e.alt_text, `${t}.alt_text`, { max: Sn });
4170
4615
  let n = e.image_url !== void 0, r = e.slack_file !== void 0;
4171
- z(n !== r, "invalid_value", t, "must contain exactly one of image_url or slack_file"), n && H(e.image_url, `${t}.image_url`, { max: Xt }), r && Yn(e.slack_file, `${t}.slack_file`);
4616
+ z(n !== r, "invalid_value", t, "must contain exactly one of image_url or slack_file"), n && H(e.image_url, `${t}.image_url`, { max: xn }), r && br(e.slack_file, `${t}.slack_file`);
4172
4617
  }
4173
- function Xn(e, t = "element") {
4618
+ function xr(e, t = "element") {
4174
4619
  Z(e, t);
4175
4620
  }
4176
- function Zn(e, t) {
4177
- B(e, t), Y(e.text, `${t}.text`, 75), U(e.value, `${t}.value`, { max: 75 }), U(e.url, `${t}.url`, { max: en }), e.description !== void 0 && X(e.description, `${t}.description`, 75);
4621
+ function Sr(e, t) {
4622
+ B(e, t), Y(e.text, `${t}.text`, 75), U(e.value, `${t}.value`, { max: 75 }), U(e.url, `${t}.url`, { max: Tn }), e.description !== void 0 && X(e.description, `${t}.description`, 75);
4178
4623
  }
4179
- function Qn(e, t, n) {
4624
+ function Cr(e, t, n) {
4180
4625
  V(e, t), z(e.length > 0, "missing_field", t, "must contain at least one option"), z(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} options`), e.forEach((e, n) => {
4181
- Zn(e, `${t}[${String(n)}]`);
4626
+ Sr(e, `${t}[${String(n)}]`);
4182
4627
  });
4183
4628
  }
4184
- function $n(e, t) {
4629
+ function wr(e, t) {
4185
4630
  U(e.action_id, `${t}.action_id`, { max: 255 });
4186
4631
  }
4187
- function er(e, t) {
4632
+ function Tr(e, t) {
4188
4633
  e.placeholder !== void 0 && X(e.placeholder, `${t}.placeholder`, 150);
4189
4634
  }
4190
- function tr(e, t) {
4191
- B(e, t), K(e, "button", t), $n(e, t), X(e.text, `${t}.text`, 75), U(e.url, `${t}.url`, { max: en }), U(e.value, `${t}.value`, { max: tn }), U(e.accessibility_label, `${t}.accessibility_label`, { max: 75 }), e.style !== void 0 && q(e.style, ["primary", "danger"], `${t}.style`);
4635
+ function Er(e, t) {
4636
+ B(e, t), K(e, "button", t), wr(e, t), X(e.text, `${t}.text`, 75), U(e.url, `${t}.url`, { max: Tn }), U(e.value, `${t}.value`, { max: En }), U(e.accessibility_label, `${t}.accessibility_label`, { max: 75 }), e.style !== void 0 && q(e.style, ["primary", "danger"], `${t}.style`);
4192
4637
  }
4193
- function nr(e, t) {
4638
+ function Dr(e, t) {
4194
4639
  let n = e.options !== void 0, r = e.option_groups !== void 0;
4195
- z(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && Qn(e.options, `${t}.options`, 100), r && (V(e.option_groups, `${t}.option_groups`), z(e.option_groups.length <= 100, "limit_exceeded", `${t}.option_groups`, "must contain at most 100 groups"), e.option_groups.forEach((e, n) => {
4640
+ z(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && Cr(e.options, `${t}.options`, 100), r && (V(e.option_groups, `${t}.option_groups`), z(e.option_groups.length <= 100, "limit_exceeded", `${t}.option_groups`, "must contain at most 100 groups"), e.option_groups.forEach((e, n) => {
4196
4641
  let r = `${t}.option_groups[${String(n)}]`;
4197
- B(e, r), X(e.label, `${r}.label`, 75), Qn(e.options, `${r}.options`, 100);
4642
+ B(e, r), X(e.label, `${r}.label`, 75), Cr(e.options, `${r}.options`, 100);
4198
4643
  }));
4199
4644
  }
4200
- function rr(e, t) {
4201
- switch (B(e, t), H(e.type, `${t}.type`), $n(e, t), er(e, t), e.type) {
4645
+ function Or(e, t) {
4646
+ switch (B(e, t), H(e.type, `${t}.type`), wr(e, t), Tr(e, t), e.type) {
4202
4647
  case "button":
4203
- tr(e, t);
4648
+ Er(e, t);
4204
4649
  return;
4205
4650
  case "checkboxes":
4206
4651
  case "radio_buttons":
4207
- Qn(e.options, `${t}.options`, 10);
4652
+ Cr(e.options, `${t}.options`, 10);
4208
4653
  return;
4209
4654
  case "overflow":
4210
- Qn(e.options, `${t}.options`, 5);
4655
+ Cr(e.options, `${t}.options`, 5);
4211
4656
  return;
4212
4657
  case "static_select":
4213
4658
  case "multi_static_select":
4214
- nr(e, t);
4659
+ Dr(e, t);
4215
4660
  return;
4216
4661
  case "external_select":
4217
4662
  case "multi_external_select":
@@ -4257,13 +4702,13 @@ function rr(e, t) {
4257
4702
  case "workflow_button":
4258
4703
  X(e.text, `${t}.text`, 75), B(e.workflow, `${t}.workflow`), B(e.workflow.trigger, `${t}.workflow.trigger`), H(e.workflow.trigger.url, `${t}.workflow.trigger.url`);
4259
4704
  return;
4260
- default: R("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4705
+ default: vr("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4261
4706
  }
4262
4707
  }
4263
- function ir(e, t = "element") {
4264
- rr(e, t);
4708
+ function kr(e, t = "element") {
4709
+ Or(e, t);
4265
4710
  }
4266
- function ar(e, t) {
4711
+ function Ar(e, t) {
4267
4712
  if (e !== void 0) {
4268
4713
  B(e, t);
4269
4714
  for (let n of [
@@ -4275,8 +4720,8 @@ function ar(e, t) {
4275
4720
  ]) G(e[n], `${t}.${n}`);
4276
4721
  }
4277
4722
  }
4278
- function or(e, t) {
4279
- switch (B(e, t), H(e.type, `${t}.type`), ar(e.style, `${t}.style`), e.type) {
4723
+ function jr(e, t) {
4724
+ switch (B(e, t), H(e.type, `${t}.type`), Ar(e.style, `${t}.style`), e.type) {
4280
4725
  case "text":
4281
4726
  H(e.text, `${t}.text`, { allowEmpty: !0 });
4282
4727
  return;
@@ -4330,12 +4775,12 @@ function or(e, t) {
4330
4775
  case "workflow_mention":
4331
4776
  z(Object.keys(e).length > 1, "missing_field", t, `${e.type} must contain its reference fields`);
4332
4777
  return;
4333
- default: R("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4778
+ default: vr("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4334
4779
  }
4335
4780
  }
4336
- function sr(e, t) {
4781
+ function Mr(e, t) {
4337
4782
  V(e, t), e.forEach((e, n) => {
4338
- or(e, `${t}[${String(n)}]`);
4783
+ jr(e, `${t}[${String(n)}]`);
4339
4784
  });
4340
4785
  }
4341
4786
  function Q(e, t) {
@@ -4344,7 +4789,7 @@ function Q(e, t) {
4344
4789
  switch (B(e, r), H(e.type, `${r}.type`), e.type) {
4345
4790
  case "rich_text_section":
4346
4791
  case "rich_text_quote":
4347
- sr(e.elements, `${r}.elements`);
4792
+ Mr(e.elements, `${r}.elements`);
4348
4793
  return;
4349
4794
  case "rich_text_list":
4350
4795
  q(e.style, ["bullet", "ordered"], `${r}.style`), e.indent !== void 0 && W(e.indent, `${r}.indent`, {
@@ -4356,28 +4801,25 @@ function Q(e, t) {
4356
4801
  min: 0
4357
4802
  }), V(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
4358
4803
  let n = `${r}.elements[${String(t)}]`;
4359
- B(e, n), K(e, "rich_text_section", n), sr(e.elements, `${n}.elements`);
4804
+ B(e, n), K(e, "rich_text_section", n), Mr(e.elements, `${n}.elements`);
4360
4805
  });
4361
4806
  return;
4362
4807
  case "rich_text_preformatted":
4363
- V(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
4364
- let n = `${r}.elements[${String(t)}]`;
4365
- or(e, n), B(e, n), z(e.type === "text" || e.type === "link", "invalid_value", `${n}.type`, "preformatted text only accepts text or link elements");
4366
- }), U(e.language, `${r}.language`);
4808
+ Mr(e.elements, `${r}.elements`), U(e.language, `${r}.language`);
4367
4809
  return;
4368
- default: R("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4810
+ default: vr("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4369
4811
  }
4370
4812
  });
4371
4813
  }
4372
- function cr(e, t = "block") {
4814
+ function Nr(e, t = "block") {
4373
4815
  Q(e, t);
4374
4816
  }
4375
- function lr(e, t) {
4817
+ function Pr(e, t) {
4376
4818
  B(e, t), K(e, "section", t), J(e, t);
4377
4819
  let n = e.text !== void 0, r = e.fields !== void 0;
4378
- z(n || r, "missing_field", t, "requires text or fields"), n && Y(e.text, `${t}.text`, Jt), r && (V(e.fields, `${t}.fields`), z(e.fields.length > 0 && e.fields.length <= 10, "limit_exceeded", `${t}.fields`, "must contain 1–10 text objects"), e.fields.forEach((e, n) => {
4379
- Y(e, `${t}.fields[${String(n)}]`, Yt);
4380
- })), e.accessory !== void 0 && (B(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? Z(e.accessory, `${t}.accessory`) : (rr(e.accessory, `${t}.accessory`), z(![
4820
+ z(n || r, "missing_field", t, "requires text or fields"), n && Y(e.text, `${t}.text`, yn), r && (V(e.fields, `${t}.fields`), z(e.fields.length > 0 && e.fields.length <= 10, "limit_exceeded", `${t}.fields`, "must contain 1–10 text objects"), e.fields.forEach((e, n) => {
4821
+ Y(e, `${t}.fields[${String(n)}]`, bn);
4822
+ })), e.accessory !== void 0 && (B(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? Z(e.accessory, `${t}.accessory`) : (Or(e.accessory, `${t}.accessory`), z(![
4381
4823
  "datetimepicker",
4382
4824
  "file_input",
4383
4825
  "plain_text_input",
@@ -4387,26 +4829,26 @@ function lr(e, t) {
4387
4829
  "rich_text_input"
4388
4830
  ].includes(String(e.accessory.type)), "invalid_value", `${t}.accessory.type`, "element is not legal as a section accessory"))), G(e.expand, `${t}.expand`);
4389
4831
  }
4390
- function ur(e, t) {
4832
+ function Fr(e, t) {
4391
4833
  B(e, t), K(e, "header", t), J(e, t), X(e.text, `${t}.text`, 150), e.level !== void 0 && W(e.level, `${t}.level`, {
4392
4834
  integer: !0,
4393
4835
  min: 1,
4394
4836
  max: 4
4395
4837
  });
4396
4838
  }
4397
- function dr(e, t) {
4398
- Z(e, t), B(e, t), J(e, t), e.title !== void 0 && X(e.title, `${t}.title`, Qt);
4839
+ function Ir(e, t) {
4840
+ Z(e, t), B(e, t), J(e, t), e.title !== void 0 && X(e.title, `${t}.title`, Cn);
4399
4841
  }
4400
- function fr(e, t) {
4842
+ function Lr(e, t) {
4401
4843
  B(e, t), K(e, "context", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 elements"), e.elements.forEach((e, n) => {
4402
4844
  let r = `${t}.elements[${String(n)}]`;
4403
4845
  B(e, r), e.type === "image" ? Z(e, r) : Y(e, r);
4404
4846
  });
4405
4847
  }
4406
- function pr(e, t) {
4848
+ function Rr(e, t) {
4407
4849
  B(e, t), K(e, "actions", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 25, "limit_exceeded", `${t}.elements`, "must contain 1–25 elements"), e.elements.forEach((e, n) => {
4408
4850
  let r = `${t}.elements[${String(n)}]`;
4409
- rr(e, r), B(e, r), z([
4851
+ Or(e, r), B(e, r), z([
4410
4852
  "button",
4411
4853
  "checkboxes",
4412
4854
  "datepicker",
@@ -4429,8 +4871,8 @@ function pr(e, t) {
4429
4871
  ].includes(String(e.type)), "invalid_value", `${r}.type`, "element is not legal inside an actions block");
4430
4872
  });
4431
4873
  }
4432
- function mr(e, t) {
4433
- B(e, t), K(e, "input", t), J(e, t), X(e.label, `${t}.label`, 2e3), e.hint !== void 0 && X(e.hint, `${t}.hint`, 2e3), G(e.optional, `${t}.optional`), G(e.dispatch_action, `${t}.dispatch_action`), rr(e.element, `${t}.element`), B(e.element, `${t}.element`), z(![
4874
+ function zr(e, t) {
4875
+ B(e, t), K(e, "input", t), J(e, t), X(e.label, `${t}.label`, 2e3), e.hint !== void 0 && X(e.hint, `${t}.hint`, 2e3), G(e.optional, `${t}.optional`), G(e.dispatch_action, `${t}.dispatch_action`), Or(e.element, `${t}.element`), B(e.element, `${t}.element`), z(![
4434
4876
  "button",
4435
4877
  "overflow",
4436
4878
  "workflow_button",
@@ -4438,18 +4880,18 @@ function mr(e, t) {
4438
4880
  "feedback_buttons"
4439
4881
  ].includes(String(e.element.type)), "invalid_value", `${t}.element.type`, "element is not legal inside an input block"), z(!(e.dispatch_action === !0 && e.element.type === "file_input"), "invalid_value", `${t}.dispatch_action`, "dispatch_action is incompatible with file_input");
4440
4882
  }
4441
- function hr(e) {
4442
- if (!b(e)) return 0;
4883
+ function Br(e) {
4884
+ if (!w(e)) return 0;
4443
4885
  if (e.type === "raw_text") return typeof e.text == "string" ? e.text.length : 0;
4444
4886
  if (e.type === "raw_number") return typeof e.text == "string" ? e.text.length : typeof e.value == "number" ? String(e.value).length : 0;
4445
4887
  if (e.type === "rich_text" && Array.isArray(e.elements)) {
4446
4888
  let t = 0;
4447
- for (let n of e.elements) if (!(!b(n) || !Array.isArray(n.elements))) for (let e of n.elements) b(e) && (typeof e.text == "string" ? t += e.text.length : typeof e.url == "string" && (t += e.url.length));
4889
+ for (let n of e.elements) if (!(!w(n) || !Array.isArray(n.elements))) for (let e of n.elements) w(e) && (typeof e.text == "string" ? t += e.text.length : typeof e.url == "string" && (t += e.url.length));
4448
4890
  return t;
4449
4891
  }
4450
4892
  return 0;
4451
4893
  }
4452
- function gr(e, t, n) {
4894
+ function Vr(e, t, n) {
4453
4895
  switch (B(e, t), H(e.type, `${t}.type`), e.type) {
4454
4896
  case "raw_text":
4455
4897
  H(e.text, `${t}.text`);
@@ -4460,21 +4902,21 @@ function gr(e, t, n) {
4460
4902
  case "rich_text":
4461
4903
  z(n, "invalid_value", t, "rich_text is not legal in this row"), Q(e, t);
4462
4904
  return;
4463
- default: R("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4905
+ default: vr("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4464
4906
  }
4465
4907
  }
4466
- function _r(e, t, n, r, i) {
4908
+ function Hr(e, t, n, r, i) {
4467
4909
  V(e, t), z(e.length > 0, "missing_field", t, "must contain at least one row"), z(e.length <= n, "limit_exceeded", t, `must contain at most ${String(n)} rows`);
4468
4910
  let a, o = 0;
4469
4911
  return e.forEach((e, n) => {
4470
4912
  let r = `${t}[${String(n)}]`;
4471
4913
  V(e, r), z(e.length > 0 && e.length <= 20, "limit_exceeded", r, "must contain 1–20 cells"), a === void 0 ? a = e.length : z(e.length === a, "invalid_value", r, "all table rows must contain the same number of cells"), e.forEach((e, t) => {
4472
- gr(e, `${r}[${String(t)}]`, i || n !== 0), o += hr(e);
4914
+ Vr(e, `${r}[${String(t)}]`, i || n !== 0), o += Br(e);
4473
4915
  });
4474
4916
  }), z(o <= r, "limit_exceeded", t, `cell content must contain at most ${String(r)} characters`), a ?? 0;
4475
4917
  }
4476
- function vr(e, t) {
4477
- B(e, t), K(e, "table", t), J(e, t), _r(e.rows, `${t}.rows`, 100, nn, !0), e.column_settings !== void 0 && (V(e.column_settings, `${t}.column_settings`), z(e.column_settings.length <= 20, "limit_exceeded", `${t}.column_settings`, "must contain at most 20 entries"), e.column_settings.forEach((e, n) => {
4918
+ function Ur(e, t) {
4919
+ B(e, t), K(e, "table", t), J(e, t), Hr(e.rows, `${t}.rows`, 100, Dn, !0), e.column_settings !== void 0 && (V(e.column_settings, `${t}.column_settings`), z(e.column_settings.length <= 20, "limit_exceeded", `${t}.column_settings`, "must contain at most 20 entries"), e.column_settings.forEach((e, n) => {
4478
4920
  if (e === null) return;
4479
4921
  let r = `${t}.column_settings[${String(n)}]`;
4480
4922
  B(e, r), e.align !== void 0 && q(e.align, [
@@ -4484,9 +4926,9 @@ function vr(e, t) {
4484
4926
  ], `${r}.align`), G(e.is_wrapped, `${r}.is_wrapped`);
4485
4927
  }));
4486
4928
  }
4487
- function yr(e, t) {
4929
+ function Wr(e, t) {
4488
4930
  B(e, t), K(e, "data_table", t), J(e, t), H(e.caption, `${t}.caption`);
4489
- let n = _r(e.rows, `${t}.rows`, 201, rn, !1);
4931
+ let n = Hr(e.rows, `${t}.rows`, 201, On, !1);
4490
4932
  V(e.rows, `${t}.rows`), z(e.rows.length >= 2, "invalid_value", `${t}.rows`, "requires a header row and at least one data row"), e.page_size !== void 0 && W(e.page_size, `${t}.page_size`, {
4491
4933
  integer: !0,
4492
4934
  min: 1,
@@ -4497,7 +4939,7 @@ function yr(e, t) {
4497
4939
  max: n - 1
4498
4940
  });
4499
4941
  }
4500
- function br(e, t) {
4942
+ function Gr(e, t) {
4501
4943
  if (B(e, t), K(e, "data_visualization", t), J(e, t), H(e.title, `${t}.title`, { max: 50 }), B(e.chart, `${t}.chart`), H(e.chart.type, `${t}.chart.type`), e.chart.type === "pie") {
4502
4944
  V(e.chart.segments, `${t}.chart.segments`), z(e.chart.segments.length > 0 && e.chart.segments.length <= 12, "limit_exceeded", `${t}.chart.segments`, "must contain 1–12 segments"), e.chart.segments.forEach((e, n) => {
4503
4945
  let r = `${t}.chart.segments[${String(n)}]`;
@@ -4526,20 +4968,20 @@ function br(e, t) {
4526
4968
  });
4527
4969
  });
4528
4970
  }
4529
- function xr(e, t) {
4971
+ function Kr(e, t) {
4530
4972
  B(e, t), K(e, "card", t), J(e, t), z(e.hero_image !== void 0 || e.title !== void 0 || e.actions !== void 0 || e.body !== void 0, "missing_field", t, "requires at least one of hero_image, title, actions, or body"), e.hero_image !== void 0 && Z(e.hero_image, `${t}.hero_image`), e.icon !== void 0 && Z(e.icon, `${t}.icon`), z(!(e.icon !== void 0 && e.slack_icon !== void 0), "invalid_value", t, "icon and slack_icon are mutually exclusive"), e.slack_icon !== void 0 && (B(e.slack_icon, `${t}.slack_icon`), K(e.slack_icon, "icon", `${t}.slack_icon`), H(e.slack_icon.name, `${t}.slack_icon.name`));
4531
4973
  for (let n of ["title", "subtitle"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 150);
4532
4974
  for (let n of ["body", "subtext"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 200);
4533
4975
  e.actions !== void 0 && (V(e.actions, `${t}.actions`), z(e.actions.length > 0 && e.actions.length <= 3, "limit_exceeded", `${t}.actions`, "must contain 1–3 buttons"), e.actions.forEach((e, n) => {
4534
- tr(e, `${t}.actions[${String(n)}]`);
4976
+ Er(e, `${t}.actions[${String(n)}]`);
4535
4977
  }));
4536
4978
  }
4537
- function Sr(e, t) {
4979
+ function qr(e, t) {
4538
4980
  B(e, t), K(e, "carousel", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 10, "limit_exceeded", `${t}.elements`, "must contain 1–10 cards"), e.elements.forEach((e, n) => {
4539
- xr(e, `${t}.elements[${String(n)}]`);
4981
+ Kr(e, `${t}.elements[${String(n)}]`);
4540
4982
  });
4541
4983
  }
4542
- function Cr(e, t, n) {
4984
+ function Jr(e, t, n) {
4543
4985
  B(e, n), K(e, "alert", n), J(e, n), z(t === "modal", "surface_mismatch", n, "alert blocks are only legal on modal surfaces"), Y(e.text, `${n}.text`, 200), e.level !== void 0 && q(e.level, [
4544
4986
  "default",
4545
4987
  "info",
@@ -4548,21 +4990,21 @@ function Cr(e, t, n) {
4548
4990
  "success"
4549
4991
  ], `${n}.level`);
4550
4992
  }
4551
- function wr(e, t) {
4993
+ function Yr(e, t) {
4552
4994
  B(e, t), K(e, "context_actions", t), J(e, t), V(e.elements, `${t}.elements`), z(e.elements.length > 0 && e.elements.length <= 5, "limit_exceeded", `${t}.elements`, "must contain 1–5 elements"), e.elements.forEach((e, n) => {
4553
4995
  let r = `${t}.elements[${String(n)}]`;
4554
- if (B(e, r), $n(e, r), e.type === "icon_button") {
4555
- q(e.icon, ["trash"], `${r}.icon`), X(e.text, `${r}.text`, 75), U(e.value, `${r}.value`, { max: tn });
4996
+ if (B(e, r), wr(e, r), e.type === "icon_button") {
4997
+ q(e.icon, ["trash"], `${r}.icon`), X(e.text, `${r}.text`, 75), U(e.value, `${r}.value`, { max: En });
4556
4998
  return;
4557
4999
  }
4558
5000
  z(e.type === "feedback_buttons", "unsupported_element", `${r}.type`, "context_actions only accepts icon_button or feedback_buttons");
4559
5001
  for (let t of ["positive_button", "negative_button"]) {
4560
5002
  let n = `${r}.${t}`;
4561
- B(e[t], n), X(e[t].text, `${n}.text`, 75), H(e[t].value, `${n}.value`, { max: tn });
5003
+ B(e[t], n), X(e[t].text, `${n}.text`, 75), H(e[t].value, `${n}.value`, { max: En });
4562
5004
  }
4563
5005
  });
4564
5006
  }
4565
- function Tr(e, t) {
5007
+ function Xr(e, t) {
4566
5008
  B(e, t), K(e, "task_card", t), J(e, t), H(e.task_id, `${t}.task_id`), H(e.title, `${t}.title`), q(e.status, [
4567
5009
  "pending",
4568
5010
  "in_progress",
@@ -4573,12 +5015,12 @@ function Tr(e, t) {
4573
5015
  B(e, r), K(e, "url", r), H(e.url, `${r}.url`), H(e.text, `${r}.text`);
4574
5016
  }));
4575
5017
  }
4576
- function Er(e, t) {
5018
+ function Zr(e, t) {
4577
5019
  B(e, t), K(e, "plan", t), J(e, t), H(e.title, `${t}.title`), e.tasks !== void 0 && (V(e.tasks, `${t}.tasks`), e.tasks.forEach((e, n) => {
4578
- Tr(e, `${t}.tasks[${String(n)}]`);
5020
+ Xr(e, `${t}.tasks[${String(n)}]`);
4579
5021
  }));
4580
5022
  }
4581
- function Dr(e, t) {
5023
+ function Qr(e, t) {
4582
5024
  B(e, t), K(e, "container", t), J(e, t), z(e.title !== void 0 || e.rich_text_title !== void 0, "missing_field", t, "requires title or rich_text_title"), e.title !== void 0 && X(e.title, `${t}.title`, 150), e.rich_text_title !== void 0 && Q(e.rich_text_title, `${t}.rich_text_title`), e.subtitle !== void 0 && X(e.subtitle, `${t}.subtitle`, 150), e.icon !== void 0 && Z(e.icon, `${t}.icon`), e.width !== void 0 && q(e.width, [
4583
5025
  "narrow",
4584
5026
  "standard",
@@ -4600,122 +5042,122 @@ function Dr(e, t) {
4600
5042
  ];
4601
5043
  e.child_blocks.forEach((e, r) => {
4602
5044
  let i = `${t}.child_blocks[${String(r)}]`;
4603
- B(e, i), H(e.type, `${i}.type`), z(n.includes(e.type), "invalid_value", `${i}.type`, `"${e.type}" is not legal inside a container`), Ar(e, "message", i);
5045
+ B(e, i), H(e.type, `${i}.type`), z(n.includes(e.type), "invalid_value", `${i}.type`, `"${e.type}" is not legal inside a container`), ti(e, "message", i);
4604
5046
  });
4605
5047
  }
4606
- function Or(e, t) {
5048
+ function $r(e, t) {
4607
5049
  B(e, t), K(e, "file", t), J(e, t), z(e.source === "remote", "invalid_value", `${t}.source`, "expected \"remote\""), H(e.external_id, `${t}.external_id`);
4608
5050
  }
4609
- function kr(e, t) {
4610
- B(e, t), K(e, "video", t), J(e, t), H(e.video_url, `${t}.video_url`), H(e.thumbnail_url, `${t}.thumbnail_url`), H(e.alt_text, `${t}.alt_text`, { max: Zt }), X(e.title, `${t}.title`, 199), e.description !== void 0 && X(e.description, `${t}.description`, 199), U(e.author_name, `${t}.author_name`, { max: 49 });
5051
+ function ei(e, t) {
5052
+ B(e, t), K(e, "video", t), J(e, t), H(e.video_url, `${t}.video_url`), H(e.thumbnail_url, `${t}.thumbnail_url`), H(e.alt_text, `${t}.alt_text`, { max: Sn }), X(e.title, `${t}.title`, 199), e.description !== void 0 && X(e.description, `${t}.description`, 199), U(e.author_name, `${t}.author_name`, { max: 49 });
4611
5053
  }
4612
5054
  function $(e, t, n) {
4613
5055
  z(e === "message", "surface_mismatch", t, `${n} blocks are only documented for message surfaces`);
4614
5056
  }
4615
- function Ar(e, t = "message", n = "block") {
5057
+ function ti(e, t = "message", n = "block") {
4616
5058
  switch (B(e, n), J(e, n), e.type) {
4617
5059
  case "actions":
4618
- pr(e, n);
5060
+ Rr(e, n);
4619
5061
  return;
4620
5062
  case "alert":
4621
- Cr(e, t, n);
5063
+ Jr(e, t, n);
4622
5064
  return;
4623
5065
  case "card":
4624
- $(t, n, e.type), xr(e, n);
5066
+ $(t, n, e.type), Kr(e, n);
4625
5067
  return;
4626
5068
  case "carousel":
4627
- $(t, n, e.type), Sr(e, n);
5069
+ $(t, n, e.type), qr(e, n);
4628
5070
  return;
4629
5071
  case "container":
4630
- $(t, n, e.type), Dr(e, n);
5072
+ $(t, n, e.type), Qr(e, n);
4631
5073
  return;
4632
5074
  case "context":
4633
- fr(e, n);
5075
+ Lr(e, n);
4634
5076
  return;
4635
5077
  case "context_actions":
4636
- $(t, n, e.type), wr(e, n);
5078
+ $(t, n, e.type), Yr(e, n);
4637
5079
  return;
4638
5080
  case "data_table":
4639
- $(t, n, e.type), yr(e, n);
5081
+ $(t, n, e.type), Wr(e, n);
4640
5082
  return;
4641
5083
  case "data_visualization":
4642
- $(t, n, e.type), br(e, n);
5084
+ $(t, n, e.type), Gr(e, n);
4643
5085
  return;
4644
5086
  case "divider":
4645
5087
  K(e, "divider", n);
4646
5088
  return;
4647
5089
  case "file":
4648
- $(t, n, e.type), Or(e, n);
5090
+ $(t, n, e.type), $r(e, n);
4649
5091
  return;
4650
5092
  case "header":
4651
- ur(e, n);
5093
+ Fr(e, n);
4652
5094
  return;
4653
5095
  case "image":
4654
- dr(e, n);
5096
+ Ir(e, n);
4655
5097
  return;
4656
5098
  case "input":
4657
- mr(e, n);
5099
+ zr(e, n);
4658
5100
  return;
4659
5101
  case "markdown":
4660
- $(t, n, e.type), H(e.text, `${n}.text`, { max: $t });
5102
+ $(t, n, e.type), H(e.text, `${n}.text`, { max: wn });
4661
5103
  return;
4662
5104
  case "plan":
4663
- $(t, n, e.type), Er(e, n);
5105
+ $(t, n, e.type), Zr(e, n);
4664
5106
  return;
4665
5107
  case "rich_text":
4666
5108
  Q(e, n);
4667
5109
  return;
4668
5110
  case "section":
4669
- lr(e, n);
5111
+ Pr(e, n);
4670
5112
  return;
4671
5113
  case "table":
4672
- $(t, n, e.type), vr(e, n);
5114
+ $(t, n, e.type), Ur(e, n);
4673
5115
  return;
4674
5116
  case "task_card":
4675
- $(t, n, e.type), Tr(e, n);
5117
+ $(t, n, e.type), Xr(e, n);
4676
5118
  return;
4677
5119
  case "video":
4678
- kr(e, n);
5120
+ ei(e, n);
4679
5121
  return;
4680
- default: R("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
5122
+ default: vr("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
4681
5123
  }
4682
5124
  }
4683
- function jr(e, t, n = "message", r = "block") {
4684
- Ar(e, n, r), z(e.type === t, "invalid_value", `${r}.type`, `expected "${t}"`);
5125
+ function ni(e, t, n = "message", r = "block") {
5126
+ ti(e, n, r), z(e.type === t, "invalid_value", `${r}.type`, `expected "${t}"`);
4685
5127
  }
4686
- function Mr(e, t) {
5128
+ function ri(e, t) {
4687
5129
  return Array.isArray(e) ? e : (B(e, t), V(e.blocks, `${t}.blocks`), e.blocks);
4688
5130
  }
4689
- function Nr(e, t = "message", n = "data") {
4690
- let r = Array.isArray(e) ? n : `${n}.blocks`, i = Mr(e, n), a = t === "message" ? 50 : 100;
5131
+ function ii(e, t = "message", n = "data") {
5132
+ let r = Array.isArray(e) ? n : `${n}.blocks`, i = ri(e, n), a = t === "message" ? 50 : 100;
4691
5133
  z(i.length <= a, "limit_exceeded", r, `${t} surfaces accept at most ${String(a)} blocks`);
4692
5134
  let o = 0, s = 0, c = 0, l = /* @__PURE__ */ new Set();
4693
5135
  i.forEach((e, n) => {
4694
5136
  let i = `${r}[${String(n)}]`;
4695
- if (Ar(e, t, i), e.block_id !== void 0 && (z(!l.has(e.block_id), "duplicate_id", `${i}.block_id`, `"${e.block_id}" is already used in this payload`), l.add(e.block_id)), e.type === "markdown") o += e.text.length;
4696
- else if (e.type === "table") for (let t of e.rows) for (let e of t) s += hr(e);
4697
- else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += hr(e);
4698
- }), z(o <= $t, "limit_exceeded", r, `markdown blocks exceed the cumulative ${String($t)} character limit`), z(s <= nn, "limit_exceeded", r, `table cells exceed the cumulative ${String(nn)} character limit`), z(c <= rn, "limit_exceeded", r, `data_table cells exceed the cumulative ${String(rn)} character limit`);
5137
+ if (ti(e, t, i), e.block_id !== void 0 && (z(!l.has(e.block_id), "duplicate_id", `${i}.block_id`, `"${e.block_id}" is already used in this payload`), l.add(e.block_id)), e.type === "markdown") o += e.text.length;
5138
+ else if (e.type === "table") for (let t of e.rows) for (let e of t) s += Br(e);
5139
+ else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += Br(e);
5140
+ }), z(o <= wn, "limit_exceeded", r, `markdown blocks exceed the cumulative ${String(wn)} character limit`), z(s <= Dn, "limit_exceeded", r, `table cells exceed the cumulative ${String(Dn)} character limit`), z(c <= On, "limit_exceeded", r, `data_table cells exceed the cumulative ${String(On)} character limit`);
4699
5141
  }
4700
- function Pr(e, t = "message") {
5142
+ function ai(e, t = "message") {
4701
5143
  let n = e;
4702
5144
  if (typeof e == "string") try {
4703
5145
  n = JSON.parse(e);
4704
5146
  } catch {
4705
- throw new Gn("expected valid JSON", {
5147
+ throw new hr("expected valid JSON", {
4706
5148
  code: "invalid_json",
4707
5149
  path: "data"
4708
5150
  });
4709
5151
  }
4710
- return Nr(n, t), n;
5152
+ return ii(n, t), n;
4711
5153
  }
4712
- function Fr(e) {
4713
- return Ir(e) ? e.blocks : e;
5154
+ function oi(e) {
5155
+ return si(e) ? e.blocks : e;
4714
5156
  }
4715
- function Ir(e) {
5157
+ function si(e) {
4716
5158
  return !Array.isArray(e);
4717
5159
  }
4718
5160
  //#endregion
4719
- export { Mn as ActionsBlock, Ut as AlertBlock, zn as Block, qn as BlockKit, Gn as BlockKitInvariantError, v as BlockKitProvider, Ve as ButtonElement, Bt as CardBlock, Ht as CarouselBlock, Ge as ChoiceGroup, Wn as ContainerBlock, Fn as ContextActionsBlock, kt as ContextBlock, zt as DataTableBlock, On as DataVisualizationBlock, Et as DividerBlock, Mt as FileBlock, Tt as HeaderBlock, Dt as ImageBlock, N as ImageElement, Nn as InputBlock, it as InputElement, at as InteractiveElement, St as Markdown, jt as MarkdownBlock, P as Mrkdwn, He as OverflowElement, Kt as PlanBlock, A as RichText, At as RichTextBlock, wt as SectionBlock, $e as SelectElement, It as TableBlock, Pt as TableCell, Wt as TaskCardBlock, F as Text, Nt as VideoBlock, Nr as assertBlockKitData, jr as assertBlockType, Xn as assertImageElementData, ir as assertInteractiveElementData, Ar as assertRenderableBlock, cr as assertRichTextBlockData, Jn as assertTextObjectData, Fr as blocksOf, re as darkTheme, ne as lightTheme, Pr as parseBlockKitData, yt as tokenizeMarkdown, pt as tokenizeMrkdwn, te as tokens, y as useBlockKitContext };
5161
+ export { nr as ActionsBlock, mn as AlertBlock, lr as Block, _r as BlockKit, hr as BlockKitInvariantError, b as BlockKitProvider, lt as ButtonElement, dn as CardBlock, pn as CarouselBlock, pt as ChoiceGroup, mr as ContainerBlock, ar as ContextActionsBlock, Qt as ContextBlock, ln as DataTableBlock, Qn as DataVisualizationBlock, Yt as DividerBlock, tn as FileBlock, Jt as HeaderBlock, Xt as ImageBlock, F as ImageElement, rr as InputBlock, Et as InputElement, Dt as InteractiveElement, Gt as Markdown, en as MarkdownBlock, I as Mrkdwn, ut as OverflowElement, _n as PlanBlock, N as RichText, $t as RichTextBlock, qt as SectionBlock, xt as SelectElement, on as TableBlock, rn as TableCell, hn as TaskCardBlock, L as Text, nn as VideoBlock, ii as assertBlockKitData, ni as assertBlockType, xr as assertImageElementData, kr as assertInteractiveElementData, ti as assertRenderableBlock, Nr as assertRichTextBlockData, yr as assertTextObjectData, oi as blocksOf, we as darkTheme, Ce as lightTheme, ai as parseBlockKitData, Vt as tokenizeMarkdown, Ft as tokenizeMrkdwn, Se as tokens, x as useBlockKitContext };
4720
5162
 
4721
5163
  //# sourceMappingURL=index.js.map