@holoscript/core 7.0.0 → 8.0.1

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 (350) hide show
  1. package/README.md +4 -4
  2. package/bin/holoscript.cjs +3 -0
  3. package/dist/GLTFPipeline-N6B6PJ6G.cjs +38 -0
  4. package/dist/GLTFPipeline-P3WMNYCN.js +17 -0
  5. package/dist/HoloScriptPlusParser-7FBIFUFC.js +693 -0
  6. package/dist/HoloScriptPlusParser-A2W7OCN2.cjs +698 -0
  7. package/dist/HoloScriptPlusParser-F2Z56FJR.js +10 -0
  8. package/dist/HoloScriptPlusParser-WKHRIH6T.cjs +27 -0
  9. package/dist/HoloScriptRuntime-CBYJX3LZ.js +10 -0
  10. package/dist/HoloScriptRuntime-VJ374RER.cjs +19 -0
  11. package/dist/USDZExporter-3FWJ25JI.cjs +1037 -0
  12. package/dist/USDZExporter-D2HQLQYK.js +1035 -0
  13. package/dist/agents/index.cjs +19 -0
  14. package/dist/agents/index.d.ts +100 -0
  15. package/dist/agents/index.js +17 -0
  16. package/dist/chunk-2BSMSUCE.js +1941 -0
  17. package/dist/chunk-2IWC4FP7.cjs +1189 -0
  18. package/dist/chunk-2M2DPHKB.js +762 -0
  19. package/dist/chunk-2X7NGX3M.js +2426 -0
  20. package/dist/chunk-2YSNA2F2.cjs +1274 -0
  21. package/dist/chunk-3FOKASKO.cjs +348 -0
  22. package/dist/chunk-3WZEJHUQ.cjs +116 -0
  23. package/dist/chunk-4C57PR42.js +468 -0
  24. package/dist/chunk-4GU5GCIY.js +1384 -0
  25. package/dist/chunk-4N4SXXWF.js +769 -0
  26. package/dist/chunk-4PDEPEQW.cjs +41 -0
  27. package/dist/chunk-4R6SBXDB.js +45 -0
  28. package/dist/chunk-4SDKXQ4C.js +811 -0
  29. package/dist/chunk-4V2E7U7Q.cjs +2015 -0
  30. package/dist/chunk-5FSKKMR7.cjs +2092 -0
  31. package/dist/chunk-5GLCTO44.js +161 -0
  32. package/dist/chunk-5H2G27PK.cjs +627 -0
  33. package/dist/chunk-5JEU52DW.js +382 -0
  34. package/dist/chunk-5NWINHR5.cjs +689 -0
  35. package/dist/chunk-5S7RKFGR.cjs +446 -0
  36. package/dist/chunk-5WUNN6ZN.cjs +428 -0
  37. package/dist/chunk-6CTRH7HT.cjs +1985 -0
  38. package/dist/chunk-6EX3I5P4.cjs +130 -0
  39. package/dist/chunk-6Q7RC2MK.cjs +1418 -0
  40. package/dist/chunk-7H33U5SM.cjs +413 -0
  41. package/dist/chunk-7M3PNU2M.cjs +672 -0
  42. package/dist/chunk-7T25IEZ2.js +449 -0
  43. package/dist/chunk-7V4JI5TB.cjs +6947 -0
  44. package/dist/chunk-A6KINLZJ.js +236 -0
  45. package/dist/chunk-ADADVMXY.js +404 -0
  46. package/dist/chunk-AIA52I7T.cjs +543 -0
  47. package/dist/chunk-ALC6K7GL.cjs +4402 -0
  48. package/dist/chunk-ANXZFVY2.js +113 -0
  49. package/dist/chunk-AOVGZ25K.cjs +56583 -0
  50. package/dist/chunk-AVJHHUC5.cjs +718 -0
  51. package/dist/chunk-BGY3SDG3.js +4396 -0
  52. package/dist/chunk-BOVPWH4H.js +3857 -0
  53. package/dist/chunk-BRQJKJGT.cjs +20 -0
  54. package/dist/chunk-C37BHB7N.cjs +636 -0
  55. package/dist/chunk-CBJY23VL.js +126 -0
  56. package/dist/chunk-CCATWPXM.js +778 -0
  57. package/dist/chunk-CIWWXYHZ.cjs +50 -0
  58. package/dist/chunk-CMT5NMMS.js +669 -0
  59. package/dist/chunk-CR4FMIWL.cjs +1049 -0
  60. package/dist/chunk-CR7XRXRN.cjs +639 -0
  61. package/dist/chunk-CSD27UNQ.js +2176 -0
  62. package/dist/chunk-D3STJ56J.js +714 -0
  63. package/dist/chunk-DAJXW4KX.js +725 -0
  64. package/dist/chunk-DHO2YRIM.js +756 -0
  65. package/dist/chunk-DTGBOSEM.cjs +319 -0
  66. package/dist/chunk-E6XXE66V.js +2252 -0
  67. package/dist/chunk-E7JP3BS3.cjs +61 -0
  68. package/dist/chunk-EKBKLK7P.js +1169 -0
  69. package/dist/chunk-EKYL4PE3.cjs +404 -0
  70. package/dist/chunk-EXKSFGSX.cjs +274 -0
  71. package/dist/chunk-EXUP2BUM.cjs +1173 -0
  72. package/dist/chunk-FDSGHPAK.js +130 -0
  73. package/dist/chunk-FEWUHQNM.cjs +144 -0
  74. package/dist/chunk-FFAOS5HQ.js +70 -0
  75. package/dist/chunk-FGGJQRLZ.js +270 -0
  76. package/dist/chunk-FHP6LXJS.js +415 -0
  77. package/dist/chunk-FJPADH77.cjs +666 -0
  78. package/dist/chunk-FL33V6U7.js +421 -0
  79. package/dist/chunk-FYSPZT4V.cjs +169 -0
  80. package/dist/chunk-GIOYPNTH.js +5575 -0
  81. package/dist/chunk-GJNCFRJU.cjs +125 -0
  82. package/dist/chunk-GMP623FG.cjs +1508 -0
  83. package/dist/chunk-GQHQOPXZ.cjs +5580 -0
  84. package/dist/chunk-GTU2Z2WW.cjs +262 -0
  85. package/dist/chunk-GYZE55MO.js +2007 -0
  86. package/dist/chunk-GZG4KA4E.js +529 -0
  87. package/dist/chunk-H652NHX5.js +600 -0
  88. package/dist/chunk-HCCQLAA4.cjs +74 -0
  89. package/dist/chunk-HKEXJUWS.cjs +4007 -0
  90. package/dist/chunk-HNDK4IQU.cjs +5737 -0
  91. package/dist/chunk-HR2OSYVQ.js +56165 -0
  92. package/dist/chunk-HYNTS5CP.js +422 -0
  93. package/dist/chunk-I6XZ5DZF.cjs +488 -0
  94. package/dist/chunk-ILRBGFVD.cjs +72 -0
  95. package/dist/chunk-IUDGEUDO.cjs +1409 -0
  96. package/dist/chunk-IUTY5WQ2.cjs +424 -0
  97. package/dist/chunk-IVY74O6C.js +247 -0
  98. package/dist/chunk-IWC5DM2M.cjs +611 -0
  99. package/dist/chunk-J32ZJZJH.js +554 -0
  100. package/dist/chunk-J52VSAQ7.js +6884 -0
  101. package/dist/chunk-J6M4FPK5.js +421 -0
  102. package/dist/chunk-J7XZV333.js +844 -0
  103. package/dist/chunk-JBNDTXXV.cjs +2433 -0
  104. package/dist/chunk-JC5YBPSF.cjs +984 -0
  105. package/dist/chunk-JD7CIZ33.js +1949 -0
  106. package/dist/chunk-JIBL5LRK.js +4287 -0
  107. package/dist/chunk-JIYN45TV.cjs +2525 -0
  108. package/dist/chunk-K574J76X.cjs +457 -0
  109. package/dist/chunk-KHDZJE5D.cjs +2196 -0
  110. package/dist/chunk-KKFZ3B6J.cjs +557 -0
  111. package/dist/chunk-KKP7JKN4.cjs +6002 -0
  112. package/dist/chunk-KPJL34Y7.cjs +186 -0
  113. package/dist/chunk-KQCN6AKJ.cjs +3042 -0
  114. package/dist/chunk-L5LKKENW.cjs +424 -0
  115. package/dist/chunk-LHAXPADA.js +882 -0
  116. package/dist/chunk-LM2VU56C.cjs +37 -0
  117. package/dist/chunk-M56JSP4A.js +400 -0
  118. package/dist/chunk-MBOOR7X4.js +18 -0
  119. package/dist/chunk-MQWAT42R.cjs +4310 -0
  120. package/dist/chunk-MXFUTKCO.js +56 -0
  121. package/dist/chunk-MYY4PMWX.cjs +264 -0
  122. package/dist/chunk-N75IH2HY.js +258 -0
  123. package/dist/chunk-NCWCUZNS.cjs +72 -0
  124. package/dist/chunk-NG77ATEW.cjs +778 -0
  125. package/dist/chunk-NW5G5FBQ.js +215 -0
  126. package/dist/chunk-OBIYPYYS.cjs +1993 -0
  127. package/dist/chunk-OH2FAIVU.js +608 -0
  128. package/dist/chunk-OIQYIIO3.cjs +473 -0
  129. package/dist/chunk-OL46QLBJ.js +61 -0
  130. package/dist/chunk-OMXII44L.js +5386 -0
  131. package/dist/chunk-OSYNRVOV.cjs +243 -0
  132. package/dist/chunk-PGANYCAG.cjs +220 -0
  133. package/dist/chunk-PHENW4MQ.js +65 -0
  134. package/dist/chunk-PY37LNDP.js +686 -0
  135. package/dist/chunk-Q56TT7IL.js +483 -0
  136. package/dist/chunk-QD32ADK6.js +1046 -0
  137. package/dist/chunk-QPOQ7VPI.js +1491 -0
  138. package/dist/chunk-QPSKHBJP.js +5963 -0
  139. package/dist/chunk-QXH7QDSZ.js +1989 -0
  140. package/dist/chunk-R24NNAEG.js +1399 -0
  141. package/dist/chunk-R75BSDH7.cjs +50 -0
  142. package/dist/chunk-RARB3MBR.js +207 -0
  143. package/dist/chunk-ROHLEP2W.cjs +847 -0
  144. package/dist/chunk-S3MDHNKB.cjs +490 -0
  145. package/dist/chunk-S6YWHCKV.cjs +410 -0
  146. package/dist/chunk-SIEXCILW.js +229 -0
  147. package/dist/chunk-SLU6UPJI.cjs +410 -0
  148. package/dist/chunk-SMIWS6DE.cjs +212 -0
  149. package/dist/chunk-T5J7ZKP3.cjs +4885 -0
  150. package/dist/chunk-TDCNJHWO.js +341 -0
  151. package/dist/chunk-TG7O4WBC.js +406 -0
  152. package/dist/chunk-THCK6ECW.js +2085 -0
  153. package/dist/chunk-TJHVSBP2.js +439 -0
  154. package/dist/chunk-TVHSPJ4N.cjs +606 -0
  155. package/dist/chunk-TWUXUCEW.cjs +781 -0
  156. package/dist/chunk-U44IKGG7.cjs +5390 -0
  157. package/dist/chunk-UFZZ7TSN.cjs +886 -0
  158. package/dist/chunk-UJXISJBN.js +487 -0
  159. package/dist/chunk-UOIGFQXC.cjs +9750 -0
  160. package/dist/chunk-URG2SJLK.js +2521 -0
  161. package/dist/chunk-UWJHCOH2.js +623 -0
  162. package/dist/chunk-V6MKC2FZ.js +979 -0
  163. package/dist/chunk-VJ3L7CHT.cjs +169 -0
  164. package/dist/chunk-VMLKSV26.js +1216 -0
  165. package/dist/chunk-VVKVQZI6.js +55 -0
  166. package/dist/chunk-W6RW64BB.cjs +1219 -0
  167. package/dist/chunk-WKX5AMOY.js +309 -0
  168. package/dist/chunk-WNNE3PO3.js +34 -0
  169. package/dist/chunk-WRKUDAZJ.js +3038 -0
  170. package/dist/chunk-WRLUBRKS.cjs +1943 -0
  171. package/dist/chunk-WRNEH5MO.js +3169 -0
  172. package/dist/chunk-WRWEX5ZF.js +658 -0
  173. package/dist/chunk-X3GJPRVK.cjs +3246 -0
  174. package/dist/chunk-X3UVCWNL.cjs +2257 -0
  175. package/dist/chunk-XB274MW5.cjs +814 -0
  176. package/dist/chunk-XHIV6326.cjs +793 -0
  177. package/dist/chunk-XIVIE43A.cjs +729 -0
  178. package/dist/chunk-XJAN7CZG.cjs +432 -0
  179. package/dist/chunk-XKTPFXGA.js +164 -0
  180. package/dist/chunk-XL6INWKT.js +121 -0
  181. package/dist/chunk-XSFNHP2E.js +632 -0
  182. package/dist/chunk-XT6JY5W5.js +9684 -0
  183. package/dist/chunk-XUILI4KB.cjs +430 -0
  184. package/dist/chunk-YF2I3MV3.js +46 -0
  185. package/dist/chunk-YIMN575O.js +4847 -0
  186. package/dist/chunk-YIVFJNYV.js +176 -0
  187. package/dist/chunk-YKGPCZEE.cjs +237 -0
  188. package/dist/chunk-YN2YWTXW.js +5731 -0
  189. package/dist/chunk-YN6V7R3L.cjs +327 -0
  190. package/dist/chunk-YQELFNJV.js +39 -0
  191. package/dist/chunk-YVD3CSO3.js +1183 -0
  192. package/dist/chunk-YVOAF4ML.js +623 -0
  193. package/dist/chunk-YWOBW2PV.cjs +759 -0
  194. package/dist/chunk-YYXH45E2.js +426 -0
  195. package/dist/chunk-ZDSYWBIE.cjs +69 -0
  196. package/dist/chunk-ZU7NIRT6.js +325 -0
  197. package/dist/chunk-ZZ7RO2UQ.js +1243 -0
  198. package/dist/cli/holoscript-runner.cjs +2255 -0
  199. package/dist/cli/holoscript-runner.js +2230 -0
  200. package/dist/codebase/index.cjs +336 -0
  201. package/dist/codebase/index.js +331 -0
  202. package/dist/compiler/agent-inference.cjs +31 -0
  203. package/dist/compiler/agent-inference.js +8 -0
  204. package/dist/compiler/android-xr.cjs +24 -0
  205. package/dist/compiler/android-xr.js +14 -0
  206. package/dist/compiler/android.cjs +24 -0
  207. package/dist/compiler/android.js +14 -0
  208. package/dist/compiler/ar.cjs +23 -0
  209. package/dist/compiler/ar.js +11 -0
  210. package/dist/compiler/babylon.cjs +21 -0
  211. package/dist/compiler/babylon.js +15 -0
  212. package/dist/compiler/business-quest.cjs +43 -0
  213. package/dist/compiler/business-quest.js +4 -0
  214. package/dist/compiler/coco.cjs +27 -0
  215. package/dist/compiler/coco.js +4 -0
  216. package/dist/compiler/context.cjs +25 -0
  217. package/dist/compiler/context.d.ts +28 -0
  218. package/dist/compiler/context.js +8 -0
  219. package/dist/compiler/domain-block-utils.cjs +609 -0
  220. package/dist/compiler/domain-block-utils.js +11 -0
  221. package/dist/compiler/dtdl.cjs +27 -0
  222. package/dist/compiler/dtdl.js +11 -0
  223. package/dist/compiler/gltf-pipeline.cjs +39 -0
  224. package/dist/compiler/gltf-pipeline.js +4 -0
  225. package/dist/compiler/godot.cjs +18 -0
  226. package/dist/compiler/godot.js +12 -0
  227. package/dist/compiler/incremental.cjs +34 -0
  228. package/dist/compiler/incremental.js +9 -0
  229. package/dist/compiler/index.cjs +5408 -0
  230. package/dist/compiler/index.d.ts +334 -21
  231. package/dist/compiler/index.js +5069 -0
  232. package/dist/compiler/ios.cjs +23 -0
  233. package/dist/compiler/ios.js +13 -0
  234. package/dist/compiler/llm-provider-capabilities.cjs +25 -0
  235. package/dist/compiler/llm-provider-capabilities.d.ts +43 -0
  236. package/dist/compiler/llm-provider-capabilities.js +8 -0
  237. package/dist/compiler/multi-layer.cjs +24 -0
  238. package/dist/compiler/multi-layer.js +15 -0
  239. package/dist/compiler/nodetoy.cjs +23 -0
  240. package/dist/compiler/nodetoy.d.ts +69 -0
  241. package/dist/compiler/nodetoy.js +4 -0
  242. package/dist/compiler/openxr.cjs +19 -0
  243. package/dist/compiler/openxr.js +13 -0
  244. package/dist/compiler/playcanvas.cjs +19 -0
  245. package/dist/compiler/playcanvas.js +13 -0
  246. package/dist/compiler/r3f.cjs +39 -0
  247. package/dist/compiler/r3f.d.ts +22 -0
  248. package/dist/compiler/r3f.js +17 -0
  249. package/dist/compiler/remotion.cjs +23 -0
  250. package/dist/compiler/remotion.js +4 -0
  251. package/dist/compiler/reproducibility.cjs +39 -0
  252. package/dist/compiler/reproducibility.js +4 -0
  253. package/dist/compiler/sdf.cjs +24 -0
  254. package/dist/compiler/sdf.js +12 -0
  255. package/dist/compiler/semantic-scene.cjs +31 -0
  256. package/dist/compiler/semantic-scene.js +4 -0
  257. package/dist/compiler/state.cjs +21 -0
  258. package/dist/compiler/state.js +11 -0
  259. package/dist/compiler/trait-composition.cjs +30 -0
  260. package/dist/compiler/trait-composition.js +9 -0
  261. package/dist/compiler/unity.cjs +19 -0
  262. package/dist/compiler/unity.js +13 -0
  263. package/dist/compiler/unreal.cjs +23 -0
  264. package/dist/compiler/unreal.js +13 -0
  265. package/dist/compiler/urdf.cjs +52 -0
  266. package/dist/compiler/urdf.js +12 -0
  267. package/dist/compiler/usd-physics.cjs +26 -0
  268. package/dist/compiler/usd-physics.js +9 -0
  269. package/dist/compiler/visionos.cjs +19 -0
  270. package/dist/compiler/visionos.js +13 -0
  271. package/dist/compiler/vrchat.cjs +22 -0
  272. package/dist/compiler/vrchat.js +12 -0
  273. package/dist/compiler/vrr.cjs +24 -0
  274. package/dist/compiler/vrr.js +12 -0
  275. package/dist/compiler/wasm.cjs +36 -0
  276. package/dist/compiler/wasm.js +12 -0
  277. package/dist/compiler/webgpu.cjs +18 -0
  278. package/dist/compiler/webgpu.js +12 -0
  279. package/dist/coordinators/index.cjs +1266 -0
  280. package/dist/coordinators/index.d.ts +72 -1
  281. package/dist/coordinators/index.js +1259 -0
  282. package/dist/debugger.cjs +24 -0
  283. package/dist/debugger.js +11 -0
  284. package/dist/dist-ACXG6IH5.cjs +3113 -0
  285. package/dist/dist-VD4L6V7Q.js +3076 -0
  286. package/dist/entries/interop.cjs +64 -0
  287. package/dist/entries/interop.js +7 -0
  288. package/dist/entries/scripting.cjs +55 -0
  289. package/dist/entries/scripting.js +10 -0
  290. package/dist/hololand/index.cjs +146 -0
  291. package/dist/hololand/index.d.ts +70 -0
  292. package/dist/hololand/index.js +5 -0
  293. package/dist/index.cjs +44660 -0
  294. package/dist/index.d.ts +978 -21
  295. package/dist/index.js +41422 -0
  296. package/dist/math/tropical-spmv.cjs +45 -0
  297. package/dist/math/tropical-spmv.js +4 -0
  298. package/dist/math/vec3.cjs +57 -0
  299. package/dist/math/vec3.js +4 -0
  300. package/dist/ml-dsa-FSKBTE3W.cjs +1265 -0
  301. package/dist/ml-dsa-Z7JDKW4L.js +1265 -0
  302. package/dist/paper-0c-spike/index.cjs +150 -0
  303. package/dist/paper-0c-spike/index.js +141 -0
  304. package/dist/parser.cjs +61 -0
  305. package/dist/parser.d.ts +11 -0
  306. package/dist/parser.js +12 -0
  307. package/dist/playwright-3AT3AKTV.cjs +98673 -0
  308. package/dist/playwright-VZPDVUEQ.js +98660 -0
  309. package/dist/reconstruction/index.cjs +153 -0
  310. package/dist/reconstruction/index.d.ts +29 -2
  311. package/dist/reconstruction/index.js +8 -0
  312. package/dist/runtime.cjs +316 -0
  313. package/dist/runtime.d.ts +61 -0
  314. package/dist/runtime.js +31 -0
  315. package/dist/self-improvement/index.cjs +563 -0
  316. package/dist/self-improvement/index.js +545 -0
  317. package/dist/src-4ROC227P.cjs +2094 -0
  318. package/dist/src-HCCCSYP7.js +2073 -0
  319. package/dist/storage/index.cjs +38 -0
  320. package/dist/storage/index.js +5 -0
  321. package/dist/testing.cjs +25 -0
  322. package/dist/testing.d.ts +70 -0
  323. package/dist/testing.js +4 -0
  324. package/dist/traitDocs/traitDocs.cjs +33 -0
  325. package/dist/traitDocs/traitDocs.js +7 -0
  326. package/dist/traits/botanical-lotus.cjs +177 -0
  327. package/dist/traits/botanical-lotus.d.ts +502 -0
  328. package/dist/traits/botanical-lotus.js +7 -0
  329. package/dist/traits/engines/index.cjs +520 -0
  330. package/dist/traits/engines/index.js +380 -0
  331. package/dist/traits/index.cjs +24548 -0
  332. package/dist/traits/index.d.ts +171 -35
  333. package/dist/traits/index.js +21638 -0
  334. package/dist/traits/simulation-solver-factory.cjs +13 -0
  335. package/dist/traits/simulation-solver-factory.d.ts +23 -0
  336. package/dist/traits/simulation-solver-factory.js +4 -0
  337. package/dist/traits/webcam-gaze.cjs +35 -0
  338. package/dist/traits/webcam-gaze.d.ts +17 -0
  339. package/dist/traits/webcam-gaze.js +4 -0
  340. package/dist/type-checker.cjs +19 -0
  341. package/dist/type-checker.js +6 -0
  342. package/dist/world/index.cjs +947 -0
  343. package/dist/world/index.d.ts +147 -0
  344. package/dist/world/index.js +939 -0
  345. package/dist/world-model/index.cjs +1446 -0
  346. package/dist/world-model/index.d.ts +119 -0
  347. package/dist/world-model/index.js +1414 -0
  348. package/dist/wot/index.cjs +29 -0
  349. package/dist/wot/index.js +4 -0
  350. package/package.json +93 -49
