@wirecat/notion-cli 0.5.0 → 0.6.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 (216) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +5 -0
  3. package/contracts/wirecat.json +55 -2
  4. package/dist/bin/notion.js +2 -2
  5. package/dist/bundle/agent-ILG6AH7S.js +42 -0
  6. package/dist/bundle/{all-profiles-V37KCXH3.js → all-profiles-AELHUTFU.js} +64 -21
  7. package/dist/bundle/{anthropic-Q4S3BYXD.js → anthropic-3CCYAGO3.js} +6 -6
  8. package/dist/bundle/{app-server-43SR3ACI.js → app-server-DJ6P4NY4.js} +86 -65
  9. package/dist/bundle/{bun-M3J2QTR3.js → bun-2FLR4IV4.js} +2 -2
  10. package/dist/bundle/{bun-sqlite-EJ3W2PSV.js → bun-sqlite-QB6CU6TH.js} +7 -7
  11. package/dist/bundle/chunk-2CMLY2X3.js +72 -0
  12. package/dist/bundle/{chunk-NHHJHXMQ.js → chunk-2XUV7HNE.js} +2 -2
  13. package/dist/bundle/{chunk-HZRQLAHO.js → chunk-2Z7UOXFC.js} +1 -1
  14. package/dist/bundle/{chunk-TOSCB4SO.js → chunk-3LMW7U7F.js} +16 -10
  15. package/dist/bundle/chunk-3MYN2RMG.js +398 -0
  16. package/dist/bundle/{chunk-E5WLE7BM.js → chunk-3UX4VJWD.js} +1 -1
  17. package/dist/bundle/chunk-4HP6KGBI.js +32 -0
  18. package/dist/bundle/{chunk-KHWOLBHQ.js → chunk-4RFR4J2O.js} +2 -2
  19. package/dist/bundle/{chunk-G2MJYXZG.js → chunk-4VXXOJ2F.js} +4 -4
  20. package/dist/bundle/chunk-4ZAQMDLD.js +1308 -0
  21. package/dist/bundle/chunk-4ZTB7LS3.js +87 -0
  22. package/dist/bundle/{chunk-ECC2UX7X.js → chunk-5OJLUUOJ.js} +6 -6
  23. package/dist/bundle/{chunk-C32AKHTY.js → chunk-5XPHFV7H.js} +35 -12
  24. package/dist/bundle/{chunk-O5YB7FQD.js → chunk-6EJCI47L.js} +4 -4
  25. package/dist/bundle/chunk-6VPC5Z56.js +2145 -0
  26. package/dist/bundle/{chunk-NA6QLHBZ.js → chunk-6YOMPW7Y.js} +10 -8
  27. package/dist/bundle/{chunk-P5BHKKBI.js → chunk-7JVKQ6NM.js} +4 -4
  28. package/dist/bundle/chunk-7L2XOKDZ.js +353 -0
  29. package/dist/bundle/{chunk-NE43YXKL.js → chunk-A42T4YX7.js} +3 -3
  30. package/dist/bundle/chunk-AE4VW4NB.js +50 -0
  31. package/dist/bundle/{chunk-FPUGMDJV.js → chunk-AV2ZJ4WX.js} +1 -1
  32. package/dist/bundle/{chunk-QWYMXFKM.js → chunk-AZLDR36U.js} +3 -3
  33. package/dist/bundle/{chunk-N2XADGL4.js → chunk-BAXNAOOL.js} +4 -4
  34. package/dist/bundle/{chunk-JCKWQGCD.js → chunk-BEV5LO4D.js} +110 -862
  35. package/dist/bundle/{chunk-UZSBGECU.js → chunk-BQBC2WIG.js} +1 -65
  36. package/dist/bundle/{chunk-CWXOXIWS.js → chunk-CFQQTDSA.js} +1 -1
  37. package/dist/bundle/chunk-CHPWBQUK.js +39 -0
  38. package/dist/bundle/chunk-CL3YNUCC.js +388 -0
  39. package/dist/bundle/{chunk-ONZVPE24.js → chunk-DGMTSDKB.js} +6 -6
  40. package/dist/bundle/{chunk-BWLBSQSU.js → chunk-DHVVXQEL.js} +4 -4
  41. package/dist/bundle/chunk-DIU2QJJF.js +785 -0
  42. package/dist/bundle/chunk-DQSOYH6N.js +20 -0
  43. package/dist/bundle/chunk-ECYOTDJM.js +14 -0
  44. package/dist/bundle/{chunk-DBEQI5YM.js → chunk-EHW45LLT.js} +3 -3
  45. package/dist/bundle/{chunk-WPP76PSX.js → chunk-ERN53B3Z.js} +32 -24
  46. package/dist/bundle/{chunk-XUPN2EHR.js → chunk-ESZHGC4Q.js} +23 -7
  47. package/dist/bundle/{chunk-3RL2MIUF.js → chunk-EZMG5QXB.js} +8 -8
  48. package/dist/bundle/chunk-F4BX7TH2.js +15 -0
  49. package/dist/bundle/{chunk-TP7GDWVF.js → chunk-F5ZAN7OC.js} +1 -1
  50. package/dist/bundle/{chunk-DFCHHR5M.js → chunk-FMMYBVCH.js} +1 -1
  51. package/dist/bundle/{chunk-E2AFUJDR.js → chunk-FRB2L7OE.js} +3 -3
  52. package/dist/bundle/chunk-FV4WTZCU.js +561 -0
  53. package/dist/bundle/{chunk-TD2JZ25O.js → chunk-G4ZU73SD.js} +98 -80
  54. package/dist/bundle/{chunk-FKA7DOCK.js → chunk-GCAJW4SR.js} +1 -1
  55. package/dist/bundle/{chunk-WE4UFASG.js → chunk-GPRJXJC7.js} +15 -1
  56. package/dist/bundle/chunk-GUIQJUJV.js +340 -0
  57. package/dist/bundle/{chunk-GTY6N5KZ.js → chunk-HHEWTLAT.js} +2 -2
  58. package/dist/bundle/{chunk-DB2XKHI4.js → chunk-HM6AMYHR.js} +2 -2
  59. package/dist/bundle/{chunk-H3E2PZ5Y.js → chunk-HOVHE3A3.js} +7 -7
  60. package/dist/bundle/{chunk-O3DYRCIT.js → chunk-HVXOA4FO.js} +1 -1
  61. package/dist/bundle/{chunk-PPHBRESD.js → chunk-IJVTN5L3.js} +2 -2
  62. package/dist/bundle/{chunk-FBZI4Z3Z.js → chunk-IURYZSG3.js} +13 -26
  63. package/dist/bundle/chunk-JFSVAOA7.js +108 -0
  64. package/dist/bundle/{chunk-HHVFIXDO.js → chunk-JVESLS7B.js} +399 -399
  65. package/dist/bundle/chunk-K5IC4FZN.js +36 -0
  66. package/dist/bundle/chunk-KB35BVTG.js +30 -0
  67. package/dist/bundle/chunk-KGAUINBO.js +594 -0
  68. package/dist/bundle/{chunk-W5JZMXGW.js → chunk-KNCPBX5P.js} +75 -75
  69. package/dist/bundle/{chunk-ECEZOLOD.js → chunk-KZJQPJK5.js} +4 -4
  70. package/dist/bundle/chunk-L7P3LUDQ.js +286 -0
  71. package/dist/bundle/{chunk-QYXWRKNA.js → chunk-LC6WE6JS.js} +9 -9
  72. package/dist/bundle/{chunk-X2M6NIQG.js → chunk-LECMHK2F.js} +1 -1
  73. package/dist/bundle/chunk-LQVDFD65.js +72 -0
  74. package/dist/bundle/chunk-MEYYH47C.js +25 -0
  75. package/dist/bundle/chunk-NMQRSEZM.js +37 -0
  76. package/dist/bundle/{chunk-NTG657MI.js → chunk-NSR43UEW.js} +7 -64
  77. package/dist/bundle/{chunk-CDK5E45T.js → chunk-OEQNP56V.js} +2 -100
  78. package/dist/bundle/{chunk-MGUEZYFA.js → chunk-OLAGFJDM.js} +13 -2143
  79. package/dist/bundle/{chunk-PWRRDDMZ.js → chunk-P27NDZQR.js} +232 -552
  80. package/dist/bundle/{chunk-PAW6RRCW.js → chunk-PHKED7AG.js} +8 -210
  81. package/dist/bundle/{chunk-5D4AEUVA.js → chunk-PL5P7UKW.js} +434 -1
  82. package/dist/bundle/{chunk-RIGE67FR.js → chunk-Q7EIL6VU.js} +43 -33
  83. package/dist/bundle/{chunk-AT5I34AN.js → chunk-QEJFBORC.js} +3 -3
  84. package/dist/bundle/{chunk-RJMQGG3P.js → chunk-QGGRFRMP.js} +65 -49
  85. package/dist/bundle/{chunk-BNEE35WD.js → chunk-RD7BKTWV.js} +4 -4
  86. package/dist/bundle/chunk-RXU5T5NM.js +714 -0
  87. package/dist/bundle/{chunk-MVA5HVKL.js → chunk-S4UUN6LD.js} +18 -0
  88. package/dist/bundle/{chunk-2FJNMADN.js → chunk-SAPP2LEH.js} +10 -10
  89. package/dist/bundle/{chunk-QIG55MZH.js → chunk-SEAGUFBX.js} +12 -12
  90. package/dist/bundle/{chunk-GCZ6MAEN.js → chunk-STTO2MSY.js} +43 -64
  91. package/dist/bundle/{chunk-DSP36YHQ.js → chunk-T37TAXVL.js} +2 -2
  92. package/dist/bundle/{chunk-KHZ2RGXI.js → chunk-T6XIBULH.js} +139 -572
  93. package/dist/bundle/chunk-TFT4FVRU.js +67 -0
  94. package/dist/bundle/chunk-TRYYWV7J.js +291 -0
  95. package/dist/bundle/{chunk-KFVDL2QS.js → chunk-UC7JLE6J.js} +1 -89
  96. package/dist/bundle/{chunk-LBYGJKXW.js → chunk-UOC52GCB.js} +4 -4
  97. package/dist/bundle/chunk-UPL474OW.js +94 -0
  98. package/dist/bundle/chunk-VH7526NL.js +80 -0
  99. package/dist/bundle/chunk-VNWF4I7E.js +34 -0
  100. package/dist/bundle/chunk-W2VQDIU5.js +221 -0
  101. package/dist/bundle/{chunk-TDNURSU6.js → chunk-WAGADES3.js} +19 -19
  102. package/dist/bundle/{chunk-J3NKZ6MO.js → chunk-WAU5LSHP.js} +79 -438
  103. package/dist/bundle/{chunk-B3FSLAIU.js → chunk-WB2KSQIP.js} +4 -4
  104. package/dist/bundle/{chunk-DO7BLXO3.js → chunk-WGZH2M64.js} +3 -3
  105. package/dist/bundle/chunk-WVN2KTNS.js +52 -0
  106. package/dist/bundle/{chunk-W7HM2VGO.js → chunk-XYQVVW4R.js} +1 -1
  107. package/dist/bundle/{chunk-BBSFQ3PU.js → chunk-YDDI4QIT.js} +1473 -1292
  108. package/dist/bundle/chunk-YHWFF6DN.js +39 -0
  109. package/dist/bundle/{chunk-W53EJOFQ.js → chunk-YUDVRFXN.js} +1 -1
  110. package/dist/bundle/{chunk-MNRMKWCN.js → chunk-YXYZAWWW.js} +6 -6
  111. package/dist/bundle/{chunk-5P5TXU2K.js → chunk-YYQ5GKAI.js} +9509 -10782
  112. package/dist/bundle/chunk-ZDYEOE7L.js +2366 -0
  113. package/dist/bundle/command-contract-L2FASWD6.js +41 -0
  114. package/dist/bundle/{command-server-entry-LJ627ZUA.js → command-server-entry-VUR6WL77.js} +30 -27
  115. package/dist/bundle/{decode-PX2LZ5Y2.js → decode-I64PF2RM.js} +6 -6
  116. package/dist/bundle/{definitions-M3U4UYHN.js → definitions-MB65223J.js} +72 -18
  117. package/dist/bundle/{dispatch-KOISQ5QJ.js → dispatch-JQBAZWCL.js} +8 -8
  118. package/dist/bundle/dist-PAKDDIBT.js +191 -0
  119. package/dist/bundle/{echarts-FVTUDXDU.js → echarts-YRRVLEX3.js} +2 -2
  120. package/dist/bundle/{embed-CCSDK43I.js → embed-BLXLKMK2.js} +7 -7
  121. package/dist/bundle/{embedder-VHI4DHB7.js → embedder-JYGF6R7I.js} +10 -10
  122. package/dist/bundle/{failure-FZ6VYKEQ.js → failure-I6AAF5R5.js} +3 -3
  123. package/dist/bundle/first-run-YLDOZGY6.js +29 -0
  124. package/dist/bundle/first-screen-GZH3LMLZ.js +41 -0
  125. package/dist/bundle/hast-util-from-html-X2DCPS3T.js +10531 -0
  126. package/dist/bundle/hast-util-to-html-IIFHILP5.js +998 -0
  127. package/dist/bundle/hast-util-to-mdast-3CSMIWK2.js +2272 -0
  128. package/dist/bundle/{instructions-HET7BCYK.js → instructions-AG7SRWTR.js} +1 -1
  129. package/dist/bundle/{mcp-RGNRW77S.js → mcp-YGOAUNC3.js} +2 -2
  130. package/dist/bundle/{mdast-util-from-markdown-R66F4HZA.js → mdast-util-from-markdown-XCR5KW5S.js} +138 -195
  131. package/dist/bundle/{mdast-util-gfm-LN2ELINH.js → mdast-util-gfm-JO7PHUIB.js} +28 -357
  132. package/dist/bundle/mdast-util-to-hast-AYJV7KAE.js +879 -0
  133. package/dist/bundle/mdast-util-to-markdown-DOXGHRI7.js +1854 -0
  134. package/dist/bundle/meeting-combined-OFQSGKBG.js +25 -0
  135. package/dist/bundle/meeting-model-K6NSX3O5.js +27 -0
  136. package/dist/bundle/{meeting-semantic-UD26T37N.js → meeting-semantic-3DZPHM7L.js} +7 -7
  137. package/dist/bundle/{micromark-extension-gfm-5X7YT43T.js → micromark-extension-gfm-PQ7DWZM7.js} +12 -78
  138. package/dist/bundle/{node-CXZIFHZC.js → node-GJQYN4FT.js} +2 -2
  139. package/dist/bundle/{node-sqlite-ME7KMORI.js → node-sqlite-7VXIRQPH.js} +8 -8
  140. package/dist/bundle/notes-search-ACDOPTNH.js +64 -0
  141. package/dist/bundle/notion.js +14 -14
  142. package/dist/bundle/oauth-N67CH2TK.js +20 -0
  143. package/dist/bundle/{open-HA6D3SXR.js → open-JGXVHIKO.js} +6 -6
  144. package/dist/bundle/{openai-H5AJPZBX.js → openai-PFQJTF4H.js} +21 -18
  145. package/dist/bundle/{process-5RUXWGYS.js → process-MEKCZMX3.js} +1 -1
  146. package/dist/bundle/{program-F3NBTZ7J.js → program-DUJYLJH5.js} +6373 -6588
  147. package/dist/bundle/{prompt-6XSUOLHK.js → prompt-FW44QDHD.js} +6 -6
  148. package/dist/bundle/{recognize-2Y7AUVGG.js → recognize-62TDQ6A7.js} +5 -5
  149. package/dist/bundle/{remote-KCABPXQ3.js → remote-7ONFD7GG.js} +12 -11
  150. package/dist/bundle/{rerank-BTN7LUVA.js → rerank-YOHQQJS4.js} +8 -8
  151. package/dist/bundle/{schemas-VVLTLMXS.js → schemas-IIGJ7DOP.js} +39 -60
  152. package/dist/bundle/{serve-CYEMVRFC.js → serve-ZCXGT5RB.js} +11 -11
  153. package/dist/bundle/{server-WFIICGMI.js → server-RQ74M637.js} +78 -56
  154. package/dist/bundle/server-XMZF57WM.js +90 -0
  155. package/dist/bundle/{services-L4W6ZWDG.js → services-FWBRZ57M.js} +103 -88
  156. package/dist/bundle/{sqlite-runtime-IKMYLRQC.js → sqlite-runtime-ZZBNGV5L.js} +7 -7
  157. package/dist/bundle/{state-LMUP636P.js → state-GDDFO62Y.js} +7 -7
  158. package/dist/bundle/{store-W2JC2JP4.js → store-D2LRIWEI.js} +24 -20
  159. package/dist/bundle/{store-A2QZFBOX.js → store-KQCLR57N.js} +30 -18
  160. package/dist/bundle/store-maintenance-command-CK2MU5M6.js +77 -0
  161. package/dist/bundle/surface-K4TPIQW7.js +76 -0
  162. package/dist/commands/account.d.ts +3 -0
  163. package/dist/commands/account.d.ts.map +1 -0
  164. package/dist/commands/account.js +22 -0
  165. package/dist/commands/account.js.map +1 -0
  166. package/dist/commands/api.d.ts +7 -2
  167. package/dist/commands/api.d.ts.map +1 -1
  168. package/dist/commands/api.js +19 -119
  169. package/dist/commands/api.js.map +1 -1
  170. package/dist/commands/library.d.ts.map +1 -1
  171. package/dist/commands/library.js +8 -2
  172. package/dist/commands/library.js.map +1 -1
  173. package/dist/config.d.ts +11 -13
  174. package/dist/config.d.ts.map +1 -1
  175. package/dist/config.js +63 -54
  176. package/dist/config.js.map +1 -1
  177. package/dist/generated/definitions.d.ts.map +1 -1
  178. package/dist/generated/definitions.js +72 -18
  179. package/dist/generated/definitions.js.map +1 -1
  180. package/dist/generated/manifest.d.ts.map +1 -1
  181. package/dist/generated/manifest.js +49 -0
  182. package/dist/generated/manifest.js.map +1 -1
  183. package/dist/generated/schemas.d.ts.map +1 -1
  184. package/dist/generated/schemas.js +32 -32
  185. package/dist/generated/schemas.js.map +1 -1
  186. package/dist/generated/types.d.ts +125 -25
  187. package/dist/generated/types.d.ts.map +1 -1
  188. package/dist/library.d.ts +8 -0
  189. package/dist/library.d.ts.map +1 -1
  190. package/dist/library.js +24 -1
  191. package/dist/library.js.map +1 -1
  192. package/dist/program.d.ts.map +1 -1
  193. package/dist/program.js +2 -0
  194. package/dist/program.js.map +1 -1
  195. package/dist/sync/files.d.ts +12 -0
  196. package/dist/sync/files.d.ts.map +1 -1
  197. package/dist/sync/files.js.map +1 -1
  198. package/dist/sync/source.d.ts.map +1 -1
  199. package/dist/sync/source.js +53 -37
  200. package/dist/sync/source.js.map +1 -1
  201. package/dist/sync/users.d.ts +15 -2
  202. package/dist/sync/users.d.ts.map +1 -1
  203. package/dist/sync/users.js +36 -1
  204. package/dist/sync/users.js.map +1 -1
  205. package/dist/version.d.ts +1 -1
  206. package/dist/version.js +1 -1
  207. package/package.json +4 -4
  208. package/dist/bundle/chunk-6EOZTUHT.js +0 -726
  209. package/dist/bundle/command-contract-TVRFW2IX.js +0 -38
  210. package/dist/bundle/first-run-7JKE5AHN.js +0 -29
  211. package/dist/bundle/first-screen-ZROHOEYJ.js +0 -38
  212. package/dist/bundle/meeting-combined-SSTOJUIJ.js +0 -24
  213. package/dist/bundle/meeting-model-K7TPS4S5.js +0 -26
  214. package/dist/bundle/oauth-XBTROXHB.js +0 -20
  215. package/dist/bundle/server-UC2FNNXX.js +0 -72
  216. package/dist/bundle/store-maintenance-command-LRGQJPSZ.js +0 -63
