nolune 0.4.2 → 0.5.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 (821) hide show
  1. package/DESIGN.md +646 -38
  2. package/README.md +21 -11
  3. package/dist/chunks/chunk-2Z3QOLXA.js +19934 -0
  4. package/dist/chunks/chunk-GVHJYXT4.js +114 -0
  5. package/dist/chunks/run-T6CARDLK.js +44015 -0
  6. package/dist/chunks/zod-EQ7NYDR4.js +524 -0
  7. package/dist/cli.js +2 -2
  8. package/package.json +1 -1
  9. package/packages/core/drizzle/0022_push_devices.sql +12 -0
  10. package/packages/core/drizzle/meta/0022_snapshot.json +2509 -0
  11. package/packages/core/drizzle/meta/_journal.json +7 -0
  12. package/packages/core/skills/generate-images/SKILL.md +7 -2
  13. package/packages/core/skills/nolune/SKILL.md +34 -8
  14. package/packages/web/build/client/_app/immutable/assets/0.DULk3KZs.css +2 -0
  15. package/packages/web/build/client/_app/immutable/assets/0.DULk3KZs.css.br +0 -0
  16. package/packages/web/build/client/_app/immutable/assets/0.DULk3KZs.css.gz +0 -0
  17. package/packages/web/build/client/_app/immutable/chunks/-T7ZeXhr.js +1 -0
  18. package/packages/web/build/client/_app/immutable/chunks/-T7ZeXhr.js.br +0 -0
  19. package/packages/web/build/client/_app/immutable/chunks/-T7ZeXhr.js.gz +0 -0
  20. package/packages/web/build/client/_app/immutable/chunks/-m4jXt43.js +1 -0
  21. package/packages/web/build/client/_app/immutable/chunks/-m4jXt43.js.br +0 -0
  22. package/packages/web/build/client/_app/immutable/chunks/-m4jXt43.js.gz +0 -0
  23. package/packages/web/build/client/_app/immutable/chunks/-t-e-QXp.js +1 -0
  24. package/packages/web/build/client/_app/immutable/chunks/-t-e-QXp.js.br +0 -0
  25. package/packages/web/build/client/_app/immutable/chunks/-t-e-QXp.js.gz +0 -0
  26. package/packages/web/build/client/_app/immutable/chunks/6KlB8cSf.js +5 -0
  27. package/packages/web/build/client/_app/immutable/chunks/6KlB8cSf.js.br +0 -0
  28. package/packages/web/build/client/_app/immutable/chunks/6KlB8cSf.js.gz +0 -0
  29. package/packages/web/build/client/_app/immutable/chunks/B3B6Llhi.js +1 -0
  30. package/packages/web/build/client/_app/immutable/chunks/B3B6Llhi.js.br +0 -0
  31. package/packages/web/build/client/_app/immutable/chunks/B3B6Llhi.js.gz +0 -0
  32. package/packages/web/build/client/_app/immutable/chunks/BCGP0kNs.js +1 -0
  33. package/packages/web/build/client/_app/immutable/chunks/BCGP0kNs.js.br +0 -0
  34. package/packages/web/build/client/_app/immutable/chunks/BCGP0kNs.js.gz +0 -0
  35. package/packages/web/build/client/_app/immutable/chunks/BFZMinfc.js +1 -0
  36. package/packages/web/build/client/_app/immutable/chunks/BFZMinfc.js.br +4 -0
  37. package/packages/web/build/client/_app/immutable/chunks/BFZMinfc.js.gz +0 -0
  38. package/packages/web/build/client/_app/immutable/chunks/BKUKYer_.js +1 -0
  39. package/packages/web/build/client/_app/immutable/chunks/BKUKYer_.js.br +0 -0
  40. package/packages/web/build/client/_app/immutable/chunks/BKUKYer_.js.gz +0 -0
  41. package/packages/web/build/client/_app/immutable/chunks/BWdxhuCi.js +1 -0
  42. package/packages/web/build/client/_app/immutable/chunks/BWdxhuCi.js.br +0 -0
  43. package/packages/web/build/client/_app/immutable/chunks/BWdxhuCi.js.gz +0 -0
  44. package/packages/web/build/client/_app/immutable/chunks/BWmU4kw5.js +1 -0
  45. package/packages/web/build/client/_app/immutable/chunks/BWmU4kw5.js.br +0 -0
  46. package/packages/web/build/client/_app/immutable/chunks/BWmU4kw5.js.gz +0 -0
  47. package/packages/web/build/client/_app/immutable/chunks/BZj87B8z.js +1 -0
  48. package/packages/web/build/client/_app/immutable/chunks/BZj87B8z.js.br +0 -0
  49. package/packages/web/build/client/_app/immutable/chunks/BZj87B8z.js.gz +0 -0
  50. package/packages/web/build/client/_app/immutable/chunks/BcdKO4vp.js +1 -0
  51. package/packages/web/build/client/_app/immutable/chunks/BcdKO4vp.js.br +0 -0
  52. package/packages/web/build/client/_app/immutable/chunks/BcdKO4vp.js.gz +0 -0
  53. package/packages/web/build/client/_app/immutable/chunks/Bko4hWj0.js +1 -0
  54. package/packages/web/build/client/_app/immutable/chunks/Bko4hWj0.js.br +0 -0
  55. package/packages/web/build/client/_app/immutable/chunks/Bko4hWj0.js.gz +0 -0
  56. package/packages/web/build/client/_app/immutable/chunks/BlA-9xoX.js +1 -0
  57. package/packages/web/build/client/_app/immutable/chunks/BlA-9xoX.js.br +0 -0
  58. package/packages/web/build/client/_app/immutable/chunks/BlA-9xoX.js.gz +0 -0
  59. package/packages/web/build/client/_app/immutable/chunks/Bs1LQH6_.js +1 -0
  60. package/packages/web/build/client/_app/immutable/chunks/Bs1LQH6_.js.br +0 -0
  61. package/packages/web/build/client/_app/immutable/chunks/Bs1LQH6_.js.gz +0 -0
  62. package/packages/web/build/client/_app/immutable/chunks/BzgcyIJE.js +318 -0
  63. package/packages/web/build/client/_app/immutable/chunks/BzgcyIJE.js.br +0 -0
  64. package/packages/web/build/client/_app/immutable/chunks/BzgcyIJE.js.gz +0 -0
  65. package/packages/web/build/client/_app/immutable/chunks/C4cO3_55.js +1 -0
  66. package/packages/web/build/client/_app/immutable/chunks/C4cO3_55.js.br +0 -0
  67. package/packages/web/build/client/_app/immutable/chunks/C4cO3_55.js.gz +0 -0
  68. package/packages/web/build/client/_app/immutable/chunks/C6Tl8wAY.js +1 -0
  69. package/packages/web/build/client/_app/immutable/chunks/C6Tl8wAY.js.br +0 -0
  70. package/packages/web/build/client/_app/immutable/chunks/C6Tl8wAY.js.gz +0 -0
  71. package/packages/web/build/client/_app/immutable/chunks/CCmHEbQf.js +1 -0
  72. package/packages/web/build/client/_app/immutable/chunks/CCmHEbQf.js.br +0 -0
  73. package/packages/web/build/client/_app/immutable/chunks/CCmHEbQf.js.gz +0 -0
  74. package/packages/web/build/client/_app/immutable/chunks/CIF1K2JS.js +1 -0
  75. package/packages/web/build/client/_app/immutable/chunks/CIF1K2JS.js.br +1 -0
  76. package/packages/web/build/client/_app/immutable/chunks/CIF1K2JS.js.gz +0 -0
  77. package/packages/web/build/client/_app/immutable/chunks/CJc_Xs9A.js +1 -0
  78. package/packages/web/build/client/_app/immutable/chunks/CJc_Xs9A.js.br +0 -0
  79. package/packages/web/build/client/_app/immutable/chunks/CJc_Xs9A.js.gz +0 -0
  80. package/packages/web/build/client/_app/immutable/chunks/CNP2DAoA.js +1 -0
  81. package/packages/web/build/client/_app/immutable/chunks/CNP2DAoA.js.br +0 -0
  82. package/packages/web/build/client/_app/immutable/chunks/CNP2DAoA.js.gz +0 -0
  83. package/packages/web/build/client/_app/immutable/chunks/CQaGupfC.js +1 -0
  84. package/packages/web/build/client/_app/immutable/chunks/CQaGupfC.js.br +0 -0
  85. package/packages/web/build/client/_app/immutable/chunks/CQaGupfC.js.gz +0 -0
  86. package/packages/web/build/client/_app/immutable/chunks/CSNLU-Se.js +1 -0
  87. package/packages/web/build/client/_app/immutable/chunks/CSNLU-Se.js.br +0 -0
  88. package/packages/web/build/client/_app/immutable/chunks/CSNLU-Se.js.gz +0 -0
  89. package/packages/web/build/client/_app/immutable/chunks/CYw-rJle.js +1 -0
  90. package/packages/web/build/client/_app/immutable/chunks/CYw-rJle.js.br +0 -0
  91. package/packages/web/build/client/_app/immutable/chunks/CYw-rJle.js.gz +0 -0
  92. package/packages/web/build/client/_app/immutable/chunks/CfX0J3Px.js +1 -0
  93. package/packages/web/build/client/_app/immutable/chunks/CfX0J3Px.js.br +0 -0
  94. package/packages/web/build/client/_app/immutable/chunks/CfX0J3Px.js.gz +0 -0
  95. package/packages/web/build/client/_app/immutable/chunks/CmdxZV_y.js +1 -0
  96. package/packages/web/build/client/_app/immutable/chunks/CmdxZV_y.js.br +0 -0
  97. package/packages/web/build/client/_app/immutable/chunks/CmdxZV_y.js.gz +0 -0
  98. package/packages/web/build/client/_app/immutable/chunks/CvOA2Iag.js +1 -0
  99. package/packages/web/build/client/_app/immutable/chunks/CvOA2Iag.js.br +0 -0
  100. package/packages/web/build/client/_app/immutable/chunks/CvOA2Iag.js.gz +0 -0
  101. package/packages/web/build/client/_app/immutable/chunks/D0gG26QQ.js +1 -0
  102. package/packages/web/build/client/_app/immutable/chunks/D0gG26QQ.js.br +0 -0
  103. package/packages/web/build/client/_app/immutable/chunks/D0gG26QQ.js.gz +0 -0
  104. package/packages/web/build/client/_app/immutable/chunks/D6PEWnLY.js +1 -0
  105. package/packages/web/build/client/_app/immutable/chunks/D6PEWnLY.js.br +0 -0
  106. package/packages/web/build/client/_app/immutable/chunks/D6PEWnLY.js.gz +0 -0
  107. package/packages/web/build/client/_app/immutable/chunks/D8bTY0ZV.js +2 -0
  108. package/packages/web/build/client/_app/immutable/chunks/D8bTY0ZV.js.br +0 -0
  109. package/packages/web/build/client/_app/immutable/chunks/D8bTY0ZV.js.gz +0 -0
  110. package/packages/web/build/client/_app/immutable/chunks/DGKGn3_0.js +1 -0
  111. package/packages/web/build/client/_app/immutable/chunks/DGKGn3_0.js.br +0 -0
  112. package/packages/web/build/client/_app/immutable/chunks/DGKGn3_0.js.gz +0 -0
  113. package/packages/web/build/client/_app/immutable/chunks/DKl5azdQ.js +1 -0
  114. package/packages/web/build/client/_app/immutable/chunks/DKl5azdQ.js.br +0 -0
  115. package/packages/web/build/client/_app/immutable/chunks/DKl5azdQ.js.gz +0 -0
  116. package/packages/web/build/client/_app/immutable/chunks/DPZkYMz9.js +1 -0
  117. package/packages/web/build/client/_app/immutable/chunks/DPZkYMz9.js.br +0 -0
  118. package/packages/web/build/client/_app/immutable/chunks/DPZkYMz9.js.gz +0 -0
  119. package/packages/web/build/client/_app/immutable/chunks/DPgw3MzI.js +1 -0
  120. package/packages/web/build/client/_app/immutable/chunks/DPgw3MzI.js.br +3 -0
  121. package/packages/web/build/client/_app/immutable/chunks/DPgw3MzI.js.gz +0 -0
  122. package/packages/web/build/client/_app/immutable/chunks/DSVv-e0J.js +1 -0
  123. package/packages/web/build/client/_app/immutable/chunks/DSVv-e0J.js.br +0 -0
  124. package/packages/web/build/client/_app/immutable/chunks/DSVv-e0J.js.gz +0 -0
  125. package/packages/web/build/client/_app/immutable/chunks/DXdes0UR.js +1 -0
  126. package/packages/web/build/client/_app/immutable/chunks/DXdes0UR.js.br +0 -0
  127. package/packages/web/build/client/_app/immutable/chunks/DXdes0UR.js.gz +0 -0
  128. package/packages/web/build/client/_app/immutable/chunks/DYmn9wN5.js +1 -0
  129. package/packages/web/build/client/_app/immutable/chunks/DYmn9wN5.js.br +0 -0
  130. package/packages/web/build/client/_app/immutable/chunks/DYmn9wN5.js.gz +0 -0
  131. package/packages/web/build/client/_app/immutable/chunks/Dc0QudS7.js +1 -0
  132. package/packages/web/build/client/_app/immutable/chunks/Dc0QudS7.js.br +0 -0
  133. package/packages/web/build/client/_app/immutable/chunks/Dc0QudS7.js.gz +0 -0
  134. package/packages/web/build/client/_app/immutable/chunks/DfP_G-hn.js +1 -0
  135. package/packages/web/build/client/_app/immutable/chunks/DfP_G-hn.js.br +0 -0
  136. package/packages/web/build/client/_app/immutable/chunks/DfP_G-hn.js.gz +0 -0
  137. package/packages/web/build/client/_app/immutable/chunks/Dnh1jMGS.js +1 -0
  138. package/packages/web/build/client/_app/immutable/chunks/Dnh1jMGS.js.br +0 -0
  139. package/packages/web/build/client/_app/immutable/chunks/Dnh1jMGS.js.gz +0 -0
  140. package/packages/web/build/client/_app/immutable/chunks/DyPIfbpZ.js +1 -0
  141. package/packages/web/build/client/_app/immutable/chunks/DyPIfbpZ.js.br +0 -0
  142. package/packages/web/build/client/_app/immutable/chunks/DyPIfbpZ.js.gz +0 -0
  143. package/packages/web/build/client/_app/immutable/chunks/FhfC59KT.js +31 -0
  144. package/packages/web/build/client/_app/immutable/chunks/FhfC59KT.js.br +0 -0
  145. package/packages/web/build/client/_app/immutable/chunks/FhfC59KT.js.gz +0 -0
  146. package/packages/web/build/client/_app/immutable/chunks/Gj_6ZTkx.js +1 -0
  147. package/packages/web/build/client/_app/immutable/chunks/Gj_6ZTkx.js.br +0 -0
  148. package/packages/web/build/client/_app/immutable/chunks/Gj_6ZTkx.js.gz +0 -0
  149. package/packages/web/build/client/_app/immutable/chunks/Hzat7i06.js +1 -0
  150. package/packages/web/build/client/_app/immutable/chunks/Hzat7i06.js.br +0 -0
  151. package/packages/web/build/client/_app/immutable/chunks/Hzat7i06.js.gz +0 -0
  152. package/packages/web/build/client/_app/immutable/chunks/MVtmBSNF.js +67 -0
  153. package/packages/web/build/client/_app/immutable/chunks/MVtmBSNF.js.br +0 -0
  154. package/packages/web/build/client/_app/immutable/chunks/MVtmBSNF.js.gz +0 -0
  155. package/packages/web/build/client/_app/immutable/chunks/NtbSeYL-.js +1 -0
  156. package/packages/web/build/client/_app/immutable/chunks/NtbSeYL-.js.br +0 -0
  157. package/packages/web/build/client/_app/immutable/chunks/NtbSeYL-.js.gz +0 -0
  158. package/packages/web/build/client/_app/immutable/chunks/VRhCLClG.js +1 -0
  159. package/packages/web/build/client/_app/immutable/chunks/VRhCLClG.js.br +0 -0
  160. package/packages/web/build/client/_app/immutable/chunks/VRhCLClG.js.gz +0 -0
  161. package/packages/web/build/client/_app/immutable/chunks/WW5jjSM9.js +9 -0
  162. package/packages/web/build/client/_app/immutable/chunks/WW5jjSM9.js.br +0 -0
  163. package/packages/web/build/client/_app/immutable/chunks/WW5jjSM9.js.gz +0 -0
  164. package/packages/web/build/client/_app/immutable/chunks/ZpFlM0Kw.js +1 -0
  165. package/packages/web/build/client/_app/immutable/chunks/ZpFlM0Kw.js.br +0 -0
  166. package/packages/web/build/client/_app/immutable/chunks/ZpFlM0Kw.js.gz +0 -0
  167. package/packages/web/build/client/_app/immutable/chunks/_Qz9RYYh.js +1 -0
  168. package/packages/web/build/client/_app/immutable/chunks/_Qz9RYYh.js.br +0 -0
  169. package/packages/web/build/client/_app/immutable/chunks/_Qz9RYYh.js.gz +0 -0
  170. package/packages/web/build/client/_app/immutable/chunks/cDcNOj8_.js +5 -0
  171. package/packages/web/build/client/_app/immutable/chunks/cDcNOj8_.js.br +0 -0
  172. package/packages/web/build/client/_app/immutable/chunks/cDcNOj8_.js.gz +0 -0
  173. package/packages/web/build/client/_app/immutable/chunks/e3XXXJrc.js +1 -0
  174. package/packages/web/build/client/_app/immutable/chunks/e3XXXJrc.js.br +0 -0
  175. package/packages/web/build/client/_app/immutable/chunks/e3XXXJrc.js.gz +0 -0
  176. package/packages/web/build/client/_app/immutable/chunks/ecw0Iv8U.js +1 -0
  177. package/packages/web/build/client/_app/immutable/chunks/ecw0Iv8U.js.br +0 -0
  178. package/packages/web/build/client/_app/immutable/chunks/ecw0Iv8U.js.gz +0 -0
  179. package/packages/web/build/client/_app/immutable/chunks/elzEok9o.js +1 -0
  180. package/packages/web/build/client/_app/immutable/chunks/elzEok9o.js.br +0 -0
  181. package/packages/web/build/client/_app/immutable/chunks/elzEok9o.js.gz +0 -0
  182. package/packages/web/build/client/_app/immutable/chunks/jnnHsUzT.js +1 -0
  183. package/packages/web/build/client/_app/immutable/chunks/jnnHsUzT.js.br +0 -0
  184. package/packages/web/build/client/_app/immutable/chunks/jnnHsUzT.js.gz +0 -0
  185. package/packages/web/build/client/_app/immutable/chunks/mlLGBvD8.js +1 -0
  186. package/packages/web/build/client/_app/immutable/chunks/mlLGBvD8.js.br +0 -0
  187. package/packages/web/build/client/_app/immutable/chunks/mlLGBvD8.js.gz +0 -0
  188. package/packages/web/build/client/_app/immutable/chunks/zvVYLG7o.js +1 -0
  189. package/packages/web/build/client/_app/immutable/chunks/zvVYLG7o.js.br +0 -0
  190. package/packages/web/build/client/_app/immutable/chunks/zvVYLG7o.js.gz +0 -0
  191. package/packages/web/build/client/_app/immutable/entry/app.wrMwybtS.js +2 -0
  192. package/packages/web/build/client/_app/immutable/entry/app.wrMwybtS.js.br +0 -0
  193. package/packages/web/build/client/_app/immutable/entry/app.wrMwybtS.js.gz +0 -0
  194. package/packages/web/build/client/_app/immutable/entry/start.CPCGo-Uj.js +1 -0
  195. package/packages/web/build/client/_app/immutable/entry/start.CPCGo-Uj.js.br +0 -0
  196. package/packages/web/build/client/_app/immutable/entry/start.CPCGo-Uj.js.gz +0 -0
  197. package/packages/web/build/client/_app/immutable/nodes/0.C03cafHn.js +1 -0
  198. package/packages/web/build/client/_app/immutable/nodes/0.C03cafHn.js.br +0 -0
  199. package/packages/web/build/client/_app/immutable/nodes/0.C03cafHn.js.gz +0 -0
  200. package/packages/web/build/client/_app/immutable/nodes/1.CWR3XYMD.js +1 -0
  201. package/packages/web/build/client/_app/immutable/nodes/1.CWR3XYMD.js.br +0 -0
  202. package/packages/web/build/client/_app/immutable/nodes/1.CWR3XYMD.js.gz +0 -0
  203. package/packages/web/build/client/_app/immutable/nodes/10.qH98q4DH.js +1 -0
  204. package/packages/web/build/client/_app/immutable/nodes/10.qH98q4DH.js.br +0 -0
  205. package/packages/web/build/client/_app/immutable/nodes/10.qH98q4DH.js.gz +0 -0
  206. package/packages/web/build/client/_app/immutable/nodes/11.DI96zs4C.js +1 -0
  207. package/packages/web/build/client/_app/immutable/nodes/11.DI96zs4C.js.br +0 -0
  208. package/packages/web/build/client/_app/immutable/nodes/11.DI96zs4C.js.gz +0 -0
  209. package/packages/web/build/client/_app/immutable/nodes/12.N3gJTkel.js +4 -0
  210. package/packages/web/build/client/_app/immutable/nodes/12.N3gJTkel.js.br +0 -0
  211. package/packages/web/build/client/_app/immutable/nodes/12.N3gJTkel.js.gz +0 -0
  212. package/packages/web/build/client/_app/immutable/nodes/13.Dn1hta1C.js +1 -0
  213. package/packages/web/build/client/_app/immutable/nodes/13.Dn1hta1C.js.br +0 -0
  214. package/packages/web/build/client/_app/immutable/nodes/13.Dn1hta1C.js.gz +0 -0
  215. package/packages/web/build/client/_app/immutable/nodes/14.UtsylriY.js +1 -0
  216. package/packages/web/build/client/_app/immutable/nodes/14.UtsylriY.js.br +0 -0
  217. package/packages/web/build/client/_app/immutable/nodes/14.UtsylriY.js.gz +0 -0
  218. package/packages/web/build/client/_app/immutable/nodes/15.DuVSd8ZF.js +2 -0
  219. package/packages/web/build/client/_app/immutable/nodes/15.DuVSd8ZF.js.br +0 -0
  220. package/packages/web/build/client/_app/immutable/nodes/15.DuVSd8ZF.js.gz +0 -0
  221. package/packages/web/build/client/_app/immutable/nodes/16.DSoLdBKL.js +1 -0
  222. package/packages/web/build/client/_app/immutable/nodes/16.DSoLdBKL.js.br +0 -0
  223. package/packages/web/build/client/_app/immutable/nodes/16.DSoLdBKL.js.gz +0 -0
  224. package/packages/web/build/client/_app/immutable/nodes/17.D9YL6jeJ.js +1 -0
  225. package/packages/web/build/client/_app/immutable/nodes/17.D9YL6jeJ.js.br +0 -0
  226. package/packages/web/build/client/_app/immutable/nodes/17.D9YL6jeJ.js.gz +0 -0
  227. package/packages/web/build/client/_app/immutable/nodes/18.DoPpdnnh.js +46 -0
  228. package/packages/web/build/client/_app/immutable/nodes/18.DoPpdnnh.js.br +0 -0
  229. package/packages/web/build/client/_app/immutable/nodes/18.DoPpdnnh.js.gz +0 -0
  230. package/packages/web/build/client/_app/immutable/nodes/19.BvaulYxf.js +1 -0
  231. package/packages/web/build/client/_app/immutable/nodes/19.BvaulYxf.js.br +0 -0
  232. package/packages/web/build/client/_app/immutable/nodes/19.BvaulYxf.js.gz +0 -0
  233. package/packages/web/build/client/_app/immutable/nodes/2.ZqlN-6n5.js +1 -0
  234. package/packages/web/build/client/_app/immutable/nodes/2.ZqlN-6n5.js.br +0 -0
  235. package/packages/web/build/client/_app/immutable/nodes/2.ZqlN-6n5.js.gz +0 -0
  236. package/packages/web/build/client/_app/immutable/nodes/4.DJOvi0c1.js +2 -0
  237. package/packages/web/build/client/_app/immutable/nodes/4.DJOvi0c1.js.br +0 -0
  238. package/packages/web/build/client/_app/immutable/nodes/4.DJOvi0c1.js.gz +0 -0
  239. package/packages/web/build/client/_app/immutable/nodes/5.CAnPk4C8.js +1 -0
  240. package/packages/web/build/client/_app/immutable/nodes/5.CAnPk4C8.js.br +0 -0
  241. package/packages/web/build/client/_app/immutable/nodes/5.CAnPk4C8.js.gz +0 -0
  242. package/packages/web/build/client/_app/immutable/nodes/6.CIysiBab.js +1 -0
  243. package/packages/web/build/client/_app/immutable/nodes/6.CIysiBab.js.br +0 -0
  244. package/packages/web/build/client/_app/immutable/nodes/6.CIysiBab.js.gz +0 -0
  245. package/packages/web/build/client/_app/immutable/nodes/7.DuQJ21i5.js +2 -0
  246. package/packages/web/build/client/_app/immutable/nodes/7.DuQJ21i5.js.br +0 -0
  247. package/packages/web/build/client/_app/immutable/nodes/7.DuQJ21i5.js.gz +0 -0
  248. package/packages/web/build/client/_app/immutable/nodes/8._IrSFGxl.js +1 -0
  249. package/packages/web/build/client/_app/immutable/nodes/8._IrSFGxl.js.br +0 -0
  250. package/packages/web/build/client/_app/immutable/nodes/8._IrSFGxl.js.gz +0 -0
  251. package/packages/web/build/client/_app/immutable/nodes/9.BoILuwTb.js +1 -0
  252. package/packages/web/build/client/_app/immutable/nodes/9.BoILuwTb.js.br +0 -0
  253. package/packages/web/build/client/_app/immutable/nodes/9.BoILuwTb.js.gz +0 -0
  254. package/packages/web/build/client/_app/version.json +1 -1
  255. package/packages/web/build/client/_app/version.json.br +0 -0
  256. package/packages/web/build/client/_app/version.json.gz +0 -0
  257. package/packages/web/build/handler.js +4 -4
  258. package/packages/web/build/index.js +4 -4
  259. package/packages/web/build/server/chunks/chunks/AssistantAvatar.js-DGlsgi7z.js +294 -0
  260. package/packages/web/build/server/chunks/chunks/AvatarPicker.js-XTQF_UST.js +136 -0
  261. package/packages/web/build/server/chunks/chunks/Composer.js-C4Q5YhRX.js +333 -0
  262. package/packages/web/build/server/chunks/chunks/ComposerDock.js-CRI5LWWB.js +58 -0
  263. package/packages/web/build/server/chunks/chunks/CopyButton.js-SR984SrX.js +81 -0
  264. package/packages/web/build/server/chunks/chunks/DotGrid.js-CWRXVEb4.js +108 -0
  265. package/packages/web/build/server/chunks/chunks/MemoryChangeItem.js-B1-E6mZa.js +2588 -0
  266. package/packages/web/build/server/chunks/chunks/ModelMenu.js-BswEpZ7k.js +685 -0
  267. package/packages/web/build/server/chunks/chunks/MoveToFolderMenu.js-BdW9Uaat.js +288 -0
  268. package/packages/web/build/server/chunks/chunks/NewChatForm.js-CxYVWSbF.js +307 -0
  269. package/packages/web/build/server/chunks/chunks/NewFolderDialog.js-DV411psA.js +192 -0
  270. package/packages/web/build/server/chunks/chunks/Notifications.js-D7SKD3ep.js +763 -0
  271. package/packages/web/build/server/chunks/chunks/PageHeader.js-DB4EEFTc.js +59 -0
  272. package/packages/web/build/server/chunks/chunks/PlanUsageBars.js-D8Eleq6Q.js +112 -0
  273. package/packages/web/build/server/chunks/chunks/RenameFolderDialog.js-DSG_xVfk.js +258 -0
  274. package/packages/web/build/server/chunks/chunks/StepIcon.js-DpKQExeE.js +38 -0
  275. package/packages/web/build/server/chunks/chunks/TopBar.js-CkDZmzNy.js +34 -0
  276. package/packages/web/build/server/chunks/chunks/TypedText.js-DVJ5Mwz5.js +62 -0
  277. package/packages/web/build/server/chunks/chunks/UserAvatar.js-BsTLEA-P.js +24 -0
  278. package/packages/web/build/server/chunks/chunks/UserMenu.js-DqCTpnGv.js +1538 -0
  279. package/packages/web/build/server/chunks/chunks/access.js-Bc8_sZDj.js +40 -0
  280. package/packages/web/build/server/chunks/chunks/accounts.js-aR68_MW1.js +26 -0
  281. package/packages/web/build/server/chunks/chunks/alert-dialog.js-D3L83uTu.js +505 -0
  282. package/packages/web/build/server/chunks/chunks/auth.js-BHa-Asx6.js +20064 -0
  283. package/packages/web/build/server/chunks/chunks/badge.js-CjFqRIj1.js +38 -0
  284. package/packages/web/build/server/chunks/chunks/camera.js-D3gRnx0_.js +19 -0
  285. package/packages/web/build/server/chunks/chunks/check.js-CHv2s_6d.js +15 -0
  286. package/packages/web/build/server/chunks/chunks/chevron-left.js-BcvkQVtM.js +15 -0
  287. package/packages/web/build/server/chunks/chunks/chevron-right.js-DzLiifpv.js +15 -0
  288. package/packages/web/build/server/chunks/chunks/chevrons-up-down.js-BWbLBrI0.js +15 -0
  289. package/packages/web/build/server/chunks/chunks/client.js-CuuQ6sEm.js +120 -0
  290. package/packages/web/build/server/chunks/chunks/clock.js-C-HZL7Pg.js +19 -0
  291. package/packages/web/build/server/chunks/chunks/coerce.js--dAQMwMO.js +8477 -0
  292. package/packages/web/build/server/chunks/chunks/collapsible.js-Bsi7-LzP.js +410 -0
  293. package/packages/web/build/server/chunks/chunks/command.js-D1P6tWs_.js +2231 -0
  294. package/packages/web/build/server/chunks/chunks/dialog.js-CNQ9oO2i.js +544 -0
  295. package/packages/web/build/server/chunks/chunks/dist.js-BChjdQWw.js +600 -0
  296. package/packages/web/build/server/chunks/chunks/dist2.js-OGEwQhP2.js +347 -0
  297. package/packages/web/build/server/chunks/chunks/dist3.js-GCNglsxk.js +19547 -0
  298. package/packages/web/build/server/chunks/chunks/download.js-g5Zex0Ki.js +19 -0
  299. package/packages/web/build/server/chunks/chunks/dropdown-menu.js-ByTPapWV.js +2396 -0
  300. package/packages/web/build/server/chunks/chunks/eraser.js-BGsPXSVI.js +15 -0
  301. package/packages/web/build/server/chunks/chunks/factory.js-QXghIu-T.js +2344 -0
  302. package/packages/web/build/server/chunks/chunks/folder-input.js-BWEIyi5h.js +19 -0
  303. package/packages/web/build/server/chunks/chunks/forms.js-DXdLhuzV.js +4052 -0
  304. package/packages/web/build/server/chunks/chunks/hidden-input.js-D-pfBMGf.js +47 -0
  305. package/packages/web/build/server/chunks/chunks/i18n.js-BZZzsqBQ.js +7344 -0
  306. package/packages/web/build/server/chunks/chunks/internal2.js-B7E35Mx2.js +1135 -0
  307. package/packages/web/build/server/chunks/chunks/ios.js-l0sNRNKZ.js +2 -0
  308. package/packages/web/build/server/chunks/chunks/list-collapse.js-wr1x_75W.js +21 -0
  309. package/packages/web/build/server/chunks/chunks/message-circle.js-UIIxXLtJ.js +15 -0
  310. package/packages/web/build/server/chunks/chunks/moon-star.js-BOv5MTcx.js +34 -0
  311. package/packages/web/build/server/chunks/chunks/motion.js-Eb3VaPkg.js +224 -0
  312. package/packages/web/build/server/chunks/chunks/paths.js-1-UPDGPq.js +19 -0
  313. package/packages/web/build/server/chunks/chunks/pencil.js-6eXKzw_Q.js +15 -0
  314. package/packages/web/build/server/chunks/chunks/plan-usage.svelte.js-CuVZYFIH.js +27 -0
  315. package/packages/web/build/server/chunks/chunks/plus.js-hM6l9ZvI.js +15 -0
  316. package/packages/web/build/server/chunks/chunks/sdk.js-Jx-nl9-6.js +42918 -0
  317. package/packages/web/build/server/chunks/chunks/select.js-DgGiDgtK.js +1965 -0
  318. package/packages/web/build/server/chunks/chunks/sidebar.js-DUTrVu1q.js +1498 -0
  319. package/packages/web/build/server/chunks/chunks/square-pen.js-2IC3Ov9B.js +20 -0
  320. package/packages/web/build/server/chunks/chunks/src.js-Bu47UzGA.js +42241 -0
  321. package/packages/web/build/server/chunks/chunks/state.js-BDW-kCxK.js +67 -0
  322. package/packages/web/build/server/chunks/chunks/switch.js-CcCr8r73.js +283 -0
  323. package/packages/web/build/server/chunks/chunks/terminal.js-0nH1Urqj.js +15 -0
  324. package/packages/web/build/server/chunks/chunks/textarea.js-DrNDuzH0.js +25 -0
  325. package/packages/web/build/server/chunks/chunks/tooltip.js-BUHfS2s1.js +5863 -0
  326. package/packages/web/build/server/chunks/chunks/usage.js-CFIwucxh.js +35 -0
  327. package/packages/web/build/server/chunks/chunks/utils2.js-Bv3WV9KM.js +1167 -0
  328. package/packages/web/build/server/chunks/chunks/zod.js-C7kpxJbl.js +10352 -0
  329. package/packages/web/build/server/chunks/chunks/zod2.js-jXrj9_sA.js +5 -0
  330. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/commands/_server.ts.js-AiHWj9BP.js +56 -0
  331. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/compact/_server.ts.js-CdDWlnWx.js +54 -0
  332. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/continue/_server.ts.js-CIw_lPWw.js +47 -0
  333. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/effort/_server.ts.js-DJxJCFVo.js +48 -0
  334. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/events/_server.ts.js-GJSOUX2B.js +75 -0
  335. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/folder/_server.ts.js-acu3JmZw.js +56 -0
  336. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/media/_mediaId_/_server.ts.js-DmoV7hAM.js +53 -0
  337. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/messages/_server.ts.js-DPZ8sBEW.js +59 -0
  338. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/preset/_server.ts.js-D0h03np8.js +52 -0
  339. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/stop/_server.ts.js-qoemXIUD.js +45 -0
  340. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/tools/_server.ts.js-BZ7dOPSq.js +53 -0
  341. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/typing/_server.ts.js-RiPln9Z2.js +51 -0
  342. package/packages/web/build/server/chunks/entries/endpoints/api/card/changes/_id_/keep/_server.ts.js-R3a-E4ph.js +60 -0
  343. package/packages/web/build/server/chunks/entries/endpoints/api/chatgpt/sign-in/_server.ts.js-B_gczX7s.js +75 -0
  344. package/packages/web/build/server/chunks/entries/endpoints/api/events/_server.ts.js-BLUSf7eq.js +89 -0
  345. package/packages/web/build/server/chunks/entries/endpoints/api/hooks/_token_/_server.ts.js-Dn8ZB3CZ.js +51 -0
  346. package/packages/web/build/server/chunks/entries/endpoints/api/me/_server.ts.js-BigyjUb8.js +54 -0
  347. package/packages/web/build/server/chunks/entries/endpoints/api/me/picture/_server.ts.js-J8AVqX9B.js +62 -0
  348. package/packages/web/build/server/chunks/entries/endpoints/api/models/_server.ts.js-Cy70hos4.js +58 -0
  349. package/packages/web/build/server/chunks/entries/endpoints/api/nolune-plan/sign-in/_server.ts.js-BQBQLWMH.js +78 -0
  350. package/packages/web/build/server/chunks/entries/endpoints/api/nolune-plan/usage/_server.ts.js-CAHMJrv6.js +49 -0
  351. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/_id_/continue/_server.ts.js-CYufOf7V.js +52 -0
  352. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/_id_/dismiss/_server.ts.js-DDXgX8EQ.js +44 -0
  353. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/clear/_server.ts.js-C8D5SaBB.js +45 -0
  354. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/seen/_server.ts.js-CmFihzXG.js +45 -0
  355. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_folder_/files/_file_/_server.ts.js-DmB-SYRI.js +57 -0
  356. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_server.ts.js-DA2LPUyz.js +59 -0
  357. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/memory/_id_/undo/_server.ts.js-C1K08ki4.js +60 -0
  358. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/running/_server.ts.js-Chvh2Pw1.js +81 -0
  359. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/suggestions/_server.ts.js-B13MLE7D.js +55 -0
  360. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/templates/_id_/cover/_server.ts.js-CAPOP4Q3.js +61 -0
  361. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_id_/_server.ts.js-CKja4UsR.js +46 -0
  362. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_server.ts.js-D8-cbVFS.js +73 -0
  363. package/packages/web/build/server/chunks/entries/endpoints/api/pictures/_sha256_/_server.ts.js-C6OoKajT.js +56 -0
  364. package/packages/web/build/server/chunks/entries/endpoints/api/push/_server.ts.js-BruJg4gM.js +63 -0
  365. package/packages/web/build/server/chunks/entries/endpoints/logout/_server.ts.js-BHSczN0h.js +47 -0
  366. package/packages/web/build/server/chunks/entries/fallbacks/error.svelte.js-BJkanGNl.js +22 -0
  367. package/packages/web/build/server/chunks/entries/hooks.server.js-C4WGmbf7.js +3364 -0
  368. package/packages/web/build/server/chunks/entries/pages/_layout.server.ts.js-BN9m-MUo.js +41 -0
  369. package/packages/web/build/server/chunks/entries/pages/_layout.svelte.js-BhmPXj5G.js +77 -0
  370. package/packages/web/build/server/chunks/entries/pages/_page.server.ts.js-aD8-DxcB.js +27 -0
  371. package/packages/web/build/server/chunks/entries/pages/admin/_page.server.ts.js-DDWGphfE.js +414 -0
  372. package/packages/web/build/server/chunks/entries/pages/admin/_page.svelte.js-DrwxO8tQ.js +2716 -0
  373. package/packages/web/build/server/chunks/entries/pages/admin/people/_page.server.ts.js-XJCFN-l9.js +130 -0
  374. package/packages/web/build/server/chunks/entries/pages/admin/people/_page.svelte.js-er390AlN.js +574 -0
  375. package/packages/web/build/server/chunks/entries/pages/admin/services/_page.server.ts.js-DfIQKK2d.js +175 -0
  376. package/packages/web/build/server/chunks/entries/pages/admin/services/_page.svelte.js-perrcaXx.js +675 -0
  377. package/packages/web/build/server/chunks/entries/pages/card/_page.server.ts.js-UcD3iNh3.js +75 -0
  378. package/packages/web/build/server/chunks/entries/pages/card/_page.svelte.js-BNDNS7-g.js +372 -0
  379. package/packages/web/build/server/chunks/entries/pages/invite/_token_/_page.server.ts.js-B83TDko3.js +63 -0
  380. package/packages/web/build/server/chunks/entries/pages/invite/_token_/_page.svelte.js-CT2unkSi.js +125 -0
  381. package/packages/web/build/server/chunks/entries/pages/login/_page.server.ts.js--9KWSQLx.js +42 -0
  382. package/packages/web/build/server/chunks/entries/pages/login/_page.svelte.js-bf7wuA8L.js +76 -0
  383. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_layout.server.ts.js-Dl3w-Y7I.js +53 -0
  384. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_layout.svelte.js-CNCloQYf.js +1900 -0
  385. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_page.server.ts.js-B3x-CZMx.js +79 -0
  386. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_page.svelte.js-CnqzMupQ.js +153 -0
  387. package/packages/web/build/server/chunks/entries/pages/p/_slug_/automations/_page.server.ts.js-CV_m_HCg.js +269 -0
  388. package/packages/web/build/server/chunks/entries/pages/p/_slug_/automations/_page.svelte.js-DhY5s_40.js +414 -0
  389. package/packages/web/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.server.ts.js-wYKN6lb3.js +73 -0
  390. package/packages/web/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.svelte.js-xD1T9jMW.js +2755 -0
  391. package/packages/web/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.server.ts.js-Gh78T_bH.js +103 -0
  392. package/packages/web/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.svelte.js-W1ryj9DM.js +324 -0
  393. package/packages/web/build/server/chunks/entries/pages/p/_slug_/images/_page.server.ts.js-CI5UWZ0d.js +145 -0
  394. package/packages/web/build/server/chunks/entries/pages/p/_slug_/images/_page.svelte.js-CEfEI03g.js +513 -0
  395. package/packages/web/build/server/chunks/entries/pages/p/_slug_/memory/_page.server.ts.js-BEkqoeUR.js +113 -0
  396. package/packages/web/build/server/chunks/entries/pages/p/_slug_/memory/_page.svelte.js-DUr7iE9i.js +968 -0
  397. package/packages/web/build/server/chunks/entries/pages/p/_slug_/settings/_page.server.ts.js-Bjop3S9r.js +106 -0
  398. package/packages/web/build/server/chunks/entries/pages/p/_slug_/settings/_page.svelte.js-Ny6srewv.js +584 -0
  399. package/packages/web/build/server/chunks/entries/pages/p/_slug_/skills/_page.server.ts.js-DXe-ohav.js +45 -0
  400. package/packages/web/build/server/chunks/entries/pages/p/_slug_/skills/_page.svelte.js-Br1vobhN.js +132 -0
  401. package/packages/web/build/server/chunks/entries/pages/p/_slug_/welcome/_page.server.ts.js-0y-f4aJN.js +142 -0
  402. package/packages/web/build/server/chunks/entries/pages/p/_slug_/welcome/_page@.svelte.js-ChwZMckN.js +223 -0
  403. package/packages/web/build/server/chunks/entries/pages/profiles/_page.server.ts.js-Ts9M-2R0.js +47 -0
  404. package/packages/web/build/server/chunks/entries/pages/profiles/_page.svelte.js-_2ZYFPia.js +240 -0
  405. package/packages/web/build/server/chunks/handler-DkbKGuC0.js +1735 -0
  406. package/packages/web/build/server/chunks/index.js-BQ0Wgj5y.js +3700 -0
  407. package/packages/web/build/server/chunks/manifest.js-Ck76X-OV.js +430 -0
  408. package/packages/web/build/server/chunks/nodes/0.js-w3taO02L.js +45 -0
  409. package/packages/web/build/server/chunks/nodes/1.js-B4rS-Nr4.js +9 -0
  410. package/packages/web/build/server/chunks/nodes/10.js-BwZTPp0S.js +49 -0
  411. package/packages/web/build/server/chunks/nodes/11.js-qSjyiDmo.js +47 -0
  412. package/packages/web/build/server/chunks/nodes/12.js-jbCKu7ga.js +47 -0
  413. package/packages/web/build/server/chunks/nodes/13.js-CZEdZ_hD.js +47 -0
  414. package/packages/web/build/server/chunks/nodes/14.js-DcD_Vq2R.js +47 -0
  415. package/packages/web/build/server/chunks/nodes/15.js-B8IQPNRE.js +47 -0
  416. package/packages/web/build/server/chunks/nodes/16.js-VXfZziQK.js +47 -0
  417. package/packages/web/build/server/chunks/nodes/17.js-BL39UN7w.js +47 -0
  418. package/packages/web/build/server/chunks/nodes/18.js-VJymHX_u.js +47 -0
  419. package/packages/web/build/server/chunks/nodes/19.js-B1of8TNz.js +47 -0
  420. package/packages/web/build/server/chunks/nodes/2.js-DlV6j3uQ.js +49 -0
  421. package/packages/web/build/server/chunks/nodes/3.js-sB_r_B1G.js +48 -0
  422. package/packages/web/build/server/chunks/nodes/4.js-DQ2MGOGW.js +48 -0
  423. package/packages/web/build/server/chunks/nodes/5.js-CT57kDXb.js +49 -0
  424. package/packages/web/build/server/chunks/nodes/6.js-hoEEVixu.js +47 -0
  425. package/packages/web/build/server/chunks/nodes/7.js-B0_5AXwS.js +47 -0
  426. package/packages/web/build/server/chunks/nodes/8.js-CmCff-1l.js +52 -0
  427. package/packages/web/build/server/chunks/nodes/9.js-B1syTbHJ.js +51 -0
  428. package/dist/chunks/chunk-SAHRBQRY.js +0 -110
  429. package/dist/chunks/run-XM7YIEAW.js +0 -24454
  430. package/dist/chunks/zod-H7KMPIPH.js +0 -19934
  431. package/packages/web/build/client/_app/immutable/assets/0.DTnuPoms.css +0 -2
  432. package/packages/web/build/client/_app/immutable/assets/0.DTnuPoms.css.br +0 -0
  433. package/packages/web/build/client/_app/immutable/assets/0.DTnuPoms.css.gz +0 -0
  434. package/packages/web/build/client/_app/immutable/chunks/AwlnAPt_.js +0 -31
  435. package/packages/web/build/client/_app/immutable/chunks/AwlnAPt_.js.br +0 -0
  436. package/packages/web/build/client/_app/immutable/chunks/AwlnAPt_.js.gz +0 -0
  437. package/packages/web/build/client/_app/immutable/chunks/B0psERp-.js +0 -1
  438. package/packages/web/build/client/_app/immutable/chunks/B0psERp-.js.br +0 -0
  439. package/packages/web/build/client/_app/immutable/chunks/B0psERp-.js.gz +0 -0
  440. package/packages/web/build/client/_app/immutable/chunks/B4dOTQGI.js +0 -1
  441. package/packages/web/build/client/_app/immutable/chunks/B4dOTQGI.js.br +0 -2
  442. package/packages/web/build/client/_app/immutable/chunks/B4dOTQGI.js.gz +0 -0
  443. package/packages/web/build/client/_app/immutable/chunks/B6dKebLF.js +0 -1
  444. package/packages/web/build/client/_app/immutable/chunks/B6dKebLF.js.br +0 -0
  445. package/packages/web/build/client/_app/immutable/chunks/B6dKebLF.js.gz +0 -0
  446. package/packages/web/build/client/_app/immutable/chunks/B7tXsaud.js +0 -1
  447. package/packages/web/build/client/_app/immutable/chunks/B7tXsaud.js.br +0 -0
  448. package/packages/web/build/client/_app/immutable/chunks/B7tXsaud.js.gz +0 -0
  449. package/packages/web/build/client/_app/immutable/chunks/BCb2FcX-.js +0 -1
  450. package/packages/web/build/client/_app/immutable/chunks/BCb2FcX-.js.br +0 -0
  451. package/packages/web/build/client/_app/immutable/chunks/BCb2FcX-.js.gz +0 -0
  452. package/packages/web/build/client/_app/immutable/chunks/BEHPE67f.js +0 -1
  453. package/packages/web/build/client/_app/immutable/chunks/BEHPE67f.js.br +0 -2
  454. package/packages/web/build/client/_app/immutable/chunks/BEHPE67f.js.gz +0 -0
  455. package/packages/web/build/client/_app/immutable/chunks/BGRx4LH4.js +0 -1
  456. package/packages/web/build/client/_app/immutable/chunks/BGRx4LH4.js.br +0 -1
  457. package/packages/web/build/client/_app/immutable/chunks/BGRx4LH4.js.gz +0 -0
  458. package/packages/web/build/client/_app/immutable/chunks/BQcXnbnC.js +0 -1
  459. package/packages/web/build/client/_app/immutable/chunks/BQcXnbnC.js.br +0 -0
  460. package/packages/web/build/client/_app/immutable/chunks/BQcXnbnC.js.gz +0 -0
  461. package/packages/web/build/client/_app/immutable/chunks/BU1lfrAt.js +0 -1
  462. package/packages/web/build/client/_app/immutable/chunks/BU1lfrAt.js.br +0 -0
  463. package/packages/web/build/client/_app/immutable/chunks/BU1lfrAt.js.gz +0 -0
  464. package/packages/web/build/client/_app/immutable/chunks/BUCG0TDu.js +0 -1
  465. package/packages/web/build/client/_app/immutable/chunks/BUCG0TDu.js.br +0 -0
  466. package/packages/web/build/client/_app/immutable/chunks/BUCG0TDu.js.gz +0 -0
  467. package/packages/web/build/client/_app/immutable/chunks/BVy43h-D.js +0 -1
  468. package/packages/web/build/client/_app/immutable/chunks/BVy43h-D.js.br +0 -0
  469. package/packages/web/build/client/_app/immutable/chunks/BVy43h-D.js.gz +0 -0
  470. package/packages/web/build/client/_app/immutable/chunks/BhOcmMP6.js +0 -67
  471. package/packages/web/build/client/_app/immutable/chunks/BhOcmMP6.js.br +0 -0
  472. package/packages/web/build/client/_app/immutable/chunks/BhOcmMP6.js.gz +0 -0
  473. package/packages/web/build/client/_app/immutable/chunks/BnPnx1BS.js +0 -1
  474. package/packages/web/build/client/_app/immutable/chunks/BnPnx1BS.js.br +0 -0
  475. package/packages/web/build/client/_app/immutable/chunks/BnPnx1BS.js.gz +0 -0
  476. package/packages/web/build/client/_app/immutable/chunks/BtJh6BW0.js +0 -1
  477. package/packages/web/build/client/_app/immutable/chunks/BtJh6BW0.js.br +0 -0
  478. package/packages/web/build/client/_app/immutable/chunks/BtJh6BW0.js.gz +0 -0
  479. package/packages/web/build/client/_app/immutable/chunks/C238of6k.js +0 -1
  480. package/packages/web/build/client/_app/immutable/chunks/C238of6k.js.br +0 -0
  481. package/packages/web/build/client/_app/immutable/chunks/C238of6k.js.gz +0 -0
  482. package/packages/web/build/client/_app/immutable/chunks/C3AiOJdj.js +0 -5
  483. package/packages/web/build/client/_app/immutable/chunks/C3AiOJdj.js.br +0 -0
  484. package/packages/web/build/client/_app/immutable/chunks/C3AiOJdj.js.gz +0 -0
  485. package/packages/web/build/client/_app/immutable/chunks/C4Xqr7Fj.js +0 -1
  486. package/packages/web/build/client/_app/immutable/chunks/C4Xqr7Fj.js.br +0 -0
  487. package/packages/web/build/client/_app/immutable/chunks/C4Xqr7Fj.js.gz +0 -0
  488. package/packages/web/build/client/_app/immutable/chunks/C5iI_OsH.js +0 -1
  489. package/packages/web/build/client/_app/immutable/chunks/C5iI_OsH.js.br +0 -0
  490. package/packages/web/build/client/_app/immutable/chunks/C5iI_OsH.js.gz +0 -0
  491. package/packages/web/build/client/_app/immutable/chunks/CA_XVn89.js +0 -1
  492. package/packages/web/build/client/_app/immutable/chunks/CA_XVn89.js.br +0 -2
  493. package/packages/web/build/client/_app/immutable/chunks/CA_XVn89.js.gz +0 -0
  494. package/packages/web/build/client/_app/immutable/chunks/CAz7hU5S.js +0 -1
  495. package/packages/web/build/client/_app/immutable/chunks/CAz7hU5S.js.br +0 -0
  496. package/packages/web/build/client/_app/immutable/chunks/CAz7hU5S.js.gz +0 -0
  497. package/packages/web/build/client/_app/immutable/chunks/CCibcuvE.js +0 -1
  498. package/packages/web/build/client/_app/immutable/chunks/CCibcuvE.js.br +0 -0
  499. package/packages/web/build/client/_app/immutable/chunks/CCibcuvE.js.gz +0 -0
  500. package/packages/web/build/client/_app/immutable/chunks/CE2DpKar.js +0 -2
  501. package/packages/web/build/client/_app/immutable/chunks/CE2DpKar.js.br +0 -0
  502. package/packages/web/build/client/_app/immutable/chunks/CE2DpKar.js.gz +0 -0
  503. package/packages/web/build/client/_app/immutable/chunks/CGiFplSA.js +0 -1
  504. package/packages/web/build/client/_app/immutable/chunks/CGiFplSA.js.br +0 -0
  505. package/packages/web/build/client/_app/immutable/chunks/CGiFplSA.js.gz +0 -0
  506. package/packages/web/build/client/_app/immutable/chunks/CQSR9BkJ.js +0 -1
  507. package/packages/web/build/client/_app/immutable/chunks/CQSR9BkJ.js.br +0 -0
  508. package/packages/web/build/client/_app/immutable/chunks/CQSR9BkJ.js.gz +0 -0
  509. package/packages/web/build/client/_app/immutable/chunks/CXS58JOV.js +0 -1
  510. package/packages/web/build/client/_app/immutable/chunks/CXS58JOV.js.br +0 -0
  511. package/packages/web/build/client/_app/immutable/chunks/CXS58JOV.js.gz +0 -0
  512. package/packages/web/build/client/_app/immutable/chunks/C_rGKciz.js +0 -9
  513. package/packages/web/build/client/_app/immutable/chunks/C_rGKciz.js.br +0 -0
  514. package/packages/web/build/client/_app/immutable/chunks/C_rGKciz.js.gz +0 -0
  515. package/packages/web/build/client/_app/immutable/chunks/CaahyXtC.js +0 -1
  516. package/packages/web/build/client/_app/immutable/chunks/CaahyXtC.js.br +0 -0
  517. package/packages/web/build/client/_app/immutable/chunks/CaahyXtC.js.gz +0 -0
  518. package/packages/web/build/client/_app/immutable/chunks/CfHYzoiD.js +0 -1
  519. package/packages/web/build/client/_app/immutable/chunks/CfHYzoiD.js.br +0 -0
  520. package/packages/web/build/client/_app/immutable/chunks/CfHYzoiD.js.gz +0 -0
  521. package/packages/web/build/client/_app/immutable/chunks/ClEpdm9X.js +0 -1
  522. package/packages/web/build/client/_app/immutable/chunks/ClEpdm9X.js.br +0 -3
  523. package/packages/web/build/client/_app/immutable/chunks/ClEpdm9X.js.gz +0 -0
  524. package/packages/web/build/client/_app/immutable/chunks/ClSwhmjL.js +0 -1
  525. package/packages/web/build/client/_app/immutable/chunks/ClSwhmjL.js.br +0 -0
  526. package/packages/web/build/client/_app/immutable/chunks/ClSwhmjL.js.gz +0 -0
  527. package/packages/web/build/client/_app/immutable/chunks/ClppYdjP.js +0 -1
  528. package/packages/web/build/client/_app/immutable/chunks/ClppYdjP.js.br +0 -0
  529. package/packages/web/build/client/_app/immutable/chunks/ClppYdjP.js.gz +0 -0
  530. package/packages/web/build/client/_app/immutable/chunks/CmM-4RFG.js +0 -1
  531. package/packages/web/build/client/_app/immutable/chunks/CmM-4RFG.js.br +0 -0
  532. package/packages/web/build/client/_app/immutable/chunks/CmM-4RFG.js.gz +0 -0
  533. package/packages/web/build/client/_app/immutable/chunks/CpXfakoi.js +0 -1
  534. package/packages/web/build/client/_app/immutable/chunks/CpXfakoi.js.br +0 -0
  535. package/packages/web/build/client/_app/immutable/chunks/CpXfakoi.js.gz +0 -0
  536. package/packages/web/build/client/_app/immutable/chunks/CrCk-NyX.js +0 -1
  537. package/packages/web/build/client/_app/immutable/chunks/CrCk-NyX.js.br +0 -0
  538. package/packages/web/build/client/_app/immutable/chunks/CrCk-NyX.js.gz +0 -0
  539. package/packages/web/build/client/_app/immutable/chunks/CywApwhc.js +0 -1
  540. package/packages/web/build/client/_app/immutable/chunks/CywApwhc.js.br +0 -0
  541. package/packages/web/build/client/_app/immutable/chunks/CywApwhc.js.gz +0 -0
  542. package/packages/web/build/client/_app/immutable/chunks/D31s_g8n.js +0 -5
  543. package/packages/web/build/client/_app/immutable/chunks/D31s_g8n.js.br +0 -0
  544. package/packages/web/build/client/_app/immutable/chunks/D31s_g8n.js.gz +0 -0
  545. package/packages/web/build/client/_app/immutable/chunks/DDRoGIP9.js +0 -1
  546. package/packages/web/build/client/_app/immutable/chunks/DDRoGIP9.js.br +0 -0
  547. package/packages/web/build/client/_app/immutable/chunks/DDRoGIP9.js.gz +0 -0
  548. package/packages/web/build/client/_app/immutable/chunks/DGcS8KSS.js +0 -1
  549. package/packages/web/build/client/_app/immutable/chunks/DGcS8KSS.js.br +0 -0
  550. package/packages/web/build/client/_app/immutable/chunks/DGcS8KSS.js.gz +0 -0
  551. package/packages/web/build/client/_app/immutable/chunks/DK1UHLR-.js +0 -1
  552. package/packages/web/build/client/_app/immutable/chunks/DK1UHLR-.js.br +0 -0
  553. package/packages/web/build/client/_app/immutable/chunks/DK1UHLR-.js.gz +0 -0
  554. package/packages/web/build/client/_app/immutable/chunks/DZk-gkAU.js +0 -1
  555. package/packages/web/build/client/_app/immutable/chunks/DZk-gkAU.js.br +0 -0
  556. package/packages/web/build/client/_app/immutable/chunks/DZk-gkAU.js.gz +0 -0
  557. package/packages/web/build/client/_app/immutable/chunks/DeP17kbD.js +0 -318
  558. package/packages/web/build/client/_app/immutable/chunks/DeP17kbD.js.br +0 -0
  559. package/packages/web/build/client/_app/immutable/chunks/DeP17kbD.js.gz +0 -0
  560. package/packages/web/build/client/_app/immutable/chunks/DelhG4NG.js +0 -1
  561. package/packages/web/build/client/_app/immutable/chunks/DelhG4NG.js.br +0 -0
  562. package/packages/web/build/client/_app/immutable/chunks/DelhG4NG.js.gz +0 -0
  563. package/packages/web/build/client/_app/immutable/chunks/DmAdEzQs.js +0 -1
  564. package/packages/web/build/client/_app/immutable/chunks/DmAdEzQs.js.br +0 -0
  565. package/packages/web/build/client/_app/immutable/chunks/DmAdEzQs.js.gz +0 -0
  566. package/packages/web/build/client/_app/immutable/chunks/DuG8sfLq.js +0 -1
  567. package/packages/web/build/client/_app/immutable/chunks/DuG8sfLq.js.br +0 -0
  568. package/packages/web/build/client/_app/immutable/chunks/DuG8sfLq.js.gz +0 -0
  569. package/packages/web/build/client/_app/immutable/chunks/GTRzOEzD.js +0 -1
  570. package/packages/web/build/client/_app/immutable/chunks/GTRzOEzD.js.br +0 -0
  571. package/packages/web/build/client/_app/immutable/chunks/GTRzOEzD.js.gz +0 -0
  572. package/packages/web/build/client/_app/immutable/chunks/IjF4KE1B.js +0 -1
  573. package/packages/web/build/client/_app/immutable/chunks/IjF4KE1B.js.br +0 -0
  574. package/packages/web/build/client/_app/immutable/chunks/IjF4KE1B.js.gz +0 -0
  575. package/packages/web/build/client/_app/immutable/chunks/MApZQR0b.js +0 -1
  576. package/packages/web/build/client/_app/immutable/chunks/MApZQR0b.js.br +0 -0
  577. package/packages/web/build/client/_app/immutable/chunks/MApZQR0b.js.gz +0 -0
  578. package/packages/web/build/client/_app/immutable/chunks/N3oV-8Ie.js +0 -1
  579. package/packages/web/build/client/_app/immutable/chunks/N3oV-8Ie.js.br +0 -0
  580. package/packages/web/build/client/_app/immutable/chunks/N3oV-8Ie.js.gz +0 -0
  581. package/packages/web/build/client/_app/immutable/chunks/iiqQqDMt.js +0 -1
  582. package/packages/web/build/client/_app/immutable/chunks/iiqQqDMt.js.br +0 -0
  583. package/packages/web/build/client/_app/immutable/chunks/iiqQqDMt.js.gz +0 -0
  584. package/packages/web/build/client/_app/immutable/chunks/k3ZB4WVm.js +0 -1
  585. package/packages/web/build/client/_app/immutable/chunks/k3ZB4WVm.js.br +0 -0
  586. package/packages/web/build/client/_app/immutable/chunks/k3ZB4WVm.js.gz +0 -0
  587. package/packages/web/build/client/_app/immutable/chunks/pAzEohwE.js +0 -1
  588. package/packages/web/build/client/_app/immutable/chunks/pAzEohwE.js.br +0 -2
  589. package/packages/web/build/client/_app/immutable/chunks/pAzEohwE.js.gz +0 -0
  590. package/packages/web/build/client/_app/immutable/chunks/vmc6srO5.js +0 -1
  591. package/packages/web/build/client/_app/immutable/chunks/vmc6srO5.js.br +0 -2
  592. package/packages/web/build/client/_app/immutable/chunks/vmc6srO5.js.gz +0 -0
  593. package/packages/web/build/client/_app/immutable/chunks/ypBpP4nr.js +0 -1
  594. package/packages/web/build/client/_app/immutable/chunks/ypBpP4nr.js.br +0 -0
  595. package/packages/web/build/client/_app/immutable/chunks/ypBpP4nr.js.gz +0 -0
  596. package/packages/web/build/client/_app/immutable/entry/app.D9io9O7v.js +0 -2
  597. package/packages/web/build/client/_app/immutable/entry/app.D9io9O7v.js.br +0 -0
  598. package/packages/web/build/client/_app/immutable/entry/app.D9io9O7v.js.gz +0 -0
  599. package/packages/web/build/client/_app/immutable/entry/start.BgaOwPMP.js +0 -1
  600. package/packages/web/build/client/_app/immutable/entry/start.BgaOwPMP.js.br +0 -1
  601. package/packages/web/build/client/_app/immutable/entry/start.BgaOwPMP.js.gz +0 -0
  602. package/packages/web/build/client/_app/immutable/nodes/0.C9CR-5kd.js +0 -1
  603. package/packages/web/build/client/_app/immutable/nodes/0.C9CR-5kd.js.br +0 -0
  604. package/packages/web/build/client/_app/immutable/nodes/0.C9CR-5kd.js.gz +0 -0
  605. package/packages/web/build/client/_app/immutable/nodes/1.DikBrROv.js +0 -1
  606. package/packages/web/build/client/_app/immutable/nodes/1.DikBrROv.js.br +0 -0
  607. package/packages/web/build/client/_app/immutable/nodes/1.DikBrROv.js.gz +0 -0
  608. package/packages/web/build/client/_app/immutable/nodes/10.3t9WnHvs.js +0 -1
  609. package/packages/web/build/client/_app/immutable/nodes/10.3t9WnHvs.js.br +0 -0
  610. package/packages/web/build/client/_app/immutable/nodes/10.3t9WnHvs.js.gz +0 -0
  611. package/packages/web/build/client/_app/immutable/nodes/11.Op2wvZXP.js +0 -4
  612. package/packages/web/build/client/_app/immutable/nodes/11.Op2wvZXP.js.br +0 -0
  613. package/packages/web/build/client/_app/immutable/nodes/11.Op2wvZXP.js.gz +0 -0
  614. package/packages/web/build/client/_app/immutable/nodes/12.CjrjNFKj.js +0 -1
  615. package/packages/web/build/client/_app/immutable/nodes/12.CjrjNFKj.js.br +0 -0
  616. package/packages/web/build/client/_app/immutable/nodes/12.CjrjNFKj.js.gz +0 -0
  617. package/packages/web/build/client/_app/immutable/nodes/13.CiddqUIq.js +0 -1
  618. package/packages/web/build/client/_app/immutable/nodes/13.CiddqUIq.js.br +0 -0
  619. package/packages/web/build/client/_app/immutable/nodes/13.CiddqUIq.js.gz +0 -0
  620. package/packages/web/build/client/_app/immutable/nodes/14.D189pX_R.js +0 -2
  621. package/packages/web/build/client/_app/immutable/nodes/14.D189pX_R.js.br +0 -0
  622. package/packages/web/build/client/_app/immutable/nodes/14.D189pX_R.js.gz +0 -0
  623. package/packages/web/build/client/_app/immutable/nodes/15.L9U9QVzo.js +0 -1
  624. package/packages/web/build/client/_app/immutable/nodes/15.L9U9QVzo.js.br +0 -0
  625. package/packages/web/build/client/_app/immutable/nodes/15.L9U9QVzo.js.gz +0 -0
  626. package/packages/web/build/client/_app/immutable/nodes/16.DSMrlY8n.js +0 -1
  627. package/packages/web/build/client/_app/immutable/nodes/16.DSMrlY8n.js.br +0 -0
  628. package/packages/web/build/client/_app/immutable/nodes/16.DSMrlY8n.js.gz +0 -0
  629. package/packages/web/build/client/_app/immutable/nodes/17.Bbk_u6OJ.js +0 -46
  630. package/packages/web/build/client/_app/immutable/nodes/17.Bbk_u6OJ.js.br +0 -0
  631. package/packages/web/build/client/_app/immutable/nodes/17.Bbk_u6OJ.js.gz +0 -0
  632. package/packages/web/build/client/_app/immutable/nodes/18.DV_cA_3-.js +0 -1
  633. package/packages/web/build/client/_app/immutable/nodes/18.DV_cA_3-.js.br +0 -0
  634. package/packages/web/build/client/_app/immutable/nodes/18.DV_cA_3-.js.gz +0 -0
  635. package/packages/web/build/client/_app/immutable/nodes/2.DJvpS8CT.js +0 -1
  636. package/packages/web/build/client/_app/immutable/nodes/2.DJvpS8CT.js.br +0 -0
  637. package/packages/web/build/client/_app/immutable/nodes/2.DJvpS8CT.js.gz +0 -0
  638. package/packages/web/build/client/_app/immutable/nodes/4.v0gFXgkE.js +0 -2
  639. package/packages/web/build/client/_app/immutable/nodes/4.v0gFXgkE.js.br +0 -0
  640. package/packages/web/build/client/_app/immutable/nodes/4.v0gFXgkE.js.gz +0 -0
  641. package/packages/web/build/client/_app/immutable/nodes/5.CvNd-aT1.js +0 -1
  642. package/packages/web/build/client/_app/immutable/nodes/5.CvNd-aT1.js.br +0 -0
  643. package/packages/web/build/client/_app/immutable/nodes/5.CvNd-aT1.js.gz +0 -0
  644. package/packages/web/build/client/_app/immutable/nodes/6.Cwb-H-e-.js +0 -2
  645. package/packages/web/build/client/_app/immutable/nodes/6.Cwb-H-e-.js.br +0 -0
  646. package/packages/web/build/client/_app/immutable/nodes/6.Cwb-H-e-.js.gz +0 -0
  647. package/packages/web/build/client/_app/immutable/nodes/7.BesKsRyM.js +0 -1
  648. package/packages/web/build/client/_app/immutable/nodes/7.BesKsRyM.js.br +0 -0
  649. package/packages/web/build/client/_app/immutable/nodes/7.BesKsRyM.js.gz +0 -0
  650. package/packages/web/build/client/_app/immutable/nodes/8.IWTTmi0T.js +0 -1
  651. package/packages/web/build/client/_app/immutable/nodes/8.IWTTmi0T.js.br +0 -0
  652. package/packages/web/build/client/_app/immutable/nodes/8.IWTTmi0T.js.gz +0 -0
  653. package/packages/web/build/client/_app/immutable/nodes/9.BksbXEiN.js +0 -1
  654. package/packages/web/build/client/_app/immutable/nodes/9.BksbXEiN.js.br +0 -0
  655. package/packages/web/build/client/_app/immutable/nodes/9.BksbXEiN.js.gz +0 -0
  656. package/packages/web/build/server/chunks/chunks/AssistantAvatar.js-BOElnrYl.js +0 -294
  657. package/packages/web/build/server/chunks/chunks/AvatarPicker.js-CLhSkMaB.js +0 -136
  658. package/packages/web/build/server/chunks/chunks/Composer.js-BbcT-FLv.js +0 -333
  659. package/packages/web/build/server/chunks/chunks/ComposerDock.js-B26-qji-.js +0 -58
  660. package/packages/web/build/server/chunks/chunks/CopyButton.js-Bg6aJO9i.js +0 -81
  661. package/packages/web/build/server/chunks/chunks/DotGrid.js-DEty8Ftx.js +0 -108
  662. package/packages/web/build/server/chunks/chunks/MemoryChangeItem.js-XSzCkKCr.js +0 -2588
  663. package/packages/web/build/server/chunks/chunks/ModelMenu.js-DyvxWk4C.js +0 -650
  664. package/packages/web/build/server/chunks/chunks/MoveToFolderMenu.js-BkRCW9eh.js +0 -288
  665. package/packages/web/build/server/chunks/chunks/NewChatForm.js-40tqChFh.js +0 -307
  666. package/packages/web/build/server/chunks/chunks/NewFolderDialog.js-C6CjVSY0.js +0 -192
  667. package/packages/web/build/server/chunks/chunks/Notifications.js-CQqL8zeJ.js +0 -762
  668. package/packages/web/build/server/chunks/chunks/PageHeader.js-BgCv8CGm.js +0 -59
  669. package/packages/web/build/server/chunks/chunks/RenameFolderDialog.js-BgF-2T2D.js +0 -258
  670. package/packages/web/build/server/chunks/chunks/StepIcon.js-ClUo5irL.js +0 -38
  671. package/packages/web/build/server/chunks/chunks/TopBar.js-nYKfnv4T.js +0 -34
  672. package/packages/web/build/server/chunks/chunks/TypedText.js-DM0Ozjdc.js +0 -62
  673. package/packages/web/build/server/chunks/chunks/UserAvatar.js-DKnmWp86.js +0 -24
  674. package/packages/web/build/server/chunks/chunks/UserMenu.js-CLVbCOpM.js +0 -1499
  675. package/packages/web/build/server/chunks/chunks/access.js-CMaS81rW.js +0 -40
  676. package/packages/web/build/server/chunks/chunks/accounts.js--GU4-Jf5.js +0 -26
  677. package/packages/web/build/server/chunks/chunks/alert-dialog.js-CZD6TyzD.js +0 -505
  678. package/packages/web/build/server/chunks/chunks/auth.js-CjtH41kh.js +0 -20064
  679. package/packages/web/build/server/chunks/chunks/badge.js-DhrZz9tJ.js +0 -38
  680. package/packages/web/build/server/chunks/chunks/camera.js-DMildJpv.js +0 -19
  681. package/packages/web/build/server/chunks/chunks/check.js-CgqvmEKJ.js +0 -15
  682. package/packages/web/build/server/chunks/chunks/chevron-left.js-DrLivp1c.js +0 -15
  683. package/packages/web/build/server/chunks/chunks/chevron-right.js-BVi8OuAb.js +0 -15
  684. package/packages/web/build/server/chunks/chunks/chevrons-up-down.js-BKkCIwCT.js +0 -15
  685. package/packages/web/build/server/chunks/chunks/client.js-Dg5neIp5.js +0 -120
  686. package/packages/web/build/server/chunks/chunks/clock.js-BK9UDxCS.js +0 -19
  687. package/packages/web/build/server/chunks/chunks/collapsible.js-QcUf1Ekr.js +0 -410
  688. package/packages/web/build/server/chunks/chunks/command.js-qzkTIb4n.js +0 -2231
  689. package/packages/web/build/server/chunks/chunks/dialog.js-DATXmio9.js +0 -544
  690. package/packages/web/build/server/chunks/chunks/dist.js-CHzkIw-w.js +0 -600
  691. package/packages/web/build/server/chunks/chunks/dist2.js-BypRVH9n.js +0 -347
  692. package/packages/web/build/server/chunks/chunks/dist3.js-uSfOYmy-.js +0 -19547
  693. package/packages/web/build/server/chunks/chunks/download.js-CrFy9e4X.js +0 -19
  694. package/packages/web/build/server/chunks/chunks/dropdown-menu.js-BMbh502s.js +0 -2396
  695. package/packages/web/build/server/chunks/chunks/eraser.js-BU4dlvFH.js +0 -15
  696. package/packages/web/build/server/chunks/chunks/factory.js-CQLK42R-.js +0 -2344
  697. package/packages/web/build/server/chunks/chunks/folder-input.js-DkjPvOkW.js +0 -19
  698. package/packages/web/build/server/chunks/chunks/forms.js-JM_GpxQF.js +0 -4052
  699. package/packages/web/build/server/chunks/chunks/hidden-input.js-CIt9W_5y.js +0 -47
  700. package/packages/web/build/server/chunks/chunks/i18n.js-Cakuk6U0.js +0 -6543
  701. package/packages/web/build/server/chunks/chunks/internal2.js-CM6RC5j4.js +0 -1135
  702. package/packages/web/build/server/chunks/chunks/key-round.js-BFVR2_CE.js +0 -20
  703. package/packages/web/build/server/chunks/chunks/message-circle.js-D49Sk0Wt.js +0 -15
  704. package/packages/web/build/server/chunks/chunks/motion.js-BGVcte_O.js +0 -224
  705. package/packages/web/build/server/chunks/chunks/paths.js-vTKfgV_W.js +0 -19
  706. package/packages/web/build/server/chunks/chunks/pencil.js-DrsRjIqk.js +0 -15
  707. package/packages/web/build/server/chunks/chunks/plus.js-E-pmHa3v.js +0 -15
  708. package/packages/web/build/server/chunks/chunks/sdk.js-B2ztN1Lk.js +0 -42918
  709. package/packages/web/build/server/chunks/chunks/select.js-CADiX1B7.js +0 -1965
  710. package/packages/web/build/server/chunks/chunks/shield-check.js-CifO8sPn.js +0 -29
  711. package/packages/web/build/server/chunks/chunks/sidebar.js-CjZAbET4.js +0 -1498
  712. package/packages/web/build/server/chunks/chunks/square-pen.js-CMKwoVdr.js +0 -20
  713. package/packages/web/build/server/chunks/chunks/src.js-DlynI0hv.js +0 -27000
  714. package/packages/web/build/server/chunks/chunks/state.js-DjG_xJ6v.js +0 -67
  715. package/packages/web/build/server/chunks/chunks/switch.js-BykxjriZ.js +0 -283
  716. package/packages/web/build/server/chunks/chunks/terminal.js-D6dBIpDn.js +0 -15
  717. package/packages/web/build/server/chunks/chunks/textarea.js-B5-NW0l1.js +0 -25
  718. package/packages/web/build/server/chunks/chunks/tooltip.js-CefNT6DH.js +0 -5863
  719. package/packages/web/build/server/chunks/chunks/usage.js-DNQuJpUU.js +0 -27
  720. package/packages/web/build/server/chunks/chunks/utils2.js-D1jvsxxx.js +0 -1167
  721. package/packages/web/build/server/chunks/chunks/zod.js-CWybfdic.js +0 -18824
  722. package/packages/web/build/server/chunks/chunks/zod2.js-D_b3bp3T.js +0 -4
  723. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/commands/_server.ts.js-DkJz0GER.js +0 -53
  724. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/continue/_server.ts.js-DwqrktqL.js +0 -44
  725. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/effort/_server.ts.js-BmjT-Ztn.js +0 -45
  726. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/events/_server.ts.js-B5EB81bi.js +0 -72
  727. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/folder/_server.ts.js-Dw0QpRlp.js +0 -53
  728. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/media/_mediaId_/_server.ts.js-Bx0OedB1.js +0 -51
  729. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/messages/_server.ts.js-DDYKj9gS.js +0 -56
  730. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/preset/_server.ts.js-DEJaoQV0.js +0 -49
  731. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/stop/_server.ts.js-Dw7fPXTJ.js +0 -42
  732. package/packages/web/build/server/chunks/entries/endpoints/api/c/_id_/typing/_server.ts.js-KhlfQb5X.js +0 -48
  733. package/packages/web/build/server/chunks/entries/endpoints/api/card/changes/_id_/keep/_server.ts.js-CpO5Tw0v.js +0 -57
  734. package/packages/web/build/server/chunks/entries/endpoints/api/chatgpt/sign-in/_server.ts.js-CGa-3Tfb.js +0 -72
  735. package/packages/web/build/server/chunks/entries/endpoints/api/events/_server.ts.js-BBNo5Duy.js +0 -83
  736. package/packages/web/build/server/chunks/entries/endpoints/api/hooks/_token_/_server.ts.js-DB0HkrPc.js +0 -48
  737. package/packages/web/build/server/chunks/entries/endpoints/api/me/_server.ts.js-b6-lm_Ed.js +0 -51
  738. package/packages/web/build/server/chunks/entries/endpoints/api/me/picture/_server.ts.js-CXaSRFEH.js +0 -59
  739. package/packages/web/build/server/chunks/entries/endpoints/api/models/_server.ts.js-lvH7AJAs.js +0 -55
  740. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/_id_/continue/_server.ts.js-DApMRDk0.js +0 -49
  741. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/_id_/dismiss/_server.ts.js-CrvUxZUu.js +0 -41
  742. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/clear/_server.ts.js-UXu_qsCl.js +0 -42
  743. package/packages/web/build/server/chunks/entries/endpoints/api/notifications/seen/_server.ts.js-DtA3xn3g.js +0 -42
  744. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_folder_/files/_file_/_server.ts.js-DysFASqZ.js +0 -55
  745. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/folders/_server.ts.js-BDEdyBpH.js +0 -56
  746. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/memory/_id_/undo/_server.ts.js-BZEyhdCW.js +0 -57
  747. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/running/_server.ts.js-NEH54dIz.js +0 -78
  748. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/suggestions/_server.ts.js-BhqMxAjp.js +0 -52
  749. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/templates/_id_/cover/_server.ts.js-rw9q81We.js +0 -58
  750. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_id_/_server.ts.js-B9fQriGr.js +0 -43
  751. package/packages/web/build/server/chunks/entries/endpoints/api/p/_slug_/uploads/_server.ts.js-D4v_ixwU.js +0 -71
  752. package/packages/web/build/server/chunks/entries/endpoints/api/pictures/_sha256_/_server.ts.js-YGGiBW89.js +0 -54
  753. package/packages/web/build/server/chunks/entries/endpoints/logout/_server.ts.js-D85x_95g.js +0 -45
  754. package/packages/web/build/server/chunks/entries/fallbacks/error.svelte.js-Cb-94Mjg.js +0 -22
  755. package/packages/web/build/server/chunks/entries/hooks.server.js-b1SYQXEi.js +0 -2983
  756. package/packages/web/build/server/chunks/entries/pages/_layout.server.ts.js-vgQ7FD_z.js +0 -41
  757. package/packages/web/build/server/chunks/entries/pages/_layout.svelte.js-BhzEqF95.js +0 -77
  758. package/packages/web/build/server/chunks/entries/pages/_page.server.ts.js-BybKXqua.js +0 -27
  759. package/packages/web/build/server/chunks/entries/pages/admin/_page.server.ts.js-Co8N9XsI.js +0 -345
  760. package/packages/web/build/server/chunks/entries/pages/admin/_page.svelte.js-C9m37bww.js +0 -2307
  761. package/packages/web/build/server/chunks/entries/pages/admin/people/_page.server.ts.js-DsxljIFN.js +0 -130
  762. package/packages/web/build/server/chunks/entries/pages/admin/people/_page.svelte.js-CL25VFst.js +0 -574
  763. package/packages/web/build/server/chunks/entries/pages/card/_page.server.ts.js-fZyd9NoG.js +0 -75
  764. package/packages/web/build/server/chunks/entries/pages/card/_page.svelte.js-BtRHLxTx.js +0 -372
  765. package/packages/web/build/server/chunks/entries/pages/invite/_token_/_page.server.ts.js-B8OQFrQp.js +0 -63
  766. package/packages/web/build/server/chunks/entries/pages/invite/_token_/_page.svelte.js-hd2quW3N.js +0 -125
  767. package/packages/web/build/server/chunks/entries/pages/login/_page.server.ts.js-DOcT1tgp.js +0 -42
  768. package/packages/web/build/server/chunks/entries/pages/login/_page.svelte.js-C5Auxspy.js +0 -74
  769. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_layout.server.ts.js-BvbpH7aa.js +0 -53
  770. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_layout.svelte.js-B10sZUKN.js +0 -1900
  771. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_page.server.ts.js-C3Y9wk8O.js +0 -78
  772. package/packages/web/build/server/chunks/entries/pages/p/_slug_/_page.svelte.js-CoRMdrPQ.js +0 -152
  773. package/packages/web/build/server/chunks/entries/pages/p/_slug_/automations/_page.server.ts.js-BbMLCUDA.js +0 -269
  774. package/packages/web/build/server/chunks/entries/pages/p/_slug_/automations/_page.svelte.js-DPU6YXHJ.js +0 -414
  775. package/packages/web/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.server.ts.js-DRgVXOxV.js +0 -73
  776. package/packages/web/build/server/chunks/entries/pages/p/_slug_/c/_id_/_page.svelte.js-Ck3wDf_F.js +0 -2392
  777. package/packages/web/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.server.ts.js-DJVR3n50.js +0 -102
  778. package/packages/web/build/server/chunks/entries/pages/p/_slug_/f/_folder_/_page.svelte.js-CLG-0wVy.js +0 -323
  779. package/packages/web/build/server/chunks/entries/pages/p/_slug_/images/_page.server.ts.js-BbBFc7eX.js +0 -145
  780. package/packages/web/build/server/chunks/entries/pages/p/_slug_/images/_page.svelte.js-Ta37_M_i.js +0 -513
  781. package/packages/web/build/server/chunks/entries/pages/p/_slug_/memory/_page.server.ts.js-CkQszCsV.js +0 -113
  782. package/packages/web/build/server/chunks/entries/pages/p/_slug_/memory/_page.svelte.js-DxgpLCGC.js +0 -968
  783. package/packages/web/build/server/chunks/entries/pages/p/_slug_/settings/_page.server.ts.js-ryYts05B.js +0 -106
  784. package/packages/web/build/server/chunks/entries/pages/p/_slug_/settings/_page.svelte.js-BvTcTRJQ.js +0 -584
  785. package/packages/web/build/server/chunks/entries/pages/p/_slug_/skills/_page.server.ts.js-BzVe8LHd.js +0 -45
  786. package/packages/web/build/server/chunks/entries/pages/p/_slug_/skills/_page.svelte.js-CJHcqQH5.js +0 -132
  787. package/packages/web/build/server/chunks/entries/pages/p/_slug_/welcome/_page.server.ts.js-onzZAX1Z.js +0 -134
  788. package/packages/web/build/server/chunks/entries/pages/p/_slug_/welcome/_page@.svelte.js-BnGdU_h4.js +0 -223
  789. package/packages/web/build/server/chunks/entries/pages/profiles/_page.server.ts.js-hGcjHBhU.js +0 -47
  790. package/packages/web/build/server/chunks/entries/pages/profiles/_page.svelte.js-BzuBRwOF.js +0 -240
  791. package/packages/web/build/server/chunks/handler-D2eW2iLl.js +0 -1735
  792. package/packages/web/build/server/chunks/index.js-DqF1GLH4.js +0 -3700
  793. package/packages/web/build/server/chunks/manifest.js-B7llprKy.js +0 -387
  794. package/packages/web/build/server/chunks/nodes/0.js-CIzCXL5D.js +0 -42
  795. package/packages/web/build/server/chunks/nodes/1.js-DRjbmxYH.js +0 -9
  796. package/packages/web/build/server/chunks/nodes/10.js-CDm72w6Y.js +0 -44
  797. package/packages/web/build/server/chunks/nodes/11.js-OnJr6Cw4.js +0 -44
  798. package/packages/web/build/server/chunks/nodes/12.js-CSZo_AVI.js +0 -44
  799. package/packages/web/build/server/chunks/nodes/13.js-B4R788aB.js +0 -44
  800. package/packages/web/build/server/chunks/nodes/14.js-l-KO8B-h.js +0 -44
  801. package/packages/web/build/server/chunks/nodes/15.js-CAtECzGW.js +0 -44
  802. package/packages/web/build/server/chunks/nodes/16.js-CmTEXhAq.js +0 -44
  803. package/packages/web/build/server/chunks/nodes/17.js-Gg-NPBzB.js +0 -44
  804. package/packages/web/build/server/chunks/nodes/18.js-BLTnO9SS.js +0 -44
  805. package/packages/web/build/server/chunks/nodes/2.js-CDq1qE_r.js +0 -46
  806. package/packages/web/build/server/chunks/nodes/3.js-BVsDtBU2.js +0 -45
  807. package/packages/web/build/server/chunks/nodes/4.js-Cpe8-dWC.js +0 -45
  808. package/packages/web/build/server/chunks/nodes/5.js-DFdbH2Du.js +0 -46
  809. package/packages/web/build/server/chunks/nodes/6.js-yJdLU7lq.js +0 -44
  810. package/packages/web/build/server/chunks/nodes/7.js-BoganRn1.js +0 -50
  811. package/packages/web/build/server/chunks/nodes/8.js-Diubq0AZ.js +0 -49
  812. package/packages/web/build/server/chunks/nodes/9.js-DXoagKbS.js +0 -46
  813. /package/packages/web/build/client/_app/immutable/assets/{11.DZmZHLub.css → 12.DZmZHLub.css} +0 -0
  814. /package/packages/web/build/client/_app/immutable/assets/{11.DZmZHLub.css.br → 12.DZmZHLub.css.br} +0 -0
  815. /package/packages/web/build/client/_app/immutable/assets/{11.DZmZHLub.css.gz → 12.DZmZHLub.css.gz} +0 -0
  816. /package/packages/web/build/client/_app/immutable/assets/{13.DiHYpJ-g.css → 14.DiHYpJ-g.css} +0 -0
  817. /package/packages/web/build/client/_app/immutable/assets/{13.DiHYpJ-g.css.br → 14.DiHYpJ-g.css.br} +0 -0
  818. /package/packages/web/build/client/_app/immutable/assets/{13.DiHYpJ-g.css.gz → 14.DiHYpJ-g.css.gz} +0 -0
  819. /package/packages/web/build/client/_app/immutable/assets/{17.D8mCg27h.css → 18.D8mCg27h.css} +0 -0
  820. /package/packages/web/build/client/_app/immutable/assets/{17.D8mCg27h.css.br → 18.D8mCg27h.css.br} +0 -0
  821. /package/packages/web/build/client/_app/immutable/assets/{17.D8mCg27h.css.gz → 18.D8mCg27h.css.gz} +0 -0
