femo-plugin 1.0.2 → 1.0.4

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 (607) hide show
  1. package/README.md +632 -635
  2. package/docs/ActiveRoadmaps/ARCHITECTURE.md +466 -0
  3. package/docs/ActiveRoadmaps/compiler/345/244/232job/345/220/214/350/267/221/346/224/271/351/200/240-/346/226/275/345/267/245/346/270/205/345/215/225.md +164 -0
  4. package/docs/ActiveRoadmaps/dshAdapter-/351/207/215/346/236/204/346/226/275/345/267/245/346/270/205/345/215/225.md +154 -0
  5. package/docs/ActiveRoadmaps/hub/345/224/257/344/270/200/345/214/226/350/256/276/350/256/241.md +107 -0
  6. package/docs/ActiveRoadmaps/webAdapter-/351/235/231/351/273/230/351/230/266/346/242/257/346/226/275/345/267/245/344/272/244/346/216/245.md +158 -0
  7. package/docs/ActiveRoadmaps/zcode-/346/227/240/345/255/220/344/273/243/347/220/206/345/214/226/346/226/275/345/267/245/346/270/205/345/215/225.md +166 -0
  8. package/docs/ActiveRoadmaps//345/274/225/346/223/216/345/270/270/351/251/273/345/214/226/347/254/2542/346/255/245/344/272/244/346/216/245.md +108 -0
  9. package/docs/ActiveRoadmaps//345/274/225/346/223/216/345/270/270/351/251/273/350/277/233/347/250/213/346/226/275/345/267/245/346/270/205/345/215/225.md +178 -0
  10. package/docs/ActiveRoadmaps//346/212/225/345/275/261/345/256/277/344/270/273/346/240/207/346/263/250/344/277/256/346/255/243/350/256/276/350/256/241.md +61 -0
  11. package/docs/ActiveRoadmaps//346/212/225/345/275/261/351/241/265/346/213/206/345/210/206/346/226/275/345/267/245/346/270/205/345/215/225.md +116 -0
  12. package/docs/ActiveRoadmaps//347/224/273/345/270/203/347/233/264/350/277/236/345/274/225/346/223/216/346/226/275/345/267/245/346/270/205/345/215/225.md +259 -0
  13. package/docs/README.md +38 -0
  14. package/docs/Specs//345/205/254/345/205/261/345/261/202/350/256/276/350/256/241/347/272/246/346/235/237.md +63 -0
  15. package/docs/Specs//345/256/277/344/270/273/346/216/245/345/205/245/346/270/205/345/215/225.md +137 -0
  16. package/docs/Specs//346/212/225/345/275/261/344/270/255/345/277/203/350/241/214/345/215/217/350/256/256.md +569 -0
  17. package/docs/Specs//350/267/250/345/256/277/344/270/273/345/257/271/350/257/235/346/223/215/344/275/234/346/214/207/345/215/227.md +124 -0
  18. package/femo2host/AGENTS.md +165 -0
  19. package/femo2host/femoGenConnector/SKILL.common.md +232 -0
  20. package/femo2host/femoGenConnector/engine-client.mjs +255 -0
  21. package/femo2host/femoGenConnector/femogen-canvas-state.mjs +56 -0
  22. package/femo2host/femoGenConnector/femogen-files.d.mts +22 -0
  23. package/femo2host/femoGenConnector/femogen-files.mjs +208 -0
  24. package/femo2host/femoGenConnector/file-dialogs.d.mts +15 -0
  25. package/femo2host/femoGenConnector/file-dialogs.mjs +131 -0
  26. package/femo2host/femoGenConnector/sse-core.d.mts +40 -0
  27. package/femo2host/femoGenConnector/sse-core.mjs +95 -0
  28. package/femo2host/femoRoot.d.mts +7 -0
  29. package/femo2host/femoRoot.mjs +44 -0
  30. package/femo2host/femoToolcall/chronica.py +159 -156
  31. package/femo2host/femoToolcall/femo_debugger.py +1518 -1515
  32. package/femo2host/femo_api.py +472 -437
  33. package/femo2host/femo_gen_api.jsx +90 -77
  34. package/femo2host/host/api-retry.d.mts +44 -0
  35. package/femo2host/host/api-retry.mjs +155 -0
  36. package/femo2host/host/cast-core.d.mts +20 -0
  37. package/femo2host/host/cast-core.mjs +113 -0
  38. package/femo2host/host/daemon-client.d.mts +63 -0
  39. package/femo2host/host/daemon-client.mjs +606 -0
  40. package/femo2host/host/debug-run-core.d.mts +121 -0
  41. package/femo2host/host/debug-run-core.mjs +531 -0
  42. package/femo2host/host/delivery-queue.d.mts +18 -0
  43. package/femo2host/host/delivery-queue.mjs +101 -0
  44. package/femo2host/host/event-core.d.mts +84 -0
  45. package/femo2host/host/event-core.mjs +356 -0
  46. package/femo2host/host/femo-relation.d.mts +22 -0
  47. package/femo2host/host/femo-relation.mjs +39 -0
  48. package/femo2host/host/hub-client.d.mts +11 -0
  49. package/femo2host/host/hub-client.mjs +74 -0
  50. package/femo2host/host/hub-feed-core.d.mts +68 -0
  51. package/femo2host/host/hub-feed-core.mjs +274 -0
  52. package/femo2host/host/hub-render-core.d.mts +43 -0
  53. package/femo2host/host/hub-render-core.mjs +140 -0
  54. package/femo2host/host/mailbox-push-core.d.mts +40 -0
  55. package/femo2host/host/mailbox-push-core.mjs +113 -0
  56. package/femo2host/host/mount-registry.mjs +110 -0
  57. package/femo2host/host/node-retry.d.mts +37 -0
  58. package/femo2host/host/node-retry.mjs +200 -0
  59. package/femo2host/host/notice-core.d.mts +33 -0
  60. package/femo2host/host/notice-core.mjs +83 -0
  61. package/femo2host/host/projection-core.d.mts +78 -0
  62. package/femo2host/host/projection-core.mjs +279 -0
  63. package/femo2host/host/run-control-core.d.mts +23 -0
  64. package/femo2host/host/run-control-core.mjs +72 -0
  65. package/femo2host/host/run-state-core.d.mts +59 -0
  66. package/femo2host/host/run-state-core.mjs +173 -0
  67. package/femo2host/host/session-registry.mjs +56 -0
  68. package/femo2host/host/skill-expand.d.mts +11 -0
  69. package/femo2host/host/skill-expand.mjs +51 -0
  70. package/femo2host/host/speech-core.d.mts +43 -0
  71. package/femo2host/host/speech-core.mjs +75 -0
  72. package/femo2host/host/state-files.d.mts +35 -0
  73. package/femo2host/host/state-files.mjs +267 -0
  74. package/femo2host/host/subagent-core.d.mts +81 -0
  75. package/femo2host/host/subagent-core.mjs +303 -0
  76. package/femo2host/host/tools-core.d.mts +72 -0
  77. package/femo2host/host/tools-core.mjs +684 -0
  78. package/femo2host/host/variable-api.d.mts +23 -0
  79. package/femo2host/host/variable-api.mjs +90 -0
  80. package/femo2host/mail_courier.py +104 -0
  81. package/femo2host/mailbox.py +545 -0
  82. package/femo2host/projectionCenter/app.css +848 -0
  83. package/femo2host/projectionCenter/composer.mjs +272 -0
  84. package/femo2host/projectionCenter/debug-panel.mjs +131 -0
  85. package/femo2host/projectionCenter/index.html +96 -0
  86. package/femo2host/projectionCenter/main.mjs +479 -0
  87. package/femo2host/projectionCenter/panels.mjs +280 -0
  88. package/femo2host/projectionCenter/render.mjs +695 -0
  89. package/femo2host/projectionCenter/sessions.mjs +138 -0
  90. package/femo2host/projectionCenter/state.mjs +105 -0
  91. package/femo2host/projectionCenter/theme.css +250 -0
  92. package/femo2host/projectionCenter/util.mjs +96 -0
  93. package/femo2host/projection_hub.py +8422 -0
  94. package/femo2host/python/femo_bridge.py +2131 -0
  95. package/femo2host/python/femo_daemon.py +1209 -0
  96. package/femo2host/python/setting.py +153 -0
  97. package/femoBridges/ContextExample.py +167 -42
  98. package/femoBridges/MemoryExample.py +33 -30
  99. package/femoBridges/getDir/get_dir.py +32 -18
  100. package/femoBridges/getDir//344/275/240/345/217/257/344/273/245/350/256/276/345/256/232/344/273/273/346/204/217/346/226/207/344/273/266/345/244/271/344/270/272/347/224/250/346/210/267/346/225/260/346/215/256/346/226/207/344/273/266/345/244/271.txt +1 -1
  101. package/femoBridges/llmBridge.py +1 -1
  102. package/femoBridges/llmProviders.py +39 -35
  103. package/femoCompiler/AGENTS.md +185 -0
  104. package/femoCompiler/FEMO_CLIrenderer.py +50 -30
  105. package/femoCompiler/FEMO_config.py +2 -1
  106. package/femoCompiler/FEMO_errors.py +286 -278
  107. package/femoCompiler/FEMO_normalizer.py +12 -7
  108. package/femoCompiler/FEMO_parser.py +217 -118
  109. package/femoCompiler/FEMO_runtime.py +491 -251
  110. package/femoCompiler/FEMO_scope_resolver.py +6 -3
  111. package/femoCompiler/actor_resolver.py +3 -3
  112. package/femoCompiler/block_collector.py +31 -28
  113. package/femoCompiler/db_utils.py +18 -0
  114. package/femoCompiler/femoAsync.py +436 -401
  115. package/femoCompiler/host_manifest.py +22 -2
  116. package/femoCompiler/job_manager.py +203 -61
  117. package/femoCompiler/protocol.py +13 -12
  118. package/femoCompiler/save_dialog.py +103 -59
  119. package/femoCompiler/task_world.py +579 -544
  120. package/femoCompiler/vars/checkpoint.py +3 -3
  121. package/femoCompiler/vars/env.py +77 -12
  122. package/femoCompiler/vars/evaluator.py +11 -6
  123. package/femoCompiler/vars/join.py +1 -1
  124. package/femoCompiler/vars/model.py +7 -7
  125. package/femoExamples/AI/345/211/252/350/247/206/351/242/221/AI/345/211/252/350/247/206/351/242/221.femo +5 -5
  126. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/AI/350/201/212/345/244/251/345/256/244-/345/270/246agent/347/211/210.femo +142 -0
  127. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/AI/350/201/212/345/244/251/345/256/244.femo +111 -0
  128. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/random_wait_time.py +80 -10
  129. package/{hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/LuxFiat/luxfiat.femo → femoExamples/LuxFiat/luxfiat-loop.femo} +67 -38
  130. package/femoExamples/LuxFiat/{luxfiat.femo → luxfiat-simple.femo} +1 -15
  131. package/femoExamples/LuxFiat/wait.py +2 -2
  132. package/femoExamples/_join_wiring_tlib.py +28 -0
  133. package/femoExamples/discussion.femo +7 -5
  134. package/femoExamples/mt_test/file_a.py +5 -0
  135. package/femoExamples/plan-mode.femo +55 -0
  136. package/femoExamples//345/237/272/347/241/200/350/277/236/351/200/232/346/265/213/350/257/225.femo +38 -0
  137. package/femoExamples//347/213/274/344/272/272/346/235/200/werewolf_utils2.py +248 -20
  138. package/femoExamples//347/213/274/344/272/272/346/235/200/werewolf_utils9.py +609 -0
  139. package/{hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200-/350/255/246/351/225/277/347/211/210.femo → femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200-/350/255/246/351/225/277/347/211/210-9/344/272/272/351/242/204/345/245/263/347/214/216.femo} +308 -53
  140. package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200-/350/255/246/351/225/277/347/211/210.femo +222 -47
  141. package/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200.femo +4 -4
  142. package/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225/undercover_utils.py +286 -2
  143. package/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225-/350/217/234/345/270/202/345/234/272/345/261/200.femo +95 -3
  144. package/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225.femo +126 -42
  145. package/femoGen/AGENTS.md +145 -0
  146. package/femoGen/document_ch.html +20 -13
  147. package/femoGen/document_en.html +9 -2
  148. package/femoGen/index.html +4 -2
  149. package/femoGen/intro_ch.html +28 -26
  150. package/femoGen/intro_en.html +9 -2
  151. package/femoGen/src/FemoWorAuto.jsx +1215 -257
  152. package/femoGen/src/actionModal.jsx +2 -2
  153. package/femoGen/src/bubbleOverlay.jsx +7 -5
  154. package/femoGen/src/canvasNodes.jsx +261 -61
  155. package/femoGen/src/common.jsx +94 -20
  156. package/femoGen/src/debugPanel.jsx +170 -43
  157. package/femoGen/src/engineWatch.jsx +323 -0
  158. package/femoGen/src/faIcons.jsx +11 -4
  159. package/femoGen/src/femoDiagnostics.js +1 -1
  160. package/femoGen/src/femoDirBrowse.jsx +430 -0
  161. package/femoGen/src/femoFileList.jsx +36 -6
  162. package/femoGen/src/femoGenerator.jsx +9 -9
  163. package/femoGen/src/femoParser.jsx +2276 -2255
  164. package/femoGen/src/femoPreview.jsx +30 -0
  165. package/femoGen/src/femoSaveReminder.jsx +75 -0
  166. package/femoGen/src/graphBuilder.jsx +2 -2
  167. package/femoGen/src/indentEdit.js +81 -0
  168. package/femoGen/src/libPanel.jsx +1 -1
  169. package/femoGen/src/mobileView.jsx +2871 -2796
  170. package/femoGen/src/projectPanel.jsx +2 -2
  171. package/femoGen/src/snap.js +101 -0
  172. package/femoGen/src/soulModal.jsx +4 -2
  173. package/femoGen/src/styles/font.css +13 -10
  174. package/femoGen/src/themes.js +297 -12
  175. package/femoGen/src/watchMirror.js +170 -0
  176. package/femoGen/vite.config.js +33 -28
  177. package/hostAdapter/dshAdapter/README.md +112 -68
  178. package/hostAdapter/dshAdapter/build.mjs +49 -6
  179. package/hostAdapter/dshAdapter/check-imports.mjs +85 -0
  180. package/hostAdapter/dshAdapter/client/client-ui/cast-button.tsx +232 -0
  181. package/hostAdapter/dshAdapter/client/{lineage-fork-native.jsx → client-ui/catalog-dropdown.jsx} +689 -624
  182. package/hostAdapter/dshAdapter/client/client-ui/chat-node.tsx +12 -9
  183. package/hostAdapter/dshAdapter/client/client-ui/composer-common.tsx +74 -0
  184. package/hostAdapter/dshAdapter/client/client-ui/composer-permission.tsx +183 -0
  185. package/hostAdapter/dshAdapter/client/client-ui/composer-ring.tsx +196 -0
  186. package/hostAdapter/dshAdapter/client/client-ui/composer-run-state.tsx +134 -0
  187. package/hostAdapter/dshAdapter/client/client-ui/composer-stats.tsx +163 -0
  188. package/hostAdapter/dshAdapter/client/client-ui/composer.tsx +417 -1100
  189. package/hostAdapter/dshAdapter/client/client-ui/editor-page.tsx +747 -726
  190. package/hostAdapter/dshAdapter/client/client-ui/editor-view.tsx +89 -88
  191. package/hostAdapter/dshAdapter/client/client-ui/hub-constants.ts +10 -0
  192. package/hostAdapter/dshAdapter/client/client-ui/hub-window.tsx +545 -0
  193. package/hostAdapter/dshAdapter/client/client-ui/primitives-compat.ts +39 -0
  194. package/hostAdapter/dshAdapter/client/client-ui/proj2/frame-router.ts +17 -52
  195. package/hostAdapter/dshAdapter/client/client-ui/proj2/index.ts +1 -1
  196. package/hostAdapter/dshAdapter/client/client-ui/proj2/ledger.ts +12 -12
  197. package/hostAdapter/dshAdapter/client/client-ui/proj2/turn-view.tsx +8 -16
  198. package/hostAdapter/dshAdapter/client/client-ui/proj2/window-id.ts +8 -9
  199. package/hostAdapter/dshAdapter/client/client-ui/stream-store.ts +187 -550
  200. package/hostAdapter/dshAdapter/client/client-ui/styles.ts +4 -10
  201. package/hostAdapter/dshAdapter/client/client-ui/view-button.tsx +550 -572
  202. package/hostAdapter/dshAdapter/client/client-ui/view-state.ts +1 -1
  203. package/hostAdapter/dshAdapter/client/client.tsx +611 -518
  204. package/hostAdapter/dshAdapter/client/femo-reasoning-row.tsx +104 -103
  205. package/hostAdapter/dshAdapter/client/femo-tool-row.tsx +264 -0
  206. package/hostAdapter/dshAdapter/client/lineage-fork.jsx +55 -570
  207. package/hostAdapter/dshAdapter/dshPatch/DSH-0.1.2-fork/344/277/256/346/224/271/351/234/200/346/261/202.md +4 -4
  208. package/hostAdapter/dshAdapter/dshPatch/patch-dsh-0.1.2-alpha.1.py +1 -1
  209. package/{femo2host/femoToolcall → hostAdapter/dshAdapter}/femo-chat.mjs +4 -2
  210. package/hostAdapter/dshAdapter/host/actor-name.ts +30 -0
  211. package/hostAdapter/dshAdapter/host/actor-usage.ts +54 -0
  212. package/hostAdapter/dshAdapter/host/actors/dispatch.ts +152 -0
  213. package/hostAdapter/dshAdapter/host/actors/main/capture.ts +219 -0
  214. package/hostAdapter/dshAdapter/host/actors/main/delivery.ts +233 -0
  215. package/hostAdapter/dshAdapter/host/actors/main/index.ts +420 -0
  216. package/hostAdapter/dshAdapter/host/actors/main/notice.ts +180 -0
  217. package/hostAdapter/dshAdapter/host/actors/native/child-setup.ts +103 -0
  218. package/hostAdapter/dshAdapter/host/actors/native/index.ts +672 -0
  219. package/hostAdapter/dshAdapter/host/actors/native/registry.ts +55 -0
  220. package/hostAdapter/dshAdapter/host/actors/native/turn-watch.ts +159 -0
  221. package/hostAdapter/dshAdapter/host/api-retry.ts +30 -123
  222. package/hostAdapter/dshAdapter/host/bridge-supervisor.ts +96 -0
  223. package/hostAdapter/dshAdapter/host/bridge.ts +147 -224
  224. package/hostAdapter/dshAdapter/host/compat/dsh-session-host.ts +46 -0
  225. package/hostAdapter/dshAdapter/host/{list-cache.ts → compat/list-cache.ts} +1 -1
  226. package/hostAdapter/dshAdapter/host/compat/plugin-source.ts +41 -0
  227. package/hostAdapter/dshAdapter/host/config.ts +149 -124
  228. package/hostAdapter/dshAdapter/host/debug-run.ts +274 -793
  229. package/hostAdapter/dshAdapter/host/diag/debug-log.ts +44 -0
  230. package/hostAdapter/dshAdapter/host/{diag-feed.ts → diag/diag-feed.ts} +11 -18
  231. package/hostAdapter/dshAdapter/host/{host-log.ts → diag/host-log.ts} +1 -1
  232. package/hostAdapter/dshAdapter/host/engine-transcript.ts +2 -2
  233. package/hostAdapter/dshAdapter/host/events/engine-events.ts +747 -0
  234. package/hostAdapter/dshAdapter/host/events/mailbox-push.ts +332 -0
  235. package/hostAdapter/dshAdapter/host/{pre-step-gate.ts → events/pre-step-gate.ts} +26 -32
  236. package/hostAdapter/dshAdapter/host/femo-files.ts +6 -207
  237. package/hostAdapter/dshAdapter/host/femo-skill.ts +153 -0
  238. package/hostAdapter/dshAdapter/host/femoIdentity.ts +101 -0
  239. package/hostAdapter/dshAdapter/host/http.ts +10 -12
  240. package/hostAdapter/dshAdapter/host/hub/god-mirror.ts +307 -0
  241. package/hostAdapter/dshAdapter/host/hub/hub-feed.ts +129 -0
  242. package/hostAdapter/dshAdapter/host/hub/hub-proxy.ts +203 -0
  243. package/hostAdapter/dshAdapter/host/{stream-frames.ts → hub/stream-frames.ts} +36 -77
  244. package/hostAdapter/dshAdapter/host/index.ts +354 -638
  245. package/hostAdapter/dshAdapter/host/job-index.ts +36 -0
  246. package/hostAdapter/dshAdapter/host/main-actor.ts +24 -853
  247. package/hostAdapter/dshAdapter/host/main-delivery-queue.ts +5 -112
  248. package/hostAdapter/dshAdapter/host/node-retry.ts +22 -246
  249. package/hostAdapter/dshAdapter/host/persona.ts +50 -96
  250. package/hostAdapter/dshAdapter/host/projection/hub-anchor.ts +21 -0
  251. package/hostAdapter/dshAdapter/host/{projection.ts → projection/projection.ts} +112 -188
  252. package/hostAdapter/dshAdapter/host/{windowing-native.ts → projection/windowing-native.ts} +35 -37
  253. package/hostAdapter/dshAdapter/host/routes/dialogs.ts +63 -0
  254. package/hostAdapter/dshAdapter/host/routes/engine-gateway.ts +128 -0
  255. package/hostAdapter/dshAdapter/host/routes/index.ts +603 -0
  256. package/hostAdapter/dshAdapter/host/{projection-input.ts → routes/projection-input.ts} +255 -246
  257. package/hostAdapter/dshAdapter/host/routes/projection.ts +174 -0
  258. package/hostAdapter/dshAdapter/host/routes/run.ts +127 -0
  259. package/hostAdapter/dshAdapter/host/routes/script-files.ts +68 -0
  260. package/hostAdapter/dshAdapter/host/routes/state.ts +273 -0
  261. package/hostAdapter/dshAdapter/host/run-control.ts +687 -641
  262. package/hostAdapter/dshAdapter/host/session-roster.ts +407 -0
  263. package/hostAdapter/dshAdapter/host/sse.ts +27 -0
  264. package/hostAdapter/dshAdapter/host/state-files.ts +13 -301
  265. package/hostAdapter/dshAdapter/host/tool-deps.ts +299 -0
  266. package/hostAdapter/dshAdapter/host/tools.ts +395 -486
  267. package/hostAdapter/dshAdapter/host/verbs.ts +81 -0
  268. package/hostAdapter/dshAdapter/host.manifest.json +2 -1
  269. package/hostAdapter/dshAdapter/lib/client.js +9209 -6558
  270. package/hostAdapter/dshAdapter/lib/client.js.map +4 -4
  271. package/hostAdapter/dshAdapter/lib/index.js +13 -8213
  272. package/hostAdapter/dshAdapter/lib/index.js.map +4 -4
  273. package/hostAdapter/dshAdapter/lib/main.js +10154 -0
  274. package/hostAdapter/dshAdapter/lib/main.js.map +7 -0
  275. package/hostAdapter/dshAdapter/package.json +5 -4
  276. package/hostAdapter/dshAdapter/pnpm-lock.yaml +606 -596
  277. package/hostAdapter/dshAdapter/shared/window-id.d.mts +5 -0
  278. package/hostAdapter/dshAdapter/shared/window-id.mjs +22 -0
  279. package/hostAdapter/dshAdapter/tsconfig.host-verify.json +6 -0
  280. package/hostAdapter/dshAdapter/tsconfig.json +1 -3
  281. package/hostAdapter/webAdapter/AGENTS.md +203 -0
  282. package/hostAdapter/webAdapter/console/index.html +760 -0
  283. package/hostAdapter/webAdapter/extension/background.js +738 -0
  284. package/hostAdapter/webAdapter/extension/bubble.js +201 -0
  285. package/hostAdapter/webAdapter/extension/icons/icon128.png +0 -0
  286. package/hostAdapter/webAdapter/extension/icons/icon16.png +0 -0
  287. package/hostAdapter/webAdapter/extension/icons/icon32.png +0 -0
  288. package/hostAdapter/webAdapter/extension/icons/icon48.png +0 -0
  289. package/hostAdapter/webAdapter/extension/seat-agent-core.js +791 -0
  290. package/hostAdapter/webAdapter/extension/sidepanel/conn.mjs +25 -0
  291. package/hostAdapter/webAdapter/extension/sidepanel/feeds.mjs +57 -0
  292. package/hostAdapter/webAdapter/extension/sidepanel/human-seat.mjs +111 -0
  293. package/hostAdapter/webAdapter/extension/sidepanel/main.mjs +186 -0
  294. package/hostAdapter/webAdapter/extension/sidepanel/run-control.mjs +183 -0
  295. package/hostAdapter/webAdapter/extension/sidepanel/seats.mjs +172 -0
  296. package/hostAdapter/webAdapter/extension/sidepanel/svclog.mjs +78 -0
  297. package/hostAdapter/webAdapter/extension/sidepanel.html +600 -0
  298. package/hostAdapter/webAdapter/manifest.json +158 -0
  299. package/hostAdapter/webAdapter/native/install-native-host.cmd +8 -0
  300. package/hostAdapter/webAdapter/native/install-native-host.mjs +27 -0
  301. package/hostAdapter/webAdapter/native/register-core.mjs +101 -0
  302. package/hostAdapter/webAdapter/native/web-launcher.cs +141 -0
  303. package/hostAdapter/webAdapter/native/web-launcher.mjs +160 -0
  304. package/hostAdapter/webAdapter/package.json +13 -0
  305. package/hostAdapter/webAdapter/readme.md +365 -0
  306. package/hostAdapter/webAdapter/server/board.mjs +42 -0
  307. package/hostAdapter/webAdapter/server/bridge.mjs +68 -0
  308. package/hostAdapter/webAdapter/server/canvas.mjs +520 -0
  309. package/hostAdapter/webAdapter/server/http-io.mjs +20 -0
  310. package/hostAdapter/webAdapter/server/keeper.mjs +114 -0
  311. package/hostAdapter/webAdapter/server/mailbox-push.mjs +184 -0
  312. package/hostAdapter/webAdapter/server/runtime.mjs +1025 -0
  313. package/hostAdapter/webAdapter/server/seats.mjs +239 -0
  314. package/hostAdapter/webAdapter/server/service.mjs +1051 -0
  315. package/hostAdapter/webAdapter/shared/dom.mjs +33 -0
  316. package/hostAdapter/webAdapter/shared/femo-logo.mjs +36 -0
  317. package/hostAdapter/webAdapter/shared/guard.mjs +28 -0
  318. package/hostAdapter/webAdapter/shared/human-seat-core.mjs +56 -0
  319. package/hostAdapter/webAdapter/shared/run-core.mjs +20 -0
  320. package/hostAdapter/webAdapter/shared/seats-core.mjs +73 -0
  321. package/hostAdapter/webAdapter/sites/aistudio.google.com/SITE.md +66 -0
  322. package/hostAdapter/webAdapter/sites/aistudio.google.com/content.js +144 -0
  323. package/hostAdapter/webAdapter/sites/aistudio.google.com/inject.js +240 -0
  324. package/hostAdapter/webAdapter/sites/aistudio.google.com/site.mjs +70 -0
  325. package/hostAdapter/webAdapter/sites/chat.deepseek.com/SITE.md +77 -0
  326. package/hostAdapter/webAdapter/sites/chat.deepseek.com/content.js +103 -0
  327. package/hostAdapter/webAdapter/sites/chat.deepseek.com/inject.js +181 -0
  328. package/hostAdapter/webAdapter/sites/chat.deepseek.com/site.mjs +73 -0
  329. package/hostAdapter/webAdapter/sites/chatglm.cn/SITE.md +63 -0
  330. package/hostAdapter/webAdapter/sites/chatglm.cn/content.js +121 -0
  331. package/hostAdapter/webAdapter/sites/chatglm.cn/inject.js +190 -0
  332. package/hostAdapter/webAdapter/sites/chatglm.cn/site.mjs +63 -0
  333. package/hostAdapter/webAdapter/sites/chatgpt.com/SITE.md +58 -0
  334. package/hostAdapter/webAdapter/sites/chatgpt.com/content.js +124 -0
  335. package/hostAdapter/webAdapter/sites/chatgpt.com/inject.js +404 -0
  336. package/hostAdapter/webAdapter/sites/chatgpt.com/site.mjs +68 -0
  337. package/hostAdapter/webAdapter/sites/grok.com/SITE.md +42 -0
  338. package/hostAdapter/webAdapter/sites/grok.com/content.js +120 -0
  339. package/hostAdapter/webAdapter/sites/grok.com/inject.js +259 -0
  340. package/hostAdapter/webAdapter/sites/grok.com/site.mjs +73 -0
  341. package/hostAdapter/webAdapter/sites/www.doubao.com/SITE.md +62 -0
  342. package/hostAdapter/webAdapter/sites/www.doubao.com/content.js +115 -0
  343. package/hostAdapter/webAdapter/sites/www.doubao.com/inject.js +232 -0
  344. package/hostAdapter/webAdapter/sites/www.doubao.com/site.mjs +62 -0
  345. package/hostAdapter/webAdapter/sites/www.kimi.com/SITE.md +57 -0
  346. package/hostAdapter/webAdapter/sites/www.kimi.com/content.js +117 -0
  347. package/hostAdapter/webAdapter/sites/www.kimi.com/inject.js +194 -0
  348. package/hostAdapter/webAdapter/sites/www.kimi.com/site.mjs +61 -0
  349. package/hostAdapter/webAdapter/sites/www.qianwen.com/SITE.md +43 -0
  350. package/hostAdapter/webAdapter/sites/www.qianwen.com/content.js +123 -0
  351. package/hostAdapter/webAdapter/sites/www.qianwen.com/inject.js +273 -0
  352. package/hostAdapter/webAdapter/sites/www.qianwen.com/site.mjs +72 -0
  353. package/hostAdapter/webAdapter/sites.mjs +67 -0
  354. package/hostAdapter/webAdapter/start-service.cmd +13 -0
  355. package/hostAdapter/webAdapter/tests/canvas-files.test.mjs +134 -0
  356. package/hostAdapter/webAdapter/tests/chatgpt-parser.test.mjs +161 -0
  357. package/hostAdapter/webAdapter/tests/doubao-parser.test.mjs +151 -0
  358. package/hostAdapter/webAdapter/tests/keeper.test.mjs +108 -0
  359. package/hostAdapter/webAdapter/tests/runtime.test.mjs +962 -0
  360. package/hostAdapter/webAdapter/tests/seats-core.test.mjs +134 -0
  361. package/hostAdapter/webAdapter/tests/site-boundary.test.mjs +161 -0
  362. package/hostAdapter/webAdapter/tests/smoke-bridge.mjs +65 -0
  363. package/hostAdapter/webAdapter/tests/smoke-service.mjs +232 -0
  364. package/hostAdapter/webAdapter/web.host.manifest.json +6 -0
  365. package/hostAdapter/zcodeAdapter/.zcode-plugin/plugin.json +23 -23
  366. package/hostAdapter/zcodeAdapter/README.md +73 -61
  367. package/hostAdapter/zcodeAdapter/commands/femo.md +8 -9
  368. package/hostAdapter/zcodeAdapter/hooks/hooks.json +13 -16
  369. package/hostAdapter/zcodeAdapter/hooks/lib.mjs +318 -59
  370. package/hostAdapter/zcodeAdapter/hooks/mail-context.mjs +4 -0
  371. package/hostAdapter/zcodeAdapter/hooks/stop-intent.mjs +4 -3
  372. package/hostAdapter/zcodeAdapter/hooks/turn-collect.mjs +3 -0
  373. package/hostAdapter/zcodeAdapter/icon.png +0 -0
  374. package/hostAdapter/zcodeAdapter/mcp/engine-bind.mjs +56 -0
  375. package/hostAdapter/zcodeAdapter/mcp/event-router.mjs +42 -258
  376. package/hostAdapter/zcodeAdapter/mcp/femo-server.mjs +198 -320
  377. package/hostAdapter/zcodeAdapter/paths.mjs +78 -0
  378. package/hostAdapter/zcodeAdapter/runtime/femo-possess.mjs +356 -0
  379. package/hostAdapter/zcodeAdapter/runtime/femo-stream-watcher.mjs +214 -0
  380. package/hostAdapter/zcodeAdapter/runtime/mailbox-cli.mjs +33 -0
  381. package/hostAdapter/zcodeAdapter/runtime/pulled-letter.mjs +36 -0
  382. package/hostAdapter/zcodeAdapter/runtime/speech-collect.mjs +547 -0
  383. package/hostAdapter/zcodeAdapter/skills/femo/SKILL.md +52 -89
  384. package/hostAdapter/zcodeAdapter/tests/bridge-smoke.mjs +16 -6
  385. package/hostAdapter/zcodeAdapter/tests/event-router.test.mjs +160 -157
  386. package/hostAdapter/zcodeAdapter/tests/harness.mjs +91 -0
  387. package/hostAdapter/zcodeAdapter/tests/hooks-smoke.mjs +205 -0
  388. package/hostAdapter/zcodeAdapter/tests/integration-human.mjs +34 -17
  389. package/hostAdapter/zcodeAdapter/tests/main-actor.mjs +203 -107
  390. package/hostAdapter/zcodeAdapter/tests/mcp-smoke.mjs +100 -130
  391. package/hostAdapter/zcodeAdapter/tests/memory-store.mjs +72 -0
  392. package/hostAdapter/zcodeAdapter/tests/modelio-weave.test.mjs +82 -0
  393. package/hostAdapter/zcodeAdapter/tests/mount-state.test.mjs +150 -0
  394. package/hostAdapter/zcodeAdapter/tests/pulled-letter.test.mjs +77 -0
  395. package/hostAdapter/zcodeAdapter/tests/run-state-core.test.mjs +95 -0
  396. package/hostAdapter/zcodeAdapter/tests/speech-draft.mjs +163 -0
  397. package/hostAdapter/zcodeAdapter/tests/stream-watcher.test.mjs +154 -0
  398. package/hostAdapter/zcodeAdapter/tests/turn-marker.test.mjs +110 -0
  399. package/hostAdapter/zcodeAdapter/tests/unbound-actors.test.mjs +48 -0
  400. package/hostAdapter/zcodeAdapter/tests/variable-api.test.mjs +79 -0
  401. package/hostAdapter/zcodeAdapter/zcode.host.manifest.json +2 -1
  402. package/package.json +2 -2
  403. package//350/257/255/346/263/225/346/226/207/346/241/243.md +1202 -1136
  404. package/FEMO_logo.svg +0 -55
  405. package/FEMO_logo_slogan.svg +0 -29
  406. package/_tmp/fallback/driver2.py +0 -176
  407. package/_tmp/fallback/events.jsonl +0 -108
  408. package/_tmp/fallback/gateway_ui.py +0 -325
  409. package/_tmp/fallback/outbox/j1553_human_[/347/234/213/347/211/214]_1.done +0 -1
  410. package/_tmp/fallback/outbox/r1.done +0 -1
  411. package/_tmp/fallback/outbox/r2.done +0 -1
  412. package/_tmp/fallback/outbox/r3.done +0 -1
  413. package/_tmp/fallback/outbox/r4.done +0 -1
  414. package/_tmp/fallback/outbox/r5.done +0 -1
  415. package/femoExamples/AI/350/201/212/345/244/251/345/256/244/group-chat.femo +0 -42
  416. package/femoGen/src/useCanvasInteraction.jsx +0 -319
  417. package/hostAdapter/dshAdapter/client/client-ui/femo-stream-live.tsx +0 -264
  418. package/hostAdapter/dshAdapter/dshPatch/MEOW_MODIFICATIONS.md +0 -3105
  419. package/hostAdapter/dshAdapter/host/debug-log.ts +0 -29
  420. package/hostAdapter/dshAdapter/host/engine-events.ts +0 -894
  421. package/hostAdapter/dshAdapter/host/god-mirror.ts +0 -234
  422. package/hostAdapter/dshAdapter/host/preset-install.ts +0 -59
  423. package/hostAdapter/dshAdapter/host/proj-trace.ts +0 -49
  424. package/hostAdapter/dshAdapter/host/routes.ts +0 -1196
  425. package/hostAdapter/dshAdapter/host/section-gate.ts +0 -108
  426. package/hostAdapter/dshAdapter/host/subagent-native.ts +0 -997
  427. package/hostAdapter/dshAdapter/host/subagent.ts +0 -1205
  428. package/hostAdapter/dshAdapter/package-lock.json +0 -500
  429. package/hostAdapter/dshAdapter/preset/agent.cordis.yml +0 -220
  430. package/hostAdapter/dshAdapter/preset/preset.yml +0 -3
  431. package/hostAdapter/dshAdapter/python/dev-bridge-test.py +0 -43
  432. package/hostAdapter/dshAdapter/python/femo_bridge.py +0 -533
  433. package/hostAdapter/zcodeAdapter/.tmp/femo/host-history/gateway.port +0 -1
  434. package/hostAdapter/zcodeAdapter/.tmp/femo/host-history/proj-mirror/femo-main-a-_40_52a9_624b.jsonl +0 -3
  435. package/hostAdapter/zcodeAdapter/.tmp/femo/host-history/proj-mirror/femo-main-a-_40_6211.jsonl +0 -10
  436. package/hostAdapter/zcodeAdapter/.tmp/femo/host-history/proj-mirror/femo-main-god.jsonl +0 -11
  437. package/hostAdapter/zcodeAdapter/.tmp/femo/host-history/proj-mirror/femo-main-stage.jsonl +0 -11
  438. package/hostAdapter/zcodeAdapter/femo-zcode-dist/.zcode-plugin/plugin.json +0 -23
  439. package/hostAdapter/zcodeAdapter/femo-zcode-dist/LICENSE +0 -201
  440. package/hostAdapter/zcodeAdapter/femo-zcode-dist/README.md +0 -635
  441. package/hostAdapter/zcodeAdapter/femo-zcode-dist/commands/femo.md +0 -9
  442. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/__init__.py +0 -4
  443. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/femoToolcall/chronica.py +0 -156
  444. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/femoToolcall/femo-chat.mjs +0 -69
  445. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/femoToolcall/femo_debugger.py +0 -1515
  446. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/femo_api.py +0 -437
  447. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femo2host/femo_gen_api.jsx +0 -77
  448. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/ContextExample.py +0 -555
  449. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/MemoryExample.py +0 -163
  450. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/__init__.py +0 -1
  451. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/getDir/get_dir.py +0 -56
  452. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/getDir//344/275/240/345/217/257/344/273/245/350/256/276/345/256/232/344/273/273/346/204/217/346/226/207/344/273/266/345/244/271/344/270/272/347/224/250/346/210/267/346/225/260/346/215/256/346/226/207/344/273/266/345/244/271.txt +0 -10
  453. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/llmBridge.py +0 -247
  454. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoBridges/llmProviders.py +0 -308
  455. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_CLIrenderer.py +0 -198
  456. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_config.py +0 -35
  457. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_errors.py +0 -278
  458. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_interpreter.py +0 -163
  459. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_normalizer.py +0 -396
  460. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_parser.py +0 -2468
  461. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_runtime.py +0 -3630
  462. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/FEMO_scope_resolver.py +0 -209
  463. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/__init__.py +0 -1
  464. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/actor_resolver.py +0 -86
  465. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/block_collector.py +0 -441
  466. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/db_utils.py +0 -485
  467. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/femoAsync.py +0 -401
  468. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/host_manifest.py +0 -68
  469. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/job_manager.py +0 -767
  470. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/protocol.py +0 -126
  471. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/save_dialog.py +0 -402
  472. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/task_world.py +0 -544
  473. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/__init__.py +0 -19
  474. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/checkpoint.py +0 -113
  475. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/env.py +0 -686
  476. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/evaluator.py +0 -567
  477. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/join.py +0 -303
  478. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/merge.py +0 -157
  479. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoCompiler/vars/model.py +0 -245
  480. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/AI/345/211/252/350/247/206/351/242/221/AI/345/211/252/350/247/206/351/242/221.femo +0 -192
  481. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/AI/350/201/212/345/244/251/345/256/244/group-chat.femo +0 -42
  482. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/AI/350/201/212/345/244/251/345/256/244/random_wait_time.py +0 -10
  483. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/LuxFiat/wait.py +0 -29
  484. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/debug/347/245/236/345/231/250/debug/347/245/236/345/231/250.femo +0 -222
  485. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/discussion.femo +0 -70
  486. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples/goal-mode.femo +0 -23
  487. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//345/270/270/347/224/250/345/267/245/345/205/267python/wait.py +0 -29
  488. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//347/213/274/344/272/272/346/235/200/werewolf_utils.py +0 -205
  489. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//347/213/274/344/272/272/346/235/200/werewolf_utils2.py +0 -324
  490. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//347/213/274/344/272/272/346/235/200//347/213/274/344/272/272/346/235/200.femo +0 -331
  491. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225/undercover_utils.py +0 -683
  492. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225-/350/217/234/345/270/202/345/234/272/345/261/200.femo +0 -348
  493. package/hostAdapter/zcodeAdapter/femo-zcode-dist/femoExamples//350/260/201/346/230/257/345/215/247/345/272/225//350/260/201/346/230/257/345/215/247/345/272/225.femo +0 -393
  494. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/after-tool.mjs +0 -3
  495. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/hooks.json +0 -16
  496. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/lib.mjs +0 -59
  497. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/prompt-state.mjs +0 -3
  498. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/session-start.mjs +0 -3
  499. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hooks/stop-intent.mjs +0 -3
  500. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hostAdapter/dshAdapter/python/dev-bridge-test.py +0 -43
  501. package/hostAdapter/zcodeAdapter/femo-zcode-dist/hostAdapter/dshAdapter/python/femo_bridge.py +0 -533
  502. package/hostAdapter/zcodeAdapter/femo-zcode-dist/mcp/bridge-manager.mjs +0 -192
  503. package/hostAdapter/zcodeAdapter/femo-zcode-dist/mcp/event-router.mjs +0 -258
  504. package/hostAdapter/zcodeAdapter/femo-zcode-dist/mcp/femo-server.mjs +0 -429
  505. package/hostAdapter/zcodeAdapter/femo-zcode-dist/mcp/gateway.mjs +0 -163
  506. package/hostAdapter/zcodeAdapter/femo-zcode-dist/mcp/projection-writer.mjs +0 -294
  507. package/hostAdapter/zcodeAdapter/femo-zcode-dist/skills/femo/SKILL.md +0 -93
  508. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/bridge-smoke.mjs +0 -26
  509. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/event-router.test.mjs +0 -157
  510. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/gateway-smoke.mjs +0 -107
  511. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/integration-human.mjs +0 -111
  512. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/main-actor.mjs +0 -107
  513. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/mcp-smoke.mjs +0 -130
  514. package/hostAdapter/zcodeAdapter/femo-zcode-dist/tests/projection-writer.test.mjs +0 -144
  515. package/hostAdapter/zcodeAdapter/femo-zcode-dist/zcode.host.manifest.json +0 -5
  516. package/hostAdapter/zcodeAdapter/femo-zcode-dist//346/212/225/345/275/261/347/252/227/351/207/215/350/256/276/350/256/241-/350/256/250/350/256/272/347/250/277.md +0 -113
  517. package/hostAdapter/zcodeAdapter/femo-zcode-dist//350/257/255/346/263/225/346/226/207/346/241/243.md +0 -1136
  518. package/hostAdapter/zcodeAdapter/hooks/after-tool.mjs +0 -3
  519. package/hostAdapter/zcodeAdapter/hooks/prompt-state.mjs +0 -3
  520. package/hostAdapter/zcodeAdapter/hooks/session-start.mjs +0 -3
  521. package/hostAdapter/zcodeAdapter/mcp/bridge-manager.mjs +0 -192
  522. package/hostAdapter/zcodeAdapter/mcp/gateway.mjs +0 -163
  523. package/hostAdapter/zcodeAdapter/mcp/projection-writer.mjs +0 -294
  524. package/hostAdapter/zcodeAdapter/tests/gateway-smoke.mjs +0 -107
  525. package/hostAdapter/zcodeAdapter/tests/projection-writer.test.mjs +0 -144
  526. package/hostAdapter/zcodeAdapter//346/212/225/345/275/261/347/252/227/351/207/215/350/256/276/350/256/241-/350/256/250/350/256/272/347/250/277.md +0 -113
  527. package/scripts/diag-find-redblue.mjs +0 -38
  528. package/scripts/diag-god-log.mjs +0 -31
  529. package/scripts/diag-god-log2.mjs +0 -39
  530. package/scripts/diag-god-log3.mjs +0 -35
  531. package/scripts/diag-god-log4.mjs +0 -59
  532. package/scripts/diag-god-log4b.mjs +0 -39
  533. package/scripts/diag-redblue-god.mjs +0 -39
  534. package/scripts/diag-redblue-log.mjs +0 -37
  535. package/scripts/diag-redblue-span.mjs +0 -41
  536. package/scripts/diag-stage-1017.mjs +0 -63
  537. package/scripts/dump_session.py +0 -36
  538. package/scripts/link-workspace.ps1 +0 -51
  539. package/scripts/list_souls.py +0 -18
  540. package/scripts/probe-composer-refresh.mjs +0 -197
  541. package/scripts/seed_story_souls.py +0 -86
  542. package/scripts/sync-zcode-dist.ps1 +0 -55
  543. package/scripts/theme-tokenize/color-extract.txt +0 -288
  544. package/scripts/theme-tokenize/round1-quoted.ps1 +0 -149
  545. package/scripts/theme-tokenize/round2-bare.ps1 +0 -138
  546. package/scripts/theme-tokenize/round3-shape.ps1 +0 -110
  547. package/tests/_diag_r4_join.femo +0 -32
  548. package/tests/conftest.py +0 -95
  549. package/tests/diag-subagent-dir-3081.mjs +0 -101
  550. package/tests/femoGenerator.test.mjs +0 -3909
  551. package/tests/femoParser.test.mjs +0 -4813
  552. package/tests/femogen_notice.test.mjs +0 -109
  553. package/tests/femoparser_validation.test.mjs +0 -84
  554. package/tests/main-delivery-queue.test.mjs +0 -329
  555. package/tests/pre-step-gate.test.mjs +0 -282
  556. package/tests/read-subagent-model.mjs +0 -24
  557. package/tests/run-script-tests.py +0 -97
  558. package/tests/safe-steer.test.mjs +0 -59
  559. package/tests/strip_comments.test.mjs +0 -164
  560. package/tests/test_actor_failed.py +0 -92
  561. package/tests/test_compile_warnings.py +0 -99
  562. package/tests/test_debug_log_bus.py +0 -108
  563. package/tests/test_debugger_module_mode.py +0 -141
  564. package/tests/test_error_buckets.py +0 -117
  565. package/tests/test_error_dispatcher.py +0 -261
  566. package/tests/test_exec_ai_retry.py +0 -155
  567. package/tests/test_exec_human_retry.py +0 -159
  568. package/tests/test_file_resolve.py +0 -104
  569. package/tests/test_flow_events.py +0 -311
  570. package/tests/test_flow_ref_validation.py +0 -92
  571. package/tests/test_func_dict_fallback.py +0 -39
  572. package/tests/test_job_lifecycle.py +0 -236
  573. package/tests/test_job_manager.py +0 -424
  574. package/tests/test_mind.py +0 -99
  575. package/tests/test_module_call_args.py +0 -258
  576. package/tests/test_module_visibility.py +0 -238
  577. package/tests/test_notice.py +0 -143
  578. package/tests/test_out_whitelist.py +0 -83
  579. package/tests/test_par_if_dispatch.py +0 -64
  580. package/tests/test_par_nested_for.py +0 -78
  581. package/tests/test_parser.py +0 -494
  582. package/tests/test_pause.py +0 -102
  583. package/tests/test_pause_contract.py +0 -135
  584. package/tests/test_protocol_transcript.py +0 -158
  585. package/tests/test_scope_self.py +0 -202
  586. package/tests/test_source_validate.py +0 -113
  587. package/tests/test_task_world.py +0 -447
  588. package/tests/test_town_structure.py +0 -70
  589. package/tests/test_v2_checkpoint.py +0 -115
  590. package/tests/test_v2_env.py +0 -383
  591. package/tests/test_v2_evaluator.py +0 -227
  592. package/tests/test_v2_join.py +0 -315
  593. package/tests/test_v2_join_wiring.py +0 -429
  594. package/tests/test_v2_merge.py +0 -167
  595. package/tests/test_v2_model.py +0 -143
  596. package/tests/test_v2_resume_e2e.py +0 -472
  597. package/tests/test_var_decls.py +0 -271
  598. package/tests/verify-model-functions.mjs +0 -90
  599. package/tests/verify-subagent-model-3081.mjs +0 -153
  600. package//346/226/275/345/267/245/346/270/205/345/215/225/node-notice-/346/226/275/345/267/245/346/270/205/345/215/225.md +0 -395
  601. package//346/226/275/345/267/245/346/270/205/345/215/225//344/270/244/344/270/252/345/276/205/350/247/243/345/206/263/347/232/204/351/227/256/351/242/230.MD +0 -66
  602. package//346/226/275/345/267/245/346/270/205/345/215/225//345/201/234/346/255/242/351/223/276/344/277/256/345/244/215-/346/226/275/345/267/245/346/270/205/345/215/225.md +0 -475
  603. package//346/226/275/345/267/245/346/270/205/345/215/225//345/217/230/351/207/217/344/270/216task/347/263/273/347/273/237/351/207/215/346/236/204-/346/226/275/345/267/245/346/270/205/345/215/225-v2.md +0 -847
  604. package//346/226/275/345/267/245/346/270/205/345/215/225//350/277/220/350/241/214/347/212/266/346/200/201/351/223/276/350/267/257/351/207/215/346/236/204-/346/226/275/345/267/245/346/270/205/345/215/225v4.md +0 -654
  605. package//346/226/275/345/267/245/346/270/205/345/215/225//351/224/231/350/257/257/346/263/250/345/205/245/347/273/255/350/201/212-/346/226/275/345/267/245/346/270/205/345/215/225.md +0 -471
  606. /package/hostAdapter/dshAdapter/host/{native-state.ts → compat/native-state.ts} +0 -0
  607. /package/hostAdapter/dshAdapter/host/{session-events.ts → compat/session-events.ts} +0 -0