@@ -0,0 +1,998 @@
1
+ import { createRequire as __bundleRequire } from "node:module";
2
+ const require = __bundleRequire(import.meta.url);
3
+ import {
4
+ ccount
5
+ } from "./chunk-MEYYH47C.js";
6
+ import {
7
+ find,
8
+ html,
9
+ stringify,
10
+ stringify2,
11
+ svg
12
+ } from "./chunk-4ZAQMDLD.js";
13
+ import {
14
+ whitespace
15
+ } from "./chunk-DQSOYH6N.js";
16
+ import {
17
+ zwitch
18
+ } from "./chunk-4HP6KGBI.js";
19
+ import {
20
+ __name
21
+ } from "./chunk-ZVVMGPBJ.js";
22
+
23
+ // node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js
24
+ var htmlVoidElements = [
25
+ "area",
26
+ "base",
27
+ "basefont",
28
+ "bgsound",
29
+ "br",
30
+ "col",
31
+ "command",
32
+ "embed",
33
+ "frame",
34
+ "hr",
35
+ "image",
36
+ "img",
37
+ "input",
38
+ "keygen",
39
+ "link",
40
+ "meta",
41
+ "param",
42
+ "source",
43
+ "track",
44
+ "wbr"
45
+ ];
46
+
47
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js
48
+ var defaultSubsetRegex = /["&'<>`]/g;
49
+ var surrogatePairsRegex = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
50
+ var controlCharactersRegex = (
51
+ // eslint-disable-next-line no-control-regex, unicorn/no-hex-escape
52
+ /[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g
53
+ );
54
+ var regexEscapeRegex = /[|\\{}()[\]^$+*?.]/g;
55
+ var subsetToRegexCache = /* @__PURE__ */ new WeakMap();
56
+ function core(value, options) {
57
+ value = value.replace(
58
+ options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex,
59
+ basic
60
+ );
61
+ if (options.subset || options.escapeOnly) {
62
+ return value;
63
+ }
64
+ return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);
65
+ function surrogate(pair, index, all2) {
66
+ return options.format(
67
+ (pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536,
68
+ all2.charCodeAt(index + 2),
69
+ options
70
+ );
71
+ }
72
+ __name(surrogate, "surrogate");
73
+ function basic(character, index, all2) {
74
+ return options.format(
75
+ character.charCodeAt(0),
76
+ all2.charCodeAt(index + 1),
77
+ options
78
+ );
79
+ }
80
+ __name(basic, "basic");
81
+ }
82
+ __name(core, "core");
83
+ function charactersToExpressionCached(subset) {
84
+ let cached = subsetToRegexCache.get(subset);
85
+ if (!cached) {
86
+ cached = charactersToExpression(subset);
87
+ subsetToRegexCache.set(subset, cached);
88
+ }
89
+ return cached;
90
+ }
91
+ __name(charactersToExpressionCached, "charactersToExpressionCached");
92
+ function charactersToExpression(subset) {
93
+ const groups = [];
94
+ let index = -1;
95
+ while (++index < subset.length) {
96
+ groups.push(subset[index].replace(regexEscapeRegex, "\\$&"));
97
+ }
98
+ return new RegExp("(?:" + groups.join("|") + ")", "g");
99
+ }
100
+ __name(charactersToExpression, "charactersToExpression");
101
+
102
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js
103
+ var hexadecimalRegex = /[\dA-Fa-f]/;
104
+ function toHexadecimal(code, next, omit) {
105
+ const value = "&#x" + code.toString(16).toUpperCase();
106
+ return omit && next && !hexadecimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
107
+ }
108
+ __name(toHexadecimal, "toHexadecimal");
109
+
110
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js
111
+ var decimalRegex = /\d/;
112
+ function toDecimal(code, next, omit) {
113
+ const value = "&#" + String(code);
114
+ return omit && next && !decimalRegex.test(String.fromCharCode(next)) ? value : value + ";";
115
+ }
116
+ __name(toDecimal, "toDecimal");
117
+
118
+ // node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js
119
+ var characterEntitiesLegacy = [
120
+ "AElig",
121
+ "AMP",
122
+ "Aacute",
123
+ "Acirc",
124
+ "Agrave",
125
+ "Aring",
126
+ "Atilde",
127
+ "Auml",
128
+ "COPY",
129
+ "Ccedil",
130
+ "ETH",
131
+ "Eacute",
132
+ "Ecirc",
133
+ "Egrave",
134
+ "Euml",
135
+ "GT",
136
+ "Iacute",
137
+ "Icirc",
138
+ "Igrave",
139
+ "Iuml",
140
+ "LT",
141
+ "Ntilde",
142
+ "Oacute",
143
+ "Ocirc",
144
+ "Ograve",
145
+ "Oslash",
146
+ "Otilde",
147
+ "Ouml",
148
+ "QUOT",
149
+ "REG",
150
+ "THORN",
151
+ "Uacute",
152
+ "Ucirc",
153
+ "Ugrave",
154
+ "Uuml",
155
+ "Yacute",
156
+ "aacute",
157
+ "acirc",
158
+ "acute",
159
+ "aelig",
160
+ "agrave",
161
+ "amp",
162
+ "aring",
163
+ "atilde",
164
+ "auml",
165
+ "brvbar",
166
+ "ccedil",
167
+ "cedil",
168
+ "cent",
169
+ "copy",
170
+ "curren",
171
+ "deg",
172
+ "divide",
173
+ "eacute",
174
+ "ecirc",
175
+ "egrave",
176
+ "eth",
177
+ "euml",
178
+ "frac12",
179
+ "frac14",
180
+ "frac34",
181
+ "gt",
182
+ "iacute",
183
+ "icirc",
184
+ "iexcl",
185
+ "igrave",
186
+ "iquest",
187
+ "iuml",
188
+ "laquo",
189
+ "lt",
190
+ "macr",
191
+ "micro",
192
+ "middot",
193
+ "nbsp",
194
+ "not",
195
+ "ntilde",
196
+ "oacute",
197
+ "ocirc",
198
+ "ograve",
199
+ "ordf",
200
+ "ordm",
201
+ "oslash",
202
+ "otilde",
203
+ "ouml",
204
+ "para",
205
+ "plusmn",
206
+ "pound",
207
+ "quot",
208
+ "raquo",
209
+ "reg",
210
+ "sect",
211
+ "shy",
212
+ "sup1",
213
+ "sup2",
214
+ "sup3",
215
+ "szlig",
216
+ "thorn",
217
+ "times",
218
+ "uacute",
219
+ "ucirc",
220
+ "ugrave",
221
+ "uml",
222
+ "uuml",
223
+ "yacute",
224
+ "yen",
225
+ "yuml"
226
+ ];
227
+
228
+ // node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js
229
+ var characterEntitiesHtml4 = {
230
+ nbsp: "\xA0",
231
+ iexcl: "\xA1",
232
+ cent: "\xA2",
233
+ pound: "\xA3",
234
+ curren: "\xA4",
235
+ yen: "\xA5",
236
+ brvbar: "\xA6",
237
+ sect: "\xA7",
238
+ uml: "\xA8",
239
+ copy: "\xA9",
240
+ ordf: "\xAA",
241
+ laquo: "\xAB",
242
+ not: "\xAC",
243
+ shy: "\xAD",
244
+ reg: "\xAE",
245
+ macr: "\xAF",
246
+ deg: "\xB0",
247
+ plusmn: "\xB1",
248
+ sup2: "\xB2",
249
+ sup3: "\xB3",
250
+ acute: "\xB4",
251
+ micro: "\xB5",
252
+ para: "\xB6",
253
+ middot: "\xB7",
254
+ cedil: "\xB8",
255
+ sup1: "\xB9",
256
+ ordm: "\xBA",
257
+ raquo: "\xBB",
258
+ frac14: "\xBC",
259
+ frac12: "\xBD",
260
+ frac34: "\xBE",
261
+ iquest: "\xBF",
262
+ Agrave: "\xC0",
263
+ Aacute: "\xC1",
264
+ Acirc: "\xC2",
265
+ Atilde: "\xC3",
266
+ Auml: "\xC4",
267
+ Aring: "\xC5",
268
+ AElig: "\xC6",
269
+ Ccedil: "\xC7",
270
+ Egrave: "\xC8",
271
+ Eacute: "\xC9",
272
+ Ecirc: "\xCA",
273
+ Euml: "\xCB",
274
+ Igrave: "\xCC",
275
+ Iacute: "\xCD",
276
+ Icirc: "\xCE",
277
+ Iuml: "\xCF",
278
+ ETH: "\xD0",
279
+ Ntilde: "\xD1",
280
+ Ograve: "\xD2",
281
+ Oacute: "\xD3",
282
+ Ocirc: "\xD4",
283
+ Otilde: "\xD5",
284
+ Ouml: "\xD6",
285
+ times: "\xD7",
286
+ Oslash: "\xD8",
287
+ Ugrave: "\xD9",
288
+ Uacute: "\xDA",
289
+ Ucirc: "\xDB",
290
+ Uuml: "\xDC",
291
+ Yacute: "\xDD",
292
+ THORN: "\xDE",
293
+ szlig: "\xDF",
294
+ agrave: "\xE0",
295
+ aacute: "\xE1",
296
+ acirc: "\xE2",
297
+ atilde: "\xE3",
298
+ auml: "\xE4",
299
+ aring: "\xE5",
300
+ aelig: "\xE6",
301
+ ccedil: "\xE7",
302
+ egrave: "\xE8",
303
+ eacute: "\xE9",
304
+ ecirc: "\xEA",
305
+ euml: "\xEB",
306
+ igrave: "\xEC",
307
+ iacute: "\xED",
308
+ icirc: "\xEE",
309
+ iuml: "\xEF",
310
+ eth: "\xF0",
311
+ ntilde: "\xF1",
312
+ ograve: "\xF2",
313
+ oacute: "\xF3",
314
+ ocirc: "\xF4",
315
+ otilde: "\xF5",
316
+ ouml: "\xF6",
317
+ divide: "\xF7",
318
+ oslash: "\xF8",
319
+ ugrave: "\xF9",
320
+ uacute: "\xFA",
321
+ ucirc: "\xFB",
322
+ uuml: "\xFC",
323
+ yacute: "\xFD",
324
+ thorn: "\xFE",
325
+ yuml: "\xFF",
326
+ fnof: "\u0192",
327
+ Alpha: "\u0391",
328
+ Beta: "\u0392",
329
+ Gamma: "\u0393",
330
+ Delta: "\u0394",
331
+ Epsilon: "\u0395",
332
+ Zeta: "\u0396",
333
+ Eta: "\u0397",
334
+ Theta: "\u0398",
335
+ Iota: "\u0399",
336
+ Kappa: "\u039A",
337
+ Lambda: "\u039B",
338
+ Mu: "\u039C",
339
+ Nu: "\u039D",
340
+ Xi: "\u039E",
341
+ Omicron: "\u039F",
342
+ Pi: "\u03A0",
343
+ Rho: "\u03A1",
344
+ Sigma: "\u03A3",
345
+ Tau: "\u03A4",
346
+ Upsilon: "\u03A5",
347
+ Phi: "\u03A6",
348
+ Chi: "\u03A7",
349
+ Psi: "\u03A8",
350
+ Omega: "\u03A9",
351
+ alpha: "\u03B1",
352
+ beta: "\u03B2",
353
+ gamma: "\u03B3",
354
+ delta: "\u03B4",
355
+ epsilon: "\u03B5",
356
+ zeta: "\u03B6",
357
+ eta: "\u03B7",
358
+ theta: "\u03B8",
359
+ iota: "\u03B9",
360
+ kappa: "\u03BA",
361
+ lambda: "\u03BB",
362
+ mu: "\u03BC",
363
+ nu: "\u03BD",
364
+ xi: "\u03BE",
365
+ omicron: "\u03BF",
366
+ pi: "\u03C0",
367
+ rho: "\u03C1",
368
+ sigmaf: "\u03C2",
369
+ sigma: "\u03C3",
370
+ tau: "\u03C4",
371
+ upsilon: "\u03C5",
372
+ phi: "\u03C6",
373
+ chi: "\u03C7",
374
+ psi: "\u03C8",
375
+ omega: "\u03C9",
376
+ thetasym: "\u03D1",
377
+ upsih: "\u03D2",
378
+ piv: "\u03D6",
379
+ bull: "\u2022",
380
+ hellip: "\u2026",
381
+ prime: "\u2032",
382
+ Prime: "\u2033",
383
+ oline: "\u203E",
384
+ frasl: "\u2044",
385
+ weierp: "\u2118",
386
+ image: "\u2111",
387
+ real: "\u211C",
388
+ trade: "\u2122",
389
+ alefsym: "\u2135",
390
+ larr: "\u2190",
391
+ uarr: "\u2191",
392
+ rarr: "\u2192",
393
+ darr: "\u2193",
394
+ harr: "\u2194",
395
+ crarr: "\u21B5",
396
+ lArr: "\u21D0",
397
+ uArr: "\u21D1",
398
+ rArr: "\u21D2",
399
+ dArr: "\u21D3",
400
+ hArr: "\u21D4",
401
+ forall: "\u2200",
402
+ part: "\u2202",
403
+ exist: "\u2203",
404
+ empty: "\u2205",
405
+ nabla: "\u2207",
406
+ isin: "\u2208",
407
+ notin: "\u2209",
408
+ ni: "\u220B",
409
+ prod: "\u220F",
410
+ sum: "\u2211",
411
+ minus: "\u2212",
412
+ lowast: "\u2217",
413
+ radic: "\u221A",
414
+ prop: "\u221D",
415
+ infin: "\u221E",
416
+ ang: "\u2220",
417
+ and: "\u2227",
418
+ or: "\u2228",
419
+ cap: "\u2229",
420
+ cup: "\u222A",
421
+ int: "\u222B",
422
+ there4: "\u2234",
423
+ sim: "\u223C",
424
+ cong: "\u2245",
425
+ asymp: "\u2248",
426
+ ne: "\u2260",
427
+ equiv: "\u2261",
428
+ le: "\u2264",
429
+ ge: "\u2265",
430
+ sub: "\u2282",
431
+ sup: "\u2283",
432
+ nsub: "\u2284",
433
+ sube: "\u2286",
434
+ supe: "\u2287",
435
+ oplus: "\u2295",
436
+ otimes: "\u2297",
437
+ perp: "\u22A5",
438
+ sdot: "\u22C5",
439
+ lceil: "\u2308",
440
+ rceil: "\u2309",
441
+ lfloor: "\u230A",
442
+ rfloor: "\u230B",
443
+ lang: "\u2329",
444
+ rang: "\u232A",
445
+ loz: "\u25CA",
446
+ spades: "\u2660",
447
+ clubs: "\u2663",
448
+ hearts: "\u2665",
449
+ diams: "\u2666",
450
+ quot: '"',
451
+ amp: "&",
452
+ lt: "<",
453
+ gt: ">",
454
+ OElig: "\u0152",
455
+ oelig: "\u0153",
456
+ Scaron: "\u0160",
457
+ scaron: "\u0161",
458
+ Yuml: "\u0178",
459
+ circ: "\u02C6",
460
+ tilde: "\u02DC",
461
+ ensp: "\u2002",
462
+ emsp: "\u2003",
463
+ thinsp: "\u2009",
464
+ zwnj: "\u200C",
465
+ zwj: "\u200D",
466
+ lrm: "\u200E",
467
+ rlm: "\u200F",
468
+ ndash: "\u2013",
469
+ mdash: "\u2014",
470
+ lsquo: "\u2018",
471
+ rsquo: "\u2019",
472
+ sbquo: "\u201A",
473
+ ldquo: "\u201C",
474
+ rdquo: "\u201D",
475
+ bdquo: "\u201E",
476
+ dagger: "\u2020",
477
+ Dagger: "\u2021",
478
+ permil: "\u2030",
479
+ lsaquo: "\u2039",
480
+ rsaquo: "\u203A",
481
+ euro: "\u20AC"
482
+ };
483
+
484
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js
485
+ var dangerous = [
486
+ "cent",
487
+ "copy",
488
+ "divide",
489
+ "gt",
490
+ "lt",
491
+ "not",
492
+ "para",
493
+ "times"
494
+ ];
495
+
496
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js
497
+ var own = {}.hasOwnProperty;
498
+ var characters = {};
499
+ var key;
500
+ for (key in characterEntitiesHtml4) {
501
+ if (own.call(characterEntitiesHtml4, key)) {
502
+ characters[characterEntitiesHtml4[key]] = key;
503
+ }
504
+ }
505
+ var notAlphanumericRegex = /[^\dA-Za-z]/;
506
+ function toNamed(code, next, omit, attribute) {
507
+ const character = String.fromCharCode(code);
508
+ if (own.call(characters, character)) {
509
+ const name = characters[character];
510
+ const value = "&" + name;
511
+ if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next && next !== 61 && notAlphanumericRegex.test(String.fromCharCode(next)))) {
512
+ return value;
513
+ }
514
+ return value + ";";
515
+ }
516
+ return "";
517
+ }
518
+ __name(toNamed, "toNamed");
519
+
520
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js
521
+ function formatSmart(code, next, options) {
522
+ let numeric = toHexadecimal(code, next, options.omitOptionalSemicolons);
523
+ let named;
524
+ if (options.useNamedReferences || options.useShortestReferences) {
525
+ named = toNamed(
526
+ code,
527
+ next,
528
+ options.omitOptionalSemicolons,
529
+ options.attribute
530
+ );
531
+ }
532
+ if ((options.useShortestReferences || !named) && options.useShortestReferences) {
533
+ const decimal = toDecimal(code, next, options.omitOptionalSemicolons);
534
+ if (decimal.length < numeric.length) {
535
+ numeric = decimal;
536
+ }
537
+ }
538
+ return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;
539
+ }
540
+ __name(formatSmart, "formatSmart");
541
+
542
+ // node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js
543
+ function stringifyEntities(value, options) {
544
+ return core(value, Object.assign({ format: formatSmart }, options));
545
+ }
546
+ __name(stringifyEntities, "stringifyEntities");
547
+
548
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/comment.js
549
+ var htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;
550
+ var bogusCommentEntitySubset = [">"];
551
+ var commentEntitySubset = ["<", ">"];
552
+ function comment(node, _1, _2, state) {
553
+ return state.settings.bogusComments ? "<?" + stringifyEntities(
554
+ node.value,
555
+ Object.assign({}, state.settings.characterReferences, {
556
+ subset: bogusCommentEntitySubset
557
+ })
558
+ ) + ">" : "<!--" + node.value.replace(htmlCommentRegex, encode) + "-->";
559
+ function encode($0) {
560
+ return stringifyEntities(
561
+ $0,
562
+ Object.assign({}, state.settings.characterReferences, {
563
+ subset: commentEntitySubset
564
+ })
565
+ );
566
+ }
567
+ __name(encode, "encode");
568
+ }
569
+ __name(comment, "comment");
570
+
571
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/doctype.js
572
+ function doctype(_1, _2, _3, state) {
573
+ return "<!" + (state.settings.upperDoctype ? "DOCTYPE" : "doctype") + (state.settings.tightDoctype ? "" : " ") + "html>";
574
+ }
575
+ __name(doctype, "doctype");
576
+
577
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/omission/util/siblings.js
578
+ var siblingAfter = siblings(1);
579
+ var siblingBefore = siblings(-1);
580
+ var emptyChildren = [];
581
+ function siblings(increment) {
582
+ return sibling;
583
+ function sibling(parent, index, includeWhitespace) {
584
+ const siblings2 = parent ? parent.children : emptyChildren;
585
+ let offset = (index || 0) + increment;
586
+ let next = siblings2[offset];
587
+ if (!includeWhitespace) {
588
+ while (next && whitespace(next)) {
589
+ offset += increment;
590
+ next = siblings2[offset];
591
+ }
592
+ }
593
+ return next;
594
+ }
595
+ __name(sibling, "sibling");
596
+ }
597
+ __name(siblings, "siblings");
598
+
599
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/omission/omission.js
600
+ var own2 = {}.hasOwnProperty;
601
+ function omission(handlers) {
602
+ return omit;
603
+ function omit(node, index, parent) {
604
+ return own2.call(handlers, node.tagName) && handlers[node.tagName](node, index, parent);
605
+ }
606
+ __name(omit, "omit");
607
+ }
608
+ __name(omission, "omission");
609
+
610
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/omission/closing.js
611
+ var closing = omission({
612
+ body,
613
+ caption: headOrColgroupOrCaption,
614
+ colgroup: headOrColgroupOrCaption,
615
+ dd,
616
+ dt,
617
+ head: headOrColgroupOrCaption,
618
+ html: html2,
619
+ li,
620
+ optgroup,
621
+ option,
622
+ p,
623
+ rp: rubyElement,
624
+ rt: rubyElement,
625
+ tbody,
626
+ td: cells,
627
+ tfoot,
628
+ th: cells,
629
+ thead,
630
+ tr
631
+ });
632
+ function headOrColgroupOrCaption(_, index, parent) {
633
+ const next = siblingAfter(parent, index, true);
634
+ return !next || next.type !== "comment" && !(next.type === "text" && whitespace(next.value.charAt(0)));
635
+ }
636
+ __name(headOrColgroupOrCaption, "headOrColgroupOrCaption");
637
+ function html2(_, index, parent) {
638
+ const next = siblingAfter(parent, index);
639
+ return !next || next.type !== "comment";
640
+ }
641
+ __name(html2, "html");
642
+ function body(_, index, parent) {
643
+ const next = siblingAfter(parent, index);
644
+ return !next || next.type !== "comment";
645
+ }
646
+ __name(body, "body");
647
+ function p(_, index, parent) {
648
+ const next = siblingAfter(parent, index);
649
+ return next ? next.type === "element" && (next.tagName === "address" || next.tagName === "article" || next.tagName === "aside" || next.tagName === "blockquote" || next.tagName === "details" || next.tagName === "div" || next.tagName === "dl" || next.tagName === "fieldset" || next.tagName === "figcaption" || next.tagName === "figure" || next.tagName === "footer" || next.tagName === "form" || next.tagName === "h1" || next.tagName === "h2" || next.tagName === "h3" || next.tagName === "h4" || next.tagName === "h5" || next.tagName === "h6" || next.tagName === "header" || next.tagName === "hgroup" || next.tagName === "hr" || next.tagName === "main" || next.tagName === "menu" || next.tagName === "nav" || next.tagName === "ol" || next.tagName === "p" || next.tagName === "pre" || next.tagName === "section" || next.tagName === "table" || next.tagName === "ul") : !parent || // Confusing parent.
650
+ !(parent.type === "element" && (parent.tagName === "a" || parent.tagName === "audio" || parent.tagName === "del" || parent.tagName === "ins" || parent.tagName === "map" || parent.tagName === "noscript" || parent.tagName === "video" || // Custom element.
651
+ parent.tagName.includes("-")));
652
+ }
653
+ __name(p, "p");
654
+ function li(_, index, parent) {
655
+ const next = siblingAfter(parent, index);
656
+ return !next || next.type === "element" && next.tagName === "li";
657
+ }
658
+ __name(li, "li");
659
+ function dt(_, index, parent) {
660
+ const next = siblingAfter(parent, index);
661
+ return Boolean(
662
+ next && next.type === "element" && (next.tagName === "dt" || next.tagName === "dd")
663
+ );
664
+ }
665
+ __name(dt, "dt");
666
+ function dd(_, index, parent) {
667
+ const next = siblingAfter(parent, index);
668
+ return !next || next.type === "element" && (next.tagName === "dt" || next.tagName === "dd");
669
+ }
670
+ __name(dd, "dd");
671
+ function rubyElement(_, index, parent) {
672
+ const next = siblingAfter(parent, index);
673
+ return !next || next.type === "element" && (next.tagName === "rp" || next.tagName === "rt");
674
+ }
675
+ __name(rubyElement, "rubyElement");
676
+ function optgroup(_, index, parent) {
677
+ const next = siblingAfter(parent, index);
678
+ return !next || next.type === "element" && next.tagName === "optgroup";
679
+ }
680
+ __name(optgroup, "optgroup");
681
+ function option(_, index, parent) {
682
+ const next = siblingAfter(parent, index);
683
+ return !next || next.type === "element" && (next.tagName === "option" || next.tagName === "optgroup");
684
+ }
685
+ __name(option, "option");
686
+ function thead(_, index, parent) {
687
+ const next = siblingAfter(parent, index);
688
+ return Boolean(
689
+ next && next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot")
690
+ );
691
+ }
692
+ __name(thead, "thead");
693
+ function tbody(_, index, parent) {
694
+ const next = siblingAfter(parent, index);
695
+ return !next || next.type === "element" && (next.tagName === "tbody" || next.tagName === "tfoot");
696
+ }
697
+ __name(tbody, "tbody");
698
+ function tfoot(_, index, parent) {
699
+ return !siblingAfter(parent, index);
700
+ }
701
+ __name(tfoot, "tfoot");
702
+ function tr(_, index, parent) {
703
+ const next = siblingAfter(parent, index);
704
+ return !next || next.type === "element" && next.tagName === "tr";
705
+ }
706
+ __name(tr, "tr");
707
+ function cells(_, index, parent) {
708
+ const next = siblingAfter(parent, index);
709
+ return !next || next.type === "element" && (next.tagName === "td" || next.tagName === "th");
710
+ }
711
+ __name(cells, "cells");
712
+
713
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/omission/opening.js
714
+ var opening = omission({
715
+ body: body2,
716
+ colgroup,
717
+ head,
718
+ html: html3,
719
+ tbody: tbody2
720
+ });
721
+ function html3(node) {
722
+ const head2 = siblingAfter(node, -1);
723
+ return !head2 || head2.type !== "comment";
724
+ }
725
+ __name(html3, "html");
726
+ function head(node) {
727
+ const seen = /* @__PURE__ */ new Set();
728
+ for (const child2 of node.children) {
729
+ if (child2.type === "element" && (child2.tagName === "base" || child2.tagName === "title")) {
730
+ if (seen.has(child2.tagName)) return false;
731
+ seen.add(child2.tagName);
732
+ }
733
+ }
734
+ const child = node.children[0];
735
+ return !child || child.type === "element";
736
+ }
737
+ __name(head, "head");
738
+ function body2(node) {
739
+ const head2 = siblingAfter(node, -1, true);
740
+ return !head2 || head2.type !== "comment" && !(head2.type === "text" && whitespace(head2.value.charAt(0))) && !(head2.type === "element" && (head2.tagName === "meta" || head2.tagName === "link" || head2.tagName === "script" || head2.tagName === "style" || head2.tagName === "template"));
741
+ }
742
+ __name(body2, "body");
743
+ function colgroup(node, index, parent) {
744
+ const previous = siblingBefore(parent, index);
745
+ if (parent && previous && previous.type === "element" && previous.tagName === "colgroup" && closing(previous, parent.children.indexOf(previous), parent)) {
746
+ return false;
747
+ }
748
+ const head2 = siblingAfter(node, -1, true);
749
+ return Boolean(head2 && head2.type === "element" && head2.tagName === "col");
750
+ }
751
+ __name(colgroup, "colgroup");
752
+ function tbody2(node, index, parent) {
753
+ const previous = siblingBefore(parent, index);
754
+ if (parent && previous && previous.type === "element" && (previous.tagName === "thead" || previous.tagName === "tbody") && closing(previous, parent.children.indexOf(previous), parent)) {
755
+ return false;
756
+ }
757
+ const head2 = siblingAfter(node, -1);
758
+ return Boolean(head2 && head2.type === "element" && head2.tagName === "tr");
759
+ }
760
+ __name(tbody2, "tbody");
761
+
762
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/element.js
763
+ var constants = {
764
+ // See: <https://html.spec.whatwg.org/#attribute-name-state>.
765
+ name: [
766
+ [" \n\f\r &/=>".split(""), " \n\f\r \"&'/=>`".split("")],
767
+ [`\0
768
+ \f\r "&'/<=>`.split(""), "\0 \n\f\r \"&'/<=>`".split("")]
769
+ ],
770
+ // See: <https://html.spec.whatwg.org/#attribute-value-(unquoted)-state>.
771
+ unquoted: [
772
+ [" \n\f\r &>".split(""), "\0 \n\f\r \"&'<=>`".split("")],
773
+ ["\0 \n\f\r \"&'<=>`".split(""), "\0 \n\f\r \"&'<=>`".split("")]
774
+ ],
775
+ // See: <https://html.spec.whatwg.org/#attribute-value-(single-quoted)-state>.
776
+ single: [
777
+ ["&'".split(""), "\"&'`".split("")],
778
+ ["\0&'".split(""), "\0\"&'`".split("")]
779
+ ],
780
+ // See: <https://html.spec.whatwg.org/#attribute-value-(double-quoted)-state>.
781
+ double: [
782
+ ['"&'.split(""), "\"&'`".split("")],
783
+ ['\0"&'.split(""), "\0\"&'`".split("")]
784
+ ]
785
+ };
786
+ var htmlIntegrationPoints = /* @__PURE__ */ new Set(["desc", "foreignObject", "title"]);
787
+ function element(node, index, parent, state) {
788
+ const { schema } = state;
789
+ const omit = schema.space === "svg" ? false : state.settings.omitOptionalTags;
790
+ let selfClosing = schema.space === "svg" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());
791
+ const parts = [];
792
+ if (schema.space === "html" && node.tagName === "svg") {
793
+ state.schema = svg;
794
+ }
795
+ const attributes = serializeAttributes(state, node.properties);
796
+ if (state.schema.space === "svg" && htmlIntegrationPoints.has(node.tagName)) {
797
+ state.schema = html;
798
+ }
799
+ const content = state.all(
800
+ schema.space === "html" && node.tagName === "template" ? node.content : node
801
+ );
802
+ state.schema = schema;
803
+ if (content) selfClosing = false;
804
+ if (attributes || !omit || !opening(node, index, parent)) {
805
+ parts.push("<", node.tagName, attributes ? " " + attributes : "");
806
+ if (selfClosing && (schema.space === "svg" || state.settings.closeSelfClosing)) {
807
+ const last = attributes.charAt(attributes.length - 1);
808
+ if (!state.settings.tightSelfClosing || last === "/" || last && last !== '"' && last !== "'") {
809
+ parts.push(" ");
810
+ }
811
+ parts.push("/");
812
+ }
813
+ parts.push(">");
814
+ }
815
+ parts.push(content);
816
+ if (!selfClosing && (!omit || !closing(node, index, parent))) {
817
+ parts.push("</" + node.tagName + ">");
818
+ }
819
+ return parts.join("");
820
+ }
821
+ __name(element, "element");
822
+ function serializeAttributes(state, properties) {
823
+ const values = [];
824
+ let index = -1;
825
+ let key2;
826
+ if (properties) {
827
+ for (key2 in properties) {
828
+ if (properties[key2] !== null && properties[key2] !== void 0) {
829
+ const value = serializeAttribute(state, key2, properties[key2]);
830
+ if (value) values.push(value);
831
+ }
832
+ }
833
+ }
834
+ while (++index < values.length) {
835
+ const last = state.settings.tightAttributes ? values[index].charAt(values[index].length - 1) : void 0;
836
+ if (index !== values.length - 1 && last !== '"' && last !== "'") {
837
+ values[index] += " ";
838
+ }
839
+ }
840
+ return values.join("");
841
+ }
842
+ __name(serializeAttributes, "serializeAttributes");
843
+ function serializeAttribute(state, key2, value) {
844
+ const info = find(state.schema, key2);
845
+ const x = state.settings.allowParseErrors && state.schema.space === "html" ? 0 : 1;
846
+ const y = state.settings.allowDangerousCharacters ? 0 : 1;
847
+ if (info.overloadedBoolean && (value === info.attribute || value === "")) {
848
+ value = true;
849
+ } else if ((info.boolean || info.overloadedBoolean) && (typeof value !== "string" || value === info.attribute || value === "")) {
850
+ value = Boolean(value);
851
+ }
852
+ if (value === null || value === void 0 || value === false || typeof value === "number" && Number.isNaN(value)) {
853
+ return "";
854
+ }
855
+ const name = stringifyEntities(
856
+ info.attribute,
857
+ Object.assign({}, state.settings.characterReferences, {
858
+ // Always encode without parse errors in non-HTML.
859
+ subset: constants.name[x][y]
860
+ })
861
+ );
862
+ if (value === true) return name;
863
+ value = Array.isArray(value) ? (info.commaSeparated ? stringify : stringify2)(value, {
864
+ padLeft: !state.settings.tightCommaSeparatedLists
865
+ }) : String(value);
866
+ if (state.settings.collapseEmptyAttributes && !value) return name;
867
+ let result;
868
+ if (state.settings.preferUnquoted) {
869
+ result = stringifyEntities(
870
+ value,
871
+ Object.assign({}, state.settings.characterReferences, {
872
+ attribute: true,
873
+ subset: constants.unquoted[x][y]
874
+ })
875
+ );
876
+ }
877
+ if (result !== value) {
878
+ let { quote } = state;
879
+ if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) {
880
+ quote = state.alternative;
881
+ }
882
+ result = quote + stringifyEntities(
883
+ value,
884
+ Object.assign({}, state.settings.characterReferences, {
885
+ // Always encode without parse errors in non-HTML.
886
+ subset: (quote === "'" ? constants.single : constants.double)[x][y],
887
+ attribute: true
888
+ })
889
+ ) + quote;
890
+ }
891
+ return name + (result ? "=" + result : result);
892
+ }
893
+ __name(serializeAttribute, "serializeAttribute");
894
+
895
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/text.js
896
+ var textEntitySubset = ["<", "&"];
897
+ function text(node, _, parent, state) {
898
+ return parent && parent.type === "element" && (parent.tagName === "script" || parent.tagName === "style") ? node.value : stringifyEntities(
899
+ node.value,
900
+ Object.assign({}, state.settings.characterReferences, {
901
+ subset: textEntitySubset
902
+ })
903
+ );
904
+ }
905
+ __name(text, "text");
906
+
907
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/raw.js
908
+ function raw(node, index, parent, state) {
909
+ return state.settings.allowDangerousHtml ? node.value : text(node, index, parent, state);
910
+ }
911
+ __name(raw, "raw");
912
+
913
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/root.js
914
+ function root(node, _1, _2, state) {
915
+ return state.all(node);
916
+ }
917
+ __name(root, "root");
918
+
919
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/handle/index.js
920
+ var handle = zwitch("type", {
921
+ invalid,
922
+ unknown,
923
+ handlers: { comment, doctype, element, raw, root, text }
924
+ });
925
+ function invalid(node) {
926
+ throw new Error("Expected node, not `" + node + "`");
927
+ }
928
+ __name(invalid, "invalid");
929
+ function unknown(node_) {
930
+ const node = (
931
+ /** @type {Nodes} */
932
+ node_
933
+ );
934
+ throw new Error("Cannot compile unknown node `" + node.type + "`");
935
+ }
936
+ __name(unknown, "unknown");
937
+
938
+ // node_modules/.pnpm/hast-util-to-html@9.0.6/node_modules/hast-util-to-html/lib/index.js
939
+ var emptyOptions = {};
940
+ var emptyCharacterReferences = {};
941
+ var emptyChildren2 = [];
942
+ function toHtml(tree, options) {
943
+ const options_ = options || emptyOptions;
944
+ const quote = options_.quote || '"';
945
+ if (quote !== '"' && quote !== "'") {
946
+ throw new Error("Invalid quote `" + quote + "`, expected `'` or `\"`");
947
+ }
948
+ const alternative = quote === '"' ? "'" : '"';
949
+ const state = {
950
+ one,
951
+ all,
952
+ settings: {
953
+ omitOptionalTags: options_.omitOptionalTags || false,
954
+ allowParseErrors: options_.allowParseErrors || false,
955
+ allowDangerousCharacters: options_.allowDangerousCharacters || false,
956
+ quoteSmart: options_.quoteSmart || false,
957
+ preferUnquoted: options_.preferUnquoted || false,
958
+ tightAttributes: options_.tightAttributes || false,
959
+ upperDoctype: options_.upperDoctype || false,
960
+ tightDoctype: options_.tightDoctype || false,
961
+ bogusComments: options_.bogusComments || false,
962
+ tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,
963
+ tightSelfClosing: options_.tightSelfClosing || false,
964
+ collapseEmptyAttributes: options_.collapseEmptyAttributes || false,
965
+ allowDangerousHtml: options_.allowDangerousHtml || false,
966
+ voids: options_.voids || htmlVoidElements,
967
+ characterReferences: options_.characterReferences || emptyCharacterReferences,
968
+ closeSelfClosing: options_.closeSelfClosing || false,
969
+ closeEmptyElements: options_.closeEmptyElements || false
970
+ },
971
+ schema: options_.space === "svg" ? svg : html,
972
+ quote,
973
+ alternative
974
+ };
975
+ return state.one(
976
+ Array.isArray(tree) ? { type: "root", children: tree } : tree,
977
+ void 0,
978
+ void 0
979
+ );
980
+ }
981
+ __name(toHtml, "toHtml");
982
+ function one(node, index, parent) {
983
+ return handle(node, index, parent, this);
984
+ }
985
+ __name(one, "one");
986
+ function all(parent) {
987
+ const results = [];
988
+ const children = parent && parent.children || emptyChildren2;
989
+ let index = -1;
990
+ while (++index < children.length) {
991
+ results[index] = this.one(children[index], index, parent);
992
+ }
993
+ return results.join("");
994
+ }
995
+ __name(all, "all");
996
+ export {
997
+ toHtml
998
+ };