@stacksjs/stx 0.2.95 → 0.2.96

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 (612) hide show
  1. package/dist/a11y.js +598 -2
  2. package/dist/analytics.js +159 -2
  3. package/dist/analyzer.js +240 -2
  4. package/dist/animation.js +688 -2
  5. package/dist/app-shell.js +220 -2
  6. package/dist/app.js +79 -2
  7. package/dist/assets.js +155 -2
  8. package/dist/ast.js +630 -2
  9. package/dist/async-components.js +428 -2
  10. package/dist/auth.js +12 -2
  11. package/dist/broadcasting.js +102 -2
  12. package/dist/browser-composables.js +565 -2
  13. package/dist/build-assets.js +29 -2
  14. package/dist/build-mode-detector.js +50 -2
  15. package/dist/build-optimizer.js +433 -2
  16. package/dist/build-views.js +180 -2
  17. package/dist/build.js +33 -2
  18. package/dist/builtins/drawer.js +37 -2
  19. package/dist/builtins/escape.js +3 -2
  20. package/dist/builtins/icon.js +83 -2
  21. package/dist/builtins/index.js +34 -2
  22. package/dist/builtins/modal.js +38 -2
  23. package/dist/builtins/safe-image.js +51 -2
  24. package/dist/builtins/stx-image.js +200 -2
  25. package/dist/builtins/stx-link.js +41 -2
  26. package/dist/builtins/stx-loading-indicator.js +35 -2
  27. package/dist/builtins/suspense.js +24 -2
  28. package/dist/builtins/toast.js +42 -2
  29. package/dist/builtins/tooltip.js +106 -2
  30. package/dist/builtins/transition-group.js +22 -2
  31. package/dist/bundle-analyzer/collector.js +233 -2
  32. package/dist/bundle-analyzer/index.js +82 -2
  33. package/dist/bundle-analyzer/report.js +318 -2
  34. package/dist/bundle-analyzer/treemap.js +594 -2
  35. package/dist/caching.js +131 -2
  36. package/dist/cli.js +11317 -10982
  37. package/dist/client/directive.js +14 -2
  38. package/dist/client/index.js +2 -2
  39. package/dist/client-helpers.js +312 -2
  40. package/dist/client-script-bundler.js +216 -6
  41. package/dist/client-script.js +754 -2
  42. package/dist/client.js +73 -4
  43. package/dist/component-hmr.js +585 -2
  44. package/dist/component-library.d.ts +6 -0
  45. package/dist/component-library.js +683 -0
  46. package/dist/component-processing.js +613 -2
  47. package/dist/component-registry.js +90 -2
  48. package/dist/component-renderer.js +660 -2
  49. package/dist/components.js +213 -2
  50. package/dist/composables/index.js +220 -2
  51. package/dist/composables/use-battery.js +101 -2
  52. package/dist/composables/use-broadcast-channel.js +80 -2
  53. package/dist/composables/use-channel.js +124 -2
  54. package/dist/composables/use-clipboard.js +79 -2
  55. package/dist/composables/use-color-mode.js +131 -2
  56. package/dist/composables/use-cookie.js +86 -2
  57. package/dist/composables/use-device-orientation.js +181 -2
  58. package/dist/composables/use-event-listener.js +27 -2
  59. package/dist/composables/use-event-source.js +166 -2
  60. package/dist/composables/use-eye-dropper.js +142 -2
  61. package/dist/composables/use-fetch.js +223 -2
  62. package/dist/composables/use-fullscreen.js +110 -2
  63. package/dist/composables/use-geolocation.js +101 -2
  64. package/dist/composables/use-idle.js +182 -2
  65. package/dist/composables/use-intersection-observer.js +168 -2
  66. package/dist/composables/use-keyboard.js +224 -2
  67. package/dist/composables/use-media-query.js +62 -2
  68. package/dist/composables/use-meta.js +48 -2
  69. package/dist/composables/use-mouse.js +286 -2
  70. package/dist/composables/use-mutation-observer.js +129 -2
  71. package/dist/composables/use-network.js +85 -2
  72. package/dist/composables/use-notification.js +94 -2
  73. package/dist/composables/use-permissions.js +132 -2
  74. package/dist/composables/use-query.js +0 -1
  75. package/dist/composables/use-resize-observer.js +157 -2
  76. package/dist/composables/use-router.js +51 -2
  77. package/dist/composables/use-share.js +104 -2
  78. package/dist/composables/use-speech.js +294 -2
  79. package/dist/composables/use-storage.js +130 -2
  80. package/dist/composables/use-text-selection.js +205 -4
  81. package/dist/composables/use-timer.js +183 -2
  82. package/dist/composables/use-utilities.js +176 -2
  83. package/dist/composables/use-wake-lock.js +122 -2
  84. package/dist/composables/use-websocket.js +165 -2
  85. package/dist/composables/use-window.js +163 -2
  86. package/dist/composables.js +552 -2
  87. package/dist/composition-api.js +190 -2
  88. package/dist/computed.js +376 -8
  89. package/dist/conditionals.js +599 -2
  90. package/dist/config.js +751 -2
  91. package/dist/craft-bridge.js +432 -2
  92. package/dist/craft-compiler.js +810 -2
  93. package/dist/craft-components.js +945 -2
  94. package/dist/craft-entry.js +5 -2
  95. package/dist/craft-ssr.js +559 -2
  96. package/dist/csp.js +220 -2
  97. package/dist/csrf.js +38 -2
  98. package/dist/custom-directives.js +136 -2
  99. package/dist/defer.js +156 -2
  100. package/dist/deploy/config-generators.js +214 -2
  101. package/dist/deploy/index.js +203 -2
  102. package/dist/deploy/netlify.js +167 -2
  103. package/dist/dev-server/crosswind.js +379 -2
  104. package/dist/dev-server/index.js +7 -2
  105. package/dist/dev-server/keyboard-shortcuts.js +81 -2
  106. package/dist/dev-server/native-window.js +91 -2
  107. package/dist/dev-server/port-utils.js +40 -2
  108. package/dist/dev-server/serve-app.js +682 -2
  109. package/dist/dev-server/serve-file.js +439 -2
  110. package/dist/dev-server/serve-markdown.js +281 -2
  111. package/dist/dev-server/serve-multi.js +579 -2
  112. package/dist/dev-server/terminal-colors.js +45 -2
  113. package/dist/dev-server/theme-selector.js +111 -2
  114. package/dist/dev-server/types.js +43 -2
  115. package/dist/dev-server.js +4 -2
  116. package/dist/devtools.js +462 -18
  117. package/dist/directive-api.js +355 -2
  118. package/dist/docs.js +567 -2
  119. package/dist/doctor.js +123 -2
  120. package/dist/document-shell.js +105 -2
  121. package/dist/dynamic-components.js +78 -2
  122. package/dist/edge-runtime.js +539 -2
  123. package/dist/env.js +9 -2
  124. package/dist/error-boundaries.js +62 -12
  125. package/dist/error-handling.js +1 -2
  126. package/dist/errors/codes.js +97 -2
  127. package/dist/errors/formatter.js +196 -2
  128. package/dist/errors/index.js +44 -2
  129. package/dist/errors/logger.js +250 -2
  130. package/dist/errors/sanitizer.js +181 -2
  131. package/dist/errors/types.js +86 -2
  132. package/dist/events.js +382 -2
  133. package/dist/expressions.js +650 -2
  134. package/dist/formatter.js +265 -2
  135. package/dist/forms-validation.js +510 -4
  136. package/dist/forms.js +709 -2
  137. package/dist/head.js +224 -2
  138. package/dist/heatmap.js +566 -2
  139. package/dist/hot-reload.js +367 -2
  140. package/dist/html-masking.js +73 -2
  141. package/dist/hydration-runtime.js +195 -2
  142. package/dist/hydration.js +654 -2
  143. package/dist/i18n.js +633 -2
  144. package/dist/image-optimization/auto-sibling.js +88 -2
  145. package/dist/image-optimization/build-plugin.js +241 -2
  146. package/dist/image-optimization/component.js +244 -2
  147. package/dist/image-optimization/directive.js +203 -2
  148. package/dist/image-optimization/index.js +54 -2
  149. package/dist/image-optimization/processor.js +262 -2
  150. package/dist/image-optimization/serve.js +102 -2
  151. package/dist/includes.js +733 -2
  152. package/dist/index.d.ts +1 -0
  153. package/dist/index.js +134 -2
  154. package/dist/init.js +505 -2
  155. package/dist/inline-assets.js +82 -2
  156. package/dist/interactive.js +383 -2
  157. package/dist/internal-markdown.js +141 -2
  158. package/dist/island-chunking.js +52 -2
  159. package/dist/js-ts.js +57 -2
  160. package/dist/jsx-runtime.js +289 -2
  161. package/dist/keep-alive.js +421 -2
  162. package/dist/lazy-loader.js +245 -2
  163. package/dist/loading-indicator.js +322 -2
  164. package/dist/loops.js +643 -2
  165. package/dist/manifest.js +31 -2
  166. package/dist/markdown.js +68 -2
  167. package/dist/media/client/blur-up.js +217 -2
  168. package/dist/media/client/index.js +53 -2
  169. package/dist/media/client/lazy-load.js +283 -2
  170. package/dist/media/client/upload-handler.js +354 -2
  171. package/dist/media/image/component.js +574 -2
  172. package/dist/media/image/directive.js +160 -2
  173. package/dist/media/image/editing.js +193 -2
  174. package/dist/media/image/index.js +80 -2
  175. package/dist/media/image/placeholder.js +188 -2
  176. package/dist/media/image/processor/cache.js +51 -2
  177. package/dist/media/image/processor/index.js +3 -2
  178. package/dist/media/image/processor/optimizer.js +202 -2
  179. package/dist/media/image/processor/responsive.js +162 -2
  180. package/dist/media/image/srcset.js +194 -2
  181. package/dist/media/index.js +198 -2
  182. package/dist/media/manager/embed.js +253 -2
  183. package/dist/media/protected/component.js +235 -2
  184. package/dist/media/protected/index.js +20 -2
  185. package/dist/media/protected/signature.js +205 -2
  186. package/dist/media/shared/cache.js +132 -2
  187. package/dist/media/shared/hash.js +35 -2
  188. package/dist/media/shared/index.js +2 -2
  189. package/dist/media/types.js +0 -1
  190. package/dist/media/upload/component.js +320 -2
  191. package/dist/media/upload/index.js +1 -2
  192. package/dist/media/video/directive.js +142 -2
  193. package/dist/media/video/index.js +583 -2
  194. package/dist/media/video/processor/cache.js +52 -2
  195. package/dist/media/video/processor/index.js +4 -2
  196. package/dist/media/video/processor/streaming.js +197 -2
  197. package/dist/media/video/processor/thumbnail.js +134 -2
  198. package/dist/media/video/processor/transcoder.js +283 -2
  199. package/dist/method-spoofing.js +17 -2
  200. package/dist/middleware.js +40 -2
  201. package/dist/misc-directives.js +222 -2
  202. package/dist/native-build.js +511 -2
  203. package/dist/parser/directive-parser.js +239 -2
  204. package/dist/parser/expression-parser.js +358 -2
  205. package/dist/parser/index.js +23 -2
  206. package/dist/parser/tokenizer.js +534 -2
  207. package/dist/partial-hydration.js +427 -2
  208. package/dist/performance-utils.js +430 -2
  209. package/dist/placeholder.js +35 -2
  210. package/dist/plugin-system.js +214 -2
  211. package/dist/plugin.js +173 -2
  212. package/dist/precompiler.js +660 -81
  213. package/dist/process.js +711 -2
  214. package/dist/production-build.js +596 -2
  215. package/dist/production-builder.js +132 -2
  216. package/dist/production-server.js +188 -2
  217. package/dist/props.js +224 -2
  218. package/dist/public-env.js +19 -2
  219. package/dist/pwa/audit.js +255 -2
  220. package/dist/pwa/directives.js +332 -2
  221. package/dist/pwa/icons.js +109 -2
  222. package/dist/pwa/index.js +47 -2
  223. package/dist/pwa/inject.js +102 -2
  224. package/dist/pwa/manifest.js +186 -2
  225. package/dist/pwa/offline.js +259 -2
  226. package/dist/pwa/precache.js +116 -2
  227. package/dist/pwa/service-worker.js +860 -2
  228. package/dist/pwa/workbox-strategies.js +167 -2
  229. package/dist/pwa/workbox.js +382 -2
  230. package/dist/pwa.js +427 -427
  231. package/dist/reactive-bindings.js +266 -2
  232. package/dist/reactive.js +569 -2
  233. package/dist/reactivity.js +559 -2
  234. package/dist/release.js +1 -2
  235. package/dist/render.js +165 -2
  236. package/dist/route-middleware.js +17 -2
  237. package/dist/router.js +9 -2
  238. package/dist/routes.js +14 -2
  239. package/dist/runtime-injection.js +120 -2
  240. package/dist/runtime.js +94 -2
  241. package/dist/safe-evaluator.js +444 -2
  242. package/dist/scaffolding.js +897 -2
  243. package/dist/screenshot.js +87 -2
  244. package/dist/script-classifier.js +32 -2
  245. package/dist/script-validation.js +158 -2
  246. package/dist/seo.js +457 -2
  247. package/dist/serve.js +237 -2
  248. package/dist/server-bindings.js +108 -2
  249. package/dist/server-components.js +338 -11
  250. package/dist/signal-processing.js +946 -2
  251. package/dist/signals-api.js +154 -2
  252. package/dist/signals.js +5287 -2
  253. package/dist/site-builder/build.js +224 -2
  254. package/dist/site-builder/i18n.js +140 -2
  255. package/dist/site-builder/index.js +15 -2
  256. package/dist/site-builder/robots.js +26 -2
  257. package/dist/site-builder/router.js +27 -2
  258. package/dist/site-builder/seo.js +36 -2
  259. package/dist/site-builder/sitemap.js +26 -2
  260. package/dist/site-builder/theme.js +33 -2
  261. package/dist/site-builder/types.js +0 -1
  262. package/dist/slots.js +201 -2
  263. package/dist/source-maps.js +350 -2
  264. package/dist/spa-shell.js +34 -2
  265. package/dist/ssg.js +389 -389
  266. package/dist/ssr.js +355 -2
  267. package/dist/state-management.js +533 -2
  268. package/dist/store-imports.js +13 -2
  269. package/dist/store-loader.js +72 -5
  270. package/dist/stores-client.js +132 -2
  271. package/dist/story/addons.js +261 -2
  272. package/dist/story/analytics.js +235 -2
  273. package/dist/story/auto-stories.js +158 -2
  274. package/dist/story/bookmarks.js +277 -2
  275. package/dist/story/bun-test.js +102 -2
  276. package/dist/story/cli.js +155 -2
  277. package/dist/story/collect/analyzer.js +305 -2
  278. package/dist/story/collect/index.js +27 -2
  279. package/dist/story/collect/parser.js +129 -2
  280. package/dist/story/collect/scanner.js +101 -2
  281. package/dist/story/collect/tree.js +110 -2
  282. package/dist/story/commands/build.js +172 -2
  283. package/dist/story/commands/dev.js +78 -2
  284. package/dist/story/commands/index.js +3 -2
  285. package/dist/story/commands/preview.js +56 -2
  286. package/dist/story/compiled-output.js +151 -2
  287. package/dist/story/composition.js +261 -2
  288. package/dist/story/config-watcher.js +67 -2
  289. package/dist/story/config.js +64 -2
  290. package/dist/story/context.js +27 -2
  291. package/dist/story/controls/index.js +320 -2
  292. package/dist/story/crosswind.js +189 -2
  293. package/dist/story/desktop-preview.js +105 -2
  294. package/dist/story/docs-generator.js +186 -2
  295. package/dist/story/errors.js +239 -2
  296. package/dist/story/figma-export.js +224 -2
  297. package/dist/story/generator.js +165 -2
  298. package/dist/story/hmr.js +131 -2
  299. package/dist/story/hot-swap.js +207 -2
  300. package/dist/story/index.js +49 -2
  301. package/dist/story/interactions.js +225 -2
  302. package/dist/story/keyboard-shortcuts.js +345 -2
  303. package/dist/story/output.js +153 -2
  304. package/dist/story/performance.js +252 -2
  305. package/dist/story/presets.js +289 -2
  306. package/dist/story/props-validation.js +215 -2
  307. package/dist/story/renderer.js +209 -2
  308. package/dist/story/search-index.js +106 -2
  309. package/dist/story/search.js +140 -2
  310. package/dist/story/server.js +965 -2
  311. package/dist/story/setup.js +78 -2
  312. package/dist/story/snapshots.js +170 -2
  313. package/dist/story/testing.js +163 -2
  314. package/dist/story/theme.js +170 -2
  315. package/dist/story/types.js +0 -2
  316. package/dist/story/ui/code-panel.js +175 -2
  317. package/dist/story/ui/controls-panel.js +168 -2
  318. package/dist/story/ui/index.js +4 -2
  319. package/dist/story/ui/navigation.js +250 -2
  320. package/dist/story/ui/preview.js +251 -2
  321. package/dist/story/visual-testing.js +247 -2
  322. package/dist/streaming.js +537 -2
  323. package/dist/strict-lint.js +288 -2
  324. package/dist/style-scoping.js +50 -2
  325. package/dist/suspense.js +398 -2
  326. package/dist/teleport.js +109 -2
  327. package/dist/template-compiler.js +63 -2
  328. package/dist/template-hydrator.js +82 -2
  329. package/dist/template-tag-balance.js +93 -2
  330. package/dist/testing.js +581 -2
  331. package/dist/transitions.js +443 -2
  332. package/dist/type-checker.js +581 -2
  333. package/dist/types/component-types.d.ts +54 -0
  334. package/dist/types/component-types.js +0 -1
  335. package/dist/types/config-types.js +0 -1
  336. package/dist/types/context-types.js +0 -1
  337. package/dist/types/csp-types.js +0 -1
  338. package/dist/types/directive-types.js +3 -2
  339. package/dist/types/index.d.ts +5 -0
  340. package/dist/types/index.js +1 -2
  341. package/dist/types/pwa-types.js +0 -1
  342. package/dist/types.js +1 -2
  343. package/dist/typescript-templates.js +386 -4
  344. package/dist/utils.js +942 -2
  345. package/dist/validator.js +171 -2
  346. package/dist/variable-extractor.js +1094 -2
  347. package/dist/view-composers.js +29 -2
  348. package/dist/virtual-scrolling.js +454 -2
  349. package/dist/visual-editor.js +688 -28
  350. package/dist/vue-template.js +475 -2
  351. package/dist/web-components/css-scoping.js +177 -2
  352. package/dist/web-components/index.js +13 -2
  353. package/dist/web-components/reactive-generator.js +121 -56
  354. package/dist/web-components.js +1447 -2
  355. package/dist/x-element.js +17 -5
  356. package/package.json +5 -6
  357. package/dist/chunk-04n64bnt.js +0 -5
  358. package/dist/chunk-06w68hyg.js +0 -7
  359. package/dist/chunk-07y6m5xx.js +0 -3
  360. package/dist/chunk-095s3972.js +0 -99
  361. package/dist/chunk-09k66d8a.js +0 -3
  362. package/dist/chunk-0a61y94n.js +0 -24
  363. package/dist/chunk-0b9w2w1y.js +0 -1
  364. package/dist/chunk-0dx4q6yq.js +0 -3
  365. package/dist/chunk-0dz85jrp.js +0 -3
  366. package/dist/chunk-0jd0pndq.js +0 -3
  367. package/dist/chunk-0p0nyq50.js +0 -6
  368. package/dist/chunk-0p1h3p3w.js +0 -3
  369. package/dist/chunk-0qakwen3.js +0 -1
  370. package/dist/chunk-0qnz93q2.js +0 -3
  371. package/dist/chunk-10debkj5.js +0 -71
  372. package/dist/chunk-15nesxgt.js +0 -5224
  373. package/dist/chunk-1sr54zp8.js +0 -3
  374. package/dist/chunk-1v49fwr5.js +0 -3
  375. package/dist/chunk-1xz0w746.js +0 -1539
  376. package/dist/chunk-1z5nhbjt.js +0 -90
  377. package/dist/chunk-1zgsgk4b.js +0 -1
  378. package/dist/chunk-20swzkx3.js +0 -216
  379. package/dist/chunk-27zsyhrd.js +0 -4
  380. package/dist/chunk-29y0hk5z.js +0 -3
  381. package/dist/chunk-2cdvw21b.js +0 -274
  382. package/dist/chunk-2j21d3ka.js +0 -161
  383. package/dist/chunk-2jxbwnkz.js +0 -2
  384. package/dist/chunk-31dr4bys.js +0 -6
  385. package/dist/chunk-35faj94w.js +0 -15
  386. package/dist/chunk-39gm08bn.js +0 -39
  387. package/dist/chunk-3a4qsygv.js +0 -51
  388. package/dist/chunk-3te20hqw.js +0 -3
  389. package/dist/chunk-43t7faps.js +0 -24
  390. package/dist/chunk-44hd3kab.js +0 -1
  391. package/dist/chunk-47kpewks.js +0 -71
  392. package/dist/chunk-4aj7ftqb.js +0 -1
  393. package/dist/chunk-4d2y57k7.js +0 -3
  394. package/dist/chunk-4deg33rw.js +0 -57
  395. package/dist/chunk-4k7d8p8d.js +0 -188
  396. package/dist/chunk-4qcy5tx6.js +0 -53
  397. package/dist/chunk-4x7kae4j.js +0 -3
  398. package/dist/chunk-55nwdnsd.js +0 -3
  399. package/dist/chunk-55yp0q8t.js +0 -201
  400. package/dist/chunk-5f43yz6z.js +0 -12
  401. package/dist/chunk-5shey2e4.js +0 -3
  402. package/dist/chunk-6b5k6w2q.js +0 -7
  403. package/dist/chunk-6djzdes9.js +0 -14
  404. package/dist/chunk-6e4c6g46.js +0 -3
  405. package/dist/chunk-6eqbxcrd.js +0 -8
  406. package/dist/chunk-7074g241.js +0 -3
  407. package/dist/chunk-7b6s3g65.js +0 -179
  408. package/dist/chunk-7cgmq685.js +0 -33
  409. package/dist/chunk-7dkz6z2s.js +0 -3
  410. package/dist/chunk-7ed3tean.js +0 -3
  411. package/dist/chunk-7gd339hd.js +0 -109
  412. package/dist/chunk-7j5e8sdj.js +0 -3
  413. package/dist/chunk-7n8g0nfn.js +0 -38
  414. package/dist/chunk-7sqdeqsw.js +0 -1
  415. package/dist/chunk-80g54ncj.js +0 -3
  416. package/dist/chunk-8a5bxece.js +0 -4
  417. package/dist/chunk-8ahwt6a4.js +0 -721
  418. package/dist/chunk-8b3z0zd5.js +0 -8
  419. package/dist/chunk-8dhdpa5h.js +0 -4
  420. package/dist/chunk-8n9nnqr6.js +0 -3
  421. package/dist/chunk-8qc1bsym.js +0 -3
  422. package/dist/chunk-8va64c9n.js +0 -3
  423. package/dist/chunk-8vtm0m84.js +0 -3
  424. package/dist/chunk-8xj7c3mf.js +0 -8
  425. package/dist/chunk-988dw6q3.js +0 -9
  426. package/dist/chunk-9b6cec0v.js +0 -321
  427. package/dist/chunk-9cf97f9p.js +0 -3
  428. package/dist/chunk-9ecv8aqj.js +0 -14
  429. package/dist/chunk-9eq3ht5f.js +0 -8
  430. package/dist/chunk-9jtj77jx.js +0 -3
  431. package/dist/chunk-9t14se2t.js +0 -83
  432. package/dist/chunk-9wmq2272.js +0 -3
  433. package/dist/chunk-9zbk5zx5.js +0 -57
  434. package/dist/chunk-a2g2qb2y.js +0 -386
  435. package/dist/chunk-a3hyn4we.js +0 -79
  436. package/dist/chunk-a87qqft6.js +0 -194
  437. package/dist/chunk-ah88wzbg.js +0 -10
  438. package/dist/chunk-akf1r75r.js +0 -102
  439. package/dist/chunk-amaa1bev.js +0 -2
  440. package/dist/chunk-avx8aydt.js +0 -3
  441. package/dist/chunk-ay9qf4zj.js +0 -6
  442. package/dist/chunk-aywxfqev.js +0 -3
  443. package/dist/chunk-azkegjd8.js +0 -61
  444. package/dist/chunk-b77wjyn7.js +0 -84
  445. package/dist/chunk-baf1hfwh.js +0 -231
  446. package/dist/chunk-bdk6g1vj.js +0 -3
  447. package/dist/chunk-bhqgmyqw.js +0 -36
  448. package/dist/chunk-bk3j0n82.js +0 -341
  449. package/dist/chunk-bndmdahk.js +0 -3
  450. package/dist/chunk-bpgg59wa.js +0 -3
  451. package/dist/chunk-bs3gmfxz.js +0 -5
  452. package/dist/chunk-bxc7kjsk.js +0 -32
  453. package/dist/chunk-c7jg8w13.js +0 -3
  454. package/dist/chunk-ckxjqqn9.js +0 -3
  455. package/dist/chunk-cn8az1b4.js +0 -1
  456. package/dist/chunk-d0zjtdw4.js +0 -29
  457. package/dist/chunk-d1qh1x2g.js +0 -3
  458. package/dist/chunk-djddhmcc.js +0 -60
  459. package/dist/chunk-dqn9gyhb.js +0 -21
  460. package/dist/chunk-drjq2zwg.js +0 -3
  461. package/dist/chunk-dvfs1h3c.js +0 -117
  462. package/dist/chunk-e2q9c5vq.js +0 -8
  463. package/dist/chunk-e98v1bc6.js +0 -12
  464. package/dist/chunk-ejayeex8.js +0 -2
  465. package/dist/chunk-ejh8fyak.js +0 -3
  466. package/dist/chunk-ek2w6zvy.js +0 -4
  467. package/dist/chunk-ewa88139.js +0 -6
  468. package/dist/chunk-fjk3x41y.js +0 -3
  469. package/dist/chunk-frg705zq.js +0 -302
  470. package/dist/chunk-fzm3y0r3.js +0 -267
  471. package/dist/chunk-g1vt329s.js +0 -21
  472. package/dist/chunk-g4ps1dj8.js +0 -140
  473. package/dist/chunk-gkzq8zw4.js +0 -23
  474. package/dist/chunk-gz5fmp3q.js +0 -3
  475. package/dist/chunk-h0hjy0kn.js +0 -292
  476. package/dist/chunk-h5jxydqq.js +0 -147
  477. package/dist/chunk-h5wa62ek.js +0 -145
  478. package/dist/chunk-h7aq56qj.js +0 -28
  479. package/dist/chunk-h82kjdr4.js +0 -83
  480. package/dist/chunk-hbehnm18.js +0 -3
  481. package/dist/chunk-hbgxbgam.js +0 -58
  482. package/dist/chunk-hc2mf5h6.js +0 -4
  483. package/dist/chunk-hjm2xab3.js +0 -3
  484. package/dist/chunk-hjv76kcw.js +0 -1
  485. package/dist/chunk-hrnnh4tq.js +0 -142
  486. package/dist/chunk-ht43ds42.js +0 -236
  487. package/dist/chunk-hxx3za24.js +0 -62
  488. package/dist/chunk-hy8820vc.js +0 -6
  489. package/dist/chunk-j447q024.js +0 -28
  490. package/dist/chunk-j58vh0w6.js +0 -314
  491. package/dist/chunk-j8tn8enq.js +0 -3
  492. package/dist/chunk-jc0fc4ht.js +0 -11
  493. package/dist/chunk-jcs0ymw7.js +0 -3
  494. package/dist/chunk-jjamhxpm.js +0 -139
  495. package/dist/chunk-jjb05d21.js +0 -3
  496. package/dist/chunk-jjdq01dv.js +0 -128
  497. package/dist/chunk-jnmgm2xw.js +0 -5
  498. package/dist/chunk-jpndqst5.js +0 -3
  499. package/dist/chunk-jt0ezawy.js +0 -351
  500. package/dist/chunk-jz73j3qs.js +0 -169
  501. package/dist/chunk-k21df0pg.js +0 -10
  502. package/dist/chunk-k848dzsa.js +0 -429
  503. package/dist/chunk-kdfe4t91.js +0 -3
  504. package/dist/chunk-keawsbpn.js +0 -5
  505. package/dist/chunk-kgym7ch9.js +0 -8
  506. package/dist/chunk-khdn7jwe.js +0 -3
  507. package/dist/chunk-km25cwz6.js +0 -3
  508. package/dist/chunk-knm8a8yx.js +0 -398
  509. package/dist/chunk-krqn0ddk.js +0 -3
  510. package/dist/chunk-ktkmvaa8.js +0 -1
  511. package/dist/chunk-kx6eb6ma.js +0 -4
  512. package/dist/chunk-kypas8vy.js +0 -4
  513. package/dist/chunk-m167kjhv.js +0 -4
  514. package/dist/chunk-m491r0rj.js +0 -358
  515. package/dist/chunk-m8448qby.js +0 -11
  516. package/dist/chunk-mgj88zeq.js +0 -64
  517. package/dist/chunk-mhgk632d.js +0 -3
  518. package/dist/chunk-mv4fb50w.js +0 -1
  519. package/dist/chunk-n5kg7fpx.js +0 -7
  520. package/dist/chunk-n98x35xd.js +0 -8
  521. package/dist/chunk-n9dhs1dw.js +0 -106
  522. package/dist/chunk-nd9rmddh.js +0 -6
  523. package/dist/chunk-ngxfwzq3.js +0 -3
  524. package/dist/chunk-nhv099jv.js +0 -19
  525. package/dist/chunk-nm15ccsg.js +0 -5
  526. package/dist/chunk-npfmdb6y.js +0 -71
  527. package/dist/chunk-nvwb4x04.js +0 -3
  528. package/dist/chunk-nw34xajc.js +0 -8
  529. package/dist/chunk-p077sw22.js +0 -3
  530. package/dist/chunk-p1h8065h.js +0 -3
  531. package/dist/chunk-p3e0cqtt.js +0 -34
  532. package/dist/chunk-p3fpb79v.js +0 -477
  533. package/dist/chunk-p52yzjq6.js +0 -498
  534. package/dist/chunk-p73meypx.js +0 -134
  535. package/dist/chunk-pa9zb7ty.js +0 -4
  536. package/dist/chunk-payfb24w.js +0 -207
  537. package/dist/chunk-pcm1vd8w.js +0 -3
  538. package/dist/chunk-pcntd9h4.js +0 -3
  539. package/dist/chunk-pg1fvqb9.js +0 -167
  540. package/dist/chunk-psc3wfcf.js +0 -1115
  541. package/dist/chunk-pznnww6k.js +0 -6
  542. package/dist/chunk-q6zhd9yf.js +0 -3
  543. package/dist/chunk-qa59zejf.js +0 -246
  544. package/dist/chunk-qvrbjpdc.js +0 -3
  545. package/dist/chunk-qygvvygy.js +0 -12
  546. package/dist/chunk-r0jcmpv6.js +0 -68
  547. package/dist/chunk-r5m9xtm7.js +0 -3
  548. package/dist/chunk-rh80q1nd.js +0 -1
  549. package/dist/chunk-rkffm9sy.js +0 -128
  550. package/dist/chunk-rpx5fa65.js +0 -3
  551. package/dist/chunk-rqxf5hns.js +0 -3
  552. package/dist/chunk-rtr974rc.js +0 -30
  553. package/dist/chunk-rvptcndz.js +0 -3
  554. package/dist/chunk-rw26rpek.js +0 -171
  555. package/dist/chunk-rw7937v4.js +0 -19
  556. package/dist/chunk-rwrv9wbf.js +0 -3
  557. package/dist/chunk-rz2ec6g7.js +0 -347
  558. package/dist/chunk-s6ja2bdg.js +0 -66
  559. package/dist/chunk-scpkdrdb.js +0 -4
  560. package/dist/chunk-shv88d2d.js +0 -10
  561. package/dist/chunk-t0c9wvpr.js +0 -3
  562. package/dist/chunk-tffh3b1e.js +0 -35
  563. package/dist/chunk-tg2f1mzq.js +0 -11
  564. package/dist/chunk-trfswy66.js +0 -77
  565. package/dist/chunk-tzwtg722.js +0 -3
  566. package/dist/chunk-v7f8jj15.js +0 -4
  567. package/dist/chunk-v8j49spx.js +0 -3
  568. package/dist/chunk-v97390pe.js +0 -1
  569. package/dist/chunk-vcr5pzpx.js +0 -233
  570. package/dist/chunk-veeerpwa.js +0 -3
  571. package/dist/chunk-vg5kt6az.js +0 -4
  572. package/dist/chunk-vgv7jvyz.js +0 -219
  573. package/dist/chunk-vjbefncc.js +0 -3
  574. package/dist/chunk-vmxjghsm.js +0 -3
  575. package/dist/chunk-vw7vqd76.js +0 -3
  576. package/dist/chunk-vx22he47.js +0 -1
  577. package/dist/chunk-w3b6m427.js +0 -45
  578. package/dist/chunk-wazkqv7n.js +0 -3
  579. package/dist/chunk-wf7zrjsw.js +0 -138
  580. package/dist/chunk-wfg2gm11.js +0 -3
  581. package/dist/chunk-wg9k6h8w.js +0 -12
  582. package/dist/chunk-wkz2vwkr.js +0 -81
  583. package/dist/chunk-wvef3ngh.js +0 -127
  584. package/dist/chunk-wvf31nzs.js +0 -3
  585. package/dist/chunk-x05nxhyv.js +0 -262
  586. package/dist/chunk-x0770gt9.js +0 -4
  587. package/dist/chunk-x24s4heg.js +0 -1166
  588. package/dist/chunk-x3r64r0c.js +0 -6
  589. package/dist/chunk-x5g9w4hh.js +0 -5
  590. package/dist/chunk-xgkv66q5.js +0 -2230
  591. package/dist/chunk-xqq1vxb6.js +0 -1
  592. package/dist/chunk-xs03kc1h.js +0 -196
  593. package/dist/chunk-xv34zbp4.js +0 -3
  594. package/dist/chunk-xw36p73h.js +0 -90
  595. package/dist/chunk-xyg1r5w0.js +0 -4
  596. package/dist/chunk-xys2sxh6.js +0 -16
  597. package/dist/chunk-y0qg6rrv.js +0 -3
  598. package/dist/chunk-y1k17c8b.js +0 -21
  599. package/dist/chunk-y5xz0jc4.js +0 -141
  600. package/dist/chunk-y6xsqe9a.js +0 -10
  601. package/dist/chunk-yb1t2h8h.js +0 -11
  602. package/dist/chunk-ygvyc6wv.js +0 -90
  603. package/dist/chunk-yj4x5ehw.js +0 -21
  604. package/dist/chunk-yn38c15w.js +0 -4
  605. package/dist/chunk-ynhngsdh.js +0 -3
  606. package/dist/chunk-yrsb6j3z.js +0 -3
  607. package/dist/chunk-yywfvfph.js +0 -2
  608. package/dist/chunk-zcxzdrn7.js +0 -5
  609. package/dist/chunk-zen6ax1y.js +0 -27
  610. package/dist/chunk-zf2pek72.js +0 -3
  611. package/dist/chunk-zk3d0jjf.js +0 -7
  612. package/dist/chunk-zy3rp1ab.js +0 -93
