nebula-cms 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (241) hide show
  1. package/.claude/settings.local.json +42 -0
  2. package/.github/workflows/ci.yml +31 -0
  3. package/.mcp.json +12 -0
  4. package/.prettierignore +5 -0
  5. package/.prettierrc.cjs +22 -0
  6. package/AGENTS.md +183 -0
  7. package/LICENSE +201 -0
  8. package/README.md +128 -0
  9. package/package.json +74 -0
  10. package/playground/.claude/settings.local.json +5 -0
  11. package/playground/astro.config.mjs +7 -0
  12. package/playground/node_modules/.bin/astro +21 -0
  13. package/playground/node_modules/.bin/rollup +21 -0
  14. package/playground/node_modules/.bin/tsc +21 -0
  15. package/playground/node_modules/.bin/tsserver +21 -0
  16. package/playground/node_modules/.bin/vite +21 -0
  17. package/playground/node_modules/.vite/_svelte_metadata.json +1 -0
  18. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js +80 -0
  19. package/playground/node_modules/.vite/deps/@astrojs_svelte_client__js.js.map +7 -0
  20. package/playground/node_modules/.vite/deps/_metadata.json +184 -0
  21. package/playground/node_modules/.vite/deps/astro___aria-query.js +6776 -0
  22. package/playground/node_modules/.vite/deps/astro___aria-query.js.map +7 -0
  23. package/playground/node_modules/.vite/deps/astro___axobject-query.js +3754 -0
  24. package/playground/node_modules/.vite/deps/astro___axobject-query.js.map +7 -0
  25. package/playground/node_modules/.vite/deps/astro___html-escaper.js +34 -0
  26. package/playground/node_modules/.vite/deps/astro___html-escaper.js.map +7 -0
  27. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js +0 -0
  28. package/playground/node_modules/.vite/deps/chunk-AJXJMYAF.js.map +7 -0
  29. package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js +1005 -0
  30. package/playground/node_modules/.vite/deps/chunk-ALJIOON6.js.map +7 -0
  31. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js +8 -0
  32. package/playground/node_modules/.vite/deps/chunk-BUSYA2B4.js.map +7 -0
  33. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js +21 -0
  34. package/playground/node_modules/.vite/deps/chunk-CNYJBM5F.js.map +7 -0
  35. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js +223 -0
  36. package/playground/node_modules/.vite/deps/chunk-DBPNBGEI.js.map +7 -0
  37. package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js +204 -0
  38. package/playground/node_modules/.vite/deps/chunk-G3C2FXJT.js.map +7 -0
  39. package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js +27 -0
  40. package/playground/node_modules/.vite/deps/chunk-GKDKFWC5.js.map +7 -0
  41. package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js +4376 -0
  42. package/playground/node_modules/.vite/deps/chunk-HNCLEOC5.js.map +7 -0
  43. package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js +688 -0
  44. package/playground/node_modules/.vite/deps/chunk-JICYXBFU.js.map +7 -0
  45. package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js +5099 -0
  46. package/playground/node_modules/.vite/deps/chunk-KCUTL6DD.js.map +7 -0
  47. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js +23 -0
  48. package/playground/node_modules/.vite/deps/chunk-ZP4UNCSN.js.map +7 -0
  49. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js +148 -0
  50. package/playground/node_modules/.vite/deps/chunk-ZREFNRZZ.js.map +7 -0
  51. package/playground/node_modules/.vite/deps/package.json +3 -0
  52. package/playground/node_modules/.vite/deps/smol-toml.js +843 -0
  53. package/playground/node_modules/.vite/deps/smol-toml.js.map +7 -0
  54. package/playground/node_modules/.vite/deps/svelte.js +55 -0
  55. package/playground/node_modules/.vite/deps/svelte.js.map +7 -0
  56. package/playground/node_modules/.vite/deps/svelte___clsx.js +9 -0
  57. package/playground/node_modules/.vite/deps/svelte___clsx.js.map +7 -0
  58. package/playground/node_modules/.vite/deps/svelte_animate.js +57 -0
  59. package/playground/node_modules/.vite/deps/svelte_animate.js.map +7 -0
  60. package/playground/node_modules/.vite/deps/svelte_attachments.js +15 -0
  61. package/playground/node_modules/.vite/deps/svelte_attachments.js.map +7 -0
  62. package/playground/node_modules/.vite/deps/svelte_easing.js +67 -0
  63. package/playground/node_modules/.vite/deps/svelte_easing.js.map +7 -0
  64. package/playground/node_modules/.vite/deps/svelte_events.js +11 -0
  65. package/playground/node_modules/.vite/deps/svelte_events.js.map +7 -0
  66. package/playground/node_modules/.vite/deps/svelte_internal.js +5 -0
  67. package/playground/node_modules/.vite/deps/svelte_internal.js.map +7 -0
  68. package/playground/node_modules/.vite/deps/svelte_internal_client.js +402 -0
  69. package/playground/node_modules/.vite/deps/svelte_internal_client.js.map +7 -0
  70. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js +10 -0
  71. package/playground/node_modules/.vite/deps/svelte_internal_disclose-version.js.map +7 -0
  72. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js +8 -0
  73. package/playground/node_modules/.vite/deps/svelte_internal_flags_async.js.map +7 -0
  74. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js +8 -0
  75. package/playground/node_modules/.vite/deps/svelte_internal_flags_legacy.js.map +7 -0
  76. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js +8 -0
  77. package/playground/node_modules/.vite/deps/svelte_internal_flags_tracing.js.map +7 -0
  78. package/playground/node_modules/.vite/deps/svelte_legacy.js +35 -0
  79. package/playground/node_modules/.vite/deps/svelte_legacy.js.map +7 -0
  80. package/playground/node_modules/.vite/deps/svelte_motion.js +545 -0
  81. package/playground/node_modules/.vite/deps/svelte_motion.js.map +7 -0
  82. package/playground/node_modules/.vite/deps/svelte_reactivity.js +29 -0
  83. package/playground/node_modules/.vite/deps/svelte_reactivity.js.map +7 -0
  84. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js +127 -0
  85. package/playground/node_modules/.vite/deps/svelte_reactivity_window.js.map +7 -0
  86. package/playground/node_modules/.vite/deps/svelte_store.js +103 -0
  87. package/playground/node_modules/.vite/deps/svelte_store.js.map +7 -0
  88. package/playground/node_modules/.vite/deps/svelte_transition.js +208 -0
  89. package/playground/node_modules/.vite/deps/svelte_transition.js.map +7 -0
  90. package/playground/package.json +16 -0
  91. package/playground/pnpm-lock.yaml +3167 -0
  92. package/playground/src/content/authors/jane-doe.json +8 -0
  93. package/playground/src/content/config/build.toml +2 -0
  94. package/playground/src/content/courses/web-fundamentals.json +29 -0
  95. package/playground/src/content/docs/advanced.mdx +6 -0
  96. package/playground/src/content/docs/intro.md +6 -0
  97. package/playground/src/content/guides/getting-started.mdx +6 -0
  98. package/playground/src/content/posts/hello-world.md +7 -0
  99. package/playground/src/content/products/t-shirt.json +16 -0
  100. package/playground/src/content/recipes/pancakes.mdoc +8 -0
  101. package/playground/src/content/settings/site.yml +2 -0
  102. package/playground/src/content.config.ts +198 -0
  103. package/playground/src/env.d.ts +1 -0
  104. package/playground/src/pages/index.astro +11 -0
  105. package/playground/src/pages/nebula.astro +14 -0
  106. package/pnpm-workspace.yaml +2 -0
  107. package/scripts/subset-icons.mjs +178 -0
  108. package/src/astro/index.ts +295 -0
  109. package/src/client/Admin.svelte +283 -0
  110. package/src/client/components/BackendPicker.svelte +291 -0
  111. package/src/client/components/DraftChip.svelte +46 -0
  112. package/src/client/components/MetadataForm.svelte +56 -0
  113. package/src/client/components/ThemeToggle.svelte +18 -0
  114. package/src/client/components/dialogs/DeleteDraftDialog.svelte +51 -0
  115. package/src/client/components/dialogs/FilenameDialog.svelte +129 -0
  116. package/src/client/components/editor/EditorPane.svelte +227 -0
  117. package/src/client/components/editor/EditorTabs.svelte +81 -0
  118. package/src/client/components/editor/EditorToolbar.svelte +131 -0
  119. package/src/client/components/editor/FormatSelector.svelte +66 -0
  120. package/src/client/components/editor/Toolbar.svelte +17 -0
  121. package/src/client/components/fields/ArrayField.svelte +339 -0
  122. package/src/client/components/fields/ArrayItem.svelte +325 -0
  123. package/src/client/components/fields/BooleanField.svelte +114 -0
  124. package/src/client/components/fields/DateField.svelte +82 -0
  125. package/src/client/components/fields/EnumField.svelte +74 -0
  126. package/src/client/components/fields/FieldWrapper.svelte +96 -0
  127. package/src/client/components/fields/NumberField.svelte +99 -0
  128. package/src/client/components/fields/ObjectField.svelte +121 -0
  129. package/src/client/components/fields/SchemaField.svelte +107 -0
  130. package/src/client/components/fields/StringField.svelte +104 -0
  131. package/src/client/components/sidebar/AdminSidebar.svelte +339 -0
  132. package/src/client/components/sidebar/AdminSidebarSort.svelte +123 -0
  133. package/src/client/css/a11y.css +14 -0
  134. package/src/client/css/btn.css +113 -0
  135. package/src/client/css/dialog.css +29 -0
  136. package/src/client/css/field-input.css +39 -0
  137. package/src/client/css/reset.css +59 -0
  138. package/src/client/css/theme.css +77 -0
  139. package/src/client/index.ts +1 -0
  140. package/src/client/js/drafts/merge.svelte.ts +121 -0
  141. package/src/client/js/drafts/ops.svelte.ts +227 -0
  142. package/src/client/js/drafts/storage.ts +108 -0
  143. package/src/client/js/drafts/workers/diff.ts +40 -0
  144. package/src/client/js/editor/editor.svelte.ts +343 -0
  145. package/src/client/js/editor/languages.ts +98 -0
  146. package/src/client/js/editor/link-wrap.ts +45 -0
  147. package/src/client/js/editor/markdown-shortcuts.ts +261 -0
  148. package/src/client/js/handlers/admin.ts +246 -0
  149. package/src/client/js/state/dialogs.svelte.ts +35 -0
  150. package/src/client/js/state/router.svelte.ts +156 -0
  151. package/src/client/js/state/schema.svelte.ts +140 -0
  152. package/src/client/js/state/state.svelte.ts +334 -0
  153. package/src/client/js/state/theme.svelte.ts +173 -0
  154. package/src/client/js/storage/adapter.ts +102 -0
  155. package/src/client/js/storage/client.ts +150 -0
  156. package/src/client/js/storage/db.ts +36 -0
  157. package/src/client/js/storage/fsa.ts +110 -0
  158. package/src/client/js/storage/github.ts +297 -0
  159. package/src/client/js/storage/storage.ts +83 -0
  160. package/src/client/js/storage/workers/frontmatter.ts +320 -0
  161. package/src/client/js/storage/workers/storage.ts +177 -0
  162. package/src/client/js/storage/workers/toml-parser.ts +106 -0
  163. package/src/client/js/storage/workers/yaml-parser.ts +132 -0
  164. package/src/client/js/utils/file-types.ts +192 -0
  165. package/src/client/js/utils/format.ts +16 -0
  166. package/src/client/js/utils/frontmatter.ts +38 -0
  167. package/src/client/js/utils/schema-utils.ts +295 -0
  168. package/src/client/js/utils/slug.ts +18 -0
  169. package/src/client/js/utils/sort.ts +84 -0
  170. package/src/client/js/utils/stable-stringify.ts +27 -0
  171. package/src/client/js/utils/url-utils.ts +38 -0
  172. package/src/types.ts +25 -0
  173. package/src/virtual.d.ts +22 -0
  174. package/svelte.config.js +4 -0
  175. package/tests/astro/build.test.ts +63 -0
  176. package/tests/astro/index.test.ts +689 -0
  177. package/tests/client/components/Admin.test.ts +446 -0
  178. package/tests/client/components/BackendPicker.test.ts +239 -0
  179. package/tests/client/components/DraftChip.test.ts +53 -0
  180. package/tests/client/components/MetadataForm.test.ts +164 -0
  181. package/tests/client/components/dialogs/DeleteDraftDialog.test.ts +91 -0
  182. package/tests/client/components/dialogs/FilenameDialog.test.ts +209 -0
  183. package/tests/client/components/dialogs/dialog-stubs.ts +19 -0
  184. package/tests/client/components/editor/EditorPane.test.ts +100 -0
  185. package/tests/client/components/editor/EditorTabs.test.ts +253 -0
  186. package/tests/client/components/editor/EditorToolbar.test.ts +252 -0
  187. package/tests/client/components/editor/fixtures.ts +31 -0
  188. package/tests/client/components/fields/ArrayField.test.ts +197 -0
  189. package/tests/client/components/fields/BooleanField.test.ts +206 -0
  190. package/tests/client/components/fields/DateField.test.ts +210 -0
  191. package/tests/client/components/fields/EnumField.test.ts +246 -0
  192. package/tests/client/components/fields/NumberField.test.ts +240 -0
  193. package/tests/client/components/fields/ObjectField.test.ts +157 -0
  194. package/tests/client/components/fields/SchemaField.test.ts +190 -0
  195. package/tests/client/components/fields/StringField.test.ts +223 -0
  196. package/tests/client/components/sidebar/AdminSidebar.test.ts +285 -0
  197. package/tests/client/components/sidebar/AdminSidebarSort.test.ts +135 -0
  198. package/tests/client/components/sidebar/sort-mock.ts +23 -0
  199. package/tests/client/js/drafts/fixtures.ts +22 -0
  200. package/tests/client/js/drafts/merge.test.ts +282 -0
  201. package/tests/client/js/drafts/ops.test.ts +658 -0
  202. package/tests/client/js/drafts/storage.test.ts +200 -0
  203. package/tests/client/js/drafts/workers/diff.test.ts +165 -0
  204. package/tests/client/js/editor/editor.test.ts +616 -0
  205. package/tests/client/js/editor/link-wrap.test.ts +225 -0
  206. package/tests/client/js/editor/markdown-shortcuts.test.ts +370 -0
  207. package/tests/client/js/handlers/admin.test.ts +467 -0
  208. package/tests/client/js/state/router.test.ts +619 -0
  209. package/tests/client/js/state/schema.test.ts +266 -0
  210. package/tests/client/js/state/state.test.ts +328 -0
  211. package/tests/client/js/storage/adapter.test.ts +115 -0
  212. package/tests/client/js/storage/client.test.ts +250 -0
  213. package/tests/client/js/storage/db.test.ts +59 -0
  214. package/tests/client/js/storage/fsa.test.ts +284 -0
  215. package/tests/client/js/storage/github.test.ts +349 -0
  216. package/tests/client/js/storage/mock-port.ts +95 -0
  217. package/tests/client/js/storage/storage.test.ts +77 -0
  218. package/tests/client/js/storage/workers/frontmatter.test.ts +479 -0
  219. package/tests/client/js/storage/workers/storage.test.ts +299 -0
  220. package/tests/client/js/storage/workers/toml-parser.test.ts +169 -0
  221. package/tests/client/js/storage/workers/yaml-parser.test.ts +168 -0
  222. package/tests/client/js/utils/file-types.test.ts +268 -0
  223. package/tests/client/js/utils/frontmatter.test.ts +87 -0
  224. package/tests/client/js/utils/schema-utils.test.ts +318 -0
  225. package/tests/client/js/utils/slug.test.ts +58 -0
  226. package/tests/client/js/utils/sort.test.ts +276 -0
  227. package/tests/client/js/utils/stable-stringify.test.ts +68 -0
  228. package/tests/client/js/utils/url-utils.test.ts +70 -0
  229. package/tests/e2e/backend-connection.test.ts +301 -0
  230. package/tests/e2e/draft-lifecycle.test.ts +388 -0
  231. package/tests/e2e/editing.test.ts +355 -0
  232. package/tests/e2e/github-adapter.test.ts +330 -0
  233. package/tests/e2e/helpers/mock-adapter.ts +166 -0
  234. package/tests/e2e/helpers/test-app.ts +155 -0
  235. package/tests/e2e/navigation.test.ts +358 -0
  236. package/tests/e2e/publishing.test.ts +345 -0
  237. package/tests/e2e/unsaved-changes.test.ts +317 -0
  238. package/tests/setup.ts +2 -0
  239. package/tests/stubs/codemirror.ts +197 -0
  240. package/tsconfig.json +19 -0
  241. package/vitest.config.ts +178 -0
