@awacloud/fw 0.1.0 → 1.0.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 (609) hide show
  1. package/CHANGELOG.md +125 -0
  2. package/NOTICE +8 -0
  3. package/README.md +163 -31
  4. package/dist/build/fw.core.pure.meta.json +6 -6
  5. package/dist/build/fw.core.pure.min.js +15 -12
  6. package/dist/build/fw.full.pure.meta.json +13 -7
  7. package/dist/build/fw.full.pure.min.js +45 -42
  8. package/dist/build/fw.minimal.pure.meta.json +6 -6
  9. package/dist/build/fw.minimal.pure.min.js +16 -13
  10. package/dist/build/fw.pack.compress-heavy.pure.meta.json +6 -6
  11. package/dist/build/fw.pack.compress-heavy.pure.min.js +3 -3
  12. package/dist/build/fw.pack.crypto-advanced.pure.meta.json +6 -6
  13. package/dist/build/fw.pack.crypto-advanced.pure.min.js +1 -1
  14. package/dist/build/fw.pack.crypto-basic.pure.meta.json +6 -6
  15. package/dist/build/fw.pack.crypto-basic.pure.min.js +1 -1
  16. package/dist/build/fw.pack.crypto-identity.pure.meta.json +7 -6
  17. package/dist/build/fw.pack.crypto-identity.pure.min.js +4 -4
  18. package/dist/build/fw.pwa.pure.meta.json +7 -6
  19. package/dist/build/fw.pwa.pure.min.js +38 -35
  20. package/dist/build/fw.site-interactive.pure.meta.json +6 -6
  21. package/dist/build/fw.site-interactive.pure.min.js +37 -34
  22. package/dist/build/fw.site.pure.meta.json +6 -6
  23. package/dist/build/fw.site.pure.min.js +24 -21
  24. package/dist/build/fw.spa.pure.meta.json +8 -7
  25. package/dist/build/fw.spa.pure.min.js +41 -38
  26. package/dist/build/sanity-base-classic.min.js +1 -1
  27. package/dist/build/sanity.min.js +1 -1
  28. package/dist/types/core/internal.d.ts +29 -0
  29. package/dist/types/core/internal.d.ts.map +1 -0
  30. package/dist/types/core/logger.d.ts +23 -4
  31. package/dist/types/core/logger.d.ts.map +1 -1
  32. package/dist/types/core/modules.d.ts +374 -61
  33. package/dist/types/core/modules.d.ts.map +1 -1
  34. package/dist/types/core/runtime.d.ts +10 -6
  35. package/dist/types/core/runtime.d.ts.map +1 -1
  36. package/dist/types/core/worker-helper.d.ts +35 -0
  37. package/dist/types/core/worker-helper.d.ts.map +1 -1
  38. package/dist/types/crypto/cipher/aes.d.ts +1 -7
  39. package/dist/types/crypto/cipher/aes.d.ts.map +1 -1
  40. package/dist/types/crypto/cipher/chacha20.d.ts +0 -10
  41. package/dist/types/crypto/cipher/chacha20.d.ts.map +1 -1
  42. package/dist/types/crypto/hash/argon2.d.ts +0 -15
  43. package/dist/types/crypto/hash/argon2.d.ts.map +1 -1
  44. package/dist/types/crypto/hash/blake2b.d.ts.map +1 -1
  45. package/dist/types/crypto/hash/hmac.d.ts.map +1 -1
  46. package/dist/types/crypto/hash/pbkdf2.d.ts.map +1 -1
  47. package/dist/types/crypto/hash/poly1305.d.ts.map +1 -1
  48. package/dist/types/crypto/hash/sha224.d.ts +1 -1
  49. package/dist/types/crypto/hash/sha256.d.ts +4 -13
  50. package/dist/types/crypto/hash/sha256.d.ts.map +1 -1
  51. package/dist/types/crypto/hash/sha3.d.ts.map +1 -1
  52. package/dist/types/crypto/hash/sha384.d.ts +1 -1
  53. package/dist/types/crypto/hash/sha512.d.ts +4 -13
  54. package/dist/types/crypto/hash/sha512.d.ts.map +1 -1
  55. package/dist/types/crypto/mode/cmac.d.ts +0 -6
  56. package/dist/types/crypto/mode/cmac.d.ts.map +1 -1
  57. package/dist/types/crypto/mode/ctr.d.ts +0 -6
  58. package/dist/types/crypto/mode/ctr.d.ts.map +1 -1
  59. package/dist/types/crypto/mode/gcm.d.ts +0 -9
  60. package/dist/types/crypto/mode/gcm.d.ts.map +1 -1
  61. package/dist/types/crypto/pkc/ecc.d.ts +0 -1
  62. package/dist/types/crypto/pkc/ecc.d.ts.map +1 -1
  63. package/dist/types/crypto/pkc/ed25519.d.ts +4 -25
  64. package/dist/types/crypto/pkc/ed25519.d.ts.map +1 -1
  65. package/dist/types/crypto/pkc/hybridSign.d.ts +25 -5
  66. package/dist/types/crypto/pkc/hybridSign.d.ts.map +1 -1
  67. package/dist/types/crypto/pkc/ml_dsa.d.ts +6 -26
  68. package/dist/types/crypto/pkc/ml_dsa.d.ts.map +1 -1
  69. package/dist/types/crypto/pkc/ml_kem.d.ts +0 -43
  70. package/dist/types/crypto/pkc/ml_kem.d.ts.map +1 -1
  71. package/dist/types/crypto/pkc/rsa.d.ts +0 -24
  72. package/dist/types/crypto/pkc/rsa.d.ts.map +1 -1
  73. package/dist/types/crypto/pkc/slh_dsa.d.ts +6 -16
  74. package/dist/types/crypto/pkc/slh_dsa.d.ts.map +1 -1
  75. package/dist/types/crypto/pkc/x25519.d.ts +0 -6
  76. package/dist/types/crypto/pkc/x25519.d.ts.map +1 -1
  77. package/dist/types/crypto/utils/bitArray.d.ts +0 -8
  78. package/dist/types/crypto/utils/bitArray.d.ts.map +1 -1
  79. package/dist/types/crypto/utils/jws.d.ts +6 -14
  80. package/dist/types/crypto/utils/jws.d.ts.map +1 -1
  81. package/dist/types/crypto/utils/keyformat.d.ts +52 -0
  82. package/dist/types/crypto/utils/keyformat.d.ts.map +1 -1
  83. package/dist/types/crypto/utils/random.d.ts +1 -10
  84. package/dist/types/crypto/utils/random.d.ts.map +1 -1
  85. package/dist/types/crypto/utils/rsaKeygen.d.ts +0 -10
  86. package/dist/types/crypto/utils/rsaKeygen.d.ts.map +1 -1
  87. package/dist/types/crypto/utils/uuid.d.ts.map +1 -1
  88. package/dist/types/crypto/utils/x509.d.ts +397 -0
  89. package/dist/types/crypto/utils/x509.d.ts.map +1 -0
  90. package/dist/types/crypto/wasm/argon2.d.ts +2 -1
  91. package/dist/types/crypto/wasm/argon2.d.ts.map +1 -1
  92. package/dist/types/crypto/wasm/pbkdf2.d.ts +2 -2
  93. package/dist/types/crypto/wasm/pbkdf2.d.ts.map +1 -1
  94. package/dist/types/crypto/wasm/rsa.d.ts.map +1 -1
  95. package/dist/types/crypto/wasm/runtime.d.ts +13 -0
  96. package/dist/types/crypto/wasm/runtime.d.ts.map +1 -1
  97. package/dist/types/crypto/webcrypto/aes.d.ts.map +1 -1
  98. package/dist/types/crypto/webcrypto/aeskw.d.ts.map +1 -1
  99. package/dist/types/crypto/webcrypto/digest.d.ts +0 -4
  100. package/dist/types/crypto/webcrypto/digest.d.ts.map +1 -1
  101. package/dist/types/crypto/webcrypto/rsa.d.ts.map +1 -1
  102. package/dist/types/dom/fs/fileIntake.d.ts +59 -0
  103. package/dist/types/dom/fs/fileIntake.d.ts.map +1 -0
  104. package/dist/types/dom/fs/fsAccess.d.ts.map +1 -1
  105. package/dist/types/dom/query/dnd.d.ts.map +1 -1
  106. package/dist/types/dom/query/sound.d.ts +89 -0
  107. package/dist/types/dom/query/sound.d.ts.map +1 -0
  108. package/dist/types/dom/rendering/chart.d.ts.map +1 -1
  109. package/dist/types/dom/rendering/component.d.ts +9 -3
  110. package/dist/types/dom/rendering/component.d.ts.map +1 -1
  111. package/dist/types/dom/rendering/parser.d.ts +39 -0
  112. package/dist/types/dom/rendering/parser.d.ts.map +1 -1
  113. package/dist/types/dom/rendering/render.d.ts.map +1 -1
  114. package/dist/types/dom/rendering/sanitize.d.ts +4 -0
  115. package/dist/types/dom/rendering/sanitize.d.ts.map +1 -1
  116. package/dist/types/dom/rendering/secPolicy.d.ts.map +1 -1
  117. package/dist/types/dom/rendering/styleSheet.d.ts +74 -0
  118. package/dist/types/dom/rendering/styleSheet.d.ts.map +1 -0
  119. package/dist/types/dom/rendering/template.d.ts +9 -3
  120. package/dist/types/dom/rendering/template.d.ts.map +1 -1
  121. package/dist/types/dom/rendering/themeTokens.d.ts +9 -3
  122. package/dist/types/dom/rendering/themeTokens.d.ts.map +1 -1
  123. package/dist/types/dom/rendering/uiSession-core.d.ts +9 -3
  124. package/dist/types/dom/rendering/uiSession-core.d.ts.map +1 -1
  125. package/dist/types/dom/rendering/uiSession-list.d.ts +9 -3
  126. package/dist/types/dom/rendering/uiSession-list.d.ts.map +1 -1
  127. package/dist/types/dom/rendering/uiSession.d.ts +18 -6
  128. package/dist/types/dom/rendering/uiSession.d.ts.map +1 -1
  129. package/dist/types/dom/sw/installPrompt.d.ts +89 -0
  130. package/dist/types/dom/sw/installPrompt.d.ts.map +1 -0
  131. package/dist/types/dom/sw/precache.d.ts +149 -0
  132. package/dist/types/dom/sw/precache.d.ts.map +1 -0
  133. package/dist/types/dom/sw/swUpdate.d.ts +129 -0
  134. package/dist/types/dom/sw/swUpdate.d.ts.map +1 -0
  135. package/dist/types/dom/utils/clipboard.d.ts +8 -0
  136. package/dist/types/dom/utils/clipboard.d.ts.map +1 -1
  137. package/dist/types/dom/utils/keybindings.d.ts.map +1 -1
  138. package/dist/types/dom/utils/route.d.ts.map +1 -1
  139. package/dist/types/dom/utils/ua.d.ts +2 -2
  140. package/dist/types/dom/utils/ua.d.ts.map +1 -1
  141. package/dist/types/io/calc/crc32.d.ts.map +1 -1
  142. package/dist/types/io/codec/b64.d.ts +24 -0
  143. package/dist/types/io/codec/b64.d.ts.map +1 -1
  144. package/dist/types/io/codec/cbor.d.ts +1 -0
  145. package/dist/types/io/codec/cbor.d.ts.map +1 -1
  146. package/dist/types/io/codec/hex.d.ts.map +1 -1
  147. package/dist/types/io/codec/msgpack.d.ts +1 -0
  148. package/dist/types/io/codec/msgpack.d.ts.map +1 -1
  149. package/dist/types/io/codec/url.d.ts +3 -1
  150. package/dist/types/io/codec/url.d.ts.map +1 -1
  151. package/dist/types/io/codec/utf8.d.ts.map +1 -1
  152. package/dist/types/io/compress/bitstream.d.ts +1 -1
  153. package/dist/types/io/compress/brotli.d.ts +0 -1
  154. package/dist/types/io/compress/brotli.d.ts.map +1 -1
  155. package/dist/types/io/compress/brotli_shared.d.ts +0 -4
  156. package/dist/types/io/compress/brotli_shared.d.ts.map +1 -1
  157. package/dist/types/io/compress/deflate.d.ts +14 -1
  158. package/dist/types/io/compress/deflate.d.ts.map +1 -1
  159. package/dist/types/io/compress/gzip.d.ts +4 -0
  160. package/dist/types/io/compress/gzip.d.ts.map +1 -1
  161. package/dist/types/io/compress/huffman.d.ts +7 -0
  162. package/dist/types/io/compress/huffman.d.ts.map +1 -1
  163. package/dist/types/io/compress/lz4.d.ts +4 -2
  164. package/dist/types/io/compress/lz4.d.ts.map +1 -1
  165. package/dist/types/io/compress/lz77.d.ts +17 -0
  166. package/dist/types/io/compress/lz77.d.ts.map +1 -1
  167. package/dist/types/io/compress/lzw.d.ts +2 -0
  168. package/dist/types/io/compress/lzw.d.ts.map +1 -1
  169. package/dist/types/io/compress/zip.d.ts.map +1 -1
  170. package/dist/types/io/compress/zlib.d.ts +9 -2
  171. package/dist/types/io/compress/zlib.d.ts.map +1 -1
  172. package/dist/types/io/math/linalg.d.ts.map +1 -1
  173. package/dist/types/process/rpc.d.ts.map +1 -1
  174. package/dist/types/process/workerPool.d.ts.map +1 -1
  175. package/dist/types/sanity/base.d.ts +12 -2
  176. package/dist/types/sanity/base.d.ts.map +1 -1
  177. package/dist/types/sanity/lockdown.d.ts +6 -5
  178. package/dist/types/sanity/lockdown.d.ts.map +1 -1
  179. package/dist/types/sanity/wasm-gate.d.ts +1 -1
  180. package/docs/README.md +17 -10
  181. package/docs/api/README.md +5 -5
  182. package/docs/api/core/logger.md +2 -1
  183. package/docs/api/core/modules.md +3 -3
  184. package/docs/api/core/runtime.md +9 -9
  185. package/docs/api/core/worker-helper.md +12 -2
  186. package/docs/api/crypto/README.md +1 -1
  187. package/docs/api/crypto/cipher/README.md +2 -2
  188. package/docs/api/crypto/cipher/aes.md +5 -10
  189. package/docs/api/crypto/cipher/chacha20.md +3 -8
  190. package/docs/api/crypto/hash/README.md +5 -5
  191. package/docs/api/crypto/hash/adf.md +21 -11
  192. package/docs/api/crypto/hash/argon2.md +3 -12
  193. package/docs/api/crypto/hash/blake2b.md +12 -14
  194. package/docs/api/crypto/hash/pbkdf2.md +1 -1
  195. package/docs/api/crypto/hash/sha224.md +2 -2
  196. package/docs/api/crypto/hash/sha256.md +4 -4
  197. package/docs/api/crypto/hash/sha3.md +2 -2
  198. package/docs/api/crypto/hash/sha384.md +1 -1
  199. package/docs/api/crypto/hash/sha512.md +5 -5
  200. package/docs/api/crypto/hash/sha512_224.md +1 -1
  201. package/docs/api/crypto/hash/sha512_256.md +1 -1
  202. package/docs/api/crypto/mode/README.md +3 -3
  203. package/docs/api/crypto/mode/cbc.md +2 -2
  204. package/docs/api/crypto/mode/chacha20poly1305.md +1 -1
  205. package/docs/api/crypto/mode/cmac.md +4 -4
  206. package/docs/api/crypto/mode/ctr.md +2 -3
  207. package/docs/api/crypto/mode/gcm.md +5 -5
  208. package/docs/api/crypto/mode/kw.md +4 -4
  209. package/docs/api/crypto/pkc/README.md +8 -8
  210. package/docs/api/crypto/pkc/ecc.md +19 -17
  211. package/docs/api/crypto/pkc/ed25519.md +10 -15
  212. package/docs/api/crypto/pkc/hybridKem.md +8 -2
  213. package/docs/api/crypto/pkc/hybridSign.md +34 -7
  214. package/docs/api/crypto/pkc/ml_dsa.md +20 -19
  215. package/docs/api/crypto/pkc/ml_kem.md +3 -3
  216. package/docs/api/crypto/pkc/rsa.md +7 -9
  217. package/docs/api/crypto/pkc/slh_dsa.md +12 -12
  218. package/docs/api/crypto/pkc/x25519.md +5 -4
  219. package/docs/api/crypto/utils/README.md +7 -7
  220. package/docs/api/crypto/utils/aes_modes.md +2 -5
  221. package/docs/api/crypto/utils/asn1.md +25 -16
  222. package/docs/api/crypto/utils/jws.md +6 -4
  223. package/docs/api/crypto/utils/keyformat.md +24 -15
  224. package/docs/api/crypto/utils/pad.md +1 -1
  225. package/docs/api/crypto/utils/pem.md +3 -3
  226. package/docs/api/crypto/utils/random.md +3 -4
  227. package/docs/api/crypto/utils/rsaKeygen.md +2 -2
  228. package/docs/api/crypto/utils/totp.md +2 -2
  229. package/docs/api/crypto/utils/uuid.md +5 -5
  230. package/docs/api/crypto/utils/x509.md +124 -0
  231. package/docs/api/crypto/wasm/aes.md +1 -1
  232. package/docs/api/crypto/wasm/argon2.md +6 -4
  233. package/docs/api/crypto/wasm/ml_kem.md +1 -0
  234. package/docs/api/crypto/wasm/pbkdf2.md +8 -8
  235. package/docs/api/crypto/wasm/rsa.md +1 -1
  236. package/docs/api/crypto/wasm/runtime.md +27 -10
  237. package/docs/api/crypto/webcrypto/aes.md +1 -1
  238. package/docs/api/crypto/webcrypto/aeskw.md +2 -2
  239. package/docs/api/crypto/webcrypto/digest.md +3 -5
  240. package/docs/api/crypto/webcrypto/ecc.md +1 -1
  241. package/docs/api/crypto/webcrypto/ed25519.md +1 -1
  242. package/docs/api/crypto/webcrypto/rsa.md +3 -2
  243. package/docs/api/crypto/webcrypto/x25519.md +1 -1
  244. package/docs/api/dom/README.md +6 -1
  245. package/docs/api/dom/fs/README.md +1 -0
  246. package/docs/api/dom/fs/fileIntake.md +120 -0
  247. package/docs/api/dom/fs/fsAccess.md +1 -0
  248. package/docs/api/dom/fs/indexedDB.md +1 -1
  249. package/docs/api/dom/fs/storage.md +1 -1
  250. package/docs/api/dom/query/README.md +2 -1
  251. package/docs/api/dom/query/dnd.md +4 -1
  252. package/docs/api/dom/query/dom.md +5 -0
  253. package/docs/api/dom/query/sound.md +103 -0
  254. package/docs/api/dom/rendering/README.md +4 -3
  255. package/docs/api/dom/rendering/chart.md +5 -4
  256. package/docs/api/dom/rendering/component.md +25 -3
  257. package/docs/api/dom/rendering/parser.md +5 -2
  258. package/docs/api/dom/rendering/reactiveBind.md +1 -1
  259. package/docs/api/dom/rendering/render.md +2 -2
  260. package/docs/api/dom/rendering/sanitize.md +10 -2
  261. package/docs/api/dom/rendering/secPolicy.md +4 -4
  262. package/docs/api/dom/rendering/styleSheet.md +85 -0
  263. package/docs/api/dom/rendering/template.md +20 -5
  264. package/docs/api/dom/rendering/themeTokens.md +6 -3
  265. package/docs/api/dom/rendering/uiSession.md +18 -5
  266. package/docs/api/dom/rendering/virtualScroll.md +2 -2
  267. package/docs/api/dom/sensors/geolocation.md +1 -1
  268. package/docs/api/dom/sw/README.md +7 -1
  269. package/docs/api/dom/sw/cache.md +2 -1
  270. package/docs/api/dom/sw/installPrompt.md +111 -0
  271. package/docs/api/dom/sw/precache.md +124 -0
  272. package/docs/api/dom/sw/serviceWorker.md +4 -2
  273. package/docs/api/dom/sw/swUpdate.md +112 -0
  274. package/docs/api/dom/utils/clipboard.md +56 -5
  275. package/docs/api/dom/utils/entropyCollector.md +1 -1
  276. package/docs/api/dom/utils/keybindings.md +17 -2
  277. package/docs/api/dom/utils/leaderElection.md +2 -2
  278. package/docs/api/dom/utils/route.md +1 -0
  279. package/docs/api/dom/utils/ua.md +15 -10
  280. package/docs/api/io/calc/crc32.md +4 -1
  281. package/docs/api/io/codec/README.md +2 -2
  282. package/docs/api/io/codec/b64.md +31 -2
  283. package/docs/api/io/codec/buffer.md +1 -1
  284. package/docs/api/io/codec/cbor.md +6 -4
  285. package/docs/api/io/codec/csv.md +178 -178
  286. package/docs/api/io/codec/hex.md +10 -2
  287. package/docs/api/io/codec/msgpack.md +4 -3
  288. package/docs/api/io/codec/url.md +4 -3
  289. package/docs/api/io/codec/utf8.md +3 -3
  290. package/docs/api/io/compress/bitstream.md +6 -3
  291. package/docs/api/io/compress/brotli.md +36 -4
  292. package/docs/api/io/compress/brotli_shared.md +1 -1
  293. package/docs/api/io/compress/deflate.md +42 -34
  294. package/docs/api/io/compress/gzip.md +26 -6
  295. package/docs/api/io/compress/huffman.md +2 -1
  296. package/docs/api/io/compress/lz4.md +5 -3
  297. package/docs/api/io/compress/lz77.md +26 -3
  298. package/docs/api/io/compress/lzw.md +13 -8
  299. package/docs/api/io/compress/zip.md +36 -10
  300. package/docs/api/io/compress/zlib.md +21 -5
  301. package/docs/api/io/math/linalg.md +1 -1
  302. package/docs/api/io/utils/valid.md +1 -1
  303. package/docs/api/process/rpc.md +3 -2
  304. package/docs/api/process/workerPool.md +1 -1
  305. package/docs/api/sanity/base.md +9 -5
  306. package/docs/api/sanity/lockdown.md +7 -6
  307. package/docs/api/surface.json +12311 -0
  308. package/docs/api/typed.md +5 -3
  309. package/docs/dev/README.md +2 -0
  310. package/docs/dev/bench.md +76 -0
  311. package/docs/dev/crypto-references.md +54 -0
  312. package/docs/dev/provenance.md +30 -7
  313. package/docs/dev/publishing.md +7 -7
  314. package/docs/dev/runtime.md +1 -1
  315. package/docs/dev/testing.md +13 -0
  316. package/docs/evidence/l4-evidence.md +86 -0
  317. package/docs/evidence/pqc-hybrid-evidence.md +7 -6
  318. package/docs/guide/README.md +1 -0
  319. package/docs/guide/_QUICK_REF.md +5 -5
  320. package/docs/guide/doc-format.md +4 -3
  321. package/docs/guide/integrations-hmr.md +1 -1
  322. package/docs/guide/module-creation-workflow.md +8 -8
  323. package/docs/guide/rendering-pipeline.md +11 -4
  324. package/docs/guide/security.md +7 -5
  325. package/docs/guide/stability.md +123 -0
  326. package/docs/guide/tutorial-todo.md +20 -8
  327. package/docs/guide/typescript.md +9 -0
  328. package/docs/guide/worker-confinement.md +30 -17
  329. package/docs/notes/lz77-deflate-factorization.md +3 -3
  330. package/docs/tools/README.md +1 -1
  331. package/docs/tools/bundler.md +3 -3
  332. package/docs/tools/codegen.md +1 -1
  333. package/docs/tools/standalone.md +0 -1
  334. package/fw.config.json +2 -2
  335. package/integrations/_shared/catalog.generated.json +7 -1
  336. package/integrations/_shared/core.js +1 -1
  337. package/integrations/astro/index.js +1 -1
  338. package/integrations/eslint/README.md +7 -1
  339. package/integrations/nextjs/index.js +1 -1
  340. package/integrations/nodejs/README.md +3 -3
  341. package/integrations/turbopack/index.js +2 -2
  342. package/integrations/typedoc/categorize.js +1 -1
  343. package/integrations/typedoc/typedoc.json +2 -1
  344. package/integrations/vite/index.js +2 -2
  345. package/integrations/vite/vite-env.d.ts +7 -4
  346. package/integrations/webpack/index.js +3 -3
  347. package/package.json +76 -10
  348. package/src/core/internal.js +31 -0
  349. package/src/core/logger.js +95 -23
  350. package/src/core/modules.js +17 -8
  351. package/src/core/readyState.js +1 -1
  352. package/src/core/runtime.js +74 -27
  353. package/src/core/worker-helper.js +83 -4
  354. package/src/crypto/NIST_CONFORMANCE.md +47 -34
  355. package/src/crypto/cipher/aes.acvp.md +7 -8
  356. package/src/crypto/cipher/aes.js +280 -229
  357. package/src/crypto/cipher/chacha20.acvp.md +6 -7
  358. package/src/crypto/cipher/chacha20.js +91 -61
  359. package/src/crypto/hash/adf.js +1 -1
  360. package/src/crypto/hash/argon2.acvp.md +11 -15
  361. package/src/crypto/hash/argon2.js +9 -24
  362. package/src/crypto/hash/blake2b.js +157 -125
  363. package/src/crypto/hash/hkdf.acvp.md +15 -15
  364. package/src/crypto/hash/hkdf.js +1 -1
  365. package/src/crypto/hash/hmac.acvp.md +10 -12
  366. package/src/crypto/hash/hmac.js +5 -1
  367. package/src/crypto/hash/pbkdf2.acvp.md +13 -13
  368. package/src/crypto/hash/pbkdf2.js +36 -8
  369. package/src/crypto/hash/poly1305.acvp.md +10 -6
  370. package/src/crypto/hash/poly1305.js +171 -50
  371. package/src/crypto/hash/sha224.acvp.md +3 -3
  372. package/src/crypto/hash/sha224.js +4 -4
  373. package/src/crypto/hash/sha256.acvp.md +2 -2
  374. package/src/crypto/hash/sha256.js +514 -50
  375. package/src/crypto/hash/sha3.acvp.md +9 -9
  376. package/src/crypto/hash/sha3.js +127 -71
  377. package/src/crypto/hash/sha384.acvp.md +3 -3
  378. package/src/crypto/hash/sha384.js +4 -4
  379. package/src/crypto/hash/sha512.acvp.md +7 -8
  380. package/src/crypto/hash/sha512.js +107 -108
  381. package/src/crypto/hash/sha512_224.acvp.md +6 -6
  382. package/src/crypto/hash/sha512_224.js +2 -2
  383. package/src/crypto/hash/sha512_256.acvp.md +6 -6
  384. package/src/crypto/hash/sha512_256.js +2 -2
  385. package/src/crypto/mode/cbc.acvp.md +2 -2
  386. package/src/crypto/mode/cbc.js +1 -1
  387. package/src/crypto/mode/chacha20poly1305.acvp.md +6 -6
  388. package/src/crypto/mode/chacha20poly1305.js +3 -3
  389. package/src/crypto/mode/cmac.acvp.md +5 -5
  390. package/src/crypto/mode/cmac.js +8 -8
  391. package/src/crypto/mode/ctr.acvp.md +2 -2
  392. package/src/crypto/mode/ctr.js +1 -3
  393. package/src/crypto/mode/gcm.acvp.md +6 -6
  394. package/src/crypto/mode/gcm.js +7 -7
  395. package/src/crypto/mode/kw.acvp.md +4 -4
  396. package/src/crypto/mode/kw.js +5 -5
  397. package/src/crypto/pkc/ecc.acvp.md +13 -13
  398. package/src/crypto/pkc/ecc.js +9 -11
  399. package/src/crypto/pkc/ed25519.acvp.md +30 -34
  400. package/src/crypto/pkc/ed25519.js +453 -94
  401. package/src/crypto/pkc/hybrid-kat.provenance.md +4 -4
  402. package/src/crypto/pkc/hybridSign.js +103 -24
  403. package/src/crypto/pkc/ml_dsa.acvp.md +18 -18
  404. package/src/crypto/pkc/ml_dsa.js +29 -32
  405. package/src/crypto/pkc/ml_kem.acvp.md +7 -7
  406. package/src/crypto/pkc/ml_kem.js +15 -21
  407. package/src/crypto/pkc/rsa.acvp.md +11 -15
  408. package/src/crypto/pkc/rsa.js +7 -44
  409. package/src/crypto/pkc/slh_dsa.acvp.md +16 -16
  410. package/src/crypto/pkc/slh_dsa.js +16 -18
  411. package/src/crypto/pkc/x25519.acvp.md +13 -10
  412. package/src/crypto/pkc/x25519.js +273 -29
  413. package/src/crypto/utils/aes_modes.acvp.md +1 -2
  414. package/src/crypto/utils/aes_modes.js +2 -2
  415. package/src/crypto/utils/asn1-oid.js +1 -1
  416. package/src/crypto/utils/asn1.js +1 -1
  417. package/src/crypto/utils/bitArray.js +33 -48
  418. package/src/crypto/utils/bn.js +1 -1
  419. package/src/crypto/utils/jws.js +37 -41
  420. package/src/crypto/utils/keyformat.js +181 -2
  421. package/src/crypto/utils/pem.js +1 -1
  422. package/src/crypto/utils/random.acvp.md +5 -5
  423. package/src/crypto/utils/random.js +845 -846
  424. package/src/crypto/utils/rsaKeygen.acvp.md +3 -2
  425. package/src/crypto/utils/rsaKeygen.js +6 -6
  426. package/src/crypto/utils/totp.js +1 -1
  427. package/src/crypto/utils/uuid.acvp.md +5 -5
  428. package/src/crypto/utils/uuid.js +11 -10
  429. package/src/crypto/utils/x509.js +591 -0
  430. package/src/crypto/wasm/aes.js +1 -1
  431. package/src/crypto/wasm/aes.scalar.wasm +0 -0
  432. package/src/crypto/wasm/argon2.js +17 -1
  433. package/src/crypto/wasm/argon2.scalar.wasm +0 -0
  434. package/src/crypto/wasm/blake2b.scalar.wasm +0 -0
  435. package/src/crypto/wasm/blake2b.simd.wasm +0 -0
  436. package/src/crypto/wasm/chacha20poly1305.scalar.wasm +0 -0
  437. package/src/crypto/wasm/chacha20poly1305.simd.wasm +0 -0
  438. package/src/crypto/wasm/cmac.scalar.wasm +0 -0
  439. package/src/crypto/wasm/ecc.js +3 -3
  440. package/src/crypto/wasm/ecc.scalar.wasm +0 -0
  441. package/src/crypto/wasm/ed25519.js +1 -1
  442. package/src/crypto/wasm/ed25519.scalar.wasm +0 -0
  443. package/src/crypto/wasm/hkdf.scalar.wasm +0 -0
  444. package/src/crypto/wasm/hmac.scalar.wasm +0 -0
  445. package/src/crypto/wasm/ml_dsa.js +2 -2
  446. package/src/crypto/wasm/ml_dsa.scalar.wasm +0 -0
  447. package/src/crypto/wasm/ml_dsa.simd.wasm +0 -0
  448. package/src/crypto/wasm/ml_kem.js +2 -2
  449. package/src/crypto/wasm/ml_kem.scalar.wasm +0 -0
  450. package/src/crypto/wasm/ml_kem.simd.wasm +0 -0
  451. package/src/crypto/wasm/pbkdf2.js +8 -6
  452. package/src/crypto/wasm/pbkdf2.scalar.wasm +0 -0
  453. package/src/crypto/wasm/rsa.js +6 -5
  454. package/src/crypto/wasm/rsa.scalar.wasm +0 -0
  455. package/src/crypto/wasm/runtime.js +84 -17
  456. package/src/crypto/wasm/sha2.scalar.wasm +0 -0
  457. package/src/crypto/wasm/sha3.scalar.wasm +0 -0
  458. package/src/crypto/wasm/sha3.simd.wasm +0 -0
  459. package/src/crypto/wasm/slh_dsa.js +1 -1
  460. package/src/crypto/wasm/slh_dsa.scalar.wasm +0 -0
  461. package/src/crypto/wasm/x25519.js +1 -1
  462. package/src/crypto/wasm/x25519.scalar.wasm +0 -0
  463. package/src/crypto/webcrypto/aes.js +8 -2
  464. package/src/crypto/webcrypto/aeskw.js +7 -2
  465. package/src/crypto/webcrypto/digest.js +1 -15
  466. package/src/crypto/webcrypto/ecc.js +2 -2
  467. package/src/crypto/webcrypto/ed25519.js +2 -2
  468. package/src/crypto/webcrypto/hmac.js +2 -2
  469. package/src/crypto/webcrypto/rsa.js +7 -2
  470. package/src/crypto/webcrypto/x25519.js +2 -2
  471. package/src/dom/display/animate.js +1 -1
  472. package/src/dom/display/fullscreen.js +1 -1
  473. package/src/dom/fs/download.js +1 -1
  474. package/src/dom/fs/fileIntake.js +192 -0
  475. package/src/dom/fs/fsAccess.js +2 -3
  476. package/src/dom/fs/indexedDB.js +1 -1
  477. package/src/dom/fs/remoteStore.js +1 -1
  478. package/src/dom/fs/storage.js +1 -1
  479. package/src/dom/lifecycle/idle.js +1 -1
  480. package/src/dom/lifecycle/visibility.js +1 -1
  481. package/src/dom/lifecycle/wakeLock.js +1 -1
  482. package/src/dom/net/ajax.js +1 -1
  483. package/src/dom/net/network.js +1 -1
  484. package/src/dom/net/sse.js +1 -1
  485. package/src/dom/net/webrtc.js +1 -1
  486. package/src/dom/net/ws.js +1 -1
  487. package/src/dom/query/dnd.js +56 -4
  488. package/src/dom/query/dom.js +1 -1
  489. package/src/dom/query/events.js +1 -1
  490. package/src/dom/query/gesture.js +1 -1
  491. package/src/dom/query/media.js +1 -1
  492. package/src/dom/query/sound.js +333 -0
  493. package/src/dom/rendering/chart.js +736 -663
  494. package/src/dom/rendering/component.js +25 -14
  495. package/src/dom/rendering/devtools.js +2 -2
  496. package/src/dom/rendering/parser.js +155 -12
  497. package/src/dom/rendering/render.js +14 -4
  498. package/src/dom/rendering/sanitize.js +11 -4
  499. package/src/dom/rendering/secPolicy.js +6 -4
  500. package/src/dom/rendering/styleSheet.js +217 -0
  501. package/src/dom/rendering/template.js +72 -13
  502. package/src/dom/rendering/themeTokens.js +542 -522
  503. package/src/dom/rendering/uiSession-core.js +51 -6
  504. package/src/dom/rendering/uiSession-direct.js +1 -1
  505. package/src/dom/rendering/uiSession-list.js +4 -4
  506. package/src/dom/rendering/uiSession.js +1 -1
  507. package/src/dom/rendering/virtualScroll.js +341 -341
  508. package/src/dom/sensors/battery.js +1 -1
  509. package/src/dom/sensors/geolocation.js +1 -1
  510. package/src/dom/sensors/networkInfo.js +1 -1
  511. package/src/dom/sensors/sensors.js +1 -1
  512. package/src/dom/sw/backgroundSync.js +1 -1
  513. package/src/dom/sw/cache.js +1 -1
  514. package/src/dom/sw/installPrompt.js +151 -0
  515. package/src/dom/sw/precache.js +257 -0
  516. package/src/dom/sw/push.js +1 -1
  517. package/src/dom/sw/sharedWorker.js +1 -1
  518. package/src/dom/sw/swUpdate.js +239 -0
  519. package/src/dom/utils/a11y.js +1 -1
  520. package/src/dom/utils/clipboard.js +56 -6
  521. package/src/dom/utils/entropyCollector.js +1 -1
  522. package/src/dom/utils/focus.js +1 -1
  523. package/src/dom/utils/form.js +1 -1
  524. package/src/dom/utils/keybindings.js +600 -574
  525. package/src/dom/utils/leaderElection.js +1 -1
  526. package/src/dom/utils/notifications.js +1 -1
  527. package/src/dom/utils/permissions.js +107 -107
  528. package/src/dom/utils/route.js +14 -2
  529. package/src/dom/utils/ua.js +42 -28
  530. package/src/dom/utils/webauthn.js +1 -1
  531. package/src/io/binary/reader.js +1 -1
  532. package/src/io/binary/writer.js +1 -1
  533. package/src/io/calc/bigint.js +1 -1
  534. package/src/io/calc/crc32.js +28 -2
  535. package/src/io/calc/easing.js +514 -514
  536. package/src/io/codec/b64.js +189 -52
  537. package/src/io/codec/base32.js +1 -1
  538. package/src/io/codec/base58.js +1 -1
  539. package/src/io/codec/buffer.js +1 -1
  540. package/src/io/codec/cbor.js +111 -18
  541. package/src/io/codec/csv.js +1 -1
  542. package/src/io/codec/hex.js +51 -6
  543. package/src/io/codec/mime.js +1 -1
  544. package/src/io/codec/msgpack.js +47 -6
  545. package/src/io/codec/url.js +24 -7
  546. package/src/io/codec/utf8.js +5 -3
  547. package/src/io/codec/xml.js +1 -1
  548. package/src/io/compress/bitstream.js +2 -2
  549. package/src/io/compress/brotli.js +663 -163
  550. package/src/io/compress/brotli_dict.js +1 -1
  551. package/src/io/compress/brotli_dict_words.js +1 -1
  552. package/src/io/compress/brotli_frame.js +1 -1
  553. package/src/io/compress/brotli_shared.js +7 -7
  554. package/src/io/compress/deflate.js +87 -53
  555. package/src/io/compress/gzip.js +187 -74
  556. package/src/io/compress/huffman.js +24 -1
  557. package/src/io/compress/lz4.js +45 -7
  558. package/src/io/compress/lz77.js +148 -63
  559. package/src/io/compress/lzw.js +35 -19
  560. package/src/io/compress/zip.js +862 -815
  561. package/src/io/compress/zlib.js +87 -7
  562. package/src/io/i18n/i18n.js +1 -1
  563. package/src/io/math/fixed-point.js +1 -1
  564. package/src/io/math/geom.js +1 -1
  565. package/src/io/math/interp.js +1 -1
  566. package/src/io/math/linalg.js +10 -4
  567. package/src/io/math/stats.js +1 -1
  568. package/src/io/structures/btree.js +1 -1
  569. package/src/io/structures/heap.js +1 -1
  570. package/src/io/structures/lruCache.js +1 -1
  571. package/src/io/structures/ringBuffer.js +1 -1
  572. package/src/io/structures/tree-walker.js +1 -1
  573. package/src/io/structures/trie.js +1 -1
  574. package/src/io/sync/abort.js +1 -1
  575. package/src/io/sync/atomics.js +1 -1
  576. package/src/io/sync/cancellable.js +1 -1
  577. package/src/io/sync/channel.js +1 -1
  578. package/src/io/sync/mutex.js +1 -1
  579. package/src/io/sync/semaphore.js +1 -1
  580. package/src/io/sync/tokenBucket.js +1 -1
  581. package/src/io/text/ansi.js +1 -1
  582. package/src/io/text/html-entities.js +1 -1
  583. package/src/io/time/date.js +1 -1
  584. package/src/io/timing/clock.js +1 -1
  585. package/src/io/timing/rateLimit.js +1 -1
  586. package/src/io/timing/scheduler.js +1 -1
  587. package/src/io/utils/errors.js +1 -1
  588. package/src/io/utils/eventBus.js +1 -1
  589. package/src/io/utils/signal.js +1 -1
  590. package/src/io/utils/valid.js +1 -1
  591. package/src/main.js +1 -1
  592. package/src/process/message.js +1 -1
  593. package/src/process/rpc.js +7 -3
  594. package/src/process/workerPool.js +11 -4
  595. package/src/sanity/base.js +85 -39
  596. package/src/sanity/lockdown-apply.js +3 -3
  597. package/src/sanity/lockdown.js +58 -32
  598. package/src/sanity/wasm-gate.js +2 -2
  599. package/src/typed.js +7 -3
  600. package/third-party/NOTICE-brotli-dictionary.txt +69 -0
  601. package/third-party/NOTICE-fw-wasm-crypto.txt +576 -0
  602. package/third-party/NOTICE-whatwg-entities.txt +44 -0
  603. package/types/registry.generated.d.ts +7 -1
  604. package/types/typed.d.ts +7 -3
  605. package/dist/types/crypto/utils/aes_ctr.d.ts +0 -84
  606. package/dist/types/crypto/utils/aes_ctr.d.ts.map +0 -1
  607. package/docs/api/crypto/utils/aes_ctr.md +0 -71
  608. package/src/crypto/utils/aes_ctr.acvp.md +0 -67
  609. package/src/crypto/utils/aes_ctr.js +0 -134
@@ -3,50 +3,53 @@
3
3
  * Author: Matthieu Bouilloux
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- var d$=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[\w.-]+)?(?:\+[\w.-]+)?$/,l$=/^(fw|sd|sde|sdc|lib)\.[a-z][\w.]*$/;function m$(C,K){let[R,j=""]=C.split("-",2),[H,P=""]=K.split("-",2),L=R.split("."),M=H.split(".");for(let X=0;X<3;X++){let V=+L[X]||0,Q=+M[X]||0;if(V!==Q)return V<Q?-1:1}if(j&&!P)return-1;if(!j&&P)return 1;if(j===P)return 0;return j<P?-1:1}function B$(C){let K=C.lastIndexOf("@");if(K<=0)return{name:C,version:void 0};return{name:C.slice(0,K),version:C.slice(K+1)}}function C$(C,K){return C+"@"+K}class w${static NEVER_SWAP=Object.freeze(["signal"]);constructor(){this.modules=new Map,this.instances=new Map,this.context={}}register(C){if(!C||!C.name||!C.factory)throw Error("Invalid module definition");let K=C.version!=null?C.version:"0.0.0";if(!d$.test(K))throw Error(`Invalid version "${K}" for module "${C.name}"`);if(C.type!=null&&!l$.test(C.type))throw Error(`Invalid type "${C.type}" for module "${C.name}"`);let R=this.modules.get(C.name);if(!R)R={versions:new Map,latest:K,latestDef:C},this.modules.set(C.name,R);if(R.versions.set(K,C),m$(K,R.latest)>=0)R.latest=K,R.latestDef=C;return this}registerAll(C){for(let K of C)this.register(K);return this}registerDeep(C){let K=new Set,R=(j)=>{if(!j||typeof j!=="object"||!j.name||!j.factory)return;if(K.has(j.name))return;if(K.add(j.name),Array.isArray(j.deps))for(let P of j.deps)R(P);let H=j.version!=null?j.version:"0.0.0";if(!this.has(j.name,H))this.register(j)};return R(C),this}registerAllDeep(C){for(let K of C)this.registerDeep(K);return this}unregister(C,K){let R=B$(C),j=R.name,H=R.version||K,P=this.modules.get(j);if(!P)return!1;if(H===void 0)return this.modules.delete(j),!0;if(!P.versions.has(H))return!1;if(P.versions.delete(H),P.versions.size===0)return this.modules.delete(j),!0;if(H===P.latest){let L=null,M=null;for(let[X,V]of P.versions)if(L===null||m$(X,L)>0)L=X,M=V;P.latest=L,P.latestDef=M}return!0}has(C,K){let R=this.modules.get(C);if(!R)return!1;if(K===void 0)return!0;return R.versions.has(K)}resolve(C,K={}){let R=B$(C),j=R.name,H=R.version||K.version,P=this.modules.get(j);if(!P)throw Error(`Module not found: ${j}`);let L,M;if(H!==void 0){if(L=P.versions.get(H),!L)throw Error(`Module not found: ${j}@${H}`);M=H}else L=P.latestDef,M=P.latest;let X=!!K.isolation,V=K.instances instanceof Map?K.instances:null;if(!X)if(V){let G=C$(j,M);if(V.has(G))return V.get(G)}else{let G=this.instances.get(j);if(G&&G.has(M))return G.get(M)}let Q=(L.dependencies||[]).map((G)=>this.resolve(G,K)),Z=L.factory.apply({},Q);if(!X)if(V)V.set(C$(j,M),Z);else{let G=this.instances.get(j);if(!G)G=new Map,this.instances.set(j,G);G.set(M,Z)}return Z}resolveAll(C,K={}){let R={};for(let j of C)R[j]=this.resolve(j,K);return R}list(C={}){let K=[],R=C.name,j=C.version,H=C.type,P=typeof H==="string"&&H.endsWith(".");for(let[L,M]of this.modules){if(R&&R!==L)continue;for(let[X,V]of M.versions){if(j&&j!==X)continue;if(H){if(!V.type)continue;if(P){if(!V.type.startsWith(H))continue}else if(V.type!==H)continue}K.push(V)}}return K}snapshot(C={}){let K=[],R=C.name,j=C.version,H=C.type,P=typeof H==="string"&&H.endsWith(".");for(let[L,M]of this.modules){if(R&&R!==L)continue;let X=this.instances.get(L);for(let[V,Q]of M.versions){if(j&&j!==V)continue;if(H){if(!Q.type)continue;if(P){if(!Q.type.startsWith(H))continue}else if(Q.type!==H)continue}let Z=Q.dependencies,G=Array.isArray(Z)?Z.slice():[];K.push(Object.freeze({name:L,version:V,type:Q.type!=null?Q.type:null,dependencies:Object.freeze(G),latest:V===M.latest,instantiated:!!(X&&X.has(V))}))}}return Object.freeze(K)}invalidate(C,K={}){let R=B$(C),j=R.name,H=R.version,P=this.modules.get(j);if(!P)throw Error(`Module not found: ${j}`);if(H!==void 0&&!P.versions.has(H))throw Error(`Module not found: ${j}@${H}`);let L=new Map;if(L.set(j,new Set(H!==void 0?[H]:P.versions.keys())),K.cascade){let Q=!0;while(Q){Q=!1;for(let[Z,G]of this.modules)for(let[W,O]of G.versions){let J=L.get(Z);if(J&&J.has(W))continue;if(!this._dependsOnTarget(O,L))continue;if(J)J.add(W);else L.set(Z,new Set([W]));Q=!0}}}for(let Q of L.keys())if(w$.NEVER_SWAP.includes(Q))throw Error(`Module "${Q}" is in the never-swap set and cannot be invalidated`);let M=[],X={};for(let[Q,Z]of L){let G=this.instances.get(Q);if(!G)continue;for(let W of Z){if(!G.has(W))continue;let O=G.get(W),J=C$(Q,W);if(M.push({name:Q,version:W,key:J}),O&&typeof O.dehydrate==="function")X[J]=O.dehydrate()}}let V=[];for(let Q of M){let Z=this.instances.get(Q.name);if(Z.delete(Q.version),Z.size===0)this.instances.delete(Q.name);V.push(Q.key)}return Object.freeze({invalidated:Object.freeze(V),state:Object.freeze(X)})}_dependsOnTarget(C,K){let R=C.dependencies;if(!Array.isArray(R))return!1;for(let j of R){let H=B$(j),P=K.get(H.name);if(!P)continue;if(H.version!==void 0){if(P.has(H.version))return!0;continue}let L=this.modules.get(H.name);if(L&&P.has(L.latest))return!0}return!1}serialize(C){let K=this._buildGraph(C),R=[],j=K.map((P)=>{let{name:L,version:M,def:X}=P,V=C$(L,M);R.push(V);let Q=L.replace(/'/g,"\\'"),Z=M.replace(/'/g,"\\'"),G=X.type?`,type:'${X.type.replace(/'/g,"\\'")}'`:"",W=(X.dependencies||[]).map(($)=>{let Y=B$($),U=this.modules.get(Y.name),B=Y.version||(U?U.latest:"0.0.0");return C$(Y.name,B).replace(/'/g,"\\'")}),O=W.length>0?`['${W.join("','")}']`:"[]",J=X.factory.toString().replace(/^factory/,"function");return`{name:'${Q}',version:'${Z}'${G},dependencies:${O},factory:${J}}`}).join(",");return{list:`[${R.length>0?`'${R.map((P)=>P.replace(/'/g,"\\'")).join("','")}'`:""}]`,content:`[${j}]`}}_buildGraph(C){let K=new Set,R=[],j=(H)=>{let P=B$(H),L=this.modules.get(P.name);if(!L)throw Error(`Module not found: ${P.name}`);let M=P.version||L.latest,X=L.versions.get(M);if(!X)throw Error(`Module not found: ${P.name}@${M}`);let V=C$(P.name,M);if(K.has(V))return;K.add(V),(X.dependencies||[]).forEach(j),R.push({name:P.name,version:M,def:X})};return C.forEach(j),R}}var i$=[`const SEMVER_RE = ${d$.toString()};`,`const TYPE_RE = ${l$.toString()};`,`const DEFAULT_VERSION = ${JSON.stringify("0.0.0")};`,m$.toString(),B$.toString(),C$.toString(),w$.toString()].join(`
6
+ var $J=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-[\w.-]+)?(?:\+[\w.-]+)?$/,JJ=/^(fw|sd|sde|sdc|lib|app)\.[a-z][\w.]*$/;function o$(w,j){let N=(z)=>{let Y=z.indexOf("+"),V=Y===-1?z:z.slice(0,Y),F=V.indexOf("-");return F===-1?{core:V,pre:""}:{core:V.slice(0,F),pre:V.slice(F+1)}},P=N(w),D=N(j),B=P.core.split("."),O=D.core.split(".");for(let z=0;z<3;z++){let Y=+B[z]||0,V=+O[z]||0;if(Y!==V)return Y<V?-1:1}if(P.pre&&!D.pre)return-1;if(!P.pre&&D.pre)return 1;if(P.pre===D.pre)return 0;let T=P.pre.split("."),U=D.pre.split("."),M=Math.max(T.length,U.length);for(let z=0;z<M;z++){if(z>=T.length)return-1;if(z>=U.length)return 1;let Y=T[z],V=U[z];if(Y===V)continue;let F=/^\d+$/.test(Y),X=/^\d+$/.test(V);if(F&&X){let Z=Y.replace(/^0+(?=\d)/,""),$=V.replace(/^0+(?=\d)/,"");if(Z.length!==$.length)return Z.length<$.length?-1:1;if(Z!==$)return Z<$?-1:1;continue}if(F)return-1;if(X)return 1;return Y<V?-1:1}return 0}function j$(w){let j=w.lastIndexOf("@");if(j<=0)return{name:w,version:void 0};return{name:w.slice(0,j),version:w.slice(j+1)}}function N$(w,j){return w+"@"+j}class v${static NEVER_SWAP=Object.freeze(["signal"]);constructor(){this.modules=new Map,this.instances=new Map,this.context={}}register(w){if(!w||!w.name||!w.factory)throw Error("Invalid module definition");let j=w.version!=null?w.version:"0.0.0";if(!$J.test(j))throw Error(`Invalid version "${j}" for module "${w.name}"`);if(w.type!=null&&!JJ.test(w.type))throw Error(`Invalid type "${w.type}" for module "${w.name}"`);let N=this.modules.get(w.name);if(!N)N={versions:new Map,latest:j,latestDef:w},this.modules.set(w.name,N);if(N.versions.set(j,w),o$(j,N.latest)>=0)N.latest=j,N.latestDef=w;return this}registerAll(w){for(let j of w)this.register(j);return this}registerDeep(w){let j=new Set,N=(P)=>{if(!P||typeof P!=="object"||!P.name||!P.factory)return;if(j.has(P.name))return;if(j.add(P.name),Array.isArray(P.deps))for(let B of P.deps)N(B);let D=P.version!=null?P.version:"0.0.0";if(!this.has(P.name,D))this.register(P)};return N(w),this}registerAllDeep(w){for(let j of w)this.registerDeep(j);return this}unregister(w,j){let N=j$(w),P=N.name,D=N.version||j,B=this.modules.get(P);if(!B)return!1;if(D===void 0)return this.modules.delete(P),!0;if(!B.versions.has(D))return!1;if(B.versions.delete(D),B.versions.size===0)return this.modules.delete(P),!0;if(D===B.latest){let O=null,T=null;for(let[U,M]of B.versions)if(O===null||o$(U,O)>0)O=U,T=M;B.latest=O,B.latestDef=T}return!0}has(w,j){let N=this.modules.get(w);if(!N)return!1;if(j===void 0)return!0;return N.versions.has(j)}resolve(w,j={}){let N=j$(w),P=N.name,D=N.version||j.version,B=this.modules.get(P);if(!B)throw Error(`Module not found: ${P}`);let O,T;if(D!==void 0){if(O=B.versions.get(D),!O)throw Error(`Module not found: ${P}@${D}`);T=D}else O=B.latestDef,T=B.latest;let U=!!j.isolation,M=j.instances instanceof Map?j.instances:null;if(!U)if(M){let V=N$(P,T);if(M.has(V))return M.get(V)}else{let V=this.instances.get(P);if(V&&V.has(T))return V.get(T)}let z=(O.dependencies||[]).map((V)=>this.resolve(V,j)),Y=O.factory.apply({},z);if(!U)if(M)M.set(N$(P,T),Y);else{let V=this.instances.get(P);if(!V)V=new Map,this.instances.set(P,V);V.set(T,Y)}return Y}resolveAll(w,j={}){let N={};for(let P of w)N[P]=this.resolve(P,j);return N}list(w={}){let j=[],N=w.name,P=w.version,D=w.type,B=typeof D==="string"&&D.endsWith(".");for(let[O,T]of this.modules){if(N&&N!==O)continue;for(let[U,M]of T.versions){if(P&&P!==U)continue;if(D){if(!M.type)continue;if(B){if(!M.type.startsWith(D))continue}else if(M.type!==D)continue}let z={...M};if(Array.isArray(M.dependencies))z.dependencies=Object.freeze(M.dependencies.slice());j.push(Object.freeze(z))}}return Object.freeze(j)}snapshot(w={}){let j=[],N=w.name,P=w.version,D=w.type,B=typeof D==="string"&&D.endsWith(".");for(let[O,T]of this.modules){if(N&&N!==O)continue;let U=this.instances.get(O);for(let[M,z]of T.versions){if(P&&P!==M)continue;if(D){if(!z.type)continue;if(B){if(!z.type.startsWith(D))continue}else if(z.type!==D)continue}let Y=z.dependencies,V=Array.isArray(Y)?Y.slice():[];j.push(Object.freeze({name:O,version:M,type:z.type!=null?z.type:null,dependencies:Object.freeze(V),latest:M===T.latest,instantiated:!!(U&&U.has(M))}))}}return Object.freeze(j)}invalidate(w,j={}){let N=j$(w),P=N.name,D=N.version,B=this.modules.get(P);if(!B)throw Error(`Module not found: ${P}`);if(D!==void 0&&!B.versions.has(D))throw Error(`Module not found: ${P}@${D}`);let O=new Map;if(O.set(P,new Set(D!==void 0?[D]:B.versions.keys())),j.cascade){let z=!0;while(z){z=!1;for(let[Y,V]of this.modules)for(let[F,X]of V.versions){let Z=O.get(Y);if(Z&&Z.has(F))continue;if(!this._dependsOnTarget(X,O))continue;if(Z)Z.add(F);else O.set(Y,new Set([F]));z=!0}}}for(let z of O.keys())if(v$.NEVER_SWAP.includes(z))throw Error(`Module "${z}" is in the never-swap set and cannot be invalidated`);let T=[],U={};for(let[z,Y]of O){let V=this.instances.get(z);if(!V)continue;for(let F of Y){if(!V.has(F))continue;let X=V.get(F),Z=N$(z,F);if(T.push({name:z,version:F,key:Z}),X&&typeof X.dehydrate==="function")U[Z]=X.dehydrate()}}let M=[];for(let z of T){let Y=this.instances.get(z.name);if(Y.delete(z.version),Y.size===0)this.instances.delete(z.name);M.push(z.key)}return Object.freeze({invalidated:Object.freeze(M),state:Object.freeze(U)})}_dependsOnTarget(w,j){let N=w.dependencies;if(!Array.isArray(N))return!1;for(let P of N){let D=j$(P),B=j.get(D.name);if(!B)continue;if(D.version!==void 0){if(B.has(D.version))return!0;continue}let O=this.modules.get(D.name);if(O&&B.has(O.latest))return!0}return!1}serialize(w){let j=this._buildGraph(w),N=[],P=j.map((B)=>{let{name:O,version:T,def:U}=B,M=N$(O,T);N.push(M);let z=O.replace(/'/g,"\\'"),Y=T.replace(/'/g,"\\'"),V=U.type?`,type:'${U.type.replace(/'/g,"\\'")}'`:"",F=(U.dependencies||[]).map(($)=>{let J=j$($),Q=this.modules.get(J.name),H=J.version||(Q?Q.latest:"0.0.0");return N$(J.name,H).replace(/'/g,"\\'")}),X=F.length>0?`['${F.join("','")}']`:"[]",Z=U.factory.toString().replace(/^factory/,"function");return`{name:'${z}',version:'${Y}'${V},dependencies:${X},factory:${Z}}`}).join(",");return{list:`[${N.length>0?`'${N.map((B)=>B.replace(/'/g,"\\'")).join("','")}'`:""}]`,content:`[${P}]`}}_buildGraph(w){let j=new Set,N=[],P=(D)=>{let B=j$(D),O=this.modules.get(B.name);if(!O)throw Error(`Module not found: ${B.name}`);let T=B.version||O.latest,U=O.versions.get(T);if(!U)throw Error(`Module not found: ${B.name}@${T}`);let M=N$(B.name,T);if(j.has(M))return;j.add(M),(U.dependencies||[]).forEach(P),N.push({name:B.name,version:T,def:U})};return w.forEach(P),N}}var ZJ=[`const SEMVER_RE = ${$J.toString()};`,`const TYPE_RE = ${JJ.toString()};`,`const DEFAULT_VERSION = ${JSON.stringify("0.0.0")};`,o$.toString(),j$.toString(),N$.toString(),v$.toString()].join(`
7
7
 
8
- `);var dJ=function(C){let K=typeof window<"u",R=K?window.console:globalThis.console,j=[],H=65536,P=1024,L=null,M=function(){j.splice(0)},X=function($){if(!isNaN($)&&$>0&&$<=65536)P=$},V=function(){return j.slice()},Q=function($){if(typeof $!=="function")throw Error("logger: fn must be a function");if(L!==null)throw Error("logger: subscriber already registered");L=$;let Y=!0;return function(){if(Y)Y=!1,L=null}},Z=function($){if(L!==null)try{L($)}catch(Y){}},G=function($){if(j.push($),j.length>P)j.shift();Z($)},W=function($,Y,U){let B={ts:Date.now(),lvl:$,data:Y,stack:U};G(B)},O=function($){if(typeof $!=="string")return $;if($.slice(-1)===`
9
- `)return $.slice(0,-1).split(`
10
- `);return $.split(`
11
- `)},J=function($){return new Proxy($,{get:function(Y,U){let B=Y[U];if(typeof B!=="function")return B;return function(){let z=Error().stack;if(W(String(U),[...arguments],z),C)return B.apply(Y,[...arguments,O(z)])}},set:function(){return console.warn("Attempt to modify console"),!0}})};if(K){let $=J(R);Object.defineProperty(window,"console",{value:$,writable:!1,enumerable:!1,configurable:!1})}return{get:V,setLen:X,clear:M,__push:G,subscribe:Q}},lJ=function(C,K){let R=self.console,j=[],H=65536,P=1024,L=null,M=function(){j.splice(0)},X=function(U){if(!isNaN(U)&&U>0&&U<=65536)P=U},V=function(){return j.slice()},Q=function(U){if(typeof U!=="function")throw Error("logger: fn must be a function");if(L!==null)throw Error("logger: subscriber already registered");L=U;let B=!0;return function(){if(B)B=!1,L=null}},Z=function(U){if(L!==null)try{L(U)}catch(B){}},G=function(U){let B=new WeakSet,z=function(F){return JSON.parse(JSON.stringify(F,function(q,D){if(typeof D==="bigint")return D.toString()+"n";if(typeof D==="symbol")return D.toString();if(typeof D==="function")return"[Function "+(D.name||"anonymous")+"]";if(D instanceof Error)return{name:D.name,message:D.message,stack:D.stack};if(D instanceof Map)return{__type:"Map",value:Array.from(D.entries())};if(D instanceof Set)return{__type:"Set",value:Array.from(D.values())};if(D&&typeof D==="object"){if(B.has(D))return"[Circular]";B.add(D)}return D}))};try{return z(U)}catch(F){return{__type:"Unserializable",message:F&&F.message?F.message:"serializeLog failed"}}},W=function(U){if(j.push(U),j.length>P)j.shift();K.postMessage({__fw:!0,__type:"log",msg:U}),Z(U)},O=function(U,B,z){let F={ts:Date.now(),lvl:U,data:G(B),stack:z};W(F)},J=function(U){if(typeof U!=="string")return U;if(U.slice(-1)===`
12
- `)return U.slice(0,-1).split(`
13
- `);return U.split(`
14
- `)},Y=function(U){return new Proxy(U,{get:function(B,z){let F=B[z];if(typeof F!=="function")return F;return function(){let q=Error().stack;if(O(String(z),[...arguments],q),C)return F.apply(B,[...arguments,J(q)])}},set:function(){return console.warn("Attempt to modify console"),!0}})}(R);return Object.defineProperty(self,"console",{value:Y,writable:!1,enumerable:!1,configurable:!1}),{get:V,setLen:X,clear:M,subscribe:Q}},p$={main:dJ,worker:lJ};function n$(C,K,R,j,H){let M=[],X=function(Z,G,W){return{libs:Z.resolveAll(G),process:{},args:W}},V=function(Z){return!!(Z&&Z.__fw===!0)},Q=function(){if(C.LOG)return function(Z){if(V(Z.data)){if(Z.stopImmediatePropagation(),Z.data.__type==="log")j.__push(Z.data.msg)}};else return function(Z){if(V(Z.data))Z.stopImmediatePropagation()}};return function(G,W={}){let O=W&&typeof W==="object"?W:{},J={dependencies:Array.isArray(O.dependencies)?O.dependencies:M,workerFw:typeof O.workerFw==="function"?O.workerFw:X,args:Array.isArray(O.args)?O.args:[],terminate:typeof O.terminate==="function"?O.terminate:function(){}},$=K.serialize(J.dependencies),Y=JSON.stringify(J.args),U=C.LOG?`(${H})(${C.DEV.toString()}, self);`:"",B=JSON.stringify(J.dependencies),z=U+`
15
- ${R}
8
+ `);var QZ=function(w){let j=typeof window<"u",N=j?window.console:globalThis.console,P=[],D=65536,B=1024,O=null,T=function(){P.splice(0)},U=function(H){if(!isNaN(H)&&H>0&&H<=65536)B=H},M=function(){return P.slice()},z=function(H){if(typeof H!=="function")throw Error("logger: fn must be a function");if(O!==null)throw Error("logger: subscriber already registered");O=H;let G=!0;return function(){if(G)G=!1,O=null}},Y=function(H){if(O!==null)try{O(H)}catch(G){}},V=function(H){if(P.push(H),P.length>B)P.shift();Y(H)},F=function(H,G,W){let q={ts:Date.now(),lvl:H,data:G,stack:W};V(q)},X=function(H){if(typeof H!=="string")return H;if(H.slice(-1)===`
9
+ `)return H.slice(0,-1).split(`
10
+ `);return H.split(`
11
+ `)},Z=Symbol.for("@awacloud/fw/console-sinks"),$=Symbol.for("@awacloud/fw/console-mode"),J=function(H){let G=[F],W={native:!1};return new Proxy(H,{get:function(q,K){if(K===Z)return G;if(K===$)return W;let L=q[K];if(typeof L!=="function")return L;return function(){let C=Error().stack;for(let A=0;A<G.length;A++)G[A](String(K),[...arguments],C);if(W.native)return L.apply(q,arguments);if(w)return L.apply(q,[...arguments,X(C)])}},set:function(){return console.warn("Attempt to modify console"),!0}})};if(j){let H=N&&N[Z];if(Array.isArray(H))H.push(F);else{let G=Object.getOwnPropertyDescriptor(window,"console");if(!G||G.configurable||G.writable){let W=J(N);Object.defineProperty(window,"console",{value:W,writable:!1,enumerable:!1,configurable:!1})}}}return{get:M,setLen:U,clear:T,__push:V,subscribe:z,native:function(H){let G=j&&window.console?window.console[$]:null;if(!G||typeof G!=="object")return!1;return G.native=H!==!1,!0}}},XZ=function(w,j){let N=self.console,P=[],D=65536,B=1024,O=null,T=function(){P.splice(0)},U=function(W){if(!isNaN(W)&&W>0&&W<=65536)B=W},M=function(){return P.slice()},z=function(W){if(typeof W!=="function")throw Error("logger: fn must be a function");if(O!==null)throw Error("logger: subscriber already registered");O=W;let q=!0;return function(){if(q)q=!1,O=null}},Y=function(W){if(O!==null)try{O(W)}catch(q){}},V=function(W){let q=new WeakSet,K=function(L){return JSON.parse(JSON.stringify(L,function(C,A){if(typeof A==="bigint")return A.toString()+"n";if(typeof A==="symbol")return A.toString();if(typeof A==="function")return"[Function "+(A.name||"anonymous")+"]";if(A instanceof Error)return{name:A.name,message:A.message,stack:A.stack};if(A instanceof Map)return{__type:"Map",value:Array.from(A.entries())};if(A instanceof Set)return{__type:"Set",value:Array.from(A.values())};if(A&&typeof A==="object"){if(q.has(A))return"[Circular]";q.add(A)}return A}))};try{return K(W)}catch(L){return{__type:"Unserializable",message:L&&L.message?L.message:"serializeLog failed"}}},F=function(W){if(P.push(W),P.length>B)P.shift();j.postMessage({__fw:!0,__type:"log",msg:W}),Y(W)},X=function(W,q,K){let L={ts:Date.now(),lvl:W,data:V(q),stack:K};F(L)},Z=function(W){if(typeof W!=="string")return W;if(W.slice(-1)===`
12
+ `)return W.slice(0,-1).split(`
13
+ `);return W.split(`
14
+ `)},$=Symbol.for("@awacloud/fw/console-sinks"),J=Symbol.for("@awacloud/fw/console-mode"),Q=function(W){let q=[X],K={native:!1};return new Proxy(W,{get:function(L,C){if(C===$)return q;if(C===J)return K;let A=L[C];if(typeof A!=="function")return A;return function(){let R=Error().stack;for(let S=0;S<q.length;S++)q[S](String(C),[...arguments],R);if(K.native)return A.apply(L,arguments);if(w)return A.apply(L,[...arguments,Z(R)])}},set:function(){return console.warn("Attempt to modify console"),!0}})},H=N&&N[$];if(Array.isArray(H))H.push(X);else{let W=Object.getOwnPropertyDescriptor(self,"console");if(!W||W.configurable||W.writable){let q=Q(N);Object.defineProperty(self,"console",{value:q,writable:!1,enumerable:!1,configurable:!1})}}return{get:M,setLen:U,clear:T,subscribe:z,native:function(W){let q=self.console?self.console[J]:null;if(!q||typeof q!=="object")return!1;return q.native=W!==!1,!0}}},r$={main:QZ,worker:XZ};function QJ(w,j,N,P,D){let T=[],U=/^[A-Za-z_$][\w$]*$/,M=function(X){for(let Z of X){for(let $=globalThis;$;$=Object.getPrototypeOf($))if(Object.prototype.hasOwnProperty.call($,Z))try{delete $[Z]}catch(J){}if(Z in globalThis)throw Error('createWorker: could not revoke "'+Z+'"')}},z=function(X){let Z=[];if(X.revoke!==void 0){if(!Array.isArray(X.revoke)||!X.revoke.every((Q)=>typeof Q==="string"&&U.test(Q)))throw TypeError("createWorker: revoke must be an array of global names");Z=X.revoke.slice()}let $=null,J=X.lockdown;if(J===!0)$=new URL("../sanity/lockdown.js",import.meta.url).href;else if(J&&typeof J==="object")try{$=new URL(String(J.url)).href}catch(Q){throw TypeError("createWorker: lockdown.url must be an absolute URL",{cause:Q})}else if(J!==void 0&&J!==!1)throw TypeError("createWorker: lockdown must be true, false or { url }");return{revoke:Z,lockdownUrl:$}},Y=function(X,Z,$){return{libs:X.resolveAll(Z),process:{},args:$}},V=function(X){return!!(X&&X.__fw===!0)},F=function(){if(w.LOG)return function(X){if(V(X.data)){if(X.stopImmediatePropagation(),X.data.__type==="log")P.__push(X.data.msg)}};else return function(X){if(V(X.data))X.stopImmediatePropagation()}};return function(Z,$={}){let J=$&&typeof $==="object"?$:{},Q={dependencies:Array.isArray(J.dependencies)?J.dependencies:T,workerFw:typeof J.workerFw==="function"?J.workerFw:Y,args:Array.isArray(J.args)?J.args:[],terminate:typeof J.terminate==="function"?J.terminate:function(){}},H=z(J),G=j.serialize(Q.dependencies),W=JSON.stringify(Q.args),q=w.LOG?`(${D})(${w.DEV===!0}, self);`:"",K=JSON.stringify(Q.dependencies),L=H.lockdownUrl?`import { lockdown as __fwLockdown } from ${JSON.stringify(H.lockdownUrl)};
15
+ `:"",C=(H.revoke.length?`(${M.toString()})(${JSON.stringify(H.revoke)});`:"")+(H.lockdownUrl?"__fwLockdown();":""),A=L+q+`
16
+ ${N}
16
17
 
17
18
  const runtime = new ModuleRuntime();
18
19
 
19
- ${$.content}.forEach(m => {
20
+ ${G.content}.forEach(m => {
20
21
  runtime.register(m);
21
22
  });
22
23
 
23
- runtime.context = (${J.workerFw.toString()})(runtime, ${B}, ${Y});
24
+ runtime.context = (${Q.workerFw.toString()})(runtime, ${K}, ${W});
24
25
 
25
- (${G.toString()})( runtime.context );
26
- `,F=URL.createObjectURL(new Blob([z],{type:"text/javascript"})),q;try{q=new Worker(F)}catch(w){throw URL.revokeObjectURL(F),w}let D=Q();q.addEventListener("message",D);let A=q.terminate.bind(q),T=!1,N=function(){if(T)return!1;return T=!0,q.removeEventListener("message",D),URL.revokeObjectURL(F),J.terminate(),!0};return q.terminate=function(){N(),A()},q}}function o$(){let C={status:!1,interactive:!1,complete:!1,queue:{interactive:[],complete:[]}},K=function(X,V){try{X.apply({},V)}catch(Q){}},R=function(X){for(let V=0;V<X.length;V++)K(X[V][0],X[V][1])},j=function(){if(C.status==="interactive")C.interactive=!0;else if(C.status==="complete")C.interactive=!0,C.complete=!0},H=function(){if(C.interactive&&C.queue.interactive.length>0)R(C.queue.interactive.splice(0));if(C.complete&&C.queue.complete.length>0)R(C.queue.complete.splice(0))},P=function(){if(C.status!==!1)return;if(C.status=document.readyState,j(),C.status==="complete")return;document.addEventListener("readystatechange",function(){C.status=document.readyState,j(),H()})};return{loaded:function(X,V=[]){if(typeof X!=="function")return;if(P(),C.interactive)K(X,V);else C.queue.interactive.push([X,V])},complete:function(X,V=[]){if(typeof X!=="function")return;if(P(),C.complete)K(X,V);else C.queue.complete.push([X,V])}}}var r$={name:"errors",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let C={debug:10,info:20,warn:30,error:40,silent:99};function K(H={}){let P=H.prefix||"",L=H.level&&C[H.level]!==void 0?H.level:"info",M=C[L],X=typeof H.sink==="function"?H.sink:null;function V(Z,G,W){if(C[Z]<M)return;let O={level:Z,prefix:P,time:Date.now(),message:typeof G==="string"?G:String(G),context:W&&typeof W==="object"?W:{}};if(X){try{X(O)}catch{}return}let J=P?`[${P}]`:"",$=W!==void 0?[J,O.message,O.context]:[J,O.message],Y=typeof console<"u"&&console[Z]||typeof console<"u"&&console.log;if(Y)try{Y.apply(console,$)}catch{}}return{debug(Z,G){V("debug",Z,G)},info(Z,G){V("info",Z,G)},warn(Z,G){V("warn",Z,G)},error(Z,G){V("error",Z,G)},child(Z){let G=P?`${P}:${Z}`:Z;return K({level:L,prefix:G,sink:X})},set level(Z){if(C[Z]!==void 0)L=Z,M=C[Z]},get level(){return L}}}function R(H={}){let P=typeof H.onError==="function"?H.onError:null,L=!!H.rethrow;return function(X,V){if(typeof X!=="function")throw Error("errors.guard: fn must be a function");let Q;try{Q=X()}catch(Z){if(P)try{P(Z,V)}catch{}if(L)throw Z;return}if(Q&&typeof Q.then==="function")return Q.catch((Z)=>{if(P)try{P(Z,V)}catch{}if(L)throw Z;return});return Q}}function j(H,P,L={}){if(!H||typeof H.text!=="function")throw Error("errors.boundary: ui (UISession) is required");if(typeof P!=="string")throw Error("errors.boundary: blockId must be a string");let M=typeof L.onError==="function"?L.onError:null,X=typeof L.render==="function"?L.render:null,V=typeof L.fallback==="string"?L.fallback:null,Q=!!L.clear;function Z(G){if(M)try{M(G)}catch{}try{if(X)X(G,H,P);else if(V!=null){if(H.get(P))H.text(P,V)}if(Q)H.clear(P)}catch{}}return function(W){if(typeof W!=="function")throw Error("errors.boundary: fn must be a function");let O;try{O=W()}catch(J){Z(J);return}if(O&&typeof O.then==="function")return O.catch((J)=>{Z(J);return});return O}}return{logger:K,guard:R,boundary:j}}};var E$={name:"eventBus",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){function C(j,H=!0){if(typeof j!=="string"||j.length===0)throw TypeError("eventBus: topic must be a non-empty string");if(j==="*")throw Error('eventBus: global wildcard "*" is not allowed; use a namespaced pattern like "ns:*"');let P=(j.match(/\*/g)||[]).length;if(P>0){if(!H)throw Error("eventBus: wildcards not allowed in emit/set/clear topic: "+j);if(P>1||!j.endsWith(":*"))throw Error('eventBus: invalid wildcard pattern "'+j+'"; only "prefix:*" is allowed')}}function K(j,H){if(j===H)return!0;if(j.endsWith(":*")){let P=j.slice(0,-1);return H.startsWith(P)&&H.length>P.length}return!1}function R(){let j=new Map,H=new Map,P=new Map;function L($){if(!j.has($))j.set($,new Set);return j.get($)}function M($){if(!H.has($))H.set($,new Set);return H.get($)}function X($,Y,U){if(C($,!0),typeof Y!=="function")throw TypeError("eventBus: listener must be a function");let B;if($.endsWith(":*"))M($).add(Y),B=()=>V($,Y);else L($).add(Y),B=()=>V($,Y);if(U&&U.replay===!0&&P.has($))try{Y(P.get($))}catch(z){console.error("eventBus sticky replay error:",z)}return B}function V($,Y){if(C($,!0),$.endsWith(":*")){let U=H.get($);if(U){if(U.delete(Y),U.size===0)H.delete($)}}else{let U=j.get($);if(U){if(U.delete(Y),U.size===0)j.delete($)}}}function Q($,Y){C($,!1);let U=j.get($);if(U&&U.size>0)for(let B of[...U])try{B(Y)}catch(z){console.error("eventBus handler error:",z)}for(let[B,z]of H)if(K(B,$))for(let F of[...z])try{F(Y)}catch(q){console.error("eventBus handler error:",q)}}function Z($,Y){if(C($,!0),typeof Y!=="function")throw TypeError("eventBus: listener must be a function");let U=X($,Y);if(P.has($))try{Y(P.get($))}catch(B){console.error("eventBus sticky replay error:",B)}return U}function G($,Y){C($,!1),P.set($,Y),Q($,Y)}function W($){if($===void 0)P.clear();else C($,!1),P.delete($)}function O(){let $=[];function Y(z,F){let q=X(z,F);return $.push(q),q}function U(z,F){let q=Z(z,F);return $.push(q),q}function B(){for(let z of $)try{z()}catch(F){console.error("eventBus scope dispose error:",F)}$.length=0}return{on:Y,sticky:U,dispose:B}}function J(){let $=new Set;for(let[Y,U]of j)if(U.size>0)$.add(Y);for(let[Y,U]of H)if(U.size>0)$.add(Y);for(let Y of P.keys())$.add(Y);return[...$]}return{on:X,off:V,emit:Q,sticky:Z,set:G,clear:W,scope:O,topics:J}}return{create:R}}};var I$={name:"signal",version:"1.2.0",type:"fw.io.utils",dependencies:[],factory(){let C=0,K=null,R=null,j="sync",H=null,P=!1,L=0,M=0,X=new Set;function V(){P=!1;let q=H;if(H=null,!q)return;for(let[D,A]of q)for(let T of[...D._subs])try{T(A)}catch{}}function Q(){if(j==="raf"&&typeof requestAnimationFrame==="function")requestAnimationFrame(V);else Promise.resolve().then(V)}function Z(q,D){let A=q,T=D&&typeof D.eq==="function"?D.eq:Object.is,N=new Set,w={get(){if(R!==null)R.add(w);return A},peek(){return A},set(S){if(T(A,S))return;if(A=S,C>0){K.set(w,A);return}if(j!=="sync"){if(H===null)H=new Map;if(H.set(w,A),!P)P=!0,Q();return}for(let I of[...N])try{I(A)}catch{}},update(S){w.set(S(A))},subscribe(S){if(typeof S!=="function")return()=>{};return N.add(S),()=>N.delete(S)},get size(){return N.size},_isSignal:!0,_subs:N,_graphId:"s"+ ++L};return w}function G(q,D,A){if(!Array.isArray(q)||q.some((v)=>!v||!v._isSignal))throw Error("signal.derived: deps must be an array of signals");if(typeof D!=="function")throw Error("signal.derived: fn must be a function");let T=()=>D(...q.map((v)=>v.peek())),N=Z(T(),A),w=!1,S=q.map((v)=>v.subscribe(()=>{if(w)return;N.set(T())}));function I(){if(w)return;w=!0;for(let v of S)try{v()}catch{}S.length=0}return{get:N.get,peek:N.peek,subscribe:N.subscribe,dispose:I,get size(){return N.size},_isSignal:!0,_subs:N._subs}}function W(q){if(typeof q!=="function")return;if(C===0)K=new Map;C++;try{q()}finally{if(C--,C===0){let D=K;K=null;for(let[A,T]of D)for(let N of[...A._subs])try{N(T)}catch{}}}}function O(q){let D=R;R=null;try{return q()}finally{R=D}}function J(q){if(typeof q!=="function")throw Error("signal.effect: fn must be a function");let D=new Set,A=!1,T={id:"e"+ ++M,deps:new Set};X.add(T);function N(){for(let S of D)try{S()}catch{}D.clear()}function w(){if(A)return;N();let S=new Set,I=R;R=S;try{q()}catch(v){try{console.error("signal.effect: handler threw",v)}catch{}}finally{R=I}T.deps.clear();for(let v of S){T.deps.add(v._graphId);let E=v.subscribe(w);D.add(E)}}return w(),function(){A=!0,N(),T.deps.clear(),X.delete(T)}}function $(q,D){if(typeof q!=="function")throw Error("signal.resource: fetcher must be a function");let A=!(D&&D.autoStart===!1),T=D&&typeof D.eq==="function"?D.eq:(I,v)=>I.status===v.status&&I.value===v.value&&I.error===v.error,N=Z({status:"idle",value:null,error:null},{eq:T}),w=0;function S(){let I=++w;N.set({status:"pending",value:N.peek().value,error:null}),Promise.resolve().then(()=>q()).then((v)=>{if(I!==w)return;N.set({status:"resolved",value:v,error:null})},(v)=>{if(I!==w)return;N.set({status:"rejected",value:N.peek().value,error:v instanceof Error?v:Error(String(v))})})}if(A)S();return{get:N.get,peek:N.peek,subscribe:N.subscribe,refresh:S,get size(){return N.size},_isSignal:!0,_subs:N._subs}}function Y(q,D,A){if(!Array.isArray(q)||q.some((I)=>!I||!I._isSignal))throw Error("signal.derivedAsync: deps must be an array of signals");if(typeof D!=="function")throw Error("signal.derivedAsync: fn must be a function");let T=$(()=>Promise.resolve().then(()=>D(...q.map((I)=>I.peek()))),A),N=[],w=!1;for(let I of q){let v=I.subscribe(()=>{if(w)return;T.refresh()});N.push(v)}function S(){if(w)return;w=!0;for(let I of N)try{I()}catch{}N.length=0}return{get:T.get,peek:T.peek,subscribe:T.subscribe,refresh:T.refresh,dispose:S,get size(){return T.size},_isSignal:!0,_subs:T._subs}}function U(q,D){if(typeof q!=="function")throw Error("signal.computed: fn must be a function");let A=D&&typeof D.eq==="function"?D.eq:Object.is,T=new Set,N=!0,w,S=[],I=!1;function v(){for(let g of S)try{g()}catch{}S=[]}function E(){if(I)return;if(!N)N=!0;v();let g=new Set,b=R;R=g;let p;try{p=q()}finally{R=b}let c=w;w=p,N=!1;for(let s of g)S.push(s.subscribe(E));if(!A(c,p))for(let s of[...T])try{s(p)}catch{}}function x(){v();let g=new Set,b=R;R=g;try{w=q()}finally{R=b}N=!1;for(let p of g)S.push(p.subscribe(E))}let _={get(){if(R!==null)R.add(_);if(N&&!I)x();return w},peek(){if(N&&!I){let g=R;R=null,x(),R=g}return w},subscribe(g){if(typeof g!=="function")return()=>{};return T.add(g),()=>T.delete(g)},dispose(){if(I)return;I=!0,v()},get size(){return T.size},_isSignal:!0,_subs:T,_graphId:"c"+ ++L};return Object.freeze(_)}function B(q){let D=j;if(j=q,q==="sync"&&H!==null)V();return function(){if(j=D,D==="sync"&&H!==null)V()}}function z(){V()}function F(){return O(()=>{let q=[],D=[],A=[],T=new Set;for(let N of X){D.push(Object.freeze({id:N.id,deps:N.deps.size}));for(let w of N.deps){if(!T.has(w))T.add(w),q.push(Object.freeze({id:w,kind:w[0]==="c"?"computed":"signal"}));A.push(Object.freeze({effect:N.id,signal:w}))}}return Object.freeze({signals:Object.freeze(q),effects:Object.freeze(D),edges:Object.freeze(A)})})}return{create:Z,derived:G,batch:W,untrack:O,effect:J,resource:$,derivedAsync:Y,computed:U,scheduleNotify:B,flushSync:z,inspectGraph:F}}};var s$={name:"valid",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let C={is(Q){return Object.prototype.toString.call(Q).slice(8,-1).toLowerCase()},isNumber(Q){return typeof Q==="number"&&Number.isFinite(Q)},isString(Q){return Object.prototype.toString.call(Q)==="[object String]"},isBoolean(Q){return Q===!0||Q===!1||Object.prototype.toString.call(Q)==="[object Boolean]"},isArray(Q){return Object.prototype.toString.call(Q)==="[object Array]"},isObject(Q){return Object.prototype.toString.call(Q)==="[object Object]"},isUint8Array(Q){return Object.prototype.toString.call(Q)==="[object Uint8Array]"},isUint8ClampedArray(Q){return Object.prototype.toString.call(Q)==="[object Uint8ClampedArray]"},isFunction(Q){return Object.prototype.toString.call(Q)==="[object Function]"}},K=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function R(Q){if(typeof Q!=="string")return!1;if(Q.length===0||Q.length>254)return!1;let Z=Q.lastIndexOf("@");if(Z<1||Z===Q.length-1)return!1;let G=Q.slice(0,Z),W=Q.slice(Z+1);if(G.length>64||W.length>255)return!1;if(G.charCodeAt(0)===46)return!1;if(G.charCodeAt(G.length-1)===46)return!1;if(G.indexOf("..")>=0)return!1;let O=W.lastIndexOf(".");if(O<0)return!1;if(W.length-O-1<2)return!1;return K.test(Q)}let j=new RegExp("^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(:[0-9a-fA-F]{1,4}){1,6}|:(:[0-9a-fA-F]{1,4}){1,7}|::|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z.\\-_~]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9]))$"),H={email:R,url:/^https?:\/\/[^\s/$.?#].[^\s]*$/i,uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,date:/^\d{4}-\d{2}-\d{2}$/,datetime:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,ipv4:/^(25[0-5]|2[0-4]\d|[01]?\d\d?)(\.(25[0-5]|2[0-4]\d|[01]?\d\d?)){3}$/,ipv6:j,hex:/^[0-9a-f]+$/i,base64:/^[A-Za-z0-9+/]*={0,2}$/};function P(Q,Z){if(Q===Z)return!0;if(typeof Q!==typeof Z)return!1;if(Q===null||Z===null)return Q===Z;if(Array.isArray(Q)){if(!Array.isArray(Z)||Q.length!==Z.length)return!1;for(let G=0;G<Q.length;G++)if(!P(Q[G],Z[G]))return!1;return!0}if(typeof Q==="object"){if(Array.isArray(Z))return!1;let G=Object.keys(Q),W=Object.keys(Z);if(G.length!==W.length)return!1;for(let O of G)if(!P(Q[O],Z[O]))return!1;return!0}return!1}function L(Q){if(Q===null)return"null";if(Array.isArray(Q))return"array";if(typeof Q==="number"){if(!Number.isFinite(Q))return"number";return Number.isInteger(Q)?"integer":"number"}if(typeof Q==="object")return"object";return typeof Q}function M(Q,Z){let G=L(Q);if(Z==="number")return G==="number"||G==="integer";return G===Z}function X(Q,Z,G,W){Q.push({path:Z||"/",keyword:G,message:W})}function V(Q,Z,G,W,O){if(Z===!0)return;if(Z===!1){X(W,G,"false","schema is false");return}if(!Z||typeof Z!=="object")return;if("const"in Z){if(!P(Q,Z.const))X(W,G,"const","must equal const")}if(Array.isArray(Z.enum)){let $=!1;for(let Y of Z.enum)if(P(Q,Y)){$=!0;break}if(!$)X(W,G,"enum","must be one of enum values")}if(Z.type!==void 0){let $=Array.isArray(Z.type)?Z.type:[Z.type],Y=Z.nullable?$.concat("null"):$,U=!1;for(let B of Y)if(M(Q,B)){U=!0;break}if(!U){X(W,G,"type","must be "+Y.join(" | "));return}}else if(Z.nullable&&Q===null)return;let J=L(Q);if(J==="string"){if(typeof Z.minLength==="number"&&Q.length<Z.minLength)X(W,G,"minLength","string shorter than "+Z.minLength);if(typeof Z.maxLength==="number"&&Q.length>Z.maxLength)X(W,G,"maxLength","string longer than "+Z.maxLength);if(Z.pattern!==void 0){if(!(Z.pattern instanceof RegExp?Z.pattern:new RegExp(Z.pattern)).test(Q))X(W,G,"pattern","does not match pattern")}if(Z.format){let $=O[Z.format];if($ instanceof RegExp){if(!$.test(Q))X(W,G,"format","does not match format "+Z.format)}else if(typeof $==="function"){if(!$(Q))X(W,G,"format","does not match format "+Z.format)}}}if(J==="number"||J==="integer")if(!Number.isFinite(Q))X(W,G,"type","number must be finite");else{if(typeof Z.minimum==="number"&&Q<Z.minimum)X(W,G,"minimum","must be >= "+Z.minimum);if(typeof Z.maximum==="number"&&Q>Z.maximum)X(W,G,"maximum","must be <= "+Z.maximum);if(typeof Z.exclusiveMinimum==="number"&&Q<=Z.exclusiveMinimum)X(W,G,"exclusiveMinimum","must be > "+Z.exclusiveMinimum);if(typeof Z.exclusiveMaximum==="number"&&Q>=Z.exclusiveMaximum)X(W,G,"exclusiveMaximum","must be < "+Z.exclusiveMaximum);if(typeof Z.multipleOf==="number"&&Z.multipleOf>0){let $=Q/Z.multipleOf;if(!Number.isFinite($)||Math.abs($-Math.round($))>0.000000000001)X(W,G,"multipleOf","must be multiple of "+Z.multipleOf)}}if(J==="array"){if(typeof Z.minItems==="number"&&Q.length<Z.minItems)X(W,G,"minItems","array shorter than "+Z.minItems);if(typeof Z.maxItems==="number"&&Q.length>Z.maxItems)X(W,G,"maxItems","array longer than "+Z.maxItems);if(Z.uniqueItems){for(let $=0;$<Q.length;$++)for(let Y=$+1;Y<Q.length;Y++)if(P(Q[$],Q[Y])){X(W,G,"uniqueItems","duplicate items at ["+$+"] and ["+Y+"]"),$=Q.length;break}}if(Z.items)for(let $=0;$<Q.length;$++)V(Q[$],Z.items,G+"/"+$,W,O)}if(J==="object"){if(Array.isArray(Z.required)){for(let B of Z.required)if(!(B in Q))X(W,G+"/"+B,"required","missing required property")}let $=Z.properties||null,Y=Z.patternProperties?Object.keys(Z.patternProperties).map((B)=>({re:new RegExp(B),schema:Z.patternProperties[B]})):null,U=Z.additionalProperties;for(let B of Object.keys(Q)){let z=G+"/"+B,F=!1;if($&&B in $)V(Q[B],$[B],z,W,O),F=!0;if(Y){for(let q of Y)if(q.re.test(B))V(Q[B],q.schema,z,W,O),F=!0}if(!F){if(U===!1)X(W,z,"additionalProperties","additional property not allowed");else if(U&&typeof U==="object")V(Q[B],U,z,W,O)}}}if(Array.isArray(Z.allOf))for(let $ of Z.allOf)V(Q,$,G,W,O);if(Array.isArray(Z.anyOf)){let $=!1,Y=[];for(let U of Z.anyOf){let B=[];if(V(Q,U,G,B,O),B.length===0){$=!0;break}Y.push(B)}if(!$)X(W,G,"anyOf","did not match any schema in anyOf")}if(Array.isArray(Z.oneOf)){let $=0;for(let Y of Z.oneOf){let U=[];if(V(Q,Y,G,U,O),U.length===0)$++;if($>1)break}if($!==1)X(W,G,"oneOf","must match exactly one schema in oneOf (matched "+$+")")}if(Z.not!==void 0){let $=[];if(V(Q,Z.not,G,$,O),$.length===0)X(W,G,"not","must not match schema")}}return C.validate=function(Q,Z,G){let W=G&&G.formats?Object.assign({},H,G.formats):H,O=[];return V(Q,Z,"",O,W),{valid:O.length===0,errors:O}},C.test=function(Q,Z,G){return C.validate(Q,Z,G).valid},C.compile=function(Q,Z){let G=Z&&Z.formats?Object.assign({},H,Z.formats):H;return{validate(W){let O=[];return V(W,Q,"",O,G),{valid:O.length===0,errors:O}},test(W){let O=[];return V(W,Q,"",O,G),O.length===0}}},C.formats=H,C}};var a$={name:"ui8",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let C=function(P,L){let M=new Uint8Array(P.length+L.length);return M.set(P,0),M.set(L,P.length),M};function K(H,P){let L=new Uint8Array(H),M=0;for(let X=0;X<P.length;X++)L.set(P[X],M),M+=P[X].length;return L}return{equal:function(P,L){if(P.length===L.length){for(let M=0;M<P.length;M++)if(P[M]!==L[M])return!1;return!0}else return!1},join:C,concat:function(P){let L=0;for(let M=0;M<P.length;M++)L+=P[M].length;return K(L,P)}}}};var t$={name:"abort",version:"1.0.0",type:"fw.io.sync",dependencies:[],factory(){function C(L){let M=typeof L==="string"?L:"The operation was aborted";if(typeof DOMException<"u")return new DOMException(M,"AbortError");let X=Error(M);return X.name="AbortError",X}function K(L){if(typeof L!=="number"||isNaN(L)||L<=0)throw Error("abort: ms must be a positive number");let M=new AbortController,X=setTimeout(()=>M.abort(C()),L);function V(Q){clearTimeout(X),M.abort(Q!==void 0?Q:C())}return M.signal.addEventListener("abort",()=>clearTimeout(X),{once:!0}),{signal:M.signal,controller:M,abort:V}}function R(...L){if(L.length===0)throw Error("abort: any() requires at least one signal");for(let G of L)if(!(G instanceof AbortSignal))throw Error("abort: any() arguments must be AbortSignal instances");if(typeof AbortSignal.any==="function")return AbortSignal.any(L);let M=L.find((G)=>G.aborted);if(M){let G=new AbortController;return G.abort(M.reason),G.signal}let X=new AbortController,V=[];function Q(G){if(!X.signal.aborted)X.abort(G.target.reason);Z()}function Z(){for(let[G,W]of V)G.removeEventListener("abort",W);V.length=0}for(let G of L){let W=(O)=>Q(O);V.push([G,W]),G.addEventListener("abort",W,{once:!0})}return X.signal}function j(L){if(!(L instanceof AbortSignal))throw Error("abort: wait() requires an AbortSignal");if(L.aborted)return Promise.reject(L.reason!==void 0?L.reason:C());return new Promise((M,X)=>{L.addEventListener("abort",()=>{X(L.reason!==void 0?L.reason:C())},{once:!0})})}function H(L,M){if(M===void 0||M===null)return L;if(!(M instanceof AbortSignal))throw Error("abort: race() second argument must be an AbortSignal or null/undefined");if(M.aborted)return Promise.reject(M.reason!==void 0?M.reason:C());return Promise.race([L,j(M)])}function P(L){if(L===void 0||L===null)return;if(L.aborted)throw L.reason!==void 0?L.reason:C()}return{timeout:K,any:R,wait:j,race:H,throwIfAborted:P,error:C}}};var x$={name:"clock",version:"1.0.0",type:"fw.io.timing",dependencies:[],factory(){let C=Date.now();function K(){return Date.now()}function R(){let L=Date.now();if(L<C)return C;return C=L,L}function j(L){return Math.max(0,R()-L)}function H(){return new Date().toISOString()}function P(L){let M=Number(L);if(!Number.isFinite(M))return String(L);let X=Math.abs(M);if(X<1)return M.toFixed(3)+" ms";if(X<1000)return M.toFixed(1)+" ms";if(X<60000)return(M/1000).toFixed(3)+" s";if(X<3600000)return(M/60000).toFixed(2)+" min";return(M/3600000).toFixed(2)+" h"}return{now:K,monotonic:R,since:j,iso:H,format:P}}};var q$={name:"secPolicy",version:"1.0.0",type:"fw.dom.rendering",dependencies:[],factory(){let C=new Set(["href","src","action","formaction","srcset","xlink:href","data","codebase"]),K=/^(javascript|vbscript|file|jar|data:text|data:application)/,R=new Set(["http","https","mailto","tel","ftp"]),j=/^data:image\/(png|jpe?g|gif|webp|svg\+xml|bmp|ico|avif|apng);/;function H(Y,U,B){if(typeof Y!=="string")return!1;let z=Y.replace(/[\x00-\x20\x7f]+/g,"").toLowerCase();if(z==="")return!0;if(z[0]==="#"||z[0]==="/"||z[0]==="?"||z[0]===".")return!0;if(K.test(z))return!1;if(z.startsWith("data:")){if(B===!1)return!1;return j.test(z)}let F=z.indexOf(":");if(F===-1)return!0;let q=z.indexOf("/");if(q!==-1&&q<F)return!0;let D=Array.isArray(U)?U:R,A=z.slice(0,F);return D instanceof Set?D.has(A):D.includes(A)}let P=new Set(["id","name"]),L=new Set(["cookie","cookies","domain","location","write","writeln","open","close","body","head","title","URL","referrer","documentElement","documentURI","currentScript","designMode","forms","images","links","scripts","styleSheets","all","embeds","plugins","anchors","applets","parent","top","self","frames","frameElement","opener","elements","submit","reset","method","action"]);function M(Y,U){return P.has(Y)&&L.has(String(U))}let X=/^on/i,V=/^[a-zA-Z]/;function Q(Y){return typeof Y==="string"&&X.test(Y)}function Z(Y){return typeof Y==="string"&&V.test(Y)&&!X.test(Y)}let G=/^(script|object|embed|iframe)$/;function W(Y){return typeof Y==="string"&&G.test(Y)}let O=/expression\(|url\(['"]?(?:javascript|vbscript|data:text|data:application)/,J=new Set(["behavior","-ms-behavior"]);function $(Y,U){if(typeof Y==="string"&&J.has(Y.toLowerCase()))return!1;if(U==null)return!0;let B=String(U).replace(/[\x00-\x20\x7f]+/g,"").toLowerCase();return!O.test(B)}return{URL_ATTRS:C,SCHEME_DANGEROUS_RE:K,SAFE_SCHEMES:R,DATA_IMAGE_RE:j,isSafeUrl:H,CLOBBER_ATTRS:P,CLOBBER_NAMES:L,isClobberValue:M,EVENT_ATTR_RE:X,SAFE_ATTR_NAME_RE:V,isEventAttr:Q,isSafeAttrName:Z,BLOCKED_TAGS_RE:G,isBlockedTag:W,CSS_DANGEROUS_RE:O,CSS_BLOCKED_PROPS:J,isSafeCss:$}}};var F$={name:"dom",type:"fw.dom.query",dependencies:["secPolicy"],deps:[q$],factory(C){let K=function(H,P,L){if(!C.isSafeCss(P,L))return;H.style.setProperty(P,L)},R=function(H){if(Array.isArray(H)||H instanceof NodeList)return H;return[H]};return{queryAll(H,P){if((H instanceof HTMLElement||H instanceof SVGElement)&&typeof P==="string")return H.querySelectorAll(P);return[]},query(H,P){if((H instanceof HTMLElement||H instanceof SVGElement)&&typeof P==="string")return H.querySelector(P);return null},attr(H,P,L){let M=R(H);for(let X=0;X<M.length;X++)M[X].setAttribute(P,L)},attrGet(H,P){if(H instanceof Element)return H.getAttribute(P);return null},attrRemove(H,P){let L=R(H);for(let M=0;M<L.length;M++)L[M].removeAttribute(P)},attrHas(H,P){if(H instanceof Element)return H.hasAttribute(P);return!1},data(H,P,L){let M=R(H);for(let X=0;X<M.length;X++)if("dataset"in M[X])M[X].dataset[P]=L},dataGet(H,P){if("dataset"in H)return H.dataset[P]??null;return null},dataRemove(H,P){let L=R(H);for(let M=0;M<L.length;M++)if("dataset"in L[M])delete L[M].dataset[P]},dataHas(H,P){if("dataset"in H)return P in H.dataset;return!1},classAdd(H,P){let L=P.trim().split(/\s+/),M=R(H);for(let X=0;X<M.length;X++)M[X].classList.add(...L)},classRemove(H,P){let L=P.trim().split(/\s+/),M=R(H);for(let X=0;X<M.length;X++)M[X].classList.remove(...L)},classHas(H,P){if(H instanceof Element)return H.classList.contains(P);return!1},classToggle(H,P){let L=R(H);for(let M=0;M<L.length;M++)L[M].classList.toggle(P)},classReplace(H,P,L){let M=R(H);for(let X=0;X<M.length;X++)M[X].classList.replace(P,L)},style(H,P,L){let M=R(H);for(let X=0;X<M.length;X++)K(M[X],P,L)},styleGet(H,P){if(H instanceof Element)return getComputedStyle(H).getPropertyValue(P);return null},styleGetAll(H){if(H instanceof Element)return getComputedStyle(H);return null},styleRemove(H,P){let L=R(H);for(let M=0;M<L.length;M++)L[M].style.removeProperty(P)},hide(H){let P=R(H);for(let L=0;L<P.length;L++)K(P[L],"display","none")},show(H,P){let L=P!==void 0?P:"",M=R(H);for(let X=0;X<M.length;X++)if(L==="")M[X].style.removeProperty("display");else K(M[X],"display",L)},toggleVisibility(H){let P=R(H);for(let L=0;L<P.length;L++)if(P[L].style.display==="none")P[L].style.removeProperty("display");else K(P[L],"display","none")},rect(H){if(H instanceof Element)return H.getBoundingClientRect();return null},scrollPos(H){if(H instanceof Element)return{top:H.scrollTop,left:H.scrollLeft};return null},scrollTo(H,P,L){let M=R(H);for(let X=0;X<M.length;X++){if(P!==void 0)M[X].scrollTop=P;if(L!==void 0)M[X].scrollLeft=L}},reorder(H,P){if(!(H instanceof Element))return;let L=H,M=typeof L.moveBefore==="function"?(V,Q)=>L.moveBefore(V,Q):(V,Q)=>H.insertBefore(V,Q),X=H.firstChild;for(let V=0;V<P.length;V++){let Q=P[V];if(!(Q instanceof Element)||Q.parentNode!==H)continue;if(Q===X){X=X.nextSibling;continue}M(Q,X)}},fragment(H){let P=document.createDocumentFragment();if(H&&typeof H[Symbol.iterator]==="function"){for(let L of H)if(L instanceof Node)P.appendChild(L)}return P},bind(H,P,L,M,X){if(!(P instanceof Element))throw Error("dom.bind: element must be an Element");if(typeof L!=="function"||typeof M!=="function")throw Error("dom.bind: getter and setter must be functions");let V=X&&X.event||"input",Q=!!(X&&X.checked),Z=Q?()=>{let O=L();P.checked=!!O}:()=>{let O=L();P.value=O==null?"":String(O)};Z();let G=()=>{M(Q?P.checked:P.value)};P.addEventListener(V,G);let W=!1;return{refresh:Z,destroy(){if(W)return;W=!0,P.removeEventListener(V,G)}}},focus(H){if(H instanceof Element)H.focus()},blur(H){if(H instanceof Element)H.blur()},text(H,P){let L=R(H);if(Array.isArray(P)){let X=(V)=>{let Q=V.createDocumentFragment();for(let Z of P){if(Z==null)continue;let G=String(Z.text==null?"":Z.text);if(Z.lang){let W=V.createElement("span");if(W.setAttribute("lang",String(Z.lang)),Z.dir)W.setAttribute("dir",String(Z.dir));W.textContent=G,Q.appendChild(W)}else Q.appendChild(V.createTextNode(G))}return Q};for(let V=0;V<L.length;V++){let Q=L[V];if(!(Q instanceof Element))continue;Q.textContent="",Q.appendChild(X(Q.ownerDocument||document))}return}let M=P==null?"":String(P);for(let X=0;X<L.length;X++)if(L[X]instanceof Node)L[X].textContent=M},textGet(H){if(H instanceof Node)return H.textContent;return null},val(H,P){let L=R(H);for(let M=0;M<L.length;M++)if("value"in L[M])L[M].value=P},valGet(H){if(H instanceof Element&&"value"in H)return H.value;return null},checked(H,P){let L=R(H);for(let M=0;M<L.length;M++)if("checked"in L[M])L[M].checked=!!P},checkedGet(H){if(H instanceof Element&&"checked"in H)return H.checked;return null},disabled(H,P){let L=R(H);for(let M=0;M<L.length;M++)if("disabled"in L[M])L[M].disabled=!!P},disabledGet(H){if(H instanceof Element&&"disabled"in H)return H.disabled;return null}}}};var V$={name:"events",type:"fw.dom.query",dependencies:[],factory(){let C={},K={};function R(Q,Z,G){return new CustomEvent(Q,{detail:Z,bubbles:G.bubbles??!0,cancelable:G.cancelable??!1,composed:G.composed??!1})}let j={};j.on=function(Q,Z,G,W,O=!1){if(C[Q])j.off(Q);Z.addEventListener(G,W,O),C[Q]={elm:Z,type:G,fn:W,options:O}},j.off=function(Q){let Z=C[Q];if(Z)Z.elm.removeEventListener(Z.type,Z.fn,Z.options),delete C[Q]},j.has=function(Q){return Object.prototype.hasOwnProperty.call(C,Q)},j.clear=function(){for(let Q of Object.keys(C))j.off(Q)},j.emit=function(Q,Z,G=null,W={}){Q.dispatchEvent(R(Z,G,W))},j.preset=function(Q,Z,G,W=null,O={}){K[Q]={elm:Z,type:G,detail:W,options:O}},j.dispatch=function(Q,Z){let G=K[Q];if(G)G.elm.dispatchEvent(R(G.type,Z!==void 0?Z:G.detail,G.options))},j.unset=function(Q){delete K[Q]},j.delegate=function(Q,Z,G,W,O,J=!1){if(j.has(Q))j.off(Q);let $=function(Y){let U=Y.target;while(U&&U!==Z){if(U.nodeType===1&&U.matches&&U.matches(W)){Y.currentMatch=U,O.call(U,Y);return}U=U.parentNode}};Z.addEventListener(G,$,J),C[Q]={elm:Z,type:G,fn:$,options:J}},j.scope=function(Q){let Z=Q+":",G=new Set;return{on(W,O,J,$,Y){let U=Z+W;return j.on(U,O,J,$,Y),G.add(U),U},delegate(W,O,J,$,Y,U){let B=Z+W;return j.delegate(B,O,J,$,Y,U),G.add(B),B},off(W){let O=Z+W;j.off(O),G.delete(O)},has(W){return j.has(Z+W)},clear(){for(let W of[...G])j.off(W);G.clear()}}};let H=null,P=new WeakMap;function L(Q,Z){if(!H)return;let G=P.get(Q);if(!G)G=new Set,P.set(Q,G);G.add(Z)}let{on:M,delegate:X}=j;function V(Q){if(!Q)return;let Z=P.get(Q);if(Z){for(let W of Z)j.off(W);P.delete(Q)}let G=Q.childNodes;if(!G)return;for(let W=0;W<G.length;W++)V(G[W])}return j.autoCleanup=function(Q){if(H)return j._disableAutoCleanup;let Z=Q||(typeof document<"u"?document.body:null);if(!Z)return()=>{};return H=new MutationObserver((G)=>{for(let W of G){let O=W.removedNodes;if(!O)continue;for(let J=0;J<O.length;J++)V(O[J])}}),H.observe(Z,{childList:!0,subtree:!0}),j.on=function(G,W,O,J,$){M.call(j,G,W,O,J,$),L(W,G)},j.delegate=function(G,W,O,J,$,Y){X.call(j,G,W,O,J,$,Y),L(W,G)},j._disableAutoCleanup=function(){if(!H)return;H.disconnect(),H=null,j.on=M,j.delegate=X},j._disableAutoCleanup},j}};var _$={name:"easing",version:"1.0.0",type:"fw.io.calc",dependencies:[],factory(){let C={};return C.linear=function(K,R,j,H){return j*K/H+R},C.easeInQuad=function(K,R,j,H){return j*(K/=H)*K+R},C.easeOutQuad=function(K,R,j,H){return-j*(K/=H)*(K-2)+R},C.easeInOutQuad=function(K,R,j,H){if((K/=H/2)<1)return j/2*K*K+R;return-j/2*(--K*(K-2)-1)+R},C.easeInCubic=function(K,R,j,H){return j*(K/=H)*K*K+R},C.easeOutCubic=function(K,R,j,H){return j*((K=K/H-1)*K*K+1)+R},C.easeInOutCubic=function(K,R,j,H){if((K/=H/2)<1)return j/2*K*K*K+R;return j/2*((K-=2)*K*K+2)+R},C.easeInQuart=function(K,R,j,H){return j*(K/=H)*K*K*K+R},C.easeOutQuart=function(K,R,j,H){return-j*((K=K/H-1)*K*K*K-1)+R},C.easeInOutQuart=function(K,R,j,H){if((K/=H/2)<1)return j/2*K*K*K*K+R;return-j/2*((K-=2)*K*K*K-2)+R},C.easeInQuint=function(K,R,j,H){return j*(K/=H)*K*K*K*K+R},C.easeOutQuint=function(K,R,j,H){return j*((K=K/H-1)*K*K*K*K+1)+R},C.easeInOutQuint=function(K,R,j,H){if((K/=H/2)<1)return j/2*K*K*K*K*K+R;return j/2*((K-=2)*K*K*K*K+2)+R},C.easeInSine=function(K,R,j,H){return-j*Math.cos(K/H*(Math.PI/2))+j+R},C.easeOutSine=function(K,R,j,H){return j*Math.sin(K/H*(Math.PI/2))+R},C.easeInOutSine=function(K,R,j,H){return-j/2*(Math.cos(Math.PI*K/H)-1)+R},C.easeInExpo=function(K,R,j,H){return K===0?R:j*Math.pow(2,10*(K/H-1))+R},C.easeOutExpo=function(K,R,j,H){return K===H?R+j:j*(-Math.pow(2,-10*K/H)+1)+R},C.easeInOutExpo=function(K,R,j,H){if(K===0)return R;if(K===H)return R+j;if((K/=H/2)<1)return j/2*Math.pow(2,10*(K-1))+R;return j/2*(-Math.pow(2,-10*(K-1))+2)+R},C.easeInCirc=function(K,R,j,H){return-j*(Math.sqrt(1-(K/=H)*K)-1)+R},C.easeOutCirc=function(K,R,j,H){return j*Math.sqrt(1-(K=K/H-1)*K)+R},C.easeInOutCirc=function(K,R,j,H){if((K/=H/2)<1)return-j/2*(Math.sqrt(1-K*K)-1)+R;return j/2*(Math.sqrt(1-(K-=2)*K)+1)+R},C.easeInElastic=function(K,R,j,H){let P,L=0,M=j;if(K===0)return R;if((K/=H)===1)return R+j;if(!L)L=H*0.3;if(M<Math.abs(j))M=j,P=L/4;else P=L/(2*Math.PI)*Math.asin(j/M);return-(M*Math.pow(2,10*(K-=1))*Math.sin((K*H-P)*(2*Math.PI)/L))+R},C.easeOutElastic=function(K,R,j,H){let P,L=0,M=j;if(K===0)return R;if((K/=H)===1)return R+j;if(!L)L=H*0.3;if(M<Math.abs(j))M=j,P=L/4;else P=L/(2*Math.PI)*Math.asin(j/M);return M*Math.pow(2,-10*K)*Math.sin((K*H-P)*(2*Math.PI)/L)+j+R},C.easeInOutElastic=function(K,R,j,H){let P,L=0,M=j;if(K===0)return R;if((K/=H/2)===2)return R+j;if(!L)L=H*0.44999999999999996;if(M<Math.abs(j))M=j,P=L/4;else P=L/(2*Math.PI)*Math.asin(j/M);if(K<1)return-0.5*(M*Math.pow(2,10*(K-=1))*Math.sin((K*H-P)*(2*Math.PI)/L))+R;return M*Math.pow(2,-10*(K-=1))*Math.sin((K*H-P)*(2*Math.PI)/L)*0.5+j+R},C.easeInBack=function(K,R,j,H){return j*(K/=H)*K*(2.70158*K-1.70158)+R},C.easeOutBack=function(K,R,j,H){return j*((K=K/H-1)*K*(2.70158*K+1.70158)+1)+R},C.easeInOutBack=function(K,R,j,H){let P=1.70158;if((K/=H/2)<1)return j/2*(K*K*(((P*=1.525)+1)*K-P))+R;return j/2*((K-=2)*K*(((P*=1.525)+1)*K+P)+2)+R},C.easeInBounce=function(K,R,j,H){return j-C.easeOutBounce(H-K,0,j,H)+R},C.easeOutBounce=function(K,R,j,H){if((K/=H)<0.36363636363636365)return j*(7.5625*K*K)+R;else if(K<0.7272727272727273)return j*(7.5625*(K-=0.5454545454545454)*K+0.75)+R;else if(K<0.9090909090909091)return j*(7.5625*(K-=0.8181818181818182)*K+0.9375)+R;else return j*(7.5625*(K-=0.9545454545454546)*K+0.984375)+R},C.easeInOutBounce=function(K,R,j,H){if(K<H/2)return C.easeInBounce(K*2,0,j,H)*0.5+R;return C.easeOutBounce(K*2-H,0,j,H)*0.5+j*0.5+R},C}};var e$={name:"animate",type:"fw.dom.display",dependencies:["easing"],deps:[_$],factory(C){function K(R,j,H,P,L,M,X,V){if(!V())return;let Q=Math.min(j-R,H);if(Q>0)M(P(Q,L.init,L.end-L.init,H),V);if(Q<H)requestAnimationFrame((Z)=>K(R,Z,H,P,L,M,X,V));else if(X!==null)X()}return function(j,H,P,L,M=null,X=()=>!0){if(typeof j!=="number"||!Number.isFinite(j)||j<=0)throw TypeError("animate: duration must be a finite positive number");if(typeof H!=="string"||typeof C[H]!=="function")throw TypeError(`animate: easingName '${H}' does not resolve to a function on the easing map`);if(P===null||typeof P!=="object"||typeof P.init!=="number"||!Number.isFinite(P.init)||typeof P.end!=="number"||!Number.isFinite(P.end))throw TypeError("animate: prop must be { init: number, end: number } with finite values");if(typeof L!=="function")throw TypeError("animate: progress must be a function");if(M!==null&&typeof M!=="function")throw TypeError("animate: onComplete must be a function or null");if(typeof X!=="function")throw TypeError("animate: running must be a function");requestAnimationFrame((V)=>{K(V,V,j,C[H],P,L,M,X)})}}};var $J={name:"visibility",type:"fw.dom.lifecycle",dependencies:[],worker:!1,factory(){let C=new Set,K=null,R=null,j=null;function H(){if(K)return;K=($)=>L(document.visibilityState,$),R=($)=>L("hidden",$),j=($)=>L(document.visibilityState||"visible",$),document.addEventListener("visibilitychange",K),document.addEventListener("pagehide",R),document.addEventListener("pageshow",j)}function P(){if(!K)return;document.removeEventListener("visibilitychange",K),document.removeEventListener("pagehide",R),document.removeEventListener("pageshow",j),K=R=j=null}function L($,Y){for(let U of C)U($,Y)}function M($){C.add($),H()}function X($){if(C.delete($),C.size===0)P()}function V(){return typeof document<"u"&&"visibilityState"in document}function Q(){return document.visibilityState}function Z(){return document.visibilityState==="visible"}function G(){return document.visibilityState==="hidden"}function W($,{immediate:Y=!0}={}){if(M($),Y)$(document.visibilityState,null);return()=>X($)}function O($){return W((U,B)=>{if(U==="visible")$(U,B)},{immediate:!0})}function J($){return W((U,B)=>{if(U==="hidden")$(U,B)},{immediate:!1})}return{isSupported:V,state:Q,isVisible:Z,isHidden:G,onChange:W,onVisible:O,onHidden:J}}};var JJ={name:"a11y",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let C=null,K=null;function R(G){if(typeof document>"u"||!document.body)return null;let W=G==="assertive"?K:C;if(W&&document.body.contains(W))return W;if(W&&!document.body.contains(W))if(G==="assertive")K=null;else C=null;let O=document.createElement("div");if(O.setAttribute("aria-live",G),O.setAttribute("aria-atomic","true"),O.setAttribute("role",G==="assertive"?"alert":"status"),O.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",O.setAttribute("data-fw-a11y",G),document.body.appendChild(O),G==="assertive")K=O;else C=O;return O}function j(G,W){let O=R(W==="assertive"?"assertive":"polite");if(!O)return;O.textContent="",Promise.resolve().then(()=>{O.textContent=String(G)})}function H(){if(C)C.textContent="";if(K)K.textContent=""}function P(G,W){if(!G||!W||typeof W!=="object")return;for(let O of Object.keys(W)){let J=W[O],$=O.startsWith("aria-")?O:"aria-"+O;if(J===null||J===!1||J===void 0)G.removeAttribute($);else G.setAttribute($,String(J))}}function L(G){let W=Array.isArray(G)?G:[G],O=[];for(let J of W){if(J==null)continue;if(typeof J==="string")O.push(J);else if(J&&J.id)O.push(J.id)}return O.join(" ")}function M(G,W){if(!G)return;let O=L(W);if(O)G.setAttribute("aria-labelledby",O);else G.removeAttribute("aria-labelledby")}function X(G,W){if(!G)return;let O=L(W);if(O)G.setAttribute("aria-describedby",O);else G.removeAttribute("aria-describedby")}function V(G,W){if(!G)return;if(W==null||W===!1)G.removeAttribute("role");else G.setAttribute("role",String(W))}function Q(G){if(G)G.removeAttribute("role")}function Z(){if(typeof window>"u"||typeof window.matchMedia!=="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}return{announce:j,clearAnnouncements:H,aria:P,labelledBy:M,describedBy:X,setRole:V,removeRole:Q,prefersReducedMotion:Z}}};var ZJ={name:"focus",version:"1.0.0",type:"fw.dom.utils",dependencies:["dom","events"],deps:[F$,V$],factory(C,K){let R=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(",");function j(B){let z=B;while(z&&z!==document.body){if(z.hasAttribute&&z.hasAttribute("inert"))return!0;z=z.parentElement}return!1}function H(B){if(B.offsetParent!==null)return!0;let z=B.getBoundingClientRect();return z.width>0||z.height>0}function P(B){let z=B.getAttribute("tabindex");if(z===null)return 0;return parseInt(z,10)}function L(B){if(!B)return[];let F=Array.from(B.querySelectorAll(R)).filter((A)=>{if(P(A)<0)return!1;if(A.disabled)return!1;if(j(A))return!1;if(!H(A))return!1;return!0}),q=F.filter((A)=>{let T=A.getAttribute("tabindex");return T!==null&&parseInt(T,10)>0}).sort((A,T)=>parseInt(A.getAttribute("tabindex"),10)-parseInt(T.getAttribute("tabindex"),10)),D=F.filter((A)=>{let T=A.getAttribute("tabindex");return T===null||parseInt(T,10)===0});return[...q,...D]}function M(B){let z=B||document.body,F=L(z);if(!F.length)return;let q=F.indexOf(document.activeElement);F[(q+1)%F.length].focus()}function X(B){let z=B||document.body,F=L(z);if(!F.length)return;let q=F.indexOf(document.activeElement);F[(q-1+F.length)%F.length].focus()}function V(){let B=document.activeElement;return{restore(){if(B&&typeof B.focus==="function")B.focus()}}}let Q=[];function Z(B){if(Q.push(document.activeElement),B){let z=typeof B==="string"?document.querySelector(B):B;if(z&&typeof z.focus==="function")z.focus()}return Q.length}function G(){if(!Q.length)return null;let B=Q.pop();if(B&&typeof B.focus==="function")B.focus();return B||null}function W(){return Q.length}function O(){Q.length=0}function J(B,z){Z(z);try{let F=B();if(F&&typeof F.then==="function")return F.finally(()=>G());return G(),F}catch(F){throw G(),F}}function $(){return document.activeElement}function Y(B){let z=document.activeElement,F=()=>{let q=document.activeElement;if(q!==z)B(q,z),z=q};return document.addEventListener("focusin",F),function(){document.removeEventListener("focusin",F)}}function U(B,z={}){let{initialFocus:F=null,returnFocus:q=!0,escapeDeactivates:D=!1,allowOutsideClick:A=!1}=z,T=!1,N=!1,w=null;function S(){if(!F)return L(B)[0]||null;if(typeof F==="string")return B.querySelector(F);return F}function I(x){if(!T||N)return;let _=L(B);if(!_.length){x.preventDefault();return}if(x.key==="Tab"){x.preventDefault();let g=_.indexOf(document.activeElement);if(x.shiftKey)_[(g-1+_.length)%_.length].focus();else _[(g+1)%_.length].focus()}else if(x.key==="Escape"&&D)E.deactivate()}function v(x){if(!T||N)return;if(!B.contains(x.target)){let _=L(B);if(_.length)_[0].focus()}}let E={get paused(){return N},activate(){if(T)return;if(T=!0,q)w=V();B.addEventListener("keydown",I),document.addEventListener("focusin",v);let x=S();if(x)x.focus()},deactivate(){if(!T)return;if(T=!1,B.removeEventListener("keydown",I),document.removeEventListener("focusin",v),q&&w)w.restore(),w=null},pause(){N=!0},resume(){N=!1}};return E}return{trap:U,tabOrder:L,next:M,previous:X,stash:V,current:$,onChange:Y,pushFocus:Z,popFocus:G,focusStackDepth:W,clearFocusStack:O,restoreFocus:J}}};var QJ={name:"route",version:"1.1.0",type:"fw.dom.utils",dependencies:["events"],deps:[V$],factory(C){let K=[],R=!1;function j($){let Y=[],U=$.replace(/[.+^${}()|[\]\\]/g,"\\$&");if(U=U.replace(/\*([A-Za-z_]\w*)/g,(B,z)=>{return Y.push({name:z,tail:!0}),"(.*)"}),U=U.replace(/:([A-Za-z_]\w*)/g,(B,z)=>{return Y.push({name:z,tail:!1}),"([^/]+)"}),U!=="/"&&U!=="\\/")U=U.replace(/\/+$/,"")+"\\/?";return{regex:new RegExp("^"+U+"$"),paramNames:Y}}function H($,Y){let U=$.pattern.replace(/\/+$/,""),B=Y.startsWith("/")?Y:"/"+Y;return U+B}function P($){let Y=[$],U=$.parent?L($.parent):null;while(U)Y.unshift(U),U=U.parent?L(U.parent):null;return Y}function L($){for(let Y of K)if(Y.name===$)return Y;return null}function M($){let Y=new Set,U=!0;while(U){U=!1;for(let B of K){if(Y.has(B.name))continue;if(B.parent===$||Y.has(B.parent))Y.add(B.name),U=!0}}for(let B of K)if(Y.has(B.name))B.chain=P(B)}function X($){let Y=($||"").replace(/^#/,""),U=Y.startsWith("/")?Y:"/"+Y,B=U.indexOf("?"),z=B===-1?U:U.slice(0,B),F=B===-1?"":U.slice(B+1),q={};if(F)for(let D of F.split("&")){if(!D)continue;let A=D.indexOf("="),T=decodeURIComponent(A===-1?D:D.slice(0,A)),N=decodeURIComponent(A===-1?"":D.slice(A+1));q[T]=N}return{path:z||"/",query:q}}function V($,Y){let U="#"+($.startsWith("/")?$:"/"+$);if(Y&&typeof Y==="object"){let B=Object.entries(Y).filter(([,z])=>z!=null);if(B.length)U+="?"+B.map(([z,F])=>encodeURIComponent(z)+"="+encodeURIComponent(String(F))).join("&")}return U}let Q=!1,Z=null;function G($){if($&&typeof $.then==="function")return $.then((Y)=>Y!==!1);return $!==!1}function W($){Q=!0;try{if(location.hash!==$)location.hash=$}finally{Q=!1}}async function O(){if(Q)return;Q=!0;let $=location.hash;try{let{path:Y,query:U}=X($),B=[];for(let D of K){let A=D.regex.exec(Y);if(!A)continue;let T={};for(let N=0;N<D.paramNames.length;++N)T[D.paramNames[N].name]=A[N+1];B.push({entry:D,params:T})}if(B.length===0){Z=null;return}let z=B[0],F={path:Y,hash:$,name:z.entry.name};if(Z&&Z.name!==z.entry.name){let D=L(Z.name);if(D&&typeof D.beforeLeave==="function"){if(!await G(D.beforeLeave(Z.params,Z.query,Z.info))){W(Z.hash);return}}}let q=z.entry.chain||[z.entry];for(let D of q)if(typeof D.beforeEnter==="function"){if(!await G(D.beforeEnter(z.params,U,F))){if(Z)W(Z.hash);return}}for(let D of q)try{D.fn(z.params,U,{...F,name:D.name})}catch(A){try{console.error("route: handler threw",A)}catch{}}for(let D=1;D<B.length;++D){let A=B[D];try{A.entry.fn(A.params,U,{...F,name:A.entry.name})}catch(T){try{console.error("route: handler threw",T)}catch{}}}Z={name:z.entry.name,params:z.params,query:U,info:F,hash:$}}finally{Q=!1}}return{on($,Y,U,B={}){if(typeof $!=="string"||!$)throw Error("route.on: name must be a non-empty string");if(typeof Y!=="string")throw Error("route.on: pattern must be a string");if(typeof U!=="function")throw Error("route.on: fn must be a function");let z=(()=>{for(let T=K.length-1;T>=0;--T)if(K[T].name===$)return K.splice(T,1),!0;return!1})(),F=Y;if(B.parent){let T=L(B.parent);if(!T)throw Error(`route.on: parent '${B.parent}' not found (define parent routes before children)`);F=H(T,Y)}let{regex:q,paramNames:D}=j(F),A={name:$,pattern:F,regex:q,paramNames:D,fn:U,parent:B.parent||null,beforeEnter:typeof B.beforeEnter==="function"?B.beforeEnter:null,beforeLeave:typeof B.beforeLeave==="function"?B.beforeLeave:null};if(A.chain=P(A),K.push(A),z)M($)},off($){for(let Y=K.length-1;Y>=0;--Y)if(K[Y].name===$){K.splice(Y,1);break}},go($,Y){let U=V($,Y);if(location.hash!==U)location.hash=U;return O().then(()=>Z!==null&&Z.hash===U)},replace($,Y){let U=V($,Y),B=location.href.split("#")[0];location.replace(B+U)},current(){let{path:$,query:Y}=X(location.hash);return{path:$,query:Y,hash:location.hash}},active(){if(!Z)return null;return{name:Z.name,params:{...Z.params},query:{...Z.query},info:{...Z.info},hash:Z.hash}},refresh(){return O()},start(){if(R)return;R=!0,C.on("fw:route:hashchange",window,"hashchange",O),O()},dispose(){if(R)C.off("fw:route:hashchange"),R=!1;K.length=0,Z=null},get size(){return K.length}}}};var A$={name:"render",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[q$],factory(C){let K=function(q,D,A){let N=D!=null&&Object.prototype.hasOwnProperty.call(D,q.name)?D[q.name]:q.default,w;if(N===void 0)w=A;else if(q.append)w=(A??"")+N;else if(q.prepend)w=N+(A??"");else w=N;if(q.tail!=null)w=(w??"")+q.tail;return w},R=function(q,D){let A={data:q.data?{...q.data}:{}};if(q.text!=null)A.text=q.text;if(q.map&&q.map.length>0)for(let T of q.map)if(T.data)A.data[T.prop]=K(T,D,A.data[T.prop]);else A[T.prop]=K(T,D,A[T.prop]);return A},j=function(q){return q.map(function(D){return{...D,data:D.data?{...D.data}:D.data,map:D.map?D.map.map(function(A){return{...A}}):D.map}})},H=function(q,D,A=!1){let T=j(q);return T.forEach(function(N){if(A!==!1){if(!Object.prototype.hasOwnProperty.call(N,"parent"))N.parent=A}if(N.map&&N.map.length>0)N.map.forEach(function(w){let S=Object.prototype.hasOwnProperty.call(D,w.name)?D[w.name]:w.default;if(S!==void 0)if(w.data)if(w.append)N.data[w.prop]+=S;else if(w.prepend)N.data[w.prop]=S+N.data[w.prop];else N.data[w.prop]=S;else if(w.append)N[w.prop]=N[w.prop]+S;else if(w.prepend)N[w.prop]=S+N[w.prop];else N[w.prop]=S;if(w.tail!=null)if(w.data)N.data[w.prop]=(N.data[w.prop]??"")+w.tail;else N[w.prop]=(N[w.prop]??"")+w.tail})}),T};function P(){let q=typeof globalThis<"u"?globalThis:{};if(q.crypto&&typeof q.crypto.getRandomValues==="function"){let D=new Uint32Array(1);return q.crypto.getRandomValues(D),D[0]}return Math.random()*4294967295>>>0}let L=function(q){let D=j(q),A=new Map,T=new Map;return D.forEach(function(N,w){if(A.set(N.id,Date.now().toString(36)+w.toString()+P().toString(36)),N.id=A.get(N.id),Object.prototype.hasOwnProperty.call(N,"parent")&&A.has(N.parent))N.parent=A.get(N.parent);if(N.content)T.set(N.content,N.id)}),{arr:D,map:A,content:T}},M=function(q,D={},A=!1){return L(H(q,D,A))},X=function(q,D=[],A=!1){let T=[];return D.forEach(function(N){T.push(L(H(q,N,A)))}),T},V=function(q,D,A){let T=D||new Map,N=A||new Map,w=[];return q.forEach(function(S){let I=!1,v=!0;if(S.attach&&T.has(S.attach.elm))if(T.get(S.attach.elm).content.has(S.attach.name))I=T.get(S.attach.elm).content.get(S.attach.name);else v=!1;if(v)if(Array.isArray(S.data)){let E=X(S.template,S.data,I);if(Object.prototype.hasOwnProperty.call(S,"id"))N.set(S.id,[]),E.forEach(function(x){w.push(...x.arr),N.get(S.id).push(x.map)});else E.forEach(function(x){w.push(...x.arr)})}else{let E=M(S.template,S.data,I);if(Object.prototype.hasOwnProperty.call(S,"id")){if(N.set(S.id,E.map),E.content.size>0)T.set(S.id,{content:E.content})}w.push(...E.arr)}else if(Object.prototype.hasOwnProperty.call(S,"id"))N.set(S.id,!1)}),{arr:w,map:N,attach:T}},Q=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Z=C.URL_ATTRS,G=C.CLOBBER_NAMES,W=C.CLOBBER_ATTRS,O=C.SAFE_ATTR_NAME_RE,J=C.EVENT_ATTR_RE,$=(q)=>C.isSafeUrl(q);function Y(q){return String(q).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function U(q){if(q==="text")return"span";if(q.startsWith("svg_"))return q.slice(4);return q}function B(q){let D=new Map,A=new Map,T=[];for(let N of q)D.set(N.id,N);for(let N of q)if(N.parent!=null){if(!A.has(N.parent))A.set(N.parent,[]);A.get(N.parent).push(N)}else T.push(N);return{byId:D,kids:A,roots:T}}function z(q,D,A){let T=U(q.tag),N=Q.has(T),w=[];if(q.attrs)for(let v of q.attrs){if(J.test(v)||!O.test(v))continue;let E=q.data?.[v];if(E===null||E===!1||E===void 0)continue;if(Z.has(v)&&!$(String(E)))continue;if(W.has(v)&&G.has(String(E)))continue;if(E==="")w.push(" "+v);else w.push(" "+v+'="'+Y(E)+'"')}if(A.hydrate&&q.id){let v=A.idPrefix?A.idPrefix+":"+q.id:q.id;w.push(' data-fw-id="'+Y(v)+'"')}let S="<"+T+w.join("");if(N)return S+" />";let I="";if(q.text!=null)I=Y(q.text);else if(q.content!=null){let v=q.content;if(A.iterates&&A.iterates[v]!=null){let E=A.iteratesTemplates?.[v];if(E){let x=A.iterates[v],_=[];for(let g=0;g<x.length;++g){let b=x[g],p=H(E,b),c=B(p);for(let s of c.roots)_.push(z(s,c.kids,A))}I=_.join("")}}else if(A.slots&&A.slots[v]!=null){let E=A.slots[v];I=typeof E==="function"?String(E()):String(E)}}else{let v=D.get(q.id);if(v&&v.length){let E=[];for(let x of v)E.push(z(x,D,A));I=E.join("")}}return S+">"+I+"</"+T+">"}return{elms:H,rewrite:L,parts:M,loop:X,full:V,computeBoundValue:K,applyParsedElm:R,toHTML:function(q,D,A){let T=Array.isArray(q),N=T?q:q.template||[],w=T?null:q.iterates,S={hydrate:!0,idPrefix:"",slots:{},iterates:{},...A,iteratesTemplates:w||{}},I=H(N,D||{}),v=B(I),E=[];for(let x of v.roots)E.push(z(x,v.kids,S));return E.join("")}}}};var f$={name:"parser",version:"1.0.0",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[q$],factory(C){let R={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function j(f){if(f.indexOf("&")===-1)return f;return f.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(m,u)=>{if(u[0]==="#"){let k=u[1]==="x"||u[1]==="X"?parseInt(u.slice(2),16):parseInt(u.slice(1),10);if(Number.isFinite(k)&&k>=0&&k<=1114111)try{return String.fromCodePoint(k)}catch{return m}return m}return R[u.toLowerCase()]??m})}function H(f,m){return{nodeType:Q,tagName:f.toUpperCase(),namespaceURI:m||null,attributes:[],childNodes:[],_attrMap:null,getAttribute(k){if(!this._attrMap){this._attrMap=Object.create(null);for(let y of this.attributes)this._attrMap[y.name]=y.value}return this._attrMap[k]??null}}}function P(f){return{nodeType:Z,nodeValue:f}}function L(f){return{nodeType:G,nodeValue:f}}function M(f,m){let u=f.length,k=m+1,y=k;while(k<u){let a=f.charCodeAt(k);if(a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122||a===45||a===95)k++;else break}if(k===y)return null;let e=f.slice(y,k).toLowerCase(),Q$=[],Z$=!1;while(k<u){while(k<u&&/\s/.test(f[k]))k++;if(k>=u)return null;let a=f[k];if(a===">"){k++;break}if(a==="/"&&f[k+1]===">"){Z$=!0,k+=2;break}let X$=k;while(k<u&&!/[\s=/>]/.test(f[k]))k++;let d=f.slice(X$,k).toLowerCase();if(!d){k++;continue}while(k<u&&/\s/.test(f[k]))k++;let n="";if(f[k]==="="){k++;while(k<u&&/\s/.test(f[k]))k++;let i=f[k];if(i==='"'||i==="'"){let r=++k;while(k<u&&f[k]!==i)k++;if(n=j(f.slice(r,k)),f[k]===i)k++}else{let r=k;while(k<u&&!/[\s>]/.test(f[k]))k++;n=j(f.slice(r,k))}}Q$.push({name:d,value:n})}return{tag:e,attrs:Q$,selfClose:Z$,end:k}}let X="http://www.w3.org/2000/svg",V=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Q=1,Z=3,G=8,W={text:"span"},O=C.BLOCKED_TAGS_RE,J=/^\s*\$\{([^}]+)\}\s*$/,$=/(#\{[^}]+\})/,Y=/^#\{([^}]+)\}$/,U=/^\s*\$([a-zA-Z_]\w*)\s*$/,B=/^\s*([a-zA-Z_]\w*)\$\s*$/,z=C.SAFE_ATTR_NAME_RE,F=C.EVENT_ATTR_RE;function q(f){let m=H("root"),u=[{el:m,ns:null}],k=0,y=f.length;while(k<y){let e=u[u.length-1];if(f[k]==="<"){if(f.startsWith("<!--",k)){let l=f.indexOf("-->",k+4);if(l===-1)break;e.el.childNodes.push(L(f.slice(k+4,l))),k=l+3;continue}if(f.charCodeAt(k+1)===33||f.charCodeAt(k+1)===63){let l=f.indexOf(">",k);if(l===-1)break;k=l+1;continue}if(f[k+1]==="/"){let l=f.indexOf(">",k);if(l===-1)break;let Y$=f.slice(k+2,l).trim().toLowerCase();for(let U$=u.length-1;U$>0;--U$)if(u[U$].el.tagName.toLowerCase()===Y$){u.length=U$;break}k=l+1;continue}let d=M(f,k);if(!d){k++;continue}let n=e.ns,i=d.tag==="svg"?X:n,r=H(d.tag,i);for(let l of d.attrs)r.attributes.push(l);if(e.el.childNodes.push(r),!(V.has(d.tag)||d.selfClose))u.push({el:r,ns:i});k=d.end;continue}let Z$=f.indexOf("<",k),a=Z$===-1?y:Z$,X$=f.slice(k,a);if(X$)e.el.childNodes.push(P(j(X$)));k=a}return m}let D=0,A=new Set;function T(f,m){if(!f)return;for(let u of f){if(typeof u!=="string")continue;let k=u.trim();if(!k)continue;if(A.add(k),m)m.add(k)}}let N=(f)=>{let m="p"+D++;while(f&&f.has(m)||A.has(m))m="p"+D++;return m};function w(f,m){let u=m||new Set,k=f.childNodes;if(!k)return u;for(let y of k){if(y.nodeType!==Q)continue;let e=y.getAttribute?y.getAttribute("id"):null;if(e&&e.trim())u.add(e.trim());w(y,u)}return u}function S(f){let m=f.tagName.toLowerCase();if(f.namespaceURI===X&&m!=="svg")return"svg_"+m;return m}function I(f){if(W[f])return W[f];if(f.startsWith("svg_"))return f.slice(4);return f}function v(f,m,u){let k=f.split($);if(k.length===1)return{val:f,maps:[]};let y=[];k.forEach((Z$,a)=>{let X$=Z$.match(Y);if(X$)y.push({name:X$[1],idx:a})});let e=[];if(y.length===1){let Z$=y[0],a=k.slice(0,Z$.idx).join(""),X$=k.slice(Z$.idx+1).join(""),d={name:Z$.name,prop:m};if(u)d.data=!0;if(a&&!X$)d.append=!0;else if(!a&&X$)d.prepend=!0;else if(a&&X$)d.append=!0,d.tail=X$;return e.push(d),{val:d.prepend?X$:a,maps:e}}let Q$=k.slice(0,y[0].idx).join("");return y.forEach((Z$,a)=>{let X$=a+1<y.length?y[a+1].idx:k.length,d=k.slice(Z$.idx+1,X$).join(""),n={name:Z$.name,prop:m,append:!0};if(u)n.data=!0;if(d)n.tail=d;e.push(n)}),{val:Q$,maps:e}}function E(f,m,u,k){let y=(m||[]).filter((Q$)=>Q$.prop===u&&!!Q$.data===k);if(y.length===0)return f??"";if(y.length===1){let Q$=y[0],Z$=`#{${Q$.name}}`;if(Q$.append)return(f||"")+Z$+(Q$.tail||"");if(Q$.prepend)return Z$+(f||"");return Z$}let e=f||"";return y.forEach((Q$)=>{e+=`#{${Q$.name}}`+(Q$.tail||"")}),e}function x(f){let m=new Map,u=new Map,k=[];return f.forEach((y)=>{m.set(y.id,y),u.set(y.id,[])}),f.forEach((y)=>{if(y.parent&&m.has(y.parent))u.get(y.parent).push(y.id);else k.push(y.id)}),{byId:m,kids:u,roots:k}}function _(f,m,u,k){let y=m.byId.get(f);if(!y)return"";if(y.tag==="text")return E(y.text??"",y.map||[],"text",!1);let e=I(y.tag),Q$=y.map||[],Z$=k||"",a=Z$+" ",X$=a+" ",d=`id="${y.id}"`;if(y.attrs)y.attrs.forEach((i)=>{let r=y.data?.[i]??"";d+=` ${i}="${E(r,Q$,i,!0)}"`});if(V.has(e))return`${Z$}<${e} ${d}>`;let n="";if(y.content){let i=u&&u[y.content];if(i){let r=x(i),J$=r.roots.map((l)=>_(l,r,u,X$)).join(`
27
- `);n=`
28
- ${a}<!-- $${y.content} -->
29
- `+J$+`
30
- ${a}<!-- ${y.content}$ -->
31
- ${Z$}`}else n=`\${${y.content}}`}else if(Object.prototype.hasOwnProperty.call(y,"text")||Q$.some((i)=>i.prop==="text"&&!i.data))n=E(y.text??"",Q$,"text",!1);else{let i=m.kids.get(f)||[];if(i.length>0)if(i.some((J$)=>{let l=m.byId.get(J$);return l&&l.tag==="text"}))n=i.map((J$)=>_(J$,m,u,"")).join("");else n=`
32
- `+i.map((J$)=>_(J$,m,u,a)).join(`
26
+ ${C}
27
+
28
+ (${Z.toString()})( runtime.context );
29
+ `,R=URL.createObjectURL(new Blob([A],{type:"text/javascript"})),S;try{S=H.lockdownUrl?new Worker(R,{type:"module"}):new Worker(R)}catch(v){throw URL.revokeObjectURL(R),v}let x=F();S.addEventListener("message",x);let I=S.terminate.bind(S),E=!1,_=function(){if(E)return!1;return E=!0,S.removeEventListener("message",x),URL.revokeObjectURL(R),Q.terminate(),!0};return S.terminate=function(){_(),I()},S}}function XJ(){let w={status:!1,interactive:!1,complete:!1,queue:{interactive:[],complete:[]}},j=function(U,M){try{U.apply({},M)}catch(z){}},N=function(U){for(let M=0;M<U.length;M++)j(U[M][0],U[M][1])},P=function(){if(w.status==="interactive")w.interactive=!0;else if(w.status==="complete")w.interactive=!0,w.complete=!0},D=function(){if(w.interactive&&w.queue.interactive.length>0)N(w.queue.interactive.splice(0));if(w.complete&&w.queue.complete.length>0)N(w.queue.complete.splice(0))},B=function(){if(w.status!==!1)return;if(w.status=document.readyState,P(),w.status==="complete")return;document.addEventListener("readystatechange",function(){w.status=document.readyState,P(),D()})};return{loaded:function(U,M=[]){if(typeof U!=="function")return;if(B(),w.interactive)j(U,M);else w.queue.interactive.push([U,M])},complete:function(U,M=[]){if(typeof U!=="function")return;if(B(),w.complete)j(U,M);else w.queue.complete.push([U,M])}}}var zJ={name:"errors",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let w={debug:10,info:20,warn:30,error:40,silent:99};function j(D={}){let B=D.prefix||"",O=D.level&&w[D.level]!==void 0?D.level:"info",T=w[O],U=typeof D.sink==="function"?D.sink:null;function M(Y,V,F){if(w[Y]<T)return;let X={level:Y,prefix:B,time:Date.now(),message:typeof V==="string"?V:String(V),context:F&&typeof F==="object"?F:{}};if(U){try{U(X)}catch{}return}let Z=B?`[${B}]`:"",$=F!==void 0?[Z,X.message,X.context]:[Z,X.message],J=typeof console<"u"&&console[Y]||typeof console<"u"&&console.log;if(J)try{J.apply(console,$)}catch{}}return{debug(Y,V){M("debug",Y,V)},info(Y,V){M("info",Y,V)},warn(Y,V){M("warn",Y,V)},error(Y,V){M("error",Y,V)},child(Y){let V=B?`${B}:${Y}`:Y;return j({level:O,prefix:V,sink:U})},set level(Y){if(w[Y]!==void 0)O=Y,T=w[Y]},get level(){return O}}}function N(D={}){let B=typeof D.onError==="function"?D.onError:null,O=!!D.rethrow;return function(U,M){if(typeof U!=="function")throw Error("errors.guard: fn must be a function");let z;try{z=U()}catch(Y){if(B)try{B(Y,M)}catch{}if(O)throw Y;return}if(z&&typeof z.then==="function")return z.catch((Y)=>{if(B)try{B(Y,M)}catch{}if(O)throw Y;return});return z}}function P(D,B,O={}){if(!D||typeof D.text!=="function")throw Error("errors.boundary: ui (UISession) is required");if(typeof B!=="string")throw Error("errors.boundary: blockId must be a string");let T=typeof O.onError==="function"?O.onError:null,U=typeof O.render==="function"?O.render:null,M=typeof O.fallback==="string"?O.fallback:null,z=!!O.clear;function Y(V){if(T)try{T(V)}catch{}try{if(U)U(V,D,B);else if(M!=null){if(D.get(B))D.text(B,M)}if(z)D.clear(B)}catch{}}return function(F){if(typeof F!=="function")throw Error("errors.boundary: fn must be a function");let X;try{X=F()}catch(Z){Y(Z);return}if(X&&typeof X.then==="function")return X.catch((Z)=>{Y(Z);return});return X}}return{logger:j,guard:N,boundary:P}}};var f$={name:"eventBus",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){function w(P,D=!0){if(typeof P!=="string"||P.length===0)throw TypeError("eventBus: topic must be a non-empty string");if(P==="*")throw Error('eventBus: global wildcard "*" is not allowed; use a namespaced pattern like "ns:*"');let B=(P.match(/\*/g)||[]).length;if(B>0){if(!D)throw Error("eventBus: wildcards not allowed in emit/set/clear topic: "+P);if(B>1||!P.endsWith(":*"))throw Error('eventBus: invalid wildcard pattern "'+P+'"; only "prefix:*" is allowed')}}function j(P,D){if(P===D)return!0;if(P.endsWith(":*")){let B=P.slice(0,-1);return D.startsWith(B)&&D.length>B.length}return!1}function N(){let P=new Map,D=new Map,B=new Map;function O($){if(!P.has($))P.set($,new Set);return P.get($)}function T($){if(!D.has($))D.set($,new Set);return D.get($)}function U($,J,Q){if(w($,!0),typeof J!=="function")throw TypeError("eventBus: listener must be a function");let H;if($.endsWith(":*"))T($).add(J),H=()=>M($,J);else O($).add(J),H=()=>M($,J);if(Q&&Q.replay===!0&&B.has($))try{J(B.get($))}catch(G){console.error("eventBus sticky replay error:",G)}return H}function M($,J){if(w($,!0),$.endsWith(":*")){let Q=D.get($);if(Q){if(Q.delete(J),Q.size===0)D.delete($)}}else{let Q=P.get($);if(Q){if(Q.delete(J),Q.size===0)P.delete($)}}}function z($,J){w($,!1);let Q=P.get($);if(Q&&Q.size>0)for(let H of[...Q])try{H(J)}catch(G){console.error("eventBus handler error:",G)}for(let[H,G]of D)if(j(H,$))for(let W of[...G])try{W(J)}catch(q){console.error("eventBus handler error:",q)}}function Y($,J){if(w($,!0),typeof J!=="function")throw TypeError("eventBus: listener must be a function");let Q=U($,J);if(B.has($))try{J(B.get($))}catch(H){console.error("eventBus sticky replay error:",H)}return Q}function V($,J){w($,!1),B.set($,J),z($,J)}function F($){if($===void 0)B.clear();else w($,!1),B.delete($)}function X(){let $=[];function J(G,W){let q=U(G,W);return $.push(q),q}function Q(G,W){let q=Y(G,W);return $.push(q),q}function H(){for(let G of $)try{G()}catch(W){console.error("eventBus scope dispose error:",W)}$.length=0}return{on:J,sticky:Q,dispose:H}}function Z(){let $=new Set;for(let[J,Q]of P)if(Q.size>0)$.add(J);for(let[J,Q]of D)if(Q.size>0)$.add(J);for(let J of B.keys())$.add(J);return[...$]}return{on:U,off:M,emit:z,sticky:Y,set:V,clear:F,scope:X,topics:Z}}return{create:N}}};var g$={name:"signal",version:"1.2.0",type:"fw.io.utils",dependencies:[],factory(){let w=0,j=null,N=null,P="sync",D=null,B=!1,O=0,T=0,U=new Set;function M(){B=!1;let q=D;if(D=null,!q)return;for(let[K,L]of q)for(let C of[...K._subs])try{C(L)}catch{}}function z(){if(P==="raf"&&typeof requestAnimationFrame==="function")requestAnimationFrame(M);else Promise.resolve().then(M)}function Y(q,K){let L=q,C=K&&typeof K.eq==="function"?K.eq:Object.is,A=new Set,R={get(){if(N!==null)N.add(R);return L},peek(){return L},set(S){if(C(L,S))return;if(L=S,w>0){j.set(R,L);return}if(P!=="sync"){if(D===null)D=new Map;if(D.set(R,L),!B)B=!0,z();return}for(let x of[...A])try{x(L)}catch{}},update(S){R.set(S(L))},subscribe(S){if(typeof S!=="function")return()=>{};return A.add(S),()=>A.delete(S)},get size(){return A.size},_isSignal:!0,_subs:A,_graphId:"s"+ ++O};return R}function V(q,K,L){if(!Array.isArray(q)||q.some((I)=>!I||!I._isSignal))throw Error("signal.derived: deps must be an array of signals");if(typeof K!=="function")throw Error("signal.derived: fn must be a function");let C=()=>K(...q.map((I)=>I.peek())),A=Y(C(),L),R=!1,S=q.map((I)=>I.subscribe(()=>{if(R)return;A.set(C())}));function x(){if(R)return;R=!0;for(let I of S)try{I()}catch{}S.length=0}return{get:A.get,peek:A.peek,subscribe:A.subscribe,dispose:x,get size(){return A.size},_isSignal:!0,_subs:A._subs}}function F(q){if(typeof q!=="function")return;if(w===0)j=new Map;w++;try{q()}finally{if(w--,w===0){let K=j;j=null;for(let[L,C]of K)for(let A of[...L._subs])try{A(C)}catch{}}}}function X(q){let K=N;N=null;try{return q()}finally{N=K}}function Z(q){if(typeof q!=="function")throw Error("signal.effect: fn must be a function");let K=new Set,L=!1,C={id:"e"+ ++T,deps:new Set};U.add(C);function A(){for(let S of K)try{S()}catch{}K.clear()}function R(){if(L)return;A();let S=new Set,x=N;N=S;try{q()}catch(I){try{console.error("signal.effect: handler threw",I)}catch{}}finally{N=x}C.deps.clear();for(let I of S){C.deps.add(I._graphId);let E=I.subscribe(R);K.add(E)}}return R(),function(){L=!0,A(),C.deps.clear(),U.delete(C)}}function $(q,K){if(typeof q!=="function")throw Error("signal.resource: fetcher must be a function");let L=!(K&&K.autoStart===!1),C=K&&typeof K.eq==="function"?K.eq:(x,I)=>x.status===I.status&&x.value===I.value&&x.error===I.error,A=Y({status:"idle",value:null,error:null},{eq:C}),R=0;function S(){let x=++R;A.set({status:"pending",value:A.peek().value,error:null}),Promise.resolve().then(()=>q()).then((I)=>{if(x!==R)return;A.set({status:"resolved",value:I,error:null})},(I)=>{if(x!==R)return;A.set({status:"rejected",value:A.peek().value,error:I instanceof Error?I:Error(String(I))})})}if(L)S();return{get:A.get,peek:A.peek,subscribe:A.subscribe,refresh:S,get size(){return A.size},_isSignal:!0,_subs:A._subs}}function J(q,K,L){if(!Array.isArray(q)||q.some((x)=>!x||!x._isSignal))throw Error("signal.derivedAsync: deps must be an array of signals");if(typeof K!=="function")throw Error("signal.derivedAsync: fn must be a function");let C=$(()=>Promise.resolve().then(()=>K(...q.map((x)=>x.peek()))),L),A=[],R=!1;for(let x of q){let I=x.subscribe(()=>{if(R)return;C.refresh()});A.push(I)}function S(){if(R)return;R=!0;for(let x of A)try{x()}catch{}A.length=0}return{get:C.get,peek:C.peek,subscribe:C.subscribe,refresh:C.refresh,dispose:S,get size(){return C.size},_isSignal:!0,_subs:C._subs}}function Q(q,K){if(typeof q!=="function")throw Error("signal.computed: fn must be a function");let L=K&&typeof K.eq==="function"?K.eq:Object.is,C=new Set,A=!0,R,S=[],x=!1;function I(){for(let k of S)try{k()}catch{}S=[]}function E(){if(x)return;if(!A)A=!0;I();let k=new Set,f=N;N=k;let h;try{h=q()}finally{N=f}let u=R;R=h,A=!1;for(let p of k)S.push(p.subscribe(E));if(!L(u,h))for(let p of[...C])try{p(h)}catch{}}function _(){I();let k=new Set,f=N;N=k;try{R=q()}finally{N=f}A=!1;for(let h of k)S.push(h.subscribe(E))}let v={get(){if(N!==null)N.add(v);if(A&&!x)_();return R},peek(){if(A&&!x){let k=N;N=null,_(),N=k}return R},subscribe(k){if(typeof k!=="function")return()=>{};return C.add(k),()=>C.delete(k)},dispose(){if(x)return;x=!0,I()},get size(){return C.size},_isSignal:!0,_subs:C,_graphId:"c"+ ++O};return Object.freeze(v)}function H(q){let K=P;if(P=q,q==="sync"&&D!==null)M();return function(){if(P=K,K==="sync"&&D!==null)M()}}function G(){M()}function W(){return X(()=>{let q=[],K=[],L=[],C=new Set;for(let A of U){K.push(Object.freeze({id:A.id,deps:A.deps.size}));for(let R of A.deps){if(!C.has(R))C.add(R),q.push(Object.freeze({id:R,kind:R[0]==="c"?"computed":"signal"}));L.push(Object.freeze({effect:A.id,signal:R}))}}return Object.freeze({signals:Object.freeze(q),effects:Object.freeze(K),edges:Object.freeze(L)})})}return{create:Y,derived:V,batch:F,untrack:X,effect:Z,resource:$,derivedAsync:J,computed:Q,scheduleNotify:H,flushSync:G,inspectGraph:W}}};var YJ={name:"valid",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let w={is(z){return Object.prototype.toString.call(z).slice(8,-1).toLowerCase()},isNumber(z){return typeof z==="number"&&Number.isFinite(z)},isString(z){return Object.prototype.toString.call(z)==="[object String]"},isBoolean(z){return z===!0||z===!1||Object.prototype.toString.call(z)==="[object Boolean]"},isArray(z){return Object.prototype.toString.call(z)==="[object Array]"},isObject(z){return Object.prototype.toString.call(z)==="[object Object]"},isUint8Array(z){return Object.prototype.toString.call(z)==="[object Uint8Array]"},isUint8ClampedArray(z){return Object.prototype.toString.call(z)==="[object Uint8ClampedArray]"},isFunction(z){return Object.prototype.toString.call(z)==="[object Function]"}},j=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function N(z){if(typeof z!=="string")return!1;if(z.length===0||z.length>254)return!1;let Y=z.lastIndexOf("@");if(Y<1||Y===z.length-1)return!1;let V=z.slice(0,Y),F=z.slice(Y+1);if(V.length>64||F.length>255)return!1;if(V.charCodeAt(0)===46)return!1;if(V.charCodeAt(V.length-1)===46)return!1;if(V.indexOf("..")>=0)return!1;let X=F.lastIndexOf(".");if(X<0)return!1;if(F.length-X-1<2)return!1;return j.test(z)}let P=new RegExp("^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(:[0-9a-fA-F]{1,4}){1,6}|:(:[0-9a-fA-F]{1,4}){1,7}|::|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z.\\-_~]+|::(ffff(:0{1,4})?:)?((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1?[0-9])?[0-9])\\.){3}(25[0-5]|(2[0-4]|1?[0-9])?[0-9]))$"),D={email:N,url:/^https?:\/\/[^\s/$.?#].[^\s]*$/i,uuid:/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i,date:/^\d{4}-\d{2}-\d{2}$/,datetime:/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})$/,ipv4:/^(25[0-5]|2[0-4]\d|[01]?\d\d?)(\.(25[0-5]|2[0-4]\d|[01]?\d\d?)){3}$/,ipv6:P,hex:/^[0-9a-f]+$/i,base64:/^[A-Za-z0-9+/]*={0,2}$/};function B(z,Y){if(z===Y)return!0;if(typeof z!==typeof Y)return!1;if(z===null||Y===null)return z===Y;if(Array.isArray(z)){if(!Array.isArray(Y)||z.length!==Y.length)return!1;for(let V=0;V<z.length;V++)if(!B(z[V],Y[V]))return!1;return!0}if(typeof z==="object"){if(Array.isArray(Y))return!1;let V=Object.keys(z),F=Object.keys(Y);if(V.length!==F.length)return!1;for(let X of V)if(!B(z[X],Y[X]))return!1;return!0}return!1}function O(z){if(z===null)return"null";if(Array.isArray(z))return"array";if(typeof z==="number"){if(!Number.isFinite(z))return"number";return Number.isInteger(z)?"integer":"number"}if(typeof z==="object")return"object";return typeof z}function T(z,Y){let V=O(z);if(Y==="number")return V==="number"||V==="integer";return V===Y}function U(z,Y,V,F){z.push({path:Y||"/",keyword:V,message:F})}function M(z,Y,V,F,X){if(Y===!0)return;if(Y===!1){U(F,V,"false","schema is false");return}if(!Y||typeof Y!=="object")return;if("const"in Y){if(!B(z,Y.const))U(F,V,"const","must equal const")}if(Array.isArray(Y.enum)){let $=!1;for(let J of Y.enum)if(B(z,J)){$=!0;break}if(!$)U(F,V,"enum","must be one of enum values")}if(Y.type!==void 0){let $=Array.isArray(Y.type)?Y.type:[Y.type],J=Y.nullable?$.concat("null"):$,Q=!1;for(let H of J)if(T(z,H)){Q=!0;break}if(!Q){U(F,V,"type","must be "+J.join(" | "));return}}else if(Y.nullable&&z===null)return;let Z=O(z);if(Z==="string"){if(typeof Y.minLength==="number"&&z.length<Y.minLength)U(F,V,"minLength","string shorter than "+Y.minLength);if(typeof Y.maxLength==="number"&&z.length>Y.maxLength)U(F,V,"maxLength","string longer than "+Y.maxLength);if(Y.pattern!==void 0){if(!(Y.pattern instanceof RegExp?Y.pattern:new RegExp(Y.pattern)).test(z))U(F,V,"pattern","does not match pattern")}if(Y.format){let $=X[Y.format];if($ instanceof RegExp){if(!$.test(z))U(F,V,"format","does not match format "+Y.format)}else if(typeof $==="function"){if(!$(z))U(F,V,"format","does not match format "+Y.format)}}}if(Z==="number"||Z==="integer")if(!Number.isFinite(z))U(F,V,"type","number must be finite");else{if(typeof Y.minimum==="number"&&z<Y.minimum)U(F,V,"minimum","must be >= "+Y.minimum);if(typeof Y.maximum==="number"&&z>Y.maximum)U(F,V,"maximum","must be <= "+Y.maximum);if(typeof Y.exclusiveMinimum==="number"&&z<=Y.exclusiveMinimum)U(F,V,"exclusiveMinimum","must be > "+Y.exclusiveMinimum);if(typeof Y.exclusiveMaximum==="number"&&z>=Y.exclusiveMaximum)U(F,V,"exclusiveMaximum","must be < "+Y.exclusiveMaximum);if(typeof Y.multipleOf==="number"&&Y.multipleOf>0){let $=z/Y.multipleOf;if(!Number.isFinite($)||Math.abs($-Math.round($))>0.000000000001)U(F,V,"multipleOf","must be multiple of "+Y.multipleOf)}}if(Z==="array"){if(typeof Y.minItems==="number"&&z.length<Y.minItems)U(F,V,"minItems","array shorter than "+Y.minItems);if(typeof Y.maxItems==="number"&&z.length>Y.maxItems)U(F,V,"maxItems","array longer than "+Y.maxItems);if(Y.uniqueItems){for(let $=0;$<z.length;$++)for(let J=$+1;J<z.length;J++)if(B(z[$],z[J])){U(F,V,"uniqueItems","duplicate items at ["+$+"] and ["+J+"]"),$=z.length;break}}if(Y.items)for(let $=0;$<z.length;$++)M(z[$],Y.items,V+"/"+$,F,X)}if(Z==="object"){if(Array.isArray(Y.required)){for(let H of Y.required)if(!(H in z))U(F,V+"/"+H,"required","missing required property")}let $=Y.properties||null,J=Y.patternProperties?Object.keys(Y.patternProperties).map((H)=>({re:new RegExp(H),schema:Y.patternProperties[H]})):null,Q=Y.additionalProperties;for(let H of Object.keys(z)){let G=V+"/"+H,W=!1;if($&&H in $)M(z[H],$[H],G,F,X),W=!0;if(J){for(let q of J)if(q.re.test(H))M(z[H],q.schema,G,F,X),W=!0}if(!W){if(Q===!1)U(F,G,"additionalProperties","additional property not allowed");else if(Q&&typeof Q==="object")M(z[H],Q,G,F,X)}}}if(Array.isArray(Y.allOf))for(let $ of Y.allOf)M(z,$,V,F,X);if(Array.isArray(Y.anyOf)){let $=!1,J=[];for(let Q of Y.anyOf){let H=[];if(M(z,Q,V,H,X),H.length===0){$=!0;break}J.push(H)}if(!$)U(F,V,"anyOf","did not match any schema in anyOf")}if(Array.isArray(Y.oneOf)){let $=0;for(let J of Y.oneOf){let Q=[];if(M(z,J,V,Q,X),Q.length===0)$++;if($>1)break}if($!==1)U(F,V,"oneOf","must match exactly one schema in oneOf (matched "+$+")")}if(Y.not!==void 0){let $=[];if(M(z,Y.not,V,$,X),$.length===0)U(F,V,"not","must not match schema")}}return w.validate=function(z,Y,V){let F=V&&V.formats?Object.assign({},D,V.formats):D,X=[];return M(z,Y,"",X,F),{valid:X.length===0,errors:X}},w.test=function(z,Y,V){return w.validate(z,Y,V).valid},w.compile=function(z,Y){let V=Y&&Y.formats?Object.assign({},D,Y.formats):D;return{validate(F){let X=[];return M(F,z,"",X,V),{valid:X.length===0,errors:X}},test(F){let X=[];return M(F,z,"",X,V),X.length===0}}},w.formats=D,w}};var GJ={name:"ui8",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let w=function(B,O){let T=new Uint8Array(B.length+O.length);return T.set(B,0),T.set(O,B.length),T};function j(D,B){let O=new Uint8Array(D),T=0;for(let U=0;U<B.length;U++)O.set(B[U],T),T+=B[U].length;return O}return{equal:function(B,O){if(B.length===O.length){for(let T=0;T<B.length;T++)if(B[T]!==O[T])return!1;return!0}else return!1},join:w,concat:function(B){let O=0;for(let T=0;T<B.length;T++)O+=B[T].length;return j(O,B)}}}};var HJ={name:"abort",version:"1.0.0",type:"fw.io.sync",dependencies:[],factory(){function w(O){let T=typeof O==="string"?O:"The operation was aborted";if(typeof DOMException<"u")return new DOMException(T,"AbortError");let U=Error(T);return U.name="AbortError",U}function j(O){if(typeof O!=="number"||isNaN(O)||O<=0)throw Error("abort: ms must be a positive number");let T=new AbortController,U=setTimeout(()=>T.abort(w()),O);function M(z){clearTimeout(U),T.abort(z!==void 0?z:w())}return T.signal.addEventListener("abort",()=>clearTimeout(U),{once:!0}),{signal:T.signal,controller:T,abort:M}}function N(...O){if(O.length===0)throw Error("abort: any() requires at least one signal");for(let V of O)if(!(V instanceof AbortSignal))throw Error("abort: any() arguments must be AbortSignal instances");if(typeof AbortSignal.any==="function")return AbortSignal.any(O);let T=O.find((V)=>V.aborted);if(T){let V=new AbortController;return V.abort(T.reason),V.signal}let U=new AbortController,M=[];function z(V){if(!U.signal.aborted)U.abort(V.target.reason);Y()}function Y(){for(let[V,F]of M)V.removeEventListener("abort",F);M.length=0}for(let V of O){let F=(X)=>z(X);M.push([V,F]),V.addEventListener("abort",F,{once:!0})}return U.signal}function P(O){if(!(O instanceof AbortSignal))throw Error("abort: wait() requires an AbortSignal");if(O.aborted)return Promise.reject(O.reason!==void 0?O.reason:w());return new Promise((T,U)=>{O.addEventListener("abort",()=>{U(O.reason!==void 0?O.reason:w())},{once:!0})})}function D(O,T){if(T===void 0||T===null)return O;if(!(T instanceof AbortSignal))throw Error("abort: race() second argument must be an AbortSignal or null/undefined");if(T.aborted)return Promise.reject(T.reason!==void 0?T.reason:w());return Promise.race([O,P(T)])}function B(O){if(O===void 0||O===null)return;if(O.aborted)throw O.reason!==void 0?O.reason:w()}return{timeout:j,any:N,wait:P,race:D,throwIfAborted:B,error:w}}};var y$={name:"clock",version:"1.0.0",type:"fw.io.timing",dependencies:[],factory(){let w=Date.now();function j(){return Date.now()}function N(){let O=Date.now();if(O<w)return w;return w=O,O}function P(O){return Math.max(0,N()-O)}function D(){return new Date().toISOString()}function B(O){let T=Number(O);if(!Number.isFinite(T))return String(O);let U=Math.abs(T);if(U<1)return T.toFixed(3)+" ms";if(U<1000)return T.toFixed(1)+" ms";if(U<60000)return(T/1000).toFixed(3)+" s";if(U<3600000)return(T/60000).toFixed(2)+" min";return(T/3600000).toFixed(2)+" h"}return{now:j,monotonic:N,since:P,iso:D,format:B}}};var P$={name:"secPolicy",version:"1.0.0",type:"fw.dom.rendering",dependencies:[],factory(){let w=new Set(["href","src","action","formaction","srcset","xlink:href","data","codebase"]),j=/^(javascript|vbscript|file|jar|data:text|data:application)/,N=new Set(["http","https","mailto","tel","ftp"]),P=/^data:image\/(png|jpe?g|gif|webp|svg\+xml|bmp|ico|avif|apng)[;,]/;function D(J,Q,H){if(typeof J!=="string")return!1;let G=J.replace(/[\x00-\x20\x7f]+/g,"").toLowerCase();if(G==="")return!0;if(G[0]==="#"||G[0]==="/"||G[0]==="?"||G[0]===".")return!0;if(j.test(G))return!1;if(G.startsWith("data:")){if(H===!1)return!1;return P.test(G)}let W=G.indexOf(":");if(W===-1)return!0;let q=G.indexOf("/");if(q!==-1&&q<W)return!0;let K=Array.isArray(Q)||Q instanceof Set?Q:N,L=G.slice(0,W);return K instanceof Set?K.has(L):K.includes(L)}let B=new Set(["id","name"]),O=new Set(["cookie","cookies","domain","location","write","writeln","open","close","body","head","title","URL","referrer","documentElement","documentURI","currentScript","designMode","forms","images","links","scripts","styleSheets","all","embeds","plugins","anchors","applets","parent","top","self","frames","frameElement","opener","elements","submit","reset","method","action"]);function T(J,Q){return B.has(J)&&O.has(String(Q))}let U=/^on/i,M=/^[a-zA-Z]/;function z(J){return typeof J==="string"&&U.test(J)}function Y(J){return typeof J==="string"&&M.test(J)&&!U.test(J)}let V=/^(script|object|embed|iframe)$/;function F(J){return typeof J==="string"&&V.test(J)}let X=/expression\(|url\(['"]?(?:javascript|vbscript|data:text|data:application)/,Z=new Set(["behavior","-ms-behavior"]);function $(J,Q){if(typeof J==="string"&&Z.has(J.toLowerCase()))return!1;if(Q==null)return!0;let H=String(Q).replace(/[\x00-\x20\x7f]+/g,"").toLowerCase();return!X.test(H)}return{URL_ATTRS:w,SCHEME_DANGEROUS_RE:j,SAFE_SCHEMES:N,DATA_IMAGE_RE:P,isSafeUrl:D,CLOBBER_ATTRS:B,CLOBBER_NAMES:O,isClobberValue:T,EVENT_ATTR_RE:U,SAFE_ATTR_NAME_RE:M,isEventAttr:z,isSafeAttrName:Y,BLOCKED_TAGS_RE:V,isBlockedTag:F,CSS_DANGEROUS_RE:X,CSS_BLOCKED_PROPS:Z,isSafeCss:$}}};var B$={name:"dom",type:"fw.dom.query",dependencies:["secPolicy"],deps:[P$],factory(w){let j=function(D,B,O){if(!w.isSafeCss(B,O))return;D.style.setProperty(B,O)},N=function(D){if(Array.isArray(D)||D instanceof NodeList)return D;return[D]};return{queryAll(D,B){if((D instanceof HTMLElement||D instanceof SVGElement)&&typeof B==="string")return D.querySelectorAll(B);return[]},query(D,B){if((D instanceof HTMLElement||D instanceof SVGElement)&&typeof B==="string")return D.querySelector(B);return null},attr(D,B,O){let T=N(D);for(let U=0;U<T.length;U++)T[U].setAttribute(B,O)},attrGet(D,B){if(D instanceof Element)return D.getAttribute(B);return null},attrRemove(D,B){let O=N(D);for(let T=0;T<O.length;T++)O[T].removeAttribute(B)},attrHas(D,B){if(D instanceof Element)return D.hasAttribute(B);return!1},data(D,B,O){let T=N(D);for(let U=0;U<T.length;U++)if("dataset"in T[U])T[U].dataset[B]=O},dataGet(D,B){if("dataset"in D)return D.dataset[B]??null;return null},dataRemove(D,B){let O=N(D);for(let T=0;T<O.length;T++)if("dataset"in O[T])delete O[T].dataset[B]},dataHas(D,B){if("dataset"in D)return B in D.dataset;return!1},classAdd(D,B){let O=B.trim().split(/\s+/),T=N(D);for(let U=0;U<T.length;U++)T[U].classList.add(...O)},classRemove(D,B){let O=B.trim().split(/\s+/),T=N(D);for(let U=0;U<T.length;U++)T[U].classList.remove(...O)},classHas(D,B){if(D instanceof Element)return D.classList.contains(B);return!1},classToggle(D,B){let O=N(D);for(let T=0;T<O.length;T++)O[T].classList.toggle(B)},classReplace(D,B,O){let T=N(D);for(let U=0;U<T.length;U++)T[U].classList.replace(B,O)},style(D,B,O){let T=N(D);for(let U=0;U<T.length;U++)j(T[U],B,O)},styleGet(D,B){if(D instanceof Element)return getComputedStyle(D).getPropertyValue(B);return null},styleGetAll(D){if(D instanceof Element)return getComputedStyle(D);return null},styleRemove(D,B){let O=N(D);for(let T=0;T<O.length;T++)O[T].style.removeProperty(B)},hide(D){let B=N(D);for(let O=0;O<B.length;O++)j(B[O],"display","none")},show(D,B){let O=B!==void 0?B:"",T=N(D);for(let U=0;U<T.length;U++)if(O==="")T[U].style.removeProperty("display");else j(T[U],"display",O)},toggleVisibility(D){let B=N(D);for(let O=0;O<B.length;O++)if(B[O].style.display==="none")B[O].style.removeProperty("display");else j(B[O],"display","none")},rect(D){if(D instanceof Element)return D.getBoundingClientRect();return null},scrollPos(D){if(D instanceof Element)return{top:D.scrollTop,left:D.scrollLeft};return null},scrollTo(D,B,O){let T=N(D);for(let U=0;U<T.length;U++){if(B!==void 0)T[U].scrollTop=B;if(O!==void 0)T[U].scrollLeft=O}},reorder(D,B){if(!(D instanceof Element))return;let O=D,T=typeof O.moveBefore==="function"?(M,z)=>O.moveBefore(M,z):(M,z)=>D.insertBefore(M,z),U=D.firstChild;for(let M=0;M<B.length;M++){let z=B[M];if(!(z instanceof Element)||z.parentNode!==D)continue;if(z===U){U=U.nextSibling;continue}T(z,U)}},fragment(D){let B=document.createDocumentFragment();if(D&&typeof D[Symbol.iterator]==="function"){for(let O of D)if(O instanceof Node)B.appendChild(O)}return B},bind(D,B,O,T,U){if(!(B instanceof Element))throw Error("dom.bind: element must be an Element");if(typeof O!=="function"||typeof T!=="function")throw Error("dom.bind: getter and setter must be functions");let M=U&&U.event||"input",z=!!(U&&U.checked),Y=z?()=>{let X=O();B.checked=!!X}:()=>{let X=O();B.value=X==null?"":String(X)};Y();let V=()=>{T(z?B.checked:B.value)};B.addEventListener(M,V);let F=!1;return{refresh:Y,destroy(){if(F)return;F=!0,B.removeEventListener(M,V)}}},focus(D){if(D instanceof Element)D.focus()},blur(D){if(D instanceof Element)D.blur()},text(D,B){let O=N(D);if(Array.isArray(B)){let U=(M)=>{let z=M.createDocumentFragment();for(let Y of B){if(Y==null)continue;let V=String(Y.text==null?"":Y.text);if(Y.lang){let F=M.createElement("span");if(F.setAttribute("lang",String(Y.lang)),Y.dir)F.setAttribute("dir",String(Y.dir));F.textContent=V,z.appendChild(F)}else z.appendChild(M.createTextNode(V))}return z};for(let M=0;M<O.length;M++){let z=O[M];if(!(z instanceof Element))continue;z.textContent="",z.appendChild(U(z.ownerDocument||document))}return}let T=B==null?"":String(B);for(let U=0;U<O.length;U++)if(O[U]instanceof Node)O[U].textContent=T},textGet(D){if(D instanceof Node)return D.textContent;return null},val(D,B){let O=N(D);for(let T=0;T<O.length;T++)if("value"in O[T])O[T].value=B},valGet(D){if(D instanceof Element&&"value"in D)return D.value;return null},checked(D,B){let O=N(D);for(let T=0;T<O.length;T++)if("checked"in O[T])O[T].checked=!!B},checkedGet(D){if(D instanceof Element&&"checked"in D)return D.checked;return null},disabled(D,B){let O=N(D);for(let T=0;T<O.length;T++)if("disabled"in O[T])O[T].disabled=!!B},disabledGet(D){if(D instanceof Element&&"disabled"in D)return D.disabled;return null}}}};var L$={name:"events",type:"fw.dom.query",dependencies:[],factory(){let w={},j={};function N(z,Y,V){return new CustomEvent(z,{detail:Y,bubbles:V.bubbles??!0,cancelable:V.cancelable??!1,composed:V.composed??!1})}let P={};P.on=function(z,Y,V,F,X=!1){if(w[z])P.off(z);Y.addEventListener(V,F,X),w[z]={elm:Y,type:V,fn:F,options:X}},P.off=function(z){let Y=w[z];if(Y)Y.elm.removeEventListener(Y.type,Y.fn,Y.options),delete w[z]},P.has=function(z){return Object.prototype.hasOwnProperty.call(w,z)},P.clear=function(){for(let z of Object.keys(w))P.off(z)},P.emit=function(z,Y,V=null,F={}){z.dispatchEvent(N(Y,V,F))},P.preset=function(z,Y,V,F=null,X={}){j[z]={elm:Y,type:V,detail:F,options:X}},P.dispatch=function(z,Y){let V=j[z];if(V)V.elm.dispatchEvent(N(V.type,Y!==void 0?Y:V.detail,V.options))},P.unset=function(z){delete j[z]},P.delegate=function(z,Y,V,F,X,Z=!1){if(P.has(z))P.off(z);let $=function(J){let Q=J.target;while(Q&&Q!==Y){if(Q.nodeType===1&&Q.matches&&Q.matches(F)){J.currentMatch=Q,X.call(Q,J);return}Q=Q.parentNode}};Y.addEventListener(V,$,Z),w[z]={elm:Y,type:V,fn:$,options:Z}},P.scope=function(z){let Y=z+":",V=new Set;return{on(F,X,Z,$,J){let Q=Y+F;return P.on(Q,X,Z,$,J),V.add(Q),Q},delegate(F,X,Z,$,J,Q){let H=Y+F;return P.delegate(H,X,Z,$,J,Q),V.add(H),H},off(F){let X=Y+F;P.off(X),V.delete(X)},has(F){return P.has(Y+F)},clear(){for(let F of[...V])P.off(F);V.clear()}}};let D=null,B=new WeakMap;function O(z,Y){if(!D)return;let V=B.get(z);if(!V)V=new Set,B.set(z,V);V.add(Y)}let{on:T,delegate:U}=P;function M(z){if(!z)return;let Y=B.get(z);if(Y){for(let F of Y)P.off(F);B.delete(z)}let V=z.childNodes;if(!V)return;for(let F=0;F<V.length;F++)M(V[F])}return P.autoCleanup=function(z){if(D)return P._disableAutoCleanup;let Y=z||(typeof document<"u"?document.body:null);if(!Y)return()=>{};return D=new MutationObserver((V)=>{for(let F of V){let X=F.removedNodes;if(!X)continue;for(let Z=0;Z<X.length;Z++)M(X[Z])}}),D.observe(Y,{childList:!0,subtree:!0}),P.on=function(V,F,X,Z,$){T.call(P,V,F,X,Z,$),O(F,V)},P.delegate=function(V,F,X,Z,$,J){U.call(P,V,F,X,Z,$,J),O(F,V)},P._disableAutoCleanup=function(){if(!D)return;D.disconnect(),D=null,P.on=T,P.delegate=U},P._disableAutoCleanup},P}};var h$={name:"easing",version:"1.0.0",type:"fw.io.calc",dependencies:[],factory(){let w={};return w.linear=function(j,N,P,D){return P*j/D+N},w.easeInQuad=function(j,N,P,D){return P*(j/=D)*j+N},w.easeOutQuad=function(j,N,P,D){return-P*(j/=D)*(j-2)+N},w.easeInOutQuad=function(j,N,P,D){if((j/=D/2)<1)return P/2*j*j+N;return-P/2*(--j*(j-2)-1)+N},w.easeInCubic=function(j,N,P,D){return P*(j/=D)*j*j+N},w.easeOutCubic=function(j,N,P,D){return P*((j=j/D-1)*j*j+1)+N},w.easeInOutCubic=function(j,N,P,D){if((j/=D/2)<1)return P/2*j*j*j+N;return P/2*((j-=2)*j*j+2)+N},w.easeInQuart=function(j,N,P,D){return P*(j/=D)*j*j*j+N},w.easeOutQuart=function(j,N,P,D){return-P*((j=j/D-1)*j*j*j-1)+N},w.easeInOutQuart=function(j,N,P,D){if((j/=D/2)<1)return P/2*j*j*j*j+N;return-P/2*((j-=2)*j*j*j-2)+N},w.easeInQuint=function(j,N,P,D){return P*(j/=D)*j*j*j*j+N},w.easeOutQuint=function(j,N,P,D){return P*((j=j/D-1)*j*j*j*j+1)+N},w.easeInOutQuint=function(j,N,P,D){if((j/=D/2)<1)return P/2*j*j*j*j*j+N;return P/2*((j-=2)*j*j*j*j+2)+N},w.easeInSine=function(j,N,P,D){return-P*Math.cos(j/D*(Math.PI/2))+P+N},w.easeOutSine=function(j,N,P,D){return P*Math.sin(j/D*(Math.PI/2))+N},w.easeInOutSine=function(j,N,P,D){return-P/2*(Math.cos(Math.PI*j/D)-1)+N},w.easeInExpo=function(j,N,P,D){return j===0?N:P*Math.pow(2,10*(j/D-1))+N},w.easeOutExpo=function(j,N,P,D){return j===D?N+P:P*(-Math.pow(2,-10*j/D)+1)+N},w.easeInOutExpo=function(j,N,P,D){if(j===0)return N;if(j===D)return N+P;if((j/=D/2)<1)return P/2*Math.pow(2,10*(j-1))+N;return P/2*(-Math.pow(2,-10*(j-1))+2)+N},w.easeInCirc=function(j,N,P,D){return-P*(Math.sqrt(1-(j/=D)*j)-1)+N},w.easeOutCirc=function(j,N,P,D){return P*Math.sqrt(1-(j=j/D-1)*j)+N},w.easeInOutCirc=function(j,N,P,D){if((j/=D/2)<1)return-P/2*(Math.sqrt(1-j*j)-1)+N;return P/2*(Math.sqrt(1-(j-=2)*j)+1)+N},w.easeInElastic=function(j,N,P,D){let B,O=0,T=P;if(j===0)return N;if((j/=D)===1)return N+P;if(!O)O=D*0.3;if(T<Math.abs(P))T=P,B=O/4;else B=O/(2*Math.PI)*Math.asin(P/T);return-(T*Math.pow(2,10*(j-=1))*Math.sin((j*D-B)*(2*Math.PI)/O))+N},w.easeOutElastic=function(j,N,P,D){let B,O=0,T=P;if(j===0)return N;if((j/=D)===1)return N+P;if(!O)O=D*0.3;if(T<Math.abs(P))T=P,B=O/4;else B=O/(2*Math.PI)*Math.asin(P/T);return T*Math.pow(2,-10*j)*Math.sin((j*D-B)*(2*Math.PI)/O)+P+N},w.easeInOutElastic=function(j,N,P,D){let B,O=0,T=P;if(j===0)return N;if((j/=D/2)===2)return N+P;if(!O)O=D*0.44999999999999996;if(T<Math.abs(P))T=P,B=O/4;else B=O/(2*Math.PI)*Math.asin(P/T);if(j<1)return-0.5*(T*Math.pow(2,10*(j-=1))*Math.sin((j*D-B)*(2*Math.PI)/O))+N;return T*Math.pow(2,-10*(j-=1))*Math.sin((j*D-B)*(2*Math.PI)/O)*0.5+P+N},w.easeInBack=function(j,N,P,D){return P*(j/=D)*j*(2.70158*j-1.70158)+N},w.easeOutBack=function(j,N,P,D){return P*((j=j/D-1)*j*(2.70158*j+1.70158)+1)+N},w.easeInOutBack=function(j,N,P,D){let B=1.70158;if((j/=D/2)<1)return P/2*(j*j*(((B*=1.525)+1)*j-B))+N;return P/2*((j-=2)*j*(((B*=1.525)+1)*j+B)+2)+N},w.easeInBounce=function(j,N,P,D){return P-w.easeOutBounce(D-j,0,P,D)+N},w.easeOutBounce=function(j,N,P,D){if((j/=D)<0.36363636363636365)return P*(7.5625*j*j)+N;else if(j<0.7272727272727273)return P*(7.5625*(j-=0.5454545454545454)*j+0.75)+N;else if(j<0.9090909090909091)return P*(7.5625*(j-=0.8181818181818182)*j+0.9375)+N;else return P*(7.5625*(j-=0.9545454545454546)*j+0.984375)+N},w.easeInOutBounce=function(j,N,P,D){if(j<D/2)return w.easeInBounce(j*2,0,P,D)*0.5+N;return w.easeOutBounce(j*2-D,0,P,D)*0.5+P*0.5+N},w}};var UJ={name:"animate",type:"fw.dom.display",dependencies:["easing"],deps:[h$],factory(w){function j(N,P,D,B,O,T,U,M){if(!M())return;let z=Math.min(P-N,D);if(z>0)T(B(z,O.init,O.end-O.init,D),M);if(z<D)requestAnimationFrame((Y)=>j(N,Y,D,B,O,T,U,M));else if(U!==null)U()}return function(P,D,B,O,T=null,U=()=>!0){if(typeof P!=="number"||!Number.isFinite(P)||P<=0)throw TypeError("animate: duration must be a finite positive number");if(typeof D!=="string"||typeof w[D]!=="function")throw TypeError(`animate: easingName '${D}' does not resolve to a function on the easing map`);if(B===null||typeof B!=="object"||typeof B.init!=="number"||!Number.isFinite(B.init)||typeof B.end!=="number"||!Number.isFinite(B.end))throw TypeError("animate: prop must be { init: number, end: number } with finite values");if(typeof O!=="function")throw TypeError("animate: progress must be a function");if(T!==null&&typeof T!=="function")throw TypeError("animate: onComplete must be a function or null");if(typeof U!=="function")throw TypeError("animate: running must be a function");requestAnimationFrame((M)=>{j(M,M,P,w[D],B,O,T,U)})}}};var VJ={name:"visibility",type:"fw.dom.lifecycle",dependencies:[],worker:!1,factory(){let w=new Set,j=null,N=null,P=null;function D(){if(j)return;j=($)=>O(document.visibilityState,$),N=($)=>O("hidden",$),P=($)=>O(document.visibilityState||"visible",$),document.addEventListener("visibilitychange",j),document.addEventListener("pagehide",N),document.addEventListener("pageshow",P)}function B(){if(!j)return;document.removeEventListener("visibilitychange",j),document.removeEventListener("pagehide",N),document.removeEventListener("pageshow",P),j=N=P=null}function O($,J){for(let Q of w)Q($,J)}function T($){w.add($),D()}function U($){if(w.delete($),w.size===0)B()}function M(){return typeof document<"u"&&"visibilityState"in document}function z(){return document.visibilityState}function Y(){return document.visibilityState==="visible"}function V(){return document.visibilityState==="hidden"}function F($,{immediate:J=!0}={}){if(T($),J)$(document.visibilityState,null);return()=>U($)}function X($){return F((Q,H)=>{if(Q==="visible")$(Q,H)},{immediate:!0})}function Z($){return F((Q,H)=>{if(Q==="hidden")$(Q,H)},{immediate:!1})}return{isSupported:M,state:z,isVisible:Y,isHidden:V,onChange:F,onVisible:X,onHidden:Z}}};var qJ={name:"a11y",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let w=null,j=null;function N(V){if(typeof document>"u"||!document.body)return null;let F=V==="assertive"?j:w;if(F&&document.body.contains(F))return F;if(F&&!document.body.contains(F))if(V==="assertive")j=null;else w=null;let X=document.createElement("div");if(X.setAttribute("aria-live",V),X.setAttribute("aria-atomic","true"),X.setAttribute("role",V==="assertive"?"alert":"status"),X.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0",X.setAttribute("data-fw-a11y",V),document.body.appendChild(X),V==="assertive")j=X;else w=X;return X}function P(V,F){let X=N(F==="assertive"?"assertive":"polite");if(!X)return;X.textContent="",Promise.resolve().then(()=>{X.textContent=String(V)})}function D(){if(w)w.textContent="";if(j)j.textContent=""}function B(V,F){if(!V||!F||typeof F!=="object")return;for(let X of Object.keys(F)){let Z=F[X],$=X.startsWith("aria-")?X:"aria-"+X;if(Z===null||Z===!1||Z===void 0)V.removeAttribute($);else V.setAttribute($,String(Z))}}function O(V){let F=Array.isArray(V)?V:[V],X=[];for(let Z of F){if(Z==null)continue;if(typeof Z==="string")X.push(Z);else if(Z&&Z.id)X.push(Z.id)}return X.join(" ")}function T(V,F){if(!V)return;let X=O(F);if(X)V.setAttribute("aria-labelledby",X);else V.removeAttribute("aria-labelledby")}function U(V,F){if(!V)return;let X=O(F);if(X)V.setAttribute("aria-describedby",X);else V.removeAttribute("aria-describedby")}function M(V,F){if(!V)return;if(F==null||F===!1)V.removeAttribute("role");else V.setAttribute("role",String(F))}function z(V){if(V)V.removeAttribute("role")}function Y(){if(typeof window>"u"||typeof window.matchMedia!=="function")return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{return!1}}return{announce:P,clearAnnouncements:D,aria:B,labelledBy:T,describedBy:U,setRole:M,removeRole:z,prefersReducedMotion:Y}}};var KJ={name:"focus",version:"1.0.0",type:"fw.dom.utils",dependencies:["dom","events"],deps:[B$,L$],factory(w,j){let N=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable]:not([contenteditable="false"])',"[tabindex]"].join(",");function P(H){let G=H;while(G&&G!==document.body){if(G.hasAttribute&&G.hasAttribute("inert"))return!0;G=G.parentElement}return!1}function D(H){if(H.offsetParent!==null)return!0;let G=H.getBoundingClientRect();return G.width>0||G.height>0}function B(H){let G=H.getAttribute("tabindex");if(G===null)return 0;return parseInt(G,10)}function O(H){if(!H)return[];let W=Array.from(H.querySelectorAll(N)).filter((L)=>{if(B(L)<0)return!1;if(L.disabled)return!1;if(P(L))return!1;if(!D(L))return!1;return!0}),q=W.filter((L)=>{let C=L.getAttribute("tabindex");return C!==null&&parseInt(C,10)>0}).sort((L,C)=>parseInt(L.getAttribute("tabindex"),10)-parseInt(C.getAttribute("tabindex"),10)),K=W.filter((L)=>{let C=L.getAttribute("tabindex");return C===null||parseInt(C,10)===0});return[...q,...K]}function T(H){let G=H||document.body,W=O(G);if(!W.length)return;let q=W.indexOf(document.activeElement);W[(q+1)%W.length].focus()}function U(H){let G=H||document.body,W=O(G);if(!W.length)return;let q=W.indexOf(document.activeElement);W[(q-1+W.length)%W.length].focus()}function M(){let H=document.activeElement;return{restore(){if(H&&typeof H.focus==="function")H.focus()}}}let z=[];function Y(H){if(z.push(document.activeElement),H){let G=typeof H==="string"?document.querySelector(H):H;if(G&&typeof G.focus==="function")G.focus()}return z.length}function V(){if(!z.length)return null;let H=z.pop();if(H&&typeof H.focus==="function")H.focus();return H||null}function F(){return z.length}function X(){z.length=0}function Z(H,G){Y(G);try{let W=H();if(W&&typeof W.then==="function")return W.finally(()=>V());return V(),W}catch(W){throw V(),W}}function $(){return document.activeElement}function J(H){let G=document.activeElement,W=()=>{let q=document.activeElement;if(q!==G)H(q,G),G=q};return document.addEventListener("focusin",W),function(){document.removeEventListener("focusin",W)}}function Q(H,G={}){let{initialFocus:W=null,returnFocus:q=!0,escapeDeactivates:K=!1,allowOutsideClick:L=!1}=G,C=!1,A=!1,R=null;function S(){if(!W)return O(H)[0]||null;if(typeof W==="string")return H.querySelector(W);return W}function x(_){if(!C||A)return;let v=O(H);if(!v.length){_.preventDefault();return}if(_.key==="Tab"){_.preventDefault();let k=v.indexOf(document.activeElement);if(_.shiftKey)v[(k-1+v.length)%v.length].focus();else v[(k+1)%v.length].focus()}else if(_.key==="Escape"&&K)E.deactivate()}function I(_){if(!C||A)return;if(!H.contains(_.target)){let v=O(H);if(v.length)v[0].focus()}}let E={get paused(){return A},activate(){if(C)return;if(C=!0,q)R=M();H.addEventListener("keydown",x),document.addEventListener("focusin",I);let _=S();if(_)_.focus()},deactivate(){if(!C)return;if(C=!1,H.removeEventListener("keydown",x),document.removeEventListener("focusin",I),q&&R)R.restore(),R=null},pause(){A=!0},resume(){A=!1}};return E}return{trap:Q,tabOrder:O,next:T,previous:U,stash:M,current:$,onChange:J,pushFocus:Y,popFocus:V,focusStackDepth:F,clearFocusStack:X,restoreFocus:Z}}};var FJ={name:"route",version:"1.1.0",type:"fw.dom.utils",dependencies:["events"],deps:[L$],factory(w){let j=[],N=!1;function P(Q){let H=[],G=Q.replace(/[.+^${}()|[\]\\]/g,"\\$&");if(G=G.replace(/\*([A-Za-z_]\w*)/g,(W,q)=>{return H.push({name:q,tail:!0}),"(.*)"}),G=G.replace(/:([A-Za-z_]\w*)/g,(W,q)=>{return H.push({name:q,tail:!1}),"([^/]+)"}),G!=="/"&&G!=="\\/")G=G.replace(/\/+$/,"")+"\\/?";return{regex:new RegExp("^"+G+"$"),paramNames:H}}function D(Q,H){let G=Q.pattern.replace(/\/+$/,""),W=H.startsWith("/")?H:"/"+H;return G+W}function B(Q){let H=[Q],G=Q.parent?O(Q.parent):null;while(G)H.unshift(G),G=G.parent?O(G.parent):null;return H}function O(Q){for(let H of j)if(H.name===Q)return H;return null}function T(Q){let H=new Set,G=!0;while(G){G=!1;for(let W of j){if(H.has(W.name))continue;if(W.parent===Q||H.has(W.parent))H.add(W.name),G=!0}}for(let W of j)if(H.has(W.name))W.chain=B(W)}function U(Q){let H=(Q||"").replace(/^#/,""),G=H.startsWith("/")?H:"/"+H,W=G.indexOf("?"),q=W===-1?G:G.slice(0,W),K=W===-1?"":G.slice(W+1),L={};if(K)for(let C of K.split("&")){if(!C)continue;let A=C.indexOf("="),R=decodeURIComponent(A===-1?C:C.slice(0,A)),S=decodeURIComponent(A===-1?"":C.slice(A+1));L[R]=S}return{path:q||"/",query:L}}function M(Q,H){let G="#"+(Q.startsWith("/")?Q:"/"+Q);if(H&&typeof H==="object"){let W=Object.entries(H).filter(([,q])=>q!=null);if(W.length)G+="?"+W.map(([q,K])=>encodeURIComponent(q)+"="+encodeURIComponent(String(K))).join("&")}return G}let z=!1,Y=null,V=null;function F(Q){if(Q&&typeof Q.then==="function")return Q.then((H)=>H!==!1);return Q!==!1}function X(Q){z=!0;try{if(location.hash!==Q)location.hash=Q}finally{z=!1}}function Z(){if(location.hash===V)return;$()}async function $(){if(z)return;z=!0;let Q=location.hash;V=Q;try{let{path:H,query:G}=U(Q),W=[];for(let C of j){let A=C.regex.exec(H);if(!A)continue;let R={};for(let S=0;S<C.paramNames.length;++S)R[C.paramNames[S].name]=A[S+1];W.push({entry:C,params:R})}if(W.length===0){Y=null;return}let q=W[0],K={path:H,hash:Q,name:q.entry.name};if(Y&&Y.name!==q.entry.name){let C=O(Y.name);if(C&&typeof C.beforeLeave==="function"){if(!await F(C.beforeLeave(Y.params,Y.query,Y.info))){X(Y.hash);return}}}let L=q.entry.chain||[q.entry];for(let C of L)if(typeof C.beforeEnter==="function"){if(!await F(C.beforeEnter(q.params,G,K))){if(Y)X(Y.hash);return}}for(let C of L)try{C.fn(q.params,G,{...K,name:C.name})}catch(A){try{console.error("route: handler threw",A)}catch{}}for(let C=1;C<W.length;++C){let A=W[C];try{A.entry.fn(A.params,G,{...K,name:A.entry.name})}catch(R){try{console.error("route: handler threw",R)}catch{}}}Y={name:q.entry.name,params:q.params,query:G,info:K,hash:Q}}finally{z=!1}}return{on(Q,H,G,W={}){if(typeof Q!=="string"||!Q)throw Error("route.on: name must be a non-empty string");if(typeof H!=="string")throw Error("route.on: pattern must be a string");if(typeof G!=="function")throw Error("route.on: fn must be a function");let q=(()=>{for(let R=j.length-1;R>=0;--R)if(j[R].name===Q)return j.splice(R,1),!0;return!1})(),K=H;if(W.parent){let R=O(W.parent);if(!R)throw Error(`route.on: parent '${W.parent}' not found (define parent routes before children)`);K=D(R,H)}let{regex:L,paramNames:C}=P(K),A={name:Q,pattern:K,regex:L,paramNames:C,fn:G,parent:W.parent||null,beforeEnter:typeof W.beforeEnter==="function"?W.beforeEnter:null,beforeLeave:typeof W.beforeLeave==="function"?W.beforeLeave:null};if(A.chain=B(A),j.push(A),q)T(Q)},off(Q){for(let H=j.length-1;H>=0;--H)if(j[H].name===Q){j.splice(H,1);break}},go(Q,H){let G=M(Q,H);if(location.hash!==G)location.hash=G;return $().then(()=>Y!==null&&Y.hash===G)},replace(Q,H){let G=M(Q,H),W=location.href.split("#")[0];location.replace(W+G)},current(){let{path:Q,query:H}=U(location.hash);return{path:Q,query:H,hash:location.hash}},active(){if(!Y)return null;return{name:Y.name,params:{...Y.params},query:{...Y.query},info:{...Y.info},hash:Y.hash}},refresh(){return $()},start(){if(N)return;N=!0,w.on("fw:route:hashchange",window,"hashchange",Z),$()},dispose(){if(N)w.off("fw:route:hashchange"),N=!1;j.length=0,Y=null,V=null},get size(){return j.length}}}};var T$={name:"render",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[P$],factory(w){let j=function(q,K,L){let A=K!=null&&Object.prototype.hasOwnProperty.call(K,q.name)?K[q.name]:q.default,R;if(A===void 0)R=L;else if(q.append)R=(L??"")+A;else if(q.prepend)R=A+(L??"");else R=A;if(q.tail!=null)R=(R??"")+q.tail;return R},N=function(q,K){let L={data:q.data?{...q.data}:{}};if(q.text!=null)L.text=q.text;if(q.map&&q.map.length>0)for(let C of q.map)if(C.data)L.data[C.prop]=j(C,K,L.data[C.prop]);else L[C.prop]=j(C,K,L[C.prop]);return L},P=function(q){return q.map(function(K){return{...K,data:K.data?{...K.data}:K.data,map:K.map?K.map.map(function(L){return{...L}}):K.map}})},D=function(q,K,L=!1){let C=P(q);return C.forEach(function(A){if(L!==!1){if(!Object.prototype.hasOwnProperty.call(A,"parent"))A.parent=L}if(A.map&&A.map.length>0)A.map.forEach(function(R){let S=Object.prototype.hasOwnProperty.call(K,R.name)?K[R.name]:R.default;if(S!==void 0)if(R.data)if(R.append)A.data[R.prop]+=S;else if(R.prepend)A.data[R.prop]=S+A.data[R.prop];else A.data[R.prop]=S;else if(R.append)A[R.prop]=A[R.prop]+S;else if(R.prepend)A[R.prop]=S+A[R.prop];else A[R.prop]=S;if(R.tail!=null)if(R.data)A.data[R.prop]=(A.data[R.prop]??"")+R.tail;else A[R.prop]=(A[R.prop]??"")+R.tail})}),C};function B(){let q=typeof globalThis<"u"?globalThis:{};if(q.crypto&&typeof q.crypto.getRandomValues==="function"){let K=new Uint32Array(1);return q.crypto.getRandomValues(K),K[0]}return Math.random()*4294967295>>>0}let O=function(q){let K=P(q),L=new Map,C=new Map;return K.forEach(function(A,R){if(L.set(A.id,Date.now().toString(36)+R.toString()+B().toString(36)),A.id=L.get(A.id),Object.prototype.hasOwnProperty.call(A,"parent")&&L.has(A.parent))A.parent=L.get(A.parent);if(A.content)C.set(A.content,A.id)}),{arr:K,map:L,content:C}},T=function(q,K={},L=!1){return O(D(q,K,L))},U=function(q,K=[],L=!1){let C=[];return K.forEach(function(A){C.push(O(D(q,A,L)))}),C},M=function(q,K,L){let C=K||new Map,A=L||new Map,R=[];return q.forEach(function(S){let x=!1,I=!0;if(S.attach&&C.has(S.attach.elm))if(C.get(S.attach.elm).content.has(S.attach.name))x=C.get(S.attach.elm).content.get(S.attach.name);else I=!1;if(I)if(Array.isArray(S.data)){let E=U(S.template,S.data,x);if(Object.prototype.hasOwnProperty.call(S,"id"))A.set(S.id,[]),E.forEach(function(_){R.push(..._.arr),A.get(S.id).push(_.map)});else E.forEach(function(_){R.push(..._.arr)})}else{let E=T(S.template,S.data,x);if(Object.prototype.hasOwnProperty.call(S,"id")){if(A.set(S.id,E.map),E.content.size>0)C.set(S.id,{content:E.content})}R.push(...E.arr)}else if(Object.prototype.hasOwnProperty.call(S,"id"))A.set(S.id,!1)}),{arr:R,map:A,attach:C}},z=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Y=w.URL_ATTRS,V=w.CLOBBER_NAMES,F=w.CLOBBER_ATTRS,X=w.SAFE_ATTR_NAME_RE,Z=w.EVENT_ATTR_RE,$=(q)=>w.isSafeUrl(q);function J(q){return String(q).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function Q(q){if(q==="text")return"span";if(q.startsWith("svg_"))return q.slice(4);return q}function H(q){let K=new Map,L=new Map,C=[];for(let A of q)K.set(A.id,A);for(let A of q)if(A.parent!=null){if(!L.has(A.parent))L.set(A.parent,[]);L.get(A.parent).push(A)}else C.push(A);return{byId:K,kids:L,roots:C}}function G(q,K,L,C){let A=Q(q.tag),R=z.has(A),S=[];if(q.attrs)for(let E of q.attrs){if(Z.test(E)||!X.test(E))continue;let _=q.data?.[E];if(_===null||_===!1||_===void 0)continue;if(Y.has(E)&&!$(String(_)))continue;if(F.has(E)&&V.has(String(_)))continue;if(_==="")S.push(" "+E);else S.push(" "+E+'="'+J(_)+'"')}if(L.hydrate&&q.id){let E=L.idPrefix?L.idPrefix+":"+q.id:q.id;S.push(' data-fw-id="'+J(E)+'"')}if(L.hydrate&&C!==void 0)S.push(' data-fw-row="'+C+'"');let x="<"+A+S.join("");if(R)return x+" />";let I="";if(q.text!=null)I=J(q.text);else if(q.content!=null){let E=q.content;if(L.iterates&&L.iterates[E]!=null){let _=L.iteratesTemplates?.[E];if(_){let v=L.iterates[E],k=[];for(let f=0;f<v.length;++f){let h=v[f],u=D(_,h),p=H(u);for(let y of p.roots)k.push(G(y,p.kids,L,f))}I=k.join("")}}else if(L.slots&&L.slots[E]!=null){let _=L.slots[E];I=typeof _==="function"?String(_()):String(_)}}else{let E=K.get(q.id);if(E&&E.length){let _=[];for(let v of E)_.push(G(v,K,L));I=_.join("")}}return x+">"+I+"</"+A+">"}return{elms:D,rewrite:O,parts:T,loop:U,full:M,computeBoundValue:j,applyParsedElm:N,toHTML:function(q,K,L){let C=Array.isArray(q),A=C?q:q.template||[],R=C?null:q.iterates,S={hydrate:!0,idPrefix:"",slots:{},iterates:{},...L,iteratesTemplates:R||{}},x=D(A,K||{}),I=H(x),E=[];for(let _ of I.roots)E.push(G(_,I.kids,S));return E.join("")}}}};var b$={name:"parser",version:"1.0.0",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[P$],factory(w){let N={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function P(b){if(b.indexOf("&")===-1)return b;return b.replace(/&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g,(i,d)=>{if(d[0]==="#"){let g=d[1]==="x"||d[1]==="X"?parseInt(d.slice(2),16):parseInt(d.slice(1),10);if(Number.isFinite(g)&&g>=0&&g<=1114111)try{return String.fromCodePoint(g)}catch{return i}return i}return N[d.toLowerCase()]??i})}function D(b,i){return{nodeType:V,tagName:b.toUpperCase(),namespaceURI:i||null,attributes:[],childNodes:[],_attrMap:null,getAttribute(g){if(!this._attrMap){this._attrMap=Object.create(null);for(let m of this.attributes)this._attrMap[m.name]=m.value}return this._attrMap[g]??null}}}function B(b){return{nodeType:F,nodeValue:b}}let O=new Set(["a","abbr","b","bdi","bdo","br","cite","code","data","dfn","em","i","img","kbd","label","mark","q","s","samp","small","span","strong","sub","sup","time","u","var","wbr","button","input","select","textarea","output","svg"]);function T(b){return!!b&&b.nodeType===V&&O.has(String(b.tagName).toLowerCase())}function U(b){return{nodeType:X,nodeValue:b}}function M(b,i){let d=b.length,g=i+1,m=g;while(g<d){let l=b.charCodeAt(g);if(l>=48&&l<=57||l>=65&&l<=90||l>=97&&l<=122||l===45||l===95)g++;else break}if(g===m)return null;let n=b.slice(m,g).toLowerCase(),s=[],t=!1;while(g<d){while(g<d&&/\s/.test(b[g]))g++;if(g>=d)return null;let l=b[g];if(l===">"){g++;break}if(l==="/"&&b[g+1]===">"){t=!0,g+=2;break}let J$=g;while(g<d&&!/[\s=/>]/.test(b[g]))g++;let $$=b.slice(J$,g).toLowerCase();if(!$$){g++;continue}while(g<d&&/\s/.test(b[g]))g++;let Q$="";if(b[g]==="="){g++;while(g<d&&/\s/.test(b[g]))g++;let G$=b[g];if(G$==='"'||G$==="'"){let V$=++g;while(g<d&&b[g]!==G$)g++;if(Q$=P(b.slice(V$,g)),b[g]===G$)g++}else{let V$=g;while(g<d&&!/[\s>]/.test(b[g]))g++;Q$=P(b.slice(V$,g))}}s.push({name:$$,value:Q$})}return{tag:n,attrs:s,selfClose:t,end:g}}let z="http://www.w3.org/2000/svg",Y=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),V=1,F=3,X=8,Z={text:"span"},$=w.BLOCKED_TAGS_RE,J=/^\s*\$\{([^}]+)\}\s*$/,Q=/(#\{[^}]+\})/,H=/^#\{([^}]+)\}$/,G=/^\s*\$([a-zA-Z_]\w*)\s*$/,W=/^\s*([a-zA-Z_]\w*)\$\s*$/,q=w.SAFE_ATTR_NAME_RE,K=w.EVENT_ATTR_RE;function L(b){let i=D("root"),d=[{el:i,ns:null}],g=0,m=b.length;while(g<m){let n=d[d.length-1];if(b[g]==="<"){if(b.startsWith("<!--",g)){let z$=b.indexOf("-->",g+4);if(z$===-1)break;n.el.childNodes.push(U(b.slice(g+4,z$))),g=z$+3;continue}if(b.charCodeAt(g+1)===33||b.charCodeAt(g+1)===63){let z$=b.indexOf(">",g);if(z$===-1)break;g=z$+1;continue}if(b[g+1]==="/"){let z$=b.indexOf(">",g);if(z$===-1)break;let D$=b.slice(g+2,z$).trim().toLowerCase();for(let R$=d.length-1;R$>0;--R$)if(d[R$].el.tagName.toLowerCase()===D$){d.length=R$;break}g=z$+1;continue}let $$=M(b,g);if(!$$){g++;continue}let Q$=n.ns,G$=$$.tag==="svg"?z:Q$,V$=D($$.tag,G$);for(let z$ of $$.attrs)V$.attributes.push(z$);if(n.el.childNodes.push(V$),!(Y.has($$.tag)||$$.selfClose))d.push({el:V$,ns:G$});g=$$.end;continue}let t=b.indexOf("<",g),l=t===-1?m:t,J$=b.slice(g,l);if(J$)n.el.childNodes.push(B(P(J$)));g=l}return i}let C=0,A=null,R=new Set,S=new Set;function x(b,i){if(!b)return;for(let d of b){if(typeof d!=="string")continue;let g=d.trim();if(!g)continue;if(S.add(g),i)i.add(g)}}let I=(b)=>{let i="p"+C++;while(b&&b.has(i)||S.has(i))i="p"+C++;if(A)A.push(i);return i};function E(b,i){let d=i||new Set,g=b.childNodes;if(!g)return d;for(let m of g){if(m.nodeType!==V)continue;let n=m.getAttribute?m.getAttribute("id"):null;if(n&&n.trim())d.add(n.trim());E(m,d)}return d}function _(b){let i=b.tagName.toLowerCase();if(b.namespaceURI===z&&i!=="svg")return"svg_"+i;return i}function v(b){if(Z[b])return Z[b];if(b.startsWith("svg_"))return b.slice(4);return b}function k(b,i,d){let g=b.split(Q);if(g.length===1)return{val:b,maps:[]};let m=[];g.forEach((t,l)=>{let J$=t.match(H);if(J$)m.push({name:J$[1],idx:l})});let n=[];if(m.length===1){let t=m[0],l=g.slice(0,t.idx).join(""),J$=g.slice(t.idx+1).join(""),$$={name:t.name,prop:i};if(d)$$.data=!0;if(l&&!J$)$$.append=!0;else if(!l&&J$)$$.prepend=!0;else if(l&&J$)$$.append=!0,$$.tail=J$;return n.push($$),{val:$$.prepend?J$:l,maps:n}}let s=g.slice(0,m[0].idx).join("");return m.forEach((t,l)=>{let J$=l+1<m.length?m[l+1].idx:g.length,$$=g.slice(t.idx+1,J$).join(""),Q$={name:t.name,prop:i,append:!0};if(d)Q$.data=!0;if($$)Q$.tail=$$;n.push(Q$)}),{val:s,maps:n}}function f(b,i,d,g){let m=(i||[]).filter((s)=>s.prop===d&&!!s.data===g);if(m.length===0)return b??"";if(m.length===1){let s=m[0],t=`#{${s.name}}`;if(s.append)return(b||"")+t+(s.tail||"");if(s.prepend)return t+(b||"");return t}let n=b||"";return m.forEach((s)=>{n+=`#{${s.name}}`+(s.tail||"")}),n}function h(b){let i=new Map,d=new Map,g=[];return b.forEach((m)=>{i.set(m.id,m),d.set(m.id,[])}),b.forEach((m)=>{if(m.parent&&i.has(m.parent))d.get(m.parent).push(m.id);else g.push(m.id)}),{byId:i,kids:d,roots:g}}function u(b,i,d,g){let m=i.byId.get(b);if(!m)return"";if(m.tag==="text")return f(m.text??"",m.map||[],"text",!1);let n=v(m.tag),s=m.map||[],t=g||"",l=t+" ",J$=l+" ",$$=`id="${m.id}"`;if(m.attrs)m.attrs.forEach((G$)=>{let V$=m.data?.[G$]??"";$$+=` ${G$}="${f(V$,s,G$,!0)}"`});if(Y.has(n))return`${t}<${n} ${$$}>`;let Q$="";if(m.content){let G$=d&&d[m.content];if(G$){let V$=h(G$),F$=V$.roots.map((z$)=>u(z$,V$,d,J$)).join(`
30
+ `);Q$=`
31
+ ${l}<!-- $${m.content} -->
32
+ `+F$+`
33
+ ${l}<!-- ${m.content}$ -->
34
+ ${t}`}else Q$=`\${${m.content}}`}else if(Object.prototype.hasOwnProperty.call(m,"text")||s.some((G$)=>G$.prop==="text"&&!G$.data))Q$=f(m.text??"",s,"text",!1);else{let G$=i.kids.get(b)||[];if(G$.length>0)if(G$.some((F$)=>{let z$=i.byId.get(F$);return z$&&z$.tag==="text"}))Q$=G$.map((F$)=>u(F$,i,d,"")).join("");else Q$=`
35
+ `+G$.map((F$)=>u(F$,i,d,l)).join(`
33
36
  `)+`
34
- `+Z$}return`${Z$}<${e} ${d}>${n}</${e}>`}let g=64,b=new Map,p={hits:0,misses:0,evictions:0};function c(f){if(g===0)return;let m=b.get(f);if(m!==void 0)b.delete(f),b.set(f,m),p.hits++;else p.misses++;return m}function s(f,m){if(g===0)return;if(b.size>=g){let u=b.keys().next().value;b.delete(u),p.evictions++}b.set(f,m)}let h=function(f,m){let u=typeof DOMParser<"u"?new DOMParser().parseFromString("<html><body>"+f+"</body></html>","text/html").body:q(f),k=w(u);T(m,k);for(let a of k)A.add(a);let y=[],e={};function Q$(a,X$,d){let n=a.tagName.toLowerCase();if(O.test(n))return;let i=S(a),r=a.getAttribute("id"),J$=r&&r.trim()?r.trim():N(k),l={id:J$,tag:i};if(X$!==null&&X$!==void 0)l.parent=X$;let Y$=[],U$=[],K$={};for(let H$ of a.attributes){if(H$.name==="id")continue;if(!z.test(H$.name))continue;if(F.test(H$.name))continue;let{val:z$,maps:W$}=v(H$.value,H$.name,!0);U$.push(H$.name),K$[H$.name]=z$,Y$.push(...W$)}if(U$.length>0)l.attrs=U$,l.data={...K$};let S$=Array.from(a.childNodes),P$=null,M$=!1,R$=[],D$=[];for(let H$ of S$)if(H$.nodeType===G){let z$=H$.nodeValue.match(U),W$=H$.nodeValue.match(B);if(z$)P$=z$[1],M$=!0;else if(W$&&M$)M$=!1}else if(M$){if(H$.nodeType===Q)R$.push(H$)}else D$.push(H$);if(P$){l.content=P$;let H$=[];if(R$.forEach((z$)=>Q$(z$,null,H$)),e[P$]=H$,Y$.length>0)l.map=Y$;d.push(l)}else if(D$.filter((z$)=>z$.nodeType===Q).length===0){let z$=D$.filter((W$)=>W$.nodeType===Z).map((W$)=>W$.nodeValue).join("").trim();if(z$){let W$=z$.match(J);if(W$)l.content=W$[1];else{let{val:j$,maps:L$}=v(z$,"text",!1);l.text=j$,Y$.push(...L$)}}if(Y$.length>0)l.map=Y$;d.push(l)}else{if(Y$.length>0)l.map=Y$;d.push(l),D$.forEach((z$)=>{if(z$.nodeType===Q)Q$(z$,J$,d);else if(z$.nodeType===Z){let W$=z$.nodeValue.trim();if(!W$)return;let j$=W$.match(J);if(j$)d.push({id:N(k),tag:"span",parent:J$,content:j$[1]});else{let{val:L$,maps:G$}=v(W$,"text",!1),O$={id:N(k),tag:"text",parent:J$,text:L$};if(G$.length>0)O$.map=G$;d.push(O$)}}})}}Array.from(u.childNodes).forEach((a)=>{if(a.nodeType===Q)Q$(a,null,y)});let Z$={template:y};if(Object.keys(e).length>0)Z$.iterates=e;return Z$};return{fromHTML:function(f,m){let u=m?m.reserveIds:void 0;if(typeof f!=="string")return h(f,u);if(u!==void 0&&u!==null)return h(f,u);let k=c(f);if(k!==void 0)return k;let y=h(f);return s(f,y),y},toHTML:function(f){let m=Array.isArray(f),u=m?f:f.template||[],k=m?{}:f.iterates||{},y=x(u);return y.roots.map((e)=>_(e,y,k,"")).join(`
35
- `)},cache:{clear(){b.clear(),p.hits=0,p.misses=0,p.evictions=0},setMax(f){g=Math.max(0,f|0);while(b.size>g){let m=b.keys().next().value;b.delete(m),p.evictions++}},getMax(){return g},size(){return b.size},stats(){return{...p,size:b.size,max:g}}}}}};var N$={name:"template",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[q$],factory(C){let K={},R={},j=new WeakMap,H=typeof document<"u"?document.querySelector('meta[name="csp-nonce"]')?.getAttribute("content")??"":"",P=C.SAFE_ATTR_NAME_RE,L=C.EVENT_ATTR_RE,M=C.URL_ATTRS,X=C.CLOBBER_ATTRS,V=C.CLOBBER_NAMES,Q=(z)=>C.isSafeUrl(z);function Z(z){return z instanceof SVGSVGElement&&z.children.length===1?z.children[0]:z}function G(z,F){if(F.attrs)for(let q of F.attrs){if(L.test(q)||!P.test(q))continue;let D=F.data?.[q];if(D===null||D===!1||D===void 0)continue;if(M.has(q)&&!Q(String(D))){z.removeAttribute(q);continue}if(X.has(q)&&V.has(String(D))){z.removeAttribute(q);continue}z.setAttribute(q,D)}if(F.text!=null)z.textContent=F.text;return z.setAttribute("id",F.id),z}function W(z,F){let q=K[z].tpl,D=F.tag==="text"?"span":F.tag;if(!Object.prototype.hasOwnProperty.call(R[q],D))return null;else return G(R[q][D].cloneNode(),F)}function O(z,F,q){if(q)z.insertBefore(F,z.firstChild);else z.appendChild(F)}function J(z,F){let q=K[z].map,D=[],A=[...F];while(A.length>0){let T=A.pop();if(q[T]){if(A.push(...q[T].children),q[T].childCtxs)for(let N of q[T].childCtxs)B.clearContext(N);D.push(T),delete q[T]}}return D}let $="http://www.w3.org/2000/svg",Y=["div","span","nav","header","footer","section","article","aside","main",{name:"a",attrs:{href:""}},"button","input","form","label","select","option","textarea","fieldset","legend","table","tr","td","th","thead","tbody","tfoot","caption","ul","li","ol","dl","dt","dd","h1","h2","h3","h4","h5","h6","br","hr","p","i","b","em","strong","small","pre","code","kbd","samp","var","mark","abbr","cite","q","blockquote","s","u","sub","sup","time","details","summary","figure","figcaption","dialog","progress","meter","video","audio","picture",{name:"img",attrs:{src:"",alt:""}},{name:"cvs",tag:"canvas"},{name:"svg",svg:!0},{name:"svg_use",svg:!0,child:"use"}];function U(z=Y){return z.map((F)=>{let q=document.createElement("template"),D=typeof F==="object",A=D?F.name:F,T=D&&F.tag?F.tag:D&&F.svg?"svg":A;q.className=A;let N=D&&F.svg?document.createElementNS($,T):document.createElement(T);if(D&&F.attrs)for(let[w,S]of Object.entries(F.attrs))N.setAttribute(w,S);if(D&&F.child)N.appendChild(document.createElementNS($,F.child));return q.content.appendChild(N),q})}let B={};return B.init=function(z,F={}){if(K[z])throw Error(`template.init: context '${z}' already exists. Call clearContext('${z}') first if you want to re-init.`);let{main:q,page:D}=F,A=F.tpl,T=typeof F.to==="string"?document.querySelector(F.to):F.to,N=j.get(T);if(N){let w=K[N.ctxName].map[N.id];if(!w.childCtxs)w.childCtxs=[];w.childCtxs.push(z)}if(D){let w=T;K[z]={page:T,head:w.head,ctx:w.body,map:{},styles:{},scripts:{}}}else K[z]={ctx:T,map:{}};if(q||A){let w=q?"main":z,S=typeof A==="string"?document.querySelectorAll(A+" > template"):A??U();R[w]={};let I=Array.from(S);for(let v of I)R[w][v.className]=Z(v.content.firstChild);K[z].tpl=w}else K[z].tpl="main";return K[z]},B.DEFAULT_TAGS=Y,B.generateTemplateTags=U,B.registerTags=function(z,F){let q=F?K[F]?.tpl??F:"main";if(!R[q])R[q]={};let D=U(z),A=[];for(let T of D)R[q][T.className]=Z(T.content.firstChild),A.push(T.className);return A},B.reloadTags=function(z,F){let q=F?K[F]?.tpl??F:"main",D=R[q]?Object.keys(R[q]):[];R[q]={};let A=B.registerTags(z,F),T=D.filter((N)=>!A.includes(N));return{added:A,removed:T}},B.unregisterTag=function(z,F){let q=F?K[F]?.tpl??F:"main";if(R[q]&&Object.prototype.hasOwnProperty.call(R[q],z))return delete R[q][z],!0;return!1},B.container=function(z){return K[z]?.ctx??null},B.adoptNode=function(z,F,q,D){let A=K[z];if(!A)throw Error(`template.adoptNode: unknown context '${z}'`);if(A.map[F])throw Error(`template.adoptNode: id '${F}' is already registered in context '${z}'. Re-adoption with a different parentId would silently corrupt the tree.`);let T={node:q,target:q?.parentNode??null,tag:typeof q?.tagName==="string"?q.tagName.toLowerCase():"div",children:[]};if(A.map[F]=T,q)j.set(q,{ctxName:z,id:F});if(D&&A.map[D])A.map[D].children.push(F)},B.setNonce=function(z){H=z?String(z):""},B.getNonce=function(){return H},B.getCtx=function(z){return K[z]??null},B.pageAttr=function(z,F){let q=K[z].ctx;for(let[D,A]of Object.entries(F))if(P.test(D)&&(D==="class"||D==="style"||D.startsWith("data-")))q.setAttribute(D,A)},B.elm=function(z,F,q,D=0){if(Array.isArray(F))B.elms(z,F);else if(F.tag&&typeof F.tag==="string"){if(!F.id||typeof F.id!=="string")F.id=Date.now().toString(36)+D.toString()+crypto.getRandomValues(new Uint32Array(1))[0].toString(36);let A=K[z];if(A.map[F.id]){B.clearIn(z,F.id);let T=A.map[F.id],N=W(z,F);if(N!==null)T.node.parentNode.replaceChild(N,T.node),T.node=N,j.set(N,{ctxName:z,id:F.id});if(F.child&&Array.isArray(F.child))B.elms(z,F.child,F.id)}else{let T={node:null,target:null,tag:F.tag==="text"?"text":F.tag,children:[]};if(F.parent&&A.map[F.parent])if(T.target=A.map[F.parent].node,F.prepend)A.map[F.parent].children.unshift(F.id);else A.map[F.parent].children.push(F.id);else if(typeof q==="string"&&A.map[q])if(T.target=A.map[q].node,F.prepend)A.map[q].children.unshift(F.id);else A.map[q].children.push(F.id);else T.target=A.ctx;let N=W(z,F);if(N!==null)O(T.target,N,F.prepend),T.node=N,A.map[F.id]=T,j.set(N,{ctxName:z,id:F.id});if(F.child&&Array.isArray(F.child))B.elms(z,F.child,F.id)}}},B.elms=function(z,F,q){F.forEach(function(D,A){B.elm(z,D,q,A)})},B.get=function(z,F){return K[z].map[F]?.node||null},B.has=function(z,F){return!!K[z]?.map[F]},B.move=function(z,F,q){let D=F instanceof Element?F.getAttribute("id"):null,A=q instanceof Element?q.getAttribute("id"):null;if(D===null||A===null)return;let T=K[z],N=T.map[D],w=T.map[A];if(!N||!w)return;let S=N.target instanceof Element?N.target.getAttribute("id"):null;if(S!==null&&T.map[S]){let I=T.map[S].children,v=I.indexOf(D);if(v!==-1)I.splice(v,1)}q.appendChild(F),N.target=q,w.children.push(D)},B.style=function(z,F,q){let D=K[z];if(D.styles[F]){D.styles[F].textContent=q;return}let A=document.createElement("style");if(A.id=F,A.textContent=q,H)A.setAttribute("nonce",H);D.head.appendChild(A),D.styles[F]=A},B.removeStyle=function(z,F){let q=K[z];if(q.styles[F])q.styles[F].remove(),delete q.styles[F]},B.script=function(z,F,q={}){let D=K[z];if(D.scripts[F])D.scripts[F].remove();let A=document.createElement("script");if(A.id=F,q.content)A.textContent=q.content;if(q.type)A.type=q.type;if(H)A.setAttribute("nonce",H);D.head.appendChild(A),D.scripts[F]=A},B.removeScript=function(z,F){let q=K[z];if(q.scripts[F])q.scripts[F].remove(),delete q.scripts[F]},B.clearContext=function(z){if(K[z])K[z].ctx.remove(),delete K[z]},B.clearAll=function(z){let F=K[z],q=[];for(let D in F.map){if(!F.map[D])continue;if(F.map[D].childCtxs)for(let A of F.map[D].childCtxs)B.clearContext(A);q.push(...J(z,F.map[D].children)),q.push(D)}return F.ctx.replaceChildren(),F.map={},q},B.clearElm=function(z,F){let q=K[z];if(!q.map[F])return[];let D=q.map[F];D.node.remove();let A=J(z,D.children);return A.push(F),delete q.map[F],A},B.fromParseResult=function(z){if(!z||typeof z!=="object"||Array.isArray(z))throw TypeError("template.fromParseResult: parseResult must be an object with a `template` array");if(!Array.isArray(z.template))throw TypeError("template.fromParseResult: parseResult.template must be an array");if(z.iterates!==void 0&&(typeof z.iterates!=="object"||z.iterates===null))throw TypeError("template.fromParseResult: parseResult.iterates must be an object when present");return z},B.clearIn=function(z,F){let q=K[z];if(!q.map[F])return[];let D=q.map[F];D.node.replaceChildren();let A=J(z,D.children);return D.children=[],A},B}};var XJ={name:"sanitize",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[q$],factory(C){let K=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),R=new Set(["a","abbr","b","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","pre","q","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","th","thead","tfoot","tr","u","ul","var","wbr"]),j={"*":new Set(["class","id","title","dir","lang","tabindex"]),a:new Set(["href","name","target","rel"]),img:new Set(["src","alt","width","height","loading"]),td:new Set(["colspan","rowspan","align","valign"]),th:new Set(["colspan","rowspan","align","valign","scope"]),col:new Set(["span"]),colgroup:new Set(["span"]),ol:new Set(["start","type","reversed"]),li:new Set(["value"]),q:new Set(["cite"]),blockquote:new Set(["cite"]),del:new Set(["cite","datetime"]),ins:new Set(["cite","datetime"]),details:new Set(["open"])},H=["http","https","mailto","tel","ftp"],P={tags:R,attributes:j,urlSchemes:H},L=new Set(["script","style","iframe","object","embed","noscript","noembed","noframes","xmp","plaintext","textarea","svg","math","template","link","meta","head","frame","frameset"]),M=/<!--[\s\S]*?-->/g,X=/<\s*(\/\s*)?([a-zA-Z][a-zA-Z0-9-]*)\s*([^>]*?)\s*(\/\s*)?\s*>/g,V=/([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>`=]+)))?/g;function Q($,Y,U){return C.isSafeUrl($,Y??H,!!U)}function Z($){let Y={};if(!$)return Y;V.lastIndex=0;let U;while((U=V.exec($))!==null){let B=U[1].toLowerCase(),z=U[2]!==void 0?U[2]:U[3]!==void 0?U[3]:U[4]!==void 0?U[4]:"";Y[B]=z}return Y}let G=new Set(["style","srcdoc","formaction","action","ping","xlink:href","xmlns","xlink:actuate","xlink:show","data-bind"]);function W($,Y,U){if(/^on[a-z]/i.test($))return!1;if($.startsWith("v-")||$.startsWith("ng-")||$.startsWith(":")||$.startsWith("@"))return!1;if(G.has($))return!1;let B=U.attributes||j,z=B["*"];if(z&&z.has($))return!0;let F=B[Y];if(F&&F.has($))return!0;return!1}function O($,Y,U){let B=U.urlSchemes||H,z="";for(let F of Object.keys($)){if(!W(F,Y,U))continue;let q=$[F];if(F==="href"||F==="src"){if(!Q(q,B,!1))continue}if(q=String(q).replace(/[<>"]/g,"").replace(/\s+/g," ").trim(),F==="href"||F==="src")q=q.replace(/[\r\n\t]/g,"");z+=" "+F+'="'+q+'"'}if(Y==="a"){let F=$.href||"",q=($.target||"").toLowerCase().trim();if(/^https?:\/\//i.test(F.trim())&&(q==="_blank"||q!==""&&q!=="_self"&&q!=="_parent"&&q!=="_top")){let T=$.rel?$.rel.toLowerCase():"",N=T.includes("noopener"),w=T.includes("noreferrer");if(!N||!w){z=z.replace(/ rel="[^"]*"/,"");let S=[];if(T)S.push(T);if(!N)S.push("noopener");if(!w)S.push("noreferrer");z+=' rel="'+S.join(" ").trim()+'"'}}}return z}function J($,Y){if(typeof $!=="string"||$.length===0)return"";$=$.replace(/\x00/g,""),$=$.replace(M,"");let U={tags:Y&&Y.allowedTags?Y.allowedTags instanceof Set?Y.allowedTags:new Set(Y.allowedTags):R,attributes:Y&&Y.allowedAttributes!==void 0?Y.allowedAttributes:j,urlSchemes:Y&&Y.urlSchemes?Y.urlSchemes:H},B=!(Y&&Y.dropDangerousContent===!1),z=$;if(B)for(let A of L){let T=new RegExp("<\\s*"+A+"(\\s[^>]*)?>([\\s\\S]*?)<\\s*\\/\\s*"+A+"\\s*>","gi");z=z.replace(T,"");let N=new RegExp("<\\s*"+A+"\\b[^>]*>[\\s\\S]*$","gi");z=z.replace(N,"");let w=new RegExp("<\\s*"+A+"\\b[^>]*/>","gi");z=z.replace(w,"");let S=new RegExp("<\\s*"+A+"\\b[^>]*>","gi");z=z.replace(S,"")}let F=[],q=0,D;X.lastIndex=0;while((D=X.exec(z))!==null){F.push(z.slice(q,D.index)),q=D.index+D[0].length;let A=!!(D[1]&&D[1].trim()==="/"),T=D[2].toLowerCase(),N=D[3]||"",w=!!(D[4]&&D[4].trim()==="/");if(!U.tags.has(T))continue;if(A){F.push("</"+T+">");continue}let S=Z(N),I=O(S,T,U);if(w||K.has(T))F.push("<"+T+I+" />");else F.push("<"+T+I+">")}return F.push(z.slice(q)),F.join("")}return{sanitizeHtml:J,isSafeUrl:Q,defaultAllowlist:P}}};var k$={name:"uiSessionCore",version:"1.0.0",type:"fw.dom.rendering",dependencies:["template","render","parser","dom","events"],deps:[N$,A$,f$,F$,V$],factory(C,K,R,j,H){function P(M){if(M.template)return M;if(!M.block)return M;let X=M.attach?.name,V=X&&M.block.iterates?.[X]?M.block.iterates[X]:M.block.template,Q={...M,template:V};return delete Q.block,Q}return{methods:{parse(M){return R.fromHTML(M)},get(M,X){let V=this._map.get(M);if(!V)return null;if(Array.isArray(V))return null;if(X!==void 0){let Z=V.get(X);if(!Z)return null;return C.get(this._container,Z)}let Q=V.get(M)??V.values().next().value;if(!Q)return null;return C.get(this._container,Q)},_resolveSlotElement(M,X){let V=this._attach.get(M)?.content?.get(X);if(!V)return null;return C.get(this._container,V)},query(M,X,V){let Q=this.get(M,X);if(!Q)return null;return j.query(Q,V)},queryAll(M,X,V){let Q=this.get(M,X);if(!Q)return[];return j.queryAll(Q,V)},*iterate(M){let X=this._map.get(M);if(!X||Array.isArray(X))return;for(let[V,Q]of X){let Z=C.get(this._container,Q);if(Z)yield[V,Z]}},exists(M,X){let V=this._map.get(M);if(!V)return!1;if(Array.isArray(V)){if(X==null)return V.length>0;return!1}if(X==null)return!0;return V.has(X)},hydrate(M,X={}){if(!Array.isArray(M))throw Error("uiSession.hydrate: items must be an array");let V=X.idPrefix||"",Q=C.container(this._container);if(!Q)throw Error(`uiSession.hydrate: container '${this._container}' is not initialized (call template.init first)`);let Z=($)=>V?`${V}:${$}`:$,G=($)=>{let Y=`[data-fw-id="${CSS.escape(Z($))}"]`;return Q.querySelector(Y)},W=X.onMismatch||"throw",O=[];function J($){if(typeof W==="function")try{return W($)}catch{return"throw"}return W}$:for(let $ of M){let Y=P($),U=Y.template;if(!U)continue;let B=Y.id,z=new Map,F=new Map;for(let q of U){let D=Z(q.id),A=G(q.id);if(!A){let N=J({blockId:B,elm:q,realId:D,item:Y,idPrefix:V});if(N==="rebuild"){O.push($);continue $}if(N==="skip")continue $;throw Error(`uiSession.hydrate: no DOM node found for data-fw-id="${D}" (block '${B??"<anonymous>"}', template elm id='${q.id}'). Check that SSR was rendered with idPrefix='${V}' and the same template as the client. Pass opts.onMismatch='rebuild' to fall back to client render.`)}let T=q.parent?Z(q.parent):void 0;if(!C.has(this._container,D))C.adoptNode(this._container,D,A,T);if(z.set(q.id,D),q.content)F.set(q.content,D)}if(B){if(this._map.set(B,z),F.size>0)this._attach.set(B,{content:F})}if(B&&Y.attach&&Y.attach.elm){let q=this._children.get(Y.attach.elm);if(!q)q=new Set,this._children.set(Y.attach.elm,q);q.add(B)}}if(this._fireMount(M.map(($)=>$&&$.id).filter(Boolean)),O.length>0)this.add(O);return this},add(M){let X=M.map(P);for(let Q of M)if(Q&&Q.id&&Q.attach&&Q.attach.elm){let Z=this._children.get(Q.attach.elm);if(!Z)Z=new Set,this._children.set(Q.attach.elm,Z);Z.add(Q.id)}let V=K.full(X,this._attach,this._map);return C.elms(this._container,V.arr),this._fireMount(M.map((Q)=>Q&&Q.id).filter(Boolean)),this},append(M){return this.add(M)},prepend(M){return this.add(M.map((X)=>({prepend:!0,...X})))},mount(M,X,V){if(typeof V!=="function")throw Error("uiSession.mount: factory must be a function");let Q=X?this._resolveSlotElement(M,X):this.get(M);if(!Q)throw Error(`uiSession.mount: no ${X?`slot '${X}'`:"root"} resolved for block '${M}' (mount the block before calling mount)`);let Z=V(Q,M);if(Z&&(typeof Z==="object"||typeof Z==="function")){if(typeof Z==="function"||Z.dispose||Z.destroy||Z.abort||Z.close||Z.stop||Z.clear)this.adopt(M,Z)}return Z},adopt(M,X){let V=typeof X==="function"?X:X&&(X.dispose||X.destroy||X.abort||X.close||X.stop||X.clear);if(typeof V!=="function")throw Error("uiSession.adopt: resource must be a function or expose one of {dispose, destroy, abort, close, stop, clear}");let Q=this._unmount.get(M);return this._unmount.set(M,()=>{try{V.call(X)}catch{}if(Q)Q()}),X},onUnmount(M,X){if(typeof X==="function")this._unmount.set(M,X);else this._unmount.delete(M);return this},onMount(M,X){if(typeof X!=="function")return this._mount.delete(M),this;if(this._map.has(M))try{X()}catch{}else this._mount.set(M,X);return this},_fireMount(M){for(let X of M){if(!X)continue;let V=this._mount.get(X);if(!V)continue;this._mount.delete(X);try{V()}catch{}}},_fireUnmount(M){let X=this._unmount.get(M);if(!X)return;this._unmount.delete(M);try{X()}catch{}},off(M){H.off(M);for(let[,X]of this._listeners)for(let[,V]of X)V.delete(M);return this},_offTracked(M,X){let V=this._listeners.get(M);if(!V)return;if(X==null){for(let Q of V.values())for(let Z of Q)H.off(Z);this._listeners.delete(M)}else{let Q=V.get(X);if(Q){for(let Z of Q)H.off(Z);V.delete(X)}}},remove(M,X){let V=this._map.get(M)?.get(X);if(V){if(C.clearElm(this._container,V),this._map.get(M).delete(X),this._offTracked(M,X),this._map.get(M)?.size===0)this._fireUnmount(M),this._map.delete(M),this._disposeListsFor(M)}return this},clear(M,X){if(M==null){for(let V of[...this._unmount.keys()])this._fireUnmount(V);if(this._portals)for(let V of[...this._portals.keys()])this.closePortal(V);C.clearAll(this._container),this._map.clear(),this._attach.clear(),this._children.clear();for(let V of[...this._listeners.keys()])this._offTracked(V);this._listeners.clear();for(let V of[...this._lists.keys()])this._disposeListsFor(V);this._lists.clear()}else if(X!=null){let V=this._map.get(M)?.get(X);if(V)C.clearIn(this._container,V)}else{let V=this._children.get(M);if(V){for(let Z of[...V])this.clear(Z);this._children.delete(M)}this._fireUnmount(M);let Q=this._map.get(M);if(Q)Q.forEach((Z)=>C.clearElm(this._container,Z)),this._map.delete(M);this._offTracked(M),this._disposeListsFor(M)}return this},move(M,X,V,Q){let Z=this.get(M,X),G=this.get(V,Q);if(Z&&G)C.move(this._container,Z,G);return this},replace(M,X){return this.clear(M),this.add(X)},portal(M,X={}){if(!this._portals)this._portals=new Map;let V=this._portals.get(M);if(V)return V;let Q=X.to??(typeof document<"u"?document.body:null);if(!Q)throw Error(`uiSession.portal: no target element resolved for '${M}'`);let Z=`${this._container}\x1Fportal\x1F${M}`;C.init(Z,{to:Q});let G=new this.constructor(Z);return G._isPortal=!0,G._portalParent=this,G._portalName=M,this._portals.set(M,G),G},closePortal(M){let X=this._portals?.get(M);if(!X)return this;return X.clear(),C.clearContext?.(X._container),this._portals.delete(M),this},_disposeListsFor(M){let X=this._lists.get(M);if(!X)return;for(let V of X.values())V._dispose();this._lists.delete(M)}},resolveTemplate:P}}};var v$={name:"uiSessionDirect",version:"1.0.0",type:"fw.dom.rendering",dependencies:["dom","events"],deps:[F$,V$],factory(C,K){return{methods:{text(j,H,P){let L=arguments.length===2,M=L?this.get(j):this.get(j,H),X=L?H:P;if(M)C.text(M,X);return this},attr(j,H,P,L){let M=arguments.length===3,X=M?this.get(j):this.get(j,H),V=M?H:P,Q=M?P:L;if(!X)return this;if(Q===null||Q===!1||Q===void 0)C.attrRemove(X,V);else C.attr(X,V,Q);return this},on(j,H,P,L,M,X){let V=typeof H==="string"&&typeof P==="function",Q=V?j:H,Z=V?H:P,G=V?P:L,W=V?L:M,O=V?M:X,J=V?this.get(j):this.get(j,H);if(!J)return null;let $=W||`fw:ui:${this._container}:${++this._lseq}`;if(K.on($,J,Z,G,O),!this._listeners.has(j))this._listeners.set(j,new Map);let Y=this._listeners.get(j);if(!Y.has(Q))Y.set(Q,new Set);return Y.get(Q).add($),$},bind(j,H,P,L,M){if(!j||typeof j.subscribe!=="function")throw Error("uiSession.bind: first arg must be a signal");let X,V,Q;if(arguments.length<=3)X=void 0,V=P??"text",Q=void 0;else if(arguments.length===4&&L!==null&&typeof L==="object")X=void 0,V=P,Q=L;else X=P,V=L??"text",Q=M;let Z=Q&&typeof Q.transform==="function"?Q.transform:null,G=typeof V==="string"?V.indexOf(":"):-1,W=G>0?V.slice(0,G):null,O=G>0?V.slice(G+1):null,J=null,$=(B)=>{let z=Z?Z(B):B,F=X===void 0?this.get(H):this.get(H,X);if(!F)return;if(V==="text"){C.text(F,z);return}if(V==="class"){if(J!=null)C.classRemove(F,J);if(J=z==null||z===!1||z===""?null:String(z),J)C.classAdd(F,J);return}if(W==="class"){if(z)C.classAdd(F,O);else C.classRemove(F,O);return}if(W==="style"){if(z==null||z===!1)F.style.removeProperty(O);else C.style(F,O,String(z));return}if(W==="prop"){try{F[O]=z}catch{}return}if(z===null||z===!1||z===void 0)C.attrRemove(F,V);else C.attr(F,V,z)};$(j.get());let Y=j.subscribe($),U=this._unmount.get(H);return this._unmount.set(H,()=>{if(Y(),U)U()}),Y}}}}};var g$={name:"hex",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let K=new Int8Array(128).fill(-1);for(let P=0;P<16;P++)if(K["0123456789abcdef".charCodeAt(P)]=P,P>=10)K["ABCDEF".charCodeAt(P-10)]=P;return{toBytes:(P)=>{let L=P.length;if(L%2!==0)throw Error(`hex: odd-length input (length ${L})`);let M=new Uint8Array(L>>1);for(let X=0,V=0;X<L;X+=2,V++){let Q=P.charCodeAt(X),Z=P.charCodeAt(X+1),G=Q<128?K[Q]:-1,W=Z<128?K[Z]:-1;if(G<0||W<0)throw Error(`hex: invalid character at index ${G<0?X:X+1}`);M[V]=G<<4|W}return M},fromBytes:(P)=>{let L=Array(P.length);for(let M=0;M<P.length;M++)L[M]="0123456789abcdef"[(P[M]&240)>>4]+"0123456789abcdef"[P[M]&15];return L.join("")},test:(P)=>{if(typeof P!=="string")return!1;if(P.length%2!==0)return!1;return/^[0-9a-fA-F]*$/.test(P)}}}};var YJ={name:"b64",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let C=[],K="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let G=0;G<64;G++)C["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(G)]=G;function R(G){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[G>>18&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[G>>12&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[G>>6&63]+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[G&63]}function j(G,W,O,J){return C[G.charCodeAt(0)]<<18|C[W.charCodeAt(0)]<<12|C[O.charCodeAt(0)]<<6|C[J.charCodeAt(0)]}function H(G,W){G.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[W>>2]),G.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[W<<4&63]),G.push("==")}function P(G,W){G.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[W>>10]),G.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[W>>4&63]),G.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[W<<2&63]),G.push("=")}function L(G,W,O,J){O=O-J;for(let $=0;$<O;$+=3)W.push(R((G[$]<<16)+(G[$+1]<<8)+G[$+2]));if(O=G.length,J===1)H(W,G[O-1]);else if(J===2)P(W,(G[O-2]<<8)+G[O-1]);return W.join("")}function M(G,W){G.push(W>>8&255),G.push(W&255)}function X(G,W,O,J,$){if(G[J-2]==="=")$=2;else if(G[J-1]==="=")$=1;J=$>0?J-4:J;let Y;for(Y=0;Y<J;Y+=4)O=j(G[Y],G[Y+1],G[Y+2],G[Y+3]),W.push(O>>16&255),W.push(O>>8&255),W.push(O&255);if($===2)W.push((C[G.charCodeAt(Y)]<<2|C[G.charCodeAt(Y+1)]>>4)&255);else if($===1)M(W,C[G.charCodeAt(Y)]<<10|C[G.charCodeAt(Y+1)]<<4|C[G.charCodeAt(Y+2)]>>2);return new Uint8Array(W)}return{fromBytes:function(G){return L(G,[],G.length,G.length%3)},toBytes:function(G){return X(G,[],0,G.length,0)},test:function(G){return/^(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$/.test(G)}}}};var T$={name:"utf8",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let C=typeof TextEncoder<"u",K=typeof TextDecoder<"u",R=C?new TextEncoder:null,j=K?new TextDecoder("utf-8",{fatal:!1}):null;function H(X){let V=X.length,Q=new Uint8Array(V*3),Z=0;for(let G=0;G<V;G++){let W=X.charCodeAt(G);if(W>=55296&&W<=56319&&G+1<V){let O=X.charCodeAt(G+1);if(O>=56320&&O<=57343)W=65536+(W-55296<<10)+(O-56320),G++;else W=65533}else if(W>=56320&&W<=57343)W=65533;if(W<128)Q[Z++]=W;else if(W<2048)Q[Z++]=192|W>>6,Q[Z++]=128|W&63;else if(W<65536)Q[Z++]=224|W>>12,Q[Z++]=128|W>>6&63,Q[Z++]=128|W&63;else Q[Z++]=240|W>>18,Q[Z++]=128|W>>12&63,Q[Z++]=128|W>>6&63,Q[Z++]=128|W&63}return Q.subarray(0,Z)}function P(X){let V=[],Q=X.length,Z=0;while(Z<Q){let G=X[Z],W;if(G<128)W=G,Z+=1;else if(G<192)W=65533,Z+=1;else if(G<224){if(Z+1>=Q){V.push(String.fromCharCode(65533));break}W=(G&31)<<6|X[Z+1]&63,Z+=2}else if(G<240){if(Z+2>=Q){V.push(String.fromCharCode(65533));break}W=(G&15)<<12|(X[Z+1]&63)<<6|X[Z+2]&63,Z+=3}else if(G<248){if(Z+3>=Q){V.push(String.fromCharCode(65533));break}W=(G&7)<<18|(X[Z+1]&63)<<12|(X[Z+2]&63)<<6|X[Z+3]&63,Z+=4}else W=65533,Z+=1;if(W<65536)V.push(String.fromCharCode(W));else W-=65536,V.push(String.fromCharCode(55296|W>>10,56320|W&1023))}return V.join("")}return{toBytes:function(X){if(X===""||X==null)return new Uint8Array(0);if(R)return R.encode(String(X));return H(String(X))},fromBytes:function(X){if(!X||X.length===0)return"";if(j){let V=X instanceof Uint8Array?X:new Uint8Array(X);return j.decode(V)}return P(X)}}}};var zJ={name:"url",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){function C(J,$){let Y=encodeURIComponent(String(J));return $==="plus"?Y.replace(/%20/g,"+"):Y}function K(J,$){try{if($==="plus")J=J.replace(/\+/g," ");return decodeURIComponent(J)}catch{return J}}function R(J){if(J.indexOf("[")<0)return[J];let $=[],Y=J.indexOf("[");$.push(J.slice(0,Y));let U=Y,B=J.length;while(U<B&&J[U]==="["){let z=J.indexOf("]",U);if(z<0)return $.push(J.slice(U)),$;$.push(J.slice(U+1,z)),U=z+1}return $}function j(J,$,Y){let U=J;for(let B=0;B<$.length;B++){let z=$[B],F=B===$.length-1;if(z===""){if(!Array.isArray(U))return;if(F)U.push(Y);else{let q={};U.push(q),U=q}continue}if(F)if(Array.isArray(U)){let q=/^\d+$/.test(z)?parseInt(z,10):null;if(q!==null)U[q]=Y}else if(z in U){let q=U[z];if(Array.isArray(q))q.push(Y);else U[z]=[q,Y]}else U[z]=Y;else{let q=$[B+1],D=q===""||/^\d+$/.test(q);if(Array.isArray(U)){let A=/^\d+$/.test(z)?parseInt(z,10):U.length;if(!U[A])U[A]=D?[]:{};U=U[A]}else{if(!(z in U))U[z]=D?[]:{};U=U[z]}}}}function H(J,$){$=$||{};let Y=$.arrayFormat||"repeat",U=!!$.nested,B=$.space||"percent",z=$.delimiter||"&",F={};if(!J)return F;if(J[0]==="?"||J[0]==="#")J=J.slice(1);if(!J)return F;let q=J.split(z);for(let D=0;D<q.length;D++){let A=q[D];if(A==="")continue;let T=A.indexOf("="),N,w;if(T<0)N=A,w="";else N=A.slice(0,T),w=A.slice(T+1);let S=K(N,B),I=K(w,B);if(Y==="comma"&&I.indexOf(",")>=0)I=I.split(",");if(U||Y==="brackets"||Y==="indices"){let v=R(S);if(v.length>1){if(Array.isArray(I))for(let E=0;E<I.length;E++)j(F,v,I[E]);else j(F,v,I);continue}}if(Y==="none")F[S]=Array.isArray(I)?I[I.length-1]:I;else if(S in F){let v=F[S];if(Array.isArray(v))if(Array.isArray(I))for(let E of I)v.push(E);else v.push(I);else F[S]=Array.isArray(I)?[v,...I]:[v,I]}else F[S]=I}return F}function P(J,$,Y,U){if(Y===void 0)return;if(Y===null){J.push(C($,U)+"=");return}J.push(C($,U)+"="+C(Y,U))}function L(J,$){$=$||{};let Y=$.arrayFormat||"repeat",U=!!$.nested,B=$.space||"percent",z=$.delimiter||"&",F=!!$.skipNull;if(!J||typeof J!=="object")return"";let q=[],D=(T,N)=>{if(N===void 0&&F)return;if(N===null&&F)return;if(Array.isArray(N)){if(N.length===0)return;switch(Y){case"brackets":for(let w of N)D(T+"[]",w);return;case"indices":for(let w=0;w<N.length;w++)D(T+"["+w+"]",N[w]);return;case"comma":q.push(C(T,B)+"="+N.map((w)=>C(w==null?"":w,B)).join(","));return;case"repeat":default:for(let w of N)P(q,T,w,B);return}}if(U&&N&&typeof N==="object"&&!(N instanceof Date)){for(let w of Object.keys(N))D(T+"["+w+"]",N[w]);return}if(N instanceof Date)N=N.toISOString();P(q,T,N,B)},A=$.sort?Object.keys(J).sort():Object.keys(J);for(let T of A)D(T,J[T]);return q.join(z)}function M(J,$){if(typeof URL==="function"){let S=$?new URL(J,$):new URL(J);return{protocol:S.protocol,username:S.username,password:S.password,hostname:S.hostname,port:S.port,host:S.host,pathname:S.pathname,search:S.search,hash:S.hash,origin:S.origin,href:S.href,query:H(S.search)}}let Y=/^(?:([a-z][a-z0-9+\-.]*:))?(?:\/\/((?:([^:@/]*)(?::([^@/]*))?@)?([^:/?#]*)(?::(\d+))?))?([^?#]*)(\?[^#]*)?(#.*)?$/i.exec(J);if(!Y)throw Error("url: cannot parse");let U=Y[1]||"",B=Y[3]||"",z=Y[4]||"",F=Y[5]||"",q=Y[6]||"",D=Y[7]||"",A=Y[8]||"",T=Y[9]||"",N=F+(q?":"+q:""),w=U&&F?U+"//"+N:"";return{protocol:U,username:B,password:z,hostname:F,port:q,host:N,pathname:D,search:A,hash:T,origin:w,href:J,query:H(A)}}function X(J){if(!J)return"";let $="";if(J.protocol){if($+=J.protocol,!$.endsWith(":"))$+=":";$+="//"}if(J.username){if($+=encodeURIComponent(J.username),J.password)$+=":"+encodeURIComponent(J.password);$+="@"}if(J.host)$+=J.host;else if(J.hostname){if($+=J.hostname,J.port)$+=":"+J.port}if(J.pathname)$+=J.pathname.startsWith("/")||!J.hostname?J.pathname:"/"+J.pathname;if(J.query!==void 0&&J.query!==null&&J.query!==""){let Y=typeof J.query==="string"?J.query:L(J.query);if(Y)$+="?"+Y}else if(J.search)$+=J.search.startsWith("?")?J.search:"?"+J.search;if(J.hash)$+=J.hash.startsWith("#")?J.hash:"#"+J.hash;return $}let V=";/?:@&=+$,-_.!~*'()#";function Q(J){let $=Array(128);for(let Y=0;Y<128;Y++){let U=String.fromCharCode(Y);if(/[0-9A-Za-z]/.test(U))$[Y]=U;else $[Y]="%"+("0"+Y.toString(16).toUpperCase()).slice(-2)}for(let Y=0;Y<J.length;Y++)$[J.charCodeAt(Y)]=J[Y];return $}let Z=Q(V),G=/^[0-9a-fA-F]{2}$/;function W(J,$){if(!J)return J===""?"":String(J);let Y=$&&$.safe!==void 0?Q($.safe):Z,U="",B=J.length;for(let z=0;z<B;z++){let F=J.charCodeAt(z);if(F===37&&z+2<B){if(G.test(J.slice(z+1,z+3))){U+=J.slice(z,z+3),z+=2;continue}}if(F<128){U+=Y[F];continue}if(F>=55296&&F<=57343){if(F<=56319&&z+1<B){let q=J.charCodeAt(z+1);if(q>=56320&&q<=57343){U+=encodeURIComponent(J[z]+J[z+1]),z++;continue}}U+="%EF%BF%BD";continue}U+=encodeURIComponent(J[z])}return U}function O(J){if(!J)return J===""?"":String(J);try{return decodeURIComponent(J)}catch{return J}}return{parseQuery:H,stringifyQuery:L,parseURL:M,buildURL:X,encodeSafe:W,decodeSafe:O}}};var h$={name:"unicode",version:"1.0.0",type:"fw.io.text",dependencies:[],factory(){let C=new Set(["NFC","NFD","NFKC","NFKD"]);function K(Q,Z="NFC"){if(typeof Q!=="string")throw Error("unicode.normalize: str must be a string");if(!C.has(Z))throw Error(`unicode.normalize: unknown form "${Z}"`);return Q.normalize(Z)}function R(Q,Z){if(Z)return Q.toLocaleLowerCase(Z);return Q.toLowerCase()}function j(Q,Z,G={}){let{locale:W,...O}=G;return new Intl.Collator(W,O).compare(Q,Z)}function H(Q={}){let{locale:Z,...G}=Q,W=new Intl.Collator(Z,G);return{compare:W.compare.bind(W),sort:(O)=>[...O].sort(W.compare.bind(W))}}function*P(Q){if(typeof Intl<"u"&&typeof Intl.Segmenter==="function"){let Z=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(let{segment:G}of Z.segment(Q))yield G}else for(let Z of Q)yield Z}let L=[[4352,4447],[11904,12031],[12032,12287],[12288,12351],[12352,13311],[13312,19903],[19968,40959],[40960,42191],[43360,43391],[44032,55295],[63744,64255],[65040,65055],[65072,65135],[65280,65376],[65504,65510],[110592,110847],[127744,129535],[131072,173791],[173824,183983],[183984,191471]];function M(Q){if(Q===0)return 0;if(Q<32||Q>=127&&Q<160)return 0;if(Q>=768&&Q<=879)return 0;if(Q>=8203&&Q<=8207)return 0;for(let[Z,G]of L)if(Q>=Z&&Q<=G)return 2;return 1}function X(Q){let Z=0;for(let G of P(Q)){let W=G.codePointAt(0);Z+=M(W)}return Z}function V(Q){return Q.normalize("NFD").replace(/\p{Mn}/gu,"").normalize("NFC")}return{normalize:K,casefold:R,compare:j,collator:H,graphemes:P,width:X,stripDiacritics:V}}};var GJ={name:"str",version:"1.0.0",type:"fw.io.text",dependencies:["unicode"],deps:[h$],factory(C){function K(J){return J.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/(\d)([a-zA-Z])/g,"$1 $2").split(/[\s\-_]+/).filter((Y)=>Y.length>0)}function R(J){let $=K(J);if(!$.length)return"";return $[0].toLowerCase()+$.slice(1).map((Y)=>Y[0].toUpperCase()+Y.slice(1).toLowerCase()).join("")}function j(J){return K(J).map(($)=>$[0].toUpperCase()+$.slice(1).toLowerCase()).join("")}function H(J){return K(J).map(($)=>$.toLowerCase()).join("-")}function P(J){return K(J).map(($)=>$.toLowerCase()).join("_")}function L(J){return K(J).map(($)=>$.toUpperCase()).join("_")}function M(J){return K(J).map(($)=>$[0].toUpperCase()+$.slice(1).toLowerCase()).join(" ")}function X(J,$={}){let{separator:Y="-",lower:U=!0}=$,B=C.stripDiacritics(J);if(U)B=C.casefold(B);return B=B.replace(/[^a-zA-Z0-9]+/g,Y),B=B.replace(new RegExp(`^${G(Y)}+|${G(Y)}+$`,"g"),""),B=B.replace(new RegExp(`${G(Y)}{2,}`,"g"),Y),B}function V(J,$,Y={}){let{suffix:U="…",wordBoundary:B=!0}=Y;if(J.length<=$)return J;let z=$-U.length;if(z<=0)return U.slice(0,$);let F=J.slice(0,z);if(B){let q=F.lastIndexOf(" ");if(q>0)F=F.slice(0,q)}return F+U}function Q(J,$,Y=" ",U="left"){if(J.length>=$)return J;let B=$-J.length,z=Y.repeat(Math.ceil(B/Y.length)).slice(0,B);if(U==="right")return J+z;if(U==="both"){let F=Math.floor(B/2),q=B-F;return Y.repeat(F).slice(0,F)+J+Y.repeat(q).slice(0,q)}return z+J}function Z(J,$){return J.replace(/\{(\w+)\}/g,(Y,U)=>(U in $)?String($[U]):`{${U}}`)}function G(J){return J.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function W(J){return J.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function O(J,$){if(J===$)return 1;let Y=J.length,U=$.length;if(Y===0&&U===0)return 1;if(Y===0||U===0)return 0;let B=Array.from({length:U+1},(z,F)=>F);for(let z=1;z<=Y;z++){let F=B[0];B[0]=z;for(let q=1;q<=U;q++){let D=B[q];B[q]=J[z-1]===$[q-1]?F:1+Math.min(F,B[q],B[q-1]),F=D}}return 1-B[U]/Math.max(Y,U)}return{splitWords:K,camelCase:R,pascalCase:j,kebabCase:H,snakeCase:P,constantCase:L,titleCase:M,slug:X,truncate:V,pad:Q,format:Z,escapeRegExp:G,escapeHTML:W,similarity:O}}};var HJ={name:"date",version:"1.0.0",type:"fw.io.time",dependencies:[],factory(){function C(J){return J instanceof Date&&!isNaN(J.getTime())}function K(J,$={}){let{locale:Y="en-US",...U}=$;return new Intl.DateTimeFormat(Y,U).format(J)}let R=[{unit:"year",ms:31557600000},{unit:"month",ms:2630016000},{unit:"week",ms:604800000},{unit:"day",ms:86400000},{unit:"hour",ms:3600000},{unit:"minute",ms:60000},{unit:"second",ms:1000}];function j(J,$,Y={}){if($===void 0||$===null)$=new Date;let{locale:U="en-US",...B}=Y,z=J.getTime()-$.getTime(),F=Math.abs(z),q=new Intl.RelativeTimeFormat(U,{numeric:"auto",...B});for(let{unit:D,ms:A}of R)if(F>=A||D==="second"){let T=Math.round(z/A);return q.format(T,D)}return q.format(0,"second")}let H=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})$/;function P(J){if(typeof J!=="string"||!H.test(J))return null;let $=new Date(J);return C($)?$:null}function L(J,$){if(!$){let _=new Date(J);return C(_)?_:null}let Y={YYYY:null,MM:null,DD:null,HH:null,mm:null,ss:null,SSS:null},B=$.replace(/YYYY/g,"(\\d{4})").replace(/MM/g,"(\\d{2})").replace(/DD/g,"(\\d{2})").replace(/HH/g,"(\\d{2})").replace(/mm/g,"(\\d{2})").replace(/ss/g,"(\\d{2})").replace(/SSS/g,"(\\d{3})"),z=[],F=$,D=["YYYY","MM","DD","HH","mm","ss","SSS"].map((_)=>({t:_,idx:F.indexOf(_)})).filter((_)=>_.idx!==-1).sort((_,g)=>_.idx-g.idx);for(let{t:_}of D)z.push(_);let A=new RegExp("^"+B+"$").exec(J);if(!A)return null;for(let _=0;_<z.length;_++)Y[z[_]]=parseInt(A[_+1],10);let T=Y.YYYY??0,N=(Y.MM??1)-1,w=Y.DD??1,S=Y.HH??0,I=Y.mm??0,v=Y.ss??0,E=Y.SSS??0,x=new Date(T,N,w,S,I,v,E);return C(x)?x:null}function M(J,$,Y,U){let B=new Date(J.getTime()),z=new Date($,Y+1,0).getDate();return B.setFullYear($,Y,Math.min(U,z)),B}function X(J,$,Y){switch(Y){case"years":return M(J,J.getFullYear()+$,J.getMonth(),J.getDate());case"months":return M(J,J.getFullYear(),J.getMonth()+$,J.getDate());case"weeks":{let U=new Date(J.getTime());return U.setDate(J.getDate()+$*7),U}case"days":{let U=new Date(J.getTime());return U.setDate(J.getDate()+$),U}case"hours":{let U=new Date(J.getTime());return U.setTime(J.getTime()+$*3600000),U}case"minutes":{let U=new Date(J.getTime());return U.setTime(J.getTime()+$*60000),U}case"seconds":{let U=new Date(J.getTime());return U.setTime(J.getTime()+$*1000),U}case"ms":{let U=new Date(J.getTime());return U.setTime(J.getTime()+$),U}default:throw Error(`date.add: unknown unit "${Y}"`)}}function V(J,$,Y){return X(J,-$,Y)}function Q(J,$,Y){let U=J.getTime()-$.getTime();switch(Y){case"years":return Math.trunc(J.getFullYear()-$.getFullYear()+(J.getMonth()-$.getMonth())/12);case"months":{let B=J.getFullYear()-$.getFullYear(),z=J.getMonth()-$.getMonth(),F=B*12+z,q=F>=0?1:-1,D=J.getDate(),A=$.getDate();if(q>0&&D<A)return F-1;if(q<0&&D>A)return F+1;return F}case"weeks":return Math.trunc(U/604800000);case"days":return Math.trunc(U/86400000);case"hours":return Math.trunc(U/3600000);case"minutes":return Math.trunc(U/60000);case"seconds":return Math.trunc(U/1000);case"ms":return U;default:throw Error(`date.diff: unknown unit "${Y}"`)}}function Z(J,$){let Y=new Date(J.getTime());switch($){case"years":Y.setMonth(0,1),Y.setHours(0,0,0,0);break;case"months":Y.setDate(1),Y.setHours(0,0,0,0);break;case"days":Y.setHours(0,0,0,0);break;case"hours":Y.setMinutes(0,0,0);break;case"minutes":Y.setSeconds(0,0);break;case"seconds":Y.setMilliseconds(0);break}return Y}function G(J,$){let Y=new Date(J.getTime());switch($){case"years":Y.setMonth(11,31),Y.setHours(23,59,59,999);break;case"months":{let U=new Date(Y.getFullYear(),Y.getMonth()+1,0).getDate();Y.setDate(U),Y.setHours(23,59,59,999);break}case"days":Y.setHours(23,59,59,999);break;case"hours":Y.setMinutes(59,59,999);break;case"minutes":Y.setSeconds(59,999);break;case"seconds":Y.setMilliseconds(999);break}return Y}function W(J,$){let Y={timeZone:$,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},U=new Intl.DateTimeFormat("en-CA",Y).formatToParts(J),B=(F)=>parseInt(U.find((q)=>q.type===F).value,10),z=new Date(Date.UTC(B("year"),B("month")-1,B("day"),B("hour"),B("minute"),B("second")));return Math.round((z.getTime()-J.getTime())/60000)}function O(){try{return Intl.supportedValuesOf("timeZone")}catch{return["UTC","Europe/London","Europe/Paris","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Asia/Tokyo","Asia/Shanghai","Australia/Sydney"]}}return{format:K,formatRelative:j,parse:L,parseISO:P,diff:Q,add:X,sub:V,startOf:Z,endOf:G,getOffset:W,zones:O,isValid:C}}};var UJ={name:"i18n",version:"1.0.0",type:"fw.io.i18n",dependencies:[],factory(){function C(P,L){let M=Object.assign({},P);for(let X of Object.keys(L))if(L[X]&&typeof L[X]==="object"&&!Array.isArray(L[X])&&M[X]&&typeof M[X]==="object")M[X]=C(M[X],L[X]);else M[X]=L[X];return M}function K(P){if(P===null||typeof P!=="object")return P;if(Array.isArray(P))return P.map(K);let L={};for(let M of Object.keys(P))L[M]=K(P[M]);return L}function R(P,L){if(!P)return;let M=L.split("."),X=P;for(let V of M){if(X==null||typeof X!=="object")return;X=X[V]}return X}function j(P,L){if(!L)return P;return P.replace(/\{(\w+)\}/g,(M,X)=>(X in L)?String(L[X]):`{${X}}`)}function H({locale:P="en",fallback:L="en",catalogs:M={}}={}){let X=P,V=L,Q={};for(let[U,B]of Object.entries(M))Q[U]=K(B);function Z(U){return R(Q[X],U)??R(Q[V],U)??void 0}function G(U,B){let z=Z(U);if(z===void 0)return U;if(typeof z!=="string")return U;return j(z,B)}function W(U,B,z){let F=Z(U);if(!F||typeof F!=="object")return U;let D=new Intl.PluralRules(X).select(B),A=F[D]??F.other??U;if(typeof A!=="string")return U;return j(A,{count:B,...z})}function O(U){return R(Q[X],U)!==void 0}function J(U){X=U}function $(U,B){let z=K(B);Q[U]=Q[U]?C(Q[U],z):z}function Y(U,B,z={}){switch(B){case"number":return new Intl.NumberFormat(X,z).format(U);case"currency":{let{currency:F="USD",...q}=z;return new Intl.NumberFormat(X,{style:"currency",currency:F,...q}).format(U)}case"date":return new Intl.DateTimeFormat(X,z).format(U);case"relative":{let{value:F=U,unit:q="day",...D}=z;return new Intl.RelativeTimeFormat(X,{numeric:"auto",...D}).format(F,q)}default:throw Error(`i18n.format: unknown type "${B}"`)}}return{t:G,tn:W,has:O,setLocale:J,addCatalog:$,format:Y,get locale(){return X},get fallback(){return V}}}return{create:H}}};var WJ={name:"rateLimit",dependencies:[],factory(){function C(R,j,H){if(typeof R!=="function")throw Error("rateLimit: fn must be a function");if(typeof j!=="number"||isNaN(j)||j<=0)throw Error("rateLimit: delay must be a positive number");let P=H&&H.leading!==void 0?!!H.leading:!1,L=H&&H.trailing!==void 0?!!H.trailing:!0,M=H&&H.maxWait!==void 0?H.maxWait:void 0;if(M!==void 0&&(typeof M!=="number"||isNaN(M)||M<=0))throw Error("rateLimit: maxWait must be a positive number");let X=null,V=null,Q=null,Z=null,G,W,O=0,J=!1;function $(T){return O=T,J=!1,G=R.apply(Z,Q),Z=null,Q=null,G}function Y(T){X=setTimeout(B,T)}function U(){if(V!==null)clearTimeout(V),V=null}function B(){let T=Date.now();if(q(T))return z(T);let N=F(T);X=setTimeout(B,N)}function z(T){if(X=null,U(),L&&Q!==null)return $(T);Q=null,Z=null,J=!1}function F(T){let N=T-W,w=T-O,S=j-N;return M!==void 0?Math.min(S,M-w):S}function q(T){let N=T-W,w=T-O;return W===void 0||N>=j||N<0||M!==void 0&&w>=M}function D(T){if(O=T,Y(j),J=!0,P)return $(T)}function A(...T){let N=Date.now(),w=q(N);if(Q=T,Z=this,W=N,J=!0,w){if(X===null)return D(N);if(M!==void 0){if(X!==null)clearTimeout(X);return X=setTimeout(B,j),$(N)}}if(X===null)Y(j);if(M!==void 0&&V===null)V=setTimeout(()=>{if(V=null,Q!==null)O=Date.now(),J=!1,G=R.apply(Z,Q),Z=null,Q=null},M);return}return A.cancel=function(){if(X!==null)clearTimeout(X),X=null;U(),Q=null,Z=null,J=!1},A.flush=function(){if(X!==null)clearTimeout(X),X=null;if(U(),Q!==null){let T=Date.now();J=!1,G=R.apply(Z,Q),Z=null,Q=null,O=T}return G},A.pending=function(){return J},A}function K(R,j,H){if(typeof R!=="function")throw Error("rateLimit: fn must be a function");if(typeof j!=="number"||isNaN(j)||j<=0)throw Error("rateLimit: interval must be a positive number");let P=H&&H.leading!==void 0?!!H.leading:!0,L=H&&H.trailing!==void 0?!!H.trailing:!0;if(!P&&!L)throw Error("rateLimit: throttle options leading and trailing cannot both be false");return C(R,j,{leading:P,trailing:L,maxWait:j})}return{debounce:C,throttle:K}}};var VJ={name:"ajax",type:"fw.dom.net",dependencies:[],factory(){function C(H,P){if(!P)return H;if(/^https?:\/\//i.test(P))return P;let L=H.endsWith("/")?H:H+"/";return new URL(P.replace(/^\//,""),L).href}async function K(H,P){if(P==="response")return H;if(P==="blob")return H.blob();if(P==="buffer")return H.arrayBuffer();if(P==="text")return H.text();if(P==="json"){let M=await H.text();try{return JSON.parse(M)}catch(X){throw SyntaxError(`Invalid JSON response: ${X.message}`,{cause:X})}}let L=H.headers.get("content-type")??"";if(L.includes("application/json")||L.includes("+json")){let M=await H.text();try{return JSON.parse(M)}catch{return M}}if(L.startsWith("text/"))return H.text();return H.arrayBuffer()}class R extends Error{constructor(H){super(`HTTP ${H.status} ${H.statusText}`);Object.defineProperty(this,"name",{value:"HttpError",writable:!0,configurable:!0}),this.status=H.status,this.response=H}}async function j(H,P,{headers:L={},body:M,type:X,timeout:V=0,signal:Q}={}){let Z;if(V>0&&Q)Z=typeof AbortSignal.any==="function"?AbortSignal.any([AbortSignal.timeout(V),Q]):Q;else if(V>0)Z=AbortSignal.timeout(V);else if(Q)Z=Q;let G=new Headers(L),W={method:H,headers:G,signal:Z};if(M!==void 0&&M!==null)if(typeof M==="object"&&!(M instanceof FormData)&&!(M instanceof Blob)&&!(M instanceof ArrayBuffer)&&!(M instanceof URLSearchParams)){if(W.body=JSON.stringify(M),!G.has("Content-Type"))G.set("Content-Type","application/json")}else W.body=M;let O=await fetch(P,W);if(!O.ok)throw new R(O);return K(O,X)}return function H(P="",L={}){let M=P?P.replace(/\/$/,""):typeof location<"u"?location.origin:"";function X(V,Q,Z={}){let G={...L,...Z};return G.headers={...L.headers??{},...Z.headers??{}},j(V,C(M,Q),G)}return{get(V,Q){return X("GET",V,Q)},post(V,Q,Z){return X("POST",V,{...Z,body:Q})},put(V,Q,Z){return X("PUT",V,{...Z,body:Q})},patch(V,Q,Z){return X("PATCH",V,{...Z,body:Q})},del(V,Q){return X("DELETE",V,Q)},scope(V="",Q={}){return H(C(M,V),{...L,...Q})},HttpError:R}}}};var KJ={name:"network",type:"fw.dom.net",dependencies:[],factory(){let C={online:new Set,offline:new Set,change:new Set,connection:new Set},K,R,j;function H(){return typeof window<"u"?window:typeof self<"u"?self:null}function P(){if(typeof navigator>"u")return null;return navigator.connection??navigator.mozConnection??navigator.webkitConnection??null}function L(){if(K)return;K=()=>{for(let U of C.online)U();for(let U of C.change)U(!0)},R=()=>{for(let U of C.offline)U();for(let U of C.change)U(!1)};let Y=H();if(Y)Y.addEventListener("online",K),Y.addEventListener("offline",R)}function M(){if(j)return;let Y=P();if(!Y||typeof Y.addEventListener!=="function")return;j=()=>{let U=V();for(let B of C.connection)B(U)},Y.addEventListener("change",j)}function X(){return typeof navigator<"u"?navigator.onLine:!0}function V(){let Y=P();if(!Y)return null;return Object.freeze({effectiveType:Y.effectiveType??null,downlink:typeof Y.downlink==="number"?Y.downlink:null,rtt:typeof Y.rtt==="number"?Y.rtt:null,saveData:!!Y.saveData,type:Y.type??null})}function Q(){let Y=P();return!!(Y&&Y.saveData)}function Z(Y){return L(),C.online.add(Y),()=>C.online.delete(Y)}function G(Y){return L(),C.offline.add(Y),()=>C.offline.delete(Y)}function W(Y,{immediate:U=!0}={}){if(L(),C.change.add(Y),U)Y(X());return()=>C.change.delete(Y)}function O(Y,{immediate:U=!0}={}){if(M(),C.connection.add(Y),U)Y(V());return()=>C.connection.delete(Y)}async function J(Y,{timeout:U=3000,method:B="HEAD"}={}){let z=new AbortController,F=setTimeout(()=>z.abort(),U);try{return await fetch(Y,{method:B,cache:"no-store",signal:z.signal,mode:"no-cors"}),!0}catch{return!1}finally{clearTimeout(F)}}function $(){C.online.clear(),C.offline.clear(),C.change.clear(),C.connection.clear();let Y=H();if(Y&&K)Y.removeEventListener("online",K),Y.removeEventListener("offline",R);K=null,R=null;let U=P();if(U&&j&&typeof U.removeEventListener==="function")U.removeEventListener("change",j);j=null}return{isOnline:X,onOnline:Z,onOffline:G,onChange:W,connection:V,onConnectionChange:O,saveData:Q,ping:J,off:$}}};var qJ={name:"form",version:"1.1.0",type:"fw.dom.utils",dependencies:["dom","events"],deps:[F$,V$],factory(C,K){function R(P,L,M,X,V={}){let Q=V.event||"input",Z=!!V.checked,G=Z?()=>C.checked(L,!!M()):()=>C.val(L,M()==null?"":String(M()));return G(),K.on(P,L,Q,()=>{X(Z?C.checkedGet(L):C.valGet(L))}),{refresh:G,destroy(){K.off(P)}}}function j(P){if(Object.prototype.hasOwnProperty.call(P,"default"))return typeof P.default==="function"?P.default():P.default;if(P.type==="boolean")return!1;if(P.type==="array")return[];return""}function H(P){if(!P||typeof P.fields!=="object")throw Error("form.create: spec.fields is required");let L=P.fields,M=Object.create(null),X=Object.create(null),V=Object.create(null),Q=Object.create(null),Z=Object.create(null),G=new Map,W=new Set,O=!1,J=Object.create(null);for(let D in L)M[D]=j(L[D]),V[D]=!1,Q[D]=!1,Z[D]=!1,J[D]=0;function $(){let D=q.snapshot();for(let A of W)try{A(D)}catch{}}function Y(D){let A=L[D];if(!A)return;let T=M[D],N=null;if(A.required){if(A.type==="array"){if(!Array.isArray(T)||T.length===0)N=A.requiredMessage||"Required"}else if(T===""||T==null)N=A.requiredMessage||"Required"}if(!N&&A.type==="array"&&Array.isArray(T)){let w=[],S=!1;for(let I=0;I<T.length;++I){let v=null;if(typeof A.itemValidate==="function")v=A.itemValidate(T[I],I,M)||null;if(w.push(v),v)S=!0}if(S){X[D]=w;return}delete X[D];return}if(!N&&typeof A.validate==="function"){let w=A.validate(T,M);if(w&&typeof w.then==="function"){let S=++J[D];Z[D]=!0,$(),w.then((I)=>{if(S!==J[D])return;if(I)X[D]=I;else delete X[D];Z[D]=!1,$()},(I)=>{if(S!==J[D])return;X[D]=I&&I.message||"Validation error",Z[D]=!1,$()});return}N=w||null}if(N)X[D]=N;else delete X[D]}function U(){for(let D in L)Y(D);if(typeof P.validate==="function"){let D=P.validate(M)||{};for(let A in D)if(D[A])X[A]=D[A];else delete X[A]}}function B(D,A){if(!(D in L))return;M[D]=A,Q[D]=!0,Y(D),$()}function z(D){let A=L[D];if(!A||A.type!=="array")throw Error(`form.array: field '${D}' is not declared as type:'array'`);function T(){return[...M[D]||[]]}function N(E){let x=Array.isArray(M[D])?M[D].slice():[];return x.push(E),B(D,x),x.length-1}function w(E){if(!Array.isArray(M[D]))return!1;if(E<0||E>=M[D].length)return!1;let x=M[D].slice();return x.splice(E,1),B(D,x),!0}function S(E,x){if(!Array.isArray(M[D]))return!1;let _=M[D].slice();if(E<0||E>=_.length)return!1;if(x<0||x>=_.length)return!1;let[g]=_.splice(E,1);return _.splice(x,0,g),B(D,_),!0}function I(E,x){if(!Array.isArray(M[D]))return!1;if(E<0||E>=M[D].length)return!1;let _=M[D].slice();return _[E]=x,B(D,_),!0}function v(){B(D,[])}return{get values(){return T()},get length(){return Array.isArray(M[D])?M[D].length:0},push:N,remove:w,move:S,set:I,clear:v,get(E){return M[D]?.[E]}}}function F(){let D=[];for(let A in Z)if(Z[A])D.push(new Promise((T)=>{let N=q.subscribe((w)=>{if(!w.validating[A])N(),T()})}));return D}let q={get values(){return{...M}},get errors(){let D=Object.create(null);for(let A in X){let T=X[A];D[A]=Array.isArray(T)?T.slice():T}return D},get touched(){return{...V}},get dirty(){return{...Q}},get validating(){return{...Z}},get submitting(){return O},get isValid(){if(Object.keys(X).length>0)return!1;for(let D in Z)if(Z[D])return!1;return!0},get(D){return M[D]},set(D,A){B(D,A);let T=G.get(D);if(T)T.refresh()},touch(D){if(D in L&&!V[D])V[D]=!0,$()},array(D){return z(D)},attach(D,A,T={}){if(!(D in L))throw Error(`form.attach: unknown field '${D}'`);let w=L[D].type==="boolean",S=T.event||(w?"change":"input"),I=`fw:form:${D}`,v=G.get(D);if(v)v.destroy(),K.off(`${I}:blur`);let E=R(I,A,()=>M[D],(x)=>B(D,x),{event:S,checked:w});G.set(D,E),K.on(`${I}:blur`,A,"blur",()=>q.touch(D))},detach(){for(let[D,A]of G)A.destroy(),K.off(`fw:form:${D}:blur`);G.clear()},validate(){return U(),$(),q.isValid},async validateAsync(){U(),$();let D=F();if(D.length)await Promise.all(D);return q.isValid},subscribe(D){if(typeof D!=="function")return()=>{};return W.add(D),()=>W.delete(D)},snapshot(){let D=Object.create(null);for(let A in X){let T=X[A];D[A]=Array.isArray(T)?T.slice():T}return{values:{...M},errors:D,touched:{...V},dirty:{...Q},validating:{...Z},isValid:q.isValid,submitting:O}},reset(D){for(let A in L)M[A]=j(L[A]),V[A]=!1,Q[A]=!1,Z[A]=!1,J[A]++,delete X[A];if(D){for(let A in D)if(A in L)M[A]=D[A]}for(let[,A]of G)A.refresh();$()},async submit(){for(let A in L)V[A]=!0;U(),$();let D=F();if(D.length)await Promise.all(D);if(!q.isValid)return!1;if(typeof P.onSubmit!=="function")return!0;O=!0,$();try{return await P.onSubmit({...M}),!0}finally{O=!1,$()}}};return U(),q}return{bind:R,create:H}}};var FJ={name:"reactiveBind",version:"1.0.0",type:"fw.dom.rendering",dependencies:["signal"],deps:[I$],factory(C){function K(H){if(typeof H==="function")return H;if(H&&typeof H.get==="function")return()=>H.get();throw Error("reactiveBind: sigOrFn must be a signal or a function")}function R(H,P,L){let M=H.get(P,L);if(!M)throw Error(`reactiveBind: no element found for block="${P}", local="${L}". Ensure the block is rendered before binding.`);return M}function j(H){let P=[];function L(J){return P.push(J),J}function M(J,$,Y){R(H,J,$);let U=K(Y),B=C.effect(()=>{let z=U();H.text(J,$,z)});return L(B)}function X(J,$,Y,U){R(H,J,$);let B=K(U),z=C.effect(()=>{let F=B();H.attr(J,$,Y,F)});return L(z)}function V(J,$,Y,U){let B=R(H,J,$),z=K(U),F=C.effect(()=>{if(!!z())B.classList.add(Y);else B.classList.remove(Y)});return L(F)}function Q(J,$,Y,U){let B=R(H,J,$),z=K(U),F=C.effect(()=>{let q=z();if(q==null||q===!1)B.style.removeProperty(Y);else B.style.setProperty(Y,String(q))});return L(F)}function Z(J,$,Y){R(H,J,$);let U=K(Y),B=C.effect(()=>{let z=!!U();H.attr(J,$,"hidden",z?null:"")});return L(B)}function G(J,$,Y,U){let B=R(H,J,$);if(!Y||typeof Y.set!=="function")throw Error("reactiveBind.model: sig must be a writable signal (has .set)");let z=U&&U.event||"input",F=U&&typeof U.parse==="function"?U.parse:(w)=>w,q=U&&typeof U.format==="function"?U.format:(w)=>w==null?"":String(w),D=!1,A=C.effect(()=>{let w=Y.get(),S=q(w);if(B.value!==S){D=!0;try{B.value=S}finally{D=!1}}}),T=()=>{if(D)return;let w=F(B.value);if(!Object.is(w,Y.peek()))Y.set(w)};return B.addEventListener(z,T),L(()=>{A(),B.removeEventListener(z,T)})}function W(J,$,Y){if(!J||typeof J.sync!=="function")throw Error("reactiveBind.list: listController must have a sync() method");if(!$||typeof $.get!=="function")throw Error("reactiveBind.list: sigArray must be a signal");if(!Y||typeof Y.keyFn!=="function")throw Error("reactiveBind.list: opts.keyFn is required");let U=C.effect(()=>{let B=$.get();J.sync(Array.isArray(B)?B:[],Y)});return L(U)}function O(){for(let J of P)try{J()}catch{}P.length=0}return{text:M,attr:X,class:V,style:Q,show:Z,model:G,list:W,dispose:O}}return{create:j}}};var DJ={name:"component",version:"1.3.0",type:"fw.dom.rendering",dependencies:["reactiveBind"],deps:[FJ],factory(C){let K=0,R=new Set,j=typeof document<"u"?document.querySelector('meta[name="csp-nonce"]')?.getAttribute("content")??"":"";function H(X,V,Q){let Z={},G=V||{};for(let[W,O]of Object.entries(X)){let J=Object.prototype.hasOwnProperty.call(G,W)?G[W]:void 0;if(J===void 0){if(O.required)throw Error(`component${Q?`[${Q}]`:""}: required prop '${W}' is missing`);if(Object.prototype.hasOwnProperty.call(O,"default"))Z[W]=typeof O.default==="function"?O.default():O.default;continue}if(O.type){let $;if(O.type==="array")$=Array.isArray(J);else if(O.type==="object")$=J!==null&&typeof J==="object"&&!Array.isArray(J);else $=typeof J===O.type;if(!$){let Y=Array.isArray(J)?"array":J===null?"null":typeof J;throw Error(`component${Q?`[${Q}]`:""}: prop '${W}' expected ${O.type}, got ${Y}`)}}if(typeof O.validator==="function"&&!O.validator(J))throw Error(`component${Q?`[${Q}]`:""}: prop '${W}' failed validator`);Z[W]=J}for(let W of Object.keys(G))if(!Object.prototype.hasOwnProperty.call(X,W))Z[W]=G[W];return Z}function P(X,V){let Q=new Map,Z=/@keyframes\s+([\w-]+)/g,G;while((G=Z.exec(X))!==null){let $=G[1];if(!Q.has($))Q.set($,`${V}-${$}`)}let W=X;if(Q.size>0){W=W.replace(/@keyframes\s+([\w-]+)/g,(U,B)=>{let z=Q.get(B);return z?`@keyframes ${z}`:U}),W=W.replace(/\banimation-name\s*:\s*([\w-]+)/g,(U,B)=>{let z=Q.get(B);return z?`animation-name: ${z}`:U});let $=[...Q.keys()].map((U)=>U.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),Y=new RegExp(`(\\banimation\\s*:[^;{}]+?\\b)(${$})\\b`,"g");W=W.replace(Y,(U,B,z)=>{let F=Q.get(z);return F?`${B}${F}`:U})}W=W.replace(/:global\(([^)]*)\)/g,($,Y)=>Y);let O=`.${V}`,J;do J=W,W=W.replace(/&/g,O);while(W!==J);return W}function L(X,V){if(typeof document>"u")return;if(R.has(V))return;R.add(V);let Q=P(X,V),Z=document.createElement("style");if(Z.textContent=Q,Z.setAttribute("data-fw-component",V),j)Z.setAttribute("nonce",j);document.head.appendChild(Z)}function M(X){if(!X||!X.template||!Array.isArray(X.template.template))throw Error("component.define: spec.template (ParseResult) is required");let V=X.template,Q=typeof X.name==="string"?X.name:null,Z=typeof X.propsFn==="function"?X.propsFn:null,G=typeof X.mount==="function"?X.mount:null,W=typeof X.update==="function"?X.update:null,O=typeof X.unmount==="function"?X.unmount:null,J=X.props&&typeof X.props==="object"?X.props:null,$=typeof X.css==="string"?X.css:null,Y=null;if($)Y=`fw-comp-${++K}`,L($,Y);let U=0;return function(z={}){let F=z.ui;if(!F||typeof F.add!=="function")throw Error("component.create: opts.ui (UISession) is required");let q=z.id||`comp:${++U}`,D=J?H(J,z.props,Q):z.props||{},A=Z?Z(D):D,T={id:q,block:V,data:A};if(z.parent)T.attach={elm:z.parent,name:z.slot||"default"};if(F.add([T]),Y){let I=F.get(q);if(I&&I.classList)I.classList.add(Y)}let N=null,w={props:A,rawProps:D,prevProps:void 0,prevRawProps:void 0,ui:F,blockId:q,scopeClass:Y,state:{},get bind(){if(N===void 0)return;if(N===null)N=C.create(F);return N},get(I){return arguments.length===0?F.get(q):F.get(q,I)},text(...I){return F.text(q,...I)},attr(...I){return F.attr(q,...I)},on(...I){return F.on(q,...I)},off(I){return F.off(I)},query(I,v){return F.query(q,I,v)},queryAll(I,v){return F.queryAll(q,I,v)}},S=!1;if(F.onUnmount(q,()=>{if(S)return;if(S=!0,N!==null&&N!==void 0)try{N.dispose()}catch{}if(N=void 0,O)O(w)}),G)G(w);return{get props(){return w.props},get blockId(){return q},get state(){return w.state},get scopeClass(){return Y},update(I){if(S)return;let v=J?H(J,I,Q):I||{},E=Z?Z(v):v;if(w.prevRawProps=D,w.prevProps=A,D=v,A=E,w.rawProps=D,w.props=A,W)W(w,w.prevProps)},destroy(){if(S)return;F.clear(q)},get(I){return w.get(I)},text(...I){return w.text(...I)},attr(...I){return w.attr(...I)},on(...I){return w.on(...I)}}}}return{define:M}}};var y$={name:"uiSessionList",version:"1.0.0",type:"fw.dom.rendering",dependencies:["template","render","dom"],deps:[N$,A$,F$],factory(C,K,R){function j(X,V){if(Object.is(X,V))return!0;if(X==null||V==null)return!1;if(typeof X!=="object"||typeof V!=="object")return!1;let Q=Object.keys(X),Z=Object.keys(V);if(Q.length!==Z.length)return!1;for(let G of Q){if(!Object.prototype.hasOwnProperty.call(V,G))return!1;if(!Object.is(X[G],V[G]))return!1}return!0}function H(X,V,Q){if(Object.is(X,V))return!0;if(Q<=0)return!1;if(X==null||V==null)return!1;if(typeof X!=="object"||typeof V!=="object")return!1;let Z=Array.isArray(X),G=Array.isArray(V);if(Z!==G)return!1;if(Z){if(X.length!==V.length)return!1;for(let J=0;J<X.length;++J)if(!H(X[J],V[J],Q-1))return!1;return!0}let W=Object.keys(X),O=Object.keys(V);if(W.length!==O.length)return!1;for(let J of W){if(!Object.prototype.hasOwnProperty.call(V,J))return!1;if(!H(X[J],V[J],Q-1))return!1}return!0}function P(X){if(typeof X==="function")return X;if(X==="shallow")return j;if(X==="deep")return(V,Q)=>H(V,Q,8);return Object.is}class L{constructor(X,V,Q,Z){if(!Z||typeof Z.keyFn!=="function")throw Error("uiSession.list: options.keyFn is required");if(!Z.block||!Array.isArray(Z.block.template))throw Error("uiSession.list: options.block (ParseResult) is required");if(this._ui=X,this._parent=V,this._slot=Q,this._keyFn=Z.keyFn,this._block=Z.block,this._eq=P(Z.eqFn),this._onMount=typeof Z.onMount==="function"?Z.onMount:null,this._onRemove=typeof Z.onRemove==="function"?Z.onRemove:null,this._onEnter=typeof Z.onEnter==="function"?Z.onEnter:null,this._onLeave=typeof Z.onLeave==="function"?Z.onLeave:null,this._onUpdate=Z.onUpdate??"replace",this._onUpdate==="patch"&&Z.block?.iterates&&Object.keys(Z.block.iterates).length>0)this._onUpdate="replace";this._dataFn=typeof Z.dataFn==="function"?Z.dataFn:null,this._metaFn=typeof Z.metaFn==="function"?Z.metaFn:null,this._order=[],this._data=new Map,this._meta=new Map,this._disposed=!1,this._slotEl=null}_dispose(){this._order=[],this._data.clear(),this._meta.clear(),this._slotEl=null,this._disposed=!0}_ensureAlive(){if(this._disposed)throw Error(`uiSession.list: list on (${this._parent}, ${this._slot}) is disposed (its parent block was removed). Create a new list after re-mounting the parent.`)}_itemId(X){return`${this._parent}\x1Flist\x1F${this._slot}\x1F${X}`}_key(X){let V=this._keyFn(X);if(V===void 0||V===null)throw Error("uiSession.list: keyFn returned null/undefined");return String(V)}_slotElement(){if(this._slotEl)return this._slotEl;let X=this._ui._resolveSlotElement(this._parent,this._slot);if(!X)throw Error(`uiSession.list: slot '${this._slot}' not resolved on block '${this._parent}' (parent must be rendered with a \${${this._slot}} slot before creating the list)`);return this._slotEl=X,X}_addItem(X,V,Q=!1){this._slotElement();let Z=this._dataFn?this._dataFn(V):V;if(this._ui.add([{id:this._itemId(X),attach:{elm:this._parent,name:this._slot},block:this._block,data:Z,prepend:Q}]),this._data.set(X,V),this._metaFn)this._meta.set(X,this._metaFn(V));if(this._onMount)this._onMount(X,V);if(this._onEnter){let G=this._ui.get(this._itemId(X));if(G)try{Promise.resolve(this._onEnter(X,G,V))}catch{}}}_removeItem(X){if(this._onRemove){let V=this._data.get(X);try{this._onRemove(X,V)}catch{}}if(this._onLeave){let V=this._ui.get(this._itemId(X)),Q=this._data.get(X);if(V){let Z;try{Z=this._onLeave(X,V,Q)}catch{Z=null}if(Z&&typeof Z.then==="function"){this._meta.delete(X),Z.then(()=>this._ui.clear(this._itemId(X)),()=>this._ui.clear(this._itemId(X)));return}}}this._ui.clear(this._itemId(X)),this._meta.delete(X)}_replaceItem(X,V){let Q=this._data.get(X);if(this._onUpdate==="none"){if(this._data.set(X,V),this._metaFn)this._meta.set(X,this._metaFn(V));return"unchanged"}if(this._onUpdate==="patch")return this._patchItem(X,Q,V),"patched";if(typeof this._onUpdate==="function"){let Z=this._onUpdate(X,Q,V,this);if(this._data.set(X,V),this._metaFn)this._meta.set(X,this._metaFn(V));return Z==="patched"||Z==="replaced"||Z==="unchanged"?Z:"unchanged"}return this._removeItem(X),this._addItem(X,V,!1),"replaced"}_patchItem(X,V,Q){let Z=this._dataFn?this._dataFn(V):V,G=this._dataFn?this._dataFn(Q):Q,W=this._itemId(X),O=this._ui._map.get(W);if(!O){this._addItem(X,Q,!1);return}for(let J of this._block.template){if(!J.map||J.map.length===0)continue;let $=O.get(J.id);if(!$)continue;let Y=C.get(this._ui._container,$);if(!Y)continue;let U=K.applyParsedElm(J,G),B=K.applyParsedElm(J,Z),z=new Set;for(let F of J.map){let q=(F.data?"a:":"t:")+F.prop;if(z.has(q))continue;if(z.add(q),F.data){let D=U.data[F.prop],A=B.data[F.prop];if(D===A)continue;if(D===null||D===!1||D===void 0)R.attrRemove(Y,F.prop);else R.attr(Y,F.prop,D)}else{let D=U[F.prop],A=B[F.prop];if(D===A)continue;if(F.prop==="text")R.text(Y,D);else R.attr(Y,F.prop,D)}}}if(this._data.set(X,Q),this._metaFn)this._meta.set(X,this._metaFn(Q))}_reorderDom(){let X=this._slotElement(),V=this._order.map((Q)=>this._ui.get(this._itemId(Q))).filter(Boolean);R.reorder(X,V)}get size(){return this._order.length}has(X){return this._data.has(String(X))}get(X){return this._data.get(String(X))}*keys(){yield*this._order}*entries(){for(let X of this._order)yield[X,this._data.get(X)]}*values(){for(let X of this._order)yield this._data.get(X)}[Symbol.iterator](){return this.entries()}element(X){let V=String(X);if(!this._data.has(V))return null;return this._ui.get(this._itemId(V))}itemId(X){return this._itemId(String(X))}meta(X){return this._meta.get(String(X))}attr(X,...V){return this._ui.attr(this._itemId(String(X)),...V)}text(X,...V){return this._ui.text(this._itemId(String(X)),...V)}on(X,...V){return this._ui.on(this._itemId(String(X)),...V)}query(X,V){let Q=this._ui.get(this._itemId(String(X)));if(!Q)return null;return R.query(Q,V)}queryAll(X,V){let Q=this._ui.get(this._itemId(String(X)));if(!Q)return[];return R.queryAll(Q,V)}push(X){this._ensureAlive();let V=this._key(X);if(this._data.has(V))throw Error(`uiSession.list.push: duplicate key '${V}'`);return this._addItem(V,X,!1),this._order.push(V),V}prepend(X){this._ensureAlive();let V=this._key(X);if(this._data.has(V))throw Error(`uiSession.list.prepend: duplicate key '${V}'`);return this._addItem(V,X,!0),this._order.unshift(V),V}insert(X,V){this._ensureAlive();let Q=this._key(X);if(this._data.has(Q))throw Error(`uiSession.list.insert: duplicate key '${Q}'`);this._addItem(Q,X,!1);let Z=V==null?-1:this._order.indexOf(String(V));if(Z===-1)this._order.push(Q);else this._order.splice(Z,0,Q),this._reorderDom();return Q}upsert(X){this._ensureAlive();let V=this._key(X);if(this._data.has(V)){let Q=this._data.get(V);if(this._eq(Q,X))return"unchanged";let Z=this._replaceItem(V,X);if(Z==="replaced")this._reorderDom();return Z==="unchanged"?"unchanged":"updated"}return this._addItem(V,X,!1),this._order.push(V),"added"}update(X,V){this._ensureAlive();let Q=String(X);if(!this._data.has(Q))throw Error(`uiSession.list.update: key '${Q}' not found`);let Z=this._data.get(Q);if(this._eq(Z,V))return"unchanged";let G=this._replaceItem(Q,V);if(G==="replaced")this._reorderDom();return G==="unchanged"?"unchanged":"updated"}remove(X){this._ensureAlive();let V=String(X);if(!this._data.has(V))return!1;this._removeItem(V),this._data.delete(V);let Q=this._order.indexOf(V);if(Q!==-1)this._order.splice(Q,1);return!0}move(X,V){this._ensureAlive();let Q=String(X);if(!this._data.has(Q))return!1;let Z=this._order.indexOf(Q);if(Z===-1)return!1;this._order.splice(Z,1);let G=V==null?-1:this._order.indexOf(String(V));if(G===-1)this._order.push(Q);else this._order.splice(G,0,Q);return this._reorderDom(),!0}clear(){this._ensureAlive();for(let X of this._order)this._removeItem(X);this._order=[],this._data.clear()}adopt(X,V={}){if(this._ensureAlive(),!Array.isArray(X))throw Error("uiSession.list.adopt: items must be an array");if(this._order.length>0)throw Error(`uiSession.list.adopt: list on (${this._parent}, ${this._slot}) is not empty (${this._order.length} item(s)). adopt() must run on a freshly-created list, before any push/sync/upsert.`);let Q=V.idPrefix||"",Z=this._slotElement(),G=Array.from(Z.children);if(G.length!==X.length)throw Error(`uiSession.list.adopt: row count mismatch - slot '${this._slot}' contains ${G.length} child element(s) but ${X.length} item(s) were passed. SSR and client must agree on the initial set.`);let W=this._block.template,O=W.filter((B)=>B.parent==null);if(O.length!==1)throw Error(`uiSession.list.adopt: row template must have exactly one root (found ${O.length}). Multi-root row templates can't be unambiguously adopted - recreate via push/sync instead.`);let J=O[0].id,$=this._ui._container,Y=(B)=>Q?`${Q}:${B}`:B,U=new Set;for(let B=0;B<X.length;++B){let z=X[B],F=G[B],q=this._key(z);if(U.has(q))throw Error(`uiSession.list.adopt: duplicate key '${q}'`);U.add(q);let D=this._itemId(q),A=new Map;for(let N of W){let w;if(N.id===J)w=F;else w=F.querySelector(`[data-fw-id="${CSS.escape(Y(N.id))}"]`);if(!w)throw Error(`uiSession.list.adopt: row ${B} (key='${q}'): no DOM node found for data-fw-id="${Y(N.id)}" (elm.id='${N.id}'). Check that SSR was rendered with idPrefix='${Q}' and the same row template.`);let S=`${D}\x1F${N.id}`,I=N.parent!=null?`${D}\x1F${N.parent}`:void 0;C.adoptNode($,S,w,I),A.set(N.id,S)}this._ui._map.set(D,A);let T=this._ui._children.get(this._parent);if(!T)T=new Set,this._ui._children.set(this._parent,T);if(T.add(D),this._data.set(q,z),this._metaFn)this._meta.set(q,this._metaFn(z));if(this._order.push(q),this._onMount)try{this._onMount(q,z)}catch{}}return this}sync(X){if(this._ensureAlive(),!Array.isArray(X))throw Error("uiSession.list.sync: items must be an array");let V=Array(X.length),Q=new Set;for(let J=0;J<X.length;++J){let $=this._key(X[J]);if(Q.has($))throw Error(`uiSession.list.sync: duplicate key '${$}'`);Q.add($),V[J]=$}let Z={added:new Set,kept:new Set,updated:new Set,removed:new Set,reordered:!1};this._order=this._order.filter((J)=>{if(Q.has(J))return!0;return this._removeItem(J),this._data.delete(J),Z.removed.add(J),!1});let G=!1;for(let J=0;J<X.length;++J){let $=V[J],Y=X[J];if(!this._data.has($))this._addItem($,Y,!1),Z.added.add($);else{let U=this._data.get($);if(this._eq(U,Y))Z.kept.add($);else{let B=this._replaceItem($,Y);if(B==="unchanged")Z.kept.add($);else if(Z.updated.add($),B==="replaced")G=!0}}}let W=[...this._order];for(let J of V)if(Z.added.has(J))W.push(J);let O=G;if(!O){for(let J=0;J<V.length;++J)if(W[J]!==V[J]){O=!0;break}}if(this._order=V,O)this._reorderDom(),Z.reordered=!0;return Z}}return{UIList:L,methods:{list(X,V,Q){let Z=this._lists.get(X);if(Z&&Z.has(V)){let W=Z.get(V);if(Q&&Q.block&&Q.block!==W._block)throw Error(`uiSession.list: list on (${X}, ${V}) already exists with a different block - pass the same ParseResult, or remove the parent first.`);return W}let G=new L(this,X,V,Q);if(!Z)Z=new Map,this._lists.set(X,Z);return Z.set(V,G),G}}}}};var MJ={name:"uiSession",version:"1.0.0",type:"fw.dom.rendering",dependencies:["uiSessionCore","uiSessionDirect","uiSessionList"],deps:[k$,v$,y$],factory(C,K,R){class j{constructor(H){this._container=H,this._attach=new Map,this._map=new Map,this._listeners=new Map,this._lseq=0,this._lists=new Map,this._unmount=new Map,this._mount=new Map,this._children=new Map}}return Object.assign(j.prototype,C.methods,K.methods,R.methods),function(H){return new j(H)}}};var LJ={name:"devtools",version:"1.0.0",type:"fw.dom.rendering",dependencies:["clock"],deps:[x$],factory(C){let K=C;function R(X){if(!X||typeof X!=="object")throw Error("devtools.inspect: session argument is required");let V={container:X._container||null,blocks:[],attaches:[],children:[],listeners:[],mountHooks:[],unmountHooks:[],lists:[],portals:[]};if(X._map)for(let[Q,Z]of X._map)if(Array.isArray(Z))V.blocks.push({id:Q,logicalIds:Z.map((G)=>[...G.keys()]),isLoop:!0});else V.blocks.push({id:Q,logicalIds:[...Z.keys()],isLoop:!1});if(X._attach)for(let[Q,Z]of X._attach){let G=Z&&Z.content?[...Z.content.keys()]:[];V.attaches.push({blockId:Q,slots:G})}if(X._children)for(let[Q,Z]of X._children)V.children.push({parent:Q,children:[...Z]});if(X._listeners)for(let[Q,Z]of X._listeners)for(let[G,W]of Z)V.listeners.push({blockId:Q,logicalId:G,names:[...W]});if(X._mount)for(let[Q]of X._mount)V.mountHooks.push(Q);if(X._unmount)for(let[Q]of X._unmount)V.unmountHooks.push(Q);if(X._lists)for(let[Q,Z]of X._lists)for(let[G,W]of Z)V.lists.push({parent:Q,slot:G,size:W.size,disposed:!!W._disposed});if(X._portals)for(let[Q,Z]of X._portals)V.portals.push({name:Q,container:Z._container});return V}function j(X){return R(X).blocks.map((Q)=>`${Q.id}(${Q.isLoop?`loop×${Q.logicalIds.length}`:Q.logicalIds.join(",")})`).join(" ")}function H(X,V={}){let Q=Array.isArray(X)?X:X&&X.template||[],Z=V.indent||" ",G=new Map(Q.map((Y)=>[Y.id,Y])),W=new Map,O=[];for(let Y of Q)if(Y.parent&&G.has(Y.parent)){if(!W.has(Y.parent))W.set(Y.parent,[]);W.get(Y.parent).push(Y.id)}else O.push(Y.id);let J=[];function $(Y,U){let B=G.get(Y);if(!B)return;let z=Z.repeat(U),F=[`<${B.tag}#${B.id}>`];if(B.text!=null)F.push(`text=${JSON.stringify(B.text)}`);if(B.content)F.push(`slot=${JSON.stringify(B.content)}`);if(B.attrs&&B.attrs.length)F.push(`attrs=[${B.attrs.join(",")}]`);if(B.map&&B.map.length){let D=B.map.map((A)=>`${A.data?"@":"$"}${A.prop}=#{${A.name}}`+(A.append?"+":A.prepend?"^":"=")).join(",");F.push(`map=[${D}]`)}J.push(z+F.join(" "));let q=W.get(Y)||[];for(let D of q)$(D,U+1)}for(let Y of O)$(Y,0);if(X&&X.iterates)for(let Y of Object.keys(X.iterates))J.push(`-- iterate: ${Y} --`),J.push(H({template:X.iterates[Y]},V));return J.join(`
36
- `)}function P(X){if(typeof X!=="function")throw Error("devtools.profile: fn must be a function");let V=K.monotonic(),Q=X(),Z=K.monotonic();return{result:Q,durationMs:Z-V}}async function L(X){if(typeof X!=="function")throw Error("devtools.profileAsync: fn must be a function");let V=K.monotonic(),Q=await X(),Z=K.monotonic();return{result:Q,durationMs:Z-V}}function M(){let X=K,V=X.monotonic(),Q=[];return{mark(Z){let G=X.monotonic();if(Q.length>0){let W=Q[Q.length-1];W.durationMs=G-W._startedAt,delete W._startedAt}Q.push({name:Z,_startedAt:G})},end(){let Z=X.monotonic();if(Q.length>0){let G=Q[Q.length-1];G.durationMs=Z-G._startedAt,delete G._startedAt}return{total:Z-V,segments:Q}}}}return{inspect:R,summarize:j,dumpTemplate:H,profile:P,profileAsync:L,timer:M}}};var OJ={name:"htmlEntities",version:"1.0.0",type:"fw.io.text",dependencies:[],factory(){let K=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Abreve":"Ă","Acirc":"Â","Acy":"А","Afr":"\uD835\uDD04","Agrave":"À","Alpha":"Α","Amacr":"Ā","And":"⩓","Aogon":"Ą","Aopf":"\uD835\uDD38","ApplyFunction":"⁡","Aring":"Å","Ascr":"\uD835\uDC9C","Assign":"≔","Atilde":"Ã","Auml":"Ä","Backslash":"∖","Barv":"⫧","Barwed":"⌆","Bcy":"Б","Because":"∵","Bernoullis":"ℬ","Beta":"Β","Bfr":"\uD835\uDD05","Bopf":"\uD835\uDD39","Breve":"˘","Bscr":"ℬ","Bumpeq":"≎","CHcy":"Ч","COPY":"©","Cacute":"Ć","Cap":"⋒","CapitalDifferentialD":"ⅅ","Cayleys":"ℭ","Ccaron":"Č","Ccedil":"Ç","Ccirc":"Ĉ","Cconint":"∰","Cdot":"Ċ","Cedilla":"¸","CenterDot":"·","Cfr":"ℭ","Chi":"Χ","CircleDot":"⊙","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","Colon":"∷","Colone":"⩴","Congruent":"≡","Conint":"∯","ContourIntegral":"∮","Copf":"ℂ","Coproduct":"∐","CounterClockwiseContourIntegral":"∳","Cross":"⨯","Cscr":"\uD835\uDC9E","Cup":"⋓","CupCap":"≍","DD":"ⅅ","DDotrahd":"⤑","DJcy":"Ђ","DScy":"Ѕ","DZcy":"Џ","Dagger":"‡","Darr":"↡","Dashv":"⫤","Dcaron":"Ď","Dcy":"Д","Del":"∇","Delta":"Δ","Dfr":"\uD835\uDD07","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","Diamond":"⋄","DifferentialD":"ⅆ","Dopf":"\uD835\uDD3B","Dot":"¨","DotDot":"⃜","DotEqual":"≐","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrow":"↓","DownArrowBar":"⤓","DownArrowUpArrow":"⇵","DownBreve":"̑","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVector":"↽","DownLeftVectorBar":"⥖","DownRightTeeVector":"⥟","DownRightVector":"⇁","DownRightVectorBar":"⥗","DownTee":"⊤","DownTeeArrow":"↧","Downarrow":"⇓","Dscr":"\uD835\uDC9F","Dstrok":"Đ","ENG":"Ŋ","ETH":"Ð","Eacute":"É","Ecaron":"Ě","Ecirc":"Ê","Ecy":"Э","Edot":"Ė","Efr":"\uD835\uDD08","Egrave":"È","Element":"∈","Emacr":"Ē","EmptySmallSquare":"◻","EmptyVerySmallSquare":"▫","Eogon":"Ę","Eopf":"\uD835\uDD3C","Epsilon":"Ε","Equal":"⩵","EqualTilde":"≂","Equilibrium":"⇌","Escr":"ℰ","Esim":"⩳","Eta":"Η","Euml":"Ë","Exists":"∃","ExponentialE":"ⅇ","Fcy":"Ф","Ffr":"\uD835\uDD09","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","Fopf":"\uD835\uDD3D","ForAll":"∀","Fouriertrf":"ℱ","Fscr":"ℱ","GJcy":"Ѓ","GT":">","Gamma":"Γ","Gammad":"Ϝ","Gbreve":"Ğ","Gcedil":"Ģ","Gcirc":"Ĝ","Gcy":"Г","Gdot":"Ġ","Gfr":"\uD835\uDD0A","Gg":"⋙","Gopf":"\uD835\uDD3E","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"\uD835\uDCA2","Gt":"≫","HARDcy":"Ъ","Hacek":"ˇ","Hat":"^","Hcirc":"Ĥ","Hfr":"ℌ","HilbertSpace":"ℋ","Hopf":"ℍ","HorizontalLine":"─","Hscr":"ℋ","Hstrok":"Ħ","HumpDownHump":"≎","HumpEqual":"≏","IEcy":"Е","IJlig":"IJ","IOcy":"Ё","Iacute":"Í","Icirc":"Î","Icy":"И","Idot":"İ","Ifr":"ℑ","Igrave":"Ì","Im":"ℑ","Imacr":"Ī","ImaginaryI":"ⅈ","Implies":"⇒","Int":"∬","Integral":"∫","Intersection":"⋂","InvisibleComma":"⁣","InvisibleTimes":"⁢","Iogon":"Į","Iopf":"\uD835\uDD40","Iota":"Ι","Iscr":"ℐ","Itilde":"Ĩ","Iukcy":"І","Iuml":"Ï","Jcirc":"Ĵ","Jcy":"Й","Jfr":"\uD835\uDD0D","Jopf":"\uD835\uDD41","Jscr":"\uD835\uDCA5","Jsercy":"Ј","Jukcy":"Є","KHcy":"Х","KJcy":"Ќ","Kappa":"Κ","Kcedil":"Ķ","Kcy":"К","Kfr":"\uD835\uDD0E","Kopf":"\uD835\uDD42","Kscr":"\uD835\uDCA6","LJcy":"Љ","LT":"<","Lacute":"Ĺ","Lambda":"Λ","Lang":"⟪","Laplacetrf":"ℒ","Larr":"↞","Lcaron":"Ľ","Lcedil":"Ļ","Lcy":"Л","LeftAngleBracket":"⟨","LeftArrow":"←","LeftArrowBar":"⇤","LeftArrowRightArrow":"⇆","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVector":"⇃","LeftDownVectorBar":"⥙","LeftFloor":"⌊","LeftRightArrow":"↔","LeftRightVector":"⥎","LeftTee":"⊣","LeftTeeArrow":"↤","LeftTeeVector":"⥚","LeftTriangle":"⊲","LeftTriangleBar":"⧏","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVector":"↿","LeftUpVectorBar":"⥘","LeftVector":"↼","LeftVectorBar":"⥒","Leftarrow":"⇐","Leftrightarrow":"⇔","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","LessLess":"⪡","LessSlantEqual":"⩽","LessTilde":"≲","Lfr":"\uD835\uDD0F","Ll":"⋘","Lleftarrow":"⇚","Lmidot":"Ŀ","LongLeftArrow":"⟵","LongLeftRightArrow":"⟷","LongRightArrow":"⟶","Longleftarrow":"⟸","Longleftrightarrow":"⟺","Longrightarrow":"⟹","Lopf":"\uD835\uDD43","LowerLeftArrow":"↙","LowerRightArrow":"↘","Lscr":"ℒ","Lsh":"↰","Lstrok":"Ł","Lt":"≪","Map":"⤅","Mcy":"М","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"\uD835\uDD10","MinusPlus":"∓","Mopf":"\uD835\uDD44","Mscr":"ℳ","Mu":"Μ","NJcy":"Њ","Nacute":"Ń","Ncaron":"Ň","Ncedil":"Ņ","Ncy":"Н","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","Nfr":"\uD835\uDD11","NoBreak":"⁠","NonBreakingSpace":" ","Nopf":"ℕ","Not":"⫬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","NotLeftTriangle":"⋪","NotLeftTriangleBar":"⧏̸","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangle":"⋫","NotRightTriangleBar":"⧐̸","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","Nscr":"\uD835\uDCA9","Ntilde":"Ñ","Nu":"Ν","OElig":"Œ","Oacute":"Ó","Ocirc":"Ô","Ocy":"О","Odblac":"Ő","Ofr":"\uD835\uDD12","Ograve":"Ò","Omacr":"Ō","Omega":"Ω","Omicron":"Ο","Oopf":"\uD835\uDD46","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","Or":"⩔","Oscr":"\uD835\uDCAA","Oslash":"Ø","Otilde":"Õ","Otimes":"⨷","Ouml":"Ö","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","PartialD":"∂","Pcy":"П","Pfr":"\uD835\uDD13","Phi":"Φ","Pi":"Π","PlusMinus":"±","Poincareplane":"ℌ","Popf":"ℙ","Pr":"⪻","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","Prime":"″","Product":"∏","Proportion":"∷","Proportional":"∝","Pscr":"\uD835\uDCAB","Psi":"Ψ","QUOT":"\\"","Qfr":"\uD835\uDD14","Qopf":"ℚ","Qscr":"\uD835\uDCAC","RBarr":"⤐","REG":"®","Racute":"Ŕ","Rang":"⟫","Rarr":"↠","Rarrtl":"⤖","Rcaron":"Ř","Rcedil":"Ŗ","Rcy":"Р","Re":"ℜ","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","Rfr":"ℜ","Rho":"Ρ","RightAngleBracket":"⟩","RightArrow":"→","RightArrowBar":"⇥","RightArrowLeftArrow":"⇄","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVector":"⇂","RightDownVectorBar":"⥕","RightFloor":"⌋","RightTee":"⊢","RightTeeArrow":"↦","RightTeeVector":"⥛","RightTriangle":"⊳","RightTriangleBar":"⧐","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVector":"↾","RightUpVectorBar":"⥔","RightVector":"⇀","RightVectorBar":"⥓","Rightarrow":"⇒","Ropf":"ℝ","RoundImplies":"⥰","Rrightarrow":"⇛","Rscr":"ℛ","Rsh":"↱","RuleDelayed":"⧴","SHCHcy":"Щ","SHcy":"Ш","SOFTcy":"Ь","Sacute":"Ś","Sc":"⪼","Scaron":"Š","Scedil":"Ş","Scirc":"Ŝ","Scy":"С","Sfr":"\uD835\uDD16","ShortDownArrow":"↓","ShortLeftArrow":"←","ShortRightArrow":"→","ShortUpArrow":"↑","Sigma":"Σ","SmallCircle":"∘","Sopf":"\uD835\uDD4A","Sqrt":"√","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","Sscr":"\uD835\uDCAE","Star":"⋆","Sub":"⋐","Subset":"⋐","SubsetEqual":"⊆","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","SuchThat":"∋","Sum":"∑","Sup":"⋑","Superset":"⊃","SupersetEqual":"⊇","Supset":"⋑","THORN":"Þ","TRADE":"™","TSHcy":"Ћ","TScy":"Ц","Tab":"\\t","Tau":"Τ","Tcaron":"Ť","Tcedil":"Ţ","Tcy":"Т","Tfr":"\uD835\uDD17","Therefore":"∴","Theta":"Θ","ThickSpace":"  ","ThinSpace":" ","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","Topf":"\uD835\uDD4B","TripleDot":"⃛","Tscr":"\uD835\uDCAF","Tstrok":"Ŧ","Uacute":"Ú","Uarr":"↟","Uarrocir":"⥉","Ubrcy":"Ў","Ubreve":"Ŭ","Ucirc":"Û","Ucy":"У","Udblac":"Ű","Ufr":"\uD835\uDD18","Ugrave":"Ù","Umacr":"Ū","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","Uopf":"\uD835\uDD4C","UpArrow":"↑","UpArrowBar":"⤒","UpArrowDownArrow":"⇅","UpDownArrow":"↕","UpEquilibrium":"⥮","UpTee":"⊥","UpTeeArrow":"↥","Uparrow":"⇑","Updownarrow":"⇕","UpperLeftArrow":"↖","UpperRightArrow":"↗","Upsi":"ϒ","Upsilon":"Υ","Uring":"Ů","Uscr":"\uD835\uDCB0","Utilde":"Ũ","Uuml":"Ü","VDash":"⊫","Vbar":"⫫","Vcy":"В","Vdash":"⊩","Vdashl":"⫦","Vee":"⋁","Verbar":"‖","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"\uD835\uDD19","Vopf":"\uD835\uDD4D","Vscr":"\uD835\uDCB1","Vvdash":"⊪","Wcirc":"Ŵ","Wedge":"⋀","Wfr":"\uD835\uDD1A","Wopf":"\uD835\uDD4E","Wscr":"\uD835\uDCB2","Xfr":"\uD835\uDD1B","Xi":"Ξ","Xopf":"\uD835\uDD4F","Xscr":"\uD835\uDCB3","YAcy":"Я","YIcy":"Ї","YUcy":"Ю","Yacute":"Ý","Ycirc":"Ŷ","Ycy":"Ы","Yfr":"\uD835\uDD1C","Yopf":"\uD835\uDD50","Yscr":"\uD835\uDCB4","Yuml":"Ÿ","ZHcy":"Ж","Zacute":"Ź","Zcaron":"Ž","Zcy":"З","Zdot":"Ż","ZeroWidthSpace":"​","Zeta":"Ζ","Zfr":"ℨ","Zopf":"ℤ","Zscr":"\uD835\uDCB5","aacute":"á","abreve":"ă","ac":"∾","acE":"∾̳","acd":"∿","acirc":"â","acute":"´","acy":"а","aelig":"æ","af":"⁡","afr":"\uD835\uDD1E","agrave":"à","alefsym":"ℵ","aleph":"ℵ","alpha":"α","amacr":"ā","amalg":"⨿","amp":"&","and":"∧","andand":"⩕","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsd":"∡","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","aogon":"ą","aopf":"\uD835\uDD52","ap":"≈","apE":"⩰","apacir":"⩯","ape":"≊","apid":"≋","apos":"\'","approx":"≈","approxeq":"≊","aring":"å","ascr":"\uD835\uDCB6","ast":"*","asymp":"≈","asympeq":"≍","atilde":"ã","auml":"ä","awconint":"∳","awint":"⨑","bNot":"⫭","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","barvee":"⊽","barwed":"⌅","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","beta":"β","beth":"ℶ","between":"≬","bfr":"\uD835\uDD1F","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bnot":"⌐","bopf":"\uD835\uDD53","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxDL":"╗","boxDR":"╔","boxDl":"╖","boxDr":"╓","boxH":"═","boxHD":"╦","boxHU":"╩","boxHd":"╤","boxHu":"╧","boxUL":"╝","boxUR":"╚","boxUl":"╜","boxUr":"╙","boxV":"║","boxVH":"╬","boxVL":"╣","boxVR":"╠","boxVh":"╫","boxVl":"╢","boxVr":"╟","boxbox":"⧉","boxdL":"╕","boxdR":"╒","boxdl":"┐","boxdr":"┌","boxh":"─","boxhD":"╥","boxhU":"╨","boxhd":"┬","boxhu":"┴","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxuL":"╛","boxuR":"╘","boxul":"┘","boxur":"└","boxv":"│","boxvH":"╪","boxvL":"╡","boxvR":"╞","boxvh":"┼","boxvl":"┤","boxvr":"├","bprime":"‵","breve":"˘","brvbar":"¦","bscr":"\uD835\uDCB7","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsol":"\\\\","bsolb":"⧅","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","bumpeq":"≏","cacute":"ć","cap":"∩","capand":"⩄","capbrcup":"⩉","capcap":"⩋","capcup":"⩇","capdot":"⩀","caps":"∩︀","caret":"⁁","caron":"ˇ","ccaps":"⩍","ccaron":"č","ccedil":"ç","ccirc":"ĉ","ccups":"⩌","ccupssm":"⩐","cdot":"ċ","cedil":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","cfr":"\uD835\uDD20","chcy":"ч","check":"✓","checkmark":"✓","chi":"χ","cir":"○","cirE":"⧃","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledR":"®","circledS":"Ⓢ","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","clubs":"♣","clubsuit":"♣","colon":":","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","conint":"∮","copf":"\uD835\uDD54","coprod":"∐","copy":"©","copysr":"℗","crarr":"↵","cross":"✗","cscr":"\uD835\uDCB8","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cup":"∪","cupbrcap":"⩈","cupcap":"⩆","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dArr":"⇓","dHar":"⥥","dagger":"†","daleth":"ℸ","darr":"↓","dash":"‐","dashv":"⊣","dbkarow":"⤏","dblac":"˝","dcaron":"ď","dcy":"д","dd":"ⅆ","ddagger":"‡","ddarr":"⇊","ddotseq":"⩷","deg":"°","delta":"δ","demptyv":"⦱","dfisht":"⥿","dfr":"\uD835\uDD21","dharl":"⇃","dharr":"⇂","diam":"⋄","diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","dopf":"\uD835\uDD55","dot":"˙","doteq":"≐","doteqdot":"≑","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","downarrow":"↓","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","dscr":"\uD835\uDCB9","dscy":"ѕ","dsol":"⧶","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","dzcy":"џ","dzigrarr":"⟿","eDDot":"⩷","eDot":"≑","eacute":"é","easter":"⩮","ecaron":"ě","ecir":"≖","ecirc":"ê","ecolon":"≕","ecy":"э","edot":"ė","ee":"ⅇ","efDot":"≒","efr":"\uD835\uDD22","eg":"⪚","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","emacr":"ē","empty":"∅","emptyset":"∅","emptyv":"∅","emsp13":" ","emsp14":" ","emsp":" ","eng":"ŋ","ensp":" ","eogon":"ę","eopf":"\uD835\uDD56","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","equals":"=","equest":"≟","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erDot":"≓","erarr":"⥱","escr":"ℯ","esdot":"≐","esim":"≂","eta":"η","eth":"ð","euml":"ë","euro":"€","excl":"!","exist":"∃","expectation":"ℰ","exponentiale":"ⅇ","fallingdotseq":"≒","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","ffr":"\uD835\uDD23","filig":"fi","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","fopf":"\uD835\uDD57","forall":"∀","fork":"⋔","forkv":"⫙","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"\uD835\uDCBB","gE":"≧","gEl":"⪌","gacute":"ǵ","gamma":"γ","gammad":"ϝ","gap":"⪆","gbreve":"ğ","gcirc":"ĝ","gcy":"г","gdot":"ġ","ge":"≥","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","ges":"⩾","gescc":"⪩","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","gfr":"\uD835\uDD24","gg":"≫","ggg":"⋙","gimel":"ℷ","gjcy":"ѓ","gl":"≷","glE":"⪒","gla":"⪥","glj":"⪤","gnE":"≩","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gneq":"⪈","gneqq":"≩","gnsim":"⋧","gopf":"\uD835\uDD58","grave":"`","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gt":">","gtcc":"⪧","gtcir":"⩺","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","hArr":"⇔","hairsp":" ","half":"½","hamilt":"ℋ","hardcy":"ъ","harr":"↔","harrcir":"⥈","harrw":"↭","hbar":"ℏ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"\uD835\uDD25","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"\uD835\uDD59","horbar":"―","hscr":"\uD835\uDCBD","hslash":"ℏ","hstrok":"ħ","hybull":"⁃","hyphen":"‐","iacute":"í","ic":"⁣","icirc":"î","icy":"и","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"\uD835\uDD26","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","ijlig":"ij","imacr":"ī","image":"ℑ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","imof":"⊷","imped":"Ƶ","in":"∈","incare":"℅","infin":"∞","infintie":"⧝","inodot":"ı","int":"∫","intcal":"⊺","integers":"ℤ","intercal":"⊺","intlarhk":"⨗","intprod":"⨼","iocy":"ё","iogon":"į","iopf":"\uD835\uDD5A","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"\uD835\uDCBE","isin":"∈","isinE":"⋹","isindot":"⋵","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","itilde":"ĩ","iukcy":"і","iuml":"ï","jcirc":"ĵ","jcy":"й","jfr":"\uD835\uDD27","jmath":"ȷ","jopf":"\uD835\uDD5B","jscr":"\uD835\uDCBF","jsercy":"ј","jukcy":"є","kappa":"κ","kappav":"ϰ","kcedil":"ķ","kcy":"к","kfr":"\uD835\uDD28","kgreen":"ĸ","khcy":"х","kjcy":"ќ","kopf":"\uD835\uDD5C","kscr":"\uD835\uDCC0","lAarr":"⇚","lArr":"⇐","lAtail":"⤛","lBarr":"⤎","lE":"≦","lEg":"⪋","lHar":"⥢","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","lambda":"λ","lang":"⟨","langd":"⦑","langle":"⟨","lap":"⪅","laquo":"«","larr":"←","larrb":"⇤","larrbfs":"⤟","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","lat":"⪫","latail":"⤙","late":"⪭","lates":"⪭︀","lbarr":"⤌","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","lcaron":"ľ","lcedil":"ļ","lceil":"⌈","lcub":"{","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","leftarrow":"←","leftarrowtail":"↢","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","leftthreetimes":"⋋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","les":"⩽","lescc":"⪨","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","lessgtr":"≶","lesssim":"≲","lfisht":"⥼","lfloor":"⌊","lfr":"\uD835\uDD29","lg":"≶","lgE":"⪑","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","ljcy":"љ","ll":"≪","llarr":"⇇","llcorner":"⌞","llhard":"⥫","lltri":"◺","lmidot":"ŀ","lmoust":"⎰","lmoustache":"⎰","lnE":"≨","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","longleftrightarrow":"⟷","longmapsto":"⟼","longrightarrow":"⟶","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","lopf":"\uD835\uDD5D","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"\uD835\uDCC1","lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","lstrok":"ł","lt":"<","ltcc":"⪦","ltcir":"⩹","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltrPar":"⦖","ltri":"◃","ltrie":"⊴","ltrif":"◂","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","mDDot":"∺","macr":"¯","male":"♂","malt":"✠","maltese":"✠","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","mcy":"м","mdash":"-","measuredangle":"∡","mfr":"\uD835\uDD2A","mho":"℧","micro":"µ","mid":"∣","midast":"*","midcir":"⫰","middot":"·","minus":"−","minusb":"⊟","minusd":"∸","minusdu":"⨪","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","mopf":"\uD835\uDD5E","mp":"∓","mscr":"\uD835\uDCC2","mstpos":"∾","mu":"μ","multimap":"⊸","mumap":"⊸","nGg":"⋙̸","nGt":"≫⃒","nGtv":"≫̸","nLeftarrow":"⇍","nLeftrightarrow":"⇎","nLl":"⋘̸","nLt":"≪⃒","nLtv":"≪̸","nRightarrow":"⇏","nVDash":"⊯","nVdash":"⊮","nabla":"∇","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natur":"♮","natural":"♮","naturals":"ℕ","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","ncaron":"ň","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","ncy":"н","ndash":"–","ne":"≠","neArr":"⇗","nearhk":"⤤","nearr":"↗","nearrow":"↗","nedot":"≐̸","nequiv":"≢","nesear":"⤨","nesim":"≂̸","nexist":"∄","nexists":"∄","nfr":"\uD835\uDD2B","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","ngsim":"≵","ngt":"≯","ngtr":"≯","nhArr":"⇎","nharr":"↮","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","njcy":"њ","nlArr":"⇍","nlE":"≦̸","nlarr":"↚","nldr":"‥","nle":"≰","nleftarrow":"↚","nleftrightarrow":"↮","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nlsim":"≴","nlt":"≮","nltri":"⋪","nltrie":"⋬","nmid":"∤","nopf":"\uD835\uDD5F","not":"¬","notin":"∉","notinE":"⋹̸","notindot":"⋵̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","npar":"∦","nparallel":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","npre":"⪯̸","nprec":"⊀","npreceq":"⪯̸","nrArr":"⇏","nrarr":"↛","nrarrc":"⤳̸","nrarrw":"↝̸","nrightarrow":"↛","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","nscr":"\uD835\uDCC3","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","nu":"ν","num":"#","numero":"№","numsp":" ","nvDash":"⊭","nvHarr":"⤄","nvap":"≍⃒","nvdash":"⊬","nvge":"≥⃒","nvgt":">⃒","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwArr":"⇖","nwarhk":"⤣","nwarr":"↖","nwarrow":"↖","nwnear":"⤧","oS":"Ⓢ","oacute":"ó","oast":"⊛","ocir":"⊚","ocirc":"ô","ocy":"о","odash":"⊝","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","oelig":"œ","ofcir":"⦿","ofr":"\uD835\uDD2C","ogon":"˛","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","omacr":"ō","omega":"ω","omicron":"ο","omid":"⦶","ominus":"⊖","oopf":"\uD835\uDD60","opar":"⦷","operp":"⦹","oplus":"⊕","or":"∨","orarr":"↻","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oscr":"ℴ","oslash":"ø","osol":"⊘","otilde":"õ","otimes":"⊗","otimesas":"⨶","ouml":"ö","ovbar":"⌽","par":"∥","para":"¶","parallel":"∥","parsim":"⫳","parsl":"⫽","part":"∂","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","pfr":"\uD835\uDD2D","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plus":"+","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plusdo":"∔","plusdu":"⨥","pluse":"⩲","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","pointint":"⨕","popf":"\uD835\uDD61","pound":"£","pr":"≺","prE":"⪳","prap":"⪷","prcue":"≼","pre":"⪯","prec":"≺","precapprox":"⪷","preccurlyeq":"≼","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","precsim":"≾","prime":"′","primes":"ℙ","prnE":"⪵","prnap":"⪹","prnsim":"⋨","prod":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","propto":"∝","prsim":"≾","prurel":"⊰","pscr":"\uD835\uDCC5","psi":"ψ","puncsp":" ","qfr":"\uD835\uDD2E","qint":"⨌","qopf":"\uD835\uDD62","qprime":"⁗","qscr":"\uD835\uDCC6","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","rAarr":"⇛","rArr":"⇒","rAtail":"⤜","rBarr":"⤏","rHar":"⥤","race":"∽̱","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarr":"→","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","rarrtl":"↣","rarrw":"↝","ratail":"⤚","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","rcaron":"ř","rcedil":"ŗ","rceil":"⌉","rcub":"}","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","rect":"▭","reg":"®","rfisht":"⥽","rfloor":"⌋","rfr":"\uD835\uDD2F","rhard":"⇁","rharu":"⇀","rharul":"⥬","rho":"ρ","rhov":"ϱ","rightarrow":"→","rightarrowtail":"↣","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","rightthreetimes":"⋌","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoust":"⎱","rmoustache":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"\uD835\uDD63","roplus":"⨮","rotimes":"⨵","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","rsaquo":"›","rscr":"\uD835\uDCC7","rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","ruluhar":"⥨","rx":"℞","sacute":"ś","sbquo":"‚","sc":"≻","scE":"⪴","scap":"⪸","scaron":"š","sccue":"≽","sce":"⪰","scedil":"ş","scirc":"ŝ","scnE":"⪶","scnap":"⪺","scnsim":"⋩","scpolint":"⨓","scsim":"≿","scy":"с","sdot":"⋅","sdotb":"⊡","sdote":"⩦","seArr":"⇘","searhk":"⤥","searr":"↘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","sfr":"\uD835\uDD30","sfrown":"⌢","sharp":"♯","shchcy":"щ","shcy":"ш","shortmid":"∣","shortparallel":"∥","shy":"­","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","softcy":"ь","sol":"/","solb":"⧄","solbar":"⌿","sopf":"\uD835\uDD64","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","squ":"□","square":"□","squarf":"▪","squf":"▪","srarr":"→","sscr":"\uD835\uDCC8","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","subE":"⫅","subdot":"⪽","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","subseteq":"⊆","subseteqq":"⫅","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succ":"≻","succapprox":"⪸","succcurlyeq":"≽","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","supE":"⫆","supdot":"⪾","supdsub":"⫘","supe":"⊇","supedot":"⫄","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swArr":"⇙","swarhk":"⤦","swarr":"↙","swarrow":"↙","swnwar":"⤪","szlig":"ß","target":"⌖","tau":"τ","tbrk":"⎴","tcaron":"ť","tcedil":"ţ","tcy":"т","tdot":"⃛","telrec":"⌕","tfr":"\uD835\uDD31","there4":"∴","therefore":"∴","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","thinsp":" ","thkap":"≈","thksim":"∼","thorn":"þ","tilde":"˜","times":"×","timesb":"⊠","timesbar":"⨱","timesd":"⨰","tint":"∭","toea":"⤨","top":"⊤","topbot":"⌶","topcir":"⫱","topf":"\uD835\uDD65","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","tscr":"\uD835\uDCC9","tscy":"ц","tshcy":"ћ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","uArr":"⇑","uHar":"⥣","uacute":"ú","uarr":"↑","ubrcy":"ў","ubreve":"ŭ","ucirc":"û","ucy":"у","udarr":"⇅","udblac":"ű","udhar":"⥮","ufisht":"⥾","ufr":"\uD835\uDD32","ugrave":"ù","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","umacr":"ū","uml":"¨","uogon":"ų","uopf":"\uD835\uDD66","uparrow":"↑","updownarrow":"↕","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","upsi":"υ","upsih":"ϒ","upsilon":"υ","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","uring":"ů","urtri":"◹","uscr":"\uD835\uDCCA","utdot":"⋰","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","uuml":"ü","uwangle":"⦧","vArr":"⇕","vBar":"⫨","vBarv":"⫩","vDash":"⊨","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vcy":"в","vdash":"⊢","vee":"∨","veebar":"⊻","veeeq":"≚","vellip":"⋮","verbar":"|","vert":"|","vfr":"\uD835\uDD33","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","vopf":"\uD835\uDD67","vprop":"∝","vrtri":"⊳","vscr":"\uD835\uDCCB","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","vzigzag":"⦚","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","wedgeq":"≙","weierp":"℘","wfr":"\uD835\uDD34","wopf":"\uD835\uDD68","wp":"℘","wr":"≀","wreath":"≀","wscr":"\uD835\uDCCC","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","xfr":"\uD835\uDD35","xhArr":"⟺","xharr":"⟷","xi":"ξ","xlArr":"⟸","xlarr":"⟵","xmap":"⟼","xnis":"⋻","xodot":"⨀","xopf":"\uD835\uDD69","xoplus":"⨁","xotime":"⨂","xrArr":"⟹","xrarr":"⟶","xscr":"\uD835\uDCCD","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","yacute":"ý","yacy":"я","ycirc":"ŷ","ycy":"ы","yen":"¥","yfr":"\uD835\uDD36","yicy":"ї","yopf":"\uD835\uDD6A","yscr":"\uD835\uDCCE","yucy":"ю","yuml":"ÿ","zacute":"ź","zcaron":"ž","zcy":"з","zdot":"ż","zeetrf":"ℨ","zeta":"ζ","zfr":"\uD835\uDD37","zhcy":"ж","zigrarr":"⇝","zopf":"\uD835\uDD6B","zscr":"\uD835\uDCCF","zwj":"‍","zwnj":"‌"}'),R="�",j={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},H=/&(?:#[xX]([0-9a-fA-F]+)|#([0-9]+)|([A-Za-z][A-Za-z0-9]*));/g,P=/&(?:#[xX]([0-9a-fA-F]+);?|#([0-9]+);?|([A-Za-z][A-Za-z0-9]*);?)/g;function L(V){if(V in j)return String.fromCodePoint(j[V]);if(V<0||V>1114111)return"�";if(V>=55296&&V<=57343)return"�";return String.fromCodePoint(V)}function M(V){if(typeof V!=="string"||V.indexOf("&")===-1)return V;return V.replace(H,(Q,Z,G,W)=>{if(Z!==void 0)return L(parseInt(Z,16));if(G!==void 0)return L(parseInt(G,10));let O=K[W];return O===void 0?Q:O})}function X(V){if(typeof V!=="string"||V.indexOf("&")===-1)return V;return V.replace(P,(Q,Z,G,W)=>{if(Z!==void 0)return L(parseInt(Z,16));if(G!==void 0)return L(parseInt(G,10));let O=K[W];return O===void 0?Q:O})}return{decodeHtmlStrict:M,decodeHtml:X,decodeCodePoint:L,HTML5_ENTITIES:K}}};var PJ={name:"csv",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let C=/^-?\d+$/,K=/^-?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?$/;function R(L){if(L==="")return"";if(L==="true")return!0;if(L==="false")return!1;if(L==="null")return null;if(C.test(L)){let M=Number(L);if(Number.isSafeInteger(M))return M;return L}if(K.test(L))return Number(L);return L}function j(L,M){M=M||{};let X=M.delimiter||",",V=M.quote||'"',Q=M.skipEmpty!==!1,Z=!!M.trim,G=!!M.cast,W=M.comment||null,O=M.skipLines|0;if(X.length!==1)throw Error("csv: delimiter must be a single character");if(V.length!==1)throw Error("csv: quote must be a single character");let J=0;if(L.charCodeAt(0)===65279)J=1;let $=[],Y="",U=[],B=!1,z=!1,F=L.length,q=0,D=()=>{U.push(Z&&!B?Y.trim():Y),Y="",B=!1},A=()=>{if(D(),U.length===1&&U[0]===""&&Q){U=[];return}if(W!==null&&U.length>0&&(Z?U[0].trimStart():U[0]).charAt(0)===W){U=[];return}if(q<O){q++,U=[];return}$.push(U),U=[]},T=J;while(T<F){let N=L[T];if(z){if(N===V){if(L[T+1]===V){Y+=V,T+=2;continue}z=!1,T++;continue}Y+=N,T++;continue}if(N===V&&Y===""){z=!0,B=!0,T++;continue}if(N===X){D(),T++;continue}if(N==="\r"){A(),T+=L[T+1]===`
37
- `?2:1;continue}if(N===`
38
- `){A(),T++;continue}Y+=N,T++}if(z)throw Error("csv: unterminated quoted field");if(Y!==""||U.length>0)A();if(G)for(let N=0;N<$.length;N++){let w=$[N];for(let S=0;S<w.length;S++)w[S]=R(w[S])}if(M.header){let N;if(Array.isArray(M.header))N=M.header;else{if($.length===0)return[];if(N=$.shift(),G)for(let S=0;S<N.length;S++)N[S]=String(N[S])}let w=Array($.length);for(let S=0;S<$.length;S++){let I={},v=$[S];for(let E=0;E<N.length;E++)I[N[E]]=v[E];w[S]=I}return w}return $}function H(L){if(L===null||L===void 0)return"";if(L instanceof Date)return L.toISOString();if(typeof L==="bigint")return L.toString();return String(L)}function P(L,M){M=M||{};let X=M.delimiter||",",V=M.quote||'"',Q=M.newline||`\r
39
- `;if(!L||L.length===0)return"";let Z=!Array.isArray(L[0])&&typeof L[0]==="object"&&L[0]!==null&&!(L[0]instanceof Date),G=null,W;if(Z){G=Array.isArray(M.header)?M.header:Object.keys(L[0]),W=Array(L.length);for(let z=0;z<L.length;z++){let F=L[z],q=Array(G.length);for(let D=0;D<G.length;D++)q[D]=F[G[D]];W[z]=q}}else if(W=L,Array.isArray(M.header))G=M.header;let O=(z)=>z.indexOf(X)>=0||z.indexOf(V)>=0||z.indexOf(`
40
- `)>=0||z.indexOf("\r")>=0,J=V,$=V+V,Y=(z)=>{if(O(z))return J+z.split(J).join($)+J;return z},U=[];if(G&&M.header!==!1){let z=Array(G.length);for(let F=0;F<G.length;F++)z[F]=Y(String(G[F]));U.push(z.join(X))}for(let z=0;z<W.length;z++){let F=W[z],q=Array(F.length);for(let D=0;D<F.length;D++)q[D]=Y(H(F[D]));U.push(q.join(X))}return U.join(Q)+Q}return{parse:j,stringify:P}}};var jJ={name:"xml",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){class C extends Error{constructor(J,$){super($);Object.defineProperty(this,"name",{value:"XmlParseError",writable:!0,configurable:!0}),this.code=J}}let K={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function R(J){return J.replace(/&(#x[0-9a-fA-F]+|#\d+|[a-zA-Z]+);/g,($,Y)=>{if(Y[0]==="#"){let U=Y[1]==="x"?parseInt(Y.slice(2),16):parseInt(Y.slice(1),10);if(isNaN(U)||U<0||U>1114111||U>=55296&&U<=57343)return $;return String.fromCodePoint(U)}return K[Y]!=null?K[Y]:$})}function j(J){return String(J).replace(/[&<>]/g,($)=>$==="&"?"&amp;":$==="<"?"&lt;":"&gt;")}function H(J){return String(J).replace(/[&<>"]/g,($)=>$==="&"?"&amp;":$==="<"?"&lt;":$===">"?"&gt;":"&quot;")}function P(J,$,Y){return{type:"element",name:J,attrs:$||{},children:Y||[]}}function L(J){return{type:"text",value:J}}function M(J,$){let Y=$+1,U=J.length,B="";while(Y<U){let z=J[Y];if(B){if(z===B)B=""}else if(z==='"'||z==="'")B=z;else if(z===">")return Y;Y++}return-1}function X(J){let $=0,Y=J.length;while($<Y&&!/\s/.test(J[$]))$++;let U=J.slice(0,$),B={};while($<Y){while($<Y&&/\s/.test(J[$]))$++;if($>=Y)break;let z=$;while(z<Y&&J[z]!=="="&&!/\s/.test(J[z]))z++;let F=J.slice($,z);if(!F)break;while(z<Y&&/\s/.test(J[z]))z++;if(J[z]!=="="){B[F]="",$=z;continue}z++;while(z<Y&&/\s/.test(J[z]))z++;let q=J[z];if(q!=='"'&&q!=="'")throw new C("xml/parse-error",`XML: unquoted attribute "${F}"`);let D=J.indexOf(q,z+1);if(D<0)throw new C("xml/parse-error",`XML: unterminated attribute "${F}"`);B[F]=R(J.slice(z+1,D)),$=D+1}return P(U,B)}function V(J){let $=0,Y=J.length;if(J.charCodeAt(0)===65279)$=1;let U=[],B=null;while($<Y)if(J[$]==="<"){if(J.startsWith("<?",$)){let A=J.indexOf("?>",$+2);if(A<0)throw new C("xml/parse-error","XML: unterminated processing instruction");$=A+2;continue}if(J.startsWith("<!--",$)){let A=J.indexOf("-->",$+4);if(A<0)throw new C("xml/parse-error","XML: unterminated comment");$=A+3;continue}if(J.startsWith("<![CDATA[",$)){let A=J.indexOf("]]>",$+9);if(A<0)throw new C("xml/parse-error","XML: unterminated CDATA");let T=J.slice($+9,A);if(U.length)U[U.length-1].children.push(L(T));$=A+3;continue}if(J.startsWith("<!",$)){let A=$+2,T=!1;while(A<Y){if(J[A]==="["){T=!0;break}if(J[A]===">")break;A++}if(T){let N=J.indexOf("]>",A+1);if(N<0)throw new C("xml/parse-error","XML: unterminated declaration");$=N+2}else{if(A>=Y)throw new C("xml/parse-error","XML: unterminated declaration");$=A+1}continue}if(J[$+1]==="/"){let A=J.indexOf(">",$);if(A<0)throw new C("xml/parse-error","XML: unterminated end tag");let T=J.slice($+2,A).trim(),N=U.pop();if(!N||N.name!==T)throw new C("xml/parse-error",`XML: mismatched end tag </${T}> (expected </${N?N.name:"∅"}>)`);$=A+1;continue}let z=M(J,$);if(z<0)throw new C("xml/parse-error","XML: unterminated start tag");let F=J[z-1]==="/",q=J.slice($+1,F?z-1:z),D=X(q);if(U.length)U[U.length-1].children.push(D);else{if(B)throw new C("xml/parse-error","XML: multiple root elements");B=D}if(!F)U.push(D);else if(!B)B=D;$=z+1}else{let z=J.indexOf("<",$),F=J.slice($,z<0?Y:z);if(U.length&&F.length)U[U.length-1].children.push(L(R(F)));if(z<0)break;$=z}if(U.length)throw new C("xml/parse-error",`XML: unclosed element <${U[U.length-1].name}>`);if(!B)throw new C("xml/parse-error","XML: no root element");return B}function Q(J){if(J.type==="text")return j(J.value);let $=Object.keys(J.attrs).map((U)=>` ${U}="${H(J.attrs[U])}"`).join("");if(!J.children||J.children.length===0)return`<${J.name}${$}/>`;let Y=J.children.map(Q).join("");return`<${J.name}${$}>${Y}</${J.name}>`}function Z(J){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
41
- `+Q(J)}function G(J,$){if(!J.children)return null;for(let Y of J.children)if(Y.type==="element"&&Y.name===$)return Y;return null}function W(J,$){let Y=[];if(!J.children)return Y;for(let U of J.children)if(U.type==="element"&&U.name===$)Y.push(U);return Y}function O(J){if(!J)return"";if(J.type==="text")return J.value;if(!J.children)return"";return J.children.map(O).join("")}return{el:P,text:L,parse:V,serialize:Z,serializeNode:Q,findChild:G,findAll:W,textContent:O,encodeText:j,encodeAttr:H,decodeEntities:R,XmlParseError:C}}};var b$={name:"bitArray",version:"1.0.0",type:"fw.crypto.utils",dependencies:[],factory(){let C={ba_to_ui8:function(K){let R=[],j=C.bitLength(K),H,P;for(H=0;H<j/8;H++){if((H&3)===0)P=K[H/4];R.push(P>>>8>>>8>>>8),P<<=8}return new Uint8Array(R)},ui8_to_ba:function(K){let R=[],j,H=0;for(j=0;j<K.length;j++)if(H=H<<8|K[j],(j&3)===3)R.push(H),H=0;if(j&3)R.push(C.partial(8*(j&3),H));return R},bitSlice:function(K,R,j){return K=C._shiftRight(K.slice(R/32),32-(R&31)).slice(1),j===void 0?K:C.clamp(K,j-R)},extract:function(K,R,j){let H,P=(-R-j&31)>>0;if((R+j-1^R)&-32)H=K[R/32|0]<<32-P^K[R/32+1|0]>>>P;else H=K[R/32|0]>>>P;return H&(1<<j)-1},concat:function(K,R){if(K.length===0||R.length===0)return K.concat(R);let j=K[K.length-1],H=C.getPartial(j);if(H===32)return K.concat(R);else return C._shiftRight(R,H,j|0,K.slice(0,K.length-1))},bitLength:function(K){let R=K.length,j;if(R===0)return 0;return j=K[R-1],(R-1)*32+C.getPartial(j)},clamp:function(K,R){if(K.length*32<R)return K;K=K.slice(0,Math.ceil(R/32));let j=K.length;if(R=R&31,j>0&&R)K[j-1]=C.partial(R,K[j-1]&2147483648>>R-1,1);return K},partial:function(K,R,j){if(K===32)return R;return(j?R|0:R<<32-K)+K*1099511627776},getPartial:function(K){return Math.round(K/1099511627776)||32},equal:function(K,R){if(C.bitLength(K)!==C.bitLength(R))return!1;let j=0,H;for(H=0;H<K.length;H++)j|=K[H]^R[H];return j===0},_shiftRight:function(K,R,j,H){let P,L,M;if(H===void 0)H=[];for(;R>=32;R-=32)H.push(j),j=0;if(R===0)return H.concat(K);for(P=0;P<K.length;P++)H.push(j|K[P]>>>R),j=K[P]<<32-R;return L=K.length?K[K.length-1]:0,M=C.getPartial(L),H.push(C.partial(R+M&31,R+M>32?j:H.pop(),1)),H},_xor4:function(K,R){return[K[0]^R[0],K[1]^R[1],K[2]^R[2],K[3]^R[3]]},byteswapM:function(K){if(K.length>0&&C.getPartial(K[K.length-1])!==32)return console.warn("[crypto] INVALID: bitArray.byteswapM: partial words not supported"),!1;let R,j,H=65280;for(R=0;R<K.length;++R)j=K[R],K[R]=j>>>24|j>>>8&H|(j&H)<<8|j<<24;return K}};return C}};var BJ={name:"aes",version:"1.0.0",type:"fw.crypto.cipher",dependencies:[],factory(){let C=[[[],[],[],[],[]],[[],[],[],[],[]]];(function(){let V=C[0],Q=C[1],Z=V[4],G=Q[4],W=[],O=[],J,$,Y,U,B,z,F,q,D;for(D=0;D<256;D++)O[(W[D]=D<<1^(D>>7)*283)^D]=D;for(J=$=0;!Z[J];J^=Y||1,$=O[$]||1){z=$^$<<1^$<<2^$<<3^$<<4,z=z>>8^z&255^99,Z[J]=z,G[z]=J,B=W[U=W[Y=W[J]]],q=B*16843009^U*65537^Y*257^J*16843008,F=W[z]*257^z*16843008;for(D=0;D<4;D++)V[D][J]=F=F<<24^F>>>8,Q[D][z]=q=q<<24^q>>>8}for(D=0;D<5;D++)V[D]=V[D].slice(0),Q[D]=Q[D].slice(0)})();function K(X,V,Q,Z){if(X.length!==4)return console.warn("[crypto] INVALID: aes: invalid block size"),!1;let G=Q[V],W=X[0]^G[0],O=X[V?3:1]^G[1],J=X[2]^G[2],$=X[V?1:3]^G[3],Y,U,B,z=G.length/4-2,F=4,q=[0,0,0,0],D=Z[V],A=D[0],T=D[1],N=D[2],w=D[3],S=D[4];for(let I=0;I<z;I++)Y=A[W>>>24]^T[O>>16&255]^N[J>>8&255]^w[$&255]^G[F],U=A[O>>>24]^T[J>>16&255]^N[$>>8&255]^w[W&255]^G[F+1],B=A[J>>>24]^T[$>>16&255]^N[W>>8&255]^w[O&255]^G[F+2],$=A[$>>>24]^T[W>>16&255]^N[O>>8&255]^w[J&255]^G[F+3],F+=4,W=Y,O=U,J=B;for(let I=0;I<4;I++)q[V?3&-I:I]=S[W>>>24]<<24^S[O>>16&255]<<16^S[J>>8&255]<<8^S[$&255]^G[F++],Y=W,W=O,O=J,J=$,$=Y;return q}function R(X,V){let Q=0,Z=X&255;for(let G=0;G<256;G++){let J=-(((G^Z)>>>0)-1>>>8&1)&255;Q|=V[G]&J}return Q&255}function j(X){return(X<<1^(X>>7)*27)&255}function H(X,V,Q,Z){let G=X^V^Q^Z,W=X^G^j(X^V),O=V^G^j(V^Q),J=Q^G^j(Q^Z),$=Z^G^j(Z^X);return[W,O,J,$]}function P(X,V,Q,Z){let G=j,W=(B)=>G(G(B)),O=(B)=>G(W(B)),J=(B)=>O(B)^B,$=(B)=>O(B)^G(B)^B,Y=(B)=>O(B)^W(B)^B,U=(B)=>O(B)^W(B)^G(B);return[(U(X)^$(V)^Y(Q)^J(Z))&255,(J(X)^U(V)^$(Q)^Y(Z))&255,(Y(X)^J(V)^U(Q)^$(Z))&255,($(X)^Y(V)^J(Q)^U(Z))&255]}function L(X,V,Q){if(X.length!==4)return console.warn("[crypto] INVALID: aes: invalid block size"),!1;let Z=C[0][4],G=C[1][4],W=V?G:Z,O=!V,J=new Uint8Array(16);for(let z=0;z<4;z++){let F=X[z];J[z*4]=F>>>24&255,J[z*4+1]=F>>>16&255,J[z*4+2]=F>>>8&255,J[z*4+3]=F&255}let $=Q[0],Y=$.length/4-1,U=new Uint8Array($.length*4);for(let z=0;z<$.length;z++)U[z*4]=$[z]>>>24&255,U[z*4+1]=$[z]>>>16&255,U[z*4+2]=$[z]>>>8&255,U[z*4+3]=$[z]&255;if(O){for(let z=0;z<16;z++)J[z]^=U[z];for(let z=1;z<Y;z++){for(let q=0;q<16;q++)J[q]=R(J[q],W);let F=new Uint8Array(J);for(let q=0;q<4;q++)for(let D=0;D<4;D++)J[D*4+q]=F[(D+q&3)*4+q];for(let q=0;q<4;q++){let D=q*4,A=H(J[D],J[D+1],J[D+2],J[D+3]);J[D]=A[0],J[D+1]=A[1],J[D+2]=A[2],J[D+3]=A[3]}for(let q=0;q<16;q++)J[q]^=U[z*16+q]}for(let z=0;z<16;z++)J[z]=R(J[z],W);{let z=new Uint8Array(J);for(let F=0;F<4;F++)for(let q=0;q<4;q++)J[q*4+F]=z[(q+F&3)*4+F]}for(let z=0;z<16;z++)J[z]^=U[Y*16+z]}else{for(let z=0;z<16;z++)J[z]^=U[Y*16+z];for(let z=Y-1;z>=1;z--){let F=new Uint8Array(J);for(let q=0;q<4;q++)for(let D=0;D<4;D++)J[D*4+q]=F[(D-q+4&3)*4+q];for(let q=0;q<16;q++)J[q]=R(J[q],W);for(let q=0;q<16;q++)J[q]^=U[z*16+q];for(let q=0;q<4;q++){let D=q*4,A=P(J[D],J[D+1],J[D+2],J[D+3]);J[D]=A[0],J[D+1]=A[1],J[D+2]=A[2],J[D+3]=A[3]}}{let z=new Uint8Array(J);for(let F=0;F<4;F++)for(let q=0;q<4;q++)J[q*4+F]=z[(q-F+4&3)*4+F]}for(let z=0;z<16;z++)J[z]=R(J[z],W);for(let z=0;z<16;z++)J[z]^=U[z]}let B=[0,0,0,0];for(let z=0;z<4;z++)B[z]=J[z*4]<<24|J[z*4+1]<<16|J[z*4+2]<<8|J[z*4+3];return B}let M={};return M.fn=function(X,V=!0){let Q=X.length;if(Q!==4&&Q!==6&&Q!==8)return console.warn("[crypto] INVALID: aes: invalid key size"),!1;let Z=C[0][4],G=X.slice(0),W=1,O,J;for(O=Q;O<4*Q+28;O++){if(J=G[O-1],O%Q===0||Q===8&&O%Q===4){if(J=Z[J>>>24]<<24^Z[J>>16&255]<<16^Z[J>>8&255]<<8^Z[J&255],O%Q===0)J=J<<8^J>>>24^W<<24,W=W<<1^(W>>7)*283}G[O]=G[O-Q]^J}let $=[G],Y={encrypt(U){return L(U,0,$)}};if(V)Y.decrypt=(U)=>L(U,1,$);return Y},M.ttable={fn(X,V=!0){let Q=C.slice(),Z=Q[0][4],G=Q[1],W=X.length,O=1,J,$,Y;if(W!==4&&W!==6&&W!==8)return console.warn("[crypto] INVALID: aes: invalid key size"),!1;let U=X.slice(0),B=[],z=[U,B];for(J=W;J<4*W+28;J++){if(Y=U[J-1],J%W===0||W===8&&J%W===4){if(Y=Z[Y>>>24]<<24^Z[Y>>16&255]<<16^Z[Y>>8&255]<<8^Z[Y&255],J%W===0)Y=Y<<8^Y>>>24^O<<24,O=O<<1^(O>>7)*283}U[J]=U[J-W]^Y}if(V)for($=0;J;$++,J--)if(Y=U[$&3?J:J-4],J<=4||$<4)B[$]=Y;else B[$]=G[0][Z[Y>>>24]]^G[1][Z[Y>>16&255]]^G[2][Z[Y>>8&255]]^G[3][Z[Y&255]];let F={encrypt(q){return K(q,0,z,Q)}};if(V)F.decrypt=function(q){return K(q,1,z,Q)};return F}},M.bitsliced={fn:M.fn},M}};var CJ={name:"sha256",version:"1.0.0",type:"fw.crypto.hash",dependencies:["bitArray","utf8"],deps:[b$,T$],factory(C,K){let R=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],j=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function H(L,M){let X={};return X.fn=function(V){if(V)this._h=V._h.slice(0),this._buffer=V._buffer.slice(0),this._length=V._length;else this.reset()},X.hash=function(V){return new X.fn().update(V).finalize()},X.fn.prototype={blockSize:512,_init:L,_key:j,reset(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update(V){if(typeof V==="string")V=C.ui8_to_ba(K.toBytes(V));let Q=this._buffer=C.concat(this._buffer,V),Z=this._length,G=this._length=Z+C.bitLength(V);if(G>9007199254740991)return console.warn("[crypto] INVALID: sha256: cannot hash more than 2^53 - 1 bits"),!1;let W=new Uint32Array(Q),O=0;for(let J=512+Z-(512+Z&511);J<=G;J+=512)this._block(W.subarray(16*O,16*(O+1))),O+=1;return Q.splice(0,16*O),this},finalize(){let V=this._buffer,Q=this._h;V=C.concat(V,[C.partial(1,1)]);for(let Z=V.length+2;Z&15;Z++)V.push(0);V.push(Math.floor(this._length/4294967296)),V.push(this._length|0);while(V.length)this._block(V.splice(0,16));return this.reset(),M<8?Q.slice(0,M):Q},_block(V){let Q=this._h,Z=this._key,G=Q[0],W=Q[1],O=Q[2],J=Q[3],$=Q[4],Y=Q[5],U=Q[6],B=Q[7],z,F,q;for(let D=0;D<64;D++){if(D<16)z=V[D];else F=V[D+1&15],q=V[D+14&15],z=V[D&15]=(F>>>7^F>>>18^F>>>3^F<<25^F<<14)+(q>>>17^q>>>19^q>>>10^q<<15^q<<13)+V[D&15]+V[D+9&15]|0;z=z+B+($>>>6^$>>>11^$>>>25^$<<26^$<<21^$<<7)+(U^$&(Y^U))+Z[D],B=U,U=Y,Y=$,$=J+z|0,J=O,O=W,W=G,G=z+(W&O^J&(W^O))+(W>>>2^W>>>13^W>>>22^W<<30^W<<19^W<<10)|0}Q[0]=Q[0]+G|0,Q[1]=Q[1]+W|0,Q[2]=Q[2]+O|0,Q[3]=Q[3]+J|0,Q[4]=Q[4]+$|0,Q[5]=Q[5]+Y|0,Q[6]=Q[6]+U|0,Q[7]=Q[7]+B|0}},X}let P=H(R,8);return{fn:P.fn,hash:P.hash,_internal:{makeSha:H}}}};var RJ={name:"random",version:"1.0.0",type:"fw.crypto.utils",dependencies:["bitArray","aes","sha256"],deps:[b$,BJ,CJ],factory(C,K,R){let H=typeof crypto<"u"&&!!crypto.getRandomValues;function P(E){let x=E.length>>>2,_=Array(x);for(let g=0;g<x;g++){let b=g<<2;_[g]=E[b]<<24|E[b+1]<<16|E[b+2]<<8|E[b+3]|0}return _}function L(E,x,_,g){for(let b=0;b<x;b++){let p=g+(b<<2);_[p]=E[b]>>>24&255,_[p+1]=E[b]>>>16&255,_[p+2]=E[b]>>>8&255,_[p+3]=E[b]&255}}let M=4,X=512,V=13,Q={prev:-1,run:0},Z={anchor:-1,count:0,idx:0},G=!1;function W(E){if(G)return!1;for(let x=0;x<E.length;x++){let _=E[x];if(_===Q.prev){if(Q.run++,Q.run>=M)return G=!0,console.error("[crypto] CORRUPT: random: RCT health-test failed on entropy source"),!1}else Q.prev=_,Q.run=1;if(Z.anchor===-1)Z.anchor=_,Z.count=1,Z.idx=1;else{if(Z.idx++,_===Z.anchor){if(Z.count++,Z.count>V)return G=!0,console.error("[crypto] CORRUPT: random: APT health-test failed on entropy source"),!1}if(Z.idx>=X)Z.anchor=-1}}return!0}function O(){Q.prev=-1,Q.run=0,Z.anchor=-1,Z.count=0,Z.idx=0,G=!1}function J(E){if(!H)return console.error("[crypto] NOT READY: crypto.getRandomValues unavailable"),!1;let x=0;while(x<E.length){let _=Math.min(65536,E.length-x);crypto.getRandomValues(E.subarray(x,x+_)),x+=_}return E}function $(E){if(G)return console.error("[crypto] CORRUPT: random: entropy source previously failed health test"),!1;let x=J(new Uint8Array(E));if(x===!1)return!1;if(!W(x))return!1;return x}let Y=4,U=16,B=65536,z=4294967296;function F(E){E=E||{};let x=E.aesKeyBits||256,_=!!E.df;if(x!==128&&x!==192&&x!==256)return console.error("[crypto] BUG: ctr_drbg: aesKeyBits must be 128, 192 or 256"),!1;let g=x/8,b=g/4,p=g+U,c=p/4,s=Array(b).fill(0),h=Array(Y).fill(0),$$=null,t=0,o=!1;function f(d,n){let i=K.fn(P(d),!1);if(i===!1)return!1;let r=new Uint8Array(U);for(let J$=0;J$<n.length;J$+=U){for(let Y$=0;Y$<U;Y$++)r[Y$]^=n[J$+Y$];let l=i.encrypt(P(r));L(l,Y,r,0)}return r}function m(d,n){let i=d.length,r=n,J$=8,l=8+i+1,Y$=(U-l%U)%U,U$=l+Y$,K$=new Uint8Array(U$);K$[0]=i>>>24&255,K$[1]=i>>>16&255,K$[2]=i>>>8&255,K$[3]=i&255,K$[4]=r>>>24&255,K$[5]=r>>>16&255,K$[6]=r>>>8&255,K$[7]=r&255;for(let G$=0;G$<i;G$++)K$[8+G$]=d[G$];K$[8+i]=128;let S$=new Uint8Array(g);for(let G$=0;G$<g;G$++)S$[G$]=G$;let P$=g+U,M$=new Uint8Array(Math.ceil(P$/U)*U),R$=0,D$=0;while(R$<P$){let G$=new Uint8Array(U+U$);G$[0]=D$>>>24&255,G$[1]=D$>>>16&255,G$[2]=D$>>>8&255,G$[3]=D$&255,G$.set(K$,U);let O$=f(S$,G$);if(O$===!1)return!1;M$.set(O$,R$),R$+=U,D$++}let H$=M$.subarray(0,g),z$=M$.slice(g,g+U),W$=K.fn(P(H$),!1);if(W$===!1)return!1;let j$=new Uint8Array(n),L$=0;while(L$<n){let G$=W$.encrypt(P(z$));L(G$,Y,z$,0);let O$=Math.min(U,n-L$);j$.set(z$.subarray(0,O$),L$),L$+=O$}return j$}function u(){if($$=K.fn(s,!1),$$===!1)return console.error("[crypto] BUG: ctr_drbg: AES key schedule failed"),!1;return!0}function k(){for(let d=Y-1;d>=0;d--)if(h[d]=h[d]+1|0,h[d]!==0)break}function y(d){let n=Array(c).fill(0),i=0;while(i<c){k();let r=$$.encrypt(h);for(let J$=0;J$<Y&&i<c;J$++)n[i++]=r[J$]}for(let r=0;r<c;r++)n[r]^=d[r];return s=n.slice(0,b),h=n.slice(b,b+Y),u()}function e(d,n,i){if(_){let J$=d?d.length:0,l=i?i.length:0,Y$=n?n.length:0,U$=new Uint8Array(J$+l+Y$);if(J$)U$.set(d,0);if(l)U$.set(i,J$);if(Y$)U$.set(n,J$+l);return m(U$,p)}if(!d||d.length!==p)return console.error("[crypto] BUG: ctr_drbg (no-df): entropy must be exactly "+p+" bytes"),!1;let r=new Uint8Array(p);if(r.set(d),n&&n.length>0){let J$=Math.min(n.length,p);for(let l=0;l<J$;l++)r[l]^=n[l]}return r}function Q$(d,n,i){let r=e(d,n,i);if(r===!1)return!1;if(s.fill(0),h.fill(0),!u())return!1;if(!y(P(r)))return!1;return t=1,o=!0,!0}function Z$(d,n){if(!o)return console.warn("[crypto] NOT READY: ctr_drbg.reseed: not instantiated"),!1;let i=e(d,n,null);if(i===!1)return!1;if(!y(P(i)))return!1;return t=1,!0}function a(d,n){if(!o)return console.warn("[crypto] NOT READY: ctr_drbg.generate: not instantiated"),!1;if(!Number.isInteger(d)||d<0||d>B)return console.warn("[crypto] INVALID: ctr_drbg.generate: n must be an integer in [0, "+B+"]"),!1;if(d===0)return new Uint8Array(0);if(t>z){let l=$(p);if(l===!1)return!1;if(!Z$(l,n))return!1;n=null}let i;if(n&&n.length>0){let l;if(_){if(l=m(n,p),l===!1)return!1}else l=new Uint8Array(p),l.set(n.subarray(0,Math.min(p,n.length)));if(i=P(l),!y(i))return!1}else i=Array(c).fill(0);let r=new Uint8Array(d),J$=0;while(J$<d){k();let l=$$.encrypt(h),Y$=d-J$;if(Y$>=16)L(l,Y,r,J$),J$+=16;else{let U$=new Uint8Array(16);L(l,Y,U$,0),r.set(U$.subarray(0,Y$),J$),J$=d}}if(!y(i))return!1;return t++,r}function X$(){s.fill(0),h.fill(0),$$=null,t=0,o=!1}return{instantiate:Q$,reseed:Z$,generate:a,uninstantiate:X$,get isLive(){return o},get reseedCounter(){return t},get securityStrength(){return x},get aesKeyBits(){return x},get useDf(){return _},get seedBytes(){return p}}}let q=N("e4bc23c5089a19d86f4119cb3fa08c0a4991e0a1def17e101e4c14d9c323460a7c2fb58e0b086c6c57b55f56cae25bad"),D=N("fd85a836bba85019881e8c6bad23c9061adc75477659acaea8e4a01dfe07a1832dad1c136f59d70f8653a5dc118663d6"),A="b2cb8905c05e5950ca31895096be29ea3d5a3b82b269495554eb80fe07de43e193b9e7c3ece73b80e062b1c1f68202fbb1c52a040ea2478864295282234aaada",T=null;function N(E){let x=new Uint8Array(E.length>>>1);for(let _=0;_<x.length;_++)x[_]=parseInt(E.substring(_*2,_*2+2),16);return x}function w(E){let x="";for(let _=0;_<E.length;_++){let g=E[_];x+=(g<16?"0":"")+g.toString(16)}return x}function S(){let E=F();if(!E||E===!1)return!1;if(!E.instantiate(q))return!1;if(!E.reseed(D))return!1;if(E.generate(64)===!1)return!1;let x=E.generate(64);if(x===!1)return!1;let _=w(x);if(_!==A)return console.error("[crypto] CORRUPT: random.selfTest: CTR_DRBG KAT mismatch (got "+_+")"),!1;return!0}function I(){if(T===null)T=S();return T}let v={fill(E){return J(E)},float(){let E=J(new Uint8Array(4));if(E===!1)return!1;return((E[0]<<24|E[1]<<16|E[2]<<8|E[3])>>>0)/4294967296},int(E,x){if(E>x)throw RangeError("min must be ≤ max");let _=x-E+1,g=Math.floor(4294967296/_)*_,b=new Uint8Array(4),p;do{if(J(b)===!1)return!1;p=(b[0]<<24|b[1]<<16|b[2]<<8|b[3])>>>0}while(p>=g);return E+p%_},bytes(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.bytes expects a non-negative integer"),!1;return J(new Uint8Array(E))},words(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.words expects a non-negative integer"),!1;let x=J(new Uint8Array(E*4));if(x===!1)return!1;let _=Array(E);for(let g=0;g<E;g++){let b=g*4;_[g]=x[b]<<24|x[b+1]<<16|x[b+2]<<8|x[b+3]|0}return _},bits(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.bits expects a non-negative integer"),!1;let x=Math.ceil(E/32),_=v.words(x);if(_===!1)return!1;return C.clamp(_,E)},isReady(){return H},selfTest(){return T=S(),T},_internal:{makeDrbg:F},health:{feed(E){return W(E instanceof Uint8Array?E:new Uint8Array(E))},reset(){O()},get isDead(){return G}},drbg(E={}){if(!I())return console.error("[crypto] CORRUPT: random.drbg refused - POST failed"),!1;let x=F(E);if(x===!1)return!1;let _=$(x.seedBytes);if(_===!1)return!1;if(!x.instantiate(_,E.personalisation))return!1;let g=null;return{generate(b,p){let c=p||null;if(g!==null)c=c===null?g:(()=>{let s=new Uint8Array(g.length+c.length);return s.set(g),s.set(c,g.length),s})(),g=null;return x.generate(b,c)},reseed(b){let p=$(x.seedBytes);if(p===!1)return!1;let c=b||null;if(g!==null)c=c===null?g:(()=>{let s=new Uint8Array(g.length+c.length);return s.set(g),s.set(c,g.length),s})(),g=null;return x.reseed(p,c)},addAdditionalInput(b){if(!(b instanceof Uint8Array))if(Array.isArray(b)||b instanceof Uint32Array){let c=new Uint8Array(b.length*4);for(let s=0;s<b.length;s++){let h=b[s]|0;c[s*4]=h>>>24&255,c[s*4+1]=h>>>16&255,c[s*4+2]=h>>>8&255,c[s*4+3]=h&255}b=c}else if(typeof b==="number"){let c=b|0;b=new Uint8Array([c>>>24&255,c>>>16&255,c>>>8&255,c&255])}else return console.warn("[crypto] BUG: drbg.addAdditionalInput: unsupported data type"),!1;let p=g===null?b:(()=>{let c=new Uint8Array(g.length+b.length);return c.set(g),c.set(b,g.length),c})();if(p.length<=x.seedBytes)g=p;else{let c=R.hash(P(p.subarray(0,p.length&-4))),s=new Uint8Array(32);L(c,8,s,0),g=s}return!0},uninstantiate(){g=null,x.uninstantiate()},get isLive(){return x.isLive},get reseedCounter(){return x.reseedCounter},get securityStrength(){return x.securityStrength}}}};return v}};var AJ={name:"mime",version:"1.0.0",type:"fw.io.codec",dependencies:["utf8","random"],deps:[T$,RJ],factory(C,K){function R(O,J,$){let Y=J.length,U=O.length;if(Y===0)return $;let B=U-Y;$:for(let z=$;z<=B;z++){for(let F=0;F<Y;F++)if(O[z+F]!==J[F])continue $;return z}return-1}function j(O){let J=0;for(let U=0;U<O.length;U++)J+=O[U].length;let $=new Uint8Array(J),Y=0;for(let U=0;U<O.length;U++)$.set(O[U],Y),Y+=O[U].length;return $}function H(O){let J=/^([^']*)'[^']*'(.*)$/.exec(O);if(!J)return O;let $=J[1].toLowerCase(),Y=J[2];try{if($==="utf-8"||$==="")return decodeURIComponent(Y);return Y.replace(/%([0-9a-fA-F]{2})/g,(U,B)=>String.fromCharCode(parseInt(B,16)))}catch{return Y}}function P(O){if(typeof O!=="string")return{value:"",params:{}};let J={},$={},Y=0,U=O.length,B=(D)=>{let A="";while(Y<U&&D.indexOf(O[Y])<0)A+=O[Y],Y++;return A},z=()=>{while(Y<U&&(O[Y]===" "||O[Y]==="\t"))Y++},F=()=>{Y++;let D="";while(Y<U){let A=O[Y];if(A==="\\"&&Y+1<U){D+=O[Y+1],Y+=2;continue}if(A==='"')return Y++,D;D+=A,Y++}return D};z();let q=B(";").trim();while(Y<U){if(O[Y]!==";"){Y++;continue}Y++,z();let D=B("=;").trim().toLowerCase();if(!D)continue;let A;if(O[Y]==="=")if(Y++,z(),O[Y]==='"')A=F();else A=B(";").trim();else A="";if(D.endsWith("*"))$[D.slice(0,-1)]=H(A);else if(!(D in J))J[D]=A}for(let D of Object.keys($))J[D]=$[D];return{value:q,params:J}}let L=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function M(O,J){if(O&&typeof O==="object")J=O.params,O=O.value;let $=String(O||"");if(J)for(let Y of Object.keys(J)){let U=J[Y];if(U===void 0||U===null)continue;let B=String(U);$+="; "+Y+"="+(L.test(B)?B:'"'+B.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"')}return $}function X(O){let J={};if(!O)return J;let $=O.replace(/\r\n/g,`
37
+ `+t}return`${t}<${n} ${$$}>${Q$}</${n}>`}let p=64,y=new Map,c={hits:0,misses:0,evictions:0};function o(b){if(p===0)return;let i=y.get(b);if(i!==void 0)y.delete(b),y.set(b,i),c.hits++;else c.misses++;return i}function r(b,i){if(p===0)return;if(y.size>=p){let d=y.keys().next().value;y.delete(d),c.evictions++}y.set(b,i)}let e=function(b,i){let d=typeof DOMParser<"u"?new DOMParser().parseFromString("<html><body>"+b+"</body></html>","text/html").body:L(b),g=E(d);R=new Set(g),x(i,g);for(let l of g)S.add(l);let m=[],n={};function s(l,J$,$$){let Q$=l.tagName.toLowerCase();if($.test(Q$))return;let G$=_(l),V$=l.getAttribute("id"),F$=V$&&V$.trim()?V$.trim():I(g),z$={id:F$,tag:G$};if(J$!==null&&J$!==void 0)z$.parent=J$;let D$=[],R$=[],w$={};for(let q$ of l.attributes){if(q$.name==="id")continue;if(!q.test(q$.name))continue;if(K.test(q$.name))continue;let{val:W$,maps:M$}=k(q$.value,q$.name,!0);R$.push(q$.name),w$[q$.name]=W$,D$.push(...M$)}if(R$.length>0)z$.attrs=R$,z$.data={...w$};let k$=Array.from(l.childNodes),A$=null,C$=!1,U$=[],O$=[];for(let q$ of k$)if(q$.nodeType===X){let W$=q$.nodeValue.match(G),M$=q$.nodeValue.match(W);if(W$)A$=W$[1],C$=!0;else if(M$&&C$)C$=!1}else if(C$){if(q$.nodeType===V)U$.push(q$)}else O$.push(q$);if(A$){z$.content=A$;let q$=[];if(U$.forEach((W$)=>s(W$,null,q$)),n[A$]=q$,D$.length>0)z$.map=D$;$$.push(z$)}else if(O$.filter((W$)=>W$.nodeType===V).length===0){let W$=O$.filter((M$)=>M$.nodeType===F).map((M$)=>M$.nodeValue).join("").trim();if(W$){let M$=W$.match(J);if(M$)z$.content=M$[1];else{let{val:I$,maps:x$}=k(W$,"text",!1);z$.text=I$,D$.push(...x$)}}if(D$.length>0)z$.map=D$;$$.push(z$)}else{if(D$.length>0)z$.map=D$;$$.push(z$),O$.forEach((W$,M$)=>{if(W$.nodeType===V)s(W$,F$,$$);else if(W$.nodeType===F){let I$=W$.nodeValue,x$=I$.trim();if(!x$)return;let $Z=T(O$[M$-1]),JZ=T(O$[M$+1]),_$=x$;{if($Z&&/^\s/.test(I$))_$=" "+_$;if(JZ&&/\s$/.test(I$))_$=_$+" "}let a$=x$.match(J);if(a$)$$.push({id:I(g),tag:"span",parent:F$,content:a$[1]});else{let{val:ZZ,maps:t$}=k(_$,"text",!1),e$={id:I(g),tag:"text",parent:F$,text:ZZ};if(t$.length>0)e$.map=t$;$$.push(e$)}}})}}Array.from(d.childNodes).forEach((l)=>{if(l.nodeType===V)s(l,null,m)});let t={template:m};if(Object.keys(n).length>0)t.iterates=n;return t},a=function(b){let i=Array.isArray(b),d=i?b:b.template||[],g=i?{}:b.iterates||{},m=h(d);return m.roots.map((n)=>u(n,m,g,"")).join(`
38
+ `)},X$=function(b,i){let d=i?i.reserveIds:void 0;if(typeof b!=="string")return e(b,d);if(d!==void 0&&d!==null)return e(b,d);let g=i?i.cache:void 0;if(g&&typeof g._get==="function")return Y$(b,g);let m=o(b);if(m!==void 0)return H$(m);let n=e(b);return r(b,n),H$(n)};function Y$(b,i){let d=(typeof DOMParser<"u"?"d:":"t:")+b,g=i._get(d);if(g===void 0){A=[];let l;try{l=e(b),i._set(d,{result:l,minted:A,explicit:Array.from(R)})}finally{A=null}return H$(l)}for(let l of g.explicit)S.add(l);let m=new Set(g.explicit),n=new Map;for(let l of g.minted)n.set(l,I(m));let s=H$(g.result),t=(l)=>{for(let J$ of l){if(n.has(J$.id))J$.id=n.get(J$.id);if(J$.parent!==void 0&&n.has(J$.parent))J$.parent=n.get(J$.parent)}};if(t(s.template),s.iterates)for(let l of Object.keys(s.iterates))t(s.iterates[l]);return s}function Z$(b){let i=Math.max(0,(b&&b.max!==void 0?b.max:64)|0),d=new Map,g={hits:0,misses:0,evictions:0};return{size(){return d.size},clear(){d.clear(),g.hits=0,g.misses=0,g.evictions=0},stats(){return{...g,size:d.size,max:i}},_get(m){if(i===0)return;let n=d.get(m);if(n===void 0){g.misses++;return}return d.delete(m),d.set(m,n),g.hits++,n},_set(m,n){if(i===0)return;if(d.size>=i)d.delete(d.keys().next().value),g.evictions++;d.set(m,n)}}}function H$(b){if(Array.isArray(b))return b.map(H$);if(b!==null&&typeof b==="object"){let i={};for(let d of Object.keys(b))i[d]=H$(b[d]);return i}return b}return{fromHTML:X$,toHTML:a,cache:{clear(){y.clear(),c.hits=0,c.misses=0,c.evictions=0},setMax(b){p=Math.max(0,b|0);while(y.size>p){let i=y.keys().next().value;y.delete(i),c.evictions++}},getMax(){return p},size(){return y.size},stats(){return{...c,size:y.size,max:p}}},createCache:Z$}}};var u$={name:"styleSheet",version:"1.0.0",type:"fw.dom.rendering",dependencies:[],factory(){let w="element",j=typeof document<"u"?document.querySelector('meta[name="csp-nonce"]')?.getAttribute("content")??"":"";function N(M){if(M!=="element"&&M!=="adopted")throw TypeError(`styleSheet: unknown mode '${M}'`);return M}function P(M){if(typeof M!=="string")throw TypeError("styleSheet: css must be a string")}function D(){return{constructable:typeof document<"u"&&"adoptedStyleSheets"in document&&typeof CSSStyleSheet==="function"&&typeof CSSStyleSheet.prototype.replaceSync==="function"}}function B(M){if(arguments.length===0||M===void 0)return w;w=N(M)}function O(M,z,Y,V){let X=z.ownerDocument.createElement("style");if(Y!==null)X.id=Y;X.textContent=M;let Z=V.attrs;if(Z)for(let Q of Object.keys(Z))X.setAttribute(Q,String(Z[Q]));let $=typeof V.nonce==="string"?V.nonce:j;if($)X.setAttribute("nonce",$);z.appendChild(X);let J=!1;return{mode:"element",id:Y,element:X,sheet:null,set(Q){if(P(Q),J)return;if(X.textContent=Q,!X.isConnected)z.appendChild(X)},detach(){if(J)return;J=!0,X.remove()}}}function T(M,z,Y){let V=new z.defaultView.CSSStyleSheet;V.replaceSync(M),z.adoptedStyleSheets=[...z.adoptedStyleSheets,V];let F=!1;return{mode:"adopted",id:Y,element:null,sheet:V,set(X){if(P(X),F)return;V.replaceSync(X)},detach(){if(F)return;F=!0,z.adoptedStyleSheets=z.adoptedStyleSheets.filter((X)=>X!==V)}}}function U(M,z){P(M);let Y=z||{},V=Y.mode===void 0?w:N(Y.mode),F=typeof Y.id==="string"?Y.id:null,X=Y.head||(typeof document<"u"?document.head:null);if(!X)return{mode:"none",id:F,element:null,sheet:null,set(){},detach(){}};let Z=X.ownerDocument;if(V==="adopted"){let $=Z.defaultView&&Z.defaultView.CSSStyleSheet;if(typeof $==="function"&&typeof $.prototype.replaceSync==="function"&&"adoptedStyleSheets"in Z)return T(M,Z,F)}return O(M,X,F,Y)}return{support:D,mode:B,attach:U}}};var S$={name:"template",type:"fw.dom.rendering",dependencies:["secPolicy","styleSheet"],deps:[P$,u$],factory(w,j){let N={},P={},D=new WeakMap,B=typeof document<"u"?document.querySelector('meta[name="csp-nonce"]')?.getAttribute("content")??"":"",O=w.SAFE_ATTR_NAME_RE,T=w.EVENT_ATTR_RE,U=w.URL_ATTRS,M=w.CLOBBER_ATTRS,z=w.CLOBBER_NAMES,Y=(K)=>w.isSafeUrl(K);function V(K){return K instanceof SVGSVGElement&&K.children.length===1?K.children[0]:K}function F(K,L){if(L.attrs)for(let C of L.attrs){if(T.test(C)||!O.test(C))continue;let A=L.data?.[C];if(A===null||A===!1||A===void 0)continue;if(U.has(C)&&!Y(String(A))){K.removeAttribute(C);continue}if(M.has(C)&&z.has(String(A))){K.removeAttribute(C);continue}K.setAttribute(C,A)}if(L.text!=null)K.textContent=L.text;return K.setAttribute("id",L.id),K}function X(K,L){let C=N[K].tpl,A=L.tag==="text"?"span":L.tag;if(Object.prototype.hasOwnProperty.call(P[C],A))return F(P[C][A].cloneNode(),L);let R=$(A);return R===null?null:F(R,L)}let Z=/^[a-zA-Z][a-zA-Z0-9-]*$/;function $(K){if(typeof K!=="string")return null;if(K.startsWith("svg_")){let L=K.slice(4);return Z.test(L)?document.createElementNS(H,L):null}if(!Z.test(K)||w.isBlockedTag(K.toLowerCase()))return null;return document.createElement(K)}function J(K,L,C){if(C)K.insertBefore(L,K.firstChild);else K.appendChild(L)}function Q(K,L){let C=N[K].map,A=[],R=[...L];while(R.length>0){let S=R.pop();if(C[S]){if(R.push(...C[S].children),C[S].childCtxs)for(let x of C[S].childCtxs)q.clearContext(x);A.push(S),delete C[S]}}return A}let H="http://www.w3.org/2000/svg",G=["div","span","nav","header","footer","section","article","aside","main",{name:"a",attrs:{href:""}},"button","input","form","label","select","option","textarea","fieldset","legend","table","tr","td","th","thead","tbody","tfoot","caption","ul","li","ol","dl","dt","dd","h1","h2","h3","h4","h5","h6","br","hr","p","i","b","em","strong","small","pre","code","kbd","samp","var","mark","abbr","cite","q","blockquote","s","u","sub","sup","time","details","summary","figure","figcaption","dialog","progress","meter","video","audio","picture",{name:"img",attrs:{src:"",alt:""}},{name:"cvs",tag:"canvas"},{name:"svg",svg:!0},{name:"svg_use",svg:!0,child:"use"}];function W(K=G){return K.map((L)=>{let C=document.createElement("template"),A=typeof L==="object",R=A?L.name:L,S=A&&L.tag?L.tag:A&&L.svg?"svg":R;C.className=R;let x=A&&L.svg?document.createElementNS(H,S):document.createElement(S);if(A&&L.attrs)for(let[I,E]of Object.entries(L.attrs))x.setAttribute(I,E);if(A&&L.child)x.appendChild(document.createElementNS(H,L.child));return C.content.appendChild(x),C})}let q={};return q.init=function(K,L={}){if(N[K])throw Error(`template.init: context '${K}' already exists. Call clearContext('${K}') first if you want to re-init.`);let{main:C,page:A}=L,R=L.tpl,S=typeof L.to==="string"?document.querySelector(L.to):L.to,x=D.get(S);if(x){let I=N[x.ctxName].map[x.id];if(!I.childCtxs)I.childCtxs=[];I.childCtxs.push(K)}if(A){let I=S;N[K]={page:S,head:I.head,ctx:I.body,map:{},styles:{},styleHandles:{},scripts:{}}}else N[K]={ctx:S,map:{}};if(C||R){let I=C?"main":K,E=typeof R==="string"?document.querySelectorAll(R+" > template"):R??W();P[I]={};let _=Array.from(E);for(let v of _)P[I][v.className]=V(v.content.firstChild);N[K].tpl=I}else N[K].tpl="main";return N[K]},q.DEFAULT_TAGS=G,q.generateTemplateTags=W,q.registerTags=function(K,L){let C=L?N[L]?.tpl??L:"main";if(!P[C])P[C]={};let A=W(K),R=[];for(let S of A)P[C][S.className]=V(S.content.firstChild),R.push(S.className);return R},q.reloadTags=function(K,L){let C=L?N[L]?.tpl??L:"main",A=P[C]?Object.keys(P[C]):[];P[C]={};let R=q.registerTags(K,L),S=A.filter((x)=>!R.includes(x));return{added:R,removed:S}},q.unregisterTag=function(K,L){let C=L?N[L]?.tpl??L:"main";if(P[C]&&Object.prototype.hasOwnProperty.call(P[C],K))return delete P[C][K],!0;return!1},q.container=function(K){return N[K]?.ctx??null},q.adoptNode=function(K,L,C,A){let R=N[K];if(!R)throw Error(`template.adoptNode: unknown context '${K}'`);if(R.map[L])throw Error(`template.adoptNode: id '${L}' is already registered in context '${K}'. Re-adoption with a different parentId would silently corrupt the tree.`);let S={node:C,target:C?.parentNode??null,tag:typeof C?.tagName==="string"?C.tagName.toLowerCase():"div",children:[]};if(R.map[L]=S,C)D.set(C,{ctxName:K,id:L});if(A&&R.map[A])R.map[A].children.push(L)},q.setNonce=function(K){B=K?String(K):""},q.getNonce=function(){return B},q.getCtx=function(K){return N[K]??null},q.pageAttr=function(K,L){let C=N[K].ctx;for(let[A,R]of Object.entries(L))if(O.test(A)&&(A==="class"||A==="style"||A.startsWith("data-")))C.setAttribute(A,R)},q.elm=function(K,L,C,A=0){if(Array.isArray(L))q.elms(K,L);else if(L.tag&&typeof L.tag==="string"){if(!L.id||typeof L.id!=="string")L={...L,id:Date.now().toString(36)+A.toString()+crypto.getRandomValues(new Uint32Array(1))[0].toString(36)};let R=N[K];if(R.map[L.id]){q.clearIn(K,L.id);let S=R.map[L.id],x=X(K,L);if(x!==null)S.node.parentNode.replaceChild(x,S.node),S.node=x,D.set(x,{ctxName:K,id:L.id});if(L.child&&Array.isArray(L.child))q.elms(K,L.child,L.id)}else{let S={node:null,target:null,tag:L.tag==="text"?"text":L.tag,children:[]};if(L.parent&&R.map[L.parent])if(S.target=R.map[L.parent].node,L.prepend)R.map[L.parent].children.unshift(L.id);else R.map[L.parent].children.push(L.id);else if(typeof C==="string"&&R.map[C])if(S.target=R.map[C].node,L.prepend)R.map[C].children.unshift(L.id);else R.map[C].children.push(L.id);else S.target=R.ctx;let x=X(K,L);if(x!==null)J(S.target,x,L.prepend),S.node=x,R.map[L.id]=S,D.set(x,{ctxName:K,id:L.id});if(L.child&&Array.isArray(L.child))q.elms(K,L.child,L.id)}}},q.elms=function(K,L,C){L.forEach(function(A,R){q.elm(K,A,C,R)})},q.get=function(K,L){return N[K].map[L]?.node||null},q.has=function(K,L){return!!N[K]?.map[L]},q.move=function(K,L,C){let A=L instanceof Element?L.getAttribute("id"):null,R=C instanceof Element?C.getAttribute("id"):null;if(A===null||R===null)return;let S=N[K],x=S.map[A],I=S.map[R];if(!x||!I)return;let E=x.target instanceof Element?x.target.getAttribute("id"):null;if(E!==null&&S.map[E]){let _=S.map[E].children,v=_.indexOf(A);if(v!==-1)_.splice(v,1)}C.appendChild(L),x.target=C,I.children.push(A)},q.style=function(K,L,C){let A=N[K];if(j){let S=A.styleHandles[L];if(S){S.set(C);return}let x=j.attach(C,{id:L,head:A.head,nonce:B});if(A.styleHandles[L]=x,x.element)A.styles[L]=x.element;return}if(A.styles[L]){A.styles[L].textContent=C;return}let R=document.createElement("style");if(R.id=L,R.textContent=C,B)R.setAttribute("nonce",B);A.head.appendChild(R),A.styles[L]=R},q.removeStyle=function(K,L){let C=N[K];if(C.styleHandles&&C.styleHandles[L]){C.styleHandles[L].detach(),delete C.styleHandles[L],delete C.styles[L];return}if(C.styles[L])C.styles[L].remove(),delete C.styles[L]},q.script=function(K,L,C={}){let A=N[K];if(A.scripts[L])A.scripts[L].remove();let R=document.createElement("script");if(R.id=L,C.content)R.textContent=C.content;if(C.type)R.type=C.type;if(B)R.setAttribute("nonce",B);A.head.appendChild(R),A.scripts[L]=R},q.removeScript=function(K,L){let C=N[K];if(C.scripts[L])C.scripts[L].remove(),delete C.scripts[L]},q.clearContext=function(K){let L=N[K];if(!L)return;if(L.page){if(L.ctx.replaceChildren(),L.styleHandles)for(let C of Object.keys(L.styleHandles))L.styleHandles[C].detach();for(let C of Object.keys(L.styles))L.styles[C].remove();for(let C of Object.keys(L.scripts))L.scripts[C].remove()}else L.ctx.remove();delete N[K]},q.clearAll=function(K){let L=N[K],C=[];for(let A in L.map){if(!L.map[A])continue;if(L.map[A].childCtxs)for(let R of L.map[A].childCtxs)q.clearContext(R);C.push(...Q(K,L.map[A].children)),C.push(A)}return L.ctx.replaceChildren(),L.map={},C},q.clearElm=function(K,L){let C=N[K];if(!C.map[L])return[];let A=C.map[L];A.node.remove();let R=Q(K,A.children);return R.push(L),delete C.map[L],R},q.fromParseResult=function(K){if(!K||typeof K!=="object"||Array.isArray(K))throw TypeError("template.fromParseResult: parseResult must be an object with a `template` array");if(!Array.isArray(K.template))throw TypeError("template.fromParseResult: parseResult.template must be an array");if(K.iterates!==void 0&&(typeof K.iterates!=="object"||K.iterates===null))throw TypeError("template.fromParseResult: parseResult.iterates must be an object when present");return K},q.clearIn=function(K,L){let C=N[K];if(!C.map[L])return[];let A=C.map[L];A.node.replaceChildren();let R=Q(K,A.children);return A.children=[],R},q}};var WJ={name:"sanitize",type:"fw.dom.rendering",dependencies:["secPolicy"],deps:[P$],factory(w){let j=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),N=new Set(["a","abbr","b","blockquote","br","caption","cite","code","col","colgroup","dd","del","details","dfn","div","dl","dt","em","figcaption","figure","h1","h2","h3","h4","h5","h6","hr","i","img","ins","kbd","li","mark","ol","p","pre","q","s","samp","section","small","span","strong","sub","summary","sup","table","tbody","td","th","thead","tfoot","tr","u","ul","var","wbr"]),P={"*":new Set(["class","id","title","dir","lang","tabindex"]),a:new Set(["href","name","target","rel"]),img:new Set(["src","alt","width","height","loading"]),td:new Set(["colspan","rowspan","align","valign"]),th:new Set(["colspan","rowspan","align","valign","scope"]),col:new Set(["span"]),colgroup:new Set(["span"]),ol:new Set(["start","type","reversed"]),li:new Set(["value"]),q:new Set(["cite"]),blockquote:new Set(["cite"]),del:new Set(["cite","datetime"]),ins:new Set(["cite","datetime"]),details:new Set(["open"])},D=["http","https","mailto","tel","ftp"],B={tags:N,attributes:P,urlSchemes:D},O=new Set(["script","style","iframe","object","embed","noscript","noembed","noframes","xmp","plaintext","textarea","svg","math","template","link","meta","head","frame","frameset"]),T=/<!--[\s\S]*?-->/g,U=/<\s*(\/\s*)?([a-zA-Z][a-zA-Z0-9-]*)\s*([^>]*?)\s*(\/\s*)?\s*>/g,M=/([a-zA-Z_:][a-zA-Z0-9:._-]*)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'<>`=]+)))?/g;function z($,J,Q){return w.isSafeUrl($,J??D,!!Q)}function Y($){let J={};if(!$)return J;M.lastIndex=0;let Q;while((Q=M.exec($))!==null){let H=Q[1].toLowerCase(),G=Q[2]!==void 0?Q[2]:Q[3]!==void 0?Q[3]:Q[4]!==void 0?Q[4]:"";J[H]=G}return J}let V=new Set(["style","srcdoc","formaction","action","ping","xlink:href","xmlns","xlink:actuate","xlink:show","data-bind"]);function F($,J,Q){if(/^on[a-z]/i.test($))return!1;if($.startsWith("v-")||$.startsWith("ng-")||$.startsWith(":")||$.startsWith("@"))return!1;if(V.has($))return!1;let H=Q.attributes||P,G=H["*"];if(G&&G.has($))return!0;let W=H[J];if(W&&W.has($))return!0;return!1}function X($,J,Q){let H=Q.urlSchemes||D,G="";for(let W of Object.keys($)){if(!F(W,J,Q))continue;let q=$[W];if(W==="href"||W==="src"){let K=Q.allowDataImage&&J==="img"&&W==="src";if(!z(q,H,K))continue}if(q=String(q).replace(/[<>"]/g,"").replace(/\s+/g," ").trim(),W==="href"||W==="src")q=q.replace(/[\r\n\t]/g,"");G+=" "+W+'="'+q+'"'}if(J==="a"){let W=$.href||"",q=($.target||"").toLowerCase().trim();if(/^https?:\/\//i.test(W.trim())&&(q==="_blank"||q!==""&&q!=="_self"&&q!=="_parent"&&q!=="_top")){let C=$.rel?$.rel.toLowerCase():"",A=C.includes("noopener"),R=C.includes("noreferrer");if(!A||!R){G=G.replace(/ rel="[^"]*"/,"");let S=[];if(C)S.push(C);if(!A)S.push("noopener");if(!R)S.push("noreferrer");G+=' rel="'+S.join(" ").trim()+'"'}}}return G}function Z($,J){if(typeof $!=="string"||$.length===0)return"";$=$.replace(/\x00/g,""),$=$.replace(T,"");let Q={tags:J&&J.allowedTags?J.allowedTags instanceof Set?J.allowedTags:new Set(J.allowedTags):N,attributes:J&&J.allowedAttributes!==void 0?J.allowedAttributes:P,urlSchemes:J&&J.urlSchemes?J.urlSchemes:D,allowDataImage:J?J.allowDataImage===!0:!1},H=!(J&&J.dropDangerousContent===!1),G=$;if(H)for(let L of O){let C=new RegExp("<\\s*"+L+"(\\s[^>]*)?>([\\s\\S]*?)<\\s*\\/\\s*"+L+"\\s*>","gi");G=G.replace(C,"");let A=new RegExp("<\\s*"+L+"\\b[^>]*>[\\s\\S]*$","gi");G=G.replace(A,"");let R=new RegExp("<\\s*"+L+"\\b[^>]*/>","gi");G=G.replace(R,"");let S=new RegExp("<\\s*"+L+"\\b[^>]*>","gi");G=G.replace(S,"")}let W=[],q=0,K;U.lastIndex=0;while((K=U.exec(G))!==null){W.push(G.slice(q,K.index)),q=K.index+K[0].length;let L=!!(K[1]&&K[1].trim()==="/"),C=K[2].toLowerCase(),A=K[3]||"",R=!!(K[4]&&K[4].trim()==="/");if(!Q.tags.has(C))continue;if(L){W.push("</"+C+">");continue}let S=Y(A),x=X(S,C,Q);if(R||j.has(C))W.push("<"+C+x+" />");else W.push("<"+C+x+">")}return W.push(G.slice(q)),W.join("")}return{sanitizeHtml:Z,isSafeUrl:z,defaultAllowlist:B}}};var m$={name:"uiSessionCore",version:"1.0.0",type:"fw.dom.rendering",dependencies:["template","render","parser","dom","events"],deps:[S$,T$,b$,B$,L$],factory(w,j,N,P,D){function B(U){if(U.template)return U;if(!U.block)return U;let M=U.attach?.name,z=M&&U.block.iterates?.[M]?U.block.iterates[M]:U.block.template,Y={...U,template:z};return delete Y.block,Y}function O(U){let M=new Set(U.map((V)=>V.id)),z=[],Y=new Map;for(let V of U)if(V.parent==null||!M.has(V.parent)){let X=[{...V,prepend:!0}];z.push(X),Y.set(V.id,X)}else{let X=Y.get(V.parent);X.push(V),Y.set(V.id,X)}return z.reverse().flat()}return{methods:{parse(U){return N.fromHTML(U)},get(U,M){let z=this._map.get(U);if(!z)return null;if(Array.isArray(z))return null;if(M!==void 0){let V=z.get(M);if(!V)return null;return w.get(this._container,V)}let Y=z.get(U)??z.values().next().value;if(!Y)return null;return w.get(this._container,Y)},_resolveSlotElement(U,M){let z=this._attach.get(U)?.content?.get(M);if(!z)return null;return w.get(this._container,z)},query(U,M,z){let Y=this.get(U,M);if(!Y)return null;return P.query(Y,z)},queryAll(U,M,z){let Y=this.get(U,M);if(!Y)return[];return P.queryAll(Y,z)},*iterate(U){let M=this._map.get(U);if(!M||Array.isArray(M))return;for(let[z,Y]of M){let V=w.get(this._container,Y);if(V)yield[z,V]}},exists(U,M){let z=this._map.get(U);if(!z)return!1;if(Array.isArray(z)){if(M==null)return z.length>0;return!1}if(M==null)return!0;return z.has(M)},hydrate(U,M={}){if(!Array.isArray(U))throw Error("uiSession.hydrate: items must be an array");let z=M.idPrefix||"",Y=w.container(this._container);if(!Y)throw Error(`uiSession.hydrate: container '${this._container}' is not initialized (call template.init first)`);let V=(J)=>z?`${z}:${J}`:J,F=(J)=>{let Q=`[data-fw-id="${CSS.escape(V(J))}"]`;return Y.querySelector(Q)},X=M.onMismatch||"throw",Z=[];function $(J){if(typeof X==="function")try{return X(J)}catch{return"throw"}return X}$:for(let J of U){let Q=B(J),H=Q.template;if(!H)continue;let G=Q.id,W=new Map,q=new Map;for(let K of H){let L=V(K.id),C=F(K.id);if(!C){let R=$({blockId:G,elm:K,realId:L,item:Q,idPrefix:z});if(R==="rebuild"){Z.push(J);continue $}if(R==="skip")continue $;throw Error(`uiSession.hydrate: no DOM node found for data-fw-id="${L}" (block '${G??"<anonymous>"}', template elm id='${K.id}'). Check that SSR was rendered with idPrefix='${z}' and the same template as the client. Pass opts.onMismatch='rebuild' to fall back to client render.`)}let A=K.parent?V(K.parent):void 0;if(!w.has(this._container,L))w.adoptNode(this._container,L,C,A);if(W.set(K.id,L),K.content)q.set(K.content,L)}if(G){if(this._map.set(G,W),q.size>0)this._attach.set(G,{content:q})}if(G&&Q.attach&&Q.attach.elm){let K=this._children.get(Q.attach.elm);if(!K)K=new Set,this._children.set(Q.attach.elm,K);K.add(G)}}if(this._fireMount(U.map((J)=>J&&J.id).filter(Boolean)),Z.length>0)this.add(Z);return this},add(U){for(let z of U)if(z&&z.id&&z.attach&&z.attach.elm){let Y=this._children.get(z.attach.elm);if(!Y)Y=new Set,this._children.set(z.attach.elm,Y);Y.add(z.id)}let M=0;while(M<U.length){let z=!!(U[M]&&U[M].prepend),Y=M+1;while(Y<U.length&&!!(U[Y]&&U[Y].prepend)===z)Y++;let V=j.full(U.slice(M,Y).map(B),this._attach,this._map);w.elms(this._container,z?O(V.arr):V.arr),M=Y}return this._fireMount(U.map((z)=>z&&z.id).filter(Boolean)),this},append(U){return this.add(U)},prepend(U){return this.add(U.map((M)=>({prepend:!0,...M})))},mount(U,M,z){if(typeof z!=="function")throw Error("uiSession.mount: factory must be a function");let Y=M?this._resolveSlotElement(U,M):this.get(U);if(!Y)throw Error(`uiSession.mount: no ${M?`slot '${M}'`:"root"} resolved for block '${U}' (mount the block before calling mount)`);let V=z(Y,U);if(V&&(typeof V==="object"||typeof V==="function")){if(typeof V==="function"||V.dispose||V.destroy||V.abort||V.close||V.stop||V.clear)this.adopt(U,V)}return V},adopt(U,M){let z=typeof M==="function"?M:M&&(M.dispose||M.destroy||M.abort||M.close||M.stop||M.clear);if(typeof z!=="function")throw Error("uiSession.adopt: resource must be a function or expose one of {dispose, destroy, abort, close, stop, clear}");let Y=this._unmount.get(U);return this._unmount.set(U,()=>{try{z.call(M)}catch{}if(Y)Y()}),M},onUnmount(U,M){if(typeof M==="function")this._unmount.set(U,M);else this._unmount.delete(U);return this},onMount(U,M){if(typeof M!=="function")return this._mount.delete(U),this;if(this._map.has(U))try{M()}catch{}else this._mount.set(U,M);return this},_fireMount(U){for(let M of U){if(!M)continue;let z=this._mount.get(M);if(!z)continue;this._mount.delete(M);try{z()}catch{}}},_fireUnmount(U){let M=this._unmount.get(U);if(!M)return;this._unmount.delete(U);try{M()}catch{}},off(U){D.off(U);for(let[,M]of this._listeners)for(let[,z]of M)z.delete(U);return this},_offTracked(U,M){let z=this._listeners.get(U);if(!z)return;if(M==null){for(let Y of z.values())for(let V of Y)D.off(V);this._listeners.delete(U)}else{let Y=z.get(M);if(Y){for(let V of Y)D.off(V);z.delete(M)}}},remove(U,M){let z=this._map.get(U)?.get(M);if(z){if(w.clearElm(this._container,z),this._map.get(U).delete(M),this._offTracked(U,M),this._map.get(U)?.size===0)this._fireUnmount(U),this._map.delete(U),this._disposeListsFor(U)}return this},clear(U,M){if(U==null){for(let z of[...this._unmount.keys()])this._fireUnmount(z);if(this._portals)for(let z of[...this._portals.keys()])this.closePortal(z);w.clearAll(this._container),this._map.clear(),this._attach.clear(),this._children.clear();for(let z of[...this._listeners.keys()])this._offTracked(z);this._listeners.clear();for(let z of[...this._lists.keys()])this._disposeListsFor(z);this._lists.clear()}else if(M!=null){let z=this._map.get(U)?.get(M);if(z)w.clearIn(this._container,z)}else{let z=this._children.get(U);if(z){for(let V of[...z])this.clear(V);this._children.delete(U)}this._fireUnmount(U);let Y=this._map.get(U);if(Y)Y.forEach((V)=>w.clearElm(this._container,V)),this._map.delete(U);this._offTracked(U),this._disposeListsFor(U)}return this},move(U,M,z,Y){let V=this.get(U,M),F=this.get(z,Y);if(V&&F)w.move(this._container,V,F);return this},replace(U,M){return this.clear(U),this.add(M)},portal(U,M={}){if(!this._portals)this._portals=new Map;let z=this._portals.get(U);if(z)return z;let Y=M.to??(typeof document<"u"?document.body:null);if(!Y)throw Error(`uiSession.portal: no target element resolved for '${U}'`);let V=`${this._container}\x1Fportal\x1F${U}`,F=Y.ownerDocument.createElement("div");F.setAttribute("data-fw-portal",String(U)),Y.appendChild(F),w.init(V,{to:F});let X=new this.constructor(V);return X._isPortal=!0,X._portalParent=this,X._portalName=U,this._portals.set(U,X),X},closePortal(U){let M=this._portals?.get(U);if(!M)return this;return M.clear(),w.clearContext?.(M._container),this._portals.delete(U),this},_disposeListsFor(U){let M=this._lists.get(U);if(!M)return;for(let z of M.values())z._dispose();this._lists.delete(U)}},resolveTemplate:B}}};var p$={name:"uiSessionDirect",version:"1.0.0",type:"fw.dom.rendering",dependencies:["dom","events"],deps:[B$,L$],factory(w,j){return{methods:{text(P,D,B){let O=arguments.length===2,T=O?this.get(P):this.get(P,D),U=O?D:B;if(T)w.text(T,U);return this},attr(P,D,B,O){let T=arguments.length===3,U=T?this.get(P):this.get(P,D),M=T?D:B,z=T?B:O;if(!U)return this;if(z===null||z===!1||z===void 0)w.attrRemove(U,M);else w.attr(U,M,z);return this},on(P,D,B,O,T,U){let M=typeof D==="string"&&typeof B==="function",z=M?P:D,Y=M?D:B,V=M?B:O,F=M?O:T,X=M?T:U,Z=M?this.get(P):this.get(P,D);if(!Z)return null;let $=F||`fw:ui:${this._container}:${++this._lseq}`;if(j.on($,Z,Y,V,X),!this._listeners.has(P))this._listeners.set(P,new Map);let J=this._listeners.get(P);if(!J.has(z))J.set(z,new Set);return J.get(z).add($),$},bind(P,D,B,O,T){if(!P||typeof P.subscribe!=="function")throw Error("uiSession.bind: first arg must be a signal");let U,M,z;if(arguments.length<=3)U=void 0,M=B??"text",z=void 0;else if(arguments.length===4&&O!==null&&typeof O==="object")U=void 0,M=B,z=O;else U=B,M=O??"text",z=T;let Y=z&&typeof z.transform==="function"?z.transform:null,V=typeof M==="string"?M.indexOf(":"):-1,F=V>0?M.slice(0,V):null,X=V>0?M.slice(V+1):null,Z=null,$=(H)=>{let G=Y?Y(H):H,W=U===void 0?this.get(D):this.get(D,U);if(!W)return;if(M==="text"){w.text(W,G);return}if(M==="class"){if(Z!=null)w.classRemove(W,Z);if(Z=G==null||G===!1||G===""?null:String(G),Z)w.classAdd(W,Z);return}if(F==="class"){if(G)w.classAdd(W,X);else w.classRemove(W,X);return}if(F==="style"){if(G==null||G===!1)W.style.removeProperty(X);else w.style(W,X,String(G));return}if(F==="prop"){try{W[X]=G}catch{}return}if(G===null||G===!1||G===void 0)w.attrRemove(W,M);else w.attr(W,M,G)};$(P.get());let J=P.subscribe($),Q=this._unmount.get(D);return this._unmount.set(D,()=>{if(J(),Q)Q()}),J}}}}};var c$={name:"hex",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let j=new Int8Array(128).fill(-1);for(let F=0;F<16;F++)if(j["0123456789abcdef".charCodeAt(F)]=F,F>=10)j["ABCDEF".charCodeAt(F-10)]=F;let N=Uint8Array.from("0123456789abcdef",(F)=>F.charCodeAt(0)),P=new Uint8Array(new Uint16Array([1]).buffer)[0]===1,D=new Uint16Array(256);for(let F=0;F<256;F++){let X=N[F>>4],Z=N[F&15];D[F]=P?X|Z<<8:X<<8|Z}let B=Uint8Array.prototype,O=typeof B.toHex==="function"?B.toHex:null,T=typeof TextDecoder==="function"?new TextDecoder:null,U=8192;function M(F){if(T)return T.decode(F);if(F.length<=U)return String.fromCharCode.apply(null,F);let X=[];for(let Z=0;Z<F.length;Z+=U)X.push(String.fromCharCode.apply(null,F.subarray(Z,Z+U)));return X.join("")}return{toBytes:(F)=>{let X=F.length;if(X%2!==0)throw Error(`hex: odd-length input (length ${X})`);let Z=new Uint8Array(X>>1);for(let $=0,J=0;$<X;$+=2,J++){let Q=F.charCodeAt($),H=F.charCodeAt($+1),G=Q<128?j[Q]:-1,W=H<128?j[H]:-1;if(G<0||W<0)throw Error(`hex: invalid character at index ${G<0?$:$+1}`);Z[J]=G<<4|W}return Z},fromBytes:(F)=>{if(O&&F instanceof Uint8Array)return O.call(F);let X=F.length,Z=new Uint16Array(X);for(let $=0;$<X;$++)Z[$]=D[F[$]&255];return M(new Uint8Array(Z.buffer))},test:(F)=>{if(typeof F!=="string")return!1;if(F.length%2!==0)return!1;return/^[0-9a-fA-F]*$/.test(F)}}}};var DJ={name:"b64",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let w=[],j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(let R=0;R<64;R++)w["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(R)]=R;function N(R,S,x,I){return w[R.charCodeAt(0)]<<18|w[S.charCodeAt(0)]<<12|w[x.charCodeAt(0)]<<6|w[I.charCodeAt(0)]}function P(R,S){R.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[S>>2]),R.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[S<<4&63]),R.push("==")}function D(R,S){R.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[S>>10]),R.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[S>>4&63]),R.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[S<<2&63]),R.push("=")}function B(R,S){R.push(S>>8&255),R.push(S&255)}function O(R,S,x,I,E){if(R[I-2]==="=")E=2;else if(R[I-1]==="=")E=1;I=E>0?I-4:I;let _;for(_=0;_<I;_+=4)x=N(R[_],R[_+1],R[_+2],R[_+3]),S.push(x>>16&255),S.push(x>>8&255),S.push(x&255);if(E===2)S.push((w[R.charCodeAt(_)]<<2|w[R.charCodeAt(_+1)]>>4)&255);else if(E===1)B(S,w[R.charCodeAt(_)]<<10|w[R.charCodeAt(_+1)]<<4|w[R.charCodeAt(_+2)]>>2);return new Uint8Array(S)}let T=Uint8Array.from("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",(R)=>R.charCodeAt(0)),U=new Uint8Array(new Uint16Array([1]).buffer)[0]===1,M=new Uint16Array(4096);for(let R=0;R<4096;R++){let S=T[R>>6],x=T[R&63];M[R]=U?S|x<<8:S<<8|x}let z=new Uint8Array(256).fill(64);for(let R=0;R<64;R++)z["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(R)]=R;let Y=Uint8Array,V=typeof Y.prototype.toBase64==="function"?Y.prototype.toBase64:null,F=typeof Y.fromBase64==="function"?Y.fromBase64:null,X=typeof TextDecoder==="function"?new TextDecoder:null,Z=8192;function $(R){if(X)return X.decode(R);if(R.length<=Z)return String.fromCharCode.apply(null,R);let S=[];for(let x=0;x<R.length;x+=Z)S.push(String.fromCharCode.apply(null,R.subarray(x,x+Z)));return S.join("")}function J(R){let S=R.length,x=S%3,I=S-x,E=new Uint16Array(I/3*2);for(let k=0,f=0;k<I;k+=3,f+=2){let h=(R[k]<<16)+(R[k+1]<<8)+R[k+2];E[f]=M[h>>12&4095],E[f+1]=M[h&4095]}let _=$(new Uint8Array(E.buffer));if(x===0)return _;let v=[];if(x===1)P(v,R[S-1]);else D(v,(R[S-2]<<8)+R[S-1]);return _+v.join("")}function Q(R){let S=R.length;if(S%4!==0)return null;if(S===0)return new Uint8Array(0);let x=0;if(R.charCodeAt(S-1)===61)x=R.charCodeAt(S-2)===61?2:1;else if(R.charCodeAt(S-2)===61)return null;let I=new Uint8Array(S/4*3-x),E=x?S-4:S,_=0,v=0,k=0;for(let f=0;f<E;f+=4){let h=R.charCodeAt(f),u=R.charCodeAt(f+1),p=R.charCodeAt(f+2),y=R.charCodeAt(f+3);v|=h|u|p|y;let c=z[h],o=z[u],r=z[p],e=z[y];_|=c|o|r|e;let a=c<<18|o<<12|r<<6|e;I[k++]=a>>16,I[k++]=a>>8,I[k++]=a}if(x){let f=R.charCodeAt(E),h=R.charCodeAt(E+1),u=x===1?R.charCodeAt(E+2):65;v|=f|h|u;let p=z[f],y=z[h],c=z[u];if(_|=p|y|c,I[k++]=p<<2|y>>4,x===1)I[k]=y<<4|c>>2}return _&64||v>255?null:I}let H=function(R){if(V&&R instanceof Uint8Array)return V.call(R);return J(R)},G=function(R){if(typeof R!=="string")return O(R,[],0,R.length,0);let S=R.length;if(F&&S%4===0&&S>0){let x=R.charCodeAt(S-1)===61,I=R.charCodeAt(S-2)===61;if(x||!I)try{let E=F(R);if(E.length===S/4*3-(x?I?2:1:0))return E}catch{}}return Q(R)||O(R,[],0,S,0)},W=function(R){return/^(?=(.{4})*$)[A-Za-z0-9+/]*={0,2}$/.test(R)},q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",K=function(R){return H(R).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")},L=function(R){if(typeof R!=="string"||!/^[A-Za-z0-9\-_]*$/.test(R))return!1;let S=R.length%4;if(S===1)return!1;if(S===0)return!0;let x=S===2?4:2;return(q.indexOf(R[R.length-1])&(1<<x)-1)===0};return{fromBytes:H,toBytes:G,test:W,url:{fromBytes:K,toBytes:function(R){if(!L(R))return!1;let S=R.replace(/-/g,"+").replace(/_/g,"/");return G(S+"=".repeat((4-R.length%4)%4))},test:L}}}};var E$={name:"utf8",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let w=typeof TextEncoder<"u",j=typeof TextDecoder<"u",N=w?new TextEncoder:null,P=j?new TextDecoder("utf-8",{fatal:!1}):null;function D(U){let M=U.length,z=new Uint8Array(M*3),Y=0;for(let V=0;V<M;V++){let F=U.charCodeAt(V);if(F>=55296&&F<=56319){let X=V+1<M?U.charCodeAt(V+1):-1;if(X>=56320&&X<=57343)F=65536+(F-55296<<10)+(X-56320),V++;else F=65533}else if(F>=56320&&F<=57343)F=65533;if(F<128)z[Y++]=F;else if(F<2048)z[Y++]=192|F>>6,z[Y++]=128|F&63;else if(F<65536)z[Y++]=224|F>>12,z[Y++]=128|F>>6&63,z[Y++]=128|F&63;else z[Y++]=240|F>>18,z[Y++]=128|F>>12&63,z[Y++]=128|F>>6&63,z[Y++]=128|F&63}return z.subarray(0,Y)}function B(U){let M=[],z=U.length,Y=0;while(Y<z){let V=U[Y],F;if(V<128)F=V,Y+=1;else if(V<192)F=65533,Y+=1;else if(V<224){if(Y+1>=z){M.push(String.fromCharCode(65533));break}F=(V&31)<<6|U[Y+1]&63,Y+=2}else if(V<240){if(Y+2>=z){M.push(String.fromCharCode(65533));break}F=(V&15)<<12|(U[Y+1]&63)<<6|U[Y+2]&63,Y+=3}else if(V<248){if(Y+3>=z){M.push(String.fromCharCode(65533));break}F=(V&7)<<18|(U[Y+1]&63)<<12|(U[Y+2]&63)<<6|U[Y+3]&63,Y+=4}else F=65533,Y+=1;if(F<65536)M.push(String.fromCharCode(F));else F-=65536,M.push(String.fromCharCode(55296|F>>10,56320|F&1023))}return M.join("")}return{toBytes:function(U){if(U===""||U==null)return new Uint8Array(0);if(N)return N.encode(String(U));return D(String(U))},fromBytes:function(U){if(!U||U.length===0)return"";if(P){let M=U instanceof Uint8Array?U:new Uint8Array(U);return P.decode(M)}return B(U)}}}};var LJ={name:"url",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){function w($,J){let Q=encodeURIComponent(String($));return J==="plus"?Q.replace(/%20/g,"+"):Q}function j($,J){try{if(J==="plus")$=$.replace(/\+/g," ");return decodeURIComponent($)}catch{return $}}function N($){if($.indexOf("[")<0)return[$];let J=[],Q=$.indexOf("[");J.push($.slice(0,Q));let H=Q,G=$.length;while(H<G&&$[H]==="["){let W=$.indexOf("]",H);if(W<0)return J.push($.slice(H)),J;J.push($.slice(H+1,W)),H=W+1}return J}function P($,J,Q){let H=$;for(let G=0;G<J.length;G++){let W=J[G],q=G===J.length-1;if(W===""){if(!Array.isArray(H))return;if(q)H.push(Q);else{let K={};H.push(K),H=K}continue}if(q)if(Array.isArray(H)){let K=/^\d+$/.test(W)?parseInt(W,10):null;if(K!==null)H[K]=Q}else if(W in H){let K=H[W];if(Array.isArray(K))K.push(Q);else H[W]=[K,Q]}else H[W]=Q;else{let K=J[G+1],L=K===""||/^\d+$/.test(K);if(Array.isArray(H)){let C=/^\d+$/.test(W)?parseInt(W,10):H.length;if(!H[C])H[C]=L?[]:{};H=H[C]}else{if(!(W in H))H[W]=L?[]:{};H=H[W]}}}}function D($,J){J=J||{};let Q=J.arrayFormat||"repeat",H=!!J.nested,G=J.space||"percent",W=J.delimiter||"&",q={};if(!$)return q;if($[0]==="?"||$[0]==="#")$=$.slice(1);if(!$)return q;let K=$.split(W);for(let L=0;L<K.length;L++){let C=K[L];if(C==="")continue;let A=C.indexOf("="),R,S;if(A<0)R=C,S="";else R=C.slice(0,A),S=C.slice(A+1);let x=j(R,G),I=j(S,G);if(Q==="comma"&&I.indexOf(",")>=0)I=I.split(",");if(H||Q==="brackets"||Q==="indices"){let E=N(x);if(E.length>1){if(Array.isArray(I))for(let _=0;_<I.length;_++)P(q,E,I[_]);else P(q,E,I);continue}}if(Q==="none")q[x]=Array.isArray(I)?I[I.length-1]:I;else if(x in q){let E=q[x];if(Array.isArray(E))if(Array.isArray(I))for(let _ of I)E.push(_);else E.push(I);else q[x]=Array.isArray(I)?[E,...I]:[E,I]}else q[x]=I}return q}function B($,J,Q,H){if(Q===void 0)return;if(Q===null){$.push(w(J,H)+"=");return}$.push(w(J,H)+"="+w(Q,H))}function O($,J){J=J||{};let Q=J.arrayFormat||"repeat",H=!!J.nested,G=J.space||"percent",W=J.delimiter||"&",q=!!J.skipNull;if(!$||typeof $!=="object")return"";let K=[],L=(A,R)=>{if(R===void 0&&q)return;if(R===null&&q)return;if(Array.isArray(R)){if(R.length===0)return;switch(Q){case"brackets":for(let S of R)L(A+"[]",S);return;case"indices":for(let S=0;S<R.length;S++)L(A+"["+S+"]",R[S]);return;case"comma":K.push(w(A,G)+"="+R.map((S)=>w(S==null?"":S,G)).join(","));return;case"repeat":default:for(let S of R)B(K,A,S,G);return}}if(H&&R&&typeof R==="object"&&!(R instanceof Date)){for(let S of Object.keys(R))L(A+"["+S+"]",R[S]);return}if(R instanceof Date)R=R.toISOString();B(K,A,R,G)},C=J.sort?Object.keys($).sort():Object.keys($);for(let A of C)L(A,$[A]);return K.join(W)}function T($,J,Q){let H=Q&&Q.space||"plus";if(typeof URL==="function"){let E=J?new URL($,J):new URL($);return{protocol:E.protocol,username:E.username,password:E.password,hostname:E.hostname,port:E.port,host:E.host,pathname:E.pathname,search:E.search,hash:E.hash,origin:E.origin,href:E.href,query:D(E.search,{space:H})}}let G=/^(?:([a-z][a-z0-9+\-.]*:))?(?:\/\/((?:([^:@/]*)(?::([^@/]*))?@)?(\[[^\]]*\]|[^:/?#]*)(?::(\d+))?))?([^?#]*)(\?[^#]*)?(#.*)?$/i.exec($);if(!G)throw Error("url: cannot parse");let W=G[1]||"",q=G[3]||"",K=G[4]||"",L=G[5]||"",C=G[6]||"",A=G[7]||"",R=G[8]||"",S=G[9]||"",x=L+(C?":"+C:""),I=W&&L?W+"//"+x:"";return{protocol:W,username:q,password:K,hostname:L,port:C,host:x,pathname:A,search:R,hash:S,origin:I,href:$,query:D(R,{space:H})}}let U=new Set(["http","https","ws","wss","ftp","file"]);function M($){if(!$)return"";let J="";if($.protocol){if(J+=$.protocol,!J.endsWith(":"))J+=":";let Q=J.slice(0,-1).toLowerCase();if($.host||$.hostname||U.has(Q))J+="//"}if($.username){if(J+=encodeURIComponent($.username),$.password)J+=":"+encodeURIComponent($.password);J+="@"}if($.host)J+=$.host;else if($.hostname){if(J+=$.hostname,$.port)J+=":"+$.port}if($.pathname)J+=$.pathname.startsWith("/")||!$.hostname?$.pathname:"/"+$.pathname;if($.query!==void 0&&$.query!==null&&$.query!==""){let Q=typeof $.query==="string"?$.query:O($.query);if(Q)J+="?"+Q}else if($.search)J+=$.search.startsWith("?")?$.search:"?"+$.search;if($.hash)J+=$.hash.startsWith("#")?$.hash:"#"+$.hash;return J}let z=";/?:@&=+$,-_.!~*'()#";function Y($){let J=Array(128);for(let Q=0;Q<128;Q++){let H=String.fromCharCode(Q);if(/[0-9A-Za-z]/.test(H))J[Q]=H;else J[Q]="%"+("0"+Q.toString(16).toUpperCase()).slice(-2)}for(let Q=0;Q<$.length;Q++)J[$.charCodeAt(Q)]=$[Q];return J}let V=Y(z),F=/^[0-9a-fA-F]{2}$/;function X($,J){if(!$)return $===""?"":String($);let Q=J&&J.safe!==void 0?Y(J.safe):V,H="",G=$.length;for(let W=0;W<G;W++){let q=$.charCodeAt(W);if(q===37&&W+2<G){if(F.test($.slice(W+1,W+3))){H+=$.slice(W,W+3),W+=2;continue}}if(q<128){H+=Q[q];continue}if(q>=55296&&q<=57343){if(q<=56319&&W+1<G){let K=$.charCodeAt(W+1);if(K>=56320&&K<=57343){H+=encodeURIComponent($[W]+$[W+1]),W++;continue}}H+="%EF%BF%BD";continue}H+=encodeURIComponent($[W])}return H}function Z($){if(!$)return $===""?"":String($);try{return decodeURIComponent($)}catch{return $}}return{parseQuery:D,stringifyQuery:O,parseURL:T,buildURL:M,encodeSafe:X,decodeSafe:Z}}};var d$={name:"unicode",version:"1.0.0",type:"fw.io.text",dependencies:[],factory(){let w=new Set(["NFC","NFD","NFKC","NFKD"]);function j(z,Y="NFC"){if(typeof z!=="string")throw Error("unicode.normalize: str must be a string");if(!w.has(Y))throw Error(`unicode.normalize: unknown form "${Y}"`);return z.normalize(Y)}function N(z,Y){if(Y)return z.toLocaleLowerCase(Y);return z.toLowerCase()}function P(z,Y,V={}){let{locale:F,...X}=V;return new Intl.Collator(F,X).compare(z,Y)}function D(z={}){let{locale:Y,...V}=z,F=new Intl.Collator(Y,V);return{compare:F.compare.bind(F),sort:(X)=>[...X].sort(F.compare.bind(F))}}function*B(z){if(typeof Intl<"u"&&typeof Intl.Segmenter==="function"){let Y=new Intl.Segmenter(void 0,{granularity:"grapheme"});for(let{segment:V}of Y.segment(z))yield V}else for(let Y of z)yield Y}let O=[[4352,4447],[11904,12031],[12032,12287],[12288,12351],[12352,13311],[13312,19903],[19968,40959],[40960,42191],[43360,43391],[44032,55295],[63744,64255],[65040,65055],[65072,65135],[65280,65376],[65504,65510],[110592,110847],[127744,129535],[131072,173791],[173824,183983],[183984,191471]];function T(z){if(z===0)return 0;if(z<32||z>=127&&z<160)return 0;if(z>=768&&z<=879)return 0;if(z>=8203&&z<=8207)return 0;for(let[Y,V]of O)if(z>=Y&&z<=V)return 2;return 1}function U(z){let Y=0;for(let V of B(z)){let F=V.codePointAt(0);Y+=T(F)}return Y}function M(z){return z.normalize("NFD").replace(/\p{Mn}/gu,"").normalize("NFC")}return{normalize:j,casefold:N,compare:P,collator:D,graphemes:B,width:U,stripDiacritics:M}}};var MJ={name:"str",version:"1.0.0",type:"fw.io.text",dependencies:["unicode"],deps:[d$],factory(w){function j(Z){return Z.replace(/([a-z])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/([a-zA-Z])(\d)/g,"$1 $2").replace(/(\d)([a-zA-Z])/g,"$1 $2").split(/[\s\-_]+/).filter((J)=>J.length>0)}function N(Z){let $=j(Z);if(!$.length)return"";return $[0].toLowerCase()+$.slice(1).map((J)=>J[0].toUpperCase()+J.slice(1).toLowerCase()).join("")}function P(Z){return j(Z).map(($)=>$[0].toUpperCase()+$.slice(1).toLowerCase()).join("")}function D(Z){return j(Z).map(($)=>$.toLowerCase()).join("-")}function B(Z){return j(Z).map(($)=>$.toLowerCase()).join("_")}function O(Z){return j(Z).map(($)=>$.toUpperCase()).join("_")}function T(Z){return j(Z).map(($)=>$[0].toUpperCase()+$.slice(1).toLowerCase()).join(" ")}function U(Z,$={}){let{separator:J="-",lower:Q=!0}=$,H=w.stripDiacritics(Z);if(Q)H=w.casefold(H);return H=H.replace(/[^a-zA-Z0-9]+/g,J),H=H.replace(new RegExp(`^${V(J)}+|${V(J)}+$`,"g"),""),H=H.replace(new RegExp(`${V(J)}{2,}`,"g"),J),H}function M(Z,$,J={}){let{suffix:Q="…",wordBoundary:H=!0}=J;if(Z.length<=$)return Z;let G=$-Q.length;if(G<=0)return Q.slice(0,$);let W=Z.slice(0,G);if(H){let q=W.lastIndexOf(" ");if(q>0)W=W.slice(0,q)}return W+Q}function z(Z,$,J=" ",Q="left"){if(Z.length>=$)return Z;let H=$-Z.length,G=J.repeat(Math.ceil(H/J.length)).slice(0,H);if(Q==="right")return Z+G;if(Q==="both"){let W=Math.floor(H/2),q=H-W;return J.repeat(W).slice(0,W)+Z+J.repeat(q).slice(0,q)}return G+Z}function Y(Z,$){return Z.replace(/\{(\w+)\}/g,(J,Q)=>(Q in $)?String($[Q]):`{${Q}}`)}function V(Z){return Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function F(Z){return Z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}function X(Z,$){if(Z===$)return 1;let J=Z.length,Q=$.length;if(J===0&&Q===0)return 1;if(J===0||Q===0)return 0;let H=Array.from({length:Q+1},(G,W)=>W);for(let G=1;G<=J;G++){let W=H[0];H[0]=G;for(let q=1;q<=Q;q++){let K=H[q];H[q]=Z[G-1]===$[q-1]?W:1+Math.min(W,H[q],H[q-1]),W=K}}return 1-H[Q]/Math.max(J,Q)}return{splitWords:j,camelCase:N,pascalCase:P,kebabCase:D,snakeCase:B,constantCase:O,titleCase:T,slug:U,truncate:M,pad:z,format:Y,escapeRegExp:V,escapeHTML:F,similarity:X}}};var OJ={name:"date",version:"1.0.0",type:"fw.io.time",dependencies:[],factory(){function w(Z){return Z instanceof Date&&!isNaN(Z.getTime())}function j(Z,$={}){let{locale:J="en-US",...Q}=$;return new Intl.DateTimeFormat(J,Q).format(Z)}let N=[{unit:"year",ms:31557600000},{unit:"month",ms:2630016000},{unit:"week",ms:604800000},{unit:"day",ms:86400000},{unit:"hour",ms:3600000},{unit:"minute",ms:60000},{unit:"second",ms:1000}];function P(Z,$,J={}){if($===void 0||$===null)$=new Date;let{locale:Q="en-US",...H}=J,G=Z.getTime()-$.getTime(),W=Math.abs(G),q=new Intl.RelativeTimeFormat(Q,{numeric:"auto",...H});for(let{unit:K,ms:L}of N)if(W>=L||K==="second"){let C=Math.round(G/L);return q.format(C,K)}return q.format(0,"second")}let D=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d+)?(Z|[+-]\d{2}:?\d{2})$/;function B(Z){if(typeof Z!=="string"||!D.test(Z))return null;let $=new Date(Z);return w($)?$:null}function O(Z,$){if(!$){let v=new Date(Z);return w(v)?v:null}let J={YYYY:null,MM:null,DD:null,HH:null,mm:null,ss:null,SSS:null},H=$.replace(/YYYY/g,"(\\d{4})").replace(/MM/g,"(\\d{2})").replace(/DD/g,"(\\d{2})").replace(/HH/g,"(\\d{2})").replace(/mm/g,"(\\d{2})").replace(/ss/g,"(\\d{2})").replace(/SSS/g,"(\\d{3})"),G=[],W=$,K=["YYYY","MM","DD","HH","mm","ss","SSS"].map((v)=>({t:v,idx:W.indexOf(v)})).filter((v)=>v.idx!==-1).sort((v,k)=>v.idx-k.idx);for(let{t:v}of K)G.push(v);let L=new RegExp("^"+H+"$").exec(Z);if(!L)return null;for(let v=0;v<G.length;v++)J[G[v]]=parseInt(L[v+1],10);let C=J.YYYY??0,A=(J.MM??1)-1,R=J.DD??1,S=J.HH??0,x=J.mm??0,I=J.ss??0,E=J.SSS??0,_=new Date(C,A,R,S,x,I,E);return w(_)?_:null}function T(Z,$,J,Q){let H=new Date(Z.getTime()),G=new Date($,J+1,0).getDate();return H.setFullYear($,J,Math.min(Q,G)),H}function U(Z,$,J){switch(J){case"years":return T(Z,Z.getFullYear()+$,Z.getMonth(),Z.getDate());case"months":return T(Z,Z.getFullYear(),Z.getMonth()+$,Z.getDate());case"weeks":{let Q=new Date(Z.getTime());return Q.setDate(Z.getDate()+$*7),Q}case"days":{let Q=new Date(Z.getTime());return Q.setDate(Z.getDate()+$),Q}case"hours":{let Q=new Date(Z.getTime());return Q.setTime(Z.getTime()+$*3600000),Q}case"minutes":{let Q=new Date(Z.getTime());return Q.setTime(Z.getTime()+$*60000),Q}case"seconds":{let Q=new Date(Z.getTime());return Q.setTime(Z.getTime()+$*1000),Q}case"ms":{let Q=new Date(Z.getTime());return Q.setTime(Z.getTime()+$),Q}default:throw Error(`date.add: unknown unit "${J}"`)}}function M(Z,$,J){return U(Z,-$,J)}function z(Z,$,J){let Q=Z.getTime()-$.getTime();switch(J){case"years":return Math.trunc(Z.getFullYear()-$.getFullYear()+(Z.getMonth()-$.getMonth())/12);case"months":{let H=Z.getFullYear()-$.getFullYear(),G=Z.getMonth()-$.getMonth(),W=H*12+G,q=W>=0?1:-1,K=Z.getDate(),L=$.getDate();if(q>0&&K<L)return W-1;if(q<0&&K>L)return W+1;return W}case"weeks":return Math.trunc(Q/604800000);case"days":return Math.trunc(Q/86400000);case"hours":return Math.trunc(Q/3600000);case"minutes":return Math.trunc(Q/60000);case"seconds":return Math.trunc(Q/1000);case"ms":return Q;default:throw Error(`date.diff: unknown unit "${J}"`)}}function Y(Z,$){let J=new Date(Z.getTime());switch($){case"years":J.setMonth(0,1),J.setHours(0,0,0,0);break;case"months":J.setDate(1),J.setHours(0,0,0,0);break;case"days":J.setHours(0,0,0,0);break;case"hours":J.setMinutes(0,0,0);break;case"minutes":J.setSeconds(0,0);break;case"seconds":J.setMilliseconds(0);break}return J}function V(Z,$){let J=new Date(Z.getTime());switch($){case"years":J.setMonth(11,31),J.setHours(23,59,59,999);break;case"months":{let Q=new Date(J.getFullYear(),J.getMonth()+1,0).getDate();J.setDate(Q),J.setHours(23,59,59,999);break}case"days":J.setHours(23,59,59,999);break;case"hours":J.setMinutes(59,59,999);break;case"minutes":J.setSeconds(59,999);break;case"seconds":J.setMilliseconds(999);break}return J}function F(Z,$){let J={timeZone:$,hour12:!1,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"},Q=new Intl.DateTimeFormat("en-CA",J).formatToParts(Z),H=(W)=>parseInt(Q.find((q)=>q.type===W).value,10),G=new Date(Date.UTC(H("year"),H("month")-1,H("day"),H("hour"),H("minute"),H("second")));return Math.round((G.getTime()-Z.getTime())/60000)}function X(){try{return Intl.supportedValuesOf("timeZone")}catch{return["UTC","Europe/London","Europe/Paris","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","Asia/Tokyo","Asia/Shanghai","Australia/Sydney"]}}return{format:j,formatRelative:P,parse:O,parseISO:B,diff:z,add:U,sub:M,startOf:Y,endOf:V,getOffset:F,zones:X,isValid:w}}};var PJ={name:"i18n",version:"1.0.0",type:"fw.io.i18n",dependencies:[],factory(){function w(B,O){let T=Object.assign({},B);for(let U of Object.keys(O))if(O[U]&&typeof O[U]==="object"&&!Array.isArray(O[U])&&T[U]&&typeof T[U]==="object")T[U]=w(T[U],O[U]);else T[U]=O[U];return T}function j(B){if(B===null||typeof B!=="object")return B;if(Array.isArray(B))return B.map(j);let O={};for(let T of Object.keys(B))O[T]=j(B[T]);return O}function N(B,O){if(!B)return;let T=O.split("."),U=B;for(let M of T){if(U==null||typeof U!=="object")return;U=U[M]}return U}function P(B,O){if(!O)return B;return B.replace(/\{(\w+)\}/g,(T,U)=>(U in O)?String(O[U]):`{${U}}`)}function D({locale:B="en",fallback:O="en",catalogs:T={}}={}){let U=B,M=O,z={};for(let[Q,H]of Object.entries(T))z[Q]=j(H);function Y(Q){return N(z[U],Q)??N(z[M],Q)??void 0}function V(Q,H){let G=Y(Q);if(G===void 0)return Q;if(typeof G!=="string")return Q;return P(G,H)}function F(Q,H,G){let W=Y(Q);if(!W||typeof W!=="object")return Q;let K=new Intl.PluralRules(U).select(H),L=W[K]??W.other??Q;if(typeof L!=="string")return Q;return P(L,{count:H,...G})}function X(Q){return N(z[U],Q)!==void 0}function Z(Q){U=Q}function $(Q,H){let G=j(H);z[Q]=z[Q]?w(z[Q],G):G}function J(Q,H,G={}){switch(H){case"number":return new Intl.NumberFormat(U,G).format(Q);case"currency":{let{currency:W="USD",...q}=G;return new Intl.NumberFormat(U,{style:"currency",currency:W,...q}).format(Q)}case"date":return new Intl.DateTimeFormat(U,G).format(Q);case"relative":{let{value:W=Q,unit:q="day",...K}=G;return new Intl.RelativeTimeFormat(U,{numeric:"auto",...K}).format(W,q)}default:throw Error(`i18n.format: unknown type "${H}"`)}}return{t:V,tn:F,has:X,setLocale:Z,addCatalog:$,format:J,get locale(){return U},get fallback(){return M}}}return{create:D}}};var BJ={name:"rateLimit",dependencies:[],factory(){function w(N,P,D){if(typeof N!=="function")throw Error("rateLimit: fn must be a function");if(typeof P!=="number"||isNaN(P)||P<=0)throw Error("rateLimit: delay must be a positive number");let B=D&&D.leading!==void 0?!!D.leading:!1,O=D&&D.trailing!==void 0?!!D.trailing:!0,T=D&&D.maxWait!==void 0?D.maxWait:void 0;if(T!==void 0&&(typeof T!=="number"||isNaN(T)||T<=0))throw Error("rateLimit: maxWait must be a positive number");let U=null,M=null,z=null,Y=null,V,F,X=0,Z=!1;function $(C){return X=C,Z=!1,V=N.apply(Y,z),Y=null,z=null,V}function J(C){U=setTimeout(H,C)}function Q(){if(M!==null)clearTimeout(M),M=null}function H(){let C=Date.now();if(q(C))return G(C);let A=W(C);U=setTimeout(H,A)}function G(C){if(U=null,Q(),O&&z!==null)return $(C);z=null,Y=null,Z=!1}function W(C){let A=C-F,R=C-X,S=P-A;return T!==void 0?Math.min(S,T-R):S}function q(C){let A=C-F,R=C-X;return F===void 0||A>=P||A<0||T!==void 0&&R>=T}function K(C){if(X=C,J(P),Z=!0,B)return $(C)}function L(...C){let A=Date.now(),R=q(A);if(z=C,Y=this,F=A,Z=!0,R){if(U===null)return K(A);if(T!==void 0){if(U!==null)clearTimeout(U);return U=setTimeout(H,P),$(A)}}if(U===null)J(P);if(T!==void 0&&M===null)M=setTimeout(()=>{if(M=null,z!==null)X=Date.now(),Z=!1,V=N.apply(Y,z),Y=null,z=null},T);return}return L.cancel=function(){if(U!==null)clearTimeout(U),U=null;Q(),z=null,Y=null,Z=!1},L.flush=function(){if(U!==null)clearTimeout(U),U=null;if(Q(),z!==null){let C=Date.now();Z=!1,V=N.apply(Y,z),Y=null,z=null,X=C}return V},L.pending=function(){return Z},L}function j(N,P,D){if(typeof N!=="function")throw Error("rateLimit: fn must be a function");if(typeof P!=="number"||isNaN(P)||P<=0)throw Error("rateLimit: interval must be a positive number");let B=D&&D.leading!==void 0?!!D.leading:!0,O=D&&D.trailing!==void 0?!!D.trailing:!0;if(!B&&!O)throw Error("rateLimit: throttle options leading and trailing cannot both be false");return w(N,P,{leading:B,trailing:O,maxWait:P})}return{debounce:w,throttle:j}}};var RJ={name:"ajax",type:"fw.dom.net",dependencies:[],factory(){function w(D,B){if(!B)return D;if(/^https?:\/\//i.test(B))return B;let O=D.endsWith("/")?D:D+"/";return new URL(B.replace(/^\//,""),O).href}async function j(D,B){if(B==="response")return D;if(B==="blob")return D.blob();if(B==="buffer")return D.arrayBuffer();if(B==="text")return D.text();if(B==="json"){let T=await D.text();try{return JSON.parse(T)}catch(U){throw SyntaxError(`Invalid JSON response: ${U.message}`,{cause:U})}}let O=D.headers.get("content-type")??"";if(O.includes("application/json")||O.includes("+json")){let T=await D.text();try{return JSON.parse(T)}catch{return T}}if(O.startsWith("text/"))return D.text();return D.arrayBuffer()}class N extends Error{constructor(D){super(`HTTP ${D.status} ${D.statusText}`);Object.defineProperty(this,"name",{value:"HttpError",writable:!0,configurable:!0}),this.status=D.status,this.response=D}}async function P(D,B,{headers:O={},body:T,type:U,timeout:M=0,signal:z}={}){let Y;if(M>0&&z)Y=typeof AbortSignal.any==="function"?AbortSignal.any([AbortSignal.timeout(M),z]):z;else if(M>0)Y=AbortSignal.timeout(M);else if(z)Y=z;let V=new Headers(O),F={method:D,headers:V,signal:Y};if(T!==void 0&&T!==null)if(typeof T==="object"&&!(T instanceof FormData)&&!(T instanceof Blob)&&!(T instanceof ArrayBuffer)&&!(T instanceof URLSearchParams)){if(F.body=JSON.stringify(T),!V.has("Content-Type"))V.set("Content-Type","application/json")}else F.body=T;let X=await fetch(B,F);if(!X.ok)throw new N(X);return j(X,U)}return function D(B="",O={}){let T=B?B.replace(/\/$/,""):typeof location<"u"?location.origin:"";function U(M,z,Y={}){let V={...O,...Y};return V.headers={...O.headers??{},...Y.headers??{}},P(M,w(T,z),V)}return{get(M,z){return U("GET",M,z)},post(M,z,Y){return U("POST",M,{...Y,body:z})},put(M,z,Y){return U("PUT",M,{...Y,body:z})},patch(M,z,Y){return U("PATCH",M,{...Y,body:z})},del(M,z){return U("DELETE",M,z)},scope(M="",z={}){return D(w(T,M),{...O,...z})},HttpError:N}}}};var CJ={name:"network",type:"fw.dom.net",dependencies:[],factory(){let w={online:new Set,offline:new Set,change:new Set,connection:new Set},j,N,P;function D(){return typeof window<"u"?window:typeof self<"u"?self:null}function B(){if(typeof navigator>"u")return null;return navigator.connection??navigator.mozConnection??navigator.webkitConnection??null}function O(){if(j)return;j=()=>{for(let Q of w.online)Q();for(let Q of w.change)Q(!0)},N=()=>{for(let Q of w.offline)Q();for(let Q of w.change)Q(!1)};let J=D();if(J)J.addEventListener("online",j),J.addEventListener("offline",N)}function T(){if(P)return;let J=B();if(!J||typeof J.addEventListener!=="function")return;P=()=>{let Q=M();for(let H of w.connection)H(Q)},J.addEventListener("change",P)}function U(){return typeof navigator<"u"?navigator.onLine:!0}function M(){let J=B();if(!J)return null;return Object.freeze({effectiveType:J.effectiveType??null,downlink:typeof J.downlink==="number"?J.downlink:null,rtt:typeof J.rtt==="number"?J.rtt:null,saveData:!!J.saveData,type:J.type??null})}function z(){let J=B();return!!(J&&J.saveData)}function Y(J){return O(),w.online.add(J),()=>w.online.delete(J)}function V(J){return O(),w.offline.add(J),()=>w.offline.delete(J)}function F(J,{immediate:Q=!0}={}){if(O(),w.change.add(J),Q)J(U());return()=>w.change.delete(J)}function X(J,{immediate:Q=!0}={}){if(T(),w.connection.add(J),Q)J(M());return()=>w.connection.delete(J)}async function Z(J,{timeout:Q=3000,method:H="HEAD"}={}){let G=new AbortController,W=setTimeout(()=>G.abort(),Q);try{return await fetch(J,{method:H,cache:"no-store",signal:G.signal,mode:"no-cors"}),!0}catch{return!1}finally{clearTimeout(W)}}function $(){w.online.clear(),w.offline.clear(),w.change.clear(),w.connection.clear();let J=D();if(J&&j)J.removeEventListener("online",j),J.removeEventListener("offline",N);j=null,N=null;let Q=B();if(Q&&P&&typeof Q.removeEventListener==="function")Q.removeEventListener("change",P);P=null}return{isOnline:U,onOnline:Y,onOffline:V,onChange:F,connection:M,onConnectionChange:X,saveData:z,ping:Z,off:$}}};var AJ={name:"form",version:"1.1.0",type:"fw.dom.utils",dependencies:["dom","events"],deps:[B$,L$],factory(w,j){function N(B,O,T,U,M={}){let z=M.event||"input",Y=!!M.checked,V=Y?()=>w.checked(O,!!T()):()=>w.val(O,T()==null?"":String(T()));return V(),j.on(B,O,z,()=>{U(Y?w.checkedGet(O):w.valGet(O))}),{refresh:V,destroy(){j.off(B)}}}function P(B){if(Object.prototype.hasOwnProperty.call(B,"default"))return typeof B.default==="function"?B.default():B.default;if(B.type==="boolean")return!1;if(B.type==="array")return[];return""}function D(B){if(!B||typeof B.fields!=="object")throw Error("form.create: spec.fields is required");let O=B.fields,T=Object.create(null),U=Object.create(null),M=Object.create(null),z=Object.create(null),Y=Object.create(null),V=new Map,F=new Set,X=!1,Z=Object.create(null);for(let K in O)T[K]=P(O[K]),M[K]=!1,z[K]=!1,Y[K]=!1,Z[K]=0;function $(){let K=q.snapshot();for(let L of F)try{L(K)}catch{}}function J(K){let L=O[K];if(!L)return;let C=T[K],A=null;if(L.required){if(L.type==="array"){if(!Array.isArray(C)||C.length===0)A=L.requiredMessage||"Required"}else if(C===""||C==null)A=L.requiredMessage||"Required"}if(!A&&L.type==="array"&&Array.isArray(C)){let R=[],S=!1;for(let x=0;x<C.length;++x){let I=null;if(typeof L.itemValidate==="function")I=L.itemValidate(C[x],x,T)||null;if(R.push(I),I)S=!0}if(S){U[K]=R;return}delete U[K];return}if(!A&&typeof L.validate==="function"){let R=L.validate(C,T);if(R&&typeof R.then==="function"){let S=++Z[K];Y[K]=!0,$(),R.then((x)=>{if(S!==Z[K])return;if(x)U[K]=x;else delete U[K];Y[K]=!1,$()},(x)=>{if(S!==Z[K])return;U[K]=x&&x.message||"Validation error",Y[K]=!1,$()});return}A=R||null}if(A)U[K]=A;else delete U[K]}function Q(){for(let K in O)J(K);if(typeof B.validate==="function"){let K=B.validate(T)||{};for(let L in K)if(K[L])U[L]=K[L];else delete U[L]}}function H(K,L){if(!(K in O))return;T[K]=L,z[K]=!0,J(K),$()}function G(K){let L=O[K];if(!L||L.type!=="array")throw Error(`form.array: field '${K}' is not declared as type:'array'`);function C(){return[...T[K]||[]]}function A(E){let _=Array.isArray(T[K])?T[K].slice():[];return _.push(E),H(K,_),_.length-1}function R(E){if(!Array.isArray(T[K]))return!1;if(E<0||E>=T[K].length)return!1;let _=T[K].slice();return _.splice(E,1),H(K,_),!0}function S(E,_){if(!Array.isArray(T[K]))return!1;let v=T[K].slice();if(E<0||E>=v.length)return!1;if(_<0||_>=v.length)return!1;let[k]=v.splice(E,1);return v.splice(_,0,k),H(K,v),!0}function x(E,_){if(!Array.isArray(T[K]))return!1;if(E<0||E>=T[K].length)return!1;let v=T[K].slice();return v[E]=_,H(K,v),!0}function I(){H(K,[])}return{get values(){return C()},get length(){return Array.isArray(T[K])?T[K].length:0},push:A,remove:R,move:S,set:x,clear:I,get(E){return T[K]?.[E]}}}function W(){let K=[];for(let L in Y)if(Y[L])K.push(new Promise((C)=>{let A=q.subscribe((R)=>{if(!R.validating[L])A(),C()})}));return K}let q={get values(){return{...T}},get errors(){let K=Object.create(null);for(let L in U){let C=U[L];K[L]=Array.isArray(C)?C.slice():C}return K},get touched(){return{...M}},get dirty(){return{...z}},get validating(){return{...Y}},get submitting(){return X},get isValid(){if(Object.keys(U).length>0)return!1;for(let K in Y)if(Y[K])return!1;return!0},get(K){return T[K]},set(K,L){H(K,L);let C=V.get(K);if(C)C.refresh()},touch(K){if(K in O&&!M[K])M[K]=!0,$()},array(K){return G(K)},attach(K,L,C={}){if(!(K in O))throw Error(`form.attach: unknown field '${K}'`);let R=O[K].type==="boolean",S=C.event||(R?"change":"input"),x=`fw:form:${K}`,I=V.get(K);if(I)I.destroy(),j.off(`${x}:blur`);let E=N(x,L,()=>T[K],(_)=>H(K,_),{event:S,checked:R});V.set(K,E),j.on(`${x}:blur`,L,"blur",()=>q.touch(K))},detach(){for(let[K,L]of V)L.destroy(),j.off(`fw:form:${K}:blur`);V.clear()},validate(){return Q(),$(),q.isValid},async validateAsync(){Q(),$();let K=W();if(K.length)await Promise.all(K);return q.isValid},subscribe(K){if(typeof K!=="function")return()=>{};return F.add(K),()=>F.delete(K)},snapshot(){let K=Object.create(null);for(let L in U){let C=U[L];K[L]=Array.isArray(C)?C.slice():C}return{values:{...T},errors:K,touched:{...M},dirty:{...z},validating:{...Y},isValid:q.isValid,submitting:X}},reset(K){for(let L in O)T[L]=P(O[L]),M[L]=!1,z[L]=!1,Y[L]=!1,Z[L]++,delete U[L];if(K){for(let L in K)if(L in O)T[L]=K[L]}for(let[,L]of V)L.refresh();$()},async submit(){for(let L in O)M[L]=!0;Q(),$();let K=W();if(K.length)await Promise.all(K);if(!q.isValid)return!1;if(typeof B.onSubmit!=="function")return!0;X=!0,$();try{return await B.onSubmit({...T}),!0}finally{X=!1,$()}}};return Q(),q}return{bind:N,create:D}}};var jJ={name:"reactiveBind",version:"1.0.0",type:"fw.dom.rendering",dependencies:["signal"],deps:[g$],factory(w){function j(D){if(typeof D==="function")return D;if(D&&typeof D.get==="function")return()=>D.get();throw Error("reactiveBind: sigOrFn must be a signal or a function")}function N(D,B,O){let T=D.get(B,O);if(!T)throw Error(`reactiveBind: no element found for block="${B}", local="${O}". Ensure the block is rendered before binding.`);return T}function P(D){let B=[];function O(Z){return B.push(Z),Z}function T(Z,$,J){N(D,Z,$);let Q=j(J),H=w.effect(()=>{let G=Q();D.text(Z,$,G)});return O(H)}function U(Z,$,J,Q){N(D,Z,$);let H=j(Q),G=w.effect(()=>{let W=H();D.attr(Z,$,J,W)});return O(G)}function M(Z,$,J,Q){let H=N(D,Z,$),G=j(Q),W=w.effect(()=>{if(!!G())H.classList.add(J);else H.classList.remove(J)});return O(W)}function z(Z,$,J,Q){let H=N(D,Z,$),G=j(Q),W=w.effect(()=>{let q=G();if(q==null||q===!1)H.style.removeProperty(J);else H.style.setProperty(J,String(q))});return O(W)}function Y(Z,$,J){N(D,Z,$);let Q=j(J),H=w.effect(()=>{let G=!!Q();D.attr(Z,$,"hidden",G?null:"")});return O(H)}function V(Z,$,J,Q){let H=N(D,Z,$);if(!J||typeof J.set!=="function")throw Error("reactiveBind.model: sig must be a writable signal (has .set)");let G=Q&&Q.event||"input",W=Q&&typeof Q.parse==="function"?Q.parse:(R)=>R,q=Q&&typeof Q.format==="function"?Q.format:(R)=>R==null?"":String(R),K=!1,L=w.effect(()=>{let R=J.get(),S=q(R);if(H.value!==S){K=!0;try{H.value=S}finally{K=!1}}}),C=()=>{if(K)return;let R=W(H.value);if(!Object.is(R,J.peek()))J.set(R)};return H.addEventListener(G,C),O(()=>{L(),H.removeEventListener(G,C)})}function F(Z,$,J){if(!Z||typeof Z.sync!=="function")throw Error("reactiveBind.list: listController must have a sync() method");if(!$||typeof $.get!=="function")throw Error("reactiveBind.list: sigArray must be a signal");if(!J||typeof J.keyFn!=="function")throw Error("reactiveBind.list: opts.keyFn is required");let Q=w.effect(()=>{let H=$.get();Z.sync(Array.isArray(H)?H:[],J)});return O(Q)}function X(){for(let Z of B)try{Z()}catch{}B.length=0}return{text:T,attr:U,class:M,style:z,show:Y,model:V,list:F,dispose:X}}return{create:P}}};var NJ={name:"component",version:"1.3.0",type:"fw.dom.rendering",dependencies:["reactiveBind","styleSheet"],deps:[jJ,u$],factory(w,j){let N=0,P=new Set,D=typeof document<"u"?document.querySelector('meta[name="csp-nonce"]')?.getAttribute("content")??"":"";function B(M,z,Y){let V={},F=z||{};for(let[X,Z]of Object.entries(M)){let $=Object.prototype.hasOwnProperty.call(F,X)?F[X]:void 0;if($===void 0){if(Z.required)throw Error(`component${Y?`[${Y}]`:""}: required prop '${X}' is missing`);if(Object.prototype.hasOwnProperty.call(Z,"default"))V[X]=typeof Z.default==="function"?Z.default():Z.default;continue}if(Z.type){let J;if(Z.type==="array")J=Array.isArray($);else if(Z.type==="object")J=$!==null&&typeof $==="object"&&!Array.isArray($);else J=typeof $===Z.type;if(!J){let Q=Array.isArray($)?"array":$===null?"null":typeof $;throw Error(`component${Y?`[${Y}]`:""}: prop '${X}' expected ${Z.type}, got ${Q}`)}}if(typeof Z.validator==="function"&&!Z.validator($))throw Error(`component${Y?`[${Y}]`:""}: prop '${X}' failed validator`);V[X]=$}for(let X of Object.keys(F))if(!Object.prototype.hasOwnProperty.call(M,X))V[X]=F[X];return V}function O(M,z){let Y=new Map,V=/@keyframes\s+([\w-]+)/g,F;while((F=V.exec(M))!==null){let J=F[1];if(!Y.has(J))Y.set(J,`${z}-${J}`)}let X=M;if(Y.size>0){X=X.replace(/@keyframes\s+([\w-]+)/g,(H,G)=>{let W=Y.get(G);return W?`@keyframes ${W}`:H}),X=X.replace(/\banimation-name\s*:\s*([\w-]+)/g,(H,G)=>{let W=Y.get(G);return W?`animation-name: ${W}`:H});let J=[...Y.keys()].map((H)=>H.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),Q=new RegExp(`(\\banimation\\s*:[^;{}]+?\\b)(${J})\\b`,"g");X=X.replace(Q,(H,G,W)=>{let q=Y.get(W);return q?`${G}${q}`:H})}X=X.replace(/:global\(([^)]*)\)/g,(J,Q)=>Q);let Z=`.${z}`,$;do $=X,X=X.replace(/&/g,Z);while(X!==$);return X}function T(M,z){if(typeof document>"u")return;if(P.has(z))return;P.add(z);let Y=O(M,z);if(j){j.attach(Y,{attrs:{"data-fw-component":z},nonce:D});return}let V=document.createElement("style");if(V.textContent=Y,V.setAttribute("data-fw-component",z),D)V.setAttribute("nonce",D);document.head.appendChild(V)}function U(M){if(!M||!M.template||!Array.isArray(M.template.template))throw Error("component.define: spec.template (ParseResult) is required");let z=M.template,Y=typeof M.name==="string"?M.name:null,V=typeof M.propsFn==="function"?M.propsFn:null,F=typeof M.mount==="function"?M.mount:null,X=typeof M.update==="function"?M.update:null,Z=typeof M.unmount==="function"?M.unmount:null,$=M.props&&typeof M.props==="object"?M.props:null,J=typeof M.css==="string"?M.css:null,Q=null;if(J)Q=`fw-comp-${++N}`,T(J,Q);let H=0;return function(W={}){let q=W.ui;if(!q||typeof q.add!=="function")throw Error("component.create: opts.ui (UISession) is required");let K=W.id||`comp:${++H}`,L=$?B($,W.props,Y):W.props||{},C=V?V(L):L,A={id:K,block:z,data:C};if(W.parent)A.attach={elm:W.parent,name:W.slot||"default"};if(q.add([A]),Q){let I=q.get(K);if(I&&I.classList)I.classList.add(Q)}let R=null,S={props:C,rawProps:L,prevProps:void 0,prevRawProps:void 0,ui:q,blockId:K,scopeClass:Q,state:{},get bind(){if(R===void 0)return;if(R===null)R=w.create(q);return R},get(I){return arguments.length===0?q.get(K):q.get(K,I)},text(...I){return q.text(K,...I)},attr(...I){return q.attr(K,...I)},on(...I){return q.on(K,...I)},off(I){return q.off(I)},query(I,E){return q.query(K,I,E)},queryAll(I,E){return q.queryAll(K,I,E)}},x=!1;if(q.onUnmount(K,()=>{if(x)return;if(x=!0,R!==null&&R!==void 0)try{R.dispose()}catch{}if(R=void 0,Z)Z(S)}),F)F(S);return{get props(){return S.props},get blockId(){return K},get state(){return S.state},get scopeClass(){return Q},update(I){if(x)return;let E=$?B($,I,Y):I||{},_=V?V(E):E;if(S.prevRawProps=L,S.prevProps=C,L=E,C=_,S.rawProps=L,S.props=C,X)X(S,S.prevProps)},destroy(){if(x)return;q.clear(K)},get(I){return S.get(I)},text(...I){return S.text(...I)},attr(...I){return S.attr(...I)},on(...I){return S.on(...I)}}}}return{define:U}}};var l$={name:"uiSessionList",version:"1.0.0",type:"fw.dom.rendering",dependencies:["template","render","dom"],deps:[S$,T$,B$],factory(w,j,N){function P(U,M){if(Object.is(U,M))return!0;if(U==null||M==null)return!1;if(typeof U!=="object"||typeof M!=="object")return!1;let z=Object.keys(U),Y=Object.keys(M);if(z.length!==Y.length)return!1;for(let V of z){if(!Object.prototype.hasOwnProperty.call(M,V))return!1;if(!Object.is(U[V],M[V]))return!1}return!0}function D(U,M,z){if(Object.is(U,M))return!0;if(z<=0)return!1;if(U==null||M==null)return!1;if(typeof U!=="object"||typeof M!=="object")return!1;let Y=Array.isArray(U),V=Array.isArray(M);if(Y!==V)return!1;if(Y){if(U.length!==M.length)return!1;for(let Z=0;Z<U.length;++Z)if(!D(U[Z],M[Z],z-1))return!1;return!0}let F=Object.keys(U),X=Object.keys(M);if(F.length!==X.length)return!1;for(let Z of F){if(!Object.prototype.hasOwnProperty.call(M,Z))return!1;if(!D(U[Z],M[Z],z-1))return!1}return!0}function B(U){if(typeof U==="function")return U;if(U==="shallow")return P;if(U==="deep")return(M,z)=>D(M,z,8);return Object.is}class O{constructor(U,M,z,Y){if(!Y||typeof Y.keyFn!=="function")throw Error("uiSession.list: options.keyFn is required");if(!Y.block||!Array.isArray(Y.block.template))throw Error("uiSession.list: options.block (ParseResult) is required");if(this._ui=U,this._parent=M,this._slot=z,this._keyFn=Y.keyFn,this._block=Y.block,this._eq=B(Y.eqFn),this._onMount=typeof Y.onMount==="function"?Y.onMount:null,this._onRemove=typeof Y.onRemove==="function"?Y.onRemove:null,this._onEnter=typeof Y.onEnter==="function"?Y.onEnter:null,this._onLeave=typeof Y.onLeave==="function"?Y.onLeave:null,this._onUpdate=Y.onUpdate??"replace",this._onUpdate==="patch"&&Y.block?.iterates&&Object.keys(Y.block.iterates).length>0)this._onUpdate="replace";this._dataFn=typeof Y.dataFn==="function"?Y.dataFn:null,this._metaFn=typeof Y.metaFn==="function"?Y.metaFn:null,this._order=[],this._data=new Map,this._meta=new Map,this._disposed=!1,this._slotEl=null}_dispose(){this._order=[],this._data.clear(),this._meta.clear(),this._slotEl=null,this._disposed=!0}_ensureAlive(){if(this._disposed)throw Error(`uiSession.list: list on (${this._parent}, ${this._slot}) is disposed (its parent block was removed). Create a new list after re-mounting the parent.`)}_itemId(U){return`${this._parent}\x1Flist\x1F${this._slot}\x1F${U}`}_key(U){let M=this._keyFn(U);if(M===void 0||M===null)throw Error("uiSession.list: keyFn returned null/undefined");return String(M)}_slotElement(){if(this._slotEl)return this._slotEl;let U=this._ui._resolveSlotElement(this._parent,this._slot);if(!U)throw Error(`uiSession.list: slot '${this._slot}' not resolved on block '${this._parent}' (parent must be rendered with a \${${this._slot}} slot before creating the list)`);return this._slotEl=U,U}_addItem(U,M,z=!1){this._slotElement();let Y=this._dataFn?this._dataFn(M):M;if(this._ui.add([{id:this._itemId(U),attach:{elm:this._parent,name:this._slot},block:this._block,data:Y,prepend:z}]),this._data.set(U,M),this._metaFn)this._meta.set(U,this._metaFn(M));if(this._onMount)this._onMount(U,M);if(this._onEnter){let V=this._ui.get(this._itemId(U));if(V)try{Promise.resolve(this._onEnter(U,V,M))}catch{}}}_removeItem(U){if(this._onRemove){let M=this._data.get(U);try{this._onRemove(U,M)}catch{}}if(this._onLeave){let M=this._ui.get(this._itemId(U)),z=this._data.get(U);if(M){let Y;try{Y=this._onLeave(U,M,z)}catch{Y=null}if(Y&&typeof Y.then==="function"){this._meta.delete(U),Y.then(()=>this._ui.clear(this._itemId(U)),()=>this._ui.clear(this._itemId(U)));return}}}this._ui.clear(this._itemId(U)),this._meta.delete(U)}_replaceItem(U,M){let z=this._data.get(U);if(this._onUpdate==="none"){if(this._data.set(U,M),this._metaFn)this._meta.set(U,this._metaFn(M));return"unchanged"}if(this._onUpdate==="patch")return this._patchItem(U,z,M),"patched";if(typeof this._onUpdate==="function"){let Y=this._onUpdate(U,z,M,this);if(this._data.set(U,M),this._metaFn)this._meta.set(U,this._metaFn(M));return Y==="patched"||Y==="replaced"||Y==="unchanged"?Y:"unchanged"}return this._removeItem(U),this._addItem(U,M,!1),"replaced"}_patchItem(U,M,z){let Y=this._dataFn?this._dataFn(M):M,V=this._dataFn?this._dataFn(z):z,F=this._itemId(U),X=this._ui._map.get(F);if(!X){this._addItem(U,z,!1);return}for(let Z of this._block.template){if(!Z.map||Z.map.length===0)continue;let $=X.get(Z.id);if(!$)continue;let J=w.get(this._ui._container,$);if(!J)continue;let Q=j.applyParsedElm(Z,V),H=j.applyParsedElm(Z,Y),G=new Set;for(let W of Z.map){let q=(W.data?"a:":"t:")+W.prop;if(G.has(q))continue;if(G.add(q),W.data){let K=Q.data[W.prop],L=H.data[W.prop];if(K===L)continue;if(K===null||K===!1||K===void 0)N.attrRemove(J,W.prop);else N.attr(J,W.prop,K)}else{let K=Q[W.prop],L=H[W.prop];if(K===L)continue;if(W.prop==="text")N.text(J,K);else N.attr(J,W.prop,K)}}}if(this._data.set(U,z),this._metaFn)this._meta.set(U,this._metaFn(z))}_reorderDom(){let U=this._slotElement(),M=this._order.map((z)=>this._ui.get(this._itemId(z))).filter(Boolean);N.reorder(U,M)}get size(){return this._order.length}has(U){return this._data.has(String(U))}get(U){return this._data.get(String(U))}*keys(){yield*this._order}*entries(){for(let U of this._order)yield[U,this._data.get(U)]}*values(){for(let U of this._order)yield this._data.get(U)}[Symbol.iterator](){return this.entries()}element(U){let M=String(U);if(!this._data.has(M))return null;return this._ui.get(this._itemId(M))}itemId(U){return this._itemId(String(U))}meta(U){return this._meta.get(String(U))}attr(U,...M){return this._ui.attr(this._itemId(String(U)),...M)}text(U,...M){return this._ui.text(this._itemId(String(U)),...M)}on(U,...M){return this._ui.on(this._itemId(String(U)),...M)}query(U,M){let z=this._ui.get(this._itemId(String(U)));if(!z)return null;return N.query(z,M)}queryAll(U,M){let z=this._ui.get(this._itemId(String(U)));if(!z)return[];return N.queryAll(z,M)}push(U){this._ensureAlive();let M=this._key(U);if(this._data.has(M))throw Error(`uiSession.list.push: duplicate key '${M}'`);return this._addItem(M,U,!1),this._order.push(M),M}prepend(U){this._ensureAlive();let M=this._key(U);if(this._data.has(M))throw Error(`uiSession.list.prepend: duplicate key '${M}'`);return this._addItem(M,U,!0),this._order.unshift(M),M}insert(U,M){this._ensureAlive();let z=this._key(U);if(this._data.has(z))throw Error(`uiSession.list.insert: duplicate key '${z}'`);this._addItem(z,U,!1);let Y=M==null?-1:this._order.indexOf(String(M));if(Y===-1)this._order.push(z);else this._order.splice(Y,0,z),this._reorderDom();return z}upsert(U){this._ensureAlive();let M=this._key(U);if(this._data.has(M)){let z=this._data.get(M);if(this._eq(z,U))return"unchanged";let Y=this._replaceItem(M,U);if(Y==="replaced")this._reorderDom();return Y==="unchanged"?"unchanged":"updated"}return this._addItem(M,U,!1),this._order.push(M),"added"}update(U,M){this._ensureAlive();let z=String(U);if(!this._data.has(z))throw Error(`uiSession.list.update: key '${z}' not found`);let Y=this._data.get(z);if(this._eq(Y,M))return"unchanged";let V=this._replaceItem(z,M);if(V==="replaced")this._reorderDom();return V==="unchanged"?"unchanged":"updated"}remove(U){this._ensureAlive();let M=String(U);if(!this._data.has(M))return!1;this._removeItem(M),this._data.delete(M);let z=this._order.indexOf(M);if(z!==-1)this._order.splice(z,1);return!0}move(U,M){this._ensureAlive();let z=String(U);if(!this._data.has(z))return!1;let Y=this._order.indexOf(z);if(Y===-1)return!1;this._order.splice(Y,1);let V=M==null?-1:this._order.indexOf(String(M));if(V===-1)this._order.push(z);else this._order.splice(V,0,z);return this._reorderDom(),!0}clear(){this._ensureAlive();for(let U of this._order)this._removeItem(U);this._order=[],this._data.clear()}adopt(U,M={}){if(this._ensureAlive(),!Array.isArray(U))throw Error("uiSession.list.adopt: items must be an array");if(this._order.length>0)throw Error(`uiSession.list.adopt: list on (${this._parent}, ${this._slot}) is not empty (${this._order.length} item(s)). adopt() must run on a freshly-created list, before any push/sync/upsert.`);let z=M.idPrefix||"",Y=this._slotElement(),V=Array.from(Y.children);if(V.length!==U.length)throw Error(`uiSession.list.adopt: row count mismatch - slot '${this._slot}' contains ${V.length} child element(s) but ${U.length} item(s) were passed. SSR and client must agree on the initial set.`);let F=this._block.template,X=F.filter((H)=>H.parent==null);if(X.length!==1)throw Error(`uiSession.list.adopt: row template must have exactly one root (found ${X.length}). Multi-root row templates can't be unambiguously adopted - recreate via push/sync instead.`);let Z=X[0].id,$=this._ui._container,J=(H)=>z?`${z}:${H}`:H,Q=new Set;for(let H=0;H<U.length;++H){let G=U[H],W=V[H],q=this._key(G);if(Q.has(q))throw Error(`uiSession.list.adopt: duplicate key '${q}'`);Q.add(q);let K=this._itemId(q),L=new Map;for(let A of F){let R;if(A.id===Z)R=W;else R=W.querySelector(`[data-fw-id="${CSS.escape(J(A.id))}"]`);if(!R)throw Error(`uiSession.list.adopt: row ${H} (key='${q}'): no DOM node found for data-fw-id="${J(A.id)}" (elm.id='${A.id}'). Check that SSR was rendered with idPrefix='${z}' and the same row template.`);let S=`${K}\x1F${A.id}`,x=A.parent!=null?`${K}\x1F${A.parent}`:void 0;w.adoptNode($,S,R,x),L.set(A.id,S)}this._ui._map.set(K,L);let C=this._ui._children.get(this._parent);if(!C)C=new Set,this._ui._children.set(this._parent,C);if(C.add(K),this._data.set(q,G),this._metaFn)this._meta.set(q,this._metaFn(G));if(this._order.push(q),this._onMount)try{this._onMount(q,G)}catch{}}return this}sync(U){if(this._ensureAlive(),!Array.isArray(U))throw Error("uiSession.list.sync: items must be an array");let M=Array(U.length),z=new Set;for(let Z=0;Z<U.length;++Z){let $=this._key(U[Z]);if(z.has($))throw Error(`uiSession.list.sync: duplicate key '${$}'`);z.add($),M[Z]=$}let Y={added:new Set,kept:new Set,updated:new Set,removed:new Set,reordered:!1};this._order=this._order.filter((Z)=>{if(z.has(Z))return!0;return this._removeItem(Z),this._data.delete(Z),Y.removed.add(Z),!1});let V=!1;for(let Z=0;Z<U.length;++Z){let $=M[Z],J=U[Z];if(!this._data.has($))this._addItem($,J,!1),Y.added.add($);else{let Q=this._data.get($);if(this._eq(Q,J))Y.kept.add($);else{let H=this._replaceItem($,J);if(H==="unchanged")Y.kept.add($);else if(Y.updated.add($),H==="replaced")V=!0}}}let F=[...this._order];for(let Z of M)if(Y.added.has(Z))F.push(Z);let X=V;if(!X){for(let Z=0;Z<M.length;++Z)if(F[Z]!==M[Z]){X=!0;break}}if(this._order=M,X)this._reorderDom(),Y.reordered=!0;return Y}}return{UIList:O,methods:{list(U,M,z){let Y=this._lists.get(U);if(Y&&Y.has(M)){let F=Y.get(M);if(z&&z.block&&z.block!==F._block)throw Error(`uiSession.list: list on (${U}, ${M}) already exists with a different block - pass the same ParseResult, or remove the parent first.`);return F}let V=new O(this,U,M,z);if(!Y)Y=new Map,this._lists.set(U,Y);return Y.set(M,V),V}}}}};var wJ={name:"uiSession",version:"1.0.0",type:"fw.dom.rendering",dependencies:["uiSessionCore","uiSessionDirect","uiSessionList"],deps:[m$,p$,l$],factory(w,j,N){class P{constructor(D){this._container=D,this._attach=new Map,this._map=new Map,this._listeners=new Map,this._lseq=0,this._lists=new Map,this._unmount=new Map,this._mount=new Map,this._children=new Map}}return Object.assign(P.prototype,w.methods,j.methods,N.methods),function(D){return new P(D)}}};var TJ={name:"devtools",version:"1.0.0",type:"fw.dom.rendering",dependencies:["clock"],deps:[y$],factory(w){let j=w;function N(U){if(!U||typeof U!=="object")throw Error("devtools.inspect: session argument is required");let M={container:U._container||null,blocks:[],attaches:[],children:[],listeners:[],mountHooks:[],unmountHooks:[],lists:[],portals:[]};if(U._map)for(let[z,Y]of U._map)if(Array.isArray(Y))M.blocks.push({id:z,logicalIds:Y.map((V)=>[...V.keys()]),isLoop:!0});else M.blocks.push({id:z,logicalIds:[...Y.keys()],isLoop:!1});if(U._attach)for(let[z,Y]of U._attach){let V=Y&&Y.content?[...Y.content.keys()]:[];M.attaches.push({blockId:z,slots:V})}if(U._children)for(let[z,Y]of U._children)M.children.push({parent:z,children:[...Y]});if(U._listeners)for(let[z,Y]of U._listeners)for(let[V,F]of Y)M.listeners.push({blockId:z,logicalId:V,names:[...F]});if(U._mount)for(let[z]of U._mount)M.mountHooks.push(z);if(U._unmount)for(let[z]of U._unmount)M.unmountHooks.push(z);if(U._lists)for(let[z,Y]of U._lists)for(let[V,F]of Y)M.lists.push({parent:z,slot:V,size:F.size,disposed:!!F._disposed});if(U._portals)for(let[z,Y]of U._portals)M.portals.push({name:z,container:Y._container});return M}function P(U){return N(U).blocks.map((z)=>`${z.id}(${z.isLoop?`loop×${z.logicalIds.length}`:z.logicalIds.join(",")})`).join(" ")}function D(U,M={}){let z=Array.isArray(U)?U:U&&U.template||[],Y=M.indent||" ",V=new Map(z.map((J)=>[J.id,J])),F=new Map,X=[];for(let J of z)if(J.parent&&V.has(J.parent)){if(!F.has(J.parent))F.set(J.parent,[]);F.get(J.parent).push(J.id)}else X.push(J.id);let Z=[];function $(J,Q){let H=V.get(J);if(!H)return;let G=Y.repeat(Q),W=[`<${H.tag}#${H.id}>`];if(H.text!=null)W.push(`text=${JSON.stringify(H.text)}`);if(H.content)W.push(`slot=${JSON.stringify(H.content)}`);if(H.attrs&&H.attrs.length)W.push(`attrs=[${H.attrs.join(",")}]`);if(H.map&&H.map.length){let K=H.map.map((L)=>`${L.data?"@":"$"}${L.prop}=#{${L.name}}`+(L.append?"+":L.prepend?"^":"=")).join(",");W.push(`map=[${K}]`)}Z.push(G+W.join(" "));let q=F.get(J)||[];for(let K of q)$(K,Q+1)}for(let J of X)$(J,0);if(U&&U.iterates)for(let J of Object.keys(U.iterates))Z.push(`-- iterate: ${J} --`),Z.push(D({template:U.iterates[J]},M));return Z.join(`
39
+ `)}function B(U){if(typeof U!=="function")throw Error("devtools.profile: fn must be a function");let M=j.monotonic(),z=U(),Y=j.monotonic();return{result:z,durationMs:Y-M}}async function O(U){if(typeof U!=="function")throw Error("devtools.profileAsync: fn must be a function");let M=j.monotonic(),z=await U(),Y=j.monotonic();return{result:z,durationMs:Y-M}}function T(){let U=j,M=U.monotonic(),z=[];return{mark(Y){let V=U.monotonic();if(z.length>0){let F=z[z.length-1];F.durationMs=V-F._startedAt,delete F._startedAt}z.push({name:Y,_startedAt:V})},end(){let Y=U.monotonic();if(z.length>0){let V=z[z.length-1];V.durationMs=Y-V._startedAt,delete V._startedAt}return{total:Y-M,segments:z}}}}return{inspect:N,summarize:P,dumpTemplate:D,profile:B,profileAsync:O,timer:T}}};var SJ={name:"htmlEntities",version:"1.0.0",type:"fw.io.text",dependencies:[],factory(){let j=JSON.parse('{"AElig":"Æ","AMP":"&","Aacute":"Á","Abreve":"Ă","Acirc":"Â","Acy":"А","Afr":"\uD835\uDD04","Agrave":"À","Alpha":"Α","Amacr":"Ā","And":"⩓","Aogon":"Ą","Aopf":"\uD835\uDD38","ApplyFunction":"⁡","Aring":"Å","Ascr":"\uD835\uDC9C","Assign":"≔","Atilde":"Ã","Auml":"Ä","Backslash":"∖","Barv":"⫧","Barwed":"⌆","Bcy":"Б","Because":"∵","Bernoullis":"ℬ","Beta":"Β","Bfr":"\uD835\uDD05","Bopf":"\uD835\uDD39","Breve":"˘","Bscr":"ℬ","Bumpeq":"≎","CHcy":"Ч","COPY":"©","Cacute":"Ć","Cap":"⋒","CapitalDifferentialD":"ⅅ","Cayleys":"ℭ","Ccaron":"Č","Ccedil":"Ç","Ccirc":"Ĉ","Cconint":"∰","Cdot":"Ċ","Cedilla":"¸","CenterDot":"·","Cfr":"ℭ","Chi":"Χ","CircleDot":"⊙","CircleMinus":"⊖","CirclePlus":"⊕","CircleTimes":"⊗","ClockwiseContourIntegral":"∲","CloseCurlyDoubleQuote":"”","CloseCurlyQuote":"’","Colon":"∷","Colone":"⩴","Congruent":"≡","Conint":"∯","ContourIntegral":"∮","Copf":"ℂ","Coproduct":"∐","CounterClockwiseContourIntegral":"∳","Cross":"⨯","Cscr":"\uD835\uDC9E","Cup":"⋓","CupCap":"≍","DD":"ⅅ","DDotrahd":"⤑","DJcy":"Ђ","DScy":"Ѕ","DZcy":"Џ","Dagger":"‡","Darr":"↡","Dashv":"⫤","Dcaron":"Ď","Dcy":"Д","Del":"∇","Delta":"Δ","Dfr":"\uD835\uDD07","DiacriticalAcute":"´","DiacriticalDot":"˙","DiacriticalDoubleAcute":"˝","DiacriticalGrave":"`","DiacriticalTilde":"˜","Diamond":"⋄","DifferentialD":"ⅆ","Dopf":"\uD835\uDD3B","Dot":"¨","DotDot":"⃜","DotEqual":"≐","DoubleContourIntegral":"∯","DoubleDot":"¨","DoubleDownArrow":"⇓","DoubleLeftArrow":"⇐","DoubleLeftRightArrow":"⇔","DoubleLeftTee":"⫤","DoubleLongLeftArrow":"⟸","DoubleLongLeftRightArrow":"⟺","DoubleLongRightArrow":"⟹","DoubleRightArrow":"⇒","DoubleRightTee":"⊨","DoubleUpArrow":"⇑","DoubleUpDownArrow":"⇕","DoubleVerticalBar":"∥","DownArrow":"↓","DownArrowBar":"⤓","DownArrowUpArrow":"⇵","DownBreve":"̑","DownLeftRightVector":"⥐","DownLeftTeeVector":"⥞","DownLeftVector":"↽","DownLeftVectorBar":"⥖","DownRightTeeVector":"⥟","DownRightVector":"⇁","DownRightVectorBar":"⥗","DownTee":"⊤","DownTeeArrow":"↧","Downarrow":"⇓","Dscr":"\uD835\uDC9F","Dstrok":"Đ","ENG":"Ŋ","ETH":"Ð","Eacute":"É","Ecaron":"Ě","Ecirc":"Ê","Ecy":"Э","Edot":"Ė","Efr":"\uD835\uDD08","Egrave":"È","Element":"∈","Emacr":"Ē","EmptySmallSquare":"◻","EmptyVerySmallSquare":"▫","Eogon":"Ę","Eopf":"\uD835\uDD3C","Epsilon":"Ε","Equal":"⩵","EqualTilde":"≂","Equilibrium":"⇌","Escr":"ℰ","Esim":"⩳","Eta":"Η","Euml":"Ë","Exists":"∃","ExponentialE":"ⅇ","Fcy":"Ф","Ffr":"\uD835\uDD09","FilledSmallSquare":"◼","FilledVerySmallSquare":"▪","Fopf":"\uD835\uDD3D","ForAll":"∀","Fouriertrf":"ℱ","Fscr":"ℱ","GJcy":"Ѓ","GT":">","Gamma":"Γ","Gammad":"Ϝ","Gbreve":"Ğ","Gcedil":"Ģ","Gcirc":"Ĝ","Gcy":"Г","Gdot":"Ġ","Gfr":"\uD835\uDD0A","Gg":"⋙","Gopf":"\uD835\uDD3E","GreaterEqual":"≥","GreaterEqualLess":"⋛","GreaterFullEqual":"≧","GreaterGreater":"⪢","GreaterLess":"≷","GreaterSlantEqual":"⩾","GreaterTilde":"≳","Gscr":"\uD835\uDCA2","Gt":"≫","HARDcy":"Ъ","Hacek":"ˇ","Hat":"^","Hcirc":"Ĥ","Hfr":"ℌ","HilbertSpace":"ℋ","Hopf":"ℍ","HorizontalLine":"─","Hscr":"ℋ","Hstrok":"Ħ","HumpDownHump":"≎","HumpEqual":"≏","IEcy":"Е","IJlig":"IJ","IOcy":"Ё","Iacute":"Í","Icirc":"Î","Icy":"И","Idot":"İ","Ifr":"ℑ","Igrave":"Ì","Im":"ℑ","Imacr":"Ī","ImaginaryI":"ⅈ","Implies":"⇒","Int":"∬","Integral":"∫","Intersection":"⋂","InvisibleComma":"⁣","InvisibleTimes":"⁢","Iogon":"Į","Iopf":"\uD835\uDD40","Iota":"Ι","Iscr":"ℐ","Itilde":"Ĩ","Iukcy":"І","Iuml":"Ï","Jcirc":"Ĵ","Jcy":"Й","Jfr":"\uD835\uDD0D","Jopf":"\uD835\uDD41","Jscr":"\uD835\uDCA5","Jsercy":"Ј","Jukcy":"Є","KHcy":"Х","KJcy":"Ќ","Kappa":"Κ","Kcedil":"Ķ","Kcy":"К","Kfr":"\uD835\uDD0E","Kopf":"\uD835\uDD42","Kscr":"\uD835\uDCA6","LJcy":"Љ","LT":"<","Lacute":"Ĺ","Lambda":"Λ","Lang":"⟪","Laplacetrf":"ℒ","Larr":"↞","Lcaron":"Ľ","Lcedil":"Ļ","Lcy":"Л","LeftAngleBracket":"⟨","LeftArrow":"←","LeftArrowBar":"⇤","LeftArrowRightArrow":"⇆","LeftCeiling":"⌈","LeftDoubleBracket":"⟦","LeftDownTeeVector":"⥡","LeftDownVector":"⇃","LeftDownVectorBar":"⥙","LeftFloor":"⌊","LeftRightArrow":"↔","LeftRightVector":"⥎","LeftTee":"⊣","LeftTeeArrow":"↤","LeftTeeVector":"⥚","LeftTriangle":"⊲","LeftTriangleBar":"⧏","LeftTriangleEqual":"⊴","LeftUpDownVector":"⥑","LeftUpTeeVector":"⥠","LeftUpVector":"↿","LeftUpVectorBar":"⥘","LeftVector":"↼","LeftVectorBar":"⥒","Leftarrow":"⇐","Leftrightarrow":"⇔","LessEqualGreater":"⋚","LessFullEqual":"≦","LessGreater":"≶","LessLess":"⪡","LessSlantEqual":"⩽","LessTilde":"≲","Lfr":"\uD835\uDD0F","Ll":"⋘","Lleftarrow":"⇚","Lmidot":"Ŀ","LongLeftArrow":"⟵","LongLeftRightArrow":"⟷","LongRightArrow":"⟶","Longleftarrow":"⟸","Longleftrightarrow":"⟺","Longrightarrow":"⟹","Lopf":"\uD835\uDD43","LowerLeftArrow":"↙","LowerRightArrow":"↘","Lscr":"ℒ","Lsh":"↰","Lstrok":"Ł","Lt":"≪","Map":"⤅","Mcy":"М","MediumSpace":" ","Mellintrf":"ℳ","Mfr":"\uD835\uDD10","MinusPlus":"∓","Mopf":"\uD835\uDD44","Mscr":"ℳ","Mu":"Μ","NJcy":"Њ","Nacute":"Ń","Ncaron":"Ň","Ncedil":"Ņ","Ncy":"Н","NegativeMediumSpace":"​","NegativeThickSpace":"​","NegativeThinSpace":"​","NegativeVeryThinSpace":"​","NestedGreaterGreater":"≫","NestedLessLess":"≪","NewLine":"\\n","Nfr":"\uD835\uDD11","NoBreak":"⁠","NonBreakingSpace":" ","Nopf":"ℕ","Not":"⫬","NotCongruent":"≢","NotCupCap":"≭","NotDoubleVerticalBar":"∦","NotElement":"∉","NotEqual":"≠","NotEqualTilde":"≂̸","NotExists":"∄","NotGreater":"≯","NotGreaterEqual":"≱","NotGreaterFullEqual":"≧̸","NotGreaterGreater":"≫̸","NotGreaterLess":"≹","NotGreaterSlantEqual":"⩾̸","NotGreaterTilde":"≵","NotHumpDownHump":"≎̸","NotHumpEqual":"≏̸","NotLeftTriangle":"⋪","NotLeftTriangleBar":"⧏̸","NotLeftTriangleEqual":"⋬","NotLess":"≮","NotLessEqual":"≰","NotLessGreater":"≸","NotLessLess":"≪̸","NotLessSlantEqual":"⩽̸","NotLessTilde":"≴","NotNestedGreaterGreater":"⪢̸","NotNestedLessLess":"⪡̸","NotPrecedes":"⊀","NotPrecedesEqual":"⪯̸","NotPrecedesSlantEqual":"⋠","NotReverseElement":"∌","NotRightTriangle":"⋫","NotRightTriangleBar":"⧐̸","NotRightTriangleEqual":"⋭","NotSquareSubset":"⊏̸","NotSquareSubsetEqual":"⋢","NotSquareSuperset":"⊐̸","NotSquareSupersetEqual":"⋣","NotSubset":"⊂⃒","NotSubsetEqual":"⊈","NotSucceeds":"⊁","NotSucceedsEqual":"⪰̸","NotSucceedsSlantEqual":"⋡","NotSucceedsTilde":"≿̸","NotSuperset":"⊃⃒","NotSupersetEqual":"⊉","NotTilde":"≁","NotTildeEqual":"≄","NotTildeFullEqual":"≇","NotTildeTilde":"≉","NotVerticalBar":"∤","Nscr":"\uD835\uDCA9","Ntilde":"Ñ","Nu":"Ν","OElig":"Œ","Oacute":"Ó","Ocirc":"Ô","Ocy":"О","Odblac":"Ő","Ofr":"\uD835\uDD12","Ograve":"Ò","Omacr":"Ō","Omega":"Ω","Omicron":"Ο","Oopf":"\uD835\uDD46","OpenCurlyDoubleQuote":"“","OpenCurlyQuote":"‘","Or":"⩔","Oscr":"\uD835\uDCAA","Oslash":"Ø","Otilde":"Õ","Otimes":"⨷","Ouml":"Ö","OverBar":"‾","OverBrace":"⏞","OverBracket":"⎴","OverParenthesis":"⏜","PartialD":"∂","Pcy":"П","Pfr":"\uD835\uDD13","Phi":"Φ","Pi":"Π","PlusMinus":"±","Poincareplane":"ℌ","Popf":"ℙ","Pr":"⪻","Precedes":"≺","PrecedesEqual":"⪯","PrecedesSlantEqual":"≼","PrecedesTilde":"≾","Prime":"″","Product":"∏","Proportion":"∷","Proportional":"∝","Pscr":"\uD835\uDCAB","Psi":"Ψ","QUOT":"\\"","Qfr":"\uD835\uDD14","Qopf":"ℚ","Qscr":"\uD835\uDCAC","RBarr":"⤐","REG":"®","Racute":"Ŕ","Rang":"⟫","Rarr":"↠","Rarrtl":"⤖","Rcaron":"Ř","Rcedil":"Ŗ","Rcy":"Р","Re":"ℜ","ReverseElement":"∋","ReverseEquilibrium":"⇋","ReverseUpEquilibrium":"⥯","Rfr":"ℜ","Rho":"Ρ","RightAngleBracket":"⟩","RightArrow":"→","RightArrowBar":"⇥","RightArrowLeftArrow":"⇄","RightCeiling":"⌉","RightDoubleBracket":"⟧","RightDownTeeVector":"⥝","RightDownVector":"⇂","RightDownVectorBar":"⥕","RightFloor":"⌋","RightTee":"⊢","RightTeeArrow":"↦","RightTeeVector":"⥛","RightTriangle":"⊳","RightTriangleBar":"⧐","RightTriangleEqual":"⊵","RightUpDownVector":"⥏","RightUpTeeVector":"⥜","RightUpVector":"↾","RightUpVectorBar":"⥔","RightVector":"⇀","RightVectorBar":"⥓","Rightarrow":"⇒","Ropf":"ℝ","RoundImplies":"⥰","Rrightarrow":"⇛","Rscr":"ℛ","Rsh":"↱","RuleDelayed":"⧴","SHCHcy":"Щ","SHcy":"Ш","SOFTcy":"Ь","Sacute":"Ś","Sc":"⪼","Scaron":"Š","Scedil":"Ş","Scirc":"Ŝ","Scy":"С","Sfr":"\uD835\uDD16","ShortDownArrow":"↓","ShortLeftArrow":"←","ShortRightArrow":"→","ShortUpArrow":"↑","Sigma":"Σ","SmallCircle":"∘","Sopf":"\uD835\uDD4A","Sqrt":"√","Square":"□","SquareIntersection":"⊓","SquareSubset":"⊏","SquareSubsetEqual":"⊑","SquareSuperset":"⊐","SquareSupersetEqual":"⊒","SquareUnion":"⊔","Sscr":"\uD835\uDCAE","Star":"⋆","Sub":"⋐","Subset":"⋐","SubsetEqual":"⊆","Succeeds":"≻","SucceedsEqual":"⪰","SucceedsSlantEqual":"≽","SucceedsTilde":"≿","SuchThat":"∋","Sum":"∑","Sup":"⋑","Superset":"⊃","SupersetEqual":"⊇","Supset":"⋑","THORN":"Þ","TRADE":"™","TSHcy":"Ћ","TScy":"Ц","Tab":"\\t","Tau":"Τ","Tcaron":"Ť","Tcedil":"Ţ","Tcy":"Т","Tfr":"\uD835\uDD17","Therefore":"∴","Theta":"Θ","ThickSpace":"  ","ThinSpace":" ","Tilde":"∼","TildeEqual":"≃","TildeFullEqual":"≅","TildeTilde":"≈","Topf":"\uD835\uDD4B","TripleDot":"⃛","Tscr":"\uD835\uDCAF","Tstrok":"Ŧ","Uacute":"Ú","Uarr":"↟","Uarrocir":"⥉","Ubrcy":"Ў","Ubreve":"Ŭ","Ucirc":"Û","Ucy":"У","Udblac":"Ű","Ufr":"\uD835\uDD18","Ugrave":"Ù","Umacr":"Ū","UnderBar":"_","UnderBrace":"⏟","UnderBracket":"⎵","UnderParenthesis":"⏝","Union":"⋃","UnionPlus":"⊎","Uogon":"Ų","Uopf":"\uD835\uDD4C","UpArrow":"↑","UpArrowBar":"⤒","UpArrowDownArrow":"⇅","UpDownArrow":"↕","UpEquilibrium":"⥮","UpTee":"⊥","UpTeeArrow":"↥","Uparrow":"⇑","Updownarrow":"⇕","UpperLeftArrow":"↖","UpperRightArrow":"↗","Upsi":"ϒ","Upsilon":"Υ","Uring":"Ů","Uscr":"\uD835\uDCB0","Utilde":"Ũ","Uuml":"Ü","VDash":"⊫","Vbar":"⫫","Vcy":"В","Vdash":"⊩","Vdashl":"⫦","Vee":"⋁","Verbar":"‖","Vert":"‖","VerticalBar":"∣","VerticalLine":"|","VerticalSeparator":"❘","VerticalTilde":"≀","VeryThinSpace":" ","Vfr":"\uD835\uDD19","Vopf":"\uD835\uDD4D","Vscr":"\uD835\uDCB1","Vvdash":"⊪","Wcirc":"Ŵ","Wedge":"⋀","Wfr":"\uD835\uDD1A","Wopf":"\uD835\uDD4E","Wscr":"\uD835\uDCB2","Xfr":"\uD835\uDD1B","Xi":"Ξ","Xopf":"\uD835\uDD4F","Xscr":"\uD835\uDCB3","YAcy":"Я","YIcy":"Ї","YUcy":"Ю","Yacute":"Ý","Ycirc":"Ŷ","Ycy":"Ы","Yfr":"\uD835\uDD1C","Yopf":"\uD835\uDD50","Yscr":"\uD835\uDCB4","Yuml":"Ÿ","ZHcy":"Ж","Zacute":"Ź","Zcaron":"Ž","Zcy":"З","Zdot":"Ż","ZeroWidthSpace":"​","Zeta":"Ζ","Zfr":"ℨ","Zopf":"ℤ","Zscr":"\uD835\uDCB5","aacute":"á","abreve":"ă","ac":"∾","acE":"∾̳","acd":"∿","acirc":"â","acute":"´","acy":"а","aelig":"æ","af":"⁡","afr":"\uD835\uDD1E","agrave":"à","alefsym":"ℵ","aleph":"ℵ","alpha":"α","amacr":"ā","amalg":"⨿","amp":"&","and":"∧","andand":"⩕","andd":"⩜","andslope":"⩘","andv":"⩚","ang":"∠","ange":"⦤","angle":"∠","angmsd":"∡","angmsdaa":"⦨","angmsdab":"⦩","angmsdac":"⦪","angmsdad":"⦫","angmsdae":"⦬","angmsdaf":"⦭","angmsdag":"⦮","angmsdah":"⦯","angrt":"∟","angrtvb":"⊾","angrtvbd":"⦝","angsph":"∢","angst":"Å","angzarr":"⍼","aogon":"ą","aopf":"\uD835\uDD52","ap":"≈","apE":"⩰","apacir":"⩯","ape":"≊","apid":"≋","apos":"\'","approx":"≈","approxeq":"≊","aring":"å","ascr":"\uD835\uDCB6","ast":"*","asymp":"≈","asympeq":"≍","atilde":"ã","auml":"ä","awconint":"∳","awint":"⨑","bNot":"⫭","backcong":"≌","backepsilon":"϶","backprime":"‵","backsim":"∽","backsimeq":"⋍","barvee":"⊽","barwed":"⌅","barwedge":"⌅","bbrk":"⎵","bbrktbrk":"⎶","bcong":"≌","bcy":"б","bdquo":"„","becaus":"∵","because":"∵","bemptyv":"⦰","bepsi":"϶","bernou":"ℬ","beta":"β","beth":"ℶ","between":"≬","bfr":"\uD835\uDD1F","bigcap":"⋂","bigcirc":"◯","bigcup":"⋃","bigodot":"⨀","bigoplus":"⨁","bigotimes":"⨂","bigsqcup":"⨆","bigstar":"★","bigtriangledown":"▽","bigtriangleup":"△","biguplus":"⨄","bigvee":"⋁","bigwedge":"⋀","bkarow":"⤍","blacklozenge":"⧫","blacksquare":"▪","blacktriangle":"▴","blacktriangledown":"▾","blacktriangleleft":"◂","blacktriangleright":"▸","blank":"␣","blk12":"▒","blk14":"░","blk34":"▓","block":"█","bne":"=⃥","bnequiv":"≡⃥","bnot":"⌐","bopf":"\uD835\uDD53","bot":"⊥","bottom":"⊥","bowtie":"⋈","boxDL":"╗","boxDR":"╔","boxDl":"╖","boxDr":"╓","boxH":"═","boxHD":"╦","boxHU":"╩","boxHd":"╤","boxHu":"╧","boxUL":"╝","boxUR":"╚","boxUl":"╜","boxUr":"╙","boxV":"║","boxVH":"╬","boxVL":"╣","boxVR":"╠","boxVh":"╫","boxVl":"╢","boxVr":"╟","boxbox":"⧉","boxdL":"╕","boxdR":"╒","boxdl":"┐","boxdr":"┌","boxh":"─","boxhD":"╥","boxhU":"╨","boxhd":"┬","boxhu":"┴","boxminus":"⊟","boxplus":"⊞","boxtimes":"⊠","boxuL":"╛","boxuR":"╘","boxul":"┘","boxur":"└","boxv":"│","boxvH":"╪","boxvL":"╡","boxvR":"╞","boxvh":"┼","boxvl":"┤","boxvr":"├","bprime":"‵","breve":"˘","brvbar":"¦","bscr":"\uD835\uDCB7","bsemi":"⁏","bsim":"∽","bsime":"⋍","bsol":"\\\\","bsolb":"⧅","bsolhsub":"⟈","bull":"•","bullet":"•","bump":"≎","bumpE":"⪮","bumpe":"≏","bumpeq":"≏","cacute":"ć","cap":"∩","capand":"⩄","capbrcup":"⩉","capcap":"⩋","capcup":"⩇","capdot":"⩀","caps":"∩︀","caret":"⁁","caron":"ˇ","ccaps":"⩍","ccaron":"č","ccedil":"ç","ccirc":"ĉ","ccups":"⩌","ccupssm":"⩐","cdot":"ċ","cedil":"¸","cemptyv":"⦲","cent":"¢","centerdot":"·","cfr":"\uD835\uDD20","chcy":"ч","check":"✓","checkmark":"✓","chi":"χ","cir":"○","cirE":"⧃","circ":"ˆ","circeq":"≗","circlearrowleft":"↺","circlearrowright":"↻","circledR":"®","circledS":"Ⓢ","circledast":"⊛","circledcirc":"⊚","circleddash":"⊝","cire":"≗","cirfnint":"⨐","cirmid":"⫯","cirscir":"⧂","clubs":"♣","clubsuit":"♣","colon":":","colone":"≔","coloneq":"≔","comma":",","commat":"@","comp":"∁","compfn":"∘","complement":"∁","complexes":"ℂ","cong":"≅","congdot":"⩭","conint":"∮","copf":"\uD835\uDD54","coprod":"∐","copy":"©","copysr":"℗","crarr":"↵","cross":"✗","cscr":"\uD835\uDCB8","csub":"⫏","csube":"⫑","csup":"⫐","csupe":"⫒","ctdot":"⋯","cudarrl":"⤸","cudarrr":"⤵","cuepr":"⋞","cuesc":"⋟","cularr":"↶","cularrp":"⤽","cup":"∪","cupbrcap":"⩈","cupcap":"⩆","cupcup":"⩊","cupdot":"⊍","cupor":"⩅","cups":"∪︀","curarr":"↷","curarrm":"⤼","curlyeqprec":"⋞","curlyeqsucc":"⋟","curlyvee":"⋎","curlywedge":"⋏","curren":"¤","curvearrowleft":"↶","curvearrowright":"↷","cuvee":"⋎","cuwed":"⋏","cwconint":"∲","cwint":"∱","cylcty":"⌭","dArr":"⇓","dHar":"⥥","dagger":"†","daleth":"ℸ","darr":"↓","dash":"‐","dashv":"⊣","dbkarow":"⤏","dblac":"˝","dcaron":"ď","dcy":"д","dd":"ⅆ","ddagger":"‡","ddarr":"⇊","ddotseq":"⩷","deg":"°","delta":"δ","demptyv":"⦱","dfisht":"⥿","dfr":"\uD835\uDD21","dharl":"⇃","dharr":"⇂","diam":"⋄","diamond":"⋄","diamondsuit":"♦","diams":"♦","die":"¨","digamma":"ϝ","disin":"⋲","div":"÷","divide":"÷","divideontimes":"⋇","divonx":"⋇","djcy":"ђ","dlcorn":"⌞","dlcrop":"⌍","dollar":"$","dopf":"\uD835\uDD55","dot":"˙","doteq":"≐","doteqdot":"≑","dotminus":"∸","dotplus":"∔","dotsquare":"⊡","doublebarwedge":"⌆","downarrow":"↓","downdownarrows":"⇊","downharpoonleft":"⇃","downharpoonright":"⇂","drbkarow":"⤐","drcorn":"⌟","drcrop":"⌌","dscr":"\uD835\uDCB9","dscy":"ѕ","dsol":"⧶","dstrok":"đ","dtdot":"⋱","dtri":"▿","dtrif":"▾","duarr":"⇵","duhar":"⥯","dwangle":"⦦","dzcy":"џ","dzigrarr":"⟿","eDDot":"⩷","eDot":"≑","eacute":"é","easter":"⩮","ecaron":"ě","ecir":"≖","ecirc":"ê","ecolon":"≕","ecy":"э","edot":"ė","ee":"ⅇ","efDot":"≒","efr":"\uD835\uDD22","eg":"⪚","egrave":"è","egs":"⪖","egsdot":"⪘","el":"⪙","elinters":"⏧","ell":"ℓ","els":"⪕","elsdot":"⪗","emacr":"ē","empty":"∅","emptyset":"∅","emptyv":"∅","emsp13":" ","emsp14":" ","emsp":" ","eng":"ŋ","ensp":" ","eogon":"ę","eopf":"\uD835\uDD56","epar":"⋕","eparsl":"⧣","eplus":"⩱","epsi":"ε","epsilon":"ε","epsiv":"ϵ","eqcirc":"≖","eqcolon":"≕","eqsim":"≂","eqslantgtr":"⪖","eqslantless":"⪕","equals":"=","equest":"≟","equiv":"≡","equivDD":"⩸","eqvparsl":"⧥","erDot":"≓","erarr":"⥱","escr":"ℯ","esdot":"≐","esim":"≂","eta":"η","eth":"ð","euml":"ë","euro":"€","excl":"!","exist":"∃","expectation":"ℰ","exponentiale":"ⅇ","fallingdotseq":"≒","fcy":"ф","female":"♀","ffilig":"ffi","fflig":"ff","ffllig":"ffl","ffr":"\uD835\uDD23","filig":"fi","fjlig":"fj","flat":"♭","fllig":"fl","fltns":"▱","fnof":"ƒ","fopf":"\uD835\uDD57","forall":"∀","fork":"⋔","forkv":"⫙","fpartint":"⨍","frac12":"½","frac13":"⅓","frac14":"¼","frac15":"⅕","frac16":"⅙","frac18":"⅛","frac23":"⅔","frac25":"⅖","frac34":"¾","frac35":"⅗","frac38":"⅜","frac45":"⅘","frac56":"⅚","frac58":"⅝","frac78":"⅞","frasl":"⁄","frown":"⌢","fscr":"\uD835\uDCBB","gE":"≧","gEl":"⪌","gacute":"ǵ","gamma":"γ","gammad":"ϝ","gap":"⪆","gbreve":"ğ","gcirc":"ĝ","gcy":"г","gdot":"ġ","ge":"≥","gel":"⋛","geq":"≥","geqq":"≧","geqslant":"⩾","ges":"⩾","gescc":"⪩","gesdot":"⪀","gesdoto":"⪂","gesdotol":"⪄","gesl":"⋛︀","gesles":"⪔","gfr":"\uD835\uDD24","gg":"≫","ggg":"⋙","gimel":"ℷ","gjcy":"ѓ","gl":"≷","glE":"⪒","gla":"⪥","glj":"⪤","gnE":"≩","gnap":"⪊","gnapprox":"⪊","gne":"⪈","gneq":"⪈","gneqq":"≩","gnsim":"⋧","gopf":"\uD835\uDD58","grave":"`","gscr":"ℊ","gsim":"≳","gsime":"⪎","gsiml":"⪐","gt":">","gtcc":"⪧","gtcir":"⩺","gtdot":"⋗","gtlPar":"⦕","gtquest":"⩼","gtrapprox":"⪆","gtrarr":"⥸","gtrdot":"⋗","gtreqless":"⋛","gtreqqless":"⪌","gtrless":"≷","gtrsim":"≳","gvertneqq":"≩︀","gvnE":"≩︀","hArr":"⇔","hairsp":" ","half":"½","hamilt":"ℋ","hardcy":"ъ","harr":"↔","harrcir":"⥈","harrw":"↭","hbar":"ℏ","hcirc":"ĥ","hearts":"♥","heartsuit":"♥","hellip":"…","hercon":"⊹","hfr":"\uD835\uDD25","hksearow":"⤥","hkswarow":"⤦","hoarr":"⇿","homtht":"∻","hookleftarrow":"↩","hookrightarrow":"↪","hopf":"\uD835\uDD59","horbar":"―","hscr":"\uD835\uDCBD","hslash":"ℏ","hstrok":"ħ","hybull":"⁃","hyphen":"‐","iacute":"í","ic":"⁣","icirc":"î","icy":"и","iecy":"е","iexcl":"¡","iff":"⇔","ifr":"\uD835\uDD26","igrave":"ì","ii":"ⅈ","iiiint":"⨌","iiint":"∭","iinfin":"⧜","iiota":"℩","ijlig":"ij","imacr":"ī","image":"ℑ","imagline":"ℐ","imagpart":"ℑ","imath":"ı","imof":"⊷","imped":"Ƶ","in":"∈","incare":"℅","infin":"∞","infintie":"⧝","inodot":"ı","int":"∫","intcal":"⊺","integers":"ℤ","intercal":"⊺","intlarhk":"⨗","intprod":"⨼","iocy":"ё","iogon":"į","iopf":"\uD835\uDD5A","iota":"ι","iprod":"⨼","iquest":"¿","iscr":"\uD835\uDCBE","isin":"∈","isinE":"⋹","isindot":"⋵","isins":"⋴","isinsv":"⋳","isinv":"∈","it":"⁢","itilde":"ĩ","iukcy":"і","iuml":"ï","jcirc":"ĵ","jcy":"й","jfr":"\uD835\uDD27","jmath":"ȷ","jopf":"\uD835\uDD5B","jscr":"\uD835\uDCBF","jsercy":"ј","jukcy":"є","kappa":"κ","kappav":"ϰ","kcedil":"ķ","kcy":"к","kfr":"\uD835\uDD28","kgreen":"ĸ","khcy":"х","kjcy":"ќ","kopf":"\uD835\uDD5C","kscr":"\uD835\uDCC0","lAarr":"⇚","lArr":"⇐","lAtail":"⤛","lBarr":"⤎","lE":"≦","lEg":"⪋","lHar":"⥢","lacute":"ĺ","laemptyv":"⦴","lagran":"ℒ","lambda":"λ","lang":"⟨","langd":"⦑","langle":"⟨","lap":"⪅","laquo":"«","larr":"←","larrb":"⇤","larrbfs":"⤟","larrfs":"⤝","larrhk":"↩","larrlp":"↫","larrpl":"⤹","larrsim":"⥳","larrtl":"↢","lat":"⪫","latail":"⤙","late":"⪭","lates":"⪭︀","lbarr":"⤌","lbbrk":"❲","lbrace":"{","lbrack":"[","lbrke":"⦋","lbrksld":"⦏","lbrkslu":"⦍","lcaron":"ľ","lcedil":"ļ","lceil":"⌈","lcub":"{","lcy":"л","ldca":"⤶","ldquo":"“","ldquor":"„","ldrdhar":"⥧","ldrushar":"⥋","ldsh":"↲","le":"≤","leftarrow":"←","leftarrowtail":"↢","leftharpoondown":"↽","leftharpoonup":"↼","leftleftarrows":"⇇","leftrightarrow":"↔","leftrightarrows":"⇆","leftrightharpoons":"⇋","leftrightsquigarrow":"↭","leftthreetimes":"⋋","leg":"⋚","leq":"≤","leqq":"≦","leqslant":"⩽","les":"⩽","lescc":"⪨","lesdot":"⩿","lesdoto":"⪁","lesdotor":"⪃","lesg":"⋚︀","lesges":"⪓","lessapprox":"⪅","lessdot":"⋖","lesseqgtr":"⋚","lesseqqgtr":"⪋","lessgtr":"≶","lesssim":"≲","lfisht":"⥼","lfloor":"⌊","lfr":"\uD835\uDD29","lg":"≶","lgE":"⪑","lhard":"↽","lharu":"↼","lharul":"⥪","lhblk":"▄","ljcy":"љ","ll":"≪","llarr":"⇇","llcorner":"⌞","llhard":"⥫","lltri":"◺","lmidot":"ŀ","lmoust":"⎰","lmoustache":"⎰","lnE":"≨","lnap":"⪉","lnapprox":"⪉","lne":"⪇","lneq":"⪇","lneqq":"≨","lnsim":"⋦","loang":"⟬","loarr":"⇽","lobrk":"⟦","longleftarrow":"⟵","longleftrightarrow":"⟷","longmapsto":"⟼","longrightarrow":"⟶","looparrowleft":"↫","looparrowright":"↬","lopar":"⦅","lopf":"\uD835\uDD5D","loplus":"⨭","lotimes":"⨴","lowast":"∗","lowbar":"_","loz":"◊","lozenge":"◊","lozf":"⧫","lpar":"(","lparlt":"⦓","lrarr":"⇆","lrcorner":"⌟","lrhar":"⇋","lrhard":"⥭","lrm":"‎","lrtri":"⊿","lsaquo":"‹","lscr":"\uD835\uDCC1","lsh":"↰","lsim":"≲","lsime":"⪍","lsimg":"⪏","lsqb":"[","lsquo":"‘","lsquor":"‚","lstrok":"ł","lt":"<","ltcc":"⪦","ltcir":"⩹","ltdot":"⋖","lthree":"⋋","ltimes":"⋉","ltlarr":"⥶","ltquest":"⩻","ltrPar":"⦖","ltri":"◃","ltrie":"⊴","ltrif":"◂","lurdshar":"⥊","luruhar":"⥦","lvertneqq":"≨︀","lvnE":"≨︀","mDDot":"∺","macr":"¯","male":"♂","malt":"✠","maltese":"✠","map":"↦","mapsto":"↦","mapstodown":"↧","mapstoleft":"↤","mapstoup":"↥","marker":"▮","mcomma":"⨩","mcy":"м","mdash":"-","measuredangle":"∡","mfr":"\uD835\uDD2A","mho":"℧","micro":"µ","mid":"∣","midast":"*","midcir":"⫰","middot":"·","minus":"−","minusb":"⊟","minusd":"∸","minusdu":"⨪","mlcp":"⫛","mldr":"…","mnplus":"∓","models":"⊧","mopf":"\uD835\uDD5E","mp":"∓","mscr":"\uD835\uDCC2","mstpos":"∾","mu":"μ","multimap":"⊸","mumap":"⊸","nGg":"⋙̸","nGt":"≫⃒","nGtv":"≫̸","nLeftarrow":"⇍","nLeftrightarrow":"⇎","nLl":"⋘̸","nLt":"≪⃒","nLtv":"≪̸","nRightarrow":"⇏","nVDash":"⊯","nVdash":"⊮","nabla":"∇","nacute":"ń","nang":"∠⃒","nap":"≉","napE":"⩰̸","napid":"≋̸","napos":"ʼn","napprox":"≉","natur":"♮","natural":"♮","naturals":"ℕ","nbsp":" ","nbump":"≎̸","nbumpe":"≏̸","ncap":"⩃","ncaron":"ň","ncedil":"ņ","ncong":"≇","ncongdot":"⩭̸","ncup":"⩂","ncy":"н","ndash":"–","ne":"≠","neArr":"⇗","nearhk":"⤤","nearr":"↗","nearrow":"↗","nedot":"≐̸","nequiv":"≢","nesear":"⤨","nesim":"≂̸","nexist":"∄","nexists":"∄","nfr":"\uD835\uDD2B","ngE":"≧̸","nge":"≱","ngeq":"≱","ngeqq":"≧̸","ngeqslant":"⩾̸","nges":"⩾̸","ngsim":"≵","ngt":"≯","ngtr":"≯","nhArr":"⇎","nharr":"↮","nhpar":"⫲","ni":"∋","nis":"⋼","nisd":"⋺","niv":"∋","njcy":"њ","nlArr":"⇍","nlE":"≦̸","nlarr":"↚","nldr":"‥","nle":"≰","nleftarrow":"↚","nleftrightarrow":"↮","nleq":"≰","nleqq":"≦̸","nleqslant":"⩽̸","nles":"⩽̸","nless":"≮","nlsim":"≴","nlt":"≮","nltri":"⋪","nltrie":"⋬","nmid":"∤","nopf":"\uD835\uDD5F","not":"¬","notin":"∉","notinE":"⋹̸","notindot":"⋵̸","notinva":"∉","notinvb":"⋷","notinvc":"⋶","notni":"∌","notniva":"∌","notnivb":"⋾","notnivc":"⋽","npar":"∦","nparallel":"∦","nparsl":"⫽⃥","npart":"∂̸","npolint":"⨔","npr":"⊀","nprcue":"⋠","npre":"⪯̸","nprec":"⊀","npreceq":"⪯̸","nrArr":"⇏","nrarr":"↛","nrarrc":"⤳̸","nrarrw":"↝̸","nrightarrow":"↛","nrtri":"⋫","nrtrie":"⋭","nsc":"⊁","nsccue":"⋡","nsce":"⪰̸","nscr":"\uD835\uDCC3","nshortmid":"∤","nshortparallel":"∦","nsim":"≁","nsime":"≄","nsimeq":"≄","nsmid":"∤","nspar":"∦","nsqsube":"⋢","nsqsupe":"⋣","nsub":"⊄","nsubE":"⫅̸","nsube":"⊈","nsubset":"⊂⃒","nsubseteq":"⊈","nsubseteqq":"⫅̸","nsucc":"⊁","nsucceq":"⪰̸","nsup":"⊅","nsupE":"⫆̸","nsupe":"⊉","nsupset":"⊃⃒","nsupseteq":"⊉","nsupseteqq":"⫆̸","ntgl":"≹","ntilde":"ñ","ntlg":"≸","ntriangleleft":"⋪","ntrianglelefteq":"⋬","ntriangleright":"⋫","ntrianglerighteq":"⋭","nu":"ν","num":"#","numero":"№","numsp":" ","nvDash":"⊭","nvHarr":"⤄","nvap":"≍⃒","nvdash":"⊬","nvge":"≥⃒","nvgt":">⃒","nvinfin":"⧞","nvlArr":"⤂","nvle":"≤⃒","nvlt":"<⃒","nvltrie":"⊴⃒","nvrArr":"⤃","nvrtrie":"⊵⃒","nvsim":"∼⃒","nwArr":"⇖","nwarhk":"⤣","nwarr":"↖","nwarrow":"↖","nwnear":"⤧","oS":"Ⓢ","oacute":"ó","oast":"⊛","ocir":"⊚","ocirc":"ô","ocy":"о","odash":"⊝","odblac":"ő","odiv":"⨸","odot":"⊙","odsold":"⦼","oelig":"œ","ofcir":"⦿","ofr":"\uD835\uDD2C","ogon":"˛","ograve":"ò","ogt":"⧁","ohbar":"⦵","ohm":"Ω","oint":"∮","olarr":"↺","olcir":"⦾","olcross":"⦻","oline":"‾","olt":"⧀","omacr":"ō","omega":"ω","omicron":"ο","omid":"⦶","ominus":"⊖","oopf":"\uD835\uDD60","opar":"⦷","operp":"⦹","oplus":"⊕","or":"∨","orarr":"↻","ord":"⩝","order":"ℴ","orderof":"ℴ","ordf":"ª","ordm":"º","origof":"⊶","oror":"⩖","orslope":"⩗","orv":"⩛","oscr":"ℴ","oslash":"ø","osol":"⊘","otilde":"õ","otimes":"⊗","otimesas":"⨶","ouml":"ö","ovbar":"⌽","par":"∥","para":"¶","parallel":"∥","parsim":"⫳","parsl":"⫽","part":"∂","pcy":"п","percnt":"%","period":".","permil":"‰","perp":"⊥","pertenk":"‱","pfr":"\uD835\uDD2D","phi":"φ","phiv":"ϕ","phmmat":"ℳ","phone":"☎","pi":"π","pitchfork":"⋔","piv":"ϖ","planck":"ℏ","planckh":"ℎ","plankv":"ℏ","plus":"+","plusacir":"⨣","plusb":"⊞","pluscir":"⨢","plusdo":"∔","plusdu":"⨥","pluse":"⩲","plusmn":"±","plussim":"⨦","plustwo":"⨧","pm":"±","pointint":"⨕","popf":"\uD835\uDD61","pound":"£","pr":"≺","prE":"⪳","prap":"⪷","prcue":"≼","pre":"⪯","prec":"≺","precapprox":"⪷","preccurlyeq":"≼","preceq":"⪯","precnapprox":"⪹","precneqq":"⪵","precnsim":"⋨","precsim":"≾","prime":"′","primes":"ℙ","prnE":"⪵","prnap":"⪹","prnsim":"⋨","prod":"∏","profalar":"⌮","profline":"⌒","profsurf":"⌓","prop":"∝","propto":"∝","prsim":"≾","prurel":"⊰","pscr":"\uD835\uDCC5","psi":"ψ","puncsp":" ","qfr":"\uD835\uDD2E","qint":"⨌","qopf":"\uD835\uDD62","qprime":"⁗","qscr":"\uD835\uDCC6","quaternions":"ℍ","quatint":"⨖","quest":"?","questeq":"≟","quot":"\\"","rAarr":"⇛","rArr":"⇒","rAtail":"⤜","rBarr":"⤏","rHar":"⥤","race":"∽̱","racute":"ŕ","radic":"√","raemptyv":"⦳","rang":"⟩","rangd":"⦒","range":"⦥","rangle":"⟩","raquo":"»","rarr":"→","rarrap":"⥵","rarrb":"⇥","rarrbfs":"⤠","rarrc":"⤳","rarrfs":"⤞","rarrhk":"↪","rarrlp":"↬","rarrpl":"⥅","rarrsim":"⥴","rarrtl":"↣","rarrw":"↝","ratail":"⤚","ratio":"∶","rationals":"ℚ","rbarr":"⤍","rbbrk":"❳","rbrace":"}","rbrack":"]","rbrke":"⦌","rbrksld":"⦎","rbrkslu":"⦐","rcaron":"ř","rcedil":"ŗ","rceil":"⌉","rcub":"}","rcy":"р","rdca":"⤷","rdldhar":"⥩","rdquo":"”","rdquor":"”","rdsh":"↳","real":"ℜ","realine":"ℛ","realpart":"ℜ","reals":"ℝ","rect":"▭","reg":"®","rfisht":"⥽","rfloor":"⌋","rfr":"\uD835\uDD2F","rhard":"⇁","rharu":"⇀","rharul":"⥬","rho":"ρ","rhov":"ϱ","rightarrow":"→","rightarrowtail":"↣","rightharpoondown":"⇁","rightharpoonup":"⇀","rightleftarrows":"⇄","rightleftharpoons":"⇌","rightrightarrows":"⇉","rightsquigarrow":"↝","rightthreetimes":"⋌","ring":"˚","risingdotseq":"≓","rlarr":"⇄","rlhar":"⇌","rlm":"‏","rmoust":"⎱","rmoustache":"⎱","rnmid":"⫮","roang":"⟭","roarr":"⇾","robrk":"⟧","ropar":"⦆","ropf":"\uD835\uDD63","roplus":"⨮","rotimes":"⨵","rpar":")","rpargt":"⦔","rppolint":"⨒","rrarr":"⇉","rsaquo":"›","rscr":"\uD835\uDCC7","rsh":"↱","rsqb":"]","rsquo":"’","rsquor":"’","rthree":"⋌","rtimes":"⋊","rtri":"▹","rtrie":"⊵","rtrif":"▸","rtriltri":"⧎","ruluhar":"⥨","rx":"℞","sacute":"ś","sbquo":"‚","sc":"≻","scE":"⪴","scap":"⪸","scaron":"š","sccue":"≽","sce":"⪰","scedil":"ş","scirc":"ŝ","scnE":"⪶","scnap":"⪺","scnsim":"⋩","scpolint":"⨓","scsim":"≿","scy":"с","sdot":"⋅","sdotb":"⊡","sdote":"⩦","seArr":"⇘","searhk":"⤥","searr":"↘","searrow":"↘","sect":"§","semi":";","seswar":"⤩","setminus":"∖","setmn":"∖","sext":"✶","sfr":"\uD835\uDD30","sfrown":"⌢","sharp":"♯","shchcy":"щ","shcy":"ш","shortmid":"∣","shortparallel":"∥","shy":"­","sigma":"σ","sigmaf":"ς","sigmav":"ς","sim":"∼","simdot":"⩪","sime":"≃","simeq":"≃","simg":"⪞","simgE":"⪠","siml":"⪝","simlE":"⪟","simne":"≆","simplus":"⨤","simrarr":"⥲","slarr":"←","smallsetminus":"∖","smashp":"⨳","smeparsl":"⧤","smid":"∣","smile":"⌣","smt":"⪪","smte":"⪬","smtes":"⪬︀","softcy":"ь","sol":"/","solb":"⧄","solbar":"⌿","sopf":"\uD835\uDD64","spades":"♠","spadesuit":"♠","spar":"∥","sqcap":"⊓","sqcaps":"⊓︀","sqcup":"⊔","sqcups":"⊔︀","sqsub":"⊏","sqsube":"⊑","sqsubset":"⊏","sqsubseteq":"⊑","sqsup":"⊐","sqsupe":"⊒","sqsupset":"⊐","sqsupseteq":"⊒","squ":"□","square":"□","squarf":"▪","squf":"▪","srarr":"→","sscr":"\uD835\uDCC8","ssetmn":"∖","ssmile":"⌣","sstarf":"⋆","star":"☆","starf":"★","straightepsilon":"ϵ","straightphi":"ϕ","strns":"¯","sub":"⊂","subE":"⫅","subdot":"⪽","sube":"⊆","subedot":"⫃","submult":"⫁","subnE":"⫋","subne":"⊊","subplus":"⪿","subrarr":"⥹","subset":"⊂","subseteq":"⊆","subseteqq":"⫅","subsetneq":"⊊","subsetneqq":"⫋","subsim":"⫇","subsub":"⫕","subsup":"⫓","succ":"≻","succapprox":"⪸","succcurlyeq":"≽","succeq":"⪰","succnapprox":"⪺","succneqq":"⪶","succnsim":"⋩","succsim":"≿","sum":"∑","sung":"♪","sup1":"¹","sup2":"²","sup3":"³","sup":"⊃","supE":"⫆","supdot":"⪾","supdsub":"⫘","supe":"⊇","supedot":"⫄","suphsol":"⟉","suphsub":"⫗","suplarr":"⥻","supmult":"⫂","supnE":"⫌","supne":"⊋","supplus":"⫀","supset":"⊃","supseteq":"⊇","supseteqq":"⫆","supsetneq":"⊋","supsetneqq":"⫌","supsim":"⫈","supsub":"⫔","supsup":"⫖","swArr":"⇙","swarhk":"⤦","swarr":"↙","swarrow":"↙","swnwar":"⤪","szlig":"ß","target":"⌖","tau":"τ","tbrk":"⎴","tcaron":"ť","tcedil":"ţ","tcy":"т","tdot":"⃛","telrec":"⌕","tfr":"\uD835\uDD31","there4":"∴","therefore":"∴","theta":"θ","thetasym":"ϑ","thetav":"ϑ","thickapprox":"≈","thicksim":"∼","thinsp":" ","thkap":"≈","thksim":"∼","thorn":"þ","tilde":"˜","times":"×","timesb":"⊠","timesbar":"⨱","timesd":"⨰","tint":"∭","toea":"⤨","top":"⊤","topbot":"⌶","topcir":"⫱","topf":"\uD835\uDD65","topfork":"⫚","tosa":"⤩","tprime":"‴","trade":"™","triangle":"▵","triangledown":"▿","triangleleft":"◃","trianglelefteq":"⊴","triangleq":"≜","triangleright":"▹","trianglerighteq":"⊵","tridot":"◬","trie":"≜","triminus":"⨺","triplus":"⨹","trisb":"⧍","tritime":"⨻","trpezium":"⏢","tscr":"\uD835\uDCC9","tscy":"ц","tshcy":"ћ","tstrok":"ŧ","twixt":"≬","twoheadleftarrow":"↞","twoheadrightarrow":"↠","uArr":"⇑","uHar":"⥣","uacute":"ú","uarr":"↑","ubrcy":"ў","ubreve":"ŭ","ucirc":"û","ucy":"у","udarr":"⇅","udblac":"ű","udhar":"⥮","ufisht":"⥾","ufr":"\uD835\uDD32","ugrave":"ù","uharl":"↿","uharr":"↾","uhblk":"▀","ulcorn":"⌜","ulcorner":"⌜","ulcrop":"⌏","ultri":"◸","umacr":"ū","uml":"¨","uogon":"ų","uopf":"\uD835\uDD66","uparrow":"↑","updownarrow":"↕","upharpoonleft":"↿","upharpoonright":"↾","uplus":"⊎","upsi":"υ","upsih":"ϒ","upsilon":"υ","upuparrows":"⇈","urcorn":"⌝","urcorner":"⌝","urcrop":"⌎","uring":"ů","urtri":"◹","uscr":"\uD835\uDCCA","utdot":"⋰","utilde":"ũ","utri":"▵","utrif":"▴","uuarr":"⇈","uuml":"ü","uwangle":"⦧","vArr":"⇕","vBar":"⫨","vBarv":"⫩","vDash":"⊨","vangrt":"⦜","varepsilon":"ϵ","varkappa":"ϰ","varnothing":"∅","varphi":"ϕ","varpi":"ϖ","varpropto":"∝","varr":"↕","varrho":"ϱ","varsigma":"ς","varsubsetneq":"⊊︀","varsubsetneqq":"⫋︀","varsupsetneq":"⊋︀","varsupsetneqq":"⫌︀","vartheta":"ϑ","vartriangleleft":"⊲","vartriangleright":"⊳","vcy":"в","vdash":"⊢","vee":"∨","veebar":"⊻","veeeq":"≚","vellip":"⋮","verbar":"|","vert":"|","vfr":"\uD835\uDD33","vltri":"⊲","vnsub":"⊂⃒","vnsup":"⊃⃒","vopf":"\uD835\uDD67","vprop":"∝","vrtri":"⊳","vscr":"\uD835\uDCCB","vsubnE":"⫋︀","vsubne":"⊊︀","vsupnE":"⫌︀","vsupne":"⊋︀","vzigzag":"⦚","wcirc":"ŵ","wedbar":"⩟","wedge":"∧","wedgeq":"≙","weierp":"℘","wfr":"\uD835\uDD34","wopf":"\uD835\uDD68","wp":"℘","wr":"≀","wreath":"≀","wscr":"\uD835\uDCCC","xcap":"⋂","xcirc":"◯","xcup":"⋃","xdtri":"▽","xfr":"\uD835\uDD35","xhArr":"⟺","xharr":"⟷","xi":"ξ","xlArr":"⟸","xlarr":"⟵","xmap":"⟼","xnis":"⋻","xodot":"⨀","xopf":"\uD835\uDD69","xoplus":"⨁","xotime":"⨂","xrArr":"⟹","xrarr":"⟶","xscr":"\uD835\uDCCD","xsqcup":"⨆","xuplus":"⨄","xutri":"△","xvee":"⋁","xwedge":"⋀","yacute":"ý","yacy":"я","ycirc":"ŷ","ycy":"ы","yen":"¥","yfr":"\uD835\uDD36","yicy":"ї","yopf":"\uD835\uDD6A","yscr":"\uD835\uDCCE","yucy":"ю","yuml":"ÿ","zacute":"ź","zcaron":"ž","zcy":"з","zdot":"ż","zeetrf":"ℨ","zeta":"ζ","zfr":"\uD835\uDD37","zhcy":"ж","zigrarr":"⇝","zopf":"\uD835\uDD6B","zscr":"\uD835\uDCCF","zwj":"‍","zwnj":"‌"}'),N="�",P={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},D=/&(?:#[xX]([0-9a-fA-F]+)|#([0-9]+)|([A-Za-z][A-Za-z0-9]*));/g,B=/&(?:#[xX]([0-9a-fA-F]+);?|#([0-9]+);?|([A-Za-z][A-Za-z0-9]*);?)/g;function O(M){if(M in P)return String.fromCodePoint(P[M]);if(M<0||M>1114111)return"�";if(M>=55296&&M<=57343)return"�";return String.fromCodePoint(M)}function T(M){if(typeof M!=="string"||M.indexOf("&")===-1)return M;return M.replace(D,(z,Y,V,F)=>{if(Y!==void 0)return O(parseInt(Y,16));if(V!==void 0)return O(parseInt(V,10));let X=j[F];return X===void 0?z:X})}function U(M){if(typeof M!=="string"||M.indexOf("&")===-1)return M;return M.replace(B,(z,Y,V,F)=>{if(Y!==void 0)return O(parseInt(Y,16));if(V!==void 0)return O(parseInt(V,10));let X=j[F];return X===void 0?z:X})}return{decodeHtmlStrict:T,decodeHtml:U,decodeCodePoint:O,HTML5_ENTITIES:j}}};var EJ={name:"csv",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){let w=/^-?\d+$/,j=/^-?(?:\d+\.\d*|\.\d+|\d+)(?:[eE][+-]?\d+)?$/;function N(O){if(O==="")return"";if(O==="true")return!0;if(O==="false")return!1;if(O==="null")return null;if(w.test(O)){let T=Number(O);if(Number.isSafeInteger(T))return T;return O}if(j.test(O))return Number(O);return O}function P(O,T){T=T||{};let U=T.delimiter||",",M=T.quote||'"',z=T.skipEmpty!==!1,Y=!!T.trim,V=!!T.cast,F=T.comment||null,X=T.skipLines|0;if(U.length!==1)throw Error("csv: delimiter must be a single character");if(M.length!==1)throw Error("csv: quote must be a single character");let Z=0;if(O.charCodeAt(0)===65279)Z=1;let $=[],J="",Q=[],H=!1,G=!1,W=O.length,q=0,K=()=>{Q.push(Y&&!H?J.trim():J),J="",H=!1},L=()=>{if(K(),Q.length===1&&Q[0]===""&&z){Q=[];return}if(F!==null&&Q.length>0&&(Y?Q[0].trimStart():Q[0]).charAt(0)===F){Q=[];return}if(q<X){q++,Q=[];return}$.push(Q),Q=[]},C=Z;while(C<W){let A=O[C];if(G){if(A===M){if(O[C+1]===M){J+=M,C+=2;continue}G=!1,C++;continue}J+=A,C++;continue}if(A===M&&J===""){G=!0,H=!0,C++;continue}if(A===U){K(),C++;continue}if(A==="\r"){L(),C+=O[C+1]===`
40
+ `?2:1;continue}if(A===`
41
+ `){L(),C++;continue}J+=A,C++}if(G)throw Error("csv: unterminated quoted field");if(J!==""||Q.length>0)L();if(V)for(let A=0;A<$.length;A++){let R=$[A];for(let S=0;S<R.length;S++)R[S]=N(R[S])}if(T.header){let A;if(Array.isArray(T.header))A=T.header;else{if($.length===0)return[];if(A=$.shift(),V)for(let S=0;S<A.length;S++)A[S]=String(A[S])}let R=Array($.length);for(let S=0;S<$.length;S++){let x={},I=$[S];for(let E=0;E<A.length;E++)x[A[E]]=I[E];R[S]=x}return R}return $}function D(O){if(O===null||O===void 0)return"";if(O instanceof Date)return O.toISOString();if(typeof O==="bigint")return O.toString();return String(O)}function B(O,T){T=T||{};let U=T.delimiter||",",M=T.quote||'"',z=T.newline||`\r
42
+ `;if(!O||O.length===0)return"";let Y=!Array.isArray(O[0])&&typeof O[0]==="object"&&O[0]!==null&&!(O[0]instanceof Date),V=null,F;if(Y){V=Array.isArray(T.header)?T.header:Object.keys(O[0]),F=Array(O.length);for(let G=0;G<O.length;G++){let W=O[G],q=Array(V.length);for(let K=0;K<V.length;K++)q[K]=W[V[K]];F[G]=q}}else if(F=O,Array.isArray(T.header))V=T.header;let X=(G)=>G.indexOf(U)>=0||G.indexOf(M)>=0||G.indexOf(`
43
+ `)>=0||G.indexOf("\r")>=0,Z=M,$=M+M,J=(G)=>{if(X(G))return Z+G.split(Z).join($)+Z;return G},Q=[];if(V&&T.header!==!1){let G=Array(V.length);for(let W=0;W<V.length;W++)G[W]=J(String(V[W]));Q.push(G.join(U))}for(let G=0;G<F.length;G++){let W=F[G],q=Array(W.length);for(let K=0;K<W.length;K++)q[K]=J(D(W[K]));Q.push(q.join(U))}return Q.join(z)+z}return{parse:P,stringify:B}}};var IJ={name:"xml",version:"1.0.0",type:"fw.io.codec",dependencies:[],factory(){class w extends Error{constructor(Z,$){super($);Object.defineProperty(this,"name",{value:"XmlParseError",writable:!0,configurable:!0}),this.code=Z}}let j={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};function N(Z){return Z.replace(/&(#x[0-9a-fA-F]+|#\d+|[a-zA-Z]+);/g,($,J)=>{if(J[0]==="#"){let Q=J[1]==="x"?parseInt(J.slice(2),16):parseInt(J.slice(1),10);if(isNaN(Q)||Q<0||Q>1114111||Q>=55296&&Q<=57343)return $;return String.fromCodePoint(Q)}return j[J]!=null?j[J]:$})}function P(Z){return String(Z).replace(/[&<>]/g,($)=>$==="&"?"&amp;":$==="<"?"&lt;":"&gt;")}function D(Z){return String(Z).replace(/[&<>"]/g,($)=>$==="&"?"&amp;":$==="<"?"&lt;":$===">"?"&gt;":"&quot;")}function B(Z,$,J){return{type:"element",name:Z,attrs:$||{},children:J||[]}}function O(Z){return{type:"text",value:Z}}function T(Z,$){let J=$+1,Q=Z.length,H="";while(J<Q){let G=Z[J];if(H){if(G===H)H=""}else if(G==='"'||G==="'")H=G;else if(G===">")return J;J++}return-1}function U(Z){let $=0,J=Z.length;while($<J&&!/\s/.test(Z[$]))$++;let Q=Z.slice(0,$),H={};while($<J){while($<J&&/\s/.test(Z[$]))$++;if($>=J)break;let G=$;while(G<J&&Z[G]!=="="&&!/\s/.test(Z[G]))G++;let W=Z.slice($,G);if(!W)break;while(G<J&&/\s/.test(Z[G]))G++;if(Z[G]!=="="){H[W]="",$=G;continue}G++;while(G<J&&/\s/.test(Z[G]))G++;let q=Z[G];if(q!=='"'&&q!=="'")throw new w("xml/parse-error",`XML: unquoted attribute "${W}"`);let K=Z.indexOf(q,G+1);if(K<0)throw new w("xml/parse-error",`XML: unterminated attribute "${W}"`);H[W]=N(Z.slice(G+1,K)),$=K+1}return B(Q,H)}function M(Z){let $=0,J=Z.length;if(Z.charCodeAt(0)===65279)$=1;let Q=[],H=null;while($<J)if(Z[$]==="<"){if(Z.startsWith("<?",$)){let L=Z.indexOf("?>",$+2);if(L<0)throw new w("xml/parse-error","XML: unterminated processing instruction");$=L+2;continue}if(Z.startsWith("<!--",$)){let L=Z.indexOf("-->",$+4);if(L<0)throw new w("xml/parse-error","XML: unterminated comment");$=L+3;continue}if(Z.startsWith("<![CDATA[",$)){let L=Z.indexOf("]]>",$+9);if(L<0)throw new w("xml/parse-error","XML: unterminated CDATA");let C=Z.slice($+9,L);if(Q.length)Q[Q.length-1].children.push(O(C));$=L+3;continue}if(Z.startsWith("<!",$)){let L=$+2,C=!1;while(L<J){if(Z[L]==="["){C=!0;break}if(Z[L]===">")break;L++}if(C){let A=Z.indexOf("]>",L+1);if(A<0)throw new w("xml/parse-error","XML: unterminated declaration");$=A+2}else{if(L>=J)throw new w("xml/parse-error","XML: unterminated declaration");$=L+1}continue}if(Z[$+1]==="/"){let L=Z.indexOf(">",$);if(L<0)throw new w("xml/parse-error","XML: unterminated end tag");let C=Z.slice($+2,L).trim(),A=Q.pop();if(!A||A.name!==C)throw new w("xml/parse-error",`XML: mismatched end tag </${C}> (expected </${A?A.name:"∅"}>)`);$=L+1;continue}let G=T(Z,$);if(G<0)throw new w("xml/parse-error","XML: unterminated start tag");let W=Z[G-1]==="/",q=Z.slice($+1,W?G-1:G),K=U(q);if(Q.length)Q[Q.length-1].children.push(K);else{if(H)throw new w("xml/parse-error","XML: multiple root elements");H=K}if(!W)Q.push(K);else if(!H)H=K;$=G+1}else{let G=Z.indexOf("<",$),W=Z.slice($,G<0?J:G);if(Q.length&&W.length)Q[Q.length-1].children.push(O(N(W)));if(G<0)break;$=G}if(Q.length)throw new w("xml/parse-error",`XML: unclosed element <${Q[Q.length-1].name}>`);if(!H)throw new w("xml/parse-error","XML: no root element");return H}function z(Z){if(Z.type==="text")return P(Z.value);let $=Object.keys(Z.attrs).map((Q)=>` ${Q}="${D(Z.attrs[Q])}"`).join("");if(!Z.children||Z.children.length===0)return`<${Z.name}${$}/>`;let J=Z.children.map(z).join("");return`<${Z.name}${$}>${J}</${Z.name}>`}function Y(Z){return`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\r
44
+ `+z(Z)}function V(Z,$){if(!Z.children)return null;for(let J of Z.children)if(J.type==="element"&&J.name===$)return J;return null}function F(Z,$){let J=[];if(!Z.children)return J;for(let Q of Z.children)if(Q.type==="element"&&Q.name===$)J.push(Q);return J}function X(Z){if(!Z)return"";if(Z.type==="text")return Z.value;if(!Z.children)return"";return Z.children.map(X).join("")}return{el:B,text:O,parse:M,serialize:Y,serializeNode:z,findChild:V,findAll:F,textContent:X,encodeText:P,encodeAttr:D,decodeEntities:N,XmlParseError:w}}};var i$={name:"bitArray",version:"1.0.0",type:"fw.crypto.utils",dependencies:[],factory(){let w={ba_to_ui8:function(N){let P=[],D=w.bitLength(N),B,O;for(B=0;B<D/8;B++){if((B&3)===0)O=N[B/4];P.push(O>>>8>>>8>>>8),O<<=8}return new Uint8Array(P)},ui8_to_ba:function(N){let P=[],D,B=0;for(D=0;D<N.length;D++)if(B=B<<8|N[D],(D&3)===3)P.push(B),B=0;if(D&3)P.push(w.partial(8*(D&3),B));return P},bitSlice:function(N,P,D){return N=j(N.slice(P/32),32-(P&31)).slice(1),D===void 0?N:w.clamp(N,D-P)},extract:function(N,P,D){let B,O=(-P-D&31)>>0;if((P+D-1^P)&-32)B=N[P/32|0]<<32-O^N[P/32+1|0]>>>O;else B=N[P/32|0]>>>O;return B&(1<<D)-1},concat:function(N,P){if(N.length===0||P.length===0)return N.concat(P);let D=N[N.length-1],B=w.getPartial(D);if(B===32)return N.concat(P);else return j(P,B,D|0,N.slice(0,N.length-1))},bitLength:function(N){let P=N.length,D;if(P===0)return 0;return D=N[P-1],(P-1)*32+w.getPartial(D)},clamp:function(N,P){if(N.length*32<P)return N;N=N.slice(0,Math.ceil(P/32));let D=N.length;if(P=P&31,D>0&&P)N[D-1]=w.partial(P,N[D-1]&2147483648>>P-1,1);return N},partial:function(N,P,D){if(N===32)return P;return(D?P|0:P<<32-N)+N*1099511627776},getPartial:function(N){return Math.round(N/1099511627776)||32},equal:function(N,P){if(w.bitLength(N)!==w.bitLength(P))return!1;let D=0,B;for(B=0;B<N.length;B++)D|=N[B]^P[B];return D===0},byteswapM:function(N){if(N.length>0&&w.getPartial(N[N.length-1])!==32)return console.warn("[crypto] INVALID: bitArray.byteswapM: partial words not supported"),!1;let P,D,B=65280;for(P=0;P<N.length;++P)D=N[P],N[P]=D>>>24|D>>>8&B|(D&B)<<8|D<<24;return N}};function j(N,P,D,B){let O,T,U;if(B===void 0)B=[];for(;P>=32;P-=32)B.push(D),D=0;if(P===0)return B.concat(N);for(O=0;O<N.length;O++)B.push(D|N[O]>>>P),D=N[O]<<32-P;return T=N.length?N[N.length-1]:0,U=w.getPartial(T),B.push(w.partial(P+U&31,P+U>32?D:B.pop(),1)),B}return w}};var xJ={name:"aes",version:"1.0.0",type:"fw.crypto.cipher",dependencies:[],factory(){let w=[[[],[],[],[],[]],[[],[],[],[],[]]];(function(){let I=w[0],E=w[1],_=I[4],v=E[4],k=[],f=[],h,u,p,y,c,o,r,e,a;for(a=0;a<256;a++)f[(k[a]=a<<1^(a>>7)*283)^a]=a;for(h=u=0;!_[h];h^=p||1,u=f[u]||1){o=u^u<<1^u<<2^u<<3^u<<4,o=o>>8^o&255^99,_[h]=o,v[o]=h,c=k[y=k[p=k[h]]],e=c*16843009^y*65537^p*257^h*16843008,r=k[o]*257^o*16843008;for(a=0;a<4;a++)I[a][h]=r=r<<24^r>>>8,E[a][o]=e=e<<24^e>>>8}for(a=0;a<5;a++)I[a]=I[a].slice(0),E[a]=E[a].slice(0)})();function j(x,I,E,_){if(x.length!==4)return console.warn("[crypto] INVALID: aes: invalid block size"),!1;let v=E[I],k=x[0]^v[0],f=x[I?3:1]^v[1],h=x[2]^v[2],u=x[I?1:3]^v[3],p,y,c,o=v.length/4-2,r=4,e=[0,0,0,0],a=_[I],X$=a[0],Y$=a[1],Z$=a[2],H$=a[3],K$=a[4];for(let b=0;b<o;b++)p=X$[k>>>24]^Y$[f>>16&255]^Z$[h>>8&255]^H$[u&255]^v[r],y=X$[f>>>24]^Y$[h>>16&255]^Z$[u>>8&255]^H$[k&255]^v[r+1],c=X$[h>>>24]^Y$[u>>16&255]^Z$[k>>8&255]^H$[f&255]^v[r+2],u=X$[u>>>24]^Y$[k>>16&255]^Z$[f>>8&255]^H$[h&255]^v[r+3],r+=4,k=p,f=y,h=c;for(let b=0;b<4;b++)e[I?3&-b:b]=K$[k>>>24]<<24^K$[f>>16&255]<<16^K$[h>>8&255]<<8^K$[u&255]^v[r++],p=k,k=f,f=h,h=u,u=p;return e}let N=65535;function P(x,I,E){let _=x[0],v=x[1],k=x[2],f=x[3],h=x[4],u=x[5],p=x[6],y=x[7],c=I[0],o=I[1],r=I[2],e=I[3],a=I[4],X$=I[5],Y$=I[6],Z$=I[7],H$=_&c,K$=_&o^v&c,b=_&r^v&o^k&c,i=_&e^v&r^k&o^f&c,d=_&a^v&e^k&r^f&o^h&c,g=_&X$^v&a^k&e^f&r^h&o^u&c,m=_&Y$^v&X$^k&a^f&e^h&r^u&o^p&c,n=_&Z$^v&Y$^k&X$^f&a^h&e^u&r^p&o^y&c,s=v&Z$^k&Y$^f&X$^h&a^u&e^p&r^y&o,t=k&Z$^f&Y$^h&X$^u&a^p&e^y&r,l=f&Z$^h&Y$^u&X$^p&a^y&e,J$=h&Z$^u&Y$^p&X$^y&a,$$=u&Z$^p&Y$^y&X$,Q$=p&Z$^y&Y$,G$=y&Z$;l^=G$,t^=G$,n^=G$,m^=G$,t^=Q$,s^=Q$,m^=Q$,g^=Q$,s^=$$,n^=$$,g^=$$,d^=$$,n^=J$,m^=J$,d^=J$,i^=J$,m^=l,g^=l,i^=l,b^=l,g^=t,d^=t,b^=t,K$^=t,d^=s,i^=s,K$^=s,H$^=s,E[0]=H$,E[1]=K$,E[2]=b,E[3]=i,E[4]=d,E[5]=g,E[6]=m,E[7]=n}function D(x,I){let E=x[0],_=x[1],v=x[2],k=x[3],f=x[4],h=x[5],u=x[6],p=x[7];I[0]=E^f^u,I[1]=f^u^p,I[2]=_^h,I[3]=f^h^u^p,I[4]=v^f^p,I[5]=h^u,I[6]=k^h,I[7]=u^p}let B=new Int32Array(8),O=new Int32Array(8),T=new Int32Array(8),U=new Int32Array(8),M=new Int32Array(8);function z(x){D(x,B),P(B,x,O),D(O,T),D(T,T),P(T,O,U),D(U,U),D(U,U),D(U,U),D(U,U),P(U,T,U),P(U,B,x)}function Y(x){z(x);for(let I=0;I<8;I++)M[I]=x[I];for(let I=0;I<8;I++)x[I]=M[I]^M[I+4&7]^M[I+5&7]^M[I+6&7]^M[I+7&7]^(99>>I&1?N:0)}function V(x){for(let I=0;I<8;I++)M[I]=x[I];for(let I=0;I<8;I++)x[I]=M[I+2&7]^M[I+5&7]^M[I+7&7]^(5>>I&1?N:0);z(x)}function F(x,I){for(let E=0;E<8;E++){let _=x[E],v=_&4369;for(let k=1;k<4;k++){let f=4369<<k,h=_&f,u=4*k,p=I?h<<u|h>>>16-u:h>>>u|h<<16-u;v|=p&f}x[E]=v}}let X=new Int32Array(8),Z=new Int32Array(8);function $(x){for(let y=0;y<8;y++){let c=x[y],o=c>>>1&30583|(c&4369)<<3,r=o>>>1&30583|(o&4369)<<3,e=r>>>1&30583|(r&4369)<<3;X[y]=c^o^r^e,Z[y]=c^o}let I=Z,E=I[7],_=I[0]^I[7],v=I[1],k=I[2]^I[7],f=I[3]^I[7],h=I[4],u=I[5],p=I[6];x[0]^=X[0]^E,x[1]^=X[1]^_,x[2]^=X[2]^v,x[3]^=X[3]^k,x[4]^=X[4]^f,x[5]^=X[5]^h,x[6]^=X[6]^u,x[7]^=X[7]^p}function J(x){$(x),$(x),$(x)}function Q(x,I){I.fill(0);for(let E=0;E<4;E++){let _=x[E];for(let v=0;v<4;v++){let k=_>>>24-8*v&255,f=v+4*E;for(let h=0;h<8;h++)I[h]|=(k>>>h&1)<<f}}}function H(x){let I=[0,0,0,0];for(let E=0;E<4;E++){let _=0;for(let v=0;v<4;v++){let k=v+4*E,f=0;for(let h=0;h<8;h++)f|=(x[h]>>>k&1)<<h;_|=f<<24-8*v}I[E]=_}return I}let G=new Int32Array(8);function W(x){return Q([x,0,0,0],G),Y(G),H(G)[0]}function q(x){let I=x.length,E=x.slice(0),_=1;for(let v=I;v<4*I+28;v++){let k=E[v-1];if(v%I===0)k=W(k<<8|k>>>24)^_<<24,_=_<<1^(_>>7)*283;else if(I===8&&v%I===4)k=W(k);E[v]=E[v-I]^k}return E}function K(x){let I=w[0][4],E=x.length,_=x.slice(0),v=1;for(let k=E;k<4*E+28;k++){let f=_[k-1];if(k%E===0||E===8&&k%E===4){if(f=I[f>>>24]<<24^I[f>>16&255]<<16^I[f>>8&255]<<8^I[f&255],k%E===0)f=f<<8^f>>>24^v<<24,v=v<<1^(v>>7)*283}_[k]=_[k-E]^f}return _}function L(x){let I=[];for(let E=0;E<x.length/4;E++){let _=new Int32Array(8);Q(x.slice(4*E,4*E+4),_),I.push(_)}return I}let C=(x,I)=>{for(let E=0;E<8;E++)x[E]^=I[E]};function A(x,I,E){if(!x||x.length!==4)return console.warn("[crypto] INVALID: aes: invalid block size"),!1;let _=G,v=E.length-1;if(Q(x,_),!I){C(_,E[0]);for(let k=1;k<v;k++)Y(_),F(_,!1),$(_),C(_,E[k]);Y(_),F(_,!1),C(_,E[v])}else{C(_,E[v]);for(let k=v-1;k>=1;k--)F(_,!0),V(_),C(_,E[k]),J(_);F(_,!0),V(_),C(_,E[0])}return H(_)}let R=(x,I)=>A(x,0,I),S={};return S.fn=function(x,I=!0){let E=x.length;if(E!==4&&E!==6&&E!==8)return console.warn("[crypto] INVALID: aes: invalid key size"),!1;let _=L(q(x)),v={encrypt(k){return A(k,0,_)}};if(I)v.decrypt=(k)=>A(k,1,_);return v},S.ttable={fn(x,I=!0){let E=w.slice(),_=E[0][4],v=E[1],k=x.length,f=1,h,u,p;if(k!==4&&k!==6&&k!==8)return console.warn("[crypto] INVALID: aes: invalid key size"),!1;let y=x.slice(0),c=[],o=[y,c];for(h=k;h<4*k+28;h++){if(p=y[h-1],h%k===0||k===8&&h%k===4){if(p=_[p>>>24]<<24^_[p>>16&255]<<16^_[p>>8&255]<<8^_[p&255],h%k===0)p=p<<8^p>>>24^f<<24,f=f<<1^(f>>7)*283}y[h]=y[h-k]^p}if(I)for(u=0;h;u++,h--)if(p=y[u&3?h:h-4],h<=4||u<4)c[u]=p;else c[u]=v[0][_[p>>>24]]^v[1][_[p>>16&255]]^v[2][_[p>>8&255]]^v[3][_[p&255]];let r={encrypt(e){return j(e,0,o,E)}};if(I)r.decrypt=function(e){return j(e,1,o,E)};return r}},Object.defineProperty(S,Symbol.for("@awacloud/fw/internal"),{value:{sbox:w[0][4],sboxInv:w[1][4],bsSub(x){let I=new Int32Array(8);for(let E=0;E<16;E++)for(let _=0;_<8;_++)I[_]|=(x[E]>>>_&1)<<E;return Y(I),Uint8Array.from({length:16},(E,_)=>{let v=0;for(let k=0;k<8;k++)v|=(I[k]>>>_&1)<<k;return v})},bsInvSub(x){let I=new Int32Array(8);for(let E=0;E<16;E++)for(let _=0;_<8;_++)I[_]|=(x[E]>>>_&1)<<E;return V(I),Uint8Array.from({length:16},(E,_)=>{let v=0;for(let k=0;k<8;k++)v|=(I[k]>>>_&1)<<k;return v})},expandKey:q,expandKeyTable:K,bsEncrypt:R}}),S}};var _J={name:"sha256",version:"1.0.0",type:"fw.crypto.hash",dependencies:["bitArray","utf8"],deps:[i$,E$],factory(w,j){let N=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],P=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],D=Int32Array.from(P),B=new Int32Array(16),O=new Int32Array(64);function T(z,Y){let V=D,F=O;for(let S=0;S<16;S++)F[S]=Y[S]|0;for(let S=16;S<64;S++){let x=F[S-15],I=F[S-2],E=(x>>>7|x<<25)^(x>>>18|x<<14)^x>>>3,_=(I>>>17|I<<15)^(I>>>19|I<<13)^I>>>10;F[S]=(E+F[S-16]|0)+(_+F[S-7]|0)|0}let X=z[0]|0,Z=z[1]|0,$=z[2]|0,J=z[3]|0,Q=z[4]|0,H=z[5]|0,G=z[6]|0,W=z[7]|0,q,K,L,C,A,R;C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[0]+F[0]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[1]+F[1]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[2]+F[2]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[3]+F[3]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[4]+F[4]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[5]+F[5]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[6]+F[6]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[7]+F[7]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[8]+F[8]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[9]+F[9]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[10]+F[10]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[11]+F[11]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[12]+F[12]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[13]+F[13]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[14]+F[14]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[15]+F[15]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[16]+F[16]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[17]+F[17]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[18]+F[18]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[19]+F[19]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[20]+F[20]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[21]+F[21]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[22]+F[22]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[23]+F[23]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[24]+F[24]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[25]+F[25]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[26]+F[26]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[27]+F[27]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[28]+F[28]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[29]+F[29]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[30]+F[30]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[31]+F[31]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[32]+F[32]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[33]+F[33]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[34]+F[34]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[35]+F[35]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[36]+F[36]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[37]+F[37]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[38]+F[38]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[39]+F[39]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[40]+F[40]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[41]+F[41]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[42]+F[42]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[43]+F[43]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[44]+F[44]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[45]+F[45]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[46]+F[46]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[47]+F[47]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[48]+F[48]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[49]+F[49]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[50]+F[50]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[51]+F[51]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[52]+F[52]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[53]+F[53]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[54]+F[54]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[55]+F[55]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,C=(Q>>>6|Q<<26)^(Q>>>11|Q<<21)^(Q>>>25|Q<<7),A=G^Q&(H^G),q=((W+C|0)+A|0)+(V[56]+F[56]|0)|0,L=(X>>>2|X<<30)^(X>>>13|X<<19)^(X>>>22|X<<10),R=X&Z^$&(X^Z),K=L+R|0,J=J+q|0,W=q+K|0,C=(J>>>6|J<<26)^(J>>>11|J<<21)^(J>>>25|J<<7),A=H^J&(Q^H),q=((G+C|0)+A|0)+(V[57]+F[57]|0)|0,L=(W>>>2|W<<30)^(W>>>13|W<<19)^(W>>>22|W<<10),R=W&X^Z&(W^X),K=L+R|0,$=$+q|0,G=q+K|0,C=($>>>6|$<<26)^($>>>11|$<<21)^($>>>25|$<<7),A=Q^$&(J^Q),q=((H+C|0)+A|0)+(V[58]+F[58]|0)|0,L=(G>>>2|G<<30)^(G>>>13|G<<19)^(G>>>22|G<<10),R=G&W^X&(G^W),K=L+R|0,Z=Z+q|0,H=q+K|0,C=(Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7),A=J^Z&($^J),q=((Q+C|0)+A|0)+(V[59]+F[59]|0)|0,L=(H>>>2|H<<30)^(H>>>13|H<<19)^(H>>>22|H<<10),R=H&G^W&(H^G),K=L+R|0,X=X+q|0,Q=q+K|0,C=(X>>>6|X<<26)^(X>>>11|X<<21)^(X>>>25|X<<7),A=$^X&(Z^$),q=((J+C|0)+A|0)+(V[60]+F[60]|0)|0,L=(Q>>>2|Q<<30)^(Q>>>13|Q<<19)^(Q>>>22|Q<<10),R=Q&H^G&(Q^H),K=L+R|0,W=W+q|0,J=q+K|0,C=(W>>>6|W<<26)^(W>>>11|W<<21)^(W>>>25|W<<7),A=Z^W&(X^Z),q=(($+C|0)+A|0)+(V[61]+F[61]|0)|0,L=(J>>>2|J<<30)^(J>>>13|J<<19)^(J>>>22|J<<10),R=J&Q^H&(J^Q),K=L+R|0,G=G+q|0,$=q+K|0,C=(G>>>6|G<<26)^(G>>>11|G<<21)^(G>>>25|G<<7),A=X^G&(W^X),q=((Z+C|0)+A|0)+(V[62]+F[62]|0)|0,L=($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10),R=$&J^Q&($^J),K=L+R|0,H=H+q|0,Z=q+K|0,C=(H>>>6|H<<26)^(H>>>11|H<<21)^(H>>>25|H<<7),A=W^H&(G^W),q=((X+C|0)+A|0)+(V[63]+F[63]|0)|0,L=(Z>>>2|Z<<30)^(Z>>>13|Z<<19)^(Z>>>22|Z<<10),R=Z&$^J&(Z^$),K=L+R|0,Q=Q+q|0,X=q+K|0,z[0]=z[0]+X|0,z[1]=z[1]+Z|0,z[2]=z[2]+$|0,z[3]=z[3]+J|0,z[4]=z[4]+Q|0,z[5]=z[5]+H|0,z[6]=z[6]+G|0,z[7]=z[7]+W|0}function U(z,Y){let V={};return V.fn=function(F){if(F)this._h=F._h.slice(0),this._buffer=F._buffer.slice(0),this._length=F._length;else this.reset()},V.hash=function(F){return new V.fn().update(F).finalize()},V.fn.prototype={blockSize:512,_init:z,_key:P,reset(){return this._h=this._init.slice(0),this._buffer=[],this._length=0,this},update(F){if(F instanceof Uint8Array&&this._buffer.length===0&&F.length>=64){let H=F.length-(F.length&63);if(this._length+H*8>9007199254740991)return console.warn("[crypto] INVALID: sha256: cannot hash more than 2^53 - 1 bits"),!1;let G=B;for(let W=0;W<H;W+=64){for(let q=0,K=W;q<16;q++,K+=4)G[q]=F[K]<<24|F[K+1]<<16|F[K+2]<<8|F[K+3];T(this._h,G)}if(this._length+=H*8,H===F.length)return this;F=F.subarray(H)}if(typeof F==="string")F=w.ui8_to_ba(j.toBytes(F));else if(F instanceof Uint8Array)F=w.ui8_to_ba(F);let X=this._buffer=w.concat(this._buffer,F),Z=this._length,$=this._length=Z+w.bitLength(F);if($>9007199254740991)return console.warn("[crypto] INVALID: sha256: cannot hash more than 2^53 - 1 bits"),!1;let J=new Int32Array(X),Q=0;for(let H=512+Z-(512+Z&511);H<=$;H+=512)this._block(J.subarray(16*Q,16*(Q+1))),Q+=1;return X.splice(0,16*Q),this},finalize(){let F=this._buffer,X=this._h;F=w.concat(F,[w.partial(1,1)]);for(let Z=F.length+2;Z&15;Z++)F.push(0);F.push(Math.floor(this._length/4294967296)),F.push(this._length|0);while(F.length)this._block(F.splice(0,16));return this.reset(),Y<8?X.slice(0,Y):X},_block(F){T(this._h,F)}},V}let M=U(N,8);return Object.defineProperty({fn:M.fn,hash:M.hash},Symbol.for("@awacloud/fw/internal"),{value:{makeSha:U,compress:T}})}};var vJ={name:"random",version:"1.0.0",type:"fw.crypto.utils",dependencies:["bitArray","aes","sha256"],deps:[i$,xJ,_J],factory(w,j,N){let D=typeof crypto<"u"&&!!crypto.getRandomValues;function B(E){let _=E.length>>>2,v=Array(_);for(let k=0;k<_;k++){let f=k<<2;v[k]=E[f]<<24|E[f+1]<<16|E[f+2]<<8|E[f+3]|0}return v}function O(E,_,v,k){for(let f=0;f<_;f++){let h=k+(f<<2);v[h]=E[f]>>>24&255,v[h+1]=E[f]>>>16&255,v[h+2]=E[f]>>>8&255,v[h+3]=E[f]&255}}let T=4,U=512,M=13,z={prev:-1,run:0},Y={anchor:-1,count:0,idx:0},V=!1;function F(E){if(V)return!1;for(let _=0;_<E.length;_++){let v=E[_];if(v===z.prev){if(z.run++,z.run>=T)return V=!0,console.error("[crypto] CORRUPT: random: RCT health-test failed on entropy source"),!1}else z.prev=v,z.run=1;if(Y.anchor===-1)Y.anchor=v,Y.count=1,Y.idx=1;else{if(Y.idx++,v===Y.anchor){if(Y.count++,Y.count>M)return V=!0,console.error("[crypto] CORRUPT: random: APT health-test failed on entropy source"),!1}if(Y.idx>=U)Y.anchor=-1}}return!0}function X(){z.prev=-1,z.run=0,Y.anchor=-1,Y.count=0,Y.idx=0,V=!1}function Z(E){if(!D)return console.error("[crypto] NOT READY: crypto.getRandomValues unavailable"),!1;let _=0;while(_<E.length){let v=Math.min(65536,E.length-_);crypto.getRandomValues(E.subarray(_,_+v)),_+=v}return E}function $(E){if(V)return console.error("[crypto] CORRUPT: random: entropy source previously failed health test"),!1;let _=Z(new Uint8Array(E));if(_===!1)return!1;if(!F(_))return!1;return _}let J=4,Q=16,H=65536,G=4294967296;function W(E){E=E||{};let _=E.aesKeyBits||256,v=!!E.df;if(_!==128&&_!==192&&_!==256)return console.error("[crypto] BUG: ctr_drbg: aesKeyBits must be 128, 192 or 256"),!1;let k=_/8,f=k/4,h=k+Q,u=h/4,p=Array(f).fill(0),y=Array(J).fill(0),c=null,o=0,r=!1;function e(g,m){let n=j.fn(B(g),!1);if(n===!1)return!1;let s=new Uint8Array(Q);for(let t=0;t<m.length;t+=Q){for(let J$=0;J$<Q;J$++)s[J$]^=m[t+J$];let l=n.encrypt(B(s));O(l,J,s,0)}return s}function a(g,m){let n=g.length,s=m,t=8,l=8+n+1,J$=(Q-l%Q)%Q,$$=l+J$,Q$=new Uint8Array($$);Q$[0]=n>>>24&255,Q$[1]=n>>>16&255,Q$[2]=n>>>8&255,Q$[3]=n&255,Q$[4]=s>>>24&255,Q$[5]=s>>>16&255,Q$[6]=s>>>8&255,Q$[7]=s&255;for(let U$=0;U$<n;U$++)Q$[8+U$]=g[U$];Q$[8+n]=128;let G$=new Uint8Array(k);for(let U$=0;U$<k;U$++)G$[U$]=U$;let V$=k+Q,F$=new Uint8Array(Math.ceil(V$/Q)*Q),z$=0,D$=0;while(z$<V$){let U$=new Uint8Array(Q+$$);U$[0]=D$>>>24&255,U$[1]=D$>>>16&255,U$[2]=D$>>>8&255,U$[3]=D$&255,U$.set(Q$,Q);let O$=e(G$,U$);if(O$===!1)return!1;F$.set(O$,z$),z$+=Q,D$++}let R$=F$.subarray(0,k),w$=F$.slice(k,k+Q),k$=j.fn(B(R$),!1);if(k$===!1)return!1;let A$=new Uint8Array(m),C$=0;while(C$<m){let U$=k$.encrypt(B(w$));O(U$,J,w$,0);let O$=Math.min(Q,m-C$);A$.set(w$.subarray(0,O$),C$),C$+=O$}return A$}function X$(){if(c=j.fn(p,!1),c===!1)return console.error("[crypto] BUG: ctr_drbg: AES key schedule failed"),!1;return!0}function Y$(){for(let g=J-1;g>=0;g--)if(y[g]=y[g]+1|0,y[g]!==0)break}function Z$(g){let m=Array(u).fill(0),n=0;while(n<u){Y$();let s=c.encrypt(y);for(let t=0;t<J&&n<u;t++)m[n++]=s[t]}for(let s=0;s<u;s++)m[s]^=g[s];return p=m.slice(0,f),y=m.slice(f,f+J),X$()}function H$(g,m,n){if(v){let t=g?g.length:0,l=n?n.length:0,J$=m?m.length:0,$$=new Uint8Array(t+l+J$);if(t)$$.set(g,0);if(l)$$.set(n,t);if(J$)$$.set(m,t+l);return a($$,h)}if(!g||g.length!==h)return console.error("[crypto] BUG: ctr_drbg (no-df): entropy must be exactly "+h+" bytes"),!1;let s=new Uint8Array(h);if(s.set(g),m&&m.length>0){let t=Math.min(m.length,h);for(let l=0;l<t;l++)s[l]^=m[l]}return s}function K$(g,m,n){let s=H$(g,m,n);if(s===!1)return!1;if(p.fill(0),y.fill(0),!X$())return!1;if(!Z$(B(s)))return!1;return o=1,r=!0,!0}function b(g,m){if(!r)return console.warn("[crypto] NOT READY: ctr_drbg.reseed: not instantiated"),!1;let n=H$(g,m,null);if(n===!1)return!1;if(!Z$(B(n)))return!1;return o=1,!0}function i(g,m){if(!r)return console.warn("[crypto] NOT READY: ctr_drbg.generate: not instantiated"),!1;if(!Number.isInteger(g)||g<0||g>H)return console.warn("[crypto] INVALID: ctr_drbg.generate: n must be an integer in [0, "+H+"]"),!1;if(g===0)return new Uint8Array(0);if(o>G){let l=$(h);if(l===!1)return!1;if(!b(l,m))return!1;m=null}let n;if(m&&m.length>0){let l;if(v){if(l=a(m,h),l===!1)return!1}else l=new Uint8Array(h),l.set(m.subarray(0,Math.min(h,m.length)));if(n=B(l),!Z$(n))return!1}else n=Array(u).fill(0);let s=new Uint8Array(g),t=0;while(t<g){Y$();let l=c.encrypt(y),J$=g-t;if(J$>=16)O(l,J,s,t),t+=16;else{let $$=new Uint8Array(16);O(l,J,$$,0),s.set($$.subarray(0,J$),t),t=g}}if(!Z$(n))return!1;return o++,s}function d(){p.fill(0),y.fill(0),c=null,o=0,r=!1}return{instantiate:K$,reseed:b,generate:i,uninstantiate:d,get isLive(){return r},get reseedCounter(){return o},get securityStrength(){return _},get aesKeyBits(){return _},get useDf(){return v},get seedBytes(){return h}}}let q=A("e4bc23c5089a19d86f4119cb3fa08c0a4991e0a1def17e101e4c14d9c323460a7c2fb58e0b086c6c57b55f56cae25bad"),K=A("fd85a836bba85019881e8c6bad23c9061adc75477659acaea8e4a01dfe07a1832dad1c136f59d70f8653a5dc118663d6"),L="b2cb8905c05e5950ca31895096be29ea3d5a3b82b269495554eb80fe07de43e193b9e7c3ece73b80e062b1c1f68202fbb1c52a040ea2478864295282234aaada",C=null;function A(E){let _=new Uint8Array(E.length>>>1);for(let v=0;v<_.length;v++)_[v]=parseInt(E.substring(v*2,v*2+2),16);return _}function R(E){let _="";for(let v=0;v<E.length;v++){let k=E[v];_+=(k<16?"0":"")+k.toString(16)}return _}function S(){let E=W();if(!E||E===!1)return!1;if(!E.instantiate(q))return!1;if(!E.reseed(K))return!1;if(E.generate(64)===!1)return!1;let _=E.generate(64);if(_===!1)return!1;let v=R(_);if(v!==L)return console.error("[crypto] CORRUPT: random.selfTest: CTR_DRBG KAT mismatch (got "+v+")"),!1;return!0}function x(){if(C===null)C=S();return C}let I=Object.defineProperty({fill(E){return Z(E)},float(){let E=Z(new Uint8Array(4));if(E===!1)return!1;return((E[0]<<24|E[1]<<16|E[2]<<8|E[3])>>>0)/4294967296},int(E,_){if(E>_)throw RangeError("min must be ≤ max");let v=_-E+1,k=Math.floor(4294967296/v)*v,f=new Uint8Array(4),h;do{if(Z(f)===!1)return!1;h=(f[0]<<24|f[1]<<16|f[2]<<8|f[3])>>>0}while(h>=k);return E+h%v},bytes(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.bytes expects a non-negative integer"),!1;return Z(new Uint8Array(E))},words(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.words expects a non-negative integer"),!1;let _=Z(new Uint8Array(E*4));if(_===!1)return!1;let v=Array(E);for(let k=0;k<E;k++){let f=k*4;v[k]=_[f]<<24|_[f+1]<<16|_[f+2]<<8|_[f+3]|0}return v},bits(E){if(!Number.isInteger(E)||E<0)return console.warn("[crypto] INVALID: random.bits expects a non-negative integer"),!1;let _=Math.ceil(E/32),v=I.words(_);if(v===!1)return!1;return w.clamp(v,E)},isReady(){return D},selfTest(){return C=S(),C},health:{feed(E){return F(E instanceof Uint8Array?E:new Uint8Array(E))},reset(){X()},get isDead(){return V}},drbg(E={}){if(!x())return console.error("[crypto] CORRUPT: random.drbg refused - POST failed"),!1;let _=W(E);if(_===!1)return!1;let v=$(_.seedBytes);if(v===!1)return!1;if(!_.instantiate(v,E.personalisation))return!1;let k=null;return{generate(f,h){let u=h||null;if(k!==null)u=u===null?k:(()=>{let p=new Uint8Array(k.length+u.length);return p.set(k),p.set(u,k.length),p})(),k=null;return _.generate(f,u)},reseed(f){let h=$(_.seedBytes);if(h===!1)return!1;let u=f||null;if(k!==null)u=u===null?k:(()=>{let p=new Uint8Array(k.length+u.length);return p.set(k),p.set(u,k.length),p})(),k=null;return _.reseed(h,u)},addAdditionalInput(f){if(!(f instanceof Uint8Array))if(Array.isArray(f)||f instanceof Uint32Array){let u=new Uint8Array(f.length*4);for(let p=0;p<f.length;p++){let y=f[p]|0;u[p*4]=y>>>24&255,u[p*4+1]=y>>>16&255,u[p*4+2]=y>>>8&255,u[p*4+3]=y&255}f=u}else if(typeof f==="number"){let u=f|0;f=new Uint8Array([u>>>24&255,u>>>16&255,u>>>8&255,u&255])}else return console.warn("[crypto] BUG: drbg.addAdditionalInput: unsupported data type"),!1;let h=k===null?f:(()=>{let u=new Uint8Array(k.length+f.length);return u.set(k),u.set(f,k.length),u})();if(h.length<=_.seedBytes)k=h;else{let u=N.hash(B(h.subarray(0,h.length&-4))),p=new Uint8Array(32);O(u,8,p,0),k=p}return!0},uninstantiate(){k=null,_.uninstantiate()},get isLive(){return _.isLive},get reseedCounter(){return _.reseedCounter},get securityStrength(){return _.securityStrength}}}},Symbol.for("@awacloud/fw/internal"),{value:{makeDrbg:W}});return I}};var kJ={name:"mime",version:"1.0.0",type:"fw.io.codec",dependencies:["utf8","random"],deps:[E$,vJ],factory(w,j){function N(X,Z,$){let J=Z.length,Q=X.length;if(J===0)return $;let H=Q-J;$:for(let G=$;G<=H;G++){for(let W=0;W<J;W++)if(X[G+W]!==Z[W])continue $;return G}return-1}function P(X){let Z=0;for(let Q=0;Q<X.length;Q++)Z+=X[Q].length;let $=new Uint8Array(Z),J=0;for(let Q=0;Q<X.length;Q++)$.set(X[Q],J),J+=X[Q].length;return $}function D(X){let Z=/^([^']*)'[^']*'(.*)$/.exec(X);if(!Z)return X;let $=Z[1].toLowerCase(),J=Z[2];try{if($==="utf-8"||$==="")return decodeURIComponent(J);return J.replace(/%([0-9a-fA-F]{2})/g,(Q,H)=>String.fromCharCode(parseInt(H,16)))}catch{return J}}function B(X){if(typeof X!=="string")return{value:"",params:{}};let Z={},$={},J=0,Q=X.length,H=(K)=>{let L="";while(J<Q&&K.indexOf(X[J])<0)L+=X[J],J++;return L},G=()=>{while(J<Q&&(X[J]===" "||X[J]==="\t"))J++},W=()=>{J++;let K="";while(J<Q){let L=X[J];if(L==="\\"&&J+1<Q){K+=X[J+1],J+=2;continue}if(L==='"')return J++,K;K+=L,J++}return K};G();let q=H(";").trim();while(J<Q){if(X[J]!==";"){J++;continue}J++,G();let K=H("=;").trim().toLowerCase();if(!K)continue;let L;if(X[J]==="=")if(J++,G(),X[J]==='"')L=W();else L=H(";").trim();else L="";if(K.endsWith("*"))$[K.slice(0,-1)]=D(L);else if(!(K in Z))Z[K]=L}for(let K of Object.keys($))Z[K]=$[K];return{value:q,params:Z}}let O=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function T(X,Z){if(X&&typeof X==="object")Z=X.params,X=X.value;let $=String(X||"");if(Z)for(let J of Object.keys(Z)){let Q=Z[J];if(Q===void 0||Q===null)continue;let H=String(Q);$+="; "+J+"="+(O.test(H)?H:'"'+H.replace(/\\/g,"\\\\").replace(/"/g,"\\\"")+'"')}return $}function U(X){let Z={};if(!X)return Z;let $=X.replace(/\r\n/g,`
42
45
  `).replace(/\r/g,`
43
46
  `).split(`
44
- `),Y=null;for(let U=0;U<$.length;U++){let B=$[U];if(B==="")continue;if((B[0]===" "||B[0]==="\t")&&Y){J[Y]+=" "+B.trim();continue}let z=B.indexOf(":");if(z<0)continue;let F=B.slice(0,z).trim().toLowerCase(),q=B.slice(z+1).trim();if(F in J)J[F]+=", "+q;else J[F]=q;Y=F}return J}function V(O){if(!O)return"";let J="";for(let $ of Object.keys(O)){let Y=$.replace(/(^|-)([a-z])/g,(U,B,z)=>B+z.toUpperCase());J+=Y+": "+O[$]+`\r
45
- `}return J}let Q=new Uint8Array([13,10]);function Z(O,J){if(!(O instanceof Uint8Array))throw Error("mime: decode expects Uint8Array");if(!J)throw Error("mime: boundary required");let $=C.toBytes("--"+J),Y=R(O,$,0);if(Y<0)throw Error("mime: boundary not found");let U=j([Q,$]),B=[],z=Y+$.length;while(z<O.length){if(O[z]===45&&O[z+1]===45)break;if(O[z]===13&&O[z+1]===10)z+=2;else if(O[z]===10)z+=1;let F=R(O,U,z);if(F<0)throw Error("mime: unterminated part");let q=O.subarray(z,F),D=-1;for(let N=0;N<q.length-3;N++)if(q[N]===13&&q[N+1]===10&&q[N+2]===13&&q[N+3]===10){D=N;break}let A,T;if(D>=0)A=C.fromBytes(q.subarray(0,D)),T=q.subarray(D+4);else A="",T=q;B.push({headers:X(A),body:T}),z=F+U.length}return B}function G(){let O=K.bytes(8);if(O===!1||!O)throw Error("mime: CSPRNG entropy unavailable for boundary generation");let J="";for(let $=0;$<O.length;$++){let Y=O[$];J+=(Y<16?"0":"")+Y.toString(16)}return"----FwBoundary"+J}function W(O,J){J=J||{};let $=J.boundary||G(),Y=J.type||"multipart/form-data",U=[],B=C.toBytes("--"+$+`\r
46
- `),z=C.toBytes(`\r
47
+ `),J=null;for(let Q=0;Q<$.length;Q++){let H=$[Q];if(H==="")continue;if((H[0]===" "||H[0]==="\t")&&J){Z[J]+=" "+H.trim();continue}let G=H.indexOf(":");if(G<0)continue;let W=H.slice(0,G).trim().toLowerCase(),q=H.slice(G+1).trim();if(W in Z)Z[W]+=", "+q;else Z[W]=q;J=W}return Z}function M(X){if(!X)return"";let Z="";for(let $ of Object.keys(X)){let J=$.replace(/(^|-)([a-z])/g,(Q,H,G)=>H+G.toUpperCase());Z+=J+": "+X[$]+`\r
48
+ `}return Z}let z=new Uint8Array([13,10]);function Y(X,Z){if(!(X instanceof Uint8Array))throw Error("mime: decode expects Uint8Array");if(!Z)throw Error("mime: boundary required");let $=w.toBytes("--"+Z),J=N(X,$,0);if(J<0)throw Error("mime: boundary not found");let Q=P([z,$]),H=[],G=J+$.length;while(G<X.length){if(X[G]===45&&X[G+1]===45)break;if(X[G]===13&&X[G+1]===10)G+=2;else if(X[G]===10)G+=1;let W=N(X,Q,G);if(W<0)throw Error("mime: unterminated part");let q=X.subarray(G,W),K=-1;for(let A=0;A<q.length-3;A++)if(q[A]===13&&q[A+1]===10&&q[A+2]===13&&q[A+3]===10){K=A;break}let L,C;if(K>=0)L=w.fromBytes(q.subarray(0,K)),C=q.subarray(K+4);else L="",C=q;H.push({headers:U(L),body:C}),G=W+Q.length}return H}function V(){let X=j.bytes(8);if(X===!1||!X)throw Error("mime: CSPRNG entropy unavailable for boundary generation");let Z="";for(let $=0;$<X.length;$++){let J=X[$];Z+=(J<16?"0":"")+J.toString(16)}return"----FwBoundary"+Z}function F(X,Z){Z=Z||{};let $=Z.boundary||V(),J=Z.type||"multipart/form-data",Q=[],H=w.toBytes("--"+$+`\r
49
+ `),G=w.toBytes(`\r
47
50
  --`+$+`--\r
48
- `),F=C.toBytes(`\r
51
+ `),W=w.toBytes(`\r
49
52
  --`+$+`\r
50
- `);for(let q=0;q<O.length;q++){let D=O[q];U.push(q===0?B:F),U.push(C.toBytes(V(D.headers||{})+`\r
51
- `));let A=D.body;if(typeof A==="string")U.push(C.toBytes(A));else if(A instanceof Uint8Array)U.push(A);else if(A==null);else throw Error("mime: part body must be string or Uint8Array")}if(O.length===0)U.push(C.toBytes("--"+$+`--\r
52
- `));else U.push(z);return{body:j(U),boundary:$,contentType:Y+"; boundary="+$}}return{parseHeader:P,formatHeader:M,parseHeaders:X,formatHeaders:V,encode:W,decode:Z,randomBoundary:G}}};var NJ={name:"keybindings",version:"1.0.0",type:"fw.dom.utils",dependencies:["events","eventBus"],deps:[V$,E$],factory(C,K){let R=new Set(["Escape","Tab","Enter","Space","Backspace","Delete","Insert","Home","End","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]),j={esc:"Escape",escape:"Escape",return:"Enter",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",del:"Delete",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight"},H=new Set(["ctrl","shift","alt","meta","cmd","super"]);function P(Q){let Z=Q.split("+"),G={ctrl:!1,shift:!1,alt:!1,meta:!1},W=null;for(let O of Z){let J=O.toLowerCase();if(H.has(J))if(J==="cmd"||J==="super")G.meta=!0;else G[J]=!0;else if(O.length===0)throw Error('keybindings: invalid combo segment "'+Q+'"');else{if(W!==null)throw Error('keybindings: multiple non-modifier keys in segment "'+Q+'"');let $=j[J];if($)W=$;else if(R.has(O))W=O;else if(/^[a-zA-Z0-9]$/.test(O))W=O.toLowerCase();else throw Error('keybindings: unknown key "'+O+'" in segment "'+Q+'"')}}if(W===null)throw Error('keybindings: no key specified in segment "'+Q+'"');return{modifiers:G,key:W}}function L(Q){if(typeof Q!=="string"||Q.trim().length===0)throw TypeError("keybindings: combo must be a non-empty string");let Z=Q.trim().split(" ").filter((G)=>G.length>0);if(Z.length===1)return P(Z[0]);return Z.map((G)=>P(G))}function M(Q){let Z=Q.key;if(R.has(Z))return Z;let G=j[Z.toLowerCase()];if(G)return G;let W=Q.code;if(W&&/^Key[A-Z]$/.test(W))return W.slice(3).toLowerCase();if(W&&/^Digit[0-9]$/.test(W))return W.slice(5);if(Z.length===1)return Z.toLowerCase();return null}function X(Q,Z){let{modifiers:G,key:W}=Z,O=typeof Q.getModifierState==="function"&&Q.getModifierState("AltGraph"),J=Q.ctrlKey||O,$=Q.altKey||O;if(J!==G.ctrl)return!1;if(Q.shiftKey!==G.shift)return!1;if($!==G.alt)return!1;if(Q.metaKey!==G.meta)return!1;return M(Q)===W}function V(Q={}){let Z=Q.target||document,G=typeof Q.chordTimeout==="number"?Q.chordTimeout:1500,W=K.create(),O=[],J=[],$=null,Y=!1;function U(x,_,g={}){if(typeof x!=="string")throw TypeError("keybindings.bind: combo must be a string");if(typeof _!=="function")throw TypeError("keybindings.bind: fn must be a function");let b=L(x),p=g.context||null,c=typeof g.priority==="number"?g.priority:0,s=g.preventDefault!==!1,h=g.repeat===!0,$$={combo:x,parsed:b,context:p,priority:c,preventDefault:s,repeat:h,fn:_};return O.push($$),function(){let o=O.indexOf($$);if(o!==-1)O.splice(o,1)}}function B(x,_){for(let g=O.length-1;g>=0;g--)if(O[g].combo===x){if(!_||O[g].fn===_)O.splice(g,1)}}function z(x){J.push(x)}function F(){if(J.length===0)throw RangeError("keybindings: context stack underflow");return J.pop()}function q(){return[...J]}function D(){return O.map((x)=>({combo:x.combo,context:x.context,priority:x.priority,fn:x.fn}))}function A(x){return O.filter((_)=>{let g=_.parsed;if(Array.isArray(g))return X(x,g[0]);return X(x,g)}).map((_)=>({combo:_.combo,context:_.context,priority:_.priority,fn:_.fn}))}function T(x){let _=J.length>0?J[J.length-1]:null;if(_===null)return x.filter((g)=>g.context===null);return x.filter((g)=>g.context===_)}function N(x,_){if(x.length===0)return;let g=x.reduce((p,c)=>Math.max(p,c.priority),-1/0),b=x.filter((p)=>p.priority===g);for(let p of b){if(p.preventDefault)_.preventDefault();try{p.fn(_)}catch(c){console.error("keybindings handler error:",c)}W.emit("keybindings:matched",{combo:p.combo,context:p.context,fn:p.fn})}}function w(x){if($){let{parsed:c,matched:s,timer:h,binding:$$}=$;clearTimeout(h),$=null;let t=s+1;if(X(x,c[t])){if(t===c.length-1){let o=$$;if(o.repeat||!x.repeat){if(o.preventDefault)x.preventDefault();try{o.fn(x)}catch(f){console.error("keybindings chord handler error:",f)}W.emit("keybindings:matched",{combo:o.combo,context:o.context,fn:o.fn})}}else $={parsed:c,matched:t,binding:$$,timer:setTimeout(()=>{$=null},G)};return}}let _=O.filter((c)=>{if(!Array.isArray(c.parsed))return!1;if(!X(x,c.parsed[0]))return!1;let s=J.length>0?J[J.length-1]:null;if(s===null)return c.context===null;return c.context===s});if(_.length>0){let c=_.reduce((s,h)=>h.priority>s.priority?h:s,_[0]);$={parsed:c.parsed,matched:0,binding:c,timer:setTimeout(()=>{$=null},G)};return}let g=O.filter((c)=>{if(Array.isArray(c.parsed))return!1;return X(x,c.parsed)}),p=T(g).filter((c)=>c.repeat||!x.repeat);N(p,x)}function S(){if(Y)return;Y=!0,Z.addEventListener("keydown",w)}function I(){if(!Y)return;if(Y=!1,Z.removeEventListener("keydown",w),$)clearTimeout($.timer),$=null}function v(){I(),O.length=0,J.length=0}function E(){let x=new Set;function _(...b){let p=U(...b);return x.add(p),p}function g(){for(let b of x)try{b()}catch{}x.clear()}return{bind:_,unbind:B,pushContext:z,popContext:F,dispose:g,clear:g}}return{bind:U,unbind:B,pushContext:z,popContext:F,currentContext:q,list:D,match:A,attach:S,detach:I,dispose:v,scope:E}}return{create:V,parse:L}}};var TJ={name:"gesture",version:"1.0.0",type:"fw.dom.query",dependencies:["events"],deps:[V$],factory(C){let K=0;function R(j,H={}){let P=H.tapMaxMs??250,L=H.doubletapMaxMs??300,M=H.longpressMs??500,X=H.swipeMinPx??10,V=H.swipeMaxMs??300,Q=Object.create(null);function Z(h,$$){let t=Q[h];if(!t)return;for(let o of t)o($$)}let G=new Map,W=0,O=0,J=0,$=null,Y=!1,U=0,B=0,z=0,F=0,q=0,D=0,A=0,T=0,N=!1;function w(h,$$,t,o){let f=t-h,m=o-$$;return Math.sqrt(f*f+m*m)}function S(h,$$,t,o){return Math.atan2(o-$$,t-h)*180/Math.PI}function I(){if($!==null)clearTimeout($),$=null}function v(h){G.set(h.pointerId,{startX:h.clientX,startY:h.clientY,x:h.clientX,y:h.clientY,t:Date.now()});try{j.setPointerCapture(h.pointerId)}catch(t){}let $$=G.size;if($$===1){U=h.clientX,B=h.clientY,z=h.clientX,F=h.clientY,q=0,D=0,Y=!0,Z("pan",{phase:"start",dx:0,dy:0,totalDx:0,totalDy:0,target:h.target}),I();let{clientX:t,clientY:o,target:f}=h,m=Date.now();$=setTimeout(()=>{$=null;let u=Date.now()-m;Z("longpress",{x:t,y:o,target:f,durationMs:u})},M)}if($$===2){I(),Y=!1;let t=[...G.values()];A=w(t[0].x,t[0].y,t[1].x,t[1].y),T=S(t[0].x,t[0].y,t[1].x,t[1].y),N=!0;let o=(t[0].x+t[1].x)/2,f=(t[0].y+t[1].y)/2;Z("pinch",{phase:"start",scale:1,center:{x:o,y:f},rotation:0})}}function E(h){if(!G.has(h.pointerId))return;let $$=G.get(h.pointerId);G.set(h.pointerId,{startX:$$.startX,startY:$$.startY,x:h.clientX,y:h.clientY,t:$$.t});let t=G.size;if(t===1&&Y){let o=h.clientX-z,f=h.clientY-F;if(q+=o,D+=f,z=h.clientX,F=h.clientY,w(U,B,h.clientX,h.clientY)>X)I();Z("pan",{phase:"move",dx:o,dy:f,totalDx:q,totalDy:D,target:h.target})}if(t===2&&N){let o=[...G.values()],f=w(o[0].x,o[0].y,o[1].x,o[1].y),m=S(o[0].x,o[0].y,o[1].x,o[1].y),u=A>0?f/A:1,k=m-T,y=(o[0].x+o[1].x)/2,e=(o[0].y+o[1].y)/2;Z("pinch",{phase:"move",scale:u,center:{x:y,y:e},rotation:k})}}function x(h){let $$=G.get(h.pointerId);if(!$$)return;let t=Date.now(),o=t-$$.t,f=h.clientX-$$.startX,m=h.clientY-$$.startY,u=w($$.startX,$$.startY,h.clientX,h.clientY),k=G.size;if(k===2&&N){N=!1;let y=[...G.values()],e=y.length>=2?(y[0].x+y[1].x)/2:h.clientX,Q$=y.length>=2?(y[0].y+y[1].y)/2:h.clientY,Z$=y.length>=2?w(y[0].x,y[0].y,y[1].x,y[1].y):0,a=A>0?Z$/A:1;Z("pinch",{phase:"end",scale:a,center:{x:e,y:Q$},rotation:0}),G.delete(h.pointerId);return}if(G.delete(h.pointerId),I(),k===1){if(Y)Z("pan",{phase:"end",dx:0,dy:0,totalDx:q,totalDy:D,target:h.target}),Y=!1;if(u>=X&&o<=V){let y=Math.abs(f),e=Math.abs(m),Q$;if(y>=e)Q$=f>0?"right":"left";else Q$=m>0?"down":"up";let Z$=o>0?u/o:0;Z("swipe",{direction:Q$,distance:u,velocityPxPerMs:Z$,startX:$$.startX,startY:$$.startY,endX:h.clientX,endY:h.clientY})}else if(u<X&&o<=P){Z("tap",{x:h.clientX,y:h.clientY,target:h.target});let y=t-W,e=w(O,J,h.clientX,h.clientY);if(y<=L&&e<X*3)Z("doubletap",{x:h.clientX,y:h.clientY,target:h.target}),W=0;else W=t,O=h.clientX,J=h.clientY}}}function _(h){if(I(),Y&&G.size===1)Y=!1,Z("pan",{phase:"end",dx:0,dy:0,totalDx:q,totalDy:D,target:h.target});if(N)N=!1;G.delete(h.pointerId)}let g=`gesture:${++K}`,b=C.scope(g);b.on("pointerdown",j,"pointerdown",v),b.on("pointermove",j,"pointermove",E),b.on("pointerup",j,"pointerup",x),b.on("pointercancel",j,"pointercancel",_);function p(h,$$){if(!Q[h])Q[h]=new Set;return Q[h].add($$),()=>c(h,$$)}function c(h,$$){if(Q[h])Q[h].delete($$)}function s(){I(),b.clear();for(let h of Object.keys(Q))delete Q[h];G.clear(),Y=!1,N=!1}return{on:p,off:c,detach:s,dispose:s}}return{attach:R}}};var wJ={name:"fullscreen",type:"fw.dom.display",dependencies:[],factory(){let C=!1,K={map:[],list:{}},R=null,j=null;function H(){return!!(document.fullscreenEnabled??document.webkitFullscreenEnabled)}function P(){return!!(document.fullscreenElement??document.webkitFullscreenElement)}function L(W){if(W.requestFullscreen)return W.requestFullscreen();if(W.webkitRequestFullscreen)return W.webkitRequestFullscreen();return Promise.reject(Error("Fullscreen API not supported"))}function M(){if(!P())return Promise.resolve();if(document.exitFullscreen)return document.exitFullscreen();if(document.webkitExitFullscreen)return document.webkitExitFullscreen();return Promise.reject(Error("Fullscreen API not supported"))}function X(W){if(W instanceof Event)return W.currentTarget||W.target||document.documentElement;if(W instanceof Element)return W;return document.documentElement}function V(){C=P();for(let W=0;W<K.map.length;W++)K.list[K.map[W]](C)}function Q(){if(R)return;R=V,j="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",document.addEventListener(j,R,!1)}function Z(){if(!R)return;document.removeEventListener(j,R,!1),R=null,j=null}let G={};return G.isSupported=function(){return H()},G.isFullscreen=function(){return C},G.enter=function(W){return L(X(W))},G.exit=function(){return M()},G.toggle=function(W){return C?G.exit():G.enter(W)},G.listen={add(W,O){if(K.map.indexOf(W)<0)K.map.push(W);K.list[W]=O,Q()},del(W){let O=K.map.indexOf(W);if(O>-1)K.map.splice(O,1),delete K.list[W];if(K.map.length===0)Z()}},G.dispose=function(){K.map.length=0;for(let W of Object.keys(K.list))delete K.list[W];Z()},G}};var SJ={name:"idle",type:"fw.dom.lifecycle",dependencies:[],worker:!1,factory(){function C(){return typeof IdleDetector<"u"}async function K(){if(!C())return"denied";return IdleDetector.requestPermission()}async function R({threshold:H=60000}={}){if(!C())throw Error("idle: IdleDetector not supported - use fallback()");let P=new IdleDetector,L=new Set;return P.addEventListener("change",()=>{let M={userState:P.userState,screenState:P.screenState};L.forEach((X)=>X(M))}),{get userState(){return P.userState},get screenState(){return P.screenState},onChange(M){return L.add(M),()=>L.delete(M)},async start(){await P.start({threshold:H})},stop(){P.stop(),L.clear()}}}function j({threshold:H=60000,events:P=["mousemove","keydown","touchstart"]}={}){let L="active",M=null,X=new Set,V=!1;function Q(){X.forEach((W)=>W({userState:L}))}function Z(){if(M!==null)clearTimeout(M);if(L!=="active")L="active",Q();M=setTimeout(()=>{L="idle",M=null,Q()},H)}function G(){Z()}return{get userState(){return L},onChange(W){return X.add(W),()=>X.delete(W)},start(){if(V)return;V=!0,P.forEach((W)=>window.addEventListener(W,G)),Z()},stop(){if(V=!1,P.forEach((W)=>window.removeEventListener(W,G)),M!==null)clearTimeout(M),M=null;X.clear()}}}return{isSupported:C,requestPermission:K,create:R,fallback:j}}};var EJ={name:"lruCache",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function C({maxSize:K,onEvict:R,snapshot:j}={}){if(!Number.isInteger(K)||K<1)throw Error("lruCache: maxSize must be an integer >= 1");let H={key:null,value:null,prev:null,next:null},P={key:null,value:null,prev:null,next:null};H.next=P,P.prev=H;let L=new Map;function M(z){z.prev.next=z.next,z.next.prev=z.prev}function X(z){z.next=H.next,z.prev=H,H.next.prev=z,H.next=z}function V(){let z=P.prev;if(M(z),L.delete(z.key),typeof R==="function")R(z.key,z.value)}function Q(z){let F=L.get(z);if(!F)return;return M(F),X(F),F.value}function Z(z,F){if(L.has(z)){let D=L.get(z);D.value=F,M(D),X(D);return}let q={key:z,value:F,prev:null,next:null};if(L.set(z,q),X(q),L.size>K)V()}function G(z){return L.has(z)}function W(z){return L.get(z)?.value}function O(z){let F=L.get(z);if(!F)return!1;if(M(F),L.delete(z),typeof R==="function")R(z,F.value);return!0}function J(){if(typeof R==="function"){let z=H.next;while(z!==P)R(z.key,z.value),z=z.next}H.next=P,P.prev=H,L.clear()}function*$(){let z=H.next;while(z!==P)yield z.key,z=z.next}function*Y(){let z=H.next;while(z!==P)yield z.value,z=z.next}function*U(){let z=H.next;while(z!==P)yield[z.key,z.value],z=z.next}function B(){let z=[],F=H.next;while(F!==P)z.push([F.key,F.value]),F=F.next;return{maxSize:K,entries:z}}if(j!==void 0){if(j.maxSize!==K)throw Error("lruCache: snapshot.maxSize mismatch");if(j.entries.length>K)throw Error("lruCache: snapshot exceeds maxSize");for(let z=j.entries.length-1;z>=0;z--){let[F,q]=j.entries[z],D={key:F,value:q,prev:null,next:null};L.set(F,D),X(D)}}return{get:Q,set:Z,has:G,peek:W,delete:O,clear:J,keys:$,values:Y,entries:U,snapshot:B,get size(){return L.size},get maxSize(){return K}}}return{create:C}}};var IJ={name:"ringBuffer",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function C({capacity:K,storage:R,snapshot:j}={}){if(!Number.isInteger(K)||K<1)throw Error("ringBuffer: capacity must be an integer >= 1");if(R!==void 0){let $=Array.isArray(R),Y=ArrayBuffer.isView(R)&&!(R instanceof DataView);if(!$&&!Y)throw Error("ringBuffer: storage must be Array or TypedArray");if(R.length<K)throw Error("ringBuffer: storage length must be >= capacity")}if(j!==void 0){if(j.capacity!==K)throw Error("ringBuffer: snapshot.capacity mismatch");if(!Number.isInteger(j.size)||j.size<0)throw Error("ringBuffer: snapshot.size must be a non-negative integer");if(j.size>K)throw Error("ringBuffer: snapshot.size exceeds capacity");if(!Array.isArray(j.data)||j.data.length<j.size)throw Error("ringBuffer: snapshot.data length must be >= snapshot.size")}let H=R!==void 0?R:Array(K),P=0,L=0;if(j!==void 0){L=j.size,P=0;for(let $=0;$<L;$++)H[$]=j.data[$]}function M($){let Y=(P+L)%K;if(H[Y]=$,L<K)L++;else P=(P+1)%K}function X(){if(L===0)return;let $=H[P];if(Array.isArray(H))H[P]=void 0;else H[P]=0;return P=(P+1)%K,L--,$}function V(){if(L===0)return;let $=(P+L-1)%K,Y=H[$];if(Array.isArray(H))H[$]=void 0;else H[$]=0;return L--,Y}function Q(){return L===0?void 0:H[P]}function Z(){return L===0?void 0:H[(P+L-1)%K]}function G($){if($<0||$>=L)return;return H[(P+$)%K]}function W(){let $=[];for(let Y=0;Y<L;Y++)$.push(H[(P+Y)%K]);return $}function O(){if(P=0,L=0,Array.isArray(H))H.fill(void 0);else H.fill(0)}function J(){let $=[];for(let Y=0;Y<L;Y++)$.push(H[(P+Y)%K]);return{capacity:K,size:L,data:$}}return{push:M,shift:X,pop:V,peek:Q,peekLast:Z,peekAt:G,toArray:W,clear:O,snapshot:J,get size(){return L},get capacity(){return K},get isFull(){return L===K},get isEmpty(){return L===0}}}return{create:C}}};var xJ={name:"trie",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function C({snapshot:K}={}){let R={children:new Map,value:void 0,isEnd:!1},j=0;function H(O,J=!0){let $=R;for(let Y of O){if(!$.children.has(Y))$.children.set(Y,{children:new Map,value:void 0,isEnd:!1});$=$.children.get(Y)}if(!$.isEnd)j++;$.value=J,$.isEnd=!0}function P(O){let J=R;for(let $ of O){if(!J.children.has($))return null;J=J.children.get($)}return J}function L(O){let J=P(O);return J!==null&&J.isEnd}function M(O){let J=P(O);return J&&J.isEnd?J.value:void 0}function X(O){return P(O)!==null}function V(O,J=1/0){let $=P(O);if(!$)return[];let Y=[];function U(B,z){if(Y.length>=J)return;if(B.isEnd)Y.push({key:z,value:B.value});for(let[F,q]of B.children){if(Y.length>=J)return;U(q,z+F)}}return U($,O),Y}function Q(O){let J=!1,$=[...O];function Y(U,B){if(B===$.length){if(!U.isEnd)return!1;return J=!0,U.isEnd=!1,U.value=void 0,j--,U.children.size===0}let z=$[B],F=U.children.get(z);if(!F)return!1;if(Y(F,B+1))U.children.delete(z);return!U.isEnd&&U.children.size===0}return Y(R,0),J}function*Z(){function*O(J,$){if(J.isEnd)yield $;for(let[Y,U]of J.children)yield*O(U,$+Y)}yield*O(R,"")}function G(){R.children.clear(),j=0}function W(){let O=[];function J($,Y){if($.isEnd)O.push([Y,$.value]);for(let[U,B]of $.children)J(B,Y+U)}return J(R,""),{entries:O}}if(K!==void 0&&K!==null)for(let[O,J]of K.entries)H(O,J);return{insert:H,has:L,get:M,hasPrefix:X,search:V,delete:Q,keys:Z,clear:G,snapshot:W,get size(){return j}}}return{create:C}}};var _J={name:"treeWalker",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function C(Z,G){let W=Error(G);return W.name="ContractError",W.code=Z,W}class K{constructor(Z){this.current=Z,this.root=Z,this.entering=!0}next(){let Z=this.current;if(Z===null)return null;let G=this.entering,W=Z.firstChild!=null;if(G&&W)this.current=Z.firstChild,this.entering=!0;else if(Z===this.root)this.current=null;else if(Z.next==null)this.current=Z.parent,this.entering=!1;else this.current=Z.next,this.entering=!0;return{node:Z,entering:G}}resumeAt(Z,G){this.current=Z,this.entering=G===!0}}function R(Z){if(Z==null)throw TypeError("createWalker: root node required");return new K(Z)}function*j(Z){if(Z==null)throw TypeError("walk: root node required");let G=new K(Z),W;while((W=G.next())!==null)yield W}function H(Z,G){if(Z==null)throw TypeError("findFirst: root node required");if(typeof G!=="function")throw TypeError("findFirst: predicate must be a function");let W=new K(Z),O;while((O=W.next())!==null)if(O.entering&&G(O.node))return O.node;return null}function P(Z,G){if(Z==null)throw TypeError("findAll: root node required");if(typeof G!=="function")throw TypeError("findAll: predicate must be a function");let W=[],O=new K(Z),J;while((J=O.next())!==null)if(J.entering&&G(J.node))W.push(J.node);return W}function L(Z,G){if(!Z||!G)throw TypeError("replaceNode: both args required");if(!Z.parent)throw C("tw/replace-node-no-parent","replaceNode: oldNode has no parent");return Z.insertBefore(G),Z.unlink(),G}function M(Z,G){if(!Z)throw TypeError("wrapNode: node required");if(typeof G!=="function")throw TypeError("wrapNode: wrapperFactory must be a function");if(!Z.parent)throw C("tw/wrap-node-no-parent","wrapNode: node has no parent");let W=G(Z);if(!W)throw TypeError("wrapNode: wrapperFactory must return a wrapper node");return Z.insertBefore(W),Z.unlink(),W.appendChild(Z),W}function X(Z){if(!Z)throw TypeError("flattenNode: node required");if(!Z.parent)throw C("tw/flatten-node-no-parent","flattenNode: node must have a parent");let G=Z.firstChild,W=Z;while(G){let O=G.next;G.unlink(),W.insertAfter(G),W=G,G=O}Z.unlink()}function V(Z,G=!0){if(!Z)throw TypeError("cloneNode: node required");let W=Object.create(Object.getPrototypeOf(Z),Object.getOwnPropertyDescriptors(Z));if(W.parent=null,W.prev=null,W.next=null,W.firstChild=null,W.lastChild=null,G){let O=Z.firstChild;while(O)W.appendChild(V(O,!0)),O=O.next}return W}function Q(Z,G,W){if(Z==null)return;if(typeof G!=="function")throw TypeError("walkVisit: visitor must be a function");let O=W&&Array.isArray(W.nodeTypes)?W.nodeTypes:null,J=new Set,$=[{node:Z,entering:!0}];while($.length>0){let{node:Y,entering:U}=$.pop();if(U){if(J.has(Y))throw C("tree-walker/cycle","walkVisit: cycle detected in tree");J.add(Y)}let B=Y.firstChild!=null,z=!1;if(!O||O.includes(Y.type)){let F=G(Y,U);if(U&&F===!1)z=!0}if(U&&B&&!z){$.push({node:Y,entering:!1});let F=[],q=Y.firstChild;while(q)F.push(q),q=q.next;for(let D=F.length-1;D>=0;D--)$.push({node:F[D],entering:!0})}else if(U&&B&&z){if(!O||O.includes(Y.type))G(Y,!1)}}}return{createWalker:R,walk:j,walkVisit:Q,findFirst:H,findAll:P,replaceNode:L,wrapNode:M,flattenNode:X,cloneNode:V}}};var fJ={name:"queue",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let C={PROCESSING:1,EOF:2,CLOSING:4,CLOSED:8},K=C.CLOSED|C.CLOSING;class R{constructor(j){if(arguments.length>1)throw Error("too many arguments");this.concurrency=R.parseConcurrency(j),this.length=0,this.running=0,this.error=void 0,this.stopped=!1,this._flags=0,this._array=[],this._callbackBound=(H)=>{this._callback(H)}}concat(j){if(!j||j.constructor!==Array)throw Error("jobs must be an Array");for(let H=0,P=j.length;H<P;H++)this.push(j[H])}end(j){if(this._flags&C.EOF)return;if(this._flags|=C.EOF,this._flags&K)return;this._tick(j)}onData(j,H){throw Error("Queue.onData callback must be defined")}onEnd(j){throw Error("Queue.onEnd callback must be defined")}push(j){if(this._flags&C.EOF)throw Error("Queue.push() was called after Queue.end()");if(this._flags&K)return;if(this._array.push(j),this.length++,!(this._flags&C.PROCESSING))this._process()}stop(j){if(this._flags&K)return;if(!j)this._flags|=C.CLOSING;this.stopped=!0,this._tick(j)}_callback(j){if(this._flags&C.CLOSED)throw Error("an onData handler called end() more than once");this.length--,this.running--,this._tick(j)}_process(){if(this._flags&K)return;if(this._flags&C.PROCESSING)return;this._flags|=C.PROCESSING;while(this._array.length){if(this._flags&K||this.running>=this.concurrency){this._flags&=~C.PROCESSING;return}this.running++,this.onData(this._array.shift(),this._callbackBound)}this._flags&=~C.PROCESSING}_tick(j){if(this._flags&C.CLOSED)return;if(j&&!(this._flags&C.CLOSING))this._flags|=C.CLOSING,this.error=j;if(this._flags&C.CLOSING)if(this.running===0){this._flags|=C.CLOSED,this.onEnd(this.error);return}else return;if(this._flags&C.EOF&&this.length===0){this._flags|=C.CLOSED,this.onEnd(void 0);return}this._process()}static parseConcurrency(j){if(j===void 0)return 1;if(j===!1)return 1;if(j===!0)return 1024;if(typeof j!=="number")throw Error("concurrency must be a number");if(Math.floor(j)!==j)throw Error("concurrency must be an integer");if(j<1)throw Error("concurrency must be at least 1");return j}}return R}};var kJ={name:"bitmap",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let C=[];for(let H=0;H<256;H++){C[H]=[];for(let P=0;P<8;P++)C[H].push(H>>P&1)}return{bytesToBits:function(H,P=[]){for(let L=0;L<H.length;L++)P.push(...C[H[L]]);return P},bitsToBytes:function(H,P=!1){if(P&&(H.length&7)!==0)throw Error("bitsToBytes expects a bit array length that is a multiple of 8");let L=new Uint8Array(H.length>>3);for(let M=0;M<H.length;M+=8)L[M>>3]=H[M]+(H[M+1]<<1)+(H[M+2]<<2)+(H[M+3]<<3)+(H[M+4]<<4)+(H[M+5]<<5)+(H[M+6]<<6)+(H[M+7]<<7);return L},padBitsToByte:function(H,P=0){let L=8-(H.length&7);if(L<8)for(let M=0;M<L;M++)H.push(P);return H}}}};var vJ={name:"interp",version:"1.0.0",type:"fw.io.math",dependencies:[],factory(){function C(W,O,J){return W+J*(O-W)}function K(W,O,J){let $=Math.max(0,Math.min(1,(J-W)/(O-W)));return $*$*(3-2*$)}function R(W,O,J){let $=Math.max(0,Math.min(1,(J-W)/(O-W)));return $*$*$*($*($*6-15)+10)}function j(W,O,J,$,Y){let U=Y*Y,B=U*Y;return(2*B-3*U+1)*W+(B-2*U+Y)*J+(-2*B+3*U)*O+(B-U)*$}function H(W,O,J,$,Y,U=0.5){function B(E,x){return Math.abs(x-E)}function z(E,x,_){return E+Math.pow(B(x,_)||0.0000000001,U)}let F=0,q=z(F,W,O),D=z(q,O,J),A=z(D,J,$),T=C(q,D,Y),N=C(W,O,(T-F)/(q-F||0.0000000001)),w=C(O,J,(T-q)/(D-q||0.0000000001)),S=C(J,$,(T-D)/(A-D||0.0000000001)),I=C(N,w,(T-F)/(D-F||0.0000000001)),v=C(w,S,(T-q)/(A-q||0.0000000001));return C(I,v,(T-q)/(D-q||0.0000000001))}function P(W,O,J,$){let Y=1-$;return Y*Y*W+2*Y*$*O+$*$*J}function L(W,O,J,$,Y){let U=1-Y,B=U*U,z=Y*Y;return B*U*W+3*B*Y*O+3*U*z*J+z*Y*$}function M(W,O,J,$,Y,U){return W*(1-Y)*(1-U)+O*Y*(1-U)+J*(1-Y)*U+$*Y*U}function X(W,O,J){let $=[0,1,2,3].map((Y)=>{let U=W[Y];return H(U[0],U[1],U[2],U[3],O)});return H($[0],$[1],$[2],$[3],J)}function V(W,O,J,$){if(W.length!==O.length||W.length!==J.length)throw Error("interp: vec dimension mismatch");for(let Y=0;Y<W.length;Y++)W[Y]=O[Y]+$*(J[Y]-O[Y]);return W}function Q(W,O,J,$){let Y=J.x-O.x,U=J.y-O.y,B=$.x-O.x,z=$.y-O.y,F=W.x-O.x,q=W.y-O.y,D=Y*Y+U*U,A=Y*B+U*z,T=B*B+z*z,N=F*Y+q*U,w=F*B+q*z,S=D*T-A*A;if(Math.abs(S)<0.000000000001)throw Error("interp.barycentric: degenerate triangle (collinear or coincident vertices)");let I=(T*N-A*w)/S,v=(D*w-A*N)/S;return{u:1-I-v,v:I,w:v}}function Z(W,O){let J=W.length;if(J===1)return W[0];let $=O*(J-1),Y=Math.max(0,Math.min(J-2,Math.floor($)));return C(W[Y],W[Y+1],$-Y)}function G(W,O,J,$,Y){let U=$*(O-1),B=Y*(J-1),z=Math.max(0,Math.min(O-2,Math.floor(U))),F=Math.max(0,Math.min(J-2,Math.floor(B))),q=U-z,D=B-F,A=W[F*O+z],T=W[F*O+z+1],N=W[(F+1)*O+z],w=W[(F+1)*O+z+1];return M(A,T,N,w,q,D)}return{linear:C,smoothstep:K,smootherstep:R,cubicHermite:j,catmullRom:H,bezier2:P,bezier3:L,bilinear:M,bicubic:X,vec:V,barycentric:Q,sample:Z,sample2D:G}}};var gJ={name:"scheduler",dependencies:[],factory(){let C={minute:{min:0,max:59},hour:{min:0,max:23},day:{min:1,max:31},month:{min:1,max:12},weekday:{min:0,max:6}};function K(P,L){let{min:M,max:X}=C[L],V=new Set;for(let Q of P.split(",")){let Z=Q.match(/^(.+)\/(\d+)$/),G=1,W=Q;if(Z){if(G=parseInt(Z[2],10),G<=0)throw Error(`scheduler: invalid cron expression - field ${L}: step must be > 0`);W=Z[1]}let O,J;if(W==="*")O=M,J=X;else if(/^\d+-\d+$/.test(W))[O,J]=W.split("-").map(Number);else if(/^\d+$/.test(W))O=J=parseInt(W,10);else throw Error(`scheduler: invalid cron expression - field ${L}: invalid token '${W}'`);if(!Number.isInteger(O)||!Number.isInteger(J)||O<M||J>X||O>J)throw Error(`scheduler: invalid cron expression - field ${L}: value out of range ${M}-${X}`);for(let $=O;$<=J;$+=G)V.add($)}return V}function R(P){let L=P.trim().split(/\s+/);if(L.length!==5){let B=L.length>5?"scheduler: invalid cron expression - seconds field not supported (expected 5 fields)":"scheduler: invalid cron expression - expected 5 fields";throw Error(B)}let[M,X,V,Q,Z]=L,G={minute:K(M,"minute"),hour:K(X,"hour"),day:K(V,"day"),month:K(Q,"month"),weekday:K(Z,"weekday")},W=V==="*",O=Z==="*";function J(B){let z=B.getDate(),F=B.getDay();if(!W&&!O)return G.day.has(z)||G.weekday.has(F);if(!W)return G.day.has(z);if(!O)return G.weekday.has(F);return!0}function $(B){return G.month.has(B.getMonth()+1)&&J(B)&&G.hour.has(B.getHours())&&G.minute.has(B.getMinutes())}function Y(B){let z=B?new Date(B):new Date;z.setSeconds(0,0),z.setMinutes(z.getMinutes()+1);let F=z.getTime()+157788000000,q=new Date(z);while(q.getTime()<=F){if(!G.month.has(q.getMonth()+1)){q.setMonth(q.getMonth()+1,1),q.setHours(0,0,0,0);continue}if(!J(q)){q.setDate(q.getDate()+1),q.setHours(0,0,0,0);continue}if(!G.hour.has(q.getHours())){q.setHours(q.getHours()+1,0,0,0);continue}if(!G.minute.has(q.getMinutes())){q.setMinutes(q.getMinutes()+1,0,0);continue}return new Date(q)}throw Error("scheduler: no firing in 5y horizon")}function U(B,z){let F=[],q=z;for(let D=0;D<B;D++){let A=Y(q);F.push(A),q=A}return F}return{expression:P,next:Y,nextN:U,matches:$,fields:{minute:G.minute,hour:G.hour,day:G.day,month:G.month,weekday:G.weekday}}}function j(P,L){if(typeof P!=="function")throw Error("scheduler: callback must be a function");if(typeof L!=="number"||!isFinite(L)||L<=0)throw Error("scheduler: ms must be a positive number");let M=null;function X(){if(M!==null)return;M=setInterval(()=>{try{P()}catch(Q){console.error(Q)}},L)}function V(){if(M===null)return;clearInterval(M),M=null}return{start:X,stop:V,get running(){return M!==null}}}function H(P,L){if(typeof L!=="function")throw Error("scheduler: callback must be a function");let M=R(P),X=null,V=null,Q=!0;function Z(){if(Q)return;V=M.next();let O=Math.max(0,V.getTime()-Date.now());X=setTimeout(()=>{if(X=null,Q)return;try{L()}catch(J){console.error(J)}if(Q)return;Z()},O)}function G(){if(!Q)return;Q=!1,Z()}function W(){if(Q=!0,X!==null)clearTimeout(X),X=null;V=null}return{start:G,stop:W,get running(){return!Q},get next(){return V},get expression(){return P}}}return{cron:R,interval:j,job:H}}};var hJ={name:"broadcastChannel",type:"fw.dom.net",dependencies:[],factory(){function C(){return typeof BroadcastChannel<"u"||typeof globalThis.BroadcastChannel<"u"}function K(R){let j=typeof BroadcastChannel<"u"?BroadcastChannel:globalThis.BroadcastChannel;if(!j)throw Error("broadcastChannel: BroadcastChannel is not available in this environment");let H=new j(R),P=R,L=new Set;H.onmessage=(Z)=>{for(let G of L)try{G(Z.data,Z)}catch(W){console.error("broadcastChannel listener error:",W)}};function M(Z){H.postMessage(Z)}function X(Z){return L.add(Z),()=>L.delete(Z)}function V(Z){L.delete(Z)}function Q(){if(!H)return;L.clear(),H.onmessage=null,H.close(),H=null}return{post:M,on:X,off:V,close:Q,get name(){return H?H.name:P}}}return{create:K,isSupported:C}}};var yJ={name:"storage",version:"1.0.0",type:"fw.dom.fs",dependencies:["broadcastChannel"],deps:[hJ],factory(C){let K={crossTab:!0,namespace:""};function R({crossTab:Q,namespace:Z}={}){if(L()>0)throw Error("storage: configure must be called before any listen.add");if(Z!==void 0){if(typeof Z!=="string"||Z.includes(":"))throw Error('storage: namespace must be a string without ":"');K.namespace=Z}if(Q!==void 0){if(typeof Q!=="boolean")throw Error("storage: crossTab must be a boolean");K.crossTab=Q}}function j(Q){try{return Q.setItem("__probe__","__probe__"),Q.removeItem("__probe__"),!0}catch{return!1}}function H(Q){try{return JSON.parse(Q)}catch{return Q}}let P=null;function L(){if(!P)return 0;return P.map.length}function M(Q,Z){let G={map:[],list:{}};if(Z==="local")P=G;let W=!1,O=null;function J(F,q,D,A){let T={type:F,key:q,value:D,cross:A};for(let N=0;N<G.map.length;N++)G.list[G.map[N]](T)}function $(F){if(F.storageArea!==Q)return;if(F.key===null)J("clear",null,null,!0);else if(F.newValue===null)J("del",F.key,null,!0);else J("set",F.key,H(F.newValue),!0)}function Y(){return K.namespace?`storage:${K.namespace}:local`:"storage:local"}function U(){if(Z!=="local")return;if(!K.crossTab)return;if(C.isSupported())O=C.create(Y()),O.on((F)=>J(F.type,F.key,F.value,!0));else window.addEventListener("storage",$,!1),W=!0}function B(){if(Z!=="local")return;if(O)O.close(),O=null;else if(W)window.removeEventListener("storage",$,!1),W=!1}function z(F,q,D){if(Z==="local"&&O)O.post({type:F,key:q,value:D})}return{set(F,q){Q.setItem(F,JSON.stringify(q)),J("set",F,q,!1),z("set",F,q)},get(F){let q=Q.getItem(F);return q===null?null:H(q)},has(F){return Q.getItem(F)!==null},del(F){Q.removeItem(F),J("del",F,null,!1),z("del",F,null)},clear(){Q.clear(),J("clear",null,null,!1),z("clear",null,null)},keys(){let F=[];for(let q=0;q<Q.length;q++)F.push(Q.key(q));return F},get length(){return Q.length},listen:{add(F,q){let D=G.map.length===0;if(G.map.indexOf(F)<0)G.map.push(F);if(G.list[F]=q,D&&G.map.length===1)U()},del(F){let q=G.map.indexOf(F);if(q>-1){if(G.map.splice(q,1),delete G.list[F],G.map.length===0)B()}}}}}let X=typeof localStorage<"u"&&j(localStorage)?M(localStorage,"local"):null,V=typeof sessionStorage<"u"&&j(sessionStorage)?M(sessionStorage,"session"):null;return{local:X,session:V,isSupported(){return X!==null||V!==null},configure:R}}};var bJ={name:"download",version:"1.0.0",type:"fw.dom.fs",dependencies:[],factory(){function C(K,R,j){let H=document.createElement("a");if(H.href=K,H.download=R,document.body.appendChild(H),H.click(),document.body.removeChild(H),j)URL.revokeObjectURL(K)}return{url(K,R){C(K,R,!1)},blob(K,R){C(URL.createObjectURL(K),R,!0)},bytes(K,R,j="application/octet-stream"){this.blob(new Blob([K],{type:j}),R)},text(K,R,j="text/plain;charset=utf-8"){this.blob(new Blob([K],{type:j}),R)}}}};var uJ={name:"clipboard",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let C=typeof navigator<"u"?navigator:null,K=C?.clipboard??null,R=!!(K&&typeof K.writeText==="function"),j=!!(K&&typeof K.readText==="function"),H=!!(C&&typeof C.share==="function");return{isSupported(){return{read:j,write:R,share:H}},set(P){return K.writeText(P)},get(){return K.readText()},share(P={}){return C.share(P)}}}};var mJ={name:"ua",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let C=typeof navigator<"u"?navigator.userAgent||navigator.vendor||"":"",K=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,R=/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,j=K.test(C)||R.test(C.substring(0,4)),H=C.toLowerCase(),P=/iphone|ipad|ipod/.test(H)?"ios":/android/.test(H)?"android":/windows/.test(H)?"windows":/macintosh|mac os x/.test(H)?"mac":/linux/.test(H)?"linux":"unknown";return{string(){return C},mobile(){return j},touch(){return typeof window<"u"&&"ontouchstart"in window||typeof navigator<"u"&&navigator.maxTouchPoints>0},platform(){return P}}}};var pJ={name:"uuid",dependencies:["hex"],deps:[g$],factory(C){let K=new Uint8Array(16),R,j,H=0,P=0;function L(Q,Z){let G=C.fromBytes(Q);if(Z==="rfc4122")return G.slice(0,8)+"-"+G.slice(8,12)+"-"+G.slice(12,16)+"-"+G.slice(16,20)+"-"+G.slice(20,32);return G}function M(Q,Z){if(Q!==!1&&typeof Q==="function"){let G=Z.slice(0),W=Q(Z);if(W instanceof Uint8Array&&W.length>=16)return W;if(W===void 0||W===null||W===Z){for(let O=0;O<16;O++)if(Z[O]!==G[O])return Z}}return crypto.getRandomValues(Z)}return{v1:function(Q=!1,Z=!1,G="compact"){let W=0,O=K,J=R,$=j;if(J==null||$==null){let q=M(Z,K);if(J==null)J=R=[q[0]|1,q[1],q[2],q[3],q[4],q[5]];if($==null)$=j=(q[6]<<8|q[7])&16383}let Y=Date.now(),U=P+1,B=Y-H+(U-P)/1e4;if(B<0)$=$+1&16383;if(B<0||Y>H)U=0;else if(U>=1e4)$=$+1&16383,U=0;H=Y,P=U,j=$,Y+=12219292800000;let z=((Y&268435455)*1e4+U)%4294967296;O[W++]=z>>>24&255,O[W++]=z>>>16&255,O[W++]=z>>>8&255,O[W++]=z&255;let F=Y/4294967296*1e4&268435455;O[W++]=F>>>8&255,O[W++]=F&255,O[W++]=F>>>24&15|16,O[W++]=F>>>16&255,O[W++]=$>>>8|128,O[W++]=$&255;for(let q=0;q<6;++q)O[W+q]=J[q];return Q?K.slice(0):L(K,G)},v4:function(Q=!1,Z=!1,G="compact"){let W=M(Z,K);return W[6]=W[6]&15|64,W[8]=W[8]&63|128,Q?W.slice(0,16):L(W,G)}}}};var u$={DEV:!1,LOG:!0},cJ=u$.LOG?p$.main(u$.DEV):!1,c$=new w$;c$.registerAllDeep([r$,E$,I$,s$,a$,t$,x$,F$,V$,e$,$J,JJ,ZJ,QJ,A$,f$,N$,XJ,q$,k$,v$,g$,YJ,T$,zJ,GJ,HJ,UJ,WJ,VJ,KJ,qJ,DJ,MJ,y$,LJ,OJ,h$,PJ,jJ,AJ,NJ,TJ,wJ,SJ,EJ,IJ,xJ,_J,fJ,kJ,_$,vJ,gJ,yJ,bJ,uJ,mJ,pJ]);var iJ=n$(u$,c$,i$,cJ,p$.worker.toString()),nJ=o$(),oJ={ENV:u$,log:cJ,runtime:c$,createWorker:iJ,domReady:nJ},zQ=oJ;export{zQ as default};
53
+ `);for(let q=0;q<X.length;q++){let K=X[q];Q.push(q===0?H:W),Q.push(w.toBytes(M(K.headers||{})+`\r
54
+ `));let L=K.body;if(typeof L==="string")Q.push(w.toBytes(L));else if(L instanceof Uint8Array)Q.push(L);else if(L==null);else throw Error("mime: part body must be string or Uint8Array")}if(X.length===0)Q.push(w.toBytes("--"+$+`--\r
55
+ `));else Q.push(G);return{body:P(Q),boundary:$,contentType:J+"; boundary="+$}}return{parseHeader:B,formatHeader:T,parseHeaders:U,formatHeaders:M,encode:F,decode:Y,randomBoundary:V}}};var fJ={name:"keybindings",version:"1.0.0",type:"fw.dom.utils",dependencies:["events","eventBus"],deps:[L$,f$],factory(w,j){let N=new Set(["Escape","Tab","Enter","Space","Backspace","Delete","Insert","Home","End","PageUp","PageDown","ArrowUp","ArrowDown","ArrowLeft","ArrowRight","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]),P={esc:"Escape",escape:"Escape",return:"Enter",enter:"Enter",tab:"Tab",space:"Space",backspace:"Backspace",del:"Delete",delete:"Delete",insert:"Insert",home:"Home",end:"End",pageup:"PageUp",pagedown:"PageDown",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",arrowup:"ArrowUp",arrowdown:"ArrowDown",arrowleft:"ArrowLeft",arrowright:"ArrowRight",plus:"Plus",minus:"Minus",equal:"Equal",equals:"Equal","-":"Minus","=":"Equal"},D={"+":"Plus","-":"Minus","=":"Equal"},B=new Set(Object.values(D)),O=new Set(["ctrl","shift","alt","meta","cmd","super"]);function T(V){let F=V.split("+"),X={ctrl:!1,shift:!1,alt:!1,meta:!1},Z=null;for(let $ of F){let J=$.toLowerCase();if(O.has(J))if(J==="cmd"||J==="super")X.meta=!0;else X[J]=!0;else if($.length===0)throw Error('keybindings: invalid combo segment "'+V+'"');else{if(Z!==null)throw Error('keybindings: multiple non-modifier keys in segment "'+V+'"');let Q=P[J];if(Q)Z=Q;else if(N.has($))Z=$;else if(/^[a-zA-Z0-9]$/.test($))Z=$.toLowerCase();else throw Error('keybindings: unknown key "'+$+'" in segment "'+V+'"')}}if(X.shift&&Z!==null&&B.has(Z))throw Error('keybindings: Shift cannot qualify punctuation key "'+Z+'" in segment "'+V+'"');if(Z===null)throw Error('keybindings: no key specified in segment "'+V+'"');return{modifiers:X,key:Z}}function U(V){if(typeof V!=="string"||V.trim().length===0)throw TypeError("keybindings: combo must be a non-empty string");let F=V.trim().split(" ").filter((X)=>X.length>0);if(F.length===1)return T(F[0]);return F.map((X)=>T(X))}function M(V){let F=V.key;if(N.has(F))return F;let X=P[F.toLowerCase()];if(X)return X;if(D[F])return D[F];let Z=V.code;if(Z&&/^Key[A-Z]$/.test(Z))return Z.slice(3).toLowerCase();if(Z&&/^Digit[0-9]$/.test(Z))return Z.slice(5);if(F.length===1)return F.toLowerCase();return null}function z(V,F){let{modifiers:X,key:Z}=F,$=typeof V.getModifierState==="function"&&V.getModifierState("AltGraph"),J=V.ctrlKey||$,Q=V.altKey||$;if(J!==X.ctrl)return!1;if(!B.has(Z)&&V.shiftKey!==X.shift)return!1;if(Q!==X.alt)return!1;if(V.metaKey!==X.meta)return!1;return M(V)===Z}function Y(V={}){let F=V.target||document,X=typeof V.chordTimeout==="number"?V.chordTimeout:1500,Z=j.create(),$=[],J=[],Q=null,H=!1;function G(f,h,u={}){if(typeof f!=="string")throw TypeError("keybindings.bind: combo must be a string");if(typeof h!=="function")throw TypeError("keybindings.bind: fn must be a function");let p=U(f),y=u.context||null,c=typeof u.priority==="number"?u.priority:0,o=u.preventDefault!==!1,r=u.repeat===!0,e={combo:f,parsed:p,context:y,priority:c,preventDefault:o,repeat:r,fn:h};return $.push(e),function(){let X$=$.indexOf(e);if(X$!==-1)$.splice(X$,1)}}function W(f,h){for(let u=$.length-1;u>=0;u--)if($[u].combo===f){if(!h||$[u].fn===h)$.splice(u,1)}}function q(f){J.push(f)}function K(){if(J.length===0)throw RangeError("keybindings: context stack underflow");return J.pop()}function L(){return[...J]}function C(){return $.map((f)=>({combo:f.combo,context:f.context,priority:f.priority,fn:f.fn}))}function A(f){return $.filter((h)=>{let u=h.parsed;if(Array.isArray(u))return z(f,u[0]);return z(f,u)}).map((h)=>({combo:h.combo,context:h.context,priority:h.priority,fn:h.fn}))}function R(f){let h=J.length>0?J[J.length-1]:null;if(h===null)return f.filter((u)=>u.context===null);return f.filter((u)=>u.context===h)}function S(f){return f.reduce((h,u)=>u.priority>h.priority?u:h,f[0])}function x(f,h){if(f.length===0)return;let u=f.reduce((y,c)=>Math.max(y,c.priority),-1/0),p=f.filter((y)=>y.priority===u);for(let y of p){if(y.preventDefault)h.preventDefault();try{y.fn(h)}catch(c){console.error("keybindings handler error:",c)}Z.emit("keybindings:matched",{combo:y.combo,context:y.context,fn:y.fn})}}function I(f){if(Q){let{candidates:c,matched:o,timer:r}=Q;clearTimeout(r),Q=null;let e=o+1,a=c.filter((X$)=>z(f,X$.parsed[e]));if(a.length>0){let X$=a.filter((Y$)=>Y$.parsed.length-1===e);if(X$.length>0){let Y$=S(X$);if(Y$.repeat||!f.repeat){if(Y$.preventDefault)f.preventDefault();try{Y$.fn(f)}catch(Z$){console.error("keybindings chord handler error:",Z$)}Z.emit("keybindings:matched",{combo:Y$.combo,context:Y$.context,fn:Y$.fn})}}else Q={candidates:a,matched:e,timer:setTimeout(()=>{Q=null},X)};return}}let h=$.filter((c)=>{if(!Array.isArray(c.parsed))return!1;if(!z(f,c.parsed[0]))return!1;let o=J.length>0?J[J.length-1]:null;if(o===null)return c.context===null;return c.context===o});if(h.length>0){Q={candidates:h,matched:0,timer:setTimeout(()=>{Q=null},X)};return}let u=$.filter((c)=>{if(Array.isArray(c.parsed))return!1;return z(f,c.parsed)}),y=R(u).filter((c)=>c.repeat||!f.repeat);x(y,f)}function E(){if(H)return;H=!0,F.addEventListener("keydown",I)}function _(){if(!H)return;if(H=!1,F.removeEventListener("keydown",I),Q)clearTimeout(Q.timer),Q=null}function v(){_(),$.length=0,J.length=0}function k(){let f=new Set;function h(...p){let y=G(...p);return f.add(y),y}function u(){for(let p of f)try{p()}catch{}f.clear()}return{bind:h,unbind:W,pushContext:q,popContext:K,dispose:u,clear:u}}return{bind:G,unbind:W,pushContext:q,popContext:K,currentContext:L,list:C,match:A,attach:E,detach:_,dispose:v,scope:k}}return{create:Y,parse:U}}};var gJ={name:"gesture",version:"1.0.0",type:"fw.dom.query",dependencies:["events"],deps:[L$],factory(w){let j=0;function N(P,D={}){let B=D.tapMaxMs??250,O=D.doubletapMaxMs??300,T=D.longpressMs??500,U=D.swipeMinPx??10,M=D.swipeMaxMs??300,z=Object.create(null);function Y(y,c){let o=z[y];if(!o)return;for(let r of o)r(c)}let V=new Map,F=0,X=0,Z=0,$=null,J=!1,Q=0,H=0,G=0,W=0,q=0,K=0,L=0,C=0,A=!1;function R(y,c,o,r){let e=o-y,a=r-c;return Math.sqrt(e*e+a*a)}function S(y,c,o,r){return Math.atan2(r-c,o-y)*180/Math.PI}function x(){if($!==null)clearTimeout($),$=null}function I(y){V.set(y.pointerId,{startX:y.clientX,startY:y.clientY,x:y.clientX,y:y.clientY,t:Date.now()});try{P.setPointerCapture(y.pointerId)}catch(o){}let c=V.size;if(c===1){Q=y.clientX,H=y.clientY,G=y.clientX,W=y.clientY,q=0,K=0,J=!0,Y("pan",{phase:"start",dx:0,dy:0,totalDx:0,totalDy:0,target:y.target}),x();let{clientX:o,clientY:r,target:e}=y,a=Date.now();$=setTimeout(()=>{$=null;let X$=Date.now()-a;Y("longpress",{x:o,y:r,target:e,durationMs:X$})},T)}if(c===2){x(),J=!1;let o=[...V.values()];L=R(o[0].x,o[0].y,o[1].x,o[1].y),C=S(o[0].x,o[0].y,o[1].x,o[1].y),A=!0;let r=(o[0].x+o[1].x)/2,e=(o[0].y+o[1].y)/2;Y("pinch",{phase:"start",scale:1,center:{x:r,y:e},rotation:0})}}function E(y){if(!V.has(y.pointerId))return;let c=V.get(y.pointerId);V.set(y.pointerId,{startX:c.startX,startY:c.startY,x:y.clientX,y:y.clientY,t:c.t});let o=V.size;if(o===1&&J){let r=y.clientX-G,e=y.clientY-W;if(q+=r,K+=e,G=y.clientX,W=y.clientY,R(Q,H,y.clientX,y.clientY)>U)x();Y("pan",{phase:"move",dx:r,dy:e,totalDx:q,totalDy:K,target:y.target})}if(o===2&&A){let r=[...V.values()],e=R(r[0].x,r[0].y,r[1].x,r[1].y),a=S(r[0].x,r[0].y,r[1].x,r[1].y),X$=L>0?e/L:1,Y$=a-C,Z$=(r[0].x+r[1].x)/2,H$=(r[0].y+r[1].y)/2;Y("pinch",{phase:"move",scale:X$,center:{x:Z$,y:H$},rotation:Y$})}}function _(y){let c=V.get(y.pointerId);if(!c)return;let o=Date.now(),r=o-c.t,e=y.clientX-c.startX,a=y.clientY-c.startY,X$=R(c.startX,c.startY,y.clientX,y.clientY),Y$=V.size;if(Y$===2&&A){A=!1;let Z$=[...V.values()],H$=Z$.length>=2?(Z$[0].x+Z$[1].x)/2:y.clientX,K$=Z$.length>=2?(Z$[0].y+Z$[1].y)/2:y.clientY,b=Z$.length>=2?R(Z$[0].x,Z$[0].y,Z$[1].x,Z$[1].y):0,i=L>0?b/L:1;Y("pinch",{phase:"end",scale:i,center:{x:H$,y:K$},rotation:0}),V.delete(y.pointerId);return}if(V.delete(y.pointerId),x(),Y$===1){if(J)Y("pan",{phase:"end",dx:0,dy:0,totalDx:q,totalDy:K,target:y.target}),J=!1;if(X$>=U&&r<=M){let Z$=Math.abs(e),H$=Math.abs(a),K$;if(Z$>=H$)K$=e>0?"right":"left";else K$=a>0?"down":"up";let b=r>0?X$/r:0;Y("swipe",{direction:K$,distance:X$,velocityPxPerMs:b,startX:c.startX,startY:c.startY,endX:y.clientX,endY:y.clientY})}else if(X$<U&&r<=B){Y("tap",{x:y.clientX,y:y.clientY,target:y.target});let Z$=o-F,H$=R(X,Z,y.clientX,y.clientY);if(Z$<=O&&H$<U*3)Y("doubletap",{x:y.clientX,y:y.clientY,target:y.target}),F=0;else F=o,X=y.clientX,Z=y.clientY}}}function v(y){if(x(),J&&V.size===1)J=!1,Y("pan",{phase:"end",dx:0,dy:0,totalDx:q,totalDy:K,target:y.target});if(A)A=!1;V.delete(y.pointerId)}let k=`gesture:${++j}`,f=w.scope(k);f.on("pointerdown",P,"pointerdown",I),f.on("pointermove",P,"pointermove",E),f.on("pointerup",P,"pointerup",_),f.on("pointercancel",P,"pointercancel",v);function h(y,c){if(!z[y])z[y]=new Set;return z[y].add(c),()=>u(y,c)}function u(y,c){if(z[y])z[y].delete(c)}function p(){x(),f.clear();for(let y of Object.keys(z))delete z[y];V.clear(),J=!1,A=!1}return{on:h,off:u,detach:p,dispose:p}}return{attach:N}}};var yJ={name:"fullscreen",type:"fw.dom.display",dependencies:[],factory(){let w=!1,j={map:[],list:{}},N=null,P=null;function D(){return!!(document.fullscreenEnabled??document.webkitFullscreenEnabled)}function B(){return!!(document.fullscreenElement??document.webkitFullscreenElement)}function O(F){if(F.requestFullscreen)return F.requestFullscreen();if(F.webkitRequestFullscreen)return F.webkitRequestFullscreen();return Promise.reject(Error("Fullscreen API not supported"))}function T(){if(!B())return Promise.resolve();if(document.exitFullscreen)return document.exitFullscreen();if(document.webkitExitFullscreen)return document.webkitExitFullscreen();return Promise.reject(Error("Fullscreen API not supported"))}function U(F){if(F instanceof Event)return F.currentTarget||F.target||document.documentElement;if(F instanceof Element)return F;return document.documentElement}function M(){w=B();for(let F=0;F<j.map.length;F++)j.list[j.map[F]](w)}function z(){if(N)return;N=M,P="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",document.addEventListener(P,N,!1)}function Y(){if(!N)return;document.removeEventListener(P,N,!1),N=null,P=null}let V={};return V.isSupported=function(){return D()},V.isFullscreen=function(){return w},V.enter=function(F){return O(U(F))},V.exit=function(){return T()},V.toggle=function(F){return w?V.exit():V.enter(F)},V.listen={add(F,X){if(j.map.indexOf(F)<0)j.map.push(F);j.list[F]=X,z()},del(F){let X=j.map.indexOf(F);if(X>-1)j.map.splice(X,1),delete j.list[F];if(j.map.length===0)Y()}},V.dispose=function(){j.map.length=0;for(let F of Object.keys(j.list))delete j.list[F];Y()},V}};var hJ={name:"idle",type:"fw.dom.lifecycle",dependencies:[],worker:!1,factory(){function w(){return typeof IdleDetector<"u"}async function j(){if(!w())return"denied";return IdleDetector.requestPermission()}async function N({threshold:D=60000}={}){if(!w())throw Error("idle: IdleDetector not supported - use fallback()");let B=new IdleDetector,O=new Set;return B.addEventListener("change",()=>{let T={userState:B.userState,screenState:B.screenState};O.forEach((U)=>U(T))}),{get userState(){return B.userState},get screenState(){return B.screenState},onChange(T){return O.add(T),()=>O.delete(T)},async start(){await B.start({threshold:D})},stop(){B.stop(),O.clear()}}}function P({threshold:D=60000,events:B=["mousemove","keydown","touchstart"]}={}){let O="active",T=null,U=new Set,M=!1;function z(){U.forEach((F)=>F({userState:O}))}function Y(){if(T!==null)clearTimeout(T);if(O!=="active")O="active",z();T=setTimeout(()=>{O="idle",T=null,z()},D)}function V(){Y()}return{get userState(){return O},onChange(F){return U.add(F),()=>U.delete(F)},start(){if(M)return;M=!0,B.forEach((F)=>window.addEventListener(F,V)),Y()},stop(){if(M=!1,B.forEach((F)=>window.removeEventListener(F,V)),T!==null)clearTimeout(T),T=null;U.clear()}}}return{isSupported:w,requestPermission:j,create:N,fallback:P}}};var bJ={name:"lruCache",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function w({maxSize:j,onEvict:N,snapshot:P}={}){if(!Number.isInteger(j)||j<1)throw Error("lruCache: maxSize must be an integer >= 1");let D={key:null,value:null,prev:null,next:null},B={key:null,value:null,prev:null,next:null};D.next=B,B.prev=D;let O=new Map;function T(G){G.prev.next=G.next,G.next.prev=G.prev}function U(G){G.next=D.next,G.prev=D,D.next.prev=G,D.next=G}function M(){let G=B.prev;if(T(G),O.delete(G.key),typeof N==="function")N(G.key,G.value)}function z(G){let W=O.get(G);if(!W)return;return T(W),U(W),W.value}function Y(G,W){if(O.has(G)){let K=O.get(G);K.value=W,T(K),U(K);return}let q={key:G,value:W,prev:null,next:null};if(O.set(G,q),U(q),O.size>j)M()}function V(G){return O.has(G)}function F(G){return O.get(G)?.value}function X(G){let W=O.get(G);if(!W)return!1;if(T(W),O.delete(G),typeof N==="function")N(G,W.value);return!0}function Z(){if(typeof N==="function"){let G=D.next;while(G!==B)N(G.key,G.value),G=G.next}D.next=B,B.prev=D,O.clear()}function*$(){let G=D.next;while(G!==B)yield G.key,G=G.next}function*J(){let G=D.next;while(G!==B)yield G.value,G=G.next}function*Q(){let G=D.next;while(G!==B)yield[G.key,G.value],G=G.next}function H(){let G=[],W=D.next;while(W!==B)G.push([W.key,W.value]),W=W.next;return{maxSize:j,entries:G}}if(P!==void 0){if(P.maxSize!==j)throw Error("lruCache: snapshot.maxSize mismatch");if(P.entries.length>j)throw Error("lruCache: snapshot exceeds maxSize");for(let G=P.entries.length-1;G>=0;G--){let[W,q]=P.entries[G],K={key:W,value:q,prev:null,next:null};O.set(W,K),U(K)}}return{get:z,set:Y,has:V,peek:F,delete:X,clear:Z,keys:$,values:J,entries:Q,snapshot:H,get size(){return O.size},get maxSize(){return j}}}return{create:w}}};var uJ={name:"ringBuffer",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function w({capacity:j,storage:N,snapshot:P}={}){if(!Number.isInteger(j)||j<1)throw Error("ringBuffer: capacity must be an integer >= 1");if(N!==void 0){let $=Array.isArray(N),J=ArrayBuffer.isView(N)&&!(N instanceof DataView);if(!$&&!J)throw Error("ringBuffer: storage must be Array or TypedArray");if(N.length<j)throw Error("ringBuffer: storage length must be >= capacity")}if(P!==void 0){if(P.capacity!==j)throw Error("ringBuffer: snapshot.capacity mismatch");if(!Number.isInteger(P.size)||P.size<0)throw Error("ringBuffer: snapshot.size must be a non-negative integer");if(P.size>j)throw Error("ringBuffer: snapshot.size exceeds capacity");if(!Array.isArray(P.data)||P.data.length<P.size)throw Error("ringBuffer: snapshot.data length must be >= snapshot.size")}let D=N!==void 0?N:Array(j),B=0,O=0;if(P!==void 0){O=P.size,B=0;for(let $=0;$<O;$++)D[$]=P.data[$]}function T($){let J=(B+O)%j;if(D[J]=$,O<j)O++;else B=(B+1)%j}function U(){if(O===0)return;let $=D[B];if(Array.isArray(D))D[B]=void 0;else D[B]=0;return B=(B+1)%j,O--,$}function M(){if(O===0)return;let $=(B+O-1)%j,J=D[$];if(Array.isArray(D))D[$]=void 0;else D[$]=0;return O--,J}function z(){return O===0?void 0:D[B]}function Y(){return O===0?void 0:D[(B+O-1)%j]}function V($){if($<0||$>=O)return;return D[(B+$)%j]}function F(){let $=[];for(let J=0;J<O;J++)$.push(D[(B+J)%j]);return $}function X(){if(B=0,O=0,Array.isArray(D))D.fill(void 0);else D.fill(0)}function Z(){let $=[];for(let J=0;J<O;J++)$.push(D[(B+J)%j]);return{capacity:j,size:O,data:$}}return{push:T,shift:U,pop:M,peek:z,peekLast:Y,peekAt:V,toArray:F,clear:X,snapshot:Z,get size(){return O},get capacity(){return j},get isFull(){return O===j},get isEmpty(){return O===0}}}return{create:w}}};var mJ={name:"trie",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function w({snapshot:j}={}){let N={children:new Map,value:void 0,isEnd:!1},P=0;function D(X,Z=!0){let $=N;for(let J of X){if(!$.children.has(J))$.children.set(J,{children:new Map,value:void 0,isEnd:!1});$=$.children.get(J)}if(!$.isEnd)P++;$.value=Z,$.isEnd=!0}function B(X){let Z=N;for(let $ of X){if(!Z.children.has($))return null;Z=Z.children.get($)}return Z}function O(X){let Z=B(X);return Z!==null&&Z.isEnd}function T(X){let Z=B(X);return Z&&Z.isEnd?Z.value:void 0}function U(X){return B(X)!==null}function M(X,Z=1/0){let $=B(X);if(!$)return[];let J=[];function Q(H,G){if(J.length>=Z)return;if(H.isEnd)J.push({key:G,value:H.value});for(let[W,q]of H.children){if(J.length>=Z)return;Q(q,G+W)}}return Q($,X),J}function z(X){let Z=!1,$=[...X];function J(Q,H){if(H===$.length){if(!Q.isEnd)return!1;return Z=!0,Q.isEnd=!1,Q.value=void 0,P--,Q.children.size===0}let G=$[H],W=Q.children.get(G);if(!W)return!1;if(J(W,H+1))Q.children.delete(G);return!Q.isEnd&&Q.children.size===0}return J(N,0),Z}function*Y(){function*X(Z,$){if(Z.isEnd)yield $;for(let[J,Q]of Z.children)yield*X(Q,$+J)}yield*X(N,"")}function V(){N.children.clear(),P=0}function F(){let X=[];function Z($,J){if($.isEnd)X.push([J,$.value]);for(let[Q,H]of $.children)Z(H,J+Q)}return Z(N,""),{entries:X}}if(j!==void 0&&j!==null)for(let[X,Z]of j.entries)D(X,Z);return{insert:D,has:O,get:T,hasPrefix:U,search:M,delete:z,keys:Y,clear:V,snapshot:F,get size(){return P}}}return{create:w}}};var pJ={name:"treeWalker",version:"1.0.0",type:"fw.io.structures",dependencies:[],factory(){function w(Y,V){let F=Error(V);return F.name="ContractError",F.code=Y,F}class j{constructor(Y){this.current=Y,this.root=Y,this.entering=!0}next(){let Y=this.current;if(Y===null)return null;let V=this.entering,F=Y.firstChild!=null;if(V&&F)this.current=Y.firstChild,this.entering=!0;else if(Y===this.root)this.current=null;else if(Y.next==null)this.current=Y.parent,this.entering=!1;else this.current=Y.next,this.entering=!0;return{node:Y,entering:V}}resumeAt(Y,V){this.current=Y,this.entering=V===!0}}function N(Y){if(Y==null)throw TypeError("createWalker: root node required");return new j(Y)}function*P(Y){if(Y==null)throw TypeError("walk: root node required");let V=new j(Y),F;while((F=V.next())!==null)yield F}function D(Y,V){if(Y==null)throw TypeError("findFirst: root node required");if(typeof V!=="function")throw TypeError("findFirst: predicate must be a function");let F=new j(Y),X;while((X=F.next())!==null)if(X.entering&&V(X.node))return X.node;return null}function B(Y,V){if(Y==null)throw TypeError("findAll: root node required");if(typeof V!=="function")throw TypeError("findAll: predicate must be a function");let F=[],X=new j(Y),Z;while((Z=X.next())!==null)if(Z.entering&&V(Z.node))F.push(Z.node);return F}function O(Y,V){if(!Y||!V)throw TypeError("replaceNode: both args required");if(!Y.parent)throw w("tw/replace-node-no-parent","replaceNode: oldNode has no parent");return Y.insertBefore(V),Y.unlink(),V}function T(Y,V){if(!Y)throw TypeError("wrapNode: node required");if(typeof V!=="function")throw TypeError("wrapNode: wrapperFactory must be a function");if(!Y.parent)throw w("tw/wrap-node-no-parent","wrapNode: node has no parent");let F=V(Y);if(!F)throw TypeError("wrapNode: wrapperFactory must return a wrapper node");return Y.insertBefore(F),Y.unlink(),F.appendChild(Y),F}function U(Y){if(!Y)throw TypeError("flattenNode: node required");if(!Y.parent)throw w("tw/flatten-node-no-parent","flattenNode: node must have a parent");let V=Y.firstChild,F=Y;while(V){let X=V.next;V.unlink(),F.insertAfter(V),F=V,V=X}Y.unlink()}function M(Y,V=!0){if(!Y)throw TypeError("cloneNode: node required");let F=Object.create(Object.getPrototypeOf(Y),Object.getOwnPropertyDescriptors(Y));if(F.parent=null,F.prev=null,F.next=null,F.firstChild=null,F.lastChild=null,V){let X=Y.firstChild;while(X)F.appendChild(M(X,!0)),X=X.next}return F}function z(Y,V,F){if(Y==null)return;if(typeof V!=="function")throw TypeError("walkVisit: visitor must be a function");let X=F&&Array.isArray(F.nodeTypes)?F.nodeTypes:null,Z=new Set,$=[{node:Y,entering:!0}];while($.length>0){let{node:J,entering:Q}=$.pop();if(Q){if(Z.has(J))throw w("tree-walker/cycle","walkVisit: cycle detected in tree");Z.add(J)}let H=J.firstChild!=null,G=!1;if(!X||X.includes(J.type)){let W=V(J,Q);if(Q&&W===!1)G=!0}if(Q&&H&&!G){$.push({node:J,entering:!1});let W=[],q=J.firstChild;while(q)W.push(q),q=q.next;for(let K=W.length-1;K>=0;K--)$.push({node:W[K],entering:!0})}else if(Q&&H&&G){if(!X||X.includes(J.type))V(J,!1)}}}return{createWalker:N,walk:P,walkVisit:z,findFirst:D,findAll:B,replaceNode:O,wrapNode:T,flattenNode:U,cloneNode:M}}};var cJ={name:"queue",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let w={PROCESSING:1,EOF:2,CLOSING:4,CLOSED:8},j=w.CLOSED|w.CLOSING;class N{constructor(P){if(arguments.length>1)throw Error("too many arguments");this.concurrency=N.parseConcurrency(P),this.length=0,this.running=0,this.error=void 0,this.stopped=!1,this._flags=0,this._array=[],this._callbackBound=(D)=>{this._callback(D)}}concat(P){if(!P||P.constructor!==Array)throw Error("jobs must be an Array");for(let D=0,B=P.length;D<B;D++)this.push(P[D])}end(P){if(this._flags&w.EOF)return;if(this._flags|=w.EOF,this._flags&j)return;this._tick(P)}onData(P,D){throw Error("Queue.onData callback must be defined")}onEnd(P){throw Error("Queue.onEnd callback must be defined")}push(P){if(this._flags&w.EOF)throw Error("Queue.push() was called after Queue.end()");if(this._flags&j)return;if(this._array.push(P),this.length++,!(this._flags&w.PROCESSING))this._process()}stop(P){if(this._flags&j)return;if(!P)this._flags|=w.CLOSING;this.stopped=!0,this._tick(P)}_callback(P){if(this._flags&w.CLOSED)throw Error("an onData handler called end() more than once");this.length--,this.running--,this._tick(P)}_process(){if(this._flags&j)return;if(this._flags&w.PROCESSING)return;this._flags|=w.PROCESSING;while(this._array.length){if(this._flags&j||this.running>=this.concurrency){this._flags&=~w.PROCESSING;return}this.running++,this.onData(this._array.shift(),this._callbackBound)}this._flags&=~w.PROCESSING}_tick(P){if(this._flags&w.CLOSED)return;if(P&&!(this._flags&w.CLOSING))this._flags|=w.CLOSING,this.error=P;if(this._flags&w.CLOSING)if(this.running===0){this._flags|=w.CLOSED,this.onEnd(this.error);return}else return;if(this._flags&w.EOF&&this.length===0){this._flags|=w.CLOSED,this.onEnd(void 0);return}this._process()}static parseConcurrency(P){if(P===void 0)return 1;if(P===!1)return 1;if(P===!0)return 1024;if(typeof P!=="number")throw Error("concurrency must be a number");if(Math.floor(P)!==P)throw Error("concurrency must be an integer");if(P<1)throw Error("concurrency must be at least 1");return P}}return N}};var dJ={name:"bitmap",version:"1.0.0",type:"fw.io.utils",dependencies:[],factory(){let w=[];for(let D=0;D<256;D++){w[D]=[];for(let B=0;B<8;B++)w[D].push(D>>B&1)}return{bytesToBits:function(D,B=[]){for(let O=0;O<D.length;O++)B.push(...w[D[O]]);return B},bitsToBytes:function(D,B=!1){if(B&&(D.length&7)!==0)throw Error("bitsToBytes expects a bit array length that is a multiple of 8");let O=new Uint8Array(D.length>>3);for(let T=0;T<D.length;T+=8)O[T>>3]=D[T]+(D[T+1]<<1)+(D[T+2]<<2)+(D[T+3]<<3)+(D[T+4]<<4)+(D[T+5]<<5)+(D[T+6]<<6)+(D[T+7]<<7);return O},padBitsToByte:function(D,B=0){let O=8-(D.length&7);if(O<8)for(let T=0;T<O;T++)D.push(B);return D}}}};var lJ={name:"interp",version:"1.0.0",type:"fw.io.math",dependencies:[],factory(){function w(F,X,Z){return F+Z*(X-F)}function j(F,X,Z){let $=Math.max(0,Math.min(1,(Z-F)/(X-F)));return $*$*(3-2*$)}function N(F,X,Z){let $=Math.max(0,Math.min(1,(Z-F)/(X-F)));return $*$*$*($*($*6-15)+10)}function P(F,X,Z,$,J){let Q=J*J,H=Q*J;return(2*H-3*Q+1)*F+(H-2*Q+J)*Z+(-2*H+3*Q)*X+(H-Q)*$}function D(F,X,Z,$,J,Q=0.5){function H(E,_){return Math.abs(_-E)}function G(E,_,v){return E+Math.pow(H(_,v)||0.0000000001,Q)}let W=0,q=G(W,F,X),K=G(q,X,Z),L=G(K,Z,$),C=w(q,K,J),A=w(F,X,(C-W)/(q-W||0.0000000001)),R=w(X,Z,(C-q)/(K-q||0.0000000001)),S=w(Z,$,(C-K)/(L-K||0.0000000001)),x=w(A,R,(C-W)/(K-W||0.0000000001)),I=w(R,S,(C-q)/(L-q||0.0000000001));return w(x,I,(C-q)/(K-q||0.0000000001))}function B(F,X,Z,$){let J=1-$;return J*J*F+2*J*$*X+$*$*Z}function O(F,X,Z,$,J){let Q=1-J,H=Q*Q,G=J*J;return H*Q*F+3*H*J*X+3*Q*G*Z+G*J*$}function T(F,X,Z,$,J,Q){return F*(1-J)*(1-Q)+X*J*(1-Q)+Z*(1-J)*Q+$*J*Q}function U(F,X,Z){let $=[0,1,2,3].map((J)=>{let Q=F[J];return D(Q[0],Q[1],Q[2],Q[3],X)});return D($[0],$[1],$[2],$[3],Z)}function M(F,X,Z,$){if(F.length!==X.length||F.length!==Z.length)throw Error("interp: vec dimension mismatch");for(let J=0;J<F.length;J++)F[J]=X[J]+$*(Z[J]-X[J]);return F}function z(F,X,Z,$){let J=Z.x-X.x,Q=Z.y-X.y,H=$.x-X.x,G=$.y-X.y,W=F.x-X.x,q=F.y-X.y,K=J*J+Q*Q,L=J*H+Q*G,C=H*H+G*G,A=W*J+q*Q,R=W*H+q*G,S=K*C-L*L;if(Math.abs(S)<0.000000000001)throw Error("interp.barycentric: degenerate triangle (collinear or coincident vertices)");let x=(C*A-L*R)/S,I=(K*R-L*A)/S;return{u:1-x-I,v:x,w:I}}function Y(F,X){let Z=F.length;if(Z===1)return F[0];let $=X*(Z-1),J=Math.max(0,Math.min(Z-2,Math.floor($)));return w(F[J],F[J+1],$-J)}function V(F,X,Z,$,J){let Q=$*(X-1),H=J*(Z-1),G=Math.max(0,Math.min(X-2,Math.floor(Q))),W=Math.max(0,Math.min(Z-2,Math.floor(H))),q=Q-G,K=H-W,L=F[W*X+G],C=F[W*X+G+1],A=F[(W+1)*X+G],R=F[(W+1)*X+G+1];return T(L,C,A,R,q,K)}return{linear:w,smoothstep:j,smootherstep:N,cubicHermite:P,catmullRom:D,bezier2:B,bezier3:O,bilinear:T,bicubic:U,vec:M,barycentric:z,sample:Y,sample2D:V}}};var iJ={name:"scheduler",dependencies:[],factory(){let w={minute:{min:0,max:59},hour:{min:0,max:23},day:{min:1,max:31},month:{min:1,max:12},weekday:{min:0,max:6}};function j(B,O){let{min:T,max:U}=w[O],M=new Set;for(let z of B.split(",")){let Y=z.match(/^(.+)\/(\d+)$/),V=1,F=z;if(Y){if(V=parseInt(Y[2],10),V<=0)throw Error(`scheduler: invalid cron expression - field ${O}: step must be > 0`);F=Y[1]}let X,Z;if(F==="*")X=T,Z=U;else if(/^\d+-\d+$/.test(F))[X,Z]=F.split("-").map(Number);else if(/^\d+$/.test(F))X=Z=parseInt(F,10);else throw Error(`scheduler: invalid cron expression - field ${O}: invalid token '${F}'`);if(!Number.isInteger(X)||!Number.isInteger(Z)||X<T||Z>U||X>Z)throw Error(`scheduler: invalid cron expression - field ${O}: value out of range ${T}-${U}`);for(let $=X;$<=Z;$+=V)M.add($)}return M}function N(B){let O=B.trim().split(/\s+/);if(O.length!==5){let H=O.length>5?"scheduler: invalid cron expression - seconds field not supported (expected 5 fields)":"scheduler: invalid cron expression - expected 5 fields";throw Error(H)}let[T,U,M,z,Y]=O,V={minute:j(T,"minute"),hour:j(U,"hour"),day:j(M,"day"),month:j(z,"month"),weekday:j(Y,"weekday")},F=M==="*",X=Y==="*";function Z(H){let G=H.getDate(),W=H.getDay();if(!F&&!X)return V.day.has(G)||V.weekday.has(W);if(!F)return V.day.has(G);if(!X)return V.weekday.has(W);return!0}function $(H){return V.month.has(H.getMonth()+1)&&Z(H)&&V.hour.has(H.getHours())&&V.minute.has(H.getMinutes())}function J(H){let G=H?new Date(H):new Date;G.setSeconds(0,0),G.setMinutes(G.getMinutes()+1);let W=G.getTime()+157788000000,q=new Date(G);while(q.getTime()<=W){if(!V.month.has(q.getMonth()+1)){q.setMonth(q.getMonth()+1,1),q.setHours(0,0,0,0);continue}if(!Z(q)){q.setDate(q.getDate()+1),q.setHours(0,0,0,0);continue}if(!V.hour.has(q.getHours())){q.setHours(q.getHours()+1,0,0,0);continue}if(!V.minute.has(q.getMinutes())){q.setMinutes(q.getMinutes()+1,0,0);continue}return new Date(q)}throw Error("scheduler: no firing in 5y horizon")}function Q(H,G){let W=[],q=G;for(let K=0;K<H;K++){let L=J(q);W.push(L),q=L}return W}return{expression:B,next:J,nextN:Q,matches:$,fields:{minute:V.minute,hour:V.hour,day:V.day,month:V.month,weekday:V.weekday}}}function P(B,O){if(typeof B!=="function")throw Error("scheduler: callback must be a function");if(typeof O!=="number"||!isFinite(O)||O<=0)throw Error("scheduler: ms must be a positive number");let T=null;function U(){if(T!==null)return;T=setInterval(()=>{try{B()}catch(z){console.error(z)}},O)}function M(){if(T===null)return;clearInterval(T),T=null}return{start:U,stop:M,get running(){return T!==null}}}function D(B,O){if(typeof O!=="function")throw Error("scheduler: callback must be a function");let T=N(B),U=null,M=null,z=!0;function Y(){if(z)return;M=T.next();let X=Math.max(0,M.getTime()-Date.now());U=setTimeout(()=>{if(U=null,z)return;try{O()}catch(Z){console.error(Z)}if(z)return;Y()},X)}function V(){if(!z)return;z=!1,Y()}function F(){if(z=!0,U!==null)clearTimeout(U),U=null;M=null}return{start:V,stop:F,get running(){return!z},get next(){return M},get expression(){return B}}}return{cron:N,interval:P,job:D}}};var nJ={name:"broadcastChannel",type:"fw.dom.net",dependencies:[],factory(){function w(){return typeof BroadcastChannel<"u"||typeof globalThis.BroadcastChannel<"u"}function j(N){let P=typeof BroadcastChannel<"u"?BroadcastChannel:globalThis.BroadcastChannel;if(!P)throw Error("broadcastChannel: BroadcastChannel is not available in this environment");let D=new P(N),B=N,O=new Set;D.onmessage=(Y)=>{for(let V of O)try{V(Y.data,Y)}catch(F){console.error("broadcastChannel listener error:",F)}};function T(Y){D.postMessage(Y)}function U(Y){return O.add(Y),()=>O.delete(Y)}function M(Y){O.delete(Y)}function z(){if(!D)return;O.clear(),D.onmessage=null,D.close(),D=null}return{post:T,on:U,off:M,close:z,get name(){return D?D.name:B}}}return{create:j,isSupported:w}}};var oJ={name:"storage",version:"1.0.0",type:"fw.dom.fs",dependencies:["broadcastChannel"],deps:[nJ],factory(w){let j={crossTab:!0,namespace:""};function N({crossTab:z,namespace:Y}={}){if(O()>0)throw Error("storage: configure must be called before any listen.add");if(Y!==void 0){if(typeof Y!=="string"||Y.includes(":"))throw Error('storage: namespace must be a string without ":"');j.namespace=Y}if(z!==void 0){if(typeof z!=="boolean")throw Error("storage: crossTab must be a boolean");j.crossTab=z}}function P(z){try{return z.setItem("__probe__","__probe__"),z.removeItem("__probe__"),!0}catch{return!1}}function D(z){try{return JSON.parse(z)}catch{return z}}let B=null;function O(){if(!B)return 0;return B.map.length}function T(z,Y){let V={map:[],list:{}};if(Y==="local")B=V;let F=!1,X=null;function Z(W,q,K,L){let C={type:W,key:q,value:K,cross:L};for(let A=0;A<V.map.length;A++)V.list[V.map[A]](C)}function $(W){if(W.storageArea!==z)return;if(W.key===null)Z("clear",null,null,!0);else if(W.newValue===null)Z("del",W.key,null,!0);else Z("set",W.key,D(W.newValue),!0)}function J(){return j.namespace?`storage:${j.namespace}:local`:"storage:local"}function Q(){if(Y!=="local")return;if(!j.crossTab)return;if(w.isSupported())X=w.create(J()),X.on((W)=>Z(W.type,W.key,W.value,!0));else window.addEventListener("storage",$,!1),F=!0}function H(){if(Y!=="local")return;if(X)X.close(),X=null;else if(F)window.removeEventListener("storage",$,!1),F=!1}function G(W,q,K){if(Y==="local"&&X)X.post({type:W,key:q,value:K})}return{set(W,q){z.setItem(W,JSON.stringify(q)),Z("set",W,q,!1),G("set",W,q)},get(W){let q=z.getItem(W);return q===null?null:D(q)},has(W){return z.getItem(W)!==null},del(W){z.removeItem(W),Z("del",W,null,!1),G("del",W,null)},clear(){z.clear(),Z("clear",null,null,!1),G("clear",null,null)},keys(){let W=[];for(let q=0;q<z.length;q++)W.push(z.key(q));return W},get length(){return z.length},listen:{add(W,q){let K=V.map.length===0;if(V.map.indexOf(W)<0)V.map.push(W);if(V.list[W]=q,K&&V.map.length===1)Q()},del(W){let q=V.map.indexOf(W);if(q>-1){if(V.map.splice(q,1),delete V.list[W],V.map.length===0)H()}}}}}let U=typeof localStorage<"u"&&P(localStorage)?T(localStorage,"local"):null,M=typeof sessionStorage<"u"&&P(sessionStorage)?T(sessionStorage,"session"):null;return{local:U,session:M,isSupported(){return U!==null||M!==null},configure:N}}};var rJ={name:"download",version:"1.0.0",type:"fw.dom.fs",dependencies:[],factory(){function w(j,N,P){let D=document.createElement("a");if(D.href=j,D.download=N,document.body.appendChild(D),D.click(),document.body.removeChild(D),P)URL.revokeObjectURL(j)}return{url(j,N){w(j,N,!1)},blob(j,N){w(URL.createObjectURL(j),N,!0)},bytes(j,N,P="application/octet-stream"){this.blob(new Blob([j],{type:P}),N)},text(j,N,P="text/plain;charset=utf-8"){this.blob(new Blob([j],{type:P}),N)}}}};var sJ={name:"clipboard",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let w=typeof navigator<"u"?navigator:null,j=w?.clipboard??null,N=!!(j&&typeof j.writeText==="function"),P=!!(j&&typeof j.readText==="function"),D=!!(w&&typeof w.share==="function"),B=typeof globalThis.ClipboardItem==="function"?globalThis.ClipboardItem:null,O=!!(j&&typeof j.write==="function"&&B),T=(U,M)=>Promise.resolve(U).then((z)=>new Blob([z],{type:M}));return{isSupported(){return{read:P,write:N,richWrite:O,share:D}},set(U){return j.writeText(U)},setRich({html:U,text:M}){if(!O)return Promise.reject(Error("clipboard: rich write unsupported (navigator.clipboard.write or ClipboardItem missing)"));let z=T(U,"text/html"),Y=T(M,"text/plain"),V=j.write([new B({"text/html":z,"text/plain":Y})]);return Promise.all([z,Y,V]).then(()=>{return})},get(){return j.readText()},share(U={}){return w.share(U)}}}};var aJ={name:"ua",version:"1.0.0",type:"fw.dom.utils",dependencies:[],factory(){let w=typeof navigator<"u"?navigator:null,j=w?w.userAgent||w.vendor||"":"",N=w&&w.userAgentData&&typeof w.userAgentData==="object"?w.userAgentData:null,P=N&&typeof N.mobile==="boolean"?N.mobile:/Mobi/i.test(j),D={windows:"windows",macos:"mac",linux:"linux",android:"android",ios:"ios","chrome os":"linux"};function B(){let T=j.toLowerCase();if(/iphone|ipad|ipod/.test(T))return"ios";if(/android/.test(T))return"android";if(/windows/.test(T))return"windows";if(/macintosh|mac os x/.test(T))return w&&w.maxTouchPoints>1?"ios":"mac";if(/linux|cros/.test(T))return"linux";return"unknown"}let O=N&&typeof N.platform==="string"&&N.platform?D[N.platform.toLowerCase()]||"unknown":B();return{string(){return j},mobile(){return P},touch(){return typeof window<"u"&&"ontouchstart"in window||typeof navigator<"u"&&navigator.maxTouchPoints>0},platform(){return O}}}};var tJ={name:"uuid",dependencies:["hex"],deps:[c$],factory(w){let j=new Uint8Array(16),N,P,D=0,B=0;function O(z,Y){let V=w.fromBytes(z);if(Y==="rfc4122")return V.slice(0,8)+"-"+V.slice(8,12)+"-"+V.slice(12,16)+"-"+V.slice(16,20)+"-"+V.slice(20,32);return V}function T(z,Y){if(z!==!1&&typeof z==="function"){let V=Y.slice(0),F=z(Y);if(F instanceof Uint8Array&&F.length>=16)return F;if(F===void 0||F===null||F===Y){for(let X=0;X<16;X++)if(Y[X]!==V[X])return Y}}return crypto.getRandomValues(Y)}return{v1:function(z=!1,Y=!1,V="rfc4122"){let F=0,X=j,Z=N,$=P;if(Z==null||$==null){let q=T(Y,j);if(Z==null)Z=N=[q[0]|1,q[1],q[2],q[3],q[4],q[5]];if($==null)$=P=(q[6]<<8|q[7])&16383}let J=Date.now(),Q=B+1,H=J-D+(Q-B)/1e4;if(H<0)$=$+1&16383;if(H<0||J>D)Q=0;else if(Q>=1e4)$=$+1&16383,Q=0;D=J,B=Q,P=$,J+=12219292800000;let G=((J&268435455)*1e4+Q)%4294967296;X[F++]=G>>>24&255,X[F++]=G>>>16&255,X[F++]=G>>>8&255,X[F++]=G&255;let W=J/4294967296*1e4&268435455;X[F++]=W>>>8&255,X[F++]=W&255,X[F++]=W>>>24&15|16,X[F++]=W>>>16&255,X[F++]=$>>>8|128,X[F++]=$&255;for(let q=0;q<6;++q)X[F+q]=Z[q];return z?j.slice(0):O(j,V)},v4:function(z=!1,Y=!1,V="rfc4122"){let F=T(Y,j);return F[6]=F[6]&15|64,F[8]=F[8]&63|128,z?F.slice(0,16):O(F,V)}}}};var n$={DEV:!1,LOG:!0},eJ=n$.LOG?r$.main(n$.DEV):!1,s$=new v$;s$.registerAllDeep([zJ,f$,g$,YJ,GJ,HJ,y$,B$,L$,UJ,VJ,qJ,KJ,FJ,T$,b$,S$,WJ,P$,m$,p$,c$,DJ,E$,LJ,MJ,OJ,PJ,BJ,RJ,CJ,AJ,NJ,wJ,l$,TJ,SJ,d$,EJ,IJ,kJ,fJ,gJ,yJ,hJ,bJ,uJ,mJ,pJ,cJ,dJ,h$,lJ,iJ,oJ,rJ,sJ,aJ,tJ]);var zZ=QJ(n$,s$,ZJ,eJ,r$.worker.toString()),YZ=XJ(),GZ={ENV:n$,log:eJ,runtime:s$,createWorker:zZ,domReady:YZ},C8=GZ;export{C8 as default};