@almadar/std 17.0.2 → 17.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/behaviors/lolo/auth/atoms/std-dev-personas.lolo +27 -2
  2. package/behaviors/lolo/cli/atoms/std-orb-goldens.lolo +6 -3
  3. package/behaviors/lolo/cli/atoms/std-orb-lint-mem-handles.lolo +54 -34
  4. package/behaviors/lolo/cli/atoms/std-orb-lint-os-grants.lolo +4 -4
  5. package/behaviors/lolo/cli/atoms/std-orb-mcp.lolo +16 -21
  6. package/behaviors/lolo/cli/atoms/std-orb-packages.lolo +26 -16
  7. package/behaviors/lolo/cli/atoms/std-orb-serve.lolo +24 -4
  8. package/behaviors/lolo/codec/atoms/std-lolo-kotlin.lolo +26 -3
  9. package/behaviors/lolo/codec/atoms/std-lolo-python.lolo +15 -2
  10. package/behaviors/lolo/codec/atoms/std-lolo-rust.lolo +27 -2
  11. package/behaviors/lolo/codec/atoms/std-lolo-source.lolo +251 -60
  12. package/behaviors/lolo/codec/atoms/std-lolo-swift.lolo +24 -1
  13. package/behaviors/lolo/codec/atoms/std-lolo-typescript.lolo +24 -3
  14. package/behaviors/lolo/connect/atoms/std-meta-ads.lolo +4 -4
  15. package/behaviors/lolo/connect/atoms/std-stdio-lines.lolo +7 -4
  16. package/behaviors/lolo/connect/atoms/std-youtube.lolo +9 -9
  17. package/behaviors/lolo/dev/atoms/std-guest-session.lolo +122 -10
  18. package/behaviors/lolo/dev/atoms/std-mock-seed-marks.lolo +66 -0
  19. package/behaviors/lolo/dev/organisms/std-behavior-playground.lolo +5 -2
  20. package/behaviors/lolo/dev/organisms/std-launchpad.lolo +4 -3
  21. package/behaviors/lolo/gpu/atoms/std-gpu-compute.lolo +329 -0
  22. package/behaviors/lolo/net/atoms/std-http-client.lolo +4 -4
  23. package/behaviors/lolo/net/atoms/std-http-fetch.lolo +6 -6
  24. package/behaviors/lolo/net/atoms/std-npm-lookup.lolo +1 -1
  25. package/behaviors/lolo/net/atoms/std-npm-registry.lolo +2 -2
  26. package/behaviors/lolo/spec/auth/dev-personas.replay.goldens.json +263 -2
  27. package/behaviors/lolo/spec/cli/lint-all.lolo +1 -0
  28. package/behaviors/lolo/spec/cli/lint-item-action-event.replay.goldens.json +9 -9
  29. package/behaviors/lolo/spec/cli/lint-mem-handles.replay.goldens.json +3021 -1
  30. package/behaviors/lolo/spec/cli/lint-os-grants.replay.goldens.json +284 -12
  31. package/behaviors/lolo/spec/cli/mcp-server.replay.goldens.json +51 -55
  32. package/behaviors/lolo/spec/cli/orb-compile.replay.goldens.json +10 -4
  33. package/behaviors/lolo/spec/cli/orb-packages.lolo +1 -1
  34. package/behaviors/lolo/spec/codec/lolo-kotlin.replay.goldens.json +7496 -7497
  35. package/behaviors/lolo/spec/codec/lolo-python.replay.goldens.json +341 -3
  36. package/behaviors/lolo/spec/codec/lolo-rust.replay.goldens.json +18931 -6142
  37. package/behaviors/lolo/spec/codec/lolo-source.fixtures/compose-pair.lolo +44 -0
  38. package/behaviors/lolo/spec/codec/lolo-source.fixtures/config-read.lolo +2 -1
  39. package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-default.lolo +2 -1
  40. package/behaviors/lolo/spec/codec/lolo-source.fixtures/divide-plain.lolo +2 -1
  41. package/behaviors/lolo/spec/codec/lolo-source.fixtures/get-past-end.lolo +2 -1
  42. package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-call.lolo +2 -1
  43. package/behaviors/lolo/spec/codec/lolo-source.fixtures/list-plain.lolo +2 -1
  44. package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-binary.lolo +2 -1
  45. package/behaviors/lolo/spec/codec/lolo-source.fixtures/minus-unary.lolo +2 -1
  46. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nested-let.lolo +2 -1
  47. package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-machine.lolo +2 -1
  48. package/behaviors/lolo/spec/codec/lolo-source.fixtures/no-template.lolo +2 -1
  49. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-past-end.lolo +2 -1
  50. package/behaviors/lolo/spec/codec/lolo-source.fixtures/nth-raw.lolo +2 -1
  51. package/behaviors/lolo/spec/codec/lolo-source.fixtures/ports-call.lolo +2 -1
  52. package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-one.lolo +2 -1
  53. package/behaviors/lolo/spec/codec/lolo-source.fixtures/range-two.lolo +2 -1
  54. package/behaviors/lolo/spec/codec/lolo-source.fixtures/router-trio.lolo +88 -0
  55. package/behaviors/lolo/spec/codec/lolo-source.fixtures/store-pair.lolo +62 -0
  56. package/behaviors/lolo/spec/codec/lolo-source.fixtures/string-literal.lolo +2 -1
  57. package/behaviors/lolo/spec/codec/lolo-source.gen/knobs.py +27 -1
  58. package/behaviors/lolo/spec/codec/lolo-source.gen/src_assemble.in +54 -2
  59. package/behaviors/lolo/spec/codec/lolo-source.gen/src_finish.in +1 -1
  60. package/behaviors/lolo/spec/codec/lolo-source.gen/src_fold.in +24 -4
  61. package/behaviors/lolo/spec/codec/lolo-source.gen/src_head.in +8 -3
  62. package/behaviors/lolo/spec/codec/lolo-source.gen/src_prepare.in +6 -2
  63. package/behaviors/lolo/spec/codec/lolo-source.gen/src_trait.in +12 -2
  64. package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.lolo +2 -1
  65. package/behaviors/lolo/spec/codec/lolo-source.parity/agent-step.server.lolo +1 -0
  66. package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.lolo +2 -1
  67. package/behaviors/lolo/spec/codec/lolo-source.parity/chunk.server.lolo +1 -0
  68. package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.events.json +36 -0
  69. package/behaviors/lolo/spec/codec/lolo-source.parity/compose-pair.replay.goldens.json +91 -0
  70. package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.lolo +2 -1
  71. package/behaviors/lolo/spec/codec/lolo-source.parity/cosine.server.lolo +1 -0
  72. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/compose-pair.kt +31 -0
  73. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/router-trio.kt +31 -0
  74. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/kotlin/store-pair.kt +31 -0
  75. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/compose-pair.py +18 -0
  76. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/router-trio.py +18 -0
  77. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/python/store-pair.py +17 -0
  78. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/compose-pair.rs +37 -0
  79. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/router-trio.rs +37 -0
  80. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/rust/store-pair.rs +36 -0
  81. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/compose-pair.swift +24 -0
  82. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/router-trio.swift +24 -0
  83. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/swift/store-pair.swift +23 -0
  84. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/compose-pair.mts +24 -0
  85. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/router-trio.mts +24 -0
  86. package/behaviors/lolo/spec/codec/lolo-source.parity/drivers/typescript/store-pair.mts +22 -0
  87. package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.lolo +2 -1
  88. package/behaviors/lolo/spec/codec/lolo-source.parity/recall-at-k.server.lolo +1 -0
  89. package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.events.json +18 -0
  90. package/behaviors/lolo/spec/codec/lolo-source.parity/router-trio.replay.goldens.json +87 -0
  91. package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.events.json +58 -0
  92. package/behaviors/lolo/spec/codec/lolo-source.parity/store-pair.replay.goldens.json +238 -0
  93. package/behaviors/lolo/spec/codec/lolo-swift.replay.goldens.json +15599 -2204
  94. package/behaviors/lolo/spec/codec/lolo-typescript.replay.goldens.json +28930 -28929
  95. package/behaviors/lolo/spec/connect/bearer-api.replay.goldens.json +1 -1
  96. package/behaviors/lolo/spec/connect/esign.replay.goldens.json +3 -3
  97. package/behaviors/lolo/spec/connect/github.replay.goldens.json +13 -13
  98. package/behaviors/lolo/spec/connect/google-calendar.replay.goldens.json +2 -2
  99. package/behaviors/lolo/spec/connect/image.replay.goldens.json +1 -1
  100. package/behaviors/lolo/spec/connect/meta-ads.replay.goldens.json +2 -2
  101. package/behaviors/lolo/spec/connect/stdio-lines.replay.goldens.json +90 -0
  102. package/behaviors/lolo/spec/connect/twilio.replay.goldens.json +2 -2
  103. package/behaviors/lolo/spec/connect/youtube.replay.goldens.json +1 -1
  104. package/behaviors/lolo/spec/dev/guest-session.replay.goldens.json +824 -0
  105. package/behaviors/lolo/spec/dev/mock-seed-marks.replay.goldens.json +365 -0
  106. package/behaviors/lolo/spec/dev/verify-walk.replay.goldens.json +2 -1
  107. package/behaviors/lolo/spec/gpu/gpu-compute.replay.goldens.json +784 -0
  108. package/behaviors/lolo/spec/mem/mem-buffer.replay.goldens.json +97 -1
  109. package/behaviors/lolo/spec/ml/vector-write.goldens.json +1 -1
  110. package/behaviors/lolo/spec/ml/vector-write.replay.goldens.json +2 -2
  111. package/behaviors/lolo/spec/net/http-client-call-host.replay.goldens.json +3 -3
  112. package/behaviors/lolo/spec/net/http-client-env-host.replay.goldens.json +3 -3
  113. package/behaviors/lolo/spec/net/http-client.replay.goldens.json +56 -56
  114. package/behaviors/lolo/spec/net/http-fetch.replay.goldens.json +2 -2
  115. package/behaviors/lolo/spec/net/npm-lookup.replay.goldens.json +1 -1
  116. package/behaviors/lolo/spec/net/npm-registry.replay.goldens.json +2 -2
  117. package/behaviors/lolo/spec/net/server-declared-traits.replay.goldens.json +6 -3
  118. package/behaviors/lolo/spec/net/server-external-inputs.replay.goldens.json +16 -8
  119. package/behaviors/lolo/spec/net/server-retargeted-leg.replay.goldens.json +4 -2
  120. package/behaviors/lolo/spec/net/server-untargeted-discovery.replay.goldens.json +50 -45
  121. package/behaviors/lolo/spec/ops/llm-spend-board.replay.goldens.json +112 -16
  122. package/behaviors/lolo/spec/store/firestore-twin.replay.goldens.json +1 -1
  123. package/behaviors/lolo/spec/store/row-store-postgres.gen/record_real_sql.py +1 -1
  124. package/behaviors/lolo/spec/ui/game/fx-particles.replay.goldens.json +37 -0
  125. package/behaviors/lolo/ui/avl/atoms/std-avl-cosmic-zoom.lolo +2 -2
  126. package/behaviors/lolo/ui/game/atoms/std-fx-particles.lolo +10 -1
  127. package/behaviors/lolo/ui/game/atoms/ui-draw-fx-layer.lolo +4 -4
  128. package/behaviors/lolo/ui/game/organisms/std-arcade-board-3d.lolo +9 -9
  129. package/behaviors/lolo/ui/game/organisms/std-crew-board-2d.lolo +4 -4
  130. package/behaviors/lolo/ui/game/organisms/std-dungeon-board-2d.lolo +5 -5
  131. package/behaviors/lolo/ui/game/organisms/std-market-board-3d.lolo +9 -9
  132. package/behaviors/lolo/ui/game/organisms/std-objective-board-3d.lolo +9 -9
  133. package/behaviors/lolo/ui/game/organisms/std-platformer-board-2d.lolo +5 -5
  134. package/behaviors/lolo/ui/game/organisms/std-platformer-puzzle.lolo +4 -4
  135. package/behaviors/lolo/ui/game/organisms/std-survival-board-3d.lolo +9 -9
  136. package/behaviors/lolo/ui/game/organisms/std-tactics-board-2d.lolo +5 -5
  137. package/behaviors/lolo/ui/game/organisms/std-tactics-board-3d.lolo +9 -9
  138. package/behaviors/registry/auth/atoms/std-dev-personas.orb +1 -1
  139. package/behaviors/registry/cli/atoms/std-orb-goldens.orb +1 -1
  140. package/behaviors/registry/cli/atoms/std-orb-lint-mem-handles.orb +1 -1
  141. package/behaviors/registry/cli/atoms/std-orb-lint-os-grants.orb +1 -1
  142. package/behaviors/registry/cli/atoms/std-orb-mcp.orb +1 -1
  143. package/behaviors/registry/cli/atoms/std-orb-packages.orb +1 -1
  144. package/behaviors/registry/cli/atoms/std-orb-serve.orb +1 -1
  145. package/behaviors/registry/codec/atoms/std-lolo-kotlin.orb +1 -1
  146. package/behaviors/registry/codec/atoms/std-lolo-python.orb +1 -1
  147. package/behaviors/registry/codec/atoms/std-lolo-rust.orb +1 -1
  148. package/behaviors/registry/codec/atoms/std-lolo-source.orb +1 -1
  149. package/behaviors/registry/codec/atoms/std-lolo-swift.orb +1 -1
  150. package/behaviors/registry/codec/atoms/std-lolo-typescript.orb +1 -1
  151. package/behaviors/registry/connect/atoms/std-meta-ads.orb +1 -1
  152. package/behaviors/registry/connect/atoms/std-stdio-lines.orb +1 -1
  153. package/behaviors/registry/connect/atoms/std-youtube.orb +1 -1
  154. package/behaviors/registry/dev/atoms/std-guest-session.orb +1 -1
  155. package/behaviors/registry/dev/atoms/std-mock-seed-marks.orb +1 -0
  156. package/behaviors/registry/dev/organisms/std-behavior-playground.orb +37 -0
  157. package/behaviors/registry/dev/organisms/std-launchpad.orb +25 -0
  158. package/behaviors/registry/gpu/atoms/std-gpu-compute.orb +1 -0
  159. package/behaviors/registry/net/atoms/std-http-client.orb +1 -1
  160. package/behaviors/registry/net/atoms/std-http-fetch.orb +1 -1
  161. package/behaviors/registry/net/atoms/std-npm-lookup.orb +1 -1
  162. package/behaviors/registry/net/atoms/std-npm-registry.orb +1 -1
  163. package/behaviors/registry/spec/cli/lint-all.orb +1 -1
  164. package/behaviors/registry/spec/cli/orb-packages.orb +1 -1
  165. package/behaviors/registry/spec/codec/lolo-source.fixtures/compose-pair.orb +1 -0
  166. package/behaviors/registry/spec/codec/lolo-source.fixtures/config-read.orb +1 -1
  167. package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-default.orb +1 -1
  168. package/behaviors/registry/spec/codec/lolo-source.fixtures/divide-plain.orb +1 -1
  169. package/behaviors/registry/spec/codec/lolo-source.fixtures/get-past-end.orb +1 -1
  170. package/behaviors/registry/spec/codec/lolo-source.fixtures/list-call.orb +1 -1
  171. package/behaviors/registry/spec/codec/lolo-source.fixtures/list-plain.orb +1 -1
  172. package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-binary.orb +1 -1
  173. package/behaviors/registry/spec/codec/lolo-source.fixtures/minus-unary.orb +1 -1
  174. package/behaviors/registry/spec/codec/lolo-source.fixtures/nested-let.orb +1 -1
  175. package/behaviors/registry/spec/codec/lolo-source.fixtures/no-machine.orb +1 -1
  176. package/behaviors/registry/spec/codec/lolo-source.fixtures/no-template.orb +1 -1
  177. package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-past-end.orb +1 -1
  178. package/behaviors/registry/spec/codec/lolo-source.fixtures/nth-raw.orb +1 -1
  179. package/behaviors/registry/spec/codec/lolo-source.fixtures/ports-call.orb +1 -1
  180. package/behaviors/registry/spec/codec/lolo-source.fixtures/range-one.orb +1 -1
  181. package/behaviors/registry/spec/codec/lolo-source.fixtures/range-two.orb +1 -1
  182. package/behaviors/registry/spec/codec/lolo-source.fixtures/router-trio.orb +1 -0
  183. package/behaviors/registry/spec/codec/lolo-source.fixtures/store-pair.orb +1 -0
  184. package/behaviors/registry/spec/codec/lolo-source.fixtures/string-literal.orb +1 -1
  185. package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.orb +1 -1
  186. package/behaviors/registry/spec/codec/lolo-source.parity/agent-step.server.orb +1 -1
  187. package/behaviors/registry/spec/codec/lolo-source.parity/chunk.orb +1 -1
  188. package/behaviors/registry/spec/codec/lolo-source.parity/chunk.server.orb +1 -1
  189. package/behaviors/registry/spec/codec/lolo-source.parity/cosine.orb +1 -1
  190. package/behaviors/registry/spec/codec/lolo-source.parity/cosine.server.orb +1 -1
  191. package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.orb +1 -1
  192. package/behaviors/registry/spec/codec/lolo-source.parity/recall-at-k.server.orb +1 -1
  193. package/behaviors/registry/ui/avl/atoms/std-avl-cosmic-zoom.orb +1 -1
  194. package/behaviors/registry/ui/game/atoms/std-fx-particles.orb +1 -1
  195. package/behaviors/registry/ui/game/atoms/ui-draw-fx-layer.orb +1 -1
  196. package/behaviors/registry/ui/game/organisms/std-arcade-board-3d.orb +20 -13
  197. package/behaviors/registry/ui/game/organisms/std-crew-board-2d.orb +9 -5
  198. package/behaviors/registry/ui/game/organisms/std-dungeon-board-2d.orb +17 -7
  199. package/behaviors/registry/ui/game/organisms/std-market-board-3d.orb +19 -15
  200. package/behaviors/registry/ui/game/organisms/std-objective-board-3d.orb +15 -12
  201. package/behaviors/registry/ui/game/organisms/std-platformer-board-2d.orb +17 -7
  202. package/behaviors/registry/ui/game/organisms/std-platformer-puzzle.orb +4 -0
  203. package/behaviors/registry/ui/game/organisms/std-survival-board-3d.orb +15 -12
  204. package/behaviors/registry/ui/game/organisms/std-tactics-board-2d.orb +13 -6
  205. package/behaviors/registry/ui/game/organisms/std-tactics-board-3d.orb +14 -12
  206. package/canonical-operators.json +1426 -103
  207. package/dist/{chunk-EK22WRB6.js → chunk-2UGHBVU2.js} +2 -2
  208. package/dist/{chunk-GDMH5T4J.js → chunk-3DK7GI2C.js} +2 -2
  209. package/dist/chunk-3MDASC5C.js +26 -0
  210. package/dist/{chunk-K5ZI27PB.js → chunk-3PHO4RRF.js} +1 -1
  211. package/dist/{chunk-7IEMMYM6.js → chunk-4MJCLAZW.js} +1 -1
  212. package/dist/{chunk-W4IEV4BY.js → chunk-55JPIL7A.js} +2 -2
  213. package/dist/{chunk-RUGBZTV3.js → chunk-66BLZLFI.js} +1 -1
  214. package/dist/{chunk-YWFISV7L.js → chunk-66RAJFOD.js} +1 -1
  215. package/dist/{chunk-JWOWWGNZ.js → chunk-6ED4SUC6.js} +1 -1
  216. package/dist/{chunk-LL7P6EII.js → chunk-6KFCHNE2.js} +2 -2
  217. package/dist/{chunk-GFBL2TW6.js → chunk-A4QB3Y6L.js} +1 -1
  218. package/dist/chunk-BVWMLS32.js +123 -0
  219. package/dist/{chunk-5KQCGSNC.js → chunk-CRKVDCY7.js} +1 -1
  220. package/dist/{chunk-WHQDLLC3.js → chunk-EKWEY4OJ.js} +1 -1
  221. package/dist/{chunk-Y3BRVNYK.js → chunk-EU22GCGV.js} +2 -2
  222. package/dist/{chunk-XQPYTDZ4.js → chunk-FB6PKNRS.js} +1 -1
  223. package/dist/{chunk-UX3MDFX6.js → chunk-FSVOJQLP.js} +1 -1
  224. package/dist/{chunk-LDBD2FBQ.js → chunk-GAKLBWBR.js} +1 -1
  225. package/dist/{chunk-C3IEMPRZ.js → chunk-GO3FKBV2.js} +2 -2
  226. package/dist/{chunk-LZSPEHSM.js → chunk-GPDTJHYY.js} +1 -1
  227. package/dist/{chunk-W5ABMOXU.js → chunk-JQBWLH5V.js} +1 -1
  228. package/dist/{chunk-63X6RNY6.js → chunk-KKW3JHTC.js} +1 -1
  229. package/dist/{chunk-5PLJE42Q.js → chunk-LF2EZVAM.js} +1 -1
  230. package/dist/{chunk-RXWBYWQB.js → chunk-LGCKOZP3.js} +2 -2
  231. package/dist/{chunk-JJEADYP7.js → chunk-LMZ6XJFB.js} +2 -2
  232. package/dist/{chunk-CWYSQZJU.js → chunk-M2YQNSAZ.js} +2 -2
  233. package/dist/{chunk-GNCKJV3P.js → chunk-MKWHYBIS.js} +1 -1
  234. package/dist/{chunk-ZB2CLGEG.js → chunk-MXBGYTYF.js} +1 -1
  235. package/dist/{chunk-UN76TRSK.js → chunk-NH6MXHZR.js} +41 -41
  236. package/dist/{chunk-II2VW7T6.js → chunk-ODBIX4DB.js} +1 -1
  237. package/dist/{chunk-3F3CNWOG.js → chunk-OYDQR6DT.js} +2 -2
  238. package/dist/{chunk-FVL6BT6L.js → chunk-PD6POR44.js} +1 -1
  239. package/dist/{chunk-U6USXZ5M.js → chunk-PHFT3QNS.js} +2 -2
  240. package/dist/{chunk-RJYKIZMS.js → chunk-PQZ6PVKG.js} +2 -2
  241. package/dist/{chunk-TQPQXCSZ.js → chunk-Q6NHXIOZ.js} +2 -2
  242. package/dist/{chunk-KYGWVCTM.js → chunk-QMDVYTB7.js} +1 -1
  243. package/dist/{chunk-XKTATY45.js → chunk-RW2KMSG5.js} +4 -4
  244. package/dist/{chunk-UHNSPTFT.js → chunk-SA2ZS24W.js} +1 -1
  245. package/dist/{chunk-6YPUQK36.js → chunk-SFWP4UMK.js} +2 -2
  246. package/dist/{chunk-ZZYLFHBU.js → chunk-TLNEQA4D.js} +1 -1
  247. package/dist/{chunk-RGTBRWWA.js → chunk-TOODE5AD.js} +2 -2
  248. package/dist/{chunk-QGWAHOFR.js → chunk-U57GY7SM.js} +2 -2
  249. package/dist/{chunk-FDJZKB7J.js → chunk-UIDQQJSX.js} +1 -1
  250. package/dist/{chunk-LLH3WXM3.js → chunk-UVFP2B7I.js} +1 -1
  251. package/dist/{chunk-4OF7727E.js → chunk-VEGZPCTZ.js} +2 -2
  252. package/dist/{chunk-73YUPNIT.js → chunk-VXN4V7LC.js} +1 -1
  253. package/dist/{chunk-4D3W6AAE.js → chunk-YHQVZWPG.js} +1 -1
  254. package/dist/{chunk-XXYBHYLM.js → chunk-YQO3TO66.js} +2 -2
  255. package/dist/{chunk-YZAYFR5A.js → chunk-ZSJ3GEOJ.js} +1 -1
  256. package/dist/index.d.ts +3 -3
  257. package/dist/index.js +50 -50
  258. package/dist/modules/anim.js +2 -2
  259. package/dist/modules/array.js +2 -2
  260. package/dist/modules/auth.js +3 -3
  261. package/dist/modules/behavior.js +2 -2
  262. package/dist/modules/bit.js +2 -2
  263. package/dist/modules/browser.js +2 -2
  264. package/dist/modules/bytes.js +2 -2
  265. package/dist/modules/codec.js +3 -3
  266. package/dist/modules/composition.js +2 -2
  267. package/dist/modules/core.js +2 -2
  268. package/dist/modules/csv.js +2 -2
  269. package/dist/modules/ffi.js +3 -3
  270. package/dist/modules/format.js +2 -2
  271. package/dist/modules/geo.js +2 -2
  272. package/dist/modules/gpu.d.ts +12 -0
  273. package/dist/modules/gpu.js +3 -0
  274. package/dist/modules/grid.js +2 -2
  275. package/dist/modules/i18n.js +2 -2
  276. package/dist/modules/index.d.ts +1 -2
  277. package/dist/modules/index.js +45 -46
  278. package/dist/modules/json.js +2 -2
  279. package/dist/modules/kernel.js +3 -3
  280. package/dist/modules/kv.js +3 -3
  281. package/dist/modules/llm.js +2 -2
  282. package/dist/modules/math.js +2 -2
  283. package/dist/modules/mem.js +3 -3
  284. package/dist/modules/object.js +2 -2
  285. package/dist/modules/os-common.d.ts +1 -1
  286. package/dist/modules/os-common.js +2 -2
  287. package/dist/modules/os-desktop.js +3 -3
  288. package/dist/modules/os-dev.js +3 -3
  289. package/dist/modules/os-dir.js +3 -3
  290. package/dist/modules/os-env-stdio.js +3 -3
  291. package/dist/modules/os-fs.js +3 -3
  292. package/dist/modules/os-net.js +3 -3
  293. package/dist/modules/os-path.js +3 -3
  294. package/dist/modules/os-process.js +3 -3
  295. package/dist/modules/os-sys.js +3 -3
  296. package/dist/modules/os-time-users.js +3 -3
  297. package/dist/modules/os.js +13 -13
  298. package/dist/modules/path.js +2 -2
  299. package/dist/modules/prob.js +2 -2
  300. package/dist/modules/program.js +2 -2
  301. package/dist/modules/session.js +2 -2
  302. package/dist/modules/str.js +2 -2
  303. package/dist/modules/time.js +2 -2
  304. package/dist/modules/validate.js +2 -2
  305. package/dist/modules/vector.js +2 -2
  306. package/dist/modules/workspace.js +2 -2
  307. package/dist/modules/xml.js +2 -2
  308. package/dist/modules/yaml.js +2 -2
  309. package/dist/registry.d.ts +2 -2
  310. package/dist/registry.js +49 -49
  311. package/dist/{types-BA4LkhNJ.d.ts → types-CgiGhK6t.d.ts} +17 -3
  312. package/package.json +5 -5
  313. package/dist/chunk-F5TP25JA.js +0 -26
  314. package/dist/chunk-NE4WSTN7.js +0 -26
  315. package/dist/modules/trace.d.ts +0 -15
  316. package/dist/modules/trace.js +0 -2
  317. /package/dist/{chunk-SHSBTDDX.js → chunk-QUQ33UXH.js} +0 -0
@@ -9,6 +9,7 @@ uses Spec from "almadar-std/lolo-source"
9
9
  type SrcExpr = string | number | boolean | [SrcExpr?] | Map string SrcExpr?
10
10
  type SrcJob = [SrcExpr?]
11
11
  type SrcList = [SrcExpr]
12
+ type SrcMap = Map string SrcExpr?
12
13
  type SrcLists = [SrcList]
13
14
  type SrcVars = Map string string
14
15
  type SrcRef = { type : string! }