@@ -0,0 +1,843 @@
1
+ import "./chunk-BUSYA2B4.js";
2
+
3
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/error.js
4
+ function getLineColFromPtr(string, ptr) {
5
+ let lines = string.slice(0, ptr).split(/\r\n|\n|\r/g);
6
+ return [lines.length, lines.pop().length + 1];
7
+ }
8
+ function makeCodeBlock(string, line, column) {
9
+ let lines = string.split(/\r\n|\n|\r/g);
10
+ let codeblock = "";
11
+ let numberLen = (Math.log10(line + 1) | 0) + 1;
12
+ for (let i = line - 1; i <= line + 1; i++) {
13
+ let l = lines[i - 1];
14
+ if (!l)
15
+ continue;
16
+ codeblock += i.toString().padEnd(numberLen, " ");
17
+ codeblock += ": ";
18
+ codeblock += l;
19
+ codeblock += "\n";
20
+ if (i === line) {
21
+ codeblock += " ".repeat(numberLen + column + 2);
22
+ codeblock += "^\n";
23
+ }
24
+ }
25
+ return codeblock;
26
+ }
27
+ var TomlError = class extends Error {
28
+ line;
29
+ column;
30
+ codeblock;
31
+ constructor(message, options) {
32
+ const [line, column] = getLineColFromPtr(options.toml, options.ptr);
33
+ const codeblock = makeCodeBlock(options.toml, line, column);
34
+ super(`Invalid TOML document: ${message}
35
+
36
+ ${codeblock}`, options);
37
+ this.line = line;
38
+ this.column = column;
39
+ this.codeblock = codeblock;
40
+ }
41
+ };
42
+
43
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/util.js
44
+ function isEscaped(str, ptr) {
45
+ let i = 0;
46
+ while (str[ptr - ++i] === "\\")
47
+ ;
48
+ return --i && i % 2;
49
+ }
50
+ function indexOfNewline(str, start = 0, end = str.length) {
51
+ let idx = str.indexOf("\n", start);
52
+ if (str[idx - 1] === "\r")
53
+ idx--;
54
+ return idx <= end ? idx : -1;
55
+ }
56
+ function skipComment(str, ptr) {
57
+ for (let i = ptr; i < str.length; i++) {
58
+ let c = str[i];
59
+ if (c === "\n")
60
+ return i;
61
+ if (c === "\r" && str[i + 1] === "\n")
62
+ return i + 1;
63
+ if (c < " " && c !== " " || c === "") {
64
+ throw new TomlError("control characters are not allowed in comments", {
65
+ toml: str,
66
+ ptr
67
+ });
68
+ }
69
+ }
70
+ return str.length;
71
+ }
72
+ function skipVoid(str, ptr, banNewLines, banComments) {
73
+ let c;
74
+ while (1) {
75
+ while ((c = str[ptr]) === " " || c === " " || !banNewLines && (c === "\n" || c === "\r" && str[ptr + 1] === "\n"))
76
+ ptr++;
77
+ if (banComments || c !== "#")
78
+ break;
79
+ ptr = skipComment(str, ptr);
80
+ }
81
+ return ptr;
82
+ }
83
+ function skipUntil(str, ptr, sep, end, banNewLines = false) {
84
+ if (!end) {
85
+ ptr = indexOfNewline(str, ptr);
86
+ return ptr < 0 ? str.length : ptr;
87
+ }
88
+ for (let i = ptr; i < str.length; i++) {
89
+ let c = str[i];
90
+ if (c === "#") {
91
+ i = indexOfNewline(str, i);
92
+ } else if (c === sep) {
93
+ return i + 1;
94
+ } else if (c === end || banNewLines && (c === "\n" || c === "\r" && str[i + 1] === "\n")) {
95
+ return i;
96
+ }
97
+ }
98
+ throw new TomlError("cannot find end of structure", {
99
+ toml: str,
100
+ ptr
101
+ });
102
+ }
103
+ function getStringEnd(str, seek) {
104
+ let first = str[seek];
105
+ let target = first === str[seek + 1] && str[seek + 1] === str[seek + 2] ? str.slice(seek, seek + 3) : first;
106
+ seek += target.length - 1;
107
+ do
108
+ seek = str.indexOf(target, ++seek);
109
+ while (seek > -1 && first !== "'" && isEscaped(str, seek));
110
+ if (seek > -1) {
111
+ seek += target.length;
112
+ if (target.length > 1) {
113
+ if (str[seek] === first)
114
+ seek++;
115
+ if (str[seek] === first)
116
+ seek++;
117
+ }
118
+ }
119
+ return seek;
120
+ }
121
+
122
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/date.js
123
+ var DATE_TIME_RE = /^(\d{4}-\d{2}-\d{2})?[T ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|[-+]\d{2}:\d{2})?$/i;
124
+ var TomlDate = class _TomlDate extends Date {
125
+ #hasDate = false;
126
+ #hasTime = false;
127
+ #offset = null;
128
+ constructor(date) {
129
+ let hasDate = true;
130
+ let hasTime = true;
131
+ let offset = "Z";
132
+ if (typeof date === "string") {
133
+ let match = date.match(DATE_TIME_RE);
134
+ if (match) {
135
+ if (!match[1]) {
136
+ hasDate = false;
137
+ date = `0000-01-01T${date}`;
138
+ }
139
+ hasTime = !!match[2];
140
+ hasTime && date[10] === " " && (date = date.replace(" ", "T"));
141
+ if (match[2] && +match[2] > 23) {
142
+ date = "";
143
+ } else {
144
+ offset = match[3] || null;
145
+ date = date.toUpperCase();
146
+ if (!offset && hasTime)
147
+ date += "Z";
148
+ }
149
+ } else {
150
+ date = "";
151
+ }
152
+ }
153
+ super(date);
154
+ if (!isNaN(this.getTime())) {
155
+ this.#hasDate = hasDate;
156
+ this.#hasTime = hasTime;
157
+ this.#offset = offset;
158
+ }
159
+ }
160
+ isDateTime() {
161
+ return this.#hasDate && this.#hasTime;
162
+ }
163
+ isLocal() {
164
+ return !this.#hasDate || !this.#hasTime || !this.#offset;
165
+ }
166
+ isDate() {
167
+ return this.#hasDate && !this.#hasTime;
168
+ }
169
+ isTime() {
170
+ return this.#hasTime && !this.#hasDate;
171
+ }
172
+ isValid() {
173
+ return this.#hasDate || this.#hasTime;
174
+ }
175
+ toISOString() {
176
+ let iso = super.toISOString();
177
+ if (this.isDate())
178
+ return iso.slice(0, 10);
179
+ if (this.isTime())
180
+ return iso.slice(11, 23);
181
+ if (this.#offset === null)
182
+ return iso.slice(0, -1);
183
+ if (this.#offset === "Z")
184
+ return iso;
185
+ let offset = +this.#offset.slice(1, 3) * 60 + +this.#offset.slice(4, 6);
186
+ offset = this.#offset[0] === "-" ? offset : -offset;
187
+ let offsetDate = new Date(this.getTime() - offset * 6e4);
188
+ return offsetDate.toISOString().slice(0, -1) + this.#offset;
189
+ }
190
+ static wrapAsOffsetDateTime(jsDate, offset = "Z") {
191
+ let date = new _TomlDate(jsDate);
192
+ date.#offset = offset;
193
+ return date;
194
+ }
195
+ static wrapAsLocalDateTime(jsDate) {
196
+ let date = new _TomlDate(jsDate);
197
+ date.#offset = null;
198
+ return date;
199
+ }
200
+ static wrapAsLocalDate(jsDate) {
201
+ let date = new _TomlDate(jsDate);
202
+ date.#hasTime = false;
203
+ date.#offset = null;
204
+ return date;
205
+ }
206
+ static wrapAsLocalTime(jsDate) {
207
+ let date = new _TomlDate(jsDate);
208
+ date.#hasDate = false;
209
+ date.#offset = null;
210
+ return date;
211
+ }
212
+ };
213
+
214
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/primitive.js
215
+ var INT_REGEX = /^((0x[0-9a-fA-F](_?[0-9a-fA-F])*)|(([+-]|0[ob])?\d(_?\d)*))$/;
216
+ var FLOAT_REGEX = /^[+-]?\d(_?\d)*(\.\d(_?\d)*)?([eE][+-]?\d(_?\d)*)?$/;
217
+ var LEADING_ZERO = /^[+-]?0[0-9_]/;
218
+ var ESCAPE_REGEX = /^[0-9a-f]{2,8}$/i;
219
+ var ESC_MAP = {
220
+ b: "\b",
221
+ t: " ",
222
+ n: "\n",
223
+ f: "\f",
224
+ r: "\r",
225
+ e: "\x1B",
226
+ '"': '"',
227
+ "\\": "\\"
228
+ };
229
+ function parseString(str, ptr = 0, endPtr = str.length) {
230
+ let isLiteral = str[ptr] === "'";
231
+ let isMultiline = str[ptr++] === str[ptr] && str[ptr] === str[ptr + 1];
232
+ if (isMultiline) {
233
+ endPtr -= 2;
234
+ if (str[ptr += 2] === "\r")
235
+ ptr++;
236
+ if (str[ptr] === "\n")
237
+ ptr++;
238
+ }
239
+ let tmp = 0;
240
+ let isEscape;
241
+ let parsed = "";
242
+ let sliceStart = ptr;
243
+ while (ptr < endPtr - 1) {
244
+ let c = str[ptr++];
245
+ if (c === "\n" || c === "\r" && str[ptr] === "\n") {
246
+ if (!isMultiline) {
247
+ throw new TomlError("newlines are not allowed in strings", {
248
+ toml: str,
249
+ ptr: ptr - 1
250
+ });
251
+ }
252
+ } else if (c < " " && c !== " " || c === "") {
253
+ throw new TomlError("control characters are not allowed in strings", {
254
+ toml: str,
255
+ ptr: ptr - 1
256
+ });
257
+ }
258
+ if (isEscape) {
259
+ isEscape = false;
260
+ if (c === "x" || c === "u" || c === "U") {
261
+ let code = str.slice(ptr, ptr += c === "x" ? 2 : c === "u" ? 4 : 8);
262
+ if (!ESCAPE_REGEX.test(code)) {
263
+ throw new TomlError("invalid unicode escape", {
264
+ toml: str,
265
+ ptr: tmp
266
+ });
267
+ }
268
+ try {
269
+ parsed += String.fromCodePoint(parseInt(code, 16));
270
+ } catch {
271
+ throw new TomlError("invalid unicode escape", {
272
+ toml: str,
273
+ ptr: tmp
274
+ });
275
+ }
276
+ } else if (isMultiline && (c === "\n" || c === " " || c === " " || c === "\r")) {
277
+ ptr = skipVoid(str, ptr - 1, true);
278
+ if (str[ptr] !== "\n" && str[ptr] !== "\r") {
279
+ throw new TomlError("invalid escape: only line-ending whitespace may be escaped", {
280
+ toml: str,
281
+ ptr: tmp
282
+ });
283
+ }
284
+ ptr = skipVoid(str, ptr);
285
+ } else if (c in ESC_MAP) {
286
+ parsed += ESC_MAP[c];
287
+ } else {
288
+ throw new TomlError("unrecognized escape sequence", {
289
+ toml: str,
290
+ ptr: tmp
291
+ });
292
+ }
293
+ sliceStart = ptr;
294
+ } else if (!isLiteral && c === "\\") {
295
+ tmp = ptr - 1;
296
+ isEscape = true;
297
+ parsed += str.slice(sliceStart, tmp);
298
+ }
299
+ }
300
+ return parsed + str.slice(sliceStart, endPtr - 1);
301
+ }
302
+ function parseValue(value, toml, ptr, integersAsBigInt) {
303
+ if (value === "true")
304
+ return true;
305
+ if (value === "false")
306
+ return false;
307
+ if (value === "-inf")
308
+ return -Infinity;
309
+ if (value === "inf" || value === "+inf")
310
+ return Infinity;
311
+ if (value === "nan" || value === "+nan" || value === "-nan")
312
+ return NaN;
313
+ if (value === "-0")
314
+ return integersAsBigInt ? 0n : 0;
315
+ let isInt = INT_REGEX.test(value);
316
+ if (isInt || FLOAT_REGEX.test(value)) {
317
+ if (LEADING_ZERO.test(value)) {
318
+ throw new TomlError("leading zeroes are not allowed", {
319
+ toml,
320
+ ptr
321
+ });
322
+ }
323
+ value = value.replace(/_/g, "");
324
+ let numeric = +value;
325
+ if (isNaN(numeric)) {
326
+ throw new TomlError("invalid number", {
327
+ toml,
328
+ ptr
329
+ });
330
+ }
331
+ if (isInt) {
332
+ if ((isInt = !Number.isSafeInteger(numeric)) && !integersAsBigInt) {
333
+ throw new TomlError("integer value cannot be represented losslessly", {
334
+ toml,
335
+ ptr
336
+ });
337
+ }
338
+ if (isInt || integersAsBigInt === true)
339
+ numeric = BigInt(value);
340
+ }
341
+ return numeric;
342
+ }
343
+ const date = new TomlDate(value);
344
+ if (!date.isValid()) {
345
+ throw new TomlError("invalid value", {
346
+ toml,
347
+ ptr
348
+ });
349
+ }
350
+ return date;
351
+ }
352
+
353
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/extract.js
354
+ function sliceAndTrimEndOf(str, startPtr, endPtr) {
355
+ let value = str.slice(startPtr, endPtr);
356
+ let commentIdx = value.indexOf("#");
357
+ if (commentIdx > -1) {
358
+ skipComment(str, commentIdx);
359
+ value = value.slice(0, commentIdx);
360
+ }
361
+ return [value.trimEnd(), commentIdx];
362
+ }
363
+ function extractValue(str, ptr, end, depth, integersAsBigInt) {
364
+ if (depth === 0) {
365
+ throw new TomlError("document contains excessively nested structures. aborting.", {
366
+ toml: str,
367
+ ptr
368
+ });
369
+ }
370
+ let c = str[ptr];
371
+ if (c === "[" || c === "{") {
372
+ let [value, endPtr2] = c === "[" ? parseArray(str, ptr, depth, integersAsBigInt) : parseInlineTable(str, ptr, depth, integersAsBigInt);
373
+ if (end) {
374
+ endPtr2 = skipVoid(str, endPtr2);
375
+ if (str[endPtr2] === ",")
376
+ endPtr2++;
377
+ else if (str[endPtr2] !== end) {
378
+ throw new TomlError("expected comma or end of structure", {
379
+ toml: str,
380
+ ptr: endPtr2
381
+ });
382
+ }
383
+ }
384
+ return [value, endPtr2];
385
+ }
386
+ let endPtr;
387
+ if (c === '"' || c === "'") {
388
+ endPtr = getStringEnd(str, ptr);
389
+ let parsed = parseString(str, ptr, endPtr);
390
+ if (end) {
391
+ endPtr = skipVoid(str, endPtr);
392
+ if (str[endPtr] && str[endPtr] !== "," && str[endPtr] !== end && str[endPtr] !== "\n" && str[endPtr] !== "\r") {
393
+ throw new TomlError("unexpected character encountered", {
394
+ toml: str,
395
+ ptr: endPtr
396
+ });
397
+ }
398
+ endPtr += +(str[endPtr] === ",");
399
+ }
400
+ return [parsed, endPtr];
401
+ }
402
+ endPtr = skipUntil(str, ptr, ",", end);
403
+ let slice = sliceAndTrimEndOf(str, ptr, endPtr - +(str[endPtr - 1] === ","));
404
+ if (!slice[0]) {
405
+ throw new TomlError("incomplete key-value declaration: no value specified", {
406
+ toml: str,
407
+ ptr
408
+ });
409
+ }
410
+ if (end && slice[1] > -1) {
411
+ endPtr = skipVoid(str, ptr + slice[1]);
412
+ endPtr += +(str[endPtr] === ",");
413
+ }
414
+ return [
415
+ parseValue(slice[0], str, ptr, integersAsBigInt),
416
+ endPtr
417
+ ];
418
+ }
419
+
420
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/struct.js
421
+ var KEY_PART_RE = /^[a-zA-Z0-9-_]+[ \t]*$/;
422
+ function parseKey(str, ptr, end = "=") {
423
+ let dot = ptr - 1;
424
+ let parsed = [];
425
+ let endPtr = str.indexOf(end, ptr);
426
+ if (endPtr < 0) {
427
+ throw new TomlError("incomplete key-value: cannot find end of key", {
428
+ toml: str,
429
+ ptr
430
+ });
431
+ }
432
+ do {
433
+ let c = str[ptr = ++dot];
434
+ if (c !== " " && c !== " ") {
435
+ if (c === '"' || c === "'") {
436
+ if (c === str[ptr + 1] && c === str[ptr + 2]) {
437
+ throw new TomlError("multiline strings are not allowed in keys", {
438
+ toml: str,
439
+ ptr
440
+ });
441
+ }
442
+ let eos = getStringEnd(str, ptr);
443
+ if (eos < 0) {
444
+ throw new TomlError("unfinished string encountered", {
445
+ toml: str,
446
+ ptr
447
+ });
448
+ }
449
+ dot = str.indexOf(".", eos);
450
+ let strEnd = str.slice(eos, dot < 0 || dot > endPtr ? endPtr : dot);
451
+ let newLine = indexOfNewline(strEnd);
452
+ if (newLine > -1) {
453
+ throw new TomlError("newlines are not allowed in keys", {
454
+ toml: str,
455
+ ptr: ptr + dot + newLine
456
+ });
457
+ }
458
+ if (strEnd.trimStart()) {
459
+ throw new TomlError("found extra tokens after the string part", {
460
+ toml: str,
461
+ ptr: eos
462
+ });
463
+ }
464
+ if (endPtr < eos) {
465
+ endPtr = str.indexOf(end, eos);
466
+ if (endPtr < 0) {
467
+ throw new TomlError("incomplete key-value: cannot find end of key", {
468
+ toml: str,
469
+ ptr
470
+ });
471
+ }
472
+ }
473
+ parsed.push(parseString(str, ptr, eos));
474
+ } else {
475
+ dot = str.indexOf(".", ptr);
476
+ let part = str.slice(ptr, dot < 0 || dot > endPtr ? endPtr : dot);
477
+ if (!KEY_PART_RE.test(part)) {
478
+ throw new TomlError("only letter, numbers, dashes and underscores are allowed in keys", {
479
+ toml: str,
480
+ ptr
481
+ });
482
+ }
483
+ parsed.push(part.trimEnd());
484
+ }
485
+ }
486
+ } while (dot + 1 && dot < endPtr);
487
+ return [parsed, skipVoid(str, endPtr + 1, true, true)];
488
+ }
489
+ function parseInlineTable(str, ptr, depth, integersAsBigInt) {
490
+ let res = {};
491
+ let seen = /* @__PURE__ */ new Set();
492
+ let c;
493
+ ptr++;
494
+ while ((c = str[ptr++]) !== "}" && c) {
495
+ if (c === ",") {
496
+ throw new TomlError("expected value, found comma", {
497
+ toml: str,
498
+ ptr: ptr - 1
499
+ });
500
+ } else if (c === "#")
501
+ ptr = skipComment(str, ptr);
502
+ else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
503
+ let k;
504
+ let t = res;
505
+ let hasOwn = false;
506
+ let [key, keyEndPtr] = parseKey(str, ptr - 1);
507
+ for (let i = 0; i < key.length; i++) {
508
+ if (i)
509
+ t = hasOwn ? t[k] : t[k] = {};
510
+ k = key[i];
511
+ if ((hasOwn = Object.hasOwn(t, k)) && (typeof t[k] !== "object" || seen.has(t[k]))) {
512
+ throw new TomlError("trying to redefine an already defined value", {
513
+ toml: str,
514
+ ptr
515
+ });
516
+ }
517
+ if (!hasOwn && k === "__proto__") {
518
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
519
+ }
520
+ }
521
+ if (hasOwn) {
522
+ throw new TomlError("trying to redefine an already defined value", {
523
+ toml: str,
524
+ ptr
525
+ });
526
+ }
527
+ let [value, valueEndPtr] = extractValue(str, keyEndPtr, "}", depth - 1, integersAsBigInt);
528
+ seen.add(value);
529
+ t[k] = value;
530
+ ptr = valueEndPtr;
531
+ }
532
+ }
533
+ if (!c) {
534
+ throw new TomlError("unfinished table encountered", {
535
+ toml: str,
536
+ ptr
537
+ });
538
+ }
539
+ return [res, ptr];
540
+ }
541
+ function parseArray(str, ptr, depth, integersAsBigInt) {
542
+ let res = [];
543
+ let c;
544
+ ptr++;
545
+ while ((c = str[ptr++]) !== "]" && c) {
546
+ if (c === ",") {
547
+ throw new TomlError("expected value, found comma", {
548
+ toml: str,
549
+ ptr: ptr - 1
550
+ });
551
+ } else if (c === "#")
552
+ ptr = skipComment(str, ptr);
553
+ else if (c !== " " && c !== " " && c !== "\n" && c !== "\r") {
554
+ let e = extractValue(str, ptr - 1, "]", depth - 1, integersAsBigInt);
555
+ res.push(e[0]);
556
+ ptr = e[1];
557
+ }
558
+ }
559
+ if (!c) {
560
+ throw new TomlError("unfinished array encountered", {
561
+ toml: str,
562
+ ptr
563
+ });
564
+ }
565
+ return [res, ptr];
566
+ }
567
+
568
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/parse.js
569
+ function peekTable(key, table, meta, type) {
570
+ let t = table;
571
+ let m = meta;
572
+ let k;
573
+ let hasOwn = false;
574
+ let state;
575
+ for (let i = 0; i < key.length; i++) {
576
+ if (i) {
577
+ t = hasOwn ? t[k] : t[k] = {};
578
+ m = (state = m[k]).c;
579
+ if (type === 0 && (state.t === 1 || state.t === 2)) {
580
+ return null;
581
+ }
582
+ if (state.t === 2) {
583
+ let l = t.length - 1;
584
+ t = t[l];
585
+ m = m[l].c;
586
+ }
587
+ }
588
+ k = key[i];
589
+ if ((hasOwn = Object.hasOwn(t, k)) && m[k]?.t === 0 && m[k]?.d) {
590
+ return null;
591
+ }
592
+ if (!hasOwn) {
593
+ if (k === "__proto__") {
594
+ Object.defineProperty(t, k, { enumerable: true, configurable: true, writable: true });
595
+ Object.defineProperty(m, k, { enumerable: true, configurable: true, writable: true });
596
+ }
597
+ m[k] = {
598
+ t: i < key.length - 1 && type === 2 ? 3 : type,
599
+ d: false,
600
+ i: 0,
601
+ c: {}
602
+ };
603
+ }
604
+ }
605
+ state = m[k];
606
+ if (state.t !== type && !(type === 1 && state.t === 3)) {
607
+ return null;
608
+ }
609
+ if (type === 2) {
610
+ if (!state.d) {
611
+ state.d = true;
612
+ t[k] = [];
613
+ }
614
+ t[k].push(t = {});
615
+ state.c[state.i++] = state = { t: 1, d: false, i: 0, c: {} };
616
+ }
617
+ if (state.d) {
618
+ return null;
619
+ }
620
+ state.d = true;
621
+ if (type === 1) {
622
+ t = hasOwn ? t[k] : t[k] = {};
623
+ } else if (type === 0 && hasOwn) {
624
+ return null;
625
+ }
626
+ return [k, t, state.c];
627
+ }
628
+ function parse(toml, { maxDepth = 1e3, integersAsBigInt } = {}) {
629
+ let res = {};
630
+ let meta = {};
631
+ let tbl = res;
632
+ let m = meta;
633
+ for (let ptr = skipVoid(toml, 0); ptr < toml.length; ) {
634
+ if (toml[ptr] === "[") {
635
+ let isTableArray = toml[++ptr] === "[";
636
+ let k = parseKey(toml, ptr += +isTableArray, "]");
637
+ if (isTableArray) {
638
+ if (toml[k[1] - 1] !== "]") {
639
+ throw new TomlError("expected end of table declaration", {
640
+ toml,
641
+ ptr: k[1] - 1
642
+ });
643
+ }
644
+ k[1]++;
645
+ }
646
+ let p = peekTable(
647
+ k[0],
648
+ res,
649
+ meta,
650
+ isTableArray ? 2 : 1
651
+ /* Type.EXPLICIT */
652
+ );
653
+ if (!p) {
654
+ throw new TomlError("trying to redefine an already defined table or value", {
655
+ toml,
656
+ ptr
657
+ });
658
+ }
659
+ m = p[2];
660
+ tbl = p[1];
661
+ ptr = k[1];
662
+ } else {
663
+ let k = parseKey(toml, ptr);
664
+ let p = peekTable(
665
+ k[0],
666
+ tbl,
667
+ m,
668
+ 0
669
+ /* Type.DOTTED */
670
+ );
671
+ if (!p) {
672
+ throw new TomlError("trying to redefine an already defined table or value", {
673
+ toml,
674
+ ptr
675
+ });
676
+ }
677
+ let v = extractValue(toml, k[1], void 0, maxDepth, integersAsBigInt);
678
+ p[1][p[0]] = v[0];
679
+ ptr = v[1];
680
+ }
681
+ ptr = skipVoid(toml, ptr, true);
682
+ if (toml[ptr] && toml[ptr] !== "\n" && toml[ptr] !== "\r") {
683
+ throw new TomlError("each key-value declaration must be followed by an end-of-line", {
684
+ toml,
685
+ ptr
686
+ });
687
+ }
688
+ ptr = skipVoid(toml, ptr);
689
+ }
690
+ return res;
691
+ }
692
+
693
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/stringify.js
694
+ var BARE_KEY = /^[a-z0-9-_]+$/i;
695
+ function extendedTypeOf(obj) {
696
+ let type = typeof obj;
697
+ if (type === "object") {
698
+ if (Array.isArray(obj))
699
+ return "array";
700
+ if (obj instanceof Date)
701
+ return "date";
702
+ }
703
+ return type;
704
+ }
705
+ function isArrayOfTables(obj) {
706
+ for (let i = 0; i < obj.length; i++) {
707
+ if (extendedTypeOf(obj[i]) !== "object")
708
+ return false;
709
+ }
710
+ return obj.length != 0;
711
+ }
712
+ function formatString(s) {
713
+ return JSON.stringify(s).replace(/\x7f/g, "\\u007f");
714
+ }
715
+ function stringifyValue(val, type, depth, numberAsFloat) {
716
+ if (depth === 0) {
717
+ throw new Error("Could not stringify the object: maximum object depth exceeded");
718
+ }
719
+ if (type === "number") {
720
+ if (isNaN(val))
721
+ return "nan";
722
+ if (val === Infinity)
723
+ return "inf";
724
+ if (val === -Infinity)
725
+ return "-inf";
726
+ if (numberAsFloat && Number.isInteger(val))
727
+ return val.toFixed(1);
728
+ return val.toString();
729
+ }
730
+ if (type === "bigint" || type === "boolean") {
731
+ return val.toString();
732
+ }
733
+ if (type === "string") {
734
+ return formatString(val);
735
+ }
736
+ if (type === "date") {
737
+ if (isNaN(val.getTime())) {
738
+ throw new TypeError("cannot serialize invalid date");
739
+ }
740
+ return val.toISOString();
741
+ }
742
+ if (type === "object") {
743
+ return stringifyInlineTable(val, depth, numberAsFloat);
744
+ }
745
+ if (type === "array") {
746
+ return stringifyArray(val, depth, numberAsFloat);
747
+ }
748
+ }
749
+ function stringifyInlineTable(obj, depth, numberAsFloat) {
750
+ let keys = Object.keys(obj);
751
+ if (keys.length === 0)
752
+ return "{}";
753
+ let res = "{ ";
754
+ for (let i = 0; i < keys.length; i++) {
755
+ let k = keys[i];
756
+ if (i)
757
+ res += ", ";
758
+ res += BARE_KEY.test(k) ? k : formatString(k);
759
+ res += " = ";
760
+ res += stringifyValue(obj[k], extendedTypeOf(obj[k]), depth - 1, numberAsFloat);
761
+ }
762
+ return res + " }";
763
+ }
764
+ function stringifyArray(array, depth, numberAsFloat) {
765
+ if (array.length === 0)
766
+ return "[]";
767
+ let res = "[ ";
768
+ for (let i = 0; i < array.length; i++) {
769
+ if (i)
770
+ res += ", ";
771
+ if (array[i] === null || array[i] === void 0) {
772
+ throw new TypeError("arrays cannot contain null or undefined values");
773
+ }
774
+ res += stringifyValue(array[i], extendedTypeOf(array[i]), depth - 1, numberAsFloat);
775
+ }
776
+ return res + " ]";
777
+ }
778
+ function stringifyArrayTable(array, key, depth, numberAsFloat) {
779
+ if (depth === 0) {
780
+ throw new Error("Could not stringify the object: maximum object depth exceeded");
781
+ }
782
+ let res = "";
783
+ for (let i = 0; i < array.length; i++) {
784
+ res += `${res && "\n"}[[${key}]]
785
+ `;
786
+ res += stringifyTable(0, array[i], key, depth, numberAsFloat);
787
+ }
788
+ return res;
789
+ }
790
+ function stringifyTable(tableKey, obj, prefix, depth, numberAsFloat) {
791
+ if (depth === 0) {
792
+ throw new Error("Could not stringify the object: maximum object depth exceeded");
793
+ }
794
+ let preamble = "";
795
+ let tables = "";
796
+ let keys = Object.keys(obj);
797
+ for (let i = 0; i < keys.length; i++) {
798
+ let k = keys[i];
799
+ if (obj[k] !== null && obj[k] !== void 0) {
800
+ let type = extendedTypeOf(obj[k]);
801
+ if (type === "symbol" || type === "function") {
802
+ throw new TypeError(`cannot serialize values of type '${type}'`);
803
+ }
804
+ let key = BARE_KEY.test(k) ? k : formatString(k);
805
+ if (type === "array" && isArrayOfTables(obj[k])) {
806
+ tables += (tables && "\n") + stringifyArrayTable(obj[k], prefix ? `${prefix}.${key}` : key, depth - 1, numberAsFloat);
807
+ } else if (type === "object") {
808
+ let tblKey = prefix ? `${prefix}.${key}` : key;
809
+ tables += (tables && "\n") + stringifyTable(tblKey, obj[k], tblKey, depth - 1, numberAsFloat);
810
+ } else {
811
+ preamble += key;
812
+ preamble += " = ";
813
+ preamble += stringifyValue(obj[k], type, depth, numberAsFloat);
814
+ preamble += "\n";
815
+ }
816
+ }
817
+ }
818
+ if (tableKey && (preamble || !tables))
819
+ preamble = preamble ? `[${tableKey}]
820
+ ${preamble}` : `[${tableKey}]`;
821
+ return preamble && tables ? `${preamble}
822
+ ${tables}` : preamble || tables;
823
+ }
824
+ function stringify(obj, { maxDepth = 1e3, numbersAsFloat = false } = {}) {
825
+ if (extendedTypeOf(obj) !== "object") {
826
+ throw new TypeError("stringify can only be called with an object");
827
+ }
828
+ let str = stringifyTable(0, obj, "", maxDepth, numbersAsFloat);
829
+ if (str[str.length - 1] !== "\n")
830
+ return str + "\n";
831
+ return str;
832
+ }
833
+
834
+ // ../node_modules/.pnpm/smol-toml@1.6.1/node_modules/smol-toml/dist/index.js
835
+ var dist_default = { parse, stringify, TomlDate, TomlError };
836
+ export {
837
+ TomlDate,
838
+ TomlError,
839
+ dist_default as default,
840
+ parse,
841
+ stringify
842
+ };
843
+ //# sourceMappingURL=smol-toml.js.map