@@ -1,2588 +0,0 @@
1
- import { al as attr, ap as escape_html, at as attr_class, am as clsx, _ as derived, ao as html$2 } from './server.js-BAHAkSRU.js';
2
- import { F } from './media-refs.js-q0nPxUYL.js';
3
- import { g as getI18n } from './i18n.js-Cakuk6U0.js';
4
- import './client.js-Dg5neIp5.js';
5
- import { c as cn } from './utils2.js-D1jvsxxx.js';
6
- import { p as page } from './state.js-DjG_xJ6v.js';
7
- import { B as Button } from './forms.js-JM_GpxQF.js';
8
- import { P as Plus } from './plus.js-E-pmHa3v.js';
9
- import { P as Pencil } from './pencil.js-DrsRjIqk.js';
10
- import { e as errorMessage } from './http.js-B-SIUg23.js';
11
- import { m as memoryTitle } from './memory.js-B4MEEi_Z.js';
12
- import { I as ImageOff, C as Copy, F as File, D as Download, a as Image, b as FileX } from './icons.js-DqrSaQen.js';
13
-
14
- /*! @license DOMPurify 3.4.16 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.16/LICENSE */
15
- function _arrayLikeToArray(r, a) {
16
- (null == a || a > r.length) && (a = r.length);
17
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
18
- return n;
19
- }
20
- function _arrayWithHoles(r) {
21
- if (Array.isArray(r)) return r;
22
- }
23
- function _iterableToArrayLimit(r, l) {
24
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
25
- if (null != t) {
26
- var e, n, i, u, a = [], f = true, o = false;
27
- try {
28
- if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
29
- } catch (r) {
30
- o = true, n = r;
31
- } finally {
32
- try {
33
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
34
- } finally {
35
- if (o) throw n;
36
- }
37
- }
38
- return a;
39
- }
40
- }
41
- function _nonIterableRest() {
42
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
43
- }
44
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
45
- function _slicedToArray(r, e) {
46
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
47
- }
48
- function _unsupportedIterableToArray(r, a) {
49
- if (r) {
50
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
51
- var t = {}.toString.call(r).slice(8, -1);
52
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
53
- }
54
- }
55
- const entries = Object.entries;
56
- const setPrototypeOf = Object.setPrototypeOf;
57
- const isFrozen = Object.isFrozen;
58
- const getPrototypeOf = Object.getPrototypeOf;
59
- const getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
60
- let freeze = Object.freeze;
61
- let seal = Object.seal;
62
- let create = Object.create;
63
- let _ref = typeof Reflect !== "undefined" && Reflect;
64
- let apply = _ref.apply;
65
- let construct = _ref.construct;
66
- if (!freeze) freeze = function freeze(x) {
67
- return x;
68
- };
69
- if (!seal) seal = function seal(x) {
70
- return x;
71
- };
72
- if (!apply) apply = function apply(func, thisArg) {
73
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
74
- return func.apply(thisArg, args);
75
- };
76
- if (!construct) construct = function construct(Func) {
77
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) args[_key2 - 1] = arguments[_key2];
78
- return new Func(...args);
79
- };
80
- const arrayForEach = unapply(Array.prototype.forEach);
81
- const arrayLastIndexOf = unapply(Array.prototype.lastIndexOf);
82
- const arrayPop = unapply(Array.prototype.pop);
83
- const arrayPush = unapply(Array.prototype.push);
84
- const arraySplice = unapply(Array.prototype.splice);
85
- const arrayIsArray = Array.isArray;
86
- const stringToLowerCase = unapply(String.prototype.toLowerCase);
87
- const stringToString = unapply(String.prototype.toString);
88
- const stringMatch = unapply(String.prototype.match);
89
- const stringReplace = unapply(String.prototype.replace);
90
- const stringIndexOf = unapply(String.prototype.indexOf);
91
- const stringTrim = unapply(String.prototype.trim);
92
- const numberToString = unapply(Number.prototype.toString);
93
- const booleanToString = unapply(Boolean.prototype.toString);
94
- const bigintToString = typeof BigInt === "undefined" ? null : unapply(BigInt.prototype.toString);
95
- const symbolToString = typeof Symbol === "undefined" ? null : unapply(Symbol.prototype.toString);
96
- const objectHasOwnProperty = unapply(Object.prototype.hasOwnProperty);
97
- const objectToString = unapply(Object.prototype.toString);
98
- const regExpTest = unapply(RegExp.prototype.test);
99
- const typeErrorCreate = unconstruct(TypeError);
100
- /**
101
- * Creates a new function that calls the given function with a specified thisArg and arguments.
102
- *
103
- * @param func - The function to be wrapped and called.
104
- * @returns A new function that calls the given function with a specified thisArg and arguments.
105
- */
106
- function unapply(func) {
107
- return function(thisArg) {
108
- if (thisArg instanceof RegExp) thisArg.lastIndex = 0;
109
- for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
110
- return apply(func, thisArg, args);
111
- };
112
- }
113
- /**
114
- * Creates a new function that constructs an instance of the given constructor function with the provided arguments.
115
- *
116
- * @param func - The constructor function to be wrapped and called.
117
- * @returns A new function that constructs an instance of the given constructor function with the provided arguments.
118
- */
119
- function unconstruct(Func) {
120
- return function() {
121
- for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) args[_key4] = arguments[_key4];
122
- return construct(Func, args);
123
- };
124
- }
125
- /**
126
- * Add properties to a lookup table
127
- *
128
- * @param set - The set to which elements will be added.
129
- * @param array - The array containing elements to be added to the set.
130
- * @param transformCaseFunc - An optional function to transform the case of each element before adding to the set.
131
- * @returns The modified set with added elements.
132
- */
133
- function addToSet(set, array) {
134
- let transformCaseFunc = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : stringToLowerCase;
135
- if (setPrototypeOf) setPrototypeOf(set, null);
136
- if (!arrayIsArray(array)) return set;
137
- let l = array.length;
138
- while (l--) {
139
- let element = array[l];
140
- if (typeof element === "string") {
141
- const lcElement = transformCaseFunc(element);
142
- if (lcElement !== element) {
143
- if (!isFrozen(array)) array[l] = lcElement;
144
- element = lcElement;
145
- }
146
- }
147
- set[element] = true;
148
- }
149
- return set;
150
- }
151
- /**
152
- * Clean up an array to harden against CSPP
153
- *
154
- * @param array - The array to be cleaned.
155
- * @returns The cleaned version of the array
156
- */
157
- function cleanArray(array) {
158
- for (let index = 0; index < array.length; index++) if (!objectHasOwnProperty(array, index)) array[index] = null;
159
- return array;
160
- }
161
- /**
162
- * Shallow clone an object
163
- *
164
- * @param object - The object to be cloned.
165
- * @returns A new object that copies the original.
166
- */
167
- function clone(object) {
168
- const newObject = create(null);
169
- for (const _ref2 of entries(object)) {
170
- var _ref3 = _slicedToArray(_ref2, 2);
171
- const property = _ref3[0];
172
- const value = _ref3[1];
173
- if (objectHasOwnProperty(object, property)) {
174
- if (arrayIsArray(value)) newObject[property] = cleanArray(value);
175
- else if (value && typeof value === "object" && value.constructor === Object) newObject[property] = clone(value);
176
- else newObject[property] = value;
177
- }
178
- }
179
- return newObject;
180
- }
181
- /**
182
- * Convert non-node values into strings without depending on direct property access.
183
- *
184
- * @param value - The value to stringify.
185
- * @returns A string representation of the provided value.
186
- */
187
- function stringifyValue(value) {
188
- switch (typeof value) {
189
- case "string": return value;
190
- case "number": return numberToString(value);
191
- case "boolean": return booleanToString(value);
192
- case "bigint": return bigintToString ? bigintToString(value) : "0";
193
- case "symbol": return symbolToString ? symbolToString(value) : "Symbol()";
194
- case "undefined": return objectToString(value);
195
- case "function":
196
- case "object": {
197
- if (value === null) return objectToString(value);
198
- const valueAsRecord = value;
199
- const valueToString = lookupGetter(valueAsRecord, "toString");
200
- if (typeof valueToString === "function") {
201
- const stringified = valueToString(valueAsRecord);
202
- return typeof stringified === "string" ? stringified : objectToString(stringified);
203
- }
204
- return objectToString(value);
205
- }
206
- default: return objectToString(value);
207
- }
208
- }
209
- /**
210
- * This method automatically checks if the prop is function or getter and behaves accordingly.
211
- *
212
- * @param object - The object to look up the getter function in its prototype chain.
213
- * @param prop - The property name for which to find the getter function.
214
- * @returns The getter function found in the prototype chain or a fallback function.
215
- */
216
- function lookupGetter(object, prop) {
217
- while (object !== null) {
218
- const desc = getOwnPropertyDescriptor(object, prop);
219
- if (desc) {
220
- if (desc.get) return unapply(desc.get);
221
- if (typeof desc.value === "function") return unapply(desc.value);
222
- }
223
- object = getPrototypeOf(object);
224
- }
225
- function fallbackValue() {
226
- return null;
227
- }
228
- return fallbackValue;
229
- }
230
- function isRegex(value) {
231
- try {
232
- regExpTest(value, "");
233
- return true;
234
- } catch (_unused) {
235
- return false;
236
- }
237
- }
238
- const html$1 = freeze([
239
- "a",
240
- "abbr",
241
- "acronym",
242
- "address",
243
- "area",
244
- "article",
245
- "aside",
246
- "audio",
247
- "b",
248
- "bdi",
249
- "bdo",
250
- "big",
251
- "blink",
252
- "blockquote",
253
- "body",
254
- "br",
255
- "button",
256
- "canvas",
257
- "caption",
258
- "center",
259
- "cite",
260
- "code",
261
- "col",
262
- "colgroup",
263
- "content",
264
- "data",
265
- "datalist",
266
- "dd",
267
- "decorator",
268
- "del",
269
- "details",
270
- "dfn",
271
- "dialog",
272
- "dir",
273
- "div",
274
- "dl",
275
- "dt",
276
- "element",
277
- "em",
278
- "fieldset",
279
- "figcaption",
280
- "figure",
281
- "font",
282
- "footer",
283
- "form",
284
- "h1",
285
- "h2",
286
- "h3",
287
- "h4",
288
- "h5",
289
- "h6",
290
- "head",
291
- "header",
292
- "hgroup",
293
- "hr",
294
- "html",
295
- "i",
296
- "img",
297
- "input",
298
- "ins",
299
- "kbd",
300
- "label",
301
- "legend",
302
- "li",
303
- "main",
304
- "map",
305
- "mark",
306
- "marquee",
307
- "menu",
308
- "menuitem",
309
- "meter",
310
- "nav",
311
- "nobr",
312
- "ol",
313
- "optgroup",
314
- "option",
315
- "output",
316
- "p",
317
- "picture",
318
- "pre",
319
- "progress",
320
- "q",
321
- "rp",
322
- "rt",
323
- "ruby",
324
- "s",
325
- "samp",
326
- "search",
327
- "section",
328
- "select",
329
- "shadow",
330
- "slot",
331
- "small",
332
- "source",
333
- "spacer",
334
- "span",
335
- "strike",
336
- "strong",
337
- "style",
338
- "sub",
339
- "summary",
340
- "sup",
341
- "table",
342
- "tbody",
343
- "td",
344
- "template",
345
- "textarea",
346
- "tfoot",
347
- "th",
348
- "thead",
349
- "time",
350
- "tr",
351
- "track",
352
- "tt",
353
- "u",
354
- "ul",
355
- "var",
356
- "video",
357
- "wbr"
358
- ]);
359
- const svg$1 = freeze([
360
- "svg",
361
- "a",
362
- "altglyph",
363
- "altglyphdef",
364
- "altglyphitem",
365
- "animatecolor",
366
- "animatemotion",
367
- "animatetransform",
368
- "circle",
369
- "clippath",
370
- "defs",
371
- "desc",
372
- "ellipse",
373
- "enterkeyhint",
374
- "exportparts",
375
- "filter",
376
- "font",
377
- "g",
378
- "glyph",
379
- "glyphref",
380
- "hkern",
381
- "image",
382
- "inputmode",
383
- "line",
384
- "lineargradient",
385
- "marker",
386
- "mask",
387
- "metadata",
388
- "mpath",
389
- "part",
390
- "path",
391
- "pattern",
392
- "polygon",
393
- "polyline",
394
- "radialgradient",
395
- "rect",
396
- "stop",
397
- "style",
398
- "switch",
399
- "symbol",
400
- "text",
401
- "textpath",
402
- "title",
403
- "tref",
404
- "tspan",
405
- "view",
406
- "vkern"
407
- ]);
408
- const svgFilters = freeze([
409
- "feBlend",
410
- "feColorMatrix",
411
- "feComponentTransfer",
412
- "feComposite",
413
- "feConvolveMatrix",
414
- "feDiffuseLighting",
415
- "feDisplacementMap",
416
- "feDistantLight",
417
- "feDropShadow",
418
- "feFlood",
419
- "feFuncA",
420
- "feFuncB",
421
- "feFuncG",
422
- "feFuncR",
423
- "feGaussianBlur",
424
- "feImage",
425
- "feMerge",
426
- "feMergeNode",
427
- "feMorphology",
428
- "feOffset",
429
- "fePointLight",
430
- "feSpecularLighting",
431
- "feSpotLight",
432
- "feTile",
433
- "feTurbulence"
434
- ]);
435
- const svgDisallowed = freeze([
436
- "animate",
437
- "color-profile",
438
- "cursor",
439
- "discard",
440
- "font-face",
441
- "font-face-format",
442
- "font-face-name",
443
- "font-face-src",
444
- "font-face-uri",
445
- "foreignobject",
446
- "hatch",
447
- "hatchpath",
448
- "mesh",
449
- "meshgradient",
450
- "meshpatch",
451
- "meshrow",
452
- "missing-glyph",
453
- "script",
454
- "set",
455
- "solidcolor",
456
- "unknown",
457
- "use"
458
- ]);
459
- const mathMl$1 = freeze([
460
- "math",
461
- "menclose",
462
- "merror",
463
- "mfenced",
464
- "mfrac",
465
- "mglyph",
466
- "mi",
467
- "mlabeledtr",
468
- "mmultiscripts",
469
- "mn",
470
- "mo",
471
- "mover",
472
- "mpadded",
473
- "mphantom",
474
- "mroot",
475
- "mrow",
476
- "ms",
477
- "mspace",
478
- "msqrt",
479
- "mstyle",
480
- "msub",
481
- "msup",
482
- "msubsup",
483
- "mtable",
484
- "mtd",
485
- "mtext",
486
- "mtr",
487
- "munder",
488
- "munderover",
489
- "mprescripts"
490
- ]);
491
- const mathMlDisallowed = freeze([
492
- "maction",
493
- "maligngroup",
494
- "malignmark",
495
- "mlongdiv",
496
- "mscarries",
497
- "mscarry",
498
- "msgroup",
499
- "mstack",
500
- "msline",
501
- "msrow",
502
- "semantics",
503
- "annotation",
504
- "annotation-xml",
505
- "mprescripts",
506
- "none"
507
- ]);
508
- const text = freeze(["#text"]);
509
- const html = freeze([
510
- "accept",
511
- "action",
512
- "align",
513
- "alt",
514
- "autocapitalize",
515
- "autocomplete",
516
- "autopictureinpicture",
517
- "autoplay",
518
- "background",
519
- "bgcolor",
520
- "border",
521
- "capture",
522
- "cellpadding",
523
- "cellspacing",
524
- "checked",
525
- "cite",
526
- "class",
527
- "clear",
528
- "color",
529
- "cols",
530
- "colspan",
531
- "command",
532
- "commandfor",
533
- "controls",
534
- "controlslist",
535
- "coords",
536
- "crossorigin",
537
- "datetime",
538
- "decoding",
539
- "default",
540
- "dir",
541
- "disabled",
542
- "disablepictureinpicture",
543
- "disableremoteplayback",
544
- "download",
545
- "draggable",
546
- "enctype",
547
- "enterkeyhint",
548
- "exportparts",
549
- "face",
550
- "for",
551
- "headers",
552
- "height",
553
- "hidden",
554
- "high",
555
- "href",
556
- "hreflang",
557
- "id",
558
- "inert",
559
- "inputmode",
560
- "integrity",
561
- "ismap",
562
- "kind",
563
- "label",
564
- "lang",
565
- "list",
566
- "loading",
567
- "loop",
568
- "low",
569
- "max",
570
- "maxlength",
571
- "media",
572
- "method",
573
- "min",
574
- "minlength",
575
- "multiple",
576
- "muted",
577
- "name",
578
- "nonce",
579
- "noshade",
580
- "novalidate",
581
- "nowrap",
582
- "open",
583
- "optimum",
584
- "part",
585
- "pattern",
586
- "placeholder",
587
- "playsinline",
588
- "popover",
589
- "popovertarget",
590
- "popovertargetaction",
591
- "poster",
592
- "preload",
593
- "pubdate",
594
- "radiogroup",
595
- "readonly",
596
- "rel",
597
- "required",
598
- "rev",
599
- "reversed",
600
- "role",
601
- "rows",
602
- "rowspan",
603
- "spellcheck",
604
- "scope",
605
- "selected",
606
- "shape",
607
- "size",
608
- "sizes",
609
- "slot",
610
- "span",
611
- "srclang",
612
- "start",
613
- "src",
614
- "srcset",
615
- "step",
616
- "style",
617
- "summary",
618
- "tabindex",
619
- "title",
620
- "translate",
621
- "type",
622
- "usemap",
623
- "valign",
624
- "value",
625
- "width",
626
- "wrap",
627
- "xmlns"
628
- ]);
629
- const svg = freeze([
630
- "accent-height",
631
- "accumulate",
632
- "additive",
633
- "alignment-baseline",
634
- "amplitude",
635
- "ascent",
636
- "attributename",
637
- "attributetype",
638
- "azimuth",
639
- "basefrequency",
640
- "baseline-shift",
641
- "begin",
642
- "bias",
643
- "by",
644
- "class",
645
- "clip",
646
- "clippathunits",
647
- "clip-path",
648
- "clip-rule",
649
- "color",
650
- "color-interpolation",
651
- "color-interpolation-filters",
652
- "color-profile",
653
- "color-rendering",
654
- "cx",
655
- "cy",
656
- "d",
657
- "dx",
658
- "dy",
659
- "diffuseconstant",
660
- "direction",
661
- "display",
662
- "divisor",
663
- "dominant-baseline",
664
- "dur",
665
- "edgemode",
666
- "elevation",
667
- "end",
668
- "exponent",
669
- "fill",
670
- "fill-opacity",
671
- "fill-rule",
672
- "filter",
673
- "filterunits",
674
- "flood-color",
675
- "flood-opacity",
676
- "font-family",
677
- "font-size",
678
- "font-size-adjust",
679
- "font-stretch",
680
- "font-style",
681
- "font-variant",
682
- "font-weight",
683
- "fx",
684
- "fy",
685
- "g1",
686
- "g2",
687
- "glyph-name",
688
- "glyphref",
689
- "gradientunits",
690
- "gradienttransform",
691
- "height",
692
- "href",
693
- "id",
694
- "image-rendering",
695
- "in",
696
- "in2",
697
- "intercept",
698
- "k",
699
- "k1",
700
- "k2",
701
- "k3",
702
- "k4",
703
- "kerning",
704
- "keypoints",
705
- "keysplines",
706
- "keytimes",
707
- "lang",
708
- "lengthadjust",
709
- "letter-spacing",
710
- "kernelmatrix",
711
- "kernelunitlength",
712
- "lighting-color",
713
- "local",
714
- "marker-end",
715
- "marker-mid",
716
- "marker-start",
717
- "markerheight",
718
- "markerunits",
719
- "markerwidth",
720
- "maskcontentunits",
721
- "maskunits",
722
- "max",
723
- "mask",
724
- "mask-type",
725
- "media",
726
- "method",
727
- "mode",
728
- "min",
729
- "name",
730
- "numoctaves",
731
- "offset",
732
- "operator",
733
- "opacity",
734
- "order",
735
- "orient",
736
- "orientation",
737
- "origin",
738
- "overflow",
739
- "paint-order",
740
- "path",
741
- "pathlength",
742
- "patterncontentunits",
743
- "patterntransform",
744
- "patternunits",
745
- "pointer-events",
746
- "points",
747
- "preservealpha",
748
- "preserveaspectratio",
749
- "primitiveunits",
750
- "r",
751
- "rx",
752
- "ry",
753
- "radius",
754
- "refx",
755
- "refy",
756
- "repeatcount",
757
- "repeatdur",
758
- "restart",
759
- "result",
760
- "rotate",
761
- "scale",
762
- "seed",
763
- "shape-rendering",
764
- "slope",
765
- "specularconstant",
766
- "specularexponent",
767
- "spreadmethod",
768
- "startoffset",
769
- "stddeviation",
770
- "stitchtiles",
771
- "stop-color",
772
- "stop-opacity",
773
- "stroke-dasharray",
774
- "stroke-dashoffset",
775
- "stroke-linecap",
776
- "stroke-linejoin",
777
- "stroke-miterlimit",
778
- "stroke-opacity",
779
- "stroke",
780
- "stroke-width",
781
- "style",
782
- "surfacescale",
783
- "systemlanguage",
784
- "tabindex",
785
- "tablevalues",
786
- "targetx",
787
- "targety",
788
- "transform",
789
- "transform-origin",
790
- "text-anchor",
791
- "text-decoration",
792
- "text-orientation",
793
- "text-rendering",
794
- "textlength",
795
- "type",
796
- "u1",
797
- "u2",
798
- "unicode",
799
- "values",
800
- "vector-effect",
801
- "viewbox",
802
- "visibility",
803
- "version",
804
- "vert-adv-y",
805
- "vert-origin-x",
806
- "vert-origin-y",
807
- "width",
808
- "word-spacing",
809
- "wrap",
810
- "writing-mode",
811
- "xchannelselector",
812
- "ychannelselector",
813
- "x",
814
- "x1",
815
- "x2",
816
- "xmlns",
817
- "y",
818
- "y1",
819
- "y2",
820
- "z",
821
- "zoomandpan"
822
- ]);
823
- const mathMl = freeze([
824
- "accent",
825
- "accentunder",
826
- "align",
827
- "bevelled",
828
- "close",
829
- "columnalign",
830
- "columnlines",
831
- "columnspacing",
832
- "columnspan",
833
- "denomalign",
834
- "depth",
835
- "dir",
836
- "display",
837
- "displaystyle",
838
- "encoding",
839
- "fence",
840
- "frame",
841
- "height",
842
- "href",
843
- "id",
844
- "largeop",
845
- "length",
846
- "linethickness",
847
- "lquote",
848
- "lspace",
849
- "mathbackground",
850
- "mathcolor",
851
- "mathsize",
852
- "mathvariant",
853
- "maxsize",
854
- "minsize",
855
- "movablelimits",
856
- "notation",
857
- "numalign",
858
- "open",
859
- "rowalign",
860
- "rowlines",
861
- "rowspacing",
862
- "rowspan",
863
- "rspace",
864
- "rquote",
865
- "scriptlevel",
866
- "scriptminsize",
867
- "scriptsizemultiplier",
868
- "selection",
869
- "separator",
870
- "separators",
871
- "stretchy",
872
- "subscriptshift",
873
- "supscriptshift",
874
- "symmetric",
875
- "voffset",
876
- "width",
877
- "xmlns"
878
- ]);
879
- const xml = freeze([
880
- "xlink:href",
881
- "xml:id",
882
- "xlink:title",
883
- "xml:space",
884
- "xmlns:xlink"
885
- ]);
886
- const MUSTACHE_EXPR = seal(/{{[\w\W]*|^[\w\W]*}}/g);
887
- const ERB_EXPR = seal(/<%[\w\W]*|^[\w\W]*%>/g);
888
- const TMPLIT_EXPR = seal(/\${[\w\W]*/g);
889
- const DATA_ATTR = seal(/^data-[\-\w.\u00B7-\uFFFF]+$/);
890
- const ARIA_ATTR = seal(/^aria-[\-\w]+$/);
891
- const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);
892
- const IS_SCRIPT_OR_DATA = seal(/^(?:\w+script|data):/i);
893
- const ATTR_WHITESPACE = seal(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);
894
- const DOCTYPE_NAME = seal(/^html$/i);
895
- const CUSTOM_ELEMENT = seal(/^[a-z][.\w]*(-[.\w]+)+$/i);
896
- const ELEMENT_MARKUP_PROBE = seal(/<[/\w!]/g);
897
- const COMMENT_MARKUP_PROBE = seal(/<[/\w]/g);
898
- const FALLBACK_TAG_CLOSE = seal(/<\/no(script|embed|frames)/i);
899
- const SELF_CLOSING_TAG = seal(/\/>/i);
900
- const NODE_TYPE = {
901
- element: 1,
902
- attribute: 2,
903
- text: 3,
904
- cdataSection: 4,
905
- entityReference: 5,
906
- entityNode: 6,
907
- processingInstruction: 7,
908
- comment: 8,
909
- document: 9,
910
- documentType: 10,
911
- documentFragment: 11,
912
- notation: 12
913
- };
914
- const LITERAL_TEXT_ELEMENT_NAMES = [
915
- "style",
916
- "script",
917
- "xmp",
918
- "iframe",
919
- "noembed",
920
- "noframes",
921
- "plaintext",
922
- "noscript"
923
- ];
924
- const LITERAL_TEXT_ELEMENTS = freeze(addToSet({}, LITERAL_TEXT_ELEMENT_NAMES));
925
- const LITERAL_TEXT_CLOSE = function() {
926
- const map = {};
927
- arrayForEach(LITERAL_TEXT_ELEMENT_NAMES, (name) => {
928
- map[name] = seal(new RegExp("</" + name + "(?=[\\t\\n\\f\\r />])", "i"));
929
- });
930
- return freeze(map);
931
- }();
932
- const getGlobal = function getGlobal() {
933
- return typeof window === "undefined" ? null : window;
934
- };
935
- /**
936
- * Creates a no-op policy for internal use only.
937
- * Don't export this function outside this module!
938
- * @param trustedTypes The policy factory.
939
- * @param purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).
940
- * @return The policy created (or null, if Trusted Types
941
- * are not supported or creating the policy failed).
942
- */
943
- const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {
944
- if (typeof trustedTypes !== "object" || typeof trustedTypes.createPolicy !== "function") return null;
945
- let suffix = null;
946
- const ATTR_NAME = "data-tt-policy-suffix";
947
- if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) suffix = purifyHostElement.getAttribute(ATTR_NAME);
948
- const policyName = "dompurify" + (suffix ? "#" + suffix : "");
949
- try {
950
- return trustedTypes.createPolicy(policyName, {
951
- createHTML(html) {
952
- return html;
953
- },
954
- createScriptURL(scriptUrl) {
955
- return scriptUrl;
956
- }
957
- });
958
- } catch (_) {
959
- console.warn("TrustedTypes policy " + policyName + " could not be created.");
960
- return null;
961
- }
962
- };
963
- const _createHooksMap = function _createHooksMap() {
964
- return {
965
- afterSanitizeAttributes: [],
966
- afterSanitizeElements: [],
967
- afterSanitizeShadowDOM: [],
968
- beforeSanitizeAttributes: [],
969
- beforeSanitizeElements: [],
970
- beforeSanitizeShadowDOM: [],
971
- uponSanitizeAttribute: [],
972
- uponSanitizeElement: [],
973
- uponSanitizeShadowNode: []
974
- };
975
- };
976
- /**
977
- * Resolve a set-valued configuration option: a fresh set built from
978
- * cfg[key] when it is an own array property (seeded with a clone of
979
- * options.base when given, case-normalized via options.transform),
980
- * the fallback set otherwise.
981
- *
982
- * @param cfg the cloned, prototype-free configuration object
983
- * @param key the configuration property to read
984
- * @param fallback the set to use when the option is absent or not an array
985
- * @param options transform and optional base set to merge into
986
- * @returns the resolved set
987
- */
988
- const _resolveSetOption = function _resolveSetOption(cfg, key, fallback, options) {
989
- return objectHasOwnProperty(cfg, key) && arrayIsArray(cfg[key]) ? addToSet(options.base ? clone(options.base) : {}, cfg[key], options.transform) : fallback;
990
- };
991
- /**
992
- * Resolve an object-valued configuration option: a prototype-free clone
993
- * of cfg[key] when it is an own, truthy object property, else a fresh
994
- * fallback built by makeFallback (fresh on every parse, so a previous
995
- * parse can never leak state into the next one).
996
- *
997
- * @param cfg the cloned, prototype-free configuration object
998
- * @param key the configuration property to read
999
- * @param makeFallback builds the fallback value when the option is absent
1000
- * @returns the resolved object
1001
- */
1002
- const _resolveObjectOption = function _resolveObjectOption(cfg, key, makeFallback) {
1003
- const value = objectHasOwnProperty(cfg, key) ? cfg[key] : void 0;
1004
- return value && typeof value === "object" ? clone(value) : makeFallback();
1005
- };
1006
- function createDOMPurify() {
1007
- let window = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal();
1008
- const DOMPurify = (root) => createDOMPurify(root);
1009
- DOMPurify.version = "3.4.16";
1010
- DOMPurify.removed = [];
1011
- if (!window || !window.document || window.document.nodeType !== NODE_TYPE.document || !window.Element) {
1012
- DOMPurify.isSupported = false;
1013
- return DOMPurify;
1014
- }
1015
- let document = window.document;
1016
- const originalDocument = document;
1017
- const currentScript = originalDocument.currentScript;
1018
- window.DocumentFragment;
1019
- const HTMLTemplateElement = window.HTMLTemplateElement, Node = window.Node, Element = window.Element, NodeFilter = window.NodeFilter;
1020
- window.NamedNodeMap === void 0 && (window.NamedNodeMap || window.MozNamedAttrMap);
1021
- window.HTMLFormElement;
1022
- const DOMParser = window.DOMParser, trustedTypes = window.trustedTypes;
1023
- const ElementPrototype = Element.prototype;
1024
- const cloneNode = lookupGetter(ElementPrototype, "cloneNode");
1025
- const remove = lookupGetter(ElementPrototype, "remove");
1026
- const removeAttributeNode = lookupGetter(ElementPrototype, "removeAttributeNode");
1027
- const getNextSibling = lookupGetter(ElementPrototype, "nextSibling");
1028
- const getChildNodes = lookupGetter(ElementPrototype, "childNodes");
1029
- const getParentNode = lookupGetter(ElementPrototype, "parentNode");
1030
- const getShadowRoot = lookupGetter(ElementPrototype, "shadowRoot");
1031
- const getAttributes = lookupGetter(ElementPrototype, "attributes");
1032
- const getNodeType = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeType") : null;
1033
- const getNodeName = Node && Node.prototype ? lookupGetter(Node.prototype, "nodeName") : null;
1034
- const getOwnerDocument = Node && Node.prototype ? lookupGetter(Node.prototype, "ownerDocument") : null;
1035
- const _readNodeType = function _readNodeType(node) {
1036
- return getNodeType ? getNodeType(node) : node.nodeType;
1037
- };
1038
- const _readNodeName = function _readNodeName(node) {
1039
- return getNodeName ? getNodeName(node) : node.nodeName;
1040
- };
1041
- if (typeof HTMLTemplateElement === "function") {
1042
- const template = document.createElement("template");
1043
- if (template.content && template.content.ownerDocument) document = template.content.ownerDocument;
1044
- }
1045
- let trustedTypesPolicy;
1046
- let emptyHTML = "";
1047
- let defaultTrustedTypesPolicy;
1048
- let defaultTrustedTypesPolicyResolved = false;
1049
- let IN_TRUSTED_TYPES_POLICY = 0;
1050
- const _assertNotInTrustedTypesPolicy = function _assertNotInTrustedTypesPolicy() {
1051
- if (IN_TRUSTED_TYPES_POLICY > 0) throw typeErrorCreate("A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the \"DOMPurify and Trusted Types\" section of the README.");
1052
- };
1053
- const _createTrustedHTML = function _createTrustedHTML(html) {
1054
- _assertNotInTrustedTypesPolicy();
1055
- IN_TRUSTED_TYPES_POLICY++;
1056
- try {
1057
- return trustedTypesPolicy.createHTML(html);
1058
- } finally {
1059
- IN_TRUSTED_TYPES_POLICY--;
1060
- }
1061
- };
1062
- const _createTrustedScriptURL = function _createTrustedScriptURL(scriptUrl) {
1063
- _assertNotInTrustedTypesPolicy();
1064
- IN_TRUSTED_TYPES_POLICY++;
1065
- try {
1066
- return trustedTypesPolicy.createScriptURL(scriptUrl);
1067
- } finally {
1068
- IN_TRUSTED_TYPES_POLICY--;
1069
- }
1070
- };
1071
- const _getDefaultTrustedTypesPolicy = function _getDefaultTrustedTypesPolicy() {
1072
- if (!defaultTrustedTypesPolicyResolved) {
1073
- defaultTrustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);
1074
- defaultTrustedTypesPolicyResolved = true;
1075
- }
1076
- return defaultTrustedTypesPolicy;
1077
- };
1078
- const _document = document, implementation = _document.implementation, createNodeIterator = _document.createNodeIterator, createDocumentFragment = _document.createDocumentFragment, getElementsByTagName = _document.getElementsByTagName;
1079
- const importNode = originalDocument.importNode;
1080
- let hooks = _createHooksMap();
1081
- /**
1082
- * Expose whether this browser supports running the full DOMPurify.
1083
- */
1084
- DOMPurify.isSupported = typeof entries === "function" && typeof getParentNode === "function" && implementation && implementation.createHTMLDocument !== void 0;
1085
- const MUSTACHE_EXPR$1 = MUSTACHE_EXPR, ERB_EXPR$1 = ERB_EXPR, TMPLIT_EXPR$1 = TMPLIT_EXPR, DATA_ATTR$1 = DATA_ATTR, ARIA_ATTR$1 = ARIA_ATTR, IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA, ATTR_WHITESPACE$1 = ATTR_WHITESPACE, CUSTOM_ELEMENT$1 = CUSTOM_ELEMENT;
1086
- let IS_ALLOWED_URI$1 = IS_ALLOWED_URI;
1087
- /**
1088
- * We consider the elements and attributes below to be safe. Ideally
1089
- * don't add any new ones but feel free to remove unwanted ones.
1090
- */
1091
- let ALLOWED_TAGS = null;
1092
- const DEFAULT_ALLOWED_TAGS = addToSet({}, [
1093
- ...html$1,
1094
- ...svg$1,
1095
- ...svgFilters,
1096
- ...mathMl$1,
1097
- ...text
1098
- ]);
1099
- let ALLOWED_ATTR = null;
1100
- const DEFAULT_ALLOWED_ATTR = addToSet({}, [
1101
- ...html,
1102
- ...svg,
1103
- ...mathMl,
1104
- ...xml
1105
- ]);
1106
- let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {
1107
- tagNameCheck: {
1108
- writable: true,
1109
- configurable: false,
1110
- enumerable: true,
1111
- value: null
1112
- },
1113
- attributeNameCheck: {
1114
- writable: true,
1115
- configurable: false,
1116
- enumerable: true,
1117
- value: null
1118
- },
1119
- allowCustomizedBuiltInElements: {
1120
- writable: true,
1121
- configurable: false,
1122
- enumerable: true,
1123
- value: false
1124
- }
1125
- }));
1126
- let FORBID_TAGS = null;
1127
- let FORBID_ATTR = null;
1128
- const EXTRA_ELEMENT_HANDLING = Object.seal(create(null, {
1129
- tagCheck: {
1130
- writable: true,
1131
- configurable: false,
1132
- enumerable: true,
1133
- value: null
1134
- },
1135
- attributeCheck: {
1136
- writable: true,
1137
- configurable: false,
1138
- enumerable: true,
1139
- value: null
1140
- }
1141
- }));
1142
- let ALLOW_ARIA_ATTR = true;
1143
- let ALLOW_DATA_ATTR = true;
1144
- let ALLOW_UNKNOWN_PROTOCOLS = false;
1145
- let ALLOW_SELF_CLOSE_IN_ATTR = true;
1146
- let SAFE_FOR_TEMPLATES = false;
1147
- let SAFE_FOR_XML = true;
1148
- let WHOLE_DOCUMENT = false;
1149
- let SET_CONFIG = false;
1150
- let SET_CONFIG_ALLOWED_TAGS = null;
1151
- let SET_CONFIG_ALLOWED_ATTR = null;
1152
- let FORCE_BODY = false;
1153
- let RETURN_DOM = false;
1154
- let RETURN_DOM_FRAGMENT = false;
1155
- let RETURN_TRUSTED_TYPE = false;
1156
- let SANITIZE_DOM = true;
1157
- let SANITIZE_NAMED_PROPS = false;
1158
- const SANITIZE_NAMED_PROPS_PREFIX = "user-content-";
1159
- let KEEP_CONTENT = true;
1160
- let IN_PLACE = false;
1161
- let USE_PROFILES = {};
1162
- let FORBID_CONTENTS = null;
1163
- const DEFAULT_FORBID_CONTENTS = addToSet({}, [
1164
- "annotation-xml",
1165
- "audio",
1166
- "colgroup",
1167
- "desc",
1168
- "foreignobject",
1169
- "head",
1170
- "iframe",
1171
- "math",
1172
- "mi",
1173
- "mn",
1174
- "mo",
1175
- "ms",
1176
- "mtext",
1177
- "noembed",
1178
- "noframes",
1179
- "noscript",
1180
- "plaintext",
1181
- "script",
1182
- "selectedcontent",
1183
- "style",
1184
- "svg",
1185
- "template",
1186
- "thead",
1187
- "title",
1188
- "video",
1189
- "xmp"
1190
- ]);
1191
- let DATA_URI_TAGS = null;
1192
- const DEFAULT_DATA_URI_TAGS = addToSet({}, [
1193
- "audio",
1194
- "video",
1195
- "img",
1196
- "source",
1197
- "image",
1198
- "track"
1199
- ]);
1200
- let URI_SAFE_ATTRIBUTES = null;
1201
- const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, [
1202
- "alt",
1203
- "class",
1204
- "for",
1205
- "id",
1206
- "label",
1207
- "name",
1208
- "pattern",
1209
- "placeholder",
1210
- "role",
1211
- "summary",
1212
- "title",
1213
- "value",
1214
- "style",
1215
- "xmlns"
1216
- ]);
1217
- const MATHML_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
1218
- const SVG_NAMESPACE = "http://www.w3.org/2000/svg";
1219
- const HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
1220
- let NAMESPACE = HTML_NAMESPACE;
1221
- let IS_EMPTY_INPUT = false;
1222
- let ALLOWED_NAMESPACES = null;
1223
- const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [
1224
- MATHML_NAMESPACE,
1225
- SVG_NAMESPACE,
1226
- HTML_NAMESPACE
1227
- ], stringToString);
1228
- const DEFAULT_MATHML_TEXT_INTEGRATION_POINTS = freeze([
1229
- "mi",
1230
- "mo",
1231
- "mn",
1232
- "ms",
1233
- "mtext"
1234
- ]);
1235
- let MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS);
1236
- const DEFAULT_HTML_INTEGRATION_POINTS = freeze(["annotation-xml"]);
1237
- let HTML_INTEGRATION_POINTS = addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS);
1238
- const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, [
1239
- "title",
1240
- "style",
1241
- "font",
1242
- "a",
1243
- "script"
1244
- ]);
1245
- let PARSER_MEDIA_TYPE = null;
1246
- const SUPPORTED_PARSER_MEDIA_TYPES = ["application/xhtml+xml", "text/html"];
1247
- const DEFAULT_PARSER_MEDIA_TYPE = "text/html";
1248
- let transformCaseFunc = null;
1249
- let CONFIG = null;
1250
- const formElement = document.createElement("form");
1251
- const isRegexOrFunction = function isRegexOrFunction(testValue) {
1252
- return testValue instanceof RegExp || testValue instanceof Function;
1253
- };
1254
- /**
1255
- * _parseConfig
1256
- *
1257
- * @param cfg optional config literal
1258
- */
1259
- const _parseConfig = function _parseConfig() {
1260
- let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1261
- if (CONFIG && CONFIG === cfg) return;
1262
- if (!cfg || typeof cfg !== "object") cfg = {};
1263
- cfg = clone(cfg);
1264
- PARSER_MEDIA_TYPE = SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? DEFAULT_PARSER_MEDIA_TYPE : cfg.PARSER_MEDIA_TYPE;
1265
- transformCaseFunc = PARSER_MEDIA_TYPE === "application/xhtml+xml" ? stringToString : stringToLowerCase;
1266
- ALLOWED_TAGS = _resolveSetOption(cfg, "ALLOWED_TAGS", DEFAULT_ALLOWED_TAGS, { transform: transformCaseFunc });
1267
- ALLOWED_ATTR = _resolveSetOption(cfg, "ALLOWED_ATTR", DEFAULT_ALLOWED_ATTR, { transform: transformCaseFunc });
1268
- ALLOWED_NAMESPACES = _resolveSetOption(cfg, "ALLOWED_NAMESPACES", DEFAULT_ALLOWED_NAMESPACES, { transform: stringToString });
1269
- URI_SAFE_ATTRIBUTES = _resolveSetOption(cfg, "ADD_URI_SAFE_ATTR", DEFAULT_URI_SAFE_ATTRIBUTES, {
1270
- transform: transformCaseFunc,
1271
- base: DEFAULT_URI_SAFE_ATTRIBUTES
1272
- });
1273
- DATA_URI_TAGS = _resolveSetOption(cfg, "ADD_DATA_URI_TAGS", DEFAULT_DATA_URI_TAGS, {
1274
- transform: transformCaseFunc,
1275
- base: DEFAULT_DATA_URI_TAGS
1276
- });
1277
- FORBID_CONTENTS = _resolveSetOption(cfg, "FORBID_CONTENTS", DEFAULT_FORBID_CONTENTS, { transform: transformCaseFunc });
1278
- FORBID_TAGS = _resolveSetOption(cfg, "FORBID_TAGS", clone({}), { transform: transformCaseFunc });
1279
- FORBID_ATTR = _resolveSetOption(cfg, "FORBID_ATTR", clone({}), { transform: transformCaseFunc });
1280
- USE_PROFILES = objectHasOwnProperty(cfg, "USE_PROFILES") ? cfg.USE_PROFILES && typeof cfg.USE_PROFILES === "object" ? clone(cfg.USE_PROFILES) : cfg.USE_PROFILES : false;
1281
- ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false;
1282
- ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false;
1283
- ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false;
1284
- ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false;
1285
- SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false;
1286
- SAFE_FOR_XML = cfg.SAFE_FOR_XML !== false;
1287
- WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false;
1288
- RETURN_DOM = cfg.RETURN_DOM || false;
1289
- RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false;
1290
- RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false;
1291
- FORCE_BODY = cfg.FORCE_BODY || false;
1292
- SANITIZE_DOM = cfg.SANITIZE_DOM !== false;
1293
- SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false;
1294
- KEEP_CONTENT = cfg.KEEP_CONTENT !== false;
1295
- IN_PLACE = cfg.IN_PLACE || false;
1296
- IS_ALLOWED_URI$1 = isRegex(cfg.ALLOWED_URI_REGEXP) ? cfg.ALLOWED_URI_REGEXP : IS_ALLOWED_URI;
1297
- NAMESPACE = typeof cfg.NAMESPACE === "string" ? cfg.NAMESPACE : HTML_NAMESPACE;
1298
- MATHML_TEXT_INTEGRATION_POINTS = _resolveObjectOption(cfg, "MATHML_TEXT_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_MATHML_TEXT_INTEGRATION_POINTS));
1299
- HTML_INTEGRATION_POINTS = _resolveObjectOption(cfg, "HTML_INTEGRATION_POINTS", () => addToSet({}, DEFAULT_HTML_INTEGRATION_POINTS));
1300
- const customElementHandling = _resolveObjectOption(cfg, "CUSTOM_ELEMENT_HANDLING", () => create(null));
1301
- CUSTOM_ELEMENT_HANDLING = create(null);
1302
- if (objectHasOwnProperty(customElementHandling, "tagNameCheck") && isRegexOrFunction(customElementHandling.tagNameCheck)) CUSTOM_ELEMENT_HANDLING.tagNameCheck = customElementHandling.tagNameCheck;
1303
- if (objectHasOwnProperty(customElementHandling, "attributeNameCheck") && isRegexOrFunction(customElementHandling.attributeNameCheck)) CUSTOM_ELEMENT_HANDLING.attributeNameCheck = customElementHandling.attributeNameCheck;
1304
- if (objectHasOwnProperty(customElementHandling, "allowCustomizedBuiltInElements") && typeof customElementHandling.allowCustomizedBuiltInElements === "boolean") CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = customElementHandling.allowCustomizedBuiltInElements;
1305
- seal(CUSTOM_ELEMENT_HANDLING);
1306
- if (SAFE_FOR_TEMPLATES) ALLOW_DATA_ATTR = false;
1307
- if (RETURN_DOM_FRAGMENT) RETURN_DOM = true;
1308
- if (USE_PROFILES) {
1309
- ALLOWED_TAGS = addToSet({}, text);
1310
- ALLOWED_ATTR = create(null);
1311
- if (USE_PROFILES.html === true) {
1312
- addToSet(ALLOWED_TAGS, html$1);
1313
- addToSet(ALLOWED_ATTR, html);
1314
- }
1315
- if (USE_PROFILES.svg === true) {
1316
- addToSet(ALLOWED_TAGS, svg$1);
1317
- addToSet(ALLOWED_ATTR, svg);
1318
- addToSet(ALLOWED_ATTR, xml);
1319
- }
1320
- if (USE_PROFILES.svgFilters === true) {
1321
- addToSet(ALLOWED_TAGS, svgFilters);
1322
- addToSet(ALLOWED_ATTR, svg);
1323
- addToSet(ALLOWED_ATTR, xml);
1324
- }
1325
- if (USE_PROFILES.mathMl === true) {
1326
- addToSet(ALLOWED_TAGS, mathMl$1);
1327
- addToSet(ALLOWED_ATTR, mathMl);
1328
- addToSet(ALLOWED_ATTR, xml);
1329
- }
1330
- }
1331
- EXTRA_ELEMENT_HANDLING.tagCheck = null;
1332
- EXTRA_ELEMENT_HANDLING.attributeCheck = null;
1333
- if (objectHasOwnProperty(cfg, "ADD_TAGS")) {
1334
- if (typeof cfg.ADD_TAGS === "function") EXTRA_ELEMENT_HANDLING.tagCheck = cfg.ADD_TAGS;
1335
- else if (arrayIsArray(cfg.ADD_TAGS)) {
1336
- if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) ALLOWED_TAGS = clone(ALLOWED_TAGS);
1337
- addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);
1338
- }
1339
- }
1340
- if (objectHasOwnProperty(cfg, "ADD_ATTR")) {
1341
- if (typeof cfg.ADD_ATTR === "function") EXTRA_ELEMENT_HANDLING.attributeCheck = cfg.ADD_ATTR;
1342
- else if (arrayIsArray(cfg.ADD_ATTR)) {
1343
- if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) ALLOWED_ATTR = clone(ALLOWED_ATTR);
1344
- addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);
1345
- }
1346
- }
1347
- if (objectHasOwnProperty(cfg, "ADD_FORBID_CONTENTS") && arrayIsArray(cfg.ADD_FORBID_CONTENTS)) {
1348
- if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) FORBID_CONTENTS = clone(FORBID_CONTENTS);
1349
- addToSet(FORBID_CONTENTS, cfg.ADD_FORBID_CONTENTS, transformCaseFunc);
1350
- }
1351
- if (KEEP_CONTENT) ALLOWED_TAGS["#text"] = true;
1352
- if (WHOLE_DOCUMENT) addToSet(ALLOWED_TAGS, [
1353
- "html",
1354
- "head",
1355
- "body"
1356
- ]);
1357
- if (ALLOWED_TAGS.table) {
1358
- addToSet(ALLOWED_TAGS, ["tbody"]);
1359
- delete FORBID_TAGS.tbody;
1360
- }
1361
- if (cfg.TRUSTED_TYPES_POLICY) {
1362
- if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
1363
- if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
1364
- const previousTrustedTypesPolicy = trustedTypesPolicy;
1365
- trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY;
1366
- try {
1367
- emptyHTML = _createTrustedHTML("");
1368
- } catch (error) {
1369
- trustedTypesPolicy = previousTrustedTypesPolicy;
1370
- throw error;
1371
- }
1372
- } else if (cfg.TRUSTED_TYPES_POLICY === null) {
1373
- trustedTypesPolicy = void 0;
1374
- emptyHTML = "";
1375
- } else {
1376
- if (trustedTypesPolicy === void 0) trustedTypesPolicy = _getDefaultTrustedTypesPolicy();
1377
- if (trustedTypesPolicy && typeof emptyHTML === "string") emptyHTML = _createTrustedHTML("");
1378
- }
1379
- if (freeze) freeze(cfg);
1380
- CONFIG = cfg;
1381
- };
1382
- const ALL_SVG_TAGS = addToSet({}, [
1383
- ...svg$1,
1384
- ...svgFilters,
1385
- ...svgDisallowed
1386
- ]);
1387
- const ALL_MATHML_TAGS = addToSet({}, [...mathMl$1, ...mathMlDisallowed]);
1388
- /**
1389
- * Namespace rules for an element in the SVG namespace.
1390
- *
1391
- * @param tagName the element's lowercase tag name
1392
- * @param parent the (possibly simulated) parent node
1393
- * @param parentTagName the parent's lowercase tag name
1394
- * @returns true if a spec-compliant parser could produce this element
1395
- */
1396
- const _checkSvgNamespace = function _checkSvgNamespace(tagName, parent, parentTagName) {
1397
- if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "svg";
1398
- if (parent.namespaceURI === MATHML_NAMESPACE) return tagName === "svg" && (parentTagName === "annotation-xml" || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);
1399
- return Boolean(ALL_SVG_TAGS[tagName]);
1400
- };
1401
- /**
1402
- * Namespace rules for an element in the MathML namespace.
1403
- *
1404
- * @param tagName the element's lowercase tag name
1405
- * @param parent the (possibly simulated) parent node
1406
- * @param parentTagName the parent's lowercase tag name
1407
- * @returns true if a spec-compliant parser could produce this element
1408
- */
1409
- const _checkMathMlNamespace = function _checkMathMlNamespace(tagName, parent, parentTagName) {
1410
- if (parent.namespaceURI === HTML_NAMESPACE) return tagName === "math";
1411
- if (parent.namespaceURI === SVG_NAMESPACE) return tagName === "math" && HTML_INTEGRATION_POINTS[parentTagName];
1412
- return Boolean(ALL_MATHML_TAGS[tagName]);
1413
- };
1414
- /**
1415
- * Namespace rules for an element in the HTML namespace.
1416
- *
1417
- * @param tagName the element's lowercase tag name
1418
- * @param parent the (possibly simulated) parent node
1419
- * @param parentTagName the parent's lowercase tag name
1420
- * @returns true if a spec-compliant parser could produce this element
1421
- */
1422
- const _checkHtmlNamespace = function _checkHtmlNamespace(tagName, parent, parentTagName) {
1423
- if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) return false;
1424
- if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) return false;
1425
- return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);
1426
- };
1427
- /**
1428
- * @param element a DOM element whose namespace is being checked
1429
- * @returns Return false if the element has a
1430
- * namespace that a spec-compliant parser would never
1431
- * return. Return true otherwise.
1432
- */
1433
- const _checkValidNamespace = function _checkValidNamespace(element) {
1434
- let parent = getParentNode(element);
1435
- if (!parent || !parent.tagName) parent = {
1436
- namespaceURI: NAMESPACE,
1437
- tagName: "template"
1438
- };
1439
- const tagName = stringToLowerCase(element.tagName);
1440
- const parentTagName = stringToLowerCase(parent.tagName);
1441
- if (!ALLOWED_NAMESPACES[element.namespaceURI]) return false;
1442
- if (element.namespaceURI === SVG_NAMESPACE) return _checkSvgNamespace(tagName, parent, parentTagName);
1443
- if (element.namespaceURI === MATHML_NAMESPACE) return _checkMathMlNamespace(tagName, parent, parentTagName);
1444
- if (element.namespaceURI === HTML_NAMESPACE) return _checkHtmlNamespace(tagName, parent, parentTagName);
1445
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && ALLOWED_NAMESPACES[element.namespaceURI]) return true;
1446
- return false;
1447
- };
1448
- /**
1449
- * _forceRemove
1450
- *
1451
- * @param node a DOM node
1452
- */
1453
- const _forceRemove = function _forceRemove(node) {
1454
- arrayPush(DOMPurify.removed, { element: node });
1455
- try {
1456
- getParentNode(node).removeChild(node);
1457
- } catch (_) {
1458
- remove(node);
1459
- if (!getParentNode(node)) throw typeErrorCreate("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
1460
- }
1461
- };
1462
- /**
1463
- * _stripAttributeNode
1464
- *
1465
- * Remove a single Attr node case/namespace-exactly on an attribute-teardown
1466
- * path. Name-based removeAttribute() ASCII-lowercases its lookup key for an
1467
- * HTML element in an HTML document and so silently misses a case-preserved
1468
- * handler (e.g. `ONERROR` off an XML/XHTML import) - the same defect
1469
- * _removeAttribute() was fixed for, which a name-based call would reintroduce
1470
- * on these IN_PLACE teardown paths. Unlike _removeAttribute this does not
1471
- * record into DOMPurify.removed: the neutralize passes intentionally do not
1472
- * book-keep. A clobbered/detached node falls back to best-effort name-based
1473
- * removal.
1474
- *
1475
- * @param element the element to strip the attribute from
1476
- * @param attribute the Attr node to remove
1477
- * @param name the attribute's name, for the fallback path
1478
- */
1479
- const _stripAttributeNode = function _stripAttributeNode(element, attribute, name) {
1480
- try {
1481
- removeAttributeNode(element, attribute);
1482
- } catch (_) {
1483
- try {
1484
- element.removeAttribute(name);
1485
- } catch (_) {}
1486
- }
1487
- };
1488
- /**
1489
- * _neutralizeRoot
1490
- *
1491
- * Fail-closed teardown of an in-place root after the sanitize walk aborts
1492
- * (campaign-3 F2). An internal throw mid-walk — e.g. a page-registered
1493
- * custom element's reaction detaches a node so `_forceRemove`'s deliberate
1494
- * parentless guard throws, or any other re-entrant engine mutation — would
1495
- * otherwise leave the caller's *live* tree half-sanitized, with everything
1496
- * after the abort point still carrying its handlers. There is no safe way
1497
- * to resume the walk (the tree mutated under us), so we strip the root bare:
1498
- * remove every child and every attribute, then let the caller's catch see
1499
- * the original error. Clobber-safe (cached `remove`/`childNodes`/`attributes`
1500
- * getters; the root was already clobber-pre-flighted at the IN_PLACE entry).
1501
- *
1502
- * @param root the in-place root to empty
1503
- */
1504
- const _neutralizeRoot = function _neutralizeRoot(root) {
1505
- _neutralizeSubtree(root);
1506
- const childNodes = getChildNodes(root);
1507
- if (childNodes) {
1508
- const snapshot = [];
1509
- arrayForEach(childNodes, (child) => {
1510
- arrayPush(snapshot, child);
1511
- });
1512
- arrayForEach(snapshot, (child) => {
1513
- try {
1514
- remove(child);
1515
- } catch (_) {}
1516
- });
1517
- }
1518
- const attributes = getAttributes(root);
1519
- if (attributes) for (let i = attributes.length - 1; i >= 0; --i) {
1520
- const attribute = attributes[i];
1521
- const name = attribute && attribute.name;
1522
- if (typeof name === "string") _stripAttributeNode(root, attribute, name);
1523
- }
1524
- };
1525
- /**
1526
- * _removeAttribute
1527
- *
1528
- * Name-based getAttributeNode()/removeAttribute() ASCII-lowercase their
1529
- * lookup key for HTML elements in an HTML document, so they silently miss an
1530
- * attribute whose stored qualified name still contains uppercase ASCII
1531
- * letters. That happens when the node came from a case-preserving source
1532
- * (an XML/XHTML document imported via importNode(), or createAttributeNS()),
1533
- * where e.g. `ONERROR` survives the walk: the policy check lowercases to
1534
- * `onerror` and rejects it, but `removeAttribute('ONERROR')` looks up
1535
- * `onerror` and finds nothing. Remove the exact Attr node instead, which is
1536
- * case- and namespace-exact, and fall back to name-based removal only when
1537
- * the caller could not supply the node.
1538
- *
1539
- * @param name an Attribute name
1540
- * @param element a DOM node
1541
- * @param attr the exact Attr node to remove, when the caller has it
1542
- */
1543
- const _removeAttribute = function _removeAttribute(name, element, attr) {
1544
- if (!attr) try {
1545
- attr = element.getAttributeNode(name);
1546
- } catch (_) {
1547
- attr = null;
1548
- }
1549
- arrayPush(DOMPurify.removed, {
1550
- attribute: attr || null,
1551
- from: element
1552
- });
1553
- try {
1554
- if (attr) removeAttributeNode(element, attr);
1555
- else element.removeAttribute(name);
1556
- } catch (_) {
1557
- try {
1558
- element.removeAttribute(name);
1559
- } catch (_) {}
1560
- }
1561
- if (name === "is") {
1562
- if (RETURN_DOM || RETURN_DOM_FRAGMENT) try {
1563
- _forceRemove(element);
1564
- } catch (_) {}
1565
- else try {
1566
- element.setAttribute(name, "");
1567
- } catch (_) {}
1568
- }
1569
- };
1570
- /**
1571
- * _stripDisallowedAttributes
1572
- *
1573
- * Removes every attribute the active configuration does not allow from a
1574
- * single element, using the same allowlist as the main attribute pass (so
1575
- * `on*` handlers go, but no `/^on/` blocklist is introduced). Used only to
1576
- * neutralise nodes that are being discarded from an in-place tree.
1577
- *
1578
- * @param element the element to strip
1579
- */
1580
- const _stripDisallowedAttributes = function _stripDisallowedAttributes(element) {
1581
- const attributes = getAttributes(element);
1582
- if (!attributes) return;
1583
- for (let i = attributes.length - 1; i >= 0; --i) {
1584
- const attribute = attributes[i];
1585
- const name = attribute && attribute.name;
1586
- if (typeof name !== "string" || ALLOWED_ATTR[transformCaseFunc(name)]) continue;
1587
- _stripAttributeNode(element, attribute, name);
1588
- }
1589
- };
1590
- /**
1591
- * _neutralizeSubtree
1592
- *
1593
- * Completes the audit-5 F1 fix across every removal path. The KEEP_CONTENT
1594
- * move-hoist neutralises only disallowed-tag removals; clobber, mXSS-canary,
1595
- * namespace, comment, processing-instruction and KEEP_CONTENT:false removals
1596
- * all drop their subtree wholesale via `_forceRemove`. On the IN_PLACE path
1597
- * those dropped nodes are detached from the caller's LIVE tree but a
1598
- * handler-bearing original among them (an `<img onerror>`/`<video>` that was
1599
- * loading) keeps its queued resource event, which fires in page scope after
1600
- * sanitize returns. This walks a removed subtree and strips every attribute
1601
- * the active configuration does not allow — so `on*` handlers are cancelled
1602
- * through the SAME allowlist that governs kept nodes, not a separate `/^on/`
1603
- * blocklist. Run synchronously before sanitize returns, i.e. before any
1604
- * queued event can fire. Hook-free by design: these nodes leave the output,
1605
- * so firing attribute hooks for them would be surprising. Clobber-safe reads;
1606
- * a doomed clobbered node may shadow `removeAttribute` (its own attributes are
1607
- * irrelevant — it is discarded — while its non-clobbered descendants, e.g.
1608
- * the `<img>`, are reached and scrubbed).
1609
- *
1610
- * @param root the root of a removed subtree to neutralise
1611
- */
1612
- const _neutralizeSubtree = function _neutralizeSubtree(root) {
1613
- const stack = [root];
1614
- while (stack.length > 0) {
1615
- const node = stack.pop();
1616
- if (_readNodeType(node) === NODE_TYPE.element) _stripDisallowedAttributes(node);
1617
- const childNodes = getChildNodes(node);
1618
- if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
1619
- }
1620
- };
1621
- /**
1622
- * _neutralizePatchLinkage
1623
- *
1624
- * IN_PLACE entry pre-pass (declarative-partial-updates / streaming
1625
- * hardening, https://github.com/WICG/declarative-partial-updates).
1626
- *
1627
- * The main walk strips patch linkage (`for`/`patchsrc`) and removes range
1628
- * markers (PIs / markup comments) node-by-node, in document order, AS it
1629
- * reaches each node. On a live in-place root that leaves a window: from the
1630
- * moment the root is connected until the walk arrives at a given node, that
1631
- * node's linkage is live. A patch applied on connection/stream can fire as
1632
- * a microtask during the walk and inject or teleport an unsanitized DOM
1633
- * range into a region the iterator has already passed and will not revisit,
1634
- * so the post-return "tree is sanitized" contract is violated. Sweep the
1635
- * whole tree once up front and sever every linkage before the walk begins,
1636
- * closing that window.
1637
- *
1638
- * This CANNOT undo a patch that already fired before sanitize ran — that is
1639
- * the irreducible "do not IN_PLACE a live-connected attacker tree" caveat —
1640
- * but it closes everything from sanitize-start onward. Gated on SAFE_FOR_XML
1641
- * to group with the rest of the declarative-partial-updates handling and
1642
- * stay overridable, consistent with the codebase.
1643
- *
1644
- * Clobber-safe traversal (cached childNodes getter); per-node try/catch so a
1645
- * clobbered root cannot defeat the sweep of its non-clobbered descendants.
1646
- *
1647
- * NOTE (pending real-Chrome confirmation, see test/declarative-patch-probe
1648
- * .html Q1): this mirrors the existing policy of keeping `for` on
1649
- * <label>/<output>. If the shipping feature can drive a patch through a
1650
- * surviving `for`-on-label/output + `id` pair, this pre-pass and the
1651
- * attribute check at _isBasicCustomElement's caller must additionally drop
1652
- * that pair on the IN_PLACE path. Left as-is until the taxonomy is verified.
1653
- *
1654
- * @param root the in-place root to sweep
1655
- */
1656
- /**
1657
- * Central policy for declarative-partial-updates patch-linkage attributes,
1658
- * shared by the _neutralizePatchLinkage pre-pass and _isValidAttribute so
1659
- * the two sites cannot drift: `patchsrc` always links, `for` links
1660
- * everywhere except on <label>/<output>, and the whole policy is gated on
1661
- * SAFE_FOR_XML (see the rationale block in _isValidAttribute).
1662
- *
1663
- * @param lcName the transformCaseFunc'd attribute name
1664
- * @param lcTag the transformCaseFunc'd tag name of the carrying element
1665
- * @return true if the attribute is patch linkage and must be dropped
1666
- */
1667
- const _isPatchLinkageAttribute = function _isPatchLinkageAttribute(lcName, lcTag) {
1668
- if (!SAFE_FOR_XML) return false;
1669
- if (lcName === "patchsrc") return true;
1670
- return lcName === "for" && lcTag !== "label" && lcTag !== "output";
1671
- };
1672
- const _neutralizePatchLinkage = function _neutralizePatchLinkage(root) {
1673
- if (!SAFE_FOR_XML) return;
1674
- const stack = [root];
1675
- while (stack.length > 0) {
1676
- const node = stack.pop();
1677
- const nodeType = _readNodeType(node);
1678
- if (nodeType === NODE_TYPE.processingInstruction || nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, node.data)) {
1679
- try {
1680
- remove(node);
1681
- } catch (_) {}
1682
- continue;
1683
- }
1684
- if (nodeType === NODE_TYPE.element) {
1685
- const element = node;
1686
- const lcTag = transformCaseFunc(_readNodeName(node));
1687
- try {
1688
- if (element.hasAttribute && element.hasAttribute("patchsrc")) element.removeAttribute("patchsrc");
1689
- if (element.hasAttribute && element.hasAttribute("for") && _isPatchLinkageAttribute("for", lcTag)) element.removeAttribute("for");
1690
- } catch (_) {}
1691
- }
1692
- const childNodes = getChildNodes(node);
1693
- if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push(childNodes[i]);
1694
- }
1695
- };
1696
- /**
1697
- * _initDocument
1698
- *
1699
- * @param dirty - a string of dirty markup
1700
- * @return a DOM, filled with the dirty markup
1701
- */
1702
- const _initDocument = function _initDocument(dirty) {
1703
- let doc = null;
1704
- let leadingWhitespace = null;
1705
- if (FORCE_BODY) dirty = "<remove></remove>" + dirty;
1706
- else {
1707
- const matches = stringMatch(dirty, /^[\r\n\t ]+/);
1708
- leadingWhitespace = matches && matches[0];
1709
- }
1710
- if (PARSER_MEDIA_TYPE === "application/xhtml+xml" && NAMESPACE === HTML_NAMESPACE) dirty = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + dirty + "</body></html>";
1711
- const dirtyPayload = trustedTypesPolicy ? _createTrustedHTML(dirty) : dirty;
1712
- if (NAMESPACE === HTML_NAMESPACE) try {
1713
- doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);
1714
- } catch (_) {}
1715
- if (!doc || !doc.documentElement) {
1716
- doc = implementation.createDocument(NAMESPACE, "template", null);
1717
- try {
1718
- doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;
1719
- } catch (_) {}
1720
- }
1721
- const body = doc.body || doc.documentElement;
1722
- if (dirty && leadingWhitespace) body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);
1723
- if (NAMESPACE === HTML_NAMESPACE) return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? "html" : "body")[0];
1724
- return WHOLE_DOCUMENT ? doc.documentElement : body;
1725
- };
1726
- /**
1727
- * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.
1728
- *
1729
- * @param root The root element or node to start traversing on.
1730
- * @return The created NodeIterator
1731
- */
1732
- const _createNodeIterator = function _createNodeIterator(root) {
1733
- const doc = getOwnerDocument ? getOwnerDocument(root) : root.ownerDocument;
1734
- return createNodeIterator.call(doc || root, root, NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT | NodeFilter.SHOW_PROCESSING_INSTRUCTION | NodeFilter.SHOW_CDATA_SECTION, null);
1735
- };
1736
- /**
1737
- * Replace template expression syntax (mustache, ERB, template
1738
- * literal) with a space; shared by all SAFE_FOR_TEMPLATES scrub
1739
- * sites. Order matters: mustache, then ERB, then template literal.
1740
- *
1741
- * @param value the string to scrub
1742
- * @returns the scrubbed string
1743
- */
1744
- const _stripTemplateExpressions = function _stripTemplateExpressions(value) {
1745
- value = stringReplace(value, MUSTACHE_EXPR$1, " ");
1746
- value = stringReplace(value, ERB_EXPR$1, " ");
1747
- value = stringReplace(value, TMPLIT_EXPR$1, " ");
1748
- return value;
1749
- };
1750
- /**
1751
- * Strip template-engine expressions ({{...}}, ${...}, <%...%>) from the
1752
- * character data of an element subtree. Used as the final safety net for
1753
- * SAFE_FOR_TEMPLATES on every DOM-returning code path so that expressions
1754
- * which only form after text-node normalization (e.g. fragments split across
1755
- * stripped elements) cannot survive into a template-evaluating framework.
1756
- *
1757
- * Walks text/comment/CDATA/processing-instruction nodes and mutates `.data`
1758
- * in place rather than round-tripping through innerHTML. This preserves
1759
- * descendant node references (important for IN_PLACE callers), avoids a
1760
- * serialize/reparse cycle, and reads literal character data — which means
1761
- * `<%...%>` in text content matches the ERB regex against its real bytes
1762
- * instead of the HTML-entity-escaped form innerHTML would produce.
1763
- *
1764
- * Attribute values are not visited here; SAFE_FOR_TEMPLATES handling for
1765
- * attributes is performed during the per-node `_sanitizeAttributes` pass.
1766
- *
1767
- * @param node The root element whose character data should be scrubbed.
1768
- */
1769
- const _scrubTemplateExpressions2 = function _scrubTemplateExpressions(node) {
1770
- var _node$querySelectorAl;
1771
- node.normalize();
1772
- const doc = getOwnerDocument ? getOwnerDocument(node) : node.ownerDocument;
1773
- const walker = createNodeIterator.call(doc || node, node, NodeFilter.SHOW_TEXT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_PROCESSING_INSTRUCTION, null);
1774
- let currentNode = walker.nextNode();
1775
- while (currentNode) {
1776
- currentNode.data = _stripTemplateExpressions(currentNode.data);
1777
- currentNode = walker.nextNode();
1778
- }
1779
- const templates = (_node$querySelectorAl = node.querySelectorAll) === null || _node$querySelectorAl === void 0 ? void 0 : _node$querySelectorAl.call(node, "template");
1780
- if (templates) arrayForEach(templates, (tmpl) => {
1781
- if (_isDocumentFragment(tmpl.content)) _scrubTemplateExpressions2(tmpl.content);
1782
- });
1783
- };
1784
- /**
1785
- * _isClobbered
1786
- *
1787
- * Detect DOM-clobbering on HTMLFormElement nodes. Form is the only HTML
1788
- * interface with [LegacyOverrideBuiltIns]; a descendant element with a
1789
- * `name` attribute matching a prototype property shadows that property
1790
- * on direct reads. We use this check at the IN_PLACE entry-point and
1791
- * during attribute sanitization to refuse clobbered forms.
1792
- *
1793
- * @param element element to check for clobbering attacks
1794
- * @return true if clobbered, false if safe
1795
- */
1796
- const _isClobbered = function _isClobbered(element) {
1797
- const realTagName = getNodeName ? getNodeName(element) : null;
1798
- if (typeof realTagName !== "string") return false;
1799
- if (transformCaseFunc(realTagName) !== "form") return false;
1800
- return typeof element.nodeName !== "string" || typeof element.textContent !== "string" || typeof element.removeChild !== "function" || element.attributes !== getAttributes(element) || typeof element.removeAttribute !== "function" || typeof element.removeAttributeNode !== "function" || typeof element.getAttributeNode !== "function" || typeof element.setAttribute !== "function" || typeof element.namespaceURI !== "string" || typeof element.insertBefore !== "function" || typeof element.hasChildNodes !== "function" || element.nodeType !== getNodeType(element) || element.childNodes !== getChildNodes(element);
1801
- };
1802
- /**
1803
- * Checks whether the given value is a DocumentFragment from any realm.
1804
- *
1805
- * The realm-independent replacement reads `nodeType` through the cached
1806
- * Node.prototype getter and compares to the DOCUMENT_FRAGMENT_NODE
1807
- * constant (11). nodeType is a numeric value resolved from the node's
1808
- * internal slot, identical across realms for the same kind of node.
1809
- *
1810
- * @param value object to check
1811
- * @return true if value is a DocumentFragment-shaped node from any realm
1812
- */
1813
- const _isDocumentFragment = function _isDocumentFragment(value) {
1814
- if (!getNodeType || typeof value !== "object" || value === null) return false;
1815
- try {
1816
- return getNodeType(value) === NODE_TYPE.documentFragment;
1817
- } catch (_) {
1818
- return false;
1819
- }
1820
- };
1821
- /**
1822
- * Checks whether the given object is a DOM node, including nodes that
1823
- * originate from a different window/realm (e.g. an iframe's
1824
- * contentDocument). The previous `value instanceof Node` check was
1825
- * realm-bound: nodes from a different window failed it, causing
1826
- * sanitize() to silently stringify them and reset IN_PLACE to false,
1827
- * returning the original node unsanitized. See GHSA-4w3q-35jp-p934.
1828
- *
1829
- * @param value object to check whether it's a DOM node
1830
- * @return true if value is a DOM node from any realm
1831
- */
1832
- const _isNode = function _isNode(value) {
1833
- if (!getNodeType || typeof value !== "object" || value === null) return false;
1834
- try {
1835
- return typeof getNodeType(value) === "number";
1836
- } catch (_) {
1837
- return false;
1838
- }
1839
- };
1840
- function _executeHooks(hooks, currentNode, data) {
1841
- if (hooks.length === 0) return;
1842
- arrayForEach(hooks, (hook) => {
1843
- hook.call(DOMPurify, currentNode, data, CONFIG);
1844
- });
1845
- }
1846
- /**
1847
- * Structural-threat checks that condemn a node regardless of the
1848
- * allowlists: mXSS via namespace confusion, risky CSS construction,
1849
- * processing instructions, markup-bearing comments. Pure predicate;
1850
- * the caller removes. Check order is load-bearing.
1851
- *
1852
- * @param currentNode the node to inspect
1853
- * @param tagName the node's transformCaseFunc'd tag name
1854
- * @return true if the node must be removed
1855
- */
1856
- const _isUnsafeNode = function _isUnsafeNode(currentNode, tagName) {
1857
- if (SAFE_FOR_XML && currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.textContent) && regExpTest(ELEMENT_MARKUP_PROBE, currentNode.innerHTML)) return true;
1858
- if (SAFE_FOR_XML && currentNode.namespaceURI === HTML_NAMESPACE && LITERAL_TEXT_ELEMENTS[tagName] && (_isNode(currentNode.firstElementChild) || typeof currentNode.textContent === "string" && regExpTest(LITERAL_TEXT_CLOSE[tagName], currentNode.textContent))) return true;
1859
- if (currentNode.nodeType === NODE_TYPE.processingInstruction) return true;
1860
- if (SAFE_FOR_XML && currentNode.nodeType === NODE_TYPE.comment && regExpTest(COMMENT_MARKUP_PROBE, currentNode.data)) return true;
1861
- return false;
1862
- };
1863
- /**
1864
- * Evaluate a CUSTOM_ELEMENT_HANDLING check (a RegExp or a predicate
1865
- * function, per the validation in _parseConfig) against a name.
1866
- * Additional arguments are forwarded to predicate functions - the
1867
- * attributeNameCheck predicate receives the tag name as its second
1868
- * argument. A null/absent check never matches.
1869
- *
1870
- * @param check the configured tagNameCheck / attributeNameCheck value
1871
- * @param name the name to test
1872
- * @param args extra arguments forwarded to a predicate function
1873
- * @return true if the check matches the name
1874
- */
1875
- const _matchesNameCheck = function _matchesNameCheck(check, name) {
1876
- if (check instanceof RegExp) return regExpTest(check, name);
1877
- if (check instanceof Function) {
1878
- for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) args[_key - 2] = arguments[_key];
1879
- return Boolean(check(name, ...args));
1880
- }
1881
- return false;
1882
- };
1883
- /**
1884
- * Handle a node whose tag is forbidden or not allowlisted: keep
1885
- * allowed custom elements (false return exits _sanitizeElements
1886
- * early - the namespace and fallback-tag removal checks are
1887
- * intentionally skipped for kept custom elements), else hoist
1888
- * content per KEEP_CONTENT and remove.
1889
- *
1890
- * A kept custom element is the ONLY case in which this function
1891
- * returns false, so the caller uses that return value to run the
1892
- * afterSanitizeElements hook on the kept element and keep the
1893
- * element-hook lifecycle consistent with normal allowlisted
1894
- * elements (GHSA-c2j3-45gr-mqc4).
1895
- *
1896
- * @param currentNode the disallowed node
1897
- * @param tagName the node's transformCaseFunc'd tag name
1898
- * @return true if the node was removed, false if kept
1899
- */
1900
- const _sanitizeDisallowedNode = function _sanitizeDisallowedNode(currentNode, tagName, root) {
1901
- if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;
1902
- if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {
1903
- const parentNode = getParentNode(currentNode);
1904
- const childNodes = getChildNodes(currentNode);
1905
- if (childNodes && parentNode) {
1906
- const childCount = childNodes.length;
1907
- for (let i = childCount - 1; i >= 0; --i) {
1908
- const hoisted = currentNode === root ? cloneNode(childNodes[i], true) : childNodes[i];
1909
- parentNode.insertBefore(hoisted, getNextSibling(currentNode));
1910
- }
1911
- }
1912
- }
1913
- _forceRemove(currentNode);
1914
- return true;
1915
- };
1916
- /**
1917
- * Fork a hook-mutable allowlist off its shared binding the first time a
1918
- * (possibly lazily-installed) uponSanitize* hook is about to see it, so the
1919
- * hook cannot widen the per-instance default or the setConfig binding by
1920
- * reference and leak past the call. Returns the set unchanged once it is
1921
- * already call-local, so repeated calls across elements are idempotent.
1922
- *
1923
- * @param hookList the uponSanitize* hook array for this event
1924
- * @param set the current ALLOWED_TAGS / ALLOWED_ATTR binding
1925
- * @param defaultSet the per-instance DEFAULT_ALLOWED_* constant
1926
- * @param setConfigSet the captured setConfig() binding, or null
1927
- * @return a call-local clone if a hook is present and set is still shared,
1928
- * else set unchanged
1929
- */
1930
- const _forkSharedAllowlist = function _forkSharedAllowlist(hookList, set, defaultSet, setConfigSet) {
1931
- if (hookList.length === 0) return set;
1932
- return set === defaultSet || set === setConfigSet ? clone(set) : set;
1933
- };
1934
- /**
1935
- * Shared guard for a node that a hook has detached from the walk tree,
1936
- * used after each element-hook site in _sanitizeElements. Detaching is a
1937
- * long-standing user pattern (issue #469; draw.io-style foreignObject
1938
- * filtering). Per the cached, unclobberable parentNode getter the node is
1939
- * genuinely out of the tree, so it can reach neither the serialized
1940
- * output nor an IN_PLACE live tree; treat it as removed and stop
1941
- * processing it. Without this guard, the unsafe-node / namespace checks
1942
- * would call _forceRemove on a parentless node and hit the REPORT-3
1943
- * fail-closed throw — which exists for nodes DOMPurify wants gone but
1944
- * *cannot* detach (clobbered / parentless roots), the opposite of a node
1945
- * that is already safely gone. The walk root is exempt: a detached
1946
- * IN_PLACE root is legitimate input and must still be fully sanitized,
1947
- * and a kill-decision on it must keep hitting the REPORT-3 throw.
1948
- *
1949
- * Nodes detached by hooks stay the hook's responsibility for placement:
1950
- * they are not recorded in DOMPurify.removed, so the post-walk IN_PLACE
1951
- * pass (which iterates DOMPurify.removed) does not reach them. But a
1952
- * hook-detached subtree can still hold a queued resource-event handler -
1953
- * e.g. an <img onload> that began loading when the caller built the live
1954
- * tree - which fires in page scope after sanitize returns even though the
1955
- * handler never reached the returned tree. That is the audit-5 F1 hazard,
1956
- * and the documented node.remove() hook pattern walks straight into it.
1957
- * So on the IN_PLACE path we neutralize the detached subtree inline,
1958
- * stripping its non-allow-listed attributes before returning, exactly as
1959
- * the post-walk pass does for _forceRemove'd subtrees.
1960
- *
1961
- * @param currentNode the node a hook may have detached
1962
- * @param root the current walk root
1963
- * @return true if the node is detached and now handled, false otherwise
1964
- */
1965
- const _handleHookDetachedNode = function _handleHookDetachedNode(currentNode, root) {
1966
- if (currentNode === root || getParentNode(currentNode) !== null) return false;
1967
- if (IN_PLACE) _neutralizeSubtree(currentNode);
1968
- return true;
1969
- };
1970
- /**
1971
- * _sanitizeElements
1972
- *
1973
- * @protect nodeName
1974
- * @protect textContent
1975
- * @protect removeChild
1976
- * @param currentNode to check for permission to exist
1977
- * @return true if node was killed, false if left alive
1978
- */
1979
- const _sanitizeElements = function _sanitizeElements(currentNode, root) {
1980
- _executeHooks(hooks.beforeSanitizeElements, currentNode, null);
1981
- if (_handleHookDetachedNode(currentNode, root)) return true;
1982
- if (_isClobbered(currentNode)) {
1983
- _forceRemove(currentNode);
1984
- return true;
1985
- }
1986
- const tagName = transformCaseFunc(_readNodeName(currentNode));
1987
- ALLOWED_TAGS = _forkSharedAllowlist(hooks.uponSanitizeElement, ALLOWED_TAGS, DEFAULT_ALLOWED_TAGS, SET_CONFIG_ALLOWED_TAGS);
1988
- _executeHooks(hooks.uponSanitizeElement, currentNode, {
1989
- tagName,
1990
- allowedTags: ALLOWED_TAGS
1991
- });
1992
- if (_handleHookDetachedNode(currentNode, root)) return true;
1993
- if (_isUnsafeNode(currentNode, tagName)) {
1994
- _forceRemove(currentNode);
1995
- return true;
1996
- }
1997
- if (FORBID_TAGS[tagName] || !(EXTRA_ELEMENT_HANDLING.tagCheck instanceof Function && EXTRA_ELEMENT_HANDLING.tagCheck(tagName)) && !ALLOWED_TAGS[tagName]) {
1998
- const removed = _sanitizeDisallowedNode(currentNode, tagName, root);
1999
- if (removed === false) {
2000
- _executeHooks(hooks.afterSanitizeElements, currentNode, null);
2001
- if (_handleHookDetachedNode(currentNode, root)) return true;
2002
- }
2003
- return removed;
2004
- }
2005
- if (_readNodeType(currentNode) === NODE_TYPE.element && !_checkValidNamespace(currentNode)) {
2006
- _forceRemove(currentNode);
2007
- return true;
2008
- }
2009
- if ((tagName === "noscript" || tagName === "noembed" || tagName === "noframes") && regExpTest(FALLBACK_TAG_CLOSE, currentNode.innerHTML)) {
2010
- _forceRemove(currentNode);
2011
- return true;
2012
- }
2013
- if (SAFE_FOR_TEMPLATES && currentNode.nodeType === NODE_TYPE.text) {
2014
- const content = _stripTemplateExpressions(currentNode.textContent);
2015
- if (currentNode.textContent !== content) {
2016
- arrayPush(DOMPurify.removed, { element: currentNode.cloneNode() });
2017
- currentNode.textContent = content;
2018
- }
2019
- }
2020
- _executeHooks(hooks.afterSanitizeElements, currentNode, null);
2021
- return _handleHookDetachedNode(currentNode, root);
2022
- };
2023
- /**
2024
- * _isValidAttribute
2025
- *
2026
- * @param lcTag Lowercase tag name of containing element.
2027
- * @param lcName Lowercase attribute name.
2028
- * @param value Attribute value.
2029
- * @return Returns true if `value` is valid, otherwise false.
2030
- */
2031
- const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {
2032
- if (FORBID_ATTR[lcName]) return false;
2033
- if (_isPatchLinkageAttribute(lcName, lcTag)) return false;
2034
- if (SANITIZE_DOM && (lcName === "id" || lcName === "name") && (value in document || value in formElement)) return false;
2035
- const nameIsPermitted = ALLOWED_ATTR[lcName] || EXTRA_ELEMENT_HANDLING.attributeCheck instanceof Function && EXTRA_ELEMENT_HANDLING.attributeCheck(lcName, lcTag);
2036
- if (ALLOW_DATA_ATTR && regExpTest(DATA_ATTR$1, lcName)) return true;
2037
- if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) return true;
2038
- if (!nameIsPermitted) return _isBasicCustomElement(lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName, lcTag) || lcName === "is" && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && _matchesNameCheck(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value);
2039
- if (URI_SAFE_ATTRIBUTES[lcName]) return true;
2040
- if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
2041
- if ((lcName === "src" || lcName === "xlink:href" || lcName === "href") && lcTag !== "script" && stringIndexOf(value, "data:") === 0 && DATA_URI_TAGS[lcTag]) return true;
2042
- if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ""))) return true;
2043
- return !value;
2044
- };
2045
- const RESERVED_CUSTOM_ELEMENT_NAMES = addToSet({}, [
2046
- "annotation-xml",
2047
- "color-profile",
2048
- "font-face",
2049
- "font-face-format",
2050
- "font-face-name",
2051
- "font-face-src",
2052
- "font-face-uri",
2053
- "missing-glyph"
2054
- ]);
2055
- /**
2056
- * _isBasicCustomElement
2057
- * checks if at least one dash is included in tagName, and it's not the first char
2058
- * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name
2059
- *
2060
- * @param tagName name of the tag of the node to sanitize
2061
- * @returns Returns true if the tag name meets the basic criteria for a custom element, otherwise false.
2062
- */
2063
- const _isBasicCustomElement = function _isBasicCustomElement(tagName) {
2064
- return !RESERVED_CUSTOM_ELEMENT_NAMES[stringToLowerCase(tagName)] && regExpTest(CUSTOM_ELEMENT$1, tagName);
2065
- };
2066
- /**
2067
- * Wrap an attribute value in the matching Trusted Types object when
2068
- * the active policy requires it. Namespaced attributes pass through
2069
- * unchanged (no TT support yet, see
2070
- * https://bugs.chromium.org/p/chromium/issues/detail?id=1305293).
2071
- *
2072
- * @param lcTag lowercase tag name of the containing element
2073
- * @param lcName lowercase attribute name
2074
- * @param namespaceURI the attribute's namespace, if any
2075
- * @param value the attribute value to wrap
2076
- * @return the value, wrapped when Trusted Types demand it
2077
- */
2078
- const _applyTrustedTypesToAttribute = function _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value) {
2079
- if (trustedTypesPolicy && typeof trustedTypes === "object" && typeof trustedTypes.getAttributeType === "function" && !namespaceURI) switch (trustedTypes.getAttributeType(lcTag, lcName)) {
2080
- case "TrustedHTML": return _createTrustedHTML(value);
2081
- case "TrustedScriptURL": return _createTrustedScriptURL(value);
2082
- }
2083
- return value;
2084
- };
2085
- /**
2086
- * Write a modified attribute value back onto the element. On
2087
- * success, re-probe for clobbering introduced by the new value and
2088
- * remove the element when found; otherwise, when this writeback is the
2089
- * recreate half of the SANITIZE_NAMED_PROPS remove-and-recreate, pop the
2090
- * removal entry that path recorded so it does not show as removed. On
2091
- * failure, remove the attribute instead.
2092
- *
2093
- * Returns true only on a clean write (the value was set and the new value
2094
- * introduced no clobbering). The caller uses that, together with its own
2095
- * knowledge of whether this attribute pushed a DOMPurify.removed record, to
2096
- * decide whether to pop that record. The pop must happen ONLY for the
2097
- * named-prop remove-and-recreate; popping on any other value change (trim,
2098
- * template scrubbing, Trusted Types) would consume an unrelated _forceRemove
2099
- * subtree-cleanup record and let that detached subtree keep a live event
2100
- * handler through the IN_PLACE neutralization pass (SO-001).
2101
- *
2102
- * @param currentNode the element carrying the attribute
2103
- * @param name the attribute name as present on the element
2104
- * @param namespaceURI the attribute's namespace, if any
2105
- * @param value the new attribute value
2106
- * @return true if the value was written without introducing clobbering
2107
- */
2108
- const _setAttributeValue = function _setAttributeValue(currentNode, name, namespaceURI, value) {
2109
- try {
2110
- if (namespaceURI) currentNode.setAttributeNS(namespaceURI, name, value);
2111
- else currentNode.setAttribute(name, value);
2112
- if (_isClobbered(currentNode)) {
2113
- _forceRemove(currentNode);
2114
- return false;
2115
- }
2116
- return true;
2117
- } catch (_) {
2118
- _removeAttribute(name, currentNode);
2119
- return false;
2120
- }
2121
- };
2122
- /**
2123
- * _sanitizeAttributes
2124
- *
2125
- * @protect attributes
2126
- * @protect nodeName
2127
- * @protect removeAttribute
2128
- * @protect setAttribute
2129
- *
2130
- * @param currentNode to sanitize
2131
- * @param root the current walk root
2132
- */
2133
- const _sanitizeAttributes = function _sanitizeAttributes(currentNode, root) {
2134
- _executeHooks(hooks.beforeSanitizeAttributes, currentNode, null);
2135
- if (_handleHookDetachedNode(currentNode, root)) return;
2136
- const attributes = currentNode.attributes;
2137
- if (!attributes || _isClobbered(currentNode)) return;
2138
- ALLOWED_ATTR = _forkSharedAllowlist(hooks.uponSanitizeAttribute, ALLOWED_ATTR, DEFAULT_ALLOWED_ATTR, SET_CONFIG_ALLOWED_ATTR);
2139
- const hookEvent = {
2140
- attrName: "",
2141
- attrValue: "",
2142
- keepAttr: true,
2143
- allowedAttributes: ALLOWED_ATTR,
2144
- forceKeepAttr: void 0
2145
- };
2146
- let l = attributes.length;
2147
- const lcTag = transformCaseFunc(currentNode.nodeName);
2148
- while (l--) {
2149
- const attr = attributes[l];
2150
- const name = attr.name, namespaceURI = attr.namespaceURI, attrValue = attr.value;
2151
- const lcName = transformCaseFunc(name);
2152
- const initValue = attrValue;
2153
- let value = name === "value" ? initValue : stringTrim(initValue);
2154
- let recreatedNamedProp = false;
2155
- hookEvent.attrName = lcName;
2156
- hookEvent.attrValue = value;
2157
- hookEvent.keepAttr = true;
2158
- hookEvent.forceKeepAttr = void 0;
2159
- _executeHooks(hooks.uponSanitizeAttribute, currentNode, hookEvent);
2160
- value = hookEvent.attrValue;
2161
- if (SANITIZE_NAMED_PROPS && (lcName === "id" || lcName === "name") && stringIndexOf(value, SANITIZE_NAMED_PROPS_PREFIX) !== 0) {
2162
- _removeAttribute(name, currentNode, attr);
2163
- value = SANITIZE_NAMED_PROPS_PREFIX + value;
2164
- recreatedNamedProp = true;
2165
- }
2166
- if (SAFE_FOR_XML && regExpTest(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, value)) {
2167
- _removeAttribute(name, currentNode, attr);
2168
- continue;
2169
- }
2170
- if (lcName === "attributename" && stringMatch(value, "href")) {
2171
- _removeAttribute(name, currentNode, attr);
2172
- continue;
2173
- }
2174
- if (hookEvent.forceKeepAttr) continue;
2175
- if (!hookEvent.keepAttr) {
2176
- _removeAttribute(name, currentNode, attr);
2177
- continue;
2178
- }
2179
- if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(SELF_CLOSING_TAG, value)) {
2180
- _removeAttribute(name, currentNode, attr);
2181
- continue;
2182
- }
2183
- if (SAFE_FOR_TEMPLATES) value = _stripTemplateExpressions(value);
2184
- if (!_isValidAttribute(lcTag, lcName, value)) {
2185
- _removeAttribute(name, currentNode, attr);
2186
- continue;
2187
- }
2188
- value = _applyTrustedTypesToAttribute(lcTag, lcName, namespaceURI, value);
2189
- if (value !== initValue) {
2190
- if (_setAttributeValue(currentNode, name, namespaceURI, value) && recreatedNamedProp) arrayPop(DOMPurify.removed);
2191
- }
2192
- }
2193
- _executeHooks(hooks.afterSanitizeAttributes, currentNode, null);
2194
- _handleHookDetachedNode(currentNode, root);
2195
- };
2196
- /**
2197
- * _sanitizeShadowDOM
2198
- *
2199
- * @param fragment to iterate over recursively
2200
- */
2201
- const _sanitizeShadowDOM2 = function _sanitizeShadowDOM(fragment) {
2202
- let shadowNode = null;
2203
- const shadowIterator = _createNodeIterator(fragment);
2204
- _executeHooks(hooks.beforeSanitizeShadowDOM, fragment, null);
2205
- while (shadowNode = shadowIterator.nextNode()) {
2206
- _executeHooks(hooks.uponSanitizeShadowNode, shadowNode, null);
2207
- _sanitizeElements(shadowNode, fragment);
2208
- _sanitizeAttributes(shadowNode, fragment);
2209
- if (_isDocumentFragment(shadowNode.content)) _sanitizeShadowDOM2(shadowNode.content);
2210
- if (_readNodeType(shadowNode) === NODE_TYPE.element) {
2211
- const innerSr = getShadowRoot(shadowNode);
2212
- if (_isDocumentFragment(innerSr)) {
2213
- _sanitizeAttachedShadowRoots(innerSr);
2214
- _sanitizeShadowDOM2(innerSr);
2215
- }
2216
- }
2217
- }
2218
- _executeHooks(hooks.afterSanitizeShadowDOM, fragment, null);
2219
- };
2220
- /**
2221
- * _sanitizeAttachedShadowRoots
2222
- *
2223
- * Walks `root` and feeds every attached shadow root we encounter into
2224
- * the existing _sanitizeShadowDOM pipeline. The default node iterator
2225
- * does not descend into shadow trees, so nodes inside an attached
2226
- * shadow root would otherwise be skipped entirely.
2227
- *
2228
- * Two real input paths put attached shadow roots in front of us:
2229
- * 1. IN_PLACE on a DOM node that already has shadow roots attached.
2230
- * 2. DOM-node input where importNode(dirty, true) deep-clones the
2231
- * shadow root because it was created with `clonable: true`.
2232
- *
2233
- * This pass runs once, up front, so the main iteration loop (and the
2234
- * existing _sanitizeShadowDOM template-content recursion) stay
2235
- * untouched — string-input paths are not affected.
2236
- *
2237
- * @param root the subtree root to walk for attached shadow roots
2238
- */
2239
- const _sanitizeAttachedShadowRoots = function _sanitizeAttachedShadowRoots(root) {
2240
- const stack = [{
2241
- node: root,
2242
- shadow: null
2243
- }];
2244
- while (stack.length > 0) {
2245
- const item = stack.pop();
2246
- if (item.shadow) {
2247
- _sanitizeShadowDOM2(item.shadow);
2248
- continue;
2249
- }
2250
- const node = item.node;
2251
- const isElement = _readNodeType(node) === NODE_TYPE.element;
2252
- const childNodes = getChildNodes(node);
2253
- if (childNodes) for (let i = childNodes.length - 1; i >= 0; --i) stack.push({
2254
- node: childNodes[i],
2255
- shadow: null
2256
- });
2257
- if (isElement) {
2258
- const rootName = getNodeName ? getNodeName(node) : null;
2259
- if (typeof rootName === "string" && transformCaseFunc(rootName) === "template") {
2260
- const content = node.content;
2261
- if (_isDocumentFragment(content)) stack.push({
2262
- node: content,
2263
- shadow: null
2264
- });
2265
- }
2266
- }
2267
- if (isElement) {
2268
- const sr = getShadowRoot(node);
2269
- if (_isDocumentFragment(sr)) stack.push({
2270
- node: null,
2271
- shadow: sr
2272
- }, {
2273
- node: sr,
2274
- shadow: null
2275
- });
2276
- }
2277
- }
2278
- };
2279
- DOMPurify.sanitize = function(dirty) {
2280
- let cfg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
2281
- let body = null;
2282
- let importedNode = null;
2283
- let currentNode = null;
2284
- let returnNode = null;
2285
- IS_EMPTY_INPUT = !dirty;
2286
- if (IS_EMPTY_INPUT) dirty = "<!-->";
2287
- if (typeof dirty !== "string" && !_isNode(dirty)) {
2288
- dirty = stringifyValue(dirty);
2289
- if (typeof dirty !== "string") throw typeErrorCreate("dirty is not a string, aborting");
2290
- }
2291
- if (!DOMPurify.isSupported) return dirty;
2292
- if (SET_CONFIG) {
2293
- ALLOWED_TAGS = SET_CONFIG_ALLOWED_TAGS;
2294
- ALLOWED_ATTR = SET_CONFIG_ALLOWED_ATTR;
2295
- } else _parseConfig(cfg);
2296
- if (hooks.uponSanitizeElement.length > 0 || hooks.uponSanitizeAttribute.length > 0) ALLOWED_TAGS = clone(ALLOWED_TAGS);
2297
- if (hooks.uponSanitizeAttribute.length > 0) ALLOWED_ATTR = clone(ALLOWED_ATTR);
2298
- DOMPurify.removed = [];
2299
- const inPlace = IN_PLACE && typeof dirty !== "string" && _isNode(dirty);
2300
- if (inPlace) {
2301
- _neutralizePatchLinkage(dirty);
2302
- const nn = _readNodeName(dirty);
2303
- if (typeof nn === "string") {
2304
- const tagName = transformCaseFunc(nn);
2305
- if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {
2306
- _neutralizeRoot(dirty);
2307
- throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
2308
- }
2309
- }
2310
- if (_isClobbered(dirty)) {
2311
- _neutralizeRoot(dirty);
2312
- throw typeErrorCreate("root node is clobbered and cannot be sanitized in-place");
2313
- }
2314
- try {
2315
- _sanitizeAttachedShadowRoots(dirty);
2316
- } catch (error) {
2317
- _neutralizeRoot(dirty);
2318
- throw error;
2319
- }
2320
- } else if (_isNode(dirty)) {
2321
- body = _initDocument("<!---->");
2322
- importedNode = body.ownerDocument.importNode(dirty, true);
2323
- if (importedNode.nodeType === NODE_TYPE.element && importedNode.nodeName === "BODY") body = importedNode;
2324
- else if (importedNode.nodeName === "HTML") body = importedNode;
2325
- else body.appendChild(importedNode);
2326
- _sanitizeAttachedShadowRoots(body);
2327
- } else {
2328
- if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && dirty.indexOf("<") === -1) return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(dirty) : dirty;
2329
- body = _initDocument(dirty);
2330
- if (!body) return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : "";
2331
- }
2332
- if (body && FORCE_BODY) _forceRemove(body.firstChild);
2333
- const walkRoot = inPlace ? dirty : body;
2334
- try {
2335
- const nodeIterator = _createNodeIterator(walkRoot);
2336
- while (currentNode = nodeIterator.nextNode()) {
2337
- _sanitizeElements(currentNode, walkRoot);
2338
- _sanitizeAttributes(currentNode, walkRoot);
2339
- if (_isDocumentFragment(currentNode.content)) _sanitizeShadowDOM2(currentNode.content);
2340
- }
2341
- } catch (error) {
2342
- if (inPlace) {
2343
- _neutralizeRoot(dirty);
2344
- arrayForEach(DOMPurify.removed, (entry) => {
2345
- if (entry.element) _neutralizeSubtree(entry.element);
2346
- });
2347
- }
2348
- throw error;
2349
- }
2350
- if (inPlace) {
2351
- let rootWasRemoved = false;
2352
- arrayForEach(DOMPurify.removed, (entry) => {
2353
- if (entry.element) {
2354
- if (entry.element === dirty) rootWasRemoved = true;
2355
- _neutralizeSubtree(entry.element);
2356
- }
2357
- });
2358
- if (rootWasRemoved) throw typeErrorCreate("a node selected for removal could not be safely returned; refusing to sanitize in place");
2359
- if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(dirty);
2360
- return dirty;
2361
- }
2362
- if (RETURN_DOM) {
2363
- if (SAFE_FOR_TEMPLATES) _scrubTemplateExpressions2(body);
2364
- if (RETURN_DOM_FRAGMENT) {
2365
- returnNode = createDocumentFragment.call(body.ownerDocument);
2366
- while (body.firstChild) returnNode.appendChild(body.firstChild);
2367
- } else returnNode = body;
2368
- if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) returnNode = importNode.call(originalDocument, returnNode, true);
2369
- return returnNode;
2370
- }
2371
- let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;
2372
- if (WHOLE_DOCUMENT && ALLOWED_TAGS["!doctype"] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) serializedHTML = "<!DOCTYPE " + body.ownerDocument.doctype.name + ">\n" + serializedHTML;
2373
- if (SAFE_FOR_TEMPLATES) serializedHTML = _stripTemplateExpressions(serializedHTML);
2374
- return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? _createTrustedHTML(serializedHTML) : serializedHTML;
2375
- };
2376
- DOMPurify.setConfig = function() {
2377
- let cfg = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2378
- _parseConfig(cfg);
2379
- SET_CONFIG = true;
2380
- SET_CONFIG_ALLOWED_TAGS = ALLOWED_TAGS;
2381
- SET_CONFIG_ALLOWED_ATTR = ALLOWED_ATTR;
2382
- };
2383
- DOMPurify.clearConfig = function() {
2384
- CONFIG = null;
2385
- SET_CONFIG = false;
2386
- SET_CONFIG_ALLOWED_TAGS = null;
2387
- SET_CONFIG_ALLOWED_ATTR = null;
2388
- trustedTypesPolicy = defaultTrustedTypesPolicy;
2389
- emptyHTML = "";
2390
- };
2391
- DOMPurify.isValidAttribute = function(tag, attr, value) {
2392
- if (!CONFIG) _parseConfig({});
2393
- const lcTag = transformCaseFunc(tag);
2394
- const lcName = transformCaseFunc(attr);
2395
- return _isValidAttribute(lcTag, lcName, value);
2396
- };
2397
- DOMPurify.addHook = function(entryPoint, hookFunction) {
2398
- if (typeof hookFunction !== "function") return;
2399
- if (!objectHasOwnProperty(hooks, entryPoint)) return;
2400
- arrayPush(hooks[entryPoint], hookFunction);
2401
- };
2402
- DOMPurify.removeHook = function(entryPoint, hookFunction) {
2403
- if (!objectHasOwnProperty(hooks, entryPoint)) return;
2404
- if (hookFunction !== void 0) {
2405
- const index = arrayLastIndexOf(hooks[entryPoint], hookFunction);
2406
- return index === -1 ? void 0 : arraySplice(hooks[entryPoint], index, 1)[0];
2407
- }
2408
- return arrayPop(hooks[entryPoint]);
2409
- };
2410
- DOMPurify.removeHooks = function(entryPoint) {
2411
- if (!objectHasOwnProperty(hooks, entryPoint)) return;
2412
- hooks[entryPoint] = [];
2413
- };
2414
- DOMPurify.removeAllHooks = function() {
2415
- hooks = _createHooksMap();
2416
- };
2417
- return DOMPurify;
2418
- }
2419
- createDOMPurify();
2420
-
2421
- //#region src/lib/markdown.ts
2422
- /** A Lucide icon as markup, for the buttons and cards inside rendered HTML. */
2423
- function iconSvg(node, size, className) {
2424
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"${className ? ` class="${className}"` : ""}>${node.map(([tag, attrs]) => `<${tag} ${Object.entries(attrs).map(([name, value]) => `${name}="${value}"`).join(" ")}/>`).join("")}</svg>`;
2425
- }
2426
- var COPY_ICON = iconSvg(Copy, 14);
2427
- iconSvg(File, 20, "shrink-0 text-muted-foreground");
2428
- iconSvg(Download, 16, "shrink-0 text-muted-foreground");
2429
- iconSvg(Image, 20, "shrink-0");
2430
- var IMAGE_OFF_ICON = iconSvg(ImageOff, 16, "shrink-0 text-muted-foreground");
2431
- iconSvg(FileX, 16, "shrink-0 text-muted-foreground");
2432
- function escapeHtml(text) {
2433
- return text.replaceAll("&", "&amp;").replaceAll("<", "&lt;").replaceAll(">", "&gt;").replaceAll("\"", "&quot;");
2434
- }
2435
- var INLINE = "my-1 mr-1.5 inline-flex align-middle";
2436
- /** Something the reply links to that couldn't be copied. `label` is HTML. */
2437
- function problem(icon, label, reason, layout) {
2438
- return `<span data-media-problem class="${layout} max-w-full items-center gap-2 rounded-xl border border-dashed px-3 py-2 text-sm leading-snug">${icon}<span class="min-w-0"><span class="font-medium">${label}</span> <span class="text-muted-foreground">· ${escapeHtml(reason)}</span></span></span>`;
2439
- }
2440
- /** The interface's language, while renderMarkdown parses. */
2441
- function words() {
2442
- throw new Error("renderMarkdown sets the language before parsing");
2443
- }
2444
- new F({
2445
- gfm: true,
2446
- renderer: {
2447
- code({ text, lang }) {
2448
- const { m } = words();
2449
- return `<div data-code-block class="my-3 overflow-hidden rounded-2xl border bg-muted/50">
2450
- <div class="flex h-9 items-center justify-between pr-2 pl-4 text-xs text-muted-foreground"><span>${escapeHtml((lang ?? "").split(/\s/)[0]) || m.markdown.text}</span><button type="button" data-copy class="flex items-center gap-1.5 rounded-lg px-2 py-1 hover:bg-accent hover:text-foreground">${COPY_ICON}<span>${escapeHtml(m.common.copy)}</span></button></div>
2451
- <pre class="overflow-x-auto px-4 pb-4"><code>${escapeHtml(text)}</code></pre></div>`;
2452
- },
2453
- image({ href, text, tokens }) {
2454
- const alt = tokens ? this.parser.parseInline(tokens, this.parser.textRenderer) : text;
2455
- const { markdown } = words().m;
2456
- return problem(IMAGE_OFF_ICON, escapeHtml(alt || markdown.picture), markdown.notAvailable, INLINE);
2457
- },
2458
- link(token) {
2459
- return false;
2460
- }
2461
- }
2462
- });
2463
- /**
2464
- * Markdown to sanitized HTML. Only used in the browser; the server never renders messages.
2465
- * With `media`, pictures and file links show the copies made for the reply. `lang` is the
2466
- * interface's, for the copy buttons and file cards around the text; the text stays as it is.
2467
- */
2468
- function renderMarkdown(text, lang, media) {
2469
- return `<p>${escapeHtml(text)}</p>`;
2470
- }
2471
- //#endregion
2472
- //#region src/lib/components/chat/Markdown.svelte
2473
- function Markdown($$renderer, $$props) {
2474
- $$renderer.component(($$renderer) => {
2475
- /** For replies: where their pictures and files come from. */
2476
- let { text, media, class: className } = $$props;
2477
- getI18n();
2478
- const html$1 = derived(() => renderMarkdown(text));
2479
- $$renderer.push(`<div${attr_class(clsx(cn("markdown", className)))}>${html$2(html$1())}</div>`);
2480
- });
2481
- }
2482
- //#endregion
2483
- //#region src/lib/components/memory/MemoryChangeItem.svelte
2484
- function MemoryChangeItem($$renderer, $$props) {
2485
- $$renderer.component(($$renderer) => {
2486
- /**
2487
- * One thing the note-taker saved: the fact as it reads now (and before, for a change), the note
2488
- * it's in, and Undo, which puts the note back as it was. On a card only its owner undoes it,
2489
- * or keeps it only in the profile it came from (`profile`, its name; the page's own profile when
2490
- * not given). `note`: the note's link,
2491
- * as each place wants it. `after`: more on the same line as the note, like the chat it came
2492
- * from. `onundone`: after an undo, for places that don't get it live.
2493
- */
2494
- let { change, slug, profile, note, after, onundone } = $$props;
2495
- const { m } = getI18n();
2496
- const t = derived(() => m.memory.changes);
2497
- const mine = derived(() => !!change.card && change.card.ownerId === page.data.user?.id);
2498
- const from = derived(() => profile ?? page.data.profile?.name);
2499
- const title = derived(() => change.card ? mine() ? m.memory.cards.yours : m.memory.cards.title(change.card.owner) : memoryTitle(m, change.note));
2500
- let undoing = false;
2501
- let problem = null;
2502
- /** What went wrong with a request, in the reader's language. */
2503
- async function failed(res) {
2504
- const text = await res.text();
2505
- const reason = res.status === 409 ? JSON.parse(text).reason : void 0;
2506
- if (reason === "changed") return t().changedSince;
2507
- if (reason === "undone") return t().alreadyUndone;
2508
- if (reason === "owner" && change.card) return t().ownerOnly(change.card.owner);
2509
- if (reason) return reason;
2510
- return errorMessage(text, res.headers.get("content-type")) ?? m.errors.requestFailed(res.status);
2511
- }
2512
- async function send(url) {
2513
- undoing = true;
2514
- problem = null;
2515
- try {
2516
- const res = await fetch(url, { method: "POST" });
2517
- if (res.ok) {
2518
- onundone?.();
2519
- return;
2520
- }
2521
- problem = await failed(res);
2522
- } catch {
2523
- problem = m.errors.requestFailed(0);
2524
- } finally {
2525
- undoing = false;
2526
- }
2527
- }
2528
- $$renderer.push(`<li class="flex items-start gap-2"><span class="relative mt-0.5 flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground"${attr("title", change.op === "add" ? t().added : t().changed)}>`);
2529
- if (change.op === "add") {
2530
- $$renderer.push("<!--[0-->");
2531
- Plus($$renderer, { class: "size-3" });
2532
- } else {
2533
- $$renderer.push("<!--[-1-->");
2534
- Pencil($$renderer, { class: "size-3" });
2535
- }
2536
- $$renderer.push(`<!--]--> <span class="sr-only">${escape_html(change.op === "add" ? t().added : t().changed)}</span></span> <div class="min-w-0 flex-1 space-y-0.5"><p${attr_class(clsx(cn("break-words", change.undone && "text-muted-foreground line-through")))}>${escape_html(change.fact)}</p> `);
2537
- if (change.before !== null) $$renderer.push(`<!--[0--><p class="text-xs break-words text-muted-foreground">${escape_html(t().before(change.before))}</p>`);
2538
- else $$renderer.push("<!--[-1-->");
2539
- $$renderer.push(`<!--]--> <p class="flex flex-wrap items-center gap-x-1.5 text-xs text-muted-foreground">`);
2540
- note($$renderer, title());
2541
- $$renderer.push(`<!----> `);
2542
- if (after) {
2543
- $$renderer.push(`<!--[0--><span aria-hidden="true">·</span>`);
2544
- after($$renderer);
2545
- $$renderer.push(`<!---->`);
2546
- } else $$renderer.push("<!--[-1-->");
2547
- $$renderer.push(`<!--]--></p> `);
2548
- if (problem) $$renderer.push(`<!--[0--><p class="text-xs text-destructive" role="alert">${escape_html(problem)}</p>`);
2549
- else $$renderer.push("<!--[-1-->");
2550
- $$renderer.push(`<!--]--></div> `);
2551
- if (change.undone) $$renderer.push(`<!--[0--><span class="shrink-0 py-1 text-xs text-muted-foreground">${escape_html(change.undone.by ? t().undoneBy(change.undone.by) : t().undone)}</span>`);
2552
- else if (!change.card || mine()) {
2553
- $$renderer.push(`<!--[1--><div class="-my-1 flex shrink-0 items-center">`);
2554
- if (mine() && from()) {
2555
- $$renderer.push("<!--[0-->");
2556
- Button($$renderer, {
2557
- variant: "ghost",
2558
- size: "sm",
2559
- class: "h-7 px-2 text-xs text-muted-foreground",
2560
- title: t().keepHereHint(from()),
2561
- disabled: undoing,
2562
- onclick: () => send(`/api/card/changes/${change.id}/keep`),
2563
- children: ($$renderer) => {
2564
- $$renderer.push(`<!---->${escape_html(t().keepHere)}`);
2565
- },
2566
- $$slots: { default: true }
2567
- });
2568
- } else $$renderer.push("<!--[-1-->");
2569
- $$renderer.push(`<!--]--> `);
2570
- Button($$renderer, {
2571
- variant: "ghost",
2572
- size: "sm",
2573
- class: "h-7 px-2 text-xs text-muted-foreground",
2574
- disabled: undoing,
2575
- onclick: () => send(`/api/p/${slug}/memory/${change.id}/undo`),
2576
- children: ($$renderer) => {
2577
- $$renderer.push(`<!---->${escape_html(t().undo)}`);
2578
- },
2579
- $$slots: { default: true }
2580
- });
2581
- $$renderer.push(`<!----></div>`);
2582
- } else $$renderer.push("<!--[-1-->");
2583
- $$renderer.push(`<!--]--></li>`);
2584
- });
2585
- }
2586
-
2587
- export { MemoryChangeItem as M, Markdown as a };
2588
- //# sourceMappingURL=MemoryChangeItem.js-XSzCkKCr.js.map