@@ -19,14 +20,18 @@ type SrcTransition = { from : string!, to : string!, event : string!, guard : Sr
19
20
  type SrcEvent = { key : string!, payloadSchema : [SrcField]? }
20
21
  type SrcMachine = { states : [SrcState]!, transitions : [SrcTransition]!, events : [SrcEvent]? }
21
22
  type SrcEmitDecl = { event : string!, payloadSchema : [SrcField]? }
22
- type SrcTraitDecl = { name : string!, linkedEntity : string?, config : Map string SrcKnobDecl?, emits : [SrcEmitDecl]?, stateMachine : SrcMachine? }
23
+ type SrcListenSource = { kind : string!, trait : string?, orbital : string? }
24
+ type SrcListenDecl = { event : string!, triggers : string?, source : SrcListenSource?, guard : SrcExpr?, payloadMapping : SrcExpr? }
25
+ type SrcTraitDecl = { name : string!, ref : string?, linkedEntity : string?, config : Map string SrcKnobDecl?, emits : [SrcEmitDecl]?, stateMachine : SrcMachine?, listens : [SrcListenDecl]? }
26
+ type SrcListenRow = { source : string!, event : string!, trigger : string!, guard : SrcExpr?, map : SrcExpr? }
23
27
  type SrcEntityDecl = { name : string!, fields : [SrcField]! }
24
28
  type SrcOrbital = { name : string!, entity : SrcEntityDecl?, traits : [SrcTraitDecl]! }
25
29
  type SrcProgram = { types : Map string [SrcField]?, orbitals : [SrcOrbital]! }
26
- type SrcInspect = { authoredProgram : SrcProgram!, types : Map string string!, expected : Map string string!, models : Map string [string]! }
30
+ type SrcResolved = { program : SrcProgram! }
31
+ type SrcInspect = { program : SrcProgram!, authoredProgram : SrcProgram!, types : Map string string!, expected : Map string string!, models : Map string [string]! }
27
32
  type SrcContainer = { name : string!, alias : boolean!, fields : [SrcField]! }
28
33
  type SrcKnob = { key : string!, default : SrcExpr? }
29
- type SrcTraitInfo = { name : string!, path : string!, entity : string!, initial : string!, hasMachine : boolean!, knobs : [SrcKnob]!, transitions : [SrcTransition]!, events : [string]!, listenTypes : Map string string!, emitTypes : Map string string!, emitVoid : [string]!, configType : string! }
34
+ type SrcTraitInfo = { name : string!, path : string!, entity : string!, initial : string!, hasMachine : boolean!, knobs : [SrcKnob]!, transitions : [SrcTransition]!, events : [string]!, listenTypes : Map string string!, emitTypes : Map string string!, emitVoid : [string]!, configType : string!, orbital : string!, listenRows : [SrcListenRow]! }
30
35
  type SrcCtx = { emitTypes : Map string string!, emitVoid : [string]!, defaults : Map string string! }
31
36
  type SrcRender = { expr : string!, stmt : [string]!, params : [string]!, body : string!, items : [string]!, keys : [string]!, stmts : [[string]]!, pairVals : [string]!, warns : [string]!, uses : [string]! }
32
37
  type SrcTypeRender = { text : string!, uses : [string]! }
@@ -143,6 +148,30 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
143
148
  @label "Port name case"
144
149
  @description "keep, lower, upper, camel or pascal (each word lowercased first), or split-camel or split-pascal (the shell models' identifier spelling: split on _ and -, each word's tail kept), or lower-camel (split-pascal with its first letter lowered)"
145
150
  @tier "domain"
151
+ routedEffects : Map string string = { }
152
+ @label "Routed effects"
153
+ @description "Template per port effect answered through its emit routes, which the trait completes in the same dispatch: {{args}} its arguments without the options object ({{0}}, {{1}}, {{2}} one by one), {{entity}} the quoted entity name, {{model}} the entity's model name, {{filter}} the fetch filter as a lambda over one row (fetchAll when the fetch has none), {{success}} and {{failure}} the quoted route events (nullLit when absent). Its helpers and imports are under the token store"
154
+ @tier "domain"
155
+ rowLocal : string = "fetchRow"
156
+ @label "Fetch row local"
157
+ @description "The parameter of a fetch filter's lambda, in localCase: the filter's @entity reads the candidate row through it"
158
+ @tier "domain"
159
+ fetchAll : string = ""
160
+ @label "Fetch all"
161
+ @description "The filter written for a fetch with none"
162
+ @tier "domain"
163
+ routeForm : string = "{{route}}"
164
+ @label "Route form"
165
+ @description "A routed effect's present route event ({{route}} the quoted event); an absent route is nullLit"
166
+ @tier "domain"
167
+ filterForm : string = "{{lambda}}"
168
+ @label "Filter form"
169
+ @description "A fetch filter that is present, {{lambda}} the filter as a lambda over one row"
170
+ @tier "domain"
171
+ completeMethod : [string] = []
172
+ @label "Complete method"
173
+ @description "Lines of the method a trait with a routed effect completes it by: it records the answer's route (success or failure) as a completion emit, and nothing when that route is absent"
174
+ @tier "domain"
146
175
  portWarn : string = "{{op}} is called on the ports object"
147
176
  @label "Port warning"
148
177
  @description "The warning written for each port effect"
@@ -267,6 +296,86 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
267
296
  @label "Enum member case"
268
297
  @description "keep, lower, upper, camel, pascal, split-camel or split-pascal"
269
298
  @tier "domain"
299
+ programOpen : [string] = []
300
+ @label "Program open"
301
+ @description "Lines that open the generated router of a program whose traits listen to each other ({{i}} indent, {{entities}} the programEntity entries); empty renders no router"
302
+ @tier "domain"
303
+ programTrait : string = ""
304
+ @label "Program trait"
305
+ @description "One trait instance of the router: {{key}} the orbital-qualified trait, {{class}}, {{entity}}, {{n}} its position"
306
+ @tier "domain"
307
+ programStoreParam : string = ""
308
+ @label "Program store parameter"
309
+ @description "programOpen's {{store}} when a trait of the program has a routed effect (the store the Program hands those traits); empty otherwise"
310
+ @tier "domain"
311
+ programTraitStore : string = ""
312
+ @label "Program store trait"
313
+ @description "The programTrait line for a trait with a routed effect, which also hands it the store ({{key}}, {{class}}, {{entity}}, {{n}}); empty writes programTrait"
314
+ @tier "domain"
315
+ programEntity : string = ""
316
+ @label "Program entity"
317
+ @description "One entry of programOpen's {{entities}}, the row each trait starts from: {{key}}, {{entity}}, {{n}} the trait's position"
318
+ @tier "domain"
319
+ programEntitySep : string = ", "
320
+ @label "Program entity separator"
321
+ @description "Between the entries of {{entities}}"
322
+ @tier "domain"
323
+ programHandles : string = ""
324
+ @label "Program handles"
325
+ @description "The events a trait handles per state: {{key}}, {{table}} (a map literal of state to event list)"
326
+ @tier "domain"
327
+ programRow : string = ""
328
+ @label "Program row"
329
+ @description "One listen route in registration order: {{source}}, {{event}}, {{target}}, {{trigger}}, {{guard}} and {{map}} (a function name, or the null literal)"
330
+ @tier "domain"
331
+ deliverOpen : [string] = []
332
+ @label "Deliver open"
333
+ @description "Lines that open the router's typed delivery to a trait method"
334
+ @tier "domain"
335
+ deliverCase : string = ""
336
+ @label "Deliver case"
337
+ @description "One delivery of an event with a payload: {{target}}, {{class}} (the trait's class), {{event}}, {{method}}, {{arg}} (the decoded payload)"
338
+ @tier "domain"
339
+ deliverCasePlain : string = ""
340
+ @label "Deliver case (no payload)"
341
+ @description "One delivery of an event with no payload: {{target}}, {{class}}, {{event}}, {{method}}"
342
+ @tier "domain"
343
+ deliverClose : [string] = []
344
+ @label "Deliver close"
345
+ @description "Lines that close the delivery"
346
+ @tier "domain"
347
+ programClose : [string] = []
348
+ @label "Program close"
349
+ @description "Lines that close the router"
350
+ @tier "domain"
351
+ payloadDecode : string = ""
352
+ @label "Payload decode"
353
+ @description "A payload model read from a router value: {{type}}, {{value}}"
354
+ @tier "domain"
355
+ guardForm : [string] = []
356
+ @label "Listen guard"
357
+ @description "A listen guard as a function of the raw source payload: {{name}}, {{decode}}, {{expr}}"
358
+ @tier "domain"
359
+ mapForm : [string] = []
360
+ @label "Listen mapping"
361
+ @description "A listen's with mapping as a function of the source payload: {{name}}, {{decode}}, {{expr}}"
362
+ @tier "domain"
363
+ guardName : string = "_guard_{{n}}"
364
+ @label "Guard name"
365
+ @description "The function of listen route {{n}}'s guard"
366
+ @tier "domain"
367
+ mapName : string = "_map_{{n}}"
368
+ @label "Mapping name"
369
+ @description "The function of listen route {{n}}'s mapping"
370
+ @tier "domain"
371
+ guardRef : string = "{{name}}"
372
+ @label "Guard reference"
373
+ @description "A route's guard as programRow passes it: {{name}} the function (a route with no guard passes the null literal)"
374
+ @tier "domain"
375
+ mapRef : string = "{{name}}"
376
+ @label "Mapping reference"
377
+ @description "A route's mapping as programRow passes it: {{name}} the function (a route with no mapping passes the null literal)"
378
+ @tier "domain"
270
379
  fieldNames : Map string string = { }
271
380
  @label "Field names"
272
381
  @description "Model field spellings that differ from fieldCase (a target keyword the shell renames): .lolo field name to model field name"
@@ -409,7 +518,7 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
409
518
  @tier "domain"
410
519
  constructor : [string] = []
411
520
  @label "Constructor"
412
- @description "Lines of the constructor and fields: {{i}} indent, {{class}}, {{entity}}, {{initial}} quoted, {{config}} the config map literal, {{configType}} the trait's config type (configType)"
521
+ @description "Lines of the constructor and fields: {{i}} indent, {{class}}, {{entity}}, {{initial}} quoted, {{config}} the config map literal, {{configType}} the trait's config type (configType); a line starting {{withStore}} is written only for a trait with a routed effect and one starting {{noStore}} only for one without"
413
522
  @tier "domain"
414
523
  emitMethod : [string] = []
415
524
  @label "Emit method"
@@ -579,11 +688,18 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
579
688
  (emit SOURCE_RENDER_FAILED { error: "a render is already in progress" })
580
689
  LOLO_READ_FAILED -> ready
581
690
  (emit SOURCE_RENDER_FAILED { error: (default @payload.error "the source could not be read") })
582
- LOLO_READ -> rendering
691
+ LOLO_READ -> rendering when (not (array/some (object/get @payload.result "orbitals") (fn co (array/some (object/get @co "traits") (fn ct (!= (object/get @ct "ref" null) null))))))
583
692
  (set @entity.program @payload.result)
584
693
  (emit SRC_PREPARE { })
694
+ LOLO_READ -> reading when (and (array/some (object/get @payload.result "orbitals") (fn co (array/some (object/get @co "traits") (fn ct (!= (object/get @ct "ref" null) null))))) (!= @entity.path ""))
695
+ (program/read @entity.source { resolve: true, text: false, path: @entity.path } { emit: { success: LOLO_RESOLVED, failure: LOLO_READ_FAILED } })
696
+ LOLO_READ -> ready when (and (array/some (object/get @payload.result "orbitals") (fn co (array/some (object/get @co "traits") (fn ct (!= (object/get @ct "ref" null) null))))) (= @entity.path ""))
697
+ (emit SOURCE_RENDER_FAILED { error: "a program that composes behaviors renders from its composed program, which needs the source's absolute path" })
698
+ LOLO_RESOLVED -> rendering
699
+ (set @entity.program @payload.result.program)
700
+ (emit SRC_PREPARE { })
585
701
  LOLO_INSPECTED -> rendering
586
- (set @entity.program @payload.result.authoredProgram)
702
+ (set @entity.program (if (array/some (object/get @payload.result.authoredProgram "orbitals") (fn co (array/some (object/get @co "traits") (fn ct (!= (object/get @ct "ref" null) null))))) @payload.result.program @payload.result.authoredProgram))
587
703
  (set @entity.types @payload.result.types)
588
704
  (set @entity.expected @payload.result.expected)
589
705
  (set @entity.models @payload.result.models)
@@ -623,13 +739,17 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
623
739
  events: (array/unique (array/map (object/get @machine "transitions") (fn tr (object/get @tr "event")))),
624
740
  listenTypes: (object/fromEntries (array/map (array/filter @evs (fn ev (> (array/len (default (object/get @ev "payloadSchema") [])) 0))) (fn ev [(object/get @ev "key") (let ((v9 : SrcVars (object/fromEntries [["trait" @tn] ["event" (let ((cb3 (str/replace-pattern (str/replaceAll (object/get @ev "key") "-" "_") "[.]" "_"))) (let ((cw4 (array/filter (str/split (str/lower @cb3) "_") (fn cx5 (!= @cx5 ""))))) (if (= "keep" "lower") (str/lower @cb3) (if (= "keep" "upper") (str/upper @cb3) (if (= "keep" "camel") (str/concat (default (array/first @cw4) "") (str/join (array/map (array/drop @cw4 1) (fn cy6 (str/capitalize @cy6))) "")) (if (= "keep" "pascal") (str/join (array/map @cw4 (fn cy6 (str/capitalize @cy6))) "") (let ((ck7 (str/split @cb3 "_"))) (if (= "keep" "split-camel") (str/concat (default (array/first @ck7) "") (str/join (array/map (array/drop @ck7 1) (fn cy6 (str/concat (str/upper (str/slice @cy6 0 1)) (str/slice @cy6 1 (str/len @cy6))))) "")) (if (= "keep" "split-pascal") (str/join (array/map @ck7 (fn cy6 (str/concat (str/upper (str/slice @cy6 0 1)) (str/slice @cy6 1 (str/len @cy6))))) "") (if (= "keep" "lower-camel") (let ((cl8 (str/join (array/map @ck7 (fn cy6 (str/concat (str/upper (str/slice @cy6 0 1)) (str/slice @cy6 1 (str/len @cy6))))) ""))) (str/concat (str/lower (str/slice @cl8 0 1)) (str/slice @cl8 1 (str/len @cl8)))) @cb3))))))))))]]))) (let ((f10p (str/split @config.payloadType "{{"))) (str/concat (default (array/first @f10p) "") (str/join (array/map (array/drop @f10p 1) (fn f10q (let ((f10r (str/split @f10q "}}"))) (if (< (array/len @f10r) 2) (str/concat "{{" @f10q) (str/concat (object/get @v9 (default (array/first @f10r) "") (str/concat "{{" (default (array/first @f10r) "") "}}")) (str/join (array/drop @f10r 1) "}}")))))) ""))))]))),
625
741
  emitTypes: (object/fromEntries (array/map (array/filter @ems (fn ev (> (array/len (default (object/get @ev "payloadSchema") [])) 0))) (fn ev [(object/get @ev "event") (let ((v17 : SrcVars (object/fromEntries [["trait" @tn] ["event" (let ((cb11 (str/replace-pattern (str/replaceAll (object/get @ev "event") "-" "_") "[.]" "_"))) (let ((cw12 (array/filter (str/split (str/lower @cb11) "_") (fn cx13 (!= @cx13 ""))))) (if (= "keep" "lower") (str/lower @cb11) (if (= "keep" "upper") (str/upper @cb11) (if (= "keep" "camel") (str/concat (default (array/first @cw12) "") (str/join (array/map (array/drop @cw12 1) (fn cy14 (str/capitalize @cy14))) "")) (if (= "keep" "pascal") (str/join (array/map @cw12 (fn cy14 (str/capitalize @cy14))) "") (let ((ck15 (str/split @cb11 "_"))) (if (= "keep" "split-camel") (str/concat (default (array/first @ck15) "") (str/join (array/map (array/drop @ck15 1) (fn cy14 (str/concat (str/upper (str/slice @cy14 0 1)) (str/slice @cy14 1 (str/len @cy14))))) "")) (if (= "keep" "split-pascal") (str/join (array/map @ck15 (fn cy14 (str/concat (str/upper (str/slice @cy14 0 1)) (str/slice @cy14 1 (str/len @cy14))))) "") (if (= "keep" "lower-camel") (let ((cl16 (str/join (array/map @ck15 (fn cy14 (str/concat (str/upper (str/slice @cy14 0 1)) (str/slice @cy14 1 (str/len @cy14))))) ""))) (str/concat (str/lower (str/slice @cl16 0 1)) (str/slice @cl16 1 (str/len @cl16)))) @cb11))))))))))]]))) (let ((f18p (str/split @config.payloadType "{{"))) (str/concat (default (array/first @f18p) "") (str/join (array/map (array/drop @f18p 1) (fn f18q (let ((f18r (str/split @f18q "}}"))) (if (< (array/len @f18r) 2) (str/concat "{{" @f18q) (str/concat (object/get @v17 (default (array/first @f18r) "") (str/concat "{{" (default (array/first @f18r) "") "}}")) (str/join (array/drop @f18r 1) "}}")))))) ""))))])))
626
- emitVoid: (array/map (array/filter @ems (fn ev (= (array/len (default (object/get @ev "payloadSchema") [])) 0))) (fn ev (object/get @ev "event"))) }))))))))))
742
+ emitVoid: (array/map (array/filter @ems (fn ev (= (array/len (default (object/get @ev "payloadSchema") [])) 0))) (fn ev (object/get @ev "event")))
743
+ orbital: (object/get @o "name")
744
+ listenRows: (array/map (array/filter (default (object/get @t "listens") []) (fn l (= (object/get (default (object/get @l "source") { kind: "" }) "kind") "trait")))
745
+ (fn l { source: (default (object/get (default (object/get @l "source") { kind: "" }) "trait") ""), event: (object/get @l "event"), trigger: (default (object/get @l "triggers") (object/get @l "event")), guard: (object/get @l "guard" null), map: (object/get @l "payloadMapping" null) })) }))))))))))
627
746
  (set @entity.groups (array/concat
628
747
  (if @config.renderModels (array/map @entity.containers (fn c (array/map (object/get @c "fields") (fn f [0, (object/get @f "default" null)])))) [])
629
748
  (array/map @entity.traits (fn t
630
749
  (array/concat
631
750
  [(array/concat [0] (array/map (object/get @t "knobs") (fn kb (object/get @kb "default" null))))]
632
- (array/map (object/get @t "transitions") (fn tr (array/concat [0, (if (!= (object/get @tr "guard" null) null) (object/get @tr "guard") true)] (default (object/get @tr "effects" []) [])))))))))
751
+ (array/map (object/get @t "transitions") (fn tr (array/concat [0, (if (!= (object/get @tr "guard" null) null) (object/get @tr "guard") true)] (default (object/get @tr "effects" []) []))))
752
+ (array/map (object/get @t "listenRows") (fn lr [0, (if (!= (object/get @lr "guard" null) null) (object/get @lr "guard") true), (default (object/get @lr "map" null) {})])))))))
633
753
  (set @entity.groupCtx (array/concat
634
754
  (if @config.renderModels (array/map @entity.containers (fn c { emitTypes: {}, emitVoid: [], defaults: {} })) [])
635
755
  (array/map @entity.traits (fn t
@@ -771,14 +891,34 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
771
891
  (if (and (= @ptype "") (not @void) (> (array/len @n) 2)) [(str/concat "emit " @ev " carries a payload the trait does not declare")]
772
892
  (if (and (!= @ptype "") (> (array/len @n) 2) (not @isObj)) [(str/concat "emit " @ev " passes a payload that is not an object literal, so it is not built as " @ptype)] [])))))
773
893
  (let ((call (let ((v95 : SrcVars (object/fromEntries [["event" (default (array/nth @ex 1) "")] ["payload" @pld]]))) (let ((f96p (str/split @config.emitForm "{{"))) (str/concat (default (array/first @f96p) "") (str/join (array/map (array/drop @f96p 1) (fn f96q (let ((f96r (str/split @f96q "}}"))) (if (< (array/len @f96r) 2) (str/concat "{{" @f96q) (str/concat (object/get @v95 (default (array/first @f96r) "") (str/concat "{{" (default (array/first @f96r) "") "}}")) (str/join (array/drop @f96r 1) "}}")))))) ""))))))
774
- { expr: @call, stmt: [(str/concat @call @term)], params: @none, body: "", items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws @warn), uses: @us })))))
894
+ { expr: @call, stmt: [(str/concat @call @term)], params: @none, body: "", items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws @warn), uses: (if (and (!= @ptype "") @isObj) (array/concat @us ["payload"]) @us) })))))
775
895
  (if (= @hd "render-ui")
776
896
  (let ((kind : string (let ((pr (if (> @argc 1) (array/nth @n 2) null))) (if (validate/object @pr) (let ((tv (object/get @pr "type" "ui"))) (if (validate/string @tv) @tv "ui")) "ui"))))
777
897
  { expr: @config.nullLit, stmt: [(let ((v97 : SrcVars (object/fromEntries [["text" (str/concat "render: " @kind)]]))) (let ((f98p (str/split @config.commentForm "{{"))) (str/concat (default (array/first @f98p) "") (str/join (array/map (array/drop @f98p 1) (fn f98q (let ((f98r (str/split @f98q "}}"))) (if (< (array/len @f98r) 2) (str/concat "{{" @f98q) (str/concat (object/get @v97 (default (array/first @f98r) "") (str/concat "{{" (default (array/first @f98r) "") "}}")) (str/join (array/drop @f98r 1) "}}")))))) ""))))], params: @none, body: "", items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: @ws, uses: @us })
898
+ (if (object/has @config.routedEffects @hd)
899
+ (let ((oi (if (= @hd "fetch") 2 4))
900
+ (ei (if (= @hd "fetch") 1 2)))
901
+ (let ((rawO (array/nth @n @oi))
902
+ (orR : SrcRender (default (array/nth @rs @oi) @nullR))
903
+ (ename : string (let ((ev (array/nth @n @ei))) (if (validate/string @ev) @ev ""))))
904
+ (let ((opts : SrcMap (if (validate/object @rawO) (let ((om : SrcMap @rawO)) @om) {}))
905
+ (okeys : [string] (object/get @orR "keys")))
906
+ (let ((routes : SrcMap (let ((em (object/get @opts "emit" null))) (if (validate/object @em) (let ((emm : SrcMap @em)) @emm) {})))
907
+ (fi (array/indexOf @okeys "filter")))
908
+ (let ((okT (let ((rv (object/get @routes "success" null))) (if (validate/string @rv) (let ((rvs : string @rv)) (let ((v104 : SrcVars (object/fromEntries [["route" (let ((sj99 (json/stringify @rvs))) (let ((v102 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj99 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj99 1 (- (str/len @sj99) 1)) (fn sa100 sk101 (str/replaceAll @sa100 @sk101 (object/get @config.stringEscapes @sk101 "")))) "\""))]]))) (let ((f103p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f103p) "") (str/join (array/map (array/drop @f103p 1) (fn f103q (let ((f103r (str/split @f103q "}}"))) (if (< (array/len @f103r) 2) (str/concat "{{" @f103q) (str/concat (object/get @v102 (default (array/first @f103r) "") (str/concat "{{" (default (array/first @f103r) "") "}}")) (str/join (array/drop @f103r 1) "}}")))))) "")))))]]))) (let ((f105p (str/split @config.routeForm "{{"))) (str/concat (default (array/first @f105p) "") (str/join (array/map (array/drop @f105p 1) (fn f105q (let ((f105r (str/split @f105q "}}"))) (if (< (array/len @f105r) 2) (str/concat "{{" @f105q) (str/concat (object/get @v104 (default (array/first @f105r) "") (str/concat "{{" (default (array/first @f105r) "") "}}")) (str/join (array/drop @f105r 1) "}}")))))) ""))))) @config.nullLit)))
909
+ (errT (let ((rv (object/get @routes "failure" null))) (if (validate/string @rv) (let ((rvs : string @rv)) (let ((v111 : SrcVars (object/fromEntries [["route" (let ((sj106 (json/stringify @rvs))) (let ((v109 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj106 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj106 1 (- (str/len @sj106) 1)) (fn sa107 sk108 (str/replaceAll @sa107 @sk108 (object/get @config.stringEscapes @sk108 "")))) "\""))]]))) (let ((f110p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f110p) "") (str/join (array/map (array/drop @f110p 1) (fn f110q (let ((f110r (str/split @f110q "}}"))) (if (< (array/len @f110r) 2) (str/concat "{{" @f110q) (str/concat (object/get @v109 (default (array/first @f110r) "") (str/concat "{{" (default (array/first @f110r) "") "}}")) (str/join (array/drop @f110r 1) "}}")))))) "")))))]]))) (let ((f112p (str/split @config.routeForm "{{"))) (str/concat (default (array/first @f112p) "") (str/join (array/map (array/drop @f112p 1) (fn f112q (let ((f112r (str/split @f112q "}}"))) (if (< (array/len @f112r) 2) (str/concat "{{" @f112q) (str/concat (object/get @v111 (default (array/first @f112r) "") (str/concat "{{" (default (array/first @f112r) "") "}}")) (str/join (array/drop @f112r 1) "}}")))))) ""))))) @config.nullLit)))
910
+ (filterT (if (< @fi 0) @config.fetchAll (let ((v127 : SrcVars (object/fromEntries [["lambda" (let ((v125 : SrcVars (object/fromEntries [["params" (let ((cb113 (str/replace-pattern (str/replaceAll @config.rowLocal "-" "_") "[.]" "_"))) (let ((cw114 (array/filter (str/split (str/lower @cb113) "_") (fn cx115 (!= @cx115 ""))))) (if (= @config.localCase "lower") (str/lower @cb113) (if (= @config.localCase "upper") (str/upper @cb113) (if (= @config.localCase "camel") (str/concat (default (array/first @cw114) "") (str/join (array/map (array/drop @cw114 1) (fn cy116 (str/capitalize @cy116))) "")) (if (= @config.localCase "pascal") (str/join (array/map @cw114 (fn cy116 (str/capitalize @cy116))) "") (let ((ck117 (str/split @cb113 "_"))) (if (= @config.localCase "split-camel") (str/concat (default (array/first @ck117) "") (str/join (array/map (array/drop @ck117 1) (fn cy116 (str/concat (str/upper (str/slice @cy116 0 1)) (str/slice @cy116 1 (str/len @cy116))))) "")) (if (= @config.localCase "split-pascal") (str/join (array/map @ck117 (fn cy116 (str/concat (str/upper (str/slice @cy116 0 1)) (str/slice @cy116 1 (str/len @cy116))))) "") (if (= @config.localCase "lower-camel") (let ((cl118 (str/join (array/map @ck117 (fn cy116 (str/concat (str/upper (str/slice @cy116 0 1)) (str/slice @cy116 1 (str/len @cy116))))) ""))) (str/concat (str/lower (str/slice @cl118 0 1)) (str/slice @cl118 1 (str/len @cl118)))) @cb113))))))))))] ["body" (str/replaceAll (default (array/nth (object/get @orR "items") @fi) @config.nullLit) (str/concat "\u{e00d}" (object/get @config.attributeRoots "entity" "") "\u{e00e}") (let ((cb119 (str/replace-pattern (str/replaceAll @config.rowLocal "-" "_") "[.]" "_"))) (let ((cw120 (array/filter (str/split (str/lower @cb119) "_") (fn cx121 (!= @cx121 ""))))) (if (= @config.localCase "lower") (str/lower @cb119) (if (= @config.localCase "upper") (str/upper @cb119) (if (= @config.localCase "camel") (str/concat (default (array/first @cw120) "") (str/join (array/map (array/drop @cw120 1) (fn cy122 (str/capitalize @cy122))) "")) (if (= @config.localCase "pascal") (str/join (array/map @cw120 (fn cy122 (str/capitalize @cy122))) "") (let ((ck123 (str/split @cb119 "_"))) (if (= @config.localCase "split-camel") (str/concat (default (array/first @ck123) "") (str/join (array/map (array/drop @ck123 1) (fn cy122 (str/concat (str/upper (str/slice @cy122 0 1)) (str/slice @cy122 1 (str/len @cy122))))) "")) (if (= @config.localCase "split-pascal") (str/join (array/map @ck123 (fn cy122 (str/concat (str/upper (str/slice @cy122 0 1)) (str/slice @cy122 1 (str/len @cy122))))) "") (if (= @config.localCase "lower-camel") (let ((cl124 (str/join (array/map @ck123 (fn cy122 (str/concat (str/upper (str/slice @cy122 0 1)) (str/slice @cy122 1 (str/len @cy122))))) ""))) (str/concat (str/lower (str/slice @cl124 0 1)) (str/slice @cl124 1 (str/len @cl124)))) @cb119)))))))))))]]))) (let ((f126p (str/split @config.lambdaForm "{{"))) (str/concat (default (array/first @f126p) "") (str/join (array/map (array/drop @f126p 1) (fn f126q (let ((f126r (str/split @f126q "}}"))) (if (< (array/len @f126r) 2) (str/concat "{{" @f126q) (str/concat (object/get @v125 (default (array/first @f126r) "") (str/concat "{{" (default (array/first @f126r) "") "}}")) (str/join (array/drop @f126r 1) "}}")))))) ""))))]]))) (let ((f128p (str/split @config.filterForm "{{"))) (str/concat (default (array/first @f128p) "") (str/join (array/map (array/drop @f128p 1) (fn f128q (let ((f128r (str/split @f128q "}}"))) (if (< (array/len @f128r) 2) (str/concat "{{" @f128q) (str/concat (object/get @v127 (default (array/first @f128r) "") (str/concat "{{" (default (array/first @f128r) "") "}}")) (str/join (array/drop @f128r 1) "}}")))))) ""))))))
911
+ (extra (array/filter @okeys (fn ok (not (array/includes (if (= @hd "fetch") ["emit", "filter"] ["emit"]) @ok))))))
912
+ (let ((txt (let ((v135 : SrcVars (object/fromEntries [["args" (str/join (array/slice @ex 1 (if (< @argc @oi) (+ @argc 1) @oi)) ", ")] ["0" (default (array/nth @ex 1) "")] ["1" (default (array/nth @ex 2) "")] ["2" (default (array/nth @ex 3) "")] ["entity" (let ((sj129 (json/stringify @ename))) (let ((v132 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj129 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj129 1 (- (str/len @sj129) 1)) (fn sa130 sk131 (str/replaceAll @sa130 @sk131 (object/get @config.stringEscapes @sk131 "")))) "\""))]]))) (let ((f133p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f133p) "") (str/join (array/map (array/drop @f133p 1) (fn f133q (let ((f133r (str/split @f133q "}}"))) (if (< (array/len @f133r) 2) (str/concat "{{" @f133q) (str/concat (object/get @v132 (default (array/first @f133r) "") (str/concat "{{" (default (array/first @f133r) "") "}}")) (str/join (array/drop @f133r 1) "}}")))))) "")))))] ["model" (let ((en134 @ename)) (object/get @config.entityNames @en134 @en134))] ["filter" @filterT] ["success" @okT] ["failure" @errT]]))) (let ((f136p (str/split (object/get @config.routedEffects @hd "") "{{"))) (str/concat (default (array/first @f136p) "") (str/join (array/map (array/drop @f136p 1) (fn f136q (let ((f136r (str/split @f136q "}}"))) (if (< (array/len @f136r) 2) (str/concat "{{" @f136q) (str/concat (object/get @v135 (default (array/first @f136r) "") (str/concat "{{" (default (array/first @f136r) "") "}}")) (str/join (array/drop @f136r 1) "}}")))))) "")))))
913
+ (warn (array/concat
914
+ (if (validate/object @rawO) [] [(str/concat @hd " has no options object with emit routes, so its answer reaches no event")])
915
+ (if (and (= @hd "persist") (not (let ((pop (array/nth @n 1))) (if (validate/string @pop) (let ((pops : string @pop)) (array/includes ["create", "update", "delete"] @pops)) false)))) ["persist has an operation the native store does not answer (create, update and delete are rendered)"] [])
916
+ (array/map @extra (fn ok (str/concat @hd " option " @ok " is not rendered natively"))))))
917
+ { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @ex, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws @warn), uses: (array/concat @us ["store"]) }))))))
778
918
  (if (array/includes @config.portEffects @hd)
779
919
  (let ((args (array/drop @ex 1)))
780
- (let ((txt (let ((v105 : SrcVars (object/fromEntries [["name" (let ((cb99 (str/replace-pattern (str/replaceAll @hd "-" "_") "[.]" "_"))) (let ((cw100 (array/filter (str/split (str/lower @cb99) "_") (fn cx101 (!= @cx101 ""))))) (if (= @config.portCase "lower") (str/lower @cb99) (if (= @config.portCase "upper") (str/upper @cb99) (if (= @config.portCase "camel") (str/concat (default (array/first @cw100) "") (str/join (array/map (array/drop @cw100 1) (fn cy102 (str/capitalize @cy102))) "")) (if (= @config.portCase "pascal") (str/join (array/map @cw100 (fn cy102 (str/capitalize @cy102))) "") (let ((ck103 (str/split @cb99 "_"))) (if (= @config.portCase "split-camel") (str/concat (default (array/first @ck103) "") (str/join (array/map (array/drop @ck103 1) (fn cy102 (str/concat (str/upper (str/slice @cy102 0 1)) (str/slice @cy102 1 (str/len @cy102))))) "")) (if (= @config.portCase "split-pascal") (str/join (array/map @ck103 (fn cy102 (str/concat (str/upper (str/slice @cy102 0 1)) (str/slice @cy102 1 (str/len @cy102))))) "") (if (= @config.portCase "lower-camel") (let ((cl104 (str/join (array/map @ck103 (fn cy102 (str/concat (str/upper (str/slice @cy102 0 1)) (str/slice @cy102 1 (str/len @cy102))))) ""))) (str/concat (str/lower (str/slice @cl104 0 1)) (str/slice @cl104 1 (str/len @cl104)))) @cb99))))))))))] ["*" (str/join @args ", ")]]))) (let ((f106p (str/split @config.portCall "{{"))) (str/concat (default (array/first @f106p) "") (str/join (array/map (array/drop @f106p 1) (fn f106q (let ((f106r (str/split @f106q "}}"))) (if (< (array/len @f106r) 2) (str/concat "{{" @f106q) (str/concat (object/get @v105 (default (array/first @f106r) "") (str/concat "{{" (default (array/first @f106r) "") "}}")) (str/join (array/drop @f106r 1) "}}")))))) ""))))))
781
- { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @ex, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws [(let ((v107 : SrcVars (object/fromEntries [["op" @hd]]))) (let ((f108p (str/split @config.portWarn "{{"))) (str/concat (default (array/first @f108p) "") (str/join (array/map (array/drop @f108p 1) (fn f108q (let ((f108r (str/split @f108q "}}"))) (if (< (array/len @f108r) 2) (str/concat "{{" @f108q) (str/concat (object/get @v107 (default (array/first @f108r) "") (str/concat "{{" (default (array/first @f108r) "") "}}")) (str/join (array/drop @f108r 1) "}}")))))) ""))))]), uses: @us }))
920
+ (let ((txt (let ((v143 : SrcVars (object/fromEntries [["name" (let ((cb137 (str/replace-pattern (str/replaceAll @hd "-" "_") "[.]" "_"))) (let ((cw138 (array/filter (str/split (str/lower @cb137) "_") (fn cx139 (!= @cx139 ""))))) (if (= @config.portCase "lower") (str/lower @cb137) (if (= @config.portCase "upper") (str/upper @cb137) (if (= @config.portCase "camel") (str/concat (default (array/first @cw138) "") (str/join (array/map (array/drop @cw138 1) (fn cy140 (str/capitalize @cy140))) "")) (if (= @config.portCase "pascal") (str/join (array/map @cw138 (fn cy140 (str/capitalize @cy140))) "") (let ((ck141 (str/split @cb137 "_"))) (if (= @config.portCase "split-camel") (str/concat (default (array/first @ck141) "") (str/join (array/map (array/drop @ck141 1) (fn cy140 (str/concat (str/upper (str/slice @cy140 0 1)) (str/slice @cy140 1 (str/len @cy140))))) "")) (if (= @config.portCase "split-pascal") (str/join (array/map @ck141 (fn cy140 (str/concat (str/upper (str/slice @cy140 0 1)) (str/slice @cy140 1 (str/len @cy140))))) "") (if (= @config.portCase "lower-camel") (let ((cl142 (str/join (array/map @ck141 (fn cy140 (str/concat (str/upper (str/slice @cy140 0 1)) (str/slice @cy140 1 (str/len @cy140))))) ""))) (str/concat (str/lower (str/slice @cl142 0 1)) (str/slice @cl142 1 (str/len @cl142)))) @cb137))))))))))] ["*" (str/join @args ", ")]]))) (let ((f144p (str/split @config.portCall "{{"))) (str/concat (default (array/first @f144p) "") (str/join (array/map (array/drop @f144p 1) (fn f144q (let ((f144r (str/split @f144q "}}"))) (if (< (array/len @f144r) 2) (str/concat "{{" @f144q) (str/concat (object/get @v143 (default (array/first @f144r) "") (str/concat "{{" (default (array/first @f144r) "") "}}")) (str/join (array/drop @f144r 1) "}}")))))) ""))))))
921
+ { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @ex, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws [(let ((v145 : SrcVars (object/fromEntries [["op" @hd]]))) (let ((f146p (str/split @config.portWarn "{{"))) (str/concat (default (array/first @f146p) "") (str/join (array/map (array/drop @f146p 1) (fn f146q (let ((f146r (str/split @f146q "}}"))) (if (< (array/len @f146r) 2) (str/concat "{{" @f146q) (str/concat (object/get @v145 (default (array/first @f146r) "") (str/concat "{{" (default (array/first @f146r) "") "}}")) (str/join (array/drop @f146r 1) "}}")))))) ""))))]), uses: @us }))
782
922
  (let ((args (array/drop @ex 1))
783
923
  (tmplU (if (= @argc 1) (object/get @config.unary @hd "") ""))
784
924
  (sym (if (> @argc 1) (object/get @config.infix @hd "") ""))
@@ -796,21 +936,21 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
796
936
  (array/map (array/range 0 @argc) (fn i [(str/concat "" @i) (default (array/nth @args @i) "")]))
797
937
  (array/map (array/range 0 @argc) (fn i [(str/concat "type" @i) (str/concat "" (if (or (= @hd "let") (= @hd "fn")) (str/concat ".body[" (- (+ @i 1) 2) "]") (if (= @hd "if") (if (= (+ @i 1) 2) ".then" (if (= (+ @i 1) 3) ".else" (str/concat "[" (+ @i 1) "]"))) (str/concat "[" (+ @i 1) "]"))) "")]))
798
938
  [["*" @joined] ["type" ""]])))
