@canofold/markdown 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.
Files changed (33) hide show
  1. package/README.md +2 -0
  2. package/README.zh-CN.md +2 -0
  3. package/dist/ImageGallery-Bcpjlfh9.js +569 -0
  4. package/dist/Markdown-607_slPB.js +117 -0
  5. package/dist/assets-CqlggKr8.js +77 -0
  6. package/dist/client/bundler.js +308 -0
  7. package/dist/client/chunks/{client-CTpZrdpv.js → client-CHUUETWE.js} +3 -3
  8. package/dist/client/chunks/{gallery-BTg1qJjd.js → gallery-Cr0TgC1h.js} +2 -2
  9. package/dist/client/chunks/{image-BsfZtDsx.js → image-6_o7fPkU.js} +3 -3
  10. package/dist/client/chunks/provider-k1N-5njv.js +1037 -0
  11. package/dist/client/chunks/react-runtime-DRPMrVPX.js +12062 -0
  12. package/dist/client/chunks/{serialized-Ck9NBdg7.js → serialized-Chn9ydGA.js} +334 -295
  13. package/dist/client/chunks/{table-jaJMPch3.js → table-D99-Zhc8.js} +3 -3
  14. package/dist/client/index.js +1 -1
  15. package/dist/componentMap-CKSUGzQH.js +1483 -0
  16. package/dist/copyText-C0ZgrMnH.js +18 -0
  17. package/dist/{directiveValidation-BdVbgcY_.js → directiveValidation-B7LY-R5p.js} +187 -248
  18. package/dist/fileKinds-BPzIxbaS.js +170 -0
  19. package/dist/gallery-BqQ-i0TC.js +42 -0
  20. package/dist/image-CiPni6Az.js +38 -0
  21. package/dist/index.js +2 -2
  22. package/dist/plugins-CXYBB-oH.js +130 -0
  23. package/dist/{prepareMarkdown-DPMq7203.js → prepareMarkdown-CS6sALIb.js} +13 -11
  24. package/dist/provider-BJDHf4Z_.js +8 -0
  25. package/dist/serialized-DFiNQYA5.js +39 -0
  26. package/dist/server/analyze.js +11 -11
  27. package/dist/server.js +30 -28
  28. package/dist/table-DQSeLjVL.js +32 -0
  29. package/package.json +14 -9
  30. package/dist/Markdown-CPG2lcO7.js +0 -2127
  31. package/dist/client/chunks/provider-DNSHvvN7.js +0 -841
  32. package/dist/client/chunks/react-runtime-Dzgdzn6D.js +0 -10571
  33. package/dist/plugins-StkCS2su.js +0 -298
