@marimo-team/islands 0.25.3-dev27 → 0.25.3-dev271

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 (847) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DfG3PRaJ.js → ConnectedDataExplorerComponent-eLHPh6uu.js} +120 -116
  2. package/dist/{ErrorBoundary-DKAio_E4.js → ErrorBoundary-VLVnXoqP.js} +66 -71
  3. package/dist/_baseSet-BfI5FjBM.js +328 -0
  4. package/dist/{abnfDiagram-VCTEODGH-B3w-XWX8.js → abnfDiagram-VCTEODGH-hqd0IBtX.js} +2 -2
  5. package/dist/any-language-editor-DnG26QXh.js +75 -0
  6. package/dist/{architectureDiagram-5GKGNRK7-C18U9A6k.js → architectureDiagram-5GKGNRK7-BzLAFcc0.js} +1 -1
  7. package/dist/{arrays-CN1djC4k.js → arrays-DoQ-AILx.js} +15 -27
  8. package/dist/assertNever-DIU3JJbt.js +507 -0
  9. package/dist/assets/__vite-browser-external-BKBpimif.js +1 -0
  10. package/dist/assets/worker-CgoMtD-_.js +113 -0
  11. package/dist/{blockDiagram-I7D4REHJ-Cg25UrxT.js → blockDiagram-I7D4REHJ-Dkhe6_PP.js} +1 -1
  12. package/dist/{button-CvjkwdSk.js → button-0-RqY1DW.js} +229 -218
  13. package/dist/{capabilities-CQ5IjhzL.js → capabilities-B6yy_CBN.js} +2 -2
  14. package/dist/{chat-ui-DDJuqS87.js → chat-ui-BWIkve2R.js} +2071 -1780
  15. package/dist/{check-BMKBBrdc.js → check-gUSZbRsl.js} +1 -1
  16. package/dist/{chunk-IMKFNOWR-CrS5bzqW.js → chunk-IMKFNOWR-DOeVvuyE.js} +1 -1
  17. package/dist/{chunk-SHT3W25Y-StpvPvUG.js → chunk-SHT3W25Y-DZoFI8wR.js} +1 -1
  18. package/dist/{chunk-SVP7TREG-CBXjbYZC.js → chunk-SVP7TREG-CWu86PSW.js} +1 -1
  19. package/dist/{chunk-TICWLB2K-Dp6bIb-q.js → chunk-TICWLB2K-BrM0GoP3.js} +1 -1
  20. package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
  21. package/dist/{classDiagram-ZZMXUADV-BFYuxV5g.js → classDiagram-ZZMXUADV-DYi4V2bB.js} +2 -2
  22. package/dist/{classDiagram-v2-VYDZK3BY-D_tjXVMl.js → classDiagram-v2-VYDZK3BY-tN7FIk-m.js} +2 -2
  23. package/dist/{code-visibility-CFvLbCZJ.js → code-visibility-Dv4bHkOd.js} +43 -50
  24. package/dist/{common-1HUDUr7W.js → common-KrCVlCIg.js} +10277 -9719
  25. package/dist/config-BsPruWMR.js +636 -0
  26. package/dist/{copy-icon-BgUO8jsi.js → copy-icon-C2I8sw4h.js} +3 -3
  27. package/dist/createReducer-DdtT_7ji.js +67 -0
  28. package/dist/{cynefinDiagram-5FMLGOSQ-DSgYrHB2.js → cynefinDiagram-5FMLGOSQ-D5nCnDc-.js} +1 -1
  29. package/dist/{dagre-GXQ25YYZ-GYlruCBf.js → dagre-GXQ25YYZ-BHkd7f_i.js} +3 -3
  30. package/dist/{dagre-BGSfXNEb.js → dagre-mqiMAsFY.js} +531 -680
  31. package/dist/{data-grid-overlay-editor-ZxoN8gVB.js → data-grid-overlay-editor-BnCDQaMh.js} +5 -5
  32. package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
  33. package/dist/{debounce-C3jyATpc.js → debounce-DrhhziJv.js} +2 -2
  34. package/dist/{diagram-S7CK7UJ4-DRu5LX5_.js → diagram-S7CK7UJ4-D1ALppT2.js} +1 -1
  35. package/dist/{diagram-UQ7AKVKN-DD7uiejP.js → diagram-UQ7AKVKN-DLv0b83L.js} +1 -1
  36. package/dist/{diagram-VX7I27RA-ByH9KAJJ.js → diagram-VX7I27RA-7XJ7J6qg.js} +1 -1
  37. package/dist/{diagram-Z3DM3KII-BsQHPRke.js → diagram-Z3DM3KII-7M7zbHp_.js} +1 -1
  38. package/dist/{dialog-Cc479ZEH.js → dialog-DzCj1qQv.js} +26 -26
  39. package/dist/{dist-Bvs24R_E.js → dist-11T5wq3_.js} +31 -30
  40. package/dist/{dist-F8Ep36rk.js → dist-17ugwGZc.js} +59 -58
  41. package/dist/{dist-BMQf5zIS.js → dist-7cRjf--y.js} +123 -122
  42. package/dist/{dist-diIx5qJW.js → dist-B8pkfkzc.js} +31 -30
  43. package/dist/{dist-CN_BeG2I.js → dist-B9UoM_wq.js} +58 -57
  44. package/dist/{dist-CLdpGQVr.js → dist-BGuMTs1i.js} +118 -117
  45. package/dist/{dist-BK4Oj99o.js → dist-BHW11fni.js} +18 -17
  46. package/dist/dist-BLY4m1Wi.js +850 -0
  47. package/dist/{dist-PXYI_yuP.js → dist-BNlcVoxs.js} +24 -23
  48. package/dist/{dist-D6d86eNJ.js → dist-BQYe5Bju.js} +47 -46
  49. package/dist/{dist-CkTTIdBe.js → dist-BX1mn8na.js} +337 -337
  50. package/dist/{dist-DiDibOYr.js → dist-Bh0PTKUW.js} +151 -150
  51. package/dist/{dist-CSJ0MDRw.js → dist-CKaXK92p.js} +56 -55
  52. package/dist/{dist-C8fAKSH1.js → dist-CLhwfhpJ.js} +53 -52
  53. package/dist/{dist-DoE4XJBC.js → dist-CYeqK4Xw.js} +9801 -10649
  54. package/dist/{dist-BLfKmR-l.js → dist-Cxlp3WH6.js} +16 -15
  55. package/dist/{dist-D-wwqlzJ.js → dist-DSJPGj42.js} +158 -157
  56. package/dist/{dist-BorMD-uX.js → dist-DU9ICsWZ.js} +75 -74
  57. package/dist/{dist-DBtSl3sf.js → dist-DWv0ALBi.js} +47 -46
  58. package/dist/{dist-OR1OnN-y.js → dist-DiBpWEsB.js} +31 -30
  59. package/dist/{dist-CrSP_H1M.js → dist-DiLFTlnl.js} +242 -242
  60. package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
  61. package/dist/{dist-CN8zI-XC.js → dist-X9CsotJl.js} +239 -239
  62. package/dist/{dist-CSbh1PNP.js → dist-cVDV5IuI.js} +23 -22
  63. package/dist/{dist-BuaRHxOc.js → dist-fRfaOoq8.js} +44 -43
  64. package/dist/{dist-Cg7gzw-a.js → dist-gTTI-9Px.js} +78 -77
  65. package/dist/dropdown-menu-CdXE15an.js +6089 -0
  66. package/dist/{ebnfDiagram-PWID7BFC-CQRK5_eT.js → ebnfDiagram-PWID7BFC-DHH1qlmV.js} +2 -2
  67. package/dist/{erDiagram-RLTQ6QDP-BKtWrDVh.js → erDiagram-RLTQ6QDP-fI_0dGef.js} +1 -1
  68. package/dist/{error-banner-CFPHFw4h.js → error-banner-DPc9eIw5.js} +87 -86
  69. package/dist/error-entries-CxN-Nq3V.js +2573 -0
  70. package/dist/{esm-AMFssoNp.js → esm-BDqqT86j.js} +329 -329
  71. package/dist/{esm-D2gTsXEV.js → esm-BgKjMvWw.js} +530 -529
  72. package/dist/feedback-button-7UVo7ro6.js +374 -0
  73. package/dist/{flowDiagram-HODETNUW-1IN-ih2E.js → flowDiagram-HODETNUW-Brg9MA6i.js} +2 -2
  74. package/dist/{formats-Buu00Z2q.js → formats-DbSvAPY-.js} +6 -6
  75. package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
  76. package/dist/{glide-data-editor-BBgCAPbk.js → glide-data-editor-DTtBwgEa.js} +6676 -2890
  77. package/dist/{glide-utils-DM9zBO4W.js → glide-utils-BSw3SSHF.js} +84 -45
  78. package/dist/{globals-DhH_o2tF.js → globals-CedpcDTN.js} +3 -3
  79. package/dist/{graphlib-BmY_CCV9.js → graphlib-nlwT3Wvy.js} +177 -220
  80. package/dist/hasIn-C20JsQ2m.js +28 -0
  81. package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
  82. package/dist/{error-entries-Cz3yNs7w.js → html-to-image-Bc2AvXHG.js} +26695 -26850
  83. package/dist/{infoDiagram-27XIBGKW-CkB-zr4p.js → infoDiagram-27XIBGKW-E9e403YT.js} +1 -1
  84. package/dist/isArrayLikeObject-B-HXCsex.js +626 -0
  85. package/dist/isEmpty-CdX7MTE1.js +14 -0
  86. package/dist/{ishikawaDiagram-5VMMS53U-wlyLjBmM.js → ishikawaDiagram-5VMMS53U-C-RlYDRo.js} +1 -1
  87. package/dist/{kanban-definition-UXKFOSKX-C2usY0i-.js → kanban-definition-UXKFOSKX-CLFl_uqK.js} +1 -1
  88. package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
  89. package/dist/{loader-BQOfjTIJ.js → loader-BVEtQ4F3.js} +12 -12
  90. package/dist/main.js +10420 -8311
  91. package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
  92. package/dist/{mermaid-BA-Z6wGL.js → mermaid-rd09e1JL.js} +54 -54
  93. package/dist/{mindmap-definition-YA3MSWOX-nKOWS8RR.js → mindmap-definition-YA3MSWOX-BQ8TWtyB.js} +1 -1
  94. package/dist/{now-jM8-M7IR.js → now-BKZCLE5P.js} +12 -13
  95. package/dist/{number-overlay-editor-CvLhxHLb.js → number-overlay-editor-D_avDRZT.js} +3 -3
  96. package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
  97. package/dist/{once-BtE-wKRL.js → once-NnpX_HnX.js} +1 -1
  98. package/dist/{pegDiagram-XKGWAZYB-Dac9EIKD.js → pegDiagram-XKGWAZYB-CN8UHFPi.js} +2 -2
  99. package/dist/pencil-DcT8AE0h.js +10 -0
  100. package/dist/pick-tCszMUbm.js +35 -0
  101. package/dist/{pieDiagram-E7YTZNPT-B7S-DsW_.js → pieDiagram-E7YTZNPT-DGuJ0EBd.js} +1 -1
  102. package/dist/precisionRound-DhAzeRcm.js +49 -0
  103. package/dist/{process-output-B-KBO95p.js → process-output-qecD7Dk8.js} +4 -4
  104. package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
  105. package/dist/{railroadDiagram-O6MQD6OU-Cfa5Q-hr.js → railroadDiagram-O6MQD6OU-BPDA8wy8.js} +2 -2
  106. package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
  107. package/dist/{requirementDiagram-BXWQKSXE-d8zXCJIk.js → requirementDiagram-BXWQKSXE-ChzLGbGW.js} +1 -1
  108. package/dist/{reveal-component-C9BavSsS.js → reveal-component-cJ717FaI.js} +1131 -1108
  109. package/dist/schemas-CdscWNy_.js +4747 -0
  110. package/dist/select-OxgozOC8.js +1200 -0
  111. package/dist/{sequenceDiagram-WJ2MYXX4-b6pei3lJ.js → sequenceDiagram-WJ2MYXX4-DFX-bE6O.js} +1 -1
  112. package/dist/{spec-BJzgmvVa.js → spec-oJn0RhpQ.js} +41 -11
  113. package/dist/{stateDiagram-D77RDMKH-Be-xSpaZ.js → stateDiagram-D77RDMKH-BR7cI3wK.js} +4 -4
  114. package/dist/{stateDiagram-v2-MP3YSRHH-5Y-FxesJ.js → stateDiagram-v2-MP3YSRHH-oGqB5UDI.js} +2 -2
  115. package/dist/static-state-CuV6Pc3a.js +72 -0
  116. package/dist/style.css +1 -1
  117. package/dist/{swimlanes-42K2YHIH-nRRl4NU0.js → swimlanes-42K2YHIH-DwSZl1yC.js} +1 -1
  118. package/dist/{swimlanesDiagram-VR7AAH4N-BS79510V.js → swimlanesDiagram-VR7AAH4N-BHlcd-Ri.js} +2 -2
  119. package/dist/{swiper-component-DKntyn8p.js → swiper-component-Dvj-goaD.js} +2 -2
  120. package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
  121. package/dist/{timeline-definition-24CTP7MA-Cfzf8WPf.js → timeline-definition-24CTP7MA-DMmP-G2O.js} +1 -1
  122. package/dist/toast-DbBHmxmB.js +491 -0
  123. package/dist/{tooltip-CtBZ5q8p.js → tooltip-BfcDQd2j.js} +329 -305
  124. package/dist/use-restore-focus-CmflVLWJ.js +1672 -0
  125. package/dist/{useAsyncData-BD534XmW.js → useAsyncData-BYIAoMqn.js} +15 -14
  126. package/dist/{useDateFormatter-DkajGwwd.js → useDateFormatter-ButWkdcK.js} +2 -2
  127. package/dist/{useDeepCompareMemoize-C72_RNsu.js → useDeepCompareMemoize-Bz0c5GN6.js} +1 -1
  128. package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-BIolGsF1.js} +1 -1
  129. package/dist/useLifecycle-JjxCC7Vu.js +112 -0
  130. package/dist/useTheme-DPLobSFs.js +339 -0
  131. package/dist/utils-EBklsC5R.js +813 -0
  132. package/dist/{vega-component-nB1kV6sb.js → vega-component-rxIxAAh9.js} +171 -170
  133. package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
  134. package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
  135. package/dist/{vennDiagram-4TSXK5OY-CeY6Z1xZ.js → vennDiagram-4TSXK5OY-Db8GtH1G.js} +1 -1
  136. package/dist/{wardleyDiagram-VM6X3IG4-Cxs9NtVi.js → wardleyDiagram-VM6X3IG4-DmIiC3FU.js} +1 -1
  137. package/dist/{xychartDiagram-S5SC5T6Z-DNWbvPK7.js → xychartDiagram-S5SC5T6Z-DS9OPrNq.js} +2 -2
  138. package/package.json +17 -20
  139. package/src/__mocks__/document.tsx +63 -0
  140. package/src/__mocks__/executions.ts +195 -0
  141. package/src/__mocks__/notebook.ts +3 -5
  142. package/src/__mocks__/partial.ts +26 -0
  143. package/src/__mocks__/requests.ts +1 -4
  144. package/src/__tests__/CellStatus.test.tsx +19 -20
  145. package/src/__tests__/fixtures/pair-config.ts +1 -1
  146. package/src/__tests__/main.test.tsx +24 -1
  147. package/src/__tests__/module-entry.test.ts +44 -0
  148. package/src/__tests__/mount.test.ts +1 -21
  149. package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
  150. package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
  151. package/src/components/ai/ai-model-dropdown.tsx +11 -6
  152. package/src/components/app-config/__tests__/state.test.tsx +50 -0
  153. package/src/components/app-config/ai-config.tsx +156 -150
  154. package/src/components/app-config/app-config-button.tsx +6 -5
  155. package/src/components/app-config/app-config-form.tsx +5 -9
  156. package/src/components/app-config/common.tsx +7 -9
  157. package/src/components/app-config/data-form.tsx +112 -113
  158. package/src/components/app-config/mcp-config.tsx +30 -53
  159. package/src/components/app-config/user-config-form.css +91 -0
  160. package/src/components/app-config/user-config-form.tsx +266 -349
  161. package/src/components/chat/__tests__/capabilities-popover.test.tsx +0 -1
  162. package/src/components/chat/__tests__/chat-display.test.tsx +196 -0
  163. package/src/components/chat/__tests__/chat-markdown.test.tsx +43 -0
  164. package/src/components/chat/__tests__/chat-utils.test.ts +93 -1
  165. package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
  166. package/src/components/chat/__tests__/notebook-access-selector.test.tsx +64 -0
  167. package/src/components/chat/__tests__/turn-timing.test.ts +84 -0
  168. package/src/components/chat/__tests__/use-assistant-turn.test.ts +95 -0
  169. package/src/components/chat/__tests__/user-message.test.tsx +27 -0
  170. package/src/components/chat/acp/__tests__/agent-panel-initialization.test.tsx +1 -1
  171. package/src/components/chat/acp/__tests__/agent-panel.test.tsx +22 -17
  172. package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
  173. package/src/components/chat/acp/__tests__/state.test.ts +2 -2
  174. package/src/components/chat/acp/agent-panel.tsx +6 -3
  175. package/src/components/chat/acp/blocks.tsx +13 -12
  176. package/src/components/chat/acp/common.tsx +4 -5
  177. package/src/components/chat/acp/model-selector.tsx +1 -1
  178. package/src/components/chat/acp/session-tabs.tsx +8 -3
  179. package/src/components/chat/agent-activity.tsx +132 -0
  180. package/src/components/chat/capabilities-popover.tsx +2 -11
  181. package/src/components/chat/chat-components.tsx +9 -4
  182. package/src/components/chat/chat-display.tsx +131 -57
  183. package/src/components/chat/chat-history-popover.tsx +6 -1
  184. package/src/components/chat/chat-markdown.tsx +15 -0
  185. package/src/components/chat/chat-panel.tsx +216 -294
  186. package/src/components/chat/chat-typography.css +108 -0
  187. package/src/components/chat/chat-utils.ts +24 -35
  188. package/src/components/chat/notebook-access-selector.stories.tsx +22 -0
  189. package/src/components/chat/notebook-access-selector.tsx +100 -0
  190. package/src/components/chat/tool-call/__tests__/tool-labels.test.ts +76 -0
  191. package/src/components/chat/tool-call/__tests__/tool-step.test.tsx +57 -0
  192. package/src/components/chat/tool-call/shared.ts +6 -0
  193. package/src/components/chat/tool-call/tool-call-view.tsx +22 -76
  194. package/src/components/chat/tool-call/tool-labels.ts +172 -0
  195. package/src/components/chat/tool-call/tool-result.tsx +1 -1
  196. package/src/components/chat/tool-call/tool-step.tsx +145 -0
  197. package/src/components/chat/turn-timing.ts +73 -0
  198. package/src/components/chat/use-assistant-turn.ts +65 -0
  199. package/src/components/chat/use-chat-generation.ts +20 -0
  200. package/src/components/chat/user-message.tsx +145 -0
  201. package/src/components/data-table/TableBottomBar.tsx +4 -1
  202. package/src/components/data-table/TableTopBar.tsx +2 -0
  203. package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
  204. package/src/components/data-table/__tests__/column-explorer.test.tsx +27 -1
  205. package/src/components/data-table/__tests__/columns.test.tsx +105 -0
  206. package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
  207. package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
  208. package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
  209. package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
  210. package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
  211. package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
  212. package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
  213. package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
  214. package/src/components/data-table/cell-selection/feature.ts +2 -2
  215. package/src/components/data-table/cell-selection/types.ts +2 -2
  216. package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
  217. package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
  218. package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
  219. package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
  220. package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
  221. package/src/components/data-table/charts/charts.tsx +40 -30
  222. package/src/components/data-table/charts/storage.ts +16 -5
  223. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
  224. package/src/components/data-table/column-formatting/types.ts +1 -2
  225. package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
  226. package/src/components/data-table/column-summary/column-summary.tsx +2 -4
  227. package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
  228. package/src/components/data-table/columns.tsx +45 -46
  229. package/src/components/data-table/context-menu.tsx +36 -20
  230. package/src/components/data-table/data-table.tsx +17 -1
  231. package/src/components/data-table/date-popover.tsx +6 -4
  232. package/src/components/data-table/export-actions.tsx +76 -48
  233. package/src/components/data-table/pagination.tsx +44 -33
  234. package/src/components/data-table/range-focus/atoms.ts +4 -6
  235. package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
  236. package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
  237. package/src/components/data-table/renderers.tsx +16 -7
  238. package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
  239. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
  240. package/src/components/data-table/search-highlight.tsx +79 -0
  241. package/src/components/data-table/types.ts +1 -0
  242. package/src/components/data-table/url-detector.tsx +49 -9
  243. package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
  244. package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
  245. package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
  246. package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
  247. package/src/components/datasources/__tests__/utils.test.ts +57 -6
  248. package/src/components/datasources/column-preview.tsx +17 -12
  249. package/src/components/datasources/datasources.tsx +56 -43
  250. package/src/components/datasources/utils.ts +32 -23
  251. package/src/components/debugger/debugger-code.tsx +5 -0
  252. package/src/components/dependency-graph/custom-node.tsx +1 -1
  253. package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
  254. package/src/components/dependency-graph/elements.ts +24 -21
  255. package/src/components/dependency-graph/minimap-content.tsx +15 -20
  256. package/src/components/dependency-graph/panels.tsx +4 -2
  257. package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
  258. package/src/components/editor/SortableCell.tsx +1 -3
  259. package/src/components/editor/__tests__/Output.test.tsx +50 -32
  260. package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
  261. package/src/components/editor/__tests__/data-attributes.test.tsx +28 -21
  262. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
  263. package/src/components/editor/__tests__/output-persistence.test.tsx +8 -4
  264. package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
  265. package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
  266. package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +21 -40
  267. package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +41 -14
  268. package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +6 -24
  269. package/src/components/editor/actions/__tests__/useCellActionButton.test.tsx +131 -0
  270. package/src/components/editor/actions/name-cell-input.tsx +4 -3
  271. package/src/components/editor/actions/pair-with-agent-commands.ts +10 -7
  272. package/src/components/editor/actions/pair-with-agent-modal.tsx +29 -30
  273. package/src/components/editor/actions/pair-with-agent.tsx +16 -39
  274. package/src/components/editor/actions/useCellActionButton.tsx +47 -35
  275. package/src/components/editor/actions/useConfigActions.tsx +3 -4
  276. package/src/components/editor/actions/useNotebookActions.tsx +25 -29
  277. package/src/components/editor/actions/useRestartKernel.tsx +1 -1
  278. package/src/components/editor/actions/useSetCodeVisibility.ts +11 -12
  279. package/src/components/editor/actions/useSetOutputsExpanded.ts +14 -19
  280. package/src/components/editor/ai/ai-completion-editor.tsx +2 -1
  281. package/src/components/editor/ai/completion-handlers.tsx +0 -37
  282. package/src/components/editor/ai/prompt-input.tsx +189 -0
  283. package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +1 -1
  284. package/src/components/editor/alerts/connection-notice.tsx +1 -1
  285. package/src/components/editor/alerts/startup-logs-alert.tsx +1 -0
  286. package/src/components/editor/alerts/stdin-blocking-alert.tsx +4 -2
  287. package/src/components/editor/app-container.tsx +1 -1
  288. package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +1 -1
  289. package/src/components/editor/cell/CellStatus.tsx +23 -19
  290. package/src/components/editor/cell/CreateCellButton.tsx +15 -21
  291. package/src/components/editor/cell/DeleteButton.tsx +3 -2
  292. package/src/components/editor/cell/RunButton.tsx +18 -8
  293. package/src/components/editor/cell/StagedAICell.tsx +52 -137
  294. package/src/components/editor/cell/StopButton.tsx +2 -2
  295. package/src/components/editor/cell/__tests__/useRunCells.test.ts +45 -0
  296. package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
  297. package/src/components/editor/cell/cell-actions.tsx +12 -1
  298. package/src/components/editor/cell/cell-context-menu.tsx +4 -1
  299. package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
  300. package/src/components/editor/cell/code/cell-editor.tsx +65 -169
  301. package/src/components/editor/cell/code/language-toggle.tsx +8 -7
  302. package/src/components/editor/cell/collapse.tsx +15 -4
  303. package/src/components/editor/cell/useAddCell.ts +4 -8
  304. package/src/components/editor/cell/useDeleteCell.tsx +10 -36
  305. package/src/components/editor/cell/useRunCells.ts +20 -8
  306. package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
  307. package/src/components/editor/cell/useSplitCell.tsx +10 -6
  308. package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
  309. package/src/components/editor/chrome/components/feedback-button.tsx +2 -8
  310. package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +31 -2
  311. package/src/components/editor/chrome/panels/__tests__/runtime-details.test.tsx +1 -1
  312. package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +1 -1
  313. package/src/components/editor/chrome/panels/cache-panel.tsx +1 -0
  314. package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +1 -1
  315. package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
  316. package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
  317. package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
  318. package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
  319. package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
  320. package/src/components/editor/chrome/panels/panel-header.tsx +13 -0
  321. package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
  322. package/src/components/editor/chrome/panels/session-panel.tsx +1 -1
  323. package/src/components/editor/chrome/panels/snippets-panel.tsx +10 -12
  324. package/src/components/editor/chrome/panels/variable-panel.tsx +1 -5
  325. package/src/components/editor/chrome/types.ts +1 -1
  326. package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +7 -9
  327. package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
  328. package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +265 -37
  329. package/src/components/editor/chrome/wrapper/__tests__/useAskAiAboutCell.test.tsx +58 -0
  330. package/src/components/editor/chrome/wrapper/app-chrome.tsx +91 -74
  331. package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +4 -4
  332. package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
  333. package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
  334. package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
  335. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
  336. package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
  337. package/src/components/editor/chrome/wrapper/footer.tsx +2 -2
  338. package/src/components/editor/chrome/wrapper/minimap-state.ts +1 -1
  339. package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +143 -72
  340. package/src/components/editor/chrome/wrapper/pending-ai-changes-badge.tsx +25 -0
  341. package/src/components/editor/chrome/wrapper/sidebar.tsx +8 -4
  342. package/src/components/editor/chrome/wrapper/storage.ts +1 -1
  343. package/src/components/editor/chrome/wrapper/useAskAiAboutCell.ts +36 -0
  344. package/src/components/editor/columns/__tests__/cell-column.test.tsx +1 -1
  345. package/src/components/editor/columns/cell-column.tsx +1 -1
  346. package/src/components/editor/columns/sortable-column.tsx +2 -2
  347. package/src/components/editor/connections/components.tsx +5 -10
  348. package/src/components/editor/controls/Controls.tsx +4 -4
  349. package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
  350. package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
  351. package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +10 -4
  352. package/src/components/editor/controls/command-palette.tsx +22 -10
  353. package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
  354. package/src/components/editor/documentation.css +34 -11
  355. package/src/components/editor/dynamic-favicon.tsx +21 -40
  356. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +25 -20
  357. package/src/components/editor/errors/auto-fix.tsx +4 -8
  358. package/src/components/editor/errors/send-error-report-button.tsx +3 -6
  359. package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
  360. package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
  361. package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
  362. package/src/components/editor/file-tree/file-explorer.tsx +48 -15
  363. package/src/components/editor/file-tree/file-name-input.tsx +1 -0
  364. package/src/components/editor/file-tree/file-viewer.tsx +4 -2
  365. package/src/components/editor/file-tree/use-file-search.ts +35 -21
  366. package/src/components/editor/header/__tests__/filename-form.test.tsx +1 -4
  367. package/src/components/editor/header/__tests__/status.test.tsx +5 -3
  368. package/src/components/editor/header/app-header.tsx +1 -1
  369. package/src/components/editor/header/filename-form.tsx +1 -1
  370. package/src/components/editor/header/status.tsx +44 -22
  371. package/src/components/editor/links/__tests__/cell-link.test.tsx +148 -0
  372. package/src/components/editor/links/cell-link-list.tsx +1 -1
  373. package/src/components/editor/links/cell-link.tsx +21 -11
  374. package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
  375. package/src/components/editor/navigation/__tests__/navigation.test.ts +108 -85
  376. package/src/components/editor/navigation/__tests__/selection.test.ts +43 -21
  377. package/src/components/editor/navigation/clipboard.ts +17 -14
  378. package/src/components/editor/navigation/focus-utils.ts +23 -4
  379. package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +17 -33
  380. package/src/components/editor/navigation/navigation.ts +74 -72
  381. package/src/components/editor/navigation/selection.ts +30 -29
  382. package/src/components/editor/notebook-banner.tsx +1 -0
  383. package/src/components/editor/notebook-cell.tsx +114 -126
  384. package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
  385. package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
  386. package/src/components/editor/output/Outputs.css +8 -0
  387. package/src/components/editor/output/VideoOutput.tsx +6 -0
  388. package/src/components/editor/output/__tests__/VideoOutput.test.tsx +131 -0
  389. package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
  390. package/src/components/editor/output/ansi-reduce.ts +33 -20
  391. package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
  392. package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
  393. package/src/components/editor/package-alert.tsx +14 -7
  394. package/src/components/editor/renderers/__tests__/add-cell-buttons.test.tsx +18 -0
  395. package/src/components/editor/renderers/cell-array.tsx +32 -100
  396. package/src/components/editor/renderers/grid-layout/__tests__/grid-layout.test.tsx +75 -0
  397. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +34 -22
  398. package/src/components/editor/renderers/slides-layout/__tests__/plugin.test.ts +0 -2
  399. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +1 -1
  400. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +4 -4
  401. package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -1
  402. package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +1 -1
  403. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +13 -34
  404. package/src/components/editor/stdin-blocking-alert.tsx +4 -2
  405. package/src/components/home/components.tsx +17 -31
  406. package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
  407. package/src/components/icons/large-spinner.tsx +3 -14
  408. package/src/components/icons/spinner.tsx +1 -1
  409. package/src/components/markdown/markdown-renderer.tsx +39 -28
  410. package/src/components/mcp/mcp-status-indicator.tsx +18 -14
  411. package/src/components/pages/__tests__/home-page.test.tsx +116 -0
  412. package/src/components/pages/edit-page.tsx +19 -17
  413. package/src/components/pages/home-page.tsx +164 -91
  414. package/src/components/scratchpad/scratchpad.test.tsx +89 -0
  415. package/src/components/scratchpad/scratchpad.tsx +47 -33
  416. package/src/components/scratchpad/state.ts +7 -0
  417. package/src/components/slides/__tests__/minimap-actions.test.tsx +22 -29
  418. package/src/components/slides/__tests__/minimap.test.ts +38 -19
  419. package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +37 -0
  420. package/src/components/slides/minimap.tsx +21 -14
  421. package/src/components/slides/reveal-component.tsx +72 -36
  422. package/src/components/slides/reveal-slides.css +5 -4
  423. package/src/components/slides/slide-cell-view.tsx +32 -29
  424. package/src/components/slides/slide-form.tsx +1 -0
  425. package/src/components/slides/slide-scroll-hint.tsx +3 -1
  426. package/src/components/slides/slide.tsx +3 -4
  427. package/src/components/sort/SortableCellsProvider.tsx +8 -25
  428. package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
  429. package/src/components/tracing/tracing.tsx +46 -42
  430. package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
  431. package/src/components/ui/__tests__/fullscreen.test.tsx +44 -2
  432. package/src/components/ui/__tests__/range-slider.test.tsx +165 -0
  433. package/src/components/ui/alert-dialog.tsx +1 -1
  434. package/src/components/ui/draggable-popover.tsx +24 -2
  435. package/src/components/ui/fullscreen.tsx +25 -1
  436. package/src/components/ui/range-slider.tsx +22 -9
  437. package/src/components/ui/toast.tsx +1 -1
  438. package/src/core/MarimoApp.tsx +3 -1
  439. package/src/core/ai/__tests__/staged-cells.test.ts +89 -608
  440. package/src/core/ai/context/context.ts +2 -0
  441. package/src/core/ai/context/providers/__tests__/cell-output.test.ts +8 -12
  442. package/src/core/ai/context/providers/__tests__/cell.test.ts +49 -0
  443. package/src/core/ai/context/providers/cell-output.ts +2 -2
  444. package/src/core/ai/context/providers/cell.ts +54 -0
  445. package/src/core/ai/context/providers/datasource.ts +6 -2
  446. package/src/core/ai/staged-cells.ts +56 -323
  447. package/src/core/ai/state.ts +3 -0
  448. package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +40 -88
  449. package/src/core/ai/tools/__tests__/registry.test.ts +17 -0
  450. package/src/core/ai/tools/base.ts +18 -15
  451. package/src/core/ai/tools/edit-notebook-tool.ts +86 -80
  452. package/src/core/ai/tools/registry.ts +13 -10
  453. package/src/core/ai/tools/sample-tool.ts +6 -7
  454. package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -426
  455. package/src/core/cells/__tests__/actions.test.ts +624 -35
  456. package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
  457. package/src/core/cells/__tests__/arrange.test.ts +432 -0
  458. package/src/core/cells/__tests__/cell.test.ts +85 -151
  459. package/src/core/cells/__tests__/cells.test.ts +269 -2667
  460. package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
  461. package/src/core/cells/__tests__/document.test.ts +164 -0
  462. package/src/core/cells/__tests__/editor.test.ts +57 -0
  463. package/src/core/cells/__tests__/flush-document.test.ts +40 -0
  464. package/src/core/cells/__tests__/harness.ts +106 -0
  465. package/src/core/cells/__tests__/layout.test.ts +177 -0
  466. package/src/core/cells/__tests__/notebook-outline.test.ts +122 -0
  467. package/src/core/cells/__tests__/outputs.test.tsx +71 -53
  468. package/src/core/cells/__tests__/pending-delete-service.test.tsx +11 -20
  469. package/src/core/cells/__tests__/session.test.ts +445 -211
  470. package/src/core/cells/__tests__/utils.test.ts +76 -347
  471. package/src/core/cells/actions.ts +678 -6
  472. package/src/core/cells/add-missing-import.ts +47 -43
  473. package/src/core/cells/arrange.ts +529 -0
  474. package/src/core/cells/cell.ts +45 -136
  475. package/src/core/cells/cells.ts +133 -1385
  476. package/src/core/cells/columns.ts +38 -0
  477. package/src/core/cells/document.ts +178 -0
  478. package/src/core/cells/edit.ts +30 -0
  479. package/src/core/cells/editor.ts +82 -0
  480. package/src/core/cells/focus.ts +27 -6
  481. package/src/core/cells/layout.ts +221 -0
  482. package/src/core/cells/outputs.ts +12 -28
  483. package/src/core/cells/pending-delete-service.ts +8 -14
  484. package/src/core/cells/scrollCellIntoView.ts +6 -0
  485. package/src/core/cells/session.ts +76 -53
  486. package/src/core/cells/types.ts +34 -41
  487. package/src/core/cells/utils.ts +46 -75
  488. package/src/core/codemirror/__tests__/format.test.ts +0 -34
  489. package/src/core/codemirror/__tests__/setup.test.ts +61 -29
  490. package/src/core/codemirror/ai/__tests__/resources.test.ts +117 -0
  491. package/src/core/codemirror/ai/resources.ts +1 -1
  492. package/src/core/codemirror/cells/__tests__/extensions.test.ts +2 -6
  493. package/src/core/codemirror/cells/extensions.ts +30 -28
  494. package/src/core/codemirror/cells/state.ts +2 -6
  495. package/src/core/codemirror/cm.ts +5 -1
  496. package/src/core/codemirror/config/types.ts +1 -1
  497. package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +6 -7
  498. package/src/core/codemirror/copilot/getCodes.ts +2 -2
  499. package/src/core/codemirror/format.ts +6 -23
  500. package/src/core/codemirror/keymaps/vim.ts +4 -8
  501. package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
  502. package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
  503. package/src/core/codemirror/language/cell-code.ts +114 -0
  504. package/src/core/codemirror/language/extension.ts +52 -35
  505. package/src/core/codemirror/language/languages/markdown.ts +8 -6
  506. package/src/core/codemirror/language/languages/python.ts +19 -13
  507. package/src/core/codemirror/language/languages/sql/sql.ts +16 -24
  508. package/src/core/codemirror/language/panel/panel.tsx +1 -0
  509. package/src/core/codemirror/language/types.ts +7 -7
  510. package/src/core/codemirror/language/utils.ts +9 -39
  511. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -2
  512. package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
  513. package/src/core/codemirror/lsp/utils.ts +1 -1
  514. package/src/core/codemirror/misc/__tests__/paste.test.ts +3 -1
  515. package/src/core/codemirror/misc/paste.ts +1 -1
  516. package/src/core/codemirror/placeholder/__tests__/extensions.test.ts +75 -0
  517. package/src/core/codemirror/placeholder/extensions.ts +80 -19
  518. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  519. package/src/core/codemirror/readonly/extension.ts +2 -2
  520. package/src/core/codemirror/utils.ts +1 -0
  521. package/src/core/config/__tests__/app-config.test.ts +64 -0
  522. package/src/core/config/__tests__/config-schema.test.ts +56 -6
  523. package/src/core/config/config-schema.ts +17 -4
  524. package/src/core/config/config.ts +65 -20
  525. package/src/core/config/feature-flag.tsx +0 -2
  526. package/src/core/datasets/__tests__/data-source-discovery.test.ts +5 -5
  527. package/src/core/datasets/data-source-discovery.ts +4 -6
  528. package/src/core/documentation/doc-lookup.ts +1 -1
  529. package/src/core/edit-app.tsx +22 -28
  530. package/src/core/errors/error-entries.ts +4 -1
  531. package/src/core/executions/__tests__/atoms.test.ts +99 -0
  532. package/src/core/executions/__tests__/select.test.ts +268 -0
  533. package/src/core/executions/atoms.ts +206 -0
  534. package/src/core/executions/hooks.ts +31 -0
  535. package/src/core/executions/index.ts +31 -0
  536. package/src/core/executions/select.ts +175 -0
  537. package/src/core/export/__tests__/hooks.test.ts +0 -5
  538. package/src/core/export/hooks.ts +1 -1
  539. package/src/core/export/layout.ts +2 -2
  540. package/src/core/hotkeys/actions.ts +2 -4
  541. package/src/core/hotkeys/hotkeys.ts +2 -1
  542. package/src/core/islands/__tests__/bootstrap.test.ts +69 -17
  543. package/src/core/islands/__tests__/bridge.test.ts +85 -27
  544. package/src/core/islands/bootstrap.ts +50 -54
  545. package/src/core/islands/bridge.ts +84 -25
  546. package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
  547. package/src/core/islands/components/output-wrapper.tsx +5 -5
  548. package/src/core/islands/components/web-components.tsx +1 -1
  549. package/src/core/islands/worker/__tests__/controller.test.ts +62 -4
  550. package/src/core/islands/worker/controller.ts +4 -10
  551. package/src/core/islands/worker/worker.tsx +33 -33
  552. package/src/core/kernel/__tests__/RuntimeState.test.ts +1 -1
  553. package/src/core/kernel/__tests__/handlers.test.ts +7 -153
  554. package/src/core/kernel/handlers.ts +17 -79
  555. package/src/core/kernel/state.ts +0 -15
  556. package/src/core/lifecycle/render-policy.ts +12 -26
  557. package/src/core/meta/__tests__/code-visibility.test.tsx +78 -70
  558. package/src/core/meta/code-visibility.ts +18 -9
  559. package/src/core/network/__tests__/connection.test.ts +1 -1
  560. package/src/core/network/__tests__/requests-lazy.test.ts +6 -8
  561. package/src/core/network/connection-notice.ts +1 -1
  562. package/src/core/network/connection.ts +1 -1
  563. package/src/core/network/requests-lazy.ts +5 -8
  564. package/src/core/network/requests-network.ts +5 -31
  565. package/src/core/network/requests-static.ts +1 -4
  566. package/src/core/network/requests-toasting.tsx +1 -4
  567. package/src/core/network/types.ts +6 -14
  568. package/src/core/network/useConnectionNotice.ts +8 -2
  569. package/src/core/notebook/__tests__/operations.test.ts +51 -0
  570. package/src/core/notebook/attachments.ts +38 -0
  571. package/src/core/notebook/document/__tests__/codemirror.test.ts +759 -0
  572. package/src/core/notebook/document/__tests__/draft.test.ts +363 -0
  573. package/src/core/notebook/document/__tests__/fixtures.ts +92 -0
  574. package/src/core/notebook/document/__tests__/hooks.test.tsx +391 -0
  575. package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +61 -0
  576. package/src/core/notebook/document/__tests__/model.test.ts +247 -0
  577. package/src/core/notebook/document/__tests__/protocol-fixtures.ts +38 -0
  578. package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +230 -0
  579. package/src/core/notebook/document/__tests__/scenario-fixture.ts +43 -0
  580. package/src/core/notebook/document/__tests__/scenarios.test.ts +205 -0
  581. package/src/core/notebook/document/__tests__/state.test.ts +459 -0
  582. package/src/core/notebook/document/__tests__/submission.test.ts +203 -0
  583. package/src/core/notebook/document/__tests__/test-host.test.ts +92 -0
  584. package/src/core/notebook/document/__tests__/test-host.ts +247 -0
  585. package/src/core/notebook/document/__tests__/test-notebook.ts +149 -0
  586. package/src/core/notebook/document/__tests__/user.ts +61 -0
  587. package/src/core/notebook/document/codemirror.ts +216 -0
  588. package/src/core/notebook/document/draft.ts +502 -0
  589. package/src/core/notebook/document/hooks.tsx +118 -0
  590. package/src/core/notebook/document/index.ts +24 -0
  591. package/src/core/notebook/document/model.ts +102 -0
  592. package/src/core/notebook/document/select.ts +41 -0
  593. package/src/core/notebook/document/state.ts +378 -0
  594. package/src/core/notebook/document/sync.ts +369 -0
  595. package/src/core/notebook/index.ts +19 -0
  596. package/src/core/notebook/operations.ts +30 -0
  597. package/src/core/notebook/replica/AGENTS.md +11 -0
  598. package/src/core/{host → notebook/replica}/__tests__/attachments.test.ts +9 -10
  599. package/src/core/{host → notebook/replica}/__tests__/document.test.ts +18 -16
  600. package/src/core/notebook/replica/__tests__/executions.test.ts +200 -0
  601. package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
  602. package/src/core/notebook/replica/__tests__/replica.test.ts +559 -0
  603. package/src/core/notebook/replica/__tests__/results.test.ts +193 -0
  604. package/src/core/notebook/replica/__tests__/runtime.test.ts +78 -0
  605. package/src/core/notebook/replica/backend.ts +19 -0
  606. package/src/core/notebook/replica/connection.ts +42 -0
  607. package/src/core/notebook/replica/index.ts +20 -0
  608. package/src/core/notebook/replica/replica.ts +336 -0
  609. package/src/core/{host → notebook/replica}/resources/attachments.ts +6 -3
  610. package/src/core/{host → notebook/replica}/resources/document.ts +3 -3
  611. package/src/core/notebook/replica/resources/executions.ts +157 -0
  612. package/src/core/notebook/replica/resources/results.ts +48 -0
  613. package/src/core/notebook/replica/resources/runtime.ts +14 -0
  614. package/src/core/packages/__tests__/useSandboxController.test.tsx +1 -1
  615. package/src/core/packages/useSandboxController.ts +1 -1
  616. package/src/core/run-app.tsx +49 -51
  617. package/src/core/runtime/__tests__/adapter.test.ts +4 -4
  618. package/src/core/runtime/__tests__/createWsUrl.test.ts +77 -7
  619. package/src/core/runtime/__tests__/runtime.test.ts +32 -74
  620. package/src/core/runtime/adapter.ts +5 -5
  621. package/src/core/runtime/config.ts +2 -2
  622. package/src/core/runtime/runtime.ts +33 -46
  623. package/src/core/runtime/types.ts +0 -2
  624. package/src/core/saving/__tests__/document.test.tsx +123 -0
  625. package/src/core/saving/__tests__/state.test.ts +111 -0
  626. package/src/core/saving/__tests__/useAutoSave.test.tsx +67 -0
  627. package/src/core/saving/document.ts +33 -0
  628. package/src/core/saving/filename.ts +1 -1
  629. package/src/core/saving/save-component.tsx +39 -60
  630. package/src/core/saving/state.ts +38 -39
  631. package/src/core/saving/useAutoSave.ts +17 -53
  632. package/src/core/session/__tests__/backend.test.ts +236 -0
  633. package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +186 -0
  634. package/src/core/{websocket → session}/__tests__/useNotebookSession.hook.test.tsx +247 -262
  635. package/src/core/session/active-notebook.ts +28 -0
  636. package/src/core/session/backend.ts +123 -0
  637. package/src/core/session/embedded.ts +7 -0
  638. package/src/core/{websocket → session}/types.ts +2 -2
  639. package/src/core/session/useNotebookReplica.ts +74 -0
  640. package/src/core/{websocket → session}/useNotebookSession.tsx +85 -67
  641. package/src/core/state/__tests__/jotai.test.tsx +108 -0
  642. package/src/core/state/jotai.ts +1 -1
  643. package/src/core/static/__tests__/files.test.ts +38 -10
  644. package/src/core/static/files.ts +2 -0
  645. package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
  646. package/src/core/transports/__tests__/server.test.ts +408 -0
  647. package/src/core/transports/__tests__/static.test.ts +306 -0
  648. package/src/core/transports/__tests__/wasm.test.ts +166 -0
  649. package/src/core/{websocket → transports}/connection-state.ts +9 -16
  650. package/src/core/transports/server.ts +152 -0
  651. package/src/core/transports/static.ts +166 -0
  652. package/src/core/transports/wasm.ts +97 -0
  653. package/src/core/vscode/__tests__/vscode-bindings.test.ts +125 -0
  654. package/src/core/vscode/vscode-bindings.ts +14 -2
  655. package/src/core/wasm/__tests__/bridge.test.ts +210 -64
  656. package/src/core/wasm/__tests__/worker.test.ts +188 -0
  657. package/src/core/wasm/bridge.ts +120 -73
  658. package/src/core/wasm/rpc.ts +15 -3
  659. package/src/core/wasm/store.ts +3 -3
  660. package/src/core/wasm/worker/bootstrap.ts +55 -51
  661. package/src/core/wasm/worker/getMarimoWheel.ts +1 -1
  662. package/src/core/wasm/worker/save-worker.ts +9 -10
  663. package/src/core/wasm/worker/types.ts +30 -18
  664. package/src/core/wasm/worker/worker.ts +118 -72
  665. package/src/css/app/Cell.css +7 -36
  666. package/src/css/app/codemirror.css +1 -1
  667. package/src/css/common.css +1 -1
  668. package/src/css/globals.css +66 -22
  669. package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
  670. package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
  671. package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
  672. package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
  673. package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
  674. package/src/hooks/__tests__/useScript.test.tsx +77 -0
  675. package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
  676. package/src/hooks/useAsyncData.ts +3 -3
  677. package/src/hooks/useDataSourceDiscovery.ts +6 -4
  678. package/src/hooks/useDebounce.ts +6 -10
  679. package/src/hooks/useDeepCompareMemoize.ts +1 -1
  680. package/src/hooks/useDelayElapsed.ts +14 -10
  681. package/src/hooks/useElapsedTime.ts +3 -3
  682. package/src/hooks/useEventListener.ts +1 -2
  683. package/src/hooks/useInputHistory.ts +4 -7
  684. package/src/hooks/useInternalStateWithSync.ts +6 -6
  685. package/src/hooks/useResizeObserver.ts +4 -7
  686. package/src/hooks/useScript.ts +67 -70
  687. package/src/hooks/useStateForKey.ts +93 -0
  688. package/src/mount.tsx +20 -15
  689. package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
  690. package/src/plugins/core/RenderHTML.tsx +3 -5
  691. package/src/plugins/core/__test__/RenderHTML-copy.test.tsx +60 -0
  692. package/src/plugins/core/registerReactComponent.tsx +5 -14
  693. package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
  694. package/src/plugins/impl/DataEditorPlugin.tsx +34 -9
  695. package/src/plugins/impl/DataTablePlugin.tsx +69 -37
  696. package/src/plugins/impl/DropdownPlugin.tsx +2 -6
  697. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
  698. package/src/plugins/impl/FormPlugin.tsx +1 -1
  699. package/src/plugins/impl/RangeSliderPlugin.tsx +16 -2
  700. package/src/plugins/impl/RefreshPlugin.tsx +1 -0
  701. package/src/plugins/impl/SliderPlugin.tsx +6 -8
  702. package/src/plugins/impl/__tests__/DataEditorPlugin.test.ts +93 -4
  703. package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
  704. package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
  705. package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
  706. package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
  707. package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
  708. package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
  709. package/src/plugins/impl/anywidget/model.ts +3 -1
  710. package/src/plugins/impl/anywidget/registry.ts +18 -14
  711. package/src/plugins/impl/anywidget/runtime.ts +21 -9
  712. package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
  713. package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
  714. package/src/plugins/impl/chat/chat-ui.tsx +17 -15
  715. package/src/plugins/impl/code/any-language-editor.tsx +2 -2
  716. package/src/plugins/impl/common/error-banner.tsx +5 -3
  717. package/src/plugins/impl/data-editor/__tests__/column-types.test.ts +37 -0
  718. package/src/plugins/impl/data-editor/__tests__/editor-state.test.ts +52 -1
  719. package/src/plugins/impl/data-editor/__tests__/glide-data-editor.test.tsx +113 -1
  720. package/src/plugins/impl/data-editor/__tests__/glide-utils.test.ts +116 -0
  721. package/src/plugins/impl/data-editor/column-types.ts +52 -0
  722. package/src/plugins/impl/data-editor/editor-state.ts +18 -2
  723. package/src/plugins/impl/data-editor/glide-data-editor.tsx +73 -12
  724. package/src/plugins/impl/data-editor/glide-utils.ts +33 -10
  725. package/src/plugins/impl/data-editor/types.ts +7 -0
  726. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
  727. package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
  728. package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
  729. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
  730. package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
  731. package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
  732. package/src/plugins/impl/data-frames/panel.tsx +44 -16
  733. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
  734. package/src/plugins/impl/panel/PanelPlugin.tsx +16 -17
  735. package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
  736. package/src/plugins/impl/panel/utils.ts +17 -0
  737. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
  738. package/src/plugins/impl/plotly/selection.ts +25 -19
  739. package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
  740. package/src/plugins/impl/vega/make-selectable.ts +4 -7
  741. package/src/plugins/layout/DownloadPlugin.tsx +7 -11
  742. package/src/plugins/layout/RoutesPlugin.tsx +1 -1
  743. package/src/plugins/layout/__test__/DownloadPlugin.test.tsx +205 -0
  744. package/src/stories/__tests__/editor-story.test.tsx +33 -0
  745. package/src/stories/button.stories.tsx +1 -0
  746. package/src/stories/cell-status.stories.tsx +17 -10
  747. package/src/stories/cell.stories.tsx +2 -36
  748. package/src/stories/data-table.stories.tsx +31 -0
  749. package/src/stories/editor.stories.tsx +24 -17
  750. package/src/stories/form-wrapper.stories.tsx +2 -2
  751. package/src/stories/layout/vertical/one-column.stories.tsx +28 -32
  752. package/src/stories/runtime-story.tsx +23 -17
  753. package/src/stories/select.stories.tsx +2 -2
  754. package/src/stories/switchable-multi-select.stories.tsx +1 -1
  755. package/src/utils/__tests__/arrays.test.ts +35 -0
  756. package/src/utils/__tests__/batch-requests.test.ts +3 -3
  757. package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +127 -1
  758. package/src/utils/__tests__/download.test.tsx +183 -23
  759. package/src/utils/__tests__/numbers.test.ts +105 -1
  760. package/src/utils/__tests__/objects.test.ts +21 -0
  761. package/src/utils/arrays.ts +11 -2
  762. package/src/utils/blob.ts +1 -1
  763. package/src/utils/createReducer.ts +115 -79
  764. package/src/utils/download.ts +67 -6
  765. package/src/utils/maps.ts +0 -3
  766. package/src/utils/numbers.ts +79 -18
  767. package/src/utils/objects.ts +4 -9
  768. package/src/utils/time.ts +10 -0
  769. package/src/utils/tracer.ts +9 -5
  770. package/src/utils/zod-utils.ts +1 -3
  771. package/dist/_baseMerge-BiGRwuqv.js +0 -165
  772. package/dist/any-language-editor-D4q-IFcM.js +0 -76
  773. package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
  774. package/dist/assets/worker-HPY9fbhz.js +0 -114
  775. package/dist/dropdown-menu-DHP9P4VE.js +0 -4678
  776. package/dist/feedback-button-B2JRVQRd.js +0 -379
  777. package/dist/hasIn-o2Us0uVx.js +0 -132
  778. package/dist/html-to-image-DWTzN7q3.js +0 -3251
  779. package/dist/isArrayLikeObject-BZl-15ir.js +0 -450
  780. package/dist/isEmpty-BSZ1LaUo.js +0 -35
  781. package/dist/isSymbol-kQcfYbNX.js +0 -8
  782. package/dist/label-DoysmLMW.js +0 -281
  783. package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
  784. package/dist/pick-CJeoxYOS.js +0 -51
  785. package/dist/precisionRound-DMIVQrt2.js +0 -97
  786. package/dist/select-DemoKT4G.js +0 -1344
  787. package/dist/toDate-CJWU9dyl.js +0 -1185
  788. package/dist/toast-PkdZraM8.js +0 -1830
  789. package/dist/use-restore-focus-CKjfFjLM.js +0 -6369
  790. package/dist/useLifecycle-BGWzTwHK.js +0 -169
  791. package/dist/useTheme-BhQvec43.js +0 -904
  792. package/src/components/chat/reasoning-accordion.tsx +0 -61
  793. package/src/components/chat/tool-call/tool-error-card.tsx +0 -81
  794. package/src/components/chat/tool-call/tool-history-row.tsx +0 -174
  795. package/src/components/editor/ai/__tests__/staged-cell-submission.test.ts +0 -106
  796. package/src/components/editor/ai/add-cell-with-ai.tsx +0 -506
  797. package/src/components/editor/ai/staged-cell-submission.ts +0 -46
  798. package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +0 -64
  799. package/src/components/editor/cell/code/__tests__/rtc-editor-config.test.ts +0 -50
  800. package/src/components/editor/chrome/wrapper/footer-items/rtc-status.tsx +0 -65
  801. package/src/components/editor/navigation/__tests__/state.test.ts +0 -81
  802. package/src/components/editor/navigation/state.ts +0 -65
  803. package/src/components/icons/loading-ellipsis.tsx +0 -46
  804. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +0 -656
  805. package/src/core/ai/tools/run-cells-tool.ts +0 -303
  806. package/src/core/attachments/state.ts +0 -18
  807. package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
  808. package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
  809. package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
  810. package/src/core/cells/document-changes.ts +0 -944
  811. package/src/core/codemirror/rtc/extension.ts +0 -453
  812. package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +0 -52
  813. package/src/core/codemirror/rtc/loro/awareness.ts +0 -531
  814. package/src/core/codemirror/rtc/loro/colors.ts +0 -38
  815. package/src/core/codemirror/rtc/loro/sync.ts +0 -168
  816. package/src/core/host/AGENTS.md +0 -11
  817. package/src/core/host/__tests__/events.test.ts +0 -46
  818. package/src/core/host/__tests__/fixtures.ts +0 -39
  819. package/src/core/host/__tests__/notebook-client.test.ts +0 -433
  820. package/src/core/host/__tests__/protocol.test.ts +0 -214
  821. package/src/core/host/__tests__/stream.test.ts +0 -209
  822. package/src/core/host/connection.ts +0 -81
  823. package/src/core/host/events.ts +0 -61
  824. package/src/core/host/notebook-client.ts +0 -290
  825. package/src/core/host/protocol.ts +0 -1945
  826. package/src/core/host/resources/resource.ts +0 -47
  827. package/src/core/host/stream.ts +0 -211
  828. package/src/core/rtc/state.ts +0 -34
  829. package/src/core/state/__tests__/jotai.test.ts +0 -25
  830. package/src/core/wasm/worker/message-buffer.ts +0 -33
  831. package/src/core/websocket/__tests__/createConnectionTransport.test.ts +0 -49
  832. package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -170
  833. package/src/core/websocket/state.ts +0 -7
  834. package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
  835. package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
  836. package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
  837. package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
  838. package/src/core/websocket/transports/basic.ts +0 -102
  839. package/src/core/websocket/transports/create.ts +0 -31
  840. package/src/core/websocket/transports/sse.ts +0 -308
  841. package/src/core/websocket/transports/transport.ts +0 -50
  842. package/src/core/websocket/transports/ws.ts +0 -98
  843. package/src/core/websocket/useNotebookClient.ts +0 -88
  844. package/src/utils/__tests__/id-tree.test.ts +0 -2145
  845. package/src/utils/id-tree.tsx +0 -1134
  846. /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
  847. /package/src/core/{websocket → session}/connection-utils.ts +0 -0