799
- (vs (if (> (array/len @fnVars) 1) (let ((v109 : SrcVars (object/fromEntries [["index" (default (array/nth @fnVars 1) "_")] ["item" (default (array/nth @fnVars 0) "_")]]))) (let ((f110p (str/split @config.indexedVars "{{"))) (str/concat (default (array/first @f110p) "") (str/join (array/map (array/drop @f110p 1) (fn f110q (let ((f110r (str/split @f110q "}}"))) (if (< (array/len @f110r) 2) (str/concat "{{" @f110q) (str/concat (object/get @v109 (default (array/first @f110r) "") (str/concat "{{" (default (array/first @f110r) "") "}}")) (str/join (array/drop @f110r 1) "}}")))))) "")))) (default (array/nth @fnVars 0) "_")))
800
- (src (if (> (array/len @fnVars) 1) (let ((v111 : SrcVars (object/fromEntries [["src" (default (array/nth @args 0) "")]]))) (let ((f112p (str/split @config.indexedSource "{{"))) (str/concat (default (array/first @f112p) "") (str/join (array/map (array/drop @f112p 1) (fn f112q (let ((f112r (str/split @f112q "}}"))) (if (< (array/len @f112r) 2) (str/concat "{{" @f112q) (str/concat (object/get @v111 (default (array/first @f112r) "") (str/concat "{{" (default (array/first @f112r) "") "}}")) (str/join (array/drop @f112r 1) "}}")))))) "")))) (default (array/nth @args 0) ""))))
801
- (let ((txt (if (= @mode "lambda") (let ((v113 : SrcVars (object/fromEntries [["body" (object/get @fnArg "body")] ["vars" @vs] ["src" @src] ["item" (default (array/nth @fnVars 0) "_")]]))) (let ((f114p (str/split @lamT "{{"))) (str/concat (default (array/first @f114p) "") (str/join (array/map (array/drop @f114p 1) (fn f114q (let ((f114r (str/split @f114q "}}"))) (if (< (array/len @f114r) 2) (str/concat "{{" @f114q) (str/concat (object/get @v113 (default (array/first @f114r) "") (str/concat "{{" (default (array/first @f114r) "") "}}")) (str/join (array/drop @f114r 1) "}}")))))) ""))))
802
- (if (= @mode "infix") (let ((v115 : SrcVars (object/fromEntries [["*" (str/join @args (str/concat " " @sym " "))]]))) (let ((f116p (str/split @config.infixForm "{{"))) (str/concat (default (array/first @f116p) "") (str/join (array/map (array/drop @f116p 1) (fn f116q (let ((f116r (str/split @f116q "}}"))) (if (< (array/len @f116r) 2) (str/concat "{{" @f116q) (str/concat (object/get @v115 (default (array/first @f116r) "") (str/concat "{{" (default (array/first @f116r) "") "}}")) (str/join (array/drop @f116r 1) "}}")))))) ""))))
803
- (if (= @mode "template") (let ((f117p (str/split @tmpl "{{"))) (str/concat (default (array/first @f117p) "") (str/join (array/map (array/drop @f117p 1) (fn f117q (let ((f117r (str/split @f117q "}}"))) (if (< (array/len @f117r) 2) (str/concat "{{" @f117q) (str/concat (object/get @opv (default (array/first @f117r) "") (str/concat "{{" (default (array/first @f117r) "") "}}")) (str/join (array/drop @f117r 1) "}}")))))) "")))
804
- (if (= @mode "callee") (let ((v118 : SrcVars (object/fromEntries [["callee" @callee] ["*" @joined]]))) (let ((f119p (str/split @config.calleeForm "{{"))) (str/concat (default (array/first @f119p) "") (str/join (array/map (array/drop @f119p 1) (fn f119q (let ((f119r (str/split @f119q "}}"))) (if (< (array/len @f119r) 2) (str/concat "{{" @f119q) (str/concat (object/get @v118 (default (array/first @f119r) "") (str/concat "{{" (default (array/first @f119r) "") "}}")) (str/join (array/drop @f119r 1) "}}")))))) ""))))
805
- (let ((v125 : SrcVars (object/fromEntries [["op" (let ((sj120 (json/stringify @hd))) (let ((v123 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj120 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj120 1 (- (str/len @sj120) 1)) (fn sa121 sk122 (str/replaceAll @sa121 @sk122 (object/get @config.stringEscapes @sk122 "")))) "\""))]]))) (let ((f124p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f124p) "") (str/join (array/map (array/drop @f124p 1) (fn f124q (let ((f124r (str/split @f124q "}}"))) (if (< (array/len @f124r) 2) (str/concat "{{" @f124q) (str/concat (object/get @v123 (default (array/first @f124r) "") (str/concat "{{" (default (array/first @f124r) "") "}}")) (str/join (array/drop @f124r 1) "}}")))))) "")))))]]))) (let ((f126p (str/split @config.unsupportedForm "{{"))) (str/concat (default (array/first @f126p) "") (str/join (array/map (array/drop @f126p 1) (fn f126q (let ((f126r (str/split @f126q "}}"))) (if (< (array/len @f126r) 2) (str/concat "{{" @f126q) (str/concat (object/get @v125 (default (array/first @f126r) "") (str/concat "{{" (default (array/first @f126r) "") "}}")) (str/join (array/drop @f126r 1) "}}")))))) "")))))))))
806
- (warn (if (= @mode "none") [(let ((v127 : SrcVars (object/fromEntries [["language" @config.language] ["op" @hd]]))) (let ((f128p (str/split @config.unsupportedWarn "{{"))) (str/concat (default (array/first @f128p) "") (str/join (array/map (array/drop @f128p 1) (fn f128q (let ((f128r (str/split @f128q "}}"))) (if (< (array/len @f128r) 2) (str/concat "{{" @f128q) (str/concat (object/get @v127 (default (array/first @f128r) "") (str/concat "{{" (default (array/first @f128r) "") "}}")) (str/join (array/drop @f128r 1) "}}")))))) ""))))] [])))
807
- { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @ex, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws @warn), uses: (array/concat @us [@hd] (if (= @mode "none") ["unsupported"] [])) }))))))))))))))))))
939
+ (vs (if (> (array/len @fnVars) 1) (let ((v147 : SrcVars (object/fromEntries [["index" (default (array/nth @fnVars 1) "_")] ["item" (default (array/nth @fnVars 0) "_")]]))) (let ((f148p (str/split @config.indexedVars "{{"))) (str/concat (default (array/first @f148p) "") (str/join (array/map (array/drop @f148p 1) (fn f148q (let ((f148r (str/split @f148q "}}"))) (if (< (array/len @f148r) 2) (str/concat "{{" @f148q) (str/concat (object/get @v147 (default (array/first @f148r) "") (str/concat "{{" (default (array/first @f148r) "") "}}")) (str/join (array/drop @f148r 1) "}}")))))) "")))) (default (array/nth @fnVars 0) "_")))
940
+ (src (if (> (array/len @fnVars) 1) (let ((v149 : SrcVars (object/fromEntries [["src" (default (array/nth @args 0) "")]]))) (let ((f150p (str/split @config.indexedSource "{{"))) (str/concat (default (array/first @f150p) "") (str/join (array/map (array/drop @f150p 1) (fn f150q (let ((f150r (str/split @f150q "}}"))) (if (< (array/len @f150r) 2) (str/concat "{{" @f150q) (str/concat (object/get @v149 (default (array/first @f150r) "") (str/concat "{{" (default (array/first @f150r) "") "}}")) (str/join (array/drop @f150r 1) "}}")))))) "")))) (default (array/nth @args 0) ""))))
941
+ (let ((txt (if (= @mode "lambda") (let ((v151 : SrcVars (object/fromEntries [["body" (object/get @fnArg "body")] ["vars" @vs] ["src" @src] ["item" (default (array/nth @fnVars 0) "_")]]))) (let ((f152p (str/split @lamT "{{"))) (str/concat (default (array/first @f152p) "") (str/join (array/map (array/drop @f152p 1) (fn f152q (let ((f152r (str/split @f152q "}}"))) (if (< (array/len @f152r) 2) (str/concat "{{" @f152q) (str/concat (object/get @v151 (default (array/first @f152r) "") (str/concat "{{" (default (array/first @f152r) "") "}}")) (str/join (array/drop @f152r 1) "}}")))))) ""))))
942
+ (if (= @mode "infix") (let ((v153 : SrcVars (object/fromEntries [["*" (str/join @args (str/concat " " @sym " "))]]))) (let ((f154p (str/split @config.infixForm "{{"))) (str/concat (default (array/first @f154p) "") (str/join (array/map (array/drop @f154p 1) (fn f154q (let ((f154r (str/split @f154q "}}"))) (if (< (array/len @f154r) 2) (str/concat "{{" @f154q) (str/concat (object/get @v153 (default (array/first @f154r) "") (str/concat "{{" (default (array/first @f154r) "") "}}")) (str/join (array/drop @f154r 1) "}}")))))) ""))))
943
+ (if (= @mode "template") (let ((f155p (str/split @tmpl "{{"))) (str/concat (default (array/first @f155p) "") (str/join (array/map (array/drop @f155p 1) (fn f155q (let ((f155r (str/split @f155q "}}"))) (if (< (array/len @f155r) 2) (str/concat "{{" @f155q) (str/concat (object/get @opv (default (array/first @f155r) "") (str/concat "{{" (default (array/first @f155r) "") "}}")) (str/join (array/drop @f155r 1) "}}")))))) "")))
944
+ (if (= @mode "callee") (let ((v156 : SrcVars (object/fromEntries [["callee" @callee] ["*" @joined]]))) (let ((f157p (str/split @config.calleeForm "{{"))) (str/concat (default (array/first @f157p) "") (str/join (array/map (array/drop @f157p 1) (fn f157q (let ((f157r (str/split @f157q "}}"))) (if (< (array/len @f157r) 2) (str/concat "{{" @f157q) (str/concat (object/get @v156 (default (array/first @f157r) "") (str/concat "{{" (default (array/first @f157r) "") "}}")) (str/join (array/drop @f157r 1) "}}")))))) ""))))
945
+ (let ((v163 : SrcVars (object/fromEntries [["op" (let ((sj158 (json/stringify @hd))) (let ((v161 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj158 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj158 1 (- (str/len @sj158) 1)) (fn sa159 sk160 (str/replaceAll @sa159 @sk160 (object/get @config.stringEscapes @sk160 "")))) "\""))]]))) (let ((f162p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f162p) "") (str/join (array/map (array/drop @f162p 1) (fn f162q (let ((f162r (str/split @f162q "}}"))) (if (< (array/len @f162r) 2) (str/concat "{{" @f162q) (str/concat (object/get @v161 (default (array/first @f162r) "") (str/concat "{{" (default (array/first @f162r) "") "}}")) (str/join (array/drop @f162r 1) "}}")))))) "")))))]]))) (let ((f164p (str/split @config.unsupportedForm "{{"))) (str/concat (default (array/first @f164p) "") (str/join (array/map (array/drop @f164p 1) (fn f164q (let ((f164r (str/split @f164q "}}"))) (if (< (array/len @f164r) 2) (str/concat "{{" @f164q) (str/concat (object/get @v163 (default (array/first @f164r) "") (str/concat "{{" (default (array/first @f164r) "") "}}")) (str/join (array/drop @f164r 1) "}}")))))) "")))))))))
946
+ (warn (if (= @mode "none") [(let ((v165 : SrcVars (object/fromEntries [["language" @config.language] ["op" @hd]]))) (let ((f166p (str/split @config.unsupportedWarn "{{"))) (str/concat (default (array/first @f166p) "") (str/join (array/map (array/drop @f166p 1) (fn f166q (let ((f166r (str/split @f166q "}}"))) (if (< (array/len @f166r) 2) (str/concat "{{" @f166q) (str/concat (object/get @v165 (default (array/first @f166r) "") (str/concat "{{" (default (array/first @f166r) "") "}}")) (str/join (array/drop @f166r 1) "}}")))))) ""))))] [])))
947
+ { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @ex, keys: @none, stmts: @noneL, pairVals: @none, warns: (array/concat @ws @warn), uses: (array/concat @us [@hd] (if (= @mode "none") ["unsupported"] [])) })))))))))))))))))))
808
948
  (if (validate/object @n)
809
949
  (let ((es (object/entries @k)))
810
950
  (let ((typedEs (if @typed (array/map @es (fn e (let ((rr (default (array/nth @e 1) @nullR)) (m (str/concat "." (default (array/nth @e 0) "")))) [(array/nth @e 0) { expr: (str/replaceAll (object/get @rr "expr") "" @m), stmt: (object/get @rr "stmt"), params: (object/get @rr "params"), body: (object/get @rr "body"), items: (object/get @rr "items"), keys: (object/get @rr "keys"), stmts: (object/get @rr "stmts"), pairVals: (object/get @rr "pairVals"), warns: (object/get @rr "warns"), uses: (object/get @rr "uses") }]))) @es)))
811
- (let ((pairsText (str/join (array/map @typedEs (fn e (let ((v134 : SrcVars (object/fromEntries [["key" (let ((sj129 (json/stringify (array/nth @e 0)))) (let ((v132 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj129 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj129 1 (- (str/len @sj129) 1)) (fn sa130 sk131 (str/replaceAll @sa130 @sk131 (object/get @config.stringEscapes @sk131 "")))) "\""))]]))) (let ((f133p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f133p) "") (str/join (array/map (array/drop @f133p 1) (fn f133q (let ((f133r (str/split @f133q "}}"))) (if (< (array/len @f133r) 2) (str/concat "{{" @f133q) (str/concat (object/get @v132 (default (array/first @f133r) "") (str/concat "{{" (default (array/first @f133r) "") "}}")) (str/join (array/drop @f133r 1) "}}")))))) "")))))] ["value" (object/get (default (array/nth @e 1) @nullR) "expr")]]))) (let ((f135p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f135p) "") (str/join (array/map (array/drop @f135p 1) (fn f135q (let ((f135r (str/split @f135q "}}"))) (if (< (array/len @f135r) 2) (str/concat "{{" @f135q) (str/concat (object/get @v134 (default (array/first @f135r) "") (str/concat "{{" (default (array/first @f135r) "") "}}")) (str/join (array/drop @f135r 1) "}}")))))) "")))))) @config.mapSep)))
951
+ (let ((pairsText (str/join (array/map @typedEs (fn e (let ((v172 : SrcVars (object/fromEntries [["key" (let ((sj167 (json/stringify (array/nth @e 0)))) (let ((v170 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj167 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj167 1 (- (str/len @sj167) 1)) (fn sa168 sk169 (str/replaceAll @sa168 @sk169 (object/get @config.stringEscapes @sk169 "")))) "\""))]]))) (let ((f171p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f171p) "") (str/join (array/map (array/drop @f171p 1) (fn f171q (let ((f171r (str/split @f171q "}}"))) (if (< (array/len @f171r) 2) (str/concat "{{" @f171q) (str/concat (object/get @v170 (default (array/first @f171r) "") (str/concat "{{" (default (array/first @f171r) "") "}}")) (str/join (array/drop @f171r 1) "}}")))))) "")))))] ["value" (object/get (default (array/nth @e 1) @nullR) "expr")]]))) (let ((f173p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f173p) "") (str/join (array/map (array/drop @f173p 1) (fn f173q (let ((f173r (str/split @f173q "}}"))) (if (< (array/len @f173r) 2) (str/concat "{{" @f173q) (str/concat (object/get @v172 (default (array/first @f173r) "") (str/concat "{{" (default (array/first @f173r) "") "}}")) (str/join (array/drop @f173r 1) "}}")))))) "")))))) @config.mapSep)))
812
952
  (let ((txt (if (and @typed (!= @config.recordForm "") (> (array/len @typedEs) 0))
813
- (str/concat "" (str/join (array/map @typedEs (fn e (str/concat "" (default (array/nth @e 0) "") "" (object/get (default (array/nth @e 1) @nullR) "expr") ""))) "") "")
953
+ (str/concat "" (str/join (array/map (if (= @config.payloadFieldOrder "sorted") (array/map (array/sort (array/map @typedEs (fn se (default (array/nth @se 0) "")))) (fn sk (default (array/find @typedEs (fn se (= (array/nth @se 0) @sk))) [@sk @nullR]))) @typedEs) (fn e (str/concat "" (default (array/nth @e 0) "") "" (object/get (default (array/nth @e 1) @nullR) "expr") ""))) "") "")
814
954
  (if (and (!= @config.mapEmpty "") (= (array/len @typedEs) 0)) @config.mapEmpty (str/concat @config.mapOpen @pairsText @config.mapClose)))))
815
955
  { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: (array/map @typedEs (fn e (object/get (default (array/nth @e 1) @nullR) "expr"))), keys: (object/keys @k), stmts: @noneL, pairVals: @none, warns: (array/flatten (array/map @typedEs (fn e (object/get (default (array/nth @e 1) @nullR) "warns")))), uses: (array/flatten (array/map @typedEs (fn e (object/get (default (array/nth @e 1) @nullR) "uses")))) }))))
816
956
  (if (validate/string @n)
@@ -820,16 +960,16 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
820
960
  (let ((root (default (array/nth @path 0) "")) (rest (array/drop @path 1)))
821
961
  (let ((attrBase (object/get @config.attributeRoots @root "")) (itemBase (object/get @config.itemRoots @root "")))
822
962
  (let ((kind (if (!= @attrBase "") "attr" (if (!= @itemBase "") "item" @config.localAccess)))
823
- (base (if (!= @attrBase "") @attrBase (if (!= @itemBase "") @itemBase (let ((cb136 (str/replace-pattern (str/replaceAll @root "-" "_") "[.]" "_"))) (let ((cw137 (array/filter (str/split (str/lower @cb136) "_") (fn cx138 (!= @cx138 ""))))) (if (= @config.localCase "lower") (str/lower @cb136) (if (= @config.localCase "upper") (str/upper @cb136) (if (= @config.localCase "camel") (str/concat (default (array/first @cw137) "") (str/join (array/map (array/drop @cw137 1) (fn cy139 (str/capitalize @cy139))) "")) (if (= @config.localCase "pascal") (str/join (array/map @cw137 (fn cy139 (str/capitalize @cy139))) "") (let ((ck140 (str/split @cb136 "_"))) (if (= @config.localCase "split-camel") (str/concat (default (array/first @ck140) "") (str/join (array/map (array/drop @ck140 1) (fn cy139 (str/concat (str/upper (str/slice @cy139 0 1)) (str/slice @cy139 1 (str/len @cy139))))) "")) (if (= @config.localCase "split-pascal") (str/join (array/map @ck140 (fn cy139 (str/concat (str/upper (str/slice @cy139 0 1)) (str/slice @cy139 1 (str/len @cy139))))) "") (if (= @config.localCase "lower-camel") (let ((cl141 (str/join (array/map @ck140 (fn cy139 (str/concat (str/upper (str/slice @cy139 0 1)) (str/slice @cy139 1 (str/len @cy139))))) ""))) (str/concat (str/lower (str/slice @cl141 0 1)) (str/slice @cl141 1 (str/len @cl141)))) @cb136))))))))))))))
824
- (let ((tail (str/join (array/map @rest (fn x (if (and (> (str/len @x) 0) (= (str/replace-pattern @x "[0-9]" "") "")) (let ((v142 : SrcVars (object/fromEntries [["0" @x]]))) (let ((f143p (str/split @config.indexAccess "{{"))) (str/concat (default (array/first @f143p) "") (str/join (array/map (array/drop @f143p 1) (fn f143q (let ((f143r (str/split @f143q "}}"))) (if (< (array/len @f143r) 2) (str/concat "{{" @f143q) (str/concat (object/get @v142 (default (array/first @f143r) "") (str/concat "{{" (default (array/first @f143r) "") "}}")) (str/join (array/drop @f143r 1) "}}")))))) "")))) (if (= @kind "attr") (let ((v150 : SrcVars (object/fromEntries [["name" (let ((cb144 (str/replace-pattern (str/replaceAll @x "-" "_") "[.]" "_"))) (let ((cw145 (array/filter (str/split (str/lower @cb144) "_") (fn cx146 (!= @cx146 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb144) (if (= @config.fieldCase "upper") (str/upper @cb144) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw145) "") (str/join (array/map (array/drop @cw145 1) (fn cy147 (str/capitalize @cy147))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw145 (fn cy147 (str/capitalize @cy147))) "") (let ((ck148 (str/split @cb144 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck148) "") (str/join (array/map (array/drop @ck148 1) (fn cy147 (str/concat (str/upper (str/slice @cy147 0 1)) (str/slice @cy147 1 (str/len @cy147))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck148 (fn cy147 (str/concat (str/upper (str/slice @cy147 0 1)) (str/slice @cy147 1 (str/len @cy147))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl149 (str/join (array/map @ck148 (fn cy147 (str/concat (str/upper (str/slice @cy147 0 1)) (str/slice @cy147 1 (str/len @cy147))))) ""))) (str/concat (str/lower (str/slice @cl149 0 1)) (str/slice @cl149 1 (str/len @cl149)))) @cb144))))))))))]]))) (let ((f151p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f151p) "") (str/join (array/map (array/drop @f151p 1) (fn f151q (let ((f151r (str/split @f151q "}}"))) (if (< (array/len @f151r) 2) (str/concat "{{" @f151q) (str/concat (object/get @v150 (default (array/first @f151r) "") (str/concat "{{" (default (array/first @f151r) "") "}}")) (str/join (array/drop @f151r 1) "}}")))))) "")))) (let ((v157 : SrcVars (object/fromEntries [["key" (let ((sj152 (json/stringify @x))) (let ((v155 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj152 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj152 1 (- (str/len @sj152) 1)) (fn sa153 sk154 (str/replaceAll @sa153 @sk154 (object/get @config.stringEscapes @sk154 "")))) "\""))]]))) (let ((f156p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f156p) "") (str/join (array/map (array/drop @f156p 1) (fn f156q (let ((f156r (str/split @f156q "}}"))) (if (< (array/len @f156r) 2) (str/concat "{{" @f156q) (str/concat (object/get @v155 (default (array/first @f156r) "") (str/concat "{{" (default (array/first @f156r) "") "}}")) (str/join (array/drop @f156r 1) "}}")))))) "")))))]]))) (let ((f158p (str/split @config.itemAccess "{{"))) (str/concat (default (array/first @f158p) "") (str/join (array/map (array/drop @f158p 1) (fn f158q (let ((f158r (str/split @f158q "}}"))) (if (< (array/len @f158r) 2) (str/concat "{{" @f158q) (str/concat (object/get @v157 (default (array/first @f158r) "") (str/concat "{{" (default (array/first @f158r) "") "}}")) (str/join (array/drop @f158r 1) "}}")))))) "")))))))) "")))
963
+ (base (if (!= @attrBase "") (if (= @root "entity") (str/concat "\u{e00d}" @attrBase "\u{e00e}") @attrBase) (if (!= @itemBase "") @itemBase (let ((cb174 (str/replace-pattern (str/replaceAll @root "-" "_") "[.]" "_"))) (let ((cw175 (array/filter (str/split (str/lower @cb174) "_") (fn cx176 (!= @cx176 ""))))) (if (= @config.localCase "lower") (str/lower @cb174) (if (= @config.localCase "upper") (str/upper @cb174) (if (= @config.localCase "camel") (str/concat (default (array/first @cw175) "") (str/join (array/map (array/drop @cw175 1) (fn cy177 (str/capitalize @cy177))) "")) (if (= @config.localCase "pascal") (str/join (array/map @cw175 (fn cy177 (str/capitalize @cy177))) "") (let ((ck178 (str/split @cb174 "_"))) (if (= @config.localCase "split-camel") (str/concat (default (array/first @ck178) "") (str/join (array/map (array/drop @ck178 1) (fn cy177 (str/concat (str/upper (str/slice @cy177 0 1)) (str/slice @cy177 1 (str/len @cy177))))) "")) (if (= @config.localCase "split-pascal") (str/join (array/map @ck178 (fn cy177 (str/concat (str/upper (str/slice @cy177 0 1)) (str/slice @cy177 1 (str/len @cy177))))) "") (if (= @config.localCase "lower-camel") (let ((cl179 (str/join (array/map @ck178 (fn cy177 (str/concat (str/upper (str/slice @cy177 0 1)) (str/slice @cy177 1 (str/len @cy177))))) ""))) (str/concat (str/lower (str/slice @cl179 0 1)) (str/slice @cl179 1 (str/len @cl179)))) @cb174))))))))))))))
964
+ (let ((tail (str/join (array/map @rest (fn x (if (and (> (str/len @x) 0) (= (str/replace-pattern @x "[0-9]" "") "")) (let ((v180 : SrcVars (object/fromEntries [["0" @x]]))) (let ((f181p (str/split @config.indexAccess "{{"))) (str/concat (default (array/first @f181p) "") (str/join (array/map (array/drop @f181p 1) (fn f181q (let ((f181r (str/split @f181q "}}"))) (if (< (array/len @f181r) 2) (str/concat "{{" @f181q) (str/concat (object/get @v180 (default (array/first @f181r) "") (str/concat "{{" (default (array/first @f181r) "") "}}")) (str/join (array/drop @f181r 1) "}}")))))) "")))) (if (= @kind "attr") (let ((v188 : SrcVars (object/fromEntries [["name" (let ((cb182 (str/replace-pattern (str/replaceAll @x "-" "_") "[.]" "_"))) (let ((cw183 (array/filter (str/split (str/lower @cb182) "_") (fn cx184 (!= @cx184 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb182) (if (= @config.fieldCase "upper") (str/upper @cb182) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw183) "") (str/join (array/map (array/drop @cw183 1) (fn cy185 (str/capitalize @cy185))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw183 (fn cy185 (str/capitalize @cy185))) "") (let ((ck186 (str/split @cb182 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck186) "") (str/join (array/map (array/drop @ck186 1) (fn cy185 (str/concat (str/upper (str/slice @cy185 0 1)) (str/slice @cy185 1 (str/len @cy185))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck186 (fn cy185 (str/concat (str/upper (str/slice @cy185 0 1)) (str/slice @cy185 1 (str/len @cy185))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl187 (str/join (array/map @ck186 (fn cy185 (str/concat (str/upper (str/slice @cy185 0 1)) (str/slice @cy185 1 (str/len @cy185))))) ""))) (str/concat (str/lower (str/slice @cl187 0 1)) (str/slice @cl187 1 (str/len @cl187)))) @cb182))))))))))]]))) (let ((f189p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f189p) "") (str/join (array/map (array/drop @f189p 1) (fn f189q (let ((f189r (str/split @f189q "}}"))) (if (< (array/len @f189r) 2) (str/concat "{{" @f189q) (str/concat (object/get @v188 (default (array/first @f189r) "") (str/concat "{{" (default (array/first @f189r) "") "}}")) (str/join (array/drop @f189r 1) "}}")))))) "")))) (let ((v195 : SrcVars (object/fromEntries [["key" (let ((sj190 (json/stringify @x))) (let ((v193 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj190 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj190 1 (- (str/len @sj190) 1)) (fn sa191 sk192 (str/replaceAll @sa191 @sk192 (object/get @config.stringEscapes @sk192 "")))) "\""))]]))) (let ((f194p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f194p) "") (str/join (array/map (array/drop @f194p 1) (fn f194q (let ((f194r (str/split @f194q "}}"))) (if (< (array/len @f194r) 2) (str/concat "{{" @f194q) (str/concat (object/get @v193 (default (array/first @f194r) "") (str/concat "{{" (default (array/first @f194r) "") "}}")) (str/join (array/drop @f194r 1) "}}")))))) "")))))]]))) (let ((f196p (str/split @config.itemAccess "{{"))) (str/concat (default (array/first @f196p) "") (str/join (array/map (array/drop @f196p 1) (fn f196q (let ((f196r (str/split @f196q "}}"))) (if (< (array/len @f196r) 2) (str/concat "{{" @f196q) (str/concat (object/get @v195 (default (array/first @f196r) "") (str/concat "{{" (default (array/first @f196r) "") "}}")) (str/join (array/drop @f196r 1) "}}")))))) "")))))))) "")))
825
965
  (let ((plain (str/concat @base @tail))
826
- (dtext (if (and (= @root "entity") (= (array/len @rest) 1)) (default (array/nth (default (array/find (object/entries @ctx.defaults) (fn lk159 (= (array/nth @lk159 0) (default (array/nth @rest 0) "")))) ["" ""]) 1) "") "")))
966
+ (dtext (if (and (= @root "entity") (= (array/len @rest) 1)) (default (array/nth (default (array/find (object/entries @ctx.defaults) (fn lk197 (= (array/nth @lk197 0) (default (array/nth @rest 0) "")))) ["" ""]) 1) "") "")))
827
967
  (let ((txt (if (and @typed (!= @config.recordForm "") (= @root "payload") (= (array/len @rest) 0)) (str/concat "" @plain "")
828
- (if (and (!= @config.entityReadDefault "") (!= @dtext "")) (let ((v160 : SrcVars (object/fromEntries [["read" @plain] ["default" @dtext]]))) (let ((f161p (str/split @config.entityReadDefault "{{"))) (str/concat (default (array/first @f161p) "") (str/join (array/map (array/drop @f161p 1) (fn f161q (let ((f161r (str/split @f161q "}}"))) (if (< (array/len @f161r) 2) (str/concat "{{" @f161q) (str/concat (object/get @v160 (default (array/first @f161r) "") (str/concat "{{" (default (array/first @f161r) "") "}}")) (str/join (array/drop @f161r 1) "}}")))))) "")))) @plain))))
968
+ (if (and (!= @config.entityReadDefault "") (!= @dtext "")) (let ((v198 : SrcVars (object/fromEntries [["read" @plain] ["default" @dtext]]))) (let ((f199p (str/split @config.entityReadDefault "{{"))) (str/concat (default (array/first @f199p) "") (str/join (array/map (array/drop @f199p 1) (fn f199q (let ((f199r (str/split @f199q "}}"))) (if (< (array/len @f199r) 2) (str/concat "{{" @f199q) (str/concat (object/get @v198 (default (array/first @f199r) "") (str/concat "{{" (default (array/first @f199r) "") "}}")) (str/join (array/drop @f199r 1) "}}")))))) "")))) @plain))))
829
969
  { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: @plain, items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: @none, uses: @none })))))))
830
- (let ((txt (if (and @typed (!= @config.enumForm "")) (str/concat "" @sv "" (let ((sj162 (json/stringify @sv))) (let ((v165 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj162 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj162 1 (- (str/len @sj162) 1)) (fn sa163 sk164 (str/replaceAll @sa163 @sk164 (object/get @config.stringEscapes @sk164 "")))) "\""))]]))) (let ((f166p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f166p) "") (str/join (array/map (array/drop @f166p 1) (fn f166q (let ((f166r (str/split @f166q "}}"))) (if (< (array/len @f166r) 2) (str/concat "{{" @f166q) (str/concat (object/get @v165 (default (array/first @f166r) "") (str/concat "{{" (default (array/first @f166r) "") "}}")) (str/join (array/drop @f166r 1) "}}")))))) ""))))) "") (let ((sj167 (json/stringify @sv))) (let ((v170 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj167 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj167 1 (- (str/len @sj167) 1)) (fn sa168 sk169 (str/replaceAll @sa168 @sk169 (object/get @config.stringEscapes @sk169 "")))) "\""))]]))) (let ((f171p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f171p) "") (str/join (array/map (array/drop @f171p 1) (fn f171q (let ((f171r (str/split @f171q "}}"))) (if (< (array/len @f171r) 2) (str/concat "{{" @f171q) (str/concat (object/get @v170 (default (array/first @f171r) "") (str/concat "{{" (default (array/first @f171r) "") "}}")) (str/join (array/drop @f171r 1) "}}")))))) ""))))))))
970
+ (let ((txt (if (and @typed (!= @config.enumForm "")) (str/concat "" @sv "" (let ((sj200 (json/stringify @sv))) (let ((v203 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj200 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj200 1 (- (str/len @sj200) 1)) (fn sa201 sk202 (str/replaceAll @sa201 @sk202 (object/get @config.stringEscapes @sk202 "")))) "\""))]]))) (let ((f204p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f204p) "") (str/join (array/map (array/drop @f204p 1) (fn f204q (let ((f204r (str/split @f204q "}}"))) (if (< (array/len @f204r) 2) (str/concat "{{" @f204q) (str/concat (object/get @v203 (default (array/first @f204r) "") (str/concat "{{" (default (array/first @f204r) "") "}}")) (str/join (array/drop @f204r 1) "}}")))))) ""))))) "") (let ((sj205 (json/stringify @sv))) (let ((v208 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj205 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj205 1 (- (str/len @sj205) 1)) (fn sa206 sk207 (str/replaceAll @sa206 @sk207 (object/get @config.stringEscapes @sk207 "")))) "\""))]]))) (let ((f209p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f209p) "") (str/join (array/map (array/drop @f209p 1) (fn f209q (let ((f209r (str/split @f209q "}}"))) (if (< (array/len @f209r) 2) (str/concat "{{" @f209q) (str/concat (object/get @v208 (default (array/first @f209r) "") (str/concat "{{" (default (array/first @f209r) "") "}}")) (str/join (array/drop @f209r 1) "}}")))))) ""))))))))
831
971
  { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: @none, uses: @none })))
