artifactuse 0.1.30 → 0.2.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.
@@ -1,11 +1,11 @@
1
- var qr = Object.defineProperty;
2
- var Zr = (e, t, r) => t in e ? qr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var P = (e, t, r) => Zr(e, typeof t != "symbol" ? t + "" : t, r);
1
+ var Dr = Object.defineProperty;
2
+ var qr = (e, t, r) => t in e ? Dr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var V = (e, t, r) => qr(e, typeof t != "symbol" ? t + "" : t, r);
4
4
  const Ee = {
5
5
  CODE: "code",
6
6
  FORM: "form",
7
7
  SOCIAL: "social"
8
- }, Br = [
8
+ }, Zr = [
9
9
  // Code languages
10
10
  "html",
11
11
  "htm",
@@ -18,6 +18,8 @@ const Ee = {
18
18
  "patch",
19
19
  "smartdiff",
20
20
  "json",
21
+ "csv",
22
+ "tsv",
21
23
  "javascript",
22
24
  "js",
23
25
  "python",
@@ -42,6 +44,8 @@ const Ee = {
42
44
  "drawing",
43
45
  // Code (panel for preview)
44
46
  "json",
47
+ "csv",
48
+ "tsv",
45
49
  "svg",
46
50
  "diff",
47
51
  "patch",
@@ -57,11 +61,11 @@ const Ee = {
57
61
  // Structured artifacts (form can be panel based on complexity)
58
62
  "form"
59
63
  ];
60
- function Vr(e = "artifact") {
64
+ function Br(e = "artifact") {
61
65
  return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
62
66
  }
63
67
  function pr(e) {
64
- return Br.includes(e == null ? void 0 : e.toLowerCase());
68
+ return Zr.includes(e == null ? void 0 : e.toLowerCase());
65
69
  }
66
70
  function Fr(e) {
67
71
  return Or.includes(e == null ? void 0 : e.toLowerCase());
@@ -101,6 +105,8 @@ function ot(e) {
101
105
  powershell: "PowerShell",
102
106
  ps1: "PowerShell",
103
107
  json: "JSON",
108
+ csv: "CSV",
109
+ tsv: "TSV",
104
110
  xml: "XML",
105
111
  yaml: "YAML",
106
112
  yml: "YAML",
@@ -123,7 +129,41 @@ function ot(e) {
123
129
  // Structured artifacts
124
130
  form: "Form",
125
131
  social: "Social Preview",
126
- txt: "Plain Text"
132
+ txt: "Plain Text",
133
+ plaintext: "Plain Text",
134
+ text: "Plain Text",
135
+ less: "Less",
136
+ sass: "Sass",
137
+ scss: "SCSS",
138
+ lua: "Lua",
139
+ perl: "Perl",
140
+ pl: "Perl",
141
+ r: "R",
142
+ dart: "Dart",
143
+ elixir: "Elixir",
144
+ ex: "Elixir",
145
+ haskell: "Haskell",
146
+ hs: "Haskell",
147
+ clojure: "Clojure",
148
+ clj: "Clojure",
149
+ erlang: "Erlang",
150
+ erl: "Erlang",
151
+ objectivec: "Objective-C",
152
+ objc: "Objective-C",
153
+ m: "Objective-C",
154
+ toml: "TOML",
155
+ ini: "INI",
156
+ env: "Environment",
157
+ makefile: "Makefile",
158
+ cmake: "CMake",
159
+ terraform: "Terraform",
160
+ tf: "Terraform",
161
+ hcl: "HCL",
162
+ protobuf: "Protocol Buffers",
163
+ proto: "Protocol Buffers",
164
+ zig: "Zig",
165
+ nim: "Nim",
166
+ v: "V"
127
167
  }[e == null ? void 0 : e.toLowerCase()] || (e == null ? void 0 : e.toUpperCase()) || "Code";
128
168
  }
129
169
  function Qs(e) {
@@ -158,6 +198,8 @@ function Qs(e) {
158
198
  shell: "sh",
159
199
  sh: "sh",
160
200
  json: "json",
201
+ csv: "csv",
202
+ tsv: "tsv",
161
203
  xml: "xml",
162
204
  yaml: "yml",
163
205
  yml: "yml",
@@ -165,7 +207,42 @@ function Qs(e) {
165
207
  md: "md",
166
208
  svg: "svg",
167
209
  form: "json",
168
- social: "json"
210
+ social: "json",
211
+ txt: "txt",
212
+ plaintext: "txt",
213
+ text: "txt",
214
+ less: "less",
215
+ sass: "sass",
216
+ scss: "scss",
217
+ lua: "lua",
218
+ perl: "pl",
219
+ pl: "pl",
220
+ r: "r",
221
+ dart: "dart",
222
+ elixir: "ex",
223
+ ex: "ex",
224
+ haskell: "hs",
225
+ hs: "hs",
226
+ clojure: "clj",
227
+ clj: "clj",
228
+ erlang: "erl",
229
+ erl: "erl",
230
+ objectivec: "m",
231
+ objc: "m",
232
+ m: "m",
233
+ toml: "toml",
234
+ ini: "ini",
235
+ env: "env",
236
+ makefile: "mk",
237
+ cmake: "cmake",
238
+ terraform: "tf",
239
+ tf: "tf",
240
+ hcl: "hcl",
241
+ protobuf: "proto",
242
+ proto: "proto",
243
+ zig: "zig",
244
+ nim: "nim",
245
+ v: "v"
169
246
  }[e == null ? void 0 : e.toLowerCase()] || "txt";
170
247
  }
171
248
  function Nr(e) {
@@ -195,13 +272,39 @@ function Nr(e) {
195
272
  sql: "sql",
196
273
  sh: "bash",
197
274
  json: "json",
275
+ csv: "csv",
276
+ tsv: "tsv",
198
277
  xml: "xml",
199
278
  yaml: "yaml",
200
279
  yml: "yaml",
201
280
  md: "markdown",
202
281
  svg: "svg",
203
282
  diff: "diff",
204
- patch: "patch"
283
+ patch: "patch",
284
+ txt: "txt",
285
+ less: "less",
286
+ sass: "sass",
287
+ scss: "scss",
288
+ lua: "lua",
289
+ pl: "perl",
290
+ r: "r",
291
+ dart: "dart",
292
+ ex: "elixir",
293
+ exs: "elixir",
294
+ hs: "haskell",
295
+ clj: "clojure",
296
+ erl: "erlang",
297
+ m: "objectivec",
298
+ toml: "toml",
299
+ ini: "ini",
300
+ env: "env",
301
+ cmake: "cmake",
302
+ tf: "terraform",
303
+ hcl: "hcl",
304
+ proto: "proto",
305
+ zig: "zig",
306
+ nim: "nim",
307
+ v: "v"
205
308
  }[e == null ? void 0 : e.toLowerCase()] || null;
206
309
  }
207
310
  function Ys(e) {
@@ -219,6 +322,8 @@ function Ys(e) {
219
322
  jsx: '<circle cx="12" cy="12" r="2.5"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1" transform="rotate(60 12 12)"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1" transform="rotate(120 12 12)"/>',
220
323
  tsx: '<circle cx="12" cy="12" r="2.5"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1" transform="rotate(60 12 12)"/><ellipse cx="12" cy="12" rx="10" ry="4" fill="none" stroke="currentColor" stroke-width="1" transform="rotate(120 12 12)"/>',
221
324
  json: '<path d="M5 3h2v2H5v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5h2v2H5c-1.07-.27-2-.9-2-2v-4a2 2 0 0 0-2-2H0v-2h1a2 2 0 0 0 2-2V5a2 2 0 0 1 2-2m14 0a2 2 0 0 1 2 2v4a2 2 0 0 0 2 2h1v2h-1a2 2 0 0 0-2 2v4a2 2 0 0 1-2 2h-2v-2h2v-5a2 2 0 0 1 2-2 2 2 0 0 1-2-2V5h-2V3h2m-7 12a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m-4 0a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1m8 0a1 1 0 0 1 1 1 1 1 0 0 1-1 1 1 1 0 0 1-1-1 1 1 0 0 1 1-1z"/>',
325
+ csv: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/>',
326
+ tsv: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/>',
222
327
  markdown: '<path d="M2 4h20v16H2V4m2 2v12h16V6H4m2 2h3l1.5 3 1.5-3h3v8h-2v-5l-2.5 4-2.5-4v5H6V8m11 0h2v4h2l-3 4-3-4h2V8z"/>',
223
328
  md: '<path d="M2 4h20v16H2V4m2 2v12h16V6H4m2 2h3l1.5 3 1.5-3h3v8h-2v-5l-2.5 4-2.5-4v5H6V8m11 0h2v4h2l-3 4-3-4h2V8z"/>',
224
329
  svg: '<path d="M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m0 2v14h14V5H5m3 4a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2 2 2 0 0 1 2-2m8 0l3 8h-2l-.5-1.5h-3L13 17h-2l3-8h2m-.5 2.5l-1 3h2l-1-3z"/>',
@@ -236,8 +341,69 @@ function Ys(e) {
236
341
  videoeditor: '<polygon points="23 7 16 12 23 17 23 7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/>',
237
342
  timeline: '<line x1="2" y1="12" x2="22" y2="12"/><circle cx="6" cy="12" r="2"/><circle cx="12" cy="12" r="2"/><circle cx="18" cy="12" r="2"/>',
238
343
  form: '<path d="M4 4h16v2H4V4zm0 4h10v2H4V8zm0 4h16v2H4v-2zm0 4h10v2H4v-2z"/><rect x="16" y="8" width="4" height="4" rx="1"/><rect x="16" y="16" width="4" height="4" rx="1"/>',
239
- social: '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>'
240
- }[e == null ? void 0 : e.toLowerCase()] || '<polyline points="16 18 22 12 16 6"/><polyline points="8 6 2 12 8 18"/>';
344
+ social: '<path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/>',
345
+ // Languages with display names that were missing icons
346
+ java: '<path d="M8.851 18.56s-.917.534.653.714c1.902.218 2.874.187 4.969-.211 0 0 .552.346 1.321.646-4.699 2.013-10.633-.118-6.943-1.149m-.575-2.627s-1.028.761.542.924c2.032.209 3.636.227 6.413-.308 0 0 .384.389.987.602-5.679 1.661-12.007.13-7.942-1.218m4.84-4.458c1.158 1.333-.304 2.533-.304 2.533s2.939-1.518 1.589-3.418c-1.261-1.772-2.228-2.652 3.007-5.688 0 0-8.216 2.051-4.292 6.573"/><path d="M16.205 20.196s.678.559-.747.991c-2.712.822-11.288 1.069-13.669.033-.856-.373.75-.89 1.254-.998.527-.114.828-.093.828-.093-.953-.671-6.156 1.317-2.643 1.887 9.58 1.553 17.462-.7 14.977-1.82M9.6 13.116s-4.362 1.036-1.544 1.412c1.189.159 3.561.123 5.77-.062 1.806-.152 3.618-.477 3.618-.477s-.637.272-1.098.587c-4.429 1.165-12.986.623-10.522-.568 2.082-1.006 3.776-.892 3.776-.892m7.816 4.368c4.502-2.34 2.421-4.589.968-4.285-.356.075-.515.14-.515.14s.132-.207.385-.296c2.874-1.01 5.086 2.981-.928 4.562 0 0 .07-.062.09-.121"/>',
347
+ c: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
348
+ cpp: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16 11h1v-1h1v1h1v1h-1v1h-1v-1h-1zm-3 0h1v-1h1v1h1v1h-1v1h-1v-1h-1z"/>',
349
+ csharp: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16.5 10.5h-1v-1h-1v1h-1v1h1v1h1v-1h1zM16.5 13.5h-1v-1h-1v1h-1v1h1v1h1v-1h1z"/>',
350
+ cs: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M9.5 7.5C7.01 7.5 5 9.51 5 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 6.5 12 2.75 2.75 0 0 1 9.2 9.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/><path d="M16.5 10.5h-1v-1h-1v1h-1v1h1v1h1v-1h1zM16.5 13.5h-1v-1h-1v1h-1v1h1v1h1v-1h1z"/>',
351
+ go: '<path d="M3.5 10.83s-.1-.16.06-.21c0 0 2.61-1.05 5.25-1.05h.2c2.64 0 5.25 1.05 5.25 1.05.16.05.06.21.06.21"/><path d="M4.3 11.2c-.15 0-.15-.23 0-.23h4.96c.15 0 .15.23 0 .23H4.3z"/><ellipse cx="6.27" cy="10" rx=".35" ry=".4"/><path d="M14.26 10.83s-.1-.16.06-.21c0 0 1.61-.65 3.25-.65h.2c1.64 0 3.25.65 3.25.65.16.05.06.21.06.21"/><path d="M14.85 11.2c-.15 0-.15-.23 0-.23h4.26c.15 0 .15.23 0 .23h-4.26z"/><ellipse cx="16.57" cy="10" rx=".35" ry=".4"/><path d="M8.98 15.53c-2.6 0-4.72-1.68-4.72-3.75 0-2.07 2.12-3.75 4.72-3.75s4.72 1.68 4.72 3.75-2.12 3.75-4.72 3.75z" fill="none" stroke="currentColor" stroke-width="1"/>',
352
+ rust: '<path d="M12 2l1.09 3.41L15 3.5l-.47 3.53 2.97-1.87-.94 3.42 3.54.16-2.7 2.27 3.15 1.63-3.38.86 2.13 2.87-3.47-.57.78 3.45-3.05-1.73L12 21l-1.56-3.07-3.05 1.73.78-3.45-3.47.57 2.13-2.87-3.38-.86 3.15-1.63L3.9 9.15l3.54-.16-.94-3.42 2.97 1.87L9 3.5l1.91 1.91L12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><circle cx="12" cy="12" r="3" fill="none" stroke="currentColor" stroke-width="1.2"/>',
353
+ ruby: '<path d="M5.5 18.5L3 14l3-9 4-2h4l4 2 3 9-2.5 4.5L12 21l-6.5-2.5z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M12 3v18M3 14h18M6 5l12 14M18 5L6 19" fill="none" stroke="currentColor" stroke-width=".8"/>',
354
+ rb: '<path d="M5.5 18.5L3 14l3-9 4-2h4l4 2 3 9-2.5 4.5L12 21l-6.5-2.5z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M12 3v18M3 14h18M6 5l12 14M18 5L6 19" fill="none" stroke="currentColor" stroke-width=".8"/>',
355
+ php: '<ellipse cx="12" cy="12" rx="10" ry="6" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 9.5h2a1.5 1.5 0 0 1 0 3H8v2M12.5 9.5h2a1.5 1.5 0 0 1 0 3H13.5v2M17 9.5v5"/>',
356
+ swift: '<path d="M20.5 8c.3-1.7-.4-3.6-1.8-5-.5 2.1-1.8 3.7-3.5 4.8C12.6 5.5 9.4 3.3 6 2c.9 1.5 1.7 3 2.3 4.5C5.3 4.4 3 3 3 3s1.3 3.5 4 6.3C5.2 9 3.5 8.6 2 8c1.1 1.8 2.7 3.2 4.5 4.2-.7.2-1.5.3-2.5.3 1.5 1.5 3.5 2.5 5.5 2.5-2 2-5 3-8 3 3.5 2 7.5 3 11 1.5 5-2.2 7.5-7.5 7.5-11.5z"/>',
357
+ kotlin: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M3 3l9 9L3 21M12 3l9 9-9 9"/>',
358
+ scala: '<path d="M4 4c0 0 8 1 16 1v5c-8 0-16-1-16-1V4z"/><path d="M4 10c0 0 8 1 16 1v5c-8 0-16-1-16-1V10z"/><path d="M4 16c0 0 8 1 16 1v4c-8 0-16-1-16-1V16z"/>',
359
+ powershell: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l5 3.5L6 15m6 0h5"/>',
360
+ ps1: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l5 3.5L6 15m6 0h5"/>',
361
+ xml: '<path d="M7 4l-4 8 4 8M17 4l4 8-4 8M14 4l-4 16"/>',
362
+ yaml: '<path d="M3 4l4.5 5.5L12 4M12 4l4.5 5.5L21 4M12 9.5V20M3 12h18" fill="none" stroke="currentColor" stroke-width="1.5"/>',
363
+ yml: '<path d="M3 4l4.5 5.5L12 4M12 4l4.5 5.5L21 4M12 9.5V20M3 12h18" fill="none" stroke="currentColor" stroke-width="1.5"/>',
364
+ graphql: '<circle cx="12" cy="4" r="1.5"/><circle cx="5" cy="8" r="1.5"/><circle cx="19" cy="8" r="1.5"/><circle cx="5" cy="16" r="1.5"/><circle cx="19" cy="16" r="1.5"/><circle cx="12" cy="20" r="1.5"/><path d="M5.5 8.5l6.5 11M12.5 4.5l6 3.5M5.5 8l13 0M5.5 16l13 0M18 16.5l-6 3.5M5.5 16l6.5-12" fill="none" stroke="currentColor" stroke-width="1"/>',
365
+ dockerfile: '<path d="M2 12.5h3v-3h3v-3h3V3.5h3v3h3v3h1.5a2.5 2.5 0 0 1 0 5H2v-2z"/><path d="M5 9.5h2v2H5zM8 9.5h2v2H8zM8 6.5h2v2H8zM11 6.5h2v2h-2zM11 9.5h2v2h-2zM14 9.5h2v2h-2zM11 3.5h2v2h-2z"/>',
366
+ docker: '<path d="M2 12.5h3v-3h3v-3h3V3.5h3v3h3v3h1.5a2.5 2.5 0 0 1 0 5H2v-2z"/><path d="M5 9.5h2v2H5zM8 9.5h2v2H8zM8 6.5h2v2H8zM11 6.5h2v2h-2zM11 9.5h2v2h-2zM14 9.5h2v2h-2zM11 3.5h2v2h-2z"/>',
367
+ // CSS preprocessors
368
+ less: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
369
+ sass: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
370
+ scss: '<path d="M5 3l.65 3.34h12.59l-.44 2.16H6.11l.65 3.34h11.04l-.78 3.86-5.02 1.67-4.96-1.67-.33-1.69H4.38l.65 3.35L12 19.31l7.02-2.31L20.93 3H5z"/>',
371
+ // New languages
372
+ lua: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="12" cy="12" r="4" fill="none" stroke="currentColor" stroke-width="1.5"/><circle cx="18" cy="5" r="2"/>',
373
+ perl: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M9 8v8M9 12h3a2 2 0 1 0 0-4H9"/>',
374
+ pl: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M9 8v8M9 12h3a2 2 0 1 0 0-4H9"/>',
375
+ r: '<path d="M3 5h14a4 4 0 0 1 4 4v0a4 4 0 0 1-4 4H3V5z" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M3 5v14M13 13l5 6" fill="none" stroke="currentColor" stroke-width="1.5"/>',
376
+ dart: '<path d="M4 12L2 6l4-4h6l10 10-6 10H8l-4-4v-6z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M6 2l16 10M2 6l10 16"/>',
377
+ elixir: '<path d="M12 2c-3 4-6 8-6 13a6 6 0 0 0 12 0c0-5-3-9-6-13z" fill="none" stroke="currentColor" stroke-width="1.5"/><ellipse cx="12" cy="16" rx="3" ry="2" fill="none" stroke="currentColor" stroke-width="1"/>',
378
+ ex: '<path d="M12 2c-3 4-6 8-6 13a6 6 0 0 0 12 0c0-5-3-9-6-13z" fill="none" stroke="currentColor" stroke-width="1.5"/><ellipse cx="12" cy="16" rx="3" ry="2" fill="none" stroke="currentColor" stroke-width="1"/>',
379
+ haskell: '<path d="M2 4l5 8-5 8M7 4l5 8-5 8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 8l2 4-2 4M14 10h8M14 14h8" fill="none" stroke="currentColor" stroke-width="1.5"/>',
380
+ hs: '<path d="M2 4l5 8-5 8M7 4l5 8-5 8" fill="none" stroke="currentColor" stroke-width="2"/><path d="M12 8l2 4-2 4M14 10h8M14 14h8" fill="none" stroke="currentColor" stroke-width="1.5"/>',
381
+ clojure: '<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 6a7.5 7.5 0 0 0 0 12M16 6a7.5 7.5 0 0 1 0 12"/>',
382
+ clj: '<circle cx="12" cy="12" r="9" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M8 6a7.5 7.5 0 0 0 0 12M16 6a7.5 7.5 0 0 1 0 12"/>',
383
+ erlang: '<path d="M4 18c2-1.5 3-4 3-6s-1-4.5-3-6M20 18c-3-1-5.5-3.5-5.5-6S17 5.5 20 6" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M4 12h16" fill="none" stroke="currentColor" stroke-width="1.5"/>',
384
+ erl: '<path d="M4 18c2-1.5 3-4 3-6s-1-4.5-3-6M20 18c-3-1-5.5-3.5-5.5-6S17 5.5 20 6" fill="none" stroke="currentColor" stroke-width="1.5"/><path d="M4 12h16" fill="none" stroke="currentColor" stroke-width="1.5"/>',
385
+ objectivec: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
386
+ objc: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
387
+ m: '<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"/><path d="M10.5 7.5C8.01 7.5 6 9.51 6 12s2.01 4.5 4.5 4.5c1.74 0 3.26-1 4-2.5h-2.18c-.5.63-1.27 1-2.12 1A2.75 2.75 0 0 1 7.5 12a2.75 2.75 0 0 1 2.7-2.5c.85 0 1.62.37 2.12 1h2.18c-.74-1.5-2.26-2.5-4-2.5z"/>',
388
+ // Config/build files
389
+ toml: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
390
+ ini: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
391
+ env: '<path d="M3 3h18v18H3V3z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M7 7h10M7 11h7M7 15h10"/>',
392
+ makefile: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l4 3-4 3V8m5 5h5v2h-5v-2z"/>',
393
+ cmake: '<path d="M4 4h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2m0 2v12h16V6H4m2 2l4 3-4 3V8m5 5h5v2h-5v-2z"/>',
394
+ terraform: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
395
+ tf: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
396
+ hcl: '<path d="M1 5l7 4v8l-7-4V5zM9 1l7 4v8l-7-4V1zM9 13l7 4v8l-7-4v-8zM17 5l7 4v8l-7-4V5z"/>',
397
+ protobuf: '<path d="M4 4h16v16H4V4z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M8 8h8M8 12h5M8 16h8"/>',
398
+ proto: '<path d="M4 4h16v16H4V4z" fill="none" stroke="currentColor" stroke-width="1.2"/><path d="M8 8h8M8 12h5M8 16h8"/>',
399
+ zig: '<path d="M2 6h7l-5 12h7l5-12h7l-5 12h7" fill="none" stroke="currentColor" stroke-width="1.5"/>',
400
+ nim: '<path d="M12 2l3 5h5l-3 5 3 5h-5l-3 5-3-5H4l3-5-3-5h5l3-5z" fill="none" stroke="currentColor" stroke-width="1.2"/>',
401
+ v: '<path d="M4 4l8 16 8-16" fill="none" stroke="currentColor" stroke-width="2"/>',
402
+ // Text/document icon
403
+ txt: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>',
404
+ plaintext: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>',
405
+ text: '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>'
406
+ }[e == null ? void 0 : e.toLowerCase()] || '<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="8" y1="13" x2="16" y2="13"/><line x1="8" y1="17" x2="13" y2="17"/>';
241
407
  }
242
408
  function en(e) {
243
409
  if (e === 0) return "0 Bytes";
@@ -248,7 +414,7 @@ function fr(e) {
248
414
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&").replace(/&#10;/g, `
249
415
  `).replace(/&#13;/g, "\r").replace(/&#9;/g, " ").replace(/&nbsp;/g, " ");
250
416
  }
251
- function ct(e) {
417
+ function lt(e) {
252
418
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
253
419
  }
254
420
  function Ur(e) {
@@ -259,18 +425,18 @@ function Gr(e, t) {
259
425
  const r = t == null ? void 0 : t.toLowerCase();
260
426
  if (r === "smartdiff")
261
427
  try {
262
- const c = JSON.parse(e);
263
- return c.language ? `${ot(c.language)} Diff` : "Smart Diff";
428
+ const l = JSON.parse(e);
429
+ return l.language ? `${ot(l.language)} Diff` : "Smart Diff";
264
430
  } catch {
265
431
  return "Smart Diff";
266
432
  }
267
433
  if (r === "form" || r === "social")
268
434
  try {
269
- const c = JSON.parse(e);
435
+ const l = JSON.parse(e);
270
436
  if (r === "form")
271
- return c.title || "Form";
437
+ return l.title || "Form";
272
438
  if (r === "social")
273
- return `Social Preview - ${c.platform || "twitter"}`;
439
+ return `Social Preview - ${l.platform || "twitter"}`;
274
440
  } catch {
275
441
  }
276
442
  const a = e.match(/(?:\/\/|\/\*|<!--)\s*(?:filename|file):\s*([^\n*\->\s]+)/i);
@@ -285,8 +451,8 @@ function Gr(e, t) {
285
451
  const i = e.match(/(?:export\s+)?const\s+([A-Z][a-zA-Z0-9]+)\s*=\s*(?:\([^)]*\)|[a-zA-Z]+)\s*=>/);
286
452
  if (i) return i[1];
287
453
  if (r === "python" || r === "py") {
288
- const c = e.match(/class\s+([A-Z][a-zA-Z0-9_]+)/);
289
- if (c) return c[1];
454
+ const l = e.match(/class\s+([A-Z][a-zA-Z0-9_]+)/);
455
+ if (l) return l[1];
290
456
  const d = e.match(/def\s+([a-z_][a-zA-Z0-9_]+)\s*\(/);
291
457
  if (d && d[1] !== "main") return d[1];
292
458
  }
@@ -308,28 +474,28 @@ function Xr(e, t, r, a) {
308
474
  const s = a.maxLines || 15;
309
475
  function n(f, b) {
310
476
  if (b) return !1;
311
- const y = a.minClickableLines;
312
- if (y == null) return !1;
313
- const v = typeof y == "number" ? y : y.lines || 0, k = typeof y == "object" && Array.isArray(y.ignoreLanguages) ? y.ignoreLanguages : [];
314
- return f < v && !k.includes(r);
477
+ const v = a.minClickableLines;
478
+ if (v == null) return !1;
479
+ const M = typeof v == "number" ? v : v.lines || 0, $ = typeof v == "object" && Array.isArray(v.ignoreLanguages) ? v.ignoreLanguages : [];
480
+ return f < M && !$.includes(r);
315
481
  }
316
482
  function o(f, b) {
317
- const y = a.actionLabel;
318
- let v;
319
- return typeof y == "string" ? v = y : y && typeof y == "object" && (v = y[f] || y.default || null), v || (v = f === "diff" || f === "patch" || f === "smartdiff" ? "View full diff" : "View full code"), `${v} (${b} lines)`;
483
+ const v = a.actionLabel;
484
+ let M;
485
+ return typeof v == "string" ? M = v : v && typeof v == "object" && (M = v[f] || v.default || null), M || (M = f === "diff" || f === "patch" || f === "smartdiff" ? "View full diff" : "View full code"), `${M} (${b} lines)`;
320
486
  }
321
487
  if (r === "smartdiff")
322
488
  try {
323
- const f = JSON.parse(t), y = Wr(f.oldCode, f.newCode).split(`
324
- `), v = y.slice(0, s), k = v.map((H) => H[0] || " "), $ = v.map((H) => H.slice(1)), R = ct($.join(`
325
- `)), z = y.length > s, Z = f.language || "plaintext", A = n(y.length, z), j = A ? " artifactuse-inline-preview--static" : "", I = A ? ' data-non-clickable="true"' : "", T = o("smartdiff", y.length);
326
- return `<div class="artifactuse-inline-preview${z ? " artifactuse-inline-preview--truncated" : ""}${j}" data-artifact-id="${e.id}" data-smartdiff="true" data-smartdiff-markers="${k.join(",")}"${I}><pre class="artifactuse-inline-preview__pre"><code class="language-${Z}">${R}</code></pre>` + (z ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${T}</span></div>` : "") + "</div>";
489
+ const f = JSON.parse(t), v = Wr(f.oldCode, f.newCode).split(`
490
+ `), M = v.slice(0, s), $ = M.map((I) => I[0] || " "), z = M.map((I) => I.slice(1)), S = lt(z.join(`
491
+ `)), y = v.length > s, C = f.language || "plaintext", x = n(v.length, y), E = x ? " artifactuse-inline-preview--static" : "", T = x ? ' data-non-clickable="true"' : "", L = o("smartdiff", v.length);
492
+ return `<div class="artifactuse-inline-preview${y ? " artifactuse-inline-preview--truncated" : ""}${E}" data-artifact-id="${e.id}" data-smartdiff="true" data-smartdiff-markers="${$.join(",")}"${T}><pre class="artifactuse-inline-preview__pre"><code class="language-${C}">${S}</code></pre>` + (y ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${L}</span></div>` : "") + "</div>";
327
493
  } catch {
328
494
  }
329
495
  let i = t, u = r;
330
- const c = i.split(`
331
- `), d = c.slice(0, s).join(`
332
- `), p = ct(d), w = c.length > s, l = n(c.length, w), m = l ? " artifactuse-inline-preview--static" : "", h = l ? ' data-non-clickable="true"' : "", g = o(r, c.length);
496
+ const l = i.split(`
497
+ `), d = l.slice(0, s).join(`
498
+ `), p = lt(d), w = l.length > s, c = n(l.length, w), m = c ? " artifactuse-inline-preview--static" : "", h = c ? ' data-non-clickable="true"' : "", g = o(r, l.length);
333
499
  return `<div class="artifactuse-inline-preview${w ? " artifactuse-inline-preview--truncated" : ""}${m}" data-artifact-id="${e.id}"${h}><pre class="artifactuse-inline-preview__pre"><code class="language-${u}">${p}</code></pre>` + (w ? `<div class="artifactuse-inline-preview__fade"><span class="artifactuse-inline-preview__action">${g}</span></div>` : "") + "</div>";
334
500
  }
335
501
  function Kr(e, t = "panel") {
@@ -362,7 +528,7 @@ function Yr(e) {
362
528
  const t = e == null ? void 0 : e.toLowerCase();
363
529
  return t === "form" ? Ee.FORM : t === "social" ? Ee.SOCIAL : Ee.CODE;
364
530
  }
365
- function $e(e, t, r, a) {
531
+ function Me(e, t, r, a) {
366
532
  const s = t == null ? void 0 : t.toLowerCase(), n = Yr(s), o = Qr(s, e);
367
533
  return {
368
534
  id: `${r}-${n}-${a}`,
@@ -387,10 +553,10 @@ function tn(e, t) {
387
553
  const o = s[1], i = fr(s[2]);
388
554
  let u = o.toLowerCase();
389
555
  if ((["xml", "markup", "html", "htm"].includes(u) || !u) && (i.trim().startsWith("<svg") || i.includes("<svg ") || i.includes("<svg>")) && (u = "svg"), (u === "form" || u === "social") && !hr(i)) {
390
- r.push($e(i, "json", t, n)), n++;
556
+ r.push(Me(i, "json", t, n)), n++;
391
557
  continue;
392
558
  }
393
- r.push($e(i, u, t, n)), n++;
559
+ r.push(Me(i, u, t, n)), n++;
394
560
  }
395
561
  return r;
396
562
  }
@@ -402,7 +568,7 @@ function ea(e, t, r = {}) {
402
568
  inlinePreview: o = null,
403
569
  inlineCode: i = null,
404
570
  tabs: u = null,
405
- viewMode: c = null
571
+ viewMode: l = null
406
572
  } = r;
407
573
  function d(g) {
408
574
  return o ? o.languages === !0 ? !(Array.isArray(o.excludeLanguages) && o.excludeLanguages.includes(g)) : Array.isArray(o.languages) ? o.languages.includes(g) : !1 : !1;
@@ -410,22 +576,22 @@ function ea(e, t, r = {}) {
410
576
  function p(g) {
411
577
  return i ? i.languages === !0 ? !0 : Array.isArray(i.languages) ? i.languages.includes(g) : !1 : !1;
412
578
  }
413
- const w = [], l = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
579
+ const w = [], c = /<pre><code class="language-(\w+)">([\s\S]*?)<\/code><\/pre>/gi;
414
580
  let m = 0;
415
- const h = e.replace(l, (g, f, b) => {
416
- const y = fr(b).trim(), v = y.split(`
581
+ const h = e.replace(c, (g, f, b) => {
582
+ const v = fr(b).trim(), M = v.split(`
417
583
  `).length;
418
- let k = f.toLowerCase();
419
- if ((["xml", "markup", "html", "htm"].includes(k) || !k) && y.trim().startsWith("<svg") && (k = "svg"), p(k))
584
+ let $ = f.toLowerCase();
585
+ if ((["xml", "markup", "html", "htm"].includes($) || !$) && v.trim().startsWith("<svg") && ($ = "svg"), p($))
420
586
  return m++, g;
421
- const $ = pr(k);
422
- let R = !1;
423
- if (n ? R = !0 : k === "diff" || k === "patch" || k === "smartdiff" ? R = v > 10 : $ ? R = !0 : R = y.length >= s && v >= a, !R && d(k) && (R = !0), R) {
424
- const z = $e(y, k, t, m);
425
- if (u && (z.tabs = u), c && (z.viewMode = c), m++, w.push(z), d(k))
426
- return Xr(z, y, k, o);
427
- let Z = "panel";
428
- return z.isInline && (Z = z.type === "social" ? "inline-social" : "inline-form"), Kr(z, Z);
587
+ const z = pr($);
588
+ let S = !1;
589
+ if (n ? S = !0 : $ === "diff" || $ === "patch" || $ === "smartdiff" ? S = M > 10 : z ? S = !0 : S = v.length >= s && M >= a, !S && d($) && (S = !0), S) {
590
+ const y = Me(v, $, t, m);
591
+ if (u && (y.tabs = u), l && (y.viewMode = l), m++, w.push(y), d($))
592
+ return Xr(y, v, $, o);
593
+ let C = "panel";
594
+ return y.isInline && (C = y.type === "social" ? "inline-social" : "inline-form"), Kr(y, C);
429
595
  }
430
596
  return m++, g;
431
597
  });
@@ -441,66 +607,74 @@ function ta() {
441
607
  isPanelOpen: !1,
442
608
  viewMode: "preview",
443
609
  // 'preview' | 'code' | 'split'
444
- isFullscreen: !1
610
+ isFullscreen: !1,
611
+ // Multi-tab support
612
+ openTabs: [],
613
+ // Array of artifact IDs open as tabs (ordered)
614
+ tabViewModes: {}
615
+ // { [artifactId]: 'preview' | 'code' | 'split' | 'edit' }
445
616
  };
446
617
  const t = /* @__PURE__ */ new Set();
447
618
  function r() {
448
- t.forEach((v) => {
619
+ t.forEach((y) => {
449
620
  try {
450
- v(e);
451
- } catch (k) {
452
- console.error("Artifactuse state subscriber error:", k);
621
+ y(e);
622
+ } catch (C) {
623
+ console.error("Artifactuse state subscriber error:", C);
453
624
  }
454
625
  });
455
626
  }
456
- function a(v) {
457
- return t.add(v), v(e), () => {
458
- t.delete(v);
627
+ function a(y) {
628
+ return t.add(y), y(e), () => {
629
+ t.delete(y);
459
630
  };
460
631
  }
461
632
  function s() {
462
633
  return { ...e };
463
634
  }
464
- function n(v) {
465
- const k = e.artifacts.findIndex(($) => $.id === v.id);
466
- if (k === -1)
635
+ function n(y) {
636
+ const C = e.artifacts.findIndex((x) => x.id === y.id);
637
+ if (C === -1)
467
638
  e = {
468
639
  ...e,
469
- artifacts: [...e.artifacts, v]
640
+ artifacts: [...e.artifacts, y]
470
641
  };
471
642
  else {
472
- const $ = [...e.artifacts];
473
- $[k] = { ...$[k], ...v }, e = {
643
+ const x = [...e.artifacts];
644
+ x[C] = { ...x[C], ...y }, e = {
474
645
  ...e,
475
- artifacts: $
646
+ artifacts: x
476
647
  };
477
648
  }
478
649
  r();
479
650
  }
480
- function o(v) {
481
- v.forEach(n);
651
+ function o(y) {
652
+ y.forEach(n);
482
653
  }
483
- function i(v) {
654
+ function i(y) {
655
+ const C = e.openTabs.filter((T) => T !== y), { [y]: x, ...E } = e.tabViewModes;
484
656
  e = {
485
657
  ...e,
486
- artifacts: e.artifacts.filter((k) => k.id !== v),
487
- activeArtifactId: e.activeArtifactId === v ? null : e.activeArtifactId,
488
- isPanelOpen: e.activeArtifactId === v ? !1 : e.isPanelOpen
658
+ artifacts: e.artifacts.filter((T) => T.id !== y),
659
+ activeArtifactId: e.activeArtifactId === y ? null : e.activeArtifactId,
660
+ isPanelOpen: e.activeArtifactId === y ? !1 : e.isPanelOpen,
661
+ openTabs: C,
662
+ tabViewModes: E
489
663
  }, r();
490
664
  }
491
- function u(v) {
492
- return e.artifacts.find((k) => k.id === v) || null;
665
+ function u(y) {
666
+ return e.artifacts.find((C) => C.id === y) || null;
493
667
  }
494
- function c() {
668
+ function l() {
495
669
  return e.activeArtifactId ? u(e.activeArtifactId) : null;
496
670
  }
497
- function d(v) {
498
- const k = u(v);
499
- let $ = (k == null ? void 0 : k.isPreviewable) === !1 ? "code" : "preview";
500
- k != null && k.tabs && !k.tabs.includes($) && ($ = k.tabs[0]), e = {
671
+ function d(y) {
672
+ const C = u(y);
673
+ let x = e.tabViewModes[y];
674
+ x || (x = (C == null ? void 0 : C.isPreviewable) === !1 ? "code" : "preview", C != null && C.tabs && !C.tabs.includes(x) && (x = C.tabs[0])), e = {
501
675
  ...e,
502
- activeArtifactId: v,
503
- viewMode: $
676
+ activeArtifactId: y,
677
+ viewMode: x
504
678
  }, r();
505
679
  }
506
680
  function p() {
@@ -509,60 +683,111 @@ function ta() {
509
683
  activeArtifactId: null
510
684
  }, r();
511
685
  }
512
- function w(v) {
686
+ function w(y) {
513
687
  e = {
514
688
  ...e,
515
- isPanelOpen: v,
516
- isFullscreen: v ? e.isFullscreen : !1
689
+ isPanelOpen: y,
690
+ isFullscreen: y ? e.isFullscreen : !1
517
691
  }, r();
518
692
  }
519
- function l(v) {
520
- if (!["preview", "code", "split", "edit"].includes(v)) {
521
- console.warn(`Invalid view mode: ${v}`);
693
+ function c(y) {
694
+ if (!["preview", "code", "split", "edit"].includes(y)) {
695
+ console.warn(`Invalid view mode: ${y}`);
522
696
  return;
523
697
  }
698
+ const C = e.activeArtifactId ? { ...e.tabViewModes, [e.activeArtifactId]: y } : e.tabViewModes;
524
699
  e = {
525
700
  ...e,
526
- viewMode: v
701
+ viewMode: y,
702
+ tabViewModes: C
527
703
  }, r();
528
704
  }
529
- function m(v) {
705
+ function m(y) {
530
706
  e = {
531
707
  ...e,
532
- isFullscreen: v
708
+ isFullscreen: y
533
709
  }, r();
534
710
  }
535
- function h(v) {
536
- return e.artifacts.filter((k) => k.messageId === v);
711
+ function h(y) {
712
+ return e.artifacts.filter((C) => C.messageId === y);
537
713
  }
538
- function g(v) {
539
- return e.artifacts.filter((k) => k.type === v);
714
+ function g(y) {
715
+ return e.artifacts.filter((C) => C.type === y);
540
716
  }
541
717
  function f() {
542
718
  return e.artifacts.length;
543
719
  }
544
- function b() {
720
+ function b(y) {
721
+ const C = u(y);
722
+ if (!C) return;
723
+ const E = e.openTabs.includes(y) ? e.openTabs : [...e.openTabs, y];
724
+ let T = e.tabViewModes[y];
725
+ T || (T = C.isPreviewable === !1 ? "code" : "preview", C.tabs && !C.tabs.includes(T) && (T = C.tabs[0])), e = {
726
+ ...e,
727
+ openTabs: E,
728
+ activeArtifactId: y,
729
+ tabViewModes: { ...e.tabViewModes, [y]: T },
730
+ viewMode: T
731
+ }, r();
732
+ }
733
+ function v(y) {
734
+ const C = e.openTabs.indexOf(y);
735
+ if (C === -1) return;
736
+ const x = e.openTabs.filter((G) => G !== y), { [y]: E, ...T } = e.tabViewModes;
737
+ let L = e.activeArtifactId;
738
+ e.activeArtifactId === y && (x.length === 0 ? L = null : C >= x.length ? L = x[x.length - 1] : L = x[C]);
739
+ const I = L && T[L] || "preview";
740
+ e = {
741
+ ...e,
742
+ openTabs: x,
743
+ activeArtifactId: L,
744
+ tabViewModes: T,
745
+ viewMode: I
746
+ }, r();
747
+ }
748
+ function M(y) {
749
+ if (!u(y)) return;
750
+ const x = e.tabViewModes[y] || e.viewMode;
751
+ e = {
752
+ ...e,
753
+ openTabs: [y],
754
+ activeArtifactId: y,
755
+ tabViewModes: { [y]: x },
756
+ viewMode: x
757
+ }, r();
758
+ }
759
+ function $() {
760
+ e = {
761
+ ...e,
762
+ openTabs: [],
763
+ activeArtifactId: null,
764
+ tabViewModes: {}
765
+ }, r();
766
+ }
767
+ function z() {
545
768
  e = {
546
769
  artifacts: [],
547
770
  activeArtifactId: null,
548
771
  isPanelOpen: !1,
549
772
  viewMode: "preview",
550
- isFullscreen: !1
773
+ isFullscreen: !1,
774
+ openTabs: [],
775
+ tabViewModes: {}
551
776
  }, r();
552
777
  }
553
- function y(v) {
554
- const k = r;
555
- let $ = !1;
556
- const R = () => {
557
- $ = !0;
778
+ function S(y) {
779
+ const C = r;
780
+ let x = !1;
781
+ const E = () => {
782
+ x = !0;
558
783
  };
559
784
  try {
560
785
  Object.defineProperty(window, "__artifactuse_notify__", {
561
- value: R,
786
+ value: E,
562
787
  configurable: !0
563
- }), v();
788
+ }), y();
564
789
  } finally {
565
- delete window.__artifactuse_notify__, $ && k();
790
+ delete window.__artifactuse_notify__, x && C();
566
791
  }
567
792
  }
568
793
  return {
@@ -574,7 +799,7 @@ function ta() {
574
799
  addArtifacts: o,
575
800
  removeArtifact: i,
576
801
  getArtifact: u,
577
- getActiveArtifact: c,
802
+ getActiveArtifact: l,
578
803
  getArtifactsByMessageId: h,
579
804
  getArtifactsByType: g,
580
805
  getArtifactCount: f,
@@ -582,14 +807,19 @@ function ta() {
582
807
  setActiveArtifact: d,
583
808
  clearActiveArtifact: p,
584
809
  setPanelOpen: w,
585
- setViewMode: l,
810
+ setViewMode: c,
586
811
  setFullscreen: m,
812
+ // Multi-tab
813
+ openTab: b,
814
+ closeTab: v,
815
+ closeOtherTabs: M,
816
+ closeAllTabs: $,
587
817
  // Utilities
588
- clear: b,
589
- batch: y
818
+ clear: z,
819
+ batch: S
590
820
  };
591
821
  }
592
- function lt(e) {
822
+ function ct(e) {
593
823
  try {
594
824
  return new URL(e).hostname;
595
825
  } catch {
@@ -600,129 +830,129 @@ function ra(e = []) {
600
830
  const t = Array.isArray(e) ? e : [e].filter(Boolean), r = new Set(t), a = /* @__PURE__ */ new Map();
601
831
  let s = null, n = !1, o = !1;
602
832
  const i = [];
603
- function u(A) {
833
+ function u(x) {
604
834
  if (r.size === 0)
605
835
  return console.warn("Artifactuse bridge: No allowed origins configured, accepting all messages"), !0;
606
- const j = lt(A);
607
- if (!j) return !1;
608
- for (const I of r) {
609
- const T = lt(I);
610
- if (T && T === j || I === j)
836
+ const E = ct(x);
837
+ if (!E) return !1;
838
+ for (const T of r) {
839
+ const L = ct(T);
840
+ if (L && L === E || T === E)
611
841
  return !0;
612
842
  }
613
843
  return !1;
614
844
  }
615
- function c(A) {
616
- var U, x, C;
617
- if (((U = A.data) == null ? void 0 : U.type) === "artifactuse" && (console.log("[Bridge] Message from:", A.origin, "action:", (x = A.data) == null ? void 0 : x.action), console.log("[Bridge] Allowed origins:", w())), !u(A.origin)) {
618
- ((C = A.data) == null ? void 0 : C.type) === "artifactuse" && console.warn("[Bridge] Origin NOT allowed:", A.origin);
845
+ function l(x) {
846
+ var U, k, _;
847
+ if (((U = x.data) == null ? void 0 : U.type) === "artifactuse" && (console.log("[Bridge] Message from:", x.origin, "action:", (k = x.data) == null ? void 0 : k.action), console.log("[Bridge] Allowed origins:", w())), !u(x.origin)) {
848
+ ((_ = x.data) == null ? void 0 : _.type) === "artifactuse" && console.warn("[Bridge] Origin NOT allowed:", x.origin);
619
849
  return;
620
850
  }
621
- const { type: j, action: I, data: T, requestId: H } = A.data || {};
622
- if (j !== "artifactuse") return;
623
- if (I === "ready" || I === "panel:ready") {
851
+ const { type: E, action: T, data: L, requestId: I } = x.data || {};
852
+ if (E !== "artifactuse") return;
853
+ if (T === "ready" || T === "panel:ready") {
624
854
  console.log("[Bridge] panel:ready received, setting isReady=true"), n = !0, o = !0, m();
625
855
  return;
626
856
  }
627
- (a.get(I) || []).forEach((L) => {
857
+ (a.get(T) || []).forEach((R) => {
628
858
  try {
629
- L(T, H);
630
- } catch (S) {
631
- console.error(`Artifactuse bridge handler error (${I}):`, S);
859
+ R(L, I);
860
+ } catch (A) {
861
+ console.error(`Artifactuse bridge handler error (${T}):`, A);
632
862
  }
633
- }), (a.get("*") || []).forEach((L) => {
863
+ }), (a.get("*") || []).forEach((R) => {
634
864
  try {
635
- L({ action: I, data: T, requestId: H });
636
- } catch (S) {
637
- console.error("Artifactuse bridge wildcard handler error:", S);
865
+ R({ action: T, data: L, requestId: I });
866
+ } catch (A) {
867
+ console.error("Artifactuse bridge wildcard handler error:", A);
638
868
  }
639
869
  });
640
870
  }
641
- window.addEventListener("message", c);
642
- function d(A) {
643
- A && typeof A == "string" && r.add(A);
871
+ window.addEventListener("message", l);
872
+ function d(x) {
873
+ x && typeof x == "string" && r.add(x);
644
874
  }
645
- function p(A) {
646
- A && typeof A == "string" && r.delete(A);
875
+ function p(x) {
876
+ x && typeof x == "string" && r.delete(x);
647
877
  }
648
878
  function w() {
649
879
  return [...r];
650
880
  }
651
- function l(A) {
652
- console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s === A), s !== A && (s = A, o ? (console.log("[Bridge] Ready signal was already received, keeping isReady=true"), n = !0) : n = !1), console.log("[Bridge] setIframe done, isReady:", n, "pendingMessages:", i.length), m();
881
+ function c(x) {
882
+ console.log("[Bridge] setIframe called, current isReady:", n, "readySignalReceived:", o, "same iframe:", s === x), s !== x && (s = x, o ? (console.log("[Bridge] Ready signal was already received, keeping isReady=true"), n = !0) : n = !1), console.log("[Bridge] setIframe done, isReady:", n, "pendingMessages:", i.length), m();
653
883
  }
654
884
  function m() {
655
- console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((A) => h(A)), i.length = 0);
885
+ console.log("[Bridge] flushPendingMessages: isReady=", n, "hasIframe=", !!(s != null && s.contentWindow), "pending=", i.length), n && (s != null && s.contentWindow) && i.length > 0 && (console.log("[Bridge] Flushing", i.length, "pending messages"), i.forEach((x) => h(x)), i.length = 0);
656
886
  }
657
- function h(A, j = "*") {
887
+ function h(x, E = "*") {
658
888
  if (!(s != null && s.contentWindow))
659
889
  return console.warn("Artifactuse: No panel iframe available"), !1;
660
890
  try {
661
- return s.contentWindow.postMessage(A, j), !0;
662
- } catch (I) {
663
- return console.error("Artifactuse bridge send error:", I), !1;
891
+ return s.contentWindow.postMessage(x, E), !0;
892
+ } catch (T) {
893
+ return console.error("Artifactuse bridge send error:", T), !1;
664
894
  }
665
895
  }
666
- function g(A, j, I = null, T = "*") {
667
- const H = {
896
+ function g(x, E, T = null, L = "*") {
897
+ const I = {
668
898
  type: "artifactuse",
669
- action: A,
670
- data: j,
671
- requestId: I || ut(),
899
+ action: x,
900
+ data: E,
901
+ requestId: T || ut(),
672
902
  timestamp: Date.now()
673
903
  };
674
- return n ? (h(H, T), H.requestId) : (i.push(H), H.requestId);
675
- }
676
- function f(A, j, I = 3e4) {
677
- return new Promise((T, H) => {
678
- const X = ut(), te = setTimeout(() => {
679
- y(`${A}:response`, U), H(new Error(`Artifactuse bridge request timeout: ${A}`));
680
- }, I), U = (x, C) => {
681
- C === X && (clearTimeout(te), y(`${A}:response`, U), T(x));
904
+ return n ? (h(I, L), I.requestId) : (i.push(I), I.requestId);
905
+ }
906
+ function f(x, E, T = 3e4) {
907
+ return new Promise((L, I) => {
908
+ const G = ut(), te = setTimeout(() => {
909
+ v(`${x}:response`, U), I(new Error(`Artifactuse bridge request timeout: ${x}`));
910
+ }, T), U = (k, _) => {
911
+ _ === G && (clearTimeout(te), v(`${x}:response`, U), L(k));
682
912
  };
683
- b(`${A}:response`, U), g(A, j, X);
913
+ b(`${x}:response`, U), g(x, E, G);
684
914
  });
685
915
  }
686
- function b(A, j) {
687
- return a.has(A) || a.set(A, []), a.get(A).push(j), () => y(A, j);
916
+ function b(x, E) {
917
+ return a.has(x) || a.set(x, []), a.get(x).push(E), () => v(x, E);
688
918
  }
689
- function y(A, j) {
690
- const I = a.get(A);
691
- if (I) {
692
- const T = I.indexOf(j);
693
- T > -1 && I.splice(T, 1);
919
+ function v(x, E) {
920
+ const T = a.get(x);
921
+ if (T) {
922
+ const L = T.indexOf(E);
923
+ L > -1 && T.splice(L, 1);
694
924
  }
695
925
  }
696
- function v(A) {
697
- return g("load:artifact", A);
926
+ function M(x) {
927
+ return g("load:artifact", x);
698
928
  }
699
- function k(A, j) {
700
- return g("update:artifact", { artifactId: A, updates: j });
929
+ function $(x, E) {
930
+ return g("update:artifact", { artifactId: x, updates: E });
701
931
  }
702
- function $() {
932
+ function z() {
703
933
  return f("save", {});
704
934
  }
705
- function R(A = "default") {
706
- return f("export", { format: A });
935
+ function S(x = "default") {
936
+ return f("export", { format: x });
707
937
  }
708
- function z(A, j) {
709
- return g("ai:response", A, j);
938
+ function y(x, E) {
939
+ return g("ai:response", x, E);
710
940
  }
711
- function Z() {
712
- window.removeEventListener("message", c), a.clear(), r.clear(), s = null, n = !1, o = !1, i.length = 0;
941
+ function C() {
942
+ window.removeEventListener("message", l), a.clear(), r.clear(), s = null, n = !1, o = !1, i.length = 0;
713
943
  }
714
944
  return {
715
- setIframe: l,
945
+ setIframe: c,
716
946
  send: g,
717
947
  request: f,
718
948
  on: b,
719
- off: y,
720
- loadArtifact: v,
721
- updateArtifact: k,
722
- requestSave: $,
723
- requestExport: R,
724
- sendAIResponse: z,
725
- destroy: Z,
949
+ off: v,
950
+ loadArtifact: M,
951
+ updateArtifact: $,
952
+ requestSave: z,
953
+ requestExport: S,
954
+ sendAIResponse: y,
955
+ destroy: C,
726
956
  // Origin management
727
957
  addAllowedOrigin: d,
728
958
  removeAllowedOrigin: p,
@@ -853,16 +1083,16 @@ function na(e = "auto", t = {}) {
853
1083
  }
854
1084
  function i() {
855
1085
  const m = o();
856
- return Object.entries(m).map(([h, g]) => `--artifactuse-${ce(h)}: ${g};`).join(`
1086
+ return Object.entries(m).map(([h, g]) => `--artifactuse-${le(h)}: ${g};`).join(`
857
1087
  `);
858
1088
  }
859
1089
  function u(m = document.documentElement) {
860
1090
  const h = o(), g = n();
861
1091
  Object.entries(h).forEach(([f, b]) => {
862
- m.style.setProperty(`--artifactuse-${ce(f)}`, b);
1092
+ m.style.setProperty(`--artifactuse-${le(f)}`, b);
863
1093
  }), m.setAttribute("data-artifactuse-theme", g), m.classList.remove("artifactuse-dark", "artifactuse-light"), m.classList.add(`artifactuse-${g}`);
864
1094
  }
865
- function c(m) {
1095
+ function l(m) {
866
1096
  if (!["dark", "light", "auto"].includes(m)) {
867
1097
  console.warn(`Invalid theme: ${m}`);
868
1098
  return;
@@ -871,7 +1101,7 @@ function na(e = "auto", t = {}) {
871
1101
  }
872
1102
  function d() {
873
1103
  const m = n();
874
- c(m === "dark" ? "light" : "dark");
1104
+ l(m === "dark" ? "light" : "dark");
875
1105
  }
876
1106
  function p(m, h = null) {
877
1107
  const g = ve(m);
@@ -885,22 +1115,22 @@ function na(e = "auto", t = {}) {
885
1115
  h.removeEventListener("change", g);
886
1116
  };
887
1117
  }
888
- function l() {
1118
+ function c() {
889
1119
  return `
890
1120
  :root,
891
1121
  [data-artifactuse-theme="dark"] {
892
- ${Object.entries(a.dark).map(([m, h]) => `--artifactuse-${ce(m)}: ${h};`).join(`
1122
+ ${Object.entries(a.dark).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
893
1123
  `)}
894
1124
  }
895
1125
 
896
1126
  [data-artifactuse-theme="light"] {
897
- ${Object.entries(a.light).map(([m, h]) => `--artifactuse-${ce(m)}: ${h};`).join(`
1127
+ ${Object.entries(a.light).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
898
1128
  `)}
899
1129
  }
900
1130
 
901
1131
  @media (prefers-color-scheme: light) {
902
1132
  :root:not([data-artifactuse-theme]) {
903
- ${Object.entries(a.light).map(([m, h]) => `--artifactuse-${ce(m)}: ${h};`).join(`
1133
+ ${Object.entries(a.light).map(([m, h]) => `--artifactuse-${le(m)}: ${h};`).join(`
904
1134
  `)}
905
1135
  }
906
1136
  }
@@ -919,19 +1149,19 @@ function na(e = "auto", t = {}) {
919
1149
  getResolvedTheme: n,
920
1150
  getColors: o,
921
1151
  getCSSVariables: i,
922
- getCSS: l,
1152
+ getCSS: c,
923
1153
  apply: u,
924
- set: c,
1154
+ set: l,
925
1155
  toggle: d,
926
1156
  setColors: p,
927
1157
  watchSystemTheme: w
928
1158
  };
929
1159
  }
930
- function ce(e) {
1160
+ function le(e) {
931
1161
  return e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
932
1162
  }
933
1163
  const Xe = "artifactuse_auth", gr = "https://app.artifactuse.com", ge = "https://api.artifactuse.com";
934
- function Me() {
1164
+ function Le() {
935
1165
  if (typeof window > "u" || !window.localStorage)
936
1166
  return null;
937
1167
  try {
@@ -966,8 +1196,8 @@ async function oa(e, t = {}) {
966
1196
  }
967
1197
  return a.json();
968
1198
  }
969
- async function ca(e, t = {}) {
970
- const { apiUrl: r = ge, getStoredAuthData: a = Me } = t, s = a();
1199
+ async function la(e, t = {}) {
1200
+ const { apiUrl: r = ge, getStoredAuthData: a = Le } = t, s = a();
971
1201
  if (!(s != null && s.token))
972
1202
  throw new Error("Authentication required. Please sign in first.");
973
1203
  const n = await fetch(`${r}/v1/project/save`, {
@@ -988,11 +1218,11 @@ async function ca(e, t = {}) {
988
1218
  }
989
1219
  return n.json();
990
1220
  }
991
- function la(e = {}) {
1221
+ function ca(e = {}) {
992
1222
  const {
993
1223
  appUrl: t = gr,
994
1224
  setStoredAuthData: r = ia,
995
- getStoredAuthData: a = Me
1225
+ getStoredAuthData: a = Le
996
1226
  } = e;
997
1227
  return new Promise((s, n) => {
998
1228
  const o = window.location.origin, i = `${t}/sdk/auth?origin=${encodeURIComponent(o)}`, u = window.open(
@@ -1004,18 +1234,18 @@ function la(e = {}) {
1004
1234
  n(new Error("Failed to open auth popup. Please allow popups for this site."));
1005
1235
  return;
1006
1236
  }
1007
- const c = (p) => {
1237
+ const l = (p) => {
1008
1238
  var w;
1009
1239
  if (p.origin === t && ((w = p.data) == null ? void 0 : w.type) === "sdk-auth") {
1010
- window.removeEventListener("message", c);
1011
- const { token: l, user: m } = p.data;
1012
- l ? (r({ token: l, user: m }), s({ token: l, user: m })) : n(new Error("Authentication failed"));
1240
+ window.removeEventListener("message", l);
1241
+ const { token: c, user: m } = p.data;
1242
+ c ? (r({ token: c, user: m }), s({ token: c, user: m })) : n(new Error("Authentication failed"));
1013
1243
  }
1014
1244
  };
1015
- window.addEventListener("message", c);
1245
+ window.addEventListener("message", l);
1016
1246
  const d = setInterval(() => {
1017
1247
  if (u.closed) {
1018
- clearInterval(d), window.removeEventListener("message", c);
1248
+ clearInterval(d), window.removeEventListener("message", l);
1019
1249
  const p = a();
1020
1250
  p != null && p.token ? s(p) : n(new Error("Authentication cancelled"));
1021
1251
  }
@@ -1023,7 +1253,7 @@ function la(e = {}) {
1023
1253
  });
1024
1254
  }
1025
1255
  async function ua(e = {}) {
1026
- const { apiUrl: t = ge, language: r, getStoredAuthData: a = Me } = e, s = a();
1256
+ const { apiUrl: t = ge, language: r, getStoredAuthData: a = Le } = e, s = a();
1027
1257
  if (!(s != null && s.token))
1028
1258
  throw new Error("Authentication required. Please sign in first.");
1029
1259
  const n = new URLSearchParams();
@@ -1042,7 +1272,7 @@ async function ua(e = {}) {
1042
1272
  return o.json();
1043
1273
  }
1044
1274
  async function da(e, t, r = {}) {
1045
- const { apiUrl: a = ge, getStoredAuthData: s = Me } = r, n = s();
1275
+ const { apiUrl: a = ge, getStoredAuthData: s = Le } = r, n = s();
1046
1276
  if (!(n != null && n.token))
1047
1277
  throw new Error("Authentication required. Please sign in first.");
1048
1278
  const o = await fetch(`${a}/v1/project/update`, {
@@ -1088,7 +1318,7 @@ function pa(e = {}) {
1088
1318
  } catch {
1089
1319
  }
1090
1320
  }
1091
- function c() {
1321
+ function l() {
1092
1322
  if (!(typeof window > "u" || !window.localStorage))
1093
1323
  try {
1094
1324
  localStorage.removeItem(a);
@@ -1112,14 +1342,14 @@ function pa(e = {}) {
1112
1342
  },
1113
1343
  getStoredAuthData: i,
1114
1344
  setStoredAuthData: u,
1115
- clearStoredAuthData: c,
1116
- signOut: c,
1345
+ clearStoredAuthData: l,
1346
+ signOut: l,
1117
1347
  // API methods
1118
1348
  share: (d) => oa(d, { apiUrl: t }),
1119
- save: (d) => ca(d, { apiUrl: t, getStoredAuthData: i }),
1349
+ save: (d) => la(d, { apiUrl: t, getStoredAuthData: i }),
1120
1350
  listArtifacts: (d) => ua({ apiUrl: t, language: d, getStoredAuthData: i }),
1121
1351
  updateArtifact: (d, p) => da(d, p, { apiUrl: t, getStoredAuthData: i }),
1122
- openAuthPopup: () => la({ appUrl: r, setStoredAuthData: u, getStoredAuthData: i })
1352
+ openAuthPopup: () => ca({ appUrl: r, setStoredAuthData: u, getStoredAuthData: i })
1123
1353
  };
1124
1354
  }
1125
1355
  function fa(e = {}) {
@@ -1275,61 +1505,61 @@ function fa(e = {}) {
1275
1505
  }
1276
1506
  }, { dark: !1 });
1277
1507
  }
1278
- function o(w, l, m) {
1508
+ function o(w, c, m) {
1279
1509
  return m ? w.define([
1280
- { tag: l.keyword, color: "#c084fc" },
1281
- { tag: l.operator, color: "#94a3b8" },
1282
- { tag: l.special(l.variableName), color: "#67e8f9" },
1283
- { tag: l.typeName, color: "#fbbf24" },
1284
- { tag: l.atom, color: "#fb923c" },
1285
- { tag: l.number, color: "#fb923c" },
1286
- { tag: l.definition(l.variableName), color: "#67e8f9" },
1287
- { tag: l.string, color: "#86efac" },
1288
- { tag: l.special(l.string), color: "#86efac" },
1289
- { tag: l.comment, color: "#6b7280", fontStyle: "italic" },
1290
- { tag: l.variableName, color: "#e4e4e7" },
1291
- { tag: l.tagName, color: "#f87171" },
1292
- { tag: l.bracket, color: "#a1a1aa" },
1293
- { tag: l.meta, color: "#fbbf24" },
1294
- { tag: l.link, color: "#60a5fa", textDecoration: "underline" },
1295
- { tag: l.heading, fontWeight: "bold", color: "#f472b6" },
1296
- { tag: l.emphasis, fontStyle: "italic" },
1297
- { tag: l.strong, fontWeight: "bold" },
1298
- { tag: l.strikethrough, textDecoration: "line-through" },
1299
- { tag: l.className, color: "#fbbf24" },
1300
- { tag: l.propertyName, color: "#60a5fa" },
1301
- { tag: l.function(l.variableName), color: "#60a5fa" },
1302
- { tag: l.function(l.propertyName), color: "#60a5fa" },
1303
- { tag: l.bool, color: "#fb923c" },
1304
- { tag: l.null, color: "#fb923c" },
1305
- { tag: l.regexp, color: "#f87171" }
1510
+ { tag: c.keyword, color: "#c084fc" },
1511
+ { tag: c.operator, color: "#94a3b8" },
1512
+ { tag: c.special(c.variableName), color: "#67e8f9" },
1513
+ { tag: c.typeName, color: "#fbbf24" },
1514
+ { tag: c.atom, color: "#fb923c" },
1515
+ { tag: c.number, color: "#fb923c" },
1516
+ { tag: c.definition(c.variableName), color: "#67e8f9" },
1517
+ { tag: c.string, color: "#86efac" },
1518
+ { tag: c.special(c.string), color: "#86efac" },
1519
+ { tag: c.comment, color: "#6b7280", fontStyle: "italic" },
1520
+ { tag: c.variableName, color: "#e4e4e7" },
1521
+ { tag: c.tagName, color: "#f87171" },
1522
+ { tag: c.bracket, color: "#a1a1aa" },
1523
+ { tag: c.meta, color: "#fbbf24" },
1524
+ { tag: c.link, color: "#60a5fa", textDecoration: "underline" },
1525
+ { tag: c.heading, fontWeight: "bold", color: "#f472b6" },
1526
+ { tag: c.emphasis, fontStyle: "italic" },
1527
+ { tag: c.strong, fontWeight: "bold" },
1528
+ { tag: c.strikethrough, textDecoration: "line-through" },
1529
+ { tag: c.className, color: "#fbbf24" },
1530
+ { tag: c.propertyName, color: "#60a5fa" },
1531
+ { tag: c.function(c.variableName), color: "#60a5fa" },
1532
+ { tag: c.function(c.propertyName), color: "#60a5fa" },
1533
+ { tag: c.bool, color: "#fb923c" },
1534
+ { tag: c.null, color: "#fb923c" },
1535
+ { tag: c.regexp, color: "#f87171" }
1306
1536
  ]) : w.define([
1307
- { tag: l.keyword, color: "#7c3aed" },
1308
- { tag: l.operator, color: "#64748b" },
1309
- { tag: l.special(l.variableName), color: "#0891b2" },
1310
- { tag: l.typeName, color: "#d97706" },
1311
- { tag: l.atom, color: "#ea580c" },
1312
- { tag: l.number, color: "#ea580c" },
1313
- { tag: l.definition(l.variableName), color: "#0891b2" },
1314
- { tag: l.string, color: "#16a34a" },
1315
- { tag: l.special(l.string), color: "#16a34a" },
1316
- { tag: l.comment, color: "#9ca3af", fontStyle: "italic" },
1317
- { tag: l.variableName, color: "#27272a" },
1318
- { tag: l.tagName, color: "#dc2626" },
1319
- { tag: l.bracket, color: "#71717a" },
1320
- { tag: l.meta, color: "#d97706" },
1321
- { tag: l.link, color: "#2563eb", textDecoration: "underline" },
1322
- { tag: l.heading, fontWeight: "bold", color: "#db2777" },
1323
- { tag: l.emphasis, fontStyle: "italic" },
1324
- { tag: l.strong, fontWeight: "bold" },
1325
- { tag: l.strikethrough, textDecoration: "line-through" },
1326
- { tag: l.className, color: "#d97706" },
1327
- { tag: l.propertyName, color: "#2563eb" },
1328
- { tag: l.function(l.variableName), color: "#2563eb" },
1329
- { tag: l.function(l.propertyName), color: "#2563eb" },
1330
- { tag: l.bool, color: "#ea580c" },
1331
- { tag: l.null, color: "#ea580c" },
1332
- { tag: l.regexp, color: "#dc2626" }
1537
+ { tag: c.keyword, color: "#7c3aed" },
1538
+ { tag: c.operator, color: "#64748b" },
1539
+ { tag: c.special(c.variableName), color: "#0891b2" },
1540
+ { tag: c.typeName, color: "#d97706" },
1541
+ { tag: c.atom, color: "#ea580c" },
1542
+ { tag: c.number, color: "#ea580c" },
1543
+ { tag: c.definition(c.variableName), color: "#0891b2" },
1544
+ { tag: c.string, color: "#16a34a" },
1545
+ { tag: c.special(c.string), color: "#16a34a" },
1546
+ { tag: c.comment, color: "#9ca3af", fontStyle: "italic" },
1547
+ { tag: c.variableName, color: "#27272a" },
1548
+ { tag: c.tagName, color: "#dc2626" },
1549
+ { tag: c.bracket, color: "#71717a" },
1550
+ { tag: c.meta, color: "#d97706" },
1551
+ { tag: c.link, color: "#2563eb", textDecoration: "underline" },
1552
+ { tag: c.heading, fontWeight: "bold", color: "#db2777" },
1553
+ { tag: c.emphasis, fontStyle: "italic" },
1554
+ { tag: c.strong, fontWeight: "bold" },
1555
+ { tag: c.strikethrough, textDecoration: "line-through" },
1556
+ { tag: c.className, color: "#d97706" },
1557
+ { tag: c.propertyName, color: "#2563eb" },
1558
+ { tag: c.function(c.variableName), color: "#2563eb" },
1559
+ { tag: c.function(c.propertyName), color: "#2563eb" },
1560
+ { tag: c.bool, color: "#ea580c" },
1561
+ { tag: c.null, color: "#ea580c" },
1562
+ { tag: c.regexp, color: "#dc2626" }
1333
1563
  ]);
1334
1564
  }
1335
1565
  const i = {
@@ -1367,15 +1597,15 @@ function fa(e = {}) {
1367
1597
  scss: { mod: "langSass", fn: "sass" }
1368
1598
  };
1369
1599
  function u(w) {
1370
- const l = i[w == null ? void 0 : w.toLowerCase()];
1371
- if (!l) return [];
1372
- const m = t[l.mod];
1373
- return !m || typeof m[l.fn] != "function" ? [] : l.opts ? m[l.fn](l.opts) : m[l.fn]();
1600
+ const c = i[w == null ? void 0 : w.toLowerCase()];
1601
+ if (!c) return [];
1602
+ const m = t[c.mod];
1603
+ return !m || typeof m[c.fn] != "function" ? [] : c.opts ? m[c.fn](c.opts) : m[c.fn]();
1374
1604
  }
1375
- function c(w) {
1605
+ function l(w) {
1376
1606
  return r === "auto" ? w === "dark" : r === "dark";
1377
1607
  }
1378
- function d(w, l = {}) {
1608
+ function d(w, c = {}) {
1379
1609
  var be, ie;
1380
1610
  if (!a())
1381
1611
  return console.warn("Artifactuse: CodeMirror modules not provided. Editor not available."), null;
@@ -1384,62 +1614,62 @@ function fa(e = {}) {
1384
1614
  keymap: g,
1385
1615
  lineNumbers: f,
1386
1616
  highlightActiveLineGutter: b,
1387
- highlightSpecialChars: y,
1388
- drawSelection: v,
1389
- dropCursor: k,
1390
- rectangularSelection: $,
1391
- crosshairCursor: R,
1392
- highlightActiveLine: z
1393
- } = t.view, { defaultKeymap: Z, history: A, historyKeymap: j, indentWithTab: I } = t.commands, {
1394
- indentOnInput: T,
1395
- syntaxHighlighting: H,
1396
- bracketMatching: X,
1617
+ highlightSpecialChars: v,
1618
+ drawSelection: M,
1619
+ dropCursor: $,
1620
+ rectangularSelection: z,
1621
+ crosshairCursor: S,
1622
+ highlightActiveLine: y
1623
+ } = t.view, { defaultKeymap: C, history: x, historyKeymap: E, indentWithTab: T } = t.commands, {
1624
+ indentOnInput: L,
1625
+ syntaxHighlighting: I,
1626
+ bracketMatching: G,
1397
1627
  foldGutter: te,
1398
1628
  foldKeymap: U,
1399
- HighlightStyle: x
1629
+ HighlightStyle: k
1400
1630
  } = t.language, {
1401
- closeBrackets: C,
1402
- closeBracketsKeymap: L,
1403
- autocompletion: S,
1631
+ closeBrackets: _,
1632
+ closeBracketsKeymap: R,
1633
+ autocompletion: A,
1404
1634
  completionKeymap: D
1405
- } = t.autocomplete, M = ((be = t.lezerHighlight) == null ? void 0 : be.tags) || ((ie = t.language) == null ? void 0 : ie.tags), B = c(l.sdkTheme), ne = B ? s(h) : n(h), re = [
1635
+ } = t.autocomplete, P = ((be = t.lezerHighlight) == null ? void 0 : be.tags) || ((ie = t.language) == null ? void 0 : ie.tags), Z = l(c.sdkTheme), ne = Z ? s(h) : n(h), re = [
1406
1636
  f(),
1407
1637
  b(),
1408
- y(),
1409
- A(),
1638
+ v(),
1639
+ x(),
1410
1640
  te({
1411
1641
  openText: "▾",
1412
1642
  closedText: "▸"
1413
1643
  }),
1414
- v(),
1415
- k(),
1416
- m.allowMultipleSelections.of(!0),
1417
- T(),
1418
- ...M ? [H(o(x, M, B))] : [],
1419
- X(),
1420
- C(),
1421
- S(),
1644
+ M(),
1422
1645
  $(),
1423
- R(),
1646
+ m.allowMultipleSelections.of(!0),
1647
+ L(),
1648
+ ...P ? [I(o(k, P, Z))] : [],
1649
+ G(),
1650
+ _(),
1651
+ A(),
1424
1652
  z(),
1653
+ S(),
1654
+ y(),
1425
1655
  g.of([
1426
- ...L,
1427
- ...Z,
1428
- ...j,
1656
+ ...R,
1657
+ ...C,
1658
+ ...E,
1429
1659
  ...U,
1430
1660
  ...D,
1431
- I
1661
+ T
1432
1662
  ]),
1433
- u(l.language),
1663
+ u(c.language),
1434
1664
  ne
1435
1665
  ];
1436
- l.onChange && re.push(
1666
+ c.onChange && re.push(
1437
1667
  h.updateListener.of((oe) => {
1438
- oe.docChanged && l.onChange(oe.state.doc.toString());
1668
+ oe.docChanged && c.onChange(oe.state.doc.toString());
1439
1669
  })
1440
1670
  );
1441
1671
  const ae = m.create({
1442
- doc: l.code || "",
1672
+ doc: c.code || "",
1443
1673
  extensions: re
1444
1674
  }), O = new h({
1445
1675
  state: ae,
@@ -1478,7 +1708,7 @@ function mr(e) {
1478
1708
  ee = e;
1479
1709
  }
1480
1710
  var he = { exec: () => null };
1481
- function _(e, t = "") {
1711
+ function j(e, t = "") {
1482
1712
  let r = typeof e == "string" ? e : e.source, a = { replace: (s, n) => {
1483
1713
  let o = typeof n == "string" ? n : n.source;
1484
1714
  return o = o.replace(q.caret, "$1"), r = r.replace(s, o), a;
@@ -1491,9 +1721,9 @@ var ha = (() => {
1491
1721
  } catch {
1492
1722
  return !1;
1493
1723
  }
1494
- })(), q = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br = _(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), va = _(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qe = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ya = /^[^\n]+/, Ye = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ka = _(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ye).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = _(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Je).getRegex(), _e = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", et = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, $a = _("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", et).replace("tag", _e).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = _(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _e).getRegex(), Aa = _(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(), tt = { blockquote: Aa, code: ma, def: ka, fences: wa, heading: ba, hr: me, html: $a, lheading: br, list: xa, newline: ga, paragraph: vr, table: he, text: ya }, pt = _("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _e).getRegex(), Sa = { ...tt, lheading: va, table: pt, paragraph: _(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", _e).getRegex() }, Ra = { ...tt, html: _(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", et).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: he, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: _(Qe).replace("hr", me).replace("heading", ` *#{1,6} *[^
1495
- ]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, za = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, La = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, Ca = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, Te = /[\p{P}\p{S}]/u, rt = /[\s\p{P}\p{S}]/u, kr = /[^\s\p{P}\p{S}]/u, Ma = _(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, rt).getRegex(), xr = /(?!~)[\p{P}\p{S}]/u, _a = /(?!~)[\s\p{P}\p{S}]/u, Ta = /(?:[^\s\p{P}\p{S}]|~)/u, Ea = _(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ha ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), $r = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pa = _($r, "u").replace(/punct/g, Te).getRegex(), ja = _($r, "u").replace(/punct/g, xr).getRegex(), Ar = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ia = _(Ar, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, Te).getRegex(), Da = _(Ar, "gu").replace(/notPunctSpace/g, Ta).replace(/punctSpace/g, _a).replace(/punct/g, xr).getRegex(), Ha = _("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, Te).getRegex(), qa = _(/\\(punct)/, "gu").replace(/punct/g, Te).getRegex(), Za = _(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Ba = _(et).replace("(?:-->|$)", "-->").getRegex(), Oa = _("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Ba).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), Ae = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Va = _(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", Ae).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), Sr = _(/^!?\[(label)\]\[(ref)\]/).replace("label", Ae).replace("ref", Ye).getRegex(), Rr = _(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ye).getRegex(), Fa = _("reflink|nolink(?!\\()", "g").replace("reflink", Sr).replace("nolink", Rr).getRegex(), ft = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, at = { _backpedal: he, anyPunctuation: qa, autolink: Za, blockSkip: Ea, br: yr, code: La, del: he, emStrongLDelim: Pa, emStrongRDelimAst: Ia, emStrongRDelimUnd: Ha, escape: za, link: Va, nolink: Rr, punctuation: Ma, reflink: Sr, reflinkSearch: Fa, tag: Oa, text: Ca, url: he }, Na = { ...at, link: _(/^!?\[(label)\]\((.*?)\)/).replace("label", Ae).getRegex(), reflink: _(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", Ae).getRegex() }, De = { ...at, emStrongRDelimAst: Da, emStrongLDelim: ja, url: _(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ft).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: _(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ft).getRegex() }, Ua = { ...De, br: _(yr).replace("{2,}", "*").getRegex(), text: _(De.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ye = { normal: tt, gfm: Sa, pedantic: Ra }, le = { normal: at, gfm: De, breaks: Ua, pedantic: Na }, Ga = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ht = (e) => Ga[e];
1496
- function G(e, t) {
1724
+ })(), q = { codeRemoveIndent: /^(?: {1,4}| {0,3}\t)/gm, outputLinkReplace: /\\([\[\]])/g, indentCodeCompensation: /^(\s+)(?:```)/, beginningSpace: /^\s+/, endingHash: /#$/, startingSpaceChar: /^ /, endingSpaceChar: / $/, nonSpaceChar: /[^ ]/, newLineCharGlobal: /\n/g, tabCharGlobal: /\t/g, multipleSpaceGlobal: /\s+/g, blankLine: /^[ \t]*$/, doubleBlankLine: /\n[ \t]*\n[ \t]*$/, blockquoteStart: /^ {0,3}>/, blockquoteSetextReplace: /\n {0,3}((?:=+|-+) *)(?=\n|$)/g, blockquoteSetextReplace2: /^ {0,3}>[ \t]?/gm, listReplaceTabs: /^\t+/, listReplaceNesting: /^ {1,4}(?=( {4})*[^ ])/g, listIsTask: /^\[[ xX]\] +\S/, listReplaceTask: /^\[[ xX]\] +/, listTaskCheckbox: /\[[ xX]\]/, anyLine: /\n.*\n/, hrefBrackets: /^<(.*)>$/, tableDelimiter: /[:|]/, tableAlignChars: /^\||\| *$/g, tableRowBlankLine: /\n[ \t]*$/, tableAlignRight: /^ *-+: *$/, tableAlignCenter: /^ *:-+: *$/, tableAlignLeft: /^ *:-+ *$/, startATag: /^<a /i, endATag: /^<\/a>/i, startPreScriptTag: /^<(pre|code|kbd|script)(\s|>)/i, endPreScriptTag: /^<\/(pre|code|kbd|script)(\s|>)/i, startAngleBracket: /^</, endAngleBracket: />$/, pedanticHrefTitle: /^([^'"]*[^\s])\s+(['"])(.*)\2/, unicodeAlphaNumeric: /[\p{L}\p{N}]/u, escapeTest: /[&<>"']/, escapeReplace: /[&<>"']/g, escapeTestNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/, escapeReplaceNoEncode: /[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g, unescapeTest: /&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig, caret: /(^|[^\[])\^/g, percentDecode: /%25/g, findPipe: /\|/g, splitPipe: / \|/, slashPipe: /\\\|/g, carriageReturn: /\r\n|\r/g, spaceLine: /^ +$/gm, notSpaceStart: /^\S*/, endingNewline: /\n$/, listItemRegex: (e) => new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`), nextBulletRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`), hrRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`), fencesBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}(?:\`\`\`|~~~)`), headingBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}#`), htmlBeginRegex: (e) => new RegExp(`^ {0,${Math.min(3, e - 1)}}<(?:[a-z].*>|!--)`, "i") }, ga = /^(?:[ \t]*(?:\n|$))+/, ma = /^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/, wa = /^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/, me = /^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/, ba = /^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/, Je = /(?:[*+-]|\d{1,9}[.)])/, wr = /^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/, br = j(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/\|table/g, "").getRegex(), va = j(wr).replace(/bull/g, Je).replace(/blockCode/g, /(?: {4}| {0,3}\t)/).replace(/fences/g, / {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g, / {0,3}>/).replace(/heading/g, / {0,3}#{1,6}/).replace(/html/g, / {0,3}<[^\n>]+>\n/).replace(/table/g, / {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(), Qe = /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/, ya = /^[^\n]+/, Ye = /(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/, ka = j(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label", Ye).replace("title", /(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(), xa = j(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g, Je).getRegex(), Te = "address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul", et = /<!--(?:-?>|[\s\S]*?(?:-->|$))/, Ma = j("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))", "i").replace("comment", et).replace("tag", Te).replace("attribute", / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(), vr = j(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("|table", "").replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex(), $a = j(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph", vr).getRegex(), tt = { blockquote: $a, code: ma, def: ka, fences: wa, heading: ba, hr: me, html: Ma, lheading: br, list: xa, newline: ga, paragraph: vr, table: he, text: ya }, pt = j("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("blockquote", " {0,3}>").replace("code", "(?: {4}| {0,3} )[^\\n]").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex(), za = { ...tt, lheading: va, table: pt, paragraph: j(Qe).replace("hr", me).replace("heading", " {0,3}#{1,6}(?:\\s|$)").replace("|lheading", "").replace("table", pt).replace("blockquote", " {0,3}>").replace("fences", " {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list", " {0,3}(?:[*+-]|1[.)]) ").replace("html", "</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag", Te).getRegex() }, Aa = { ...tt, html: j(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment", et).replace(/tag/g, "(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(), def: /^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/, heading: /^(#{1,6})(.*)(?:\n+|$)/, fences: he, lheading: /^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/, paragraph: j(Qe).replace("hr", me).replace("heading", ` *#{1,6} *[^
1725
+ ]`).replace("lheading", br).replace("|table", "").replace("blockquote", " {0,3}>").replace("|fences", "").replace("|list", "").replace("|html", "").replace("|tag", "").getRegex() }, Sa = /^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/, Ca = /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/, yr = /^( {2,}|\\)\n(?!\s*$)/, Ra = /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/, _e = /[\p{P}\p{S}]/u, rt = /[\s\p{P}\p{S}]/u, kr = /[^\s\p{P}\p{S}]/u, La = j(/^((?![*_])punctSpace)/, "u").replace(/punctSpace/g, rt).getRegex(), xr = /(?!~)[\p{P}\p{S}]/u, Ta = /(?!~)[\s\p{P}\p{S}]/u, _a = /(?:[^\s\p{P}\p{S}]|~)/u, Ea = j(/link|precode-code|html/, "g").replace("link", /\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-", ha ? "(?<!`)()" : "(^^|[^`])").replace("code", /(?<b>`+)[^`]+\k<b>(?!`)/).replace("html", /<(?! )[^<>]*?>/).getRegex(), Mr = /^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/, Pa = j(Mr, "u").replace(/punct/g, _e).getRegex(), ja = j(Mr, "u").replace(/punct/g, xr).getRegex(), $r = "^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)", Ha = j($r, "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Va = j($r, "gu").replace(/notPunctSpace/g, _a).replace(/punctSpace/g, Ta).replace(/punct/g, xr).getRegex(), Ia = j("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)", "gu").replace(/notPunctSpace/g, kr).replace(/punctSpace/g, rt).replace(/punct/g, _e).getRegex(), Da = j(/\\(punct)/, "gu").replace(/punct/g, _e).getRegex(), qa = j(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme", /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email", /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(), Za = j(et).replace("(?:-->|$)", "-->").getRegex(), Oa = j("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment", Za).replace("attribute", /\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(), $e = /(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/, Ba = j(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label", $e).replace("href", /<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title", /"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(), zr = j(/^!?\[(label)\]\[(ref)\]/).replace("label", $e).replace("ref", Ye).getRegex(), Ar = j(/^!?\[(ref)\](?:\[\])?/).replace("ref", Ye).getRegex(), Fa = j("reflink|nolink(?!\\()", "g").replace("reflink", zr).replace("nolink", Ar).getRegex(), ft = /[hH][tT][tT][pP][sS]?|[fF][tT][pP]/, at = { _backpedal: he, anyPunctuation: Da, autolink: qa, blockSkip: Ea, br: yr, code: Ca, del: he, emStrongLDelim: Pa, emStrongRDelimAst: Ha, emStrongRDelimUnd: Ia, escape: Sa, link: Ba, nolink: Ar, punctuation: La, reflink: zr, reflinkSearch: Fa, tag: Oa, text: Ra, url: he }, Na = { ...at, link: j(/^!?\[(label)\]\((.*?)\)/).replace("label", $e).getRegex(), reflink: j(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label", $e).getRegex() }, Ve = { ...at, emStrongRDelimAst: Va, emStrongLDelim: ja, url: j(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol", ft).replace("email", /[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(), _backpedal: /(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/, del: /^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/, text: j(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol", ft).getRegex() }, Ua = { ...Ve, br: j(yr).replace("{2,}", "*").getRegex(), text: j(Ve.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex() }, ye = { normal: tt, gfm: za, pedantic: Aa }, ce = { normal: at, gfm: Ve, breaks: Ua, pedantic: Na }, Ga = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }, ht = (e) => Ga[e];
1726
+ function W(e, t) {
1497
1727
  if (t) {
1498
1728
  if (q.escapeTest.test(e)) return e.replace(q.escapeReplace, ht);
1499
1729
  } else if (q.escapeTestNoEncode.test(e)) return e.replace(q.escapeReplaceNoEncode, ht);
@@ -1510,9 +1740,9 @@ function gt(e) {
1510
1740
  function mt(e, t) {
1511
1741
  var n;
1512
1742
  let r = e.replace(q.findPipe, (o, i, u) => {
1513
- let c = !1, d = i;
1514
- for (; --d >= 0 && u[d] === "\\"; ) c = !c;
1515
- return c ? "|" : " |";
1743
+ let l = !1, d = i;
1744
+ for (; --d >= 0 && u[d] === "\\"; ) l = !l;
1745
+ return l ? "|" : " |";
1516
1746
  }), a = r.split(q.splitPipe), s = 0;
1517
1747
  if (a[0].trim() || a.shift(), a.length > 0 && !((n = a.at(-1)) != null && n.trim()) && a.pop(), t) if (a.length > t) a.splice(t);
1518
1748
  else for (; a.length < t; ) a.push("");
@@ -1554,11 +1784,11 @@ function Xa(e, t, r) {
1554
1784
  }).join(`
1555
1785
  `);
1556
1786
  }
1557
- var Se = class {
1787
+ var ze = class {
1558
1788
  constructor(e) {
1559
- P(this, "options");
1560
- P(this, "rules");
1561
- P(this, "lexer");
1789
+ V(this, "options");
1790
+ V(this, "rules");
1791
+ V(this, "lexer");
1562
1792
  this.options = e || ee;
1563
1793
  }
1564
1794
  space(e) {
@@ -1608,27 +1838,27 @@ var Se = class {
1608
1838
  else if (!o) i.push(r[u]);
1609
1839
  else break;
1610
1840
  r = r.slice(u);
1611
- let c = i.join(`
1612
- `), d = c.replace(this.rules.other.blockquoteSetextReplace, `
1841
+ let l = i.join(`
1842
+ `), d = l.replace(this.rules.other.blockquoteSetextReplace, `
1613
1843
  $1`).replace(this.rules.other.blockquoteSetextReplace2, "");
1614
1844
  a = a ? `${a}
1615
- ${c}` : c, s = s ? `${s}
1845
+ ${l}` : l, s = s ? `${s}
1616
1846
  ${d}` : d;
1617
1847
  let p = this.lexer.state.top;
1618
1848
  if (this.lexer.state.top = !0, this.lexer.blockTokens(d, n, !0), this.lexer.state.top = p, r.length === 0) break;
1619
1849
  let w = n.at(-1);
1620
1850
  if ((w == null ? void 0 : w.type) === "code") break;
1621
1851
  if ((w == null ? void 0 : w.type) === "blockquote") {
1622
- let l = w, m = l.raw + `
1852
+ let c = w, m = c.raw + `
1623
1853
  ` + r.join(`
1624
1854
  `), h = this.blockquote(m);
1625
- n[n.length - 1] = h, a = a.substring(0, a.length - l.raw.length) + h.raw, s = s.substring(0, s.length - l.text.length) + h.text;
1855
+ n[n.length - 1] = h, a = a.substring(0, a.length - c.raw.length) + h.raw, s = s.substring(0, s.length - c.text.length) + h.text;
1626
1856
  break;
1627
1857
  } else if ((w == null ? void 0 : w.type) === "list") {
1628
- let l = w, m = l.raw + `
1858
+ let c = w, m = c.raw + `
1629
1859
  ` + r.join(`
1630
1860
  `), h = this.list(m);
1631
- n[n.length - 1] = h, a = a.substring(0, a.length - w.raw.length) + h.raw, s = s.substring(0, s.length - l.raw.length) + h.raw, r = m.substring(n.at(-1).raw.length).split(`
1861
+ n[n.length - 1] = h, a = a.substring(0, a.length - w.raw.length) + h.raw, s = s.substring(0, s.length - c.raw.length) + h.raw, r = m.substring(n.at(-1).raw.length).split(`
1632
1862
  `);
1633
1863
  continue;
1634
1864
  }
@@ -1647,31 +1877,31 @@ ${d}` : d;
1647
1877
  let d = !1, p = "", w = "";
1648
1878
  if (!(t = i.exec(e)) || this.rules.block.hr.test(e)) break;
1649
1879
  p = t[0], e = e.substring(p.length);
1650
- let l = t[2].split(`
1880
+ let c = t[2].split(`
1651
1881
  `, 1)[0].replace(this.rules.other.listReplaceTabs, (f) => " ".repeat(3 * f.length)), m = e.split(`
1652
- `, 1)[0], h = !l.trim(), g = 0;
1653
- if (this.options.pedantic ? (g = 2, w = l.trimStart()) : h ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, w = l.slice(g), g += t[1].length), h && this.rules.other.blankLine.test(m) && (p += m + `
1882
+ `, 1)[0], h = !c.trim(), g = 0;
1883
+ if (this.options.pedantic ? (g = 2, w = c.trimStart()) : h ? g = t[1].length + 1 : (g = t[2].search(this.rules.other.nonSpaceChar), g = g > 4 ? 1 : g, w = c.slice(g), g += t[1].length), h && this.rules.other.blankLine.test(m) && (p += m + `
1654
1884
  `, e = e.substring(m.length + 1), d = !0), !d) {
1655
- let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), y = this.rules.other.fencesBeginRegex(g), v = this.rules.other.headingBeginRegex(g), k = this.rules.other.htmlBeginRegex(g);
1885
+ let f = this.rules.other.nextBulletRegex(g), b = this.rules.other.hrRegex(g), v = this.rules.other.fencesBeginRegex(g), M = this.rules.other.headingBeginRegex(g), $ = this.rules.other.htmlBeginRegex(g);
1656
1886
  for (; e; ) {
1657
- let $ = e.split(`
1658
- `, 1)[0], R;
1659
- if (m = $, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), R = m) : R = m.replace(this.rules.other.tabCharGlobal, " "), y.test(m) || v.test(m) || k.test(m) || f.test(m) || b.test(m)) break;
1660
- if (R.search(this.rules.other.nonSpaceChar) >= g || !m.trim()) w += `
1661
- ` + R.slice(g);
1887
+ let z = e.split(`
1888
+ `, 1)[0], S;
1889
+ if (m = z, this.options.pedantic ? (m = m.replace(this.rules.other.listReplaceNesting, " "), S = m) : S = m.replace(this.rules.other.tabCharGlobal, " "), v.test(m) || M.test(m) || $.test(m) || f.test(m) || b.test(m)) break;
1890
+ if (S.search(this.rules.other.nonSpaceChar) >= g || !m.trim()) w += `
1891
+ ` + S.slice(g);
1662
1892
  else {
1663
- if (h || l.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || y.test(l) || v.test(l) || b.test(l)) break;
1893
+ if (h || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || v.test(c) || M.test(c) || b.test(c)) break;
1664
1894
  w += `
1665
1895
  ` + m;
1666
1896
  }
1667
- !h && !m.trim() && (h = !0), p += $ + `
1668
- `, e = e.substring($.length + 1), l = R.slice(g);
1897
+ !h && !m.trim() && (h = !0), p += z + `
1898
+ `, e = e.substring(z.length + 1), c = S.slice(g);
1669
1899
  }
1670
1900
  }
1671
1901
  o.loose || (u ? o.loose = !0 : this.rules.other.doubleBlankLine.test(p) && (u = !0)), o.items.push({ type: "list_item", raw: p, task: !!this.options.gfm && this.rules.other.listIsTask.test(w), loose: !1, text: w, tokens: [] }), o.raw += p;
1672
1902
  }
1673
- let c = o.items.at(-1);
1674
- if (c) c.raw = c.raw.trimEnd(), c.text = c.text.trimEnd();
1903
+ let l = o.items.at(-1);
1904
+ if (l) l.raw = l.raw.trimEnd(), l.text = l.text.trimEnd();
1675
1905
  else return;
1676
1906
  o.raw = o.raw.trimEnd();
1677
1907
  for (let d of o.items) {
@@ -1690,7 +1920,7 @@ ${d}` : d;
1690
1920
  }
1691
1921
  }
1692
1922
  if (!o.loose) {
1693
- let p = d.tokens.filter((l) => l.type === "space"), w = p.length > 0 && p.some((l) => this.rules.other.anyLine.test(l.raw));
1923
+ let p = d.tokens.filter((c) => c.type === "space"), w = p.length > 0 && p.some((c) => this.rules.other.anyLine.test(c.raw));
1694
1924
  o.loose = w;
1695
1925
  }
1696
1926
  }
@@ -1721,7 +1951,7 @@ ${d}` : d;
1721
1951
  if (r.length === a.length) {
1722
1952
  for (let i of a) this.rules.other.tableAlignRight.test(i) ? n.align.push("right") : this.rules.other.tableAlignCenter.test(i) ? n.align.push("center") : this.rules.other.tableAlignLeft.test(i) ? n.align.push("left") : n.align.push(null);
1723
1953
  for (let i = 0; i < r.length; i++) n.header.push({ text: r[i], tokens: this.lexer.inline(r[i]), header: !0, align: n.align[i] });
1724
- for (let i of s) n.rows.push(mt(i, n.header.length).map((u, c) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: n.align[c] })));
1954
+ for (let i of s) n.rows.push(mt(i, n.header.length).map((u, l) => ({ text: u, tokens: this.lexer.inline(u), header: !1, align: n.align[l] })));
1725
1955
  return n;
1726
1956
  }
1727
1957
  }
@@ -1787,8 +2017,8 @@ ${d}` : d;
1787
2017
  emStrong(e, t, r = "") {
1788
2018
  let a = this.rules.inline.emStrongLDelim.exec(e);
1789
2019
  if (!(!a || a[3] && r.match(this.rules.other.unicodeAlphaNumeric)) && (!(a[1] || a[2]) || !r || this.rules.inline.punctuation.exec(r))) {
1790
- let s = [...a[0]].length - 1, n, o, i = s, u = 0, c = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
1791
- for (c.lastIndex = 0, t = t.slice(-1 * e.length + s); (a = c.exec(t)) != null; ) {
2020
+ let s = [...a[0]].length - 1, n, o, i = s, u = 0, l = a[0][0] === "*" ? this.rules.inline.emStrongRDelimAst : this.rules.inline.emStrongRDelimUnd;
2021
+ for (l.lastIndex = 0, t = t.slice(-1 * e.length + s); (a = l.exec(t)) != null; ) {
1792
2022
  if (n = a[1] || a[2] || a[3] || a[4] || a[5] || a[6], !n) continue;
1793
2023
  if (o = [...n].length, a[3] || a[4]) {
1794
2024
  i += o;
@@ -1801,8 +2031,8 @@ ${d}` : d;
1801
2031
  o = Math.min(o, o + i + u);
1802
2032
  let d = [...a[0]][0].length, p = e.slice(0, s + a.index + d + o);
1803
2033
  if (Math.min(s, o) % 2) {
1804
- let l = p.slice(1, -1);
1805
- return { type: "em", raw: p, text: l, tokens: this.lexer.inlineTokens(l) };
2034
+ let c = p.slice(1, -1);
2035
+ return { type: "em", raw: p, text: c, tokens: this.lexer.inlineTokens(c) };
1806
2036
  }
1807
2037
  let w = p.slice(2, -2);
1808
2038
  return { type: "strong", raw: p, text: w, tokens: this.lexer.inlineTokens(w) };
@@ -1854,25 +2084,25 @@ ${d}` : d;
1854
2084
  return { type: "text", raw: t[0], text: t[0], escaped: r };
1855
2085
  }
1856
2086
  }
1857
- }, F = class He {
2087
+ }, F = class Ie {
1858
2088
  constructor(t) {
1859
- P(this, "tokens");
1860
- P(this, "options");
1861
- P(this, "state");
1862
- P(this, "inlineQueue");
1863
- P(this, "tokenizer");
1864
- this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ee, this.options.tokenizer = this.options.tokenizer || new Se(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
1865
- let r = { other: q, block: ye.normal, inline: le.normal };
1866
- this.options.pedantic ? (r.block = ye.pedantic, r.inline = le.pedantic) : this.options.gfm && (r.block = ye.gfm, this.options.breaks ? r.inline = le.breaks : r.inline = le.gfm), this.tokenizer.rules = r;
2089
+ V(this, "tokens");
2090
+ V(this, "options");
2091
+ V(this, "state");
2092
+ V(this, "inlineQueue");
2093
+ V(this, "tokenizer");
2094
+ this.tokens = [], this.tokens.links = /* @__PURE__ */ Object.create(null), this.options = t || ee, this.options.tokenizer = this.options.tokenizer || new ze(), this.tokenizer = this.options.tokenizer, this.tokenizer.options = this.options, this.tokenizer.lexer = this, this.inlineQueue = [], this.state = { inLink: !1, inRawBlock: !1, top: !0 };
2095
+ let r = { other: q, block: ye.normal, inline: ce.normal };
2096
+ this.options.pedantic ? (r.block = ye.pedantic, r.inline = ce.pedantic) : this.options.gfm && (r.block = ye.gfm, this.options.breaks ? r.inline = ce.breaks : r.inline = ce.gfm), this.tokenizer.rules = r;
1867
2097
  }
1868
2098
  static get rules() {
1869
- return { block: ye, inline: le };
2099
+ return { block: ye, inline: ce };
1870
2100
  }
1871
2101
  static lex(t, r) {
1872
- return new He(r).lex(t);
2102
+ return new Ie(r).lex(t);
1873
2103
  }
1874
2104
  static lexInline(t, r) {
1875
- return new He(r).inlineTokens(t);
2105
+ return new Ie(r).inlineTokens(t);
1876
2106
  }
1877
2107
  lex(t) {
1878
2108
  t = t.replace(q.carriageReturn, `
@@ -1887,21 +2117,21 @@ ${d}` : d;
1887
2117
  var s, n, o;
1888
2118
  for (this.options.pedantic && (t = t.replace(q.tabCharGlobal, " ").replace(q.spaceLine, "")); t; ) {
1889
2119
  let i;
1890
- if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((c) => (i = c.call({ lexer: this }, t, r)) ? (t = t.substring(i.raw.length), r.push(i), !0) : !1)) continue;
2120
+ if ((n = (s = this.options.extensions) == null ? void 0 : s.block) != null && n.some((l) => (i = l.call({ lexer: this }, t, r)) ? (t = t.substring(i.raw.length), r.push(i), !0) : !1)) continue;
1891
2121
  if (i = this.tokenizer.space(t)) {
1892
2122
  t = t.substring(i.raw.length);
1893
- let c = r.at(-1);
1894
- i.raw.length === 1 && c !== void 0 ? c.raw += `
2123
+ let l = r.at(-1);
2124
+ i.raw.length === 1 && l !== void 0 ? l.raw += `
1895
2125
  ` : r.push(i);
1896
2126
  continue;
1897
2127
  }
1898
2128
  if (i = this.tokenizer.code(t)) {
1899
2129
  t = t.substring(i.raw.length);
1900
- let c = r.at(-1);
1901
- (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += (c.raw.endsWith(`
2130
+ let l = r.at(-1);
2131
+ (l == null ? void 0 : l.type) === "paragraph" || (l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
1902
2132
  `) ? "" : `
1903
- `) + i.raw, c.text += `
1904
- ` + i.text, this.inlineQueue.at(-1).src = c.text) : r.push(i);
2133
+ `) + i.raw, l.text += `
2134
+ ` + i.text, this.inlineQueue.at(-1).src = l.text) : r.push(i);
1905
2135
  continue;
1906
2136
  }
1907
2137
  if (i = this.tokenizer.fences(t)) {
@@ -1930,11 +2160,11 @@ ${d}` : d;
1930
2160
  }
1931
2161
  if (i = this.tokenizer.def(t)) {
1932
2162
  t = t.substring(i.raw.length);
1933
- let c = r.at(-1);
1934
- (c == null ? void 0 : c.type) === "paragraph" || (c == null ? void 0 : c.type) === "text" ? (c.raw += (c.raw.endsWith(`
2163
+ let l = r.at(-1);
2164
+ (l == null ? void 0 : l.type) === "paragraph" || (l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
1935
2165
  `) ? "" : `
1936
- `) + i.raw, c.text += `
1937
- ` + i.raw, this.inlineQueue.at(-1).src = c.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { href: i.href, title: i.title }, r.push(i));
2166
+ `) + i.raw, l.text += `
2167
+ ` + i.raw, this.inlineQueue.at(-1).src = l.text) : this.tokens.links[i.tag] || (this.tokens.links[i.tag] = { href: i.href, title: i.title }, r.push(i));
1938
2168
  continue;
1939
2169
  }
1940
2170
  if (i = this.tokenizer.table(t)) {
@@ -1947,34 +2177,34 @@ ${d}` : d;
1947
2177
  }
1948
2178
  let u = t;
1949
2179
  if ((o = this.options.extensions) != null && o.startBlock) {
1950
- let c = 1 / 0, d = t.slice(1), p;
2180
+ let l = 1 / 0, d = t.slice(1), p;
1951
2181
  this.options.extensions.startBlock.forEach((w) => {
1952
- p = w.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (c = Math.min(c, p));
1953
- }), c < 1 / 0 && c >= 0 && (u = t.substring(0, c + 1));
2182
+ p = w.call({ lexer: this }, d), typeof p == "number" && p >= 0 && (l = Math.min(l, p));
2183
+ }), l < 1 / 0 && l >= 0 && (u = t.substring(0, l + 1));
1954
2184
  }
1955
2185
  if (this.state.top && (i = this.tokenizer.paragraph(u))) {
1956
- let c = r.at(-1);
1957
- a && (c == null ? void 0 : c.type) === "paragraph" ? (c.raw += (c.raw.endsWith(`
2186
+ let l = r.at(-1);
2187
+ a && (l == null ? void 0 : l.type) === "paragraph" ? (l.raw += (l.raw.endsWith(`
1958
2188
  `) ? "" : `
1959
- `) + i.raw, c.text += `
1960
- ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : r.push(i), a = u.length !== t.length, t = t.substring(i.raw.length);
2189
+ `) + i.raw, l.text += `
2190
+ ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(i), a = u.length !== t.length, t = t.substring(i.raw.length);
1961
2191
  continue;
1962
2192
  }
1963
2193
  if (i = this.tokenizer.text(t)) {
1964
2194
  t = t.substring(i.raw.length);
1965
- let c = r.at(-1);
1966
- (c == null ? void 0 : c.type) === "text" ? (c.raw += (c.raw.endsWith(`
2195
+ let l = r.at(-1);
2196
+ (l == null ? void 0 : l.type) === "text" ? (l.raw += (l.raw.endsWith(`
1967
2197
  `) ? "" : `
1968
- `) + i.raw, c.text += `
1969
- ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = c.text) : r.push(i);
2198
+ `) + i.raw, l.text += `
2199
+ ` + i.text, this.inlineQueue.pop(), this.inlineQueue.at(-1).src = l.text) : r.push(i);
1970
2200
  continue;
1971
2201
  }
1972
2202
  if (t) {
1973
- let c = "Infinite loop on byte: " + t.charCodeAt(0);
2203
+ let l = "Infinite loop on byte: " + t.charCodeAt(0);
1974
2204
  if (this.options.silent) {
1975
- console.error(c);
2205
+ console.error(l);
1976
2206
  break;
1977
- } else throw new Error(c);
2207
+ } else throw new Error(l);
1978
2208
  }
1979
2209
  }
1980
2210
  return this.state.top = !0, r;
@@ -1983,61 +2213,61 @@ ${d}` : d;
1983
2213
  return this.inlineQueue.push({ src: t, tokens: r }), r;
1984
2214
  }
1985
2215
  inlineTokens(t, r = []) {
1986
- var u, c, d, p, w;
2216
+ var u, l, d, p, w;
1987
2217
  let a = t, s = null;
1988
2218
  if (this.tokens.links) {
1989
- let l = Object.keys(this.tokens.links);
1990
- if (l.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; ) l.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
2219
+ let c = Object.keys(this.tokens.links);
2220
+ if (c.length > 0) for (; (s = this.tokenizer.rules.inline.reflinkSearch.exec(a)) != null; ) c.includes(s[0].slice(s[0].lastIndexOf("[") + 1, -1)) && (a = a.slice(0, s.index) + "[" + "a".repeat(s[0].length - 2) + "]" + a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex));
1991
2221
  }
1992
2222
  for (; (s = this.tokenizer.rules.inline.anyPunctuation.exec(a)) != null; ) a = a.slice(0, s.index) + "++" + a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
1993
2223
  let n;
1994
2224
  for (; (s = this.tokenizer.rules.inline.blockSkip.exec(a)) != null; ) n = s[2] ? s[2].length : 0, a = a.slice(0, s.index + n) + "[" + "a".repeat(s[0].length - n - 2) + "]" + a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
1995
- a = ((c = (u = this.options.hooks) == null ? void 0 : u.emStrongMask) == null ? void 0 : c.call({ lexer: this }, a)) ?? a;
2225
+ a = ((l = (u = this.options.hooks) == null ? void 0 : u.emStrongMask) == null ? void 0 : l.call({ lexer: this }, a)) ?? a;
1996
2226
  let o = !1, i = "";
1997
2227
  for (; t; ) {
1998
2228
  o || (i = ""), o = !1;
1999
- let l;
2000
- if ((p = (d = this.options.extensions) == null ? void 0 : d.inline) != null && p.some((h) => (l = h.call({ lexer: this }, t, r)) ? (t = t.substring(l.raw.length), r.push(l), !0) : !1)) continue;
2001
- if (l = this.tokenizer.escape(t)) {
2002
- t = t.substring(l.raw.length), r.push(l);
2229
+ let c;
2230
+ if ((p = (d = this.options.extensions) == null ? void 0 : d.inline) != null && p.some((h) => (c = h.call({ lexer: this }, t, r)) ? (t = t.substring(c.raw.length), r.push(c), !0) : !1)) continue;
2231
+ if (c = this.tokenizer.escape(t)) {
2232
+ t = t.substring(c.raw.length), r.push(c);
2003
2233
  continue;
2004
2234
  }
2005
- if (l = this.tokenizer.tag(t)) {
2006
- t = t.substring(l.raw.length), r.push(l);
2235
+ if (c = this.tokenizer.tag(t)) {
2236
+ t = t.substring(c.raw.length), r.push(c);
2007
2237
  continue;
2008
2238
  }
2009
- if (l = this.tokenizer.link(t)) {
2010
- t = t.substring(l.raw.length), r.push(l);
2239
+ if (c = this.tokenizer.link(t)) {
2240
+ t = t.substring(c.raw.length), r.push(c);
2011
2241
  continue;
2012
2242
  }
2013
- if (l = this.tokenizer.reflink(t, this.tokens.links)) {
2014
- t = t.substring(l.raw.length);
2243
+ if (c = this.tokenizer.reflink(t, this.tokens.links)) {
2244
+ t = t.substring(c.raw.length);
2015
2245
  let h = r.at(-1);
2016
- l.type === "text" && (h == null ? void 0 : h.type) === "text" ? (h.raw += l.raw, h.text += l.text) : r.push(l);
2246
+ c.type === "text" && (h == null ? void 0 : h.type) === "text" ? (h.raw += c.raw, h.text += c.text) : r.push(c);
2017
2247
  continue;
2018
2248
  }
2019
- if (l = this.tokenizer.emStrong(t, a, i)) {
2020
- t = t.substring(l.raw.length), r.push(l);
2249
+ if (c = this.tokenizer.emStrong(t, a, i)) {
2250
+ t = t.substring(c.raw.length), r.push(c);
2021
2251
  continue;
2022
2252
  }
2023
- if (l = this.tokenizer.codespan(t)) {
2024
- t = t.substring(l.raw.length), r.push(l);
2253
+ if (c = this.tokenizer.codespan(t)) {
2254
+ t = t.substring(c.raw.length), r.push(c);
2025
2255
  continue;
2026
2256
  }
2027
- if (l = this.tokenizer.br(t)) {
2028
- t = t.substring(l.raw.length), r.push(l);
2257
+ if (c = this.tokenizer.br(t)) {
2258
+ t = t.substring(c.raw.length), r.push(c);
2029
2259
  continue;
2030
2260
  }
2031
- if (l = this.tokenizer.del(t)) {
2032
- t = t.substring(l.raw.length), r.push(l);
2261
+ if (c = this.tokenizer.del(t)) {
2262
+ t = t.substring(c.raw.length), r.push(c);
2033
2263
  continue;
2034
2264
  }
2035
- if (l = this.tokenizer.autolink(t)) {
2036
- t = t.substring(l.raw.length), r.push(l);
2265
+ if (c = this.tokenizer.autolink(t)) {
2266
+ t = t.substring(c.raw.length), r.push(c);
2037
2267
  continue;
2038
2268
  }
2039
- if (!this.state.inLink && (l = this.tokenizer.url(t))) {
2040
- t = t.substring(l.raw.length), r.push(l);
2269
+ if (!this.state.inLink && (c = this.tokenizer.url(t))) {
2270
+ t = t.substring(c.raw.length), r.push(c);
2041
2271
  continue;
2042
2272
  }
2043
2273
  let m = t;
@@ -2047,10 +2277,10 @@ ${d}` : d;
2047
2277
  f = b.call({ lexer: this }, g), typeof f == "number" && f >= 0 && (h = Math.min(h, f));
2048
2278
  }), h < 1 / 0 && h >= 0 && (m = t.substring(0, h + 1));
2049
2279
  }
2050
- if (l = this.tokenizer.inlineText(m)) {
2051
- t = t.substring(l.raw.length), l.raw.slice(-1) !== "_" && (i = l.raw.slice(-1)), o = !0;
2280
+ if (c = this.tokenizer.inlineText(m)) {
2281
+ t = t.substring(c.raw.length), c.raw.slice(-1) !== "_" && (i = c.raw.slice(-1)), o = !0;
2052
2282
  let h = r.at(-1);
2053
- (h == null ? void 0 : h.type) === "text" ? (h.raw += l.raw, h.text += l.text) : r.push(l);
2283
+ (h == null ? void 0 : h.type) === "text" ? (h.raw += c.raw, h.text += c.text) : r.push(c);
2054
2284
  continue;
2055
2285
  }
2056
2286
  if (t) {
@@ -2063,10 +2293,10 @@ ${d}` : d;
2063
2293
  }
2064
2294
  return r;
2065
2295
  }
2066
- }, Re = class {
2296
+ }, Ae = class {
2067
2297
  constructor(e) {
2068
- P(this, "options");
2069
- P(this, "parser");
2298
+ V(this, "options");
2299
+ V(this, "parser");
2070
2300
  this.options = e || ee;
2071
2301
  }
2072
2302
  space(e) {
@@ -2076,8 +2306,8 @@ ${d}` : d;
2076
2306
  var n;
2077
2307
  let a = (n = (t || "").match(q.notSpaceStart)) == null ? void 0 : n[0], s = e.replace(q.endingNewline, "") + `
2078
2308
  `;
2079
- return a ? '<pre><code class="language-' + G(a) + '">' + (r ? s : G(s, !0)) + `</code></pre>
2080
- ` : "<pre><code>" + (r ? s : G(s, !0)) + `</code></pre>
2309
+ return a ? '<pre><code class="language-' + W(a) + '">' + (r ? s : W(s, !0)) + `</code></pre>
2310
+ ` : "<pre><code>" + (r ? s : W(s, !0)) + `</code></pre>
2081
2311
  `;
2082
2312
  }
2083
2313
  blockquote({ tokens: e }) {
@@ -2155,7 +2385,7 @@ ${e}</tr>
2155
2385
  return `<em>${this.parser.parseInline(e)}</em>`;
2156
2386
  }
2157
2387
  codespan({ text: e }) {
2158
- return `<code>${G(e, !0)}</code>`;
2388
+ return `<code>${W(e, !0)}</code>`;
2159
2389
  }
2160
2390
  br(e) {
2161
2391
  return "<br>";
@@ -2168,18 +2398,18 @@ ${e}</tr>
2168
2398
  if (s === null) return a;
2169
2399
  e = s;
2170
2400
  let n = '<a href="' + e + '"';
2171
- return t && (n += ' title="' + G(t) + '"'), n += ">" + a + "</a>", n;
2401
+ return t && (n += ' title="' + W(t) + '"'), n += ">" + a + "</a>", n;
2172
2402
  }
2173
2403
  image({ href: e, title: t, text: r, tokens: a }) {
2174
2404
  a && (r = this.parser.parseInline(a, this.parser.textRenderer));
2175
2405
  let s = gt(e);
2176
- if (s === null) return G(r);
2406
+ if (s === null) return W(r);
2177
2407
  e = s;
2178
2408
  let n = `<img src="${e}" alt="${r}"`;
2179
- return t && (n += ` title="${G(t)}"`), n += ">", n;
2409
+ return t && (n += ` title="${W(t)}"`), n += ">", n;
2180
2410
  }
2181
2411
  text(e) {
2182
- return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : G(e.text);
2412
+ return "tokens" in e && e.tokens ? this.parser.parseInline(e.tokens) : "escaped" in e && e.escaped ? e.text : W(e.text);
2183
2413
  }
2184
2414
  }, st = class {
2185
2415
  strong({ text: e }) {
@@ -2212,18 +2442,18 @@ ${e}</tr>
2212
2442
  checkbox({ raw: e }) {
2213
2443
  return e;
2214
2444
  }
2215
- }, N = class qe {
2445
+ }, N = class De {
2216
2446
  constructor(t) {
2217
- P(this, "options");
2218
- P(this, "renderer");
2219
- P(this, "textRenderer");
2220
- this.options = t || ee, this.options.renderer = this.options.renderer || new Re(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new st();
2447
+ V(this, "options");
2448
+ V(this, "renderer");
2449
+ V(this, "textRenderer");
2450
+ this.options = t || ee, this.options.renderer = this.options.renderer || new Ae(), this.renderer = this.options.renderer, this.renderer.options = this.options, this.renderer.parser = this, this.textRenderer = new st();
2221
2451
  }
2222
2452
  static parse(t, r) {
2223
- return new qe(r).parse(t);
2453
+ return new De(r).parse(t);
2224
2454
  }
2225
2455
  static parseInline(t, r) {
2226
- return new qe(r).parseInline(t);
2456
+ return new De(r).parseInline(t);
2227
2457
  }
2228
2458
  parse(t) {
2229
2459
  var a, s;
@@ -2231,9 +2461,9 @@ ${e}</tr>
2231
2461
  for (let n = 0; n < t.length; n++) {
2232
2462
  let o = t[n];
2233
2463
  if ((s = (a = this.options.extensions) == null ? void 0 : a.renderers) != null && s[o.type]) {
2234
- let u = o, c = this.options.extensions.renderers[u.type].call({ parser: this }, u);
2235
- if (c !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(u.type)) {
2236
- r += c || "";
2464
+ let u = o, l = this.options.extensions.renderers[u.type].call({ parser: this }, u);
2465
+ if (l !== !1 || !["space", "hr", "heading", "code", "table", "blockquote", "list", "html", "def", "paragraph", "text"].includes(u.type)) {
2466
+ r += l || "";
2237
2467
  continue;
2238
2468
  }
2239
2469
  }
@@ -2302,9 +2532,9 @@ ${e}</tr>
2302
2532
  for (let o = 0; o < t.length; o++) {
2303
2533
  let i = t[o];
2304
2534
  if ((n = (s = this.options.extensions) == null ? void 0 : s.renderers) != null && n[i.type]) {
2305
- let c = this.options.extensions.renderers[i.type].call({ parser: this }, i);
2306
- if (c !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
2307
- a += c || "";
2535
+ let l = this.options.extensions.renderers[i.type].call({ parser: this }, i);
2536
+ if (l !== !1 || !["escape", "html", "link", "image", "strong", "em", "codespan", "br", "del", "text"].includes(i.type)) {
2537
+ a += l || "";
2308
2538
  continue;
2309
2539
  }
2310
2540
  }
@@ -2355,9 +2585,9 @@ ${e}</tr>
2355
2585
  break;
2356
2586
  }
2357
2587
  default: {
2358
- let c = 'Token with "' + u.type + '" type was not found.';
2359
- if (this.options.silent) return console.error(c), "";
2360
- throw new Error(c);
2588
+ let l = 'Token with "' + u.type + '" type was not found.';
2589
+ if (this.options.silent) return console.error(l), "";
2590
+ throw new Error(l);
2361
2591
  }
2362
2592
  }
2363
2593
  }
@@ -2365,8 +2595,8 @@ ${e}</tr>
2365
2595
  }
2366
2596
  }, xe, pe = (xe = class {
2367
2597
  constructor(e) {
2368
- P(this, "options");
2369
- P(this, "block");
2598
+ V(this, "options");
2599
+ V(this, "block");
2370
2600
  this.options = e || ee;
2371
2601
  }
2372
2602
  preprocess(e) {
@@ -2387,18 +2617,18 @@ ${e}</tr>
2387
2617
  provideParser() {
2388
2618
  return this.block ? N.parse : N.parseInline;
2389
2619
  }
2390
- }, P(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), P(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Ka = class {
2620
+ }, V(xe, "passThroughHooks", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens", "emStrongMask"])), V(xe, "passThroughHooksRespectAsync", /* @__PURE__ */ new Set(["preprocess", "postprocess", "processAllTokens"])), xe), Ka = class {
2391
2621
  constructor(...e) {
2392
- P(this, "defaults", Ke());
2393
- P(this, "options", this.setOptions);
2394
- P(this, "parse", this.parseMarkdown(!0));
2395
- P(this, "parseInline", this.parseMarkdown(!1));
2396
- P(this, "Parser", N);
2397
- P(this, "Renderer", Re);
2398
- P(this, "TextRenderer", st);
2399
- P(this, "Lexer", F);
2400
- P(this, "Tokenizer", Se);
2401
- P(this, "Hooks", pe);
2622
+ V(this, "defaults", Ke());
2623
+ V(this, "options", this.setOptions);
2624
+ V(this, "parse", this.parseMarkdown(!0));
2625
+ V(this, "parseInline", this.parseMarkdown(!1));
2626
+ V(this, "Parser", N);
2627
+ V(this, "Renderer", Ae);
2628
+ V(this, "TextRenderer", st);
2629
+ V(this, "Lexer", F);
2630
+ V(this, "Tokenizer", ze);
2631
+ V(this, "Hooks", pe);
2402
2632
  this.use(...e);
2403
2633
  }
2404
2634
  walkTokens(e, t) {
@@ -2446,27 +2676,27 @@ ${e}</tr>
2446
2676
  }
2447
2677
  "childTokens" in s && s.childTokens && (t.childTokens[s.name] = s.childTokens);
2448
2678
  }), a.extensions = t), r.renderer) {
2449
- let s = this.defaults.renderer || new Re(this.defaults);
2679
+ let s = this.defaults.renderer || new Ae(this.defaults);
2450
2680
  for (let n in r.renderer) {
2451
2681
  if (!(n in s)) throw new Error(`renderer '${n}' does not exist`);
2452
2682
  if (["options", "parser"].includes(n)) continue;
2453
2683
  let o = n, i = r.renderer[o], u = s[o];
2454
- s[o] = (...c) => {
2455
- let d = i.apply(s, c);
2456
- return d === !1 && (d = u.apply(s, c)), d || "";
2684
+ s[o] = (...l) => {
2685
+ let d = i.apply(s, l);
2686
+ return d === !1 && (d = u.apply(s, l)), d || "";
2457
2687
  };
2458
2688
  }
2459
2689
  a.renderer = s;
2460
2690
  }
2461
2691
  if (r.tokenizer) {
2462
- let s = this.defaults.tokenizer || new Se(this.defaults);
2692
+ let s = this.defaults.tokenizer || new ze(this.defaults);
2463
2693
  for (let n in r.tokenizer) {
2464
2694
  if (!(n in s)) throw new Error(`tokenizer '${n}' does not exist`);
2465
2695
  if (["options", "rules", "lexer"].includes(n)) continue;
2466
2696
  let o = n, i = r.tokenizer[o], u = s[o];
2467
- s[o] = (...c) => {
2468
- let d = i.apply(s, c);
2469
- return d === !1 && (d = u.apply(s, c)), d;
2697
+ s[o] = (...l) => {
2698
+ let d = i.apply(s, l);
2699
+ return d === !1 && (d = u.apply(s, l)), d;
2470
2700
  };
2471
2701
  }
2472
2702
  a.tokenizer = s;
@@ -2477,20 +2707,20 @@ ${e}</tr>
2477
2707
  if (!(n in s)) throw new Error(`hook '${n}' does not exist`);
2478
2708
  if (["options", "block"].includes(n)) continue;
2479
2709
  let o = n, i = r.hooks[o], u = s[o];
2480
- pe.passThroughHooks.has(n) ? s[o] = (c) => {
2710
+ pe.passThroughHooks.has(n) ? s[o] = (l) => {
2481
2711
  if (this.defaults.async && pe.passThroughHooksRespectAsync.has(n)) return (async () => {
2482
- let p = await i.call(s, c);
2712
+ let p = await i.call(s, l);
2483
2713
  return u.call(s, p);
2484
2714
  })();
2485
- let d = i.call(s, c);
2715
+ let d = i.call(s, l);
2486
2716
  return u.call(s, d);
2487
- } : s[o] = (...c) => {
2717
+ } : s[o] = (...l) => {
2488
2718
  if (this.defaults.async) return (async () => {
2489
- let p = await i.apply(s, c);
2490
- return p === !1 && (p = await u.apply(s, c)), p;
2719
+ let p = await i.apply(s, l);
2720
+ return p === !1 && (p = await u.apply(s, l)), p;
2491
2721
  })();
2492
- let d = i.apply(s, c);
2493
- return d === !1 && (d = u.apply(s, c)), d;
2722
+ let d = i.apply(s, l);
2723
+ return d === !1 && (d = u.apply(s, l)), d;
2494
2724
  };
2495
2725
  }
2496
2726
  a.hooks = s;
@@ -2523,8 +2753,8 @@ ${e}</tr>
2523
2753
  if (s.hooks && (s.hooks.options = s, s.hooks.block = e), s.async) return (async () => {
2524
2754
  let o = s.hooks ? await s.hooks.preprocess(t) : t, i = await (s.hooks ? await s.hooks.provideLexer() : e ? F.lex : F.lexInline)(o, s), u = s.hooks ? await s.hooks.processAllTokens(i) : i;
2525
2755
  s.walkTokens && await Promise.all(this.walkTokens(u, s.walkTokens));
2526
- let c = await (s.hooks ? await s.hooks.provideParser() : e ? N.parse : N.parseInline)(u, s);
2527
- return s.hooks ? await s.hooks.postprocess(c) : c;
2756
+ let l = await (s.hooks ? await s.hooks.provideParser() : e ? N.parse : N.parseInline)(u, s);
2757
+ return s.hooks ? await s.hooks.postprocess(l) : l;
2528
2758
  })().catch(n);
2529
2759
  try {
2530
2760
  s.hooks && (t = s.hooks.preprocess(t));
@@ -2541,7 +2771,7 @@ ${e}</tr>
2541
2771
  return (r) => {
2542
2772
  if (r.message += `
2543
2773
  Please report this to https://github.com/markedjs/marked.`, e) {
2544
- let a = "<p>An error occurred:</p><pre>" + G(r.message + "", !0) + "</pre>";
2774
+ let a = "<p>An error occurred:</p><pre>" + W(r.message + "", !0) + "</pre>";
2545
2775
  return t ? Promise.resolve(a) : a;
2546
2776
  }
2547
2777
  if (t) return Promise.reject(r);
@@ -2549,35 +2779,35 @@ Please report this to https://github.com/markedjs/marked.`, e) {
2549
2779
  };
2550
2780
  }
2551
2781
  }, Q = new Ka();
2552
- function E(e, t) {
2782
+ function H(e, t) {
2553
2783
  return Q.parse(e, t);
2554
2784
  }
2555
- E.options = E.setOptions = function(e) {
2556
- return Q.setOptions(e), E.defaults = Q.defaults, mr(E.defaults), E;
2785
+ H.options = H.setOptions = function(e) {
2786
+ return Q.setOptions(e), H.defaults = Q.defaults, mr(H.defaults), H;
2557
2787
  };
2558
- E.getDefaults = Ke;
2559
- E.defaults = ee;
2560
- E.use = function(...e) {
2561
- return Q.use(...e), E.defaults = Q.defaults, mr(E.defaults), E;
2788
+ H.getDefaults = Ke;
2789
+ H.defaults = ee;
2790
+ H.use = function(...e) {
2791
+ return Q.use(...e), H.defaults = Q.defaults, mr(H.defaults), H;
2562
2792
  };
2563
- E.walkTokens = function(e, t) {
2793
+ H.walkTokens = function(e, t) {
2564
2794
  return Q.walkTokens(e, t);
2565
2795
  };
2566
- E.parseInline = Q.parseInline;
2567
- E.Parser = N;
2568
- E.parser = N.parse;
2569
- E.Renderer = Re;
2570
- E.TextRenderer = st;
2571
- E.Lexer = F;
2572
- E.lexer = F.lex;
2573
- E.Tokenizer = Se;
2574
- E.Hooks = pe;
2575
- E.parse = E;
2576
- E.options;
2577
- E.setOptions;
2578
- E.use;
2579
- E.walkTokens;
2580
- E.parseInline;
2796
+ H.parseInline = Q.parseInline;
2797
+ H.Parser = N;
2798
+ H.parser = N.parse;
2799
+ H.Renderer = Ae;
2800
+ H.TextRenderer = st;
2801
+ H.Lexer = F;
2802
+ H.lexer = F.lex;
2803
+ H.Tokenizer = ze;
2804
+ H.Hooks = pe;
2805
+ H.parse = H;
2806
+ H.options;
2807
+ H.setOptions;
2808
+ H.use;
2809
+ H.walkTokens;
2810
+ H.parseInline;
2581
2811
  N.parse;
2582
2812
  F.lex;
2583
2813
  const Ja = ["jpg", "jpeg", "png", "gif", "webp", "svg", "bmp", "ico", "avif"];
@@ -2602,18 +2832,18 @@ function Qa(e) {
2602
2832
  );
2603
2833
  e = e.replace(a, (n, o, i) => {
2604
2834
  const u = i && !i.match(/^(view|see|open|click|image|photo|picture)$/i) ? i : "";
2605
- return Ze(o, u, u);
2835
+ return qe(o, u, u);
2606
2836
  });
2607
2837
  const s = new RegExp(
2608
2838
  `(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(?:${r})(\\?[^\\s<>"]*)?)(?!["'])`,
2609
2839
  "gi"
2610
2840
  );
2611
- e = e.replace(s, (n, o) => Ze(o, "", ""));
2841
+ e = e.replace(s, (n, o) => qe(o, "", ""));
2612
2842
  for (let n = t.length - 1; n >= 0; n--)
2613
2843
  e = e.replace(`__IMG_PROTECTED_${n}__`, t[n]);
2614
2844
  return e;
2615
2845
  }
2616
- function Ze(e, t, r) {
2846
+ function qe(e, t, r) {
2617
2847
  const a = t || r || "";
2618
2848
  let s = "artifactuse-image";
2619
2849
  e.includes("large2x") || e.includes("large") || r != null && r.toLowerCase().includes("hero") ? s = "artifactuse-hero-image" : e.includes("small") || e.includes("tiny") ? s = "artifactuse-inline-image" : (r != null && r.toLowerCase().includes("aerial") || r != null && r.toLowerCase().includes("view")) && (s = "artifactuse-hero-image");
@@ -2628,11 +2858,11 @@ function Ya(e) {
2628
2858
  const o = t[n].trim();
2629
2859
  if (o.includes('<div class="artifactuse-image-container">')) {
2630
2860
  s || (s = !0, a = []);
2631
- let i = "", u = n, c = 0;
2861
+ let i = "", u = n, l = 0;
2632
2862
  for (; u < t.length; ) {
2633
2863
  const d = t[u];
2634
2864
  if (i += d + `
2635
- `, c += (d.match(/<div/g) || []).length, c -= (d.match(/<\/div>/g) || []).length, c === 0) break;
2865
+ `, l += (d.match(/<div/g) || []).length, l -= (d.match(/<\/div>/g) || []).length, l === 0) break;
2636
2866
  u++;
2637
2867
  }
2638
2868
  a.push(i.trim()), n = u;
@@ -2660,10 +2890,10 @@ ${e.map((r) => r.replace("artifactuse-image-container", "artifactuse-gallery-ite
2660
2890
  `)}
2661
2891
  </div>`;
2662
2892
  }
2663
- const zr = ["mp4", "webm", "mov", "avi", "mkv", "flv", "wmv", "m4v"];
2893
+ const Sr = ["mp4", "webm", "mov", "avi", "mkv", "flv", "wmv", "m4v"];
2664
2894
  function es(e) {
2665
2895
  if (!e) return !1;
2666
- const t = zr.join("|");
2896
+ const t = Sr.join("|");
2667
2897
  return !!(new RegExp(`\\.(${t})(\\?.*)?$`, "i").test(e) || /(?:youtube\.com\/watch\?v=|youtu\.be\/)[a-zA-Z0-9_-]+/.test(e) || /vimeo\.com\/\d+/.test(e) || /loom\.com\/share\/[a-zA-Z0-9]+/.test(e) || /dailymotion\.com\/video\/[a-zA-Z0-9]+/.test(e));
2668
2898
  }
2669
2899
  function ts(e) {
@@ -2673,7 +2903,7 @@ function ts(e) {
2673
2903
  if (t = e.match(/vimeo\.com\/(\d+)/), t) return { type: "vimeo", id: t[1] };
2674
2904
  if (t = e.match(/loom\.com\/share\/([a-zA-Z0-9]+)/), t) return { type: "loom", id: t[1] };
2675
2905
  if (t = e.match(/dailymotion\.com\/video\/([a-zA-Z0-9]+)/), t) return { type: "dailymotion", id: t[1] };
2676
- const r = zr.join("|");
2906
+ const r = Sr.join("|");
2677
2907
  return new RegExp(`\\.(${r})(\\?.*)?$`, "i").test(e) ? { type: "direct", id: e } : null;
2678
2908
  }
2679
2909
  function rs(e) {
@@ -2683,53 +2913,53 @@ function rs(e) {
2683
2913
  case "youtube":
2684
2914
  return Oe(t.id);
2685
2915
  case "vimeo":
2686
- return Ve(t.id);
2916
+ return Be(t.id);
2687
2917
  case "loom":
2688
2918
  return Fe(t.id);
2689
2919
  case "dailymotion":
2690
2920
  return Ne(t.id);
2691
2921
  case "direct":
2692
- return Be(t.id);
2922
+ return Ze(t.id);
2693
2923
  default:
2694
2924
  return `<a href="${e}" target="_blank" rel="noopener noreferrer">${e}</a>`;
2695
2925
  }
2696
2926
  }
2697
2927
  function as(e) {
2698
2928
  const t = [];
2699
- e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (l) => {
2929
+ e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (c) => {
2700
2930
  const m = `__PROTECTED_${t.length}__`;
2701
- return t.push(l), m;
2702
- }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (l) => {
2931
+ return t.push(c), m;
2932
+ }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (c) => {
2703
2933
  const m = `__PROTECTED_${t.length}__`;
2704
- return t.push(l), m;
2705
- }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (l) => {
2934
+ return t.push(c), m;
2935
+ }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (c) => {
2706
2936
  const m = `__PROTECTED_${t.length}__`;
2707
- return t.push(l), m;
2937
+ return t.push(c), m;
2708
2938
  });
2709
2939
  const r = /\[([^\]]+)\]\((https:\/\/www\.pexels\.com\/video\/[^)]+)\)\s*(?:<\/p>)?\s*(?:<p>)?\s*(?:Preview image:\s*)?!\[([^\]]*)\]\((https:\/\/images\.pexels\.com\/videos\/[^)]+)\)/gi;
2710
- e = e.replace(r, (l, m, h, g, f) => ns(m, h, f, g));
2940
+ e = e.replace(r, (c, m, h, g, f) => ns(m, h, f, g));
2711
2941
  const a = /<a[^>]*href="(https?:\/\/[^"]+\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2712
- e = e.replace(a, (l, m) => Be(m));
2942
+ e = e.replace(a, (c, m) => Ze(m));
2713
2943
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp4|webm|mov|avi|mkv|flv|wmv|m4v)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2714
- e = e.replace(s, (l, m) => Be(m));
2944
+ e = e.replace(s, (c, m) => Ze(m));
2715
2945
  const n = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2716
- e = e.replace(n, (l, m, h) => Oe(h));
2946
+ e = e.replace(n, (c, m, h) => Oe(h));
2717
2947
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:youtube\\.com\\/watch\\?v=|youtu\\.be\\/)([a-zA-Z0-9_-]+))(?!["'])`, "gi");
2718
- e = e.replace(o, (l, m, h) => Oe(h));
2948
+ e = e.replace(o, (c, m, h) => Oe(h));
2719
2949
  const i = /<a[^>]*href="(https?:\/\/(?:www\.)?vimeo\.com\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2720
- e = e.replace(i, (l, m, h) => Ve(h));
2950
+ e = e.replace(i, (c, m, h) => Be(h));
2721
2951
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?vimeo\\.com\\/(\\d+))(?!["'])`, "gi");
2722
- e = e.replace(u, (l, m, h) => Ve(h));
2723
- const c = /<a[^>]*href="(https?:\/\/(?:www\.)?loom\.com\/share\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2724
- e = e.replace(c, (l, m, h) => Fe(h));
2952
+ e = e.replace(u, (c, m, h) => Be(h));
2953
+ const l = /<a[^>]*href="(https?:\/\/(?:www\.)?loom\.com\/share\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2954
+ e = e.replace(l, (c, m, h) => Fe(h));
2725
2955
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?loom\\.com\\/share\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2726
- e = e.replace(d, (l, m, h) => Fe(h));
2956
+ e = e.replace(d, (c, m, h) => Fe(h));
2727
2957
  const p = /<a[^>]*href="(https?:\/\/(?:www\.)?dailymotion\.com\/video\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2728
- e = e.replace(p, (l, m, h) => Ne(h));
2958
+ e = e.replace(p, (c, m, h) => Ne(h));
2729
2959
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?dailymotion\\.com\\/video\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2730
- e = e.replace(w, (l, m, h) => Ne(h));
2731
- for (let l = t.length - 1; l >= 0; l--)
2732
- e = e.replace(`__PROTECTED_${l}__`, t[l]);
2960
+ e = e.replace(w, (c, m, h) => Ne(h));
2961
+ for (let c = t.length - 1; c >= 0; c--)
2962
+ e = e.replace(`__PROTECTED_${c}__`, t[c]);
2733
2963
  return e;
2734
2964
  }
2735
2965
  function ss(e) {
@@ -2745,7 +2975,7 @@ function ss(e) {
2745
2975
  wmv: "video/x-ms-wmv"
2746
2976
  }[t] || "video/mp4";
2747
2977
  }
2748
- function Be(e) {
2978
+ function Ze(e) {
2749
2979
  const t = ss(e);
2750
2980
  return `<div class="artifactuse-video-wrapper"><video controls preload="metadata" class="artifactuse-video"><source src="${e}" type="${t}">Your browser does not support the video tag.</video></div>`;
2751
2981
  }
@@ -2756,7 +2986,7 @@ function Oe(e) {
2756
2986
  const t = `https://i.ytimg.com/vi/${e}/hqdefault.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${`https://www.youtube.com/embed/${e}?autoplay=1`}\\' frameborder=\\'0\\' allow=\\'accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2757
2987
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="youtube" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play YouTube video" onclick="${a}"><img src="${t}" alt="YouTube video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" /><div class="artifactuse-video-play-button artifactuse-youtube-play"><svg viewBox="0 0 68 48" width="68" height="48"><path class="artifactuse-youtube-play-bg" d="M66.52,7.74c-0.78-2.93-2.49-5.41-5.42-6.19C55.79,.13,34,0,34,0S12.21,.13,6.9,1.55 C3.97,2.33,2.27,4.81,1.48,7.74C0.06,13.05,0,24,0,24s0.06,10.95,1.48,16.26c0.78,2.93,2.49,5.41,5.42,6.19 C12.21,47.87,34,48,34,48s21.79-0.13,27.1-1.55c2.93-0.78,4.64-3.26,5.42-6.19C67.94,34.95,68,24,68,24S67.94,13.05,66.52,7.74z" fill="#f00"/><path d="M 45,24 27,14 27,34" fill="#fff"/></svg></div></button></div>`;
2758
2988
  }
2759
- function Ve(e) {
2989
+ function Be(e) {
2760
2990
  const t = `https://player.vimeo.com/video/${e}?autoplay=1`, r = `https://vumbnail.com/${e}.jpg`, a = `this.parentElement.innerHTML='<iframe src=\\'${t}\\' frameborder=\\'0\\' allow=\\'autoplay; fullscreen; picture-in-picture\\' allowfullscreen class=\\'artifactuse-video-iframe\\'></iframe>'`;
2761
2991
  return `<div class="artifactuse-video-wrapper artifactuse-video-lazy" data-video-type="vimeo" data-video-id="${e}"><button type="button" class="artifactuse-video-facade" aria-label="Play Vimeo video" onclick="${a}"><img src="${r}" alt="Vimeo video thumbnail" class="artifactuse-video-thumbnail" loading="lazy" onerror="this.style.display='none'" /><div class="artifactuse-video-play-button artifactuse-vimeo-play"><svg viewBox="0 0 64 64" width="64" height="64"><circle cx="32" cy="32" r="31" fill="#1ab7ea"/><path d="M26 20 L26 44 L46 32 Z" fill="#fff"/></svg></div></button></div>`;
2762
2992
  }
@@ -2791,11 +3021,11 @@ function os(e) {
2791
3021
  let a;
2792
3022
  for (; (a = t.exec(e)) !== null; ) {
2793
3023
  const u = a.index;
2794
- let c = 0, d = u;
3024
+ let l = 0, d = u;
2795
3025
  for (let p = u; p < e.length; p++)
2796
3026
  if (e.substring(p, p + 4) === "<div")
2797
- c++;
2798
- else if (e.substring(p, p + 6) === "</div>" && (c--, c === 0)) {
3027
+ l++;
3028
+ else if (e.substring(p, p + 6) === "</div>" && (l--, l === 0)) {
2799
3029
  d = p + 6;
2800
3030
  break;
2801
3031
  }
@@ -2813,33 +3043,33 @@ function os(e) {
2813
3043
  caption: Pe(e.substring(0, r[0].start))
2814
3044
  }];
2815
3045
  for (let u = 1; u < r.length; u++) {
2816
- const c = r[u - 1], d = r[u], p = e.substring(c.end, d.start);
3046
+ const l = r[u - 1], d = r[u], p = e.substring(l.end, d.start);
2817
3047
  is(p) ? n.push({
2818
3048
  ...d,
2819
3049
  caption: Pe(p)
2820
3050
  }) : (s.push([...n]), n = [{
2821
3051
  ...d,
2822
- caption: Pe(e.substring(c.end, d.start))
3052
+ caption: Pe(e.substring(l.end, d.start))
2823
3053
  }]);
2824
3054
  }
2825
3055
  s.push(n);
2826
3056
  let o = "", i = 0;
2827
3057
  for (const u of s) {
2828
3058
  if (u.length === 0) continue;
2829
- const c = u[0];
2830
- let d = c.start;
2831
- const w = e.substring(i, c.start).match(/<p>((?:[^<]|<(?!\/p>))*?)(?:<br\s*\/?>)?\s*<\/p>\s*$/);
2832
- if (w && (d = c.start - w[0].length, u[0].caption = w[1].trim()), o += e.substring(i, d), u.length >= 2)
2833
- o += cs(u);
3059
+ const l = u[0];
3060
+ let d = l.start;
3061
+ const w = e.substring(i, l.start).match(/<p>((?:[^<]|<(?!\/p>))*?)(?:<br\s*\/?>)?\s*<\/p>\s*$/);
3062
+ if (w && (d = l.start - w[0].length, u[0].caption = w[1].trim()), o += e.substring(i, d), u.length >= 2)
3063
+ o += ls(u);
2834
3064
  else {
2835
- const l = u[0];
2836
- l.caption ? o += `<div class="artifactuse-video-container">${l.html}<div class="artifactuse-video-caption">${l.caption}</div></div>` : o += l.html;
3065
+ const c = u[0];
3066
+ c.caption ? o += `<div class="artifactuse-video-container">${c.html}<div class="artifactuse-video-caption">${c.caption}</div></div>` : o += c.html;
2837
3067
  }
2838
3068
  i = u[u.length - 1].end;
2839
3069
  }
2840
3070
  return o += e.substring(i), o = o.replace(/<p>\s*<\/p>/g, ""), o;
2841
3071
  }
2842
- function cs(e) {
3072
+ function ls(e) {
2843
3073
  return `<div class="artifactuse-video-gallery">
2844
3074
  ${e.map(({ html: r, caption: a }) => {
2845
3075
  let s = r.replace(
@@ -2854,59 +3084,59 @@ ${e.map(({ html: r, caption: a }) => {
2854
3084
  `)}
2855
3085
  </div>`;
2856
3086
  }
2857
- function ls() {
3087
+ function cs() {
2858
3088
  return `audio-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
2859
3089
  }
2860
3090
  function us(e, t = {}) {
2861
3091
  const r = t.theme || "dark", a = [];
2862
- e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, ($) => {
2863
- const R = `__PROTECTED_${a.length}__`;
2864
- return a.push($), R;
2865
- }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, ($) => {
2866
- const R = `__PROTECTED_${a.length}__`;
2867
- return a.push($), R;
2868
- }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, ($) => {
2869
- const R = `__PROTECTED_${a.length}__`;
2870
- return a.push($), R;
3092
+ e = e.replace(/<pre[^>]*>[\s\S]*?<\/pre>/gi, (z) => {
3093
+ const S = `__PROTECTED_${a.length}__`;
3094
+ return a.push(z), S;
3095
+ }), e = e.replace(/<code[^>]*>[\s\S]*?<\/code>/gi, (z) => {
3096
+ const S = `__PROTECTED_${a.length}__`;
3097
+ return a.push(z), S;
3098
+ }), e = e.replace(/<(video|audio|iframe)[^>]*>[\s\S]*?<\/\1>/gi, (z) => {
3099
+ const S = `__PROTECTED_${a.length}__`;
3100
+ return a.push(z), S;
2871
3101
  });
2872
3102
  const s = /<a[^>]*href="(https?:\/\/[^"]+\.(mp3|wav|flac|aac|ogg|m4a|wma)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
2873
- e = e.replace(s, ($, R) => vt(R));
3103
+ e = e.replace(s, (z, S) => vt(S));
2874
3104
  const n = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(mp3|wav|flac|aac|ogg|m4a|wma)(\\?[^\\s<>"]*)?)(?!["'])`, "gi");
2875
- e = e.replace(n, ($, R) => vt(R));
3105
+ e = e.replace(n, (z, S) => vt(S));
2876
3106
  const o = /<a[^>]*href="(https?:\/\/(?:www\.)?soundcloud\.com\/[^"]+)"[^>]*>[^<]*<\/a>/gi;
2877
- e = e.replace(o, ($, R) => yt(R));
3107
+ e = e.replace(o, (z, S) => yt(S));
2878
3108
  const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?soundcloud\\.com\\/[^\\s<>"]+)(?!["'])`, "gi");
2879
- e = e.replace(i, ($, R) => yt(R));
3109
+ e = e.replace(i, (z, S) => yt(S));
2880
3110
  const u = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/track\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2881
- e = e.replace(u, ($, R, z) => V("track", z, r));
2882
- const c = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/track\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2883
- e = e.replace(c, ($, R, z) => V("track", z, r));
3111
+ e = e.replace(u, (z, S, y) => B("track", y, r));
3112
+ const l = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/track\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3113
+ e = e.replace(l, (z, S, y) => B("track", y, r));
2884
3114
  const d = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/album\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2885
- e = e.replace(d, ($, R, z) => V("album", z, r));
3115
+ e = e.replace(d, (z, S, y) => B("album", y, r));
2886
3116
  const p = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/album\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2887
- e = e.replace(p, ($, R, z) => V("album", z, r));
3117
+ e = e.replace(p, (z, S, y) => B("album", y, r));
2888
3118
  const w = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/playlist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2889
- e = e.replace(w, ($, R, z) => V("playlist", z, r));
2890
- const l = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/playlist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2891
- e = e.replace(l, ($, R, z) => V("playlist", z, r));
3119
+ e = e.replace(w, (z, S, y) => B("playlist", y, r));
3120
+ const c = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/playlist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3121
+ e = e.replace(c, (z, S, y) => B("playlist", y, r));
2892
3122
  const m = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/artist\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2893
- e = e.replace(m, ($, R, z) => V("artist", z, r));
3123
+ e = e.replace(m, (z, S, y) => B("artist", y, r));
2894
3124
  const h = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/artist\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2895
- e = e.replace(h, ($, R, z) => V("artist", z, r));
3125
+ e = e.replace(h, (z, S, y) => B("artist", y, r));
2896
3126
  const g = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/episode\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2897
- e = e.replace(g, ($, R, z) => V("episode", z, r));
3127
+ e = e.replace(g, (z, S, y) => B("episode", y, r));
2898
3128
  const f = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/episode\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2899
- e = e.replace(f, ($, R, z) => V("episode", z, r));
3129
+ e = e.replace(f, (z, S, y) => B("episode", y, r));
2900
3130
  const b = /<a[^>]*href="(https?:\/\/open\.spotify\.com\/show\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2901
- e = e.replace(b, ($, R, z) => V("show", z, r));
2902
- const y = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/show\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
2903
- e = e.replace(y, ($, R, z) => V("show", z, r));
2904
- const v = /<a[^>]*href="(https?:\/\/music\.apple\.com\/([a-z]{2})\/([a-z-]+)\/[^\/]+\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
2905
- e = e.replace(v, ($, R, z, Z, A) => kt(z, Z, A));
2906
- const k = new RegExp(`(?<!["'=])(https?:\\/\\/music\\.apple\\.com\\/([a-z]{2})\\/([a-z-]+)\\/[^\\/\\s]+\\/(\\d+))(?!["'])`, "gi");
2907
- e = e.replace(k, ($, R, z, Z, A) => kt(z, Z, A));
2908
- for (let $ = a.length - 1; $ >= 0; $--)
2909
- e = e.replace(`__PROTECTED_${$}__`, a[$]);
3131
+ e = e.replace(b, (z, S, y) => B("show", y, r));
3132
+ const v = new RegExp(`(?<!["'=])(https?:\\/\\/open\\.spotify\\.com\\/show\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3133
+ e = e.replace(v, (z, S, y) => B("show", y, r));
3134
+ const M = /<a[^>]*href="(https?:\/\/music\.apple\.com\/([a-z]{2})\/([a-z-]+)\/[^\/]+\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3135
+ e = e.replace(M, (z, S, y, C, x) => kt(y, C, x));
3136
+ const $ = new RegExp(`(?<!["'=])(https?:\\/\\/music\\.apple\\.com\\/([a-z]{2})\\/([a-z-]+)\\/[^\\/\\s]+\\/(\\d+))(?!["'])`, "gi");
3137
+ e = e.replace($, (z, S, y, C, x) => kt(y, C, x));
3138
+ for (let z = a.length - 1; z >= 0; z--)
3139
+ e = e.replace(`__PROTECTED_${z}__`, a[z]);
2910
3140
  return e;
2911
3141
  }
2912
3142
  function ds(e) {
@@ -2917,7 +3147,7 @@ function de(e) {
2917
3147
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2918
3148
  }
2919
3149
  function vt(e) {
2920
- const t = ls(), r = decodeURIComponent(e.split("/").pop().split("?")[0]), a = ds(e);
3150
+ const t = cs(), r = decodeURIComponent(e.split("/").pop().split("?")[0]), a = ds(e);
2921
3151
  return `
2922
3152
  <div class="artifactuse-audio-player" data-player-id="${t}" data-audio-src="${de(e)}">
2923
3153
  <!-- Hidden audio element -->
@@ -3020,7 +3250,7 @@ function yt(e) {
3020
3250
  </div>
3021
3251
  `;
3022
3252
  }
3023
- function V(e, t, r = "dark") {
3253
+ function B(e, t, r = "dark") {
3024
3254
  const s = {
3025
3255
  track: 152,
3026
3256
  album: 352,
@@ -3066,7 +3296,7 @@ function ps(e = document) {
3066
3296
  function fs(e) {
3067
3297
  const t = e.dataset.playerId, r = e.dataset.audioSrc;
3068
3298
  if (!t || !r) return;
3069
- const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), n = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), i = e.querySelector(".artifactuse-audio-current"), u = e.querySelector(".artifactuse-audio-duration"), c = e.querySelector(".artifactuse-audio-waveform"), d = e.querySelector(".artifactuse-audio-waveform-canvas"), p = e.querySelector(".artifactuse-audio-waveform-progress"), w = e.querySelector(".artifactuse-audio-waveform-hover"), l = e.querySelector(".artifactuse-audio-mute-btn"), m = e.querySelector(".artifactuse-audio-icon-volume"), h = e.querySelector(".artifactuse-audio-icon-muted"), g = e.querySelector(".artifactuse-audio-volume-slider"), f = e.querySelector(".artifactuse-audio-speed-btn");
3299
+ const a = e.querySelector(".artifactuse-audio-element"), s = e.querySelector(".artifactuse-audio-play-btn"), n = e.querySelector(".artifactuse-audio-icon-play"), o = e.querySelector(".artifactuse-audio-icon-pause"), i = e.querySelector(".artifactuse-audio-current"), u = e.querySelector(".artifactuse-audio-duration"), l = e.querySelector(".artifactuse-audio-waveform"), d = e.querySelector(".artifactuse-audio-waveform-canvas"), p = e.querySelector(".artifactuse-audio-waveform-progress"), w = e.querySelector(".artifactuse-audio-waveform-hover"), c = e.querySelector(".artifactuse-audio-mute-btn"), m = e.querySelector(".artifactuse-audio-icon-volume"), h = e.querySelector(".artifactuse-audio-icon-muted"), g = e.querySelector(".artifactuse-audio-volume-slider"), f = e.querySelector(".artifactuse-audio-speed-btn");
3070
3300
  if (!a) return;
3071
3301
  const b = {
3072
3302
  isPlaying: !1,
@@ -3078,55 +3308,55 @@ function fs(e) {
3078
3308
  waveformData: null
3079
3309
  };
3080
3310
  Y.set(t, { playerEl: e, audio: a, state: b }), hs(d, t), s == null || s.addEventListener("click", () => {
3081
- b.isPlaying ? Rt(t) : St(t);
3311
+ b.isPlaying ? At(t) : zt(t);
3082
3312
  }), a.addEventListener("loadedmetadata", () => {
3083
- b.duration = a.duration, u.textContent = At(a.duration);
3313
+ b.duration = a.duration, u.textContent = $t(a.duration);
3084
3314
  }), a.addEventListener("timeupdate", () => {
3085
- b.currentTime = a.currentTime, i.textContent = At(a.currentTime);
3086
- const y = a.currentTime / a.duration * 100;
3087
- p.style.width = `${y}%`;
3315
+ b.currentTime = a.currentTime, i.textContent = $t(a.currentTime);
3316
+ const v = a.currentTime / a.duration * 100;
3317
+ p.style.width = `${v}%`;
3088
3318
  }), a.addEventListener("ended", () => {
3089
3319
  b.isPlaying = !1, n.style.display = "", o.style.display = "none", e.classList.remove("is-playing"), p.style.width = "0%";
3090
3320
  }), a.addEventListener("play", () => {
3091
3321
  b.isPlaying = !0, n.style.display = "none", o.style.display = "", e.classList.add("is-playing"), gs(t);
3092
3322
  }), a.addEventListener("pause", () => {
3093
3323
  b.isPlaying = !1, n.style.display = "", o.style.display = "none", e.classList.remove("is-playing");
3094
- }), c == null || c.addEventListener("click", (y) => {
3095
- const v = c.getBoundingClientRect(), R = (y.clientX - v.left) / v.width * a.duration;
3096
- isNaN(R) || (a.currentTime = R);
3097
- }), c == null || c.addEventListener("mousemove", (y) => {
3098
- const v = c.getBoundingClientRect(), $ = (y.clientX - v.left) / v.width * 100;
3099
- w.style.width = `${$}%`;
3100
- }), c == null || c.addEventListener("mouseleave", () => {
3324
+ }), l == null || l.addEventListener("click", (v) => {
3325
+ const M = l.getBoundingClientRect(), S = (v.clientX - M.left) / M.width * a.duration;
3326
+ isNaN(S) || (a.currentTime = S);
3327
+ }), l == null || l.addEventListener("mousemove", (v) => {
3328
+ const M = l.getBoundingClientRect(), z = (v.clientX - M.left) / M.width * 100;
3329
+ w.style.width = `${z}%`;
3330
+ }), l == null || l.addEventListener("mouseleave", () => {
3101
3331
  w.style.width = "0%";
3102
- }), l == null || l.addEventListener("click", () => {
3332
+ }), c == null || c.addEventListener("click", () => {
3103
3333
  b.isMuted = !b.isMuted, a.muted = b.isMuted, m.style.display = b.isMuted ? "none" : "", h.style.display = b.isMuted ? "" : "none", b.isMuted ? g.value = 0 : g.value = b.volume * 100;
3104
- }), g == null || g.addEventListener("input", (y) => {
3105
- const v = parseInt(y.target.value, 10) / 100;
3106
- b.volume = v, a.volume = v, v === 0 ? (b.isMuted = !0, m.style.display = "none", h.style.display = "") : (b.isMuted = !1, a.muted = !1, m.style.display = "", h.style.display = "none");
3334
+ }), g == null || g.addEventListener("input", (v) => {
3335
+ const M = parseInt(v.target.value, 10) / 100;
3336
+ b.volume = M, a.volume = M, M === 0 ? (b.isMuted = !0, m.style.display = "none", h.style.display = "") : (b.isMuted = !1, a.muted = !1, m.style.display = "", h.style.display = "none");
3107
3337
  }), f == null || f.addEventListener("click", () => {
3108
- const v = (je.indexOf(b.playbackRate) + 1) % je.length;
3109
- b.playbackRate = je[v], a.playbackRate = b.playbackRate, f.querySelector("span").textContent = `${b.playbackRate}x`;
3110
- }), e.addEventListener("keydown", (y) => {
3111
- switch (y.key) {
3338
+ const M = (je.indexOf(b.playbackRate) + 1) % je.length;
3339
+ b.playbackRate = je[M], a.playbackRate = b.playbackRate, f.querySelector("span").textContent = `${b.playbackRate}x`;
3340
+ }), e.addEventListener("keydown", (v) => {
3341
+ switch (v.key) {
3112
3342
  case " ":
3113
3343
  case "k":
3114
- y.preventDefault(), b.isPlaying ? Rt(t) : St(t);
3344
+ v.preventDefault(), b.isPlaying ? At(t) : zt(t);
3115
3345
  break;
3116
3346
  case "ArrowLeft":
3117
- y.preventDefault(), a.currentTime = Math.max(0, a.currentTime - 5);
3347
+ v.preventDefault(), a.currentTime = Math.max(0, a.currentTime - 5);
3118
3348
  break;
3119
3349
  case "ArrowRight":
3120
- y.preventDefault(), a.currentTime = Math.min(a.duration, a.currentTime + 5);
3350
+ v.preventDefault(), a.currentTime = Math.min(a.duration, a.currentTime + 5);
3121
3351
  break;
3122
3352
  case "ArrowUp":
3123
- y.preventDefault(), b.volume = Math.min(1, b.volume + 0.1), a.volume = b.volume, g.value = b.volume * 100;
3353
+ v.preventDefault(), b.volume = Math.min(1, b.volume + 0.1), a.volume = b.volume, g.value = b.volume * 100;
3124
3354
  break;
3125
3355
  case "ArrowDown":
3126
- y.preventDefault(), b.volume = Math.max(0, b.volume - 0.1), a.volume = b.volume, g.value = b.volume * 100;
3356
+ v.preventDefault(), b.volume = Math.max(0, b.volume - 0.1), a.volume = b.volume, g.value = b.volume * 100;
3127
3357
  break;
3128
3358
  case "m":
3129
- y.preventDefault(), l == null || l.click();
3359
+ v.preventDefault(), c == null || c.click();
3130
3360
  break;
3131
3361
  }
3132
3362
  }), e.setAttribute("data-initialized", "true"), e.setAttribute("tabindex", "0");
@@ -3136,11 +3366,11 @@ function hs(e, t) {
3136
3366
  const r = e.getContext("2d"), a = window.devicePixelRatio || 1, s = e.parentElement.getBoundingClientRect();
3137
3367
  e.width = s.width * a, e.height = s.height * a, e.style.width = `${s.width}px`, e.style.height = `${s.height}px`, r.scale(a, a);
3138
3368
  const n = s.width, o = s.height, i = Math.floor(n / 4), u = xt(i, t);
3139
- $t(r, u, n, o), new ResizeObserver(() => {
3369
+ Mt(r, u, n, o), new ResizeObserver(() => {
3140
3370
  const d = e.parentElement.getBoundingClientRect();
3141
3371
  e.width = d.width * a, e.height = d.height * a, e.style.width = `${d.width}px`, e.style.height = `${d.height}px`, r.scale(a, a);
3142
3372
  const p = Math.floor(d.width / 4), w = xt(p, t);
3143
- $t(r, w, d.width, d.height);
3373
+ Mt(r, w, d.width, d.height);
3144
3374
  }).observe(e.parentElement);
3145
3375
  }
3146
3376
  function xt(e, t) {
@@ -3160,24 +3390,24 @@ function xt(e, t) {
3160
3390
  }
3161
3391
  return r;
3162
3392
  }
3163
- function $t(e, t, r, a) {
3393
+ function Mt(e, t, r, a) {
3164
3394
  e.clearRect(0, 0, r, a);
3165
- const s = 2, o = s + 2, i = a / 2, c = getComputedStyle(document.documentElement).getPropertyValue("--artifactuse-text-muted").trim() || "107, 114, 128";
3166
- e.fillStyle = `rgba(${c}, 0.4)`, t.forEach((d, p) => {
3167
- const w = p * o, l = d * (a * 0.8), m = l / 2, h = s / 2;
3168
- e.beginPath(), e.roundRect(w, i - m, s, l, h), e.fill();
3395
+ const s = 2, o = s + 2, i = a / 2, l = getComputedStyle(document.documentElement).getPropertyValue("--artifactuse-text-muted").trim() || "107, 114, 128";
3396
+ e.fillStyle = `rgba(${l}, 0.4)`, t.forEach((d, p) => {
3397
+ const w = p * o, c = d * (a * 0.8), m = c / 2, h = s / 2;
3398
+ e.beginPath(), e.roundRect(w, i - m, s, c, h), e.fill();
3169
3399
  });
3170
3400
  }
3171
- function At(e) {
3401
+ function $t(e) {
3172
3402
  if (!e || isNaN(e)) return "0:00";
3173
3403
  const t = Math.floor(e / 3600), r = Math.floor(e % 3600 / 60), a = Math.floor(e % 60);
3174
3404
  return t > 0 ? `${t}:${r.toString().padStart(2, "0")}:${a.toString().padStart(2, "0")}` : `${r}:${a.toString().padStart(2, "0")}`;
3175
3405
  }
3176
- function St(e) {
3406
+ function zt(e) {
3177
3407
  const t = Y.get(e);
3178
3408
  t && t.audio.play();
3179
3409
  }
3180
- function Rt(e) {
3410
+ function At(e) {
3181
3411
  const t = Y.get(e);
3182
3412
  t && t.audio.pause();
3183
3413
  }
@@ -3210,48 +3440,48 @@ function bs(e) {
3210
3440
  const r = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/embed\?pb=[^"]+)"[^>]*>[^<]*<\/a>/gi;
3211
3441
  e = e.replace(r, (g, f) => {
3212
3442
  const b = `__PROTECTED_MAP_${t.length}__`;
3213
- return t.push(zt(f)), b;
3443
+ return t.push(St(f)), b;
3214
3444
  });
3215
3445
  const a = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/embed\\?pb=[^\\s<>"]+)(?!["'])`, "gi");
3216
3446
  e = e.replace(a, (g, f) => {
3217
3447
  const b = `__PROTECTED_MAP_${t.length}__`;
3218
- return t.push(zt(f)), b;
3448
+ return t.push(St(f)), b;
3219
3449
  });
3220
3450
  const s = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/place\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3221
- e = e.replace(s, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3451
+ e = e.replace(s, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3222
3452
  const n = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/place\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
3223
- e = e.replace(n, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3453
+ e = e.replace(n, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3224
3454
  const o = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/@([0-9.-]+),([0-9.-]+),([0-9]+)z[^"]*)"[^>]*>[^<]*<\/a>/gi;
3225
- e = e.replace(o, (g, f, b, y, v) => Ue(b, y, v));
3455
+ e = e.replace(o, (g, f, b, v, M) => Ue(b, v, M));
3226
3456
  const i = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/@([0-9.-]+),([0-9.-]+),([0-9]+)z)(?!["'])`, "gi");
3227
- e = e.replace(i, (g, f, b, y, v) => Ue(b, y, v));
3457
+ e = e.replace(i, (g, f, b, v, M) => Ue(b, v, M));
3228
3458
  const u = /<a[^>]*href="(https?:\/\/maps\.google\.com\/\?q=([^\s"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3229
- e = e.replace(u, (g, f, b) => W(decodeURIComponent(b)));
3230
- const c = new RegExp(`(?<!["'=])(https?:\\/\\/maps\\.google\\.com\\/\\?q=([^\\s"&]+))(?!["'])`, "gi");
3231
- e = e.replace(c, (g, f, b) => W(decodeURIComponent(b)));
3459
+ e = e.replace(u, (g, f, b) => X(decodeURIComponent(b)));
3460
+ const l = new RegExp(`(?<!["'=])(https?:\\/\\/maps\\.google\\.com\\/\\?q=([^\\s"&]+))(?!["'])`, "gi");
3461
+ e = e.replace(l, (g, f, b) => X(decodeURIComponent(b)));
3232
3462
  const d = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/([^\/\?"]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3233
- e = e.replace(d, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3463
+ e = e.replace(d, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3234
3464
  const p = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/([^\\/\\?\\s]+))(?!["'])`, "gi");
3235
- e = e.replace(p, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3465
+ e = e.replace(p, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3236
3466
  const w = /<a[^>]*href="(https?:\/\/(?:www\.)?google\.com\/maps\/search\/\?[^"]*query=([^"&]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3237
- e = e.replace(w, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3238
- const l = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/\\?[^\\s"]*query=([^\\s"&]+))(?!["'])`, "gi");
3239
- e = e.replace(l, (g, f, b) => W(decodeURIComponent(b.replace(/\+/g, " "))));
3467
+ e = e.replace(w, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3468
+ const c = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?google\\.com\\/maps\\/search\\/\\?[^\\s"]*query=([^\\s"&]+))(?!["'])`, "gi");
3469
+ e = e.replace(c, (g, f, b) => X(decodeURIComponent(b.replace(/\+/g, " "))));
3240
3470
  const m = /<a[^>]*href="(https?:\/\/(?:www\.)?openstreetmap\.org\/[^"]*mlat=([0-9.-]+)[^"]*mlon=([0-9.-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3241
- e = e.replace(m, (g, f, b, y) => {
3242
- const v = f.match(/#map=(\d+)/), k = v ? v[1] : 15;
3243
- return Lt(b, y, k);
3471
+ e = e.replace(m, (g, f, b, v) => {
3472
+ const M = f.match(/#map=(\d+)/), $ = M ? M[1] : 15;
3473
+ return Ct(b, v, $);
3244
3474
  });
3245
3475
  const h = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?openstreetmap\\.org\\/[^\\s]*mlat=([0-9.-]+)[^\\s]*mlon=([0-9.-]+))(?!["'])`, "gi");
3246
- e = e.replace(h, (g, f, b, y) => {
3247
- const v = f.match(/#map=(\d+)/), k = v ? v[1] : 15;
3248
- return Lt(b, y, k);
3476
+ e = e.replace(h, (g, f, b, v) => {
3477
+ const M = f.match(/#map=(\d+)/), $ = M ? M[1] : 15;
3478
+ return Ct(b, v, $);
3249
3479
  });
3250
3480
  for (let g = t.length - 1; g >= 0; g--)
3251
3481
  e = e.replace(`__PROTECTED_MAP_${g}__`, t[g]);
3252
3482
  return e;
3253
3483
  }
3254
- function zt(e) {
3484
+ function St(e) {
3255
3485
  const t = e.match(/pb=([^&]+)/);
3256
3486
  if (t) {
3257
3487
  const r = decodeURIComponent(t[1]), a = r.match(/!3d(-?[\d.]+).*?!2d(-?[\d.]+)/), s = r.match(/!2d(-?[\d.]+).*?!3d(-?[\d.]+)/);
@@ -3260,8 +3490,8 @@ function zt(e) {
3260
3490
  const i = r.match(/!1d([\d.]+)/);
3261
3491
  let u = 15;
3262
3492
  if (i) {
3263
- const c = parseFloat(i[1]);
3264
- c > 1e4 ? u = 10 : c > 5e3 ? u = 12 : c > 1e3 ? u = 14 : c > 500 ? u = 16 : u = 18;
3493
+ const l = parseFloat(i[1]);
3494
+ l > 1e4 ? u = 10 : l > 5e3 ? u = 12 : l > 1e3 ? u = 14 : l > 500 ? u = 16 : u = 18;
3265
3495
  }
3266
3496
  return Ue(n, o, u);
3267
3497
  }
@@ -3279,7 +3509,7 @@ function zt(e) {
3279
3509
  </div>
3280
3510
  `;
3281
3511
  }
3282
- function W(e) {
3512
+ function X(e) {
3283
3513
  const t = encodeURIComponent(e);
3284
3514
  return `
3285
3515
  <div class="artifactuse-map-wrapper">
@@ -3323,7 +3553,7 @@ function Ue(e, t, r) {
3323
3553
  </div>
3324
3554
  `;
3325
3555
  }
3326
- function Lt(e, t, r = 15) {
3556
+ function Ct(e, t, r = 15) {
3327
3557
  return `
3328
3558
  <div class="artifactuse-map-wrapper">
3329
3559
  <iframe
@@ -3341,39 +3571,39 @@ function Lt(e, t, r = 15) {
3341
3571
  }
3342
3572
  function vs(e, t = {}) {
3343
3573
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:www\.)?(?:twitter\.com|x\.com)\/([a-zA-Z0-9_]+)\/status\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3344
- e = e.replace(a, (y, v, k, $) => Ct(k, $, r));
3574
+ e = e.replace(a, (v, M, $, z) => Rt($, z, r));
3345
3575
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?(?:twitter\\.com|x\\.com)\\/([a-zA-Z0-9_]+)\\/status\\/(\\d+))(?!["'])`, "gi");
3346
- e = e.replace(s, (y, v, k, $) => Ct(k, $, r));
3576
+ e = e.replace(s, (v, M, $, z) => Rt($, z, r));
3347
3577
  const n = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/p\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3348
- e = e.replace(n, (y, v, k) => Mt(k));
3578
+ e = e.replace(n, (v, M, $) => Lt($));
3349
3579
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/p\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3350
- e = e.replace(o, (y, v, k) => Mt(k));
3580
+ e = e.replace(o, (v, M, $) => Lt($));
3351
3581
  const i = /<a[^>]*href="(https?:\/\/(?:www\.)?instagram\.com\/reel\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3352
- e = e.replace(i, (y, v, k) => _t(k));
3582
+ e = e.replace(i, (v, M, $) => Tt($));
3353
3583
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?instagram\\.com\\/reel\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3354
- e = e.replace(u, (y, v, k) => _t(k));
3355
- const c = /<a[^>]*href="(https?:\/\/(?:www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3356
- e = e.replace(c, (y, v, k, $) => Tt($));
3584
+ e = e.replace(u, (v, M, $) => Tt($));
3585
+ const l = /<a[^>]*href="(https?:\/\/(?:www\.)?tiktok\.com\/@([a-zA-Z0-9_.]+)\/video\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3586
+ e = e.replace(l, (v, M, $, z) => _t(z));
3357
3587
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?tiktok\\.com\\/@([a-zA-Z0-9_.]+)\\/video\\/(\\d+))(?!["'])`, "gi");
3358
- e = e.replace(d, (y, v, k, $) => Tt($));
3588
+ e = e.replace(d, (v, M, $, z) => _t(z));
3359
3589
  const p = /<a[^>]*href="(https?:\/\/(?:www\.)?linkedin\.com\/(?:posts|feed\/update)\/([a-zA-Z0-9_:-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3360
- e = e.replace(p, (y, v, k) => Et(k, v));
3590
+ e = e.replace(p, (v, M, $) => Et($, M));
3361
3591
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?linkedin\\.com\\/(?:posts|feed\\/update)\\/([a-zA-Z0-9_:-]+))(?!["'])`, "gi");
3362
- e = e.replace(w, (y, v, k) => Et(k, v));
3363
- const l = /<a[^>]*href="(https?:\/\/(?:www\.)?reddit\.com\/r\/([a-zA-Z0-9_]+)\/comments\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3364
- e = e.replace(l, (y, v, k, $) => Pt(k, $, v));
3592
+ e = e.replace(w, (v, M, $) => Et($, M));
3593
+ const c = /<a[^>]*href="(https?:\/\/(?:www\.)?reddit\.com\/r\/([a-zA-Z0-9_]+)\/comments\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3594
+ e = e.replace(c, (v, M, $, z) => Pt($, z, M));
3365
3595
  const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?reddit\\.com\\/r\\/([a-zA-Z0-9_]+)\\/comments\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3366
- e = e.replace(m, (y, v, k, $) => Pt(k, $, v));
3596
+ e = e.replace(m, (v, M, $, z) => Pt($, z, M));
3367
3597
  const h = /<a[^>]*href="(https?:\/\/(?:www\.)?facebook\.com\/[a-zA-Z0-9.]+\/posts\/\d+[^"]*)"[^>]*>[^<]*<\/a>/gi;
3368
- e = e.replace(h, (y, v) => jt(v));
3598
+ e = e.replace(h, (v, M) => jt(M));
3369
3599
  const g = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?facebook\\.com\\/[a-zA-Z0-9.]+\\/posts\\/\\d+)(?!["'])`, "gi");
3370
- e = e.replace(g, (y, v) => jt(v));
3600
+ e = e.replace(g, (v, M) => jt(M));
3371
3601
  const f = /<a[^>]*href="(https?:\/\/(?:www\.)?pinterest\.com\/pin\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3372
- e = e.replace(f, (y, v, k) => It(k));
3602
+ e = e.replace(f, (v, M, $) => Ht($));
3373
3603
  const b = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?pinterest\\.com\\/pin\\/(\\d+))(?!["'])`, "gi");
3374
- return e = e.replace(b, (y, v, k) => It(k)), e;
3604
+ return e = e.replace(b, (v, M, $) => Ht($)), e;
3375
3605
  }
3376
- function Ct(e, t, r = "dark") {
3606
+ function Rt(e, t, r = "dark") {
3377
3607
  return `
3378
3608
  <div class="artifactuse-twitter-wrapper">
3379
3609
  <blockquote class="twitter-tweet" data-dnt="true" data-theme="${r}">
@@ -3383,7 +3613,7 @@ function Ct(e, t, r = "dark") {
3383
3613
  </div>
3384
3614
  `;
3385
3615
  }
3386
- function Mt(e) {
3616
+ function Lt(e) {
3387
3617
  return `
3388
3618
  <div class="artifactuse-instagram-wrapper">
3389
3619
  <iframe
@@ -3397,7 +3627,7 @@ function Mt(e) {
3397
3627
  </div>
3398
3628
  `;
3399
3629
  }
3400
- function _t(e) {
3630
+ function Tt(e) {
3401
3631
  return `
3402
3632
  <div class="artifactuse-instagram-wrapper">
3403
3633
  <iframe
@@ -3411,7 +3641,7 @@ function _t(e) {
3411
3641
  </div>
3412
3642
  `;
3413
3643
  }
3414
- function Tt(e) {
3644
+ function _t(e) {
3415
3645
  return `
3416
3646
  <div class="artifactuse-tiktok-wrapper">
3417
3647
  <iframe
@@ -3473,7 +3703,7 @@ function jt(e) {
3473
3703
  </div>
3474
3704
  `;
3475
3705
  }
3476
- function It(e) {
3706
+ function Ht(e) {
3477
3707
  return `
3478
3708
  <div class="artifactuse-pinterest-wrapper">
3479
3709
  <a data-pin-do="embedPin" data-pin-width="large" href="https://www.pinterest.com/pin/${e}/"></a>
@@ -3483,11 +3713,11 @@ function It(e) {
3483
3713
  }
3484
3714
  function ys(e) {
3485
3715
  const t = /<a[^>]*href="(https?:\/\/[^"]+\.pdf(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
3486
- e = e.replace(t, (a, s) => Dt(s));
3716
+ e = e.replace(t, (a, s) => Vt(s));
3487
3717
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.pdf(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
3488
- return e = e.replace(r, (a, s) => Dt(s)), e;
3718
+ return e = e.replace(r, (a, s) => Vt(s)), e;
3489
3719
  }
3490
- function Dt(e) {
3720
+ function Vt(e) {
3491
3721
  return `
3492
3722
  <div class="artifactuse-pdf-wrapper">
3493
3723
  <div class="artifactuse-pdf-header">
@@ -3513,21 +3743,21 @@ function Dt(e) {
3513
3743
  }
3514
3744
  function ks(e) {
3515
3745
  const t = /<a[^>]*href="(https?:\/\/docs\.google\.com\/document\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3516
- e = e.replace(t, (c, d, p) => se(p, "document"));
3746
+ e = e.replace(t, (l, d, p) => se(p, "document"));
3517
3747
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/document\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3518
- e = e.replace(r, (c, d, p) => se(p, "document"));
3748
+ e = e.replace(r, (l, d, p) => se(p, "document"));
3519
3749
  const a = /<a[^>]*href="(https?:\/\/docs\.google\.com\/spreadsheets\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3520
- e = e.replace(a, (c, d, p) => se(p, "spreadsheets"));
3750
+ e = e.replace(a, (l, d, p) => se(p, "spreadsheets"));
3521
3751
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/spreadsheets\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3522
- e = e.replace(s, (c, d, p) => se(p, "spreadsheets"));
3752
+ e = e.replace(s, (l, d, p) => se(p, "spreadsheets"));
3523
3753
  const n = /<a[^>]*href="(https?:\/\/docs\.google\.com\/presentation\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3524
- e = e.replace(n, (c, d, p) => se(p, "presentation"));
3754
+ e = e.replace(n, (l, d, p) => se(p, "presentation"));
3525
3755
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/presentation\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3526
- e = e.replace(o, (c, d, p) => se(p, "presentation"));
3756
+ e = e.replace(o, (l, d, p) => se(p, "presentation"));
3527
3757
  const i = /<a[^>]*href="(https?:\/\/docs\.google\.com\/forms\/d\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3528
- e = e.replace(i, (c, d, p) => Ht(p));
3758
+ e = e.replace(i, (l, d, p) => It(p));
3529
3759
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/docs\\.google\\.com\\/forms\\/d\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3530
- return e = e.replace(u, (c, d, p) => Ht(p)), e;
3760
+ return e = e.replace(u, (l, d, p) => It(p)), e;
3531
3761
  }
3532
3762
  function se(e, t) {
3533
3763
  const r = {
@@ -3560,7 +3790,7 @@ function se(e, t) {
3560
3790
  </div>
3561
3791
  `;
3562
3792
  }
3563
- function Ht(e) {
3793
+ function It(e) {
3564
3794
  return `
3565
3795
  <div class="artifactuse-google-form-wrapper">
3566
3796
  <iframe
@@ -3573,11 +3803,11 @@ function Ht(e) {
3573
3803
  }
3574
3804
  function xs(e) {
3575
3805
  const t = /<a[^>]*href="(https?:\/\/[^"]+\.(docx?|xlsx?|pptx?)(?:\?[^"]*)?)"[^>]*>[^<]*<\/a>/gi;
3576
- e = e.replace(t, (a, s) => qt(s));
3806
+ e = e.replace(t, (a, s) => Dt(s));
3577
3807
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/[^\\s<>"]+\\.(docx?|xlsx?|pptx?)(?:\\?[^\\s<>"]*)?)(?!["'])`, "gi");
3578
- return e = e.replace(r, (a, s) => qt(s)), e;
3808
+ return e = e.replace(r, (a, s) => Dt(s)), e;
3579
3809
  }
3580
- function qt(e) {
3810
+ function Dt(e) {
3581
3811
  const t = encodeURIComponent(e), r = e.split("/").pop().split("?")[0], a = r.split(".").pop().toLowerCase();
3582
3812
  return `
3583
3813
  <div class="artifactuse-office-wrapper">
@@ -3603,43 +3833,43 @@ function qt(e) {
3603
3833
  </div>
3604
3834
  `;
3605
3835
  }
3606
- function $s(e) {
3836
+ function Ms(e) {
3607
3837
  return `${e}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
3608
3838
  }
3609
- function As(e, t = {}) {
3839
+ function $s(e, t = {}) {
3610
3840
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/gist\.github\.com\/([a-zA-Z0-9_-]+)\/([a-f0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3611
- e = e.replace(a, (h, g, f, b) => Zt(f, b));
3841
+ e = e.replace(a, (h, g, f, b) => qt(f, b));
3612
3842
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/gist\\.github\\.com\\/([a-zA-Z0-9_-]+)\\/([a-f0-9]+))(?!["'])`, "gi");
3613
- e = e.replace(s, (h, g, f, b) => Zt(f, b));
3843
+ e = e.replace(s, (h, g, f, b) => qt(f, b));
3614
3844
  const n = /<a[^>]*href="(https?:\/\/codepen\.io\/([a-zA-Z0-9_-]+)\/(?:pen|full|details)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3615
- e = e.replace(n, (h, g, f, b) => Bt(f, b, r));
3845
+ e = e.replace(n, (h, g, f, b) => Zt(f, b, r));
3616
3846
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/codepen\\.io\\/([a-zA-Z0-9_-]+)\\/(?:pen|full|details)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3617
- e = e.replace(o, (h, g, f, b) => Bt(f, b, r));
3847
+ e = e.replace(o, (h, g, f, b) => Zt(f, b, r));
3618
3848
  const i = /<a[^>]*href="(https?:\/\/codesandbox\.io\/(?:s|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3619
3849
  e = e.replace(i, (h, g, f) => Ot(f, r));
3620
3850
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/codesandbox\\.io\\/(?:s|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
3621
3851
  e = e.replace(u, (h, g, f) => Ot(f, r));
3622
- const c = /<a[^>]*href="(https?:\/\/jsfiddle\.net\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3623
- e = e.replace(c, (h, g, f, b) => Vt(f, b, r));
3852
+ const l = /<a[^>]*href="(https?:\/\/jsfiddle\.net\/([a-zA-Z0-9_]+)\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3853
+ e = e.replace(l, (h, g, f, b) => Bt(f, b, r));
3624
3854
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/jsfiddle\\.net\\/([a-zA-Z0-9_]+)\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3625
- e = e.replace(d, (h, g, f, b) => Vt(f, b, r));
3855
+ e = e.replace(d, (h, g, f, b) => Bt(f, b, r));
3626
3856
  const p = /<a[^>]*href="(https?:\/\/stackblitz\.com\/(?:edit|embed)\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3627
3857
  e = e.replace(p, (h, g, f) => Ft(f, r));
3628
3858
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/stackblitz\\.com\\/(?:edit|embed)\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
3629
3859
  e = e.replace(w, (h, g, f) => Ft(f, r));
3630
- const l = /<a[^>]*href="(https?:\/\/replit\.com\/@([a-zA-Z0-9_]+)\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3631
- e = e.replace(l, (h, g, f, b) => Nt(f, b, r));
3860
+ const c = /<a[^>]*href="(https?:\/\/replit\.com\/@([a-zA-Z0-9_]+)\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3861
+ e = e.replace(c, (h, g, f, b) => Nt(f, b, r));
3632
3862
  const m = new RegExp(`(?<!["'=])(https?:\\/\\/replit\\.com\\/@([a-zA-Z0-9_]+)\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3633
3863
  return e = e.replace(m, (h, g, f, b) => Nt(f, b, r)), e;
3634
3864
  }
3635
- function Zt(e, t) {
3865
+ function qt(e, t) {
3636
3866
  return `
3637
- <div class="artifactuse-gist-wrapper" id="${$s("gist")}">
3867
+ <div class="artifactuse-gist-wrapper" id="${Ms("gist")}">
3638
3868
  <script src="https://gist.github.com/${e}/${t}.js"><\/script>
3639
3869
  </div>
3640
3870
  `;
3641
3871
  }
3642
- function Bt(e, t, r = "dark") {
3872
+ function Zt(e, t, r = "dark") {
3643
3873
  return `
3644
3874
  <div class="artifactuse-codepen-wrapper">
3645
3875
  <iframe
@@ -3670,7 +3900,7 @@ function Ot(e, t = "dark") {
3670
3900
  </div>
3671
3901
  `;
3672
3902
  }
3673
- function Vt(e, t, r = "dark") {
3903
+ function Bt(e, t, r = "dark") {
3674
3904
  return `
3675
3905
  <div class="artifactuse-jsfiddle-wrapper">
3676
3906
  <iframe
@@ -3709,23 +3939,23 @@ function Nt(e, t, r = "dark") {
3709
3939
  </div>
3710
3940
  `;
3711
3941
  }
3712
- function Ss(e) {
3942
+ function zs(e) {
3713
3943
  const t = /<a[^>]*href="(https?:\/\/public\.tableau\.com\/(?:views|profile)\/([^\s"]+))"[^>]*>[^<]*<\/a>/gi;
3714
- e = e.replace(t, (c, d, p) => Ut(p));
3944
+ e = e.replace(t, (l, d, p) => Ut(p));
3715
3945
  const r = new RegExp(`(?<!["'=])(https?:\\/\\/public\\.tableau\\.com\\/(?:views|profile)\\/([^\\s<>"]+))(?!["'])`, "gi");
3716
- e = e.replace(r, (c, d, p) => Ut(p));
3946
+ e = e.replace(r, (l, d, p) => Ut(p));
3717
3947
  const a = /<a[^>]*href="(https?:\/\/(?:public\.)?flourish\.studio\/visualisation\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3718
- e = e.replace(a, (c, d, p) => Gt(p));
3948
+ e = e.replace(a, (l, d, p) => Gt(p));
3719
3949
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:public\\.)?flourish\\.studio\\/visualisation\\/(\\d+))(?!["'])`, "gi");
3720
- e = e.replace(s, (c, d, p) => Gt(p));
3950
+ e = e.replace(s, (l, d, p) => Gt(p));
3721
3951
  const n = /<a[^>]*href="(https?:\/\/datawrapper\.dwcdn\.net\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3722
- e = e.replace(n, (c, d, p) => Wt(p));
3952
+ e = e.replace(n, (l, d, p) => Wt(p));
3723
3953
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/datawrapper\\.dwcdn\\.net\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3724
- e = e.replace(o, (c, d, p) => Wt(p));
3954
+ e = e.replace(o, (l, d, p) => Wt(p));
3725
3955
  const i = /<a[^>]*href="(https?:\/\/(?:e\.)?infogram\.com\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3726
- e = e.replace(i, (c, d, p) => Xt(p));
3956
+ e = e.replace(i, (l, d, p) => Xt(p));
3727
3957
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:e\\.)?infogram\\.com\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3728
- return e = e.replace(u, (c, d, p) => Xt(p)), e;
3958
+ return e = e.replace(u, (l, d, p) => Xt(p)), e;
3729
3959
  }
3730
3960
  function Ut(e) {
3731
3961
  return `
@@ -3776,7 +4006,7 @@ function Xt(e) {
3776
4006
  </div>
3777
4007
  `;
3778
4008
  }
3779
- function Rs(e, t = {}) {
4009
+ function As(e, t = {}) {
3780
4010
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/sketchfab\.com\/(?:3d-)?models\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3781
4011
  e = e.replace(a, (h, g, f) => Kt(f, r));
3782
4012
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/sketchfab\\.com\\/(?:3d-)?models\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
@@ -3789,16 +4019,16 @@ function Rs(e, t = {}) {
3789
4019
  e = e.replace(i, (h, g, f) => Qt(f, g));
3790
4020
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?figma\\.com\\/proto\\/([a-zA-Z0-9]+)[^\\s]*)(?!["'])`, "gi");
3791
4021
  e = e.replace(u, (h, g, f) => Qt(f, g));
3792
- const c = /<a[^>]*href="(https?:\/\/(?:www\.)?canva\.com\/design\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3793
- e = e.replace(c, (h, g, f) => Yt(f, g));
4022
+ const l = /<a[^>]*href="(https?:\/\/(?:www\.)?canva\.com\/design\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
4023
+ e = e.replace(l, (h, g, f) => Yt(f, g));
3794
4024
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?canva\\.com\\/design\\/([a-zA-Z0-9_-]+)[^\\s]*)(?!["'])`, "gi");
3795
4025
  e = e.replace(d, (h, g, f) => Yt(f, g));
3796
4026
  const p = /<a[^>]*href="(https?:\/\/dribbble\.com\/shots\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3797
4027
  e = e.replace(p, (h, g, f) => er(f));
3798
4028
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/dribbble\\.com\\/shots\\/(\\d+))(?!["'])`, "gi");
3799
4029
  e = e.replace(w, (h, g, f) => er(f));
3800
- const l = /<a[^>]*href="(https?:\/\/(?:www\.)?behance\.net\/gallery\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3801
- e = e.replace(l, (h, g, f) => tr(f, g));
4030
+ const c = /<a[^>]*href="(https?:\/\/(?:www\.)?behance\.net\/gallery\/(\d+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
4031
+ e = e.replace(c, (h, g, f) => tr(f, g));
3802
4032
  const m = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?behance\\.net\\/gallery\\/(\\d+)[^\\s]*)(?!["'])`, "gi");
3803
4033
  return e = e.replace(m, (h, g, f) => tr(f, g)), e;
3804
4034
  }
@@ -3886,35 +4116,35 @@ function tr(e, t) {
3886
4116
  </div>
3887
4117
  `;
3888
4118
  }
3889
- function zs(e, t = {}) {
4119
+ function Ss(e, t = {}) {
3890
4120
  const r = t.theme || "dark", a = /<a[^>]*href="(https?:\/\/(?:[a-zA-Z0-9-]+\.)?typeform\.com\/to\/([a-zA-Z0-9]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3891
- e = e.replace(a, (f, b, y) => rr(y));
4121
+ e = e.replace(a, (f, b, v) => rr(v));
3892
4122
  const s = new RegExp(`(?<!["'=])(https?:\\/\\/(?:[a-zA-Z0-9-]+\\.)?typeform\\.com\\/to\\/([a-zA-Z0-9]+))(?!["'])`, "gi");
3893
- e = e.replace(s, (f, b, y) => rr(y));
4123
+ e = e.replace(s, (f, b, v) => rr(v));
3894
4124
  const n = /<a[^>]*href="(https?:\/\/calendly\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3895
- e = e.replace(n, (f, b, y, v) => ar(y, v));
4125
+ e = e.replace(n, (f, b, v, M) => ar(v, M));
3896
4126
  const o = new RegExp(`(?<!["'=])(https?:\\/\\/calendly\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
3897
- e = e.replace(o, (f, b, y, v) => ar(y, v));
4127
+ e = e.replace(o, (f, b, v, M) => ar(v, M));
3898
4128
  const i = /<a[^>]*href="(https?:\/\/calendar\.google\.com\/calendar\/appointments\/schedules\/([a-zA-Z0-9_-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3899
- e = e.replace(i, (f, b, y) => sr(y));
4129
+ e = e.replace(i, (f, b, v) => sr(v));
3900
4130
  const u = new RegExp(`(?<!["'=])(https?:\\/\\/calendar\\.google\\.com\\/calendar\\/appointments\\/schedules\\/([a-zA-Z0-9_-]+))(?!["'])`, "gi");
3901
- e = e.replace(u, (f, b, y) => sr(y));
3902
- const c = /<a[^>]*href="(https?:\/\/cal\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3903
- e = e.replace(c, (f, b, y, v) => nr(y, v, r));
4131
+ e = e.replace(u, (f, b, v) => sr(v));
4132
+ const l = /<a[^>]*href="(https?:\/\/cal\.com\/([a-zA-Z0-9_-]+)(?:\/([a-zA-Z0-9_-]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
4133
+ e = e.replace(l, (f, b, v, M) => nr(v, M, r));
3904
4134
  const d = new RegExp(`(?<!["'=])(https?:\\/\\/cal\\.com\\/([a-zA-Z0-9_-]+)(?:\\/([a-zA-Z0-9_-]+))?)(?!["'])`, "gi");
3905
- e = e.replace(d, (f, b, y, v) => nr(y, v, r));
4135
+ e = e.replace(d, (f, b, v, M) => nr(v, M, r));
3906
4136
  const p = /<a[^>]*href="(https?:\/\/(?:www\.)?notion\.so\/([a-zA-Z0-9-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3907
- e = e.replace(p, (f, b, y) => ir(y));
4137
+ e = e.replace(p, (f, b, v) => ir(v));
3908
4138
  const w = new RegExp(`(?<!["'=])(https?:\\/\\/(?:www\\.)?notion\\.so\\/([a-zA-Z0-9-]+))(?!["'])`, "gi");
3909
- e = e.replace(w, (f, b, y) => ir(y));
3910
- const l = /<a[^>]*href="(https?:\/\/airtable\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/([a-zA-Z0-9]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
3911
- e = e.replace(l, (f, b, y, v) => or(y, v));
4139
+ e = e.replace(w, (f, b, v) => ir(v));
4140
+ const c = /<a[^>]*href="(https?:\/\/airtable\.com\/(?:embed\/)?([a-zA-Z0-9]+)(?:\/([a-zA-Z0-9]+))?[^"]*)"[^>]*>[^<]*<\/a>/gi;
4141
+ e = e.replace(c, (f, b, v, M) => or(v, M));
3912
4142
  const m = new RegExp(`(?<!["'=])(https?:\\/\\/airtable\\.com\\/(?:embed\\/)?([a-zA-Z0-9]+)(?:\\/([a-zA-Z0-9]+))?)(?!["'])`, "gi");
3913
- e = e.replace(m, (f, b, y, v) => or(y, v));
4143
+ e = e.replace(m, (f, b, v, M) => or(v, M));
3914
4144
  const h = /<a[^>]*href="(https?:\/\/miro\.com\/app\/board\/([a-zA-Z0-9_=-]+)[^"]*)"[^>]*>[^<]*<\/a>/gi;
3915
- e = e.replace(h, (f, b, y) => cr(y));
4145
+ e = e.replace(h, (f, b, v) => lr(v));
3916
4146
  const g = new RegExp(`(?<!["'=])(https?:\\/\\/miro\\.com\\/app\\/board\\/([a-zA-Z0-9_=-]+))(?!["'])`, "gi");
3917
- return e = e.replace(g, (f, b, y) => cr(y)), e;
4147
+ return e = e.replace(g, (f, b, v) => lr(v)), e;
3918
4148
  }
3919
4149
  function rr(e) {
3920
4150
  return `
@@ -3983,7 +4213,7 @@ function or(e, t) {
3983
4213
  </div>
3984
4214
  `;
3985
4215
  }
3986
- function cr(e) {
4216
+ function lr(e) {
3987
4217
  return `
3988
4218
  <div class="artifactuse-miro-wrapper">
3989
4219
  <iframe
@@ -3995,37 +4225,37 @@ function cr(e) {
3995
4225
  </div>
3996
4226
  `;
3997
4227
  }
3998
- let K = null, ze = !1, nt = !1;
3999
- function Lr(e) {
4228
+ let K = null, Se = !1, nt = !1;
4229
+ function Cr(e) {
4000
4230
  const t = /<pre><code class="language-mermaid">([\s\S]*?)<\/code><\/pre>/gi;
4001
4231
  return e = e.replace(t, (r, a) => {
4002
- const s = Ls(a).trim();
4003
- return Cs(s);
4232
+ const s = Cs(a).trim();
4233
+ return Rs(s);
4004
4234
  }), e;
4005
4235
  }
4006
- function Ls(e) {
4236
+ function Cs(e) {
4007
4237
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ");
4008
4238
  }
4009
- function Cs(e) {
4010
- const t = Cr(e);
4239
+ function Rs(e) {
4240
+ const t = Rr(e);
4011
4241
  return `
4012
4242
  <div class="artifactuse-mermaid-container" data-mermaid-id="${`mermaid-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`}" data-mermaid-diagram="${t}">
4013
4243
  <div class="artifactuse-mermaid-loading">Loading diagram...</div>
4014
4244
  </div>
4015
4245
  `;
4016
4246
  }
4017
- function Cr(e) {
4247
+ function Rr(e) {
4018
4248
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
4019
4249
  }
4020
- function Mr(e) {
4250
+ function Lr(e) {
4021
4251
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&");
4022
4252
  }
4023
- function _r(e = {}) {
4024
- return typeof mermaid > "u" ? ze ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), _s().then(() => (console.log("Mermaid loaded, rendering diagrams..."), lr(e), Le())).catch((t) => {
4025
- console.error("Failed to load Mermaid library:", t), ze = !0, Ms();
4026
- })) : (nt || lr(e), Le());
4253
+ function Tr(e = {}) {
4254
+ return typeof mermaid > "u" ? Se ? (console.warn("Mermaid loading previously failed. Diagram rendering disabled."), Promise.resolve()) : (console.debug("Mermaid library not loaded. Attempting to load..."), Ts().then(() => (console.log("Mermaid loaded, rendering diagrams..."), cr(e), Ce())).catch((t) => {
4255
+ console.error("Failed to load Mermaid library:", t), Se = !0, Ls();
4256
+ })) : (nt || cr(e), Ce());
4027
4257
  }
4028
- function lr(e = {}) {
4258
+ function cr(e = {}) {
4029
4259
  if (typeof mermaid > "u") return;
4030
4260
  const r = {
4031
4261
  dark: "dark",
@@ -4055,7 +4285,7 @@ function lr(e = {}) {
4055
4285
  };
4056
4286
  mermaid.initialize(a), nt = !0;
4057
4287
  }
4058
- async function Le() {
4288
+ async function Ce() {
4059
4289
  if (typeof mermaid > "u") {
4060
4290
  console.warn("renderAllMermaid called but Mermaid is not available");
4061
4291
  return;
@@ -4063,7 +4293,7 @@ async function Le() {
4063
4293
  const e = document.querySelectorAll(".artifactuse-mermaid-container");
4064
4294
  for (const t of e) {
4065
4295
  if (t.dataset.rendered === "true") continue;
4066
- const r = Mr(t.dataset.mermaidDiagram), a = t.dataset.mermaidId;
4296
+ const r = Lr(t.dataset.mermaidDiagram), a = t.dataset.mermaidId;
4067
4297
  try {
4068
4298
  if (await mermaid.parse(r)) {
4069
4299
  const { svg: n } = await mermaid.render(a, r);
@@ -4083,10 +4313,10 @@ async function Le() {
4083
4313
  }
4084
4314
  }
4085
4315
  }
4086
- function Ms() {
4316
+ function Ls() {
4087
4317
  document.querySelectorAll(".artifactuse-mermaid-container").forEach((e) => {
4088
4318
  if (e.dataset.rendered === "true") return;
4089
- const t = Mr(e.dataset.mermaidDiagram);
4319
+ const t = Lr(e.dataset.mermaidDiagram);
4090
4320
  e.innerHTML = `
4091
4321
  <div class="artifactuse-mermaid-fallback">
4092
4322
  <div class="artifactuse-mermaid-fallback-title">Mermaid Diagram</div>
@@ -4098,7 +4328,7 @@ function Ms() {
4098
4328
  function Ge(e) {
4099
4329
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
4100
4330
  }
4101
- function _s() {
4331
+ function Ts() {
4102
4332
  return K || (typeof mermaid < "u" ? Promise.resolve() : (K = new Promise((e, t) => {
4103
4333
  const r = setTimeout(() => {
4104
4334
  K = null, t(new Error("Mermaid loading timed out after 15 seconds"));
@@ -4111,28 +4341,28 @@ function _s() {
4111
4341
  }), K));
4112
4342
  }
4113
4343
  function rn() {
4114
- K = null, ze = !1, nt = !1;
4344
+ K = null, Se = !1, nt = !1;
4115
4345
  }
4116
4346
  function an() {
4117
4347
  return typeof mermaid < "u";
4118
4348
  }
4119
4349
  function sn() {
4120
- return ze;
4350
+ return Se;
4121
4351
  }
4122
4352
  function nn(e, t = {}) {
4123
4353
  if (!e) return Promise.resolve();
4124
4354
  let r = e.innerHTML;
4125
- return r = Lr(r), e.innerHTML = r, _r(t);
4355
+ return r = Cr(r), e.innerHTML = r, Tr(t);
4126
4356
  }
4127
4357
  async function on(e) {
4128
4358
  const t = document.querySelector(`[data-mermaid-id="${e}"]`);
4129
- t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Le());
4359
+ t && (t.dataset.rendered = "false", t.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Ce());
4130
4360
  }
4131
- async function cn(e, t) {
4361
+ async function ln(e, t) {
4132
4362
  const r = document.querySelector(`[data-mermaid-id="${e}"]`);
4133
- r && (r.dataset.mermaidDiagram = Cr(t), r.dataset.rendered = "false", r.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Le());
4363
+ r && (r.dataset.mermaidDiagram = Rr(t), r.dataset.rendered = "false", r.innerHTML = '<div class="artifactuse-mermaid-loading">Loading diagram...</div>', await Ce());
4134
4364
  }
4135
- function Ts(e) {
4365
+ function _s(e) {
4136
4366
  const t = /<table([^>]*)>([\s\S]*?)<\/table>/gi;
4137
4367
  let r = 0;
4138
4368
  return e = e.replace(t, (a, s, n) => {
@@ -4218,11 +4448,11 @@ function js(e) {
4218
4448
  }), r.join(`
4219
4449
  `);
4220
4450
  }
4221
- function Is(e, t = "table-data.csv") {
4451
+ function Hs(e, t = "table-data.csv") {
4222
4452
  const r = new Blob([e], { type: "text/csv;charset=utf-8;" }), a = URL.createObjectURL(r), s = document.createElement("a");
4223
4453
  s.href = a, s.download = t, document.body.appendChild(s), s.click(), document.body.removeChild(s), URL.revokeObjectURL(a);
4224
4454
  }
4225
- function Ds(e) {
4455
+ function Vs(e) {
4226
4456
  const t = e.querySelectorAll("tr"), r = [];
4227
4457
  return t.forEach((a) => {
4228
4458
  const s = a.querySelectorAll("th, td"), n = [];
@@ -4232,20 +4462,20 @@ function Ds(e) {
4232
4462
  }), r.join(`
4233
4463
  `);
4234
4464
  }
4235
- function Hs(e, t, r = !0) {
4465
+ function Is(e, t, r = !0) {
4236
4466
  const a = e.querySelector("tbody") || e, s = Array.from(a.querySelectorAll("tr")).filter((n) => !n.querySelector("th"));
4237
4467
  s.sort((n, o) => {
4238
4468
  const i = n.cells[t], u = o.cells[t];
4239
4469
  if (!i || !u) return 0;
4240
- let c = i.textContent.trim(), d = u.textContent.trim();
4241
- const p = parseFloat(c.replace(/[,$%]/g, "")), w = parseFloat(d.replace(/[,$%]/g, ""));
4470
+ let l = i.textContent.trim(), d = u.textContent.trim();
4471
+ const p = parseFloat(l.replace(/[,$%]/g, "")), w = parseFloat(d.replace(/[,$%]/g, ""));
4242
4472
  if (!isNaN(p) && !isNaN(w))
4243
4473
  return r ? p - w : w - p;
4244
- const l = new Date(c), m = new Date(d);
4245
- return !isNaN(l.getTime()) && !isNaN(m.getTime()) ? r ? l - m : m - l : r ? c.localeCompare(d) : d.localeCompare(c);
4474
+ const c = new Date(l), m = new Date(d);
4475
+ return !isNaN(c.getTime()) && !isNaN(m.getTime()) ? r ? c - m : m - c : r ? l.localeCompare(d) : d.localeCompare(l);
4246
4476
  }), s.forEach((n) => a.appendChild(n));
4247
4477
  }
4248
- function qs(e, t) {
4478
+ function Ds(e, t) {
4249
4479
  const r = e.querySelectorAll("tbody tr, tr:not(:first-child)"), a = t.toLowerCase().trim();
4250
4480
  let s = 0;
4251
4481
  return r.forEach((n) => {
@@ -4257,13 +4487,13 @@ function qs(e, t) {
4257
4487
  n.style.display = i ? "" : "none", i && s++;
4258
4488
  }), s;
4259
4489
  }
4260
- function Zs() {
4490
+ function qs() {
4261
4491
  document.querySelectorAll("[data-table-search]").forEach((e) => {
4262
4492
  const t = e.dataset.tableSearch, r = document.getElementById(t), a = document.querySelector(`[data-table-count="${t}"]`);
4263
4493
  if (r) {
4264
4494
  const s = r.querySelectorAll("tbody tr, tr:not(:first-child)"), n = Array.from(s).filter((o) => !o.querySelector("th")).length;
4265
4495
  a && (a.textContent = `${n} rows`), e.addEventListener("input", (o) => {
4266
- const i = qs(r, o.target.value);
4496
+ const i = Ds(r, o.target.value);
4267
4497
  a && (a.textContent = o.target.value ? `${i} of ${n} rows` : `${n} rows`);
4268
4498
  });
4269
4499
  }
@@ -4272,21 +4502,21 @@ function Zs() {
4272
4502
  const t = e.closest("table"), r = parseInt(e.dataset.sortCol), s = e.dataset.sortDir !== "asc";
4273
4503
  t.querySelectorAll(".artifactuse-sortable-header").forEach((n) => {
4274
4504
  n.dataset.sortDir = "", n.classList.remove("sort-asc", "sort-desc");
4275
- }), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"), Hs(t, r, s);
4505
+ }), e.dataset.sortDir = s ? "asc" : "desc", e.classList.add(s ? "sort-asc" : "sort-desc"), Is(t, r, s);
4276
4506
  });
4277
4507
  }), document.querySelectorAll("[data-table-export]").forEach((e) => {
4278
4508
  e.addEventListener("click", () => {
4279
4509
  const t = e.dataset.tableExport, r = document.getElementById(t);
4280
4510
  if (r) {
4281
4511
  const a = js(r);
4282
- Is(a, `${t}.csv`);
4512
+ Hs(a, `${t}.csv`);
4283
4513
  }
4284
4514
  });
4285
4515
  }), document.querySelectorAll("[data-table-copy]").forEach((e) => {
4286
4516
  e.addEventListener("click", async () => {
4287
4517
  const t = e.dataset.tableCopy, r = document.getElementById(t);
4288
4518
  if (r) {
4289
- const a = Ds(r);
4519
+ const a = Vs(r);
4290
4520
  try {
4291
4521
  await navigator.clipboard.writeText(a);
4292
4522
  const s = e.querySelector("span"), n = s ? s.textContent : "";
@@ -4300,11 +4530,11 @@ function Zs() {
4300
4530
  });
4301
4531
  });
4302
4532
  }
4303
- let J = null, Ce = !1;
4304
- function Tr(e) {
4305
- return e = Bs(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => fe(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => fe(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => fe(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => fe(r.trim(), !1)), e;
4533
+ let J = null, Re = !1;
4534
+ function _r(e) {
4535
+ return e = Zs(e), e = e.replace(/\$\$([\s\S]*?)\$\$/g, (t, r) => fe(r.trim(), !0)), e = e.replace(/\\\[([\s\S]*?)\\\]/g, (t, r) => fe(r.trim(), !0)), e = e.replace(new RegExp("(?<!\\$)\\$(?!\\$)((?:[^$\\\\]|\\\\.)+?)\\$(?!\\$)", "g"), (t, r) => fe(r.trim(), !1)), e = e.replace(/\\\(([\s\S]*?)\\\)/g, (t, r) => fe(r.trim(), !1)), e;
4306
4536
  }
4307
- function Bs(e) {
4537
+ function Zs(e) {
4308
4538
  const t = /<pre><code class="language-(math|latex)">([\s\S]*?)<\/code><\/pre>/gi;
4309
4539
  return e = e.replace(t, (r, a, s) => {
4310
4540
  const n = Os(s).trim();
@@ -4315,20 +4545,20 @@ function Os(e) {
4315
4545
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&nbsp;/g, " ");
4316
4546
  }
4317
4547
  function fe(e, t = !1) {
4318
- const r = Vs(e);
4548
+ const r = Bs(e);
4319
4549
  return `<span class="artifactuse-math-container ${t ? "artifactuse-math-display" : "artifactuse-math-inline"}" data-tex="${r}" data-display="${t ? "true" : "false"}"></span>`;
4320
4550
  }
4321
- function Vs(e) {
4551
+ function Bs(e) {
4322
4552
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&#39;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
4323
4553
  }
4324
4554
  function Er(e) {
4325
4555
  return e.replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&quot;/g, '"').replace(/&#39;/g, "'").replace(/&amp;/g, "&");
4326
4556
  }
4327
4557
  function Pr() {
4328
- return typeof katex > "u" ? Ce ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), Ns().then(() => {
4558
+ return typeof katex > "u" ? Re ? (console.warn("KaTeX loading previously failed. Math rendering disabled."), Promise.resolve()) : (console.debug("KaTeX library not loaded. Attempting to load..."), Ns().then(() => {
4329
4559
  console.log("KaTeX loaded, rendering math..."), ur();
4330
4560
  }).catch((e) => {
4331
- console.error("Failed to load KaTeX library:", e), Ce = !0, Fs();
4561
+ console.error("Failed to load KaTeX library:", e), Re = !0, Fs();
4332
4562
  })) : (ur(), Promise.resolve());
4333
4563
  }
4334
4564
  function Fs() {
@@ -4389,19 +4619,19 @@ function Ns() {
4389
4619
  }, document.head.appendChild(s);
4390
4620
  }), J));
4391
4621
  }
4392
- function ln() {
4393
- J = null, Ce = !1;
4622
+ function cn() {
4623
+ J = null, Re = !1;
4394
4624
  }
4395
4625
  function un() {
4396
4626
  return typeof katex < "u";
4397
4627
  }
4398
4628
  function dn() {
4399
- return Ce;
4629
+ return Re;
4400
4630
  }
4401
4631
  function pn(e) {
4402
4632
  if (!e) return Promise.resolve();
4403
4633
  let t = e.innerHTML;
4404
- return t = Tr(t), e.innerHTML = t, Pr();
4634
+ return t = _r(t), e.innerHTML = t, Pr();
4405
4635
  }
4406
4636
  const fn = {
4407
4637
  // Fractions
@@ -4465,7 +4695,7 @@ function Us(e) {
4465
4695
  for (const s of t) {
4466
4696
  const n = s.match(/^(?:language-|lang-)(.+)$/);
4467
4697
  if (n)
4468
- return Ie(n[1]);
4698
+ return He(n[1]);
4469
4699
  }
4470
4700
  const r = e.closest("pre");
4471
4701
  if (r) {
@@ -4473,13 +4703,13 @@ function Us(e) {
4473
4703
  for (const n of s) {
4474
4704
  const o = n.match(/^(?:language-|lang-)(.+)$/);
4475
4705
  if (o)
4476
- return Ie(o[1]);
4706
+ return He(o[1]);
4477
4707
  }
4478
4708
  }
4479
4709
  const a = e.dataset.language || (r == null ? void 0 : r.dataset.language);
4480
- return a ? Ie(a) : null;
4710
+ return a ? He(a) : null;
4481
4711
  }
4482
- function Ie(e) {
4712
+ function He(e) {
4483
4713
  const t = {
4484
4714
  js: "javascript",
4485
4715
  ts: "typescript",
@@ -4540,7 +4770,7 @@ function Gs() {
4540
4770
  const e = {
4541
4771
  image(a) {
4542
4772
  const s = typeof a == "string" ? a : a.href, n = typeof a == "string" ? arguments[1] : a.title, o = typeof a == "string" ? arguments[2] : a.text;
4543
- return Ze(s || "", n || "", o || "");
4773
+ return qe(s || "", n || "", o || "");
4544
4774
  }
4545
4775
  }, t = {
4546
4776
  link(a) {
@@ -4556,7 +4786,7 @@ function Gs() {
4556
4786
  return o ? `<pre><code class="language-${ke(o)}">${i}</code></pre>` : `<pre><code>${i}</code></pre>`;
4557
4787
  }
4558
4788
  };
4559
- E.use({
4789
+ H.use({
4560
4790
  renderer: {
4561
4791
  ...e,
4562
4792
  ...t,
@@ -4567,7 +4797,7 @@ function Gs() {
4567
4797
  });
4568
4798
  }
4569
4799
  Gs();
4570
- const Ir = {
4800
+ const Hr = {
4571
4801
  // Structured artifact types
4572
4802
  form: "form-panel",
4573
4803
  // Visual editors
@@ -4579,6 +4809,8 @@ const Ir = {
4579
4809
  drawing: "editor-panel/canvas",
4580
4810
  // Data/config formats
4581
4811
  json: "json-panel",
4812
+ csv: "sheet-panel",
4813
+ tsv: "sheet-panel",
4582
4814
  // Graphics
4583
4815
  svg: "svg-panel",
4584
4816
  // Diff/patches
@@ -4614,6 +4846,14 @@ const Ir = {
4614
4846
  // Show "Powered by Artifactuse" branding in panel footer
4615
4847
  // Set to false to hide (requires paid license)
4616
4848
  branding: !0,
4849
+ // Initial panel width as percentage (25-75)
4850
+ // Can be overridden per-component via props
4851
+ panelWidth: 65,
4852
+ // Initial split view position as percentage (20-80)
4853
+ // Can be overridden per-component via props
4854
+ splitPosition: 50,
4855
+ // Enable multi-tab mode (open multiple artifacts as tabs)
4856
+ multiTab: !1,
4617
4857
  // Panel configuration
4618
4858
  // Users can add/override/disable panels here
4619
4859
  //
@@ -4673,7 +4913,7 @@ const Ir = {
4673
4913
  expiryDays: 30
4674
4914
  }
4675
4915
  };
4676
- function Dr(e, t) {
4916
+ function Vr(e, t) {
4677
4917
  if (e == null)
4678
4918
  return null;
4679
4919
  try {
@@ -4696,25 +4936,25 @@ function Xs(e, t) {
4696
4936
  console.warn("Artifactuse: Invalid default CDN URL:", t);
4697
4937
  }
4698
4938
  for (const a of Object.values(e)) {
4699
- const s = Dr(a, t);
4939
+ const s = Vr(a, t);
4700
4940
  s && r.add(s);
4701
4941
  }
4702
4942
  return [...r];
4703
4943
  }
4704
4944
  function Ks(e, t) {
4705
- const r = { ...Ir };
4945
+ const r = { ...Hr };
4706
4946
  if (e.panels)
4707
- for (const [u, c] of Object.entries(e.panels))
4947
+ for (const [u, l] of Object.entries(e.panels))
4708
4948
  if (Array.isArray(u))
4709
4949
  u.forEach((d) => {
4710
4950
  const p = d == null ? void 0 : d.toLowerCase();
4711
- p && (r[p] = c);
4951
+ p && (r[p] = l);
4712
4952
  });
4713
4953
  else {
4714
4954
  const d = u == null ? void 0 : u.toLowerCase();
4715
- d && (r[d] = c);
4955
+ d && (r[d] = l);
4716
4956
  }
4717
- function a(u, c = {}) {
4957
+ function a(u, l = {}) {
4718
4958
  const d = u == null ? void 0 : u.toLowerCase();
4719
4959
  if (!d) return null;
4720
4960
  const p = r[d];
@@ -4727,26 +4967,26 @@ function Ks(e, t) {
4727
4967
  else
4728
4968
  return null;
4729
4969
  w.endsWith("/") || (w += "");
4730
- const l = new URLSearchParams();
4731
- c.theme && l.set("theme", c.theme), c.accent && l.set("accent", c.accent), c.params && Object.entries(c.params).forEach(([h, g]) => {
4732
- l.set(h, g);
4970
+ const c = new URLSearchParams();
4971
+ l.theme && c.set("theme", l.theme), l.accent && c.set("accent", l.accent), l.params && Object.entries(l.params).forEach(([h, g]) => {
4972
+ c.set(h, g);
4733
4973
  });
4734
- const m = l.toString();
4974
+ const m = c.toString();
4735
4975
  return m ? `${w}?${m}` : w;
4736
4976
  }
4737
4977
  function s(u) {
4738
- const c = u == null ? void 0 : u.toLowerCase();
4739
- return c && r[c] !== void 0 && r[c] !== null;
4978
+ const l = u == null ? void 0 : u.toLowerCase();
4979
+ return l && r[l] !== void 0 && r[l] !== null;
4740
4980
  }
4741
4981
  function n() {
4742
4982
  return Object.keys(r).filter((u) => r[u] !== null);
4743
4983
  }
4744
- function o(u, c) {
4984
+ function o(u, l) {
4745
4985
  (Array.isArray(u) ? u : [u]).forEach((w) => {
4746
- const l = w == null ? void 0 : w.toLowerCase();
4747
- l && (r[l] = c);
4986
+ const c = w == null ? void 0 : w.toLowerCase();
4987
+ c && (r[c] = l);
4748
4988
  });
4749
- const p = Dr(c, e.cdnUrl);
4989
+ const p = Vr(l, e.cdnUrl);
4750
4990
  p && t && t.addAllowedOrigin(p);
4751
4991
  }
4752
4992
  function i(u) {
@@ -4768,135 +5008,137 @@ function Ks(e, t) {
4768
5008
  };
4769
5009
  }
4770
5010
  function bn(e = {}) {
4771
- const t = Hr(Ws, e), r = ta(), a = { ...Ir, ...t.panels }, s = Xs(a, t.cdnUrl), n = ra(s), o = na(t.theme, t.colors || {}), i = Ks(t, n), u = pa(t.sharing), c = fa(t.editor);
4772
- function d(x, C, L = {}) {
4773
- let S = E.parse(x);
4774
- const D = [], M = { theme: o.resolved }, B = L.inlinePreview ?? t.inlinePreview ?? null, ne = L.inlineCode ?? t.inlineCode ?? null, re = L.tabs ?? t.tabs ?? null, ae = L.viewMode ?? t.viewMode ?? null;
5011
+ const t = Ir(Ws, e), r = ta(), a = { ...Hr, ...t.panels }, s = Xs(a, t.cdnUrl), n = ra(s), o = na(t.theme, t.colors || {}), i = Ks(t, n), u = pa(t.sharing), l = fa(t.editor);
5012
+ function d(k, _, R = {}) {
5013
+ let A = H.parse(k);
5014
+ const D = [], P = { theme: o.resolved }, Z = R.inlinePreview ?? t.inlinePreview ?? null, ne = R.inlineCode ?? t.inlineCode ?? null, re = R.tabs ?? t.tabs ?? null, ae = R.viewMode ?? t.viewMode ?? null;
4775
5015
  if (t.processors.codeBlocks) {
4776
- const O = ea(S, C, {
5016
+ const O = ea(A, _, {
4777
5017
  ...t.codeExtraction,
4778
- inlinePreview: B,
5018
+ inlinePreview: Z,
4779
5019
  inlineCode: ne,
4780
5020
  tabs: re,
4781
5021
  viewMode: ae
4782
5022
  });
4783
- S = O.html, D.push(...O.artifacts);
5023
+ A = O.html, D.push(...O.artifacts);
4784
5024
  }
4785
- return t.processors.images && (S = Qa(S)), t.processors.imageGalleries && (S = Ya(S)), t.processors.videos && (S = as(S)), t.processors.videoGalleries && (S = os(S)), t.processors.audio && (S = us(S, M)), t.processors.maps && (S = bs(S)), t.processors.social && (S = vs(S, M)), t.processors.documents && (S = ys(S), S = ks(S), S = xs(S)), t.processors.codeEmbeds && (S = As(S, M)), t.processors.dataViz && (S = Ss(S)), t.processors.design && (S = Rs(S, M)), t.processors.interactive && (S = zs(S, M)), t.processors.tables && (S = Ts(S)), t.processors.math && (S = Tr(S)), t.processors.mermaid && (S = Lr(S)), D.forEach((O) => {
5025
+ return t.processors.images && (A = Qa(A)), t.processors.imageGalleries && (A = Ya(A)), t.processors.videos && (A = as(A)), t.processors.videoGalleries && (A = os(A)), t.processors.audio && (A = us(A, P)), t.processors.maps && (A = bs(A)), t.processors.social && (A = vs(A, P)), t.processors.documents && (A = ys(A), A = ks(A), A = xs(A)), t.processors.codeEmbeds && (A = $s(A, P)), t.processors.dataViz && (A = zs(A)), t.processors.design && (A = As(A, P)), t.processors.interactive && (A = Ss(A, P)), t.processors.tables && (A = _s(A)), t.processors.math && (A = _r(A)), t.processors.mermaid && (A = Cr(A)), D.forEach((O) => {
4786
5026
  r.addArtifact(O);
4787
5027
  }), {
4788
- html: S,
5028
+ html: A,
4789
5029
  artifacts: D
4790
5030
  };
4791
5031
  }
4792
- async function p(x = document) {
4793
- const C = [], L = { theme: o.resolved };
4794
- t.processors.math && C.push(Pr()), t.processors.mermaid && C.push(_r(L)), t.processors.tables && Zs(), t.processors.audio && ps(x), t.syntaxHighlight && (jr(x), (x === document ? document : x).querySelectorAll(".artifactuse-inline-preview[data-smartdiff]").forEach((M) => {
5032
+ async function p(k = document) {
5033
+ const _ = [], R = { theme: o.resolved };
5034
+ t.processors.math && _.push(Pr()), t.processors.mermaid && _.push(Tr(R)), t.processors.tables && qs(), t.processors.audio && ps(k), t.syntaxHighlight && (jr(k), (k === document ? document : k).querySelectorAll(".artifactuse-inline-preview[data-smartdiff]").forEach((P) => {
4795
5035
  var ae;
4796
- const B = M.querySelector("code");
4797
- if (!B || B.dataset.smartdiffProcessed) return;
4798
- const ne = ((ae = M.dataset.smartdiffMarkers) == null ? void 0 : ae.split(",")) || [], re = B.innerHTML.split(`
5036
+ const Z = P.querySelector("code");
5037
+ if (!Z || Z.dataset.smartdiffProcessed) return;
5038
+ const ne = ((ae = P.dataset.smartdiffMarkers) == null ? void 0 : ae.split(",")) || [], re = Z.innerHTML.split(`
4799
5039
  `);
4800
- B.innerHTML = re.map((O, be) => {
5040
+ Z.innerHTML = re.map((O, be) => {
4801
5041
  const ie = ne[be];
4802
5042
  return ie === "-" ? `<span class="token deleted">${O}</span>` : ie === "+" ? `<span class="token inserted">${O}</span>` : O;
4803
5043
  }).join(`
4804
- `), B.dataset.smartdiffProcessed = "true";
4805
- })), await Promise.all(C);
5044
+ `), Z.dataset.smartdiffProcessed = "true";
5045
+ })), await Promise.all(_);
4806
5046
  }
4807
- function w(x) {
4808
- if (x.isInline) {
4809
- console.warn("Attempted to open inline artifact in panel:", x.id);
5047
+ function w(k) {
5048
+ if (k.isInline) {
5049
+ console.warn("Attempted to open inline artifact in panel:", k.id);
4810
5050
  return;
4811
5051
  }
4812
- r.setActiveArtifact(x.id), r.setPanelOpen(!0), x.viewMode && r.setViewMode(x.viewMode), T("artifact:opened", x);
5052
+ t.multiTab ? r.openTab(k.id) : r.setActiveArtifact(k.id), r.setPanelOpen(!0), k.viewMode && r.setViewMode(k.viewMode), L("artifact:opened", k);
4813
5053
  }
4814
- function l(x, C, L = {}) {
4815
- const S = x.split(".").pop(), D = L.language || Nr(S) || S, M = L.title || x;
4816
- return m(C, D, { ...L, title: M });
5054
+ function c(k, _, R = {}) {
5055
+ const A = k.split(".").pop(), D = R.language || Nr(A) || A, P = R.title || k;
5056
+ return m(_, D, { ...R, title: P });
4817
5057
  }
4818
- function m(x, C, L = {}) {
4819
- const S = L.messageId || Vr("open"), D = k({ type: C, language: C }) ? C : "txt", M = $e(x, D, S, 0);
4820
- return M.title = L.title || M.title, M.isInline = !1, M.editorLanguage = C, L.tabs && (M.tabs = L.tabs), L.panelUrl && (M.panelUrl = L.panelUrl), r.addArtifact(M), w(M), L.viewMode ? r.setViewMode(L.viewMode) : L.tabs && r.setViewMode(L.tabs[0]), M;
5058
+ function m(k, _, R = {}) {
5059
+ const A = R.messageId || Br("open"), D = $({ type: _, language: _ }) ? _ : "txt", P = Me(k, D, A, 0);
5060
+ return P.title = R.title || P.title, P.isInline = !1, P.editorLanguage = _, R.tabs && (P.tabs = R.tabs), R.panelUrl && (P.panelUrl = R.panelUrl), r.addArtifact(P), w(P), R.viewMode ? r.setViewMode(R.viewMode) : R.tabs && r.setViewMode(R.tabs[0]), P;
4821
5061
  }
4822
- function h(x, C, L = {}) {
4823
- const S = typeof x == "string" ? x : x == null ? void 0 : x.id, D = r.getArtifact(S);
5062
+ function h(k, _, R = {}) {
5063
+ const A = typeof k == "string" ? k : k == null ? void 0 : k.id, D = r.getArtifact(A);
4824
5064
  if (!D) return null;
4825
- const M = { ...D, code: C, _refreshToken: Date.now() };
4826
- return L.title !== void 0 && (M.title = L.title), L.tabs !== void 0 && (M.tabs = L.tabs), L.panelUrl !== void 0 && (M.panelUrl = L.panelUrl), r.addArtifact(M), T("artifact:updated", { artifactId: S, artifact: r.getArtifact(S) }), r.getArtifact(S);
5065
+ const P = { ...D, code: _, _refreshToken: Date.now() };
5066
+ return R.title !== void 0 && (P.title = R.title), R.tabs !== void 0 && (P.tabs = R.tabs), R.panelUrl !== void 0 && (P.panelUrl = R.panelUrl), r.addArtifact(P), L("artifact:updated", { artifactId: A, artifact: r.getArtifact(A) }), r.getArtifact(A);
4827
5067
  }
4828
5068
  function g() {
4829
- r.setPanelOpen(!1), r.setFullscreen(!1), T("panel:closed");
5069
+ r.setPanelOpen(!1), r.setFullscreen(!1), L("panel:closed");
4830
5070
  }
4831
5071
  function f() {
4832
- const x = !r.getState().isPanelOpen;
4833
- r.clearActiveArtifact(), r.setPanelOpen(x), x || r.setFullscreen(!1), T("panel:toggled", { isOpen: x });
5072
+ const k = !r.getState().isPanelOpen;
5073
+ r.clearActiveArtifact(), r.setPanelOpen(k), k || r.setFullscreen(!1), L("panel:toggled", { isOpen: k });
4834
5074
  }
4835
5075
  function b() {
4836
- const x = !r.getState().isFullscreen;
4837
- r.setFullscreen(x), T("fullscreen:toggled", { isFullscreen: x });
5076
+ const k = !r.getState().isFullscreen;
5077
+ r.setFullscreen(k), L("fullscreen:toggled", { isFullscreen: k });
4838
5078
  }
4839
- function y(x) {
4840
- r.setViewMode(x), T("viewMode:changed", { mode: x });
5079
+ function v(k) {
5080
+ r.setViewMode(k), L("viewMode:changed", { mode: k });
4841
5081
  }
4842
- function v(x, C = {}) {
4843
- if (!x) return null;
4844
- if (x.panelUrl) return x.panelUrl;
4845
- const { type: L, language: S } = x, D = {
4846
- theme: C.theme || o.resolved
4847
- }, M = o.colors;
4848
- M != null && M.primary && (D.accent = M.primary);
4849
- let B = i.resolve(L, D);
4850
- return !B && S && (B = i.resolve(S, D)), B;
5082
+ function M(k, _ = {}) {
5083
+ if (!k) return null;
5084
+ if (k.panelUrl) return k.panelUrl;
5085
+ const { type: R, language: A } = k, D = {
5086
+ theme: _.theme || o.resolved
5087
+ }, P = o.colors;
5088
+ P != null && P.primary && (D.accent = P.primary);
5089
+ let Z = i.resolve(R, D);
5090
+ return !Z && A && (Z = i.resolve(A, D)), Z;
4851
5091
  }
4852
- function k(x) {
4853
- return x ? i.has(x.type) || i.has(x.language) : !1;
5092
+ function $(k) {
5093
+ return k ? i.has(k.type) || i.has(k.language) : !1;
4854
5094
  }
4855
- function $(x, C) {
4856
- i.register(x, C);
5095
+ function z(k, _) {
5096
+ i.register(k, _);
4857
5097
  }
4858
- function R(x) {
4859
- i.unregister(x);
5098
+ function S(k) {
5099
+ i.unregister(k);
4860
5100
  }
4861
- function z() {
5101
+ function y() {
4862
5102
  return i.getTypes();
4863
5103
  }
4864
- function Z(x, C) {
4865
- n.send(x, C);
5104
+ function C(k, _) {
5105
+ n.send(k, _);
4866
5106
  }
4867
- const A = /* @__PURE__ */ new Map();
4868
- function j(x, C) {
4869
- return A.has(x) || A.set(x, /* @__PURE__ */ new Set()), A.get(x).add(C), () => {
4870
- var L;
4871
- (L = A.get(x)) == null || L.delete(C);
5107
+ const x = /* @__PURE__ */ new Map();
5108
+ function E(k, _) {
5109
+ return x.has(k) || x.set(k, /* @__PURE__ */ new Set()), x.get(k).add(_), () => {
5110
+ var R;
5111
+ (R = x.get(k)) == null || R.delete(_);
4872
5112
  };
4873
5113
  }
4874
- function I(x, C) {
4875
- var L;
4876
- (L = A.get(x)) == null || L.delete(C);
5114
+ function T(k, _) {
5115
+ var R;
5116
+ (R = x.get(k)) == null || R.delete(_);
4877
5117
  }
4878
- function T(x, C) {
4879
- var L;
4880
- (L = A.get(x)) == null || L.forEach((S) => {
5118
+ function L(k, _) {
5119
+ var R;
5120
+ (R = x.get(k)) == null || R.forEach((A) => {
4881
5121
  try {
4882
- S(C);
5122
+ A(_);
4883
5123
  } catch (D) {
4884
- console.error(`Artifactuse event handler error (${x}):`, D);
5124
+ console.error(`Artifactuse event handler error (${k}):`, D);
4885
5125
  }
4886
5126
  });
4887
5127
  }
4888
- n.on("ai:request", (x) => T("ai:request", x)), n.on("save:request", (x) => T("save:request", x)), n.on("export:complete", (x) => T("export:complete", x)), n.on("form:submit", (x) => T("form:submit", x)), n.on("form:cancel", (x) => T("form:cancel", x)), n.on("form:step", (x) => T("form:step", x)), n.on("social:copy", (x) => T("social:copy", x));
4889
- function H() {
5128
+ n.on("ai:request", (k) => L("ai:request", k)), n.on("save:request", (k) => L("save:request", k)), n.on("export:complete", (k) => L("export:complete", k)), n.on("form:submit", (k) => L("form:submit", k)), n.on("form:cancel", (k) => L("form:cancel", k)), n.on("form:step", (k) => L("form:step", k)), n.on("social:copy", (k) => L("social:copy", k)), n.on("edit:save", (k) => {
5129
+ k != null && k.artifactId && (k == null ? void 0 : k.code) !== void 0 && h(k.artifactId, k.code), L("edit:save", k);
5130
+ });
5131
+ function I() {
4890
5132
  o.apply();
4891
5133
  }
4892
- function X(x) {
4893
- o.set(x);
5134
+ function G(k) {
5135
+ o.set(k);
4894
5136
  }
4895
5137
  function te() {
4896
5138
  return o.resolved;
4897
5139
  }
4898
5140
  function U() {
4899
- n.destroy(), A.clear(), r.clear(), ws();
5141
+ n.destroy(), x.clear(), r.clear(), ws();
4900
5142
  }
4901
5143
  return {
4902
5144
  // Config
@@ -4910,33 +5152,37 @@ function bn(e = {}) {
4910
5152
  initializeContent: p,
4911
5153
  // Panel control
4912
5154
  openArtifact: w,
4913
- openFile: l,
5155
+ openFile: c,
4914
5156
  openCode: m,
4915
5157
  updateFile: h,
4916
5158
  closePanel: g,
4917
5159
  togglePanel: f,
4918
5160
  toggleFullscreen: b,
4919
- setViewMode: y,
4920
- getPanelUrl: v,
4921
- sendToPanel: Z,
5161
+ setViewMode: v,
5162
+ getPanelUrl: M,
5163
+ sendToPanel: C,
5164
+ // Multi-tab
5165
+ closeTab: (k) => r.closeTab(k),
5166
+ closeOtherTabs: (k) => r.closeOtherTabs(k),
5167
+ closeAllTabs: () => r.closeAllTabs(),
4922
5168
  // Panel management (new)
4923
- hasPanel: k,
4924
- registerPanel: $,
4925
- unregisterPanel: R,
4926
- getPanelTypes: z,
5169
+ hasPanel: $,
5170
+ registerPanel: z,
5171
+ unregisterPanel: S,
5172
+ getPanelTypes: y,
4927
5173
  panelResolver: i,
4928
5174
  // Expose for advanced use
4929
5175
  // Theme
4930
5176
  theme: o,
4931
- applyTheme: H,
4932
- setTheme: X,
5177
+ applyTheme: I,
5178
+ setTheme: G,
4933
5179
  getTheme: te,
4934
5180
  // Events
4935
- on: j,
4936
- off: I,
4937
- emit: T,
5181
+ on: E,
5182
+ off: T,
5183
+ emit: L,
4938
5184
  // Editor (CodeMirror integration)
4939
- editor: c,
5185
+ editor: l,
4940
5186
  // Bridge (for advanced use)
4941
5187
  bridge: n,
4942
5188
  // Sharing
@@ -4945,7 +5191,7 @@ function bn(e = {}) {
4945
5191
  destroy: U
4946
5192
  };
4947
5193
  }
4948
- function Hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
5194
+ function Ir(e, t, r = /* @__PURE__ */ new WeakSet()) {
4949
5195
  if (!t) return e;
4950
5196
  if (!e) return t;
4951
5197
  if (typeof t == "object" && t !== null) {
@@ -4966,7 +5212,7 @@ function Hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4966
5212
  continue;
4967
5213
  }
4968
5214
  if (typeof n == "object" && n.constructor === Object) {
4969
- a[s] = Hr(e[s] || {}, n, r);
5215
+ a[s] = Ir(e[s] || {}, n, r);
4970
5216
  continue;
4971
5217
  }
4972
5218
  a[s] = n;
@@ -4977,62 +5223,62 @@ function Hr(e, t, r = /* @__PURE__ */ new WeakSet()) {
4977
5223
  export {
4978
5224
  ks as $,
4979
5225
  Oe as A,
4980
- Ve as B,
5226
+ Be as B,
4981
5227
  Fe as C,
4982
- Ir as D,
5228
+ Hr as D,
4983
5229
  Ne as E,
4984
5230
  us as F,
4985
5231
  vt as G,
4986
5232
  yt as H,
4987
- V as I,
5233
+ B as I,
4988
5234
  kt as J,
4989
5235
  ps as K,
4990
5236
  ws as L,
4991
5237
  bs as M,
4992
- W as N,
5238
+ X as N,
4993
5239
  Ue as O,
4994
- Lt as P,
5240
+ Ct as P,
4995
5241
  vs as Q,
4996
- Ct as R,
4997
- Mt as S,
4998
- _t as T,
4999
- Tt as U,
5242
+ Rt as R,
5243
+ Lt as S,
5244
+ Tt as T,
5245
+ _t as U,
5000
5246
  Et as V,
5001
5247
  Pt as W,
5002
5248
  jt as X,
5003
- It as Y,
5249
+ Ht as Y,
5004
5250
  ys as Z,
5005
- Dt as _,
5251
+ Vt as _,
5006
5252
  Ys as a,
5007
5253
  wn as a$,
5008
5254
  se as a0,
5009
- Ht as a1,
5255
+ It as a1,
5010
5256
  xs as a2,
5011
- qt as a3,
5012
- As as a4,
5013
- Zt as a5,
5014
- Bt as a6,
5257
+ Dt as a3,
5258
+ $s as a4,
5259
+ qt as a5,
5260
+ Zt as a6,
5015
5261
  Ot as a7,
5016
- Vt as a8,
5262
+ Bt as a8,
5017
5263
  Ft as a9,
5018
5264
  an as aA,
5019
5265
  sn as aB,
5020
5266
  nn as aC,
5021
5267
  on as aD,
5022
- cn as aE,
5023
- Ts as aF,
5268
+ ln as aE,
5269
+ _s as aF,
5024
5270
  Es as aG,
5025
5271
  js as aH,
5026
- Is as aI,
5027
- Ds as aJ,
5028
- Hs as aK,
5029
- qs as aL,
5030
- Zs as aM,
5031
- Tr as aN,
5272
+ Hs as aI,
5273
+ Vs as aJ,
5274
+ Is as aK,
5275
+ Ds as aL,
5276
+ qs as aM,
5277
+ _r as aN,
5032
5278
  fe as aO,
5033
5279
  Pr as aP,
5034
5280
  Ns as aQ,
5035
- ln as aR,
5281
+ cn as aR,
5036
5282
  un as aS,
5037
5283
  dn as aT,
5038
5284
  pn as aU,
@@ -5043,30 +5289,30 @@ export {
5043
5289
  Us as aZ,
5044
5290
  mn as a_,
5045
5291
  Nt as aa,
5046
- Ss as ab,
5292
+ zs as ab,
5047
5293
  Ut as ac,
5048
5294
  Gt as ad,
5049
5295
  Wt as ae,
5050
5296
  Xt as af,
5051
- Rs as ag,
5297
+ As as ag,
5052
5298
  Kt as ah,
5053
5299
  Jt as ai,
5054
5300
  Qt as aj,
5055
5301
  Yt as ak,
5056
5302
  er as al,
5057
5303
  tr as am,
5058
- zs as an,
5304
+ Ss as an,
5059
5305
  rr as ao,
5060
5306
  ar as ap,
5061
5307
  sr as aq,
5062
5308
  nr as ar,
5063
5309
  ir as as,
5064
5310
  or as at,
5065
- cr as au,
5066
- Lr as av,
5067
- Cs as aw,
5068
- _r as ax,
5069
- _s as ay,
5311
+ lr as au,
5312
+ Cr as av,
5313
+ Rs as aw,
5314
+ Tr as ax,
5315
+ Ts as ay,
5070
5316
  rn as az,
5071
5317
  Qs as b,
5072
5318
  Wr as c,
@@ -5080,17 +5326,17 @@ export {
5080
5326
  ra as k,
5081
5327
  na as l,
5082
5328
  fa as m,
5083
- Ie as n,
5329
+ He as n,
5084
5330
  Qa as o,
5085
5331
  tn as p,
5086
5332
  Ya as q,
5087
- Ze as r,
5333
+ qe as r,
5088
5334
  bt as s,
5089
5335
  as as t,
5090
5336
  es as u,
5091
5337
  rs as v,
5092
- Be as w,
5338
+ Ze as w,
5093
5339
  os as x,
5094
- cs as y,
5340
+ ls as y,
5095
5341
  ns as z
5096
5342
  };