@@ -1,3251 +0,0 @@
1
- import { a as e, t } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { g as n, h as r, p as i, r as a, t as o, u as s } from "./button-CvjkwdSk.js";
3
- import { t as c } from "./react-sHtZdjeP.js";
4
- import { t as l } from "./compiler-runtime-CldRdSsv.js";
5
- import { n as u, t as d } from "./copy-icon-BgUO8jsi.js";
6
- import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DPZk8vhS.js";
7
- import { c as _, h as v, l as y, s as b, t as x, u as ee } from "./tooltip-CtBZ5q8p.js";
8
- import { A as te, Ct as ne, Et as re, H as ie, M as ae, P as oe, Pt as se, Qt as ce, St as le, Tt as ue, U as de, Y as fe, a as pe, bt as me, d as he, it as ge, pt as _e, tn as ve, tt as ye, xt as be, y as xe, yt as Se } from "./error-entries-Cz3yNs7w.js";
9
- import { M as Ce, O as we, k as Te } from "./select-DemoKT4G.js";
10
- import { dt as Ee, q as De } from "./dropdown-menu-DHP9P4VE.js";
11
- import { m as Oe, y as ke } from "./toDate-CJWU9dyl.js";
12
- import { t as Ae } from "./jsx-runtime-3BD1kT0s.js";
13
- import { $ as je, Ct as S, Dt as C, Et as Me, Q as Ne, St as Pe, Tt as w, Y as Fe, dt as Ie, ft as Le, gt as Re, ht as ze, mt as Be, tt as Ve, vt as He, wt as Ue, xt as We } from "./use-restore-focus-CKjfFjLM.js";
14
- import { A as Ge, C as T, E as Ke, _ as E, c as qe, n as Je } from "./useTheme-BhQvec43.js";
15
- import { $ as Ye } from "./dist-DoE4XJBC.js";
16
- import { t as Xe } from "./useAsyncData-BD534XmW.js";
17
- //#region ../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js
18
- var Ze = /* @__PURE__ */ t(((e) => {
19
- Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
20
- var t;
21
- (function(e) {
22
- e.Root = "root", e.Text = "text", e.Directive = "directive", e.Comment = "comment", e.Script = "script", e.Style = "style", e.Tag = "tag", e.CDATA = "cdata", e.Doctype = "doctype";
23
- })(t = e.ElementType ||= {});
24
- function n(e) {
25
- return e.type === t.Tag || e.type === t.Script || e.type === t.Style;
26
- }
27
- e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
28
- })), Qe = /* @__PURE__ */ t(((e) => {
29
- var t = e && e.__extends || (function() {
30
- var e = function(t, n) {
31
- return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
32
- e.__proto__ = t;
33
- } || function(e, t) {
34
- for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
35
- }, e(t, n);
36
- };
37
- return function(t, n) {
38
- if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
39
- e(t, n);
40
- function r() {
41
- this.constructor = t;
42
- }
43
- t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
44
- };
45
- })(), n = e && e.__assign || function() {
46
- return n = Object.assign || function(e) {
47
- for (var t, n = 1, r = arguments.length; n < r; n++) for (var i in t = arguments[n], t) Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
48
- return e;
49
- }, n.apply(this, arguments);
50
- };
51
- Object.defineProperty(e, "__esModule", { value: !0 }), e.cloneNode = e.hasChildren = e.isDocument = e.isDirective = e.isComment = e.isText = e.isCDATA = e.isTag = e.Element = e.Document = e.CDATA = e.NodeWithChildren = e.ProcessingInstruction = e.Comment = e.Text = e.DataNode = e.Node = void 0;
52
- var r = Ze(), i = function() {
53
- function e() {
54
- this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
55
- }
56
- return Object.defineProperty(e.prototype, "parentNode", {
57
- get: function() {
58
- return this.parent;
59
- },
60
- set: function(e) {
61
- this.parent = e;
62
- },
63
- enumerable: !1,
64
- configurable: !0
65
- }), Object.defineProperty(e.prototype, "previousSibling", {
66
- get: function() {
67
- return this.prev;
68
- },
69
- set: function(e) {
70
- this.prev = e;
71
- },
72
- enumerable: !1,
73
- configurable: !0
74
- }), Object.defineProperty(e.prototype, "nextSibling", {
75
- get: function() {
76
- return this.next;
77
- },
78
- set: function(e) {
79
- this.next = e;
80
- },
81
- enumerable: !1,
82
- configurable: !0
83
- }), e.prototype.cloneNode = function(e) {
84
- return e === void 0 && (e = !1), b(this, e);
85
- }, e;
86
- }();
87
- e.Node = i;
88
- var a = function(e) {
89
- t(n, e);
90
- function n(t) {
91
- var n = e.call(this) || this;
92
- return n.data = t, n;
93
- }
94
- return Object.defineProperty(n.prototype, "nodeValue", {
95
- get: function() {
96
- return this.data;
97
- },
98
- set: function(e) {
99
- this.data = e;
100
- },
101
- enumerable: !1,
102
- configurable: !0
103
- }), n;
104
- }(i);
105
- e.DataNode = a;
106
- var o = function(e) {
107
- t(n, e);
108
- function n() {
109
- var t = e !== null && e.apply(this, arguments) || this;
110
- return t.type = r.ElementType.Text, t;
111
- }
112
- return Object.defineProperty(n.prototype, "nodeType", {
113
- get: function() {
114
- return 3;
115
- },
116
- enumerable: !1,
117
- configurable: !0
118
- }), n;
119
- }(a);
120
- e.Text = o;
121
- var s = function(e) {
122
- t(n, e);
123
- function n() {
124
- var t = e !== null && e.apply(this, arguments) || this;
125
- return t.type = r.ElementType.Comment, t;
126
- }
127
- return Object.defineProperty(n.prototype, "nodeType", {
128
- get: function() {
129
- return 8;
130
- },
131
- enumerable: !1,
132
- configurable: !0
133
- }), n;
134
- }(a);
135
- e.Comment = s;
136
- var c = function(e) {
137
- t(n, e);
138
- function n(t, n) {
139
- var i = e.call(this, n) || this;
140
- return i.name = t, i.type = r.ElementType.Directive, i;
141
- }
142
- return Object.defineProperty(n.prototype, "nodeType", {
143
- get: function() {
144
- return 1;
145
- },
146
- enumerable: !1,
147
- configurable: !0
148
- }), n;
149
- }(a);
150
- e.ProcessingInstruction = c;
151
- var l = function(e) {
152
- t(n, e);
153
- function n(t) {
154
- var n = e.call(this) || this;
155
- return n.children = t, n;
156
- }
157
- return Object.defineProperty(n.prototype, "firstChild", {
158
- get: function() {
159
- return this.children[0] ?? null;
160
- },
161
- enumerable: !1,
162
- configurable: !0
163
- }), Object.defineProperty(n.prototype, "lastChild", {
164
- get: function() {
165
- return this.children.length > 0 ? this.children[this.children.length - 1] : null;
166
- },
167
- enumerable: !1,
168
- configurable: !0
169
- }), Object.defineProperty(n.prototype, "childNodes", {
170
- get: function() {
171
- return this.children;
172
- },
173
- set: function(e) {
174
- this.children = e;
175
- },
176
- enumerable: !1,
177
- configurable: !0
178
- }), n;
179
- }(i);
180
- e.NodeWithChildren = l;
181
- var u = function(e) {
182
- t(n, e);
183
- function n() {
184
- var t = e !== null && e.apply(this, arguments) || this;
185
- return t.type = r.ElementType.CDATA, t;
186
- }
187
- return Object.defineProperty(n.prototype, "nodeType", {
188
- get: function() {
189
- return 4;
190
- },
191
- enumerable: !1,
192
- configurable: !0
193
- }), n;
194
- }(l);
195
- e.CDATA = u;
196
- var d = function(e) {
197
- t(n, e);
198
- function n() {
199
- var t = e !== null && e.apply(this, arguments) || this;
200
- return t.type = r.ElementType.Root, t;
201
- }
202
- return Object.defineProperty(n.prototype, "nodeType", {
203
- get: function() {
204
- return 9;
205
- },
206
- enumerable: !1,
207
- configurable: !0
208
- }), n;
209
- }(l);
210
- e.Document = d;
211
- var f = function(e) {
212
- t(n, e);
213
- function n(t, n, i, a) {
214
- i === void 0 && (i = []), a === void 0 && (a = t === "script" ? r.ElementType.Script : t === "style" ? r.ElementType.Style : r.ElementType.Tag);
215
- var o = e.call(this, i) || this;
216
- return o.name = t, o.attribs = n, o.type = a, o;
217
- }
218
- return Object.defineProperty(n.prototype, "nodeType", {
219
- get: function() {
220
- return 1;
221
- },
222
- enumerable: !1,
223
- configurable: !0
224
- }), Object.defineProperty(n.prototype, "tagName", {
225
- get: function() {
226
- return this.name;
227
- },
228
- set: function(e) {
229
- this.name = e;
230
- },
231
- enumerable: !1,
232
- configurable: !0
233
- }), Object.defineProperty(n.prototype, "attributes", {
234
- get: function() {
235
- var e = this;
236
- return Object.keys(this.attribs).map(function(t) {
237
- return {
238
- name: t,
239
- value: e.attribs[t],
240
- namespace: e["x-attribsNamespace"]?.[t],
241
- prefix: e["x-attribsPrefix"]?.[t]
242
- };
243
- });
244
- },
245
- enumerable: !1,
246
- configurable: !0
247
- }), n;
248
- }(l);
249
- e.Element = f;
250
- function p(e) {
251
- return (0, r.isTag)(e);
252
- }
253
- e.isTag = p;
254
- function m(e) {
255
- return e.type === r.ElementType.CDATA;
256
- }
257
- e.isCDATA = m;
258
- function h(e) {
259
- return e.type === r.ElementType.Text;
260
- }
261
- e.isText = h;
262
- function g(e) {
263
- return e.type === r.ElementType.Comment;
264
- }
265
- e.isComment = g;
266
- function _(e) {
267
- return e.type === r.ElementType.Directive;
268
- }
269
- e.isDirective = _;
270
- function v(e) {
271
- return e.type === r.ElementType.Root;
272
- }
273
- e.isDocument = v;
274
- function y(e) {
275
- return Object.prototype.hasOwnProperty.call(e, "children");
276
- }
277
- e.hasChildren = y;
278
- function b(e, t) {
279
- t === void 0 && (t = !1);
280
- var r;
281
- if (h(e)) r = new o(e.data);
282
- else if (g(e)) r = new s(e.data);
283
- else if (p(e)) {
284
- var i = t ? x(e.children) : [], a = new f(e.name, n({}, e.attribs), i);
285
- i.forEach(function(e) {
286
- return e.parent = a;
287
- }), e.namespace != null && (a.namespace = e.namespace), e["x-attribsNamespace"] && (a["x-attribsNamespace"] = n({}, e["x-attribsNamespace"])), e["x-attribsPrefix"] && (a["x-attribsPrefix"] = n({}, e["x-attribsPrefix"])), r = a;
288
- } else if (m(e)) {
289
- var i = t ? x(e.children) : [], l = new u(i);
290
- i.forEach(function(e) {
291
- return e.parent = l;
292
- }), r = l;
293
- } else if (v(e)) {
294
- var i = t ? x(e.children) : [], y = new d(i);
295
- i.forEach(function(e) {
296
- return e.parent = y;
297
- }), e["x-mode"] && (y["x-mode"] = e["x-mode"]), r = y;
298
- } else if (_(e)) {
299
- var b = new c(e.name, e.data);
300
- e["x-name"] != null && (b["x-name"] = e["x-name"], b["x-publicId"] = e["x-publicId"], b["x-systemId"] = e["x-systemId"]), r = b;
301
- } else throw Error(`Not implemented yet: ${e.type}`);
302
- return r.startIndex = e.startIndex, r.endIndex = e.endIndex, e.sourceCodeLocation != null && (r.sourceCodeLocation = e.sourceCodeLocation), r;
303
- }
304
- e.cloneNode = b;
305
- function x(e) {
306
- for (var t = e.map(function(e) {
307
- return b(e, !0);
308
- }), n = 1; n < t.length; n++) t[n].prev = t[n - 1], t[n - 1].next = t[n];
309
- return t;
310
- }
311
- })), $e = /* @__PURE__ */ t(((e) => {
312
- var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
313
- r === void 0 && (r = n);
314
- var i = Object.getOwnPropertyDescriptor(t, n);
315
- (!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = {
316
- enumerable: !0,
317
- get: function() {
318
- return t[n];
319
- }
320
- }), Object.defineProperty(e, r, i);
321
- }) : (function(e, t, n, r) {
322
- r === void 0 && (r = n), e[r] = t[n];
323
- })), n = e && e.__exportStar || function(e, n) {
324
- for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
325
- };
326
- Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
327
- var r = Ze(), i = Qe();
328
- n(Qe(), e);
329
- var a = {
330
- withStartIndices: !1,
331
- withEndIndices: !1,
332
- xmlMode: !1
333
- }, o = function() {
334
- function e(e, t, n) {
335
- this.dom = [], this.root = new i.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null, typeof t == "function" && (n = t, t = a), typeof e == "object" && (t = e, e = void 0), this.callback = e ?? null, this.options = t ?? a, this.elementCB = n ?? null;
336
- }
337
- return e.prototype.onparserinit = function(e) {
338
- this.parser = e;
339
- }, e.prototype.onreset = function() {
340
- this.dom = [], this.root = new i.Document(this.dom), this.done = !1, this.tagStack = [this.root], this.lastNode = null, this.parser = null;
341
- }, e.prototype.onend = function() {
342
- this.done || (this.done = !0, this.parser = null, this.handleCallback(null));
343
- }, e.prototype.onerror = function(e) {
344
- this.handleCallback(e);
345
- }, e.prototype.onclosetag = function() {
346
- this.lastNode = null;
347
- var e = this.tagStack.pop();
348
- this.options.withEndIndices && (e.endIndex = this.parser.endIndex), this.elementCB && this.elementCB(e);
349
- }, e.prototype.onopentag = function(e, t) {
350
- var n = this.options.xmlMode ? r.ElementType.Tag : void 0, a = new i.Element(e, t, void 0, n);
351
- this.addNode(a), this.tagStack.push(a);
352
- }, e.prototype.ontext = function(e) {
353
- var t = this.lastNode;
354
- if (t && t.type === r.ElementType.Text) t.data += e, this.options.withEndIndices && (t.endIndex = this.parser.endIndex);
355
- else {
356
- var n = new i.Text(e);
357
- this.addNode(n), this.lastNode = n;
358
- }
359
- }, e.prototype.oncomment = function(e) {
360
- if (this.lastNode && this.lastNode.type === r.ElementType.Comment) {
361
- this.lastNode.data += e;
362
- return;
363
- }
364
- var t = new i.Comment(e);
365
- this.addNode(t), this.lastNode = t;
366
- }, e.prototype.oncommentend = function() {
367
- this.lastNode = null;
368
- }, e.prototype.oncdatastart = function() {
369
- var e = new i.Text(""), t = new i.CDATA([e]);
370
- this.addNode(t), e.parent = t, this.lastNode = e;
371
- }, e.prototype.oncdataend = function() {
372
- this.lastNode = null;
373
- }, e.prototype.onprocessinginstruction = function(e, t) {
374
- var n = new i.ProcessingInstruction(e, t);
375
- this.addNode(n);
376
- }, e.prototype.handleCallback = function(e) {
377
- if (typeof this.callback == "function") this.callback(e, this.dom);
378
- else if (e) throw e;
379
- }, e.prototype.addNode = function(e) {
380
- var t = this.tagStack[this.tagStack.length - 1], n = t.children[t.children.length - 1];
381
- this.options.withStartIndices && (e.startIndex = this.parser.startIndex), this.options.withEndIndices && (e.endIndex = this.parser.endIndex), t.children.push(e), n && (e.prev = n, n.next = e), e.parent = t, this.lastNode = null;
382
- }, e;
383
- }();
384
- e.DomHandler = o, e.default = o;
385
- })), et = /* @__PURE__ */ t(((e) => {
386
- Object.defineProperty(e, "__esModule", { value: !0 }), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = e.CARRIAGE_RETURN_PLACEHOLDER = e.CARRIAGE_RETURN_REGEX = e.CARRIAGE_RETURN = e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES = void 0, e.CASE_SENSITIVE_TAG_NAMES = /* @__PURE__ */ "animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath".split("."), e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e, t) {
387
- return e[t.toLowerCase()] = t, e;
388
- }, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = `__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`, e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
389
- })), tt = /* @__PURE__ */ t(((e) => {
390
- Object.defineProperty(e, "__esModule", { value: !0 }), e.formatAttributes = i, e.hasOpenTag = o, e.escapeSpecialCharacters = s, e.revertEscapedCharacters = c, e.formatDOM = l;
391
- var t = $e(), n = et();
392
- function r(e) {
393
- return n.CASE_SENSITIVE_TAG_NAMES_MAP[e];
394
- }
395
- function i(e) {
396
- for (var t = {}, n = 0, r = e.length; n < r; n++) {
397
- var i = e[n];
398
- t[i.name] = i.value;
399
- }
400
- return t;
401
- }
402
- function a(e) {
403
- return e = e.toLowerCase(), r(e) || e;
404
- }
405
- function o(e, t) {
406
- var n = "<" + t, r = e.toLowerCase().indexOf(n);
407
- if (r === -1) return !1;
408
- var i = e[r + n.length];
409
- return i === ">" || i === " " || i === " " || i === "\n" || i === "\r" || i === "/";
410
- }
411
- function s(e) {
412
- return e.replace(n.CARRIAGE_RETURN_REGEX, n.CARRIAGE_RETURN_PLACEHOLDER);
413
- }
414
- function c(e) {
415
- return e.replace(n.CARRIAGE_RETURN_PLACEHOLDER_REGEX, n.CARRIAGE_RETURN);
416
- }
417
- function l(e, n, r) {
418
- n === void 0 && (n = null);
419
- for (var o = [], s, u = 0, d = e.length; u < d; u++) {
420
- var f = e[u];
421
- switch (f.nodeType) {
422
- case 1:
423
- var p = a(f.nodeName);
424
- s = new t.Element(p, i(f.attributes)), s.children = l(p === "template" ? f.content.childNodes : f.childNodes, s);
425
- break;
426
- case 3:
427
- s = new t.Text(c(f.nodeValue ?? ""));
428
- break;
429
- case 8:
430
- s = new t.Comment(f.nodeValue ?? "");
431
- break;
432
- default: continue;
433
- }
434
- var m = o[u - 1] ?? null;
435
- m && (m.next = s), s.parent = n, s.prev = m, s.next = null, o.push(s);
436
- }
437
- return r && (s = new t.ProcessingInstruction(r.substring(0, r.indexOf(" ")).toLowerCase(), r), s.next = o[0] ?? null, s.parent = n, o.unshift(s), o[1] && (o[1].prev = o[0])), o;
438
- }
439
- })), nt = /* @__PURE__ */ t(((e) => {
440
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = h;
441
- var t = tt(), n = "html", r = "head", i = "body", a = /<([a-zA-Z]+[0-9]?)/, o = function(e, t) {
442
- throw Error("This browser does not support `document.implementation.createHTMLDocument`");
443
- }, s = function(e, t) {
444
- throw Error("This browser does not support `DOMParser.prototype.parseFromString`");
445
- }, c = typeof window == "object" && window.DOMParser;
446
- if (typeof c == "function") {
447
- var l = new c(), u = "text/html";
448
- s = function(e, t) {
449
- /* istanbul ignore stop */
450
- return t && (e = `<${t}>${e}</${t}>`), l.parseFromString(e, u);
451
- }, o = s;
452
- }
453
- if (typeof document == "object" && document.implementation) {
454
- var d = document.implementation.createHTMLDocument();
455
- o = function(e, t) {
456
- /* istanbul ignore start */
457
- if (t) {
458
- var n = d.documentElement.querySelector(t);
459
- return n && (n.innerHTML = e), d;
460
- }
461
- return d.documentElement.innerHTML = e, d;
462
- };
463
- }
464
- var f = typeof document == "object" && document.createElement("template"), p;
465
- f && f.content && (p = function(e) {
466
- return f.innerHTML = e, f.content.childNodes;
467
- });
468
- var m = function() {
469
- return document.createDocumentFragment().childNodes;
470
- };
471
- function h(e) {
472
- var c, l;
473
- e = (0, t.escapeSpecialCharacters)(e);
474
- var u = (a.exec(e)?.[1])?.toLowerCase();
475
- switch (u) {
476
- case n:
477
- var d = s(e);
478
- if (!(0, t.hasOpenTag)(e, r)) {
479
- var f = d.querySelector(r);
480
- /* istanbul ignore next */
481
- (c = f?.parentNode) == null || c.removeChild(f);
482
- }
483
- if (!(0, t.hasOpenTag)(e, i)) {
484
- var f = d.querySelector(i);
485
- /* istanbul ignore next */
486
- (l = f?.parentNode) == null || l.removeChild(f);
487
- }
488
- return d.querySelectorAll(n);
489
- case r:
490
- case i:
491
- var h = o(e).querySelectorAll(u);
492
- return (0, t.hasOpenTag)(e, i) && (0, t.hasOpenTag)(e, r) ? h[0].parentNode?.childNodes ?? m() : h;
493
- default:
494
- if (p) return p(e);
495
- /* istanbul ignore start */
496
- var f = o(e, i).querySelector(i);
497
- return f?.childNodes ?? m();
498
- }
499
- }
500
- })), rt = /* @__PURE__ */ t(((e) => {
501
- var t = e && e.__importDefault || function(e) {
502
- return e && e.__esModule ? e : { default: e };
503
- };
504
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
505
- var n = t(nt()), r = tt(), i = /<(![a-zA-Z\s]+)>/;
506
- function a(e) {
507
- if (typeof e != "string") throw TypeError("First argument must be a string");
508
- if (!e) return [];
509
- var t = i.exec(e), a = t ? t[1] : void 0;
510
- return (0, r.formatDOM)((0, n.default)(e), null, a);
511
- }
512
- })), it = /* @__PURE__ */ t(((e) => {
513
- e.SAME = 0, e.CAMELCASE = 1, e.possibleStandardNames = {
514
- accept: 0,
515
- acceptCharset: 1,
516
- "accept-charset": "acceptCharset",
517
- accessKey: 1,
518
- action: 0,
519
- allowFullScreen: 1,
520
- alt: 0,
521
- as: 0,
522
- async: 0,
523
- autoCapitalize: 1,
524
- autoComplete: 1,
525
- autoCorrect: 1,
526
- autoFocus: 1,
527
- autoPlay: 1,
528
- autoSave: 1,
529
- capture: 0,
530
- cellPadding: 1,
531
- cellSpacing: 1,
532
- challenge: 0,
533
- charSet: 1,
534
- checked: 0,
535
- children: 0,
536
- cite: 0,
537
- class: "className",
538
- classID: 1,
539
- className: 1,
540
- cols: 0,
541
- colSpan: 1,
542
- content: 0,
543
- contentEditable: 1,
544
- contextMenu: 1,
545
- controls: 0,
546
- controlsList: 1,
547
- coords: 0,
548
- crossOrigin: 1,
549
- dangerouslySetInnerHTML: 1,
550
- data: 0,
551
- dateTime: 1,
552
- default: 0,
553
- defaultChecked: 1,
554
- defaultValue: 1,
555
- defer: 0,
556
- dir: 0,
557
- disabled: 0,
558
- disablePictureInPicture: 1,
559
- disableRemotePlayback: 1,
560
- download: 0,
561
- draggable: 0,
562
- encType: 1,
563
- enterKeyHint: 1,
564
- for: "htmlFor",
565
- form: 0,
566
- formMethod: 1,
567
- formAction: 1,
568
- formEncType: 1,
569
- formNoValidate: 1,
570
- formTarget: 1,
571
- frameBorder: 1,
572
- headers: 0,
573
- height: 0,
574
- hidden: 0,
575
- high: 0,
576
- href: 0,
577
- hrefLang: 1,
578
- htmlFor: 1,
579
- httpEquiv: 1,
580
- "http-equiv": "httpEquiv",
581
- icon: 0,
582
- id: 0,
583
- innerHTML: 1,
584
- inputMode: 1,
585
- integrity: 0,
586
- is: 0,
587
- itemID: 1,
588
- itemProp: 1,
589
- itemRef: 1,
590
- itemScope: 1,
591
- itemType: 1,
592
- keyParams: 1,
593
- keyType: 1,
594
- kind: 0,
595
- label: 0,
596
- lang: 0,
597
- list: 0,
598
- loop: 0,
599
- low: 0,
600
- manifest: 0,
601
- marginWidth: 1,
602
- marginHeight: 1,
603
- max: 0,
604
- maxLength: 1,
605
- media: 0,
606
- mediaGroup: 1,
607
- method: 0,
608
- min: 0,
609
- minLength: 1,
610
- multiple: 0,
611
- muted: 0,
612
- name: 0,
613
- noModule: 1,
614
- nonce: 0,
615
- noValidate: 1,
616
- open: 0,
617
- optimum: 0,
618
- pattern: 0,
619
- placeholder: 0,
620
- playsInline: 1,
621
- poster: 0,
622
- preload: 0,
623
- profile: 0,
624
- radioGroup: 1,
625
- readOnly: 1,
626
- referrerPolicy: 1,
627
- rel: 0,
628
- required: 0,
629
- reversed: 0,
630
- role: 0,
631
- rows: 0,
632
- rowSpan: 1,
633
- sandbox: 0,
634
- scope: 0,
635
- scoped: 0,
636
- scrolling: 0,
637
- seamless: 0,
638
- selected: 0,
639
- shape: 0,
640
- size: 0,
641
- sizes: 0,
642
- span: 0,
643
- spellCheck: 1,
644
- src: 0,
645
- srcDoc: 1,
646
- srcLang: 1,
647
- srcSet: 1,
648
- start: 0,
649
- step: 0,
650
- style: 0,
651
- summary: 0,
652
- tabIndex: 1,
653
- target: 0,
654
- title: 0,
655
- type: 0,
656
- useMap: 1,
657
- value: 0,
658
- width: 0,
659
- wmode: 0,
660
- wrap: 0,
661
- about: 0,
662
- accentHeight: 1,
663
- "accent-height": "accentHeight",
664
- accumulate: 0,
665
- additive: 0,
666
- alignmentBaseline: 1,
667
- "alignment-baseline": "alignmentBaseline",
668
- allowReorder: 1,
669
- alphabetic: 0,
670
- amplitude: 0,
671
- arabicForm: 1,
672
- "arabic-form": "arabicForm",
673
- ascent: 0,
674
- attributeName: 1,
675
- attributeType: 1,
676
- autoReverse: 1,
677
- azimuth: 0,
678
- baseFrequency: 1,
679
- baselineShift: 1,
680
- "baseline-shift": "baselineShift",
681
- baseProfile: 1,
682
- bbox: 0,
683
- begin: 0,
684
- bias: 0,
685
- by: 0,
686
- calcMode: 1,
687
- capHeight: 1,
688
- "cap-height": "capHeight",
689
- clip: 0,
690
- clipPath: 1,
691
- "clip-path": "clipPath",
692
- clipPathUnits: 1,
693
- clipRule: 1,
694
- "clip-rule": "clipRule",
695
- color: 0,
696
- colorInterpolation: 1,
697
- "color-interpolation": "colorInterpolation",
698
- colorInterpolationFilters: 1,
699
- "color-interpolation-filters": "colorInterpolationFilters",
700
- colorProfile: 1,
701
- "color-profile": "colorProfile",
702
- colorRendering: 1,
703
- "color-rendering": "colorRendering",
704
- contentScriptType: 1,
705
- contentStyleType: 1,
706
- cursor: 0,
707
- cx: 0,
708
- cy: 0,
709
- d: 0,
710
- datatype: 0,
711
- decelerate: 0,
712
- descent: 0,
713
- diffuseConstant: 1,
714
- direction: 0,
715
- display: 0,
716
- divisor: 0,
717
- dominantBaseline: 1,
718
- "dominant-baseline": "dominantBaseline",
719
- dur: 0,
720
- dx: 0,
721
- dy: 0,
722
- edgeMode: 1,
723
- elevation: 0,
724
- enableBackground: 1,
725
- "enable-background": "enableBackground",
726
- end: 0,
727
- exponent: 0,
728
- externalResourcesRequired: 1,
729
- fill: 0,
730
- fillOpacity: 1,
731
- "fill-opacity": "fillOpacity",
732
- fillRule: 1,
733
- "fill-rule": "fillRule",
734
- filter: 0,
735
- filterRes: 1,
736
- filterUnits: 1,
737
- floodOpacity: 1,
738
- "flood-opacity": "floodOpacity",
739
- floodColor: 1,
740
- "flood-color": "floodColor",
741
- focusable: 0,
742
- fontFamily: 1,
743
- "font-family": "fontFamily",
744
- fontSize: 1,
745
- "font-size": "fontSize",
746
- fontSizeAdjust: 1,
747
- "font-size-adjust": "fontSizeAdjust",
748
- fontStretch: 1,
749
- "font-stretch": "fontStretch",
750
- fontStyle: 1,
751
- "font-style": "fontStyle",
752
- fontVariant: 1,
753
- "font-variant": "fontVariant",
754
- fontWeight: 1,
755
- "font-weight": "fontWeight",
756
- format: 0,
757
- from: 0,
758
- fx: 0,
759
- fy: 0,
760
- g1: 0,
761
- g2: 0,
762
- glyphName: 1,
763
- "glyph-name": "glyphName",
764
- glyphOrientationHorizontal: 1,
765
- "glyph-orientation-horizontal": "glyphOrientationHorizontal",
766
- glyphOrientationVertical: 1,
767
- "glyph-orientation-vertical": "glyphOrientationVertical",
768
- glyphRef: 1,
769
- gradientTransform: 1,
770
- gradientUnits: 1,
771
- hanging: 0,
772
- horizAdvX: 1,
773
- "horiz-adv-x": "horizAdvX",
774
- horizOriginX: 1,
775
- "horiz-origin-x": "horizOriginX",
776
- ideographic: 0,
777
- imageRendering: 1,
778
- "image-rendering": "imageRendering",
779
- in2: 0,
780
- in: 0,
781
- inlist: 0,
782
- intercept: 0,
783
- k1: 0,
784
- k2: 0,
785
- k3: 0,
786
- k4: 0,
787
- k: 0,
788
- kernelMatrix: 1,
789
- kernelUnitLength: 1,
790
- kerning: 0,
791
- keyPoints: 1,
792
- keySplines: 1,
793
- keyTimes: 1,
794
- lengthAdjust: 1,
795
- letterSpacing: 1,
796
- "letter-spacing": "letterSpacing",
797
- lightingColor: 1,
798
- "lighting-color": "lightingColor",
799
- limitingConeAngle: 1,
800
- local: 0,
801
- markerEnd: 1,
802
- "marker-end": "markerEnd",
803
- markerHeight: 1,
804
- markerMid: 1,
805
- "marker-mid": "markerMid",
806
- markerStart: 1,
807
- "marker-start": "markerStart",
808
- markerUnits: 1,
809
- markerWidth: 1,
810
- mask: 0,
811
- maskContentUnits: 1,
812
- maskUnits: 1,
813
- mathematical: 0,
814
- mode: 0,
815
- numOctaves: 1,
816
- offset: 0,
817
- opacity: 0,
818
- operator: 0,
819
- order: 0,
820
- orient: 0,
821
- orientation: 0,
822
- origin: 0,
823
- overflow: 0,
824
- overlinePosition: 1,
825
- "overline-position": "overlinePosition",
826
- overlineThickness: 1,
827
- "overline-thickness": "overlineThickness",
828
- paintOrder: 1,
829
- "paint-order": "paintOrder",
830
- panose1: 0,
831
- "panose-1": "panose1",
832
- pathLength: 1,
833
- patternContentUnits: 1,
834
- patternTransform: 1,
835
- patternUnits: 1,
836
- pointerEvents: 1,
837
- "pointer-events": "pointerEvents",
838
- points: 0,
839
- pointsAtX: 1,
840
- pointsAtY: 1,
841
- pointsAtZ: 1,
842
- prefix: 0,
843
- preserveAlpha: 1,
844
- preserveAspectRatio: 1,
845
- primitiveUnits: 1,
846
- property: 0,
847
- r: 0,
848
- radius: 0,
849
- refX: 1,
850
- refY: 1,
851
- renderingIntent: 1,
852
- "rendering-intent": "renderingIntent",
853
- repeatCount: 1,
854
- repeatDur: 1,
855
- requiredExtensions: 1,
856
- requiredFeatures: 1,
857
- resource: 0,
858
- restart: 0,
859
- result: 0,
860
- results: 0,
861
- rotate: 0,
862
- rx: 0,
863
- ry: 0,
864
- scale: 0,
865
- security: 0,
866
- seed: 0,
867
- shapeRendering: 1,
868
- "shape-rendering": "shapeRendering",
869
- slope: 0,
870
- spacing: 0,
871
- specularConstant: 1,
872
- specularExponent: 1,
873
- speed: 0,
874
- spreadMethod: 1,
875
- startOffset: 1,
876
- stdDeviation: 1,
877
- stemh: 0,
878
- stemv: 0,
879
- stitchTiles: 1,
880
- stopColor: 1,
881
- "stop-color": "stopColor",
882
- stopOpacity: 1,
883
- "stop-opacity": "stopOpacity",
884
- strikethroughPosition: 1,
885
- "strikethrough-position": "strikethroughPosition",
886
- strikethroughThickness: 1,
887
- "strikethrough-thickness": "strikethroughThickness",
888
- string: 0,
889
- stroke: 0,
890
- strokeDasharray: 1,
891
- "stroke-dasharray": "strokeDasharray",
892
- strokeDashoffset: 1,
893
- "stroke-dashoffset": "strokeDashoffset",
894
- strokeLinecap: 1,
895
- "stroke-linecap": "strokeLinecap",
896
- strokeLinejoin: 1,
897
- "stroke-linejoin": "strokeLinejoin",
898
- strokeMiterlimit: 1,
899
- "stroke-miterlimit": "strokeMiterlimit",
900
- strokeWidth: 1,
901
- "stroke-width": "strokeWidth",
902
- strokeOpacity: 1,
903
- "stroke-opacity": "strokeOpacity",
904
- suppressContentEditableWarning: 1,
905
- suppressHydrationWarning: 1,
906
- surfaceScale: 1,
907
- systemLanguage: 1,
908
- tableValues: 1,
909
- targetX: 1,
910
- targetY: 1,
911
- textAnchor: 1,
912
- "text-anchor": "textAnchor",
913
- textDecoration: 1,
914
- "text-decoration": "textDecoration",
915
- textLength: 1,
916
- textRendering: 1,
917
- "text-rendering": "textRendering",
918
- to: 0,
919
- transform: 0,
920
- typeof: 0,
921
- u1: 0,
922
- u2: 0,
923
- underlinePosition: 1,
924
- "underline-position": "underlinePosition",
925
- underlineThickness: 1,
926
- "underline-thickness": "underlineThickness",
927
- unicode: 0,
928
- unicodeBidi: 1,
929
- "unicode-bidi": "unicodeBidi",
930
- unicodeRange: 1,
931
- "unicode-range": "unicodeRange",
932
- unitsPerEm: 1,
933
- "units-per-em": "unitsPerEm",
934
- unselectable: 0,
935
- vAlphabetic: 1,
936
- "v-alphabetic": "vAlphabetic",
937
- values: 0,
938
- vectorEffect: 1,
939
- "vector-effect": "vectorEffect",
940
- version: 0,
941
- vertAdvY: 1,
942
- "vert-adv-y": "vertAdvY",
943
- vertOriginX: 1,
944
- "vert-origin-x": "vertOriginX",
945
- vertOriginY: 1,
946
- "vert-origin-y": "vertOriginY",
947
- vHanging: 1,
948
- "v-hanging": "vHanging",
949
- vIdeographic: 1,
950
- "v-ideographic": "vIdeographic",
951
- viewBox: 1,
952
- viewTarget: 1,
953
- visibility: 0,
954
- vMathematical: 1,
955
- "v-mathematical": "vMathematical",
956
- vocab: 0,
957
- widths: 0,
958
- wordSpacing: 1,
959
- "word-spacing": "wordSpacing",
960
- writingMode: 1,
961
- "writing-mode": "writingMode",
962
- x1: 0,
963
- x2: 0,
964
- x: 0,
965
- xChannelSelector: 1,
966
- xHeight: 1,
967
- "x-height": "xHeight",
968
- xlinkActuate: 1,
969
- "xlink:actuate": "xlinkActuate",
970
- xlinkArcrole: 1,
971
- "xlink:arcrole": "xlinkArcrole",
972
- xlinkHref: 1,
973
- "xlink:href": "xlinkHref",
974
- xlinkRole: 1,
975
- "xlink:role": "xlinkRole",
976
- xlinkShow: 1,
977
- "xlink:show": "xlinkShow",
978
- xlinkTitle: 1,
979
- "xlink:title": "xlinkTitle",
980
- xlinkType: 1,
981
- "xlink:type": "xlinkType",
982
- xmlBase: 1,
983
- "xml:base": "xmlBase",
984
- xmlLang: 1,
985
- "xml:lang": "xmlLang",
986
- xmlns: 0,
987
- "xml:space": "xmlSpace",
988
- xmlnsXlink: 1,
989
- "xmlns:xlink": "xmlnsXlink",
990
- xmlSpace: 1,
991
- y1: 0,
992
- y2: 0,
993
- y: 0,
994
- yChannelSelector: 1,
995
- z: 0,
996
- zoomAndPan: 1
997
- };
998
- })), at = /* @__PURE__ */ t(((e) => {
999
- var t = 0, n = 1, r = 2, i = 3, a = 4, o = 5, s = 6;
1000
- function c(e) {
1001
- return u.hasOwnProperty(e) ? u[e] : null;
1002
- }
1003
- function l(e, t, n, o, s, c, l) {
1004
- this.acceptsBooleans = t === r || t === i || t === a, this.attributeName = o, this.attributeNamespace = s, this.mustUseProperty = n, this.propertyName = e, this.type = t, this.sanitizeURL = c, this.removeEmptyString = l;
1005
- }
1006
- var u = {};
1007
- [
1008
- "children",
1009
- "dangerouslySetInnerHTML",
1010
- "defaultValue",
1011
- "defaultChecked",
1012
- "innerHTML",
1013
- "suppressContentEditableWarning",
1014
- "suppressHydrationWarning",
1015
- "style"
1016
- ].forEach((e) => {
1017
- u[e] = new l(e, t, !1, e, null, !1, !1);
1018
- }), [
1019
- ["acceptCharset", "accept-charset"],
1020
- ["className", "class"],
1021
- ["htmlFor", "for"],
1022
- ["httpEquiv", "http-equiv"]
1023
- ].forEach(([e, t]) => {
1024
- u[e] = new l(e, n, !1, t, null, !1, !1);
1025
- }), [
1026
- "contentEditable",
1027
- "draggable",
1028
- "spellCheck",
1029
- "value"
1030
- ].forEach((e) => {
1031
- u[e] = new l(e, r, !1, e.toLowerCase(), null, !1, !1);
1032
- }), [
1033
- "autoReverse",
1034
- "externalResourcesRequired",
1035
- "focusable",
1036
- "preserveAlpha"
1037
- ].forEach((e) => {
1038
- u[e] = new l(e, r, !1, e, null, !1, !1);
1039
- }), [
1040
- "allowFullScreen",
1041
- "async",
1042
- "autoFocus",
1043
- "autoPlay",
1044
- "controls",
1045
- "default",
1046
- "defer",
1047
- "disabled",
1048
- "disablePictureInPicture",
1049
- "disableRemotePlayback",
1050
- "formNoValidate",
1051
- "hidden",
1052
- "loop",
1053
- "noModule",
1054
- "noValidate",
1055
- "open",
1056
- "playsInline",
1057
- "readOnly",
1058
- "required",
1059
- "reversed",
1060
- "scoped",
1061
- "seamless",
1062
- "itemScope"
1063
- ].forEach((e) => {
1064
- u[e] = new l(e, i, !1, e.toLowerCase(), null, !1, !1);
1065
- }), [
1066
- "checked",
1067
- "multiple",
1068
- "muted",
1069
- "selected"
1070
- ].forEach((e) => {
1071
- u[e] = new l(e, i, !0, e, null, !1, !1);
1072
- }), ["capture", "download"].forEach((e) => {
1073
- u[e] = new l(e, a, !1, e, null, !1, !1);
1074
- }), [
1075
- "cols",
1076
- "rows",
1077
- "size",
1078
- "span"
1079
- ].forEach((e) => {
1080
- u[e] = new l(e, s, !1, e, null, !1, !1);
1081
- }), ["rowSpan", "start"].forEach((e) => {
1082
- u[e] = new l(e, o, !1, e.toLowerCase(), null, !1, !1);
1083
- });
1084
- var d = /[\-\:]([a-z])/g, f = (e) => e[1].toUpperCase();
1085
- (/* @__PURE__ */ "accent-height.alignment-baseline.arabic-form.baseline-shift.cap-height.clip-path.clip-rule.color-interpolation.color-interpolation-filters.color-profile.color-rendering.dominant-baseline.enable-background.fill-opacity.fill-rule.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.glyph-name.glyph-orientation-horizontal.glyph-orientation-vertical.horiz-adv-x.horiz-origin-x.image-rendering.letter-spacing.lighting-color.marker-end.marker-mid.marker-start.overline-position.overline-thickness.paint-order.panose-1.pointer-events.rendering-intent.shape-rendering.stop-color.stop-opacity.strikethrough-position.strikethrough-thickness.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-anchor.text-decoration.text-rendering.underline-position.underline-thickness.unicode-bidi.unicode-range.units-per-em.v-alphabetic.v-hanging.v-ideographic.v-mathematical.vector-effect.vert-adv-y.vert-origin-x.vert-origin-y.word-spacing.writing-mode.xmlns:xlink.x-height".split(".")).forEach((e) => {
1086
- let t = e.replace(d, f);
1087
- u[t] = new l(t, n, !1, e, null, !1, !1);
1088
- }), [
1089
- "xlink:actuate",
1090
- "xlink:arcrole",
1091
- "xlink:role",
1092
- "xlink:show",
1093
- "xlink:title",
1094
- "xlink:type"
1095
- ].forEach((e) => {
1096
- let t = e.replace(d, f);
1097
- u[t] = new l(t, n, !1, e, "http://www.w3.org/1999/xlink", !1, !1);
1098
- }), [
1099
- "xml:base",
1100
- "xml:lang",
1101
- "xml:space"
1102
- ].forEach((e) => {
1103
- let t = e.replace(d, f);
1104
- u[t] = new l(t, n, !1, e, "http://www.w3.org/XML/1998/namespace", !1, !1);
1105
- }), ["tabIndex", "crossOrigin"].forEach((e) => {
1106
- u[e] = new l(e, n, !1, e.toLowerCase(), null, !1, !1);
1107
- });
1108
- var p = "xlinkHref";
1109
- u[p] = new l("xlinkHref", n, !1, "xlink:href", "http://www.w3.org/1999/xlink", !0, !1), [
1110
- "src",
1111
- "href",
1112
- "action",
1113
- "formAction"
1114
- ].forEach((e) => {
1115
- u[e] = new l(e, n, !1, e.toLowerCase(), null, !0, !0);
1116
- });
1117
- var { CAMELCASE: m, SAME: h, possibleStandardNames: g } = it(), _ = RegExp.prototype.test.bind(/* @__PURE__ */ RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")), v = Object.keys(g).reduce((e, t) => {
1118
- let n = g[t];
1119
- return n === h ? e[t] = t : n === m ? e[t.toLowerCase()] = t : e[t] = n, e;
1120
- }, {});
1121
- e.BOOLEAN = i, e.BOOLEANISH_STRING = r, e.NUMERIC = o, e.OVERLOADED_BOOLEAN = a, e.POSITIVE_NUMERIC = s, e.RESERVED = t, e.STRING = n, e.getPropertyInfo = c, e.isCustomAttribute = _, e.possibleStandardNames = v;
1122
- })), ot = /* @__PURE__ */ t(((e) => {
1123
- var t = e && e.__importDefault || function(e) {
1124
- return e && e.__esModule ? e : { default: e };
1125
- };
1126
- Object.defineProperty(e, "__esModule", { value: !0 }), e.returnFirstArg = e.canTextBeChildOfNode = e.ELEMENTS_WITH_NO_TEXT_CHILDREN = e.PRESERVE_CUSTOM_ATTRIBUTES = void 0, e.isCustomComponent = a, e.setStyleProp = s;
1127
- var n = c(), r = t(m()), i = /* @__PURE__ */ new Set([
1128
- "annotation-xml",
1129
- "color-profile",
1130
- "font-face",
1131
- "font-face-src",
1132
- "font-face-uri",
1133
- "font-face-format",
1134
- "font-face-name",
1135
- "missing-glyph"
1136
- ]);
1137
- function a(e, t) {
1138
- return e.includes("-") ? !i.has(e) : !!(t && typeof t.is == "string");
1139
- }
1140
- var o = { reactCompat: !0 };
1141
- function s(e, t) {
1142
- if (typeof e == "string") {
1143
- if (!e.trim()) {
1144
- t.style = {};
1145
- return;
1146
- }
1147
- try {
1148
- t.style = (0, r.default)(e, o);
1149
- } catch {
1150
- t.style = {};
1151
- }
1152
- }
1153
- }
1154
- e.PRESERVE_CUSTOM_ATTRIBUTES = Number(n.version.split(".")[0]) >= 16, e.ELEMENTS_WITH_NO_TEXT_CHILDREN = /* @__PURE__ */ new Set([
1155
- "tr",
1156
- "tbody",
1157
- "thead",
1158
- "tfoot",
1159
- "colgroup",
1160
- "table",
1161
- "head",
1162
- "html",
1163
- "frameset"
1164
- ]), e.canTextBeChildOfNode = function(t) {
1165
- return !e.ELEMENTS_WITH_NO_TEXT_CHILDREN.has(t.name);
1166
- }, e.returnFirstArg = function(e) {
1167
- return e;
1168
- };
1169
- })), st = /* @__PURE__ */ t(((e) => {
1170
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
1171
- var t = at(), n = ot(), r = ["checked", "value"], i = [
1172
- "input",
1173
- "select",
1174
- "textarea"
1175
- ], a = {
1176
- reset: !0,
1177
- submit: !0
1178
- };
1179
- function o(e, o) {
1180
- e === void 0 && (e = {});
1181
- var c = {}, l = !!(e.type && a[e.type]);
1182
- for (var u in e) {
1183
- var d = e[u];
1184
- if ((0, t.isCustomAttribute)(u)) {
1185
- c[u] = d;
1186
- continue;
1187
- }
1188
- var f = u.toLowerCase(), p = s(f);
1189
- if (p) {
1190
- var m = (0, t.getPropertyInfo)(p);
1191
- switch (r.includes(p) && i.includes(o) && !l && (p = s("default" + f)), c[p] = d, m?.type) {
1192
- case t.BOOLEAN:
1193
- c[p] = !0;
1194
- break;
1195
- case t.OVERLOADED_BOOLEAN: d === "" && (c[p] = !0);
1196
- }
1197
- continue;
1198
- }
1199
- n.PRESERVE_CUSTOM_ATTRIBUTES && (c[u] = d);
1200
- }
1201
- return (0, n.setStyleProp)(e.style, c), c;
1202
- }
1203
- function s(e) {
1204
- return t.possibleStandardNames[e];
1205
- }
1206
- })), ct = /* @__PURE__ */ t(((e) => {
1207
- var t = e && e.__importDefault || function(e) {
1208
- return e && e.__esModule ? e : { default: e };
1209
- };
1210
- Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
1211
- var n = c(), r = t(st()), i = ot(), a = {
1212
- cloneElement: n.cloneElement,
1213
- createElement: n.createElement,
1214
- isValidElement: n.isValidElement
1215
- };
1216
- function o(e, t) {
1217
- t === void 0 && (t = {});
1218
- for (var n = [], c = typeof t.replace == "function", l = t.transform ?? i.returnFirstArg, u = t.library ?? a, d = u.cloneElement, f = u.createElement, p = u.isValidElement, m = e.length, h = 0; h < m; h++) {
1219
- var g = e[h];
1220
- if (c) {
1221
- var _ = t.replace?.call(t, g, h);
1222
- if (p(_)) {
1223
- m > 1 && (_ = d(_, { key: _.key ?? h })), n.push(l(_, g, h));
1224
- continue;
1225
- }
1226
- }
1227
- if (g.type === "text") {
1228
- var v = !g.data.trim().length;
1229
- if (v && g.parent && !(0, i.canTextBeChildOfNode)(g.parent) || t.trim && v) continue;
1230
- n.push(l(g.data, g, h));
1231
- continue;
1232
- }
1233
- var y = g, b = {};
1234
- s(y) ? ((0, i.setStyleProp)(y.attribs.style, y.attribs), b = y.attribs) : y.attribs && (b = (0, r.default)(y.attribs, y.name));
1235
- var x = void 0;
1236
- switch (g.type) {
1237
- case "script":
1238
- case "style":
1239
- g.children[0] && (b.dangerouslySetInnerHTML = { __html: g.children[0].data });
1240
- break;
1241
- case "tag":
1242
- g.name === "textarea" && g.children[0] ? b.defaultValue = g.children[0].data : g.children?.length && (x = o(g.children, t));
1243
- break;
1244
- default: continue;
1245
- }
1246
- m > 1 && (b.key = h), n.push(l(f(g.name, b, x), g, h));
1247
- }
1248
- return n.length === 1 ? n[0] : n;
1249
- }
1250
- function s(e) {
1251
- return i.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, i.isCustomComponent)(e.name, e.attribs);
1252
- }
1253
- })), lt = /* @__PURE__ */ t(((e) => {
1254
- var t = e && e.__importDefault || function(e) {
1255
- return e && e.__esModule ? e : { default: e };
1256
- };
1257
- Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = o;
1258
- var n = t(rt());
1259
- e.htmlToDOM = n.default, e.attributesToProps = t(st()).default;
1260
- var r = t(ct());
1261
- e.domToReact = r.default;
1262
- var i = $e();
1263
- Object.defineProperty(e, "Comment", {
1264
- enumerable: !0,
1265
- get: function() {
1266
- return i.Comment;
1267
- }
1268
- }), Object.defineProperty(e, "Element", {
1269
- enumerable: !0,
1270
- get: function() {
1271
- return i.Element;
1272
- }
1273
- }), Object.defineProperty(e, "ProcessingInstruction", {
1274
- enumerable: !0,
1275
- get: function() {
1276
- return i.ProcessingInstruction;
1277
- }
1278
- }), Object.defineProperty(e, "Text", {
1279
- enumerable: !0,
1280
- get: function() {
1281
- return i.Text;
1282
- }
1283
- });
1284
- var a = { lowerCaseAttributeNames: !1 };
1285
- function o(e, t) {
1286
- if (typeof e != "string") throw TypeError("First argument must be a string");
1287
- return e ? (0, r.default)((0, n.default)(e, t?.htmlparser2 ?? a), t) : [];
1288
- }
1289
- })), D = /* @__PURE__ */ e(c(), 1), O = l(), k = /* @__PURE__ */ e(lt(), 1), ut = k.default.default || k.default, dt = v("between-horizontal-start", [
1290
- ["rect", {
1291
- width: "13",
1292
- height: "7",
1293
- x: "8",
1294
- y: "3",
1295
- rx: "1",
1296
- key: "pkso9a"
1297
- }],
1298
- ["path", {
1299
- d: "m2 9 3 3-3 3",
1300
- key: "1agib5"
1301
- }],
1302
- ["rect", {
1303
- width: "13",
1304
- height: "7",
1305
- x: "8",
1306
- y: "14",
1307
- rx: "1",
1308
- key: "1q5fc1"
1309
- }]
1310
- ]), ft = v("loader-circle", [["path", {
1311
- d: "M21 12a9 9 0 1 1-6.219-8.56",
1312
- key: "13zald"
1313
- }]]), pt = v("trash-2", [
1314
- ["path", {
1315
- d: "M10 11v6",
1316
- key: "nco0om"
1317
- }],
1318
- ["path", {
1319
- d: "M14 11v6",
1320
- key: "outv1u"
1321
- }],
1322
- ["path", {
1323
- d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",
1324
- key: "miytrc"
1325
- }],
1326
- ["path", {
1327
- d: "M3 6h18",
1328
- key: "d0wm0j"
1329
- }],
1330
- ["path", {
1331
- d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
1332
- key: "e791ji"
1333
- }]
1334
- ]), mt = v("wrench", [["path", {
1335
- d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",
1336
- key: "1ngwbx"
1337
- }]]), A = Ae(), ht = Object.defineProperty, j = (e, t) => ht(e, "name", {
1338
- value: t,
1339
- configurable: !0
1340
- }), M = "Collapsible", [gt, _t] = Me(M), [vt, N] = gt(M), yt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
1341
- let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] = S({
1342
- prop: r,
1343
- defaultProp: i ?? !1,
1344
- onChange: o,
1345
- caller: M
1346
- });
1347
- return /* @__PURE__ */ (0, A.jsx)(vt, {
1348
- scope: n,
1349
- disabled: a,
1350
- contentId: We(),
1351
- open: c,
1352
- onOpenToggle: D.useCallback(() => l((e) => !e), [l]),
1353
- children: /* @__PURE__ */ (0, A.jsx)(C.div, {
1354
- "data-state": P(c),
1355
- "data-disabled": a ? "" : void 0,
1356
- ...s,
1357
- ref: t
1358
- })
1359
- });
1360
- }, "Collapsible")), bt = "CollapsibleTrigger", xt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
1361
- let { __scopeCollapsible: n, ...r } = e, i = N(bt, n);
1362
- return /* @__PURE__ */ (0, A.jsx)(C.button, {
1363
- type: "button",
1364
- "aria-controls": i.open ? i.contentId : void 0,
1365
- "aria-expanded": i.open || !1,
1366
- "data-state": P(i.open),
1367
- "data-disabled": i.disabled ? "" : void 0,
1368
- disabled: i.disabled,
1369
- ...r,
1370
- ref: t,
1371
- onClick: w(e.onClick, i.onOpenToggle)
1372
- });
1373
- }, "CollapsibleTrigger")), St = "CollapsibleContent", Ct = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
1374
- let { forceMount: n, ...r } = e, i = N(St, e.__scopeCollapsible);
1375
- return /* @__PURE__ */ (0, A.jsx)(Pe, {
1376
- present: n || i.open,
1377
- children: ({ present: e }) => /* @__PURE__ */ (0, A.jsx)(wt, {
1378
- ...r,
1379
- ref: t,
1380
- present: e
1381
- })
1382
- });
1383
- }, "CollapsibleContent")), wt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ j(function(e, t) {
1384
- let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s = N(St, n), [c, l] = D.useState(r), u = D.useRef(null), d = i(t, u), f = D.useRef(0), p = f.current, m = D.useRef(0), h = m.current, g = s.open || c, _ = D.useRef(g), v = D.useRef(void 0);
1385
- return D.useEffect(() => {
1386
- let e = requestAnimationFrame(() => _.current = !1);
1387
- return () => cancelAnimationFrame(e);
1388
- }, []), Ue(() => {
1389
- let e = u.current;
1390
- if (e) {
1391
- v.current = v.current || {
1392
- transitionDuration: e.style.transitionDuration,
1393
- animationName: e.style.animationName
1394
- }, e.style.transitionDuration = "0s", e.style.animationName = "none";
1395
- let t = e.getBoundingClientRect();
1396
- f.current = t.height, m.current = t.width, _.current || (e.style.transitionDuration = v.current.transitionDuration, e.style.animationName = v.current.animationName), l(r);
1397
- }
1398
- }, [s.open, r]), /* @__PURE__ */ (0, A.jsx)(C.div, {
1399
- "data-state": P(s.open),
1400
- "data-disabled": s.disabled ? "" : void 0,
1401
- id: s.contentId,
1402
- hidden: !g,
1403
- ...o,
1404
- ref: d,
1405
- style: {
1406
- "--radix-collapsible-content-height": p ? `${p}px` : void 0,
1407
- "--radix-collapsible-content-width": h ? `${h}px` : void 0,
1408
- ...e.style
1409
- },
1410
- children: g && a
1411
- });
1412
- }, "CollapsibleContentImpl"));
1413
- function P(e) {
1414
- return e ? "open" : "closed";
1415
- }
1416
- j(P, "getState");
1417
- var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "name", {
1418
- value: t,
1419
- configurable: !0
1420
- }), I = "Accordion", kt = [
1421
- "Home",
1422
- "End",
1423
- "ArrowDown",
1424
- "ArrowUp",
1425
- "ArrowLeft",
1426
- "ArrowRight"
1427
- ], [At, jt, Mt] = Te(I), [L, Nt] = Me(I, [Mt, _t]), Pt = _t(), Ft = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1428
- let { type: n, ...r } = e, i = r, a = r;
1429
- return /* @__PURE__ */ (0, A.jsx)(At.Provider, {
1430
- scope: e.__scopeAccordion,
1431
- children: n === "multiple" ? /* @__PURE__ */ (0, A.jsx)(Vt, {
1432
- ...a,
1433
- ref: t
1434
- }) : /* @__PURE__ */ (0, A.jsx)(Bt, {
1435
- ...i,
1436
- ref: t
1437
- })
1438
- });
1439
- }, "Accordion")), [It, Lt] = L(I), [Rt, zt] = L(I, { collapsible: !1 }), Bt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1440
- let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ F(() => {}, "onValueChange"), collapsible: a = !1, ...o } = e, [s, c] = S({
1441
- prop: n,
1442
- defaultProp: r ?? "",
1443
- onChange: i,
1444
- caller: I
1445
- });
1446
- return /* @__PURE__ */ (0, A.jsx)(It, {
1447
- scope: e.__scopeAccordion,
1448
- value: D.useMemo(() => s ? [s] : [], [s]),
1449
- onItemOpen: c,
1450
- onItemClose: D.useCallback(() => a && c(""), [a, c]),
1451
- children: /* @__PURE__ */ (0, A.jsx)(Rt, {
1452
- scope: e.__scopeAccordion,
1453
- collapsible: a,
1454
- children: /* @__PURE__ */ (0, A.jsx)(Ut, {
1455
- ...o,
1456
- ref: t
1457
- })
1458
- })
1459
- });
1460
- }, "AccordionImplSingle")), Vt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1461
- let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ F(() => {}, "onValueChange"), ...a } = e, [o, s] = S({
1462
- prop: n,
1463
- defaultProp: r ?? [],
1464
- onChange: i,
1465
- caller: I
1466
- }), c = D.useCallback((e) => s((t = []) => [...t, e]), [s]), l = D.useCallback((e) => s((t = []) => t.filter((t) => t !== e)), [s]);
1467
- return /* @__PURE__ */ (0, A.jsx)(It, {
1468
- scope: e.__scopeAccordion,
1469
- value: o,
1470
- onItemOpen: c,
1471
- onItemClose: l,
1472
- children: /* @__PURE__ */ (0, A.jsx)(Rt, {
1473
- scope: e.__scopeAccordion,
1474
- collapsible: !0,
1475
- children: /* @__PURE__ */ (0, A.jsx)(Ut, {
1476
- ...a,
1477
- ref: t
1478
- })
1479
- })
1480
- });
1481
- }, "AccordionImplMultiple")), [Ht, R] = L(I), Ut = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1482
- let { __scopeAccordion: n, disabled: r, dir: a, orientation: o = "vertical", ...s } = e, c = D.useRef(null), l = i(c, t), u = jt(n), d = we(a) === "ltr", f = w(e.onKeyDown, (e) => {
1483
- if (!kt.includes(e.key)) return;
1484
- let t = e.target, n = u().filter((e) => !e.ref.current?.disabled), r = n.findIndex((e) => e.ref.current === t), i = n.length;
1485
- if (r === -1) return;
1486
- e.preventDefault();
1487
- let a = r, s = i - 1, c = /* @__PURE__ */ F(() => {
1488
- a = r + 1, a > s && (a = 0);
1489
- }, "moveNext"), l = /* @__PURE__ */ F(() => {
1490
- a = r - 1, a < 0 && (a = s);
1491
- }, "movePrev");
1492
- switch (e.key) {
1493
- case "Home":
1494
- a = 0;
1495
- break;
1496
- case "End":
1497
- a = s;
1498
- break;
1499
- case "ArrowRight":
1500
- o === "horizontal" && (d ? c() : l());
1501
- break;
1502
- case "ArrowDown":
1503
- o === "vertical" && c();
1504
- break;
1505
- case "ArrowLeft":
1506
- o === "horizontal" && (d ? l() : c());
1507
- break;
1508
- case "ArrowUp": o === "vertical" && l();
1509
- }
1510
- n[a % i].ref.current?.focus();
1511
- });
1512
- return /* @__PURE__ */ (0, A.jsx)(Ht, {
1513
- scope: n,
1514
- disabled: r,
1515
- direction: a,
1516
- orientation: o,
1517
- children: /* @__PURE__ */ (0, A.jsx)(At.Slot, {
1518
- scope: n,
1519
- children: /* @__PURE__ */ (0, A.jsx)(C.div, {
1520
- ...s,
1521
- "data-orientation": o,
1522
- ref: l,
1523
- onKeyDown: r ? void 0 : f
1524
- })
1525
- })
1526
- });
1527
- }, "AccordionImpl")), Wt = "AccordionItem", [Gt, Kt] = L(Wt), qt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1528
- let { __scopeAccordion: n, value: r, ...i } = e, a = R(Wt, n), o = Lt(Wt, n), s = Pt(n), c = We(), l = r && o.value.includes(r) || !1, u = a.disabled || e.disabled;
1529
- return /* @__PURE__ */ (0, A.jsx)(Gt, {
1530
- scope: n,
1531
- open: l,
1532
- disabled: u,
1533
- triggerId: c,
1534
- children: /* @__PURE__ */ (0, A.jsx)(Tt, {
1535
- "data-orientation": a.orientation,
1536
- "data-state": en(l),
1537
- ...s,
1538
- ...i,
1539
- ref: t,
1540
- disabled: u,
1541
- open: l,
1542
- onOpenChange: (e) => {
1543
- e ? o.onItemOpen(r) : o.onItemClose(r);
1544
- }
1545
- })
1546
- });
1547
- }, "AccordionItem")), Jt = "AccordionHeader", Yt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1548
- let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Kt(Jt, n);
1549
- return /* @__PURE__ */ (0, A.jsx)(C.h3, {
1550
- "data-orientation": i.orientation,
1551
- "data-state": en(a.open),
1552
- "data-disabled": a.disabled ? "" : void 0,
1553
- ...r,
1554
- ref: t
1555
- });
1556
- }, "AccordionHeader")), Xt = "AccordionTrigger", Zt = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1557
- let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Kt(Xt, n), o = zt(Xt, n), s = Pt(n);
1558
- return /* @__PURE__ */ (0, A.jsx)(At.ItemSlot, {
1559
- scope: n,
1560
- children: /* @__PURE__ */ (0, A.jsx)(Et, {
1561
- "aria-disabled": a.open && !o.collapsible || void 0,
1562
- "data-orientation": i.orientation,
1563
- id: a.triggerId,
1564
- ...s,
1565
- ...r,
1566
- ref: t
1567
- })
1568
- });
1569
- }, "AccordionTrigger")), Qt = "AccordionContent", $t = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ F(function(e, t) {
1570
- let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Kt(Qt, n), o = Pt(n);
1571
- return /* @__PURE__ */ (0, A.jsx)(Dt, {
1572
- role: "region",
1573
- "aria-labelledby": a.triggerId,
1574
- "data-orientation": i.orientation,
1575
- ...o,
1576
- ...r,
1577
- ref: t,
1578
- style: {
1579
- "--radix-accordion-content-height": "var(--radix-collapsible-content-height)",
1580
- "--radix-accordion-content-width": "var(--radix-collapsible-content-width)",
1581
- ...e.style
1582
- }
1583
- });
1584
- }, "AccordionContent"));
1585
- function en(e) {
1586
- return e ? "open" : "closed";
1587
- }
1588
- F(en, "getState");
1589
- var tn = Ft, nn = qt, rn = Yt, an = Zt, on = $t, sn = Object.defineProperty, z = (e, t) => sn(e, "name", {
1590
- value: t,
1591
- configurable: !0
1592
- }), B = "Popover", [cn, ln] = Me(B, [ee]), V = ee(), [un, H] = cn(B), dn = /* @__PURE__ */ z((e) => {
1593
- let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = V(t), c = D.useRef(null), [l, u] = D.useState(!1), [d, f] = S({
1594
- prop: r,
1595
- defaultProp: i ?? !1,
1596
- onChange: a,
1597
- caller: B
1598
- });
1599
- return /* @__PURE__ */ (0, A.jsx)(y, {
1600
- ...s,
1601
- children: /* @__PURE__ */ (0, A.jsx)(un, {
1602
- scope: t,
1603
- contentId: We(),
1604
- triggerRef: c,
1605
- open: d,
1606
- onOpenChange: f,
1607
- onOpenToggle: D.useCallback(() => f((e) => !e), [f]),
1608
- hasCustomAnchor: l,
1609
- onCustomAnchorAdd: D.useCallback(() => u(!0), []),
1610
- onCustomAnchorRemove: D.useCallback(() => u(!1), []),
1611
- modal: o,
1612
- children: n
1613
- })
1614
- });
1615
- }, "Popover"), fn = "PopoverAnchor", pn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1616
- let { __scopePopover: n, ...r } = e, i = H(fn, n), a = V(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
1617
- return D.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ (0, A.jsx)(b, {
1618
- ...a,
1619
- ...r,
1620
- ref: t
1621
- });
1622
- }, "PopoverAnchor")), mn = "PopoverTrigger", hn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1623
- let { __scopePopover: n, ...r } = e, a = H(mn, n), o = V(n), s = i(t, a.triggerRef), c = /* @__PURE__ */ (0, A.jsx)(C.button, {
1624
- type: "button",
1625
- "aria-haspopup": "dialog",
1626
- "aria-expanded": a.open,
1627
- "aria-controls": a.open ? a.contentId : void 0,
1628
- "data-state": Dn(a.open),
1629
- ...r,
1630
- ref: s,
1631
- onClick: w(e.onClick, a.onOpenToggle)
1632
- });
1633
- return a.hasCustomAnchor ? c : /* @__PURE__ */ (0, A.jsx)(b, {
1634
- asChild: !0,
1635
- ...o,
1636
- children: c
1637
- });
1638
- }, "PopoverTrigger")), gn = "PopoverPortal", [_n, vn] = cn(gn, { forceMount: void 0 }), yn = /* @__PURE__ */ z((e) => {
1639
- let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = H(gn, t);
1640
- return /* @__PURE__ */ (0, A.jsx)(_n, {
1641
- scope: t,
1642
- forceMount: n,
1643
- children: /* @__PURE__ */ (0, A.jsx)(Pe, {
1644
- present: n || a.open,
1645
- children: /* @__PURE__ */ (0, A.jsx)(ze, {
1646
- asChild: !0,
1647
- container: i,
1648
- children: r
1649
- })
1650
- })
1651
- });
1652
- }, "PopoverPortal"), U = "PopoverContent", bn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1653
- let n = vn(U, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = H(U, e.__scopePopover);
1654
- return /* @__PURE__ */ (0, A.jsx)(Pe, {
1655
- present: r || a.open,
1656
- children: a.modal ? /* @__PURE__ */ (0, A.jsx)(Sn, {
1657
- ...i,
1658
- ref: t
1659
- }) : /* @__PURE__ */ (0, A.jsx)(Cn, {
1660
- ...i,
1661
- ref: t
1662
- })
1663
- });
1664
- }, "PopoverContent")), xn = s("PopoverContent.RemoveScroll"), Sn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1665
- let n = H(U, e.__scopePopover), r = D.useRef(null), a = i(t, r), o = D.useRef(!1);
1666
- return D.useEffect(() => {
1667
- let e = r.current;
1668
- if (e) return Ie(e);
1669
- }, []), /* @__PURE__ */ (0, A.jsx)(Le, {
1670
- as: xn,
1671
- allowPinchZoom: !0,
1672
- children: /* @__PURE__ */ (0, A.jsx)(wn, {
1673
- ...e,
1674
- ref: a,
1675
- trapFocus: n.open,
1676
- disableOutsidePointerEvents: !0,
1677
- onCloseAutoFocus: w(e.onCloseAutoFocus, (e) => {
1678
- e.preventDefault(), o.current || n.triggerRef.current?.focus();
1679
- }),
1680
- onPointerDownOutside: w(e.onPointerDownOutside, (e) => {
1681
- let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
1682
- o.current = r;
1683
- }, { checkForDefaultPrevented: !1 }),
1684
- onFocusOutside: w(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
1685
- })
1686
- });
1687
- }, "PopoverContentModal")), Cn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1688
- let n = H(U, e.__scopePopover), r = D.useRef(!1), i = D.useRef(!1);
1689
- return /* @__PURE__ */ (0, A.jsx)(wn, {
1690
- ...e,
1691
- ref: t,
1692
- trapFocus: !1,
1693
- disableOutsidePointerEvents: !1,
1694
- onCloseAutoFocus: (t) => {
1695
- e.onCloseAutoFocus?.(t), t.defaultPrevented || (r.current || n.triggerRef.current?.focus(), t.preventDefault()), r.current = !1, i.current = !1;
1696
- },
1697
- onInteractOutside: (t) => {
1698
- e.onInteractOutside?.(t), t.defaultPrevented || (r.current = !0, t.detail.originalEvent.type === "pointerdown" && (i.current = !0));
1699
- let a = t.target;
1700
- n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
1701
- }
1702
- });
1703
- }, "PopoverContentNonModal")), wn = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1704
- let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: i, onCloseAutoFocus: a, disableOutsidePointerEvents: o, onEscapeKeyDown: s, onPointerDownOutside: c, onFocusOutside: l, onInteractOutside: u, ...d } = e, f = H(U, n), p = V(n);
1705
- return Be(), /* @__PURE__ */ (0, A.jsx)(Re, {
1706
- asChild: !0,
1707
- loop: !0,
1708
- trapped: r,
1709
- onMountAutoFocus: i,
1710
- onUnmountAutoFocus: a,
1711
- children: /* @__PURE__ */ (0, A.jsx)(He, {
1712
- asChild: !0,
1713
- disableOutsidePointerEvents: o,
1714
- onInteractOutside: u,
1715
- onEscapeKeyDown: s,
1716
- onPointerDownOutside: c,
1717
- onFocusOutside: l,
1718
- onDismiss: () => f.onOpenChange(!1),
1719
- deferPointerDownOutside: !0,
1720
- children: /* @__PURE__ */ (0, A.jsx)(_, {
1721
- "data-state": Dn(f.open),
1722
- role: "dialog",
1723
- id: f.contentId,
1724
- ...p,
1725
- ...d,
1726
- ref: t,
1727
- style: {
1728
- ...d.style,
1729
- "--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
1730
- "--radix-popover-content-available-width": "var(--radix-popper-available-width)",
1731
- "--radix-popover-content-available-height": "var(--radix-popper-available-height)",
1732
- "--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
1733
- "--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
1734
- }
1735
- })
1736
- })
1737
- });
1738
- }, "PopoverContentImpl")), Tn = "PopoverClose", En = /* @__PURE__ */ D.forwardRef(/* @__PURE__ */ z(function(e, t) {
1739
- let { __scopePopover: n, ...r } = e, i = H(Tn, n);
1740
- return /* @__PURE__ */ (0, A.jsx)(C.button, {
1741
- type: "button",
1742
- ...r,
1743
- ref: t,
1744
- onClick: w(e.onClick, () => i.onOpenChange(!1))
1745
- });
1746
- }, "PopoverClose"));
1747
- function Dn(e) {
1748
- return e ? "open" : "closed";
1749
- }
1750
- z(Dn, "getState");
1751
- var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
1752
- let t = (0, O.c)(16), n, r, i;
1753
- t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({href: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
1754
- let a = (0, D.useRef)(null), o;
1755
- t[4] === r ? o = t[5] : (o = () => {
1756
- let e = new URL(globalThis.location.href);
1757
- e.hash = r, globalThis.history.pushState({}, "", e.toString()), globalThis.dispatchEvent(new HashChangeEvent("hashchange"));
1758
- let t = r.slice(1), n = document.getElementById(t);
1759
- n && n.scrollIntoView({
1760
- behavior: "smooth",
1761
- block: "start"
1762
- });
1763
- }, t[4] = r, t[5] = o);
1764
- let s = o, c;
1765
- t[6] === s ? c = t[7] : (c = { onPress: () => {
1766
- s();
1767
- } }, t[6] = s, t[7] = c);
1768
- let { pressProps: l } = Ee(c), u;
1769
- t[8] === s ? u = t[9] : (u = (e) => {
1770
- e.preventDefault(), s();
1771
- }, t[8] = s, t[9] = u);
1772
- let d = u, f;
1773
- return t[10] !== n || t[11] !== d || t[12] !== r || t[13] !== l || t[14] !== i ? (f = /* @__PURE__ */ (0, A.jsx)("a", {
1774
- ref: a,
1775
- href: r,
1776
- ...l,
1777
- onClick: d,
1778
- ...i,
1779
- children: n
1780
- }), t[10] = n, t[11] = d, t[12] = r, t[13] = l, t[14] = i, t[15] = f) : f = t[15], f;
1781
- }, Fn = On, In = An, Ln = Ne(jn), Rn = Nn, zn = je(Mn), Bn = D.forwardRef((e, t) => {
1782
- let n = (0, O.c)(22), i, a, o, s, c, l;
1783
- n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6]) : ({className: i, align: o, sideOffset: s, portal: c, scrollable: l, ...a} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s, n[5] = c, n[6] = l);
1784
- let u = o === void 0 ? "center" : o, d = s === void 0 ? 4 : s, f = c === void 0 || c, p = l !== void 0 && l, m = p && "overflow-auto", h;
1785
- n[7] !== i || n[8] !== m ? (h = r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i, m), n[7] = i, n[8] = m, n[9] = h) : h = n[9];
1786
- let g = p ? `calc(var(--radix-popover-content-available-height) - ${Fe}px)` : void 0, _;
1787
- n[10] !== a.style || n[11] !== g ? (_ = {
1788
- ...a.style,
1789
- maxHeight: g
1790
- }, n[10] = a.style, n[11] = g, n[12] = _) : _ = n[12];
1791
- let v;
1792
- n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, A.jsx)(Ve, { children: /* @__PURE__ */ (0, A.jsx)(zn, {
1793
- ref: t,
1794
- align: u,
1795
- sideOffset: d,
1796
- className: h,
1797
- style: _,
1798
- ...a
1799
- }) }), n[13] = u, n[14] = a, n[15] = t, n[16] = d, n[17] = h, n[18] = _, n[19] = v) : v = n[19];
1800
- let y = v;
1801
- if (f) {
1802
- let e;
1803
- return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, A.jsx)(Ln, { children: y }), n[20] = y, n[21] = e), e;
1804
- }
1805
- return y;
1806
- });
1807
- Bn.displayName = Mn.displayName;
1808
- //#endregion
1809
- //#region src/core/documentation/doc-lookup.ts
1810
- async function Vn(e) {
1811
- let t = he().inOrderIds.at(0);
1812
- if (t) try {
1813
- let n = await ye.request({
1814
- document: e,
1815
- cellId: t
1816
- });
1817
- if (!n || n.options.length === 0) return;
1818
- let r = e.split(".").pop() ?? e, i = n.options[0], a = n.options.find((e) => e.name === r) ?? i;
1819
- a?.completion_info && E.set(ge, { documentation: a.completion_info });
1820
- } catch (t) {
1821
- n.debug(`Doc lookup failed for "${e}"`, t);
1822
- }
1823
- }
1824
- //#endregion
1825
- //#region src/core/documentation/DocHoverTarget.tsx
1826
- var Hn = (e) => {
1827
- let t = (0, O.c)(8), { qualifiedName: n, children: r } = e, i;
1828
- t[0] === n ? i = t[1] : (i = () => {
1829
- Vn(n);
1830
- }, t[0] = n, t[1] = i);
1831
- let a = De(i, 100), o;
1832
- t[2] === a ? o = t[3] : (o = () => a.cancel(), t[2] = a, t[3] = o);
1833
- let s;
1834
- return t[4] !== r || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, A.jsx)("span", {
1835
- onMouseEnter: a,
1836
- onMouseLeave: o,
1837
- children: r
1838
- }), t[4] = r, t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
1839
- }, Un = Ke(!1);
1840
- //#endregion
1841
- //#region src/core/static/export-context.ts
1842
- function Wn(e) {
1843
- if (typeof e != "object" || !e) return !1;
1844
- let t = e;
1845
- return !(t.trusted !== !0 || t.notebookCode !== void 0 && typeof t.notebookCode != "string");
1846
- }
1847
- function Gn() {
1848
- let e = window?.__MARIMO_EXPORT_CONTEXT__;
1849
- return Wn(e) ? e : void 0;
1850
- }
1851
- function Kn() {
1852
- return Gn()?.trusted === !0;
1853
- }
1854
- function qn() {
1855
- if (E.get(Un) || Kn() || E.get(qe)) return !0;
1856
- try {
1857
- if (Oe() === "read") return !0;
1858
- } catch {}
1859
- return !1;
1860
- }
1861
- //#endregion
1862
- //#region src/plugins/core/sanitize.ts
1863
- var Jn = Ke((e) => {
1864
- let t = e(Un), n = e(qe);
1865
- if (t || n || Kn()) return !1;
1866
- let r = !0;
1867
- try {
1868
- r = Oe() === "read";
1869
- } catch {
1870
- return !0;
1871
- }
1872
- return !r;
1873
- });
1874
- function Yn() {
1875
- return T(Jn);
1876
- }
1877
- //#endregion
1878
- //#region src/plugins/core/RenderHTML.tsx
1879
- var Xn = [], Zn = (e) => {
1880
- if (e instanceof k.Element && !/^[A-Za-z][\w-]*$/.test(e.name)) return D.createElement(D.Fragment);
1881
- }, Qn = (e, t) => {
1882
- if (t instanceof k.Element && t.name === "body") {
1883
- if ((0, D.isValidElement)(e) && "props" in e) {
1884
- let t = e.props.children;
1885
- return /* @__PURE__ */ (0, A.jsx)(A.Fragment, { children: t });
1886
- }
1887
- return;
1888
- }
1889
- }, $n = (e, t) => {
1890
- if (t instanceof k.Element && t.name === "html") {
1891
- if ((0, D.isValidElement)(e) && "props" in e) {
1892
- let t = e.props.children;
1893
- return /* @__PURE__ */ (0, A.jsx)(A.Fragment, { children: t });
1894
- }
1895
- return;
1896
- }
1897
- }, er = (e) => {
1898
- if (e instanceof k.Element && e.attribs && e.name === "iframe") {
1899
- let t = document.createElement("iframe");
1900
- return Object.entries(e.attribs).forEach(([e, n]) => {
1901
- e.startsWith("\"") && e.endsWith("\"") && (e = e.slice(1, -1)), t.setAttribute(e, n);
1902
- }), /* @__PURE__ */ (0, A.jsx)("div", { dangerouslySetInnerHTML: { __html: t.outerHTML } });
1903
- }
1904
- }, tr = (e) => {
1905
- if (e instanceof k.Element && e.name === "script") {
1906
- let t = e.attribs.src;
1907
- if (!t) return;
1908
- if (!qn()) return n.warn(`[RenderHTML] refusing <script src> in untrusted context: ${t}`), /* @__PURE__ */ (0, A.jsx)(A.Fragment, {});
1909
- if (![...document.querySelectorAll("script[src]")].some((e) => e.getAttribute("src") === t)) {
1910
- let e = document.createElement("script");
1911
- e.src = t, document.head.append(e);
1912
- }
1913
- return /* @__PURE__ */ (0, A.jsx)(A.Fragment, {});
1914
- }
1915
- }, nr = (e, t) => {
1916
- if (t instanceof k.Element && t.name === "a") {
1917
- let n = t.attribs.href;
1918
- if (n?.startsWith("#") && !n.startsWith("#code/")) {
1919
- let r = null;
1920
- return (0, D.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, A.jsx)(Pn, {
1921
- href: n,
1922
- ...t.attribs,
1923
- children: r
1924
- });
1925
- }
1926
- }
1927
- }, rr = (e, t, n) => {
1928
- if (t instanceof k.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, A.jsx)(cr, { children: e }, n);
1929
- }, ir = (e, t, n) => {
1930
- if (!(t instanceof k.Element) || t.name !== "img") return;
1931
- let r = t.attribs?.src;
1932
- if (!(!r || !(0, D.isValidElement)(e)) && !/^data:/i.test(r)) return (0, D.cloneElement)(e, { key: `${r}-${n}` });
1933
- }, ar = (e, t, n) => {
1934
- if (!(t instanceof k.Element) || t.name !== "input" || t.attribs?.type !== "checkbox" || !(0, D.isValidElement)(e)) return;
1935
- let r = "checked" in t.attribs;
1936
- return (0, D.cloneElement)(e, { key: `checkbox-${n}-${r}` });
1937
- }, or = (e, t) => {
1938
- if (t instanceof k.Element && t.attribs?.["data-marimo-doc"]) {
1939
- let n = t.attribs["data-marimo-doc"];
1940
- return /* @__PURE__ */ (0, A.jsx)(Hn, {
1941
- qualifiedName: n,
1942
- children: e
1943
- });
1944
- }
1945
- }, sr = (e, t) => {
1946
- if (t instanceof k.Element && t.attribs?.["data-tooltip"]) {
1947
- if ((t.name?.toLowerCase() ?? "").startsWith("marimo-")) return;
1948
- let n = t.attribs["data-tooltip"].replace(/^[\r\n]+|[\r\n]+$/g, "");
1949
- return /* @__PURE__ */ (0, A.jsx)(x, {
1950
- content: n.includes("\n") ? /* @__PURE__ */ (0, A.jsx)("span", {
1951
- className: "whitespace-pre-wrap",
1952
- children: n.split(/\r?\n/).map((e, t) => /* @__PURE__ */ (0, A.jsxs)(D.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, A.jsx)("br", {}), e] }, t))
1953
- }) : n,
1954
- children: e
1955
- });
1956
- }
1957
- }, cr = (e) => {
1958
- let t = (0, O.c)(3), { children: n } = e, r = (0, D.useRef)(null), i;
1959
- t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, A.jsx)("div", {
1960
- className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
1961
- children: /* @__PURE__ */ (0, A.jsx)(d, {
1962
- tooltip: !1,
1963
- className: "p-1",
1964
- value: () => {
1965
- let e = r.current?.firstChild;
1966
- return e && e.textContent || "";
1967
- }
1968
- })
1969
- }), t[0] = i) : i = t[0];
1970
- let a;
1971
- return t[1] === n ? a = t[2] : (a = /* @__PURE__ */ (0, A.jsxs)("div", {
1972
- className: "relative group codehilite-wrapper",
1973
- ref: r,
1974
- children: [n, i]
1975
- }), t[1] = n, t[2] = a), a;
1976
- }, lr = ({ html: e, additionalReplacements: t = Xn, alwaysSanitizeHtml: n = !0 }) => /* @__PURE__ */ (0, A.jsx)(ur, {
1977
- html: e,
1978
- alwaysSanitizeHtml: n,
1979
- additionalReplacements: t
1980
- }), ur = (e) => {
1981
- let t = (0, O.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ? Xn : r, o = Yn(), s;
1982
- bb0: {
1983
- if (i || o) {
1984
- let e;
1985
- t[0] === n ? e = t[1] : (e = te(n), t[0] = n, t[1] = e), s = e;
1986
- break bb0;
1987
- }
1988
- s = n;
1989
- }
1990
- let c = s, l;
1991
- return t[2] !== a || t[3] !== c ? (l = dr({
1992
- html: c,
1993
- additionalReplacements: a
1994
- }), t[2] = a, t[3] = c, t[4] = l) : l = t[4], l;
1995
- };
1996
- function dr({ html: e, additionalReplacements: t = Xn }) {
1997
- let n = [
1998
- Zn,
1999
- er,
2000
- tr,
2001
- ...t
2002
- ], r = [
2003
- rr,
2004
- nr,
2005
- or,
2006
- sr,
2007
- Qn,
2008
- $n
2009
- ], i = [ir, ar];
2010
- return ut(e, {
2011
- replace: (e, t) => {
2012
- for (let r of n) {
2013
- let n = r(e, t);
2014
- if (n) return n;
2015
- }
2016
- return e;
2017
- },
2018
- transform: (e, t, n) => {
2019
- let a = e;
2020
- for (let e of r) {
2021
- let r = e(a, t, n);
2022
- if (r) {
2023
- a = r;
2024
- break;
2025
- }
2026
- }
2027
- for (let e of i) {
2028
- let r = e(a, t, n);
2029
- r && (a = r);
2030
- }
2031
- return a;
2032
- }
2033
- });
2034
- }
2035
- //#endregion
2036
- //#region src/utils/json/base64.ts
2037
- function fr(e, t) {
2038
- return `data:${t};base64,${e}`;
2039
- }
2040
- function pr(e) {
2041
- return e.startsWith("data:") && e.includes(";base64,");
2042
- }
2043
- function mr(e) {
2044
- return e.split(",")[1];
2045
- }
2046
- function hr(e) {
2047
- let t = globalThis.atob(e), n = t.length, r = new Uint8Array(n);
2048
- for (let e = 0; e < n; e++) r[e] = t.charCodeAt(e);
2049
- return r;
2050
- }
2051
- var gr = Uint8Array.fromBase64 ?? hr;
2052
- function _r(e) {
2053
- let t = gr(e);
2054
- return new DataView(t.buffer);
2055
- }
2056
- function vr(e) {
2057
- let t = "", n = e.length;
2058
- for (let r = 0; r < n; r++) t += String.fromCharCode(e[r]);
2059
- return globalThis.btoa(t);
2060
- }
2061
- var yr = "toBase64" in Uint8Array.prototype ? (e) => e.toBase64() : vr;
2062
- function br(e) {
2063
- return yr(new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
2064
- }
2065
- function xr(e) {
2066
- return (e.buffers ?? []).map(_r);
2067
- }
2068
- //#endregion
2069
- //#region ../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@19.3.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
2070
- function W(e, t) {
2071
- if (e == null) return {};
2072
- var n = {}, r = Object.keys(e), i, a;
2073
- for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
2074
- return n;
2075
- }
2076
- var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2077
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Sr);
2078
- return (0, D.createElement)("svg", Object.assign({
2079
- width: "15",
2080
- height: "15",
2081
- viewBox: "0 0 15 15",
2082
- fill: "none",
2083
- xmlns: "http://www.w3.org/2000/svg"
2084
- }, i, { ref: t }), (0, D.createElement)("path", {
2085
- d: "M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",
2086
- fill: r,
2087
- fillRule: "evenodd",
2088
- clipRule: "evenodd"
2089
- }), (0, D.createElement)("rect", {
2090
- x: "7",
2091
- y: "5",
2092
- width: "1",
2093
- height: "1",
2094
- rx: ".5",
2095
- fill: r
2096
- }), (0, D.createElement)("rect", {
2097
- x: "7",
2098
- y: "3",
2099
- width: "1",
2100
- height: "1",
2101
- rx: ".5",
2102
- fill: r
2103
- }), (0, D.createElement)("rect", {
2104
- x: "7",
2105
- y: "7",
2106
- width: "1",
2107
- height: "1",
2108
- rx: ".5",
2109
- fill: r
2110
- }), (0, D.createElement)("rect", {
2111
- x: "5",
2112
- y: "7",
2113
- width: "1",
2114
- height: "1",
2115
- rx: ".5",
2116
- fill: r
2117
- }), (0, D.createElement)("rect", {
2118
- x: "3",
2119
- y: "7",
2120
- width: "1",
2121
- height: "1",
2122
- rx: ".5",
2123
- fill: r
2124
- }), (0, D.createElement)("rect", {
2125
- x: "9",
2126
- y: "7",
2127
- width: "1",
2128
- height: "1",
2129
- rx: ".5",
2130
- fill: r
2131
- }), (0, D.createElement)("rect", {
2132
- x: "11",
2133
- y: "7",
2134
- width: "1",
2135
- height: "1",
2136
- rx: ".5",
2137
- fill: r
2138
- }), (0, D.createElement)("rect", {
2139
- x: "7",
2140
- y: "9",
2141
- width: "1",
2142
- height: "1",
2143
- rx: ".5",
2144
- fill: r
2145
- }), (0, D.createElement)("rect", {
2146
- x: "7",
2147
- y: "11",
2148
- width: "1",
2149
- height: "1",
2150
- rx: ".5",
2151
- fill: r
2152
- }));
2153
- }), wr = ["color"], Tr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2154
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, wr);
2155
- return (0, D.createElement)("svg", Object.assign({
2156
- width: "15",
2157
- height: "15",
2158
- viewBox: "0 0 15 15",
2159
- fill: "none",
2160
- xmlns: "http://www.w3.org/2000/svg"
2161
- }, i, { ref: t }), (0, D.createElement)("path", {
2162
- d: "M12.5 3L2.5 3.00002C1.67157 3.00002 1 3.6716 1 4.50002V9.50003C1 10.3285 1.67157 11 2.5 11H7.50003C7.63264 11 7.75982 11.0527 7.85358 11.1465L10 13.2929V11.5C10 11.2239 10.2239 11 10.5 11H12.5C13.3284 11 14 10.3285 14 9.50003V4.5C14 3.67157 13.3284 3 12.5 3ZM2.49999 2.00002L12.5 2C13.8807 2 15 3.11929 15 4.5V9.50003C15 10.8807 13.8807 12 12.5 12H11V14.5C11 14.7022 10.8782 14.8845 10.6913 14.9619C10.5045 15.0393 10.2894 14.9965 10.1464 14.8536L7.29292 12H2.5C1.11929 12 0 10.8807 0 9.50003V4.50002C0 3.11931 1.11928 2.00003 2.49999 2.00002Z",
2163
- fill: r,
2164
- fillRule: "evenodd",
2165
- clipRule: "evenodd"
2166
- }));
2167
- }), Er = ["color"], Dr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2168
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Er);
2169
- return (0, D.createElement)("svg", Object.assign({
2170
- width: "15",
2171
- height: "15",
2172
- viewBox: "0 0 15 15",
2173
- fill: "none",
2174
- xmlns: "http://www.w3.org/2000/svg"
2175
- }, i, { ref: t }), (0, D.createElement)("path", {
2176
- d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
2177
- fill: r,
2178
- fillRule: "evenodd",
2179
- clipRule: "evenodd"
2180
- }));
2181
- }), Or = ["color"], kr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2182
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Or);
2183
- return (0, D.createElement)("svg", Object.assign({
2184
- width: "15",
2185
- height: "15",
2186
- viewBox: "0 0 15 15",
2187
- fill: "none",
2188
- xmlns: "http://www.w3.org/2000/svg"
2189
- }, i, { ref: t }), (0, D.createElement)("path", {
2190
- d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
2191
- fill: r,
2192
- fillRule: "evenodd",
2193
- clipRule: "evenodd"
2194
- }));
2195
- }), Ar = ["color"], jr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2196
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Ar);
2197
- return (0, D.createElement)("svg", Object.assign({
2198
- width: "15",
2199
- height: "15",
2200
- viewBox: "0 0 15 15",
2201
- fill: "none",
2202
- xmlns: "http://www.w3.org/2000/svg"
2203
- }, i, { ref: t }), (0, D.createElement)("path", {
2204
- d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
2205
- fill: r,
2206
- fillRule: "evenodd",
2207
- clipRule: "evenodd"
2208
- }));
2209
- }), Mr = ["color"], Nr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2210
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Mr);
2211
- return (0, D.createElement)("svg", Object.assign({
2212
- width: "15",
2213
- height: "15",
2214
- viewBox: "0 0 15 15",
2215
- fill: "none",
2216
- xmlns: "http://www.w3.org/2000/svg"
2217
- }, i, { ref: t }), (0, D.createElement)("path", {
2218
- d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
2219
- fill: r
2220
- }));
2221
- }), Pr = ["color"], Fr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2222
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Pr);
2223
- return (0, D.createElement)("svg", Object.assign({
2224
- width: "15",
2225
- height: "15",
2226
- viewBox: "0 0 15 15",
2227
- fill: "none",
2228
- xmlns: "http://www.w3.org/2000/svg"
2229
- }, i, { ref: t }), (0, D.createElement)("path", {
2230
- d: "M2.05005 13.5C2.05005 13.7485 2.25152 13.95 2.50005 13.95C2.74858 13.95 2.95005 13.7485 2.95005 13.5L2.95005 1.49995C2.95005 1.25142 2.74858 1.04995 2.50005 1.04995C2.25152 1.04995 2.05005 1.25142 2.05005 1.49995L2.05005 13.5ZM8.4317 11.0681C8.60743 11.2439 8.89236 11.2439 9.06809 11.0681C9.24383 10.8924 9.24383 10.6075 9.06809 10.4317L6.58629 7.94993L14.5 7.94993C14.7485 7.94993 14.95 7.74846 14.95 7.49993C14.95 7.2514 14.7485 7.04993 14.5 7.04993L6.58629 7.04993L9.06809 4.56813C9.24383 4.39239 9.24383 4.10746 9.06809 3.93173C8.89236 3.75599 8.60743 3.75599 8.4317 3.93173L5.1817 7.18173C5.00596 7.35746 5.00596 7.64239 5.1817 7.81812L8.4317 11.0681Z",
2231
- fill: r,
2232
- fillRule: "evenodd",
2233
- clipRule: "evenodd"
2234
- }));
2235
- }), Ir = ["color"], Lr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
2236
- var n = e.color, r = n === void 0 ? "currentColor" : n, i = W(e, Ir);
2237
- return (0, D.createElement)("svg", Object.assign({
2238
- width: "15",
2239
- height: "15",
2240
- viewBox: "0 0 15 15",
2241
- fill: "none",
2242
- xmlns: "http://www.w3.org/2000/svg"
2243
- }, i, { ref: t }), (0, D.createElement)("path", {
2244
- d: "M12.95 1.50005C12.95 1.25152 12.7485 1.05005 12.5 1.05005C12.2514 1.05005 12.05 1.25152 12.05 1.50005L12.05 13.5C12.05 13.7486 12.2514 13.95 12.5 13.95C12.7485 13.95 12.95 13.7486 12.95 13.5L12.95 1.50005ZM6.5683 3.93188C6.39257 3.75614 6.10764 3.75614 5.93191 3.93188C5.75617 4.10761 5.75617 4.39254 5.93191 4.56827L8.41371 7.05007L0.499984 7.05007C0.251456 7.05007 0.0499847 7.25155 0.0499847 7.50007C0.0499846 7.7486 0.251457 7.95007 0.499984 7.95007L8.41371 7.95007L5.93191 10.4319C5.75617 10.6076 5.75617 10.8925 5.93191 11.0683C6.10764 11.244 6.39257 11.244 6.56831 11.0683L9.8183 7.81827C9.99404 7.64254 9.99404 7.35761 9.8183 7.18188L6.5683 3.93188Z",
2245
- fill: r,
2246
- fillRule: "evenodd",
2247
- clipRule: "evenodd"
2248
- }));
2249
- }), Rr = tn, zr = D.forwardRef((e, t) => {
2250
- let n = (0, O.c)(9), i, a;
2251
- n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
2252
- let o;
2253
- n[3] === i ? o = n[4] : (o = r("border-b", i), n[3] = i, n[4] = o);
2254
- let s;
2255
- return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, A.jsx)(nn, {
2256
- ref: t,
2257
- className: o,
2258
- ...a
2259
- }), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
2260
- });
2261
- zr.displayName = "AccordionItem";
2262
- var Br = D.forwardRef((e, t) => {
2263
- let n = (0, O.c)(12), i, a, o;
2264
- n[0] === e ? (i = n[1], a = n[2], o = n[3]) : ({className: a, children: i, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o);
2265
- let s;
2266
- n[4] === a ? s = n[5] : (s = r("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start", a), n[4] = a, n[5] = s);
2267
- let c;
2268
- n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, A.jsx)(Ce, { className: "h-4 w-4 transition-transform duration-200" }), n[6] = c) : c = n[6];
2269
- let l;
2270
- return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, A.jsx)(rn, {
2271
- className: "flex",
2272
- children: /* @__PURE__ */ (0, A.jsxs)(an, {
2273
- ref: t,
2274
- className: s,
2275
- ...o,
2276
- children: [i, c]
2277
- })
2278
- }), n[7] = i, n[8] = o, n[9] = t, n[10] = s, n[11] = l) : l = n[11], l;
2279
- });
2280
- Br.displayName = an.displayName;
2281
- var Vr = D.forwardRef((e, t) => {
2282
- let n = (0, O.c)(17), i, a, o, s;
2283
- n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4]) : ({className: a, children: i, wrapperClassName: s, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s);
2284
- let c;
2285
- n[5] === a ? c = n[6] : (c = r("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", a), n[5] = a, n[6] = c);
2286
- let l;
2287
- n[7] === s ? l = n[8] : (l = r("pb-4 pt-0", s), n[7] = s, n[8] = l);
2288
- let u;
2289
- n[9] !== i || n[10] !== l ? (u = /* @__PURE__ */ (0, A.jsx)("div", {
2290
- className: l,
2291
- children: i
2292
- }), n[9] = i, n[10] = l, n[11] = u) : u = n[11];
2293
- let d;
2294
- return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, A.jsx)(on, {
2295
- ref: t,
2296
- className: c,
2297
- ...o,
2298
- children: u
2299
- }), n[12] = o, n[13] = t, n[14] = c, n[15] = u, n[16] = d) : d = n[16], d;
2300
- });
2301
- Vr.displayName = on.displayName;
2302
- //#endregion
2303
- //#region src/utils/multi-map.ts
2304
- var Hr = /* @__PURE__ */ e(me(), 1), Ur = class {
2305
- map = /* @__PURE__ */ new Map();
2306
- get(e) {
2307
- return this.map.get(e) ?? [];
2308
- }
2309
- set(e, t) {
2310
- this.map.set(e, t);
2311
- }
2312
- add(e, t) {
2313
- this.map.has(e) ? this.map.get(e).push(t) : this.map.set(e, [t]);
2314
- }
2315
- has(e) {
2316
- return this.map.has(e);
2317
- }
2318
- delete(e) {
2319
- return this.map.delete(e);
2320
- }
2321
- clear() {
2322
- this.map.clear();
2323
- }
2324
- keys() {
2325
- return this.map.keys();
2326
- }
2327
- values() {
2328
- return this.map.values();
2329
- }
2330
- entries() {
2331
- return this.map.entries();
2332
- }
2333
- forEach(e) {
2334
- this.map.forEach(e);
2335
- }
2336
- flatValues() {
2337
- let e = [];
2338
- for (let t of this.map.values()) e.push(...t);
2339
- return e;
2340
- }
2341
- get size() {
2342
- return this.map.size;
2343
- }
2344
- };
2345
- //#endregion
2346
- //#region src/core/ai/context/registry.ts
2347
- function Wr(e) {
2348
- let t = e.indexOf("://");
2349
- if (t !== -1) return e.slice(0, t);
2350
- }
2351
- var Gr = class {
2352
- async getAttachments(e) {
2353
- return [];
2354
- }
2355
- asURI(e) {
2356
- return `${this.contextType}://${e}`;
2357
- }
2358
- parseContextIds(e) {
2359
- let t = RegExp(`${this.mentionPrefix}([\\w-]+):\\/\\/([\\w./-]+)`, "g"), n = [...e.matchAll(t)], r = (e) => e.slice(1), i = n.filter(([, e]) => e === this.contextType).map(([e]) => r(e));
2360
- return [...new Set(i)];
2361
- }
2362
- createBasicCompletion(e, t) {
2363
- return {
2364
- label: `${this.mentionPrefix}${e.uri.split("://")[1]}`,
2365
- displayLabel: e.name,
2366
- detail: t?.detail || e.description,
2367
- boost: t?.boost || 1,
2368
- type: t?.type || this.contextType,
2369
- apply: `${this.mentionPrefix}${e.uri}`,
2370
- section: t?.section || this.title
2371
- };
2372
- }
2373
- }, Kr = class {
2374
- providers = /* @__PURE__ */ new Set();
2375
- register(e) {
2376
- return this.providers.add(e), this;
2377
- }
2378
- getProviders() {
2379
- return this.providers;
2380
- }
2381
- getProvider(e) {
2382
- return [...this.providers].find((t) => t.contextType === e);
2383
- }
2384
- getAllItems() {
2385
- return [...this.providers].flatMap((e) => e.getItems());
2386
- }
2387
- parseAllContextIds(e) {
2388
- return [...this.providers].flatMap((t) => t.parseContextIds(e));
2389
- }
2390
- findProviderForUri(e) {
2391
- let t = Wr(e);
2392
- if (t) return [...this.providers].find((n) => n.contextType === t && n.getItems().some((t) => t.uri === e));
2393
- }
2394
- resolveItems(e) {
2395
- if (e.length === 0) return [];
2396
- let t = new Ur();
2397
- for (let n of e) {
2398
- let e = Wr(n);
2399
- e && t.add(e, n);
2400
- }
2401
- let n = /* @__PURE__ */ new Map();
2402
- for (let [e, r] of t.entries()) {
2403
- let t = [...this.providers].filter((t) => t.contextType === e);
2404
- for (let e of t) {
2405
- let t = new Map(e.getItems().map((e) => [e.uri, e]));
2406
- for (let e of r) {
2407
- let r = t.get(e);
2408
- r && n.set(e, r);
2409
- }
2410
- }
2411
- }
2412
- let r = [];
2413
- for (let t of e) {
2414
- let e = n.get(t);
2415
- e && r.push(e);
2416
- }
2417
- return r;
2418
- }
2419
- getContextInfo(e) {
2420
- return this.resolveItems(e);
2421
- }
2422
- formatContextForAI(e) {
2423
- let t = this.resolveItems(e);
2424
- return t.length === 0 ? "" : t.map((e) => this.findProviderForUri(e.uri)?.formatContext(e) || "").join("\n\n");
2425
- }
2426
- async getAttachmentsForContext(e) {
2427
- let t = this.resolveItems(e);
2428
- if (t.length === 0) return [];
2429
- let r = new Ur();
2430
- for (let e of t) {
2431
- let t = this.findProviderForUri(e.uri);
2432
- t && r.add(t, e);
2433
- }
2434
- let i = [...r.entries()].map(async ([e, t]) => {
2435
- try {
2436
- return await e.getAttachments(t);
2437
- } catch (e) {
2438
- return n.error("Error getting attachments from provider", e), [];
2439
- }
2440
- });
2441
- return (await Promise.all(i)).flat();
2442
- }
2443
- };
2444
- se([ce()], Kr.prototype, "getAllItems", null);
2445
- //#endregion
2446
- //#region src/core/ai/context/utils.ts
2447
- function qr(e) {
2448
- return e.replaceAll("<", "&lt;").replaceAll(">", "&gt;");
2449
- }
2450
- function Jr(e) {
2451
- let { type: t, data: n, details: r } = e, i = `<${t}`;
2452
- for (let [e, t] of Object.entries(n)) if (t !== void 0) {
2453
- let n = qr(typeof t == "object" && t ? JSON.stringify(t) : String(t));
2454
- i += ` ${e}="${n}"`;
2455
- }
2456
- return i += ">", r && (i += qr(r)), i += `</${t}>`, i;
2457
- }
2458
- //#endregion
2459
- //#region src/core/ai/context/providers/common.ts
2460
- var Yr = {
2461
- LOCAL_TABLE: 7,
2462
- REMOTE_TABLE: 5,
2463
- HIGH: 4,
2464
- MEDIUM: 3,
2465
- CELL_OUTPUT: 2,
2466
- LOW: 2
2467
- }, Xr = {
2468
- ERROR: {
2469
- name: "Error",
2470
- rank: 1
2471
- },
2472
- TABLE: {
2473
- name: "Table",
2474
- rank: 2
2475
- },
2476
- DATA_SOURCES: {
2477
- name: "Data Sources",
2478
- rank: 3
2479
- },
2480
- VARIABLE: {
2481
- name: "Variable",
2482
- rank: 4
2483
- },
2484
- CELL_OUTPUT: {
2485
- name: "Cell Output",
2486
- rank: 5
2487
- },
2488
- FILE: {
2489
- name: "File",
2490
- rank: 6
2491
- }
2492
- }, Zr = "datasource", Qr = class extends Gr {
2493
- title = "Datasource";
2494
- mentionPrefix = "@";
2495
- contextType = Zr;
2496
- connectionsMap;
2497
- dataframes;
2498
- constructor(e, t) {
2499
- super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) => ne(e) === "dataframe");
2500
- }
2501
- getItems() {
2502
- return [...this.connectionsMap.values()].map((e) => {
2503
- let t = "Database schema.", n = { connection: e };
2504
- return ue.has(e.name) && (n.tables = this.dataframes, t = "Database schema and the dataframes that can be queried"), e.databases.length === 0 && (n.tables?.length ?? 0) === 0 ? null : {
2505
- uri: this.asURI(e.name),
2506
- name: e.name,
2507
- description: t,
2508
- type: this.contextType,
2509
- data: n
2510
- };
2511
- }).filter(Boolean);
2512
- }
2513
- formatContext(e) {
2514
- let t = e.data, { name: n, display_name: r, source: i, ...a } = t.connection, o = a;
2515
- return ue.has(n) || (o = {
2516
- ...a,
2517
- engine_name: n
2518
- }), Jr({
2519
- type: this.contextType,
2520
- data: {
2521
- connection: o,
2522
- tables: t.tables
2523
- }
2524
- });
2525
- }
2526
- formatCompletion(e) {
2527
- let t = e.data, n = t.connection, r = t.tables, i = n.name;
2528
- return ue.has(n.name) && (i = "In-Memory"), {
2529
- label: `@${i}`,
2530
- displayLabel: i,
2531
- detail: Se(n.dialect),
2532
- boost: Yr.MEDIUM,
2533
- type: this.contextType,
2534
- section: Xr.DATA_SOURCES,
2535
- info: () => {
2536
- let e = document.createElement("div");
2537
- return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0, Hr.createRoot)(e).render(_e(n, r)), e;
2538
- }
2539
- };
2540
- }
2541
- };
2542
- function $r(e, t) {
2543
- let n = t.get(pe(e))?.code;
2544
- if (!n || n.trim() === "") return null;
2545
- let [r, i, a] = ie.sql.transformIn(n), o = t.get(le).connectionsMap.get(a.engine);
2546
- return o ? `@${Zr}://${o.name}` : null;
2547
- }
2548
- function ei(e, t) {
2549
- let n = $r(e, t);
2550
- if (!n) return null;
2551
- let r = t.get(le).connectionsMap, i = new Qr(r, t.get(be)), a = n.slice(1), o = i.getItems().find((e) => e.uri === a);
2552
- return o ? i.formatContext(o) : null;
2553
- }
2554
- //#endregion
2555
- //#region src/core/cells/outputs.ts
2556
- var ti = {}, ni = {};
2557
- function ri(e) {
2558
- let t = (0, O.c)(16), { mode: n } = T(ke), { updateCellConfig: r } = xe(), i;
2559
- t[0] === e ? i = t[1] : (i = ve(pe(e), ai, Object.is), t[0] = e, t[1] = i);
2560
- let a = T(i), o;
2561
- t[2] !== e || t[3] !== a ? (o = () => ti[e] ?? a, t[2] = e, t[3] = a, t[4] = o) : o = t[4];
2562
- let [s, c] = (0, D.useState)(o), l, u;
2563
- t[5] !== e || t[6] !== s ? (l = () => {
2564
- ti[e] = s;
2565
- }, u = [e, s], t[5] = e, t[6] = s, t[7] = l, t[8] = u) : (l = t[7], u = t[8]), (0, D.useEffect)(l, u);
2566
- let d = n === "edit", f = d ? a : s, p;
2567
- t[9] !== e || t[10] !== d || t[11] !== r ? (p = (t) => {
2568
- if (c(t), !d) return;
2569
- let n = { expand_output: t };
2570
- r({
2571
- cellId: e,
2572
- config: n
2573
- }), re().saveCellConfig({ configs: { [e]: n } }).catch(ii);
2574
- }, t[9] = e, t[10] = d, t[11] = r, t[12] = p) : p = t[12];
2575
- let m = Ge(p), h;
2576
- return t[13] !== f || t[14] !== m ? (h = [f, m], t[13] = f, t[14] = m, t[15] = h) : h = t[15], h;
2577
- }
2578
- function ii(e) {
2579
- n.error("Failed to save expand_output config", e);
2580
- }
2581
- function ai(e) {
2582
- return e?.config.expand_output ?? !1;
2583
- }
2584
- function oi(e) {
2585
- let t = (0, O.c)(6), [n, r] = (0, D.useState)(ni[e] ?? !1), i, a;
2586
- t[0] !== e || t[1] !== n ? (i = () => {
2587
- ni[e] = n;
2588
- }, a = [e, n], t[0] = e, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), (0, D.useEffect)(i, a);
2589
- let o;
2590
- return t[4] === n ? o = t[5] : (o = [n, r], t[4] = n, t[5] = o), o;
2591
- }
2592
- function si(e) {
2593
- return e == null || e.data == null || e.data === "";
2594
- }
2595
- //#endregion
2596
- //#region src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx
2597
- var ci = (0, D.lazy)(() => import("./any-language-editor-D4q-IFcM.js")), li = [Ye.lineWrapping];
2598
- function ui(e, t) {
2599
- return e ? e === "python" ? {
2600
- language: e,
2601
- code: t
2602
- } : e === "sql" ? {
2603
- language: "python",
2604
- code: de.fromQuery(t)
2605
- } : e === "markdown" ? {
2606
- language: "python",
2607
- code: fe.fromMarkdown(t)
2608
- } : e === "shell" || e === "bash" ? {
2609
- language: "python",
2610
- code: `import subprocess\nsubprocess.run("${t}")`
2611
- } : {
2612
- language: "python",
2613
- code: `_${e} = """\n${t}\n"""`
2614
- } : {
2615
- language: "python",
2616
- code: t
2617
- };
2618
- }
2619
- var di = (e) => {
2620
- let t = (0, O.c)(9), { code: n, language: r } = e, { createNewCell: i } = xe(), a = ae(), s = T(qe), c;
2621
- t[0] !== s || t[1] !== n || t[2] !== i || t[3] !== r || t[4] !== a ? (c = () => {
2622
- let e = ui(r, n);
2623
- r === "sql" && oe({
2624
- autoInstantiate: s,
2625
- createNewCell: i,
2626
- fromCellId: a
2627
- }), i({
2628
- code: e.code,
2629
- before: !1,
2630
- cellId: a ?? "__end__"
2631
- });
2632
- }, t[0] = s, t[1] = n, t[2] = i, t[3] = r, t[4] = a, t[5] = c) : c = t[5];
2633
- let l = c, u;
2634
- t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, A.jsx)(dt, { className: "ml-2 h-4 w-4" }), t[6] = u) : u = t[6];
2635
- let d;
2636
- return t[7] === l ? d = t[8] : (d = /* @__PURE__ */ (0, A.jsxs)(o, {
2637
- size: "xs",
2638
- variant: "outline",
2639
- onClick: l,
2640
- children: ["Add to Notebook", u]
2641
- }), t[7] = l, t[8] = d), d;
2642
- }, fi = (e) => {
2643
- let t = (0, O.c)(17), { code: n, language: r } = e, { theme: i } = Je(), [a, o] = (0, D.useState)(n);
2644
- a !== n && o(n);
2645
- let s;
2646
- t[0] === a ? s = t[1] : (s = async () => {
2647
- await u(a);
2648
- }, t[0] = a, t[1] = s);
2649
- let c = s, l = i === "dark" ? "dark" : "light", d;
2650
- t[2] !== r || t[3] !== l || t[4] !== a ? (d = /* @__PURE__ */ (0, A.jsx)(D.Suspense, { children: /* @__PURE__ */ (0, A.jsx)(ci, {
2651
- theme: l,
2652
- language: r,
2653
- hideUnsupportedLanguageErrors: !0,
2654
- className: "cm border rounded overflow-hidden",
2655
- extensions: li,
2656
- value: a,
2657
- onChange: o
2658
- }) }), t[2] = r, t[3] = l, t[4] = a, t[5] = d) : d = t[5];
2659
- let f;
2660
- t[6] === c ? f = t[7] : (f = /* @__PURE__ */ (0, A.jsx)(pi, {
2661
- size: "xs",
2662
- variant: "outline",
2663
- onClick: c,
2664
- children: "Copy"
2665
- }), t[6] = c, t[7] = f);
2666
- let p;
2667
- t[8] !== r || t[9] !== a ? (p = /* @__PURE__ */ (0, A.jsx)(di, {
2668
- code: a,
2669
- language: r
2670
- }), t[8] = r, t[9] = a, t[10] = p) : p = t[10];
2671
- let m;
2672
- t[11] !== f || t[12] !== p ? (m = /* @__PURE__ */ (0, A.jsxs)("div", {
2673
- className: "flex justify-end mt-2 space-x-2",
2674
- children: [f, p]
2675
- }), t[11] = f, t[12] = p, t[13] = m) : m = t[13];
2676
- let h;
2677
- return t[14] !== d || t[15] !== m ? (h = /* @__PURE__ */ (0, A.jsxs)("div", {
2678
- className: "relative",
2679
- children: [d, m]
2680
- }), t[14] = d, t[15] = m, t[16] = h) : h = t[16], h;
2681
- }, pi = (e) => {
2682
- let t = (0, O.c)(9), n, r;
2683
- t[0] === e ? (n = t[1], r = t[2]) : ({onClick: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
2684
- let [i, a] = (0, D.useState)(!1), s;
2685
- t[3] === n ? s = t[4] : (s = (e) => {
2686
- n?.(e), a(!0), setTimeout(() => a(!1), 1e3);
2687
- }, t[3] = n, t[4] = s);
2688
- let c = i ? "Copied" : "Copy", l;
2689
- return t[5] !== r || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ (0, A.jsx)(o, {
2690
- ...r,
2691
- onClick: s,
2692
- children: c
2693
- }), t[5] = r, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
2694
- }, mi = {
2695
- ...p,
2696
- attributes: {
2697
- ...p.attributes,
2698
- "*": [...p.attributes?.["*"] ?? [], "className"]
2699
- }
2700
- }, hi = Object.values({
2701
- ...g,
2702
- sanitize: [h, mi]
2703
- }), gi = { code: ({ children: e, className: t }) => {
2704
- let n = t?.replace("language-", "");
2705
- if (n && typeof e == "string") {
2706
- let t = e.trim();
2707
- return /* @__PURE__ */ (0, A.jsxs)("div", { children: [/* @__PURE__ */ (0, A.jsx)("div", {
2708
- className: "text-xs text-muted-foreground pl-1",
2709
- children: n
2710
- }), /* @__PURE__ */ (0, A.jsx)(fi, {
2711
- code: t,
2712
- language: n
2713
- })] });
2714
- }
2715
- return /* @__PURE__ */ (0, A.jsx)("code", {
2716
- className: t,
2717
- children: e
2718
- });
2719
- } }, _i, vi = () => {
2720
- let { data: e } = Xe(async () => _i || (_i = { math: (await import("./dist-DpBpA_n1.js")).math }, _i), []);
2721
- return e;
2722
- }, yi = (0, D.memo)((e) => {
2723
- let t = (0, O.c)(3), { content: n } = e, r = vi(), i;
2724
- return t[0] !== n || t[1] !== r ? (i = /* @__PURE__ */ (0, A.jsx)(f, {
2725
- components: gi,
2726
- plugins: r,
2727
- rehypePlugins: hi,
2728
- className: "mo-markdown-renderer",
2729
- children: n
2730
- }), t[0] = n, t[1] = r, t[2] = i) : i = t[2], i;
2731
- });
2732
- yi.displayName = "MarkdownRenderer";
2733
- //#endregion
2734
- //#region src/components/icons/spinner.tsx
2735
- var bi = a("animate-spin", {
2736
- variants: {
2737
- centered: { true: "m-auto" },
2738
- size: {
2739
- small: "size-4",
2740
- medium: "size-12",
2741
- large: "size-20",
2742
- xlarge: "size-20"
2743
- }
2744
- },
2745
- defaultVariants: { size: "medium" }
2746
- }), xi = D.forwardRef((e, t) => {
2747
- let n = (0, O.c)(13), i, a, o, s;
2748
- if (n[0] !== e) {
2749
- let { className: t, children: r, centered: c, size: l, ...u } = e;
2750
- a = t, i = c, s = l, o = u, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s;
2751
- } else i = n[1], a = n[2], o = n[3], s = n[4];
2752
- let c;
2753
- n[5] !== i || n[6] !== a || n[7] !== s ? (c = r(bi({
2754
- centered: i,
2755
- size: s
2756
- }), a), n[5] = i, n[6] = a, n[7] = s, n[8] = c) : c = n[8];
2757
- let l;
2758
- return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, A.jsx)(ft, {
2759
- ref: t,
2760
- className: c,
2761
- strokeWidth: 1.5,
2762
- ...o
2763
- }), n[9] = o, n[10] = t, n[11] = c, n[12] = l) : l = n[12], l;
2764
- });
2765
- xi.displayName = "Spinner";
2766
- //#endregion
2767
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/util.js
2768
- function Si(e, t) {
2769
- if (e.match(/^[a-z]+:\/\//i)) return e;
2770
- if (e.match(/^\/\//)) return window.location.protocol + e;
2771
- if (e.match(/^[a-z]+:/i)) return e;
2772
- let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
2773
- return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
2774
- }
2775
- var Ci = (() => {
2776
- let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
2777
- return () => (e += 1, `u${t()}${e}`);
2778
- })();
2779
- function G(e) {
2780
- let t = [];
2781
- for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
2782
- return t;
2783
- }
2784
- var K = null;
2785
- function wi(e = {}) {
2786
- return K || (e.includeStyleProperties ? (K = e.includeStyleProperties, K) : (K = G(window.getComputedStyle(document.documentElement)), K));
2787
- }
2788
- function q(e, t) {
2789
- let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
2790
- return n ? parseFloat(n.replace("px", "")) : 0;
2791
- }
2792
- function Ti(e) {
2793
- let t = q(e, "border-left-width"), n = q(e, "border-right-width");
2794
- return e.clientWidth + t + n;
2795
- }
2796
- function Ei(e) {
2797
- let t = q(e, "border-top-width"), n = q(e, "border-bottom-width");
2798
- return e.clientHeight + t + n;
2799
- }
2800
- function Di(e, t = {}) {
2801
- return {
2802
- width: t.width || Ti(e),
2803
- height: t.height || Ei(e)
2804
- };
2805
- }
2806
- function Oi() {
2807
- let e, t;
2808
- try {
2809
- t = process;
2810
- } catch {}
2811
- let n = t && t.env ? t.env.devicePixelRatio : null;
2812
- return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
2813
- }
2814
- var J = 16384;
2815
- function ki(e) {
2816
- (e.width > J || e.height > J) && (e.width > J && e.height > J ? e.width > e.height ? (e.height *= J / e.width, e.width = J) : (e.width *= J / e.height, e.height = J) : e.width > J ? (e.height *= J / e.width, e.width = J) : (e.width *= J / e.height, e.height = J));
2817
- }
2818
- function Y(e) {
2819
- return new Promise((t, n) => {
2820
- let r = new Image();
2821
- r.onload = () => {
2822
- r.decode().then(() => {
2823
- requestAnimationFrame(() => t(r));
2824
- });
2825
- }, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
2826
- });
2827
- }
2828
- async function Ai(e) {
2829
- return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
2830
- }
2831
- async function ji(e, t, n) {
2832
- let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
2833
- return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Ai(i);
2834
- }
2835
- var X = (e, t) => {
2836
- if (e instanceof t) return !0;
2837
- let n = Object.getPrototypeOf(e);
2838
- return n === null ? !1 : n.constructor.name === t.name || X(n, t);
2839
- };
2840
- //#endregion
2841
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-pseudos.js
2842
- function Mi(e) {
2843
- let t = e.getPropertyValue("content");
2844
- return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
2845
- }
2846
- function Ni(e, t) {
2847
- return wi(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
2848
- }
2849
- function Pi(e, t, n, r) {
2850
- let i = `.${e}:${t}`, a = n.cssText ? Mi(n) : Ni(n, r);
2851
- return document.createTextNode(`${i}{${a}}`);
2852
- }
2853
- function Fi(e, t, n, r) {
2854
- let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
2855
- if (a === "" || a === "none") return;
2856
- let o = Ci();
2857
- try {
2858
- t.className = `${t.className} ${o}`;
2859
- } catch {
2860
- return;
2861
- }
2862
- let s = document.createElement("style");
2863
- s.appendChild(Pi(o, n, i, r)), t.appendChild(s);
2864
- }
2865
- function Ii(e, t, n) {
2866
- Fi(e, t, ":before", n), Fi(e, t, ":after", n);
2867
- }
2868
- //#endregion
2869
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/mimes.js
2870
- var Li = "application/font-woff", Ri = "image/jpeg", zi = {
2871
- woff: Li,
2872
- woff2: Li,
2873
- ttf: "application/font-truetype",
2874
- eot: "application/vnd.ms-fontobject",
2875
- png: "image/png",
2876
- jpg: Ri,
2877
- jpeg: Ri,
2878
- gif: "image/gif",
2879
- tiff: "image/tiff",
2880
- svg: "image/svg+xml",
2881
- webp: "image/webp"
2882
- };
2883
- function Bi(e) {
2884
- let t = /\.([^./]*?)$/g.exec(e);
2885
- return t ? t[1] : "";
2886
- }
2887
- function Vi(e) {
2888
- return zi[Bi(e).toLowerCase()] || "";
2889
- }
2890
- //#endregion
2891
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/dataurl.js
2892
- function Hi(e) {
2893
- return e.split(/,/)[1];
2894
- }
2895
- function Ui(e) {
2896
- return e.search(/^(data:)/) !== -1;
2897
- }
2898
- function Wi(e, t) {
2899
- return `data:${t};base64,${e}`;
2900
- }
2901
- async function Gi(e, t, n) {
2902
- let r = await fetch(e, t);
2903
- if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
2904
- let i = await r.blob();
2905
- return new Promise((e, t) => {
2906
- let a = new FileReader();
2907
- a.onerror = t, a.onloadend = () => {
2908
- try {
2909
- e(n({
2910
- res: r,
2911
- result: a.result
2912
- }));
2913
- } catch (e) {
2914
- t(e);
2915
- }
2916
- }, a.readAsDataURL(i);
2917
- });
2918
- }
2919
- var Ki = {};
2920
- function qi(e, t, n) {
2921
- let r = e.replace(/\?.*/, "");
2922
- return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
2923
- }
2924
- async function Z(e, t, n) {
2925
- let r = qi(e, t, n.includeQueryParams);
2926
- if (Ki[r] != null) return Ki[r];
2927
- n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
2928
- let i;
2929
- try {
2930
- i = Wi(await Gi(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", Hi(n))), t);
2931
- } catch (t) {
2932
- i = n.imagePlaceholder || "";
2933
- let r = `Failed to fetch resource: ${e}`;
2934
- t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
2935
- }
2936
- return Ki[r] = i, i;
2937
- }
2938
- //#endregion
2939
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-node.js
2940
- async function Ji(e) {
2941
- let t = e.toDataURL();
2942
- return t === "data:," ? e.cloneNode(!1) : Y(t);
2943
- }
2944
- async function Yi(e, t) {
2945
- if (e.currentSrc) {
2946
- let t = document.createElement("canvas"), n = t.getContext("2d");
2947
- return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), Y(t.toDataURL());
2948
- }
2949
- let n = e.poster;
2950
- return Y(await Z(n, Vi(n), t));
2951
- }
2952
- async function Xi(e, t) {
2953
- try {
2954
- if (e?.contentDocument?.body) return await Q(e.contentDocument.body, t, !0);
2955
- } catch {}
2956
- return e.cloneNode(!1);
2957
- }
2958
- async function Zi(e, t) {
2959
- return X(e, HTMLCanvasElement) ? Ji(e) : X(e, HTMLVideoElement) ? Yi(e, t) : X(e, HTMLIFrameElement) ? Xi(e, t) : e.cloneNode($i(e));
2960
- }
2961
- var Qi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", $i = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
2962
- async function ea(e, t, n) {
2963
- if ($i(t)) return t;
2964
- let r = [];
2965
- if (Qi(e) && e.assignedNodes) r = G(e.assignedNodes());
2966
- else if (X(e, HTMLIFrameElement)) try {
2967
- e.contentDocument?.body && (r = G(e.contentDocument.body.childNodes));
2968
- } catch {}
2969
- else r = G((e.shadowRoot ?? e).childNodes);
2970
- return r.length === 0 || X(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Q(r, n)).then((e) => {
2971
- e && t.appendChild(e);
2972
- }), Promise.resolve()), t;
2973
- }
2974
- function ta(e, t, n) {
2975
- let r = t.style;
2976
- if (!r) return;
2977
- let i = window.getComputedStyle(e);
2978
- i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : wi(n).forEach((n) => {
2979
- let a = i.getPropertyValue(n);
2980
- n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), X(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
2981
- });
2982
- }
2983
- function na(e, t) {
2984
- X(e, HTMLTextAreaElement) && (t.innerHTML = e.value), X(e, HTMLInputElement) && t.setAttribute("value", e.value);
2985
- }
2986
- function ra(e, t) {
2987
- if (X(e, HTMLSelectElement)) {
2988
- let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
2989
- r && r.setAttribute("selected", "");
2990
- }
2991
- }
2992
- function ia(e, t, n) {
2993
- return X(t, Element) && (ta(e, t, n), Ii(e, t, n), na(e, t), ra(e, t)), t;
2994
- }
2995
- async function aa(e, t) {
2996
- let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
2997
- if (n.length === 0) return e;
2998
- let r = {};
2999
- for (let i = 0; i < n.length; i++) {
3000
- let a = n[i].getAttribute("xlink:href");
3001
- if (a) {
3002
- let n = e.querySelector(a), i = document.querySelector(a);
3003
- !n && i && !r[a] && (r[a] = await Q(i, t, !0));
3004
- }
3005
- }
3006
- let i = Object.values(r);
3007
- if (i.length) {
3008
- let t = "http://www.w3.org/1999/xhtml", n = document.createElementNS(t, "svg");
3009
- n.setAttribute("xmlns", t), n.style.position = "absolute", n.style.width = "0", n.style.height = "0", n.style.overflow = "hidden", n.style.display = "none";
3010
- let r = document.createElementNS(t, "defs");
3011
- n.appendChild(r);
3012
- for (let e = 0; e < i.length; e++) r.appendChild(i[e]);
3013
- e.appendChild(n);
3014
- }
3015
- return e;
3016
- }
3017
- async function Q(e, t, n) {
3018
- return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Zi(e, t)).then((n) => ea(e, n, t)).then((n) => ia(e, n, t)).then((e) => aa(e, t));
3019
- }
3020
- //#endregion
3021
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-resources.js
3022
- var oa = /url\((['"]?)([^'"]+?)\1\)/g, sa = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, ca = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
3023
- function la(e) {
3024
- let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
3025
- return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
3026
- }
3027
- function ua(e) {
3028
- let t = [];
3029
- return e.replace(oa, (e, n, r) => (t.push(r), e)), t.filter((e) => !Ui(e));
3030
- }
3031
- async function da(e, t, n, r, i) {
3032
- try {
3033
- let a = n ? Si(t, n) : t, o = Vi(t), s;
3034
- return s = i ? Wi(await i(a), o) : await Z(a, o, r), e.replace(la(t), `$1${s}$3`);
3035
- } catch {}
3036
- return e;
3037
- }
3038
- function fa(e, { preferredFontFormat: t }) {
3039
- return t ? e.replace(ca, (e) => {
3040
- for (;;) {
3041
- let [n, , r] = sa.exec(e) || [];
3042
- if (!r) return "";
3043
- if (r === t) return `src: ${n};`;
3044
- }
3045
- }) : e;
3046
- }
3047
- function pa(e) {
3048
- return e.search(oa) !== -1;
3049
- }
3050
- async function ma(e, t, n) {
3051
- if (!pa(e)) return e;
3052
- let r = fa(e, n);
3053
- return ua(r).reduce((e, r) => e.then((e) => da(e, r, t, n)), Promise.resolve(r));
3054
- }
3055
- //#endregion
3056
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-images.js
3057
- async function $(e, t, n) {
3058
- let r = t.style?.getPropertyValue(e);
3059
- if (r) {
3060
- let i = await ma(r, null, n);
3061
- return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
3062
- }
3063
- return !1;
3064
- }
3065
- async function ha(e, t) {
3066
- await $("background", e, t) || await $("background-image", e, t), await $("mask", e, t) || await $("-webkit-mask", e, t) || await $("mask-image", e, t) || await $("-webkit-mask-image", e, t);
3067
- }
3068
- async function ga(e, t) {
3069
- let n = X(e, HTMLImageElement);
3070
- if (!(n && !Ui(e.src)) && !(X(e, SVGImageElement) && !Ui(e.href.baseVal))) return;
3071
- let r = n ? e.src : e.href.baseVal, i = await Z(r, Vi(r), t);
3072
- await new Promise((r, a) => {
3073
- e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
3074
- try {
3075
- r(t.onImageErrorHandler(...e));
3076
- } catch (e) {
3077
- a(e);
3078
- }
3079
- } : a;
3080
- let o = e;
3081
- o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
3082
- });
3083
- }
3084
- async function _a(e, t) {
3085
- let n = G(e.childNodes).map((e) => va(e, t));
3086
- await Promise.all(n).then(() => e);
3087
- }
3088
- async function va(e, t) {
3089
- X(e, Element) && (await ha(e, t), await ga(e, t), await _a(e, t));
3090
- }
3091
- //#endregion
3092
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/apply-style.js
3093
- function ya(e, t) {
3094
- let { style: n } = e;
3095
- t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
3096
- let r = t.style;
3097
- return r != null && Object.keys(r).forEach((e) => {
3098
- n[e] = r[e];
3099
- }), e;
3100
- }
3101
- //#endregion
3102
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-webfonts.js
3103
- var ba = {};
3104
- async function xa(e) {
3105
- let t = ba[e];
3106
- return t ?? (t = {
3107
- url: e,
3108
- cssText: await (await fetch(e)).text()
3109
- }, ba[e] = t, t);
3110
- }
3111
- async function Sa(e, t) {
3112
- let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
3113
- let a = i.replace(r, "$1");
3114
- return a.startsWith("https://") || (a = new URL(a, e.url).href), Gi(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
3115
- });
3116
- return Promise.all(i).then(() => n);
3117
- }
3118
- function Ca(e) {
3119
- if (e == null) return [];
3120
- let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
3121
- for (;;) {
3122
- let e = r.exec(n);
3123
- if (e === null) break;
3124
- t.push(e[0]);
3125
- }
3126
- n = n.replace(r, "");
3127
- let i = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, a = /* @__PURE__ */ RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", "gi");
3128
- for (;;) {
3129
- let e = i.exec(n);
3130
- if (e === null) {
3131
- if (e = a.exec(n), e === null) break;
3132
- i.lastIndex = a.lastIndex;
3133
- } else a.lastIndex = i.lastIndex;
3134
- t.push(e[0]);
3135
- }
3136
- return t;
3137
- }
3138
- async function wa(e, t) {
3139
- let n = [], r = [];
3140
- return e.forEach((n) => {
3141
- if ("cssRules" in n) try {
3142
- G(n.cssRules || []).forEach((e, i) => {
3143
- if (e.type === CSSRule.IMPORT_RULE) {
3144
- let a = i + 1, o = e.href, s = xa(o).then((e) => Sa(e, t)).then((e) => Ca(e).forEach((e) => {
3145
- try {
3146
- n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
3147
- } catch (t) {
3148
- console.error("Error inserting rule from remote css", {
3149
- rule: e,
3150
- error: t
3151
- });
3152
- }
3153
- })).catch((e) => {
3154
- console.error("Error loading remote css", e.toString());
3155
- });
3156
- r.push(s);
3157
- }
3158
- });
3159
- } catch (i) {
3160
- let a = e.find((e) => e.href == null) || document.styleSheets[0];
3161
- n.href != null && r.push(xa(n.href).then((e) => Sa(e, t)).then((e) => Ca(e).forEach((e) => {
3162
- a.insertRule(e, a.cssRules.length);
3163
- })).catch((e) => {
3164
- console.error("Error loading remote stylesheet", e);
3165
- })), console.error("Error inlining remote css file", i);
3166
- }
3167
- }), Promise.all(r).then(() => (e.forEach((e) => {
3168
- if ("cssRules" in e) try {
3169
- G(e.cssRules || []).forEach((e) => {
3170
- n.push(e);
3171
- });
3172
- } catch (t) {
3173
- console.error(`Error while reading CSS rules from ${e.href}`, t);
3174
- }
3175
- }), n));
3176
- }
3177
- function Ta(e) {
3178
- return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => pa(e.style.getPropertyValue("src")));
3179
- }
3180
- async function Ea(e, t) {
3181
- if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
3182
- return Ta(await wa(G(e.ownerDocument.styleSheets), t));
3183
- }
3184
- function Da(e) {
3185
- return (e || "").trim().replace(/["']/g, "");
3186
- }
3187
- function Oa(e) {
3188
- let t = /* @__PURE__ */ new Set();
3189
- function n(e) {
3190
- let r = e.style.fontFamily || getComputedStyle(e).fontFamily;
3191
- r && r.split(",").forEach((e) => {
3192
- t.add(Da(e));
3193
- }), Array.from(e.children).forEach((e) => {
3194
- e instanceof HTMLElement && n(e);
3195
- });
3196
- }
3197
- return n(e), t;
3198
- }
3199
- async function ka(e, t) {
3200
- let n = await Ea(e, t), r = Oa(e);
3201
- return (await Promise.all(n.filter((e) => r.has(Da(e.style.fontFamily))).map((e) => {
3202
- let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
3203
- return ma(e.cssText, n, t);
3204
- }))).join("\n");
3205
- }
3206
- async function Aa(e, t) {
3207
- let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await ka(e, t) : t.fontEmbedCSS, r = t.extraStyleContent == null ? n : (n || "").concat(t.extraStyleContent);
3208
- if (r) {
3209
- let t = document.createElement("style"), n = document.createTextNode(r);
3210
- t.appendChild(n), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
3211
- }
3212
- }
3213
- //#endregion
3214
- //#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/index.js
3215
- async function ja(e, t = {}) {
3216
- let { width: n, height: r } = Di(e, t), i = await Q(e, t, !0);
3217
- return await Aa(i, t), await va(i, t), ya(i, t), await ji(i, n, r);
3218
- }
3219
- async function Ma(e, t = {}) {
3220
- let { width: n, height: r } = Di(e, t), i = await Y(await ja(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Oi(), c = t.canvasWidth || n, l = t.canvasHeight || r;
3221
- return a.width = c * s, a.height = l * s, t.skipAutoScale || ki(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
3222
- }
3223
- async function Na(e, t = {}) {
3224
- return (await Ma(e, t)).toDataURL();
3225
- }
3226
- var Pa = {
3227
- filter: (e) => {
3228
- try {
3229
- if ("classList" in e) {
3230
- let t = e.classList;
3231
- if (t.contains("mpl-toolbar") || t.contains("print:hidden")) return !1;
3232
- }
3233
- return !0;
3234
- } catch (e) {
3235
- return n.error("Error filtering node:", e), !0;
3236
- }
3237
- },
3238
- imagePlaceholder: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQI12NgAAIABQABNjN9GQAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAAA0lEQVQI12P4z8BQDwAEgAF/QualIQAAAABJRU5ErkJggg==",
3239
- onImageErrorHandler: (e) => {
3240
- n.error("Error loading image:", e);
3241
- },
3242
- includeStyleProperties: /* @__PURE__ */ "width.height.min-width.min-height.max-width.max-height.box-sizing.aspect-ratio.display.position.top.left.bottom.right.z-index.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.align-items.align-self.justify-content.gap.order.grid-template-columns.grid-template-rows.grid-column.grid-row.row-gap.column-gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.font.font-family.font-size.font-weight.font-style.line-height.letter-spacing.word-spacing.text-align.text-decoration.text-transform.text-indent.text-shadow.white-space.text-wrap.word-break.text-overflow.vertical-align.color.background.background-color.background-image.background-size.background-position.background-repeat.background-clip.border.border-width.border-style.border-color.border-top.border-right.border-bottom.border-left.border-radius.outline.box-shadow.text-shadow.opacity.filter.backdrop-filter.mix-blend-mode.transform.clip-path.overflow.overflow-x.overflow-y.visibility.fill.stroke.stroke-width.object-fit.object-position.list-style.list-style-type.border-collapse.border-spacing.content.cursor".split(".")
3243
- };
3244
- async function Fa(e, t) {
3245
- return Na(e, {
3246
- ...Pa,
3247
- ...t
3248
- });
3249
- }
3250
- //#endregion
3251
- export { k as $, gr as A, Rn as B, kr as C, Lr as D, Fr as E, lr as F, on as G, In as H, Gn as I, an as J, nn as K, Kn as L, mr as M, pr as N, fr as O, xr as P, ut as Q, Un as R, Dr as S, Nr as T, kn as U, Bn as V, Nn as W, pt as X, mt as Y, ft as Z, Vr as _, si as a, Cr as b, Qr as c, Yr as d, Xr as f, Rr as g, Kr as h, ci as i, br as j, _r as k, ei as l, Gr as m, xi as n, oi as o, Jr as p, tn as q, yi as r, ri as s, Fa as t, $r as u, zr as v, jr as w, Tr as x, Br as y, Fn as z };