832
- (let ((txt (if (validate/boolean @n) (if (= @n true) @config.trueLit @config.falseLit) (let ((nj172 (json/stringify @n))) (if (= (str/replace-pattern @nj172 "^-?[0-9]+$" "") "") (let ((v173 : SrcVars (object/fromEntries [["json" @nj172]]))) (let ((f174p (str/split @config.numberIntForm "{{"))) (str/concat (default (array/first @f174p) "") (str/join (array/map (array/drop @f174p 1) (fn f174q (let ((f174r (str/split @f174q "}}"))) (if (< (array/len @f174r) 2) (str/concat "{{" @f174q) (str/concat (object/get @v173 (default (array/first @f174r) "") (str/concat "{{" (default (array/first @f174r) "") "}}")) (str/join (array/drop @f174r 1) "}}")))))) "")))) (let ((v175 : SrcVars (object/fromEntries [["json" @nj172]]))) (let ((f176p (str/split @config.numberForm "{{"))) (str/concat (default (array/first @f176p) "") (str/join (array/map (array/drop @f176p 1) (fn f176q (let ((f176r (str/split @f176q "}}"))) (if (< (array/len @f176r) 2) (str/concat "{{" @f176q) (str/concat (object/get @v175 (default (array/first @f176r) "") (str/concat "{{" (default (array/first @f176r) "") "}}")) (str/join (array/drop @f176r 1) "}}")))))) "")))))))))
972
+ (let ((txt (if (validate/boolean @n) (if (= @n true) @config.trueLit @config.falseLit) (let ((nj210 (json/stringify @n))) (if (= (str/replace-pattern @nj210 "^-?[0-9]+$" "") "") (let ((v211 : SrcVars (object/fromEntries [["json" @nj210]]))) (let ((f212p (str/split @config.numberIntForm "{{"))) (str/concat (default (array/first @f212p) "") (str/join (array/map (array/drop @f212p 1) (fn f212q (let ((f212r (str/split @f212q "}}"))) (if (< (array/len @f212r) 2) (str/concat "{{" @f212q) (str/concat (object/get @v211 (default (array/first @f212r) "") (str/concat "{{" (default (array/first @f212r) "") "}}")) (str/join (array/drop @f212r 1) "}}")))))) "")))) (let ((v213 : SrcVars (object/fromEntries [["json" @nj210]]))) (let ((f214p (str/split @config.numberForm "{{"))) (str/concat (default (array/first @f214p) "") (str/join (array/map (array/drop @f214p 1) (fn f214q (let ((f214r (str/split @f214q "}}"))) (if (< (array/len @f214r) 2) (str/concat "{{" @f214q) (str/concat (object/get @v213 (default (array/first @f214r) "") (str/concat "{{" (default (array/first @f214r) "") "}}")) (str/join (array/drop @f214r 1) "}}")))))) "")))))))))
833
973
  { expr: @txt, stmt: [(str/concat @txt @term)], params: @none, body: "", items: @none, keys: @none, stmts: @noneL, pairVals: @none, warns: @none, uses: @none }))))))
834
974
  )
835
975
 
@@ -871,81 +1011,129 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
871
1011
  (coll (or (validate/array @dflt) (validate/object @dflt)))
872
1012
  (isNullable (= (object/get @f "nullable" false) true))
873
1013
  (optional (and (!= (object/get @f "required" false) true) (= @dflt null) (!= (object/get @f "nullable" false) true))))
874
- (let ((ty (if @optional (let ((v177 : SrcVars (object/fromEntries [["0" @tt]]))) (let ((f178p (str/split @config.typeNullable "{{"))) (str/concat (default (array/first @f178p) "") (str/join (array/map (array/drop @f178p 1) (fn f178q (let ((f178r (str/split @f178q "}}"))) (if (< (array/len @f178r) 2) (str/concat "{{" @f178q) (str/concat (object/get @v177 (default (array/first @f178r) "") (str/concat "{{" (default (array/first @f178r) "") "}}")) (str/join (array/drop @f178r 1) "}}")))))) "")))) @tt))
875
- (dpart (if @hasDef (if @coll (let ((v179 : SrcVars (object/fromEntries [["value" @defE]]))) (let ((f180p (str/split @config.modelFactory "{{"))) (str/concat (default (array/first @f180p) "") (str/join (array/map (array/drop @f180p 1) (fn f180q (let ((f180r (str/split @f180q "}}"))) (if (< (array/len @f180r) 2) (str/concat "{{" @f180q) (str/concat (object/get @v179 (default (array/first @f180r) "") (str/concat "{{" (default (array/first @f180r) "") "}}")) (str/join (array/drop @f180r 1) "}}")))))) "")))) (let ((v181 : SrcVars (object/fromEntries [["value" @defE]]))) (let ((f182p (str/split @config.modelDefault "{{"))) (str/concat (default (array/first @f182p) "") (str/join (array/map (array/drop @f182p 1) (fn f182q (let ((f182r (str/split @f182q "}}"))) (if (< (array/len @f182r) 2) (str/concat "{{" @f182q) (str/concat (object/get @v181 (default (array/first @f182r) "") (str/concat "{{" (default (array/first @f182r) "") "}}")) (str/join (array/drop @f182r 1) "}}")))))) ""))))) (if (or @optional @isNullable) (let ((v183 : SrcVars (object/fromEntries [["value" @config.nullLit]]))) (let ((f184p (str/split @config.modelDefault "{{"))) (str/concat (default (array/first @f184p) "") (str/join (array/map (array/drop @f184p 1) (fn f184q (let ((f184r (str/split @f184q "}}"))) (if (< (array/len @f184r) 2) (str/concat "{{" @f184q) (str/concat (object/get @v183 (default (array/first @f184r) "") (str/concat "{{" (default (array/first @f184r) "") "}}")) (str/join (array/drop @f184r 1) "}}")))))) "")))) ""))))
876
- { line: (let ((v191 : SrcVars (object/fromEntries [["i" @ind] ["name" (let ((cb185 (str/replace-pattern (str/replaceAll (default (object/get @f "name") "") "-" "_") "[.]" "_"))) (let ((cw186 (array/filter (str/split (str/lower @cb185) "_") (fn cx187 (!= @cx187 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb185) (if (= @config.fieldCase "upper") (str/upper @cb185) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw186) "") (str/join (array/map (array/drop @cw186 1) (fn cy188 (str/capitalize @cy188))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw186 (fn cy188 (str/capitalize @cy188))) "") (let ((ck189 (str/split @cb185 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck189) "") (str/join (array/map (array/drop @ck189 1) (fn cy188 (str/concat (str/upper (str/slice @cy188 0 1)) (str/slice @cy188 1 (str/len @cy188))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck189 (fn cy188 (str/concat (str/upper (str/slice @cy188 0 1)) (str/slice @cy188 1 (str/len @cy188))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl190 (str/join (array/map @ck189 (fn cy188 (str/concat (str/upper (str/slice @cy188 0 1)) (str/slice @cy188 1 (str/len @cy188))))) ""))) (str/concat (str/lower (str/slice @cl190 0 1)) (str/slice @cl190 1 (str/len @cl190)))) @cb185))))))))))] ["type" @ty] ["default" @dpart]]))) (let ((f192p (str/split @config.modelField "{{"))) (str/concat (default (array/first @f192p) "") (str/join (array/map (array/drop @f192p 1) (fn f192q (let ((f192r (str/split @f192q "}}"))) (if (< (array/len @f192r) 2) (str/concat "{{" @f192q) (str/concat (object/get @v191 (default (array/first @f192r) "") (str/concat "{{" (default (array/first @f192r) "") "}}")) (str/join (array/drop @f192r 1) "}}")))))) "")))), plain: (= @dpart ""), typeText: @tt }))))))))
1014
+ (let ((ty (if @optional (let ((v215 : SrcVars (object/fromEntries [["0" @tt]]))) (let ((f216p (str/split @config.typeNullable "{{"))) (str/concat (default (array/first @f216p) "") (str/join (array/map (array/drop @f216p 1) (fn f216q (let ((f216r (str/split @f216q "}}"))) (if (< (array/len @f216r) 2) (str/concat "{{" @f216q) (str/concat (object/get @v215 (default (array/first @f216r) "") (str/concat "{{" (default (array/first @f216r) "") "}}")) (str/join (array/drop @f216r 1) "}}")))))) "")))) @tt))
1015
+ (dpart (if @hasDef (if @coll (let ((v217 : SrcVars (object/fromEntries [["value" @defE]]))) (let ((f218p (str/split @config.modelFactory "{{"))) (str/concat (default (array/first @f218p) "") (str/join (array/map (array/drop @f218p 1) (fn f218q (let ((f218r (str/split @f218q "}}"))) (if (< (array/len @f218r) 2) (str/concat "{{" @f218q) (str/concat (object/get @v217 (default (array/first @f218r) "") (str/concat "{{" (default (array/first @f218r) "") "}}")) (str/join (array/drop @f218r 1) "}}")))))) "")))) (let ((v219 : SrcVars (object/fromEntries [["value" @defE]]))) (let ((f220p (str/split @config.modelDefault "{{"))) (str/concat (default (array/first @f220p) "") (str/join (array/map (array/drop @f220p 1) (fn f220q (let ((f220r (str/split @f220q "}}"))) (if (< (array/len @f220r) 2) (str/concat "{{" @f220q) (str/concat (object/get @v219 (default (array/first @f220r) "") (str/concat "{{" (default (array/first @f220r) "") "}}")) (str/join (array/drop @f220r 1) "}}")))))) ""))))) (if (or @optional @isNullable) (let ((v221 : SrcVars (object/fromEntries [["value" @config.nullLit]]))) (let ((f222p (str/split @config.modelDefault "{{"))) (str/concat (default (array/first @f222p) "") (str/join (array/map (array/drop @f222p 1) (fn f222q (let ((f222r (str/split @f222q "}}"))) (if (< (array/len @f222r) 2) (str/concat "{{" @f222q) (str/concat (object/get @v221 (default (array/first @f222r) "") (str/concat "{{" (default (array/first @f222r) "") "}}")) (str/join (array/drop @f222r 1) "}}")))))) "")))) ""))))
1016
+ { line: (let ((v229 : SrcVars (object/fromEntries [["i" @ind] ["name" (let ((cb223 (str/replace-pattern (str/replaceAll (default (object/get @f "name") "") "-" "_") "[.]" "_"))) (let ((cw224 (array/filter (str/split (str/lower @cb223) "_") (fn cx225 (!= @cx225 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb223) (if (= @config.fieldCase "upper") (str/upper @cb223) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw224) "") (str/join (array/map (array/drop @cw224 1) (fn cy226 (str/capitalize @cy226))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw224 (fn cy226 (str/capitalize @cy226))) "") (let ((ck227 (str/split @cb223 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck227) "") (str/join (array/map (array/drop @ck227 1) (fn cy226 (str/concat (str/upper (str/slice @cy226 0 1)) (str/slice @cy226 1 (str/len @cy226))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck227 (fn cy226 (str/concat (str/upper (str/slice @cy226 0 1)) (str/slice @cy226 1 (str/len @cy226))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl228 (str/join (array/map @ck227 (fn cy226 (str/concat (str/upper (str/slice @cy226 0 1)) (str/slice @cy226 1 (str/len @cy226))))) ""))) (str/concat (str/lower (str/slice @cl228 0 1)) (str/slice @cl228 1 (str/len @cl228)))) @cb223))))))))))] ["type" @ty] ["default" @dpart]]))) (let ((f230p (str/split @config.modelField "{{"))) (str/concat (default (array/first @f230p) "") (str/join (array/map (array/drop @f230p 1) (fn f230q (let ((f230r (str/split @f230q "}}"))) (if (< (array/len @f230r) 2) (str/concat "{{" @f230q) (str/concat (object/get @v229 (default (array/first @f230r) "") (str/concat "{{" (default (array/first @f230r) "") "}}")) (str/join (array/drop @f230r 1) "}}")))))) "")))), plain: (= @dpart ""), typeText: @tt }))))))))
877
1017
  (if (object/get @c "alias")
878
- [(let ((v194 : SrcVars (object/fromEntries [["name" (let ((en193 (object/get @c "name"))) (object/get @config.entityNames @en193 @en193))] ["type" (object/get (default (array/first @fs) { line: "", plain: true, typeText: @config.typeAny }) "typeText")]]))) (let ((f195p (str/split @config.modelAlias "{{"))) (str/concat (default (array/first @f195p) "") (str/join (array/map (array/drop @f195p 1) (fn f195q (let ((f195r (str/split @f195q "}}"))) (if (< (array/len @f195r) 2) (str/concat "{{" @f195q) (str/concat (object/get @v194 (default (array/first @f195r) "") (str/concat "{{" (default (array/first @f195r) "") "}}")) (str/join (array/drop @f195r 1) "}}")))))) ""))))]
1018
+ [(let ((v232 : SrcVars (object/fromEntries [["name" (let ((en231 (object/get @c "name"))) (object/get @config.entityNames @en231 @en231))] ["type" (object/get (default (array/first @fs) { line: "", plain: true, typeText: @config.typeAny }) "typeText")]]))) (let ((f233p (str/split @config.modelAlias "{{"))) (str/concat (default (array/first @f233p) "") (str/join (array/map (array/drop @f233p 1) (fn f233q (let ((f233r (str/split @f233q "}}"))) (if (< (array/len @f233r) 2) (str/concat "{{" @f233q) (str/concat (object/get @v232 (default (array/first @f233r) "") (str/concat "{{" (default (array/first @f233r) "") "}}")) (str/join (array/drop @f233r 1) "}}")))))) ""))))]
879
1019
  (array/concat
880
- (if (!= @config.modelAnnotation "") [(let ((v196 : SrcVars (object/fromEntries [["at" @at]]))) (let ((f197p (str/split @config.modelAnnotation "{{"))) (str/concat (default (array/first @f197p) "") (str/join (array/map (array/drop @f197p 1) (fn f197q (let ((f197r (str/split @f197q "}}"))) (if (< (array/len @f197r) 2) (str/concat "{{" @f197q) (str/concat (object/get @v196 (default (array/first @f197r) "") (str/concat "{{" (default (array/first @f197r) "") "}}")) (str/join (array/drop @f197r 1) "}}")))))) ""))))] [])
881
- [(let ((v199 : SrcVars (object/fromEntries [["name" (let ((en198 (object/get @c "name"))) (object/get @config.entityNames @en198 @en198))]]))) (let ((f200p (str/split @config.modelClassOpen "{{"))) (str/concat (default (array/first @f200p) "") (str/join (array/map (array/drop @f200p 1) (fn f200q (let ((f200r (str/split @f200q "}}"))) (if (< (array/len @f200r) 2) (str/concat "{{" @f200q) (str/concat (object/get @v199 (default (array/first @f200r) "") (str/concat "{{" (default (array/first @f200r) "") "}}")) (str/join (array/drop @f200r 1) "}}")))))) ""))))]
1020
+ (if (!= @config.modelAnnotation "") [(let ((v234 : SrcVars (object/fromEntries [["at" @at]]))) (let ((f235p (str/split @config.modelAnnotation "{{"))) (str/concat (default (array/first @f235p) "") (str/join (array/map (array/drop @f235p 1) (fn f235q (let ((f235r (str/split @f235q "}}"))) (if (< (array/len @f235r) 2) (str/concat "{{" @f235q) (str/concat (object/get @v234 (default (array/first @f235r) "") (str/concat "{{" (default (array/first @f235r) "") "}}")) (str/join (array/drop @f235r 1) "}}")))))) ""))))] [])
1021
+ [(let ((v237 : SrcVars (object/fromEntries [["name" (let ((en236 (object/get @c "name"))) (object/get @config.entityNames @en236 @en236))]]))) (let ((f238p (str/split @config.modelClassOpen "{{"))) (str/concat (default (array/first @f238p) "") (str/join (array/map (array/drop @f238p 1) (fn f238q (let ((f238r (str/split @f238q "}}"))) (if (< (array/len @f238r) 2) (str/concat "{{" @f238q) (str/concat (object/get @v237 (default (array/first @f238r) "") (str/concat "{{" (default (array/first @f238r) "") "}}")) (str/join (array/drop @f238r 1) "}}")))))) ""))))]
882
1022
  (if (= (array/len @fs) 0)
883
- (if (!= @config.modelEmpty "") [(let ((v201 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f202p (str/split @config.modelEmpty "{{"))) (str/concat (default (array/first @f202p) "") (str/join (array/map (array/drop @f202p 1) (fn f202q (let ((f202r (str/split @f202q "}}"))) (if (< (array/len @f202r) 2) (str/concat "{{" @f202q) (str/concat (object/get @v201 (default (array/first @f202r) "") (str/concat "{{" (default (array/first @f202r) "") "}}")) (str/join (array/drop @f202r 1) "}}")))))) ""))))] [])
1023
+ (if (!= @config.modelEmpty "") [(let ((v239 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f240p (str/split @config.modelEmpty "{{"))) (str/concat (default (array/first @f240p) "") (str/join (array/map (array/drop @f240p 1) (fn f240q (let ((f240r (str/split @f240q "}}"))) (if (< (array/len @f240r) 2) (str/concat "{{" @f240q) (str/concat (object/get @v239 (default (array/first @f240r) "") (str/concat "{{" (default (array/first @f240r) "") "}}")) (str/join (array/drop @f240r 1) "}}")))))) ""))))] [])
884
1024
  (array/map (array/concat (array/filter @fs (fn x (object/get @x "plain"))) (array/filter @fs (fn x (not (object/get @x "plain"))))) (fn x (object/get @x "line"))))
885
1025
  (if (!= @config.modelClassClose "") [@config.modelClassClose] [])))))))
886
1026
  [])
887
1027
  (array/map (array/range 0 (array/len @entity.traits)) (fn ti
888
- (let ((t (default (array/nth @entity.traits @ti) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "" }))
1028
+ (let ((t (default (array/nth @entity.traits @ti) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }))
889
1029
  (rs (default (array/nth @entity.renders (+ @nC @ti)) []))
890
- (cn : string (let ((cb203 (str/replace-pattern (str/replaceAll (default (object/get (default (array/nth @entity.traits @ti) { name: "" }) "name") "") "-" "_") "[.]" "_"))) (let ((cw204 (array/filter (str/split (str/lower @cb203) "_") (fn cx205 (!= @cx205 ""))))) (if (= @config.classCase "lower") (str/lower @cb203) (if (= @config.classCase "upper") (str/upper @cb203) (if (= @config.classCase "camel") (str/concat (default (array/first @cw204) "") (str/join (array/map (array/drop @cw204 1) (fn cy206 (str/capitalize @cy206))) "")) (if (= @config.classCase "pascal") (str/join (array/map @cw204 (fn cy206 (str/capitalize @cy206))) "") (let ((ck207 (str/split @cb203 "_"))) (if (= @config.classCase "split-camel") (str/concat (default (array/first @ck207) "") (str/join (array/map (array/drop @ck207 1) (fn cy206 (str/concat (str/upper (str/slice @cy206 0 1)) (str/slice @cy206 1 (str/len @cy206))))) "")) (if (= @config.classCase "split-pascal") (str/join (array/map @ck207 (fn cy206 (str/concat (str/upper (str/slice @cy206 0 1)) (str/slice @cy206 1 (str/len @cy206))))) "") (if (= @config.classCase "lower-camel") (let ((cl208 (str/join (array/map @ck207 (fn cy206 (str/concat (str/upper (str/slice @cy206 0 1)) (str/slice @cy206 1 (str/len @cy206))))) ""))) (str/concat (str/lower (str/slice @cl208 0 1)) (str/slice @cl208 1 (str/len @cl208)))) @cb203))))))))))))
1030
+ (cn : string (let ((cb241 (str/replace-pattern (str/replaceAll (default (object/get (default (array/nth @entity.traits @ti) { name: "" }) "name") "") "-" "_") "[.]" "_"))) (let ((cw242 (array/filter (str/split (str/lower @cb241) "_") (fn cx243 (!= @cx243 ""))))) (if (= @config.classCase "lower") (str/lower @cb241) (if (= @config.classCase "upper") (str/upper @cb241) (if (= @config.classCase "camel") (str/concat (default (array/first @cw242) "") (str/join (array/map (array/drop @cw242 1) (fn cy244 (str/capitalize @cy244))) "")) (if (= @config.classCase "pascal") (str/join (array/map @cw242 (fn cy244 (str/capitalize @cy244))) "") (let ((ck245 (str/split @cb241 "_"))) (if (= @config.classCase "split-camel") (str/concat (default (array/first @ck245) "") (str/join (array/map (array/drop @ck245 1) (fn cy244 (str/concat (str/upper (str/slice @cy244 0 1)) (str/slice @cy244 1 (str/len @cy244))))) "")) (if (= @config.classCase "split-pascal") (str/join (array/map @ck245 (fn cy244 (str/concat (str/upper (str/slice @cy244 0 1)) (str/slice @cy244 1 (str/len @cy244))))) "") (if (= @config.classCase "lower-camel") (let ((cl246 (str/join (array/map @ck245 (fn cy244 (str/concat (str/upper (str/slice @cy244 0 1)) (str/slice @cy244 1 (str/len @cy244))))) ""))) (str/concat (str/lower (str/slice @cl246 0 1)) (str/slice @cl246 1 (str/len @cl246)))) @cb241))))))))))))
891
1031
  (if (not (object/get @t "hasMachine"))
892
- (array/concat [(let ((v209 : SrcVars (object/fromEntries [["class" @cn] ["i" @ind]]))) (let ((f210p (str/split @config.classOpen "{{"))) (str/concat (default (array/first @f210p) "") (str/join (array/map (array/drop @f210p 1) (fn f210q (let ((f210r (str/split @f210q "}}"))) (if (< (array/len @f210r) 2) (str/concat "{{" @f210q) (str/concat (object/get @v209 (default (array/first @f210r) "") (str/concat "{{" (default (array/first @f210r) "") "}}")) (str/join (array/drop @f210r 1) "}}")))))) ""))))]
893
- (if (!= @config.classEmpty "") [(let ((v211 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f212p (str/split @config.classEmpty "{{"))) (str/concat (default (array/first @f212p) "") (str/join (array/map (array/drop @f212p 1) (fn f212q (let ((f212r (str/split @f212q "}}"))) (if (< (array/len @f212r) 2) (str/concat "{{" @f212q) (str/concat (object/get @v211 (default (array/first @f212r) "") (str/concat "{{" (default (array/first @f212r) "") "}}")) (str/join (array/drop @f212r 1) "}}")))))) ""))))] [])
894
- (if (!= @config.classClose "") [(let ((v213 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f214p (str/split @config.classClose "{{"))) (str/concat (default (array/first @f214p) "") (str/join (array/map (array/drop @f214p 1) (fn f214q (let ((f214r (str/split @f214q "}}"))) (if (< (array/len @f214r) 2) (str/concat "{{" @f214q) (str/concat (object/get @v213 (default (array/first @f214r) "") (str/concat "{{" (default (array/first @f214r) "") "}}")) (str/join (array/drop @f214r 1) "}}")))))) ""))))] []))
1032
+ (array/concat [(let ((v247 : SrcVars (object/fromEntries [["class" @cn] ["i" @ind]]))) (let ((f248p (str/split @config.classOpen "{{"))) (str/concat (default (array/first @f248p) "") (str/join (array/map (array/drop @f248p 1) (fn f248q (let ((f248r (str/split @f248q "}}"))) (if (< (array/len @f248r) 2) (str/concat "{{" @f248q) (str/concat (object/get @v247 (default (array/first @f248r) "") (str/concat "{{" (default (array/first @f248r) "") "}}")) (str/join (array/drop @f248r 1) "}}")))))) ""))))]
1033
+ (if (!= @config.classEmpty "") [(let ((v249 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f250p (str/split @config.classEmpty "{{"))) (str/concat (default (array/first @f250p) "") (str/join (array/map (array/drop @f250p 1) (fn f250q (let ((f250r (str/split @f250q "}}"))) (if (< (array/len @f250r) 2) (str/concat "{{" @f250q) (str/concat (object/get @v249 (default (array/first @f250r) "") (str/concat "{{" (default (array/first @f250r) "") "}}")) (str/join (array/drop @f250r 1) "}}")))))) ""))))] [])
1034
+ (if (!= @config.classClose "") [(let ((v251 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f252p (str/split @config.classClose "{{"))) (str/concat (default (array/first @f252p) "") (str/join (array/map (array/drop @f252p 1) (fn f252q (let ((f252r (str/split @f252q "}}"))) (if (< (array/len @f252r) 2) (str/concat "{{" @f252q) (str/concat (object/get @v251 (default (array/first @f252r) "") (str/concat "{{" (default (array/first @f252r) "") "}}")) (str/join (array/drop @f252r 1) "}}")))))) ""))))] []))
895
1035
  (let ((cfgR (default (array/first @rs) @nullR))
896
1036
  (trs (object/get @t "transitions"))
897
1037
  (cfgLit (if (and (!= @config.mapEmpty "") (= (array/len (object/get @t "knobs")) 0)) @config.mapEmpty (str/concat @config.mapOpen
898
- (str/join (array/map (object/get @t "knobs") (fn kb ki (let ((v220 : SrcVars (object/fromEntries [["key" (let ((sj215 (json/stringify (object/get @kb "key")))) (let ((v218 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj215 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj215 1 (- (str/len @sj215) 1)) (fn sa216 sk217 (str/replaceAll @sa216 @sk217 (object/get @config.stringEscapes @sk217 "")))) "\""))]]))) (let ((f219p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f219p) "") (str/join (array/map (array/drop @f219p 1) (fn f219q (let ((f219r (str/split @f219q "}}"))) (if (< (array/len @f219r) 2) (str/concat "{{" @f219q) (str/concat (object/get @v218 (default (array/first @f219r) "") (str/concat "{{" (default (array/first @f219r) "") "}}")) (str/join (array/drop @f219r 1) "}}")))))) "")))))] ["value" (default (array/nth (object/get @cfgR "items") (+ @ki 1)) @config.nullLit)]]))) (let ((f221p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f221p) "") (str/join (array/map (array/drop @f221p 1) (fn f221q (let ((f221r (str/split @f221q "}}"))) (if (< (array/len @f221r) 2) (str/concat "{{" @f221q) (str/concat (object/get @v220 (default (array/first @f221r) "") (str/concat "{{" (default (array/first @f221r) "") "}}")) (str/join (array/drop @f221r 1) "}}")))))) "")))))) @config.mapSep)
1038
+ (str/join (array/map (object/get @t "knobs") (fn kb ki (let ((v258 : SrcVars (object/fromEntries [["key" (let ((sj253 (json/stringify (object/get @kb "key")))) (let ((v256 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj253 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj253 1 (- (str/len @sj253) 1)) (fn sa254 sk255 (str/replaceAll @sa254 @sk255 (object/get @config.stringEscapes @sk255 "")))) "\""))]]))) (let ((f257p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f257p) "") (str/join (array/map (array/drop @f257p 1) (fn f257q (let ((f257r (str/split @f257q "}}"))) (if (< (array/len @f257r) 2) (str/concat "{{" @f257q) (str/concat (object/get @v256 (default (array/first @f257r) "") (str/concat "{{" (default (array/first @f257r) "") "}}")) (str/join (array/drop @f257r 1) "}}")))))) "")))))] ["value" (default (array/nth (object/get @cfgR "items") (+ @ki 1)) @config.nullLit)]]))) (let ((f259p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f259p) "") (str/join (array/map (array/drop @f259p 1) (fn f259q (let ((f259r (str/split @f259q "}}"))) (if (< (array/len @f259r) 2) (str/concat "{{" @f259q) (str/concat (object/get @v258 (default (array/first @f259r) "") (str/concat "{{" (default (array/first @f259r) "") "}}")) (str/join (array/drop @f259r 1) "}}")))))) "")))))) @config.mapSep)
899
1039
  @config.mapClose))))
900
1040
  (array/concat
901
- [(let ((v222 : SrcVars (object/fromEntries [["class" @cn] ["i" @ind]]))) (let ((f223p (str/split @config.classOpen "{{"))) (str/concat (default (array/first @f223p) "") (str/join (array/map (array/drop @f223p 1) (fn f223q (let ((f223r (str/split @f223q "}}"))) (if (< (array/len @f223r) 2) (str/concat "{{" @f223q) (str/concat (object/get @v222 (default (array/first @f223r) "") (str/concat "{{" (default (array/first @f223r) "") "}}")) (str/join (array/drop @f223r 1) "}}")))))) ""))))]
902
- (array/map (array/filter @config.constructor (fn l (if (= (object/get @t "configType") "") (not (or (str/includes @l "{{configType}}") (str/includes @l "{{withConfig}}"))) (not (str/includes @l "{{noConfig}}"))))) (fn l (let ((v230 : SrcVars (object/fromEntries [["i" @ind] ["class" @cn] ["entity" (let ((en224 (object/get @t "entity"))) (object/get @config.entityNames @en224 @en224))] ["initial" (let ((sj225 (json/stringify (object/get @t "initial")))) (let ((v228 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj225 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj225 1 (- (str/len @sj225) 1)) (fn sa226 sk227 (str/replaceAll @sa226 @sk227 (object/get @config.stringEscapes @sk227 "")))) "\""))]]))) (let ((f229p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f229p) "") (str/join (array/map (array/drop @f229p 1) (fn f229q (let ((f229r (str/split @f229q "}}"))) (if (< (array/len @f229r) 2) (str/concat "{{" @f229q) (str/concat (object/get @v228 (default (array/first @f229r) "") (str/concat "{{" (default (array/first @f229r) "") "}}")) (str/join (array/drop @f229r 1) "}}")))))) "")))))] ["config" @cfgLit] ["configType" (object/get @t "configType")] ["noConfig" ""] ["withConfig" ""]]))) (let ((f231p (str/split @l "{{"))) (str/concat (default (array/first @f231p) "") (str/join (array/map (array/drop @f231p 1) (fn f231q (let ((f231r (str/split @f231q "}}"))) (if (< (array/len @f231r) 2) (str/concat "{{" @f231q) (str/concat (object/get @v230 (default (array/first @f231r) "") (str/concat "{{" (default (array/first @f231r) "") "}}")) (str/join (array/drop @f231r 1) "}}")))))) ""))))))
1041
+ [(let ((v260 : SrcVars (object/fromEntries [["class" @cn] ["i" @ind]]))) (let ((f261p (str/split @config.classOpen "{{"))) (str/concat (default (array/first @f261p) "") (str/join (array/map (array/drop @f261p 1) (fn f261q (let ((f261r (str/split @f261q "}}"))) (if (< (array/len @f261r) 2) (str/concat "{{" @f261q) (str/concat (object/get @v260 (default (array/first @f261r) "") (str/concat "{{" (default (array/first @f261r) "") "}}")) (str/join (array/drop @f261r 1) "}}")))))) ""))))]
1042
+ (array/map (array/filter @config.constructor (fn l (and (if (= (object/get @t "configType") "") (not (or (str/includes @l "{{configType}}") (str/includes @l "{{withConfig}}"))) (not (str/includes @l "{{noConfig}}"))) (if (array/some @rs (fn sr (array/includes (object/get @sr "uses") "store"))) (not (str/includes @l "{{noStore}}")) (not (str/includes @l "{{withStore}}")))))) (fn l (let ((v268 : SrcVars (object/fromEntries [["i" @ind] ["class" @cn] ["entity" (let ((en262 (object/get @t "entity"))) (object/get @config.entityNames @en262 @en262))] ["initial" (let ((sj263 (json/stringify (object/get @t "initial")))) (let ((v266 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj263 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj263 1 (- (str/len @sj263) 1)) (fn sa264 sk265 (str/replaceAll @sa264 @sk265 (object/get @config.stringEscapes @sk265 "")))) "\""))]]))) (let ((f267p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f267p) "") (str/join (array/map (array/drop @f267p 1) (fn f267q (let ((f267r (str/split @f267q "}}"))) (if (< (array/len @f267r) 2) (str/concat "{{" @f267q) (str/concat (object/get @v266 (default (array/first @f267r) "") (str/concat "{{" (default (array/first @f267r) "") "}}")) (str/join (array/drop @f267r 1) "}}")))))) "")))))] ["config" @cfgLit] ["configType" (object/get @t "configType")] ["noConfig" ""] ["withConfig" ""] ["noStore" ""] ["withStore" ""]]))) (let ((f269p (str/split @l "{{"))) (str/concat (default (array/first @f269p) "") (str/join (array/map (array/drop @f269p 1) (fn f269q (let ((f269r (str/split @f269q "}}"))) (if (< (array/len @f269r) 2) (str/concat "{{" @f269q) (str/concat (object/get @v268 (default (array/first @f269r) "") (str/concat "{{" (default (array/first @f269r) "") "}}")) (str/join (array/drop @f269r 1) "}}")))))) ""))))))
903
1043
  [""]