@@ -0,0 +1,1037 @@
1
+ import { r as c, j as a, a as le } from "./react-runtime-DRPMrVPX.js";
2
+ const v = {
3
+ copyCode: "Copy code",
4
+ copyFailed: "Copy failed",
5
+ copySnippet: "Copy snippet",
6
+ copyTerminal: "Copy terminal output",
7
+ terminalTitle: "Terminal",
8
+ copySectionLink: "Copy section link",
9
+ tableTitle: "table",
10
+ copyTableCsv: "Copy table as CSV",
11
+ downloadTableCsv: "Download table as CSV",
12
+ zoomTable: "Zoom table",
13
+ closeTablePreview: "Close table preview",
14
+ sortTableColumn: "Sort table by column {column}",
15
+ zoomImage: "Zoom image",
16
+ closeImagePreview: "Close image preview",
17
+ imageGallery: "Image gallery",
18
+ closeImageGallery: "Close gallery",
19
+ previousGalleryImage: "Previous image",
20
+ nextGalleryImage: "Next image",
21
+ galleryThumbnails: "Gallery thumbnails",
22
+ galleryImage: "image"
23
+ };
24
+ /**
25
+ * @license lucide-react v1.46.0 - ISC
26
+ *
27
+ * This source code is licensed under the ISC license.
28
+ * See the LICENSE file in the root directory of this source tree.
29
+ */
30
+ const ce = (e) => e?.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
31
+ /**
32
+ * @license lucide-react v1.46.0 - ISC
33
+ *
34
+ * This source code is licensed under the ISC license.
35
+ * See the LICENSE file in the root directory of this source tree.
36
+ */
37
+ function de(e, t, o = []) {
38
+ if (t == null)
39
+ throw new Error("[lucide]: iconNode is required when icon name is used");
40
+ return {
41
+ name: ce(e),
42
+ size: 24,
43
+ node: t,
44
+ ...o.length > 0 ? { aliases: o } : {}
45
+ };
46
+ }
47
+ /**
48
+ * @license lucide-react v1.46.0 - ISC
49
+ *
50
+ * This source code is licensed under the ISC license.
51
+ * See the LICENSE file in the root directory of this source tree.
52
+ */
53
+ const ue = (e) => {
54
+ let t = "", o = !1;
55
+ for (const n of e) {
56
+ if (n === "-" || n === "_" || n <= " ") {
57
+ o = t.length > 0;
58
+ continue;
59
+ }
60
+ t.length === 0 ? t += n.toLowerCase() : t += o ? n.toUpperCase() : n, o = !1;
61
+ }
62
+ return t;
63
+ };
64
+ /**
65
+ * @license lucide-react v1.46.0 - ISC
66
+ *
67
+ * This source code is licensed under the ISC license.
68
+ * See the LICENSE file in the root directory of this source tree.
69
+ */
70
+ const fe = (e) => {
71
+ const t = ue(e);
72
+ return t.charAt(0).toUpperCase() + t.slice(1);
73
+ };
74
+ /**
75
+ * @license lucide-react v1.46.0 - ISC
76
+ *
77
+ * This source code is licensed under the ISC license.
78
+ * See the LICENSE file in the root directory of this source tree.
79
+ */
80
+ const P = (...e) => e.filter((t, o, n) => !!t && t.trim() !== "" && n.indexOf(t) === o).join(" ").trim();
81
+ /**
82
+ * @license lucide-react v1.46.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */
87
+ const C = {
88
+ xmlns: "http://www.w3.org/2000/svg",
89
+ width: 24,
90
+ height: 24,
91
+ viewBox: "0 0 24 24",
92
+ fill: "none",
93
+ stroke: "currentColor",
94
+ "stroke-width": 2,
95
+ "stroke-linecap": "round",
96
+ "stroke-linejoin": "round"
97
+ };
98
+ /**
99
+ * @license lucide-react v1.46.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */
104
+ function $(e) {
105
+ return e != null;
106
+ }
107
+ function he(e, t = {}) {
108
+ const o = t.attributeNames ?? {}, n = (h) => o[h] ?? h, r = e.size ?? e.width ?? C.width, s = e.size ?? e.height ?? C.height, l = e.aliases?.filter((h) => typeof h == "string" && h.trim() !== "").map((h) => `lucide-${h}`) ?? [], b = [...e.name ? [`lucide-${e.name}`] : [], ...l], y = t.className?.split(" ").filter(Boolean) ?? [], w = t.includeDefaultClasses === !1 ? P(...y) : P("lucide", ...b, ...y), z = t.absoluteStrokeWidth ? Number(t.strokeWidth ?? C["stroke-width"]) * Number(e.size ?? e.width ?? C.width) / Number(t.size ?? t.width ?? C.width) : t.strokeWidth ?? C["stroke-width"];
109
+ return [
110
+ "svg",
111
+ {
112
+ ...Object.entries(C).reduce((h, [x, g]) => (h[n(x)] = g, h), {}),
113
+ ..."color" in t && t.color && {
114
+ [n("stroke")]: t.color
115
+ },
116
+ ..."size" in t && $(t.size) && {
117
+ [n("width")]: t.size,
118
+ [n("height")]: t.size
119
+ },
120
+ ..."width" in t && $(t.width) && {
121
+ [n("width")]: t.width
122
+ },
123
+ ..."height" in t && $(t.height) && {
124
+ [n("height")]: t.height
125
+ },
126
+ [n("stroke-width")]: z,
127
+ ...w && {
128
+ [n("class")]: w
129
+ },
130
+ [n("viewBox")]: `0 0 ${r} ${s}`,
131
+ ...t.hasA11yProp === !1 ? {
132
+ [n("aria-hidden")]: "true"
133
+ } : {},
134
+ ..."attributes" in t && t.attributes
135
+ },
136
+ e.node.map((h) => {
137
+ const [x, g, k] = h, u = t.nonScalingStroke ? { [n("vector-effect")]: "non-scaling-stroke", ...g } : g;
138
+ return k ? [x, u, k] : [x, u];
139
+ })
140
+ ];
141
+ }
142
+ /**
143
+ * @license lucide-react v1.46.0 - ISC
144
+ *
145
+ * This source code is licensed under the ISC license.
146
+ * See the LICENSE file in the root directory of this source tree.
147
+ */
148
+ function pe(e, t = {}) {
149
+ return he(e, {
150
+ ...t,
151
+ attributeNames: {
152
+ ...t.attributeNames,
153
+ class: "className",
154
+ "stroke-width": "strokeWidth",
155
+ "stroke-linecap": "strokeLinecap",
156
+ "stroke-linejoin": "strokeLinejoin",
157
+ "vector-effect": "vectorEffect"
158
+ }
159
+ });
160
+ }
161
+ /**
162
+ * @license lucide-react v1.46.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */
167
+ const ge = (e) => {
168
+ for (const t in e)
169
+ if (t.startsWith("aria-") || t === "role" || t === "title")
170
+ return !0;
171
+ return !1;
172
+ }, ye = c.createContext({}), me = () => c.useContext(ye), be = c.forwardRef(
173
+ ({
174
+ color: e,
175
+ size: t,
176
+ width: o,
177
+ height: n,
178
+ strokeWidth: r,
179
+ absoluteStrokeWidth: s,
180
+ nonScalingStroke: l,
181
+ className: b = "",
182
+ children: y,
183
+ iconNode: w = [],
184
+ icon: z = {
185
+ node: w,
186
+ aliases: [],
187
+ size: 24
188
+ },
189
+ ...f
190
+ }, h) => {
191
+ const {
192
+ size: x = 24,
193
+ strokeWidth: g = 2,
194
+ absoluteStrokeWidth: k = !1,
195
+ nonScalingStroke: u = !1,
196
+ color: N = "currentColor",
197
+ className: A = ""
198
+ } = me() ?? {}, _ = !!y || ge(f), [d, D, j = []] = pe(z, {
199
+ color: e ?? N,
200
+ width: o ?? t ?? x,
201
+ height: n ?? t ?? x,
202
+ strokeWidth: r ?? g,
203
+ absoluteStrokeWidth: s ?? k,
204
+ nonScalingStroke: l ?? u,
205
+ className: P(A, b),
206
+ hasA11yProp: _,
207
+ attributes: f
208
+ });
209
+ return c.createElement(
210
+ d,
211
+ {
212
+ ref: h,
213
+ ...D
214
+ },
215
+ [
216
+ ...j.map(([L, M]) => c.createElement(L, M)),
217
+ ...Array.isArray(y) ? y : [y]
218
+ ]
219
+ );
220
+ }
221
+ );
222
+ /**
223
+ * @license lucide-react v1.46.0 - ISC
224
+ *
225
+ * This source code is licensed under the ISC license.
226
+ * See the LICENSE file in the root directory of this source tree.
227
+ */
228
+ function p(e, t = [], o = []) {
229
+ const n = typeof e == "string" ? de(e, t, o) : e, r = c.forwardRef(
230
+ ({ className: s, ...l }, b) => c.createElement(be, {
231
+ ref: b,
232
+ icon: n,
233
+ className: s,
234
+ ...l
235
+ })
236
+ );
237
+ return n.name && (r.displayName = fe(n.name)), r;
238
+ }
239
+ /**
240
+ * @license lucide-react v1.46.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */
245
+ const R = {
246
+ name: "chevron-left",
247
+ size: 24,
248
+ node: [["path", { d: "m15 18-6-6 6-6", key: "1wnfg3" }]]
249
+ };
250
+ R.node;
251
+ const we = p(R);
252
+ /**
253
+ * @license lucide-react v1.46.0 - ISC
254
+ *
255
+ * This source code is licensed under the ISC license.
256
+ * See the LICENSE file in the root directory of this source tree.
257
+ */
258
+ const F = {
259
+ name: "chevron-right",
260
+ size: 24,
261
+ node: [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]]
262
+ };
263
+ F.node;
264
+ const ke = p(F);
265
+ /**
266
+ * @license lucide-react v1.46.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */
271
+ const G = {
272
+ name: "chevrons-up-down",
273
+ size: 24,
274
+ node: [
275
+ ["path", { d: "m7 15 5 5 5-5", key: "1hf1tw" }],
276
+ ["path", { d: "m7 9 5-5 5 5", key: "sgt6xg" }]
277
+ ]
278
+ };
279
+ G.node;
280
+ const xe = p(G);
281
+ /**
282
+ * @license lucide-react v1.46.0 - ISC
283
+ *
284
+ * This source code is licensed under the ISC license.
285
+ * See the LICENSE file in the root directory of this source tree.
286
+ */
287
+ const B = {
288
+ name: "code-xml",
289
+ size: 24,
290
+ node: [
291
+ ["path", { d: "m18 16 4-4-4-4", key: "1inbqp" }],
292
+ ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }],
293
+ ["path", { d: "m14.5 4-5 16", key: "e7oirm" }]
294
+ ],
295
+ aliases: ["code-2"]
296
+ };
297
+ B.node;
298
+ const Ce = p(B);
299
+ /**
300
+ * @license lucide-react v1.46.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */
305
+ const V = {
306
+ name: "copy",
307
+ size: 24,
308
+ node: [
309
+ ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
310
+ ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
311
+ ]
312
+ };
313
+ V.node;
314
+ const ve = p(V);
315
+ /**
316
+ * @license lucide-react v1.46.0 - ISC
317
+ *
318
+ * This source code is licensed under the ISC license.
319
+ * See the LICENSE file in the root directory of this source tree.
320
+ */
321
+ const U = {
322
+ name: "download",
323
+ size: 24,
324
+ node: [
325
+ ["path", { d: "M12 15V3", key: "m9g1x1" }],
326
+ ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
327
+ ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
328
+ ]
329
+ };
330
+ U.node;
331
+ const Se = p(U);
332
+ /**
333
+ * @license lucide-react v1.46.0 - ISC
334
+ *
335
+ * This source code is licensed under the ISC license.
336
+ * See the LICENSE file in the root directory of this source tree.
337
+ */
338
+ const q = {
339
+ name: "file-text",
340
+ size: 24,
341
+ node: [
342
+ [
343
+ "path",
344
+ {
345
+ d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
346
+ key: "1oefj6"
347
+ }
348
+ ],
349
+ ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }],
350
+ ["path", { d: "M10 9H8", key: "b1mrlr" }],
351
+ ["path", { d: "M16 13H8", key: "t4e002" }],
352
+ ["path", { d: "M16 17H8", key: "z1uh3a" }]
353
+ ]
354
+ };
355
+ q.node;
356
+ const ze = p(q);
357
+ /**
358
+ * @license lucide-react v1.46.0 - ISC
359
+ *
360
+ * This source code is licensed under the ISC license.
361
+ * See the LICENSE file in the root directory of this source tree.
362
+ */
363
+ const K = {
364
+ name: "folder",
365
+ size: 24,
366
+ node: [
367
+ [
368
+ "path",
369
+ {
370
+ d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
371
+ key: "1kt360"
372
+ }
373
+ ]
374
+ ]
375
+ };
376
+ K.node;
377
+ const je = p(K);
378
+ /**
379
+ * @license lucide-react v1.46.0 - ISC
380
+ *
381
+ * This source code is licensed under the ISC license.
382
+ * See the LICENSE file in the root directory of this source tree.
383
+ */
384
+ const H = {
385
+ name: "link-2",
386
+ size: 24,
387
+ node: [
388
+ ["path", { d: "M9 17H7A5 5 0 0 1 7 7h2", key: "8i5ue5" }],
389
+ ["path", { d: "M15 7h2a5 5 0 1 1 0 10h-2", key: "1b9ql8" }],
390
+ ["line", { x1: "8", x2: "16", y1: "12", y2: "12", key: "1jonct" }]
391
+ ]
392
+ };
393
+ H.node;
394
+ const Me = p(H);
395
+ /**
396
+ * @license lucide-react v1.46.0 - ISC
397
+ *
398
+ * This source code is licensed under the ISC license.
399
+ * See the LICENSE file in the root directory of this source tree.
400
+ */
401
+ const Z = {
402
+ name: "maximize-2",
403
+ size: 24,
404
+ node: [
405
+ ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
406
+ ["path", { d: "m21 3-7 7", key: "1l2asr" }],
407
+ ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
408
+ ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
409
+ ]
410
+ };
411
+ Z.node;
412
+ const Ie = p(Z);
413
+ /**
414
+ * @license lucide-react v1.46.0 - ISC
415
+ *
416
+ * This source code is licensed under the ISC license.
417
+ * See the LICENSE file in the root directory of this source tree.
418
+ */
419
+ const X = {
420
+ name: "minus",
421
+ size: 24,
422
+ node: [["path", { d: "M5 12h14", key: "1ays0h" }]]
423
+ };
424
+ X.node;
425
+ const Ne = p(X);
426
+ /**
427
+ * @license lucide-react v1.46.0 - ISC
428
+ *
429
+ * This source code is licensed under the ISC license.
430
+ * See the LICENSE file in the root directory of this source tree.
431
+ */
432
+ const J = {
433
+ name: "plus",
434
+ size: 24,
435
+ node: [
436
+ ["path", { d: "M5 12h14", key: "1ays0h" }],
437
+ ["path", { d: "M12 5v14", key: "s699le" }]
438
+ ]
439
+ };
440
+ J.node;
441
+ const Ae = p(J);
442
+ /**
443
+ * @license lucide-react v1.46.0 - ISC
444
+ *
445
+ * This source code is licensed under the ISC license.
446
+ * See the LICENSE file in the root directory of this source tree.
447
+ */
448
+ const Y = {
449
+ name: "rotate-ccw",
450
+ size: 24,
451
+ node: [
452
+ ["path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8", key: "1357e3" }],
453
+ ["path", { d: "M3 3v5h5", key: "1xhq8a" }]
454
+ ]
455
+ };
456
+ Y.node;
457
+ const _e = p(Y);
458
+ /**
459
+ * @license lucide-react v1.46.0 - ISC
460
+ *
461
+ * This source code is licensed under the ISC license.
462
+ * See the LICENSE file in the root directory of this source tree.
463
+ */
464
+ const Q = {
465
+ name: "table-2",
466
+ size: 24,
467
+ node: [
468
+ ["path", { d: "M3 9h18", key: "1pudct" }],
469
+ ["path", { d: "M9 3v18", key: "fh3hqa" }],
470
+ ["rect", { x: "3", y: "3", width: "18", height: "18", rx: "2", key: "h1oib" }]
471
+ ]
472
+ };
473
+ Q.node;
474
+ const De = p(Q);
475
+ /**
476
+ * @license lucide-react v1.46.0 - ISC
477
+ *
478
+ * This source code is licensed under the ISC license.
479
+ * See the LICENSE file in the root directory of this source tree.
480
+ */
481
+ const ee = {
482
+ name: "workflow",
483
+ size: 24,
484
+ node: [
485
+ ["rect", { width: "8", height: "8", x: "3", y: "3", rx: "2", key: "by2w9f" }],
486
+ ["path", { d: "M7 11v4a2 2 0 0 0 2 2h4", key: "xkn7yn" }],
487
+ ["rect", { width: "8", height: "8", x: "13", y: "13", rx: "2", key: "1cgmvn" }]
488
+ ]
489
+ };
490
+ ee.node;
491
+ const Le = p(ee);
492
+ /**
493
+ * @license lucide-react v1.46.0 - ISC
494
+ *
495
+ * This source code is licensed under the ISC license.
496
+ * See the LICENSE file in the root directory of this source tree.
497
+ */
498
+ const te = {
499
+ name: "x",
500
+ size: 24,
501
+ node: [
502
+ ["path", { d: "M18 6 6 18", key: "1bl5f8" }],
503
+ ["path", { d: "m6 6 12 12", key: "d8bk6v" }]
504
+ ]
505
+ };
506
+ te.node;
507
+ const $e = p(te), Ee = {
508
+ copy: "CopyIcon",
509
+ download: "DownloadIcon",
510
+ code: "CodeIcon",
511
+ maximize: "MaximizeIcon",
512
+ minus: "MinusIcon",
513
+ plus: "PlusIcon",
514
+ reset: "ResetIcon",
515
+ sort: "SortIcon",
516
+ table: "TableIcon",
517
+ folder: "FolderIcon",
518
+ file: "FileIcon",
519
+ workflow: "WorkflowIcon",
520
+ link: "LinkIcon",
521
+ close: "CloseIcon",
522
+ previous: "PreviousIcon",
523
+ next: "NextIcon"
524
+ }, oe = Object.freeze({}), ne = c.createContext(oe);
525
+ function Pe({ slots: e, children: t }) {
526
+ return c.createElement(ne.Provider, { value: e ?? oe }, t);
527
+ }
528
+ function Te() {
529
+ return c.useContext(ne);
530
+ }
531
+ function We(e, t) {
532
+ const o = e?.[Ee[t]];
533
+ return o ? (n) => c.createElement(o, { ...n, name: t }) : void 0;
534
+ }
535
+ function ot(e) {
536
+ return e?.ImageCaption;
537
+ }
538
+ const Oe = {
539
+ copy: ve,
540
+ download: Se,
541
+ code: Ce,
542
+ maximize: Ie,
543
+ minus: Ne,
544
+ plus: Ae,
545
+ reset: _e,
546
+ sort: xe,
547
+ table: De,
548
+ folder: je,
549
+ file: ze,
550
+ workflow: Le,
551
+ link: Me,
552
+ close: $e,
553
+ previous: we,
554
+ next: ke
555
+ };
556
+ function E({
557
+ name: e,
558
+ size: t = 16,
559
+ className: o
560
+ }) {
561
+ const n = We(Te(), e);
562
+ if (n) return /* @__PURE__ */ a.jsx(n, { size: t, className: o, "aria-hidden": "true" });
563
+ const r = Oe[e];
564
+ return /* @__PURE__ */ a.jsx(r, { className: o, size: t, strokeWidth: 2, "aria-hidden": "true" });
565
+ }
566
+ function I(e) {
567
+ return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(I).join("") : c.isValidElement(e) ? I(e.props.children) : !e || typeof e != "object" ? "" : e.type === "text" ? String(e.value ?? "") : I(e.children);
568
+ }
569
+ function nt(e) {
570
+ return c.Children.toArray(e).filter((t) => c.isValidElement(t));
571
+ }
572
+ function rt(e) {
573
+ if (typeof e.type == "string") return e.type;
574
+ const o = e.type.displayName;
575
+ return o?.startsWith("Markdown") ? o.slice(8).toLowerCase() : "";
576
+ }
577
+ function Re(e, ...t) {
578
+ const o = e;
579
+ for (const n of t)
580
+ if (o[n] !== void 0 && o[n] !== null) return o[n];
581
+ }
582
+ function S(e, ...t) {
583
+ const o = Re(e, ...t);
584
+ return typeof o == "string" ? o : "";
585
+ }
586
+ const Fe = /* @__PURE__ */ new Set([
587
+ "id",
588
+ "className",
589
+ "style",
590
+ "title",
591
+ "role",
592
+ "tabIndex",
593
+ "hidden",
594
+ "dir",
595
+ "lang",
596
+ "slot",
597
+ "draggable",
598
+ "contentEditable",
599
+ "spellCheck",
600
+ "open",
601
+ "href",
602
+ "target",
603
+ "rel",
604
+ "download",
605
+ "src",
606
+ "alt",
607
+ "width",
608
+ "height",
609
+ "loading",
610
+ "srcSet",
611
+ "sizes",
612
+ "type",
613
+ "name",
614
+ "value",
615
+ "checked",
616
+ "disabled",
617
+ "controls",
618
+ "loop",
619
+ "muted",
620
+ "autoPlay",
621
+ "poster",
622
+ "preload",
623
+ "colSpan",
624
+ "rowSpan",
625
+ "scope",
626
+ "dateTime"
627
+ ]);
628
+ function Ge(e, t = []) {
629
+ const o = /* @__PURE__ */ new Set(["node", ...t]);
630
+ return Object.fromEntries(
631
+ Object.entries(e).filter(
632
+ ([n]) => !o.has(n) && !n.startsWith("dataCf") && !n.startsWith("data-cf-") && (Fe.has(n) || n.startsWith("aria-") || n.startsWith("data-") && !n.startsWith("data-cf-") || /^on[A-Z]/.test(n))
633
+ )
634
+ );
635
+ }
636
+ function st(e, t) {
637
+ const o = typeof t == "string" ? t.split(/\s+/) : [];
638
+ return [...new Set([...e.split(/\s+/), ...o].filter(Boolean))].join(" ");
639
+ }
640
+ const Be = [
641
+ "a[href]",
642
+ "button:not([disabled])",
643
+ "input:not([disabled])",
644
+ "select:not([disabled])",
645
+ "textarea:not([disabled])",
646
+ '[tabindex]:not([tabindex="-1"])'
647
+ ].join(",");
648
+ function Ve({ children: e }) {
649
+ return typeof document > "u" ? null : le.createPortal(e, document.body);
650
+ }
651
+ function Ue({
652
+ open: e,
653
+ close: t,
654
+ dialogRef: o,
655
+ initialFocusRef: n,
656
+ triggerRef: r
657
+ }) {
658
+ return c.useEffect(() => {
659
+ if (!e) return;
660
+ const s = document.body.style.overflow;
661
+ return document.body.style.overflow = "hidden", n.current?.focus(), () => {
662
+ document.body.style.overflow = s, r.current?.focus();
663
+ };
664
+ }, [n, e, r]), (s) => {
665
+ if (s.key === "Escape") {
666
+ s.preventDefault(), t();
667
+ return;
668
+ }
669
+ if (s.key !== "Tab") return;
670
+ const l = Array.from(
671
+ o.current?.querySelectorAll(Be) ?? []
672
+ ).filter(
673
+ (w) => !w.hidden && !w.closest("[hidden], [inert]") && w.getAttribute("aria-hidden") !== "true"
674
+ );
675
+ if (!l.length) {
676
+ s.preventDefault(), o.current?.focus();
677
+ return;
678
+ }
679
+ const b = l[0], y = l.at(-1);
680
+ !b || !y || (s.shiftKey && document.activeElement === b ? (s.preventDefault(), y.focus()) : !s.shiftKey && document.activeElement === y && (s.preventDefault(), b.focus()));
681
+ };
682
+ }
683
+ const qe = c.createContext(void 0), Ke = /^(?:https?|ircs?|mailto|tel|xmpp)$/i;
684
+ function He(e) {
685
+ const t = e.indexOf(":"), o = e.indexOf("/"), n = e.indexOf("?"), r = e.indexOf("#");
686
+ if (t === -1 || o !== -1 && t > o || n !== -1 && t > n || r !== -1 && t > r)
687
+ return e;
688
+ const s = e.slice(0, t).replace(/[\u0000-\u0020]/g, "");
689
+ return Ke.test(s) ? e : void 0;
690
+ }
691
+ function re(e, t, o) {
692
+ return He(o ? o(e, t) : e);
693
+ }
694
+ function Ze() {
695
+ return c.useContext(qe);
696
+ }
697
+ function Xe(e) {
698
+ const t = [];
699
+ let o = 0;
700
+ for (; o < e.length; ) {
701
+ for (; o < e.length && /[\t\n\f\r ,]/.test(e[o] ?? ""); ) o += 1;
702
+ if (o >= e.length) break;
703
+ const n = o;
704
+ for (; o < e.length && !/[\t\n\f\r ]/.test(e[o] ?? ""); ) o += 1;
705
+ let r = e.slice(n, o), s = 0;
706
+ for (; r.endsWith(","); )
707
+ r = r.slice(0, -1), s += 1;
708
+ if (s > 0) {
709
+ t.push({ url: r, descriptor: "" });
710
+ continue;
711
+ }
712
+ for (; o < e.length && /[\t\n\f\r ]/.test(e[o] ?? ""); ) o += 1;
713
+ const l = o;
714
+ for (; o < e.length && e[o] !== ","; ) o += 1;
715
+ const b = e.slice(l, o).trim();
716
+ e[o] === "," && (o += 1), t.push({ url: r, descriptor: b });
717
+ }
718
+ return t;
719
+ }
720
+ function se(e, t) {
721
+ return Xe(e).flatMap(({ url: o, descriptor: n }) => {
722
+ const r = re(o, "srcSet", t);
723
+ return r ? [`${r}${n ? ` ${n}` : ""}`] : [];
724
+ }).join(", ");
725
+ }
726
+ function it(e, t) {
727
+ let o = e;
728
+ const n = () => (o === e && (o = { ...e }), o);
729
+ for (const r of ["href", "src", "poster"]) {
730
+ const s = e[r];
731
+ if (typeof s != "string") continue;
732
+ const l = re(s, r, t);
733
+ l === void 0 ? delete n()[r] : l !== s && (n()[r] = l);
734
+ }
735
+ for (const r of ["srcSet", "srcset"]) {
736
+ const s = e[r];
737
+ if (typeof s != "string") continue;
738
+ const l = se(s, t);
739
+ l ? l !== s && (n()[r] = l) : delete n()[r];
740
+ }
741
+ return o;
742
+ }
743
+ function T(e, t) {
744
+ return c.Children.toArray(e).find((o) => c.isValidElement(o) ? o.type === t : !1);
745
+ }
746
+ function Je(e) {
747
+ return c.Children.toArray(e).flatMap((t) => {
748
+ if (!c.isValidElement(t) || t.type !== "figure") return [];
749
+ const o = t.props, n = T(o.children, "img");
750
+ if (!n || typeof n.props.src != "string") return [];
751
+ const r = T(o.children, "figcaption");
752
+ return [
753
+ {
754
+ src: n.props.src,
755
+ alt: typeof n.props.alt == "string" ? n.props.alt : "",
756
+ caption: r ? I(r.props.children) : void 0,
757
+ title: typeof n.props.title == "string" ? n.props.title : void 0,
758
+ srcSet: typeof n.props.srcSet == "string" ? n.props.srcSet : void 0,
759
+ sizes: typeof n.props.sizes == "string" ? n.props.sizes : void 0,
760
+ width: typeof n.props.width == "number" || typeof n.props.width == "string" ? n.props.width : void 0,
761
+ height: typeof n.props.height == "number" || typeof n.props.height == "string" ? n.props.height : void 0
762
+ }
763
+ ];
764
+ });
765
+ }
766
+ function Ye(e) {
767
+ return c.Children.toArray(e).filter((t) => {
768
+ if (!c.isValidElement(t)) return !0;
769
+ const o = t.props;
770
+ if (t.type === "figure") {
771
+ const n = T(o.children, "img");
772
+ return !n || typeof n.props.src != "string";
773
+ }
774
+ return W({ children: [o.node] }).length === 0;
775
+ });
776
+ }
777
+ function W(e) {
778
+ return !e || typeof e != "object" ? [] : (Array.isArray(e.children) ? e.children : []).flatMap((o) => {
779
+ if (!o || typeof o != "object" || o.tagName !== "figure")
780
+ return [];
781
+ const n = Array.isArray(o.children) ? o.children : [], r = n.find(
782
+ (l) => l && typeof l == "object" && l.tagName === "img"
783
+ );
784
+ if (!r?.properties || typeof r.properties.src != "string") return [];
785
+ const s = n.find(
786
+ (l) => l && typeof l == "object" && l.tagName === "figcaption"
787
+ );
788
+ return [
789
+ {
790
+ src: r.properties.src,
791
+ alt: typeof r.properties.alt == "string" ? r.properties.alt : "",
792
+ caption: s ? I(s) : void 0,
793
+ title: typeof r.properties.title == "string" ? r.properties.title : void 0,
794
+ srcSet: typeof r.properties.srcSet == "string" ? r.properties.srcSet : void 0,
795
+ sizes: typeof r.properties.sizes == "string" ? r.properties.sizes : void 0,
796
+ width: typeof r.properties.width == "number" || typeof r.properties.width == "string" ? r.properties.width : void 0,
797
+ height: typeof r.properties.height == "number" || typeof r.properties.height == "string" ? r.properties.height : void 0
798
+ }
799
+ ];
800
+ });
801
+ }
802
+ function Qe(e, t, o) {
803
+ if (e?.length) return e;
804
+ const n = W(t);
805
+ return n.length ? n : Je(o);
806
+ }
807
+ function et(e, t) {
808
+ return {
809
+ gallery: e?.gallery ?? (S(t, "data-cf-gallery-label", "dataCfGalleryLabel") || v.imageGallery),
810
+ close: e?.close ?? (S(t, "data-cf-close-label", "dataCfCloseLabel") || v.closeImageGallery),
811
+ previous: e?.previous ?? (S(t, "data-cf-previous-label", "dataCfPreviousLabel") || v.previousGalleryImage),
812
+ next: e?.next ?? (S(t, "data-cf-next-label", "dataCfNextLabel") || v.nextGalleryImage),
813
+ thumbnails: e?.thumbnails ?? (S(t, "data-cf-thumbnails-label", "dataCfThumbnailsLabel") || v.galleryThumbnails),
814
+ image: e?.image ?? (S(t, "data-cf-image-label", "dataCfImageLabel") || v.galleryImage)
815
+ };
816
+ }
817
+ function at({
818
+ children: e,
819
+ items: t,
820
+ className: o,
821
+ role: n = "group",
822
+ labels: r,
823
+ node: s,
824
+ inner: l = !1,
825
+ ...b
826
+ }) {
827
+ const y = b, w = Ze(), z = W(s), f = Qe(t, s, e).map((i) => ({
828
+ ...i,
829
+ src: w ? w(i.src, "src") : i.src,
830
+ srcSet: i.srcSet && w ? se(i.srcSet, w) : i.srcSet
831
+ })), h = JSON.stringify(f), x = f.length && z.length === 0 ? Ye(e) : [], [g, k] = c.useState(null), u = g === null ? void 0 : f[g], N = c.useRef(null), A = c.useRef(null), _ = c.useRef(null), d = et(r, y), D = (i, m) => {
832
+ N.current = m, k(i);
833
+ }, j = () => k(null), L = Ue({
834
+ open: !!u,
835
+ close: j,
836
+ dialogRef: _,
837
+ initialFocusRef: A,
838
+ triggerRef: N
839
+ });
840
+ c.useEffect(() => {
841
+ g !== null && !u && k(null);
842
+ }, [g, u]);
843
+ const M = (i) => {
844
+ f.length && k(
845
+ (m) => m === null ? 0 : (m + i + f.length) % f.length
846
+ );
847
+ }, ie = (i) => {
848
+ L(i), !i.defaultPrevented && (i.key === "ArrowLeft" || i.key === "ArrowRight") && (i.preventDefault(), M(i.key === "ArrowLeft" ? -1 : 1));
849
+ }, O = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
850
+ f.length ? f.map((i, m) => /* @__PURE__ */ a.jsxs("figure", { "data-cf-slot": "item", children: [
851
+ /* @__PURE__ */ a.jsx(
852
+ "button",
853
+ {
854
+ className: "cf-gallery-trigger",
855
+ type: "button",
856
+ "data-cf-action": "open-gallery",
857
+ "aria-label": `${i.alt || d.image} ${m + 1}`,
858
+ "aria-haspopup": "dialog",
859
+ onClick: (ae) => D(m, ae.currentTarget),
860
+ children: /* @__PURE__ */ a.jsx(
861
+ "img",
862
+ {
863
+ src: i.src,
864
+ alt: i.alt,
865
+ title: i.title,
866
+ srcSet: i.srcSet,
867
+ sizes: i.sizes,
868
+ width: i.width,
869
+ height: i.height,
870
+ loading: "lazy"
871
+ }
872
+ )
873
+ }
874
+ ),
875
+ i.caption ? /* @__PURE__ */ a.jsx("figcaption", { children: i.caption }) : null
876
+ ] }, `${i.src}-${m}`)) : e,
877
+ x,
878
+ g !== null && u ? /* @__PURE__ */ a.jsx(Ve, { children: /* @__PURE__ */ a.jsxs(
879
+ "div",
880
+ {
881
+ ref: _,
882
+ className: "cf-gallery-lightbox",
883
+ "data-cf-slot": "lightbox",
884
+ role: "dialog",
885
+ "aria-modal": "true",
886
+ "aria-label": d.gallery,
887
+ tabIndex: -1,
888
+ onKeyDown: ie,
889
+ children: [
890
+ /* @__PURE__ */ a.jsx(
891
+ "div",
892
+ {
893
+ className: "cf-gallery-backdrop",
894
+ "data-cf-action": "close-gallery",
895
+ "aria-hidden": "true",
896
+ onClick: j
897
+ }
898
+ ),
899
+ /* @__PURE__ */ a.jsxs("div", { className: "cf-gallery-dialog", children: [
900
+ /* @__PURE__ */ a.jsxs("div", { className: "cf-gallery-dialog-head", children: [
901
+ /* @__PURE__ */ a.jsx("span", { children: d.gallery }),
902
+ /* @__PURE__ */ a.jsx(
903
+ "button",
904
+ {
905
+ ref: A,
906
+ className: "cf-icon-button",
907
+ type: "button",
908
+ "data-cf-action": "close-gallery",
909
+ "aria-label": d.close,
910
+ title: d.close,
911
+ onClick: j,
912
+ children: /* @__PURE__ */ a.jsx(E, { name: "close", size: 20 })
913
+ }
914
+ )
915
+ ] }),
916
+ /* @__PURE__ */ a.jsxs("div", { className: "cf-gallery-stage", children: [
917
+ f.length > 1 ? /* @__PURE__ */ a.jsx(
918
+ "button",
919
+ {
920
+ className: "cf-gallery-nav cf-gallery-prev",
921
+ type: "button",
922
+ "data-cf-action": "previous-gallery-image",
923
+ "aria-label": d.previous,
924
+ title: d.previous,
925
+ onClick: () => M(-1),
926
+ children: /* @__PURE__ */ a.jsx(E, { name: "previous", size: 20 })
927
+ }
928
+ ) : null,
929
+ /* @__PURE__ */ a.jsxs("figure", { children: [
930
+ /* @__PURE__ */ a.jsx(
931
+ "img",
932
+ {
933
+ src: u.src,
934
+ alt: u.alt,
935
+ title: u.title,
936
+ srcSet: u.srcSet,
937
+ sizes: u.sizes,
938
+ width: u.width,
939
+ height: u.height
940
+ }
941
+ ),
942
+ /* @__PURE__ */ a.jsxs("figcaption", { children: [
943
+ /* @__PURE__ */ a.jsx("span", { className: "cf-gallery-caption", children: u.caption || u.alt }),
944
+ /* @__PURE__ */ a.jsxs(
945
+ "small",
946
+ {
947
+ className: "cf-gallery-count",
948
+ "data-cf-gallery-count": "",
949
+ "aria-live": "polite",
950
+ "aria-atomic": "true",
951
+ children: [
952
+ g + 1,
953
+ " / ",
954
+ f.length
955
+ ]
956
+ }
957
+ )
958
+ ] })
959
+ ] }),
960
+ f.length > 1 ? /* @__PURE__ */ a.jsx(
961
+ "button",
962
+ {
963
+ className: "cf-gallery-nav cf-gallery-next",
964
+ type: "button",
965
+ "data-cf-action": "next-gallery-image",
966
+ "aria-label": d.next,
967
+ title: d.next,
968
+ onClick: () => M(1),
969
+ children: /* @__PURE__ */ a.jsx(E, { name: "next", size: 20 })
970
+ }
971
+ ) : null
972
+ ] }),
973
+ f.length > 1 ? /* @__PURE__ */ a.jsx("div", { className: "cf-gallery-thumbs", role: "group", "aria-label": d.thumbnails, children: f.map((i, m) => /* @__PURE__ */ a.jsx(
974
+ "button",
975
+ {
976
+ className: m === g ? "is-current" : void 0,
977
+ type: "button",
978
+ "data-cf-action": "select-gallery-image",
979
+ "aria-current": m === g ? "true" : void 0,
980
+ "aria-label": `${i.alt || d.image} ${m + 1}`,
981
+ onClick: () => k(m),
982
+ children: /* @__PURE__ */ a.jsx("img", { src: i.src, alt: "", loading: "lazy" })
983
+ },
984
+ `${i.src}-thumb-${m}`
985
+ )) }) : null
986
+ ] })
987
+ ]
988
+ }
989
+ ) }) : null
990
+ ] });
991
+ return l ? O : /* @__PURE__ */ a.jsx(
992
+ "div",
993
+ {
994
+ ...Ge(y),
995
+ className: ["cf-image-gallery", o].filter(Boolean).join(" "),
996
+ "data-cf-component": "gallery",
997
+ "data-cf-slot": "root",
998
+ "data-cf-island": "gallery",
999
+ "data-cf-gallery-items": h,
1000
+ "data-cf-gallery-label": d.gallery,
1001
+ "data-cf-close-label": d.close,
1002
+ "data-cf-previous-label": d.previous,
1003
+ "data-cf-next-label": d.next,
1004
+ "data-cf-thumbnails-label": d.thumbnails,
1005
+ "data-cf-image-label": d.image,
1006
+ role: n,
1007
+ "aria-label": d.gallery,
1008
+ children: O
1009
+ }
1010
+ );
1011
+ }
1012
+ function lt(e, t = {}) {
1013
+ return /* @__PURE__ */ a.jsx(Pe, { slots: t.slots, children: e });
1014
+ }
1015
+ export {
1016
+ v as D,
1017
+ at as I,
1018
+ Ve as M,
1019
+ Te as a,
1020
+ Ue as b,
1021
+ p as c,
1022
+ Ge as d,
1023
+ rt as e,
1024
+ E as f,
1025
+ ot as g,
1026
+ nt as h,
1027
+ Re as i,
1028
+ Qe as j,
1029
+ We as k,
1030
+ it as l,
1031
+ st as m,
1032
+ I as r,
1033
+ S as s,
1034
+ se as t,
1035
+ Ze as u,
1036
+ lt as w
1037
+ };