@@ -1,3909 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- // femoGen/node_modules/react/cjs/react.development.js
28
- var require_react_development = __commonJS({
29
- "femoGen/node_modules/react/cjs/react.development.js"(exports, module) {
30
- "use strict";
31
- if (true) {
32
- (function() {
33
- "use strict";
34
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
35
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
36
- }
37
- var ReactVersion = "18.3.1";
38
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
39
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
40
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
41
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
42
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
43
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
44
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
45
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
46
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
47
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
48
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
49
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
50
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
51
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
52
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
53
- function getIteratorFn(maybeIterable) {
54
- if (maybeIterable === null || typeof maybeIterable !== "object") {
55
- return null;
56
- }
57
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
58
- if (typeof maybeIterator === "function") {
59
- return maybeIterator;
60
- }
61
- return null;
62
- }
63
- var ReactCurrentDispatcher = {
64
- /**
65
- * @internal
66
- * @type {ReactComponent}
67
- */
68
- current: null
69
- };
70
- var ReactCurrentBatchConfig = {
71
- transition: null
72
- };
73
- var ReactCurrentActQueue = {
74
- current: null,
75
- // Used to reproduce behavior of `batchedUpdates` in legacy mode.
76
- isBatchingLegacy: false,
77
- didScheduleLegacyUpdate: false
78
- };
79
- var ReactCurrentOwner = {
80
- /**
81
- * @internal
82
- * @type {ReactComponent}
83
- */
84
- current: null
85
- };
86
- var ReactDebugCurrentFrame = {};
87
- var currentExtraStackFrame = null;
88
- function setExtraStackFrame(stack) {
89
- {
90
- currentExtraStackFrame = stack;
91
- }
92
- }
93
- {
94
- ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
95
- {
96
- currentExtraStackFrame = stack;
97
- }
98
- };
99
- ReactDebugCurrentFrame.getCurrentStack = null;
100
- ReactDebugCurrentFrame.getStackAddendum = function() {
101
- var stack = "";
102
- if (currentExtraStackFrame) {
103
- stack += currentExtraStackFrame;
104
- }
105
- var impl = ReactDebugCurrentFrame.getCurrentStack;
106
- if (impl) {
107
- stack += impl() || "";
108
- }
109
- return stack;
110
- };
111
- }
112
- var enableScopeAPI = false;
113
- var enableCacheElement = false;
114
- var enableTransitionTracing = false;
115
- var enableLegacyHidden = false;
116
- var enableDebugTracing = false;
117
- var ReactSharedInternals = {
118
- ReactCurrentDispatcher,
119
- ReactCurrentBatchConfig,
120
- ReactCurrentOwner
121
- };
122
- {
123
- ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
124
- ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
125
- }
126
- function warn(format) {
127
- {
128
- {
129
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
130
- args[_key - 1] = arguments[_key];
131
- }
132
- printWarning("warn", format, args);
133
- }
134
- }
135
- }
136
- function error(format) {
137
- {
138
- {
139
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
140
- args[_key2 - 1] = arguments[_key2];
141
- }
142
- printWarning("error", format, args);
143
- }
144
- }
145
- }
146
- function printWarning(level, format, args) {
147
- {
148
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
149
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
150
- if (stack !== "") {
151
- format += "%s";
152
- args = args.concat([stack]);
153
- }
154
- var argsWithFormat = args.map(function(item) {
155
- return String(item);
156
- });
157
- argsWithFormat.unshift("Warning: " + format);
158
- Function.prototype.apply.call(console[level], console, argsWithFormat);
159
- }
160
- }
161
- var didWarnStateUpdateForUnmountedComponent = {};
162
- function warnNoop(publicInstance, callerName) {
163
- {
164
- var _constructor = publicInstance.constructor;
165
- var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
166
- var warningKey = componentName + "." + callerName;
167
- if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
168
- return;
169
- }
170
- error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
171
- didWarnStateUpdateForUnmountedComponent[warningKey] = true;
172
- }
173
- }
174
- var ReactNoopUpdateQueue = {
175
- /**
176
- * Checks whether or not this composite component is mounted.
177
- * @param {ReactClass} publicInstance The instance we want to test.
178
- * @return {boolean} True if mounted, false otherwise.
179
- * @protected
180
- * @final
181
- */
182
- isMounted: function(publicInstance) {
183
- return false;
184
- },
185
- /**
186
- * Forces an update. This should only be invoked when it is known with
187
- * certainty that we are **not** in a DOM transaction.
188
- *
189
- * You may want to call this when you know that some deeper aspect of the
190
- * component's state has changed but `setState` was not called.
191
- *
192
- * This will not invoke `shouldComponentUpdate`, but it will invoke
193
- * `componentWillUpdate` and `componentDidUpdate`.
194
- *
195
- * @param {ReactClass} publicInstance The instance that should rerender.
196
- * @param {?function} callback Called after component is updated.
197
- * @param {?string} callerName name of the calling function in the public API.
198
- * @internal
199
- */
200
- enqueueForceUpdate: function(publicInstance, callback, callerName) {
201
- warnNoop(publicInstance, "forceUpdate");
202
- },
203
- /**
204
- * Replaces all of the state. Always use this or `setState` to mutate state.
205
- * You should treat `this.state` as immutable.
206
- *
207
- * There is no guarantee that `this.state` will be immediately updated, so
208
- * accessing `this.state` after calling this method may return the old value.
209
- *
210
- * @param {ReactClass} publicInstance The instance that should rerender.
211
- * @param {object} completeState Next state.
212
- * @param {?function} callback Called after component is updated.
213
- * @param {?string} callerName name of the calling function in the public API.
214
- * @internal
215
- */
216
- enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
217
- warnNoop(publicInstance, "replaceState");
218
- },
219
- /**
220
- * Sets a subset of the state. This only exists because _pendingState is
221
- * internal. This provides a merging strategy that is not available to deep
222
- * properties which is confusing. TODO: Expose pendingState or don't use it
223
- * during the merge.
224
- *
225
- * @param {ReactClass} publicInstance The instance that should rerender.
226
- * @param {object} partialState Next partial state to be merged with state.
227
- * @param {?function} callback Called after component is updated.
228
- * @param {?string} Name of the calling function in the public API.
229
- * @internal
230
- */
231
- enqueueSetState: function(publicInstance, partialState, callback, callerName) {
232
- warnNoop(publicInstance, "setState");
233
- }
234
- };
235
- var assign = Object.assign;
236
- var emptyObject = {};
237
- {
238
- Object.freeze(emptyObject);
239
- }
240
- function Component(props, context, updater) {
241
- this.props = props;
242
- this.context = context;
243
- this.refs = emptyObject;
244
- this.updater = updater || ReactNoopUpdateQueue;
245
- }
246
- Component.prototype.isReactComponent = {};
247
- Component.prototype.setState = function(partialState, callback) {
248
- if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
249
- throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
250
- }
251
- this.updater.enqueueSetState(this, partialState, callback, "setState");
252
- };
253
- Component.prototype.forceUpdate = function(callback) {
254
- this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
255
- };
256
- {
257
- var deprecatedAPIs = {
258
- isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
259
- replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
260
- };
261
- var defineDeprecationWarning = function(methodName, info) {
262
- Object.defineProperty(Component.prototype, methodName, {
263
- get: function() {
264
- warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
265
- return void 0;
266
- }
267
- });
268
- };
269
- for (var fnName in deprecatedAPIs) {
270
- if (deprecatedAPIs.hasOwnProperty(fnName)) {
271
- defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
272
- }
273
- }
274
- }
275
- function ComponentDummy() {
276
- }
277
- ComponentDummy.prototype = Component.prototype;
278
- function PureComponent(props, context, updater) {
279
- this.props = props;
280
- this.context = context;
281
- this.refs = emptyObject;
282
- this.updater = updater || ReactNoopUpdateQueue;
283
- }
284
- var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
285
- pureComponentPrototype.constructor = PureComponent;
286
- assign(pureComponentPrototype, Component.prototype);
287
- pureComponentPrototype.isPureReactComponent = true;
288
- function createRef() {
289
- var refObject = {
290
- current: null
291
- };
292
- {
293
- Object.seal(refObject);
294
- }
295
- return refObject;
296
- }
297
- var isArrayImpl = Array.isArray;
298
- function isArray(a) {
299
- return isArrayImpl(a);
300
- }
301
- function typeName(value) {
302
- {
303
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
304
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
305
- return type;
306
- }
307
- }
308
- function willCoercionThrow(value) {
309
- {
310
- try {
311
- testStringCoercion(value);
312
- return false;
313
- } catch (e) {
314
- return true;
315
- }
316
- }
317
- }
318
- function testStringCoercion(value) {
319
- return "" + value;
320
- }
321
- function checkKeyStringCoercion(value) {
322
- {
323
- if (willCoercionThrow(value)) {
324
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
325
- return testStringCoercion(value);
326
- }
327
- }
328
- }
329
- function getWrappedName(outerType, innerType, wrapperName) {
330
- var displayName = outerType.displayName;
331
- if (displayName) {
332
- return displayName;
333
- }
334
- var functionName = innerType.displayName || innerType.name || "";
335
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
336
- }
337
- function getContextName(type) {
338
- return type.displayName || "Context";
339
- }
340
- function getComponentNameFromType(type) {
341
- if (type == null) {
342
- return null;
343
- }
344
- {
345
- if (typeof type.tag === "number") {
346
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
347
- }
348
- }
349
- if (typeof type === "function") {
350
- return type.displayName || type.name || null;
351
- }
352
- if (typeof type === "string") {
353
- return type;
354
- }
355
- switch (type) {
356
- case REACT_FRAGMENT_TYPE:
357
- return "Fragment";
358
- case REACT_PORTAL_TYPE:
359
- return "Portal";
360
- case REACT_PROFILER_TYPE:
361
- return "Profiler";
362
- case REACT_STRICT_MODE_TYPE:
363
- return "StrictMode";
364
- case REACT_SUSPENSE_TYPE:
365
- return "Suspense";
366
- case REACT_SUSPENSE_LIST_TYPE:
367
- return "SuspenseList";
368
- }
369
- if (typeof type === "object") {
370
- switch (type.$$typeof) {
371
- case REACT_CONTEXT_TYPE:
372
- var context = type;
373
- return getContextName(context) + ".Consumer";
374
- case REACT_PROVIDER_TYPE:
375
- var provider = type;
376
- return getContextName(provider._context) + ".Provider";
377
- case REACT_FORWARD_REF_TYPE:
378
- return getWrappedName(type, type.render, "ForwardRef");
379
- case REACT_MEMO_TYPE:
380
- var outerName = type.displayName || null;
381
- if (outerName !== null) {
382
- return outerName;
383
- }
384
- return getComponentNameFromType(type.type) || "Memo";
385
- case REACT_LAZY_TYPE: {
386
- var lazyComponent = type;
387
- var payload = lazyComponent._payload;
388
- var init = lazyComponent._init;
389
- try {
390
- return getComponentNameFromType(init(payload));
391
- } catch (x) {
392
- return null;
393
- }
394
- }
395
- }
396
- }
397
- return null;
398
- }
399
- var hasOwnProperty = Object.prototype.hasOwnProperty;
400
- var RESERVED_PROPS = {
401
- key: true,
402
- ref: true,
403
- __self: true,
404
- __source: true
405
- };
406
- var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
407
- {
408
- didWarnAboutStringRefs = {};
409
- }
410
- function hasValidRef(config) {
411
- {
412
- if (hasOwnProperty.call(config, "ref")) {
413
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
414
- if (getter && getter.isReactWarning) {
415
- return false;
416
- }
417
- }
418
- }
419
- return config.ref !== void 0;
420
- }
421
- function hasValidKey(config) {
422
- {
423
- if (hasOwnProperty.call(config, "key")) {
424
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
425
- if (getter && getter.isReactWarning) {
426
- return false;
427
- }
428
- }
429
- }
430
- return config.key !== void 0;
431
- }
432
- function defineKeyPropWarningGetter(props, displayName) {
433
- var warnAboutAccessingKey = function() {
434
- {
435
- if (!specialPropKeyWarningShown) {
436
- specialPropKeyWarningShown = true;
437
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
438
- }
439
- }
440
- };
441
- warnAboutAccessingKey.isReactWarning = true;
442
- Object.defineProperty(props, "key", {
443
- get: warnAboutAccessingKey,
444
- configurable: true
445
- });
446
- }
447
- function defineRefPropWarningGetter(props, displayName) {
448
- var warnAboutAccessingRef = function() {
449
- {
450
- if (!specialPropRefWarningShown) {
451
- specialPropRefWarningShown = true;
452
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
453
- }
454
- }
455
- };
456
- warnAboutAccessingRef.isReactWarning = true;
457
- Object.defineProperty(props, "ref", {
458
- get: warnAboutAccessingRef,
459
- configurable: true
460
- });
461
- }
462
- function warnIfStringRefCannotBeAutoConverted(config) {
463
- {
464
- if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
465
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
466
- if (!didWarnAboutStringRefs[componentName]) {
467
- error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
468
- didWarnAboutStringRefs[componentName] = true;
469
- }
470
- }
471
- }
472
- }
473
- var ReactElement = function(type, key, ref, self, source, owner, props) {
474
- var element = {
475
- // This tag allows us to uniquely identify this as a React Element
476
- $$typeof: REACT_ELEMENT_TYPE,
477
- // Built-in properties that belong on the element
478
- type,
479
- key,
480
- ref,
481
- props,
482
- // Record the component responsible for creating this element.
483
- _owner: owner
484
- };
485
- {
486
- element._store = {};
487
- Object.defineProperty(element._store, "validated", {
488
- configurable: false,
489
- enumerable: false,
490
- writable: true,
491
- value: false
492
- });
493
- Object.defineProperty(element, "_self", {
494
- configurable: false,
495
- enumerable: false,
496
- writable: false,
497
- value: self
498
- });
499
- Object.defineProperty(element, "_source", {
500
- configurable: false,
501
- enumerable: false,
502
- writable: false,
503
- value: source
504
- });
505
- if (Object.freeze) {
506
- Object.freeze(element.props);
507
- Object.freeze(element);
508
- }
509
- }
510
- return element;
511
- };
512
- function createElement(type, config, children) {
513
- var propName;
514
- var props = {};
515
- var key = null;
516
- var ref = null;
517
- var self = null;
518
- var source = null;
519
- if (config != null) {
520
- if (hasValidRef(config)) {
521
- ref = config.ref;
522
- {
523
- warnIfStringRefCannotBeAutoConverted(config);
524
- }
525
- }
526
- if (hasValidKey(config)) {
527
- {
528
- checkKeyStringCoercion(config.key);
529
- }
530
- key = "" + config.key;
531
- }
532
- self = config.__self === void 0 ? null : config.__self;
533
- source = config.__source === void 0 ? null : config.__source;
534
- for (propName in config) {
535
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
536
- props[propName] = config[propName];
537
- }
538
- }
539
- }
540
- var childrenLength = arguments.length - 2;
541
- if (childrenLength === 1) {
542
- props.children = children;
543
- } else if (childrenLength > 1) {
544
- var childArray = Array(childrenLength);
545
- for (var i = 0; i < childrenLength; i++) {
546
- childArray[i] = arguments[i + 2];
547
- }
548
- {
549
- if (Object.freeze) {
550
- Object.freeze(childArray);
551
- }
552
- }
553
- props.children = childArray;
554
- }
555
- if (type && type.defaultProps) {
556
- var defaultProps = type.defaultProps;
557
- for (propName in defaultProps) {
558
- if (props[propName] === void 0) {
559
- props[propName] = defaultProps[propName];
560
- }
561
- }
562
- }
563
- {
564
- if (key || ref) {
565
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
566
- if (key) {
567
- defineKeyPropWarningGetter(props, displayName);
568
- }
569
- if (ref) {
570
- defineRefPropWarningGetter(props, displayName);
571
- }
572
- }
573
- }
574
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
575
- }
576
- function cloneAndReplaceKey(oldElement, newKey) {
577
- var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
578
- return newElement;
579
- }
580
- function cloneElement(element, config, children) {
581
- if (element === null || element === void 0) {
582
- throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
583
- }
584
- var propName;
585
- var props = assign({}, element.props);
586
- var key = element.key;
587
- var ref = element.ref;
588
- var self = element._self;
589
- var source = element._source;
590
- var owner = element._owner;
591
- if (config != null) {
592
- if (hasValidRef(config)) {
593
- ref = config.ref;
594
- owner = ReactCurrentOwner.current;
595
- }
596
- if (hasValidKey(config)) {
597
- {
598
- checkKeyStringCoercion(config.key);
599
- }
600
- key = "" + config.key;
601
- }
602
- var defaultProps;
603
- if (element.type && element.type.defaultProps) {
604
- defaultProps = element.type.defaultProps;
605
- }
606
- for (propName in config) {
607
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
608
- if (config[propName] === void 0 && defaultProps !== void 0) {
609
- props[propName] = defaultProps[propName];
610
- } else {
611
- props[propName] = config[propName];
612
- }
613
- }
614
- }
615
- }
616
- var childrenLength = arguments.length - 2;
617
- if (childrenLength === 1) {
618
- props.children = children;
619
- } else if (childrenLength > 1) {
620
- var childArray = Array(childrenLength);
621
- for (var i = 0; i < childrenLength; i++) {
622
- childArray[i] = arguments[i + 2];
623
- }
624
- props.children = childArray;
625
- }
626
- return ReactElement(element.type, key, ref, self, source, owner, props);
627
- }
628
- function isValidElement(object) {
629
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
630
- }
631
- var SEPARATOR = ".";
632
- var SUBSEPARATOR = ":";
633
- function escape(key) {
634
- var escapeRegex = /[=:]/g;
635
- var escaperLookup = {
636
- "=": "=0",
637
- ":": "=2"
638
- };
639
- var escapedString = key.replace(escapeRegex, function(match) {
640
- return escaperLookup[match];
641
- });
642
- return "$" + escapedString;
643
- }
644
- var didWarnAboutMaps = false;
645
- var userProvidedKeyEscapeRegex = /\/+/g;
646
- function escapeUserProvidedKey(text) {
647
- return text.replace(userProvidedKeyEscapeRegex, "$&/");
648
- }
649
- function getElementKey(element, index) {
650
- if (typeof element === "object" && element !== null && element.key != null) {
651
- {
652
- checkKeyStringCoercion(element.key);
653
- }
654
- return escape("" + element.key);
655
- }
656
- return index.toString(36);
657
- }
658
- function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
659
- var type = typeof children;
660
- if (type === "undefined" || type === "boolean") {
661
- children = null;
662
- }
663
- var invokeCallback = false;
664
- if (children === null) {
665
- invokeCallback = true;
666
- } else {
667
- switch (type) {
668
- case "string":
669
- case "number":
670
- invokeCallback = true;
671
- break;
672
- case "object":
673
- switch (children.$$typeof) {
674
- case REACT_ELEMENT_TYPE:
675
- case REACT_PORTAL_TYPE:
676
- invokeCallback = true;
677
- }
678
- }
679
- }
680
- if (invokeCallback) {
681
- var _child = children;
682
- var mappedChild = callback(_child);
683
- var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
684
- if (isArray(mappedChild)) {
685
- var escapedChildKey = "";
686
- if (childKey != null) {
687
- escapedChildKey = escapeUserProvidedKey(childKey) + "/";
688
- }
689
- mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
690
- return c;
691
- });
692
- } else if (mappedChild != null) {
693
- if (isValidElement(mappedChild)) {
694
- {
695
- if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
696
- checkKeyStringCoercion(mappedChild.key);
697
- }
698
- }
699
- mappedChild = cloneAndReplaceKey(
700
- mappedChild,
701
- // Keep both the (mapped) and old keys if they differ, just as
702
- // traverseAllChildren used to do for objects as children
703
- escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
704
- (mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
705
- // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
706
- // eslint-disable-next-line react-internal/safe-string-coercion
707
- escapeUserProvidedKey("" + mappedChild.key) + "/"
708
- ) : "") + childKey
709
- );
710
- }
711
- array.push(mappedChild);
712
- }
713
- return 1;
714
- }
715
- var child;
716
- var nextName;
717
- var subtreeCount = 0;
718
- var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
719
- if (isArray(children)) {
720
- for (var i = 0; i < children.length; i++) {
721
- child = children[i];
722
- nextName = nextNamePrefix + getElementKey(child, i);
723
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
724
- }
725
- } else {
726
- var iteratorFn = getIteratorFn(children);
727
- if (typeof iteratorFn === "function") {
728
- var iterableChildren = children;
729
- {
730
- if (iteratorFn === iterableChildren.entries) {
731
- if (!didWarnAboutMaps) {
732
- warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
733
- }
734
- didWarnAboutMaps = true;
735
- }
736
- }
737
- var iterator = iteratorFn.call(iterableChildren);
738
- var step;
739
- var ii = 0;
740
- while (!(step = iterator.next()).done) {
741
- child = step.value;
742
- nextName = nextNamePrefix + getElementKey(child, ii++);
743
- subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
744
- }
745
- } else if (type === "object") {
746
- var childrenString = String(children);
747
- throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
748
- }
749
- }
750
- return subtreeCount;
751
- }
752
- function mapChildren(children, func, context) {
753
- if (children == null) {
754
- return children;
755
- }
756
- var result = [];
757
- var count = 0;
758
- mapIntoArray(children, result, "", "", function(child) {
759
- return func.call(context, child, count++);
760
- });
761
- return result;
762
- }
763
- function countChildren(children) {
764
- var n = 0;
765
- mapChildren(children, function() {
766
- n++;
767
- });
768
- return n;
769
- }
770
- function forEachChildren(children, forEachFunc, forEachContext) {
771
- mapChildren(children, function() {
772
- forEachFunc.apply(this, arguments);
773
- }, forEachContext);
774
- }
775
- function toArray(children) {
776
- return mapChildren(children, function(child) {
777
- return child;
778
- }) || [];
779
- }
780
- function onlyChild(children) {
781
- if (!isValidElement(children)) {
782
- throw new Error("React.Children.only expected to receive a single React element child.");
783
- }
784
- return children;
785
- }
786
- function createContext(defaultValue) {
787
- var context = {
788
- $$typeof: REACT_CONTEXT_TYPE,
789
- // As a workaround to support multiple concurrent renderers, we categorize
790
- // some renderers as primary and others as secondary. We only expect
791
- // there to be two concurrent renderers at most: React Native (primary) and
792
- // Fabric (secondary); React DOM (primary) and React ART (secondary).
793
- // Secondary renderers store their context values on separate fields.
794
- _currentValue: defaultValue,
795
- _currentValue2: defaultValue,
796
- // Used to track how many concurrent renderers this context currently
797
- // supports within in a single renderer. Such as parallel server rendering.
798
- _threadCount: 0,
799
- // These are circular
800
- Provider: null,
801
- Consumer: null,
802
- // Add these to use same hidden class in VM as ServerContext
803
- _defaultValue: null,
804
- _globalName: null
805
- };
806
- context.Provider = {
807
- $$typeof: REACT_PROVIDER_TYPE,
808
- _context: context
809
- };
810
- var hasWarnedAboutUsingNestedContextConsumers = false;
811
- var hasWarnedAboutUsingConsumerProvider = false;
812
- var hasWarnedAboutDisplayNameOnConsumer = false;
813
- {
814
- var Consumer = {
815
- $$typeof: REACT_CONTEXT_TYPE,
816
- _context: context
817
- };
818
- Object.defineProperties(Consumer, {
819
- Provider: {
820
- get: function() {
821
- if (!hasWarnedAboutUsingConsumerProvider) {
822
- hasWarnedAboutUsingConsumerProvider = true;
823
- error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
824
- }
825
- return context.Provider;
826
- },
827
- set: function(_Provider) {
828
- context.Provider = _Provider;
829
- }
830
- },
831
- _currentValue: {
832
- get: function() {
833
- return context._currentValue;
834
- },
835
- set: function(_currentValue) {
836
- context._currentValue = _currentValue;
837
- }
838
- },
839
- _currentValue2: {
840
- get: function() {
841
- return context._currentValue2;
842
- },
843
- set: function(_currentValue2) {
844
- context._currentValue2 = _currentValue2;
845
- }
846
- },
847
- _threadCount: {
848
- get: function() {
849
- return context._threadCount;
850
- },
851
- set: function(_threadCount) {
852
- context._threadCount = _threadCount;
853
- }
854
- },
855
- Consumer: {
856
- get: function() {
857
- if (!hasWarnedAboutUsingNestedContextConsumers) {
858
- hasWarnedAboutUsingNestedContextConsumers = true;
859
- error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
860
- }
861
- return context.Consumer;
862
- }
863
- },
864
- displayName: {
865
- get: function() {
866
- return context.displayName;
867
- },
868
- set: function(displayName) {
869
- if (!hasWarnedAboutDisplayNameOnConsumer) {
870
- warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
871
- hasWarnedAboutDisplayNameOnConsumer = true;
872
- }
873
- }
874
- }
875
- });
876
- context.Consumer = Consumer;
877
- }
878
- {
879
- context._currentRenderer = null;
880
- context._currentRenderer2 = null;
881
- }
882
- return context;
883
- }
884
- var Uninitialized = -1;
885
- var Pending = 0;
886
- var Resolved = 1;
887
- var Rejected = 2;
888
- function lazyInitializer(payload) {
889
- if (payload._status === Uninitialized) {
890
- var ctor = payload._result;
891
- var thenable = ctor();
892
- thenable.then(function(moduleObject2) {
893
- if (payload._status === Pending || payload._status === Uninitialized) {
894
- var resolved = payload;
895
- resolved._status = Resolved;
896
- resolved._result = moduleObject2;
897
- }
898
- }, function(error2) {
899
- if (payload._status === Pending || payload._status === Uninitialized) {
900
- var rejected = payload;
901
- rejected._status = Rejected;
902
- rejected._result = error2;
903
- }
904
- });
905
- if (payload._status === Uninitialized) {
906
- var pending = payload;
907
- pending._status = Pending;
908
- pending._result = thenable;
909
- }
910
- }
911
- if (payload._status === Resolved) {
912
- var moduleObject = payload._result;
913
- {
914
- if (moduleObject === void 0) {
915
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
916
- }
917
- }
918
- {
919
- if (!("default" in moduleObject)) {
920
- error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
921
- }
922
- }
923
- return moduleObject.default;
924
- } else {
925
- throw payload._result;
926
- }
927
- }
928
- function lazy(ctor) {
929
- var payload = {
930
- // We use these fields to store the result.
931
- _status: Uninitialized,
932
- _result: ctor
933
- };
934
- var lazyType = {
935
- $$typeof: REACT_LAZY_TYPE,
936
- _payload: payload,
937
- _init: lazyInitializer
938
- };
939
- {
940
- var defaultProps;
941
- var propTypes;
942
- Object.defineProperties(lazyType, {
943
- defaultProps: {
944
- configurable: true,
945
- get: function() {
946
- return defaultProps;
947
- },
948
- set: function(newDefaultProps) {
949
- error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
950
- defaultProps = newDefaultProps;
951
- Object.defineProperty(lazyType, "defaultProps", {
952
- enumerable: true
953
- });
954
- }
955
- },
956
- propTypes: {
957
- configurable: true,
958
- get: function() {
959
- return propTypes;
960
- },
961
- set: function(newPropTypes) {
962
- error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
963
- propTypes = newPropTypes;
964
- Object.defineProperty(lazyType, "propTypes", {
965
- enumerable: true
966
- });
967
- }
968
- }
969
- });
970
- }
971
- return lazyType;
972
- }
973
- function forwardRef(render) {
974
- {
975
- if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
976
- error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
977
- } else if (typeof render !== "function") {
978
- error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
979
- } else {
980
- if (render.length !== 0 && render.length !== 2) {
981
- error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
982
- }
983
- }
984
- if (render != null) {
985
- if (render.defaultProps != null || render.propTypes != null) {
986
- error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
987
- }
988
- }
989
- }
990
- var elementType = {
991
- $$typeof: REACT_FORWARD_REF_TYPE,
992
- render
993
- };
994
- {
995
- var ownName;
996
- Object.defineProperty(elementType, "displayName", {
997
- enumerable: false,
998
- configurable: true,
999
- get: function() {
1000
- return ownName;
1001
- },
1002
- set: function(name) {
1003
- ownName = name;
1004
- if (!render.name && !render.displayName) {
1005
- render.displayName = name;
1006
- }
1007
- }
1008
- });
1009
- }
1010
- return elementType;
1011
- }
1012
- var REACT_MODULE_REFERENCE;
1013
- {
1014
- REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1015
- }
1016
- function isValidElementType(type) {
1017
- if (typeof type === "string" || typeof type === "function") {
1018
- return true;
1019
- }
1020
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
1021
- return true;
1022
- }
1023
- if (typeof type === "object" && type !== null) {
1024
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1025
- // types supported by any Flight configuration anywhere since
1026
- // we don't know which Flight build this will end up being used
1027
- // with.
1028
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1029
- return true;
1030
- }
1031
- }
1032
- return false;
1033
- }
1034
- function memo(type, compare) {
1035
- {
1036
- if (!isValidElementType(type)) {
1037
- error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
1038
- }
1039
- }
1040
- var elementType = {
1041
- $$typeof: REACT_MEMO_TYPE,
1042
- type,
1043
- compare: compare === void 0 ? null : compare
1044
- };
1045
- {
1046
- var ownName;
1047
- Object.defineProperty(elementType, "displayName", {
1048
- enumerable: false,
1049
- configurable: true,
1050
- get: function() {
1051
- return ownName;
1052
- },
1053
- set: function(name) {
1054
- ownName = name;
1055
- if (!type.name && !type.displayName) {
1056
- type.displayName = name;
1057
- }
1058
- }
1059
- });
1060
- }
1061
- return elementType;
1062
- }
1063
- function resolveDispatcher() {
1064
- var dispatcher = ReactCurrentDispatcher.current;
1065
- {
1066
- if (dispatcher === null) {
1067
- error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
1068
- }
1069
- }
1070
- return dispatcher;
1071
- }
1072
- function useContext(Context) {
1073
- var dispatcher = resolveDispatcher();
1074
- {
1075
- if (Context._context !== void 0) {
1076
- var realContext = Context._context;
1077
- if (realContext.Consumer === Context) {
1078
- error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
1079
- } else if (realContext.Provider === Context) {
1080
- error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
1081
- }
1082
- }
1083
- }
1084
- return dispatcher.useContext(Context);
1085
- }
1086
- function useState(initialState) {
1087
- var dispatcher = resolveDispatcher();
1088
- return dispatcher.useState(initialState);
1089
- }
1090
- function useReducer(reducer, initialArg, init) {
1091
- var dispatcher = resolveDispatcher();
1092
- return dispatcher.useReducer(reducer, initialArg, init);
1093
- }
1094
- function useRef(initialValue) {
1095
- var dispatcher = resolveDispatcher();
1096
- return dispatcher.useRef(initialValue);
1097
- }
1098
- function useEffect(create, deps) {
1099
- var dispatcher = resolveDispatcher();
1100
- return dispatcher.useEffect(create, deps);
1101
- }
1102
- function useInsertionEffect(create, deps) {
1103
- var dispatcher = resolveDispatcher();
1104
- return dispatcher.useInsertionEffect(create, deps);
1105
- }
1106
- function useLayoutEffect(create, deps) {
1107
- var dispatcher = resolveDispatcher();
1108
- return dispatcher.useLayoutEffect(create, deps);
1109
- }
1110
- function useCallback(callback, deps) {
1111
- var dispatcher = resolveDispatcher();
1112
- return dispatcher.useCallback(callback, deps);
1113
- }
1114
- function useMemo(create, deps) {
1115
- var dispatcher = resolveDispatcher();
1116
- return dispatcher.useMemo(create, deps);
1117
- }
1118
- function useImperativeHandle(ref, create, deps) {
1119
- var dispatcher = resolveDispatcher();
1120
- return dispatcher.useImperativeHandle(ref, create, deps);
1121
- }
1122
- function useDebugValue(value, formatterFn) {
1123
- {
1124
- var dispatcher = resolveDispatcher();
1125
- return dispatcher.useDebugValue(value, formatterFn);
1126
- }
1127
- }
1128
- function useTransition() {
1129
- var dispatcher = resolveDispatcher();
1130
- return dispatcher.useTransition();
1131
- }
1132
- function useDeferredValue(value) {
1133
- var dispatcher = resolveDispatcher();
1134
- return dispatcher.useDeferredValue(value);
1135
- }
1136
- function useId() {
1137
- var dispatcher = resolveDispatcher();
1138
- return dispatcher.useId();
1139
- }
1140
- function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
1141
- var dispatcher = resolveDispatcher();
1142
- return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
1143
- }
1144
- var disabledDepth = 0;
1145
- var prevLog;
1146
- var prevInfo;
1147
- var prevWarn;
1148
- var prevError;
1149
- var prevGroup;
1150
- var prevGroupCollapsed;
1151
- var prevGroupEnd;
1152
- function disabledLog() {
1153
- }
1154
- disabledLog.__reactDisabledLog = true;
1155
- function disableLogs() {
1156
- {
1157
- if (disabledDepth === 0) {
1158
- prevLog = console.log;
1159
- prevInfo = console.info;
1160
- prevWarn = console.warn;
1161
- prevError = console.error;
1162
- prevGroup = console.group;
1163
- prevGroupCollapsed = console.groupCollapsed;
1164
- prevGroupEnd = console.groupEnd;
1165
- var props = {
1166
- configurable: true,
1167
- enumerable: true,
1168
- value: disabledLog,
1169
- writable: true
1170
- };
1171
- Object.defineProperties(console, {
1172
- info: props,
1173
- log: props,
1174
- warn: props,
1175
- error: props,
1176
- group: props,
1177
- groupCollapsed: props,
1178
- groupEnd: props
1179
- });
1180
- }
1181
- disabledDepth++;
1182
- }
1183
- }
1184
- function reenableLogs() {
1185
- {
1186
- disabledDepth--;
1187
- if (disabledDepth === 0) {
1188
- var props = {
1189
- configurable: true,
1190
- enumerable: true,
1191
- writable: true
1192
- };
1193
- Object.defineProperties(console, {
1194
- log: assign({}, props, {
1195
- value: prevLog
1196
- }),
1197
- info: assign({}, props, {
1198
- value: prevInfo
1199
- }),
1200
- warn: assign({}, props, {
1201
- value: prevWarn
1202
- }),
1203
- error: assign({}, props, {
1204
- value: prevError
1205
- }),
1206
- group: assign({}, props, {
1207
- value: prevGroup
1208
- }),
1209
- groupCollapsed: assign({}, props, {
1210
- value: prevGroupCollapsed
1211
- }),
1212
- groupEnd: assign({}, props, {
1213
- value: prevGroupEnd
1214
- })
1215
- });
1216
- }
1217
- if (disabledDepth < 0) {
1218
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1219
- }
1220
- }
1221
- }
1222
- var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
1223
- var prefix;
1224
- function describeBuiltInComponentFrame(name, source, ownerFn) {
1225
- {
1226
- if (prefix === void 0) {
1227
- try {
1228
- throw Error();
1229
- } catch (x) {
1230
- var match = x.stack.trim().match(/\n( *(at )?)/);
1231
- prefix = match && match[1] || "";
1232
- }
1233
- }
1234
- return "\n" + prefix + name;
1235
- }
1236
- }
1237
- var reentry = false;
1238
- var componentFrameCache;
1239
- {
1240
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
1241
- componentFrameCache = new PossiblyWeakMap();
1242
- }
1243
- function describeNativeComponentFrame(fn, construct) {
1244
- if (!fn || reentry) {
1245
- return "";
1246
- }
1247
- {
1248
- var frame = componentFrameCache.get(fn);
1249
- if (frame !== void 0) {
1250
- return frame;
1251
- }
1252
- }
1253
- var control;
1254
- reentry = true;
1255
- var previousPrepareStackTrace = Error.prepareStackTrace;
1256
- Error.prepareStackTrace = void 0;
1257
- var previousDispatcher;
1258
- {
1259
- previousDispatcher = ReactCurrentDispatcher$1.current;
1260
- ReactCurrentDispatcher$1.current = null;
1261
- disableLogs();
1262
- }
1263
- try {
1264
- if (construct) {
1265
- var Fake = function() {
1266
- throw Error();
1267
- };
1268
- Object.defineProperty(Fake.prototype, "props", {
1269
- set: function() {
1270
- throw Error();
1271
- }
1272
- });
1273
- if (typeof Reflect === "object" && Reflect.construct) {
1274
- try {
1275
- Reflect.construct(Fake, []);
1276
- } catch (x) {
1277
- control = x;
1278
- }
1279
- Reflect.construct(fn, [], Fake);
1280
- } else {
1281
- try {
1282
- Fake.call();
1283
- } catch (x) {
1284
- control = x;
1285
- }
1286
- fn.call(Fake.prototype);
1287
- }
1288
- } else {
1289
- try {
1290
- throw Error();
1291
- } catch (x) {
1292
- control = x;
1293
- }
1294
- fn();
1295
- }
1296
- } catch (sample) {
1297
- if (sample && control && typeof sample.stack === "string") {
1298
- var sampleLines = sample.stack.split("\n");
1299
- var controlLines = control.stack.split("\n");
1300
- var s = sampleLines.length - 1;
1301
- var c = controlLines.length - 1;
1302
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
1303
- c--;
1304
- }
1305
- for (; s >= 1 && c >= 0; s--, c--) {
1306
- if (sampleLines[s] !== controlLines[c]) {
1307
- if (s !== 1 || c !== 1) {
1308
- do {
1309
- s--;
1310
- c--;
1311
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
1312
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
1313
- if (fn.displayName && _frame.includes("<anonymous>")) {
1314
- _frame = _frame.replace("<anonymous>", fn.displayName);
1315
- }
1316
- {
1317
- if (typeof fn === "function") {
1318
- componentFrameCache.set(fn, _frame);
1319
- }
1320
- }
1321
- return _frame;
1322
- }
1323
- } while (s >= 1 && c >= 0);
1324
- }
1325
- break;
1326
- }
1327
- }
1328
- }
1329
- } finally {
1330
- reentry = false;
1331
- {
1332
- ReactCurrentDispatcher$1.current = previousDispatcher;
1333
- reenableLogs();
1334
- }
1335
- Error.prepareStackTrace = previousPrepareStackTrace;
1336
- }
1337
- var name = fn ? fn.displayName || fn.name : "";
1338
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
1339
- {
1340
- if (typeof fn === "function") {
1341
- componentFrameCache.set(fn, syntheticFrame);
1342
- }
1343
- }
1344
- return syntheticFrame;
1345
- }
1346
- function describeFunctionComponentFrame(fn, source, ownerFn) {
1347
- {
1348
- return describeNativeComponentFrame(fn, false);
1349
- }
1350
- }
1351
- function shouldConstruct(Component2) {
1352
- var prototype = Component2.prototype;
1353
- return !!(prototype && prototype.isReactComponent);
1354
- }
1355
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
1356
- if (type == null) {
1357
- return "";
1358
- }
1359
- if (typeof type === "function") {
1360
- {
1361
- return describeNativeComponentFrame(type, shouldConstruct(type));
1362
- }
1363
- }
1364
- if (typeof type === "string") {
1365
- return describeBuiltInComponentFrame(type);
1366
- }
1367
- switch (type) {
1368
- case REACT_SUSPENSE_TYPE:
1369
- return describeBuiltInComponentFrame("Suspense");
1370
- case REACT_SUSPENSE_LIST_TYPE:
1371
- return describeBuiltInComponentFrame("SuspenseList");
1372
- }
1373
- if (typeof type === "object") {
1374
- switch (type.$$typeof) {
1375
- case REACT_FORWARD_REF_TYPE:
1376
- return describeFunctionComponentFrame(type.render);
1377
- case REACT_MEMO_TYPE:
1378
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
1379
- case REACT_LAZY_TYPE: {
1380
- var lazyComponent = type;
1381
- var payload = lazyComponent._payload;
1382
- var init = lazyComponent._init;
1383
- try {
1384
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
1385
- } catch (x) {
1386
- }
1387
- }
1388
- }
1389
- }
1390
- return "";
1391
- }
1392
- var loggedTypeFailures = {};
1393
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
1394
- function setCurrentlyValidatingElement(element) {
1395
- {
1396
- if (element) {
1397
- var owner = element._owner;
1398
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1399
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
1400
- } else {
1401
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
1402
- }
1403
- }
1404
- }
1405
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
1406
- {
1407
- var has = Function.call.bind(hasOwnProperty);
1408
- for (var typeSpecName in typeSpecs) {
1409
- if (has(typeSpecs, typeSpecName)) {
1410
- var error$1 = void 0;
1411
- try {
1412
- if (typeof typeSpecs[typeSpecName] !== "function") {
1413
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1414
- err.name = "Invariant Violation";
1415
- throw err;
1416
- }
1417
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1418
- } catch (ex) {
1419
- error$1 = ex;
1420
- }
1421
- if (error$1 && !(error$1 instanceof Error)) {
1422
- setCurrentlyValidatingElement(element);
1423
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
1424
- setCurrentlyValidatingElement(null);
1425
- }
1426
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
1427
- loggedTypeFailures[error$1.message] = true;
1428
- setCurrentlyValidatingElement(element);
1429
- error("Failed %s type: %s", location, error$1.message);
1430
- setCurrentlyValidatingElement(null);
1431
- }
1432
- }
1433
- }
1434
- }
1435
- }
1436
- function setCurrentlyValidatingElement$1(element) {
1437
- {
1438
- if (element) {
1439
- var owner = element._owner;
1440
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
1441
- setExtraStackFrame(stack);
1442
- } else {
1443
- setExtraStackFrame(null);
1444
- }
1445
- }
1446
- }
1447
- var propTypesMisspellWarningShown;
1448
- {
1449
- propTypesMisspellWarningShown = false;
1450
- }
1451
- function getDeclarationErrorAddendum() {
1452
- if (ReactCurrentOwner.current) {
1453
- var name = getComponentNameFromType(ReactCurrentOwner.current.type);
1454
- if (name) {
1455
- return "\n\nCheck the render method of `" + name + "`.";
1456
- }
1457
- }
1458
- return "";
1459
- }
1460
- function getSourceInfoErrorAddendum(source) {
1461
- if (source !== void 0) {
1462
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
1463
- var lineNumber = source.lineNumber;
1464
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
1465
- }
1466
- return "";
1467
- }
1468
- function getSourceInfoErrorAddendumForProps(elementProps) {
1469
- if (elementProps !== null && elementProps !== void 0) {
1470
- return getSourceInfoErrorAddendum(elementProps.__source);
1471
- }
1472
- return "";
1473
- }
1474
- var ownerHasKeyUseWarning = {};
1475
- function getCurrentComponentErrorInfo(parentType) {
1476
- var info = getDeclarationErrorAddendum();
1477
- if (!info) {
1478
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
1479
- if (parentName) {
1480
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
1481
- }
1482
- }
1483
- return info;
1484
- }
1485
- function validateExplicitKey(element, parentType) {
1486
- if (!element._store || element._store.validated || element.key != null) {
1487
- return;
1488
- }
1489
- element._store.validated = true;
1490
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
1491
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
1492
- return;
1493
- }
1494
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
1495
- var childOwner = "";
1496
- if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
1497
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
1498
- }
1499
- {
1500
- setCurrentlyValidatingElement$1(element);
1501
- error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
1502
- setCurrentlyValidatingElement$1(null);
1503
- }
1504
- }
1505
- function validateChildKeys(node, parentType) {
1506
- if (typeof node !== "object") {
1507
- return;
1508
- }
1509
- if (isArray(node)) {
1510
- for (var i = 0; i < node.length; i++) {
1511
- var child = node[i];
1512
- if (isValidElement(child)) {
1513
- validateExplicitKey(child, parentType);
1514
- }
1515
- }
1516
- } else if (isValidElement(node)) {
1517
- if (node._store) {
1518
- node._store.validated = true;
1519
- }
1520
- } else if (node) {
1521
- var iteratorFn = getIteratorFn(node);
1522
- if (typeof iteratorFn === "function") {
1523
- if (iteratorFn !== node.entries) {
1524
- var iterator = iteratorFn.call(node);
1525
- var step;
1526
- while (!(step = iterator.next()).done) {
1527
- if (isValidElement(step.value)) {
1528
- validateExplicitKey(step.value, parentType);
1529
- }
1530
- }
1531
- }
1532
- }
1533
- }
1534
- }
1535
- function validatePropTypes(element) {
1536
- {
1537
- var type = element.type;
1538
- if (type === null || type === void 0 || typeof type === "string") {
1539
- return;
1540
- }
1541
- var propTypes;
1542
- if (typeof type === "function") {
1543
- propTypes = type.propTypes;
1544
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
1545
- // Inner props are checked in the reconciler.
1546
- type.$$typeof === REACT_MEMO_TYPE)) {
1547
- propTypes = type.propTypes;
1548
- } else {
1549
- return;
1550
- }
1551
- if (propTypes) {
1552
- var name = getComponentNameFromType(type);
1553
- checkPropTypes(propTypes, element.props, "prop", name, element);
1554
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
1555
- propTypesMisspellWarningShown = true;
1556
- var _name = getComponentNameFromType(type);
1557
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
1558
- }
1559
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
1560
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1561
- }
1562
- }
1563
- }
1564
- function validateFragmentProps(fragment) {
1565
- {
1566
- var keys = Object.keys(fragment.props);
1567
- for (var i = 0; i < keys.length; i++) {
1568
- var key = keys[i];
1569
- if (key !== "children" && key !== "key") {
1570
- setCurrentlyValidatingElement$1(fragment);
1571
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
1572
- setCurrentlyValidatingElement$1(null);
1573
- break;
1574
- }
1575
- }
1576
- if (fragment.ref !== null) {
1577
- setCurrentlyValidatingElement$1(fragment);
1578
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
1579
- setCurrentlyValidatingElement$1(null);
1580
- }
1581
- }
1582
- }
1583
- function createElementWithValidation(type, props, children) {
1584
- var validType = isValidElementType(type);
1585
- if (!validType) {
1586
- var info = "";
1587
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
1588
- info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
1589
- }
1590
- var sourceInfo = getSourceInfoErrorAddendumForProps(props);
1591
- if (sourceInfo) {
1592
- info += sourceInfo;
1593
- } else {
1594
- info += getDeclarationErrorAddendum();
1595
- }
1596
- var typeString;
1597
- if (type === null) {
1598
- typeString = "null";
1599
- } else if (isArray(type)) {
1600
- typeString = "array";
1601
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
1602
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
1603
- info = " Did you accidentally export a JSX literal instead of a component?";
1604
- } else {
1605
- typeString = typeof type;
1606
- }
1607
- {
1608
- error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
1609
- }
1610
- }
1611
- var element = createElement.apply(this, arguments);
1612
- if (element == null) {
1613
- return element;
1614
- }
1615
- if (validType) {
1616
- for (var i = 2; i < arguments.length; i++) {
1617
- validateChildKeys(arguments[i], type);
1618
- }
1619
- }
1620
- if (type === REACT_FRAGMENT_TYPE) {
1621
- validateFragmentProps(element);
1622
- } else {
1623
- validatePropTypes(element);
1624
- }
1625
- return element;
1626
- }
1627
- var didWarnAboutDeprecatedCreateFactory = false;
1628
- function createFactoryWithValidation(type) {
1629
- var validatedFactory = createElementWithValidation.bind(null, type);
1630
- validatedFactory.type = type;
1631
- {
1632
- if (!didWarnAboutDeprecatedCreateFactory) {
1633
- didWarnAboutDeprecatedCreateFactory = true;
1634
- warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
1635
- }
1636
- Object.defineProperty(validatedFactory, "type", {
1637
- enumerable: false,
1638
- get: function() {
1639
- warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
1640
- Object.defineProperty(this, "type", {
1641
- value: type
1642
- });
1643
- return type;
1644
- }
1645
- });
1646
- }
1647
- return validatedFactory;
1648
- }
1649
- function cloneElementWithValidation(element, props, children) {
1650
- var newElement = cloneElement.apply(this, arguments);
1651
- for (var i = 2; i < arguments.length; i++) {
1652
- validateChildKeys(arguments[i], newElement.type);
1653
- }
1654
- validatePropTypes(newElement);
1655
- return newElement;
1656
- }
1657
- function startTransition(scope, options) {
1658
- var prevTransition = ReactCurrentBatchConfig.transition;
1659
- ReactCurrentBatchConfig.transition = {};
1660
- var currentTransition = ReactCurrentBatchConfig.transition;
1661
- {
1662
- ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
1663
- }
1664
- try {
1665
- scope();
1666
- } finally {
1667
- ReactCurrentBatchConfig.transition = prevTransition;
1668
- {
1669
- if (prevTransition === null && currentTransition._updatedFibers) {
1670
- var updatedFibersCount = currentTransition._updatedFibers.size;
1671
- if (updatedFibersCount > 10) {
1672
- warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
1673
- }
1674
- currentTransition._updatedFibers.clear();
1675
- }
1676
- }
1677
- }
1678
- }
1679
- var didWarnAboutMessageChannel = false;
1680
- var enqueueTaskImpl = null;
1681
- function enqueueTask(task) {
1682
- if (enqueueTaskImpl === null) {
1683
- try {
1684
- var requireString = ("require" + Math.random()).slice(0, 7);
1685
- var nodeRequire = module && module[requireString];
1686
- enqueueTaskImpl = nodeRequire.call(module, "timers").setImmediate;
1687
- } catch (_err) {
1688
- enqueueTaskImpl = function(callback) {
1689
- {
1690
- if (didWarnAboutMessageChannel === false) {
1691
- didWarnAboutMessageChannel = true;
1692
- if (typeof MessageChannel === "undefined") {
1693
- error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
1694
- }
1695
- }
1696
- }
1697
- var channel = new MessageChannel();
1698
- channel.port1.onmessage = callback;
1699
- channel.port2.postMessage(void 0);
1700
- };
1701
- }
1702
- }
1703
- return enqueueTaskImpl(task);
1704
- }
1705
- var actScopeDepth = 0;
1706
- var didWarnNoAwaitAct = false;
1707
- function act(callback) {
1708
- {
1709
- var prevActScopeDepth = actScopeDepth;
1710
- actScopeDepth++;
1711
- if (ReactCurrentActQueue.current === null) {
1712
- ReactCurrentActQueue.current = [];
1713
- }
1714
- var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
1715
- var result;
1716
- try {
1717
- ReactCurrentActQueue.isBatchingLegacy = true;
1718
- result = callback();
1719
- if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
1720
- var queue = ReactCurrentActQueue.current;
1721
- if (queue !== null) {
1722
- ReactCurrentActQueue.didScheduleLegacyUpdate = false;
1723
- flushActQueue(queue);
1724
- }
1725
- }
1726
- } catch (error2) {
1727
- popActScope(prevActScopeDepth);
1728
- throw error2;
1729
- } finally {
1730
- ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
1731
- }
1732
- if (result !== null && typeof result === "object" && typeof result.then === "function") {
1733
- var thenableResult = result;
1734
- var wasAwaited = false;
1735
- var thenable = {
1736
- then: function(resolve, reject) {
1737
- wasAwaited = true;
1738
- thenableResult.then(function(returnValue2) {
1739
- popActScope(prevActScopeDepth);
1740
- if (actScopeDepth === 0) {
1741
- recursivelyFlushAsyncActWork(returnValue2, resolve, reject);
1742
- } else {
1743
- resolve(returnValue2);
1744
- }
1745
- }, function(error2) {
1746
- popActScope(prevActScopeDepth);
1747
- reject(error2);
1748
- });
1749
- }
1750
- };
1751
- {
1752
- if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
1753
- Promise.resolve().then(function() {
1754
- }).then(function() {
1755
- if (!wasAwaited) {
1756
- didWarnNoAwaitAct = true;
1757
- error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
1758
- }
1759
- });
1760
- }
1761
- }
1762
- return thenable;
1763
- } else {
1764
- var returnValue = result;
1765
- popActScope(prevActScopeDepth);
1766
- if (actScopeDepth === 0) {
1767
- var _queue = ReactCurrentActQueue.current;
1768
- if (_queue !== null) {
1769
- flushActQueue(_queue);
1770
- ReactCurrentActQueue.current = null;
1771
- }
1772
- var _thenable = {
1773
- then: function(resolve, reject) {
1774
- if (ReactCurrentActQueue.current === null) {
1775
- ReactCurrentActQueue.current = [];
1776
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1777
- } else {
1778
- resolve(returnValue);
1779
- }
1780
- }
1781
- };
1782
- return _thenable;
1783
- } else {
1784
- var _thenable2 = {
1785
- then: function(resolve, reject) {
1786
- resolve(returnValue);
1787
- }
1788
- };
1789
- return _thenable2;
1790
- }
1791
- }
1792
- }
1793
- }
1794
- function popActScope(prevActScopeDepth) {
1795
- {
1796
- if (prevActScopeDepth !== actScopeDepth - 1) {
1797
- error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
1798
- }
1799
- actScopeDepth = prevActScopeDepth;
1800
- }
1801
- }
1802
- function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
1803
- {
1804
- var queue = ReactCurrentActQueue.current;
1805
- if (queue !== null) {
1806
- try {
1807
- flushActQueue(queue);
1808
- enqueueTask(function() {
1809
- if (queue.length === 0) {
1810
- ReactCurrentActQueue.current = null;
1811
- resolve(returnValue);
1812
- } else {
1813
- recursivelyFlushAsyncActWork(returnValue, resolve, reject);
1814
- }
1815
- });
1816
- } catch (error2) {
1817
- reject(error2);
1818
- }
1819
- } else {
1820
- resolve(returnValue);
1821
- }
1822
- }
1823
- }
1824
- var isFlushing = false;
1825
- function flushActQueue(queue) {
1826
- {
1827
- if (!isFlushing) {
1828
- isFlushing = true;
1829
- var i = 0;
1830
- try {
1831
- for (; i < queue.length; i++) {
1832
- var callback = queue[i];
1833
- do {
1834
- callback = callback(true);
1835
- } while (callback !== null);
1836
- }
1837
- queue.length = 0;
1838
- } catch (error2) {
1839
- queue = queue.slice(i + 1);
1840
- throw error2;
1841
- } finally {
1842
- isFlushing = false;
1843
- }
1844
- }
1845
- }
1846
- }
1847
- var createElement$1 = createElementWithValidation;
1848
- var cloneElement$1 = cloneElementWithValidation;
1849
- var createFactory = createFactoryWithValidation;
1850
- var Children = {
1851
- map: mapChildren,
1852
- forEach: forEachChildren,
1853
- count: countChildren,
1854
- toArray,
1855
- only: onlyChild
1856
- };
1857
- exports.Children = Children;
1858
- exports.Component = Component;
1859
- exports.Fragment = REACT_FRAGMENT_TYPE;
1860
- exports.Profiler = REACT_PROFILER_TYPE;
1861
- exports.PureComponent = PureComponent;
1862
- exports.StrictMode = REACT_STRICT_MODE_TYPE;
1863
- exports.Suspense = REACT_SUSPENSE_TYPE;
1864
- exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
1865
- exports.act = act;
1866
- exports.cloneElement = cloneElement$1;
1867
- exports.createContext = createContext;
1868
- exports.createElement = createElement$1;
1869
- exports.createFactory = createFactory;
1870
- exports.createRef = createRef;
1871
- exports.forwardRef = forwardRef;
1872
- exports.isValidElement = isValidElement;
1873
- exports.lazy = lazy;
1874
- exports.memo = memo;
1875
- exports.startTransition = startTransition;
1876
- exports.unstable_act = act;
1877
- exports.useCallback = useCallback;
1878
- exports.useContext = useContext;
1879
- exports.useDebugValue = useDebugValue;
1880
- exports.useDeferredValue = useDeferredValue;
1881
- exports.useEffect = useEffect;
1882
- exports.useId = useId;
1883
- exports.useImperativeHandle = useImperativeHandle;
1884
- exports.useInsertionEffect = useInsertionEffect;
1885
- exports.useLayoutEffect = useLayoutEffect;
1886
- exports.useMemo = useMemo;
1887
- exports.useReducer = useReducer;
1888
- exports.useRef = useRef;
1889
- exports.useState = useState;
1890
- exports.useSyncExternalStore = useSyncExternalStore;
1891
- exports.useTransition = useTransition;
1892
- exports.version = ReactVersion;
1893
- if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
1894
- __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
1895
- }
1896
- })();
1897
- }
1898
- }
1899
- });
1900
-
1901
- // femoGen/node_modules/react/index.js
1902
- var require_react = __commonJS({
1903
- "femoGen/node_modules/react/index.js"(exports, module) {
1904
- "use strict";
1905
- if (false) {
1906
- module.exports = null;
1907
- } else {
1908
- module.exports = require_react_development();
1909
- }
1910
- }
1911
- });
1912
-
1913
- // femoGen/node_modules/react/cjs/react-jsx-runtime.development.js
1914
- var require_react_jsx_runtime_development = __commonJS({
1915
- "femoGen/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
1916
- "use strict";
1917
- if (true) {
1918
- (function() {
1919
- "use strict";
1920
- var React2 = require_react();
1921
- var REACT_ELEMENT_TYPE = Symbol.for("react.element");
1922
- var REACT_PORTAL_TYPE = Symbol.for("react.portal");
1923
- var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1924
- var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
1925
- var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1926
- var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
1927
- var REACT_CONTEXT_TYPE = Symbol.for("react.context");
1928
- var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
1929
- var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
1930
- var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
1931
- var REACT_MEMO_TYPE = Symbol.for("react.memo");
1932
- var REACT_LAZY_TYPE = Symbol.for("react.lazy");
1933
- var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
1934
- var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
1935
- var FAUX_ITERATOR_SYMBOL = "@@iterator";
1936
- function getIteratorFn(maybeIterable) {
1937
- if (maybeIterable === null || typeof maybeIterable !== "object") {
1938
- return null;
1939
- }
1940
- var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
1941
- if (typeof maybeIterator === "function") {
1942
- return maybeIterator;
1943
- }
1944
- return null;
1945
- }
1946
- var ReactSharedInternals = React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
1947
- function error(format) {
1948
- {
1949
- {
1950
- for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1951
- args[_key2 - 1] = arguments[_key2];
1952
- }
1953
- printWarning("error", format, args);
1954
- }
1955
- }
1956
- }
1957
- function printWarning(level, format, args) {
1958
- {
1959
- var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
1960
- var stack = ReactDebugCurrentFrame2.getStackAddendum();
1961
- if (stack !== "") {
1962
- format += "%s";
1963
- args = args.concat([stack]);
1964
- }
1965
- var argsWithFormat = args.map(function(item) {
1966
- return String(item);
1967
- });
1968
- argsWithFormat.unshift("Warning: " + format);
1969
- Function.prototype.apply.call(console[level], console, argsWithFormat);
1970
- }
1971
- }
1972
- var enableScopeAPI = false;
1973
- var enableCacheElement = false;
1974
- var enableTransitionTracing = false;
1975
- var enableLegacyHidden = false;
1976
- var enableDebugTracing = false;
1977
- var REACT_MODULE_REFERENCE;
1978
- {
1979
- REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
1980
- }
1981
- function isValidElementType(type) {
1982
- if (typeof type === "string" || typeof type === "function") {
1983
- return true;
1984
- }
1985
- if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
1986
- return true;
1987
- }
1988
- if (typeof type === "object" && type !== null) {
1989
- if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
1990
- // types supported by any Flight configuration anywhere since
1991
- // we don't know which Flight build this will end up being used
1992
- // with.
1993
- type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
1994
- return true;
1995
- }
1996
- }
1997
- return false;
1998
- }
1999
- function getWrappedName(outerType, innerType, wrapperName) {
2000
- var displayName = outerType.displayName;
2001
- if (displayName) {
2002
- return displayName;
2003
- }
2004
- var functionName = innerType.displayName || innerType.name || "";
2005
- return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
2006
- }
2007
- function getContextName(type) {
2008
- return type.displayName || "Context";
2009
- }
2010
- function getComponentNameFromType(type) {
2011
- if (type == null) {
2012
- return null;
2013
- }
2014
- {
2015
- if (typeof type.tag === "number") {
2016
- error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
2017
- }
2018
- }
2019
- if (typeof type === "function") {
2020
- return type.displayName || type.name || null;
2021
- }
2022
- if (typeof type === "string") {
2023
- return type;
2024
- }
2025
- switch (type) {
2026
- case REACT_FRAGMENT_TYPE:
2027
- return "Fragment";
2028
- case REACT_PORTAL_TYPE:
2029
- return "Portal";
2030
- case REACT_PROFILER_TYPE:
2031
- return "Profiler";
2032
- case REACT_STRICT_MODE_TYPE:
2033
- return "StrictMode";
2034
- case REACT_SUSPENSE_TYPE:
2035
- return "Suspense";
2036
- case REACT_SUSPENSE_LIST_TYPE:
2037
- return "SuspenseList";
2038
- }
2039
- if (typeof type === "object") {
2040
- switch (type.$$typeof) {
2041
- case REACT_CONTEXT_TYPE:
2042
- var context = type;
2043
- return getContextName(context) + ".Consumer";
2044
- case REACT_PROVIDER_TYPE:
2045
- var provider = type;
2046
- return getContextName(provider._context) + ".Provider";
2047
- case REACT_FORWARD_REF_TYPE:
2048
- return getWrappedName(type, type.render, "ForwardRef");
2049
- case REACT_MEMO_TYPE:
2050
- var outerName = type.displayName || null;
2051
- if (outerName !== null) {
2052
- return outerName;
2053
- }
2054
- return getComponentNameFromType(type.type) || "Memo";
2055
- case REACT_LAZY_TYPE: {
2056
- var lazyComponent = type;
2057
- var payload = lazyComponent._payload;
2058
- var init = lazyComponent._init;
2059
- try {
2060
- return getComponentNameFromType(init(payload));
2061
- } catch (x) {
2062
- return null;
2063
- }
2064
- }
2065
- }
2066
- }
2067
- return null;
2068
- }
2069
- var assign = Object.assign;
2070
- var disabledDepth = 0;
2071
- var prevLog;
2072
- var prevInfo;
2073
- var prevWarn;
2074
- var prevError;
2075
- var prevGroup;
2076
- var prevGroupCollapsed;
2077
- var prevGroupEnd;
2078
- function disabledLog() {
2079
- }
2080
- disabledLog.__reactDisabledLog = true;
2081
- function disableLogs() {
2082
- {
2083
- if (disabledDepth === 0) {
2084
- prevLog = console.log;
2085
- prevInfo = console.info;
2086
- prevWarn = console.warn;
2087
- prevError = console.error;
2088
- prevGroup = console.group;
2089
- prevGroupCollapsed = console.groupCollapsed;
2090
- prevGroupEnd = console.groupEnd;
2091
- var props = {
2092
- configurable: true,
2093
- enumerable: true,
2094
- value: disabledLog,
2095
- writable: true
2096
- };
2097
- Object.defineProperties(console, {
2098
- info: props,
2099
- log: props,
2100
- warn: props,
2101
- error: props,
2102
- group: props,
2103
- groupCollapsed: props,
2104
- groupEnd: props
2105
- });
2106
- }
2107
- disabledDepth++;
2108
- }
2109
- }
2110
- function reenableLogs() {
2111
- {
2112
- disabledDepth--;
2113
- if (disabledDepth === 0) {
2114
- var props = {
2115
- configurable: true,
2116
- enumerable: true,
2117
- writable: true
2118
- };
2119
- Object.defineProperties(console, {
2120
- log: assign({}, props, {
2121
- value: prevLog
2122
- }),
2123
- info: assign({}, props, {
2124
- value: prevInfo
2125
- }),
2126
- warn: assign({}, props, {
2127
- value: prevWarn
2128
- }),
2129
- error: assign({}, props, {
2130
- value: prevError
2131
- }),
2132
- group: assign({}, props, {
2133
- value: prevGroup
2134
- }),
2135
- groupCollapsed: assign({}, props, {
2136
- value: prevGroupCollapsed
2137
- }),
2138
- groupEnd: assign({}, props, {
2139
- value: prevGroupEnd
2140
- })
2141
- });
2142
- }
2143
- if (disabledDepth < 0) {
2144
- error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
2145
- }
2146
- }
2147
- }
2148
- var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
2149
- var prefix;
2150
- function describeBuiltInComponentFrame(name, source, ownerFn) {
2151
- {
2152
- if (prefix === void 0) {
2153
- try {
2154
- throw Error();
2155
- } catch (x) {
2156
- var match = x.stack.trim().match(/\n( *(at )?)/);
2157
- prefix = match && match[1] || "";
2158
- }
2159
- }
2160
- return "\n" + prefix + name;
2161
- }
2162
- }
2163
- var reentry = false;
2164
- var componentFrameCache;
2165
- {
2166
- var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
2167
- componentFrameCache = new PossiblyWeakMap();
2168
- }
2169
- function describeNativeComponentFrame(fn, construct) {
2170
- if (!fn || reentry) {
2171
- return "";
2172
- }
2173
- {
2174
- var frame = componentFrameCache.get(fn);
2175
- if (frame !== void 0) {
2176
- return frame;
2177
- }
2178
- }
2179
- var control;
2180
- reentry = true;
2181
- var previousPrepareStackTrace = Error.prepareStackTrace;
2182
- Error.prepareStackTrace = void 0;
2183
- var previousDispatcher;
2184
- {
2185
- previousDispatcher = ReactCurrentDispatcher.current;
2186
- ReactCurrentDispatcher.current = null;
2187
- disableLogs();
2188
- }
2189
- try {
2190
- if (construct) {
2191
- var Fake = function() {
2192
- throw Error();
2193
- };
2194
- Object.defineProperty(Fake.prototype, "props", {
2195
- set: function() {
2196
- throw Error();
2197
- }
2198
- });
2199
- if (typeof Reflect === "object" && Reflect.construct) {
2200
- try {
2201
- Reflect.construct(Fake, []);
2202
- } catch (x) {
2203
- control = x;
2204
- }
2205
- Reflect.construct(fn, [], Fake);
2206
- } else {
2207
- try {
2208
- Fake.call();
2209
- } catch (x) {
2210
- control = x;
2211
- }
2212
- fn.call(Fake.prototype);
2213
- }
2214
- } else {
2215
- try {
2216
- throw Error();
2217
- } catch (x) {
2218
- control = x;
2219
- }
2220
- fn();
2221
- }
2222
- } catch (sample) {
2223
- if (sample && control && typeof sample.stack === "string") {
2224
- var sampleLines = sample.stack.split("\n");
2225
- var controlLines = control.stack.split("\n");
2226
- var s = sampleLines.length - 1;
2227
- var c = controlLines.length - 1;
2228
- while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
2229
- c--;
2230
- }
2231
- for (; s >= 1 && c >= 0; s--, c--) {
2232
- if (sampleLines[s] !== controlLines[c]) {
2233
- if (s !== 1 || c !== 1) {
2234
- do {
2235
- s--;
2236
- c--;
2237
- if (c < 0 || sampleLines[s] !== controlLines[c]) {
2238
- var _frame = "\n" + sampleLines[s].replace(" at new ", " at ");
2239
- if (fn.displayName && _frame.includes("<anonymous>")) {
2240
- _frame = _frame.replace("<anonymous>", fn.displayName);
2241
- }
2242
- {
2243
- if (typeof fn === "function") {
2244
- componentFrameCache.set(fn, _frame);
2245
- }
2246
- }
2247
- return _frame;
2248
- }
2249
- } while (s >= 1 && c >= 0);
2250
- }
2251
- break;
2252
- }
2253
- }
2254
- }
2255
- } finally {
2256
- reentry = false;
2257
- {
2258
- ReactCurrentDispatcher.current = previousDispatcher;
2259
- reenableLogs();
2260
- }
2261
- Error.prepareStackTrace = previousPrepareStackTrace;
2262
- }
2263
- var name = fn ? fn.displayName || fn.name : "";
2264
- var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
2265
- {
2266
- if (typeof fn === "function") {
2267
- componentFrameCache.set(fn, syntheticFrame);
2268
- }
2269
- }
2270
- return syntheticFrame;
2271
- }
2272
- function describeFunctionComponentFrame(fn, source, ownerFn) {
2273
- {
2274
- return describeNativeComponentFrame(fn, false);
2275
- }
2276
- }
2277
- function shouldConstruct(Component) {
2278
- var prototype = Component.prototype;
2279
- return !!(prototype && prototype.isReactComponent);
2280
- }
2281
- function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
2282
- if (type == null) {
2283
- return "";
2284
- }
2285
- if (typeof type === "function") {
2286
- {
2287
- return describeNativeComponentFrame(type, shouldConstruct(type));
2288
- }
2289
- }
2290
- if (typeof type === "string") {
2291
- return describeBuiltInComponentFrame(type);
2292
- }
2293
- switch (type) {
2294
- case REACT_SUSPENSE_TYPE:
2295
- return describeBuiltInComponentFrame("Suspense");
2296
- case REACT_SUSPENSE_LIST_TYPE:
2297
- return describeBuiltInComponentFrame("SuspenseList");
2298
- }
2299
- if (typeof type === "object") {
2300
- switch (type.$$typeof) {
2301
- case REACT_FORWARD_REF_TYPE:
2302
- return describeFunctionComponentFrame(type.render);
2303
- case REACT_MEMO_TYPE:
2304
- return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
2305
- case REACT_LAZY_TYPE: {
2306
- var lazyComponent = type;
2307
- var payload = lazyComponent._payload;
2308
- var init = lazyComponent._init;
2309
- try {
2310
- return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
2311
- } catch (x) {
2312
- }
2313
- }
2314
- }
2315
- }
2316
- return "";
2317
- }
2318
- var hasOwnProperty = Object.prototype.hasOwnProperty;
2319
- var loggedTypeFailures = {};
2320
- var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
2321
- function setCurrentlyValidatingElement(element) {
2322
- {
2323
- if (element) {
2324
- var owner = element._owner;
2325
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2326
- ReactDebugCurrentFrame.setExtraStackFrame(stack);
2327
- } else {
2328
- ReactDebugCurrentFrame.setExtraStackFrame(null);
2329
- }
2330
- }
2331
- }
2332
- function checkPropTypes(typeSpecs, values, location, componentName, element) {
2333
- {
2334
- var has = Function.call.bind(hasOwnProperty);
2335
- for (var typeSpecName in typeSpecs) {
2336
- if (has(typeSpecs, typeSpecName)) {
2337
- var error$1 = void 0;
2338
- try {
2339
- if (typeof typeSpecs[typeSpecName] !== "function") {
2340
- var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
2341
- err.name = "Invariant Violation";
2342
- throw err;
2343
- }
2344
- error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
2345
- } catch (ex) {
2346
- error$1 = ex;
2347
- }
2348
- if (error$1 && !(error$1 instanceof Error)) {
2349
- setCurrentlyValidatingElement(element);
2350
- error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
2351
- setCurrentlyValidatingElement(null);
2352
- }
2353
- if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
2354
- loggedTypeFailures[error$1.message] = true;
2355
- setCurrentlyValidatingElement(element);
2356
- error("Failed %s type: %s", location, error$1.message);
2357
- setCurrentlyValidatingElement(null);
2358
- }
2359
- }
2360
- }
2361
- }
2362
- }
2363
- var isArrayImpl = Array.isArray;
2364
- function isArray(a) {
2365
- return isArrayImpl(a);
2366
- }
2367
- function typeName(value) {
2368
- {
2369
- var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
2370
- var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
2371
- return type;
2372
- }
2373
- }
2374
- function willCoercionThrow(value) {
2375
- {
2376
- try {
2377
- testStringCoercion(value);
2378
- return false;
2379
- } catch (e) {
2380
- return true;
2381
- }
2382
- }
2383
- }
2384
- function testStringCoercion(value) {
2385
- return "" + value;
2386
- }
2387
- function checkKeyStringCoercion(value) {
2388
- {
2389
- if (willCoercionThrow(value)) {
2390
- error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
2391
- return testStringCoercion(value);
2392
- }
2393
- }
2394
- }
2395
- var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
2396
- var RESERVED_PROPS = {
2397
- key: true,
2398
- ref: true,
2399
- __self: true,
2400
- __source: true
2401
- };
2402
- var specialPropKeyWarningShown;
2403
- var specialPropRefWarningShown;
2404
- var didWarnAboutStringRefs;
2405
- {
2406
- didWarnAboutStringRefs = {};
2407
- }
2408
- function hasValidRef(config) {
2409
- {
2410
- if (hasOwnProperty.call(config, "ref")) {
2411
- var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
2412
- if (getter && getter.isReactWarning) {
2413
- return false;
2414
- }
2415
- }
2416
- }
2417
- return config.ref !== void 0;
2418
- }
2419
- function hasValidKey(config) {
2420
- {
2421
- if (hasOwnProperty.call(config, "key")) {
2422
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
2423
- if (getter && getter.isReactWarning) {
2424
- return false;
2425
- }
2426
- }
2427
- }
2428
- return config.key !== void 0;
2429
- }
2430
- function warnIfStringRefCannotBeAutoConverted(config, self) {
2431
- {
2432
- if (typeof config.ref === "string" && ReactCurrentOwner.current && self && ReactCurrentOwner.current.stateNode !== self) {
2433
- var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
2434
- if (!didWarnAboutStringRefs[componentName]) {
2435
- error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
2436
- didWarnAboutStringRefs[componentName] = true;
2437
- }
2438
- }
2439
- }
2440
- }
2441
- function defineKeyPropWarningGetter(props, displayName) {
2442
- {
2443
- var warnAboutAccessingKey = function() {
2444
- if (!specialPropKeyWarningShown) {
2445
- specialPropKeyWarningShown = true;
2446
- error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2447
- }
2448
- };
2449
- warnAboutAccessingKey.isReactWarning = true;
2450
- Object.defineProperty(props, "key", {
2451
- get: warnAboutAccessingKey,
2452
- configurable: true
2453
- });
2454
- }
2455
- }
2456
- function defineRefPropWarningGetter(props, displayName) {
2457
- {
2458
- var warnAboutAccessingRef = function() {
2459
- if (!specialPropRefWarningShown) {
2460
- specialPropRefWarningShown = true;
2461
- error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
2462
- }
2463
- };
2464
- warnAboutAccessingRef.isReactWarning = true;
2465
- Object.defineProperty(props, "ref", {
2466
- get: warnAboutAccessingRef,
2467
- configurable: true
2468
- });
2469
- }
2470
- }
2471
- var ReactElement = function(type, key, ref, self, source, owner, props) {
2472
- var element = {
2473
- // This tag allows us to uniquely identify this as a React Element
2474
- $$typeof: REACT_ELEMENT_TYPE,
2475
- // Built-in properties that belong on the element
2476
- type,
2477
- key,
2478
- ref,
2479
- props,
2480
- // Record the component responsible for creating this element.
2481
- _owner: owner
2482
- };
2483
- {
2484
- element._store = {};
2485
- Object.defineProperty(element._store, "validated", {
2486
- configurable: false,
2487
- enumerable: false,
2488
- writable: true,
2489
- value: false
2490
- });
2491
- Object.defineProperty(element, "_self", {
2492
- configurable: false,
2493
- enumerable: false,
2494
- writable: false,
2495
- value: self
2496
- });
2497
- Object.defineProperty(element, "_source", {
2498
- configurable: false,
2499
- enumerable: false,
2500
- writable: false,
2501
- value: source
2502
- });
2503
- if (Object.freeze) {
2504
- Object.freeze(element.props);
2505
- Object.freeze(element);
2506
- }
2507
- }
2508
- return element;
2509
- };
2510
- function jsxDEV(type, config, maybeKey, source, self) {
2511
- {
2512
- var propName;
2513
- var props = {};
2514
- var key = null;
2515
- var ref = null;
2516
- if (maybeKey !== void 0) {
2517
- {
2518
- checkKeyStringCoercion(maybeKey);
2519
- }
2520
- key = "" + maybeKey;
2521
- }
2522
- if (hasValidKey(config)) {
2523
- {
2524
- checkKeyStringCoercion(config.key);
2525
- }
2526
- key = "" + config.key;
2527
- }
2528
- if (hasValidRef(config)) {
2529
- ref = config.ref;
2530
- warnIfStringRefCannotBeAutoConverted(config, self);
2531
- }
2532
- for (propName in config) {
2533
- if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
2534
- props[propName] = config[propName];
2535
- }
2536
- }
2537
- if (type && type.defaultProps) {
2538
- var defaultProps = type.defaultProps;
2539
- for (propName in defaultProps) {
2540
- if (props[propName] === void 0) {
2541
- props[propName] = defaultProps[propName];
2542
- }
2543
- }
2544
- }
2545
- if (key || ref) {
2546
- var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
2547
- if (key) {
2548
- defineKeyPropWarningGetter(props, displayName);
2549
- }
2550
- if (ref) {
2551
- defineRefPropWarningGetter(props, displayName);
2552
- }
2553
- }
2554
- return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
2555
- }
2556
- }
2557
- var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
2558
- var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
2559
- function setCurrentlyValidatingElement$1(element) {
2560
- {
2561
- if (element) {
2562
- var owner = element._owner;
2563
- var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
2564
- ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
2565
- } else {
2566
- ReactDebugCurrentFrame$1.setExtraStackFrame(null);
2567
- }
2568
- }
2569
- }
2570
- var propTypesMisspellWarningShown;
2571
- {
2572
- propTypesMisspellWarningShown = false;
2573
- }
2574
- function isValidElement(object) {
2575
- {
2576
- return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
2577
- }
2578
- }
2579
- function getDeclarationErrorAddendum() {
2580
- {
2581
- if (ReactCurrentOwner$1.current) {
2582
- var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
2583
- if (name) {
2584
- return "\n\nCheck the render method of `" + name + "`.";
2585
- }
2586
- }
2587
- return "";
2588
- }
2589
- }
2590
- function getSourceInfoErrorAddendum(source) {
2591
- {
2592
- if (source !== void 0) {
2593
- var fileName = source.fileName.replace(/^.*[\\\/]/, "");
2594
- var lineNumber = source.lineNumber;
2595
- return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
2596
- }
2597
- return "";
2598
- }
2599
- }
2600
- var ownerHasKeyUseWarning = {};
2601
- function getCurrentComponentErrorInfo(parentType) {
2602
- {
2603
- var info = getDeclarationErrorAddendum();
2604
- if (!info) {
2605
- var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
2606
- if (parentName) {
2607
- info = "\n\nCheck the top-level render call using <" + parentName + ">.";
2608
- }
2609
- }
2610
- return info;
2611
- }
2612
- }
2613
- function validateExplicitKey(element, parentType) {
2614
- {
2615
- if (!element._store || element._store.validated || element.key != null) {
2616
- return;
2617
- }
2618
- element._store.validated = true;
2619
- var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
2620
- if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
2621
- return;
2622
- }
2623
- ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
2624
- var childOwner = "";
2625
- if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
2626
- childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
2627
- }
2628
- setCurrentlyValidatingElement$1(element);
2629
- error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
2630
- setCurrentlyValidatingElement$1(null);
2631
- }
2632
- }
2633
- function validateChildKeys(node, parentType) {
2634
- {
2635
- if (typeof node !== "object") {
2636
- return;
2637
- }
2638
- if (isArray(node)) {
2639
- for (var i = 0; i < node.length; i++) {
2640
- var child = node[i];
2641
- if (isValidElement(child)) {
2642
- validateExplicitKey(child, parentType);
2643
- }
2644
- }
2645
- } else if (isValidElement(node)) {
2646
- if (node._store) {
2647
- node._store.validated = true;
2648
- }
2649
- } else if (node) {
2650
- var iteratorFn = getIteratorFn(node);
2651
- if (typeof iteratorFn === "function") {
2652
- if (iteratorFn !== node.entries) {
2653
- var iterator = iteratorFn.call(node);
2654
- var step;
2655
- while (!(step = iterator.next()).done) {
2656
- if (isValidElement(step.value)) {
2657
- validateExplicitKey(step.value, parentType);
2658
- }
2659
- }
2660
- }
2661
- }
2662
- }
2663
- }
2664
- }
2665
- function validatePropTypes(element) {
2666
- {
2667
- var type = element.type;
2668
- if (type === null || type === void 0 || typeof type === "string") {
2669
- return;
2670
- }
2671
- var propTypes;
2672
- if (typeof type === "function") {
2673
- propTypes = type.propTypes;
2674
- } else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
2675
- // Inner props are checked in the reconciler.
2676
- type.$$typeof === REACT_MEMO_TYPE)) {
2677
- propTypes = type.propTypes;
2678
- } else {
2679
- return;
2680
- }
2681
- if (propTypes) {
2682
- var name = getComponentNameFromType(type);
2683
- checkPropTypes(propTypes, element.props, "prop", name, element);
2684
- } else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
2685
- propTypesMisspellWarningShown = true;
2686
- var _name = getComponentNameFromType(type);
2687
- error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
2688
- }
2689
- if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
2690
- error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
2691
- }
2692
- }
2693
- }
2694
- function validateFragmentProps(fragment) {
2695
- {
2696
- var keys = Object.keys(fragment.props);
2697
- for (var i = 0; i < keys.length; i++) {
2698
- var key = keys[i];
2699
- if (key !== "children" && key !== "key") {
2700
- setCurrentlyValidatingElement$1(fragment);
2701
- error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key);
2702
- setCurrentlyValidatingElement$1(null);
2703
- break;
2704
- }
2705
- }
2706
- if (fragment.ref !== null) {
2707
- setCurrentlyValidatingElement$1(fragment);
2708
- error("Invalid attribute `ref` supplied to `React.Fragment`.");
2709
- setCurrentlyValidatingElement$1(null);
2710
- }
2711
- }
2712
- }
2713
- var didWarnAboutKeySpread = {};
2714
- function jsxWithValidation(type, props, key, isStaticChildren, source, self) {
2715
- {
2716
- var validType = isValidElementType(type);
2717
- if (!validType) {
2718
- var info = "";
2719
- if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
2720
- info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
2721
- }
2722
- var sourceInfo = getSourceInfoErrorAddendum(source);
2723
- if (sourceInfo) {
2724
- info += sourceInfo;
2725
- } else {
2726
- info += getDeclarationErrorAddendum();
2727
- }
2728
- var typeString;
2729
- if (type === null) {
2730
- typeString = "null";
2731
- } else if (isArray(type)) {
2732
- typeString = "array";
2733
- } else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
2734
- typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
2735
- info = " Did you accidentally export a JSX literal instead of a component?";
2736
- } else {
2737
- typeString = typeof type;
2738
- }
2739
- error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
2740
- }
2741
- var element = jsxDEV(type, props, key, source, self);
2742
- if (element == null) {
2743
- return element;
2744
- }
2745
- if (validType) {
2746
- var children = props.children;
2747
- if (children !== void 0) {
2748
- if (isStaticChildren) {
2749
- if (isArray(children)) {
2750
- for (var i = 0; i < children.length; i++) {
2751
- validateChildKeys(children[i], type);
2752
- }
2753
- if (Object.freeze) {
2754
- Object.freeze(children);
2755
- }
2756
- } else {
2757
- error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
2758
- }
2759
- } else {
2760
- validateChildKeys(children, type);
2761
- }
2762
- }
2763
- }
2764
- {
2765
- if (hasOwnProperty.call(props, "key")) {
2766
- var componentName = getComponentNameFromType(type);
2767
- var keys = Object.keys(props).filter(function(k) {
2768
- return k !== "key";
2769
- });
2770
- var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
2771
- if (!didWarnAboutKeySpread[componentName + beforeExample]) {
2772
- var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
2773
- error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
2774
- didWarnAboutKeySpread[componentName + beforeExample] = true;
2775
- }
2776
- }
2777
- }
2778
- if (type === REACT_FRAGMENT_TYPE) {
2779
- validateFragmentProps(element);
2780
- } else {
2781
- validatePropTypes(element);
2782
- }
2783
- return element;
2784
- }
2785
- }
2786
- function jsxWithValidationStatic(type, props, key) {
2787
- {
2788
- return jsxWithValidation(type, props, key, true);
2789
- }
2790
- }
2791
- function jsxWithValidationDynamic(type, props, key) {
2792
- {
2793
- return jsxWithValidation(type, props, key, false);
2794
- }
2795
- }
2796
- var jsx2 = jsxWithValidationDynamic;
2797
- var jsxs2 = jsxWithValidationStatic;
2798
- exports.Fragment = REACT_FRAGMENT_TYPE;
2799
- exports.jsx = jsx2;
2800
- exports.jsxs = jsxs2;
2801
- })();
2802
- }
2803
- }
2804
- });
2805
-
2806
- // femoGen/node_modules/react/jsx-runtime.js
2807
- var require_jsx_runtime = __commonJS({
2808
- "femoGen/node_modules/react/jsx-runtime.js"(exports, module) {
2809
- "use strict";
2810
- if (false) {
2811
- module.exports = null;
2812
- } else {
2813
- module.exports = require_react_jsx_runtime_development();
2814
- }
2815
- }
2816
- });
2817
-
2818
- // femoGen/src/common.jsx
2819
- var import_react = __toESM(require_react(), 1);
2820
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
2821
- var ErrorBoundary = class extends import_react.default.Component {
2822
- constructor(props) {
2823
- super(props);
2824
- this.state = { error: null, errorInfo: null };
2825
- }
2826
- static getDerivedStateFromError(error) {
2827
- return { error };
2828
- }
2829
- componentDidCatch(error, errorInfo) {
2830
- this.setState({ error, errorInfo });
2831
- console.error("ErrorBoundary caught:", error, errorInfo);
2832
- }
2833
- render() {
2834
- if (this.state.error) {
2835
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
2836
- "div",
2837
- {
2838
- style: {
2839
- padding: 30,
2840
- fontFamily: "var(--femo-font-sans)",
2841
- color: "var(--femo-danger)",
2842
- background: "var(--femo-danger-soft)",
2843
- minHeight: "100vh"
2844
- },
2845
- children: [
2846
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "\u53D1\u751F\u9519\u8BEF" }),
2847
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { style: { whiteSpace: "pre-wrap", fontSize: 13 }, children: this.state.error?.toString() }),
2848
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("details", { style: { marginTop: 16 }, children: [
2849
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("summary", { children: "\u7EC4\u4EF6\u5806\u6808" }),
2850
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", { style: { fontSize: 11 }, children: this.state.errorInfo?.componentStack })
2851
- ] }),
2852
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
2853
- "button",
2854
- {
2855
- onClick: () => this.setState({ error: null, errorInfo: null }),
2856
- style: { marginTop: 16, padding: "8px 16px" },
2857
- children: "\u91CD\u8BD5"
2858
- }
2859
- )
2860
- ]
2861
- }
2862
- );
2863
- }
2864
- return this.props.children;
2865
- }
2866
- };
2867
- function findBackEdges(nodes, edges) {
2868
- const adj = /* @__PURE__ */ new Map();
2869
- edges.forEach((e) => {
2870
- if (!adj.has(e.src)) adj.set(e.src, []);
2871
- adj.get(e.src).push(e);
2872
- });
2873
- const vis = /* @__PURE__ */ new Set(), stk = /* @__PURE__ */ new Set(), back = /* @__PURE__ */ new Set();
2874
- function dfs(id) {
2875
- vis.add(id);
2876
- stk.add(id);
2877
- for (const e of adj.get(id) || []) {
2878
- if (!vis.has(e.tgt)) dfs(e.tgt);
2879
- else if (stk.has(e.tgt)) back.add(e.id);
2880
- }
2881
- stk.delete(id);
2882
- }
2883
- const entryNodes = nodes.filter(
2884
- (n) => n.type === "special" && (n.specialType === "START" || n.specialType === "IN")
2885
- );
2886
- if (entryNodes.length === 0) {
2887
- console.warn("[findBackEdges] \u672A\u627E\u5230\u5165\u53E3\u8282\u70B9 (START/IN), \u8FD4\u56DE\u7A7A back \u96C6\u5408\u3002nodes:", nodes.map((n) => `${n.id}:${n.type}:${n.specialType || ""}`));
2888
- } else {
2889
- entryNodes.forEach((n) => {
2890
- if (!vis.has(n.id)) dfs(n.id);
2891
- });
2892
- }
2893
- return back;
2894
- }
2895
- function findAllCycleEdges(nodes, edges) {
2896
- const adj = /* @__PURE__ */ new Map();
2897
- edges.forEach((e) => {
2898
- if (!adj.has(e.src)) adj.set(e.src, []);
2899
- adj.get(e.src).push(e);
2900
- });
2901
- const forNodeIds = new Set(
2902
- nodes.filter((n) => n.specialType === "FOR" || n.specialType === "PAR").map((n) => n.id)
2903
- );
2904
- const parOutTargetMap = /* @__PURE__ */ new Map();
2905
- nodes.forEach((n) => {
2906
- if (n.specialType === "PAR" && n.forOutNodeId) {
2907
- parOutTargetMap.set(n.id, n.forOutNodeId);
2908
- }
2909
- });
2910
- const cycleMap = /* @__PURE__ */ new Map();
2911
- for (const startId of forNodeIds) {
2912
- let dfs2 = function(currentId) {
2913
- if (recStack.has(currentId)) {
2914
- return;
2915
- }
2916
- recStack.add(currentId);
2917
- for (const e of adj.get(currentId) || []) {
2918
- if (visitedEdges.has(e.id)) continue;
2919
- visitedEdges.add(e.id);
2920
- pathEdges.push(e.id);
2921
- const isCycle = e.tgt === startId || parOutTargetMap.has(startId) && parOutTargetMap.get(startId) != null && e.tgt === parOutTargetMap.get(startId);
2922
- if (isCycle) {
2923
- pathEdges.forEach((id) => collected.add(id));
2924
- } else if (recStack.has(e.tgt)) {
2925
- const beforeSize = collected.size;
2926
- pathEdges.forEach((id) => collected.add(id));
2927
- } else {
2928
- dfs2(e.tgt);
2929
- }
2930
- pathEdges.pop();
2931
- visitedEdges.delete(e.id);
2932
- }
2933
- recStack.delete(currentId);
2934
- };
2935
- var dfs = dfs2;
2936
- const visitedEdges = /* @__PURE__ */ new Set();
2937
- const pathEdges = [];
2938
- const collected = /* @__PURE__ */ new Set();
2939
- const recStack = /* @__PURE__ */ new Set();
2940
- dfs2(startId);
2941
- if (collected.size > 0) {
2942
- cycleMap.set(startId, collected);
2943
- }
2944
- }
2945
- return cycleMap;
2946
- }
2947
-
2948
- // femoGen/src/femoGenerator.jsx
2949
- var AUTOVAR_SKIP = /* @__PURE__ */ new Set([
2950
- "and",
2951
- "or",
2952
- "not",
2953
- "in",
2954
- "is",
2955
- "True",
2956
- "False",
2957
- "None",
2958
- "true",
2959
- "false",
2960
- "TRUE",
2961
- "FALSE",
2962
- "string",
2963
- "int",
2964
- "float",
2965
- "bool",
2966
- "boolean",
2967
- "enum",
2968
- "dropdown",
2969
- "object",
2970
- "array",
2971
- "dict",
2972
- "list",
2973
- "str",
2974
- "num",
2975
- "choices",
2976
- "label",
2977
- "add",
2978
- "remove",
2979
- "len",
2980
- "SET_VARIABLE",
2981
- "prompt",
2982
- "llm_output"
2983
- ]);
2984
- function _varIdentity(raw) {
2985
- return raw.startsWith("$") ? raw.slice(1) : raw;
2986
- }
2987
- function _identRefs(expr) {
2988
- const noStr = String(expr).replace(/"[^"]*"|'[^']*'|“[^”]*”/g, "");
2989
- const out = [];
2990
- (noStr.match(/@?[\w\u4e00-\u9fff]+(?:\.[\w\u4e00-\u9fff]+)*/g) || []).forEach((ident) => {
2991
- const dot = ident.indexOf(".");
2992
- const main = dot >= 0 ? ident.slice(0, dot) : ident;
2993
- if (AUTOVAR_SKIP.has(main)) return;
2994
- if (/^\d+(\.\d+)?$/.test(main)) return;
2995
- out.push(main);
2996
- });
2997
- return out;
2998
- }
2999
- function _splitTopLevel(s, sep) {
3000
- const items = [];
3001
- let depth = 0;
3002
- let cur = "";
3003
- let q = null;
3004
- for (const ch of String(s)) {
3005
- if (q) {
3006
- cur += ch;
3007
- if (ch === q) q = null;
3008
- continue;
3009
- }
3010
- if (ch === '"' || ch === "'") {
3011
- q = ch;
3012
- cur += ch;
3013
- continue;
3014
- }
3015
- if (ch === "(" || ch === "[" || ch === "{") depth += 1;
3016
- else if (ch === ")" || ch === "]" || ch === "}") depth -= 1;
3017
- if (ch === sep && depth <= 0) {
3018
- items.push(cur);
3019
- cur = "";
3020
- continue;
3021
- }
3022
- cur += ch;
3023
- }
3024
- if (cur.trim()) items.push(cur);
3025
- return items;
3026
- }
3027
- function collectActionVarUses(a) {
3028
- const uses = [];
3029
- const push = (raw, dv = "") => {
3030
- if (raw) uses.push({ raw, dv });
3031
- };
3032
- String(a.outVars || "").split("\n").forEach((line) => {
3033
- _splitTopLevel(line, ",").forEach((item) => {
3034
- const t = item.trim().replace(/^,+|,+$/g, "");
3035
- if (!t) return;
3036
- const root = (t.match(/^([$@]?[\w\u4e00-\u9fff]+)/) || [])[1];
3037
- if (!root) return;
3038
- const am = t.match(/^([$@]?[\w\u4e00-\u9fff]+)\s*([+\-]?=)\s*(.+)$/);
3039
- if (am) {
3040
- let dv = "";
3041
- if (am[2] === "+=" || am[2] === "-=") dv = "0";
3042
- else if (/^\s*(add|remove)\s*\(/.test(am[3])) dv = "[]";
3043
- else {
3044
- const lit = am[3].trim();
3045
- if (/^("[^"]*"|'[^']*'|“[^”]*”)$/.test(lit) || /^\d+(\.\d+)?$/.test(lit) || /^(true|false)$/.test(lit)) dv = lit;
3046
- }
3047
- push(root, dv);
3048
- _identRefs(am[3]).forEach((r) => push(r));
3049
- } else {
3050
- push(root);
3051
- const cm = t.match(/choices\s*=\s*{([^}]*)}/);
3052
- if (cm) _identRefs(cm[1]).forEach((r) => push(r));
3053
- }
3054
- });
3055
- });
3056
- String(a.inMappings || "").split("\n").forEach((line) => {
3057
- _splitTopLevel(line, ",").forEach((seg) => {
3058
- const s = seg.trim().replace(/^,+|,+$/g, "");
3059
- if (!s) return;
3060
- const eq = s.indexOf("=");
3061
- _identRefs(eq >= 0 ? s.slice(eq + 1) : s).forEach((r) => push(r));
3062
- });
3063
- });
3064
- String(a.resolveArgs || "").split(",").forEach((s) => {
3065
- const t = s.trim();
3066
- if (t && !AUTOVAR_SKIP.has(t)) push(t);
3067
- });
3068
- if (["ai", "human", "mind"].includes(a.executorType) && a.executorActor && a.executorActor.startsWith("@")) {
3069
- push(a.executorActor);
3070
- }
3071
- return uses;
3072
- }
3073
- function planAutoVars(proj, libActions, libModules) {
3074
- const actions = libActions || [];
3075
- const modules = libModules || [];
3076
- if (!actions.length) return { globalExtra: [], moduleVarsById: /* @__PURE__ */ new Map() };
3077
- const actorNames = /* @__PURE__ */ new Set();
3078
- (proj.actors || []).forEach((x) => {
3079
- if (!x.name) return;
3080
- actorNames.add(x.name.startsWith("@") ? x.name : `@${x.name}`);
3081
- });
3082
- const moduleByScope = /* @__PURE__ */ new Map();
3083
- modules.forEach((m) => moduleByScope.set((m.path || []).join("/"), m));
3084
- const varScopes = /* @__PURE__ */ new Map();
3085
- actions.forEach((a) => {
3086
- const p = a.path || ["mainflow"];
3087
- const scope = p.length === 1 && p[0] === "mainflow" ? "mainflow" : p.join("/");
3088
- collectActionVarUses(a).forEach(({ raw, dv }) => {
3089
- if (raw.startsWith("@") && actorNames.has(raw)) return;
3090
- const id = _varIdentity(raw);
3091
- if (!varScopes.has(id)) varScopes.set(id, /* @__PURE__ */ new Map());
3092
- const m = varScopes.get(id);
3093
- const prev = m.get(scope);
3094
- if (!prev) m.set(scope, { raw, dv });
3095
- else if (!prev.dv && dv) m.set(scope, { raw, dv });
3096
- });
3097
- });
3098
- if (!varScopes.size) return { globalExtra: [], moduleVarsById: /* @__PURE__ */ new Map() };
3099
- const declaredGlobal = new Set((proj.vars || []).map((v) => _varIdentity(v.name)));
3100
- const declaredInMod = /* @__PURE__ */ new Map();
3101
- modules.forEach((m) => declaredInMod.set(m.id, new Set((m.vars || []).map((v) => _varIdentity(v.name)))));
3102
- const globalExtra = [];
3103
- const globalAdded = /* @__PURE__ */ new Set();
3104
- const moduleAdd = /* @__PURE__ */ new Map();
3105
- const moduleRemove = /* @__PURE__ */ new Map();
3106
- const removeModuleDecl = (modId, id) => {
3107
- if (!declaredInMod.get(modId)?.has(id)) return;
3108
- if (!moduleRemove.has(modId)) moduleRemove.set(modId, /* @__PURE__ */ new Set());
3109
- moduleRemove.get(modId).add(id);
3110
- };
3111
- const addGlobal = (decl, id) => {
3112
- if (declaredGlobal.has(id) || globalAdded.has(id)) return;
3113
- globalAdded.add(id);
3114
- globalExtra.push(decl);
3115
- };
3116
- varScopes.forEach((scopeMap, id) => {
3117
- const isMain = scopeMap.has("mainflow");
3118
- const modScopes = [...scopeMap.keys()].filter((k) => k !== "mainflow");
3119
- const crossScope = isMain || scopeMap.size >= 2;
3120
- if (!crossScope) {
3121
- const mod = moduleByScope.get(modScopes[0]);
3122
- if (!mod) return;
3123
- if (declaredGlobal.has(id)) return;
3124
- if (declaredInMod.get(mod.id)?.has(id)) return;
3125
- const owner = modules.find((m) => m.id !== mod.id && declaredInMod.get(m.id)?.has(id));
3126
- if (owner) {
3127
- const hit = (owner.vars || []).find((v) => _varIdentity(v.name) === id);
3128
- addGlobal({ name: hit.name, defaultValue: hit.defaultValue ?? '""' }, id);
3129
- removeModuleDecl(owner.id, id);
3130
- return;
3131
- }
3132
- if (!moduleAdd.has(mod.id)) moduleAdd.set(mod.id, /* @__PURE__ */ new Map());
3133
- const info = scopeMap.get(modScopes[0]);
3134
- moduleAdd.get(mod.id).set(id, { name: info.raw, defaultValue: info.dv || '""' });
3135
- return;
3136
- }
3137
- if (!declaredGlobal.has(id)) {
3138
- let decl = null;
3139
- for (const m of modules) {
3140
- const hit = (m.vars || []).find((v) => _varIdentity(v.name) === id);
3141
- if (hit) {
3142
- decl = { name: hit.name, defaultValue: hit.defaultValue ?? '""' };
3143
- break;
3144
- }
3145
- }
3146
- if (!decl) {
3147
- let dv = "";
3148
- let raw = "";
3149
- scopeMap.forEach((v) => {
3150
- if (!dv && v.dv) {
3151
- dv = v.dv;
3152
- raw = v.raw;
3153
- }
3154
- if (!raw) raw = v.raw;
3155
- });
3156
- decl = { name: raw, defaultValue: dv || '""' };
3157
- }
3158
- addGlobal(decl, id);
3159
- }
3160
- modules.forEach((m) => removeModuleDecl(m.id, id));
3161
- });
3162
- const moduleVarsById = /* @__PURE__ */ new Map();
3163
- modules.forEach((m) => {
3164
- const rm = moduleRemove.get(m.id);
3165
- const add = moduleAdd.get(m.id);
3166
- if (!rm && !add) return;
3167
- const kept = (m.vars || []).filter((v) => !(rm && rm.has(_varIdentity(v.name))));
3168
- const keptIds = new Set(kept.map((v) => _varIdentity(v.name)));
3169
- if (add) add.forEach((decl, id2) => {
3170
- if (!keptIds.has(id2)) kept.push(decl);
3171
- });
3172
- moduleVarsById.set(m.id, kept);
3173
- });
3174
- return { globalExtra, moduleVarsById };
3175
- }
3176
- function buildFEMO(nodes, edges, proj, mode, modName, libModules, libActions) {
3177
- if (!nodes.length) return "# \u7A7A\u753B\u5E03\uFF0C\u8BF7\u6DFB\u52A0\u8282\u70B9";
3178
- const cycleEdgesMap = findAllCycleEdges(nodes, edges);
3179
- const back = findBackEdges(nodes, edges);
3180
- const nm = new Map(nodes.map((n) => [n.id, n]));
3181
- const actionMap = /* @__PURE__ */ new Map();
3182
- (libActions || []).forEach((a) => actionMap.set(a.id, a.name));
3183
- const varPlan = planAutoVars(proj, libActions, libModules);
3184
- const lines = [];
3185
- function emitAction(a, indent) {
3186
- const pfx = " ".repeat(indent);
3187
- let actorStr;
3188
- if (a.executorType === "func") {
3189
- actorStr = a.executorActor ? `@func(${a.executorActor})` : `@func`;
3190
- } else if (a.executorType === "assign") {
3191
- actorStr = "@assign";
3192
- } else if (a.executorType === "notice") {
3193
- actorStr = "@notice";
3194
- } else {
3195
- actorStr = a.executorActor ? `@${a.executorType}(${a.executorActor})` : `@${a.executorType}`;
3196
- }
3197
- lines.push(`${pfx}action ${a.name} ${actorStr}:`);
3198
- if (a.inMappings) {
3199
- lines.push(`${pfx} in:`);
3200
- a.inMappings.split("\n").filter(Boolean).forEach((l) => lines.push(`${pfx} ${l.trim()}`));
3201
- }
3202
- if (a.prompt) {
3203
- lines.push(`${pfx} prompt: |`);
3204
- a.prompt.split("\n").forEach((l) => lines.push(`${pfx} ${l}`));
3205
- }
3206
- if (a.showprompt) {
3207
- lines.push(`${pfx} showprompt: |`);
3208
- a.showprompt.split("\n").forEach((l) => lines.push(`${pfx} ${l}`));
3209
- }
3210
- if (a.scope) lines.push(`${pfx} scope: ${a.scope}`);
3211
- if (a.outVars) {
3212
- lines.push(`${pfx} out:`);
3213
- a.outVars.split("\n").forEach((v) => {
3214
- const vt = v.trim();
3215
- if (vt) lines.push(`${pfx} ${vt}`);
3216
- });
3217
- }
3218
- if (a.resolve) {
3219
- const args = a.resolveArgs ? `(${a.resolveArgs})` : "";
3220
- lines.push(`${pfx} resolve: ${a.resolve}${args}`);
3221
- }
3222
- if (a.interrupt) lines.push(`${pfx} interrupt: ${a.interrupt}`);
3223
- if (a.fallback) lines.push(`${pfx} fallback: ${a.fallback}`);
3224
- if (a.maxRetries) lines.push(`${pfx} max_retries: ${a.maxRetries}`);
3225
- if (a.memory) lines.push(`${pfx} memory: ${a.memory}`);
3226
- if (a.context) lines.push(`${pfx} context: ${a.context}`);
3227
- lines.push("");
3228
- }
3229
- lines.push("meta:");
3230
- if (proj.id) lines.push(` id = ${proj.id}`);
3231
- if (proj.name) lines.push(` name = ${proj.name}`);
3232
- if (proj.version) lines.push(` version = ${proj.version}`);
3233
- if (proj.owner) lines.push(` owner = ${proj.owner}`);
3234
- if (proj.database) lines.push(` database = ${proj.database}`);
3235
- if (proj.session) lines.push(` session = ${proj.session}`);
3236
- if (proj.delay != null) lines.push(` delay = ${proj.delay}`);
3237
- if (proj.system_safety) {
3238
- if (typeof proj.system_safety === "string" && proj.system_safety.includes("\n")) {
3239
- lines.push(` system_safety = |`);
3240
- proj.system_safety.split("\n").forEach((l) => lines.push(` ${l}`));
3241
- } else {
3242
- lines.push(` system_safety = ${JSON.stringify(proj.system_safety)}`);
3243
- }
3244
- }
3245
- if (proj.output_style) {
3246
- if (typeof proj.output_style === "string" && proj.output_style.includes("\n")) {
3247
- lines.push(` output_style = |`);
3248
- proj.output_style.split("\n").forEach((l) => lines.push(` ${l}`));
3249
- } else {
3250
- lines.push(` output_style = ${JSON.stringify(proj.output_style)}`);
3251
- }
3252
- }
3253
- const knownKeys = /* @__PURE__ */ new Set(["id", "name", "version", "owner", "database", "session", "delay", "system_safety", "output_style", "vars", "code", "actors"]);
3254
- for (const [key, value] of Object.entries(proj)) {
3255
- if (knownKeys.has(key)) continue;
3256
- if (value === void 0 || value === null || value === "") continue;
3257
- if (typeof value === "string" && value.includes("\n")) {
3258
- lines.push(` ${key} = |`);
3259
- value.split("\n").forEach((l) => lines.push(` ${l}`));
3260
- } else {
3261
- lines.push(` ${key} = ${JSON.stringify(value)}`);
3262
- }
3263
- }
3264
- lines.push("");
3265
- if (proj.actors?.length) {
3266
- lines.push("actors:");
3267
- proj.actors.forEach((a) => {
3268
- const name = a.name?.startsWith("@") ? a.name : `@${a.name}`;
3269
- const parts = [];
3270
- if (a.soul) parts.push(`soul:${a.soul}`);
3271
- if (a.source) parts.push(`source:${a.source}`);
3272
- if (a.type === "ai" && a.thinking) parts.push(`thinking:${a.thinking}`);
3273
- if (a.type === "ai" && a.tools === false) {
3274
- parts.push("tools: false");
3275
- } else if (a.type === "ai" && a.tools === true) {
3276
- parts.push("tools: true");
3277
- } else if (a.type === "ai" && Array.isArray(a.tools) && a.tools.length) {
3278
- parts.push(`tools = [${a.tools.join(", ")}]`);
3279
- }
3280
- lines.push(parts.length > 0 ? ` ${a.type} ${name} = ${parts.join(", ")}` : ` ${a.type} ${name}`);
3281
- });
3282
- lines.push("");
3283
- }
3284
- if (proj.code && proj.code.length) {
3285
- lines.push("code:");
3286
- proj.code.forEach((c) => {
3287
- const val = c.value ? `file:"${c.value}"` : '""';
3288
- lines.push(` ${c.name} = ${val}`);
3289
- });
3290
- lines.push("");
3291
- }
3292
- const allGlobalVars = [...proj.vars || [], ...varPlan.globalExtra];
3293
- if (allGlobalVars.length) {
3294
- lines.push("vars:");
3295
- allGlobalVars.forEach((v) => {
3296
- if (v.name) lines.push(` ${v.name} = ${v.defaultValue}`);
3297
- });
3298
- lines.push("");
3299
- }
3300
- (libActions || []).filter((a) => a.path && a.path.length === 1 && a.path[0] === "mainflow").forEach((a) => emitAction(a, 0));
3301
- const _emitVisited = /* @__PURE__ */ new Set();
3302
- function emitModule(mod, indentLevel) {
3303
- if (_emitVisited.has(mod.id)) return;
3304
- _emitVisited.add(mod.id);
3305
- const pfx = " ".repeat(indentLevel);
3306
- lines.push(`${pfx}module ${mod.name}:`);
3307
- if (mod.meta && Object.keys(mod.meta).length) {
3308
- lines.push(`${pfx} meta:`);
3309
- for (const [k, v] of Object.entries(mod.meta)) {
3310
- if (v === void 0 || v === null || v === "") continue;
3311
- if (typeof v === "string" && v.includes("\n")) {
3312
- lines.push(`${pfx} ${k} = |`);
3313
- v.split("\n").forEach((l) => lines.push(`${pfx} ${l}`));
3314
- } else {
3315
- lines.push(`${pfx} ${k} = ${JSON.stringify(v)}`);
3316
- }
3317
- }
3318
- lines.push("");
3319
- }
3320
- if (mod.code && mod.code.length) {
3321
- lines.push(`${pfx} code:`);
3322
- mod.code.forEach((c) => lines.push(`${pfx} ${c.name} = ${c.value}`));
3323
- lines.push("");
3324
- }
3325
- const internalActions = (libActions || []).filter(
3326
- (a) => a.path && a.path.length === mod.path.length && a.path.every((seg, i) => seg === mod.path[i])
3327
- );
3328
- const modVars = varPlan.moduleVarsById.get(mod.id) ?? mod.vars;
3329
- if (modVars?.length) {
3330
- lines.push(`${pfx} vars:`);
3331
- modVars.forEach((v) => {
3332
- if (v.name) lines.push(`${pfx} ${v.name} = ${v.defaultValue}`);
3333
- });
3334
- lines.push("");
3335
- }
3336
- internalActions.forEach((a) => emitAction(a, indentLevel + 1));
3337
- const daughterModules = (libModules || []).filter(
3338
- (m) => m.path && m.path.length === mod.path.length + 1 && mod.path.every((seg, i) => seg === m.path[i])
3339
- );
3340
- daughterModules.forEach((m) => emitModule(m, indentLevel + 1));
3341
- lines.push(`${pfx} flow:`);
3342
- (mod.nodes || []).filter((n) => n.type !== "special" && n.type !== "for_out" && n.type !== "par_out").forEach((n) => {
3343
- const ref = n.type === "module" ? `&${n.modRef || "Module"}` : n.type === "position" ? "" : actionMap.get(n.actionId) || "unnamed";
3344
- lines.push(`${pfx} ${n.label}: ${ref}`);
3345
- });
3346
- lines.push("");
3347
- const modCycleMap = findAllCycleEdges(mod.nodes || [], mod.edges || []);
3348
- const modBack = findBackEdges(mod.nodes || [], mod.edges || []);
3349
- console.log("[emitModule] \u6A21\u5757:", mod.name, "cycleEdges:", modCycleMap.size, "back:", modBack.size);
3350
- emitFlowLines(mod.nodes || [], mod.edges || [], indentLevel + 2, lines, modCycleMap, modBack);
3351
- lines.push("");
3352
- const modAnchor = (mod.nodes || []).find(
3353
- (n) => n.type === "special" && (n.specialType === "IN" || n.specialType === "START")
3354
- );
3355
- const modSketchNodes = (mod.nodes || []).filter(
3356
- (n) => n.id !== modAnchor?.id && n.type !== "for_out"
3357
- );
3358
- if (modAnchor && modSketchNodes.length > 0) {
3359
- lines.push(`#${pfx} sketch:`);
3360
- modSketchNodes.forEach((n) => {
3361
- lines.push(`#${pfx} ${n.label} = ${Math.round(n.x - modAnchor.x)}, ${Math.round(n.y - modAnchor.y)}`);
3362
- });
3363
- lines.push("");
3364
- }
3365
- }
3366
- const topModules = (libModules || []).filter(
3367
- (m) => m.path && m.path.length === 2 && m.path[0] === "mainflow"
3368
- );
3369
- topModules.forEach((m) => emitModule(m, 0));
3370
- lines.push("mainflow:");
3371
- const mainNodes = nodes.filter((n) => n.type !== "special" && n.type !== "for_out" && n.type !== "par_out");
3372
- mainNodes.forEach((n) => {
3373
- const ref = n.type === "module" ? `&${n.modRef || "Module"}` : n.type === "position" ? "" : actionMap.get(n.actionId) || "unnamed";
3374
- lines.push(` ${n.label}: ${ref}`);
3375
- });
3376
- lines.push("");
3377
- emitFlowLines(nodes, edges, 1, lines, cycleEdgesMap, back);
3378
- const mainAnchor = nodes.find((n) => n.type === "special" && n.specialType === "START");
3379
- const mainSketchNodes = nodes.filter((n) => n.id !== mainAnchor?.id && n.type !== "for_out");
3380
- if (mainAnchor && mainSketchNodes.length > 0) {
3381
- lines.push("\n#sketch:");
3382
- mainSketchNodes.forEach((n) => {
3383
- lines.push(`# ${n.label} = ${Math.round(n.x - mainAnchor.x)}, ${Math.round(n.y - mainAnchor.y)}`);
3384
- });
3385
- lines.push("");
3386
- }
3387
- return lines.join("\n");
3388
- }
3389
- function emitFlowLines(nodes, edges, baseIndent, lines, cycleEdgesMap, back) {
3390
- if (!back) {
3391
- console.log("[emitFlowLines] back \u672A\u4F20\u5165, \u91CD\u65B0\u8BA1\u7B97, nodes:", nodes.length, "edges:", edges.length);
3392
- back = findBackEdges(nodes, edges);
3393
- } else {
3394
- }
3395
- const nm = new Map(nodes.map((n) => [n.id, n]));
3396
- const pfx = " ".repeat(baseIndent);
3397
- const adj = /* @__PURE__ */ new Map();
3398
- const inAdj = /* @__PURE__ */ new Map();
3399
- edges.forEach((e) => {
3400
- if (!adj.has(e.src)) adj.set(e.src, []);
3401
- adj.get(e.src).push(e);
3402
- if (!inAdj.has(e.tgt)) inAdj.set(e.tgt, []);
3403
- inAdj.get(e.tgt).push(e);
3404
- });
3405
- const specialEntryEdgesMap = /* @__PURE__ */ new Map();
3406
- for (const [src, edgeList] of adj.entries()) {
3407
- const specialEdges = edgeList.filter((e) => {
3408
- const tgtNode = nm.get(e.tgt);
3409
- return tgtNode && tgtNode.type === "special" && (tgtNode.specialType === "FOR" || tgtNode.specialType === "PAR");
3410
- });
3411
- if (specialEdges.length > 0) {
3412
- specialEntryEdgesMap.set(src, specialEdges);
3413
- adj.set(src, edgeList.filter((e) => !specialEdges.includes(e)));
3414
- }
3415
- }
3416
- nodes.forEach((node) => {
3417
- if (node.joinEntries && node.joinEntries.length > 0) {
3418
- const allIncoming = (inAdj.get(node.id) || []).filter((e) => !back.has(e.id)).map((e) => {
3419
- const lbl = nm.get(e.src)?.label || "";
3420
- return lbl.replace(/^\[|\]$/g, "");
3421
- }).filter(Boolean);
3422
- const coveredSources = /* @__PURE__ */ new Set();
3423
- node.joinEntries.forEach((entry) => entry.sources.forEach((s) => coveredSources.add(s)));
3424
- const newSources = allIncoming.filter((s) => !coveredSources.has(s));
3425
- if (newSources.length > 0) {
3426
- let allEntry = node.joinEntries.find((e) => e.param === "all");
3427
- if (!allEntry) {
3428
- allEntry = { param: "all", sources: [] };
3429
- node.joinEntries.push(allEntry);
3430
- }
3431
- allEntry.sources.push(...newSources);
3432
- }
3433
- }
3434
- });
3435
- const emittedFors = /* @__PURE__ */ new Set();
3436
- function flowConnector(cond) {
3437
- return cond ? `-> if (${cond}) ->` : "->";
3438
- }
3439
- function emitForBlock(forNodeId, indentLevel) {
3440
- const forNode = nm.get(forNodeId);
3441
- const isPar = forNode.specialType === "PAR";
3442
- const condition = forNode.forCondition || "@item in collection";
3443
- const ipfx = " ".repeat(indentLevel);
3444
- const incomingEdges = inAdj.get(forNodeId) || [];
3445
- const upstreamEdge = incomingEdges.find((e) => !back.has(e.id));
3446
- const upstreamLabel = upstreamEdge ? nm.get(upstreamEdge.src)?.label : "?";
3447
- const keyword = isPar ? "par" : "for";
3448
- lines.push(`${ipfx}${upstreamLabel} -> ${keyword} ${condition}:`);
3449
- const cycleEdgeSet = cycleEdgesMap.get(forNodeId) || /* @__PURE__ */ new Set();
3450
- const exitType = isPar ? "par_out" : "for_out";
3451
- const forOutNode = nodes.find((n) => n.type === exitType && n.forNodeId === forNodeId);
3452
- const forOutNodeId = forOutNode?.id;
3453
- const entryEdges = [];
3454
- const backEdges = [];
3455
- const internalEdges = [];
3456
- const stack = [forNodeId];
3457
- const visitedForBody = /* @__PURE__ */ new Set();
3458
- while (stack.length > 0) {
3459
- const cur = stack.pop();
3460
- for (const e of adj.get(cur) || []) {
3461
- if (!cycleEdgeSet.has(e.id)) continue;
3462
- if (visitedForBody.has(e.id)) continue;
3463
- visitedForBody.add(e.id);
3464
- if (cur === forNodeId) {
3465
- entryEdges.push(e);
3466
- } else if (e.tgt === forNodeId || forOutNodeId && e.tgt === forOutNodeId) {
3467
- backEdges.push(e);
3468
- } else {
3469
- internalEdges.push({ src: cur, tgt: e.tgt, cond: e.cond || "" });
3470
- }
3471
- if (e.tgt !== forNodeId && e.tgt !== forOutNodeId) {
3472
- stack.push(e.tgt);
3473
- }
3474
- }
3475
- }
3476
- const bodyIndent = indentLevel + 1;
3477
- const bp = " ".repeat(bodyIndent);
3478
- const entryVisited = /* @__PURE__ */ new Set();
3479
- for (const ee of entryEdges) {
3480
- const startTgt = nm.get(ee.tgt);
3481
- if (!startTgt || entryVisited.has(ee.tgt)) continue;
3482
- entryVisited.add(ee.tgt);
3483
- const chainParts = [];
3484
- if (ee.cond) {
3485
- chainParts.push(`if (${ee.cond}) -> ${startTgt.label}`);
3486
- } else {
3487
- chainParts.push(startTgt.label);
3488
- }
3489
- let current = ee.tgt;
3490
- const localVisited = /* @__PURE__ */ new Set([ee.id, ee.tgt]);
3491
- while (true) {
3492
- const outs = internalEdges.filter((e) => e.src === current);
3493
- if (outs.length === 1) {
3494
- const nextEdge = outs[0];
3495
- if (forOutNode && nextEdge.tgt === forOutNode.id) break;
3496
- if (localVisited.has(nextEdge.tgt)) break;
3497
- const tgtNode = nm.get(nextEdge.tgt);
3498
- if (!tgtNode) break;
3499
- if (nextEdge.cond) {
3500
- chainParts.push(`if (${nextEdge.cond}) -> ${tgtNode.label}`);
3501
- } else {
3502
- chainParts.push(tgtNode.label);
3503
- }
3504
- localVisited.add(nextEdge.tgt);
3505
- current = nextEdge.tgt;
3506
- } else {
3507
- break;
3508
- }
3509
- }
3510
- const endsAtExit = forOutNode && (adj.get(current) || []).some((e) => e.tgt === forOutNode.id);
3511
- const endsAtFor = edges.some((e) => e.src === current && e.tgt === forNodeId);
3512
- const chainStr = chainParts.join(" -> ");
3513
- const loopBackEdges = internalEdges.filter(
3514
- (e) => e.src === current && localVisited.has(e.tgt) && nm.has(e.tgt)
3515
- );
3516
- const extraEdges = internalEdges.filter(
3517
- (e) => e.src === current && !localVisited.has(e.tgt) && e.tgt !== current && !(forOutNode && e.tgt === forOutNode.id)
3518
- );
3519
- if (loopBackEdges.length > 0 || extraEdges.length > 0) {
3520
- const arrowSuffix = endsAtExit || endsAtFor ? " ->" : "";
3521
- lines.push(`${bp}-> ${chainStr}${arrowSuffix}`);
3522
- console.log("[emitForBlock] \u56DE\u6307\u8FB9\u8F93\u51FA, current:", nm.get(current)?.label, "loopBack:", loopBackEdges.map((e) => `${nm.get(e.src)?.label}->${nm.get(e.tgt)?.label}`), "extra:", extraEdges.map((e) => `${nm.get(e.src)?.label}->${nm.get(e.tgt)?.label}`));
3523
- const seenTgt = /* @__PURE__ */ new Set();
3524
- for (const lb of loopBackEdges) {
3525
- const tgtLabel = nm.get(lb.tgt)?.label;
3526
- if (!tgtLabel || seenTgt.has(lb.tgt)) continue;
3527
- seenTgt.add(lb.tgt);
3528
- const srcLabel = nm.get(lb.src)?.label || "?";
3529
- lines.push(`${bp}${srcLabel} ${flowConnector(lb.cond)} ${tgtLabel}`);
3530
- }
3531
- for (const ef of extraEdges) {
3532
- const tgtLabel = nm.get(ef.tgt)?.label;
3533
- if (!tgtLabel || seenTgt.has(ef.tgt)) continue;
3534
- seenTgt.add(ef.tgt);
3535
- const srcLabel = nm.get(ef.src)?.label || "?";
3536
- lines.push(`${bp}${srcLabel} ${flowConnector(ef.cond)} ${tgtLabel}`);
3537
- }
3538
- } else {
3539
- const arrowSuffix = endsAtExit || endsAtFor ? " ->" : "";
3540
- lines.push(`${bp}-> ${chainStr}${arrowSuffix}`);
3541
- }
3542
- }
3543
- if (forOutNode) {
3544
- const exitEdges = adj.get(forOutNode.id) || [];
3545
- if (exitEdges.length > 0) {
3546
- const exitTarget = nm.get(exitEdges[0].tgt);
3547
- if (exitTarget) {
3548
- lines.push(`${ipfx}-> ${exitTarget.label}`);
3549
- }
3550
- }
3551
- }
3552
- emittedFors.add(forNodeId);
3553
- }
3554
- function emitParBlock(parNodeId, indentLevel) {
3555
- const parNode = nm.get(parNodeId);
3556
- const condition = parNode.forCondition || "@item in collection";
3557
- const ipfx = " ".repeat(indentLevel);
3558
- const incomingEdges = inAdj.get(parNodeId) || [];
3559
- const upstreamEdge = incomingEdges.find((e) => !back.has(e.id));
3560
- const upstreamLabel = upstreamEdge ? nm.get(upstreamEdge.src)?.label : "?";
3561
- lines.push(`${ipfx}${upstreamLabel} -> par ${condition}:`);
3562
- const bp = " ".repeat(indentLevel + 1);
3563
- const parOutNode = nodes.find((n) => n.type === "par_out" && n.forNodeId === parNodeId);
3564
- const parOutId = parOutNode?.id;
3565
- const branchEdges = adj.get(parNodeId) || [];
3566
- for (const be of branchEdges) {
3567
- const startNode2 = nm.get(be.tgt);
3568
- if (!startNode2) continue;
3569
- const chainParts = be.cond ? [`if (${be.cond}) -> ${startNode2.label}`] : [startNode2.label];
3570
- let current = be.tgt;
3571
- const localVisited = /* @__PURE__ */ new Set([parNodeId, be.tgt]);
3572
- const collectedLoopBacks = [];
3573
- const collectedExtras = [];
3574
- while (true) {
3575
- const curLoopBacks = (adj.get(current) || []).filter(
3576
- (e) => localVisited.has(e.tgt) && nm.has(e.tgt) && e.tgt !== parNodeId
3577
- );
3578
- if (curLoopBacks.length > 0) {
3579
- }
3580
- for (const e of curLoopBacks) collectedLoopBacks.push(e);
3581
- const nexts = (adj.get(current) || []).filter(
3582
- (e) => e.tgt !== parOutId && e.tgt !== parNodeId && !localVisited.has(e.tgt) && !back.has(e.id)
3583
- );
3584
- if (curLoopBacks.length > 0 || nexts.length !== 1) {
3585
- for (const e of nexts) collectedExtras.push(e);
3586
- if (curLoopBacks.length > 0) {
3587
- } else {
3588
- console.log("[emitParBlock] \u975E\u56DE\u8FB9 fork/dead-end, nexts.length:", nexts.length);
3589
- }
3590
- break;
3591
- }
3592
- const nextEdge = nexts[0];
3593
- const tgtNode = nm.get(nextEdge.tgt);
3594
- if (!tgtNode) {
3595
- console.log("[emitParBlock] tgtNode \u4E3A\u7A7A, break");
3596
- break;
3597
- }
3598
- chainParts.push(nextEdge.cond ? `if (${nextEdge.cond}) -> ${tgtNode.label}` : tgtNode.label);
3599
- localVisited.add(nextEdge.tgt);
3600
- current = nextEdge.tgt;
3601
- }
3602
- const toParOut = parOutId && (adj.get(current) || []).some((e) => e.tgt === parOutId);
3603
- const chainStr = chainParts.join(" -> ");
3604
- const arrowSuffix = toParOut ? " ->" : "";
3605
- const mainLine = `${bp}-> ${chainStr}${arrowSuffix}`;
3606
- lines.push(mainLine);
3607
- const seenBackTgt = /* @__PURE__ */ new Set();
3608
- for (const lb of collectedLoopBacks) {
3609
- const tgtLabel = nm.get(lb.tgt)?.label;
3610
- if (!tgtLabel || seenBackTgt.has(lb.tgt)) continue;
3611
- seenBackTgt.add(lb.tgt);
3612
- const srcLabel = nm.get(lb.src)?.label || "?";
3613
- const line = `${bp}${srcLabel} ${flowConnector(lb.cond)} ${tgtLabel}`;
3614
- lines.push(line);
3615
- }
3616
- const seenExtraTgt = /* @__PURE__ */ new Set();
3617
- for (const ef of collectedExtras) {
3618
- const tgtLabel = nm.get(ef.tgt)?.label;
3619
- if (!tgtLabel || seenExtraTgt.has(ef.tgt)) continue;
3620
- seenExtraTgt.add(ef.tgt);
3621
- const tgtHasParOut = parOutId && (adj.get(ef.tgt) || []).some((e2) => e2.tgt === parOutId);
3622
- const srcLabel = nm.get(ef.src)?.label || "?";
3623
- const extraArrow = tgtHasParOut ? " ->" : "";
3624
- const line = `${bp}${srcLabel} ${flowConnector(ef.cond)} ${tgtLabel}${extraArrow}`;
3625
- lines.push(line);
3626
- }
3627
- }
3628
- if (parOutNode) {
3629
- const exitEdges = adj.get(parOutNode.id) || [];
3630
- if (exitEdges.length > 0) {
3631
- const exitTarget = nm.get(exitEdges[0].tgt);
3632
- if (exitTarget) lines.push(`${ipfx}-> ${exitTarget.label}`);
3633
- }
3634
- }
3635
- emittedFors.add(parNodeId);
3636
- }
3637
- const joinNodes = /* @__PURE__ */ new Map();
3638
- inAdj.forEach((eds, nodeId) => {
3639
- const node = nm.get(nodeId);
3640
- if (node && node.type === "position") return;
3641
- if (node && node.type === "par_out") return;
3642
- if (node && Array.isArray(node.joinEntries) && node.joinEntries.length > 0) {
3643
- const normal = eds.filter((e) => !back.has(e.id));
3644
- if (normal.length > 1) joinNodes.set(nodeId, normal.length);
3645
- }
3646
- });
3647
- const startNode = nodes.find(
3648
- (n) => n.type === "special" && (n.specialType === "START" || n.specialType === "IN")
3649
- );
3650
- if (startNode) {
3651
- let walk2 = function(id) {
3652
- const node = nm.get(id);
3653
- if (!node) return;
3654
- if ((node.specialType === "FOR" || node.specialType === "PAR") && (!cycleEdgesMap || !cycleEdgesMap.has(id))) {
3655
- return;
3656
- }
3657
- const specialEntries = specialEntryEdgesMap.get(id) || [];
3658
- for (const se of specialEntries) {
3659
- const tgtNode = nm.get(se.tgt);
3660
- if (!tgtNode || emittedFors.has(se.tgt)) continue;
3661
- if (tgtNode.specialType === "PAR") {
3662
- emitParBlock(se.tgt, baseIndent);
3663
- } else {
3664
- emitForBlock(se.tgt, baseIndent);
3665
- }
3666
- const exitType = tgtNode.specialType === "PAR" ? "par_out" : "for_out";
3667
- const forOutNode = nodes.find((n) => n.type === exitType && n.forNodeId === se.tgt);
3668
- if (forOutNode) {
3669
- const exitEdges = adj.get(forOutNode.id) || [];
3670
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3671
- }
3672
- }
3673
- if (joinNodes.has(id) || node.joinEntries && node.joinEntries.length > 0) {
3674
- if (node.joinEntries && node.joinEntries.length > 0) {
3675
- if (joinNodes.has(id)) {
3676
- const cnt = (joinReached.get(id) || 0) + 1;
3677
- joinReached.set(id, cnt);
3678
- if (cnt < joinNodes.get(id)) return;
3679
- }
3680
- for (const entry of node.joinEntries) {
3681
- lines.push(`${pfx}join(${entry.param}):`);
3682
- for (const srcLabel of entry.sources) {
3683
- const clean = String(srcLabel).replace(/^\[|\]$/g, "");
3684
- lines.push(`${pfx} [${clean}] ->`);
3685
- }
3686
- lines.push(`${pfx}to ${node.label}`);
3687
- }
3688
- } else if (joinNodes.has(id)) {
3689
- const cnt = (joinReached.get(id) || 0) + 1;
3690
- joinReached.set(id, cnt);
3691
- if (cnt < joinNodes.get(id)) return;
3692
- const sources = inAdj.get(id).filter((e) => !back.has(e.id));
3693
- if (!node.joinEntries) node.joinEntries = [];
3694
- node.joinEntries.push({ sources: sources.map((e) => nm.get(e.src)?.label).filter(Boolean), param: "all" });
3695
- lines.push(`${pfx}join(all):`);
3696
- sources.forEach(
3697
- (e) => lines.push(`${pfx} ${nm.get(e.src)?.label} ->`)
3698
- );
3699
- lines.push(`${pfx}to ${node.label}`);
3700
- }
3701
- }
3702
- if (node.specialType === "PAR") {
3703
- if (!emittedFors.has(id)) {
3704
- emitParBlock(id, baseIndent);
3705
- const parOutNode = nodes.find((n) => n.type === "par_out" && n.forNodeId === id);
3706
- if (parOutNode) {
3707
- const exitEdges = adj.get(parOutNode.id) || [];
3708
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3709
- }
3710
- }
3711
- if (!visited.has(id)) visited.add(id);
3712
- return;
3713
- }
3714
- if (node.specialType === "FOR" && cycleEdgesMap && cycleEdgesMap.has(id)) {
3715
- if (!emittedFors.has(id)) {
3716
- emitForBlock(id, baseIndent);
3717
- const forOutNode = nodes.find((n) => n.type === "for_out" && n.forNodeId === id);
3718
- if (forOutNode) {
3719
- const exitEdges = adj.get(forOutNode.id) || [];
3720
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3721
- }
3722
- }
3723
- if (!visited.has(id)) visited.add(id);
3724
- return;
3725
- }
3726
- if (visited.has(id)) return;
3727
- visited.add(id);
3728
- const outs = (adj.get(id) || []).filter((e) => {
3729
- if (back.has(e.id)) return false;
3730
- const tgtNode = nm.get(e.tgt);
3731
- if (tgtNode && tgtNode.specialType === "FOR" && !cycleEdgesMap?.has(e.tgt)) return false;
3732
- return true;
3733
- });
3734
- const backOuts = (adj.get(id) || []).filter((e) => back.has(e.id));
3735
- if (backOuts.length) {
3736
- if (outs.length > 0 || backOuts.some((e) => e.cond)) {
3737
- const allEdges = [...backOuts, ...outs];
3738
- lines.push(`${pfx}${node.label} -> fork:`);
3739
- const seenForkTgt = /* @__PURE__ */ new Set();
3740
- allEdges.forEach((e) => {
3741
- const tgt = nm.get(e.tgt);
3742
- if (!tgt || seenForkTgt.has(tgt.id)) return;
3743
- seenForkTgt.add(tgt.id);
3744
- const cond = e.cond ? ` if (${e.cond}) ->` : "";
3745
- lines.push(`${pfx} ->${cond} ${tgt.label}`);
3746
- });
3747
- outs.forEach((e) => walk2(e.tgt));
3748
- return;
3749
- }
3750
- backOuts.forEach((e) => {
3751
- lines.push(`${pfx}${node.label} -> ${nm.get(e.tgt)?.label}`);
3752
- });
3753
- }
3754
- const outsWithoutPar = outs.filter((e) => {
3755
- const tgtNode = nm.get(e.tgt);
3756
- return !(tgtNode && tgtNode.specialType === "PAR");
3757
- });
3758
- if (outsWithoutPar.length === 0) {
3759
- outs.forEach((e) => {
3760
- const tgtNode = nm.get(e.tgt);
3761
- if (tgtNode && tgtNode.specialType === "PAR" && !emittedFors.has(e.tgt)) {
3762
- emitParBlock(e.tgt, baseIndent);
3763
- const parOutNode = nodes.find((n) => n.type === "par_out" && n.forNodeId === e.tgt);
3764
- if (parOutNode) {
3765
- const exitEdges = adj.get(parOutNode.id) || [];
3766
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3767
- }
3768
- }
3769
- });
3770
- return;
3771
- }
3772
- if (outsWithoutPar.length === 1) {
3773
- const e = outsWithoutPar[0];
3774
- const tgt = nm.get(e.tgt);
3775
- if (tgt && tgt.specialType === "FOR" && cycleEdgesMap?.has(e.tgt)) {
3776
- walk2(e.tgt);
3777
- } else if (tgt && tgt.specialType === "PAR" && !emittedFors.has(e.tgt)) {
3778
- emitParBlock(e.tgt, baseIndent);
3779
- const parOutNode = nodes.find((n) => n.type === "par_out" && n.forNodeId === e.tgt);
3780
- if (parOutNode) {
3781
- const exitEdges = adj.get(parOutNode.id) || [];
3782
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3783
- }
3784
- } else if (tgt && !joinNodes.has(e.tgt)) {
3785
- const cond = e.cond ? ` if (${e.cond}) ->` : "";
3786
- lines.push(`${pfx}${node.label} ->${cond} ${tgt.label}`);
3787
- walk2(e.tgt);
3788
- } else {
3789
- walk2(e.tgt);
3790
- }
3791
- } else {
3792
- const parOuts = [];
3793
- const normalOuts = [];
3794
- outs.forEach((e) => {
3795
- const tgtNode = nm.get(e.tgt);
3796
- if (tgtNode && tgtNode.specialType === "PAR") {
3797
- parOuts.push(e);
3798
- } else {
3799
- normalOuts.push(e);
3800
- }
3801
- });
3802
- parOuts.forEach((e) => {
3803
- if (!emittedFors.has(e.tgt)) {
3804
- emitParBlock(e.tgt, baseIndent);
3805
- const parOutNode = nodes.find((n) => n.type === "par_out" && n.forNodeId === e.tgt);
3806
- if (parOutNode) {
3807
- const exitEdges = adj.get(parOutNode.id) || [];
3808
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3809
- }
3810
- }
3811
- });
3812
- if (normalOuts.length > 0) {
3813
- lines.push(`${pfx}${node.label} -> fork:`);
3814
- const seenTgt = /* @__PURE__ */ new Set();
3815
- normalOuts.forEach((e) => {
3816
- const tgt = nm.get(e.tgt);
3817
- if (!tgt || seenTgt.has(tgt.id)) return;
3818
- seenTgt.add(tgt.id);
3819
- const cond = e.cond ? ` if (${e.cond}) ->` : "";
3820
- lines.push(`${pfx} ->${cond} ${tgt.label}`);
3821
- });
3822
- normalOuts.forEach((e) => walk2(e.tgt));
3823
- }
3824
- }
3825
- };
3826
- var walk = walk2;
3827
- const visited = /* @__PURE__ */ new Set();
3828
- const joinReached = /* @__PURE__ */ new Map();
3829
- const startSpecialEntries = specialEntryEdgesMap.get(startNode.id) || [];
3830
- for (const se of startSpecialEntries) {
3831
- const tgtNode = nm.get(se.tgt);
3832
- if (!tgtNode || emittedFors.has(se.tgt)) continue;
3833
- if (tgtNode.specialType === "PAR") {
3834
- emitParBlock(se.tgt, baseIndent);
3835
- } else {
3836
- emitForBlock(se.tgt, baseIndent);
3837
- }
3838
- const exitType = tgtNode.specialType === "PAR" ? "par_out" : "for_out";
3839
- const forOutNode = nodes.find((n) => n.type === exitType && n.forNodeId === se.tgt);
3840
- if (forOutNode) {
3841
- const exitEdges = adj.get(forOutNode.id) || [];
3842
- if (exitEdges.length > 0) walk2(exitEdges[0].tgt);
3843
- }
3844
- }
3845
- const startOuts = (adj.get(startNode.id) || []).filter((e) => {
3846
- if (back.has(e.id)) return false;
3847
- const tgtNode = nm.get(e.tgt);
3848
- if (tgtNode && tgtNode.specialType === "FOR" && !cycleEdgesMap?.has(e.tgt)) return false;
3849
- return true;
3850
- });
3851
- if (startOuts.length === 1) {
3852
- const tgt = nm.get(startOuts[0].tgt);
3853
- if (tgt) {
3854
- if (tgt.specialType === "FOR" && cycleEdgesMap?.has(tgt.id)) {
3855
- walk2(startOuts[0].tgt);
3856
- } else {
3857
- lines.push(`${pfx}${startNode.label} -> ${tgt.label}`);
3858
- walk2(startOuts[0].tgt);
3859
- }
3860
- }
3861
- } else if (startOuts.length > 1) {
3862
- lines.push(`${pfx}${startNode.label} -> fork:`);
3863
- const seenStartTgt = /* @__PURE__ */ new Set();
3864
- startOuts.forEach((e) => {
3865
- const tgt = nm.get(e.tgt);
3866
- if (!tgt || seenStartTgt.has(tgt.id)) return;
3867
- seenStartTgt.add(tgt.id);
3868
- const cond = e.cond ? ` if (${e.cond}) ->` : "";
3869
- lines.push(`${pfx} ->${cond} ${tgt.label}`);
3870
- });
3871
- startOuts.forEach((e) => walk2(e.tgt));
3872
- }
3873
- } else {
3874
- const hasIncoming = new Set(edges.map((e) => e.tgt));
3875
- const starts = nodes.filter((n) => !hasIncoming.has(n.id));
3876
- lines.push(
3877
- `${pfx}[START] -> ${starts.map((n) => n.label).join(", ") || "[END]"}`
3878
- );
3879
- }
3880
- }
3881
- export {
3882
- buildFEMO,
3883
- emitFlowLines,
3884
- planAutoVars
3885
- };
3886
- /*! Bundled license information:
3887
-
3888
- react/cjs/react.development.js:
3889
- (**
3890
- * @license React
3891
- * react.development.js
3892
- *
3893
- * Copyright (c) Facebook, Inc. and its affiliates.
3894
- *
3895
- * This source code is licensed under the MIT license found in the
3896
- * LICENSE file in the root directory of this source tree.
3897
- *)
3898
-
3899
- react/cjs/react-jsx-runtime.development.js:
3900
- (**
3901
- * @license React
3902
- * react-jsx-runtime.development.js
3903
- *
3904
- * Copyright (c) Facebook, Inc. and its affiliates.
3905
- *
3906
- * This source code is licensed under the MIT license found in the
3907
- * LICENSE file in the root directory of this source tree.
3908
- *)
3909
- */