react-blockkit 0.3.1 → 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
@@ -49,8 +49,8 @@ function m() {
49
49
  else {
50
50
  var S = null;
51
51
  for (var C in m) {
52
- var w = m[C];
53
- w !== void 0 && (n.includes(C) || (w != null && (s ??= {}, S ??= {}, S[C] = w), n.push(C), l = null));
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
55
  S != null && (s = Object.assign(S, s));
56
56
  }
@@ -103,18 +103,320 @@ function x() {
103
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 S(e) {
409
+ function w(e) {
108
410
  return typeof e == "object" && !!e && !Array.isArray(e);
109
411
  }
110
- function C(e) {
111
- if (S(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 w(e) {
114
- if (S(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 T(e, t) {
117
- if (!S(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 T(e, t) {
125
427
  let n = e[t];
126
428
  if (typeof n == "string" && n.length > 0) return n;
127
429
  }
128
- let n = C(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 E(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 ee = {
440
+ var Se = {
139
441
  surface: "var(--xf210bc)",
140
442
  surfaceRaised: "var(--xop8b6t)",
141
443
  surfaceSunken: "var(--xajfn77)",
@@ -206,13 +508,13 @@ var ee = {
206
508
  chartSeriesTint5: "var(--x1nud87m)",
207
509
  chartSeriesTint6: "var(--x1t1bkho)",
208
510
  __varGroupHash__: "xpd22m1"
209
- }, te = {
511
+ }, Ce = {
210
512
  xpd22m1: "x1l73jb5 xpd22m1",
211
513
  $$css: !0
212
- }, ne = {
514
+ }, we = {
213
515
  xpd22m1: "xky7mqn xpd22m1",
214
516
  $$css: !0
215
- }, D = {
517
+ }, O = {
216
518
  root: {
217
519
  kWkggS: "xfs8zev",
218
520
  kMwMTN: "xr3bju4",
@@ -489,6 +791,15 @@ var ee = {
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 ee = {
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 ee = {
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 ee = {
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 ee = {
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 ee = {
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 ee = {
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 ee = {
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 ee = {
1263
1643
  kzqmXN: "x1i1rx1s",
1264
1644
  $$css: !0
1265
1645
  }
1266
- }, O = {
1646
+ }, k = {
1267
1647
  fill1: {
1268
1648
  kDwRjp: "xtzl89e",
1269
1649
  $$css: !0
@@ -1432,86 +1812,86 @@ var ee = {
1432
1812
  kDwRjp: "x1mnwzol",
1433
1813
  $$css: !0
1434
1814
  }
1435
- }, re = {
1436
- fill: O.fill1,
1437
- stroke: O.stroke1,
1438
- swatch: O.swatch1,
1439
- tint: O.tint1
1440
- }, ie = [
1441
- re,
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: O.fill2,
1444
- stroke: O.stroke2,
1445
- swatch: O.swatch2,
1446
- tint: O.tint2
1823
+ fill: k.fill2,
1824
+ stroke: k.stroke2,
1825
+ swatch: k.swatch2,
1826
+ tint: k.tint2
1447
1827
  },
1448
1828
  {
1449
- fill: O.fill3,
1450
- stroke: O.stroke3,
1451
- swatch: O.swatch3,
1452
- tint: O.tint3
1829
+ fill: k.fill3,
1830
+ stroke: k.stroke3,
1831
+ swatch: k.swatch3,
1832
+ tint: k.tint3
1453
1833
  },
1454
1834
  {
1455
- fill: O.fill4,
1456
- stroke: O.stroke4,
1457
- swatch: O.swatch4,
1458
- tint: O.tint4
1835
+ fill: k.fill4,
1836
+ stroke: k.stroke4,
1837
+ swatch: k.swatch4,
1838
+ tint: k.tint4
1459
1839
  },
1460
1840
  {
1461
- fill: O.fill5,
1462
- stroke: O.stroke5,
1463
- swatch: O.swatch5,
1464
- tint: O.tint5
1841
+ fill: k.fill5,
1842
+ stroke: k.stroke5,
1843
+ swatch: k.swatch5,
1844
+ tint: k.tint5
1465
1845
  },
1466
1846
  {
1467
- fill: O.fill6,
1468
- stroke: O.stroke6,
1469
- swatch: O.swatch6,
1470
- tint: O.tint6
1847
+ fill: k.fill6,
1848
+ stroke: k.stroke6,
1849
+ swatch: k.swatch6,
1850
+ tint: k.tint6
1471
1851
  },
1472
1852
  {
1473
- fill: O.fill7,
1474
- stroke: O.stroke7,
1475
- swatch: O.swatch7,
1476
- tint: O.fill7
1853
+ fill: k.fill7,
1854
+ stroke: k.stroke7,
1855
+ swatch: k.swatch7,
1856
+ tint: k.fill7
1477
1857
  },
1478
1858
  {
1479
- fill: O.fill8,
1480
- stroke: O.stroke8,
1481
- swatch: O.swatch8,
1482
- tint: O.fill8
1859
+ fill: k.fill8,
1860
+ stroke: k.stroke8,
1861
+ swatch: k.swatch8,
1862
+ tint: k.fill8
1483
1863
  },
1484
1864
  {
1485
- fill: O.fill9,
1486
- stroke: O.stroke9,
1487
- swatch: O.swatch9,
1488
- tint: O.fill9
1865
+ fill: k.fill9,
1866
+ stroke: k.stroke9,
1867
+ swatch: k.swatch9,
1868
+ tint: k.fill9
1489
1869
  },
1490
1870
  {
1491
- fill: O.fill10,
1492
- stroke: O.stroke10,
1493
- swatch: O.swatch10,
1494
- tint: O.fill10
1871
+ fill: k.fill10,
1872
+ stroke: k.stroke10,
1873
+ swatch: k.swatch10,
1874
+ tint: k.fill10
1495
1875
  },
1496
1876
  {
1497
- fill: O.fill11,
1498
- stroke: O.stroke11,
1499
- swatch: O.swatch11,
1500
- tint: O.fill11
1877
+ fill: k.fill11,
1878
+ stroke: k.stroke11,
1879
+ swatch: k.swatch11,
1880
+ tint: k.fill11
1501
1881
  },
1502
1882
  {
1503
- fill: O.fill12,
1504
- stroke: O.stroke12,
1505
- swatch: O.swatch12,
1506
- tint: O.fill12
1883
+ fill: k.fill12,
1884
+ stroke: k.stroke12,
1885
+ swatch: k.swatch12,
1886
+ tint: k.fill12
1507
1887
  }
1508
1888
  ];
1509
- function k(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 ae = /\{([a-z_]+)\}/g, oe = [
1894
+ var De = /\{([a-z_]+)\}/g, Oe = [
1515
1895
  "January",
1516
1896
  "February",
1517
1897
  "March",
@@ -1524,7 +1904,7 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1524
1904
  "October",
1525
1905
  "November",
1526
1906
  "December"
1527
- ], se = [
1907
+ ], ke = [
1528
1908
  "Jan",
1529
1909
  "Feb",
1530
1910
  "Mar",
@@ -1537,7 +1917,7 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1537
1917
  "Oct",
1538
1918
  "Nov",
1539
1919
  "Dec"
1540
- ], ce = [
1920
+ ], Ae = [
1541
1921
  "Sunday",
1542
1922
  "Monday",
1543
1923
  "Tuesday",
@@ -1546,10 +1926,10 @@ var ae = /\{([a-z_]+)\}/g, oe = [
1546
1926
  "Friday",
1547
1927
  "Saturday"
1548
1928
  ];
1549
- function A(e) {
1929
+ function j(e) {
1550
1930
  return String(e).padStart(2, "0");
1551
1931
  }
1552
- function le(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 le(e) {
1559
1939
  default: return `${String(e)}th`;
1560
1940
  }
1561
1941
  }
1562
- function ue(e, t) {
1563
- let n = t.getUTCDate(), r = oe[t.getUTCMonth()] ?? "", i = se[t.getUTCMonth()] ?? "", a = ce[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)}-${A(t.getUTCMonth() + 1)}-${A(n)}`;
1566
- case "date_slash": return `${A(t.getUTCMonth() + 1)}/${A(n)}/${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} ${le(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} ${le(n)}, ${String(o)}`;
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 `${A(t.getUTCHours())}:${A(t.getUTCMinutes())}`;
1576
- case "time_secs": return `${A(t.getUTCHours())}:${A(t.getUTCMinutes())}:${A(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 de(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(ae, (e, t) => {
1584
- let n = ue(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 fe = {
1971
+ var Pe = {
1592
1972
  "+1": "👍",
1593
1973
  "-1": "👎",
1594
1974
  100: "💯",
@@ -1625,12 +2005,12 @@ var fe = {
1625
2005
  wink: "😉",
1626
2006
  x: "❌",
1627
2007
  zap: "⚡"
1628
- }, pe = /^[0-9a-f]{1,6}(?:-[0-9a-f]{1,6})*$/i;
1629
- function me(e) {
1630
- return fe[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 he(e) {
1633
- if (e === void 0 || !pe.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 he(e) {
1640
2020
  }
1641
2021
  //#endregion
1642
2022
  //#region src/text/RichText.tsx
1643
- var ge = {
2023
+ var Re = {
1644
2024
  attachment_mention: !0,
1645
2025
  broadcast: !0,
1646
2026
  canvas: !0,
@@ -1663,13 +2043,13 @@ var ge = {
1663
2043
  usergroup: !0,
1664
2044
  work_object_mention: !0,
1665
2045
  workflow_mention: !0
1666
- }, _e = {
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 ve(e) {
2052
+ function Be(e) {
1673
2053
  switch (e.type) {
1674
2054
  case "broadcast":
1675
2055
  case "channel":
@@ -1696,9 +2076,9 @@ function ve(e) {
1696
2076
  }
1697
2077
  return _(e);
1698
2078
  }
1699
- function ye(e) {
1700
- let t = C(e);
1701
- if (t === void 0 || !(t in ge) || !S(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 ye(e) {
1713
2093
  default: return !0;
1714
2094
  }
1715
2095
  }
1716
- function be(e) {
1717
- let t = C(e);
1718
- return t === void 0 || !(t in _e) || !S(e) || !Array.isArray(e.elements) ? !1 : t !== "rich_text_list" || e.elements.every((e) => S(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 j(e, t) {
2100
+ function M(e, t) {
1721
2101
  let n = e;
1722
2102
  return t?.bold === !0 && (n = /* @__PURE__ */ u("strong", {
1723
- ...g(D.bold),
2103
+ ...g(O.bold),
1724
2104
  children: n
1725
2105
  })), t?.italic === !0 && (n = /* @__PURE__ */ u("em", {
1726
- ...g(D.italic),
2106
+ ...g(O.italic),
1727
2107
  children: n
1728
2108
  })), t?.strike === !0 && (n = /* @__PURE__ */ u("s", {
1729
- ...g(D.strike),
2109
+ ...g(O.strike),
1730
2110
  children: n
1731
2111
  })), t?.underline === !0 && (n = /* @__PURE__ */ u("span", {
1732
- ...g(D.underline),
2112
+ ...g(O.underline),
1733
2113
  children: n
1734
2114
  })), t?.code === !0 && (n = /* @__PURE__ */ u("code", {
1735
- ...g(D.inlineCode),
2115
+ ...g(O.inlineCode),
1736
2116
  children: n
1737
2117
  })), n;
1738
2118
  }
1739
- function xe(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 Se({ element: e }) {
2122
+ function We({ element: e }) {
1743
2123
  let { resolvers: t } = x();
1744
- if (!ye(e)) return /* @__PURE__ */ u("span", {
1745
- ...g(D.reference),
1746
- "data-unhandled-rich-text-element": C(e) ?? "unknown",
1747
- children: T(e, "rich text element")
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 = ve(e);
2129
+ let n = Be(e);
1750
2130
  switch (e.type) {
1751
- case "text": return j(e.text, n);
2131
+ case "text": return M(e.text, n);
1752
2132
  case "link": {
1753
- let t = E(e.url), r = e.text ?? e.url;
1754
- return t === void 0 ? j(r, n) : /* @__PURE__ */ u("a", {
1755
- ...g(D.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: j(r, n)
2138
+ children: M(r, n)
1759
2139
  });
1760
2140
  }
1761
2141
  case "emoji": return /* @__PURE__ */ u("span", {
1762
2142
  "aria-label": `:${e.name}:`,
1763
2143
  role: "img",
1764
- children: j(t.emoji?.(e.name, e.unicode) ?? he(e.unicode) ?? me(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
2146
  case "user": return /* @__PURE__ */ u("span", {
1767
- ...g(D.mention),
1768
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
2147
+ ...g(O.mention),
2148
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.user?.(e.user_id) ?? e.user_id] }), n)
1769
2149
  });
1770
2150
  case "usergroup": return /* @__PURE__ */ u("span", {
1771
- ...g(D.mention),
1772
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
2151
+ ...g(O.mention),
2152
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.usergroup?.(e.usergroup_id) ?? e.usergroup_id] }), n)
1773
2153
  });
1774
2154
  case "channel": return /* @__PURE__ */ u("span", {
1775
- ...g(D.mention),
1776
- children: j(/* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
2155
+ ...g(O.mention),
2156
+ children: M(/* @__PURE__ */ d(l, { children: ["#", t.channel?.(e.channel_id) ?? e.channel_id] }), n)
1777
2157
  });
1778
2158
  case "team": return /* @__PURE__ */ u("span", {
1779
- ...g(D.mention),
1780
- children: j(/* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
2159
+ ...g(O.mention),
2160
+ children: M(/* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] }), n)
1781
2161
  });
1782
2162
  case "broadcast": return /* @__PURE__ */ u("span", {
1783
- ...g(D.mention),
1784
- children: j(`@${e.range}`, n)
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) ?? de(e.timestamp, e.format, e.fallback), i = E(e.url);
1788
- return i === void 0 ? j(r, n) : /* @__PURE__ */ u("a", {
1789
- ...g(D.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: j(r, n)
2172
+ children: M(r, n)
1793
2173
  });
1794
2174
  }
1795
2175
  case "color": return /* @__PURE__ */ d("span", { children: [/* @__PURE__ */ u("span", {
1796
- ...g(D.colorSwatch),
2176
+ ...g(O.colorSwatch),
1797
2177
  "aria-hidden": "true",
1798
2178
  style: { backgroundColor: e.value }
1799
- }), j(e.value, n)] });
2179
+ }), M(e.value, n)] });
1800
2180
  case "citation": return /* @__PURE__ */ d("span", {
1801
- ...g(D.reference),
2181
+ ...g(O.reference),
1802
2182
  children: [
1803
2183
  "[",
1804
2184
  e.index ?? e.text ?? "source",
@@ -1816,15 +2196,15 @@ function Se({ element: e }) {
1816
2196
  case "tag":
1817
2197
  case "work_object_mention":
1818
2198
  case "workflow_mention": return /* @__PURE__ */ u("span", {
1819
- ...g(D.reference),
1820
- children: xe(e)
2199
+ ...g(O.reference),
2200
+ children: Ue(e)
1821
2201
  });
1822
2202
  }
1823
2203
  return _(e);
1824
2204
  }
1825
- function Ce({ element: e }) {
2205
+ function Ge({ element: e }) {
1826
2206
  let { resolvers: t } = x();
1827
- if (ye(e)) {
2207
+ if (Ve(e)) {
1828
2208
  switch (e.type) {
1829
2209
  case "text": return e.text;
1830
2210
  case "link": return e.text ?? e.url;
@@ -1834,7 +2214,7 @@ function Ce({ element: e }) {
1834
2214
  case "team": return /* @__PURE__ */ d(l, { children: ["@", t.team?.(e.team_id) ?? e.team_id] });
1835
2215
  case "broadcast": return `@${e.range}`;
1836
2216
  case "emoji": return `:${e.name}:`;
1837
- case "date": return t.date?.(e.timestamp, e.format) ?? de(e.timestamp, e.format, e.fallback);
2217
+ case "date": return t.date?.(e.timestamp, e.format) ?? Ne(e.timestamp, e.format, e.fallback);
1838
2218
  case "color": return e.value;
1839
2219
  case "citation": return `[${e.index ?? e.text ?? "source"}]`;
1840
2220
  case "attachment_mention":
@@ -1847,61 +2227,61 @@ function Ce({ element: e }) {
1847
2227
  case "salesforce_data_field":
1848
2228
  case "tag":
1849
2229
  case "work_object_mention":
1850
- case "workflow_mention": return xe(e);
2230
+ case "workflow_mention": return Ue(e);
1851
2231
  }
1852
2232
  return _(e);
1853
2233
  }
1854
2234
  return /* @__PURE__ */ u("span", {
1855
- ...g(D.reference),
1856
- "data-unhandled-rich-text-element": C(e) ?? "unknown",
1857
- children: T(e, "rich text element")
2235
+ ...g(O.reference),
2236
+ "data-unhandled-rich-text-element": T(e) ?? "unknown",
2237
+ children: E(e, "rich text element")
1858
2238
  });
1859
2239
  }
1860
- function we(e) {
2240
+ function Ke(e) {
1861
2241
  let t = e % 3;
1862
- return t === 1 ? D.listOrderedAlpha : t === 2 ? D.listOrderedRoman : D.listOrdered;
2242
+ return t === 1 ? O.listOrderedAlpha : t === 2 ? O.listOrderedRoman : O.listOrdered;
1863
2243
  }
1864
- function Te(e) {
2244
+ function qe(e) {
1865
2245
  let t = e % 3;
1866
- return t === 1 ? D.listBulletAlternate : t === 2 ? D.listBulletSquare : D.listBullet;
2246
+ return t === 1 ? O.listBulletAlternate : t === 2 ? O.listBulletSquare : O.listBullet;
1867
2247
  }
1868
- function Ee({ element: e, path: n }) {
1869
- if (!be(e)) return /* @__PURE__ */ u("div", {
1870
- ...g(D.unhandled),
1871
- "data-unhandled-rich-text-container": C(e) ?? "unknown",
1872
- children: T(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")
1873
2253
  });
1874
2254
  switch (e.type) {
1875
2255
  case "rich_text_section": return /* @__PURE__ */ u("div", {
1876
- ...g(D.richSection),
2256
+ ...g(O.richSection),
1877
2257
  "data-rich-text-section": !0,
1878
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2258
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1879
2259
  });
1880
2260
  case "rich_text_quote": return /* @__PURE__ */ u("blockquote", {
1881
- ...g(D.quote, e.border === 1 && D.richBorder),
2261
+ ...g(O.quote, e.border === 1 && O.richBorder),
1882
2262
  "data-border": e.border ?? 0,
1883
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2263
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1884
2264
  });
1885
2265
  case "rich_text_preformatted": return /* @__PURE__ */ u("pre", {
1886
- ...g(D.pre, e.border === 1 && D.richBorder),
2266
+ ...g(O.pre, e.border === 1 && O.richBorder),
1887
2267
  "data-border": e.border ?? 0,
1888
2268
  "data-language": e.language,
1889
- children: e.elements.map((e, t) => /* @__PURE__ */ u(Ce, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))
2269
+ children: e.elements.map((e, t) => /* @__PURE__ */ u(Ge, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))
1890
2270
  });
1891
2271
  case "rich_text_list": {
1892
- 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" ? D.listItemOrdered : [D.listItemBullet, Te(i)], l = e.elements.map((e, r) => /* @__PURE__ */ t("li", {
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", {
1893
2273
  ...g(c),
1894
2274
  key: `${n}.elements[${String(r)}]`
1895
- }, e.elements.map((e, t) => /* @__PURE__ */ u(Se, { element: e }, `${C(e) ?? "unknown"}-${String(t)}`))));
2275
+ }, e.elements.map((e, t) => /* @__PURE__ */ u(We, { element: e }, `${T(e) ?? "unknown"}-${String(t)}`))));
1896
2276
  return e.style === "ordered" ? /* @__PURE__ */ u("ol", {
1897
- ...g(D.list, we(i), e.border === 1 && D.richBorder),
2277
+ ...g(O.list, Ke(i), e.border === 1 && O.richBorder),
1898
2278
  "data-border": e.border ?? 0,
1899
2279
  "data-indent": i,
1900
2280
  start: o,
1901
2281
  style: s,
1902
2282
  children: l
1903
2283
  }) : /* @__PURE__ */ u("ul", {
1904
- ...g(D.list, e.border === 1 && D.richBorder),
2284
+ ...g(O.list, e.border === 1 && O.richBorder),
1905
2285
  "data-border": e.border ?? 0,
1906
2286
  "data-indent": i,
1907
2287
  style: s,
@@ -1911,24 +2291,24 @@ function Ee({ element: e, path: n }) {
1911
2291
  }
1912
2292
  return _(e);
1913
2293
  }
1914
- function M({ block: e, className: t, path: n = "block" }) {
1915
- let r = g(D.richText), i = e, a = S(i) ? i.elements : void 0;
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;
1916
2296
  return /* @__PURE__ */ u("div", {
1917
2297
  ...r,
1918
- className: k(r.className, t),
1919
- children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ u(Ee, {
2298
+ className: A(r.className, t),
2299
+ children: Array.isArray(a) ? a.map((e, t) => /* @__PURE__ */ u(Je, {
1920
2300
  element: e,
1921
2301
  path: `${n}.elements[${String(t)}]`
1922
- }, `${C(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ u("div", {
1923
- ...g(D.unhandled),
2302
+ }, `${T(e) ?? "unknown"}-${String(t)}`)) : /* @__PURE__ */ u("div", {
2303
+ ...g(O.unhandled),
1924
2304
  "data-unhandled-rich-text-block": !0,
1925
- children: T(i, "rich text block")
2305
+ children: E(i, "rich text block")
1926
2306
  })
1927
2307
  });
1928
2308
  }
1929
2309
  //#endregion
1930
2310
  //#region src/elements/Elements.tsx
1931
- var De = {
2311
+ var Ye = {
1932
2312
  button: !0,
1933
2313
  channels_select: !0,
1934
2314
  checkboxes: !0,
@@ -1955,68 +2335,68 @@ var De = {
1955
2335
  users_select: !0,
1956
2336
  workflow_button: !0
1957
2337
  };
1958
- function Oe(e) {
1959
- let t = C(e);
1960
- return t !== void 0 && t in De;
2338
+ function Xe(e) {
2339
+ let t = T(e);
2340
+ return t !== void 0 && t in Ye;
1961
2341
  }
1962
- function ke(e) {
1963
- if (!S(e)) return;
2342
+ function Ze(e) {
2343
+ if (!w(e)) return;
1964
2344
  if ("image_url" in e) return typeof e.image_url == "string" ? e.image_url : void 0;
1965
2345
  let t = e.slack_file;
1966
- if (S(t) && typeof t.url == "string") return t.url;
2346
+ if (w(t) && typeof t.url == "string") return t.url;
1967
2347
  }
1968
- function Ae(e) {
1969
- return S(e) && typeof e.text == "string";
2348
+ function Qe(e) {
2349
+ return w(e) && typeof e.text == "string";
1970
2350
  }
1971
- function je(e) {
2351
+ function $e(e) {
1972
2352
  return e === void 0 || typeof e == "string";
1973
2353
  }
1974
- function Me(e) {
1975
- return S(e) && Ae(e.text) && je(e.value) && (e.description === void 0 || Ae(e.description));
2354
+ function et(e) {
2355
+ return w(e) && Qe(e.text) && $e(e.value) && (e.description === void 0 || Qe(e.description));
1976
2356
  }
1977
- function Ne(e) {
1978
- return Array.isArray(e) && e.every(Me);
2357
+ function tt(e) {
2358
+ return Array.isArray(e) && e.every(et);
1979
2359
  }
1980
- function Pe(e) {
2360
+ function nt(e) {
1981
2361
  return Array.isArray(e) && e.every((e) => typeof e == "string");
1982
2362
  }
1983
- function Fe(e) {
1984
- return S(e) && Ae(e.text);
2363
+ function rt(e) {
2364
+ return w(e) && Qe(e.text);
1985
2365
  }
1986
- function Ie(e) {
1987
- return !S(e) || !Ne(e.options) ? !1 : C(e) === "checkboxes" ? e.initial_options === void 0 || Ne(e.initial_options) : e.initial_option === void 0 || Me(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);
1988
2368
  }
1989
- function Le(e) {
1990
- return e.placeholder === void 0 || Ae(e.placeholder);
2369
+ function at(e) {
2370
+ return e.placeholder === void 0 || Qe(e.placeholder);
1991
2371
  }
1992
- function Re(e) {
2372
+ function ot(e) {
1993
2373
  let t = e.option_groups;
1994
- return (e.options === void 0 || Ne(e.options)) && (t === void 0 || Array.isArray(t) && t.every((e) => S(e) && Ne(e.options)));
1995
- }
1996
- function ze(e) {
1997
- if (!S(e) || !Le(e)) return !1;
1998
- switch (C(e) ?? "") {
1999
- case "static_select": return Re(e) && (e.initial_option === void 0 || Me(e.initial_option));
2000
- case "multi_static_select": return Re(e) && (e.initial_options === void 0 || Ne(e.initial_options));
2001
- case "external_select": return e.initial_option === void 0 || Me(e.initial_option);
2002
- case "multi_external_select": return e.initial_options === void 0 || Ne(e.initial_options);
2003
- case "users_select": return je(e.initial_user);
2004
- case "multi_users_select": return e.initial_users === void 0 || Pe(e.initial_users);
2005
- case "channels_select": return je(e.initial_channel);
2006
- case "multi_channels_select": return e.initial_channels === void 0 || Pe(e.initial_channels);
2007
- case "conversations_select": return je(e.initial_conversation);
2008
- 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);
2009
2389
  default: return !1;
2010
2390
  }
2011
2391
  }
2012
- function Be(e) {
2013
- if (!S(e)) return !1;
2014
- switch (C(e) ?? "") {
2392
+ function ct(e) {
2393
+ if (!w(e)) return !1;
2394
+ switch (T(e) ?? "") {
2015
2395
  case "plain_text_input":
2016
2396
  case "email_text_input":
2017
2397
  case "url_text_input":
2018
- case "number_input": return Le(e);
2019
- case "datepicker": return je(e.initial_date);
2398
+ case "number_input": return at(e);
2399
+ case "datepicker": return $e(e.initial_date);
2020
2400
  case "file_input": return e.filetypes === void 0 || Array.isArray(e.filetypes);
2021
2401
  case "datetimepicker":
2022
2402
  case "timepicker":
@@ -2024,71 +2404,76 @@ function Be(e) {
2024
2404
  default: return !1;
2025
2405
  }
2026
2406
  }
2027
- function N({ className: e, element: t }) {
2028
- let n = g(D.unhandled);
2407
+ function P({ className: e, element: t }) {
2408
+ let n = g(O.unhandled);
2029
2409
  return /* @__PURE__ */ u("span", {
2030
2410
  ...n,
2031
- className: k(n.className, e),
2032
- "data-unhandled-element": C(t) ?? "unknown",
2033
- children: T(t, "Block Kit element")
2411
+ className: A(n.className, e),
2412
+ "data-unhandled-element": T(t) ?? "unknown",
2413
+ children: E(t, "Block Kit element")
2034
2414
  });
2035
2415
  }
2036
- function P({ className: e, element: t, variant: n }) {
2037
- let r = g(D.image, n === "accessory" && D.accessoryImage, n === "cardHero" && D.cardHero, n === "cardIcon" && D.cardIcon, n === "context" && D.contextImage), i = t, a = S(i) && typeof i.alt_text == "string" ? i.alt_text : T(i, "image"), o = ke(t);
2038
- return o === void 0 ? /* @__PURE__ */ u("div", {
2039
- ...r,
2040
- "aria-label": a,
2041
- className: k(r.className, e),
2042
- role: "img"
2043
- }) : /* @__PURE__ */ u("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", {
2044
2429
  ...r,
2045
2430
  alt: a,
2046
- className: k(r.className, e),
2431
+ className: A(r.className, e),
2047
2432
  src: o
2048
2433
  });
2049
2434
  }
2050
- function Ve({ blockId: e, className: t, element: n }) {
2435
+ function lt({ blockId: e, className: t, element: n }) {
2051
2436
  let { onAction: r } = x();
2052
- if (!Fe(n)) return /* @__PURE__ */ u(N, {
2437
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2053
2438
  className: t,
2054
2439
  element: n
2055
2440
  });
2056
- let i = g(D.button, n.style === "primary" && D.buttonPrimary, n.style === "danger" && D.buttonDanger), a = () => {
2441
+ let i = g(O.button, n.style === "primary" && O.buttonPrimary, n.style === "danger" && O.buttonDanger), a = () => {
2057
2442
  n.action_id !== void 0 && r?.({
2058
2443
  actionId: n.action_id,
2059
2444
  type: n.type,
2060
2445
  ...e === void 0 ? {} : { blockId: e },
2061
2446
  ...n.value === void 0 ? {} : { value: n.value }
2062
2447
  });
2063
- }, o = E(n.url);
2448
+ }, o = D(n.url);
2064
2449
  return o === void 0 ? /* @__PURE__ */ u("button", {
2065
2450
  ...i,
2066
2451
  "aria-label": n.accessibility_label,
2067
- className: k(i.className, t),
2452
+ className: A(i.className, t),
2068
2453
  onClick: a,
2069
2454
  type: "button",
2070
2455
  children: n.text.text
2071
2456
  }) : /* @__PURE__ */ u("a", {
2072
2457
  ...i,
2073
2458
  "aria-label": n.accessibility_label,
2074
- className: k(i.className, t),
2459
+ className: A(i.className, t),
2075
2460
  href: o,
2076
2461
  onClick: a,
2077
2462
  rel: "noreferrer",
2078
2463
  children: n.text.text
2079
2464
  });
2080
2465
  }
2081
- function He({ blockId: e, className: t, element: n }) {
2466
+ function ut({ blockId: e, className: t, element: n }) {
2082
2467
  let { onAction: r } = x();
2083
- if (!S(n)) return /* @__PURE__ */ u(N, {
2468
+ if (!w(n)) return /* @__PURE__ */ u(P, {
2084
2469
  className: t,
2085
2470
  element: n
2086
2471
  });
2087
- let i = g(D.button, D.overflowButton);
2472
+ let i = g(O.button, O.overflowButton);
2088
2473
  return /* @__PURE__ */ u("button", {
2089
2474
  ...i,
2090
2475
  "aria-label": "More options",
2091
- className: k(i.className, t),
2476
+ className: A(i.className, t),
2092
2477
  onClick: () => {
2093
2478
  n.action_id !== void 0 && r?.({
2094
2479
  actionId: n.action_id,
@@ -2097,33 +2482,33 @@ function He({ blockId: e, className: t, element: n }) {
2097
2482
  });
2098
2483
  },
2099
2484
  type: "button",
2100
- children: "⋯"
2485
+ children: /* @__PURE__ */ u(oe, { size: 16 })
2101
2486
  });
2102
2487
  }
2103
- function Ue(e, t) {
2488
+ function dt(e, t) {
2104
2489
  return e.value ?? `${e.text.text}-${String(t)}`;
2105
2490
  }
2106
- function We(e, t) {
2491
+ function ft(e, t) {
2107
2492
  return t?.some((t) => t.value === e.value && t.text.text === e.text.text) ?? !1;
2108
2493
  }
2109
- function Ge({ blockId: e, className: n, element: r }) {
2494
+ function pt({ blockId: e, className: n, element: r }) {
2110
2495
  let { onAction: i } = x(), o = a();
2111
- if (!Ie(r)) return /* @__PURE__ */ u(N, {
2496
+ if (!it(r)) return /* @__PURE__ */ u(P, {
2112
2497
  className: n,
2113
2498
  element: r
2114
2499
  });
2115
- let s = g(D.choiceGroup), c = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2500
+ let s = g(O.choiceGroup), c = r.type === "checkboxes" ? r.initial_options : r.initial_option === void 0 ? void 0 : [r.initial_option];
2116
2501
  return /* @__PURE__ */ u("fieldset", {
2117
2502
  ...s,
2118
- className: k(s.className, n),
2503
+ className: A(s.className, n),
2119
2504
  "data-element-type": r.type,
2120
2505
  children: r.options.map((n, a) => {
2121
- let s = Ue(n, a);
2506
+ let s = dt(n, a);
2122
2507
  return /* @__PURE__ */ t("label", {
2123
- ...g(D.choice),
2508
+ ...g(O.choice),
2124
2509
  key: s
2125
2510
  }, /* @__PURE__ */ u("input", {
2126
- defaultChecked: We(n, c),
2511
+ defaultChecked: ft(n, c),
2127
2512
  name: o,
2128
2513
  onChange: (t) => {
2129
2514
  if (r.action_id !== void 0) {
@@ -2139,49 +2524,49 @@ function Ge({ blockId: e, className: n, element: r }) {
2139
2524
  type: r.type === "checkboxes" ? "checkbox" : "radio",
2140
2525
  value: s
2141
2526
  }), /* @__PURE__ */ d("span", { children: [n.text.text, n.description === void 0 ? null : /* @__PURE__ */ d("span", {
2142
- ...g(D.smallText),
2527
+ ...g(O.smallText),
2143
2528
  children: [" ", n.description.text]
2144
2529
  })] }));
2145
2530
  })
2146
2531
  });
2147
2532
  }
2148
- function Ke(e) {
2533
+ function mt(e) {
2149
2534
  return e.options === void 0 ? e.option_groups?.flatMap((e) => e.options) ?? [] : e.options;
2150
2535
  }
2151
- function qe(e) {
2536
+ function ht(e) {
2152
2537
  return e.map((e, t) => ({
2153
2538
  label: e.text.text,
2154
- value: Ue(e, t)
2539
+ value: dt(e, t)
2155
2540
  }));
2156
2541
  }
2157
- function Je(e) {
2542
+ function gt(e) {
2158
2543
  return e.map((e) => ({
2159
2544
  label: e,
2160
2545
  value: e
2161
2546
  }));
2162
2547
  }
2163
- function Ye(e) {
2548
+ function _t(e) {
2164
2549
  switch (e.type) {
2165
2550
  case "static_select":
2166
- case "multi_static_select": return qe(Ke(e));
2167
- case "external_select": return e.initial_option === void 0 ? [] : qe([e.initial_option]);
2168
- case "multi_external_select": return qe(e.initial_options ?? []);
2169
- case "users_select": return Je(e.initial_user === void 0 ? [] : [e.initial_user]);
2170
- case "multi_users_select": return Je(e.initial_users ?? []);
2171
- case "channels_select": return Je(e.initial_channel === void 0 ? [] : [e.initial_channel]);
2172
- case "multi_channels_select": return Je(e.initial_channels ?? []);
2173
- case "conversations_select": return Je(e.initial_conversation === void 0 ? [] : [e.initial_conversation]);
2174
- 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 ?? []);
2175
2560
  }
2176
2561
  return _(e);
2177
2562
  }
2178
- function Xe(e, t) {
2179
- 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)] : []);
2180
2565
  }
2181
- function Ze(e, t) {
2566
+ function yt(e, t) {
2182
2567
  switch (e.type) {
2183
- case "static_select": return Xe(Ke(e), e.initial_option === void 0 ? void 0 : [e.initial_option]);
2184
- 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);
2185
2570
  case "external_select":
2186
2571
  case "multi_external_select":
2187
2572
  case "users_select":
@@ -2193,7 +2578,7 @@ function Ze(e, t) {
2193
2578
  }
2194
2579
  return _(e);
2195
2580
  }
2196
- function Qe(e) {
2581
+ function bt(e) {
2197
2582
  if ("placeholder" in e && e.placeholder !== void 0) return e.placeholder.text;
2198
2583
  switch (e.type) {
2199
2584
  case "users_select":
@@ -2209,13 +2594,13 @@ function Qe(e) {
2209
2594
  }
2210
2595
  return _(e);
2211
2596
  }
2212
- function $e({ blockId: e, className: t, element: n }) {
2597
+ function xt({ blockId: e, className: t, element: n }) {
2213
2598
  let { onAction: r } = x();
2214
- if (!ze(n)) return /* @__PURE__ */ u(N, {
2599
+ if (!st(n)) return /* @__PURE__ */ u(P, {
2215
2600
  className: t,
2216
2601
  element: n
2217
2602
  });
2218
- let i = g(D.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) => {
2219
2604
  if (n.action_id !== void 0) {
2220
2605
  let i = Array.from(t.currentTarget.selectedOptions, (e) => e.value);
2221
2606
  r?.({
@@ -2225,51 +2610,67 @@ function $e({ blockId: e, className: t, element: n }) {
2225
2610
  ...a ? { values: i } : { value: t.currentTarget.value }
2226
2611
  });
2227
2612
  }
2228
- };
2229
- return /* @__PURE__ */ d("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", {
2230
2625
  ...i,
2231
- "aria-label": Qe(n),
2232
- className: k(i.className, t),
2233
- defaultValue: a ? s : s[0] ?? "",
2234
- multiple: a,
2626
+ "aria-label": bt(n),
2627
+ className: A(i.className, t),
2628
+ defaultValue: s,
2629
+ multiple: !0,
2235
2630
  onChange: c,
2236
- children: [/* @__PURE__ */ u("option", {
2237
- disabled: !0,
2238
- value: "",
2239
- children: Qe(n)
2240
- }), o.length === 0 ? /* @__PURE__ */ u("option", {
2241
- value: "preview",
2242
- children: "Preview option"
2243
- }) : o.map((e) => /* @__PURE__ */ u("option", {
2244
- value: e.value,
2245
- children: e.label
2246
- }, 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
+ })]
2247
2648
  });
2248
2649
  }
2249
- function et(e) {
2650
+ function St(e) {
2250
2651
  return String(e).padStart(2, "0");
2251
2652
  }
2252
- function tt(e) {
2253
- 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())}`;
2254
2655
  }
2255
- function nt(e) {
2656
+ function wt(e) {
2256
2657
  if (e === void 0) return "Select a date";
2257
- if (e === tt(/* @__PURE__ */ new Date())) return "Today";
2658
+ if (e === Ct(/* @__PURE__ */ new Date())) return "Today";
2258
2659
  let [t = "", n = "", r = ""] = e.split("-");
2259
2660
  return `${n}/${r}/${t}`;
2260
2661
  }
2261
- function rt(e) {
2662
+ function Tt(e) {
2262
2663
  if (e === void 0) return;
2263
2664
  let t = /* @__PURE__ */ new Date(e * 1e3);
2264
- 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())}`;
2265
2666
  }
2266
- function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2667
+ function Et({ blockId: e, className: t, element: n, path: r = "element" }) {
2267
2668
  let { onAction: i } = x();
2268
- if (!Be(n)) return /* @__PURE__ */ u(N, {
2669
+ if (!ct(n)) return /* @__PURE__ */ u(P, {
2269
2670
  className: t,
2270
2671
  element: n
2271
2672
  });
2272
- let a = g(D.input), o = (t) => {
2673
+ let a = g(O.input), o = (t) => {
2273
2674
  n.action_id !== void 0 && i?.({
2274
2675
  actionId: n.action_id,
2275
2676
  type: n.type,
@@ -2282,7 +2683,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2282
2683
  switch (n.type) {
2283
2684
  case "plain_text_input": return n.multiline === !0 ? /* @__PURE__ */ u("textarea", {
2284
2685
  ...a,
2285
- className: k(a.className, t),
2686
+ className: A(a.className, t),
2286
2687
  defaultValue: n.initial_value,
2287
2688
  maxLength: n.max_length,
2288
2689
  minLength: n.min_length,
@@ -2291,7 +2692,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2291
2692
  rows: 4
2292
2693
  }) : /* @__PURE__ */ u("input", {
2293
2694
  ...a,
2294
- className: k(a.className, t),
2695
+ className: A(a.className, t),
2295
2696
  defaultValue: n.initial_value,
2296
2697
  maxLength: n.max_length,
2297
2698
  minLength: n.min_length,
@@ -2301,7 +2702,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2301
2702
  });
2302
2703
  case "email_text_input": return /* @__PURE__ */ u("input", {
2303
2704
  ...a,
2304
- className: k(a.className, t),
2705
+ className: A(a.className, t),
2305
2706
  defaultValue: n.initial_value,
2306
2707
  onChange: s,
2307
2708
  placeholder: n.placeholder?.text,
@@ -2309,7 +2710,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2309
2710
  });
2310
2711
  case "url_text_input": return /* @__PURE__ */ u("input", {
2311
2712
  ...a,
2312
- className: k(a.className, t),
2713
+ className: A(a.className, t),
2313
2714
  defaultValue: n.initial_value,
2314
2715
  onChange: s,
2315
2716
  placeholder: n.placeholder?.text,
@@ -2317,7 +2718,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2317
2718
  });
2318
2719
  case "number_input": return /* @__PURE__ */ u("input", {
2319
2720
  ...a,
2320
- className: k(a.className, t),
2721
+ className: A(a.className, t),
2321
2722
  defaultValue: n.initial_value,
2322
2723
  max: n.max_value,
2323
2724
  min: n.min_value,
@@ -2327,40 +2728,40 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2327
2728
  type: "number"
2328
2729
  });
2329
2730
  case "datepicker": {
2330
- let e = g(D.button, D.picker);
2731
+ let e = g(O.button, O.picker);
2331
2732
  return /* @__PURE__ */ d("button", {
2332
2733
  ...e,
2333
2734
  "aria-label": "Date",
2334
- className: k(e.className, t),
2735
+ className: A(e.className, t),
2335
2736
  onClick: () => {
2336
2737
  o(n.initial_date ?? "");
2337
2738
  },
2338
2739
  type: "button",
2339
2740
  children: [
2340
2741
  /* @__PURE__ */ u("span", {
2341
- ...g(D.pickerIcon),
2742
+ ...g(O.pickerIcon),
2342
2743
  "aria-hidden": "true",
2343
- children: "▦"
2744
+ children: /* @__PURE__ */ u(C, { size: 16 })
2344
2745
  }),
2345
- nt(n.initial_date),
2746
+ wt(n.initial_date),
2346
2747
  /* @__PURE__ */ u("span", {
2347
- ...g(D.pickerChevron),
2748
+ ...g(O.pickerChevron),
2348
2749
  "aria-hidden": "true",
2349
- children: "⌄"
2750
+ children: /* @__PURE__ */ u(ee, { size: 16 })
2350
2751
  })
2351
2752
  ]
2352
2753
  });
2353
2754
  }
2354
2755
  case "datetimepicker": return /* @__PURE__ */ u("input", {
2355
2756
  ...a,
2356
- className: k(a.className, t),
2357
- defaultValue: rt(n.initial_date_time),
2757
+ className: A(a.className, t),
2758
+ defaultValue: Tt(n.initial_date_time),
2358
2759
  onChange: s,
2359
2760
  type: "datetime-local"
2360
2761
  });
2361
2762
  case "timepicker": return /* @__PURE__ */ u("input", {
2362
2763
  ...a,
2363
- className: k(a.className, t),
2764
+ className: A(a.className, t),
2364
2765
  defaultValue: n.initial_time,
2365
2766
  onChange: s,
2366
2767
  type: "time"
@@ -2368,7 +2769,7 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2368
2769
  case "file_input": return /* @__PURE__ */ u("input", {
2369
2770
  ...a,
2370
2771
  accept: n.filetypes?.map((e) => `.${e}`).join(","),
2371
- className: k(a.className, t),
2772
+ className: A(a.className, t),
2372
2773
  multiple: (n.max_files ?? 10) > 1,
2373
2774
  onChange: (e) => {
2374
2775
  o(e.currentTarget.files?.[0]?.name ?? "");
@@ -2377,14 +2778,14 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2377
2778
  });
2378
2779
  case "rich_text_input": return /* @__PURE__ */ u("div", {
2379
2780
  ...a,
2380
- className: k(a.className, t),
2781
+ className: A(a.className, t),
2381
2782
  contentEditable: !0,
2382
2783
  onInput: (e) => {
2383
2784
  o(e.currentTarget.textContent ?? "");
2384
2785
  },
2385
2786
  role: "textbox",
2386
2787
  suppressContentEditableWarning: !0,
2387
- children: n.initial_value === void 0 ? null : /* @__PURE__ */ u(M, {
2788
+ children: n.initial_value === void 0 ? null : /* @__PURE__ */ u(N, {
2388
2789
  block: n.initial_value,
2389
2790
  path: `${r}.initial_value`
2390
2791
  })
@@ -2392,28 +2793,28 @@ function it({ blockId: e, className: t, element: n, path: r = "element" }) {
2392
2793
  }
2393
2794
  return _(n);
2394
2795
  }
2395
- function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2396
- if (!Oe(n)) return /* @__PURE__ */ u(N, {
2796
+ function Dt({ blockId: e, className: t, element: n, path: r = "element" }) {
2797
+ if (!Xe(n)) return /* @__PURE__ */ u(P, {
2397
2798
  className: t,
2398
2799
  element: n
2399
2800
  });
2400
- if (n.type === "image") return /* @__PURE__ */ u(P, {
2801
+ if (n.type === "image") return /* @__PURE__ */ u(F, {
2401
2802
  className: t,
2402
2803
  element: n
2403
2804
  });
2404
2805
  switch (n.type) {
2405
- case "button": return /* @__PURE__ */ u(Ve, {
2806
+ case "button": return /* @__PURE__ */ u(lt, {
2406
2807
  blockId: e,
2407
2808
  className: t,
2408
2809
  element: n
2409
2810
  });
2410
2811
  case "checkboxes":
2411
- case "radio_buttons": return /* @__PURE__ */ u(Ge, {
2812
+ case "radio_buttons": return /* @__PURE__ */ u(pt, {
2412
2813
  blockId: e,
2413
2814
  className: t,
2414
2815
  element: n
2415
2816
  });
2416
- case "overflow": return /* @__PURE__ */ u(He, {
2817
+ case "overflow": return /* @__PURE__ */ u(ut, {
2417
2818
  blockId: e,
2418
2819
  className: t,
2419
2820
  element: n
@@ -2427,7 +2828,7 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2427
2828
  case "multi_static_select":
2428
2829
  case "multi_users_select":
2429
2830
  case "static_select":
2430
- case "users_select": return /* @__PURE__ */ u($e, {
2831
+ case "users_select": return /* @__PURE__ */ u(xt, {
2431
2832
  blockId: e,
2432
2833
  className: t,
2433
2834
  element: n
@@ -2440,21 +2841,21 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2440
2841
  case "plain_text_input":
2441
2842
  case "rich_text_input":
2442
2843
  case "timepicker":
2443
- case "url_text_input": return /* @__PURE__ */ u(it, {
2844
+ case "url_text_input": return /* @__PURE__ */ u(Et, {
2444
2845
  blockId: e,
2445
2846
  className: t,
2446
2847
  element: n,
2447
2848
  path: r
2448
2849
  });
2449
2850
  case "workflow_button": {
2450
- if (!Fe(n)) return /* @__PURE__ */ u(N, {
2851
+ if (!rt(n)) return /* @__PURE__ */ u(P, {
2451
2852
  className: t,
2452
2853
  element: n
2453
2854
  });
2454
- let e = g(D.button);
2855
+ let e = g(O.button);
2455
2856
  return /* @__PURE__ */ u("button", {
2456
2857
  ...e,
2457
- className: k(e.className, t),
2858
+ className: A(e.className, t),
2458
2859
  type: "button",
2459
2860
  children: n.text.text
2460
2861
  });
@@ -2464,19 +2865,19 @@ function at({ blockId: e, className: t, element: n, path: r = "element" }) {
2464
2865
  }
2465
2866
  //#endregion
2466
2867
  //#region src/text/Mrkdwn.tsx
2467
- var ot = /* @__PURE__ */ new Set([
2868
+ var Ot = /* @__PURE__ */ new Set([
2468
2869
  "*",
2469
2870
  "_",
2470
2871
  "~",
2471
2872
  "`",
2472
2873
  "<",
2473
2874
  ":"
2474
- ]), st = /^[a-z0-9_+-]{1,64}$/, ct = /[A-Za-z0-9]/;
2475
- function lt(e) {
2875
+ ]), kt = /^[a-z0-9_+-]{1,64}$/, At = /[A-Za-z0-9]/;
2876
+ function jt(e) {
2476
2877
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
2477
2878
  }
2478
- function ut(e) {
2479
- let t = lt(e);
2879
+ function Mt(e) {
2880
+ let t = jt(e);
2480
2881
  if (t.startsWith("@")) {
2481
2882
  let [e = "", n] = t.slice(1).split("|", 2);
2482
2883
  return {
@@ -2530,14 +2931,14 @@ function ut(e) {
2530
2931
  label: t
2531
2932
  };
2532
2933
  }
2533
- function dt(e, t) {
2534
- 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;
2535
2936
  return e.length;
2536
2937
  }
2537
- function ft(e, t) {
2938
+ function Pt(e, t) {
2538
2939
  if (t > 16) return [{
2539
2940
  kind: "text",
2540
- value: lt(e)
2941
+ value: jt(e)
2541
2942
  }];
2542
2943
  let n = [], r = 0;
2543
2944
  for (; r < e.length;) {
@@ -2546,7 +2947,7 @@ function ft(e, t) {
2546
2947
  if (t >= 0) {
2547
2948
  n.push({
2548
2949
  kind: "code_block",
2549
- value: lt(e.slice(r + 3, t))
2950
+ value: jt(e.slice(r + 3, t))
2550
2951
  }), r = t + 3;
2551
2952
  continue;
2552
2953
  }
@@ -2557,7 +2958,7 @@ function ft(e, t) {
2557
2958
  if (t > r + 1) {
2558
2959
  n.push({
2559
2960
  kind: "code",
2560
- value: lt(e.slice(r + 1, t))
2961
+ value: jt(e.slice(r + 1, t))
2561
2962
  }), r = t + 1;
2562
2963
  continue;
2563
2964
  }
@@ -2567,7 +2968,7 @@ function ft(e, t) {
2567
2968
  if (a > r + 1) {
2568
2969
  let o = i === "*" ? "bold" : i === "_" ? "italic" : "strike";
2569
2970
  n.push({
2570
- children: ft(e.slice(r + 1, a), t + 1),
2971
+ children: Pt(e.slice(r + 1, a), t + 1),
2571
2972
  kind: o
2572
2973
  }), r = a + 1;
2573
2974
  continue;
@@ -2576,7 +2977,7 @@ function ft(e, t) {
2576
2977
  if (i === "<") {
2577
2978
  let t = e.indexOf(">", r + 1);
2578
2979
  if (t >= 0) {
2579
- let i = ut(e.slice(r + 1, t));
2980
+ let i = Mt(e.slice(r + 1, t));
2580
2981
  if (i !== void 0) {
2581
2982
  n.push(i), r = t + 1;
2582
2983
  continue;
@@ -2584,8 +2985,8 @@ function ft(e, t) {
2584
2985
  }
2585
2986
  }
2586
2987
  if (i === ":") {
2587
- 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] ?? "");
2588
- 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)) {
2589
2990
  n.push({
2590
2991
  kind: "emoji",
2591
2992
  name: i
@@ -2593,79 +2994,79 @@ function ft(e, t) {
2593
2994
  continue;
2594
2995
  }
2595
2996
  }
2596
- let a = dt(e, r + 1);
2997
+ let a = Nt(e, r + 1);
2597
2998
  n.push({
2598
2999
  kind: "text",
2599
- value: lt(e.slice(r, a))
3000
+ value: jt(e.slice(r, a))
2600
3001
  }), r = a;
2601
3002
  }
2602
3003
  return n;
2603
3004
  }
2604
- function pt(e) {
2605
- return ft(e, 0);
3005
+ function Ft(e) {
3006
+ return Pt(e, 0);
2606
3007
  }
2607
- function mt({ token: e }) {
3008
+ function It({ token: e }) {
2608
3009
  let { resolvers: t } = x();
2609
3010
  switch (e.kind) {
2610
3011
  case "text": return e.value;
2611
3012
  case "bold": return /* @__PURE__ */ u("strong", {
2612
- ...g(D.bold),
2613
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3013
+ ...g(O.bold),
3014
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2614
3015
  });
2615
3016
  case "italic": return /* @__PURE__ */ u("em", {
2616
- ...g(D.italic),
2617
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3017
+ ...g(O.italic),
3018
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2618
3019
  });
2619
3020
  case "strike": return /* @__PURE__ */ u("s", {
2620
- ...g(D.strike),
2621
- children: e.children.map((e, t) => /* @__PURE__ */ u(mt, { token: e }, `${e.kind}-${String(t)}`))
3021
+ ...g(O.strike),
3022
+ children: e.children.map((e, t) => /* @__PURE__ */ u(It, { token: e }, `${e.kind}-${String(t)}`))
2622
3023
  });
2623
3024
  case "code": return /* @__PURE__ */ u("code", {
2624
- ...g(D.inlineCode),
3025
+ ...g(O.inlineCode),
2625
3026
  children: e.value
2626
3027
  });
2627
3028
  case "code_block": return /* @__PURE__ */ u("pre", {
2628
- ...g(D.pre),
3029
+ ...g(O.pre),
2629
3030
  children: e.value
2630
3031
  });
2631
3032
  case "emoji": return /* @__PURE__ */ u("span", {
2632
3033
  "aria-label": `:${e.name}:`,
2633
3034
  role: "img",
2634
- children: t.emoji?.(e.name) ?? me(e.name) ?? `:${e.name}:`
3035
+ children: t.emoji?.(e.name) ?? Ie(e.name) ?? `:${e.name}:`
2635
3036
  });
2636
3037
  case "link": {
2637
- let t = E(e.href);
3038
+ let t = D(e.href);
2638
3039
  return t === void 0 ? e.label : /* @__PURE__ */ u("a", {
2639
- ...g(D.link),
3040
+ ...g(O.link),
2640
3041
  href: t,
2641
3042
  rel: "noreferrer",
2642
3043
  children: e.label
2643
3044
  });
2644
3045
  }
2645
3046
  case "user": return /* @__PURE__ */ d("span", {
2646
- ...g(D.mention),
3047
+ ...g(O.mention),
2647
3048
  children: ["@", t.user?.(e.id) ?? e.fallback ?? e.id]
2648
3049
  });
2649
3050
  case "channel": return /* @__PURE__ */ d("span", {
2650
- ...g(D.mention),
3051
+ ...g(O.mention),
2651
3052
  children: ["#", t.channel?.(e.id) ?? e.fallback ?? e.id]
2652
3053
  });
2653
3054
  case "usergroup": return /* @__PURE__ */ d("span", {
2654
- ...g(D.mention),
3055
+ ...g(O.mention),
2655
3056
  children: ["@", t.usergroup?.(e.id) ?? e.fallback ?? e.id]
2656
3057
  });
2657
3058
  case "team": return /* @__PURE__ */ d("span", {
2658
- ...g(D.mention),
3059
+ ...g(O.mention),
2659
3060
  children: ["@", t.team?.(e.id) ?? e.id]
2660
3061
  });
2661
3062
  case "broadcast": return /* @__PURE__ */ d("span", {
2662
- ...g(D.mention),
3063
+ ...g(O.mention),
2663
3064
  children: ["@", e.range]
2664
3065
  });
2665
3066
  case "date": {
2666
- let n = Number(e.id), r = Number.isFinite(n) ? t.date?.(n, e.format ?? "") ?? de(n, e.format ?? "", e.fallback) : e.fallback ?? e.id, i = E(e.href);
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);
2667
3068
  return i === void 0 ? r : /* @__PURE__ */ u("a", {
2668
- ...g(D.link),
3069
+ ...g(O.link),
2669
3070
  href: i,
2670
3071
  rel: "noreferrer",
2671
3072
  children: r
@@ -2674,43 +3075,43 @@ function mt({ token: e }) {
2674
3075
  }
2675
3076
  return _(e);
2676
3077
  }
2677
- function F({ className: e, text: t }) {
2678
- let n = g(D.text);
3078
+ function I({ className: e, text: t }) {
3079
+ let n = g(O.text);
2679
3080
  return /* @__PURE__ */ u("div", {
2680
3081
  ...n,
2681
- className: k(n.className, e),
2682
- children: pt(t).map((e, t) => /* @__PURE__ */ u(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)}`))
2683
3084
  });
2684
3085
  }
2685
3086
  //#endregion
2686
3087
  //#region src/text/Text.tsx
2687
- function I({ className: e, text: t }) {
2688
- let n = t, r = S(n) && typeof n.text == "string" ? n.text : T(n, "text");
2689
- if (C(n) === "mrkdwn") return /* @__PURE__ */ u(F, {
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, {
2690
3091
  className: e,
2691
3092
  text: r
2692
3093
  });
2693
- let i = g(D.text);
3094
+ let i = g(O.text);
2694
3095
  return /* @__PURE__ */ u("div", {
2695
3096
  ...i,
2696
- className: k(i.className, e),
3097
+ className: A(i.className, e),
2697
3098
  children: r
2698
3099
  });
2699
3100
  }
2700
3101
  //#endregion
2701
3102
  //#region src/text/Markdown.tsx
2702
- function ht(e) {
3103
+ function Lt(e) {
2703
3104
  let t = e.trim();
2704
3105
  return t === "---" || t === "***" || t === "___";
2705
3106
  }
2706
- function gt(e) {
3107
+ function Rt(e) {
2707
3108
  let t = e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|");
2708
3109
  return t.length > 0 && t.every((e) => /^:?-{3,}:?$/.test(e.trim()));
2709
3110
  }
2710
- function _t(e) {
3111
+ function zt(e) {
2711
3112
  return e.trim().replace(/^\|/, "").replace(/\|$/, "").split("|").map((e) => e.trim());
2712
3113
  }
2713
- function vt(e) {
3114
+ function Bt(e) {
2714
3115
  let t = /^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/.exec(e);
2715
3116
  if (t !== null) return {
2716
3117
  checked: (t[1] ?? "").toLowerCase() === "x",
@@ -2731,7 +3132,7 @@ function vt(e) {
2731
3132
  text: r[1] ?? ""
2732
3133
  };
2733
3134
  }
2734
- function yt(e) {
3135
+ function Vt(e) {
2735
3136
  let t = e.split("\n"), n = [], r = 0;
2736
3137
  for (; r < t.length;) {
2737
3138
  let e = t[r] ?? "";
@@ -2749,9 +3150,9 @@ function yt(e) {
2749
3150
  });
2750
3151
  continue;
2751
3152
  }
2752
- if (e.includes("|") && r + 1 < t.length && gt(t[r + 1] ?? "")) {
2753
- let i = _t(e), a = [];
2754
- 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;
2755
3156
  n.push({
2756
3157
  headers: i,
2757
3158
  kind: "table",
@@ -2759,7 +3160,7 @@ function yt(e) {
2759
3160
  });
2760
3161
  continue;
2761
3162
  }
2762
- if (ht(e)) {
3163
+ if (Lt(e)) {
2763
3164
  n.push({ kind: "divider" }), r += 1;
2764
3165
  continue;
2765
3166
  }
@@ -2772,11 +3173,11 @@ function yt(e) {
2772
3173
  }), r += 1;
2773
3174
  continue;
2774
3175
  }
2775
- let a = vt(e);
3176
+ let a = Bt(e);
2776
3177
  if (a !== void 0) {
2777
3178
  let e = [a];
2778
3179
  for (r += 1; r < t.length;) {
2779
- let n = vt(t[r] ?? "");
3180
+ let n = Bt(t[r] ?? "");
2780
3181
  if (n === void 0 || n.ordered !== a.ordered) break;
2781
3182
  e.push(n), r += 1;
2782
3183
  }
@@ -2799,7 +3200,7 @@ function yt(e) {
2799
3200
  let o = [e];
2800
3201
  for (r += 1; r < t.length && (t[r] ?? "").trim().length > 0;) {
2801
3202
  let e = t[r] ?? "";
2802
- 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;
2803
3204
  o.push(e), r += 1;
2804
3205
  }
2805
3206
  n.push({
@@ -2809,31 +3210,31 @@ function yt(e) {
2809
3210
  }
2810
3211
  return n;
2811
3212
  }
2812
- function L(e) {
3213
+ function Ht(e) {
2813
3214
  return e.replace(/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g, "<$2|$1>").replaceAll("**", "*").replaceAll("__", "*").replaceAll("~~", "~");
2814
3215
  }
2815
- function bt(e) {
2816
- return e <= 1 ? D.heading1 : e === 2 ? D.heading2 : e === 3 ? D.heading3 : D.heading4;
3216
+ function Ut(e) {
3217
+ return e <= 1 ? O.heading1 : e === 2 ? O.heading2 : e === 3 ? O.heading3 : O.heading4;
2817
3218
  }
2818
- function xt({ token: e }) {
3219
+ function Wt({ token: e }) {
2819
3220
  switch (e.kind) {
2820
- case "paragraph": return /* @__PURE__ */ u(F, { text: L(e.text) });
3221
+ case "paragraph": return /* @__PURE__ */ u(I, { text: Ht(e.text) });
2821
3222
  case "quote": return /* @__PURE__ */ u("blockquote", {
2822
- ...g(D.quote),
2823
- children: /* @__PURE__ */ u(F, { text: L(e.text) })
3223
+ ...g(O.quote),
3224
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2824
3225
  });
2825
3226
  case "heading": return /* @__PURE__ */ u("div", {
2826
- ...g(D.heading, bt(e.level)),
2827
- children: /* @__PURE__ */ u(F, { text: L(e.text) })
3227
+ ...g(O.heading, Ut(e.level)),
3228
+ children: /* @__PURE__ */ u(I, { text: Ht(e.text) })
2828
3229
  });
2829
- case "divider": return /* @__PURE__ */ u("hr", { ...g(D.divider) });
3230
+ case "divider": return /* @__PURE__ */ u("hr", { ...g(O.divider) });
2830
3231
  case "code": return /* @__PURE__ */ u("pre", {
2831
- ...g(D.pre),
3232
+ ...g(O.pre),
2832
3233
  "data-language": e.language,
2833
3234
  children: e.text
2834
3235
  });
2835
3236
  case "list": {
2836
- let n = e.ordered ? D.listItemOrdered : [D.listItemBullet, D.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
3237
+ let n = e.ordered ? O.listItemOrdered : [O.listItemBullet, O.listBullet], r = e.items.map((e, r) => /* @__PURE__ */ t("li", {
2837
3238
  ...g(n),
2838
3239
  key: `${e.text}-${String(r)}`
2839
3240
  }, e.task ? /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("input", {
@@ -2841,84 +3242,84 @@ function xt({ token: e }) {
2841
3242
  disabled: !0,
2842
3243
  readOnly: !0,
2843
3244
  type: "checkbox"
2844
- }), " "] }) : null, /* @__PURE__ */ u(F, { text: L(e.text) })));
3245
+ }), " "] }) : null, /* @__PURE__ */ u(I, { text: Ht(e.text) })));
2845
3246
  return e.ordered ? /* @__PURE__ */ u("ol", {
2846
- ...g(D.list, D.listOrdered),
3247
+ ...g(O.list, O.listOrdered),
2847
3248
  children: r
2848
3249
  }) : /* @__PURE__ */ u("ul", {
2849
- ...g(D.list),
3250
+ ...g(O.list),
2850
3251
  children: r
2851
3252
  });
2852
3253
  }
2853
3254
  case "table": return /* @__PURE__ */ u("div", {
2854
- ...g(D.tableScroller),
3255
+ ...g(O.tableScroller),
2855
3256
  children: /* @__PURE__ */ d("table", {
2856
- ...g(D.table),
3257
+ ...g(O.table),
2857
3258
  children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: e.headers.map((e, n) => /* @__PURE__ */ t("th", {
2858
- ...g(D.tableCell, D.tableHeader, n === 0 && D.tableCellFirstColumn),
3259
+ ...g(O.tableCell, O.tableHeader, n === 0 && O.tableCellFirstColumn),
2859
3260
  key: `${e}-${String(n)}`,
2860
3261
  scope: "col"
2861
- }, /* @__PURE__ */ u(F, { text: L(e) }))) }) }), /* @__PURE__ */ u("tbody", { children: e.rows.map((e, n) => /* @__PURE__ */ u("tr", { children: e.map((e, n) => /* @__PURE__ */ t("td", {
2862
- ...g(D.tableCell, n === 0 && D.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),
2863
3264
  key: `${e}-${String(n)}`
2864
- }, /* @__PURE__ */ u(F, { text: L(e) }))) }, `row-${String(n)}`)) })]
3265
+ }, /* @__PURE__ */ u(I, { text: Ht(e) }))) }, `row-${String(n)}`)) })]
2865
3266
  })
2866
3267
  });
2867
3268
  }
2868
3269
  return _(e);
2869
3270
  }
2870
- function St({ markdown: e }) {
3271
+ function Gt({ markdown: e }) {
2871
3272
  return /* @__PURE__ */ u("div", {
2872
- ...g(D.markdown),
2873
- children: yt(e).map((e, t) => /* @__PURE__ */ u(xt, { token: e }, `${e.kind}-${String(t)}`))
3273
+ ...g(O.markdown),
3274
+ children: Vt(e).map((e, t) => /* @__PURE__ */ u(Wt, { token: e }, `${e.kind}-${String(t)}`))
2874
3275
  });
2875
3276
  }
2876
3277
  //#endregion
2877
3278
  //#region src/blocks/BasicBlocks.tsx
2878
- function Ct(e) {
2879
- return S(e) && e.type === "image";
3279
+ function Kt(e) {
3280
+ return w(e) && e.type === "image";
2880
3281
  }
2881
3282
  function R({ blockId: e, blockType: t, children: n, className: r }) {
2882
- let i = g(D.block);
3283
+ let i = g(O.block);
2883
3284
  return /* @__PURE__ */ u("div", {
2884
3285
  ...i,
2885
- className: k(i.className, r),
3286
+ className: A(i.className, r),
2886
3287
  "data-block-id": e,
2887
3288
  "data-block-type": t,
2888
3289
  children: n
2889
3290
  });
2890
3291
  }
2891
- function wt({ block: e, className: t, path: n = "block" }) {
3292
+ function qt({ block: e, className: t, path: n = "block" }) {
2892
3293
  let r = e.accessory, i = Array.isArray(e.fields) ? e.fields : void 0;
2893
3294
  return /* @__PURE__ */ u(R, {
2894
3295
  blockId: e.block_id,
2895
3296
  blockType: e.type,
2896
3297
  className: t,
2897
3298
  children: /* @__PURE__ */ d("div", {
2898
- ...g(D.section),
3299
+ ...g(O.section),
2899
3300
  children: [/* @__PURE__ */ d("div", {
2900
- ...g(D.sectionContent),
2901
- children: [e.text === void 0 ? null : /* @__PURE__ */ u(I, { text: e.text }), i === void 0 ? null : /* @__PURE__ */ u("div", {
2902
- ...g(D.fields),
2903
- children: i.map((e, t) => /* @__PURE__ */ u(I, { text: e }, `${C(e) ?? "unknown"}-${String(t)}`))
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)}`))
2904
3305
  })]
2905
- }), r === void 0 ? null : Ct(r) ? /* @__PURE__ */ u("div", {
2906
- ...g(D.accessory),
2907
- children: /* @__PURE__ */ u(P, {
3306
+ }), r === void 0 ? null : Kt(r) ? /* @__PURE__ */ u("div", {
3307
+ ...g(O.accessory),
3308
+ children: /* @__PURE__ */ u(F, {
2908
3309
  element: r,
2909
3310
  variant: "accessory"
2910
3311
  })
2911
- }) : /* @__PURE__ */ u(at, {
3312
+ }) : /* @__PURE__ */ u(Dt, {
2912
3313
  blockId: e.block_id,
2913
- className: g(D.accessory).className,
3314
+ className: g(O.accessory).className,
2914
3315
  element: e.accessory,
2915
3316
  path: `${n}.accessory`
2916
3317
  })]
2917
3318
  })
2918
3319
  });
2919
3320
  }
2920
- function Tt({ block: e, className: t }) {
2921
- 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 = S(i) && typeof i.text == "string" ? i.text : T(e, "header"), o = g(D.heading, r === 1 && D.heading1, (r === void 0 || r === 2) && D.heading2, r === 3 && D.heading3, r === 4 && D.heading4), s = u(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", {
2922
3323
  ...o,
2923
3324
  children: a
2924
3325
  });
@@ -2929,106 +3330,114 @@ function Tt({ block: e, className: t }) {
2929
3330
  children: s
2930
3331
  });
2931
3332
  }
2932
- function Et({ block: e, className: t }) {
3333
+ function Yt({ block: e, className: t }) {
2933
3334
  return /* @__PURE__ */ u(R, {
2934
3335
  blockId: e.block_id,
2935
3336
  blockType: e.type,
2936
3337
  className: t,
2937
- children: /* @__PURE__ */ u("hr", { ...g(D.divider) })
3338
+ children: /* @__PURE__ */ u("hr", { ...g(O.divider) })
2938
3339
  });
2939
3340
  }
2940
- function Dt({ block: e, className: t }) {
3341
+ function Xt({ block: e, className: t }) {
2941
3342
  return /* @__PURE__ */ d(R, {
2942
3343
  blockId: e.block_id,
2943
3344
  blockType: e.type,
2944
3345
  className: t,
2945
- children: [/* @__PURE__ */ u(P, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ u(I, {
2946
- className: g(D.smallText).className,
3346
+ children: [/* @__PURE__ */ u(F, { element: e }), e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3347
+ className: g(O.smallText).className,
2947
3348
  text: e.title
2948
3349
  })]
2949
3350
  });
2950
3351
  }
2951
- function Ot(e) {
2952
- return S(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";
2953
3354
  }
2954
- function kt({ block: e, className: n }) {
3355
+ function Qt({ block: e, className: n }) {
2955
3356
  let r = e.elements;
2956
3357
  return /* @__PURE__ */ u(R, {
2957
3358
  blockId: e.block_id,
2958
3359
  blockType: e.type,
2959
3360
  className: n,
2960
3361
  children: /* @__PURE__ */ u("div", {
2961
- ...g(D.context),
2962
- children: Array.isArray(r) ? r.map((e, n) => Ct(e) ? /* @__PURE__ */ u(P, {
3362
+ ...g(O.context),
3363
+ children: Array.isArray(r) ? r.map((e, n) => Kt(e) ? /* @__PURE__ */ u(F, {
2963
3364
  element: e,
2964
3365
  variant: "context"
2965
- }, `${e.type}-${String(n)}`) : Ot(e) ? /* @__PURE__ */ t("div", {
2966
- ...g(D.contextElement),
3366
+ }, `${e.type}-${String(n)}`) : Zt(e) ? /* @__PURE__ */ t("div", {
3367
+ ...g(O.contextElement),
2967
3368
  key: `${e.type}-${String(n)}`
2968
- }, /* @__PURE__ */ u(I, {
2969
- className: g(D.contextText).className,
3369
+ }, /* @__PURE__ */ u(L, {
3370
+ className: g(O.contextText).className,
2970
3371
  text: e
2971
3372
  })) : /* @__PURE__ */ t("span", {
2972
- ...g(D.unhandled),
2973
- "data-unhandled-element": C(e) ?? "unknown",
3373
+ ...g(O.unhandled),
3374
+ "data-unhandled-element": T(e) ?? "unknown",
2974
3375
  key: `unhandled-${String(n)}`
2975
- }, T(e, "context element"))) : /* @__PURE__ */ u("span", {
2976
- ...g(D.unhandled),
3376
+ }, E(e, "context element"))) : /* @__PURE__ */ u("span", {
3377
+ ...g(O.unhandled),
2977
3378
  "data-unhandled-element": "context",
2978
- children: T(e, "context block")
3379
+ children: E(e, "context block")
2979
3380
  })
2980
3381
  })
2981
3382
  });
2982
3383
  }
2983
- function At({ block: e, className: t, path: n = "block" }) {
3384
+ function $t({ block: e, className: t, path: n = "block" }) {
2984
3385
  return /* @__PURE__ */ u(R, {
2985
3386
  blockId: e.block_id,
2986
3387
  blockType: e.type,
2987
3388
  className: t,
2988
- children: /* @__PURE__ */ u(M, {
3389
+ children: /* @__PURE__ */ u(N, {
2989
3390
  block: e,
2990
3391
  path: n
2991
3392
  })
2992
3393
  });
2993
3394
  }
2994
- function jt({ block: e, className: t }) {
2995
- let n = typeof e.text == "string" ? e.text : T(e, "markdown block");
3395
+ function en({ block: e, className: t }) {
3396
+ let n = typeof e.text == "string" ? e.text : E(e, "markdown block");
2996
3397
  return /* @__PURE__ */ u(R, {
2997
3398
  blockId: e.block_id,
2998
3399
  blockType: e.type,
2999
3400
  className: t,
3000
- children: /* @__PURE__ */ u(St, { markdown: n })
3401
+ children: /* @__PURE__ */ u(Gt, { markdown: n })
3001
3402
  });
3002
3403
  }
3003
- function Mt({ block: e, className: t }) {
3404
+ function tn({ block: e, className: t }) {
3004
3405
  return /* @__PURE__ */ u(R, {
3005
3406
  blockId: e.block_id,
3006
3407
  blockType: e.type,
3007
3408
  className: t,
3008
3409
  children: /* @__PURE__ */ d("div", {
3009
- ...g(D.file),
3410
+ ...g(O.file),
3010
3411
  children: [/* @__PURE__ */ u("span", {
3412
+ ...g(O.iconSlot),
3011
3413
  "aria-hidden": "true",
3012
- children: "📎"
3414
+ children: /* @__PURE__ */ u(fe, { size: 20 })
3013
3415
  }), /* @__PURE__ */ d("div", { children: [/* @__PURE__ */ u("strong", { children: "Remote file" }), /* @__PURE__ */ u("div", {
3014
- ...g(D.smallText),
3416
+ ...g(O.smallText),
3015
3417
  children: e.external_id
3016
3418
  })] })]
3017
3419
  })
3018
3420
  });
3019
3421
  }
3020
- function Nt({ block: e, className: t }) {
3021
- let n = E(typeof e.title_url == "string" ? e.title_url : typeof e.video_url == "string" ? e.video_url : void 0), r = e.title, i = S(r) && typeof r.text == "string" ? r.text : T(e, "video"), a = e.description, o = S(a) && typeof a.text == "string" ? a.text : void 0, s = typeof e.alt_text == "string" ? e.alt_text : T(e, "video"), c = typeof e.thumbnail_url == "string" ? e.thumbnail_url : void 0, f = /* @__PURE__ */ d(l, { children: [c === void 0 ? null : /* @__PURE__ */ u("img", {
3022
- ...g(D.image, D.cardHero),
3023
- alt: s,
3024
- src: c
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
+ })]
3025
3434
  }), /* @__PURE__ */ d("div", {
3026
- ...g(D.cardContent),
3435
+ ...g(O.cardContent),
3027
3436
  children: [
3028
3437
  /* @__PURE__ */ u("strong", { children: i }),
3029
3438
  o,
3030
3439
  typeof e.provider_name == "string" ? /* @__PURE__ */ u("span", {
3031
- ...g(D.smallText),
3440
+ ...g(O.smallText),
3032
3441
  children: e.provider_name
3033
3442
  }) : null
3034
3443
  ]
@@ -3038,11 +3447,11 @@ function Nt({ block: e, className: t }) {
3038
3447
  blockType: e.type,
3039
3448
  className: t,
3040
3449
  children: n === void 0 ? /* @__PURE__ */ u("div", {
3041
- ...g(D.card),
3450
+ ...g(O.card),
3042
3451
  "aria-label": s,
3043
3452
  children: f
3044
3453
  }) : /* @__PURE__ */ u("a", {
3045
- ...g(D.card),
3454
+ ...g(O.card),
3046
3455
  "aria-label": s,
3047
3456
  href: n,
3048
3457
  rel: "noreferrer",
@@ -3052,12 +3461,12 @@ function Nt({ block: e, className: t }) {
3052
3461
  }
3053
3462
  //#endregion
3054
3463
  //#region src/blocks/AdvancedBlocks.tsx
3055
- function Pt({ align: e = "left", cell: t, className: n, firstColumn: r = !1, header: i = !1, path: a = "cell", scope: o = "col", wrapped: s = !1 }) {
3056
- let c = g(D.tableCell, i && D.tableHeader, r && D.tableCellFirstColumn, s && D.tableCellWrapped), l;
3057
- if (!S(t)) l = T(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");
3058
3467
  else switch (t.type) {
3059
3468
  case "rich_text":
3060
- l = /* @__PURE__ */ u(M, {
3469
+ l = /* @__PURE__ */ u(N, {
3061
3470
  block: t,
3062
3471
  path: a
3063
3472
  });
@@ -3068,42 +3477,42 @@ function Pt({ align: e = "left", cell: t, className: n, firstColumn: r = !1, hea
3068
3477
  case "raw_text":
3069
3478
  l = t.text;
3070
3479
  break;
3071
- default: l = T(t, "table cell");
3480
+ default: l = E(t, "table cell");
3072
3481
  }
3073
3482
  return i ? /* @__PURE__ */ u("th", {
3074
3483
  ...c,
3075
- className: k(c.className, n),
3484
+ className: A(c.className, n),
3076
3485
  scope: o,
3077
3486
  style: { textAlign: e },
3078
3487
  children: l
3079
3488
  }) : /* @__PURE__ */ u("td", {
3080
3489
  ...c,
3081
- className: k(c.className, n),
3490
+ className: A(c.className, n),
3082
3491
  style: { textAlign: e },
3083
3492
  children: l
3084
3493
  });
3085
3494
  }
3086
- function Ft(e) {
3495
+ function an(e) {
3087
3496
  return Array.isArray(e);
3088
3497
  }
3089
- function It({ block: e, className: t, path: n = "block" }) {
3090
- let r = Array.isArray(e.rows) ? e.rows.filter(Ft) : [], i = e.column_settings;
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;
3091
3500
  return /* @__PURE__ */ u(R, {
3092
3501
  blockId: e.block_id,
3093
3502
  blockType: e.type,
3094
3503
  className: t,
3095
3504
  children: /* @__PURE__ */ u("div", {
3096
- ...g(D.tableScroller),
3505
+ ...g(O.tableScroller),
3097
3506
  children: /* @__PURE__ */ d("table", {
3098
- ...g(D.table),
3099
- children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ u(Pt, {
3507
+ ...g(O.table),
3508
+ children: [/* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: (r[0] ?? []).map((e, t) => /* @__PURE__ */ u(rn, {
3100
3509
  align: i?.[t]?.align,
3101
3510
  cell: e,
3102
3511
  firstColumn: t === 0,
3103
3512
  header: !0,
3104
3513
  path: `${n}.rows[0][${String(t)}]`,
3105
3514
  wrapped: i?.[t]?.is_wrapped
3106
- }, `header-${String(t)}`)) }) }), /* @__PURE__ */ u("tbody", { children: r.slice(1).map((e, t) => /* @__PURE__ */ u("tr", { children: e.map((e, r) => /* @__PURE__ */ u(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, {
3107
3516
  align: i?.[r]?.align,
3108
3517
  cell: e,
3109
3518
  firstColumn: r === 0,
@@ -3114,21 +3523,21 @@ function It({ block: e, className: t, path: n = "block" }) {
3114
3523
  })
3115
3524
  });
3116
3525
  }
3117
- function Lt({ cell: e, path: t }) {
3118
- if (!S(e)) return T(e, "table cell");
3526
+ function sn({ cell: e, path: t }) {
3527
+ if (!w(e)) return E(e, "table cell");
3119
3528
  switch (e.type) {
3120
- case "rich_text": return /* @__PURE__ */ u(M, {
3529
+ case "rich_text": return /* @__PURE__ */ u(N, {
3121
3530
  block: e,
3122
3531
  path: t
3123
3532
  });
3124
3533
  case "raw_number": return e.text ?? String(e.value);
3125
3534
  case "raw_text": return e.text;
3126
- default: return T(e, "table cell");
3535
+ default: return E(e, "table cell");
3127
3536
  }
3128
3537
  }
3129
- function Rt(e) {
3538
+ function cn(e) {
3130
3539
  let t = e;
3131
- if (!S(t)) return "";
3540
+ if (!w(t)) return "";
3132
3541
  if (e.type === "raw_text") {
3133
3542
  let e = t.text;
3134
3543
  return typeof e == "string" ? e : "";
@@ -3145,28 +3554,29 @@ function Rt(e) {
3145
3554
  }
3146
3555
  return "";
3147
3556
  }
3148
- function zt({ block: e, className: n, path: r = "block" }) {
3149
- 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) : [], 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) => Rt(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;
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;
3150
3559
  return /* @__PURE__ */ u(R, {
3151
3560
  blockId: e.block_id,
3152
3561
  blockType: e.type,
3153
3562
  className: n,
3154
3563
  children: /* @__PURE__ */ d("div", {
3155
- ...g(D.dataTable),
3564
+ ...g(O.dataTable),
3156
3565
  children: [/* @__PURE__ */ d("div", {
3157
- ...g(D.dataTableHeaderBar),
3566
+ ...g(O.dataTableHeaderBar),
3158
3567
  children: [
3159
3568
  /* @__PURE__ */ u("span", {
3160
- ...g(D.dataTableTitle),
3569
+ ...g(O.dataTableTitle),
3161
3570
  children: l
3162
3571
  }),
3163
3572
  /* @__PURE__ */ d("span", {
3164
- ...g(D.dataTableFilter),
3573
+ ...g(O.dataTableFilter),
3165
3574
  children: [/* @__PURE__ */ u("span", {
3575
+ ...g(O.dataTableFilterIcon),
3166
3576
  "aria-hidden": "true",
3167
- children: "⌕"
3577
+ children: /* @__PURE__ */ u(he, { size: 13 })
3168
3578
  }), /* @__PURE__ */ u("input", {
3169
- ...g(D.dataTableFilterInput),
3579
+ ...g(O.dataTableFilterInput),
3170
3580
  "aria-label": l === void 0 ? "Filter table" : `Filter ${l}`,
3171
3581
  onChange: (e) => {
3172
3582
  h(e.target.value), p(0);
@@ -3177,45 +3587,39 @@ function zt({ block: e, className: n, path: r = "block" }) {
3177
3587
  })]
3178
3588
  }),
3179
3589
  /* @__PURE__ */ u("button", {
3180
- ...g(D.dataTableIconButton),
3590
+ ...g(O.dataTableIconButton),
3181
3591
  "aria-label": l === void 0 ? "Expand table" : `View ${l}`,
3182
3592
  type: "button",
3183
- children: /* @__PURE__ */ u("span", {
3184
- "aria-hidden": "true",
3185
- children: "⤢"
3186
- })
3593
+ children: /* @__PURE__ */ u(ce, { size: 18 })
3187
3594
  }),
3188
3595
  /* @__PURE__ */ u("button", {
3189
- ...g(D.dataTableIconButton),
3596
+ ...g(O.dataTableIconButton),
3190
3597
  "aria-label": "More actions",
3191
3598
  type: "button",
3192
- children: /* @__PURE__ */ u("span", {
3193
- "aria-hidden": "true",
3194
- children: "⋮"
3195
- })
3599
+ children: /* @__PURE__ */ u(se, { size: 16 })
3196
3600
  })
3197
3601
  ]
3198
3602
  }), /* @__PURE__ */ d("div", {
3199
- ...g(D.dataTableBand, b <= 1 && D.dataTableBandUnpaginated),
3603
+ ...g(O.dataTableBand, b <= 1 && O.dataTableBandUnpaginated),
3200
3604
  children: [/* @__PURE__ */ d("table", {
3201
- ...g(D.dataTableTable),
3605
+ ...g(O.dataTableTable),
3202
3606
  children: [
3203
3607
  l === void 0 ? null : /* @__PURE__ */ u("caption", {
3204
- ...g(D.visuallyHidden),
3608
+ ...g(O.visuallyHidden),
3205
3609
  children: l
3206
3610
  }),
3207
3611
  /* @__PURE__ */ u("thead", { children: /* @__PURE__ */ u("tr", { children: _.map((e, n) => /* @__PURE__ */ t("th", {
3208
- ...g(D.dataTableTh),
3612
+ ...g(O.dataTableTh),
3209
3613
  key: `header-${String(n)}`,
3210
3614
  scope: "col"
3211
- }, /* @__PURE__ */ u(Lt, {
3615
+ }, /* @__PURE__ */ u(sn, {
3212
3616
  cell: e,
3213
3617
  path: `${r}.rows[0][${String(n)}]`
3214
3618
  }))) }) }),
3215
3619
  /* @__PURE__ */ u("tbody", { children: S.map((e, n) => {
3216
3620
  let i = x * a + n + 1, o = e.length - 1;
3217
3621
  return /* @__PURE__ */ u("tr", { children: e.map((e, a) => {
3218
- let c = g(D.dataTableTd, n === 0 && a === 0 && D.dataTableRadiusTopStart, n === 0 && a === o && D.dataTableRadiusTopEnd, n === C && a === 0 && D.dataTableRadiusBottomStart, n === C && a === o && D.dataTableRadiusBottomEnd), l = /* @__PURE__ */ u(Lt, {
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, {
3219
3623
  cell: e,
3220
3624
  path: `${r}.rows[${String(i)}][${String(a)}]`
3221
3625
  });
@@ -3231,23 +3635,20 @@ function zt({ block: e, className: n, path: r = "block" }) {
3231
3635
  }) })
3232
3636
  ]
3233
3637
  }), b <= 1 ? null : /* @__PURE__ */ d("div", {
3234
- ...g(D.dataTablePagination),
3638
+ ...g(O.dataTablePagination),
3235
3639
  children: [
3236
3640
  /* @__PURE__ */ u("button", {
3237
- ...g(D.dataTablePageChevron),
3641
+ ...g(O.dataTablePageChevron),
3238
3642
  "aria-label": "Previous",
3239
3643
  disabled: x === 0,
3240
3644
  onClick: () => {
3241
3645
  p((e) => Math.max(0, e - 1));
3242
3646
  },
3243
3647
  type: "button",
3244
- children: /* @__PURE__ */ u("span", {
3245
- "aria-hidden": "true",
3246
- children: "‹"
3247
- })
3648
+ children: /* @__PURE__ */ u(te, { size: 14 })
3248
3649
  }),
3249
3650
  Array.from({ length: b }, (e, n) => /* @__PURE__ */ t("button", {
3250
- ...g(D.dataTablePageButton, n === x && D.dataTablePageButtonActive),
3651
+ ...g(O.dataTablePageButton, n === x && O.dataTablePageButtonActive),
3251
3652
  "aria-current": n === x ? "page" : void 0,
3252
3653
  key: `page-${String(n)}`,
3253
3654
  onClick: () => {
@@ -3256,17 +3657,14 @@ function zt({ block: e, className: n, path: r = "block" }) {
3256
3657
  type: "button"
3257
3658
  }, n + 1)),
3258
3659
  /* @__PURE__ */ u("button", {
3259
- ...g(D.dataTablePageChevron),
3660
+ ...g(O.dataTablePageChevron),
3260
3661
  "aria-label": "Next",
3261
3662
  disabled: x === b - 1,
3262
3663
  onClick: () => {
3263
3664
  p((e) => Math.min(b - 1, e + 1));
3264
3665
  },
3265
3666
  type: "button",
3266
- children: /* @__PURE__ */ u("span", {
3267
- "aria-hidden": "true",
3268
- children: "›"
3269
- })
3667
+ children: /* @__PURE__ */ u(ne, { size: 14 })
3270
3668
  })
3271
3669
  ]
3272
3670
  })]
@@ -3274,135 +3672,143 @@ function zt({ block: e, className: n, path: r = "block" }) {
3274
3672
  })
3275
3673
  });
3276
3674
  }
3277
- 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 }) {
3278
3685
  let n = Array.isArray(e.actions) ? e.actions : void 0;
3279
3686
  return /* @__PURE__ */ u(R, {
3280
3687
  blockId: e.block_id,
3281
3688
  blockType: e.type,
3282
3689
  className: t,
3283
3690
  children: /* @__PURE__ */ d("div", {
3284
- ...g(D.card),
3691
+ ...g(O.card),
3285
3692
  children: [
3286
- e.hero_image === void 0 ? null : /* @__PURE__ */ u(P, {
3693
+ e.hero_image === void 0 ? null : /* @__PURE__ */ u(F, {
3287
3694
  element: e.hero_image,
3288
3695
  variant: "cardHero"
3289
3696
  }),
3290
3697
  /* @__PURE__ */ d("div", {
3291
- ...g(D.cardContent),
3698
+ ...g(O.cardContent),
3292
3699
  children: [
3293
3700
  e.icon === void 0 && e.slack_icon === void 0 && e.title === void 0 && e.subtitle === void 0 ? null : /* @__PURE__ */ d("div", {
3294
- ...g(D.cardHeading),
3295
- children: [e.icon === void 0 ? e.slack_icon === void 0 ? null : /* @__PURE__ */ u("span", {
3296
- "aria-hidden": "true",
3297
- children: "◆"
3298
- }) : /* @__PURE__ */ u(P, {
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, {
3299
3703
  element: e.icon,
3300
3704
  variant: "cardIcon"
3301
- }), /* @__PURE__ */ d("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ u(I, {
3302
- className: g(D.cardTitle).className,
3705
+ }), /* @__PURE__ */ d("div", { children: [e.title === void 0 ? null : /* @__PURE__ */ u(L, {
3706
+ className: g(O.cardTitle).className,
3303
3707
  text: e.title
3304
- }), e.subtitle === void 0 ? null : /* @__PURE__ */ u(I, {
3305
- className: g(D.smallText).className,
3708
+ }), e.subtitle === void 0 ? null : /* @__PURE__ */ u(L, {
3709
+ className: g(O.smallText).className,
3306
3710
  text: e.subtitle
3307
3711
  })] })]
3308
3712
  }),
3309
- e.body === void 0 ? null : /* @__PURE__ */ u(I, { text: e.body }),
3310
- e.subtext === void 0 ? null : /* @__PURE__ */ u(I, {
3311
- className: g(D.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,
3312
3716
  text: e.subtext
3313
3717
  })
3314
3718
  ]
3315
3719
  }),
3316
3720
  n === void 0 ? null : /* @__PURE__ */ u("div", {
3317
- ...g(D.cardActions),
3318
- children: n.map((t, n) => /* @__PURE__ */ u(Ve, {
3721
+ ...g(O.cardActions),
3722
+ children: n.map((t, n) => /* @__PURE__ */ u(lt, {
3319
3723
  blockId: e.block_id,
3320
3724
  element: t
3321
- }, `${S(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)}`))
3322
3726
  })
3323
3727
  ]
3324
3728
  })
3325
3729
  });
3326
3730
  }
3327
- function Vt(e) {
3328
- return S(e) && e.type === "card";
3731
+ function fn(e) {
3732
+ return w(e) && e.type === "card";
3329
3733
  }
3330
- function Ht({ block: e, className: n, path: r = "block" }) {
3734
+ function pn({ block: e, className: n, path: r = "block" }) {
3331
3735
  let i = e.elements;
3332
3736
  return /* @__PURE__ */ u(R, {
3333
3737
  blockId: e.block_id,
3334
3738
  blockType: e.type,
3335
3739
  className: n,
3336
3740
  children: /* @__PURE__ */ u("div", {
3337
- ...g(D.carousel),
3338
- children: Array.isArray(i) ? i.map((e, n) => Vt(e) ? /* @__PURE__ */ u(Bt, {
3741
+ ...g(O.carousel),
3742
+ children: Array.isArray(i) ? i.map((e, n) => fn(e) ? /* @__PURE__ */ u(dn, {
3339
3743
  block: e,
3340
- className: g(D.carouselCard).className,
3744
+ className: g(O.carouselCard).className,
3341
3745
  path: `${r}.elements[${String(n)}]`
3342
- }, `${w(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3343
- ...g(D.unhandled),
3746
+ }, `${xe(e) ?? "card"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3747
+ ...g(O.unhandled),
3344
3748
  "data-unhandled-block": !0,
3345
3749
  key: `unknown-${String(n)}`
3346
- }, T(e, "carousel card"))) : null
3750
+ }, E(e, "carousel card"))) : null
3347
3751
  })
3348
3752
  });
3349
3753
  }
3350
- function Ut({ block: e, className: t }) {
3754
+ function mn({ block: e, className: t }) {
3351
3755
  let n = e.level ?? "default";
3352
3756
  return /* @__PURE__ */ u(R, {
3353
3757
  blockId: e.block_id,
3354
3758
  blockType: e.type,
3355
3759
  className: t,
3356
3760
  children: /* @__PURE__ */ d("div", {
3357
- ...g(D.alert, n === "info" && D.alertInfo, n === "warning" && D.alertWarning, n === "error" && D.alertError, n === "success" && D.alertSuccess),
3761
+ ...g(O.alert, n === "info" && O.alertInfo, n === "warning" && O.alertWarning, n === "error" && O.alertError, n === "success" && O.alertSuccess),
3358
3762
  children: [/* @__PURE__ */ u("span", {
3763
+ ...g(O.iconSlot, O.alertIcon),
3359
3764
  "aria-hidden": "true",
3360
- children: n === "warning" ? "⚠" : n === "error" ? "!" : n === "success" ? "✓" : "i"
3361
- }), /* @__PURE__ */ u(I, { text: e.text })]
3765
+ children: u(n === "warning" || n === "error" ? ye : n === "success" ? ae : ue, { size: 20 })
3766
+ }), /* @__PURE__ */ u(L, { text: e.text })]
3362
3767
  })
3363
3768
  });
3364
3769
  }
3365
- function Wt({ block: e, className: n, path: r = "block" }) {
3366
- let i = e.sources, a = typeof e.status == "string" ? e.status : "unknown", o = typeof e.title == "string" ? e.title : T(e, "task");
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");
3367
3772
  return /* @__PURE__ */ u(R, {
3368
3773
  blockId: e.block_id,
3369
3774
  blockType: e.type,
3370
3775
  className: n,
3371
3776
  children: /* @__PURE__ */ d("div", {
3372
- ...g(D.task),
3777
+ ...g(O.task),
3373
3778
  children: [
3374
3779
  /* @__PURE__ */ d("div", {
3375
- ...g(D.taskHeading),
3780
+ ...g(O.taskHeading),
3376
3781
  children: [
3377
3782
  /* @__PURE__ */ u("span", {
3783
+ ...g(O.iconSlot),
3378
3784
  "aria-hidden": "true",
3379
- children: a === "complete" ? "✓" : a === "error" ? "!" : a === "in_progress" ? "◌" : "○"
3785
+ children: u(a === "complete" ? ae : a === "error" ? ie : a === "in_progress" ? de : re, { size: 16 })
3380
3786
  }),
3381
3787
  /* @__PURE__ */ u("span", { children: o }),
3382
3788
  /* @__PURE__ */ u("span", {
3383
- ...g(D.taskStatus),
3789
+ ...g(O.taskStatus),
3384
3790
  children: a
3385
3791
  })
3386
3792
  ]
3387
3793
  }),
3388
- e.details === void 0 ? null : /* @__PURE__ */ u(M, {
3794
+ e.details === void 0 ? null : /* @__PURE__ */ u(N, {
3389
3795
  block: e.details,
3390
3796
  path: `${r}.details`
3391
3797
  }),
3392
- e.output === void 0 ? null : /* @__PURE__ */ u(M, {
3798
+ e.output === void 0 ? null : /* @__PURE__ */ u(N, {
3393
3799
  block: e.output,
3394
3800
  path: `${r}.output`
3395
3801
  }),
3396
3802
  Array.isArray(i) ? /* @__PURE__ */ u("div", {
3397
- ...g(D.context),
3803
+ ...g(O.context),
3398
3804
  children: i.map((e, n) => {
3399
- if (!S(e)) return /* @__PURE__ */ t("span", {
3400
- ...g(D.unhandled),
3805
+ if (!w(e)) return /* @__PURE__ */ t("span", {
3806
+ ...g(O.unhandled),
3401
3807
  key: `unknown-${String(n)}`
3402
- }, T(e, "task source"));
3403
- let r = E(typeof e.url == "string" ? e.url : void 0), i = typeof e.text == "string" ? e.text : T(e, "task source"), a = `${typeof e.url == "string" ? e.url : `source-${String(n)}`}-${String(n)}`;
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)}`;
3404
3810
  return r === void 0 ? /* @__PURE__ */ u("span", { children: i }, a) : /* @__PURE__ */ t("a", {
3405
- ...g(D.link),
3811
+ ...g(O.link),
3406
3812
  href: r,
3407
3813
  key: a,
3408
3814
  rel: "noreferrer"
@@ -3413,31 +3819,31 @@ function Wt({ block: e, className: n, path: r = "block" }) {
3413
3819
  })
3414
3820
  });
3415
3821
  }
3416
- function Gt(e) {
3417
- return S(e) && e.type === "task_card";
3822
+ function gn(e) {
3823
+ return w(e) && e.type === "task_card";
3418
3824
  }
3419
- function Kt({ block: e, className: n, path: r = "block" }) {
3420
- let i = e.tasks, a = typeof e.title == "string" ? e.title : T(e, "plan");
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");
3421
3827
  return /* @__PURE__ */ u(R, {
3422
3828
  blockId: e.block_id,
3423
3829
  blockType: e.type,
3424
3830
  className: n,
3425
3831
  children: /* @__PURE__ */ d("div", {
3426
- ...g(D.plan),
3427
- children: [/* @__PURE__ */ u("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => Gt(e) ? /* @__PURE__ */ u(Wt, {
3832
+ ...g(O.plan),
3833
+ children: [/* @__PURE__ */ u("strong", { children: a }), Array.isArray(i) ? i.map((e, n) => gn(e) ? /* @__PURE__ */ u(hn, {
3428
3834
  block: e,
3429
3835
  path: `${r}.tasks[${String(n)}]`
3430
3836
  }, `${typeof e.task_id == "string" ? e.task_id : "task"}-${String(n)}`) : /* @__PURE__ */ t("div", {
3431
- ...g(D.unhandled),
3837
+ ...g(O.unhandled),
3432
3838
  "data-unhandled-block": !0,
3433
3839
  key: `unknown-${String(n)}`
3434
- }, T(e, "plan task"))) : null]
3840
+ }, E(e, "plan task"))) : null]
3435
3841
  })
3436
3842
  });
3437
3843
  }
3438
3844
  //#endregion
3439
3845
  //#region src/constants.ts
3440
- 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 = [
3441
3847
  "actions",
3442
3848
  "alert",
3443
3849
  "card",
@@ -3459,9 +3865,9 @@ var qt = 3e3, Jt = 3e3, Yt = 2e3, Xt = 3e3, Zt = 2e3, Qt = 2e3, $t = 12e3, en =
3459
3865
  "table",
3460
3866
  "task_card",
3461
3867
  "video"
3462
- ], on = 554;
3463
- function sn() {
3464
- let [e, t] = c(on + 26), r = s(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) => {
3465
3871
  if (r.current?.disconnect(), r.current = void 0, e === null) return;
3466
3872
  let n = () => {
3467
3873
  let n = e.getBoundingClientRect().width;
@@ -3476,22 +3882,22 @@ function sn() {
3476
3882
  width: e
3477
3883
  };
3478
3884
  }
3479
- function cn(e, t) {
3885
+ function Mn(e, t) {
3480
3886
  let n = e / Math.max(1, t), r = 10 ** Math.floor(Math.log10(n)), i = n / r;
3481
3887
  return i >= Math.sqrt(50) ? r * 10 : i >= Math.sqrt(10) ? r * 5 : i >= Math.SQRT2 ? r * 2 : r;
3482
3888
  }
3483
- function ln(e, t) {
3484
- 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 = [];
3485
3891
  for (let e = a; e <= o; e += 1) s.push(e * i);
3486
3892
  return s;
3487
3893
  }
3488
- function un(e) {
3894
+ function Pn(e) {
3489
3895
  return Math.ceil(e - .5) + .5;
3490
3896
  }
3491
- function dn(e, t) {
3897
+ function Fn(e, t) {
3492
3898
  let n = 0, r = 0;
3493
3899
  for (let e of t) n = Math.min(n, e), r = Math.max(r, e);
3494
- 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;
3495
3901
  return {
3496
3902
  plotLeft: 74,
3497
3903
  plotRight: e,
@@ -3500,14 +3906,14 @@ function dn(e, t) {
3500
3906
  y: (e) => 334 - (e - a) / o * 325
3501
3907
  };
3502
3908
  }
3503
- function fn(e) {
3504
- return ie[e % ie.length] ?? re;
3909
+ function In(e) {
3910
+ return Ee[e % Ee.length] ?? Te;
3505
3911
  }
3506
- function pn(e, t) {
3912
+ function Ln(e, t) {
3507
3913
  let n = new Map(e.data.map((e) => [e.label, e]));
3508
3914
  return t.map((e) => n.get(e));
3509
3915
  }
3510
- function mn(e, t, n, r) {
3916
+ function Rn(e, t, n, r) {
3511
3917
  let i = Math.min(4, t / 2, Math.abs(r - n)), a = e, o = e + t;
3512
3918
  return [
3513
3919
  `M${String(a + i)} ${String(n)}`,
@@ -3520,7 +3926,7 @@ function mn(e, t, n, r) {
3520
3926
  "Z"
3521
3927
  ].join("");
3522
3928
  }
3523
- function hn(e) {
3929
+ function zn(e) {
3524
3930
  if (e.length === 0) return "";
3525
3931
  let t = e[0];
3526
3932
  if (t === void 0) return "";
@@ -3547,18 +3953,18 @@ function hn(e) {
3547
3953
  }
3548
3954
  return r.join("");
3549
3955
  }
3550
- function gn({ geometry: e }) {
3956
+ function Bn({ geometry: e }) {
3551
3957
  let { plotLeft: n, plotRight: r, ticks: i, y: a } = e;
3552
3958
  return /* @__PURE__ */ d(l, { children: [i.map((e) => {
3553
- let i = un(a(e));
3959
+ let i = Pn(a(e));
3554
3960
  return /* @__PURE__ */ t("path", {
3555
- ...g(D.chartGridline),
3961
+ ...g(O.chartGridline),
3556
3962
  d: `M${String(n)} ${String(i)}L${String(r)} ${String(i)}`,
3557
3963
  fill: "none",
3558
3964
  key: `grid-${String(e)}`
3559
3965
  });
3560
3966
  }), i.map((e) => /* @__PURE__ */ t("text", {
3561
- ...g(D.chartTickText),
3967
+ ...g(O.chartTickText),
3562
3968
  dy: "0.32em",
3563
3969
  key: `tick-${String(e)}`,
3564
3970
  textAnchor: "end",
@@ -3566,35 +3972,35 @@ function gn({ geometry: e }) {
3566
3972
  y: a(e)
3567
3973
  }, e))] });
3568
3974
  }
3569
- function _n({ categories: e, tickX: n }) {
3975
+ function Vn({ categories: e, tickX: n }) {
3570
3976
  return /* @__PURE__ */ u(l, { children: e.map((e, r) => /* @__PURE__ */ t("text", {
3571
- ...g(D.chartTickText),
3977
+ ...g(O.chartTickText),
3572
3978
  key: `${e}-${String(r)}`,
3573
3979
  textAnchor: "middle",
3574
3980
  x: n(r),
3575
3981
  y: 351
3576
3982
  }, e)) });
3577
3983
  }
3578
- function vn(e, t) {
3984
+ function Hn(e, t) {
3579
3985
  let n = e * Math.min(.155, Math.max(.075, .175 - .02 * t));
3580
3986
  return {
3581
3987
  barWidth: (e - 2 * n) / (1.1 * t - .1),
3582
3988
  outer: n
3583
3989
  };
3584
3990
  }
3585
- function yn({ chart: e, svgWidth: n, title: r }) {
3991
+ function Un({ chart: e, svgWidth: n, title: r }) {
3586
3992
  let i = e.axis_config.categories, a = e.series.map((e) => ({
3587
- points: pn(e, i),
3993
+ points: Ln(e, i),
3588
3994
  series: e
3589
- })), o = dn(n, a.flatMap(({ points: e }) => e.flatMap((e) => e === void 0 ? [] : [e.value]))), { plotLeft: s, plotRight: c, y: l } = 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;
3590
3996
  if (e.type === "bar") {
3591
- 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));
3592
3998
  p = (e) => s + n * (e + .5), f = a.map(({ points: e, series: i }, a) => e.map((e, c) => {
3593
3999
  if (e === void 0) return null;
3594
4000
  let u = s + c * n + o + 1.1 * r * a;
3595
4001
  return /* @__PURE__ */ t("path", {
3596
- ...g(fn(a).fill),
3597
- d: mn(u, r, l(e.value), 334),
4002
+ ...g(In(a).fill),
4003
+ d: Rn(u, r, l(e.value), 334),
3598
4004
  "data-category": e.label,
3599
4005
  "data-series": i.name,
3600
4006
  key: `${i.name}-${String(a)}-${e.label}-${String(c)}`
@@ -3606,15 +4012,15 @@ function yn({ chart: e, svgWidth: n, title: r }) {
3606
4012
  let a = t.flatMap((e, t) => e === void 0 ? [] : [{
3607
4013
  x: n(t),
3608
4014
  y: l(e.value)
3609
- }]), o = hn(a);
4015
+ }]), o = zn(a);
3610
4016
  if (o === "") return null;
3611
4017
  let s = a[a.length - 1], c = a[0];
3612
4018
  return /* @__PURE__ */ d("g", { children: [e.type === "area" && c !== void 0 && s !== void 0 ? /* @__PURE__ */ u("path", {
3613
- ...g(fn(i).tint, D.chartAreaFill, i >= 6 && D.chartAreaFallbackFill),
4019
+ ...g(In(i).tint, O.chartAreaFill, i >= 6 && O.chartAreaFallbackFill),
3614
4020
  d: `${o}L${String(s.x)} 334L${String(c.x)} 334Z`,
3615
4021
  "data-series-area": r.name
3616
4022
  }) : null, /* @__PURE__ */ u("path", {
3617
- ...g(fn(i).stroke, D.chartLinePath),
4023
+ ...g(In(i).stroke, O.chartLinePath),
3618
4024
  d: o,
3619
4025
  "data-series": r.name,
3620
4026
  fill: "none"
@@ -3622,31 +4028,31 @@ function yn({ chart: e, svgWidth: n, title: r }) {
3622
4028
  });
3623
4029
  }
3624
4030
  return /* @__PURE__ */ d("svg", {
3625
- ...g(D.chartSvg),
4031
+ ...g(O.chartSvg),
3626
4032
  "aria-label": r,
3627
4033
  height: 360,
3628
4034
  role: "img",
3629
4035
  width: n,
3630
4036
  children: [
3631
- /* @__PURE__ */ u(gn, { geometry: o }),
4037
+ /* @__PURE__ */ u(Bn, { geometry: o }),
3632
4038
  f,
3633
- /* @__PURE__ */ u(_n, {
4039
+ /* @__PURE__ */ u(Vn, {
3634
4040
  categories: i,
3635
4041
  tickX: p
3636
4042
  })
3637
4043
  ]
3638
4044
  });
3639
4045
  }
3640
- function bn(e, t, n, r) {
4046
+ function Wn(e, t, n, r) {
3641
4047
  return {
3642
4048
  x: e + n * Math.sin(r),
3643
4049
  y: t - n * Math.cos(r)
3644
4050
  };
3645
4051
  }
3646
- function xn({ chart: e, svgWidth: n, title: r }) {
4052
+ function Gn({ chart: e, svgWidth: n, title: r }) {
3647
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);
3648
4054
  if (a <= 0) return /* @__PURE__ */ u("div", {
3649
- ...g(D.unhandled),
4055
+ ...g(O.unhandled),
3650
4056
  "aria-label": `${r}: no chart data`,
3651
4057
  "data-empty-chart": !0,
3652
4058
  role: "img",
@@ -3655,16 +4061,16 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3655
4061
  let o = n / 2, s = 0, c = e.segments.map((e, n) => {
3656
4062
  let r = (i[n] ?? 0) / a, c = s * 2 * Math.PI;
3657
4063
  s += r;
3658
- 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`;
3659
4065
  return r <= 0 ? null : /* @__PURE__ */ t("path", {
3660
- ...g(fn(n).fill, D.pieSlice),
4066
+ ...g(In(n).fill, O.pieSlice),
3661
4067
  d: p,
3662
4068
  "data-segment": e.label,
3663
4069
  key: `${e.label}-${String(n)}`
3664
4070
  });
3665
4071
  });
3666
4072
  return /* @__PURE__ */ u("svg", {
3667
- ...g(D.chartSvg),
4073
+ ...g(O.chartSvg),
3668
4074
  "aria-label": r,
3669
4075
  height: 360,
3670
4076
  role: "img",
@@ -3672,41 +4078,41 @@ function xn({ chart: e, svgWidth: n, title: r }) {
3672
4078
  children: c
3673
4079
  });
3674
4080
  }
3675
- var Sn = {
4081
+ var Kn = {
3676
4082
  area: !0,
3677
4083
  bar: !0,
3678
4084
  line: !0
3679
4085
  };
3680
- function Cn(e) {
3681
- return S(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);
3682
4088
  }
3683
- function wn(e) {
3684
- return S(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);
3685
4091
  }
3686
- function Tn(e) {
3687
- return S(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);
3688
4094
  }
3689
- function En(e) {
3690
- return S(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);
3691
4097
  }
3692
- function Dn(e) {
3693
- if (!S(e)) return !1;
4098
+ function Zn(e) {
4099
+ if (!w(e)) return !1;
3694
4100
  let t = e.type;
3695
- if (typeof t != "string" || !(t in Sn)) return !1;
4101
+ if (typeof t != "string" || !(t in Kn)) return !1;
3696
4102
  let n = e.axis_config;
3697
- return Array.isArray(e.series) && e.series.every(Tn) && S(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
4103
+ return Array.isArray(e.series) && e.series.every(Yn) && w(n) && Array.isArray(n.categories) && n.categories.every((e) => typeof e == "string");
3698
4104
  }
3699
- function On({ block: e, className: n }) {
3700
- let r = e.chart, i = typeof e.title == "string" ? e.title : T(e, "chart"), { ref: a, width: o } = sn(), s = Math.min(624, Math.max(400, o)) - 26, c = Dn(r) ? r : void 0, l = c === void 0 && En(r) ? r : void 0, f, p;
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;
3701
4107
  l === void 0 ? c === void 0 ? (f = /* @__PURE__ */ u("div", {
3702
- ...g(D.unhandled),
3703
- "data-unhandled-chart-type": C(r) ?? "unknown",
3704
- children: T(r, "chart")
3705
- }), p = []) : (f = /* @__PURE__ */ u(yn, {
4108
+ ...g(O.unhandled),
4109
+ "data-unhandled-chart-type": T(r) ?? "unknown",
4110
+ children: E(r, "chart")
4111
+ }), p = []) : (f = /* @__PURE__ */ u(Un, {
3706
4112
  chart: c,
3707
4113
  svgWidth: s,
3708
4114
  title: i
3709
- }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ u(xn, {
4115
+ }), p = c.series.map((e) => e.name)) : (f = /* @__PURE__ */ u(Gn, {
3710
4116
  chart: l,
3711
4117
  svgWidth: s,
3712
4118
  title: i
@@ -3717,39 +4123,39 @@ function On({ block: e, className: n }) {
3717
4123
  blockType: e.type,
3718
4124
  className: n,
3719
4125
  children: /* @__PURE__ */ u("div", {
3720
- ...g(D.chartScroller),
4126
+ ...g(O.chartScroller),
3721
4127
  children: /* @__PURE__ */ u("div", {
3722
- ...g(D.chartCard),
4128
+ ...g(O.chartCard),
3723
4129
  ref: a,
3724
4130
  children: /* @__PURE__ */ d("div", {
3725
- ...g(D.chartContent),
4131
+ ...g(O.chartContent),
3726
4132
  children: [/* @__PURE__ */ u("h3", {
3727
- ...g(D.chartTitle),
4133
+ ...g(O.chartTitle),
3728
4134
  children: i
3729
4135
  }), /* @__PURE__ */ d("div", {
3730
- ...g(D.chartPlotArea),
4136
+ ...g(O.chartPlotArea),
3731
4137
  children: [
3732
4138
  /* @__PURE__ */ d("div", {
3733
- ...g(D.chartCanvas),
4139
+ ...g(O.chartCanvas),
3734
4140
  children: [f, h === void 0 ? null : /* @__PURE__ */ u("div", {
3735
- ...g(D.chartYAxisLabel),
4141
+ ...g(O.chartYAxisLabel),
3736
4142
  children: /* @__PURE__ */ u("span", {
3737
- ...g(D.chartYAxisLabelText),
4143
+ ...g(O.chartYAxisLabelText),
3738
4144
  children: h
3739
4145
  })
3740
4146
  })]
3741
4147
  }),
3742
4148
  c === void 0 ? null : /* @__PURE__ */ u("div", {
3743
- ...g(D.chartXAxisLabel),
4149
+ ...g(O.chartXAxisLabel),
3744
4150
  children: m
3745
4151
  }),
3746
4152
  p.length === 0 ? null : /* @__PURE__ */ u("div", {
3747
- ...g(D.chartLegend, c !== void 0 && D.chartLegendCartesian),
4153
+ ...g(O.chartLegend, c !== void 0 && O.chartLegendCartesian),
3748
4154
  children: p.map((e, n) => /* @__PURE__ */ t("span", {
3749
- ...g(D.chartLegendItem),
4155
+ ...g(O.chartLegendItem),
3750
4156
  key: `${e}-${String(n)}`
3751
4157
  }, /* @__PURE__ */ u("span", {
3752
- ...g(D.chartLegendSwatch, fn(n).swatch),
4158
+ ...g(O.chartLegendSwatch, In(n).swatch),
3753
4159
  "aria-hidden": "true"
3754
4160
  }), e))
3755
4161
  })
@@ -3762,243 +4168,249 @@ function On({ block: e, className: n }) {
3762
4168
  }
3763
4169
  //#endregion
3764
4170
  //#region src/blocks/InteractiveBlocks.tsx
3765
- function kn(e) {
3766
- return S(e) && S(e.text) && typeof e.text.text == "string";
4171
+ function $n(e) {
4172
+ return w(e) && w(e.text) && typeof e.text.text == "string";
3767
4173
  }
3768
- function An(e) {
3769
- return S(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);
3770
4176
  }
3771
- function jn(e) {
3772
- return S(e) && e.type === "icon_button" && kn(e);
4177
+ function tr(e) {
4178
+ return w(e) && e.type === "icon_button" && $n(e);
3773
4179
  }
3774
- function Mn({ block: e, className: t, path: n = "block" }) {
3775
- let r = g(D.block, D.actions), i = Array.isArray(e.elements) ? e.elements : [];
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 : [];
3776
4182
  return /* @__PURE__ */ u("div", {
3777
4183
  ...r,
3778
- className: k(r.className, t),
4184
+ className: A(r.className, t),
3779
4185
  "data-block-id": e.block_id,
3780
4186
  "data-block-type": e.type,
3781
- children: i.map((t, r) => /* @__PURE__ */ u(at, {
4187
+ children: i.map((t, r) => /* @__PURE__ */ u(Dt, {
3782
4188
  blockId: e.block_id,
3783
4189
  element: t,
3784
4190
  path: `${n}.elements[${String(r)}]`
3785
- }, `${C(t) ?? "unknown"}-${S(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)}`))
3786
4192
  });
3787
4193
  }
3788
- function Nn({ block: e, className: t, path: n = "block" }) {
3789
- let r = g(D.block, D.inputBlock), i = e.label;
4194
+ function rr({ block: e, className: t, path: n = "block" }) {
4195
+ let r = g(O.block, O.inputBlock), i = e.label;
3790
4196
  return /* @__PURE__ */ d("div", {
3791
4197
  ...r,
3792
- className: k(r.className, t),
4198
+ className: A(r.className, t),
3793
4199
  "data-block-id": e.block_id,
3794
4200
  "data-block-type": e.type,
3795
4201
  children: [
3796
4202
  /* @__PURE__ */ d("div", {
3797
- ...g(D.inputLabel),
3798
- children: [S(i) && typeof i.text == "string" ? i.text : T(i, "input label"), e.optional === !0 ? null : /* @__PURE__ */ u("span", {
3799
- ...g(D.required),
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),
3800
4206
  "aria-hidden": "true",
3801
4207
  children: "*"
3802
4208
  })]
3803
4209
  }),
3804
- /* @__PURE__ */ u(at, {
4210
+ /* @__PURE__ */ u(Dt, {
3805
4211
  blockId: e.block_id,
3806
4212
  element: e.element,
3807
4213
  path: `${n}.element`
3808
4214
  }),
3809
4215
  e.hint === void 0 ? null : /* @__PURE__ */ u("div", {
3810
- ...g(D.smallText),
3811
- children: S(e.hint) && typeof e.hint.text == "string" ? e.hint.text : T(e.hint, "input hint")
4216
+ ...g(O.smallText),
4217
+ children: w(e.hint) && typeof e.hint.text == "string" ? e.hint.text : E(e.hint, "input hint")
3812
4218
  })
3813
4219
  ]
3814
4220
  });
3815
4221
  }
3816
- function Pn(e, t) {
4222
+ function ir(e, t) {
3817
4223
  return t === "positive" ? e.positive_button.text.text : e.negative_button.text.text;
3818
4224
  }
3819
- function Fn({ block: e, className: n }) {
3820
- let { onAction: r } = x(), i = g(D.block, D.actions), a = e.elements;
4225
+ function ar({ block: e, className: n }) {
4226
+ let { onAction: r } = x(), i = g(O.block, O.actions), a = e.elements;
3821
4227
  return /* @__PURE__ */ u("div", {
3822
4228
  ...i,
3823
- className: k(i.className, n),
4229
+ className: A(i.className, n),
3824
4230
  "data-block-id": e.block_id,
3825
4231
  "data-block-type": e.type,
3826
- children: Array.isArray(a) ? a.map((n, i) => jn(n) ? /* @__PURE__ */ t("button", {
3827
- ...g(D.button, D.iconButton),
3828
- "aria-label": n.accessibility_label ?? n.text.text,
3829
- key: `${n.type}-${n.action_id ?? "button"}-${String(i)}`,
3830
- onClick: () => {
3831
- n.action_id !== void 0 && r?.({
3832
- actionId: n.action_id,
3833
- type: n.type,
3834
- ...e.block_id === void 0 ? {} : { blockId: e.block_id },
3835
- ...n.value === void 0 ? {} : { value: n.value }
3836
- });
3837
- },
3838
- title: n.text.text,
3839
- type: "button"
3840
- }, n.icon === "trash" ? "⌫" : n.icon) : An(n) ? /* @__PURE__ */ t("div", {
3841
- ...g(D.actions),
3842
- key: `${n.type}-${n.action_id ?? "feedback"}-${String(i)}`
3843
- }, /* @__PURE__ */ u("button", {
3844
- ...g(D.button, D.iconButton),
3845
- "aria-label": Pn(n, "positive"),
3846
- onClick: () => {
3847
- n.action_id !== void 0 && r?.({
3848
- actionId: n.action_id,
3849
- type: n.type,
3850
- value: n.positive_button.value,
3851
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3852
- });
3853
- },
3854
- type: "button",
3855
- children: "👍"
3856
- }), /* @__PURE__ */ u("button", {
3857
- ...g(D.button, D.iconButton),
3858
- "aria-label": Pn(n, "negative"),
3859
- onClick: () => {
3860
- n.action_id !== void 0 && r?.({
3861
- actionId: n.action_id,
3862
- type: n.type,
3863
- value: n.negative_button.value,
3864
- ...e.block_id === void 0 ? {} : { blockId: e.block_id }
3865
- });
3866
- },
3867
- type: "button",
3868
- children: "👎"
3869
- })) : /* @__PURE__ */ t("div", {
3870
- ...g(D.unhandled),
3871
- "data-unhandled-element": C(n) ?? "unknown",
3872
- key: `unhandled-${String(i)}`
3873
- }, T(n, "context action"))) : /* @__PURE__ */ u("div", {
3874
- ...g(D.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),
3875
4287
  "data-unhandled-element": "context_actions",
3876
- children: T(e, "context actions block")
4288
+ children: E(e, "context actions block")
3877
4289
  })
3878
4290
  });
3879
4291
  }
3880
4292
  //#endregion
3881
4293
  //#region src/Block.tsx
3882
- var In = new Set(an);
3883
- function Ln(e) {
3884
- let t = C(e);
3885
- return t !== void 0 && In.has(t);
3886
- }
3887
- function Rn({ block: e, className: t, path: n = "block" }) {
3888
- let r = C(e);
3889
- if (!Ln(e)) {
3890
- let n = g(D.block, D.unhandled);
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);
3891
4303
  return /* @__PURE__ */ u("div", {
3892
4304
  ...n,
3893
- className: k(n.className, t),
4305
+ className: A(n.className, t),
3894
4306
  "data-block-type": r ?? "unknown",
3895
4307
  "data-unhandled-block": !0,
3896
4308
  role: "note",
3897
- children: T(e, "Slack block")
4309
+ children: E(e, "Slack block")
3898
4310
  });
3899
4311
  }
3900
4312
  switch (e.type) {
3901
- case "actions": return /* @__PURE__ */ u(Mn, {
4313
+ case "actions": return /* @__PURE__ */ u(nr, {
3902
4314
  block: e,
3903
4315
  className: t,
3904
4316
  path: n
3905
4317
  });
3906
- case "alert": return /* @__PURE__ */ u(Ut, {
4318
+ case "alert": return /* @__PURE__ */ u(mn, {
3907
4319
  block: e,
3908
4320
  className: t,
3909
4321
  path: n
3910
4322
  });
3911
- case "card": return /* @__PURE__ */ u(Bt, {
4323
+ case "card": return /* @__PURE__ */ u(dn, {
3912
4324
  block: e,
3913
4325
  className: t,
3914
4326
  path: n
3915
4327
  });
3916
- case "carousel": return /* @__PURE__ */ u(Ht, {
4328
+ case "carousel": return /* @__PURE__ */ u(pn, {
3917
4329
  block: e,
3918
4330
  className: t,
3919
4331
  path: n
3920
4332
  });
3921
- case "container": return /* @__PURE__ */ u(Wn, {
4333
+ case "container": return /* @__PURE__ */ u(mr, {
3922
4334
  block: e,
3923
4335
  className: t,
3924
4336
  path: n
3925
4337
  });
3926
- case "context": return /* @__PURE__ */ u(kt, {
4338
+ case "context": return /* @__PURE__ */ u(Qt, {
3927
4339
  block: e,
3928
4340
  className: t,
3929
4341
  path: n
3930
4342
  });
3931
- case "context_actions": return /* @__PURE__ */ u(Fn, {
4343
+ case "context_actions": return /* @__PURE__ */ u(ar, {
3932
4344
  block: e,
3933
4345
  className: t,
3934
4346
  path: n
3935
4347
  });
3936
- case "data_table": return /* @__PURE__ */ u(zt, {
4348
+ case "data_table": return /* @__PURE__ */ u(ln, {
3937
4349
  block: e,
3938
4350
  className: t,
3939
4351
  path: n
3940
4352
  });
3941
- case "data_visualization": return /* @__PURE__ */ u(On, {
4353
+ case "data_visualization": return /* @__PURE__ */ u(Qn, {
3942
4354
  block: e,
3943
4355
  className: t,
3944
4356
  path: n
3945
4357
  });
3946
- case "divider": return /* @__PURE__ */ u(Et, {
4358
+ case "divider": return /* @__PURE__ */ u(Yt, {
3947
4359
  block: e,
3948
4360
  className: t,
3949
4361
  path: n
3950
4362
  });
3951
- case "file": return /* @__PURE__ */ u(Mt, {
4363
+ case "file": return /* @__PURE__ */ u(tn, {
3952
4364
  block: e,
3953
4365
  className: t,
3954
4366
  path: n
3955
4367
  });
3956
- case "header": return /* @__PURE__ */ u(Tt, {
4368
+ case "header": return /* @__PURE__ */ u(Jt, {
3957
4369
  block: e,
3958
4370
  className: t,
3959
4371
  path: n
3960
4372
  });
3961
- case "image": return /* @__PURE__ */ u(Dt, {
4373
+ case "image": return /* @__PURE__ */ u(Xt, {
3962
4374
  block: e,
3963
4375
  className: t,
3964
4376
  path: n
3965
4377
  });
3966
- case "input": return /* @__PURE__ */ u(Nn, {
4378
+ case "input": return /* @__PURE__ */ u(rr, {
3967
4379
  block: e,
3968
4380
  className: t,
3969
4381
  path: n
3970
4382
  });
3971
- case "markdown": return /* @__PURE__ */ u(jt, {
4383
+ case "markdown": return /* @__PURE__ */ u(en, {
3972
4384
  block: e,
3973
4385
  className: t,
3974
4386
  path: n
3975
4387
  });
3976
- case "plan": return /* @__PURE__ */ u(Kt, {
4388
+ case "plan": return /* @__PURE__ */ u(_n, {
3977
4389
  block: e,
3978
4390
  className: t,
3979
4391
  path: n
3980
4392
  });
3981
- case "rich_text": return /* @__PURE__ */ u(At, {
4393
+ case "rich_text": return /* @__PURE__ */ u($t, {
3982
4394
  block: e,
3983
4395
  className: t,
3984
4396
  path: n
3985
4397
  });
3986
- case "section": return /* @__PURE__ */ u(wt, {
4398
+ case "section": return /* @__PURE__ */ u(qt, {
3987
4399
  block: e,
3988
4400
  className: t,
3989
4401
  path: n
3990
4402
  });
3991
- case "table": return /* @__PURE__ */ u(It, {
4403
+ case "table": return /* @__PURE__ */ u(on, {
3992
4404
  block: e,
3993
4405
  className: t,
3994
4406
  path: n
3995
4407
  });
3996
- case "task_card": return /* @__PURE__ */ u(Wt, {
4408
+ case "task_card": return /* @__PURE__ */ u(hn, {
3997
4409
  block: e,
3998
4410
  className: t,
3999
4411
  path: n
4000
4412
  });
4001
- case "video": return /* @__PURE__ */ u(Nt, {
4413
+ case "video": return /* @__PURE__ */ u(nn, {
4002
4414
  block: e,
4003
4415
  className: t,
4004
4416
  path: n
@@ -4006,10 +4418,10 @@ function Rn({ block: e, className: t, path: n = "block" }) {
4006
4418
  default: return _(e);
4007
4419
  }
4008
4420
  }
4009
- function zn(e) {
4010
- return /* @__PURE__ */ u(Rn, { ...e });
4421
+ function lr(e) {
4422
+ return /* @__PURE__ */ u(cr, { ...e });
4011
4423
  }
4012
- var Bn = {
4424
+ var ur = {
4013
4425
  actions: !0,
4014
4426
  context: !0,
4015
4427
  divider: !0,
@@ -4022,65 +4434,70 @@ var Bn = {
4022
4434
  table: !0,
4023
4435
  video: !0
4024
4436
  };
4025
- function Vn(e) {
4026
- let t = C(e);
4027
- return t !== void 0 && t in Bn;
4437
+ function dr(e) {
4438
+ let t = T(e);
4439
+ return t !== void 0 && t in ur;
4028
4440
  }
4029
- function Hn({ block: e, path: t }) {
4441
+ function fr({ block: e, path: t }) {
4030
4442
  let n = e.title, r = e.subtitle;
4031
- return /* @__PURE__ */ d(l, { children: [e.icon === void 0 ? null : /* @__PURE__ */ u(P, {
4443
+ return /* @__PURE__ */ d(l, { children: [e.icon === void 0 ? null : /* @__PURE__ */ u(F, {
4032
4444
  element: e.icon,
4033
4445
  variant: "cardIcon"
4034
- }), /* @__PURE__ */ d("div", { children: [e.rich_text_title === void 0 ? e.title === void 0 ? null : /* @__PURE__ */ u("strong", { children: S(n) && typeof n.text == "string" ? n.text : T(n, "container title") }) : /* @__PURE__ */ u(M, {
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, {
4035
4447
  block: e.rich_text_title,
4036
4448
  path: `${t}.rich_text_title`
4037
4449
  }), e.subtitle === void 0 ? null : /* @__PURE__ */ u("div", {
4038
- ...g(D.smallText),
4039
- children: S(r) && typeof r.text == "string" ? r.text : T(r, "container subtitle")
4450
+ ...g(O.smallText),
4451
+ children: w(r) && typeof r.text == "string" ? r.text : E(r, "container subtitle")
4040
4452
  })] })] });
4041
4453
  }
4042
- function Un({ block: e, path: n }) {
4454
+ function pr({ block: e, path: n }) {
4043
4455
  let r = e.child_blocks;
4044
4456
  return /* @__PURE__ */ u("div", {
4045
- ...g(D.containerBody),
4046
- children: Array.isArray(r) ? r.map((e, r) => Vn(e) ? /* @__PURE__ */ u(Rn, {
4457
+ ...g(O.containerBody),
4458
+ children: Array.isArray(r) ? r.map((e, r) => dr(e) ? /* @__PURE__ */ u(cr, {
4047
4459
  block: e,
4048
4460
  path: `${n}.child_blocks[${String(r)}]`
4049
- }, `${C(e) ?? "unknown"}-${w(e) ?? "block"}-${String(r)}`) : /* @__PURE__ */ t("div", {
4050
- ...g(D.unhandled),
4051
- "data-block-type": C(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",
4052
4464
  "data-unhandled-block": !0,
4053
4465
  key: `unknown-${String(r)}`
4054
- }, T(e, "Slack block"))) : null
4466
+ }, E(e, "Slack block"))) : null
4055
4467
  });
4056
4468
  }
4057
- function Wn({ block: e, className: t, path: n = "block" }) {
4469
+ function mr({ block: e, className: t, path: n = "block" }) {
4058
4470
  return /* @__PURE__ */ u(R, {
4059
4471
  blockId: e.block_id,
4060
4472
  blockType: e.type,
4061
4473
  className: t,
4062
4474
  children: e.is_collapsible === !0 ? /* @__PURE__ */ d("details", {
4063
- ...g(D.container),
4475
+ ...g(O.container),
4064
4476
  open: e.default_collapsed !== !0,
4065
- children: [/* @__PURE__ */ u("summary", {
4066
- ...g(D.containerHeader, e.has_header_divider === !0 && D.containerHeaderDivider),
4067
- children: /* @__PURE__ */ u(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, {
4068
4485
  block: e,
4069
4486
  path: n
4070
- })
4071
- }), /* @__PURE__ */ u(Un, {
4487
+ })]
4488
+ }), /* @__PURE__ */ u(pr, {
4072
4489
  block: e,
4073
4490
  path: n
4074
4491
  })]
4075
4492
  }) : /* @__PURE__ */ d("div", {
4076
- ...g(D.container),
4493
+ ...g(O.container),
4077
4494
  children: [/* @__PURE__ */ u("div", {
4078
- ...g(D.containerHeader, e.has_header_divider === !0 && D.containerHeaderDivider),
4079
- children: /* @__PURE__ */ u(Hn, {
4495
+ ...g(O.containerHeader, e.has_header_divider === !0 && O.containerHeaderDivider),
4496
+ children: /* @__PURE__ */ u(fr, {
4080
4497
  block: e,
4081
4498
  path: n
4082
4499
  })
4083
- }), /* @__PURE__ */ u(Un, {
4500
+ }), /* @__PURE__ */ u(pr, {
4084
4501
  block: e,
4085
4502
  path: n
4086
4503
  })]
@@ -4089,7 +4506,7 @@ function Wn({ block: e, className: t, path: n = "block" }) {
4089
4506
  }
4090
4507
  //#endregion
4091
4508
  //#region src/errors.ts
4092
- var Gn = class extends Error {
4509
+ var hr = class extends Error {
4093
4510
  code;
4094
4511
  path;
4095
4512
  name;
@@ -4099,12 +4516,12 @@ var Gn = class extends Error {
4099
4516
  };
4100
4517
  //#endregion
4101
4518
  //#region src/BlockKit.tsx
4102
- function Kn(e) {
4519
+ function gr(e) {
4103
4520
  let t = e;
4104
4521
  if (typeof e == "string") try {
4105
4522
  t = JSON.parse(e);
4106
4523
  } catch {
4107
- throw new Gn("data: expected valid JSON", {
4524
+ throw new hr("data: expected valid JSON", {
4108
4525
  code: "invalid_json",
4109
4526
  path: "data"
4110
4527
  });
@@ -4112,7 +4529,7 @@ function Kn(e) {
4112
4529
  return Array.isArray(t) ? {
4113
4530
  blockListPath: "data",
4114
4531
  blocks: t
4115
- } : S(t) && Array.isArray(t.blocks) ? {
4532
+ } : w(t) && Array.isArray(t.blocks) ? {
4116
4533
  blockListPath: "data.blocks",
4117
4534
  blocks: t.blocks
4118
4535
  } : {
@@ -4120,8 +4537,8 @@ function Kn(e) {
4120
4537
  blocks: [t]
4121
4538
  };
4122
4539
  }
4123
- function qn({ "aria-label": e = "Slack Block Kit preview", className: t, data: n, onAction: r, resolvers: i, surface: a = "message", theme: s = "light" }) {
4124
- let c = o(() => Kn(n), [n]), l = g(s === "dark" ? ne : te, D.root, s === "dark" ? D.rootDark : D.rootLight);
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);
4125
4542
  return /* @__PURE__ */ u(b, {
4126
4543
  onAction: r,
4127
4544
  resolvers: i,
@@ -4129,31 +4546,31 @@ function qn({ "aria-label": e = "Slack Block Kit preview", className: t, data: n
4129
4546
  children: /* @__PURE__ */ u("div", {
4130
4547
  ...l,
4131
4548
  "aria-label": e,
4132
- className: k(l.className, t),
4549
+ className: A(l.className, t),
4133
4550
  "data-block-kit-root": !0,
4134
4551
  "data-surface": a,
4135
4552
  "data-theme": s,
4136
4553
  role: "article",
4137
- children: c.blocks.map((e, t) => /* @__PURE__ */ u(Rn, {
4554
+ children: c.blocks.map((e, t) => /* @__PURE__ */ u(cr, {
4138
4555
  block: e,
4139
4556
  path: `${c.blockListPath}[${String(t)}]`
4140
- }, `${C(e) ?? "unknown"}-${w(e) ?? "block"}-${String(t)}`))
4557
+ }, `${T(e) ?? "unknown"}-${xe(e) ?? "block"}-${String(t)}`))
4141
4558
  })
4142
4559
  });
4143
4560
  }
4144
4561
  //#endregion
4145
4562
  //#region src/validation.ts
4146
- function Jn(e, t, n) {
4147
- throw new Gn(n, {
4563
+ function vr(e, t, n) {
4564
+ throw new hr(n, {
4148
4565
  code: e,
4149
4566
  path: t
4150
4567
  });
4151
4568
  }
4152
4569
  function z(e, t, n, r) {
4153
- e || Jn(t, n, r);
4570
+ e || vr(t, n, r);
4154
4571
  }
4155
4572
  function B(e, t) {
4156
- z(S(e), "invalid_type", t, "expected an object");
4573
+ z(w(e), "invalid_type", t, "expected an object");
4157
4574
  }
4158
4575
  function V(e, t) {
4159
4576
  z(Array.isArray(e), "invalid_type", t, "expected an array");
@@ -4179,67 +4596,67 @@ function q(e, t, n) {
4179
4596
  function J(e, t) {
4180
4597
  H(e.type, `${t}.type`), U(e.block_id, `${t}.block_id`, { max: 255 });
4181
4598
  }
4182
- function Y(e, t, n = qt) {
4599
+ function Y(e, t, n = vn) {
4183
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"));
4184
4601
  }
4185
- function Yn(e, t = "text", n = qt) {
4602
+ function yr(e, t = "text", n = vn) {
4186
4603
  Y(e, t, n);
4187
4604
  }
4188
- function X(e, t, n = qt) {
4189
- Y(e, t, n), z(S(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\"");
4190
4607
  }
4191
- function Xn(e, t) {
4608
+ function br(e, t) {
4192
4609
  B(e, t);
4193
4610
  let n = e.id !== void 0, r = e.url !== void 0;
4194
- 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 });
4195
4612
  }
4196
4613
  function Z(e, t) {
4197
- 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 });
4198
4615
  let n = e.image_url !== void 0, r = e.slack_file !== void 0;
4199
- 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 && Xn(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`);
4200
4617
  }
4201
- function Zn(e, t = "element") {
4618
+ function xr(e, t = "element") {
4202
4619
  Z(e, t);
4203
4620
  }
4204
- function Qn(e, t) {
4205
- 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);
4206
4623
  }
4207
- function $n(e, t, n) {
4624
+ function Cr(e, t, n) {
4208
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) => {
4209
- Qn(e, `${t}[${String(n)}]`);
4626
+ Sr(e, `${t}[${String(n)}]`);
4210
4627
  });
4211
4628
  }
4212
- function er(e, t) {
4629
+ function wr(e, t) {
4213
4630
  U(e.action_id, `${t}.action_id`, { max: 255 });
4214
4631
  }
4215
- function tr(e, t) {
4632
+ function Tr(e, t) {
4216
4633
  e.placeholder !== void 0 && X(e.placeholder, `${t}.placeholder`, 150);
4217
4634
  }
4218
- function nr(e, t) {
4219
- B(e, t), K(e, "button", t), er(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`);
4220
4637
  }
4221
- function rr(e, t) {
4638
+ function Dr(e, t) {
4222
4639
  let n = e.options !== void 0, r = e.option_groups !== void 0;
4223
- z(n !== r, "invalid_value", t, "must contain exactly one of options or option_groups"), n && $n(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) => {
4224
4641
  let r = `${t}.option_groups[${String(n)}]`;
4225
- B(e, r), X(e.label, `${r}.label`, 75), $n(e.options, `${r}.options`, 100);
4642
+ B(e, r), X(e.label, `${r}.label`, 75), Cr(e.options, `${r}.options`, 100);
4226
4643
  }));
4227
4644
  }
4228
- function ir(e, t) {
4229
- switch (B(e, t), H(e.type, `${t}.type`), er(e, t), tr(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) {
4230
4647
  case "button":
4231
- nr(e, t);
4648
+ Er(e, t);
4232
4649
  return;
4233
4650
  case "checkboxes":
4234
4651
  case "radio_buttons":
4235
- $n(e.options, `${t}.options`, 10);
4652
+ Cr(e.options, `${t}.options`, 10);
4236
4653
  return;
4237
4654
  case "overflow":
4238
- $n(e.options, `${t}.options`, 5);
4655
+ Cr(e.options, `${t}.options`, 5);
4239
4656
  return;
4240
4657
  case "static_select":
4241
4658
  case "multi_static_select":
4242
- rr(e, t);
4659
+ Dr(e, t);
4243
4660
  return;
4244
4661
  case "external_select":
4245
4662
  case "multi_external_select":
@@ -4285,13 +4702,13 @@ function ir(e, t) {
4285
4702
  case "workflow_button":
4286
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`);
4287
4704
  return;
4288
- default: Jn("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4705
+ default: vr("unsupported_element", `${t}.type`, `unsupported element "${e.type}"`);
4289
4706
  }
4290
4707
  }
4291
- function ar(e, t = "element") {
4292
- ir(e, t);
4708
+ function kr(e, t = "element") {
4709
+ Or(e, t);
4293
4710
  }
4294
- function or(e, t) {
4711
+ function Ar(e, t) {
4295
4712
  if (e !== void 0) {
4296
4713
  B(e, t);
4297
4714
  for (let n of [
@@ -4303,8 +4720,8 @@ function or(e, t) {
4303
4720
  ]) G(e[n], `${t}.${n}`);
4304
4721
  }
4305
4722
  }
4306
- function sr(e, t) {
4307
- switch (B(e, t), H(e.type, `${t}.type`), or(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) {
4308
4725
  case "text":
4309
4726
  H(e.text, `${t}.text`, { allowEmpty: !0 });
4310
4727
  return;
@@ -4358,12 +4775,12 @@ function sr(e, t) {
4358
4775
  case "workflow_mention":
4359
4776
  z(Object.keys(e).length > 1, "missing_field", t, `${e.type} must contain its reference fields`);
4360
4777
  return;
4361
- default: Jn("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4778
+ default: vr("unsupported_element", `${t}.type`, `unsupported rich text element "${e.type}"`);
4362
4779
  }
4363
4780
  }
4364
- function cr(e, t) {
4781
+ function Mr(e, t) {
4365
4782
  V(e, t), e.forEach((e, n) => {
4366
- sr(e, `${t}[${String(n)}]`);
4783
+ jr(e, `${t}[${String(n)}]`);
4367
4784
  });
4368
4785
  }
4369
4786
  function Q(e, t) {
@@ -4372,7 +4789,7 @@ function Q(e, t) {
4372
4789
  switch (B(e, r), H(e.type, `${r}.type`), e.type) {
4373
4790
  case "rich_text_section":
4374
4791
  case "rich_text_quote":
4375
- cr(e.elements, `${r}.elements`);
4792
+ Mr(e.elements, `${r}.elements`);
4376
4793
  return;
4377
4794
  case "rich_text_list":
4378
4795
  q(e.style, ["bullet", "ordered"], `${r}.style`), e.indent !== void 0 && W(e.indent, `${r}.indent`, {
@@ -4384,25 +4801,25 @@ function Q(e, t) {
4384
4801
  min: 0
4385
4802
  }), V(e.elements, `${r}.elements`), e.elements.forEach((e, t) => {
4386
4803
  let n = `${r}.elements[${String(t)}]`;
4387
- B(e, n), K(e, "rich_text_section", n), cr(e.elements, `${n}.elements`);
4804
+ B(e, n), K(e, "rich_text_section", n), Mr(e.elements, `${n}.elements`);
4388
4805
  });
4389
4806
  return;
4390
4807
  case "rich_text_preformatted":
4391
- cr(e.elements, `${r}.elements`), U(e.language, `${r}.language`);
4808
+ Mr(e.elements, `${r}.elements`), U(e.language, `${r}.language`);
4392
4809
  return;
4393
- default: Jn("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4810
+ default: vr("unsupported_element", `${r}.type`, `unsupported rich text container "${e.type}"`);
4394
4811
  }
4395
4812
  });
4396
4813
  }
4397
- function lr(e, t = "block") {
4814
+ function Nr(e, t = "block") {
4398
4815
  Q(e, t);
4399
4816
  }
4400
- function ur(e, t) {
4817
+ function Pr(e, t) {
4401
4818
  B(e, t), K(e, "section", t), J(e, t);
4402
4819
  let n = e.text !== void 0, r = e.fields !== void 0;
4403
- 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) => {
4404
- Y(e, `${t}.fields[${String(n)}]`, Yt);
4405
- })), e.accessory !== void 0 && (B(e.accessory, `${t}.accessory`), e.accessory.type === "image" ? Z(e.accessory, `${t}.accessory`) : (ir(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(![
4406
4823
  "datetimepicker",
4407
4824
  "file_input",
4408
4825
  "plain_text_input",
@@ -4412,26 +4829,26 @@ function ur(e, t) {
4412
4829
  "rich_text_input"
4413
4830
  ].includes(String(e.accessory.type)), "invalid_value", `${t}.accessory.type`, "element is not legal as a section accessory"))), G(e.expand, `${t}.expand`);
4414
4831
  }
4415
- function dr(e, t) {
4832
+ function Fr(e, t) {
4416
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`, {
4417
4834
  integer: !0,
4418
4835
  min: 1,
4419
4836
  max: 4
4420
4837
  });
4421
4838
  }
4422
- function fr(e, t) {
4423
- 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);
4424
4841
  }
4425
- function pr(e, t) {
4842
+ function Lr(e, t) {
4426
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) => {
4427
4844
  let r = `${t}.elements[${String(n)}]`;
4428
4845
  B(e, r), e.type === "image" ? Z(e, r) : Y(e, r);
4429
4846
  });
4430
4847
  }
4431
- function mr(e, t) {
4848
+ function Rr(e, t) {
4432
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) => {
4433
4850
  let r = `${t}.elements[${String(n)}]`;
4434
- ir(e, r), B(e, r), z([
4851
+ Or(e, r), B(e, r), z([
4435
4852
  "button",
4436
4853
  "checkboxes",
4437
4854
  "datepicker",
@@ -4454,8 +4871,8 @@ function mr(e, t) {
4454
4871
  ].includes(String(e.type)), "invalid_value", `${r}.type`, "element is not legal inside an actions block");
4455
4872
  });
4456
4873
  }
4457
- function hr(e, t) {
4458
- 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`), ir(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(![
4459
4876
  "button",
4460
4877
  "overflow",
4461
4878
  "workflow_button",
@@ -4463,18 +4880,18 @@ function hr(e, t) {
4463
4880
  "feedback_buttons"
4464
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");
4465
4882
  }
4466
- function gr(e) {
4467
- if (!S(e)) return 0;
4883
+ function Br(e) {
4884
+ if (!w(e)) return 0;
4468
4885
  if (e.type === "raw_text") return typeof e.text == "string" ? e.text.length : 0;
4469
4886
  if (e.type === "raw_number") return typeof e.text == "string" ? e.text.length : typeof e.value == "number" ? String(e.value).length : 0;
4470
4887
  if (e.type === "rich_text" && Array.isArray(e.elements)) {
4471
4888
  let t = 0;
4472
- for (let n of e.elements) if (!(!S(n) || !Array.isArray(n.elements))) for (let e of n.elements) S(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));
4473
4890
  return t;
4474
4891
  }
4475
4892
  return 0;
4476
4893
  }
4477
- function _r(e, t, n) {
4894
+ function Vr(e, t, n) {
4478
4895
  switch (B(e, t), H(e.type, `${t}.type`), e.type) {
4479
4896
  case "raw_text":
4480
4897
  H(e.text, `${t}.text`);
@@ -4485,21 +4902,21 @@ function _r(e, t, n) {
4485
4902
  case "rich_text":
4486
4903
  z(n, "invalid_value", t, "rich_text is not legal in this row"), Q(e, t);
4487
4904
  return;
4488
- default: Jn("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4905
+ default: vr("invalid_value", `${t}.type`, `unsupported table cell "${e.type}"`);
4489
4906
  }
4490
4907
  }
4491
- function vr(e, t, n, r, i) {
4908
+ function Hr(e, t, n, r, i) {
4492
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`);
4493
4910
  let a, o = 0;
4494
4911
  return e.forEach((e, n) => {
4495
4912
  let r = `${t}[${String(n)}]`;
4496
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) => {
4497
- _r(e, `${r}[${String(t)}]`, i || n !== 0), o += gr(e);
4914
+ Vr(e, `${r}[${String(t)}]`, i || n !== 0), o += Br(e);
4498
4915
  });
4499
4916
  }), z(o <= r, "limit_exceeded", t, `cell content must contain at most ${String(r)} characters`), a ?? 0;
4500
4917
  }
4501
- function yr(e, t) {
4502
- B(e, t), K(e, "table", t), J(e, t), vr(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) => {
4503
4920
  if (e === null) return;
4504
4921
  let r = `${t}.column_settings[${String(n)}]`;
4505
4922
  B(e, r), e.align !== void 0 && q(e.align, [
@@ -4509,9 +4926,9 @@ function yr(e, t) {
4509
4926
  ], `${r}.align`), G(e.is_wrapped, `${r}.is_wrapped`);
4510
4927
  }));
4511
4928
  }
4512
- function br(e, t) {
4929
+ function Wr(e, t) {
4513
4930
  B(e, t), K(e, "data_table", t), J(e, t), H(e.caption, `${t}.caption`);
4514
- let n = vr(e.rows, `${t}.rows`, 201, rn, !1);
4931
+ let n = Hr(e.rows, `${t}.rows`, 201, On, !1);
4515
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`, {
4516
4933
  integer: !0,
4517
4934
  min: 1,
@@ -4522,7 +4939,7 @@ function br(e, t) {
4522
4939
  max: n - 1
4523
4940
  });
4524
4941
  }
4525
- function xr(e, t) {
4942
+ function Gr(e, t) {
4526
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") {
4527
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) => {
4528
4945
  let r = `${t}.chart.segments[${String(n)}]`;
@@ -4551,20 +4968,20 @@ function xr(e, t) {
4551
4968
  });
4552
4969
  });
4553
4970
  }
4554
- function Sr(e, t) {
4971
+ function Kr(e, t) {
4555
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`));
4556
4973
  for (let n of ["title", "subtitle"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 150);
4557
4974
  for (let n of ["body", "subtext"]) e[n] !== void 0 && Y(e[n], `${t}.${n}`, 200);
4558
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) => {
4559
- nr(e, `${t}.actions[${String(n)}]`);
4976
+ Er(e, `${t}.actions[${String(n)}]`);
4560
4977
  }));
4561
4978
  }
4562
- function Cr(e, t) {
4979
+ function qr(e, t) {
4563
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) => {
4564
- Sr(e, `${t}.elements[${String(n)}]`);
4981
+ Kr(e, `${t}.elements[${String(n)}]`);
4565
4982
  });
4566
4983
  }
4567
- function wr(e, t, n) {
4984
+ function Jr(e, t, n) {
4568
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, [
4569
4986
  "default",
4570
4987
  "info",
@@ -4573,21 +4990,21 @@ function wr(e, t, n) {
4573
4990
  "success"
4574
4991
  ], `${n}.level`);
4575
4992
  }
4576
- function Tr(e, t) {
4993
+ function Yr(e, t) {
4577
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) => {
4578
4995
  let r = `${t}.elements[${String(n)}]`;
4579
- if (B(e, r), er(e, r), e.type === "icon_button") {
4580
- 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 });
4581
4998
  return;
4582
4999
  }
4583
5000
  z(e.type === "feedback_buttons", "unsupported_element", `${r}.type`, "context_actions only accepts icon_button or feedback_buttons");
4584
5001
  for (let t of ["positive_button", "negative_button"]) {
4585
5002
  let n = `${r}.${t}`;
4586
- 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 });
4587
5004
  }
4588
5005
  });
4589
5006
  }
4590
- function Er(e, t) {
5007
+ function Xr(e, t) {
4591
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, [
4592
5009
  "pending",
4593
5010
  "in_progress",
@@ -4598,12 +5015,12 @@ function Er(e, t) {
4598
5015
  B(e, r), K(e, "url", r), H(e.url, `${r}.url`), H(e.text, `${r}.text`);
4599
5016
  }));
4600
5017
  }
4601
- function Dr(e, t) {
5018
+ function Zr(e, t) {
4602
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) => {
4603
- Er(e, `${t}.tasks[${String(n)}]`);
5020
+ Xr(e, `${t}.tasks[${String(n)}]`);
4604
5021
  }));
4605
5022
  }
4606
- function Or(e, t) {
5023
+ function Qr(e, t) {
4607
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, [
4608
5025
  "narrow",
4609
5026
  "standard",
@@ -4625,122 +5042,122 @@ function Or(e, t) {
4625
5042
  ];
4626
5043
  e.child_blocks.forEach((e, r) => {
4627
5044
  let i = `${t}.child_blocks[${String(r)}]`;
4628
- 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`), jr(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);
4629
5046
  });
4630
5047
  }
4631
- function kr(e, t) {
5048
+ function $r(e, t) {
4632
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`);
4633
5050
  }
4634
- function Ar(e, t) {
4635
- 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 });
4636
5053
  }
4637
5054
  function $(e, t, n) {
4638
5055
  z(e === "message", "surface_mismatch", t, `${n} blocks are only documented for message surfaces`);
4639
5056
  }
4640
- function jr(e, t = "message", n = "block") {
5057
+ function ti(e, t = "message", n = "block") {
4641
5058
  switch (B(e, n), J(e, n), e.type) {
4642
5059
  case "actions":
4643
- mr(e, n);
5060
+ Rr(e, n);
4644
5061
  return;
4645
5062
  case "alert":
4646
- wr(e, t, n);
5063
+ Jr(e, t, n);
4647
5064
  return;
4648
5065
  case "card":
4649
- $(t, n, e.type), Sr(e, n);
5066
+ $(t, n, e.type), Kr(e, n);
4650
5067
  return;
4651
5068
  case "carousel":
4652
- $(t, n, e.type), Cr(e, n);
5069
+ $(t, n, e.type), qr(e, n);
4653
5070
  return;
4654
5071
  case "container":
4655
- $(t, n, e.type), Or(e, n);
5072
+ $(t, n, e.type), Qr(e, n);
4656
5073
  return;
4657
5074
  case "context":
4658
- pr(e, n);
5075
+ Lr(e, n);
4659
5076
  return;
4660
5077
  case "context_actions":
4661
- $(t, n, e.type), Tr(e, n);
5078
+ $(t, n, e.type), Yr(e, n);
4662
5079
  return;
4663
5080
  case "data_table":
4664
- $(t, n, e.type), br(e, n);
5081
+ $(t, n, e.type), Wr(e, n);
4665
5082
  return;
4666
5083
  case "data_visualization":
4667
- $(t, n, e.type), xr(e, n);
5084
+ $(t, n, e.type), Gr(e, n);
4668
5085
  return;
4669
5086
  case "divider":
4670
5087
  K(e, "divider", n);
4671
5088
  return;
4672
5089
  case "file":
4673
- $(t, n, e.type), kr(e, n);
5090
+ $(t, n, e.type), $r(e, n);
4674
5091
  return;
4675
5092
  case "header":
4676
- dr(e, n);
5093
+ Fr(e, n);
4677
5094
  return;
4678
5095
  case "image":
4679
- fr(e, n);
5096
+ Ir(e, n);
4680
5097
  return;
4681
5098
  case "input":
4682
- hr(e, n);
5099
+ zr(e, n);
4683
5100
  return;
4684
5101
  case "markdown":
4685
- $(t, n, e.type), H(e.text, `${n}.text`, { max: $t });
5102
+ $(t, n, e.type), H(e.text, `${n}.text`, { max: wn });
4686
5103
  return;
4687
5104
  case "plan":
4688
- $(t, n, e.type), Dr(e, n);
5105
+ $(t, n, e.type), Zr(e, n);
4689
5106
  return;
4690
5107
  case "rich_text":
4691
5108
  Q(e, n);
4692
5109
  return;
4693
5110
  case "section":
4694
- ur(e, n);
5111
+ Pr(e, n);
4695
5112
  return;
4696
5113
  case "table":
4697
- $(t, n, e.type), yr(e, n);
5114
+ $(t, n, e.type), Ur(e, n);
4698
5115
  return;
4699
5116
  case "task_card":
4700
- $(t, n, e.type), Er(e, n);
5117
+ $(t, n, e.type), Xr(e, n);
4701
5118
  return;
4702
5119
  case "video":
4703
- Ar(e, n);
5120
+ ei(e, n);
4704
5121
  return;
4705
- default: Jn("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
5122
+ default: vr("unsupported_block", `${n}.type`, `unsupported block "${String(e.type)}"`);
4706
5123
  }
4707
5124
  }
4708
- function Mr(e, t, n = "message", r = "block") {
4709
- jr(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}"`);
4710
5127
  }
4711
- function Nr(e, t) {
5128
+ function ri(e, t) {
4712
5129
  return Array.isArray(e) ? e : (B(e, t), V(e.blocks, `${t}.blocks`), e.blocks);
4713
5130
  }
4714
- function Pr(e, t = "message", n = "data") {
4715
- let r = Array.isArray(e) ? n : `${n}.blocks`, i = Nr(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;
4716
5133
  z(i.length <= a, "limit_exceeded", r, `${t} surfaces accept at most ${String(a)} blocks`);
4717
5134
  let o = 0, s = 0, c = 0, l = /* @__PURE__ */ new Set();
4718
5135
  i.forEach((e, n) => {
4719
5136
  let i = `${r}[${String(n)}]`;
4720
- if (jr(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;
4721
- else if (e.type === "table") for (let t of e.rows) for (let e of t) s += gr(e);
4722
- else if (e.type === "data_table") for (let t of e.rows) for (let e of t) c += gr(e);
4723
- }), 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`);
4724
5141
  }
4725
- function Fr(e, t = "message") {
5142
+ function ai(e, t = "message") {
4726
5143
  let n = e;
4727
5144
  if (typeof e == "string") try {
4728
5145
  n = JSON.parse(e);
4729
5146
  } catch {
4730
- throw new Gn("expected valid JSON", {
5147
+ throw new hr("expected valid JSON", {
4731
5148
  code: "invalid_json",
4732
5149
  path: "data"
4733
5150
  });
4734
5151
  }
4735
- return Pr(n, t), n;
5152
+ return ii(n, t), n;
4736
5153
  }
4737
- function Ir(e) {
4738
- return Lr(e) ? e.blocks : e;
5154
+ function oi(e) {
5155
+ return si(e) ? e.blocks : e;
4739
5156
  }
4740
- function Lr(e) {
5157
+ function si(e) {
4741
5158
  return !Array.isArray(e);
4742
5159
  }
4743
5160
  //#endregion
4744
- export { Mn as ActionsBlock, Ut as AlertBlock, zn as Block, qn as BlockKit, Gn as BlockKitInvariantError, b 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, P as ImageElement, Nn as InputBlock, it as InputElement, at as InteractiveElement, St as Markdown, jt as MarkdownBlock, F as Mrkdwn, He as OverflowElement, Kt as PlanBlock, M as RichText, At as RichTextBlock, wt as SectionBlock, $e as SelectElement, It as TableBlock, Pt as TableCell, Wt as TaskCardBlock, I as Text, Nt as VideoBlock, Pr as assertBlockKitData, Mr as assertBlockType, Zn as assertImageElementData, ar as assertInteractiveElementData, jr as assertRenderableBlock, lr as assertRichTextBlockData, Yn as assertTextObjectData, Ir as blocksOf, ne as darkTheme, te as lightTheme, Fr as parseBlockKitData, yt as tokenizeMarkdown, pt as tokenizeMrkdwn, ee as tokens, x 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 };
4745
5162
 
4746
5163
  //# sourceMappingURL=index.js.map