904
- (array/map @config.emitMethod (fn l (let ((v232 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f233p (str/split @l "{{"))) (str/concat (default (array/first @f233p) "") (str/join (array/map (array/drop @f233p 1) (fn f233q (let ((f233r (str/split @f233q "}}"))) (if (< (array/len @f233r) 2) (str/concat "{{" @f233q) (str/concat (object/get @v232 (default (array/first @f233r) "") (str/concat "{{" (default (array/first @f233r) "") "}}")) (str/join (array/drop @f233r 1) "}}")))))) ""))))))
1044
+ (array/map @config.emitMethod (fn l (let ((v270 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f271p (str/split @l "{{"))) (str/concat (default (array/first @f271p) "") (str/join (array/map (array/drop @f271p 1) (fn f271q (let ((f271r (str/split @f271q "}}"))) (if (< (array/len @f271r) 2) (str/concat "{{" @f271q) (str/concat (object/get @v270 (default (array/first @f271r) "") (str/concat "{{" (default (array/first @f271r) "") "}}")) (str/join (array/drop @f271r 1) "}}")))))) ""))))))
1045
+ (if (array/some @rs (fn sr (array/includes (object/get @sr "uses") "store"))) (array/map @config.completeMethod (fn l (let ((v272 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f273p (str/split @l "{{"))) (str/concat (default (array/first @f273p) "") (str/join (array/map (array/drop @f273p 1) (fn f273q (let ((f273r (str/split @f273q "}}"))) (if (< (array/len @f273r) 2) (str/concat "{{" @f273q) (str/concat (object/get @v272 (default (array/first @f273r) "") (str/concat "{{" (default (array/first @f273r) "") "}}")) (str/join (array/drop @f273r 1) "}}")))))) "")))))) [])
905
1046
  (array/flatten (array/map (object/get @t "events") (fn ev
906
1047
  (let ((mine (array/filter (array/range 0 (array/len @trs)) (fn mi (= (object/get (default (array/nth @trs @mi) { from: "", to: "", event: "" }) "event") @ev))))
907
- (ptype (default (array/nth (default (array/find (object/entries (object/get @t "listenTypes")) (fn lk234 (= (array/nth @lk234 0) @ev))) ["" ""]) 1) ""))
908
- (mname (let ((v241 : SrcVars (object/fromEntries [["event" (let ((cb235 (str/replace-pattern (str/replaceAll @ev "-" "_") "[.]" "_"))) (let ((cw236 (array/filter (str/split (str/lower @cb235) "_") (fn cx237 (!= @cx237 ""))))) (if (= @config.methodCase "lower") (str/lower @cb235) (if (= @config.methodCase "upper") (str/upper @cb235) (if (= @config.methodCase "camel") (str/concat (default (array/first @cw236) "") (str/join (array/map (array/drop @cw236 1) (fn cy238 (str/capitalize @cy238))) "")) (if (= @config.methodCase "pascal") (str/join (array/map @cw236 (fn cy238 (str/capitalize @cy238))) "") (let ((ck239 (str/split @cb235 "_"))) (if (= @config.methodCase "split-camel") (str/concat (default (array/first @ck239) "") (str/join (array/map (array/drop @ck239 1) (fn cy238 (str/concat (str/upper (str/slice @cy238 0 1)) (str/slice @cy238 1 (str/len @cy238))))) "")) (if (= @config.methodCase "split-pascal") (str/join (array/map @ck239 (fn cy238 (str/concat (str/upper (str/slice @cy238 0 1)) (str/slice @cy238 1 (str/len @cy238))))) "") (if (= @config.methodCase "lower-camel") (let ((cl240 (str/join (array/map @ck239 (fn cy238 (str/concat (str/upper (str/slice @cy238 0 1)) (str/slice @cy238 1 (str/len @cy238))))) ""))) (str/concat (str/lower (str/slice @cl240 0 1)) (str/slice @cl240 1 (str/len @cl240)))) @cb235))))))))))]]))) (let ((f242p (str/split @config.methodName "{{"))) (str/concat (default (array/first @f242p) "") (str/join (array/map (array/drop @f242p 1) (fn f242q (let ((f242r (str/split @f242q "}}"))) (if (< (array/len @f242r) 2) (str/concat "{{" @f242q) (str/concat (object/get @v241 (default (array/first @f242r) "") (str/concat "{{" (default (array/first @f242r) "") "}}")) (str/join (array/drop @f242r 1) "}}")))))) ""))))))
1048
+ (ptype (default (array/nth (default (array/find (object/entries (object/get @t "listenTypes")) (fn lk274 (= (array/nth @lk274 0) @ev))) ["" ""]) 1) ""))
1049
+ (mname (let ((v281 : SrcVars (object/fromEntries [["event" (let ((cb275 (str/replace-pattern (str/replaceAll @ev "-" "_") "[.]" "_"))) (let ((cw276 (array/filter (str/split (str/lower @cb275) "_") (fn cx277 (!= @cx277 ""))))) (if (= @config.methodCase "lower") (str/lower @cb275) (if (= @config.methodCase "upper") (str/upper @cb275) (if (= @config.methodCase "camel") (str/concat (default (array/first @cw276) "") (str/join (array/map (array/drop @cw276 1) (fn cy278 (str/capitalize @cy278))) "")) (if (= @config.methodCase "pascal") (str/join (array/map @cw276 (fn cy278 (str/capitalize @cy278))) "") (let ((ck279 (str/split @cb275 "_"))) (if (= @config.methodCase "split-camel") (str/concat (default (array/first @ck279) "") (str/join (array/map (array/drop @ck279 1) (fn cy278 (str/concat (str/upper (str/slice @cy278 0 1)) (str/slice @cy278 1 (str/len @cy278))))) "")) (if (= @config.methodCase "split-pascal") (str/join (array/map @ck279 (fn cy278 (str/concat (str/upper (str/slice @cy278 0 1)) (str/slice @cy278 1 (str/len @cy278))))) "") (if (= @config.methodCase "lower-camel") (let ((cl280 (str/join (array/map @ck279 (fn cy278 (str/concat (str/upper (str/slice @cy278 0 1)) (str/slice @cy278 1 (str/len @cy278))))) ""))) (str/concat (str/lower (str/slice @cl280 0 1)) (str/slice @cl280 1 (str/len @cl280)))) @cb275))))))))))]]))) (let ((f282p (str/split @config.methodName "{{"))) (str/concat (default (array/first @f282p) "") (str/join (array/map (array/drop @f282p 1) (fn f282q (let ((f282r (str/split @f282q "}}"))) (if (< (array/len @f282r) 2) (str/concat "{{" @f282q) (str/concat (object/get @v281 (default (array/first @f282r) "") (str/concat "{{" (default (array/first @f282r) "") "}}")) (str/join (array/drop @f282r 1) "}}")))))) ""))))))
909
1050
  (array/concat
910
- ["" (let ((v243 : SrcVars (object/fromEntries [["i" @ind] ["method" @mname] ["payloadType" @ptype]]))) (let ((f244p (str/split (if (!= @ptype "") @config.methodOpen @config.methodOpenPlain) "{{"))) (str/concat (default (array/first @f244p) "") (str/join (array/map (array/drop @f244p 1) (fn f244q (let ((f244r (str/split @f244q "}}"))) (if (< (array/len @f244r) 2) (str/concat "{{" @f244q) (str/concat (object/get @v243 (default (array/first @f244r) "") (str/concat "{{" (default (array/first @f244r) "") "}}")) (str/join (array/drop @f244r 1) "}}")))))) ""))))]
1051
+ ["" (let ((v283 : SrcVars (object/fromEntries [["i" @ind] ["method" @mname] ["payloadType" @ptype]]))) (let ((f284p (str/split (if (!= @ptype "") @config.methodOpen @config.methodOpenPlain) "{{"))) (str/concat (default (array/first @f284p) "") (str/join (array/map (array/drop @f284p 1) (fn f284q (let ((f284r (str/split @f284q "}}"))) (if (< (array/len @f284r) 2) (str/concat "{{" @f284q) (str/concat (object/get @v283 (default (array/first @f284r) "") (str/concat "{{" (default (array/first @f284r) "") "}}")) (str/join (array/drop @f284r 1) "}}")))))) ""))))]
911
1052
  (array/flatten (array/map (array/range 0 (array/len @mine)) (fn bi
912
1053
  (let ((mi (default (array/nth @mine @bi) 0)))
913
1054
  (let ((tr (default (array/nth @trs @mi) { from: "", to: "", event: "" }))
914
1055
  (jr (default (array/nth @rs (+ @mi 1)) @nullR))
915
1056
  (base (str/concat (object/get @t "path") ".stateMachine.transitions[" @mi "]")))
916
- (let ((st (let ((v250 : SrcVars (object/fromEntries [["state" (let ((sj245 (json/stringify (object/get @tr "from")))) (let ((v248 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj245 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj245 1 (- (str/len @sj245) 1)) (fn sa246 sk247 (str/replaceAll @sa246 @sk247 (object/get @config.stringEscapes @sk247 "")))) "\""))]]))) (let ((f249p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f249p) "") (str/join (array/map (array/drop @f249p 1) (fn f249q (let ((f249r (str/split @f249q "}}"))) (if (< (array/len @f249r) 2) (str/concat "{{" @f249q) (str/concat (object/get @v248 (default (array/first @f249r) "") (str/concat "{{" (default (array/first @f249r) "") "}}")) (str/join (array/drop @f249r 1) "}}")))))) "")))))]]))) (let ((f251p (str/split @config.stateTest "{{"))) (str/concat (default (array/first @f251p) "") (str/join (array/map (array/drop @f251p 1) (fn f251q (let ((f251r (str/split @f251q "}}"))) (if (< (array/len @f251r) 2) (str/concat "{{" @f251q) (str/concat (object/get @v250 (default (array/first @f251r) "") (str/concat "{{" (default (array/first @f251r) "") "}}")) (str/join (array/drop @f251r 1) "}}")))))) "")))))
917
- (pre (let ((v252 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f253p (str/split @config.bodyPrefix "{{"))) (str/concat (default (array/first @f253p) "") (str/join (array/map (array/drop @f253p 1) (fn f253q (let ((f253r (str/split @f253q "}}"))) (if (< (array/len @f253r) 2) (str/concat "{{" @f253q) (str/concat (object/get @v252 (default (array/first @f253r) "") (str/concat "{{" (default (array/first @f253r) "") "}}")) (str/join (array/drop @f253r 1) "}}")))))) ""))))))
918
- (let ((test (if (!= (object/get @tr "guard" null) null) (let ((v254 : SrcVars (object/fromEntries [["stateTest" @st] ["guard" (default (array/nth (object/get @jr "items") 1) @config.nullLit)]]))) (let ((f255p (str/split @config.branchTest "{{"))) (str/concat (default (array/first @f255p) "") (str/join (array/map (array/drop @f255p 1) (fn f255q (let ((f255r (str/split @f255q "}}"))) (if (< (array/len @f255r) 2) (str/concat "{{" @f255q) (str/concat (object/get @v254 (default (array/first @f255r) "") (str/concat "{{" (default (array/first @f255r) "") "}}")) (str/join (array/drop @f255r 1) "}}")))))) "")))) (let ((v256 : SrcVars (object/fromEntries [["stateTest" @st]]))) (let ((f257p (str/split @config.branchTestPlain "{{"))) (str/concat (default (array/first @f257p) "") (str/join (array/map (array/drop @f257p 1) (fn f257q (let ((f257r (str/split @f257q "}}"))) (if (< (array/len @f257r) 2) (str/concat "{{" @f257q) (str/concat (object/get @v256 (default (array/first @f257r) "") (str/concat "{{" (default (array/first @f257r) "") "}}")) (str/join (array/drop @f257r 1) "}}")))))) "")))))))
1057
+ (let ((st (let ((v290 : SrcVars (object/fromEntries [["state" (let ((sj285 (json/stringify (object/get @tr "from")))) (let ((v288 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj285 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj285 1 (- (str/len @sj285) 1)) (fn sa286 sk287 (str/replaceAll @sa286 @sk287 (object/get @config.stringEscapes @sk287 "")))) "\""))]]))) (let ((f289p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f289p) "") (str/join (array/map (array/drop @f289p 1) (fn f289q (let ((f289r (str/split @f289q "}}"))) (if (< (array/len @f289r) 2) (str/concat "{{" @f289q) (str/concat (object/get @v288 (default (array/first @f289r) "") (str/concat "{{" (default (array/first @f289r) "") "}}")) (str/join (array/drop @f289r 1) "}}")))))) "")))))]]))) (let ((f291p (str/split @config.stateTest "{{"))) (str/concat (default (array/first @f291p) "") (str/join (array/map (array/drop @f291p 1) (fn f291q (let ((f291r (str/split @f291q "}}"))) (if (< (array/len @f291r) 2) (str/concat "{{" @f291q) (str/concat (object/get @v290 (default (array/first @f291r) "") (str/concat "{{" (default (array/first @f291r) "") "}}")) (str/join (array/drop @f291r 1) "}}")))))) "")))))
1058
+ (pre (let ((v292 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f293p (str/split @config.bodyPrefix "{{"))) (str/concat (default (array/first @f293p) "") (str/join (array/map (array/drop @f293p 1) (fn f293q (let ((f293r (str/split @f293q "}}"))) (if (< (array/len @f293r) 2) (str/concat "{{" @f293q) (str/concat (object/get @v292 (default (array/first @f293r) "") (str/concat "{{" (default (array/first @f293r) "") "}}")) (str/join (array/drop @f293r 1) "}}")))))) ""))))))
1059
+ (let ((test (if (!= (object/get @tr "guard" null) null) (let ((v294 : SrcVars (object/fromEntries [["stateTest" @st] ["guard" (default (array/nth (object/get @jr "items") 1) @config.nullLit)]]))) (let ((f295p (str/split @config.branchTest "{{"))) (str/concat (default (array/first @f295p) "") (str/join (array/map (array/drop @f295p 1) (fn f295q (let ((f295r (str/split @f295q "}}"))) (if (< (array/len @f295r) 2) (str/concat "{{" @f295q) (str/concat (object/get @v294 (default (array/first @f295r) "") (str/concat "{{" (default (array/first @f295r) "") "}}")) (str/join (array/drop @f295r 1) "}}")))))) "")))) (let ((v296 : SrcVars (object/fromEntries [["stateTest" @st]]))) (let ((f297p (str/split @config.branchTestPlain "{{"))) (str/concat (default (array/first @f297p) "") (str/join (array/map (array/drop @f297p 1) (fn f297q (let ((f297r (str/split @f297q "}}"))) (if (< (array/len @f297r) 2) (str/concat "{{" @f297q) (str/concat (object/get @v296 (default (array/first @f297r) "") (str/concat "{{" (default (array/first @f297r) "") "}}")) (str/join (array/drop @f297r 1) "}}")))))) "")))))))
919
1060
  (array/map
920
1061
  (array/concat
921
- [(let ((v258 : SrcVars (object/fromEntries [["i" @ind] ["test" @test]]))) (let ((f259p (str/split (if (= @bi 0) @config.branchFirst @config.branchNext) "{{"))) (str/concat (default (array/first @f259p) "") (str/join (array/map (array/drop @f259p 1) (fn f259q (let ((f259r (str/split @f259q "}}"))) (if (< (array/len @f259r) 2) (str/concat "{{" @f259q) (str/concat (object/get @v258 (default (array/first @f259r) "") (str/concat "{{" (default (array/first @f259r) "") "}}")) (str/join (array/drop @f259r 1) "}}")))))) ""))))]
1062
+ [(let ((v298 : SrcVars (object/fromEntries [["i" @ind] ["test" @test]]))) (let ((f299p (str/split (if (= @bi 0) @config.branchFirst @config.branchNext) "{{"))) (str/concat (default (array/first @f299p) "") (str/join (array/map (array/drop @f299p 1) (fn f299q (let ((f299r (str/split @f299q "}}"))) (if (< (array/len @f299r) 2) (str/concat "{{" @f299q) (str/concat (object/get @v298 (default (array/first @f299r) "") (str/concat "{{" (default (array/first @f299r) "") "}}")) (str/join (array/drop @f299r 1) "}}")))))) ""))))]
922
1063
  (array/map (array/flatten (array/drop (object/get @jr "stmts") 2)) (fn l (str/concat @pre @l)))
923
- [(str/concat @pre (let ((v265 : SrcVars (object/fromEntries [["state" (let ((sj260 (json/stringify (object/get @tr "to")))) (let ((v263 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj260 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj260 1 (- (str/len @sj260) 1)) (fn sa261 sk262 (str/replaceAll @sa261 @sk262 (object/get @config.stringEscapes @sk262 "")))) "\""))]]))) (let ((f264p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f264p) "") (str/join (array/map (array/drop @f264p 1) (fn f264q (let ((f264r (str/split @f264q "}}"))) (if (< (array/len @f264r) 2) (str/concat "{{" @f264q) (str/concat (object/get @v263 (default (array/first @f264r) "") (str/concat "{{" (default (array/first @f264r) "") "}}")) (str/join (array/drop @f264r 1) "}}")))))) "")))))]]))) (let ((f266p (str/split @config.stateAssign "{{"))) (str/concat (default (array/first @f266p) "") (str/join (array/map (array/drop @f266p 1) (fn f266q (let ((f266r (str/split @f266q "}}"))) (if (< (array/len @f266r) 2) (str/concat "{{" @f266q) (str/concat (object/get @v265 (default (array/first @f266r) "") (str/concat "{{" (default (array/first @f266r) "") "}}")) (str/join (array/drop @f266r 1) "}}")))))) "")))) @config.terminator)])
924
- (fn l (let ((rs267p (str/split @l "\u{e000}"))) (str/concat (default (array/first @rs267p) "") (str/join (array/map (array/drop @rs267p 1) (fn rs267q (let ((rs267rest (str/replace-pattern @rs267q "^[^\u{e001}-\u{e00c}]*" ""))) (let ((rs267rel (str/slice @rs267q 0 (- (str/len @rs267q) (str/len @rs267rest)))) (rs267c (str/slice @rs267rest 0 1)) (rs267afterc (str/slice @rs267rest 1 (str/len @rs267rest)))) (let ((rs267lead (default (array/first (str/split (str/slice @rs267rel 1 (str/len @rs267rel)) "]")) "")) (rs267after (str/join (array/drop (str/split @rs267rel "]") 1) "]"))) (let ((rs267abs (str/concat @base (if (= @rs267lead "1") ".guard" (str/concat ".effects[" (- (default (str/to-int @rs267lead) 2) 2) "]")) @rs267after))) (let ((rs267ty (default (array/nth (default (array/find (object/entries @entity.types) (fn rs267e (= (array/nth @rs267e 0) @rs267abs))) ["" ""]) 1) "")) (rs267ex (default (array/nth (default (array/find (object/entries @entity.expected) (fn rs267x (= (array/nth @rs267x 0) @rs267abs))) ["" ""]) 1) ""))) (let ((rs267mapped (default (array/nth (default (array/find (object/entries @config.typeNames) (fn rs267n (= (array/nth @rs267n 0) @rs267ty))) ["" ""]) 1) ""))) (if (= @rs267c "\u{e001}") (str/concat (if (= @rs267ty "") @config.typeUnknown (if (!= @rs267mapped "") @rs267mapped @rs267ty)) @rs267afterc) (if (= @rs267c "\u{e002}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:"))) (str/concat (if (str/includes @rs267ex ".") (default (array/nth (str/split (let ((v278 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs267ex ".")) "")] ["arm" (let ((cb272 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs267ex ".") 1) @rs267ex) "-" "_") "[.]" "_"))) (let ((cw273 (array/filter (str/split (str/lower @cb272) "_") (fn cx274 (!= @cx274 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb272) (if (= @config.unionArmCase "upper") (str/upper @cb272) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw273) "") (str/join (array/map (array/drop @cw273 1) (fn cy275 (str/capitalize @cy275))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw273 (fn cy275 (str/capitalize @cy275))) "") (let ((ck276 (str/split @cb272 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck276) "") (str/join (array/map (array/drop @ck276 1) (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck276 (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl277 (str/join (array/map @ck276 (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) ""))) (str/concat (str/lower (str/slice @cl277 0 1)) (str/slice @cl277 1 (str/len @cl277)))) @cb272))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f279p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f279p) "") (str/join (array/map (array/drop @f279p 1) (fn f279q (let ((f279r (str/split @f279q "}}"))) (if (< (array/len @f279r) 2) (str/concat "{{" @f279q) (str/concat (object/get @v278 (default (array/first @f279r) "") (str/concat "{{" (default (array/first @f279r) "") "}}")) (str/join (array/drop @f279r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") "") (default (array/nth (str/split (let ((v268 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs267ex ".") 1) @rs267ex)] ["fields" "\u{e0ff}"]]))) (let ((f269p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f269p) "") (str/join (array/map (array/drop @f269p 1) (fn f269q (let ((f269r (str/split @f269q "}}"))) (if (< (array/len @f269r) 2) (str/concat "{{" @f269q) (str/concat (object/get @v268 (default (array/first @f269r) "") (str/concat "{{" (default (array/first @f269r) "") "}}")) (str/join (array/drop @f269r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) @config.mapOpen) @rs267afterc) (if (= @rs267c "\u{e003}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:"))) (default (array/nth (str/split (let ((v288 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames (default (array/first (str/split @rs267afterc "\u{e004}")) "") null) (let ((cb282 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs267afterc "\u{e004}")) "") "-" "_") "[.]" "_"))) (let ((cw283 (array/filter (str/split (str/lower @cb282) "_") (fn cx284 (!= @cx284 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb282) (if (= @config.fieldCase "upper") (str/upper @cb282) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw283) "") (str/join (array/map (array/drop @cw283 1) (fn cy285 (str/capitalize @cy285))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw283 (fn cy285 (str/capitalize @cy285))) "") (let ((ck286 (str/split @cb282 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck286) "") (str/join (array/map (array/drop @ck286 1) (fn cy285 (str/concat (str/upper (str/slice @cy285 0 1)) (str/slice @cy285 1 (str/len @cy285))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck286 (fn cy285 (str/concat (str/upper (str/slice @cy285 0 1)) (str/slice @cy285 1 (str/len @cy285))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl287 (str/join (array/map @ck286 (fn cy285 (str/concat (str/upper (str/slice @cy285 0 1)) (str/slice @cy285 1 (str/len @cy285))))) ""))) (str/concat (str/lower (str/slice @cl287 0 1)) (str/slice @cl287 1 (str/len @cl287)))) @cb282)))))))))))] ["value" "\u{e0ff}"]]))) (let ((f289p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f289p) "") (str/join (array/map (array/drop @f289p 1) (fn f289q (let ((f289r (str/split @f289q "}}"))) (if (< (array/len @f289r) 2) (str/concat "{{" @f289q) (str/concat (object/get @v288 (default (array/first @f289r) "") (str/concat "{{" (default (array/first @f289r) "") "}}")) (str/join (array/drop @f289r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") (default (array/nth (str/split (let ((v297 : SrcVars (object/fromEntries [["key" (let ((sj292 (json/stringify (default (array/first (str/split @rs267afterc "\u{e004}")) "")))) (let ((v295 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj292 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj292 1 (- (str/len @sj292) 1)) (fn sa293 sk294 (str/replaceAll @sa293 @sk294 (object/get @config.stringEscapes @sk294 "")))) "\""))]]))) (let ((f296p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f296p) "") (str/join (array/map (array/drop @f296p 1) (fn f296q (let ((f296r (str/split @f296q "}}"))) (if (< (array/len @f296r) 2) (str/concat "{{" @f296q) (str/concat (object/get @v295 (default (array/first @f296r) "") (str/concat "{{" (default (array/first @f296r) "") "}}")) (str/join (array/drop @f296r 1) "}}")))))) "")))))] ["value" "\u{e0ff}"]]))) (let ((f298p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f298p) "") (str/join (array/map (array/drop @f298p 1) (fn f298q (let ((f298r (str/split @f298q "}}"))) (if (< (array/len @f298r) 2) (str/concat "{{" @f298q) (str/concat (object/get @v297 (default (array/first @f298r) "") (str/concat "{{" (default (array/first @f298r) "") "}}")) (str/join (array/drop @f298r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) (str/join (array/drop (str/split @rs267afterc "\u{e004}") 1) "\u{e004}")) (if (= @rs267c "\u{e005}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:"))) (default (array/nth (str/split (let ((v290 : SrcVars (object/fromEntries [["name" ""] ["value" "\u{e0ff}"]]))) (let ((f291p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f291p) "") (str/join (array/map (array/drop @f291p 1) (fn f291q (let ((f291r (str/split @f291q "}}"))) (if (< (array/len @f291r) 2) (str/concat "{{" @f291q) (str/concat (object/get @v290 (default (array/first @f291r) "") (str/concat "{{" (default (array/first @f291r) "") "}}")) (str/join (array/drop @f291r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (default (array/nth (str/split (let ((v299 : SrcVars (object/fromEntries [["key" ""] ["value" "\u{e0ff}"]]))) (let ((f300p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f300p) "") (str/join (array/map (array/drop @f300p 1) (fn f300q (let ((f300r (str/split @f300q "}}"))) (if (< (array/len @f300r) 2) (str/concat "{{" @f300q) (str/concat (object/get @v299 (default (array/first @f300r) "") (str/concat "{{" (default (array/first @f300r) "") "}}")) (str/join (array/drop @f300r 1) "}}")))))) "")))) "\u{e0ff}") 1) "")) @rs267afterc) (if (= @rs267c "\u{e006}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:"))) @config.recordSep @config.mapSep) @rs267afterc) (if (= @rs267c "\u{e007}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:"))) (str/concat (default (array/nth (str/split (let ((v270 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs267ex ".") 1) @rs267ex)] ["fields" "\u{e0ff}"]]))) (let ((f271p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f271p) "") (str/join (array/map (array/drop @f271p 1) (fn f271q (let ((f271r (str/split @f271q "}}"))) (if (< (array/len @f271r) 2) (str/concat "{{" @f271q) (str/concat (object/get @v270 (default (array/first @f271r) "") (str/concat "{{" (default (array/first @f271r) "") "}}")) (str/join (array/drop @f271r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (if (str/includes @rs267ex ".") (default (array/nth (str/split (let ((v280 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs267ex ".")) "")] ["arm" (let ((cb272 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs267ex ".") 1) @rs267ex) "-" "_") "[.]" "_"))) (let ((cw273 (array/filter (str/split (str/lower @cb272) "_") (fn cx274 (!= @cx274 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb272) (if (= @config.unionArmCase "upper") (str/upper @cb272) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw273) "") (str/join (array/map (array/drop @cw273 1) (fn cy275 (str/capitalize @cy275))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw273 (fn cy275 (str/capitalize @cy275))) "") (let ((ck276 (str/split @cb272 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck276) "") (str/join (array/map (array/drop @ck276 1) (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck276 (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl277 (str/join (array/map @ck276 (fn cy275 (str/concat (str/upper (str/slice @cy275 0 1)) (str/slice @cy275 1 (str/len @cy275))))) ""))) (str/concat (str/lower (str/slice @cl277 0 1)) (str/slice @cl277 1 (str/len @cl277)))) @cb272))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f281p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f281p) "") (str/join (array/map (array/drop @f281p 1) (fn f281q (let ((f281r (str/split @f281q "}}"))) (if (< (array/len @f281r) 2) (str/concat "{{" @f281q) (str/concat (object/get @v280 (default (array/first @f281r) "") (str/concat "{{" (default (array/first @f281r) "") "}}")) (str/join (array/drop @f281r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") "")) @config.mapClose) @rs267afterc) (if (= @rs267c "\u{e008}") (str/concat (if (and (!= @config.enumForm "") (str/startsWith @rs267ex "enum:")) (let ((v307 : SrcVars (object/fromEntries [["enum" (str/slice @rs267ex 5 (str/len @rs267ex))] ["member" (let ((cb301 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs267afterc "\u{e009}")) "") "-" "_") "[.]" "_"))) (let ((cw302 (array/filter (str/split (str/lower @cb301) "_") (fn cx303 (!= @cx303 ""))))) (if (= @config.enumMemberCase "lower") (str/lower @cb301) (if (= @config.enumMemberCase "upper") (str/upper @cb301) (if (= @config.enumMemberCase "camel") (str/concat (default (array/first @cw302) "") (str/join (array/map (array/drop @cw302 1) (fn cy304 (str/capitalize @cy304))) "")) (if (= @config.enumMemberCase "pascal") (str/join (array/map @cw302 (fn cy304 (str/capitalize @cy304))) "") (let ((ck305 (str/split @cb301 "_"))) (if (= @config.enumMemberCase "split-camel") (str/concat (default (array/first @ck305) "") (str/join (array/map (array/drop @ck305 1) (fn cy304 (str/concat (str/upper (str/slice @cy304 0 1)) (str/slice @cy304 1 (str/len @cy304))))) "")) (if (= @config.enumMemberCase "split-pascal") (str/join (array/map @ck305 (fn cy304 (str/concat (str/upper (str/slice @cy304 0 1)) (str/slice @cy304 1 (str/len @cy304))))) "") (if (= @config.enumMemberCase "lower-camel") (let ((cl306 (str/join (array/map @ck305 (fn cy304 (str/concat (str/upper (str/slice @cy304 0 1)) (str/slice @cy304 1 (str/len @cy304))))) ""))) (str/concat (str/lower (str/slice @cl306 0 1)) (str/slice @cl306 1 (str/len @cl306)))) @cb301))))))))))]]))) (let ((f308p (str/split @config.enumForm "{{"))) (str/concat (default (array/first @f308p) "") (str/join (array/map (array/drop @f308p 1) (fn f308q (let ((f308r (str/split @f308q "}}"))) (if (< (array/len @f308r) 2) (str/concat "{{" @f308q) (str/concat (object/get @v307 (default (array/first @f308r) "") (str/concat "{{" (default (array/first @f308r) "") "}}")) (str/join (array/drop @f308r 1) "}}")))))) "")))) (default (array/first (str/split (str/join (array/drop (str/split @rs267afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}")) "")) (str/join (array/drop (str/split (str/join (array/drop (str/split @rs267afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}") 1) "\u{e00a}")) (if (= @rs267c "\u{e00b}") (str/concat (if (and (!= @config.recordForm "") (!= @rs267ex "") (not (str/startsWith @rs267ex "enum:")) (not (str/includes @rs267ex ".")) (object/has @entity.models @rs267ex)) (let ((v326 : SrcVars (object/fromEntries [["type" @rs267ex] ["fields" (str/join (array/map (default (object/get @entity.models @rs267ex null) []) (fn rm309 (let ((v324 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm309 null) (let ((cb310 (str/replace-pattern (str/replaceAll @rm309 "-" "_") "[.]" "_"))) (let ((cw311 (array/filter (str/split (str/lower @cb310) "_") (fn cx312 (!= @cx312 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb310) (if (= @config.fieldCase "upper") (str/upper @cb310) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw311) "") (str/join (array/map (array/drop @cw311 1) (fn cy313 (str/capitalize @cy313))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw311 (fn cy313 (str/capitalize @cy313))) "") (let ((ck314 (str/split @cb310 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck314) "") (str/join (array/map (array/drop @ck314 1) (fn cy313 (str/concat (str/upper (str/slice @cy313 0 1)) (str/slice @cy313 1 (str/len @cy313))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck314 (fn cy313 (str/concat (str/upper (str/slice @cy313 0 1)) (str/slice @cy313 1 (str/len @cy313))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl315 (str/join (array/map @ck314 (fn cy313 (str/concat (str/upper (str/slice @cy313 0 1)) (str/slice @cy313 1 (str/len @cy313))))) ""))) (str/concat (str/lower (str/slice @cl315 0 1)) (str/slice @cl315 1 (str/len @cl315)))) @cb310)))))))))))] ["value" (str/concat (default (array/first (str/split @rs267afterc "\u{e00c}")) "") (let ((v322 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm309 null) (let ((cb316 (str/replace-pattern (str/replaceAll @rm309 "-" "_") "[.]" "_"))) (let ((cw317 (array/filter (str/split (str/lower @cb316) "_") (fn cx318 (!= @cx318 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb316) (if (= @config.fieldCase "upper") (str/upper @cb316) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw317) "") (str/join (array/map (array/drop @cw317 1) (fn cy319 (str/capitalize @cy319))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw317 (fn cy319 (str/capitalize @cy319))) "") (let ((ck320 (str/split @cb316 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck320) "") (str/join (array/map (array/drop @ck320 1) (fn cy319 (str/concat (str/upper (str/slice @cy319 0 1)) (str/slice @cy319 1 (str/len @cy319))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck320 (fn cy319 (str/concat (str/upper (str/slice @cy319 0 1)) (str/slice @cy319 1 (str/len @cy319))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl321 (str/join (array/map @ck320 (fn cy319 (str/concat (str/upper (str/slice @cy319 0 1)) (str/slice @cy319 1 (str/len @cy319))))) ""))) (str/concat (str/lower (str/slice @cl321 0 1)) (str/slice @cl321 1 (str/len @cl321)))) @cb316)))))))))))]]))) (let ((f323p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f323p) "") (str/join (array/map (array/drop @f323p 1) (fn f323q (let ((f323r (str/split @f323q "}}"))) (if (< (array/len @f323r) 2) (str/concat "{{" @f323q) (str/concat (object/get @v322 (default (array/first @f323r) "") (str/concat "{{" (default (array/first @f323r) "") "}}")) (str/join (array/drop @f323r 1) "}}")))))) "")))))]]))) (let ((f325p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f325p) "") (str/join (array/map (array/drop @f325p 1) (fn f325q (let ((f325r (str/split @f325q "}}"))) (if (< (array/len @f325r) 2) (str/concat "{{" @f325q) (str/concat (object/get @v324 (default (array/first @f325r) "") (str/concat "{{" (default (array/first @f325r) "") "}}")) (str/join (array/drop @f325r 1) "}}")))))) "")))))) @config.recordSep)]]))) (let ((f327p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f327p) "") (str/join (array/map (array/drop @f327p 1) (fn f327q (let ((f327r (str/split @f327q "}}"))) (if (< (array/len @f327r) 2) (str/concat "{{" @f327q) (str/concat (object/get @v326 (default (array/first @f327r) "") (str/concat "{{" (default (array/first @f327r) "") "}}")) (str/join (array/drop @f327r 1) "}}")))))) "")))) (default (array/first (str/split @rs267afterc "\u{e00c}")) "")) (str/join (array/drop (str/split @rs267afterc "\u{e00c}") 1) "\u{e00c}")) (str/concat "\u{e000}" @rs267q))))))))))))))))) ""))))))))))))
925
- (if (!= @config.branchClose "") [(let ((v328 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f329p (str/split @config.branchClose "{{"))) (str/concat (default (array/first @f329p) "") (str/join (array/map (array/drop @f329p 1) (fn f329q (let ((f329r (str/split @f329q "}}"))) (if (< (array/len @f329r) 2) (str/concat "{{" @f329q) (str/concat (object/get @v328 (default (array/first @f329r) "") (str/concat "{{" (default (array/first @f329r) "") "}}")) (str/join (array/drop @f329r 1) "}}")))))) ""))))] [])
926
- (if (!= @config.methodClose "") [(let ((v330 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f331p (str/split @config.methodClose "{{"))) (str/concat (default (array/first @f331p) "") (str/join (array/map (array/drop @f331p 1) (fn f331q (let ((f331r (str/split @f331q "}}"))) (if (< (array/len @f331r) 2) (str/concat "{{" @f331q) (str/concat (object/get @v330 (default (array/first @f331r) "") (str/concat "{{" (default (array/first @f331r) "") "}}")) (str/join (array/drop @f331r 1) "}}")))))) ""))))] []))))))
927
- (if (!= @config.classClose "") [(let ((v332 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f333p (str/split @config.classClose "{{"))) (str/concat (default (array/first @f333p) "") (str/join (array/map (array/drop @f333p 1) (fn f333q (let ((f333r (str/split @f333q "}}"))) (if (< (array/len @f333r) 2) (str/concat "{{" @f333q) (str/concat (object/get @v332 (default (array/first @f333r) "") (str/concat "{{" (default (array/first @f333r) "") "}}")) (str/join (array/drop @f333r 1) "}}")))))) ""))))] []))))))))))
1064
+ [(str/concat @pre (let ((v305 : SrcVars (object/fromEntries [["state" (let ((sj300 (json/stringify (object/get @tr "to")))) (let ((v303 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj300 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj300 1 (- (str/len @sj300) 1)) (fn sa301 sk302 (str/replaceAll @sa301 @sk302 (object/get @config.stringEscapes @sk302 "")))) "\""))]]))) (let ((f304p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f304p) "") (str/join (array/map (array/drop @f304p 1) (fn f304q (let ((f304r (str/split @f304q "}}"))) (if (< (array/len @f304r) 2) (str/concat "{{" @f304q) (str/concat (object/get @v303 (default (array/first @f304r) "") (str/concat "{{" (default (array/first @f304r) "") "}}")) (str/join (array/drop @f304r 1) "}}")))))) "")))))]]))) (let ((f306p (str/split @config.stateAssign "{{"))) (str/concat (default (array/first @f306p) "") (str/join (array/map (array/drop @f306p 1) (fn f306q (let ((f306r (str/split @f306q "}}"))) (if (< (array/len @f306r) 2) (str/concat "{{" @f306q) (str/concat (object/get @v305 (default (array/first @f306r) "") (str/concat "{{" (default (array/first @f306r) "") "}}")) (str/join (array/drop @f306r 1) "}}")))))) "")))) @config.terminator)])
1065
+ (fn l (let ((rs307p (str/split @l "\u{e000}"))) (str/concat (default (array/first @rs307p) "") (str/join (array/map (array/drop @rs307p 1) (fn rs307q (let ((rs307rest (str/replace-pattern @rs307q "^[^\u{e001}-\u{e00c}]*" ""))) (let ((rs307rel (str/slice @rs307q 0 (- (str/len @rs307q) (str/len @rs307rest)))) (rs307c (str/slice @rs307rest 0 1)) (rs307afterc (str/slice @rs307rest 1 (str/len @rs307rest)))) (let ((rs307lead (default (array/first (str/split (str/slice @rs307rel 1 (str/len @rs307rel)) "]")) "")) (rs307after (str/join (array/drop (str/split @rs307rel "]") 1) "]"))) (let ((rs307abs (str/concat @base (if (= @rs307lead "1") ".guard" (str/concat ".effects[" (- (default (str/to-int @rs307lead) 2) 2) "]")) @rs307after))) (let ((rs307ty (default (array/nth (default (array/find (object/entries @entity.types) (fn rs307e (= (array/nth @rs307e 0) @rs307abs))) ["" ""]) 1) "")) (rs307ex (default (array/nth (default (array/find (object/entries @entity.expected) (fn rs307x (= (array/nth @rs307x 0) @rs307abs))) ["" ""]) 1) ""))) (let ((rs307mapped (default (array/nth (default (array/find (object/entries @config.typeNames) (fn rs307n (= (array/nth @rs307n 0) @rs307ty))) ["" ""]) 1) ""))) (if (= @rs307c "\u{e001}") (str/concat (if (= @rs307ty "") @config.typeUnknown (if (!= @rs307mapped "") @rs307mapped @rs307ty)) @rs307afterc) (if (= @rs307c "\u{e002}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:"))) (str/concat (if (str/includes @rs307ex ".") (default (array/nth (str/split (let ((v318 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs307ex ".")) "")] ["arm" (let ((cb312 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs307ex ".") 1) @rs307ex) "-" "_") "[.]" "_"))) (let ((cw313 (array/filter (str/split (str/lower @cb312) "_") (fn cx314 (!= @cx314 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb312) (if (= @config.unionArmCase "upper") (str/upper @cb312) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw313) "") (str/join (array/map (array/drop @cw313 1) (fn cy315 (str/capitalize @cy315))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw313 (fn cy315 (str/capitalize @cy315))) "") (let ((ck316 (str/split @cb312 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck316) "") (str/join (array/map (array/drop @ck316 1) (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck316 (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl317 (str/join (array/map @ck316 (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) ""))) (str/concat (str/lower (str/slice @cl317 0 1)) (str/slice @cl317 1 (str/len @cl317)))) @cb312))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f319p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f319p) "") (str/join (array/map (array/drop @f319p 1) (fn f319q (let ((f319r (str/split @f319q "}}"))) (if (< (array/len @f319r) 2) (str/concat "{{" @f319q) (str/concat (object/get @v318 (default (array/first @f319r) "") (str/concat "{{" (default (array/first @f319r) "") "}}")) (str/join (array/drop @f319r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") "") (default (array/nth (str/split (let ((v308 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs307ex ".") 1) @rs307ex)] ["fields" "\u{e0ff}"]]))) (let ((f309p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f309p) "") (str/join (array/map (array/drop @f309p 1) (fn f309q (let ((f309r (str/split @f309q "}}"))) (if (< (array/len @f309r) 2) (str/concat "{{" @f309q) (str/concat (object/get @v308 (default (array/first @f309r) "") (str/concat "{{" (default (array/first @f309r) "") "}}")) (str/join (array/drop @f309r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) @config.mapOpen) @rs307afterc) (if (= @rs307c "\u{e003}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:"))) (default (array/nth (str/split (let ((v328 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames (default (array/first (str/split @rs307afterc "\u{e004}")) "") null) (let ((cb322 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs307afterc "\u{e004}")) "") "-" "_") "[.]" "_"))) (let ((cw323 (array/filter (str/split (str/lower @cb322) "_") (fn cx324 (!= @cx324 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb322) (if (= @config.fieldCase "upper") (str/upper @cb322) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw323) "") (str/join (array/map (array/drop @cw323 1) (fn cy325 (str/capitalize @cy325))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw323 (fn cy325 (str/capitalize @cy325))) "") (let ((ck326 (str/split @cb322 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck326) "") (str/join (array/map (array/drop @ck326 1) (fn cy325 (str/concat (str/upper (str/slice @cy325 0 1)) (str/slice @cy325 1 (str/len @cy325))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck326 (fn cy325 (str/concat (str/upper (str/slice @cy325 0 1)) (str/slice @cy325 1 (str/len @cy325))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl327 (str/join (array/map @ck326 (fn cy325 (str/concat (str/upper (str/slice @cy325 0 1)) (str/slice @cy325 1 (str/len @cy325))))) ""))) (str/concat (str/lower (str/slice @cl327 0 1)) (str/slice @cl327 1 (str/len @cl327)))) @cb322)))))))))))] ["value" "\u{e0ff}"]]))) (let ((f329p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f329p) "") (str/join (array/map (array/drop @f329p 1) (fn f329q (let ((f329r (str/split @f329q "}}"))) (if (< (array/len @f329r) 2) (str/concat "{{" @f329q) (str/concat (object/get @v328 (default (array/first @f329r) "") (str/concat "{{" (default (array/first @f329r) "") "}}")) (str/join (array/drop @f329r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") (default (array/nth (str/split (let ((v337 : SrcVars (object/fromEntries [["key" (let ((sj332 (json/stringify (default (array/first (str/split @rs307afterc "\u{e004}")) "")))) (let ((v335 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj332 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj332 1 (- (str/len @sj332) 1)) (fn sa333 sk334 (str/replaceAll @sa333 @sk334 (object/get @config.stringEscapes @sk334 "")))) "\""))]]))) (let ((f336p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f336p) "") (str/join (array/map (array/drop @f336p 1) (fn f336q (let ((f336r (str/split @f336q "}}"))) (if (< (array/len @f336r) 2) (str/concat "{{" @f336q) (str/concat (object/get @v335 (default (array/first @f336r) "") (str/concat "{{" (default (array/first @f336r) "") "}}")) (str/join (array/drop @f336r 1) "}}")))))) "")))))] ["value" "\u{e0ff}"]]))) (let ((f338p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f338p) "") (str/join (array/map (array/drop @f338p 1) (fn f338q (let ((f338r (str/split @f338q "}}"))) (if (< (array/len @f338r) 2) (str/concat "{{" @f338q) (str/concat (object/get @v337 (default (array/first @f338r) "") (str/concat "{{" (default (array/first @f338r) "") "}}")) (str/join (array/drop @f338r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) (str/join (array/drop (str/split @rs307afterc "\u{e004}") 1) "\u{e004}")) (if (= @rs307c "\u{e005}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:"))) (default (array/nth (str/split (let ((v330 : SrcVars (object/fromEntries [["name" ""] ["value" "\u{e0ff}"]]))) (let ((f331p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f331p) "") (str/join (array/map (array/drop @f331p 1) (fn f331q (let ((f331r (str/split @f331q "}}"))) (if (< (array/len @f331r) 2) (str/concat "{{" @f331q) (str/concat (object/get @v330 (default (array/first @f331r) "") (str/concat "{{" (default (array/first @f331r) "") "}}")) (str/join (array/drop @f331r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (default (array/nth (str/split (let ((v339 : SrcVars (object/fromEntries [["key" ""] ["value" "\u{e0ff}"]]))) (let ((f340p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f340p) "") (str/join (array/map (array/drop @f340p 1) (fn f340q (let ((f340r (str/split @f340q "}}"))) (if (< (array/len @f340r) 2) (str/concat "{{" @f340q) (str/concat (object/get @v339 (default (array/first @f340r) "") (str/concat "{{" (default (array/first @f340r) "") "}}")) (str/join (array/drop @f340r 1) "}}")))))) "")))) "\u{e0ff}") 1) "")) @rs307afterc) (if (= @rs307c "\u{e006}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:"))) @config.recordSep @config.mapSep) @rs307afterc) (if (= @rs307c "\u{e007}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:"))) (str/concat (default (array/nth (str/split (let ((v310 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs307ex ".") 1) @rs307ex)] ["fields" "\u{e0ff}"]]))) (let ((f311p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f311p) "") (str/join (array/map (array/drop @f311p 1) (fn f311q (let ((f311r (str/split @f311q "}}"))) (if (< (array/len @f311r) 2) (str/concat "{{" @f311q) (str/concat (object/get @v310 (default (array/first @f311r) "") (str/concat "{{" (default (array/first @f311r) "") "}}")) (str/join (array/drop @f311r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (if (str/includes @rs307ex ".") (default (array/nth (str/split (let ((v320 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs307ex ".")) "")] ["arm" (let ((cb312 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs307ex ".") 1) @rs307ex) "-" "_") "[.]" "_"))) (let ((cw313 (array/filter (str/split (str/lower @cb312) "_") (fn cx314 (!= @cx314 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb312) (if (= @config.unionArmCase "upper") (str/upper @cb312) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw313) "") (str/join (array/map (array/drop @cw313 1) (fn cy315 (str/capitalize @cy315))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw313 (fn cy315 (str/capitalize @cy315))) "") (let ((ck316 (str/split @cb312 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck316) "") (str/join (array/map (array/drop @ck316 1) (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck316 (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl317 (str/join (array/map @ck316 (fn cy315 (str/concat (str/upper (str/slice @cy315 0 1)) (str/slice @cy315 1 (str/len @cy315))))) ""))) (str/concat (str/lower (str/slice @cl317 0 1)) (str/slice @cl317 1 (str/len @cl317)))) @cb312))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f321p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f321p) "") (str/join (array/map (array/drop @f321p 1) (fn f321q (let ((f321r (str/split @f321q "}}"))) (if (< (array/len @f321r) 2) (str/concat "{{" @f321q) (str/concat (object/get @v320 (default (array/first @f321r) "") (str/concat "{{" (default (array/first @f321r) "") "}}")) (str/join (array/drop @f321r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") "")) @config.mapClose) @rs307afterc) (if (= @rs307c "\u{e008}") (str/concat (if (and (!= @config.enumForm "") (str/startsWith @rs307ex "enum:")) (let ((v347 : SrcVars (object/fromEntries [["enum" (str/slice @rs307ex 5 (str/len @rs307ex))] ["member" (let ((cb341 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs307afterc "\u{e009}")) "") "-" "_") "[.]" "_"))) (let ((cw342 (array/filter (str/split (str/lower @cb341) "_") (fn cx343 (!= @cx343 ""))))) (if (= @config.enumMemberCase "lower") (str/lower @cb341) (if (= @config.enumMemberCase "upper") (str/upper @cb341) (if (= @config.enumMemberCase "camel") (str/concat (default (array/first @cw342) "") (str/join (array/map (array/drop @cw342 1) (fn cy344 (str/capitalize @cy344))) "")) (if (= @config.enumMemberCase "pascal") (str/join (array/map @cw342 (fn cy344 (str/capitalize @cy344))) "") (let ((ck345 (str/split @cb341 "_"))) (if (= @config.enumMemberCase "split-camel") (str/concat (default (array/first @ck345) "") (str/join (array/map (array/drop @ck345 1) (fn cy344 (str/concat (str/upper (str/slice @cy344 0 1)) (str/slice @cy344 1 (str/len @cy344))))) "")) (if (= @config.enumMemberCase "split-pascal") (str/join (array/map @ck345 (fn cy344 (str/concat (str/upper (str/slice @cy344 0 1)) (str/slice @cy344 1 (str/len @cy344))))) "") (if (= @config.enumMemberCase "lower-camel") (let ((cl346 (str/join (array/map @ck345 (fn cy344 (str/concat (str/upper (str/slice @cy344 0 1)) (str/slice @cy344 1 (str/len @cy344))))) ""))) (str/concat (str/lower (str/slice @cl346 0 1)) (str/slice @cl346 1 (str/len @cl346)))) @cb341))))))))))]]))) (let ((f348p (str/split @config.enumForm "{{"))) (str/concat (default (array/first @f348p) "") (str/join (array/map (array/drop @f348p 1) (fn f348q (let ((f348r (str/split @f348q "}}"))) (if (< (array/len @f348r) 2) (str/concat "{{" @f348q) (str/concat (object/get @v347 (default (array/first @f348r) "") (str/concat "{{" (default (array/first @f348r) "") "}}")) (str/join (array/drop @f348r 1) "}}")))))) "")))) (default (array/first (str/split (str/join (array/drop (str/split @rs307afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}")) "")) (str/join (array/drop (str/split (str/join (array/drop (str/split @rs307afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}") 1) "\u{e00a}")) (if (= @rs307c "\u{e00b}") (str/concat (if (and (!= @config.recordForm "") (!= @rs307ex "") (not (str/startsWith @rs307ex "enum:")) (not (str/includes @rs307ex ".")) (object/has @entity.models @rs307ex)) (let ((v366 : SrcVars (object/fromEntries [["type" @rs307ex] ["fields" (str/join (array/map (default (object/get @entity.models @rs307ex null) []) (fn rm349 (let ((v364 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm349 null) (let ((cb350 (str/replace-pattern (str/replaceAll @rm349 "-" "_") "[.]" "_"))) (let ((cw351 (array/filter (str/split (str/lower @cb350) "_") (fn cx352 (!= @cx352 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb350) (if (= @config.fieldCase "upper") (str/upper @cb350) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw351) "") (str/join (array/map (array/drop @cw351 1) (fn cy353 (str/capitalize @cy353))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw351 (fn cy353 (str/capitalize @cy353))) "") (let ((ck354 (str/split @cb350 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck354) "") (str/join (array/map (array/drop @ck354 1) (fn cy353 (str/concat (str/upper (str/slice @cy353 0 1)) (str/slice @cy353 1 (str/len @cy353))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck354 (fn cy353 (str/concat (str/upper (str/slice @cy353 0 1)) (str/slice @cy353 1 (str/len @cy353))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl355 (str/join (array/map @ck354 (fn cy353 (str/concat (str/upper (str/slice @cy353 0 1)) (str/slice @cy353 1 (str/len @cy353))))) ""))) (str/concat (str/lower (str/slice @cl355 0 1)) (str/slice @cl355 1 (str/len @cl355)))) @cb350)))))))))))] ["value" (str/concat (default (array/first (str/split @rs307afterc "\u{e00c}")) "") (let ((v362 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm349 null) (let ((cb356 (str/replace-pattern (str/replaceAll @rm349 "-" "_") "[.]" "_"))) (let ((cw357 (array/filter (str/split (str/lower @cb356) "_") (fn cx358 (!= @cx358 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb356) (if (= @config.fieldCase "upper") (str/upper @cb356) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw357) "") (str/join (array/map (array/drop @cw357 1) (fn cy359 (str/capitalize @cy359))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw357 (fn cy359 (str/capitalize @cy359))) "") (let ((ck360 (str/split @cb356 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck360) "") (str/join (array/map (array/drop @ck360 1) (fn cy359 (str/concat (str/upper (str/slice @cy359 0 1)) (str/slice @cy359 1 (str/len @cy359))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck360 (fn cy359 (str/concat (str/upper (str/slice @cy359 0 1)) (str/slice @cy359 1 (str/len @cy359))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl361 (str/join (array/map @ck360 (fn cy359 (str/concat (str/upper (str/slice @cy359 0 1)) (str/slice @cy359 1 (str/len @cy359))))) ""))) (str/concat (str/lower (str/slice @cl361 0 1)) (str/slice @cl361 1 (str/len @cl361)))) @cb356)))))))))))]]))) (let ((f363p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f363p) "") (str/join (array/map (array/drop @f363p 1) (fn f363q (let ((f363r (str/split @f363q "}}"))) (if (< (array/len @f363r) 2) (str/concat "{{" @f363q) (str/concat (object/get @v362 (default (array/first @f363r) "") (str/concat "{{" (default (array/first @f363r) "") "}}")) (str/join (array/drop @f363r 1) "}}")))))) "")))))]]))) (let ((f365p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f365p) "") (str/join (array/map (array/drop @f365p 1) (fn f365q (let ((f365r (str/split @f365q "}}"))) (if (< (array/len @f365r) 2) (str/concat "{{" @f365q) (str/concat (object/get @v364 (default (array/first @f365r) "") (str/concat "{{" (default (array/first @f365r) "") "}}")) (str/join (array/drop @f365r 1) "}}")))))) "")))))) @config.recordSep)]]))) (let ((f367p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f367p) "") (str/join (array/map (array/drop @f367p 1) (fn f367q (let ((f367r (str/split @f367q "}}"))) (if (< (array/len @f367r) 2) (str/concat "{{" @f367q) (str/concat (object/get @v366 (default (array/first @f367r) "") (str/concat "{{" (default (array/first @f367r) "") "}}")) (str/join (array/drop @f367r 1) "}}")))))) "")))) (default (array/first (str/split @rs307afterc "\u{e00c}")) "")) (str/join (array/drop (str/split @rs307afterc "\u{e00c}") 1) "\u{e00c}")) (str/concat "\u{e000}" @rs307q))))))))))))))))) ""))))))))))))
1066
+ (if (!= @config.branchClose "") [(let ((v368 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f369p (str/split @config.branchClose "{{"))) (str/concat (default (array/first @f369p) "") (str/join (array/map (array/drop @f369p 1) (fn f369q (let ((f369r (str/split @f369q "}}"))) (if (< (array/len @f369r) 2) (str/concat "{{" @f369q) (str/concat (object/get @v368 (default (array/first @f369r) "") (str/concat "{{" (default (array/first @f369r) "") "}}")) (str/join (array/drop @f369r 1) "}}")))))) ""))))] [])
1067
+ (if (!= @config.methodClose "") [(let ((v370 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f371p (str/split @config.methodClose "{{"))) (str/concat (default (array/first @f371p) "") (str/join (array/map (array/drop @f371p 1) (fn f371q (let ((f371r (str/split @f371q "}}"))) (if (< (array/len @f371r) 2) (str/concat "{{" @f371q) (str/concat (object/get @v370 (default (array/first @f371r) "") (str/concat "{{" (default (array/first @f371r) "") "}}")) (str/join (array/drop @f371r 1) "}}")))))) ""))))] []))))))
1068
+ (if (!= @config.classClose "") [(let ((v372 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f373p (str/split @config.classClose "{{"))) (str/concat (default (array/first @f373p) "") (str/join (array/map (array/drop @f373p 1) (fn f373q (let ((f373r (str/split @f373q "}}"))) (if (< (array/len @f373r) 2) (str/concat "{{" @f373q) (str/concat (object/get @v372 (default (array/first @f373r) "") (str/concat "{{" (default (array/first @f373r) "") "}}")) (str/join (array/drop @f373r 1) "}}")))))) ""))))] []))))))))))
1069
+ (set @entity.blocks (let ((nC (if @config.renderModels (array/len @entity.containers) 0))
1070
+ (ind : string @config.indent)
1071
+ (nullR : SrcRender { expr: @config.nullLit, stmt: [@config.nullLit], params: [], body: @config.nullLit, items: [], keys: [], stmts: [], pairVals: [], warns: [], uses: [] }))
1072
+ (let ((storeUsed (array/some (array/flatten @entity.renders) (fn sr (array/includes (object/get @sr "uses") "store"))))
1073
+ (rows (array/flatten (array/map (array/range 0 (array/len @entity.traits)) (fn ti
1074
+ (array/map (array/range 0 (array/len (object/get (default (array/nth @entity.traits @ti) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }) "listenRows"))) (fn li { ti: @ti, li: @li })))))))
1075
+ (if (or (= (array/len @config.programOpen) 0) (and (= (array/len @rows) 0) (not @storeUsed)))
1076
+ @entity.blocks
1077
+ (array/concat @entity.blocks [(array/concat
1078
+ (array/map @config.programOpen (fn l (let ((v382 : SrcVars (object/fromEntries [["i" @ind] ["store" (if @storeUsed @config.programStoreParam "")] ["entities" (str/join (array/map (array/range 0 (array/len @entity.traits)) (fn pei (let ((t (default (array/nth @entity.traits @pei) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }))) (let ((v380 : SrcVars (object/fromEntries [["n" (str/concat "" @pei)] ["key" (let ((sj374 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @t "name"))))) (let ((v377 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj374 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj374 1 (- (str/len @sj374) 1)) (fn sa375 sk376 (str/replaceAll @sa375 @sk376 (object/get @config.stringEscapes @sk376 "")))) "\""))]]))) (let ((f378p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f378p) "") (str/join (array/map (array/drop @f378p 1) (fn f378q (let ((f378r (str/split @f378q "}}"))) (if (< (array/len @f378r) 2) (str/concat "{{" @f378q) (str/concat (object/get @v377 (default (array/first @f378r) "") (str/concat "{{" (default (array/first @f378r) "") "}}")) (str/join (array/drop @f378r 1) "}}")))))) "")))))] ["entity" (let ((en379 (object/get @t "entity"))) (object/get @config.entityNames @en379 @en379))]]))) (let ((f381p (str/split @config.programEntity "{{"))) (str/concat (default (array/first @f381p) "") (str/join (array/map (array/drop @f381p 1) (fn f381q (let ((f381r (str/split @f381q "}}"))) (if (< (array/len @f381r) 2) (str/concat "{{" @f381q) (str/concat (object/get @v380 (default (array/first @f381r) "") (str/concat "{{" (default (array/first @f381r) "") "}}")) (str/join (array/drop @f381r 1) "}}")))))) ""))))))) @config.programEntitySep)]]))) (let ((f383p (str/split @l "{{"))) (str/concat (default (array/first @f383p) "") (str/join (array/map (array/drop @f383p 1) (fn f383q (let ((f383r (str/split @f383q "}}"))) (if (< (array/len @f383r) 2) (str/concat "{{" @f383q) (str/concat (object/get @v382 (default (array/first @f383r) "") (str/concat "{{" (default (array/first @f383r) "") "}}")) (str/join (array/drop @f383r 1) "}}")))))) ""))))))
1079
+ (array/map (array/range 0 (array/len @entity.traits)) (fn pti (let ((t (default (array/nth @entity.traits @pti) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] })))
1080
+ (let ((v396 : SrcVars (object/fromEntries [["i" @ind] ["n" (str/concat "" @pti)] ["key" (let ((sj384 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @t "name"))))) (let ((v387 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj384 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj384 1 (- (str/len @sj384) 1)) (fn sa385 sk386 (str/replaceAll @sa385 @sk386 (object/get @config.stringEscapes @sk386 "")))) "\""))]]))) (let ((f388p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f388p) "") (str/join (array/map (array/drop @f388p 1) (fn f388q (let ((f388r (str/split @f388q "}}"))) (if (< (array/len @f388r) 2) (str/concat "{{" @f388q) (str/concat (object/get @v387 (default (array/first @f388r) "") (str/concat "{{" (default (array/first @f388r) "") "}}")) (str/join (array/drop @f388r 1) "}}")))))) "")))))] ["class" (let ((cb389 (str/replace-pattern (str/replaceAll (object/get @t "name") "-" "_") "[.]" "_"))) (let ((cw390 (array/filter (str/split (str/lower @cb389) "_") (fn cx391 (!= @cx391 ""))))) (if (= @config.classCase "lower") (str/lower @cb389) (if (= @config.classCase "upper") (str/upper @cb389) (if (= @config.classCase "camel") (str/concat (default (array/first @cw390) "") (str/join (array/map (array/drop @cw390 1) (fn cy392 (str/capitalize @cy392))) "")) (if (= @config.classCase "pascal") (str/join (array/map @cw390 (fn cy392 (str/capitalize @cy392))) "") (let ((ck393 (str/split @cb389 "_"))) (if (= @config.classCase "split-camel") (str/concat (default (array/first @ck393) "") (str/join (array/map (array/drop @ck393 1) (fn cy392 (str/concat (str/upper (str/slice @cy392 0 1)) (str/slice @cy392 1 (str/len @cy392))))) "")) (if (= @config.classCase "split-pascal") (str/join (array/map @ck393 (fn cy392 (str/concat (str/upper (str/slice @cy392 0 1)) (str/slice @cy392 1 (str/len @cy392))))) "") (if (= @config.classCase "lower-camel") (let ((cl394 (str/join (array/map @ck393 (fn cy392 (str/concat (str/upper (str/slice @cy392 0 1)) (str/slice @cy392 1 (str/len @cy392))))) ""))) (str/concat (str/lower (str/slice @cl394 0 1)) (str/slice @cl394 1 (str/len @cl394)))) @cb389))))))))))] ["entity" (let ((en395 (object/get @t "entity"))) (object/get @config.entityNames @en395 @en395))]]))) (let ((f397p (str/split (if (and (!= @config.programTraitStore "") (array/some (default (array/nth @entity.renders (+ @nC @pti)) []) (fn sr (array/includes (object/get @sr "uses") "store")))) @config.programTraitStore @config.programTrait) "{{"))) (str/concat (default (array/first @f397p) "") (str/join (array/map (array/drop @f397p 1) (fn f397q (let ((f397r (str/split @f397q "}}"))) (if (< (array/len @f397r) 2) (str/concat "{{" @f397q) (str/concat (object/get @v396 (default (array/first @f397r) "") (str/concat "{{" (default (array/first @f397r) "") "}}")) (str/join (array/drop @f397r 1) "}}")))))) "")))))))
1081
+ (array/map @entity.traits (fn t
1082
+ (let ((trs : [SrcTransition] (object/get @t "transitions")))
1083
+ (let ((sts (array/unique (array/map @trs (fn tr (object/get @tr "from"))))))
1084
+ (let ((v417 : SrcVars (object/fromEntries [["i" @ind] ["key" (let ((sj398 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @t "name"))))) (let ((v401 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj398 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj398 1 (- (str/len @sj398) 1)) (fn sa399 sk400 (str/replaceAll @sa399 @sk400 (object/get @config.stringEscapes @sk400 "")))) "\""))]]))) (let ((f402p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f402p) "") (str/join (array/map (array/drop @f402p 1) (fn f402q (let ((f402r (str/split @f402q "}}"))) (if (< (array/len @f402r) 2) (str/concat "{{" @f402q) (str/concat (object/get @v401 (default (array/first @f402r) "") (str/concat "{{" (default (array/first @f402r) "") "}}")) (str/join (array/drop @f402r 1) "}}")))))) "")))))] ["table" (str/concat @config.mapOpen (str/join (array/map @sts (fn st (let ((v415 : SrcVars (object/fromEntries [["key" (let ((sj403 (json/stringify @st))) (let ((v406 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj403 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj403 1 (- (str/len @sj403) 1)) (fn sa404 sk405 (str/replaceAll @sa404 @sk405 (object/get @config.stringEscapes @sk405 "")))) "\""))]]))) (let ((f407p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f407p) "") (str/join (array/map (array/drop @f407p 1) (fn f407q (let ((f407r (str/split @f407q "}}"))) (if (< (array/len @f407r) 2) (str/concat "{{" @f407q) (str/concat (object/get @v406 (default (array/first @f407r) "") (str/concat "{{" (default (array/first @f407r) "") "}}")) (str/join (array/drop @f407r 1) "}}")))))) "")))))] ["value" (let ((v413 : SrcVars (object/fromEntries [["*" (str/join (array/map (array/unique (array/map (array/filter @trs (fn tr (= (object/get @tr "from") @st))) (fn tr (object/get @tr "event")))) (fn ev (let ((sj408 (json/stringify @ev))) (let ((v411 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj408 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj408 1 (- (str/len @sj408) 1)) (fn sa409 sk410 (str/replaceAll @sa409 @sk410 (object/get @config.stringEscapes @sk410 "")))) "\""))]]))) (let ((f412p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f412p) "") (str/join (array/map (array/drop @f412p 1) (fn f412q (let ((f412r (str/split @f412q "}}"))) (if (< (array/len @f412r) 2) (str/concat "{{" @f412q) (str/concat (object/get @v411 (default (array/first @f412r) "") (str/concat "{{" (default (array/first @f412r) "") "}}")) (str/join (array/drop @f412r 1) "}}")))))) ""))))))) ", ")]]))) (let ((f414p (str/split @config.listForm "{{"))) (str/concat (default (array/first @f414p) "") (str/join (array/map (array/drop @f414p 1) (fn f414q (let ((f414r (str/split @f414q "}}"))) (if (< (array/len @f414r) 2) (str/concat "{{" @f414q) (str/concat (object/get @v413 (default (array/first @f414r) "") (str/concat "{{" (default (array/first @f414r) "") "}}")) (str/join (array/drop @f414r 1) "}}")))))) ""))))]]))) (let ((f416p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f416p) "") (str/join (array/map (array/drop @f416p 1) (fn f416q (let ((f416r (str/split @f416q "}}"))) (if (< (array/len @f416r) 2) (str/concat "{{" @f416q) (str/concat (object/get @v415 (default (array/first @f416r) "") (str/concat "{{" (default (array/first @f416r) "") "}}")) (str/join (array/drop @f416r 1) "}}")))))) "")))))) @config.mapSep) @config.mapClose)]]))) (let ((f418p (str/split @config.programHandles "{{"))) (str/concat (default (array/first @f418p) "") (str/join (array/map (array/drop @f418p 1) (fn f418q (let ((f418r (str/split @f418q "}}"))) (if (< (array/len @f418r) 2) (str/concat "{{" @f418q) (str/concat (object/get @v417 (default (array/first @f418r) "") (str/concat "{{" (default (array/first @f418r) "") "}}")) (str/join (array/drop @f418r 1) "}}")))))) ""))))))))
1085
+ (array/map (array/range 0 (array/len @rows)) (fn ri
1086
+ (let ((r (default (array/nth @rows @ri) { ti: 0, li: 0 })))
1087
+ (let ((t (default (array/nth @entity.traits (object/get @r "ti")) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] })))
1088
+ (let ((lr (default (array/nth (object/get @t "listenRows") (object/get @r "li")) { source: "", event: "", trigger: "" })))
1089
+ (let ((v447 : SrcVars (object/fromEntries [["i" @ind] ["source" (let ((sj419 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @lr "source"))))) (let ((v422 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj419 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj419 1 (- (str/len @sj419) 1)) (fn sa420 sk421 (str/replaceAll @sa420 @sk421 (object/get @config.stringEscapes @sk421 "")))) "\""))]]))) (let ((f423p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f423p) "") (str/join (array/map (array/drop @f423p 1) (fn f423q (let ((f423r (str/split @f423q "}}"))) (if (< (array/len @f423r) 2) (str/concat "{{" @f423q) (str/concat (object/get @v422 (default (array/first @f423r) "") (str/concat "{{" (default (array/first @f423r) "") "}}")) (str/join (array/drop @f423r 1) "}}")))))) "")))))] ["event" (let ((sj424 (json/stringify (object/get @lr "event")))) (let ((v427 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj424 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj424 1 (- (str/len @sj424) 1)) (fn sa425 sk426 (str/replaceAll @sa425 @sk426 (object/get @config.stringEscapes @sk426 "")))) "\""))]]))) (let ((f428p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f428p) "") (str/join (array/map (array/drop @f428p 1) (fn f428q (let ((f428r (str/split @f428q "}}"))) (if (< (array/len @f428r) 2) (str/concat "{{" @f428q) (str/concat (object/get @v427 (default (array/first @f428r) "") (str/concat "{{" (default (array/first @f428r) "") "}}")) (str/join (array/drop @f428r 1) "}}")))))) "")))))] ["target" (let ((sj429 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @t "name"))))) (let ((v432 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj429 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj429 1 (- (str/len @sj429) 1)) (fn sa430 sk431 (str/replaceAll @sa430 @sk431 (object/get @config.stringEscapes @sk431 "")))) "\""))]]))) (let ((f433p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f433p) "") (str/join (array/map (array/drop @f433p 1) (fn f433q (let ((f433r (str/split @f433q "}}"))) (if (< (array/len @f433r) 2) (str/concat "{{" @f433q) (str/concat (object/get @v432 (default (array/first @f433r) "") (str/concat "{{" (default (array/first @f433r) "") "}}")) (str/join (array/drop @f433r 1) "}}")))))) "")))))] ["trigger" (let ((sj434 (json/stringify (object/get @lr "trigger")))) (let ((v437 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj434 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj434 1 (- (str/len @sj434) 1)) (fn sa435 sk436 (str/replaceAll @sa435 @sk436 (object/get @config.stringEscapes @sk436 "")))) "\""))]]))) (let ((f438p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f438p) "") (str/join (array/map (array/drop @f438p 1) (fn f438q (let ((f438r (str/split @f438q "}}"))) (if (< (array/len @f438r) 2) (str/concat "{{" @f438q) (str/concat (object/get @v437 (default (array/first @f438r) "") (str/concat "{{" (default (array/first @f438r) "") "}}")) (str/join (array/drop @f438r 1) "}}")))))) "")))))] ["guard" (if (= (object/get @lr "guard" null) null) @config.nullLit (let ((v441 : SrcVars (object/fromEntries [["name" (let ((v439 : SrcVars (object/fromEntries [["n" (str/concat "" @ri)]]))) (let ((f440p (str/split @config.guardName "{{"))) (str/concat (default (array/first @f440p) "") (str/join (array/map (array/drop @f440p 1) (fn f440q (let ((f440r (str/split @f440q "}}"))) (if (< (array/len @f440r) 2) (str/concat "{{" @f440q) (str/concat (object/get @v439 (default (array/first @f440r) "") (str/concat "{{" (default (array/first @f440r) "") "}}")) (str/join (array/drop @f440r 1) "}}")))))) ""))))]]))) (let ((f442p (str/split @config.guardRef "{{"))) (str/concat (default (array/first @f442p) "") (str/join (array/map (array/drop @f442p 1) (fn f442q (let ((f442r (str/split @f442q "}}"))) (if (< (array/len @f442r) 2) (str/concat "{{" @f442q) (str/concat (object/get @v441 (default (array/first @f442r) "") (str/concat "{{" (default (array/first @f442r) "") "}}")) (str/join (array/drop @f442r 1) "}}")))))) "")))))] ["map" (if (= (object/get @lr "map" null) null) @config.nullLit (let ((v445 : SrcVars (object/fromEntries [["name" (let ((v443 : SrcVars (object/fromEntries [["n" (str/concat "" @ri)]]))) (let ((f444p (str/split @config.mapName "{{"))) (str/concat (default (array/first @f444p) "") (str/join (array/map (array/drop @f444p 1) (fn f444q (let ((f444r (str/split @f444q "}}"))) (if (< (array/len @f444r) 2) (str/concat "{{" @f444q) (str/concat (object/get @v443 (default (array/first @f444r) "") (str/concat "{{" (default (array/first @f444r) "") "}}")) (str/join (array/drop @f444r 1) "}}")))))) ""))))]]))) (let ((f446p (str/split @config.mapRef "{{"))) (str/concat (default (array/first @f446p) "") (str/join (array/map (array/drop @f446p 1) (fn f446q (let ((f446r (str/split @f446q "}}"))) (if (< (array/len @f446r) 2) (str/concat "{{" @f446q) (str/concat (object/get @v445 (default (array/first @f446r) "") (str/concat "{{" (default (array/first @f446r) "") "}}")) (str/join (array/drop @f446r 1) "}}")))))) "")))))]]))) (let ((f448p (str/split @config.programRow "{{"))) (str/concat (default (array/first @f448p) "") (str/join (array/map (array/drop @f448p 1) (fn f448q (let ((f448r (str/split @f448q "}}"))) (if (< (array/len @f448r) 2) (str/concat "{{" @f448q) (str/concat (object/get @v447 (default (array/first @f448r) "") (str/concat "{{" (default (array/first @f448r) "") "}}")) (str/join (array/drop @f448r 1) "}}")))))) "")))))))))
1090
+ (array/map @config.deliverOpen (fn l (let ((v449 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f450p (str/split @l "{{"))) (str/concat (default (array/first @f450p) "") (str/join (array/map (array/drop @f450p 1) (fn f450q (let ((f450r (str/split @f450q "}}"))) (if (< (array/len @f450r) 2) (str/concat "{{" @f450q) (str/concat (object/get @v449 (default (array/first @f450r) "") (str/concat "{{" (default (array/first @f450r) "") "}}")) (str/join (array/drop @f450r 1) "}}")))))) ""))))))
1091
+ (array/flatten (array/map @entity.traits (fn t
1092
+ (array/map (object/get @t "events") (fn ev
1093
+ (let ((pt (default (array/nth (default (array/find (object/entries (object/get @t "listenTypes")) (fn lk451 (= (array/nth @lk451 0) @ev))) ["" ""]) 1) ""))
1094
+ (mn (let ((v458 : SrcVars (object/fromEntries [["event" (let ((cb452 (str/replace-pattern (str/replaceAll @ev "-" "_") "[.]" "_"))) (let ((cw453 (array/filter (str/split (str/lower @cb452) "_") (fn cx454 (!= @cx454 ""))))) (if (= @config.methodCase "lower") (str/lower @cb452) (if (= @config.methodCase "upper") (str/upper @cb452) (if (= @config.methodCase "camel") (str/concat (default (array/first @cw453) "") (str/join (array/map (array/drop @cw453 1) (fn cy455 (str/capitalize @cy455))) "")) (if (= @config.methodCase "pascal") (str/join (array/map @cw453 (fn cy455 (str/capitalize @cy455))) "") (let ((ck456 (str/split @cb452 "_"))) (if (= @config.methodCase "split-camel") (str/concat (default (array/first @ck456) "") (str/join (array/map (array/drop @ck456 1) (fn cy455 (str/concat (str/upper (str/slice @cy455 0 1)) (str/slice @cy455 1 (str/len @cy455))))) "")) (if (= @config.methodCase "split-pascal") (str/join (array/map @ck456 (fn cy455 (str/concat (str/upper (str/slice @cy455 0 1)) (str/slice @cy455 1 (str/len @cy455))))) "") (if (= @config.methodCase "lower-camel") (let ((cl457 (str/join (array/map @ck456 (fn cy455 (str/concat (str/upper (str/slice @cy455 0 1)) (str/slice @cy455 1 (str/len @cy455))))) ""))) (str/concat (str/lower (str/slice @cl457 0 1)) (str/slice @cl457 1 (str/len @cl457)))) @cb452))))))))))]]))) (let ((f459p (str/split @config.methodName "{{"))) (str/concat (default (array/first @f459p) "") (str/join (array/map (array/drop @f459p 1) (fn f459q (let ((f459r (str/split @f459q "}}"))) (if (< (array/len @f459r) 2) (str/concat "{{" @f459q) (str/concat (object/get @v458 (default (array/first @f459r) "") (str/concat "{{" (default (array/first @f459r) "") "}}")) (str/join (array/drop @f459r 1) "}}")))))) "")))))
1095
+ (tk (let ((sj460 (json/stringify (str/concat (object/get @t "orbital") "." (object/get @t "name"))))) (let ((v463 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj460 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj460 1 (- (str/len @sj460) 1)) (fn sa461 sk462 (str/replaceAll @sa461 @sk462 (object/get @config.stringEscapes @sk462 "")))) "\""))]]))) (let ((f464p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f464p) "") (str/join (array/map (array/drop @f464p 1) (fn f464q (let ((f464r (str/split @f464q "}}"))) (if (< (array/len @f464r) 2) (str/concat "{{" @f464q) (str/concat (object/get @v463 (default (array/first @f464r) "") (str/concat "{{" (default (array/first @f464r) "") "}}")) (str/join (array/drop @f464r 1) "}}")))))) "")))))))
1096
+ (if (= @pt "")
1097
+ (let ((v476 : SrcVars (object/fromEntries [["i" @ind] ["target" @tk] ["event" (let ((sj465 (json/stringify @ev))) (let ((v468 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj465 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj465 1 (- (str/len @sj465) 1)) (fn sa466 sk467 (str/replaceAll @sa466 @sk467 (object/get @config.stringEscapes @sk467 "")))) "\""))]]))) (let ((f469p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f469p) "") (str/join (array/map (array/drop @f469p 1) (fn f469q (let ((f469r (str/split @f469q "}}"))) (if (< (array/len @f469r) 2) (str/concat "{{" @f469q) (str/concat (object/get @v468 (default (array/first @f469r) "") (str/concat "{{" (default (array/first @f469r) "") "}}")) (str/join (array/drop @f469r 1) "}}")))))) "")))))] ["method" @mn] ["class" (let ((cb470 (str/replace-pattern (str/replaceAll (object/get @t "name") "-" "_") "[.]" "_"))) (let ((cw471 (array/filter (str/split (str/lower @cb470) "_") (fn cx472 (!= @cx472 ""))))) (if (= @config.classCase "lower") (str/lower @cb470) (if (= @config.classCase "upper") (str/upper @cb470) (if (= @config.classCase "camel") (str/concat (default (array/first @cw471) "") (str/join (array/map (array/drop @cw471 1) (fn cy473 (str/capitalize @cy473))) "")) (if (= @config.classCase "pascal") (str/join (array/map @cw471 (fn cy473 (str/capitalize @cy473))) "") (let ((ck474 (str/split @cb470 "_"))) (if (= @config.classCase "split-camel") (str/concat (default (array/first @ck474) "") (str/join (array/map (array/drop @ck474 1) (fn cy473 (str/concat (str/upper (str/slice @cy473 0 1)) (str/slice @cy473 1 (str/len @cy473))))) "")) (if (= @config.classCase "split-pascal") (str/join (array/map @ck474 (fn cy473 (str/concat (str/upper (str/slice @cy473 0 1)) (str/slice @cy473 1 (str/len @cy473))))) "") (if (= @config.classCase "lower-camel") (let ((cl475 (str/join (array/map @ck474 (fn cy473 (str/concat (str/upper (str/slice @cy473 0 1)) (str/slice @cy473 1 (str/len @cy473))))) ""))) (str/concat (str/lower (str/slice @cl475 0 1)) (str/slice @cl475 1 (str/len @cl475)))) @cb470))))))))))]]))) (let ((f477p (str/split @config.deliverCasePlain "{{"))) (str/concat (default (array/first @f477p) "") (str/join (array/map (array/drop @f477p 1) (fn f477q (let ((f477r (str/split @f477q "}}"))) (if (< (array/len @f477r) 2) (str/concat "{{" @f477q) (str/concat (object/get @v476 (default (array/first @f477r) "") (str/concat "{{" (default (array/first @f477r) "") "}}")) (str/join (array/drop @f477r 1) "}}")))))) ""))))
1098
+ (let ((v491 : SrcVars (object/fromEntries [["i" @ind] ["target" @tk] ["event" (let ((sj478 (json/stringify @ev))) (let ((v481 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj478 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj478 1 (- (str/len @sj478) 1)) (fn sa479 sk480 (str/replaceAll @sa479 @sk480 (object/get @config.stringEscapes @sk480 "")))) "\""))]]))) (let ((f482p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f482p) "") (str/join (array/map (array/drop @f482p 1) (fn f482q (let ((f482r (str/split @f482q "}}"))) (if (< (array/len @f482r) 2) (str/concat "{{" @f482q) (str/concat (object/get @v481 (default (array/first @f482r) "") (str/concat "{{" (default (array/first @f482r) "") "}}")) (str/join (array/drop @f482r 1) "}}")))))) "")))))] ["method" @mn] ["class" (let ((cb483 (str/replace-pattern (str/replaceAll (object/get @t "name") "-" "_") "[.]" "_"))) (let ((cw484 (array/filter (str/split (str/lower @cb483) "_") (fn cx485 (!= @cx485 ""))))) (if (= @config.classCase "lower") (str/lower @cb483) (if (= @config.classCase "upper") (str/upper @cb483) (if (= @config.classCase "camel") (str/concat (default (array/first @cw484) "") (str/join (array/map (array/drop @cw484 1) (fn cy486 (str/capitalize @cy486))) "")) (if (= @config.classCase "pascal") (str/join (array/map @cw484 (fn cy486 (str/capitalize @cy486))) "") (let ((ck487 (str/split @cb483 "_"))) (if (= @config.classCase "split-camel") (str/concat (default (array/first @ck487) "") (str/join (array/map (array/drop @ck487 1) (fn cy486 (str/concat (str/upper (str/slice @cy486 0 1)) (str/slice @cy486 1 (str/len @cy486))))) "")) (if (= @config.classCase "split-pascal") (str/join (array/map @ck487 (fn cy486 (str/concat (str/upper (str/slice @cy486 0 1)) (str/slice @cy486 1 (str/len @cy486))))) "") (if (= @config.classCase "lower-camel") (let ((cl488 (str/join (array/map @ck487 (fn cy486 (str/concat (str/upper (str/slice @cy486 0 1)) (str/slice @cy486 1 (str/len @cy486))))) ""))) (str/concat (str/lower (str/slice @cl488 0 1)) (str/slice @cl488 1 (str/len @cl488)))) @cb483))))))))))] ["arg" (let ((v489 : SrcVars (object/fromEntries [["type" @pt] ["value" "payload"]]))) (let ((f490p (str/split @config.payloadDecode "{{"))) (str/concat (default (array/first @f490p) "") (str/join (array/map (array/drop @f490p 1) (fn f490q (let ((f490r (str/split @f490q "}}"))) (if (< (array/len @f490r) 2) (str/concat "{{" @f490q) (str/concat (object/get @v489 (default (array/first @f490r) "") (str/concat "{{" (default (array/first @f490r) "") "}}")) (str/join (array/drop @f490r 1) "}}")))))) ""))))]]))) (let ((f492p (str/split @config.deliverCase "{{"))) (str/concat (default (array/first @f492p) "") (str/join (array/map (array/drop @f492p 1) (fn f492q (let ((f492r (str/split @f492q "}}"))) (if (< (array/len @f492r) 2) (str/concat "{{" @f492q) (str/concat (object/get @v491 (default (array/first @f492r) "") (str/concat "{{" (default (array/first @f492r) "") "}}")) (str/join (array/drop @f492r 1) "}}")))))) "")))))))))))
1099
+ (array/map @config.deliverClose (fn l (let ((v493 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f494p (str/split @l "{{"))) (str/concat (default (array/first @f494p) "") (str/join (array/map (array/drop @f494p 1) (fn f494q (let ((f494r (str/split @f494q "}}"))) (if (< (array/len @f494r) 2) (str/concat "{{" @f494q) (str/concat (object/get @v493 (default (array/first @f494r) "") (str/concat "{{" (default (array/first @f494r) "") "}}")) (str/join (array/drop @f494r 1) "}}")))))) ""))))))
1100
+ (array/map @config.programClose (fn l (let ((v495 : SrcVars (object/fromEntries [["i" @ind]]))) (let ((f496p (str/split @l "{{"))) (str/concat (default (array/first @f496p) "") (str/join (array/map (array/drop @f496p 1) (fn f496q (let ((f496r (str/split @f496q "}}"))) (if (< (array/len @f496r) 2) (str/concat "{{" @f496q) (str/concat (object/get @v495 (default (array/first @f496r) "") (str/concat "{{" (default (array/first @f496r) "") "}}")) (str/join (array/drop @f496r 1) "}}")))))) ""))))))
1101
+ (array/flatten (array/map (array/range 0 (array/len @rows)) (fn ri
1102
+ (let ((r (default (array/nth @rows @ri) { ti: 0, li: 0 })))
1103
+ (let ((t (default (array/nth @entity.traits (object/get @r "ti")) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }))
1104
+ (job (default (array/nth (default (array/nth @entity.renders (+ @nC (object/get @r "ti"))) []) (+ (+ 1 (array/len (object/get (default (array/nth @entity.traits (object/get @r "ti")) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }) "transitions"))) (object/get @r "li"))) @nullR)))
1105
+ (let ((lr (default (array/nth (object/get @t "listenRows") (object/get @r "li")) { source: "", event: "", trigger: "" }))
1106
+ (base (str/concat (object/get @t "path") ".listens[" (object/get @r "li") "]")))
1107
+ (let ((st (default (array/nth (default (array/find (object/entries (object/get (default (array/find @entity.traits (fn s (and (= (object/get @s "name") (object/get @lr "source")) (= (object/get @s "orbital") (object/get @t "orbital"))))) { name: "", path: "", entity: "", initial: "", hasMachine: false, knobs: [], transitions: [], events: [], listenTypes: {}, emitTypes: {}, emitVoid: [], configType: "", orbital: "", listenRows: [] }) "emitTypes")) (fn lk497 (= (array/nth @lk497 0) (object/get @lr "event")))) ["" ""]) 1) "")))
1108
+ (let ((dec (if (= @st "") @config.nullLit (let ((v498 : SrcVars (object/fromEntries [["type" @st] ["value" "payload_json"]]))) (let ((f499p (str/split @config.payloadDecode "{{"))) (str/concat (default (array/first @f499p) "") (str/join (array/map (array/drop @f499p 1) (fn f499q (let ((f499r (str/split @f499q "}}"))) (if (< (array/len @f499r) 2) (str/concat "{{" @f499q) (str/concat (object/get @v498 (default (array/first @f499r) "") (str/concat "{{" (default (array/first @f499r) "") "}}")) (str/join (array/drop @f499r 1) "}}")))))) "")))))))
1109
+ (array/concat
1110
+ (if (= (object/get @lr "guard" null) null) []
1111
+ (array/map @config.guardForm (fn l (let ((v563 : SrcVars (object/fromEntries [["i" @ind] ["name" (let ((v500 : SrcVars (object/fromEntries [["n" (str/concat "" @ri)]]))) (let ((f501p (str/split @config.guardName "{{"))) (str/concat (default (array/first @f501p) "") (str/join (array/map (array/drop @f501p 1) (fn f501q (let ((f501r (str/split @f501q "}}"))) (if (< (array/len @f501r) 2) (str/concat "{{" @f501q) (str/concat (object/get @v500 (default (array/first @f501r) "") (str/concat "{{" (default (array/first @f501r) "") "}}")) (str/join (array/drop @f501r 1) "}}")))))) ""))))] ["decode" @dec] ["expr" (let ((rs502p (str/split (default (array/nth (object/get @job "items") 1) @config.trueLit) "\u{e000}"))) (str/concat (default (array/first @rs502p) "") (str/join (array/map (array/drop @rs502p 1) (fn rs502q (let ((rs502rest (str/replace-pattern @rs502q "^[^\u{e001}-\u{e00c}]*" ""))) (let ((rs502rel (str/slice @rs502q 0 (- (str/len @rs502q) (str/len @rs502rest)))) (rs502c (str/slice @rs502rest 0 1)) (rs502afterc (str/slice @rs502rest 1 (str/len @rs502rest)))) (let ((rs502lead (default (array/first (str/split (str/slice @rs502rel 1 (str/len @rs502rel)) "]")) "")) (rs502after (str/join (array/drop (str/split @rs502rel "]") 1) "]"))) (let ((rs502abs (str/concat @base (if (= @rs502lead "1") ".guard" (str/concat ".effects[" (- (default (str/to-int @rs502lead) 2) 2) "]")) @rs502after))) (let ((rs502ty (default (array/nth (default (array/find (object/entries @entity.types) (fn rs502e (= (array/nth @rs502e 0) @rs502abs))) ["" ""]) 1) "")) (rs502ex (default (array/nth (default (array/find (object/entries @entity.expected) (fn rs502x (= (array/nth @rs502x 0) @rs502abs))) ["" ""]) 1) ""))) (let ((rs502mapped (default (array/nth (default (array/find (object/entries @config.typeNames) (fn rs502n (= (array/nth @rs502n 0) @rs502ty))) ["" ""]) 1) ""))) (if (= @rs502c "\u{e001}") (str/concat (if (= @rs502ty "") @config.typeUnknown (if (!= @rs502mapped "") @rs502mapped @rs502ty)) @rs502afterc) (if (= @rs502c "\u{e002}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:"))) (str/concat (if (str/includes @rs502ex ".") (default (array/nth (str/split (let ((v513 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs502ex ".")) "")] ["arm" (let ((cb507 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs502ex ".") 1) @rs502ex) "-" "_") "[.]" "_"))) (let ((cw508 (array/filter (str/split (str/lower @cb507) "_") (fn cx509 (!= @cx509 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb507) (if (= @config.unionArmCase "upper") (str/upper @cb507) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw508) "") (str/join (array/map (array/drop @cw508 1) (fn cy510 (str/capitalize @cy510))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw508 (fn cy510 (str/capitalize @cy510))) "") (let ((ck511 (str/split @cb507 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck511) "") (str/join (array/map (array/drop @ck511 1) (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck511 (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl512 (str/join (array/map @ck511 (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) ""))) (str/concat (str/lower (str/slice @cl512 0 1)) (str/slice @cl512 1 (str/len @cl512)))) @cb507))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f514p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f514p) "") (str/join (array/map (array/drop @f514p 1) (fn f514q (let ((f514r (str/split @f514q "}}"))) (if (< (array/len @f514r) 2) (str/concat "{{" @f514q) (str/concat (object/get @v513 (default (array/first @f514r) "") (str/concat "{{" (default (array/first @f514r) "") "}}")) (str/join (array/drop @f514r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") "") (default (array/nth (str/split (let ((v503 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs502ex ".") 1) @rs502ex)] ["fields" "\u{e0ff}"]]))) (let ((f504p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f504p) "") (str/join (array/map (array/drop @f504p 1) (fn f504q (let ((f504r (str/split @f504q "}}"))) (if (< (array/len @f504r) 2) (str/concat "{{" @f504q) (str/concat (object/get @v503 (default (array/first @f504r) "") (str/concat "{{" (default (array/first @f504r) "") "}}")) (str/join (array/drop @f504r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) @config.mapOpen) @rs502afterc) (if (= @rs502c "\u{e003}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:"))) (default (array/nth (str/split (let ((v523 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames (default (array/first (str/split @rs502afterc "\u{e004}")) "") null) (let ((cb517 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs502afterc "\u{e004}")) "") "-" "_") "[.]" "_"))) (let ((cw518 (array/filter (str/split (str/lower @cb517) "_") (fn cx519 (!= @cx519 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb517) (if (= @config.fieldCase "upper") (str/upper @cb517) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw518) "") (str/join (array/map (array/drop @cw518 1) (fn cy520 (str/capitalize @cy520))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw518 (fn cy520 (str/capitalize @cy520))) "") (let ((ck521 (str/split @cb517 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck521) "") (str/join (array/map (array/drop @ck521 1) (fn cy520 (str/concat (str/upper (str/slice @cy520 0 1)) (str/slice @cy520 1 (str/len @cy520))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck521 (fn cy520 (str/concat (str/upper (str/slice @cy520 0 1)) (str/slice @cy520 1 (str/len @cy520))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl522 (str/join (array/map @ck521 (fn cy520 (str/concat (str/upper (str/slice @cy520 0 1)) (str/slice @cy520 1 (str/len @cy520))))) ""))) (str/concat (str/lower (str/slice @cl522 0 1)) (str/slice @cl522 1 (str/len @cl522)))) @cb517)))))))))))] ["value" "\u{e0ff}"]]))) (let ((f524p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f524p) "") (str/join (array/map (array/drop @f524p 1) (fn f524q (let ((f524r (str/split @f524q "}}"))) (if (< (array/len @f524r) 2) (str/concat "{{" @f524q) (str/concat (object/get @v523 (default (array/first @f524r) "") (str/concat "{{" (default (array/first @f524r) "") "}}")) (str/join (array/drop @f524r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") (default (array/nth (str/split (let ((v532 : SrcVars (object/fromEntries [["key" (let ((sj527 (json/stringify (default (array/first (str/split @rs502afterc "\u{e004}")) "")))) (let ((v530 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj527 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj527 1 (- (str/len @sj527) 1)) (fn sa528 sk529 (str/replaceAll @sa528 @sk529 (object/get @config.stringEscapes @sk529 "")))) "\""))]]))) (let ((f531p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f531p) "") (str/join (array/map (array/drop @f531p 1) (fn f531q (let ((f531r (str/split @f531q "}}"))) (if (< (array/len @f531r) 2) (str/concat "{{" @f531q) (str/concat (object/get @v530 (default (array/first @f531r) "") (str/concat "{{" (default (array/first @f531r) "") "}}")) (str/join (array/drop @f531r 1) "}}")))))) "")))))] ["value" "\u{e0ff}"]]))) (let ((f533p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f533p) "") (str/join (array/map (array/drop @f533p 1) (fn f533q (let ((f533r (str/split @f533q "}}"))) (if (< (array/len @f533r) 2) (str/concat "{{" @f533q) (str/concat (object/get @v532 (default (array/first @f533r) "") (str/concat "{{" (default (array/first @f533r) "") "}}")) (str/join (array/drop @f533r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) (str/join (array/drop (str/split @rs502afterc "\u{e004}") 1) "\u{e004}")) (if (= @rs502c "\u{e005}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:"))) (default (array/nth (str/split (let ((v525 : SrcVars (object/fromEntries [["name" ""] ["value" "\u{e0ff}"]]))) (let ((f526p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f526p) "") (str/join (array/map (array/drop @f526p 1) (fn f526q (let ((f526r (str/split @f526q "}}"))) (if (< (array/len @f526r) 2) (str/concat "{{" @f526q) (str/concat (object/get @v525 (default (array/first @f526r) "") (str/concat "{{" (default (array/first @f526r) "") "}}")) (str/join (array/drop @f526r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (default (array/nth (str/split (let ((v534 : SrcVars (object/fromEntries [["key" ""] ["value" "\u{e0ff}"]]))) (let ((f535p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f535p) "") (str/join (array/map (array/drop @f535p 1) (fn f535q (let ((f535r (str/split @f535q "}}"))) (if (< (array/len @f535r) 2) (str/concat "{{" @f535q) (str/concat (object/get @v534 (default (array/first @f535r) "") (str/concat "{{" (default (array/first @f535r) "") "}}")) (str/join (array/drop @f535r 1) "}}")))))) "")))) "\u{e0ff}") 1) "")) @rs502afterc) (if (= @rs502c "\u{e006}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:"))) @config.recordSep @config.mapSep) @rs502afterc) (if (= @rs502c "\u{e007}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:"))) (str/concat (default (array/nth (str/split (let ((v505 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs502ex ".") 1) @rs502ex)] ["fields" "\u{e0ff}"]]))) (let ((f506p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f506p) "") (str/join (array/map (array/drop @f506p 1) (fn f506q (let ((f506r (str/split @f506q "}}"))) (if (< (array/len @f506r) 2) (str/concat "{{" @f506q) (str/concat (object/get @v505 (default (array/first @f506r) "") (str/concat "{{" (default (array/first @f506r) "") "}}")) (str/join (array/drop @f506r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (if (str/includes @rs502ex ".") (default (array/nth (str/split (let ((v515 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs502ex ".")) "")] ["arm" (let ((cb507 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs502ex ".") 1) @rs502ex) "-" "_") "[.]" "_"))) (let ((cw508 (array/filter (str/split (str/lower @cb507) "_") (fn cx509 (!= @cx509 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb507) (if (= @config.unionArmCase "upper") (str/upper @cb507) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw508) "") (str/join (array/map (array/drop @cw508 1) (fn cy510 (str/capitalize @cy510))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw508 (fn cy510 (str/capitalize @cy510))) "") (let ((ck511 (str/split @cb507 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck511) "") (str/join (array/map (array/drop @ck511 1) (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck511 (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl512 (str/join (array/map @ck511 (fn cy510 (str/concat (str/upper (str/slice @cy510 0 1)) (str/slice @cy510 1 (str/len @cy510))))) ""))) (str/concat (str/lower (str/slice @cl512 0 1)) (str/slice @cl512 1 (str/len @cl512)))) @cb507))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f516p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f516p) "") (str/join (array/map (array/drop @f516p 1) (fn f516q (let ((f516r (str/split @f516q "}}"))) (if (< (array/len @f516r) 2) (str/concat "{{" @f516q) (str/concat (object/get @v515 (default (array/first @f516r) "") (str/concat "{{" (default (array/first @f516r) "") "}}")) (str/join (array/drop @f516r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") "")) @config.mapClose) @rs502afterc) (if (= @rs502c "\u{e008}") (str/concat (if (and (!= @config.enumForm "") (str/startsWith @rs502ex "enum:")) (let ((v542 : SrcVars (object/fromEntries [["enum" (str/slice @rs502ex 5 (str/len @rs502ex))] ["member" (let ((cb536 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs502afterc "\u{e009}")) "") "-" "_") "[.]" "_"))) (let ((cw537 (array/filter (str/split (str/lower @cb536) "_") (fn cx538 (!= @cx538 ""))))) (if (= @config.enumMemberCase "lower") (str/lower @cb536) (if (= @config.enumMemberCase "upper") (str/upper @cb536) (if (= @config.enumMemberCase "camel") (str/concat (default (array/first @cw537) "") (str/join (array/map (array/drop @cw537 1) (fn cy539 (str/capitalize @cy539))) "")) (if (= @config.enumMemberCase "pascal") (str/join (array/map @cw537 (fn cy539 (str/capitalize @cy539))) "") (let ((ck540 (str/split @cb536 "_"))) (if (= @config.enumMemberCase "split-camel") (str/concat (default (array/first @ck540) "") (str/join (array/map (array/drop @ck540 1) (fn cy539 (str/concat (str/upper (str/slice @cy539 0 1)) (str/slice @cy539 1 (str/len @cy539))))) "")) (if (= @config.enumMemberCase "split-pascal") (str/join (array/map @ck540 (fn cy539 (str/concat (str/upper (str/slice @cy539 0 1)) (str/slice @cy539 1 (str/len @cy539))))) "") (if (= @config.enumMemberCase "lower-camel") (let ((cl541 (str/join (array/map @ck540 (fn cy539 (str/concat (str/upper (str/slice @cy539 0 1)) (str/slice @cy539 1 (str/len @cy539))))) ""))) (str/concat (str/lower (str/slice @cl541 0 1)) (str/slice @cl541 1 (str/len @cl541)))) @cb536))))))))))]]))) (let ((f543p (str/split @config.enumForm "{{"))) (str/concat (default (array/first @f543p) "") (str/join (array/map (array/drop @f543p 1) (fn f543q (let ((f543r (str/split @f543q "}}"))) (if (< (array/len @f543r) 2) (str/concat "{{" @f543q) (str/concat (object/get @v542 (default (array/first @f543r) "") (str/concat "{{" (default (array/first @f543r) "") "}}")) (str/join (array/drop @f543r 1) "}}")))))) "")))) (default (array/first (str/split (str/join (array/drop (str/split @rs502afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}")) "")) (str/join (array/drop (str/split (str/join (array/drop (str/split @rs502afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}") 1) "\u{e00a}")) (if (= @rs502c "\u{e00b}") (str/concat (if (and (!= @config.recordForm "") (!= @rs502ex "") (not (str/startsWith @rs502ex "enum:")) (not (str/includes @rs502ex ".")) (object/has @entity.models @rs502ex)) (let ((v561 : SrcVars (object/fromEntries [["type" @rs502ex] ["fields" (str/join (array/map (default (object/get @entity.models @rs502ex null) []) (fn rm544 (let ((v559 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm544 null) (let ((cb545 (str/replace-pattern (str/replaceAll @rm544 "-" "_") "[.]" "_"))) (let ((cw546 (array/filter (str/split (str/lower @cb545) "_") (fn cx547 (!= @cx547 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb545) (if (= @config.fieldCase "upper") (str/upper @cb545) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw546) "") (str/join (array/map (array/drop @cw546 1) (fn cy548 (str/capitalize @cy548))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw546 (fn cy548 (str/capitalize @cy548))) "") (let ((ck549 (str/split @cb545 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck549) "") (str/join (array/map (array/drop @ck549 1) (fn cy548 (str/concat (str/upper (str/slice @cy548 0 1)) (str/slice @cy548 1 (str/len @cy548))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck549 (fn cy548 (str/concat (str/upper (str/slice @cy548 0 1)) (str/slice @cy548 1 (str/len @cy548))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl550 (str/join (array/map @ck549 (fn cy548 (str/concat (str/upper (str/slice @cy548 0 1)) (str/slice @cy548 1 (str/len @cy548))))) ""))) (str/concat (str/lower (str/slice @cl550 0 1)) (str/slice @cl550 1 (str/len @cl550)))) @cb545)))))))))))] ["value" (str/concat (default (array/first (str/split @rs502afterc "\u{e00c}")) "") (let ((v557 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm544 null) (let ((cb551 (str/replace-pattern (str/replaceAll @rm544 "-" "_") "[.]" "_"))) (let ((cw552 (array/filter (str/split (str/lower @cb551) "_") (fn cx553 (!= @cx553 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb551) (if (= @config.fieldCase "upper") (str/upper @cb551) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw552) "") (str/join (array/map (array/drop @cw552 1) (fn cy554 (str/capitalize @cy554))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw552 (fn cy554 (str/capitalize @cy554))) "") (let ((ck555 (str/split @cb551 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck555) "") (str/join (array/map (array/drop @ck555 1) (fn cy554 (str/concat (str/upper (str/slice @cy554 0 1)) (str/slice @cy554 1 (str/len @cy554))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck555 (fn cy554 (str/concat (str/upper (str/slice @cy554 0 1)) (str/slice @cy554 1 (str/len @cy554))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl556 (str/join (array/map @ck555 (fn cy554 (str/concat (str/upper (str/slice @cy554 0 1)) (str/slice @cy554 1 (str/len @cy554))))) ""))) (str/concat (str/lower (str/slice @cl556 0 1)) (str/slice @cl556 1 (str/len @cl556)))) @cb551)))))))))))]]))) (let ((f558p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f558p) "") (str/join (array/map (array/drop @f558p 1) (fn f558q (let ((f558r (str/split @f558q "}}"))) (if (< (array/len @f558r) 2) (str/concat "{{" @f558q) (str/concat (object/get @v557 (default (array/first @f558r) "") (str/concat "{{" (default (array/first @f558r) "") "}}")) (str/join (array/drop @f558r 1) "}}")))))) "")))))]]))) (let ((f560p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f560p) "") (str/join (array/map (array/drop @f560p 1) (fn f560q (let ((f560r (str/split @f560q "}}"))) (if (< (array/len @f560r) 2) (str/concat "{{" @f560q) (str/concat (object/get @v559 (default (array/first @f560r) "") (str/concat "{{" (default (array/first @f560r) "") "}}")) (str/join (array/drop @f560r 1) "}}")))))) "")))))) @config.recordSep)]]))) (let ((f562p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f562p) "") (str/join (array/map (array/drop @f562p 1) (fn f562q (let ((f562r (str/split @f562q "}}"))) (if (< (array/len @f562r) 2) (str/concat "{{" @f562q) (str/concat (object/get @v561 (default (array/first @f562r) "") (str/concat "{{" (default (array/first @f562r) "") "}}")) (str/join (array/drop @f562r 1) "}}")))))) "")))) (default (array/first (str/split @rs502afterc "\u{e00c}")) "")) (str/join (array/drop (str/split @rs502afterc "\u{e00c}") 1) "\u{e00c}")) (str/concat "\u{e000}" @rs502q))))))))))))))))) "")))]]))) (let ((f564p (str/split @l "{{"))) (str/concat (default (array/first @f564p) "") (str/join (array/map (array/drop @f564p 1) (fn f564q (let ((f564r (str/split @f564q "}}"))) (if (< (array/len @f564r) 2) (str/concat "{{" @f564q) (str/concat (object/get @v563 (default (array/first @f564r) "") (str/concat "{{" (default (array/first @f564r) "") "}}")) (str/join (array/drop @f564r 1) "}}")))))) "")))))))
1112
+ (if (= (object/get @lr "map" null) null) []
1113
+ (array/map @config.mapForm (fn l (let ((v628 : SrcVars (object/fromEntries [["i" @ind] ["name" (let ((v565 : SrcVars (object/fromEntries [["n" (str/concat "" @ri)]]))) (let ((f566p (str/split @config.mapName "{{"))) (str/concat (default (array/first @f566p) "") (str/join (array/map (array/drop @f566p 1) (fn f566q (let ((f566r (str/split @f566q "}}"))) (if (< (array/len @f566r) 2) (str/concat "{{" @f566q) (str/concat (object/get @v565 (default (array/first @f566r) "") (str/concat "{{" (default (array/first @f566r) "") "}}")) (str/join (array/drop @f566r 1) "}}")))))) ""))))] ["decode" @dec] ["expr" (let ((rs567p (str/split (default (array/nth (object/get @job "items") 2) @config.nullLit) "\u{e000}"))) (str/concat (default (array/first @rs567p) "") (str/join (array/map (array/drop @rs567p 1) (fn rs567q (let ((rs567rest (str/replace-pattern @rs567q "^[^\u{e001}-\u{e00c}]*" ""))) (let ((rs567rel (str/slice @rs567q 0 (- (str/len @rs567q) (str/len @rs567rest)))) (rs567c (str/slice @rs567rest 0 1)) (rs567afterc (str/slice @rs567rest 1 (str/len @rs567rest)))) (let ((rs567lead (default (array/first (str/split (str/slice @rs567rel 1 (str/len @rs567rel)) "]")) "")) (rs567after (str/join (array/drop (str/split @rs567rel "]") 1) "]"))) (let ((rs567abs (str/concat @base (if (= @rs567lead "1") ".guard" (str/concat ".effects[" (- (default (str/to-int @rs567lead) 2) 2) "]")) @rs567after))) (let ((rs567ty (default (array/nth (default (array/find (object/entries @entity.types) (fn rs567e (= (array/nth @rs567e 0) @rs567abs))) ["" ""]) 1) "")) (rs567ex (default (array/nth (default (array/find (object/entries @entity.expected) (fn rs567x (= (array/nth @rs567x 0) @rs567abs))) ["" ""]) 1) ""))) (let ((rs567mapped (default (array/nth (default (array/find (object/entries @config.typeNames) (fn rs567n (= (array/nth @rs567n 0) @rs567ty))) ["" ""]) 1) ""))) (if (= @rs567c "\u{e001}") (str/concat (if (= @rs567ty "") @config.typeUnknown (if (!= @rs567mapped "") @rs567mapped @rs567ty)) @rs567afterc) (if (= @rs567c "\u{e002}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:"))) (str/concat (if (str/includes @rs567ex ".") (default (array/nth (str/split (let ((v578 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs567ex ".")) "")] ["arm" (let ((cb572 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs567ex ".") 1) @rs567ex) "-" "_") "[.]" "_"))) (let ((cw573 (array/filter (str/split (str/lower @cb572) "_") (fn cx574 (!= @cx574 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb572) (if (= @config.unionArmCase "upper") (str/upper @cb572) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw573) "") (str/join (array/map (array/drop @cw573 1) (fn cy575 (str/capitalize @cy575))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw573 (fn cy575 (str/capitalize @cy575))) "") (let ((ck576 (str/split @cb572 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck576) "") (str/join (array/map (array/drop @ck576 1) (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck576 (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl577 (str/join (array/map @ck576 (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) ""))) (str/concat (str/lower (str/slice @cl577 0 1)) (str/slice @cl577 1 (str/len @cl577)))) @cb572))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f579p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f579p) "") (str/join (array/map (array/drop @f579p 1) (fn f579q (let ((f579r (str/split @f579q "}}"))) (if (< (array/len @f579r) 2) (str/concat "{{" @f579q) (str/concat (object/get @v578 (default (array/first @f579r) "") (str/concat "{{" (default (array/first @f579r) "") "}}")) (str/join (array/drop @f579r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") "") (default (array/nth (str/split (let ((v568 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs567ex ".") 1) @rs567ex)] ["fields" "\u{e0ff}"]]))) (let ((f569p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f569p) "") (str/join (array/map (array/drop @f569p 1) (fn f569q (let ((f569r (str/split @f569q "}}"))) (if (< (array/len @f569r) 2) (str/concat "{{" @f569q) (str/concat (object/get @v568 (default (array/first @f569r) "") (str/concat "{{" (default (array/first @f569r) "") "}}")) (str/join (array/drop @f569r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) @config.mapOpen) @rs567afterc) (if (= @rs567c "\u{e003}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:"))) (default (array/nth (str/split (let ((v588 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames (default (array/first (str/split @rs567afterc "\u{e004}")) "") null) (let ((cb582 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs567afterc "\u{e004}")) "") "-" "_") "[.]" "_"))) (let ((cw583 (array/filter (str/split (str/lower @cb582) "_") (fn cx584 (!= @cx584 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb582) (if (= @config.fieldCase "upper") (str/upper @cb582) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw583) "") (str/join (array/map (array/drop @cw583 1) (fn cy585 (str/capitalize @cy585))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw583 (fn cy585 (str/capitalize @cy585))) "") (let ((ck586 (str/split @cb582 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck586) "") (str/join (array/map (array/drop @ck586 1) (fn cy585 (str/concat (str/upper (str/slice @cy585 0 1)) (str/slice @cy585 1 (str/len @cy585))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck586 (fn cy585 (str/concat (str/upper (str/slice @cy585 0 1)) (str/slice @cy585 1 (str/len @cy585))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl587 (str/join (array/map @ck586 (fn cy585 (str/concat (str/upper (str/slice @cy585 0 1)) (str/slice @cy585 1 (str/len @cy585))))) ""))) (str/concat (str/lower (str/slice @cl587 0 1)) (str/slice @cl587 1 (str/len @cl587)))) @cb582)))))))))))] ["value" "\u{e0ff}"]]))) (let ((f589p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f589p) "") (str/join (array/map (array/drop @f589p 1) (fn f589q (let ((f589r (str/split @f589q "}}"))) (if (< (array/len @f589r) 2) (str/concat "{{" @f589q) (str/concat (object/get @v588 (default (array/first @f589r) "") (str/concat "{{" (default (array/first @f589r) "") "}}")) (str/join (array/drop @f589r 1) "}}")))))) "")))) "\u{e0ff}") 0) "") (default (array/nth (str/split (let ((v597 : SrcVars (object/fromEntries [["key" (let ((sj592 (json/stringify (default (array/first (str/split @rs567afterc "\u{e004}")) "")))) (let ((v595 : SrcVars (object/fromEntries [["json" (if (= (array/len (object/keys @config.stringEscapes)) 0) @sj592 (str/concat "\"" (array/reduce (array/sort (object/keys @config.stringEscapes)) (str/slice @sj592 1 (- (str/len @sj592) 1)) (fn sa593 sk594 (str/replaceAll @sa593 @sk594 (object/get @config.stringEscapes @sk594 "")))) "\""))]]))) (let ((f596p (str/split @config.stringForm "{{"))) (str/concat (default (array/first @f596p) "") (str/join (array/map (array/drop @f596p 1) (fn f596q (let ((f596r (str/split @f596q "}}"))) (if (< (array/len @f596r) 2) (str/concat "{{" @f596q) (str/concat (object/get @v595 (default (array/first @f596r) "") (str/concat "{{" (default (array/first @f596r) "") "}}")) (str/join (array/drop @f596r 1) "}}")))))) "")))))] ["value" "\u{e0ff}"]]))) (let ((f598p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f598p) "") (str/join (array/map (array/drop @f598p 1) (fn f598q (let ((f598r (str/split @f598q "}}"))) (if (< (array/len @f598r) 2) (str/concat "{{" @f598q) (str/concat (object/get @v597 (default (array/first @f598r) "") (str/concat "{{" (default (array/first @f598r) "") "}}")) (str/join (array/drop @f598r 1) "}}")))))) "")))) "\u{e0ff}") 0) "")) (str/join (array/drop (str/split @rs567afterc "\u{e004}") 1) "\u{e004}")) (if (= @rs567c "\u{e005}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:"))) (default (array/nth (str/split (let ((v590 : SrcVars (object/fromEntries [["name" ""] ["value" "\u{e0ff}"]]))) (let ((f591p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f591p) "") (str/join (array/map (array/drop @f591p 1) (fn f591q (let ((f591r (str/split @f591q "}}"))) (if (< (array/len @f591r) 2) (str/concat "{{" @f591q) (str/concat (object/get @v590 (default (array/first @f591r) "") (str/concat "{{" (default (array/first @f591r) "") "}}")) (str/join (array/drop @f591r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (default (array/nth (str/split (let ((v599 : SrcVars (object/fromEntries [["key" ""] ["value" "\u{e0ff}"]]))) (let ((f600p (str/split @config.mapPair "{{"))) (str/concat (default (array/first @f600p) "") (str/join (array/map (array/drop @f600p 1) (fn f600q (let ((f600r (str/split @f600q "}}"))) (if (< (array/len @f600r) 2) (str/concat "{{" @f600q) (str/concat (object/get @v599 (default (array/first @f600r) "") (str/concat "{{" (default (array/first @f600r) "") "}}")) (str/join (array/drop @f600r 1) "}}")))))) "")))) "\u{e0ff}") 1) "")) @rs567afterc) (if (= @rs567c "\u{e006}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:"))) @config.recordSep @config.mapSep) @rs567afterc) (if (= @rs567c "\u{e007}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:"))) (str/concat (default (array/nth (str/split (let ((v570 : SrcVars (object/fromEntries [["type" (default (array/nth (str/split @rs567ex ".") 1) @rs567ex)] ["fields" "\u{e0ff}"]]))) (let ((f571p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f571p) "") (str/join (array/map (array/drop @f571p 1) (fn f571q (let ((f571r (str/split @f571q "}}"))) (if (< (array/len @f571r) 2) (str/concat "{{" @f571q) (str/concat (object/get @v570 (default (array/first @f571r) "") (str/concat "{{" (default (array/first @f571r) "") "}}")) (str/join (array/drop @f571r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") (if (str/includes @rs567ex ".") (default (array/nth (str/split (let ((v580 : SrcVars (object/fromEntries [["union" (default (array/first (str/split @rs567ex ".")) "")] ["arm" (let ((cb572 (str/replace-pattern (str/replaceAll (default (array/nth (str/split @rs567ex ".") 1) @rs567ex) "-" "_") "[.]" "_"))) (let ((cw573 (array/filter (str/split (str/lower @cb572) "_") (fn cx574 (!= @cx574 ""))))) (if (= @config.unionArmCase "lower") (str/lower @cb572) (if (= @config.unionArmCase "upper") (str/upper @cb572) (if (= @config.unionArmCase "camel") (str/concat (default (array/first @cw573) "") (str/join (array/map (array/drop @cw573 1) (fn cy575 (str/capitalize @cy575))) "")) (if (= @config.unionArmCase "pascal") (str/join (array/map @cw573 (fn cy575 (str/capitalize @cy575))) "") (let ((ck576 (str/split @cb572 "_"))) (if (= @config.unionArmCase "split-camel") (str/concat (default (array/first @ck576) "") (str/join (array/map (array/drop @ck576 1) (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) "")) (if (= @config.unionArmCase "split-pascal") (str/join (array/map @ck576 (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) "") (if (= @config.unionArmCase "lower-camel") (let ((cl577 (str/join (array/map @ck576 (fn cy575 (str/concat (str/upper (str/slice @cy575 0 1)) (str/slice @cy575 1 (str/len @cy575))))) ""))) (str/concat (str/lower (str/slice @cl577 0 1)) (str/slice @cl577 1 (str/len @cl577)))) @cb572))))))))))] ["inner" "\u{e0ff}"]]))) (let ((f581p (str/split @config.unionArmForm "{{"))) (str/concat (default (array/first @f581p) "") (str/join (array/map (array/drop @f581p 1) (fn f581q (let ((f581r (str/split @f581q "}}"))) (if (< (array/len @f581r) 2) (str/concat "{{" @f581q) (str/concat (object/get @v580 (default (array/first @f581r) "") (str/concat "{{" (default (array/first @f581r) "") "}}")) (str/join (array/drop @f581r 1) "}}")))))) "")))) "\u{e0ff}") 1) "") "")) @config.mapClose) @rs567afterc) (if (= @rs567c "\u{e008}") (str/concat (if (and (!= @config.enumForm "") (str/startsWith @rs567ex "enum:")) (let ((v607 : SrcVars (object/fromEntries [["enum" (str/slice @rs567ex 5 (str/len @rs567ex))] ["member" (let ((cb601 (str/replace-pattern (str/replaceAll (default (array/first (str/split @rs567afterc "\u{e009}")) "") "-" "_") "[.]" "_"))) (let ((cw602 (array/filter (str/split (str/lower @cb601) "_") (fn cx603 (!= @cx603 ""))))) (if (= @config.enumMemberCase "lower") (str/lower @cb601) (if (= @config.enumMemberCase "upper") (str/upper @cb601) (if (= @config.enumMemberCase "camel") (str/concat (default (array/first @cw602) "") (str/join (array/map (array/drop @cw602 1) (fn cy604 (str/capitalize @cy604))) "")) (if (= @config.enumMemberCase "pascal") (str/join (array/map @cw602 (fn cy604 (str/capitalize @cy604))) "") (let ((ck605 (str/split @cb601 "_"))) (if (= @config.enumMemberCase "split-camel") (str/concat (default (array/first @ck605) "") (str/join (array/map (array/drop @ck605 1) (fn cy604 (str/concat (str/upper (str/slice @cy604 0 1)) (str/slice @cy604 1 (str/len @cy604))))) "")) (if (= @config.enumMemberCase "split-pascal") (str/join (array/map @ck605 (fn cy604 (str/concat (str/upper (str/slice @cy604 0 1)) (str/slice @cy604 1 (str/len @cy604))))) "") (if (= @config.enumMemberCase "lower-camel") (let ((cl606 (str/join (array/map @ck605 (fn cy604 (str/concat (str/upper (str/slice @cy604 0 1)) (str/slice @cy604 1 (str/len @cy604))))) ""))) (str/concat (str/lower (str/slice @cl606 0 1)) (str/slice @cl606 1 (str/len @cl606)))) @cb601))))))))))]]))) (let ((f608p (str/split @config.enumForm "{{"))) (str/concat (default (array/first @f608p) "") (str/join (array/map (array/drop @f608p 1) (fn f608q (let ((f608r (str/split @f608q "}}"))) (if (< (array/len @f608r) 2) (str/concat "{{" @f608q) (str/concat (object/get @v607 (default (array/first @f608r) "") (str/concat "{{" (default (array/first @f608r) "") "}}")) (str/join (array/drop @f608r 1) "}}")))))) "")))) (default (array/first (str/split (str/join (array/drop (str/split @rs567afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}")) "")) (str/join (array/drop (str/split (str/join (array/drop (str/split @rs567afterc "\u{e009}") 1) "\u{e009}") "\u{e00a}") 1) "\u{e00a}")) (if (= @rs567c "\u{e00b}") (str/concat (if (and (!= @config.recordForm "") (!= @rs567ex "") (not (str/startsWith @rs567ex "enum:")) (not (str/includes @rs567ex ".")) (object/has @entity.models @rs567ex)) (let ((v626 : SrcVars (object/fromEntries [["type" @rs567ex] ["fields" (str/join (array/map (default (object/get @entity.models @rs567ex null) []) (fn rm609 (let ((v624 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm609 null) (let ((cb610 (str/replace-pattern (str/replaceAll @rm609 "-" "_") "[.]" "_"))) (let ((cw611 (array/filter (str/split (str/lower @cb610) "_") (fn cx612 (!= @cx612 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb610) (if (= @config.fieldCase "upper") (str/upper @cb610) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw611) "") (str/join (array/map (array/drop @cw611 1) (fn cy613 (str/capitalize @cy613))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw611 (fn cy613 (str/capitalize @cy613))) "") (let ((ck614 (str/split @cb610 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck614) "") (str/join (array/map (array/drop @ck614 1) (fn cy613 (str/concat (str/upper (str/slice @cy613 0 1)) (str/slice @cy613 1 (str/len @cy613))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck614 (fn cy613 (str/concat (str/upper (str/slice @cy613 0 1)) (str/slice @cy613 1 (str/len @cy613))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl615 (str/join (array/map @ck614 (fn cy613 (str/concat (str/upper (str/slice @cy613 0 1)) (str/slice @cy613 1 (str/len @cy613))))) ""))) (str/concat (str/lower (str/slice @cl615 0 1)) (str/slice @cl615 1 (str/len @cl615)))) @cb610)))))))))))] ["value" (str/concat (default (array/first (str/split @rs567afterc "\u{e00c}")) "") (let ((v622 : SrcVars (object/fromEntries [["name" (default (object/get @config.fieldNames @rm609 null) (let ((cb616 (str/replace-pattern (str/replaceAll @rm609 "-" "_") "[.]" "_"))) (let ((cw617 (array/filter (str/split (str/lower @cb616) "_") (fn cx618 (!= @cx618 ""))))) (if (= @config.fieldCase "lower") (str/lower @cb616) (if (= @config.fieldCase "upper") (str/upper @cb616) (if (= @config.fieldCase "camel") (str/concat (default (array/first @cw617) "") (str/join (array/map (array/drop @cw617 1) (fn cy619 (str/capitalize @cy619))) "")) (if (= @config.fieldCase "pascal") (str/join (array/map @cw617 (fn cy619 (str/capitalize @cy619))) "") (let ((ck620 (str/split @cb616 "_"))) (if (= @config.fieldCase "split-camel") (str/concat (default (array/first @ck620) "") (str/join (array/map (array/drop @ck620 1) (fn cy619 (str/concat (str/upper (str/slice @cy619 0 1)) (str/slice @cy619 1 (str/len @cy619))))) "")) (if (= @config.fieldCase "split-pascal") (str/join (array/map @ck620 (fn cy619 (str/concat (str/upper (str/slice @cy619 0 1)) (str/slice @cy619 1 (str/len @cy619))))) "") (if (= @config.fieldCase "lower-camel") (let ((cl621 (str/join (array/map @ck620 (fn cy619 (str/concat (str/upper (str/slice @cy619 0 1)) (str/slice @cy619 1 (str/len @cy619))))) ""))) (str/concat (str/lower (str/slice @cl621 0 1)) (str/slice @cl621 1 (str/len @cl621)))) @cb616)))))))))))]]))) (let ((f623p (str/split @config.attrAccess "{{"))) (str/concat (default (array/first @f623p) "") (str/join (array/map (array/drop @f623p 1) (fn f623q (let ((f623r (str/split @f623q "}}"))) (if (< (array/len @f623r) 2) (str/concat "{{" @f623q) (str/concat (object/get @v622 (default (array/first @f623r) "") (str/concat "{{" (default (array/first @f623r) "") "}}")) (str/join (array/drop @f623r 1) "}}")))))) "")))))]]))) (let ((f625p (str/split @config.recordField "{{"))) (str/concat (default (array/first @f625p) "") (str/join (array/map (array/drop @f625p 1) (fn f625q (let ((f625r (str/split @f625q "}}"))) (if (< (array/len @f625r) 2) (str/concat "{{" @f625q) (str/concat (object/get @v624 (default (array/first @f625r) "") (str/concat "{{" (default (array/first @f625r) "") "}}")) (str/join (array/drop @f625r 1) "}}")))))) "")))))) @config.recordSep)]]))) (let ((f627p (str/split @config.recordForm "{{"))) (str/concat (default (array/first @f627p) "") (str/join (array/map (array/drop @f627p 1) (fn f627q (let ((f627r (str/split @f627q "}}"))) (if (< (array/len @f627r) 2) (str/concat "{{" @f627q) (str/concat (object/get @v626 (default (array/first @f627r) "") (str/concat "{{" (default (array/first @f627r) "") "}}")) (str/join (array/drop @f627r 1) "}}")))))) "")))) (default (array/first (str/split @rs567afterc "\u{e00c}")) "")) (str/join (array/drop (str/split @rs567afterc "\u{e00c}") 1) "\u{e00c}")) (str/concat "\u{e000}" @rs567q))))))))))))))))) "")))]]))) (let ((f629p (str/split @l "{{"))) (str/concat (default (array/first @f629p) "") (str/join (array/map (array/drop @f629p 1) (fn f629q (let ((f629r (str/split @f629q "}}"))) (if (< (array/len @f629r) 2) (str/concat "{{" @f629q) (str/concat (object/get @v628 (default (array/first @f629r) "") (str/concat "{{" (default (array/first @f629r) "") "}}")) (str/join (array/drop @f629r 1) "}}")))))) ""))))))))))))))))
1114
+ )])))))
928
1115
  (set @entity.tokens (array/concat
929
1116
  (array/flatten (array/flatten (array/map @entity.renders (fn g (array/map @g (fn r (object/get @r "uses")))))))
930
1117
  (array/flatten (array/flatten (array/map @entity.typeRenders (fn g (array/map @g (fn r (object/get @r "uses")))))))
931
1118
  (if (and @config.renderModels (array/some @entity.containers (fn c (not (object/get @c "alias"))))) ["dataclass"] [])
932
1119
  (if (and @config.renderModels (array/some @entity.containers (fn c (array/some (object/get @c "fields") (fn f (and (!= (object/get @f "default" null) null) (or (validate/array (object/get @f "default" null)) (validate/object (object/get @f "default" null))))))))) ["field"] [])))
1120
+ (set @entity.tokens (array/concat @entity.tokens (if (and (> (array/len @config.programOpen) 0) (or (array/some @entity.traits (fn t (> (array/len (object/get @t "listenRows")) 0))) (array/includes @entity.tokens "store"))) ["router"] [])))
933
1121
  (set @entity.helperTexts (array/sort (array/unique (array/flatten (array/map (array/unique @entity.tokens) (fn tk (object/get @config.helpers @tk [])))))))
934
1122
  (emit SRC_FINISH { })
935
1123
 
936
1124
  SRC_FINISH -> ready
937
1125
  (set @entity.text (let ((importLines (array/sort (array/unique (array/filter (array/map @entity.tokens (fn tk (object/get @config.imports @tk ""))) (fn l (!= @l ""))))))
938
- (ents (array/sort (array/unique (array/concat (array/map (array/filter (array/map @entity.traits (fn t (object/get @t "entity"))) (fn x (!= @x ""))) (fn x (let ((en334 @x)) (object/get @config.entityNames @en334 @en334))))
1126
+ (ents (array/sort (array/unique (array/concat (array/map (array/filter (array/map @entity.traits (fn t (object/get @t "entity"))) (fn x (!= @x ""))) (fn x (let ((en630 @x)) (object/get @config.entityNames @en630 @en630))))
939
1127
  (if (= @config.recordForm "") [] (array/flatten (array/map (object/values @entity.expected) (fn v (if (str/startsWith @v "enum:") [(str/slice @v 5 (str/len @v))] (str/split @v "."))))))))))
940
1128
  (pls (array/sort (array/unique (array/flatten (array/map @entity.traits (fn t (array/concat (object/values (object/get @t "listenTypes")) (object/values (object/get @t "emitTypes")) (if (= (object/get @t "configType") "") [] [(object/get @t "configType")])))))))))
941
- (let ((entLines (let ((tpl (object/get @config.modelImports "entity" ""))) (if (or (= @tpl "") (= (array/len @ents) 0)) [] (if @config.modelImportEach (array/map @ents (fn nm (let ((v335 : SrcVars (object/fromEntries [["name" @nm]]))) (let ((f336p (str/split @tpl "{{"))) (str/concat (default (array/first @f336p) "") (str/join (array/map (array/drop @f336p 1) (fn f336q (let ((f336r (str/split @f336q "}}"))) (if (< (array/len @f336r) 2) (str/concat "{{" @f336q) (str/concat (object/get @v335 (default (array/first @f336r) "") (str/concat "{{" (default (array/first @f336r) "") "}}")) (str/join (array/drop @f336r 1) "}}")))))) "")))))) [(let ((v337 : SrcVars (object/fromEntries [["names" (str/join @ents @config.modelImportSep)]]))) (let ((f338p (str/split @tpl "{{"))) (str/concat (default (array/first @f338p) "") (str/join (array/map (array/drop @f338p 1) (fn f338q (let ((f338r (str/split @f338q "}}"))) (if (< (array/len @f338r) 2) (str/concat "{{" @f338q) (str/concat (object/get @v337 (default (array/first @f338r) "") (str/concat "{{" (default (array/first @f338r) "") "}}")) (str/join (array/drop @f338r 1) "}}")))))) ""))))]))))
942
- (plLines (let ((tpl (object/get @config.modelImports "payload" ""))) (if (or (= @tpl "") (= (array/len @pls) 0)) [] (if @config.modelImportEach (array/map @pls (fn nm (let ((v339 : SrcVars (object/fromEntries [["name" @nm]]))) (let ((f340p (str/split @tpl "{{"))) (str/concat (default (array/first @f340p) "") (str/join (array/map (array/drop @f340p 1) (fn f340q (let ((f340r (str/split @f340q "}}"))) (if (< (array/len @f340r) 2) (str/concat "{{" @f340q) (str/concat (object/get @v339 (default (array/first @f340r) "") (str/concat "{{" (default (array/first @f340r) "") "}}")) (str/join (array/drop @f340r 1) "}}")))))) "")))))) [(let ((v341 : SrcVars (object/fromEntries [["names" (str/join @pls @config.modelImportSep)]]))) (let ((f342p (str/split @tpl "{{"))) (str/concat (default (array/first @f342p) "") (str/join (array/map (array/drop @f342p 1) (fn f342q (let ((f342r (str/split @f342q "}}"))) (if (< (array/len @f342r) 2) (str/concat "{{" @f342q) (str/concat (object/get @v341 (default (array/first @f342r) "") (str/concat "{{" (default (array/first @f342r) "") "}}")) (str/join (array/drop @f342r 1) "}}")))))) ""))))])))))
1129
+ (let ((entLines (let ((tpl (object/get @config.modelImports "entity" ""))) (if (or (= @tpl "") (= (array/len @ents) 0)) [] (if @config.modelImportEach (array/map @ents (fn nm (let ((v631 : SrcVars (object/fromEntries [["name" @nm]]))) (let ((f632p (str/split @tpl "{{"))) (str/concat (default (array/first @f632p) "") (str/join (array/map (array/drop @f632p 1) (fn f632q (let ((f632r (str/split @f632q "}}"))) (if (< (array/len @f632r) 2) (str/concat "{{" @f632q) (str/concat (object/get @v631 (default (array/first @f632r) "") (str/concat "{{" (default (array/first @f632r) "") "}}")) (str/join (array/drop @f632r 1) "}}")))))) "")))))) [(let ((v633 : SrcVars (object/fromEntries [["names" (str/join @ents @config.modelImportSep)]]))) (let ((f634p (str/split @tpl "{{"))) (str/concat (default (array/first @f634p) "") (str/join (array/map (array/drop @f634p 1) (fn f634q (let ((f634r (str/split @f634q "}}"))) (if (< (array/len @f634r) 2) (str/concat "{{" @f634q) (str/concat (object/get @v633 (default (array/first @f634r) "") (str/concat "{{" (default (array/first @f634r) "") "}}")) (str/join (array/drop @f634r 1) "}}")))))) ""))))]))))
1130
+ (plLines (let ((tpl (object/get @config.modelImports "payload" ""))) (if (or (= @tpl "") (= (array/len @pls) 0)) [] (if @config.modelImportEach (array/map @pls (fn nm (let ((v635 : SrcVars (object/fromEntries [["name" @nm]]))) (let ((f636p (str/split @tpl "{{"))) (str/concat (default (array/first @f636p) "") (str/join (array/map (array/drop @f636p 1) (fn f636q (let ((f636r (str/split @f636q "}}"))) (if (< (array/len @f636r) 2) (str/concat "{{" @f636q) (str/concat (object/get @v635 (default (array/first @f636r) "") (str/concat "{{" (default (array/first @f636r) "") "}}")) (str/join (array/drop @f636r 1) "}}")))))) "")))))) [(let ((v637 : SrcVars (object/fromEntries [["names" (str/join @pls @config.modelImportSep)]]))) (let ((f638p (str/split @tpl "{{"))) (str/concat (default (array/first @f638p) "") (str/join (array/map (array/drop @f638p 1) (fn f638q (let ((f638r (str/split @f638q "}}"))) (if (< (array/len @f638r) 2) (str/concat "{{" @f638q) (str/concat (object/get @v637 (default (array/first @f638r) "") (str/concat "{{" (default (array/first @f638r) "") "}}")) (str/join (array/drop @f638r 1) "}}")))))) ""))))])))))
943
1131
  (let ((sections (array/filter (array/concat
944
1132
  [@config.fileHeader (str/join (array/concat @importLines (if @config.renderModels [] (array/concat @entLines @plLines))) "\n")]
945
1133
  [(str/join @entity.helperTexts @config.helperGap)]
946
1134
  (array/map @entity.blocks (fn b (str/join @b "\n"))))
947
1135
  (fn s (!= @s "")))))
948
- (str/concat (str/join @sections @config.sectionGap) "\n")))))
1136
+ (str/replaceAll (str/replaceAll (str/concat (str/join @sections @config.sectionGap) "\n") "\u{e00d}" "") "\u{e00e}" "")))))
949
1137
  (emit SOURCE_RENDERED { text: @entity.text, warnings: @entity.warnings })
950
1138
  }
951
1139
 
@@ -984,6 +1172,9 @@ orbital LoloSourceOrbital [fs: { cwd: "node_modules/@almadar/std/**": [read] }]
984
1172
  LOLO_READ { result : SrcProgram! }
985
1173
  @description "Internal: the program read by program/read."
986
1174
  @tier "internal"
1175
+ LOLO_RESOLVED { result : SrcResolved! }
1176
+ @description "Internal: the composed program, read by program/read with resolve, of a program that composes behaviors."
1177
+ @tier "internal"
987
1178
  LOLO_INSPECTED { result : SrcInspect! }
988
1179
  @description "Internal: the program and its types read by program/read with inspect."
989
1180
  @tier "internal"