@@ -1,102 +0,0 @@
1
- // @bun
2
- var B={duration:300,easing:"ease-out",removePlaceholder:!1,loadedClass:"stx-img-loaded",loadingClass:"stx-img-loading"};function G(k,z={}){let j={...B,...z},J=k.closest(".stx-img-placeholder");if(!J){S(k,j);return}if(J.style.setProperty("--stx-img-transition-duration",`${j.duration}ms`),J.style.setProperty("--stx-img-transition-easing",j.easing),j.loadingClass)J.classList.add(j.loadingClass);if(k.complete&&k.naturalWidth>0)O(k,J,j);else k.addEventListener("load",()=>O(k,J,j),{once:!0}),k.addEventListener("error",()=>T(k,J,j),{once:!0})}function S(k,z){let j=()=>{k.style.transition=`opacity ${z.duration}ms ${z.easing}`,k.style.opacity="1",k.classList.remove(z.loadingClass),k.classList.add(z.loadedClass)};if(k.complete&&k.naturalWidth>0)j();else k.style.opacity="0",k.classList.add(z.loadingClass),k.addEventListener("load",j,{once:!0})}function O(k,z,j){if(j.loadingClass)z.classList.remove(j.loadingClass);if(j.loadedClass)z.classList.add(j.loadedClass);if(k.style.opacity="1",j.removePlaceholder)setTimeout(()=>{z.style.backgroundImage="none"},j.duration)}function T(k,z,j){if(j.loadingClass)z.classList.remove(j.loadingClass);z.classList.add("stx-img-error"),k.classList.add("stx-img-error")}function u(k,z){let j=R(k),J=z.getContext("2d");if(!J)return;z.width=j.w,z.height=j.h;let K=J.createImageData(j.w,j.h);K.data.set(j.rgba),J.putImageData(K,0,0)}function R(k){let z=k[0]|k[1]<<8|k[2]<<16,j=(z&63)/63,J=(z>>6&63)/31.5-1,K=(z>>12&63)/31.5-1,Z=(z>>18&31)/31,Q=z>>23!==0,Y=k[3]|k[4]<<8,D=(Y>>3&63)/63,I=(Y>>9&63)/63,$=Y>>15!==0,_=Math.max(3,$?Q?5:7:Q?5:5),A=Math.max(3,$?Q?5:5:Q?5:7),L=32,f=32,M=new Uint8ClampedArray(4096);for(let V=0;V<32;V++)for(let W=0;W<32;W++){let X=(V*32+W)*4,C=W/31,F=V/31,N=j+(C-0.5)*Z*0.5+(F-0.5)*Z*0.5,U=J*(1-C*0.3),P=K*(1-F*0.3),E=N-0.6666666666666666*U,H=(3*N-E+P)/2,q=H-P;M[X]=Math.max(0,Math.min(255,Math.round(H*255))),M[X+1]=Math.max(0,Math.min(255,Math.round(q*255))),M[X+2]=Math.max(0,Math.min(255,Math.round(E*255))),M[X+3]=255}return{w:32,h:32,rgba:M}}function y(k){let z=R(k),j=document.createElement("canvas");j.width=z.w,j.height=z.h;let J=j.getContext("2d");if(!J)return"";let K=J.createImageData(z.w,z.h);return K.data.set(z.rgba),J.putImageData(K,0,0),j.toDataURL("image/png")}function v(k){let z=atob(k),j=new Uint8Array(z.length);for(let J=0;J<z.length;J++)j[J]=z.charCodeAt(J);return j}function x(k,z,j=300){return new Promise((J)=>{k.style.transition=`opacity ${j}ms ease-out`,z.style.transition=`opacity ${j}ms ease-out`,z.style.opacity="0",z.offsetWidth,k.style.opacity="0",z.style.opacity="1",setTimeout(J,j)})}function w(k={}){document.querySelectorAll("[data-stx-blur-up], .stx-img-placeholder img").forEach((j)=>{G(j,k)})}function l(){return`
3
- (function() {
4
- 'use strict';
5
-
6
- if (typeof window === 'undefined') return;
7
-
8
- var defaultOptions = {
9
- duration: 300,
10
- easing: 'ease-out',
11
- loadedClass: 'stx-img-loaded'
12
- };
13
-
14
- function initBlurUp(img, options) {
15
- options = Object.assign({}, defaultOptions, options);
16
- var wrapper = img.closest('.stx-img-placeholder');
17
-
18
- if (!wrapper) {
19
- if (img.complete && img.naturalWidth > 0) {
20
- img.style.opacity = '1';
21
- }
22
- else {
23
- img.style.opacity = '0';
24
- img.style.transition = 'opacity ' + options.duration + 'ms ' + options.easing;
25
- img.onload = function() { img.style.opacity = '1'; };
26
- }
27
- return;
28
- }
29
-
30
- wrapper.style.setProperty('--stx-img-transition-duration', options.duration + 'ms');
31
- wrapper.style.setProperty('--stx-img-transition-easing', options.easing);
32
-
33
- var onLoaded = function() {
34
- wrapper.classList.add(options.loadedClass);
35
- img.style.opacity = '1';
36
- };
37
-
38
- if (img.complete && img.naturalWidth > 0) {
39
- onLoaded();
40
- }
41
- else {
42
- img.addEventListener('load', onLoaded, { once: true });
43
- }
44
- }
45
-
46
- function init() {
47
- var elements = document.querySelectorAll('.stx-img-placeholder img, [data-stx-blur-up]');
48
- elements.forEach(function(img) { initBlurUp(img); });
49
- }
50
-
51
- // Initialize when DOM is ready
52
- if (document.readyState === 'loading') {
53
- document.addEventListener('DOMContentLoaded', init);
54
- }
55
- else {
56
- init();
57
- }
58
-
59
- // Expose for manual use
60
- window.STX = window.STX || {};
61
- window.STX.initBlurUp = initBlurUp;
62
- window.STX.initAllBlurUp = init;
63
- })();
64
- `.trim()}function c(){return`
65
- .stx-img-placeholder {
66
- position: relative;
67
- overflow: hidden;
68
- background-size: cover;
69
- background-position: center;
70
- background-repeat: no-repeat;
71
- }
72
-
73
- .stx-img-placeholder img {
74
- display: block;
75
- width: 100%;
76
- height: auto;
77
- opacity: 0;
78
- transition: opacity var(--stx-img-transition-duration, 300ms) var(--stx-img-transition-easing, ease-out);
79
- }
80
-
81
- .stx-img-placeholder.stx-img-loaded img {
82
- opacity: 1;
83
- }
84
-
85
- .stx-img-blur {
86
- filter: blur(20px);
87
- transform: scale(1.1);
88
- transition: filter var(--stx-img-transition-duration, 300ms) var(--stx-img-transition-easing, ease-out),
89
- transform var(--stx-img-transition-duration, 300ms) var(--stx-img-transition-easing, ease-out);
90
- }
91
-
92
- .stx-img-loaded .stx-img-blur,
93
- .stx-img-blur.stx-img-loaded {
94
- filter: blur(0);
95
- transform: scale(1);
96
- }
97
-
98
- .stx-img-error {
99
- opacity: 0.5;
100
- }
101
- `.trim()}
102
- export{G as el,u as fl,R as gl,y as hl,v as il,x as jl,w as kl,l as ll,c as ml};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ey as A,fy as _,hy as B}from"./chunk-bs3gmfxz.js";function w(K){let Q=[],L=0;while(L<K.length){let G=K.indexOf("{{",L),j=K.indexOf("{!!",L),O=!1,J;if(G===-1&&j===-1)break;else if(G===-1)J=j,O=!0;else if(j===-1)J=G,O=!1;else if(j<G)J=j,O=!0;else J=G,O=!1;if(!O&&K.slice(J,J+3)==="{{{")O=!0;let H=O?K.slice(J,J+3)==="{{{"?"{{{":"{!!":"{{",Y=O?H==="{{{"?"}}}":"!!}":"}}",W=J+H.length,X=M(K,W,Y);if(X===-1){L=J+1;continue}let Z=K.slice(W,X).trim(),U=X+Y.length;Q.push({fullMatch:K.slice(J,U),expression:Z,start:J,end:U,isRaw:O}),L=U}return Q}function M(K,Q,L){let G=Q,j=null,O={paren:0,bracket:0,brace:0},J=0;while(G<K.length){let H=K[G];if((G>0?K[G-1]:"")==="\\"&&j){G++;continue}if((H==='"'||H==="'")&&!j){j=H,G++;continue}if(H===j&&j!=="`"){j=null,G++;continue}if(H==="`"&&!j){j="`",G++;continue}if(H==="`"&&j==="`"&&J===0){j=null,G++;continue}if(j==="`"&&H==="$"&&K[G+1]==="{"){J++,G+=2;continue}if(J>0){if(H==="{")J++;else if(H==="}")J--;G++;continue}if(j){G++;continue}if(H==="(")O.paren++;else if(H===")")O.paren--;else if(H==="[")O.bracket++;else if(H==="]")O.bracket--;else if(H==="{")O.brace++;else if(H==="}")O.brace--;if(O.paren===0&&O.bracket===0&&O.brace<=0){if(K.slice(G,G+L.length)===L)return G}G++}return-1}function D(K){let Q=B(K);if(Q.length===0)return{baseExpression:"",filters:[]};let L=Q[0],G=[];for(let j=1;j<Q.length;j++){let O=v(Q[j]);if(O)G.push(O)}return{baseExpression:L,filters:G}}function v(K){let Q=K.trim();if(!Q)return null;let L=Q.indexOf("(");if(L===-1)return{name:Q,args:[]};let G=Q.slice(0,L).trim(),j=L+1,O=_(Q,"(",")",L);if(O===-1)return{name:G,args:[]};let J=Q.slice(j,O),H=y(J);return{name:G,args:H}}function y(K){let Q=[],L="",G={paren:0,bracket:0,brace:0},j=null,O=0;for(let J=0;J<K.length;J++){let H=K[J];if((J>0?K[J-1]:"")==="\\"&&j){L+=H;continue}if((H==='"'||H==="'")&&!j){j=H,L+=H;continue}if(H===j&&j!=="`"){j=null,L+=H;continue}if(H==="`"&&!j){j="`",L+=H;continue}if(H==="`"&&j==="`"&&O===0){j=null,L+=H;continue}if(j==="`"&&H==="$"&&K[J+1]==="{"){O++,L+="${",J++;continue}if(O>0&&H==="{"){O++,L+=H;continue}if(O>0&&H==="}"){O--,L+=H;continue}if(j){L+=H;continue}if(H==="(")G.paren++;else if(H===")")G.paren--;else if(H==="[")G.bracket++;else if(H==="]")G.bracket--;else if(H==="{")G.brace++;else if(H==="}")G.brace--;if(H===","&&G.paren===0&&G.bracket===0&&G.brace===0){Q.push(L.trim()),L="";continue}L+=H}if(L.trim())Q.push(L.trim());return Q}function f(K,Q){let L=Q;while(L<K.length&&/\s/.test(K[L]))L++;if(K[L]!=="(")return null;let G=_(K,"(",")",L);if(G===-1)return null;return{params:K.slice(L+1,G),endPos:G+1}}function R(K){let Q=[],G=new A(K).tokenize().filter((O)=>O.type!=="WHITESPACE"&&O.type!=="COMMENT"),j=0;while(j<G.length){let O=G[j],J=!1;if(O.type==="IDENTIFIER"&&O.value==="export"){if(J=!0,j++,j>=G.length)break}let H=G[j];if(H.type==="IDENTIFIER"&&(H.value==="const"||H.value==="let"||H.value==="var")){let Y=H.value;if(j++,j>=G.length)break;let W=G[j];if(W.type==="IDENTIFIER"){let X=W.value;if(j++,j<G.length&&G[j].type==="OPERATOR"&&G[j].value==="="){j++;let Z=j<G.length?G[j].start:K.length,U=N(G,j,K);j=U.nextIndex,Q.push({type:"variable",name:X,value:K.slice(Z,U.endPos),exported:J,start:H.start,end:U.endPos})}}else if(W.type==="PUNCTUATION"&&(W.value==="{"||W.value==="[")){let X=W.start,Z=W.value==="{"?"}":"]",U=_(K,W.value,Z,X);if(U!==-1){let F=K.slice(X,U+1);if(j=V(G,U+1),j<G.length&&G[j].type==="OPERATOR"&&G[j].value==="="){j++;let z=j<G.length?G[j].start:K.length,$=N(G,j,K);j=$.nextIndex;let q=`__stx_destructured_${Q.length}`;Q.push({type:"variable",name:q,value:`${K.slice(z,$.endPos)}; ${Y} ${F} = ${q}`,exported:J,start:H.start,end:$.endPos})}}}}else if(H.type==="IDENTIFIER"&&H.value==="function"){let Y=J?G[j-1].start:H.start;if(j++,j>=G.length)break;let W=G[j];if(W.type==="IDENTIFIER"){let X=W.value;j++;let Z=-1;while(j<G.length){if(G[j].type==="PUNCTUATION"&&G[j].value==="{"){Z=G[j].start;break}j++}if(Z!==-1){let U=_(K,"{","}",Z);if(U!==-1)Q.push({type:"function",name:X,value:K.slice(Y,U+1).replace(/^export\s+/,""),exported:J,start:Y,end:U+1}),j=V(G,U+1)}}}else j++}return Q}function N(K,Q,L){let G=Q,j={paren:0,bracket:0,brace:0},O=Q<K.length?K[Q].start:L.length;while(G<K.length){let J=K[G];if(J.type==="PUNCTUATION"){if(J.value==="(")j.paren++;else if(J.value===")")j.paren--;else if(J.value==="[")j.bracket++;else if(J.value==="]")j.bracket--;else if(J.value==="{")j.brace++;else if(J.value==="}")j.brace--;if(J.value===";"&&j.paren===0&&j.bracket===0&&j.brace===0){O=J.start,G++;break}}if(J.type==="IDENTIFIER"&&(J.value==="const"||J.value==="let"||J.value==="var"||J.value==="function"||J.value==="export")){if(j.paren===0&&j.bracket===0&&j.brace===0){O=K[G-1]?.end??J.start;break}}O=J.end,G++}return{nextIndex:G,endPos:O}}function V(K,Q){for(let L=0;L<K.length;L++)if(K[L].start>=Q)return L;return K.length}export{w as Ux,D as Vx,y as Wx,f as Xx,R as Yx};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{_q as J}from"./chunk-r0jcmpv6.js";function Q(E,D){let A=new Set,B=new Map,C=new Map,F={globalProperties:{},performance:!1,compilerOptions:{}},z={config:F,_components:B,_directives:C,_installedPlugins:A,use(q,...x){if(A.has(q))return z;if(A.add(q),typeof q==="function")q(z,...x);else if(typeof q.install==="function")q.install(z,...x);return z},provide(q,x){return J(q,x),z},component(q,x){if(!x)return B.get(q);return B.set(q,x),z},directive(q,x){if(!x)return C.get(q);return C.set(q,x),z},mount(q){if(typeof document<"u"){let x=globalThis.__stx_globals||(globalThis.__stx_globals={});Object.assign(x,F.globalProperties),document.querySelectorAll("[v-cloak]").forEach((K)=>{K.removeAttribute("v-cloak")})}return z},unmount(){B.clear(),C.clear(),A.clear()}};return z}function R(E){return class extends HTMLElement{_component;_shadow;constructor(){super();this._shadow=this.attachShadow({mode:"open"}),this._component=E}connectedCallback(){if(this._component?.render){let D=this._component.render();if(typeof D==="string")this._shadow.innerHTML=D}else if(this._component?.template)this._shadow.innerHTML=this._component.template;else if(typeof this._component==="string")this._shadow.innerHTML=this._component}disconnectedCallback(){this._shadow.innerHTML=""}}}
3
- export{Q as Rq,R as Sq};
@@ -1,6 +0,0 @@
1
- // @bun
2
- import{existsSync as _,readFileSync as $}from"fs";var A={strict:!1,allowAny:!0,checkPropertyAccess:!0,checkFunctionCalls:!0,includeBuiltins:!0},X={console:{kind:"object",properties:{log:{kind:"function",params:[{name:"message",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"void"}},error:{kind:"function",params:[{name:"message",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"void"}},warn:{kind:"function",params:[{name:"message",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"void"}}}},Math:{kind:"object",properties:{abs:{kind:"function",params:[{name:"x",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},floor:{kind:"function",params:[{name:"x",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},ceil:{kind:"function",params:[{name:"x",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},round:{kind:"function",params:[{name:"x",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},max:{kind:"function",params:[{name:"values",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},min:{kind:"function",params:[{name:"values",type:{kind:"primitive",value:"number"}}],returnType:{kind:"primitive",value:"number"}},random:{kind:"function",params:[],returnType:{kind:"primitive",value:"number"}},PI:{kind:"primitive",value:"number"},E:{kind:"primitive",value:"number"}}},JSON:{kind:"object",properties:{stringify:{kind:"function",params:[{name:"value",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"string"}},parse:{kind:"function",params:[{name:"text",type:{kind:"primitive",value:"string"}}],returnType:{kind:"primitive",value:"any"}}}},Date:{kind:"function",returnType:{kind:"object",properties:{getTime:{kind:"function",params:[],returnType:{kind:"primitive",value:"number"}},toISOString:{kind:"function",params:[],returnType:{kind:"primitive",value:"string"}},toLocaleDateString:{kind:"function",params:[],returnType:{kind:"primitive",value:"string"}}}}},Array:{kind:"object",properties:{isArray:{kind:"function",params:[{name:"value",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"boolean"}},from:{kind:"function",params:[{name:"arrayLike",type:{kind:"primitive",value:"any"}}],returnType:{kind:"array",elementType:{kind:"primitive",value:"any"}}}}},Object:{kind:"object",properties:{keys:{kind:"function",params:[{name:"obj",type:{kind:"primitive",value:"any"}}],returnType:{kind:"array",elementType:{kind:"primitive",value:"string"}}},values:{kind:"function",params:[{name:"obj",type:{kind:"primitive",value:"any"}}],returnType:{kind:"array",elementType:{kind:"primitive",value:"any"}}},entries:{kind:"function",params:[{name:"obj",type:{kind:"primitive",value:"any"}}],returnType:{kind:"array",elementType:{kind:"primitive",value:"any"}}}}},String:{kind:"function",params:[{name:"value",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"string"}},Number:{kind:"function",params:[{name:"value",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"number"}},Boolean:{kind:"function",params:[{name:"value",type:{kind:"primitive",value:"any"}}],returnType:{kind:"primitive",value:"boolean"}},props:{kind:"object",properties:{}},slot:{kind:"primitive",value:"string"},loop:{kind:"object",properties:{index:{kind:"primitive",value:"number"},iteration:{kind:"primitive",value:"number"},first:{kind:"primitive",value:"boolean"},last:{kind:"primitive",value:"boolean"},even:{kind:"primitive",value:"boolean"},odd:{kind:"primitive",value:"boolean"},count:{kind:"primitive",value:"number"},remaining:{kind:"primitive",value:"number"},depth:{kind:"primitive",value:"number"},parent:{kind:"object",properties:{}}}}};class Y{options;variables=new Map;errors=[];warnings=[];currentFile="";constructor(z={}){if(this.options={...A,...z},this.options.includeBuiltins)Object.entries(X).forEach(([j,q])=>{this.variables.set(j,q)});if(this.options.customTypes)Object.entries(this.options.customTypes).forEach(([j,q])=>{this.variables.set(j,q)})}checkFile(z){if(this.currentFile=z,this.errors=[],this.warnings=[],!_(z))return this.errors.push({message:`File not found: ${z}`,file:z,line:0,column:0,expression:"",severity:"error"}),this.getResult();let j=$(z,"utf-8");return this.checkTemplate(j,z)}checkTemplate(z,j="<inline>"){this.currentFile=j,this.errors=[],this.warnings=[];let q=z.match(/<script\b[^>]*>([\s\S]*?)<\/script>/i);if(q)this.analyzeScript(q[1],z.indexOf(q[0]));return this.checkDirectives(z),this.checkExpressions(z),this.getResult()}analyzeScript(z,j){let q=z.split(`
3
- `),H=this.getLineNumber(j);for(let B=0;B<q.length;B++){let D=q[B],G=H+B;this.extractTypedVariables(D,G),this.extractInterfaces(D,q,B,G),this.extractTypeAliases(D,G)}}extractTypedVariables(z,j){let q=z.match(/(?:export\s+)?(?:const|let|var)\s+(\w+)\s*:\s*([^=]+?)\s*=/);if(q){let[,D,G]=q,J=this.parseTypeAnnotation(G.trim());this.variables.set(D,J);return}let H=z.match(/(?:export\s+)?(?:const|let|var)\s+(\w+)\s*=\s*(.+)/);if(H){let[,D,G]=H,J=this.inferType(G.trim());this.variables.set(D,J);return}let B=z.match(/(?:export\s+)?function\s+(\w+)\s*\(([^)]*)\)(?:\s*:\s*(\w+))?/);if(B){let[,D,G,J]=B,K=this.parseParams(G),Q=J?this.parseTypeAnnotation(J):{kind:"primitive",value:"any"};this.variables.set(D,{kind:"function",params:K,returnType:Q})}}extractInterfaces(z,j,q,H){let B=z.match(/(?:export\s+)?interface\s+(\w+)\s*\{/);if(B){let[,D]=B,G={},J=1,K=q+1;while(K<j.length&&J>0){let Q=j[K].trim();if(Q.includes("{"))J++;if(Q.includes("}"))J--;let U=Q.match(/(\w+)\??\s*:\s*([^;]+)/);if(U&&J>0){let[,W,V]=U;G[W]=this.parseTypeAnnotation(V.trim())}K++}this.variables.set(D,{kind:"object",name:D,properties:G})}}extractTypeAliases(z,j){let q=z.match(/(?:export\s+)?type\s+(\w+)\s*=\s*(.+)/);if(q){let[,H,B]=q,D=this.parseTypeAnnotation(B.trim());D.name=H,this.variables.set(H,D)}}parseTypeAnnotation(z){let j=z.trim();if(j.includes("|"))return{kind:"union",types:j.split("|").map((D)=>this.parseTypeAnnotation(D.trim()))};if(j.includes("&"))return{kind:"intersection",types:j.split("&").map((D)=>this.parseTypeAnnotation(D.trim()))};if(j.endsWith("[]"))return{kind:"array",elementType:this.parseTypeAnnotation(j.slice(0,-2))};let q=j.match(/^Array<(.+)>$/);if(q)return{kind:"array",elementType:this.parseTypeAnnotation(q[1])};if(j.startsWith("{")&&j.endsWith("}")){let B={},D=j.slice(1,-1).trim();if(D){let G=this.splitByComma(D);for(let J of G){let K=J.match(/(\w+)\??\s*:\s*(.+)/);if(K){let[,Q,U]=K;B[Q]=this.parseTypeAnnotation(U.trim())}}}return{kind:"object",properties:B}}if(j.startsWith('"')||j.startsWith("'"))return{kind:"literal",value:j.slice(1,-1)};if(/^\d+$/.test(j))return{kind:"literal",value:j};if(j==="true"||j==="false")return{kind:"literal",value:j};if(["string","number","boolean","null","undefined","any","unknown","void","never"].includes(j))return{kind:"primitive",value:j};if(this.variables.has(j))return this.variables.get(j);return{kind:"primitive",value:"any"}}inferType(z){let j=z.trim().replace(/;$/,"");if(j.startsWith('"')&&j.endsWith('"')||j.startsWith("'")&&j.endsWith("'")||j.startsWith("`")&&j.endsWith("`"))return{kind:"primitive",value:"string"};if(/^-?\d+(\.\d+)?$/.test(j))return{kind:"primitive",value:"number"};if(j==="true"||j==="false")return{kind:"primitive",value:"boolean"};if(j==="null")return{kind:"primitive",value:"null"};if(j==="undefined")return{kind:"primitive",value:"undefined"};if(j.startsWith("[")){let q=j.slice(1,-1).trim();if(q){let H=this.splitByComma(q)[0];if(H)return{kind:"array",elementType:this.inferType(H.trim())}}return{kind:"array",elementType:{kind:"primitive",value:"any"}}}if(j.startsWith("{")){let q={},H=this.extractObjectLiteral(j);for(let[B,D]of Object.entries(H))q[B]=this.inferType(D);return{kind:"object",properties:q}}if(j.includes("=>")){let q=j.match(/^\(([^)]*)\)\s*(?::\s*(\w+))?\s*=>/);if(q){let H=this.parseParams(q[1]),B=q[2]?this.parseTypeAnnotation(q[2]):{kind:"primitive",value:"any"};return{kind:"function",params:H,returnType:B}}}if(/^\w+$/.test(j)&&this.variables.has(j))return this.variables.get(j);if(j.includes("."))return this.resolvePropertyAccess(j);if(j.includes("(")){let q=j.split("(")[0],H=this.variables.get(q);if(H?.kind==="function"&&H.returnType)return H.returnType}return{kind:"primitive",value:"any"}}parseParams(z){if(!z.trim())return[];let j=[],q=this.splitByComma(z);for(let H of q){let B=H.trim(),D=B.includes("?"),G=B.match(/(\w+)\??\s*(?::\s*([^=]+))?(?:\s*=)?/);if(G){let[,J,K]=G,Q=K?this.parseTypeAnnotation(K.trim()):{kind:"primitive",value:"any"};j.push({name:J,type:Q,optional:D})}}return j}checkExpressions(z){let j=/\{\{([\s\S]*?)\}\}/g,q;while((q=j.exec(z))!==null){let B=q[1].trim(),D=q.index,G=this.getLineNumber(D,z),J=this.getColumn(D,z);if(!B)continue;if(B.startsWith("!")||B.endsWith("!"))continue;this.checkExpression(B,G,J)}let H=/\{!!([\s\S]*?)!!\}/g;while((q=H.exec(z))!==null){let B=q[1].trim(),D=q.index,G=this.getLineNumber(D,z),J=this.getColumn(D,z);if(!B)continue;this.checkExpression(B,G,J)}}checkExpression(z,j,q){if(z.includes("?")&&z.includes(":")){let D=z.split("?");this.checkExpression(D[0].trim(),j,q);let G=D.slice(1).join("?").split(":");if(G.length>=2)this.checkExpression(G[0].trim(),j,q),this.checkExpression(G.slice(1).join(":").trim(),j,q);return}for(let D of["&&","||","??"])if(z.includes(D)){z.split(D).forEach((J)=>this.checkExpression(J.trim(),j,q));return}for(let D of["===","!==","==","!=",">=","<=",">","<"])if(z.includes(D)){z.split(D).forEach((J)=>this.checkExpression(J.trim(),j,q));return}if(z.startsWith("!")){this.checkExpression(z.slice(1).trim(),j,q);return}if(this.isLiteral(z))return;let H=z.match(/^(\w+(?:\.\w+)*)\s*\(/);if(H){let D=H[1],G=this.resolvePropertyAccess(D);if(G.kind!=="function"&&G.value!=="any")this.addWarning(`'${D}' is not a function`,j,q,z);return}if(z.includes(".")){if(this.resolvePropertyAccess(z).value==="undefined"&&this.options.checkPropertyAccess)this.addWarning(`Property access '${z}' may be undefined`,j,q,z);return}let B=z.match(/^\w+/)?.[0];if(B&&!this.variables.has(B))this.addError(`Variable '${B}' is not defined`,j,q,z)}checkDirectives(z){let j=/@if\s*\(([^)]+)\)/g,q;while((q=j.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}let H=/@foreach\s*\((\w+)\s+(?:as|in)\s+(\w+)(?:\s*,\s*(\w+))?\)/g;while((q=H.exec(z))!==null){let[,G,J,K]=q,Q=q.index,U=this.getLineNumber(Q,z),W=this.getColumn(Q,z);if(!this.variables.has(G))this.addError(`Collection '${G}' is not defined`,U,W,q[0]);else{let V=this.variables.get(G);if(V.kind==="array"&&V.elementType)this.variables.set(J,V.elementType);else this.variables.set(J,{kind:"primitive",value:"any"});if(K)this.variables.set(K,{kind:"primitive",value:"number"})}}let B=/@unless\s*\(([^)]+)\)/g;while((q=B.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}let D=/@switch\s*\(([^)]+)\)/g;while((q=D.exec(z))!==null){let G=q[1].trim(),J=q.index,K=this.getLineNumber(J,z),Q=this.getColumn(J,z);this.checkExpression(G,K,Q)}}resolvePropertyAccess(z){let j=z.split("."),q=this.variables.get(j[0])||{kind:"primitive",value:"any"};for(let H=1;H<j.length;H++){let B=j[H].replace(/\(\)$/,"");if(q.kind==="object"&&q.properties)if(q.properties[B])q=q.properties[B];else if(!this.options.allowAny)return{kind:"primitive",value:"undefined"};else q={kind:"primitive",value:"any"};else if(q.kind==="array"&&q.elementType)if(["length"].includes(B))q={kind:"primitive",value:"number"};else if(["map","filter","find","forEach","some","every","reduce"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"any"}};else if(["join"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"string"}};else q={kind:"primitive",value:"any"};else if(q.kind==="primitive"&&q.value==="string")if(["length"].includes(B))q={kind:"primitive",value:"number"};else if(["toUpperCase","toLowerCase","trim","slice","substring"].includes(B))q={kind:"function",returnType:{kind:"primitive",value:"string"}};else if(["split"].includes(B))q={kind:"function",returnType:{kind:"array",elementType:{kind:"primitive",value:"string"}}};else q={kind:"primitive",value:"any"};else q={kind:"primitive",value:"any"}}return q}isLiteral(z){let j=z.trim();if(j.startsWith('"')&&j.endsWith('"')||j.startsWith("'")&&j.endsWith("'")||j.startsWith("`")&&j.endsWith("`"))return!0;if(/^-?\d+(\.\d+)?$/.test(j))return!0;if(j==="true"||j==="false")return!0;if(j==="null"||j==="undefined")return!0;return!1}extractObjectLiteral(z){let j={},q=z.slice(1,-1).trim();if(!q)return j;let H=this.splitByComma(q);for(let B of H){let D=B.indexOf(":");if(D>0){let G=B.slice(0,D).trim(),J=B.slice(D+1).trim();j[G]=J}}return j}splitByComma(z){let j=[],q="",H=0,B=null;for(let D=0;D<z.length;D++){let G=z[D],J=D>0?z[D-1]:"";if((G==='"'||G==="'"||G==="`")&&J!=="\\"){if(B===G)B=null;else if(!B)B=G}if(!B){if(G==="{"||G==="["||G==="(")H++;if(G==="}"||G==="]"||G===")")H--;if(G===","&&H===0){j.push(q.trim()),q="";continue}}q+=G}if(q.trim())j.push(q.trim());return j}getLineNumber(z,j){return((j||"").slice(0,z).match(/\n/g)||[]).length+1}getColumn(z,j){let H=j.slice(0,z).lastIndexOf(`
4
- `);return z-H}addError(z,j,q,H,B,D){this.errors.push({message:z,file:this.currentFile,line:j,column:q,expression:H,expected:B,received:D,severity:"error"})}addWarning(z,j,q,H,B,D){let G={message:z,file:this.currentFile,line:j,column:q,expression:H,expected:B,received:D,severity:"warning"};if(this.options.strict)this.errors.push(G);else this.warnings.push(G)}getResult(){return{valid:this.errors.length===0,errors:this.errors,warnings:this.warnings,variables:new Map(this.variables)}}addVariable(z,j){this.variables.set(z,j)}reset(){if(this.errors=[],this.warnings=[],this.variables.clear(),this.options.includeBuiltins)Object.entries(X).forEach(([z,j])=>{this.variables.set(z,j)})}}function Z(z){return new Y(z)}function E(z,j){return Z(j).checkFile(z)}function I(z,j){return Z(j).checkTemplate(z)}function L(z){let j=[];for(let q of z.errors){if(j.push(`\x1B[31merror\x1B[0m: ${q.message}`),j.push(` --> ${q.file}:${q.line}:${q.column}`),q.expression)j.push(" |"),j.push(` | ${q.expression}`),j.push(" |");if(q.expected&&q.received)j.push(` expected: ${q.expected}`),j.push(` received: ${q.received}`);j.push("")}for(let q of z.warnings){if(j.push(`\x1B[33mwarning\x1B[0m: ${q.message}`),j.push(` --> ${q.file}:${q.line}:${q.column}`),q.expression)j.push(" |"),j.push(` | ${q.expression}`),j.push(" |");j.push("")}if(z.valid)j.push("\x1B[32m\u2713 No type errors found\x1B[0m");else j.push(`\x1B[31m\u2717 Found ${z.errors.length} error(s) and ${z.warnings.length} warning(s)\x1B[0m`);return j.join(`
5
- `)}
6
- export{Y as Df,Z as Ef,E as Ff,I as Gf,L as Hf};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Broadcast as D,BroadcastServer as U}from"ts-broadcasting";import{channel as b}from"ts-broadcasting";import{Broadcast as N,BroadcastServer as p}from"ts-broadcasting";var z=null,H=[];function X(){return z}async function Y(j){if(z)return z;let k=j.driver??"bun",q=j.host??"0.0.0.0",G=j.port??6001,J=j.scheme??"ws",E={verbose:j.verbose??!1,driver:k,default:k,connections:{[k]:{driver:k,host:q,port:G,scheme:J}}};return z=new U(E),D.setServer(z),await z.start(),z}async function Z(){for(let j of H)clearInterval(j);if(H.length=0,!z)return;await z.stop(),z=null}async function $(j){let k=await import(j),q=k.default??k;if(typeof q!=="function")throw Error(`routes/channels.ts must export a default function, got ${typeof q}`);let G=0;return q({channel(E,A){if(G++,A.authorize&&z)z.channels.channel(E,A.authorize);if(A.interval&&A.data){let L=A.event??`${E}.updated`,M=A.data,Q=setInterval(async()=>{try{let T=await M();V(E,L,T)}catch{}},A.interval);H.push(Q)}}}),G}var K=!1;function F(){if(z)return!0;if(!K)K=!0,console.warn("[stx] broadcast() called before server started \u2014 messages will be sent once broadcasting is ready");return!1}function V(j,k,q){if(!F())return;D.send(j,k,q)}function x(j,k,q){if(!F())return;D.toUser(j,k,q)}function C(j,k,q){if(!F())return;D.toUsers(j,k,q)}function S(j,k,q){if(!F())return;D.send(`private-${j}`,k,q)}function w(j,k,q){if(!F())return;D.presence(j,k,q)}
3
- export{X as Mp,Y as Np,Z as Op,$ as Pp,V as Qp,x as Rp,C as Sp,S as Tp,w as Up,b as Vp,N as Wp,p as Xp};
@@ -1,61 +0,0 @@
1
- // @bun
2
- import{Se as O,Ve as Q}from"./chunk-psc3wfcf.js";Q();function J(j){let q=j.pwa;if(!q?.enabled)return"";let A=q.manifest,z=q.icons?.outputDir?`/${q.icons.outputDir}`:"/pwa-icons",G=O(j),C=`
3
- <!-- stx PWA Meta Tags -->
4
- <link rel="manifest" href="/manifest.json">
5
- <meta name="theme-color" content="${K(A?.themeColor||"#000000")}">
6
- <meta name="mobile-web-app-capable" content="yes">
7
- <meta name="apple-mobile-web-app-capable" content="yes">
8
- <meta name="apple-mobile-web-app-status-bar-style" content="default">
9
- <meta name="apple-mobile-web-app-title" content="${K(A?.shortName||A?.name||"App")}">`;if(q.icons?.generateAppleIcons!==!1)C+=`
10
- <link rel="apple-touch-icon" href="${z}/apple-touch-icon.png">
11
- <link rel="apple-touch-icon" sizes="120x120" href="${z}/apple-touch-icon-120x120.png">
12
- <link rel="apple-touch-icon" sizes="152x152" href="${z}/apple-touch-icon-152x152.png">
13
- <link rel="apple-touch-icon" sizes="167x167" href="${z}/apple-touch-icon-167x167.png">
14
- <link rel="apple-touch-icon" sizes="180x180" href="${z}/apple-touch-icon-180x180.png">`;return C+=`
15
- <link rel="icon" type="image/png" sizes="32x32" href="${z}/favicon-32x32.png">
16
- <link rel="icon" type="image/png" sizes="16x16" href="${z}/favicon-16x16.png">
17
- <link rel="icon" type="image/png" sizes="192x192" href="${z}/icon-192x192.png">`,C+=`
18
- <!-- stx Service Worker Registration -->
19
- <script>
20
- if ('serviceWorker' in navigator) {
21
- window.addEventListener('load', function() {
22
- navigator.serviceWorker.register('/${G}')
23
- .then(function(registration) {
24
- console.log('[PWA] Service Worker registered:', registration.scope);
25
-
26
- // Check for updates
27
- registration.addEventListener('updatefound', function() {
28
- const newWorker = registration.installing;
29
- if (newWorker) {
30
- newWorker.addEventListener('statechange', function() {
31
- if (newWorker.state === 'installed' && navigator.serviceWorker.controller) {
32
- console.log('[PWA] New content available, refresh to update');
33
- // Optionally dispatch a custom event for UI notification
34
- window.dispatchEvent(new CustomEvent('pwa-update-available'));
35
- }
36
- });
37
- }
38
- });
39
- })
40
- .catch(function(error) {
41
- console.error('[PWA] Service Worker registration failed:', error);
42
- });
43
- });
44
- }
45
- </script>
46
- <!-- End stx PWA -->`,C}function U(j,q){let A=q.pwa;if(!A?.enabled||A.autoInject===!1)return j;if(j.includes("<!-- stx PWA Meta Tags -->"))return j;if(!j.includes("</head>")){let G=j.lastIndexOf("</body>");if(G!==-1){let C=J(q);return j.slice(0,G)+C+`
47
- `+j.slice(G)}return j+J(q)}let z=J(q);return j.replace("</head>",`${z}
48
- </head>`)}function V(j){if(!j.pwa?.enabled)return"";return`<script>
49
- if ('serviceWorker' in navigator) {
50
- window.addEventListener('load', function() {
51
- navigator.serviceWorker.register('/${O(j)}')
52
- .then(function(registration) {
53
- console.log('[PWA] Service Worker registered:', registration.scope);
54
- })
55
- .catch(function(error) {
56
- console.error('[PWA] Service Worker registration failed:', error);
57
- });
58
- });
59
- }
60
- </script>`}function X(){return'<link rel="manifest" href="/manifest.json">'}function Y(j){return`<meta name="theme-color" content="${K(j)}">`}function K(j){return j.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}
61
- export{J as He,U as Ie,V as Je,X as Ke,Y as Le};
@@ -1,84 +0,0 @@
1
- // @bun
2
- var P=0;function W(){return`stx-defer-${++P}`}function X(E){let z=E.match(/on:\s*['"]?(\w+)(?:\((\d+)\))?['"]?/);if(z)return{trigger:z[1],value:z[2]};return{trigger:"immediate"}}function Y(E,z,A){let{trigger:F,value:w}=X(z),j=A,J,G,q,K=A.match(/@placeholder\s*([\s\S]*?)(?=@loading|@error|$)/);if(K)J=K[1].trim(),j=j.replace(/@placeholder[\s\S]*?(?=@loading|@error|$)/,"");let N=A.match(/@loading\s*([\s\S]*?)(?=@error|$)/);if(N)G=N[1].trim(),j=j.replace(/@loading[\s\S]*?(?=@error|$)/,"");let O=A.match(/@error(?:\s*\(\s*(\w+)\s*\))?\s*([\s\S]*)$/);if(O)q=O[2].trim(),j=j.replace(/@error(?:\s*\(\s*\w+\s*\))?[\s\S]*$/,"");return j=j.trim(),{trigger:F,triggerValue:w,content:j,placeholder:J,loading:G,error:q}}function Z(E,z){let{trigger:A,triggerValue:F}=z,w;switch(A){case"visible":w=`
3
- const observer = new IntersectionObserver((entries) => {
4
- if (entries[0].isIntersecting) {
5
- observer.disconnect();
6
- loadContent();
7
- }
8
- }, { threshold: 0.1 });
9
- observer.observe(container);
10
- `;break;case"idle":w=`
11
- if ('requestIdleCallback' in window) {
12
- requestIdleCallback(() => loadContent(), { timeout: 3000 });
13
- }
14
- else {
15
- setTimeout(loadContent, 200);
16
- }
17
- `;break;case"interaction":w=`
18
- const events = ['click', 'focus', 'touchstart'];
19
- const handler = () => {
20
- events.forEach(e => container.removeEventListener(e, handler));
21
- loadContent();
22
- };
23
- events.forEach(e => container.addEventListener(e, handler, { once: true, passive: true }));
24
- `;break;case"hover":w=`
25
- const handler = () => {
26
- container.removeEventListener('mouseenter', handler);
27
- container.removeEventListener('focusin', handler);
28
- loadContent();
29
- };
30
- container.addEventListener('mouseenter', handler, { once: true });
31
- container.addEventListener('focusin', handler, { once: true });
32
- `;break;case"timer":w=`
33
- setTimeout(loadContent, ${F||"1000"});
34
- `;break;case"immediate":default:w=`
35
- Promise.resolve().then(loadContent);
36
- `;break}return`
37
- <script>
38
- (function() {
39
- const container = document.getElementById('${E}');
40
- if (!container) return;
41
-
42
- const contentEl = container.querySelector('[data-defer-content]');
43
- const placeholderEl = container.querySelector('[data-defer-placeholder]');
44
- const loadingEl = container.querySelector('[data-defer-loading]');
45
- const errorEl = container.querySelector('[data-defer-error]');
46
-
47
- function showElement(el) {
48
- if (el) el.style.display = '';
49
- }
50
- function hideElement(el) {
51
- if (el) el.style.display = 'none';
52
- }
53
-
54
- function loadContent() {
55
- hideElement(placeholderEl);
56
- showElement(loadingEl);
57
-
58
- // Simulate async load (content is already rendered but hidden)
59
- Promise.resolve().then(() => {
60
- hideElement(loadingEl);
61
- showElement(contentEl);
62
- container.dispatchEvent(new CustomEvent('defer:loaded'));
63
- }).catch((err) => {
64
- hideElement(loadingEl);
65
- if (errorEl) {
66
- showElement(errorEl);
67
- }
68
- console.error('Defer load error:', err);
69
- });
70
- }
71
-
72
- ${w}
73
- })();
74
- </script>
75
- `}function _(E,z,A){P=0;let F=/@defer\s*\(([^)]*)\)\s*([\s\S]*?)@enddefer/g;return E.replace(F,(w,j,J)=>{let G=W(),q=Y(w,j,J),K=q.placeholder?`<div data-defer-placeholder>${q.placeholder}</div>`:"",N=q.loading?`<div data-defer-loading style="display: none;">${q.loading}</div>`:'<div data-defer-loading style="display: none;"></div>',O=q.error?`<div data-defer-error style="display: none;">${q.error}</div>`:"",Q=`<div data-defer-content style="display: none;">${q.content}</div>`,U=Z(G,q);return`
76
- <div id="${G}" class="stx-defer" data-defer-trigger="${q.trigger}">
77
- ${K}
78
- ${N}
79
- ${Q}
80
- ${O}
81
- </div>
82
- ${U}
83
- `})}
84
- export{_ as Mn};
@@ -1,231 +0,0 @@
1
- // @bun
2
- import{pm as O,rm as R,sm as f}from"./chunk-jz73j3qs.js";function _(){let q=new Map;return{islands:q,register(j){q.set(j.id,j)},get(j){return q.get(j)},async hydrate(j){let w=q.get(j);if(!w||w.hydrated)return;if(w.hydrated=!0,typeof window<"u"&&typeof window.dispatchEvent==="function")window.dispatchEvent(new CustomEvent("stx:hydrate",{detail:{id:j,component:w.component}}))},async hydrateAll(){let j=Array.from(q.values()).filter((w)=>!w.hydrated).map((w)=>this.hydrate(w.id));await Promise.all(j)}}}function b(q){return`
3
- <script data-hydrate="${q}">
4
- (function() {
5
- const island = document.querySelector('[data-island="${q}"]');
6
- if (!island) return;
7
-
8
- // Immediately hydrate
9
- island.classList.add('hydrated');
10
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
11
- })();
12
- </script>
13
- `}function k(q,j){let w=j.timeout||2000,z=j.priority||"low";return`
14
- <script data-hydrate="${q}">
15
- (function() {
16
- const island = document.querySelector('[data-island="${q}"]');
17
- if (!island) return;
18
-
19
- function hydrate() {
20
- if (island.classList.contains('hydrated')) return;
21
- island.classList.add('hydrated');
22
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
23
- }
24
-
25
- if ('requestIdleCallback' in window) {
26
- const idleOptions = { timeout: ${w} };
27
- ${z==="high"?"requestIdleCallback(hydrate, idleOptions);":`
28
- // Low priority: wait for multiple idle periods
29
- let idleCount = 0;
30
- function waitForIdle() {
31
- requestIdleCallback((deadline) => {
32
- if (deadline.didTimeout || ++idleCount >= 2) {
33
- hydrate();
34
- }
35
- else {
36
- waitForIdle();
37
- }
38
- }, idleOptions);
39
- }
40
- waitForIdle();
41
- `}
42
- }
43
- else {
44
- // Fallback for browsers without requestIdleCallback
45
- setTimeout(hydrate, ${w});
46
- }
47
- })();
48
- </script>
49
- `}function M(q,j){let w=j.rootMargin||"0px",z=j.threshold||0;return`
50
- <script data-hydrate="${q}">
51
- (function() {
52
- const island = document.querySelector('[data-island="${q}"]');
53
- if (!island) return;
54
-
55
- function hydrate() {
56
- if (island.classList.contains('hydrated')) return;
57
- island.classList.add('hydrated');
58
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
59
- }
60
-
61
- if ('IntersectionObserver' in window) {
62
- const observer = new IntersectionObserver((entries) => {
63
- entries.forEach((entry) => {
64
- if (entry.isIntersecting) {
65
- observer.disconnect();
66
- hydrate();
67
- }
68
- });
69
- }, {
70
- rootMargin: '${w}',
71
- threshold: ${JSON.stringify(z)}
72
- });
73
-
74
- observer.observe(island);
75
- }
76
- else {
77
- // Fallback: hydrate on load
78
- hydrate();
79
- }
80
- })();
81
- </script>
82
- `}function N(q,j){let w=j.media||"(min-width: 768px)";return`
83
- <script data-hydrate="${q}">
84
- (function() {
85
- const island = document.querySelector('[data-island="${q}"]');
86
- if (!island) return;
87
-
88
- function hydrate() {
89
- if (island.classList.contains('hydrated')) return;
90
- island.classList.add('hydrated');
91
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
92
- }
93
-
94
- const mediaQuery = window.matchMedia('${w}');
95
-
96
- function handleMediaChange(e) {
97
- if (e.matches) {
98
- mediaQuery.removeEventListener('change', handleMediaChange);
99
- hydrate();
100
- }
101
- }
102
-
103
- if (mediaQuery.matches) {
104
- hydrate();
105
- }
106
- else {
107
- mediaQuery.addEventListener('change', handleMediaChange);
108
- }
109
- })();
110
- </script>
111
- `}function P(q){return`
112
- <script data-hydrate="${q}">
113
- (function() {
114
- const island = document.querySelector('[data-island="${q}"]');
115
- if (!island) return;
116
-
117
- function hydrate() {
118
- if (island.classList.contains('hydrated')) return;
119
- island.classList.add('hydrated');
120
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
121
- }
122
-
123
- // Hydrate on first interaction
124
- const events = ['mouseenter', 'focusin', 'touchstart'];
125
- const handler = () => {
126
- events.forEach(e => island.removeEventListener(e, handler));
127
- hydrate();
128
- };
129
-
130
- events.forEach(e => island.addEventListener(e, handler, { once: true, passive: true }));
131
- })();
132
- </script>
133
- `}function A(q,j){let w=j.event||"stx:activate";return`
134
- <script data-hydrate="${q}">
135
- (function() {
136
- const island = document.querySelector('[data-island="${q}"]');
137
- if (!island) return;
138
-
139
- function hydrate() {
140
- if (island.classList.contains('hydrated')) return;
141
- island.classList.add('hydrated');
142
- island.dispatchEvent(new CustomEvent('stx:hydrated', { bubbles: true }));
143
- }
144
-
145
- // Listen for custom event
146
- window.addEventListener('${w}', function handler(e) {
147
- if (!e.detail || e.detail.id === '${q}' || e.detail.id === '*') {
148
- window.removeEventListener('${w}', handler);
149
- hydrate();
150
- }
151
- });
152
- })();
153
- </script>
154
- `}function D(q,j={},w){let z=q,J=!1,U=/@client:(load|idle|visible|media|only|hover|event)/i.test(q);if(z=T(z,"load",j),z=T(z,"idle",j),z=T(z,"visible",j),z=T(z,"media",j),z=C(z),z=T(z,"hover",j),z=T(z,"event",j),J=U&&z!==q,J)z+=`
155
- `+O();return z}function T(q,j,w){let z=new RegExp(`@client:${j}(?:\\s*\\(([^)]*)\\))?\\s*([\\s\\S]*?)@endclient`,"gi");return q.replace(z,(J,U,W)=>{let F={strategy:j};if(U)try{let V=U.split(",").map((X)=>X.trim());for(let X of V){let[E,L]=X.split(":").map((Y)=>Y.trim());if(E&&L){let Y=L.replace(/^['"]|['"]$/g,"");F[E]=Y}}}catch{}let G=`island-${Math.random().toString(36).substring(2,9)}`,Z=R(W.trim()),$=f(W.trim(),w),Q=[];if(F.rootMargin)Q.push(`data-root-margin="${F.rootMargin}"`);if(F.threshold!==void 0)Q.push(`data-threshold="${F.threshold}"`);if(F.media)Q.push(`data-media="${F.media}"`);if(F.event)Q.push(`data-event="${F.event}"`);if(Z)Q.push(`data-component="${Z}"`);let B=Object.keys($).length>0?`
156
- <script type="application/json" data-island-props="${G}">${JSON.stringify($)}</script>`:"",K="";switch(j){case"load":K=b(G);break;case"idle":K=k(G,F);break;case"visible":K=M(G,F);break;case"media":K=N(G,F);break;case"hover":K=P(G);break;case"event":K=A(G,F);break}return`
157
- <div data-island="${G}"
158
- data-strategy="${j}"
159
- ${Q.join(`
160
- `)}
161
- class="stx-island"
162
- style="contents;">
163
- ${W.trim()}${B}
164
- </div>
165
- ${K}
166
- `})}function C(q){let j=/@client:only\s*([\s\S]*?)@endclient/gi;return q.replace(j,(w,z)=>{let J=`island-only-${Math.random().toString(36).substring(2,9)}`;return`
167
- <div data-island="${J}"
168
- data-strategy="only"
169
- class="stx-island stx-client-only">
170
- <!-- Client-only content will be rendered here -->
171
- <template data-client-content>${z.trim()}</template>
172
- </div>
173
- <script data-hydrate="${J}">
174
- (function() {
175
- const island = document.querySelector('[data-island="${J}"]');
176
- if (!island) return;
177
-
178
- const template = island.querySelector('template[data-client-content]');
179
- if (template) {
180
- island.innerHTML = template.innerHTML;
181
- island.classList.add('hydrated');
182
- }
183
- })();
184
- </script>
185
- `})}function H(){return`
186
- /* Island base styles */
187
- .stx-island {
188
- display: contents;
189
- }
190
-
191
- /* Pre-hydration state */
192
- .stx-island:not(.hydrated) {
193
- /* Optional: add loading indicator */
194
- }
195
-
196
- /* Hydrated state */
197
- .stx-island.hydrated {
198
- /* Island is now interactive */
199
- }
200
-
201
- /* Client-only placeholder */
202
- .stx-client-only:not(.hydrated) {
203
- min-height: 50px;
204
- background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
205
- background-size: 200% 100%;
206
- animation: island-shimmer 1.5s infinite;
207
- }
208
-
209
- @keyframes island-shimmer {
210
- 0% { background-position: 200% 0; }
211
- 100% { background-position: -200% 0; }
212
- }
213
-
214
- /* Hydration transition */
215
- .stx-island {
216
- transition: opacity 0.2s ease-out;
217
- }
218
-
219
- .stx-island:not(.hydrated) {
220
- opacity: 0.7;
221
- }
222
-
223
- .stx-island.hydrated {
224
- opacity: 1;
225
- }
226
- `}function h(q){if(typeof window>"u")return;let j=document.querySelector(`[data-island="${q}"]`);if(!j||j.classList.contains("hydrated"))return;j.classList.add("hydrated"),j.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))}function S(q){if(typeof window>"u")return;document.querySelectorAll(`[data-strategy="${q}"]:not(.hydrated)`).forEach((w)=>{w.classList.add("hydrated"),w.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function x(){if(typeof window>"u")return;document.querySelectorAll(".stx-island:not(.hydrated)").forEach((j)=>{j.classList.add("hydrated"),j.dispatchEvent(new CustomEvent("stx:hydrated",{bubbles:!0}))})}function g(q){if(typeof window>"u")return!1;return document.querySelector(`[data-island="${q}"]`)?.classList.contains("hydrated")??!1}function v(q){return new Promise((j)=>{if(typeof window>"u"){j();return}let w=document.querySelector(`[data-island="${q}"]`);if(!w){j();return}if(w.classList.contains("hydrated")){j();return}w.addEventListener("stx:hydrated",()=>j(),{once:!0})})}function m(q){return q.replace(/@static\s*([\s\S]*?)@endstatic/gi,(j,w)=>{return`<div class="stx-static">${w.trim()}</div>`})}function u(q){let j=q.map((w)=>({id:w.id,component:w.component,strategy:w.options.strategy,props:w.props}));return`
227
- <script type="application/json" id="stx-island-manifest">
228
- ${JSON.stringify(j)}
229
- </script>
230
- `}var c={processPartialHydrationDirectives:D,processStaticDirectives:m,generatePartialHydrationCSS:H,generateIslandManifest:u,createIslandRegistry:_,hydrateIsland:h,hydrateByStrategy:S,hydrateAll:x,isHydrated:g,onHydrated:v};
231
- export{_ as dj,D as ej,H as fj,h as gj,S as hj,x as ij,g as jj,v as kj,m as lj,u as mj,c as nj};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{$x as p,Zx as l,by as c,dy as a}from"./chunk-r5m9xtm7.js";import{py as x}from"./chunk-zen6ax1y.js";import{Ry as P}from"./chunk-27zsyhrd.js";import{jz as f}from"./chunk-qvrbjpdc.js";import{pz as v,qz as m,vz as h}from"./chunk-w3b6m427.js";function o(G,K,q){let H=G,T=!0;while(T){T=!1;let $=H.match(/@switch\s*\(/);if(!$||$.index===void 0)break;let j=$.index,J=a(H,j);if(!J)break;try{let U;if(m(J.expression))U=h(J.expression,Object.keys(K))(...Object.values(K));else U=v(J.expression,K);let Y="",W=!1;for(let X of J.cases)if(X.type==="default"){if(!W)Y=X.content.trim()}else try{let F;if(X.value&&m(X.value))F=h(X.value,Object.keys(K))(...Object.values(K));else if(X.value)F=v(X.value,K);if(U===F){Y=X.content.trim(),W=!0;break}}catch{continue}H=H.substring(0,j)+Y+H.substring(J.end),T=!0}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("Switch",`Error evaluating @switch expression: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,j)+W+H.substring(J.end);break}}return H}function KH(G,K,q){let H=G;H=o(H,K,q);{let $=!0;while($){$=!1;let j=H.match(/@unless\s*\(/);if(!j||j.index===void 0)break;let J=j.index,U=l(H,J+7);if(!U)break;let Y=U.endPos,W=p(H,"unless","endunless",Y);if(W===-1){console.warn(`[stx] @unless directive at position ${J} has no matching @endunless \u2014 the block was skipped. Check for typos or missing closers.`);break}let X=H.slice(Y,W),F=U.expression,O=-1;{let z=0,Q=/@(?:if|unless)\s*\(/g,_=/@(?:endif|endunless)(?![a-z])/g,V=/@else(?![a-z])/g,w=[],B;while((B=Q.exec(X))!==null)w.push({pos:B.index,type:"open"});while((B=_.exec(X))!==null)w.push({pos:B.index,type:"close"});while((B=V.exec(X))!==null)w.push({pos:B.index,type:"else"});w.sort((N,L)=>N.pos-L.pos);for(let N of w)if(N.type==="open")z++;else if(N.type==="close")z--;else if(N.type==="else"&&z===0){O=N.pos;break}}let Z;if(O!==-1){let z=X.slice(0,O),Q=X.slice(O+5);Z=`@if (${F})${Q}@else ${z}@endif`}else Z=`@if (!(${F}))${X}@endif`;H=H.substring(0,J)+Z+H.substring(W+10),$=!0}}H=s(H,K,q),H=n(H,K,q),H=r(H,K);let T=()=>{let $=c(H);if($.length===0)return!1;for(let j=$.length-1;j>=0;j--){let J=$[j];try{let U="",Y=!1;for(let W of J.branches){if(Y)break;if(W.type==="else")U=W.content,Y=!0;else try{let X;if(W.condition&&m(W.condition))X=h(W.condition,Object.keys(K))(...Object.values(K));else if(W.condition)X=v(W.condition,K);if(X)U=W.content,Y=!0}catch(X){U=x(W.type==="if"?"If":"Elseif",`Error in @${W.type}(${W.condition}): ${X instanceof Error?X.message:String(X)}`,P.EVALUATION_ERROR),Y=!0}}H=H.substring(0,J.start)+U+H.substring(J.end)}catch(U){let Y=U instanceof Error?U.message:String(U),W=x("If",`Error processing @if block: ${Y}`,P.EVALUATION_ERROR);H=H.substring(0,J.start)+W+H.substring(J.end)}}return!0};while(!0){let $=H;if(!T())break;if(H===$)break}return H}function u(G){let K=0;while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!=="(")return null;K++;while(K<G.length&&/\s/.test(G[K]))K++;let q=G[K];if(q!=="'"&&q!=='"')return null;K++;let H=[];while(K<G.length){let T=G[K];if(T==="\\"&&K+1<G.length){H.push(G[K+1]),K+=2;continue}if(T===q){K++;break}H.push(T),K++}while(K<G.length&&/\s/.test(G[K]))K++;if(G[K]!==")")return null;return K++,{value:H.join(""),consumed:K}}function r(G,K){let q=G;function H(J,U,Y,W){let X=1,F=W,O=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),Z=new RegExp(`@${Y}(?![a-z])`,"g");while(F<J.length&&X>0){O.lastIndex=F,Z.lastIndex=F;let z=O.exec(J),Q=Z.exec(J),_=z?z.index:1/0,V=Q?Q.index:1/0;if(_<V)X++,F=_+z[0].length;else if(V<1/0){if(X--,X===0)return V;F=V+Q[0].length}else break}return-1}function T(J,U,Y){let W=0,X=new RegExp(`@${U}(?:\\s*\\(|\\s|$)`,"g"),F=new RegExp(`@${Y}(?![a-z])`,"g"),O=/@else(?![a-z])/g,Z=[],z;while((z=X.exec(J))!==null)Z.push({pos:z.index,type:"open"});while((z=F.exec(J))!==null)Z.push({pos:z.index,type:"close"});while((z=O.exec(J))!==null)Z.push({pos:z.index,type:"else"});Z.sort((Q,_)=>Q.pos-_.pos);for(let Q of Z)if(Q.type==="open")W++;else if(Q.type==="close")W--;else if(Q.type==="else"&&W===0)return Q.pos;return-1}{let J=!0;while(J){J=!1;let U=q.match(/@auth(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+5),O=u(F);if(O)W=O.value,X=Y+5+O.consumed;else X=Y+5;let Z=H(q,"auth","endauth",X);if(Z===-1){console.warn(`[stx] @auth directive at position ${Y} has no matching @endauth \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"auth","endauth"),_;if(!K.auth)_=!1;else _=W?f(`auth?.check && auth?.user?.[${W}]`,K):f("auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+8),J=!0}}{let J=!0;while(J){J=!1;let U=q.match(/@guest(?:\s*\(|\s|(?=\n))/);if(!U||U.index===void 0)break;let Y=U.index,W,X,F=q.slice(Y+6),O=u(F);if(O)W=O.value,X=Y+6+O.consumed;else X=Y+6;let Z=H(q,"guest","endguest",X);if(Z===-1){console.warn(`[stx] @guest directive at position ${Y} has no matching @endguest \u2014 the block was skipped.`);break}let z=q.slice(X,Z),Q=T(z,"guest","endguest"),_;if(!K.auth)_=!0;else _=W?f(`!auth?.check || !auth?.user?.[${W}]`,K):f("!auth?.check",K);let V;if(Q!==-1){let w=z.slice(0,Q),B=z.slice(Q+5);V=_?w:B}else V=_?z:"";q=q.substring(0,Y)+V+q.substring(Z+9),J=!0}}function $(J,U,Y){if(K.userCan&&typeof K.userCan[J]==="boolean")return K.userCan[J];if(K.permissions?.check&&typeof K.permissions.check==="function")try{let W=[J];if(U)W.push(U);if(Y){let X=f(Y,K);W.push(X)}return K.permissions.check(...W)}catch{return!1}return!1}function j(J){let U=J.match(/^\s*\(\s*'([^']*)'(?:,\s*'([^']*)')?(?:,\s*([^)]*))?\)/);if(!U)return null;return{ability:U[1],type:U[2],id:U[3]?.trim(),paramsEnd:U[0].length}}for(let J of["can","cannot"]){let U=`end${J}`,Y=J==="can"?"elsecan":"elsecannot",W=!0;while(W){W=!1;let X=q.match(new RegExp(`@${J}\\s*\\(`));if(!X||X.index===void 0)break;let F=X.index,O=q.slice(F+`@${J}`.length),Z=j(O);if(!Z)break;let z=F+`@${J}`.length+Z.paramsEnd,Q=H(q,J,U,z);if(Q===-1){console.warn(`[stx] @${J} directive at position ${F} has no matching @${U} \u2014 the block was skipped.`);break}let _=q.slice(z,Q),V=[],w=0,B=new RegExp(`@${J}\\s*\\(`,"g"),N=new RegExp(`@${U}(?![a-z])`,"g"),L=new RegExp(`@${Y}\\s*\\(`,"g"),D=/@else(?![a-z])/g,M=[],k;while((k=B.exec(_))!==null)M.push({pos:k.index,type:"open"});while((k=N.exec(_))!==null)M.push({pos:k.index,type:"close"});while((k=L.exec(_))!==null)M.push({pos:k.index,type:"elseDirective"});while((k=D.exec(_))!==null)M.push({pos:k.index,type:"else"});M.sort((A,I)=>A.pos-I.pos);for(let A of M){if(A.type==="open"){w++;continue}if(A.type==="close"){w--;continue}if(w===0)V.push(A)}let R=[],b=0;for(let A=0;A<V.length;A++){let I=V[A];if(R.push({content:_.slice(b,I.pos),ability:void 0}),I.type==="elseDirective"){let C=_.slice(I.pos+`@${Y}`.length),E=j(C);if(E){R[R.length-1]={content:_.slice(b,I.pos)},b=I.pos+`@${Y}`.length+E.paramsEnd,R.push({content:"",ability:E.ability,type:E.type,id:E.id}),R.pop();let d=V[A+1],i=d?d.pos:_.length;R.push({content:_.slice(b,i),ability:E.ability,type:E.type,id:E.id}),b=i}}else b=I.pos+5}if(b<_.length){let A=R[R.length-1];if(V.length>0&&V[V.length-1].type==="else")R.push({content:_.slice(b),isFinalElse:!0});else if(R.length===0)R.push({content:_.slice(b)})}let y=$(Z.ability,Z.type,Z.id),S=J==="can"?y:!y,g="";if(S)g=R[0]?.content||"";else{let A=!1;for(let I=1;I<R.length;I++){let C=R[I];if(C.isFinalElse){g=C.content,A=!0;break}if(C.ability){let E=$(C.ability,C.type,C.id);if(J==="can"?E:!E){g=C.content,A=!0;break}}}if(!A&&R.length>0){let I=R[R.length-1];if(I.isFinalElse)g=I.content}}q=q.substring(0,F)+g+q.substring(Q+`@${U}`.length),W=!0}}return q}function s(G,K,q){let H=G;function T($,j,J,U,Y){let W=!0;while(W){W=!1;let X=new RegExp(`@${j}\\s*\\(`),F=$.match(X);if(!F||F.index===void 0)break;let O=F.index,Z=l($,O+`@${j}`.length);if(!Z)break;let z=Z.endPos,Q=p($,j,J,z);if(Q===-1){console.warn(`[stx] @${j} directive at position ${O} has no matching @${J} \u2014 the block was skipped.`);break}let _=$.slice(z,Q),V=Z.expression,w=-1,B=0,N=0;while(N<_.length){let L=_.indexOf("@",N);if(L===-1)break;let D=_.substring(L);if(/^@(?:if|unless|isset|empty)\s*\(/.test(D)){B++,N=L+1;continue}if(/^@(?:endif|endunless|endisset|endempty)(?![a-z])/.test(D)){B--,N=L+1;continue}if(B===0&&/^@else(?![a-z])/.test(D)){w=L;break}N=L+1}try{let L=U(V.trim()),D;if(w!==-1){let M=_.slice(0,w),k=_.slice(w+5);D=L?M:k}else D=L?_:"";$=$.substring(0,O)+D+$.substring(Q+`@${J}`.length),W=!0}catch(L){let D=L instanceof Error?L.message:String(L),M=x(Y,`Error processing @${j} directive: ${D}`,P.EVALUATION_ERROR);$=$.substring(0,O)+M+$.substring(Q+`@${J}`.length);break}}return $}return H=T(H,"isset","endisset",($)=>{let j=f($,K);return j!==void 0&&j!==null},"Isset"),H=T(H,"empty","endempty",($)=>{let j=f($,K);return j===void 0||j===null||j===""||j===0||j===!1||Array.isArray(j)&&j.length===0||typeof j==="object"&&j!==null&&Object.keys(j).length===0},"Empty"),H}function n(G,K,q){let H=G,T="development";function $(j,J,U,Y){let W=new RegExp(`@${J}(?![a-z])`,"g"),X=new RegExp(`@${U}(?![a-z])`,"g"),F=new RegExp(`^@${J}(?![a-z])`),O=new RegExp(`^@${U}(?![a-z])`),Z=j,z=!0;while(z){z=!1,W.lastIndex=0;let Q=W.exec(Z);if(!Q)break;let _=Q.index,V=_+Q[0].length;if(J==="env"){let y=Z.substring(V).match(/^\s*\(\s*(['"])([^'"]+)\1\s*\)/);if(!y)break;V+=y[0].length,Y=T===y[2]}let w=1,B=V,N=-1;while(w>0&&B<Z.length){W.lastIndex=B,X.lastIndex=B;let y=W.exec(Z),S=X.exec(Z),g=y?y.index:1/0,A=S?S.index:1/0;if(g<A)w++,B=g+y[0].length;else if(A<1/0){if(w--,w===0){N=A;break}B=A+S[0].length}else break}if(N===-1){console.warn(`[stx] @${J} directive at position ${_} has no matching @${U} \u2014 the block was skipped.`);break}let L=Z.substring(V,N),D=-1,M=0,k=0;while(k<L.length){let y=L.indexOf("@",k);if(y===-1)break;let S=L.substring(y);if(F.test(S)){M++,k=y+1;continue}if(O.test(S)){M--,k=y+1;continue}if(M===0&&/^@else(?![a-z])/.test(S)){D=y;break}k=y+1}let R;if(D!==-1){let y=L.slice(0,D),S=L.slice(D+5);R=Y?y:S}else R=Y?L:"";let b=`@${U}`.length;Z=Z.substring(0,_)+R+Z.substring(N+b),z=!0}return Z}return H=$(H,"env","endenv",!1),H=$(H,"production","endproduction",T==="production"),H=$(H,"development","enddevelopment",T==="development"),H=$(H,"staging","endstaging",T==="staging"),H=$(H,"testing","endtesting",T==="testing"),H}
3
- export{o as Px,KH as Qx,r as Rx,s as Sx,n as Tx};
@@ -1,36 +0,0 @@
1
- // @bun
2
- var P={indentSize:2,useTabs:!1,maxLineLength:120,normalizeWhitespace:!0,sortAttributes:!1,trimTrailingWhitespace:!0};function O(K,q={}){let Q={...P,...q};if(K.trim()==="")return`
3
- `;let j=K;if(Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,"");if(j=I(j,Q),j=L(j,Q),j=N(j,Q),Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,""),j=j.replace(/(\S)[ \t]+(<\/[^>]+>)/g,"$1$2");if(j=j.replace(/\r\n/g,`
4
- `).replace(/\r/g,`
5
- `),!j.endsWith(`
6
- `))j+=`
7
- `;return j}function v(K,q={}){let Q={...P,...q};if(K.trim()==="")return`
8
- `;let j=K;if(j=j.replace(/^( *)```(html|stx)\n([\s\S]*?)^( *)```/gm,(w,W,Y,X,Z)=>{let V=X.split(`
9
- `),G=V.filter(($)=>$.trim().length>0);if(G.length===0)return w;let H=Math.min(...G.map(($)=>{let F=$.match(/^( *)/);return F?F[1].length:0})),z=V.map(($)=>{if($.trim().length===0)return"";return $.substring(H)}).join(`
10
- `),R=O(z,Q).trimEnd().split(`
11
- `).map(($)=>{if($.trim().length===0)return"";return W+$}).join(`
12
- `);return`${W}\`\`\`${Y}
13
- ${R}
14
- ${W}\`\`\``}),Q.trimTrailingWhitespace)j=j.replace(/[ \t]+$/gm,"");if(j=j.replace(/\r\n/g,`
15
- `).replace(/\r/g,`
16
- `),!j.endsWith(`
17
- `))j+=`
18
- `;return j}function D(K){let q=K,Q=[],j="__PROTECTED_BLOCK_";return q=q.replace(/(<(?:pre|code|textarea)[^>]*>)([\s\S]*?)(<\/(?:pre|code|textarea)>)/gi,(w)=>{let W=Q.length;return Q.push(w),`${j}${W}__`}),q=q.replace(/(@(?:if|foreach|for|while|unless|section|component|slot|push|prepend|error|auth|guest|can)(?:\((?:[^()'"]|'[^']*'|"[^"]*"|\((?:[^()'"]|'[^']*'|"[^"]*")*\))*\))?)/g,`
19
- $1
20
- `),q=q.replace(/(@end\w+)/g,`
21
- $1
22
- `),q=q.replace(/(@(?:else|elseif|empty)(?:\((?:[^()'"]|'[^']*'|"[^"]*"|\((?:[^()'"]|'[^']*'|"[^"]*")*\))*\))?)/g,`
23
- $1
24
- `),q=q.replace(/(@(?:csrf|method|include|extends|yield|stack|vite|asset)(?:\([^)]*\))?)/g,`
25
- $1
26
- `),q=q.replace(/(?<=>)(<(?!\/)[^>]+>)/g,(w,W,Y,X)=>{let Z=X.substring(Y+w.length,Math.min(X.length,Y+w.length+20)),V=w.match(/<(\w+)/)?.[1];if(V&&Z.match(new RegExp(`^</${V}>`)))return w;return`
27
- ${w}`}),q=q.replace(/(>)(<\/)/g,(w,W,Y,X,Z)=>{let V=Z.substring(Math.max(0,X-50),X),H=Z.substring(X+w.length,Math.min(Z.length,X+w.length+20)).match(/^(\w+)>/)?.[1],z=V.match(/<(\w+)[^>]*$/)?.[1];if(z&&H&&z===H)return w;return`${W}
28
- ${Y}`}),q=q.replace(/(<\/[^>]+>)(?=<|$)/g,(w,W,Y,X)=>{let Z=X.substring(Math.max(0,Y-20),Y),V=w.match(/<\/(\w+)>/)?.[1],G=new RegExp(`<${V}[^>]*>$`);if(V&&Z.match(G))return w;return`${w}
29
- `}),q=q.replace(new RegExp(`${j}(\\d+)__`,"g"),(w,W)=>{return Q[Number.parseInt(W,10)]}),q=q.replace(/\n{2,}/g,`
30
- `),q=q.split(`
31
- `).map((w)=>w.trim()).join(`
32
- `),q=q.replace(/^\n+/,"").replace(/\n+$/,""),q}function I(K,q){let j=D(K).split(`
33
- `),w=[],W=0,Y=!1,X=q.useTabs?"\t":" ".repeat(q.indentSize);for(let Z=0;Z<j.length;Z++){let V=j[Z],G=V.trim();if(G===""){w.push("");continue}let H=G.match(/<script\b/i),z=G.match(/<\/script>/i);if(Y&&!z){w.push(V);continue}let J=G===">";if(_(G)&&!G.startsWith("<")&&!G.startsWith("@")){w.push(X.repeat(W)+G);continue}let R=G.startsWith("@end"),$=G.startsWith("@else")||G.startsWith("@elseif"),F=G.startsWith("@")&&x(G),y=G.startsWith("<!DOCTYPE")||G.startsWith("<!doctype"),A=G.startsWith("<!--"),U=G.startsWith("</"),B=G.startsWith("<")&&!U&&!A&&!y,k=G.includes("/>")||S(G),E=_(G);if(U||R)W=Math.max(0,W-1);let M=$?Math.max(0,W-1):W;if(J)w.push(V);else w.push(X.repeat(M)+G);if(B&&!k&&!E&&!J||F)W++;if(H)Y=!0;if(z)Y=!1}return w.join(`
34
- `)}function N(K,q){if(K=K.replace(/@(if|elseif|foreach|for|while)\s*\(\s*([^)]+)\s*\)/g,(Q,j,w)=>{let W=w.trim().replace(/\s+/g," ");return`@${j}(${W})`}),K=K.replace(/@(csrf|method)\s*\(\s*([^)]*)\s*\)/g,(Q,j,w)=>{if(w.trim()==="")return`@${j}`;return`@${j}(${w.trim()})`}),q.normalizeWhitespace)K=K.replace(/\{\{\s*([^}]+)\s*\}\}/g,(Q,j)=>{return`{{ ${j.trim()} }}`}),K=K.replace(/\{!!\s*([^!]+)\s*!!\}/g,(Q,j)=>{return`{!! ${j.trim()} !!}`});return K}function S(K){let q=["br","hr","img","input","meta","link","area","base","col","embed","source","track","wbr"];if(K.includes("/>"))return!0;let Q=K.match(/<(\w+)/);if(Q){let j=Q[1];return q.includes(j.toLowerCase())}return!1}function _(K){return/<(\w+)(?:\s[^>]*)?>[\s\S]*?<\/\1>/.test(K)}function x(K){let q=["if","unless","foreach","for","while","section","push","component","slot","markdown","wrap","error"];for(let Q of q)if(K.startsWith(`@${Q}`))return!K.includes(`@end${Q}`);return!1}function L(K,q){if(!q.sortAttributes)return K;return K.replace(/<(\w+)([^>]*)>/g,(Q,j,w)=>{if(!w.trim())return Q;if(w.includes("<")||w.includes(`
35
- `)||w.includes("@"))return Q;let W=/(\w+)(?:=("[^"]*"|'[^']*'|[^\s>]+))?/g,Y=[],X;while((X=W.exec(w))!==null)Y.push({name:X[1],value:X[2]});Y.sort((V,G)=>{if(V.name==="id")return-1;if(G.name==="id")return 1;if(V.name==="class")return-1;if(G.name==="class")return 1;return V.name.localeCompare(G.name)});let Z=Y.map((V)=>V.value?`${V.name}=${V.value}`:V.name).join(" ");return`<${j}${Z?` ${Z}`:""}>`})}
36
- export{O as bn,v as cn};