@@ -0,0 +1,1418 @@
1
+ 'use strict';
2
+
3
+ var chunkHCCQLAA4_cjs = require('./chunk-HCCQLAA4.cjs');
4
+
5
+ // src/traits/BotanicalLotusTrait.ts
6
+ function cloneDefaultConfig() {
7
+ const d = exports.DEFAULT_BOTANICAL_LOTUS_CONFIG;
8
+ return {
9
+ ...d,
10
+ source: { ...d.source },
11
+ reference_anchors: d.reference_anchors.map((a) => ({ ...a })),
12
+ material: {
13
+ ...d.material,
14
+ subsurface_radius_rgb: [...d.material.subsurface_radius_rgb]
15
+ },
16
+ colors: { ...d.colors },
17
+ geometry: {
18
+ ...d.geometry,
19
+ petal_rings: d.geometry.petal_rings.map((r) => ({ ...r }))
20
+ },
21
+ renderer: {
22
+ ...d.renderer,
23
+ requires: [...d.renderer.requires],
24
+ lod: { ...d.renderer.lod }
25
+ }
26
+ };
27
+ }
28
+ function isFiniteNumber(value) {
29
+ return typeof value === "number" && Number.isFinite(value);
30
+ }
31
+ function addRangeError(errors, label, value, min, max) {
32
+ if (!isFiniteNumber(value) || value < min || value > max) {
33
+ errors.push(`${label} must be a finite number in [${min}, ${max}]`);
34
+ }
35
+ }
36
+ function validateHexColors(errors, colors) {
37
+ for (const [key, value] of Object.entries(colors)) {
38
+ if (!HEX_COLOR_PATTERN.test(value)) {
39
+ errors.push(`colors.${key} must be a 6-digit hex color`);
40
+ }
41
+ }
42
+ }
43
+ function validateReferenceAnchor(errors, anchor, index) {
44
+ const prefix = `reference_anchors[${index}]`;
45
+ if (!anchor.id || typeof anchor.id !== "string") {
46
+ errors.push(`${prefix}.id is required`);
47
+ }
48
+ if (!anchor.uri || typeof anchor.uri !== "string") {
49
+ errors.push(`${prefix}.uri is required`);
50
+ }
51
+ if (anchor.status !== "pending_media_ingest" && anchor.status !== "hashed" && anchor.status !== "wallet_signed") {
52
+ errors.push(`${prefix}.status must be pending_media_ingest, hashed, or wallet_signed`);
53
+ }
54
+ if (anchor.status !== "pending_media_ingest") {
55
+ if (!anchor.content_hash || !SHA256_HASH_PATTERN.test(anchor.content_hash)) {
56
+ errors.push(`${prefix}.content_hash must be sha256:<64 lowercase hex chars>`);
57
+ }
58
+ }
59
+ if (anchor.status === "wallet_signed" && !anchor.wallet_signature) {
60
+ errors.push(`${prefix}.wallet_signature is required when status is wallet_signed`);
61
+ }
62
+ if (anchor.width !== void 0 && (!Number.isInteger(anchor.width) || anchor.width <= 0)) {
63
+ errors.push(`${prefix}.width must be a positive integer when present`);
64
+ }
65
+ if (anchor.height !== void 0 && (!Number.isInteger(anchor.height) || anchor.height <= 0)) {
66
+ errors.push(`${prefix}.height must be a positive integer when present`);
67
+ }
68
+ }
69
+ function normalizeBotanicalLotusConfig(input = {}) {
70
+ const d = cloneDefaultConfig();
71
+ const inputGeometry = input.geometry ?? {};
72
+ const inputRenderer = input.renderer ?? {};
73
+ const petalRings = Array.isArray(inputGeometry.petal_rings) ? inputGeometry.petal_rings.map((r) => ({ ...r })) : d.geometry.petal_rings.map((r) => ({ ...r }));
74
+ return {
75
+ schema: input.schema ?? d.schema,
76
+ status: input.status ?? d.status,
77
+ source: {
78
+ ...d.source,
79
+ ...input.source ?? {}
80
+ },
81
+ reference_anchors: Array.isArray(input.reference_anchors) ? input.reference_anchors.map((a) => ({ ...a })) : d.reference_anchors,
82
+ material: {
83
+ ...d.material,
84
+ ...input.material ?? {},
85
+ subsurface_radius_rgb: [
86
+ ...input.material?.subsurface_radius_rgb ?? d.material.subsurface_radius_rgb
87
+ ]
88
+ },
89
+ colors: {
90
+ ...d.colors,
91
+ ...input.colors ?? {}
92
+ },
93
+ geometry: {
94
+ ...d.geometry,
95
+ ...inputGeometry,
96
+ petal_rings: petalRings
97
+ },
98
+ renderer: {
99
+ ...d.renderer,
100
+ ...inputRenderer,
101
+ requires: [...inputRenderer.requires ?? d.renderer.requires],
102
+ lod: {
103
+ ...d.renderer.lod,
104
+ ...inputRenderer.lod ?? {}
105
+ }
106
+ }
107
+ };
108
+ }
109
+ function validateBotanicalLotusConfig(input = {}) {
110
+ const config = normalizeBotanicalLotusConfig(input);
111
+ const errors = [];
112
+ const { material, geometry } = config;
113
+ if (config.schema !== "holoscript.trait.botanical_lotus.v0") {
114
+ errors.push("schema must be holoscript.trait.botanical_lotus.v0");
115
+ }
116
+ if (config.status !== "visual_seed" && config.status !== "content_hashed" && config.status !== "wallet_signed") {
117
+ errors.push("status must be visual_seed, content_hashed, or wallet_signed");
118
+ }
119
+ if (config.reference_anchors.length === 0) {
120
+ errors.push("reference_anchors must include at least one anchor");
121
+ }
122
+ config.reference_anchors.forEach(
123
+ (anchor, index) => validateReferenceAnchor(errors, anchor, index)
124
+ );
125
+ addRangeError(errors, "material.subsurface_scattering", material.subsurface_scattering, 0, 1);
126
+ if (material.subsurface_radius_rgb.length !== 3) {
127
+ errors.push("material.subsurface_radius_rgb must contain exactly three values");
128
+ }
129
+ material.subsurface_radius_rgb.forEach(
130
+ (value, index) => addRangeError(errors, `material.subsurface_radius_rgb[${index}]`, value, 0, 2)
131
+ );
132
+ addRangeError(
133
+ errors,
134
+ "material.petal_translucency_base",
135
+ material.petal_translucency_base,
136
+ 0,
137
+ 1
138
+ );
139
+ addRangeError(
140
+ errors,
141
+ "material.petal_translucency_edge",
142
+ material.petal_translucency_edge,
143
+ 0,
144
+ 1
145
+ );
146
+ addRangeError(errors, "material.roughness", material.roughness, 0, 1);
147
+ addRangeError(errors, "material.ior", material.ior, 1, 2.5);
148
+ addRangeError(
149
+ errors,
150
+ "material.vein_normal_intensity",
151
+ material.vein_normal_intensity,
152
+ 0,
153
+ 0.25
154
+ );
155
+ addRangeError(errors, "material.edge_curl_intensity", material.edge_curl_intensity, 0, 1);
156
+ addRangeError(errors, "material.gravity_sag_outer", material.gravity_sag_outer, 0, 1);
157
+ addRangeError(errors, "material.sheen", material.sheen, 0, 1);
158
+ addRangeError(errors, "material.sheen_roughness", material.sheen_roughness, 0, 1);
159
+ if (!HEX_COLOR_PATTERN.test(material.sheen_color)) {
160
+ errors.push("material.sheen_color must be a 6-digit hex color");
161
+ }
162
+ validateHexColors(errors, config.colors);
163
+ if (geometry.petal_rings.length === 0) {
164
+ errors.push("geometry.petal_rings must include at least one ring");
165
+ }
166
+ geometry.petal_rings.forEach((ring, index) => {
167
+ if (!ring.name) {
168
+ errors.push(`geometry.petal_rings[${index}].name is required`);
169
+ }
170
+ if (!Number.isInteger(ring.count) || ring.count <= 0) {
171
+ errors.push(`geometry.petal_rings[${index}].count must be a positive integer`);
172
+ }
173
+ addRangeError(errors, `geometry.petal_rings[${index}].cup`, ring.cup, 0, 1);
174
+ addRangeError(
175
+ errors,
176
+ `geometry.petal_rings[${index}].gravity_sag`,
177
+ ring.gravity_sag,
178
+ 0,
179
+ 1
180
+ );
181
+ });
182
+ if (!Number.isInteger(geometry.stamen_filament_count) || geometry.stamen_filament_count <= 0) {
183
+ errors.push("geometry.stamen_filament_count must be a positive integer");
184
+ }
185
+ if (config.renderer.requires.length === 0) {
186
+ errors.push("renderer.requires must include at least one render capability");
187
+ }
188
+ return {
189
+ ok: errors.length === 0,
190
+ errors,
191
+ config
192
+ };
193
+ }
194
+ function assertBotanicalLotusConfig(input = {}) {
195
+ const result = validateBotanicalLotusConfig(input);
196
+ if (!result.ok) {
197
+ throw new Error(`Invalid botanical_lotus config: ${result.errors.join("; ")}`);
198
+ }
199
+ return result.config;
200
+ }
201
+ function deriveBotanicalLotusAnchorStatus(anchors) {
202
+ if (anchors.length > 0 && anchors.every((anchor) => anchor.status === "wallet_signed")) {
203
+ return "wallet_signed";
204
+ }
205
+ if (anchors.length > 0 && anchors.every((anchor) => anchor.status === "hashed" || anchor.status === "wallet_signed")) {
206
+ return "hashed";
207
+ }
208
+ return "pending_media_ingest";
209
+ }
210
+ function getBotanicalLotusPetalCount(input = {}) {
211
+ const config = normalizeBotanicalLotusConfig(input);
212
+ return config.geometry.petal_rings.reduce((sum, ring) => sum + ring.count, 0);
213
+ }
214
+ function createBotanicalLotusRenderProfile(input = {}, placement, lighting) {
215
+ const config = assertBotanicalLotusConfig(input);
216
+ const anchorStatus = deriveBotanicalLotusAnchorStatus(config.reference_anchors);
217
+ const petalRings = config.geometry.petal_rings.map((ring, index) => {
218
+ const base = RING_RENDER_DEFAULTS[ring.name] ?? {
219
+ radius: 0.42 + index * 0.24,
220
+ length: 0.82 + index * 0.2,
221
+ width: 0.34 + index * 0.08,
222
+ pitch_degrees: Math.max(12, 70 - index * 18)
223
+ };
224
+ return {
225
+ name: ring.name,
226
+ count: ring.count,
227
+ radius: base.radius,
228
+ length: base.length,
229
+ width: base.width,
230
+ cup: ring.cup,
231
+ gravity_sag: ring.gravity_sag,
232
+ pitch_degrees: base.pitch_degrees
233
+ };
234
+ });
235
+ return {
236
+ trait: "botanical_lotus",
237
+ anchor_status: anchorStatus,
238
+ wallet_signed: anchorStatus === "wallet_signed",
239
+ petal_count: petalRings.reduce((sum, ring) => sum + ring.count, 0),
240
+ petal_rings: petalRings,
241
+ pbr_uniforms: {
242
+ subsurface_scattering: config.material.subsurface_scattering,
243
+ subsurface_radius_rgb: config.material.subsurface_radius_rgb,
244
+ transmission: config.material.petal_translucency_base,
245
+ thickness: config.material.petal_translucency_edge,
246
+ roughness: config.material.roughness,
247
+ ior: config.material.ior,
248
+ vein_normal_intensity: config.material.vein_normal_intensity,
249
+ sheen: config.material.sheen,
250
+ sheen_roughness: config.material.sheen_roughness,
251
+ sheen_color: config.material.sheen_color
252
+ },
253
+ colors: config.colors,
254
+ stamen_filament_count: config.geometry.stamen_filament_count,
255
+ seed_pod_dot_pattern: config.geometry.seed_pod_dot_pattern,
256
+ reference_anchor_ids: config.reference_anchors.map((anchor) => anchor.id),
257
+ renderer_requires: config.renderer.requires,
258
+ surface_anchor_id: placement?.surface_anchor_id,
259
+ lighting_reference: lighting?.reference_id
260
+ };
261
+ }
262
+ function deriveLotusBloomFromGlow(intensity, pulse) {
263
+ if (intensity >= 1 && pulse) return "full";
264
+ if (intensity >= 0.7) return "blooming";
265
+ if (intensity >= 0.3) return "budding";
266
+ return "sealed";
267
+ }
268
+ function lotusPetalRenderColor(ring, isRoot, colors) {
269
+ if (isRoot) return colors.petal_base;
270
+ if (ring === 1) return colors.petal_inner;
271
+ if (ring === 2) return colors.petal_mid;
272
+ return exports.LOTUS_OUTER_PETAL_COLOR;
273
+ }
274
+ function lotusObjectTraitConfig(obj, name) {
275
+ return obj.traits?.find((t) => t.name === name)?.config;
276
+ }
277
+ function buildLotusSceneFromComposition(objects, profile = createBotanicalLotusRenderProfile(), options = {}) {
278
+ const ringProfile = /* @__PURE__ */ new Map();
279
+ profile.petal_rings.forEach((r, i) => ringProfile.set(i + 1, r));
280
+ const lastRing = profile.petal_rings[profile.petal_rings.length - 1];
281
+ const goldenAngle = exports.LOTUS_GOLDEN_ANGLE_DEG * Math.PI / 180;
282
+ const petalObjs = objects.filter((o) => LOTUS_PETAL_NAME_RE.test(String(o.name ?? "")));
283
+ const ringCounters = { 1: 0, 2: 0, 3: 0 };
284
+ const seedNum = Number(options.seed ?? exports.LOTUS_GENESIS_SEED_PLACEHOLDER) >>> 0;
285
+ const PHYLLOTAXIS_WARMUP = 60;
286
+ const phyllotaxis = simulateLotusPhyllotaxis({
287
+ count: petalObjs.length + PHYLLOTAXIS_WARMUP,
288
+ seed: seedNum
289
+ });
290
+ const grownAngles = phyllotaxis.primordia.slice(PHYLLOTAXIS_WARMUP).map((p) => p.theta);
291
+ const petals = petalObjs.map((obj, index) => {
292
+ const match = LOTUS_PETAL_NAME_RE.exec(String(obj.name));
293
+ const ring = Number(match?.[1] ?? 3);
294
+ const ringIndex = ringCounters[ring]++;
295
+ const glow = lotusObjectTraitConfig(obj, "glowing") ?? {};
296
+ const intensity = typeof glow.intensity === "number" ? glow.intensity : 0.1;
297
+ const pulse = glow.pulse === true;
298
+ const isRoot = index === 0;
299
+ const bloom = isRoot ? "full" : deriveLotusBloomFromGlow(intensity, pulse);
300
+ const base = ringProfile.get(ring) ?? lastRing;
301
+ const scale = exports.LOTUS_RING_SCALING[ring];
302
+ return {
303
+ index,
304
+ ring,
305
+ ringIndex,
306
+ angle: grownAngles[index] ?? index * goldenAngle,
307
+ radius: base.radius * scale.radius,
308
+ length: base.length * scale.length,
309
+ width: base.width * scale.width,
310
+ cup: base.cup,
311
+ gravitySag: base.gravity_sag,
312
+ height: scale.height,
313
+ color: lotusPetalRenderColor(ring, isRoot, profile.colors),
314
+ bloom,
315
+ label: `P${ring}.${ringIndex}`,
316
+ title: String(obj.name ?? `Petal P${ring}.${ringIndex}`)
317
+ };
318
+ });
319
+ const rings = [1, 2, 3].map((ring) => {
320
+ const base = ringProfile.get(ring) ?? lastRing;
321
+ const scale = exports.LOTUS_RING_SCALING[ring];
322
+ return {
323
+ ring,
324
+ count: base.count,
325
+ radius: base.radius * scale.radius,
326
+ length: base.length * scale.length,
327
+ width: base.width * scale.width,
328
+ cup: base.cup,
329
+ gravity_sag: base.gravity_sag,
330
+ height: scale.height
331
+ };
332
+ });
333
+ return {
334
+ seed: options.seed ?? exports.LOTUS_GENESIS_SEED_PLACEHOLDER,
335
+ golden_angle_deg: exports.LOTUS_GOLDEN_ANGLE_DEG,
336
+ growth_seconds: exports.LOTUS_GROWTH_SECONDS,
337
+ rings,
338
+ petals,
339
+ material: profile.pbr_uniforms,
340
+ colors: profile.colors,
341
+ stamen_filament_count: profile.stamen_filament_count,
342
+ seed_pod_dot_pattern: profile.seed_pod_dot_pattern
343
+ };
344
+ }
345
+ function hexToRgb01(hex) {
346
+ const h = hex.replace("#", "");
347
+ const r = parseInt(h.slice(0, 2), 16) / 255;
348
+ const g = parseInt(h.slice(2, 4), 16) / 255;
349
+ const b = parseInt(h.slice(4, 6), 16) / 255;
350
+ return [r, g, b];
351
+ }
352
+ function buildLotusPetalMaterialSpec(profile, options = {}) {
353
+ const pbr = profile.pbr_uniforms;
354
+ const colors = profile.colors;
355
+ const dyn = { ...LOTUS_PETAL_DEFAULT_DYNAMIC, ...options.dynamic };
356
+ const size = options.detailMapSize ?? 256;
357
+ const veinSeed = options.veinSeed ?? 57005;
358
+ const roughnessSeed = options.roughnessSeed ?? 45063;
359
+ const physical = {
360
+ color: colors.petal_base,
361
+ roughness: pbr.roughness,
362
+ metalness: 0,
363
+ transparent: true,
364
+ transmission: pbr.transmission,
365
+ thickness: pbr.thickness,
366
+ ior: pbr.ior,
367
+ sheen: pbr.sheen,
368
+ sheenColor: pbr.sheen_color,
369
+ sheenRoughness: pbr.sheen_roughness
370
+ };
371
+ const uniforms = {
372
+ // Static color uniforms (from the declared palette) — vec3 in 0..1.
373
+ uLotusBaseColor: { value: hexToRgb01(colors.petal_base) },
374
+ uLotusMidColor: { value: hexToRgb01(colors.petal_mid) },
375
+ uLotusRimColor: { value: hexToRgb01(colors.petal_rim) },
376
+ uLotusShadowColor: { value: hexToRgb01(colors.petal_shadow) },
377
+ // Subsurface scatter tint comes from the declared radius RGB (already 0..1).
378
+ uLotusSubsurfaceColor: { value: [...pbr.subsurface_radius_rgb] },
379
+ // Static scalar uniforms from the PBR profile.
380
+ uLotusSSS: { value: pbr.subsurface_scattering },
381
+ uLotusTransmissionBase: { value: pbr.transmission },
382
+ uLotusTransmissionEdge: { value: pbr.thickness },
383
+ uLotusVeinIntensity: { value: pbr.vein_normal_intensity },
384
+ // Dynamic uniforms (driven per-frame via LOTUS_PETAL_UNIFORM_BINDINGS).
385
+ uPetalDevTime: { value: dyn.devTime },
386
+ uPetalCurlScale: { value: dyn.curlScale },
387
+ uLotusGrowth: { value: dyn.growth },
388
+ uLotusBloom: { value: dyn.bloom },
389
+ uLotusTime: { value: dyn.time }
390
+ };
391
+ return {
392
+ physical,
393
+ shaderChunks: {
394
+ chunks: [...exports.LOTUS_PETAL_CHUNK_ENTRIES],
395
+ uniforms
396
+ },
397
+ proceduralMaps: {
398
+ normalMap: {
399
+ generator: "botanical_normal",
400
+ params: {
401
+ pattern: "petal_veins",
402
+ size,
403
+ seed: veinSeed,
404
+ strength: Math.max(0.5, pbr.vein_normal_intensity * 32)
405
+ }
406
+ },
407
+ roughnessMap: {
408
+ generator: "botanical_roughness",
409
+ params: { size, seed: roughnessSeed, base: pbr.roughness, variance: 0.3 }
410
+ }
411
+ }
412
+ };
413
+ }
414
+ function botMix(a, b, t) {
415
+ return a + (b - a) * t;
416
+ }
417
+ function botHash(ix, iy, seed) {
418
+ let h = Math.imul(ix, 374761393) + Math.imul(iy, 668265263) + Math.imul(seed, 1013904223) >>> 0;
419
+ h = Math.imul(h ^ h >>> 13, 1274126177) >>> 0;
420
+ return ((h ^ h >>> 16) >>> 0) / 4294967296;
421
+ }
422
+ function botValueNoise(x, y, seed) {
423
+ const ix = Math.floor(x);
424
+ const iy = Math.floor(y);
425
+ const fx = x - ix;
426
+ const fy = y - iy;
427
+ const ux = fx * fx * (3 - 2 * fx);
428
+ const uy = fy * fy * (3 - 2 * fy);
429
+ const a = botHash(ix, iy, seed);
430
+ const b = botHash(ix + 1, iy, seed);
431
+ const c = botHash(ix, iy + 1, seed);
432
+ const d = botHash(ix + 1, iy + 1, seed);
433
+ return botMix(botMix(a, b, ux), botMix(c, d, ux), uy);
434
+ }
435
+ function botFbm(x, y, seed, octaves = 4) {
436
+ let amp = 0.5;
437
+ let freq = 1;
438
+ let sum = 0;
439
+ let norm = 0;
440
+ for (let i = 0; i < octaves; i += 1) {
441
+ sum += amp * botValueNoise(x * freq, y * freq, seed + i * 101);
442
+ norm += amp;
443
+ amp *= 0.5;
444
+ freq *= 2;
445
+ }
446
+ return sum / norm;
447
+ }
448
+ function botanicalSurfaceHeight(pattern, u, v, seed) {
449
+ const micro = botFbm(u * 26, v * 26, seed, 4);
450
+ if (pattern === "petal_veins") {
451
+ const sx = u * 2 - 1;
452
+ const major = Math.pow(1 - Math.abs(Math.sin((sx * 9 + v * 3.2) * Math.PI)), 8);
453
+ const secondary = Math.pow(1 - Math.abs(Math.sin((sx * 19 - v * 2) * Math.PI)), 16) * 0.5;
454
+ const ridge = Math.max(0, 1 - Math.abs(sx) * 3) * (0.4 + v * 0.3);
455
+ return micro * 0.28 + major * 0.46 + secondary * 0.2 + ridge * 0.4;
456
+ }
457
+ if (pattern === "leaf_radial") {
458
+ const cx = u * 2 - 1;
459
+ const cy = v * 2 - 1;
460
+ const ang = Math.atan2(cy, cx);
461
+ const rad = Math.min(1, Math.sqrt(cx * cx + cy * cy));
462
+ const veins = Math.pow(Math.abs(Math.sin(ang * 13)), 6) * (1 - rad);
463
+ const rings = Math.pow(Math.abs(Math.sin(rad * 22)), 4) * 0.3;
464
+ return micro * 0.34 + veins * 0.56 + rings;
465
+ }
466
+ if (pattern === "stalk_fiber") {
467
+ const fibers = Math.pow(Math.abs(Math.sin(u * Math.PI * 40)), 3) * 0.5 + Math.abs(Math.sin(u * Math.PI * 83)) * 0.18;
468
+ const grain = botFbm(u * 12, v * 64, seed, 3);
469
+ return micro * 0.2 + fibers * 0.5 + grain * 0.3;
470
+ }
471
+ return micro;
472
+ }
473
+ function generateBotanicalNormalMap(opts) {
474
+ const size = opts.size ?? 256;
475
+ const seed = (opts.seed ?? 57005) >>> 0;
476
+ const strength = opts.strength ?? 1.6;
477
+ const data = new Uint8Array(size * size * 4);
478
+ const inv = 1 / size;
479
+ for (let y = 0; y < size; y += 1) {
480
+ for (let x = 0; x < size; x += 1) {
481
+ const u = x * inv;
482
+ const v = y * inv;
483
+ const hL = botanicalSurfaceHeight(opts.pattern, (x - 1 + size) % size * inv, v, seed);
484
+ const hR = botanicalSurfaceHeight(opts.pattern, (x + 1) % size * inv, v, seed);
485
+ const hD = botanicalSurfaceHeight(opts.pattern, u, (y - 1 + size) % size * inv, seed);
486
+ const hU = botanicalSurfaceHeight(opts.pattern, u, (y + 1) % size * inv, seed);
487
+ let nx = (hL - hR) * strength;
488
+ let ny = (hD - hU) * strength;
489
+ const nz = 1;
490
+ const len = Math.hypot(nx, ny, nz) || 1;
491
+ nx /= len;
492
+ ny /= len;
493
+ const i = (y * size + x) * 4;
494
+ data[i] = Math.round((nx * 0.5 + 0.5) * 255);
495
+ data[i + 1] = Math.round((ny * 0.5 + 0.5) * 255);
496
+ data[i + 2] = Math.round((nz / len * 0.5 + 0.5) * 255);
497
+ data[i + 3] = 255;
498
+ }
499
+ }
500
+ return { width: size, height: size, data };
501
+ }
502
+ function generateBotanicalRoughnessMap(opts) {
503
+ const size = opts.size ?? 256;
504
+ const seed = (opts.seed ?? 45063) >>> 0;
505
+ const base = opts.base ?? 0.6;
506
+ const variance = opts.variance ?? 0.3;
507
+ const scale = opts.scale ?? 10;
508
+ const data = new Uint8Array(size * size * 4);
509
+ const inv = 1 / size;
510
+ for (let y = 0; y < size; y += 1) {
511
+ for (let x = 0; x < size; x += 1) {
512
+ const r = Math.min(
513
+ 1,
514
+ Math.max(0, base + (botFbm(x * inv * scale, y * inv * scale, seed, 4) - 0.5) * 2 * variance)
515
+ );
516
+ const g = Math.round(r * 255);
517
+ const i = (y * size + x) * 4;
518
+ data[i] = g;
519
+ data[i + 1] = g;
520
+ data[i + 2] = g;
521
+ data[i + 3] = 255;
522
+ }
523
+ }
524
+ return { width: size, height: size, data };
525
+ }
526
+ function lotusMulberry32(seed) {
527
+ let a = seed >>> 0;
528
+ return () => {
529
+ a = a + 1831565813 >>> 0;
530
+ let t = Math.imul(a ^ a >>> 15, 1 | a);
531
+ t = t + Math.imul(t ^ t >>> 7, 61 | t) ^ t;
532
+ return ((t ^ t >>> 14) >>> 0) / 4294967296;
533
+ };
534
+ }
535
+ function simulateLotusMorphogenesis(params) {
536
+ const count = Math.max(1, Math.floor(params.count));
537
+ const seed = (params.seed ?? 57005) >>> 0;
538
+ const apexRadius = params.apexRadius ?? 1;
539
+ const radialVelocity = params.radialVelocity ?? 0.08;
540
+ const s = params.inhibitionExponent ?? 3;
541
+ const samples = params.angularSamples ?? 1440;
542
+ const rand = lotusMulberry32(seed);
543
+ const primordia = [];
544
+ const TWO_PI = Math.PI * 2;
545
+ for (let n = 0; n < count; n += 1) {
546
+ for (const p of primordia) p.r += radialVelocity;
547
+ let chosenTheta;
548
+ if (primordia.length === 0) {
549
+ chosenTheta = rand() * TWO_PI;
550
+ } else {
551
+ let bestInhibition = Infinity;
552
+ let bestTheta = 0;
553
+ for (let i = 0; i < samples; i += 1) {
554
+ const theta = i / samples * TWO_PI;
555
+ const x = apexRadius * Math.cos(theta);
556
+ const y = apexRadius * Math.sin(theta);
557
+ let inhibition = 0;
558
+ for (const p of primordia) {
559
+ const px = p.r * Math.cos(p.theta);
560
+ const py = p.r * Math.sin(p.theta);
561
+ const d = Math.hypot(x - px, y - py);
562
+ inhibition += 1 / Math.pow(Math.max(d, 1e-4), s);
563
+ }
564
+ if (inhibition < bestInhibition) {
565
+ bestInhibition = inhibition;
566
+ bestTheta = theta;
567
+ }
568
+ }
569
+ chosenTheta = bestTheta;
570
+ }
571
+ primordia.push({ index: n, r: apexRadius, theta: chosenTheta });
572
+ }
573
+ const transient = Math.min(5, Math.max(0, primordia.length - 2));
574
+ let sumCos = 0;
575
+ let sumSin = 0;
576
+ let nDelta = 0;
577
+ for (let i = transient + 1; i < primordia.length; i += 1) {
578
+ let delta = primordia[i].theta - primordia[i - 1].theta;
579
+ delta = (delta % TWO_PI + TWO_PI) % TWO_PI;
580
+ if (delta > Math.PI) delta = TWO_PI - delta;
581
+ sumCos += Math.cos(delta);
582
+ sumSin += Math.sin(delta);
583
+ nDelta += 1;
584
+ }
585
+ const meanDelta = nDelta > 0 ? Math.atan2(sumSin / nDelta, sumCos / nDelta) : 0;
586
+ const meanDeg = (meanDelta * 180 / Math.PI + 360) % 360;
587
+ const resultant = nDelta > 0 ? Math.hypot(sumCos / nDelta, sumSin / nDelta) : 1;
588
+ const spreadDeg = Math.sqrt(Math.max(0, -2 * Math.log(Math.min(1, resultant)))) * 180 / Math.PI;
589
+ return {
590
+ primordia,
591
+ emergentDivergenceDeg: meanDeg,
592
+ divergenceSpreadDeg: spreadDeg,
593
+ resolvedParams: { count, seed, apexRadius, radialVelocity, inhibitionExponent: s, angularSamples: samples }
594
+ };
595
+ }
596
+ function lotusInhibitionAt(theta, primordia, range, apexRadius) {
597
+ const x = apexRadius * Math.cos(theta);
598
+ const y = apexRadius * Math.sin(theta);
599
+ let sum = 0;
600
+ for (const p of primordia) {
601
+ const d = Math.hypot(x - p.r * Math.cos(p.theta), y - p.r * Math.sin(p.theta));
602
+ sum += Math.exp(-d / range);
603
+ }
604
+ return sum;
605
+ }
606
+ function createLotusMeristem(params) {
607
+ const seed = (params.seed ?? 57005) >>> 0;
608
+ const apexRadius = params.apexRadius ?? 1;
609
+ const v = params.radialVelocity ?? 0.025;
610
+ const range = params.inhibitorRange ?? 0.5;
611
+ const threshold = params.threshold ?? 1;
612
+ const [wMinDeg, wMaxDeg] = params.chiralWindowDeg ?? [80, 230];
613
+ const samples = params.angularSamples ?? 720;
614
+ const DEG = Math.PI / 180;
615
+ const wMin = wMinDeg * DEG;
616
+ const wMax = wMaxDeg * DEG;
617
+ const rand = lotusMulberry32(seed);
618
+ const last = rand() * Math.PI * 2;
619
+ return {
620
+ primordia: [{ index: 0, r: apexRadius, theta: last }],
621
+ last,
622
+ apexRadius,
623
+ v,
624
+ range,
625
+ threshold,
626
+ wMin,
627
+ wMax,
628
+ samples,
629
+ step: (wMax - wMin) / samples
630
+ };
631
+ }
632
+ function stepLotusMeristem(m) {
633
+ const TWO_PI = Math.PI * 2;
634
+ for (const p of m.primordia) p.r += m.v;
635
+ let bestK = 0;
636
+ let bestI = Infinity;
637
+ for (let k = 0; k <= m.samples; k += 1) {
638
+ const I = lotusInhibitionAt(m.last + m.wMin + m.step * k, m.primordia, m.range, m.apexRadius);
639
+ if (I < bestI) {
640
+ bestI = I;
641
+ bestK = k;
642
+ }
643
+ }
644
+ let off = bestK;
645
+ if (bestK > 0 && bestK < m.samples) {
646
+ const y0 = lotusInhibitionAt(m.last + m.wMin + m.step * (bestK - 1), m.primordia, m.range, m.apexRadius);
647
+ const y2 = lotusInhibitionAt(m.last + m.wMin + m.step * (bestK + 1), m.primordia, m.range, m.apexRadius);
648
+ const den = y0 - 2 * bestI + y2;
649
+ if (Math.abs(den) > 1e-12) off = bestK + 0.5 * (y0 - y2) / den;
650
+ }
651
+ if (bestI < m.threshold) {
652
+ const theta = m.last + m.wMin + m.step * off;
653
+ m.last = (theta % TWO_PI + TWO_PI) % TWO_PI;
654
+ m.primordia.push({ index: m.primordia.length, r: m.apexRadius, theta: m.last });
655
+ return true;
656
+ }
657
+ return false;
658
+ }
659
+ function simulateLotusPhyllotaxis(params) {
660
+ const count = Math.max(1, Math.floor(params.count));
661
+ const TWO_PI = Math.PI * 2;
662
+ const meristem = createLotusMeristem(params);
663
+ let guard = 0;
664
+ const guardMax = count * 2e5;
665
+ while (meristem.primordia.length < count && guard++ < guardMax) stepLotusMeristem(meristem);
666
+ const primordia = meristem.primordia;
667
+ const tailStart = Math.max(1, primordia.length - 30);
668
+ let sumCos = 0;
669
+ let sumSin = 0;
670
+ let nDelta = 0;
671
+ for (let i = tailStart; i < primordia.length; i += 1) {
672
+ let delta = primordia[i].theta - primordia[i - 1].theta;
673
+ delta = (delta % TWO_PI + TWO_PI) % TWO_PI;
674
+ if (delta > Math.PI) delta = TWO_PI - delta;
675
+ sumCos += Math.cos(delta);
676
+ sumSin += Math.sin(delta);
677
+ nDelta += 1;
678
+ }
679
+ const meanDelta = nDelta > 0 ? Math.atan2(sumSin / nDelta, sumCos / nDelta) : 0;
680
+ const emergentDivergenceDeg = (meanDelta * 180 / Math.PI + 360) % 360;
681
+ const resultant = nDelta > 0 ? Math.hypot(sumCos / nDelta, sumSin / nDelta) : 1;
682
+ const divergenceSpreadDeg = Math.sqrt(Math.max(0, -2 * Math.log(Math.min(1, resultant)))) * 180 / Math.PI;
683
+ return { primordia, emergentDivergenceDeg, divergenceSpreadDeg };
684
+ }
685
+ function lotusSmoothstep01(edge0, edge1, x) {
686
+ const t = Math.max(0, Math.min(1, (x - edge0) / (edge1 - edge0)));
687
+ return t * t * (3 - 2 * t);
688
+ }
689
+ function simulateLotusPetalGrowth(params) {
690
+ const t = Math.max(0, Math.min(1, params.developmentalTime));
691
+ const budCurl = params.budCurl ?? 2.8;
692
+ const openCurl = params.openCurl ?? -0.25;
693
+ const matureStart = params.matureStart ?? 0.15;
694
+ const matureSpan = params.matureSpan ?? 0.5;
695
+ const acropetalDelay = params.acropetalDelay ?? 0.35;
696
+ const baseAngle = (params.baseAngleDeg ?? 90) * Math.PI / 180;
697
+ const N = Math.max(4, Math.floor(params.segments ?? 24));
698
+ let phi = baseAngle;
699
+ let x = 0;
700
+ let y = 0;
701
+ const centerline = [[0, 0]];
702
+ const curvature = [];
703
+ const ds = 1 / N;
704
+ for (let i = 0; i < N; i += 1) {
705
+ const s = (i + 0.5) / N;
706
+ const maturity = lotusSmoothstep01(0, 1, (t - matureStart - s * acropetalDelay) / matureSpan);
707
+ const kappa = budCurl * (1 - maturity) + openCurl * maturity;
708
+ curvature.push(kappa);
709
+ phi += kappa * ds;
710
+ x += Math.cos(phi) * ds;
711
+ y += Math.sin(phi) * ds;
712
+ centerline.push([x, y]);
713
+ }
714
+ const baseMaturity = lotusSmoothstep01(0, 1, (t - matureStart) / matureSpan);
715
+ const tipMaturity = lotusSmoothstep01(0, 1, (t - matureStart - acropetalDelay) / matureSpan);
716
+ return {
717
+ tipAngleDeg: phi * 180 / Math.PI,
718
+ centerline,
719
+ curvature,
720
+ baseMaturity,
721
+ tipMaturity
722
+ };
723
+ }
724
+ function createLotusPond(params = {}) {
725
+ const size = Math.max(8, Math.floor(params.size ?? 96));
726
+ const extent = params.extent ?? 4;
727
+ const c = params.waveSpeed ?? 2.2;
728
+ const damping = params.damping ?? 0.6;
729
+ const stalkRadius = params.stalkRadius ?? 0.09;
730
+ const capillaryLength = params.capillaryLength ?? 0.22;
731
+ const contactRise = params.contactRise ?? 0.05;
732
+ const dx = 2 * extent / size;
733
+ const n = size * size;
734
+ const h = new Float32Array(n);
735
+ const v = new Float32Array(n);
736
+ const meniscus = new Float32Array(n);
737
+ const mask = new Float32Array(n);
738
+ for (let j = 0; j < size; j += 1) {
739
+ for (let i = 0; i < size; i += 1) {
740
+ const wx = -extent + (i + 0.5) * dx;
741
+ const wz = -extent + (j + 0.5) * dx;
742
+ const r = Math.hypot(wx, wz);
743
+ const idx = j * size + i;
744
+ if (r <= stalkRadius) {
745
+ mask[idx] = 0;
746
+ meniscus[idx] = contactRise;
747
+ } else {
748
+ mask[idx] = 1;
749
+ meniscus[idx] = contactRise * Math.exp(-(r - stalkRadius) / capillaryLength);
750
+ }
751
+ }
752
+ }
753
+ return { size, extent, c, damping, dx, h, v, meniscus, mask };
754
+ }
755
+ function disturbLotusPond(state, worldX, worldZ, amplitude, radius = 0.15) {
756
+ const { size, extent, dx } = state;
757
+ const ci = (worldX + extent) / dx - 0.5;
758
+ const cj = (worldZ + extent) / dx - 0.5;
759
+ const rad = Math.max(1, radius / dx);
760
+ const i0 = Math.max(0, Math.floor(ci - rad * 3));
761
+ const i1 = Math.min(size - 1, Math.ceil(ci + rad * 3));
762
+ const j0 = Math.max(0, Math.floor(cj - rad * 3));
763
+ const j1 = Math.min(size - 1, Math.ceil(cj + rad * 3));
764
+ for (let j = j0; j <= j1; j += 1) {
765
+ for (let i = i0; i <= i1; i += 1) {
766
+ const d2 = (i - ci) * (i - ci) + (j - cj) * (j - cj);
767
+ const idx = j * size + i;
768
+ state.v[idx] += amplitude * Math.exp(-d2 / (2 * rad * rad)) * state.mask[idx];
769
+ }
770
+ }
771
+ }
772
+ function stepLotusPond(state, dt) {
773
+ const { size, c, damping, dx, h, v, mask } = state;
774
+ const cflDt = 0.6 * dx / Math.max(c, 1e-6);
775
+ const sub = Math.max(1, Math.min(8, Math.ceil(dt / cflDt)));
776
+ const subDt = dt / sub;
777
+ const c2 = c * c;
778
+ for (let step = 0; step < sub; step += 1) {
779
+ for (let j = 1; j < size - 1; j += 1) {
780
+ for (let i = 1; i < size - 1; i += 1) {
781
+ const idx = j * size + i;
782
+ if (mask[idx] === 0) {
783
+ v[idx] = 0;
784
+ h[idx] = 0;
785
+ continue;
786
+ }
787
+ const lap = (h[idx - 1] + h[idx + 1] + h[idx - size] + h[idx + size] - 4 * h[idx]) / (dx * dx);
788
+ v[idx] += (c2 * lap - damping * v[idx]) * subDt;
789
+ }
790
+ }
791
+ for (let k = 0; k < h.length; k += 1) h[k] += v[k] * subDt;
792
+ }
793
+ }
794
+ function lotusPondSurface(state, out) {
795
+ const n = state.h.length;
796
+ const surface = out && out.length === n ? out : new Float32Array(n);
797
+ for (let k = 0; k < n; k += 1) surface[k] = state.h[k] * state.mask[k] + state.meniscus[k];
798
+ return surface;
799
+ }
800
+ function createLotusMorphogen(params = {}) {
801
+ const size = Math.max(8, Math.floor(params.size ?? 96));
802
+ const d = params.diffusionRatio ?? 40;
803
+ const gamma = params.gamma ?? 800;
804
+ const a = params.a ?? 0.1;
805
+ const b = params.b ?? 0.9;
806
+ const seed = (params.seed ?? 57005) >>> 0;
807
+ const dx = 1 / size;
808
+ const dt = 0.4 * (dx * dx) / Math.max(1, d);
809
+ const us = a + b;
810
+ const vs = b / (us * us);
811
+ const rand = lotusMulberry32(seed);
812
+ const u = new Float32Array(size);
813
+ const v = new Float32Array(size);
814
+ for (let i = 0; i < size; i += 1) {
815
+ u[i] = us + 0.05 * (rand() - 0.5);
816
+ v[i] = vs + 0.05 * (rand() - 0.5);
817
+ }
818
+ return { size, d, gamma, a, b, dt, u, v };
819
+ }
820
+ function stepLotusMorphogen(field, iterations = 1) {
821
+ const { size, d, gamma, a, b, dt, u, v } = field;
822
+ const dx2 = 1 / size * (1 / size);
823
+ const lu = new Float32Array(size);
824
+ const lv = new Float32Array(size);
825
+ for (let it = 0; it < iterations; it += 1) {
826
+ for (let i = 0; i < size; i += 1) {
827
+ const ip = (i + 1) % size;
828
+ const im = (i - 1 + size) % size;
829
+ lu[i] = (u[im] - 2 * u[i] + u[ip]) / dx2;
830
+ lv[i] = (v[im] - 2 * v[i] + v[ip]) / dx2;
831
+ }
832
+ for (let i = 0; i < size; i += 1) {
833
+ const uv = u[i] * u[i] * v[i];
834
+ u[i] += dt * (lu[i] + gamma * (a - u[i] + uv));
835
+ v[i] += dt * (d * lv[i] + gamma * (b - uv));
836
+ }
837
+ }
838
+ }
839
+ function lotusMorphogenPeaks(field) {
840
+ const { size, u } = field;
841
+ let mn = Infinity;
842
+ let mx = -Infinity;
843
+ for (let i = 0; i < size; i += 1) {
844
+ if (u[i] < mn) mn = u[i];
845
+ if (u[i] > mx) mx = u[i];
846
+ }
847
+ const thr = (mn + mx) / 2;
848
+ let peaks = 0;
849
+ for (let i = 0; i < size; i += 1) {
850
+ const ip = (i + 1) % size;
851
+ const im = (i - 1 + size) % size;
852
+ if (u[i] > thr && u[i] >= u[ip] && u[i] > u[im]) peaks += 1;
853
+ }
854
+ return peaks;
855
+ }
856
+ function createLotusMorphogen2D(params = {}) {
857
+ const size = Math.max(8, Math.floor(params.size ?? 64));
858
+ const d = params.diffusionRatio ?? 40;
859
+ const gamma = params.gamma ?? 1600;
860
+ const a = params.a ?? 0.1;
861
+ const b = params.b ?? 0.9;
862
+ const seed = (params.seed ?? 57005) >>> 0;
863
+ const dx = 1 / size;
864
+ const dt = 0.2 * (dx * dx) / Math.max(1, d);
865
+ const us = a + b;
866
+ const vs = b / (us * us);
867
+ const rand = lotusMulberry32(seed);
868
+ const n = size * size;
869
+ const u = new Float32Array(n);
870
+ const v = new Float32Array(n);
871
+ const mask = new Uint8Array(n);
872
+ const c = (size - 1) / 2;
873
+ for (let j = 0; j < size; j += 1) {
874
+ for (let i = 0; i < size; i += 1) {
875
+ const k = j * size + i;
876
+ const nx = (i - c) / c;
877
+ const ny = (j - c) / c;
878
+ const inside = nx * nx + ny * ny <= 1 ? 1 : 0;
879
+ mask[k] = inside;
880
+ u[k] = us + (inside ? 0.05 * (rand() - 0.5) : 0);
881
+ v[k] = vs;
882
+ }
883
+ }
884
+ return { size, d, gamma, a, b, dt, u, v, mask };
885
+ }
886
+ function stepLotusMorphogen2D(field, iterations = 1) {
887
+ const { size, d, gamma, a, b, dt, u, v, mask } = field;
888
+ const dx2 = 1 / size * (1 / size);
889
+ const n = size * size;
890
+ const lu = new Float32Array(n);
891
+ const lv = new Float32Array(n);
892
+ for (let it = 0; it < iterations; it += 1) {
893
+ for (let j = 0; j < size; j += 1) {
894
+ for (let i = 0; i < size; i += 1) {
895
+ const k = j * size + i;
896
+ if (!mask[k]) continue;
897
+ const left = i > 0 && mask[k - 1] ? u[k - 1] : u[k];
898
+ const right = i < size - 1 && mask[k + 1] ? u[k + 1] : u[k];
899
+ const up = j > 0 && mask[k - size] ? u[k - size] : u[k];
900
+ const down = j < size - 1 && mask[k + size] ? u[k + size] : u[k];
901
+ const leftV = i > 0 && mask[k - 1] ? v[k - 1] : v[k];
902
+ const rightV = i < size - 1 && mask[k + 1] ? v[k + 1] : v[k];
903
+ const upV = j > 0 && mask[k - size] ? v[k - size] : v[k];
904
+ const downV = j < size - 1 && mask[k + size] ? v[k + size] : v[k];
905
+ lu[k] = (left + right + up + down - 4 * u[k]) / dx2;
906
+ lv[k] = (leftV + rightV + upV + downV - 4 * v[k]) / dx2;
907
+ }
908
+ }
909
+ for (let k = 0; k < n; k += 1) {
910
+ if (!mask[k]) continue;
911
+ const uv = u[k] * u[k] * v[k];
912
+ u[k] += dt * (lu[k] + gamma * (a - u[k] + uv));
913
+ v[k] += dt * (d * lv[k] + gamma * (b - uv));
914
+ }
915
+ }
916
+ }
917
+ function lotusMorphogen2DPeaks(field) {
918
+ const { size, u, mask } = field;
919
+ let mn = Infinity;
920
+ let mx = -Infinity;
921
+ for (let k = 0; k < u.length; k += 1) {
922
+ if (!mask[k]) continue;
923
+ if (u[k] < mn) mn = u[k];
924
+ if (u[k] > mx) mx = u[k];
925
+ }
926
+ const range = mx - mn || 1;
927
+ const thr = (mn + mx) / 2;
928
+ const c = (size - 1) / 2;
929
+ const peaks = [];
930
+ for (let j = 0; j < size; j += 1) {
931
+ for (let i = 0; i < size; i += 1) {
932
+ const k = j * size + i;
933
+ if (!mask[k] || u[k] <= thr) continue;
934
+ let isMax = true;
935
+ for (let dj = -1; dj <= 1 && isMax; dj += 1) {
936
+ for (let di = -1; di <= 1; di += 1) {
937
+ if (di === 0 && dj === 0) continue;
938
+ const ni = i + di;
939
+ const nj = j + dj;
940
+ if (ni < 0 || ni >= size || nj < 0 || nj >= size) continue;
941
+ const nk = nj * size + ni;
942
+ if (mask[nk] && u[nk] > u[k]) {
943
+ isMax = false;
944
+ break;
945
+ }
946
+ }
947
+ }
948
+ if (!isMax) continue;
949
+ const x = (i - c) / c;
950
+ const y = (j - c) / c;
951
+ peaks.push({
952
+ x,
953
+ y,
954
+ radius: Math.min(1, Math.hypot(x, y)),
955
+ angle: Math.atan2(y, x),
956
+ value: (u[k] - mn) / range
957
+ });
958
+ }
959
+ }
960
+ return peaks;
961
+ }
962
+ function lotusMorphogen2DSampleAt(field, x, y) {
963
+ const { size, u, mask } = field;
964
+ const c = (size - 1) / 2;
965
+ const i = Math.round(x * c + c);
966
+ const j = Math.round(y * c + c);
967
+ if (i < 0 || i >= size || j < 0 || j >= size) return 0;
968
+ const k = j * size + i;
969
+ if (!mask[k]) return 0;
970
+ let mn = Infinity;
971
+ let mx = -Infinity;
972
+ for (let m = 0; m < u.length; m += 1) {
973
+ if (!mask[m]) continue;
974
+ if (u[m] < mn) mn = u[m];
975
+ if (u[m] > mx) mx = u[m];
976
+ }
977
+ return (u[k] - mn) / (mx - mn || 1);
978
+ }
979
+ function createLotusPetalTurgor(params = {}) {
980
+ const segments = Math.max(4, Math.floor(params.segments ?? 24));
981
+ const budCurl = params.budCurl ?? 2.8;
982
+ const kappaActual = new Float32Array(segments).fill(budCurl);
983
+ return {
984
+ segments,
985
+ baseAngle: (params.baseAngleDeg ?? 90) * Math.PI / 180,
986
+ budCurl,
987
+ openCurl: params.openCurl ?? -0.25,
988
+ matureStart: params.matureStart ?? 0.15,
989
+ matureSpan: params.matureSpan ?? 0.5,
990
+ acropetalDelay: params.acropetalDelay ?? 0.35,
991
+ turgorStiffness: params.turgorStiffness ?? 6,
992
+ turgorRise: params.turgorRise ?? 3,
993
+ turgor: 0,
994
+ kappaActual
995
+ };
996
+ }
997
+ function stepLotusPetalTurgor(state, dt, developmentalTime) {
998
+ const t = Math.max(0, Math.min(1, developmentalTime));
999
+ const baseMaturity = lotusSmoothstep01(0, 1, (t - state.matureStart) / state.matureSpan);
1000
+ state.turgor += state.turgorRise * (baseMaturity - state.turgor) * dt;
1001
+ state.turgor = Math.max(0, Math.min(1, state.turgor));
1002
+ const rate = state.turgorStiffness * state.turgor * dt;
1003
+ for (let i = 0; i < state.segments; i += 1) {
1004
+ const s = (i + 0.5) / state.segments;
1005
+ const maturity = lotusSmoothstep01(0, 1, (t - state.matureStart - s * state.acropetalDelay) / state.matureSpan);
1006
+ const kappaRest = state.budCurl * (1 - maturity) + state.openCurl * maturity;
1007
+ state.kappaActual[i] += rate * (kappaRest - state.kappaActual[i]);
1008
+ }
1009
+ }
1010
+ function lotusPetalTurgorTipDeg(state) {
1011
+ let phi = state.baseAngle;
1012
+ const ds = 1 / state.segments;
1013
+ for (let i = 0; i < state.segments; i += 1) phi += state.kappaActual[i] * ds;
1014
+ return phi * 180 / Math.PI;
1015
+ }
1016
+ function lotusPetalTurgorOpenProgress(state) {
1017
+ const tip = lotusPetalTurgorTipDeg(state);
1018
+ return Math.max(0, Math.min(1, (250 - tip) / (250 - 76)));
1019
+ }
1020
+ exports.DEFAULT_BOTANICAL_LOTUS_CONFIG = void 0; var SHA256_HASH_PATTERN, HEX_COLOR_PATTERN, RING_RENDER_DEFAULTS; exports.botanicalLotusHandler = void 0; exports.LOTUS_GOLDEN_ANGLE_DEG = void 0; exports.LOTUS_GROWTH_SECONDS = void 0; exports.LOTUS_GENESIS_SEED_PLACEHOLDER = void 0; exports.LOTUS_RING_SCALING = void 0; exports.LOTUS_OUTER_PETAL_COLOR = void 0; var LOTUS_PETAL_NAME_RE; exports.LOTUS_PETAL_SHADER_CHUNKS = void 0; exports.LOTUS_PETAL_CHUNK_ENTRIES = void 0; var LOTUS_PETAL_DEFAULT_DYNAMIC; exports.LOTUS_PETAL_UNIFORM_BINDINGS = void 0;
1021
+ var init_BotanicalLotusTrait = chunkHCCQLAA4_cjs.__esm({
1022
+ "src/traits/BotanicalLotusTrait.ts"() {
1023
+ exports.DEFAULT_BOTANICAL_LOTUS_CONFIG = {
1024
+ schema: "holoscript.trait.botanical_lotus.v0",
1025
+ status: "visual_seed",
1026
+ source: {
1027
+ kind: "conversation_reference_images",
1028
+ count: 3,
1029
+ content_hash_status: "pending_media_ingest",
1030
+ wallet_signature_status: "pending_cael_anchor",
1031
+ note: "Derived from three pink lotus reference images provided in-thread; raw media ingest is pending."
1032
+ },
1033
+ reference_anchors: [
1034
+ {
1035
+ id: "lotus-reference-2026-05-06-01",
1036
+ label: "open pink lotus close-up",
1037
+ uri: "conversation://2026-05-06/lotus-reference-01",
1038
+ role: "material",
1039
+ status: "pending_media_ingest"
1040
+ },
1041
+ {
1042
+ id: "lotus-reference-2026-05-06-02",
1043
+ label: "upright pink lotus silhouette",
1044
+ uri: "conversation://2026-05-06/lotus-reference-02",
1045
+ role: "silhouette",
1046
+ status: "pending_media_ingest"
1047
+ },
1048
+ {
1049
+ id: "lotus-reference-2026-05-06-03",
1050
+ label: "pink lotus with leaves and water context",
1051
+ uri: "conversation://2026-05-06/lotus-reference-03",
1052
+ role: "leaf_context",
1053
+ status: "pending_media_ingest"
1054
+ }
1055
+ ],
1056
+ material: {
1057
+ subsurface_scattering: 0.74,
1058
+ subsurface_radius_rgb: [0.9, 0.32, 0.72],
1059
+ petal_translucency_base: 0.68,
1060
+ petal_translucency_edge: 0.36,
1061
+ roughness: 0.72,
1062
+ ior: 1.36,
1063
+ vein_normal_intensity: 0.045,
1064
+ edge_curl_intensity: 0.58,
1065
+ gravity_sag_outer: 0.3,
1066
+ sheen: 0.5,
1067
+ sheen_roughness: 0.42,
1068
+ sheen_color: "#ffe8f2"
1069
+ },
1070
+ colors: {
1071
+ petal_base: "#fff1f6",
1072
+ petal_mid: "#f47ab7",
1073
+ petal_inner: "#ff9ecf",
1074
+ petal_rim: "#c42a86",
1075
+ petal_shadow: "#84205f",
1076
+ seed_pod: "#f4d74a",
1077
+ seed_pod_rim: "#b7c66b",
1078
+ stamen: "#f59e0b",
1079
+ stamen_tip: "#fff4bd",
1080
+ leaf: "#235f4f",
1081
+ leaf_dark: "#102f28",
1082
+ water: "#07140f"
1083
+ },
1084
+ geometry: {
1085
+ petal_rings: [
1086
+ { name: "inner", count: 8, cup: 0.86, gravity_sag: 0.02 },
1087
+ { name: "mid", count: 13, cup: 0.5, gravity_sag: 0.12 },
1088
+ { name: "outer", count: 21, cup: 0.24, gravity_sag: 0.3 }
1089
+ ],
1090
+ petal_shape: "broad_elliptic_pointed_tip_with_center_ridge",
1091
+ stamen_filament_count: 58,
1092
+ seed_pod_dot_pattern: "1_center_7_12_18_radial"
1093
+ },
1094
+ renderer: {
1095
+ requires: ["sss_render", "instanced_filaments", "water_surface"],
1096
+ lod: {
1097
+ close: "full_filaments",
1098
+ mid: "simplified_filaments",
1099
+ far: "petal_billboard"
1100
+ },
1101
+ material_model: "thin_tissue_mesh_physical_material"
1102
+ }
1103
+ };
1104
+ SHA256_HASH_PATTERN = /^sha256:[a-f0-9]{64}$/;
1105
+ HEX_COLOR_PATTERN = /^#[0-9a-fA-F]{6}$/;
1106
+ RING_RENDER_DEFAULTS = {
1107
+ inner: { radius: 0.32, length: 0.82, width: 0.34, pitch_degrees: 74 },
1108
+ mid: { radius: 0.58, length: 1.15, width: 0.46, pitch_degrees: 42 },
1109
+ outer: { radius: 0.92, length: 1.52, width: 0.58, pitch_degrees: 18 }
1110
+ };
1111
+ exports.botanicalLotusHandler = {
1112
+ name: "botanical_lotus",
1113
+ defaultConfig: exports.DEFAULT_BOTANICAL_LOTUS_CONFIG,
1114
+ validate: validateBotanicalLotusConfig,
1115
+ toRenderProfile: createBotanicalLotusRenderProfile,
1116
+ onAttach(node, config, context) {
1117
+ const normalized = assertBotanicalLotusConfig(config);
1118
+ const profile = createBotanicalLotusRenderProfile(normalized);
1119
+ const state = { config: normalized, profile };
1120
+ node.__botanicalLotusState = state;
1121
+ const nodeId = String(node.id ?? "unknown");
1122
+ context.setState?.({
1123
+ [`botanical_lotus.${nodeId}.anchor_status`]: profile.anchor_status,
1124
+ [`botanical_lotus.${nodeId}.petal_count`]: profile.petal_count
1125
+ });
1126
+ context.emit?.("botanical_lotus_attached", {
1127
+ node,
1128
+ anchorStatus: profile.anchor_status,
1129
+ walletSigned: profile.wallet_signed,
1130
+ petalCount: profile.petal_count,
1131
+ referenceAnchorIds: profile.reference_anchor_ids,
1132
+ rendererRequires: profile.renderer_requires
1133
+ });
1134
+ },
1135
+ onDetach(node, _config, context) {
1136
+ context.emit?.("botanical_lotus_detached", { node });
1137
+ delete node.__botanicalLotusState;
1138
+ },
1139
+ onUpdate(_node, _config, _context, _delta) {
1140
+ },
1141
+ onEvent(node, _config, context, event) {
1142
+ const state = node.__botanicalLotusState;
1143
+ if (!state) return;
1144
+ if (event.type === "botanical_lotus_query") {
1145
+ context.emit?.("botanical_lotus_response", {
1146
+ queryId: event.queryId,
1147
+ node,
1148
+ config: state.config,
1149
+ profile: state.profile
1150
+ });
1151
+ return;
1152
+ }
1153
+ if (event.type === "botanical_lotus_reference_anchored") {
1154
+ const anchorId = String(event.anchorId ?? "");
1155
+ const contentHash = typeof event.contentHash === "string" ? event.contentHash : void 0;
1156
+ const walletSignature = typeof event.walletSignature === "string" ? event.walletSignature : void 0;
1157
+ if (!anchorId || !contentHash) return;
1158
+ const updatedAnchors = state.config.reference_anchors.map((anchor) => {
1159
+ if (anchor.id !== anchorId) return anchor;
1160
+ return {
1161
+ ...anchor,
1162
+ content_hash: contentHash,
1163
+ wallet_signature: walletSignature,
1164
+ status: walletSignature ? "wallet_signed" : "hashed"
1165
+ };
1166
+ });
1167
+ const updatedConfig = assertBotanicalLotusConfig({
1168
+ ...state.config,
1169
+ status: updatedAnchors.every((anchor) => anchor.status === "wallet_signed") ? "wallet_signed" : "content_hashed",
1170
+ source: {
1171
+ ...state.config.source,
1172
+ content_hash_status: deriveBotanicalLotusAnchorStatus(updatedAnchors),
1173
+ wallet_signature_status: updatedAnchors.every(
1174
+ (anchor) => anchor.status === "wallet_signed"
1175
+ ) ? "wallet_signed" : "pending_cael_anchor"
1176
+ },
1177
+ reference_anchors: updatedAnchors
1178
+ });
1179
+ state.config = updatedConfig;
1180
+ state.profile = createBotanicalLotusRenderProfile(updatedConfig, state.placement, state.lighting);
1181
+ context.emit?.("botanical_lotus_reference_updated", {
1182
+ node,
1183
+ anchorId,
1184
+ anchorStatus: state.profile.anchor_status,
1185
+ walletSigned: state.profile.wallet_signed,
1186
+ referenceAnchorIds: state.profile.reference_anchor_ids
1187
+ });
1188
+ return;
1189
+ }
1190
+ if (event.type === "holomap:surface_anchor_placed") {
1191
+ const payload = event.payload ?? {};
1192
+ const surfaceAnchorId = typeof payload.surfaceAnchorId === "string" ? payload.surfaceAnchorId : void 0;
1193
+ const surfaceNormal = Array.isArray(payload.surfaceNormal) ? payload.surfaceNormal : void 0;
1194
+ const worldPosition = Array.isArray(payload.worldPosition) ? payload.worldPosition : void 0;
1195
+ if (!surfaceAnchorId) return;
1196
+ state.placement = {
1197
+ surface_anchor_id: surfaceAnchorId,
1198
+ surface_normal: surfaceNormal,
1199
+ world_position: worldPosition
1200
+ };
1201
+ state.profile = createBotanicalLotusRenderProfile(state.config, state.placement, state.lighting);
1202
+ context.emit?.("botanical_lotus_surface_bound", {
1203
+ node,
1204
+ surfaceAnchorId,
1205
+ surfaceNormal,
1206
+ worldPosition
1207
+ });
1208
+ return;
1209
+ }
1210
+ if (event.type === "holomap:lighting_update") {
1211
+ const payload = event.payload ?? {};
1212
+ const referenceId = typeof payload.referenceId === "string" ? payload.referenceId : void 0;
1213
+ const estimatedLux = typeof payload.estimatedLux === "number" && Number.isFinite(payload.estimatedLux) ? payload.estimatedLux : void 0;
1214
+ const colorTemperatureK = typeof payload.colorTemperatureK === "number" && Number.isFinite(payload.colorTemperatureK) ? payload.colorTemperatureK : void 0;
1215
+ const dominantDirection = Array.isArray(payload.dominantDirection) ? payload.dominantDirection : void 0;
1216
+ if (!referenceId) return;
1217
+ state.lighting = {
1218
+ reference_id: referenceId,
1219
+ estimated_lux: estimatedLux,
1220
+ color_temperature_k: colorTemperatureK,
1221
+ dominant_direction: dominantDirection
1222
+ };
1223
+ state.profile = createBotanicalLotusRenderProfile(state.config, state.placement, state.lighting);
1224
+ context.emit?.("botanical_lotus_lighting_updated", {
1225
+ node,
1226
+ referenceId,
1227
+ estimatedLux,
1228
+ colorTemperatureK,
1229
+ dominantDirection
1230
+ });
1231
+ return;
1232
+ }
1233
+ if (event.type === "holomap:anchor_state_changed") {
1234
+ const payload = event.payload ?? {};
1235
+ const anchorFrameIndex = typeof payload.anchorFrameIndex === "number" ? payload.anchorFrameIndex : void 0;
1236
+ if (state.placement?.surface_anchor_id && anchorFrameIndex !== void 0) {
1237
+ context.emit?.("botanical_lotus_anchor_drift", {
1238
+ node,
1239
+ surfaceAnchorId: state.placement.surface_anchor_id,
1240
+ anchorFrameIndex
1241
+ });
1242
+ }
1243
+ return;
1244
+ }
1245
+ }
1246
+ };
1247
+ exports.LOTUS_GOLDEN_ANGLE_DEG = 137.50776;
1248
+ exports.LOTUS_GROWTH_SECONDS = 12.5;
1249
+ exports.LOTUS_GENESIS_SEED_PLACEHOLDER = "0x0000DEAD";
1250
+ exports.LOTUS_RING_SCALING = {
1251
+ 1: { radius: 1.25, length: 0.98, width: 1.65, height: 1.12 },
1252
+ 2: { radius: 1.25, length: 0.94, width: 1.48, height: 0.98 },
1253
+ 3: { radius: 1.25, length: 0.82, width: 1.35, height: 0.78 }
1254
+ };
1255
+ exports.LOTUS_OUTER_PETAL_COLOR = "#d94b9a";
1256
+ LOTUS_PETAL_NAME_RE = /^Petal\s+P([123])\.(\d+)/;
1257
+ exports.LOTUS_PETAL_SHADER_CHUNKS = {
1258
+ /** Spliced after `#include <common>` in the vertex shader. */
1259
+ vertexHeader: `
1260
+ attribute vec2 petalUv;
1261
+ attribute float veinPhase;
1262
+ varying vec2 vLotusPetalUv;
1263
+ varying float vLotusVeinPhase;
1264
+ varying vec3 vLotusWorldNormal;
1265
+ varying vec3 vLotusViewDir;
1266
+ uniform float uPetalDevTime;
1267
+ uniform float uPetalCurlScale;
1268
+ `,
1269
+ /**
1270
+ * Spliced after \`#include <begin_vertex>\` — EMERGENT petal curl (L2). Bends the
1271
+ * length axis by the integral of the maturation-front growth curvature (mirrors
1272
+ * simulateLotusPetalGrowth), RELATIVE to the fully-open state so the bend is zero at
1273
+ * full bloom (the approved open pose is preserved exactly) and the bud-wrap appears
1274
+ * only while opening. Curvature reverses inward(bud) -> outward(open) behind the
1275
+ * acropetal maturation front.
1276
+ */
1277
+ vertexBend: `
1278
+ {
1279
+ float lotusVlen = clamp(petalUv.y, 0.0, 1.0);
1280
+ float lotusDs = lotusVlen / 12.0;
1281
+ float lotusPhiN = 0.0, lotusPhiO = 0.0;
1282
+ vec2 lotusCN = vec2(0.0), lotusCO = vec2(0.0);
1283
+ for (int k = 0; k < 12; k++) {
1284
+ float s = (float(k) + 0.5) * lotusDs;
1285
+ float matN = smoothstep(0.0, 1.0, (uPetalDevTime - 0.15 - s * 0.35) / 0.5);
1286
+ float matO = smoothstep(0.0, 1.0, (1.0 - 0.15 - s * 0.35) / 0.5);
1287
+ lotusPhiN += mix(2.8, -0.25, matN) * lotusDs;
1288
+ lotusPhiO += mix(2.8, -0.25, matO) * lotusDs;
1289
+ lotusCN += vec2(cos(lotusPhiN), sin(lotusPhiN)) * lotusDs;
1290
+ lotusCO += vec2(cos(lotusPhiO), sin(lotusPhiO)) * lotusDs;
1291
+ }
1292
+ vec2 lotusBend = (lotusCN - lotusCO) * uPetalCurlScale;
1293
+ transformed.x += lotusBend.x;
1294
+ transformed.y += lotusBend.y;
1295
+ }
1296
+ `,
1297
+ /** Spliced after \`#include <worldpos_vertex>\`. */
1298
+ vertexWorld: `
1299
+ vLotusPetalUv = petalUv;
1300
+ vLotusVeinPhase = veinPhase;
1301
+ vLotusWorldNormal = normalize(mat3(modelMatrix) * objectNormal);
1302
+ vLotusViewDir = normalize(cameraPosition - worldPosition.xyz);
1303
+ `,
1304
+ /** Spliced after `#include <common>` in the fragment shader. */
1305
+ fragmentHeader: `
1306
+ uniform vec3 uLotusBaseColor;
1307
+ uniform vec3 uLotusMidColor;
1308
+ uniform vec3 uLotusRimColor;
1309
+ uniform vec3 uLotusShadowColor;
1310
+ uniform vec3 uLotusSubsurfaceColor;
1311
+ uniform float uLotusSSS;
1312
+ uniform float uLotusTransmissionBase;
1313
+ uniform float uLotusTransmissionEdge;
1314
+ uniform float uLotusVeinIntensity;
1315
+ uniform float uLotusGrowth;
1316
+ uniform float uLotusBloom;
1317
+ uniform float uLotusTime;
1318
+ varying vec2 vLotusPetalUv;
1319
+ varying float vLotusVeinPhase;
1320
+ varying vec3 vLotusWorldNormal;
1321
+ varying vec3 vLotusViewDir;
1322
+
1323
+ float lotusVeinField(vec2 uv, float phase) {
1324
+ float signedX = uv.x * 2.0 - 1.0;
1325
+ float major = pow(1.0 - abs(sin((signedX * 18.0 + uv.y * 6.0 + phase) * 3.14159265)), 20.0);
1326
+ float secondary = pow(1.0 - abs(sin((signedX * 34.0 - uv.y * 4.0 - phase * 0.7) * 3.14159265)), 32.0);
1327
+ float taper = (1.0 - smoothstep(0.82, 1.0, uv.y)) * (1.0 - abs(signedX) * 0.34);
1328
+ return clamp((major * 0.62 + secondary * 0.38) * taper, 0.0, 1.0);
1329
+ }
1330
+ `,
1331
+ /** Spliced after `#include <normal_fragment_maps>` — vein normal perturbation. */
1332
+ fragmentNormalInjection: `
1333
+ float lotusNormalVein = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
1334
+ float lotusVeinSide = sign(vLotusPetalUv.x - 0.5);
1335
+ normal = normalize(normal + vec3(
1336
+ lotusNormalVein * lotusVeinSide * uLotusVeinIntensity * 1.7,
1337
+ lotusNormalVein * uLotusVeinIntensity * 0.6,
1338
+ 0.0
1339
+ ));`,
1340
+ /** Spliced after `#include <color_fragment>` — petal profile gradient + veins. */
1341
+ fragmentColorInjection: `
1342
+ float lotusEdge = abs(vLotusPetalUv.x * 2.0 - 1.0);
1343
+ float lotusTip = smoothstep(0.78, 1.0, vLotusPetalUv.y);
1344
+ vec3 lotusProfileColor = mix(uLotusBaseColor, uLotusMidColor, smoothstep(0.08, 0.72, vLotusPetalUv.y));
1345
+ lotusProfileColor = mix(lotusProfileColor, uLotusRimColor, clamp(lotusEdge * lotusEdge * 0.42 + lotusTip * 0.35, 0.0, 0.82));
1346
+ float lotusVeinColorField = lotusVeinField(vLotusPetalUv, vLotusVeinPhase);
1347
+ vec3 lotusVeinColor = mix(uLotusShadowColor, uLotusRimColor, 0.58);
1348
+ diffuseColor.rgb = mix(diffuseColor.rgb, diffuseColor.rgb * lotusProfileColor, 0.62);
1349
+ diffuseColor.rgb += lotusVeinColor * lotusVeinColorField * uLotusVeinIntensity * uLotusGrowth * 7.5;
1350
+ diffuseColor.a *= mix(0.7, 1.0, uLotusGrowth);`,
1351
+ /** Spliced after `#include <emissivemap_fragment>` — backlit subsurface scatter. */
1352
+ fragmentEmissiveInjection: `
1353
+ float lotusBacklight = pow(1.0 - abs(dot(normalize(vLotusWorldNormal), normalize(vLotusViewDir))), 2.15);
1354
+ float lotusTranslucency = mix(uLotusTransmissionBase, uLotusTransmissionEdge, lotusEdge);
1355
+ float lotusPulse = 0.92 + sin(uLotusTime * 0.65 + vLotusVeinPhase * 6.28318) * 0.08;
1356
+ vec3 lotusScatter = uLotusSubsurfaceColor * lotusBacklight * lotusTranslucency * uLotusSSS * uLotusGrowth * lotusPulse;
1357
+ totalEmissiveRadiance += lotusScatter * (0.28 + uLotusBloom * 0.72);`
1358
+ };
1359
+ exports.LOTUS_PETAL_CHUNK_ENTRIES = [
1360
+ { stage: "vertex", include: "common", code: exports.LOTUS_PETAL_SHADER_CHUNKS.vertexHeader },
1361
+ { stage: "vertex", include: "begin_vertex", code: exports.LOTUS_PETAL_SHADER_CHUNKS.vertexBend },
1362
+ { stage: "vertex", include: "worldpos_vertex", code: exports.LOTUS_PETAL_SHADER_CHUNKS.vertexWorld },
1363
+ { stage: "fragment", include: "common", code: exports.LOTUS_PETAL_SHADER_CHUNKS.fragmentHeader },
1364
+ { stage: "fragment", include: "normal_fragment_maps", code: exports.LOTUS_PETAL_SHADER_CHUNKS.fragmentNormalInjection },
1365
+ { stage: "fragment", include: "color_fragment", code: exports.LOTUS_PETAL_SHADER_CHUNKS.fragmentColorInjection },
1366
+ { stage: "fragment", include: "emissivemap_fragment", code: exports.LOTUS_PETAL_SHADER_CHUNKS.fragmentEmissiveInjection }
1367
+ ];
1368
+ LOTUS_PETAL_DEFAULT_DYNAMIC = {
1369
+ devTime: 1,
1370
+ curlScale: 1,
1371
+ growth: 1,
1372
+ bloom: 1,
1373
+ time: 0
1374
+ };
1375
+ exports.LOTUS_PETAL_UNIFORM_BINDINGS = {
1376
+ uPetalDevTime: "devTime",
1377
+ uLotusGrowth: "growth",
1378
+ uLotusBloom: "bloom",
1379
+ uLotusTime: "time"
1380
+ };
1381
+ }
1382
+ });
1383
+
1384
+ exports.assertBotanicalLotusConfig = assertBotanicalLotusConfig;
1385
+ exports.buildLotusPetalMaterialSpec = buildLotusPetalMaterialSpec;
1386
+ exports.buildLotusSceneFromComposition = buildLotusSceneFromComposition;
1387
+ exports.createBotanicalLotusRenderProfile = createBotanicalLotusRenderProfile;
1388
+ exports.createLotusMeristem = createLotusMeristem;
1389
+ exports.createLotusMorphogen = createLotusMorphogen;
1390
+ exports.createLotusMorphogen2D = createLotusMorphogen2D;
1391
+ exports.createLotusPetalTurgor = createLotusPetalTurgor;
1392
+ exports.createLotusPond = createLotusPond;
1393
+ exports.deriveBotanicalLotusAnchorStatus = deriveBotanicalLotusAnchorStatus;
1394
+ exports.deriveLotusBloomFromGlow = deriveLotusBloomFromGlow;
1395
+ exports.disturbLotusPond = disturbLotusPond;
1396
+ exports.generateBotanicalNormalMap = generateBotanicalNormalMap;
1397
+ exports.generateBotanicalRoughnessMap = generateBotanicalRoughnessMap;
1398
+ exports.getBotanicalLotusPetalCount = getBotanicalLotusPetalCount;
1399
+ exports.init_BotanicalLotusTrait = init_BotanicalLotusTrait;
1400
+ exports.lotusMorphogen2DPeaks = lotusMorphogen2DPeaks;
1401
+ exports.lotusMorphogen2DSampleAt = lotusMorphogen2DSampleAt;
1402
+ exports.lotusMorphogenPeaks = lotusMorphogenPeaks;
1403
+ exports.lotusPetalRenderColor = lotusPetalRenderColor;
1404
+ exports.lotusPetalTurgorOpenProgress = lotusPetalTurgorOpenProgress;
1405
+ exports.lotusPetalTurgorTipDeg = lotusPetalTurgorTipDeg;
1406
+ exports.lotusPondSurface = lotusPondSurface;
1407
+ exports.normalizeBotanicalLotusConfig = normalizeBotanicalLotusConfig;
1408
+ exports.simulateLotusMorphogenesis = simulateLotusMorphogenesis;
1409
+ exports.simulateLotusPetalGrowth = simulateLotusPetalGrowth;
1410
+ exports.simulateLotusPhyllotaxis = simulateLotusPhyllotaxis;
1411
+ exports.stepLotusMeristem = stepLotusMeristem;
1412
+ exports.stepLotusMorphogen = stepLotusMorphogen;
1413
+ exports.stepLotusMorphogen2D = stepLotusMorphogen2D;
1414
+ exports.stepLotusPetalTurgor = stepLotusPetalTurgor;
1415
+ exports.stepLotusPond = stepLotusPond;
1416
+ exports.validateBotanicalLotusConfig = validateBotanicalLotusConfig;
1417
+ //# sourceMappingURL=chunk-6Q7RC2MK.cjs.map
1418
+ //# sourceMappingURL=chunk-6Q7RC2MK.cjs.map